@tanstack/solid-query-devtools 6.0.0-alpha.2 → 6.0.0-beta.3

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.jsx CHANGED
@@ -1,8 +1,8 @@
1
- // ../../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/dev.js
1
+ // ../../node_modules/.pnpm/@solidjs+web@2.0.0-beta.4_@solidjs+signals@0.13.9_solid-js@2.0.0-beta.5/node_modules/@solidjs/web/dist/dev.js
2
2
  import { createRenderEffect, createMemo as createMemo$1, sharedConfig, untrack as untrack2, runWithOwner, flatten, createRoot, omit, $DEVCOMP, enableHydration, enforceLoadingBoundary } from "solid-js";
3
3
  import { Errored, For, Hydration, Loading, Match, NoHydration, Show, Switch, createComponent, getOwner, merge, untrack as untrack3 } from "solid-js";
4
4
 
5
- // ../../node_modules/.pnpm/@solidjs+signals@0.13.6/node_modules/@solidjs/signals/dist/dev.js
5
+ // ../../node_modules/.pnpm/@solidjs+signals@0.13.9/node_modules/@solidjs/signals/dist/dev.js
6
6
  var NotReadyError = class extends Error {
7
7
  source;
8
8
  constructor(source) {
@@ -585,6 +585,92 @@ function assignOrMergeLane(el, sourceLane) {
585
585
  }
586
586
  el._optimisticLane = sourceLane;
587
587
  }
588
+ function unlinkSubs(link) {
589
+ const dep = link._dep;
590
+ const nextDep = link._nextDep;
591
+ const nextSub = link._nextSub;
592
+ const prevSub = link._prevSub;
593
+ if (nextSub !== null) nextSub._prevSub = prevSub;
594
+ else dep._subsTail = prevSub;
595
+ if (prevSub !== null) prevSub._nextSub = nextSub;
596
+ else {
597
+ dep._subs = nextSub;
598
+ if (nextSub === null) {
599
+ dep._unobserved?.();
600
+ dep._fn && !dep._preventAutoDisposal && !(dep._flags & REACTIVE_ZOMBIE) && unobserved(dep);
601
+ }
602
+ }
603
+ return nextDep;
604
+ }
605
+ function unobserved(el) {
606
+ deleteFromHeap(el, el._flags & REACTIVE_ZOMBIE ? zombieQueue : dirtyQueue);
607
+ let dep = el._deps;
608
+ while (dep !== null) {
609
+ dep = unlinkSubs(dep);
610
+ }
611
+ el._deps = null;
612
+ disposeChildren(el, true);
613
+ }
614
+ function markDisposal(el) {
615
+ let child = el._firstChild;
616
+ while (child) {
617
+ child._flags |= REACTIVE_ZOMBIE;
618
+ if (child._flags & REACTIVE_IN_HEAP) {
619
+ deleteFromHeap(child, dirtyQueue);
620
+ insertIntoHeap(child, zombieQueue);
621
+ }
622
+ markDisposal(child);
623
+ child = child._nextSibling;
624
+ }
625
+ }
626
+ function disposeChildren(node, self = false, zombie) {
627
+ if (node._flags & REACTIVE_DISPOSED) return;
628
+ if (self) node._flags = REACTIVE_DISPOSED;
629
+ if (self && node._fn) node._inFlight = null;
630
+ let child = zombie ? node._pendingFirstChild : node._firstChild;
631
+ while (child) {
632
+ const nextChild = child._nextSibling;
633
+ if (child._deps) {
634
+ const n = child;
635
+ deleteFromHeap(n, n._flags & REACTIVE_ZOMBIE ? zombieQueue : dirtyQueue);
636
+ let toRemove = n._deps;
637
+ do {
638
+ toRemove = unlinkSubs(toRemove);
639
+ } while (toRemove !== null);
640
+ n._deps = null;
641
+ n._depsTail = null;
642
+ }
643
+ disposeChildren(child, true);
644
+ child = nextChild;
645
+ }
646
+ if (zombie) {
647
+ node._pendingFirstChild = null;
648
+ } else {
649
+ node._firstChild = null;
650
+ node._childCount = 0;
651
+ }
652
+ runDisposal(node, zombie);
653
+ }
654
+ function runDisposal(node, zombie) {
655
+ let disposal = zombie ? node._pendingDisposal : node._disposal;
656
+ if (!disposal) return;
657
+ if (Array.isArray(disposal)) {
658
+ for (let i = 0; i < disposal.length; i++) {
659
+ const callable = disposal[i];
660
+ callable.call(callable);
661
+ }
662
+ } else {
663
+ disposal.call(disposal);
664
+ }
665
+ zombie ? node._pendingDisposal = null : node._disposal = null;
666
+ }
667
+ function cleanup(fn) {
668
+ if (!context) return fn;
669
+ if (!context._disposal) context._disposal = fn;
670
+ else if (Array.isArray(context._disposal)) context._disposal.push(fn);
671
+ else context._disposal = [context._disposal, fn];
672
+ return fn;
673
+ }
588
674
  function addPendingSource(el, source) {
589
675
  if (el._pendingSource === source || el._pendingSources?.has(source)) return false;
590
676
  if (!el._pendingSource) {
@@ -748,6 +834,19 @@ function handleAsync(el, result, setter) {
748
834
  if (iterator) {
749
835
  const it = result[Symbol.asyncIterator]();
750
836
  let hadSyncValue = false;
837
+ let completed = false;
838
+ cleanup(() => {
839
+ if (completed) return;
840
+ completed = true;
841
+ try {
842
+ const returned = it.return?.();
843
+ if (returned && typeof returned.then === "function") {
844
+ returned.then(void 0, () => {
845
+ });
846
+ }
847
+ } catch {
848
+ }
849
+ });
751
850
  const iterate = () => {
752
851
  let syncResult, resolved = false, isSync = true;
753
852
  it.next().then(
@@ -755,14 +854,21 @@ function handleAsync(el, result, setter) {
755
854
  if (isSync) {
756
855
  syncResult = r;
757
856
  resolved = true;
857
+ if (r.done) completed = true;
858
+ } else if (el._inFlight !== result) {
859
+ return;
758
860
  } else if (!r.done) asyncWrite(r.value, iterate);
759
861
  else {
862
+ completed = true;
760
863
  schedule();
761
864
  flush();
762
865
  }
763
866
  },
764
867
  (e) => {
765
- if (!isSync) handleError(e);
868
+ if (!isSync && el._inFlight === result) {
869
+ completed = true;
870
+ handleError(e);
871
+ }
766
872
  }
767
873
  );
768
874
  isSync = false;
@@ -833,84 +939,6 @@ function notifyStatus(el, status, error, blockStatus, lane) {
833
939
  });
834
940
  }
835
941
  var externalSourceConfig = null;
836
- function markDisposal(el) {
837
- let child = el._firstChild;
838
- while (child) {
839
- child._flags |= REACTIVE_ZOMBIE;
840
- if (child._flags & REACTIVE_IN_HEAP) {
841
- deleteFromHeap(child, dirtyQueue);
842
- insertIntoHeap(child, zombieQueue);
843
- }
844
- markDisposal(child);
845
- child = child._nextSibling;
846
- }
847
- }
848
- function disposeChildren(node, self = false, zombie) {
849
- if (node._flags & REACTIVE_DISPOSED) return;
850
- if (self) node._flags = REACTIVE_DISPOSED;
851
- let child = zombie ? node._pendingFirstChild : node._firstChild;
852
- while (child) {
853
- const nextChild = child._nextSibling;
854
- if (child._deps) {
855
- const n = child;
856
- deleteFromHeap(n, n._flags & REACTIVE_ZOMBIE ? zombieQueue : dirtyQueue);
857
- let toRemove = n._deps;
858
- do {
859
- toRemove = unlinkSubs(toRemove);
860
- } while (toRemove !== null);
861
- n._deps = null;
862
- n._depsTail = null;
863
- }
864
- disposeChildren(child, true);
865
- child = nextChild;
866
- }
867
- if (zombie) {
868
- node._pendingFirstChild = null;
869
- } else {
870
- node._firstChild = null;
871
- node._childCount = 0;
872
- }
873
- runDisposal(node, zombie);
874
- }
875
- function runDisposal(node, zombie) {
876
- let disposal = zombie ? node._pendingDisposal : node._disposal;
877
- if (!disposal) return;
878
- if (Array.isArray(disposal)) {
879
- for (let i = 0; i < disposal.length; i++) {
880
- const callable = disposal[i];
881
- callable.call(callable);
882
- }
883
- } else {
884
- disposal.call(disposal);
885
- }
886
- zombie ? node._pendingDisposal = null : node._disposal = null;
887
- }
888
- function unlinkSubs(link) {
889
- const dep = link._dep;
890
- const nextDep = link._nextDep;
891
- const nextSub = link._nextSub;
892
- const prevSub = link._prevSub;
893
- if (nextSub !== null) nextSub._prevSub = prevSub;
894
- else dep._subsTail = prevSub;
895
- if (prevSub !== null) prevSub._nextSub = nextSub;
896
- else {
897
- dep._subs = nextSub;
898
- if (nextSub === null) {
899
- dep._unobserved?.();
900
- dep._fn && !dep._preventAutoDisposal && !(dep._flags & REACTIVE_ZOMBIE) && unobserved(dep);
901
- }
902
- }
903
- return nextDep;
904
- }
905
- function unobserved(el) {
906
- deleteFromHeap(el, el._flags & REACTIVE_ZOMBIE ? zombieQueue : dirtyQueue);
907
- let dep = el._deps;
908
- while (dep !== null) {
909
- dep = unlinkSubs(dep);
910
- }
911
- el._deps = null;
912
- disposeChildren(el, true);
913
- }
914
942
  GlobalQueue._update = recompute;
915
943
  GlobalQueue._dispose = disposeChildren;
916
944
  var tracking = false;
@@ -922,6 +950,7 @@ function recompute(el, create = false) {
922
950
  if (el._transition && (!isEffect || activeTransition) && activeTransition !== el._transition)
923
951
  globalQueue.initTransition(el._transition);
924
952
  deleteFromHeap(el, el._flags & REACTIVE_ZOMBIE ? zombieQueue : dirtyQueue);
953
+ el._inFlight = null;
925
954
  if (el._transition || isEffect === EFFECT_TRACKED) disposeChildren(el);
926
955
  else {
927
956
  markDisposal(el);
@@ -1118,7 +1147,7 @@ function updatePendingSignal(el) {
1118
1147
  }
1119
1148
  }
1120
1149
  function isWrappable(obj) {
1121
- return obj != null && typeof obj === "object" && !Object.isFrozen(obj);
1150
+ return obj != null && typeof obj === "object" && !Object.isFrozen(obj) && !(typeof Node !== "undefined" && obj instanceof Node);
1122
1151
  }
1123
1152
  var DELETE = /* @__PURE__ */ Symbol("STORE_PATH_DELETE");
1124
1153
  function updatePath(current, args, i = 0) {
@@ -1182,7 +1211,7 @@ var storePath = Object.assign(
1182
1211
  { DELETE }
1183
1212
  );
1184
1213
 
1185
- // ../../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/dev.js
1214
+ // ../../node_modules/.pnpm/@solidjs+web@2.0.0-beta.4_@solidjs+signals@0.13.9_solid-js@2.0.0-beta.5/node_modules/@solidjs/web/dist/dev.js
1186
1215
  var isServer = false;
1187
1216
  var isDev = true;
1188
1217
 
@@ -1,4 +1,4 @@
1
- import { ref, template } from '../chunk/AU2REB6C.js';
1
+ import { ref, template } from '../chunk/ZANDWIFD.js';
2
2
  import { createMemo, createEffect, onCleanup } from 'solid-js';
3
3
  import { useQueryClient, onlineManager } from '@tanstack/solid-query';
4
4
  import { TanstackQueryDevtools } from '@tanstack/query-devtools';
@@ -1,4 +1,4 @@
1
- import { ref, template } from '../chunk/75V4Q6CI.js';
1
+ import { ref, template } from '../chunk/P6IZ7GTW.js';
2
2
  import { createMemo, createEffect, onCleanup } from 'solid-js';
3
3
  import { useQueryClient, onlineManager } from '@tanstack/solid-query';
4
4
  import { TanstackQueryDevtools } from '@tanstack/query-devtools';
@@ -1,4 +1,4 @@
1
- import { ref, effect, style, template } from '../chunk/AU2REB6C.js';
1
+ import { ref, effect, style, template } from '../chunk/P6IZ7GTW.js';
2
2
  import { createMemo, createEffect, onCleanup } from 'solid-js';
3
3
  import { useQueryClient, onlineManager } from '@tanstack/solid-query';
4
4
  import { TanstackQueryDevtoolsPanel } from '@tanstack/query-devtools';
@@ -1,4 +1,4 @@
1
- import { ref, effect, style, template } from '../chunk/75V4Q6CI.js';
1
+ import { ref, effect, style, template } from '../chunk/ZANDWIFD.js';
2
2
  import { createMemo, createEffect, onCleanup } from 'solid-js';
3
3
  import { useQueryClient, onlineManager } from '@tanstack/solid-query';
4
4
  import { TanstackQueryDevtoolsPanel } from '@tanstack/query-devtools';