[0]) {
- isPending.value = true; error.value = null
- try { return await callJwtRefresh(args) }
- catch (e) { error.value = e as Error; throw e }
- finally { isPending.value = false }
- }
- return { mutate, isPending, error }
-}
-
-export type { ContextState } from '@mizan/runtime'
-export { configure, initSession, MizanError } from '@mizan/runtime'
diff --git a/examples/django-react-site/harness/src/fixtures.tsx b/examples/django-react-site/harness/src/fixtures.tsx
index 04fe4ea..6a5c2f0 100644
--- a/examples/django-react-site/harness/src/fixtures.tsx
+++ b/examples/django-react-site/harness/src/fixtures.tsx
@@ -23,11 +23,10 @@ import {
useBuggyFn,
usePermissionCheckFn,
useCurrentUser,
- DjangoError,
+ MizanError,
useMizan,
- useChatChannel,
} from './api'
-import { useContactForm, useLoginForm } from './api/generated.forms'
+import { useChatChannel } from './api/channels.hooks'
// ─── Fixture router ─────────────────────────────────────────────────────────
@@ -55,9 +54,7 @@ export function Fixtures() {
case 'permission-error': return
case 'permission-success': return
case 'context-current-user': return
- case 'form-login-schema': return
- case 'form-contact-schema': return
- case 'form-contact-submit': return
+ // Form fixtures removed — forms codegen deferred per Blazr scope
case 'channel-chat': return
default: return Harness ready. Set #hash.
}
@@ -74,10 +71,10 @@ function Result({ data, error }: { data?: unknown; error?: unknown }) {
{error !== undefined && error !== null && (
<>
- {error instanceof DjangoError ? 'DjangoError' : 'Error'}
+ {error instanceof MizanError ? 'MizanError' : 'Error'}
- {error instanceof DjangoError ? error.code : ''}
+ {error instanceof MizanError ? error.code : ''}
{error instanceof Error ? error.message : String(error)}
@@ -187,44 +184,6 @@ function ContextCurrentUser() {
}
}
-// ─── Form fixtures (using generated form hooks) ─────────────────────────────
-
-function FormLoginSchema() {
- const form = useLoginForm()
- if (form.loading) return loading...
- return {JSON.stringify(form.schema)}
-}
-
-function FormContactSchema() {
- const form = useContactForm()
- if (form.loading) return loading...
- return {JSON.stringify(form.schema)}
-}
-
-function FormContactSubmit() {
- const form = useContactForm()
- const [result, setResult] = useState()
- const [submitted, setSubmitted] = useState(false)
-
- useEffect(() => {
- if (!form.loading && !submitted) {
- form.set('name', 'Test User')
- form.set('email', 'test@example.com')
- form.set('message', 'Hello from e2e')
- setSubmitted(true)
- }
- }, [form.loading, submitted, form])
-
- useEffect(() => {
- if (submitted && !result) {
- form.submit().then(setResult)
- }
- }, [submitted, result, form])
-
- if (!result) return loading...
- return {JSON.stringify(result)}
-}
-
// ─── Channel fixtures ───────────────────────────────────────────────────────
function ChannelChatFixture() {