attaform 0.18.0 → 0.18.2
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/dist/chunks/devtools.mjs +1 -1
- package/dist/chunks/indexeddb.mjs +1 -1
- package/dist/chunks/local-storage.mjs +1 -1
- package/dist/chunks/session-storage.mjs +1 -1
- 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 +5 -5
- package/dist/nuxt.d.cts +1 -1
- package/dist/nuxt.d.mts +1 -1
- package/dist/nuxt.d.ts +1 -1
- package/dist/runtime/plugins/attaform.mjs +2 -2
- package/dist/shared/{attaform.Xt0A3QUd.mjs → attaform.-1GQTX2T.mjs} +3 -3
- package/dist/shared/{attaform.Xt0A3QUd.mjs.map → attaform.-1GQTX2T.mjs.map} +1 -1
- package/dist/shared/{attaform.CWs1Z3p7.d.ts → attaform.B957T6NU.d.ts} +1 -1
- package/dist/shared/{attaform.Xhg0AYNa.mjs → attaform.CDmaxrt2.mjs} +2 -2
- package/dist/shared/{attaform.Xhg0AYNa.mjs.map → attaform.CDmaxrt2.mjs.map} +1 -1
- package/dist/shared/{attaform.BmDBu4ql.d.ts → attaform.CGX1CNpz.d.ts} +5 -5
- package/dist/shared/{attaform.C3x1hKJC.d.mts → attaform.CRmmNAYp.d.cts} +1 -1
- package/dist/shared/{attaform.DsC3rZHG.mjs → attaform.CZ-XtZt_.mjs} +3 -3
- package/dist/shared/attaform.CZ-XtZt_.mjs.map +1 -0
- package/dist/shared/{attaform.BsMdl-35.d.cts → attaform.Ca5_6Ky-.d.cts} +4 -4
- package/dist/shared/{attaform.BsMdl-35.d.mts → attaform.Ca5_6Ky-.d.mts} +4 -4
- package/dist/shared/{attaform.BsMdl-35.d.ts → attaform.Ca5_6Ky-.d.ts} +4 -4
- package/dist/shared/{attaform.DAH3kvav.d.mts → attaform.CuN7ZhBy.d.cts} +5 -5
- package/dist/shared/{attaform.Bgu9l6OG.d.cts → attaform.D1gzu2GL.d.mts} +5 -5
- package/dist/shared/{attaform.Dzi89x8N.d.cts → attaform.D9wuTGu9.d.mts} +1 -1
- package/dist/shared/{attaform.CtNUB9nf.mjs → attaform.Df0tU0Ut.mjs} +3 -3
- package/dist/shared/{attaform.CtNUB9nf.mjs.map → attaform.Df0tU0Ut.mjs.map} +1 -1
- package/dist/shared/{attaform.BDdFdjeX.mjs → attaform.Dl161U6E.mjs} +3 -3
- package/dist/shared/{attaform.BDdFdjeX.mjs.map → attaform.Dl161U6E.mjs.map} +1 -1
- package/dist/shared/{attaform.CjmJpfLH.d.ts → attaform.FnEwjhvX.d.ts} +1 -1
- package/dist/shared/attaform.II89Pcf4.cjs.map +1 -1
- package/dist/shared/{attaform.D-hDvb98.d.cts → attaform.M-RanbyV.d.mts} +1 -1
- package/dist/shared/{attaform.bH7WvNad.d.mts → attaform.XDjA7sRz.d.cts} +1 -1
- package/dist/vite.cjs +33 -15
- package/dist/vite.cjs.map +1 -1
- package/dist/vite.mjs +33 -11
- package/dist/vite.mjs.map +1 -1
- package/dist/zod-v3.d.cts +4 -4
- package/dist/zod-v3.d.mts +4 -4
- package/dist/zod-v3.d.ts +4 -4
- package/dist/zod-v3.mjs +3 -3
- package/dist/zod-v4.d.cts +4 -4
- package/dist/zod-v4.d.mts +4 -4
- package/dist/zod-v4.d.ts +4 -4
- package/dist/zod-v4.mjs +3 -3
- package/dist/zod.d.cts +6 -6
- package/dist/zod.d.mts +6 -6
- package/dist/zod.d.ts +6 -6
- package/dist/zod.mjs +5 -5
- package/package.json +6 -9
- package/dist/shared/attaform.DsC3rZHG.mjs.map +0 -1
|
@@ -114,7 +114,7 @@ type Unset = typeof _unsetBrand;
|
|
|
114
114
|
* every realm gets the same sentinel.
|
|
115
115
|
*
|
|
116
116
|
* @see {@link isUnset} — type guard that narrows a value back to {@link Unset}.
|
|
117
|
-
* @see `docs/
|
|
117
|
+
* @see `docs/validation/blank.md` — the conceptual model behind blank-aware fields.
|
|
118
118
|
*/
|
|
119
119
|
declare const unset: Unset;
|
|
120
120
|
/**
|
|
@@ -2158,7 +2158,7 @@ type MetaTrackerValue = {
|
|
|
2158
2158
|
* want pre-error introspection ("the user hasn't decided yet"
|
|
2159
2159
|
* indicator, "review unanswered fields" hint).
|
|
2160
2160
|
*
|
|
2161
|
-
* See `docs/
|
|
2161
|
+
* See `docs/validation/blank.md` for the full conceptual model.
|
|
2162
2162
|
*/
|
|
2163
2163
|
blank: boolean;
|
|
2164
2164
|
};
|
|
@@ -4244,5 +4244,5 @@ type UseFormReturnType<Form extends GenericForm, GetValueFormType extends Generi
|
|
|
4244
4244
|
blankPaths: ComputedRef<BlankPathsView>;
|
|
4245
4245
|
};
|
|
4246
4246
|
|
|
4247
|
-
export { ROOT_PATH as
|
|
4248
|
-
export type {
|
|
4247
|
+
export { ROOT_PATH as Y, ROOT_PATH_KEY as Z, canonicalizePath as as, isPathPrefix as at, isUnset as au, parseDottedPath as av, unset as aw };
|
|
4248
|
+
export type { RegisterDirective as $, AbstractSchema as A, OnSubmit as B, CoercionEntry as C, DeepPartial as D, ErrorsProxyShape as E, FieldMetaPayload as F, GenericForm as G, HandleSubmit as H, IsTuple as I, JoinSegments as J, KeyofUnion as K, LiftedValueShape as L, MetaTrackerValue as M, NestedReadType as N, OnError as O, PartialFlatPath as P, Path as Q, PathKey as R, PendingValidationStatus as S, PersistConfig as T, PersistConfigOptions as U, PersistIncludeMode as V, PersistOptInRegistry as W, Primitive as X, ReactiveValidationStatus as _, ApiErrorDetails as a, RegisterFlatPath as a0, RegisterModelDynamicCustomDirective as a1, RegisterOptions as a2, RegisterSelectModifier as a3, RegisterTextModifier as a4, RegisterTransform as a5, RegisterValue as a6, SchemaFactoryOptions as a7, Segment as a8, SetValueCallback as a9, SetValuePayload as aa, SettledValidationStatus as ab, ShouldShowErrors as ac, ShouldShowErrorsConfig as ad, SlimPrimitiveKind as ae, SlimRuntimeOf as af, SubmitHandler as ag, Unset as ah, UseFormConfiguration as ai, UseFormReturnType as aj, ValidateOn as ak, ValidateOnConfig as al, ValidationError as am, ValidationResponse as an, ValidationResponseWithoutValue as ao, ValueOfUnion as ap, WriteMeta as aq, WriteShape as ar, ApiErrorEntry as b, ApiErrorEnvelope as c, ArrayItem as d, ArrayPath as e, AttaformDefaults as f, CoercionRegistry as g, CoercionResult as h, CustomDirectiveRegisterAssignerFn as i, DefaultValuesInput as j, DefaultValuesResponse as k, DefaultValuesShape as l, FieldState as m, FieldStateMap as n, FieldStateMapEntry as o, FlatPath as p, FormErrorRecord as q, FormErrorsSurface as r, FormKey as s, FormMeta as t, FormStorage as u, FormStorageKind as v, HistoryConfig as w, IsUnion as x, NestedType as y, OnInvalidSubmitPolicy as z };
|
|
@@ -114,7 +114,7 @@ type Unset = typeof _unsetBrand;
|
|
|
114
114
|
* every realm gets the same sentinel.
|
|
115
115
|
*
|
|
116
116
|
* @see {@link isUnset} — type guard that narrows a value back to {@link Unset}.
|
|
117
|
-
* @see `docs/
|
|
117
|
+
* @see `docs/validation/blank.md` — the conceptual model behind blank-aware fields.
|
|
118
118
|
*/
|
|
119
119
|
declare const unset: Unset;
|
|
120
120
|
/**
|
|
@@ -2158,7 +2158,7 @@ type MetaTrackerValue = {
|
|
|
2158
2158
|
* want pre-error introspection ("the user hasn't decided yet"
|
|
2159
2159
|
* indicator, "review unanswered fields" hint).
|
|
2160
2160
|
*
|
|
2161
|
-
* See `docs/
|
|
2161
|
+
* See `docs/validation/blank.md` for the full conceptual model.
|
|
2162
2162
|
*/
|
|
2163
2163
|
blank: boolean;
|
|
2164
2164
|
};
|
|
@@ -4244,5 +4244,5 @@ type UseFormReturnType<Form extends GenericForm, GetValueFormType extends Generi
|
|
|
4244
4244
|
blankPaths: ComputedRef<BlankPathsView>;
|
|
4245
4245
|
};
|
|
4246
4246
|
|
|
4247
|
-
export { ROOT_PATH as
|
|
4248
|
-
export type {
|
|
4247
|
+
export { ROOT_PATH as Y, ROOT_PATH_KEY as Z, canonicalizePath as as, isPathPrefix as at, isUnset as au, parseDottedPath as av, unset as aw };
|
|
4248
|
+
export type { RegisterDirective as $, AbstractSchema as A, OnSubmit as B, CoercionEntry as C, DeepPartial as D, ErrorsProxyShape as E, FieldMetaPayload as F, GenericForm as G, HandleSubmit as H, IsTuple as I, JoinSegments as J, KeyofUnion as K, LiftedValueShape as L, MetaTrackerValue as M, NestedReadType as N, OnError as O, PartialFlatPath as P, Path as Q, PathKey as R, PendingValidationStatus as S, PersistConfig as T, PersistConfigOptions as U, PersistIncludeMode as V, PersistOptInRegistry as W, Primitive as X, ReactiveValidationStatus as _, ApiErrorDetails as a, RegisterFlatPath as a0, RegisterModelDynamicCustomDirective as a1, RegisterOptions as a2, RegisterSelectModifier as a3, RegisterTextModifier as a4, RegisterTransform as a5, RegisterValue as a6, SchemaFactoryOptions as a7, Segment as a8, SetValueCallback as a9, SetValuePayload as aa, SettledValidationStatus as ab, ShouldShowErrors as ac, ShouldShowErrorsConfig as ad, SlimPrimitiveKind as ae, SlimRuntimeOf as af, SubmitHandler as ag, Unset as ah, UseFormConfiguration as ai, UseFormReturnType as aj, ValidateOn as ak, ValidateOnConfig as al, ValidationError as am, ValidationResponse as an, ValidationResponseWithoutValue as ao, ValueOfUnion as ap, WriteMeta as aq, WriteShape as ar, ApiErrorEntry as b, ApiErrorEnvelope as c, ArrayItem as d, ArrayPath as e, AttaformDefaults as f, CoercionRegistry as g, CoercionResult as h, CustomDirectiveRegisterAssignerFn as i, DefaultValuesInput as j, DefaultValuesResponse as k, DefaultValuesShape as l, FieldState as m, FieldStateMap as n, FieldStateMapEntry as o, FlatPath as p, FormErrorRecord as q, FormErrorsSurface as r, FormKey as s, FormMeta as t, FormStorage as u, FormStorageKind as v, HistoryConfig as w, IsUnion as x, NestedType as y, OnInvalidSubmitPolicy as z };
|
|
@@ -114,7 +114,7 @@ type Unset = typeof _unsetBrand;
|
|
|
114
114
|
* every realm gets the same sentinel.
|
|
115
115
|
*
|
|
116
116
|
* @see {@link isUnset} — type guard that narrows a value back to {@link Unset}.
|
|
117
|
-
* @see `docs/
|
|
117
|
+
* @see `docs/validation/blank.md` — the conceptual model behind blank-aware fields.
|
|
118
118
|
*/
|
|
119
119
|
declare const unset: Unset;
|
|
120
120
|
/**
|
|
@@ -2158,7 +2158,7 @@ type MetaTrackerValue = {
|
|
|
2158
2158
|
* want pre-error introspection ("the user hasn't decided yet"
|
|
2159
2159
|
* indicator, "review unanswered fields" hint).
|
|
2160
2160
|
*
|
|
2161
|
-
* See `docs/
|
|
2161
|
+
* See `docs/validation/blank.md` for the full conceptual model.
|
|
2162
2162
|
*/
|
|
2163
2163
|
blank: boolean;
|
|
2164
2164
|
};
|
|
@@ -4244,5 +4244,5 @@ type UseFormReturnType<Form extends GenericForm, GetValueFormType extends Generi
|
|
|
4244
4244
|
blankPaths: ComputedRef<BlankPathsView>;
|
|
4245
4245
|
};
|
|
4246
4246
|
|
|
4247
|
-
export { ROOT_PATH as
|
|
4248
|
-
export type {
|
|
4247
|
+
export { ROOT_PATH as Y, ROOT_PATH_KEY as Z, canonicalizePath as as, isPathPrefix as at, isUnset as au, parseDottedPath as av, unset as aw };
|
|
4248
|
+
export type { RegisterDirective as $, AbstractSchema as A, OnSubmit as B, CoercionEntry as C, DeepPartial as D, ErrorsProxyShape as E, FieldMetaPayload as F, GenericForm as G, HandleSubmit as H, IsTuple as I, JoinSegments as J, KeyofUnion as K, LiftedValueShape as L, MetaTrackerValue as M, NestedReadType as N, OnError as O, PartialFlatPath as P, Path as Q, PathKey as R, PendingValidationStatus as S, PersistConfig as T, PersistConfigOptions as U, PersistIncludeMode as V, PersistOptInRegistry as W, Primitive as X, ReactiveValidationStatus as _, ApiErrorDetails as a, RegisterFlatPath as a0, RegisterModelDynamicCustomDirective as a1, RegisterOptions as a2, RegisterSelectModifier as a3, RegisterTextModifier as a4, RegisterTransform as a5, RegisterValue as a6, SchemaFactoryOptions as a7, Segment as a8, SetValueCallback as a9, SetValuePayload as aa, SettledValidationStatus as ab, ShouldShowErrors as ac, ShouldShowErrorsConfig as ad, SlimPrimitiveKind as ae, SlimRuntimeOf as af, SubmitHandler as ag, Unset as ah, UseFormConfiguration as ai, UseFormReturnType as aj, ValidateOn as ak, ValidateOnConfig as al, ValidationError as am, ValidationResponse as an, ValidationResponseWithoutValue as ao, ValueOfUnion as ap, WriteMeta as aq, WriteShape as ar, ApiErrorEntry as b, ApiErrorEnvelope as c, ArrayItem as d, ArrayPath as e, AttaformDefaults as f, CoercionRegistry as g, CoercionResult as h, CustomDirectiveRegisterAssignerFn as i, DefaultValuesInput as j, DefaultValuesResponse as k, DefaultValuesShape as l, FieldState as m, FieldStateMap as n, FieldStateMapEntry as o, FlatPath as p, FormErrorRecord as q, FormErrorsSurface as r, FormKey as s, FormMeta as t, FormStorage as u, FormStorageKind as v, HistoryConfig as w, IsUnion as x, NestedType as y, OnInvalidSubmitPolicy as z };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { s as FormKey, ae as SlimPrimitiveKind, C as CoercionEntry, g as CoercionRegistry, G as GenericForm, R as PathKey, Q as Path, am as ValidationError, A as AbstractSchema, ac as ShouldShowErrors, aq as WriteMeta, D as DeepPartial, ar as WriteShape, ak as ValidateOn, W as PersistOptInRegistry, a8 as Segment, f as AttaformDefaults, aj as UseFormReturnType, a6 as RegisterValue } from './attaform.Ca5_6Ky-.cjs';
|
|
2
2
|
import { Ref, ComputedRef, App, InjectionKey } from 'vue';
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -596,7 +596,7 @@ type FormStore<F extends GenericForm, G extends GenericForm = F> = {
|
|
|
596
596
|
* (where the side-channel is needed to distinguish "user typed 0"
|
|
597
597
|
* from "user supplied nothing"). String / boolean leaves only land
|
|
598
598
|
* here when the consumer explicitly opted in via the `unset`
|
|
599
|
-
* sentinel — see `docs/
|
|
599
|
+
* sentinel — see `docs/validation/blank.md`.
|
|
600
600
|
*/
|
|
601
601
|
readonly derivedBlankErrors: ComputedRef<ReadonlyMap<PathKey, ValidationError[]>>;
|
|
602
602
|
readonly originals: Map<PathKey, OriginalsRecord>;
|
|
@@ -629,7 +629,7 @@ type FormStore<F extends GenericForm, G extends GenericForm = F> = {
|
|
|
629
629
|
* channel that `derivedBlankErrors` consults to surface
|
|
630
630
|
* "No value supplied" errors for required schemas.
|
|
631
631
|
*
|
|
632
|
-
* See `docs/
|
|
632
|
+
* See `docs/validation/blank.md` for the conceptual model.
|
|
633
633
|
*/
|
|
634
634
|
readonly blankPaths: Set<PathKey>;
|
|
635
635
|
/**
|
|
@@ -1647,5 +1647,5 @@ declare const AttaformErrorCode: {
|
|
|
1647
1647
|
};
|
|
1648
1648
|
type AttaformErrorCode = (typeof AttaformErrorCode)[keyof typeof AttaformErrorCode];
|
|
1649
1649
|
|
|
1650
|
-
export { AttaformErrorCode as
|
|
1651
|
-
export type {
|
|
1650
|
+
export { AttaformErrorCode as b, createRegistry as p, defaultCoercionRules as q, defineCoercion as r, getRegistryFromApp as s, injectForm as t, injectWizard as u, kAttaformRegistry as v, lazy as w, useRegister as x, useRegistry as y, useWizard as z };
|
|
1651
|
+
export type { AggregateError as A, CompiledStep as C, FormStatus as F, InjectWizardInput as I, LazyMarker as L, SSRDetectOptions as S, UseRegisterReturn as U, WizardCtx as W, AnyForm as a, AttaformRegistry as c, SerializedFormData as d, StepSlot as e, UseWizardReturnType as f, WizardCtxForm as g, WizardOnError as h, WizardOnSubmit as i, WizardOptions as j, WizardPersistFn as k, WizardRestoreFn as l, WizardRestoreState as m, WizardStatusesProxy as n, WizardSubmitContext as o };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { s as FormKey, ae as SlimPrimitiveKind, C as CoercionEntry, g as CoercionRegistry, G as GenericForm, R as PathKey, Q as Path, am as ValidationError, A as AbstractSchema, ac as ShouldShowErrors, aq as WriteMeta, D as DeepPartial, ar as WriteShape, ak as ValidateOn, W as PersistOptInRegistry, a8 as Segment, f as AttaformDefaults, aj as UseFormReturnType, a6 as RegisterValue } from './attaform.Ca5_6Ky-.mjs';
|
|
2
2
|
import { Ref, ComputedRef, App, InjectionKey } from 'vue';
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -596,7 +596,7 @@ type FormStore<F extends GenericForm, G extends GenericForm = F> = {
|
|
|
596
596
|
* (where the side-channel is needed to distinguish "user typed 0"
|
|
597
597
|
* from "user supplied nothing"). String / boolean leaves only land
|
|
598
598
|
* here when the consumer explicitly opted in via the `unset`
|
|
599
|
-
* sentinel — see `docs/
|
|
599
|
+
* sentinel — see `docs/validation/blank.md`.
|
|
600
600
|
*/
|
|
601
601
|
readonly derivedBlankErrors: ComputedRef<ReadonlyMap<PathKey, ValidationError[]>>;
|
|
602
602
|
readonly originals: Map<PathKey, OriginalsRecord>;
|
|
@@ -629,7 +629,7 @@ type FormStore<F extends GenericForm, G extends GenericForm = F> = {
|
|
|
629
629
|
* channel that `derivedBlankErrors` consults to surface
|
|
630
630
|
* "No value supplied" errors for required schemas.
|
|
631
631
|
*
|
|
632
|
-
* See `docs/
|
|
632
|
+
* See `docs/validation/blank.md` for the conceptual model.
|
|
633
633
|
*/
|
|
634
634
|
readonly blankPaths: Set<PathKey>;
|
|
635
635
|
/**
|
|
@@ -1647,5 +1647,5 @@ declare const AttaformErrorCode: {
|
|
|
1647
1647
|
};
|
|
1648
1648
|
type AttaformErrorCode = (typeof AttaformErrorCode)[keyof typeof AttaformErrorCode];
|
|
1649
1649
|
|
|
1650
|
-
export { AttaformErrorCode as
|
|
1651
|
-
export type {
|
|
1650
|
+
export { AttaformErrorCode as b, createRegistry as p, defaultCoercionRules as q, defineCoercion as r, getRegistryFromApp as s, injectForm as t, injectWizard as u, kAttaformRegistry as v, lazy as w, useRegister as x, useRegistry as y, useWizard as z };
|
|
1651
|
+
export type { AggregateError as A, CompiledStep as C, FormStatus as F, InjectWizardInput as I, LazyMarker as L, SSRDetectOptions as S, UseRegisterReturn as U, WizardCtx as W, AnyForm as a, AttaformRegistry as c, SerializedFormData as d, StepSlot as e, UseWizardReturnType as f, WizardCtxForm as g, WizardOnError as h, WizardOnSubmit as i, WizardOptions as j, WizardPersistFn as k, WizardRestoreFn as l, WizardRestoreState as m, WizardStatusesProxy as n, WizardSubmitContext as o };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import {
|
|
2
|
+
import { s as FormKey, al as ValidateOnConfig, z as OnInvalidSubmitPolicy, T as PersistConfig, w as HistoryConfig, g as CoercionRegistry } from './attaform.Ca5_6Ky-.mjs';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* v3 mirror of the Zod v4 `StorageShape`. Per top-level key, default
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { merge, set, isFunction, cloneDeep } from 'lodash-es';
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { g as getAtPath, j as slimKindOf, A as AttaformErrorCode, h as humanize, k as useAbstractForm } from './attaform.CZ-XtZt_.mjs';
|
|
4
|
+
import { a as AttaformError, i as canonicalizePath, _ as __DEV__, c as InvalidUseFormConfigError } from './attaform.CDmaxrt2.mjs';
|
|
5
5
|
import { f as fieldMetaStore, g as getFieldMetaForSchema } from './attaform.D13GMFgK.mjs';
|
|
6
6
|
|
|
7
7
|
const fieldMeta = fieldMetaStore;
|
|
@@ -1591,4 +1591,4 @@ function useForm(configuration) {
|
|
|
1591
1591
|
}
|
|
1592
1592
|
|
|
1593
1593
|
export { fieldMeta as f, isZodSchemaType as i, useForm as u, withMeta as w, zodAdapter as z };
|
|
1594
|
-
//# sourceMappingURL=attaform.
|
|
1594
|
+
//# sourceMappingURL=attaform.Df0tU0Ut.mjs.map
|