Rename djarea to mizan and fix React casing conventions
Rename the package from djarea to mizan across the entire codebase — Python package, React library, generators, tests, and examples. Fix JSX/hook casing (MizanProvider, useMizan, etc.) that broke when the original PascalCase names were lowercased during the rename. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* Djarea - Django Server Functions Client
|
||||
* mizan - Django Server Functions Client
|
||||
*
|
||||
* Frontend client for Django server functions.
|
||||
* Server functions are the core primitive - accessed via React hooks.
|
||||
@@ -9,9 +9,9 @@
|
||||
* 1. Library layer (this package) - Generic name-based API
|
||||
* Used by libraries like Allauth that need to call functions by name.
|
||||
*
|
||||
* import { useDjarea, useDjareaContext, useDjareaCall } from 'djarea'
|
||||
* const user = useDjareaContext('current_user')
|
||||
* const call = useDjareaCall('update_profile')
|
||||
* import { useMizan, useMizanContext, useMizanCall } from 'mizan'
|
||||
* const user = useMizanContext('current_user')
|
||||
* const call = useMizanCall('update_profile')
|
||||
*
|
||||
* 2. Generated layer (@/api) - Typed project-specific API
|
||||
* Used by product code for type-safe hooks.
|
||||
@@ -20,7 +20,7 @@
|
||||
* const user = useCurrentUser()
|
||||
* const updateProfile = useUpdateProfile()
|
||||
*
|
||||
* The generated code wraps DjareaProvider and adds type-safe hooks.
|
||||
* The generated code wraps MizanProvider and adds type-safe hooks.
|
||||
*/
|
||||
|
||||
// ============================================================================
|
||||
@@ -29,19 +29,19 @@
|
||||
|
||||
export {
|
||||
// Provider
|
||||
DjareaProvider,
|
||||
type DjareaProviderProps,
|
||||
type DjareaHydration,
|
||||
MizanProvider,
|
||||
type MizanProviderProps,
|
||||
type MizanHydration,
|
||||
|
||||
// Hooks (generic name-based API for libraries)
|
||||
useDjarea,
|
||||
useDjareaContext,
|
||||
useDjareaCall,
|
||||
useDjareaStatus,
|
||||
useMizan,
|
||||
useMizanContext,
|
||||
useMizanCall,
|
||||
useMizanStatus,
|
||||
usePush,
|
||||
|
||||
// Types
|
||||
type DjareaContextValue,
|
||||
type MizanContextValue,
|
||||
type ConnectionStatus,
|
||||
type PushMessage,
|
||||
type PushListener,
|
||||
@@ -89,9 +89,9 @@ export {
|
||||
|
||||
export {
|
||||
// Single form
|
||||
useDjareaFormCore,
|
||||
useMizanFormCore,
|
||||
// Legacy alias
|
||||
useDjareaFormCore as useDjangoFormCore,
|
||||
useMizanFormCore as useDjangoFormCore,
|
||||
type DjangoFormState,
|
||||
type FormSchema,
|
||||
type FormErrors,
|
||||
@@ -99,9 +99,9 @@ export {
|
||||
type FormSubmitResult,
|
||||
type FormCoreConfig,
|
||||
// Formset
|
||||
useDjareaFormsetCore,
|
||||
useMizanFormsetCore,
|
||||
// Legacy alias
|
||||
useDjareaFormsetCore as useDjangoFormsetCore,
|
||||
useMizanFormsetCore as useDjangoFormsetCore,
|
||||
type DjangoFormsetState,
|
||||
type FormsetSchema,
|
||||
type FormsetErrors,
|
||||
|
||||
Reference in New Issue
Block a user