@tanstack/solid-query-devtools 5.91.2 → 6.0.0-alpha.0

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/dev.cjs CHANGED
@@ -1,6 +1,5 @@
1
1
  'use strict';
2
2
 
3
- var web = require('solid-js/web');
4
3
  var solidJs = require('solid-js');
5
4
  var solidQuery = require('@tanstack/solid-query');
6
5
  var queryDevtools = require('@tanstack/query-devtools');
@@ -15,6 +14,1075 @@ var __export = (target, all) => {
15
14
  __defProp(target, name, { get: all[name], enumerable: true });
16
15
  };
17
16
 
17
+ // ../../node_modules/.pnpm/@solidjs+signals@0.12.0/node_modules/@solidjs/signals/dist/dev.js
18
+ function actualInsertIntoHeap(n, heap) {
19
+ const parentHeight = (n._parent?._root ? n._parent._parentComputed?._height : n._parent?._height) ?? -1;
20
+ if (parentHeight >= n._height) n._height = parentHeight + 1;
21
+ const height = n._height;
22
+ const heapAtHeight = heap._heap[height];
23
+ if (heapAtHeight === void 0) heap._heap[height] = n;
24
+ else {
25
+ const tail = heapAtHeight._prevHeap;
26
+ tail._nextHeap = n;
27
+ n._prevHeap = tail;
28
+ heapAtHeight._prevHeap = n;
29
+ }
30
+ if (height > heap._max) heap._max = height;
31
+ }
32
+ function insertIntoHeap(n, heap) {
33
+ let flags = n._flags;
34
+ if (flags & (REACTIVE_IN_HEAP | REACTIVE_RECOMPUTING_DEPS)) return;
35
+ if (flags & REACTIVE_CHECK) {
36
+ n._flags = flags & -4 | REACTIVE_DIRTY | REACTIVE_IN_HEAP;
37
+ } else n._flags = flags | REACTIVE_IN_HEAP;
38
+ if (!(flags & REACTIVE_IN_HEAP_HEIGHT)) actualInsertIntoHeap(n, heap);
39
+ }
40
+ function insertIntoHeapHeight(n, heap) {
41
+ let flags = n._flags;
42
+ if (flags & (REACTIVE_IN_HEAP | REACTIVE_RECOMPUTING_DEPS | REACTIVE_IN_HEAP_HEIGHT)) return;
43
+ n._flags = flags | REACTIVE_IN_HEAP_HEIGHT;
44
+ actualInsertIntoHeap(n, heap);
45
+ }
46
+ function deleteFromHeap(n, heap) {
47
+ const flags = n._flags;
48
+ if (!(flags & (REACTIVE_IN_HEAP | REACTIVE_IN_HEAP_HEIGHT))) return;
49
+ n._flags = flags & -25;
50
+ const height = n._height;
51
+ if (n._prevHeap === n) heap._heap[height] = void 0;
52
+ else {
53
+ const next = n._nextHeap;
54
+ const dhh = heap._heap[height];
55
+ const end = next ?? dhh;
56
+ if (n === dhh) heap._heap[height] = next;
57
+ else n._prevHeap._nextHeap = next;
58
+ end._prevHeap = n._prevHeap;
59
+ }
60
+ n._prevHeap = n;
61
+ n._nextHeap = void 0;
62
+ }
63
+ function runHeap(heap, recompute2) {
64
+ heap._marked = false;
65
+ for (heap._min = 0; heap._min <= heap._max; heap._min++) {
66
+ let el = heap._heap[heap._min];
67
+ while (el !== void 0) {
68
+ if (el._flags & REACTIVE_IN_HEAP) recompute2(el);
69
+ else adjustHeight(el, heap);
70
+ el = heap._heap[heap._min];
71
+ }
72
+ }
73
+ heap._max = 0;
74
+ }
75
+ function adjustHeight(el, heap) {
76
+ deleteFromHeap(el, heap);
77
+ let newHeight = el._height;
78
+ for (let d = el._deps; d; d = d._nextDep) {
79
+ const dep1 = d._dep;
80
+ const dep = dep1._firewall || dep1;
81
+ if (dep._fn && dep._height >= newHeight) newHeight = dep._height + 1;
82
+ }
83
+ if (el._height !== newHeight) {
84
+ el._height = newHeight;
85
+ for (let s = el._subs; s !== null; s = s._nextSub) {
86
+ insertIntoHeapHeight(s._sub, heap);
87
+ }
88
+ }
89
+ }
90
+ function runLaneEffects(type) {
91
+ for (const lane of activeLanes) {
92
+ if (lane._mergedInto || lane._pendingAsync.size > 0) continue;
93
+ const effects = lane._effectQueues[type - 1];
94
+ if (effects.length) {
95
+ lane._effectQueues[type - 1] = [];
96
+ runQueue(effects, type);
97
+ }
98
+ }
99
+ }
100
+ function schedule() {
101
+ if (scheduled) return;
102
+ scheduled = true;
103
+ if (!globalQueue._running && !projectionWriteActive) queueMicrotask(flush);
104
+ }
105
+ function insertSubs(node, optimistic = false) {
106
+ const sourceLane = node._optimisticLane || currentOptimisticLane;
107
+ const hasSnapshot = node._snapshotValue !== void 0;
108
+ for (let s = node._subs; s !== null; s = s._nextSub) {
109
+ if (hasSnapshot && s._sub._inSnapshotScope) {
110
+ s._sub._flags |= REACTIVE_SNAPSHOT_STALE;
111
+ continue;
112
+ }
113
+ if (optimistic && sourceLane) {
114
+ s._sub._flags |= REACTIVE_OPTIMISTIC_DIRTY;
115
+ assignOrMergeLane(s._sub, sourceLane);
116
+ } else if (optimistic) {
117
+ s._sub._flags |= REACTIVE_OPTIMISTIC_DIRTY;
118
+ s._sub._optimisticLane = void 0;
119
+ }
120
+ const sub = s._sub;
121
+ if (sub._type === EFFECT_TRACKED) {
122
+ if (!sub._modified) {
123
+ sub._modified = true;
124
+ sub._queue.enqueue(EFFECT_USER, sub._run);
125
+ }
126
+ continue;
127
+ }
128
+ const queue = s._sub._flags & REACTIVE_ZOMBIE ? zombieQueue : dirtyQueue;
129
+ if (queue._min > s._sub._height) queue._min = s._sub._height;
130
+ insertIntoHeap(s._sub, queue);
131
+ }
132
+ }
133
+ function finalizePureQueue(completingTransition = null, incomplete = false) {
134
+ let resolvePending = !incomplete;
135
+ if (!incomplete) checkBoundaryChildren(globalQueue);
136
+ if (dirtyQueue._max >= dirtyQueue._min) runHeap(dirtyQueue, GlobalQueue._update);
137
+ if (resolvePending) {
138
+ const pendingNodes = globalQueue._pendingNodes;
139
+ for (let i = 0; i < pendingNodes.length; i++) {
140
+ const n = pendingNodes[i];
141
+ if (n._pendingValue !== NOT_PENDING) {
142
+ n._value = n._pendingValue;
143
+ n._pendingValue = NOT_PENDING;
144
+ if (n._type && n._type !== EFFECT_TRACKED) n._modified = true;
145
+ }
146
+ if (!(n._statusFlags & STATUS_PENDING)) n._statusFlags &= ~STATUS_UNINITIALIZED;
147
+ if (n._fn) GlobalQueue._dispose(n, false, true);
148
+ }
149
+ pendingNodes.length = 0;
150
+ const optimisticNodes = completingTransition ? completingTransition._optimisticNodes : globalQueue._optimisticNodes;
151
+ for (let i = 0; i < optimisticNodes.length; i++) {
152
+ const n = optimisticNodes[i];
153
+ const original = n._pendingValue;
154
+ n._optimisticLane = void 0;
155
+ if (original !== NOT_PENDING && n._value !== original) {
156
+ n._value = original;
157
+ insertSubs(n, true);
158
+ }
159
+ n._pendingValue = NOT_PENDING;
160
+ n._transition = null;
161
+ }
162
+ optimisticNodes.length = 0;
163
+ const optimisticStores = completingTransition ? completingTransition._optimisticStores : globalQueue._optimisticStores;
164
+ if (GlobalQueue._clearOptimisticStore && optimisticStores.size) {
165
+ for (const store of optimisticStores) {
166
+ GlobalQueue._clearOptimisticStore(store);
167
+ }
168
+ optimisticStores.clear();
169
+ schedule();
170
+ }
171
+ for (const lane of activeLanes) {
172
+ const owned = completingTransition ? lane._transition === completingTransition : !lane._transition;
173
+ if (!owned) continue;
174
+ if (!lane._mergedInto) {
175
+ if (lane._effectQueues[0].length) runQueue(lane._effectQueues[0], EFFECT_RENDER);
176
+ if (lane._effectQueues[1].length) runQueue(lane._effectQueues[1], EFFECT_USER);
177
+ }
178
+ if (lane._source._optimisticLane === lane) lane._source._optimisticLane = void 0;
179
+ lane._pendingAsync.clear();
180
+ lane._effectQueues[0].length = 0;
181
+ lane._effectQueues[1].length = 0;
182
+ activeLanes.delete(lane);
183
+ signalLanes.delete(lane._source);
184
+ }
185
+ }
186
+ }
187
+ function checkBoundaryChildren(queue) {
188
+ for (const child of queue._children) {
189
+ child.checkSources?.();
190
+ checkBoundaryChildren(child);
191
+ }
192
+ }
193
+ function reassignPendingTransition(pendingNodes) {
194
+ for (let i = 0; i < pendingNodes.length; i++) {
195
+ pendingNodes[i]._transition = activeTransition;
196
+ }
197
+ }
198
+ function flush() {
199
+ let count = 0;
200
+ while (scheduled) {
201
+ if (++count === 1e5) throw new Error("Potential Infinite Loop Detected.");
202
+ globalQueue.flush();
203
+ }
204
+ }
205
+ function runQueue(queue, type) {
206
+ for (let i = 0; i < queue.length; i++) queue[i](type);
207
+ }
208
+ function transitionComplete(transition) {
209
+ if (transition._done) return true;
210
+ if (transition._actions.length) return false;
211
+ let done = true;
212
+ for (let i = 0; i < transition._asyncNodes.length; i++) {
213
+ const node = transition._asyncNodes[i];
214
+ if (node._statusFlags & STATUS_PENDING && node._error?.source === node) {
215
+ done = false;
216
+ break;
217
+ }
218
+ }
219
+ done && (transition._done = true);
220
+ return done;
221
+ }
222
+ function currentTransition(transition) {
223
+ while (transition._done && typeof transition._done === "object") transition = transition._done;
224
+ return transition;
225
+ }
226
+ function runInTransition(transition, fn) {
227
+ const prevTransition = activeTransition;
228
+ try {
229
+ activeTransition = currentTransition(transition);
230
+ return fn();
231
+ } finally {
232
+ activeTransition = prevTransition;
233
+ }
234
+ }
235
+ function getOrCreateLane(signal) {
236
+ let lane = signalLanes.get(signal);
237
+ if (lane) {
238
+ return findLane(lane);
239
+ }
240
+ const parentSource = signal._parentSource;
241
+ const parentLane = parentSource?._optimisticLane ? findLane(parentSource._optimisticLane) : null;
242
+ lane = {
243
+ _source: signal,
244
+ _pendingAsync: /* @__PURE__ */ new Set(),
245
+ _effectQueues: [[], []],
246
+ _mergedInto: null,
247
+ _transition: activeTransition,
248
+ _parentLane: parentLane
249
+ };
250
+ signalLanes.set(signal, lane);
251
+ activeLanes.add(lane);
252
+ signal._laneVersion = signal._overrideVersion || 0;
253
+ return lane;
254
+ }
255
+ function findLane(lane) {
256
+ while (lane._mergedInto) lane = lane._mergedInto;
257
+ return lane;
258
+ }
259
+ function mergeLanes(lane1, lane2) {
260
+ lane1 = findLane(lane1);
261
+ lane2 = findLane(lane2);
262
+ if (lane1 === lane2) return lane1;
263
+ lane2._mergedInto = lane1;
264
+ for (const node of lane2._pendingAsync) lane1._pendingAsync.add(node);
265
+ lane1._effectQueues[0].push(...lane2._effectQueues[0]);
266
+ lane1._effectQueues[1].push(...lane2._effectQueues[1]);
267
+ return lane1;
268
+ }
269
+ function resolveLane(el) {
270
+ const lane = el._optimisticLane;
271
+ if (!lane) return void 0;
272
+ const root = findLane(lane);
273
+ if (activeLanes.has(root)) return root;
274
+ el._optimisticLane = void 0;
275
+ return void 0;
276
+ }
277
+ function hasActiveOverride(el) {
278
+ return !!(el._optimistic && el._pendingValue !== NOT_PENDING);
279
+ }
280
+ function assignOrMergeLane(el, sourceLane) {
281
+ const sourceRoot = findLane(sourceLane);
282
+ const existing = el._optimisticLane;
283
+ if (existing) {
284
+ if (existing._mergedInto) {
285
+ el._optimisticLane = sourceLane;
286
+ return;
287
+ }
288
+ const existingRoot = findLane(existing);
289
+ if (activeLanes.has(existingRoot)) {
290
+ if (existingRoot !== sourceRoot && !hasActiveOverride(el)) {
291
+ if (sourceRoot._parentLane && findLane(sourceRoot._parentLane) === existingRoot) {
292
+ el._optimisticLane = sourceLane;
293
+ } else if (existingRoot._parentLane && findLane(existingRoot._parentLane) === sourceRoot) ;
294
+ else mergeLanes(sourceRoot, existingRoot);
295
+ }
296
+ return;
297
+ }
298
+ }
299
+ el._optimisticLane = sourceLane;
300
+ }
301
+ function handleAsync(el, result, setter) {
302
+ const isObject = typeof result === "object" && result !== null;
303
+ const iterator = isObject && untrack(() => result[Symbol.asyncIterator]);
304
+ const isThenable = !iterator && isObject && untrack(() => typeof result.then === "function");
305
+ if (!isThenable && !iterator) {
306
+ el._inFlight = null;
307
+ return result;
308
+ }
309
+ el._inFlight = result;
310
+ let syncValue;
311
+ const handleError = (error) => {
312
+ if (el._inFlight !== result) return;
313
+ globalQueue.initTransition(el._transition);
314
+ notifyStatus(el, error instanceof NotReadyError ? STATUS_PENDING : STATUS_ERROR, error);
315
+ el._time = clock;
316
+ };
317
+ const asyncWrite = (value, then) => {
318
+ if (el._inFlight !== result) return;
319
+ if (el._flags & (REACTIVE_DIRTY | REACTIVE_OPTIMISTIC_DIRTY)) return;
320
+ globalQueue.initTransition(el._transition);
321
+ clearStatus(el);
322
+ const lane = resolveLane(el);
323
+ if (lane) lane._pendingAsync.delete(el);
324
+ if (el._optimistic) {
325
+ const hadOverride = el._pendingValue !== NOT_PENDING;
326
+ if (el._fn) el._pendingValue = value;
327
+ if (!hadOverride) {
328
+ el._value = value;
329
+ insertSubs(el);
330
+ }
331
+ el._time = clock;
332
+ } else if (lane) {
333
+ const prevValue = el._value;
334
+ const equals = el._equals;
335
+ if (!equals || !equals(value, prevValue)) {
336
+ el._value = value;
337
+ el._time = clock;
338
+ if (el._latestValueComputed) {
339
+ setSignal(el._latestValueComputed, value);
340
+ }
341
+ insertSubs(el, true);
342
+ }
343
+ } else {
344
+ setSignal(el, () => value);
345
+ }
346
+ schedule();
347
+ flush();
348
+ then?.();
349
+ };
350
+ if (isThenable) {
351
+ let resolved = false, isSync = true;
352
+ result.then(
353
+ (v) => {
354
+ if (isSync) {
355
+ syncValue = v;
356
+ resolved = true;
357
+ } else asyncWrite(v);
358
+ },
359
+ (e) => {
360
+ if (!isSync) handleError(e);
361
+ }
362
+ );
363
+ isSync = false;
364
+ if (!resolved) {
365
+ globalQueue.initTransition(el._transition);
366
+ throw new NotReadyError(context);
367
+ }
368
+ }
369
+ if (iterator) {
370
+ const it = result[Symbol.asyncIterator]();
371
+ let hadSyncValue = false;
372
+ const iterate = () => {
373
+ let syncResult, resolved = false, isSync = true;
374
+ it.next().then(
375
+ (r) => {
376
+ if (isSync) {
377
+ syncResult = r;
378
+ resolved = true;
379
+ } else if (!r.done) asyncWrite(r.value, iterate);
380
+ else {
381
+ schedule();
382
+ flush();
383
+ }
384
+ },
385
+ (e) => {
386
+ if (!isSync) handleError(e);
387
+ }
388
+ );
389
+ isSync = false;
390
+ if (resolved && !syncResult.done) {
391
+ syncValue = syncResult.value;
392
+ hadSyncValue = true;
393
+ return iterate();
394
+ }
395
+ return resolved && syncResult.done;
396
+ };
397
+ const immediatelyDone = iterate();
398
+ if (!hadSyncValue && !immediatelyDone) {
399
+ globalQueue.initTransition(el._transition);
400
+ throw new NotReadyError(context);
401
+ }
402
+ }
403
+ return syncValue;
404
+ }
405
+ function clearStatus(el) {
406
+ el._statusFlags = el._statusFlags & STATUS_UNINITIALIZED;
407
+ el._error = null;
408
+ updatePendingSignal(el);
409
+ el._notifyStatus?.();
410
+ }
411
+ function notifyStatus(el, status, error, blockStatus, lane) {
412
+ if (status === STATUS_ERROR && !(error instanceof StatusError) && !(error instanceof NotReadyError))
413
+ error = new StatusError(el, error);
414
+ const isSource = error instanceof NotReadyError && error.source === el;
415
+ const isOptimisticBoundary = status === STATUS_PENDING && el._optimistic && !isSource;
416
+ const startsBlocking = isOptimisticBoundary && hasActiveOverride(el);
417
+ if (!blockStatus) {
418
+ el._statusFlags = status | (status !== STATUS_ERROR ? el._statusFlags & STATUS_UNINITIALIZED : 0);
419
+ el._error = error;
420
+ updatePendingSignal(el);
421
+ }
422
+ if (lane && !blockStatus) {
423
+ assignOrMergeLane(el, lane);
424
+ }
425
+ if (startsBlocking && activeTransition && error instanceof NotReadyError) {
426
+ const source = error.source;
427
+ if (!activeTransition._asyncNodes.includes(source)) {
428
+ activeTransition._asyncNodes.push(source);
429
+ }
430
+ }
431
+ const downstreamBlockStatus = blockStatus || startsBlocking;
432
+ const downstreamLane = blockStatus || isOptimisticBoundary ? void 0 : lane;
433
+ if (el._notifyStatus) {
434
+ if (downstreamBlockStatus) {
435
+ el._notifyStatus(status, error);
436
+ } else {
437
+ el._notifyStatus();
438
+ }
439
+ return;
440
+ }
441
+ for (let s = el._subs; s !== null; s = s._nextSub) {
442
+ s._sub._time = clock;
443
+ if (s._sub._error !== error) {
444
+ !s._sub._transition && globalQueue._pendingNodes.push(s._sub);
445
+ notifyStatus(s._sub, status, error, downstreamBlockStatus, downstreamLane);
446
+ }
447
+ }
448
+ for (let child = el._child; child !== null; child = child._nextChild) {
449
+ for (let s = child._subs; s !== null; s = s._nextSub) {
450
+ s._sub._time = clock;
451
+ if (s._sub._error !== error) {
452
+ !s._sub._transition && globalQueue._pendingNodes.push(s._sub);
453
+ notifyStatus(s._sub, status, error, downstreamBlockStatus, downstreamLane);
454
+ }
455
+ }
456
+ }
457
+ }
458
+ function unlinkSubs(link) {
459
+ const dep = link._dep;
460
+ const nextDep = link._nextDep;
461
+ const nextSub = link._nextSub;
462
+ const prevSub = link._prevSub;
463
+ if (nextSub !== null) nextSub._prevSub = prevSub;
464
+ else dep._subsTail = prevSub;
465
+ if (prevSub !== null) prevSub._nextSub = nextSub;
466
+ else {
467
+ dep._subs = nextSub;
468
+ if (nextSub === null) {
469
+ dep._unobserved?.();
470
+ dep._fn && !dep._preventAutoDisposal && !(dep._flags & REACTIVE_ZOMBIE) && unobserved(dep);
471
+ }
472
+ }
473
+ return nextDep;
474
+ }
475
+ function unobserved(el) {
476
+ deleteFromHeap(el, el._flags & REACTIVE_ZOMBIE ? zombieQueue : dirtyQueue);
477
+ let dep = el._deps;
478
+ while (dep !== null) {
479
+ dep = unlinkSubs(dep);
480
+ }
481
+ el._deps = null;
482
+ disposeChildren(el, true);
483
+ }
484
+ function markDisposal(el) {
485
+ let child = el._firstChild;
486
+ while (child) {
487
+ child._flags |= REACTIVE_ZOMBIE;
488
+ if (child._flags & REACTIVE_IN_HEAP) {
489
+ deleteFromHeap(child, dirtyQueue);
490
+ insertIntoHeap(child, zombieQueue);
491
+ }
492
+ markDisposal(child);
493
+ child = child._nextSibling;
494
+ }
495
+ }
496
+ function disposeChildren(node, self = false, zombie) {
497
+ if (node._flags & REACTIVE_DISPOSED) return;
498
+ if (self) node._flags = REACTIVE_DISPOSED;
499
+ let child = zombie ? node._pendingFirstChild : node._firstChild;
500
+ while (child) {
501
+ const nextChild = child._nextSibling;
502
+ if (child._deps) {
503
+ const n = child;
504
+ deleteFromHeap(n, n._flags & REACTIVE_ZOMBIE ? zombieQueue : dirtyQueue);
505
+ let toRemove = n._deps;
506
+ do {
507
+ toRemove = unlinkSubs(toRemove);
508
+ } while (toRemove !== null);
509
+ n._deps = null;
510
+ n._depsTail = null;
511
+ }
512
+ disposeChildren(child, true);
513
+ child = nextChild;
514
+ }
515
+ if (zombie) {
516
+ node._pendingFirstChild = null;
517
+ } else {
518
+ node._firstChild = null;
519
+ node._nextSibling = null;
520
+ node._childCount = 0;
521
+ }
522
+ runDisposal(node, zombie);
523
+ }
524
+ function runDisposal(node, zombie) {
525
+ let disposal = zombie ? node._pendingDisposal : node._disposal;
526
+ if (!disposal) return;
527
+ if (Array.isArray(disposal)) {
528
+ for (let i = 0; i < disposal.length; i++) {
529
+ const callable = disposal[i];
530
+ callable.call(callable);
531
+ }
532
+ } else {
533
+ disposal.call(disposal);
534
+ }
535
+ zombie ? node._pendingDisposal = null : node._disposal = null;
536
+ }
537
+ function recompute(el, create = false) {
538
+ const isEffect = el._type;
539
+ if (!create) {
540
+ if (el._transition && (!isEffect || activeTransition) && activeTransition !== el._transition)
541
+ globalQueue.initTransition(el._transition);
542
+ deleteFromHeap(el, el._flags & REACTIVE_ZOMBIE ? zombieQueue : dirtyQueue);
543
+ if (el._transition || isEffect === EFFECT_TRACKED) disposeChildren(el);
544
+ else {
545
+ markDisposal(el);
546
+ el._pendingDisposal = el._disposal;
547
+ el._pendingFirstChild = el._firstChild;
548
+ el._disposal = null;
549
+ el._firstChild = null;
550
+ el._childCount = 0;
551
+ }
552
+ }
553
+ const isOptimisticDirty = !!(el._flags & REACTIVE_OPTIMISTIC_DIRTY);
554
+ const hasOverride = hasActiveOverride(el);
555
+ const wasPending = !!(el._statusFlags & STATUS_PENDING);
556
+ const oldcontext = context;
557
+ context = el;
558
+ el._depsTail = null;
559
+ el._flags = REACTIVE_RECOMPUTING_DEPS;
560
+ el._time = clock;
561
+ let value = el._pendingValue === NOT_PENDING ? el._value : el._pendingValue;
562
+ let oldHeight = el._height;
563
+ let prevTracking = tracking;
564
+ let prevLane = currentOptimisticLane;
565
+ let prevStrictRead = false;
566
+ {
567
+ prevStrictRead = strictRead;
568
+ strictRead = false;
569
+ }
570
+ tracking = true;
571
+ if (isOptimisticDirty) {
572
+ const lane = resolveLane(el);
573
+ if (lane) currentOptimisticLane = lane;
574
+ }
575
+ try {
576
+ value = handleAsync(el, el._fn(value));
577
+ clearStatus(el);
578
+ const resolvedLane = resolveLane(el);
579
+ if (resolvedLane) {
580
+ resolvedLane._pendingAsync.delete(el);
581
+ updatePendingSignal(resolvedLane._source);
582
+ }
583
+ } catch (e) {
584
+ if (e instanceof NotReadyError && currentOptimisticLane) {
585
+ const lane = findLane(currentOptimisticLane);
586
+ if (lane._source !== el) {
587
+ lane._pendingAsync.add(el);
588
+ el._optimisticLane = lane;
589
+ updatePendingSignal(lane._source);
590
+ }
591
+ }
592
+ notifyStatus(
593
+ el,
594
+ e instanceof NotReadyError ? STATUS_PENDING : STATUS_ERROR,
595
+ e,
596
+ void 0,
597
+ e instanceof NotReadyError ? el._optimisticLane : void 0
598
+ );
599
+ } finally {
600
+ tracking = prevTracking;
601
+ strictRead = prevStrictRead;
602
+ el._flags = REACTIVE_NONE | (create ? el._flags & REACTIVE_SNAPSHOT_STALE : 0);
603
+ context = oldcontext;
604
+ }
605
+ if (!el._error) {
606
+ const depsTail = el._depsTail;
607
+ let toRemove = depsTail !== null ? depsTail._nextDep : el._deps;
608
+ if (toRemove !== null) {
609
+ do {
610
+ toRemove = unlinkSubs(toRemove);
611
+ } while (toRemove !== null);
612
+ if (depsTail !== null) depsTail._nextDep = null;
613
+ else el._deps = null;
614
+ }
615
+ const compareValue = hasOverride ? el._value : el._pendingValue === NOT_PENDING ? el._value : el._pendingValue;
616
+ const valueChanged = !el._equals || !el._equals(compareValue, value);
617
+ if (valueChanged) {
618
+ const prevVisible = hasOverride ? el._value : void 0;
619
+ if (create || isEffect && activeTransition !== el._transition || isOptimisticDirty)
620
+ el._value = value;
621
+ else el._pendingValue = value;
622
+ if (hasOverride && !isOptimisticDirty && wasPending) {
623
+ const ov = el._overrideVersion || 0;
624
+ const lv = el._laneVersion || 0;
625
+ if (ov <= lv) el._value = value;
626
+ }
627
+ if (!hasOverride || isOptimisticDirty || el._value !== prevVisible) {
628
+ insertSubs(el, isOptimisticDirty || hasOverride);
629
+ }
630
+ } else if (hasOverride) {
631
+ el._pendingValue = value;
632
+ } else if (el._height != oldHeight) {
633
+ for (let s = el._subs; s !== null; s = s._nextSub) {
634
+ insertIntoHeapHeight(s._sub, s._sub._flags & REACTIVE_ZOMBIE ? zombieQueue : dirtyQueue);
635
+ }
636
+ }
637
+ }
638
+ currentOptimisticLane = prevLane;
639
+ (!create || el._statusFlags & STATUS_PENDING) && !el._transition && !(activeTransition && el._optimistic) && globalQueue._pendingNodes.push(el);
640
+ el._transition && isEffect && activeTransition !== el._transition && runInTransition(el._transition, () => recompute(el));
641
+ }
642
+ function untrack(fn, strictReadLabel) {
643
+ if (!tracking && !strictRead && true) return fn();
644
+ const prevTracking = tracking;
645
+ const prevStrictRead = strictRead;
646
+ tracking = false;
647
+ strictRead = false;
648
+ try {
649
+ return fn();
650
+ } finally {
651
+ tracking = prevTracking;
652
+ strictRead = prevStrictRead;
653
+ }
654
+ }
655
+ function setSignal(el, v) {
656
+ if (!el._pureWrite && !leafEffectActive && context && el._firewall !== context)
657
+ console.warn("A Signal was written to in an owned scope.");
658
+ if (el._transition && activeTransition !== el._transition)
659
+ globalQueue.initTransition(el._transition);
660
+ const isOptimistic = el._optimistic && !projectionWriteActive;
661
+ const currentValue = isOptimistic ? el._value : el._pendingValue === NOT_PENDING ? el._value : el._pendingValue;
662
+ if (typeof v === "function") v = v(currentValue);
663
+ const valueChanged = !el._equals || !el._equals(currentValue, v) || !!(el._statusFlags & STATUS_UNINITIALIZED);
664
+ if (!valueChanged) {
665
+ if (isOptimistic && el._pendingValue !== NOT_PENDING && el._fn) {
666
+ insertSubs(el, true);
667
+ schedule();
668
+ }
669
+ return v;
670
+ }
671
+ if (isOptimistic) {
672
+ const alreadyTracked = globalQueue._optimisticNodes.includes(el);
673
+ if (el._transition && alreadyTracked) {
674
+ globalQueue.initTransition(el._transition);
675
+ }
676
+ if (el._pendingValue === NOT_PENDING) {
677
+ el._pendingValue = el._value;
678
+ }
679
+ if (!alreadyTracked) {
680
+ globalQueue._optimisticNodes.push(el);
681
+ }
682
+ el._overrideVersion = (el._overrideVersion || 0) + 1;
683
+ const lane = getOrCreateLane(el);
684
+ el._optimisticLane = lane;
685
+ el._value = v;
686
+ } else {
687
+ if (el._pendingValue === NOT_PENDING) globalQueue._pendingNodes.push(el);
688
+ el._pendingValue = v;
689
+ }
690
+ updatePendingSignal(el);
691
+ if (el._latestValueComputed) {
692
+ setSignal(el._latestValueComputed, v);
693
+ }
694
+ el._time = clock;
695
+ insertSubs(el, isOptimistic);
696
+ schedule();
697
+ return v;
698
+ }
699
+ function computePendingState(el) {
700
+ const comp = el;
701
+ if (el._optimistic && el._pendingValue !== NOT_PENDING) {
702
+ if (comp._statusFlags & STATUS_PENDING && !(comp._statusFlags & STATUS_UNINITIALIZED))
703
+ return true;
704
+ if (el._parentSource) {
705
+ const lane = el._optimisticLane ? findLane(el._optimisticLane) : null;
706
+ return !!(lane && lane._pendingAsync.size > 0);
707
+ }
708
+ return true;
709
+ }
710
+ if (el._pendingValue !== NOT_PENDING && !(comp._statusFlags & STATUS_UNINITIALIZED)) return true;
711
+ return !!(comp._statusFlags & STATUS_PENDING && !(comp._statusFlags & STATUS_UNINITIALIZED));
712
+ }
713
+ function updatePendingSignal(el) {
714
+ if (el._pendingSignal) {
715
+ const pending = computePendingState(el);
716
+ const sig = el._pendingSignal;
717
+ setSignal(sig, pending);
718
+ if (!pending && sig._optimisticLane) {
719
+ const sourceLane = resolveLane(el);
720
+ if (sourceLane && sourceLane._pendingAsync.size > 0) {
721
+ const sigLane = findLane(sig._optimisticLane);
722
+ if (sigLane !== sourceLane) {
723
+ mergeLanes(sourceLane, sigLane);
724
+ }
725
+ }
726
+ signalLanes.delete(sig);
727
+ sig._optimisticLane = void 0;
728
+ }
729
+ }
730
+ }
731
+ function isWrappable(obj) {
732
+ return obj != null && typeof obj === "object" && !Object.isFrozen(obj);
733
+ }
734
+ function updatePath(current, args, i = 0) {
735
+ let part, prev = current;
736
+ if (i < args.length - 1) {
737
+ part = args[i];
738
+ const partType = typeof part;
739
+ const isArray = Array.isArray(current);
740
+ if (Array.isArray(part)) {
741
+ for (let j = 0; j < part.length; j++) {
742
+ args[i] = part[j];
743
+ updatePath(current, args, i);
744
+ }
745
+ args[i] = part;
746
+ return;
747
+ } else if (isArray && partType === "function") {
748
+ for (let j = 0; j < current.length; j++) {
749
+ if (part(current[j], j)) {
750
+ args[i] = j;
751
+ updatePath(current, args, i);
752
+ }
753
+ }
754
+ args[i] = part;
755
+ return;
756
+ } else if (isArray && partType === "object") {
757
+ const { from = 0, to = current.length - 1, by = 1 } = part;
758
+ for (let j = from; j <= to; j += by) {
759
+ args[i] = j;
760
+ updatePath(current, args, i);
761
+ }
762
+ args[i] = part;
763
+ return;
764
+ } else if (i < args.length - 2) {
765
+ updatePath(current[part], args, i + 1);
766
+ return;
767
+ }
768
+ prev = current[part];
769
+ }
770
+ let value = args[args.length - 1];
771
+ if (typeof value === "function") {
772
+ value = value(prev);
773
+ if (value === prev) return;
774
+ }
775
+ if (part === void 0 && value == void 0) return;
776
+ if (value === DELETE) {
777
+ delete current[part];
778
+ } else if (part === void 0 || isWrappable(prev) && isWrappable(value) && !Array.isArray(value)) {
779
+ const target = part !== void 0 ? current[part] : current;
780
+ const keys = Object.keys(value);
781
+ for (let i2 = 0; i2 < keys.length; i2++) target[keys[i2]] = value[keys[i2]];
782
+ } else {
783
+ current[part] = value;
784
+ }
785
+ }
786
+ 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, _onUnhandledAsync, Queue, GlobalQueue, globalQueue, signalLanes, activeLanes, leafEffectActive, tracking, context, currentOptimisticLane, strictRead, DELETE;
787
+ var init_dev = __esm({
788
+ "../../node_modules/.pnpm/@solidjs+signals@0.12.0/node_modules/@solidjs/signals/dist/dev.js"() {
789
+ NotReadyError = class extends Error {
790
+ source;
791
+ constructor(source) {
792
+ super();
793
+ this.source = source;
794
+ }
795
+ };
796
+ StatusError = class extends Error {
797
+ source;
798
+ constructor(source, original) {
799
+ super(original instanceof Error ? original.message : String(original), { cause: original });
800
+ this.source = source;
801
+ }
802
+ };
803
+ REACTIVE_NONE = 0;
804
+ REACTIVE_CHECK = 1 << 0;
805
+ REACTIVE_DIRTY = 1 << 1;
806
+ REACTIVE_RECOMPUTING_DEPS = 1 << 2;
807
+ REACTIVE_IN_HEAP = 1 << 3;
808
+ REACTIVE_IN_HEAP_HEIGHT = 1 << 4;
809
+ REACTIVE_ZOMBIE = 1 << 5;
810
+ REACTIVE_DISPOSED = 1 << 6;
811
+ REACTIVE_OPTIMISTIC_DIRTY = 1 << 7;
812
+ REACTIVE_SNAPSHOT_STALE = 1 << 8;
813
+ STATUS_PENDING = 1 << 0;
814
+ STATUS_ERROR = 1 << 1;
815
+ STATUS_UNINITIALIZED = 1 << 2;
816
+ EFFECT_RENDER = 1;
817
+ EFFECT_USER = 2;
818
+ EFFECT_TRACKED = 3;
819
+ NOT_PENDING = {};
820
+ transitions = /* @__PURE__ */ new Set();
821
+ dirtyQueue = { _heap: new Array(2e3).fill(void 0), _marked: false, _min: 0, _max: 0 };
822
+ zombieQueue = { _heap: new Array(2e3).fill(void 0), _marked: false, _min: 0, _max: 0 };
823
+ clock = 0;
824
+ activeTransition = null;
825
+ scheduled = false;
826
+ projectionWriteActive = false;
827
+ _onUnhandledAsync = null;
828
+ Queue = class {
829
+ _parent = null;
830
+ _queues = [[], []];
831
+ _children = [];
832
+ created = clock;
833
+ addChild(child) {
834
+ this._children.push(child);
835
+ child._parent = this;
836
+ }
837
+ removeChild(child) {
838
+ const index = this._children.indexOf(child);
839
+ if (index >= 0) {
840
+ this._children.splice(index, 1);
841
+ child._parent = null;
842
+ }
843
+ }
844
+ notify(node, mask, flags, error) {
845
+ if (this._parent) return this._parent.notify(node, mask, flags, error);
846
+ return false;
847
+ }
848
+ run(type) {
849
+ if (this._queues[type - 1].length) {
850
+ const effects = this._queues[type - 1];
851
+ this._queues[type - 1] = [];
852
+ runQueue(effects, type);
853
+ }
854
+ for (let i = 0; i < this._children.length; i++) this._children[i].run?.(type);
855
+ }
856
+ enqueue(type, fn) {
857
+ if (type) {
858
+ if (currentOptimisticLane) {
859
+ const lane = findLane(currentOptimisticLane);
860
+ lane._effectQueues[type - 1].push(fn);
861
+ } else {
862
+ this._queues[type - 1].push(fn);
863
+ }
864
+ }
865
+ schedule();
866
+ }
867
+ stashQueues(stub) {
868
+ stub._queues[0].push(...this._queues[0]);
869
+ stub._queues[1].push(...this._queues[1]);
870
+ this._queues = [[], []];
871
+ for (let i = 0; i < this._children.length; i++) {
872
+ let child = this._children[i];
873
+ let childStub = stub._children[i];
874
+ if (!childStub) {
875
+ childStub = { _queues: [[], []], _children: [] };
876
+ stub._children[i] = childStub;
877
+ }
878
+ child.stashQueues(childStub);
879
+ }
880
+ }
881
+ restoreQueues(stub) {
882
+ this._queues[0].push(...stub._queues[0]);
883
+ this._queues[1].push(...stub._queues[1]);
884
+ for (let i = 0; i < stub._children.length; i++) {
885
+ const childStub = stub._children[i];
886
+ let child = this._children[i];
887
+ if (child) child.restoreQueues(childStub);
888
+ }
889
+ }
890
+ };
891
+ GlobalQueue = class _GlobalQueue extends Queue {
892
+ _running = false;
893
+ _pendingNodes = [];
894
+ _optimisticNodes = [];
895
+ _optimisticStores = /* @__PURE__ */ new Set();
896
+ static _update;
897
+ static _dispose;
898
+ static _clearOptimisticStore = null;
899
+ flush() {
900
+ if (this._running) return;
901
+ this._running = true;
902
+ try {
903
+ runHeap(dirtyQueue, _GlobalQueue._update);
904
+ if (activeTransition) {
905
+ const isComplete = transitionComplete(activeTransition);
906
+ if (!isComplete) {
907
+ let t = activeTransition;
908
+ runHeap(zombieQueue, _GlobalQueue._update);
909
+ this._pendingNodes = [];
910
+ this._optimisticNodes = [];
911
+ this._optimisticStores = /* @__PURE__ */ new Set();
912
+ runLaneEffects(EFFECT_RENDER);
913
+ runLaneEffects(EFFECT_USER);
914
+ this.stashQueues(activeTransition._queueStash);
915
+ clock++;
916
+ scheduled = dirtyQueue._max >= dirtyQueue._min;
917
+ reassignPendingTransition(activeTransition._pendingNodes);
918
+ activeTransition = null;
919
+ finalizePureQueue(null, true);
920
+ return;
921
+ }
922
+ this._pendingNodes !== activeTransition._pendingNodes && this._pendingNodes.push(...activeTransition._pendingNodes);
923
+ this.restoreQueues(activeTransition._queueStash);
924
+ transitions.delete(activeTransition);
925
+ const completingTransition = activeTransition;
926
+ activeTransition = null;
927
+ reassignPendingTransition(this._pendingNodes);
928
+ finalizePureQueue(completingTransition);
929
+ } else {
930
+ if (transitions.size) runHeap(zombieQueue, _GlobalQueue._update);
931
+ finalizePureQueue();
932
+ }
933
+ clock++;
934
+ scheduled = dirtyQueue._max >= dirtyQueue._min;
935
+ runLaneEffects(EFFECT_RENDER);
936
+ this.run(EFFECT_RENDER);
937
+ runLaneEffects(EFFECT_USER);
938
+ this.run(EFFECT_USER);
939
+ } finally {
940
+ this._running = false;
941
+ }
942
+ }
943
+ notify(node, mask, flags, error) {
944
+ if (mask & STATUS_PENDING) {
945
+ if (_onUnhandledAsync && flags & STATUS_PENDING) {
946
+ _onUnhandledAsync();
947
+ }
948
+ if (flags & STATUS_PENDING) {
949
+ const actualError = error !== void 0 ? error : node._error;
950
+ if (activeTransition && actualError && !activeTransition._asyncNodes.includes(actualError.source)) {
951
+ activeTransition._asyncNodes.push(actualError.source);
952
+ schedule();
953
+ }
954
+ }
955
+ return true;
956
+ }
957
+ return false;
958
+ }
959
+ initTransition(transition) {
960
+ if (transition) transition = currentTransition(transition);
961
+ if (transition && transition === activeTransition) return;
962
+ if (!transition && activeTransition && activeTransition._time === clock) return;
963
+ if (!activeTransition) {
964
+ activeTransition = transition ?? {
965
+ _time: clock,
966
+ _pendingNodes: [],
967
+ _asyncNodes: [],
968
+ _optimisticNodes: [],
969
+ _optimisticStores: /* @__PURE__ */ new Set(),
970
+ _actions: [],
971
+ _queueStash: { _queues: [[], []], _children: [] },
972
+ _done: false
973
+ };
974
+ } else if (transition) {
975
+ const outgoing = activeTransition;
976
+ outgoing._done = transition;
977
+ transition._actions.push(...outgoing._actions);
978
+ for (const lane of activeLanes) {
979
+ if (lane._transition === outgoing) lane._transition = transition;
980
+ }
981
+ transition._optimisticNodes.push(...outgoing._optimisticNodes);
982
+ for (const store of outgoing._optimisticStores) {
983
+ transition._optimisticStores.add(store);
984
+ }
985
+ transitions.delete(outgoing);
986
+ activeTransition = transition;
987
+ }
988
+ transitions.add(activeTransition);
989
+ activeTransition._time = clock;
990
+ for (let i = 0; i < this._pendingNodes.length; i++) {
991
+ const n = this._pendingNodes[i];
992
+ n._transition = activeTransition;
993
+ activeTransition._pendingNodes.push(n);
994
+ }
995
+ this._pendingNodes = activeTransition._pendingNodes;
996
+ for (let i = 0; i < this._optimisticNodes.length; i++) {
997
+ const node = this._optimisticNodes[i];
998
+ node._transition = activeTransition;
999
+ activeTransition._optimisticNodes.push(node);
1000
+ }
1001
+ this._optimisticNodes = activeTransition._optimisticNodes;
1002
+ for (const lane of activeLanes) {
1003
+ if (!lane._transition) lane._transition = activeTransition;
1004
+ }
1005
+ for (const store of this._optimisticStores) activeTransition._optimisticStores.add(store);
1006
+ this._optimisticStores = activeTransition._optimisticStores;
1007
+ }
1008
+ };
1009
+ globalQueue = new GlobalQueue();
1010
+ signalLanes = /* @__PURE__ */ new WeakMap();
1011
+ activeLanes = /* @__PURE__ */ new Set();
1012
+ leafEffectActive = false;
1013
+ GlobalQueue._update = recompute;
1014
+ GlobalQueue._dispose = disposeChildren;
1015
+ tracking = false;
1016
+ context = null;
1017
+ currentOptimisticLane = null;
1018
+ strictRead = false;
1019
+ DELETE = /* @__PURE__ */ Symbol("STORE_PATH_DELETE");
1020
+ Object.assign(
1021
+ function storePath2(...args) {
1022
+ return (state) => {
1023
+ updatePath(state, args);
1024
+ };
1025
+ },
1026
+ { DELETE }
1027
+ );
1028
+ }
1029
+ });
1030
+ function template(html, isImportNode, isSVG, isMathML) {
1031
+ let node;
1032
+ const create = (bypassGuard) => {
1033
+ if (isHydrating() && !bypassGuard) throw new Error("Failed attempt to create new DOM elements during hydration. Check that the libraries you are using support hydration.");
1034
+ const t = document.createElement("template");
1035
+ t.innerHTML = html;
1036
+ return t.content.firstChild;
1037
+ };
1038
+ const fn = isImportNode ? (bypassGuard) => solidJs.untrack(() => document.importNode(node || (node = create(bypassGuard)), true)) : (bypassGuard) => (node || (node = create(bypassGuard))).cloneNode(true);
1039
+ fn._html = html;
1040
+ return fn;
1041
+ }
1042
+ function setAttribute(node, name, value) {
1043
+ if (isHydrating(node)) return;
1044
+ node.removeAttribute(name);
1045
+ }
1046
+ function style(node, value, prev) {
1047
+ if (!value) {
1048
+ if (prev) setAttribute(node, "style");
1049
+ return;
1050
+ }
1051
+ const nodeStyle = node.style;
1052
+ if (typeof value === "string") return nodeStyle.cssText = value;
1053
+ typeof prev === "string" && (nodeStyle.cssText = prev = void 0);
1054
+ prev || (prev = {});
1055
+ value || (value = {});
1056
+ let v, s;
1057
+ for (s in value) {
1058
+ v = value[s];
1059
+ if (v !== prev[s]) nodeStyle.setProperty(s, v);
1060
+ delete prev[s];
1061
+ }
1062
+ for (s in prev) value[s] == null && nodeStyle.removeProperty(s);
1063
+ }
1064
+ function applyRef(r, element) {
1065
+ Array.isArray(r) ? r.flat(Infinity).forEach((f) => f && f(element)) : r(element);
1066
+ }
1067
+ function ref(fn, element) {
1068
+ const resolved = solidJs.untrack(fn);
1069
+ solidJs.runWithOwner(null, () => applyRef(resolved, element));
1070
+ }
1071
+ function isHydrating(node) {
1072
+ return solidJs.sharedConfig.hydrating && (!node || node.isConnected);
1073
+ }
1074
+ var effect, isServer, isDev;
1075
+ var init_dev2 = __esm({
1076
+ "../../node_modules/.pnpm/@solidjs+web@2.0.0-beta.2_@solidjs+signals@0.12.0_solid-js@2.0.0-beta.2/node_modules/@solidjs/web/dist/dev.js"() {
1077
+ init_dev();
1078
+ effect = (fn, effectFn, initial) => solidJs.createRenderEffect(fn, effectFn, initial, {
1079
+ transparent: true
1080
+ });
1081
+ isServer = false;
1082
+ isDev = true;
1083
+ }
1084
+ });
1085
+
18
1086
  // src/devtools.tsx
19
1087
  var devtools_exports = {};
20
1088
  __export(devtools_exports, {
@@ -23,7 +1091,7 @@ __export(devtools_exports, {
23
1091
  function SolidQueryDevtools(props) {
24
1092
  const queryClient = solidQuery.useQueryClient(props.client);
25
1093
  const client = solidJs.createMemo(() => queryClient);
26
- let ref;
1094
+ let ref2;
27
1095
  const devtools = new queryDevtools.TanstackQueryDevtools({
28
1096
  client: client(),
29
1097
  queryFlavor: "Solid Query",
@@ -38,45 +1106,45 @@ function SolidQueryDevtools(props) {
38
1106
  hideDisabledQueries: props.hideDisabledQueries,
39
1107
  theme: props.theme
40
1108
  });
41
- solidJs.createEffect(() => {
42
- devtools.setClient(client());
1109
+ solidJs.createEffect(() => client(), (c) => {
1110
+ devtools.setClient(c);
43
1111
  });
44
- solidJs.createEffect(() => {
45
- const buttonPos = props.buttonPosition;
1112
+ solidJs.createEffect(() => props.buttonPosition, (buttonPos) => {
46
1113
  if (buttonPos) {
47
1114
  devtools.setButtonPosition(buttonPos);
48
1115
  }
49
1116
  });
50
- solidJs.createEffect(() => {
51
- const pos = props.position;
1117
+ solidJs.createEffect(() => props.position, (pos) => {
52
1118
  if (pos) {
53
1119
  devtools.setPosition(pos);
54
1120
  }
55
1121
  });
56
- solidJs.createEffect(() => {
57
- devtools.setInitialIsOpen(props.initialIsOpen || false);
1122
+ solidJs.createEffect(() => props.initialIsOpen, (initialIsOpen) => {
1123
+ devtools.setInitialIsOpen(initialIsOpen || false);
58
1124
  });
59
- solidJs.createEffect(() => {
60
- devtools.setErrorTypes(props.errorTypes || []);
1125
+ solidJs.createEffect(() => props.errorTypes, (errorTypes) => {
1126
+ devtools.setErrorTypes(errorTypes || []);
61
1127
  });
62
- solidJs.createEffect(() => {
63
- devtools.setTheme(props.theme || "system");
1128
+ solidJs.createEffect(() => props.theme, (theme) => {
1129
+ devtools.setTheme(theme || "system");
64
1130
  });
65
- solidJs.onMount(() => {
66
- devtools.mount(ref);
1131
+ solidJs.onSettled(() => {
1132
+ devtools.mount(ref2);
67
1133
  solidJs.onCleanup(() => devtools.unmount());
68
1134
  });
69
1135
  return (() => {
70
1136
  var _el$ = _tmpl$();
71
- var _ref$ = ref;
72
- typeof _ref$ === "function" ? web.use(_ref$, _el$) : ref = _el$;
1137
+ var _ref$ = ref2;
1138
+ typeof _ref$ === "function" || Array.isArray(_ref$) ? ref(() => _ref$, _el$) : ref2 = _el$;
73
1139
  return _el$;
74
1140
  })();
75
1141
  }
76
1142
  var _tmpl$;
77
1143
  var init_devtools = __esm({
78
1144
  "src/devtools.tsx"() {
79
- _tmpl$ = /* @__PURE__ */ web.template(`<div class=tsqd-parent-container>`);
1145
+ init_dev2();
1146
+ init_dev2();
1147
+ _tmpl$ = /* @__PURE__ */ template(`<div class=tsqd-parent-container>`);
80
1148
  }
81
1149
  });
82
1150
 
@@ -88,7 +1156,7 @@ __export(devtoolsPanel_exports, {
88
1156
  function SolidQueryDevtoolsPanel(props) {
89
1157
  const queryClient = solidQuery.useQueryClient(props.client);
90
1158
  const client = solidJs.createMemo(() => queryClient);
91
- let ref;
1159
+ let ref2;
92
1160
  const {
93
1161
  errorTypes,
94
1162
  styleNonce,
@@ -110,59 +1178,72 @@ function SolidQueryDevtoolsPanel(props) {
110
1178
  hideDisabledQueries,
111
1179
  theme: props.theme
112
1180
  });
113
- solidJs.createEffect(() => {
114
- devtools.setClient(client());
1181
+ solidJs.createEffect(() => client(), (c) => {
1182
+ devtools.setClient(c);
115
1183
  });
116
- solidJs.createEffect(() => {
117
- devtools.setOnClose(props.onClose ?? (() => {
1184
+ solidJs.createEffect(() => props.onClose, (onClose) => {
1185
+ devtools.setOnClose(onClose ?? (() => {
118
1186
  }));
119
1187
  });
120
- solidJs.createEffect(() => {
121
- devtools.setErrorTypes(props.errorTypes || []);
1188
+ solidJs.createEffect(() => props.errorTypes, (errorTypes2) => {
1189
+ devtools.setErrorTypes(errorTypes2 || []);
122
1190
  });
123
- solidJs.createEffect(() => {
124
- devtools.setTheme(props.theme || "system");
1191
+ solidJs.createEffect(() => props.theme, (theme) => {
1192
+ devtools.setTheme(theme || "system");
125
1193
  });
126
- solidJs.onMount(() => {
127
- devtools.mount(ref);
1194
+ solidJs.onSettled(() => {
1195
+ devtools.mount(ref2);
128
1196
  solidJs.onCleanup(() => devtools.unmount());
129
1197
  });
130
1198
  return (() => {
131
1199
  var _el$ = _tmpl$2();
132
- var _ref$ = ref;
133
- typeof _ref$ === "function" ? web.use(_ref$, _el$) : ref = _el$;
134
- web.effect((_$p) => web.style(_el$, {
135
- height: "500px",
1200
+ var _ref$ = ref2;
1201
+ typeof _ref$ === "function" || Array.isArray(_ref$) ? ref(() => _ref$, _el$) : ref2 = _el$;
1202
+ effect(() => ({
136
1203
  ...props.style
137
- }, _$p));
1204
+ }), (_v$, _$p) => {
1205
+ style(_el$, _v$, _$p);
1206
+ });
138
1207
  return _el$;
139
1208
  })();
140
1209
  }
141
1210
  var _tmpl$2;
142
1211
  var init_devtoolsPanel = __esm({
143
1212
  "src/devtoolsPanel.tsx"() {
144
- _tmpl$2 = /* @__PURE__ */ web.template(`<div class=tsqd-parent-container>`);
1213
+ init_dev2();
1214
+ init_dev2();
1215
+ init_dev2();
1216
+ init_dev2();
1217
+ _tmpl$2 = /* @__PURE__ */ template(`<div class=tsqd-parent-container style=height:500px>`);
145
1218
  }
146
1219
  });
1220
+
1221
+ // src/index.tsx
1222
+ init_dev2();
1223
+
1224
+ // src/clientOnly.tsx
1225
+ init_dev2();
147
1226
  function clientOnly(fn) {
148
- if (web.isServer) return (props) => props.fallback;
1227
+ if (isServer) return (props) => props.fallback;
149
1228
  const [comp, setComp] = solidJs.createSignal();
150
1229
  fn().then((m) => setComp(() => m.default));
151
1230
  return (props) => {
152
1231
  let Comp;
153
1232
  let m;
154
- const [, rest] = solidJs.splitProps(props, ["fallback"]);
155
- if ((Comp = comp()) && !solidJs.sharedConfig.context) return Comp(rest);
156
- const [mounted, setMounted] = solidJs.createSignal(!solidJs.sharedConfig.context);
157
- solidJs.onMount(() => setMounted(true));
1233
+ const rest = solidJs.omit(props, "fallback");
1234
+ if ((Comp = comp()) && !solidJs.sharedConfig.hydrating) return Comp(rest);
1235
+ const [mounted, setMounted] = solidJs.createSignal(!solidJs.sharedConfig.hydrating);
1236
+ solidJs.onSettled(() => {
1237
+ setMounted(true);
1238
+ });
158
1239
  return solidJs.createMemo(() => (Comp = comp(), m = mounted(), solidJs.untrack(() => Comp && m ? Comp(rest) : props.fallback)));
159
1240
  };
160
1241
  }
161
1242
 
162
1243
  // src/index.tsx
163
- exports.SolidQueryDevtools = web.isDev ? clientOnly(() => Promise.resolve().then(() => (init_devtools(), devtools_exports))) : function() {
1244
+ exports.SolidQueryDevtools = isDev ? clientOnly(() => Promise.resolve().then(() => (init_devtools(), devtools_exports))) : function() {
164
1245
  return null;
165
1246
  };
166
- exports.SolidQueryDevtoolsPanel = web.isDev ? clientOnly(() => Promise.resolve().then(() => (init_devtoolsPanel(), devtoolsPanel_exports))) : function() {
1247
+ exports.SolidQueryDevtoolsPanel = isDev ? clientOnly(() => Promise.resolve().then(() => (init_devtoolsPanel(), devtoolsPanel_exports))) : function() {
167
1248
  return null;
168
1249
  };