@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/index.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/web.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/web.js
2
2
  import { createRenderEffect, createMemo as createMemo$1, sharedConfig, untrack as untrack2, runWithOwner, flatten, createRoot, omit, enableHydration } 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/prod.js
5
+ // ../../node_modules/.pnpm/@solidjs+signals@0.13.9/node_modules/@solidjs/signals/dist/prod.js
6
6
  var NotReadyError = class extends Error {
7
7
  source;
8
8
  constructor(e) {
@@ -565,39 +565,125 @@ function assignOrMergeLane(e, t) {
565
565
  }
566
566
  e.q = t;
567
567
  }
568
+ function unlinkSubs(e) {
569
+ const t = e.m;
570
+ const n = e.D;
571
+ const i = e.p;
572
+ const r = e.Ie;
573
+ if (i !== null) i.Ie = r;
574
+ else t.pe = r;
575
+ if (r !== null) r.p = i;
576
+ else {
577
+ t.I = i;
578
+ if (i === null) {
579
+ t.he?.();
580
+ t.L && !t.Ae && !(t.O & REACTIVE_ZOMBIE) && unobserved(t);
581
+ }
582
+ }
583
+ return n;
584
+ }
585
+ function unobserved(e) {
586
+ deleteFromHeap(e, e.O & REACTIVE_ZOMBIE ? zombieQueue : dirtyQueue);
587
+ let t = e.C;
588
+ while (t !== null) {
589
+ t = unlinkSubs(t);
590
+ }
591
+ e.C = null;
592
+ disposeChildren(e, true);
593
+ }
594
+ function markDisposal(e) {
595
+ let t = e.Pe;
596
+ while (t) {
597
+ t.O |= REACTIVE_ZOMBIE;
598
+ if (t.O & REACTIVE_IN_HEAP) {
599
+ deleteFromHeap(t, dirtyQueue);
600
+ insertIntoHeap(t, zombieQueue);
601
+ }
602
+ markDisposal(t);
603
+ t = t.ge;
604
+ }
605
+ }
606
+ function disposeChildren(e, t = false, n) {
607
+ if (e.O & REACTIVE_DISPOSED) return;
608
+ if (t) e.O = REACTIVE_DISPOSED;
609
+ if (t && e.L) e.Ce = null;
610
+ let i = n ? e.De : e.Pe;
611
+ while (i) {
612
+ const e2 = i.ge;
613
+ if (i.C) {
614
+ const e3 = i;
615
+ deleteFromHeap(e3, e3.O & REACTIVE_ZOMBIE ? zombieQueue : dirtyQueue);
616
+ let t2 = e3.C;
617
+ do {
618
+ t2 = unlinkSubs(t2);
619
+ } while (t2 !== null);
620
+ e3.C = null;
621
+ e3.Ne = null;
622
+ }
623
+ disposeChildren(i, true);
624
+ i = e2;
625
+ }
626
+ if (n) {
627
+ e.De = null;
628
+ } else {
629
+ e.Pe = null;
630
+ e.ye = 0;
631
+ }
632
+ runDisposal(e, n);
633
+ }
634
+ function runDisposal(e, t) {
635
+ let n = t ? e.ve : e.me;
636
+ if (!n) return;
637
+ if (Array.isArray(n)) {
638
+ for (let e2 = 0; e2 < n.length; e2++) {
639
+ const t2 = n[e2];
640
+ t2.call(t2);
641
+ }
642
+ } else {
643
+ n.call(n);
644
+ }
645
+ t ? e.ve = null : e.me = null;
646
+ }
647
+ function cleanup(e) {
648
+ if (!context) return e;
649
+ if (!context.me) context.me = e;
650
+ else if (Array.isArray(context.me)) context.me.push(e);
651
+ else context.me = [context.me, e];
652
+ return e;
653
+ }
568
654
  function addPendingSource(e, t) {
569
- if (e.Ie === t || e.pe?.has(t)) return false;
570
- if (!e.Ie) {
571
- e.Ie = t;
655
+ if (e.be === t || e.Le?.has(t)) return false;
656
+ if (!e.be) {
657
+ e.be = t;
572
658
  return true;
573
659
  }
574
- if (!e.pe) {
575
- e.pe = /* @__PURE__ */ new Set([e.Ie, t]);
660
+ if (!e.Le) {
661
+ e.Le = /* @__PURE__ */ new Set([e.be, t]);
576
662
  } else {
577
- e.pe.add(t);
663
+ e.Le.add(t);
578
664
  }
579
- e.Ie = void 0;
665
+ e.be = void 0;
580
666
  return true;
581
667
  }
582
668
  function removePendingSource(e, t) {
583
- if (e.Ie) {
584
- if (e.Ie !== t) return false;
585
- e.Ie = void 0;
669
+ if (e.be) {
670
+ if (e.be !== t) return false;
671
+ e.be = void 0;
586
672
  return true;
587
673
  }
588
- if (!e.pe?.delete(t)) return false;
589
- if (e.pe.size === 1) {
590
- e.Ie = e.pe.values().next().value;
591
- e.pe = void 0;
592
- } else if (e.pe.size === 0) {
593
- e.pe = void 0;
674
+ if (!e.Le?.delete(t)) return false;
675
+ if (e.Le.size === 1) {
676
+ e.be = e.Le.values().next().value;
677
+ e.Le = void 0;
678
+ } else if (e.Le.size === 0) {
679
+ e.Le = void 0;
594
680
  }
595
681
  return true;
596
682
  }
597
683
  function clearPendingSources(e) {
598
- e.Ie = void 0;
599
- e.pe?.clear();
600
- e.pe = void 0;
684
+ e.be = void 0;
685
+ e.Le?.clear();
686
+ e.Le = void 0;
601
687
  }
602
688
  function setPendingError(e, t, n) {
603
689
  if (!t) {
@@ -626,7 +712,7 @@ function settlePendingSource(e) {
626
712
  if (n.has(i) || !removePendingSource(i, e)) return;
627
713
  n.add(i);
628
714
  i.Ee = clock;
629
- const r = i.Ie ?? i.pe?.values().next().value;
715
+ const r = i.be ?? i.Le?.values().next().value;
630
716
  if (r) {
631
717
  setPendingError(i, r);
632
718
  updatePendingSignal(i);
@@ -634,7 +720,7 @@ function settlePendingSource(e) {
634
720
  i.Se &= ~STATUS_PENDING;
635
721
  setPendingError(i);
636
722
  updatePendingSignal(i);
637
- if (i.he) {
723
+ if (i.Ue) {
638
724
  if (i.W === EFFECT_TRACKED) {
639
725
  const e2 = i;
640
726
  if (!e2.H) {
@@ -648,7 +734,7 @@ function settlePendingSource(e) {
648
734
  }
649
735
  t = true;
650
736
  }
651
- i.he = false;
737
+ i.Ue = false;
652
738
  }
653
739
  forEachDependent(i, settle);
654
740
  };
@@ -660,19 +746,19 @@ function handleAsync(e, t, n) {
660
746
  const r = i && untrack(() => t[Symbol.asyncIterator]);
661
747
  const s = !r && i && untrack(() => typeof t.then === "function");
662
748
  if (!s && !r) {
663
- e.Ae = null;
749
+ e.Ce = null;
664
750
  return t;
665
751
  }
666
- e.Ae = t;
752
+ e.Ce = t;
667
753
  let o;
668
754
  const handleError = (n2) => {
669
- if (e.Ae !== t) return;
755
+ if (e.Ce !== t) return;
670
756
  globalQueue.initTransition(resolveTransition(e));
671
757
  notifyStatus(e, n2 instanceof NotReadyError ? STATUS_PENDING : STATUS_ERROR, n2);
672
758
  e.Ee = clock;
673
759
  };
674
760
  const asyncWrite = (i2, r2) => {
675
- if (e.Ae !== t) return;
761
+ if (e.Ce !== t) return;
676
762
  if (e.O & (REACTIVE_DIRTY | REACTIVE_OPTIMISTIC_DIRTY)) return;
677
763
  globalQueue.initTransition(resolveTransition(e));
678
764
  clearStatus(e);
@@ -688,12 +774,12 @@ function handleAsync(e, t, n) {
688
774
  e.Ee = clock;
689
775
  } else if (s2) {
690
776
  const t2 = e.J;
691
- const n2 = e.Ne;
777
+ const n2 = e.ke;
692
778
  if (!n2 || !n2(i2, t2)) {
693
779
  e.J = i2;
694
780
  e.Ee = clock;
695
- if (e.Pe) {
696
- setSignal(e.Pe, i2);
781
+ if (e.Ge) {
782
+ setSignal(e.Ge, i2);
697
783
  }
698
784
  insertSubs(e, true);
699
785
  }
@@ -727,33 +813,53 @@ function handleAsync(e, t, n) {
727
813
  if (r) {
728
814
  const n2 = t[Symbol.asyncIterator]();
729
815
  let i2 = false;
816
+ let r2 = false;
817
+ cleanup(() => {
818
+ if (r2) return;
819
+ r2 = true;
820
+ try {
821
+ const e2 = n2.return?.();
822
+ if (e2 && typeof e2.then === "function") {
823
+ e2.then(void 0, () => {
824
+ });
825
+ }
826
+ } catch {
827
+ }
828
+ });
730
829
  const iterate = () => {
731
- let e2, t2 = false, r3 = true;
830
+ let s3, u = false, c = true;
732
831
  n2.next().then(
733
832
  (n3) => {
734
- if (r3) {
735
- e2 = n3;
736
- t2 = true;
833
+ if (c) {
834
+ s3 = n3;
835
+ u = true;
836
+ if (n3.done) r2 = true;
837
+ } else if (e.Ce !== t) {
838
+ return;
737
839
  } else if (!n3.done) asyncWrite(n3.value, iterate);
738
840
  else {
841
+ r2 = true;
739
842
  schedule();
740
843
  flush();
741
844
  }
742
845
  },
743
- (e3) => {
744
- if (!r3) handleError(e3);
846
+ (n3) => {
847
+ if (!c && e.Ce === t) {
848
+ r2 = true;
849
+ handleError(n3);
850
+ }
745
851
  }
746
852
  );
747
- r3 = false;
748
- if (t2 && !e2.done) {
749
- o = e2.value;
853
+ c = false;
854
+ if (u && !s3.done) {
855
+ o = s3.value;
750
856
  i2 = true;
751
857
  return iterate();
752
858
  }
753
- return t2 && e2.done;
859
+ return u && s3.done;
754
860
  };
755
- const r2 = iterate();
756
- if (!i2 && !r2) {
861
+ const s2 = iterate();
862
+ if (!i2 && !s2) {
757
863
  globalQueue.initTransition(resolveTransition(e));
758
864
  throw new NotReadyError(context);
759
865
  }
@@ -762,11 +868,11 @@ function handleAsync(e, t, n) {
762
868
  }
763
869
  function clearStatus(e, t = false) {
764
870
  clearPendingSources(e);
765
- e.he = false;
871
+ e.Ue = false;
766
872
  e.Se = t ? 0 : e.Se & STATUS_UNINITIALIZED;
767
873
  setPendingError(e);
768
874
  updatePendingSignal(e);
769
- e.ge?.();
875
+ e.xe?.();
770
876
  }
771
877
  function notifyStatus(e, t, n, i, r) {
772
878
  if (t === STATUS_ERROR && !(n instanceof StatusError) && !(n instanceof NotReadyError))
@@ -792,104 +898,26 @@ function notifyStatus(e, t, n, i, r) {
792
898
  }
793
899
  const a = i || c;
794
900
  const f = i || u ? void 0 : r;
795
- if (e.ge) {
901
+ if (e.xe) {
796
902
  if (i && t === STATUS_PENDING) {
797
903
  return;
798
904
  }
799
905
  if (a) {
800
- e.ge(t, n);
906
+ e.xe(t, n);
801
907
  } else {
802
- e.ge();
908
+ e.xe();
803
909
  }
804
910
  return;
805
911
  }
806
912
  forEachDependent(e, (e2) => {
807
913
  e2.Ee = clock;
808
- if (t === STATUS_PENDING && s && e2.Ie !== s && !e2.pe?.has(s) || t !== STATUS_PENDING && (e2.le !== n || e2.Ie || e2.pe)) {
914
+ if (t === STATUS_PENDING && s && e2.be !== s && !e2.Le?.has(s) || t !== STATUS_PENDING && (e2.le !== n || e2.be || e2.Le)) {
809
915
  if (!a && !e2.K) globalQueue.se.push(e2);
810
916
  notifyStatus(e2, t, n, a, f);
811
917
  }
812
918
  });
813
919
  }
814
920
  var externalSourceConfig = null;
815
- function markDisposal(e) {
816
- let t = e.Ce;
817
- while (t) {
818
- t.O |= REACTIVE_ZOMBIE;
819
- if (t.O & REACTIVE_IN_HEAP) {
820
- deleteFromHeap(t, dirtyQueue);
821
- insertIntoHeap(t, zombieQueue);
822
- }
823
- markDisposal(t);
824
- t = t.De;
825
- }
826
- }
827
- function disposeChildren(e, t = false, n) {
828
- if (e.O & REACTIVE_DISPOSED) return;
829
- if (t) e.O = REACTIVE_DISPOSED;
830
- let i = n ? e.me : e.Ce;
831
- while (i) {
832
- const e2 = i.De;
833
- if (i.C) {
834
- const e3 = i;
835
- deleteFromHeap(e3, e3.O & REACTIVE_ZOMBIE ? zombieQueue : dirtyQueue);
836
- let t2 = e3.C;
837
- do {
838
- t2 = unlinkSubs(t2);
839
- } while (t2 !== null);
840
- e3.C = null;
841
- e3.ye = null;
842
- }
843
- disposeChildren(i, true);
844
- i = e2;
845
- }
846
- if (n) {
847
- e.me = null;
848
- } else {
849
- e.Ce = null;
850
- e.ve = 0;
851
- }
852
- runDisposal(e, n);
853
- }
854
- function runDisposal(e, t) {
855
- let n = t ? e.we : e.be;
856
- if (!n) return;
857
- if (Array.isArray(n)) {
858
- for (let e2 = 0; e2 < n.length; e2++) {
859
- const t2 = n[e2];
860
- t2.call(t2);
861
- }
862
- } else {
863
- n.call(n);
864
- }
865
- t ? e.we = null : e.be = null;
866
- }
867
- function unlinkSubs(e) {
868
- const t = e.m;
869
- const n = e.D;
870
- const i = e.p;
871
- const r = e.Ue;
872
- if (i !== null) i.Ue = r;
873
- else t.ke = r;
874
- if (r !== null) r.p = i;
875
- else {
876
- t.I = i;
877
- if (i === null) {
878
- t.Ge?.();
879
- t.L && !t.xe && !(t.O & REACTIVE_ZOMBIE) && unobserved(t);
880
- }
881
- }
882
- return n;
883
- }
884
- function unobserved(e) {
885
- deleteFromHeap(e, e.O & REACTIVE_ZOMBIE ? zombieQueue : dirtyQueue);
886
- let t = e.C;
887
- while (t !== null) {
888
- t = unlinkSubs(t);
889
- }
890
- e.C = null;
891
- disposeChildren(e, true);
892
- }
893
921
  GlobalQueue.oe = recompute;
894
922
  GlobalQueue.ue = disposeChildren;
895
923
  var tracking = false;
@@ -901,14 +929,15 @@ function recompute(e, t = false) {
901
929
  if (e.K && (!n || activeTransition) && activeTransition !== e.K)
902
930
  globalQueue.initTransition(e.K);
903
931
  deleteFromHeap(e, e.O & REACTIVE_ZOMBIE ? zombieQueue : dirtyQueue);
932
+ e.Ce = null;
904
933
  if (e.K || n === EFFECT_TRACKED) disposeChildren(e);
905
934
  else {
906
935
  markDisposal(e);
907
- e.we = e.be;
908
- e.me = e.Ce;
909
- e.be = null;
910
- e.Ce = null;
911
- e.ve = 0;
936
+ e.ve = e.me;
937
+ e.De = e.Pe;
938
+ e.me = null;
939
+ e.Pe = null;
940
+ e.ye = 0;
912
941
  }
913
942
  }
914
943
  const i = !!(e.O & REACTIVE_OPTIMISTIC_DIRTY);
@@ -916,7 +945,7 @@ function recompute(e, t = false) {
916
945
  const s = !!(e.Se & STATUS_PENDING);
917
946
  const o = context;
918
947
  context = e;
919
- e.ye = null;
948
+ e.Ne = null;
920
949
  e.O = REACTIVE_RECOMPUTING_DEPS;
921
950
  e.Ee = clock;
922
951
  let u = e.X === NOT_PENDING ? e.J : e.X;
@@ -945,7 +974,7 @@ function recompute(e, t = false) {
945
974
  updatePendingSignal(t3.te);
946
975
  }
947
976
  }
948
- if (t2 instanceof NotReadyError) e.he = true;
977
+ if (t2 instanceof NotReadyError) e.Ue = true;
949
978
  notifyStatus(
950
979
  e,
951
980
  t2 instanceof NotReadyError ? STATUS_PENDING : STATUS_ERROR,
@@ -959,7 +988,7 @@ function recompute(e, t = false) {
959
988
  context = o;
960
989
  }
961
990
  if (!e.le) {
962
- const o2 = e.ye;
991
+ const o2 = e.Ne;
963
992
  let a2 = o2 !== null ? o2.D : e.C;
964
993
  if (a2 !== null) {
965
994
  do {
@@ -969,7 +998,7 @@ function recompute(e, t = false) {
969
998
  else e.C = null;
970
999
  }
971
1000
  const f2 = r ? e.ee : e.X === NOT_PENDING ? e.J : e.X;
972
- const l = !e.Ne || !e.Ne(f2, u);
1001
+ const l = !e.ke || !e.ke(f2, u);
973
1002
  if (l) {
974
1003
  const o3 = r ? e.ee : void 0;
975
1004
  if (t || n && activeTransition !== e.K || i) {
@@ -1010,7 +1039,7 @@ function setSignal(e, t) {
1010
1039
  const i = e.ee !== void 0 && e.ee !== NOT_PENDING;
1011
1040
  const r = n ? i ? e.ee : e.J : e.X === NOT_PENDING ? e.J : e.X;
1012
1041
  if (typeof t === "function") t = t(r);
1013
- const s = !e.Ne || !e.Ne(r, t) || !!(e.Se & STATUS_UNINITIALIZED);
1042
+ const s = !e.ke || !e.ke(r, t) || !!(e.Se & STATUS_UNINITIALIZED);
1014
1043
  if (!s) {
1015
1044
  if (n && i && e.L) {
1016
1045
  insertSubs(e, true);
@@ -1034,8 +1063,8 @@ function setSignal(e, t) {
1034
1063
  e.X = t;
1035
1064
  }
1036
1065
  updatePendingSignal(e);
1037
- if (e.Pe) {
1038
- setSignal(e.Pe, t);
1066
+ if (e.Ge) {
1067
+ setSignal(e.Ge, t);
1039
1068
  }
1040
1069
  e.Ee = clock;
1041
1070
  insertSubs(e, n);
@@ -1046,7 +1075,7 @@ function computePendingState(e) {
1046
1075
  const t = e;
1047
1076
  const n = e.V;
1048
1077
  if (n && e.X !== NOT_PENDING) {
1049
- return !n.Ae && !(n.Se & STATUS_PENDING);
1078
+ return !n.Ce && !(n.Se & STATUS_PENDING);
1050
1079
  }
1051
1080
  if (e.ee !== void 0 && e.ee !== NOT_PENDING) {
1052
1081
  if (t.Se & STATUS_PENDING && !(t.Se & STATUS_UNINITIALIZED)) return true;
@@ -1081,7 +1110,7 @@ function updatePendingSignal(e) {
1081
1110
  }
1082
1111
  }
1083
1112
  function isWrappable(e) {
1084
- return e != null && typeof e === "object" && !Object.isFrozen(e);
1113
+ return e != null && typeof e === "object" && !Object.isFrozen(e) && !(typeof Node !== "undefined" && e instanceof Node);
1085
1114
  }
1086
1115
  var DELETE = /* @__PURE__ */ Symbol(0);
1087
1116
  function updatePath(e, t, n = 0) {
@@ -1145,7 +1174,7 @@ var storePath = Object.assign(
1145
1174
  { DELETE }
1146
1175
  );
1147
1176
 
1148
- // ../../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
1177
+ // ../../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/web.js
1149
1178
  var isServer = false;
1150
1179
  var isDev = false;
1151
1180
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tanstack/solid-query-devtools",
3
- "version": "6.0.0-alpha.2",
3
+ "version": "6.0.0-beta.3",
4
4
  "description": "Developer tools to interact with and visualize the TanStack/solid-query Query cache",
5
5
  "author": "tannerlinsley",
6
6
  "license": "MIT",
@@ -53,14 +53,14 @@
53
53
  "@solidjs/web": "2.0.0-beta.4",
54
54
  "babel-preset-solid": "2.0.0-beta.4",
55
55
  "npm-run-all2": "^5.0.0",
56
- "solid-js": "2.0.0-beta.4",
56
+ "solid-js": "2.0.0-beta.5",
57
57
  "tsup-preset-solid": "^2.2.0",
58
- "vite-plugin-solid": "3.0.0-next.2",
59
- "@tanstack/solid-query": "6.0.0-alpha.2"
58
+ "vite-plugin-solid": "3.0.0-next.4",
59
+ "@tanstack/solid-query": "6.0.0-beta.3"
60
60
  },
61
61
  "peerDependencies": {
62
62
  "solid-js": ">=2.0.0-beta.0 <3.0.0",
63
- "@tanstack/solid-query": "^6.0.0-alpha.2"
63
+ "@tanstack/solid-query": "^6.0.0-beta.3"
64
64
  },
65
65
  "scripts": {
66
66
  "clean": "premove ./build ./coverage ./dist-ts",