attaform 0.31.0 → 0.31.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 (50) hide show
  1. package/dist/abstract.d.mts +5 -5
  2. package/dist/abstract.mjs +4 -4
  3. package/dist/dev/abstract.mjs +4 -4
  4. package/dist/dev/chunks/devtools.mjs +1 -1
  5. package/dist/dev/directive.mjs +1 -1
  6. package/dist/dev/history.mjs +15 -2
  7. package/dist/dev/index.mjs +5 -5
  8. package/dist/dev/runtime/plugins/attaform.mjs +1 -1
  9. package/dist/dev/shared/{attaform-dev.zlvDr0WB.mjs → attaform-dev.04aupFBW.mjs} +3 -2
  10. package/dist/dev/shared/{attaform-dev.y9x9Vp9F.mjs → attaform-dev.3uTCYwy8.mjs} +572 -135
  11. package/dist/dev/shared/{attaform-dev.DJ3nsWw6.mjs → attaform-dev.BpVGFSFa.mjs} +18 -9
  12. package/dist/dev/shared/{attaform-dev.B1q-x9R9.mjs → attaform-dev.Bu6wgrA5.mjs} +1 -1
  13. package/dist/dev/shared/{attaform-dev.k5X47GMD.mjs → attaform-dev.Cbx0AiQF.mjs} +3 -2
  14. package/dist/dev/shared/attaform-dev.CwYTWyPX.mjs +120 -0
  15. package/dist/dev/shared/{attaform-dev.DlaT4xGd.mjs → attaform-dev.D7lKyM_7.mjs} +4 -4
  16. package/dist/dev/shared/{attaform-dev.CtyqGia7.mjs → attaform-dev.OceE0X3v.mjs} +4 -4
  17. package/dist/dev/shared/{attaform-dev.Caibt7sb.mjs → attaform-dev.PTGM9KE1.mjs} +6 -6
  18. package/dist/{shared/attaform.8mfKZCwH.mjs → dev/shared/attaform-dev.n6n00owJ.mjs} +49 -128
  19. package/dist/dev/zod-v3.mjs +6 -6
  20. package/dist/dev/zod-v4.mjs +6 -6
  21. package/dist/dev/zod.mjs +5 -5
  22. package/dist/directive.d.mts +2 -2
  23. package/dist/directive.mjs +1 -1
  24. package/dist/history.d.mts +1 -1
  25. package/dist/history.mjs +15 -2
  26. package/dist/index.d.mts +16 -55
  27. package/dist/index.mjs +5 -5
  28. package/dist/runtime/plugins/attaform.mjs +1 -1
  29. package/dist/shared/{attaform.BWUn8Kjy.mjs → attaform.B5b-HmhH.mjs} +18 -9
  30. package/dist/shared/{attaform.CRVe8s82.d.mts → attaform.B9PYKlhB.d.mts} +43 -19
  31. package/dist/shared/{attaform.DxKQsqFZ.mjs → attaform.BPMOl562.mjs} +3 -2
  32. package/dist/{dev/shared/attaform-dev.CZz4GYZ6.mjs → shared/attaform.BPSqtU7a.mjs} +44 -156
  33. package/dist/shared/{attaform.CdZIEf7_.mjs → attaform.BhtAZysa.mjs} +3 -2
  34. package/dist/shared/{attaform.DAo0QBmS.d.mts → attaform.CYlF4P6X.d.mts} +31 -10
  35. package/dist/shared/{attaform.C4shmwyJ.mjs → attaform.CdA9bfRv.mjs} +1 -1
  36. package/dist/shared/{attaform.DNPJPOO7.mjs → attaform.DAf4ehIe.mjs} +569 -134
  37. package/dist/shared/{attaform.D9RqPgGu.d.mts → attaform.DZOynI6c.d.mts} +1 -1
  38. package/dist/shared/{attaform.L011tHgJ.mjs → attaform.KEfNRDot.mjs} +4 -4
  39. package/dist/shared/attaform._1Zp3mDG.mjs +96 -0
  40. package/dist/shared/{attaform.DZnrDrNb.d.mts → attaform.i13OEHJF.d.mts} +60 -7
  41. package/dist/shared/{attaform.DL2nl_QR.mjs → attaform.j9xI_ObC.mjs} +6 -6
  42. package/dist/shared/{attaform.LUPC-2Qg.mjs → attaform.u6jfHoed.mjs} +4 -4
  43. package/dist/zod-v3.d.mts +4 -4
  44. package/dist/zod-v3.mjs +6 -6
  45. package/dist/zod-v4.d.mts +15 -11
  46. package/dist/zod-v4.mjs +6 -6
  47. package/dist/zod.d.mts +4 -4
  48. package/dist/zod.mjs +5 -5
  49. package/package.json +2 -1
  50. package/skills/attaform/SKILL.md +1 -0
@@ -1,5 +1,5 @@
1
1
  import { App } from 'vue';
2
- import { an as RegisterModelDynamicCustomDirective } from './attaform.DZnrDrNb.mjs';
2
+ import { an as RegisterModelDynamicCustomDirective } from './attaform.i13OEHJF.mjs';
3
3
 
4
4
  /**
5
5
  * The `v-register` directive. Bind a form field to a native input, select,
@@ -1,7 +1,7 @@
1
- import { a as InvalidUseFormConfigError } from './attaform.CdZIEf7_.mjs';
2
- import { u as useForm$2 } from './attaform.LUPC-2Qg.mjs';
3
- import { u as useForm$1 } from './attaform.BWUn8Kjy.mjs';
4
- import { i as installingFieldMetaStore, g as getFieldMetaForSchema } from './attaform.DL2nl_QR.mjs';
1
+ import { a as InvalidUseFormConfigError } from './attaform.BhtAZysa.mjs';
2
+ import { u as useForm$2 } from './attaform.u6jfHoed.mjs';
3
+ import { u as useForm$1 } from './attaform.B5b-HmhH.mjs';
4
+ import { i as installingFieldMetaStore, g as getFieldMetaForSchema } from './attaform.j9xI_ObC.mjs';
5
5
 
6
6
  function isZodV4SchemaShape(value) {
7
7
  if (typeof value !== "object" || value === null) return false;
@@ -0,0 +1,96 @@
1
+ function callConsumerFn(fn, fallback, site, detail) {
2
+ try {
3
+ return fn();
4
+ } catch (err) {
5
+ return fallback;
6
+ }
7
+ }
8
+ function readConsumerProp(obj, key) {
9
+ try {
10
+ return obj[key];
11
+ } catch {
12
+ return void 0;
13
+ }
14
+ }
15
+ function consumerKeys(obj) {
16
+ try {
17
+ return Object.keys(obj);
18
+ } catch {
19
+ return [];
20
+ }
21
+ }
22
+ function readConsumerIndex(arr, i) {
23
+ try {
24
+ return arr[i];
25
+ } catch {
26
+ return void 0;
27
+ }
28
+ }
29
+ function consumerSymbolKeys(obj) {
30
+ try {
31
+ return Object.getOwnPropertySymbols(obj);
32
+ } catch {
33
+ return [];
34
+ }
35
+ }
36
+ function consumerHas(obj, key) {
37
+ try {
38
+ return key in obj;
39
+ } catch {
40
+ return false;
41
+ }
42
+ }
43
+
44
+ function safeAssign(target, key, value) {
45
+ if (key === "__proto__") {
46
+ Object.defineProperty(target, key, {
47
+ value,
48
+ writable: true,
49
+ enumerable: true,
50
+ configurable: true
51
+ });
52
+ return;
53
+ }
54
+ target[key] = value;
55
+ }
56
+ const SHADOWED_KEYS = new Set(Object.getOwnPropertyNames(Object.prototype));
57
+ function isShadowedKey(key) {
58
+ return SHADOWED_KEYS.has(key);
59
+ }
60
+ function safeOwnRead(target, key) {
61
+ if (isShadowedKey(key)) {
62
+ const desc = Object.getOwnPropertyDescriptor(target, key);
63
+ if (desc === void 0) return void 0;
64
+ return "value" in desc ? desc.value : readConsumerProp(target, key);
65
+ }
66
+ return readConsumerProp(target, key);
67
+ }
68
+ function safeOwnHas(target, key) {
69
+ try {
70
+ return Object.prototype.hasOwnProperty.call(target, key);
71
+ } catch {
72
+ return false;
73
+ }
74
+ }
75
+ function spreadConsumerRecord(src) {
76
+ try {
77
+ return { ...src };
78
+ } catch {
79
+ const out = {};
80
+ for (const key of Object.keys(src)) {
81
+ safeAssign(out, key, readConsumerProp(src, key));
82
+ }
83
+ return out;
84
+ }
85
+ }
86
+ function copyConsumerArray(src) {
87
+ try {
88
+ return src.slice();
89
+ } catch {
90
+ const out = new Array(src.length);
91
+ for (let i = 0; i < src.length; i++) out[i] = readConsumerIndex(src, i);
92
+ return out;
93
+ }
94
+ }
95
+
96
+ export { safeOwnRead as a, readConsumerProp as b, consumerKeys as c, callConsumerFn as d, safeOwnHas as e, consumerHas as f, spreadConsumerRecord as g, copyConsumerArray as h, isShadowedKey as i, consumerSymbolKeys as j, readConsumerIndex as r, safeAssign as s };
@@ -215,6 +215,25 @@ type OriginalsRecord = {
215
215
  readonly segments: Path;
216
216
  readonly value: unknown;
217
217
  };
218
+ /** Every tracked array's identity tokens and baseline order, by array key. */
219
+ type IdentityOrders = {
220
+ readonly tokens: ReadonlyMap<PathKey, readonly string[]>;
221
+ readonly baselines: ReadonlyMap<PathKey, readonly string[]>;
222
+ };
223
+ /**
224
+ * The per-element bookkeeping a history position puts back with its value.
225
+ * A typed array op moves each element's baseline with its identity and drops
226
+ * a removed element's, as it does the element's blank membership, so a value
227
+ * alone, restored by position, would compare each row against the baseline of
228
+ * whichever row sits there now. With them come the identity orders and the
229
+ * removed-baseline set those baselines are read against. Opaque to the history module, which keeps it and hands it back.
230
+ */
231
+ type StructureSnapshot = {
232
+ readonly identity: IdentityOrders;
233
+ readonly originals: ReadonlyArray<readonly [PathKey, OriginalsRecord]>;
234
+ readonly originalBlank: ReadonlyArray<PathKey>;
235
+ readonly removed: ReadonlyArray<readonly [PathKey, Path]>;
236
+ };
218
237
 
219
238
  /** Internal brand for the `Unset` type. Never exposed at runtime. */
220
239
  declare const _unsetBrand: unique symbol;
@@ -1624,8 +1643,11 @@ type HistoryKernel = {
1624
1643
  readonly blankPaths: Set<PathKey>;
1625
1644
  readonly errorCells: () => Map<PathKey, ErrorCell>;
1626
1645
  onFormChange(listener: (next: unknown, meta?: WriteMeta) => void): () => void;
1646
+ onReset(listener: () => void): () => void;
1627
1647
  applyFormReplacement(next: unknown): void;
1628
1648
  restoreErrorCells(entries: ReadonlyArray<readonly [PathKey, ErrorCell]>): void;
1649
+ captureStructure(): StructureSnapshot;
1650
+ restoreStructure(snapshot: StructureSnapshot): void;
1629
1651
  };
1630
1652
  /**
1631
1653
  * The live undo/redo runtime a {@link HistoryPlugin} attaches to one
@@ -2072,7 +2094,13 @@ type HandleSubmit<Form extends GenericForm> = (onSubmit: OnSubmit<Form>, onError
2072
2094
  * fields appear in friendlier shape on `FieldState`.
2073
2095
  */
2074
2096
  type MetaTrackerValue = {
2075
- /** ISO timestamp of the most recent write at this path. `null` if never written. */
2097
+ /**
2098
+ * ISO timestamp of the most recent write at this path or under it,
2099
+ * counting the form's creation. A removal is a write too, so the stamp
2100
+ * never moves backwards, and every write reads later than the one before
2101
+ * it, whatever the device's clock says. `null` only for a path never
2102
+ * written or no longer present.
2103
+ */
2076
2104
  updatedAt: string | null;
2077
2105
  /** Value as it arrived, before any transforms. Distinguishes a parse-coerced read from raw user input. */
2078
2106
  rawValue: unknown;
@@ -2959,6 +2987,13 @@ type FieldState<Value = unknown> = {
2959
2987
  readonly dirty: boolean;
2960
2988
  readonly focused: boolean | null;
2961
2989
  readonly blurred: boolean | null;
2990
+ /**
2991
+ * `true` once this field has been blurred, with or without an edit.
2992
+ * Sticky thereafter, including through a value round trip; cleared by
2993
+ * `form.reset()` / `form.resetField(path)`. Containers roll it up as
2994
+ * a disjunction, and keep it after the descendant that set it is
2995
+ * removed.
2996
+ */
2962
2997
  readonly touched: boolean;
2963
2998
  /**
2964
2999
  * `true` once the user has issued at least one value edit on this
@@ -2970,7 +3005,8 @@ type FieldState<Value = unknown> = {
2970
3005
  * flips `touched` but never `interacted`. Set only by user input,
2971
3006
  * never by hydration or programmatic `setValue`; cleared by
2972
3007
  * `form.reset()` / `form.resetField(path)`. Containers roll it up as
2973
- * a disjunction (any descendant interacted).
3008
+ * a disjunction (any descendant interacted), and keep it after the
3009
+ * descendant that set it is removed.
2974
3010
  */
2975
3011
  readonly interacted: boolean;
2976
3012
  /**
@@ -2983,7 +3019,8 @@ type FieldState<Value = unknown> = {
2983
3019
  * visible through a re-focus to be fixed live. Set only by user
2984
3020
  * input/blur, never by hydration or programmatic writes; cleared by
2985
3021
  * `form.reset()` / `form.resetField(path)`. Containers roll it up as a
2986
- * disjunction.
3022
+ * disjunction, and keep it after the descendant that set it is
3023
+ * removed.
2987
3024
  */
2988
3025
  readonly blurredAfterInteraction: boolean;
2989
3026
  readonly connected: boolean;
@@ -3019,6 +3056,18 @@ type FieldState<Value = unknown> = {
3019
3056
  * `elements[0] ?? null`.
3020
3057
  */
3021
3058
  readonly elements: readonly HTMLElement[];
3059
+ /**
3060
+ * ISO timestamp of the most recent write at this path or anywhere
3061
+ * under it, counting the form's creation. A removal is a write too, so
3062
+ * a container's stamp moves forward when a row leaves and never moves
3063
+ * backwards. A survivor keeps its own stamp when a removal or a reorder
3064
+ * moves it to a new index, and a write that changes nothing stamps
3065
+ * nothing. Every write that changes a value reads later than the one
3066
+ * before it: two writes in one millisecond, or a write on a device whose
3067
+ * clock runs behind the server that rendered the page, take one
3068
+ * millisecond past the latest stamp the form holds. `null` only for a
3069
+ * path never written or no longer present.
3070
+ */
3022
3071
  readonly updatedAt: string | null;
3023
3072
  /**
3024
3073
  * Every `ValidationError` in this path's SUBTREE: the node's own
@@ -4356,7 +4405,9 @@ type UseFormReturnType<Form extends GenericForm, GetValueFormType extends Generi
4356
4405
  * - the form value back to defaults;
4357
4406
  * - the dirty baseline (so the next edit flips `dirty` correctly);
4358
4407
  * - field errors;
4359
- * - touched / focused / blurred per-field flags;
4408
+ * - the interaction history (`touched` / `interacted` /
4409
+ * `blurredAfterInteraction`) at every path, containers included;
4410
+ * `focused`, `blurred` and `connected` follow the DOM and stay;
4360
4411
  * - submission state (`submitting` / `submissionAttempts` /
4361
4412
  * `submitted` / `submitError`).
4362
4413
  *
@@ -4383,8 +4434,10 @@ type UseFormReturnType<Form extends GenericForm, GetValueFormType extends Generi
4383
4434
  reset: (nextDefaultValues?: DefaultValuesInput<Form>) => void;
4384
4435
  /**
4385
4436
  * Restore a single field (or a sub-tree like `'user'`) to its
4386
- * initial value. Clears errors and touched flags for the field
4387
- * and its descendants; leaves siblings and submission state alone.
4437
+ * initial value. Clears errors and the interaction history
4438
+ * (`touched` / `interacted` / `blurredAfterInteraction`) for the
4439
+ * field and its descendants; leaves siblings, ancestors and
4440
+ * submission state alone.
4388
4441
  *
4389
4442
  * No-op when the path doesn't exist on the form (e.g. a typo'd
4390
4443
  * dynamic key).
@@ -4654,4 +4707,4 @@ type UseFormReturnType<Form extends GenericForm, GetValueFormType extends Generi
4654
4707
  };
4655
4708
 
4656
4709
  export { ROOT_PATH as R, canonicalizePath as ai, isPathPrefix as aj, isUnset as ak, parseDottedPath as al, unset as am, ROOT_PATH_KEY as z };
4657
- export type { SchemaParseErrorWithData as $, AbstractSchema as A, ReactiveValidationStatus as B, CustomDirectiveRegisterAssignerFn 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, ParseOptions as P, RecordPath as Q, RecordValue as S, RegisterDirective as T, UseFormConfiguration as U, RegisterFlatPath as V, RegisterOptions as W, RegisterSelectModifier as X, RegisterTextModifier as Y, RegisterTransform as Z, RegisterValue as _, UseFormReturnType as a, SchemaParseErrorWithoutData as a0, SchemaParseResult as a1, SchemaParseSuccess as a2, Segment as a3, SetValueCallback as a4, SetValuePayload as a5, SettledValidationStatus as a6, SlimPrimitiveKind as a7, SubmitHandler as a8, Unset as a9, ValidateOn as aa, ValidateOnConfig as ab, ValidationError as ac, ValidationResponse as ad, ValidationResponseWithoutValue as ae, ValueOfUnion as af, WriteMeta as ag, WriteShape as ah, RegisterModelDynamicCustomDirective as an, SchemaFactoryOptions as ao, AcceptableDefaults as ap, DisplayCtx as aq, GetDisplayState as ar, DisplayMachine as as, FieldRecord as at, ErrorCell as au, OriginalsRecord as av, AttaformDomBinding as aw, TransformAbortHolder as ax, ArrayItem as b, ArrayPath as c, DeepPartial as d, DefaultValuesShape as e, DisplayState as f, ErrorsProxyShape as g, FieldMetaPayload as h, FieldState as i, FieldStateMap as j, FieldStateMapEntry as k, FlatPath as l, FormErrorRecord as m, FormErrorsSurface as n, FormMeta as o, HistoryPlugin as p, IsUnion as q, Json as r, NestedType as s, OnSubmit as t, PartialFlatPath as u, Path as v, PathKey as w, PendingValidationStatus as x, Primitive as y };
4710
+ export type { SchemaParseErrorWithData as $, AbstractSchema as A, ReactiveValidationStatus as B, CustomDirectiveRegisterAssignerFn 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, ParseOptions as P, RecordPath as Q, RecordValue as S, RegisterDirective as T, UseFormConfiguration as U, RegisterFlatPath as V, RegisterOptions as W, RegisterSelectModifier as X, RegisterTextModifier as Y, RegisterTransform as Z, RegisterValue as _, UseFormReturnType as a, SchemaParseErrorWithoutData as a0, SchemaParseResult as a1, SchemaParseSuccess as a2, Segment as a3, SetValueCallback as a4, SetValuePayload as a5, SettledValidationStatus as a6, SlimPrimitiveKind as a7, SubmitHandler as a8, Unset as a9, ValidateOn as aa, ValidateOnConfig as ab, ValidationError as ac, ValidationResponse as ad, ValidationResponseWithoutValue as ae, ValueOfUnion as af, WriteMeta as ag, WriteShape as ah, RegisterModelDynamicCustomDirective as an, SchemaFactoryOptions as ao, AcceptableDefaults as ap, DisplayCtx as aq, GetDisplayState as ar, DisplayMachine as as, FieldRecord as at, ErrorCell as au, OriginalsRecord as av, StructureSnapshot as aw, AttaformDomBinding as ax, TransformAbortHolder as ay, ArrayItem as b, ArrayPath as c, DeepPartial as d, DefaultValuesShape as e, DisplayState as f, ErrorsProxyShape as g, FieldMetaPayload as h, FieldState as i, FieldStateMap as j, FieldStateMapEntry as k, FlatPath as l, FormErrorRecord as m, FormErrorsSurface as n, FormMeta as o, HistoryPlugin as p, IsUnion as q, Json as r, NestedType as s, OnSubmit as t, PartialFlatPath as u, Path as v, PathKey as w, PendingValidationStatus as x, Primitive as y };
@@ -1,6 +1,6 @@
1
- import { A as AttaformErrorCode, k as isPlainRecord, s as slimKindOf } from './attaform.DNPJPOO7.mjs';
2
- import { e as canonicalizePath, h as SET_MEMBER_SEGMENT } from './attaform.CdZIEf7_.mjs';
3
- import { a as safeOwnRead, b as safeAssign } from './attaform.8mfKZCwH.mjs';
1
+ import { A as AttaformErrorCode, k as isPlainRecord, s as slimKindOf } from './attaform.DAf4ehIe.mjs';
2
+ import { e as canonicalizePath, h as SET_MEMBER_SEGMENT } from './attaform.BhtAZysa.mjs';
3
+ import { a as safeOwnRead, s as safeAssign, e as safeOwnHas } from './attaform._1Zp3mDG.mjs';
4
4
 
5
5
  const PATH_SEPARATOR = ".";
6
6
  function isOpaqueKind(kind) {
@@ -350,7 +350,7 @@ function walkPathSegments(schema, segments, intro, maxDepth, lazyDepth) {
350
350
  switch (kind) {
351
351
  case "object": {
352
352
  const shape = intro.getObjectShape(schema);
353
- if (!Object.hasOwn(shape, head)) return [];
353
+ if (!safeOwnHas(shape, head)) return [];
354
354
  const next = shape[head];
355
355
  return next === void 0 ? [] : walkPathSegments(next, rest, intro, maxDepth, lazyDepth);
356
356
  }
@@ -382,7 +382,7 @@ function walkPathSegments(schema, segments, intro, maxDepth, lazyDepth) {
382
382
  return intro.getUnionOptions(schema).flatMap((opt) => walkPathSegments(opt, segments, intro, maxDepth, lazyDepth));
383
383
  case "discriminated-union": {
384
384
  const options = intro.getDiscriminatedOptions(schema);
385
- const matching = options.filter((opt) => Object.hasOwn(intro.getObjectShape(opt), head));
385
+ const matching = options.filter((opt) => safeOwnHas(intro.getObjectShape(opt), head));
386
386
  const candidates = matching.length > 0 ? matching : options;
387
387
  return candidates.flatMap(
388
388
  (opt) => walkPathSegments(opt, segments, intro, maxDepth, lazyDepth)
@@ -717,7 +717,7 @@ function deriveDefaultWalk(schema, useDefault, intro, maxDepth, lazyDepth = 0) {
717
717
  case "number":
718
718
  return 0;
719
719
  case "bigint":
720
- return 0n;
720
+ return typeof BigInt === "function" ? BigInt(0) : void 0;
721
721
  case "boolean":
722
722
  return false;
723
723
  case "date":
@@ -1,7 +1,7 @@
1
- import { w as walkPathSegments, s as slimPrimitivesWalk, c as createAbstractSchema, a as createSharedSchemaStore, b as buildFieldMetaPathMap, g as getFieldMetaForSchema, f as fixStructuralDefaults, m as mergeDeep, d as deriveDefaultWalk, e as getFieldMetaListForSchema } from './attaform.DL2nl_QR.mjs';
2
- import { h as getAtPath, j as humanize, c as useAbstractForm } from './attaform.DNPJPOO7.mjs';
3
- import { c as callConsumerFn } from './attaform.8mfKZCwH.mjs';
4
- import { A as AttaformError, e as canonicalizePath, a as InvalidUseFormConfigError } from './attaform.CdZIEf7_.mjs';
1
+ import { w as walkPathSegments, s as slimPrimitivesWalk, c as createAbstractSchema, a as createSharedSchemaStore, b as buildFieldMetaPathMap, g as getFieldMetaForSchema, f as fixStructuralDefaults, m as mergeDeep, d as deriveDefaultWalk, e as getFieldMetaListForSchema } from './attaform.j9xI_ObC.mjs';
2
+ import { h as getAtPath, j as humanize, c as useAbstractForm } from './attaform.DAf4ehIe.mjs';
3
+ import { d as callConsumerFn } from './attaform._1Zp3mDG.mjs';
4
+ import { A as AttaformError, e as canonicalizePath, a as InvalidUseFormConfigError } from './attaform.BhtAZysa.mjs';
5
5
 
6
6
  function isZodSchemaType(schema, expectedType) {
7
7
  if (typeof schema !== "object" || schema === null) return false;
package/dist/zod-v3.d.mts CHANGED
@@ -1,10 +1,10 @@
1
1
  import { z } from 'zod';
2
- import { G as GenericForm, F as FormKey, U as UseFormConfiguration, ap as AcceptableDefaults, a as UseFormReturnType, ab as ValidateOnConfig, ao as SchemaFactoryOptions, h as FieldMetaPayload } from './shared/attaform.DZnrDrNb.mjs';
2
+ import { G as GenericForm, F as FormKey, U as UseFormConfiguration, ap as AcceptableDefaults, a as UseFormReturnType, ab as ValidateOnConfig, ao as SchemaFactoryOptions, h as FieldMetaPayload } from './shared/attaform.i13OEHJF.mjs';
3
3
  import { AbstractSchema } from './abstract.mjs';
4
- export { b as ArrayItem, c as ArrayPath, C as CustomDirectiveRegisterAssignerFn, d as DeepPartial, D as DefaultValuesInput, e as DefaultValuesShape, f as DisplayState, E as ErrorInput, g as ErrorsProxyShape, i as FieldState, j as FieldStateMap, k as FieldStateMapEntry, l as FlatPath, m as FormErrorRecord, n as FormErrorsSurface, o as FormMeta, H as HandleSubmit, p as HistoryPlugin, I as IsTuple, q as IsUnion, J as JoinSegments, r as Json, K as KeyofUnion, L as LiftedValueShape, M as MetaTrackerValue, N as NestedReadType, s as NestedType, O as OnError, t as OnSubmit, P as ParseOptions, u as PartialFlatPath, v as Path, w as PathKey, x as PendingValidationStatus, y as Primitive, R as ROOT_PATH, z as ROOT_PATH_KEY, B as ReactiveValidationStatus, Q as RecordPath, S as RecordValue, T as RegisterDirective, V as RegisterFlatPath, W as RegisterOptions, X as RegisterSelectModifier, Y as RegisterTextModifier, Z as RegisterTransform, _ as RegisterValue, $ as SchemaParseErrorWithData, a0 as SchemaParseErrorWithoutData, a1 as SchemaParseResult, a2 as SchemaParseSuccess, a3 as Segment, a4 as SetValueCallback, a5 as SetValuePayload, a6 as SettledValidationStatus, a7 as SlimPrimitiveKind, a8 as SubmitHandler, a9 as Unset, aa as ValidateOn, ac as ValidationError, ad as ValidationResponse, ae as ValidationResponseWithoutValue, af as ValueOfUnion, ag as WriteMeta, ah as WriteShape, ai as canonicalizePath, aj as isPathPrefix, ak as isUnset, al as parseDottedPath, am as unset } from './shared/attaform.DZnrDrNb.mjs';
4
+ export { b as ArrayItem, c as ArrayPath, C as CustomDirectiveRegisterAssignerFn, d as DeepPartial, D as DefaultValuesInput, e as DefaultValuesShape, f as DisplayState, E as ErrorInput, g as ErrorsProxyShape, i as FieldState, j as FieldStateMap, k as FieldStateMapEntry, l as FlatPath, m as FormErrorRecord, n as FormErrorsSurface, o as FormMeta, H as HandleSubmit, p as HistoryPlugin, I as IsTuple, q as IsUnion, J as JoinSegments, r as Json, K as KeyofUnion, L as LiftedValueShape, M as MetaTrackerValue, N as NestedReadType, s as NestedType, O as OnError, t as OnSubmit, P as ParseOptions, u as PartialFlatPath, v as Path, w as PathKey, x as PendingValidationStatus, y as Primitive, R as ROOT_PATH, z as ROOT_PATH_KEY, B as ReactiveValidationStatus, Q as RecordPath, S as RecordValue, T as RegisterDirective, V as RegisterFlatPath, W as RegisterOptions, X as RegisterSelectModifier, Y as RegisterTextModifier, Z as RegisterTransform, _ as RegisterValue, $ as SchemaParseErrorWithData, a0 as SchemaParseErrorWithoutData, a1 as SchemaParseResult, a2 as SchemaParseSuccess, a3 as Segment, a4 as SetValueCallback, a5 as SetValuePayload, a6 as SettledValidationStatus, a7 as SlimPrimitiveKind, a8 as SubmitHandler, a9 as Unset, aa as ValidateOn, ac as ValidationError, ad as ValidationResponse, ae as ValidationResponseWithoutValue, af as ValueOfUnion, ag as WriteMeta, ah as WriteShape, ai as canonicalizePath, aj as isPathPrefix, ak as isUnset, al as parseDottedPath, am as unset } from './shared/attaform.i13OEHJF.mjs';
5
5
  import { S as SupportedRootSchema, U as UnwrapZodRoot, a as StorageShape } from './shared/attaform.B-Tb62qV.mjs';
6
- export { a as AnyForm, b as AttaformDevtoolsBridge, c as AttaformError, d as AttaformErrorCode, e as AttaformPluginOptions, A as AttaformRegistry, C as CompiledStep, D as DEVTOOLS_WINDOW_KEY, F as FormStatus, f as FormStatusSeed, G as GateMarker, I as InjectWizardInput, g as InvalidPathError, h as InvalidUseFormConfigError, L as LazyMarker, O as OutsideSetupError, R as RegistryNotInstalledError, i as ReservedFormKeyError, S as SerializedAttaformState, j as SerializedFormData, k as StepSlot, l as SubmitErrorHandlerError, U as UseRegisterOptions, m 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 escapeForInlineScript, H as gate, J as getRegistryFromApp, K as hydrateAttaformState, M as injectForm, N as injectWizard, P as isRegisterValue, Q as kAttaformRegistry, T as lazy, V as renderAttaformState, X as useRegister, Y as useRegistry, Z as useWizard } from './shared/attaform.DAo0QBmS.mjs';
7
- export { v as vRegister } from './shared/attaform.D9RqPgGu.mjs';
6
+ export { a as AnyForm, b as AttaformDevtoolsBridge, c as AttaformError, d as AttaformErrorCode, e as AttaformPluginOptions, A as AttaformRegistry, C as CompiledStep, D as DEVTOOLS_WINDOW_KEY, F as FormStatus, f as FormStatusSeed, G as GateMarker, I as InjectWizardInput, g as InvalidPathError, h as InvalidUseFormConfigError, L as LazyMarker, O as OutsideSetupError, R as RegistryNotInstalledError, i as ReservedFormKeyError, S as SerializedAttaformState, j as SerializedFormData, k as StepSlot, l as SubmitErrorHandlerError, U as UseRegisterOptions, m 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 escapeForInlineScript, H as gate, J as getRegistryFromApp, K as hydrateAttaformState, M as injectForm, N as injectWizard, P as isRegisterValue, Q as kAttaformRegistry, T as lazy, V as renderAttaformState, X as useRegister, Y as useRegistry, Z as useWizard } from './shared/attaform.CYlF4P6X.mjs';
7
+ export { v as vRegister } from './shared/attaform.DZOynI6c.mjs';
8
8
  import 'vue';
9
9
 
10
10
  /**
package/dist/zod-v3.mjs CHANGED
@@ -1,9 +1,9 @@
1
- export { i as isZodSchemaType, u as useForm, z as zodAdapter } from './shared/attaform.LUPC-2Qg.mjs';
2
- import { i as installingFieldMetaStore, g as getFieldMetaForSchema } from './shared/attaform.DL2nl_QR.mjs';
3
- export { A as AttaformError, I as InvalidPathError, a as InvalidUseFormConfigError, O as OutsideSetupError, R as ROOT_PATH, b as ROOT_PATH_KEY, c as RegistryNotInstalledError, d as ReservedFormKeyError, S as SubmitErrorHandlerError, e as canonicalizePath, i as isPathPrefix, p as parseDottedPath } from './shared/attaform.CdZIEf7_.mjs';
4
- export { A as AttaformErrorCode, e as escapeForInlineScript, g as gate, i as injectForm, a as injectWizard, b as isUnset, l as lazy, u as unset, d as useRegister, f as useWizard } from './shared/attaform.DNPJPOO7.mjs';
5
- export { D as DEVTOOLS_WINDOW_KEY, c as createAttaform, a as createRegistry, g as getRegistryFromApp, h as hydrateAttaformState, k as kAttaformRegistry, r as renderAttaformState, u as useRegistry } from './shared/attaform.C4shmwyJ.mjs';
6
- export { a as assignKey, v as vRegister } from './shared/attaform.DxKQsqFZ.mjs';
1
+ export { i as isZodSchemaType, u as useForm, z as zodAdapter } from './shared/attaform.u6jfHoed.mjs';
2
+ import { i as installingFieldMetaStore, g as getFieldMetaForSchema } from './shared/attaform.j9xI_ObC.mjs';
3
+ export { A as AttaformError, I as InvalidPathError, a as InvalidUseFormConfigError, O as OutsideSetupError, R as ROOT_PATH, b as ROOT_PATH_KEY, c as RegistryNotInstalledError, d as ReservedFormKeyError, S as SubmitErrorHandlerError, e as canonicalizePath, i as isPathPrefix, p as parseDottedPath } from './shared/attaform.BhtAZysa.mjs';
4
+ export { A as AttaformErrorCode, e as escapeForInlineScript, g as gate, i as injectForm, a as injectWizard, b as isUnset, l as lazy, u as unset, d as useRegister, f as useWizard } from './shared/attaform.DAf4ehIe.mjs';
5
+ export { D as DEVTOOLS_WINDOW_KEY, c as createAttaform, a as createRegistry, g as getRegistryFromApp, h as hydrateAttaformState, k as kAttaformRegistry, r as renderAttaformState, u as useRegistry } from './shared/attaform.CdA9bfRv.mjs';
6
+ export { a as assignKey, v as vRegister } from './shared/attaform.BPMOl562.mjs';
7
7
  export { i as isRegisterValue } from './shared/attaform.KvlEedlF.mjs';
8
8
 
9
9
  const fieldMeta = installingFieldMetaStore;
package/dist/zod-v4.d.mts CHANGED
@@ -1,16 +1,18 @@
1
- import { S as SupportedRootSchema } from './shared/attaform.CRVe8s82.mjs';
2
- export { P as PathInput, a as PathOutput, u as useForm } from './shared/attaform.CRVe8s82.mjs';
3
- import { F as FormKey, ao as SchemaFactoryOptions, h as FieldMetaPayload } from './shared/attaform.DZnrDrNb.mjs';
1
+ import { S as SupportedRootSchema, Z as ZodV4Schema } from './shared/attaform.B9PYKlhB.mjs';
2
+ export { P as PathInput, a as PathOutput, u as useForm } from './shared/attaform.B9PYKlhB.mjs';
3
+ import { F as FormKey, ao as SchemaFactoryOptions, h as FieldMetaPayload } from './shared/attaform.i13OEHJF.mjs';
4
4
  import { AbstractSchema } from './abstract.mjs';
5
- export { b as ArrayItem, c as ArrayPath, C as CustomDirectiveRegisterAssignerFn, d as DeepPartial, D as DefaultValuesInput, e as DefaultValuesShape, f as DisplayState, E as ErrorInput, g as ErrorsProxyShape, i as FieldState, j as FieldStateMap, k as FieldStateMapEntry, l as FlatPath, m as FormErrorRecord, n as FormErrorsSurface, o as FormMeta, G as GenericForm, H as HandleSubmit, p as HistoryPlugin, I as IsTuple, q as IsUnion, J as JoinSegments, r as Json, K as KeyofUnion, L as LiftedValueShape, M as MetaTrackerValue, N as NestedReadType, s as NestedType, O as OnError, t as OnSubmit, P as ParseOptions, u as PartialFlatPath, v as Path, w as PathKey, x as PendingValidationStatus, y as Primitive, R as ROOT_PATH, z as ROOT_PATH_KEY, B as ReactiveValidationStatus, Q as RecordPath, S as RecordValue, T as RegisterDirective, V as RegisterFlatPath, W as RegisterOptions, X as RegisterSelectModifier, Y as RegisterTextModifier, Z as RegisterTransform, _ as RegisterValue, $ as SchemaParseErrorWithData, a0 as SchemaParseErrorWithoutData, a1 as SchemaParseResult, a2 as SchemaParseSuccess, a3 as Segment, a4 as SetValueCallback, a5 as SetValuePayload, a6 as SettledValidationStatus, a7 as SlimPrimitiveKind, a8 as SubmitHandler, a9 as Unset, U as UseFormConfiguration, a as UseFormReturnType, aa as ValidateOn, ab as ValidateOnConfig, ac as ValidationError, ad as ValidationResponse, ae as ValidationResponseWithoutValue, af as ValueOfUnion, ag as WriteMeta, ah as WriteShape, ai as canonicalizePath, aj as isPathPrefix, ak as isUnset, al as parseDottedPath, am as unset } from './shared/attaform.DZnrDrNb.mjs';
6
- export { a as AnyForm, b as AttaformDevtoolsBridge, c as AttaformError, d as AttaformErrorCode, e as AttaformPluginOptions, A as AttaformRegistry, C as CompiledStep, D as DEVTOOLS_WINDOW_KEY, F as FormStatus, f as FormStatusSeed, G as GateMarker, I as InjectWizardInput, g as InvalidPathError, h as InvalidUseFormConfigError, L as LazyMarker, O as OutsideSetupError, R as RegistryNotInstalledError, i as ReservedFormKeyError, S as SerializedAttaformState, j as SerializedFormData, k as StepSlot, l as SubmitErrorHandlerError, U as UseRegisterOptions, m 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 escapeForInlineScript, H as gate, J as getRegistryFromApp, K as hydrateAttaformState, M as injectForm, N as injectWizard, P as isRegisterValue, Q as kAttaformRegistry, T as lazy, V as renderAttaformState, X as useRegister, Y as useRegistry, Z as useWizard } from './shared/attaform.DAo0QBmS.mjs';
7
- export { v as vRegister } from './shared/attaform.D9RqPgGu.mjs';
5
+ export { b as ArrayItem, c as ArrayPath, C as CustomDirectiveRegisterAssignerFn, d as DeepPartial, D as DefaultValuesInput, e as DefaultValuesShape, f as DisplayState, E as ErrorInput, g as ErrorsProxyShape, i as FieldState, j as FieldStateMap, k as FieldStateMapEntry, l as FlatPath, m as FormErrorRecord, n as FormErrorsSurface, o as FormMeta, G as GenericForm, H as HandleSubmit, p as HistoryPlugin, I as IsTuple, q as IsUnion, J as JoinSegments, r as Json, K as KeyofUnion, L as LiftedValueShape, M as MetaTrackerValue, N as NestedReadType, s as NestedType, O as OnError, t as OnSubmit, P as ParseOptions, u as PartialFlatPath, v as Path, w as PathKey, x as PendingValidationStatus, y as Primitive, R as ROOT_PATH, z as ROOT_PATH_KEY, B as ReactiveValidationStatus, Q as RecordPath, S as RecordValue, T as RegisterDirective, V as RegisterFlatPath, W as RegisterOptions, X as RegisterSelectModifier, Y as RegisterTextModifier, Z as RegisterTransform, _ as RegisterValue, $ as SchemaParseErrorWithData, a0 as SchemaParseErrorWithoutData, a1 as SchemaParseResult, a2 as SchemaParseSuccess, a3 as Segment, a4 as SetValueCallback, a5 as SetValuePayload, a6 as SettledValidationStatus, a7 as SlimPrimitiveKind, a8 as SubmitHandler, a9 as Unset, U as UseFormConfiguration, a as UseFormReturnType, aa as ValidateOn, ab as ValidateOnConfig, ac as ValidationError, ad as ValidationResponse, ae as ValidationResponseWithoutValue, af as ValueOfUnion, ag as WriteMeta, ah as WriteShape, ai as canonicalizePath, aj as isPathPrefix, ak as isUnset, al as parseDottedPath, am as unset } from './shared/attaform.i13OEHJF.mjs';
6
+ export { a as AnyForm, b as AttaformDevtoolsBridge, c as AttaformError, d as AttaformErrorCode, e as AttaformPluginOptions, A as AttaformRegistry, C as CompiledStep, D as DEVTOOLS_WINDOW_KEY, F as FormStatus, f as FormStatusSeed, G as GateMarker, I as InjectWizardInput, g as InvalidPathError, h as InvalidUseFormConfigError, L as LazyMarker, O as OutsideSetupError, R as RegistryNotInstalledError, i as ReservedFormKeyError, S as SerializedAttaformState, j as SerializedFormData, k as StepSlot, l as SubmitErrorHandlerError, U as UseRegisterOptions, m 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 escapeForInlineScript, H as gate, J as getRegistryFromApp, K as hydrateAttaformState, M as injectForm, N as injectWizard, P as isRegisterValue, Q as kAttaformRegistry, T as lazy, V as renderAttaformState, X as useRegister, Y as useRegistry, Z as useWizard } from './shared/attaform.CYlF4P6X.mjs';
7
+ export { v as vRegister } from './shared/attaform.DZOynI6c.mjs';
8
8
  import { z } from 'zod';
9
9
  import 'vue';
10
10
 
11
11
  /**
12
12
  * The Zod v4 adapter: `AbstractSchema` implemented against Zod v4's
13
- * public surface. Internal `def.*` access is quarantined to
13
+ * public surface, for schemas built by `zod` and by `zod/mini` alike;
14
+ * every node is a `ZodV4Node`, the surface the two builds share.
15
+ * Internal `def.*` access is quarantined to
14
16
  * `introspect.ts` and the modules beside it (default-values,
15
17
  * path-walker, discriminator, errors), leaving this file as the wiring
16
18
  * between them and the `AbstractSchema` contract.
@@ -66,9 +68,9 @@ type ZodKind = 'object' | 'array' | 'set' | 'record' | 'tuple' | 'union' | 'disc
66
68
  declare function kindOf(schema: unknown): ZodKind;
67
69
  /**
68
70
  * Verify a schema is Zod v4, throwing a clear error for a v3 schema
69
- * imported through `attaform/zod` by mistake. The adapter calls it on
70
- * every schema; reach for it directly only in a custom adapter that
71
- * wants the same guard.
71
+ * imported through `attaform/zod` by mistake. The adapter runs the same
72
+ * check on every schema; reach for it directly only in a custom adapter
73
+ * that wants the same guard.
72
74
  */
73
75
  declare function assertZodVersion(schema: unknown): void;
74
76
 
@@ -161,7 +163,9 @@ declare const fieldMeta: ZodFieldMetaRegistry;
161
163
  * several paths and each needs its own payload: the clone per call is
162
164
  * what gives each call site its own registry slot.
163
165
  */
164
- declare function withMeta<S extends z.ZodType>(schema: S, payload: FieldMetaPayload): S;
166
+ declare function withMeta<S extends ZodV4Schema & {
167
+ clone(): S;
168
+ }>(schema: S, payload: FieldMetaPayload): S;
165
169
 
166
170
  export { FieldMetaPayload, FormKey, assertZodVersion, fieldMeta, kindOf, withMeta, zodV4Adapter as zodAdapter };
167
171
  export type { ZodKind };
package/dist/zod-v4.mjs CHANGED
@@ -1,9 +1,9 @@
1
- export { a as assertZodVersion, k as kindOf, u as useForm, z as zodAdapter } from './shared/attaform.BWUn8Kjy.mjs';
2
- import { i as installingFieldMetaStore, g as getFieldMetaForSchema } from './shared/attaform.DL2nl_QR.mjs';
3
- export { A as AttaformError, I as InvalidPathError, a as InvalidUseFormConfigError, O as OutsideSetupError, R as ROOT_PATH, b as ROOT_PATH_KEY, c as RegistryNotInstalledError, d as ReservedFormKeyError, S as SubmitErrorHandlerError, e as canonicalizePath, i as isPathPrefix, p as parseDottedPath } from './shared/attaform.CdZIEf7_.mjs';
4
- export { A as AttaformErrorCode, e as escapeForInlineScript, g as gate, i as injectForm, a as injectWizard, b as isUnset, l as lazy, u as unset, d as useRegister, f as useWizard } from './shared/attaform.DNPJPOO7.mjs';
5
- export { D as DEVTOOLS_WINDOW_KEY, c as createAttaform, a as createRegistry, g as getRegistryFromApp, h as hydrateAttaformState, k as kAttaformRegistry, r as renderAttaformState, u as useRegistry } from './shared/attaform.C4shmwyJ.mjs';
6
- export { a as assignKey, v as vRegister } from './shared/attaform.DxKQsqFZ.mjs';
1
+ export { a as assertZodVersion, k as kindOf, u as useForm, z as zodAdapter } from './shared/attaform.B5b-HmhH.mjs';
2
+ import { i as installingFieldMetaStore, g as getFieldMetaForSchema } from './shared/attaform.j9xI_ObC.mjs';
3
+ export { A as AttaformError, I as InvalidPathError, a as InvalidUseFormConfigError, O as OutsideSetupError, R as ROOT_PATH, b as ROOT_PATH_KEY, c as RegistryNotInstalledError, d as ReservedFormKeyError, S as SubmitErrorHandlerError, e as canonicalizePath, i as isPathPrefix, p as parseDottedPath } from './shared/attaform.BhtAZysa.mjs';
4
+ export { A as AttaformErrorCode, e as escapeForInlineScript, g as gate, i as injectForm, a as injectWizard, b as isUnset, l as lazy, u as unset, d as useRegister, f as useWizard } from './shared/attaform.DAf4ehIe.mjs';
5
+ export { D as DEVTOOLS_WINDOW_KEY, c as createAttaform, a as createRegistry, g as getRegistryFromApp, h as hydrateAttaformState, k as kAttaformRegistry, r as renderAttaformState, u as useRegistry } from './shared/attaform.CdA9bfRv.mjs';
6
+ export { a as assignKey, v as vRegister } from './shared/attaform.BPMOl562.mjs';
7
7
  export { i as isRegisterValue } from './shared/attaform.KvlEedlF.mjs';
8
8
 
9
9
  const fieldMeta = installingFieldMetaStore;
package/dist/zod.d.mts CHANGED
@@ -1,8 +1,8 @@
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 DEVTOOLS_WINDOW_KEY, F as FormStatus, f as FormStatusSeed, G as GateMarker, I as InjectWizardInput, g as InvalidPathError, h as InvalidUseFormConfigError, L as LazyMarker, O as OutsideSetupError, R as RegistryNotInstalledError, i as ReservedFormKeyError, S as SerializedAttaformState, j as SerializedFormData, k as StepSlot, l as SubmitErrorHandlerError, U as UseRegisterOptions, m 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 escapeForInlineScript, H as gate, J as getRegistryFromApp, K as hydrateAttaformState, M as injectForm, N as injectWizard, P as isRegisterValue, Q as kAttaformRegistry, T as lazy, V as renderAttaformState, X as useRegister, Y as useRegistry, Z as useWizard } from './shared/attaform.DAo0QBmS.mjs';
2
- export { b as ArrayItem, c as ArrayPath, C as CustomDirectiveRegisterAssignerFn, d as DeepPartial, D as DefaultValuesInput, e as DefaultValuesShape, f as DisplayState, E as ErrorInput, g as ErrorsProxyShape, h as FieldMetaPayload, i as FieldState, j as FieldStateMap, k as FieldStateMapEntry, l as FlatPath, m as FormErrorRecord, n as FormErrorsSurface, F as FormKey, o as FormMeta, G as GenericForm, H as HandleSubmit, p as HistoryPlugin, I as IsTuple, q as IsUnion, J as JoinSegments, r as Json, K as KeyofUnion, L as LiftedValueShape, M as MetaTrackerValue, N as NestedReadType, s as NestedType, O as OnError, t as OnSubmit, P as ParseOptions, u as PartialFlatPath, v as Path, w as PathKey, x as PendingValidationStatus, y as Primitive, R as ROOT_PATH, z as ROOT_PATH_KEY, B as ReactiveValidationStatus, Q as RecordPath, S as RecordValue, T as RegisterDirective, V as RegisterFlatPath, W as RegisterOptions, X as RegisterSelectModifier, Y as RegisterTextModifier, Z as RegisterTransform, _ as RegisterValue, $ as SchemaParseErrorWithData, a0 as SchemaParseErrorWithoutData, a1 as SchemaParseResult, a2 as SchemaParseSuccess, a3 as Segment, a4 as SetValueCallback, a5 as SetValuePayload, a6 as SettledValidationStatus, a7 as SlimPrimitiveKind, a8 as SubmitHandler, a9 as Unset, U as UseFormConfiguration, a as UseFormReturnType, aa as ValidateOn, ab as ValidateOnConfig, ac as ValidationError, ad as ValidationResponse, ae as ValidationResponseWithoutValue, af as ValueOfUnion, ag as WriteMeta, ah as WriteShape, ai as canonicalizePath, aj as isPathPrefix, ak as isUnset, al as parseDottedPath, am as unset } from './shared/attaform.DZnrDrNb.mjs';
3
- export { v as vRegister } from './shared/attaform.D9RqPgGu.mjs';
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 DEVTOOLS_WINDOW_KEY, F as FormStatus, f as FormStatusSeed, G as GateMarker, I as InjectWizardInput, g as InvalidPathError, h as InvalidUseFormConfigError, L as LazyMarker, O as OutsideSetupError, R as RegistryNotInstalledError, i as ReservedFormKeyError, S as SerializedAttaformState, j as SerializedFormData, k as StepSlot, l as SubmitErrorHandlerError, U as UseRegisterOptions, m 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 escapeForInlineScript, H as gate, J as getRegistryFromApp, K as hydrateAttaformState, M as injectForm, N as injectWizard, P as isRegisterValue, Q as kAttaformRegistry, T as lazy, V as renderAttaformState, X as useRegister, Y as useRegistry, Z as useWizard } from './shared/attaform.CYlF4P6X.mjs';
2
+ export { b as ArrayItem, c as ArrayPath, C as CustomDirectiveRegisterAssignerFn, d as DeepPartial, D as DefaultValuesInput, e as DefaultValuesShape, f as DisplayState, E as ErrorInput, g as ErrorsProxyShape, h as FieldMetaPayload, i as FieldState, j as FieldStateMap, k as FieldStateMapEntry, l as FlatPath, m as FormErrorRecord, n as FormErrorsSurface, F as FormKey, o as FormMeta, G as GenericForm, H as HandleSubmit, p as HistoryPlugin, I as IsTuple, q as IsUnion, J as JoinSegments, r as Json, K as KeyofUnion, L as LiftedValueShape, M as MetaTrackerValue, N as NestedReadType, s as NestedType, O as OnError, t as OnSubmit, P as ParseOptions, u as PartialFlatPath, v as Path, w as PathKey, x as PendingValidationStatus, y as Primitive, R as ROOT_PATH, z as ROOT_PATH_KEY, B as ReactiveValidationStatus, Q as RecordPath, S as RecordValue, T as RegisterDirective, V as RegisterFlatPath, W as RegisterOptions, X as RegisterSelectModifier, Y as RegisterTextModifier, Z as RegisterTransform, _ as RegisterValue, $ as SchemaParseErrorWithData, a0 as SchemaParseErrorWithoutData, a1 as SchemaParseResult, a2 as SchemaParseSuccess, a3 as Segment, a4 as SetValueCallback, a5 as SetValuePayload, a6 as SettledValidationStatus, a7 as SlimPrimitiveKind, a8 as SubmitHandler, a9 as Unset, U as UseFormConfiguration, a as UseFormReturnType, aa as ValidateOn, ab as ValidateOnConfig, ac as ValidationError, ad as ValidationResponse, ae as ValidationResponseWithoutValue, af as ValueOfUnion, ag as WriteMeta, ah as WriteShape, ai as canonicalizePath, aj as isPathPrefix, ak as isUnset, al as parseDottedPath, am as unset } from './shared/attaform.i13OEHJF.mjs';
3
+ export { v as vRegister } from './shared/attaform.DZOynI6c.mjs';
4
4
  export { UseFormConfig, UseFormConfigV3, UseFormConfigV4, UseFormReturn, UseFormReturnV3, UseFormReturnV4, fieldMeta, useForm, withMeta } from './index.mjs';
5
- export { P as PathInput, a as PathOutput } from './shared/attaform.CRVe8s82.mjs';
5
+ export { P as PathInput, a as PathOutput } from './shared/attaform.B9PYKlhB.mjs';
6
6
  import 'vue';
7
7
  import './shared/attaform.B-Tb62qV.mjs';
8
8
  import 'zod';
package/dist/zod.mjs CHANGED
@@ -1,6 +1,6 @@
1
- export { A as AttaformError, I as InvalidPathError, a as InvalidUseFormConfigError, O as OutsideSetupError, R as ROOT_PATH, b as ROOT_PATH_KEY, c as RegistryNotInstalledError, d as ReservedFormKeyError, S as SubmitErrorHandlerError, e as canonicalizePath, i as isPathPrefix, p as parseDottedPath } from './shared/attaform.CdZIEf7_.mjs';
2
- export { A as AttaformErrorCode, e as escapeForInlineScript, g as gate, i as injectForm, a as injectWizard, b as isUnset, l as lazy, u as unset, d as useRegister, f as useWizard } from './shared/attaform.DNPJPOO7.mjs';
3
- export { D as DEVTOOLS_WINDOW_KEY, c as createAttaform, a as createRegistry, g as getRegistryFromApp, h as hydrateAttaformState, k as kAttaformRegistry, r as renderAttaformState, u as useRegistry } from './shared/attaform.C4shmwyJ.mjs';
4
- export { a as assignKey, v as vRegister } from './shared/attaform.DxKQsqFZ.mjs';
5
- export { f as fieldMeta, u as useForm, w as withMeta } from './shared/attaform.L011tHgJ.mjs';
1
+ export { A as AttaformError, I as InvalidPathError, a as InvalidUseFormConfigError, O as OutsideSetupError, R as ROOT_PATH, b as ROOT_PATH_KEY, c as RegistryNotInstalledError, d as ReservedFormKeyError, S as SubmitErrorHandlerError, e as canonicalizePath, i as isPathPrefix, p as parseDottedPath } from './shared/attaform.BhtAZysa.mjs';
2
+ export { A as AttaformErrorCode, e as escapeForInlineScript, g as gate, i as injectForm, a as injectWizard, b as isUnset, l as lazy, u as unset, d as useRegister, f as useWizard } from './shared/attaform.DAf4ehIe.mjs';
3
+ export { D as DEVTOOLS_WINDOW_KEY, c as createAttaform, a as createRegistry, g as getRegistryFromApp, h as hydrateAttaformState, k as kAttaformRegistry, r as renderAttaformState, u as useRegistry } from './shared/attaform.CdA9bfRv.mjs';
4
+ export { a as assignKey, v as vRegister } from './shared/attaform.BPMOl562.mjs';
5
+ export { f as fieldMeta, u as useForm, w as withMeta } from './shared/attaform.KEfNRDot.mjs';
6
6
  export { i as isRegisterValue } from './shared/attaform.KvlEedlF.mjs';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "attaform",
3
- "version": "0.31.0",
3
+ "version": "0.31.1",
4
4
  "types": "./dist/index.d.mts",
5
5
  "files": [
6
6
  "dist",
@@ -233,6 +233,7 @@
233
233
  "bench:delta": "node scripts/bench-delta.mjs",
234
234
  "check:bundled-types": "node scripts/check-bundled-types.mjs",
235
235
  "check:doc-snippets": "node scripts/check-doc-snippets.mjs",
236
+ "check:browser-floor": "node scripts/check-browser-floor.mjs",
236
237
  "check:comment-only": "node scripts/check-comment-only.mjs",
237
238
  "check:site": "pnpm dev:prepare && pnpm --filter attaform-site typecheck",
238
239
  "fallow": "DO_NOT_TRACK=1 FALLOW_TELEMETRY=0 npx --yes fallow@2.88.3 --score",
@@ -31,6 +31,7 @@ import {
31
31
  - **Do not import `useForm` from `attaform/abstract`.** That entry is the bring-your-own-adapter escape hatch: it exports `useAbstractForm`, which needs a schema adapter wired by hand. A Zod project wants `useForm` from `attaform`. This mismatch is the single most common first-try mistake.
32
32
  - Types come from the same barrel: `import type { AnyForm, WizardCtx, Json, ValidationError } from 'attaform'`.
33
33
  - `attaform/zod` is the same surface named explicitly; `attaform/zod-v3` and `attaform/zod-v4` pin a Zod major. Any of these works; default to `attaform`.
34
+ - A `zod/mini` schema (`import * as z from 'zod/mini'`) works on every v4 entry with the same API, types and behavior as classic `zod`. Mini loads no locale, so give each check its own message or call `z.config(z.locales.en())` once at startup; otherwise unmessaged checks report `Invalid input`.
34
35
  - In **Nuxt** with the module installed (`attaform/nuxt`), the whole block above auto-imports and the `v-register` directive is bound into each compiled template, so a component needs no import lines at all. Writing them anyway is always safe and always portable: an explicit import beats an auto-import of the same name, which is why every snippet below keeps its import line. In **plain Vite**, add the Attaform plugin from `attaform/vite` (it binds `v-register` the same way) plus the auto-import preset it exports. Without either build plugin, register the directive once per app: `import { installVRegister } from 'attaform/directive'` then `installVRegister(app)`.
35
36
  - Undo/redo ships from its own entry: `import { historyPlugin } from 'attaform/history'`, then `useForm({ schema, history: historyPlugin({ max: 200 }) })` unlocks a live `form.history` namespace (`undo` / `redo` / `clear` / `canUndo` / `canRedo` / `size`). Without the plugin the namespace is inert stubs.
36
37