attaform 0.27.6 → 0.28.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 -4
- package/dist/abstract.mjs +4 -3
- package/dist/chunks/fingerprint.mjs +0 -1
- package/dist/chunks/fingerprint2.mjs +1 -2
- package/dist/dev/abstract.mjs +4 -0
- package/dist/{chunks → dev/chunks}/dev-key-collision-warnings.mjs +0 -1
- package/dist/{chunks → dev/chunks}/devtools.mjs +5 -6
- package/dist/{chunks/fingerprint.cjs → dev/chunks/fingerprint.mjs} +7 -10
- package/dist/{chunks/fingerprint2.cjs → dev/chunks/fingerprint2.mjs} +32 -35
- package/dist/dev/directive.mjs +1 -0
- package/dist/dev/history.mjs +89 -0
- package/dist/dev/index.mjs +5 -0
- package/dist/dev/runtime/plugins/attaform.mjs +40 -0
- package/dist/{shared/attaform.D6tk90Rc.cjs → dev/shared/attaform-dev.6qxD-Yqo.mjs} +187 -43
- package/dist/{shared/attaform.CQN9R62B.cjs → dev/shared/attaform-dev.BJGA_UOS.mjs} +1 -4
- package/dist/{shared/attaform.DYEr28Pt.mjs → dev/shared/attaform-dev.BR8u0YOZ.mjs} +6 -7
- package/dist/dev/shared/attaform-dev.BXE2cr0L.mjs +220 -0
- package/dist/dev/shared/attaform-dev.By4PRjt0.mjs +248 -0
- package/dist/{shared/attaform.B1ZYt2Li.mjs → dev/shared/attaform-dev.D2I8e_Mm.mjs} +132 -568
- package/dist/dev/shared/attaform-dev.Dr2YzS5B.mjs +197 -0
- package/dist/{shared/attaform.nMaz2C5P.mjs → dev/shared/attaform-dev.P7cseiEG.mjs} +178 -397
- package/dist/{shared/attaform.CKH2lGdL.mjs → dev/shared/attaform-dev.WmuhD_CZ.mjs} +3944 -5056
- package/dist/{shared/attaform.DMxM2kol.mjs → dev/shared/attaform-dev.oYrkP9dj.mjs} +160 -508
- package/dist/dev/zod-v3.mjs +17 -0
- package/dist/dev/zod-v4.mjs +16 -0
- package/dist/dev/zod.mjs +5 -0
- package/dist/directive.d.mts +20 -0
- package/dist/directive.mjs +1 -0
- package/dist/esbuild.mjs +0 -1
- package/dist/history.d.mts +59 -0
- package/dist/history.mjs +89 -0
- package/dist/index.d.mts +11 -5
- package/dist/index.mjs +5 -4
- package/dist/nuxt.d.mts +1 -1
- package/dist/nuxt.mjs +5 -2
- package/dist/rollup.mjs +0 -1
- package/dist/rspack.d.mts +6 -1
- package/dist/rspack.mjs +0 -1
- package/dist/runtime/components/AttaformDevtoolsPanel.vue +9 -8
- package/dist/runtime/plugins/attaform.mjs +1 -2
- package/dist/shared/{attaform.Fp3sCrVs.d.ts → attaform.B4VkS43-.d.mts} +2 -2
- package/dist/shared/{attaform.DrvMscNX.cjs → attaform.B8k8JrmK.mjs} +4073 -5630
- package/dist/shared/attaform.BJGA_UOS.mjs +0 -1
- package/dist/shared/{attaform.CoR4mWfv.mjs → attaform.C09fpdLS.mjs} +172 -16
- package/dist/shared/{attaform.D8kliaKw.cjs → attaform.CJP3RkGa.mjs} +141 -590
- package/dist/shared/{attaform.DniawQLP.d.cts → attaform.Cgu-hdSb.d.mts} +268 -68
- package/dist/shared/attaform.Cs2Rbdlo.mjs +0 -1
- package/dist/shared/{attaform.CHlJLAiv.d.mts → attaform.D5V4tZWq.d.mts} +69 -179
- package/dist/shared/{attaform.B9Wyhfro.cjs → attaform.D6DCnnQu.mjs} +11 -16
- package/dist/shared/attaform.DhnPb6nK.mjs +0 -1
- package/dist/shared/attaform.Dq4vWxuG.mjs +197 -0
- package/dist/shared/attaform.JfSWdEcb.d.mts +44 -0
- package/dist/shared/attaform.KvlEedlF.mjs +0 -1
- package/dist/shared/{attaform.DdQN7sgN.cjs → attaform.NLmerepI.mjs} +175 -557
- package/dist/shared/attaform.h0i6LijT.mjs +242 -0
- package/dist/shared/{attaform.Biytrv0-.cjs → attaform.uLbun31C.mjs} +204 -544
- package/dist/shared/attaform.v0fQtWyA.mjs +0 -1
- package/dist/shared/attaform.wfY8XFvm.mjs +197 -0
- package/dist/transforms.mjs +0 -1
- package/dist/vite.d.mts +17 -5
- package/dist/vite.mjs +24 -2
- package/dist/webpack.d.mts +6 -1
- package/dist/webpack.mjs +0 -1
- package/dist/zod-v3.d.mts +11 -6
- package/dist/zod-v3.mjs +17 -4
- package/dist/zod-v4.d.mts +12 -6
- package/dist/zod-v4.mjs +16 -4
- package/dist/zod.d.mts +4 -3
- package/dist/zod.mjs +5 -4
- package/package.json +23 -8
- package/skills/attaform/SKILL.md +2 -1
- package/dist/abstract.cjs +0 -48
- package/dist/abstract.cjs.map +0 -1
- package/dist/abstract.d.cts +0 -42
- package/dist/abstract.d.ts +0 -42
- package/dist/abstract.mjs.map +0 -1
- package/dist/chunks/dev-key-collision-warnings.cjs +0 -25
- package/dist/chunks/dev-key-collision-warnings.cjs.map +0 -1
- package/dist/chunks/dev-key-collision-warnings.mjs.map +0 -1
- package/dist/chunks/devtools.cjs +0 -157
- package/dist/chunks/devtools.cjs.map +0 -1
- package/dist/chunks/devtools.mjs.map +0 -1
- package/dist/chunks/fingerprint.cjs.map +0 -1
- package/dist/chunks/fingerprint.mjs.map +0 -1
- package/dist/chunks/fingerprint2.cjs.map +0 -1
- package/dist/chunks/fingerprint2.mjs.map +0 -1
- package/dist/esbuild.cjs +0 -28
- package/dist/esbuild.cjs.map +0 -1
- package/dist/esbuild.d.cts +0 -56
- package/dist/esbuild.d.ts +0 -56
- package/dist/esbuild.mjs.map +0 -1
- package/dist/index.cjs +0 -51
- package/dist/index.cjs.map +0 -1
- package/dist/index.d.cts +0 -249
- package/dist/index.d.ts +0 -249
- package/dist/index.mjs.map +0 -1
- package/dist/nuxt.cjs +0 -84
- package/dist/nuxt.cjs.map +0 -1
- package/dist/nuxt.d.cts +0 -66
- package/dist/nuxt.d.ts +0 -66
- package/dist/nuxt.mjs.map +0 -1
- package/dist/rollup.cjs +0 -24
- package/dist/rollup.cjs.map +0 -1
- package/dist/rollup.d.cts +0 -35
- package/dist/rollup.d.ts +0 -35
- package/dist/rollup.mjs.map +0 -1
- package/dist/rspack.cjs +0 -10
- package/dist/rspack.cjs.map +0 -1
- package/dist/rspack.d.cts +0 -40
- package/dist/rspack.d.ts +0 -40
- package/dist/rspack.mjs.map +0 -1
- package/dist/runtime/components/AttaformDevtoolsPanel.vue.d.ts +0 -7
- package/dist/runtime/components/DevtoolsValueTree.vue.d.ts +0 -35
- package/dist/runtime/plugins/attaform.cjs +0 -43
- package/dist/runtime/plugins/attaform.cjs.map +0 -1
- package/dist/runtime/plugins/attaform.d.cts +0 -5
- package/dist/runtime/plugins/attaform.d.ts +0 -5
- package/dist/runtime/plugins/attaform.mjs.map +0 -1
- package/dist/shared/attaform.B1ZYt2Li.mjs.map +0 -1
- package/dist/shared/attaform.B9Wyhfro.cjs.map +0 -1
- package/dist/shared/attaform.BGDV42hI.d.cts +0 -232
- package/dist/shared/attaform.BJGA_UOS.mjs.map +0 -1
- package/dist/shared/attaform.Biytrv0-.cjs.map +0 -1
- package/dist/shared/attaform.Bn0IzhD_.cjs +0 -800
- package/dist/shared/attaform.Bn0IzhD_.cjs.map +0 -1
- package/dist/shared/attaform.C9fPTxjB.d.cts +0 -41
- package/dist/shared/attaform.C9fPTxjB.d.ts +0 -41
- package/dist/shared/attaform.CKH2lGdL.mjs.map +0 -1
- package/dist/shared/attaform.CQN9R62B.cjs.map +0 -1
- package/dist/shared/attaform.CoR4mWfv.mjs.map +0 -1
- package/dist/shared/attaform.Cs2Rbdlo.mjs.map +0 -1
- package/dist/shared/attaform.D6tk90Rc.cjs.map +0 -1
- package/dist/shared/attaform.D8kliaKw.cjs.map +0 -1
- package/dist/shared/attaform.DLknk9nF.d.mts +0 -232
- package/dist/shared/attaform.DMxM2kol.mjs.map +0 -1
- package/dist/shared/attaform.DRUT703x.d.cts +0 -56
- package/dist/shared/attaform.DRUT703x.d.ts +0 -56
- package/dist/shared/attaform.DYEr28Pt.mjs.map +0 -1
- package/dist/shared/attaform.DdQN7sgN.cjs.map +0 -1
- package/dist/shared/attaform.DhnPb6nK.mjs.map +0 -1
- package/dist/shared/attaform.DniawQLP.d.mts +0 -4763
- package/dist/shared/attaform.DniawQLP.d.ts +0 -4763
- package/dist/shared/attaform.DoQm_Vkd.cjs +0 -58
- package/dist/shared/attaform.DoQm_Vkd.cjs.map +0 -1
- package/dist/shared/attaform.DrvMscNX.cjs.map +0 -1
- package/dist/shared/attaform.F2Q8iv38.d.ts +0 -2494
- package/dist/shared/attaform.FmqKO1Ex.d.cts +0 -2494
- package/dist/shared/attaform.KvlEedlF.mjs.map +0 -1
- package/dist/shared/attaform.RaTzp1WF.cjs +0 -26
- package/dist/shared/attaform.RaTzp1WF.cjs.map +0 -1
- package/dist/shared/attaform.nMaz2C5P.mjs.map +0 -1
- package/dist/shared/attaform.v0fQtWyA.mjs.map +0 -1
- package/dist/shared/attaform.yUrz7C2z.cjs +0 -29
- package/dist/shared/attaform.yUrz7C2z.cjs.map +0 -1
- package/dist/transforms.cjs +0 -12
- package/dist/transforms.cjs.map +0 -1
- package/dist/transforms.d.cts +0 -73
- package/dist/transforms.d.ts +0 -73
- package/dist/transforms.mjs.map +0 -1
- package/dist/vite.cjs +0 -363
- package/dist/vite.cjs.map +0 -1
- package/dist/vite.d.cts +0 -133
- package/dist/vite.d.ts +0 -133
- package/dist/vite.mjs.map +0 -1
- package/dist/webpack.cjs +0 -10
- package/dist/webpack.cjs.map +0 -1
- package/dist/webpack.d.cts +0 -37
- package/dist/webpack.d.ts +0 -37
- package/dist/webpack.mjs.map +0 -1
- package/dist/zod-v3.cjs +0 -53
- package/dist/zod-v3.cjs.map +0 -1
- package/dist/zod-v3.d.cts +0 -246
- package/dist/zod-v3.d.ts +0 -246
- package/dist/zod-v3.mjs.map +0 -1
- package/dist/zod-v4.cjs +0 -55
- package/dist/zod-v4.cjs.map +0 -1
- package/dist/zod-v4.d.cts +0 -172
- package/dist/zod-v4.d.ts +0 -172
- package/dist/zod-v4.mjs.map +0 -1
- package/dist/zod.cjs +0 -51
- package/dist/zod.cjs.map +0 -1
- package/dist/zod.d.cts +0 -7
- package/dist/zod.d.ts +0 -7
- package/dist/zod.mjs.map +0 -1
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
import { f as pathsEqual, i as isPathPrefix } from './attaform.wfY8XFvm.mjs';
|
|
2
|
+
|
|
3
|
+
const DEFAULT_FIELD_VALIDATION_DEBOUNCE_MS = 0;
|
|
4
|
+
const DEFAULT_HISTORY_MAX_SNAPSHOTS = 128;
|
|
5
|
+
const RESERVED_KEY_PREFIX = "__atta:";
|
|
6
|
+
const ANONYMOUS_FORM_KEY_PREFIX = `${RESERVED_KEY_PREFIX}anon:`;
|
|
7
|
+
const ANONYMOUS_WIZARD_KEY_PREFIX = `${RESERVED_KEY_PREFIX}anon-wizard:`;
|
|
8
|
+
const DEFAULT_MAX_RECURSION_DEPTH = 64;
|
|
9
|
+
function normalizeNumericOption(config) {
|
|
10
|
+
const { value, source, allowInfinity, min, defaultValue } = config;
|
|
11
|
+
if (allowInfinity && value === Infinity) return Infinity;
|
|
12
|
+
if (typeof value !== "number" || Number.isNaN(value) || value === Infinity || value === -Infinity) {
|
|
13
|
+
return defaultValue;
|
|
14
|
+
}
|
|
15
|
+
return Math.max(min, Math.floor(value));
|
|
16
|
+
}
|
|
17
|
+
function pickDefined(bag) {
|
|
18
|
+
const out = {};
|
|
19
|
+
for (const key of Object.keys(bag)) {
|
|
20
|
+
if (bag[key] !== void 0) out[key] = bag[key];
|
|
21
|
+
}
|
|
22
|
+
return out;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
function safeAssign(target, key, value) {
|
|
26
|
+
if (key === "__proto__") {
|
|
27
|
+
Object.defineProperty(target, key, {
|
|
28
|
+
value,
|
|
29
|
+
writable: true,
|
|
30
|
+
enumerable: true,
|
|
31
|
+
configurable: true
|
|
32
|
+
});
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
target[key] = value;
|
|
36
|
+
}
|
|
37
|
+
function isShadowedKey(key) {
|
|
38
|
+
return key in Object.prototype;
|
|
39
|
+
}
|
|
40
|
+
function safeOwnRead(target, key) {
|
|
41
|
+
if (isShadowedKey(key)) {
|
|
42
|
+
const desc = Object.getOwnPropertyDescriptor(target, key);
|
|
43
|
+
if (desc === void 0) return void 0;
|
|
44
|
+
return "value" in desc ? desc.value : target[key];
|
|
45
|
+
}
|
|
46
|
+
return target[key];
|
|
47
|
+
}
|
|
48
|
+
function safeOwnHas(target, key) {
|
|
49
|
+
return Object.prototype.hasOwnProperty.call(target, key);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
function isDescendable(value) {
|
|
53
|
+
if (value === null || typeof value !== "object") return false;
|
|
54
|
+
if (Array.isArray(value)) return true;
|
|
55
|
+
const proto = Object.getPrototypeOf(value);
|
|
56
|
+
return proto === null || proto === Object.prototype;
|
|
57
|
+
}
|
|
58
|
+
function appendSegment(prefix, segment) {
|
|
59
|
+
const next = new Array(prefix.length + 1);
|
|
60
|
+
for (let i = 0; i < prefix.length; i++) {
|
|
61
|
+
const s = prefix[i];
|
|
62
|
+
next[i] = s;
|
|
63
|
+
}
|
|
64
|
+
next[prefix.length] = segment;
|
|
65
|
+
return next;
|
|
66
|
+
}
|
|
67
|
+
function diffAndApply(oldValue, newValue, prefix, visit) {
|
|
68
|
+
if (Object.is(oldValue, newValue)) return;
|
|
69
|
+
const oldIsDescendable = isDescendable(oldValue);
|
|
70
|
+
const newIsDescendable = isDescendable(newValue);
|
|
71
|
+
if (oldValue === void 0 && newIsDescendable) {
|
|
72
|
+
walkNewDescendable(newValue, prefix, visit);
|
|
73
|
+
return;
|
|
74
|
+
}
|
|
75
|
+
if (oldIsDescendable && newValue === void 0) {
|
|
76
|
+
walkOldDescendable(oldValue, prefix, visit);
|
|
77
|
+
return;
|
|
78
|
+
}
|
|
79
|
+
if (oldIsDescendable && newIsDescendable) {
|
|
80
|
+
const oldIsArray = Array.isArray(oldValue);
|
|
81
|
+
const newIsArray = Array.isArray(newValue);
|
|
82
|
+
if (oldIsArray && newIsArray) {
|
|
83
|
+
diffArraysLockstep(oldValue, newValue, prefix, visit);
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
86
|
+
if (!oldIsArray && !newIsArray) {
|
|
87
|
+
diffObjectsLockstep(
|
|
88
|
+
oldValue,
|
|
89
|
+
newValue,
|
|
90
|
+
prefix,
|
|
91
|
+
visit
|
|
92
|
+
);
|
|
93
|
+
return;
|
|
94
|
+
}
|
|
95
|
+
visit({ kind: "changed", path: prefix, oldValue, newValue });
|
|
96
|
+
return;
|
|
97
|
+
}
|
|
98
|
+
if (oldIsDescendable && !newIsDescendable) {
|
|
99
|
+
visit({ kind: "changed", path: prefix, oldValue, newValue });
|
|
100
|
+
return;
|
|
101
|
+
}
|
|
102
|
+
if (!oldIsDescendable && newIsDescendable) {
|
|
103
|
+
visit({ kind: "changed", path: prefix, oldValue, newValue });
|
|
104
|
+
return;
|
|
105
|
+
}
|
|
106
|
+
if (oldValue === void 0) {
|
|
107
|
+
visit({ kind: "added", path: prefix, newValue });
|
|
108
|
+
return;
|
|
109
|
+
}
|
|
110
|
+
if (newValue === void 0) {
|
|
111
|
+
visit({ kind: "removed", path: prefix, oldValue });
|
|
112
|
+
return;
|
|
113
|
+
}
|
|
114
|
+
visit({ kind: "changed", path: prefix, oldValue, newValue });
|
|
115
|
+
}
|
|
116
|
+
function walkNewDescendable(newValue, prefix, visit) {
|
|
117
|
+
if (Array.isArray(newValue)) {
|
|
118
|
+
for (let i = 0; i < newValue.length; i++) {
|
|
119
|
+
diffAndApply(void 0, newValue[i], appendSegment(prefix, i), visit);
|
|
120
|
+
}
|
|
121
|
+
} else {
|
|
122
|
+
const rec = newValue;
|
|
123
|
+
for (const k of Object.keys(rec)) {
|
|
124
|
+
diffAndApply(void 0, rec[k], appendSegment(prefix, k), visit);
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
function walkOldDescendable(oldValue, prefix, visit) {
|
|
129
|
+
if (Array.isArray(oldValue)) {
|
|
130
|
+
for (let i = 0; i < oldValue.length; i++) {
|
|
131
|
+
diffAndApply(oldValue[i], void 0, appendSegment(prefix, i), visit);
|
|
132
|
+
}
|
|
133
|
+
} else {
|
|
134
|
+
const rec = oldValue;
|
|
135
|
+
for (const k of Object.keys(rec)) {
|
|
136
|
+
diffAndApply(rec[k], void 0, appendSegment(prefix, k), visit);
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
function diffArraysLockstep(oldArr, newArr, prefix, visit) {
|
|
141
|
+
const max = Math.max(oldArr.length, newArr.length);
|
|
142
|
+
for (let i = 0; i < max; i++) {
|
|
143
|
+
diffAndApply(oldArr[i], newArr[i], appendSegment(prefix, i), visit);
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
function diffObjectsLockstep(oldRec, newRec, prefix, visit) {
|
|
147
|
+
const seen = /* @__PURE__ */ new Set();
|
|
148
|
+
for (const k of Object.keys(oldRec)) {
|
|
149
|
+
seen.add(k);
|
|
150
|
+
diffAndApply(oldRec[k], newRec[k], appendSegment(prefix, k), visit);
|
|
151
|
+
}
|
|
152
|
+
for (const k of Object.keys(newRec)) {
|
|
153
|
+
if (seen.has(k)) continue;
|
|
154
|
+
diffAndApply(oldRec[k], newRec[k], appendSegment(prefix, k), visit);
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
function applyChangedKeys(target, source, arrayOpPath, currentPath, patches) {
|
|
158
|
+
if (!isDescendable(target) || !isDescendable(source)) return false;
|
|
159
|
+
const targetIsArray = Array.isArray(target);
|
|
160
|
+
const sourceIsArray = Array.isArray(source);
|
|
161
|
+
if (targetIsArray !== sourceIsArray) return false;
|
|
162
|
+
const depth = currentPath.length;
|
|
163
|
+
const changedFirstSegments = /* @__PURE__ */ new Set();
|
|
164
|
+
for (const patch of patches) {
|
|
165
|
+
if (patch.path.length === depth) return false;
|
|
166
|
+
changedFirstSegments.add(patch.path[depth]);
|
|
167
|
+
}
|
|
168
|
+
if (targetIsArray) {
|
|
169
|
+
const t = target;
|
|
170
|
+
const s = source;
|
|
171
|
+
if (arrayOpPath === null || pathsEqual(currentPath, arrayOpPath)) {
|
|
172
|
+
if (t.length > s.length) t.length = s.length;
|
|
173
|
+
for (const idx of changedFirstSegments) {
|
|
174
|
+
const i = typeof idx === "number" ? idx : Number(idx);
|
|
175
|
+
if (i >= s.length) continue;
|
|
176
|
+
t[i] = s[i];
|
|
177
|
+
}
|
|
178
|
+
} else {
|
|
179
|
+
for (const idx of changedFirstSegments) {
|
|
180
|
+
const i = typeof idx === "number" ? idx : Number(idx);
|
|
181
|
+
if (i >= s.length) continue;
|
|
182
|
+
const childPath = appendSegment(currentPath, i);
|
|
183
|
+
const curEl = t[i];
|
|
184
|
+
const nextEl = s[i];
|
|
185
|
+
if (isPathPrefix(childPath, arrayOpPath) && isDescendable(curEl) && isDescendable(nextEl) && applyChangedKeys(
|
|
186
|
+
curEl,
|
|
187
|
+
nextEl,
|
|
188
|
+
arrayOpPath,
|
|
189
|
+
childPath,
|
|
190
|
+
patches.filter((p) => isPathPrefix(childPath, p.path))
|
|
191
|
+
)) {
|
|
192
|
+
continue;
|
|
193
|
+
}
|
|
194
|
+
t[i] = nextEl;
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
} else {
|
|
198
|
+
const t = target;
|
|
199
|
+
const s = source;
|
|
200
|
+
const sourceKeys = new Set(Object.keys(s));
|
|
201
|
+
for (const k of Object.keys(t)) {
|
|
202
|
+
if (!sourceKeys.has(k)) delete t[k];
|
|
203
|
+
}
|
|
204
|
+
for (const k of changedFirstSegments) {
|
|
205
|
+
const key = String(k);
|
|
206
|
+
const nextVal = safeOwnRead(s, key);
|
|
207
|
+
if (arrayOpPath !== null) {
|
|
208
|
+
const curVal = safeOwnRead(t, key);
|
|
209
|
+
const childPath = appendSegment(currentPath, key);
|
|
210
|
+
if (isDescendable(curVal) && isDescendable(nextVal) && applyChangedKeys(
|
|
211
|
+
curVal,
|
|
212
|
+
nextVal,
|
|
213
|
+
arrayOpPath,
|
|
214
|
+
childPath,
|
|
215
|
+
patches.filter((p) => isPathPrefix(childPath, p.path))
|
|
216
|
+
)) {
|
|
217
|
+
continue;
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
safeAssign(t, key, nextVal);
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
return true;
|
|
224
|
+
}
|
|
225
|
+
function structuralSnapshot(value) {
|
|
226
|
+
if (!isDescendable(value)) return value;
|
|
227
|
+
if (Array.isArray(value)) {
|
|
228
|
+
const out2 = new Array(value.length);
|
|
229
|
+
for (let i = 0; i < value.length; i++) {
|
|
230
|
+
out2[i] = structuralSnapshot(value[i]);
|
|
231
|
+
}
|
|
232
|
+
return out2;
|
|
233
|
+
}
|
|
234
|
+
const src = value;
|
|
235
|
+
const out = {};
|
|
236
|
+
for (const k of Object.keys(src)) {
|
|
237
|
+
safeAssign(out, k, structuralSnapshot(safeOwnRead(src, k)));
|
|
238
|
+
}
|
|
239
|
+
return out;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
export { ANONYMOUS_FORM_KEY_PREFIX as A, DEFAULT_HISTORY_MAX_SNAPSHOTS as D, RESERVED_KEY_PREFIX as R, safeOwnRead as a, safeAssign as b, safeOwnHas as c, diffAndApply as d, DEFAULT_FIELD_VALIDATION_DEBOUNCE_MS as e, applyChangedKeys as f, DEFAULT_MAX_RECURSION_DEPTH as g, ANONYMOUS_WIZARD_KEY_PREFIX as h, isShadowedKey as i, normalizeNumericOption as n, pickDefined as p, structuralSnapshot as s };
|