@solidjs/signals 2.0.0-rc.11 → 2.0.0-rc.14

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.
Files changed (118) hide show
  1. package/dist/dev-shared.js +2056 -3773
  2. package/dist/dev.attribution.js +159 -91
  3. package/dist/dev.js +7263 -8384
  4. package/dist/observe/affects.js +125 -104
  5. package/dist/observe/boundaries.js +458 -665
  6. package/dist/observe/core/action.js +63 -66
  7. package/dist/observe/core/async.js +240 -383
  8. package/dist/observe/core/attribution-queries.js +1 -1
  9. package/dist/observe/core/attribution.js +271 -199
  10. package/dist/observe/core/constants.js +115 -178
  11. package/dist/observe/core/context.js +3 -3
  12. package/dist/observe/core/core.js +840 -1428
  13. package/dist/observe/core/dev.js +41 -18
  14. package/dist/observe/core/effect.js +75 -86
  15. package/dist/observe/core/external.js +5 -5
  16. package/dist/observe/core/graph.js +61 -70
  17. package/dist/observe/core/heap.js +75 -98
  18. package/dist/observe/core/invariants.js +1 -34
  19. package/dist/observe/core/lanes.js +704 -181
  20. package/dist/observe/core/owner.js +80 -101
  21. package/dist/observe/core/scheduler.js +708 -1351
  22. package/dist/observe/core/verdict.js +302 -621
  23. package/dist/observe/flatten.js +79 -0
  24. package/dist/observe/index.js +15 -13
  25. package/dist/observe/map.js +232 -235
  26. package/dist/observe/reveal.js +212 -0
  27. package/dist/observe/signals.js +133 -215
  28. package/dist/observe/store/affects.js +135 -0
  29. package/dist/observe/store/index.js +29 -24
  30. package/dist/observe/store/optimistic.js +538 -0
  31. package/dist/observe/store/projection.js +302 -0
  32. package/dist/observe/store/reconcile.js +257 -0
  33. package/dist/observe/store/store.js +1945 -277
  34. package/dist/observe/store/storePath.js +1 -1
  35. package/dist/{prod/store/next → observe/store}/target.js +17 -18
  36. package/dist/observe/store/types.js +73 -0
  37. package/dist/observe/store/utils.js +1 -13
  38. package/dist/prod/affects.js +127 -106
  39. package/dist/prod/boundaries.js +442 -654
  40. package/dist/prod/core/action.js +71 -74
  41. package/dist/prod/core/async.js +307 -442
  42. package/dist/prod/core/constants.js +112 -177
  43. package/dist/prod/core/context.js +3 -3
  44. package/dist/prod/core/core.js +852 -1448
  45. package/dist/prod/core/effect.js +88 -99
  46. package/dist/prod/core/external.js +5 -5
  47. package/dist/prod/core/graph.js +61 -70
  48. package/dist/prod/core/heap.js +75 -98
  49. package/dist/prod/core/invariants.js +1 -32
  50. package/dist/prod/core/lanes.js +666 -181
  51. package/dist/prod/core/owner.js +75 -96
  52. package/dist/prod/core/scheduler.js +677 -1332
  53. package/dist/prod/core/verdict.js +297 -621
  54. package/dist/prod/flatten.js +77 -0
  55. package/dist/prod/index.js +15 -13
  56. package/dist/prod/map.js +143 -146
  57. package/dist/prod/reveal.js +212 -0
  58. package/dist/prod/signals.js +144 -226
  59. package/dist/prod/store/affects.js +135 -0
  60. package/dist/prod/store/index.js +28 -19
  61. package/dist/prod/store/optimistic.js +533 -0
  62. package/dist/prod/store/projection.js +295 -0
  63. package/dist/prod/store/reconcile.js +257 -0
  64. package/dist/prod/store/store.js +1840 -272
  65. package/dist/prod/store/storePath.js +1 -1
  66. package/dist/{observe/store/next → prod/store}/target.js +13 -17
  67. package/dist/prod/store/types.js +73 -0
  68. package/dist/prod/store/utils.js +1 -11
  69. package/dist/types/affects.d.ts +11 -30
  70. package/dist/types/boundaries.d.ts +62 -176
  71. package/dist/types/carved.d.ts +1 -0
  72. package/dist/types/core/action.d.ts +5 -6
  73. package/dist/types/core/async.d.ts +10 -5
  74. package/dist/types/core/attribution-hooks.d.ts +48 -1
  75. package/dist/types/core/attribution.d.ts +29 -9
  76. package/dist/types/core/constants.d.ts +125 -171
  77. package/dist/types/core/core.d.ts +104 -264
  78. package/dist/types/core/dev.d.ts +60 -7
  79. package/dist/types/core/effect.d.ts +0 -7
  80. package/dist/types/core/graph.d.ts +7 -1
  81. package/dist/types/core/heap.d.ts +5 -7
  82. package/dist/types/core/index.d.ts +6 -6
  83. package/dist/types/core/invariants.d.ts +0 -29
  84. package/dist/types/core/lanes.d.ts +65 -87
  85. package/dist/types/core/owner.d.ts +3 -3
  86. package/dist/types/core/scheduler.d.ts +249 -331
  87. package/dist/types/core/types.d.ts +51 -85
  88. package/dist/types/core/verdict.d.ts +3 -0
  89. package/dist/types/flatten.d.ts +8 -0
  90. package/dist/types/index.d.ts +7 -5
  91. package/dist/types/reveal.d.ts +19 -0
  92. package/dist/types/signals.d.ts +53 -92
  93. package/dist/types/store/affects.d.ts +1 -0
  94. package/dist/types/store/index.d.ts +35 -15
  95. package/dist/types/store/optimistic.d.ts +23 -0
  96. package/dist/types/store/projection.d.ts +18 -0
  97. package/dist/types/store/reconcile.d.ts +3 -0
  98. package/dist/types/store/store.d.ts +165 -143
  99. package/dist/types/store/storePath.d.ts +1 -1
  100. package/dist/types/store/target.d.ts +151 -0
  101. package/dist/types/store/types.d.ts +84 -0
  102. package/package.json +1 -1
  103. package/dist/observe/core/optimistic.js +0 -669
  104. package/dist/observe/store/next/optimistic.js +0 -717
  105. package/dist/observe/store/next/projection.js +0 -266
  106. package/dist/observe/store/next/reconcile.js +0 -375
  107. package/dist/observe/store/next/store.js +0 -2480
  108. package/dist/prod/core/optimistic.js +0 -658
  109. package/dist/prod/store/next/optimistic.js +0 -710
  110. package/dist/prod/store/next/projection.js +0 -257
  111. package/dist/prod/store/next/reconcile.js +0 -373
  112. package/dist/prod/store/next/store.js +0 -2356
  113. package/dist/types/core/optimistic.d.ts +0 -6
  114. package/dist/types/store/next/optimistic.d.ts +0 -25
  115. package/dist/types/store/next/projection.d.ts +0 -27
  116. package/dist/types/store/next/reconcile.d.ts +0 -10
  117. package/dist/types/store/next/store.d.ts +0 -143
  118. package/dist/types/store/next/target.d.ts +0 -196
@@ -1,4 +1,4 @@
1
- import { isWrappable, ownEnumerableKeys } from "./store.js";
1
+ import { isWrappable, ownEnumerableKeys } from "./types.js";
2
2
 
3
3
  const DELETE = Symbol(0);
4
4
 
@@ -14,33 +14,29 @@
14
14
  */
15
15
  const $OWNER = Symbol(0);
16
16
 
17
- /** raw → target for UNOWNED backings (user-ingested, adopted); owned
18
- * backings resolve through their `$OWNER` stamp. Boundary mechanism (O8). */ const storeNextLookup = new WeakMap;
17
+ /** raw → target for plain (family-less) stores. Family stores use their own
18
+ * map so one raw can wrap once per family (§7b). */ const storeLookup = new WeakMap;
19
19
 
20
- /** A backing the store allocated and may mutate in place. */ function isOwned(e) {
20
+ function setLookup(e, o) {
21
+ (o.fam?.map ?? storeLookup).set(e, o);
22
+ }
23
+
24
+ function isOwned(e) {
21
25
  return e[$OWNER] !== undefined;
22
26
  }
23
27
 
24
- /** raw → target within a family (`null` = plain stores / the global map).
25
- * The stamp answers for backings owned by a target OF THAT FAMILY; anything
26
- * else (user objects, adoptees, another family's backings the family
27
- * re-registered for its own wrapper) resolves through the family's map. */ function lookupTarget(e, o) {
28
- const t = e[$OWNER];
29
- return t !== undefined && t.fam === o ? t : (o?.map ?? storeNextLookup).get(e);
28
+ /** The target wrapping `raw` in `fam` (or the plain lookup). An owned raw
29
+ * answers from its stamp; a user raw from the map. */ function lookupTarget(e, o) {
30
+ const n = e[$OWNER];
31
+ return n !== undefined && n.fam === o ? n : (o?.map ?? storeLookup).get(e);
30
32
  }
31
33
 
32
34
  function devAssertNeverUserMutation(e) {
33
35
  return;
34
36
  }
35
37
 
36
- let optHooks = null;
37
-
38
- function setOptHooks(e) {
39
- optHooks = e;
40
- }
41
-
42
- /** Sticky descendants flag walk (§6d): reconcile's keyed pruning descends
43
- * only where subscriptions exist at/below. Nodes AND patches count. */ function markDescendants(e) {
38
+ /** Sticky descendants flag up the parent chain (§6d): adoption descends
39
+ * into a changed child pair only where a target with nodes exists below. */ function markDescendants(e) {
44
40
  let o = e;
45
41
  while (o && !o.d) {
46
42
  o.d = true;
@@ -48,4 +44,7 @@ function setOptHooks(e) {
48
44
  }
49
45
  }
50
46
 
51
- export { $OWNER, devAssertNeverUserMutation, isOwned, lookupTarget, markDescendants, optHooks, setOptHooks, storeNextLookup };
47
+ /** Observe tier: the owner in scope at `createStore` (attribution names and
48
+ * owner paths); the `_owner` write never reaches the proxy. */ const storeOwners = new WeakMap;
49
+
50
+ export { $OWNER, devAssertNeverUserMutation, isOwned, lookupTarget, markDescendants, setLookup, storeLookup, storeOwners };
@@ -0,0 +1,73 @@
1
+ /** Brand keys the proxy answers directly (never user data). */
2
+ const $TRACK = Symbol(0), $TARGET = Symbol(0), $PROXY = Symbol(0), $RECORD = Symbol(0);
3
+
4
+ // ---------------------------------------------------------------------------
5
+ // raw marking (R42 / RUL-12: a value is never both wrapped and raw)
6
+ const rawValues = new WeakSet;
7
+
8
+ let rawValuesUsed = false;
9
+
10
+ function isRawValue(e) {
11
+ return rawValuesUsed && rawValues.has(e);
12
+ }
13
+
14
+ /** Mark a value so no store ever wraps it (sticky; it reads as a leaf). */ function markRaw(e) {
15
+ if (isWrappable(e)) {
16
+ rawValuesUsed = true;
17
+ rawValues.add(e);
18
+ }
19
+ return e;
20
+ }
21
+
22
+ /** A shallow store's ingested record: raw by contract (values served
23
+ * verbatim, slots replaced by reference). */ function markRawOne(e) {
24
+ if (isWrappable(e)) {
25
+ if (e[$TARGET] !== undefined) return;
26
+ rawValuesUsed = true;
27
+ rawValues.add(e);
28
+ }
29
+ }
30
+
31
+ function markRawIngest(e) {
32
+ if (Array.isArray(e)) {
33
+ for (let r = 0, a = e.length; r < a; r++) markRawOne(e[r]);
34
+ } else {
35
+ for (const r in e) markRawOne(e[r]);
36
+ }
37
+ }
38
+
39
+ // ---------------------------------------------------------------------------
40
+ // wrappability
41
+ const OBJECT_PROTO = Object.prototype;
42
+
43
+ const wrappableProtos = new WeakMap;
44
+
45
+ function isWrappable(e) {
46
+ if (e == null || typeof e !== "object" || Object.isFrozen(e)) return false;
47
+ const r = Object.getPrototypeOf(e);
48
+ if (r === OBJECT_PROTO || r === null) return true;
49
+ if (Array.isArray(e)) return true;
50
+ let a = wrappableProtos.get(r);
51
+ if (a === undefined) {
52
+ a = Object.prototype.toString.call(e) === "[object Object]" && (typeof Node === "undefined" || !(e instanceof Node));
53
+ wrappableProtos.set(r, a);
54
+ }
55
+ return a;
56
+ }
57
+
58
+ function ownEnumerableKeys(e) {
59
+ return Reflect.ownKeys(e).filter(r => Object.prototype.propertyIsEnumerable.call(e, r));
60
+ }
61
+
62
+ // ---------------------------------------------------------------------------
63
+ // write override: a projection's draft ops carry it (the derive is the
64
+ // author — its writes must land outside the sync setter scope too, in a
65
+ // continuation after an `await`/`yield`). Projections return in S3; the
66
+ // traps already honour it.
67
+ let writeOverride = false;
68
+
69
+ function setWriteOverride(e) {
70
+ writeOverride = e;
71
+ }
72
+
73
+ export { $PROXY, $RECORD, $TARGET, $TRACK, isRawValue, isWrappable, markRaw, markRawIngest, markRawOne, ownEnumerableKeys, rawValuesUsed, setWriteOverride, writeOverride };
@@ -1,20 +1,8 @@
1
- import "../core/core.js";
2
-
3
1
  import { SUPPORTS_PROXY } from "../core/constants.js";
4
2
 
5
- import "../core/dev.js";
6
-
7
- import "../core/scheduler.js";
8
-
9
- import "../core/invariants.js";
10
-
11
- import "../core/verdict.js";
12
-
13
- import "../core/effect.js";
14
-
15
3
  import { createMemo } from "../signals.js";
16
4
 
17
- import { $PROXY, $RECORD, $TARGET, ownEnumerableKeys } from "./store.js";
5
+ import { $PROXY, $RECORD, $TARGET, ownEnumerableKeys } from "./types.js";
18
6
 
19
7
  function trueFn() {
20
8
  return true;
@@ -1,127 +1,148 @@
1
- import { forEachDependent } from "./core/async.js";
2
-
3
- import { ext, statusNotifierOf } from "./core/core.js";
4
-
5
- import { $REFRESH, STATUS_PENDING } from "./core/constants.js";
6
-
7
- import { NotReadyError } from "./core/error.js";
8
-
9
- import { GlobalQueue, globalQueue, schedule, shiftAffectsMarks } from "./core/scheduler.js";
10
-
11
- import "./core/verdict.js";
12
-
13
- import "./core/effect.js";
14
-
15
- import "./core/invariants.js";
16
-
17
- import { $TARGET, getStoreAffectsNodes } from "./store/store.js";
1
+ import { $REFRESH, CONFIG_VERDICT, STATUS_PENDING, CONFIG_SLOT_NODE, STATUS_ERROR, REACTIVE_RECOMPUTING_DEPS } from "./core/constants.js";
2
+
3
+ import { ext } from "./core/core.js";
4
+
5
+ import { enqueueSub } from "./core/heap.js";
6
+
7
+ import { GlobalQueue, schedule, resolveTx, flushTransaction } from "./core/scheduler.js";
8
+
9
+ import { $TARGET } from "./store/types.js";
10
+
11
+ // `affects()` — the declaration verb of the pending model (A24 (4), ruled
12
+ // 2026-07-13; the #2893 audit corollaries; rebuilt on L2 2026-10-02 as ruled:
13
+ // transaction-inert).
14
+ // A mark is a declared in-flight change: the marked node — and everything
15
+ // derived from it — reads pending (`isPending` → true) from the declaration
16
+ // until the surrounding transaction lands (an ambient mark, declared outside
17
+ // one, releases at the next seam). The marked values stay readable: no reader
18
+ // suspends on a mark, a mark holds nothing and entangles nothing — it is not
19
+ // a node of its transaction (`blocked` never sees it), and a reader of marked
20
+ // data joins nothing through it. A mark is never a re-ask, so a declared
21
+ // reload's own `refresh()` cannot silence it; a real error outranks it.
22
+ // Representation: a count on the marked node (`_x._marks`), listed with its
23
+ // scope (the transaction's `_marks`, or the ambient list). Coverage of the
24
+ // derivations is pull-derived at probe time — `isPending`'s read walks the
25
+ // probed node's dependencies for a marked one (verdict.ts → `_marked`) — so
26
+ // nothing is stored downstream and a mid-window recompute strands nothing.
27
+ // The push half is the verdict readers' re-derivation at registration and at
28
+ // release (`repoll`): the only notification a mark makes.
29
+ // Installed on `GlobalQueue` when imported: a program that never declares a
30
+ // mark carries none of this.
31
+ /** Live marks, every scope — the gate on the probe's walk. */
32
+ let active = 0;
33
+
34
+ /** Marks declared outside a transaction: released at the next seam. */ const ambient = [];
35
+
36
+ /** The verdict readers downstream of `node` — through derivations, stopping
37
+ * at effects — re-derive: the mark's one notification (a probe's answer
38
+ * changed with no value notifying anyone). */ function repoll(e, t = new Set) {
39
+ for (let n = e.t; n !== null; n = n.l) {
40
+ const e = n.o;
41
+ if (t.has(e)) continue;
42
+ t.add(e);
43
+ if (e.u & CONFIG_VERDICT) enqueueSub(e);
44
+ if (!e.i) repoll(e, t);
45
+ }
46
+ }
18
47
 
19
- /**
20
- * The counting half of a mark, shared by direct registration and store-scope
21
- * inheritance (a node created inside a live keyless mark's identity scope).
22
- * A mark is ONLY this count: coverage of everything derived from the node is
23
- * pull-derived by the verdict layer's `markWalk` (dep-graph reachability), so
24
- * nothing is stored downstream and nothing can be stranded or stripped by
25
- * mid-window recomputes.
26
- */ function markAffects(e) {
27
- ext(e).t = (e.o?.t || 0) + 1;
28
- shiftAffectsMarks(1);
48
+ /** A node is covered by a live mark iff it carries one, or derives — through
49
+ * its current dependencies — from one that does. A real error outranks an
50
+ * inherited mark (A24 (c)): coverage does not flow through an errored node
51
+ * (a direct mark on one still reads pending). Mid-recompute, only the
52
+ * validated prefix of the dependency list is this pass's. */ function marked(e, t) {
53
+ if (e.m !== null && e.m.T !== 0) return true;
54
+ const n = e;
55
+ if (n.G & STATUS_ERROR || t.has(e)) return false;
56
+ t.add(e);
57
+ const r = n.R & REACTIVE_RECOMPUTING_DEPS ? n.S : undefined;
58
+ if (r !== null) for (let e = n._ ?? null; e !== null; e = e.p) {
59
+ if (marked(e.I, t)) return true;
60
+ if (e === r) break;
61
+ }
62
+ return false;
29
63
  }
30
64
 
31
- /**
32
- * Boundary visual channel: within a transaction, a live mark holds Loading
33
- * fallbacks / reveal ordering the way real in-flight async would — but the
34
- * notification is tagged visibility-only at the source (`_markVisual`), so
35
- * the root queue never registers reporters from it: marks are invisible to
36
- * ALL completion and settlement accounting by construction. Boundaries hold
37
- * the marked node in `_sources` while `_affectsCount` is live; the release
38
- * sweep (finalizePureQueue re-checks boundary children after mark release)
39
- * is the display-state update point. Ambient marks release inside the same
40
- * flush that would surface them, before effects run — verdict-only, netting
41
- * no visual change.
42
- */ function notifyMarkBoundaries(e) {
43
- if (!e.u && !e.o?.i) return;
44
- const r = new NotReadyError(e);
45
- r.l = true;
46
- const t = new Set;
47
- const visit = e => {
48
- if (t.has(e)) return;
49
- t.add(e);
50
- // Display consumers (render effects, boundary computeds) act on the
51
- // notification; descent stops there, exactly like the status rails.
52
- const o = statusNotifierOf(e);
53
- if (o) {
54
- o.call(e, STATUS_PENDING, r);
55
- return;
65
+ /** Releases one scope's marks (a landed transaction's, the ambient list at
66
+ * the seam): a node whose last mark drops re-derives its verdict readers. */ function release(e) {
67
+ for (let t = 0; t < e.length; t++) {
68
+ const n = e[t];
69
+ active--;
70
+ if (--n.m.T === 0) {
71
+ repoll(n);
72
+ // A store mark's carrier: its scope (and the marks the nodes born in
73
+ // its window inherited) goes with it.
74
+ GlobalQueue.N?.(n);
56
75
  }
57
- forEachDependent(e, visit);
58
- };
59
- forEachDependent(e, visit);
76
+ }
77
+ e.length = 0;
60
78
  }
61
79
 
62
- /**
63
- * Registers one `affects()` mark on a node: counts it, records the
64
- * registration with the current transaction (after initTransition the queue's
65
- * batch IS the active transition, mirroring `_optimisticNodes`), re-derives
66
- * every downstream verdict companion (the mark channel's only push — verdict
67
- * pokes, not state), and notifies boundary display state. Both walks run on
68
- * every registration (not just the first): subscribers gained since an
69
- * earlier overlapping registration get covered, and dedup stops re-descent.
70
- */ function registerAffectsMark(e) {
71
- markAffects(e);
72
- globalQueue.m.A.push(e);
73
- // Companions only exist once the verdict layer (isPending/latest) loaded;
74
- // without them there is no materialized verdict to poke.
75
- GlobalQueue.k !== null && GlobalQueue.k(e);
76
- notifyMarkBoundaries(e);
77
- schedule();
80
+ /** One registration: a count on the node, listed with the scope — the
81
+ * flush's transaction, or the ambient list (released at the seam). */ function register(e) {
82
+ mark(e);
83
+ const t = flushTransaction;
84
+ if (t === null) ambient.push(e); else {
85
+ const n = resolveTx(t);
86
+ (n.T ??= []).push(e);
87
+ }
88
+ repoll(e);
78
89
  }
79
90
 
80
- /**
81
- * Releases one registration. When the node's last mark drops, re-derives
82
- * every downstream verdict through the settlement snap (committed, not
83
- * transition-scoped — release runs inside queue finalization, where a
84
- * setSignal would open a fresh override window that nothing settles).
85
- */ function releaseAffectsMark(e) {
86
- shiftAffectsMarks(-1);
87
- e.o.t--;
88
- if (!e.o.t) {
89
- GlobalQueue.k !== null && GlobalQueue.k(e, true);
90
- GlobalQueue.p?.(e);
91
- }
91
+ function mark(e) {
92
+ ext(e).T++;
93
+ active++;
92
94
  }
93
95
 
94
- /**
95
- * Releases one batch of affects marks (a settling transaction's, or the
96
- * ambient batch at a plain flush end).
97
- */ function releaseAffectsMarks(e) {
98
- for (let r = 0; r < e.length; r++) releaseAffectsMark(e[r]);
99
- e.length = 0;
96
+ function affects(e, t) {
97
+ // A store (the store half, store/affects.ts): the slot's leaf, or the
98
+ // record's carrier and every live node under it.
99
+ const n = e?.[$TARGET];
100
+ if (n !== undefined) {
101
+ const e = GlobalQueue.O(n, t);
102
+ for (let t = 0; t < e.length; t++) register(e[t]);
103
+ schedule();
104
+ return;
105
+ }
106
+ const r = e?.[$REFRESH];
107
+ if (!r) {
108
+ return;
109
+ }
110
+ register(r);
111
+ schedule();
100
112
  }
101
113
 
102
- // Late installation (same pattern as `GlobalQueue._update`): the mark engine
103
- // lives with the feature so graphs that never declare a mark never ship it.
104
- // Each call site is gated by state only this module creates (a non-empty
105
- // `_affectsNodes` batch, a live scope in the store's `affectsScopes`), so the
106
- // hooks are installed before the first time any of them can fire.
107
- GlobalQueue.G = releaseAffectsMarks;
114
+ GlobalQueue.C = e => active !== 0 && marked(e, new Set);
108
115
 
109
- GlobalQueue.M = markAffects;
116
+ GlobalQueue.h = mark;
110
117
 
111
- GlobalQueue.N = releaseAffectsMark;
118
+ GlobalQueue.A = release;
112
119
 
113
- function affects(e, r) {
114
- const t = e?.[$TARGET];
115
- if (t) {
116
- const e = getStoreAffectsNodes(t, r);
117
- for (let r = 0; r < e.length; r++) registerAffectsMark(e[r]);
120
+ GlobalQueue.D = e => {
121
+ if (ambient.length === 0) return;
122
+ // The flush parked: the declaration's window is the frame's — the marks
123
+ // are its transaction's ("nothing async below ⇒ no window").
124
+ if (e !== null) {
125
+ const t = e.T ??= [];
126
+ for (let e = 0; e < ambient.length; e++) t.push(ambient[e]);
127
+ ambient.length = 0;
118
128
  return;
119
129
  }
120
- const o = e?.[$REFRESH];
121
- if (o) {
122
- registerAffectsMark(o);
123
- return;
130
+ // Nothing parked, but a marked node's own flight is up (a declared
131
+ // reload's quiet re-ask — the node's, or a store leaf's family derive):
132
+ // the window is the flight's; the mark stays to the seam after the
133
+ // landing. The rest release: verdict-only, nothing to show.
134
+ let t = 0;
135
+ const n = [];
136
+ for (let e = 0; e < ambient.length; e++) {
137
+ const r = ambient[e];
138
+ if (inFlight(r)) ambient[t++] = r; else n.push(r);
124
139
  }
140
+ ambient.length = t;
141
+ if (n.length !== 0) release(n);
142
+ };
143
+
144
+ function inFlight(e) {
145
+ return (e.G & STATUS_PENDING) !== 0 || (e.u & CONFIG_SLOT_NODE) !== 0 && GlobalQueue.F?.(e) === true;
125
146
  }
126
147
 
127
148
  export { affects };