@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.
@@ -8737,35 +8737,35 @@ var tokens = {
8737
8737
  },
8738
8738
  font: {
8739
8739
  size: {
8740
- "2xs": "0.625rem",
8741
- xs: "0.75rem",
8742
- sm: "0.875rem",
8743
- md: "1rem",
8744
- lg: "1.125rem",
8745
- xl: "1.25rem",
8746
- "2xl": "1.5rem",
8747
- "3xl": "1.875rem",
8748
- "4xl": "2.25rem",
8749
- "5xl": "3rem",
8750
- "6xl": "3.75rem",
8751
- "7xl": "4.5rem",
8752
- "8xl": "6rem",
8753
- "9xl": "8rem"
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: "1rem",
8757
- sm: "1.25rem",
8758
- md: "1.5rem",
8759
- lg: "1.75rem",
8760
- xl: "1.75rem",
8761
- "2xl": "2rem",
8762
- "3xl": "2.25rem",
8763
- "4xl": "2.5rem",
8764
- "5xl": "1",
8765
- "6xl": "1",
8766
- "7xl": "1",
8767
- "8xl": "1",
8768
- "9xl": "1"
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.125rem",
8794
- sm: "0.25rem",
8795
- md: "0.375rem",
8796
- lg: "0.5rem",
8797
- xl: "0.75rem",
8798
- "2xl": "1rem",
8799
- "3xl": "1.5rem",
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.0625rem",
8806
- 0.5: "0.125rem",
8807
- 1: "0.25rem",
8808
- 1.5: "0.375rem",
8809
- 2: "0.5rem",
8810
- 2.5: "0.625rem",
8811
- 3: "0.75rem",
8812
- 3.5: "0.875rem",
8813
- 4: "1rem",
8814
- 4.5: "1.125rem",
8815
- 5: "1.25rem",
8816
- 5.5: "1.375rem",
8817
- 6: "1.5rem",
8818
- 6.5: "1.625rem",
8819
- 7: "1.75rem",
8820
- 8: "2rem",
8821
- 9: "2.25rem",
8822
- 10: "2.5rem",
8823
- 11: "2.75rem",
8824
- 12: "3rem",
8825
- 14: "3.5rem",
8826
- 16: "4rem",
8827
- 20: "5rem",
8828
- 24: "6rem",
8829
- 28: "7rem",
8830
- 32: "8rem",
8831
- 36: "9rem",
8832
- 40: "10rem",
8833
- 44: "11rem",
8834
- 48: "12rem",
8835
- 52: "13rem",
8836
- 56: "14rem",
8837
- 60: "15rem",
8838
- 64: "16rem",
8839
- 72: "18rem",
8840
- 80: "20rem",
8841
- 96: "24rem"
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: {
@@ -11505,8 +11505,8 @@ var stylesFactory = (theme) => {
11505
11505
  expanderButtonContainer: u`
11506
11506
  display: flex;
11507
11507
  align-items: center;
11508
- line-height: 1.125rem;
11509
- min-height: 1.125rem;
11508
+ line-height: ${size2[4]};
11509
+ min-height: ${size2[4]};
11510
11510
  gap: ${size2[2]};
11511
11511
  `,
11512
11512
  expanderButton: u`
@@ -11514,7 +11514,7 @@ var stylesFactory = (theme) => {
11514
11514
  color: inherit;
11515
11515
  font: inherit;
11516
11516
  outline: inherit;
11517
- height: 1rem;
11517
+ height: ${size2[5]};
11518
11518
  background: transparent;
11519
11519
  border: none;
11520
11520
  padding: 0;
@@ -11556,8 +11556,8 @@ var stylesFactory = (theme) => {
11556
11556
  display: inline-flex;
11557
11557
  gap: ${size2[2]};
11558
11558
  width: 100%;
11559
- margin-bottom: ${size2[0.5]};
11560
- line-height: 1.125rem;
11559
+ margin: ${size2[0.25]} 0px;
11560
+ line-height: ${size2[4.5]};
11561
11561
  align-items: center;
11562
11562
  `,
11563
11563
  editableInput: u`
@@ -11657,8 +11657,9 @@ var Devtools = (props) => {
11657
11657
  const position = createMemo(() => {
11658
11658
  return props.localStore.position || useQueryDevtoolsContext().position || POSITION;
11659
11659
  });
11660
+ let transitionsContainerRef;
11660
11661
  createEffect(() => {
11661
- const root = document.querySelector(".tsqd-parent-container");
11662
+ const root = transitionsContainerRef.parentElement;
11662
11663
  const height = props.localStore.height || DEFAULT_HEIGHT;
11663
11664
  const width = props.localStore.width || DEFAULT_WIDTH;
11664
11665
  const panelPosition = position();
@@ -11671,6 +11672,18 @@ var Devtools = (props) => {
11671
11672
  `${panelPosition === "left" ? "-" : ""}${width}px`
11672
11673
  );
11673
11674
  });
11675
+ onMount(() => {
11676
+ const onFocus = () => {
11677
+ const root = transitionsContainerRef.parentElement;
11678
+ const fontSize = getComputedStyle(root).fontSize;
11679
+ root.style.setProperty("--tsqd-font-size", fontSize);
11680
+ };
11681
+ onFocus();
11682
+ window.addEventListener("focus", onFocus);
11683
+ onCleanup(() => {
11684
+ window.removeEventListener("focus", onFocus);
11685
+ });
11686
+ });
11674
11687
  return <div
11675
11688
  class={clsx(
11676
11689
  u`
@@ -11696,6 +11709,7 @@ var Devtools = (props) => {
11696
11709
  `,
11697
11710
  "tsqd-transitions-container"
11698
11711
  )}
11712
+ ref={transitionsContainerRef}
11699
11713
  >
11700
11714
  <TransitionGroup name="tsqd-panel-transition"><Show when={isOpen()}><DevtoolsPanel
11701
11715
  localStore={props.localStore}
@@ -11862,6 +11876,7 @@ var DevtoolsPanel = (props) => {
11862
11876
  var ContentView = (props) => {
11863
11877
  setupQueryCacheSubscription();
11864
11878
  setupMutationCacheSubscription();
11879
+ let containerRef;
11865
11880
  const theme = useTheme();
11866
11881
  const styles = createMemo(() => {
11867
11882
  return theme() === "dark" ? darkStyles2 : lightStyles2;
@@ -11939,6 +11954,11 @@ var ContentView = (props) => {
11939
11954
  const setDevtoolsPosition = (pos) => {
11940
11955
  props.setLocalStore("position", pos);
11941
11956
  };
11957
+ const setComputedVariables = (el) => {
11958
+ const computedStyle = getComputedStyle(containerRef);
11959
+ const variable = computedStyle.getPropertyValue("--tsqd-font-size");
11960
+ el.style.setProperty("--tsqd-font-size", variable);
11961
+ };
11942
11962
  return <>
11943
11963
  <div
11944
11964
  class={clsx(
@@ -11949,6 +11969,7 @@ var ContentView = (props) => {
11949
11969
  `,
11950
11970
  "tsqd-queries-container"
11951
11971
  )}
11972
+ ref={containerRef}
11952
11973
  >
11953
11974
  <div class={clsx(styles().row, "tsqd-header")}>
11954
11975
  <div class={styles().logoAndToggleContainer}>
@@ -12119,7 +12140,9 @@ var ContentView = (props) => {
12119
12140
  "tsqd-action-settings"
12120
12141
  )}
12121
12142
  ><Settings /></index$d.Trigger>
12122
- <index$d.Portal><index$d.Content
12143
+ <index$d.Portal
12144
+ ref={(el) => setComputedVariables(el)}
12145
+ ><index$d.Content
12123
12146
  class={clsx(styles().settingsMenu, "tsqd-settings-menu")}
12124
12147
  >
12125
12148
  <div
@@ -12139,7 +12162,9 @@ var ContentView = (props) => {
12139
12162
  <span>Position</span>
12140
12163
  <ChevronDown />
12141
12164
  </index$d.SubTrigger>
12142
- <index$d.Portal><index$d.SubContent
12165
+ <index$d.Portal
12166
+ ref={(el) => setComputedVariables(el)}
12167
+ ><index$d.SubContent
12143
12168
  class={clsx(
12144
12169
  styles().settingsMenu,
12145
12170
  "tsqd-settings-submenu"
@@ -12214,7 +12239,9 @@ var ContentView = (props) => {
12214
12239
  <span>Theme</span>
12215
12240
  <ChevronDown />
12216
12241
  </index$d.SubTrigger>
12217
- <index$d.Portal><index$d.SubContent
12242
+ <index$d.Portal
12243
+ ref={(el) => setComputedVariables(el)}
12244
+ ><index$d.SubContent
12218
12245
  class={clsx(
12219
12246
  styles().settingsMenu,
12220
12247
  "tsqd-settings-submenu"
@@ -12904,7 +12931,7 @@ var QueryDetails = () => {
12904
12931
  <div class={clsx(styles().detailsHeader, "tsqd-query-details-header")}>Data Explorer</div>
12905
12932
  <div
12906
12933
  style={{
12907
- padding: "0.5rem"
12934
+ padding: tokens.size[2]
12908
12935
  }}
12909
12936
  class="tsqd-query-details-explorer-container tsqd-query-details-data-explorer"
12910
12937
  ><Explorer
@@ -12917,7 +12944,7 @@ var QueryDetails = () => {
12917
12944
  <div class={clsx(styles().detailsHeader, "tsqd-query-details-header")}>Query Explorer</div>
12918
12945
  <div
12919
12946
  style={{
12920
- padding: "0.5rem"
12947
+ padding: tokens.size[2]
12921
12948
  }}
12922
12949
  class="tsqd-query-details-explorer-container tsqd-query-details-query-explorer"
12923
12950
  ><Explorer
@@ -13008,7 +13035,7 @@ var MutationDetails = () => {
13008
13035
  <div class={clsx(styles().detailsHeader, "tsqd-query-details-header")}>Variables Details</div>
13009
13036
  <div
13010
13037
  style={{
13011
- padding: "0.5rem"
13038
+ padding: tokens.size[2]
13012
13039
  }}
13013
13040
  class="tsqd-query-details-explorer-container tsqd-query-details-query-explorer"
13014
13041
  ><Explorer
@@ -13019,7 +13046,7 @@ var MutationDetails = () => {
13019
13046
  <div class={clsx(styles().detailsHeader, "tsqd-query-details-header")}>Context Details</div>
13020
13047
  <div
13021
13048
  style={{
13022
- padding: "0.5rem"
13049
+ padding: tokens.size[2]
13023
13050
  }}
13024
13051
  class="tsqd-query-details-explorer-container tsqd-query-details-query-explorer"
13025
13052
  ><Explorer
@@ -13030,7 +13057,7 @@ var MutationDetails = () => {
13030
13057
  <div class={clsx(styles().detailsHeader, "tsqd-query-details-header")}>Data Explorer</div>
13031
13058
  <div
13032
13059
  style={{
13033
- padding: "0.5rem"
13060
+ padding: tokens.size[2]
13034
13061
  }}
13035
13062
  class="tsqd-query-details-explorer-container tsqd-query-details-query-explorer"
13036
13063
  ><Explorer
@@ -13041,7 +13068,7 @@ var MutationDetails = () => {
13041
13068
  <div class={clsx(styles().detailsHeader, "tsqd-query-details-header")}>Mutations Explorer</div>
13042
13069
  <div
13043
13070
  style={{
13044
- padding: "0.5rem"
13071
+ padding: tokens.size[2]
13045
13072
  }}
13046
13073
  class="tsqd-query-details-explorer-container tsqd-query-details-query-explorer"
13047
13074
  ><Explorer
@@ -13214,7 +13241,7 @@ var stylesFactory2 = (theme) => {
13214
13241
  right: 0;
13215
13242
  left: 0;
13216
13243
  max-height: 90%;
13217
- min-height: 3.5rem;
13244
+ min-height: ${size2[14]};
13218
13245
  border-bottom: ${t2(colors.gray[400], colors.darkGray[300])} 1px solid;
13219
13246
  `,
13220
13247
  "panel-position-bottom": u`
@@ -13222,7 +13249,7 @@ var stylesFactory2 = (theme) => {
13222
13249
  right: 0;
13223
13250
  left: 0;
13224
13251
  max-height: 90%;
13225
- min-height: 3.5rem;
13252
+ min-height: ${size2[14]};
13226
13253
  border-top: ${t2(colors.gray[400], colors.darkGray[300])} 1px solid;
13227
13254
  `,
13228
13255
  "panel-position-right": u`
@@ -13554,6 +13581,8 @@ var stylesFactory2 = (theme) => {
13554
13581
  outline: 2px solid ${colors.blue[800]};
13555
13582
  }
13556
13583
  & svg {
13584
+ width: ${tokens.size[3]};
13585
+ height: ${tokens.size[3]};
13557
13586
  color: ${t2(colors.gray[500], colors.gray[400])};
13558
13587
  }
13559
13588
  }
@@ -13639,8 +13668,8 @@ var stylesFactory2 = (theme) => {
13639
13668
  border-radius: ${tokens.border.radius.sm};
13640
13669
  background-color: ${t2(colors.gray[100], colors.darkGray[400])};
13641
13670
  border: 1px solid ${t2(colors.gray[300], colors.darkGray[200])};
13642
- width: 1.625rem;
13643
- height: 1.625rem;
13671
+ width: ${tokens.size[6.5]};
13672
+ height: ${tokens.size[6.5]};
13644
13673
  justify-content: center;
13645
13674
  display: flex;
13646
13675
  align-items: center;