attaform 0.24.3 → 0.25.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (89) hide show
  1. package/dist/chunks/devtools.cjs +1 -1
  2. package/dist/chunks/devtools.mjs +1 -1
  3. package/dist/chunks/fingerprint2.cjs +1 -1
  4. package/dist/chunks/fingerprint2.mjs +1 -1
  5. package/dist/index.cjs +4 -4
  6. package/dist/index.d.cts +4 -4
  7. package/dist/index.d.mts +4 -4
  8. package/dist/index.d.ts +4 -4
  9. package/dist/index.mjs +4 -4
  10. package/dist/nuxt.d.cts +1 -1
  11. package/dist/nuxt.d.mts +1 -1
  12. package/dist/nuxt.d.ts +1 -1
  13. package/dist/runtime/plugins/attaform.cjs +2 -2
  14. package/dist/runtime/plugins/attaform.mjs +2 -2
  15. package/dist/shared/{attaform.DQcdvxKZ.cjs → attaform.3heDHayA.cjs} +146 -3
  16. package/dist/shared/attaform.3heDHayA.cjs.map +1 -0
  17. package/dist/shared/{attaform.yqcYwt0d.d.ts → attaform.8vmdOURQ.d.mts} +124 -56
  18. package/dist/shared/{attaform.BjiHiYAZ.d.ts → attaform.B3cgZE3c.d.ts} +1 -1
  19. package/dist/shared/{attaform.DHjRN5JP.d.cts → attaform.B5GFS3Su.d.cts} +124 -56
  20. package/dist/shared/{attaform.BVjueUPu.cjs → attaform.B5YcWrKi.cjs} +3 -3
  21. package/dist/shared/{attaform.BVjueUPu.cjs.map → attaform.B5YcWrKi.cjs.map} +1 -1
  22. package/dist/shared/{attaform.Bx6pgrIy.d.cts → attaform.BJt4ZCkM.d.mts} +1 -1
  23. package/dist/shared/{attaform.DK6_Ctv7.cjs → attaform.BRzKBj2g.cjs} +182 -7
  24. package/dist/shared/attaform.BRzKBj2g.cjs.map +1 -0
  25. package/dist/shared/{attaform.CB1kYKUB.cjs → attaform.BkUzunyB.cjs} +180 -38
  26. package/dist/shared/attaform.BkUzunyB.cjs.map +1 -0
  27. package/dist/shared/{attaform.Dbzwtn4g.mjs → attaform.CN4ZEGo6.mjs} +4 -4
  28. package/dist/shared/{attaform.Dbzwtn4g.mjs.map → attaform.CN4ZEGo6.mjs.map} +1 -1
  29. package/dist/shared/{attaform.C5qkSN6t.mjs → attaform.CqwcTExO.mjs} +146 -3
  30. package/dist/shared/attaform.CqwcTExO.mjs.map +1 -0
  31. package/dist/shared/{attaform.D4ebpNbS.mjs → attaform.CwXXbZIQ.mjs} +3 -3
  32. package/dist/shared/{attaform.D4ebpNbS.mjs.map → attaform.CwXXbZIQ.mjs.map} +1 -1
  33. package/dist/shared/{attaform.B_F61Rx1.mjs → attaform.DK3xUBkj.mjs} +181 -39
  34. package/dist/shared/attaform.DK3xUBkj.mjs.map +1 -0
  35. package/dist/shared/{attaform.ByIB7i15.mjs → attaform.DMNnfQq_.mjs} +4 -4
  36. package/dist/shared/{attaform.ByIB7i15.mjs.map → attaform.DMNnfQq_.mjs.map} +1 -1
  37. package/dist/shared/{attaform.0zueP54D.d.mts → attaform.DS_zBcdr.d.ts} +124 -56
  38. package/dist/shared/{attaform.DvqdxvNU.d.mts → attaform.DmKLa4tL.d.cts} +1 -1
  39. package/dist/shared/{attaform.DgbHNLf_.mjs → attaform.OLtKd9gM.mjs} +2 -2
  40. package/dist/shared/{attaform.DgbHNLf_.mjs.map → attaform.OLtKd9gM.mjs.map} +1 -1
  41. package/dist/shared/{attaform.WvcckZMD.mjs → attaform.Vp2-CWZB.mjs} +3 -2
  42. package/dist/shared/attaform.Vp2-CWZB.mjs.map +1 -0
  43. package/dist/shared/{attaform.CqlLImc1.cjs → attaform.Xe8dATED.cjs} +4 -4
  44. package/dist/shared/{attaform.CqlLImc1.cjs.map → attaform.Xe8dATED.cjs.map} +1 -1
  45. package/dist/shared/{attaform.CjdepGnw.cjs → attaform.ZXZ6dH72.cjs} +3 -1
  46. package/dist/shared/attaform.ZXZ6dH72.cjs.map +1 -0
  47. package/dist/shared/{attaform.DUc6cetN.d.cts → attaform.i_LA3X9o.d.cts} +54 -2
  48. package/dist/shared/{attaform.DUc6cetN.d.ts → attaform.i_LA3X9o.d.mts} +54 -2
  49. package/dist/shared/{attaform.DUc6cetN.d.mts → attaform.i_LA3X9o.d.ts} +54 -2
  50. package/dist/shared/{attaform.DwCtxauq.mjs → attaform.k9V0py0s.mjs} +182 -8
  51. package/dist/shared/attaform.k9V0py0s.mjs.map +1 -0
  52. package/dist/shared/{attaform.DfnwaGW2.cjs → attaform.sks1MFVO.cjs} +4 -4
  53. package/dist/shared/{attaform.DfnwaGW2.cjs.map → attaform.sks1MFVO.cjs.map} +1 -1
  54. package/dist/shared/{attaform.DRWrVSkH.cjs → attaform.xBDo0Ko0.cjs} +2 -2
  55. package/dist/shared/{attaform.DRWrVSkH.cjs.map → attaform.xBDo0Ko0.cjs.map} +1 -1
  56. package/dist/transforms.cjs +2 -1
  57. package/dist/transforms.cjs.map +1 -1
  58. package/dist/transforms.d.cts +13 -1
  59. package/dist/transforms.d.mts +13 -1
  60. package/dist/transforms.d.ts +13 -1
  61. package/dist/transforms.mjs +1 -1
  62. package/dist/vite.cjs +2 -1
  63. package/dist/vite.cjs.map +1 -1
  64. package/dist/vite.mjs +2 -1
  65. package/dist/vite.mjs.map +1 -1
  66. package/dist/zod-v3.cjs +2 -2
  67. package/dist/zod-v3.d.cts +3 -3
  68. package/dist/zod-v3.d.mts +3 -3
  69. package/dist/zod-v3.d.ts +3 -3
  70. package/dist/zod-v3.mjs +2 -2
  71. package/dist/zod-v4.cjs +2 -2
  72. package/dist/zod-v4.d.cts +5 -5
  73. package/dist/zod-v4.d.mts +5 -5
  74. package/dist/zod-v4.d.ts +5 -5
  75. package/dist/zod-v4.mjs +2 -2
  76. package/dist/zod.cjs +5 -5
  77. package/dist/zod.d.cts +5 -5
  78. package/dist/zod.d.mts +5 -5
  79. package/dist/zod.d.ts +5 -5
  80. package/dist/zod.mjs +5 -5
  81. package/package.json +6 -2
  82. package/dist/shared/attaform.B_F61Rx1.mjs.map +0 -1
  83. package/dist/shared/attaform.C5qkSN6t.mjs.map +0 -1
  84. package/dist/shared/attaform.CB1kYKUB.cjs.map +0 -1
  85. package/dist/shared/attaform.CjdepGnw.cjs.map +0 -1
  86. package/dist/shared/attaform.DK6_Ctv7.cjs.map +0 -1
  87. package/dist/shared/attaform.DQcdvxKZ.cjs.map +0 -1
  88. package/dist/shared/attaform.DwCtxauq.mjs.map +0 -1
  89. package/dist/shared/attaform.WvcckZMD.mjs.map +0 -1
@@ -1,4 +1,4 @@
1
- import { F as FormKey, W as PathKey, m as DisplayCtx, d as GetDisplayState, n as DisplayMachine, V as Path, aa as SlimPrimitiveKind, C as CoercionEntry, g as CoercionRegistry, G as GenericForm, ag as ValidationError, a as AbstractSchema, ak as WriteMeta, j as DeepPartial, al as WriteShape, at as TransformAbortHolder, ae as ValidateOn, A as AttaformDefaults, b as UseFormReturnType, c as RegisterValue } from './attaform.DUc6cetN.cjs';
1
+ import { F as FormKey, b as UseFormReturnType, G as GenericForm, W as PathKey, m as DisplayCtx, d as GetDisplayState, n as DisplayMachine, V as Path, aa as SlimPrimitiveKind, C as CoercionEntry, g as CoercionRegistry, ag as ValidationError, a as AbstractSchema, ak as WriteMeta, j as DeepPartial, al as WriteShape, at as TransformAbortHolder, ae as ValidateOn, A as AttaformDefaults, c as RegisterValue } from './attaform.i_LA3X9o.cjs';
2
2
  import { Ref, ComputedRef, App, InjectionKey } from 'vue';
3
3
 
4
4
  /**
@@ -137,23 +137,27 @@ declare const _lazyBrand: unique symbol;
137
137
  */
138
138
  type LazyMarker<Ctx = WizardCtx> = {
139
139
  readonly [_lazyBrand]: true;
140
- readonly resolve: (ctx: Ctx) => AnyForm | string | undefined;
140
+ readonly resolve: (ctx: Ctx) => AnyForm | string | null | undefined;
141
141
  };
142
142
  /**
143
143
  * One position in the source `useWizard({ steps })` array. Each slot
144
- * resolves to a compiled `{ key, form }` step:
144
+ * resolves to a compiled `{ key, form }` step, or drops out:
145
145
  *
146
146
  * - `AnyForm` — a form declared via `useForm`. Surfaced as-is.
147
147
  * - `string` — bare key. The wizard generates a noop form
148
148
  * under the hood so the external surface stays
149
149
  * uniform across affordance positions (intro,
150
150
  * terms, congratulations, review surfaces).
151
+ * - `null` / `undefined` — a literal absence, dropped from the compiled
152
+ * list. Lets a conditional step read inline as
153
+ * `cond ? form : null` without pre-filtering the
154
+ * array.
151
155
  * - function — eager slot, re-evaluates reactively. Returns
152
- * one of the above, or `undefined` to drop the
153
- * slot from the compiled list.
156
+ * one of the above, or `null` / `undefined` to
157
+ * drop the slot from the compiled list.
154
158
  * - `LazyMarker` — memoized function slot (see `lazy`).
155
159
  */
156
- type StepSlot<Ctx = WizardCtx> = AnyForm | string | ((ctx: Ctx) => AnyForm | string | undefined) | LazyMarker<Ctx>;
160
+ type StepSlot<Ctx = WizardCtx> = AnyForm | string | null | undefined | ((ctx: Ctx) => AnyForm | string | null | undefined) | LazyMarker<Ctx>;
157
161
  /**
158
162
  * Shape returned by the `restore` callback. Carries the active step's
159
163
  * key; intentionally open-ended (object form) so future additions land
@@ -178,8 +182,9 @@ type WizardRestoreFn = () => WizardRestoreState | undefined;
178
182
  type WizardPersistFn = (state: WizardRestoreState) => void;
179
183
  /**
180
184
  * Submit context passed to the `onSubmit` callback registered via
181
- * `wizard.handleSubmit(onSubmit, onError?)`. Same shape on every step;
182
- * `isFinal` distinguishes intermediate vs final calls.
185
+ * `wizard.handleSubmit(onSubmit, onError?)`. `handleSubmit` always
186
+ * processes the whole step list, so `values` carries every form's
187
+ * parsed output regardless of which step fired the submit.
183
188
  *
184
189
  * - `values` — namespaced aggregate keyed by form key, mirroring
185
190
  * `wizard.allValues`. Reflects parsed output for every
@@ -190,9 +195,11 @@ type WizardPersistFn = (state: WizardRestoreState) => void;
190
195
  * because the form ref carries its schema info.
191
196
  * - `currentKey` — key of the step that fired this submission.
192
197
  * - `isFinal` — `true` when `currentKey` is the last position in
193
- * `wizard.steps`. Intermediate calls validate the active
194
- * form only and advance; final calls validate every form
195
- * and stay on the terminal step.
198
+ * `wizard.steps`. Positional only: it reports where the
199
+ * submit fired, never what got validated. A user who steps
200
+ * back, edits, and submits from the middle sees
201
+ * `isFinal === false`, yet the whole list is still
202
+ * processed and `done` still latches on success.
196
203
  */
197
204
  type WizardSubmitContext = {
198
205
  readonly values: Readonly<Record<FormKey, unknown>>;
@@ -209,9 +216,11 @@ type WizardSubmitContext = {
209
216
  type WizardOnSubmit = (ctx: WizardSubmitContext) => void | Promise<void>;
210
217
  /**
211
218
  * Optional `onError` callback registered via `wizard.handleSubmit`.
212
- * Receives the aggregate error list. Entries originate from per-form
213
- * validation, activation failures (`atta:activation-failed`), and a
214
- * submit callback that left errors on a processed step (the
219
+ * Receives the aggregate error list spanning EVERY step (handleSubmit
220
+ * validates the whole wizard), so a failed submit surfaces every form's
221
+ * errors at once, not just the active step's. Entries originate from
222
+ * per-form validation, activation failures (`atta:activation-failed`),
223
+ * and a submit callback that left errors on a processed step (the
215
224
  * `setErrors(...); return` server-rejection path). Sync or async; the
216
225
  * returned promise gates `wizard.submitting`.
217
226
  */
@@ -296,24 +305,55 @@ type WizardOptions = {
296
305
  */
297
306
  readonly persist?: WizardPersistFn | false;
298
307
  };
308
+ /**
309
+ * True when a single slot is guaranteed to contribute exactly one
310
+ * compiled step: a bare form or affordance string that is neither
311
+ * nullish nor a (maybe-absent) function / `lazy()` slot. One of these
312
+ * anywhere in the tuple proves the compiled list is non-empty.
313
+ */
314
+ type IsGuaranteedStep<T> = [null] extends [T] ? false : [undefined] extends [T] ? false : T extends LazyMarker | ((...args: unknown[]) => unknown) ? false : T extends string ? true : T extends {
315
+ readonly key: string;
316
+ } ? true : false;
299
317
  /**
300
318
  * Predicate: is the steps tuple statically guaranteed to compile to a
301
- * non-empty list? A tuple passes when (a) it's not the empty array
302
- * literal and (b) it carries no function or `lazy()` slot those
303
- * slot kinds can resolve to `undefined` at runtime and drop the
304
- * compiled position. Form slots and bare-string affordance slots
305
- * always preserve their position; a tuple made of only those kinds is
306
- * statically safe.
319
+ * non-empty list? True when at least one element is a guaranteed step
320
+ * (see `IsGuaranteedStep`). Function / `lazy()` slots may resolve to
321
+ * nothing, and `null` / `undefined` (a literal absence or a
322
+ * `cond ? form : null` union) is an explicit drop, so none of those
323
+ * prove non-emptiness; a tuple of only maybe-absent slots stays
324
+ * honestly `| undefined`.
307
325
  *
308
326
  * Used to narrow `currentStep` / `activeForm` to their non-`undefined`
309
327
  * shapes in the common-case wizard, while keeping the honest union
310
328
  * everywhere a runtime drop is reachable.
311
329
  */
312
- type StaticallyNonEmpty<S> = S extends readonly [] ? false : S extends readonly (infer Item)[] ? Item extends LazyMarker | ((...args: unknown[]) => unknown) ? false : true : false;
330
+ type StaticallyNonEmpty<S> = S extends readonly [infer First, ...infer Rest] ? IsGuaranteedStep<First> extends true ? true : StaticallyNonEmpty<Rest> : false;
313
331
  /** Active step's key, narrowed to `string` when `S` is statically safe. */
314
332
  type CurrentStepOf<S> = StaticallyNonEmpty<S> extends true ? FormKey : FormKey | undefined;
315
- /** Active step's form handle, narrowed to `AnyForm` when `S` is statically safe. */
316
- type ActiveFormOf<S> = StaticallyNonEmpty<S> extends true ? AnyForm : AnyForm | undefined;
333
+ /**
334
+ * Active step's form handle, schema-erased to `UseFormReturnType<GenericForm>`
335
+ * and narrowed to non-`undefined` when `S` is statically safe. The runtime
336
+ * value is a live facade over the active step, so reads (`.values`, `.meta`,
337
+ * `.history`) and `.handleSubmit` always target the current step. Values are
338
+ * loose here because the active step's schema is not statically known; reach
339
+ * for the original form ref or `ctx.get(ref)` when you need typed per-step
340
+ * values.
341
+ */
342
+ type ActiveFormOf<S> = StaticallyNonEmpty<S> extends true ? UseFormReturnType<GenericForm> : UseFormReturnType<GenericForm> | undefined;
343
+ /**
344
+ * Per-slot contribution to {@link FormsRecordOf}. Strips a `null` /
345
+ * `undefined` (a literal absence or a `cond ? form : null` union) off the
346
+ * slot first, so a conditionally-present form still maps to its key and
347
+ * stays concretely typed on `wizard.forms`; a purely nullish slot
348
+ * contributes nothing.
349
+ */
350
+ type SlotRecord<First, F = Exclude<First, null | undefined>> = [F] extends [never] ? unknown : F extends string ? {
351
+ readonly [P in F]: AnyForm;
352
+ } : F extends {
353
+ readonly key: infer K extends string;
354
+ } ? {
355
+ readonly [P in K]: F;
356
+ } : unknown;
317
357
  /**
318
358
  * Recursive tuple walk that builds the static portion of
319
359
  * `wizard.forms`. Each step slot contributes to the record:
@@ -325,7 +365,9 @@ type ActiveFormOf<S> = StaticallyNonEmpty<S> extends true ? AnyForm : AnyForm |
325
365
  * the form's own `key` becomes the record key, and the value is
326
366
  * the concrete form handle type — so drilling
327
367
  * `wizard.forms.shipping.values.address` carries the schema-derived
328
- * field types through.
368
+ * field types through. A form kept behind a `cond ? form : null`
369
+ * conditional still maps to its key.
370
+ * - **`null` / `undefined` slot**: contributes nothing.
329
371
  * - **Function / `lazy()` slot**: contributes nothing to the static
330
372
  * map. Runtime-resolved forms are still reachable via the
331
373
  * catch-all index signature on `WizardForms` (typed as `AnyForm`).
@@ -336,13 +378,7 @@ type ActiveFormOf<S> = StaticallyNonEmpty<S> extends true ? AnyForm : AnyForm |
336
378
  type FormsRecordOf<S> = S extends readonly [
337
379
  infer First,
338
380
  ...infer Rest extends ReadonlyArray<StepSlot>
339
- ] ? (First extends string ? {
340
- readonly [P in First]: AnyForm;
341
- } : First extends {
342
- readonly key: infer K extends string;
343
- } ? {
344
- readonly [P in K]: First;
345
- } : unknown) & FormsRecordOf<Rest> : unknown;
381
+ ] ? SlotRecord<First> & FormsRecordOf<Rest> : unknown;
346
382
  /**
347
383
  * `wizard.forms` typed view. Combines the static per-step type map
348
384
  * with a catch-all `Record<FormKey, AnyForm>` fallback so:
@@ -376,9 +412,15 @@ type WizardForms<S> = FormsRecordOf<S> & Readonly<Record<FormKey, AnyForm>>;
376
412
  * slots). Otherwise reads as `string | undefined`
377
413
  * so the degenerate case (empty list at runtime)
378
414
  * surfaces honestly.
379
- * - `activeForm` — the active step's form handle. Same narrowing as
380
- * `currentStep`. Noop forms cover string slots in
381
- * the normal path.
415
+ * - `activeForm` — a LIVE view of the active step's form. Operating
416
+ * through it always targets the current step, so a
417
+ * handler captured once at setup
418
+ * (`wizard.activeForm.handleSubmit(() =>
419
+ * wizard.next())`) retargets as the wizard advances.
420
+ * No longer `===` the raw per-step handle; reach for
421
+ * `wizard.forms[key]` when you need raw identity.
422
+ * Same `undefined` narrowing as `currentStep`. Noop
423
+ * forms cover string slots in the normal path.
382
424
  * - `activeIndex` — 0-based position of the active step.
383
425
  * - `isFinalStep` — `true` when `currentStep === steps[count - 1].key`.
384
426
  * - `steps` — ordered list of compiled `{ key, form }` slots.
@@ -404,13 +446,13 @@ type WizardForms<S> = FormsRecordOf<S> & Readonly<Record<FormKey, AnyForm>>;
404
446
  * Forward-looking; reactive to current form
405
447
  * validity. Gates "Finish button enable" style UI.
406
448
  * - `done` — monotonic latch: flips `true` the first time a
407
- * final-step `handleSubmit` resolves without throwing
408
- * AND leaves no errors set on any step, and stays
409
- * `true` through subsequent edits or invalidations. A
410
- * callback that calls `setErrors` and returns (the
411
- * documented server-rejection path) is a failed submit,
412
- * so it does not flip `done`. Only `reset()` flips it
413
- * back. Gates "show success card" style UI that should
449
+ * `handleSubmit` resolves without throwing AND leaves
450
+ * no errors set on any step, and stays `true` through
451
+ * subsequent edits or invalidations. A callback that
452
+ * calls `setErrors` and returns (the documented
453
+ * server-rejection path) is a failed submit, so it
454
+ * does not flip `done`. Only `reset()` flips it back.
455
+ * Gates "show success card" style UI that should
414
456
  * reflect submission history rather than current
415
457
  * validity.
416
458
  * - `submitting` — `true` while a `wizard.handleSubmit` call is in
@@ -434,11 +476,23 @@ type WizardForms<S> = FormsRecordOf<S> & Readonly<Record<FormKey, AnyForm>>;
434
476
  * `back()` does not pop; the trail is the audit
435
477
  * log, not the back-stack.
436
478
  * - `next/back/goTo` — pure navigation. Refuses while `submitting`.
437
- * - `handleSubmit(onSubmit, onError?)` universal across all steps.
438
- * Intermediate calls validate the active form and
439
- * advance; final calls validate every form. Returns
440
- * an event handler suitable for `<form @submit>` or
441
- * imperative use.
479
+ * - `tryNext()` validate the active step, then advance iff it
480
+ * passed; invalid input keeps the pin put under the
481
+ * form's standard error reveal (first error focused,
482
+ * display state advanced). The inline-bindable
483
+ * shorthand for `activeForm.handleSubmit(() =>
484
+ * next())`. Resolves to whether the pin moved. No-ops
485
+ * to `false` on a degenerate or final-step wizard
486
+ * (finish via `handleSubmit`).
487
+ * - `handleSubmit(onSubmit, onError?)` — always validates the entire
488
+ * step list, from any step, and never advances the
489
+ * pin: on success it latches `done`; on any error it
490
+ * focuses the first failing step and fires `onError`
491
+ * with errors spanning every step. To gate advancing
492
+ * a step on its own validity, compose with the active
493
+ * form's submit: `activeForm.handleSubmit(() =>
494
+ * wizard.next())`. Returns an event handler suitable
495
+ * for `<form @submit>` or imperative use.
442
496
  * - `reset()` — zeros wizard lifecycle (`submissionAttempts`,
443
497
  * `visited`), resets every form, returns
444
498
  * `currentStep` to `steps[0].key`, and invokes
@@ -468,6 +522,7 @@ type UseWizardReturnType<S extends ReadonlyArray<StepSlot> = ReadonlyArray<StepS
468
522
  readonly next: () => Promise<void>;
469
523
  readonly back: () => void;
470
524
  readonly goTo: (key: string) => void;
525
+ readonly tryNext: () => Promise<boolean>;
471
526
  readonly handleSubmit: (onSubmit: WizardOnSubmit, onError?: WizardOnError) => (event?: Event) => Promise<void>;
472
527
  readonly reset: () => void;
473
528
  };
@@ -1073,6 +1128,14 @@ type FormStore<F extends GenericForm, G extends GenericForm = F> = {
1073
1128
  * source there).
1074
1129
  */
1075
1130
  markConnectedOptimistically(path: Path): void;
1131
+ /**
1132
+ * Client-side connected mark for a `v-register` component host that binds
1133
+ * value via the v-model channel but has no single inner control to latch
1134
+ * (a composite widget, or none found). The directive calls it on mount
1135
+ * (`true`) and unmount (`false`). Distinct from the SSR-only
1136
+ * `markConnectedOptimistically`; idempotent on the leading edge.
1137
+ */
1138
+ markHostConnected(path: Path, connected: boolean): void;
1076
1139
  /**
1077
1140
  * Leaf-only pristine check. `originals` is populated via
1078
1141
  * `diffAndApply`'s `added` patches, which fire only on primitive
@@ -1538,8 +1601,10 @@ type InjectFormInput = {
1538
1601
  * independent of component-tree position.
1539
1602
  *
1540
1603
  * Returns `null` when no matching form exists (no ambient ancestor, or
1541
- * the named key isn't registered). A dev-mode warning points at the
1542
- * call site to help diagnose typos. Always narrow before using:
1604
+ * the named key isn't registered yet). A dev-mode warning points at the
1605
+ * call site, lists the registered keys, and flags the mount-timing case
1606
+ * (a form created by a child or sibling isn't registered until its own
1607
+ * setup runs). Always narrow before using:
1543
1608
  *
1544
1609
  * ```ts
1545
1610
  * const form = injectForm<Shape>('signup')
@@ -1642,9 +1707,10 @@ declare function useRegister<V = unknown>(): UseRegisterReturn<V> | undefined;
1642
1707
  *
1643
1708
  * The wizard's surface is read-only from the consumer's side:
1644
1709
  * navigation (`next` / `back` / `goTo`) walks positional indices,
1645
- * `handleSubmit` validates the active form on intermediate steps and
1646
- * the whole wizard on the final step, and URL synchronization rides on
1647
- * `restore` / `persist` callbacks that default to `?step=<key>`.
1710
+ * `handleSubmit` validates the whole step list from any step and never
1711
+ * advances (gate advance with `activeForm.handleSubmit(() =>
1712
+ * wizard.next())`), and URL synchronization rides on `restore` /
1713
+ * `persist` callbacks that default to `?step=<key>`.
1648
1714
  */
1649
1715
  declare function useWizard<const S extends ReadonlyArray<StepSlot>>(options: WizardOptions & {
1650
1716
  readonly steps: S;
@@ -1688,8 +1754,10 @@ type InjectWizardInput = {
1688
1754
  * constructed with `useWizard({ steps, key })` to be reachable.
1689
1755
  *
1690
1756
  * Returns `null` when no matching wizard exists (no ambient ancestor,
1691
- * or the named key isn't registered). A dev-mode warning points at the
1692
- * call site to help diagnose typos. Always narrow before using:
1757
+ * or the named key isn't registered yet). A dev-mode warning points at
1758
+ * the call site, lists the registered keys, and flags the mount-timing
1759
+ * case (a wizard created by a child or sibling isn't registered until
1760
+ * its own setup runs). Always narrow before using:
1693
1761
  *
1694
1762
  * ```ts
1695
1763
  * const wizard = injectWizard('signup')
@@ -1739,13 +1807,13 @@ declare function injectWizard(input?: string | InjectWizardInput): UseWizardRetu
1739
1807
  * this one.
1740
1808
  * - `wizard.reset()` clears every lazy slot's cache so a reboot truly
1741
1809
  * resolves from scratch.
1742
- * - Resolving to `undefined` drops the slot from the compiled list
1743
- * until the resolver next re-fires.
1810
+ * - Resolving to `null` or `undefined` drops the slot from the compiled
1811
+ * list until the resolver next re-fires.
1744
1812
  *
1745
1813
  * The runtime brand returned by `lazy()` is opaque. Use
1746
1814
  * {@link isLazyMarker} to detect it.
1747
1815
  */
1748
- declare function lazy<Ctx = WizardCtx>(resolve: (ctx: Ctx) => AnyForm | string | undefined): LazyMarker<Ctx>;
1816
+ declare function lazy<Ctx = WizardCtx>(resolve: (ctx: Ctx) => AnyForm | string | null | undefined): LazyMarker<Ctx>;
1749
1817
 
1750
1818
  /**
1751
1819
  * Stable identifiers for library-emitted `ValidationError` codes.
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- const injectWizard = require('./attaform.CB1kYKUB.cjs');
4
- const paths = require('./attaform.DQcdvxKZ.cjs');
3
+ const injectWizard = require('./attaform.BkUzunyB.cjs');
4
+ const paths = require('./attaform.3heDHayA.cjs');
5
5
 
6
6
  const PATH_SEPARATOR = ".";
7
7
  function createAbstractSchema(rootSchema, intro, services, formKey, options) {
@@ -916,4 +916,4 @@ exports.mergeDeep = mergeDeep;
916
916
  exports.peelEmbeddedDefault = peelEmbeddedDefault;
917
917
  exports.slimPrimitivesWalk = slimPrimitivesWalk;
918
918
  exports.walkPathSegments = walkPathSegments;
919
- //# sourceMappingURL=attaform.BVjueUPu.cjs.map
919
+ //# sourceMappingURL=attaform.B5YcWrKi.cjs.map