@tanstack/query-devtools 5.0.0-rc.5 → 5.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -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
  >
@@ -9787,6 +9843,36 @@ function List() {
9787
9843
  <line class="list-item" y1="17" y2="17" x1="6" x2="18" />
9788
9844
  </svg>;
9789
9845
  }
9846
+ function Check(props) {
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
+ </>;
9875
+ }
9790
9876
  function TanstackLogo() {
9791
9877
  return <svg version="1.0" viewBox="0 0 633 633">
9792
9878
  <linearGradient
@@ -10513,6 +10599,12 @@ var QueryDevtoolsContext = createContext({
10513
10599
  function useQueryDevtoolsContext() {
10514
10600
  return useContext(QueryDevtoolsContext);
10515
10601
  }
10602
+ var ThemeContext = createContext(
10603
+ () => "dark"
10604
+ );
10605
+ function useTheme() {
10606
+ return useContext(ThemeContext);
10607
+ }
10516
10608
 
10517
10609
  // src/Explorer.tsx
10518
10610
  function chunkArray(array, size2) {
@@ -10527,10 +10619,13 @@ function chunkArray(array, size2) {
10527
10619
  return result;
10528
10620
  }
10529
10621
  var Expander = (props) => {
10530
- const styles = getStyles();
10622
+ const theme = useTheme();
10623
+ const styles = createMemo(() => {
10624
+ return theme() === "dark" ? darkStyles : lightStyles;
10625
+ });
10531
10626
  return <span
10532
10627
  class={clsx(
10533
- styles.expander,
10628
+ styles().expander,
10534
10629
  u`
10535
10630
  transform: rotate(${props.expanded ? 90 : 0}deg);
10536
10631
  `,
@@ -10554,10 +10649,13 @@ var Expander = (props) => {
10554
10649
  /></svg></span>;
10555
10650
  };
10556
10651
  var CopyButton = (props) => {
10557
- const styles = getStyles();
10652
+ const theme = useTheme();
10653
+ const styles = createMemo(() => {
10654
+ return theme() === "dark" ? darkStyles : lightStyles;
10655
+ });
10558
10656
  const [copyState, setCopyState] = createSignal("NoCopy");
10559
10657
  return <button
10560
- class={styles.actionButton}
10658
+ class={styles().actionButton}
10561
10659
  title="Copy object to clipboard"
10562
10660
  aria-label={`${copyState() === "NoCopy" ? "Copy object to clipboard" : copyState() === "SuccessCopy" ? "Object copied to clipboard" : "Error copying object to clipboard"}`}
10563
10661
  onClick={copyState() === "NoCopy" ? () => {
@@ -10578,15 +10676,18 @@ var CopyButton = (props) => {
10578
10676
  } : void 0}
10579
10677
  ><Switch>
10580
10678
  <Match when={copyState() === "NoCopy"}><Copier /></Match>
10581
- <Match when={copyState() === "SuccessCopy"}><CopiedCopier /></Match>
10679
+ <Match when={copyState() === "SuccessCopy"}><CopiedCopier theme={theme()} /></Match>
10582
10680
  <Match when={copyState() === "ErrorCopy"}><ErrorCopier /></Match>
10583
10681
  </Switch></button>;
10584
10682
  };
10585
10683
  var ClearArrayButton = (props) => {
10586
- const styles = getStyles();
10684
+ const theme = useTheme();
10685
+ const styles = createMemo(() => {
10686
+ return theme() === "dark" ? darkStyles : lightStyles;
10687
+ });
10587
10688
  const queryClient = useQueryDevtoolsContext().client;
10588
10689
  return <button
10589
- class={styles.actionButton}
10690
+ class={styles().actionButton}
10590
10691
  title="Remove all items"
10591
10692
  aria-label="Remove all items"
10592
10693
  onClick={() => {
@@ -10597,10 +10698,13 @@ var ClearArrayButton = (props) => {
10597
10698
  ><List /></button>;
10598
10699
  };
10599
10700
  var DeleteItemButton = (props) => {
10600
- const styles = getStyles();
10701
+ const theme = useTheme();
10702
+ const styles = createMemo(() => {
10703
+ return theme() === "dark" ? darkStyles : lightStyles;
10704
+ });
10601
10705
  const queryClient = useQueryDevtoolsContext().client;
10602
10706
  return <button
10603
- class={clsx(styles.actionButton)}
10707
+ class={clsx(styles().actionButton)}
10604
10708
  title="Delete item"
10605
10709
  aria-label="Delete item"
10606
10710
  onClick={() => {
@@ -10610,11 +10714,41 @@ var DeleteItemButton = (props) => {
10610
10714
  }}
10611
10715
  ><Trash /></button>;
10612
10716
  };
10717
+ var ToggleValueButton = (props) => {
10718
+ const theme = useTheme();
10719
+ const styles = createMemo(() => {
10720
+ return theme() === "dark" ? darkStyles : lightStyles;
10721
+ });
10722
+ const queryClient = useQueryDevtoolsContext().client;
10723
+ return <button
10724
+ class={clsx(
10725
+ styles().actionButton,
10726
+ u`
10727
+ width: ${tokens.size[3.5]};
10728
+ height: ${tokens.size[3.5]};
10729
+ `
10730
+ )}
10731
+ title="Toggle value"
10732
+ aria-label="Toggle value"
10733
+ onClick={() => {
10734
+ const oldData = props.activeQuery.state.data;
10735
+ const newData = updateNestedDataByPath(
10736
+ oldData,
10737
+ props.dataPath,
10738
+ !props.value
10739
+ );
10740
+ queryClient.setQueryData(props.activeQuery.queryKey, newData);
10741
+ }}
10742
+ ><Check theme={theme()} checked={props.value} /></button>;
10743
+ };
10613
10744
  function isIterable(x) {
10614
10745
  return Symbol.iterator in x;
10615
10746
  }
10616
10747
  function Explorer(props) {
10617
- const styles = getStyles();
10748
+ const theme = useTheme();
10749
+ const styles = createMemo(() => {
10750
+ return theme() === "dark" ? darkStyles : lightStyles;
10751
+ });
10618
10752
  const queryClient = useQueryDevtoolsContext().client;
10619
10753
  const [expanded, setExpanded] = createSignal(
10620
10754
  (props.defaultExpanded || []).includes(props.label)
@@ -10658,25 +10792,25 @@ function Explorer(props) {
10658
10792
  });
10659
10793
  const subEntryPages = createMemo(() => chunkArray(subEntries(), 100));
10660
10794
  const currentDataPath = props.dataPath ?? [];
10661
- return <div class={styles.entry}>
10795
+ return <div class={styles().entry}>
10662
10796
  <Show when={subEntryPages().length}>
10663
- <div class={styles.expanderButtonContainer}>
10797
+ <div class={styles().expanderButtonContainer}>
10664
10798
  <button
10665
- class={styles.expanderButton}
10799
+ class={styles().expanderButton}
10666
10800
  onClick={() => toggleExpanded()}
10667
10801
  >
10668
10802
  <Expander expanded={expanded()} />
10669
10803
  {" "}
10670
10804
  <span>{props.label}</span>
10671
10805
  {" "}
10672
- <span class={styles.info}>
10806
+ <span class={styles().info}>
10673
10807
  {String(type()).toLowerCase() === "iterable" ? "(Iterable) " : ""}
10674
10808
  {subEntries().length}
10675
10809
  {" "}
10676
10810
  {subEntries().length > 1 ? `items` : `item`}
10677
10811
  </span>
10678
10812
  </button>
10679
- <Show when={props.editable}><div class={styles.actions}>
10813
+ <Show when={props.editable}><div class={styles().actions}>
10680
10814
  <CopyButton value={props.value} />
10681
10815
  <Show
10682
10816
  when={props.itemsDeletable && props.activeQuery !== void 0}
@@ -10693,7 +10827,7 @@ function Explorer(props) {
10693
10827
  </div></Show>
10694
10828
  </div>
10695
10829
  <Show when={expanded()}>
10696
- <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) => {
10697
10831
  return <Explorer
10698
10832
  defaultExpanded={props.defaultExpanded}
10699
10833
  label={entry().label}
@@ -10704,12 +10838,12 @@ function Explorer(props) {
10704
10838
  itemsDeletable={type() === "array" || type() === "Iterable" || type() === "object"}
10705
10839
  />;
10706
10840
  }}</Key></div></Show>
10707
- <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}>
10708
10842
  <button
10709
10843
  onClick={() => setExpandedPages(
10710
10844
  (old) => old.includes(index) ? old.filter((d) => d !== index) : [...old, index]
10711
10845
  )}
10712
- class={styles.expanderButton}
10846
+ class={styles().expanderButton}
10713
10847
  >
10714
10848
  <Expander expanded={expandedPages().includes(index)} />
10715
10849
  {" "}
@@ -10719,7 +10853,7 @@ function Explorer(props) {
10719
10853
  {index * 100 + 100 - 1}
10720
10854
  {"]"}
10721
10855
  </button>
10722
- <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
10723
10857
  defaultExpanded={props.defaultExpanded}
10724
10858
  label={entry().label}
10725
10859
  value={entry().value}
@@ -10730,28 +10864,46 @@ function Explorer(props) {
10730
10864
  </div></div>}</Index></div></Show>
10731
10865
  </Show>
10732
10866
  </Show>
10733
- <Show when={subEntryPages().length === 0}><div class={styles.row}>
10734
- <span class={styles.label}>
10867
+ <Show when={subEntryPages().length === 0}><div class={styles().row}>
10868
+ <span class={styles().label}>
10735
10869
  {props.label}
10736
10870
  {":"}
10737
10871
  </span>
10738
10872
  <Show
10739
- when={props.editable && props.activeQuery !== void 0 && (type() === "string" || type() === "number")}
10740
- fallback={<span class={styles.value}>{displayValue(props.value)}</span>}
10741
- ><input
10742
- type={type() === "number" ? "number" : "text"}
10743
- class={clsx(styles.value, styles.editableInput)}
10744
- value={props.value}
10745
- onChange={(changeEvent) => {
10746
- const oldData = props.activeQuery.state.data;
10747
- const newData = updateNestedDataByPath(
10748
- oldData,
10749
- currentDataPath,
10750
- type() === "number" ? changeEvent.target.valueAsNumber : changeEvent.target.value
10751
- );
10752
- queryClient.setQueryData(props.activeQuery.queryKey, newData);
10753
- }}
10754
- /></Show>
10873
+ when={props.editable && props.activeQuery !== void 0 && (type() === "string" || type() === "number" || type() === "boolean")}
10874
+ fallback={<span class={styles().value}>{displayValue(props.value)}</span>}
10875
+ >
10876
+ <Show
10877
+ when={props.editable && props.activeQuery !== void 0 && (type() === "string" || type() === "number")}
10878
+ ><input
10879
+ type={type() === "number" ? "number" : "text"}
10880
+ class={clsx(styles().value, styles().editableInput)}
10881
+ value={props.value}
10882
+ onChange={(changeEvent) => {
10883
+ const oldData = props.activeQuery.state.data;
10884
+ const newData = updateNestedDataByPath(
10885
+ oldData,
10886
+ currentDataPath,
10887
+ type() === "number" ? changeEvent.target.valueAsNumber : changeEvent.target.value
10888
+ );
10889
+ queryClient.setQueryData(props.activeQuery.queryKey, newData);
10890
+ }}
10891
+ /></Show>
10892
+ <Show when={type() === "boolean"}><span
10893
+ class={clsx(
10894
+ styles().value,
10895
+ styles().actions,
10896
+ styles().editableInput
10897
+ )}
10898
+ >
10899
+ <ToggleValueButton
10900
+ activeQuery={props.activeQuery}
10901
+ dataPath={currentDataPath}
10902
+ value={props.value}
10903
+ />
10904
+ {displayValue(props.value)}
10905
+ </span></Show>
10906
+ </Show>
10755
10907
  <Show
10756
10908
  when={props.editable && props.itemsDeletable && props.activeQuery !== void 0}
10757
10909
  ><DeleteItemButton
@@ -10761,8 +10913,9 @@ function Explorer(props) {
10761
10913
  </div></Show>
10762
10914
  </div>;
10763
10915
  }
10764
- var getStyles = () => {
10916
+ var stylesFactory = (theme) => {
10765
10917
  const { colors, font, size: size2, border } = tokens;
10918
+ const t2 = (light, dark) => theme === "light" ? light : dark;
10766
10919
  return {
10767
10920
  entry: u`
10768
10921
  & * {
@@ -10776,7 +10929,7 @@ var getStyles = () => {
10776
10929
  subEntry: u`
10777
10930
  margin: 0 0 0 0.5em;
10778
10931
  padding-left: 0.75em;
10779
- border-left: 2px solid ${colors.darkGray[400]};
10932
+ border-left: 2px solid ${t2(colors.gray[300], colors.darkGray[400])};
10780
10933
  /* outline: 1px solid ${colors.teal[400]}; */
10781
10934
  `,
10782
10935
  expander: u`
@@ -10825,21 +10978,22 @@ var getStyles = () => {
10825
10978
  }
10826
10979
  `,
10827
10980
  info: u`
10828
- color: ${colors.gray[500]};
10981
+ color: ${t2(colors.gray[500], colors.gray[500])};
10829
10982
  font-size: ${font.size.xs};
10830
10983
  margin-left: ${size2[1]};
10831
10984
  /* outline: 1px solid ${colors.yellow[400]}; */
10832
10985
  `,
10833
10986
  label: u`
10834
- color: ${colors.gray[300]};
10987
+ color: ${t2(colors.gray[700], colors.gray[300])};
10835
10988
  `,
10836
10989
  value: u`
10837
- color: ${colors.purple[400]};
10990
+ color: ${t2(colors.purple[600], colors.purple[400])};
10838
10991
  flex-grow: 1;
10839
10992
  `,
10840
10993
  actions: u`
10841
10994
  display: inline-flex;
10842
10995
  gap: ${size2[2]};
10996
+ align-items: center;
10843
10997
  `,
10844
10998
  row: u`
10845
10999
  display: inline-flex;
@@ -10847,19 +11001,22 @@ var getStyles = () => {
10847
11001
  width: 100%;
10848
11002
  margin-bottom: ${size2[0.5]};
10849
11003
  line-height: 1.125rem;
11004
+ align-items: center;
10850
11005
  `,
10851
11006
  editableInput: u`
10852
11007
  border: none;
10853
- padding: 0px ${size2[1]};
11008
+ padding: ${size2[0.5]} ${size2[1]} ${size2[0.5]} ${size2[1.5]};
10854
11009
  flex-grow: 1;
10855
- background-color: ${colors.gray[900]};
11010
+ border-radius: ${border.radius.xs};
11011
+ background-color: ${t2(colors.gray[200], colors.darkGray[500])};
10856
11012
 
10857
11013
  &:hover {
10858
- background-color: ${colors.gray[800]};
11014
+ background-color: ${t2(colors.gray[300], colors.darkGray[600])};
10859
11015
  }
10860
11016
  `,
10861
11017
  actionButton: u`
10862
11018
  background-color: transparent;
11019
+ color: ${t2(colors.gray[500], colors.gray[500])};
10863
11020
  border: none;
10864
11021
  display: inline-flex;
10865
11022
  padding: 0px;
@@ -10872,14 +11029,7 @@ var getStyles = () => {
10872
11029
  z-index: 1;
10873
11030
 
10874
11031
  &:hover svg {
10875
- .copier,
10876
- .list {
10877
- stroke: ${colors.gray[500]} !important;
10878
- }
10879
-
10880
- .list-item {
10881
- stroke: ${colors.gray[700]};
10882
- }
11032
+ color: ${t2(colors.gray[600], colors.gray[400])};
10883
11033
  }
10884
11034
 
10885
11035
  &:focus-visible {
@@ -10890,6 +11040,8 @@ var getStyles = () => {
10890
11040
  `
10891
11041
  };
10892
11042
  };
11043
+ var lightStyles = stylesFactory("light");
11044
+ var darkStyles = stylesFactory("dark");
10893
11045
 
10894
11046
  // src/fonts.ts
10895
11047
  var loadFonts = () => {
@@ -10905,6 +11057,7 @@ var secondBreakpoint = 796;
10905
11057
  var thirdBreakpoint = 700;
10906
11058
  var BUTTON_POSITION = "bottom-right";
10907
11059
  var POSITION = "bottom";
11060
+ var THEME_PREFERENCE = "system";
10908
11061
  var INITIAL_IS_OPEN = false;
10909
11062
  var DEFAULT_HEIGHT = 500;
10910
11063
  var DEFAULT_WIDTH = 500;
@@ -10915,28 +11068,38 @@ var [selectedQueryHash, setSelectedQueryHash] = createSignal(
10915
11068
  );
10916
11069
  var [panelWidth, setPanelWidth] = createSignal(0);
10917
11070
  var DevtoolsComponent = (props) => {
10918
- 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>;
10919
11082
  };
10920
11083
  var Devtools_default = DevtoolsComponent;
10921
- var Devtools = () => {
11084
+ var Devtools = (props) => {
10922
11085
  loadFonts();
10923
- const styles = getStyles2();
10924
- const [localStore, setLocalStore] = createLocalStorage({
10925
- prefix: "TanstackQueryDevtools"
11086
+ const theme = useTheme();
11087
+ const styles = createMemo(() => {
11088
+ return theme() === "dark" ? darkStyles2 : lightStyles2;
10926
11089
  });
10927
11090
  const buttonPosition = createMemo(() => {
10928
11091
  return useQueryDevtoolsContext().buttonPosition || BUTTON_POSITION;
10929
11092
  });
10930
11093
  const isOpen = createMemo(() => {
10931
- 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;
10932
11095
  });
10933
11096
  const position = createMemo(() => {
10934
- return localStore.position || useQueryDevtoolsContext().position || POSITION;
11097
+ return props.localStore.position || useQueryDevtoolsContext().position || POSITION;
10935
11098
  });
10936
11099
  createEffect(() => {
10937
11100
  const root = document.querySelector(".tsqd-parent-container");
10938
- const height = localStore.height || DEFAULT_HEIGHT;
10939
- const width = localStore.width || DEFAULT_WIDTH;
11101
+ const height = props.localStore.height || DEFAULT_HEIGHT;
11102
+ const width = props.localStore.width || DEFAULT_WIDTH;
10940
11103
  const panelPosition = position();
10941
11104
  root.style.setProperty(
10942
11105
  "--tsqd-panel-height",
@@ -10974,25 +11137,28 @@ var Devtools = () => {
10974
11137
  )}
10975
11138
  >
10976
11139
  <TransitionGroup name="tsqd-panel-transition"><Show when={isOpen()}><DevtoolsPanel
10977
- localStore={localStore}
10978
- setLocalStore={setLocalStore}
11140
+ localStore={props.localStore}
11141
+ setLocalStore={props.setLocalStore}
10979
11142
  /></Show></TransitionGroup>
10980
11143
  <TransitionGroup name="tsqd-button-transition"><Show when={!isOpen()}><div
10981
11144
  class={clsx(
10982
- styles.devtoolsBtn,
10983
- styles[`devtoolsBtn-position-${buttonPosition()}`]
11145
+ styles().devtoolsBtn,
11146
+ styles()[`devtoolsBtn-position-${buttonPosition()}`]
10984
11147
  )}
10985
11148
  >
10986
11149
  <div aria-hidden="true"><TanstackLogo /></div>
10987
11150
  <button
10988
11151
  aria-label="Open Tanstack query devtools"
10989
- onClick={() => setLocalStore("open", "true")}
11152
+ onClick={() => props.setLocalStore("open", "true")}
10990
11153
  ><TanstackLogo /></button>
10991
11154
  </div></Show></TransitionGroup>
10992
11155
  </div>;
10993
11156
  };
10994
11157
  var DevtoolsPanel = (props) => {
10995
- const styles = getStyles2();
11158
+ const theme = useTheme();
11159
+ const styles = createMemo(() => {
11160
+ return theme() === "dark" ? darkStyles2 : lightStyles2;
11161
+ });
10996
11162
  const [isResizing, setIsResizing] = createSignal(false);
10997
11163
  const sort = createMemo(() => props.localStore.sort || DEFAULT_SORT_FN_NAME);
10998
11164
  const sortOrder = createMemo(
@@ -11109,14 +11275,25 @@ var DevtoolsPanel = (props) => {
11109
11275
  });
11110
11276
  });
11111
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
+ };
11112
11292
  return <aside
11113
11293
  class={clsx(
11114
- styles.panel,
11115
- styles[`panel-position-${position()}`],
11116
- u`
11117
- flex-direction: ${panelWidth() < secondBreakpoint ? "column" : "row"};
11118
- background-color: ${panelWidth() < secondBreakpoint ? tokens.colors.gray[600] : tokens.colors.darkGray[900]};
11119
- `,
11294
+ styles().panel,
11295
+ styles()[`panel-position-${position()}`],
11296
+ getPanelDynamicStyles(),
11120
11297
  {
11121
11298
  [u`
11122
11299
  min-width: min-content;
@@ -11133,8 +11310,8 @@ var DevtoolsPanel = (props) => {
11133
11310
  >
11134
11311
  <div
11135
11312
  class={clsx(
11136
- styles.dragHandle,
11137
- styles[`dragHandle-position-${position()}`],
11313
+ styles().dragHandle,
11314
+ styles()[`dragHandle-position-${position()}`],
11138
11315
  "tsqd-drag-handle"
11139
11316
  )}
11140
11317
  onMouseDown={handleDragStart}
@@ -11142,8 +11319,8 @@ var DevtoolsPanel = (props) => {
11142
11319
  <button
11143
11320
  aria-label="Close tanstack query devtools"
11144
11321
  class={clsx(
11145
- styles.closeBtn,
11146
- styles[`closeBtn-position-${position()}`],
11322
+ styles().closeBtn,
11323
+ styles()[`closeBtn-position-${position()}`],
11147
11324
  "tsqd-minimize-btn"
11148
11325
  )}
11149
11326
  onClick={() => props.setLocalStore("open", "false")}
@@ -11151,7 +11328,7 @@ var DevtoolsPanel = (props) => {
11151
11328
  <div
11152
11329
  ref={queriesContainerRef}
11153
11330
  class={clsx(
11154
- styles.queriesContainer,
11331
+ styles().queriesContainer,
11155
11332
  panelWidth() < secondBreakpoint && selectedQueryHash() && u`
11156
11333
  height: 50%;
11157
11334
  max-height: 50%;
@@ -11159,15 +11336,18 @@ var DevtoolsPanel = (props) => {
11159
11336
  "tsqd-queries-container"
11160
11337
  )}
11161
11338
  >
11162
- <div class={clsx(styles.row, "tsqd-header")}>
11339
+ <div class={clsx(styles().row, "tsqd-header")}>
11163
11340
  <button
11164
- class={clsx(styles.logo, "tsqd-text-logo-container")}
11341
+ class={clsx(styles().logo, "tsqd-text-logo-container")}
11165
11342
  onClick={() => props.setLocalStore("open", "false")}
11166
11343
  aria-label="Close Tanstack query devtools"
11167
11344
  >
11168
- <span class={clsx(styles.tanstackLogo, "tsqd-text-logo-tanstack")}>TANSTACK</span>
11345
+ <span class={clsx(styles().tanstackLogo, "tsqd-text-logo-tanstack")}>TANSTACK</span>
11169
11346
  <span
11170
- class={clsx(styles.queryFlavorLogo, "tsqd-text-logo-query-flavor")}
11347
+ class={clsx(
11348
+ styles().queryFlavorLogo,
11349
+ "tsqd-text-logo-query-flavor"
11350
+ )}
11171
11351
  >
11172
11352
  {useQueryDevtoolsContext().queryFlavor}
11173
11353
  {" v"}
@@ -11178,17 +11358,17 @@ var DevtoolsPanel = (props) => {
11178
11358
  </div>
11179
11359
  <div
11180
11360
  class={clsx(
11181
- styles.row,
11361
+ styles().row,
11182
11362
  u`
11183
11363
  gap: ${tokens.size[2.5]};
11184
11364
  `,
11185
11365
  "tsqd-filters-actions-container"
11186
11366
  )}
11187
11367
  >
11188
- <div class={clsx(styles.filtersContainer, "tsqd-filters-container")}>
11368
+ <div class={clsx(styles().filtersContainer, "tsqd-filters-container")}>
11189
11369
  <div
11190
11370
  class={clsx(
11191
- styles.filterInput,
11371
+ styles().filterInput,
11192
11372
  "tsqd-query-filter-textfield-container"
11193
11373
  )}
11194
11374
  >
@@ -11204,7 +11384,7 @@ var DevtoolsPanel = (props) => {
11204
11384
  </div>
11205
11385
  <div
11206
11386
  class={clsx(
11207
- styles.filterSelect,
11387
+ styles().filterSelect,
11208
11388
  "tsqd-query-filter-sort-container"
11209
11389
  )}
11210
11390
  >
@@ -11235,13 +11415,13 @@ var DevtoolsPanel = (props) => {
11235
11415
  </Show>
11236
11416
  </button>
11237
11417
  </div>
11238
- <div class={clsx(styles.actionsContainer, "tsqd-actions-container")}>
11418
+ <div class={clsx(styles().actionsContainer, "tsqd-actions-container")}>
11239
11419
  <button
11240
11420
  onClick={() => {
11241
11421
  cache().clear();
11242
11422
  }}
11243
11423
  class={clsx(
11244
- styles.actionsBtn,
11424
+ styles().actionsBtn,
11245
11425
  "tsqd-actions-btn",
11246
11426
  "tsqd-action-clear-cache"
11247
11427
  )}
@@ -11259,7 +11439,8 @@ var DevtoolsPanel = (props) => {
11259
11439
  }
11260
11440
  }}
11261
11441
  class={clsx(
11262
- styles.actionsBtn,
11442
+ styles().actionsBtn,
11443
+ offline() && styles().actionsBtnOffline,
11263
11444
  "tsqd-actions-btn",
11264
11445
  "tsqd-action-mock-offline-behavior"
11265
11446
  )}
@@ -11270,24 +11451,24 @@ var DevtoolsPanel = (props) => {
11270
11451
  <index$d.Root gutter={4}>
11271
11452
  <index$d.Trigger
11272
11453
  class={clsx(
11273
- styles.actionsBtn,
11454
+ styles().actionsBtn,
11274
11455
  "tsqd-actions-btn",
11275
11456
  "tsqd-action-settings"
11276
11457
  )}
11277
11458
  ><Settings /></index$d.Trigger>
11278
11459
  <index$d.Portal><index$d.Content
11279
- class={clsx(styles.settingsMenu, "tsqd-settings-menu")}
11460
+ class={clsx(styles().settingsMenu, "tsqd-settings-menu")}
11280
11461
  >
11281
11462
  <div
11282
11463
  class={clsx(
11283
- styles.settingsMenuHeader,
11464
+ styles().settingsMenuHeader,
11284
11465
  "tsqd-settings-menu-header"
11285
11466
  )}
11286
11467
  >Settings</div>
11287
11468
  <index$d.Sub overlap gutter={8} shift={-4}>
11288
11469
  <index$d.SubTrigger
11289
11470
  class={clsx(
11290
- styles.settingsSubTrigger,
11471
+ styles().settingsSubTrigger,
11291
11472
  "tsqd-settings-menu-sub-trigger",
11292
11473
  "tsqd-settings-menu-sub-trigger-position"
11293
11474
  )}
@@ -11296,7 +11477,10 @@ var DevtoolsPanel = (props) => {
11296
11477
  <ChevronDown />
11297
11478
  </index$d.SubTrigger>
11298
11479
  <index$d.Portal><index$d.SubContent
11299
- class={clsx(styles.settingsMenu, "tsqd-settings-submenu")}
11480
+ class={clsx(
11481
+ styles().settingsMenu,
11482
+ "tsqd-settings-submenu"
11483
+ )}
11300
11484
  >
11301
11485
  <index$d.Item
11302
11486
  onSelect={() => {
@@ -11304,7 +11488,7 @@ var DevtoolsPanel = (props) => {
11304
11488
  }}
11305
11489
  as="button"
11306
11490
  class={clsx(
11307
- styles.settingsSubButton,
11491
+ styles().settingsSubButton,
11308
11492
  "tsqd-settings-menu-position-btn",
11309
11493
  "tsqd-settings-menu-position-btn-top"
11310
11494
  )}
@@ -11318,7 +11502,7 @@ var DevtoolsPanel = (props) => {
11318
11502
  }}
11319
11503
  as="button"
11320
11504
  class={clsx(
11321
- styles.settingsSubButton,
11505
+ styles().settingsSubButton,
11322
11506
  "tsqd-settings-menu-position-btn",
11323
11507
  "tsqd-settings-menu-position-btn-bottom"
11324
11508
  )}
@@ -11332,7 +11516,7 @@ var DevtoolsPanel = (props) => {
11332
11516
  }}
11333
11517
  as="button"
11334
11518
  class={clsx(
11335
- styles.settingsSubButton,
11519
+ styles().settingsSubButton,
11336
11520
  "tsqd-settings-menu-position-btn",
11337
11521
  "tsqd-settings-menu-position-btn-left"
11338
11522
  )}
@@ -11346,7 +11530,7 @@ var DevtoolsPanel = (props) => {
11346
11530
  }}
11347
11531
  as="button"
11348
11532
  class={clsx(
11349
- styles.settingsSubButton,
11533
+ styles().settingsSubButton,
11350
11534
  "tsqd-settings-menu-position-btn",
11351
11535
  "tsqd-settings-menu-position-btn-right"
11352
11536
  )}
@@ -11356,13 +11540,77 @@ var DevtoolsPanel = (props) => {
11356
11540
  </index$d.Item>
11357
11541
  </index$d.SubContent></index$d.Portal>
11358
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>
11359
11607
  </index$d.Content></index$d.Portal>
11360
11608
  </index$d.Root>
11361
11609
  </div>
11362
11610
  </div>
11363
11611
  <div
11364
11612
  class={clsx(
11365
- styles.overflowQueryContainer,
11613
+ styles().overflowQueryContainer,
11366
11614
  "tsqd-queries-overflow-container"
11367
11615
  )}
11368
11616
  ><div class="tsqd-queries-container"><Key by={(q) => q.queryHash} each={queries()}>{(query) => <QueryRow query={query()} />}</Key></div></div>
@@ -11371,7 +11619,12 @@ var DevtoolsPanel = (props) => {
11371
11619
  </aside>;
11372
11620
  };
11373
11621
  var QueryRow = (props) => {
11374
- 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;
11375
11628
  const queryState = createSubscribeToQueryCacheBatcher(
11376
11629
  (queryCache) => queryCache().find({
11377
11630
  queryKey: props.query.queryKey
@@ -11399,28 +11652,34 @@ var QueryRow = (props) => {
11399
11652
  isStale: isStale()
11400
11653
  })
11401
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
+ };
11402
11670
  return <Show when={queryState()}><button
11403
11671
  onClick={() => setSelectedQueryHash(
11404
11672
  props.query.queryHash === selectedQueryHash() ? null : props.query.queryHash
11405
11673
  )}
11406
11674
  class={clsx(
11407
- styles.queryRow,
11408
- selectedQueryHash() === props.query.queryHash && styles.selectedQueryRow,
11675
+ styles().queryRow,
11676
+ selectedQueryHash() === props.query.queryHash && styles().selectedQueryRow,
11409
11677
  "tsqd-query-row"
11410
11678
  )}
11411
11679
  aria-label={`Query key ${props.query.queryHash}`}
11412
11680
  >
11413
11681
  <div
11414
- class={clsx(
11415
- color() === "gray" ? u`
11416
- background-color: ${tokens.colors[color()][700]};
11417
- color: ${tokens.colors[color()][300]};
11418
- ` : u`
11419
- background-color: ${tokens.colors[color()][900]};
11420
- color: ${tokens.colors[color()][300]};
11421
- `,
11422
- "tsqd-query-observer-count"
11423
- )}
11682
+ class={clsx(getObserverCountColorStyles(), "tsqd-query-observer-count")}
11424
11683
  >{observers()}</div>
11425
11684
  <code class="tsqd-query-hash">{props.query.queryHash}</code>
11426
11685
  <Show when={isDisabled()}><div class="tsqd-query-disabled-indicator">disabled</div></Show>
@@ -11442,8 +11701,13 @@ var QueryStatusCount = () => {
11442
11701
  const inactive = createSubscribeToQueryCacheBatcher(
11443
11702
  (queryCache) => queryCache().getAll().filter((q) => getQueryStatusLabel(q) === "inactive").length
11444
11703
  );
11445
- const styles = getStyles2();
11446
- 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
+ >
11447
11711
  <QueryStatus label="Fresh" color="green" count={fresh()} />
11448
11712
  <QueryStatus label="Fetching" color="blue" count={fetching()} />
11449
11713
  <QueryStatus label="Paused" color="purple" count={paused()} />
@@ -11452,7 +11716,12 @@ var QueryStatusCount = () => {
11452
11716
  </div>;
11453
11717
  };
11454
11718
  var QueryStatus = (props) => {
11455
- 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;
11456
11725
  let tagRef;
11457
11726
  const [mouseOver, setMouseOver] = createSignal(false);
11458
11727
  const [focused, setFocused] = createSignal(false);
@@ -11478,11 +11747,11 @@ var QueryStatus = (props) => {
11478
11747
  disabled={showLabel()}
11479
11748
  ref={tagRef}
11480
11749
  class={clsx(
11481
- styles.queryStatusTag,
11750
+ styles().queryStatusTag,
11482
11751
  !showLabel() && u`
11483
11752
  cursor: pointer;
11484
11753
  &:hover {
11485
- background: ${tokens.colors.darkGray[400]}${tokens.alpha[80]};
11754
+ background: ${t2(colors.gray[200], colors.darkGray[400])}${alpha[80]};
11486
11755
  }
11487
11756
  `,
11488
11757
  "tsqd-query-status-tag",
@@ -11495,7 +11764,7 @@ var QueryStatus = (props) => {
11495
11764
  <Show when={!showLabel() && (mouseOver() || focused())}><div
11496
11765
  role="tooltip"
11497
11766
  id="tsqd-status-tooltip"
11498
- class={clsx(styles.statusTooltip, "tsqd-query-status-tooltip")}
11767
+ class={clsx(styles().statusTooltip, "tsqd-query-status-tooltip")}
11499
11768
  >{props.label}</div></Show>
11500
11769
  <span
11501
11770
  class={clsx(
@@ -11509,24 +11778,33 @@ var QueryStatus = (props) => {
11509
11778
  )}
11510
11779
  />
11511
11780
  <Show when={showLabel()}><span
11512
- class={clsx(styles.queryStatusTagLabel, "tsqd-query-status-tag-label")}
11781
+ class={clsx(
11782
+ styles().queryStatusTagLabel,
11783
+ "tsqd-query-status-tag-label"
11784
+ )}
11513
11785
  >{props.label}</span></Show>
11514
11786
  <span
11515
11787
  class={clsx(
11516
- styles.queryStatusCount,
11517
- props.count > 0 && props.color !== "gray" ? u`
11518
- background-color: ${tokens.colors[props.color][900]};
11519
- color: ${tokens.colors[props.color][300]};
11520
- ` : u`
11521
- color: ${tokens.colors["gray"][400]};
11522
- `,
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
+ `,
11523
11796
  "tsqd-query-status-tag-count"
11524
11797
  )}
11525
11798
  >{props.count}</span>
11526
11799
  </button>;
11527
11800
  };
11528
11801
  var QueryDetails = () => {
11529
- 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;
11530
11808
  const queryClient = useQueryDevtoolsContext().client;
11531
11809
  const [restoringLoading, setRestoringLoading] = createSignal(false);
11532
11810
  const errorTypes = createMemo(() => {
@@ -11597,26 +11875,34 @@ var QueryDetails = () => {
11597
11875
  setRestoringLoading(false);
11598
11876
  }
11599
11877
  });
11600
- return <Show when={activeQuery() && activeQueryState()}><div class={clsx(styles.detailsContainer, "tsqd-query-details-container")}>
11601
- <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>
11602
11896
  <div
11603
- class={clsx(styles.detailsBody, "tsqd-query-details-summary-container")}
11897
+ class={clsx(
11898
+ styles().detailsBody,
11899
+ "tsqd-query-details-summary-container"
11900
+ )}
11604
11901
  >
11605
11902
  <div class="tsqd-query-details-summary">
11606
11903
  <pre><code>{displayValue(activeQuery().queryKey, true)}</code></pre>
11607
11904
  <span
11608
- class={clsx(
11609
- styles.queryDetailsStatus,
11610
- color() === "gray" ? u`
11611
- background-color: ${tokens.colors[color()][700]};
11612
- color: ${tokens.colors[color()][300]};
11613
- border-color: ${tokens.colors[color()][600]};
11614
- ` : u`
11615
- background-color: ${tokens.colors[color()][900]};
11616
- color: ${tokens.colors[color()][300]};
11617
- border-color: ${tokens.colors[color()][600]};
11618
- `
11619
- )}
11905
+ class={clsx(styles().queryDetailsStatus, getQueryStatusColors())}
11620
11906
  >{statusLabel()}</span>
11621
11907
  </div>
11622
11908
  <div class="tsqd-query-details-observers-count">
@@ -11628,14 +11914,17 @@ var QueryDetails = () => {
11628
11914
  <span>{new Date(activeQueryState().dataUpdatedAt).toLocaleTimeString()}</span>
11629
11915
  </div>
11630
11916
  </div>
11631
- <div class={clsx(styles.detailsHeader, "tsqd-query-details-header")}>Actions</div>
11917
+ <div class={clsx(styles().detailsHeader, "tsqd-query-details-header")}>Actions</div>
11632
11918
  <div
11633
- class={clsx(styles.actionsBody, "tsqd-query-details-actions-container")}
11919
+ class={clsx(
11920
+ styles().actionsBody,
11921
+ "tsqd-query-details-actions-container"
11922
+ )}
11634
11923
  >
11635
11924
  <button
11636
11925
  class={clsx(
11637
11926
  u`
11638
- color: ${tokens.colors.blue[400]};
11927
+ color: ${t2(colors.blue[600], colors.blue[400])};
11639
11928
  `,
11640
11929
  "tsqd-query-details-actions-btn",
11641
11930
  "tsqd-query-details-action-refetch"
@@ -11645,7 +11934,7 @@ var QueryDetails = () => {
11645
11934
  >
11646
11935
  <span
11647
11936
  class={u`
11648
- background-color: ${tokens.colors.blue[400]};
11937
+ background-color: ${t2(colors.blue[600], colors.blue[400])};
11649
11938
  `}
11650
11939
  />
11651
11940
  {"Refetch"}
@@ -11653,7 +11942,7 @@ var QueryDetails = () => {
11653
11942
  <button
11654
11943
  class={clsx(
11655
11944
  u`
11656
- color: ${tokens.colors.yellow[400]};
11945
+ color: ${t2(colors.yellow[600], colors.yellow[400])};
11657
11946
  `,
11658
11947
  "tsqd-query-details-actions-btn",
11659
11948
  "tsqd-query-details-action-invalidate"
@@ -11663,7 +11952,7 @@ var QueryDetails = () => {
11663
11952
  >
11664
11953
  <span
11665
11954
  class={u`
11666
- background-color: ${tokens.colors.yellow[400]};
11955
+ background-color: ${t2(colors.yellow[600], colors.yellow[400])};
11667
11956
  `}
11668
11957
  />
11669
11958
  {"Invalidate"}
@@ -11671,7 +11960,7 @@ var QueryDetails = () => {
11671
11960
  <button
11672
11961
  class={clsx(
11673
11962
  u`
11674
- color: ${tokens.colors.gray[300]};
11963
+ color: ${t2(colors.gray[600], colors.gray[300])};
11675
11964
  `,
11676
11965
  "tsqd-query-details-actions-btn",
11677
11966
  "tsqd-query-details-action-reset"
@@ -11681,7 +11970,7 @@ var QueryDetails = () => {
11681
11970
  >
11682
11971
  <span
11683
11972
  class={u`
11684
- background-color: ${tokens.colors.gray[400]};
11973
+ background-color: ${t2(colors.gray[600], colors.gray[400])};
11685
11974
  `}
11686
11975
  />
11687
11976
  {"Reset"}
@@ -11689,7 +11978,7 @@ var QueryDetails = () => {
11689
11978
  <button
11690
11979
  class={clsx(
11691
11980
  u`
11692
- color: ${tokens.colors.pink[400]};
11981
+ color: ${t2(colors.pink[500], colors.pink[400])};
11693
11982
  `,
11694
11983
  "tsqd-query-details-actions-btn",
11695
11984
  "tsqd-query-details-action-remove"
@@ -11702,7 +11991,7 @@ var QueryDetails = () => {
11702
11991
  >
11703
11992
  <span
11704
11993
  class={u`
11705
- background-color: ${tokens.colors.pink[400]};
11994
+ background-color: ${t2(colors.pink[500], colors.pink[400])};
11706
11995
  `}
11707
11996
  />
11708
11997
  {"Remove"}
@@ -11710,7 +11999,7 @@ var QueryDetails = () => {
11710
11999
  <button
11711
12000
  class={clsx(
11712
12001
  u`
11713
- color: ${tokens.colors.cyan[400]};
12002
+ color: ${t2(colors.cyan[500], colors.cyan[400])};
11714
12003
  `,
11715
12004
  "tsqd-query-details-actions-btn",
11716
12005
  "tsqd-query-details-action-loading"
@@ -11747,7 +12036,7 @@ var QueryDetails = () => {
11747
12036
  >
11748
12037
  <span
11749
12038
  class={u`
11750
- background-color: ${tokens.colors.cyan[400]};
12039
+ background-color: ${t2(colors.cyan[500], colors.cyan[400])};
11751
12040
  `}
11752
12041
  />
11753
12042
  {queryStatus() === "pending" ? "Restore" : "Trigger"}
@@ -11756,7 +12045,7 @@ var QueryDetails = () => {
11756
12045
  <Show when={errorTypes().length === 0 || queryStatus() === "error"}><button
11757
12046
  class={clsx(
11758
12047
  u`
11759
- color: ${tokens.colors.red[400]};
12048
+ color: ${t2(colors.red[500], colors.red[400])};
11760
12049
  `,
11761
12050
  "tsqd-query-details-actions-btn",
11762
12051
  "tsqd-query-details-action-error"
@@ -11772,7 +12061,7 @@ var QueryDetails = () => {
11772
12061
  >
11773
12062
  <span
11774
12063
  class={u`
11775
- background-color: ${tokens.colors.red[400]};
12064
+ background-color: ${t2(colors.red[500], colors.red[400])};
11776
12065
  `}
11777
12066
  />
11778
12067
  {queryStatus() === "error" ? "Restore" : "Trigger"}
@@ -11782,7 +12071,7 @@ var QueryDetails = () => {
11782
12071
  when={!(errorTypes().length === 0 || queryStatus() === "error")}
11783
12072
  ><div
11784
12073
  class={clsx(
11785
- styles.actionsSelect,
12074
+ styles().actionsSelect,
11786
12075
  "tsqd-query-details-actions-btn",
11787
12076
  "tsqd-query-details-action-error-multiple"
11788
12077
  )}
@@ -11797,7 +12086,7 @@ var QueryDetails = () => {
11797
12086
  disabled={queryStatus() === "pending"}
11798
12087
  onChange={(e2) => {
11799
12088
  const errorType = errorTypes().find(
11800
- (t2) => t2.name === e2.currentTarget.value
12089
+ (et) => et.name === e2.currentTarget.value
11801
12090
  );
11802
12091
  triggerError(errorType);
11803
12092
  }}
@@ -11808,7 +12097,7 @@ var QueryDetails = () => {
11808
12097
  <ChevronDown />
11809
12098
  </div></Show>
11810
12099
  </div>
11811
- <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>
11812
12101
  <div
11813
12102
  style={{
11814
12103
  padding: "0.5rem"
@@ -11821,7 +12110,7 @@ var QueryDetails = () => {
11821
12110
  editable={true}
11822
12111
  activeQuery={activeQuery()}
11823
12112
  /></div>
11824
- <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>
11825
12114
  <div
11826
12115
  style={{
11827
12116
  padding: "0.5rem"
@@ -11871,8 +12160,9 @@ var createSubscribeToQueryCacheBatcher = (callback, equalityCheck = true) => {
11871
12160
  });
11872
12161
  return value;
11873
12162
  };
11874
- var getStyles2 = () => {
12163
+ var stylesFactory2 = (theme) => {
11875
12164
  const { colors, font, size: size2, alpha, shadow, border } = tokens;
12165
+ const t2 = (light, dark) => theme === "light" ? light : dark;
11876
12166
  return {
11877
12167
  devtoolsBtn: u`
11878
12168
  z-index: 100000;
@@ -11934,8 +12224,6 @@ var getStyles2 = () => {
11934
12224
  display: flex;
11935
12225
  gap: ${tokens.size[0.5]};
11936
12226
  & * {
11937
- font-family: 'Inter', sans-serif;
11938
- color: ${colors.gray[300]};
11939
12227
  box-sizing: border-box;
11940
12228
  text-transform: none;
11941
12229
  }
@@ -11962,7 +12250,7 @@ var getStyles2 = () => {
11962
12250
  left: 0;
11963
12251
  max-height: 90%;
11964
12252
  min-height: 3.5rem;
11965
- border-bottom: ${colors.darkGray[300]} 1px solid;
12253
+ border-bottom: ${t2(colors.gray[400], colors.darkGray[300])} 1px solid;
11966
12254
  `,
11967
12255
  "panel-position-bottom": u`
11968
12256
  bottom: 0;
@@ -11970,20 +12258,20 @@ var getStyles2 = () => {
11970
12258
  left: 0;
11971
12259
  max-height: 90%;
11972
12260
  min-height: 3.5rem;
11973
- border-top: ${colors.darkGray[300]} 1px solid;
12261
+ border-top: ${t2(colors.gray[400], colors.darkGray[300])} 1px solid;
11974
12262
  `,
11975
12263
  "panel-position-right": u`
11976
12264
  bottom: 0;
11977
12265
  right: 0;
11978
12266
  top: 0;
11979
- border-left: ${colors.darkGray[300]} 1px solid;
12267
+ border-left: ${t2(colors.gray[400], colors.darkGray[300])} 1px solid;
11980
12268
  max-width: 90%;
11981
12269
  `,
11982
12270
  "panel-position-left": u`
11983
12271
  bottom: 0;
11984
12272
  left: 0;
11985
12273
  top: 0;
11986
- border-right: ${colors.darkGray[300]} 1px solid;
12274
+ border-right: ${t2(colors.gray[400], colors.darkGray[300])} 1px solid;
11987
12275
  max-width: 90%;
11988
12276
  `,
11989
12277
  closeBtn: u`
@@ -11994,13 +12282,15 @@ var getStyles2 = () => {
11994
12282
  align-items: center;
11995
12283
  justify-content: center;
11996
12284
  outline: none;
12285
+ background-color: ${t2(colors.gray[50], colors.darkGray[700])};
11997
12286
  &:hover {
11998
- background-color: ${colors.darkGray[500]};
12287
+ background-color: ${t2(colors.gray[200], colors.darkGray[500])};
11999
12288
  }
12000
12289
  &:focus-visible {
12001
12290
  outline: 2px solid ${colors.blue[600]};
12002
12291
  }
12003
12292
  & svg {
12293
+ color: ${t2(colors.gray[600], colors.gray[400])};
12004
12294
  width: ${size2[2]};
12005
12295
  height: ${size2[2]};
12006
12296
  }
@@ -12009,11 +12299,10 @@ var getStyles2 = () => {
12009
12299
  bottom: 0;
12010
12300
  right: ${size2[2]};
12011
12301
  transform: translate(0, 100%);
12012
- background-color: ${colors.darkGray[700]};
12013
- border-right: ${colors.darkGray[300]} 1px solid;
12014
- 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;
12015
12304
  border-top: none;
12016
- border-bottom: ${colors.darkGray[300]} 1px solid;
12305
+ border-bottom: ${t2(colors.gray[400], colors.darkGray[300])} 1px solid;
12017
12306
  border-radius: 0px 0px ${border.radius.sm} ${border.radius.sm};
12018
12307
  padding: ${size2[0.5]} ${size2[1.5]} ${size2[1]} ${size2[1.5]};
12019
12308
 
@@ -12034,10 +12323,9 @@ var getStyles2 = () => {
12034
12323
  top: 0;
12035
12324
  right: ${size2[2]};
12036
12325
  transform: translate(0, -100%);
12037
- background-color: ${colors.darkGray[700]};
12038
- border-right: ${colors.darkGray[300]} 1px solid;
12039
- border-left: ${colors.darkGray[300]} 1px solid;
12040
- 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;
12041
12329
  border-bottom: none;
12042
12330
  border-radius: ${border.radius.sm} ${border.radius.sm} 0px 0px;
12043
12331
  padding: ${size2[1]} ${size2[1.5]} ${size2[0.5]} ${size2[1.5]};
@@ -12055,11 +12343,10 @@ var getStyles2 = () => {
12055
12343
  bottom: ${size2[2]};
12056
12344
  left: 0;
12057
12345
  transform: translate(-100%, 0);
12058
- background-color: ${colors.darkGray[700]};
12059
12346
  border-right: none;
12060
- border-left: ${colors.darkGray[300]} 1px solid;
12061
- border-top: ${colors.darkGray[300]} 1px solid;
12062
- 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;
12063
12350
  border-radius: ${border.radius.sm} 0px 0px ${border.radius.sm};
12064
12351
  padding: ${size2[1.5]} ${size2[0.5]} ${size2[1.5]} ${size2[1]};
12065
12352
 
@@ -12079,11 +12366,10 @@ var getStyles2 = () => {
12079
12366
  bottom: ${size2[2]};
12080
12367
  right: 0;
12081
12368
  transform: translate(100%, 0);
12082
- background-color: ${colors.darkGray[700]};
12083
12369
  border-left: none;
12084
- border-right: ${colors.darkGray[300]} 1px solid;
12085
- border-top: ${colors.darkGray[300]} 1px solid;
12086
- 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;
12087
12373
  border-radius: 0px ${border.radius.sm} ${border.radius.sm} 0px;
12088
12374
  padding: ${size2[1.5]} ${size2[1]} ${size2[1.5]} ${size2[0.5]};
12089
12375
 
@@ -12101,15 +12387,18 @@ var getStyles2 = () => {
12101
12387
  `,
12102
12388
  queriesContainer: u`
12103
12389
  flex: 1 1 700px;
12104
- background-color: ${colors.darkGray[700]};
12390
+ background-color: ${t2(colors.gray[50], colors.darkGray[700])};
12105
12391
  display: flex;
12106
12392
  flex-direction: column;
12393
+ & * {
12394
+ font-family: 'Inter', sans-serif;
12395
+ }
12107
12396
  `,
12108
12397
  dragHandle: u`
12109
12398
  position: absolute;
12110
12399
  transition: background-color 0.125s ease;
12111
12400
  &:hover {
12112
- background-color: ${colors.purple[400]}${alpha[90]};
12401
+ background-color: ${colors.purple[400]}${t2("", alpha[90])};
12113
12402
  }
12114
12403
  z-index: 4;
12115
12404
  `,
@@ -12143,7 +12432,7 @@ var getStyles2 = () => {
12143
12432
  align-items: center;
12144
12433
  padding: ${tokens.size[2]} ${tokens.size[2.5]};
12145
12434
  gap: ${tokens.size[3]};
12146
- border-bottom: ${colors.darkGray[500]} 1px solid;
12435
+ border-bottom: ${t2(colors.gray[300], colors.darkGray[500])} 1px solid;
12147
12436
  align-items: center;
12148
12437
  & > button {
12149
12438
  padding: 0;
@@ -12170,11 +12459,15 @@ var getStyles2 = () => {
12170
12459
  font-weight: ${font.weight.bold};
12171
12460
  line-height: ${font.lineHeight.xs};
12172
12461
  white-space: nowrap;
12462
+ color: ${t2(colors.gray[600], colors.gray[300])};
12173
12463
  `,
12174
12464
  queryFlavorLogo: u`
12175
12465
  font-weight: ${font.weight.semibold};
12176
12466
  font-size: ${font.size.xs};
12177
- background: linear-gradient(to right, #dd524b, #e9a03b);
12467
+ background: linear-gradient(
12468
+ to right,
12469
+ ${t2("#ea4037, #ff9b11", "#dd524b, #e9a03b")}
12470
+ );
12178
12471
  background-clip: text;
12179
12472
  -webkit-background-clip: text;
12180
12473
  line-height: 1;
@@ -12189,14 +12482,17 @@ var getStyles2 = () => {
12189
12482
  queryStatusTag: u`
12190
12483
  display: flex;
12191
12484
  gap: ${tokens.size[1.5]};
12192
- 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])};
12193
12489
  border-radius: ${tokens.border.radius.sm};
12194
12490
  font-size: ${font.size.sm};
12195
12491
  padding: ${tokens.size[1]};
12196
- padding-left: ${tokens.size[2]};
12492
+ padding-left: ${tokens.size[1.5]};
12197
12493
  align-items: center;
12198
12494
  font-weight: ${font.weight.medium};
12199
- border: none;
12495
+ border: ${t2("1px solid " + colors.gray[300], "1px solid transparent")};
12200
12496
  user-select: none;
12201
12497
  position: relative;
12202
12498
  &:focus-visible {
@@ -12213,8 +12509,8 @@ var getStyles2 = () => {
12213
12509
  display: flex;
12214
12510
  align-items: center;
12215
12511
  justify-content: center;
12216
- color: ${colors.gray[400]};
12217
- background-color: ${colors.darkGray[300]};
12512
+ color: ${t2(colors.gray[500], colors.gray[400])};
12513
+ background-color: ${t2(colors.gray[200], colors.darkGray[300])};
12218
12514
  border-radius: 2px;
12219
12515
  font-variant-numeric: tabular-nums;
12220
12516
  height: ${tokens.size[4.5]};
@@ -12222,15 +12518,15 @@ var getStyles2 = () => {
12222
12518
  statusTooltip: u`
12223
12519
  position: absolute;
12224
12520
  z-index: 1;
12225
- background-color: ${colors.darkGray[500]};
12521
+ background-color: ${t2(colors.gray[50], colors.darkGray[500])};
12226
12522
  top: 100%;
12227
12523
  left: 50%;
12228
12524
  transform: translate(-50%, calc(${tokens.size[2]}));
12229
12525
  padding: ${tokens.size[0.5]} ${tokens.size[2]};
12230
- border-radius: ${tokens.border.radius.md};
12526
+ border-radius: ${tokens.border.radius.sm};
12231
12527
  font-size: ${font.size.xs};
12232
- border: 1px solid ${colors.gray[600]};
12233
- 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])};
12234
12530
 
12235
12531
  &::before {
12236
12532
  top: 0px;
@@ -12239,7 +12535,8 @@ var getStyles2 = () => {
12239
12535
  left: 50%;
12240
12536
  transform: translate(-50%, -100%);
12241
12537
  position: absolute;
12242
- border-color: transparent transparent ${colors.gray[600]} transparent;
12538
+ border-color: transparent transparent
12539
+ ${t2(colors.gray[400], colors.gray[600])} transparent;
12243
12540
  border-style: solid;
12244
12541
  border-width: 7px;
12245
12542
  /* transform: rotate(180deg); */
@@ -12250,17 +12547,14 @@ var getStyles2 = () => {
12250
12547
  content: ' ';
12251
12548
  display: block;
12252
12549
  left: 50%;
12253
- transform: translate(-50%, calc(-100% + 2.5px));
12550
+ transform: translate(-50%, calc(-100% + 2px));
12254
12551
  position: absolute;
12255
- border-color: transparent transparent ${colors.darkGray[500]}
12256
- transparent;
12552
+ border-color: transparent transparent
12553
+ ${t2(colors.gray[100], colors.darkGray[500])} transparent;
12257
12554
  border-style: solid;
12258
12555
  border-width: 7px;
12259
12556
  }
12260
12557
  `,
12261
- selectedQueryRow: u`
12262
- background-color: ${colors.darkGray[500]};
12263
- `,
12264
12558
  filtersContainer: u`
12265
12559
  display: flex;
12266
12560
  gap: ${tokens.size[2]};
@@ -12269,47 +12563,52 @@ var getStyles2 = () => {
12269
12563
  padding: ${tokens.size[0.5]} ${tokens.size[2]};
12270
12564
  padding-right: ${tokens.size[1.5]};
12271
12565
  border-radius: ${tokens.border.radius.sm};
12272
- 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])};
12273
12569
  font-size: ${font.size.xs};
12274
12570
  display: flex;
12275
12571
  align-items: center;
12276
12572
  line-height: ${font.lineHeight.sm};
12277
12573
  gap: ${tokens.size[1.5]};
12278
12574
  max-width: 160px;
12279
- border: 1px solid ${colors.darkGray[200]};
12280
12575
  &:focus-visible {
12281
12576
  outline-offset: 2px;
12282
12577
  border-radius: ${border.radius.xs};
12283
12578
  outline: 2px solid ${colors.blue[800]};
12284
12579
  }
12580
+ & svg {
12581
+ color: ${t2(colors.gray[500], colors.gray[400])};
12582
+ }
12285
12583
  }
12286
12584
  `,
12287
12585
  filterInput: u`
12288
- padding: ${tokens.size[0.5]} ${tokens.size[2]};
12586
+ padding: ${size2[0.5]} ${size2[2]};
12289
12587
  border-radius: ${tokens.border.radius.sm};
12290
- background-color: ${colors.darkGray[400]};
12588
+ background-color: ${t2(colors.gray[100], colors.darkGray[400])};
12291
12589
  display: flex;
12292
12590
  box-sizing: content-box;
12293
12591
  align-items: center;
12294
12592
  gap: ${tokens.size[1.5]};
12295
12593
  max-width: 160px;
12296
12594
  min-width: 100px;
12297
- border: 1px solid ${colors.darkGray[200]};
12595
+ border: 1px solid ${t2(colors.gray[300], colors.darkGray[200])};
12298
12596
  height: min-content;
12597
+ color: ${t2(colors.gray[600], colors.gray[400])};
12299
12598
  & > svg {
12300
- width: ${tokens.size[3]};
12301
- height: ${tokens.size[3]};
12599
+ width: ${size2[3]};
12600
+ height: ${size2[3]};
12302
12601
  }
12303
12602
  & input {
12304
12603
  font-size: ${font.size.xs};
12305
12604
  width: 100%;
12306
- background-color: ${colors.darkGray[400]};
12605
+ background-color: ${t2(colors.gray[100], colors.darkGray[400])};
12307
12606
  border: none;
12308
12607
  padding: 0;
12309
12608
  line-height: ${font.lineHeight.sm};
12310
- color: ${colors.gray[300]};
12609
+ color: ${t2(colors.gray[700], colors.gray[300])};
12311
12610
  &::placeholder {
12312
- color: ${colors.gray[300]};
12611
+ color: ${t2(colors.gray[700], colors.gray[300])};
12313
12612
  }
12314
12613
  &:focus {
12315
12614
  outline: none;
@@ -12325,24 +12624,26 @@ var getStyles2 = () => {
12325
12624
  filterSelect: u`
12326
12625
  padding: ${tokens.size[0.5]} ${tokens.size[2]};
12327
12626
  border-radius: ${tokens.border.radius.sm};
12328
- background-color: ${colors.darkGray[400]};
12627
+ background-color: ${t2(colors.gray[100], colors.darkGray[400])};
12329
12628
  display: flex;
12330
12629
  align-items: center;
12331
12630
  gap: ${tokens.size[1.5]};
12332
12631
  box-sizing: content-box;
12333
12632
  max-width: 160px;
12334
- border: 1px solid ${colors.darkGray[200]};
12633
+ border: 1px solid ${t2(colors.gray[300], colors.darkGray[200])};
12335
12634
  height: min-content;
12336
12635
  & > svg {
12636
+ color: ${t2(colors.gray[600], colors.gray[400])};
12337
12637
  width: ${tokens.size[2]};
12338
12638
  height: ${tokens.size[2]};
12339
12639
  }
12340
12640
  & > select {
12341
12641
  appearance: none;
12642
+ color: ${t2(colors.gray[700], colors.gray[300])};
12342
12643
  min-width: 100px;
12343
12644
  line-height: ${font.lineHeight.sm};
12344
12645
  font-size: ${font.size.xs};
12345
- background-color: ${colors.darkGray[400]};
12646
+ background-color: ${t2(colors.gray[100], colors.darkGray[400])};
12346
12647
  border: none;
12347
12648
  &:focus {
12348
12649
  outline: none;
@@ -12360,7 +12661,8 @@ var getStyles2 = () => {
12360
12661
  `,
12361
12662
  actionsBtn: u`
12362
12663
  border-radius: ${tokens.border.radius.sm};
12363
- 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])};
12364
12666
  width: 1.625rem;
12365
12667
  height: 1.625rem;
12366
12668
  justify-content: center;
@@ -12368,13 +12670,13 @@ var getStyles2 = () => {
12368
12670
  align-items: center;
12369
12671
  gap: ${tokens.size[1.5]};
12370
12672
  max-width: 160px;
12371
- border: 1px solid ${colors.darkGray[200]};
12372
12673
  cursor: pointer;
12373
12674
  padding: 0;
12374
12675
  &:hover {
12375
- background-color: ${colors.darkGray[500]};
12676
+ background-color: ${t2(colors.gray[200], colors.darkGray[500])};
12376
12677
  }
12377
12678
  & svg {
12679
+ color: ${t2(colors.gray[700], colors.gray[300])};
12378
12680
  width: ${tokens.size[3]};
12379
12681
  height: ${tokens.size[3]};
12380
12682
  }
@@ -12384,6 +12686,12 @@ var getStyles2 = () => {
12384
12686
  outline: 2px solid ${colors.blue[800]};
12385
12687
  }
12386
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
+ `,
12387
12695
  overflowQueryContainer: u`
12388
12696
  flex: 1;
12389
12697
  overflow-y: auto;
@@ -12396,9 +12704,11 @@ var getStyles2 = () => {
12396
12704
  display: flex;
12397
12705
  align-items: center;
12398
12706
  padding: 0;
12399
- background-color: inherit;
12400
12707
  border: none;
12401
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;
12402
12712
  &:focus {
12403
12713
  outline: none;
12404
12714
  }
@@ -12408,7 +12718,7 @@ var getStyles2 = () => {
12408
12718
  outline: 2px solid ${colors.blue[800]};
12409
12719
  }
12410
12720
  &:hover .tsqd-query-hash {
12411
- background-color: ${colors.darkGray[600]};
12721
+ background-color: ${t2(colors.gray[200], colors.darkGray[600])};
12412
12722
  }
12413
12723
 
12414
12724
  & .tsqd-query-observer-count {
@@ -12423,7 +12733,7 @@ var getStyles2 = () => {
12423
12733
  font-weight: ${font.weight.medium};
12424
12734
  border-bottom-width: 1px;
12425
12735
  border-bottom-style: solid;
12426
- border-bottom: 1px solid ${colors.darkGray[700]};
12736
+ border-bottom: 1px solid ${t2(colors.gray[300], colors.darkGray[700])};
12427
12737
  }
12428
12738
  & .tsqd-query-hash {
12429
12739
  user-select: text;
@@ -12434,7 +12744,7 @@ var getStyles2 = () => {
12434
12744
  flex: 1;
12435
12745
  padding: ${tokens.size[1]} ${tokens.size[2]};
12436
12746
  font-family: 'Menlo', 'Fira Code', monospace;
12437
- border-bottom: 1px solid ${colors.darkGray[400]};
12747
+ border-bottom: 1px solid ${t2(colors.gray[300], colors.darkGray[400])};
12438
12748
  text-align: left;
12439
12749
  text-overflow: clip;
12440
12750
  word-break: break-word;
@@ -12445,15 +12755,20 @@ var getStyles2 = () => {
12445
12755
  display: flex;
12446
12756
  align-items: center;
12447
12757
  padding: 0 ${tokens.size[2]};
12448
- color: ${colors.gray[300]};
12449
- background-color: ${colors.darkGray[600]};
12450
- 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])};
12451
12761
  font-size: ${font.size.xs};
12452
12762
  }
12453
12763
  `,
12764
+ selectedQueryRow: u`
12765
+ background-color: ${t2(colors.gray[200], colors.darkGray[500])};
12766
+ `,
12454
12767
  detailsContainer: u`
12455
12768
  flex: 1 1 700px;
12456
- 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;
12457
12772
  display: flex;
12458
12773
  flex-direction: column;
12459
12774
  overflow-y: auto;
@@ -12461,10 +12776,11 @@ var getStyles2 = () => {
12461
12776
  text-align: left;
12462
12777
  `,
12463
12778
  detailsHeader: u`
12779
+ font-family: 'Inter', sans-serif;
12464
12780
  position: sticky;
12465
12781
  top: 0;
12466
12782
  z-index: 2;
12467
- background-color: ${colors.darkGray[600]};
12783
+ background-color: ${t2(colors.gray[200], colors.darkGray[600])};
12468
12784
  padding: ${tokens.size[1.5]} ${tokens.size[2]};
12469
12785
  font-weight: ${font.weight.medium};
12470
12786
  font-size: ${font.size.xs};
@@ -12497,6 +12813,10 @@ var getStyles2 = () => {
12497
12813
  font-size: ${font.size.xs};
12498
12814
  line-height: ${font.lineHeight.xs};
12499
12815
  }
12816
+
12817
+ & pre {
12818
+ margin: 0;
12819
+ }
12500
12820
  `,
12501
12821
  queryDetailsStatus: u`
12502
12822
  border: 1px solid ${colors.darkGray[200]};
@@ -12511,12 +12831,13 @@ var getStyles2 = () => {
12511
12831
  gap: ${tokens.size[2]};
12512
12832
  padding: 0px ${tokens.size[2]};
12513
12833
  & > button {
12834
+ font-family: 'Inter', sans-serif;
12514
12835
  font-size: ${font.size.xs};
12515
12836
  padding: ${tokens.size[1]} ${tokens.size[2]};
12516
12837
  display: flex;
12517
12838
  border-radius: ${tokens.border.radius.sm};
12518
- border: 1px solid ${colors.darkGray[400]};
12519
- 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])};
12520
12841
  align-items: center;
12521
12842
  gap: ${tokens.size[2]};
12522
12843
  font-weight: ${font.weight.medium};
@@ -12528,7 +12849,7 @@ var getStyles2 = () => {
12528
12849
  outline: 2px solid ${colors.blue[800]};
12529
12850
  }
12530
12851
  &:hover {
12531
- background-color: ${colors.darkGray[500]};
12852
+ background-color: ${t2(colors.gray[200], colors.darkGray[500])};
12532
12853
  }
12533
12854
 
12534
12855
  &:disabled {
@@ -12549,17 +12870,17 @@ var getStyles2 = () => {
12549
12870
  display: flex;
12550
12871
  border-radius: ${tokens.border.radius.sm};
12551
12872
  overflow: hidden;
12552
- border: 1px solid ${colors.darkGray[400]};
12553
- 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])};
12554
12875
  align-items: center;
12555
12876
  gap: ${tokens.size[2]};
12556
12877
  font-weight: ${font.weight.medium};
12557
12878
  line-height: ${font.lineHeight.sm};
12558
- color: ${tokens.colors.red[400]};
12879
+ color: ${t2(colors.red[500], colors.red[400])};
12559
12880
  cursor: pointer;
12560
12881
  position: relative;
12561
12882
  &:hover {
12562
- background-color: ${colors.darkGray[500]};
12883
+ background-color: ${t2(colors.gray[200], colors.darkGray[500])};
12563
12884
  }
12564
12885
  & > span {
12565
12886
  width: ${size2[1.5]};
@@ -12600,10 +12921,10 @@ var getStyles2 = () => {
12600
12921
  flex-direction: column;
12601
12922
  gap: ${size2[0.5]};
12602
12923
  border-radius: ${tokens.border.radius.sm};
12603
- border: 1px solid ${colors.gray[700]};
12604
- 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])};
12605
12926
  font-size: ${font.size.xs};
12606
- color: ${colors.gray[300]};
12927
+ color: ${t2(colors.gray[700], colors.gray[300])};
12607
12928
  z-index: 99999;
12608
12929
  min-width: 120px;
12609
12930
  padding: ${size2[0.5]};
@@ -12613,17 +12934,19 @@ var getStyles2 = () => {
12613
12934
  align-items: center;
12614
12935
  justify-content: space-between;
12615
12936
  border-radius: ${tokens.border.radius.xs};
12616
- padding: ${tokens.size[0.5]} ${tokens.size[1]};
12937
+ padding: ${tokens.size[1]} ${tokens.size[1]};
12617
12938
  cursor: pointer;
12618
12939
  background-color: transparent;
12619
12940
  border: none;
12941
+ color: ${t2(colors.gray[700], colors.gray[300])};
12620
12942
  & svg {
12943
+ color: ${t2(colors.gray[600], colors.gray[400])};
12621
12944
  transform: rotate(-90deg);
12622
12945
  width: ${tokens.size[2]};
12623
12946
  height: ${tokens.size[2]};
12624
12947
  }
12625
12948
  &:hover {
12626
- background-color: ${colors.darkGray[500]};
12949
+ background-color: ${t2(colors.gray[200], colors.darkGray[500])};
12627
12950
  }
12628
12951
  &:focus-visible {
12629
12952
  outline-offset: 2px;
@@ -12635,33 +12958,48 @@ var getStyles2 = () => {
12635
12958
  }
12636
12959
  `,
12637
12960
  settingsMenuHeader: u`
12638
- padding: ${tokens.size[0.5]} ${tokens.size[1]};
12961
+ padding: ${tokens.size[1]} ${tokens.size[1]};
12639
12962
  font-weight: ${font.weight.medium};
12640
- border-bottom: 1px solid ${colors.darkGray[400]};
12641
- 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])};
12642
12965
  font-size: ${font.size["xs"]};
12643
12966
  `,
12644
12967
  settingsSubButton: u`
12645
12968
  display: flex;
12646
12969
  align-items: center;
12647
12970
  justify-content: space-between;
12648
- color: ${colors.gray[300]};
12971
+ color: ${t2(colors.gray[700], colors.gray[300])};
12649
12972
  font-size: ${font.size["xs"]};
12650
12973
  border-radius: ${tokens.border.radius.xs};
12651
- padding: ${tokens.size[0.5]} ${tokens.size[1]};
12974
+ padding: ${tokens.size[1]} ${tokens.size[1]};
12652
12975
  cursor: pointer;
12653
12976
  background-color: transparent;
12654
12977
  border: none;
12978
+ & svg {
12979
+ color: ${t2(colors.gray[600], colors.gray[400])};
12980
+ }
12655
12981
  &:hover {
12656
- background-color: ${colors.darkGray[500]};
12982
+ background-color: ${t2(colors.gray[200], colors.darkGray[500])};
12657
12983
  }
12658
12984
  &:focus-visible {
12659
12985
  outline-offset: 2px;
12660
12986
  outline: 2px solid ${colors.blue[800]};
12661
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
+ }
12662
12998
  `
12663
12999
  };
12664
13000
  };
13001
+ var lightStyles2 = stylesFactory2("light");
13002
+ var darkStyles2 = stylesFactory2("dark");
12665
13003
  export {
12666
13004
  Devtools,
12667
13005
  DevtoolsComponent,