attaform 0.24.1 → 0.24.3
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 +27 -122
- package/dist/chunks/devtools.cjs +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/index.cjs +3 -3
- package/dist/index.d.cts +4 -4
- package/dist/index.d.mts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.mjs +3 -3
- package/dist/nuxt.cjs +1 -1
- package/dist/nuxt.cjs.map +1 -1
- package/dist/nuxt.d.cts +1 -1
- package/dist/nuxt.d.mts +1 -1
- package/dist/nuxt.d.ts +1 -1
- package/dist/nuxt.mjs +1 -1
- package/dist/nuxt.mjs.map +1 -1
- package/dist/runtime/plugins/attaform.cjs +2 -2
- package/dist/runtime/plugins/attaform.mjs +2 -2
- package/dist/shared/{attaform.Bq6Copxn.d.cts → attaform.0zueP54D.d.mts} +10 -1
- package/dist/shared/{attaform.C-1W0T1n.cjs → attaform.BVjueUPu.cjs} +3 -3
- package/dist/shared/{attaform.C-1W0T1n.cjs.map → attaform.BVjueUPu.cjs.map} +1 -1
- package/dist/shared/{attaform.NWrEGrNo.mjs → attaform.B_F61Rx1.mjs} +37 -2
- package/dist/shared/attaform.B_F61Rx1.mjs.map +1 -0
- package/dist/shared/{attaform.Df4xXKbE.d.ts → attaform.BjiHiYAZ.d.ts} +3 -2
- package/dist/shared/{attaform.4zesozTg.d.mts → attaform.Bx6pgrIy.d.cts} +3 -2
- package/dist/shared/{attaform.FY5r1BpA.mjs → attaform.ByIB7i15.mjs} +4 -4
- package/dist/shared/{attaform.Cn6JoG9o.cjs.map → attaform.ByIB7i15.mjs.map} +1 -1
- package/dist/shared/{attaform.C0au8oXd.mjs → attaform.C5qkSN6t.mjs} +2 -2
- package/dist/shared/attaform.C5qkSN6t.mjs.map +1 -0
- package/dist/shared/{attaform.DRQjF16I.cjs → attaform.CB1kYKUB.cjs} +37 -2
- package/dist/shared/attaform.CB1kYKUB.cjs.map +1 -0
- package/dist/shared/{attaform.CrrIaHM8.cjs → attaform.CqlLImc1.cjs} +4 -4
- package/dist/shared/{attaform.BunnTiTw.mjs.map → attaform.CqlLImc1.cjs.map} +1 -1
- package/dist/shared/{attaform.C-tQKknW.mjs → attaform.D4ebpNbS.mjs} +3 -3
- package/dist/shared/{attaform.C-tQKknW.mjs.map → attaform.D4ebpNbS.mjs.map} +1 -1
- package/dist/shared/{attaform.BrFPMFgi.d.ts → attaform.DHjRN5JP.d.cts} +10 -1
- package/dist/shared/{attaform.DwLw3Kzv.cjs → attaform.DK6_Ctv7.cjs} +4 -4
- package/dist/shared/attaform.DK6_Ctv7.cjs.map +1 -0
- package/dist/shared/{attaform.B7UdTs_o.cjs → attaform.DQcdvxKZ.cjs} +2 -2
- package/dist/shared/attaform.DQcdvxKZ.cjs.map +1 -0
- package/dist/shared/{attaform.BOi6n2Pn.cjs → attaform.DRWrVSkH.cjs} +2 -2
- package/dist/shared/{attaform.BOi6n2Pn.cjs.map → attaform.DRWrVSkH.cjs.map} +1 -1
- package/dist/shared/{attaform.DBhrKb2j.d.ts → attaform.DUc6cetN.d.cts} +37 -1
- package/dist/shared/{attaform.DBhrKb2j.d.mts → attaform.DUc6cetN.d.mts} +37 -1
- package/dist/shared/{attaform.DBhrKb2j.d.cts → attaform.DUc6cetN.d.ts} +37 -1
- package/dist/shared/{attaform.BunnTiTw.mjs → attaform.Dbzwtn4g.mjs} +4 -4
- package/dist/shared/{attaform.CrrIaHM8.cjs.map → attaform.Dbzwtn4g.mjs.map} +1 -1
- package/dist/shared/{attaform.Cn6JoG9o.cjs → attaform.DfnwaGW2.cjs} +4 -4
- package/dist/shared/{attaform.FY5r1BpA.mjs.map → attaform.DfnwaGW2.cjs.map} +1 -1
- package/dist/shared/{attaform.0-00cYGw.mjs → attaform.DgbHNLf_.mjs} +2 -2
- package/dist/shared/{attaform.0-00cYGw.mjs.map → attaform.DgbHNLf_.mjs.map} +1 -1
- package/dist/shared/{attaform.Bk7vnQhG.d.cts → attaform.DvqdxvNU.d.mts} +3 -2
- package/dist/shared/{attaform.DhXl0Kdr.mjs → attaform.DwCtxauq.mjs} +4 -4
- package/dist/shared/attaform.DwCtxauq.mjs.map +1 -0
- package/dist/shared/{attaform.BwAcpoRw.d.mts → attaform.yqcYwt0d.d.ts} +10 -1
- package/dist/transforms.cjs +1 -1
- package/dist/transforms.d.cts +4 -1
- package/dist/transforms.d.mts +4 -1
- package/dist/transforms.d.ts +4 -1
- package/dist/transforms.mjs +1 -1
- package/dist/vite.cjs +1 -1
- package/dist/vite.mjs +1 -1
- package/dist/zod-v3.cjs +2 -2
- package/dist/zod-v3.d.cts +8 -5
- package/dist/zod-v3.d.mts +8 -5
- package/dist/zod-v3.d.ts +8 -5
- package/dist/zod-v3.mjs +2 -2
- package/dist/zod-v4.cjs +2 -2
- package/dist/zod-v4.d.cts +5 -5
- package/dist/zod-v4.d.mts +5 -5
- package/dist/zod-v4.d.ts +5 -5
- package/dist/zod-v4.mjs +2 -2
- package/dist/zod.cjs +5 -5
- package/dist/zod.cjs.map +1 -1
- package/dist/zod.d.cts +23 -7
- package/dist/zod.d.mts +23 -7
- package/dist/zod.d.ts +23 -7
- package/dist/zod.mjs +5 -5
- package/dist/zod.mjs.map +1 -1
- package/package.json +2 -2
- package/dist/shared/attaform.B7UdTs_o.cjs.map +0 -1
- package/dist/shared/attaform.C0au8oXd.mjs.map +0 -1
- package/dist/shared/attaform.DRQjF16I.cjs.map +0 -1
- package/dist/shared/attaform.DhXl0Kdr.mjs.map +0 -1
- package/dist/shared/attaform.DwLw3Kzv.cjs.map +0 -1
- package/dist/shared/attaform.NWrEGrNo.mjs.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { G as GenericForm, u as FlatPath, O as NestedType, F as FormKey, U as UseFormConfiguration, a as AbstractSchema,
|
|
2
|
+
import { G as GenericForm, u as FlatPath, O as NestedType, F as FormKey, U as UseFormConfiguration, a as AbstractSchema, ar as AcceptableDefaults, af as ValidateOnConfig, b as UseFormReturnType } from './attaform.DUc6cetN.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* The shape `form.values.<key>` returns at runtime.
|
|
@@ -223,8 +223,9 @@ type PathOutput<Schema extends z.ZodType, Path extends string> = z.output<Schema
|
|
|
223
223
|
type FormOf<Schema extends SupportedRootSchema> = z.input<Schema> extends GenericForm ? z.input<Schema> : never;
|
|
224
224
|
type OutOf<Schema extends SupportedRootSchema> = z.output<Schema> extends GenericForm ? z.output<Schema> : never;
|
|
225
225
|
type ReadOf<Schema extends SupportedRootSchema> = StorageShape<Schema> extends GenericForm ? StorageShape<Schema> : never;
|
|
226
|
-
declare function useForm<Schema extends SupportedRootSchema, K extends FormKey = FormKey>(configuration: Omit<UseFormConfiguration<FormOf<Schema>, OutOf<Schema>, AbstractSchema<FormOf<Schema>, OutOf<Schema>>,
|
|
226
|
+
declare function useForm<Schema extends SupportedRootSchema, K extends FormKey = FormKey>(configuration: Omit<UseFormConfiguration<FormOf<Schema>, OutOf<Schema>, AbstractSchema<FormOf<Schema>, OutOf<Schema>>, never, K>, 'schema' | 'validateOn' | 'debounceMs' | 'defaultValues'> & {
|
|
227
227
|
schema: Schema;
|
|
228
|
+
defaultValues?: AcceptableDefaults<FormOf<Schema>, z.input<Schema>>;
|
|
228
229
|
} & ValidateOnConfig): UseFormReturnType<FormOf<Schema>, OutOf<Schema>, ReadOf<Schema>, K>;
|
|
229
230
|
|
|
230
231
|
export { useForm as u };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { G as GenericForm, u as FlatPath, O as NestedType, F as FormKey, U as UseFormConfiguration, a as AbstractSchema,
|
|
2
|
+
import { G as GenericForm, u as FlatPath, O as NestedType, F as FormKey, U as UseFormConfiguration, a as AbstractSchema, ar as AcceptableDefaults, af as ValidateOnConfig, b as UseFormReturnType } from './attaform.DUc6cetN.cjs';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* The shape `form.values.<key>` returns at runtime.
|
|
@@ -223,8 +223,9 @@ type PathOutput<Schema extends z.ZodType, Path extends string> = z.output<Schema
|
|
|
223
223
|
type FormOf<Schema extends SupportedRootSchema> = z.input<Schema> extends GenericForm ? z.input<Schema> : never;
|
|
224
224
|
type OutOf<Schema extends SupportedRootSchema> = z.output<Schema> extends GenericForm ? z.output<Schema> : never;
|
|
225
225
|
type ReadOf<Schema extends SupportedRootSchema> = StorageShape<Schema> extends GenericForm ? StorageShape<Schema> : never;
|
|
226
|
-
declare function useForm<Schema extends SupportedRootSchema, K extends FormKey = FormKey>(configuration: Omit<UseFormConfiguration<FormOf<Schema>, OutOf<Schema>, AbstractSchema<FormOf<Schema>, OutOf<Schema>>,
|
|
226
|
+
declare function useForm<Schema extends SupportedRootSchema, K extends FormKey = FormKey>(configuration: Omit<UseFormConfiguration<FormOf<Schema>, OutOf<Schema>, AbstractSchema<FormOf<Schema>, OutOf<Schema>>, never, K>, 'schema' | 'validateOn' | 'debounceMs' | 'defaultValues'> & {
|
|
227
227
|
schema: Schema;
|
|
228
|
+
defaultValues?: AcceptableDefaults<FormOf<Schema>, z.input<Schema>>;
|
|
228
229
|
} & ValidateOnConfig): UseFormReturnType<FormOf<Schema>, OutOf<Schema>, ReadOf<Schema>, K>;
|
|
229
230
|
|
|
230
231
|
export { useForm as u };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { f as fieldMetaStore, g as getFieldMetaForSchema, a as getFieldMetaListForSchema, s as slimPrimitivesWalk, c as createAbstractSchema, w as walkPathSegments, d as deriveDefaultWalk, b as getFieldMetaPathMap, m as mergeDeep, p as peelEmbeddedDefault, N as NO_EMBEDDED_DEFAULT } from './attaform.
|
|
2
|
-
import { o as humanize, p as getAtPath, n as slimKindOf, q as setAtPath, h as useAbstractForm } from './attaform.
|
|
3
|
-
import { A as AttaformError, _ as __DEV__, f as canonicalizePath, a as InvalidUseFormConfigError } from './attaform.
|
|
1
|
+
import { f as fieldMetaStore, g as getFieldMetaForSchema, a as getFieldMetaListForSchema, s as slimPrimitivesWalk, c as createAbstractSchema, w as walkPathSegments, d as deriveDefaultWalk, b as getFieldMetaPathMap, m as mergeDeep, p as peelEmbeddedDefault, N as NO_EMBEDDED_DEFAULT } from './attaform.D4ebpNbS.mjs';
|
|
2
|
+
import { o as humanize, p as getAtPath, n as slimKindOf, q as setAtPath, h as useAbstractForm } from './attaform.B_F61Rx1.mjs';
|
|
3
|
+
import { A as AttaformError, _ as __DEV__, f as canonicalizePath, a as InvalidUseFormConfigError } from './attaform.C5qkSN6t.mjs';
|
|
4
4
|
|
|
5
5
|
const fieldMeta = fieldMetaStore;
|
|
6
6
|
function withMeta(schema, payload) {
|
|
@@ -1628,4 +1628,4 @@ function useForm(configuration) {
|
|
|
1628
1628
|
}
|
|
1629
1629
|
|
|
1630
1630
|
export { fieldMeta as f, isZodSchemaType as i, useForm as u, withMeta as w, zodAdapter as z };
|
|
1631
|
-
//# sourceMappingURL=attaform.
|
|
1631
|
+
//# sourceMappingURL=attaform.ByIB7i15.mjs.map
|