@tanstack/query-devtools 5.17.7 → 5.18.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/Devtools/{A6DP7BKI.js → F44ZTS6H.js} +19 -33
- package/build/Devtools/{5J6EBFZD.jsx → GGXFRC53.jsx} +19 -33
- package/build/Devtools/{BSBCIQID.js → IEC7B7YJ.js} +19 -33
- package/build/Devtools/{TCSAOOE4.jsx → PFRKCKUQ.jsx} +19 -33
- package/build/dev.cjs +20 -34
- package/build/dev.js +1 -1
- package/build/dev.jsx +1 -1
- package/build/index.cjs +20 -34
- package/build/index.js +1 -1
- package/build/index.jsx +1 -1
- package/package.json +2 -2
- package/src/Devtools.tsx +9 -9
- package/src/__tests__/utils.test.ts +6 -0
- package/src/index.tsx +2 -2
- package/src/theme.ts +18 -30
|
@@ -8326,29 +8326,6 @@ delegateEvents(["keydown", "pointerdown", "pointermove", "pointerup"]);
|
|
|
8326
8326
|
createContext();
|
|
8327
8327
|
|
|
8328
8328
|
// src/theme.ts
|
|
8329
|
-
var ShadowVariants = {
|
|
8330
|
-
xs: "0 1px 2px 0 rgb(0 0 0 / 0.05)",
|
|
8331
|
-
sm: "0 1px 3px 0 color, 0 1px 2px -1px color",
|
|
8332
|
-
md: "0 4px 6px -1px color, 0 2px 4px -2px color",
|
|
8333
|
-
lg: "0 10px 15px -3px color, 0 4px 6px -4px color",
|
|
8334
|
-
xl: "0 20px 25px -5px color, 0 8px 10px -6px color",
|
|
8335
|
-
"2xl": "0 25px 50px -12px color",
|
|
8336
|
-
inner: "inset 0 2px 4px 0 color",
|
|
8337
|
-
none: "none"
|
|
8338
|
-
};
|
|
8339
|
-
var getShadow = (variant, color = "") => {
|
|
8340
|
-
return ShadowVariants[variant].replace(/color/g, color);
|
|
8341
|
-
};
|
|
8342
|
-
var Shadow = {
|
|
8343
|
-
xs: (color = "rgb(0 0 0 / 0.1)") => getShadow("xs", color),
|
|
8344
|
-
sm: (color = "rgb(0 0 0 / 0.1)") => getShadow("sm", color),
|
|
8345
|
-
md: (color = "rgb(0 0 0 / 0.1)") => getShadow("md", color),
|
|
8346
|
-
lg: (color = "rgb(0 0 0 / 0.1)") => getShadow("lg", color),
|
|
8347
|
-
xl: (color = "rgb(0 0 0 / 0.1)") => getShadow("xl", color),
|
|
8348
|
-
"2xl": (color = "rgb(0 0 0 / 0.25)") => getShadow("2xl", color),
|
|
8349
|
-
inner: (color = "rgb(0 0 0 / 0.05)") => getShadow("inner", color),
|
|
8350
|
-
none: () => getShadow("none")
|
|
8351
|
-
};
|
|
8352
8329
|
var tokens = {
|
|
8353
8330
|
colors: {
|
|
8354
8331
|
inherit: "inherit",
|
|
@@ -8615,7 +8592,16 @@ var tokens = {
|
|
|
8615
8592
|
80: "calc(var(--tsqd-font-size) * 20)",
|
|
8616
8593
|
96: "calc(var(--tsqd-font-size) * 24)"
|
|
8617
8594
|
},
|
|
8618
|
-
shadow:
|
|
8595
|
+
shadow: {
|
|
8596
|
+
xs: (_ = "rgb(0 0 0 / 0.1)") => `0 1px 2px 0 rgb(0 0 0 / 0.05)`,
|
|
8597
|
+
sm: (color = "rgb(0 0 0 / 0.1)") => `0 1px 3px 0 ${color}, 0 1px 2px -1px ${color}`,
|
|
8598
|
+
md: (color = "rgb(0 0 0 / 0.1)") => `0 4px 6px -1px ${color}, 0 2px 4px -2px ${color}`,
|
|
8599
|
+
lg: (color = "rgb(0 0 0 / 0.1)") => `0 10px 15px -3px ${color}, 0 4px 6px -4px ${color}`,
|
|
8600
|
+
xl: (color = "rgb(0 0 0 / 0.1)") => `0 20px 25px -5px ${color}, 0 8px 10px -6px ${color}`,
|
|
8601
|
+
"2xl": (color = "rgb(0 0 0 / 0.25)") => `0 25px 50px -12px ${color}`,
|
|
8602
|
+
inner: (color = "rgb(0 0 0 / 0.05)") => `inset 0 2px 4px 0 ${color}`,
|
|
8603
|
+
none: () => `none`
|
|
8604
|
+
},
|
|
8619
8605
|
zIndices: {
|
|
8620
8606
|
hide: -1,
|
|
8621
8607
|
auto: "auto",
|
|
@@ -9717,15 +9703,15 @@ var DevtoolsPanel = (props) => {
|
|
|
9717
9703
|
props.setLocalStore("height", String(Math.round(newSize)));
|
|
9718
9704
|
}
|
|
9719
9705
|
};
|
|
9720
|
-
const
|
|
9706
|
+
const unsubscribe = () => {
|
|
9721
9707
|
if (isResizing()) {
|
|
9722
9708
|
setIsResizing(false);
|
|
9723
9709
|
}
|
|
9724
9710
|
document.removeEventListener("mousemove", runDrag, false);
|
|
9725
|
-
document.removeEventListener("mouseUp",
|
|
9711
|
+
document.removeEventListener("mouseUp", unsubscribe, false);
|
|
9726
9712
|
};
|
|
9727
9713
|
document.addEventListener("mousemove", runDrag, false);
|
|
9728
|
-
document.addEventListener("mouseup",
|
|
9714
|
+
document.addEventListener("mouseup", unsubscribe, false);
|
|
9729
9715
|
};
|
|
9730
9716
|
let panelRef;
|
|
9731
9717
|
onMount(() => {
|
|
@@ -11103,7 +11089,7 @@ var setupQueryCacheSubscription = () => {
|
|
|
11103
11089
|
const client = useQueryDevtoolsContext().client;
|
|
11104
11090
|
return client.getQueryCache();
|
|
11105
11091
|
});
|
|
11106
|
-
const
|
|
11092
|
+
const unsubscribe = queryCache().subscribe((q) => {
|
|
11107
11093
|
batch(() => {
|
|
11108
11094
|
for (const [callback, value] of queryCacheMap.entries()) {
|
|
11109
11095
|
if (!value.shouldUpdate(q))
|
|
@@ -11114,9 +11100,9 @@ var setupQueryCacheSubscription = () => {
|
|
|
11114
11100
|
});
|
|
11115
11101
|
onCleanup(() => {
|
|
11116
11102
|
queryCacheMap.clear();
|
|
11117
|
-
|
|
11103
|
+
unsubscribe();
|
|
11118
11104
|
});
|
|
11119
|
-
return
|
|
11105
|
+
return unsubscribe;
|
|
11120
11106
|
};
|
|
11121
11107
|
var createSubscribeToQueryCacheBatcher = (callback, equalityCheck = true, shouldUpdate = () => true) => {
|
|
11122
11108
|
const queryCache = createMemo(() => {
|
|
@@ -11144,7 +11130,7 @@ var setupMutationCacheSubscription = () => {
|
|
|
11144
11130
|
const client = useQueryDevtoolsContext().client;
|
|
11145
11131
|
return client.getMutationCache();
|
|
11146
11132
|
});
|
|
11147
|
-
const
|
|
11133
|
+
const unsubscribe = mutationCache().subscribe(() => {
|
|
11148
11134
|
for (const [callback, setter] of mutationCacheMap.entries()) {
|
|
11149
11135
|
queueMicrotask(() => {
|
|
11150
11136
|
setter(callback(mutationCache));
|
|
@@ -11153,9 +11139,9 @@ var setupMutationCacheSubscription = () => {
|
|
|
11153
11139
|
});
|
|
11154
11140
|
onCleanup(() => {
|
|
11155
11141
|
mutationCacheMap.clear();
|
|
11156
|
-
|
|
11142
|
+
unsubscribe();
|
|
11157
11143
|
});
|
|
11158
|
-
return
|
|
11144
|
+
return unsubscribe;
|
|
11159
11145
|
};
|
|
11160
11146
|
var createSubscribeToMutationCacheBatcher = (callback, equalityCheck = true) => {
|
|
11161
11147
|
const mutationCache = createMemo(() => {
|
|
@@ -8566,29 +8566,6 @@ delegateEvents(["keydown", "pointerdown", "pointermove", "pointerup"]);
|
|
|
8566
8566
|
var TooltipContext = createContext();
|
|
8567
8567
|
|
|
8568
8568
|
// src/theme.ts
|
|
8569
|
-
var ShadowVariants = {
|
|
8570
|
-
xs: "0 1px 2px 0 rgb(0 0 0 / 0.05)",
|
|
8571
|
-
sm: "0 1px 3px 0 color, 0 1px 2px -1px color",
|
|
8572
|
-
md: "0 4px 6px -1px color, 0 2px 4px -2px color",
|
|
8573
|
-
lg: "0 10px 15px -3px color, 0 4px 6px -4px color",
|
|
8574
|
-
xl: "0 20px 25px -5px color, 0 8px 10px -6px color",
|
|
8575
|
-
"2xl": "0 25px 50px -12px color",
|
|
8576
|
-
inner: "inset 0 2px 4px 0 color",
|
|
8577
|
-
none: "none"
|
|
8578
|
-
};
|
|
8579
|
-
var getShadow = (variant, color = "") => {
|
|
8580
|
-
return ShadowVariants[variant].replace(/color/g, color);
|
|
8581
|
-
};
|
|
8582
|
-
var Shadow = {
|
|
8583
|
-
xs: (color = "rgb(0 0 0 / 0.1)") => getShadow("xs", color),
|
|
8584
|
-
sm: (color = "rgb(0 0 0 / 0.1)") => getShadow("sm", color),
|
|
8585
|
-
md: (color = "rgb(0 0 0 / 0.1)") => getShadow("md", color),
|
|
8586
|
-
lg: (color = "rgb(0 0 0 / 0.1)") => getShadow("lg", color),
|
|
8587
|
-
xl: (color = "rgb(0 0 0 / 0.1)") => getShadow("xl", color),
|
|
8588
|
-
"2xl": (color = "rgb(0 0 0 / 0.25)") => getShadow("2xl", color),
|
|
8589
|
-
inner: (color = "rgb(0 0 0 / 0.05)") => getShadow("inner", color),
|
|
8590
|
-
none: () => getShadow("none")
|
|
8591
|
-
};
|
|
8592
8569
|
var tokens = {
|
|
8593
8570
|
colors: {
|
|
8594
8571
|
inherit: "inherit",
|
|
@@ -8855,7 +8832,16 @@ var tokens = {
|
|
|
8855
8832
|
80: "calc(var(--tsqd-font-size) * 20)",
|
|
8856
8833
|
96: "calc(var(--tsqd-font-size) * 24)"
|
|
8857
8834
|
},
|
|
8858
|
-
shadow:
|
|
8835
|
+
shadow: {
|
|
8836
|
+
xs: (_ = "rgb(0 0 0 / 0.1)") => `0 1px 2px 0 rgb(0 0 0 / 0.05)`,
|
|
8837
|
+
sm: (color = "rgb(0 0 0 / 0.1)") => `0 1px 3px 0 ${color}, 0 1px 2px -1px ${color}`,
|
|
8838
|
+
md: (color = "rgb(0 0 0 / 0.1)") => `0 4px 6px -1px ${color}, 0 2px 4px -2px ${color}`,
|
|
8839
|
+
lg: (color = "rgb(0 0 0 / 0.1)") => `0 10px 15px -3px ${color}, 0 4px 6px -4px ${color}`,
|
|
8840
|
+
xl: (color = "rgb(0 0 0 / 0.1)") => `0 20px 25px -5px ${color}, 0 8px 10px -6px ${color}`,
|
|
8841
|
+
"2xl": (color = "rgb(0 0 0 / 0.25)") => `0 25px 50px -12px ${color}`,
|
|
8842
|
+
inner: (color = "rgb(0 0 0 / 0.05)") => `inset 0 2px 4px 0 ${color}`,
|
|
8843
|
+
none: () => `none`
|
|
8844
|
+
},
|
|
8859
8845
|
zIndices: {
|
|
8860
8846
|
hide: -1,
|
|
8861
8847
|
auto: "auto",
|
|
@@ -10592,15 +10578,15 @@ var DevtoolsPanel = (props) => {
|
|
|
10592
10578
|
props.setLocalStore("height", String(Math.round(newSize)));
|
|
10593
10579
|
}
|
|
10594
10580
|
};
|
|
10595
|
-
const
|
|
10581
|
+
const unsubscribe = () => {
|
|
10596
10582
|
if (isResizing()) {
|
|
10597
10583
|
setIsResizing(false);
|
|
10598
10584
|
}
|
|
10599
10585
|
document.removeEventListener("mousemove", runDrag, false);
|
|
10600
|
-
document.removeEventListener("mouseUp",
|
|
10586
|
+
document.removeEventListener("mouseUp", unsubscribe, false);
|
|
10601
10587
|
};
|
|
10602
10588
|
document.addEventListener("mousemove", runDrag, false);
|
|
10603
|
-
document.addEventListener("mouseup",
|
|
10589
|
+
document.addEventListener("mouseup", unsubscribe, false);
|
|
10604
10590
|
};
|
|
10605
10591
|
let panelRef;
|
|
10606
10592
|
onMount(() => {
|
|
@@ -11916,7 +11902,7 @@ var setupQueryCacheSubscription = () => {
|
|
|
11916
11902
|
const client = useQueryDevtoolsContext().client;
|
|
11917
11903
|
return client.getQueryCache();
|
|
11918
11904
|
});
|
|
11919
|
-
const
|
|
11905
|
+
const unsubscribe = queryCache().subscribe((q) => {
|
|
11920
11906
|
batch(() => {
|
|
11921
11907
|
for (const [callback, value] of queryCacheMap.entries()) {
|
|
11922
11908
|
if (!value.shouldUpdate(q))
|
|
@@ -11927,9 +11913,9 @@ var setupQueryCacheSubscription = () => {
|
|
|
11927
11913
|
});
|
|
11928
11914
|
onCleanup(() => {
|
|
11929
11915
|
queryCacheMap.clear();
|
|
11930
|
-
|
|
11916
|
+
unsubscribe();
|
|
11931
11917
|
});
|
|
11932
|
-
return
|
|
11918
|
+
return unsubscribe;
|
|
11933
11919
|
};
|
|
11934
11920
|
var createSubscribeToQueryCacheBatcher = (callback, equalityCheck = true, shouldUpdate = () => true) => {
|
|
11935
11921
|
const queryCache = createMemo(() => {
|
|
@@ -11958,7 +11944,7 @@ var setupMutationCacheSubscription = () => {
|
|
|
11958
11944
|
const client = useQueryDevtoolsContext().client;
|
|
11959
11945
|
return client.getMutationCache();
|
|
11960
11946
|
});
|
|
11961
|
-
const
|
|
11947
|
+
const unsubscribe = mutationCache().subscribe(() => {
|
|
11962
11948
|
for (const [callback, setter] of mutationCacheMap.entries()) {
|
|
11963
11949
|
queueMicrotask(() => {
|
|
11964
11950
|
setter(callback(mutationCache));
|
|
@@ -11967,9 +11953,9 @@ var setupMutationCacheSubscription = () => {
|
|
|
11967
11953
|
});
|
|
11968
11954
|
onCleanup(() => {
|
|
11969
11955
|
mutationCacheMap.clear();
|
|
11970
|
-
|
|
11956
|
+
unsubscribe();
|
|
11971
11957
|
});
|
|
11972
|
-
return
|
|
11958
|
+
return unsubscribe;
|
|
11973
11959
|
};
|
|
11974
11960
|
var createSubscribeToMutationCacheBatcher = (callback, equalityCheck = true) => {
|
|
11975
11961
|
const mutationCache = createMemo(() => {
|
|
@@ -8326,29 +8326,6 @@ delegateEvents(["keydown", "pointerdown", "pointermove", "pointerup"]);
|
|
|
8326
8326
|
createContext();
|
|
8327
8327
|
|
|
8328
8328
|
// src/theme.ts
|
|
8329
|
-
var ShadowVariants = {
|
|
8330
|
-
xs: "0 1px 2px 0 rgb(0 0 0 / 0.05)",
|
|
8331
|
-
sm: "0 1px 3px 0 color, 0 1px 2px -1px color",
|
|
8332
|
-
md: "0 4px 6px -1px color, 0 2px 4px -2px color",
|
|
8333
|
-
lg: "0 10px 15px -3px color, 0 4px 6px -4px color",
|
|
8334
|
-
xl: "0 20px 25px -5px color, 0 8px 10px -6px color",
|
|
8335
|
-
"2xl": "0 25px 50px -12px color",
|
|
8336
|
-
inner: "inset 0 2px 4px 0 color",
|
|
8337
|
-
none: "none"
|
|
8338
|
-
};
|
|
8339
|
-
var getShadow = (variant, color = "") => {
|
|
8340
|
-
return ShadowVariants[variant].replace(/color/g, color);
|
|
8341
|
-
};
|
|
8342
|
-
var Shadow = {
|
|
8343
|
-
xs: (color = "rgb(0 0 0 / 0.1)") => getShadow("xs", color),
|
|
8344
|
-
sm: (color = "rgb(0 0 0 / 0.1)") => getShadow("sm", color),
|
|
8345
|
-
md: (color = "rgb(0 0 0 / 0.1)") => getShadow("md", color),
|
|
8346
|
-
lg: (color = "rgb(0 0 0 / 0.1)") => getShadow("lg", color),
|
|
8347
|
-
xl: (color = "rgb(0 0 0 / 0.1)") => getShadow("xl", color),
|
|
8348
|
-
"2xl": (color = "rgb(0 0 0 / 0.25)") => getShadow("2xl", color),
|
|
8349
|
-
inner: (color = "rgb(0 0 0 / 0.05)") => getShadow("inner", color),
|
|
8350
|
-
none: () => getShadow("none")
|
|
8351
|
-
};
|
|
8352
8329
|
var tokens = {
|
|
8353
8330
|
colors: {
|
|
8354
8331
|
inherit: "inherit",
|
|
@@ -8615,7 +8592,16 @@ var tokens = {
|
|
|
8615
8592
|
80: "calc(var(--tsqd-font-size) * 20)",
|
|
8616
8593
|
96: "calc(var(--tsqd-font-size) * 24)"
|
|
8617
8594
|
},
|
|
8618
|
-
shadow:
|
|
8595
|
+
shadow: {
|
|
8596
|
+
xs: (_ = "rgb(0 0 0 / 0.1)") => `0 1px 2px 0 rgb(0 0 0 / 0.05)`,
|
|
8597
|
+
sm: (color = "rgb(0 0 0 / 0.1)") => `0 1px 3px 0 ${color}, 0 1px 2px -1px ${color}`,
|
|
8598
|
+
md: (color = "rgb(0 0 0 / 0.1)") => `0 4px 6px -1px ${color}, 0 2px 4px -2px ${color}`,
|
|
8599
|
+
lg: (color = "rgb(0 0 0 / 0.1)") => `0 10px 15px -3px ${color}, 0 4px 6px -4px ${color}`,
|
|
8600
|
+
xl: (color = "rgb(0 0 0 / 0.1)") => `0 20px 25px -5px ${color}, 0 8px 10px -6px ${color}`,
|
|
8601
|
+
"2xl": (color = "rgb(0 0 0 / 0.25)") => `0 25px 50px -12px ${color}`,
|
|
8602
|
+
inner: (color = "rgb(0 0 0 / 0.05)") => `inset 0 2px 4px 0 ${color}`,
|
|
8603
|
+
none: () => `none`
|
|
8604
|
+
},
|
|
8619
8605
|
zIndices: {
|
|
8620
8606
|
hide: -1,
|
|
8621
8607
|
auto: "auto",
|
|
@@ -9716,15 +9702,15 @@ var DevtoolsPanel = (props) => {
|
|
|
9716
9702
|
props.setLocalStore("height", String(Math.round(newSize)));
|
|
9717
9703
|
}
|
|
9718
9704
|
};
|
|
9719
|
-
const
|
|
9705
|
+
const unsubscribe = () => {
|
|
9720
9706
|
if (isResizing()) {
|
|
9721
9707
|
setIsResizing(false);
|
|
9722
9708
|
}
|
|
9723
9709
|
document.removeEventListener("mousemove", runDrag, false);
|
|
9724
|
-
document.removeEventListener("mouseUp",
|
|
9710
|
+
document.removeEventListener("mouseUp", unsubscribe, false);
|
|
9725
9711
|
};
|
|
9726
9712
|
document.addEventListener("mousemove", runDrag, false);
|
|
9727
|
-
document.addEventListener("mouseup",
|
|
9713
|
+
document.addEventListener("mouseup", unsubscribe, false);
|
|
9728
9714
|
};
|
|
9729
9715
|
let panelRef;
|
|
9730
9716
|
onMount(() => {
|
|
@@ -11102,7 +11088,7 @@ var setupQueryCacheSubscription = () => {
|
|
|
11102
11088
|
const client = useQueryDevtoolsContext().client;
|
|
11103
11089
|
return client.getQueryCache();
|
|
11104
11090
|
});
|
|
11105
|
-
const
|
|
11091
|
+
const unsubscribe = queryCache().subscribe((q) => {
|
|
11106
11092
|
batch(() => {
|
|
11107
11093
|
for (const [callback, value] of queryCacheMap.entries()) {
|
|
11108
11094
|
if (!value.shouldUpdate(q))
|
|
@@ -11113,9 +11099,9 @@ var setupQueryCacheSubscription = () => {
|
|
|
11113
11099
|
});
|
|
11114
11100
|
onCleanup(() => {
|
|
11115
11101
|
queryCacheMap.clear();
|
|
11116
|
-
|
|
11102
|
+
unsubscribe();
|
|
11117
11103
|
});
|
|
11118
|
-
return
|
|
11104
|
+
return unsubscribe;
|
|
11119
11105
|
};
|
|
11120
11106
|
var createSubscribeToQueryCacheBatcher = (callback, equalityCheck = true, shouldUpdate = () => true) => {
|
|
11121
11107
|
const queryCache = createMemo(() => {
|
|
@@ -11143,7 +11129,7 @@ var setupMutationCacheSubscription = () => {
|
|
|
11143
11129
|
const client = useQueryDevtoolsContext().client;
|
|
11144
11130
|
return client.getMutationCache();
|
|
11145
11131
|
});
|
|
11146
|
-
const
|
|
11132
|
+
const unsubscribe = mutationCache().subscribe(() => {
|
|
11147
11133
|
for (const [callback, setter] of mutationCacheMap.entries()) {
|
|
11148
11134
|
queueMicrotask(() => {
|
|
11149
11135
|
setter(callback(mutationCache));
|
|
@@ -11152,9 +11138,9 @@ var setupMutationCacheSubscription = () => {
|
|
|
11152
11138
|
});
|
|
11153
11139
|
onCleanup(() => {
|
|
11154
11140
|
mutationCacheMap.clear();
|
|
11155
|
-
|
|
11141
|
+
unsubscribe();
|
|
11156
11142
|
});
|
|
11157
|
-
return
|
|
11143
|
+
return unsubscribe;
|
|
11158
11144
|
};
|
|
11159
11145
|
var createSubscribeToMutationCacheBatcher = (callback, equalityCheck = true) => {
|
|
11160
11146
|
const mutationCache = createMemo(() => {
|
|
@@ -8566,29 +8566,6 @@ delegateEvents(["keydown", "pointerdown", "pointermove", "pointerup"]);
|
|
|
8566
8566
|
var TooltipContext = createContext();
|
|
8567
8567
|
|
|
8568
8568
|
// src/theme.ts
|
|
8569
|
-
var ShadowVariants = {
|
|
8570
|
-
xs: "0 1px 2px 0 rgb(0 0 0 / 0.05)",
|
|
8571
|
-
sm: "0 1px 3px 0 color, 0 1px 2px -1px color",
|
|
8572
|
-
md: "0 4px 6px -1px color, 0 2px 4px -2px color",
|
|
8573
|
-
lg: "0 10px 15px -3px color, 0 4px 6px -4px color",
|
|
8574
|
-
xl: "0 20px 25px -5px color, 0 8px 10px -6px color",
|
|
8575
|
-
"2xl": "0 25px 50px -12px color",
|
|
8576
|
-
inner: "inset 0 2px 4px 0 color",
|
|
8577
|
-
none: "none"
|
|
8578
|
-
};
|
|
8579
|
-
var getShadow = (variant, color = "") => {
|
|
8580
|
-
return ShadowVariants[variant].replace(/color/g, color);
|
|
8581
|
-
};
|
|
8582
|
-
var Shadow = {
|
|
8583
|
-
xs: (color = "rgb(0 0 0 / 0.1)") => getShadow("xs", color),
|
|
8584
|
-
sm: (color = "rgb(0 0 0 / 0.1)") => getShadow("sm", color),
|
|
8585
|
-
md: (color = "rgb(0 0 0 / 0.1)") => getShadow("md", color),
|
|
8586
|
-
lg: (color = "rgb(0 0 0 / 0.1)") => getShadow("lg", color),
|
|
8587
|
-
xl: (color = "rgb(0 0 0 / 0.1)") => getShadow("xl", color),
|
|
8588
|
-
"2xl": (color = "rgb(0 0 0 / 0.25)") => getShadow("2xl", color),
|
|
8589
|
-
inner: (color = "rgb(0 0 0 / 0.05)") => getShadow("inner", color),
|
|
8590
|
-
none: () => getShadow("none")
|
|
8591
|
-
};
|
|
8592
8569
|
var tokens = {
|
|
8593
8570
|
colors: {
|
|
8594
8571
|
inherit: "inherit",
|
|
@@ -8855,7 +8832,16 @@ var tokens = {
|
|
|
8855
8832
|
80: "calc(var(--tsqd-font-size) * 20)",
|
|
8856
8833
|
96: "calc(var(--tsqd-font-size) * 24)"
|
|
8857
8834
|
},
|
|
8858
|
-
shadow:
|
|
8835
|
+
shadow: {
|
|
8836
|
+
xs: (_ = "rgb(0 0 0 / 0.1)") => `0 1px 2px 0 rgb(0 0 0 / 0.05)`,
|
|
8837
|
+
sm: (color = "rgb(0 0 0 / 0.1)") => `0 1px 3px 0 ${color}, 0 1px 2px -1px ${color}`,
|
|
8838
|
+
md: (color = "rgb(0 0 0 / 0.1)") => `0 4px 6px -1px ${color}, 0 2px 4px -2px ${color}`,
|
|
8839
|
+
lg: (color = "rgb(0 0 0 / 0.1)") => `0 10px 15px -3px ${color}, 0 4px 6px -4px ${color}`,
|
|
8840
|
+
xl: (color = "rgb(0 0 0 / 0.1)") => `0 20px 25px -5px ${color}, 0 8px 10px -6px ${color}`,
|
|
8841
|
+
"2xl": (color = "rgb(0 0 0 / 0.25)") => `0 25px 50px -12px ${color}`,
|
|
8842
|
+
inner: (color = "rgb(0 0 0 / 0.05)") => `inset 0 2px 4px 0 ${color}`,
|
|
8843
|
+
none: () => `none`
|
|
8844
|
+
},
|
|
8859
8845
|
zIndices: {
|
|
8860
8846
|
hide: -1,
|
|
8861
8847
|
auto: "auto",
|
|
@@ -10591,15 +10577,15 @@ var DevtoolsPanel = (props) => {
|
|
|
10591
10577
|
props.setLocalStore("height", String(Math.round(newSize)));
|
|
10592
10578
|
}
|
|
10593
10579
|
};
|
|
10594
|
-
const
|
|
10580
|
+
const unsubscribe = () => {
|
|
10595
10581
|
if (isResizing()) {
|
|
10596
10582
|
setIsResizing(false);
|
|
10597
10583
|
}
|
|
10598
10584
|
document.removeEventListener("mousemove", runDrag, false);
|
|
10599
|
-
document.removeEventListener("mouseUp",
|
|
10585
|
+
document.removeEventListener("mouseUp", unsubscribe, false);
|
|
10600
10586
|
};
|
|
10601
10587
|
document.addEventListener("mousemove", runDrag, false);
|
|
10602
|
-
document.addEventListener("mouseup",
|
|
10588
|
+
document.addEventListener("mouseup", unsubscribe, false);
|
|
10603
10589
|
};
|
|
10604
10590
|
let panelRef;
|
|
10605
10591
|
onMount(() => {
|
|
@@ -11915,7 +11901,7 @@ var setupQueryCacheSubscription = () => {
|
|
|
11915
11901
|
const client = useQueryDevtoolsContext().client;
|
|
11916
11902
|
return client.getQueryCache();
|
|
11917
11903
|
});
|
|
11918
|
-
const
|
|
11904
|
+
const unsubscribe = queryCache().subscribe((q) => {
|
|
11919
11905
|
batch(() => {
|
|
11920
11906
|
for (const [callback, value] of queryCacheMap.entries()) {
|
|
11921
11907
|
if (!value.shouldUpdate(q))
|
|
@@ -11926,9 +11912,9 @@ var setupQueryCacheSubscription = () => {
|
|
|
11926
11912
|
});
|
|
11927
11913
|
onCleanup(() => {
|
|
11928
11914
|
queryCacheMap.clear();
|
|
11929
|
-
|
|
11915
|
+
unsubscribe();
|
|
11930
11916
|
});
|
|
11931
|
-
return
|
|
11917
|
+
return unsubscribe;
|
|
11932
11918
|
};
|
|
11933
11919
|
var createSubscribeToQueryCacheBatcher = (callback, equalityCheck = true, shouldUpdate = () => true) => {
|
|
11934
11920
|
const queryCache = createMemo(() => {
|
|
@@ -11957,7 +11943,7 @@ var setupMutationCacheSubscription = () => {
|
|
|
11957
11943
|
const client = useQueryDevtoolsContext().client;
|
|
11958
11944
|
return client.getMutationCache();
|
|
11959
11945
|
});
|
|
11960
|
-
const
|
|
11946
|
+
const unsubscribe = mutationCache().subscribe(() => {
|
|
11961
11947
|
for (const [callback, setter] of mutationCacheMap.entries()) {
|
|
11962
11948
|
queueMicrotask(() => {
|
|
11963
11949
|
setter(callback(mutationCache));
|
|
@@ -11966,9 +11952,9 @@ var setupMutationCacheSubscription = () => {
|
|
|
11966
11952
|
});
|
|
11967
11953
|
onCleanup(() => {
|
|
11968
11954
|
mutationCacheMap.clear();
|
|
11969
|
-
|
|
11955
|
+
unsubscribe();
|
|
11970
11956
|
});
|
|
11971
|
-
return
|
|
11957
|
+
return unsubscribe;
|
|
11972
11958
|
};
|
|
11973
11959
|
var createSubscribeToMutationCacheBatcher = (callback, equalityCheck = true) => {
|
|
11974
11960
|
const mutationCache = createMemo(() => {
|
package/build/dev.cjs
CHANGED
|
@@ -11787,32 +11787,9 @@ var init_esm2 = __esm({
|
|
|
11787
11787
|
});
|
|
11788
11788
|
|
|
11789
11789
|
// src/theme.ts
|
|
11790
|
-
var
|
|
11790
|
+
var tokens;
|
|
11791
11791
|
var init_theme = __esm({
|
|
11792
11792
|
"src/theme.ts"() {
|
|
11793
|
-
ShadowVariants = {
|
|
11794
|
-
xs: "0 1px 2px 0 rgb(0 0 0 / 0.05)",
|
|
11795
|
-
sm: "0 1px 3px 0 color, 0 1px 2px -1px color",
|
|
11796
|
-
md: "0 4px 6px -1px color, 0 2px 4px -2px color",
|
|
11797
|
-
lg: "0 10px 15px -3px color, 0 4px 6px -4px color",
|
|
11798
|
-
xl: "0 20px 25px -5px color, 0 8px 10px -6px color",
|
|
11799
|
-
"2xl": "0 25px 50px -12px color",
|
|
11800
|
-
inner: "inset 0 2px 4px 0 color",
|
|
11801
|
-
none: "none"
|
|
11802
|
-
};
|
|
11803
|
-
getShadow = (variant, color = "") => {
|
|
11804
|
-
return ShadowVariants[variant].replace(/color/g, color);
|
|
11805
|
-
};
|
|
11806
|
-
Shadow = {
|
|
11807
|
-
xs: (color = "rgb(0 0 0 / 0.1)") => getShadow("xs", color),
|
|
11808
|
-
sm: (color = "rgb(0 0 0 / 0.1)") => getShadow("sm", color),
|
|
11809
|
-
md: (color = "rgb(0 0 0 / 0.1)") => getShadow("md", color),
|
|
11810
|
-
lg: (color = "rgb(0 0 0 / 0.1)") => getShadow("lg", color),
|
|
11811
|
-
xl: (color = "rgb(0 0 0 / 0.1)") => getShadow("xl", color),
|
|
11812
|
-
"2xl": (color = "rgb(0 0 0 / 0.25)") => getShadow("2xl", color),
|
|
11813
|
-
inner: (color = "rgb(0 0 0 / 0.05)") => getShadow("inner", color),
|
|
11814
|
-
none: () => getShadow("none")
|
|
11815
|
-
};
|
|
11816
11793
|
tokens = {
|
|
11817
11794
|
colors: {
|
|
11818
11795
|
inherit: "inherit",
|
|
@@ -12079,7 +12056,16 @@ var init_theme = __esm({
|
|
|
12079
12056
|
80: "calc(var(--tsqd-font-size) * 20)",
|
|
12080
12057
|
96: "calc(var(--tsqd-font-size) * 24)"
|
|
12081
12058
|
},
|
|
12082
|
-
shadow:
|
|
12059
|
+
shadow: {
|
|
12060
|
+
xs: (_ = "rgb(0 0 0 / 0.1)") => `0 1px 2px 0 rgb(0 0 0 / 0.05)`,
|
|
12061
|
+
sm: (color = "rgb(0 0 0 / 0.1)") => `0 1px 3px 0 ${color}, 0 1px 2px -1px ${color}`,
|
|
12062
|
+
md: (color = "rgb(0 0 0 / 0.1)") => `0 4px 6px -1px ${color}, 0 2px 4px -2px ${color}`,
|
|
12063
|
+
lg: (color = "rgb(0 0 0 / 0.1)") => `0 10px 15px -3px ${color}, 0 4px 6px -4px ${color}`,
|
|
12064
|
+
xl: (color = "rgb(0 0 0 / 0.1)") => `0 20px 25px -5px ${color}, 0 8px 10px -6px ${color}`,
|
|
12065
|
+
"2xl": (color = "rgb(0 0 0 / 0.25)") => `0 25px 50px -12px ${color}`,
|
|
12066
|
+
inner: (color = "rgb(0 0 0 / 0.05)") => `inset 0 2px 4px 0 ${color}`,
|
|
12067
|
+
none: () => `none`
|
|
12068
|
+
},
|
|
12083
12069
|
zIndices: {
|
|
12084
12070
|
hide: -1,
|
|
12085
12071
|
auto: "auto",
|
|
@@ -13254,15 +13240,15 @@ var init_Devtools = __esm({
|
|
|
13254
13240
|
props.setLocalStore("height", String(Math.round(newSize)));
|
|
13255
13241
|
}
|
|
13256
13242
|
};
|
|
13257
|
-
const
|
|
13243
|
+
const unsubscribe = () => {
|
|
13258
13244
|
if (isResizing()) {
|
|
13259
13245
|
setIsResizing(false);
|
|
13260
13246
|
}
|
|
13261
13247
|
document.removeEventListener("mousemove", runDrag, false);
|
|
13262
|
-
document.removeEventListener("mouseUp",
|
|
13248
|
+
document.removeEventListener("mouseUp", unsubscribe, false);
|
|
13263
13249
|
};
|
|
13264
13250
|
document.addEventListener("mousemove", runDrag, false);
|
|
13265
|
-
document.addEventListener("mouseup",
|
|
13251
|
+
document.addEventListener("mouseup", unsubscribe, false);
|
|
13266
13252
|
};
|
|
13267
13253
|
let panelRef;
|
|
13268
13254
|
onMount(() => {
|
|
@@ -14640,7 +14626,7 @@ var init_Devtools = __esm({
|
|
|
14640
14626
|
const client = useQueryDevtoolsContext().client;
|
|
14641
14627
|
return client.getQueryCache();
|
|
14642
14628
|
});
|
|
14643
|
-
const
|
|
14629
|
+
const unsubscribe = queryCache().subscribe((q) => {
|
|
14644
14630
|
batch(() => {
|
|
14645
14631
|
for (const [callback, value] of queryCacheMap.entries()) {
|
|
14646
14632
|
if (!value.shouldUpdate(q))
|
|
@@ -14651,9 +14637,9 @@ var init_Devtools = __esm({
|
|
|
14651
14637
|
});
|
|
14652
14638
|
onCleanup(() => {
|
|
14653
14639
|
queryCacheMap.clear();
|
|
14654
|
-
|
|
14640
|
+
unsubscribe();
|
|
14655
14641
|
});
|
|
14656
|
-
return
|
|
14642
|
+
return unsubscribe;
|
|
14657
14643
|
};
|
|
14658
14644
|
createSubscribeToQueryCacheBatcher = (callback, equalityCheck = true, shouldUpdate = () => true) => {
|
|
14659
14645
|
const queryCache = createMemo(() => {
|
|
@@ -14681,7 +14667,7 @@ var init_Devtools = __esm({
|
|
|
14681
14667
|
const client = useQueryDevtoolsContext().client;
|
|
14682
14668
|
return client.getMutationCache();
|
|
14683
14669
|
});
|
|
14684
|
-
const
|
|
14670
|
+
const unsubscribe = mutationCache().subscribe(() => {
|
|
14685
14671
|
for (const [callback, setter] of mutationCacheMap.entries()) {
|
|
14686
14672
|
queueMicrotask(() => {
|
|
14687
14673
|
setter(callback(mutationCache));
|
|
@@ -14690,9 +14676,9 @@ var init_Devtools = __esm({
|
|
|
14690
14676
|
});
|
|
14691
14677
|
onCleanup(() => {
|
|
14692
14678
|
mutationCacheMap.clear();
|
|
14693
|
-
|
|
14679
|
+
unsubscribe();
|
|
14694
14680
|
});
|
|
14695
|
-
return
|
|
14681
|
+
return unsubscribe;
|
|
14696
14682
|
};
|
|
14697
14683
|
createSubscribeToMutationCacheBatcher = (callback, equalityCheck = true) => {
|
|
14698
14684
|
const mutationCache = createMemo(() => {
|
package/build/dev.js
CHANGED
|
@@ -65,7 +65,7 @@ var TanstackQueryDevtools = class {
|
|
|
65
65
|
if (this.#Component) {
|
|
66
66
|
Devtools = this.#Component;
|
|
67
67
|
} else {
|
|
68
|
-
Devtools = lazy(() => import('./Devtools/
|
|
68
|
+
Devtools = lazy(() => import('./Devtools/F44ZTS6H.js'));
|
|
69
69
|
this.#Component = Devtools;
|
|
70
70
|
}
|
|
71
71
|
setupStyleSheet(this.#styleNonce);
|
package/build/dev.jsx
CHANGED
|
@@ -70,7 +70,7 @@ var TanstackQueryDevtools = class {
|
|
|
70
70
|
if (this.#Component) {
|
|
71
71
|
Devtools = this.#Component;
|
|
72
72
|
} else {
|
|
73
|
-
Devtools = lazy(() => import("./Devtools/
|
|
73
|
+
Devtools = lazy(() => import("./Devtools/GGXFRC53.jsx"));
|
|
74
74
|
this.#Component = Devtools;
|
|
75
75
|
}
|
|
76
76
|
setupStyleSheet(this.#styleNonce);
|
package/build/index.cjs
CHANGED
|
@@ -11786,32 +11786,9 @@ var init_esm2 = __esm({
|
|
|
11786
11786
|
});
|
|
11787
11787
|
|
|
11788
11788
|
// src/theme.ts
|
|
11789
|
-
var
|
|
11789
|
+
var tokens;
|
|
11790
11790
|
var init_theme = __esm({
|
|
11791
11791
|
"src/theme.ts"() {
|
|
11792
|
-
ShadowVariants = {
|
|
11793
|
-
xs: "0 1px 2px 0 rgb(0 0 0 / 0.05)",
|
|
11794
|
-
sm: "0 1px 3px 0 color, 0 1px 2px -1px color",
|
|
11795
|
-
md: "0 4px 6px -1px color, 0 2px 4px -2px color",
|
|
11796
|
-
lg: "0 10px 15px -3px color, 0 4px 6px -4px color",
|
|
11797
|
-
xl: "0 20px 25px -5px color, 0 8px 10px -6px color",
|
|
11798
|
-
"2xl": "0 25px 50px -12px color",
|
|
11799
|
-
inner: "inset 0 2px 4px 0 color",
|
|
11800
|
-
none: "none"
|
|
11801
|
-
};
|
|
11802
|
-
getShadow = (variant, color = "") => {
|
|
11803
|
-
return ShadowVariants[variant].replace(/color/g, color);
|
|
11804
|
-
};
|
|
11805
|
-
Shadow = {
|
|
11806
|
-
xs: (color = "rgb(0 0 0 / 0.1)") => getShadow("xs", color),
|
|
11807
|
-
sm: (color = "rgb(0 0 0 / 0.1)") => getShadow("sm", color),
|
|
11808
|
-
md: (color = "rgb(0 0 0 / 0.1)") => getShadow("md", color),
|
|
11809
|
-
lg: (color = "rgb(0 0 0 / 0.1)") => getShadow("lg", color),
|
|
11810
|
-
xl: (color = "rgb(0 0 0 / 0.1)") => getShadow("xl", color),
|
|
11811
|
-
"2xl": (color = "rgb(0 0 0 / 0.25)") => getShadow("2xl", color),
|
|
11812
|
-
inner: (color = "rgb(0 0 0 / 0.05)") => getShadow("inner", color),
|
|
11813
|
-
none: () => getShadow("none")
|
|
11814
|
-
};
|
|
11815
11792
|
tokens = {
|
|
11816
11793
|
colors: {
|
|
11817
11794
|
inherit: "inherit",
|
|
@@ -12078,7 +12055,16 @@ var init_theme = __esm({
|
|
|
12078
12055
|
80: "calc(var(--tsqd-font-size) * 20)",
|
|
12079
12056
|
96: "calc(var(--tsqd-font-size) * 24)"
|
|
12080
12057
|
},
|
|
12081
|
-
shadow:
|
|
12058
|
+
shadow: {
|
|
12059
|
+
xs: (_ = "rgb(0 0 0 / 0.1)") => `0 1px 2px 0 rgb(0 0 0 / 0.05)`,
|
|
12060
|
+
sm: (color = "rgb(0 0 0 / 0.1)") => `0 1px 3px 0 ${color}, 0 1px 2px -1px ${color}`,
|
|
12061
|
+
md: (color = "rgb(0 0 0 / 0.1)") => `0 4px 6px -1px ${color}, 0 2px 4px -2px ${color}`,
|
|
12062
|
+
lg: (color = "rgb(0 0 0 / 0.1)") => `0 10px 15px -3px ${color}, 0 4px 6px -4px ${color}`,
|
|
12063
|
+
xl: (color = "rgb(0 0 0 / 0.1)") => `0 20px 25px -5px ${color}, 0 8px 10px -6px ${color}`,
|
|
12064
|
+
"2xl": (color = "rgb(0 0 0 / 0.25)") => `0 25px 50px -12px ${color}`,
|
|
12065
|
+
inner: (color = "rgb(0 0 0 / 0.05)") => `inset 0 2px 4px 0 ${color}`,
|
|
12066
|
+
none: () => `none`
|
|
12067
|
+
},
|
|
12082
12068
|
zIndices: {
|
|
12083
12069
|
hide: -1,
|
|
12084
12070
|
auto: "auto",
|
|
@@ -13252,15 +13238,15 @@ var init_Devtools = __esm({
|
|
|
13252
13238
|
props.setLocalStore("height", String(Math.round(newSize)));
|
|
13253
13239
|
}
|
|
13254
13240
|
};
|
|
13255
|
-
const
|
|
13241
|
+
const unsubscribe = () => {
|
|
13256
13242
|
if (isResizing()) {
|
|
13257
13243
|
setIsResizing(false);
|
|
13258
13244
|
}
|
|
13259
13245
|
document.removeEventListener("mousemove", runDrag, false);
|
|
13260
|
-
document.removeEventListener("mouseUp",
|
|
13246
|
+
document.removeEventListener("mouseUp", unsubscribe, false);
|
|
13261
13247
|
};
|
|
13262
13248
|
document.addEventListener("mousemove", runDrag, false);
|
|
13263
|
-
document.addEventListener("mouseup",
|
|
13249
|
+
document.addEventListener("mouseup", unsubscribe, false);
|
|
13264
13250
|
};
|
|
13265
13251
|
let panelRef;
|
|
13266
13252
|
onMount(() => {
|
|
@@ -14638,7 +14624,7 @@ var init_Devtools = __esm({
|
|
|
14638
14624
|
const client = useQueryDevtoolsContext().client;
|
|
14639
14625
|
return client.getQueryCache();
|
|
14640
14626
|
});
|
|
14641
|
-
const
|
|
14627
|
+
const unsubscribe = queryCache().subscribe((q) => {
|
|
14642
14628
|
batch(() => {
|
|
14643
14629
|
for (const [callback, value] of queryCacheMap.entries()) {
|
|
14644
14630
|
if (!value.shouldUpdate(q))
|
|
@@ -14649,9 +14635,9 @@ var init_Devtools = __esm({
|
|
|
14649
14635
|
});
|
|
14650
14636
|
onCleanup(() => {
|
|
14651
14637
|
queryCacheMap.clear();
|
|
14652
|
-
|
|
14638
|
+
unsubscribe();
|
|
14653
14639
|
});
|
|
14654
|
-
return
|
|
14640
|
+
return unsubscribe;
|
|
14655
14641
|
};
|
|
14656
14642
|
createSubscribeToQueryCacheBatcher = (callback, equalityCheck = true, shouldUpdate = () => true) => {
|
|
14657
14643
|
const queryCache = createMemo(() => {
|
|
@@ -14679,7 +14665,7 @@ var init_Devtools = __esm({
|
|
|
14679
14665
|
const client = useQueryDevtoolsContext().client;
|
|
14680
14666
|
return client.getMutationCache();
|
|
14681
14667
|
});
|
|
14682
|
-
const
|
|
14668
|
+
const unsubscribe = mutationCache().subscribe(() => {
|
|
14683
14669
|
for (const [callback, setter] of mutationCacheMap.entries()) {
|
|
14684
14670
|
queueMicrotask(() => {
|
|
14685
14671
|
setter(callback(mutationCache));
|
|
@@ -14688,9 +14674,9 @@ var init_Devtools = __esm({
|
|
|
14688
14674
|
});
|
|
14689
14675
|
onCleanup(() => {
|
|
14690
14676
|
mutationCacheMap.clear();
|
|
14691
|
-
|
|
14677
|
+
unsubscribe();
|
|
14692
14678
|
});
|
|
14693
|
-
return
|
|
14679
|
+
return unsubscribe;
|
|
14694
14680
|
};
|
|
14695
14681
|
createSubscribeToMutationCacheBatcher = (callback, equalityCheck = true) => {
|
|
14696
14682
|
const mutationCache = createMemo(() => {
|
package/build/index.js
CHANGED
|
@@ -65,7 +65,7 @@ var TanstackQueryDevtools = class {
|
|
|
65
65
|
if (this.#Component) {
|
|
66
66
|
Devtools = this.#Component;
|
|
67
67
|
} else {
|
|
68
|
-
Devtools = lazy(() => import('./Devtools/
|
|
68
|
+
Devtools = lazy(() => import('./Devtools/IEC7B7YJ.js'));
|
|
69
69
|
this.#Component = Devtools;
|
|
70
70
|
}
|
|
71
71
|
setupStyleSheet(this.#styleNonce);
|
package/build/index.jsx
CHANGED
|
@@ -70,7 +70,7 @@ var TanstackQueryDevtools = class {
|
|
|
70
70
|
if (this.#Component) {
|
|
71
71
|
Devtools = this.#Component;
|
|
72
72
|
} else {
|
|
73
|
-
Devtools = lazy(() => import("./Devtools/
|
|
73
|
+
Devtools = lazy(() => import("./Devtools/PFRKCKUQ.jsx"));
|
|
74
74
|
this.#Component = Devtools;
|
|
75
75
|
}
|
|
76
76
|
setupStyleSheet(this.#styleNonce);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tanstack/query-devtools",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.18.0",
|
|
4
4
|
"description": "Developer tools to interact with and visualize the TanStack Query cache",
|
|
5
5
|
"author": "tannerlinsley",
|
|
6
6
|
"license": "MIT",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"superjson": "^1.13.3",
|
|
51
51
|
"tsup-preset-solid": "^2.2.0",
|
|
52
52
|
"vite-plugin-solid": "^2.8.0",
|
|
53
|
-
"@tanstack/query-core": "5.
|
|
53
|
+
"@tanstack/query-core": "5.18.0"
|
|
54
54
|
},
|
|
55
55
|
"scripts": {
|
|
56
56
|
"clean": "rimraf ./build && rimraf ./coverage",
|
package/src/Devtools.tsx
CHANGED
|
@@ -330,16 +330,16 @@ const DevtoolsPanel: Component<DevtoolsPanelProps> = (props) => {
|
|
|
330
330
|
}
|
|
331
331
|
}
|
|
332
332
|
|
|
333
|
-
const
|
|
333
|
+
const unsubscribe = () => {
|
|
334
334
|
if (isResizing()) {
|
|
335
335
|
setIsResizing(false)
|
|
336
336
|
}
|
|
337
337
|
document.removeEventListener('mousemove', runDrag, false)
|
|
338
|
-
document.removeEventListener('mouseUp',
|
|
338
|
+
document.removeEventListener('mouseUp', unsubscribe, false)
|
|
339
339
|
}
|
|
340
340
|
|
|
341
341
|
document.addEventListener('mousemove', runDrag, false)
|
|
342
|
-
document.addEventListener('mouseup',
|
|
342
|
+
document.addEventListener('mouseup', unsubscribe, false)
|
|
343
343
|
}
|
|
344
344
|
|
|
345
345
|
let panelRef!: HTMLDivElement
|
|
@@ -2062,7 +2062,7 @@ const setupQueryCacheSubscription = () => {
|
|
|
2062
2062
|
return client.getQueryCache()
|
|
2063
2063
|
})
|
|
2064
2064
|
|
|
2065
|
-
const
|
|
2065
|
+
const unsubscribe = queryCache().subscribe((q) => {
|
|
2066
2066
|
batch(() => {
|
|
2067
2067
|
for (const [callback, value] of queryCacheMap.entries()) {
|
|
2068
2068
|
if (!value.shouldUpdate(q)) continue
|
|
@@ -2073,10 +2073,10 @@ const setupQueryCacheSubscription = () => {
|
|
|
2073
2073
|
|
|
2074
2074
|
onCleanup(() => {
|
|
2075
2075
|
queryCacheMap.clear()
|
|
2076
|
-
|
|
2076
|
+
unsubscribe()
|
|
2077
2077
|
})
|
|
2078
2078
|
|
|
2079
|
-
return
|
|
2079
|
+
return unsubscribe
|
|
2080
2080
|
}
|
|
2081
2081
|
|
|
2082
2082
|
const createSubscribeToQueryCacheBatcher = <T,>(
|
|
@@ -2122,7 +2122,7 @@ const setupMutationCacheSubscription = () => {
|
|
|
2122
2122
|
return client.getMutationCache()
|
|
2123
2123
|
})
|
|
2124
2124
|
|
|
2125
|
-
const
|
|
2125
|
+
const unsubscribe = mutationCache().subscribe(() => {
|
|
2126
2126
|
for (const [callback, setter] of mutationCacheMap.entries()) {
|
|
2127
2127
|
queueMicrotask(() => {
|
|
2128
2128
|
setter(callback(mutationCache))
|
|
@@ -2132,10 +2132,10 @@ const setupMutationCacheSubscription = () => {
|
|
|
2132
2132
|
|
|
2133
2133
|
onCleanup(() => {
|
|
2134
2134
|
mutationCacheMap.clear()
|
|
2135
|
-
|
|
2135
|
+
unsubscribe()
|
|
2136
2136
|
})
|
|
2137
2137
|
|
|
2138
|
-
return
|
|
2138
|
+
return unsubscribe
|
|
2139
2139
|
}
|
|
2140
2140
|
|
|
2141
2141
|
const createSubscribeToMutationCacheBatcher = <T,>(
|
|
@@ -91,6 +91,7 @@ describe('Utils tests', () => {
|
|
|
91
91
|
['fr', 'bonjour'],
|
|
92
92
|
])
|
|
93
93
|
|
|
94
|
+
/* eslint-disable @cspell/spellchecker */
|
|
94
95
|
const newData = updateNestedDataByPath(oldData, ['fr'], 'salut')
|
|
95
96
|
|
|
96
97
|
expect(newData).not.toBe(oldData) // should not be the same reference
|
|
@@ -108,10 +109,12 @@ describe('Utils tests', () => {
|
|
|
108
109
|
}
|
|
109
110
|
`)
|
|
110
111
|
})
|
|
112
|
+
/* eslint-enable */
|
|
111
113
|
})
|
|
112
114
|
|
|
113
115
|
describe('nested data', () => {
|
|
114
116
|
it('should update data correctly', async () => {
|
|
117
|
+
/* eslint-disable @cspell/spellchecker */
|
|
115
118
|
const oldData = new Map([
|
|
116
119
|
[
|
|
117
120
|
'pumpkin-pie',
|
|
@@ -368,6 +371,7 @@ describe('Utils tests', () => {
|
|
|
368
371
|
},
|
|
369
372
|
}
|
|
370
373
|
`)
|
|
374
|
+
/* eslint-enable */
|
|
371
375
|
})
|
|
372
376
|
})
|
|
373
377
|
})
|
|
@@ -469,6 +473,7 @@ describe('Utils tests', () => {
|
|
|
469
473
|
|
|
470
474
|
describe('nested data', () => {
|
|
471
475
|
it('should delete nested items correctly', async () => {
|
|
476
|
+
/* eslint-disable @cspell/spellchecker */
|
|
472
477
|
const oldData = new Map([
|
|
473
478
|
[
|
|
474
479
|
'pumpkin-pie',
|
|
@@ -720,6 +725,7 @@ describe('Utils tests', () => {
|
|
|
720
725
|
},
|
|
721
726
|
}
|
|
722
727
|
`)
|
|
728
|
+
/* eslint-enable */
|
|
723
729
|
})
|
|
724
730
|
})
|
|
725
731
|
})
|
package/src/index.tsx
CHANGED
|
@@ -3,7 +3,7 @@ import { createSignal, lazy } from 'solid-js'
|
|
|
3
3
|
import { setupStyleSheet } from './utils'
|
|
4
4
|
import type {
|
|
5
5
|
QueryClient,
|
|
6
|
-
onlineManager as
|
|
6
|
+
onlineManager as TOnlineManager,
|
|
7
7
|
} from '@tanstack/query-core'
|
|
8
8
|
import type { DevtoolsComponentType } from './Devtools'
|
|
9
9
|
import type {
|
|
@@ -21,7 +21,7 @@ export interface TanstackQueryDevtoolsConfig extends QueryDevtoolsProps {
|
|
|
21
21
|
|
|
22
22
|
class TanstackQueryDevtools {
|
|
23
23
|
#client: Signal<QueryClient>
|
|
24
|
-
#onlineManager: typeof
|
|
24
|
+
#onlineManager: typeof TOnlineManager
|
|
25
25
|
#queryFlavor: string
|
|
26
26
|
#version: string
|
|
27
27
|
#isMounted = false
|
package/src/theme.ts
CHANGED
|
@@ -1,31 +1,3 @@
|
|
|
1
|
-
const ShadowVariants = {
|
|
2
|
-
xs: '0 1px 2px 0 rgb(0 0 0 / 0.05)',
|
|
3
|
-
sm: '0 1px 3px 0 color, 0 1px 2px -1px color',
|
|
4
|
-
md: '0 4px 6px -1px color, 0 2px 4px -2px color',
|
|
5
|
-
lg: '0 10px 15px -3px color, 0 4px 6px -4px color',
|
|
6
|
-
xl: '0 20px 25px -5px color, 0 8px 10px -6px color',
|
|
7
|
-
'2xl': '0 25px 50px -12px color',
|
|
8
|
-
inner: 'inset 0 2px 4px 0 color',
|
|
9
|
-
none: 'none',
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
type ShadowVariantType = keyof typeof ShadowVariants
|
|
13
|
-
|
|
14
|
-
const getShadow = (variant: ShadowVariantType, color: string = ''): string => {
|
|
15
|
-
return ShadowVariants[variant].replace(/color/g, color)
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
const Shadow = {
|
|
19
|
-
xs: (color: string = 'rgb(0 0 0 / 0.1)') => getShadow('xs', color),
|
|
20
|
-
sm: (color: string = 'rgb(0 0 0 / 0.1)') => getShadow('sm', color),
|
|
21
|
-
md: (color: string = 'rgb(0 0 0 / 0.1)') => getShadow('md', color),
|
|
22
|
-
lg: (color: string = 'rgb(0 0 0 / 0.1)') => getShadow('lg', color),
|
|
23
|
-
xl: (color: string = 'rgb(0 0 0 / 0.1)') => getShadow('xl', color),
|
|
24
|
-
'2xl': (color: string = 'rgb(0 0 0 / 0.25)') => getShadow('2xl', color),
|
|
25
|
-
inner: (color: string = 'rgb(0 0 0 / 0.05)') => getShadow('inner', color),
|
|
26
|
-
none: () => getShadow('none'),
|
|
27
|
-
}
|
|
28
|
-
|
|
29
1
|
export const tokens = {
|
|
30
2
|
colors: {
|
|
31
3
|
inherit: 'inherit',
|
|
@@ -292,7 +264,23 @@ export const tokens = {
|
|
|
292
264
|
80: 'calc(var(--tsqd-font-size) * 20)',
|
|
293
265
|
96: 'calc(var(--tsqd-font-size) * 24)',
|
|
294
266
|
},
|
|
295
|
-
shadow:
|
|
267
|
+
shadow: {
|
|
268
|
+
xs: (_: string = 'rgb(0 0 0 / 0.1)') =>
|
|
269
|
+
`0 1px 2px 0 rgb(0 0 0 / 0.05)` as const,
|
|
270
|
+
sm: (color: string = 'rgb(0 0 0 / 0.1)') =>
|
|
271
|
+
`0 1px 3px 0 ${color}, 0 1px 2px -1px ${color}` as const,
|
|
272
|
+
md: (color: string = 'rgb(0 0 0 / 0.1)') =>
|
|
273
|
+
`0 4px 6px -1px ${color}, 0 2px 4px -2px ${color}` as const,
|
|
274
|
+
lg: (color: string = 'rgb(0 0 0 / 0.1)') =>
|
|
275
|
+
`0 10px 15px -3px ${color}, 0 4px 6px -4px ${color}` as const,
|
|
276
|
+
xl: (color: string = 'rgb(0 0 0 / 0.1)') =>
|
|
277
|
+
`0 20px 25px -5px ${color}, 0 8px 10px -6px ${color}` as const,
|
|
278
|
+
'2xl': (color: string = 'rgb(0 0 0 / 0.25)') =>
|
|
279
|
+
`0 25px 50px -12px ${color}` as const,
|
|
280
|
+
inner: (color: string = 'rgb(0 0 0 / 0.05)') =>
|
|
281
|
+
`inset 0 2px 4px 0 ${color}` as const,
|
|
282
|
+
none: () => `none` as const,
|
|
283
|
+
},
|
|
296
284
|
zIndices: {
|
|
297
285
|
hide: -1,
|
|
298
286
|
auto: 'auto',
|
|
@@ -308,4 +296,4 @@ export const tokens = {
|
|
|
308
296
|
toast: 1700,
|
|
309
297
|
tooltip: 1800,
|
|
310
298
|
},
|
|
311
|
-
}
|
|
299
|
+
} as const
|