@solidjs/signals 2.0.0-rc.7 → 2.0.0-rc.9
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/dev-shared.js +6357 -0
- package/dist/dev.attribution.js +2485 -0
- package/dist/dev.js +2851 -7027
- package/dist/observe/affects.js +129 -0
- package/dist/observe/attribution.js +7 -0
- package/dist/observe/boundaries.js +641 -0
- package/dist/observe/core/action.js +177 -0
- package/dist/observe/core/async.js +846 -0
- package/dist/observe/core/attribution-costs.js +66 -0
- package/dist/observe/core/attribution-feedback.js +282 -0
- package/dist/observe/core/attribution-hooks.js +82 -0
- package/dist/observe/core/attribution-queries.js +28 -0
- package/dist/observe/core/attribution.js +2095 -0
- package/dist/observe/core/constants.js +248 -0
- package/dist/{types-cjs/core/context.d.cts → observe/core/context.js} +37 -12
- package/dist/observe/core/core.js +1789 -0
- package/dist/observe/core/dev.js +293 -0
- package/dist/observe/core/effect.js +195 -0
- package/dist/observe/core/error-hooks.js +71 -0
- package/dist/observe/core/error.js +80 -0
- package/dist/observe/core/external.js +98 -0
- package/dist/observe/core/graph.js +155 -0
- package/dist/observe/core/heap.js +147 -0
- package/dist/observe/core/invariants.js +45 -0
- package/dist/observe/core/lanes.js +205 -0
- package/dist/observe/core/optimistic.js +585 -0
- package/dist/observe/core/owner.js +322 -0
- package/dist/observe/core/scheduler.js +1428 -0
- package/dist/observe/core/verdict.js +669 -0
- package/dist/observe/index.js +59 -0
- package/dist/observe/map.js +484 -0
- package/dist/{types-cjs/signals.d.cts → observe/signals.js} +311 -317
- package/dist/observe/store/index.js +40 -0
- package/dist/observe/store/next/optimistic.js +660 -0
- package/dist/observe/store/next/projection.js +255 -0
- package/dist/observe/store/next/reconcile.js +375 -0
- package/dist/observe/store/next/store.js +2327 -0
- package/dist/observe/store/next/target.js +51 -0
- package/dist/observe/store/store.js +325 -0
- package/dist/observe/store/storePath.js +103 -0
- package/dist/observe/store/utils.js +1023 -0
- package/dist/prod/attribution.js +41 -0
- package/dist/prod/boundaries.js +128 -76
- package/dist/prod/core/action.js +65 -37
- package/dist/prod/core/async.js +324 -172
- package/dist/prod/core/constants.js +57 -1
- package/dist/prod/core/context.js +3 -3
- package/dist/prod/core/core.js +1003 -364
- package/dist/prod/core/dev.js +17 -1
- package/dist/prod/core/effect.js +76 -42
- package/dist/prod/core/error-hooks.js +71 -0
- package/dist/prod/core/external.js +4 -4
- package/dist/prod/core/graph.js +37 -37
- package/dist/prod/core/heap.js +61 -56
- package/dist/prod/core/lanes.js +107 -63
- package/dist/prod/core/optimistic.js +374 -93
- package/dist/prod/core/owner.js +62 -46
- package/dist/prod/core/scheduler.js +653 -286
- package/dist/prod/core/verdict.js +245 -127
- package/dist/prod/index.js +15 -5
- package/dist/prod/map.js +292 -141
- package/dist/prod/signals.js +29 -16
- package/dist/prod/store/next/optimistic.js +77 -55
- package/dist/prod/store/next/projection.js +31 -20
- package/dist/prod/store/next/reconcile.js +87 -84
- package/dist/prod/store/next/store.js +718 -401
- package/dist/prod/store/next/target.js +32 -10
- package/dist/prod/store/store.js +12 -14
- package/dist/prod/store/utils.js +950 -130
- package/dist/types/attribution.d.ts +20 -0
- package/dist/types/attribution.prod.d.ts +22 -0
- package/dist/types/boundaries.d.ts +10 -1
- package/dist/types/core/action.d.ts +12 -5
- package/dist/types/core/async.d.ts +1 -1
- package/dist/types/core/attribution-costs.d.ts +35 -0
- package/dist/types/core/attribution-feedback.d.ts +133 -0
- package/dist/types/core/attribution-hooks.d.ts +147 -9
- package/dist/types/core/attribution-queries.d.ts +10 -0
- package/dist/types/core/attribution.d.ts +216 -182
- package/dist/types/core/constants.d.ts +56 -0
- package/dist/types/core/core.d.ts +190 -2
- package/dist/types/core/dev.d.ts +246 -28
- package/dist/types/core/effect.d.ts +8 -1
- package/dist/types/core/error-hooks.d.ts +71 -0
- package/dist/types/core/index.d.ts +4 -1
- package/dist/types/core/invariants.d.ts +4 -0
- package/dist/types/core/lanes.d.ts +39 -5
- package/dist/types/core/scheduler.d.ts +153 -0
- package/dist/types/core/types.d.ts +32 -9
- package/dist/types/index.d.ts +10 -3
- package/dist/types/map.d.ts +2 -0
- package/dist/types/signals.d.ts +8 -0
- package/dist/types/store/index.d.ts +2 -0
- package/dist/types/store/next/optimistic.d.ts +1 -1
- package/dist/types/store/next/store.d.ts +11 -5
- package/dist/types/store/next/target.d.ts +37 -10
- package/dist/types/store/utils.d.ts +178 -0
- package/package.json +21 -17
- package/dist/node.cjs +0 -10541
- package/dist/node.dev.cjs +0 -13724
- package/dist/types-cjs/affects.d.cts +0 -47
- package/dist/types-cjs/boundaries.d.cts +0 -175
- package/dist/types-cjs/core/action.d.cts +0 -64
- package/dist/types-cjs/core/async.d.cts +0 -23
- package/dist/types-cjs/core/attribution-hooks.d.cts +0 -127
- package/dist/types-cjs/core/attribution.d.cts +0 -495
- package/dist/types-cjs/core/constants.d.cts +0 -159
- package/dist/types-cjs/core/core.d.cts +0 -185
- package/dist/types-cjs/core/dev.d.cts +0 -136
- package/dist/types-cjs/core/effect.d.cts +0 -30
- package/dist/types-cjs/core/error.d.cts +0 -56
- package/dist/types-cjs/core/external.d.cts +0 -15
- package/dist/types-cjs/core/graph.d.cts +0 -28
- package/dist/types-cjs/core/heap.d.cts +0 -24
- package/dist/types-cjs/core/index.d.cts +0 -13
- package/dist/types-cjs/core/invariants.d.cts +0 -59
- package/dist/types-cjs/core/lanes.d.cts +0 -54
- package/dist/types-cjs/core/optimistic.d.cts +0 -6
- package/dist/types-cjs/core/owner.d.cts +0 -124
- package/dist/types-cjs/core/scheduler.d.cts +0 -236
- package/dist/types-cjs/core/types.d.cts +0 -204
- package/dist/types-cjs/core/verdict.d.cts +0 -2
- package/dist/types-cjs/index.d.cts +0 -10
- package/dist/types-cjs/map.d.cts +0 -69
- package/dist/types-cjs/package.json +0 -3
- package/dist/types-cjs/store/index.d.cts +0 -18
- package/dist/types-cjs/store/next/optimistic.d.cts +0 -25
- package/dist/types-cjs/store/next/projection.d.cts +0 -8
- package/dist/types-cjs/store/next/reconcile.d.cts +0 -10
- package/dist/types-cjs/store/next/store.d.cts +0 -121
- package/dist/types-cjs/store/next/target.d.cts +0 -166
- package/dist/types-cjs/store/store.d.cts +0 -143
- package/dist/types-cjs/store/storePath.d.cts +0 -58
- package/dist/types-cjs/store/utils.d.cts +0 -74
|
@@ -12,7 +12,7 @@ import { $TARGET, markRawIngest, isWrappable, rawValuesUsed, isRawValue, getWrit
|
|
|
12
12
|
|
|
13
13
|
import { materializePB, adoptPB, unwrapValue, notifyFold, targetsEqual, bumpDeep, notifyKeyValue, notifyKeyDiff, notifyFoldTail, hasAccessorFlag } from "./store.js";
|
|
14
14
|
|
|
15
|
-
import { storeNextLookup, optHooks,
|
|
15
|
+
import { isOwned, $OWNER, storeNextLookup, optHooks, lookupTarget } from "./target.js";
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
18
|
* Store rewrite — reconcile, the adoption channel (INTERNALS-STORE-STATE.md
|
|
@@ -41,7 +41,7 @@ import { storeNextLookup, optHooks, ownedRaw } from "./target.js";
|
|
|
41
41
|
// overlay (#3044) materializes to the clone path first (edge: reconcile
|
|
42
42
|
// inside a setter that already wrote this target).
|
|
43
43
|
if (f.ovl) materializePB(f);
|
|
44
|
-
let
|
|
44
|
+
let i = n === null ? null : typeof n === "string" ? e => e?.[n] : n;
|
|
45
45
|
// §7b chained backing: a projection derive returning a LIVE store proxy
|
|
46
46
|
// adopts the proxy itself as the backing — reads flow through the inner
|
|
47
47
|
// store's traps, so consumers subscribe to the inner graph and updates
|
|
@@ -54,8 +54,8 @@ import { storeNextLookup, optHooks, ownedRaw } from "./target.js";
|
|
|
54
54
|
adoptPB(f, e);
|
|
55
55
|
return;
|
|
56
56
|
}
|
|
57
|
-
const
|
|
58
|
-
if (
|
|
57
|
+
const l = unwrapValue(e);
|
|
58
|
+
if (i) {
|
|
59
59
|
// Root identity precondition — checked before ANY mutation, so a throwing
|
|
60
60
|
// reconcile is atomic by construction (RUL-12 ruling). Projections
|
|
61
61
|
// (replace=true) relax it: a root entity change merges in place — the
|
|
@@ -63,16 +63,18 @@ import { storeNextLookup, optHooks, ownedRaw } from "./target.js";
|
|
|
63
63
|
// key-matched across the entity change (proj R7: keyFn drops to
|
|
64
64
|
// positional so old-entity subtrees never merge into the new entity's).
|
|
65
65
|
const e = f.pb ?? f.v;
|
|
66
|
-
const t =
|
|
67
|
-
if (t !== undefined && !sameKey(l
|
|
66
|
+
const t = i(e);
|
|
67
|
+
if (t !== undefined && !sameKey(i(l), t)) {
|
|
68
68
|
if (!o) throw new Error("");
|
|
69
69
|
// Entity change: wholesale swap. The root proxy is stable for life
|
|
70
70
|
// (proj R5) but NOTHING below survives — children are never matched
|
|
71
71
|
// across an entity change even when their own keys align (proj R7).
|
|
72
72
|
// Displaced-raw unregistration (proj R10): the outgoing raw stops
|
|
73
73
|
// resolving to this proxy; re-handed later it wraps fresh.
|
|
74
|
-
|
|
75
|
-
|
|
74
|
+
const e = f.pb ?? f.v;
|
|
75
|
+
if (isOwned(e)) delete e[$OWNER]; // disown: wraps fresh if re-handed
|
|
76
|
+
else (f.fam?.map ?? storeNextLookup).delete(e);
|
|
77
|
+
adoptPB(f, l);
|
|
76
78
|
return;
|
|
77
79
|
}
|
|
78
80
|
}
|
|
@@ -82,93 +84,93 @@ import { storeNextLookup, optHooks, ownedRaw } from "./target.js";
|
|
|
82
84
|
// touched. Key-matched rows keep proxy identity by descending into the
|
|
83
85
|
// existing child targets instead of overriding their parent slots.
|
|
84
86
|
if (f.fam?.opt === true && !projectionWriteActive && !getWriteOverride()) {
|
|
85
|
-
optHooks.applyTentative(f,
|
|
87
|
+
optHooks.applyTentative(f, l, i);
|
|
86
88
|
return;
|
|
87
89
|
}
|
|
88
|
-
applyAdopt(f,
|
|
90
|
+
applyAdopt(f, l, i, o);
|
|
89
91
|
}
|
|
90
92
|
|
|
91
93
|
function applyAdopt(e, t, n, o = false) {
|
|
92
94
|
const f = e.pb ?? e.v;
|
|
93
95
|
// The sound identity skip (O7): same reference AND we never diverged it.
|
|
94
|
-
if (t === f && !
|
|
95
|
-
const
|
|
96
|
+
if (t === f && !isOwned(f)) return;
|
|
97
|
+
const i = e.fam;
|
|
96
98
|
// §6b (R28): the diff's previous-arrangement baseline is the LANE VIEW —
|
|
97
99
|
// optimistic rows must be visible to key matching so a landing carrying the
|
|
98
100
|
// same key recycles their proxies. Raw `prev` keeps the identity/ownership
|
|
99
101
|
// roles above; only matching reads the view.
|
|
100
|
-
const
|
|
102
|
+
const l = i?.opt === true ? optHooks.optimisticView(e, f) : f;
|
|
101
103
|
const r = Array.isArray(t);
|
|
102
104
|
// Plain stores notify inline AFTER the descent (child registrations feed
|
|
103
105
|
// the fold diff's identity-preservation check); projections keep deferred
|
|
104
106
|
// folds (downstream holds can form later in the flush).
|
|
105
|
-
const
|
|
106
|
-
const
|
|
107
|
+
const s = i === null;
|
|
108
|
+
const u = e.s === true;
|
|
107
109
|
// Node-notify base is the view the nodes were last told (#3296): a draft
|
|
108
110
|
// preceding this reconcile already moved them to its pending backing at
|
|
109
111
|
// setter exit (prev, materialized above), so diffing incoming against the
|
|
110
112
|
// committed backing would skip a key the draft changed and the reconcile
|
|
111
113
|
// restores — the node would commit the superseded draft value.
|
|
112
114
|
const a = f;
|
|
113
|
-
adoptPB(e, t,
|
|
115
|
+
adoptPB(e, t, s);
|
|
114
116
|
// Shallow adoption: records are slot values — sticky raw-mark the incoming
|
|
115
117
|
// set (R41) and never descend; slot notification is the positional diff.
|
|
116
|
-
if (
|
|
117
|
-
if (Array.isArray(
|
|
118
|
-
if (
|
|
118
|
+
if (u) markRawIngest(t);
|
|
119
|
+
if (Array.isArray(l) !== r) {
|
|
120
|
+
if (s) notifyFold(e, a, t);
|
|
119
121
|
return;
|
|
120
122
|
}
|
|
121
123
|
if (r) {
|
|
122
|
-
const f =
|
|
124
|
+
const f = l;
|
|
123
125
|
const r = t;
|
|
124
126
|
// Fused array walk (eager mode): per-index notification rides the same
|
|
125
127
|
// loop as the descent (descend first — targetsEqual needs the child's
|
|
126
128
|
// re-registration, R9). Length, trailing removed indexes, and any other
|
|
127
129
|
// unvisited node keys land in the counted sweep below.
|
|
128
|
-
const c =
|
|
129
|
-
let
|
|
130
|
-
if (n && !
|
|
130
|
+
const c = s ? e.n : null;
|
|
131
|
+
let d = 0;
|
|
132
|
+
if (n && !u) {
|
|
131
133
|
// Positional-prefix fast path (legacy keyedMatch-walk parity): while
|
|
132
134
|
// rows key-match in place — the steady-state polling shape — descend
|
|
133
135
|
// directly with zero staging. The prevByKey map is built only for the
|
|
134
136
|
// misaligned remainder, and never at all on aligned ticks.
|
|
135
|
-
const
|
|
136
|
-
const
|
|
137
|
-
let
|
|
138
|
-
let
|
|
139
|
-
for (const y = Math.min(
|
|
140
|
-
const
|
|
141
|
-
const
|
|
137
|
+
const l = f.length;
|
|
138
|
+
const s = r.length;
|
|
139
|
+
let u = false;
|
|
140
|
+
let p = 0;
|
|
141
|
+
for (const y = Math.min(l, s); p < y; p++) {
|
|
142
|
+
const l = r[p];
|
|
143
|
+
const s = f[p];
|
|
142
144
|
// Routing heuristic only (aligned vs keyed remainder) — both routes
|
|
143
145
|
// notify identically and descend() is the one authoritative
|
|
144
146
|
// validator, so bare typeof gates suffice here; full isWrappable
|
|
145
147
|
// per row was the walk's dominant residual cost.
|
|
146
|
-
if (
|
|
148
|
+
if (s !== l && !(s !== null && typeof s === "object" && l !== null && typeof l === "object" && sameKey(n(s), n(l)))) break;
|
|
147
149
|
// misaligned: fall to the keyed remainder below
|
|
148
150
|
// Identity skip inline (FINDING-1 guard), then descend the pair.
|
|
149
|
-
if ((
|
|
150
|
-
if (e.dk !== null && !
|
|
151
|
+
if ((s !== l || l !== null && typeof l === "object" && isOwned(l)) && l !== null && typeof l === "object") descend(unwrapValue(s), l, n, i, o);
|
|
152
|
+
if (e.dk !== null && !u && !(l !== null && typeof l === "object" ? targetsEqual(s, l) : isEqual(s, l))) {
|
|
151
153
|
bumpDeep(e);
|
|
152
|
-
|
|
154
|
+
u = true;
|
|
153
155
|
}
|
|
154
156
|
if (c !== null) {
|
|
155
|
-
const e = c[
|
|
157
|
+
const e = c[p];
|
|
156
158
|
if (e !== undefined) {
|
|
157
|
-
|
|
158
|
-
notifyKeyValue(e,
|
|
159
|
+
d++;
|
|
160
|
+
notifyKeyValue(e, p, a[p], l, a, t);
|
|
159
161
|
}
|
|
160
162
|
}
|
|
161
163
|
}
|
|
162
|
-
if (e.dk !== null && !
|
|
163
|
-
const y =
|
|
164
|
+
if (e.dk !== null && !u && p < r.length) bumpDeep(e);
|
|
165
|
+
const y = p;
|
|
164
166
|
// misalignment point (== nlen on aligned ticks)
|
|
165
167
|
let w = null;
|
|
166
|
-
for (;
|
|
167
|
-
const e = r[
|
|
168
|
+
for (;p < r.length; p++) {
|
|
169
|
+
const e = r[p];
|
|
168
170
|
// typeof gates route; descend validates (same contract as the prefix).
|
|
169
171
|
if (e !== null && typeof e === "object") {
|
|
170
172
|
const t = n(e);
|
|
171
|
-
let
|
|
173
|
+
let l;
|
|
172
174
|
if (t !== undefined) {
|
|
173
175
|
if (w === null) {
|
|
174
176
|
// Occurrence-aware (re-audit 2, P1-5): duplicate keys queue
|
|
@@ -194,49 +196,49 @@ function applyAdopt(e, t, n, o = false) {
|
|
|
194
196
|
}
|
|
195
197
|
}
|
|
196
198
|
const e = w.get(t);
|
|
197
|
-
if (e === undefined)
|
|
198
|
-
|
|
199
|
+
if (e === undefined) l = undefined; else if (Array.isArray(e)) {
|
|
200
|
+
l = unwrapValue(f[e.shift()]);
|
|
199
201
|
if (e.length === 1) w.set(t, e[0]);
|
|
200
202
|
} else {
|
|
201
|
-
|
|
203
|
+
l = unwrapValue(f[e]);
|
|
202
204
|
w.delete(t);
|
|
203
205
|
}
|
|
204
206
|
} else {
|
|
205
|
-
|
|
207
|
+
l = unwrapValue(f[p]);
|
|
206
208
|
// keyless item: positional fallback
|
|
207
209
|
}
|
|
208
|
-
descend(
|
|
210
|
+
descend(l, e, n, i, o);
|
|
209
211
|
}
|
|
210
212
|
if (c !== null) {
|
|
211
|
-
const e = c[
|
|
213
|
+
const e = c[p];
|
|
212
214
|
if (e !== undefined) {
|
|
213
|
-
|
|
214
|
-
notifyKeyDiff(e,
|
|
215
|
+
d++;
|
|
216
|
+
notifyKeyDiff(e, p, a, t, false);
|
|
215
217
|
}
|
|
216
218
|
}
|
|
217
219
|
}
|
|
218
220
|
} else {
|
|
219
|
-
const
|
|
220
|
-
const
|
|
221
|
-
let
|
|
222
|
-
for (let y = 0; y <
|
|
223
|
-
const
|
|
224
|
-
if (!
|
|
225
|
-
if (e.dk !== null && !
|
|
221
|
+
const l = Math.min(f.length, r.length);
|
|
222
|
+
const s = r.length;
|
|
223
|
+
let p = false;
|
|
224
|
+
for (let y = 0; y < s; y++) {
|
|
225
|
+
const s = r[y];
|
|
226
|
+
if (!u && y < l && s !== null && typeof s === "object") descend(unwrapValue(f[y]), s, n, i, o);
|
|
227
|
+
if (e.dk !== null && !p && !(s !== null && typeof s === "object" ? targetsEqual(f[y], s) : isEqual(f[y], s))) {
|
|
226
228
|
bumpDeep(e);
|
|
227
|
-
|
|
229
|
+
p = true;
|
|
228
230
|
}
|
|
229
231
|
if (c !== null) {
|
|
230
232
|
const e = c[y];
|
|
231
233
|
if (e !== undefined) {
|
|
232
|
-
|
|
234
|
+
d++;
|
|
233
235
|
notifyKeyDiff(e, y, a, t, false);
|
|
234
236
|
}
|
|
235
237
|
}
|
|
236
238
|
}
|
|
237
239
|
}
|
|
238
|
-
if (
|
|
239
|
-
if (c !== null &&
|
|
240
|
+
if (s) {
|
|
241
|
+
if (c !== null && d < e.nc) {
|
|
240
242
|
for (const e of Reflect.ownKeys(c)) {
|
|
241
243
|
// visited indexes are < nextRows.length; everything else sweeps
|
|
242
244
|
const n = typeof e === "string" ? +e : NaN;
|
|
@@ -253,7 +255,7 @@ function applyAdopt(e, t, n, o = false) {
|
|
|
253
255
|
// slots must not notify, R9). This replaces the notifyFold re-walk that
|
|
254
256
|
// doubled dbmon's diff cost. for-in covers own enumerable string keys
|
|
255
257
|
// with no key-array allocation; symbols get a pass only when present.
|
|
256
|
-
const f =
|
|
258
|
+
const f = s ? e.n : null;
|
|
257
259
|
let r = 0;
|
|
258
260
|
let c = false;
|
|
259
261
|
// The per-key body is inlined on purpose (legacy applyStateFast parity:
|
|
@@ -261,45 +263,46 @@ function applyAdopt(e, t, n, o = false) {
|
|
|
261
263
|
// site). Reference-identical values early-continue BEFORE any other
|
|
262
264
|
// work — sound only with the ownership guard (FINDING-1: an owned
|
|
263
265
|
// backing is setter-diverged and must still diff).
|
|
264
|
-
for (const
|
|
265
|
-
const
|
|
266
|
-
const
|
|
267
|
-
const y =
|
|
268
|
-
if (
|
|
269
|
-
if (f !== null && f[
|
|
266
|
+
for (const s in t) {
|
|
267
|
+
const d = t[s];
|
|
268
|
+
const p = a[s];
|
|
269
|
+
const y = d !== null && typeof d === "object";
|
|
270
|
+
if (p === d && (!y || !isOwned(d)) && (f === null || f[s] === undefined || !hasAccessorFlag(f[s]))) {
|
|
271
|
+
if (f !== null && f[s] !== undefined) r++;
|
|
270
272
|
continue;
|
|
271
273
|
}
|
|
272
|
-
if (y && !
|
|
274
|
+
if (y && !u) descend(unwrapValue(l[s]), d, n, i, o);
|
|
273
275
|
// Deep-witness (dk): value changes must notify even with NO per-key
|
|
274
276
|
// node — deep() subscribes one node per record. Checked after descend
|
|
275
277
|
// so in-place adoptions (same logical slot) don't bump; child records
|
|
276
278
|
// carry their own witness. One flag + null check when unused.
|
|
277
|
-
if (e.dk !== null && !c && !(y ? targetsEqual(
|
|
279
|
+
if (e.dk !== null && !c && !(y ? targetsEqual(p, d) : isEqual(p, d))) {
|
|
278
280
|
bumpDeep(e);
|
|
279
281
|
c = true;
|
|
280
282
|
}
|
|
281
283
|
if (f !== null) {
|
|
282
|
-
const e = f[
|
|
284
|
+
const e = f[s];
|
|
283
285
|
if (e !== undefined) {
|
|
284
286
|
r++;
|
|
285
|
-
notifyKeyValue(e,
|
|
287
|
+
notifyKeyValue(e, s, p, d, a, t);
|
|
286
288
|
}
|
|
287
289
|
}
|
|
288
290
|
}
|
|
289
|
-
const
|
|
290
|
-
for (let e = 0; e <
|
|
291
|
-
const
|
|
292
|
-
|
|
293
|
-
|
|
291
|
+
const d = Object.getOwnPropertySymbols(t);
|
|
292
|
+
for (let e = 0; e < d.length; e++) {
|
|
293
|
+
const s = d[e];
|
|
294
|
+
if (s === $OWNER) continue;
|
|
295
|
+
const c = t[s];
|
|
296
|
+
if (!u && c !== null && typeof c === "object") descend(unwrapValue(l[s]), c, n, i, o);
|
|
294
297
|
if (f !== null) {
|
|
295
|
-
const e = f[
|
|
298
|
+
const e = f[s];
|
|
296
299
|
if (e !== undefined) {
|
|
297
300
|
r++;
|
|
298
|
-
notifyKeyValue(e,
|
|
301
|
+
notifyKeyValue(e, s, a[s], c, a, t);
|
|
299
302
|
}
|
|
300
303
|
}
|
|
301
304
|
}
|
|
302
|
-
if (
|
|
305
|
+
if (s) {
|
|
303
306
|
// Deleted-key nodes (in the map but absent from incoming) — counted
|
|
304
307
|
// fast-out: when every node was visited, skip the sweep entirely.
|
|
305
308
|
if (f !== null && r < e.nc) {
|
|
@@ -330,8 +333,8 @@ function descend(e, t, n, o, f = false) {
|
|
|
330
333
|
// wrappables acquire targets; rawValues never wrap) — one WeakMap get
|
|
331
334
|
// replaces isWrappable(pv) + isRawValue(pv), and a miss prunes untracked
|
|
332
335
|
// subtrees before any further checks.
|
|
333
|
-
const
|
|
334
|
-
if (
|
|
336
|
+
const i = lookupTarget(e, o);
|
|
337
|
+
if (i === undefined) return;
|
|
335
338
|
// nothing proxied below this pair
|
|
336
339
|
// The NEW side still validates fully: a frozen/platform/markRaw'd incoming
|
|
337
340
|
// value is a leaf for reconcile — replaced by reference, never recursed
|
|
@@ -363,8 +366,8 @@ function descend(e, t, n, o, f = false) {
|
|
|
363
366
|
// UNCONDITIONALLY (proj R6: the slot keeps its proxy without needing a
|
|
364
367
|
// subscriber below); plain keyed reconcile detaches unobserved captures
|
|
365
368
|
// (recon-snap R18 — staleness is the pinned pruning contract).
|
|
366
|
-
if (!f && n !== null && !
|
|
367
|
-
applyAdopt(
|
|
369
|
+
if (!f && n !== null && !i.d) return;
|
|
370
|
+
applyAdopt(i, t, n, f);
|
|
368
371
|
}
|
|
369
372
|
|
|
370
373
|
export { reconcileNextState, sameKey };
|