attaform 0.19.0 → 0.20.1

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 (111) hide show
  1. package/README.md +3 -0
  2. package/dist/chunks/devtools.cjs +1 -1
  3. package/dist/chunks/devtools.mjs +1 -1
  4. package/dist/chunks/indexeddb.cjs +1 -1
  5. package/dist/chunks/indexeddb.mjs +1 -1
  6. package/dist/chunks/local-storage.cjs +1 -1
  7. package/dist/chunks/local-storage.mjs +1 -1
  8. package/dist/chunks/session-storage.cjs +1 -1
  9. package/dist/chunks/session-storage.mjs +1 -1
  10. package/dist/index.cjs +3 -6
  11. package/dist/index.cjs.map +1 -1
  12. package/dist/index.d.cts +14 -40
  13. package/dist/index.d.mts +14 -40
  14. package/dist/index.d.ts +14 -40
  15. package/dist/index.mjs +5 -5
  16. package/dist/nuxt.d.cts +1 -1
  17. package/dist/nuxt.d.mts +1 -1
  18. package/dist/nuxt.d.ts +1 -1
  19. package/dist/runtime/components/AttaformDevtoolsPanel.vue +2 -2
  20. package/dist/runtime/components/DevtoolsValueTree.d.vue.ts +1 -3
  21. package/dist/runtime/components/DevtoolsValueTree.vue.d.ts +1 -3
  22. package/dist/runtime/plugins/attaform.cjs +2 -2
  23. package/dist/runtime/plugins/attaform.mjs +2 -2
  24. package/dist/shared/attaform.BCBxTyMC.cjs +1882 -0
  25. package/dist/shared/attaform.BCBxTyMC.cjs.map +1 -0
  26. package/dist/shared/{attaform.CrpjyXdO.mjs → attaform.BKozEdTr.mjs} +275 -266
  27. package/dist/shared/attaform.BKozEdTr.mjs.map +1 -0
  28. package/dist/shared/{attaform.Bubm_slq.cjs → attaform.BM6YD9kZ.cjs} +212 -269
  29. package/dist/shared/attaform.BM6YD9kZ.cjs.map +1 -0
  30. package/dist/shared/{attaform.CoxJ8Qm8.cjs → attaform.BPxsYtTe.cjs} +2 -26
  31. package/dist/shared/attaform.BPxsYtTe.cjs.map +1 -0
  32. package/dist/shared/{attaform.BqEfHpVB.cjs → attaform.BPy-4qRx.cjs} +275 -268
  33. package/dist/shared/attaform.BPy-4qRx.cjs.map +1 -0
  34. package/dist/shared/{attaform.BTpuvGec.d.ts → attaform.Bh3ACtts.d.ts} +109 -101
  35. package/dist/shared/{attaform.BTi-PsHr.mjs → attaform.BqZuwLTK.mjs} +1868 -1477
  36. package/dist/shared/attaform.BqZuwLTK.mjs.map +1 -0
  37. package/dist/shared/{attaform.JBx8cfMA.cjs → attaform.BrrXNmfK.cjs} +263 -799
  38. package/dist/shared/attaform.BrrXNmfK.cjs.map +1 -0
  39. package/dist/shared/{attaform.CXpzmj38.mjs → attaform.BupwXkj_.mjs} +213 -270
  40. package/dist/shared/attaform.BupwXkj_.mjs.map +1 -0
  41. package/dist/shared/{attaform.ePUcKxId.d.cts → attaform.D5-1XGQU.d.cts} +109 -101
  42. package/dist/shared/attaform.D6CwqkPx.mjs +1876 -0
  43. package/dist/shared/attaform.D6CwqkPx.mjs.map +1 -0
  44. package/dist/shared/attaform.DHRWn-cu.cjs +785 -0
  45. package/dist/shared/attaform.DHRWn-cu.cjs.map +1 -0
  46. package/dist/shared/{attaform.C1msmO2v.cjs → attaform.DLnE5bZa.cjs} +1798 -1405
  47. package/dist/shared/attaform.DLnE5bZa.cjs.map +1 -0
  48. package/dist/shared/{attaform.D4I63aBV.d.ts → attaform.DSD85fHb.d.cts} +1 -19
  49. package/dist/shared/{attaform.CBjmobqk.d.cts → attaform.DSD85fHb.d.mts} +1 -19
  50. package/dist/shared/{attaform.DXYHL99q.d.mts → attaform.DSD85fHb.d.ts} +1 -19
  51. package/dist/shared/{attaform.B7rzpK1U.d.cts → attaform.DkA5J8NW.d.cts} +1 -17
  52. package/dist/shared/{attaform.B7rzpK1U.d.mts → attaform.DkA5J8NW.d.mts} +1 -17
  53. package/dist/shared/{attaform.B7rzpK1U.d.ts → attaform.DkA5J8NW.d.ts} +1 -17
  54. package/dist/shared/{attaform.CJ-e9gYI.d.ts → attaform.Dl5kDY-A.d.ts} +1 -1
  55. package/dist/shared/{attaform.CRNA0vrd.d.mts → attaform.DoKXru-a.d.mts} +1 -1
  56. package/dist/shared/{attaform.BtBmfLQN.d.mts → attaform.EMzJcQci.d.mts} +109 -101
  57. package/dist/shared/attaform.EZG6fOFb.mjs +35 -0
  58. package/dist/shared/attaform.EZG6fOFb.mjs.map +1 -0
  59. package/dist/shared/{attaform.QvygsFGh.d.cts → attaform.GbDo_lJi.d.cts} +1 -1
  60. package/dist/shared/{attaform.C0uGZQ4M.d.ts → attaform.SfhU0OEY.d.cts} +134 -30
  61. package/dist/shared/{attaform.C0uGZQ4M.d.cts → attaform.SfhU0OEY.d.mts} +134 -30
  62. package/dist/shared/{attaform.C0uGZQ4M.d.mts → attaform.SfhU0OEY.d.ts} +134 -30
  63. package/dist/shared/{attaform.a3uBo-gw.mjs → attaform.iWo9soNX.mjs} +257 -793
  64. package/dist/shared/attaform.iWo9soNX.mjs.map +1 -0
  65. package/dist/shared/attaform.tVkmQh5w.mjs +774 -0
  66. package/dist/shared/attaform.tVkmQh5w.mjs.map +1 -0
  67. package/dist/transforms.cjs +2 -2
  68. package/dist/transforms.d.cts +22 -13
  69. package/dist/transforms.d.mts +22 -13
  70. package/dist/transforms.d.ts +22 -13
  71. package/dist/transforms.mjs +1 -1
  72. package/dist/vite.cjs +8 -7
  73. package/dist/vite.cjs.map +1 -1
  74. package/dist/vite.mjs +8 -7
  75. package/dist/vite.mjs.map +1 -1
  76. package/dist/zod-v3.cjs +3 -3
  77. package/dist/zod-v3.d.cts +32 -6
  78. package/dist/zod-v3.d.mts +32 -6
  79. package/dist/zod-v3.d.ts +32 -6
  80. package/dist/zod-v3.mjs +3 -3
  81. package/dist/zod-v4.cjs +3 -3
  82. package/dist/zod-v4.d.cts +12 -8
  83. package/dist/zod-v4.d.mts +12 -8
  84. package/dist/zod-v4.d.ts +12 -8
  85. package/dist/zod-v4.mjs +3 -3
  86. package/dist/zod.cjs +8 -8
  87. package/dist/zod.cjs.map +1 -1
  88. package/dist/zod.d.cts +6 -6
  89. package/dist/zod.d.mts +6 -6
  90. package/dist/zod.d.ts +6 -6
  91. package/dist/zod.mjs +6 -6
  92. package/package.json +2 -1
  93. package/dist/shared/attaform.BTi-PsHr.mjs.map +0 -1
  94. package/dist/shared/attaform.BqEfHpVB.cjs.map +0 -1
  95. package/dist/shared/attaform.Bubm_slq.cjs.map +0 -1
  96. package/dist/shared/attaform.C1msmO2v.cjs.map +0 -1
  97. package/dist/shared/attaform.C8CyvYa_.cjs +0 -36
  98. package/dist/shared/attaform.C8CyvYa_.cjs.map +0 -1
  99. package/dist/shared/attaform.CXpzmj38.mjs.map +0 -1
  100. package/dist/shared/attaform.Cghpuav8.mjs +0 -57
  101. package/dist/shared/attaform.Cghpuav8.mjs.map +0 -1
  102. package/dist/shared/attaform.CiMqJHDm.mjs +0 -1594
  103. package/dist/shared/attaform.CiMqJHDm.mjs.map +0 -1
  104. package/dist/shared/attaform.CoxJ8Qm8.cjs.map +0 -1
  105. package/dist/shared/attaform.CrpjyXdO.mjs.map +0 -1
  106. package/dist/shared/attaform.D13GMFgK.mjs +0 -32
  107. package/dist/shared/attaform.D13GMFgK.mjs.map +0 -1
  108. package/dist/shared/attaform.JBx8cfMA.cjs.map +0 -1
  109. package/dist/shared/attaform.OznWyOPy.cjs +0 -1600
  110. package/dist/shared/attaform.OznWyOPy.cjs.map +0 -1
  111. package/dist/shared/attaform.a3uBo-gw.mjs.map +0 -1
package/dist/zod-v3.d.mts CHANGED
@@ -1,10 +1,24 @@
1
1
  import { z } from 'zod';
2
- import { G as GenericForm, t as FormKey, ai as UseFormConfiguration, A as AbstractSchema, j as DefaultValuesInput, aj as UseFormReturnType, a9 as SchemaFactoryOptions, F as FieldMetaPayload } from './shared/attaform.C0uGZQ4M.mjs';
3
- export { ah as Unset, au as isUnset, aw as unset } from './shared/attaform.C0uGZQ4M.mjs';
4
- import { U as UnwrapZodObject, a as UseFormConfigurationWithZod, S as StorageShape } from './shared/attaform.DXYHL99q.mjs';
5
- export { A as AggregateError, a as AnyForm, b as AttaformErrorCode, C as CompiledStep, F as FormStatus, I as InjectWizardInput, L as LazyMarker, e as StepSlot, U as UseRegisterReturn, f as UseWizardReturnType, W as WizardCtx, g as WizardCtxForm, h as WizardOnError, i as WizardOnSubmit, j as WizardOptions, k as WizardPersistFn, l as WizardRestoreFn, m as WizardRestoreState, n as WizardStatusesProxy, o as WizardSubmitContext, t as injectForm, u as injectWizard, w as lazy, x as useRegister, z as useWizard } from './shared/attaform.BtBmfLQN.mjs';
2
+ import { G as GenericForm, t as FormKey, ai as UseFormConfiguration, A as AbstractSchema, j as DefaultValuesInput, aj as UseFormReturnType, al as ValidateOnConfig, a9 as SchemaFactoryOptions, F as FieldMetaPayload } from './shared/attaform.SfhU0OEY.mjs';
3
+ export { ah as Unset, au as isUnset, aw as unset } from './shared/attaform.SfhU0OEY.mjs';
4
+ import { U as UnwrapZodObject, S as StorageShape } from './shared/attaform.DSD85fHb.mjs';
5
+ export { A as AnyForm, a as AttaformErrorCode, C as CompiledStep, F as FormStatus, I as InjectWizardInput, L as LazyMarker, d as StepSlot, U as UseRegisterReturn, e as UseWizardReturnType, W as WizardAggregateError, f as WizardCtx, g as WizardCtxForm, h as WizardOnError, i as WizardOnSubmit, j as WizardOptions, k as WizardPersistFn, l as WizardRestoreFn, m as WizardRestoreState, n as WizardStatusesProxy, o as WizardSubmitContext, t as injectForm, u as injectWizard, w as lazy, x as useRegister, z as useWizard } from './shared/attaform.EMzJcQci.mjs';
6
6
  import 'vue';
7
7
 
8
+ /**
9
+ * `FormOf` / `OutOf` / `ReadOf` factor the three identical-shape
10
+ * conditionals out of the zod-typed `useForm` signature. The bundled
11
+ * `.d.ts` then carries one alias per shape rather than re-inlining
12
+ * `z.input<UnwrapZodObject<Schema>> extends GenericForm ? … : never`
13
+ * four times — the pattern that produces TS2589 ("Type instantiation
14
+ * is excessively deep") on consumer call sites with complex schemas
15
+ * (discriminated unions, refines, deep `.register()` chains). Mirrors
16
+ * the v4 adapter's own `FormOf`/`OutOf`/`ReadOf` aliases verbatim so
17
+ * v3 and v4 carry the same per-call depth cost.
18
+ */
19
+ type FormOf<Schema extends z.ZodObject<z.ZodRawShape>> = z.input<UnwrapZodObject<Schema>> extends GenericForm ? z.input<UnwrapZodObject<Schema>> : never;
20
+ type OutOf<Schema extends z.ZodObject<z.ZodRawShape>> = z.output<UnwrapZodObject<Schema>> extends GenericForm ? z.output<UnwrapZodObject<Schema>> : never;
21
+ type ReadOf<Schema extends z.ZodObject<z.ZodRawShape>> = StorageShape<UnwrapZodObject<Schema>> extends GenericForm ? StorageShape<UnwrapZodObject<Schema>> : never;
8
22
  /**
9
23
  * Create a form bound to a custom `AbstractSchema` adapter.
10
24
  *
@@ -43,7 +57,9 @@ declare function useForm<Form extends GenericForm, GetValueFormType extends Gene
43
57
  *
44
58
  * For Zod v4, import from `attaform/zod` instead.
45
59
  */
46
- declare function useForm<Schema extends z.ZodObject<z.ZodRawShape>, GetValueFormType extends GenericForm = z.output<UnwrapZodObject<Schema>> extends GenericForm ? z.output<UnwrapZodObject<Schema>> : never, K extends FormKey = FormKey>(configuration: UseFormConfigurationWithZod<Schema, DefaultValuesInput<z.input<UnwrapZodObject<Schema>>>, K>): UseFormReturnType<z.input<UnwrapZodObject<Schema>>, GetValueFormType, StorageShape<UnwrapZodObject<Schema>> extends GenericForm ? StorageShape<UnwrapZodObject<Schema>> : never, K>;
60
+ declare function useForm<Schema extends z.ZodObject<z.ZodRawShape>, K extends FormKey = FormKey>(configuration: Omit<UseFormConfiguration<FormOf<Schema>, OutOf<Schema>, AbstractSchema<FormOf<Schema>, OutOf<Schema>>, DefaultValuesInput<FormOf<Schema>>, K>, 'schema' | 'validateOn' | 'debounceMs'> & {
61
+ schema: Schema;
62
+ } & ValidateOnConfig): UseFormReturnType<FormOf<Schema>, OutOf<Schema>, ReadOf<Schema>, K>;
47
63
 
48
64
  /**
49
65
  * Narrow accessor type for Zod v3's internal `_def`. Only useful
@@ -117,6 +133,11 @@ type ZodTypeMap = {
117
133
  ZodIntersection: z.ZodIntersection<z.ZodTypeAny, z.ZodTypeAny>;
118
134
  ZodLazy: z.ZodLazy<z.ZodTypeAny>;
119
135
  ZodNativeEnum: z.ZodNativeEnum<z.EnumLike>;
136
+ ZodNaN: z.ZodNaN;
137
+ ZodVoid: z.ZodVoid;
138
+ ZodAny: z.ZodAny;
139
+ ZodUnknown: z.ZodUnknown;
140
+ ZodNever: z.ZodNever;
120
141
  };
121
142
  /**
122
143
  * Type guard for a Zod v3 schema kind. Returns `true` when `schema`
@@ -182,6 +203,11 @@ type FieldMetaRegistryV3 = {
182
203
  get(schema: z.ZodTypeAny): FieldMetaPayload | undefined;
183
204
  /** True iff a payload has been registered for the schema. */
184
205
  has(schema: z.ZodTypeAny): boolean;
206
+ /**
207
+ * Drop every registered payload for `schema`. Returns the registry
208
+ * for chaining; idempotent on a never-registered schema.
209
+ */
210
+ remove(schema: z.ZodTypeAny): FieldMetaRegistryV3;
185
211
  };
186
212
  declare const fieldMeta: FieldMetaRegistryV3;
187
213
  /**
@@ -212,5 +238,5 @@ declare const fieldMeta: FieldMetaRegistryV3;
212
238
  */
213
239
  declare function withMeta<S extends z.ZodTypeAny>(schema: S, payload: FieldMetaPayload): S;
214
240
 
215
- export { FieldMetaPayload, UnwrapZodObject, UseFormConfigurationWithZod, fieldMeta, isZodSchemaType, useForm, withMeta, zodAdapter };
241
+ export { FieldMetaPayload, UnwrapZodObject, fieldMeta, isZodSchemaType, useForm, withMeta, zodAdapter };
216
242
  export type { TypeWithNullableDynamicKeys, ZodTypeWithInnerType };
package/dist/zod-v3.d.ts CHANGED
@@ -1,10 +1,24 @@
1
1
  import { z } from 'zod';
2
- import { G as GenericForm, t as FormKey, ai as UseFormConfiguration, A as AbstractSchema, j as DefaultValuesInput, aj as UseFormReturnType, a9 as SchemaFactoryOptions, F as FieldMetaPayload } from './shared/attaform.C0uGZQ4M.js';
3
- export { ah as Unset, au as isUnset, aw as unset } from './shared/attaform.C0uGZQ4M.js';
4
- import { U as UnwrapZodObject, a as UseFormConfigurationWithZod, S as StorageShape } from './shared/attaform.D4I63aBV.js';
5
- export { A as AggregateError, a as AnyForm, b as AttaformErrorCode, C as CompiledStep, F as FormStatus, I as InjectWizardInput, L as LazyMarker, e as StepSlot, U as UseRegisterReturn, f as UseWizardReturnType, W as WizardCtx, g as WizardCtxForm, h as WizardOnError, i as WizardOnSubmit, j as WizardOptions, k as WizardPersistFn, l as WizardRestoreFn, m as WizardRestoreState, n as WizardStatusesProxy, o as WizardSubmitContext, t as injectForm, u as injectWizard, w as lazy, x as useRegister, z as useWizard } from './shared/attaform.BTpuvGec.js';
2
+ import { G as GenericForm, t as FormKey, ai as UseFormConfiguration, A as AbstractSchema, j as DefaultValuesInput, aj as UseFormReturnType, al as ValidateOnConfig, a9 as SchemaFactoryOptions, F as FieldMetaPayload } from './shared/attaform.SfhU0OEY.js';
3
+ export { ah as Unset, au as isUnset, aw as unset } from './shared/attaform.SfhU0OEY.js';
4
+ import { U as UnwrapZodObject, S as StorageShape } from './shared/attaform.DSD85fHb.js';
5
+ export { A as AnyForm, a as AttaformErrorCode, C as CompiledStep, F as FormStatus, I as InjectWizardInput, L as LazyMarker, d as StepSlot, U as UseRegisterReturn, e as UseWizardReturnType, W as WizardAggregateError, f as WizardCtx, g as WizardCtxForm, h as WizardOnError, i as WizardOnSubmit, j as WizardOptions, k as WizardPersistFn, l as WizardRestoreFn, m as WizardRestoreState, n as WizardStatusesProxy, o as WizardSubmitContext, t as injectForm, u as injectWizard, w as lazy, x as useRegister, z as useWizard } from './shared/attaform.Bh3ACtts.js';
6
6
  import 'vue';
7
7
 
8
+ /**
9
+ * `FormOf` / `OutOf` / `ReadOf` factor the three identical-shape
10
+ * conditionals out of the zod-typed `useForm` signature. The bundled
11
+ * `.d.ts` then carries one alias per shape rather than re-inlining
12
+ * `z.input<UnwrapZodObject<Schema>> extends GenericForm ? … : never`
13
+ * four times — the pattern that produces TS2589 ("Type instantiation
14
+ * is excessively deep") on consumer call sites with complex schemas
15
+ * (discriminated unions, refines, deep `.register()` chains). Mirrors
16
+ * the v4 adapter's own `FormOf`/`OutOf`/`ReadOf` aliases verbatim so
17
+ * v3 and v4 carry the same per-call depth cost.
18
+ */
19
+ type FormOf<Schema extends z.ZodObject<z.ZodRawShape>> = z.input<UnwrapZodObject<Schema>> extends GenericForm ? z.input<UnwrapZodObject<Schema>> : never;
20
+ type OutOf<Schema extends z.ZodObject<z.ZodRawShape>> = z.output<UnwrapZodObject<Schema>> extends GenericForm ? z.output<UnwrapZodObject<Schema>> : never;
21
+ type ReadOf<Schema extends z.ZodObject<z.ZodRawShape>> = StorageShape<UnwrapZodObject<Schema>> extends GenericForm ? StorageShape<UnwrapZodObject<Schema>> : never;
8
22
  /**
9
23
  * Create a form bound to a custom `AbstractSchema` adapter.
10
24
  *
@@ -43,7 +57,9 @@ declare function useForm<Form extends GenericForm, GetValueFormType extends Gene
43
57
  *
44
58
  * For Zod v4, import from `attaform/zod` instead.
45
59
  */
46
- declare function useForm<Schema extends z.ZodObject<z.ZodRawShape>, GetValueFormType extends GenericForm = z.output<UnwrapZodObject<Schema>> extends GenericForm ? z.output<UnwrapZodObject<Schema>> : never, K extends FormKey = FormKey>(configuration: UseFormConfigurationWithZod<Schema, DefaultValuesInput<z.input<UnwrapZodObject<Schema>>>, K>): UseFormReturnType<z.input<UnwrapZodObject<Schema>>, GetValueFormType, StorageShape<UnwrapZodObject<Schema>> extends GenericForm ? StorageShape<UnwrapZodObject<Schema>> : never, K>;
60
+ declare function useForm<Schema extends z.ZodObject<z.ZodRawShape>, K extends FormKey = FormKey>(configuration: Omit<UseFormConfiguration<FormOf<Schema>, OutOf<Schema>, AbstractSchema<FormOf<Schema>, OutOf<Schema>>, DefaultValuesInput<FormOf<Schema>>, K>, 'schema' | 'validateOn' | 'debounceMs'> & {
61
+ schema: Schema;
62
+ } & ValidateOnConfig): UseFormReturnType<FormOf<Schema>, OutOf<Schema>, ReadOf<Schema>, K>;
47
63
 
48
64
  /**
49
65
  * Narrow accessor type for Zod v3's internal `_def`. Only useful
@@ -117,6 +133,11 @@ type ZodTypeMap = {
117
133
  ZodIntersection: z.ZodIntersection<z.ZodTypeAny, z.ZodTypeAny>;
118
134
  ZodLazy: z.ZodLazy<z.ZodTypeAny>;
119
135
  ZodNativeEnum: z.ZodNativeEnum<z.EnumLike>;
136
+ ZodNaN: z.ZodNaN;
137
+ ZodVoid: z.ZodVoid;
138
+ ZodAny: z.ZodAny;
139
+ ZodUnknown: z.ZodUnknown;
140
+ ZodNever: z.ZodNever;
120
141
  };
121
142
  /**
122
143
  * Type guard for a Zod v3 schema kind. Returns `true` when `schema`
@@ -182,6 +203,11 @@ type FieldMetaRegistryV3 = {
182
203
  get(schema: z.ZodTypeAny): FieldMetaPayload | undefined;
183
204
  /** True iff a payload has been registered for the schema. */
184
205
  has(schema: z.ZodTypeAny): boolean;
206
+ /**
207
+ * Drop every registered payload for `schema`. Returns the registry
208
+ * for chaining; idempotent on a never-registered schema.
209
+ */
210
+ remove(schema: z.ZodTypeAny): FieldMetaRegistryV3;
185
211
  };
186
212
  declare const fieldMeta: FieldMetaRegistryV3;
187
213
  /**
@@ -212,5 +238,5 @@ declare const fieldMeta: FieldMetaRegistryV3;
212
238
  */
213
239
  declare function withMeta<S extends z.ZodTypeAny>(schema: S, payload: FieldMetaPayload): S;
214
240
 
215
- export { FieldMetaPayload, UnwrapZodObject, UseFormConfigurationWithZod, fieldMeta, isZodSchemaType, useForm, withMeta, zodAdapter };
241
+ export { FieldMetaPayload, UnwrapZodObject, fieldMeta, isZodSchemaType, useForm, withMeta, zodAdapter };
216
242
  export type { TypeWithNullableDynamicKeys, ZodTypeWithInnerType };
package/dist/zod-v3.mjs CHANGED
@@ -1,4 +1,4 @@
1
- export { f as fieldMeta, i as isZodSchemaType, u as useForm, w as withMeta, z as zodAdapter } from './shared/attaform.CiMqJHDm.mjs';
2
- export { A as AttaformErrorCode, i as injectForm, c as injectWizard, f as isUnset, l as lazy, u as unset, m as useWizard } from './shared/attaform.BTi-PsHr.mjs';
3
- export { J as useRegister } from './shared/attaform.CrpjyXdO.mjs';
1
+ export { f as fieldMeta, i as isZodSchemaType, u as useForm, w as withMeta, z as zodAdapter } from './shared/attaform.D6CwqkPx.mjs';
2
+ export { A as AttaformErrorCode, i as injectForm, c as injectWizard, f as isUnset, l as lazy, u as unset, p as useWizard } from './shared/attaform.BqZuwLTK.mjs';
3
+ export { G as useRegister } from './shared/attaform.BKozEdTr.mjs';
4
4
  //# sourceMappingURL=zod-v3.mjs.map
package/dist/zod-v4.cjs CHANGED
@@ -1,8 +1,8 @@
1
1
  'use strict';
2
2
 
3
- const index = require('./shared/attaform.JBx8cfMA.cjs');
4
- const injectWizard = require('./shared/attaform.C1msmO2v.cjs');
5
- const paths = require('./shared/attaform.BqEfHpVB.cjs');
3
+ const index = require('./shared/attaform.BrrXNmfK.cjs');
4
+ const injectWizard = require('./shared/attaform.DLnE5bZa.cjs');
5
+ const paths = require('./shared/attaform.BPy-4qRx.cjs');
6
6
 
7
7
 
8
8
 
package/dist/zod-v4.d.cts CHANGED
@@ -1,9 +1,9 @@
1
- export { P as PathInput, a as PathOutput, u as useForm } from './shared/attaform.QvygsFGh.cjs';
2
- export { A as AggregateError, a as AnyForm, b as AttaformErrorCode, C as CompiledStep, F as FormStatus, I as InjectWizardInput, L as LazyMarker, e as StepSlot, U as UseRegisterReturn, f as UseWizardReturnType, W as WizardCtx, g as WizardCtxForm, h as WizardOnError, i as WizardOnSubmit, j as WizardOptions, k as WizardPersistFn, l as WizardRestoreFn, m as WizardRestoreState, n as WizardStatusesProxy, o as WizardSubmitContext, t as injectForm, u as injectWizard, w as lazy, x as useRegister, z as useWizard } from './shared/attaform.ePUcKxId.cjs';
3
- import { t as FormKey, a9 as SchemaFactoryOptions, A as AbstractSchema, F as FieldMetaPayload } from './shared/attaform.C0uGZQ4M.cjs';
4
- export { ah as Unset, au as isUnset, aw as unset } from './shared/attaform.C0uGZQ4M.cjs';
1
+ export { P as PathInput, a as PathOutput, u as useForm } from './shared/attaform.GbDo_lJi.cjs';
2
+ export { A as AnyForm, a as AttaformErrorCode, C as CompiledStep, F as FormStatus, I as InjectWizardInput, L as LazyMarker, d as StepSlot, U as UseRegisterReturn, e as UseWizardReturnType, W as WizardAggregateError, f as WizardCtx, g as WizardCtxForm, h as WizardOnError, i as WizardOnSubmit, j as WizardOptions, k as WizardPersistFn, l as WizardRestoreFn, m as WizardRestoreState, n as WizardStatusesProxy, o as WizardSubmitContext, t as injectForm, u as injectWizard, w as lazy, x as useRegister, z as useWizard } from './shared/attaform.D5-1XGQU.cjs';
3
+ import { t as FormKey, a9 as SchemaFactoryOptions, A as AbstractSchema, F as FieldMetaPayload } from './shared/attaform.SfhU0OEY.cjs';
4
+ export { ah as Unset, au as isUnset, aw as unset } from './shared/attaform.SfhU0OEY.cjs';
5
5
  import { z } from 'zod';
6
- import { a as AttaformError } from './shared/attaform.B7rzpK1U.cjs';
6
+ import { a as AttaformError } from './shared/attaform.DkA5J8NW.cjs';
7
7
  import 'vue';
8
8
 
9
9
  /**
@@ -29,11 +29,15 @@ declare function zodV4Adapter<FormSchema extends z.ZodObject, Form extends z.inp
29
29
 
30
30
  /**
31
31
  * Thrown when a Zod schema includes a kind the form library cannot
32
- * represent: `z.promise`, `z.custom`, `z.templateLiteral`, or a
33
- * recursive `z.lazy(...)` that loops back into itself.
32
+ * represent: `z.promise`, `z.custom`, or `z.templateLiteral`.
34
33
  *
35
34
  * The error message includes the dotted path of the offending node
36
35
  * so you can locate it without traversing the whole schema.
36
+ *
37
+ * Recursive `z.lazy(...)` is supported, not unsupported: the
38
+ * construction-time walk stops descending on the second encounter
39
+ * of the same getter, and downstream walks cap their descent via
40
+ * `maxRecursionDepth`.
37
41
  */
38
42
  declare class UnsupportedSchemaError extends AttaformError {
39
43
  }
@@ -54,7 +58,7 @@ declare class UnsupportedSchemaError extends AttaformError {
54
58
  * `kindOf(schema)`. Use when building a custom integration that
55
59
  * needs to branch on schema shape — most consumers don't need this.
56
60
  */
57
- type ZodKind = 'object' | 'array' | 'set' | 'record' | 'tuple' | 'union' | 'discriminated-union' | 'string' | 'number' | 'boolean' | 'bigint' | 'date' | 'enum' | 'literal' | 'null' | 'undefined' | 'any' | 'unknown' | 'optional' | 'nullable' | 'default' | 'pipe' | 'readonly' | 'nan' | 'void' | 'never' | 'lazy' | 'intersection' | 'catch' | 'promise' | 'custom' | 'template-literal' | 'transform' | 'file';
61
+ type ZodKind = 'object' | 'array' | 'set' | 'record' | 'tuple' | 'union' | 'discriminated-union' | 'string' | 'number' | 'boolean' | 'bigint' | 'date' | 'enum' | 'literal' | 'null' | 'undefined' | 'any' | 'unknown' | 'optional' | 'nullable' | 'default' | 'pipe' | 'readonly' | 'nan' | 'void' | 'never' | 'lazy' | 'intersection' | 'catch' | 'promise' | 'custom' | 'template-literal' | 'transform' | 'file' | 'map' | 'symbol' | 'function';
58
62
  /**
59
63
  * Inspect a Zod v4 schema and return its `ZodKind`. Returns
60
64
  * `'unknown'` for non-Zod inputs and unrecognised shapes.
package/dist/zod-v4.d.mts CHANGED
@@ -1,9 +1,9 @@
1
- export { P as PathInput, a as PathOutput, u as useForm } from './shared/attaform.CRNA0vrd.mjs';
2
- export { A as AggregateError, a as AnyForm, b as AttaformErrorCode, C as CompiledStep, F as FormStatus, I as InjectWizardInput, L as LazyMarker, e as StepSlot, U as UseRegisterReturn, f as UseWizardReturnType, W as WizardCtx, g as WizardCtxForm, h as WizardOnError, i as WizardOnSubmit, j as WizardOptions, k as WizardPersistFn, l as WizardRestoreFn, m as WizardRestoreState, n as WizardStatusesProxy, o as WizardSubmitContext, t as injectForm, u as injectWizard, w as lazy, x as useRegister, z as useWizard } from './shared/attaform.BtBmfLQN.mjs';
3
- import { t as FormKey, a9 as SchemaFactoryOptions, A as AbstractSchema, F as FieldMetaPayload } from './shared/attaform.C0uGZQ4M.mjs';
4
- export { ah as Unset, au as isUnset, aw as unset } from './shared/attaform.C0uGZQ4M.mjs';
1
+ export { P as PathInput, a as PathOutput, u as useForm } from './shared/attaform.DoKXru-a.mjs';
2
+ export { A as AnyForm, a as AttaformErrorCode, C as CompiledStep, F as FormStatus, I as InjectWizardInput, L as LazyMarker, d as StepSlot, U as UseRegisterReturn, e as UseWizardReturnType, W as WizardAggregateError, f as WizardCtx, g as WizardCtxForm, h as WizardOnError, i as WizardOnSubmit, j as WizardOptions, k as WizardPersistFn, l as WizardRestoreFn, m as WizardRestoreState, n as WizardStatusesProxy, o as WizardSubmitContext, t as injectForm, u as injectWizard, w as lazy, x as useRegister, z as useWizard } from './shared/attaform.EMzJcQci.mjs';
3
+ import { t as FormKey, a9 as SchemaFactoryOptions, A as AbstractSchema, F as FieldMetaPayload } from './shared/attaform.SfhU0OEY.mjs';
4
+ export { ah as Unset, au as isUnset, aw as unset } from './shared/attaform.SfhU0OEY.mjs';
5
5
  import { z } from 'zod';
6
- import { a as AttaformError } from './shared/attaform.B7rzpK1U.mjs';
6
+ import { a as AttaformError } from './shared/attaform.DkA5J8NW.mjs';
7
7
  import 'vue';
8
8
 
9
9
  /**
@@ -29,11 +29,15 @@ declare function zodV4Adapter<FormSchema extends z.ZodObject, Form extends z.inp
29
29
 
30
30
  /**
31
31
  * Thrown when a Zod schema includes a kind the form library cannot
32
- * represent: `z.promise`, `z.custom`, `z.templateLiteral`, or a
33
- * recursive `z.lazy(...)` that loops back into itself.
32
+ * represent: `z.promise`, `z.custom`, or `z.templateLiteral`.
34
33
  *
35
34
  * The error message includes the dotted path of the offending node
36
35
  * so you can locate it without traversing the whole schema.
36
+ *
37
+ * Recursive `z.lazy(...)` is supported, not unsupported: the
38
+ * construction-time walk stops descending on the second encounter
39
+ * of the same getter, and downstream walks cap their descent via
40
+ * `maxRecursionDepth`.
37
41
  */
38
42
  declare class UnsupportedSchemaError extends AttaformError {
39
43
  }
@@ -54,7 +58,7 @@ declare class UnsupportedSchemaError extends AttaformError {
54
58
  * `kindOf(schema)`. Use when building a custom integration that
55
59
  * needs to branch on schema shape — most consumers don't need this.
56
60
  */
57
- type ZodKind = 'object' | 'array' | 'set' | 'record' | 'tuple' | 'union' | 'discriminated-union' | 'string' | 'number' | 'boolean' | 'bigint' | 'date' | 'enum' | 'literal' | 'null' | 'undefined' | 'any' | 'unknown' | 'optional' | 'nullable' | 'default' | 'pipe' | 'readonly' | 'nan' | 'void' | 'never' | 'lazy' | 'intersection' | 'catch' | 'promise' | 'custom' | 'template-literal' | 'transform' | 'file';
61
+ type ZodKind = 'object' | 'array' | 'set' | 'record' | 'tuple' | 'union' | 'discriminated-union' | 'string' | 'number' | 'boolean' | 'bigint' | 'date' | 'enum' | 'literal' | 'null' | 'undefined' | 'any' | 'unknown' | 'optional' | 'nullable' | 'default' | 'pipe' | 'readonly' | 'nan' | 'void' | 'never' | 'lazy' | 'intersection' | 'catch' | 'promise' | 'custom' | 'template-literal' | 'transform' | 'file' | 'map' | 'symbol' | 'function';
58
62
  /**
59
63
  * Inspect a Zod v4 schema and return its `ZodKind`. Returns
60
64
  * `'unknown'` for non-Zod inputs and unrecognised shapes.
package/dist/zod-v4.d.ts CHANGED
@@ -1,9 +1,9 @@
1
- export { P as PathInput, a as PathOutput, u as useForm } from './shared/attaform.CJ-e9gYI.js';
2
- export { A as AggregateError, a as AnyForm, b as AttaformErrorCode, C as CompiledStep, F as FormStatus, I as InjectWizardInput, L as LazyMarker, e as StepSlot, U as UseRegisterReturn, f as UseWizardReturnType, W as WizardCtx, g as WizardCtxForm, h as WizardOnError, i as WizardOnSubmit, j as WizardOptions, k as WizardPersistFn, l as WizardRestoreFn, m as WizardRestoreState, n as WizardStatusesProxy, o as WizardSubmitContext, t as injectForm, u as injectWizard, w as lazy, x as useRegister, z as useWizard } from './shared/attaform.BTpuvGec.js';
3
- import { t as FormKey, a9 as SchemaFactoryOptions, A as AbstractSchema, F as FieldMetaPayload } from './shared/attaform.C0uGZQ4M.js';
4
- export { ah as Unset, au as isUnset, aw as unset } from './shared/attaform.C0uGZQ4M.js';
1
+ export { P as PathInput, a as PathOutput, u as useForm } from './shared/attaform.Dl5kDY-A.js';
2
+ export { A as AnyForm, a as AttaformErrorCode, C as CompiledStep, F as FormStatus, I as InjectWizardInput, L as LazyMarker, d as StepSlot, U as UseRegisterReturn, e as UseWizardReturnType, W as WizardAggregateError, f as WizardCtx, g as WizardCtxForm, h as WizardOnError, i as WizardOnSubmit, j as WizardOptions, k as WizardPersistFn, l as WizardRestoreFn, m as WizardRestoreState, n as WizardStatusesProxy, o as WizardSubmitContext, t as injectForm, u as injectWizard, w as lazy, x as useRegister, z as useWizard } from './shared/attaform.Bh3ACtts.js';
3
+ import { t as FormKey, a9 as SchemaFactoryOptions, A as AbstractSchema, F as FieldMetaPayload } from './shared/attaform.SfhU0OEY.js';
4
+ export { ah as Unset, au as isUnset, aw as unset } from './shared/attaform.SfhU0OEY.js';
5
5
  import { z } from 'zod';
6
- import { a as AttaformError } from './shared/attaform.B7rzpK1U.js';
6
+ import { a as AttaformError } from './shared/attaform.DkA5J8NW.js';
7
7
  import 'vue';
8
8
 
9
9
  /**
@@ -29,11 +29,15 @@ declare function zodV4Adapter<FormSchema extends z.ZodObject, Form extends z.inp
29
29
 
30
30
  /**
31
31
  * Thrown when a Zod schema includes a kind the form library cannot
32
- * represent: `z.promise`, `z.custom`, `z.templateLiteral`, or a
33
- * recursive `z.lazy(...)` that loops back into itself.
32
+ * represent: `z.promise`, `z.custom`, or `z.templateLiteral`.
34
33
  *
35
34
  * The error message includes the dotted path of the offending node
36
35
  * so you can locate it without traversing the whole schema.
36
+ *
37
+ * Recursive `z.lazy(...)` is supported, not unsupported: the
38
+ * construction-time walk stops descending on the second encounter
39
+ * of the same getter, and downstream walks cap their descent via
40
+ * `maxRecursionDepth`.
37
41
  */
38
42
  declare class UnsupportedSchemaError extends AttaformError {
39
43
  }
@@ -54,7 +58,7 @@ declare class UnsupportedSchemaError extends AttaformError {
54
58
  * `kindOf(schema)`. Use when building a custom integration that
55
59
  * needs to branch on schema shape — most consumers don't need this.
56
60
  */
57
- type ZodKind = 'object' | 'array' | 'set' | 'record' | 'tuple' | 'union' | 'discriminated-union' | 'string' | 'number' | 'boolean' | 'bigint' | 'date' | 'enum' | 'literal' | 'null' | 'undefined' | 'any' | 'unknown' | 'optional' | 'nullable' | 'default' | 'pipe' | 'readonly' | 'nan' | 'void' | 'never' | 'lazy' | 'intersection' | 'catch' | 'promise' | 'custom' | 'template-literal' | 'transform' | 'file';
61
+ type ZodKind = 'object' | 'array' | 'set' | 'record' | 'tuple' | 'union' | 'discriminated-union' | 'string' | 'number' | 'boolean' | 'bigint' | 'date' | 'enum' | 'literal' | 'null' | 'undefined' | 'any' | 'unknown' | 'optional' | 'nullable' | 'default' | 'pipe' | 'readonly' | 'nan' | 'void' | 'never' | 'lazy' | 'intersection' | 'catch' | 'promise' | 'custom' | 'template-literal' | 'transform' | 'file' | 'map' | 'symbol' | 'function';
58
62
  /**
59
63
  * Inspect a Zod v4 schema and return its `ZodKind`. Returns
60
64
  * `'unknown'` for non-Zod inputs and unrecognised shapes.
package/dist/zod-v4.mjs CHANGED
@@ -1,4 +1,4 @@
1
- export { U as UnsupportedSchemaError, a as assertZodVersion, f as fieldMeta, k as kindOf, u as useForm, w as withMeta, z as zodAdapter } from './shared/attaform.a3uBo-gw.mjs';
2
- export { A as AttaformErrorCode, i as injectForm, c as injectWizard, f as isUnset, l as lazy, u as unset, m as useWizard } from './shared/attaform.BTi-PsHr.mjs';
3
- export { J as useRegister } from './shared/attaform.CrpjyXdO.mjs';
1
+ export { U as UnsupportedSchemaError, a as assertZodVersion, f as fieldMeta, k as kindOf, u as useForm, w as withMeta, z as zodAdapter } from './shared/attaform.iWo9soNX.mjs';
2
+ export { A as AttaformErrorCode, i as injectForm, c as injectWizard, f as isUnset, l as lazy, u as unset, p as useWizard } from './shared/attaform.BqZuwLTK.mjs';
3
+ export { G as useRegister } from './shared/attaform.BKozEdTr.mjs';
4
4
  //# sourceMappingURL=zod-v4.mjs.map
package/dist/zod.cjs CHANGED
@@ -1,10 +1,10 @@
1
1
  'use strict';
2
2
 
3
- const paths = require('./shared/attaform.BqEfHpVB.cjs');
4
- const useForm$1 = require('./shared/attaform.OznWyOPy.cjs');
5
- const index = require('./shared/attaform.JBx8cfMA.cjs');
6
- const injectWizard = require('./shared/attaform.C1msmO2v.cjs');
7
- const fieldMetaStore = require('./shared/attaform.C8CyvYa_.cjs');
3
+ const paths = require('./shared/attaform.BPy-4qRx.cjs');
4
+ const useForm$1 = require('./shared/attaform.BCBxTyMC.cjs');
5
+ const index = require('./shared/attaform.BrrXNmfK.cjs');
6
+ const walkSlimPrimitives = require('./shared/attaform.DHRWn-cu.cjs');
7
+ const injectWizard = require('./shared/attaform.DLnE5bZa.cjs');
8
8
 
9
9
  function isZodV4SchemaShape(value) {
10
10
  if (typeof value !== "object" || value === null) return false;
@@ -24,12 +24,12 @@ function useForm(configuration) {
24
24
  return useForm$1.useForm(configuration);
25
25
  }
26
26
 
27
- const fieldMeta = fieldMetaStore.fieldMetaStore;
27
+ const fieldMeta = walkSlimPrimitives.fieldMetaStore;
28
28
  function withMeta(schema, payload) {
29
29
  const target = schema;
30
- const existing = fieldMetaStore.getFieldMetaForSchema(target) ?? {};
30
+ const existing = walkSlimPrimitives.getFieldMetaForSchema(target) ?? {};
31
31
  const cloned = cloneSchema(schema);
32
- fieldMetaStore.fieldMetaStore.add(cloned, { ...existing, ...payload });
32
+ walkSlimPrimitives.fieldMetaStore.add(cloned, { ...existing, ...payload });
33
33
  return cloned;
34
34
  }
35
35
  function cloneSchema(schema) {
package/dist/zod.cjs.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"zod.cjs","sources":["../src/runtime/core/zod-shape.ts","../src/runtime/adapters/unified/use-form.ts","../src/runtime/adapters/unified/field-meta.ts"],"sourcesContent":["/**\n * Shape detectors for Zod schemas. Used by the unified `attaform/zod`\n * entry's runtime dispatch (`runtime/adapters/unified/use-form.ts`)\n * to route to the v3 or v4 adapter based on the schema's runtime\n * shape. Mirrors the discrimination already used by the v4\n * introspection helper (`adapters/zod-v4/introspect.ts`'s\n * `assertZodVersion`, which reads `def.type`) and the v3 wrapper's\n * legitimate-input branch (`composables/use-form.ts`'s `isZodType`,\n * which reads `_def`).\n *\n * Why this discriminator and not `_zod` / `_def`:\n * - Zod v4 retained `_def` for backward compat — reading `_def` alone\n * misclassifies v4 schemas as v3.\n * - Zod v4's stable shape is `def.type: string` (lowercase tag like\n * `'object'`); Zod v3's is `_def.typeName: string` (capitalised tag\n * like `'ZodObject'`). Both are checked structurally so consumers\n * who alias one Zod major to a non-standard import path still work.\n */\n\ninterface ZodV4Shape {\n def: { type: unknown }\n}\n\ninterface ZodV3Shape {\n _def: { typeName: unknown }\n}\n\n/**\n * Returns true when `value` looks like a Zod schema of either major\n * version. Convenience wrapper around the v3 / v4 detectors.\n */\nexport function isZodSchemaShape(value: unknown): boolean {\n return isZodV4SchemaShape(value) || isZodV3SchemaShape(value)\n}\n\n/**\n * Returns true when `value` looks like a Zod v4 schema (has\n * `def.type: string`). Used by the unified entry's runtime-dispatch\n * to route to the v4 adapter.\n */\nexport function isZodV4SchemaShape(value: unknown): value is ZodV4Shape {\n if (typeof value !== 'object' || value === null) return false\n const def = (value as { def?: unknown }).def\n if (typeof def !== 'object' || def === null) return false\n return typeof (def as { type?: unknown }).type === 'string'\n}\n\n/**\n * Returns true when `value` looks like a Zod v3 schema (has\n * `_def.typeName: string`). Kept distinct from `isZodV4SchemaShape`\n * because some v4 schemas also expose `_def` for backward compat —\n * the v4 detector wins first in `isZodSchemaShape`.\n */\nexport function isZodV3SchemaShape(value: unknown): value is ZodV3Shape {\n if (typeof value !== 'object' || value === null) return false\n const def = (value as { _def?: unknown })._def\n if (typeof def !== 'object' || def === null) return false\n return typeof (def as { typeName?: unknown }).typeName === 'string'\n}\n","/**\n * Unified `useForm` for the `attaform/zod` entry. Runtime-dispatches\n * on schema shape: a Zod v4 schema (`def.type` truthy) routes to the\n * v4 adapter; a Zod v3 schema (or any other `AbstractSchema`) routes\n * to the v3 wrapper, which already accepts both Zod v3 input and\n * `AbstractSchema` directly via its built-in shape branch.\n *\n * Type-level dispatch happens via TWO typed overloads — v4 first, v3\n * second — plus an untyped impl. Each overload mirrors the matching\n * direct adapter's signature exactly, so a v4-schema call site pays\n * the same per-call depth cost as importing from `attaform/zod-v4`\n * directly. Overload resolution at concrete call sites commits to one\n * overload immediately on argument shape — no type-level dispatch tax.\n *\n * Tests and other call sites that need the equivalent of\n * `typeof useForm<X>` should reach for the `UseFormReturn<X>` /\n * `UseFormConfig<X>` helpers in `types-api.ts` — instantiation\n * expressions on overloaded functions follow brittle resolution rules,\n * and the helper types give a deterministic projection.\n *\n * This module is the FALLBACK path. Vite consumers see the\n * `attaform/vite` plugin's `resolveId` hook rewrite `attaform/zod`\n * imports to either `attaform/zod-v3` or `attaform/zod-v4` at build\n * time — in that case this dispatch never runs and the consumer\n * bundle ships only the matching adapter. Other bundlers (and\n * non-bundled ESM consumption) hit this dispatch instead, paying a\n * modest size cost for the convenience of a single hello-world import.\n *\n * Power users who want a guaranteed lean bundle on non-Vite tooling\n * can import directly from `attaform/zod-v3` or `attaform/zod-v4` —\n * those subpaths are never rewritten and never load the other\n * adapter.\n */\nimport type { z } from 'zod'\nimport type { z as zV3 } from 'zod-v3'\nimport { InvalidUseFormConfigError } from '../../core/errors'\nimport { isZodV4SchemaShape } from '../../core/zod-shape'\nimport { useForm as useFormV3 } from '../../composables/use-form'\nimport { useForm as useFormV4 } from '../zod-v4'\nimport type { StorageShape as StorageShapeV4 } from '../zod-v4/types-storage-shape'\nimport type { StorageShape as StorageShapeV3 } from '../zod-v3/types-storage-shape'\nimport type { UnwrapZodObject } from '../zod-v3/types-zod-adapter'\nimport type {\n AbstractSchema,\n FormKey,\n ValidateOnConfig,\n UseFormReturnType,\n UseFormConfiguration,\n} from '../../types/types-api'\nimport type { DefaultValuesInput, GenericForm } from '../../types/types-core'\n\n// ───────────────────────────────────────────────────────────────────\n// Per-major projection helpers. Each overload's constraint scopes the\n// Schema to one Zod major, so the projection is a direct read — no\n// dispatch in the type body. Mirrors the direct adapter shapes so the\n// unified entry pays the same per-call depth cost as a direct import.\n// ───────────────────────────────────────────────────────────────────\n\ntype V4FormOf<S extends z.ZodObject> = z.input<S> extends GenericForm ? z.input<S> : never\ntype V4OutOf<S extends z.ZodObject> = z.output<S> extends GenericForm ? z.output<S> : never\ntype V4ReadOf<S extends z.ZodObject> =\n StorageShapeV4<S> extends GenericForm ? StorageShapeV4<S> : never\n\ntype V3FormOf<S extends zV3.ZodObject<zV3.ZodRawShape>> =\n zV3.input<UnwrapZodObject<S>> extends GenericForm ? zV3.input<UnwrapZodObject<S>> : never\ntype V3OutOf<S extends zV3.ZodObject<zV3.ZodRawShape>> =\n zV3.output<UnwrapZodObject<S>> extends GenericForm ? zV3.output<UnwrapZodObject<S>> : never\ntype V3ReadOf<S extends zV3.ZodObject<zV3.ZodRawShape>> =\n StorageShapeV3<UnwrapZodObject<S>> extends GenericForm\n ? StorageShapeV3<UnwrapZodObject<S>>\n : never\n\n/**\n * Create a form bound to a Zod v4 schema.\n *\n * ```ts\n * import { useForm } from 'attaform/zod'\n * import { z } from 'zod'\n *\n * const form = useForm({\n * schema: z.object({\n * username: z.string().min(2, 'At least 2 characters'),\n * password: z.string().min(8, 'At least 8 characters'),\n * }),\n * })\n * ```\n *\n * v4 schemas match this overload first via their structural `def`\n * field. v3 schemas fall through to the v3 overload below.\n */\nexport function useForm<Schema extends z.ZodObject, K extends FormKey = FormKey>(\n configuration: Omit<\n UseFormConfiguration<\n V4FormOf<Schema>,\n V4OutOf<Schema>,\n AbstractSchema<V4FormOf<Schema>, V4OutOf<Schema>>,\n DefaultValuesInput<V4FormOf<Schema>>,\n K\n >,\n 'schema' | 'validateOn' | 'debounceMs'\n > & { schema: Schema } & ValidateOnConfig\n): UseFormReturnType<V4FormOf<Schema>, V4OutOf<Schema>, V4ReadOf<Schema>, K>\n/**\n * Create a form bound to a Zod v3 schema.\n *\n * ```ts\n * import { useForm } from 'attaform/zod'\n * import { z } from 'zod-v3'\n *\n * const form = useForm({\n * schema: z.object({\n * username: z.string().min(2, 'At least 2 characters'),\n * password: z.string().min(8, 'At least 8 characters'),\n * }),\n * })\n * ```\n *\n * v3 schemas match this overload; v4 schemas hit the v4 overload\n * above first and never reach here.\n */\nexport function useForm<Schema extends zV3.ZodObject<zV3.ZodRawShape>, K extends FormKey = FormKey>(\n configuration: Omit<\n UseFormConfiguration<\n V3FormOf<Schema>,\n V3OutOf<Schema>,\n AbstractSchema<V3FormOf<Schema>, V3OutOf<Schema>>,\n DefaultValuesInput<V3FormOf<Schema>>,\n K\n >,\n 'schema' | 'validateOn' | 'debounceMs'\n > & { schema: Schema } & ValidateOnConfig\n): UseFormReturnType<V3FormOf<Schema>, V3OutOf<Schema>, V3ReadOf<Schema>, K>\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function useForm(configuration: any): any {\n if (\n configuration === undefined ||\n configuration === null ||\n (configuration as { schema?: unknown }).schema === undefined\n ) {\n throw new InvalidUseFormConfigError()\n }\n const { schema } = configuration as { schema: unknown }\n if (isZodV4SchemaShape(schema)) {\n return useFormV4(configuration as Parameters<typeof useFormV4>[0])\n }\n return useFormV3(configuration as Parameters<typeof useFormV3>[0])\n}\n","/**\n * Field-metadata write/read API for the unified `attaform/zod` entry.\n *\n * Storage is shared with both adapters via `field-meta-store` — a\n * payload written here is visible to whichever adapter the unified\n * `useForm` dispatches to at runtime, regardless of Zod major. No\n * `zod` runtime import; the type-only `import type` is erased at\n * build, so `attaform/zod` carries no `z.registry` reference even\n * when consumed by a Zod 3 project without the Vite plugin alias.\n *\n * The native v4 chain `schema.register(fieldMeta, payload)` continues\n * to work — Zod 4's `.register()` only calls `.add(this, payload)`\n * structurally, satisfied by the shared store.\n */\nimport type { z } from 'zod'\nimport type { FieldMetaPayload } from '../../core/field-meta'\nimport { fieldMetaStore, getFieldMetaForSchema } from '../../core/field-meta-store'\n\n// Zod v4's `$ZodRegistry` class isn't surfaced under the `z` namespace\n// of the classic external entry, but `z.registry()` returns one — so\n// `ReturnType<typeof z.registry<T>>` resolves to the registry type\n// without needing a direct import. The `import type` keeps the\n// reference type-only; nothing about `z.registry` lands in the bundle.\ntype ZodFieldMetaRegistry = ReturnType<typeof z.registry<FieldMetaPayload>>\n\n/**\n * The shared registry every Attaform-aware Zod schema can register\n * field metadata against, regardless of major. Same instance the v3\n * and v4 adapter entries expose — write in one place, read from\n * any.\n *\n * Cast to Zod 4's `$ZodRegistry<FieldMetaPayload>` so the native\n * `schema.register(fieldMeta, payload)` chain type-checks for v4\n * users; the runtime call only needs `.add` structurally, which the\n * shared store provides.\n */\nexport const fieldMeta = fieldMetaStore as unknown as ZodFieldMetaRegistry\n\n/**\n * Attach `payload` to `schema` in the shared registry and return a\n * clone of `schema` so each call gets its own identity (the registry\n * keys on schema reference, so cloning prevents last-write-wins\n * collisions for sub-schemas reused at multiple paths).\n *\n * Works on both Zod 3 and Zod 4 schemas — branches on the runtime\n * shape of the schema:\n * - Zod 4 schemas expose a public `.clone()` method; we call it.\n * - Zod 3 schemas don't, so we reconstruct via\n * `new schema.constructor(schema._def)`.\n *\n * Both forms produce a fresh schema with the same effective\n * structure, so the registry slot is unique to this call site.\n */\nexport function withMeta<S>(schema: S, payload: FieldMetaPayload): S {\n const target = schema as object\n const existing = getFieldMetaForSchema(target) ?? {}\n const cloned = cloneSchema(schema)\n fieldMetaStore.add(cloned as object, { ...existing, ...payload })\n return cloned\n}\n\nfunction cloneSchema<S>(schema: S): S {\n const candidate = schema as { clone?: unknown; constructor: unknown; _def: unknown }\n if (typeof candidate.clone === 'function') {\n return (candidate.clone as () => S)()\n }\n // Zod 3 path: reconstruct via constructor + _def (no public\n // `.clone()` on v3).\n const Ctor = candidate.constructor as new (def: unknown) => S\n return new Ctor(candidate._def)\n}\n"],"names":["InvalidUseFormConfigError","useFormV4","useFormV3","fieldMetaStore","getFieldMetaForSchema"],"mappings":";;;;;;;;AAwCO,SAAS,mBAAmB,KAAA,EAAqC;AACtE,EAAA,IAAI,OAAO,KAAA,KAAU,QAAA,IAAY,KAAA,KAAU,MAAM,OAAO,KAAA;AACxD,EAAA,MAAM,MAAO,KAAA,CAA4B,GAAA;AACzC,EAAA,IAAI,OAAO,GAAA,KAAQ,QAAA,IAAY,GAAA,KAAQ,MAAM,OAAO,KAAA;AACpD,EAAA,OAAO,OAAQ,IAA2B,IAAA,KAAS,QAAA;AACrD;;ACwFO,SAAS,QAAQ,aAAA,EAAyB;AAC/C,EAAA,IACE,kBAAkB,MAAA,IAClB,aAAA,KAAkB,IAAA,IACjB,aAAA,CAAuC,WAAW,MAAA,EACnD;AACA,IAAA,MAAM,IAAIA,+BAAA,EAA0B;AAAA,EACtC;AACA,EAAA,MAAM,EAAE,QAAO,GAAI,aAAA;AACnB,EAAA,IAAI,kBAAA,CAAmB,MAAM,CAAA,EAAG;AAC9B,IAAA,OAAOC,cAAU,aAAgD,CAAA;AAAA,EACnE;AACA,EAAA,OAAOC,kBAAU,aAAgD,CAAA;AACnE;;AC9GO,MAAM,SAAA,GAAYC;AAiBlB,SAAS,QAAA,CAAY,QAAW,OAAA,EAA8B;AACnE,EAAA,MAAM,MAAA,GAAS,MAAA;AACf,EAAA,MAAM,QAAA,GAAWC,oCAAA,CAAsB,MAAM,CAAA,IAAK,EAAC;AACnD,EAAA,MAAM,MAAA,GAAS,YAAY,MAAM,CAAA;AACjC,EAAAD,6BAAA,CAAe,IAAI,MAAA,EAAkB,EAAE,GAAG,QAAA,EAAU,GAAG,SAAS,CAAA;AAChE,EAAA,OAAO,MAAA;AACT;AAEA,SAAS,YAAe,MAAA,EAAc;AACpC,EAAA,MAAM,SAAA,GAAY,MAAA;AAClB,EAAA,IAAI,OAAO,SAAA,CAAU,KAAA,KAAU,UAAA,EAAY;AACzC,IAAA,OAAQ,UAAU,KAAA,EAAkB;AAAA,EACtC;AAGA,EAAA,MAAM,OAAO,SAAA,CAAU,WAAA;AACvB,EAAA,OAAO,IAAI,IAAA,CAAK,SAAA,CAAU,IAAI,CAAA;AAChC;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"zod.cjs","sources":["../src/runtime/core/zod-shape.ts","../src/runtime/adapters/unified/use-form.ts","../src/runtime/adapters/unified/field-meta.ts"],"sourcesContent":["/**\n * Shape detectors for Zod schemas. Used by the unified `attaform/zod`\n * entry's runtime dispatch (`runtime/adapters/unified/use-form.ts`)\n * to route to the v3 or v4 adapter based on the schema's runtime\n * shape. Mirrors the discrimination already used by the v4\n * introspection helper (`adapters/zod-v4/introspect.ts`'s\n * `assertZodVersion`, which reads `def.type`) and the v3 wrapper's\n * legitimate-input branch (`composables/use-form.ts`'s `isZodType`,\n * which reads `_def`).\n *\n * Why this discriminator and not `_zod` / `_def`:\n * - Zod v4 retained `_def` for backward compat — reading `_def` alone\n * misclassifies v4 schemas as v3.\n * - Zod v4's stable shape is `def.type: string` (lowercase tag like\n * `'object'`); Zod v3's is `_def.typeName: string` (capitalised tag\n * like `'ZodObject'`). Both are checked structurally so consumers\n * who alias one Zod major to a non-standard import path still work.\n */\n\ninterface ZodV4Shape {\n def: { type: unknown }\n}\n\ninterface ZodV3Shape {\n _def: { typeName: unknown }\n}\n\n/**\n * Returns true when `value` looks like a Zod schema of either major\n * version. Convenience wrapper around the v3 / v4 detectors.\n */\nexport function isZodSchemaShape(value: unknown): boolean {\n return isZodV4SchemaShape(value) || isZodV3SchemaShape(value)\n}\n\n/**\n * Returns true when `value` looks like a Zod v4 schema (has\n * `def.type: string`). Used by the unified entry's runtime-dispatch\n * to route to the v4 adapter.\n */\nexport function isZodV4SchemaShape(value: unknown): value is ZodV4Shape {\n if (typeof value !== 'object' || value === null) return false\n const def = (value as { def?: unknown }).def\n if (typeof def !== 'object' || def === null) return false\n return typeof (def as { type?: unknown }).type === 'string'\n}\n\n/**\n * Returns true when `value` looks like a Zod v3 schema (has\n * `_def.typeName: string`). Kept distinct from `isZodV4SchemaShape`\n * because some v4 schemas also expose `_def` for backward compat —\n * the v4 detector wins first in `isZodSchemaShape`.\n */\nexport function isZodV3SchemaShape(value: unknown): value is ZodV3Shape {\n if (typeof value !== 'object' || value === null) return false\n const def = (value as { _def?: unknown })._def\n if (typeof def !== 'object' || def === null) return false\n return typeof (def as { typeName?: unknown }).typeName === 'string'\n}\n","/**\n * Unified `useForm` for the `attaform/zod` entry. Runtime-dispatches\n * on schema shape: a Zod v4 schema (`def.type` truthy) routes to the\n * v4 adapter; a Zod v3 schema (or any other `AbstractSchema`) routes\n * to the v3 wrapper, which already accepts both Zod v3 input and\n * `AbstractSchema` directly via its built-in shape branch.\n *\n * Type-level dispatch happens via TWO typed overloads — v4 first, v3\n * second — plus an untyped impl. Each overload mirrors the matching\n * direct adapter's signature exactly, so a v4-schema call site pays\n * the same per-call depth cost as importing from `attaform/zod-v4`\n * directly. Overload resolution at concrete call sites commits to one\n * overload immediately on argument shape — no type-level dispatch tax.\n *\n * Tests and other call sites that need the equivalent of\n * `typeof useForm<X>` should reach for the `UseFormReturn<X>` /\n * `UseFormConfig<X>` helpers in `types-api.ts` — instantiation\n * expressions on overloaded functions follow brittle resolution rules,\n * and the helper types give a deterministic projection.\n *\n * This module is the FALLBACK path. Vite consumers see the\n * `attaform/vite` plugin's `resolveId` hook rewrite `attaform/zod`\n * imports to either `attaform/zod-v3` or `attaform/zod-v4` at build\n * time — in that case this dispatch never runs and the consumer\n * bundle ships only the matching adapter. Other bundlers (and\n * non-bundled ESM consumption) hit this dispatch instead, paying a\n * modest size cost for the convenience of a single hello-world import.\n *\n * Power users who want a guaranteed lean bundle on non-Vite tooling\n * can import directly from `attaform/zod-v3` or `attaform/zod-v4` —\n * those subpaths are never rewritten and never load the other\n * adapter.\n */\nimport type { z } from 'zod'\nimport type { z as zV3 } from 'zod-v3'\nimport { InvalidUseFormConfigError } from '../../core/errors'\nimport { isZodV4SchemaShape } from '../../core/zod-shape'\nimport { useForm as useFormV3 } from '../../composables/use-form'\nimport { useForm as useFormV4 } from '../zod-v4'\nimport type { StorageShape as StorageShapeV4 } from '../zod-v4/types-storage-shape'\nimport type { StorageShape as StorageShapeV3 } from '../zod-v3/types-storage-shape'\nimport type { UnwrapZodObject } from '../zod-v3/types-zod-adapter'\nimport type {\n AbstractSchema,\n FormKey,\n ValidateOnConfig,\n UseFormReturnType,\n UseFormConfiguration,\n} from '../../types/types-api'\nimport type { DefaultValuesInput, GenericForm } from '../../types/types-core'\n\n// ───────────────────────────────────────────────────────────────────\n// Per-major projection helpers. Each overload's constraint scopes the\n// Schema to one Zod major, so the projection is a direct read — no\n// dispatch in the type body. Mirrors the direct adapter shapes so the\n// unified entry pays the same per-call depth cost as a direct import.\n// ───────────────────────────────────────────────────────────────────\n\ntype V4FormOf<S extends z.ZodObject> = z.input<S> extends GenericForm ? z.input<S> : never\ntype V4OutOf<S extends z.ZodObject> = z.output<S> extends GenericForm ? z.output<S> : never\ntype V4ReadOf<S extends z.ZodObject> =\n StorageShapeV4<S> extends GenericForm ? StorageShapeV4<S> : never\n\ntype V3FormOf<S extends zV3.ZodObject<zV3.ZodRawShape>> =\n zV3.input<UnwrapZodObject<S>> extends GenericForm ? zV3.input<UnwrapZodObject<S>> : never\ntype V3OutOf<S extends zV3.ZodObject<zV3.ZodRawShape>> =\n zV3.output<UnwrapZodObject<S>> extends GenericForm ? zV3.output<UnwrapZodObject<S>> : never\ntype V3ReadOf<S extends zV3.ZodObject<zV3.ZodRawShape>> =\n StorageShapeV3<UnwrapZodObject<S>> extends GenericForm\n ? StorageShapeV3<UnwrapZodObject<S>>\n : never\n\n/**\n * Create a form bound to a Zod v4 schema.\n *\n * ```ts\n * import { useForm } from 'attaform/zod'\n * import { z } from 'zod'\n *\n * const form = useForm({\n * schema: z.object({\n * username: z.string().min(2, 'At least 2 characters'),\n * password: z.string().min(8, 'At least 8 characters'),\n * }),\n * })\n * ```\n *\n * v4 schemas match this overload first via their structural `def`\n * field. v3 schemas fall through to the v3 overload below.\n */\nexport function useForm<Schema extends z.ZodObject, K extends FormKey = FormKey>(\n configuration: Omit<\n UseFormConfiguration<\n V4FormOf<Schema>,\n V4OutOf<Schema>,\n AbstractSchema<V4FormOf<Schema>, V4OutOf<Schema>>,\n DefaultValuesInput<V4FormOf<Schema>>,\n K\n >,\n 'schema' | 'validateOn' | 'debounceMs'\n > & { schema: Schema } & ValidateOnConfig\n): UseFormReturnType<V4FormOf<Schema>, V4OutOf<Schema>, V4ReadOf<Schema>, K>\n/**\n * Create a form bound to a Zod v3 schema.\n *\n * ```ts\n * import { useForm } from 'attaform/zod'\n * import { z } from 'zod-v3'\n *\n * const form = useForm({\n * schema: z.object({\n * username: z.string().min(2, 'At least 2 characters'),\n * password: z.string().min(8, 'At least 8 characters'),\n * }),\n * })\n * ```\n *\n * v3 schemas match this overload; v4 schemas hit the v4 overload\n * above first and never reach here.\n */\nexport function useForm<Schema extends zV3.ZodObject<zV3.ZodRawShape>, K extends FormKey = FormKey>(\n configuration: Omit<\n UseFormConfiguration<\n V3FormOf<Schema>,\n V3OutOf<Schema>,\n AbstractSchema<V3FormOf<Schema>, V3OutOf<Schema>>,\n DefaultValuesInput<V3FormOf<Schema>>,\n K\n >,\n 'schema' | 'validateOn' | 'debounceMs'\n > & { schema: Schema } & ValidateOnConfig\n): UseFormReturnType<V3FormOf<Schema>, V3OutOf<Schema>, V3ReadOf<Schema>, K>\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function useForm(configuration: any): any {\n if (\n configuration === undefined ||\n configuration === null ||\n (configuration as { schema?: unknown }).schema === undefined\n ) {\n throw new InvalidUseFormConfigError()\n }\n const { schema } = configuration as { schema: unknown }\n if (isZodV4SchemaShape(schema)) {\n return useFormV4(configuration as Parameters<typeof useFormV4>[0])\n }\n return useFormV3(configuration as Parameters<typeof useFormV3>[0])\n}\n","/**\n * Field-metadata write/read API for the unified `attaform/zod` entry.\n *\n * Storage is shared with both adapters via `field-meta-store` — a\n * payload written here is visible to whichever adapter the unified\n * `useForm` dispatches to at runtime, regardless of Zod major. No\n * `zod` runtime import; the type-only `import type` is erased at\n * build, so `attaform/zod` carries no `z.registry` reference even\n * when consumed by a Zod 3 project without the Vite plugin alias.\n *\n * The native v4 chain `schema.register(fieldMeta, payload)` continues\n * to work — Zod 4's `.register()` only calls `.add(this, payload)`\n * structurally, satisfied by the shared store.\n */\nimport type { z } from 'zod'\nimport type { FieldMetaPayload } from '../../core/field-meta'\nimport { fieldMetaStore, getFieldMetaForSchema } from '../../core/field-meta-store'\n\n// Zod v4's `$ZodRegistry` class isn't surfaced under the `z` namespace\n// of the classic external entry, but `z.registry()` returns one — so\n// `ReturnType<typeof z.registry<T>>` resolves to the registry type\n// without needing a direct import. The `import type` keeps the\n// reference type-only; nothing about `z.registry` lands in the bundle.\ntype ZodFieldMetaRegistry = ReturnType<typeof z.registry<FieldMetaPayload>>\n\n/**\n * The shared registry every Attaform-aware Zod schema can register\n * field metadata against, regardless of major. Same instance the v3\n * and v4 adapter entries expose — write in one place, read from\n * any.\n *\n * Cast to Zod 4's `$ZodRegistry<FieldMetaPayload>` so the native\n * `schema.register(fieldMeta, payload)` chain type-checks for v4\n * users; the runtime call only needs `.add` structurally, which the\n * shared store provides.\n */\nexport const fieldMeta = fieldMetaStore as unknown as ZodFieldMetaRegistry\n\n/**\n * Attach `payload` to `schema` in the shared registry and return a\n * clone of `schema` so each call gets its own identity (the registry\n * keys on schema reference, so cloning prevents last-write-wins\n * collisions for sub-schemas reused at multiple paths).\n *\n * Works on both Zod 3 and Zod 4 schemas — branches on the runtime\n * shape of the schema:\n * - Zod 4 schemas expose a public `.clone()` method; we call it.\n * - Zod 3 schemas don't, so we reconstruct via\n * `new schema.constructor(schema._def)`.\n *\n * Both forms produce a fresh schema with the same effective\n * structure, so the registry slot is unique to this call site.\n */\nexport function withMeta<S>(schema: S, payload: FieldMetaPayload): S {\n const target = schema as object\n const existing = getFieldMetaForSchema(target) ?? {}\n const cloned = cloneSchema(schema)\n fieldMetaStore.add(cloned as object, { ...existing, ...payload })\n return cloned\n}\n\nfunction cloneSchema<S>(schema: S): S {\n const candidate = schema as { clone?: unknown; constructor: unknown; _def: unknown }\n if (typeof candidate.clone === 'function') {\n return (candidate.clone as () => S)()\n }\n // Zod 3 path: reconstruct via constructor + _def (no public\n // `.clone()` on v3).\n const Ctor = candidate.constructor as new (def: unknown) => S\n return new Ctor(candidate._def)\n}\n"],"names":["InvalidUseFormConfigError","useFormV4","useFormV3","fieldMetaStore","getFieldMetaForSchema"],"mappings":";;;;;;;;AAwCO,SAAS,mBAAmB,KAAA,EAAqC;AACtE,EAAA,IAAI,OAAO,KAAA,KAAU,QAAA,IAAY,KAAA,KAAU,MAAM,OAAO,KAAA;AACxD,EAAA,MAAM,MAAO,KAAA,CAA4B,GAAA;AACzC,EAAA,IAAI,OAAO,GAAA,KAAQ,QAAA,IAAY,GAAA,KAAQ,MAAM,OAAO,KAAA;AACpD,EAAA,OAAO,OAAQ,IAA2B,IAAA,KAAS,QAAA;AACrD;;ACwFO,SAAS,QAAQ,aAAA,EAAyB;AAC/C,EAAA,IACE,kBAAkB,MAAA,IAClB,aAAA,KAAkB,IAAA,IACjB,aAAA,CAAuC,WAAW,MAAA,EACnD;AACA,IAAA,MAAM,IAAIA,+BAAA,EAA0B;AAAA,EACtC;AACA,EAAA,MAAM,EAAE,QAAO,GAAI,aAAA;AACnB,EAAA,IAAI,kBAAA,CAAmB,MAAM,CAAA,EAAG;AAC9B,IAAA,OAAOC,cAAU,aAAgD,CAAA;AAAA,EACnE;AACA,EAAA,OAAOC,kBAAU,aAAgD,CAAA;AACnE;;AC9GO,MAAM,SAAA,GAAYC;AAiBlB,SAAS,QAAA,CAAY,QAAW,OAAA,EAA8B;AACnE,EAAA,MAAM,MAAA,GAAS,MAAA;AACf,EAAA,MAAM,QAAA,GAAWC,wCAAA,CAAsB,MAAM,CAAA,IAAK,EAAC;AACnD,EAAA,MAAM,MAAA,GAAS,YAAY,MAAM,CAAA;AACjC,EAAAD,iCAAA,CAAe,IAAI,MAAA,EAAkB,EAAE,GAAG,QAAA,EAAU,GAAG,SAAS,CAAA;AAChE,EAAA,OAAO,MAAA;AACT;AAEA,SAAS,YAAe,MAAA,EAAc;AACpC,EAAA,MAAM,SAAA,GAAY,MAAA;AAClB,EAAA,IAAI,OAAO,SAAA,CAAU,KAAA,KAAU,UAAA,EAAY;AACzC,IAAA,OAAQ,UAAU,KAAA,EAAkB;AAAA,EACtC;AAGA,EAAA,MAAM,OAAO,SAAA,CAAU,WAAA;AACvB,EAAA,OAAO,IAAI,IAAA,CAAK,SAAA,CAAU,IAAI,CAAA;AAChC;;;;;;;;;;;;;;"}
package/dist/zod.d.cts CHANGED
@@ -1,10 +1,10 @@
1
1
  import { z } from 'zod';
2
- import { S as StorageShape } from './shared/attaform.QvygsFGh.cjs';
3
- export { P as PathInput, a as PathOutput } from './shared/attaform.QvygsFGh.cjs';
4
- import { U as UnwrapZodObject, S as StorageShape$1 } from './shared/attaform.CBjmobqk.cjs';
5
- import { t as FormKey, ai as UseFormConfiguration, G as GenericForm, A as AbstractSchema, j as DefaultValuesInput, al as ValidateOnConfig, aj as UseFormReturnType, F as FieldMetaPayload } from './shared/attaform.C0uGZQ4M.cjs';
6
- export { ah as Unset, au as isUnset, aw as unset } from './shared/attaform.C0uGZQ4M.cjs';
7
- export { A as AggregateError, a as AnyForm, b as AttaformErrorCode, C as CompiledStep, F as FormStatus, I as InjectWizardInput, L as LazyMarker, e as StepSlot, U as UseRegisterReturn, f as UseWizardReturnType, W as WizardCtx, g as WizardCtxForm, h as WizardOnError, i as WizardOnSubmit, j as WizardOptions, k as WizardPersistFn, l as WizardRestoreFn, m as WizardRestoreState, n as WizardStatusesProxy, o as WizardSubmitContext, t as injectForm, u as injectWizard, w as lazy, x as useRegister, z as useWizard } from './shared/attaform.ePUcKxId.cjs';
2
+ import { S as StorageShape } from './shared/attaform.GbDo_lJi.cjs';
3
+ export { P as PathInput, a as PathOutput } from './shared/attaform.GbDo_lJi.cjs';
4
+ import { U as UnwrapZodObject, S as StorageShape$1 } from './shared/attaform.DSD85fHb.cjs';
5
+ import { t as FormKey, ai as UseFormConfiguration, G as GenericForm, A as AbstractSchema, j as DefaultValuesInput, al as ValidateOnConfig, aj as UseFormReturnType, F as FieldMetaPayload } from './shared/attaform.SfhU0OEY.cjs';
6
+ export { ah as Unset, au as isUnset, aw as unset } from './shared/attaform.SfhU0OEY.cjs';
7
+ export { A as AnyForm, a as AttaformErrorCode, C as CompiledStep, F as FormStatus, I as InjectWizardInput, L as LazyMarker, d as StepSlot, U as UseRegisterReturn, e as UseWizardReturnType, W as WizardAggregateError, f as WizardCtx, g as WizardCtxForm, h as WizardOnError, i as WizardOnSubmit, j as WizardOptions, k as WizardPersistFn, l as WizardRestoreFn, m as WizardRestoreState, n as WizardStatusesProxy, o as WizardSubmitContext, t as injectForm, u as injectWizard, w as lazy, x as useRegister, z as useWizard } from './shared/attaform.D5-1XGQU.cjs';
8
8
  import 'vue';
9
9
 
10
10
  /**
package/dist/zod.d.mts CHANGED
@@ -1,10 +1,10 @@
1
1
  import { z } from 'zod';
2
- import { S as StorageShape } from './shared/attaform.CRNA0vrd.mjs';
3
- export { P as PathInput, a as PathOutput } from './shared/attaform.CRNA0vrd.mjs';
4
- import { U as UnwrapZodObject, S as StorageShape$1 } from './shared/attaform.DXYHL99q.mjs';
5
- import { t as FormKey, ai as UseFormConfiguration, G as GenericForm, A as AbstractSchema, j as DefaultValuesInput, al as ValidateOnConfig, aj as UseFormReturnType, F as FieldMetaPayload } from './shared/attaform.C0uGZQ4M.mjs';
6
- export { ah as Unset, au as isUnset, aw as unset } from './shared/attaform.C0uGZQ4M.mjs';
7
- export { A as AggregateError, a as AnyForm, b as AttaformErrorCode, C as CompiledStep, F as FormStatus, I as InjectWizardInput, L as LazyMarker, e as StepSlot, U as UseRegisterReturn, f as UseWizardReturnType, W as WizardCtx, g as WizardCtxForm, h as WizardOnError, i as WizardOnSubmit, j as WizardOptions, k as WizardPersistFn, l as WizardRestoreFn, m as WizardRestoreState, n as WizardStatusesProxy, o as WizardSubmitContext, t as injectForm, u as injectWizard, w as lazy, x as useRegister, z as useWizard } from './shared/attaform.BtBmfLQN.mjs';
2
+ import { S as StorageShape } from './shared/attaform.DoKXru-a.mjs';
3
+ export { P as PathInput, a as PathOutput } from './shared/attaform.DoKXru-a.mjs';
4
+ import { U as UnwrapZodObject, S as StorageShape$1 } from './shared/attaform.DSD85fHb.mjs';
5
+ import { t as FormKey, ai as UseFormConfiguration, G as GenericForm, A as AbstractSchema, j as DefaultValuesInput, al as ValidateOnConfig, aj as UseFormReturnType, F as FieldMetaPayload } from './shared/attaform.SfhU0OEY.mjs';
6
+ export { ah as Unset, au as isUnset, aw as unset } from './shared/attaform.SfhU0OEY.mjs';
7
+ export { A as AnyForm, a as AttaformErrorCode, C as CompiledStep, F as FormStatus, I as InjectWizardInput, L as LazyMarker, d as StepSlot, U as UseRegisterReturn, e as UseWizardReturnType, W as WizardAggregateError, f as WizardCtx, g as WizardCtxForm, h as WizardOnError, i as WizardOnSubmit, j as WizardOptions, k as WizardPersistFn, l as WizardRestoreFn, m as WizardRestoreState, n as WizardStatusesProxy, o as WizardSubmitContext, t as injectForm, u as injectWizard, w as lazy, x as useRegister, z as useWizard } from './shared/attaform.EMzJcQci.mjs';
8
8
  import 'vue';
9
9
 
10
10
  /**
package/dist/zod.d.ts CHANGED
@@ -1,10 +1,10 @@
1
1
  import { z } from 'zod';
2
- import { S as StorageShape } from './shared/attaform.CJ-e9gYI.js';
3
- export { P as PathInput, a as PathOutput } from './shared/attaform.CJ-e9gYI.js';
4
- import { U as UnwrapZodObject, S as StorageShape$1 } from './shared/attaform.D4I63aBV.js';
5
- import { t as FormKey, ai as UseFormConfiguration, G as GenericForm, A as AbstractSchema, j as DefaultValuesInput, al as ValidateOnConfig, aj as UseFormReturnType, F as FieldMetaPayload } from './shared/attaform.C0uGZQ4M.js';
6
- export { ah as Unset, au as isUnset, aw as unset } from './shared/attaform.C0uGZQ4M.js';
7
- export { A as AggregateError, a as AnyForm, b as AttaformErrorCode, C as CompiledStep, F as FormStatus, I as InjectWizardInput, L as LazyMarker, e as StepSlot, U as UseRegisterReturn, f as UseWizardReturnType, W as WizardCtx, g as WizardCtxForm, h as WizardOnError, i as WizardOnSubmit, j as WizardOptions, k as WizardPersistFn, l as WizardRestoreFn, m as WizardRestoreState, n as WizardStatusesProxy, o as WizardSubmitContext, t as injectForm, u as injectWizard, w as lazy, x as useRegister, z as useWizard } from './shared/attaform.BTpuvGec.js';
2
+ import { S as StorageShape } from './shared/attaform.Dl5kDY-A.js';
3
+ export { P as PathInput, a as PathOutput } from './shared/attaform.Dl5kDY-A.js';
4
+ import { U as UnwrapZodObject, S as StorageShape$1 } from './shared/attaform.DSD85fHb.js';
5
+ import { t as FormKey, ai as UseFormConfiguration, G as GenericForm, A as AbstractSchema, j as DefaultValuesInput, al as ValidateOnConfig, aj as UseFormReturnType, F as FieldMetaPayload } from './shared/attaform.SfhU0OEY.js';
6
+ export { ah as Unset, au as isUnset, aw as unset } from './shared/attaform.SfhU0OEY.js';
7
+ export { A as AnyForm, a as AttaformErrorCode, C as CompiledStep, F as FormStatus, I as InjectWizardInput, L as LazyMarker, d as StepSlot, U as UseRegisterReturn, e as UseWizardReturnType, W as WizardAggregateError, f as WizardCtx, g as WizardCtxForm, h as WizardOnError, i as WizardOnSubmit, j as WizardOptions, k as WizardPersistFn, l as WizardRestoreFn, m as WizardRestoreState, n as WizardStatusesProxy, o as WizardSubmitContext, t as injectForm, u as injectWizard, w as lazy, x as useRegister, z as useWizard } from './shared/attaform.Bh3ACtts.js';
8
8
  import 'vue';
9
9
 
10
10
  /**
package/dist/zod.mjs CHANGED
@@ -1,9 +1,9 @@
1
- import { c as InvalidUseFormConfigError } from './shared/attaform.CrpjyXdO.mjs';
2
- export { J as useRegister } from './shared/attaform.CrpjyXdO.mjs';
3
- import { u as useForm$2 } from './shared/attaform.CiMqJHDm.mjs';
4
- import { u as useForm$1 } from './shared/attaform.a3uBo-gw.mjs';
5
- export { A as AttaformErrorCode, i as injectForm, c as injectWizard, f as isUnset, l as lazy, u as unset, m as useWizard } from './shared/attaform.BTi-PsHr.mjs';
6
- import { f as fieldMetaStore, g as getFieldMetaForSchema } from './shared/attaform.D13GMFgK.mjs';
1
+ import { d as InvalidUseFormConfigError } from './shared/attaform.BKozEdTr.mjs';
2
+ export { G as useRegister } from './shared/attaform.BKozEdTr.mjs';
3
+ import { u as useForm$2 } from './shared/attaform.D6CwqkPx.mjs';
4
+ import { u as useForm$1 } from './shared/attaform.iWo9soNX.mjs';
5
+ import { f as fieldMetaStore, g as getFieldMetaForSchema } from './shared/attaform.tVkmQh5w.mjs';
6
+ export { A as AttaformErrorCode, i as injectForm, c as injectWizard, f as isUnset, l as lazy, u as unset, p as useWizard } from './shared/attaform.BqZuwLTK.mjs';
7
7
 
8
8
  function isZodV4SchemaShape(value) {
9
9
  if (typeof value !== "object" || value === null) return false;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "attaform",
3
- "version": "0.19.0",
3
+ "version": "0.20.1",
4
4
  "main": "./dist/index.mjs",
5
5
  "types": "./dist/index.d.mts",
6
6
  "files": [
@@ -115,6 +115,7 @@
115
115
  "changelogen": "^0.6.2",
116
116
  "cheerio": "^1.2.0",
117
117
  "chokidar-cli": "^3.0.0",
118
+ "devalue": "^5.8.1",
118
119
  "eslint": "^10.2.1",
119
120
  "eslint-config-prettier": "^10.1.8",
120
121
  "eslint-plugin-prettier": "^5.5.5",