attaform 0.29.0 → 0.30.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/dist/abstract.d.mts +5 -5
- package/dist/abstract.mjs +4 -4
- package/dist/dev/abstract.mjs +4 -4
- package/dist/dev/chunks/dev-key-collision-warnings.mjs +47 -8
- package/dist/dev/chunks/devtools.mjs +1 -1
- package/dist/dev/directive.mjs +1 -1
- package/dist/dev/history.mjs +1 -2
- package/dist/dev/index.mjs +5 -5
- package/dist/dev/runtime/plugins/attaform.mjs +3 -3
- package/dist/dev/shared/{attaform-dev.BO-71R54.mjs → attaform-dev.BK6Ge2qR.mjs} +34 -188
- package/dist/dev/shared/{attaform-dev.A-TpJW0B.mjs → attaform-dev.BQc5QV3Y.mjs} +1 -19
- package/dist/dev/shared/{attaform-dev.DrzObAZo.mjs → attaform-dev.BcNtyOmf.mjs} +4 -4
- package/dist/dev/shared/{attaform-dev.ButTkwHd.mjs → attaform-dev.BcYT6tFh.mjs} +7 -8
- package/dist/dev/shared/{attaform-dev.BgM6FdtA.mjs → attaform-dev.BisFstxh.mjs} +91 -59
- package/dist/dev/shared/{attaform-dev.DHuydLAC.mjs → attaform-dev.CQ2rJiAX.mjs} +560 -631
- package/dist/dev/shared/{attaform-dev.D8aoKb89.mjs → attaform-dev.D6CLvaQT.mjs} +8 -8
- package/dist/dev/shared/{attaform-dev.q6UutkCx.mjs → attaform-dev.DTrHonpc.mjs} +69 -120
- package/dist/dev/shared/{attaform-dev.DD5m2W51.mjs → attaform-dev.DUZckyV8.mjs} +1 -3
- package/dist/dev/zod-v3.mjs +6 -6
- package/dist/dev/zod-v4.mjs +6 -6
- package/dist/dev/zod.mjs +5 -5
- package/dist/directive.d.mts +2 -2
- package/dist/directive.mjs +1 -1
- package/dist/history.d.mts +1 -1
- package/dist/history.mjs +1 -2
- package/dist/index.d.mts +6 -6
- package/dist/index.mjs +5 -5
- package/dist/nuxt.d.mts +2 -11
- package/dist/nuxt.mjs +0 -1
- package/dist/runtime/plugins/attaform.mjs +3 -3
- package/dist/shared/{attaform.DffRL5pP.mjs → attaform.B3resMQ1.mjs} +8 -8
- package/dist/shared/{attaform.Cvao8bW5.mjs → attaform.BRDDQeHV.mjs} +6 -6
- package/dist/shared/{attaform.C2MVyuxC.mjs → attaform.BXneBxEj.mjs} +34 -188
- package/dist/shared/{attaform.BndjUUYX.mjs → attaform.ByWP6kSx.mjs} +4 -4
- package/dist/shared/{attaform.D1fnTifF.mjs → attaform.CJ8DpRGj.mjs} +69 -120
- package/dist/shared/{attaform.B0dKL8ST.mjs → attaform.CUfrMK7t.mjs} +91 -59
- package/dist/shared/{attaform.CZYt_5N_.mjs → attaform.CdZIEf7_.mjs} +1 -19
- package/dist/shared/{attaform.axHXVQO7.d.mts → attaform.Clz0ArIi.d.mts} +1 -1
- package/dist/shared/{attaform.CZMAYwSK.mjs → attaform.DNJOWjQw.mjs} +559 -588
- package/dist/shared/{attaform.CIWLMY-R.d.mts → attaform.Rc9u4Vfw.d.mts} +1 -1
- package/dist/shared/{attaform.DDtqHYv1.d.mts → attaform.UGyOK83T.d.mts} +115 -214
- package/dist/shared/{attaform.D0x-qSXm.mjs → attaform.WiGdIqgx.mjs} +1 -3
- package/dist/shared/{attaform.CsoeRi3P.d.mts → attaform.bKLzMU0o.d.mts} +99 -493
- package/dist/vite.mjs +5 -0
- package/dist/zod-v3.d.mts +4 -4
- package/dist/zod-v3.mjs +6 -6
- package/dist/zod-v4.d.mts +9 -9
- package/dist/zod-v4.mjs +6 -6
- package/dist/zod.d.mts +4 -4
- package/dist/zod.mjs +5 -5
- package/package.json +3 -2
- package/skills/attaform/SKILL.md +1 -1
- package/skills/attaform/references/custom-components.md +1 -1
- package/dist/chunks/fingerprint.mjs +0 -183
- package/dist/chunks/fingerprint2.mjs +0 -159
- package/dist/dev/chunks/fingerprint.mjs +0 -183
- package/dist/dev/chunks/fingerprint2.mjs +0 -159
- package/dist/dev/shared/attaform-dev.BxfsuwBR.mjs +0 -44
- package/dist/shared/attaform.BxfsuwBR.mjs +0 -44
package/dist/abstract.d.mts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { A as AttaformRegistry } from './shared/attaform.
|
|
2
|
-
export { a as AnyForm, b as AttaformDevtoolsBridge, c as AttaformError, d as AttaformErrorCode, e as AttaformPluginOptions, C as CompiledStep, D as
|
|
3
|
-
import { G as GenericForm, F as FormKey, U as UseFormConfiguration, A as AbstractSchema, D as DefaultValuesInput, a as UseFormReturnType } from './shared/attaform.
|
|
4
|
-
export { b as ArrayItem, c as ArrayPath,
|
|
5
|
-
export { v as vRegister } from './shared/attaform.
|
|
1
|
+
import { A as AttaformRegistry } from './shared/attaform.UGyOK83T.mjs';
|
|
2
|
+
export { a as AnyForm, b as AttaformDevtoolsBridge, c as AttaformError, d as AttaformErrorCode, e as AttaformPluginOptions, C as CompiledStep, D as DEVTOOLS_WINDOW_KEY, F as FormStatus, f as FormStatusSeed, G as GateMarker, I as InjectWizardInput, g as InvalidPathError, h as InvalidUseFormConfigError, L as LazyMarker, O as OutsideSetupError, R as RegistryNotInstalledError, i as ReservedFormKeyError, S as SerializedAttaformState, j as SerializedFormData, k as StepSlot, l as SubmitErrorHandlerError, U as UseRegisterOptions, m as UseRegisterReturn, n as UseWizardReturnType, W as WizardAggregateError, o as WizardCtx, p as WizardCtxForm, q as WizardOnError, r as WizardOnSubmit, s as WizardOptions, t as WizardPersistFn, u as WizardRestoreFn, v as WizardRestoreState, w as WizardStatusesProxy, x as WizardSubmitContext, y as assignKey, z as createAttaform, B as createRegistry, E as escapeForInlineScript, H as gate, J as getRegistryFromApp, K as hydrateAttaformState, M as injectForm, N as injectWizard, P as isRegisterValue, Q as kAttaformRegistry, T as lazy, V as renderAttaformState, X as useRegister, Y as useRegistry, Z as useWizard } from './shared/attaform.UGyOK83T.mjs';
|
|
3
|
+
import { G as GenericForm, F as FormKey, U as UseFormConfiguration, A as AbstractSchema, D as DefaultValuesInput, a as UseFormReturnType } from './shared/attaform.bKLzMU0o.mjs';
|
|
4
|
+
export { b as ArrayItem, c as ArrayPath, C as CustomDirectiveRegisterAssignerFn, d as DeepPartial, e as DefaultValuesShape, f as DisplayState, E as ErrorInput, g as ErrorsProxyShape, h as FieldMetaPayload, i as FieldState, j as FieldStateMap, k as FieldStateMapEntry, l as FlatPath, m as FormErrorRecord, n as FormErrorsSurface, o as FormMeta, H as HandleSubmit, p as HistoryPlugin, I as IsTuple, q as IsUnion, J as JoinSegments, r as Json, K as KeyofUnion, L as LiftedValueShape, M as MetaTrackerValue, N as NestedReadType, s as NestedType, O as OnError, t as OnSubmit, P as ParseOptions, u as PartialFlatPath, v as Path, w as PathKey, x as PendingValidationStatus, y as Primitive, R as ROOT_PATH, z as ROOT_PATH_KEY, B as ReactiveValidationStatus, Q as RecordPath, S as RecordValue, T as RegisterDirective, V as RegisterFlatPath, W as RegisterOptions, X as RegisterSelectModifier, Y as RegisterTextModifier, Z as RegisterTransform, _ as RegisterValue, $ as SchemaDefaultsResult, a0 as SchemaParseErrorWithData, a1 as SchemaParseErrorWithoutData, a2 as SchemaParseResult, a3 as SchemaParseSuccess, a4 as Segment, a5 as SetValueCallback, a6 as SetValuePayload, a7 as SettledValidationStatus, a8 as SlimPrimitiveKind, a9 as SubmitHandler, aa as Unset, ab as ValidateOn, ac as ValidateOnConfig, ad as ValidationError, ae as ValidationResponse, af as ValidationResponseWithoutValue, ag as ValueOfUnion, ah as WriteMeta, ai as WriteShape, aj as canonicalizePath, ak as isPathPrefix, al as isUnset, am as parseDottedPath, an as unset } from './shared/attaform.bKLzMU0o.mjs';
|
|
5
|
+
export { v as vRegister } from './shared/attaform.Clz0ArIi.mjs';
|
|
6
6
|
import 'vue';
|
|
7
7
|
|
|
8
8
|
/**
|
package/dist/abstract.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { A as AttaformErrorCode,
|
|
2
|
-
export { A as AttaformError, I as InvalidPathError, a as InvalidUseFormConfigError, O as OutsideSetupError, R as ROOT_PATH, b as ROOT_PATH_KEY, c as RegistryNotInstalledError, d as ReservedFormKeyError, S as SubmitErrorHandlerError, e as canonicalizePath, i as isPathPrefix, p as parseDottedPath } from './shared/attaform.
|
|
3
|
-
export { D as DEVTOOLS_WINDOW_KEY, c as createAttaform, a as createRegistry, g as getRegistryFromApp, h as hydrateAttaformState, k as kAttaformRegistry, r as renderAttaformState, u as useRegistry } from './shared/attaform.
|
|
4
|
-
export { a as assignKey, v as vRegister } from './shared/attaform.
|
|
1
|
+
export { A as AttaformErrorCode, e as escapeForInlineScript, g as gate, i as injectForm, a as injectWizard, b as isUnset, l as lazy, u as unset, c as useAbstractForm, d as useRegister, f as useWizard } from './shared/attaform.DNJOWjQw.mjs';
|
|
2
|
+
export { A as AttaformError, I as InvalidPathError, a as InvalidUseFormConfigError, O as OutsideSetupError, R as ROOT_PATH, b as ROOT_PATH_KEY, c as RegistryNotInstalledError, d as ReservedFormKeyError, S as SubmitErrorHandlerError, e as canonicalizePath, i as isPathPrefix, p as parseDottedPath } from './shared/attaform.CdZIEf7_.mjs';
|
|
3
|
+
export { D as DEVTOOLS_WINDOW_KEY, c as createAttaform, a as createRegistry, g as getRegistryFromApp, h as hydrateAttaformState, k as kAttaformRegistry, r as renderAttaformState, u as useRegistry } from './shared/attaform.WiGdIqgx.mjs';
|
|
4
|
+
export { a as assignKey, v as vRegister } from './shared/attaform.B3resMQ1.mjs';
|
|
5
5
|
export { i as isRegisterValue } from './shared/attaform.KvlEedlF.mjs';
|
package/dist/dev/abstract.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { A as AttaformErrorCode,
|
|
2
|
-
export { A as AttaformError, I as InvalidPathError, a as InvalidUseFormConfigError, O as OutsideSetupError, R as ROOT_PATH, b as ROOT_PATH_KEY, c as RegistryNotInstalledError, d as ReservedFormKeyError, S as SubmitErrorHandlerError, e as canonicalizePath, i as isPathPrefix, p as parseDottedPath } from './shared/attaform-dev.
|
|
3
|
-
export { D as DEVTOOLS_WINDOW_KEY, c as createAttaform, a as createRegistry, g as getRegistryFromApp, h as hydrateAttaformState, k as kAttaformRegistry, r as renderAttaformState, u as useRegistry } from './shared/attaform-dev.
|
|
4
|
-
export { a as assignKey, i as isRegisterValue, v as vRegister } from './shared/attaform-dev.
|
|
1
|
+
export { A as AttaformErrorCode, e as escapeForInlineScript, g as gate, i as injectForm, a as injectWizard, b as isUnset, l as lazy, u as unset, c as useAbstractForm, d as useRegister, f as useWizard } from './shared/attaform-dev.CQ2rJiAX.mjs';
|
|
2
|
+
export { A as AttaformError, I as InvalidPathError, a as InvalidUseFormConfigError, O as OutsideSetupError, R as ROOT_PATH, b as ROOT_PATH_KEY, c as RegistryNotInstalledError, d as ReservedFormKeyError, S as SubmitErrorHandlerError, e as canonicalizePath, i as isPathPrefix, p as parseDottedPath } from './shared/attaform-dev.BQc5QV3Y.mjs';
|
|
3
|
+
export { D as DEVTOOLS_WINDOW_KEY, c as createAttaform, a as createRegistry, g as getRegistryFromApp, h as hydrateAttaformState, k as kAttaformRegistry, r as renderAttaformState, u as useRegistry } from './shared/attaform-dev.DUZckyV8.mjs';
|
|
4
|
+
export { a as assignKey, i as isRegisterValue, v as vRegister } from './shared/attaform-dev.D6CLvaQT.mjs';
|
|
@@ -1,22 +1,61 @@
|
|
|
1
|
+
const MAX_SKETCH_DEPTH = 6;
|
|
2
|
+
const MAX_SKETCH_NODES = 400;
|
|
3
|
+
function describePath(schema, path) {
|
|
4
|
+
const kinds = [...schema.getSlimPrimitiveTypesAtPath(path)].sort().join("|");
|
|
5
|
+
const arity = schema.arrayShapeAtPath(path);
|
|
6
|
+
return [
|
|
7
|
+
kinds,
|
|
8
|
+
schema.isRequiredAtPath(path) ? "req" : "opt",
|
|
9
|
+
schema.isLeafAtPath(path) ? "leaf" : "node",
|
|
10
|
+
arity === null ? "" : `[${arity}]`
|
|
11
|
+
].join(",");
|
|
12
|
+
}
|
|
13
|
+
function sketchSchema(schema) {
|
|
14
|
+
const lines = [];
|
|
15
|
+
let budget = MAX_SKETCH_NODES;
|
|
16
|
+
const visit = (value, path) => {
|
|
17
|
+
if (budget <= 0) return;
|
|
18
|
+
budget -= 1;
|
|
19
|
+
lines.push(`${path.join(".")}=${describePath(schema, path)}`);
|
|
20
|
+
if (path.length >= MAX_SKETCH_DEPTH) return;
|
|
21
|
+
if (Array.isArray(value)) {
|
|
22
|
+
if (value.length > 0) visit(value[0], [...path, 0]);
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
25
|
+
if (value === null || typeof value !== "object") return;
|
|
26
|
+
for (const childKey of Object.keys(value).sort()) {
|
|
27
|
+
visit(value[childKey], [...path, childKey]);
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
visit(schema.getDefaultAtPath([]), []);
|
|
31
|
+
return lines.join("\n");
|
|
32
|
+
}
|
|
1
33
|
async function warnOnSchemaFingerprintMismatch(key, existing, incoming) {
|
|
2
|
-
|
|
3
|
-
|
|
34
|
+
await Promise.resolve();
|
|
35
|
+
if (existing === incoming) return;
|
|
36
|
+
let existingSketch;
|
|
37
|
+
let incomingSketch;
|
|
4
38
|
try {
|
|
5
|
-
|
|
6
|
-
|
|
39
|
+
existingSketch = sketchSchema(existing);
|
|
40
|
+
incomingSketch = sketchSchema(incoming);
|
|
7
41
|
} catch (error) {
|
|
8
42
|
console.error(
|
|
9
|
-
`[attaform]
|
|
43
|
+
`[attaform] could not compare schemas for key "${key}"; skipping mismatch check.`,
|
|
10
44
|
error
|
|
11
45
|
);
|
|
12
46
|
return;
|
|
13
47
|
}
|
|
14
|
-
if (
|
|
48
|
+
if (existingSketch === incomingSketch) return;
|
|
15
49
|
console.warn(
|
|
16
50
|
`[attaform] useForm() calls with key "${key}" use different schemas; first wins, second is ignored. Use identical schemas or unique keys.
|
|
17
|
-
existing:
|
|
18
|
-
|
|
51
|
+
existing:
|
|
52
|
+
${indent(existingSketch)}
|
|
53
|
+
incoming:
|
|
54
|
+
${indent(incomingSketch)}`
|
|
19
55
|
);
|
|
20
56
|
}
|
|
57
|
+
function indent(sketch) {
|
|
58
|
+
return sketch.split("\n").map((line) => ` ${line}`).join("\n");
|
|
59
|
+
}
|
|
21
60
|
|
|
22
61
|
export { warnOnSchemaFingerprintMismatch };
|
package/dist/dev/directive.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { b as installVRegister, v as vRegister, c as vRegisterFile } from './shared/attaform-dev.
|
|
1
|
+
export { b as installVRegister, v as vRegister, c as vRegisterFile } from './shared/attaform-dev.D6CLvaQT.mjs';
|
package/dist/dev/history.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { shallowRef, computed } from 'vue';
|
|
2
|
-
import { n as normalizeNumericOption, D as DEFAULT_HISTORY_MAX_SNAPSHOTS, s as structuralSnapshot } from './shared/attaform-dev.
|
|
2
|
+
import { n as normalizeNumericOption, D as DEFAULT_HISTORY_MAX_SNAPSHOTS, s as structuralSnapshot } from './shared/attaform-dev.BcYT6tFh.mjs';
|
|
3
3
|
|
|
4
4
|
function captureErrorCells(map) {
|
|
5
5
|
const out = [];
|
|
@@ -77,7 +77,6 @@ function historyPlugin(options) {
|
|
|
77
77
|
const max = normalizeNumericOption({
|
|
78
78
|
value: options?.max ?? DEFAULT_HISTORY_MAX_SNAPSHOTS,
|
|
79
79
|
source: "historyPlugin({ max })",
|
|
80
|
-
allowInfinity: false,
|
|
81
80
|
min: 0,
|
|
82
81
|
defaultValue: DEFAULT_HISTORY_MAX_SNAPSHOTS
|
|
83
82
|
});
|
package/dist/dev/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { A as AttaformError, I as InvalidPathError, a as InvalidUseFormConfigError, O as OutsideSetupError, R as ROOT_PATH, b as ROOT_PATH_KEY, c as RegistryNotInstalledError, d as ReservedFormKeyError, S as SubmitErrorHandlerError, e as canonicalizePath, i as isPathPrefix, p as parseDottedPath } from './shared/attaform-dev.
|
|
2
|
-
export { A as AttaformErrorCode,
|
|
3
|
-
export { D as DEVTOOLS_WINDOW_KEY, c as createAttaform, a as createRegistry, g as getRegistryFromApp, h as hydrateAttaformState, k as kAttaformRegistry, r as renderAttaformState, u as useRegistry } from './shared/attaform-dev.
|
|
4
|
-
export { a as assignKey, i as isRegisterValue, v as vRegister } from './shared/attaform-dev.
|
|
5
|
-
export { f as fieldMeta, u as useForm, w as withMeta } from './shared/attaform-dev.
|
|
1
|
+
export { A as AttaformError, I as InvalidPathError, a as InvalidUseFormConfigError, O as OutsideSetupError, R as ROOT_PATH, b as ROOT_PATH_KEY, c as RegistryNotInstalledError, d as ReservedFormKeyError, S as SubmitErrorHandlerError, e as canonicalizePath, i as isPathPrefix, p as parseDottedPath } from './shared/attaform-dev.BQc5QV3Y.mjs';
|
|
2
|
+
export { A as AttaformErrorCode, e as escapeForInlineScript, g as gate, i as injectForm, a as injectWizard, b as isUnset, l as lazy, u as unset, d as useRegister, f as useWizard } from './shared/attaform-dev.CQ2rJiAX.mjs';
|
|
3
|
+
export { D as DEVTOOLS_WINDOW_KEY, c as createAttaform, a as createRegistry, g as getRegistryFromApp, h as hydrateAttaformState, k as kAttaformRegistry, r as renderAttaformState, u as useRegistry } from './shared/attaform-dev.DUZckyV8.mjs';
|
|
4
|
+
export { a as assignKey, i as isRegisterValue, v as vRegister } from './shared/attaform-dev.D6CLvaQT.mjs';
|
|
5
|
+
export { f as fieldMeta, u as useForm, w as withMeta } from './shared/attaform-dev.BcNtyOmf.mjs';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineNuxtPlugin, useRuntimeConfig, useRoute } from 'nuxt/app';
|
|
2
|
-
import { c as createAttaform, b as kAttaformWizardActiveStepResolver, r as renderAttaformState, h as hydrateAttaformState, g as getRegistryFromApp, D as DEVTOOLS_WINDOW_KEY } from '../../shared/attaform-dev.
|
|
2
|
+
import { c as createAttaform, b as kAttaformWizardActiveStepResolver, r as renderAttaformState, h as hydrateAttaformState, g as getRegistryFromApp, D as DEVTOOLS_WINDOW_KEY } from '../../shared/attaform-dev.DUZckyV8.mjs';
|
|
3
3
|
|
|
4
4
|
var attaform_default = defineNuxtPlugin({
|
|
5
5
|
// `enforce: 'pre'` makes the "we run before any component's setup" claim
|
|
@@ -11,8 +11,8 @@ var attaform_default = defineNuxtPlugin({
|
|
|
11
11
|
setup(nuxtApp) {
|
|
12
12
|
const isServer = import.meta.server;
|
|
13
13
|
const config = useRuntimeConfig().public;
|
|
14
|
-
const {
|
|
15
|
-
nuxtApp.vueApp.use(createAttaform({ ssr: isServer
|
|
14
|
+
const { version } = config.attaform;
|
|
15
|
+
nuxtApp.vueApp.use(createAttaform({ ssr: isServer }));
|
|
16
16
|
nuxtApp.vueApp.provide(kAttaformWizardActiveStepResolver, (param) => {
|
|
17
17
|
const value = useRoute().query[param];
|
|
18
18
|
if (typeof value === "string") return value;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { A as AttaformError, e as canonicalizePath, a as InvalidUseFormConfigError } from './attaform-dev.
|
|
3
|
-
import { s as slimPrimitivesWalk, d as deriveDefaultWalk, m as mergeDeep, f as fixStructuralDefaults, w as walkPathSegments, c as createAbstractSchema, b as buildFieldMetaPathMap,
|
|
4
|
-
import { c as callConsumerSchemaFn } from './attaform-dev.
|
|
5
|
-
import { z } from 'zod';
|
|
1
|
+
import { j as humanize, c as useAbstractForm } from './attaform-dev.CQ2rJiAX.mjs';
|
|
2
|
+
import { A as AttaformError, e as canonicalizePath, a as InvalidUseFormConfigError } from './attaform-dev.BQc5QV3Y.mjs';
|
|
3
|
+
import { s as slimPrimitivesWalk, d as deriveDefaultWalk, m as mergeDeep, f as fixStructuralDefaults, w as walkPathSegments, c as createAbstractSchema, a as createSharedSchemaStore, b as buildFieldMetaPathMap, e as getFieldMetaListForSchema, g as getFieldMetaForSchema } from './attaform-dev.BisFstxh.mjs';
|
|
4
|
+
import { c as callConsumerSchemaFn } from './attaform-dev.BcYT6tFh.mjs';
|
|
6
5
|
|
|
7
6
|
function readDef(schema) {
|
|
8
7
|
if (schema === null || typeof schema !== "object") return void 0;
|
|
@@ -49,7 +48,9 @@ const IDENTITY_KINDS = /* @__PURE__ */ new Set([
|
|
|
49
48
|
"file",
|
|
50
49
|
"map",
|
|
51
50
|
"symbol",
|
|
52
|
-
"function"
|
|
51
|
+
"function",
|
|
52
|
+
"nonoptional",
|
|
53
|
+
"success"
|
|
53
54
|
]);
|
|
54
55
|
function kindOf(schema) {
|
|
55
56
|
const def = readDef(schema);
|
|
@@ -132,10 +133,6 @@ function unwrapLazy(schema) {
|
|
|
132
133
|
if (typeof getter !== "function") return void 0;
|
|
133
134
|
return callConsumerSchemaFn(() => getter(), void 0, "lazy-getter");
|
|
134
135
|
}
|
|
135
|
-
function getLazyGetter(schema) {
|
|
136
|
-
const def = readDef(schema);
|
|
137
|
-
return typeof def?.getter === "function" ? def.getter : void 0;
|
|
138
|
-
}
|
|
139
136
|
function getIntersectionLeft(schema) {
|
|
140
137
|
const def = readDef(schema);
|
|
141
138
|
return def?.left;
|
|
@@ -171,11 +168,6 @@ function unwrapEffectsSource(_schema) {
|
|
|
171
168
|
function unwrapBranded(_schema) {
|
|
172
169
|
return void 0;
|
|
173
170
|
}
|
|
174
|
-
function hasChecks(schema) {
|
|
175
|
-
const def = readDef(schema);
|
|
176
|
-
const checks = def?.checks;
|
|
177
|
-
return Array.isArray(checks) && checks.length > 0;
|
|
178
|
-
}
|
|
179
171
|
function getChecks(schema) {
|
|
180
172
|
const def = readDef(schema);
|
|
181
173
|
const checks = def?.checks;
|
|
@@ -381,7 +373,6 @@ const V4_INTROSPECTOR = {
|
|
|
381
373
|
return getArrayElement(schema);
|
|
382
374
|
},
|
|
383
375
|
getSetValueType: (schema) => kindOf(schema) === "set" ? getSetValueType(schema) : void 0,
|
|
384
|
-
getRecordKeyType: (schema) => kindOf(schema) === "record" ? getRecordKeyType(schema) : void 0,
|
|
385
376
|
getRecordValueType: (schema) => kindOf(schema) === "record" ? getRecordValueType(schema) : void 0,
|
|
386
377
|
getMapKeyType: (schema) => kindOf(schema) === "map" ? getMapKeyType(schema) : void 0,
|
|
387
378
|
getMapValueType: (schema) => kindOf(schema) === "map" ? getMapValueType(schema) : void 0,
|
|
@@ -396,7 +387,6 @@ const V4_INTROSPECTOR = {
|
|
|
396
387
|
unwrapPipeIn,
|
|
397
388
|
unwrapPipeOut,
|
|
398
389
|
unwrapLazy,
|
|
399
|
-
getLazyGetter,
|
|
400
390
|
getDefaultValue,
|
|
401
391
|
getCatchDefault,
|
|
402
392
|
hasCatchValue
|
|
@@ -407,15 +397,12 @@ function slimPrimitivesOf(schema, maxRecursionDepth) {
|
|
|
407
397
|
}
|
|
408
398
|
|
|
409
399
|
function deriveDefault(schema, useDefault, maxRecursionDepth) {
|
|
410
|
-
return deriveDefaultWalk(schema, useDefault, V4_INTROSPECTOR, maxRecursionDepth
|
|
411
|
-
// v4 has an exhaustive switch against `SchemaIntrospector.kindOf`;
|
|
412
|
-
// unknown kinds genuinely shouldn't appear, so return undefined.
|
|
413
|
-
unsupportedKindFallback: () => void 0
|
|
414
|
-
});
|
|
400
|
+
return deriveDefaultWalk(schema, useDefault, V4_INTROSPECTOR, maxRecursionDepth);
|
|
415
401
|
}
|
|
416
402
|
function getDefaultValuesFromZodSchema(opts) {
|
|
417
403
|
const { schema, useDefaultSchemaValues, constraints, maxRecursionDepth } = opts;
|
|
418
404
|
const initial = deriveDefault(schema, useDefaultSchemaValues, maxRecursionDepth);
|
|
405
|
+
if (constraints === void 0) return { data: initial, success: true };
|
|
419
406
|
const merged = mergeDeep(initial, constraints);
|
|
420
407
|
return fixStructuralDefaults(
|
|
421
408
|
schema,
|
|
@@ -447,137 +434,6 @@ function getNestedZodSchemasAtPath(schema, path, maxRecursionDepth) {
|
|
|
447
434
|
);
|
|
448
435
|
}
|
|
449
436
|
|
|
450
|
-
function carrySyncChecks(rebuilt, original) {
|
|
451
|
-
if (!hasChecks(original)) return rebuilt;
|
|
452
|
-
const checks = getChecks(original).filter((c) => !isAsyncCheck(c));
|
|
453
|
-
if (checks.length === 0) return rebuilt;
|
|
454
|
-
return rebuilt.check(
|
|
455
|
-
...checks
|
|
456
|
-
);
|
|
457
|
-
}
|
|
458
|
-
function stripAsyncChecks(schema) {
|
|
459
|
-
const seen = /* @__PURE__ */ new WeakSet();
|
|
460
|
-
function recurse(s) {
|
|
461
|
-
if (seen.has(s)) return s;
|
|
462
|
-
seen.add(s);
|
|
463
|
-
const kind = kindOf(s);
|
|
464
|
-
switch (kind) {
|
|
465
|
-
case "string":
|
|
466
|
-
return hasChecks(s) ? carrySyncChecks(z.string(), s) : s;
|
|
467
|
-
case "number":
|
|
468
|
-
return hasChecks(s) ? carrySyncChecks(z.number(), s) : s;
|
|
469
|
-
case "bigint":
|
|
470
|
-
return hasChecks(s) ? carrySyncChecks(z.bigint(), s) : s;
|
|
471
|
-
case "array": {
|
|
472
|
-
const element = getArrayElement(s);
|
|
473
|
-
return carrySyncChecks(z.array(recurse(element)), s);
|
|
474
|
-
}
|
|
475
|
-
case "set": {
|
|
476
|
-
return carrySyncChecks(z.set(recurse(getSetValueType(s))), s);
|
|
477
|
-
}
|
|
478
|
-
case "tuple": {
|
|
479
|
-
const items = getTupleItems(s).map(recurse);
|
|
480
|
-
const rebuilt = z.tuple(
|
|
481
|
-
items
|
|
482
|
-
);
|
|
483
|
-
return carrySyncChecks(rebuilt, s);
|
|
484
|
-
}
|
|
485
|
-
case "object": {
|
|
486
|
-
const shape = getObjectShape(s);
|
|
487
|
-
const next = {};
|
|
488
|
-
for (const [k, v] of Object.entries(shape)) {
|
|
489
|
-
next[k] = recurse(v);
|
|
490
|
-
}
|
|
491
|
-
return carrySyncChecks(z.object(next), s);
|
|
492
|
-
}
|
|
493
|
-
case "record": {
|
|
494
|
-
const keyType = getRecordKeyType(s);
|
|
495
|
-
const valueType = recurse(getRecordValueType(s));
|
|
496
|
-
return carrySyncChecks(
|
|
497
|
-
z.record(keyType, valueType),
|
|
498
|
-
s
|
|
499
|
-
);
|
|
500
|
-
}
|
|
501
|
-
case "union": {
|
|
502
|
-
const options = getUnionOptions(s).map(recurse);
|
|
503
|
-
return carrySyncChecks(
|
|
504
|
-
z.union(options),
|
|
505
|
-
s
|
|
506
|
-
);
|
|
507
|
-
}
|
|
508
|
-
case "discriminated-union": {
|
|
509
|
-
const options = getDiscriminatedOptions(s).map((opt) => recurse(opt));
|
|
510
|
-
const discriminator = getDiscriminator(s);
|
|
511
|
-
if (discriminator === void 0) return s;
|
|
512
|
-
return z.discriminatedUnion(
|
|
513
|
-
discriminator,
|
|
514
|
-
options
|
|
515
|
-
);
|
|
516
|
-
}
|
|
517
|
-
case "optional": {
|
|
518
|
-
const inner = unwrapInner(s);
|
|
519
|
-
return inner === void 0 ? s : recurse(inner).optional();
|
|
520
|
-
}
|
|
521
|
-
case "nullable": {
|
|
522
|
-
const inner = unwrapInner(s);
|
|
523
|
-
return inner === void 0 ? s : recurse(inner).nullable();
|
|
524
|
-
}
|
|
525
|
-
case "default": {
|
|
526
|
-
const inner = unwrapInner(s);
|
|
527
|
-
if (inner === void 0) return s;
|
|
528
|
-
return recurse(inner).default(getDefaultValue(s));
|
|
529
|
-
}
|
|
530
|
-
case "readonly": {
|
|
531
|
-
const inner = unwrapInner(s);
|
|
532
|
-
return inner === void 0 ? s : recurse(inner).readonly();
|
|
533
|
-
}
|
|
534
|
-
case "lazy": {
|
|
535
|
-
const inner = unwrapLazy(s);
|
|
536
|
-
if (inner === void 0) return s;
|
|
537
|
-
const stripped = recurse(inner);
|
|
538
|
-
return z.lazy(() => stripped);
|
|
539
|
-
}
|
|
540
|
-
case "intersection": {
|
|
541
|
-
const left = getIntersectionLeft(s);
|
|
542
|
-
const right = getIntersectionRight(s);
|
|
543
|
-
if (left === void 0 || right === void 0) return s;
|
|
544
|
-
return z.intersection(recurse(left), recurse(right));
|
|
545
|
-
}
|
|
546
|
-
case "catch": {
|
|
547
|
-
const inner = unwrapInner(s);
|
|
548
|
-
if (inner === void 0) return s;
|
|
549
|
-
return recurse(inner).catch(getCatchDefault(s));
|
|
550
|
-
}
|
|
551
|
-
// Pipes pass through (see the docblock); the rest are leaves
|
|
552
|
-
// whose checks the strip walker deliberately leaves in place —
|
|
553
|
-
// an async check on one of these still poisons the sync parse
|
|
554
|
-
// and the callers' defensive catch owns that case.
|
|
555
|
-
case "pipe":
|
|
556
|
-
case "boolean":
|
|
557
|
-
case "date":
|
|
558
|
-
case "enum":
|
|
559
|
-
case "literal":
|
|
560
|
-
case "null":
|
|
561
|
-
case "undefined":
|
|
562
|
-
case "any":
|
|
563
|
-
case "unknown":
|
|
564
|
-
case "nan":
|
|
565
|
-
case "void":
|
|
566
|
-
case "never":
|
|
567
|
-
case "promise":
|
|
568
|
-
case "custom":
|
|
569
|
-
case "template-literal":
|
|
570
|
-
case "transform":
|
|
571
|
-
case "file":
|
|
572
|
-
case "map":
|
|
573
|
-
case "symbol":
|
|
574
|
-
case "function":
|
|
575
|
-
return s;
|
|
576
|
-
}
|
|
577
|
-
}
|
|
578
|
-
return recurse(schema);
|
|
579
|
-
}
|
|
580
|
-
|
|
581
437
|
function unwrapStructuralWrappers(schema) {
|
|
582
438
|
let current = schema;
|
|
583
439
|
for (let i = 0; i < 64; i++) {
|
|
@@ -671,21 +527,20 @@ function isLeafRequired(schema, depth = 0) {
|
|
|
671
527
|
function zodV4Adapter(rootSchema) {
|
|
672
528
|
assertZodVersion(rootSchema);
|
|
673
529
|
assertKeyedRoot(rootSchema);
|
|
674
|
-
return (
|
|
530
|
+
return (_formKey, options) => sharedV4Schemas(
|
|
675
531
|
rootSchema,
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
532
|
+
options.maxRecursionDepth,
|
|
533
|
+
() => createAbstractSchema(
|
|
534
|
+
rootSchema,
|
|
535
|
+
V4_INTROSPECTOR,
|
|
536
|
+
buildV4Services(),
|
|
537
|
+
options
|
|
538
|
+
)
|
|
680
539
|
);
|
|
681
540
|
}
|
|
682
|
-
|
|
683
|
-
const { fingerprintZodSchema } = await import('../chunks/fingerprint2.mjs');
|
|
684
|
-
return fingerprintZodSchema(schema);
|
|
685
|
-
}
|
|
541
|
+
const sharedV4Schemas = createSharedSchemaStore();
|
|
686
542
|
function buildV4Services() {
|
|
687
543
|
return {
|
|
688
|
-
fingerprint: (schema) => lazyFingerprint(schema),
|
|
689
544
|
getNestedSchemasAtPath: (schema, path, maxRecursionDepth) => getNestedZodSchemasAtPath(schema, path, maxRecursionDepth),
|
|
690
545
|
// v4 doesn't pre-strip for the slim-mode walk — its path walker
|
|
691
546
|
// already peels every transparent wrapper inline, so the slim and
|
|
@@ -693,7 +548,7 @@ function buildV4Services() {
|
|
|
693
548
|
getNestedSchemasInSlimMode: (schema, path, maxRecursionDepth) => getNestedZodSchemasAtPath(schema, path, maxRecursionDepth),
|
|
694
549
|
slimPrimitivesOf: (schema, maxRecursionDepth) => slimPrimitivesOf(schema, maxRecursionDepth),
|
|
695
550
|
deriveDefault: (schema, useDefault, maxRecursionDepth) => deriveDefault(schema, useDefault, maxRecursionDepth),
|
|
696
|
-
|
|
551
|
+
runGetDefaults: (schema, config, maxRecursionDepth) => runGetDefaultsV4(schema, config, maxRecursionDepth),
|
|
697
552
|
unwrapStructuralWrappers: (schema) => unwrapStructuralWrappers(schema),
|
|
698
553
|
unwrapToDiscriminatedUnion: (schema) => unwrapToDiscriminatedUnion(schema),
|
|
699
554
|
peelAllWrappers: (schema) => peelAllWrappers(schema),
|
|
@@ -708,47 +563,40 @@ function buildV4Services() {
|
|
|
708
563
|
const result = await schema.safeParseAsync(data);
|
|
709
564
|
return result.success ? { success: true, data: result.data } : { success: false, issues: result.error.issues };
|
|
710
565
|
},
|
|
711
|
-
makeSubSchema: (schema,
|
|
566
|
+
makeSubSchema: (schema, maxRecursionDepth) => buildSubSchemaStubV4(schema, maxRecursionDepth)
|
|
712
567
|
};
|
|
713
568
|
}
|
|
714
|
-
function
|
|
569
|
+
function runGetDefaultsV4(rootSchema, config, maxRecursionDepth) {
|
|
715
570
|
const { data } = getDefaultValuesFromZodSchema({
|
|
716
571
|
schema: rootSchema,
|
|
717
572
|
useDefaultSchemaValues: config.useDefaultSchemaValues,
|
|
718
573
|
constraints: config.constraints,
|
|
719
574
|
maxRecursionDepth
|
|
720
575
|
});
|
|
721
|
-
if (
|
|
722
|
-
return { data, errors: void 0, success: true
|
|
723
|
-
}
|
|
724
|
-
if (containsAsyncTransform(rootSchema)) {
|
|
725
|
-
return { data, errors: void 0, success: true, formKey };
|
|
576
|
+
if (containsAsyncTransform(rootSchema) || containsAsyncRefine(rootSchema)) {
|
|
577
|
+
return { data, errors: void 0, success: true };
|
|
726
578
|
}
|
|
727
|
-
const parseTarget = containsAsyncRefine(rootSchema) ? stripAsyncChecks(rootSchema) : rootSchema;
|
|
728
579
|
try {
|
|
729
|
-
const
|
|
730
|
-
if (
|
|
731
|
-
return { data, errors: void 0, success: true
|
|
580
|
+
const parseResult = rootSchema.safeParse(data);
|
|
581
|
+
if (parseResult.success) {
|
|
582
|
+
return { data, errors: void 0, success: true };
|
|
732
583
|
}
|
|
733
584
|
return {
|
|
734
585
|
data,
|
|
735
|
-
errors: zodIssuesToValidationErrors(
|
|
736
|
-
success: false
|
|
737
|
-
formKey
|
|
586
|
+
errors: zodIssuesToValidationErrors(parseResult.error.issues),
|
|
587
|
+
success: false
|
|
738
588
|
};
|
|
739
589
|
} catch {
|
|
740
|
-
return { data, errors: void 0, success: true
|
|
590
|
+
return { data, errors: void 0, success: true };
|
|
741
591
|
}
|
|
742
592
|
}
|
|
743
|
-
function buildSubSchemaStubV4(schema,
|
|
593
|
+
function buildSubSchemaStubV4(schema, maxRecursionDepth) {
|
|
744
594
|
return {
|
|
745
|
-
fingerprint: () => lazyFingerprint(schema),
|
|
746
595
|
needsAsyncValidation: () => containsAsyncRefine(schema),
|
|
747
596
|
getDefaultValues: () => ({
|
|
748
597
|
data: deriveDefault(schema, true, maxRecursionDepth),
|
|
749
598
|
errors: void 0,
|
|
750
|
-
success: true
|
|
751
|
-
formKey
|
|
599
|
+
success: true
|
|
752
600
|
}),
|
|
753
601
|
getSchemasAtPath: () => [],
|
|
754
602
|
validateAtPath: async (data) => {
|
|
@@ -757,15 +605,13 @@ function buildSubSchemaStubV4(schema, formKey, maxRecursionDepth) {
|
|
|
757
605
|
return {
|
|
758
606
|
data: result.data,
|
|
759
607
|
errors: void 0,
|
|
760
|
-
success: true
|
|
761
|
-
formKey
|
|
608
|
+
success: true
|
|
762
609
|
};
|
|
763
610
|
}
|
|
764
611
|
return {
|
|
765
612
|
data: void 0,
|
|
766
613
|
errors: zodIssuesToValidationErrors(result.error.issues),
|
|
767
|
-
success: false
|
|
768
|
-
formKey
|
|
614
|
+
success: false
|
|
769
615
|
};
|
|
770
616
|
}
|
|
771
617
|
};
|
|
@@ -817,4 +663,4 @@ function useForm(configuration) {
|
|
|
817
663
|
});
|
|
818
664
|
}
|
|
819
665
|
|
|
820
|
-
export { assertZodVersion as a,
|
|
666
|
+
export { assertZodVersion as a, kindOf as k, useForm as u, zodV4Adapter as z };
|
|
@@ -40,12 +40,6 @@ function normalizeErrorInputs(input, scope, defaultCode) {
|
|
|
40
40
|
const items = Array.isArray(input) ? input : [input];
|
|
41
41
|
return items.map((item) => normalizeErrorInput(item, scope, defaultCode));
|
|
42
42
|
}
|
|
43
|
-
function* cellEntriesFor(cells, side) {
|
|
44
|
-
for (const [key, cell] of cells) {
|
|
45
|
-
const list = cell[side];
|
|
46
|
-
if (list.length > 0) yield [key, list];
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
43
|
class RegistryNotInstalledError extends AttaformError {
|
|
50
44
|
constructor() {
|
|
51
45
|
super(
|
|
@@ -175,18 +169,6 @@ function pathKeyToDotted(key) {
|
|
|
175
169
|
if (segments === null) return null;
|
|
176
170
|
return segmentsToDotted(segments);
|
|
177
171
|
}
|
|
178
|
-
function coerceToPathKey(input) {
|
|
179
|
-
if (input.length > 0 && input.charCodeAt(0) === 91) {
|
|
180
|
-
try {
|
|
181
|
-
const parsed = JSON.parse(input);
|
|
182
|
-
if (Array.isArray(parsed) && parsed.every((s) => typeof s === "string" || typeof s === "number")) {
|
|
183
|
-
return input;
|
|
184
|
-
}
|
|
185
|
-
} catch {
|
|
186
|
-
}
|
|
187
|
-
}
|
|
188
|
-
return canonicalizePath(input).key;
|
|
189
|
-
}
|
|
190
172
|
const ROOT_PATH = Object.freeze([]);
|
|
191
173
|
const ROOT_PATH_KEY = "[]";
|
|
192
174
|
function isPathPrefix(prefix, path) {
|
|
@@ -204,4 +186,4 @@ function pathsEqual(a, b) {
|
|
|
204
186
|
return true;
|
|
205
187
|
}
|
|
206
188
|
|
|
207
|
-
export { AttaformError as A, InvalidPathError as I, OutsideSetupError as O, ROOT_PATH as R, SubmitErrorHandlerError as S, InvalidUseFormConfigError as a, ROOT_PATH_KEY as b, RegistryNotInstalledError as c, ReservedFormKeyError as d, canonicalizePath as e, pathsEqual as f, pathKeyToDotted as g, SET_MEMBER_SEGMENT as h, isPathPrefix as i,
|
|
189
|
+
export { AttaformError as A, InvalidPathError as I, OutsideSetupError as O, ROOT_PATH as R, SubmitErrorHandlerError as S, InvalidUseFormConfigError as a, ROOT_PATH_KEY as b, RegistryNotInstalledError as c, ReservedFormKeyError as d, canonicalizePath as e, pathsEqual as f, pathKeyToDotted as g, SET_MEMBER_SEGMENT as h, isPathPrefix as i, groupErrorsByKey as j, keyForSegments as k, normalizeErrorInputs as l, mapSegmentKeys as m, normalizeErrorInput as n, parseDottedPath as p, segmentsForPathKey as s, toError as t };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { a as InvalidUseFormConfigError } from './attaform-dev.
|
|
2
|
-
import { u as useForm$2 } from './attaform-dev.
|
|
3
|
-
import { u as useForm$1 } from './attaform-dev.
|
|
4
|
-
import { i as installingFieldMetaStore, g as getFieldMetaForSchema } from './attaform-dev.
|
|
1
|
+
import { a as InvalidUseFormConfigError } from './attaform-dev.BQc5QV3Y.mjs';
|
|
2
|
+
import { u as useForm$2 } from './attaform-dev.DTrHonpc.mjs';
|
|
3
|
+
import { u as useForm$1 } from './attaform-dev.BK6Ge2qR.mjs';
|
|
4
|
+
import { i as installingFieldMetaStore, g as getFieldMetaForSchema } from './attaform-dev.BisFstxh.mjs';
|
|
5
5
|
|
|
6
6
|
function isZodV4SchemaShape(value) {
|
|
7
7
|
if (typeof value !== "object" || value === null) return false;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { m as mapSegmentKeys, f as pathsEqual, i as isPathPrefix } from './attaform-dev.
|
|
1
|
+
import { m as mapSegmentKeys, f as pathsEqual, i as isPathPrefix } from './attaform-dev.BQc5QV3Y.mjs';
|
|
2
2
|
|
|
3
3
|
const DEFAULT_FIELD_VALIDATION_DEBOUNCE_MS = 0;
|
|
4
4
|
const DEFAULT_HISTORY_MAX_SNAPSHOTS = 128;
|
|
@@ -7,13 +7,11 @@ const ANONYMOUS_FORM_KEY_PREFIX = `${RESERVED_KEY_PREFIX}anon:`;
|
|
|
7
7
|
const ANONYMOUS_WIZARD_KEY_PREFIX = `${RESERVED_KEY_PREFIX}anon-wizard:`;
|
|
8
8
|
const DEFAULT_MAX_RECURSION_DEPTH = 64;
|
|
9
9
|
function normalizeNumericOption(config) {
|
|
10
|
-
const { value, source,
|
|
11
|
-
if (
|
|
12
|
-
if (typeof value !== "number" || Number.isNaN(value) || value === Infinity || value === -Infinity) {
|
|
10
|
+
const { value, source, min, defaultValue } = config;
|
|
11
|
+
if (typeof value !== "number" || !Number.isFinite(value)) {
|
|
13
12
|
{
|
|
14
|
-
const acceptedDescription = allowInfinity ? "a non-negative integer or Infinity" : "a non-negative finite integer";
|
|
15
13
|
console.warn(
|
|
16
|
-
`[attaform] ${source} must be
|
|
14
|
+
`[attaform] ${source} must be a non-negative finite integer; got ${String(value)}. Falling back to ${String(defaultValue)}.`
|
|
17
15
|
);
|
|
18
16
|
}
|
|
19
17
|
return defaultValue;
|
|
@@ -94,8 +92,9 @@ function safeAssign(target, key, value) {
|
|
|
94
92
|
}
|
|
95
93
|
target[key] = value;
|
|
96
94
|
}
|
|
95
|
+
const SHADOWED_KEYS = new Set(Object.getOwnPropertyNames(Object.prototype));
|
|
97
96
|
function isShadowedKey(key) {
|
|
98
|
-
return key
|
|
97
|
+
return SHADOWED_KEYS.has(key);
|
|
99
98
|
}
|
|
100
99
|
function safeOwnRead(target, key) {
|
|
101
100
|
if (isShadowedKey(key)) {
|
|
@@ -372,4 +371,4 @@ function structuralSnapshot(value) {
|
|
|
372
371
|
return out;
|
|
373
372
|
}
|
|
374
373
|
|
|
375
|
-
export { ANONYMOUS_FORM_KEY_PREFIX as A, DEFAULT_HISTORY_MAX_SNAPSHOTS as D, RESERVED_KEY_PREFIX as R, safeOwnRead as a, safeAssign as b, callConsumerSchemaFn as c,
|
|
374
|
+
export { ANONYMOUS_FORM_KEY_PREFIX as A, DEFAULT_HISTORY_MAX_SNAPSHOTS as D, RESERVED_KEY_PREFIX as R, safeOwnRead as a, safeAssign as b, callConsumerSchemaFn as c, safeOwnHas as d, consumerHas as e, spreadConsumerRecord as f, copyConsumerArray as g, consumerKeys as h, isShadowedKey as i, readConsumerProp as j, diffAndApply as k, DEFAULT_FIELD_VALIDATION_DEBOUNCE_MS as l, consumerSymbolKeys as m, normalizeNumericOption as n, applyChangedKeys as o, pickDefined as p, DEFAULT_MAX_RECURSION_DEPTH as q, readConsumerIndex as r, structuralSnapshot as s, ANONYMOUS_WIZARD_KEY_PREFIX as t };
|