attaform 0.26.0 → 0.27.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 (163) hide show
  1. package/README.md +21 -11
  2. package/bin/attaform.mjs +125 -0
  3. package/dist/abstract.cjs +47 -0
  4. package/dist/abstract.cjs.map +1 -0
  5. package/dist/abstract.d.cts +42 -0
  6. package/dist/abstract.d.mts +42 -0
  7. package/dist/abstract.d.ts +42 -0
  8. package/dist/abstract.mjs +4 -0
  9. package/dist/abstract.mjs.map +1 -0
  10. package/dist/chunks/devtools.cjs +2 -2
  11. package/dist/chunks/devtools.cjs.map +1 -1
  12. package/dist/chunks/devtools.mjs +1 -1
  13. package/dist/chunks/fingerprint2.cjs +1 -1
  14. package/dist/chunks/fingerprint2.mjs +1 -1
  15. package/dist/esbuild.cjs +2 -2
  16. package/dist/esbuild.cjs.map +1 -1
  17. package/dist/esbuild.d.cts +3 -3
  18. package/dist/esbuild.d.mts +3 -3
  19. package/dist/esbuild.d.ts +3 -3
  20. package/dist/esbuild.mjs +2 -2
  21. package/dist/esbuild.mjs.map +1 -1
  22. package/dist/index.cjs +41 -56
  23. package/dist/index.cjs.map +1 -1
  24. package/dist/index.d.cts +194 -282
  25. package/dist/index.d.mts +194 -282
  26. package/dist/index.d.ts +194 -282
  27. package/dist/index.mjs +4 -25
  28. package/dist/index.mjs.map +1 -1
  29. package/dist/nuxt.cjs +3 -1
  30. package/dist/nuxt.cjs.map +1 -1
  31. package/dist/nuxt.d.cts +17 -4
  32. package/dist/nuxt.d.mts +17 -4
  33. package/dist/nuxt.d.ts +17 -4
  34. package/dist/nuxt.mjs +4 -2
  35. package/dist/nuxt.mjs.map +1 -1
  36. package/dist/rollup.cjs +2 -2
  37. package/dist/rollup.cjs.map +1 -1
  38. package/dist/rollup.d.cts +3 -3
  39. package/dist/rollup.d.mts +3 -3
  40. package/dist/rollup.d.ts +3 -3
  41. package/dist/rollup.mjs +2 -2
  42. package/dist/rollup.mjs.map +1 -1
  43. package/dist/rspack.cjs +1 -1
  44. package/dist/rspack.d.cts +1 -1
  45. package/dist/rspack.d.mts +1 -1
  46. package/dist/rspack.d.ts +1 -1
  47. package/dist/rspack.mjs +1 -1
  48. package/dist/runtime/plugins/attaform.cjs +4 -5
  49. package/dist/runtime/plugins/attaform.cjs.map +1 -1
  50. package/dist/runtime/plugins/attaform.mjs +1 -2
  51. package/dist/runtime/plugins/attaform.mjs.map +1 -1
  52. package/dist/shared/{attaform.BRzKBj2g.cjs → attaform.8tFZu1Ub.cjs} +2 -2
  53. package/dist/shared/{attaform.BRzKBj2g.cjs.map → attaform.8tFZu1Ub.cjs.map} +1 -1
  54. package/dist/shared/{attaform.k9V0py0s.mjs → attaform.BERt5YMU.mjs} +2 -2
  55. package/dist/shared/{attaform.k9V0py0s.mjs.map → attaform.BERt5YMU.mjs.map} +1 -1
  56. package/dist/shared/{attaform.DSOIz08n.mjs → attaform.BceJrhQ7.mjs} +5 -5
  57. package/dist/shared/{attaform.DSOIz08n.mjs.map → attaform.BceJrhQ7.mjs.map} +1 -1
  58. package/dist/shared/{attaform.DBNjHgNj.d.cts → attaform.C3WnCDXz.d.cts} +11 -9
  59. package/dist/shared/{attaform.DBNjHgNj.d.mts → attaform.C3WnCDXz.d.mts} +11 -9
  60. package/dist/shared/{attaform.DBNjHgNj.d.ts → attaform.C3WnCDXz.d.ts} +11 -9
  61. package/dist/shared/{attaform.DuzQYscR.d.mts → attaform.C9fPTxjB.d.cts} +5 -5
  62. package/dist/shared/{attaform.DuzQYscR.d.ts → attaform.C9fPTxjB.d.mts} +5 -5
  63. package/dist/shared/{attaform.DuzQYscR.d.cts → attaform.C9fPTxjB.d.ts} +5 -5
  64. package/dist/shared/{attaform.Be5otUVw.d.ts → attaform.CC_y1_Ej.d.ts} +33 -33
  65. package/dist/shared/{attaform.ceYeVkjn.d.ts → attaform.CEXUlUkc.d.ts} +1579 -1192
  66. package/dist/shared/{attaform.tZ0YKisf.cjs → attaform.C__F01CE.cjs} +15 -15
  67. package/dist/shared/{attaform.tZ0YKisf.cjs.map → attaform.C__F01CE.cjs.map} +1 -1
  68. package/dist/shared/{attaform.BPl-ECRT.cjs → attaform.Co5LNRnv.cjs} +162 -129
  69. package/dist/shared/attaform.Co5LNRnv.cjs.map +1 -0
  70. package/dist/shared/{attaform.B71rfNL5.d.mts → attaform.CpXHK60W.d.cts} +33 -33
  71. package/dist/shared/{attaform.BFfY7HRI.d.cts → attaform.CvVYOvZF.d.mts} +33 -33
  72. package/dist/shared/{attaform.BoYqnIPI.mjs → attaform.CyQxTOdX.mjs} +55 -36
  73. package/dist/shared/attaform.CyQxTOdX.mjs.map +1 -0
  74. package/dist/shared/{attaform.CEY_WLRJ.d.mts → attaform.D99pd7JG.d.cts} +1579 -1192
  75. package/dist/shared/{attaform.CXVmZtFq.mjs → attaform.DDAmSFnl.mjs} +4 -4
  76. package/dist/shared/{attaform.CXVmZtFq.mjs.map → attaform.DDAmSFnl.mjs.map} +1 -1
  77. package/dist/shared/{attaform.Du9RZp8m.cjs → attaform.DQT7_-FO.cjs} +272 -252
  78. package/dist/shared/attaform.DQT7_-FO.cjs.map +1 -0
  79. package/dist/shared/{attaform.DGhIix5D.mjs → attaform.Da8EdI2t.mjs} +160 -129
  80. package/dist/shared/attaform.Da8EdI2t.mjs.map +1 -0
  81. package/dist/shared/{attaform.Cs0UZ7q6.cjs → attaform.DhVgG2jh.cjs} +16 -16
  82. package/dist/shared/{attaform.Cs0UZ7q6.cjs.map → attaform.DhVgG2jh.cjs.map} +1 -1
  83. package/dist/shared/{attaform.sHkHv_98.mjs → attaform.DhnPb6nK.mjs} +6 -3
  84. package/dist/shared/attaform.DhnPb6nK.mjs.map +1 -0
  85. package/dist/shared/attaform.DkD0DR7R.mjs +42 -0
  86. package/dist/shared/attaform.DkD0DR7R.mjs.map +1 -0
  87. package/dist/shared/{attaform.CSXDW2tO.mjs → attaform.DlSu08F5.mjs} +4 -4
  88. package/dist/shared/{attaform.CSXDW2tO.mjs.map → attaform.DlSu08F5.mjs.map} +1 -1
  89. package/dist/shared/{attaform.LEWUFqUw.cjs → attaform.DoQm_Vkd.cjs} +7 -3
  90. package/dist/shared/attaform.DoQm_Vkd.cjs.map +1 -0
  91. package/dist/shared/{attaform.BQflyVOL.cjs → attaform.Drsi43GG.cjs} +19 -19
  92. package/dist/shared/{attaform.BQflyVOL.cjs.map → attaform.Drsi43GG.cjs.map} +1 -1
  93. package/dist/shared/attaform.K6Thc6By.cjs +46 -0
  94. package/dist/shared/attaform.K6Thc6By.cjs.map +1 -0
  95. package/dist/shared/{attaform.Vp2-CWZB.mjs → attaform.KvlEedlF.mjs} +3 -3
  96. package/dist/shared/{attaform.Vp2-CWZB.mjs.map → attaform.KvlEedlF.mjs.map} +1 -1
  97. package/dist/shared/{attaform.BRGIpZo4.cjs → attaform.RaTzp1WF.cjs} +3 -3
  98. package/dist/shared/attaform.RaTzp1WF.cjs.map +1 -0
  99. package/dist/shared/{attaform.MgaYKlPP.d.cts → attaform.kBkYlKP_.d.mts} +1579 -1192
  100. package/dist/shared/{attaform.C3Doa9Pt.mjs → attaform.v0fQtWyA.mjs} +3 -3
  101. package/dist/shared/attaform.v0fQtWyA.mjs.map +1 -0
  102. package/dist/shared/{attaform.ZXZ6dH72.cjs → attaform.yUrz7C2z.cjs} +3 -3
  103. package/dist/shared/{attaform.ZXZ6dH72.cjs.map → attaform.yUrz7C2z.cjs.map} +1 -1
  104. package/dist/transforms.cjs +1 -1
  105. package/dist/transforms.mjs +1 -1
  106. package/dist/vite.cjs +21 -3
  107. package/dist/vite.cjs.map +1 -1
  108. package/dist/vite.d.cts +70 -17
  109. package/dist/vite.d.mts +70 -17
  110. package/dist/vite.d.ts +70 -17
  111. package/dist/vite.mjs +20 -4
  112. package/dist/vite.mjs.map +1 -1
  113. package/dist/webpack.cjs +1 -1
  114. package/dist/webpack.d.cts +1 -1
  115. package/dist/webpack.d.mts +1 -1
  116. package/dist/webpack.d.ts +1 -1
  117. package/dist/webpack.mjs +1 -1
  118. package/dist/zod-v3.cjs +41 -10
  119. package/dist/zod-v3.cjs.map +1 -1
  120. package/dist/zod-v3.d.cts +5 -5
  121. package/dist/zod-v3.d.mts +5 -5
  122. package/dist/zod-v3.d.ts +5 -5
  123. package/dist/zod-v3.mjs +4 -2
  124. package/dist/zod-v3.mjs.map +1 -1
  125. package/dist/zod-v4.cjs +41 -10
  126. package/dist/zod-v4.cjs.map +1 -1
  127. package/dist/zod-v4.d.cts +7 -7
  128. package/dist/zod-v4.d.mts +7 -7
  129. package/dist/zod-v4.d.ts +7 -7
  130. package/dist/zod-v4.mjs +4 -2
  131. package/dist/zod-v4.mjs.map +1 -1
  132. package/dist/zod.cjs +44 -49
  133. package/dist/zod.cjs.map +1 -1
  134. package/dist/zod.d.cts +6 -248
  135. package/dist/zod.d.mts +6 -248
  136. package/dist/zod.d.ts +6 -248
  137. package/dist/zod.mjs +4 -42
  138. package/dist/zod.mjs.map +1 -1
  139. package/package.json +12 -2
  140. package/skills/attaform/SKILL.md +128 -0
  141. package/skills/attaform/references/custom-components.md +72 -0
  142. package/skills/attaform/references/errors.md +62 -0
  143. package/skills/attaform/references/ssr.md +26 -0
  144. package/skills/attaform/references/validation.md +40 -0
  145. package/skills/attaform/references/wizards.md +104 -0
  146. package/dist/shared/attaform.55hFR_cl.d.ts +0 -97
  147. package/dist/shared/attaform.BPl-ECRT.cjs.map +0 -1
  148. package/dist/shared/attaform.BRGIpZo4.cjs.map +0 -1
  149. package/dist/shared/attaform.BoYqnIPI.mjs.map +0 -1
  150. package/dist/shared/attaform.C3Doa9Pt.mjs.map +0 -1
  151. package/dist/shared/attaform.D51IwDtP.cjs +0 -39
  152. package/dist/shared/attaform.D51IwDtP.cjs.map +0 -1
  153. package/dist/shared/attaform.DGhIix5D.mjs.map +0 -1
  154. package/dist/shared/attaform.DJRz_bzM.d.cts +0 -97
  155. package/dist/shared/attaform.Du9RZp8m.cjs.map +0 -1
  156. package/dist/shared/attaform.JPsaqjLl.d.mts +0 -97
  157. package/dist/shared/attaform.LEWUFqUw.cjs.map +0 -1
  158. package/dist/shared/attaform.NqYEzRcM.mjs +0 -35
  159. package/dist/shared/attaform.NqYEzRcM.mjs.map +0 -1
  160. package/dist/shared/attaform.sHkHv_98.mjs.map +0 -1
  161. package/dist/shared/{attaform.DdjDqTah.d.ts → attaform.DRUT703x.d.cts} +14 -14
  162. package/dist/shared/{attaform.DdjDqTah.d.cts → attaform.DRUT703x.d.mts} +14 -14
  163. package/dist/shared/{attaform.DdjDqTah.d.mts → attaform.DRUT703x.d.ts} +14 -14
package/dist/index.d.cts CHANGED
@@ -1,337 +1,249 @@
1
- import { Plugin, App } from 'vue';
2
- import { S as SSRDetectOptions, a as SerializedFormData, A as AttaformRegistry } from './shared/attaform.MgaYKlPP.cjs';
3
- export { b as AnyForm, c 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, p as createRegistry, q as defaultCoercionRules, r as defineCoercion, s as getRegistryFromApp, t as injectForm, u as injectWizard, v as kAttaformRegistry, w as lazy, x as useRegister, y as useRegistry, z as useWizard } from './shared/attaform.MgaYKlPP.cjs';
4
- import { A as AttaformDefaults, F as FormKey, G as GenericForm, U as UseFormConfiguration, a as AbstractSchema, D as DefaultValuesInput, b as UseFormReturnType, R as RegisterModelDynamicCustomDirective, c as RegisterValue, d as GetDisplayState } from './shared/attaform.DBNjHgNj.cjs';
5
- export { e as ArrayItem, f as ArrayPath, C as CoercionEntry, g as CoercionRegistry, h as CoercionResult, i as CustomDirectiveRegisterAssignerFn, j as DeepPartial, k as DefaultValuesResponse, l as DefaultValuesShape, m as DisplayCtx, n as DisplayMachine, o as DisplayState, E as ErrorInput, p as ErrorsProxyShape, q as FieldMetaPayload, r as FieldState, s as FieldStateMap, t as FieldStateMapEntry, u as FlatPath, v as FormErrorRecord, w as FormErrorsSurface, x as FormMeta, H as HandleSubmit, y as HistoryConfig, I as IsTuple, z as IsUnion, J as JoinSegments, B as Json, K as KeyofUnion, L as LiftedValueShape, M as MetaTrackerValue, N as NestedReadType, O as NestedType, P as OnError, Q as OnInvalidSubmitPolicy, S as OnSubmit, T as PartialFlatPath, V as Path, W as PathKey, X as PendingValidationStatus, Y as Primitive, Z as ROOT_PATH, _ as ROOT_PATH_KEY, $ as ReactiveValidationStatus, a0 as RegisterDirective, a1 as RegisterFlatPath, a2 as RegisterOptions, a3 as RegisterSelectModifier, a4 as RegisterTextModifier, a5 as RegisterTransform, a6 as Segment, a7 as SetValueCallback, a8 as SetValuePayload, a9 as SettledValidationStatus, aa as SlimPrimitiveKind, ab as SlimRuntimeOf, ac as SubmitHandler, ad as Unset, ae as ValidateOn, af as ValidateOnConfig, ag as ValidationError, ah as ValidationResponse, ai as ValidationResponseWithoutValue, aj as ValueOfUnion, ak as WriteMeta, al as WriteShape, am as canonicalizePath, an as isPathPrefix, ao as isUnset, ap as parseDottedPath, aq as unset } from './shared/attaform.DBNjHgNj.cjs';
6
- export { A as AttaformError, I as InvalidPathError, a as InvalidUseFormConfigError, O as OutsideSetupError, R as RegistryNotInstalledError, b as ReservedFormKeyError, S as SubmitErrorHandlerError } from './shared/attaform.DJRz_bzM.cjs';
1
+ export { a as AnyForm, b as AttaformDevtoolsBridge, c as AttaformError, d as AttaformErrorCode, e as AttaformPluginOptions, A as AttaformRegistry, C as CompiledStep, D as DEFAULT_TIMINGS, f as DEVTOOLS_WINDOW_KEY, g as DisplayTimings, F as FormStatus, I as InjectWizardInput, h as InvalidPathError, i as InvalidUseFormConfigError, L as LazyMarker, O as OutsideSetupError, R as RegistryNotInstalledError, j as ReservedFormKeyError, S as SerializedAttaformState, k as SerializedFormData, l as StepSlot, m as SubmitErrorHandlerError, U as UseRegisterReturn, n as UseWizardReturnType, W as WizardAggregateError, o as WizardCtx, p as WizardCtxForm, q as WizardOnError, r as WizardOnSubmit, s as WizardOptions, t as WizardPersistFn, u as WizardRestoreFn, v as WizardRestoreState, w as WizardStatusesProxy, x as WizardSubmitContext, y as assignKey, z as createAttaform, B as createRegistry, E as defaultCoercionRules, G as defaultDisplayState, H as defineCoercion, J as escapeForInlineScript, K as getRegistryFromApp, M as hydrateAttaformState, N as injectForm, P as injectWizard, Q as isRegisterValue, T as kAttaformRegistry, V as lazy, X as makeDefaultDisplayState, Y as renderAttaformState, Z as useRegister, _ as useRegistry, $ as useWizard, a0 as vRegister } from './shared/attaform.D99pd7JG.cjs';
2
+ import { G as GenericForm, F as FormKey, U as UseFormConfiguration, A as AbstractSchema, aq as AcceptableDefaults, ae as ValidateOnConfig, a as UseFormReturnType, D as DefaultValuesInput, o as FieldMetaPayload } from './shared/attaform.C3WnCDXz.cjs';
3
+ export { b as ArrayItem, c as ArrayPath, d as AttaformDefaults, C as CoercionEntry, e as CoercionRegistry, f as CoercionResult, g as CustomDirectiveRegisterAssignerFn, h as DeepPartial, i as DefaultValuesResponse, j as DefaultValuesShape, k as DisplayCtx, l as DisplayMachine, m as DisplayState, E as ErrorInput, n as ErrorsProxyShape, p as FieldState, q as FieldStateMap, r as FieldStateMapEntry, s as FlatPath, t as FormErrorRecord, u as FormErrorsSurface, v as FormMeta, w as GetDisplayState, H as HandleSubmit, x as HistoryConfig, I as IsTuple, y as IsUnion, J as JoinSegments, z as Json, K as KeyofUnion, L as LiftedValueShape, M as MetaTrackerValue, N as NestedReadType, B as NestedType, O as OnError, P as OnInvalidSubmitPolicy, Q as OnSubmit, R as PartialFlatPath, S as Path, T as PathKey, V as PendingValidationStatus, W as Primitive, X as ROOT_PATH, Y as ROOT_PATH_KEY, Z as ReactiveValidationStatus, _ as RegisterDirective, $ as RegisterFlatPath, a0 as RegisterOptions, a1 as RegisterSelectModifier, a2 as RegisterTextModifier, a3 as RegisterTransform, a4 as RegisterValue, a5 as Segment, a6 as SetValueCallback, a7 as SetValuePayload, a8 as SettledValidationStatus, a9 as SlimPrimitiveKind, aa as SlimRuntimeOf, ab as SubmitHandler, ac as Unset, ad as ValidateOn, af as ValidationError, ag as ValidationResponse, ah as ValidationResponseWithoutValue, ai as ValueOfUnion, aj as WriteMeta, ak as WriteShape, al as canonicalizePath, am as isPathPrefix, an as isUnset, ao as parseDottedPath, ap as unset } from './shared/attaform.C3WnCDXz.cjs';
4
+ import { S as SupportedRootSchema, b as StorageShape } from './shared/attaform.CpXHK60W.cjs';
5
+ export { P as PathInput, a as PathOutput } from './shared/attaform.CpXHK60W.cjs';
6
+ import { S as SupportedRootSchema$1, U as UnwrapZodRoot, a as StorageShape$1 } from './shared/attaform.DRUT703x.cjs';
7
+ import { z } from 'zod';
8
+ import 'vue';
7
9
 
8
10
  /**
9
- * Options for `createAttaform()`.
10
- */
11
- type AttaformPluginOptions = SSRDetectOptions & {
12
- /**
13
- * Whether to install the Vue DevTools integration. Default `true`.
14
- * The integration is dev-only: the `import('./devtools')` sits behind
15
- * the `__DEV__` flag, so a consumer's production build folds it out
16
- * entirely (no devtools chunk shipped, no fetch attempted). In
17
- * development the DevTools peer is loaded lazily and a missing peer
18
- * fails silently. Pass `false` to skip the integration even in dev.
19
- */
20
- devtools?: boolean;
21
- /**
22
- * App-level defaults applied to every `useForm` call in this app.
23
- * Per-form options always win. See `AttaformDefaults` for
24
- * the supported option set and the merge rules.
25
- *
26
- * ```ts
27
- * app.use(
28
- * createAttaform({
29
- * defaults: { debounceMs: 100 },
30
- * })
31
- * )
32
- * ```
33
- */
34
- defaults?: AttaformDefaults;
11
+ * Type-level Zod-major discriminator for the unified `attaform/zod`
12
+ * entry. The runtime dispatch (`use-form.ts`'s impl) already routes on
13
+ * the schema's shape via `isZodV4SchemaShape`; this is the type-level
14
+ * mirror so the overloads and projection helpers discriminate the same
15
+ * way.
16
+ *
17
+ * Why a structural marker instead of `z.ZodObject`: the unified entry's
18
+ * overloads constrain on `z.ZodObject`, but the published `.d.mts`
19
+ * resolves `z` against whichever single Zod major the consumer
20
+ * installed. In a v3-only install `z.ZodObject` is v3's `ZodObject`
21
+ * (and, lacking its required type arguments, degrades to an `any`-like
22
+ * error type under `skipLibCheck`), so a v3 schema satisfies the v4
23
+ * overload's constraint and binds it — collapsing the read slot to
24
+ * `never`. A Zod v4 schema carries the `_zod` internals brand; a v3
25
+ * schema never does.
26
+ * Intersecting a v4-only constraint or conditional branch with this
27
+ * marker keeps it unreachable for a v3 schema regardless of how `zod`
28
+ * resolves, so v3 schemas fall through to the v3 overload.
29
+ *
30
+ * Distinct from `core/zod-shape.ts`'s runtime `ZodV4Shape` (which reads
31
+ * the public `def` getter): at the type level the stable v4 brand is
32
+ * `_zod.def`, the same internals `StorageShape` (v4) already reads.
33
+ *
34
+ * Pairing requirement: a v4 overload/branch must constrain on
35
+ * `z.ZodObject<z.ZodRawShape> & ZodV4Internals`, NOT bare
36
+ * `z.ZodObject & ZodV4Internals`. In a v3-only install `z.ZodObject`
37
+ * with no type argument is `ZodObject<T, ...>` missing its required
38
+ * arguments — an error type that behaves like `any` under
39
+ * `skipLibCheck`, so `any & ZodV4Internals` collapses back to `any` and
40
+ * the marker stops excluding v3 schemas. Supplying `z.ZodRawShape`
41
+ * keeps it a concrete object type in both majors, so the intersection
42
+ * stays meaningful.
43
+ */
44
+ type ZodV4Internals = {
45
+ _zod: {
46
+ def: unknown;
47
+ };
35
48
  };
49
+
36
50
  /**
37
- * Create the Vue plugin that installs the form library on a Vue
38
- * application. Required only when you want app-wide options
39
- * (`defaults`, `devtools: false`, `ssr: true`) for the default
40
- * setup, `useForm` / `injectForm` / `useRegister` lazy-install the
41
- * registry on first use.
42
- *
43
- * ```ts
44
- * import { createApp } from 'vue'
45
- * import { createAttaform } from 'attaform'
51
+ * Per-major projection helpers shared by the unified `attaform/zod`
52
+ * entry. Each maps an arbitrary Zod v4 OR v3 object schema to the
53
+ * `GenericForm`-shaped input / output / storage-read projections the
54
+ * form types are parameterised over. The constraint on each alias scopes
55
+ * `S` to one Zod major, so the projection is a direct read with no
56
+ * dispatch in the type body.
46
57
  *
47
- * createApp(App)
48
- * .use(createAttaform({ defaults: { debounceMs: 100 } }))
49
- * .mount('#app')
50
- * ```
51
- *
52
- * Under SSR with bare Vue 3, install explicitly with `{ ssr: true }`
53
- * from your server entry — the SSR serialization helpers
54
- * (`renderAttaformState` / `hydrateAttaformState`) require an
55
- * already-attached registry and don't trigger lazy install. Under
56
- * Nuxt, install via `attaform/nuxt` instead — the Nuxt module wires
57
- * both server and client automatically.
58
- *
59
- * Installing more than once on the same app is a no-op (the second
60
- * call logs a dev-mode warning).
58
+ * Hoisted out of `types-unified.ts` and `use-form.ts` so the two entry
59
+ * points share one definition. Internal consumer code never reaches
60
+ * for these; the overloaded `useForm` already gives full inference at
61
+ * call sites.
61
62
  */
62
- declare function createAttaform(options?: AttaformPluginOptions): Plugin;
63
63
 
64
64
  /**
65
- * Serialised snapshot of every form in a Vue app, produced by
66
- * `renderAttaformState` and consumed by `hydrateAttaformState`.
67
- *
68
- * JSON-safe pass to `JSON.stringify`, `devalue`, or any other
69
- * serialiser before embedding in your SSR payload.
70
- */
71
- type SerializedAttaformState = {
72
- /** Tuples of `[formKey, snapshot]` for every form in the app. */
73
- readonly forms: ReadonlyArray<readonly [FormKey, SerializedFormData]>;
74
- };
65
+ * The schema's own input type, exactly as a consumer would reference it
66
+ * (`z.input<S>`) NOT routed through `GenericForm` / `UnwrapZodRoot`. This
67
+ * is the reflexive escape arm `AcceptableDefaults` adds to the
68
+ * `defaultValues` slot so a generic form wrapper forwarding `z.input<S>`
69
+ * type-checks under a free `S` (#422). It must stay syntactically identical
70
+ * to what the wrapper forwards: wrapping it in a conditional makes it a
71
+ * deferred conditional that no longer matches the forwarded value under a
72
+ * generic. Wrong-major schemas can't actually bind the slot — they are
73
+ * rejected at the overload's `schema` constraint — so the raw input never
74
+ * widens the slot for the wrong major.
75
+ */
76
+ type V4SchemaInput<S extends SupportedRootSchema> = z.input<S>;
77
+ type V3SchemaInput<S extends SupportedRootSchema$1> = z.input<S>;
78
+ type V4FormOf<S extends SupportedRootSchema> = z.input<S> extends GenericForm ? z.input<S> : never;
79
+ type V4OutOf<S extends SupportedRootSchema> = z.output<S> extends GenericForm ? z.output<S> : never;
80
+ type V4ReadOf<S extends SupportedRootSchema> = StorageShape<S> extends GenericForm ? StorageShape<S> : never;
81
+ type V3FormOf<S extends SupportedRootSchema$1> = z.input<UnwrapZodRoot<S>> extends GenericForm ? z.input<UnwrapZodRoot<S>> : never;
82
+ type V3OutOf<S extends SupportedRootSchema$1> = z.output<UnwrapZodRoot<S>> extends GenericForm ? z.output<UnwrapZodRoot<S>> : never;
83
+ type V3ReadOf<S extends SupportedRootSchema$1> = StorageShape$1<UnwrapZodRoot<S>> extends GenericForm ? StorageShape$1<UnwrapZodRoot<S>> : never;
84
+
75
85
  /**
76
- * Snapshot every form on a Vue app for SSR. Call from your server
77
- * entry after rendering the app:
86
+ * Create a form bound to a Zod v4 schema.
78
87
  *
79
88
  * ```ts
80
- * import { renderToString } from '@vue/server-renderer'
81
- * import { renderAttaformState, escapeForInlineScript } from 'attaform'
82
- *
83
- * const html = await renderToString(app)
84
- * const state = renderAttaformState(app)
85
- * const payload = escapeForInlineScript(JSON.stringify(state))
89
+ * import { useForm } from 'attaform/zod'
90
+ * import { z } from 'zod'
86
91
  *
87
- * return `
88
- * ${html}
89
- * <script>window.__ATTAFORM_STATE__ = ${payload}</script>
90
- * `
92
+ * const form = useForm({
93
+ * schema: z.object({
94
+ * username: z.string().min(2, 'At least 2 characters'),
95
+ * password: z.string().min(8, 'At least 8 characters'),
96
+ * }),
97
+ * })
91
98
  * ```
92
99
  *
93
- * Pair with `hydrateAttaformState` on the client to restore the
94
- * forms in their server-rendered state. Nuxt users don't need this
95
- * `attaform/nuxt` wires SSR automatically.
100
+ * The constraint intersects `ZodV4Internals` (the v4-only `_zod`
101
+ * brand) so a v3 schema can't bind this overload even when `z`
102
+ * resolves to v3 in a single-major consumer install; v3 schemas fall
103
+ * through to the v3 overload below. See `types-zod-major.ts`.
96
104
  */
97
- declare function renderAttaformState(app: App): SerializedAttaformState;
105
+ declare function useForm<Schema extends SupportedRootSchema & ZodV4Internals, K extends FormKey = FormKey>(configuration: Omit<UseFormConfiguration<V4FormOf<Schema>, V4OutOf<Schema>, AbstractSchema<V4FormOf<Schema>, V4OutOf<Schema>>, never, K>, 'schema' | 'validateOn' | 'debounceMs' | 'defaultValues'> & {
106
+ schema: Schema;
107
+ defaultValues?: AcceptableDefaults<V4FormOf<Schema>, V4SchemaInput<Schema>>;
108
+ } & ValidateOnConfig): UseFormReturnType<V4FormOf<Schema>, V4OutOf<Schema>, V4ReadOf<Schema>, K>;
98
109
  /**
99
- * Restore forms from a server-rendered snapshot on the client. Call
100
- * from your client entry before mounting:
110
+ * Create a form bound to a Zod v3 schema.
101
111
  *
102
112
  * ```ts
103
- * import { createApp } from 'vue'
104
- * import { createAttaform, hydrateAttaformState } from 'attaform'
113
+ * import { useForm } from 'attaform/zod'
114
+ * import { z } from 'zod-v3'
105
115
  *
106
- * const app = createApp(App).use(createAttaform())
107
- * hydrateAttaformState(app, window.__ATTAFORM_STATE__)
108
- * app.mount('#app')
116
+ * const form = useForm({
117
+ * schema: z.object({
118
+ * username: z.string().min(2, 'At least 2 characters'),
119
+ * password: z.string().min(8, 'At least 8 characters'),
120
+ * }),
121
+ * })
109
122
  * ```
110
123
  *
111
- * The next `useForm({ key })` call for each serialised form picks up
112
- * the snapshot transparently no further action is required.
124
+ * v3 schemas match this overload; v4 schemas hit the v4 overload
125
+ * above first and never reach here.
113
126
  */
114
- declare function hydrateAttaformState(app: App, payload: SerializedAttaformState): void;
127
+ declare function useForm<Schema extends SupportedRootSchema$1, K extends FormKey = FormKey>(configuration: Omit<UseFormConfiguration<V3FormOf<Schema>, V3OutOf<Schema>, AbstractSchema<V3FormOf<Schema>, V3OutOf<Schema>>, never, K>, 'schema' | 'validateOn' | 'debounceMs' | 'defaultValues'> & {
128
+ schema: Schema;
129
+ defaultValues?: AcceptableDefaults<V3FormOf<Schema>, V3SchemaInput<Schema>>;
130
+ } & ValidateOnConfig): UseFormReturnType<V3FormOf<Schema>, V3OutOf<Schema>, V3ReadOf<Schema>, K>;
115
131
 
116
132
  /**
117
- * Escape a JSON string so it's safe to embed inside an inline
118
- * `<script>` tag during SSR. Plain `JSON.stringify` is not safe — a
119
- * form value containing the literal substring `</script>` would
120
- * break out of the script tag.
133
+ * Type-level helpers for the unified `attaform/zod` entry. These give
134
+ * tests and other type-query call sites a deterministic projection
135
+ * over an arbitrary v4 OR v3 schema, sidestepping the brittle
136
+ * instantiation-expression resolution rules TypeScript applies to
137
+ * overloaded functions (`typeof useForm<X>` can pick the wrong
138
+ * overload or the impl signature, depending on whether the type
139
+ * argument is a concrete schema, a generic, or a constraint).
121
140
  *
122
- * ```ts
123
- * const payload = escapeForInlineScript(JSON.stringify(renderAttaformState(app)))
124
- * // `<script>window.__ATTAFORM_STATE__ = ${payload}</script>` is safe.
125
- * ```
141
+ * The helpers dispatch ONCE per use site via a binary conditional —
142
+ * no stacking, no amplification across the return type. Equivalent
143
+ * to writing `ReturnType<typeof useForm<S>>` but cache-stable across
144
+ * call patterns.
126
145
  *
127
- * Output remains valid JSON `JSON.parse` round-trips back to the
128
- * original value on the client.
146
+ * Per `inference-first DX`, these helpers are test- and
147
+ * internal-facing. Consumer code shouldn't reach for them — the
148
+ * overloaded `useForm` already gives full inference at call sites.
129
149
  */
130
- declare function escapeForInlineScript(json: string): string;
131
150
 
132
151
  /**
133
- * Schema-agnostic `useForm`. Accepts any object that implements
134
- * `AbstractSchema` useful when integrating a custom schema
135
- * adapter or a third-party validation library.
136
- *
137
- * ```ts
138
- * import { useForm } from 'attaform'
139
- *
140
- * const form = useForm({
141
- * schema: myCustomAdapter,
142
- * defaultValues: { name: '' },
143
- * })
144
- * ```
145
- *
146
- * Most consumers prefer a typed entry point that wraps the underlying
147
- * library's schema with the matching adapter automatically; see the
148
- * subpath documentation for the available adapters.
149
- *
150
- * Returns the same form API as the typed entry points; see
151
- * `UseFormReturnType` for the full surface.
152
+ * Direct V4 projection no major-dispatch. Use when the schema's
153
+ * Zod major is known statically (typical for V4 generic helpers like
154
+ * `function setup<S extends z.ZodObject>(s: S)`). TS simplifies the
155
+ * helper cleanly under generic constraints because no conditional
156
+ * is present.
152
157
  */
153
- declare function useAbstractForm<Form extends GenericForm, GetValueFormType extends GenericForm = Form, ReadForm extends GenericForm = Form, K extends FormKey = FormKey>(configuration: UseFormConfiguration<Form, GetValueFormType, AbstractSchema<Form, GetValueFormType>, DefaultValuesInput<Form>, K>,
158
+ type UseFormReturnV4<Schema extends z.ZodObject, K extends FormKey = FormKey> = UseFormReturnType<V4FormOf<Schema>, V4OutOf<Schema>, V4ReadOf<Schema>, K>;
154
159
  /**
155
- * Internal escape hatch for callers that already hold a registry
156
- * reference and need to construct a form outside Vue's setup context
157
- * (e.g. the wizard's lazy noop builder, which runs inside a
158
- * `computed` re-eval). Passing this skips the strict `useRegistry()`
159
- * call; everything else (FormStore allocation, registry presence,
160
- * consumer ref-counting via `onScopeDispose`) goes through the same
161
- * path eager calls follow. Not part of the public surface.
160
+ * Direct V4 configuration projection. Mirrors `UseFormReturnV4`.
162
161
  */
163
- options?: {
164
- readonly registry?: AttaformRegistry;
165
- }): UseFormReturnType<Form, GetValueFormType, ReadForm, K>;
166
-
162
+ type UseFormConfigV4<Schema extends z.ZodObject, K extends FormKey = FormKey> = Omit<UseFormConfiguration<V4FormOf<Schema>, V4OutOf<Schema>, AbstractSchema<V4FormOf<Schema>, V4OutOf<Schema>>, DefaultValuesInput<V4FormOf<Schema>>, K>, 'schema' | 'validateOn' | 'debounceMs'> & {
163
+ schema: Schema;
164
+ } & ValidateOnConfig;
167
165
  /**
168
- * Symbol slot used by custom directive integrations to install an
169
- * assigner on the bound element. Read by the v-register directive
170
- * when a DOM event fires:
171
- *
172
- * ```ts
173
- * import { assignKey } from 'attaform'
174
- * el[assignKey] = (value) => myCustomWriter(value)
175
- * ```
176
- *
177
- * Most consumers never need this — the built-in directives wire
178
- * default assigners for text inputs, checkboxes, radios, and selects.
166
+ * Direct V3 projection no major-dispatch. Use when the schema's
167
+ * Zod major is known statically.
179
168
  */
180
- declare const assignKey: unique symbol;
181
-
169
+ type UseFormReturnV3<Schema extends z.ZodObject<z.ZodRawShape>, K extends FormKey = FormKey> = UseFormReturnType<V3FormOf<Schema>, V3OutOf<Schema>, V3ReadOf<Schema>, K>;
182
170
  /**
183
- * The `v-register` directive. Bind a form field to a native input,
184
- * select, textarea, checkbox, or radio:
185
- *
186
- * ```vue
187
- * <input v-register="form.register('email')" />
188
- * <select v-register="form.register('country')">
189
- * <option value="us">US</option>
190
- * <option value="uk">UK</option>
191
- * </select>
192
- * ```
193
- *
194
- * The directive picks the right binding strategy automatically based
195
- * on the element's `tagName` and `type`. Registered globally by
196
- * `createAttaform()`. Most consumers never import it directly, but
197
- * it's exposed for advanced integrations that wire directives
198
- * manually.
171
+ * Direct V3 configuration projection. Mirrors `UseFormReturnV3`.
199
172
  */
200
- declare const vRegister: RegisterModelDynamicCustomDirective;
201
-
173
+ type UseFormConfigV3<Schema extends z.ZodObject<z.ZodRawShape>, K extends FormKey = FormKey> = Omit<UseFormConfiguration<V3FormOf<Schema>, V3OutOf<Schema>, AbstractSchema<V3FormOf<Schema>, V3OutOf<Schema>>, DefaultValuesInput<V3FormOf<Schema>>, K>, 'schema' | 'validateOn' | 'debounceMs'> & {
174
+ schema: Schema;
175
+ } & ValidateOnConfig;
202
176
  /**
203
- * Type guard for a `RegisterValue`. Returns `true` when `val` looks
204
- * like the object returned from `form.register(path)`.
177
+ * The return shape of `useForm` for a given Zod schema. Dispatches
178
+ * once on the schema's major version and projects to the matching
179
+ * adapter's `Form` / `Out` / `Read` slots. The dispatch matches the
180
+ * full `SupportedRootSchema` per major, so an object, record, or
181
+ * discriminated-union root all resolve here exactly as the runtime
182
+ * `useForm` overloads accept them.
205
183
  *
206
- * ```ts
207
- * if (isRegisterValue(slotValue)) {
208
- * // slotValue.innerRef is now a Ref<unknown>
209
- * }
210
- * ```
211
- *
212
- * Useful when building wrapper components that accept either a
213
- * `RegisterValue` or a plain ref via the same prop.
184
+ * Replaces `ReturnType<typeof useForm<Schema, K>>` in test code with
185
+ * concrete schemas. For generic helpers (`<S extends z.ZodObject>`),
186
+ * use `UseFormReturnV4<S>` directly TS doesn't simplify
187
+ * conditional types under generic constraints, so the dispatch in
188
+ * this helper stays deferred and TS can't prove return-type
189
+ * compatibility.
214
190
  */
215
- declare function isRegisterValue<Value = unknown>(val: unknown): val is RegisterValue<Value>;
216
-
191
+ type UseFormReturn<Schema, K extends FormKey = FormKey> = Schema extends SupportedRootSchema & ZodV4Internals ? UseFormReturnType<V4FormOf<Schema>, V4OutOf<Schema>, V4ReadOf<Schema>, K> : Schema extends SupportedRootSchema$1 ? UseFormReturnType<V3FormOf<Schema>, V3OutOf<Schema>, V3ReadOf<Schema>, K> : never;
217
192
  /**
218
- * Shared building blocks for Attaform's two devtools surfaces the Vue
219
- * DevTools (Chrome-extension) inspector wired up in `./devtools.ts`, and
220
- * the Nuxt DevTools (overlay) panel wired up via `../../nuxt.ts` +
221
- * `../pages/_attaform_devtools.vue`.
222
- *
223
- * Houses the window-bridge contract both surfaces consume so a new
224
- * bridge field lands in one file. Both surfaces render RAW form values
225
- * by design — DevTools is a dev-only surface, and redaction across every
226
- * place a value surfaces is impractical security theater rather than a
227
- * real safeguard.
193
+ * The configuration parameter shape of `useForm` for a given Zod
194
+ * schema. Mirrors `UseFormReturn`'s dispatch replaces
195
+ * `Parameters<typeof useForm<Schema, K>>[0]` in test code.
228
196
  */
197
+ type UseFormConfig<Schema, K extends FormKey = FormKey> = Schema extends SupportedRootSchema & ZodV4Internals ? Omit<UseFormConfiguration<V4FormOf<Schema>, V4OutOf<Schema>, AbstractSchema<V4FormOf<Schema>, V4OutOf<Schema>>, DefaultValuesInput<V4FormOf<Schema>>, K>, 'schema' | 'validateOn' | 'debounceMs'> & {
198
+ schema: Schema;
199
+ } & ValidateOnConfig : Schema extends SupportedRootSchema$1 ? Omit<UseFormConfiguration<V3FormOf<Schema>, V3OutOf<Schema>, AbstractSchema<V3FormOf<Schema>, V3OutOf<Schema>>, DefaultValuesInput<V3FormOf<Schema>>, K>, 'schema' | 'validateOn' | 'debounceMs'> & {
200
+ schema: Schema;
201
+ } & ValidateOnConfig : never;
229
202
 
230
203
  /**
231
- * Property key on `window` that the Nuxt-side dev plugin attaches the
232
- * bridge object to. The iframe-mounted overlay panel reads
233
- * `window.parent[DEVTOOLS_WINDOW_KEY]` to reach the host app's registry.
204
+ * Field-metadata write/read API for the unified `attaform/zod` entry.
234
205
  *
235
- * Underscored + namespaced to make accidental collision with consumer
236
- * globals vanishingly unlikely. Stable across versions bumping it
237
- * would silently disconnect older library builds from newer overlay
238
- * panels in the same browser tab during a library upgrade.
239
- */
240
- declare const DEVTOOLS_WINDOW_KEY = "__attaform_devtools__";
241
- /**
242
- * Shape of the object the host plugin attaches to `window` in dev mode.
243
- * The iframe overlay panel reads this to discover the live registry and
244
- * render its forms.
206
+ * Storage is shared with both adapters via `field-meta-store` — a
207
+ * payload written here is visible to whichever adapter the unified
208
+ * `useForm` dispatches to at runtime, regardless of Zod major. No
209
+ * `zod` runtime import; the type-only `import type` is erased at
210
+ * build, so `attaform/zod` carries no `z.registry` reference even
211
+ * when consumed by a Zod 3 project without the Vite plugin alias.
245
212
  *
246
- * Single-registry assumption: the latest `createAttaform()` install
247
- * wins. Multi-app pages (rare; typically only seen in micro-frontend
248
- * setups) will only see one app's forms in the panel. Documented but
249
- * not actively supported — the alternative (a Set of registries with
250
- * union-rendering) is a future call if a real consumer hits it.
213
+ * The native v4 chain `schema.register(fieldMeta, payload)` continues
214
+ * to work Zod 4's `.register()` only calls `.add(this, payload)`
215
+ * structurally, satisfied by the shared store.
251
216
  */
252
- interface AttaformDevtoolsBridge {
253
- registry: AttaformRegistry;
254
- /**
255
- * The library version, surfaced in the panel's footer for support /
256
- * bug-report context. Read from `package.json` at host-plugin init.
257
- */
258
- version: string;
259
- }
260
- declare global {
261
- interface Window {
262
- [DEVTOOLS_WINDOW_KEY]?: AttaformDevtoolsBridge;
263
- }
264
- }
265
217
 
218
+ type ZodFieldMetaRegistry = ReturnType<typeof z.registry<FieldMetaPayload>>;
266
219
  /**
267
- * Anti-flash timing for the library-default display reducer.
268
- *
269
- * - `showDelay` how long in-flight work (a validation run or an async
270
- * register transform) may run before its spinner is allowed to show. Work
271
- * that settles inside this window never reveals `'pending'` at all, so a
272
- * fast (often synchronous) check does not flash a spinner on every keystroke.
273
- * - `minVisible` — once shown, the minimum time the spinner stays up. Work
274
- * that lands just past `showDelay` is held here so the spinner does not
275
- * itself flash on and immediately off.
220
+ * The shared registry every Attaform-aware Zod schema can register
221
+ * field metadata against, regardless of major. Same instance the v3
222
+ * and v4 adapter entries expose write in one place, read from
223
+ * any.
276
224
  *
277
- * Both are milliseconds.
225
+ * Cast to Zod 4's `$ZodRegistry<FieldMetaPayload>` so the native
226
+ * `schema.register(fieldMeta, payload)` chain type-checks for v4
227
+ * users; the runtime call only needs `.add` structurally, which the
228
+ * shared store provides.
278
229
  */
279
- type DisplayTimings = {
280
- readonly showDelay: number;
281
- readonly minVisible: number;
282
- };
283
- /**
284
- * Library-default anti-flash timings. `showDelay: 120` cleanly swallows
285
- * synchronous, microtask-resolved, and tiny-async work (validation runs and
286
- * async register transforms alike) so none of them flash a spinner;
287
- * `minVisible: 120` keeps a shown spinner snappy once one does land.
288
- * Retune via {@link makeDefaultDisplayState} without touching the engine.
289
- */
290
- declare const DEFAULT_TIMINGS: DisplayTimings;
291
- /**
292
- * Build a default `getDisplayState` reducer with custom anti-flash timing.
293
- * Power users who want a tighter or looser spinner than {@link DEFAULT_TIMINGS}
294
- * pass their own `{ showDelay, minVisible }`:
295
- *
296
- * ```ts
297
- * import { makeDefaultDisplayState } from 'attaform'
298
- *
299
- * useForm({
300
- * schema,
301
- * getDisplayState: makeDefaultDisplayState({ showDelay: 50, minVisible: 200 }),
302
- * })
303
- * ```
304
- *
305
- * The returned reducer is pure: the engine injects `now` and threads the
306
- * previous machine, so the same `(prev, ctx)` always yields the same next
307
- * machine. It shapes only the display projection — `errors`, `valid`,
308
- * `validating`, and the underlying validation run exactly as before.
309
- */
310
- declare function makeDefaultDisplayState({ showDelay, minVisible, }: DisplayTimings): GetDisplayState;
230
+ declare const fieldMeta: ZodFieldMetaRegistry;
311
231
  /**
312
- * Library-default `getDisplayState` reducer. Resolves every path's
313
- * `field.displayState` and thus `field.show*` and the `form.meta`
314
- * rollups whenever the consumer has not configured an override at the
315
- * per-form or plugin level. Built from {@link DEFAULT_TIMINGS}; publicly
316
- * re-exported so an override can compose with it (a layered reducer that
317
- * special-cases a subtree but otherwise defers picks up future
318
- * refinements for free):
232
+ * Attach `payload` to `schema` in the shared registry and return a
233
+ * clone of `schema` so each call gets its own identity (the registry
234
+ * keys on schema reference, so cloning prevents last-write-wins
235
+ * collisions for sub-schemas reused at multiple paths).
319
236
  *
320
- * ```ts
321
- * import { defaultDisplayState } from 'attaform'
237
+ * Works on both Zod 3 and Zod 4 schemas — branches on the runtime
238
+ * shape of the schema:
239
+ * - Zod 4 schemas expose a public `.clone()` method; we call it.
240
+ * - Zod 3 schemas don't, so we reconstruct via
241
+ * `new schema.constructor(schema._def)`.
322
242
  *
323
- * useForm({
324
- * schema,
325
- * getDisplayState: (prev, ctx) => {
326
- * const next = defaultDisplayState(prev, ctx)
327
- * return next.display === 'success' && ctx.field.path[0] === 'username'
328
- * ? { display: 'idle' }
329
- * : next
330
- * },
331
- * })
332
- * ```
243
+ * Both forms produce a fresh schema with the same effective
244
+ * structure, so the registry slot is unique to this call site.
333
245
  */
334
- declare const defaultDisplayState: GetDisplayState;
246
+ declare function withMeta<S>(schema: S, payload: FieldMetaPayload): S;
335
247
 
336
- export { AbstractSchema, AttaformDefaults, AttaformRegistry, DEFAULT_TIMINGS, DEVTOOLS_WINDOW_KEY, DefaultValuesInput, FormKey, GenericForm, GetDisplayState, RegisterValue, SerializedFormData, UseFormConfiguration, UseFormReturnType, assignKey, createAttaform, defaultDisplayState, escapeForInlineScript, hydrateAttaformState, isRegisterValue, makeDefaultDisplayState, renderAttaformState, useAbstractForm as useForm, vRegister };
337
- export type { AttaformDevtoolsBridge, AttaformPluginOptions, DisplayTimings, SerializedAttaformState };
248
+ export { DefaultValuesInput, FieldMetaPayload, FormKey, GenericForm, UseFormConfiguration, UseFormReturnType, ValidateOnConfig, fieldMeta, useForm, withMeta };
249
+ export type { UseFormConfig, UseFormConfigV3, UseFormConfigV4, UseFormReturn, UseFormReturnV3, UseFormReturnV4 };