@tanstack/query-devtools 5.1.0 → 5.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/Devtools/{QHGCTHEZ.jsx → 7FRXYIEA.jsx} +119 -90
- package/build/Devtools/{BWLPXLBN.js → HESZYUBG.js} +141 -107
- package/build/Devtools/{QHLLQ2XL.jsx → KWB27UDF.jsx} +119 -90
- package/build/Devtools/{CRASJTHY.js → MVUALMJ4.js} +141 -107
- package/build/dev.cjs +140 -106
- package/build/dev.js +1 -1
- package/build/dev.jsx +1 -1
- package/build/index.cjs +140 -106
- package/build/index.js +1 -1
- package/build/index.jsx +1 -1
- package/package.json +1 -1
- package/src/Devtools.tsx +50 -14
- package/src/Explorer.tsx +5 -5
- package/src/theme.ts +71 -71
|
@@ -8737,35 +8737,35 @@ var tokens = {
|
|
|
8737
8737
|
},
|
|
8738
8738
|
font: {
|
|
8739
8739
|
size: {
|
|
8740
|
-
"2xs": "0.
|
|
8741
|
-
xs: "0.
|
|
8742
|
-
sm: "0.
|
|
8743
|
-
md: "
|
|
8744
|
-
lg: "1.
|
|
8745
|
-
xl: "1.
|
|
8746
|
-
"2xl": "1.
|
|
8747
|
-
"3xl": "1.
|
|
8748
|
-
"4xl": "2.
|
|
8749
|
-
"5xl": "
|
|
8750
|
-
"6xl": "3.
|
|
8751
|
-
"7xl": "4.
|
|
8752
|
-
"8xl": "
|
|
8753
|
-
"9xl": "
|
|
8740
|
+
"2xs": "calc(var(--tsqd-font-size) * 0.625)",
|
|
8741
|
+
xs: "calc(var(--tsqd-font-size) * 0.75)",
|
|
8742
|
+
sm: "calc(var(--tsqd-font-size) * 0.875)",
|
|
8743
|
+
md: "var(--tsqd-font-size)",
|
|
8744
|
+
lg: "calc(var(--tsqd-font-size) * 1.125)",
|
|
8745
|
+
xl: "calc(var(--tsqd-font-size) * 1.25)",
|
|
8746
|
+
"2xl": "calc(var(--tsqd-font-size) * 1.5)",
|
|
8747
|
+
"3xl": "calc(var(--tsqd-font-size) * 1.875)",
|
|
8748
|
+
"4xl": "calc(var(--tsqd-font-size) * 2.25)",
|
|
8749
|
+
"5xl": "calc(var(--tsqd-font-size) * 3)",
|
|
8750
|
+
"6xl": "calc(var(--tsqd-font-size) * 3.75)",
|
|
8751
|
+
"7xl": "calc(var(--tsqd-font-size) * 4.5)",
|
|
8752
|
+
"8xl": "calc(var(--tsqd-font-size) * 6)",
|
|
8753
|
+
"9xl": "calc(var(--tsqd-font-size) * 8)"
|
|
8754
8754
|
},
|
|
8755
8755
|
lineHeight: {
|
|
8756
|
-
xs: "
|
|
8757
|
-
sm: "1.
|
|
8758
|
-
md: "1.
|
|
8759
|
-
lg: "1.
|
|
8760
|
-
xl: "
|
|
8761
|
-
"2xl": "
|
|
8762
|
-
"3xl": "2.
|
|
8763
|
-
"4xl": "2.
|
|
8764
|
-
"5xl": "
|
|
8765
|
-
"6xl": "
|
|
8766
|
-
"7xl": "
|
|
8767
|
-
"8xl": "
|
|
8768
|
-
"9xl": "
|
|
8756
|
+
xs: "calc(var(--tsqd-font-size) * 1)",
|
|
8757
|
+
sm: "calc(var(--tsqd-font-size) * 1.25)",
|
|
8758
|
+
md: "calc(var(--tsqd-font-size) * 1.5)",
|
|
8759
|
+
lg: "calc(var(--tsqd-font-size) * 1.75)",
|
|
8760
|
+
xl: "calc(var(--tsqd-font-size) * 2)",
|
|
8761
|
+
"2xl": "calc(var(--tsqd-font-size) * 2.25)",
|
|
8762
|
+
"3xl": "calc(var(--tsqd-font-size) * 2.5)",
|
|
8763
|
+
"4xl": "calc(var(--tsqd-font-size) * 2.75)",
|
|
8764
|
+
"5xl": "calc(var(--tsqd-font-size) * 3)",
|
|
8765
|
+
"6xl": "calc(var(--tsqd-font-size) * 3.25)",
|
|
8766
|
+
"7xl": "calc(var(--tsqd-font-size) * 3.5)",
|
|
8767
|
+
"8xl": "calc(var(--tsqd-font-size) * 3.75)",
|
|
8768
|
+
"9xl": "calc(var(--tsqd-font-size) * 4)"
|
|
8769
8769
|
},
|
|
8770
8770
|
weight: {
|
|
8771
8771
|
thin: "100",
|
|
@@ -8790,55 +8790,55 @@ var tokens = {
|
|
|
8790
8790
|
border: {
|
|
8791
8791
|
radius: {
|
|
8792
8792
|
none: "0px",
|
|
8793
|
-
xs: "0.
|
|
8794
|
-
sm: "0.
|
|
8795
|
-
md: "0.
|
|
8796
|
-
lg: "0.
|
|
8797
|
-
xl: "0.
|
|
8798
|
-
"2xl": "
|
|
8799
|
-
"3xl": "1.
|
|
8793
|
+
xs: "calc(var(--tsqd-font-size) * 0.125)",
|
|
8794
|
+
sm: "calc(var(--tsqd-font-size) * 0.25)",
|
|
8795
|
+
md: "calc(var(--tsqd-font-size) * 0.375)",
|
|
8796
|
+
lg: "calc(var(--tsqd-font-size) * 0.5)",
|
|
8797
|
+
xl: "calc(var(--tsqd-font-size) * 0.75)",
|
|
8798
|
+
"2xl": "calc(var(--tsqd-font-size) * 1)",
|
|
8799
|
+
"3xl": "calc(var(--tsqd-font-size) * 1.5)",
|
|
8800
8800
|
full: "9999px"
|
|
8801
8801
|
}
|
|
8802
8802
|
},
|
|
8803
8803
|
size: {
|
|
8804
8804
|
0: "0px",
|
|
8805
|
-
0.25: "0.
|
|
8806
|
-
0.5: "0.
|
|
8807
|
-
1: "0.
|
|
8808
|
-
1.5: "0.
|
|
8809
|
-
2: "0.
|
|
8810
|
-
2.5: "0.
|
|
8811
|
-
3: "0.
|
|
8812
|
-
3.5: "0.
|
|
8813
|
-
4: "
|
|
8814
|
-
4.5: "1.
|
|
8815
|
-
5: "1.
|
|
8816
|
-
5.5: "1.
|
|
8817
|
-
6: "1.
|
|
8818
|
-
6.5: "1.
|
|
8819
|
-
7: "1.
|
|
8820
|
-
8: "
|
|
8821
|
-
9: "2.
|
|
8822
|
-
10: "2.
|
|
8823
|
-
11: "2.
|
|
8824
|
-
12: "
|
|
8825
|
-
14: "3.
|
|
8826
|
-
16: "
|
|
8827
|
-
20: "
|
|
8828
|
-
24: "
|
|
8829
|
-
28: "
|
|
8830
|
-
32: "
|
|
8831
|
-
36: "
|
|
8832
|
-
40: "
|
|
8833
|
-
44: "
|
|
8834
|
-
48: "
|
|
8835
|
-
52: "
|
|
8836
|
-
56: "
|
|
8837
|
-
60: "
|
|
8838
|
-
64: "
|
|
8839
|
-
72: "
|
|
8840
|
-
80: "
|
|
8841
|
-
96: "
|
|
8805
|
+
0.25: "calc(var(--tsqd-font-size) * 0.0625)",
|
|
8806
|
+
0.5: "calc(var(--tsqd-font-size) * 0.125)",
|
|
8807
|
+
1: "calc(var(--tsqd-font-size) * 0.25)",
|
|
8808
|
+
1.5: "calc(var(--tsqd-font-size) * 0.375)",
|
|
8809
|
+
2: "calc(var(--tsqd-font-size) * 0.5)",
|
|
8810
|
+
2.5: "calc(var(--tsqd-font-size) * 0.625)",
|
|
8811
|
+
3: "calc(var(--tsqd-font-size) * 0.75)",
|
|
8812
|
+
3.5: "calc(var(--tsqd-font-size) * 0.875)",
|
|
8813
|
+
4: "calc(var(--tsqd-font-size) * 1)",
|
|
8814
|
+
4.5: "calc(var(--tsqd-font-size) * 1.125)",
|
|
8815
|
+
5: "calc(var(--tsqd-font-size) * 1.25)",
|
|
8816
|
+
5.5: "calc(var(--tsqd-font-size) * 1.375)",
|
|
8817
|
+
6: "calc(var(--tsqd-font-size) * 1.5)",
|
|
8818
|
+
6.5: "calc(var(--tsqd-font-size) * 1.625)",
|
|
8819
|
+
7: "calc(var(--tsqd-font-size) * 1.75)",
|
|
8820
|
+
8: "calc(var(--tsqd-font-size) * 2)",
|
|
8821
|
+
9: "calc(var(--tsqd-font-size) * 2.25)",
|
|
8822
|
+
10: "calc(var(--tsqd-font-size) * 2.5)",
|
|
8823
|
+
11: "calc(var(--tsqd-font-size) * 2.75)",
|
|
8824
|
+
12: "calc(var(--tsqd-font-size) * 3)",
|
|
8825
|
+
14: "calc(var(--tsqd-font-size) * 3.5)",
|
|
8826
|
+
16: "calc(var(--tsqd-font-size) * 4)",
|
|
8827
|
+
20: "calc(var(--tsqd-font-size) * 5)",
|
|
8828
|
+
24: "calc(var(--tsqd-font-size) * 6)",
|
|
8829
|
+
28: "calc(var(--tsqd-font-size) * 7)",
|
|
8830
|
+
32: "calc(var(--tsqd-font-size) * 8)",
|
|
8831
|
+
36: "calc(var(--tsqd-font-size) * 9)",
|
|
8832
|
+
40: "calc(var(--tsqd-font-size) * 10)",
|
|
8833
|
+
44: "calc(var(--tsqd-font-size) * 11)",
|
|
8834
|
+
48: "calc(var(--tsqd-font-size) * 12)",
|
|
8835
|
+
52: "calc(var(--tsqd-font-size) * 13)",
|
|
8836
|
+
56: "calc(var(--tsqd-font-size) * 14)",
|
|
8837
|
+
60: "calc(var(--tsqd-font-size) * 15)",
|
|
8838
|
+
64: "calc(var(--tsqd-font-size) * 16)",
|
|
8839
|
+
72: "calc(var(--tsqd-font-size) * 18)",
|
|
8840
|
+
80: "calc(var(--tsqd-font-size) * 20)",
|
|
8841
|
+
96: "calc(var(--tsqd-font-size) * 24)"
|
|
8842
8842
|
},
|
|
8843
8843
|
shadow: Shadow,
|
|
8844
8844
|
zIndices: {
|
|
@@ -11507,8 +11507,8 @@ var stylesFactory = (theme) => {
|
|
|
11507
11507
|
expanderButtonContainer: u`
|
|
11508
11508
|
display: flex;
|
|
11509
11509
|
align-items: center;
|
|
11510
|
-
line-height:
|
|
11511
|
-
min-height:
|
|
11510
|
+
line-height: ${size2[4]};
|
|
11511
|
+
min-height: ${size2[4]};
|
|
11512
11512
|
gap: ${size2[2]};
|
|
11513
11513
|
`,
|
|
11514
11514
|
expanderButton: u`
|
|
@@ -11516,7 +11516,7 @@ var stylesFactory = (theme) => {
|
|
|
11516
11516
|
color: inherit;
|
|
11517
11517
|
font: inherit;
|
|
11518
11518
|
outline: inherit;
|
|
11519
|
-
height:
|
|
11519
|
+
height: ${size2[5]};
|
|
11520
11520
|
background: transparent;
|
|
11521
11521
|
border: none;
|
|
11522
11522
|
padding: 0;
|
|
@@ -11558,8 +11558,8 @@ var stylesFactory = (theme) => {
|
|
|
11558
11558
|
display: inline-flex;
|
|
11559
11559
|
gap: ${size2[2]};
|
|
11560
11560
|
width: 100%;
|
|
11561
|
-
margin
|
|
11562
|
-
line-height:
|
|
11561
|
+
margin: ${size2[0.25]} 0px;
|
|
11562
|
+
line-height: ${size2[4.5]};
|
|
11563
11563
|
align-items: center;
|
|
11564
11564
|
`,
|
|
11565
11565
|
editableInput: u`
|
|
@@ -11659,8 +11659,9 @@ var Devtools = (props) => {
|
|
|
11659
11659
|
const position = createMemo(() => {
|
|
11660
11660
|
return props.localStore.position || useQueryDevtoolsContext().position || POSITION;
|
|
11661
11661
|
});
|
|
11662
|
+
let transitionsContainerRef;
|
|
11662
11663
|
createEffect(() => {
|
|
11663
|
-
const root =
|
|
11664
|
+
const root = transitionsContainerRef.parentElement;
|
|
11664
11665
|
const height = props.localStore.height || DEFAULT_HEIGHT;
|
|
11665
11666
|
const width = props.localStore.width || DEFAULT_WIDTH;
|
|
11666
11667
|
const panelPosition = position();
|
|
@@ -11673,6 +11674,18 @@ var Devtools = (props) => {
|
|
|
11673
11674
|
`${panelPosition === "left" ? "-" : ""}${width}px`
|
|
11674
11675
|
);
|
|
11675
11676
|
});
|
|
11677
|
+
onMount(() => {
|
|
11678
|
+
const onFocus = () => {
|
|
11679
|
+
const root = transitionsContainerRef.parentElement;
|
|
11680
|
+
const fontSize = getComputedStyle(root).fontSize;
|
|
11681
|
+
root.style.setProperty("--tsqd-font-size", fontSize);
|
|
11682
|
+
};
|
|
11683
|
+
onFocus();
|
|
11684
|
+
window.addEventListener("focus", onFocus);
|
|
11685
|
+
onCleanup(() => {
|
|
11686
|
+
window.removeEventListener("focus", onFocus);
|
|
11687
|
+
});
|
|
11688
|
+
});
|
|
11676
11689
|
return <div
|
|
11677
11690
|
class={clsx(
|
|
11678
11691
|
u`
|
|
@@ -11698,6 +11711,7 @@ var Devtools = (props) => {
|
|
|
11698
11711
|
`,
|
|
11699
11712
|
"tsqd-transitions-container"
|
|
11700
11713
|
)}
|
|
11714
|
+
ref={transitionsContainerRef}
|
|
11701
11715
|
>
|
|
11702
11716
|
<TransitionGroup name="tsqd-panel-transition"><Show when={isOpen()}><DevtoolsPanel
|
|
11703
11717
|
localStore={props.localStore}
|
|
@@ -11864,6 +11878,7 @@ var DevtoolsPanel = (props) => {
|
|
|
11864
11878
|
var ContentView = (props) => {
|
|
11865
11879
|
setupQueryCacheSubscription();
|
|
11866
11880
|
setupMutationCacheSubscription();
|
|
11881
|
+
let containerRef;
|
|
11867
11882
|
const theme = useTheme();
|
|
11868
11883
|
const styles = createMemo(() => {
|
|
11869
11884
|
return theme() === "dark" ? darkStyles2 : lightStyles2;
|
|
@@ -11941,6 +11956,11 @@ var ContentView = (props) => {
|
|
|
11941
11956
|
const setDevtoolsPosition = (pos) => {
|
|
11942
11957
|
props.setLocalStore("position", pos);
|
|
11943
11958
|
};
|
|
11959
|
+
const setComputedVariables = (el) => {
|
|
11960
|
+
const computedStyle = getComputedStyle(containerRef);
|
|
11961
|
+
const variable = computedStyle.getPropertyValue("--tsqd-font-size");
|
|
11962
|
+
el.style.setProperty("--tsqd-font-size", variable);
|
|
11963
|
+
};
|
|
11944
11964
|
return <>
|
|
11945
11965
|
<div
|
|
11946
11966
|
class={clsx(
|
|
@@ -11951,6 +11971,7 @@ var ContentView = (props) => {
|
|
|
11951
11971
|
`,
|
|
11952
11972
|
"tsqd-queries-container"
|
|
11953
11973
|
)}
|
|
11974
|
+
ref={containerRef}
|
|
11954
11975
|
>
|
|
11955
11976
|
<div class={clsx(styles().row, "tsqd-header")}>
|
|
11956
11977
|
<div class={styles().logoAndToggleContainer}>
|
|
@@ -12121,7 +12142,9 @@ var ContentView = (props) => {
|
|
|
12121
12142
|
"tsqd-action-settings"
|
|
12122
12143
|
)}
|
|
12123
12144
|
><Settings /></index$d.Trigger>
|
|
12124
|
-
<index$d.Portal
|
|
12145
|
+
<index$d.Portal
|
|
12146
|
+
ref={(el) => setComputedVariables(el)}
|
|
12147
|
+
><index$d.Content
|
|
12125
12148
|
class={clsx(styles().settingsMenu, "tsqd-settings-menu")}
|
|
12126
12149
|
>
|
|
12127
12150
|
<div
|
|
@@ -12141,7 +12164,9 @@ var ContentView = (props) => {
|
|
|
12141
12164
|
<span>Position</span>
|
|
12142
12165
|
<ChevronDown />
|
|
12143
12166
|
</index$d.SubTrigger>
|
|
12144
|
-
<index$d.Portal
|
|
12167
|
+
<index$d.Portal
|
|
12168
|
+
ref={(el) => setComputedVariables(el)}
|
|
12169
|
+
><index$d.SubContent
|
|
12145
12170
|
class={clsx(
|
|
12146
12171
|
styles().settingsMenu,
|
|
12147
12172
|
"tsqd-settings-submenu"
|
|
@@ -12216,7 +12241,9 @@ var ContentView = (props) => {
|
|
|
12216
12241
|
<span>Theme</span>
|
|
12217
12242
|
<ChevronDown />
|
|
12218
12243
|
</index$d.SubTrigger>
|
|
12219
|
-
<index$d.Portal
|
|
12244
|
+
<index$d.Portal
|
|
12245
|
+
ref={(el) => setComputedVariables(el)}
|
|
12246
|
+
><index$d.SubContent
|
|
12220
12247
|
class={clsx(
|
|
12221
12248
|
styles().settingsMenu,
|
|
12222
12249
|
"tsqd-settings-submenu"
|
|
@@ -12906,7 +12933,7 @@ var QueryDetails = () => {
|
|
|
12906
12933
|
<div class={clsx(styles().detailsHeader, "tsqd-query-details-header")}>Data Explorer</div>
|
|
12907
12934
|
<div
|
|
12908
12935
|
style={{
|
|
12909
|
-
padding:
|
|
12936
|
+
padding: tokens.size[2]
|
|
12910
12937
|
}}
|
|
12911
12938
|
class="tsqd-query-details-explorer-container tsqd-query-details-data-explorer"
|
|
12912
12939
|
><Explorer
|
|
@@ -12919,7 +12946,7 @@ var QueryDetails = () => {
|
|
|
12919
12946
|
<div class={clsx(styles().detailsHeader, "tsqd-query-details-header")}>Query Explorer</div>
|
|
12920
12947
|
<div
|
|
12921
12948
|
style={{
|
|
12922
|
-
padding:
|
|
12949
|
+
padding: tokens.size[2]
|
|
12923
12950
|
}}
|
|
12924
12951
|
class="tsqd-query-details-explorer-container tsqd-query-details-query-explorer"
|
|
12925
12952
|
><Explorer
|
|
@@ -13010,7 +13037,7 @@ var MutationDetails = () => {
|
|
|
13010
13037
|
<div class={clsx(styles().detailsHeader, "tsqd-query-details-header")}>Variables Details</div>
|
|
13011
13038
|
<div
|
|
13012
13039
|
style={{
|
|
13013
|
-
padding:
|
|
13040
|
+
padding: tokens.size[2]
|
|
13014
13041
|
}}
|
|
13015
13042
|
class="tsqd-query-details-explorer-container tsqd-query-details-query-explorer"
|
|
13016
13043
|
><Explorer
|
|
@@ -13021,7 +13048,7 @@ var MutationDetails = () => {
|
|
|
13021
13048
|
<div class={clsx(styles().detailsHeader, "tsqd-query-details-header")}>Context Details</div>
|
|
13022
13049
|
<div
|
|
13023
13050
|
style={{
|
|
13024
|
-
padding:
|
|
13051
|
+
padding: tokens.size[2]
|
|
13025
13052
|
}}
|
|
13026
13053
|
class="tsqd-query-details-explorer-container tsqd-query-details-query-explorer"
|
|
13027
13054
|
><Explorer
|
|
@@ -13032,7 +13059,7 @@ var MutationDetails = () => {
|
|
|
13032
13059
|
<div class={clsx(styles().detailsHeader, "tsqd-query-details-header")}>Data Explorer</div>
|
|
13033
13060
|
<div
|
|
13034
13061
|
style={{
|
|
13035
|
-
padding:
|
|
13062
|
+
padding: tokens.size[2]
|
|
13036
13063
|
}}
|
|
13037
13064
|
class="tsqd-query-details-explorer-container tsqd-query-details-query-explorer"
|
|
13038
13065
|
><Explorer
|
|
@@ -13043,7 +13070,7 @@ var MutationDetails = () => {
|
|
|
13043
13070
|
<div class={clsx(styles().detailsHeader, "tsqd-query-details-header")}>Mutations Explorer</div>
|
|
13044
13071
|
<div
|
|
13045
13072
|
style={{
|
|
13046
|
-
padding:
|
|
13073
|
+
padding: tokens.size[2]
|
|
13047
13074
|
}}
|
|
13048
13075
|
class="tsqd-query-details-explorer-container tsqd-query-details-query-explorer"
|
|
13049
13076
|
><Explorer
|
|
@@ -13216,7 +13243,7 @@ var stylesFactory2 = (theme) => {
|
|
|
13216
13243
|
right: 0;
|
|
13217
13244
|
left: 0;
|
|
13218
13245
|
max-height: 90%;
|
|
13219
|
-
min-height:
|
|
13246
|
+
min-height: ${size2[14]};
|
|
13220
13247
|
border-bottom: ${t2(colors.gray[400], colors.darkGray[300])} 1px solid;
|
|
13221
13248
|
`,
|
|
13222
13249
|
"panel-position-bottom": u`
|
|
@@ -13224,7 +13251,7 @@ var stylesFactory2 = (theme) => {
|
|
|
13224
13251
|
right: 0;
|
|
13225
13252
|
left: 0;
|
|
13226
13253
|
max-height: 90%;
|
|
13227
|
-
min-height:
|
|
13254
|
+
min-height: ${size2[14]};
|
|
13228
13255
|
border-top: ${t2(colors.gray[400], colors.darkGray[300])} 1px solid;
|
|
13229
13256
|
`,
|
|
13230
13257
|
"panel-position-right": u`
|
|
@@ -13556,6 +13583,8 @@ var stylesFactory2 = (theme) => {
|
|
|
13556
13583
|
outline: 2px solid ${colors.blue[800]};
|
|
13557
13584
|
}
|
|
13558
13585
|
& svg {
|
|
13586
|
+
width: ${tokens.size[3]};
|
|
13587
|
+
height: ${tokens.size[3]};
|
|
13559
13588
|
color: ${t2(colors.gray[500], colors.gray[400])};
|
|
13560
13589
|
}
|
|
13561
13590
|
}
|
|
@@ -13641,8 +13670,8 @@ var stylesFactory2 = (theme) => {
|
|
|
13641
13670
|
border-radius: ${tokens.border.radius.sm};
|
|
13642
13671
|
background-color: ${t2(colors.gray[100], colors.darkGray[400])};
|
|
13643
13672
|
border: 1px solid ${t2(colors.gray[300], colors.darkGray[200])};
|
|
13644
|
-
width:
|
|
13645
|
-
height:
|
|
13673
|
+
width: ${tokens.size[6.5]};
|
|
13674
|
+
height: ${tokens.size[6.5]};
|
|
13646
13675
|
justify-content: center;
|
|
13647
13676
|
display: flex;
|
|
13648
13677
|
align-items: center;
|