@solidjs/signals 2.0.0-beta.21 → 2.0.0-beta.22

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.
@@ -14,16 +14,16 @@ import { GlobalQueue, haltReactivity } from "./scheduler.js";
14
14
  const r = !!R?.user;
15
15
  const f = createEffectNode(t, E, e, r ? EFFECT_USER : EFFECT_RENDER, notifyEffectStatus, R);
16
16
  recompute(f, true);
17
- !R?.defer && (f.De === EFFECT_USER || R?.schedule ? f.v.enqueue(f.De, runEffect.bind(null, f)) : runEffect(f));
17
+ !R?.defer && (f.Ae === EFFECT_USER || R?.schedule ? f.C.enqueue(f.Ae, runEffect.bind(null, f)) : runEffect(f));
18
18
  }
19
19
 
20
20
  function notifyEffectStatus(t, E) {
21
21
  // Use passed values if provided, otherwise read from node
22
- const e = t !== undefined ? t : this.i;
23
- const R = E !== undefined ? E : this.k;
22
+ const e = t !== undefined ? t : this.S;
23
+ const R = E !== undefined ? E : this._;
24
24
  if (e & STATUS_ERROR) {
25
- this.v.notify(this, STATUS_PENDING, 0);
26
- if (this.De === EFFECT_USER) {
25
+ this.C.notify(this, STATUS_PENDING, 0);
26
+ if (this.Ae === 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
@@ -33,23 +33,23 @@ function notifyEffectStatus(t, E) {
33
33
  // phase takes the success arm instead. Blocked forwards (explicit
34
34
  // `status` arg without node-state writes) don't queue: the status
35
35
  // re-propagates unblocked at commit.
36
- if (this.i & STATUS_ERROR) {
37
- this.it = true;
38
- this.v.enqueue(this.De, this.lt ??= runEffect.bind(null, this));
36
+ if (this.S & STATUS_ERROR) {
37
+ this.$e = true;
38
+ this.C.enqueue(this.Ae, this.Be ??= runEffect.bind(null, this));
39
39
  }
40
40
  return;
41
41
  }
42
- if (!this.v.notify(this, STATUS_ERROR, STATUS_ERROR)) {
42
+ if (!this.C.notify(this, STATUS_ERROR, STATUS_ERROR)) {
43
43
  haltReactivity(unwrapStatusError(R));
44
44
  throw R;
45
45
  }
46
- } else if (this.De === EFFECT_RENDER) {
47
- this.v.notify(this, STATUS_PENDING | STATUS_ERROR, e, R);
46
+ } else if (this.Ae === EFFECT_RENDER) {
47
+ this.C.notify(this, STATUS_PENDING | STATUS_ERROR, e, R);
48
48
  }
49
49
  }
50
50
 
51
51
  function runEffect(t) {
52
- if (!t.it || t.u & REACTIVE_DISPOSED) return;
52
+ if (!t.$e || t.se & 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,46 +60,46 @@ 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.i & STATUS_ERROR && t.De === EFFECT_USER) {
64
- const E = unwrapStatusError(t.k);
65
- t.Tt = t.Ue;
66
- t.it = false;
63
+ if (t.S & STATUS_ERROR && t.Ae === EFFECT_USER) {
64
+ const E = unwrapStatusError(t._);
65
+ t.rt = t.Re;
66
+ t.$e = false;
67
67
  try {
68
- t.St ? t.St(E, () => {
69
- const E = t.dt;
70
- t.dt = undefined;
68
+ t._t ? t._t(E, () => {
69
+ const E = t.Et;
70
+ t.Et = undefined;
71
71
  E?.();
72
72
  }) : console.error(E);
73
73
  } catch (E) {
74
- if (!t.v.notify(t, STATUS_ERROR, STATUS_ERROR)) {
74
+ if (!t.C.notify(t, STATUS_ERROR, STATUS_ERROR)) {
75
75
  haltReactivity(E);
76
76
  throw E;
77
77
  }
78
78
  }
79
79
  return;
80
80
  }
81
- const E = t.dt;
82
- t.dt = undefined;
81
+ const E = t.Et;
82
+ t.Et = undefined;
83
83
  try {
84
84
  E?.();
85
- const e = t.It(t.Ue, t.Tt);
85
+ const e = t.ct(t.Re, t.rt);
86
86
  if (false && e !== undefined && typeof e !== "function") ;
87
87
  // The final cleanup is invoked by disposeChildren at true disposal.
88
- t.dt = e;
88
+ t.Et = e;
89
89
  } catch (E) {
90
- t.k = new StatusError(t, E);
91
- t.i |= STATUS_ERROR;
92
- if (!t.v.notify(t, STATUS_ERROR, STATUS_ERROR)) {
90
+ t._ = new StatusError(t, E);
91
+ t.S |= STATUS_ERROR;
92
+ if (!t.C.notify(t, STATUS_ERROR, STATUS_ERROR)) {
93
93
  haltReactivity(E);
94
94
  throw E;
95
95
  }
96
96
  } finally {
97
- t.Tt = t.Ue;
98
- t.it = false;
97
+ t.rt = t.Re;
98
+ t.$e = false;
99
99
  }
100
100
  }
101
101
 
102
- GlobalQueue.ut = runEffect;
102
+ GlobalQueue.Je = runEffect;
103
103
 
104
104
  /**
105
105
  * Internal tracked effect - bypasses heap, goes directly to effect queue.
@@ -107,39 +107,39 @@ GlobalQueue.ut = runEffect;
107
107
  * Uses stale reads.
108
108
  */ function trackedEffect(t, E) {
109
109
  const run = () => {
110
- if (!e.it || e.u & REACTIVE_DISPOSED) return;
110
+ if (!e.$e || e.se & REACTIVE_DISPOSED) return;
111
111
  try {
112
- e.it = false;
112
+ e.$e = false;
113
113
  recompute(e);
114
114
  } finally {}
115
115
  };
116
116
  const e = computed(() => {
117
- const E = e.dt;
118
- e.dt = undefined;
117
+ const E = e.Et;
118
+ e.Et = undefined;
119
119
  E?.();
120
120
  const R = staleValues(t);
121
- e.dt = R;
121
+ e.Et = R;
122
122
  }, {
123
123
  ...E,
124
124
  lazy: true
125
125
  });
126
- e.dt = undefined;
127
- e.U = e.U & ~CONFIG_AUTO_DISPOSE | CONFIG_CHILDREN_FORBIDDEN;
128
- e.it = true;
129
- e.De = EFFECT_TRACKED;
130
- e.C = (t, E) => {
131
- const R = t !== undefined ? t : e.i;
126
+ e.Et = undefined;
127
+ e.T = e.T & ~CONFIG_AUTO_DISPOSE | CONFIG_CHILDREN_FORBIDDEN;
128
+ e.$e = true;
129
+ e.Ae = EFFECT_TRACKED;
130
+ e.i = (t, E) => {
131
+ const R = t !== undefined ? t : e.S;
132
132
  if (R & STATUS_ERROR) {
133
- e.v.notify(e, STATUS_PENDING, 0);
134
- const t = E !== undefined ? E : e.k;
135
- if (!e.v.notify(e, STATUS_ERROR, STATUS_ERROR)) {
133
+ e.C.notify(e, STATUS_PENDING, 0);
134
+ const t = E !== undefined ? E : e._;
135
+ if (!e.C.notify(e, STATUS_ERROR, STATUS_ERROR)) {
136
136
  haltReactivity(unwrapStatusError(t));
137
137
  throw t;
138
138
  }
139
139
  }
140
140
  };
141
- e.Ft = run;
142
- e.v.enqueue(EFFECT_USER, run);
141
+ e.ht = run;
142
+ e.C.enqueue(EFFECT_USER, run);
143
143
  }
144
144
 
145
145
  export { effect, trackedEffect };
@@ -46,11 +46,11 @@ function wireExternalSource(e) {
46
46
  equals: false,
47
47
  ownedWrite: true
48
48
  });
49
- const r = externalSourceConfig.factory(e.xe, () => {
49
+ const r = externalSourceConfig.factory(e.ke, () => {
50
50
  setSignal(n, undefined);
51
51
  });
52
52
  cleanup(() => r.dispose());
53
- e.xe = e => {
53
+ e.ke = e => {
54
54
  read(n);
55
55
  return r.track(e);
56
56
  };
@@ -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.Ot = externalSourceConfig ? wireExternalSource : null;
68
- GlobalQueue.Rt = externalSourceConfig ? externalUntrack : null;
67
+ GlobalQueue.Tt = externalSourceConfig ? wireExternalSource : null;
68
+ GlobalQueue.It = externalSourceConfig ? externalUntrack : null;
69
69
  }
70
70
 
71
71
  function enableExternalSource(e) {
@@ -7,61 +7,67 @@ import { disposeChildren } from "./owner.js";
7
7
  import "./scheduler.js";
8
8
 
9
9
  // https://github.com/stackblitz/alien-signals/blob/v2.0.3/src/system.ts#L100
10
- function unlinkSubs(n) {
11
- const l = n.ot;
12
- const e = n.st;
13
- const u = n.de;
14
- const s = n.nn;
15
- if (u !== null) u.nn = s; else l.Et = s;
16
- if (s !== null) s.de = u; else {
17
- l.p = u;
10
+ function unlinkSubs(l) {
11
+ const n = l.tt;
12
+ const e = l.et;
13
+ const u = l.ue;
14
+ const s = l.ll;
15
+ if (u !== null) u.ll = s; else n.ot = s;
16
+ if (s !== null) s.ue = u; else {
17
+ n.o = u;
18
18
  if (u === null) {
19
- l.ct?.();
19
+ n.it?.();
20
20
  // No more subscribers; only tear down if CONFIG_AUTO_DISPOSE is set.
21
- const n = l;
22
- n.xe && n.U & CONFIG_AUTO_DISPOSE && !(n.u & REACTIVE_ZOMBIE) && unobserved(n);
21
+ const l = n;
22
+ l.ke && l.T & CONFIG_AUTO_DISPOSE && !(l.se & REACTIVE_ZOMBIE) && unobserved(l);
23
23
  }
24
24
  }
25
25
  return e;
26
26
  }
27
27
 
28
- function trimStaleDeps(n) {
29
- const l = n.Ke;
30
- let e = l !== null ? l.st : n.S;
28
+ function trimStaleDeps(l) {
29
+ const n = l.qe;
30
+ let e = n !== null ? n.et : l.Xe;
31
31
  if (e !== null) {
32
32
  do {
33
33
  e = unlinkSubs(e);
34
34
  } while (e !== null);
35
- if (l !== null) l.st = null; else n.S = null;
35
+ if (n !== null) n.et = null; else l.Xe = null;
36
36
  }
37
37
  }
38
38
 
39
- function unobserved(n) {
40
- deleteFromHeap(n, queueFor(n));
41
- let l = n.S;
42
- while (l !== null) {
43
- l = unlinkSubs(l);
39
+ function unobserved(l) {
40
+ deleteFromHeap(l, queueFor(l));
41
+ let n = l.Xe;
42
+ while (n !== null) {
43
+ n = unlinkSubs(n);
44
44
  }
45
- n.S = null;
46
- n.Ke = null;
47
- disposeChildren(n, true);
45
+ l.Xe = null;
46
+ l.qe = null;
47
+ disposeChildren(l, true);
48
48
  }
49
49
 
50
50
  // https://github.com/stackblitz/alien-signals/blob/v2.0.3/src/system.ts#L52
51
- function link(n, l, e = false) {
52
- const u = l.Ke;
53
- if (u !== null && u.ot === n) {
54
- u.Qe = e;
51
+ function link(l, n, e = false) {
52
+ // Repeat touches within one pass AND-combine `_pendingObserver`: a probe
53
+ // read (`isPending(() => x())`) beside a value read of the same dep must
54
+ // not relabel the value dependency as probe-only — the value read is what
55
+ // real-error propagation and affects() coverage key off, regardless of
56
+ // read order within the computation.
57
+ const u = n.qe;
58
+ if (u !== null && u.tt === l) {
59
+ u.De &&= e;
55
60
  return;
56
61
  }
57
62
  let s = null;
58
- const t = l.u & REACTIVE_RECOMPUTING_DEPS;
63
+ const t = n.se & REACTIVE_RECOMPUTING_DEPS;
59
64
  if (t) {
60
- s = u !== null ? u.st : l.S;
61
- if (s !== null && s.ot === n) {
62
- s.ln = l.ze;
63
- l.Ke = s;
64
- s.Qe = e;
65
+ s = u !== null ? u.et : n.Xe;
66
+ if (s !== null && s.tt === l) {
67
+ s.nl = n.Ye;
68
+ n.qe = s;
69
+ // First touch of this pass: the previous pass's label is stale.
70
+ s.De = e;
65
71
  return;
66
72
  }
67
73
  }
@@ -70,22 +76,24 @@ function link(n, l, e = false) {
70
76
  // [deps.._depsTail] prefix — the O(1) equivalent of scanning the dep list
71
77
  // (the old alien-signals `isValidLink` walk, O(n²) when a computation
72
78
  // re-reads earlier deps non-consecutively, e.g. store leaf reads).
73
- const i = n.Et;
74
- if (i !== null && i.Ee === l && (!t || i.ln === l.ze)) {
75
- i.Qe = e;
79
+ const i = l.ot;
80
+ if (i !== null && i.le === n && (!t || i.nl === n.Ye)) {
81
+ // Gen-matched during a recompute = repeat touch this pass (AND); outside
82
+ // a recompute there is no pass boundary, so the latest read labels it.
83
+ if (t) i.De &&= e; else i.De = e;
76
84
  return;
77
85
  }
78
- const o = l.Ke = n.Et = {
79
- ot: n,
80
- Ee: l,
81
- st: s,
82
- nn: i,
83
- de: null,
84
- ln: l.ze,
85
- Qe: e
86
+ const o = n.qe = l.ot = {
87
+ tt: l,
88
+ le: n,
89
+ et: s,
90
+ ll: i,
91
+ ue: null,
92
+ nl: n.Ye,
93
+ De: e
86
94
  };
87
- if (u !== null) u.st = o; else l.S = o;
88
- if (i !== null) i.de = o; else n.p = o;
95
+ if (u !== null) u.et = o; else n.Xe = o;
96
+ if (i !== null) i.ue = o; else l.o = o;
89
97
  }
90
98
 
91
99
  export { link, trimStaleDeps, unlinkSubs, unobserved };
@@ -3,7 +3,7 @@ import { REACTIVE_IN_HEAP, EFFECT_TRACKED, EFFECT_USER, REACTIVE_IN_HEAP_HEIGHT,
3
3
  import { zombieQueue, dirtyQueue } from "./scheduler.js";
4
4
 
5
5
  /** The queue a node belongs to, picked from its own zombie flag. */ function queueFor(e) {
6
- return e.u & REACTIVE_ZOMBIE ? zombieQueue : dirtyQueue;
6
+ return e.se & REACTIVE_ZOMBIE ? zombieQueue : dirtyQueue;
7
7
  }
8
8
 
9
9
  /**
@@ -11,40 +11,40 @@ import { zombieQueue, dirtyQueue } from "./scheduler.js";
11
11
  * the heap and go directly to their effect queue; everything else is inserted
12
12
  * into its own (zombie-flag-routed) heap with the `_min` cursor pulled down.
13
13
  */ function enqueueSub(e) {
14
- if (e.De === EFFECT_TRACKED) {
14
+ if (e.Ae === EFFECT_TRACKED) {
15
15
  const E = e;
16
- if (!E.it) {
17
- E.it = true;
18
- E.v.enqueue(EFFECT_USER, E.Ft);
16
+ if (!E.$e) {
17
+ E.$e = true;
18
+ E.C.enqueue(EFFECT_USER, E.ht);
19
19
  }
20
20
  return;
21
21
  }
22
22
  const E = queueFor(e);
23
- if (E.Le > e.qe) E.Le = e.qe;
23
+ if (E.Fe > e.He) E.Fe = e.He;
24
24
  insertIntoHeap(e, E);
25
25
  }
26
26
 
27
27
  function actualInsertIntoHeap(e, E) {
28
- const t = (e.Fe?.At ? e.Fe.Ct?.qe : e.Fe?.qe) ?? -1;
29
- if (t >= e.qe) e.qe = t + 1;
30
- const n = e.qe;
28
+ const t = (e.Ge?.ft ? e.Ge.Nt?.He : e.Ge?.He) ?? -1;
29
+ if (t >= e.He) e.He = t + 1;
30
+ const n = e.He;
31
31
  const I = E.eE[n];
32
32
  if (I === undefined) E.eE[n] = e; else {
33
- const E = I.ft;
34
- E._t = e;
35
- e.ft = E;
36
- I.ft = e;
33
+ const E = I.ut;
34
+ E.lt = e;
35
+ e.ut = E;
36
+ I.ut = e;
37
37
  }
38
38
  if (n > E.EE) E.EE = n;
39
39
  }
40
40
 
41
41
  function insertIntoHeap(e, E) {
42
- let t = e.u;
42
+ let t = e.se;
43
43
  if (t & (REACTIVE_IN_HEAP | REACTIVE_RECOMPUTING_DEPS | REACTIVE_MANUAL_WRITE)) return;
44
44
  if (t & REACTIVE_CHECK) {
45
- e.u = t & -4 | REACTIVE_DIRTY | REACTIVE_IN_HEAP;
45
+ e.se = t & -4 | REACTIVE_DIRTY | REACTIVE_IN_HEAP;
46
46
  } else {
47
- e.u = t | REACTIVE_IN_HEAP;
47
+ e.se = t | REACTIVE_IN_HEAP;
48
48
  // An unmarked node entering a marked heap invalidates the markHeap memo:
49
49
  // `_marked` is only reset by runHeap, so a write between two mid-tick
50
50
  // pulls (read-time markHeap + updateIfNecessary) would otherwise leave
@@ -56,49 +56,49 @@ function insertIntoHeap(e, E) {
56
56
  }
57
57
 
58
58
  function insertIntoHeapHeight(e, E) {
59
- let t = e.u;
59
+ let t = e.se;
60
60
  if (t & (REACTIVE_IN_HEAP | REACTIVE_RECOMPUTING_DEPS | REACTIVE_IN_HEAP_HEIGHT | REACTIVE_MANUAL_WRITE)) return;
61
- e.u = t | REACTIVE_IN_HEAP_HEIGHT;
61
+ e.se = t | REACTIVE_IN_HEAP_HEIGHT;
62
62
  actualInsertIntoHeap(e, E);
63
63
  }
64
64
 
65
65
  function deleteFromHeap(e, E) {
66
- const t = e.u;
66
+ const t = e.se;
67
67
  if (!(t & (REACTIVE_IN_HEAP | REACTIVE_IN_HEAP_HEIGHT))) return;
68
- e.u = t & -25;
69
- const n = e.qe;
70
- if (e.ft === e) E.eE[n] = undefined; else {
71
- const t = e._t;
68
+ e.se = t & -25;
69
+ const n = e.He;
70
+ if (e.ut === e) E.eE[n] = undefined; else {
71
+ const t = e.lt;
72
72
  const I = E.eE[n];
73
73
  const o = t ?? I;
74
- if (e === I) E.eE[n] = t; else e.ft._t = t;
75
- o.ft = e.ft;
74
+ if (e === I) E.eE[n] = t; else e.ut.lt = t;
75
+ o.ut = e.ut;
76
76
  }
77
- e.ft = e;
78
- e._t = undefined;
77
+ e.ut = e;
78
+ e.lt = undefined;
79
79
  }
80
80
 
81
81
  function markHeap(e) {
82
82
  if (e.tE) return;
83
83
  e.tE = true;
84
84
  for (let E = 0; E <= e.EE; E++) {
85
- for (let t = e.eE[E]; t !== undefined; t = t._t) {
86
- if (t.u & REACTIVE_IN_HEAP) markNode(t);
85
+ for (let t = e.eE[E]; t !== undefined; t = t.lt) {
86
+ if (t.se & REACTIVE_IN_HEAP) markNode(t);
87
87
  }
88
88
  }
89
89
  }
90
90
 
91
91
  function markNode(e, E = REACTIVE_DIRTY) {
92
- const t = e.u;
92
+ const t = e.se;
93
93
  if ((t & (REACTIVE_CHECK | REACTIVE_DIRTY)) >= E) return;
94
- e.u = t & -4 | E;
95
- for (let E = e.p; E !== null; E = E.de) {
96
- markNode(E.Ee, REACTIVE_CHECK);
94
+ e.se = t & -4 | E;
95
+ for (let E = e.o; E !== null; E = E.ue) {
96
+ markNode(E.le, REACTIVE_CHECK);
97
97
  }
98
- if (e.G !== null) {
99
- for (let E = e.G; E !== null; E = E.Ne) {
100
- for (let e = E.p; e !== null; e = e.de) {
101
- markNode(e.Ee, REACTIVE_CHECK);
98
+ if (e.u !== null) {
99
+ for (let E = e.u; E !== null; E = E.fe) {
100
+ for (let e = E.o; e !== null; e = e.ue) {
101
+ markNode(e.le, REACTIVE_CHECK);
102
102
  }
103
103
  }
104
104
  }
@@ -106,11 +106,11 @@ function markNode(e, E = REACTIVE_DIRTY) {
106
106
 
107
107
  function runHeap(e, E) {
108
108
  e.tE = false;
109
- for (e.Le = 0; e.Le <= e.EE; e.Le++) {
110
- let t = e.eE[e.Le];
109
+ for (e.Fe = 0; e.Fe <= e.EE; e.Fe++) {
110
+ let t = e.eE[e.Fe];
111
111
  while (t !== undefined) {
112
- if (t.u & REACTIVE_IN_HEAP) E(t); else adjustHeight(t, e);
113
- t = e.eE[e.Le];
112
+ if (t.se & REACTIVE_IN_HEAP) E(t); else adjustHeight(t, e);
113
+ t = e.eE[e.Fe];
114
114
  }
115
115
  }
116
116
  e.EE = 0;
@@ -118,21 +118,21 @@ function runHeap(e, E) {
118
118
 
119
119
  function adjustHeight(e, E) {
120
120
  deleteFromHeap(e, E);
121
- let t = e.qe;
122
- for (let E = e.S; E; E = E.st) {
123
- const e = E.ot;
124
- const n = e.rt || e;
125
- if (n.xe && n.qe >= t) t = n.qe + 1;
121
+ let t = e.He;
122
+ for (let E = e.Xe; E; E = E.et) {
123
+ const e = E.tt;
124
+ const n = e.nt || e;
125
+ if (n.ke && n.He >= t) t = n.He + 1;
126
126
  }
127
- if (e.qe !== t) {
128
- e.qe = t;
129
- for (let E = e.p; E !== null; E = E.de) {
127
+ if (e.He !== t) {
128
+ e.He = t;
129
+ for (let E = e.o; E !== null; E = E.ue) {
130
130
  // Route each subscriber by its own zombie flag, mirroring the
131
131
  // post-recompute height-adjust path. Inserting into the running `heap`
132
132
  // unconditionally can park a zombie in `dirtyQueue` (or a live node in
133
133
  // `zombieQueue`), breaking the flag/queue invariant `deleteFromHeap`
134
134
  // relies on — the same corruption class as #2759.
135
- insertIntoHeapHeight(E.Ee, queueFor(E.Ee));
135
+ insertIntoHeapHeight(E.le, queueFor(E.le));
136
136
  }
137
137
  }
138
138
  }
@@ -18,15 +18,15 @@ const activeLanes = new Set;
18
18
  }
19
19
  // Detect parent lane: _parentSource chains from pendingSignal → pendingValueComputed → original.
20
20
  // The child lane should not merge with the parent lane.
21
- const i = n.en;
22
- const r = i?.Je ? findLane(i.Je) : null;
21
+ const i = n.nn;
22
+ const r = i?.je ? findLane(i.je) : null;
23
23
  e = {
24
- rn: n,
25
- Pe: new Set,
26
- tn: [ [], [] ],
27
- an: null,
28
- ve: activeTransition,
29
- sn: r
24
+ en: n,
25
+ de: new Set,
26
+ rn: [ [], [] ],
27
+ tn: null,
28
+ Ue: activeTransition,
29
+ an: r
30
30
  };
31
31
  signalLanes.set(n, e);
32
32
  activeLanes.add(e);
@@ -36,8 +36,8 @@ const activeLanes = new Set;
36
36
  // parent-child is a property of the nodes, not of write order — otherwise
37
37
  // the owner's write merges the companion's subscribers into this lane and
38
38
  // their effects wait on its async instead of flushing immediately.
39
- adoptCompanionLane(n.ye, e);
40
- adoptCompanionLane(n.pe, e);
39
+ adoptCompanionLane(n.ge, e);
40
+ adoptCompanionLane(n.he, e);
41
41
  return e;
42
42
  }
43
43
 
@@ -48,13 +48,13 @@ function adoptCompanionLane(n, e) {
48
48
  const r = findLane(i);
49
49
  // Only the companion's own unmerged root is safely re-parentable: a root
50
50
  // that absorbed other lanes carries work that is not a child of this owner.
51
- if (r !== e && r.rn === n && !r.sn) r.sn = e;
51
+ if (r !== e && r.en === n && !r.an) r.an = e;
52
52
  }
53
53
 
54
54
  /**
55
55
  * Union-find: find the root lane.
56
56
  */ function findLane(n) {
57
- while (n.an) n = n.an;
57
+ while (n.tn) n = n.tn;
58
58
  return n;
59
59
  }
60
60
 
@@ -64,27 +64,27 @@ function adoptCompanionLane(n, e) {
64
64
  n = findLane(n);
65
65
  e = findLane(e);
66
66
  if (n === e) return n;
67
- e.an = n;
67
+ e.tn = n;
68
68
  // Move (not copy) the merged lane's work: after the merge all routing goes
69
69
  // through findLane() to the root, so anything left behind here is dead —
70
70
  // and anything *added* here later is a routing bug (INV-5).
71
- for (const i of e.Pe) n.Pe.add(i);
72
- e.Pe.clear();
73
- n.tn[0].push(...e.tn[0]);
74
- n.tn[1].push(...e.tn[1]);
75
- e.tn[0].length = 0;
76
- e.tn[1].length = 0;
71
+ for (const i of e.de) n.de.add(i);
72
+ e.de.clear();
73
+ n.rn[0].push(...e.rn[0]);
74
+ n.rn[1].push(...e.rn[1]);
75
+ e.rn[0].length = 0;
76
+ e.rn[1].length = 0;
77
77
  return n;
78
78
  }
79
79
 
80
80
  /**
81
81
  * Resolve a node's lane: follow union-find chain, verify active, clear if stale.
82
82
  */ function resolveLane(n) {
83
- const e = n.Je;
83
+ const e = n.je;
84
84
  if (!e) return undefined;
85
85
  const i = findLane(e);
86
86
  if (activeLanes.has(i)) return i;
87
- n.Je = undefined;
87
+ n.je = undefined;
88
88
  return undefined;
89
89
  }
90
90
 
@@ -94,18 +94,18 @@ function resolveTransition(n) {
94
94
  // transactions (#2912) — the merged root's _transition would hand this
95
95
  // node's override to whichever action wrote last through the shared
96
96
  // reader. Chase merge chains; a dead owner settled through another path.
97
- if (hasActiveOverride(n) && n.fn) {
98
- const e = n.fn = currentTransition(n.fn);
99
- if (e.cn !== true) return e;
100
- n.fn = null;
97
+ if (hasActiveOverride(n) && n.sn) {
98
+ const e = n.sn = currentTransition(n.sn);
99
+ if (e.fn !== true) return e;
100
+ n.sn = null;
101
101
  }
102
- return resolveLane(n)?.ve ?? n.ve;
102
+ return resolveLane(n)?.Ue ?? n.Ue;
103
103
  }
104
104
 
105
105
  /**
106
106
  * Check if a node has an active optimistic override.
107
107
  */ function hasActiveOverride(n) {
108
- return !!(n.be !== undefined && n.be !== NOT_PENDING);
108
+ return !!(n.Ee !== undefined && n.Ee !== NOT_PENDING);
109
109
  }
110
110
 
111
111
  /**
@@ -113,13 +113,13 @@ function resolveTransition(n) {
113
113
  * a different active lane), merge unless the node has an active override.
114
114
  */ function assignOrMergeLane(n, e) {
115
115
  const i = findLane(e);
116
- const r = n.Je;
116
+ const r = n.je;
117
117
  if (r) {
118
118
  // If the subscriber's lane was merged into another lane, it's stale —
119
119
  // replace it with the new source lane instead of following the merge chain
120
120
  // (which would incorrectly merge the new lane into the old group)
121
- if (r.an) {
122
- n.Je = e;
121
+ if (r.tn) {
122
+ n.je = e;
123
123
  return;
124
124
  }
125
125
  const t = findLane(r);
@@ -127,14 +127,14 @@ function resolveTransition(n) {
127
127
  if (t !== i && !hasActiveOverride(n)) {
128
128
  // Parent-child lanes stay independent so isPending resolves without
129
129
  // waiting for the parent's async. The child keeps ownership.
130
- if (i.sn && findLane(i.sn) === t) {
131
- n.Je = e;
132
- } else if (t.sn && findLane(t.sn) === i) ; else mergeLanes(i, t);
130
+ if (i.an && findLane(i.an) === t) {
131
+ n.je = e;
132
+ } else if (t.an && findLane(t.an) === i) ; else mergeLanes(i, t);
133
133
  }
134
134
  return;
135
135
  }
136
136
  }
137
- n.Je = e;
137
+ n.je = e;
138
138
  }
139
139
 
140
140
  export { activeLanes, assignOrMergeLane, findLane, getOrCreateLane, hasActiveOverride, mergeLanes, resolveLane, resolveTransition, signalLanes };