@solidjs/signals 2.0.0-rc.4 → 2.0.0-rc.6

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 (57) hide show
  1. package/dist/dev.js +1618 -232
  2. package/dist/node.cjs +2262 -1199
  3. package/dist/prod/boundaries.js +4 -1
  4. package/dist/prod/core/async.js +152 -101
  5. package/dist/prod/core/constants.js +55 -1
  6. package/dist/prod/core/core.js +305 -234
  7. package/dist/prod/core/effect.js +28 -28
  8. package/dist/prod/core/error.js +13 -1
  9. package/dist/prod/core/external.js +2 -2
  10. package/dist/prod/core/graph.js +27 -27
  11. package/dist/prod/core/heap.js +30 -30
  12. package/dist/prod/core/lanes.js +32 -32
  13. package/dist/prod/core/optimistic.js +57 -57
  14. package/dist/prod/core/owner.js +34 -34
  15. package/dist/prod/core/scheduler.js +346 -152
  16. package/dist/prod/core/verdict.js +122 -65
  17. package/dist/prod/index.js +3 -3
  18. package/dist/prod/map.js +106 -106
  19. package/dist/prod/signals.js +321 -26
  20. package/dist/prod/store/next/optimistic.js +363 -151
  21. package/dist/prod/store/next/patch.js +6 -6
  22. package/dist/prod/store/next/projection.js +25 -21
  23. package/dist/prod/store/next/store.js +223 -113
  24. package/dist/prod/store/store.js +2 -2
  25. package/dist/types/core/async.d.ts +2 -0
  26. package/dist/types/core/attribution-hooks.d.ts +11 -0
  27. package/dist/types/core/attribution.d.ts +57 -4
  28. package/dist/types/core/constants.d.ts +54 -0
  29. package/dist/types/core/core.d.ts +19 -20
  30. package/dist/types/core/dev.d.ts +8 -2
  31. package/dist/types/core/error.d.ts +9 -0
  32. package/dist/types/core/index.d.ts +2 -2
  33. package/dist/types/core/scheduler.d.ts +39 -0
  34. package/dist/types/core/types.d.ts +12 -0
  35. package/dist/types/index.d.ts +3 -3
  36. package/dist/types/signals.d.ts +108 -11
  37. package/dist/types/store/next/optimistic.d.ts +13 -10
  38. package/dist/types/store/next/projection.d.ts +1 -1
  39. package/dist/types/store/next/store.d.ts +22 -0
  40. package/dist/types/store/next/target.d.ts +25 -0
  41. package/dist/types-cjs/core/async.d.cts +2 -0
  42. package/dist/types-cjs/core/attribution-hooks.d.cts +11 -0
  43. package/dist/types-cjs/core/attribution.d.cts +57 -4
  44. package/dist/types-cjs/core/constants.d.cts +54 -0
  45. package/dist/types-cjs/core/core.d.cts +19 -20
  46. package/dist/types-cjs/core/dev.d.cts +8 -2
  47. package/dist/types-cjs/core/error.d.cts +9 -0
  48. package/dist/types-cjs/core/index.d.cts +2 -2
  49. package/dist/types-cjs/core/scheduler.d.cts +39 -0
  50. package/dist/types-cjs/core/types.d.cts +12 -0
  51. package/dist/types-cjs/index.d.cts +3 -3
  52. package/dist/types-cjs/signals.d.cts +108 -11
  53. package/dist/types-cjs/store/next/optimistic.d.cts +13 -10
  54. package/dist/types-cjs/store/next/projection.d.cts +1 -1
  55. package/dist/types-cjs/store/next/store.d.cts +22 -0
  56. package/dist/types-cjs/store/next/target.d.cts +25 -0
  57. package/package.json +1 -1
@@ -14,7 +14,7 @@ import { GlobalQueue, haltReactivity } from "./scheduler.js";
14
14
  const r = !!f?.user;
15
15
  const R = createEffectNode(t, e, E, r ? EFFECT_USER : EFFECT_RENDER, f);
16
16
  recompute(R, true);
17
- !f?.defer && (R.Re === EFFECT_USER || f?.schedule ? R.C.enqueue(R.Re, runEffect.bind(null, R)) : runEffect(R));
17
+ !f?.defer && (R.ge === EFFECT_USER || f?.schedule ? R.C.enqueue(R.ge, runEffect.bind(null, R)) : runEffect(R));
18
18
  }
19
19
 
20
20
  function notifyEffectStatus(t, e) {
@@ -23,7 +23,7 @@ function notifyEffectStatus(t, e) {
23
23
  const f = e !== undefined ? e : this.o?._;
24
24
  if (E & STATUS_ERROR) {
25
25
  this.C.notify(this, STATUS_PENDING, 0);
26
- if (this.Re === EFFECT_USER) {
26
+ if (this.ge === EFFECT_USER) {
27
27
  // The error handler is the error arm of the effect phase (#2840 ruling):
28
28
  // queue it like the effect function. It runs in the same imperative,
29
29
  // writable scope, throws escalate the same way, and a held transition
@@ -34,8 +34,8 @@ function notifyEffectStatus(t, e) {
34
34
  // `status` arg without node-state writes) don't queue: the status
35
35
  // re-propagates unblocked at commit.
36
36
  if (this.S & STATUS_ERROR) {
37
- this.Xe = true;
38
- this.C.enqueue(this.Re, this.et ??= runEffect.bind(null, this));
37
+ this.tt = true;
38
+ this.C.enqueue(this.ge, this.nt ??= runEffect.bind(null, this));
39
39
  }
40
40
  return;
41
41
  }
@@ -43,13 +43,13 @@ function notifyEffectStatus(t, e) {
43
43
  haltReactivity(unwrapStatusError(f));
44
44
  throw f;
45
45
  }
46
- } else if (this.Re === EFFECT_RENDER) {
46
+ } else if (this.ge === EFFECT_RENDER) {
47
47
  this.C.notify(this, STATUS_PENDING | STATUS_ERROR, E, f);
48
48
  }
49
49
  }
50
50
 
51
51
  function runEffect(t) {
52
- if (!t.Xe || t.ie & REACTIVE_DISPOSED) return;
52
+ if (!t.tt || t.ie & REACTIVE_DISPOSED) return;
53
53
  // Error arm (#2840), user effects only: a compute-phase error that is still
54
54
  // the node's settled state at effect time runs the bundle's error handler in
55
55
  // this same imperative, writable scope. Unwrap the StatusError used for
@@ -60,14 +60,14 @@ function runEffect(t) {
60
60
  // Render effects bypass: their errors route to boundaries synchronously in
61
61
  // notifyEffectStatus, and a runner queued by an earlier valueChanged in the
62
62
  // same flush must not be hijacked by a later-arriving error status.
63
- if (t.S & STATUS_ERROR && t.Re === EFFECT_USER) {
63
+ if (t.S & STATUS_ERROR && t.ge === EFFECT_USER) {
64
64
  const e = unwrapStatusError(t.o?._);
65
- t.dt = t.be;
66
- t.Xe = false;
65
+ t.At = t.be;
66
+ t.tt = false;
67
67
  try {
68
- t.St ? t.St(e, () => {
69
- const e = t.At;
70
- t.At = undefined;
68
+ t.Ct ? t.Ct(e, () => {
69
+ const e = t.Rt;
70
+ t.Rt = undefined;
71
71
  e?.();
72
72
  }) : console.error(e);
73
73
  } catch (e) {
@@ -78,14 +78,14 @@ function runEffect(t) {
78
78
  }
79
79
  return;
80
80
  }
81
- const e = t.At;
82
- t.At = undefined;
81
+ const e = t.Rt;
82
+ t.Rt = undefined;
83
83
  try {
84
84
  e?.();
85
- const E = t.Tt(t.be, t.dt);
85
+ const E = t.Ot(t.be, t.At);
86
86
  if (false && E !== undefined && typeof E !== "function") ;
87
87
  // The final cleanup is invoked by disposeChildren at true disposal.
88
- t.At = E;
88
+ t.Rt = E;
89
89
  } catch (e) {
90
90
  ext(t)._ = new StatusError(t, e);
91
91
  t.S |= STATUS_ERROR;
@@ -94,12 +94,12 @@ function runEffect(t) {
94
94
  throw e;
95
95
  }
96
96
  } finally {
97
- t.dt = t.be;
98
- t.Xe = false;
97
+ t.At = t.be;
98
+ t.tt = false;
99
99
  }
100
100
  }
101
101
 
102
- GlobalQueue.tt = runEffect;
102
+ GlobalQueue.it = runEffect;
103
103
 
104
104
  /**
105
105
  * Internal tracked effect - bypasses heap, goes directly to effect queue.
@@ -107,30 +107,30 @@ GlobalQueue.tt = runEffect;
107
107
  * Uses stale reads.
108
108
  */ function trackedEffect(t, e) {
109
109
  const run = () => {
110
- if (!E.Xe || E.ie & REACTIVE_DISPOSED) return;
110
+ if (!E.tt || E.ie & REACTIVE_DISPOSED) return;
111
111
  try {
112
- E.Xe = false;
112
+ E.tt = false;
113
113
  recompute(E);
114
114
  } finally {}
115
115
  };
116
116
  const E = computed(() => {
117
- const e = E.At;
118
- E.At = undefined;
117
+ const e = E.Rt;
118
+ E.Rt = undefined;
119
119
  e?.();
120
120
  const f = staleValues(t);
121
- E.At = f;
121
+ E.Rt = f;
122
122
  }, {
123
123
  ...e,
124
124
  lazy: true
125
125
  });
126
- E.At = undefined;
126
+ E.Rt = undefined;
127
127
  E.T = E.T & ~CONFIG_AUTO_DISPOSE | CONFIG_CHILDREN_FORBIDDEN;
128
- E.Xe = true;
129
- E.Re = EFFECT_TRACKED;
128
+ E.tt = true;
129
+ E.ge = EFFECT_TRACKED;
130
130
  // Status dispatch rides the SHARED notifier (statusNotifierOf keys off
131
131
  // _type): its error arm is behavior-identical to the closure that used to
132
132
  // live here, without the per-node NodeExtension allocation.
133
- E.Ut = run;
133
+ E.yt = run;
134
134
  E.C.enqueue(EFFECT_USER, run);
135
135
  }
136
136
 
@@ -53,6 +53,18 @@ class StatusError extends Error {
53
53
  return r instanceof StatusError ? r.cause : r;
54
54
  }
55
55
 
56
+ /**
57
+ * Rejection value of `until(fn, { timeout })` when the predicate does not turn
58
+ * truthy within the window. Inside an `action()`, the rejection is thrown back
59
+ * in at the `yield` point — catchable there, or the action fails and its
60
+ * optimistic state reverts.
61
+ */ class TimeoutError extends Error {
62
+ constructor(r = "Timed out waiting for condition") {
63
+ super(r);
64
+ this.name = "TimeoutError";
65
+ }
66
+ }
67
+
56
68
  class NoOwnerError extends Error {
57
69
  constructor() {
58
70
  super("");
@@ -65,4 +77,4 @@ class ContextNotFoundError extends Error {
65
77
  }
66
78
  }
67
79
 
68
- export { ContextNotFoundError, NoOwnerError, NotReadyError, StatusError, unwrapStatusError };
80
+ export { ContextNotFoundError, NoOwnerError, NotReadyError, StatusError, TimeoutError, unwrapStatusError };
@@ -64,8 +64,8 @@ function externalUntrack(e) {
64
64
  // removed on reset) so core's null checks stay equivalent to the old
65
65
  // `externalSourceConfig` truthiness checks.
66
66
  function syncExternalHooks() {
67
- GlobalQueue.Rt = externalSourceConfig ? wireExternalSource : null;
68
- GlobalQueue.Gt = externalSourceConfig ? externalUntrack : null;
67
+ GlobalQueue.Pt = externalSourceConfig ? wireExternalSource : null;
68
+ GlobalQueue.ht = externalSourceConfig ? externalUntrack : null;
69
69
  }
70
70
 
71
71
  function enableExternalSource(e) {
@@ -8,15 +8,15 @@ import { bumpNotifyEpoch } from "./scheduler.js";
8
8
 
9
9
  // https://github.com/stackblitz/alien-signals/blob/v2.0.3/src/system.ts#L100
10
10
  function unlinkSubs(e) {
11
- const n = e.ut;
12
- const l = e.it;
11
+ const n = e.ot;
12
+ const l = e.lt;
13
13
  const o = e.ae;
14
14
  const u = e.en;
15
- if (o !== null) o.en = u; else n.rt = u;
15
+ if (o !== null) o.en = u; else n._t = u;
16
16
  if (u !== null) u.ae = o; else {
17
17
  n.u = o;
18
18
  if (o === null) {
19
- n.o?.ft?.();
19
+ n.o?.Et?.();
20
20
  // No more subscribers; only tear down if CONFIG_AUTO_DISPOSE is set.
21
21
  // A pending node is exempt: its in-flight async work (or the
22
22
  // transition holding it) is an observer — tearing down would orphan
@@ -31,13 +31,13 @@ function unlinkSubs(e) {
31
31
  }
32
32
 
33
33
  function trimStaleDeps(e) {
34
- const n = e.Ye;
35
- let l = n !== null ? n.it : e.nt;
34
+ const n = e.je;
35
+ let l = n !== null ? n.lt : e.ut;
36
36
  if (l !== null) {
37
37
  do {
38
38
  l = unlinkSubs(l);
39
39
  } while (l !== null);
40
- if (n !== null) n.it = null; else e.nt = null;
40
+ if (n !== null) n.lt = null; else e.ut = null;
41
41
  }
42
42
  }
43
43
 
@@ -46,13 +46,13 @@ function trimStaleDeps(e) {
46
46
  // and skipping early also avoids adding one (hidden-class churn) via the
47
47
  // null-out below.
48
48
  function clearDeps(e) {
49
- let n = e.nt;
49
+ let n = e.ut;
50
50
  if (!n) return;
51
51
  do {
52
52
  n = unlinkSubs(n);
53
53
  } while (n !== null);
54
- e.nt = null;
55
- e.Ye = null;
54
+ e.ut = null;
55
+ e.je = null;
56
56
  }
57
57
 
58
58
  function unobserved(e) {
@@ -104,20 +104,20 @@ function link(e, n, l = false) {
104
104
  // not relabel the value dependency as probe-only — the value read is what
105
105
  // real-error propagation and affects() coverage key off, regardless of
106
106
  // read order within the computation.
107
- const o = n.Ye;
108
- if (o !== null && o.ut === e) {
109
- o.me &&= l;
107
+ const o = n.je;
108
+ if (o !== null && o.ot === e) {
109
+ o.ve &&= l;
110
110
  return;
111
111
  }
112
112
  let u = null;
113
113
  const t = n.ie & REACTIVE_RECOMPUTING_DEPS;
114
114
  if (t) {
115
- u = o !== null ? o.it : n.nt;
116
- if (u !== null && u.ut === e) {
117
- u.nn = n.Ze;
118
- n.Ye = u;
115
+ u = o !== null ? o.lt : n.ut;
116
+ if (u !== null && u.ot === e) {
117
+ u.Ft = n.Ke;
118
+ n.je = u;
119
119
  // First touch of this pass: the previous pass's label is stale.
120
- u.me = l;
120
+ u.ve = l;
121
121
  return;
122
122
  }
123
123
  }
@@ -126,23 +126,23 @@ function link(e, n, l = false) {
126
126
  // [deps.._depsTail] prefix — the O(1) equivalent of scanning the dep list
127
127
  // (the old alien-signals `isValidLink` walk, O(n²) when a computation
128
128
  // re-reads earlier deps non-consecutively, e.g. store leaf reads).
129
- const s = e.rt;
130
- if (s !== null && s.ce === n && (!t || s.nn === n.Ze)) {
129
+ const s = e._t;
130
+ if (s !== null && s.ce === n && (!t || s.Ft === n.Ke)) {
131
131
  // Gen-matched during a recompute = repeat touch this pass (AND); outside
132
132
  // a recompute there is no pass boundary, so the latest read labels it.
133
- if (t) s.me &&= l; else s.me = l;
133
+ if (t) s.ve &&= l; else s.ve = l;
134
134
  return;
135
135
  }
136
- const r = n.Ye = e.rt = {
137
- ut: e,
136
+ const r = n.je = e._t = {
137
+ ot: e,
138
138
  ce: n,
139
- it: u,
139
+ lt: u,
140
140
  en: s,
141
141
  ae: null,
142
- nn: n.Ze,
143
- me: l
142
+ Ft: n.Ke,
143
+ ve: l
144
144
  };
145
- if (o !== null) o.it = r; else n.nt = r;
145
+ if (o !== null) o.lt = r; else n.ut = r;
146
146
  if (s !== null) s.ae = r; else e.u = r;
147
147
  // New subscriber edge: staged-rewrite skips (§12d) must not miss it.
148
148
  bumpNotifyEpoch();
@@ -13,29 +13,29 @@ import { zombieQueue, dirtyQueue } from "./scheduler.js";
13
13
  * the heap and go directly to their effect queue; everything else is inserted
14
14
  * into its own (zombie-flag-routed) heap with the `_min` cursor pulled down.
15
15
  */ function enqueueSub(e) {
16
- if (e.Re === EFFECT_TRACKED) {
16
+ if (e.ge === EFFECT_TRACKED) {
17
17
  const E = e;
18
- if (!E.Xe) {
19
- E.Xe = true;
20
- E.C.enqueue(EFFECT_USER, E.Ut);
18
+ if (!E.tt) {
19
+ E.tt = true;
20
+ E.C.enqueue(EFFECT_USER, E.yt);
21
21
  }
22
22
  return;
23
23
  }
24
24
  const E = queueFor(e);
25
- if (E.xe > e.Le) E.xe = e.Le;
25
+ if (E.Qe > e.Me) E.Qe = e.Me;
26
26
  insertIntoHeap(e, E);
27
27
  }
28
28
 
29
29
  function actualInsertIntoHeap(e, E) {
30
- const t = (e.ke?.Ct ? e.ke.Ot?.Le : e.ke?.Le) ?? -1;
31
- if (t >= e.Le) e.Le = t + 1;
32
- const n = e.Le;
30
+ const t = (e.ke?.Gt ? e.ke.Dt?.Me : e.ke?.Me) ?? -1;
31
+ if (t >= e.Me) e.Me = t + 1;
32
+ const n = e.Me;
33
33
  const I = E.eE[n];
34
34
  if (I === undefined) E.eE[n] = e; else {
35
- const E = I.st;
36
- E.ot = e;
37
- e.st = E;
38
- I.st = e;
35
+ const E = I.ct;
36
+ E.rt = e;
37
+ e.ct = E;
38
+ I.ct = e;
39
39
  }
40
40
  if (n > E.EE) E.EE = n;
41
41
  }
@@ -71,23 +71,23 @@ function deleteFromHeap(e, E) {
71
71
  const t = e.ie;
72
72
  if (!(t & (REACTIVE_IN_HEAP | REACTIVE_IN_HEAP_HEIGHT))) return;
73
73
  e.ie = t & -25;
74
- const n = e.Le;
75
- if (e.st === e) E.eE[n] = undefined; else {
76
- const t = e.ot;
74
+ const n = e.Me;
75
+ if (e.ct === e) E.eE[n] = undefined; else {
76
+ const t = e.rt;
77
77
  const I = E.eE[n];
78
78
  const o = t ?? I;
79
- if (e === I) E.eE[n] = t; else e.st.ot = t;
80
- o.st = e.st;
79
+ if (e === I) E.eE[n] = t; else e.ct.rt = t;
80
+ o.ct = e.ct;
81
81
  }
82
- e.st = e;
83
- e.ot = undefined;
82
+ e.ct = e;
83
+ e.rt = undefined;
84
84
  }
85
85
 
86
86
  function markHeap(e) {
87
87
  if (e.tE) return;
88
88
  e.tE = true;
89
89
  for (let E = 0; E <= e.EE; E++) {
90
- for (let t = e.eE[E]; t !== undefined; t = t.ot) {
90
+ for (let t = e.eE[E]; t !== undefined; t = t.rt) {
91
91
  if (t.ie & REACTIVE_IN_HEAP) markNode(t);
92
92
  }
93
93
  }
@@ -114,11 +114,11 @@ function markNode(e, E = REACTIVE_DIRTY) {
114
114
 
115
115
  function runHeap(e, E) {
116
116
  e.tE = false;
117
- for (e.xe = 0; e.xe <= e.EE; e.xe++) {
118
- let t = e.eE[e.xe];
117
+ for (e.Qe = 0; e.Qe <= e.EE; e.Qe++) {
118
+ let t = e.eE[e.Qe];
119
119
  while (t !== undefined) {
120
120
  if (t.ie & REACTIVE_IN_HEAP) E(t); else adjustHeight(t, e);
121
- t = e.eE[e.xe];
121
+ t = e.eE[e.Qe];
122
122
  }
123
123
  }
124
124
  e.EE = 0;
@@ -126,14 +126,14 @@ function runHeap(e, E) {
126
126
 
127
127
  function adjustHeight(e, E) {
128
128
  deleteFromHeap(e, E);
129
- let t = e.Le;
130
- for (let E = e.nt; E; E = E.it) {
131
- const e = E.ut;
132
- const n = e.lt || e;
133
- if (n.oe && n.Le >= t) t = n.Le + 1;
129
+ let t = e.Me;
130
+ for (let E = e.ut; E; E = E.lt) {
131
+ const e = E.ot;
132
+ const n = e.st || e;
133
+ if (n.oe && n.Me >= t) t = n.Me + 1;
134
134
  }
135
- if (e.Le !== t) {
136
- e.Le = t;
135
+ if (e.Me !== t) {
136
+ e.Me = t;
137
137
  for (let E = e.u; E !== null; E = E.ae) {
138
138
  // Route each subscriber by its own zombie flag, mirroring the
139
139
  // post-recompute height-adjust path. Inserting into the running `heap`
@@ -1,4 +1,4 @@
1
- import { NOT_PENDING, CONFIG_HAS_LANE } from "./constants.js";
1
+ import { CONFIG_HAS_LANE, NOT_PENDING } from "./constants.js";
2
2
 
3
3
  import { ext } from "./core.js";
4
4
 
@@ -20,16 +20,16 @@ const activeLanes = new Set;
20
20
  }
21
21
  // Detect parent lane: _parentSource chains from pendingSignal → pendingValueComputed → original.
22
22
  // The child lane should not merge with the parent lane.
23
- const i = n.o?.Et;
24
- const t = i?.o?.Be;
23
+ const i = n.o?.Tt;
24
+ const t = i?.o?.Je;
25
25
  const r = t ? findLane(t) : null;
26
26
  e = {
27
- tn: n,
28
- Ae: new Set,
29
- rn: [ [], [] ],
30
- an: null,
31
- _e: activeTransition,
32
- sn: r
27
+ nn: n,
28
+ Oe: new Set,
29
+ tn: [ [], [] ],
30
+ rn: null,
31
+ Ae: activeTransition,
32
+ an: r
33
33
  };
34
34
  signalLanes.set(n, e);
35
35
  activeLanes.add(e);
@@ -39,8 +39,8 @@ const activeLanes = new Set;
39
39
  // parent-child is a property of the nodes, not of write order — otherwise
40
40
  // the owner's write merges the companion's subscribers into this lane and
41
41
  // their effects wait on its async instead of flushing immediately.
42
- adoptCompanionLane(n.o?.Ge, e);
43
- adoptCompanionLane(n.o?.ge, e);
42
+ adoptCompanionLane(n.o?.ye, e);
43
+ adoptCompanionLane(n.o?.Ce, e);
44
44
  return e;
45
45
  }
46
46
 
@@ -51,13 +51,13 @@ function adoptCompanionLane(n, e) {
51
51
  const t = findLane(i);
52
52
  // Only the companion's own unmerged root is safely re-parentable: a root
53
53
  // that absorbed other lanes carries work that is not a child of this owner.
54
- if (t !== e && t.tn === n && !t.sn) t.sn = e;
54
+ if (t !== e && t.nn === n && !t.an) t.an = e;
55
55
  }
56
56
 
57
57
  /**
58
58
  * Union-find: find the root lane.
59
59
  */ function findLane(n) {
60
- while (n.an) n = n.an;
60
+ while (n.rn) n = n.rn;
61
61
  return n;
62
62
  }
63
63
 
@@ -67,27 +67,27 @@ function adoptCompanionLane(n, e) {
67
67
  n = findLane(n);
68
68
  e = findLane(e);
69
69
  if (n === e) return n;
70
- e.an = n;
70
+ e.rn = n;
71
71
  // Move (not copy) the merged lane's work: after the merge all routing goes
72
72
  // through findLane() to the root, so anything left behind here is dead —
73
73
  // and anything *added* here later is a routing bug (INV-5).
74
- for (const i of e.Ae) n.Ae.add(i);
75
- e.Ae.clear();
76
- n.rn[0].push(...e.rn[0]);
77
- n.rn[1].push(...e.rn[1]);
78
- e.rn[0].length = 0;
79
- e.rn[1].length = 0;
74
+ for (const i of e.Oe) n.Oe.add(i);
75
+ e.Oe.clear();
76
+ n.tn[0].push(...e.tn[0]);
77
+ n.tn[1].push(...e.tn[1]);
78
+ e.tn[0].length = 0;
79
+ e.tn[1].length = 0;
80
80
  return n;
81
81
  }
82
82
 
83
83
  /**
84
84
  * Resolve a node's lane: follow union-find chain, verify active, clear if stale.
85
85
  */ function resolveLane(n) {
86
- const e = n.o?.Be;
86
+ const e = n.o?.Je;
87
87
  if (!e) return undefined;
88
88
  const i = findLane(e);
89
89
  if (activeLanes.has(i)) return i;
90
- if (n.o !== null) n.o.Be = undefined;
90
+ if (n.o !== null) n.o.Je = undefined;
91
91
  return undefined;
92
92
  }
93
93
 
@@ -99,17 +99,17 @@ function resolveTransition(n) {
99
99
  // reader. Chase merge chains; a dead owner settled through another path.
100
100
  if (hasActiveOverride(n) && n.o?.Nt) {
101
101
  const e = ext(n).Nt = currentTransition(n.o?.Nt);
102
- if (e.fn !== true) return e;
102
+ if (e.sn !== true) return e;
103
103
  if (n.o !== null) n.o.Nt = null;
104
104
  }
105
- return resolveLane(n)?._e ?? n._e;
105
+ return resolveLane(n)?.Ae ?? n.Ae;
106
106
  }
107
107
 
108
108
  /**
109
109
  * Check if a node has an active optimistic override.
110
110
  */ function hasActiveOverride(n) {
111
111
  const e = n.o;
112
- return e !== null && e.De !== undefined && e.De !== NOT_PENDING;
112
+ return e !== null && e.Pe !== undefined && e.Pe !== NOT_PENDING;
113
113
  }
114
114
 
115
115
  /**
@@ -117,13 +117,13 @@ function resolveTransition(n) {
117
117
  * a different active lane), merge unless the node has an active override.
118
118
  */ function assignOrMergeLane(n, e) {
119
119
  const i = findLane(e);
120
- const t = n.o?.Be;
120
+ const t = n.o?.Je;
121
121
  if (t) {
122
122
  // If the subscriber's lane was merged into another lane, it's stale —
123
123
  // replace it with the new source lane instead of following the merge chain
124
124
  // (which would incorrectly merge the new lane into the old group)
125
- if (t.an) {
126
- ext(n).Be = e;
125
+ if (t.rn) {
126
+ ext(n).Je = e;
127
127
  n.T |= CONFIG_HAS_LANE;
128
128
  return;
129
129
  }
@@ -132,15 +132,15 @@ function resolveTransition(n) {
132
132
  if (r !== i && !hasActiveOverride(n)) {
133
133
  // Parent-child lanes stay independent so isPending resolves without
134
134
  // waiting for the parent's async. The child keeps ownership.
135
- if (i.sn && findLane(i.sn) === r) {
136
- ext(n).Be = e;
135
+ if (i.an && findLane(i.an) === r) {
136
+ ext(n).Je = e;
137
137
  n.T |= CONFIG_HAS_LANE;
138
- } else if (r.sn && findLane(r.sn) === i) ; else mergeLanes(i, r);
138
+ } else if (r.an && findLane(r.an) === i) ; else mergeLanes(i, r);
139
139
  }
140
140
  return;
141
141
  }
142
142
  }
143
- ext(n).Be = e;
143
+ ext(n).Je = e;
144
144
  n.T |= CONFIG_HAS_LANE;
145
145
  }
146
146