attaform 0.21.0 → 0.21.2

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 (108) hide show
  1. package/dist/chunks/dev-key-collision-warnings.cjs +1 -1
  2. package/dist/chunks/dev-key-collision-warnings.mjs +1 -1
  3. package/dist/chunks/devtools.cjs +1 -1
  4. package/dist/chunks/devtools.mjs +1 -1
  5. package/dist/chunks/fingerprint2.cjs +1 -1
  6. package/dist/chunks/fingerprint2.mjs +1 -1
  7. package/dist/chunks/indexeddb.cjs +1 -1
  8. package/dist/chunks/indexeddb.mjs +1 -1
  9. package/dist/chunks/local-storage.cjs +1 -1
  10. package/dist/chunks/local-storage.mjs +1 -1
  11. package/dist/chunks/multi-tab-sync.cjs +2 -2
  12. package/dist/chunks/multi-tab-sync.mjs +2 -2
  13. package/dist/chunks/session-storage.cjs +1 -1
  14. package/dist/chunks/session-storage.mjs +1 -1
  15. package/dist/chunks/wire-persistence.cjs +2 -2
  16. package/dist/chunks/wire-persistence.mjs +2 -2
  17. package/dist/index.cjs +37 -24
  18. package/dist/index.cjs.map +1 -1
  19. package/dist/index.d.cts +31 -28
  20. package/dist/index.d.mts +31 -28
  21. package/dist/index.d.ts +31 -28
  22. package/dist/index.mjs +38 -25
  23. package/dist/index.mjs.map +1 -1
  24. package/dist/nuxt.d.cts +1 -1
  25. package/dist/nuxt.d.mts +1 -1
  26. package/dist/nuxt.d.ts +1 -1
  27. package/dist/runtime/components/AttaformDevtoolsPanel.vue +396 -216
  28. package/dist/runtime/components/DevtoolsValueTree.vue +176 -114
  29. package/dist/runtime/plugins/attaform.cjs +2 -2
  30. package/dist/runtime/plugins/attaform.mjs +2 -2
  31. package/dist/shared/{attaform.BA3vRDos.cjs → attaform.B5LNzqQh.cjs} +349 -277
  32. package/dist/shared/attaform.B5LNzqQh.cjs.map +1 -0
  33. package/dist/shared/{attaform.PnqML3xW.cjs → attaform.BBDIKtKY.cjs} +13 -16
  34. package/dist/shared/attaform.BBDIKtKY.cjs.map +1 -0
  35. package/dist/shared/{attaform.CRsXyy-Y.d.ts → attaform.BCcrLApm.d.mts} +131 -64
  36. package/dist/shared/{attaform.BupwXkj_.mjs → attaform.BFWb6hDk.mjs} +29 -23
  37. package/dist/shared/attaform.BFWb6hDk.mjs.map +1 -0
  38. package/dist/shared/{attaform.7lzO9pdM.d.mts → attaform.BGf_J22U.d.ts} +131 -64
  39. package/dist/shared/{attaform.BnK_bfcb.mjs → attaform.BVeLgfEh.mjs} +14 -17
  40. package/dist/shared/attaform.BVeLgfEh.mjs.map +1 -0
  41. package/dist/shared/{attaform.BK1RE2ha.d.ts → attaform.BYgioWLF.d.ts} +2 -2
  42. package/dist/shared/{attaform.F8LMHHWV.d.cts → attaform.BkjJfMvJ.d.cts} +131 -64
  43. package/dist/shared/{attaform.BDIEq9qP.d.cts → attaform.BoY6RZUl.d.cts} +2 -2
  44. package/dist/shared/{attaform.CEf6wYfD.cjs → attaform.BwLp9KM7.cjs} +2 -2
  45. package/dist/shared/{attaform.CEf6wYfD.cjs.map → attaform.BwLp9KM7.cjs.map} +1 -1
  46. package/dist/shared/{attaform._rsCZy2j.cjs → attaform.BwrowMp2.cjs} +25 -45
  47. package/dist/shared/attaform.BwrowMp2.cjs.map +1 -0
  48. package/dist/shared/{attaform.ezb5Nh2t.mjs → attaform.C41gjp-a.mjs} +2 -2
  49. package/dist/shared/{attaform.ezb5Nh2t.mjs.map → attaform.C41gjp-a.mjs.map} +1 -1
  50. package/dist/shared/{attaform.BM6YD9kZ.cjs → attaform.CR6wGvNu.cjs} +29 -23
  51. package/dist/shared/attaform.CR6wGvNu.cjs.map +1 -0
  52. package/dist/shared/{attaform.DSqO6Db7.mjs → attaform.CTheKoTc.mjs} +705 -282
  53. package/dist/shared/attaform.CTheKoTc.mjs.map +1 -0
  54. package/dist/shared/{attaform.BzvOdiSI.cjs → attaform.CcnF1AKJ.cjs} +4 -4
  55. package/dist/shared/attaform.CcnF1AKJ.cjs.map +1 -0
  56. package/dist/shared/{attaform.BQ6drorq.d.mts → attaform.CnEl--PF.d.mts} +2 -2
  57. package/dist/shared/{attaform.CkjTapyq.mjs → attaform.CrD73S4m.mjs} +4 -4
  58. package/dist/shared/attaform.CrD73S4m.mjs.map +1 -0
  59. package/dist/shared/{attaform.BUszFoKq.cjs → attaform.D2ZuIOCf.cjs} +711 -287
  60. package/dist/shared/attaform.D2ZuIOCf.cjs.map +1 -0
  61. package/dist/shared/{attaform.r3PePkDR.mjs → attaform.D6GYGshL.mjs} +25 -45
  62. package/dist/shared/attaform.D6GYGshL.mjs.map +1 -0
  63. package/dist/shared/{attaform.Y_Mgg0Yp.mjs → attaform.DP-u7_tk.mjs} +348 -277
  64. package/dist/shared/attaform.DP-u7_tk.mjs.map +1 -0
  65. package/dist/shared/{attaform.B1nyO4ec.d.cts → attaform.ory-3WhV.d.cts} +395 -176
  66. package/dist/shared/{attaform.B1nyO4ec.d.mts → attaform.ory-3WhV.d.mts} +395 -176
  67. package/dist/shared/{attaform.B1nyO4ec.d.ts → attaform.ory-3WhV.d.ts} +395 -176
  68. package/dist/transforms.cjs +1 -1
  69. package/dist/transforms.mjs +1 -1
  70. package/dist/vite.cjs +1 -1
  71. package/dist/vite.mjs +1 -1
  72. package/dist/zod-v3.cjs +3 -4
  73. package/dist/zod-v3.cjs.map +1 -1
  74. package/dist/zod-v3.d.cts +4 -4
  75. package/dist/zod-v3.d.mts +4 -4
  76. package/dist/zod-v3.d.ts +4 -4
  77. package/dist/zod-v3.mjs +2 -3
  78. package/dist/zod-v3.mjs.map +1 -1
  79. package/dist/zod-v4.cjs +3 -4
  80. package/dist/zod-v4.cjs.map +1 -1
  81. package/dist/zod-v4.d.cts +4 -4
  82. package/dist/zod-v4.d.mts +4 -4
  83. package/dist/zod-v4.d.ts +4 -4
  84. package/dist/zod-v4.mjs +2 -3
  85. package/dist/zod-v4.mjs.map +1 -1
  86. package/dist/zod.cjs +6 -6
  87. package/dist/zod.cjs.map +1 -1
  88. package/dist/zod.d.cts +77 -26
  89. package/dist/zod.d.mts +77 -26
  90. package/dist/zod.d.ts +77 -26
  91. package/dist/zod.mjs +5 -6
  92. package/dist/zod.mjs.map +1 -1
  93. package/package.json +3 -11
  94. package/dist/shared/attaform.BA3vRDos.cjs.map +0 -1
  95. package/dist/shared/attaform.BM6YD9kZ.cjs.map +0 -1
  96. package/dist/shared/attaform.BUszFoKq.cjs.map +0 -1
  97. package/dist/shared/attaform.BnK_bfcb.mjs.map +0 -1
  98. package/dist/shared/attaform.BupwXkj_.mjs.map +0 -1
  99. package/dist/shared/attaform.BzvOdiSI.cjs.map +0 -1
  100. package/dist/shared/attaform.CkjTapyq.mjs.map +0 -1
  101. package/dist/shared/attaform.DSqO6Db7.mjs.map +0 -1
  102. package/dist/shared/attaform.PnqML3xW.cjs.map +0 -1
  103. package/dist/shared/attaform.Y_Mgg0Yp.mjs.map +0 -1
  104. package/dist/shared/attaform._rsCZy2j.cjs.map +0 -1
  105. package/dist/shared/attaform.r3PePkDR.mjs.map +0 -1
  106. package/dist/shared/{attaform.DSD85fHb.d.cts → attaform.nf83TIR5.d.cts} +10 -10
  107. package/dist/shared/{attaform.DSD85fHb.d.mts → attaform.nf83TIR5.d.mts} +10 -10
  108. package/dist/shared/{attaform.DSD85fHb.d.ts → attaform.nf83TIR5.d.ts} +10 -10
@@ -1,4 +1,4 @@
1
- import { v as FormKey, V as PathKey, m as DisplayCtx, z as GetDisplayState, n as DisplayMachine, ag as SlimPrimitiveKind, C as CoercionEntry, g as CoercionRegistry, G as GenericForm, U as Path, ao as ValidationError, A as AbstractSchema, as as WriteMeta, D as DeepPartial, at as WriteShape, am as ValidateOn, _ as PersistOptInRegistry, f as AttaformDefaults, al as UseFormReturnType, aa as RegisterValue } from './attaform.B1nyO4ec.mjs';
1
+ import { F as FormKey, _ as PathKey, p as DisplayCtx, d as GetDisplayState, q as DisplayMachine, Z as Path, ah as SlimPrimitiveKind, C as CoercionEntry, j as CoercionRegistry, G as GenericForm, V as ValidationError, a as AbstractSchema, aq as WriteMeta, m as DeepPartial, ar as WriteShape, ay as TransformAbortHolder, al as ValidateOn, az as PersistOptInRegistry, A as AttaformDefaults, b as UseFormReturnType, c as RegisterValue } from './attaform.ory-3WhV.js';
2
2
  import { Ref, ComputedRef, App, InjectionKey } from 'vue';
3
3
 
4
4
  /**
@@ -414,6 +414,13 @@ type WizardForms<S> = FormsRecordOf<S> & Readonly<Record<FormKey, AnyForm>>;
414
414
  * - `submissionAttempts` — count of `wizard.handleSubmit` invocations
415
415
  * (success or failure). Always bumps, including on
416
416
  * noop-form steps.
417
+ * - `submitError` — the error thrown by the most recent
418
+ * `wizard.handleSubmit` callback (or its `onError`),
419
+ * coerced to a real `Error`. Mirrors
420
+ * `form.meta.submitError`: cleared at submit entry and
421
+ * by `reset()`, parked here rather than re-thrown, so
422
+ * the handler resolves and never manufactures a
423
+ * `window` unhandledrejection. `null` on success.
417
424
  * - `visited` — append-only breadcrumb of navigated step keys.
418
425
  * `back()` does not pop; the trail is the audit
419
426
  * log, not the back-stack.
@@ -447,6 +454,7 @@ type UseWizardReturnType<S extends ReadonlyArray<StepSlot> = ReadonlyArray<StepS
447
454
  readonly done: boolean;
448
455
  readonly submitting: boolean;
449
456
  readonly submissionAttempts: number;
457
+ readonly submitError: Error | null;
450
458
  readonly visited: readonly FormKey[];
451
459
  readonly next: () => Promise<void>;
452
460
  readonly back: () => void;
@@ -517,66 +525,6 @@ type DisplayEngine = {
517
525
  hasTimer(): boolean;
518
526
  };
519
527
 
520
- /**
521
- * Schema-driven coercion of user-typed DOM values at the v-register
522
- * directive layer. When the slim schema declares a numeric or
523
- * boolean type at a path, the directive coerces incoming string
524
- * values (`'25'` → `25`, `'true'` → `true`) before the slim-primitive
525
- * gate sees the write — making the schema authoritative for storage
526
- * shape and freeing consumers from sprinkling `.number` modifiers
527
- * across templates.
528
- *
529
- * Coercion is consumer-extensible: a `CoercionRegistry` is just an
530
- * `Array<CoercionEntry>` keyed at config time by `(input, output)`
531
- * `SlimPrimitiveKind` literals. The library ships
532
- * `defaultCoercionRules` (string→number, string→boolean) and
533
- * `defineCoercion` for type-narrowed authoring; consumers spread the
534
- * defaults to extend or supply their own array to replace.
535
- *
536
- * Coercion applies ONLY to user-typed DOM values flowing through
537
- * the directive's assigner. Programmatic writes (`form.setValue`,
538
- * `setValueWithInternalPath`) bypass coercion — they're authoritative
539
- * writes whose strict typing is on the caller. This mirrors the
540
- * `transforms` pipeline's user-input-only contract.
541
- */
542
-
543
- /**
544
- * Type-narrowing helper for authoring entries. At runtime it's
545
- * identity; at compile time it preserves the `input` / `output`
546
- * literal types so `transform`'s parameter is narrowed to the
547
- * runtime type instead of widening to `SlimRuntimeOf<SlimPrimitiveKind>`.
548
- *
549
- * Without this helper, authoring `{ input: 'string', output:
550
- * 'number', transform: (s) => ... }` against the broader
551
- * `CoercionEntry` widens `s` to `string | number | boolean | ...`,
552
- * forcing a cast in every transform body. `defineCoercion` is the
553
- * opaque-free idiom.
554
- */
555
- declare function defineCoercion<I extends SlimPrimitiveKind, O extends SlimPrimitiveKind>(entry: CoercionEntry<I, O>): CoercionEntry<I, O>;
556
- /**
557
- * Internal index built from a `CoercionRegistry` at config-resolve
558
- * time. Keyed by `${input}->${output}` for O(1) per-keystroke
559
- * dispatch. The authoring shape (array, ergonomic, type-narrowing-
560
- * friendly) and the dispatch shape (Map, fast) decouple cleanly.
561
- */
562
- type CoercionIndex = ReadonlyMap<`${SlimPrimitiveKind}->${SlimPrimitiveKind}`, CoercionEntry>;
563
- /**
564
- * The library's built-in registry. Two cells: string→number and
565
- * string→boolean. Re-exported so consumers can spread it when
566
- * supplying a custom registry that extends defaults.
567
- */
568
- declare const defaultCoercionRules: CoercionRegistry;
569
-
570
- /**
571
- * Per-form closure state — the single store owned by each `useForm` call.
572
- * Bundles the form value, the summary record, element references, field
573
- * state, the meta tracker, and the error stores under one keyed-by-
574
- * `(formKey, path)` instance so cross-form DOM state cannot collide.
575
- *
576
- * This is NOT a singleton. Each call to `useForm` creates its own FormStore
577
- * instance and holds onto it via closure. The registry provides SSR
578
- * hydration; otherwise the state is per-component-per-form.
579
- */
580
528
  /**
581
529
  * Per-path field status. Replaced wholesale (not mutated in place) on
582
530
  * every change. Five semantic groups:
@@ -635,6 +583,57 @@ type OriginalsRecord = {
635
583
  readonly segments: Path;
636
584
  readonly value: unknown;
637
585
  };
586
+
587
+ /**
588
+ * Schema-driven coercion of user-typed DOM values at the v-register
589
+ * directive layer. When the slim schema declares a numeric or
590
+ * boolean type at a path, the directive coerces incoming string
591
+ * values (`'25'` → `25`, `'true'` → `true`) before the slim-primitive
592
+ * gate sees the write — making the schema authoritative for storage
593
+ * shape and freeing consumers from sprinkling `.number` modifiers
594
+ * across templates.
595
+ *
596
+ * Coercion is consumer-extensible: a `CoercionRegistry` is just an
597
+ * `Array<CoercionEntry>` keyed at config time by `(input, output)`
598
+ * `SlimPrimitiveKind` literals. The library ships
599
+ * `defaultCoercionRules` (string→number, string→boolean) and
600
+ * `defineCoercion` for type-narrowed authoring; consumers spread the
601
+ * defaults to extend or supply their own array to replace.
602
+ *
603
+ * Coercion applies ONLY to user-typed DOM values flowing through
604
+ * the directive's assigner. Programmatic writes (`form.setValue`,
605
+ * `setValueWithInternalPath`) bypass coercion — they're authoritative
606
+ * writes whose strict typing is on the caller. This mirrors the
607
+ * `transforms` pipeline's user-input-only contract.
608
+ */
609
+
610
+ /**
611
+ * Type-narrowing helper for authoring entries. At runtime it's
612
+ * identity; at compile time it preserves the `input` / `output`
613
+ * literal types so `transform`'s parameter is narrowed to the
614
+ * runtime type instead of widening to `SlimRuntimeOf<SlimPrimitiveKind>`.
615
+ *
616
+ * Without this helper, authoring `{ input: 'string', output:
617
+ * 'number', transform: (s) => ... }` against the broader
618
+ * `CoercionEntry` widens `s` to `string | number | boolean | ...`,
619
+ * forcing a cast in every transform body. `defineCoercion` is the
620
+ * opaque-free idiom.
621
+ */
622
+ declare function defineCoercion<I extends SlimPrimitiveKind, O extends SlimPrimitiveKind>(entry: CoercionEntry<I, O>): CoercionEntry<I, O>;
623
+ /**
624
+ * Internal index built from a `CoercionRegistry` at config-resolve
625
+ * time. Keyed by `${input}->${output}` for O(1) per-keystroke
626
+ * dispatch. The authoring shape (array, ergonomic, type-narrowing-
627
+ * friendly) and the dispatch shape (Map, fast) decouple cleanly.
628
+ */
629
+ type CoercionIndex = ReadonlyMap<`${SlimPrimitiveKind}->${SlimPrimitiveKind}`, CoercionEntry>;
630
+ /**
631
+ * The library's built-in registry. Two cells: string→number and
632
+ * string→boolean. Re-exported so consumers can spread it when
633
+ * supplying a custom registry that extends defaults.
634
+ */
635
+ declare const defaultCoercionRules: CoercionRegistry;
636
+
638
637
  type FormStore<F extends GenericForm, G extends GenericForm = F> = {
639
638
  readonly formKey: FormKey;
640
639
  readonly form: Ref<F>;
@@ -751,7 +750,7 @@ type FormStore<F extends GenericForm, G extends GenericForm = F> = {
751
750
  * alongside the rest of the submission surface.
752
751
  */
753
752
  readonly submitted: Ref<boolean>;
754
- readonly submitError: Ref<unknown>;
753
+ readonly submitError: Ref<Error | null>;
755
754
  readonly departAttempts: Ref<number>;
756
755
  /**
757
756
  * `true` while a function-form `defaultValues` factory is in flight.
@@ -932,6 +931,39 @@ type FormStore<F extends GenericForm, G extends GenericForm = F> = {
932
931
  * the computed to both the streak start (set) and end (delete).
933
932
  */
934
933
  readonly fieldValidatingSince: Map<PathKey, number>;
934
+ /**
935
+ * Per-path counter of in-flight async-transform runs (the async
936
+ * branch of the `register({ transforms })` pipeline). `> 0` drives
937
+ * `field.transforming` / `field.busy`. Counter, not flag, for the
938
+ * same overlap reason as `fieldValidationCounts`, except a superseding
939
+ * input releases the prior run synchronously before incrementing the
940
+ * new one — so the count is the live in-flight depth at the path
941
+ * (effectively 0 or 1). Reactive Map, like the validation counters.
942
+ */
943
+ readonly fieldTransformCounts: Map<PathKey, number>;
944
+ /**
945
+ * Per-path `ssr ? 0 : Date.now()` stamp marking when the path's latest
946
+ * async transform opened; the display reducer reads it (as
947
+ * `ctx.transformingSince`) to time the gated busy spinner. Mirrors
948
+ * `fieldValidatingSince` exactly: re-anchored on each run start,
949
+ * deleted on the `→ 0` edge, reactive for the held-spinner reason.
950
+ */
951
+ readonly fieldTransformingSince: Map<PathKey, number>;
952
+ /**
953
+ * Per-path latest async-transform failure (a rejected transform, or a
954
+ * resolved value the write gate refused), surfaced as
955
+ * `field.transformError`. Cleared when a fresh run opens at the path
956
+ * and on `reset()`. A channel separate from validation `errors`.
957
+ */
958
+ readonly transformErrors: Map<PathKey, Error | null>;
959
+ /**
960
+ * Form-wide count of in-flight async-transform runs. Drives the
961
+ * `settleTransforms` quiescence guard and the `handleSubmit` drain
962
+ * barrier. `Math.max(0, …)`-clamped on release so a doubled decrement
963
+ * (a run's own `endTransform` after a synchronous cancel release)
964
+ * can't drive it negative.
965
+ */
966
+ readonly activeTransforms: Ref<number>;
935
967
  /**
936
968
  * Replace the form value wholesale. Optional `meta` is forwarded to
937
969
  * every `onFormChange` listener so they can decide whether THIS write
@@ -1099,6 +1131,41 @@ type FormStore<F extends GenericForm, G extends GenericForm = F> = {
1099
1131
  * at entry (submit validation is authoritative) and by `reset()`.
1100
1132
  */
1101
1133
  cancelFieldValidation(): void;
1134
+ /**
1135
+ * Open an async-transform run at `key` — bump the run token, increment
1136
+ * the in-flight counters, stamp `transformingSince`, clear any prior
1137
+ * `transformError`, register `holder` for later abort. Returns the run
1138
+ * token. See `InternalRegisterValue.beginTransform`.
1139
+ */
1140
+ beginTransform(key: PathKey, holder: TransformAbortHolder): number;
1141
+ /** `true` while `token` is the live async-transform run at `key`. */
1142
+ isCurrentTransform(key: PathKey, token: number): boolean;
1143
+ /**
1144
+ * Close the run `token` at `key`: release the counters (no-op if the
1145
+ * run was already released by a supersede / cancel) and flush settled
1146
+ * `settleTransforms` waiters.
1147
+ */
1148
+ endTransform(key: PathKey, token: number): void;
1149
+ /** Record a per-field normalization failure at `key` (`field.transformError`). */
1150
+ setTransformError(key: PathKey, err: Error): void;
1151
+ /**
1152
+ * Abort + release every in-flight async-transform run (all paths) and
1153
+ * clear `transformErrors`. Mirrors `cancelFieldValidation`; called by
1154
+ * `reset()` and store teardown.
1155
+ */
1156
+ cancelTransforms(): void;
1157
+ /**
1158
+ * Path-scoped counterpart to `cancelTransforms`: abort + release only
1159
+ * the runs at-or-under `prefix`, clearing their `transformError`.
1160
+ * Called by `resetField`.
1161
+ */
1162
+ cancelTransformsUnder(prefix: Path): void;
1163
+ /**
1164
+ * Resolve once async transforms are quiescent — globally (`path`
1165
+ * omitted) or at-or-under `path`. Resolve-never-reject. See
1166
+ * `UseFormReturnType.settleTransforms`.
1167
+ */
1168
+ settleTransforms(path?: string | Path): Promise<void>;
1102
1169
  /**
1103
1170
  * Kick off (or schedule) a field-level validation run for `path`. Pass
1104
1171
  * `path = []` to cover the whole form; `applySchemaErrorsForSubtree`
@@ -1782,5 +1849,5 @@ declare const AttaformErrorCode: {
1782
1849
  };
1783
1850
  type AttaformErrorCode = (typeof AttaformErrorCode)[keyof typeof AttaformErrorCode];
1784
1851
 
1785
- export { AttaformErrorCode as a, createRegistry as p, defaultCoercionRules as q, defineCoercion as r, getRegistryFromApp as s, injectForm as t, injectWizard as u, kAttaformRegistry as v, lazy as w, useRegister as x, useRegistry as y, useWizard as z };
1786
- export type { AnyForm as A, CompiledStep as C, FormStatus as F, InjectWizardInput as I, LazyMarker as L, SSRDetectOptions as S, UseRegisterReturn as U, WizardAggregateError as W, AttaformRegistry as b, SerializedFormData as c, StepSlot as d, UseWizardReturnType as e, WizardCtx as f, WizardCtxForm as g, WizardOnError as h, WizardOnSubmit as i, WizardOptions as j, WizardPersistFn as k, WizardRestoreFn as l, WizardRestoreState as m, WizardStatusesProxy as n, WizardSubmitContext as o };
1852
+ export { AttaformErrorCode as c, createRegistry as p, defaultCoercionRules as q, defineCoercion as r, getRegistryFromApp as s, injectForm as t, injectWizard as u, kAttaformRegistry as v, lazy as w, useRegister as x, useRegistry as y, useWizard as z };
1853
+ export type { AttaformRegistry as A, CompiledStep as C, FormStatus as F, InjectWizardInput as I, LazyMarker as L, SSRDetectOptions as S, UseRegisterReturn as U, WizardAggregateError as W, SerializedFormData as a, AnyForm as b, StepSlot as d, UseWizardReturnType as e, WizardCtx as f, WizardCtxForm as g, WizardOnError as h, WizardOnSubmit as i, WizardOptions as j, WizardPersistFn as k, WizardRestoreFn as l, WizardRestoreState as m, WizardStatusesProxy as n, WizardSubmitContext as o };
@@ -1,6 +1,6 @@
1
- import { i as getAtPath, x as slimKindOf, w as setAtPath, j as humanize, B as useAbstractForm } from './attaform.DSqO6Db7.mjs';
2
- import { a as AttaformError, _ as __DEV__, j as canonicalizePath, d as InvalidUseFormConfigError } from './attaform.Y_Mgg0Yp.mjs';
3
- import { f as fieldMetaStore, g as getFieldMetaForSchema, a as getFieldMetaListForSchema, s as slimPrimitivesWalk, w as walkPathSegments, d as deriveDefaultWalk, m as mergeDeep, c as createAbstractSchema, b as getFieldMetaPathMap } from './attaform.r3PePkDR.mjs';
1
+ import { t as getAtPath, h as slimKindOf, v as setAtPath, E as humanize, r as useAbstractForm } from './attaform.CTheKoTc.mjs';
2
+ import { b as AttaformError, _ as __DEV__, a as canonicalizePath, d as InvalidUseFormConfigError } from './attaform.DP-u7_tk.mjs';
3
+ import { f as fieldMetaStore, g as getFieldMetaForSchema, a as getFieldMetaListForSchema, s as slimPrimitivesWalk, w as walkPathSegments, d as deriveDefaultWalk, m as mergeDeep, c as createAbstractSchema, b as getFieldMetaPathMap } from './attaform.D6GYGshL.mjs';
4
4
  import { z } from 'zod';
5
5
 
6
6
  const fieldMeta = fieldMetaStore;
@@ -581,6 +581,9 @@ function carryChecks(rebuilt, original, stripConfig) {
581
581
  ...checks
582
582
  );
583
583
  }
584
+ function unhandledZodKind(fnName, kind) {
585
+ throw new Error(`${fnName}: unhandled ZodKind '${kind}'`);
586
+ }
584
587
  function stripRefinements(schema) {
585
588
  const kind = kindOf(schema);
586
589
  switch (kind) {
@@ -680,10 +683,8 @@ function stripRefinements(schema) {
680
683
  case "symbol":
681
684
  case "function":
682
685
  return schema;
683
- default: {
684
- const _exhaustive = kind;
685
- throw new Error(`stripRefinements: unhandled ZodKind '${_exhaustive}'`);
686
- }
686
+ default:
687
+ return unhandledZodKind("stripRefinements", kind);
687
688
  }
688
689
  }
689
690
  function stripAsyncChecks(schema) {
@@ -808,10 +809,8 @@ function stripAsyncChecks(schema) {
808
809
  case "symbol":
809
810
  case "function":
810
811
  return s;
811
- default: {
812
- const _exhaustive = kind;
813
- throw new Error(`stripAsyncChecks: unhandled ZodKind '${_exhaustive}'`);
814
- }
812
+ default:
813
+ return unhandledZodKind("stripAsyncChecks", kind);
815
814
  }
816
815
  }
817
816
  return recurse(schema);
@@ -957,10 +956,8 @@ function walkSlim(schema, stripConfig, maxDepth, lazyDepth) {
957
956
  case "transform":
958
957
  case "file":
959
958
  return schema;
960
- default: {
961
- const _exhaustive = kind;
962
- throw new Error(`getSlimSchema: unhandled ZodKind '${_exhaustive}'`);
963
- }
959
+ default:
960
+ return unhandledZodKind("getSlimSchema", kind);
964
961
  }
965
962
  }
966
963
 
@@ -1274,5 +1271,5 @@ function useForm(configuration) {
1274
1271
  });
1275
1272
  }
1276
1273
 
1277
- export { UnsupportedSchemaError as U, assertZodVersion as a, getCatchDefault as b, getChecks as c, getDefaultValue as d, getDiscriminatedOptions as e, fieldMeta as f, getArrayElement as g, getDiscriminator as h, getEnumValues as i, getIntersectionLeft as j, getIntersectionRight as k, getLiteralValues as l, getObjectShape as m, getRecordKeyType as n, getRecordValueType as o, getSetValueType as p, getTupleItems as q, getUnionOptions as r, kindOf as s, unwrapLazy as t, unwrapInner as u, unwrapPipe as v, useForm as w, withMeta as x, zodV4Adapter as z };
1278
- //# sourceMappingURL=attaform.BnK_bfcb.mjs.map
1274
+ export { UnsupportedSchemaError as U, assertZodVersion as a, getIntersectionRight as b, unwrapLazy as c, unwrapInner as d, unwrapPipe as e, fieldMeta as f, getIntersectionLeft as g, getDiscriminator as h, getDiscriminatedOptions as i, getUnionOptions as j, kindOf as k, getRecordKeyType as l, getRecordValueType as m, getTupleItems as n, getSetValueType as o, getArrayElement as p, getObjectShape as q, getEnumValues as r, getLiteralValues as s, getChecks as t, useForm as u, getCatchDefault as v, withMeta as w, getDefaultValue as x, zodV4Adapter as z };
1275
+ //# sourceMappingURL=attaform.BVeLgfEh.mjs.map