attaform 0.27.4 → 0.27.6

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 (70) hide show
  1. package/dist/abstract.cjs +2 -2
  2. package/dist/abstract.d.cts +4 -4
  3. package/dist/abstract.d.mts +4 -4
  4. package/dist/abstract.d.ts +4 -4
  5. package/dist/abstract.mjs +2 -2
  6. package/dist/chunks/devtools.cjs +1 -1
  7. package/dist/chunks/devtools.mjs +1 -1
  8. package/dist/chunks/fingerprint2.cjs +1 -1
  9. package/dist/chunks/fingerprint2.mjs +1 -1
  10. package/dist/index.cjs +3 -3
  11. package/dist/index.d.cts +5 -5
  12. package/dist/index.d.mts +5 -5
  13. package/dist/index.d.ts +5 -5
  14. package/dist/index.mjs +3 -3
  15. package/dist/nuxt.d.cts +1 -1
  16. package/dist/nuxt.d.mts +1 -1
  17. package/dist/nuxt.d.ts +1 -1
  18. package/dist/runtime/plugins/attaform.cjs +1 -1
  19. package/dist/runtime/plugins/attaform.mjs +1 -1
  20. package/dist/shared/{attaform.BrVzB14N.mjs → attaform.B1ZYt2Li.mjs} +4 -4
  21. package/dist/shared/{attaform.BrVzB14N.mjs.map → attaform.B1ZYt2Li.mjs.map} +1 -1
  22. package/dist/shared/{attaform.C9arOC5p.cjs → attaform.B9Wyhfro.cjs} +5 -5
  23. package/dist/shared/{attaform.C9arOC5p.cjs.map → attaform.B9Wyhfro.cjs.map} +1 -1
  24. package/dist/shared/{attaform.C925L0WA.d.mts → attaform.BGDV42hI.d.cts} +1 -1
  25. package/dist/shared/{attaform.BBaMFa-k.cjs → attaform.Biytrv0-.cjs} +3 -3
  26. package/dist/shared/{attaform.CgsQZdy1.mjs.map → attaform.Biytrv0-.cjs.map} +1 -1
  27. package/dist/shared/{attaform.DKtXMaJB.d.ts → attaform.CHlJLAiv.d.mts} +18 -2
  28. package/dist/shared/{attaform.CuUx4jWI.mjs → attaform.CKH2lGdL.mjs} +90 -9
  29. package/dist/shared/attaform.CKH2lGdL.mjs.map +1 -0
  30. package/dist/shared/{attaform.a1GnhjVk.mjs → attaform.CoR4mWfv.mjs} +3 -3
  31. package/dist/shared/{attaform.a1GnhjVk.mjs.map → attaform.CoR4mWfv.mjs.map} +1 -1
  32. package/dist/shared/{attaform.CX2NHAFs.cjs → attaform.D6tk90Rc.cjs} +3 -3
  33. package/dist/shared/{attaform.CX2NHAFs.cjs.map → attaform.D6tk90Rc.cjs.map} +1 -1
  34. package/dist/shared/{attaform.B3spfqIA.cjs → attaform.D8kliaKw.cjs} +4 -4
  35. package/dist/shared/{attaform.B3spfqIA.cjs.map → attaform.D8kliaKw.cjs.map} +1 -1
  36. package/dist/shared/{attaform.CnvbLiIO.d.cts → attaform.DLknk9nF.d.mts} +1 -1
  37. package/dist/shared/{attaform.shkNCMEz.mjs → attaform.DMxM2kol.mjs} +4 -4
  38. package/dist/shared/{attaform.shkNCMEz.mjs.map → attaform.DMxM2kol.mjs.map} +1 -1
  39. package/dist/shared/{attaform.CC4KCx_q.mjs → attaform.DYEr28Pt.mjs} +5 -5
  40. package/dist/shared/{attaform.CC4KCx_q.mjs.map → attaform.DYEr28Pt.mjs.map} +1 -1
  41. package/dist/shared/{attaform.DXwJVUNS.cjs → attaform.DdQN7sgN.cjs} +4 -4
  42. package/dist/shared/{attaform.DXwJVUNS.cjs.map → attaform.DdQN7sgN.cjs.map} +1 -1
  43. package/dist/shared/{attaform.BIPSHY5U.d.cts → attaform.DniawQLP.d.cts} +68 -11
  44. package/dist/shared/{attaform.BIPSHY5U.d.mts → attaform.DniawQLP.d.mts} +68 -11
  45. package/dist/shared/{attaform.BIPSHY5U.d.ts → attaform.DniawQLP.d.ts} +68 -11
  46. package/dist/shared/{attaform.Ib2seKUE.cjs → attaform.DrvMscNX.cjs} +90 -9
  47. package/dist/shared/attaform.DrvMscNX.cjs.map +1 -0
  48. package/dist/shared/{attaform.Cjh6b6xU.d.cts → attaform.F2Q8iv38.d.ts} +18 -2
  49. package/dist/shared/{attaform.gj8dtOlx.d.mts → attaform.FmqKO1Ex.d.cts} +18 -2
  50. package/dist/shared/{attaform.C8zVmank.d.ts → attaform.Fp3sCrVs.d.ts} +1 -1
  51. package/dist/shared/{attaform.CgsQZdy1.mjs → attaform.nMaz2C5P.mjs} +3 -3
  52. package/dist/shared/{attaform.BBaMFa-k.cjs.map → attaform.nMaz2C5P.mjs.map} +1 -1
  53. package/dist/zod-v3.cjs +3 -3
  54. package/dist/zod-v3.d.cts +3 -3
  55. package/dist/zod-v3.d.mts +3 -3
  56. package/dist/zod-v3.d.ts +3 -3
  57. package/dist/zod-v3.mjs +3 -3
  58. package/dist/zod-v4.cjs +3 -3
  59. package/dist/zod-v4.d.cts +6 -6
  60. package/dist/zod-v4.d.mts +6 -6
  61. package/dist/zod-v4.d.ts +6 -6
  62. package/dist/zod-v4.mjs +3 -3
  63. package/dist/zod.cjs +3 -3
  64. package/dist/zod.d.cts +3 -3
  65. package/dist/zod.d.mts +3 -3
  66. package/dist/zod.d.ts +3 -3
  67. package/dist/zod.mjs +3 -3
  68. package/package.json +1 -1
  69. package/dist/shared/attaform.CuUx4jWI.mjs.map +0 -1
  70. package/dist/shared/attaform.Ib2seKUE.cjs.map +0 -1
@@ -1,4 +1,4 @@
1
- import { G as GenericForm, F as FormKey, a as UseFormReturnType, a4 as RegisterValue, T as PathKey, k as DisplayCtx, w as GetDisplayState, l as DisplayMachine, S as Path, a9 as SlimPrimitiveKind, C as CoercionEntry, e as CoercionRegistry, af as ValidationError, A as AbstractSchema, aj as WriteMeta, h as DeepPartial, ak as WriteShape, as as TransformAbortHolder, ad as ValidateOn, d as AttaformDefaults, at as RegisterModelDynamicCustomDirective } from './attaform.BIPSHY5U.cjs';
1
+ import { G as GenericForm, F as FormKey, a as UseFormReturnType, a4 as RegisterValue, T as PathKey, k as DisplayCtx, w as GetDisplayState, l as DisplayMachine, S as Path, a9 as SlimPrimitiveKind, C as CoercionEntry, e as CoercionRegistry, af as ValidationError, A as AbstractSchema, aj as WriteMeta, h as DeepPartial, ak as WriteShape, as as TransformAbortHolder, ad as ValidateOn, d as AttaformDefaults, at as RegisterModelDynamicCustomDirective } from './attaform.DniawQLP.js';
2
2
  import { Ref, ComputedRef, App, InjectionKey, Plugin } from 'vue';
3
3
 
4
4
  /**
@@ -758,6 +758,16 @@ type FormStore<F extends GenericForm, G extends GenericForm = F> = {
758
758
  * does not mutate value / focused / blurred or trigger validation.
759
759
  */
760
760
  touchAtPath(segments: Path): void;
761
+ /**
762
+ * Walk every active-variant leaf under `segments` and flip the full
763
+ * interaction ladder (`touched` / `interacted` /
764
+ * `blurredAfterInteraction`), as though the user had focused,
765
+ * edited, and left each one. Powers `form.interact(path?)`.
766
+ * Idempotent; does not mutate value / focused / blurred. Returns
767
+ * whether any leaf resolved, so the caller can skip validation and
768
+ * dev-warn on an empty path.
769
+ */
770
+ interactAtPath(segments: Path): boolean;
761
771
  /**
762
772
  * SSR-only optimistic mark: flip `connected: true` on the field
763
773
  * record without an actual DOM element. Called by the `vRegisterHint`
@@ -773,8 +783,14 @@ type FormStore<F extends GenericForm, G extends GenericForm = F> = {
773
783
  * (a composite widget, or none found). The directive calls it on mount
774
784
  * (`true`) and unmount (`false`). Distinct from the SSR-only
775
785
  * `markConnectedOptimistically`; idempotent on the leading edge.
786
+ *
787
+ * `hostEl` (the host root) is recorded on connect as this path's
788
+ * focus-first-error anchor, scoped to `formInstanceId` the same way a
789
+ * registered control is. A no-latch host enters no `elements` record, so
790
+ * without this it is absent from `getFirstErrorElement`'s walk; the anchor
791
+ * lets that walk resolve a focus target from the host subtree.
776
792
  */
777
- markHostConnected(path: Path, connected: boolean): void;
793
+ markHostConnected(path: Path, connected: boolean, hostEl: HTMLElement, formInstanceId: string): void;
778
794
  /**
779
795
  * Leaf-only pristine check. `originals` is populated via
780
796
  * `diffAndApply`'s `added` patches, which fire only on primitive
@@ -1,4 +1,4 @@
1
- import { G as GenericForm, F as FormKey, a as UseFormReturnType, a4 as RegisterValue, T as PathKey, k as DisplayCtx, w as GetDisplayState, l as DisplayMachine, S as Path, a9 as SlimPrimitiveKind, C as CoercionEntry, e as CoercionRegistry, af as ValidationError, A as AbstractSchema, aj as WriteMeta, h as DeepPartial, ak as WriteShape, as as TransformAbortHolder, ad as ValidateOn, d as AttaformDefaults, at as RegisterModelDynamicCustomDirective } from './attaform.BIPSHY5U.mjs';
1
+ import { G as GenericForm, F as FormKey, a as UseFormReturnType, a4 as RegisterValue, T as PathKey, k as DisplayCtx, w as GetDisplayState, l as DisplayMachine, S as Path, a9 as SlimPrimitiveKind, C as CoercionEntry, e as CoercionRegistry, af as ValidationError, A as AbstractSchema, aj as WriteMeta, h as DeepPartial, ak as WriteShape, as as TransformAbortHolder, ad as ValidateOn, d as AttaformDefaults, at as RegisterModelDynamicCustomDirective } from './attaform.DniawQLP.cjs';
2
2
  import { Ref, ComputedRef, App, InjectionKey, Plugin } from 'vue';
3
3
 
4
4
  /**
@@ -758,6 +758,16 @@ type FormStore<F extends GenericForm, G extends GenericForm = F> = {
758
758
  * does not mutate value / focused / blurred or trigger validation.
759
759
  */
760
760
  touchAtPath(segments: Path): void;
761
+ /**
762
+ * Walk every active-variant leaf under `segments` and flip the full
763
+ * interaction ladder (`touched` / `interacted` /
764
+ * `blurredAfterInteraction`), as though the user had focused,
765
+ * edited, and left each one. Powers `form.interact(path?)`.
766
+ * Idempotent; does not mutate value / focused / blurred. Returns
767
+ * whether any leaf resolved, so the caller can skip validation and
768
+ * dev-warn on an empty path.
769
+ */
770
+ interactAtPath(segments: Path): boolean;
761
771
  /**
762
772
  * SSR-only optimistic mark: flip `connected: true` on the field
763
773
  * record without an actual DOM element. Called by the `vRegisterHint`
@@ -773,8 +783,14 @@ type FormStore<F extends GenericForm, G extends GenericForm = F> = {
773
783
  * (a composite widget, or none found). The directive calls it on mount
774
784
  * (`true`) and unmount (`false`). Distinct from the SSR-only
775
785
  * `markConnectedOptimistically`; idempotent on the leading edge.
786
+ *
787
+ * `hostEl` (the host root) is recorded on connect as this path's
788
+ * focus-first-error anchor, scoped to `formInstanceId` the same way a
789
+ * registered control is. A no-latch host enters no `elements` record, so
790
+ * without this it is absent from `getFirstErrorElement`'s walk; the anchor
791
+ * lets that walk resolve a focus target from the host subtree.
776
792
  */
777
- markHostConnected(path: Path, connected: boolean): void;
793
+ markHostConnected(path: Path, connected: boolean, hostEl: HTMLElement, formInstanceId: string): void;
778
794
  /**
779
795
  * Leaf-only pristine check. `originals` is populated via
780
796
  * `diffAndApply`'s `added` patches, which fire only on primitive
@@ -1,5 +1,5 @@
1
1
  import { z } from 'zod';
2
- import { G as GenericForm, s as FlatPath, B as NestedType, F as FormKey, U as UseFormConfiguration, A as AbstractSchema, aq as AcceptableDefaults, ae as ValidateOnConfig, a as UseFormReturnType } from './attaform.BIPSHY5U.js';
2
+ import { G as GenericForm, s as FlatPath, B as NestedType, F as FormKey, U as UseFormConfiguration, A as AbstractSchema, aq as AcceptableDefaults, ae as ValidateOnConfig, a as UseFormReturnType } from './attaform.DniawQLP.js';
3
3
 
4
4
  /**
5
5
  * The Zod v4 schema roots `useForm` accepts. A fixed-shape
@@ -1380,7 +1380,7 @@ function latchHostControl(el, rv, control) {
1380
1380
  componentHostLatch.set(el, control);
1381
1381
  }
1382
1382
  function setupNoLatchHost(el, rv) {
1383
- rv.markHostConnected(true);
1383
+ rv.markHostConnected(true, el);
1384
1384
  const focusin = (event) => {
1385
1385
  const from = event.relatedTarget;
1386
1386
  if (from instanceof Node && el.contains(from)) return;
@@ -1510,7 +1510,7 @@ const vRegisterDynamic = {
1510
1510
  if (latchedControl != null) {
1511
1511
  teardownAria(latchedControl);
1512
1512
  value.deregisterElement(latchedControl);
1513
- } else value.markHostConnected(false);
1513
+ } else value.markHostConnected(false, el);
1514
1514
  componentHostLatch.delete(el);
1515
1515
  }
1516
1516
  delete el.composing;
@@ -1672,4 +1672,4 @@ function hydrateAttaformState(app, payload) {
1672
1672
  const DEVTOOLS_WINDOW_KEY = "__attaform_devtools__";
1673
1673
 
1674
1674
  export { AttaformError as A, kFormContext as B, kFormInstanceId as C, DEVTOOLS_WINDOW_KEY as D, kAttaformAncestorWizard as E, InvalidPathError as I, OutsideSetupError as O, ROOT_PATH as R, SubmitErrorHandlerError as S, __DEV__ as _, InvalidUseFormConfigError as a, ROOT_PATH_KEY as b, RegistryNotInstalledError as c, ReservedFormKeyError as d, assignKey as e, canonicalizePath as f, createAttaform as g, createRegistry as h, getRegistryFromApp as i, hydrateAttaformState as j, isPathPrefix as k, kAttaformRegistry as l, kAttaformWizardActiveStepResolver as m, pathsEqual as n, keyForSegments as o, parseDottedPath as p, normalizeErrorInput as q, renderAttaformState as r, segmentsForPathKey as s, toError as t, useRegistry as u, vRegister as v, INTERACTIVE_TAG_NAMES as w, normalizeErrorInputs as x, coerceToPathKey as y, ensureAttaformInstalled as z };
1675
- //# sourceMappingURL=attaform.CgsQZdy1.mjs.map
1675
+ //# sourceMappingURL=attaform.nMaz2C5P.mjs.map