@tanstack/query-devtools 5.0.0-rc.10 → 5.0.0-rc.13

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.
@@ -9477,6 +9477,19 @@ var sortFns = {
9477
9477
  var convertRemToPixels = (rem) => {
9478
9478
  return rem * parseFloat(getComputedStyle(document.documentElement).fontSize);
9479
9479
  };
9480
+ var getPreferredColorScheme = () => {
9481
+ const [colorScheme, setColorScheme] = createSignal("dark");
9482
+ onMount(() => {
9483
+ const query = window.matchMedia("(prefers-color-scheme: dark)");
9484
+ setColorScheme(query.matches ? "dark" : "light");
9485
+ const listener = (e2) => {
9486
+ setColorScheme(e2.matches ? "dark" : "light");
9487
+ };
9488
+ query.addEventListener("change", listener);
9489
+ onCleanup(() => query.removeEventListener("change", listener));
9490
+ });
9491
+ return colorScheme;
9492
+ };
9480
9493
  var updateNestedDataByPath = (oldData, updatePath2, value) => {
9481
9494
  if (updatePath2.length === 0) {
9482
9495
  return value;
@@ -9568,7 +9581,7 @@ function Search() {
9568
9581
  xmlns="http://www.w3.org/2000/svg"
9569
9582
  ><path
9570
9583
  d="M13 13L9.00007 9M10.3333 5.66667C10.3333 8.244 8.244 10.3333 5.66667 10.3333C3.08934 10.3333 1 8.244 1 5.66667C1 3.08934 3.08934 1 5.66667 1C8.244 1 10.3333 3.08934 10.3333 5.66667Z"
9571
- stroke="#98A2B3"
9584
+ stroke="currentColor"
9572
9585
  stroke-width="1.66667"
9573
9586
  stroke-linecap="round"
9574
9587
  stroke-linejoin="round"
@@ -9583,8 +9596,8 @@ function Trash() {
9583
9596
  xmlns="http://www.w3.org/2000/svg"
9584
9597
  ><path
9585
9598
  d="M9 3H15M3 6H21M19 6L18.2987 16.5193C18.1935 18.0975 18.1409 18.8867 17.8 19.485C17.4999 20.0118 17.0472 20.4353 16.5017 20.6997C15.882 21 15.0911 21 13.5093 21H10.4907C8.90891 21 8.11803 21 7.49834 20.6997C6.95276 20.4353 6.50009 20.0118 6.19998 19.485C5.85911 18.8867 5.8065 18.0975 5.70129 16.5193L5 6M10 10.5V15.5M14 10.5V15.5"
9586
- stroke="#d0d5dd"
9587
- stroke-width="1.66667"
9599
+ stroke="currentColor"
9600
+ stroke-width="2"
9588
9601
  stroke-linecap="round"
9589
9602
  stroke-linejoin="round"
9590
9603
  /></svg>;
@@ -9598,7 +9611,7 @@ function ChevronDown() {
9598
9611
  xmlns="http://www.w3.org/2000/svg"
9599
9612
  ><path
9600
9613
  d="M1 1L5 5L9 1"
9601
- stroke="#98A2B3"
9614
+ stroke="currentColor"
9602
9615
  stroke-width="1.66667"
9603
9616
  stroke-linecap="round"
9604
9617
  stroke-linejoin="round"
@@ -9613,7 +9626,7 @@ function ArrowUp() {
9613
9626
  xmlns="http://www.w3.org/2000/svg"
9614
9627
  ><path
9615
9628
  d="M8 13.3333V2.66667M8 2.66667L4 6.66667M8 2.66667L12 6.66667"
9616
- stroke="#98A2B3"
9629
+ stroke="currentColor"
9617
9630
  stroke-width="1.66667"
9618
9631
  stroke-linecap="round"
9619
9632
  stroke-linejoin="round"
@@ -9628,7 +9641,7 @@ function ArrowDown() {
9628
9641
  xmlns="http://www.w3.org/2000/svg"
9629
9642
  ><path
9630
9643
  d="M8 2.66667V13.3333M8 13.3333L4 9.33333M8 13.3333L12 9.33333"
9631
- stroke="#98A2B3"
9644
+ stroke="currentColor"
9632
9645
  stroke-width="1.66667"
9633
9646
  stroke-linecap="round"
9634
9647
  stroke-linejoin="round"
@@ -9646,7 +9659,7 @@ function ArrowLeft() {
9646
9659
  }}
9647
9660
  ><path
9648
9661
  d="M8 2.66667V13.3333M8 13.3333L4 9.33333M8 13.3333L12 9.33333"
9649
- stroke="#98A2B3"
9662
+ stroke="currentColor"
9650
9663
  stroke-width="1.66667"
9651
9664
  stroke-linecap="round"
9652
9665
  stroke-linejoin="round"
@@ -9664,16 +9677,61 @@ function ArrowRight() {
9664
9677
  }}
9665
9678
  ><path
9666
9679
  d="M8 2.66667V13.3333M8 13.3333L4 9.33333M8 13.3333L12 9.33333"
9667
- stroke="#98A2B3"
9680
+ stroke="currentColor"
9668
9681
  stroke-width="1.66667"
9669
9682
  stroke-linecap="round"
9670
9683
  stroke-linejoin="round"
9671
9684
  /></svg>;
9672
9685
  }
9686
+ function Sun() {
9687
+ return <svg
9688
+ viewBox="0 0 24 24"
9689
+ height="12"
9690
+ width="12"
9691
+ fill="none"
9692
+ xmlns="http://www.w3.org/2000/svg"
9693
+ ><path
9694
+ d="M12 2v2m0 16v2M4 12H2m4.314-5.686L4.9 4.9m12.786 1.414L19.1 4.9M6.314 17.69 4.9 19.104m12.786-1.414 1.414 1.414M22 12h-2m-3 0a5 5 0 1 1-10 0 5 5 0 0 1 10 0Z"
9695
+ stroke="currentColor"
9696
+ stroke-width="2"
9697
+ stroke-linecap="round"
9698
+ stroke-linejoin="round"
9699
+ /></svg>;
9700
+ }
9701
+ function Moon() {
9702
+ return <svg
9703
+ viewBox="0 0 24 24"
9704
+ height="12"
9705
+ width="12"
9706
+ fill="none"
9707
+ xmlns="http://www.w3.org/2000/svg"
9708
+ ><path
9709
+ d="M22 15.844a10.424 10.424 0 0 1-4.306.925c-5.779 0-10.463-4.684-10.463-10.462 0-1.536.33-2.994.925-4.307A10.464 10.464 0 0 0 2 11.538C2 17.316 6.684 22 12.462 22c4.243 0 7.896-2.526 9.538-6.156Z"
9710
+ stroke="currentColor"
9711
+ stroke-width="2"
9712
+ stroke-linecap="round"
9713
+ stroke-linejoin="round"
9714
+ /></svg>;
9715
+ }
9716
+ function Monitor() {
9717
+ return <svg
9718
+ viewBox="0 0 24 24"
9719
+ height="12"
9720
+ width="12"
9721
+ fill="none"
9722
+ xmlns="http://www.w3.org/2000/svg"
9723
+ ><path
9724
+ d="M8 21h8m-4-4v4m-5.2-4h10.4c1.68 0 2.52 0 3.162-.327a3 3 0 0 0 1.311-1.311C22 14.72 22 13.88 22 12.2V7.8c0-1.68 0-2.52-.327-3.162a3 3 0 0 0-1.311-1.311C19.72 3 18.88 3 17.2 3H6.8c-1.68 0-2.52 0-3.162.327a3 3 0 0 0-1.311 1.311C2 5.28 2 6.12 2 7.8v4.4c0 1.68 0 2.52.327 3.162a3 3 0 0 0 1.311 1.311C4.28 17 5.12 17 6.8 17Z"
9725
+ stroke="currentColor"
9726
+ stroke-width="2"
9727
+ stroke-linecap="round"
9728
+ stroke-linejoin="round"
9729
+ /></svg>;
9730
+ }
9673
9731
  function Wifi() {
9674
9732
  return <svg
9675
- stroke="#d0d5dd"
9676
- fill="#d0d5dd"
9733
+ stroke="currentColor"
9734
+ fill="currentColor"
9677
9735
  stroke-width="0"
9678
9736
  viewBox="0 0 24 24"
9679
9737
  height="1em"
@@ -9686,8 +9744,6 @@ function Wifi() {
9686
9744
  }
9687
9745
  function Offline() {
9688
9746
  return <svg
9689
- stroke={tokens.colors.yellow[500]}
9690
- fill={tokens.colors.yellow[500]}
9691
9747
  stroke-width="0"
9692
9748
  viewBox="0 0 24 24"
9693
9749
  height="1em"
@@ -9711,14 +9767,14 @@ function Settings() {
9711
9767
  >
9712
9768
  <path
9713
9769
  d="M9.3951 19.3711L9.97955 20.6856C10.1533 21.0768 10.4368 21.4093 10.7958 21.6426C11.1547 21.8759 11.5737 22.0001 12.0018 22C12.4299 22.0001 12.8488 21.8759 13.2078 21.6426C13.5667 21.4093 13.8503 21.0768 14.024 20.6856L14.6084 19.3711C14.8165 18.9047 15.1664 18.5159 15.6084 18.26C16.0532 18.0034 16.5678 17.8941 17.0784 17.9478L18.5084 18.1C18.9341 18.145 19.3637 18.0656 19.7451 17.8713C20.1265 17.6771 20.4434 17.3763 20.6573 17.0056C20.8715 16.635 20.9735 16.2103 20.9511 15.7829C20.9286 15.3555 20.7825 14.9438 20.5307 14.5978L19.684 13.4344C19.3825 13.0171 19.2214 12.5148 19.224 12C19.2239 11.4866 19.3865 10.9864 19.6884 10.5711L20.5351 9.40778C20.787 9.06175 20.933 8.65007 20.9555 8.22267C20.978 7.79528 20.8759 7.37054 20.6618 7C20.4479 6.62923 20.131 6.32849 19.7496 6.13423C19.3681 5.93997 18.9386 5.86053 18.5129 5.90556L17.0829 6.05778C16.5722 6.11141 16.0577 6.00212 15.6129 5.74556C15.17 5.48825 14.82 5.09736 14.6129 4.62889L14.024 3.31444C13.8503 2.92317 13.5667 2.59072 13.2078 2.3574C12.8488 2.12408 12.4299 1.99993 12.0018 2C11.5737 1.99993 11.1547 2.12408 10.7958 2.3574C10.4368 2.59072 10.1533 2.92317 9.97955 3.31444L9.3951 4.62889C9.18803 5.09736 8.83798 5.48825 8.3951 5.74556C7.95032 6.00212 7.43577 6.11141 6.9251 6.05778L5.49066 5.90556C5.06499 5.86053 4.6354 5.93997 4.25397 6.13423C3.87255 6.32849 3.55567 6.62923 3.34177 7C3.12759 7.37054 3.02555 7.79528 3.04804 8.22267C3.07052 8.65007 3.21656 9.06175 3.46844 9.40778L4.3151 10.5711C4.61704 10.9864 4.77964 11.4866 4.77955 12C4.77964 12.5134 4.61704 13.0137 4.3151 13.4289L3.46844 14.5922C3.21656 14.9382 3.07052 15.3499 3.04804 15.7773C3.02555 16.2047 3.12759 16.6295 3.34177 17C3.55589 17.3706 3.8728 17.6712 4.25417 17.8654C4.63554 18.0596 5.06502 18.1392 5.49066 18.0944L6.92066 17.9422C7.43133 17.8886 7.94587 17.9979 8.39066 18.2544C8.83519 18.511 9.18687 18.902 9.3951 19.3711Z"
9714
- stroke="#d0d5dd"
9770
+ stroke="currentColor"
9715
9771
  stroke-width="2"
9716
9772
  stroke-linecap="round"
9717
9773
  stroke-linejoin="round"
9718
9774
  />
9719
9775
  <path
9720
9776
  d="M12 15C13.6568 15 15 13.6569 15 12C15 10.3431 13.6568 9 12 9C10.3431 9 8.99998 10.3431 8.99998 12C8.99998 13.6569 10.3431 15 12 15Z"
9721
- stroke="#d0d5dd"
9777
+ stroke="currentColor"
9722
9778
  stroke-width="2"
9723
9779
  stroke-linecap="round"
9724
9780
  stroke-linejoin="round"
@@ -9738,10 +9794,10 @@ function Copier() {
9738
9794
  stroke-width="2"
9739
9795
  stroke-linecap="round"
9740
9796
  stroke-linejoin="round"
9741
- stroke="#98A2B3"
9797
+ stroke="currentColor"
9742
9798
  /></svg>;
9743
9799
  }
9744
- function CopiedCopier() {
9800
+ function CopiedCopier(props) {
9745
9801
  return <svg
9746
9802
  width="24"
9747
9803
  height="24"
@@ -9750,7 +9806,7 @@ function CopiedCopier() {
9750
9806
  xmlns="http://www.w3.org/2000/svg"
9751
9807
  ><path
9752
9808
  d="M7.5 12L10.5 15L16.5 9M7.8 21H16.2C17.8802 21 18.7202 21 19.362 20.673C19.9265 20.3854 20.3854 19.9265 20.673 19.362C21 18.7202 21 17.8802 21 16.2V7.8C21 6.11984 21 5.27976 20.673 4.63803C20.3854 4.07354 19.9265 3.6146 19.362 3.32698C18.7202 3 17.8802 3 16.2 3H7.8C6.11984 3 5.27976 3 4.63803 3.32698C4.07354 3.6146 3.6146 4.07354 3.32698 4.63803C3 5.27976 3 6.11984 3 7.8V16.2C3 17.8802 3 18.7202 3.32698 19.362C3.6146 19.9265 4.07354 20.3854 4.63803 20.673C5.27976 21 6.11984 21 7.8 21Z"
9753
- stroke="#12B76A"
9809
+ stroke={props.theme === "dark" ? "#12B76A" : "#027A48"}
9754
9810
  stroke-width="2"
9755
9811
  stroke-linecap="round"
9756
9812
  stroke-linejoin="round"
@@ -9777,7 +9833,7 @@ function List() {
9777
9833
  height="24"
9778
9834
  viewBox="0 0 24 24"
9779
9835
  fill="none"
9780
- stroke="#98A2B3"
9836
+ stroke="currentColor"
9781
9837
  stroke-width="2"
9782
9838
  xmlns="http://www.w3.org/2000/svg"
9783
9839
  >
@@ -9788,35 +9844,34 @@ function List() {
9788
9844
  </svg>;
9789
9845
  }
9790
9846
  function Check(props) {
9791
- return <svg
9792
- width="24"
9793
- height="24"
9794
- viewBox="0 0 24 24"
9795
- fill="none"
9796
- stroke="#98A2B3"
9797
- stroke-width="2"
9798
- xmlns="http://www.w3.org/2000/svg"
9799
- >
9800
- <rect x="2" y="2" width="20" height="20" rx="2" class="check" />
9801
- {props.checked && <g>
9802
- <line
9803
- transform="rotate(45 7.18873 14.6316)"
9804
- x1="3.56453"
9805
- y1="14.63158"
9806
- x2="10.81294"
9807
- y2="14.63158"
9808
- class="check"
9809
- />
9810
- <line
9811
- transform="rotate(-45 13.9674 11.5826)"
9812
- x1="6.02012"
9813
- y1="11.58263"
9814
- x2="21.91469"
9815
- y2="11.58263"
9816
- class="check"
9817
- />
9818
- </g>}
9819
- </svg>;
9847
+ return <>
9848
+ <Show when={props.checked}><svg
9849
+ width="24"
9850
+ height="24"
9851
+ viewBox="0 0 24 24"
9852
+ fill="none"
9853
+ xmlns="http://www.w3.org/2000/svg"
9854
+ ><path
9855
+ d="M7.5 12L10.5 15L16.5 9M7.8 21H16.2C17.8802 21 18.7202 21 19.362 20.673C19.9265 20.3854 20.3854 19.9265 20.673 19.362C21 18.7202 21 17.8802 21 16.2V7.8C21 6.11984 21 5.27976 20.673 4.63803C20.3854 4.07354 19.9265 3.6146 19.362 3.32698C18.7202 3 17.8802 3 16.2 3H7.8C6.11984 3 5.27976 3 4.63803 3.32698C4.07354 3.6146 3.6146 4.07354 3.32698 4.63803C3 5.27976 3 6.11984 3 7.8V16.2C3 17.8802 3 18.7202 3.32698 19.362C3.6146 19.9265 4.07354 20.3854 4.63803 20.673C5.27976 21 6.11984 21 7.8 21Z"
9856
+ stroke={props.theme === "dark" ? "#9B8AFB" : "#6938EF"}
9857
+ stroke-width="2"
9858
+ stroke-linecap="round"
9859
+ stroke-linejoin="round"
9860
+ /></svg></Show>
9861
+ <Show when={!props.checked}><svg
9862
+ viewBox="0 0 24 24"
9863
+ height="20"
9864
+ width="20"
9865
+ fill="none"
9866
+ xmlns="http://www.w3.org/2000/svg"
9867
+ ><path
9868
+ d="M3 7.8c0-1.68 0-2.52.327-3.162a3 3 0 0 1 1.311-1.311C5.28 3 6.12 3 7.8 3h8.4c1.68 0 2.52 0 3.162.327a3 3 0 0 1 1.311 1.311C21 5.28 21 6.12 21 7.8v8.4c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C18.72 21 17.88 21 16.2 21H7.8c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C3 18.72 3 17.88 3 16.2V7.8Z"
9869
+ stroke={props.theme === "dark" ? "#9B8AFB" : "#6938EF"}
9870
+ stroke-width="2"
9871
+ stroke-linecap="round"
9872
+ stroke-linejoin="round"
9873
+ /></svg></Show>
9874
+ </>;
9820
9875
  }
9821
9876
  function TanstackLogo() {
9822
9877
  return <svg version="1.0" viewBox="0 0 633 633">
@@ -10544,6 +10599,12 @@ var QueryDevtoolsContext = createContext({
10544
10599
  function useQueryDevtoolsContext() {
10545
10600
  return useContext(QueryDevtoolsContext);
10546
10601
  }
10602
+ var ThemeContext = createContext(
10603
+ () => "dark"
10604
+ );
10605
+ function useTheme() {
10606
+ return useContext(ThemeContext);
10607
+ }
10547
10608
 
10548
10609
  // src/Explorer.tsx
10549
10610
  function chunkArray(array, size2) {
@@ -10558,10 +10619,13 @@ function chunkArray(array, size2) {
10558
10619
  return result;
10559
10620
  }
10560
10621
  var Expander = (props) => {
10561
- const styles = getStyles();
10622
+ const theme = useTheme();
10623
+ const styles = createMemo(() => {
10624
+ return theme() === "dark" ? darkStyles : lightStyles;
10625
+ });
10562
10626
  return <span
10563
10627
  class={clsx(
10564
- styles.expander,
10628
+ styles().expander,
10565
10629
  u`
10566
10630
  transform: rotate(${props.expanded ? 90 : 0}deg);
10567
10631
  `,
@@ -10585,10 +10649,13 @@ var Expander = (props) => {
10585
10649
  /></svg></span>;
10586
10650
  };
10587
10651
  var CopyButton = (props) => {
10588
- const styles = getStyles();
10652
+ const theme = useTheme();
10653
+ const styles = createMemo(() => {
10654
+ return theme() === "dark" ? darkStyles : lightStyles;
10655
+ });
10589
10656
  const [copyState, setCopyState] = createSignal("NoCopy");
10590
10657
  return <button
10591
- class={styles.actionButton}
10658
+ class={styles().actionButton}
10592
10659
  title="Copy object to clipboard"
10593
10660
  aria-label={`${copyState() === "NoCopy" ? "Copy object to clipboard" : copyState() === "SuccessCopy" ? "Object copied to clipboard" : "Error copying object to clipboard"}`}
10594
10661
  onClick={copyState() === "NoCopy" ? () => {
@@ -10609,15 +10676,18 @@ var CopyButton = (props) => {
10609
10676
  } : void 0}
10610
10677
  ><Switch>
10611
10678
  <Match when={copyState() === "NoCopy"}><Copier /></Match>
10612
- <Match when={copyState() === "SuccessCopy"}><CopiedCopier /></Match>
10679
+ <Match when={copyState() === "SuccessCopy"}><CopiedCopier theme={theme()} /></Match>
10613
10680
  <Match when={copyState() === "ErrorCopy"}><ErrorCopier /></Match>
10614
10681
  </Switch></button>;
10615
10682
  };
10616
10683
  var ClearArrayButton = (props) => {
10617
- const styles = getStyles();
10684
+ const theme = useTheme();
10685
+ const styles = createMemo(() => {
10686
+ return theme() === "dark" ? darkStyles : lightStyles;
10687
+ });
10618
10688
  const queryClient = useQueryDevtoolsContext().client;
10619
10689
  return <button
10620
- class={styles.actionButton}
10690
+ class={styles().actionButton}
10621
10691
  title="Remove all items"
10622
10692
  aria-label="Remove all items"
10623
10693
  onClick={() => {
@@ -10628,10 +10698,13 @@ var ClearArrayButton = (props) => {
10628
10698
  ><List /></button>;
10629
10699
  };
10630
10700
  var DeleteItemButton = (props) => {
10631
- const styles = getStyles();
10701
+ const theme = useTheme();
10702
+ const styles = createMemo(() => {
10703
+ return theme() === "dark" ? darkStyles : lightStyles;
10704
+ });
10632
10705
  const queryClient = useQueryDevtoolsContext().client;
10633
10706
  return <button
10634
- class={clsx(styles.actionButton)}
10707
+ class={clsx(styles().actionButton)}
10635
10708
  title="Delete item"
10636
10709
  aria-label="Delete item"
10637
10710
  onClick={() => {
@@ -10642,10 +10715,19 @@ var DeleteItemButton = (props) => {
10642
10715
  ><Trash /></button>;
10643
10716
  };
10644
10717
  var ToggleValueButton = (props) => {
10645
- const styles = getStyles();
10718
+ const theme = useTheme();
10719
+ const styles = createMemo(() => {
10720
+ return theme() === "dark" ? darkStyles : lightStyles;
10721
+ });
10646
10722
  const queryClient = useQueryDevtoolsContext().client;
10647
10723
  return <button
10648
- class={clsx(styles.actionButton)}
10724
+ class={clsx(
10725
+ styles().actionButton,
10726
+ u`
10727
+ width: ${tokens.size[3.5]};
10728
+ height: ${tokens.size[3.5]};
10729
+ `
10730
+ )}
10649
10731
  title="Toggle value"
10650
10732
  aria-label="Toggle value"
10651
10733
  onClick={() => {
@@ -10657,13 +10739,16 @@ var ToggleValueButton = (props) => {
10657
10739
  );
10658
10740
  queryClient.setQueryData(props.activeQuery.queryKey, newData);
10659
10741
  }}
10660
- ><Check checked={props.value} /></button>;
10742
+ ><Check theme={theme()} checked={props.value} /></button>;
10661
10743
  };
10662
10744
  function isIterable(x) {
10663
10745
  return Symbol.iterator in x;
10664
10746
  }
10665
10747
  function Explorer(props) {
10666
- const styles = getStyles();
10748
+ const theme = useTheme();
10749
+ const styles = createMemo(() => {
10750
+ return theme() === "dark" ? darkStyles : lightStyles;
10751
+ });
10667
10752
  const queryClient = useQueryDevtoolsContext().client;
10668
10753
  const [expanded, setExpanded] = createSignal(
10669
10754
  (props.defaultExpanded || []).includes(props.label)
@@ -10707,25 +10792,25 @@ function Explorer(props) {
10707
10792
  });
10708
10793
  const subEntryPages = createMemo(() => chunkArray(subEntries(), 100));
10709
10794
  const currentDataPath = props.dataPath ?? [];
10710
- return <div class={styles.entry}>
10795
+ return <div class={styles().entry}>
10711
10796
  <Show when={subEntryPages().length}>
10712
- <div class={styles.expanderButtonContainer}>
10797
+ <div class={styles().expanderButtonContainer}>
10713
10798
  <button
10714
- class={styles.expanderButton}
10799
+ class={styles().expanderButton}
10715
10800
  onClick={() => toggleExpanded()}
10716
10801
  >
10717
10802
  <Expander expanded={expanded()} />
10718
10803
  {" "}
10719
10804
  <span>{props.label}</span>
10720
10805
  {" "}
10721
- <span class={styles.info}>
10806
+ <span class={styles().info}>
10722
10807
  {String(type()).toLowerCase() === "iterable" ? "(Iterable) " : ""}
10723
10808
  {subEntries().length}
10724
10809
  {" "}
10725
10810
  {subEntries().length > 1 ? `items` : `item`}
10726
10811
  </span>
10727
10812
  </button>
10728
- <Show when={props.editable}><div class={styles.actions}>
10813
+ <Show when={props.editable}><div class={styles().actions}>
10729
10814
  <CopyButton value={props.value} />
10730
10815
  <Show
10731
10816
  when={props.itemsDeletable && props.activeQuery !== void 0}
@@ -10742,7 +10827,7 @@ function Explorer(props) {
10742
10827
  </div></Show>
10743
10828
  </div>
10744
10829
  <Show when={expanded()}>
10745
- <Show when={subEntryPages().length === 1}><div class={styles.subEntry}><Key each={subEntries()} by={(item) => item.label}>{(entry) => {
10830
+ <Show when={subEntryPages().length === 1}><div class={styles().subEntry}><Key each={subEntries()} by={(item) => item.label}>{(entry) => {
10746
10831
  return <Explorer
10747
10832
  defaultExpanded={props.defaultExpanded}
10748
10833
  label={entry().label}
@@ -10753,12 +10838,12 @@ function Explorer(props) {
10753
10838
  itemsDeletable={type() === "array" || type() === "Iterable" || type() === "object"}
10754
10839
  />;
10755
10840
  }}</Key></div></Show>
10756
- <Show when={subEntryPages().length > 1}><div class={styles.subEntry}><Index each={subEntryPages()}>{(entries3, index) => <div><div class={styles.entry}>
10841
+ <Show when={subEntryPages().length > 1}><div class={styles().subEntry}><Index each={subEntryPages()}>{(entries3, index) => <div><div class={styles().entry}>
10757
10842
  <button
10758
10843
  onClick={() => setExpandedPages(
10759
10844
  (old) => old.includes(index) ? old.filter((d) => d !== index) : [...old, index]
10760
10845
  )}
10761
- class={styles.expanderButton}
10846
+ class={styles().expanderButton}
10762
10847
  >
10763
10848
  <Expander expanded={expandedPages().includes(index)} />
10764
10849
  {" "}
@@ -10768,7 +10853,7 @@ function Explorer(props) {
10768
10853
  {index * 100 + 100 - 1}
10769
10854
  {"]"}
10770
10855
  </button>
10771
- <Show when={expandedPages().includes(index)}><div class={styles.subEntry}><Key each={entries3()} by={(entry) => entry.label}>{(entry) => <Explorer
10856
+ <Show when={expandedPages().includes(index)}><div class={styles().subEntry}><Key each={entries3()} by={(entry) => entry.label}>{(entry) => <Explorer
10772
10857
  defaultExpanded={props.defaultExpanded}
10773
10858
  label={entry().label}
10774
10859
  value={entry().value}
@@ -10779,20 +10864,20 @@ function Explorer(props) {
10779
10864
  </div></div>}</Index></div></Show>
10780
10865
  </Show>
10781
10866
  </Show>
10782
- <Show when={subEntryPages().length === 0}><div class={styles.row}>
10783
- <span class={styles.label}>
10867
+ <Show when={subEntryPages().length === 0}><div class={styles().row}>
10868
+ <span class={styles().label}>
10784
10869
  {props.label}
10785
10870
  {":"}
10786
10871
  </span>
10787
10872
  <Show
10788
10873
  when={props.editable && props.activeQuery !== void 0 && (type() === "string" || type() === "number" || type() === "boolean")}
10789
- fallback={<span class={styles.value}>{displayValue(props.value)}</span>}
10874
+ fallback={<span class={styles().value}>{displayValue(props.value)}</span>}
10790
10875
  >
10791
10876
  <Show
10792
10877
  when={props.editable && props.activeQuery !== void 0 && (type() === "string" || type() === "number")}
10793
10878
  ><input
10794
10879
  type={type() === "number" ? "number" : "text"}
10795
- class={clsx(styles.value, styles.editableInput)}
10880
+ class={clsx(styles().value, styles().editableInput)}
10796
10881
  value={props.value}
10797
10882
  onChange={(changeEvent) => {
10798
10883
  const oldData = props.activeQuery.state.data;
@@ -10805,7 +10890,11 @@ function Explorer(props) {
10805
10890
  }}
10806
10891
  /></Show>
10807
10892
  <Show when={type() === "boolean"}><span
10808
- class={clsx(styles.value, styles.actions, styles.editableInput)}
10893
+ class={clsx(
10894
+ styles().value,
10895
+ styles().actions,
10896
+ styles().editableInput
10897
+ )}
10809
10898
  >
10810
10899
  <ToggleValueButton
10811
10900
  activeQuery={props.activeQuery}
@@ -10824,8 +10913,9 @@ function Explorer(props) {
10824
10913
  </div></Show>
10825
10914
  </div>;
10826
10915
  }
10827
- var getStyles = () => {
10916
+ var stylesFactory = (theme) => {
10828
10917
  const { colors, font, size: size2, border } = tokens;
10918
+ const t2 = (light, dark) => theme === "light" ? light : dark;
10829
10919
  return {
10830
10920
  entry: u`
10831
10921
  & * {
@@ -10839,7 +10929,7 @@ var getStyles = () => {
10839
10929
  subEntry: u`
10840
10930
  margin: 0 0 0 0.5em;
10841
10931
  padding-left: 0.75em;
10842
- border-left: 2px solid ${colors.darkGray[400]};
10932
+ border-left: 2px solid ${t2(colors.gray[300], colors.darkGray[400])};
10843
10933
  /* outline: 1px solid ${colors.teal[400]}; */
10844
10934
  `,
10845
10935
  expander: u`
@@ -10888,16 +10978,16 @@ var getStyles = () => {
10888
10978
  }
10889
10979
  `,
10890
10980
  info: u`
10891
- color: ${colors.gray[500]};
10981
+ color: ${t2(colors.gray[500], colors.gray[500])};
10892
10982
  font-size: ${font.size.xs};
10893
10983
  margin-left: ${size2[1]};
10894
10984
  /* outline: 1px solid ${colors.yellow[400]}; */
10895
10985
  `,
10896
10986
  label: u`
10897
- color: ${colors.gray[300]};
10987
+ color: ${t2(colors.gray[700], colors.gray[300])};
10898
10988
  `,
10899
10989
  value: u`
10900
- color: ${colors.purple[400]};
10990
+ color: ${t2(colors.purple[600], colors.purple[400])};
10901
10991
  flex-grow: 1;
10902
10992
  `,
10903
10993
  actions: u`
@@ -10915,16 +11005,18 @@ var getStyles = () => {
10915
11005
  `,
10916
11006
  editableInput: u`
10917
11007
  border: none;
10918
- padding: ${size2[0.5]} ${size2[1]};
11008
+ padding: ${size2[0.5]} ${size2[1]} ${size2[0.5]} ${size2[1.5]};
10919
11009
  flex-grow: 1;
10920
- background-color: ${colors.gray[900]};
11010
+ border-radius: ${border.radius.xs};
11011
+ background-color: ${t2(colors.gray[200], colors.darkGray[500])};
10921
11012
 
10922
11013
  &:hover {
10923
- background-color: ${colors.gray[800]};
11014
+ background-color: ${t2(colors.gray[300], colors.darkGray[600])};
10924
11015
  }
10925
11016
  `,
10926
11017
  actionButton: u`
10927
11018
  background-color: transparent;
11019
+ color: ${t2(colors.gray[500], colors.gray[500])};
10928
11020
  border: none;
10929
11021
  display: inline-flex;
10930
11022
  padding: 0px;
@@ -10937,15 +11029,7 @@ var getStyles = () => {
10937
11029
  z-index: 1;
10938
11030
 
10939
11031
  &:hover svg {
10940
- .copier,
10941
- .check,
10942
- .list {
10943
- stroke: ${colors.gray[500]} !important;
10944
- }
10945
-
10946
- .list-item {
10947
- stroke: ${colors.gray[700]};
10948
- }
11032
+ color: ${t2(colors.gray[600], colors.gray[400])};
10949
11033
  }
10950
11034
 
10951
11035
  &:focus-visible {
@@ -10956,6 +11040,8 @@ var getStyles = () => {
10956
11040
  `
10957
11041
  };
10958
11042
  };
11043
+ var lightStyles = stylesFactory("light");
11044
+ var darkStyles = stylesFactory("dark");
10959
11045
 
10960
11046
  // src/fonts.ts
10961
11047
  var loadFonts = () => {
@@ -10971,6 +11057,7 @@ var secondBreakpoint = 796;
10971
11057
  var thirdBreakpoint = 700;
10972
11058
  var BUTTON_POSITION = "bottom-right";
10973
11059
  var POSITION = "bottom";
11060
+ var THEME_PREFERENCE = "system";
10974
11061
  var INITIAL_IS_OPEN = false;
10975
11062
  var DEFAULT_HEIGHT = 500;
10976
11063
  var DEFAULT_WIDTH = 500;
@@ -10981,28 +11068,38 @@ var [selectedQueryHash, setSelectedQueryHash] = createSignal(
10981
11068
  );
10982
11069
  var [panelWidth, setPanelWidth] = createSignal(0);
10983
11070
  var DevtoolsComponent = (props) => {
10984
- return <QueryDevtoolsContext.Provider value={props}><Devtools /></QueryDevtoolsContext.Provider>;
11071
+ const [localStore, setLocalStore] = createLocalStorage({
11072
+ prefix: "TanstackQueryDevtools"
11073
+ });
11074
+ const colorScheme = getPreferredColorScheme();
11075
+ const theme = createMemo(() => {
11076
+ const preference = localStore.theme_preference || THEME_PREFERENCE;
11077
+ if (preference !== "system")
11078
+ return preference;
11079
+ return colorScheme();
11080
+ });
11081
+ return <QueryDevtoolsContext.Provider value={props}><ThemeContext.Provider value={theme}><Devtools localStore={localStore} setLocalStore={setLocalStore} /></ThemeContext.Provider></QueryDevtoolsContext.Provider>;
10985
11082
  };
10986
11083
  var Devtools_default = DevtoolsComponent;
10987
- var Devtools = () => {
11084
+ var Devtools = (props) => {
10988
11085
  loadFonts();
10989
- const styles = getStyles2();
10990
- const [localStore, setLocalStore] = createLocalStorage({
10991
- prefix: "TanstackQueryDevtools"
11086
+ const theme = useTheme();
11087
+ const styles = createMemo(() => {
11088
+ return theme() === "dark" ? darkStyles2 : lightStyles2;
10992
11089
  });
10993
11090
  const buttonPosition = createMemo(() => {
10994
11091
  return useQueryDevtoolsContext().buttonPosition || BUTTON_POSITION;
10995
11092
  });
10996
11093
  const isOpen = createMemo(() => {
10997
- return localStore.open === "true" ? true : localStore.open === "false" ? false : useQueryDevtoolsContext().initialIsOpen || INITIAL_IS_OPEN;
11094
+ return props.localStore.open === "true" ? true : props.localStore.open === "false" ? false : useQueryDevtoolsContext().initialIsOpen || INITIAL_IS_OPEN;
10998
11095
  });
10999
11096
  const position = createMemo(() => {
11000
- return localStore.position || useQueryDevtoolsContext().position || POSITION;
11097
+ return props.localStore.position || useQueryDevtoolsContext().position || POSITION;
11001
11098
  });
11002
11099
  createEffect(() => {
11003
11100
  const root = document.querySelector(".tsqd-parent-container");
11004
- const height = localStore.height || DEFAULT_HEIGHT;
11005
- const width = localStore.width || DEFAULT_WIDTH;
11101
+ const height = props.localStore.height || DEFAULT_HEIGHT;
11102
+ const width = props.localStore.width || DEFAULT_WIDTH;
11006
11103
  const panelPosition = position();
11007
11104
  root.style.setProperty(
11008
11105
  "--tsqd-panel-height",
@@ -11040,25 +11137,28 @@ var Devtools = () => {
11040
11137
  )}
11041
11138
  >
11042
11139
  <TransitionGroup name="tsqd-panel-transition"><Show when={isOpen()}><DevtoolsPanel
11043
- localStore={localStore}
11044
- setLocalStore={setLocalStore}
11140
+ localStore={props.localStore}
11141
+ setLocalStore={props.setLocalStore}
11045
11142
  /></Show></TransitionGroup>
11046
11143
  <TransitionGroup name="tsqd-button-transition"><Show when={!isOpen()}><div
11047
11144
  class={clsx(
11048
- styles.devtoolsBtn,
11049
- styles[`devtoolsBtn-position-${buttonPosition()}`]
11145
+ styles().devtoolsBtn,
11146
+ styles()[`devtoolsBtn-position-${buttonPosition()}`]
11050
11147
  )}
11051
11148
  >
11052
11149
  <div aria-hidden="true"><TanstackLogo /></div>
11053
11150
  <button
11054
11151
  aria-label="Open Tanstack query devtools"
11055
- onClick={() => setLocalStore("open", "true")}
11152
+ onClick={() => props.setLocalStore("open", "true")}
11056
11153
  ><TanstackLogo /></button>
11057
11154
  </div></Show></TransitionGroup>
11058
11155
  </div>;
11059
11156
  };
11060
11157
  var DevtoolsPanel = (props) => {
11061
- const styles = getStyles2();
11158
+ const theme = useTheme();
11159
+ const styles = createMemo(() => {
11160
+ return theme() === "dark" ? darkStyles2 : lightStyles2;
11161
+ });
11062
11162
  const [isResizing, setIsResizing] = createSignal(false);
11063
11163
  const sort = createMemo(() => props.localStore.sort || DEFAULT_SORT_FN_NAME);
11064
11164
  const sortOrder = createMemo(
@@ -11175,14 +11275,25 @@ var DevtoolsPanel = (props) => {
11175
11275
  });
11176
11276
  });
11177
11277
  });
11278
+ const getPanelDynamicStyles = () => {
11279
+ const { colors } = tokens;
11280
+ const t2 = (light, dark) => theme() === "dark" ? dark : light;
11281
+ if (panelWidth() < secondBreakpoint) {
11282
+ return u`
11283
+ flex-direction: column;
11284
+ background-color: ${t2(colors.gray[300], colors.gray[600])};
11285
+ `;
11286
+ }
11287
+ return u`
11288
+ flex-direction: row;
11289
+ background-color: ${t2(colors.gray[200], colors.darkGray[900])};
11290
+ `;
11291
+ };
11178
11292
  return <aside
11179
11293
  class={clsx(
11180
- styles.panel,
11181
- styles[`panel-position-${position()}`],
11182
- u`
11183
- flex-direction: ${panelWidth() < secondBreakpoint ? "column" : "row"};
11184
- background-color: ${panelWidth() < secondBreakpoint ? tokens.colors.gray[600] : tokens.colors.darkGray[900]};
11185
- `,
11294
+ styles().panel,
11295
+ styles()[`panel-position-${position()}`],
11296
+ getPanelDynamicStyles(),
11186
11297
  {
11187
11298
  [u`
11188
11299
  min-width: min-content;
@@ -11199,8 +11310,8 @@ var DevtoolsPanel = (props) => {
11199
11310
  >
11200
11311
  <div
11201
11312
  class={clsx(
11202
- styles.dragHandle,
11203
- styles[`dragHandle-position-${position()}`],
11313
+ styles().dragHandle,
11314
+ styles()[`dragHandle-position-${position()}`],
11204
11315
  "tsqd-drag-handle"
11205
11316
  )}
11206
11317
  onMouseDown={handleDragStart}
@@ -11208,8 +11319,8 @@ var DevtoolsPanel = (props) => {
11208
11319
  <button
11209
11320
  aria-label="Close tanstack query devtools"
11210
11321
  class={clsx(
11211
- styles.closeBtn,
11212
- styles[`closeBtn-position-${position()}`],
11322
+ styles().closeBtn,
11323
+ styles()[`closeBtn-position-${position()}`],
11213
11324
  "tsqd-minimize-btn"
11214
11325
  )}
11215
11326
  onClick={() => props.setLocalStore("open", "false")}
@@ -11217,7 +11328,7 @@ var DevtoolsPanel = (props) => {
11217
11328
  <div
11218
11329
  ref={queriesContainerRef}
11219
11330
  class={clsx(
11220
- styles.queriesContainer,
11331
+ styles().queriesContainer,
11221
11332
  panelWidth() < secondBreakpoint && selectedQueryHash() && u`
11222
11333
  height: 50%;
11223
11334
  max-height: 50%;
@@ -11225,15 +11336,18 @@ var DevtoolsPanel = (props) => {
11225
11336
  "tsqd-queries-container"
11226
11337
  )}
11227
11338
  >
11228
- <div class={clsx(styles.row, "tsqd-header")}>
11339
+ <div class={clsx(styles().row, "tsqd-header")}>
11229
11340
  <button
11230
- class={clsx(styles.logo, "tsqd-text-logo-container")}
11341
+ class={clsx(styles().logo, "tsqd-text-logo-container")}
11231
11342
  onClick={() => props.setLocalStore("open", "false")}
11232
11343
  aria-label="Close Tanstack query devtools"
11233
11344
  >
11234
- <span class={clsx(styles.tanstackLogo, "tsqd-text-logo-tanstack")}>TANSTACK</span>
11345
+ <span class={clsx(styles().tanstackLogo, "tsqd-text-logo-tanstack")}>TANSTACK</span>
11235
11346
  <span
11236
- class={clsx(styles.queryFlavorLogo, "tsqd-text-logo-query-flavor")}
11347
+ class={clsx(
11348
+ styles().queryFlavorLogo,
11349
+ "tsqd-text-logo-query-flavor"
11350
+ )}
11237
11351
  >
11238
11352
  {useQueryDevtoolsContext().queryFlavor}
11239
11353
  {" v"}
@@ -11244,17 +11358,17 @@ var DevtoolsPanel = (props) => {
11244
11358
  </div>
11245
11359
  <div
11246
11360
  class={clsx(
11247
- styles.row,
11361
+ styles().row,
11248
11362
  u`
11249
11363
  gap: ${tokens.size[2.5]};
11250
11364
  `,
11251
11365
  "tsqd-filters-actions-container"
11252
11366
  )}
11253
11367
  >
11254
- <div class={clsx(styles.filtersContainer, "tsqd-filters-container")}>
11368
+ <div class={clsx(styles().filtersContainer, "tsqd-filters-container")}>
11255
11369
  <div
11256
11370
  class={clsx(
11257
- styles.filterInput,
11371
+ styles().filterInput,
11258
11372
  "tsqd-query-filter-textfield-container"
11259
11373
  )}
11260
11374
  >
@@ -11270,7 +11384,7 @@ var DevtoolsPanel = (props) => {
11270
11384
  </div>
11271
11385
  <div
11272
11386
  class={clsx(
11273
- styles.filterSelect,
11387
+ styles().filterSelect,
11274
11388
  "tsqd-query-filter-sort-container"
11275
11389
  )}
11276
11390
  >
@@ -11301,13 +11415,13 @@ var DevtoolsPanel = (props) => {
11301
11415
  </Show>
11302
11416
  </button>
11303
11417
  </div>
11304
- <div class={clsx(styles.actionsContainer, "tsqd-actions-container")}>
11418
+ <div class={clsx(styles().actionsContainer, "tsqd-actions-container")}>
11305
11419
  <button
11306
11420
  onClick={() => {
11307
11421
  cache().clear();
11308
11422
  }}
11309
11423
  class={clsx(
11310
- styles.actionsBtn,
11424
+ styles().actionsBtn,
11311
11425
  "tsqd-actions-btn",
11312
11426
  "tsqd-action-clear-cache"
11313
11427
  )}
@@ -11325,7 +11439,8 @@ var DevtoolsPanel = (props) => {
11325
11439
  }
11326
11440
  }}
11327
11441
  class={clsx(
11328
- styles.actionsBtn,
11442
+ styles().actionsBtn,
11443
+ offline() && styles().actionsBtnOffline,
11329
11444
  "tsqd-actions-btn",
11330
11445
  "tsqd-action-mock-offline-behavior"
11331
11446
  )}
@@ -11336,24 +11451,24 @@ var DevtoolsPanel = (props) => {
11336
11451
  <index$d.Root gutter={4}>
11337
11452
  <index$d.Trigger
11338
11453
  class={clsx(
11339
- styles.actionsBtn,
11454
+ styles().actionsBtn,
11340
11455
  "tsqd-actions-btn",
11341
11456
  "tsqd-action-settings"
11342
11457
  )}
11343
11458
  ><Settings /></index$d.Trigger>
11344
11459
  <index$d.Portal><index$d.Content
11345
- class={clsx(styles.settingsMenu, "tsqd-settings-menu")}
11460
+ class={clsx(styles().settingsMenu, "tsqd-settings-menu")}
11346
11461
  >
11347
11462
  <div
11348
11463
  class={clsx(
11349
- styles.settingsMenuHeader,
11464
+ styles().settingsMenuHeader,
11350
11465
  "tsqd-settings-menu-header"
11351
11466
  )}
11352
11467
  >Settings</div>
11353
11468
  <index$d.Sub overlap gutter={8} shift={-4}>
11354
11469
  <index$d.SubTrigger
11355
11470
  class={clsx(
11356
- styles.settingsSubTrigger,
11471
+ styles().settingsSubTrigger,
11357
11472
  "tsqd-settings-menu-sub-trigger",
11358
11473
  "tsqd-settings-menu-sub-trigger-position"
11359
11474
  )}
@@ -11362,7 +11477,10 @@ var DevtoolsPanel = (props) => {
11362
11477
  <ChevronDown />
11363
11478
  </index$d.SubTrigger>
11364
11479
  <index$d.Portal><index$d.SubContent
11365
- class={clsx(styles.settingsMenu, "tsqd-settings-submenu")}
11480
+ class={clsx(
11481
+ styles().settingsMenu,
11482
+ "tsqd-settings-submenu"
11483
+ )}
11366
11484
  >
11367
11485
  <index$d.Item
11368
11486
  onSelect={() => {
@@ -11370,7 +11488,7 @@ var DevtoolsPanel = (props) => {
11370
11488
  }}
11371
11489
  as="button"
11372
11490
  class={clsx(
11373
- styles.settingsSubButton,
11491
+ styles().settingsSubButton,
11374
11492
  "tsqd-settings-menu-position-btn",
11375
11493
  "tsqd-settings-menu-position-btn-top"
11376
11494
  )}
@@ -11384,7 +11502,7 @@ var DevtoolsPanel = (props) => {
11384
11502
  }}
11385
11503
  as="button"
11386
11504
  class={clsx(
11387
- styles.settingsSubButton,
11505
+ styles().settingsSubButton,
11388
11506
  "tsqd-settings-menu-position-btn",
11389
11507
  "tsqd-settings-menu-position-btn-bottom"
11390
11508
  )}
@@ -11398,7 +11516,7 @@ var DevtoolsPanel = (props) => {
11398
11516
  }}
11399
11517
  as="button"
11400
11518
  class={clsx(
11401
- styles.settingsSubButton,
11519
+ styles().settingsSubButton,
11402
11520
  "tsqd-settings-menu-position-btn",
11403
11521
  "tsqd-settings-menu-position-btn-left"
11404
11522
  )}
@@ -11412,7 +11530,7 @@ var DevtoolsPanel = (props) => {
11412
11530
  }}
11413
11531
  as="button"
11414
11532
  class={clsx(
11415
- styles.settingsSubButton,
11533
+ styles().settingsSubButton,
11416
11534
  "tsqd-settings-menu-position-btn",
11417
11535
  "tsqd-settings-menu-position-btn-right"
11418
11536
  )}
@@ -11422,13 +11540,77 @@ var DevtoolsPanel = (props) => {
11422
11540
  </index$d.Item>
11423
11541
  </index$d.SubContent></index$d.Portal>
11424
11542
  </index$d.Sub>
11543
+ <index$d.Sub overlap gutter={8} shift={-4}>
11544
+ <index$d.SubTrigger
11545
+ class={clsx(
11546
+ styles().settingsSubTrigger,
11547
+ "tsqd-settings-menu-sub-trigger",
11548
+ "tsqd-settings-menu-sub-trigger-position"
11549
+ )}
11550
+ >
11551
+ <span>Theme</span>
11552
+ <ChevronDown />
11553
+ </index$d.SubTrigger>
11554
+ <index$d.Portal><index$d.SubContent
11555
+ class={clsx(
11556
+ styles().settingsMenu,
11557
+ "tsqd-settings-submenu"
11558
+ )}
11559
+ >
11560
+ <index$d.Item
11561
+ onSelect={() => {
11562
+ props.setLocalStore("theme_preference", "light");
11563
+ }}
11564
+ as="button"
11565
+ class={clsx(
11566
+ styles().settingsSubButton,
11567
+ props.localStore.theme_preference === "light" && styles().themeSelectedButton,
11568
+ "tsqd-settings-menu-position-btn",
11569
+ "tsqd-settings-menu-position-btn-top"
11570
+ )}
11571
+ >
11572
+ <span>Light</span>
11573
+ <Sun />
11574
+ </index$d.Item>
11575
+ <index$d.Item
11576
+ onSelect={() => {
11577
+ props.setLocalStore("theme_preference", "dark");
11578
+ }}
11579
+ as="button"
11580
+ class={clsx(
11581
+ styles().settingsSubButton,
11582
+ props.localStore.theme_preference === "dark" && styles().themeSelectedButton,
11583
+ "tsqd-settings-menu-position-btn",
11584
+ "tsqd-settings-menu-position-btn-bottom"
11585
+ )}
11586
+ >
11587
+ <span>Dark</span>
11588
+ <Moon />
11589
+ </index$d.Item>
11590
+ <index$d.Item
11591
+ onSelect={() => {
11592
+ props.setLocalStore("theme_preference", "system");
11593
+ }}
11594
+ as="button"
11595
+ class={clsx(
11596
+ styles().settingsSubButton,
11597
+ props.localStore.theme_preference === "system" && styles().themeSelectedButton,
11598
+ "tsqd-settings-menu-position-btn",
11599
+ "tsqd-settings-menu-position-btn-left"
11600
+ )}
11601
+ >
11602
+ <span>System</span>
11603
+ <Monitor />
11604
+ </index$d.Item>
11605
+ </index$d.SubContent></index$d.Portal>
11606
+ </index$d.Sub>
11425
11607
  </index$d.Content></index$d.Portal>
11426
11608
  </index$d.Root>
11427
11609
  </div>
11428
11610
  </div>
11429
11611
  <div
11430
11612
  class={clsx(
11431
- styles.overflowQueryContainer,
11613
+ styles().overflowQueryContainer,
11432
11614
  "tsqd-queries-overflow-container"
11433
11615
  )}
11434
11616
  ><div class="tsqd-queries-container"><Key by={(q) => q.queryHash} each={queries()}>{(query) => <QueryRow query={query()} />}</Key></div></div>
@@ -11437,7 +11619,12 @@ var DevtoolsPanel = (props) => {
11437
11619
  </aside>;
11438
11620
  };
11439
11621
  var QueryRow = (props) => {
11440
- const styles = getStyles2();
11622
+ const theme = useTheme();
11623
+ const styles = createMemo(() => {
11624
+ return theme() === "dark" ? darkStyles2 : lightStyles2;
11625
+ });
11626
+ const { colors, alpha } = tokens;
11627
+ const t2 = (light, dark) => theme() === "dark" ? dark : light;
11441
11628
  const queryState = createSubscribeToQueryCacheBatcher(
11442
11629
  (queryCache) => queryCache().find({
11443
11630
  queryKey: props.query.queryKey
@@ -11465,28 +11652,34 @@ var QueryRow = (props) => {
11465
11652
  isStale: isStale()
11466
11653
  })
11467
11654
  );
11655
+ const getObserverCountColorStyles = () => {
11656
+ if (color() === "gray") {
11657
+ return u`
11658
+ background-color: ${t2(colors[color()][200], colors[color()][700])};
11659
+ color: ${t2(colors[color()][700], colors[color()][300])};
11660
+ `;
11661
+ }
11662
+ return u`
11663
+ background-color: ${t2(
11664
+ colors[color()][200] + alpha[80],
11665
+ colors[color()][900]
11666
+ )};
11667
+ color: ${t2(colors[color()][800], colors[color()][300])};
11668
+ `;
11669
+ };
11468
11670
  return <Show when={queryState()}><button
11469
11671
  onClick={() => setSelectedQueryHash(
11470
11672
  props.query.queryHash === selectedQueryHash() ? null : props.query.queryHash
11471
11673
  )}
11472
11674
  class={clsx(
11473
- styles.queryRow,
11474
- selectedQueryHash() === props.query.queryHash && styles.selectedQueryRow,
11675
+ styles().queryRow,
11676
+ selectedQueryHash() === props.query.queryHash && styles().selectedQueryRow,
11475
11677
  "tsqd-query-row"
11476
11678
  )}
11477
11679
  aria-label={`Query key ${props.query.queryHash}`}
11478
11680
  >
11479
11681
  <div
11480
- class={clsx(
11481
- color() === "gray" ? u`
11482
- background-color: ${tokens.colors[color()][700]};
11483
- color: ${tokens.colors[color()][300]};
11484
- ` : u`
11485
- background-color: ${tokens.colors[color()][900]};
11486
- color: ${tokens.colors[color()][300]};
11487
- `,
11488
- "tsqd-query-observer-count"
11489
- )}
11682
+ class={clsx(getObserverCountColorStyles(), "tsqd-query-observer-count")}
11490
11683
  >{observers()}</div>
11491
11684
  <code class="tsqd-query-hash">{props.query.queryHash}</code>
11492
11685
  <Show when={isDisabled()}><div class="tsqd-query-disabled-indicator">disabled</div></Show>
@@ -11508,8 +11701,13 @@ var QueryStatusCount = () => {
11508
11701
  const inactive = createSubscribeToQueryCacheBatcher(
11509
11702
  (queryCache) => queryCache().getAll().filter((q) => getQueryStatusLabel(q) === "inactive").length
11510
11703
  );
11511
- const styles = getStyles2();
11512
- return <div class={clsx(styles.queryStatusContainer, "tsqd-query-status-container")}>
11704
+ const theme = useTheme();
11705
+ const styles = createMemo(() => {
11706
+ return theme() === "dark" ? darkStyles2 : lightStyles2;
11707
+ });
11708
+ return <div
11709
+ class={clsx(styles().queryStatusContainer, "tsqd-query-status-container")}
11710
+ >
11513
11711
  <QueryStatus label="Fresh" color="green" count={fresh()} />
11514
11712
  <QueryStatus label="Fetching" color="blue" count={fetching()} />
11515
11713
  <QueryStatus label="Paused" color="purple" count={paused()} />
@@ -11518,7 +11716,12 @@ var QueryStatusCount = () => {
11518
11716
  </div>;
11519
11717
  };
11520
11718
  var QueryStatus = (props) => {
11521
- const styles = getStyles2();
11719
+ const theme = useTheme();
11720
+ const styles = createMemo(() => {
11721
+ return theme() === "dark" ? darkStyles2 : lightStyles2;
11722
+ });
11723
+ const { colors, alpha } = tokens;
11724
+ const t2 = (light, dark) => theme() === "dark" ? dark : light;
11522
11725
  let tagRef;
11523
11726
  const [mouseOver, setMouseOver] = createSignal(false);
11524
11727
  const [focused, setFocused] = createSignal(false);
@@ -11544,11 +11747,11 @@ var QueryStatus = (props) => {
11544
11747
  disabled={showLabel()}
11545
11748
  ref={tagRef}
11546
11749
  class={clsx(
11547
- styles.queryStatusTag,
11750
+ styles().queryStatusTag,
11548
11751
  !showLabel() && u`
11549
11752
  cursor: pointer;
11550
11753
  &:hover {
11551
- background: ${tokens.colors.darkGray[400]}${tokens.alpha[80]};
11754
+ background: ${t2(colors.gray[200], colors.darkGray[400])}${alpha[80]};
11552
11755
  }
11553
11756
  `,
11554
11757
  "tsqd-query-status-tag",
@@ -11561,7 +11764,7 @@ var QueryStatus = (props) => {
11561
11764
  <Show when={!showLabel() && (mouseOver() || focused())}><div
11562
11765
  role="tooltip"
11563
11766
  id="tsqd-status-tooltip"
11564
- class={clsx(styles.statusTooltip, "tsqd-query-status-tooltip")}
11767
+ class={clsx(styles().statusTooltip, "tsqd-query-status-tooltip")}
11565
11768
  >{props.label}</div></Show>
11566
11769
  <span
11567
11770
  class={clsx(
@@ -11575,24 +11778,33 @@ var QueryStatus = (props) => {
11575
11778
  )}
11576
11779
  />
11577
11780
  <Show when={showLabel()}><span
11578
- class={clsx(styles.queryStatusTagLabel, "tsqd-query-status-tag-label")}
11781
+ class={clsx(
11782
+ styles().queryStatusTagLabel,
11783
+ "tsqd-query-status-tag-label"
11784
+ )}
11579
11785
  >{props.label}</span></Show>
11580
11786
  <span
11581
11787
  class={clsx(
11582
- styles.queryStatusCount,
11583
- props.count > 0 && props.color !== "gray" ? u`
11584
- background-color: ${tokens.colors[props.color][900]};
11585
- color: ${tokens.colors[props.color][300]};
11586
- ` : u`
11587
- color: ${tokens.colors["gray"][400]};
11588
- `,
11788
+ styles().queryStatusCount,
11789
+ props.count > 0 && props.color !== "gray" && u`
11790
+ background-color: ${t2(
11791
+ colors[props.color][100],
11792
+ colors[props.color][900]
11793
+ )};
11794
+ color: ${t2(colors[props.color][700], colors[props.color][300])};
11795
+ `,
11589
11796
  "tsqd-query-status-tag-count"
11590
11797
  )}
11591
11798
  >{props.count}</span>
11592
11799
  </button>;
11593
11800
  };
11594
11801
  var QueryDetails = () => {
11595
- const styles = getStyles2();
11802
+ const theme = useTheme();
11803
+ const styles = createMemo(() => {
11804
+ return theme() === "dark" ? darkStyles2 : lightStyles2;
11805
+ });
11806
+ const { colors } = tokens;
11807
+ const t2 = (light, dark) => theme() === "dark" ? dark : light;
11596
11808
  const queryClient = useQueryDevtoolsContext().client;
11597
11809
  const [restoringLoading, setRestoringLoading] = createSignal(false);
11598
11810
  const errorTypes = createMemo(() => {
@@ -11663,26 +11875,34 @@ var QueryDetails = () => {
11663
11875
  setRestoringLoading(false);
11664
11876
  }
11665
11877
  });
11666
- return <Show when={activeQuery() && activeQueryState()}><div class={clsx(styles.detailsContainer, "tsqd-query-details-container")}>
11667
- <div class={clsx(styles.detailsHeader, "tsqd-query-details-header")}>Query Details</div>
11878
+ const getQueryStatusColors = () => {
11879
+ if (color() === "gray") {
11880
+ return u`
11881
+ background-color: ${t2(colors[color()][200], colors[color()][700])};
11882
+ color: ${t2(colors[color()][700], colors[color()][300])};
11883
+ border-color: ${t2(colors[color()][400], colors[color()][600])};
11884
+ `;
11885
+ }
11886
+ return u`
11887
+ background-color: ${t2(colors[color()][100], colors[color()][900])};
11888
+ color: ${t2(colors[color()][700], colors[color()][300])};
11889
+ border-color: ${t2(colors[color()][400], colors[color()][600])};
11890
+ `;
11891
+ };
11892
+ return <Show when={activeQuery() && activeQueryState()}><div
11893
+ class={clsx(styles().detailsContainer, "tsqd-query-details-container")}
11894
+ >
11895
+ <div class={clsx(styles().detailsHeader, "tsqd-query-details-header")}>Query Details</div>
11668
11896
  <div
11669
- class={clsx(styles.detailsBody, "tsqd-query-details-summary-container")}
11897
+ class={clsx(
11898
+ styles().detailsBody,
11899
+ "tsqd-query-details-summary-container"
11900
+ )}
11670
11901
  >
11671
11902
  <div class="tsqd-query-details-summary">
11672
11903
  <pre><code>{displayValue(activeQuery().queryKey, true)}</code></pre>
11673
11904
  <span
11674
- class={clsx(
11675
- styles.queryDetailsStatus,
11676
- color() === "gray" ? u`
11677
- background-color: ${tokens.colors[color()][700]};
11678
- color: ${tokens.colors[color()][300]};
11679
- border-color: ${tokens.colors[color()][600]};
11680
- ` : u`
11681
- background-color: ${tokens.colors[color()][900]};
11682
- color: ${tokens.colors[color()][300]};
11683
- border-color: ${tokens.colors[color()][600]};
11684
- `
11685
- )}
11905
+ class={clsx(styles().queryDetailsStatus, getQueryStatusColors())}
11686
11906
  >{statusLabel()}</span>
11687
11907
  </div>
11688
11908
  <div class="tsqd-query-details-observers-count">
@@ -11694,14 +11914,17 @@ var QueryDetails = () => {
11694
11914
  <span>{new Date(activeQueryState().dataUpdatedAt).toLocaleTimeString()}</span>
11695
11915
  </div>
11696
11916
  </div>
11697
- <div class={clsx(styles.detailsHeader, "tsqd-query-details-header")}>Actions</div>
11917
+ <div class={clsx(styles().detailsHeader, "tsqd-query-details-header")}>Actions</div>
11698
11918
  <div
11699
- class={clsx(styles.actionsBody, "tsqd-query-details-actions-container")}
11919
+ class={clsx(
11920
+ styles().actionsBody,
11921
+ "tsqd-query-details-actions-container"
11922
+ )}
11700
11923
  >
11701
11924
  <button
11702
11925
  class={clsx(
11703
11926
  u`
11704
- color: ${tokens.colors.blue[400]};
11927
+ color: ${t2(colors.blue[600], colors.blue[400])};
11705
11928
  `,
11706
11929
  "tsqd-query-details-actions-btn",
11707
11930
  "tsqd-query-details-action-refetch"
@@ -11711,7 +11934,7 @@ var QueryDetails = () => {
11711
11934
  >
11712
11935
  <span
11713
11936
  class={u`
11714
- background-color: ${tokens.colors.blue[400]};
11937
+ background-color: ${t2(colors.blue[600], colors.blue[400])};
11715
11938
  `}
11716
11939
  />
11717
11940
  {"Refetch"}
@@ -11719,7 +11942,7 @@ var QueryDetails = () => {
11719
11942
  <button
11720
11943
  class={clsx(
11721
11944
  u`
11722
- color: ${tokens.colors.yellow[400]};
11945
+ color: ${t2(colors.yellow[600], colors.yellow[400])};
11723
11946
  `,
11724
11947
  "tsqd-query-details-actions-btn",
11725
11948
  "tsqd-query-details-action-invalidate"
@@ -11729,7 +11952,7 @@ var QueryDetails = () => {
11729
11952
  >
11730
11953
  <span
11731
11954
  class={u`
11732
- background-color: ${tokens.colors.yellow[400]};
11955
+ background-color: ${t2(colors.yellow[600], colors.yellow[400])};
11733
11956
  `}
11734
11957
  />
11735
11958
  {"Invalidate"}
@@ -11737,7 +11960,7 @@ var QueryDetails = () => {
11737
11960
  <button
11738
11961
  class={clsx(
11739
11962
  u`
11740
- color: ${tokens.colors.gray[300]};
11963
+ color: ${t2(colors.gray[600], colors.gray[300])};
11741
11964
  `,
11742
11965
  "tsqd-query-details-actions-btn",
11743
11966
  "tsqd-query-details-action-reset"
@@ -11747,7 +11970,7 @@ var QueryDetails = () => {
11747
11970
  >
11748
11971
  <span
11749
11972
  class={u`
11750
- background-color: ${tokens.colors.gray[400]};
11973
+ background-color: ${t2(colors.gray[600], colors.gray[400])};
11751
11974
  `}
11752
11975
  />
11753
11976
  {"Reset"}
@@ -11755,7 +11978,7 @@ var QueryDetails = () => {
11755
11978
  <button
11756
11979
  class={clsx(
11757
11980
  u`
11758
- color: ${tokens.colors.pink[400]};
11981
+ color: ${t2(colors.pink[500], colors.pink[400])};
11759
11982
  `,
11760
11983
  "tsqd-query-details-actions-btn",
11761
11984
  "tsqd-query-details-action-remove"
@@ -11768,7 +11991,7 @@ var QueryDetails = () => {
11768
11991
  >
11769
11992
  <span
11770
11993
  class={u`
11771
- background-color: ${tokens.colors.pink[400]};
11994
+ background-color: ${t2(colors.pink[500], colors.pink[400])};
11772
11995
  `}
11773
11996
  />
11774
11997
  {"Remove"}
@@ -11776,7 +11999,7 @@ var QueryDetails = () => {
11776
11999
  <button
11777
12000
  class={clsx(
11778
12001
  u`
11779
- color: ${tokens.colors.cyan[400]};
12002
+ color: ${t2(colors.cyan[500], colors.cyan[400])};
11780
12003
  `,
11781
12004
  "tsqd-query-details-actions-btn",
11782
12005
  "tsqd-query-details-action-loading"
@@ -11813,7 +12036,7 @@ var QueryDetails = () => {
11813
12036
  >
11814
12037
  <span
11815
12038
  class={u`
11816
- background-color: ${tokens.colors.cyan[400]};
12039
+ background-color: ${t2(colors.cyan[500], colors.cyan[400])};
11817
12040
  `}
11818
12041
  />
11819
12042
  {queryStatus() === "pending" ? "Restore" : "Trigger"}
@@ -11822,7 +12045,7 @@ var QueryDetails = () => {
11822
12045
  <Show when={errorTypes().length === 0 || queryStatus() === "error"}><button
11823
12046
  class={clsx(
11824
12047
  u`
11825
- color: ${tokens.colors.red[400]};
12048
+ color: ${t2(colors.red[500], colors.red[400])};
11826
12049
  `,
11827
12050
  "tsqd-query-details-actions-btn",
11828
12051
  "tsqd-query-details-action-error"
@@ -11838,7 +12061,7 @@ var QueryDetails = () => {
11838
12061
  >
11839
12062
  <span
11840
12063
  class={u`
11841
- background-color: ${tokens.colors.red[400]};
12064
+ background-color: ${t2(colors.red[500], colors.red[400])};
11842
12065
  `}
11843
12066
  />
11844
12067
  {queryStatus() === "error" ? "Restore" : "Trigger"}
@@ -11848,7 +12071,7 @@ var QueryDetails = () => {
11848
12071
  when={!(errorTypes().length === 0 || queryStatus() === "error")}
11849
12072
  ><div
11850
12073
  class={clsx(
11851
- styles.actionsSelect,
12074
+ styles().actionsSelect,
11852
12075
  "tsqd-query-details-actions-btn",
11853
12076
  "tsqd-query-details-action-error-multiple"
11854
12077
  )}
@@ -11863,7 +12086,7 @@ var QueryDetails = () => {
11863
12086
  disabled={queryStatus() === "pending"}
11864
12087
  onChange={(e2) => {
11865
12088
  const errorType = errorTypes().find(
11866
- (t2) => t2.name === e2.currentTarget.value
12089
+ (et) => et.name === e2.currentTarget.value
11867
12090
  );
11868
12091
  triggerError(errorType);
11869
12092
  }}
@@ -11874,7 +12097,7 @@ var QueryDetails = () => {
11874
12097
  <ChevronDown />
11875
12098
  </div></Show>
11876
12099
  </div>
11877
- <div class={clsx(styles.detailsHeader, "tsqd-query-details-header")}>Data Explorer</div>
12100
+ <div class={clsx(styles().detailsHeader, "tsqd-query-details-header")}>Data Explorer</div>
11878
12101
  <div
11879
12102
  style={{
11880
12103
  padding: "0.5rem"
@@ -11887,7 +12110,7 @@ var QueryDetails = () => {
11887
12110
  editable={true}
11888
12111
  activeQuery={activeQuery()}
11889
12112
  /></div>
11890
- <div class={clsx(styles.detailsHeader, "tsqd-query-details-header")}>Query Explorer</div>
12113
+ <div class={clsx(styles().detailsHeader, "tsqd-query-details-header")}>Query Explorer</div>
11891
12114
  <div
11892
12115
  style={{
11893
12116
  padding: "0.5rem"
@@ -11937,8 +12160,9 @@ var createSubscribeToQueryCacheBatcher = (callback, equalityCheck = true) => {
11937
12160
  });
11938
12161
  return value;
11939
12162
  };
11940
- var getStyles2 = () => {
12163
+ var stylesFactory2 = (theme) => {
11941
12164
  const { colors, font, size: size2, alpha, shadow, border } = tokens;
12165
+ const t2 = (light, dark) => theme === "light" ? light : dark;
11942
12166
  return {
11943
12167
  devtoolsBtn: u`
11944
12168
  z-index: 100000;
@@ -12000,8 +12224,6 @@ var getStyles2 = () => {
12000
12224
  display: flex;
12001
12225
  gap: ${tokens.size[0.5]};
12002
12226
  & * {
12003
- font-family: 'Inter', sans-serif;
12004
- color: ${colors.gray[300]};
12005
12227
  box-sizing: border-box;
12006
12228
  text-transform: none;
12007
12229
  }
@@ -12028,7 +12250,7 @@ var getStyles2 = () => {
12028
12250
  left: 0;
12029
12251
  max-height: 90%;
12030
12252
  min-height: 3.5rem;
12031
- border-bottom: ${colors.darkGray[300]} 1px solid;
12253
+ border-bottom: ${t2(colors.gray[400], colors.darkGray[300])} 1px solid;
12032
12254
  `,
12033
12255
  "panel-position-bottom": u`
12034
12256
  bottom: 0;
@@ -12036,20 +12258,20 @@ var getStyles2 = () => {
12036
12258
  left: 0;
12037
12259
  max-height: 90%;
12038
12260
  min-height: 3.5rem;
12039
- border-top: ${colors.darkGray[300]} 1px solid;
12261
+ border-top: ${t2(colors.gray[400], colors.darkGray[300])} 1px solid;
12040
12262
  `,
12041
12263
  "panel-position-right": u`
12042
12264
  bottom: 0;
12043
12265
  right: 0;
12044
12266
  top: 0;
12045
- border-left: ${colors.darkGray[300]} 1px solid;
12267
+ border-left: ${t2(colors.gray[400], colors.darkGray[300])} 1px solid;
12046
12268
  max-width: 90%;
12047
12269
  `,
12048
12270
  "panel-position-left": u`
12049
12271
  bottom: 0;
12050
12272
  left: 0;
12051
12273
  top: 0;
12052
- border-right: ${colors.darkGray[300]} 1px solid;
12274
+ border-right: ${t2(colors.gray[400], colors.darkGray[300])} 1px solid;
12053
12275
  max-width: 90%;
12054
12276
  `,
12055
12277
  closeBtn: u`
@@ -12060,13 +12282,15 @@ var getStyles2 = () => {
12060
12282
  align-items: center;
12061
12283
  justify-content: center;
12062
12284
  outline: none;
12285
+ background-color: ${t2(colors.gray[50], colors.darkGray[700])};
12063
12286
  &:hover {
12064
- background-color: ${colors.darkGray[500]};
12287
+ background-color: ${t2(colors.gray[200], colors.darkGray[500])};
12065
12288
  }
12066
12289
  &:focus-visible {
12067
12290
  outline: 2px solid ${colors.blue[600]};
12068
12291
  }
12069
12292
  & svg {
12293
+ color: ${t2(colors.gray[600], colors.gray[400])};
12070
12294
  width: ${size2[2]};
12071
12295
  height: ${size2[2]};
12072
12296
  }
@@ -12075,11 +12299,10 @@ var getStyles2 = () => {
12075
12299
  bottom: 0;
12076
12300
  right: ${size2[2]};
12077
12301
  transform: translate(0, 100%);
12078
- background-color: ${colors.darkGray[700]};
12079
- border-right: ${colors.darkGray[300]} 1px solid;
12080
- border-left: ${colors.darkGray[300]} 1px solid;
12302
+ border-right: ${t2(colors.gray[400], colors.darkGray[300])} 1px solid;
12303
+ border-left: ${t2(colors.gray[400], colors.darkGray[300])} 1px solid;
12081
12304
  border-top: none;
12082
- border-bottom: ${colors.darkGray[300]} 1px solid;
12305
+ border-bottom: ${t2(colors.gray[400], colors.darkGray[300])} 1px solid;
12083
12306
  border-radius: 0px 0px ${border.radius.sm} ${border.radius.sm};
12084
12307
  padding: ${size2[0.5]} ${size2[1.5]} ${size2[1]} ${size2[1.5]};
12085
12308
 
@@ -12100,10 +12323,9 @@ var getStyles2 = () => {
12100
12323
  top: 0;
12101
12324
  right: ${size2[2]};
12102
12325
  transform: translate(0, -100%);
12103
- background-color: ${colors.darkGray[700]};
12104
- border-right: ${colors.darkGray[300]} 1px solid;
12105
- border-left: ${colors.darkGray[300]} 1px solid;
12106
- border-top: ${colors.darkGray[300]} 1px solid;
12326
+ border-right: ${t2(colors.gray[400], colors.darkGray[300])} 1px solid;
12327
+ border-left: ${t2(colors.gray[400], colors.darkGray[300])} 1px solid;
12328
+ border-top: ${t2(colors.gray[400], colors.darkGray[300])} 1px solid;
12107
12329
  border-bottom: none;
12108
12330
  border-radius: ${border.radius.sm} ${border.radius.sm} 0px 0px;
12109
12331
  padding: ${size2[1]} ${size2[1.5]} ${size2[0.5]} ${size2[1.5]};
@@ -12121,11 +12343,10 @@ var getStyles2 = () => {
12121
12343
  bottom: ${size2[2]};
12122
12344
  left: 0;
12123
12345
  transform: translate(-100%, 0);
12124
- background-color: ${colors.darkGray[700]};
12125
12346
  border-right: none;
12126
- border-left: ${colors.darkGray[300]} 1px solid;
12127
- border-top: ${colors.darkGray[300]} 1px solid;
12128
- border-bottom: ${colors.darkGray[300]} 1px solid;
12347
+ border-left: ${t2(colors.gray[400], colors.darkGray[300])} 1px solid;
12348
+ border-top: ${t2(colors.gray[400], colors.darkGray[300])} 1px solid;
12349
+ border-bottom: ${t2(colors.gray[400], colors.darkGray[300])} 1px solid;
12129
12350
  border-radius: ${border.radius.sm} 0px 0px ${border.radius.sm};
12130
12351
  padding: ${size2[1.5]} ${size2[0.5]} ${size2[1.5]} ${size2[1]};
12131
12352
 
@@ -12145,11 +12366,10 @@ var getStyles2 = () => {
12145
12366
  bottom: ${size2[2]};
12146
12367
  right: 0;
12147
12368
  transform: translate(100%, 0);
12148
- background-color: ${colors.darkGray[700]};
12149
12369
  border-left: none;
12150
- border-right: ${colors.darkGray[300]} 1px solid;
12151
- border-top: ${colors.darkGray[300]} 1px solid;
12152
- border-bottom: ${colors.darkGray[300]} 1px solid;
12370
+ border-right: ${t2(colors.gray[400], colors.darkGray[300])} 1px solid;
12371
+ border-top: ${t2(colors.gray[400], colors.darkGray[300])} 1px solid;
12372
+ border-bottom: ${t2(colors.gray[400], colors.darkGray[300])} 1px solid;
12153
12373
  border-radius: 0px ${border.radius.sm} ${border.radius.sm} 0px;
12154
12374
  padding: ${size2[1.5]} ${size2[1]} ${size2[1.5]} ${size2[0.5]};
12155
12375
 
@@ -12167,15 +12387,18 @@ var getStyles2 = () => {
12167
12387
  `,
12168
12388
  queriesContainer: u`
12169
12389
  flex: 1 1 700px;
12170
- background-color: ${colors.darkGray[700]};
12390
+ background-color: ${t2(colors.gray[50], colors.darkGray[700])};
12171
12391
  display: flex;
12172
12392
  flex-direction: column;
12393
+ & * {
12394
+ font-family: 'Inter', sans-serif;
12395
+ }
12173
12396
  `,
12174
12397
  dragHandle: u`
12175
12398
  position: absolute;
12176
12399
  transition: background-color 0.125s ease;
12177
12400
  &:hover {
12178
- background-color: ${colors.purple[400]}${alpha[90]};
12401
+ background-color: ${colors.purple[400]}${t2("", alpha[90])};
12179
12402
  }
12180
12403
  z-index: 4;
12181
12404
  `,
@@ -12209,7 +12432,7 @@ var getStyles2 = () => {
12209
12432
  align-items: center;
12210
12433
  padding: ${tokens.size[2]} ${tokens.size[2.5]};
12211
12434
  gap: ${tokens.size[3]};
12212
- border-bottom: ${colors.darkGray[500]} 1px solid;
12435
+ border-bottom: ${t2(colors.gray[300], colors.darkGray[500])} 1px solid;
12213
12436
  align-items: center;
12214
12437
  & > button {
12215
12438
  padding: 0;
@@ -12236,11 +12459,15 @@ var getStyles2 = () => {
12236
12459
  font-weight: ${font.weight.bold};
12237
12460
  line-height: ${font.lineHeight.xs};
12238
12461
  white-space: nowrap;
12462
+ color: ${t2(colors.gray[600], colors.gray[300])};
12239
12463
  `,
12240
12464
  queryFlavorLogo: u`
12241
12465
  font-weight: ${font.weight.semibold};
12242
12466
  font-size: ${font.size.xs};
12243
- background: linear-gradient(to right, #dd524b, #e9a03b);
12467
+ background: linear-gradient(
12468
+ to right,
12469
+ ${t2("#ea4037, #ff9b11", "#dd524b, #e9a03b")}
12470
+ );
12244
12471
  background-clip: text;
12245
12472
  -webkit-background-clip: text;
12246
12473
  line-height: 1;
@@ -12255,14 +12482,17 @@ var getStyles2 = () => {
12255
12482
  queryStatusTag: u`
12256
12483
  display: flex;
12257
12484
  gap: ${tokens.size[1.5]};
12258
- background: ${colors.darkGray[500]};
12485
+ box-sizing: border-box;
12486
+ height: ${tokens.size[6.5]};
12487
+ background: ${t2(colors.gray[50], colors.darkGray[500])};
12488
+ color: ${t2(colors.gray[700], colors.gray[300])};
12259
12489
  border-radius: ${tokens.border.radius.sm};
12260
12490
  font-size: ${font.size.sm};
12261
12491
  padding: ${tokens.size[1]};
12262
- padding-left: ${tokens.size[2]};
12492
+ padding-left: ${tokens.size[1.5]};
12263
12493
  align-items: center;
12264
12494
  font-weight: ${font.weight.medium};
12265
- border: none;
12495
+ border: ${t2("1px solid " + colors.gray[300], "1px solid transparent")};
12266
12496
  user-select: none;
12267
12497
  position: relative;
12268
12498
  &:focus-visible {
@@ -12279,8 +12509,8 @@ var getStyles2 = () => {
12279
12509
  display: flex;
12280
12510
  align-items: center;
12281
12511
  justify-content: center;
12282
- color: ${colors.gray[400]};
12283
- background-color: ${colors.darkGray[300]};
12512
+ color: ${t2(colors.gray[500], colors.gray[400])};
12513
+ background-color: ${t2(colors.gray[200], colors.darkGray[300])};
12284
12514
  border-radius: 2px;
12285
12515
  font-variant-numeric: tabular-nums;
12286
12516
  height: ${tokens.size[4.5]};
@@ -12288,15 +12518,15 @@ var getStyles2 = () => {
12288
12518
  statusTooltip: u`
12289
12519
  position: absolute;
12290
12520
  z-index: 1;
12291
- background-color: ${colors.darkGray[500]};
12521
+ background-color: ${t2(colors.gray[50], colors.darkGray[500])};
12292
12522
  top: 100%;
12293
12523
  left: 50%;
12294
12524
  transform: translate(-50%, calc(${tokens.size[2]}));
12295
12525
  padding: ${tokens.size[0.5]} ${tokens.size[2]};
12296
- border-radius: ${tokens.border.radius.md};
12526
+ border-radius: ${tokens.border.radius.sm};
12297
12527
  font-size: ${font.size.xs};
12298
- border: 1px solid ${colors.gray[600]};
12299
- color: ${tokens.colors["gray"][300]};
12528
+ border: 1px solid ${t2(colors.gray[400], colors.gray[600])};
12529
+ color: ${t2(colors["gray"][600], colors["gray"][300])};
12300
12530
 
12301
12531
  &::before {
12302
12532
  top: 0px;
@@ -12305,7 +12535,8 @@ var getStyles2 = () => {
12305
12535
  left: 50%;
12306
12536
  transform: translate(-50%, -100%);
12307
12537
  position: absolute;
12308
- border-color: transparent transparent ${colors.gray[600]} transparent;
12538
+ border-color: transparent transparent
12539
+ ${t2(colors.gray[400], colors.gray[600])} transparent;
12309
12540
  border-style: solid;
12310
12541
  border-width: 7px;
12311
12542
  /* transform: rotate(180deg); */
@@ -12316,17 +12547,14 @@ var getStyles2 = () => {
12316
12547
  content: ' ';
12317
12548
  display: block;
12318
12549
  left: 50%;
12319
- transform: translate(-50%, calc(-100% + 2.5px));
12550
+ transform: translate(-50%, calc(-100% + 2px));
12320
12551
  position: absolute;
12321
- border-color: transparent transparent ${colors.darkGray[500]}
12322
- transparent;
12552
+ border-color: transparent transparent
12553
+ ${t2(colors.gray[100], colors.darkGray[500])} transparent;
12323
12554
  border-style: solid;
12324
12555
  border-width: 7px;
12325
12556
  }
12326
12557
  `,
12327
- selectedQueryRow: u`
12328
- background-color: ${colors.darkGray[500]};
12329
- `,
12330
12558
  filtersContainer: u`
12331
12559
  display: flex;
12332
12560
  gap: ${tokens.size[2]};
@@ -12335,47 +12563,52 @@ var getStyles2 = () => {
12335
12563
  padding: ${tokens.size[0.5]} ${tokens.size[2]};
12336
12564
  padding-right: ${tokens.size[1.5]};
12337
12565
  border-radius: ${tokens.border.radius.sm};
12338
- background-color: ${colors.darkGray[400]};
12566
+ background-color: ${t2(colors.gray[100], colors.darkGray[400])};
12567
+ border: 1px solid ${t2(colors.gray[300], colors.darkGray[200])};
12568
+ color: ${t2(colors.gray[700], colors.gray[300])};
12339
12569
  font-size: ${font.size.xs};
12340
12570
  display: flex;
12341
12571
  align-items: center;
12342
12572
  line-height: ${font.lineHeight.sm};
12343
12573
  gap: ${tokens.size[1.5]};
12344
12574
  max-width: 160px;
12345
- border: 1px solid ${colors.darkGray[200]};
12346
12575
  &:focus-visible {
12347
12576
  outline-offset: 2px;
12348
12577
  border-radius: ${border.radius.xs};
12349
12578
  outline: 2px solid ${colors.blue[800]};
12350
12579
  }
12580
+ & svg {
12581
+ color: ${t2(colors.gray[500], colors.gray[400])};
12582
+ }
12351
12583
  }
12352
12584
  `,
12353
12585
  filterInput: u`
12354
- padding: ${tokens.size[0.5]} ${tokens.size[2]};
12586
+ padding: ${size2[0.5]} ${size2[2]};
12355
12587
  border-radius: ${tokens.border.radius.sm};
12356
- background-color: ${colors.darkGray[400]};
12588
+ background-color: ${t2(colors.gray[100], colors.darkGray[400])};
12357
12589
  display: flex;
12358
12590
  box-sizing: content-box;
12359
12591
  align-items: center;
12360
12592
  gap: ${tokens.size[1.5]};
12361
12593
  max-width: 160px;
12362
12594
  min-width: 100px;
12363
- border: 1px solid ${colors.darkGray[200]};
12595
+ border: 1px solid ${t2(colors.gray[300], colors.darkGray[200])};
12364
12596
  height: min-content;
12597
+ color: ${t2(colors.gray[600], colors.gray[400])};
12365
12598
  & > svg {
12366
- width: ${tokens.size[3]};
12367
- height: ${tokens.size[3]};
12599
+ width: ${size2[3]};
12600
+ height: ${size2[3]};
12368
12601
  }
12369
12602
  & input {
12370
12603
  font-size: ${font.size.xs};
12371
12604
  width: 100%;
12372
- background-color: ${colors.darkGray[400]};
12605
+ background-color: ${t2(colors.gray[100], colors.darkGray[400])};
12373
12606
  border: none;
12374
12607
  padding: 0;
12375
12608
  line-height: ${font.lineHeight.sm};
12376
- color: ${colors.gray[300]};
12609
+ color: ${t2(colors.gray[700], colors.gray[300])};
12377
12610
  &::placeholder {
12378
- color: ${colors.gray[300]};
12611
+ color: ${t2(colors.gray[700], colors.gray[300])};
12379
12612
  }
12380
12613
  &:focus {
12381
12614
  outline: none;
@@ -12391,24 +12624,26 @@ var getStyles2 = () => {
12391
12624
  filterSelect: u`
12392
12625
  padding: ${tokens.size[0.5]} ${tokens.size[2]};
12393
12626
  border-radius: ${tokens.border.radius.sm};
12394
- background-color: ${colors.darkGray[400]};
12627
+ background-color: ${t2(colors.gray[100], colors.darkGray[400])};
12395
12628
  display: flex;
12396
12629
  align-items: center;
12397
12630
  gap: ${tokens.size[1.5]};
12398
12631
  box-sizing: content-box;
12399
12632
  max-width: 160px;
12400
- border: 1px solid ${colors.darkGray[200]};
12633
+ border: 1px solid ${t2(colors.gray[300], colors.darkGray[200])};
12401
12634
  height: min-content;
12402
12635
  & > svg {
12636
+ color: ${t2(colors.gray[600], colors.gray[400])};
12403
12637
  width: ${tokens.size[2]};
12404
12638
  height: ${tokens.size[2]};
12405
12639
  }
12406
12640
  & > select {
12407
12641
  appearance: none;
12642
+ color: ${t2(colors.gray[700], colors.gray[300])};
12408
12643
  min-width: 100px;
12409
12644
  line-height: ${font.lineHeight.sm};
12410
12645
  font-size: ${font.size.xs};
12411
- background-color: ${colors.darkGray[400]};
12646
+ background-color: ${t2(colors.gray[100], colors.darkGray[400])};
12412
12647
  border: none;
12413
12648
  &:focus {
12414
12649
  outline: none;
@@ -12426,7 +12661,8 @@ var getStyles2 = () => {
12426
12661
  `,
12427
12662
  actionsBtn: u`
12428
12663
  border-radius: ${tokens.border.radius.sm};
12429
- background-color: ${colors.darkGray[400]};
12664
+ background-color: ${t2(colors.gray[100], colors.darkGray[400])};
12665
+ border: 1px solid ${t2(colors.gray[300], colors.darkGray[200])};
12430
12666
  width: 1.625rem;
12431
12667
  height: 1.625rem;
12432
12668
  justify-content: center;
@@ -12434,13 +12670,13 @@ var getStyles2 = () => {
12434
12670
  align-items: center;
12435
12671
  gap: ${tokens.size[1.5]};
12436
12672
  max-width: 160px;
12437
- border: 1px solid ${colors.darkGray[200]};
12438
12673
  cursor: pointer;
12439
12674
  padding: 0;
12440
12675
  &:hover {
12441
- background-color: ${colors.darkGray[500]};
12676
+ background-color: ${t2(colors.gray[200], colors.darkGray[500])};
12442
12677
  }
12443
12678
  & svg {
12679
+ color: ${t2(colors.gray[700], colors.gray[300])};
12444
12680
  width: ${tokens.size[3]};
12445
12681
  height: ${tokens.size[3]};
12446
12682
  }
@@ -12450,6 +12686,12 @@ var getStyles2 = () => {
12450
12686
  outline: 2px solid ${colors.blue[800]};
12451
12687
  }
12452
12688
  `,
12689
+ actionsBtnOffline: u`
12690
+ & svg {
12691
+ stroke: ${t2(colors.yellow[700], colors.yellow[500])};
12692
+ fill: ${t2(colors.yellow[700], colors.yellow[500])};
12693
+ }
12694
+ `,
12453
12695
  overflowQueryContainer: u`
12454
12696
  flex: 1;
12455
12697
  overflow-y: auto;
@@ -12462,9 +12704,11 @@ var getStyles2 = () => {
12462
12704
  display: flex;
12463
12705
  align-items: center;
12464
12706
  padding: 0;
12465
- background-color: inherit;
12466
12707
  border: none;
12467
12708
  cursor: pointer;
12709
+ color: ${t2(colors.gray[700], colors.gray[300])};
12710
+ background-color: ${t2(colors.gray[50], colors.darkGray[700])};
12711
+ line-height: 1;
12468
12712
  &:focus {
12469
12713
  outline: none;
12470
12714
  }
@@ -12474,7 +12718,7 @@ var getStyles2 = () => {
12474
12718
  outline: 2px solid ${colors.blue[800]};
12475
12719
  }
12476
12720
  &:hover .tsqd-query-hash {
12477
- background-color: ${colors.darkGray[600]};
12721
+ background-color: ${t2(colors.gray[200], colors.darkGray[600])};
12478
12722
  }
12479
12723
 
12480
12724
  & .tsqd-query-observer-count {
@@ -12489,7 +12733,7 @@ var getStyles2 = () => {
12489
12733
  font-weight: ${font.weight.medium};
12490
12734
  border-bottom-width: 1px;
12491
12735
  border-bottom-style: solid;
12492
- border-bottom: 1px solid ${colors.darkGray[700]};
12736
+ border-bottom: 1px solid ${t2(colors.gray[300], colors.darkGray[700])};
12493
12737
  }
12494
12738
  & .tsqd-query-hash {
12495
12739
  user-select: text;
@@ -12500,7 +12744,7 @@ var getStyles2 = () => {
12500
12744
  flex: 1;
12501
12745
  padding: ${tokens.size[1]} ${tokens.size[2]};
12502
12746
  font-family: 'Menlo', 'Fira Code', monospace;
12503
- border-bottom: 1px solid ${colors.darkGray[400]};
12747
+ border-bottom: 1px solid ${t2(colors.gray[300], colors.darkGray[400])};
12504
12748
  text-align: left;
12505
12749
  text-overflow: clip;
12506
12750
  word-break: break-word;
@@ -12511,15 +12755,20 @@ var getStyles2 = () => {
12511
12755
  display: flex;
12512
12756
  align-items: center;
12513
12757
  padding: 0 ${tokens.size[2]};
12514
- color: ${colors.gray[300]};
12515
- background-color: ${colors.darkGray[600]};
12516
- border-bottom: 1px solid ${colors.darkGray[400]};
12758
+ color: ${t2(colors.gray[800], colors.gray[300])};
12759
+ background-color: ${t2(colors.gray[300], colors.darkGray[600])};
12760
+ border-bottom: 1px solid ${t2(colors.gray[300], colors.darkGray[400])};
12517
12761
  font-size: ${font.size.xs};
12518
12762
  }
12519
12763
  `,
12764
+ selectedQueryRow: u`
12765
+ background-color: ${t2(colors.gray[200], colors.darkGray[500])};
12766
+ `,
12520
12767
  detailsContainer: u`
12521
12768
  flex: 1 1 700px;
12522
- background-color: ${colors.darkGray[700]};
12769
+ background-color: ${t2(colors.gray[50], colors.darkGray[700])};
12770
+ color: ${t2(colors.gray[700], colors.gray[300])};
12771
+ font-family: 'Inter', sans-serif;
12523
12772
  display: flex;
12524
12773
  flex-direction: column;
12525
12774
  overflow-y: auto;
@@ -12527,10 +12776,11 @@ var getStyles2 = () => {
12527
12776
  text-align: left;
12528
12777
  `,
12529
12778
  detailsHeader: u`
12779
+ font-family: 'Inter', sans-serif;
12530
12780
  position: sticky;
12531
12781
  top: 0;
12532
12782
  z-index: 2;
12533
- background-color: ${colors.darkGray[600]};
12783
+ background-color: ${t2(colors.gray[200], colors.darkGray[600])};
12534
12784
  padding: ${tokens.size[1.5]} ${tokens.size[2]};
12535
12785
  font-weight: ${font.weight.medium};
12536
12786
  font-size: ${font.size.xs};
@@ -12563,6 +12813,10 @@ var getStyles2 = () => {
12563
12813
  font-size: ${font.size.xs};
12564
12814
  line-height: ${font.lineHeight.xs};
12565
12815
  }
12816
+
12817
+ & pre {
12818
+ margin: 0;
12819
+ }
12566
12820
  `,
12567
12821
  queryDetailsStatus: u`
12568
12822
  border: 1px solid ${colors.darkGray[200]};
@@ -12577,12 +12831,13 @@ var getStyles2 = () => {
12577
12831
  gap: ${tokens.size[2]};
12578
12832
  padding: 0px ${tokens.size[2]};
12579
12833
  & > button {
12834
+ font-family: 'Inter', sans-serif;
12580
12835
  font-size: ${font.size.xs};
12581
12836
  padding: ${tokens.size[1]} ${tokens.size[2]};
12582
12837
  display: flex;
12583
12838
  border-radius: ${tokens.border.radius.sm};
12584
- border: 1px solid ${colors.darkGray[400]};
12585
- background-color: ${colors.darkGray[600]};
12839
+ background-color: ${t2(colors.gray[100], colors.darkGray[600])};
12840
+ border: 1px solid ${t2(colors.gray[300], colors.darkGray[400])};
12586
12841
  align-items: center;
12587
12842
  gap: ${tokens.size[2]};
12588
12843
  font-weight: ${font.weight.medium};
@@ -12594,7 +12849,7 @@ var getStyles2 = () => {
12594
12849
  outline: 2px solid ${colors.blue[800]};
12595
12850
  }
12596
12851
  &:hover {
12597
- background-color: ${colors.darkGray[500]};
12852
+ background-color: ${t2(colors.gray[200], colors.darkGray[500])};
12598
12853
  }
12599
12854
 
12600
12855
  &:disabled {
@@ -12615,17 +12870,17 @@ var getStyles2 = () => {
12615
12870
  display: flex;
12616
12871
  border-radius: ${tokens.border.radius.sm};
12617
12872
  overflow: hidden;
12618
- border: 1px solid ${colors.darkGray[400]};
12619
- background-color: ${colors.darkGray[600]};
12873
+ background-color: ${t2(colors.gray[100], colors.darkGray[600])};
12874
+ border: 1px solid ${t2(colors.gray[300], colors.darkGray[400])};
12620
12875
  align-items: center;
12621
12876
  gap: ${tokens.size[2]};
12622
12877
  font-weight: ${font.weight.medium};
12623
12878
  line-height: ${font.lineHeight.sm};
12624
- color: ${tokens.colors.red[400]};
12879
+ color: ${t2(colors.red[500], colors.red[400])};
12625
12880
  cursor: pointer;
12626
12881
  position: relative;
12627
12882
  &:hover {
12628
- background-color: ${colors.darkGray[500]};
12883
+ background-color: ${t2(colors.gray[200], colors.darkGray[500])};
12629
12884
  }
12630
12885
  & > span {
12631
12886
  width: ${size2[1.5]};
@@ -12666,10 +12921,10 @@ var getStyles2 = () => {
12666
12921
  flex-direction: column;
12667
12922
  gap: ${size2[0.5]};
12668
12923
  border-radius: ${tokens.border.radius.sm};
12669
- border: 1px solid ${colors.gray[700]};
12670
- background-color: ${colors.darkGray[600]};
12924
+ border: 1px solid ${t2(colors.gray[300], colors.gray[700])};
12925
+ background-color: ${t2(colors.gray[50], colors.darkGray[600])};
12671
12926
  font-size: ${font.size.xs};
12672
- color: ${colors.gray[300]};
12927
+ color: ${t2(colors.gray[700], colors.gray[300])};
12673
12928
  z-index: 99999;
12674
12929
  min-width: 120px;
12675
12930
  padding: ${size2[0.5]};
@@ -12679,17 +12934,19 @@ var getStyles2 = () => {
12679
12934
  align-items: center;
12680
12935
  justify-content: space-between;
12681
12936
  border-radius: ${tokens.border.radius.xs};
12682
- padding: ${tokens.size[0.5]} ${tokens.size[1]};
12937
+ padding: ${tokens.size[1]} ${tokens.size[1]};
12683
12938
  cursor: pointer;
12684
12939
  background-color: transparent;
12685
12940
  border: none;
12941
+ color: ${t2(colors.gray[700], colors.gray[300])};
12686
12942
  & svg {
12943
+ color: ${t2(colors.gray[600], colors.gray[400])};
12687
12944
  transform: rotate(-90deg);
12688
12945
  width: ${tokens.size[2]};
12689
12946
  height: ${tokens.size[2]};
12690
12947
  }
12691
12948
  &:hover {
12692
- background-color: ${colors.darkGray[500]};
12949
+ background-color: ${t2(colors.gray[200], colors.darkGray[500])};
12693
12950
  }
12694
12951
  &:focus-visible {
12695
12952
  outline-offset: 2px;
@@ -12701,33 +12958,48 @@ var getStyles2 = () => {
12701
12958
  }
12702
12959
  `,
12703
12960
  settingsMenuHeader: u`
12704
- padding: ${tokens.size[0.5]} ${tokens.size[1]};
12961
+ padding: ${tokens.size[1]} ${tokens.size[1]};
12705
12962
  font-weight: ${font.weight.medium};
12706
- border-bottom: 1px solid ${colors.darkGray[400]};
12707
- color: ${colors.gray[400]};
12963
+ border-bottom: 1px solid ${t2(colors.gray[300], colors.darkGray[400])};
12964
+ color: ${t2(colors.gray[500], colors.gray[400])};
12708
12965
  font-size: ${font.size["xs"]};
12709
12966
  `,
12710
12967
  settingsSubButton: u`
12711
12968
  display: flex;
12712
12969
  align-items: center;
12713
12970
  justify-content: space-between;
12714
- color: ${colors.gray[300]};
12971
+ color: ${t2(colors.gray[700], colors.gray[300])};
12715
12972
  font-size: ${font.size["xs"]};
12716
12973
  border-radius: ${tokens.border.radius.xs};
12717
- padding: ${tokens.size[0.5]} ${tokens.size[1]};
12974
+ padding: ${tokens.size[1]} ${tokens.size[1]};
12718
12975
  cursor: pointer;
12719
12976
  background-color: transparent;
12720
12977
  border: none;
12978
+ & svg {
12979
+ color: ${t2(colors.gray[600], colors.gray[400])};
12980
+ }
12721
12981
  &:hover {
12722
- background-color: ${colors.darkGray[500]};
12982
+ background-color: ${t2(colors.gray[200], colors.darkGray[500])};
12723
12983
  }
12724
12984
  &:focus-visible {
12725
12985
  outline-offset: 2px;
12726
12986
  outline: 2px solid ${colors.blue[800]};
12727
12987
  }
12988
+ `,
12989
+ themeSelectedButton: u`
12990
+ background-color: ${t2(colors.purple[100], colors.purple[900])};
12991
+ color: ${t2(colors.purple[700], colors.purple[300])};
12992
+ & svg {
12993
+ color: ${t2(colors.purple[700], colors.purple[300])};
12994
+ }
12995
+ &:hover {
12996
+ background-color: ${t2(colors.purple[100], colors.purple[900])};
12997
+ }
12728
12998
  `
12729
12999
  };
12730
13000
  };
13001
+ var lightStyles2 = stylesFactory2("light");
13002
+ var darkStyles2 = stylesFactory2("dark");
12731
13003
  export {
12732
13004
  Devtools,
12733
13005
  DevtoolsComponent,