@tanstack/solid-query-devtools 6.0.0-alpha.0 → 6.0.0-alpha.2
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/build/chunk/{KLS34EMT.js → 75V4Q6CI.js} +337 -171
- package/build/chunk/{RDKFYAW3.js → AU2REB6C.js} +526 -365
- package/build/dev.cjs +360 -176
- package/build/dev.js +3 -3
- package/build/dev.jsx +343 -174
- package/build/devtools/{OWDQYIA3.js → BK5V6NH3.js} +13 -4
- package/build/devtools/{CHPGNEUY.js → CBPRJMAC.js} +13 -4
- package/build/devtools/{MU7AYS7J.jsx → R2AGYIME.jsx} +12 -3
- package/build/devtoolsPanel/{CQ4HXSZG.js → A5BO2WVY.js} +13 -4
- package/build/devtoolsPanel/{LLRYE7CA.js → KNUODKZO.js} +13 -4
- package/build/devtoolsPanel/{NLCUKFXJ.jsx → QZBU22C7.jsx} +12 -3
- package/build/index.cjs +549 -370
- package/build/index.js +3 -3
- package/build/index.jsx +528 -367
- package/package.json +6 -6
- package/src/devtools.tsx +14 -3
- package/src/devtoolsPanel.tsx +14 -3
package/build/index.cjs
CHANGED
|
@@ -14,7 +14,7 @@ var __export = (target, all) => {
|
|
|
14
14
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
15
15
|
};
|
|
16
16
|
|
|
17
|
-
// ../../node_modules/.pnpm/@solidjs+signals@0.
|
|
17
|
+
// ../../node_modules/.pnpm/@solidjs+signals@0.13.6/node_modules/@solidjs/signals/dist/prod.js
|
|
18
18
|
function actualInsertIntoHeap(e, t) {
|
|
19
19
|
const n = (e.i?.t ? e.i.u?.o : e.i?.o) ?? -1;
|
|
20
20
|
if (n >= e.o) e.o = n + 1;
|
|
@@ -62,12 +62,12 @@ function deleteFromHeap(e, t) {
|
|
|
62
62
|
}
|
|
63
63
|
function runHeap(e, t) {
|
|
64
64
|
e._ = false;
|
|
65
|
-
for (e.
|
|
66
|
-
let n = e.l[e.
|
|
65
|
+
for (e.P = 0; e.P <= e.R; e.P++) {
|
|
66
|
+
let n = e.l[e.P];
|
|
67
67
|
while (n !== void 0) {
|
|
68
68
|
if (n.O & REACTIVE_IN_HEAP) t(n);
|
|
69
69
|
else adjustHeight(n, e);
|
|
70
|
-
n = e.l[e.
|
|
70
|
+
n = e.l[e.P];
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
73
|
e.R = 0;
|
|
@@ -76,8 +76,8 @@ function adjustHeight(e, t) {
|
|
|
76
76
|
deleteFromHeap(e, t);
|
|
77
77
|
let n = e.o;
|
|
78
78
|
for (let t2 = e.C; t2; t2 = t2.D) {
|
|
79
|
-
const e2 = t2.
|
|
80
|
-
const i = e2.
|
|
79
|
+
const e2 = t2.m;
|
|
80
|
+
const i = e2.V || e2;
|
|
81
81
|
if (i.L && i.o >= n) n = i.o + 1;
|
|
82
82
|
}
|
|
83
83
|
if (e.o !== n) {
|
|
@@ -89,24 +89,83 @@ function adjustHeight(e, t) {
|
|
|
89
89
|
}
|
|
90
90
|
function runLaneEffects(e) {
|
|
91
91
|
for (const t of activeLanes) {
|
|
92
|
-
if (t.
|
|
93
|
-
const n = t.
|
|
92
|
+
if (t.U || t.k.size > 0) continue;
|
|
93
|
+
const n = t.G[e - 1];
|
|
94
94
|
if (n.length) {
|
|
95
|
-
t.
|
|
95
|
+
t.G[e - 1] = [];
|
|
96
96
|
runQueue(n, e);
|
|
97
97
|
}
|
|
98
98
|
}
|
|
99
99
|
}
|
|
100
|
+
function queueStashedOptimisticEffects(e) {
|
|
101
|
+
for (let t = e.I; t !== null; t = t.p) {
|
|
102
|
+
const e2 = t.h;
|
|
103
|
+
if (!e2.W) continue;
|
|
104
|
+
if (e2.W === EFFECT_TRACKED) {
|
|
105
|
+
if (!e2.H) {
|
|
106
|
+
e2.H = true;
|
|
107
|
+
e2.F.enqueue(EFFECT_USER, e2.M);
|
|
108
|
+
}
|
|
109
|
+
continue;
|
|
110
|
+
}
|
|
111
|
+
const n = e2.O & REACTIVE_ZOMBIE ? zombieQueue : dirtyQueue;
|
|
112
|
+
if (n.P > e2.o) n.P = e2.o;
|
|
113
|
+
insertIntoHeap(e2, n);
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
function mergeTransitionState(e, t) {
|
|
117
|
+
t.$ = e;
|
|
118
|
+
e.j.push(...t.j);
|
|
119
|
+
for (const n of activeLanes) {
|
|
120
|
+
if (n.K === t) n.K = e;
|
|
121
|
+
}
|
|
122
|
+
e.Y.push(...t.Y);
|
|
123
|
+
for (const n of t.Z) e.Z.add(n);
|
|
124
|
+
for (const n of t.B) {
|
|
125
|
+
if (!e.B.includes(n)) e.B.push(n);
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
function resolveOptimisticNodes(e) {
|
|
129
|
+
for (let t = 0; t < e.length; t++) {
|
|
130
|
+
const n = e[t];
|
|
131
|
+
n.q = void 0;
|
|
132
|
+
if (n.X !== NOT_PENDING) {
|
|
133
|
+
n.J = n.X;
|
|
134
|
+
n.X = NOT_PENDING;
|
|
135
|
+
}
|
|
136
|
+
const i = n.ee;
|
|
137
|
+
n.ee = NOT_PENDING;
|
|
138
|
+
if (i !== NOT_PENDING && n.J !== i) insertSubs(n, true);
|
|
139
|
+
n.K = null;
|
|
140
|
+
}
|
|
141
|
+
e.length = 0;
|
|
142
|
+
}
|
|
143
|
+
function cleanupCompletedLanes(e) {
|
|
144
|
+
for (const t of activeLanes) {
|
|
145
|
+
const n = e ? t.K === e : !t.K;
|
|
146
|
+
if (!n) continue;
|
|
147
|
+
if (!t.U) {
|
|
148
|
+
if (t.G[0].length) runQueue(t.G[0], EFFECT_RENDER);
|
|
149
|
+
if (t.G[1].length) runQueue(t.G[1], EFFECT_USER);
|
|
150
|
+
}
|
|
151
|
+
if (t.te.q === t) t.te.q = void 0;
|
|
152
|
+
t.k.clear();
|
|
153
|
+
t.G[0].length = 0;
|
|
154
|
+
t.G[1].length = 0;
|
|
155
|
+
activeLanes.delete(t);
|
|
156
|
+
signalLanes.delete(t.te);
|
|
157
|
+
}
|
|
158
|
+
}
|
|
100
159
|
function schedule() {
|
|
101
160
|
if (scheduled) return;
|
|
102
161
|
scheduled = true;
|
|
103
|
-
if (!globalQueue.
|
|
162
|
+
if (!globalQueue.ne && !projectionWriteActive) queueMicrotask(flush);
|
|
104
163
|
}
|
|
105
164
|
function insertSubs(e, t = false) {
|
|
106
|
-
const n = e.
|
|
107
|
-
const i = e.
|
|
165
|
+
const n = e.q || currentOptimisticLane;
|
|
166
|
+
const i = e.Te !== void 0;
|
|
108
167
|
for (let r = e.I; r !== null; r = r.p) {
|
|
109
|
-
if (i && r.h.
|
|
168
|
+
if (i && r.h.de) {
|
|
110
169
|
r.h.O |= REACTIVE_SNAPSHOT_STALE;
|
|
111
170
|
continue;
|
|
112
171
|
}
|
|
@@ -115,88 +174,70 @@ function insertSubs(e, t = false) {
|
|
|
115
174
|
assignOrMergeLane(r.h, n);
|
|
116
175
|
} else if (t) {
|
|
117
176
|
r.h.O |= REACTIVE_OPTIMISTIC_DIRTY;
|
|
118
|
-
r.h.
|
|
177
|
+
r.h.q = void 0;
|
|
119
178
|
}
|
|
120
179
|
const e2 = r.h;
|
|
121
|
-
if (e2.
|
|
122
|
-
if (!e2.
|
|
123
|
-
e2.
|
|
124
|
-
e2.
|
|
180
|
+
if (e2.W === EFFECT_TRACKED) {
|
|
181
|
+
if (!e2.H) {
|
|
182
|
+
e2.H = true;
|
|
183
|
+
e2.F.enqueue(EFFECT_USER, e2.M);
|
|
125
184
|
}
|
|
126
185
|
continue;
|
|
127
186
|
}
|
|
128
187
|
const s = r.h.O & REACTIVE_ZOMBIE ? zombieQueue : dirtyQueue;
|
|
129
|
-
if (s.
|
|
188
|
+
if (s.P > r.h.o) s.P = r.h.o;
|
|
130
189
|
insertIntoHeap(r.h, s);
|
|
131
190
|
}
|
|
132
191
|
}
|
|
192
|
+
function commitPendingNodes() {
|
|
193
|
+
const e = globalQueue.se;
|
|
194
|
+
for (let t = 0; t < e.length; t++) {
|
|
195
|
+
const n = e[t];
|
|
196
|
+
if (n.X !== NOT_PENDING) {
|
|
197
|
+
n.J = n.X;
|
|
198
|
+
n.X = NOT_PENDING;
|
|
199
|
+
if (n.W && n.W !== EFFECT_TRACKED) n.H = true;
|
|
200
|
+
}
|
|
201
|
+
if (!(n.Se & STATUS_PENDING)) n.Se &= ~STATUS_UNINITIALIZED;
|
|
202
|
+
if (n.L) GlobalQueue.ue(n, false, true);
|
|
203
|
+
}
|
|
204
|
+
e.length = 0;
|
|
205
|
+
}
|
|
133
206
|
function finalizePureQueue(e = null, t = false) {
|
|
134
|
-
|
|
207
|
+
const n = !t;
|
|
208
|
+
if (n) commitPendingNodes();
|
|
135
209
|
if (!t) checkBoundaryChildren(globalQueue);
|
|
136
|
-
if (dirtyQueue.R >= dirtyQueue.
|
|
210
|
+
if (dirtyQueue.R >= dirtyQueue.P) runHeap(dirtyQueue, GlobalQueue.oe);
|
|
137
211
|
if (n) {
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
if (n3.oe && n3.oe !== EFFECT_TRACKED) n3.ue = true;
|
|
145
|
-
}
|
|
146
|
-
if (!(n3.Ee & STATUS_PENDING)) n3.Ee &= ~STATUS_UNINITIALIZED;
|
|
147
|
-
if (n3.L) GlobalQueue.Y(n3, false, true);
|
|
148
|
-
}
|
|
149
|
-
t2.length = 0;
|
|
150
|
-
const n2 = e ? e.$ : globalQueue.$;
|
|
151
|
-
for (let e2 = 0; e2 < n2.length; e2++) {
|
|
152
|
-
const t3 = n2[e2];
|
|
153
|
-
const i2 = t3.ae;
|
|
154
|
-
t3.ie = void 0;
|
|
155
|
-
if (i2 !== NOT_PENDING && t3.fe !== i2) {
|
|
156
|
-
t3.fe = i2;
|
|
157
|
-
insertSubs(t3, true);
|
|
158
|
-
}
|
|
159
|
-
t3.ae = NOT_PENDING;
|
|
160
|
-
t3.ne = null;
|
|
161
|
-
}
|
|
162
|
-
n2.length = 0;
|
|
163
|
-
const i = e ? e.j : globalQueue.j;
|
|
164
|
-
if (GlobalQueue.Z && i.size) {
|
|
165
|
-
for (const e2 of i) {
|
|
166
|
-
GlobalQueue.Z(e2);
|
|
212
|
+
commitPendingNodes();
|
|
213
|
+
resolveOptimisticNodes(e ? e.Y : globalQueue.Y);
|
|
214
|
+
const t2 = e ? e.Z : globalQueue.Z;
|
|
215
|
+
if (GlobalQueue.ce && t2.size) {
|
|
216
|
+
for (const e2 of t2) {
|
|
217
|
+
GlobalQueue.ce(e2);
|
|
167
218
|
}
|
|
168
|
-
|
|
219
|
+
t2.clear();
|
|
169
220
|
schedule();
|
|
170
221
|
}
|
|
171
|
-
|
|
172
|
-
const n3 = e ? t3.ne === e : !t3.ne;
|
|
173
|
-
if (!n3) continue;
|
|
174
|
-
if (!t3.k) {
|
|
175
|
-
if (t3.W[0].length) runQueue(t3.W[0], EFFECT_RENDER);
|
|
176
|
-
if (t3.W[1].length) runQueue(t3.W[1], EFFECT_USER);
|
|
177
|
-
}
|
|
178
|
-
if (t3.Te.ie === t3) t3.Te.ie = void 0;
|
|
179
|
-
t3.U.clear();
|
|
180
|
-
t3.W[0].length = 0;
|
|
181
|
-
t3.W[1].length = 0;
|
|
182
|
-
activeLanes.delete(t3);
|
|
183
|
-
signalLanes.delete(t3.Te);
|
|
184
|
-
}
|
|
222
|
+
cleanupCompletedLanes(e);
|
|
185
223
|
}
|
|
186
224
|
}
|
|
187
225
|
function checkBoundaryChildren(e) {
|
|
188
|
-
for (const t of e.
|
|
226
|
+
for (const t of e.re) {
|
|
189
227
|
t.checkSources?.();
|
|
190
228
|
checkBoundaryChildren(t);
|
|
191
229
|
}
|
|
192
230
|
}
|
|
193
231
|
function reassignPendingTransition(e) {
|
|
194
232
|
for (let t = 0; t < e.length; t++) {
|
|
195
|
-
e[t].
|
|
233
|
+
e[t].K = activeTransition;
|
|
196
234
|
}
|
|
197
235
|
}
|
|
198
236
|
function flush() {
|
|
199
|
-
|
|
237
|
+
if (globalQueue.ne) {
|
|
238
|
+
return;
|
|
239
|
+
}
|
|
240
|
+
while (scheduled || activeTransition) {
|
|
200
241
|
globalQueue.flush();
|
|
201
242
|
}
|
|
202
243
|
}
|
|
@@ -204,21 +245,30 @@ function runQueue(e, t) {
|
|
|
204
245
|
for (let n = 0; n < e.length; n++) e[n](t);
|
|
205
246
|
}
|
|
206
247
|
function transitionComplete(e) {
|
|
207
|
-
if (e
|
|
208
|
-
if (e.
|
|
248
|
+
if (e.$) return true;
|
|
249
|
+
if (e.j.length) return false;
|
|
209
250
|
let t = true;
|
|
210
|
-
for (let n = 0; n < e.
|
|
211
|
-
const i = e.
|
|
212
|
-
if (i.
|
|
251
|
+
for (let n = 0; n < e.B.length; n++) {
|
|
252
|
+
const i = e.B[n];
|
|
253
|
+
if (i.Se & STATUS_PENDING && i.le?.source === i) {
|
|
213
254
|
t = false;
|
|
214
255
|
break;
|
|
215
256
|
}
|
|
216
257
|
}
|
|
217
|
-
|
|
258
|
+
if (t) {
|
|
259
|
+
for (let n = 0; n < e.Y.length; n++) {
|
|
260
|
+
const i = e.Y[n];
|
|
261
|
+
if (hasActiveOverride(i) && "Se" in i && i.Se & STATUS_PENDING && i.le instanceof NotReadyError && i.le.source !== i) {
|
|
262
|
+
t = false;
|
|
263
|
+
break;
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
t && (e.$ = true);
|
|
218
268
|
return t;
|
|
219
269
|
}
|
|
220
270
|
function currentTransition(e) {
|
|
221
|
-
while (e
|
|
271
|
+
while (e.$ && typeof e.$ === "object") e = e.$;
|
|
222
272
|
return e;
|
|
223
273
|
}
|
|
224
274
|
function runInTransition(e, t) {
|
|
@@ -235,105 +285,198 @@ function getOrCreateLane(e) {
|
|
|
235
285
|
if (t) {
|
|
236
286
|
return findLane(t);
|
|
237
287
|
}
|
|
238
|
-
const n = e.
|
|
239
|
-
const i = n?.
|
|
240
|
-
t = {
|
|
288
|
+
const n = e.Re;
|
|
289
|
+
const i = n?.q ? findLane(n.q) : null;
|
|
290
|
+
t = { te: e, k: /* @__PURE__ */ new Set(), G: [[], []], U: null, K: activeTransition, Oe: i };
|
|
241
291
|
signalLanes.set(e, t);
|
|
242
292
|
activeLanes.add(t);
|
|
243
|
-
e.
|
|
293
|
+
e._e = false;
|
|
244
294
|
return t;
|
|
245
295
|
}
|
|
246
296
|
function findLane(e) {
|
|
247
|
-
while (e.
|
|
297
|
+
while (e.U) e = e.U;
|
|
248
298
|
return e;
|
|
249
299
|
}
|
|
250
300
|
function mergeLanes(e, t) {
|
|
251
301
|
e = findLane(e);
|
|
252
302
|
t = findLane(t);
|
|
253
303
|
if (e === t) return e;
|
|
254
|
-
t.
|
|
255
|
-
for (const n of t.
|
|
256
|
-
e.
|
|
257
|
-
e.
|
|
304
|
+
t.U = e;
|
|
305
|
+
for (const n of t.k) e.k.add(n);
|
|
306
|
+
e.G[0].push(...t.G[0]);
|
|
307
|
+
e.G[1].push(...t.G[1]);
|
|
258
308
|
return e;
|
|
259
309
|
}
|
|
260
310
|
function resolveLane(e) {
|
|
261
|
-
const t = e.
|
|
311
|
+
const t = e.q;
|
|
262
312
|
if (!t) return void 0;
|
|
263
313
|
const n = findLane(t);
|
|
264
314
|
if (activeLanes.has(n)) return n;
|
|
265
|
-
e.
|
|
315
|
+
e.q = void 0;
|
|
266
316
|
return void 0;
|
|
267
317
|
}
|
|
318
|
+
function resolveTransition(e) {
|
|
319
|
+
return resolveLane(e)?.K ?? e.K;
|
|
320
|
+
}
|
|
268
321
|
function hasActiveOverride(e) {
|
|
269
|
-
return !!(e.
|
|
322
|
+
return !!(e.ee !== void 0 && e.ee !== NOT_PENDING);
|
|
270
323
|
}
|
|
271
324
|
function assignOrMergeLane(e, t) {
|
|
272
325
|
const n = findLane(t);
|
|
273
|
-
const i = e.
|
|
326
|
+
const i = e.q;
|
|
274
327
|
if (i) {
|
|
275
|
-
if (i.
|
|
276
|
-
e.
|
|
328
|
+
if (i.U) {
|
|
329
|
+
e.q = t;
|
|
277
330
|
return;
|
|
278
331
|
}
|
|
279
332
|
const r = findLane(i);
|
|
280
333
|
if (activeLanes.has(r)) {
|
|
281
334
|
if (r !== n && !hasActiveOverride(e)) {
|
|
282
|
-
if (n.
|
|
283
|
-
e.
|
|
284
|
-
} else if (r.
|
|
335
|
+
if (n.Oe && findLane(n.Oe) === r) {
|
|
336
|
+
e.q = t;
|
|
337
|
+
} else if (r.Oe && findLane(r.Oe) === n) ;
|
|
285
338
|
else mergeLanes(n, r);
|
|
286
339
|
}
|
|
287
340
|
return;
|
|
288
341
|
}
|
|
289
342
|
}
|
|
290
|
-
e.
|
|
343
|
+
e.q = t;
|
|
344
|
+
}
|
|
345
|
+
function addPendingSource(e, t) {
|
|
346
|
+
if (e.Ie === t || e.pe?.has(t)) return false;
|
|
347
|
+
if (!e.Ie) {
|
|
348
|
+
e.Ie = t;
|
|
349
|
+
return true;
|
|
350
|
+
}
|
|
351
|
+
if (!e.pe) {
|
|
352
|
+
e.pe = /* @__PURE__ */ new Set([e.Ie, t]);
|
|
353
|
+
} else {
|
|
354
|
+
e.pe.add(t);
|
|
355
|
+
}
|
|
356
|
+
e.Ie = void 0;
|
|
357
|
+
return true;
|
|
358
|
+
}
|
|
359
|
+
function removePendingSource(e, t) {
|
|
360
|
+
if (e.Ie) {
|
|
361
|
+
if (e.Ie !== t) return false;
|
|
362
|
+
e.Ie = void 0;
|
|
363
|
+
return true;
|
|
364
|
+
}
|
|
365
|
+
if (!e.pe?.delete(t)) return false;
|
|
366
|
+
if (e.pe.size === 1) {
|
|
367
|
+
e.Ie = e.pe.values().next().value;
|
|
368
|
+
e.pe = void 0;
|
|
369
|
+
} else if (e.pe.size === 0) {
|
|
370
|
+
e.pe = void 0;
|
|
371
|
+
}
|
|
372
|
+
return true;
|
|
373
|
+
}
|
|
374
|
+
function clearPendingSources(e) {
|
|
375
|
+
e.Ie = void 0;
|
|
376
|
+
e.pe?.clear();
|
|
377
|
+
e.pe = void 0;
|
|
378
|
+
}
|
|
379
|
+
function setPendingError(e, t, n) {
|
|
380
|
+
if (!t) {
|
|
381
|
+
e.le = null;
|
|
382
|
+
return;
|
|
383
|
+
}
|
|
384
|
+
if (n instanceof NotReadyError && n.source === t) {
|
|
385
|
+
e.le = n;
|
|
386
|
+
return;
|
|
387
|
+
}
|
|
388
|
+
const i = e.le;
|
|
389
|
+
if (!(i instanceof NotReadyError) || i.source !== t) {
|
|
390
|
+
e.le = new NotReadyError(t);
|
|
391
|
+
}
|
|
392
|
+
}
|
|
393
|
+
function forEachDependent(e, t) {
|
|
394
|
+
for (let n = e.I; n !== null; n = n.p) t(n.h);
|
|
395
|
+
for (let n = e.A; n !== null; n = n.N) {
|
|
396
|
+
for (let e2 = n.I; e2 !== null; e2 = e2.p) t(e2.h);
|
|
397
|
+
}
|
|
398
|
+
}
|
|
399
|
+
function settlePendingSource(e) {
|
|
400
|
+
let t = false;
|
|
401
|
+
const n = /* @__PURE__ */ new Set();
|
|
402
|
+
const settle = (i) => {
|
|
403
|
+
if (n.has(i) || !removePendingSource(i, e)) return;
|
|
404
|
+
n.add(i);
|
|
405
|
+
i.Ee = clock;
|
|
406
|
+
const r = i.Ie ?? i.pe?.values().next().value;
|
|
407
|
+
if (r) {
|
|
408
|
+
setPendingError(i, r);
|
|
409
|
+
updatePendingSignal(i);
|
|
410
|
+
} else {
|
|
411
|
+
i.Se &= ~STATUS_PENDING;
|
|
412
|
+
setPendingError(i);
|
|
413
|
+
updatePendingSignal(i);
|
|
414
|
+
if (i.he) {
|
|
415
|
+
if (i.W === EFFECT_TRACKED) {
|
|
416
|
+
const e2 = i;
|
|
417
|
+
if (!e2.H) {
|
|
418
|
+
e2.H = true;
|
|
419
|
+
e2.F.enqueue(EFFECT_USER, e2.M);
|
|
420
|
+
}
|
|
421
|
+
} else {
|
|
422
|
+
const e2 = i.O & REACTIVE_ZOMBIE ? zombieQueue : dirtyQueue;
|
|
423
|
+
if (e2.P > i.o) e2.P = i.o;
|
|
424
|
+
insertIntoHeap(i, e2);
|
|
425
|
+
}
|
|
426
|
+
t = true;
|
|
427
|
+
}
|
|
428
|
+
i.he = false;
|
|
429
|
+
}
|
|
430
|
+
forEachDependent(i, settle);
|
|
431
|
+
};
|
|
432
|
+
forEachDependent(e, settle);
|
|
433
|
+
if (t) schedule();
|
|
291
434
|
}
|
|
292
435
|
function handleAsync(e, t, n) {
|
|
293
436
|
const i = typeof t === "object" && t !== null;
|
|
294
437
|
const r = i && untrack(() => t[Symbol.asyncIterator]);
|
|
295
438
|
const s = !r && i && untrack(() => typeof t.then === "function");
|
|
296
439
|
if (!s && !r) {
|
|
297
|
-
e.
|
|
440
|
+
e.Ae = null;
|
|
298
441
|
return t;
|
|
299
442
|
}
|
|
300
|
-
e.
|
|
443
|
+
e.Ae = t;
|
|
301
444
|
let o;
|
|
302
445
|
const handleError = (n2) => {
|
|
303
|
-
if (e.
|
|
304
|
-
globalQueue.initTransition(e
|
|
446
|
+
if (e.Ae !== t) return;
|
|
447
|
+
globalQueue.initTransition(resolveTransition(e));
|
|
305
448
|
notifyStatus(e, n2 instanceof NotReadyError ? STATUS_PENDING : STATUS_ERROR, n2);
|
|
306
|
-
e.
|
|
449
|
+
e.Ee = clock;
|
|
307
450
|
};
|
|
308
451
|
const asyncWrite = (i2, r2) => {
|
|
309
|
-
if (e.
|
|
452
|
+
if (e.Ae !== t) return;
|
|
310
453
|
if (e.O & (REACTIVE_DIRTY | REACTIVE_OPTIMISTIC_DIRTY)) return;
|
|
311
|
-
globalQueue.initTransition(e
|
|
454
|
+
globalQueue.initTransition(resolveTransition(e));
|
|
312
455
|
clearStatus(e);
|
|
313
456
|
const s2 = resolveLane(e);
|
|
314
|
-
if (s2) s2.
|
|
315
|
-
if (e.
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
e.fe = i2;
|
|
457
|
+
if (s2) s2.k.delete(e);
|
|
458
|
+
if (e.ee !== void 0) {
|
|
459
|
+
if (e.ee !== void 0 && e.ee !== NOT_PENDING) e.X = i2;
|
|
460
|
+
else {
|
|
461
|
+
e.J = i2;
|
|
320
462
|
insertSubs(e);
|
|
321
463
|
}
|
|
322
|
-
e.
|
|
464
|
+
e.Ee = clock;
|
|
323
465
|
} else if (s2) {
|
|
324
|
-
const t2 = e.
|
|
325
|
-
const n2 = e.
|
|
466
|
+
const t2 = e.J;
|
|
467
|
+
const n2 = e.Ne;
|
|
326
468
|
if (!n2 || !n2(i2, t2)) {
|
|
327
|
-
e.
|
|
328
|
-
e.
|
|
329
|
-
if (e.
|
|
330
|
-
setSignal(e.
|
|
469
|
+
e.J = i2;
|
|
470
|
+
e.Ee = clock;
|
|
471
|
+
if (e.Pe) {
|
|
472
|
+
setSignal(e.Pe, i2);
|
|
331
473
|
}
|
|
332
474
|
insertSubs(e, true);
|
|
333
475
|
}
|
|
334
476
|
} else {
|
|
335
477
|
setSignal(e, () => i2);
|
|
336
478
|
}
|
|
479
|
+
settlePendingSource(e);
|
|
337
480
|
schedule();
|
|
338
481
|
flush();
|
|
339
482
|
r2?.();
|
|
@@ -353,7 +496,7 @@ function handleAsync(e, t, n) {
|
|
|
353
496
|
);
|
|
354
497
|
i2 = false;
|
|
355
498
|
if (!n2) {
|
|
356
|
-
globalQueue.initTransition(e
|
|
499
|
+
globalQueue.initTransition(resolveTransition(e));
|
|
357
500
|
throw new NotReadyError(context);
|
|
358
501
|
}
|
|
359
502
|
}
|
|
@@ -387,93 +530,65 @@ function handleAsync(e, t, n) {
|
|
|
387
530
|
};
|
|
388
531
|
const r2 = iterate();
|
|
389
532
|
if (!i2 && !r2) {
|
|
390
|
-
globalQueue.initTransition(e
|
|
533
|
+
globalQueue.initTransition(resolveTransition(e));
|
|
391
534
|
throw new NotReadyError(context);
|
|
392
535
|
}
|
|
393
536
|
}
|
|
394
537
|
return o;
|
|
395
538
|
}
|
|
396
|
-
function clearStatus(e) {
|
|
397
|
-
e
|
|
398
|
-
e.
|
|
539
|
+
function clearStatus(e, t = false) {
|
|
540
|
+
clearPendingSources(e);
|
|
541
|
+
e.he = false;
|
|
542
|
+
e.Se = t ? 0 : e.Se & STATUS_UNINITIALIZED;
|
|
543
|
+
setPendingError(e);
|
|
399
544
|
updatePendingSignal(e);
|
|
400
|
-
e.
|
|
545
|
+
e.ge?.();
|
|
401
546
|
}
|
|
402
547
|
function notifyStatus(e, t, n, i, r) {
|
|
403
548
|
if (t === STATUS_ERROR && !(n instanceof StatusError) && !(n instanceof NotReadyError))
|
|
404
549
|
n = new StatusError(e, n);
|
|
405
|
-
const s = n instanceof NotReadyError
|
|
406
|
-
const o =
|
|
407
|
-
const u =
|
|
550
|
+
const s = t === STATUS_PENDING && n instanceof NotReadyError ? n.source : void 0;
|
|
551
|
+
const o = s === e;
|
|
552
|
+
const u = t === STATUS_PENDING && e.ee !== void 0 && !o;
|
|
553
|
+
const c = u && hasActiveOverride(e);
|
|
408
554
|
if (!i) {
|
|
409
|
-
|
|
410
|
-
|
|
555
|
+
if (t === STATUS_PENDING && s) {
|
|
556
|
+
addPendingSource(e, s);
|
|
557
|
+
e.Se = STATUS_PENDING | e.Se & STATUS_UNINITIALIZED;
|
|
558
|
+
setPendingError(e, s, n);
|
|
559
|
+
} else {
|
|
560
|
+
clearPendingSources(e);
|
|
561
|
+
e.Se = t | (t !== STATUS_ERROR ? e.Se & STATUS_UNINITIALIZED : 0);
|
|
562
|
+
e.le = n;
|
|
563
|
+
}
|
|
411
564
|
updatePendingSignal(e);
|
|
412
565
|
}
|
|
413
566
|
if (r && !i) {
|
|
414
567
|
assignOrMergeLane(e, r);
|
|
415
568
|
}
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
569
|
+
const a = i || c;
|
|
570
|
+
const f = i || u ? void 0 : r;
|
|
571
|
+
if (e.ge) {
|
|
572
|
+
if (i && t === STATUS_PENDING) {
|
|
573
|
+
return;
|
|
420
574
|
}
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
const l = i || o ? void 0 : r;
|
|
424
|
-
if (e.Ae) {
|
|
425
|
-
if (c) {
|
|
426
|
-
e.Ae(t, n);
|
|
575
|
+
if (a) {
|
|
576
|
+
e.ge(t, n);
|
|
427
577
|
} else {
|
|
428
|
-
e.
|
|
578
|
+
e.ge();
|
|
429
579
|
}
|
|
430
580
|
return;
|
|
431
581
|
}
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
if (
|
|
435
|
-
!
|
|
436
|
-
notifyStatus(
|
|
582
|
+
forEachDependent(e, (e2) => {
|
|
583
|
+
e2.Ee = clock;
|
|
584
|
+
if (t === STATUS_PENDING && s && e2.Ie !== s && !e2.pe?.has(s) || t !== STATUS_PENDING && (e2.le !== n || e2.Ie || e2.pe)) {
|
|
585
|
+
if (!a && !e2.K) globalQueue.se.push(e2);
|
|
586
|
+
notifyStatus(e2, t, n, a, f);
|
|
437
587
|
}
|
|
438
|
-
}
|
|
439
|
-
for (let i2 = e.A; i2 !== null; i2 = i2.P) {
|
|
440
|
-
for (let e2 = i2.I; e2 !== null; e2 = e2.p) {
|
|
441
|
-
e2.h.J = clock;
|
|
442
|
-
if (e2.h.X !== n) {
|
|
443
|
-
!e2.h.ne && globalQueue.F.push(e2.h);
|
|
444
|
-
notifyStatus(e2.h, t, n, c, l);
|
|
445
|
-
}
|
|
446
|
-
}
|
|
447
|
-
}
|
|
448
|
-
}
|
|
449
|
-
function unlinkSubs(e) {
|
|
450
|
-
const t = e.V;
|
|
451
|
-
const n = e.D;
|
|
452
|
-
const i = e.p;
|
|
453
|
-
const r = e.Pe;
|
|
454
|
-
if (i !== null) i.Pe = r;
|
|
455
|
-
else t.Ne = r;
|
|
456
|
-
if (r !== null) r.p = i;
|
|
457
|
-
else {
|
|
458
|
-
t.I = i;
|
|
459
|
-
if (i === null) {
|
|
460
|
-
t.ge?.();
|
|
461
|
-
t.L && !t.Ce && !(t.O & REACTIVE_ZOMBIE) && unobserved(t);
|
|
462
|
-
}
|
|
463
|
-
}
|
|
464
|
-
return n;
|
|
465
|
-
}
|
|
466
|
-
function unobserved(e) {
|
|
467
|
-
deleteFromHeap(e, e.O & REACTIVE_ZOMBIE ? zombieQueue : dirtyQueue);
|
|
468
|
-
let t = e.C;
|
|
469
|
-
while (t !== null) {
|
|
470
|
-
t = unlinkSubs(t);
|
|
471
|
-
}
|
|
472
|
-
e.C = null;
|
|
473
|
-
disposeChildren(e, true);
|
|
588
|
+
});
|
|
474
589
|
}
|
|
475
590
|
function markDisposal(e) {
|
|
476
|
-
let t = e.
|
|
591
|
+
let t = e.Ce;
|
|
477
592
|
while (t) {
|
|
478
593
|
t.O |= REACTIVE_ZOMBIE;
|
|
479
594
|
if (t.O & REACTIVE_IN_HEAP) {
|
|
@@ -481,15 +596,15 @@ function markDisposal(e) {
|
|
|
481
596
|
insertIntoHeap(t, zombieQueue);
|
|
482
597
|
}
|
|
483
598
|
markDisposal(t);
|
|
484
|
-
t = t.
|
|
599
|
+
t = t.De;
|
|
485
600
|
}
|
|
486
601
|
}
|
|
487
602
|
function disposeChildren(e, t = false, n) {
|
|
488
603
|
if (e.O & REACTIVE_DISPOSED) return;
|
|
489
604
|
if (t) e.O = REACTIVE_DISPOSED;
|
|
490
|
-
let i = n ? e.
|
|
605
|
+
let i = n ? e.me : e.Ce;
|
|
491
606
|
while (i) {
|
|
492
|
-
const e2 = i.
|
|
607
|
+
const e2 = i.De;
|
|
493
608
|
if (i.C) {
|
|
494
609
|
const e3 = i;
|
|
495
610
|
deleteFromHeap(e3, e3.O & REACTIVE_ZOMBIE ? zombieQueue : dirtyQueue);
|
|
@@ -504,16 +619,15 @@ function disposeChildren(e, t = false, n) {
|
|
|
504
619
|
i = e2;
|
|
505
620
|
}
|
|
506
621
|
if (n) {
|
|
507
|
-
e.
|
|
622
|
+
e.me = null;
|
|
508
623
|
} else {
|
|
509
|
-
e.
|
|
510
|
-
e.ve =
|
|
511
|
-
e.we = 0;
|
|
624
|
+
e.Ce = null;
|
|
625
|
+
e.ve = 0;
|
|
512
626
|
}
|
|
513
627
|
runDisposal(e, n);
|
|
514
628
|
}
|
|
515
629
|
function runDisposal(e, t) {
|
|
516
|
-
let n = t ? e.
|
|
630
|
+
let n = t ? e.we : e.be;
|
|
517
631
|
if (!n) return;
|
|
518
632
|
if (Array.isArray(n)) {
|
|
519
633
|
for (let e2 = 0; e2 < n.length; e2++) {
|
|
@@ -523,36 +637,62 @@ function runDisposal(e, t) {
|
|
|
523
637
|
} else {
|
|
524
638
|
n.call(n);
|
|
525
639
|
}
|
|
526
|
-
t ? e.
|
|
640
|
+
t ? e.we = null : e.be = null;
|
|
641
|
+
}
|
|
642
|
+
function unlinkSubs(e) {
|
|
643
|
+
const t = e.m;
|
|
644
|
+
const n = e.D;
|
|
645
|
+
const i = e.p;
|
|
646
|
+
const r = e.Ue;
|
|
647
|
+
if (i !== null) i.Ue = r;
|
|
648
|
+
else t.ke = r;
|
|
649
|
+
if (r !== null) r.p = i;
|
|
650
|
+
else {
|
|
651
|
+
t.I = i;
|
|
652
|
+
if (i === null) {
|
|
653
|
+
t.Ge?.();
|
|
654
|
+
t.L && !t.xe && !(t.O & REACTIVE_ZOMBIE) && unobserved(t);
|
|
655
|
+
}
|
|
656
|
+
}
|
|
657
|
+
return n;
|
|
658
|
+
}
|
|
659
|
+
function unobserved(e) {
|
|
660
|
+
deleteFromHeap(e, e.O & REACTIVE_ZOMBIE ? zombieQueue : dirtyQueue);
|
|
661
|
+
let t = e.C;
|
|
662
|
+
while (t !== null) {
|
|
663
|
+
t = unlinkSubs(t);
|
|
664
|
+
}
|
|
665
|
+
e.C = null;
|
|
666
|
+
disposeChildren(e, true);
|
|
527
667
|
}
|
|
528
668
|
function recompute(e, t = false) {
|
|
529
|
-
const n = e.
|
|
669
|
+
const n = e.W;
|
|
530
670
|
if (!t) {
|
|
531
|
-
if (e.
|
|
532
|
-
globalQueue.initTransition(e.
|
|
671
|
+
if (e.K && (!n || activeTransition) && activeTransition !== e.K)
|
|
672
|
+
globalQueue.initTransition(e.K);
|
|
533
673
|
deleteFromHeap(e, e.O & REACTIVE_ZOMBIE ? zombieQueue : dirtyQueue);
|
|
534
|
-
if (e.
|
|
674
|
+
if (e.K || n === EFFECT_TRACKED) disposeChildren(e);
|
|
535
675
|
else {
|
|
536
676
|
markDisposal(e);
|
|
537
|
-
e.
|
|
538
|
-
e.
|
|
539
|
-
e.
|
|
540
|
-
e.
|
|
541
|
-
e.
|
|
677
|
+
e.we = e.be;
|
|
678
|
+
e.me = e.Ce;
|
|
679
|
+
e.be = null;
|
|
680
|
+
e.Ce = null;
|
|
681
|
+
e.ve = 0;
|
|
542
682
|
}
|
|
543
683
|
}
|
|
544
684
|
const i = !!(e.O & REACTIVE_OPTIMISTIC_DIRTY);
|
|
545
|
-
const r =
|
|
546
|
-
const s = !!(e.
|
|
685
|
+
const r = e.ee !== void 0 && e.ee !== NOT_PENDING;
|
|
686
|
+
const s = !!(e.Se & STATUS_PENDING);
|
|
547
687
|
const o = context;
|
|
548
688
|
context = e;
|
|
549
689
|
e.ye = null;
|
|
550
690
|
e.O = REACTIVE_RECOMPUTING_DEPS;
|
|
551
|
-
e.
|
|
552
|
-
let u = e.
|
|
691
|
+
e.Ee = clock;
|
|
692
|
+
let u = e.X === NOT_PENDING ? e.J : e.X;
|
|
553
693
|
let c = e.o;
|
|
554
|
-
let
|
|
555
|
-
let
|
|
694
|
+
let a = tracking;
|
|
695
|
+
let f = currentOptimisticLane;
|
|
556
696
|
tracking = true;
|
|
557
697
|
if (i) {
|
|
558
698
|
const t2 = resolveLane(e);
|
|
@@ -560,148 +700,153 @@ function recompute(e, t = false) {
|
|
|
560
700
|
}
|
|
561
701
|
try {
|
|
562
702
|
u = handleAsync(e, e.L(u));
|
|
563
|
-
clearStatus(e);
|
|
564
|
-
const
|
|
565
|
-
if (
|
|
566
|
-
|
|
567
|
-
updatePendingSignal(
|
|
703
|
+
clearStatus(e, t);
|
|
704
|
+
const n2 = resolveLane(e);
|
|
705
|
+
if (n2) {
|
|
706
|
+
n2.k.delete(e);
|
|
707
|
+
updatePendingSignal(n2.te);
|
|
568
708
|
}
|
|
569
709
|
} catch (t2) {
|
|
570
710
|
if (t2 instanceof NotReadyError && currentOptimisticLane) {
|
|
571
711
|
const t3 = findLane(currentOptimisticLane);
|
|
572
|
-
if (t3.
|
|
573
|
-
t3.
|
|
574
|
-
e.
|
|
575
|
-
updatePendingSignal(t3.
|
|
712
|
+
if (t3.te !== e) {
|
|
713
|
+
t3.k.add(e);
|
|
714
|
+
e.q = t3;
|
|
715
|
+
updatePendingSignal(t3.te);
|
|
576
716
|
}
|
|
577
717
|
}
|
|
718
|
+
if (t2 instanceof NotReadyError) e.he = true;
|
|
578
719
|
notifyStatus(
|
|
579
720
|
e,
|
|
580
721
|
t2 instanceof NotReadyError ? STATUS_PENDING : STATUS_ERROR,
|
|
581
722
|
t2,
|
|
582
723
|
void 0,
|
|
583
|
-
t2 instanceof NotReadyError ? e.
|
|
724
|
+
t2 instanceof NotReadyError ? e.q : void 0
|
|
584
725
|
);
|
|
585
726
|
} finally {
|
|
586
|
-
tracking =
|
|
727
|
+
tracking = a;
|
|
587
728
|
e.O = REACTIVE_NONE | (t ? e.O & REACTIVE_SNAPSHOT_STALE : 0);
|
|
588
729
|
context = o;
|
|
589
730
|
}
|
|
590
|
-
if (!e.
|
|
731
|
+
if (!e.le) {
|
|
591
732
|
const o2 = e.ye;
|
|
592
|
-
let
|
|
593
|
-
if (
|
|
733
|
+
let a2 = o2 !== null ? o2.D : e.C;
|
|
734
|
+
if (a2 !== null) {
|
|
594
735
|
do {
|
|
595
|
-
|
|
596
|
-
} while (
|
|
736
|
+
a2 = unlinkSubs(a2);
|
|
737
|
+
} while (a2 !== null);
|
|
597
738
|
if (o2 !== null) o2.D = null;
|
|
598
739
|
else e.C = null;
|
|
599
740
|
}
|
|
600
|
-
const
|
|
601
|
-
const
|
|
602
|
-
if (
|
|
603
|
-
const o3 = r ? e.
|
|
604
|
-
if (t || n && activeTransition !== e.
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
}
|
|
611
|
-
if (
|
|
612
|
-
|
|
613
|
-
}
|
|
741
|
+
const f2 = r ? e.ee : e.X === NOT_PENDING ? e.J : e.X;
|
|
742
|
+
const l = !e.Ne || !e.Ne(f2, u);
|
|
743
|
+
if (l) {
|
|
744
|
+
const o3 = r ? e.ee : void 0;
|
|
745
|
+
if (t || n && activeTransition !== e.K || i) {
|
|
746
|
+
e.J = u;
|
|
747
|
+
if (r && i) {
|
|
748
|
+
e.ee = u;
|
|
749
|
+
e.X = u;
|
|
750
|
+
}
|
|
751
|
+
} else e.X = u;
|
|
752
|
+
if (r && !i && s && !e._e) e.ee = u;
|
|
753
|
+
if (!r || i || e.ee !== o3) insertSubs(e, i || r);
|
|
614
754
|
} else if (r) {
|
|
615
|
-
e.
|
|
755
|
+
e.X = u;
|
|
616
756
|
} else if (e.o != c) {
|
|
617
757
|
for (let t2 = e.I; t2 !== null; t2 = t2.p) {
|
|
618
758
|
insertIntoHeapHeight(t2.h, t2.h.O & REACTIVE_ZOMBIE ? zombieQueue : dirtyQueue);
|
|
619
759
|
}
|
|
620
760
|
}
|
|
621
761
|
}
|
|
622
|
-
currentOptimisticLane =
|
|
623
|
-
(!t || e.
|
|
624
|
-
e.
|
|
762
|
+
currentOptimisticLane = f;
|
|
763
|
+
(!t || e.Se & STATUS_PENDING) && !e.K && !(activeTransition && r) && globalQueue.se.push(e);
|
|
764
|
+
e.K && n && activeTransition !== e.K && runInTransition(e.K, () => recompute(e));
|
|
625
765
|
}
|
|
626
766
|
function untrack(e, t) {
|
|
627
|
-
if (!tracking && true) return e();
|
|
767
|
+
if (!externalSourceConfig && !tracking && true) return e();
|
|
628
768
|
const n = tracking;
|
|
629
769
|
tracking = false;
|
|
630
770
|
try {
|
|
771
|
+
if (externalSourceConfig) return externalSourceConfig.untrack(e);
|
|
631
772
|
return e();
|
|
632
773
|
} finally {
|
|
633
774
|
tracking = n;
|
|
634
775
|
}
|
|
635
776
|
}
|
|
636
777
|
function setSignal(e, t) {
|
|
637
|
-
if (e.
|
|
638
|
-
const n = e.
|
|
639
|
-
const i =
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
778
|
+
if (e.K && activeTransition !== e.K) globalQueue.initTransition(e.K);
|
|
779
|
+
const n = e.ee !== void 0 && !projectionWriteActive;
|
|
780
|
+
const i = e.ee !== void 0 && e.ee !== NOT_PENDING;
|
|
781
|
+
const r = n ? i ? e.ee : e.J : e.X === NOT_PENDING ? e.J : e.X;
|
|
782
|
+
if (typeof t === "function") t = t(r);
|
|
783
|
+
const s = !e.Ne || !e.Ne(r, t) || !!(e.Se & STATUS_UNINITIALIZED);
|
|
784
|
+
if (!s) {
|
|
785
|
+
if (n && i && e.L) {
|
|
644
786
|
insertSubs(e, true);
|
|
645
787
|
schedule();
|
|
646
788
|
}
|
|
647
789
|
return t;
|
|
648
790
|
}
|
|
649
791
|
if (n) {
|
|
650
|
-
const n2 =
|
|
651
|
-
if (
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
e.ae = e.fe;
|
|
656
|
-
}
|
|
657
|
-
if (!n2) {
|
|
658
|
-
globalQueue.$.push(e);
|
|
792
|
+
const n2 = e.ee === NOT_PENDING;
|
|
793
|
+
if (!n2) globalQueue.initTransition(resolveTransition(e));
|
|
794
|
+
if (n2) {
|
|
795
|
+
e.X = e.J;
|
|
796
|
+
globalQueue.Y.push(e);
|
|
659
797
|
}
|
|
660
|
-
e.
|
|
798
|
+
e._e = true;
|
|
661
799
|
const i2 = getOrCreateLane(e);
|
|
662
|
-
e.
|
|
663
|
-
e.
|
|
800
|
+
e.q = i2;
|
|
801
|
+
e.ee = t;
|
|
664
802
|
} else {
|
|
665
|
-
if (e.
|
|
666
|
-
e.
|
|
803
|
+
if (e.X === NOT_PENDING) globalQueue.se.push(e);
|
|
804
|
+
e.X = t;
|
|
667
805
|
}
|
|
668
806
|
updatePendingSignal(e);
|
|
669
|
-
if (e.
|
|
670
|
-
setSignal(e.
|
|
807
|
+
if (e.Pe) {
|
|
808
|
+
setSignal(e.Pe, t);
|
|
671
809
|
}
|
|
672
|
-
e.
|
|
810
|
+
e.Ee = clock;
|
|
673
811
|
insertSubs(e, n);
|
|
674
812
|
schedule();
|
|
675
813
|
return t;
|
|
676
814
|
}
|
|
677
815
|
function computePendingState(e) {
|
|
678
816
|
const t = e;
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
817
|
+
const n = e.V;
|
|
818
|
+
if (n && e.X !== NOT_PENDING) {
|
|
819
|
+
return !n.Ae && !(n.Se & STATUS_PENDING);
|
|
820
|
+
}
|
|
821
|
+
if (e.ee !== void 0 && e.ee !== NOT_PENDING) {
|
|
822
|
+
if (t.Se & STATUS_PENDING && !(t.Se & STATUS_UNINITIALIZED)) return true;
|
|
823
|
+
if (e.Re) {
|
|
824
|
+
const t2 = e.q ? findLane(e.q) : null;
|
|
825
|
+
return !!(t2 && t2.k.size > 0);
|
|
684
826
|
}
|
|
685
827
|
return true;
|
|
686
828
|
}
|
|
687
|
-
if (e.
|
|
688
|
-
|
|
829
|
+
if (e.ee !== void 0 && e.ee === NOT_PENDING && !e.Re) {
|
|
830
|
+
return false;
|
|
831
|
+
}
|
|
832
|
+
if (e.X !== NOT_PENDING && !(t.Se & STATUS_UNINITIALIZED)) return true;
|
|
833
|
+
return !!(t.Se & STATUS_PENDING && !(t.Se & STATUS_UNINITIALIZED));
|
|
689
834
|
}
|
|
690
835
|
function updatePendingSignal(e) {
|
|
691
|
-
if (e.
|
|
836
|
+
if (e.Qe) {
|
|
692
837
|
const t = computePendingState(e);
|
|
693
|
-
const n = e.
|
|
838
|
+
const n = e.Qe;
|
|
694
839
|
setSignal(n, t);
|
|
695
|
-
if (!t && n.
|
|
840
|
+
if (!t && n.q) {
|
|
696
841
|
const t2 = resolveLane(e);
|
|
697
|
-
if (t2 && t2.
|
|
698
|
-
const e2 = findLane(n.
|
|
842
|
+
if (t2 && t2.k.size > 0) {
|
|
843
|
+
const e2 = findLane(n.q);
|
|
699
844
|
if (e2 !== t2) {
|
|
700
845
|
mergeLanes(t2, e2);
|
|
701
846
|
}
|
|
702
847
|
}
|
|
703
848
|
signalLanes.delete(n);
|
|
704
|
-
n.
|
|
849
|
+
n.q = void 0;
|
|
705
850
|
}
|
|
706
851
|
}
|
|
707
852
|
}
|
|
@@ -760,9 +905,9 @@ function updatePath(e, t, n = 0) {
|
|
|
760
905
|
e[i] = s;
|
|
761
906
|
}
|
|
762
907
|
}
|
|
763
|
-
var NotReadyError, StatusError, REACTIVE_NONE, REACTIVE_CHECK, REACTIVE_DIRTY, REACTIVE_RECOMPUTING_DEPS, REACTIVE_IN_HEAP, REACTIVE_IN_HEAP_HEIGHT, REACTIVE_ZOMBIE, REACTIVE_DISPOSED, REACTIVE_OPTIMISTIC_DIRTY, REACTIVE_SNAPSHOT_STALE, STATUS_PENDING, STATUS_ERROR, STATUS_UNINITIALIZED, EFFECT_RENDER, EFFECT_USER, EFFECT_TRACKED, NOT_PENDING, transitions, dirtyQueue, zombieQueue, clock, activeTransition, scheduled, projectionWriteActive, Queue, GlobalQueue, globalQueue, signalLanes, activeLanes, tracking, context, currentOptimisticLane, DELETE;
|
|
908
|
+
var NotReadyError, StatusError, REACTIVE_NONE, REACTIVE_CHECK, REACTIVE_DIRTY, REACTIVE_RECOMPUTING_DEPS, REACTIVE_IN_HEAP, REACTIVE_IN_HEAP_HEIGHT, REACTIVE_ZOMBIE, REACTIVE_DISPOSED, REACTIVE_OPTIMISTIC_DIRTY, REACTIVE_SNAPSHOT_STALE, STATUS_PENDING, STATUS_ERROR, STATUS_UNINITIALIZED, EFFECT_RENDER, EFFECT_USER, EFFECT_TRACKED, NOT_PENDING, transitions, dirtyQueue, zombieQueue, clock, activeTransition, scheduled, projectionWriteActive, stashedOptimisticReads, Queue, GlobalQueue, globalQueue, signalLanes, activeLanes, externalSourceConfig, tracking, context, currentOptimisticLane, DELETE;
|
|
764
909
|
var init_prod = __esm({
|
|
765
|
-
"../../node_modules/.pnpm/@solidjs+signals@0.
|
|
910
|
+
"../../node_modules/.pnpm/@solidjs+signals@0.13.6/node_modules/@solidjs/signals/dist/prod.js"() {
|
|
766
911
|
NotReadyError = class extends Error {
|
|
767
912
|
source;
|
|
768
913
|
constructor(e) {
|
|
@@ -795,25 +940,26 @@ var init_prod = __esm({
|
|
|
795
940
|
EFFECT_TRACKED = 3;
|
|
796
941
|
NOT_PENDING = {};
|
|
797
942
|
transitions = /* @__PURE__ */ new Set();
|
|
798
|
-
dirtyQueue = { l: new Array(2e3).fill(void 0), _: false,
|
|
799
|
-
zombieQueue = { l: new Array(2e3).fill(void 0), _: false,
|
|
943
|
+
dirtyQueue = { l: new Array(2e3).fill(void 0), _: false, P: 0, R: 0 };
|
|
944
|
+
zombieQueue = { l: new Array(2e3).fill(void 0), _: false, P: 0, R: 0 };
|
|
800
945
|
clock = 0;
|
|
801
946
|
activeTransition = null;
|
|
802
947
|
scheduled = false;
|
|
803
948
|
projectionWriteActive = false;
|
|
949
|
+
stashedOptimisticReads = null;
|
|
804
950
|
Queue = class {
|
|
805
951
|
i = null;
|
|
806
|
-
|
|
807
|
-
|
|
952
|
+
ie = [[], []];
|
|
953
|
+
re = [];
|
|
808
954
|
created = clock;
|
|
809
955
|
addChild(e) {
|
|
810
|
-
this.
|
|
956
|
+
this.re.push(e);
|
|
811
957
|
e.i = this;
|
|
812
958
|
}
|
|
813
959
|
removeChild(e) {
|
|
814
|
-
const t = this.
|
|
960
|
+
const t = this.re.indexOf(e);
|
|
815
961
|
if (t >= 0) {
|
|
816
|
-
this.
|
|
962
|
+
this.re.splice(t, 1);
|
|
817
963
|
e.i = null;
|
|
818
964
|
}
|
|
819
965
|
}
|
|
@@ -822,107 +968,123 @@ var init_prod = __esm({
|
|
|
822
968
|
return false;
|
|
823
969
|
}
|
|
824
970
|
run(e) {
|
|
825
|
-
if (this.
|
|
826
|
-
const t = this.
|
|
827
|
-
this.
|
|
971
|
+
if (this.ie[e - 1].length) {
|
|
972
|
+
const t = this.ie[e - 1];
|
|
973
|
+
this.ie[e - 1] = [];
|
|
828
974
|
runQueue(t, e);
|
|
829
975
|
}
|
|
830
|
-
for (let t = 0; t < this.
|
|
976
|
+
for (let t = 0; t < this.re.length; t++) this.re[t].run?.(e);
|
|
831
977
|
}
|
|
832
978
|
enqueue(e, t) {
|
|
833
979
|
if (e) {
|
|
834
980
|
if (currentOptimisticLane) {
|
|
835
981
|
const n = findLane(currentOptimisticLane);
|
|
836
|
-
n.
|
|
982
|
+
n.G[e - 1].push(t);
|
|
837
983
|
} else {
|
|
838
|
-
this.
|
|
984
|
+
this.ie[e - 1].push(t);
|
|
839
985
|
}
|
|
840
986
|
}
|
|
841
987
|
schedule();
|
|
842
988
|
}
|
|
843
989
|
stashQueues(e) {
|
|
844
|
-
e.
|
|
845
|
-
e.
|
|
846
|
-
this.
|
|
847
|
-
for (let t = 0; t < this.
|
|
848
|
-
let n = this.
|
|
849
|
-
let i = e.
|
|
990
|
+
e.ie[0].push(...this.ie[0]);
|
|
991
|
+
e.ie[1].push(...this.ie[1]);
|
|
992
|
+
this.ie = [[], []];
|
|
993
|
+
for (let t = 0; t < this.re.length; t++) {
|
|
994
|
+
let n = this.re[t];
|
|
995
|
+
let i = e.re[t];
|
|
850
996
|
if (!i) {
|
|
851
|
-
i = {
|
|
852
|
-
e.
|
|
997
|
+
i = { ie: [[], []], re: [] };
|
|
998
|
+
e.re[t] = i;
|
|
853
999
|
}
|
|
854
1000
|
n.stashQueues(i);
|
|
855
1001
|
}
|
|
856
1002
|
}
|
|
857
1003
|
restoreQueues(e) {
|
|
858
|
-
this.
|
|
859
|
-
this.
|
|
860
|
-
for (let t = 0; t < e.
|
|
861
|
-
const n = e.
|
|
862
|
-
let i = this.
|
|
1004
|
+
this.ie[0].push(...e.ie[0]);
|
|
1005
|
+
this.ie[1].push(...e.ie[1]);
|
|
1006
|
+
for (let t = 0; t < e.re.length; t++) {
|
|
1007
|
+
const n = e.re[t];
|
|
1008
|
+
let i = this.re[t];
|
|
863
1009
|
if (i) i.restoreQueues(n);
|
|
864
1010
|
}
|
|
865
1011
|
}
|
|
866
1012
|
};
|
|
867
1013
|
GlobalQueue = class _GlobalQueue extends Queue {
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
static
|
|
873
|
-
static
|
|
874
|
-
static
|
|
1014
|
+
ne = false;
|
|
1015
|
+
se = [];
|
|
1016
|
+
Y = [];
|
|
1017
|
+
Z = /* @__PURE__ */ new Set();
|
|
1018
|
+
static oe;
|
|
1019
|
+
static ue;
|
|
1020
|
+
static ce = null;
|
|
875
1021
|
flush() {
|
|
876
|
-
if (this.
|
|
877
|
-
this.
|
|
1022
|
+
if (this.ne) return;
|
|
1023
|
+
this.ne = true;
|
|
878
1024
|
try {
|
|
879
|
-
runHeap(dirtyQueue, _GlobalQueue.
|
|
1025
|
+
runHeap(dirtyQueue, _GlobalQueue.oe);
|
|
880
1026
|
if (activeTransition) {
|
|
881
1027
|
const e = transitionComplete(activeTransition);
|
|
882
1028
|
if (!e) {
|
|
883
|
-
|
|
884
|
-
runHeap(zombieQueue, _GlobalQueue.
|
|
885
|
-
this.
|
|
886
|
-
this
|
|
887
|
-
this.
|
|
1029
|
+
const e2 = activeTransition;
|
|
1030
|
+
runHeap(zombieQueue, _GlobalQueue.oe);
|
|
1031
|
+
this.se = [];
|
|
1032
|
+
this.Y = [];
|
|
1033
|
+
this.Z = /* @__PURE__ */ new Set();
|
|
888
1034
|
runLaneEffects(EFFECT_RENDER);
|
|
889
1035
|
runLaneEffects(EFFECT_USER);
|
|
890
|
-
this.stashQueues(
|
|
1036
|
+
this.stashQueues(e2.ae);
|
|
891
1037
|
clock++;
|
|
892
|
-
scheduled = dirtyQueue.R >= dirtyQueue.
|
|
893
|
-
reassignPendingTransition(
|
|
1038
|
+
scheduled = dirtyQueue.R >= dirtyQueue.P;
|
|
1039
|
+
reassignPendingTransition(e2.se);
|
|
894
1040
|
activeTransition = null;
|
|
895
|
-
|
|
1041
|
+
if (!e2.j.length && e2.Y.length) {
|
|
1042
|
+
stashedOptimisticReads = /* @__PURE__ */ new Set();
|
|
1043
|
+
for (let t2 = 0; t2 < e2.Y.length; t2++) {
|
|
1044
|
+
const n = e2.Y[t2];
|
|
1045
|
+
if (n.L || n.fe) continue;
|
|
1046
|
+
stashedOptimisticReads.add(n);
|
|
1047
|
+
queueStashedOptimisticEffects(n);
|
|
1048
|
+
}
|
|
1049
|
+
}
|
|
1050
|
+
try {
|
|
1051
|
+
finalizePureQueue(null, true);
|
|
1052
|
+
} finally {
|
|
1053
|
+
stashedOptimisticReads = null;
|
|
1054
|
+
}
|
|
896
1055
|
return;
|
|
897
1056
|
}
|
|
898
|
-
this.
|
|
899
|
-
this.restoreQueues(activeTransition.
|
|
1057
|
+
this.se !== activeTransition.se && this.se.push(...activeTransition.se);
|
|
1058
|
+
this.restoreQueues(activeTransition.ae);
|
|
900
1059
|
transitions.delete(activeTransition);
|
|
901
1060
|
const t = activeTransition;
|
|
902
1061
|
activeTransition = null;
|
|
903
|
-
reassignPendingTransition(this.
|
|
1062
|
+
reassignPendingTransition(this.se);
|
|
904
1063
|
finalizePureQueue(t);
|
|
905
1064
|
} else {
|
|
906
|
-
if (transitions.size) runHeap(zombieQueue, _GlobalQueue.
|
|
1065
|
+
if (transitions.size) runHeap(zombieQueue, _GlobalQueue.oe);
|
|
907
1066
|
finalizePureQueue();
|
|
908
1067
|
}
|
|
909
1068
|
clock++;
|
|
910
|
-
scheduled = dirtyQueue.R >= dirtyQueue.
|
|
1069
|
+
scheduled = dirtyQueue.R >= dirtyQueue.P;
|
|
911
1070
|
runLaneEffects(EFFECT_RENDER);
|
|
912
1071
|
this.run(EFFECT_RENDER);
|
|
913
1072
|
runLaneEffects(EFFECT_USER);
|
|
914
1073
|
this.run(EFFECT_USER);
|
|
915
1074
|
} finally {
|
|
916
|
-
this.
|
|
1075
|
+
this.ne = false;
|
|
917
1076
|
}
|
|
918
1077
|
}
|
|
919
1078
|
notify(e, t, n, i) {
|
|
920
1079
|
if (t & STATUS_PENDING) {
|
|
921
1080
|
if (n & STATUS_PENDING) {
|
|
922
|
-
const t2 = i !== void 0 ? i : e.
|
|
923
|
-
if (activeTransition && t2
|
|
924
|
-
|
|
925
|
-
|
|
1081
|
+
const t2 = i !== void 0 ? i : e.le;
|
|
1082
|
+
if (activeTransition && t2) {
|
|
1083
|
+
const e2 = t2.source;
|
|
1084
|
+
if (!activeTransition.B.includes(e2)) {
|
|
1085
|
+
activeTransition.B.push(e2);
|
|
1086
|
+
schedule();
|
|
1087
|
+
}
|
|
926
1088
|
}
|
|
927
1089
|
}
|
|
928
1090
|
return true;
|
|
@@ -932,58 +1094,57 @@ var init_prod = __esm({
|
|
|
932
1094
|
initTransition(e) {
|
|
933
1095
|
if (e) e = currentTransition(e);
|
|
934
1096
|
if (e && e === activeTransition) return;
|
|
935
|
-
if (!e && activeTransition && activeTransition.
|
|
1097
|
+
if (!e && activeTransition && activeTransition.Ee === clock) return;
|
|
936
1098
|
if (!activeTransition) {
|
|
937
1099
|
activeTransition = e ?? {
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
1100
|
+
Ee: clock,
|
|
1101
|
+
se: [],
|
|
1102
|
+
B: [],
|
|
1103
|
+
Y: [],
|
|
1104
|
+
Z: /* @__PURE__ */ new Set(),
|
|
1105
|
+
j: [],
|
|
1106
|
+
ae: { ie: [[], []], re: [] },
|
|
1107
|
+
$: false
|
|
946
1108
|
};
|
|
947
1109
|
} else if (e) {
|
|
948
1110
|
const t = activeTransition;
|
|
949
|
-
t
|
|
950
|
-
e.ee.push(...t.ee);
|
|
951
|
-
for (const n of activeLanes) {
|
|
952
|
-
if (n.ne === t) n.ne = e;
|
|
953
|
-
}
|
|
954
|
-
e.$.push(...t.$);
|
|
955
|
-
for (const n of t.j) {
|
|
956
|
-
e.j.add(n);
|
|
957
|
-
}
|
|
1111
|
+
mergeTransitionState(e, t);
|
|
958
1112
|
transitions.delete(t);
|
|
959
1113
|
activeTransition = e;
|
|
960
1114
|
}
|
|
961
1115
|
transitions.add(activeTransition);
|
|
962
|
-
activeTransition.
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
1116
|
+
activeTransition.Ee = clock;
|
|
1117
|
+
if (this.se !== activeTransition.se) {
|
|
1118
|
+
for (let e2 = 0; e2 < this.se.length; e2++) {
|
|
1119
|
+
const t = this.se[e2];
|
|
1120
|
+
t.K = activeTransition;
|
|
1121
|
+
activeTransition.se.push(t);
|
|
1122
|
+
}
|
|
1123
|
+
this.se = activeTransition.se;
|
|
967
1124
|
}
|
|
968
|
-
this.
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
1125
|
+
if (this.Y !== activeTransition.Y) {
|
|
1126
|
+
for (let e2 = 0; e2 < this.Y.length; e2++) {
|
|
1127
|
+
const t = this.Y[e2];
|
|
1128
|
+
t.K = activeTransition;
|
|
1129
|
+
activeTransition.Y.push(t);
|
|
1130
|
+
}
|
|
1131
|
+
this.Y = activeTransition.Y;
|
|
973
1132
|
}
|
|
974
|
-
this.$ = activeTransition.$;
|
|
975
1133
|
for (const e2 of activeLanes) {
|
|
976
|
-
if (!e2.
|
|
1134
|
+
if (!e2.K) e2.K = activeTransition;
|
|
1135
|
+
}
|
|
1136
|
+
if (this.Z !== activeTransition.Z) {
|
|
1137
|
+
for (const e2 of this.Z) activeTransition.Z.add(e2);
|
|
1138
|
+
this.Z = activeTransition.Z;
|
|
977
1139
|
}
|
|
978
|
-
for (const e2 of this.j) activeTransition.j.add(e2);
|
|
979
|
-
this.j = activeTransition.j;
|
|
980
1140
|
}
|
|
981
1141
|
};
|
|
982
1142
|
globalQueue = new GlobalQueue();
|
|
983
1143
|
signalLanes = /* @__PURE__ */ new WeakMap();
|
|
984
1144
|
activeLanes = /* @__PURE__ */ new Set();
|
|
985
|
-
|
|
986
|
-
GlobalQueue.
|
|
1145
|
+
externalSourceConfig = null;
|
|
1146
|
+
GlobalQueue.oe = recompute;
|
|
1147
|
+
GlobalQueue.ue = disposeChildren;
|
|
987
1148
|
tracking = false;
|
|
988
1149
|
context = null;
|
|
989
1150
|
currentOptimisticLane = null;
|
|
@@ -1042,7 +1203,7 @@ function isHydrating(node) {
|
|
|
1042
1203
|
}
|
|
1043
1204
|
var effect, isServer, isDev;
|
|
1044
1205
|
var init_web = __esm({
|
|
1045
|
-
"../../node_modules/.pnpm/@solidjs+web@2.0.0-beta.
|
|
1206
|
+
"../../node_modules/.pnpm/@solidjs+web@2.0.0-beta.4_@solidjs+signals@0.13.6_solid-js@2.0.0-beta.4/node_modules/@solidjs/web/dist/web.js"() {
|
|
1046
1207
|
init_prod();
|
|
1047
1208
|
effect = (fn, effectFn, initial) => solidJs.createRenderEffect(fn, effectFn, initial, {
|
|
1048
1209
|
transparent: true
|
|
@@ -1097,9 +1258,18 @@ function SolidQueryDevtools(props) {
|
|
|
1097
1258
|
solidJs.createEffect(() => props.theme, (theme) => {
|
|
1098
1259
|
devtools.setTheme(theme || "system");
|
|
1099
1260
|
});
|
|
1100
|
-
|
|
1261
|
+
let isMounted = false;
|
|
1262
|
+
let isDisposed = false;
|
|
1263
|
+
queueMicrotask(() => {
|
|
1264
|
+
if (isDisposed) return;
|
|
1101
1265
|
devtools.mount(ref2);
|
|
1102
|
-
|
|
1266
|
+
isMounted = true;
|
|
1267
|
+
});
|
|
1268
|
+
solidJs.onCleanup(() => {
|
|
1269
|
+
isDisposed = true;
|
|
1270
|
+
if (isMounted) {
|
|
1271
|
+
devtools.unmount();
|
|
1272
|
+
}
|
|
1103
1273
|
});
|
|
1104
1274
|
return (() => {
|
|
1105
1275
|
var _el$ = _tmpl$();
|
|
@@ -1160,9 +1330,18 @@ function SolidQueryDevtoolsPanel(props) {
|
|
|
1160
1330
|
solidJs.createEffect(() => props.theme, (theme) => {
|
|
1161
1331
|
devtools.setTheme(theme || "system");
|
|
1162
1332
|
});
|
|
1163
|
-
|
|
1333
|
+
let isMounted = false;
|
|
1334
|
+
let isDisposed = false;
|
|
1335
|
+
queueMicrotask(() => {
|
|
1336
|
+
if (isDisposed) return;
|
|
1164
1337
|
devtools.mount(ref2);
|
|
1165
|
-
|
|
1338
|
+
isMounted = true;
|
|
1339
|
+
});
|
|
1340
|
+
solidJs.onCleanup(() => {
|
|
1341
|
+
isDisposed = true;
|
|
1342
|
+
if (isMounted) {
|
|
1343
|
+
devtools.unmount();
|
|
1344
|
+
}
|
|
1166
1345
|
});
|
|
1167
1346
|
return (() => {
|
|
1168
1347
|
var _el$ = _tmpl$2();
|