@solidjs/signals 2.0.0-beta.30 → 2.0.0-beta.32

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.
@@ -32,15 +32,15 @@ let pendingProbe = null;
32
32
  * Get or create the pending signal for a node (lazy).
33
33
  * Used by isPending() to track pending state reactively.
34
34
  */ function getPendingSignal(e) {
35
- if (!e.he) {
35
+ if (!e.Re) {
36
36
  // Start false, write true if pending - ensures reversion returns to false
37
- e.he = optimisticSignal(false, {
37
+ e.Re = optimisticSignal(false, {
38
38
  ownedWrite: true
39
39
  });
40
- e.he.nn = e;
41
- if (computePendingState(e)) setSignal(e.he, true);
40
+ e.Re.nn = e;
41
+ if (computePendingState(e)) setSignal(e.Re, true);
42
42
  }
43
- return e.he;
43
+ return e.Re;
44
44
  }
45
45
 
46
46
  function collectPendingSources(e) {
@@ -102,10 +102,10 @@ function collectPendingSources(e) {
102
102
 
103
103
  function quietPending(e) {
104
104
  if (e.oe) {
105
- for (const t of e.oe) if (!t.Re) return false;
105
+ for (const t of e.oe) if (!t.Ue) return false;
106
106
  return true;
107
107
  }
108
- return e.Re;
108
+ return e.Ue;
109
109
  }
110
110
 
111
111
  function newQuestionInFlight(e) {
@@ -129,27 +129,27 @@ function computePendingState(e) {
129
129
  return !!(n.se & REACTIVE_MANUAL_WRITE) || !n.Te && !(n.S & STATUS_PENDING) || !!(n.S & STATUS_PENDING) && quietPending(n);
130
130
  }
131
131
  if (e.De !== NOT_PENDING && !(t.S & STATUS_UNINITIALIZED)) {
132
- if (hasActiveOverride(e)) return !e.be || !e.be(e.De, unwrapOverride(e.Ae));
132
+ if (hasActiveOverride(e)) return !e.he || !e.he(e.De, unwrapOverride(e.Ae));
133
133
  return true;
134
134
  }
135
135
  return newQuestionInFlight(t);
136
136
  }
137
137
 
138
138
  function syncCompanions(e, t) {
139
- if (e.he) updatePendingSignal(e);
139
+ if (e.Re) updatePendingSignal(e);
140
140
  if (e.pe) setSignal(e.pe, t);
141
141
  }
142
142
 
143
143
  function updatePendingSignal(e) {
144
- if (e.he) {
145
- setSignal(e.he, computePendingState(e));
144
+ if (e.Re) {
145
+ setSignal(e.Re, computePendingState(e));
146
146
  }
147
147
  if (e.pe) updatePendingSignal(e.pe);
148
148
  }
149
149
 
150
150
  function updateChildCompanions(e) {
151
151
  for (let t = e.u; t !== null; t = t.fe) {
152
- if (t.he || t.pe) updatePendingSignal(t);
152
+ if (t.Re || t.pe) updatePendingSignal(t);
153
153
  }
154
154
  }
155
155
 
@@ -167,7 +167,7 @@ function updateChildCompanions(e) {
167
167
  const visit = e => {
168
168
  if (i.has(e)) return;
169
169
  i.add(e);
170
- if (e.he || e.pe) n(e);
170
+ if (e.Re || e.pe) n(e);
171
171
  for (let t = e.o; t !== null; t = t.ue) visit(t.le);
172
172
  for (let t = e.u ?? null; t !== null; t = t.fe) {
173
173
  visit(t);
@@ -177,11 +177,11 @@ function updateChildCompanions(e) {
177
177
  }
178
178
 
179
179
  function snapCompanionsToState(e) {
180
- const t = e.he;
180
+ const t = e.Re;
181
181
  if (t && (t.Ae === undefined || t.Ae === NOT_PENDING)) {
182
182
  const n = computePendingState(e);
183
- if (t.Ue !== n || t.De !== NOT_PENDING) {
184
- t.Ue = n;
183
+ if (t.be !== n || t.De !== NOT_PENDING) {
184
+ t.be = n;
185
185
  t.De = NOT_PENDING;
186
186
  t.Se = clock;
187
187
  insertSubs(t);
@@ -190,7 +190,7 @@ function snapCompanionsToState(e) {
190
190
  }
191
191
  const n = e.pe;
192
192
  if (n && !(n.se & REACTIVE_DISPOSED)) {
193
- if ((n.Ae === undefined || n.Ae === NOT_PENDING) && n.De === NOT_PENDING && !Object.is(n.Ue, e.Ue) && !(n.se & (REACTIVE_DIRTY | REACTIVE_CHECK))) {
193
+ if ((n.Ae === undefined || n.Ae === NOT_PENDING) && n.De === NOT_PENDING && !Object.is(n.be, e.be) && !(n.se & (REACTIVE_DIRTY | REACTIVE_CHECK))) {
194
194
  n.se |= REACTIVE_DIRTY;
195
195
  insertIntoHeap(n, queueFor(n));
196
196
  insertSubs(n);
@@ -223,7 +223,7 @@ function getLatestValueComputed(e) {
223
223
  const t = getLatestValueComputed(e);
224
224
  const n = latestReadActive;
225
225
  setLatestReadActive(false);
226
- const i = e.Ae !== undefined && e.Ae !== NOT_PENDING ? unwrapOverride(e.Ae) : e.Ue;
226
+ const i = e.Ae !== undefined && e.Ae !== NOT_PENDING ? unwrapOverride(e.Ae) : e.be;
227
227
  let r;
228
228
  try {
229
229
  // An untracked latest() read has no reading context, so read() never
@@ -279,9 +279,9 @@ function recordFreshRead(e, t) {
279
279
 
280
280
  function applyReask(e, t) {
281
281
  const n = !!(e.S & STATUS_PENDING);
282
- const i = t && !(n && !e.Re);
283
- const r = n && e.Re !== i;
284
- e.Re = i;
282
+ const i = t && !(n && !e.Ue);
283
+ const r = n && e.Ue !== i;
284
+ e.Ue = i;
285
285
  return r;
286
286
  }
287
287
 
@@ -33,8 +33,8 @@ function createOptimisticStore(e, t, r) {
33
33
  // clobbering instead of composing). Optimistic state clears when truth
34
34
  // lands or its transaction ends — never mid-refetch. Wrapped here (engine
35
35
  // is already installed above) so store-free apps never carry the check.
36
- const e = GlobalQueue.dn;
37
- GlobalQueue.dn = t => {
36
+ const e = GlobalQueue.Tn;
37
+ GlobalQueue.Tn = t => {
38
38
  for (const e of t.cn) {
39
39
  if ((e[$TARGET]?.[STORE_FIREWALL]?.S ?? 0) & STATUS_PENDING) return true;
40
40
  }
@@ -121,8 +121,8 @@ function clearOptimisticStores(e, t) {
121
121
  T.Ae = NOT_PENDING;
122
122
  T.sn = null;
123
123
  T.De = NOT_PENDING;
124
- T.Ue = o;
125
- if (!T.be || !T.be(n, o)) {
124
+ T.be = o;
125
+ if (!T.he || !T.he(n, o)) {
126
126
  insertSubs(T, true);
127
127
  schedule();
128
128
  }
@@ -291,7 +291,7 @@ function ownEnumerableKeysPlain(e) {
291
291
  * The value a store leaf's backing signal currently shows to readers: active
292
292
  * override, else held pending value, else committed value.
293
293
  */ function visibleNodeValue(e) {
294
- return e.Ae !== undefined && e.Ae !== NOT_PENDING ? unwrapOverride(e.Ae) : e.De !== NOT_PENDING ? e.De : e.Ue;
294
+ return e.Ae !== undefined && e.Ae !== NOT_PENDING ? unwrapOverride(e.Ae) : e.De !== NOT_PENDING ? e.De : e.be;
295
295
  }
296
296
 
297
297
  function hasOwnStoreProperty(e, t) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@solidjs/signals",
3
- "version": "2.0.0-beta.30",
3
+ "version": "2.0.0-beta.32",
4
4
  "description": "Solid's reactive primitives: signals, memos, effects, stores, and async-aware computations.",
5
5
  "author": "Ryan Carniato",
6
6
  "license": "MIT",