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.
- package/README.md +21 -11
- package/bin/attaform.mjs +78 -0
- package/dist/abstract.cjs +47 -0
- package/dist/abstract.cjs.map +1 -0
- package/dist/abstract.d.cts +42 -0
- package/dist/abstract.d.mts +42 -0
- package/dist/abstract.d.ts +42 -0
- package/dist/abstract.mjs +4 -0
- package/dist/abstract.mjs.map +1 -0
- package/dist/chunks/devtools.cjs +2 -2
- package/dist/chunks/devtools.cjs.map +1 -1
- package/dist/chunks/devtools.mjs +1 -1
- package/dist/chunks/fingerprint2.cjs +1 -1
- package/dist/chunks/fingerprint2.mjs +1 -1
- package/dist/esbuild.cjs +2 -2
- package/dist/esbuild.cjs.map +1 -1
- package/dist/esbuild.d.cts +3 -3
- package/dist/esbuild.d.mts +3 -3
- package/dist/esbuild.d.ts +3 -3
- package/dist/esbuild.mjs +2 -2
- package/dist/esbuild.mjs.map +1 -1
- package/dist/index.cjs +41 -56
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +194 -282
- package/dist/index.d.mts +194 -282
- package/dist/index.d.ts +194 -282
- package/dist/index.mjs +4 -25
- package/dist/index.mjs.map +1 -1
- package/dist/nuxt.cjs +3 -1
- package/dist/nuxt.cjs.map +1 -1
- package/dist/nuxt.d.cts +17 -4
- package/dist/nuxt.d.mts +17 -4
- package/dist/nuxt.d.ts +17 -4
- package/dist/nuxt.mjs +4 -2
- package/dist/nuxt.mjs.map +1 -1
- package/dist/rollup.cjs +2 -2
- package/dist/rollup.cjs.map +1 -1
- package/dist/rollup.d.cts +3 -3
- package/dist/rollup.d.mts +3 -3
- package/dist/rollup.d.ts +3 -3
- package/dist/rollup.mjs +2 -2
- package/dist/rollup.mjs.map +1 -1
- package/dist/rspack.cjs +1 -1
- package/dist/rspack.d.cts +1 -1
- package/dist/rspack.d.mts +1 -1
- package/dist/rspack.d.ts +1 -1
- package/dist/rspack.mjs +1 -1
- package/dist/runtime/plugins/attaform.cjs +4 -5
- package/dist/runtime/plugins/attaform.cjs.map +1 -1
- package/dist/runtime/plugins/attaform.mjs +1 -2
- package/dist/runtime/plugins/attaform.mjs.map +1 -1
- package/dist/shared/{attaform.BRzKBj2g.cjs → attaform.8tFZu1Ub.cjs} +2 -2
- package/dist/shared/{attaform.BRzKBj2g.cjs.map → attaform.8tFZu1Ub.cjs.map} +1 -1
- package/dist/shared/{attaform.k9V0py0s.mjs → attaform.BERt5YMU.mjs} +2 -2
- package/dist/shared/{attaform.k9V0py0s.mjs.map → attaform.BERt5YMU.mjs.map} +1 -1
- package/dist/shared/{attaform.DSOIz08n.mjs → attaform.BceJrhQ7.mjs} +5 -5
- package/dist/shared/{attaform.DSOIz08n.mjs.map → attaform.BceJrhQ7.mjs.map} +1 -1
- package/dist/shared/{attaform.DBNjHgNj.d.cts → attaform.C3WnCDXz.d.cts} +11 -9
- package/dist/shared/{attaform.DBNjHgNj.d.mts → attaform.C3WnCDXz.d.mts} +11 -9
- package/dist/shared/{attaform.DBNjHgNj.d.ts → attaform.C3WnCDXz.d.ts} +11 -9
- package/dist/shared/{attaform.DuzQYscR.d.mts → attaform.C9fPTxjB.d.cts} +5 -5
- package/dist/shared/{attaform.DuzQYscR.d.ts → attaform.C9fPTxjB.d.mts} +5 -5
- package/dist/shared/{attaform.DuzQYscR.d.cts → attaform.C9fPTxjB.d.ts} +5 -5
- package/dist/shared/{attaform.Be5otUVw.d.ts → attaform.CC_y1_Ej.d.ts} +33 -33
- package/dist/shared/{attaform.ceYeVkjn.d.ts → attaform.CEXUlUkc.d.ts} +1579 -1192
- package/dist/shared/{attaform.tZ0YKisf.cjs → attaform.C__F01CE.cjs} +15 -15
- package/dist/shared/{attaform.tZ0YKisf.cjs.map → attaform.C__F01CE.cjs.map} +1 -1
- package/dist/shared/{attaform.BPl-ECRT.cjs → attaform.Co5LNRnv.cjs} +162 -129
- package/dist/shared/attaform.Co5LNRnv.cjs.map +1 -0
- package/dist/shared/{attaform.B71rfNL5.d.mts → attaform.CpXHK60W.d.cts} +33 -33
- package/dist/shared/{attaform.BFfY7HRI.d.cts → attaform.CvVYOvZF.d.mts} +33 -33
- package/dist/shared/{attaform.BoYqnIPI.mjs → attaform.CyQxTOdX.mjs} +55 -36
- package/dist/shared/attaform.CyQxTOdX.mjs.map +1 -0
- package/dist/shared/{attaform.CEY_WLRJ.d.mts → attaform.D99pd7JG.d.cts} +1579 -1192
- package/dist/shared/{attaform.CXVmZtFq.mjs → attaform.DDAmSFnl.mjs} +4 -4
- package/dist/shared/{attaform.CXVmZtFq.mjs.map → attaform.DDAmSFnl.mjs.map} +1 -1
- package/dist/shared/{attaform.Du9RZp8m.cjs → attaform.DQT7_-FO.cjs} +272 -252
- package/dist/shared/attaform.DQT7_-FO.cjs.map +1 -0
- package/dist/shared/{attaform.DGhIix5D.mjs → attaform.Da8EdI2t.mjs} +160 -129
- package/dist/shared/attaform.Da8EdI2t.mjs.map +1 -0
- package/dist/shared/{attaform.Cs0UZ7q6.cjs → attaform.DhVgG2jh.cjs} +16 -16
- package/dist/shared/{attaform.Cs0UZ7q6.cjs.map → attaform.DhVgG2jh.cjs.map} +1 -1
- package/dist/shared/{attaform.sHkHv_98.mjs → attaform.DhnPb6nK.mjs} +6 -3
- package/dist/shared/attaform.DhnPb6nK.mjs.map +1 -0
- package/dist/shared/attaform.DkD0DR7R.mjs +42 -0
- package/dist/shared/attaform.DkD0DR7R.mjs.map +1 -0
- package/dist/shared/{attaform.CSXDW2tO.mjs → attaform.DlSu08F5.mjs} +4 -4
- package/dist/shared/{attaform.CSXDW2tO.mjs.map → attaform.DlSu08F5.mjs.map} +1 -1
- package/dist/shared/{attaform.LEWUFqUw.cjs → attaform.DoQm_Vkd.cjs} +7 -3
- package/dist/shared/attaform.DoQm_Vkd.cjs.map +1 -0
- package/dist/shared/{attaform.BQflyVOL.cjs → attaform.Drsi43GG.cjs} +19 -19
- package/dist/shared/{attaform.BQflyVOL.cjs.map → attaform.Drsi43GG.cjs.map} +1 -1
- package/dist/shared/attaform.K6Thc6By.cjs +46 -0
- package/dist/shared/attaform.K6Thc6By.cjs.map +1 -0
- package/dist/shared/{attaform.Vp2-CWZB.mjs → attaform.KvlEedlF.mjs} +3 -3
- package/dist/shared/{attaform.Vp2-CWZB.mjs.map → attaform.KvlEedlF.mjs.map} +1 -1
- package/dist/shared/{attaform.BRGIpZo4.cjs → attaform.RaTzp1WF.cjs} +3 -3
- package/dist/shared/attaform.RaTzp1WF.cjs.map +1 -0
- package/dist/shared/{attaform.MgaYKlPP.d.cts → attaform.kBkYlKP_.d.mts} +1579 -1192
- package/dist/shared/{attaform.C3Doa9Pt.mjs → attaform.v0fQtWyA.mjs} +3 -3
- package/dist/shared/attaform.v0fQtWyA.mjs.map +1 -0
- package/dist/shared/{attaform.ZXZ6dH72.cjs → attaform.yUrz7C2z.cjs} +3 -3
- package/dist/shared/{attaform.ZXZ6dH72.cjs.map → attaform.yUrz7C2z.cjs.map} +1 -1
- package/dist/transforms.cjs +1 -1
- package/dist/transforms.mjs +1 -1
- package/dist/vite.cjs +21 -3
- package/dist/vite.cjs.map +1 -1
- package/dist/vite.d.cts +70 -17
- package/dist/vite.d.mts +70 -17
- package/dist/vite.d.ts +70 -17
- package/dist/vite.mjs +20 -4
- package/dist/vite.mjs.map +1 -1
- package/dist/webpack.cjs +1 -1
- package/dist/webpack.d.cts +1 -1
- package/dist/webpack.d.mts +1 -1
- package/dist/webpack.d.ts +1 -1
- package/dist/webpack.mjs +1 -1
- package/dist/zod-v3.cjs +41 -10
- package/dist/zod-v3.cjs.map +1 -1
- package/dist/zod-v3.d.cts +5 -5
- package/dist/zod-v3.d.mts +5 -5
- package/dist/zod-v3.d.ts +5 -5
- package/dist/zod-v3.mjs +4 -2
- package/dist/zod-v3.mjs.map +1 -1
- package/dist/zod-v4.cjs +41 -10
- package/dist/zod-v4.cjs.map +1 -1
- package/dist/zod-v4.d.cts +7 -7
- package/dist/zod-v4.d.mts +7 -7
- package/dist/zod-v4.d.ts +7 -7
- package/dist/zod-v4.mjs +4 -2
- package/dist/zod-v4.mjs.map +1 -1
- package/dist/zod.cjs +44 -49
- package/dist/zod.cjs.map +1 -1
- package/dist/zod.d.cts +6 -248
- package/dist/zod.d.mts +6 -248
- package/dist/zod.d.ts +6 -248
- package/dist/zod.mjs +4 -42
- package/dist/zod.mjs.map +1 -1
- package/package.json +12 -2
- package/skills/attaform/SKILL.md +128 -0
- package/skills/attaform/references/custom-components.md +72 -0
- package/skills/attaform/references/errors.md +62 -0
- package/skills/attaform/references/ssr.md +26 -0
- package/skills/attaform/references/validation.md +40 -0
- package/skills/attaform/references/wizards.md +104 -0
- package/dist/shared/attaform.55hFR_cl.d.ts +0 -97
- package/dist/shared/attaform.BPl-ECRT.cjs.map +0 -1
- package/dist/shared/attaform.BRGIpZo4.cjs.map +0 -1
- package/dist/shared/attaform.BoYqnIPI.mjs.map +0 -1
- package/dist/shared/attaform.C3Doa9Pt.mjs.map +0 -1
- package/dist/shared/attaform.D51IwDtP.cjs +0 -39
- package/dist/shared/attaform.D51IwDtP.cjs.map +0 -1
- package/dist/shared/attaform.DGhIix5D.mjs.map +0 -1
- package/dist/shared/attaform.DJRz_bzM.d.cts +0 -97
- package/dist/shared/attaform.Du9RZp8m.cjs.map +0 -1
- package/dist/shared/attaform.JPsaqjLl.d.mts +0 -97
- package/dist/shared/attaform.LEWUFqUw.cjs.map +0 -1
- package/dist/shared/attaform.NqYEzRcM.mjs +0 -35
- package/dist/shared/attaform.NqYEzRcM.mjs.map +0 -1
- package/dist/shared/attaform.sHkHv_98.mjs.map +0 -1
- package/dist/shared/{attaform.DdjDqTah.d.ts → attaform.DRUT703x.d.cts} +14 -14
- package/dist/shared/{attaform.DdjDqTah.d.cts → attaform.DRUT703x.d.mts} +14 -14
- package/dist/shared/{attaform.DdjDqTah.d.mts → attaform.DRUT703x.d.ts} +14 -14
|
@@ -1,5 +1,37 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { G as GenericForm,
|
|
2
|
+
import { G as GenericForm, s as FlatPath, B as NestedType, F as FormKey, U as UseFormConfiguration, A as AbstractSchema, aq as AcceptableDefaults, ae as ValidateOnConfig, a as UseFormReturnType } from './attaform.C3WnCDXz.cjs';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* The Zod v4 schema roots `useForm` accepts. A fixed-shape
|
|
6
|
+
* `z.object({ … })` is the common case; `z.record(K, V)` admits a
|
|
7
|
+
* dictionary form (a homogeneous map with runtime-known keys);
|
|
8
|
+
* `z.discriminatedUnion(disc, [...])` admits a variant form (one of
|
|
9
|
+
* several object shapes, picked by a discriminator). Each projects to
|
|
10
|
+
* a `GenericForm`-shaped value the form engine drives: an object root
|
|
11
|
+
* descends into its fixed keys, a record root treats its entries as an
|
|
12
|
+
* open live-keyed container, a variant root lifts the active variant's
|
|
13
|
+
* keys into one addressable surface.
|
|
14
|
+
*
|
|
15
|
+
* Other roots (a bare `z.union`, a root `z.array`, primitives,
|
|
16
|
+
* `z.map` / `z.set`) are not form roots; wrap them under a key. The
|
|
17
|
+
* adapter's runtime construction rejects them with a legible error.
|
|
18
|
+
*
|
|
19
|
+
* `z.ZodObject` MUST keep its `z.ZodRawShape` argument, and the
|
|
20
|
+
* discriminated-union arm MUST stay fully applied. The unified entry's
|
|
21
|
+
* v4 overload constrains on `SupportedRootSchema & ZodV4Internals` to
|
|
22
|
+
* keep v3 schemas out (see `../unified/types-zod-major.ts`). In a
|
|
23
|
+
* single-major (v3-only) consumer install, the published `.d.mts`
|
|
24
|
+
* resolves this `z` to v3, where a bare or under-applied Zod class is
|
|
25
|
+
* missing its required arguments and degrades to an `any`-like error
|
|
26
|
+
* type; `any` then absorbs the union and `any & ZodV4Internals`
|
|
27
|
+
* collapses back to `any`, so the marker stops excluding v3 schemas and
|
|
28
|
+
* the read slot poisons to `never`. `z.ZodRecord` carries defaults for
|
|
29
|
+
* both arguments, so it stays concrete in either major.
|
|
30
|
+
* `z.ZodDiscriminatedUnion` does NOT (v3 requires both arguments, and
|
|
31
|
+
* its parameter order is the reverse of v4's), so the arm is written
|
|
32
|
+
* fully applied; the v3-only bundled-types fixture guards it.
|
|
33
|
+
*/
|
|
34
|
+
type SupportedRootSchema = z.ZodObject<z.ZodRawShape> | z.ZodRecord | z.ZodDiscriminatedUnion<readonly z.ZodObject<z.ZodRawShape>[], string>;
|
|
3
35
|
|
|
4
36
|
/**
|
|
5
37
|
* The shape `form.values.<key>` returns at runtime.
|
|
@@ -120,38 +152,6 @@ type StorageLeaf<L> = InputIsUnknown<L> extends true ? unknown : L extends {
|
|
|
120
152
|
};
|
|
121
153
|
} ? Out : never;
|
|
122
154
|
|
|
123
|
-
/**
|
|
124
|
-
* The Zod v4 schema roots `useForm` accepts. A fixed-shape
|
|
125
|
-
* `z.object({ … })` is the common case; `z.record(K, V)` admits a
|
|
126
|
-
* dictionary form (a homogeneous map with runtime-known keys);
|
|
127
|
-
* `z.discriminatedUnion(disc, [...])` admits a variant form (one of
|
|
128
|
-
* several object shapes, picked by a discriminator). Each projects to
|
|
129
|
-
* a `GenericForm`-shaped value the form engine drives: an object root
|
|
130
|
-
* descends into its fixed keys, a record root treats its entries as an
|
|
131
|
-
* open live-keyed container, a variant root lifts the active variant's
|
|
132
|
-
* keys into one addressable surface.
|
|
133
|
-
*
|
|
134
|
-
* Other roots (a bare `z.union`, a root `z.array`, primitives,
|
|
135
|
-
* `z.map` / `z.set`) are not form roots; wrap them under a key. The
|
|
136
|
-
* adapter's runtime construction rejects them with a legible error.
|
|
137
|
-
*
|
|
138
|
-
* `z.ZodObject` MUST keep its `z.ZodRawShape` argument, and the
|
|
139
|
-
* discriminated-union arm MUST stay fully applied. The unified entry's
|
|
140
|
-
* v4 overload constrains on `SupportedRootSchema & ZodV4Internals` to
|
|
141
|
-
* keep v3 schemas out (see `../unified/types-zod-major.ts`). In a
|
|
142
|
-
* single-major (v3-only) consumer install, the published `.d.mts`
|
|
143
|
-
* resolves this `z` to v3, where a bare or under-applied Zod class is
|
|
144
|
-
* missing its required arguments and degrades to an `any`-like error
|
|
145
|
-
* type; `any` then absorbs the union and `any & ZodV4Internals`
|
|
146
|
-
* collapses back to `any`, so the marker stops excluding v3 schemas and
|
|
147
|
-
* the read slot poisons to `never`. `z.ZodRecord` carries defaults for
|
|
148
|
-
* both arguments, so it stays concrete in either major.
|
|
149
|
-
* `z.ZodDiscriminatedUnion` does NOT (v3 requires both arguments, and
|
|
150
|
-
* its parameter order is the reverse of v4's), so the arm is written
|
|
151
|
-
* fully applied; the v3-only bundled-types fixture guards it.
|
|
152
|
-
*/
|
|
153
|
-
type SupportedRootSchema = z.ZodObject<z.ZodRawShape> | z.ZodRecord | z.ZodDiscriminatedUnion<readonly z.ZodObject<z.ZodRawShape>[], string>;
|
|
154
|
-
|
|
155
155
|
/**
|
|
156
156
|
* Zod v4 adapter entry point. Re-exports the adapter + the useForm
|
|
157
157
|
* wrapper that threads zod-v4-specific schema types through
|
|
@@ -1,5 +1,37 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { G as GenericForm,
|
|
2
|
+
import { G as GenericForm, s as FlatPath, B as NestedType, F as FormKey, U as UseFormConfiguration, A as AbstractSchema, aq as AcceptableDefaults, ae as ValidateOnConfig, a as UseFormReturnType } from './attaform.C3WnCDXz.mjs';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* The Zod v4 schema roots `useForm` accepts. A fixed-shape
|
|
6
|
+
* `z.object({ … })` is the common case; `z.record(K, V)` admits a
|
|
7
|
+
* dictionary form (a homogeneous map with runtime-known keys);
|
|
8
|
+
* `z.discriminatedUnion(disc, [...])` admits a variant form (one of
|
|
9
|
+
* several object shapes, picked by a discriminator). Each projects to
|
|
10
|
+
* a `GenericForm`-shaped value the form engine drives: an object root
|
|
11
|
+
* descends into its fixed keys, a record root treats its entries as an
|
|
12
|
+
* open live-keyed container, a variant root lifts the active variant's
|
|
13
|
+
* keys into one addressable surface.
|
|
14
|
+
*
|
|
15
|
+
* Other roots (a bare `z.union`, a root `z.array`, primitives,
|
|
16
|
+
* `z.map` / `z.set`) are not form roots; wrap them under a key. The
|
|
17
|
+
* adapter's runtime construction rejects them with a legible error.
|
|
18
|
+
*
|
|
19
|
+
* `z.ZodObject` MUST keep its `z.ZodRawShape` argument, and the
|
|
20
|
+
* discriminated-union arm MUST stay fully applied. The unified entry's
|
|
21
|
+
* v4 overload constrains on `SupportedRootSchema & ZodV4Internals` to
|
|
22
|
+
* keep v3 schemas out (see `../unified/types-zod-major.ts`). In a
|
|
23
|
+
* single-major (v3-only) consumer install, the published `.d.mts`
|
|
24
|
+
* resolves this `z` to v3, where a bare or under-applied Zod class is
|
|
25
|
+
* missing its required arguments and degrades to an `any`-like error
|
|
26
|
+
* type; `any` then absorbs the union and `any & ZodV4Internals`
|
|
27
|
+
* collapses back to `any`, so the marker stops excluding v3 schemas and
|
|
28
|
+
* the read slot poisons to `never`. `z.ZodRecord` carries defaults for
|
|
29
|
+
* both arguments, so it stays concrete in either major.
|
|
30
|
+
* `z.ZodDiscriminatedUnion` does NOT (v3 requires both arguments, and
|
|
31
|
+
* its parameter order is the reverse of v4's), so the arm is written
|
|
32
|
+
* fully applied; the v3-only bundled-types fixture guards it.
|
|
33
|
+
*/
|
|
34
|
+
type SupportedRootSchema = z.ZodObject<z.ZodRawShape> | z.ZodRecord | z.ZodDiscriminatedUnion<readonly z.ZodObject<z.ZodRawShape>[], string>;
|
|
3
35
|
|
|
4
36
|
/**
|
|
5
37
|
* The shape `form.values.<key>` returns at runtime.
|
|
@@ -120,38 +152,6 @@ type StorageLeaf<L> = InputIsUnknown<L> extends true ? unknown : L extends {
|
|
|
120
152
|
};
|
|
121
153
|
} ? Out : never;
|
|
122
154
|
|
|
123
|
-
/**
|
|
124
|
-
* The Zod v4 schema roots `useForm` accepts. A fixed-shape
|
|
125
|
-
* `z.object({ … })` is the common case; `z.record(K, V)` admits a
|
|
126
|
-
* dictionary form (a homogeneous map with runtime-known keys);
|
|
127
|
-
* `z.discriminatedUnion(disc, [...])` admits a variant form (one of
|
|
128
|
-
* several object shapes, picked by a discriminator). Each projects to
|
|
129
|
-
* a `GenericForm`-shaped value the form engine drives: an object root
|
|
130
|
-
* descends into its fixed keys, a record root treats its entries as an
|
|
131
|
-
* open live-keyed container, a variant root lifts the active variant's
|
|
132
|
-
* keys into one addressable surface.
|
|
133
|
-
*
|
|
134
|
-
* Other roots (a bare `z.union`, a root `z.array`, primitives,
|
|
135
|
-
* `z.map` / `z.set`) are not form roots; wrap them under a key. The
|
|
136
|
-
* adapter's runtime construction rejects them with a legible error.
|
|
137
|
-
*
|
|
138
|
-
* `z.ZodObject` MUST keep its `z.ZodRawShape` argument, and the
|
|
139
|
-
* discriminated-union arm MUST stay fully applied. The unified entry's
|
|
140
|
-
* v4 overload constrains on `SupportedRootSchema & ZodV4Internals` to
|
|
141
|
-
* keep v3 schemas out (see `../unified/types-zod-major.ts`). In a
|
|
142
|
-
* single-major (v3-only) consumer install, the published `.d.mts`
|
|
143
|
-
* resolves this `z` to v3, where a bare or under-applied Zod class is
|
|
144
|
-
* missing its required arguments and degrades to an `any`-like error
|
|
145
|
-
* type; `any` then absorbs the union and `any & ZodV4Internals`
|
|
146
|
-
* collapses back to `any`, so the marker stops excluding v3 schemas and
|
|
147
|
-
* the read slot poisons to `never`. `z.ZodRecord` carries defaults for
|
|
148
|
-
* both arguments, so it stays concrete in either major.
|
|
149
|
-
* `z.ZodDiscriminatedUnion` does NOT (v3 requires both arguments, and
|
|
150
|
-
* its parameter order is the reverse of v4's), so the arm is written
|
|
151
|
-
* fully applied; the v3-only bundled-types fixture guards it.
|
|
152
|
-
*/
|
|
153
|
-
type SupportedRootSchema = z.ZodObject<z.ZodRawShape> | z.ZodRecord | z.ZodDiscriminatedUnion<readonly z.ZodObject<z.ZodRawShape>[], string>;
|
|
154
|
-
|
|
155
155
|
/**
|
|
156
156
|
* Zod v4 adapter entry point. Re-exports the adapter + the useForm
|
|
157
157
|
* wrapper that threads zod-v4-specific schema types through
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { computed, ref, watchEffect, getCurrentScope, onScopeDispose, shallowReadonly, nextTick, warn, readonly, toRaw, reactive, watch, markRaw, triggerRef, shallowRef, getCurrentInstance, onServerPrefetch, provide, useId, inject, onBeforeMount, onBeforeUpdate, onMounted, effectScope } from 'vue';
|
|
2
|
-
import { n as pathsEqual,
|
|
3
|
-
import { R as REGISTER_OWNER_MARKER, b as V_REGISTER_MARKER } from './attaform.
|
|
2
|
+
import { n as pathsEqual, k as isPathPrefix, _ as __DEV__, f as canonicalizePath, s as segmentsForPathKey, o as keyForSegments, b as ROOT_PATH_KEY, S as SubmitErrorHandlerError, t as toError, q as normalizeErrorInput, w as INTERACTIVE_TAG_NAMES, R as ROOT_PATH, x as normalizeErrorInputs, y as coerceToPathKey, a as InvalidUseFormConfigError, z as ensureAttaformInstalled, u as useRegistry, B as kFormContext, C as kFormInstanceId, d as ReservedFormKeyError, m as kAttaformWizardActiveStepResolver, E as kAttaformAncestorWizard } from './attaform.Da8EdI2t.mjs';
|
|
3
|
+
import { R as REGISTER_OWNER_MARKER, b as V_REGISTER_MARKER } from './attaform.KvlEedlF.mjs';
|
|
4
4
|
|
|
5
5
|
function safeAssign(target, key, value) {
|
|
6
6
|
if (key === "__proto__") {
|
|
@@ -29,7 +29,7 @@ function safeOwnHas(target, key) {
|
|
|
29
29
|
return Object.prototype.hasOwnProperty.call(target, key);
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
-
const NOT_FOUND = Symbol("NOT_FOUND");
|
|
32
|
+
const NOT_FOUND = /* @__PURE__ */ Symbol("NOT_FOUND");
|
|
33
33
|
function descendStep(value, segment) {
|
|
34
34
|
if (value === null || value === void 0) return NOT_FOUND;
|
|
35
35
|
if (typeof value !== "object") return NOT_FOUND;
|
|
@@ -432,7 +432,7 @@ function applyChangedKeys(target, source, arrayOpPath, currentPath) {
|
|
|
432
432
|
const targetIsArray = Array.isArray(target);
|
|
433
433
|
const sourceIsArray = Array.isArray(source);
|
|
434
434
|
if (targetIsArray !== sourceIsArray) return false;
|
|
435
|
-
const ROOT_SENTINEL = Symbol.for("attaform.applyChangedKeys.rootMismatch");
|
|
435
|
+
const ROOT_SENTINEL = /* @__PURE__ */ Symbol.for("attaform.applyChangedKeys.rootMismatch");
|
|
436
436
|
const changedFirstSegments = /* @__PURE__ */ new Set();
|
|
437
437
|
diffAndApply(target, source, [], (patch) => {
|
|
438
438
|
if (patch.path.length === 0) {
|
|
@@ -2357,7 +2357,7 @@ function coerceValue(value, accepted, elementAccepted, index) {
|
|
|
2357
2357
|
|
|
2358
2358
|
const warnedMultiRootHosts = /* @__PURE__ */ new Set();
|
|
2359
2359
|
const EMPTY_TRANSFORMS = Object.freeze([]);
|
|
2360
|
-
const attaformListenersSymbol = Symbol.for("attaform:focus-listeners");
|
|
2360
|
+
const attaformListenersSymbol = /* @__PURE__ */ Symbol.for("attaform:focus-listeners");
|
|
2361
2361
|
function attachFocusListeners(state, segments, element, instanceMeta) {
|
|
2362
2362
|
const target = element;
|
|
2363
2363
|
if (target[attaformListenersSymbol] !== void 0) return;
|
|
@@ -2547,7 +2547,7 @@ function buildRegister(state, formInstanceId, instanceConfig) {
|
|
|
2547
2547
|
};
|
|
2548
2548
|
}
|
|
2549
2549
|
|
|
2550
|
-
const unset = Symbol.for("attaform/unset");
|
|
2550
|
+
const unset = /* @__PURE__ */ Symbol.for("attaform/unset");
|
|
2551
2551
|
function isUnset(value) {
|
|
2552
2552
|
return value === unset;
|
|
2553
2553
|
}
|
|
@@ -3455,6 +3455,33 @@ function buildFormApi(state, formInstanceId, options = {}) {
|
|
|
3455
3455
|
return api;
|
|
3456
3456
|
}
|
|
3457
3457
|
|
|
3458
|
+
function captureUserCallSite() {
|
|
3459
|
+
const raw = new Error().stack;
|
|
3460
|
+
if (typeof raw !== "string") return void 0;
|
|
3461
|
+
const lines = raw.split("\n");
|
|
3462
|
+
for (let i = 1; i < lines.length; i++) {
|
|
3463
|
+
const frame = lines[i];
|
|
3464
|
+
if (frame === void 0) continue;
|
|
3465
|
+
if (/attaform[/-]forms?/i.test(frame)) continue;
|
|
3466
|
+
if (/\bforms\.[A-Za-z0-9_-]+\.m?js\b/.test(frame)) continue;
|
|
3467
|
+
const trimmed = frame.trim();
|
|
3468
|
+
if (trimmed.length === 0) continue;
|
|
3469
|
+
return shortenSourceFrame(trimmed);
|
|
3470
|
+
}
|
|
3471
|
+
return void 0;
|
|
3472
|
+
}
|
|
3473
|
+
function shortenSourceFrame(frame) {
|
|
3474
|
+
const match = /(?:^|\s|\()([^\s()]+):(\d+):\d+\)?$/.exec(frame);
|
|
3475
|
+
if (match === null) return frame;
|
|
3476
|
+
const [, urlOrPath, line] = match;
|
|
3477
|
+
if (urlOrPath === void 0 || line === void 0) return frame;
|
|
3478
|
+
let path = urlOrPath;
|
|
3479
|
+
path = path.replace(/^[a-z]+:\/\/[^/]+\//i, "");
|
|
3480
|
+
path = path.replace(/^_nuxt\//, "");
|
|
3481
|
+
path = path.replace(/^\//, "");
|
|
3482
|
+
return `(${path}:${line})`;
|
|
3483
|
+
}
|
|
3484
|
+
|
|
3458
3485
|
const IDLE = Object.freeze({ display: "idle" });
|
|
3459
3486
|
const MAX_DELAY = 2147483647;
|
|
3460
3487
|
function createDisplayEngine(ssr) {
|
|
@@ -5535,33 +5562,6 @@ function createFormStore(options) {
|
|
|
5535
5562
|
};
|
|
5536
5563
|
}
|
|
5537
5564
|
|
|
5538
|
-
function captureUserCallSite() {
|
|
5539
|
-
const raw = new Error().stack;
|
|
5540
|
-
if (typeof raw !== "string") return void 0;
|
|
5541
|
-
const lines = raw.split("\n");
|
|
5542
|
-
for (let i = 1; i < lines.length; i++) {
|
|
5543
|
-
const frame = lines[i];
|
|
5544
|
-
if (frame === void 0) continue;
|
|
5545
|
-
if (/attaform[/-]forms?/i.test(frame)) continue;
|
|
5546
|
-
if (/\bforms\.[A-Za-z0-9_-]+\.m?js\b/.test(frame)) continue;
|
|
5547
|
-
const trimmed = frame.trim();
|
|
5548
|
-
if (trimmed.length === 0) continue;
|
|
5549
|
-
return shortenSourceFrame(trimmed);
|
|
5550
|
-
}
|
|
5551
|
-
return void 0;
|
|
5552
|
-
}
|
|
5553
|
-
function shortenSourceFrame(frame) {
|
|
5554
|
-
const match = /(?:^|\s|\()([^\s()]+):(\d+):\d+\)?$/.exec(frame);
|
|
5555
|
-
if (match === null) return frame;
|
|
5556
|
-
const [, urlOrPath, line] = match;
|
|
5557
|
-
if (urlOrPath === void 0 || line === void 0) return frame;
|
|
5558
|
-
let path = urlOrPath;
|
|
5559
|
-
path = path.replace(/^[a-z]+:\/\/[^/]+\//i, "");
|
|
5560
|
-
path = path.replace(/^_nuxt\//, "");
|
|
5561
|
-
path = path.replace(/^\//, "");
|
|
5562
|
-
return `(${path}:${line})`;
|
|
5563
|
-
}
|
|
5564
|
-
|
|
5565
5565
|
function getComputedSchema(formKey, schemaOrCallback, options) {
|
|
5566
5566
|
if (typeof schemaOrCallback === "function") return schemaOrCallback(formKey, options);
|
|
5567
5567
|
return schemaOrCallback;
|
|
@@ -6148,7 +6148,7 @@ function warnNoParentRV(instance) {
|
|
|
6148
6148
|
);
|
|
6149
6149
|
}
|
|
6150
6150
|
|
|
6151
|
-
const LAZY_BRAND = Symbol.for("attaform/wizard-lazy");
|
|
6151
|
+
const LAZY_BRAND = /* @__PURE__ */ Symbol.for("attaform/wizard-lazy");
|
|
6152
6152
|
function lazy(resolve) {
|
|
6153
6153
|
return { [LAZY_BRAND]: true, resolve };
|
|
6154
6154
|
}
|
|
@@ -7305,5 +7305,24 @@ function warnIfAmbientWizardProviderHadDuplicates() {
|
|
|
7305
7305
|
}
|
|
7306
7306
|
}
|
|
7307
7307
|
|
|
7308
|
-
|
|
7309
|
-
|
|
7308
|
+
function escapeForInlineScript(json) {
|
|
7309
|
+
return json.replace(/[<>&\u2028\u2029]/g, (char) => {
|
|
7310
|
+
switch (char) {
|
|
7311
|
+
case "<":
|
|
7312
|
+
return "\\u003c";
|
|
7313
|
+
case ">":
|
|
7314
|
+
return "\\u003e";
|
|
7315
|
+
case "&":
|
|
7316
|
+
return "\\u0026";
|
|
7317
|
+
case "\u2028":
|
|
7318
|
+
return "\\u2028";
|
|
7319
|
+
case "\u2029":
|
|
7320
|
+
return "\\u2029";
|
|
7321
|
+
default:
|
|
7322
|
+
return char;
|
|
7323
|
+
}
|
|
7324
|
+
});
|
|
7325
|
+
}
|
|
7326
|
+
|
|
7327
|
+
export { AttaformErrorCode as A, DEFAULT_TIMINGS as D, defaultDisplayState as a, defineCoercion as b, injectWizard as c, defaultCoercionRules as d, escapeForInlineScript as e, isUnset as f, useAbstractForm as g, useRegister as h, injectForm as i, useWizard as j, isPlainRecord as k, lazy as l, makeDefaultDisplayState as m, safeAssign as n, slimKindOf as o, humanize as p, getAtPath as q, setAtPath as r, safeOwnRead as s, unset as u };
|
|
7328
|
+
//# sourceMappingURL=attaform.CyQxTOdX.mjs.map
|