attaform 0.25.0 → 0.27.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (163) hide show
  1. package/README.md +21 -11
  2. package/bin/attaform.mjs +78 -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.CN4ZEGo6.mjs → attaform.BceJrhQ7.mjs} +5 -5
  57. package/dist/shared/{attaform.CN4ZEGo6.mjs.map → attaform.BceJrhQ7.mjs.map} +1 -1
  58. package/dist/shared/{attaform.i_LA3X9o.d.cts → attaform.C3WnCDXz.d.cts} +81 -24
  59. package/dist/shared/{attaform.i_LA3X9o.d.ts → attaform.C3WnCDXz.d.mts} +81 -24
  60. package/dist/shared/{attaform.i_LA3X9o.d.mts → attaform.C3WnCDXz.d.ts} +81 -24
  61. package/dist/shared/{attaform.DuzQYscR.d.ts → attaform.C9fPTxjB.d.cts} +5 -5
  62. package/dist/shared/{attaform.DuzQYscR.d.cts → attaform.C9fPTxjB.d.mts} +5 -5
  63. package/dist/shared/{attaform.DuzQYscR.d.mts → attaform.C9fPTxjB.d.ts} +5 -5
  64. package/dist/shared/{attaform.B3cgZE3c.d.ts → attaform.CC_y1_Ej.d.ts} +33 -33
  65. package/dist/shared/{attaform.DS_zBcdr.d.ts → attaform.CEXUlUkc.d.ts} +1588 -1190
  66. package/dist/shared/{attaform.Xe8dATED.cjs → attaform.C__F01CE.cjs} +15 -15
  67. package/dist/shared/{attaform.Xe8dATED.cjs.map → attaform.C__F01CE.cjs.map} +1 -1
  68. package/dist/shared/{attaform.3heDHayA.cjs → attaform.Co5LNRnv.cjs} +186 -129
  69. package/dist/shared/attaform.Co5LNRnv.cjs.map +1 -0
  70. package/dist/shared/{attaform.BJt4ZCkM.d.mts → attaform.CpXHK60W.d.cts} +33 -33
  71. package/dist/shared/{attaform.DmKLa4tL.d.cts → attaform.CvVYOvZF.d.mts} +33 -33
  72. package/dist/shared/{attaform.DK3xUBkj.mjs → attaform.CyQxTOdX.mjs} +162 -79
  73. package/dist/shared/attaform.CyQxTOdX.mjs.map +1 -0
  74. package/dist/shared/{attaform.B5GFS3Su.d.cts → attaform.D99pd7JG.d.cts} +1588 -1190
  75. package/dist/shared/{attaform.CwXXbZIQ.mjs → attaform.DDAmSFnl.mjs} +4 -4
  76. package/dist/shared/{attaform.CwXXbZIQ.mjs.map → attaform.DDAmSFnl.mjs.map} +1 -1
  77. package/dist/shared/{attaform.BkUzunyB.cjs → attaform.DQT7_-FO.cjs} +371 -287
  78. package/dist/shared/attaform.DQT7_-FO.cjs.map +1 -0
  79. package/dist/shared/{attaform.CqwcTExO.mjs → attaform.Da8EdI2t.mjs} +182 -129
  80. package/dist/shared/attaform.Da8EdI2t.mjs.map +1 -0
  81. package/dist/shared/{attaform.sks1MFVO.cjs → attaform.DhVgG2jh.cjs} +16 -16
  82. package/dist/shared/{attaform.sks1MFVO.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.DMNnfQq_.mjs → attaform.DlSu08F5.mjs} +4 -4
  88. package/dist/shared/{attaform.DMNnfQq_.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.B5YcWrKi.cjs → attaform.Drsi43GG.cjs} +19 -19
  92. package/dist/shared/{attaform.B5YcWrKi.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.8vmdOURQ.d.mts → attaform.kBkYlKP_.d.mts} +1588 -1190
  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.3heDHayA.cjs.map +0 -1
  147. package/dist/shared/attaform.BRGIpZo4.cjs.map +0 -1
  148. package/dist/shared/attaform.BkUzunyB.cjs.map +0 -1
  149. package/dist/shared/attaform.C3Doa9Pt.mjs.map +0 -1
  150. package/dist/shared/attaform.CO0e7YVY.d.cts +0 -94
  151. package/dist/shared/attaform.CO0e7YVY.d.mts +0 -94
  152. package/dist/shared/attaform.CO0e7YVY.d.ts +0 -94
  153. package/dist/shared/attaform.CqwcTExO.mjs.map +0 -1
  154. package/dist/shared/attaform.DK3xUBkj.mjs.map +0 -1
  155. package/dist/shared/attaform.LEWUFqUw.cjs.map +0 -1
  156. package/dist/shared/attaform.OLtKd9gM.mjs +0 -35
  157. package/dist/shared/attaform.OLtKd9gM.mjs.map +0 -1
  158. package/dist/shared/attaform.sHkHv_98.mjs.map +0 -1
  159. package/dist/shared/attaform.xBDo0Ko0.cjs +0 -39
  160. package/dist/shared/attaform.xBDo0Ko0.cjs.map +0 -1
  161. package/dist/shared/{attaform.DdjDqTah.d.mts → attaform.DRUT703x.d.cts} +14 -14
  162. package/dist/shared/{attaform.DdjDqTah.d.ts → attaform.DRUT703x.d.mts} +14 -14
  163. package/dist/shared/{attaform.DdjDqTah.d.cts → attaform.DRUT703x.d.ts} +14 -14
@@ -137,8 +137,8 @@ declare function canonicalizePath(input: string | Path): {
137
137
  * `Path` to address the form value as a whole, and the home for
138
138
  * form-level (global) errors: root `.refine()` messages, hydration
139
139
  * failures, and `setErrors` entries with no path all live at `[]`. Aggregate
140
- * reads (`errors()`, `meta.errors`) surface them alongside field
141
- * errors; `errors([])` returns the global bucket alone.
140
+ * reads (`errors()`, `errors([])`, `meta.errors`) surface them alongside
141
+ * field errors; `meta.ownErrors` returns the root bucket alone.
142
142
  *
143
143
  * The empty SEGMENT tuple `[]` is structurally unconstructible as a
144
144
  * field path, so it can never collide with a schema key, unlike the
@@ -2074,14 +2074,15 @@ type OnError = (error: ValidationError[]) => void | Promise<void>;
2074
2074
  type DisplayState = 'idle' | 'pending' | 'error' | 'success';
2075
2075
  /**
2076
2076
  * Keys on `FieldState` layered on FROM the display-state predicate
2077
- * (plus `firstError`, computed alongside them). `Omit`'d from the
2078
- * predicate's arguments so a predicate cannot read its own output and
2079
- * form a cycle — enforced at the type level AND at runtime: the base
2080
- * objects passed in literally lack these keys, so an `as` cast in TS
2081
- * or a vanilla-JS caller still can't reach them. `FieldStateBase` /
2082
- * `FormMetaBase` (field-state-api.ts) omit the same set in lockstep.
2077
+ * (plus `firstError` / `firstOwnError`, computed alongside them).
2078
+ * `Omit`'d from the predicate's arguments so a predicate cannot read
2079
+ * its own output and form a cycle — enforced at the type level AND at
2080
+ * runtime: the base objects passed in literally lack these keys, so an
2081
+ * `as` cast in TS or a vanilla-JS caller still can't reach them.
2082
+ * `FieldStateBase` / `FormMetaBase` (field-state-api.ts) omit the same
2083
+ * set in lockstep.
2083
2084
  */
2084
- type FieldStateDerivedKey = 'displayState' | 'showErrors' | 'showPending' | 'showSuccess' | 'showIdle' | 'firstError';
2085
+ type FieldStateDerivedKey = 'displayState' | 'showErrors' | 'showPending' | 'showSuccess' | 'showIdle' | 'firstError' | 'firstOwnError';
2085
2086
  /**
2086
2087
  * One step of the display state machine: the verdict the field should
2087
2088
  * render right now (`display`, projected to `displayState` and the
@@ -2163,12 +2164,13 @@ type GetDisplayState = (prev: DisplayMachine, ctx: DisplayCtx) => DisplayMachine
2163
2164
  * it to a `<form>`:
2164
2165
  *
2165
2166
  * ```vue
2166
- * <form @submit.prevent="onSubmit">…</form>
2167
+ * <form @submit="onSubmit">…</form>
2167
2168
  * ```
2168
2169
  *
2169
- * It optionally accepts the originating `Event` so it can sit on
2170
- * `@submit` directly (without `.prevent` if you want to call
2171
- * `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.
2172
2174
  */
2173
2175
  type SubmitHandler = (event?: Event) => Promise<void>;
2174
2176
  /**
@@ -3114,7 +3116,40 @@ type FieldState<Value = unknown> = {
3114
3116
  */
3115
3117
  readonly elements: readonly HTMLElement[];
3116
3118
  readonly updatedAt: string | null;
3119
+ /**
3120
+ * Every `ValidationError` in this path's SUBTREE: the node's own
3121
+ * bucket plus every descendant's, sorted by schema-declaration order.
3122
+ * On a leaf (no descendants) this equals `ownErrors`. On a container
3123
+ * it rolls up the whole fieldset, so a parent's `errors` is non-empty
3124
+ * whenever any child is invalid.
3125
+ *
3126
+ * For the errors pinned at THIS path alone (a container's own
3127
+ * cross-field `.refine()`, or `setErrors` at this path), read
3128
+ * `ownErrors`.
3129
+ */
3117
3130
  readonly errors: readonly ValidationError[];
3131
+ /**
3132
+ * Every `ValidationError` at THIS exact path's own bucket, excluding
3133
+ * descendants: schema errors, blank-required errors, and `setErrors`
3134
+ * pinned here, in `schema`, `blank`, `user` order. The exact-path
3135
+ * counterpart to the subtree-scoped `errors`.
3136
+ *
3137
+ * On a leaf this is the same array as `errors` (a leaf has no
3138
+ * descendants). On a container it holds only the container's OWN
3139
+ * errors, a cross-field `.refine()` on the fieldset or a path-less
3140
+ * `setErrors` at this node, without dragging in any child error:
3141
+ *
3142
+ * ```vue
3143
+ * <p v-if="form.fields.address.firstOwnError">
3144
+ * {{ form.fields.address.firstOwnError.message }}
3145
+ * </p>
3146
+ * ```
3147
+ *
3148
+ * On `form.meta` this is the root `[]` bucket: form-level errors from
3149
+ * a root `.refine()` or a path-less `setErrors`. `form.meta.ownErrors`
3150
+ * (with `firstOwnError`) is the banner accessor for those.
3151
+ */
3152
+ readonly ownErrors: readonly ValidationError[];
3118
3153
  /**
3119
3154
  * `true` while a per-field validation run is in flight at this path.
3120
3155
  * Reflects field-level debounced runs (`validate-on-change`) and
@@ -3235,9 +3270,28 @@ type FieldState<Value = unknown> = {
3235
3270
  * decides when to render it.
3236
3271
  *
3237
3272
  * On container paths, the first error in the aggregated subtree
3238
- * (descendants sorted by `pathOrdinal`).
3273
+ * (descendants sorted by `pathOrdinal`). For the container's OWN
3274
+ * first error only, read `firstOwnError`.
3239
3275
  */
3240
3276
  readonly firstError: ValidationError | undefined;
3277
+ /**
3278
+ * The first `ValidationError` in `ownErrors` (this exact path's own
3279
+ * bucket), or `undefined` when that bucket is empty. Equivalent to
3280
+ * `ownErrors[0]`, the exact-path counterpart to `firstError`.
3281
+ *
3282
+ * On a leaf this equals `firstError`. On a container it is the
3283
+ * container's own cross-field error (a fieldset `.refine()`), never a
3284
+ * child's. `form.meta.firstOwnError` is the form-level banner: the
3285
+ * first root `[]` error from a root `.refine()` or a path-less
3286
+ * `setErrors`:
3287
+ *
3288
+ * ```vue
3289
+ * <p v-if="form.meta.firstOwnError" role="alert">
3290
+ * {{ form.meta.firstOwnError.message }}
3291
+ * </p>
3292
+ * ```
3293
+ */
3294
+ readonly firstOwnError: ValidationError | undefined;
3241
3295
  readonly path: ReadonlyArray<string | number>;
3242
3296
  /**
3243
3297
  * Stable, SSR-safe DOM id for this field, unique across every mount
@@ -3601,11 +3655,13 @@ type FormErrorsSurface<Form> = ErrorsProxyShape<Form> & {
3601
3655
  <const S extends ReadonlyArray<string | number>>(segments: S & ([JoinSegments<S>] extends [FlatPath<Form>] ? unknown : never)): readonly ValidationError[];
3602
3656
  (segments: ReadonlyArray<string | number>): readonly ValidationError[];
3603
3657
  /**
3604
- * No-arg call returns the whole-form error aggregate same as
3605
- * `form.meta.errors`: every field error plus the global bucket.
3606
- * Distinct from `form.errors([])`, which returns ONLY the global
3607
- * (root) bucket. Always a readonly array; empty when the form has no
3608
- * errors.
3658
+ * No-arg call returns the whole-form error aggregate, the same as
3659
+ * `form.meta.errors` and `form.errors([])`: every field error plus
3660
+ * the root bucket. `form.errors(path)` is uniform at every depth,
3661
+ * including `[]`, so the root is no exception. For the root bucket
3662
+ * alone (a root `.refine()`, a path-less `setErrors`), read
3663
+ * `form.meta.ownErrors`. Always a readonly array; empty when the form
3664
+ * has no errors.
3609
3665
  */
3610
3666
  (): readonly ValidationError[];
3611
3667
  };
@@ -3732,7 +3788,7 @@ type FormMeta<F = unknown> = FieldState<F> & {
3732
3788
  * of each new submission attempt; stays `null` on success.
3733
3789
  *
3734
3790
  * The submit handler does NOT re-throw — its returned promise always
3735
- * resolves, so binding it to `@submit.prevent` never manufactures a
3791
+ * resolves, so binding it to `@submit` never manufactures a
3736
3792
  * `window` unhandledrejection. This is the channel for an UNEXPECTED
3737
3793
  * submit failure (a thrown exception or rejected promise), read the
3738
3794
  * same way in templates and after an imperative `await submit()`. An
@@ -3893,10 +3949,11 @@ type UseFormReturnType<Form extends GenericForm, GetValueFormType extends Generi
3893
3949
  * Wraps your submit logic with validation and error routing.
3894
3950
  *
3895
3951
  * ```ts
3896
- * <form @submit.prevent="form.handleSubmit(
3952
+ * const onSubmit = form.handleSubmit(
3897
3953
  * (data) => api.signup(data),
3898
3954
  * (errors) => console.log(errors),
3899
- * )">
3955
+ * )
3956
+ * // Bind the returned handler: <form @submit="onSubmit">
3900
3957
  * ```
3901
3958
  *
3902
3959
  * `data` is the strictly-typed parsed value — refinements have
@@ -4591,5 +4648,5 @@ type UseFormReturnType<Form extends GenericForm, GetValueFormType extends Generi
4591
4648
  blankPaths: ComputedRef<BlankPathsView>;
4592
4649
  };
4593
4650
 
4594
- export { ROOT_PATH as Z, ROOT_PATH_KEY as _, canonicalizePath as am, isPathPrefix as an, isUnset as ao, parseDottedPath as ap, unset as aq };
4595
- 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 };
@@ -137,8 +137,8 @@ declare function canonicalizePath(input: string | Path): {
137
137
  * `Path` to address the form value as a whole, and the home for
138
138
  * form-level (global) errors: root `.refine()` messages, hydration
139
139
  * failures, and `setErrors` entries with no path all live at `[]`. Aggregate
140
- * reads (`errors()`, `meta.errors`) surface them alongside field
141
- * errors; `errors([])` returns the global bucket alone.
140
+ * reads (`errors()`, `errors([])`, `meta.errors`) surface them alongside
141
+ * field errors; `meta.ownErrors` returns the root bucket alone.
142
142
  *
143
143
  * The empty SEGMENT tuple `[]` is structurally unconstructible as a
144
144
  * field path, so it can never collide with a schema key, unlike the
@@ -2074,14 +2074,15 @@ type OnError = (error: ValidationError[]) => void | Promise<void>;
2074
2074
  type DisplayState = 'idle' | 'pending' | 'error' | 'success';
2075
2075
  /**
2076
2076
  * Keys on `FieldState` layered on FROM the display-state predicate
2077
- * (plus `firstError`, computed alongside them). `Omit`'d from the
2078
- * predicate's arguments so a predicate cannot read its own output and
2079
- * form a cycle — enforced at the type level AND at runtime: the base
2080
- * objects passed in literally lack these keys, so an `as` cast in TS
2081
- * or a vanilla-JS caller still can't reach them. `FieldStateBase` /
2082
- * `FormMetaBase` (field-state-api.ts) omit the same set in lockstep.
2077
+ * (plus `firstError` / `firstOwnError`, computed alongside them).
2078
+ * `Omit`'d from the predicate's arguments so a predicate cannot read
2079
+ * its own output and form a cycle — enforced at the type level AND at
2080
+ * runtime: the base objects passed in literally lack these keys, so an
2081
+ * `as` cast in TS or a vanilla-JS caller still can't reach them.
2082
+ * `FieldStateBase` / `FormMetaBase` (field-state-api.ts) omit the same
2083
+ * set in lockstep.
2083
2084
  */
2084
- type FieldStateDerivedKey = 'displayState' | 'showErrors' | 'showPending' | 'showSuccess' | 'showIdle' | 'firstError';
2085
+ type FieldStateDerivedKey = 'displayState' | 'showErrors' | 'showPending' | 'showSuccess' | 'showIdle' | 'firstError' | 'firstOwnError';
2085
2086
  /**
2086
2087
  * One step of the display state machine: the verdict the field should
2087
2088
  * render right now (`display`, projected to `displayState` and the
@@ -2163,12 +2164,13 @@ type GetDisplayState = (prev: DisplayMachine, ctx: DisplayCtx) => DisplayMachine
2163
2164
  * it to a `<form>`:
2164
2165
  *
2165
2166
  * ```vue
2166
- * <form @submit.prevent="onSubmit">…</form>
2167
+ * <form @submit="onSubmit">…</form>
2167
2168
  * ```
2168
2169
  *
2169
- * It optionally accepts the originating `Event` so it can sit on
2170
- * `@submit` directly (without `.prevent` if you want to call
2171
- * `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.
2172
2174
  */
2173
2175
  type SubmitHandler = (event?: Event) => Promise<void>;
2174
2176
  /**
@@ -3114,7 +3116,40 @@ type FieldState<Value = unknown> = {
3114
3116
  */
3115
3117
  readonly elements: readonly HTMLElement[];
3116
3118
  readonly updatedAt: string | null;
3119
+ /**
3120
+ * Every `ValidationError` in this path's SUBTREE: the node's own
3121
+ * bucket plus every descendant's, sorted by schema-declaration order.
3122
+ * On a leaf (no descendants) this equals `ownErrors`. On a container
3123
+ * it rolls up the whole fieldset, so a parent's `errors` is non-empty
3124
+ * whenever any child is invalid.
3125
+ *
3126
+ * For the errors pinned at THIS path alone (a container's own
3127
+ * cross-field `.refine()`, or `setErrors` at this path), read
3128
+ * `ownErrors`.
3129
+ */
3117
3130
  readonly errors: readonly ValidationError[];
3131
+ /**
3132
+ * Every `ValidationError` at THIS exact path's own bucket, excluding
3133
+ * descendants: schema errors, blank-required errors, and `setErrors`
3134
+ * pinned here, in `schema`, `blank`, `user` order. The exact-path
3135
+ * counterpart to the subtree-scoped `errors`.
3136
+ *
3137
+ * On a leaf this is the same array as `errors` (a leaf has no
3138
+ * descendants). On a container it holds only the container's OWN
3139
+ * errors, a cross-field `.refine()` on the fieldset or a path-less
3140
+ * `setErrors` at this node, without dragging in any child error:
3141
+ *
3142
+ * ```vue
3143
+ * <p v-if="form.fields.address.firstOwnError">
3144
+ * {{ form.fields.address.firstOwnError.message }}
3145
+ * </p>
3146
+ * ```
3147
+ *
3148
+ * On `form.meta` this is the root `[]` bucket: form-level errors from
3149
+ * a root `.refine()` or a path-less `setErrors`. `form.meta.ownErrors`
3150
+ * (with `firstOwnError`) is the banner accessor for those.
3151
+ */
3152
+ readonly ownErrors: readonly ValidationError[];
3118
3153
  /**
3119
3154
  * `true` while a per-field validation run is in flight at this path.
3120
3155
  * Reflects field-level debounced runs (`validate-on-change`) and
@@ -3235,9 +3270,28 @@ type FieldState<Value = unknown> = {
3235
3270
  * decides when to render it.
3236
3271
  *
3237
3272
  * On container paths, the first error in the aggregated subtree
3238
- * (descendants sorted by `pathOrdinal`).
3273
+ * (descendants sorted by `pathOrdinal`). For the container's OWN
3274
+ * first error only, read `firstOwnError`.
3239
3275
  */
3240
3276
  readonly firstError: ValidationError | undefined;
3277
+ /**
3278
+ * The first `ValidationError` in `ownErrors` (this exact path's own
3279
+ * bucket), or `undefined` when that bucket is empty. Equivalent to
3280
+ * `ownErrors[0]`, the exact-path counterpart to `firstError`.
3281
+ *
3282
+ * On a leaf this equals `firstError`. On a container it is the
3283
+ * container's own cross-field error (a fieldset `.refine()`), never a
3284
+ * child's. `form.meta.firstOwnError` is the form-level banner: the
3285
+ * first root `[]` error from a root `.refine()` or a path-less
3286
+ * `setErrors`:
3287
+ *
3288
+ * ```vue
3289
+ * <p v-if="form.meta.firstOwnError" role="alert">
3290
+ * {{ form.meta.firstOwnError.message }}
3291
+ * </p>
3292
+ * ```
3293
+ */
3294
+ readonly firstOwnError: ValidationError | undefined;
3241
3295
  readonly path: ReadonlyArray<string | number>;
3242
3296
  /**
3243
3297
  * Stable, SSR-safe DOM id for this field, unique across every mount
@@ -3601,11 +3655,13 @@ type FormErrorsSurface<Form> = ErrorsProxyShape<Form> & {
3601
3655
  <const S extends ReadonlyArray<string | number>>(segments: S & ([JoinSegments<S>] extends [FlatPath<Form>] ? unknown : never)): readonly ValidationError[];
3602
3656
  (segments: ReadonlyArray<string | number>): readonly ValidationError[];
3603
3657
  /**
3604
- * No-arg call returns the whole-form error aggregate same as
3605
- * `form.meta.errors`: every field error plus the global bucket.
3606
- * Distinct from `form.errors([])`, which returns ONLY the global
3607
- * (root) bucket. Always a readonly array; empty when the form has no
3608
- * errors.
3658
+ * No-arg call returns the whole-form error aggregate, the same as
3659
+ * `form.meta.errors` and `form.errors([])`: every field error plus
3660
+ * the root bucket. `form.errors(path)` is uniform at every depth,
3661
+ * including `[]`, so the root is no exception. For the root bucket
3662
+ * alone (a root `.refine()`, a path-less `setErrors`), read
3663
+ * `form.meta.ownErrors`. Always a readonly array; empty when the form
3664
+ * has no errors.
3609
3665
  */
3610
3666
  (): readonly ValidationError[];
3611
3667
  };
@@ -3732,7 +3788,7 @@ type FormMeta<F = unknown> = FieldState<F> & {
3732
3788
  * of each new submission attempt; stays `null` on success.
3733
3789
  *
3734
3790
  * The submit handler does NOT re-throw — its returned promise always
3735
- * resolves, so binding it to `@submit.prevent` never manufactures a
3791
+ * resolves, so binding it to `@submit` never manufactures a
3736
3792
  * `window` unhandledrejection. This is the channel for an UNEXPECTED
3737
3793
  * submit failure (a thrown exception or rejected promise), read the
3738
3794
  * same way in templates and after an imperative `await submit()`. An
@@ -3893,10 +3949,11 @@ type UseFormReturnType<Form extends GenericForm, GetValueFormType extends Generi
3893
3949
  * Wraps your submit logic with validation and error routing.
3894
3950
  *
3895
3951
  * ```ts
3896
- * <form @submit.prevent="form.handleSubmit(
3952
+ * const onSubmit = form.handleSubmit(
3897
3953
  * (data) => api.signup(data),
3898
3954
  * (errors) => console.log(errors),
3899
- * )">
3955
+ * )
3956
+ * // Bind the returned handler: <form @submit="onSubmit">
3900
3957
  * ```
3901
3958
  *
3902
3959
  * `data` is the strictly-typed parsed value — refinements have
@@ -4591,5 +4648,5 @@ type UseFormReturnType<Form extends GenericForm, GetValueFormType extends Generi
4591
4648
  blankPaths: ComputedRef<BlankPathsView>;
4592
4649
  };
4593
4650
 
4594
- export { ROOT_PATH as Z, ROOT_PATH_KEY as _, canonicalizePath as am, isPathPrefix as an, isUnset as ao, parseDottedPath as ap, unset as aq };
4595
- 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 };
@@ -137,8 +137,8 @@ declare function canonicalizePath(input: string | Path): {
137
137
  * `Path` to address the form value as a whole, and the home for
138
138
  * form-level (global) errors: root `.refine()` messages, hydration
139
139
  * failures, and `setErrors` entries with no path all live at `[]`. Aggregate
140
- * reads (`errors()`, `meta.errors`) surface them alongside field
141
- * errors; `errors([])` returns the global bucket alone.
140
+ * reads (`errors()`, `errors([])`, `meta.errors`) surface them alongside
141
+ * field errors; `meta.ownErrors` returns the root bucket alone.
142
142
  *
143
143
  * The empty SEGMENT tuple `[]` is structurally unconstructible as a
144
144
  * field path, so it can never collide with a schema key, unlike the
@@ -2074,14 +2074,15 @@ type OnError = (error: ValidationError[]) => void | Promise<void>;
2074
2074
  type DisplayState = 'idle' | 'pending' | 'error' | 'success';
2075
2075
  /**
2076
2076
  * Keys on `FieldState` layered on FROM the display-state predicate
2077
- * (plus `firstError`, computed alongside them). `Omit`'d from the
2078
- * predicate's arguments so a predicate cannot read its own output and
2079
- * form a cycle — enforced at the type level AND at runtime: the base
2080
- * objects passed in literally lack these keys, so an `as` cast in TS
2081
- * or a vanilla-JS caller still can't reach them. `FieldStateBase` /
2082
- * `FormMetaBase` (field-state-api.ts) omit the same set in lockstep.
2077
+ * (plus `firstError` / `firstOwnError`, computed alongside them).
2078
+ * `Omit`'d from the predicate's arguments so a predicate cannot read
2079
+ * its own output and form a cycle — enforced at the type level AND at
2080
+ * runtime: the base objects passed in literally lack these keys, so an
2081
+ * `as` cast in TS or a vanilla-JS caller still can't reach them.
2082
+ * `FieldStateBase` / `FormMetaBase` (field-state-api.ts) omit the same
2083
+ * set in lockstep.
2083
2084
  */
2084
- type FieldStateDerivedKey = 'displayState' | 'showErrors' | 'showPending' | 'showSuccess' | 'showIdle' | 'firstError';
2085
+ type FieldStateDerivedKey = 'displayState' | 'showErrors' | 'showPending' | 'showSuccess' | 'showIdle' | 'firstError' | 'firstOwnError';
2085
2086
  /**
2086
2087
  * One step of the display state machine: the verdict the field should
2087
2088
  * render right now (`display`, projected to `displayState` and the
@@ -2163,12 +2164,13 @@ type GetDisplayState = (prev: DisplayMachine, ctx: DisplayCtx) => DisplayMachine
2163
2164
  * it to a `<form>`:
2164
2165
  *
2165
2166
  * ```vue
2166
- * <form @submit.prevent="onSubmit">…</form>
2167
+ * <form @submit="onSubmit">…</form>
2167
2168
  * ```
2168
2169
  *
2169
- * It optionally accepts the originating `Event` so it can sit on
2170
- * `@submit` directly (without `.prevent` if you want to call
2171
- * `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.
2172
2174
  */
2173
2175
  type SubmitHandler = (event?: Event) => Promise<void>;
2174
2176
  /**
@@ -3114,7 +3116,40 @@ type FieldState<Value = unknown> = {
3114
3116
  */
3115
3117
  readonly elements: readonly HTMLElement[];
3116
3118
  readonly updatedAt: string | null;
3119
+ /**
3120
+ * Every `ValidationError` in this path's SUBTREE: the node's own
3121
+ * bucket plus every descendant's, sorted by schema-declaration order.
3122
+ * On a leaf (no descendants) this equals `ownErrors`. On a container
3123
+ * it rolls up the whole fieldset, so a parent's `errors` is non-empty
3124
+ * whenever any child is invalid.
3125
+ *
3126
+ * For the errors pinned at THIS path alone (a container's own
3127
+ * cross-field `.refine()`, or `setErrors` at this path), read
3128
+ * `ownErrors`.
3129
+ */
3117
3130
  readonly errors: readonly ValidationError[];
3131
+ /**
3132
+ * Every `ValidationError` at THIS exact path's own bucket, excluding
3133
+ * descendants: schema errors, blank-required errors, and `setErrors`
3134
+ * pinned here, in `schema`, `blank`, `user` order. The exact-path
3135
+ * counterpart to the subtree-scoped `errors`.
3136
+ *
3137
+ * On a leaf this is the same array as `errors` (a leaf has no
3138
+ * descendants). On a container it holds only the container's OWN
3139
+ * errors, a cross-field `.refine()` on the fieldset or a path-less
3140
+ * `setErrors` at this node, without dragging in any child error:
3141
+ *
3142
+ * ```vue
3143
+ * <p v-if="form.fields.address.firstOwnError">
3144
+ * {{ form.fields.address.firstOwnError.message }}
3145
+ * </p>
3146
+ * ```
3147
+ *
3148
+ * On `form.meta` this is the root `[]` bucket: form-level errors from
3149
+ * a root `.refine()` or a path-less `setErrors`. `form.meta.ownErrors`
3150
+ * (with `firstOwnError`) is the banner accessor for those.
3151
+ */
3152
+ readonly ownErrors: readonly ValidationError[];
3118
3153
  /**
3119
3154
  * `true` while a per-field validation run is in flight at this path.
3120
3155
  * Reflects field-level debounced runs (`validate-on-change`) and
@@ -3235,9 +3270,28 @@ type FieldState<Value = unknown> = {
3235
3270
  * decides when to render it.
3236
3271
  *
3237
3272
  * On container paths, the first error in the aggregated subtree
3238
- * (descendants sorted by `pathOrdinal`).
3273
+ * (descendants sorted by `pathOrdinal`). For the container's OWN
3274
+ * first error only, read `firstOwnError`.
3239
3275
  */
3240
3276
  readonly firstError: ValidationError | undefined;
3277
+ /**
3278
+ * The first `ValidationError` in `ownErrors` (this exact path's own
3279
+ * bucket), or `undefined` when that bucket is empty. Equivalent to
3280
+ * `ownErrors[0]`, the exact-path counterpart to `firstError`.
3281
+ *
3282
+ * On a leaf this equals `firstError`. On a container it is the
3283
+ * container's own cross-field error (a fieldset `.refine()`), never a
3284
+ * child's. `form.meta.firstOwnError` is the form-level banner: the
3285
+ * first root `[]` error from a root `.refine()` or a path-less
3286
+ * `setErrors`:
3287
+ *
3288
+ * ```vue
3289
+ * <p v-if="form.meta.firstOwnError" role="alert">
3290
+ * {{ form.meta.firstOwnError.message }}
3291
+ * </p>
3292
+ * ```
3293
+ */
3294
+ readonly firstOwnError: ValidationError | undefined;
3241
3295
  readonly path: ReadonlyArray<string | number>;
3242
3296
  /**
3243
3297
  * Stable, SSR-safe DOM id for this field, unique across every mount
@@ -3601,11 +3655,13 @@ type FormErrorsSurface<Form> = ErrorsProxyShape<Form> & {
3601
3655
  <const S extends ReadonlyArray<string | number>>(segments: S & ([JoinSegments<S>] extends [FlatPath<Form>] ? unknown : never)): readonly ValidationError[];
3602
3656
  (segments: ReadonlyArray<string | number>): readonly ValidationError[];
3603
3657
  /**
3604
- * No-arg call returns the whole-form error aggregate same as
3605
- * `form.meta.errors`: every field error plus the global bucket.
3606
- * Distinct from `form.errors([])`, which returns ONLY the global
3607
- * (root) bucket. Always a readonly array; empty when the form has no
3608
- * errors.
3658
+ * No-arg call returns the whole-form error aggregate, the same as
3659
+ * `form.meta.errors` and `form.errors([])`: every field error plus
3660
+ * the root bucket. `form.errors(path)` is uniform at every depth,
3661
+ * including `[]`, so the root is no exception. For the root bucket
3662
+ * alone (a root `.refine()`, a path-less `setErrors`), read
3663
+ * `form.meta.ownErrors`. Always a readonly array; empty when the form
3664
+ * has no errors.
3609
3665
  */
3610
3666
  (): readonly ValidationError[];
3611
3667
  };
@@ -3732,7 +3788,7 @@ type FormMeta<F = unknown> = FieldState<F> & {
3732
3788
  * of each new submission attempt; stays `null` on success.
3733
3789
  *
3734
3790
  * The submit handler does NOT re-throw — its returned promise always
3735
- * resolves, so binding it to `@submit.prevent` never manufactures a
3791
+ * resolves, so binding it to `@submit` never manufactures a
3736
3792
  * `window` unhandledrejection. This is the channel for an UNEXPECTED
3737
3793
  * submit failure (a thrown exception or rejected promise), read the
3738
3794
  * same way in templates and after an imperative `await submit()`. An
@@ -3893,10 +3949,11 @@ type UseFormReturnType<Form extends GenericForm, GetValueFormType extends Generi
3893
3949
  * Wraps your submit logic with validation and error routing.
3894
3950
  *
3895
3951
  * ```ts
3896
- * <form @submit.prevent="form.handleSubmit(
3952
+ * const onSubmit = form.handleSubmit(
3897
3953
  * (data) => api.signup(data),
3898
3954
  * (errors) => console.log(errors),
3899
- * )">
3955
+ * )
3956
+ * // Bind the returned handler: <form @submit="onSubmit">
3900
3957
  * ```
3901
3958
  *
3902
3959
  * `data` is the strictly-typed parsed value — refinements have
@@ -4591,5 +4648,5 @@ type UseFormReturnType<Form extends GenericForm, GetValueFormType extends Generi
4591
4648
  blankPaths: ComputedRef<BlankPathsView>;
4592
4649
  };
4593
4650
 
4594
- export { ROOT_PATH as Z, ROOT_PATH_KEY as _, canonicalizePath as am, isPathPrefix as an, isUnset as ao, parseDottedPath as ap, unset as aq };
4595
- 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
  /**