attaform 0.26.0 → 0.27.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (163) hide show
  1. package/README.md +21 -11
  2. package/bin/attaform.mjs +78 -0
  3. package/dist/abstract.cjs +47 -0
  4. package/dist/abstract.cjs.map +1 -0
  5. package/dist/abstract.d.cts +42 -0
  6. package/dist/abstract.d.mts +42 -0
  7. package/dist/abstract.d.ts +42 -0
  8. package/dist/abstract.mjs +4 -0
  9. package/dist/abstract.mjs.map +1 -0
  10. package/dist/chunks/devtools.cjs +2 -2
  11. package/dist/chunks/devtools.cjs.map +1 -1
  12. package/dist/chunks/devtools.mjs +1 -1
  13. package/dist/chunks/fingerprint2.cjs +1 -1
  14. package/dist/chunks/fingerprint2.mjs +1 -1
  15. package/dist/esbuild.cjs +2 -2
  16. package/dist/esbuild.cjs.map +1 -1
  17. package/dist/esbuild.d.cts +3 -3
  18. package/dist/esbuild.d.mts +3 -3
  19. package/dist/esbuild.d.ts +3 -3
  20. package/dist/esbuild.mjs +2 -2
  21. package/dist/esbuild.mjs.map +1 -1
  22. package/dist/index.cjs +41 -56
  23. package/dist/index.cjs.map +1 -1
  24. package/dist/index.d.cts +194 -282
  25. package/dist/index.d.mts +194 -282
  26. package/dist/index.d.ts +194 -282
  27. package/dist/index.mjs +4 -25
  28. package/dist/index.mjs.map +1 -1
  29. package/dist/nuxt.cjs +3 -1
  30. package/dist/nuxt.cjs.map +1 -1
  31. package/dist/nuxt.d.cts +17 -4
  32. package/dist/nuxt.d.mts +17 -4
  33. package/dist/nuxt.d.ts +17 -4
  34. package/dist/nuxt.mjs +4 -2
  35. package/dist/nuxt.mjs.map +1 -1
  36. package/dist/rollup.cjs +2 -2
  37. package/dist/rollup.cjs.map +1 -1
  38. package/dist/rollup.d.cts +3 -3
  39. package/dist/rollup.d.mts +3 -3
  40. package/dist/rollup.d.ts +3 -3
  41. package/dist/rollup.mjs +2 -2
  42. package/dist/rollup.mjs.map +1 -1
  43. package/dist/rspack.cjs +1 -1
  44. package/dist/rspack.d.cts +1 -1
  45. package/dist/rspack.d.mts +1 -1
  46. package/dist/rspack.d.ts +1 -1
  47. package/dist/rspack.mjs +1 -1
  48. package/dist/runtime/plugins/attaform.cjs +4 -5
  49. package/dist/runtime/plugins/attaform.cjs.map +1 -1
  50. package/dist/runtime/plugins/attaform.mjs +1 -2
  51. package/dist/runtime/plugins/attaform.mjs.map +1 -1
  52. package/dist/shared/{attaform.BRzKBj2g.cjs → attaform.8tFZu1Ub.cjs} +2 -2
  53. package/dist/shared/{attaform.BRzKBj2g.cjs.map → attaform.8tFZu1Ub.cjs.map} +1 -1
  54. package/dist/shared/{attaform.k9V0py0s.mjs → attaform.BERt5YMU.mjs} +2 -2
  55. package/dist/shared/{attaform.k9V0py0s.mjs.map → attaform.BERt5YMU.mjs.map} +1 -1
  56. package/dist/shared/{attaform.DSOIz08n.mjs → attaform.BceJrhQ7.mjs} +5 -5
  57. package/dist/shared/{attaform.DSOIz08n.mjs.map → attaform.BceJrhQ7.mjs.map} +1 -1
  58. package/dist/shared/{attaform.DBNjHgNj.d.cts → attaform.C3WnCDXz.d.cts} +11 -9
  59. package/dist/shared/{attaform.DBNjHgNj.d.mts → attaform.C3WnCDXz.d.mts} +11 -9
  60. package/dist/shared/{attaform.DBNjHgNj.d.ts → attaform.C3WnCDXz.d.ts} +11 -9
  61. package/dist/shared/{attaform.DuzQYscR.d.mts → attaform.C9fPTxjB.d.cts} +5 -5
  62. package/dist/shared/{attaform.DuzQYscR.d.ts → attaform.C9fPTxjB.d.mts} +5 -5
  63. package/dist/shared/{attaform.DuzQYscR.d.cts → attaform.C9fPTxjB.d.ts} +5 -5
  64. package/dist/shared/{attaform.Be5otUVw.d.ts → attaform.CC_y1_Ej.d.ts} +33 -33
  65. package/dist/shared/{attaform.ceYeVkjn.d.ts → attaform.CEXUlUkc.d.ts} +1579 -1192
  66. package/dist/shared/{attaform.tZ0YKisf.cjs → attaform.C__F01CE.cjs} +15 -15
  67. package/dist/shared/{attaform.tZ0YKisf.cjs.map → attaform.C__F01CE.cjs.map} +1 -1
  68. package/dist/shared/{attaform.BPl-ECRT.cjs → attaform.Co5LNRnv.cjs} +162 -129
  69. package/dist/shared/attaform.Co5LNRnv.cjs.map +1 -0
  70. package/dist/shared/{attaform.B71rfNL5.d.mts → attaform.CpXHK60W.d.cts} +33 -33
  71. package/dist/shared/{attaform.BFfY7HRI.d.cts → attaform.CvVYOvZF.d.mts} +33 -33
  72. package/dist/shared/{attaform.BoYqnIPI.mjs → attaform.CyQxTOdX.mjs} +55 -36
  73. package/dist/shared/attaform.CyQxTOdX.mjs.map +1 -0
  74. package/dist/shared/{attaform.CEY_WLRJ.d.mts → attaform.D99pd7JG.d.cts} +1579 -1192
  75. package/dist/shared/{attaform.CXVmZtFq.mjs → attaform.DDAmSFnl.mjs} +4 -4
  76. package/dist/shared/{attaform.CXVmZtFq.mjs.map → attaform.DDAmSFnl.mjs.map} +1 -1
  77. package/dist/shared/{attaform.Du9RZp8m.cjs → attaform.DQT7_-FO.cjs} +272 -252
  78. package/dist/shared/attaform.DQT7_-FO.cjs.map +1 -0
  79. package/dist/shared/{attaform.DGhIix5D.mjs → attaform.Da8EdI2t.mjs} +160 -129
  80. package/dist/shared/attaform.Da8EdI2t.mjs.map +1 -0
  81. package/dist/shared/{attaform.Cs0UZ7q6.cjs → attaform.DhVgG2jh.cjs} +16 -16
  82. package/dist/shared/{attaform.Cs0UZ7q6.cjs.map → attaform.DhVgG2jh.cjs.map} +1 -1
  83. package/dist/shared/{attaform.sHkHv_98.mjs → attaform.DhnPb6nK.mjs} +6 -3
  84. package/dist/shared/attaform.DhnPb6nK.mjs.map +1 -0
  85. package/dist/shared/attaform.DkD0DR7R.mjs +42 -0
  86. package/dist/shared/attaform.DkD0DR7R.mjs.map +1 -0
  87. package/dist/shared/{attaform.CSXDW2tO.mjs → attaform.DlSu08F5.mjs} +4 -4
  88. package/dist/shared/{attaform.CSXDW2tO.mjs.map → attaform.DlSu08F5.mjs.map} +1 -1
  89. package/dist/shared/{attaform.LEWUFqUw.cjs → attaform.DoQm_Vkd.cjs} +7 -3
  90. package/dist/shared/attaform.DoQm_Vkd.cjs.map +1 -0
  91. package/dist/shared/{attaform.BQflyVOL.cjs → attaform.Drsi43GG.cjs} +19 -19
  92. package/dist/shared/{attaform.BQflyVOL.cjs.map → attaform.Drsi43GG.cjs.map} +1 -1
  93. package/dist/shared/attaform.K6Thc6By.cjs +46 -0
  94. package/dist/shared/attaform.K6Thc6By.cjs.map +1 -0
  95. package/dist/shared/{attaform.Vp2-CWZB.mjs → attaform.KvlEedlF.mjs} +3 -3
  96. package/dist/shared/{attaform.Vp2-CWZB.mjs.map → attaform.KvlEedlF.mjs.map} +1 -1
  97. package/dist/shared/{attaform.BRGIpZo4.cjs → attaform.RaTzp1WF.cjs} +3 -3
  98. package/dist/shared/attaform.RaTzp1WF.cjs.map +1 -0
  99. package/dist/shared/{attaform.MgaYKlPP.d.cts → attaform.kBkYlKP_.d.mts} +1579 -1192
  100. package/dist/shared/{attaform.C3Doa9Pt.mjs → attaform.v0fQtWyA.mjs} +3 -3
  101. package/dist/shared/attaform.v0fQtWyA.mjs.map +1 -0
  102. package/dist/shared/{attaform.ZXZ6dH72.cjs → attaform.yUrz7C2z.cjs} +3 -3
  103. package/dist/shared/{attaform.ZXZ6dH72.cjs.map → attaform.yUrz7C2z.cjs.map} +1 -1
  104. package/dist/transforms.cjs +1 -1
  105. package/dist/transforms.mjs +1 -1
  106. package/dist/vite.cjs +21 -3
  107. package/dist/vite.cjs.map +1 -1
  108. package/dist/vite.d.cts +70 -17
  109. package/dist/vite.d.mts +70 -17
  110. package/dist/vite.d.ts +70 -17
  111. package/dist/vite.mjs +20 -4
  112. package/dist/vite.mjs.map +1 -1
  113. package/dist/webpack.cjs +1 -1
  114. package/dist/webpack.d.cts +1 -1
  115. package/dist/webpack.d.mts +1 -1
  116. package/dist/webpack.d.ts +1 -1
  117. package/dist/webpack.mjs +1 -1
  118. package/dist/zod-v3.cjs +41 -10
  119. package/dist/zod-v3.cjs.map +1 -1
  120. package/dist/zod-v3.d.cts +5 -5
  121. package/dist/zod-v3.d.mts +5 -5
  122. package/dist/zod-v3.d.ts +5 -5
  123. package/dist/zod-v3.mjs +4 -2
  124. package/dist/zod-v3.mjs.map +1 -1
  125. package/dist/zod-v4.cjs +41 -10
  126. package/dist/zod-v4.cjs.map +1 -1
  127. package/dist/zod-v4.d.cts +7 -7
  128. package/dist/zod-v4.d.mts +7 -7
  129. package/dist/zod-v4.d.ts +7 -7
  130. package/dist/zod-v4.mjs +4 -2
  131. package/dist/zod-v4.mjs.map +1 -1
  132. package/dist/zod.cjs +44 -49
  133. package/dist/zod.cjs.map +1 -1
  134. package/dist/zod.d.cts +6 -248
  135. package/dist/zod.d.mts +6 -248
  136. package/dist/zod.d.ts +6 -248
  137. package/dist/zod.mjs +4 -42
  138. package/dist/zod.mjs.map +1 -1
  139. package/package.json +12 -2
  140. package/skills/attaform/SKILL.md +128 -0
  141. package/skills/attaform/references/custom-components.md +72 -0
  142. package/skills/attaform/references/errors.md +62 -0
  143. package/skills/attaform/references/ssr.md +26 -0
  144. package/skills/attaform/references/validation.md +40 -0
  145. package/skills/attaform/references/wizards.md +104 -0
  146. package/dist/shared/attaform.55hFR_cl.d.ts +0 -97
  147. package/dist/shared/attaform.BPl-ECRT.cjs.map +0 -1
  148. package/dist/shared/attaform.BRGIpZo4.cjs.map +0 -1
  149. package/dist/shared/attaform.BoYqnIPI.mjs.map +0 -1
  150. package/dist/shared/attaform.C3Doa9Pt.mjs.map +0 -1
  151. package/dist/shared/attaform.D51IwDtP.cjs +0 -39
  152. package/dist/shared/attaform.D51IwDtP.cjs.map +0 -1
  153. package/dist/shared/attaform.DGhIix5D.mjs.map +0 -1
  154. package/dist/shared/attaform.DJRz_bzM.d.cts +0 -97
  155. package/dist/shared/attaform.Du9RZp8m.cjs.map +0 -1
  156. package/dist/shared/attaform.JPsaqjLl.d.mts +0 -97
  157. package/dist/shared/attaform.LEWUFqUw.cjs.map +0 -1
  158. package/dist/shared/attaform.NqYEzRcM.mjs +0 -35
  159. package/dist/shared/attaform.NqYEzRcM.mjs.map +0 -1
  160. package/dist/shared/attaform.sHkHv_98.mjs.map +0 -1
  161. package/dist/shared/{attaform.DdjDqTah.d.ts → attaform.DRUT703x.d.cts} +14 -14
  162. package/dist/shared/{attaform.DdjDqTah.d.cts → attaform.DRUT703x.d.mts} +14 -14
  163. package/dist/shared/{attaform.DdjDqTah.d.mts → attaform.DRUT703x.d.ts} +14 -14
@@ -0,0 +1,46 @@
1
+ 'use strict';
2
+
3
+ const devtoolsShared = require('./attaform.Co5LNRnv.cjs');
4
+ const useForm$1 = require('./attaform.DhVgG2jh.cjs');
5
+ const index = require('./attaform.C__F01CE.cjs');
6
+ const walkFieldMeta = require('./attaform.Drsi43GG.cjs');
7
+
8
+ function isZodV4SchemaShape(value) {
9
+ if (typeof value !== "object" || value === null) return false;
10
+ const def = value.def;
11
+ if (typeof def !== "object" || def === null) return false;
12
+ return typeof def.type === "string";
13
+ }
14
+
15
+ function useForm(configuration) {
16
+ if (configuration === void 0 || configuration === null || configuration.schema === void 0) {
17
+ throw new devtoolsShared.InvalidUseFormConfigError();
18
+ }
19
+ const { schema } = configuration;
20
+ if (isZodV4SchemaShape(schema)) {
21
+ return index.useForm(configuration);
22
+ }
23
+ return useForm$1.useForm(configuration);
24
+ }
25
+
26
+ const fieldMeta = walkFieldMeta.fieldMetaStore;
27
+ function withMeta(schema, payload) {
28
+ const target = schema;
29
+ const existing = walkFieldMeta.getFieldMetaForSchema(target) ?? {};
30
+ const cloned = cloneSchema(schema);
31
+ walkFieldMeta.fieldMetaStore.add(cloned, { ...existing, ...payload });
32
+ return cloned;
33
+ }
34
+ function cloneSchema(schema) {
35
+ const candidate = schema;
36
+ if (typeof candidate.clone === "function") {
37
+ return candidate.clone();
38
+ }
39
+ const Ctor = candidate.constructor;
40
+ return new Ctor(candidate._def);
41
+ }
42
+
43
+ exports.fieldMeta = fieldMeta;
44
+ exports.useForm = useForm;
45
+ exports.withMeta = withMeta;
46
+ //# sourceMappingURL=attaform.K6Thc6By.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"attaform.K6Thc6By.cjs","sources":["../../src/runtime/core/zod-shape.ts","../../src/runtime/adapters/unified/use-form.ts","../../src/runtime/adapters/unified/field-meta.ts"],"sourcesContent":["/**\n * Shape detectors for Zod schemas. Used by the unified `attaform/zod`\n * entry's runtime dispatch (`runtime/adapters/unified/use-form.ts`)\n * to route to the v3 or v4 adapter based on the schema's runtime\n * shape. Mirrors the discrimination already used by the v4\n * introspection helper (`adapters/zod-v4/introspect.ts`'s\n * `assertZodVersion`, which reads `def.type`) and the v3 wrapper's\n * legitimate-input branch (`composables/use-form.ts`'s `isZodType`,\n * which reads `_def`).\n *\n * Why this discriminator and not `_zod` / `_def`:\n * - Zod v4 retained `_def` for backward compat — reading `_def` alone\n * misclassifies v4 schemas as v3.\n * - Zod v4's stable shape is `def.type: string` (lowercase tag like\n * `'object'`); Zod v3's is `_def.typeName: string` (capitalised tag\n * like `'ZodObject'`). Both are checked structurally so consumers\n * who alias one Zod major to a non-standard import path still work.\n */\n\ninterface ZodV4Shape {\n def: { type: unknown }\n}\n\ninterface ZodV3Shape {\n _def: { typeName: unknown }\n}\n\n/**\n * Returns true when `value` looks like a Zod schema of either major\n * version. Convenience wrapper around the v3 / v4 detectors.\n */\nexport function isZodSchemaShape(value: unknown): boolean {\n return isZodV4SchemaShape(value) || isZodV3SchemaShape(value)\n}\n\n/**\n * Returns true when `value` looks like a Zod v4 schema (has\n * `def.type: string`). Used by the unified entry's runtime-dispatch\n * to route to the v4 adapter.\n */\nexport function isZodV4SchemaShape(value: unknown): value is ZodV4Shape {\n if (typeof value !== 'object' || value === null) return false\n const def = (value as { def?: unknown }).def\n if (typeof def !== 'object' || def === null) return false\n return typeof (def as { type?: unknown }).type === 'string'\n}\n\n/**\n * Returns true when `value` looks like a Zod v3 schema (has\n * `_def.typeName: string`). Kept distinct from `isZodV4SchemaShape`\n * because some v4 schemas also expose `_def` for backward compat —\n * the v4 detector wins first in `isZodSchemaShape`.\n */\nexport function isZodV3SchemaShape(value: unknown): value is ZodV3Shape {\n if (typeof value !== 'object' || value === null) return false\n const def = (value as { _def?: unknown })._def\n if (typeof def !== 'object' || def === null) return false\n return typeof (def as { typeName?: unknown }).typeName === 'string'\n}\n","/**\n * Unified `useForm` for the `attaform/zod` entry. Runtime-dispatches\n * on schema shape: a Zod v4 schema (`def.type` truthy) routes to the\n * v4 adapter; a Zod v3 schema (or any other `AbstractSchema`) routes\n * to the v3 wrapper, which already accepts both Zod v3 input and\n * `AbstractSchema` directly via its built-in shape branch.\n *\n * Type-level dispatch happens via TWO typed overloads — v4 first, v3\n * second — plus an untyped impl. Each overload mirrors the matching\n * direct adapter's signature exactly, so a v4-schema call site pays\n * the same per-call depth cost as importing from `attaform/zod-v4`\n * directly. Overload resolution at concrete call sites commits to one\n * overload immediately on argument shape — no type-level dispatch tax.\n *\n * Tests and other call sites that need the equivalent of\n * `typeof useForm<X>` should reach for the `UseFormReturn<X>` /\n * `UseFormConfig<X>` helpers in `types-api.ts` — instantiation\n * expressions on overloaded functions follow brittle resolution rules,\n * and the helper types give a deterministic projection.\n *\n * This module is the FALLBACK path. Vite consumers see the\n * `attaform/vite` plugin's `resolveId` hook rewrite `attaform/zod`\n * imports to either `attaform/zod-v3` or `attaform/zod-v4` at build\n * time — in that case this dispatch never runs and the consumer\n * bundle ships only the matching adapter. Other bundlers (and\n * non-bundled ESM consumption) hit this dispatch instead, paying a\n * modest size cost for the convenience of a single hello-world import.\n *\n * Power users who want a guaranteed lean bundle on non-Vite tooling\n * can import directly from `attaform/zod-v3` or `attaform/zod-v4` —\n * those subpaths are never rewritten and never load the other\n * adapter.\n */\nimport { InvalidUseFormConfigError } from '../../core/errors'\nimport { isZodV4SchemaShape } from '../../core/zod-shape'\nimport type { ZodV4Internals } from './types-zod-major'\nimport { useForm as useFormV3 } from '../../composables/use-form'\nimport { useForm as useFormV4 } from '../zod-v4'\nimport type {\n AbstractSchema,\n FormKey,\n ValidateOnConfig,\n UseFormReturnType,\n UseFormConfiguration,\n} from '../../types/types-api'\nimport type { AcceptableDefaults } from '../../types/types-core'\nimport type { SupportedRootSchema as SupportedRootSchemaV4 } from '../zod-v4/types-root'\nimport type { SupportedRootSchema as SupportedRootSchemaV3 } from '../zod-v3/types-root'\nimport type {\n V3FormOf,\n V3OutOf,\n V3ReadOf,\n V3SchemaInput,\n V4FormOf,\n V4OutOf,\n V4ReadOf,\n V4SchemaInput,\n} from './types-projections'\n\n/**\n * Create a form bound to a Zod v4 schema.\n *\n * ```ts\n * import { useForm } from 'attaform/zod'\n * import { z } from 'zod'\n *\n * const form = useForm({\n * schema: z.object({\n * username: z.string().min(2, 'At least 2 characters'),\n * password: z.string().min(8, 'At least 8 characters'),\n * }),\n * })\n * ```\n *\n * The constraint intersects `ZodV4Internals` (the v4-only `_zod`\n * brand) so a v3 schema can't bind this overload even when `z`\n * resolves to v3 in a single-major consumer install; v3 schemas fall\n * through to the v3 overload below. See `types-zod-major.ts`.\n */\nexport function useForm<\n Schema extends SupportedRootSchemaV4 & ZodV4Internals,\n K extends FormKey = FormKey,\n>(\n configuration: Omit<\n UseFormConfiguration<\n V4FormOf<Schema>,\n V4OutOf<Schema>,\n AbstractSchema<V4FormOf<Schema>, V4OutOf<Schema>>,\n // `defaultValues` is Omitted below and re-supplied via the\n // `AcceptableDefaults` intersection, so this `DefaultValues` slot is\n // inert. `never` keeps it from re-instantiating the deep\n // `DefaultValuesInput` cascade here — that redundant instantiation,\n // across both overloads at a concrete call site, tips the bundled\n // `.d.ts` into TS2589.\n never,\n K\n >,\n 'schema' | 'validateOn' | 'debounceMs' | 'defaultValues'\n > & {\n schema: Schema\n // #422: the `AcceptableDefaults` slot adds the schema's own input\n // (`V4SchemaInput<Schema>`) as a reflexive escape arm so a generic form\n // wrapper forwarding `defaultValues` does not trip TS2589 / TS2769.\n // The arm is redundant at concrete call sites (a schema's input is a\n // subset of its `DefaultValuesInput`), so concrete checking is\n // unchanged. The return type never references the slot, so field\n // inference is preserved through the wrapper. See `AcceptableDefaults`.\n defaultValues?: AcceptableDefaults<V4FormOf<Schema>, V4SchemaInput<Schema>>\n } & ValidateOnConfig\n): UseFormReturnType<V4FormOf<Schema>, V4OutOf<Schema>, V4ReadOf<Schema>, K>\n/**\n * Create a form bound to a Zod v3 schema.\n *\n * ```ts\n * import { useForm } from 'attaform/zod'\n * import { z } from 'zod-v3'\n *\n * const form = useForm({\n * schema: z.object({\n * username: z.string().min(2, 'At least 2 characters'),\n * password: z.string().min(8, 'At least 8 characters'),\n * }),\n * })\n * ```\n *\n * v3 schemas match this overload; v4 schemas hit the v4 overload\n * above first and never reach here.\n */\nexport function useForm<Schema extends SupportedRootSchemaV3, K extends FormKey = FormKey>(\n configuration: Omit<\n UseFormConfiguration<\n V3FormOf<Schema>,\n V3OutOf<Schema>,\n AbstractSchema<V3FormOf<Schema>, V3OutOf<Schema>>,\n // Inert `DefaultValues` slot — see the v4 overload above.\n never,\n K\n >,\n 'schema' | 'validateOn' | 'debounceMs' | 'defaultValues'\n > & {\n schema: Schema\n // #422 — see the v4 overload above for the escape-arm rationale.\n defaultValues?: AcceptableDefaults<V3FormOf<Schema>, V3SchemaInput<Schema>>\n } & ValidateOnConfig\n): UseFormReturnType<V3FormOf<Schema>, V3OutOf<Schema>, V3ReadOf<Schema>, K>\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function useForm(configuration: any): any {\n if (\n configuration === undefined ||\n configuration === null ||\n (configuration as { schema?: unknown }).schema === undefined\n ) {\n throw new InvalidUseFormConfigError()\n }\n const { schema } = configuration as { schema: unknown }\n if (isZodV4SchemaShape(schema)) {\n return useFormV4(configuration as Parameters<typeof useFormV4>[0])\n }\n return useFormV3(configuration as Parameters<typeof useFormV3>[0])\n}\n","/**\n * Field-metadata write/read API for the unified `attaform/zod` entry.\n *\n * Storage is shared with both adapters via `field-meta-store` — a\n * payload written here is visible to whichever adapter the unified\n * `useForm` dispatches to at runtime, regardless of Zod major. No\n * `zod` runtime import; the type-only `import type` is erased at\n * build, so `attaform/zod` carries no `z.registry` reference even\n * when consumed by a Zod 3 project without the Vite plugin alias.\n *\n * The native v4 chain `schema.register(fieldMeta, payload)` continues\n * to work — Zod 4's `.register()` only calls `.add(this, payload)`\n * structurally, satisfied by the shared store.\n */\nimport type { z } from 'zod'\nimport type { FieldMetaPayload } from '../../core/field-meta'\nimport { fieldMetaStore, getFieldMetaForSchema } from '../../core/field-meta-store'\n\n// Zod v4's `$ZodRegistry` class isn't surfaced under the `z` namespace\n// of the classic external entry, but `z.registry()` returns one — so\n// `ReturnType<typeof z.registry<T>>` resolves to the registry type\n// without needing a direct import. The `import type` keeps the\n// reference type-only; nothing about `z.registry` lands in the bundle.\ntype ZodFieldMetaRegistry = ReturnType<typeof z.registry<FieldMetaPayload>>\n\n/**\n * The shared registry every Attaform-aware Zod schema can register\n * field metadata against, regardless of major. Same instance the v3\n * and v4 adapter entries expose — write in one place, read from\n * any.\n *\n * Cast to Zod 4's `$ZodRegistry<FieldMetaPayload>` so the native\n * `schema.register(fieldMeta, payload)` chain type-checks for v4\n * users; the runtime call only needs `.add` structurally, which the\n * shared store provides.\n */\nexport const fieldMeta = fieldMetaStore as unknown as ZodFieldMetaRegistry\n\n/**\n * Attach `payload` to `schema` in the shared registry and return a\n * clone of `schema` so each call gets its own identity (the registry\n * keys on schema reference, so cloning prevents last-write-wins\n * collisions for sub-schemas reused at multiple paths).\n *\n * Works on both Zod 3 and Zod 4 schemas — branches on the runtime\n * shape of the schema:\n * - Zod 4 schemas expose a public `.clone()` method; we call it.\n * - Zod 3 schemas don't, so we reconstruct via\n * `new schema.constructor(schema._def)`.\n *\n * Both forms produce a fresh schema with the same effective\n * structure, so the registry slot is unique to this call site.\n */\nexport function withMeta<S>(schema: S, payload: FieldMetaPayload): S {\n const target = schema as object\n const existing = getFieldMetaForSchema(target) ?? {}\n const cloned = cloneSchema(schema)\n fieldMetaStore.add(cloned as object, { ...existing, ...payload })\n return cloned\n}\n\nfunction cloneSchema<S>(schema: S): S {\n const candidate = schema as { clone?: unknown; constructor: unknown; _def: unknown }\n if (typeof candidate.clone === 'function') {\n return (candidate.clone as () => S)()\n }\n // Zod 3 path: reconstruct via constructor + _def (no public\n // `.clone()` on v3).\n const Ctor = candidate.constructor as new (def: unknown) => S\n return new Ctor(candidate._def)\n}\n"],"names":["InvalidUseFormConfigError","useFormV4","useFormV3","fieldMetaStore","getFieldMetaForSchema"],"mappings":";;;;;;;AAwCO,SAAS,mBAAmB,KAAA,EAAqC;AACtE,EAAA,IAAI,OAAO,KAAA,KAAU,QAAA,IAAY,KAAA,KAAU,MAAM,OAAO,KAAA;AACxD,EAAA,MAAM,MAAO,KAAA,CAA4B,GAAA;AACzC,EAAA,IAAI,OAAO,GAAA,KAAQ,QAAA,IAAY,GAAA,KAAQ,MAAM,OAAO,KAAA;AACpD,EAAA,OAAO,OAAQ,IAA2B,IAAA,KAAS,QAAA;AACrD;;ACqGO,SAAS,QAAQ,aAAA,EAAyB;AAC/C,EAAA,IACE,kBAAkB,MAAA,IAClB,aAAA,KAAkB,IAAA,IACjB,aAAA,CAAuC,WAAW,MAAA,EACnD;AACA,IAAA,MAAM,IAAIA,wCAAA,EAA0B;AAAA,EACtC;AACA,EAAA,MAAM,EAAE,QAAO,GAAI,aAAA;AACnB,EAAA,IAAI,kBAAA,CAAmB,MAAM,CAAA,EAAG;AAC9B,IAAA,OAAOC,cAAU,aAAgD,CAAA;AAAA,EACnE;AACA,EAAA,OAAOC,kBAAU,aAAgD,CAAA;AACnE;;AC3HO,MAAM,SAAA,GAAYC;AAiBlB,SAAS,QAAA,CAAY,QAAW,OAAA,EAA8B;AACnE,EAAA,MAAM,MAAA,GAAS,MAAA;AACf,EAAA,MAAM,QAAA,GAAWC,mCAAA,CAAsB,MAAM,CAAA,IAAK,EAAC;AACnD,EAAA,MAAM,MAAA,GAAS,YAAY,MAAM,CAAA;AACjC,EAAAD,4BAAA,CAAe,IAAI,MAAA,EAAkB,EAAE,GAAG,QAAA,EAAU,GAAG,SAAS,CAAA;AAChE,EAAA,OAAO,MAAA;AACT;AAEA,SAAS,YAAe,MAAA,EAAc;AACpC,EAAA,MAAM,SAAA,GAAY,MAAA;AAClB,EAAA,IAAI,OAAO,SAAA,CAAU,KAAA,KAAU,UAAA,EAAY;AACzC,IAAA,OAAQ,UAAU,KAAA,EAAkB;AAAA,EACtC;AAGA,EAAA,MAAM,OAAO,SAAA,CAAU,WAAA;AACvB,EAAA,OAAO,IAAI,IAAA,CAAK,SAAA,CAAU,IAAI,CAAA;AAChC;;;;;;"}
@@ -1,7 +1,7 @@
1
1
  import { isRef } from 'vue';
2
2
 
3
- const V_REGISTER_MARKER = Symbol.for("attaform:v-register-directive");
4
- const REGISTER_OWNER_MARKER = Symbol.for("attaform:register-owner-marker");
3
+ const V_REGISTER_MARKER = /* @__PURE__ */ Symbol.for("attaform:v-register-directive");
4
+ const REGISTER_OWNER_MARKER = /* @__PURE__ */ Symbol.for("attaform:register-owner-marker");
5
5
  const SSR_COMPONENT_HOST_MODIFIER = "attaformComponentHost";
6
6
  const V_REGISTER_COMPILED_MODIFIER = "attaformCompiled";
7
7
  function isRegisterValue(val) {
@@ -19,4 +19,4 @@ function isTransforming(value) {
19
19
  }
20
20
 
21
21
  export { REGISTER_OWNER_MARKER as R, SSR_COMPONENT_HOST_MODIFIER as S, V_REGISTER_COMPILED_MODIFIER as V, isTransforming as a, V_REGISTER_MARKER as b, isRegisterValue as i };
22
- //# sourceMappingURL=attaform.Vp2-CWZB.mjs.map
22
+ //# sourceMappingURL=attaform.KvlEedlF.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"attaform.Vp2-CWZB.mjs","sources":["../../src/runtime/core/register-protocol.ts"],"sourcesContent":["import { isRef } from 'vue'\nimport type { InternalRegisterValue, RegisterValue } from '../types/types-api'\n\n// Shared register-protocol primitives: the markers and value guards that\n// the v-register directive, its file / lifecycle satellites, and\n// useRegister all build on. They live in this leaf (depending only on vue\n// and the types module) so those modules don't import directive.ts back,\n// which would form an import cycle.\n\n/**\n * Marker installed on the v-register directive object so consumers\n * (notably `useRegister`) can identify it in a child vnode's\n * directive list even when the consumer's bundler hasn't installed\n * attaform's compile-time transforms. `Symbol.for(...)` round-trips\n * across duplicate bundle copies: `attaform` and `attaform/zod` can\n * land on different `vRegister` references in the playground or\n * under pnpm-hoist edge cases, but both carry the same marker.\n */\nexport const V_REGISTER_MARKER: unique symbol = Symbol.for('attaform:v-register-directive')\n\n/**\n * Marker on the rendered root DOM element. Set by `useRegister`'s\n * `onMounted` hook; read by the directive's deferred warn check to\n * skip the \"is a no-op\" warn for components that handle binding via\n * an inner v-register.\n *\n * `Symbol.for(...)` so the marker round-trips across duplicate copies\n * of attaform — see `assignKey` in core/directive.ts for the same\n * reasoning. `useRegister` and the directive are typically loaded\n * from the same module copy, but a consumer importing from\n * `attaform/zod` (Vite-optimized bundle) and the Nuxt\n * plugin's relative-path import (live ESM) can land on different\n * copies; a global symbol means the marker check still works.\n */\nexport const REGISTER_OWNER_MARKER: unique symbol = Symbol.for('attaform:register-owner-marker')\n\n/**\n * Directive modifier the `componentBridgeTransform` stamps onto a\n * `v-register` that lands on a component host (or kebab custom element).\n * It is the compile-time -> runtime signal the directive's `getSSRProps`\n * reads under compiled SSR, where Vue passes a `null` vnode and the host\n * is otherwise indistinguishable from a native control. autoAria then\n * suppresses its attrs on the host root (the inner control the component\n * re-binds via useRegister carries them). Namespaced to avoid collision\n * with any author-written modifier. (#404)\n */\nexport const SSR_COMPONENT_HOST_MODIFIER = 'attaformComponentHost'\n\n/**\n * Directive modifier the `redundantBindingWarnTransform` stamps onto\n * every `v-register` it processes. It is the compile-time -> runtime\n * signal that Attaform's template transforms are active, and it lets the\n * runtime redundant-binding diagnostic (in the directive's `created`\n * hook) stand down.\n *\n * The hand-off matters because `inputTextAreaNodeTransform` strips the\n * author's `value` / `checked` and injects its own. Once that has run,\n * `vnode.props` no longer reflects what the author wrote, so a runtime\n * check would flag every field. With this marker present the compile\n * layer owns detection (it reads the authored props BEFORE injection);\n * with it absent (no bundler plugin) the runtime layer reads the\n * untouched `vnode.props` directly. Exactly one layer fires per\n * consumer, never both.\n *\n * Namespaced to avoid collision with any author-written modifier, like\n * `SSR_COMPONENT_HOST_MODIFIER` above.\n */\nexport const V_REGISTER_COMPILED_MODIFIER = 'attaformCompiled'\n\n/**\n * Type guard for a `RegisterValue`. Returns `true` when `val` looks\n * like the object returned from `form.register(path)`.\n *\n * ```ts\n * if (isRegisterValue(slotValue)) {\n * // slotValue.innerRef is now a Ref<unknown>\n * }\n * ```\n *\n * Useful when building wrapper components that accept either a\n * `RegisterValue` or a plain ref via the same prop.\n */\nexport function isRegisterValue<Value = unknown>(val: unknown): val is RegisterValue<Value> {\n if (typeof val !== 'object' || val === null) return false\n if (!('innerRef' in val)) return false\n if (!isRef(val.innerRef)) return false\n if (!('registerElement' in val)) return false\n if (typeof val.registerElement !== 'function') return false\n if (!('setValueWithInternalPath' in val)) return false\n if (typeof val.setValueWithInternalPath !== 'function') return false\n return true\n}\n\n/**\n * `true` while a deferred async transform is in flight at this path.\n * `beginTransform` flips it synchronously inside the assigner, so a\n * listener's post-write force-sync block reads it (right after the\n * assigner returns) to skip snapping the DOM back to stale storage —\n * the resolved value is painted in by the orchestrator's `syncDom`\n * once the run lands.\n */\nexport function isTransforming(value: unknown): boolean {\n return isRegisterValue(value) && (value as InternalRegisterValue).transforming\n}\n"],"names":[],"mappings":";;AAkBO,MAAM,iBAAA,GAAmC,MAAA,CAAO,GAAA,CAAI,+BAA+B;AAgBnF,MAAM,qBAAA,GAAuC,MAAA,CAAO,GAAA,CAAI,gCAAgC;AAYxF,MAAM,2BAAA,GAA8B;AAqBpC,MAAM,4BAAA,GAA+B;AAerC,SAAS,gBAAiC,GAAA,EAA2C;AAC1F,EAAA,IAAI,OAAO,GAAA,KAAQ,QAAA,IAAY,GAAA,KAAQ,MAAM,OAAO,KAAA;AACpD,EAAA,IAAI,EAAE,UAAA,IAAc,GAAA,CAAA,EAAM,OAAO,KAAA;AACjC,EAAA,IAAI,CAAC,KAAA,CAAM,GAAA,CAAI,QAAQ,GAAG,OAAO,KAAA;AACjC,EAAA,IAAI,EAAE,iBAAA,IAAqB,GAAA,CAAA,EAAM,OAAO,KAAA;AACxC,EAAA,IAAI,OAAO,GAAA,CAAI,eAAA,KAAoB,UAAA,EAAY,OAAO,KAAA;AACtD,EAAA,IAAI,EAAE,0BAAA,IAA8B,GAAA,CAAA,EAAM,OAAO,KAAA;AACjD,EAAA,IAAI,OAAO,GAAA,CAAI,wBAAA,KAA6B,UAAA,EAAY,OAAO,KAAA;AAC/D,EAAA,OAAO,IAAA;AACT;AAUO,SAAS,eAAe,KAAA,EAAyB;AACtD,EAAA,OAAO,eAAA,CAAgB,KAAK,CAAA,IAAM,KAAA,CAAgC,YAAA;AACpE;;;;"}
1
+ {"version":3,"file":"attaform.KvlEedlF.mjs","sources":["../../src/runtime/core/register-protocol.ts"],"sourcesContent":["import { isRef } from 'vue'\nimport type { InternalRegisterValue, RegisterValue } from '../types/types-api'\n\n// Shared register-protocol primitives: the markers and value guards that\n// the v-register directive, its file / lifecycle satellites, and\n// useRegister all build on. They live in this leaf (depending only on vue\n// and the types module) so those modules don't import directive.ts back,\n// which would form an import cycle.\n\n/**\n * Marker installed on the v-register directive object so consumers\n * (notably `useRegister`) can identify it in a child vnode's\n * directive list even when the consumer's bundler hasn't installed\n * attaform's compile-time transforms. `Symbol.for(...)` round-trips\n * across duplicate bundle copies: `attaform` and `attaform/zod` can\n * land on different `vRegister` references in the playground or\n * under pnpm-hoist edge cases, but both carry the same marker.\n */\nexport const V_REGISTER_MARKER: unique symbol = Symbol.for('attaform:v-register-directive')\n\n/**\n * Marker on the rendered root DOM element. Set by `useRegister`'s\n * `onMounted` hook; read by the directive's deferred warn check to\n * skip the \"is a no-op\" warn for components that handle binding via\n * an inner v-register.\n *\n * `Symbol.for(...)` so the marker round-trips across duplicate copies\n * of attaform — see `assignKey` in core/directive.ts for the same\n * reasoning. `useRegister` and the directive are typically loaded\n * from the same module copy, but a consumer importing from\n * `attaform/zod` (Vite-optimized bundle) and the Nuxt\n * plugin's relative-path import (live ESM) can land on different\n * copies; a global symbol means the marker check still works.\n */\nexport const REGISTER_OWNER_MARKER: unique symbol = Symbol.for('attaform:register-owner-marker')\n\n/**\n * Directive modifier the `componentBridgeTransform` stamps onto a\n * `v-register` that lands on a component host (or kebab custom element).\n * It is the compile-time -> runtime signal the directive's `getSSRProps`\n * reads under compiled SSR, where Vue passes a `null` vnode and the host\n * is otherwise indistinguishable from a native control. autoAria then\n * suppresses its attrs on the host root (the inner control the component\n * re-binds via useRegister carries them). Namespaced to avoid collision\n * with any author-written modifier. (#404)\n */\nexport const SSR_COMPONENT_HOST_MODIFIER = 'attaformComponentHost'\n\n/**\n * Directive modifier the `redundantBindingWarnTransform` stamps onto\n * every `v-register` it processes. It is the compile-time -> runtime\n * signal that Attaform's template transforms are active, and it lets the\n * runtime redundant-binding diagnostic (in the directive's `created`\n * hook) stand down.\n *\n * The hand-off matters because `inputTextAreaNodeTransform` strips the\n * author's `value` / `checked` and injects its own. Once that has run,\n * `vnode.props` no longer reflects what the author wrote, so a runtime\n * check would flag every field. With this marker present the compile\n * layer owns detection (it reads the authored props BEFORE injection);\n * with it absent (no bundler plugin) the runtime layer reads the\n * untouched `vnode.props` directly. Exactly one layer fires per\n * consumer, never both.\n *\n * Namespaced to avoid collision with any author-written modifier, like\n * `SSR_COMPONENT_HOST_MODIFIER` above.\n */\nexport const V_REGISTER_COMPILED_MODIFIER = 'attaformCompiled'\n\n/**\n * Type guard for a `RegisterValue`. Returns `true` when `val` looks\n * like the object returned from `form.register(path)`.\n *\n * ```ts\n * if (isRegisterValue(slotValue)) {\n * // slotValue.innerRef is now a Ref<unknown>\n * }\n * ```\n *\n * Useful when building wrapper components that accept either a\n * `RegisterValue` or a plain ref via the same prop.\n */\nexport function isRegisterValue<Value = unknown>(val: unknown): val is RegisterValue<Value> {\n if (typeof val !== 'object' || val === null) return false\n if (!('innerRef' in val)) return false\n if (!isRef(val.innerRef)) return false\n if (!('registerElement' in val)) return false\n if (typeof val.registerElement !== 'function') return false\n if (!('setValueWithInternalPath' in val)) return false\n if (typeof val.setValueWithInternalPath !== 'function') return false\n return true\n}\n\n/**\n * `true` while a deferred async transform is in flight at this path.\n * `beginTransform` flips it synchronously inside the assigner, so a\n * listener's post-write force-sync block reads it (right after the\n * assigner returns) to skip snapping the DOM back to stale storage —\n * the resolved value is painted in by the orchestrator's `syncDom`\n * once the run lands.\n */\nexport function isTransforming(value: unknown): boolean {\n return isRegisterValue(value) && (value as InternalRegisterValue).transforming\n}\n"],"names":[],"mappings":";;AAkBO,MAAM,iBAAA,mBAAmC,MAAA,CAAO,GAAA,CAAI,+BAA+B;AAgBnF,MAAM,qBAAA,mBAAuC,MAAA,CAAO,GAAA,CAAI,gCAAgC;AAYxF,MAAM,2BAAA,GAA8B;AAqBpC,MAAM,4BAAA,GAA+B;AAerC,SAAS,gBAAiC,GAAA,EAA2C;AAC1F,EAAA,IAAI,OAAO,GAAA,KAAQ,QAAA,IAAY,GAAA,KAAQ,MAAM,OAAO,KAAA;AACpD,EAAA,IAAI,EAAE,UAAA,IAAc,GAAA,CAAA,EAAM,OAAO,KAAA;AACjC,EAAA,IAAI,CAAC,KAAA,CAAM,GAAA,CAAI,QAAQ,GAAG,OAAO,KAAA;AACjC,EAAA,IAAI,EAAE,iBAAA,IAAqB,GAAA,CAAA,EAAM,OAAO,KAAA;AACxC,EAAA,IAAI,OAAO,GAAA,CAAI,eAAA,KAAoB,UAAA,EAAY,OAAO,KAAA;AACtD,EAAA,IAAI,EAAE,0BAAA,IAA8B,GAAA,CAAA,EAAM,OAAO,KAAA;AACjD,EAAA,IAAI,OAAO,GAAA,CAAI,wBAAA,KAA6B,UAAA,EAAY,OAAO,KAAA;AAC/D,EAAA,OAAO,IAAA;AACT;AAUO,SAAS,eAAe,KAAA,EAAyB;AACtD,EAAA,OAAO,eAAA,CAAgB,KAAK,CAAA,IAAM,KAAA,CAAgC,YAAA;AACpE;;;;"}
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- const detectZodMajor = require('./attaform.LEWUFqUw.cjs');
3
+ const detectZodMajor = require('./attaform.DoQm_Vkd.cjs');
4
4
 
5
5
  const TAP_NAME = "attaform";
6
6
  function createWebpackFamilyPlugin(tag, options) {
@@ -13,7 +13,7 @@ function createWebpackFamilyPlugin(tag, options) {
13
13
  if (target === null) return;
14
14
  compiler.hooks.normalModuleFactory.tap(TAP_NAME, (factory) => {
15
15
  factory.hooks.beforeResolve.tap(TAP_NAME, (data) => {
16
- if (data.request === detectZodMajor.ZOD_UNIFIED_SPECIFIER) {
16
+ if (detectZodMajor.isRewritableZodSpecifier(data.request)) {
17
17
  data.request = target;
18
18
  }
19
19
  });
@@ -23,4 +23,4 @@ function createWebpackFamilyPlugin(tag, options) {
23
23
  }
24
24
 
25
25
  exports.createWebpackFamilyPlugin = createWebpackFamilyPlugin;
26
- //# sourceMappingURL=attaform.BRGIpZo4.cjs.map
26
+ //# sourceMappingURL=attaform.RaTzp1WF.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"attaform.RaTzp1WF.cjs","sources":["../../src/core/webpack-family-plugin.ts"],"sourcesContent":["/**\n * Shared webpack/rspack plugin body. Rspack mirrors webpack's plugin API\n * for the resolve hooks attaform taps, so one implementation backs both\n * `attaform/webpack` and `attaform/rspack`; only the diagnostic `tag`\n * differs.\n *\n * The plugin taps `normalModuleFactory.beforeResolve` and rewrites the\n * `attaform` / `attaform/zod` request to the matching adapter subpath, the\n * same effect as webpack's own `NormalModuleReplacementPlugin` but tapping\n * the hook directly so the plugin imports nothing from webpack/rspack\n * (keeping attaform dependency-free). The bundler injects the hook API at\n * the consumer's build, so the minimal structural types below are all the\n * plugin needs to compile.\n *\n * Build-time only: never part of a consumer's browser bundle.\n */\nimport { isRewritableZodSpecifier, resolveZodAliasTarget } from './detect-zod-major'\n\nexport interface WebpackFamilyPluginOptions {\n /**\n * Rewrite `attaform` and `attaform/zod` imports at build time to the\n * matching adapter subpath, based on the consumer's installed Zod major.\n * Default `true`. Set to `false` to keep the runtime-dispatch unified\n * entry (ships both adapters) when a project intentionally mixes Zod\n * versions or resolves Zod in a non-standard way.\n */\n resolveZodAlias?: boolean\n /**\n * Project root to resolve the installed Zod from. Defaults to the\n * compiler's `context`, falling back to `process.cwd()`. Set this when\n * the build runs from a directory other than the project that owns the\n * Zod dependency (some monorepo layouts).\n */\n root?: string\n}\n\ninterface WebpackTapable<T> {\n tap(name: string, fn: (arg: T) => void): void\n}\ninterface WebpackResolveData {\n request: string\n}\ninterface WebpackNormalModuleFactory {\n hooks: { beforeResolve: WebpackTapable<WebpackResolveData> }\n}\ninterface WebpackCompiler {\n context?: string\n hooks: { normalModuleFactory: WebpackTapable<WebpackNormalModuleFactory> }\n}\n\n/** The structural shape webpack/rspack require of a plugin: an object\n * with an `apply(compiler)` method. */\nexport interface WebpackFamilyPlugin {\n apply(compiler: WebpackCompiler): void\n}\n\nconst TAP_NAME = 'attaform'\n\nexport function createWebpackFamilyPlugin(\n tag: string,\n options: WebpackFamilyPluginOptions\n): WebpackFamilyPlugin {\n const resolveZodAlias = options.resolveZodAlias !== false\n const warnState = { warned: false }\n return {\n apply(compiler) {\n const root = compiler.context ?? options.root ?? process.cwd()\n const target = resolveZodAliasTarget(root, tag, resolveZodAlias, warnState)\n if (target === null) return\n compiler.hooks.normalModuleFactory.tap(TAP_NAME, (factory) => {\n factory.hooks.beforeResolve.tap(TAP_NAME, (data) => {\n // Rewrite both the bare `attaform` barrel and the explicit\n // `attaform/zod` (both carry the runtime dispatcher) to the one\n // detected adapter; pinned subpaths pass through untouched.\n if (isRewritableZodSpecifier(data.request)) {\n data.request = target\n }\n })\n })\n },\n }\n}\n"],"names":["resolveZodAliasTarget","isRewritableZodSpecifier"],"mappings":";;;;AAwDA,MAAM,QAAA,GAAW,UAAA;AAEV,SAAS,yBAAA,CACd,KACA,OAAA,EACqB;AACrB,EAAA,MAAM,eAAA,GAAkB,QAAQ,eAAA,KAAoB,KAAA;AACpD,EAAA,MAAM,SAAA,GAAY,EAAE,MAAA,EAAQ,KAAA,EAAM;AAClC,EAAA,OAAO;AAAA,IACL,MAAM,QAAA,EAAU;AACd,MAAA,MAAM,OAAO,QAAA,CAAS,OAAA,IAAW,OAAA,CAAQ,IAAA,IAAQ,QAAQ,GAAA,EAAI;AAC7D,MAAA,MAAM,MAAA,GAASA,oCAAA,CAAsB,IAAA,EAAM,GAAA,EAAK,iBAAiB,SAAS,CAAA;AAC1E,MAAA,IAAI,WAAW,IAAA,EAAM;AACrB,MAAA,QAAA,CAAS,KAAA,CAAM,mBAAA,CAAoB,GAAA,CAAI,QAAA,EAAU,CAAC,OAAA,KAAY;AAC5D,QAAA,OAAA,CAAQ,KAAA,CAAM,aAAA,CAAc,GAAA,CAAI,QAAA,EAAU,CAAC,IAAA,KAAS;AAIlD,UAAA,IAAIC,uCAAA,CAAyB,IAAA,CAAK,OAAO,CAAA,EAAG;AAC1C,YAAA,IAAA,CAAK,OAAA,GAAU,MAAA;AAAA,UACjB;AAAA,QACF,CAAC,CAAA;AAAA,MACH,CAAC,CAAA;AAAA,IACH;AAAA,GACF;AACF;;;;"}