@tanstack/query-devtools 5.24.0 → 5.27.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.
@@ -1,4 +1,4 @@
1
- import { createContext, delegateEvents, sortFns, mutationSortFns, createSignal, $PROXY, $TRACK, getListener, batch, getPreferredColorScheme, createMemo, createComponent, createEffect, onMount, onCleanup, Show, Portal, use, insert, createRenderEffect, className, on, setAttribute, getQueryStatusColor, getMutationStatusColor, getQueryStatusLabel, spread, mergeProps, getQueryStatusColorByLabel, displayValue, For, isServer, createUniqueId, useContext, Index, updateNestedDataByPath, template, convertRemToPixels, getSidedProp, untrack, useTransition, createRoot, splitProps, addEventListener, stringify, Switch, Match, deleteNestedDataByPath, clearDelegatedEvents, Dynamic, children, createComputed, getOwner, DEV } from '../chunk/7LTSZCE6.js';
1
+ import { createContext, delegateEvents, sortFns, mutationSortFns, createSignal, $PROXY, $TRACK, getListener, batch, getPreferredColorScheme, createMemo, createComponent, createEffect, onMount, onCleanup, Show, Portal, use, insert, createRenderEffect, className, on, setAttribute, getQueryStatusColor, getMutationStatusColor, getQueryStatusLabel, spread, mergeProps, getQueryStatusColorByLabel, displayValue, For, isServer, createUniqueId, useContext, Index, updateNestedDataByPath, template, convertRemToPixels, getSidedProp, untrack, useTransition, createRoot, splitProps, addEventListener, stringify, Switch, Match, deleteNestedDataByPath, clearDelegatedEvents, Dynamic, children, createComputed, getOwner, DEV } from '../chunk/BWUNFN7M.js';
2
2
 
3
3
  // ../../node_modules/.pnpm/@tanstack+match-sorter-utils@8.11.8/node_modules/@tanstack/match-sorter-utils/build/lib/index.mjs
4
4
  var characterMap = {
@@ -8836,7 +8836,8 @@ var QueryDevtoolsContext = createContext({
8836
8836
  client: void 0,
8837
8837
  onlineManager: void 0,
8838
8838
  queryFlavor: "",
8839
- version: ""
8839
+ version: "",
8840
+ shadowDOMTarget: void 0
8840
8841
  });
8841
8842
  function useQueryDevtoolsContext() {
8842
8843
  return useContext(QueryDevtoolsContext);
@@ -9601,11 +9602,11 @@ var PiPProvider = (props) => {
9601
9602
  }
9602
9603
  });
9603
9604
  createEffect(() => {
9604
- const gooberStyles = document.getElementById("_goober");
9605
+ const gooberStyles = (useQueryDevtoolsContext().shadowDOMTarget || document).querySelector("#_goober");
9605
9606
  const w = pipWindow();
9606
9607
  if (gooberStyles && w) {
9607
9608
  const observer = new MutationObserver(() => {
9608
- const pip_style = w.document.getElementById("_goober");
9609
+ const pip_style = (useQueryDevtoolsContext().shadowDOMTarget || w.document).querySelector("#_goober");
9609
9610
  if (pip_style) {
9610
9611
  pip_style.textContent = gooberStyles.textContent;
9611
9612
  }
@@ -9680,8 +9681,11 @@ var DevtoolsComponent = (props) => {
9680
9681
  var Devtools_default = DevtoolsComponent;
9681
9682
  var Devtools = (props) => {
9682
9683
  const theme = useTheme();
9684
+ const css = useQueryDevtoolsContext().shadowDOMTarget ? u.bind({
9685
+ target: useQueryDevtoolsContext().shadowDOMTarget
9686
+ }) : u;
9683
9687
  const styles = createMemo(() => {
9684
- return theme() === "dark" ? darkStyles2 : lightStyles2;
9688
+ return theme() === "dark" ? darkStyles2(css) : lightStyles2(css);
9685
9689
  });
9686
9690
  const pip = usePiPWindow();
9687
9691
  const buttonPosition = createMemo(() => {
@@ -9782,7 +9786,7 @@ var Devtools = (props) => {
9782
9786
  });
9783
9787
  }
9784
9788
  }), null);
9785
- createRenderEffect(() => className(_el$, clsx(u`
9789
+ createRenderEffect(() => className(_el$, clsx(css`
9786
9790
  & .tsqd-panel-transition-exit-active,
9787
9791
  & .tsqd-panel-transition-enter-active {
9788
9792
  transition:
@@ -9815,8 +9819,11 @@ var Devtools = (props) => {
9815
9819
  var PiPPanel = (props) => {
9816
9820
  const pip = usePiPWindow();
9817
9821
  const theme = useTheme();
9822
+ const css = useQueryDevtoolsContext().shadowDOMTarget ? u.bind({
9823
+ target: useQueryDevtoolsContext().shadowDOMTarget
9824
+ }) : u;
9818
9825
  const styles = createMemo(() => {
9819
- return theme() === "dark" ? darkStyles2 : lightStyles2;
9826
+ return theme() === "dark" ? darkStyles2(css) : lightStyles2(css);
9820
9827
  });
9821
9828
  const getPanelDynamicStyles = () => {
9822
9829
  const {
@@ -9824,12 +9831,12 @@ var PiPPanel = (props) => {
9824
9831
  } = tokens;
9825
9832
  const t2 = (light, dark) => theme() === "dark" ? dark : light;
9826
9833
  if (panelWidth() < secondBreakpoint) {
9827
- return u`
9834
+ return css`
9828
9835
  flex-direction: column;
9829
9836
  background-color: ${t2(colors.gray[300], colors.gray[600])};
9830
9837
  `;
9831
9838
  }
9832
- return u`
9839
+ return css`
9833
9840
  flex-direction: row;
9834
9841
  background-color: ${t2(colors.gray[200], colors.darkGray[900])};
9835
9842
  `;
@@ -9859,7 +9866,7 @@ var PiPPanel = (props) => {
9859
9866
  _el$5.style.setProperty("width", "100vw");
9860
9867
  insert(_el$5, () => props.children);
9861
9868
  createRenderEffect(() => className(_el$5, clsx(styles().panel, getPanelDynamicStyles(), {
9862
- [u`
9869
+ [css`
9863
9870
  min-width: min-content;
9864
9871
  `]: panelWidth() < thirdBreakpoint
9865
9872
  }, "tsqd-main-panel")));
@@ -9868,8 +9875,11 @@ var PiPPanel = (props) => {
9868
9875
  };
9869
9876
  var DevtoolsPanel = (props) => {
9870
9877
  const theme = useTheme();
9878
+ const css = useQueryDevtoolsContext().shadowDOMTarget ? u.bind({
9879
+ target: useQueryDevtoolsContext().shadowDOMTarget
9880
+ }) : u;
9871
9881
  const styles = createMemo(() => {
9872
- return theme() === "dark" ? darkStyles2 : lightStyles2;
9882
+ return theme() === "dark" ? darkStyles2(css) : lightStyles2(css);
9873
9883
  });
9874
9884
  const [isResizing, setIsResizing] = createSignal(false);
9875
9885
  const position = createMemo(() => props.localStore.position || useQueryDevtoolsContext().position || POSITION);
@@ -9963,12 +9973,12 @@ var DevtoolsPanel = (props) => {
9963
9973
  } = tokens;
9964
9974
  const t2 = (light, dark) => theme() === "dark" ? dark : light;
9965
9975
  if (panelWidth() < secondBreakpoint) {
9966
- return u`
9976
+ return css`
9967
9977
  flex-direction: column;
9968
9978
  background-color: ${t2(colors.gray[300], colors.gray[600])};
9969
9979
  `;
9970
9980
  }
9971
- return u`
9981
+ return css`
9972
9982
  flex-direction: row;
9973
9983
  background-color: ${t2(colors.gray[200], colors.darkGray[900])};
9974
9984
  `;
@@ -9990,7 +10000,7 @@ var DevtoolsPanel = (props) => {
9990
10000
  }), null);
9991
10001
  createRenderEffect((_p$) => {
9992
10002
  const _v$ = clsx(styles().panel, styles()[`panel-position-${position()}`], getPanelDynamicStyles(), {
9993
- [u`
10003
+ [css`
9994
10004
  min-width: min-content;
9995
10005
  `]: panelWidth() < thirdBreakpoint && (position() === "right" || position() === "left")
9996
10006
  }, "tsqd-main-panel"), _v$2 = position() === "bottom" || position() === "top" ? `${props.localStore.height || DEFAULT_HEIGHT}px` : "auto", _v$3 = position() === "right" || position() === "left" ? `${props.localStore.width || DEFAULT_WIDTH}px` : "auto", _v$4 = clsx(styles().dragHandle, styles()[`dragHandle-position-${position()}`], "tsqd-drag-handle"), _v$5 = clsx(styles().closeBtn, styles()[`closeBtn-position-${position()}`], "tsqd-minimize-btn");
@@ -10015,8 +10025,11 @@ var ContentView = (props) => {
10015
10025
  setupMutationCacheSubscription();
10016
10026
  let containerRef;
10017
10027
  const theme = useTheme();
10028
+ const css = useQueryDevtoolsContext().shadowDOMTarget ? u.bind({
10029
+ target: useQueryDevtoolsContext().shadowDOMTarget
10030
+ }) : u;
10018
10031
  const styles = createMemo(() => {
10019
- return theme() === "dark" ? darkStyles2 : lightStyles2;
10032
+ return theme() === "dark" ? darkStyles2(css) : lightStyles2(css);
10020
10033
  });
10021
10034
  const pip = usePiPWindow();
10022
10035
  const [selectedView, setSelectedView] = createSignal("queries");
@@ -10447,10 +10460,10 @@ var ContentView = (props) => {
10447
10460
  }
10448
10461
  }), null);
10449
10462
  createRenderEffect((_p$) => {
10450
- const _v$6 = clsx(styles().queriesContainer, panelWidth() < secondBreakpoint && (selectedQueryHash() || selectedMutationId()) && u`
10463
+ const _v$6 = clsx(styles().queriesContainer, panelWidth() < secondBreakpoint && (selectedQueryHash() || selectedMutationId()) && css`
10451
10464
  height: 50%;
10452
10465
  max-height: 50%;
10453
- `, panelWidth() < secondBreakpoint && !(selectedQueryHash() || selectedMutationId()) && u`
10466
+ `, panelWidth() < secondBreakpoint && !(selectedQueryHash() || selectedMutationId()) && css`
10454
10467
  height: 100%;
10455
10468
  max-height: 100%;
10456
10469
  `, "tsqd-queries-container"), _v$7 = clsx(styles().row, "tsqd-header"), _v$8 = styles().logoAndToggleContainer, _v$9 = clsx(styles().logo, "tsqd-text-logo-container"), _v$10 = clsx(styles().tanstackLogo, "tsqd-text-logo-tanstack"), _v$11 = clsx(styles().queryFlavorLogo, "tsqd-text-logo-query-flavor"), _v$12 = clsx(styles().row, "tsqd-filters-actions-container"), _v$13 = clsx(styles().filtersContainer, "tsqd-filters-container"), _v$14 = clsx(styles().filterInput, "tsqd-query-filter-textfield-container"), _v$15 = clsx("tsqd-query-filter-textfield"), _v$16 = clsx(styles().filterSelect, "tsqd-query-filter-sort-container"), _v$17 = `Sort order ${(selectedView() === "queries" ? sortOrder() : mutationSortOrder()) === -1 ? "descending" : "ascending"}`, _v$18 = (selectedView() === "queries" ? sortOrder() : mutationSortOrder()) === -1, _v$19 = clsx(styles().actionsContainer, "tsqd-actions-container"), _v$20 = clsx(styles().actionsBtn, "tsqd-actions-btn", "tsqd-action-clear-cache"), _v$21 = `Clear ${selectedView()} cache`, _v$22 = clsx(styles().actionsBtn, offline() && styles().actionsBtnOffline, "tsqd-actions-btn", "tsqd-action-mock-offline-behavior"), _v$23 = `${offline() ? "Unset offline mocking behavior" : "Mock offline behavior"}`, _v$24 = offline(), _v$25 = `${offline() ? "Unset offline mocking behavior" : "Mock offline behavior"}`;
@@ -10517,8 +10530,11 @@ var ContentView = (props) => {
10517
10530
  };
10518
10531
  var QueryRow = (props) => {
10519
10532
  const theme = useTheme();
10533
+ const css = useQueryDevtoolsContext().shadowDOMTarget ? u.bind({
10534
+ target: useQueryDevtoolsContext().shadowDOMTarget
10535
+ }) : u;
10520
10536
  const styles = createMemo(() => {
10521
- return theme() === "dark" ? darkStyles2 : lightStyles2;
10537
+ return theme() === "dark" ? darkStyles2(css) : lightStyles2(css);
10522
10538
  });
10523
10539
  const {
10524
10540
  colors,
@@ -10544,12 +10560,12 @@ var QueryRow = (props) => {
10544
10560
  }));
10545
10561
  const getObserverCountColorStyles = () => {
10546
10562
  if (color() === "gray") {
10547
- return u`
10563
+ return css`
10548
10564
  background-color: ${t2(colors[color()][200], colors[color()][700])};
10549
10565
  color: ${t2(colors[color()][700], colors[color()][300])};
10550
10566
  `;
10551
10567
  }
10552
- return u`
10568
+ return css`
10553
10569
  background-color: ${t2(colors[color()][200] + alpha[80], colors[color()][900])};
10554
10570
  color: ${t2(colors[color()][800], colors[color()][300])};
10555
10571
  `;
@@ -10588,8 +10604,11 @@ var QueryRow = (props) => {
10588
10604
  };
10589
10605
  var MutationRow = (props) => {
10590
10606
  const theme = useTheme();
10607
+ const css = useQueryDevtoolsContext().shadowDOMTarget ? u.bind({
10608
+ target: useQueryDevtoolsContext().shadowDOMTarget
10609
+ }) : u;
10591
10610
  const styles = createMemo(() => {
10592
- return theme() === "dark" ? darkStyles2 : lightStyles2;
10611
+ return theme() === "dark" ? darkStyles2(css) : lightStyles2(css);
10593
10612
  });
10594
10613
  const {
10595
10614
  colors,
@@ -10621,12 +10640,12 @@ var MutationRow = (props) => {
10621
10640
  }));
10622
10641
  const getObserverCountColorStyles = () => {
10623
10642
  if (color() === "gray") {
10624
- return u`
10643
+ return css`
10625
10644
  background-color: ${t2(colors[color()][200], colors[color()][700])};
10626
10645
  color: ${t2(colors[color()][700], colors[color()][300])};
10627
10646
  `;
10628
10647
  }
10629
- return u`
10648
+ return css`
10630
10649
  background-color: ${t2(colors[color()][200] + alpha[80], colors[color()][900])};
10631
10650
  color: ${t2(colors[color()][800], colors[color()][300])};
10632
10651
  `;
@@ -10703,8 +10722,11 @@ var QueryStatusCount = () => {
10703
10722
  const paused = createSubscribeToQueryCacheBatcher((queryCache) => queryCache().getAll().filter((q) => getQueryStatusLabel(q) === "paused").length);
10704
10723
  const inactive = createSubscribeToQueryCacheBatcher((queryCache) => queryCache().getAll().filter((q) => getQueryStatusLabel(q) === "inactive").length);
10705
10724
  const theme = useTheme();
10725
+ const css = useQueryDevtoolsContext().shadowDOMTarget ? u.bind({
10726
+ target: useQueryDevtoolsContext().shadowDOMTarget
10727
+ }) : u;
10706
10728
  const styles = createMemo(() => {
10707
- return theme() === "dark" ? darkStyles2 : lightStyles2;
10729
+ return theme() === "dark" ? darkStyles2(css) : lightStyles2(css);
10708
10730
  });
10709
10731
  return (() => {
10710
10732
  const _el$55 = _tmpl$26();
@@ -10765,8 +10787,11 @@ var MutationStatusCount = () => {
10765
10787
  status: m.state.status
10766
10788
  }) === "red").length);
10767
10789
  const theme = useTheme();
10790
+ const css = useQueryDevtoolsContext().shadowDOMTarget ? u.bind({
10791
+ target: useQueryDevtoolsContext().shadowDOMTarget
10792
+ }) : u;
10768
10793
  const styles = createMemo(() => {
10769
- return theme() === "dark" ? darkStyles2 : lightStyles2;
10794
+ return theme() === "dark" ? darkStyles2(css) : lightStyles2(css);
10770
10795
  });
10771
10796
  return (() => {
10772
10797
  const _el$56 = _tmpl$26();
@@ -10804,8 +10829,11 @@ var MutationStatusCount = () => {
10804
10829
  };
10805
10830
  var QueryStatus = (props) => {
10806
10831
  const theme = useTheme();
10832
+ const css = useQueryDevtoolsContext().shadowDOMTarget ? u.bind({
10833
+ target: useQueryDevtoolsContext().shadowDOMTarget
10834
+ }) : u;
10807
10835
  const styles = createMemo(() => {
10808
- return theme() === "dark" ? darkStyles2 : lightStyles2;
10836
+ return theme() === "dark" ? darkStyles2(css) : lightStyles2(css);
10809
10837
  });
10810
10838
  const {
10811
10839
  colors,
@@ -10842,7 +10870,7 @@ var QueryStatus = (props) => {
10842
10870
  return showLabel();
10843
10871
  },
10844
10872
  get ["class"]() {
10845
- return clsx(styles().queryStatusTag, !showLabel() && u`
10873
+ return clsx(styles().queryStatusTag, !showLabel() && css`
10846
10874
  cursor: pointer;
10847
10875
  &:hover {
10848
10876
  background: ${t2(colors.gray[200], colors.darkGray[400])}${alpha[80]};
@@ -10876,12 +10904,12 @@ var QueryStatus = (props) => {
10876
10904
  }), _el$61);
10877
10905
  insert(_el$61, () => props.count);
10878
10906
  createRenderEffect((_p$) => {
10879
- const _v$32 = clsx(u`
10907
+ const _v$32 = clsx(css`
10880
10908
  width: ${tokens.size[1.5]};
10881
10909
  height: ${tokens.size[1.5]};
10882
10910
  border-radius: ${tokens.border.radius.full};
10883
10911
  background-color: ${tokens.colors[props.color][500]};
10884
- `, "tsqd-query-status-tag-dot"), _v$33 = clsx(styles().queryStatusCount, props.count > 0 && props.color !== "gray" && u`
10912
+ `, "tsqd-query-status-tag-dot"), _v$33 = clsx(styles().queryStatusCount, props.count > 0 && props.color !== "gray" && css`
10885
10913
  background-color: ${t2(colors[props.color][100], colors[props.color][900])};
10886
10914
  color: ${t2(colors[props.color][700], colors[props.color][300])};
10887
10915
  `, "tsqd-query-status-tag-count");
@@ -10897,8 +10925,11 @@ var QueryStatus = (props) => {
10897
10925
  };
10898
10926
  var QueryDetails = () => {
10899
10927
  const theme = useTheme();
10928
+ const css = useQueryDevtoolsContext().shadowDOMTarget ? u.bind({
10929
+ target: useQueryDevtoolsContext().shadowDOMTarget
10930
+ }) : u;
10900
10931
  const styles = createMemo(() => {
10901
- return theme() === "dark" ? darkStyles2 : lightStyles2;
10932
+ return theme() === "dark" ? darkStyles2(css) : lightStyles2(css);
10902
10933
  });
10903
10934
  const {
10904
10935
  colors
@@ -10961,13 +10992,13 @@ var QueryDetails = () => {
10961
10992
  });
10962
10993
  const getQueryStatusColors = () => {
10963
10994
  if (color() === "gray") {
10964
- return u`
10995
+ return css`
10965
10996
  background-color: ${t2(colors[color()][200], colors[color()][700])};
10966
10997
  color: ${t2(colors[color()][700], colors[color()][300])};
10967
10998
  border-color: ${t2(colors[color()][400], colors[color()][600])};
10968
10999
  `;
10969
11000
  }
10970
- return u`
11001
+ return css`
10971
11002
  background-color: ${t2(colors[color()][100], colors[color()][900])};
10972
11003
  color: ${t2(colors[color()][700], colors[color()][300])};
10973
11004
  border-color: ${t2(colors[color()][400], colors[color()][600])};
@@ -11033,9 +11064,9 @@ var QueryDetails = () => {
11033
11064
  };
11034
11065
  insert(_el$88, () => queryStatus() === "error" ? "Restore" : "Trigger", _el$90);
11035
11066
  createRenderEffect((_p$) => {
11036
- const _v$34 = clsx(u`
11067
+ const _v$34 = clsx(css`
11037
11068
  color: ${t2(colors.red[500], colors.red[400])};
11038
- `, "tsqd-query-details-actions-btn", "tsqd-query-details-action-error"), _v$35 = queryStatus() === "pending", _v$36 = u`
11069
+ `, "tsqd-query-details-actions-btn", "tsqd-query-details-action-error"), _v$35 = queryStatus() === "pending", _v$36 = css`
11039
11070
  background-color: ${t2(colors.red[500], colors.red[400])};
11040
11071
  `;
11041
11072
  _v$34 !== _p$._v$34 && className(_el$88, _p$._v$34 = _v$34);
@@ -11073,7 +11104,7 @@ var QueryDetails = () => {
11073
11104
  }), null);
11074
11105
  insert(_el$91, createComponent(ChevronDown, {}), null);
11075
11106
  createRenderEffect((_p$) => {
11076
- const _v$37 = clsx(styles().actionsSelect, "tsqd-query-details-actions-btn", "tsqd-query-details-action-error-multiple"), _v$38 = u`
11107
+ const _v$37 = clsx(styles().actionsSelect, "tsqd-query-details-actions-btn", "tsqd-query-details-action-error-multiple"), _v$38 = css`
11077
11108
  background-color: ${tokens.colors.red[400]};
11078
11109
  `, _v$39 = queryStatus() === "pending";
11079
11110
  _v$37 !== _p$._v$37 && className(_el$91, _p$._v$37 = _v$37);
@@ -11107,25 +11138,25 @@ var QueryDetails = () => {
11107
11138
  }
11108
11139
  }));
11109
11140
  createRenderEffect((_p$) => {
11110
- const _v$40 = clsx(styles().detailsContainer, "tsqd-query-details-container"), _v$41 = clsx(styles().detailsHeader, "tsqd-query-details-header"), _v$42 = clsx(styles().detailsBody, "tsqd-query-details-summary-container"), _v$43 = clsx(styles().queryDetailsStatus, getQueryStatusColors()), _v$44 = clsx(styles().detailsHeader, "tsqd-query-details-header"), _v$45 = clsx(styles().actionsBody, "tsqd-query-details-actions-container"), _v$46 = clsx(u`
11141
+ const _v$40 = clsx(styles().detailsContainer, "tsqd-query-details-container"), _v$41 = clsx(styles().detailsHeader, "tsqd-query-details-header"), _v$42 = clsx(styles().detailsBody, "tsqd-query-details-summary-container"), _v$43 = clsx(styles().queryDetailsStatus, getQueryStatusColors()), _v$44 = clsx(styles().detailsHeader, "tsqd-query-details-header"), _v$45 = clsx(styles().actionsBody, "tsqd-query-details-actions-container"), _v$46 = clsx(css`
11111
11142
  color: ${t2(colors.blue[600], colors.blue[400])};
11112
- `, "tsqd-query-details-actions-btn", "tsqd-query-details-action-refetch"), _v$47 = statusLabel() === "fetching", _v$48 = u`
11143
+ `, "tsqd-query-details-actions-btn", "tsqd-query-details-action-refetch"), _v$47 = statusLabel() === "fetching", _v$48 = css`
11113
11144
  background-color: ${t2(colors.blue[600], colors.blue[400])};
11114
- `, _v$49 = clsx(u`
11145
+ `, _v$49 = clsx(css`
11115
11146
  color: ${t2(colors.yellow[600], colors.yellow[400])};
11116
- `, "tsqd-query-details-actions-btn", "tsqd-query-details-action-invalidate"), _v$50 = queryStatus() === "pending", _v$51 = u`
11147
+ `, "tsqd-query-details-actions-btn", "tsqd-query-details-action-invalidate"), _v$50 = queryStatus() === "pending", _v$51 = css`
11117
11148
  background-color: ${t2(colors.yellow[600], colors.yellow[400])};
11118
- `, _v$52 = clsx(u`
11149
+ `, _v$52 = clsx(css`
11119
11150
  color: ${t2(colors.gray[600], colors.gray[300])};
11120
- `, "tsqd-query-details-actions-btn", "tsqd-query-details-action-reset"), _v$53 = queryStatus() === "pending", _v$54 = u`
11151
+ `, "tsqd-query-details-actions-btn", "tsqd-query-details-action-reset"), _v$53 = queryStatus() === "pending", _v$54 = css`
11121
11152
  background-color: ${t2(colors.gray[600], colors.gray[400])};
11122
- `, _v$55 = clsx(u`
11153
+ `, _v$55 = clsx(css`
11123
11154
  color: ${t2(colors.pink[500], colors.pink[400])};
11124
- `, "tsqd-query-details-actions-btn", "tsqd-query-details-action-remove"), _v$56 = statusLabel() === "fetching", _v$57 = u`
11155
+ `, "tsqd-query-details-actions-btn", "tsqd-query-details-action-remove"), _v$56 = statusLabel() === "fetching", _v$57 = css`
11125
11156
  background-color: ${t2(colors.pink[500], colors.pink[400])};
11126
- `, _v$58 = clsx(u`
11157
+ `, _v$58 = clsx(css`
11127
11158
  color: ${t2(colors.cyan[500], colors.cyan[400])};
11128
- `, "tsqd-query-details-actions-btn", "tsqd-query-details-action-loading"), _v$59 = restoringLoading(), _v$60 = u`
11159
+ `, "tsqd-query-details-actions-btn", "tsqd-query-details-action-loading"), _v$59 = restoringLoading(), _v$60 = css`
11129
11160
  background-color: ${t2(colors.cyan[500], colors.cyan[400])};
11130
11161
  `, _v$61 = clsx(styles().detailsHeader, "tsqd-query-details-header"), _v$62 = tokens.size[2], _v$63 = clsx(styles().detailsHeader, "tsqd-query-details-header"), _v$64 = tokens.size[2];
11131
11162
  _v$40 !== _p$._v$40 && className(_el$62, _p$._v$40 = _v$40);
@@ -11187,8 +11218,11 @@ var QueryDetails = () => {
11187
11218
  };
11188
11219
  var MutationDetails = () => {
11189
11220
  const theme = useTheme();
11221
+ const css = useQueryDevtoolsContext().shadowDOMTarget ? u.bind({
11222
+ target: useQueryDevtoolsContext().shadowDOMTarget
11223
+ }) : u;
11190
11224
  const styles = createMemo(() => {
11191
- return theme() === "dark" ? darkStyles2 : lightStyles2;
11225
+ return theme() === "dark" ? darkStyles2(css) : lightStyles2(css);
11192
11226
  });
11193
11227
  const {
11194
11228
  colors
@@ -11215,13 +11249,13 @@ var MutationDetails = () => {
11215
11249
  const activeMutation = createSubscribeToMutationCacheBatcher((mutationCache) => mutationCache().getAll().find((mutation) => mutation.mutationId === selectedMutationId()), false);
11216
11250
  const getQueryStatusColors = () => {
11217
11251
  if (color() === "gray") {
11218
- return u`
11252
+ return css`
11219
11253
  background-color: ${t2(colors[color()][200], colors[color()][700])};
11220
11254
  color: ${t2(colors[color()][700], colors[color()][300])};
11221
11255
  border-color: ${t2(colors[color()][400], colors[color()][600])};
11222
11256
  `;
11223
11257
  }
11224
- return u`
11258
+ return css`
11225
11259
  background-color: ${t2(colors[color()][100], colors[color()][900])};
11226
11260
  color: ${t2(colors[color()][700], colors[color()][300])};
11227
11261
  border-color: ${t2(colors[color()][400], colors[color()][600])};
@@ -11395,7 +11429,7 @@ var createSubscribeToMutationCacheBatcher = (callback, equalityCheck = true) =>
11395
11429
  });
11396
11430
  return value;
11397
11431
  };
11398
- var stylesFactory2 = (theme) => {
11432
+ var stylesFactory2 = (theme, css) => {
11399
11433
  const {
11400
11434
  colors,
11401
11435
  font,
@@ -11406,7 +11440,7 @@ var stylesFactory2 = (theme) => {
11406
11440
  } = tokens;
11407
11441
  const t2 = (light, dark) => theme === "light" ? light : dark;
11408
11442
  return {
11409
- devtoolsBtn: u`
11443
+ devtoolsBtn: css`
11410
11444
  z-index: 100000;
11411
11445
  position: fixed;
11412
11446
  padding: 4px;
@@ -11460,7 +11494,7 @@ var stylesFactory2 = (theme) => {
11460
11494
  }
11461
11495
  }
11462
11496
  `,
11463
- panel: u`
11497
+ panel: css`
11464
11498
  position: fixed;
11465
11499
  z-index: 9999;
11466
11500
  display: flex;
@@ -11486,26 +11520,26 @@ var stylesFactory2 = (theme) => {
11486
11520
  background: ${t2(colors.gray[400], colors.darkGray[300])};
11487
11521
  }
11488
11522
  `,
11489
- "devtoolsBtn-position-bottom-right": u`
11523
+ "devtoolsBtn-position-bottom-right": css`
11490
11524
  bottom: 12px;
11491
11525
  right: 12px;
11492
11526
  `,
11493
- "devtoolsBtn-position-bottom-left": u`
11527
+ "devtoolsBtn-position-bottom-left": css`
11494
11528
  bottom: 12px;
11495
11529
  left: 12px;
11496
11530
  `,
11497
- "devtoolsBtn-position-top-left": u`
11531
+ "devtoolsBtn-position-top-left": css`
11498
11532
  top: 12px;
11499
11533
  left: 12px;
11500
11534
  `,
11501
- "devtoolsBtn-position-top-right": u`
11535
+ "devtoolsBtn-position-top-right": css`
11502
11536
  top: 12px;
11503
11537
  right: 12px;
11504
11538
  `,
11505
- "devtoolsBtn-position-relative": u`
11539
+ "devtoolsBtn-position-relative": css`
11506
11540
  position: relative;
11507
11541
  `,
11508
- "panel-position-top": u`
11542
+ "panel-position-top": css`
11509
11543
  top: 0;
11510
11544
  right: 0;
11511
11545
  left: 0;
@@ -11513,7 +11547,7 @@ var stylesFactory2 = (theme) => {
11513
11547
  min-height: ${size2[14]};
11514
11548
  border-bottom: ${t2(colors.gray[400], colors.darkGray[300])} 1px solid;
11515
11549
  `,
11516
- "panel-position-bottom": u`
11550
+ "panel-position-bottom": css`
11517
11551
  bottom: 0;
11518
11552
  right: 0;
11519
11553
  left: 0;
@@ -11521,21 +11555,21 @@ var stylesFactory2 = (theme) => {
11521
11555
  min-height: ${size2[14]};
11522
11556
  border-top: ${t2(colors.gray[400], colors.darkGray[300])} 1px solid;
11523
11557
  `,
11524
- "panel-position-right": u`
11558
+ "panel-position-right": css`
11525
11559
  bottom: 0;
11526
11560
  right: 0;
11527
11561
  top: 0;
11528
11562
  border-left: ${t2(colors.gray[400], colors.darkGray[300])} 1px solid;
11529
11563
  max-width: 90%;
11530
11564
  `,
11531
- "panel-position-left": u`
11565
+ "panel-position-left": css`
11532
11566
  bottom: 0;
11533
11567
  left: 0;
11534
11568
  top: 0;
11535
11569
  border-right: ${t2(colors.gray[400], colors.darkGray[300])} 1px solid;
11536
11570
  max-width: 90%;
11537
11571
  `,
11538
- closeBtn: u`
11572
+ closeBtn: css`
11539
11573
  position: absolute;
11540
11574
  cursor: pointer;
11541
11575
  z-index: 5;
@@ -11556,7 +11590,7 @@ var stylesFactory2 = (theme) => {
11556
11590
  height: ${size2[2]};
11557
11591
  }
11558
11592
  `,
11559
- "closeBtn-position-top": u`
11593
+ "closeBtn-position-top": css`
11560
11594
  bottom: 0;
11561
11595
  right: ${size2[2]};
11562
11596
  transform: translate(0, 100%);
@@ -11580,7 +11614,7 @@ var stylesFactory2 = (theme) => {
11580
11614
  transform: rotate(180deg);
11581
11615
  }
11582
11616
  `,
11583
- "closeBtn-position-bottom": u`
11617
+ "closeBtn-position-bottom": css`
11584
11618
  top: 0;
11585
11619
  right: ${size2[2]};
11586
11620
  transform: translate(0, -100%);
@@ -11600,7 +11634,7 @@ var stylesFactory2 = (theme) => {
11600
11634
  width: calc(100% + ${size2[5]});
11601
11635
  }
11602
11636
  `,
11603
- "closeBtn-position-right": u`
11637
+ "closeBtn-position-right": css`
11604
11638
  bottom: ${size2[2]};
11605
11639
  left: 0;
11606
11640
  transform: translate(-100%, 0);
@@ -11623,7 +11657,7 @@ var stylesFactory2 = (theme) => {
11623
11657
  transform: rotate(-90deg);
11624
11658
  }
11625
11659
  `,
11626
- "closeBtn-position-left": u`
11660
+ "closeBtn-position-left": css`
11627
11661
  bottom: ${size2[2]};
11628
11662
  right: 0;
11629
11663
  transform: translate(100%, 0);
@@ -11646,7 +11680,7 @@ var stylesFactory2 = (theme) => {
11646
11680
  transform: rotate(90deg);
11647
11681
  }
11648
11682
  `,
11649
- queriesContainer: u`
11683
+ queriesContainer: css`
11650
11684
  flex: 1 1 700px;
11651
11685
  background-color: ${t2(colors.gray[50], colors.darkGray[700])};
11652
11686
  display: flex;
@@ -11655,7 +11689,7 @@ var stylesFactory2 = (theme) => {
11655
11689
  font-family: ui-sans-serif, Inter, system-ui, sans-serif, sans-serif;
11656
11690
  }
11657
11691
  `,
11658
- dragHandle: u`
11692
+ dragHandle: css`
11659
11693
  position: absolute;
11660
11694
  transition: background-color 0.125s ease;
11661
11695
  &:hover {
@@ -11663,31 +11697,31 @@ var stylesFactory2 = (theme) => {
11663
11697
  }
11664
11698
  z-index: 4;
11665
11699
  `,
11666
- "dragHandle-position-top": u`
11700
+ "dragHandle-position-top": css`
11667
11701
  bottom: 0;
11668
11702
  width: 100%;
11669
11703
  height: 3px;
11670
11704
  cursor: ns-resize;
11671
11705
  `,
11672
- "dragHandle-position-bottom": u`
11706
+ "dragHandle-position-bottom": css`
11673
11707
  top: 0;
11674
11708
  width: 100%;
11675
11709
  height: 3px;
11676
11710
  cursor: ns-resize;
11677
11711
  `,
11678
- "dragHandle-position-right": u`
11712
+ "dragHandle-position-right": css`
11679
11713
  left: 0;
11680
11714
  width: 3px;
11681
11715
  height: 100%;
11682
11716
  cursor: ew-resize;
11683
11717
  `,
11684
- "dragHandle-position-left": u`
11718
+ "dragHandle-position-left": css`
11685
11719
  right: 0;
11686
11720
  width: 3px;
11687
11721
  height: 100%;
11688
11722
  cursor: ew-resize;
11689
11723
  `,
11690
- row: u`
11724
+ row: css`
11691
11725
  display: flex;
11692
11726
  justify-content: space-between;
11693
11727
  align-items: center;
@@ -11704,12 +11738,12 @@ var stylesFactory2 = (theme) => {
11704
11738
  flex-direction: column;
11705
11739
  }
11706
11740
  `,
11707
- logoAndToggleContainer: u`
11741
+ logoAndToggleContainer: css`
11708
11742
  display: flex;
11709
11743
  gap: ${tokens.size[3]};
11710
11744
  align-items: center;
11711
11745
  `,
11712
- logo: u`
11746
+ logo: css`
11713
11747
  cursor: pointer;
11714
11748
  display: flex;
11715
11749
  flex-direction: column;
@@ -11726,14 +11760,14 @@ var stylesFactory2 = (theme) => {
11726
11760
  outline: 2px solid ${colors.blue[800]};
11727
11761
  }
11728
11762
  `,
11729
- tanstackLogo: u`
11763
+ tanstackLogo: css`
11730
11764
  font-size: ${font.size.md};
11731
11765
  font-weight: ${font.weight.bold};
11732
11766
  line-height: ${font.lineHeight.xs};
11733
11767
  white-space: nowrap;
11734
11768
  color: ${t2(colors.gray[600], colors.gray[300])};
11735
11769
  `,
11736
- queryFlavorLogo: u`
11770
+ queryFlavorLogo: css`
11737
11771
  font-weight: ${font.weight.semibold};
11738
11772
  font-size: ${font.size.xs};
11739
11773
  background: linear-gradient(
@@ -11746,12 +11780,12 @@ var stylesFactory2 = (theme) => {
11746
11780
  -webkit-text-fill-color: transparent;
11747
11781
  white-space: nowrap;
11748
11782
  `,
11749
- queryStatusContainer: u`
11783
+ queryStatusContainer: css`
11750
11784
  display: flex;
11751
11785
  gap: ${tokens.size[2]};
11752
11786
  height: min-content;
11753
11787
  `,
11754
- queryStatusTag: u`
11788
+ queryStatusTag: css`
11755
11789
  display: flex;
11756
11790
  gap: ${tokens.size[1.5]};
11757
11791
  box-sizing: border-box;
@@ -11772,10 +11806,10 @@ var stylesFactory2 = (theme) => {
11772
11806
  outline: 2px solid ${colors.blue[800]};
11773
11807
  }
11774
11808
  `,
11775
- queryStatusTagLabel: u`
11809
+ queryStatusTagLabel: css`
11776
11810
  font-size: ${font.size.xs};
11777
11811
  `,
11778
- queryStatusCount: u`
11812
+ queryStatusCount: css`
11779
11813
  font-size: ${font.size.xs};
11780
11814
  padding: 0 5px;
11781
11815
  display: flex;
@@ -11787,7 +11821,7 @@ var stylesFactory2 = (theme) => {
11787
11821
  font-variant-numeric: tabular-nums;
11788
11822
  height: ${tokens.size[4.5]};
11789
11823
  `,
11790
- statusTooltip: u`
11824
+ statusTooltip: css`
11791
11825
  position: absolute;
11792
11826
  z-index: 1;
11793
11827
  background-color: ${t2(colors.gray[50], colors.darkGray[500])};
@@ -11827,7 +11861,7 @@ var stylesFactory2 = (theme) => {
11827
11861
  border-width: 7px;
11828
11862
  }
11829
11863
  `,
11830
- filtersContainer: u`
11864
+ filtersContainer: css`
11831
11865
  display: flex;
11832
11866
  gap: ${tokens.size[2]};
11833
11867
  & > button {
@@ -11856,7 +11890,7 @@ var stylesFactory2 = (theme) => {
11856
11890
  }
11857
11891
  }
11858
11892
  `,
11859
- filterInput: u`
11893
+ filterInput: css`
11860
11894
  padding: ${size2[0.5]} ${size2[2]};
11861
11895
  border-radius: ${tokens.border.radius.sm};
11862
11896
  background-color: ${t2(colors.gray[100], colors.darkGray[400])};
@@ -11895,7 +11929,7 @@ var stylesFactory2 = (theme) => {
11895
11929
  outline: 2px solid ${colors.blue[800]};
11896
11930
  }
11897
11931
  `,
11898
- filterSelect: u`
11932
+ filterSelect: css`
11899
11933
  padding: ${tokens.size[0.5]} ${tokens.size[2]};
11900
11934
  border-radius: ${tokens.border.radius.sm};
11901
11935
  background-color: ${t2(colors.gray[100], colors.darkGray[400])};
@@ -11929,11 +11963,11 @@ var stylesFactory2 = (theme) => {
11929
11963
  outline: 2px solid ${colors.blue[800]};
11930
11964
  }
11931
11965
  `,
11932
- actionsContainer: u`
11966
+ actionsContainer: css`
11933
11967
  display: flex;
11934
11968
  gap: ${tokens.size[2]};
11935
11969
  `,
11936
- actionsBtn: u`
11970
+ actionsBtn: css`
11937
11971
  border-radius: ${tokens.border.radius.sm};
11938
11972
  background-color: ${t2(colors.gray[100], colors.darkGray[400])};
11939
11973
  border: 1px solid ${t2(colors.gray[300], colors.darkGray[200])};
@@ -11960,13 +11994,13 @@ var stylesFactory2 = (theme) => {
11960
11994
  outline: 2px solid ${colors.blue[800]};
11961
11995
  }
11962
11996
  `,
11963
- actionsBtnOffline: u`
11997
+ actionsBtnOffline: css`
11964
11998
  & svg {
11965
11999
  stroke: ${t2(colors.yellow[700], colors.yellow[500])};
11966
12000
  fill: ${t2(colors.yellow[700], colors.yellow[500])};
11967
12001
  }
11968
12002
  `,
11969
- overflowQueryContainer: u`
12003
+ overflowQueryContainer: css`
11970
12004
  flex: 1;
11971
12005
  overflow-y: auto;
11972
12006
  & > div {
@@ -11974,7 +12008,7 @@ var stylesFactory2 = (theme) => {
11974
12008
  flex-direction: column;
11975
12009
  }
11976
12010
  `,
11977
- queryRow: u`
12011
+ queryRow: css`
11978
12012
  display: flex;
11979
12013
  align-items: center;
11980
12014
  padding: 0;
@@ -12036,10 +12070,10 @@ var stylesFactory2 = (theme) => {
12036
12070
  font-size: ${font.size.xs};
12037
12071
  }
12038
12072
  `,
12039
- selectedQueryRow: u`
12073
+ selectedQueryRow: css`
12040
12074
  background-color: ${t2(colors.gray[200], colors.darkGray[500])};
12041
12075
  `,
12042
- detailsContainer: u`
12076
+ detailsContainer: css`
12043
12077
  flex: 1 1 700px;
12044
12078
  background-color: ${t2(colors.gray[50], colors.darkGray[700])};
12045
12079
  color: ${t2(colors.gray[700], colors.gray[300])};
@@ -12050,7 +12084,7 @@ var stylesFactory2 = (theme) => {
12050
12084
  display: flex;
12051
12085
  text-align: left;
12052
12086
  `,
12053
- detailsHeader: u`
12087
+ detailsHeader: css`
12054
12088
  font-family: ui-sans-serif, Inter, system-ui, sans-serif, sans-serif;
12055
12089
  position: sticky;
12056
12090
  top: 0;
@@ -12062,7 +12096,7 @@ var stylesFactory2 = (theme) => {
12062
12096
  line-height: ${font.lineHeight.xs};
12063
12097
  text-align: left;
12064
12098
  `,
12065
- detailsBody: u`
12099
+ detailsBody: css`
12066
12100
  margin: ${tokens.size[1.5]} 0px ${tokens.size[2]} 0px;
12067
12101
  & > div {
12068
12102
  display: flex;
@@ -12096,13 +12130,13 @@ var stylesFactory2 = (theme) => {
12096
12130
  align-items: center;
12097
12131
  }
12098
12132
  `,
12099
- queryDetailsStatus: u`
12133
+ queryDetailsStatus: css`
12100
12134
  border: 1px solid ${colors.darkGray[200]};
12101
12135
  border-radius: ${tokens.border.radius.sm};
12102
12136
  font-weight: ${font.weight.medium};
12103
12137
  padding: ${tokens.size[1]} ${tokens.size[2.5]};
12104
12138
  `,
12105
- actionsBody: u`
12139
+ actionsBody: css`
12106
12140
  flex-wrap: wrap;
12107
12141
  margin: ${tokens.size[2]} 0px ${tokens.size[2]} 0px;
12108
12142
  display: flex;
@@ -12142,7 +12176,7 @@ var stylesFactory2 = (theme) => {
12142
12176
  }
12143
12177
  }
12144
12178
  `,
12145
- actionsSelect: u`
12179
+ actionsSelect: css`
12146
12180
  font-size: ${font.size.xs};
12147
12181
  padding: ${tokens.size[0.5]} ${tokens.size[2]};
12148
12182
  display: flex;
@@ -12191,7 +12225,7 @@ var stylesFactory2 = (theme) => {
12191
12225
  height: ${tokens.size[2]};
12192
12226
  }
12193
12227
  `,
12194
- settingsMenu: u`
12228
+ settingsMenu: css`
12195
12229
  display: flex;
12196
12230
  & * {
12197
12231
  font-family: ui-sans-serif, Inter, system-ui, sans-serif, sans-serif;
@@ -12207,7 +12241,7 @@ var stylesFactory2 = (theme) => {
12207
12241
  min-width: 120px;
12208
12242
  padding: ${size2[0.5]};
12209
12243
  `,
12210
- settingsSubTrigger: u`
12244
+ settingsSubTrigger: css`
12211
12245
  display: flex;
12212
12246
  align-items: center;
12213
12247
  justify-content: space-between;
@@ -12235,14 +12269,14 @@ var stylesFactory2 = (theme) => {
12235
12269
  cursor: not-allowed;
12236
12270
  }
12237
12271
  `,
12238
- settingsMenuHeader: u`
12272
+ settingsMenuHeader: css`
12239
12273
  padding: ${tokens.size[1]} ${tokens.size[1]};
12240
12274
  font-weight: ${font.weight.medium};
12241
12275
  border-bottom: 1px solid ${t2(colors.gray[300], colors.darkGray[400])};
12242
12276
  color: ${t2(colors.gray[500], colors.gray[400])};
12243
12277
  font-size: ${font.size["xs"]};
12244
12278
  `,
12245
- settingsSubButton: u`
12279
+ settingsSubButton: css`
12246
12280
  display: flex;
12247
12281
  align-items: center;
12248
12282
  justify-content: space-between;
@@ -12264,7 +12298,7 @@ var stylesFactory2 = (theme) => {
12264
12298
  outline: 2px solid ${colors.blue[800]};
12265
12299
  }
12266
12300
  `,
12267
- themeSelectedButton: u`
12301
+ themeSelectedButton: css`
12268
12302
  background-color: ${t2(colors.purple[100], colors.purple[900])};
12269
12303
  color: ${t2(colors.purple[700], colors.purple[300])};
12270
12304
  & svg {
@@ -12274,7 +12308,7 @@ var stylesFactory2 = (theme) => {
12274
12308
  background-color: ${t2(colors.purple[100], colors.purple[900])};
12275
12309
  }
12276
12310
  `,
12277
- viewToggle: u`
12311
+ viewToggle: css`
12278
12312
  border-radius: ${tokens.border.radius.sm};
12279
12313
  background-color: ${t2(colors.gray[200], colors.darkGray[600])};
12280
12314
  border: 1px solid ${t2(colors.gray[300], colors.darkGray[200])};
@@ -12326,8 +12360,8 @@ var stylesFactory2 = (theme) => {
12326
12360
  `
12327
12361
  };
12328
12362
  };
12329
- var lightStyles2 = stylesFactory2("light");
12330
- var darkStyles2 = stylesFactory2("dark");
12363
+ var lightStyles2 = (css) => stylesFactory2("light", css);
12364
+ var darkStyles2 = (css) => stylesFactory2("dark", css);
12331
12365
  delegateEvents(["click", "mousedown", "input"]);
12332
12366
  /*! Bundled license information:
12333
12367