attaform 0.15.1 → 0.16.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.
- package/README.md +24 -12
- package/dist/chunks/devtools.cjs +4 -4
- package/dist/chunks/devtools.cjs.map +1 -1
- package/dist/chunks/devtools.mjs +2 -2
- package/dist/chunks/indexeddb.cjs +4 -4
- package/dist/chunks/indexeddb.cjs.map +1 -1
- package/dist/chunks/indexeddb.mjs +1 -1
- package/dist/chunks/local-storage.cjs +2 -2
- package/dist/chunks/local-storage.cjs.map +1 -1
- package/dist/chunks/local-storage.mjs +1 -1
- package/dist/chunks/session-storage.cjs +2 -2
- package/dist/chunks/session-storage.cjs.map +1 -1
- package/dist/chunks/session-storage.mjs +1 -1
- package/dist/index.cjs +23 -22
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +75 -70
- package/dist/index.d.mts +75 -70
- package/dist/index.d.ts +75 -70
- package/dist/index.mjs +6 -6
- package/dist/nuxt.cjs +5 -11
- package/dist/nuxt.cjs.map +1 -1
- package/dist/nuxt.d.cts +8 -0
- package/dist/nuxt.d.mts +8 -0
- package/dist/nuxt.d.ts +8 -0
- package/dist/nuxt.mjs +6 -12
- package/dist/nuxt.mjs.map +1 -1
- package/dist/runtime/plugins/attaform.cjs +3 -2
- package/dist/runtime/plugins/attaform.cjs.map +1 -1
- package/dist/runtime/plugins/attaform.mjs +2 -1
- package/dist/runtime/plugins/attaform.mjs.map +1 -1
- package/dist/shared/{attaform.BwaYWtMs.d.cts → attaform.B7rzpK1U.d.cts} +34 -5
- package/dist/shared/{attaform.BwaYWtMs.d.mts → attaform.B7rzpK1U.d.mts} +34 -5
- package/dist/shared/{attaform.BwaYWtMs.d.ts → attaform.B7rzpK1U.d.ts} +34 -5
- package/dist/shared/attaform.BAuJTWuT.d.mts +84 -0
- package/dist/shared/{attaform.CRk8NhlD.mjs → attaform.BfMxsfmE.mjs} +428 -49
- package/dist/shared/attaform.BfMxsfmE.mjs.map +1 -0
- package/dist/shared/attaform.Bp1c-uGF.cjs +1561 -0
- package/dist/shared/attaform.Bp1c-uGF.cjs.map +1 -0
- package/dist/shared/{attaform.CDJVeoJU.cjs → attaform.C9Ph2SMx.cjs} +49 -42
- package/dist/shared/{attaform.qxyip_aN.mjs.map → attaform.C9Ph2SMx.cjs.map} +1 -1
- package/dist/shared/attaform.CINUMjPq.mjs +29 -0
- package/dist/shared/attaform.CINUMjPq.mjs.map +1 -0
- package/dist/shared/attaform.CJttVxRj.cjs +32 -0
- package/dist/shared/attaform.CJttVxRj.cjs.map +1 -0
- package/dist/shared/attaform.CvOXSpCb.mjs +1908 -0
- package/dist/shared/attaform.CvOXSpCb.mjs.map +1 -0
- package/dist/shared/{attaform.qxyip_aN.mjs → attaform.DILbdvfo.mjs} +12 -5
- package/dist/shared/{attaform.CDJVeoJU.cjs.map → attaform.DILbdvfo.mjs.map} +1 -1
- package/dist/shared/attaform.DdnithOf.mjs +1555 -0
- package/dist/shared/attaform.DdnithOf.mjs.map +1 -0
- package/dist/shared/attaform.DfrYByDj.cjs +1916 -0
- package/dist/shared/attaform.DfrYByDj.cjs.map +1 -0
- package/dist/shared/{attaform.BOi138GE.cjs → attaform.c_NzdRyc.cjs} +4 -4
- package/dist/shared/{attaform.BOi138GE.cjs.map → attaform.c_NzdRyc.cjs.map} +1 -1
- package/dist/shared/{attaform.DXye3JKf.mjs → attaform.jrxE_xZw.mjs} +2 -2
- package/dist/shared/{attaform.DXye3JKf.mjs.map → attaform.jrxE_xZw.mjs.map} +1 -1
- package/dist/shared/attaform.ls_7jBYc.d.ts +84 -0
- package/dist/shared/{attaform.BgYBU8gV.cjs → attaform.rIRYSUI1.cjs} +461 -61
- package/dist/shared/attaform.rIRYSUI1.cjs.map +1 -0
- package/dist/shared/attaform.xIcmqscx.d.cts +84 -0
- package/dist/vite.cjs +62 -9
- package/dist/vite.cjs.map +1 -1
- package/dist/vite.d.cts +23 -32
- package/dist/vite.d.mts +23 -32
- package/dist/vite.d.ts +23 -32
- package/dist/vite.mjs +62 -9
- package/dist/vite.mjs.map +1 -1
- package/dist/zod-v3.cjs +9 -1553
- package/dist/zod-v3.cjs.map +1 -1
- package/dist/zod-v3.mjs +3 -1553
- package/dist/zod-v3.mjs.map +1 -1
- package/dist/zod-v4.cjs +21 -0
- package/dist/zod-v4.cjs.map +1 -0
- package/dist/zod-v4.d.cts +104 -0
- package/dist/zod-v4.d.mts +104 -0
- package/dist/zod-v4.d.ts +104 -0
- package/dist/zod-v4.mjs +4 -0
- package/dist/zod-v4.mjs.map +1 -0
- package/dist/zod.cjs +19 -1900
- package/dist/zod.cjs.map +1 -1
- package/dist/zod.d.cts +27 -155
- package/dist/zod.d.mts +27 -155
- package/dist/zod.d.ts +27 -155
- package/dist/zod.mjs +19 -1896
- package/dist/zod.mjs.map +1 -1
- package/package.json +6 -2
- package/dist/shared/attaform.BgYBU8gV.cjs.map +0 -1
- package/dist/shared/attaform.CRk8NhlD.mjs.map +0 -1
- package/dist/shared/attaform.RypIkgVy.cjs +0 -417
- package/dist/shared/attaform.RypIkgVy.cjs.map +0 -1
- package/dist/shared/attaform.a99dQV7Q.mjs +0 -392
- package/dist/shared/attaform.a99dQV7Q.mjs.map +0 -1
package/dist/zod.d.cts
CHANGED
|
@@ -1,79 +1,40 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import {
|
|
3
|
-
export { ac as Unset, am as isUnset, ao as unset } from './shared/attaform.0Gxd_OOx.cjs';
|
|
2
|
+
import { U as UseFormConfiguration, G as GenericForm, b as AbstractSchema, D as DeepPartial, c as DefaultValuesShape, ae as ValidateOnConfig, d as UseFormReturnType } from './shared/attaform.0Gxd_OOx.cjs';
|
|
3
|
+
export { n as FieldMetaPayload, ac as Unset, am as isUnset, ao as unset } from './shared/attaform.0Gxd_OOx.cjs';
|
|
4
4
|
export { A as AttaformErrorCode, i as injectForm, u as useRegister } from './shared/attaform.Dq5BabH1.cjs';
|
|
5
|
-
|
|
5
|
+
export { f as fieldMeta, w as withMeta } from './shared/attaform.xIcmqscx.cjs';
|
|
6
6
|
import 'vue';
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
|
-
*
|
|
9
|
+
* Unified `useForm` for the `attaform/zod` entry. Runtime-dispatches
|
|
10
|
+
* on schema shape: a Zod v4 schema (`def.type` truthy) routes to the
|
|
11
|
+
* v4 adapter; a Zod v3 schema (or any other `AbstractSchema`) routes
|
|
12
|
+
* to the v3 wrapper, which already accepts both Zod v3 input and
|
|
13
|
+
* `AbstractSchema` directly via its built-in shape branch.
|
|
10
14
|
*
|
|
11
|
-
*
|
|
12
|
-
* `attaform/
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
15
|
+
* This module is the FALLBACK path. Vite consumers see the
|
|
16
|
+
* `attaform/vite` plugin's `resolveId` hook rewrite `attaform/zod`
|
|
17
|
+
* imports to either `attaform/zod-v3` or `attaform/zod-v4` at build
|
|
18
|
+
* time — in that case this dispatch never runs and the consumer
|
|
19
|
+
* bundle ships only the matching adapter. Other bundlers (and
|
|
20
|
+
* non-bundled ESM consumption) hit this dispatch instead, paying a
|
|
21
|
+
* modest size cost for the convenience of a single hello-world import.
|
|
16
22
|
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
23
|
+
* Power users who want a guaranteed lean bundle on non-Vite tooling
|
|
24
|
+
* can import directly from `attaform/zod-v3` or `attaform/zod-v4` —
|
|
25
|
+
* those subpaths are never rewritten and never load the other
|
|
26
|
+
* adapter.
|
|
20
27
|
*/
|
|
21
|
-
declare function zodV4Adapter<FormSchema extends z.ZodObject, Form extends z.infer<FormSchema>>(rootSchema: FormSchema): (formKey: FormKey) => AbstractSchema<Form, Form>;
|
|
22
28
|
|
|
23
29
|
/**
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
30
|
+
* Create a form bound to a Zod schema. Accepts both Zod v3 and Zod v4
|
|
31
|
+
* schemas; the runtime picks the right adapter from the schema's
|
|
32
|
+
* shape.
|
|
27
33
|
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
/**
|
|
35
|
-
* The single file that reads Zod v4's internal `def` shape. Every other
|
|
36
|
-
* file in the zod-v4 adapter uses these public-shaped accessors — future
|
|
37
|
-
* Zod minor bumps that reshape internals touch only this file.
|
|
38
|
-
*
|
|
39
|
-
* Design principle: treat `schema.def.*` as an unstable surface, even when
|
|
40
|
-
* Zod's docs say otherwise. Each helper returns a narrow, well-typed slice;
|
|
41
|
-
* no adapter code outside this file does shape-based pattern matching on
|
|
42
|
-
* `def`.
|
|
43
|
-
*/
|
|
44
|
-
|
|
45
|
-
/**
|
|
46
|
-
* Stable kind discriminant for a Zod v4 schema. Returned by
|
|
47
|
-
* `kindOf(schema)`. Use when building a custom integration that
|
|
48
|
-
* needs to branch on schema shape — most consumers don't need this.
|
|
49
|
-
*/
|
|
50
|
-
type ZodKind = 'object' | 'array' | 'set' | 'record' | 'tuple' | 'union' | 'discriminated-union' | 'string' | 'number' | 'boolean' | 'bigint' | 'date' | 'enum' | 'literal' | 'null' | 'undefined' | 'any' | 'unknown' | 'optional' | 'nullable' | 'default' | 'pipe' | 'readonly' | 'nan' | 'void' | 'never' | 'lazy' | 'intersection' | 'catch' | 'promise' | 'custom' | 'template-literal';
|
|
51
|
-
/**
|
|
52
|
-
* Inspect a Zod v4 schema and return its `ZodKind`. Returns
|
|
53
|
-
* `'unknown'` for non-Zod inputs and unrecognised shapes.
|
|
54
|
-
*
|
|
55
|
-
* Useful when writing introspection helpers that branch on schema
|
|
56
|
-
* structure (e.g. custom error formatters or doc generators).
|
|
57
|
-
*/
|
|
58
|
-
declare function kindOf(schema: unknown): ZodKind;
|
|
59
|
-
/**
|
|
60
|
-
* Verify a schema is Zod v4. Throws a clear error if it's a v3
|
|
61
|
-
* schema mistakenly imported through `attaform/zod`.
|
|
62
|
-
*
|
|
63
|
-
* Most consumers never call this directly — the v4 adapter calls it
|
|
64
|
-
* internally on every schema. Reach for it only when wiring a custom
|
|
65
|
-
* adapter that needs the same guard.
|
|
66
|
-
*/
|
|
67
|
-
declare function assertZodVersion(schema: unknown): void;
|
|
68
|
-
|
|
69
|
-
/**
|
|
70
|
-
* Zod v4 adapter entry point. Re-exports the adapter + the useForm
|
|
71
|
-
* wrapper that threads zod-v4-specific schema types through
|
|
72
|
-
* useAbstractForm.
|
|
73
|
-
*/
|
|
74
|
-
|
|
75
|
-
/**
|
|
76
|
-
* Create a form bound to a Zod v4 schema.
|
|
34
|
+
* Type inference targets Zod v4 — the recommended major. Consumers
|
|
35
|
+
* still on Zod v3 get correct runtime behavior here, but the strongest
|
|
36
|
+
* TypeScript inference comes from importing `attaform/zod-v3`
|
|
37
|
+
* directly.
|
|
77
38
|
*
|
|
78
39
|
* ```ts
|
|
79
40
|
* import { useForm } from 'attaform/zod'
|
|
@@ -84,100 +45,11 @@ declare function assertZodVersion(schema: unknown): void;
|
|
|
84
45
|
* email: z.email(),
|
|
85
46
|
* password: z.string().min(8),
|
|
86
47
|
* }),
|
|
87
|
-
* defaultValues: { email: '' },
|
|
88
48
|
* })
|
|
89
49
|
* ```
|
|
90
|
-
*
|
|
91
|
-
* Returns a form API exposing `register`, `values`, `errors`,
|
|
92
|
-
* `fields`, `setValue`, `handleSubmit`, `meta`, field-array
|
|
93
|
-
* helpers, and more. See `UseFormReturnType` for the full
|
|
94
|
-
* surface.
|
|
95
|
-
*
|
|
96
|
-
* For Zod v3, import from `attaform/zod-v3` instead.
|
|
97
50
|
*/
|
|
98
51
|
declare function useForm<Schema extends z.ZodObject>(configuration: Omit<UseFormConfiguration<z.output<Schema> extends GenericForm ? z.output<Schema> : never, z.output<Schema> extends GenericForm ? z.output<Schema> : never, AbstractSchema<z.output<Schema> extends GenericForm ? z.output<Schema> : never, z.output<Schema> extends GenericForm ? z.output<Schema> : never>, DeepPartial<DefaultValuesShape<z.output<Schema> extends GenericForm ? z.output<Schema> : never>>>, 'schema' | 'validateOn' | 'debounceMs'> & {
|
|
99
52
|
schema: Schema;
|
|
100
53
|
} & ValidateOnConfig): UseFormReturnType<z.output<Schema> extends GenericForm ? z.output<Schema> : never, z.output<Schema> extends GenericForm ? z.output<Schema> : never>;
|
|
101
54
|
|
|
102
|
-
|
|
103
|
-
* Field-metadata write/read API for the Zod v4 adapter.
|
|
104
|
-
*
|
|
105
|
-
* Backed by Zod 4's native `z.registry<T>()` mechanism — the schema
|
|
106
|
-
* carries the metadata directly through `schema.register(fieldMeta,
|
|
107
|
-
* payload)` (returns the schema, chainable) or the `withMeta()`
|
|
108
|
-
* helper (same effect, version-agnostic across the v3 / v4 adapter
|
|
109
|
-
* split).
|
|
110
|
-
*
|
|
111
|
-
* **Registration patterns:** both styles work — register on whatever
|
|
112
|
-
* schema reference you assign into the parent's shape, OR on the
|
|
113
|
-
* inner schema before wrapping. The adapter's resolver tries the
|
|
114
|
-
* walker-returned schema first, then falls back to the peeled
|
|
115
|
-
* inner so either ordering hits:
|
|
116
|
-
*
|
|
117
|
-
* // both equivalent — registry hits at lookup time
|
|
118
|
-
* withMeta(z.string(), { label: 'Email' }).optional()
|
|
119
|
-
* withMeta(z.string().optional(), { label: 'Email' })
|
|
120
|
-
* z.string().optional().register(fieldMeta, { label: 'Email' })
|
|
121
|
-
* z.string().register(fieldMeta, { label: 'Email' }).optional()
|
|
122
|
-
*
|
|
123
|
-
* The path walker returns the wrapper at terminal positions
|
|
124
|
-
* (`['email']` against `{ email: z.string().optional() }` resolves
|
|
125
|
-
* to `ZodOptional<ZodString>`) and peels at intermediate descent
|
|
126
|
-
* (`['address', 'street']` peels through `address`'s wrapper to
|
|
127
|
-
* reach the inner object). The two-stage lookup covers both leaf
|
|
128
|
-
* and container registrations symmetrically.
|
|
129
|
-
*/
|
|
130
|
-
|
|
131
|
-
/**
|
|
132
|
-
* The shared registry every Attaform-aware Zod 4 schema can register
|
|
133
|
-
* field metadata against. One module-scoped instance per consumer
|
|
134
|
-
* project — re-exported from `attaform/zod` so user code reads the
|
|
135
|
-
* same registry the runtime does.
|
|
136
|
-
*
|
|
137
|
-
* Consumers extending `FieldMetaPayload` via declaration merging
|
|
138
|
-
* automatically get the richer payload type at every `register` /
|
|
139
|
-
* `add` / `get` call site.
|
|
140
|
-
*
|
|
141
|
-
* **Shared-instance disambiguation.** A single schema instance reused
|
|
142
|
-
* at multiple form paths (e.g. one address schema bound to both
|
|
143
|
-
* `pickup` and `delivery`) can carry distinct metadata per path —
|
|
144
|
-
* even via the canonical `schema.register(fieldMeta, payload)` chain.
|
|
145
|
-
* Internally we maintain a parallel WeakMap of payload LISTS indexed
|
|
146
|
-
* per schema reference, and the path-resolver walks the form's
|
|
147
|
-
* schema tree counting per-schema occurrences to pick the right
|
|
148
|
-
* payload for each path. Object literals evaluate left-to-right, so
|
|
149
|
-
* registration order matches tree-walk order, and shared schemas
|
|
150
|
-
* pair their two registrations to the two paths correctly:
|
|
151
|
-
*
|
|
152
|
-
* z.object({
|
|
153
|
-
* pickup: addressSchema.register(fieldMeta, { label: 'Pickup address' }),
|
|
154
|
-
* delivery: addressSchema.register(fieldMeta, { label: 'Delivery address' }),
|
|
155
|
-
* })
|
|
156
|
-
* // form.fields('pickup').label → 'Pickup address'
|
|
157
|
-
* // form.fields('delivery').label → 'Delivery address'
|
|
158
|
-
*
|
|
159
|
-
* Schemas reused via `withMeta()` get a fresh clone per call (see
|
|
160
|
-
* `withMeta` below), so they never share a registry slot in the
|
|
161
|
-
* first place.
|
|
162
|
-
*/
|
|
163
|
-
declare const fieldMeta: z.core.$ZodRegistry<FieldMetaPayload, z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
|
|
164
|
-
/**
|
|
165
|
-
* Attach `payload` to `schema` in the shared `fieldMeta` registry
|
|
166
|
-
* and return `schema` (chainable). Cross-version with `attaform/zod-v3`'s
|
|
167
|
-
* `withMeta()`; user code that uses this helper reads the same on
|
|
168
|
-
* either adapter.
|
|
169
|
-
*
|
|
170
|
-
* Equivalent to `schema.register(fieldMeta, payload)` on Zod 4.
|
|
171
|
-
* Prefer the native chain for v4-only code; reach for `withMeta`
|
|
172
|
-
* when authoring schema modules that may need to compile under both
|
|
173
|
-
* adapters.
|
|
174
|
-
*
|
|
175
|
-
* Registers on the schema reference passed in. See the
|
|
176
|
-
* "Registration rule" note in this file's header — register on the
|
|
177
|
-
* inner schema before wrapping with `.optional()` / `.nullable()` /
|
|
178
|
-
* `.default()` / etc.
|
|
179
|
-
*/
|
|
180
|
-
declare function withMeta<S extends z.ZodType>(schema: S, payload: FieldMetaPayload): S;
|
|
181
|
-
|
|
182
|
-
export { FieldMetaPayload, UnsupportedSchemaError, assertZodVersion, fieldMeta, kindOf, useForm, withMeta, zodV4Adapter as zodAdapter };
|
|
183
|
-
export type { ZodKind };
|
|
55
|
+
export { useForm };
|
package/dist/zod.d.mts
CHANGED
|
@@ -1,79 +1,40 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import {
|
|
3
|
-
export { ac as Unset, am as isUnset, ao as unset } from './shared/attaform.0Gxd_OOx.mjs';
|
|
2
|
+
import { U as UseFormConfiguration, G as GenericForm, b as AbstractSchema, D as DeepPartial, c as DefaultValuesShape, ae as ValidateOnConfig, d as UseFormReturnType } from './shared/attaform.0Gxd_OOx.mjs';
|
|
3
|
+
export { n as FieldMetaPayload, ac as Unset, am as isUnset, ao as unset } from './shared/attaform.0Gxd_OOx.mjs';
|
|
4
4
|
export { A as AttaformErrorCode, i as injectForm, u as useRegister } from './shared/attaform.CVv9Oh0a.mjs';
|
|
5
|
-
|
|
5
|
+
export { f as fieldMeta, w as withMeta } from './shared/attaform.BAuJTWuT.mjs';
|
|
6
6
|
import 'vue';
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
|
-
*
|
|
9
|
+
* Unified `useForm` for the `attaform/zod` entry. Runtime-dispatches
|
|
10
|
+
* on schema shape: a Zod v4 schema (`def.type` truthy) routes to the
|
|
11
|
+
* v4 adapter; a Zod v3 schema (or any other `AbstractSchema`) routes
|
|
12
|
+
* to the v3 wrapper, which already accepts both Zod v3 input and
|
|
13
|
+
* `AbstractSchema` directly via its built-in shape branch.
|
|
10
14
|
*
|
|
11
|
-
*
|
|
12
|
-
* `attaform/
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
15
|
+
* This module is the FALLBACK path. Vite consumers see the
|
|
16
|
+
* `attaform/vite` plugin's `resolveId` hook rewrite `attaform/zod`
|
|
17
|
+
* imports to either `attaform/zod-v3` or `attaform/zod-v4` at build
|
|
18
|
+
* time — in that case this dispatch never runs and the consumer
|
|
19
|
+
* bundle ships only the matching adapter. Other bundlers (and
|
|
20
|
+
* non-bundled ESM consumption) hit this dispatch instead, paying a
|
|
21
|
+
* modest size cost for the convenience of a single hello-world import.
|
|
16
22
|
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
23
|
+
* Power users who want a guaranteed lean bundle on non-Vite tooling
|
|
24
|
+
* can import directly from `attaform/zod-v3` or `attaform/zod-v4` —
|
|
25
|
+
* those subpaths are never rewritten and never load the other
|
|
26
|
+
* adapter.
|
|
20
27
|
*/
|
|
21
|
-
declare function zodV4Adapter<FormSchema extends z.ZodObject, Form extends z.infer<FormSchema>>(rootSchema: FormSchema): (formKey: FormKey) => AbstractSchema<Form, Form>;
|
|
22
28
|
|
|
23
29
|
/**
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
30
|
+
* Create a form bound to a Zod schema. Accepts both Zod v3 and Zod v4
|
|
31
|
+
* schemas; the runtime picks the right adapter from the schema's
|
|
32
|
+
* shape.
|
|
27
33
|
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
/**
|
|
35
|
-
* The single file that reads Zod v4's internal `def` shape. Every other
|
|
36
|
-
* file in the zod-v4 adapter uses these public-shaped accessors — future
|
|
37
|
-
* Zod minor bumps that reshape internals touch only this file.
|
|
38
|
-
*
|
|
39
|
-
* Design principle: treat `schema.def.*` as an unstable surface, even when
|
|
40
|
-
* Zod's docs say otherwise. Each helper returns a narrow, well-typed slice;
|
|
41
|
-
* no adapter code outside this file does shape-based pattern matching on
|
|
42
|
-
* `def`.
|
|
43
|
-
*/
|
|
44
|
-
|
|
45
|
-
/**
|
|
46
|
-
* Stable kind discriminant for a Zod v4 schema. Returned by
|
|
47
|
-
* `kindOf(schema)`. Use when building a custom integration that
|
|
48
|
-
* needs to branch on schema shape — most consumers don't need this.
|
|
49
|
-
*/
|
|
50
|
-
type ZodKind = 'object' | 'array' | 'set' | 'record' | 'tuple' | 'union' | 'discriminated-union' | 'string' | 'number' | 'boolean' | 'bigint' | 'date' | 'enum' | 'literal' | 'null' | 'undefined' | 'any' | 'unknown' | 'optional' | 'nullable' | 'default' | 'pipe' | 'readonly' | 'nan' | 'void' | 'never' | 'lazy' | 'intersection' | 'catch' | 'promise' | 'custom' | 'template-literal';
|
|
51
|
-
/**
|
|
52
|
-
* Inspect a Zod v4 schema and return its `ZodKind`. Returns
|
|
53
|
-
* `'unknown'` for non-Zod inputs and unrecognised shapes.
|
|
54
|
-
*
|
|
55
|
-
* Useful when writing introspection helpers that branch on schema
|
|
56
|
-
* structure (e.g. custom error formatters or doc generators).
|
|
57
|
-
*/
|
|
58
|
-
declare function kindOf(schema: unknown): ZodKind;
|
|
59
|
-
/**
|
|
60
|
-
* Verify a schema is Zod v4. Throws a clear error if it's a v3
|
|
61
|
-
* schema mistakenly imported through `attaform/zod`.
|
|
62
|
-
*
|
|
63
|
-
* Most consumers never call this directly — the v4 adapter calls it
|
|
64
|
-
* internally on every schema. Reach for it only when wiring a custom
|
|
65
|
-
* adapter that needs the same guard.
|
|
66
|
-
*/
|
|
67
|
-
declare function assertZodVersion(schema: unknown): void;
|
|
68
|
-
|
|
69
|
-
/**
|
|
70
|
-
* Zod v4 adapter entry point. Re-exports the adapter + the useForm
|
|
71
|
-
* wrapper that threads zod-v4-specific schema types through
|
|
72
|
-
* useAbstractForm.
|
|
73
|
-
*/
|
|
74
|
-
|
|
75
|
-
/**
|
|
76
|
-
* Create a form bound to a Zod v4 schema.
|
|
34
|
+
* Type inference targets Zod v4 — the recommended major. Consumers
|
|
35
|
+
* still on Zod v3 get correct runtime behavior here, but the strongest
|
|
36
|
+
* TypeScript inference comes from importing `attaform/zod-v3`
|
|
37
|
+
* directly.
|
|
77
38
|
*
|
|
78
39
|
* ```ts
|
|
79
40
|
* import { useForm } from 'attaform/zod'
|
|
@@ -84,100 +45,11 @@ declare function assertZodVersion(schema: unknown): void;
|
|
|
84
45
|
* email: z.email(),
|
|
85
46
|
* password: z.string().min(8),
|
|
86
47
|
* }),
|
|
87
|
-
* defaultValues: { email: '' },
|
|
88
48
|
* })
|
|
89
49
|
* ```
|
|
90
|
-
*
|
|
91
|
-
* Returns a form API exposing `register`, `values`, `errors`,
|
|
92
|
-
* `fields`, `setValue`, `handleSubmit`, `meta`, field-array
|
|
93
|
-
* helpers, and more. See `UseFormReturnType` for the full
|
|
94
|
-
* surface.
|
|
95
|
-
*
|
|
96
|
-
* For Zod v3, import from `attaform/zod-v3` instead.
|
|
97
50
|
*/
|
|
98
51
|
declare function useForm<Schema extends z.ZodObject>(configuration: Omit<UseFormConfiguration<z.output<Schema> extends GenericForm ? z.output<Schema> : never, z.output<Schema> extends GenericForm ? z.output<Schema> : never, AbstractSchema<z.output<Schema> extends GenericForm ? z.output<Schema> : never, z.output<Schema> extends GenericForm ? z.output<Schema> : never>, DeepPartial<DefaultValuesShape<z.output<Schema> extends GenericForm ? z.output<Schema> : never>>>, 'schema' | 'validateOn' | 'debounceMs'> & {
|
|
99
52
|
schema: Schema;
|
|
100
53
|
} & ValidateOnConfig): UseFormReturnType<z.output<Schema> extends GenericForm ? z.output<Schema> : never, z.output<Schema> extends GenericForm ? z.output<Schema> : never>;
|
|
101
54
|
|
|
102
|
-
|
|
103
|
-
* Field-metadata write/read API for the Zod v4 adapter.
|
|
104
|
-
*
|
|
105
|
-
* Backed by Zod 4's native `z.registry<T>()` mechanism — the schema
|
|
106
|
-
* carries the metadata directly through `schema.register(fieldMeta,
|
|
107
|
-
* payload)` (returns the schema, chainable) or the `withMeta()`
|
|
108
|
-
* helper (same effect, version-agnostic across the v3 / v4 adapter
|
|
109
|
-
* split).
|
|
110
|
-
*
|
|
111
|
-
* **Registration patterns:** both styles work — register on whatever
|
|
112
|
-
* schema reference you assign into the parent's shape, OR on the
|
|
113
|
-
* inner schema before wrapping. The adapter's resolver tries the
|
|
114
|
-
* walker-returned schema first, then falls back to the peeled
|
|
115
|
-
* inner so either ordering hits:
|
|
116
|
-
*
|
|
117
|
-
* // both equivalent — registry hits at lookup time
|
|
118
|
-
* withMeta(z.string(), { label: 'Email' }).optional()
|
|
119
|
-
* withMeta(z.string().optional(), { label: 'Email' })
|
|
120
|
-
* z.string().optional().register(fieldMeta, { label: 'Email' })
|
|
121
|
-
* z.string().register(fieldMeta, { label: 'Email' }).optional()
|
|
122
|
-
*
|
|
123
|
-
* The path walker returns the wrapper at terminal positions
|
|
124
|
-
* (`['email']` against `{ email: z.string().optional() }` resolves
|
|
125
|
-
* to `ZodOptional<ZodString>`) and peels at intermediate descent
|
|
126
|
-
* (`['address', 'street']` peels through `address`'s wrapper to
|
|
127
|
-
* reach the inner object). The two-stage lookup covers both leaf
|
|
128
|
-
* and container registrations symmetrically.
|
|
129
|
-
*/
|
|
130
|
-
|
|
131
|
-
/**
|
|
132
|
-
* The shared registry every Attaform-aware Zod 4 schema can register
|
|
133
|
-
* field metadata against. One module-scoped instance per consumer
|
|
134
|
-
* project — re-exported from `attaform/zod` so user code reads the
|
|
135
|
-
* same registry the runtime does.
|
|
136
|
-
*
|
|
137
|
-
* Consumers extending `FieldMetaPayload` via declaration merging
|
|
138
|
-
* automatically get the richer payload type at every `register` /
|
|
139
|
-
* `add` / `get` call site.
|
|
140
|
-
*
|
|
141
|
-
* **Shared-instance disambiguation.** A single schema instance reused
|
|
142
|
-
* at multiple form paths (e.g. one address schema bound to both
|
|
143
|
-
* `pickup` and `delivery`) can carry distinct metadata per path —
|
|
144
|
-
* even via the canonical `schema.register(fieldMeta, payload)` chain.
|
|
145
|
-
* Internally we maintain a parallel WeakMap of payload LISTS indexed
|
|
146
|
-
* per schema reference, and the path-resolver walks the form's
|
|
147
|
-
* schema tree counting per-schema occurrences to pick the right
|
|
148
|
-
* payload for each path. Object literals evaluate left-to-right, so
|
|
149
|
-
* registration order matches tree-walk order, and shared schemas
|
|
150
|
-
* pair their two registrations to the two paths correctly:
|
|
151
|
-
*
|
|
152
|
-
* z.object({
|
|
153
|
-
* pickup: addressSchema.register(fieldMeta, { label: 'Pickup address' }),
|
|
154
|
-
* delivery: addressSchema.register(fieldMeta, { label: 'Delivery address' }),
|
|
155
|
-
* })
|
|
156
|
-
* // form.fields('pickup').label → 'Pickup address'
|
|
157
|
-
* // form.fields('delivery').label → 'Delivery address'
|
|
158
|
-
*
|
|
159
|
-
* Schemas reused via `withMeta()` get a fresh clone per call (see
|
|
160
|
-
* `withMeta` below), so they never share a registry slot in the
|
|
161
|
-
* first place.
|
|
162
|
-
*/
|
|
163
|
-
declare const fieldMeta: z.core.$ZodRegistry<FieldMetaPayload, z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
|
|
164
|
-
/**
|
|
165
|
-
* Attach `payload` to `schema` in the shared `fieldMeta` registry
|
|
166
|
-
* and return `schema` (chainable). Cross-version with `attaform/zod-v3`'s
|
|
167
|
-
* `withMeta()`; user code that uses this helper reads the same on
|
|
168
|
-
* either adapter.
|
|
169
|
-
*
|
|
170
|
-
* Equivalent to `schema.register(fieldMeta, payload)` on Zod 4.
|
|
171
|
-
* Prefer the native chain for v4-only code; reach for `withMeta`
|
|
172
|
-
* when authoring schema modules that may need to compile under both
|
|
173
|
-
* adapters.
|
|
174
|
-
*
|
|
175
|
-
* Registers on the schema reference passed in. See the
|
|
176
|
-
* "Registration rule" note in this file's header — register on the
|
|
177
|
-
* inner schema before wrapping with `.optional()` / `.nullable()` /
|
|
178
|
-
* `.default()` / etc.
|
|
179
|
-
*/
|
|
180
|
-
declare function withMeta<S extends z.ZodType>(schema: S, payload: FieldMetaPayload): S;
|
|
181
|
-
|
|
182
|
-
export { FieldMetaPayload, UnsupportedSchemaError, assertZodVersion, fieldMeta, kindOf, useForm, withMeta, zodV4Adapter as zodAdapter };
|
|
183
|
-
export type { ZodKind };
|
|
55
|
+
export { useForm };
|
package/dist/zod.d.ts
CHANGED
|
@@ -1,79 +1,40 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import {
|
|
3
|
-
export { ac as Unset, am as isUnset, ao as unset } from './shared/attaform.0Gxd_OOx.js';
|
|
2
|
+
import { U as UseFormConfiguration, G as GenericForm, b as AbstractSchema, D as DeepPartial, c as DefaultValuesShape, ae as ValidateOnConfig, d as UseFormReturnType } from './shared/attaform.0Gxd_OOx.js';
|
|
3
|
+
export { n as FieldMetaPayload, ac as Unset, am as isUnset, ao as unset } from './shared/attaform.0Gxd_OOx.js';
|
|
4
4
|
export { A as AttaformErrorCode, i as injectForm, u as useRegister } from './shared/attaform.CWCx2r0x.js';
|
|
5
|
-
|
|
5
|
+
export { f as fieldMeta, w as withMeta } from './shared/attaform.ls_7jBYc.js';
|
|
6
6
|
import 'vue';
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
|
-
*
|
|
9
|
+
* Unified `useForm` for the `attaform/zod` entry. Runtime-dispatches
|
|
10
|
+
* on schema shape: a Zod v4 schema (`def.type` truthy) routes to the
|
|
11
|
+
* v4 adapter; a Zod v3 schema (or any other `AbstractSchema`) routes
|
|
12
|
+
* to the v3 wrapper, which already accepts both Zod v3 input and
|
|
13
|
+
* `AbstractSchema` directly via its built-in shape branch.
|
|
10
14
|
*
|
|
11
|
-
*
|
|
12
|
-
* `attaform/
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
15
|
+
* This module is the FALLBACK path. Vite consumers see the
|
|
16
|
+
* `attaform/vite` plugin's `resolveId` hook rewrite `attaform/zod`
|
|
17
|
+
* imports to either `attaform/zod-v3` or `attaform/zod-v4` at build
|
|
18
|
+
* time — in that case this dispatch never runs and the consumer
|
|
19
|
+
* bundle ships only the matching adapter. Other bundlers (and
|
|
20
|
+
* non-bundled ESM consumption) hit this dispatch instead, paying a
|
|
21
|
+
* modest size cost for the convenience of a single hello-world import.
|
|
16
22
|
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
23
|
+
* Power users who want a guaranteed lean bundle on non-Vite tooling
|
|
24
|
+
* can import directly from `attaform/zod-v3` or `attaform/zod-v4` —
|
|
25
|
+
* those subpaths are never rewritten and never load the other
|
|
26
|
+
* adapter.
|
|
20
27
|
*/
|
|
21
|
-
declare function zodV4Adapter<FormSchema extends z.ZodObject, Form extends z.infer<FormSchema>>(rootSchema: FormSchema): (formKey: FormKey) => AbstractSchema<Form, Form>;
|
|
22
28
|
|
|
23
29
|
/**
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
30
|
+
* Create a form bound to a Zod schema. Accepts both Zod v3 and Zod v4
|
|
31
|
+
* schemas; the runtime picks the right adapter from the schema's
|
|
32
|
+
* shape.
|
|
27
33
|
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
/**
|
|
35
|
-
* The single file that reads Zod v4's internal `def` shape. Every other
|
|
36
|
-
* file in the zod-v4 adapter uses these public-shaped accessors — future
|
|
37
|
-
* Zod minor bumps that reshape internals touch only this file.
|
|
38
|
-
*
|
|
39
|
-
* Design principle: treat `schema.def.*` as an unstable surface, even when
|
|
40
|
-
* Zod's docs say otherwise. Each helper returns a narrow, well-typed slice;
|
|
41
|
-
* no adapter code outside this file does shape-based pattern matching on
|
|
42
|
-
* `def`.
|
|
43
|
-
*/
|
|
44
|
-
|
|
45
|
-
/**
|
|
46
|
-
* Stable kind discriminant for a Zod v4 schema. Returned by
|
|
47
|
-
* `kindOf(schema)`. Use when building a custom integration that
|
|
48
|
-
* needs to branch on schema shape — most consumers don't need this.
|
|
49
|
-
*/
|
|
50
|
-
type ZodKind = 'object' | 'array' | 'set' | 'record' | 'tuple' | 'union' | 'discriminated-union' | 'string' | 'number' | 'boolean' | 'bigint' | 'date' | 'enum' | 'literal' | 'null' | 'undefined' | 'any' | 'unknown' | 'optional' | 'nullable' | 'default' | 'pipe' | 'readonly' | 'nan' | 'void' | 'never' | 'lazy' | 'intersection' | 'catch' | 'promise' | 'custom' | 'template-literal';
|
|
51
|
-
/**
|
|
52
|
-
* Inspect a Zod v4 schema and return its `ZodKind`. Returns
|
|
53
|
-
* `'unknown'` for non-Zod inputs and unrecognised shapes.
|
|
54
|
-
*
|
|
55
|
-
* Useful when writing introspection helpers that branch on schema
|
|
56
|
-
* structure (e.g. custom error formatters or doc generators).
|
|
57
|
-
*/
|
|
58
|
-
declare function kindOf(schema: unknown): ZodKind;
|
|
59
|
-
/**
|
|
60
|
-
* Verify a schema is Zod v4. Throws a clear error if it's a v3
|
|
61
|
-
* schema mistakenly imported through `attaform/zod`.
|
|
62
|
-
*
|
|
63
|
-
* Most consumers never call this directly — the v4 adapter calls it
|
|
64
|
-
* internally on every schema. Reach for it only when wiring a custom
|
|
65
|
-
* adapter that needs the same guard.
|
|
66
|
-
*/
|
|
67
|
-
declare function assertZodVersion(schema: unknown): void;
|
|
68
|
-
|
|
69
|
-
/**
|
|
70
|
-
* Zod v4 adapter entry point. Re-exports the adapter + the useForm
|
|
71
|
-
* wrapper that threads zod-v4-specific schema types through
|
|
72
|
-
* useAbstractForm.
|
|
73
|
-
*/
|
|
74
|
-
|
|
75
|
-
/**
|
|
76
|
-
* Create a form bound to a Zod v4 schema.
|
|
34
|
+
* Type inference targets Zod v4 — the recommended major. Consumers
|
|
35
|
+
* still on Zod v3 get correct runtime behavior here, but the strongest
|
|
36
|
+
* TypeScript inference comes from importing `attaform/zod-v3`
|
|
37
|
+
* directly.
|
|
77
38
|
*
|
|
78
39
|
* ```ts
|
|
79
40
|
* import { useForm } from 'attaform/zod'
|
|
@@ -84,100 +45,11 @@ declare function assertZodVersion(schema: unknown): void;
|
|
|
84
45
|
* email: z.email(),
|
|
85
46
|
* password: z.string().min(8),
|
|
86
47
|
* }),
|
|
87
|
-
* defaultValues: { email: '' },
|
|
88
48
|
* })
|
|
89
49
|
* ```
|
|
90
|
-
*
|
|
91
|
-
* Returns a form API exposing `register`, `values`, `errors`,
|
|
92
|
-
* `fields`, `setValue`, `handleSubmit`, `meta`, field-array
|
|
93
|
-
* helpers, and more. See `UseFormReturnType` for the full
|
|
94
|
-
* surface.
|
|
95
|
-
*
|
|
96
|
-
* For Zod v3, import from `attaform/zod-v3` instead.
|
|
97
50
|
*/
|
|
98
51
|
declare function useForm<Schema extends z.ZodObject>(configuration: Omit<UseFormConfiguration<z.output<Schema> extends GenericForm ? z.output<Schema> : never, z.output<Schema> extends GenericForm ? z.output<Schema> : never, AbstractSchema<z.output<Schema> extends GenericForm ? z.output<Schema> : never, z.output<Schema> extends GenericForm ? z.output<Schema> : never>, DeepPartial<DefaultValuesShape<z.output<Schema> extends GenericForm ? z.output<Schema> : never>>>, 'schema' | 'validateOn' | 'debounceMs'> & {
|
|
99
52
|
schema: Schema;
|
|
100
53
|
} & ValidateOnConfig): UseFormReturnType<z.output<Schema> extends GenericForm ? z.output<Schema> : never, z.output<Schema> extends GenericForm ? z.output<Schema> : never>;
|
|
101
54
|
|
|
102
|
-
|
|
103
|
-
* Field-metadata write/read API for the Zod v4 adapter.
|
|
104
|
-
*
|
|
105
|
-
* Backed by Zod 4's native `z.registry<T>()` mechanism — the schema
|
|
106
|
-
* carries the metadata directly through `schema.register(fieldMeta,
|
|
107
|
-
* payload)` (returns the schema, chainable) or the `withMeta()`
|
|
108
|
-
* helper (same effect, version-agnostic across the v3 / v4 adapter
|
|
109
|
-
* split).
|
|
110
|
-
*
|
|
111
|
-
* **Registration patterns:** both styles work — register on whatever
|
|
112
|
-
* schema reference you assign into the parent's shape, OR on the
|
|
113
|
-
* inner schema before wrapping. The adapter's resolver tries the
|
|
114
|
-
* walker-returned schema first, then falls back to the peeled
|
|
115
|
-
* inner so either ordering hits:
|
|
116
|
-
*
|
|
117
|
-
* // both equivalent — registry hits at lookup time
|
|
118
|
-
* withMeta(z.string(), { label: 'Email' }).optional()
|
|
119
|
-
* withMeta(z.string().optional(), { label: 'Email' })
|
|
120
|
-
* z.string().optional().register(fieldMeta, { label: 'Email' })
|
|
121
|
-
* z.string().register(fieldMeta, { label: 'Email' }).optional()
|
|
122
|
-
*
|
|
123
|
-
* The path walker returns the wrapper at terminal positions
|
|
124
|
-
* (`['email']` against `{ email: z.string().optional() }` resolves
|
|
125
|
-
* to `ZodOptional<ZodString>`) and peels at intermediate descent
|
|
126
|
-
* (`['address', 'street']` peels through `address`'s wrapper to
|
|
127
|
-
* reach the inner object). The two-stage lookup covers both leaf
|
|
128
|
-
* and container registrations symmetrically.
|
|
129
|
-
*/
|
|
130
|
-
|
|
131
|
-
/**
|
|
132
|
-
* The shared registry every Attaform-aware Zod 4 schema can register
|
|
133
|
-
* field metadata against. One module-scoped instance per consumer
|
|
134
|
-
* project — re-exported from `attaform/zod` so user code reads the
|
|
135
|
-
* same registry the runtime does.
|
|
136
|
-
*
|
|
137
|
-
* Consumers extending `FieldMetaPayload` via declaration merging
|
|
138
|
-
* automatically get the richer payload type at every `register` /
|
|
139
|
-
* `add` / `get` call site.
|
|
140
|
-
*
|
|
141
|
-
* **Shared-instance disambiguation.** A single schema instance reused
|
|
142
|
-
* at multiple form paths (e.g. one address schema bound to both
|
|
143
|
-
* `pickup` and `delivery`) can carry distinct metadata per path —
|
|
144
|
-
* even via the canonical `schema.register(fieldMeta, payload)` chain.
|
|
145
|
-
* Internally we maintain a parallel WeakMap of payload LISTS indexed
|
|
146
|
-
* per schema reference, and the path-resolver walks the form's
|
|
147
|
-
* schema tree counting per-schema occurrences to pick the right
|
|
148
|
-
* payload for each path. Object literals evaluate left-to-right, so
|
|
149
|
-
* registration order matches tree-walk order, and shared schemas
|
|
150
|
-
* pair their two registrations to the two paths correctly:
|
|
151
|
-
*
|
|
152
|
-
* z.object({
|
|
153
|
-
* pickup: addressSchema.register(fieldMeta, { label: 'Pickup address' }),
|
|
154
|
-
* delivery: addressSchema.register(fieldMeta, { label: 'Delivery address' }),
|
|
155
|
-
* })
|
|
156
|
-
* // form.fields('pickup').label → 'Pickup address'
|
|
157
|
-
* // form.fields('delivery').label → 'Delivery address'
|
|
158
|
-
*
|
|
159
|
-
* Schemas reused via `withMeta()` get a fresh clone per call (see
|
|
160
|
-
* `withMeta` below), so they never share a registry slot in the
|
|
161
|
-
* first place.
|
|
162
|
-
*/
|
|
163
|
-
declare const fieldMeta: z.core.$ZodRegistry<FieldMetaPayload, z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
|
|
164
|
-
/**
|
|
165
|
-
* Attach `payload` to `schema` in the shared `fieldMeta` registry
|
|
166
|
-
* and return `schema` (chainable). Cross-version with `attaform/zod-v3`'s
|
|
167
|
-
* `withMeta()`; user code that uses this helper reads the same on
|
|
168
|
-
* either adapter.
|
|
169
|
-
*
|
|
170
|
-
* Equivalent to `schema.register(fieldMeta, payload)` on Zod 4.
|
|
171
|
-
* Prefer the native chain for v4-only code; reach for `withMeta`
|
|
172
|
-
* when authoring schema modules that may need to compile under both
|
|
173
|
-
* adapters.
|
|
174
|
-
*
|
|
175
|
-
* Registers on the schema reference passed in. See the
|
|
176
|
-
* "Registration rule" note in this file's header — register on the
|
|
177
|
-
* inner schema before wrapping with `.optional()` / `.nullable()` /
|
|
178
|
-
* `.default()` / etc.
|
|
179
|
-
*/
|
|
180
|
-
declare function withMeta<S extends z.ZodType>(schema: S, payload: FieldMetaPayload): S;
|
|
181
|
-
|
|
182
|
-
export { FieldMetaPayload, UnsupportedSchemaError, assertZodVersion, fieldMeta, kindOf, useForm, withMeta, zodV4Adapter as zodAdapter };
|
|
183
|
-
export type { ZodKind };
|
|
55
|
+
export { useForm };
|