attaform 0.30.0 → 0.30.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 (67) hide show
  1. package/dist/abstract.d.mts +15 -21
  2. package/dist/abstract.mjs +2 -2
  3. package/dist/dev/abstract.mjs +4 -4
  4. package/dist/dev/chunks/devtools.mjs +2 -2
  5. package/dist/dev/directive.mjs +1 -1
  6. package/dist/dev/history.mjs +1 -1
  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.BK6Ge2qR.mjs → attaform-dev.BJK1kqHY.mjs} +14 -14
  10. package/dist/dev/shared/{attaform-dev.D6CLvaQT.mjs → attaform-dev.BMQ3GcgD.mjs} +46 -59
  11. package/dist/dev/shared/{attaform-dev.BisFstxh.mjs → attaform-dev.BUIFcTYf.mjs} +6 -6
  12. package/dist/dev/shared/{attaform-dev.DTrHonpc.mjs → attaform-dev.CT7MDjPy.mjs} +27 -36
  13. package/dist/dev/shared/{attaform-dev.BcYT6tFh.mjs → attaform-dev.CZz4GYZ6.mjs} +21 -9
  14. package/dist/dev/shared/{attaform-dev.DUZckyV8.mjs → attaform-dev.Chm4D6SJ.mjs} +2 -2
  15. package/dist/dev/shared/{attaform-dev.BcNtyOmf.mjs → attaform-dev.DuEE4GU1.mjs} +4 -4
  16. package/dist/dev/shared/{attaform-dev.CQ2rJiAX.mjs → attaform-dev.DxHdkkPG.mjs} +126 -115
  17. package/dist/dev/shared/{attaform-dev.BQc5QV3Y.mjs → attaform-dev.zlvDr0WB.mjs} +2 -2
  18. package/dist/dev/zod-v3.mjs +6 -6
  19. package/dist/dev/zod-v4.mjs +6 -6
  20. package/dist/dev/zod.mjs +5 -5
  21. package/dist/directive.d.mts +4 -4
  22. package/dist/directive.mjs +1 -1
  23. package/dist/esbuild.d.mts +11 -0
  24. package/dist/esbuild.mjs +1 -1
  25. package/dist/history.d.mts +3 -32
  26. package/dist/history.mjs +1 -1
  27. package/dist/index.d.mts +67 -70
  28. package/dist/index.mjs +3 -3
  29. package/dist/nuxt.d.mts +4 -3
  30. package/dist/nuxt.mjs +3 -6
  31. package/dist/rollup.d.mts +11 -0
  32. package/dist/rollup.mjs +1 -1
  33. package/dist/rspack.d.mts +19 -11
  34. package/dist/rspack.mjs +1 -1
  35. package/dist/runtime/components/AttaformDevtoolsPanel.vue +12 -12
  36. package/dist/runtime/components/DevtoolsValueTree.vue +2 -2
  37. package/dist/shared/{attaform.Rc9u4Vfw.d.mts → attaform.2FslhB9R.d.mts} +83 -95
  38. package/dist/shared/{attaform.BRDDQeHV.mjs → attaform.8mfKZCwH.mjs} +2 -2
  39. package/dist/shared/{attaform.DRUT703x.d.mts → attaform.B-Tb62qV.d.mts} +12 -12
  40. package/dist/shared/{attaform.v0fQtWyA.mjs → attaform.B1rH9ht6.mjs} +1 -1
  41. package/dist/shared/{attaform.ByWP6kSx.mjs → attaform.B2iebkPA.mjs} +3 -3
  42. package/dist/shared/{attaform.DhnPb6nK.mjs → attaform.BAf3UNn4.mjs} +1 -1
  43. package/dist/shared/{attaform.DNJOWjQw.mjs → attaform.BIWicztt.mjs} +102 -100
  44. package/dist/shared/attaform.BcQwgWaq.d.mts +2153 -0
  45. package/dist/shared/attaform.Br8EBn5B.d.mts +4553 -0
  46. package/dist/shared/{attaform.BXneBxEj.mjs → attaform.CO918TdU.mjs} +13 -13
  47. package/dist/shared/{attaform.CUfrMK7t.mjs → attaform.DRsANMok.mjs} +5 -5
  48. package/dist/shared/{attaform.B3resMQ1.mjs → attaform.D_f1WgYf.mjs} +40 -53
  49. package/dist/shared/{attaform.CJ8DpRGj.mjs → attaform.D_pt1gOj.mjs} +26 -33
  50. package/dist/shared/attaform.L0kUn3vL.d.mts +42 -0
  51. package/dist/shared/{attaform.BK0cgu2K.mjs → attaform.ZYn2ahzJ.mjs} +3 -3
  52. package/dist/transforms.d.mts +153 -26
  53. package/dist/transforms.mjs +1 -1
  54. package/dist/vite.d.mts +29 -52
  55. package/dist/vite.mjs +3 -3
  56. package/dist/webpack.d.mts +20 -12
  57. package/dist/webpack.mjs +1 -1
  58. package/dist/zod-v3.d.mts +90 -96
  59. package/dist/zod-v3.mjs +4 -4
  60. package/dist/zod-v4.d.mts +118 -118
  61. package/dist/zod-v4.mjs +4 -4
  62. package/dist/zod.d.mts +5 -5
  63. package/dist/zod.mjs +3 -3
  64. package/package.json +7 -6
  65. package/dist/shared/attaform.Clz0ArIi.d.mts +0 -44
  66. package/dist/shared/attaform.UGyOK83T.d.mts +0 -2366
  67. package/dist/shared/attaform.bKLzMU0o.d.mts +0 -4761
@@ -1,14 +1,14 @@
1
- import { A as AttaformRegistry } from './shared/attaform.UGyOK83T.mjs';
2
- export { a as AnyForm, b as AttaformDevtoolsBridge, c as AttaformError, d as AttaformErrorCode, e as AttaformPluginOptions, 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.UGyOK83T.mjs';
3
- import { G as GenericForm, F as FormKey, U as UseFormConfiguration, A as AbstractSchema, D as DefaultValuesInput, a as UseFormReturnType } from './shared/attaform.bKLzMU0o.mjs';
4
- export { b as ArrayItem, c as ArrayPath, C as CustomDirectiveRegisterAssignerFn, d as DeepPartial, 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, 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 SchemaDefaultsResult, a0 as SchemaParseErrorWithData, a1 as SchemaParseErrorWithoutData, a2 as SchemaParseResult, a3 as SchemaParseSuccess, a4 as Segment, a5 as SetValueCallback, a6 as SetValuePayload, a7 as SettledValidationStatus, a8 as SlimPrimitiveKind, a9 as SubmitHandler, aa as Unset, ab as ValidateOn, ac as ValidateOnConfig, ad as ValidationError, ae as ValidationResponse, af as ValidationResponseWithoutValue, ag as ValueOfUnion, ah as WriteMeta, ai as WriteShape, aj as canonicalizePath, ak as isPathPrefix, al as isUnset, am as parseDottedPath, an as unset } from './shared/attaform.bKLzMU0o.mjs';
5
- export { v as vRegister } from './shared/attaform.Clz0ArIi.mjs';
1
+ import { A as AttaformRegistry } from './shared/attaform.BcQwgWaq.mjs';
2
+ export { a as AnyForm, b as AttaformDevtoolsBridge, c as AttaformError, d as AttaformErrorCode, e as AttaformPluginOptions, 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.BcQwgWaq.mjs';
3
+ import { G as GenericForm, F as FormKey, U as UseFormConfiguration, A as AbstractSchema, D as DefaultValuesInput, a as UseFormReturnType } from './shared/attaform.Br8EBn5B.mjs';
4
+ export { b as ArrayItem, c as ArrayPath, C as CustomDirectiveRegisterAssignerFn, d as DeepPartial, 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, 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 SchemaDefaultsResult, a0 as SchemaParseErrorWithData, a1 as SchemaParseErrorWithoutData, a2 as SchemaParseResult, a3 as SchemaParseSuccess, a4 as Segment, a5 as SetValueCallback, a6 as SetValuePayload, a7 as SettledValidationStatus, a8 as SlimPrimitiveKind, a9 as SubmitHandler, aa as Unset, ab as ValidateOn, ac as ValidateOnConfig, ad as ValidationError, ae as ValidationResponse, af as ValidationResponseWithoutValue, ag as ValueOfUnion, ah as WriteMeta, ai as WriteShape, aj as canonicalizePath, ak as isPathPrefix, al as isUnset, am as parseDottedPath, an as unset } from './shared/attaform.Br8EBn5B.mjs';
5
+ export { v as vRegister } from './shared/attaform.L0kUn3vL.mjs';
6
6
  import 'vue';
7
7
 
8
8
  /**
9
- * Schema-agnostic `useForm`. Accepts any object that implements
10
- * `AbstractSchema` — useful when integrating a custom schema
11
- * adapter or a third-party validation library.
9
+ * Schema-agnostic `useForm`, accepting anything that implements
10
+ * `AbstractSchema`. Reach for it when integrating a custom adapter or a
11
+ * validation library Attaform ships no adapter for.
12
12
  *
13
13
  * ```ts
14
14
  * import { useForm } from 'attaform'
@@ -19,22 +19,16 @@ import 'vue';
19
19
  * })
20
20
  * ```
21
21
  *
22
- * Most consumers prefer a typed entry point that wraps the underlying
23
- * library's schema with the matching adapter automatically; see the
24
- * subpath documentation for the available adapters.
25
- *
26
- * Returns the same form API as the typed entry points; see
27
- * `UseFormReturnType` for the full surface.
22
+ * The return is the same form the typed entry points hand back; see
23
+ * `UseFormReturnType`. Most consumers want one of those instead, since
24
+ * they attach the matching adapter for you.
28
25
  */
29
26
  declare function useAbstractForm<Form extends GenericForm, GetValueFormType extends GenericForm = Form, ReadForm extends GenericForm = Form, K extends FormKey = FormKey>(configuration: UseFormConfiguration<Form, GetValueFormType, AbstractSchema<Form, GetValueFormType>, DefaultValuesInput<Form>, K>,
30
27
  /**
31
- * Internal escape hatch for callers that already hold a registry
32
- * reference and need to construct a form outside Vue's setup context
33
- * (e.g. the wizard's lazy noop builder, which runs inside a
34
- * `computed` re-eval). Passing this skips the strict `useRegistry()`
35
- * call; everything else (FormStore allocation, registry presence,
36
- * consumer ref-counting via `onScopeDispose`) goes through the same
37
- * path eager calls follow. Not part of the public surface.
28
+ * Internal escape hatch for a caller that already holds a registry and
29
+ * has to build a form outside Vue's setup context, such as the
30
+ * wizard's lazy noop builder running inside a `computed` re-eval. It
31
+ * skips the strict `useRegistry()` call and nothing else. Not public.
38
32
  */
39
33
  options?: {
40
34
  readonly registry?: AttaformRegistry;
package/dist/abstract.mjs CHANGED
@@ -1,5 +1,5 @@
1
- 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, c as useAbstractForm, d as useRegister, f as useWizard } from './shared/attaform.DNJOWjQw.mjs';
1
+ 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, c as useAbstractForm, d as useRegister, f as useWizard } from './shared/attaform.BIWicztt.mjs';
2
2
  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';
3
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.WiGdIqgx.mjs';
4
- export { a as assignKey, v as vRegister } from './shared/attaform.B3resMQ1.mjs';
4
+ export { a as assignKey, v as vRegister } from './shared/attaform.D_f1WgYf.mjs';
5
5
  export { i as isRegisterValue } from './shared/attaform.KvlEedlF.mjs';
@@ -1,4 +1,4 @@
1
- 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, c as useAbstractForm, d as useRegister, f as useWizard } from './shared/attaform-dev.CQ2rJiAX.mjs';
2
- 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-dev.BQc5QV3Y.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-dev.DUZckyV8.mjs';
4
- export { a as assignKey, i as isRegisterValue, v as vRegister } from './shared/attaform-dev.D6CLvaQT.mjs';
1
+ 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, c as useAbstractForm, d as useRegister, f as useWizard } from './shared/attaform-dev.DxHdkkPG.mjs';
2
+ 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-dev.zlvDr0WB.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-dev.Chm4D6SJ.mjs';
4
+ export { a as assignKey, i as isRegisterValue, v as vRegister } from './shared/attaform-dev.BMQ3GcgD.mjs';
@@ -1,4 +1,4 @@
1
- import { e as canonicalizePath } from '../shared/attaform-dev.BQc5QV3Y.mjs';
1
+ import { e as canonicalizePath } from '../shared/attaform-dev.zlvDr0WB.mjs';
2
2
 
3
3
  const INSPECTOR_ID = "attaform";
4
4
  const TIMELINE_LAYER_ID = "attaform:events";
@@ -44,7 +44,7 @@ function wire(api, app, registry) {
44
44
  time: Date.now(),
45
45
  title: "form.change",
46
46
  subtitle: state.formKey,
47
- // Devtools is dev-only — emit raw values. Consumers worried
47
+ // Devtools is dev-only, so emit raw values. Consumers worried
48
48
  // about screen-share leaks should close the panel before
49
49
  // sharing, same as they would for the browser DevTools
50
50
  // console.
@@ -1 +1 @@
1
- export { b as installVRegister, v as vRegister, c as vRegisterFile } from './shared/attaform-dev.D6CLvaQT.mjs';
1
+ export { b as installVRegister, v as vRegister, c as vRegisterFile } from './shared/attaform-dev.BMQ3GcgD.mjs';
@@ -1,5 +1,5 @@
1
1
  import { shallowRef, computed } from 'vue';
2
- import { n as normalizeNumericOption, D as DEFAULT_HISTORY_MAX_SNAPSHOTS, s as structuralSnapshot } from './shared/attaform-dev.BcYT6tFh.mjs';
2
+ import { n as normalizeNumericOption, D as DEFAULT_HISTORY_MAX_SNAPSHOTS, s as structuralSnapshot } from './shared/attaform-dev.CZz4GYZ6.mjs';
3
3
 
4
4
  function captureErrorCells(map) {
5
5
  const out = [];
@@ -1,5 +1,5 @@
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-dev.BQc5QV3Y.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-dev.CQ2rJiAX.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-dev.DUZckyV8.mjs';
4
- export { a as assignKey, i as isRegisterValue, v as vRegister } from './shared/attaform-dev.D6CLvaQT.mjs';
5
- export { f as fieldMeta, u as useForm, w as withMeta } from './shared/attaform-dev.BcNtyOmf.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-dev.zlvDr0WB.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-dev.DxHdkkPG.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-dev.Chm4D6SJ.mjs';
4
+ export { a as assignKey, i as isRegisterValue, v as vRegister } from './shared/attaform-dev.BMQ3GcgD.mjs';
5
+ export { f as fieldMeta, u as useForm, w as withMeta } from './shared/attaform-dev.DuEE4GU1.mjs';
@@ -1,5 +1,5 @@
1
1
  import { defineNuxtPlugin, useRuntimeConfig, useRoute } from 'nuxt/app';
2
- import { c as createAttaform, b as kAttaformWizardActiveStepResolver, r as renderAttaformState, h as hydrateAttaformState, g as getRegistryFromApp, D as DEVTOOLS_WINDOW_KEY } from '../../shared/attaform-dev.DUZckyV8.mjs';
2
+ import { c as createAttaform, b as kAttaformWizardActiveStepResolver, r as renderAttaformState, h as hydrateAttaformState, g as getRegistryFromApp, D as DEVTOOLS_WINDOW_KEY } from '../../shared/attaform-dev.Chm4D6SJ.mjs';
3
3
 
4
4
  var attaform_default = defineNuxtPlugin({
5
5
  // `enforce: 'pre'` makes the "we run before any component's setup" claim
@@ -1,7 +1,7 @@
1
- import { j as humanize, c as useAbstractForm } from './attaform-dev.CQ2rJiAX.mjs';
2
- import { A as AttaformError, e as canonicalizePath, a as InvalidUseFormConfigError } from './attaform-dev.BQc5QV3Y.mjs';
3
- import { s as slimPrimitivesWalk, d as deriveDefaultWalk, m as mergeDeep, f as fixStructuralDefaults, w as walkPathSegments, c as createAbstractSchema, a as createSharedSchemaStore, b as buildFieldMetaPathMap, e as getFieldMetaListForSchema, g as getFieldMetaForSchema } from './attaform-dev.BisFstxh.mjs';
4
- import { c as callConsumerSchemaFn } from './attaform-dev.BcYT6tFh.mjs';
1
+ import { j as humanize, c as useAbstractForm } from './attaform-dev.DxHdkkPG.mjs';
2
+ import { A as AttaformError, e as canonicalizePath, a as InvalidUseFormConfigError } from './attaform-dev.zlvDr0WB.mjs';
3
+ import { s as slimPrimitivesWalk, d as deriveDefaultWalk, m as mergeDeep, f as fixStructuralDefaults, w as walkPathSegments, c as createAbstractSchema, a as createSharedSchemaStore, b as buildFieldMetaPathMap, e as getFieldMetaListForSchema, g as getFieldMetaForSchema } from './attaform-dev.BUIFcTYf.mjs';
4
+ import { c as callConsumerFn } from './attaform-dev.CZz4GYZ6.mjs';
5
5
 
6
6
  function readDef(schema) {
7
7
  if (schema === null || typeof schema !== "object") return void 0;
@@ -131,7 +131,7 @@ function unwrapLazy(schema) {
131
131
  const def = readDef(schema);
132
132
  const getter = def?.getter;
133
133
  if (typeof getter !== "function") return void 0;
134
- return callConsumerSchemaFn(() => getter(), void 0, "lazy-getter");
134
+ return callConsumerFn(() => getter(), void 0, "lazy-getter");
135
135
  }
136
136
  function getIntersectionLeft(schema) {
137
137
  const def = readDef(schema);
@@ -145,7 +145,7 @@ function getCatchDefault(schema) {
145
145
  const def = readDef(schema);
146
146
  const cv = def?.catchValue;
147
147
  if (typeof cv !== "function") return void 0;
148
- return callConsumerSchemaFn(
148
+ return callConsumerFn(
149
149
  () => cv({ error: new Error("atta:default-values"), input: void 0 }),
150
150
  void 0,
151
151
  "catch-factory"
@@ -157,7 +157,7 @@ function hasCatchValue(schema) {
157
157
  }
158
158
  function getDefaultValue(schema) {
159
159
  const def = readDef(schema);
160
- return callConsumerSchemaFn(() => def?.defaultValue, void 0, "default-factory");
160
+ return callConsumerFn(() => def?.defaultValue, void 0, "default-factory");
161
161
  }
162
162
  function getNativeEnumValues(_schema) {
163
163
  return void 0;
@@ -344,10 +344,10 @@ function zodIssuesToValidationErrors(issues) {
344
344
  }
345
345
  return {
346
346
  message: issue.message,
347
- // Adapter-side paths stay schema-relative — the validation
348
- // pipeline in `create-form-store.ts` prepends the parent path
349
- // to absolutise, then routes form-level (absolute path length 0)
350
- // entries to the empty-string bucket at storage time.
347
+ // Adapter-side paths stay schema-RELATIVE: the validation pipeline
348
+ // in `core/create-form-store.ts` prepends the parent path to
349
+ // absolutise, then routes form-level entries, those whose absolute
350
+ // path is empty, to the empty-string bucket at storage time.
351
351
  path: issue.path.map((seg) => typeof seg === "number" ? seg : String(seg)),
352
352
  code
353
353
  };
@@ -542,9 +542,9 @@ const sharedV4Schemas = createSharedSchemaStore();
542
542
  function buildV4Services() {
543
543
  return {
544
544
  getNestedSchemasAtPath: (schema, path, maxRecursionDepth) => getNestedZodSchemasAtPath(schema, path, maxRecursionDepth),
545
- // v4 doesn't pre-strip for the slim-mode walk — its path walker
546
- // already peels every transparent wrapper inline, so the slim and
547
- // unstripped walks coincide.
545
+ // No pre-strip for the slim-mode walk: the path walker peels every
546
+ // transparent wrapper inline, so the slim and unstripped walks
547
+ // coincide.
548
548
  getNestedSchemasInSlimMode: (schema, path, maxRecursionDepth) => getNestedZodSchemasAtPath(schema, path, maxRecursionDepth),
549
549
  slimPrimitivesOf: (schema, maxRecursionDepth) => slimPrimitivesOf(schema, maxRecursionDepth),
550
550
  deriveDefault: (schema, useDefault, maxRecursionDepth) => deriveDefault(schema, useDefault, maxRecursionDepth),
@@ -1,5 +1,5 @@
1
1
  import { reactive, markRaw, isRef, effectScope, watch, warn, nextTick } from 'vue';
2
- import { e as canonicalizePath } from './attaform-dev.BQc5QV3Y.mjs';
2
+ import { e as canonicalizePath } from './attaform-dev.zlvDr0WB.mjs';
3
3
 
4
4
  const INTERACTIVE_TAG_NAMES = /* @__PURE__ */ new Set(["INPUT", "SELECT", "TEXTAREA"]);
5
5
 
@@ -478,7 +478,7 @@ function logTransformFailure(path, index, fn, err) {
478
478
  {
479
479
  const namePart = fn.name !== "" ? `, '${fn.name}'` : "";
480
480
  console.error(
481
- `[attaform] transform threw for path '${path}' (index ${index}${namePart}) \u2014 write aborted. Transforms must not throw; wrap your own try/catch if the throw is recoverable. Original error:`,
481
+ `[attaform] transform threw for path '${path}' (index ${index}${namePart}). Write aborted. Transforms must not throw; wrap your own try/catch if the throw is recoverable. Original error:`,
482
482
  err
483
483
  );
484
484
  }
@@ -568,7 +568,7 @@ function setAssignFunction(el, vnode, value) {
568
568
  if (!isRegisterValue(value)) {
569
569
  {
570
570
  warn(
571
- `v-register expected a RegisterValue, got '${typeof value}'. Bind to form.register('field') \u2014 not the field's ref, value, or path string.`
571
+ `v-register expected a RegisterValue, got '${typeof value}'. Bind to form.register('field'), not the field's ref, value, or path string.`
572
572
  );
573
573
  }
574
574
  el[assignKey] = makeNoopAssigner();
@@ -916,7 +916,7 @@ const vRegisterCheckbox = {
916
916
  if (rawElementValue === void 0) {
917
917
  {
918
918
  warn(
919
- 'Checkbox bound to an array model is missing a `value` attribute \u2014 cannot determine which item to add or remove. Add value="..." to each <input type="checkbox">.'
919
+ 'Checkbox bound to an array model is missing a `value` attribute, so Attaform cannot determine which item to add or remove. Add value="..." to each <input type="checkbox">.'
920
920
  );
921
921
  }
922
922
  return;
@@ -935,7 +935,7 @@ const vRegisterCheckbox = {
935
935
  if (rawElementValue === void 0) {
936
936
  {
937
937
  warn(
938
- 'Checkbox bound to a Set model is missing a `value` attribute \u2014 cannot determine which item to add or remove. Add value="..." to each <input type="checkbox">.'
938
+ 'Checkbox bound to a Set model is missing a `value` attribute, so Attaform cannot determine which item to add or remove. Add value="..." to each <input type="checkbox">.'
939
939
  );
940
940
  }
941
941
  return;
@@ -967,20 +967,15 @@ const vRegisterCheckbox = {
967
967
  el._lastAppliedModel = value.innerRef.value;
968
968
  });
969
969
  },
970
- // Skip the DOM sync when the model is identity-unchanged from the
971
- // last application. Pre-fix the scalar branch in `setChecked`
972
- // gated on `originalValue === oldValue`, comparing a primitive
973
- // scalar against the wrapper RegisterValue object — always !==,
974
- // so the guard was a silent no-op. Array / Set branches lacked
975
- // any guard. The per-render re-apply mirrors the just-fixed
976
- // `vRegisterSelect` shape: a sibling's reactive write triggers
977
- // `beforeUpdate` mid-click, `setChecked` re-applies the prior
978
- // model state, and the in-flight user toggle is clobbered before
979
- // the browser fires `change`. Identity comparison on
980
- // `innerRef.value` is sound for the same reason as multi-select —
981
- // every form write produces a fresh value at the path (new
982
- // primitives; new array/Set references along the spine), so
983
- // reference equality tracks "did the model move" exactly.
970
+ // Skip the DOM sync when the model is identity-unchanged since the last
971
+ // application. Without the guard, a sibling's reactive write triggers
972
+ // `beforeUpdate` mid-click, `setChecked` re-applies the prior model state,
973
+ // and the in-flight toggle is clobbered before the browser fires `change`.
974
+ // Compare `innerRef.value` by identity: every form write produces a fresh
975
+ // value at the path, new primitives and new array or Set references along
976
+ // the spine, so reference equality tracks "did the model move" exactly. The
977
+ // guard must NOT compare against `oldValue`, which is the previous binding's
978
+ // wrapper RegisterValue and never equals a model scalar.
984
979
  beforeUpdate(el, binding, vnode) {
985
980
  setAssignFunction(el, vnode, binding.value);
986
981
  if (!isRegisterValue(binding.value)) return;
@@ -1030,13 +1025,11 @@ const vRegisterRadio = {
1030
1025
  }
1031
1026
  });
1032
1027
  },
1033
- // Initial checked-state sync runs in `mounted`, NOT `created` —
1034
- // Vue's directive lifecycle fires `created` BEFORE the element's
1035
- // attributes are patched (`type`, `value`, `_value` etc. aren't on
1036
- // the element yet), so `getValue(el)` would return `undefined` and
1037
- // every radio in a group would mount unchecked regardless of the
1038
- // model. Checkbox already uses `mounted: setChecked` for the same
1039
- // reason.
1028
+ // The initial checked sync runs in `mounted`, NOT `created`: Vue fires
1029
+ // `created` before the element's attributes are patched, so `type`, `value`
1030
+ // and `_value` are absent, `getValue(el)` returns undefined, and every radio
1031
+ // in a group mounts unchecked whatever the model says. Checkbox uses
1032
+ // `mounted` for the same reason.
1040
1033
  mounted(el, { value }) {
1041
1034
  if (!isRegisterValue(value)) return;
1042
1035
  el.checked = looseEqual(value.innerRef.value, applyCoerce(getValue(el), value));
@@ -1046,15 +1039,12 @@ const vRegisterRadio = {
1046
1039
  el._lastAppliedModel = value.innerRef.value;
1047
1040
  });
1048
1041
  },
1049
- // Skip the DOM sync when the model is identity-unchanged from the
1050
- // last application. Pre-fix the guard read `value.innerRef.value
1051
- // !== oldValue`, comparing a primitive scalar against the previous
1052
- // binding's wrapper RegisterValue object — always !==, so the
1053
- // guard was a silent no-op and `el.checked = …` re-applied on
1054
- // every parent re-render. Same shape as the just-fixed
1055
- // `vRegisterSelect` and `setChecked` bugs: a sibling's reactive
1056
- // write triggers `beforeUpdate` mid-click and writes back the
1057
- // prior model state, clobbering the in-flight selection.
1042
+ // Skip the DOM sync when the model is identity-unchanged since the last
1043
+ // application, tracked on `_lastAppliedModel`. Comparing against `oldValue`
1044
+ // instead compares a primitive scalar to the previous binding's wrapper
1045
+ // RegisterValue, never equal, so `el.checked` re-applies on every parent
1046
+ // re-render and a sibling's reactive write clobbers an in-flight selection
1047
+ // mid-click.
1058
1048
  beforeUpdate(el, { value }, vnode) {
1059
1049
  if (!isRegisterValue(value)) return;
1060
1050
  setAssignFunction(el, vnode, value);
@@ -1113,22 +1103,20 @@ const vRegisterSelect = {
1113
1103
  beforeUpdate(el, binding, vnode) {
1114
1104
  setAssignFunction(el, vnode, binding.value);
1115
1105
  },
1116
- // Skip the DOM sync when the model is identity-unchanged from the
1117
- // last application. Parent re-renders fire `updated` whether or not
1118
- // the bound model actually moved (a typed character in a sibling,
1119
- // an async-validation tick, any reactive read elsewhere on the
1120
- // page). Without this guard, every such render unconditionally re-
1121
- // applies `setSelected` against the prior model, which on a
1122
- // `<select multiple>` clobbers any in-progress user selection
1123
- // between mousedown and the browser's change-event decision — the
1124
- // browser then sees no net change, never fires `change`, and the
1125
- // model never updates. Identity comparison is sound: every form
1126
- // write produces a new array/Set reference at the path (the diff-
1127
- // apply replacement of `form.value` rolls forward fresh structures
1128
- // along the spine), so reference equality on `innerRef.value`
1129
- // tracks "did the model move" exactly. The `_assigning` gate stays
1130
- // — it short-circuits the immediate post-write render where the
1131
- // DOM is already in sync from the user's click.
1106
+ // Skip the DOM sync when the model is identity-unchanged since the last
1107
+ // application. A parent re-render fires `updated` whether or not the bound
1108
+ // model moved: a typed character in a sibling, an async-validation tick, any
1109
+ // reactive read elsewhere on the page. Re-applying `setSelected` against the
1110
+ // prior model on each of those clobbers an in-progress `<select multiple>`
1111
+ // selection between mousedown and the browser's change decision, after which
1112
+ // the browser sees no net change, never fires `change`, and the model never
1113
+ // updates.
1114
+ //
1115
+ // Identity comparison is sound: every form write produces a new array or Set
1116
+ // reference at the path, the replacement of `form.value` rolling fresh
1117
+ // structures forward along the spine. The `_assigning` gate stays as well,
1118
+ // short-circuiting the immediate post-write render where the DOM is already
1119
+ // in sync from the user's click.
1132
1120
  updated(el, { value }) {
1133
1121
  if (el._assigning === true) return;
1134
1122
  if (!isRegisterValue(value)) return;
@@ -1316,7 +1304,7 @@ const vRegisterDynamic = {
1316
1304
  if (hasMarker || hasUserAssigner) return;
1317
1305
  warnedUnsupportedElements.add(el);
1318
1306
  warn(
1319
- `[attaform] v-register on <${el.tagName.toLowerCase()}> is a no-op \u2014 non-input roots aren't bound to text-input semantics. For custom components: call \`useRegister()\` in the child's setup and re-bind v-register to an inner native element. Lower-level: install a custom assigner via the \`assignKey\` symbol on the element.`
1307
+ `[attaform] v-register on <${el.tagName.toLowerCase()}> is a no-op: non-input roots aren't bound to text-input semantics. For custom components: call \`useRegister()\` in the child's setup and re-bind v-register to an inner native element. Lower-level: install a custom assigner via the \`assignKey\` symbol on the element.`
1320
1308
  );
1321
1309
  });
1322
1310
  }
@@ -1369,13 +1357,12 @@ const vRegisterDynamic = {
1369
1357
  delete el._syncFromStorage;
1370
1358
  delete el[assignKey];
1371
1359
  },
1372
- // The lifecycle hooks above don't run on the server (Vue skips
1373
- // directive lifecycle during SSR), so emit the same aria attributes
1374
- // here from the SSR-time gated display state. Honors authored attrs
1375
- // (vnode-level lockout), touches no DOM, and shares
1376
- // `resolveAriaValue` with the client path. Ids are SSR-stable
1377
- // (formInstanceId derives from Vue's useId), so a server-rendered
1378
- // describedby matches the client after hydration.
1360
+ // Vue skips directive lifecycle during SSR, so the hooks above never run on
1361
+ // the server and the same aria attributes are emitted here from the SSR-time
1362
+ // gated display state. Honours authored attrs through the vnode-level
1363
+ // lockout, touches no DOM, and shares `resolveAriaValue` with the client
1364
+ // path. Ids are SSR-stable, `formInstanceId` deriving from Vue's `useId`, so
1365
+ // a server-rendered describedby matches the client after hydration.
1379
1366
  getSSRProps(binding, vnode) {
1380
1367
  const rv = binding.value;
1381
1368
  if (!isRegisterValue(rv)) return void 0;
@@ -1,6 +1,6 @@
1
- import { A as AttaformErrorCode, k as isPlainRecord, s as slimKindOf } from './attaform-dev.CQ2rJiAX.mjs';
2
- import { e as canonicalizePath, h as SET_MEMBER_SEGMENT } from './attaform-dev.BQc5QV3Y.mjs';
3
- import { a as safeOwnRead, b as safeAssign } from './attaform-dev.BcYT6tFh.mjs';
1
+ import { A as AttaformErrorCode, k as isPlainRecord, s as slimKindOf } from './attaform-dev.DxHdkkPG.mjs';
2
+ import { e as canonicalizePath, h as SET_MEMBER_SEGMENT } from './attaform-dev.zlvDr0WB.mjs';
3
+ import { a as safeOwnRead, b as safeAssign } from './attaform-dev.CZz4GYZ6.mjs';
4
4
 
5
5
  const PATH_SEPARATOR = ".";
6
6
  function isOpaqueKind(kind) {
@@ -425,8 +425,8 @@ function walkPathSegments(schema, segments, intro, maxDepth, lazyDepth) {
425
425
  const rightResults = right === void 0 ? [] : walkPathSegments(right, segments, intro, maxDepth, lazyDepth);
426
426
  return [...leftResults, ...rightResults];
427
427
  }
428
- // Leaves — can't descend further. Opaque leaves (`any` /
429
- // `unknown` / `custom`) land here too and `[]` is the truthful
428
+ // Leaves, with nothing further to descend. An opaque leaf (`any` /
429
+ // `unknown` / `custom`) lands here too and `[]` is the truthful
430
430
  // answer: the schema declares no sub-paths under them, so none are
431
431
  // fabricated. `symbol` / `function` / `promise` hold a value
432
432
  // without declaring anything inside it and land here for the same
@@ -1017,7 +1017,7 @@ function slimPrimitivesWalk(schema, intro, maxDepth, lazyDepth = 0) {
1017
1017
  case "unknown":
1018
1018
  case "custom":
1019
1019
  return PERMISSIVE_SLIM_KINDS;
1020
- // A kind this walker has no case for — in practice a kind a newer
1020
+ // A kind this walker has no case for, in practice one a newer
1021
1021
  // Zod introduced. Be permissive rather than reject: the adapter
1022
1022
  // carries the value opaquely and the schema's own parse is what
1023
1023
  // decides whether it was legal.
@@ -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-dev.BisFstxh.mjs';
2
- import { h as getAtPath, j as humanize, c as useAbstractForm } from './attaform-dev.CQ2rJiAX.mjs';
3
- import { c as callConsumerSchemaFn } from './attaform-dev.BcYT6tFh.mjs';
4
- import { A as AttaformError, e as canonicalizePath, a as InvalidUseFormConfigError } from './attaform-dev.BQc5QV3Y.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-dev.BUIFcTYf.mjs';
2
+ import { h as getAtPath, j as humanize, c as useAbstractForm } from './attaform-dev.DxHdkkPG.mjs';
3
+ import { c as callConsumerFn } from './attaform-dev.CZz4GYZ6.mjs';
4
+ import { A as AttaformError, e as canonicalizePath, a as InvalidUseFormConfigError } from './attaform-dev.zlvDr0WB.mjs';
5
5
 
6
6
  function isZodSchemaType(schema, expectedType) {
7
7
  if (typeof schema !== "object" || schema === null) return false;
@@ -306,7 +306,7 @@ function unwrapLazy(schema) {
306
306
  const def = readDef(schema);
307
307
  const getter = def?.getter;
308
308
  if (typeof getter !== "function") return void 0;
309
- return callConsumerSchemaFn(() => getter(), void 0, "lazy-getter");
309
+ return callConsumerFn(() => getter(), void 0, "lazy-getter");
310
310
  }
311
311
  function getLiteralValues(schema) {
312
312
  const def = readDef(schema);
@@ -323,17 +323,13 @@ function getDefaultValue(schema) {
323
323
  const def = readDef(schema);
324
324
  const thunk = def?.defaultValue;
325
325
  if (typeof thunk !== "function") return void 0;
326
- return callConsumerSchemaFn(() => thunk(), void 0, "default-factory");
326
+ return callConsumerFn(() => thunk(), void 0, "default-factory");
327
327
  }
328
328
  function getCatchDefault(schema) {
329
329
  const def = readDef(schema);
330
330
  const cv = def?.catchValue;
331
331
  if (typeof cv !== "function") return void 0;
332
- return callConsumerSchemaFn(
333
- () => cv({ error: null, input: void 0 }),
334
- void 0,
335
- "catch-factory"
336
- );
332
+ return callConsumerFn(() => cv({ error: null, input: void 0 }), void 0, "catch-factory");
337
333
  }
338
334
  function hasCatchValue(schema) {
339
335
  const def = readDef(schema);
@@ -833,13 +829,9 @@ function buildV3Services(maxRecursionDepth) {
833
829
  };
834
830
  return {
835
831
  getNestedSchemasAtPath: (schema, path, maxRecursionDepth2) => getNestedZodSchemasAtPath(schema, path, maxRecursionDepth2),
836
- // v3 pre-strips refinements / defaults / wrappers off the root for
837
- // slim-mode walks — `getSlimPrimitiveTypesAtPath` and
838
- // `getSchemasAtPath` both consume this variant so the yielded
839
- // candidates reflect the slim shape.
840
- // The slim-root projection is gone (size-teardown P7): the shared
841
- // path walker peels wrappers / effects inline, so the slim and
842
- // unstripped walks coincide — same aliasing v4 always had.
832
+ // The shared path walker peels wrappers and effects inline, so the
833
+ // slim and unstripped walks coincide and the root needs no slim
834
+ // projection of its own. Same aliasing v4 has.
843
835
  getNestedSchemasInSlimMode: (schema, path, maxRecursionDepth2) => getNestedZodSchemasAtPath(schema, path, maxRecursionDepth2),
844
836
  slimPrimitivesOf: (schema, _maxRecursionDepth) => slimPrimitivesV3(schema),
845
837
  deriveDefault: (schema, useDefault) => getDefaultValuesFromZodSchema(schema, useDefault),
@@ -858,10 +850,10 @@ function buildV3Services(maxRecursionDepth) {
858
850
  const result = await schema.safeParseAsync(data);
859
851
  return result.success ? { success: true, data: result.data } : { success: false, issues: refileIssues(schema, data, result.error.issues) };
860
852
  },
861
- // v3 returns the full recursive AbstractSchema for sub-schemas (the
862
- // historical shape) — `getSchemasAtPath` consumers may probe any
863
- // method on the result. The factory call rebuilds the full surface
864
- // against the sub-schema with its own per-form caches.
853
+ // A `getSchemasAtPath` consumer may probe any method on the result,
854
+ // so a sub-schema comes back as a full recursive AbstractSchema: the
855
+ // factory call rebuilds the whole surface against it, with its own
856
+ // per-form caches.
865
857
  makeSubSchema: (sub, maxRecursionDepth2) => createAbstractSchema(
866
858
  sub,
867
859
  V3_INTROSPECTOR,
@@ -887,17 +879,16 @@ function zodIssuesToValidationErrors(issues) {
887
879
  }
888
880
  validationErrors.push({
889
881
  message: issue.message,
890
- // `ValidationError.path` is `(string | number)[]` per the
891
- // public type. v3's `issue.path` is the same in the standard
892
- // case, but a custom check via `ctx.addIssue({ path: [...] })`
893
- // can smuggle a Symbol through — the public surface promised
894
- // strings/numbers, so coerce defensively to keep the contract.
895
- // Mirrors v4's behaviour at the same site.
882
+ // `ValidationError.path` is `(string | number)[]` publicly, and
883
+ // v3's `issue.path` matches in the standard case, but a custom
884
+ // check calling `ctx.addIssue({ path: [...] })` can smuggle a
885
+ // Symbol through. Coerce to keep the promise. v4 does the same
886
+ // here.
896
887
  //
897
- // Adapter-side paths stay schema-relative — the validation
898
- // pipeline in `create-form-store.ts` prepends the parent path
899
- // to absolutise, then routes form-level (absolute path length 0)
900
- // entries to the empty-string bucket at storage time.
888
+ // Adapter-side paths stay schema-RELATIVE: the validation pipeline
889
+ // in `core/create-form-store.ts` prepends the parent path to
890
+ // absolutise, then routes form-level entries, those whose absolute
891
+ // path is empty, to the empty-string bucket at storage time.
901
892
  path: coercePathSegments(issue.path),
902
893
  code
903
894
  });
@@ -929,10 +920,10 @@ function unwrapStructuralLeafV3(schema) {
929
920
  return current;
930
921
  }
931
922
  function isStructuralV3Kind(schema) {
932
- return isZodSchemaType(schema, "ZodObject") || isZodSchemaType(schema, "ZodArray") || isZodSchemaType(schema, "ZodRecord") || isZodSchemaType(schema, "ZodTuple") || isZodSchemaType(schema, "ZodUnion") || isZodSchemaType(schema, "ZodDiscriminatedUnion") || // Wrappers that themselves resolve to a structural type — keep
933
- // peeling at the next iteration.
934
- isZodSchemaType(schema, "ZodOptional") || isZodSchemaType(schema, "ZodNullable") || isZodSchemaType(schema, "ZodDefault") || isZodSchemaType(schema, "ZodEffects") || // Newer transparent wrappers (v3.23+). Each wraps a single inner
935
- // schema with no structural impact — `peelV3Wrappers` resolves them.
923
+ return isZodSchemaType(schema, "ZodObject") || isZodSchemaType(schema, "ZodArray") || isZodSchemaType(schema, "ZodRecord") || isZodSchemaType(schema, "ZodTuple") || isZodSchemaType(schema, "ZodUnion") || isZodSchemaType(schema, "ZodDiscriminatedUnion") || // Wrappers that themselves resolve to a structural type; keep
924
+ // peeling next iteration.
925
+ isZodSchemaType(schema, "ZodOptional") || isZodSchemaType(schema, "ZodNullable") || isZodSchemaType(schema, "ZodDefault") || isZodSchemaType(schema, "ZodEffects") || // Newer transparent wrappers (v3.23+), each wrapping one inner
926
+ // schema with no structural impact. `peelV3Wrappers` resolves them.
936
927
  isZodSchemaType(schema, "ZodPipeline") || isZodSchemaType(schema, "ZodReadonly") || isZodSchemaType(schema, "ZodBranded");
937
928
  }
938
929
  function peelV3Wrappers(schema) {
@@ -1,4 +1,4 @@
1
- import { m as mapSegmentKeys, f as pathsEqual, i as isPathPrefix } from './attaform-dev.BQc5QV3Y.mjs';
1
+ import { m as mapSegmentKeys, f as pathsEqual, i as isPathPrefix } from './attaform-dev.zlvDr0WB.mjs';
2
2
 
3
3
  const DEFAULT_FIELD_VALIDATION_DEBOUNCE_MS = 0;
4
4
  const DEFAULT_HISTORY_MAX_SNAPSHOTS = 128;
@@ -27,20 +27,32 @@ function pickDefined(bag) {
27
27
  }
28
28
 
29
29
  const reported = /* @__PURE__ */ new Set() ;
30
- function report(site, err) {
31
- if (reported === null || reported.has(site)) return;
32
- reported.add(site);
33
- const advice = site === "default-factory" ? "a `.default(() => ...)` factory threw. Attaform used `undefined` for that field's initial value." : site === "catch-factory" ? "a `.catch(() => ...)` fallback threw. Attaform used `undefined` for that value." : "a `z.lazy(() => ...)` factory threw. Attaform stopped descending at that node, so paths below it will not resolve.";
30
+ function reportConsumerThrow(site, detail, err) {
31
+ const key = detail === void 0 ? site : `${site}|${detail}`;
32
+ if (reported === null || reported.has(key)) return;
33
+ reported.add(key);
34
+ const at = detail === void 0 ? "" : ` at \`${detail}\``;
35
+ const advice = {
36
+ "default-factory": "a `.default(() => ...)` factory threw. Attaform used `undefined` for that field's initial value.",
37
+ "catch-factory": "a `.catch(() => ...)` fallback threw. Attaform used `undefined` for that value.",
38
+ "lazy-getter": "a `z.lazy(() => ...)` factory threw. Attaform stopped descending at that node, so paths below it will not resolve.",
39
+ "wizard-slot": `a function step slot threw${at}. Attaform dropped that step from the compiled list; the rest of the flow still navigates.`,
40
+ "wizard-lazy-slot": `a \`lazy()\` step resolver threw${at}. Attaform dropped that step from the compiled list until the resolver's own dependencies change.`,
41
+ "wizard-progress": "a `useWizard({ progress })` override threw. Attaform fell back to its own valid-step ratio.",
42
+ "wizard-restore": "a `useWizard({ restore })` callback threw. Attaform read no step from it, so the wizard stays where it is.",
43
+ "wizard-persist": "a `useWizard({ persist })` callback threw. Attaform navigated anyway, so the step is live but unrecorded.",
44
+ "wizard-default-statuses": "a `useWizard({ defaultStatuses })` factory threw or rejected. Attaform seeded no statuses, the same as omitting the option."
45
+ };
34
46
  console.error(
35
- `[attaform] ${advice} A function inside your schema must not throw; wrap your own try/catch if the failure is recoverable. Original error:`,
47
+ `[attaform] ${advice[site]} Attaform has nowhere to surface this, so it must not throw; wrap your own try/catch if the failure is recoverable. Original error:`,
36
48
  err
37
49
  );
38
50
  }
39
- function callConsumerSchemaFn(fn, fallback, site) {
51
+ function callConsumerFn(fn, fallback, site, detail) {
40
52
  try {
41
53
  return fn();
42
54
  } catch (err) {
43
- report(site, err);
55
+ reportConsumerThrow(site, detail, err);
44
56
  return fallback;
45
57
  }
46
58
  }
@@ -371,4 +383,4 @@ function structuralSnapshot(value) {
371
383
  return out;
372
384
  }
373
385
 
374
- export { ANONYMOUS_FORM_KEY_PREFIX as A, DEFAULT_HISTORY_MAX_SNAPSHOTS as D, RESERVED_KEY_PREFIX as R, safeOwnRead as a, safeAssign as b, callConsumerSchemaFn as c, safeOwnHas as d, consumerHas as e, spreadConsumerRecord as f, copyConsumerArray as g, consumerKeys as h, isShadowedKey as i, readConsumerProp as j, diffAndApply as k, DEFAULT_FIELD_VALIDATION_DEBOUNCE_MS as l, consumerSymbolKeys as m, normalizeNumericOption as n, applyChangedKeys as o, pickDefined as p, DEFAULT_MAX_RECURSION_DEPTH as q, readConsumerIndex as r, structuralSnapshot as s, ANONYMOUS_WIZARD_KEY_PREFIX as t };
386
+ export { ANONYMOUS_FORM_KEY_PREFIX as A, DEFAULT_HISTORY_MAX_SNAPSHOTS as D, RESERVED_KEY_PREFIX as R, safeOwnRead as a, safeAssign as b, callConsumerFn as c, safeOwnHas as d, consumerHas as e, spreadConsumerRecord as f, copyConsumerArray as g, consumerKeys as h, isShadowedKey as i, readConsumerProp as j, diffAndApply as k, DEFAULT_FIELD_VALIDATION_DEBOUNCE_MS as l, consumerSymbolKeys as m, normalizeNumericOption as n, applyChangedKeys as o, pickDefined as p, DEFAULT_MAX_RECURSION_DEPTH as q, readConsumerIndex as r, structuralSnapshot as s, reportConsumerThrow as t, ANONYMOUS_WIZARD_KEY_PREFIX as u };
@@ -1,4 +1,4 @@
1
- import { c as RegistryNotInstalledError, O as OutsideSetupError, g as pathKeyToDotted } from './attaform-dev.BQc5QV3Y.mjs';
1
+ import { c as RegistryNotInstalledError, O as OutsideSetupError, g as pathKeyToDotted } from './attaform-dev.zlvDr0WB.mjs';
2
2
  import { shallowReactive, getCurrentInstance, inject } from 'vue';
3
3
 
4
4
  function detectSSR(options = {}) {
@@ -199,7 +199,7 @@ function hydrateAttaformState(app, payload) {
199
199
  got = "v" in payload ? payload.v : void 0;
200
200
  }
201
201
  console.warn(
202
- `[attaform] hydrateAttaformState: payload version mismatch (expected ${ATTAFORM_STATE_VERSION}, got ${String(got)}). Skipping hydration \u2014 forms will construct fresh. This usually means the SSR bundle is on a different attaform version than the client (rolling deploy / stale cache).`
202
+ `[attaform] hydrateAttaformState: payload version mismatch (expected ${ATTAFORM_STATE_VERSION}, got ${String(got)}). Skipping hydration; forms will construct fresh. This usually means the SSR bundle is on a different attaform version than the client (rolling deploy / stale cache).`
203
203
  );
204
204
  }
205
205
  return;