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
@@ -2164,12 +2164,13 @@ type GetDisplayState = (prev: DisplayMachine, ctx: DisplayCtx) => DisplayMachine
2164
2164
  * it to a `<form>`:
2165
2165
  *
2166
2166
  * ```vue
2167
- * <form @submit.prevent="onSubmit">…</form>
2167
+ * <form @submit="onSubmit">…</form>
2168
2168
  * ```
2169
2169
  *
2170
- * It optionally accepts the originating `Event` so it can sit on
2171
- * `@submit` directly (without `.prevent` if you want to call
2172
- * `event.preventDefault()` yourself).
2170
+ * It accepts the originating `Event` and calls `event.preventDefault()`
2171
+ * itself, so bind it with `@submit`, not `@submit.prevent` (the
2172
+ * modifier would only prevent the default a second time). Called
2173
+ * imperatively with no event, the `preventDefault` step is skipped.
2173
2174
  */
2174
2175
  type SubmitHandler = (event?: Event) => Promise<void>;
2175
2176
  /**
@@ -3787,7 +3788,7 @@ type FormMeta<F = unknown> = FieldState<F> & {
3787
3788
  * of each new submission attempt; stays `null` on success.
3788
3789
  *
3789
3790
  * The submit handler does NOT re-throw — its returned promise always
3790
- * resolves, so binding it to `@submit.prevent` never manufactures a
3791
+ * resolves, so binding it to `@submit` never manufactures a
3791
3792
  * `window` unhandledrejection. This is the channel for an UNEXPECTED
3792
3793
  * submit failure (a thrown exception or rejected promise), read the
3793
3794
  * same way in templates and after an imperative `await submit()`. An
@@ -3948,10 +3949,11 @@ type UseFormReturnType<Form extends GenericForm, GetValueFormType extends Generi
3948
3949
  * Wraps your submit logic with validation and error routing.
3949
3950
  *
3950
3951
  * ```ts
3951
- * <form @submit.prevent="form.handleSubmit(
3952
+ * const onSubmit = form.handleSubmit(
3952
3953
  * (data) => api.signup(data),
3953
3954
  * (errors) => console.log(errors),
3954
- * )">
3955
+ * )
3956
+ * // Bind the returned handler: <form @submit="onSubmit">
3955
3957
  * ```
3956
3958
  *
3957
3959
  * `data` is the strictly-typed parsed value — refinements have
@@ -4646,5 +4648,5 @@ type UseFormReturnType<Form extends GenericForm, GetValueFormType extends Generi
4646
4648
  blankPaths: ComputedRef<BlankPathsView>;
4647
4649
  };
4648
4650
 
4649
- export { ROOT_PATH as Z, ROOT_PATH_KEY as _, canonicalizePath as am, isPathPrefix as an, isUnset as ao, parseDottedPath as ap, unset as aq };
4650
- export type { ReactiveValidationStatus as $, AttaformDefaults as A, Json as B, CoercionEntry as C, DefaultValuesInput as D, ErrorInput as E, FormKey as F, GenericForm as G, HandleSubmit as H, IsTuple as I, JoinSegments as J, KeyofUnion as K, LiftedValueShape as L, MetaTrackerValue as M, NestedReadType as N, NestedType as O, OnError as P, OnInvalidSubmitPolicy as Q, RegisterModelDynamicCustomDirective as R, OnSubmit as S, PartialFlatPath as T, UseFormConfiguration as U, Path as V, PathKey as W, PendingValidationStatus as X, Primitive as Y, AbstractSchema as a, RegisterDirective as a0, RegisterFlatPath as a1, RegisterOptions as a2, RegisterSelectModifier as a3, RegisterTextModifier as a4, RegisterTransform as a5, Segment as a6, SetValueCallback as a7, SetValuePayload as a8, SettledValidationStatus as a9, SlimPrimitiveKind as aa, SlimRuntimeOf as ab, SubmitHandler as ac, Unset as ad, ValidateOn as ae, ValidateOnConfig as af, ValidationError as ag, ValidationResponse as ah, ValidationResponseWithoutValue as ai, ValueOfUnion as aj, WriteMeta as ak, WriteShape as al, AcceptableDefaults as ar, SchemaFactoryOptions as as, TransformAbortHolder as at, UseFormReturnType as b, RegisterValue as c, GetDisplayState as d, ArrayItem as e, ArrayPath as f, CoercionRegistry as g, CoercionResult as h, CustomDirectiveRegisterAssignerFn as i, DeepPartial as j, DefaultValuesResponse as k, DefaultValuesShape as l, DisplayCtx as m, DisplayMachine as n, DisplayState as o, ErrorsProxyShape as p, FieldMetaPayload as q, FieldState as r, FieldStateMap as s, FieldStateMapEntry as t, FlatPath as u, FormErrorRecord as v, FormErrorsSurface as w, FormMeta as x, HistoryConfig as y, IsUnion as z };
4651
+ export { ROOT_PATH as X, ROOT_PATH_KEY as Y, canonicalizePath as al, isPathPrefix as am, isUnset as an, parseDottedPath as ao, unset as ap };
4652
+ export type { RegisterFlatPath as $, AbstractSchema as A, NestedType as B, CoercionEntry as C, DefaultValuesInput as D, ErrorInput as E, FormKey as F, GenericForm as G, HandleSubmit as H, IsTuple as I, JoinSegments as J, KeyofUnion as K, LiftedValueShape as L, MetaTrackerValue as M, NestedReadType as N, OnError as O, OnInvalidSubmitPolicy as P, OnSubmit as Q, PartialFlatPath as R, Path as S, PathKey as T, UseFormConfiguration as U, PendingValidationStatus as V, Primitive as W, ReactiveValidationStatus as Z, RegisterDirective as _, UseFormReturnType as a, RegisterOptions as a0, RegisterSelectModifier as a1, RegisterTextModifier as a2, RegisterTransform as a3, RegisterValue as a4, Segment as a5, SetValueCallback as a6, SetValuePayload as a7, SettledValidationStatus as a8, SlimPrimitiveKind as a9, SlimRuntimeOf as aa, SubmitHandler as ab, Unset as ac, ValidateOn as ad, ValidateOnConfig as ae, ValidationError as af, ValidationResponse as ag, ValidationResponseWithoutValue as ah, ValueOfUnion as ai, WriteMeta as aj, WriteShape as ak, AcceptableDefaults as aq, SchemaFactoryOptions as ar, TransformAbortHolder as as, RegisterModelDynamicCustomDirective as at, ArrayItem as b, ArrayPath as c, AttaformDefaults as d, CoercionRegistry as e, CoercionResult as f, CustomDirectiveRegisterAssignerFn as g, DeepPartial as h, DefaultValuesResponse as i, DefaultValuesShape as j, DisplayCtx as k, DisplayMachine as l, DisplayState as m, ErrorsProxyShape as n, FieldMetaPayload as o, FieldState as p, FieldStateMap as q, FieldStateMapEntry as r, FlatPath as s, FormErrorRecord as t, FormErrorsSurface as u, FormMeta as v, GetDisplayState as w, HistoryConfig as x, IsUnion as y, Json as z };
@@ -2164,12 +2164,13 @@ type GetDisplayState = (prev: DisplayMachine, ctx: DisplayCtx) => DisplayMachine
2164
2164
  * it to a `<form>`:
2165
2165
  *
2166
2166
  * ```vue
2167
- * <form @submit.prevent="onSubmit">…</form>
2167
+ * <form @submit="onSubmit">…</form>
2168
2168
  * ```
2169
2169
  *
2170
- * It optionally accepts the originating `Event` so it can sit on
2171
- * `@submit` directly (without `.prevent` if you want to call
2172
- * `event.preventDefault()` yourself).
2170
+ * It accepts the originating `Event` and calls `event.preventDefault()`
2171
+ * itself, so bind it with `@submit`, not `@submit.prevent` (the
2172
+ * modifier would only prevent the default a second time). Called
2173
+ * imperatively with no event, the `preventDefault` step is skipped.
2173
2174
  */
2174
2175
  type SubmitHandler = (event?: Event) => Promise<void>;
2175
2176
  /**
@@ -3787,7 +3788,7 @@ type FormMeta<F = unknown> = FieldState<F> & {
3787
3788
  * of each new submission attempt; stays `null` on success.
3788
3789
  *
3789
3790
  * The submit handler does NOT re-throw — its returned promise always
3790
- * resolves, so binding it to `@submit.prevent` never manufactures a
3791
+ * resolves, so binding it to `@submit` never manufactures a
3791
3792
  * `window` unhandledrejection. This is the channel for an UNEXPECTED
3792
3793
  * submit failure (a thrown exception or rejected promise), read the
3793
3794
  * same way in templates and after an imperative `await submit()`. An
@@ -3948,10 +3949,11 @@ type UseFormReturnType<Form extends GenericForm, GetValueFormType extends Generi
3948
3949
  * Wraps your submit logic with validation and error routing.
3949
3950
  *
3950
3951
  * ```ts
3951
- * <form @submit.prevent="form.handleSubmit(
3952
+ * const onSubmit = form.handleSubmit(
3952
3953
  * (data) => api.signup(data),
3953
3954
  * (errors) => console.log(errors),
3954
- * )">
3955
+ * )
3956
+ * // Bind the returned handler: <form @submit="onSubmit">
3955
3957
  * ```
3956
3958
  *
3957
3959
  * `data` is the strictly-typed parsed value — refinements have
@@ -4646,5 +4648,5 @@ type UseFormReturnType<Form extends GenericForm, GetValueFormType extends Generi
4646
4648
  blankPaths: ComputedRef<BlankPathsView>;
4647
4649
  };
4648
4650
 
4649
- export { ROOT_PATH as Z, ROOT_PATH_KEY as _, canonicalizePath as am, isPathPrefix as an, isUnset as ao, parseDottedPath as ap, unset as aq };
4650
- export type { ReactiveValidationStatus as $, AttaformDefaults as A, Json as B, CoercionEntry as C, DefaultValuesInput as D, ErrorInput as E, FormKey as F, GenericForm as G, HandleSubmit as H, IsTuple as I, JoinSegments as J, KeyofUnion as K, LiftedValueShape as L, MetaTrackerValue as M, NestedReadType as N, NestedType as O, OnError as P, OnInvalidSubmitPolicy as Q, RegisterModelDynamicCustomDirective as R, OnSubmit as S, PartialFlatPath as T, UseFormConfiguration as U, Path as V, PathKey as W, PendingValidationStatus as X, Primitive as Y, AbstractSchema as a, RegisterDirective as a0, RegisterFlatPath as a1, RegisterOptions as a2, RegisterSelectModifier as a3, RegisterTextModifier as a4, RegisterTransform as a5, Segment as a6, SetValueCallback as a7, SetValuePayload as a8, SettledValidationStatus as a9, SlimPrimitiveKind as aa, SlimRuntimeOf as ab, SubmitHandler as ac, Unset as ad, ValidateOn as ae, ValidateOnConfig as af, ValidationError as ag, ValidationResponse as ah, ValidationResponseWithoutValue as ai, ValueOfUnion as aj, WriteMeta as ak, WriteShape as al, AcceptableDefaults as ar, SchemaFactoryOptions as as, TransformAbortHolder as at, UseFormReturnType as b, RegisterValue as c, GetDisplayState as d, ArrayItem as e, ArrayPath as f, CoercionRegistry as g, CoercionResult as h, CustomDirectiveRegisterAssignerFn as i, DeepPartial as j, DefaultValuesResponse as k, DefaultValuesShape as l, DisplayCtx as m, DisplayMachine as n, DisplayState as o, ErrorsProxyShape as p, FieldMetaPayload as q, FieldState as r, FieldStateMap as s, FieldStateMapEntry as t, FlatPath as u, FormErrorRecord as v, FormErrorsSurface as w, FormMeta as x, HistoryConfig as y, IsUnion as z };
4651
+ export { ROOT_PATH as X, ROOT_PATH_KEY as Y, canonicalizePath as al, isPathPrefix as am, isUnset as an, parseDottedPath as ao, unset as ap };
4652
+ export type { RegisterFlatPath as $, AbstractSchema as A, NestedType as B, CoercionEntry as C, DefaultValuesInput as D, ErrorInput as E, FormKey as F, GenericForm as G, HandleSubmit as H, IsTuple as I, JoinSegments as J, KeyofUnion as K, LiftedValueShape as L, MetaTrackerValue as M, NestedReadType as N, OnError as O, OnInvalidSubmitPolicy as P, OnSubmit as Q, PartialFlatPath as R, Path as S, PathKey as T, UseFormConfiguration as U, PendingValidationStatus as V, Primitive as W, ReactiveValidationStatus as Z, RegisterDirective as _, UseFormReturnType as a, RegisterOptions as a0, RegisterSelectModifier as a1, RegisterTextModifier as a2, RegisterTransform as a3, RegisterValue as a4, Segment as a5, SetValueCallback as a6, SetValuePayload as a7, SettledValidationStatus as a8, SlimPrimitiveKind as a9, SlimRuntimeOf as aa, SubmitHandler as ab, Unset as ac, ValidateOn as ad, ValidateOnConfig as ae, ValidationError as af, ValidationResponse as ag, ValidationResponseWithoutValue as ah, ValueOfUnion as ai, WriteMeta as aj, WriteShape as ak, AcceptableDefaults as aq, SchemaFactoryOptions as ar, TransformAbortHolder as as, RegisterModelDynamicCustomDirective as at, ArrayItem as b, ArrayPath as c, AttaformDefaults as d, CoercionRegistry as e, CoercionResult as f, CustomDirectiveRegisterAssignerFn as g, DeepPartial as h, DefaultValuesResponse as i, DefaultValuesShape as j, DisplayCtx as k, DisplayMachine as l, DisplayState as m, ErrorsProxyShape as n, FieldMetaPayload as o, FieldState as p, FieldStateMap as q, FieldStateMapEntry as r, FlatPath as s, FormErrorRecord as t, FormErrorsSurface as u, FormMeta as v, GetDisplayState as w, HistoryConfig as x, IsUnion as y, Json as z };
@@ -2164,12 +2164,13 @@ type GetDisplayState = (prev: DisplayMachine, ctx: DisplayCtx) => DisplayMachine
2164
2164
  * it to a `<form>`:
2165
2165
  *
2166
2166
  * ```vue
2167
- * <form @submit.prevent="onSubmit">…</form>
2167
+ * <form @submit="onSubmit">…</form>
2168
2168
  * ```
2169
2169
  *
2170
- * It optionally accepts the originating `Event` so it can sit on
2171
- * `@submit` directly (without `.prevent` if you want to call
2172
- * `event.preventDefault()` yourself).
2170
+ * It accepts the originating `Event` and calls `event.preventDefault()`
2171
+ * itself, so bind it with `@submit`, not `@submit.prevent` (the
2172
+ * modifier would only prevent the default a second time). Called
2173
+ * imperatively with no event, the `preventDefault` step is skipped.
2173
2174
  */
2174
2175
  type SubmitHandler = (event?: Event) => Promise<void>;
2175
2176
  /**
@@ -3787,7 +3788,7 @@ type FormMeta<F = unknown> = FieldState<F> & {
3787
3788
  * of each new submission attempt; stays `null` on success.
3788
3789
  *
3789
3790
  * The submit handler does NOT re-throw — its returned promise always
3790
- * resolves, so binding it to `@submit.prevent` never manufactures a
3791
+ * resolves, so binding it to `@submit` never manufactures a
3791
3792
  * `window` unhandledrejection. This is the channel for an UNEXPECTED
3792
3793
  * submit failure (a thrown exception or rejected promise), read the
3793
3794
  * same way in templates and after an imperative `await submit()`. An
@@ -3948,10 +3949,11 @@ type UseFormReturnType<Form extends GenericForm, GetValueFormType extends Generi
3948
3949
  * Wraps your submit logic with validation and error routing.
3949
3950
  *
3950
3951
  * ```ts
3951
- * <form @submit.prevent="form.handleSubmit(
3952
+ * const onSubmit = form.handleSubmit(
3952
3953
  * (data) => api.signup(data),
3953
3954
  * (errors) => console.log(errors),
3954
- * )">
3955
+ * )
3956
+ * // Bind the returned handler: <form @submit="onSubmit">
3955
3957
  * ```
3956
3958
  *
3957
3959
  * `data` is the strictly-typed parsed value — refinements have
@@ -4646,5 +4648,5 @@ type UseFormReturnType<Form extends GenericForm, GetValueFormType extends Generi
4646
4648
  blankPaths: ComputedRef<BlankPathsView>;
4647
4649
  };
4648
4650
 
4649
- export { ROOT_PATH as Z, ROOT_PATH_KEY as _, canonicalizePath as am, isPathPrefix as an, isUnset as ao, parseDottedPath as ap, unset as aq };
4650
- export type { ReactiveValidationStatus as $, AttaformDefaults as A, Json as B, CoercionEntry as C, DefaultValuesInput as D, ErrorInput as E, FormKey as F, GenericForm as G, HandleSubmit as H, IsTuple as I, JoinSegments as J, KeyofUnion as K, LiftedValueShape as L, MetaTrackerValue as M, NestedReadType as N, NestedType as O, OnError as P, OnInvalidSubmitPolicy as Q, RegisterModelDynamicCustomDirective as R, OnSubmit as S, PartialFlatPath as T, UseFormConfiguration as U, Path as V, PathKey as W, PendingValidationStatus as X, Primitive as Y, AbstractSchema as a, RegisterDirective as a0, RegisterFlatPath as a1, RegisterOptions as a2, RegisterSelectModifier as a3, RegisterTextModifier as a4, RegisterTransform as a5, Segment as a6, SetValueCallback as a7, SetValuePayload as a8, SettledValidationStatus as a9, SlimPrimitiveKind as aa, SlimRuntimeOf as ab, SubmitHandler as ac, Unset as ad, ValidateOn as ae, ValidateOnConfig as af, ValidationError as ag, ValidationResponse as ah, ValidationResponseWithoutValue as ai, ValueOfUnion as aj, WriteMeta as ak, WriteShape as al, AcceptableDefaults as ar, SchemaFactoryOptions as as, TransformAbortHolder as at, UseFormReturnType as b, RegisterValue as c, GetDisplayState as d, ArrayItem as e, ArrayPath as f, CoercionRegistry as g, CoercionResult as h, CustomDirectiveRegisterAssignerFn as i, DeepPartial as j, DefaultValuesResponse as k, DefaultValuesShape as l, DisplayCtx as m, DisplayMachine as n, DisplayState as o, ErrorsProxyShape as p, FieldMetaPayload as q, FieldState as r, FieldStateMap as s, FieldStateMapEntry as t, FlatPath as u, FormErrorRecord as v, FormErrorsSurface as w, FormMeta as x, HistoryConfig as y, IsUnion as z };
4651
+ export { ROOT_PATH as X, ROOT_PATH_KEY as Y, canonicalizePath as al, isPathPrefix as am, isUnset as an, parseDottedPath as ao, unset as ap };
4652
+ export type { RegisterFlatPath as $, AbstractSchema as A, NestedType as B, CoercionEntry as C, DefaultValuesInput as D, ErrorInput as E, FormKey as F, GenericForm as G, HandleSubmit as H, IsTuple as I, JoinSegments as J, KeyofUnion as K, LiftedValueShape as L, MetaTrackerValue as M, NestedReadType as N, OnError as O, OnInvalidSubmitPolicy as P, OnSubmit as Q, PartialFlatPath as R, Path as S, PathKey as T, UseFormConfiguration as U, PendingValidationStatus as V, Primitive as W, ReactiveValidationStatus as Z, RegisterDirective as _, UseFormReturnType as a, RegisterOptions as a0, RegisterSelectModifier as a1, RegisterTextModifier as a2, RegisterTransform as a3, RegisterValue as a4, Segment as a5, SetValueCallback as a6, SetValuePayload as a7, SettledValidationStatus as a8, SlimPrimitiveKind as a9, SlimRuntimeOf as aa, SubmitHandler as ab, Unset as ac, ValidateOn as ad, ValidateOnConfig as ae, ValidationError as af, ValidationResponse as ag, ValidationResponseWithoutValue as ah, ValueOfUnion as ai, WriteMeta as aj, WriteShape as ak, AcceptableDefaults as aq, SchemaFactoryOptions as ar, TransformAbortHolder as as, RegisterModelDynamicCustomDirective as at, ArrayItem as b, ArrayPath as c, AttaformDefaults as d, CoercionRegistry as e, CoercionResult as f, CustomDirectiveRegisterAssignerFn as g, DeepPartial as h, DefaultValuesResponse as i, DefaultValuesShape as j, DisplayCtx as k, DisplayMachine as l, DisplayState as m, ErrorsProxyShape as n, FieldMetaPayload as o, FieldState as p, FieldStateMap as q, FieldStateMapEntry as r, FlatPath as s, FormErrorRecord as t, FormErrorsSurface as u, FormMeta as v, GetDisplayState as w, HistoryConfig as x, IsUnion as y, Json as z };
@@ -1,10 +1,10 @@
1
1
  interface WebpackFamilyPluginOptions {
2
2
  /**
3
- * Rewrite `attaform/zod` imports at build time to the matching adapter
4
- * subpath, based on the consumer's installed Zod major. Default `true`.
5
- * Set to `false` to keep the runtime-dispatch unified entry (ships both
6
- * adapters) when a project intentionally mixes Zod versions or resolves
7
- * Zod in a non-standard way.
3
+ * Rewrite `attaform` and `attaform/zod` imports at build time to the
4
+ * matching adapter subpath, based on the consumer's installed Zod major.
5
+ * Default `true`. Set to `false` to keep the runtime-dispatch unified
6
+ * entry (ships both adapters) when a project intentionally mixes Zod
7
+ * versions or resolves Zod in a non-standard way.
8
8
  */
9
9
  resolveZodAlias?: boolean;
10
10
  /**
@@ -1,10 +1,10 @@
1
1
  interface WebpackFamilyPluginOptions {
2
2
  /**
3
- * Rewrite `attaform/zod` imports at build time to the matching adapter
4
- * subpath, based on the consumer's installed Zod major. Default `true`.
5
- * Set to `false` to keep the runtime-dispatch unified entry (ships both
6
- * adapters) when a project intentionally mixes Zod versions or resolves
7
- * Zod in a non-standard way.
3
+ * Rewrite `attaform` and `attaform/zod` imports at build time to the
4
+ * matching adapter subpath, based on the consumer's installed Zod major.
5
+ * Default `true`. Set to `false` to keep the runtime-dispatch unified
6
+ * entry (ships both adapters) when a project intentionally mixes Zod
7
+ * versions or resolves Zod in a non-standard way.
8
8
  */
9
9
  resolveZodAlias?: boolean;
10
10
  /**
@@ -1,10 +1,10 @@
1
1
  interface WebpackFamilyPluginOptions {
2
2
  /**
3
- * Rewrite `attaform/zod` imports at build time to the matching adapter
4
- * subpath, based on the consumer's installed Zod major. Default `true`.
5
- * Set to `false` to keep the runtime-dispatch unified entry (ships both
6
- * adapters) when a project intentionally mixes Zod versions or resolves
7
- * Zod in a non-standard way.
3
+ * Rewrite `attaform` and `attaform/zod` imports at build time to the
4
+ * matching adapter subpath, based on the consumer's installed Zod major.
5
+ * Default `true`. Set to `false` to keep the runtime-dispatch unified
6
+ * entry (ships both adapters) when a project intentionally mixes Zod
7
+ * versions or resolves Zod in a non-standard way.
8
8
  */
9
9
  resolveZodAlias?: boolean;
10
10
  /**
@@ -1,5 +1,37 @@
1
1
  import { z } from 'zod';
2
- import { G as GenericForm, u as FlatPath, O as NestedType, F as FormKey, U as UseFormConfiguration, a as AbstractSchema, ar as AcceptableDefaults, af as ValidateOnConfig, b as UseFormReturnType } from './attaform.DBNjHgNj.js';
2
+ import { G as GenericForm, s as FlatPath, B as NestedType, F as FormKey, U as UseFormConfiguration, A as AbstractSchema, aq as AcceptableDefaults, ae as ValidateOnConfig, a as UseFormReturnType } from './attaform.C3WnCDXz.js';
3
+
4
+ /**
5
+ * The Zod v4 schema roots `useForm` accepts. A fixed-shape
6
+ * `z.object({ … })` is the common case; `z.record(K, V)` admits a
7
+ * dictionary form (a homogeneous map with runtime-known keys);
8
+ * `z.discriminatedUnion(disc, [...])` admits a variant form (one of
9
+ * several object shapes, picked by a discriminator). Each projects to
10
+ * a `GenericForm`-shaped value the form engine drives: an object root
11
+ * descends into its fixed keys, a record root treats its entries as an
12
+ * open live-keyed container, a variant root lifts the active variant's
13
+ * keys into one addressable surface.
14
+ *
15
+ * Other roots (a bare `z.union`, a root `z.array`, primitives,
16
+ * `z.map` / `z.set`) are not form roots; wrap them under a key. The
17
+ * adapter's runtime construction rejects them with a legible error.
18
+ *
19
+ * `z.ZodObject` MUST keep its `z.ZodRawShape` argument, and the
20
+ * discriminated-union arm MUST stay fully applied. The unified entry's
21
+ * v4 overload constrains on `SupportedRootSchema & ZodV4Internals` to
22
+ * keep v3 schemas out (see `../unified/types-zod-major.ts`). In a
23
+ * single-major (v3-only) consumer install, the published `.d.mts`
24
+ * resolves this `z` to v3, where a bare or under-applied Zod class is
25
+ * missing its required arguments and degrades to an `any`-like error
26
+ * type; `any` then absorbs the union and `any & ZodV4Internals`
27
+ * collapses back to `any`, so the marker stops excluding v3 schemas and
28
+ * the read slot poisons to `never`. `z.ZodRecord` carries defaults for
29
+ * both arguments, so it stays concrete in either major.
30
+ * `z.ZodDiscriminatedUnion` does NOT (v3 requires both arguments, and
31
+ * its parameter order is the reverse of v4's), so the arm is written
32
+ * fully applied; the v3-only bundled-types fixture guards it.
33
+ */
34
+ type SupportedRootSchema = z.ZodObject<z.ZodRawShape> | z.ZodRecord | z.ZodDiscriminatedUnion<readonly z.ZodObject<z.ZodRawShape>[], string>;
3
35
 
4
36
  /**
5
37
  * The shape `form.values.<key>` returns at runtime.
@@ -120,38 +152,6 @@ type StorageLeaf<L> = InputIsUnknown<L> extends true ? unknown : L extends {
120
152
  };
121
153
  } ? Out : never;
122
154
 
123
- /**
124
- * The Zod v4 schema roots `useForm` accepts. A fixed-shape
125
- * `z.object({ … })` is the common case; `z.record(K, V)` admits a
126
- * dictionary form (a homogeneous map with runtime-known keys);
127
- * `z.discriminatedUnion(disc, [...])` admits a variant form (one of
128
- * several object shapes, picked by a discriminator). Each projects to
129
- * a `GenericForm`-shaped value the form engine drives: an object root
130
- * descends into its fixed keys, a record root treats its entries as an
131
- * open live-keyed container, a variant root lifts the active variant's
132
- * keys into one addressable surface.
133
- *
134
- * Other roots (a bare `z.union`, a root `z.array`, primitives,
135
- * `z.map` / `z.set`) are not form roots; wrap them under a key. The
136
- * adapter's runtime construction rejects them with a legible error.
137
- *
138
- * `z.ZodObject` MUST keep its `z.ZodRawShape` argument, and the
139
- * discriminated-union arm MUST stay fully applied. The unified entry's
140
- * v4 overload constrains on `SupportedRootSchema & ZodV4Internals` to
141
- * keep v3 schemas out (see `../unified/types-zod-major.ts`). In a
142
- * single-major (v3-only) consumer install, the published `.d.mts`
143
- * resolves this `z` to v3, where a bare or under-applied Zod class is
144
- * missing its required arguments and degrades to an `any`-like error
145
- * type; `any` then absorbs the union and `any & ZodV4Internals`
146
- * collapses back to `any`, so the marker stops excluding v3 schemas and
147
- * the read slot poisons to `never`. `z.ZodRecord` carries defaults for
148
- * both arguments, so it stays concrete in either major.
149
- * `z.ZodDiscriminatedUnion` does NOT (v3 requires both arguments, and
150
- * its parameter order is the reverse of v4's), so the arm is written
151
- * fully applied; the v3-only bundled-types fixture guards it.
152
- */
153
- type SupportedRootSchema = z.ZodObject<z.ZodRawShape> | z.ZodRecord | z.ZodDiscriminatedUnion<readonly z.ZodObject<z.ZodRawShape>[], string>;
154
-
155
155
  /**
156
156
  * Zod v4 adapter entry point. Re-exports the adapter + the useForm
157
157
  * wrapper that threads zod-v4-specific schema types through