@tanstack/query-devtools 5.23.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.
package/build/index.cjs CHANGED
@@ -1391,6 +1391,13 @@ function delegateEvents(eventNames, document2 = window.document) {
1391
1391
  }
1392
1392
  }
1393
1393
  }
1394
+ function clearDelegatedEvents(document2 = window.document) {
1395
+ if (document2[$$EVENTS]) {
1396
+ for (let name of document2[$$EVENTS].keys())
1397
+ document2.removeEventListener(name, eventHandler);
1398
+ delete document2[$$EVENTS];
1399
+ }
1400
+ }
1394
1401
  function setAttribute(node, name, value) {
1395
1402
  if (sharedConfig.context)
1396
1403
  return;
@@ -3215,10 +3222,10 @@ var init_utils = __esm({
3215
3222
  }
3216
3223
  return oldData;
3217
3224
  };
3218
- setupStyleSheet = (nonce) => {
3225
+ setupStyleSheet = (nonce, target) => {
3219
3226
  if (!nonce)
3220
3227
  return;
3221
- const styleExists = document.querySelector("#_goober");
3228
+ const styleExists = document.querySelector("#_goober") || target?.querySelector("#_goober");
3222
3229
  if (styleExists)
3223
3230
  return;
3224
3231
  const styleTag = document.createElement("style");
@@ -3226,7 +3233,11 @@ var init_utils = __esm({
3226
3233
  styleTag.appendChild(textNode);
3227
3234
  styleTag.id = "_goober";
3228
3235
  styleTag.setAttribute("nonce", nonce);
3229
- document.head.appendChild(styleTag);
3236
+ if (target) {
3237
+ target.appendChild(styleTag);
3238
+ } else {
3239
+ document.head.appendChild(styleTag);
3240
+ }
3230
3241
  };
3231
3242
  }
3232
3243
  });
@@ -12201,7 +12212,8 @@ var init_Context = __esm({
12201
12212
  client: void 0,
12202
12213
  onlineManager: void 0,
12203
12214
  queryFlavor: "",
12204
- version: ""
12215
+ version: "",
12216
+ shadowDOMTarget: void 0
12205
12217
  });
12206
12218
  ThemeContext = createContext(
12207
12219
  () => "dark"
@@ -12968,13 +12980,17 @@ var init_Devtools = __esm({
12968
12980
  if (pipWindow() != null) {
12969
12981
  return;
12970
12982
  }
12971
- const pip = window.open("", "", `width=${width},height=${height},popup`);
12983
+ const pip = window.open("", "TSQD-Devtools-Panel", `width=${width},height=${height},popup`);
12972
12984
  if (!pip) {
12973
12985
  throw new Error("Failed to open popup. Please allow popups for this site to view the devtools in picture-in-picture mode.");
12974
12986
  }
12987
+ pip.document.head.innerHTML = "";
12988
+ pip.document.body.innerHTML = "";
12989
+ clearDelegatedEvents(pip.document);
12975
12990
  pip.document.title = "TanStack Query Devtools";
12976
12991
  pip.document.body.style.margin = "0";
12977
12992
  pip.addEventListener("pagehide", () => {
12993
+ props.setLocalStore("pip_open", "false");
12978
12994
  setPipWindow(null);
12979
12995
  });
12980
12996
  [...document.styleSheets].forEach((styleSheet) => {
@@ -13004,23 +13020,21 @@ var init_Devtools = __esm({
13004
13020
  }
13005
13021
  });
13006
13022
  delegateEvents(["focusin", "focusout", "pointermove", "keydown", "pointerdown", "pointerup", "click", "mousedown", "input"], pip.document);
13023
+ props.setLocalStore("pip_open", "true");
13007
13024
  setPipWindow(pip);
13008
13025
  };
13009
13026
  createEffect(() => {
13010
- const closePipWindowOnUnload = () => {
13011
- closePipWindow();
13012
- };
13013
- window.addEventListener("beforeunload", closePipWindowOnUnload);
13014
- onCleanup(() => {
13015
- window.removeEventListener("beforeunload", closePipWindowOnUnload);
13016
- });
13027
+ const pip_open = props.localStore.pip_open ?? "false";
13028
+ if (pip_open === "true") {
13029
+ requestPipWindow(Number(window.innerWidth), Number(props.localStore.height || DEFAULT_HEIGHT));
13030
+ }
13017
13031
  });
13018
13032
  createEffect(() => {
13019
- const gooberStyles = document.getElementById("_goober");
13033
+ const gooberStyles = (useQueryDevtoolsContext().shadowDOMTarget || document).querySelector("#_goober");
13020
13034
  const w = pipWindow();
13021
13035
  if (gooberStyles && w) {
13022
13036
  const observer = new MutationObserver(() => {
13023
- const pip_style = w.document.getElementById("_goober");
13037
+ const pip_style = (useQueryDevtoolsContext().shadowDOMTarget || w.document).querySelector("#_goober");
13024
13038
  if (pip_style) {
13025
13039
  pip_style.textContent = gooberStyles.textContent;
13026
13040
  }
@@ -13075,6 +13089,8 @@ var init_Devtools = __esm({
13075
13089
  value: props,
13076
13090
  get children() {
13077
13091
  return createComponent(PiPProvider, {
13092
+ localStore,
13093
+ setLocalStore,
13078
13094
  get children() {
13079
13095
  return createComponent(ThemeContext.Provider, {
13080
13096
  value: theme,
@@ -13093,8 +13109,11 @@ var init_Devtools = __esm({
13093
13109
  Devtools_default = DevtoolsComponent;
13094
13110
  Devtools = (props) => {
13095
13111
  const theme = useTheme();
13112
+ const css = useQueryDevtoolsContext().shadowDOMTarget ? u.bind({
13113
+ target: useQueryDevtoolsContext().shadowDOMTarget
13114
+ }) : u;
13096
13115
  const styles = createMemo(() => {
13097
- return theme() === "dark" ? darkStyles2 : lightStyles2;
13116
+ return theme() === "dark" ? darkStyles2(css) : lightStyles2(css);
13098
13117
  });
13099
13118
  const pip = usePiPWindow();
13100
13119
  const buttonPosition = createMemo(() => {
@@ -13127,9 +13146,10 @@ var init_Devtools = __esm({
13127
13146
  window.removeEventListener("focus", onFocus);
13128
13147
  });
13129
13148
  });
13149
+ const pip_open = createMemo(() => props.localStore.pip_open ?? "false");
13130
13150
  return [createComponent(Show, {
13131
13151
  get when() {
13132
- return pip().pipWindow;
13152
+ return createMemo(() => !!pip().pipWindow)() && pip_open() == "true";
13133
13153
  },
13134
13154
  get children() {
13135
13155
  return createComponent(Portal, {
@@ -13161,7 +13181,7 @@ var init_Devtools = __esm({
13161
13181
  get children() {
13162
13182
  return createComponent(Show, {
13163
13183
  get when() {
13164
- return createMemo(() => !!isOpen())() && !pip().pipWindow;
13184
+ return createMemo(() => !!(isOpen() && !pip().pipWindow))() && pip_open() == "false";
13165
13185
  },
13166
13186
  get children() {
13167
13187
  return createComponent(DevtoolsPanel, {
@@ -13194,7 +13214,7 @@ var init_Devtools = __esm({
13194
13214
  });
13195
13215
  }
13196
13216
  }), null);
13197
- createRenderEffect(() => className(_el$, clsx(u`
13217
+ createRenderEffect(() => className(_el$, clsx(css`
13198
13218
  & .tsqd-panel-transition-exit-active,
13199
13219
  & .tsqd-panel-transition-enter-active {
13200
13220
  transition:
@@ -13227,8 +13247,11 @@ var init_Devtools = __esm({
13227
13247
  PiPPanel = (props) => {
13228
13248
  const pip = usePiPWindow();
13229
13249
  const theme = useTheme();
13250
+ const css = useQueryDevtoolsContext().shadowDOMTarget ? u.bind({
13251
+ target: useQueryDevtoolsContext().shadowDOMTarget
13252
+ }) : u;
13230
13253
  const styles = createMemo(() => {
13231
- return theme() === "dark" ? darkStyles2 : lightStyles2;
13254
+ return theme() === "dark" ? darkStyles2(css) : lightStyles2(css);
13232
13255
  });
13233
13256
  const getPanelDynamicStyles = () => {
13234
13257
  const {
@@ -13236,12 +13259,12 @@ var init_Devtools = __esm({
13236
13259
  } = tokens;
13237
13260
  const t2 = (light, dark) => theme() === "dark" ? dark : light;
13238
13261
  if (panelWidth() < secondBreakpoint) {
13239
- return u`
13262
+ return css`
13240
13263
  flex-direction: column;
13241
13264
  background-color: ${t2(colors.gray[300], colors.gray[600])};
13242
13265
  `;
13243
13266
  }
13244
- return u`
13267
+ return css`
13245
13268
  flex-direction: row;
13246
13269
  background-color: ${t2(colors.gray[200], colors.darkGray[900])};
13247
13270
  `;
@@ -13255,6 +13278,7 @@ var init_Devtools = __esm({
13255
13278
  };
13256
13279
  if (win) {
13257
13280
  win.addEventListener("resize", resizeCB);
13281
+ resizeCB();
13258
13282
  }
13259
13283
  onCleanup(() => {
13260
13284
  if (win) {
@@ -13270,7 +13294,7 @@ var init_Devtools = __esm({
13270
13294
  _el$5.style.setProperty("width", "100vw");
13271
13295
  insert(_el$5, () => props.children);
13272
13296
  createRenderEffect(() => className(_el$5, clsx(styles().panel, getPanelDynamicStyles(), {
13273
- [u`
13297
+ [css`
13274
13298
  min-width: min-content;
13275
13299
  `]: panelWidth() < thirdBreakpoint
13276
13300
  }, "tsqd-main-panel")));
@@ -13279,8 +13303,11 @@ var init_Devtools = __esm({
13279
13303
  };
13280
13304
  DevtoolsPanel = (props) => {
13281
13305
  const theme = useTheme();
13306
+ const css = useQueryDevtoolsContext().shadowDOMTarget ? u.bind({
13307
+ target: useQueryDevtoolsContext().shadowDOMTarget
13308
+ }) : u;
13282
13309
  const styles = createMemo(() => {
13283
- return theme() === "dark" ? darkStyles2 : lightStyles2;
13310
+ return theme() === "dark" ? darkStyles2(css) : lightStyles2(css);
13284
13311
  });
13285
13312
  const [isResizing, setIsResizing] = createSignal(false);
13286
13313
  const position = createMemo(() => props.localStore.position || useQueryDevtoolsContext().position || POSITION);
@@ -13374,12 +13401,12 @@ var init_Devtools = __esm({
13374
13401
  } = tokens;
13375
13402
  const t2 = (light, dark) => theme() === "dark" ? dark : light;
13376
13403
  if (panelWidth() < secondBreakpoint) {
13377
- return u`
13404
+ return css`
13378
13405
  flex-direction: column;
13379
13406
  background-color: ${t2(colors.gray[300], colors.gray[600])};
13380
13407
  `;
13381
13408
  }
13382
- return u`
13409
+ return css`
13383
13410
  flex-direction: row;
13384
13411
  background-color: ${t2(colors.gray[200], colors.darkGray[900])};
13385
13412
  `;
@@ -13401,7 +13428,7 @@ var init_Devtools = __esm({
13401
13428
  }), null);
13402
13429
  createRenderEffect((_p$) => {
13403
13430
  const _v$ = clsx(styles().panel, styles()[`panel-position-${position()}`], getPanelDynamicStyles(), {
13404
- [u`
13431
+ [css`
13405
13432
  min-width: min-content;
13406
13433
  `]: panelWidth() < thirdBreakpoint && (position() === "right" || position() === "left")
13407
13434
  }, "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");
@@ -13426,8 +13453,11 @@ var init_Devtools = __esm({
13426
13453
  setupMutationCacheSubscription();
13427
13454
  let containerRef;
13428
13455
  const theme = useTheme();
13456
+ const css = useQueryDevtoolsContext().shadowDOMTarget ? u.bind({
13457
+ target: useQueryDevtoolsContext().shadowDOMTarget
13458
+ }) : u;
13429
13459
  const styles = createMemo(() => {
13430
- return theme() === "dark" ? darkStyles2 : lightStyles2;
13460
+ return theme() === "dark" ? darkStyles2(css) : lightStyles2(css);
13431
13461
  });
13432
13462
  const pip = usePiPWindow();
13433
13463
  const [selectedView, setSelectedView] = createSignal("queries");
@@ -13858,10 +13888,10 @@ var init_Devtools = __esm({
13858
13888
  }
13859
13889
  }), null);
13860
13890
  createRenderEffect((_p$) => {
13861
- const _v$6 = clsx(styles().queriesContainer, panelWidth() < secondBreakpoint && (selectedQueryHash() || selectedMutationId()) && u`
13891
+ const _v$6 = clsx(styles().queriesContainer, panelWidth() < secondBreakpoint && (selectedQueryHash() || selectedMutationId()) && css`
13862
13892
  height: 50%;
13863
13893
  max-height: 50%;
13864
- `, panelWidth() < secondBreakpoint && !(selectedQueryHash() || selectedMutationId()) && u`
13894
+ `, panelWidth() < secondBreakpoint && !(selectedQueryHash() || selectedMutationId()) && css`
13865
13895
  height: 100%;
13866
13896
  max-height: 100%;
13867
13897
  `, "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"}`;
@@ -13928,8 +13958,11 @@ var init_Devtools = __esm({
13928
13958
  };
13929
13959
  QueryRow = (props) => {
13930
13960
  const theme = useTheme();
13961
+ const css = useQueryDevtoolsContext().shadowDOMTarget ? u.bind({
13962
+ target: useQueryDevtoolsContext().shadowDOMTarget
13963
+ }) : u;
13931
13964
  const styles = createMemo(() => {
13932
- return theme() === "dark" ? darkStyles2 : lightStyles2;
13965
+ return theme() === "dark" ? darkStyles2(css) : lightStyles2(css);
13933
13966
  });
13934
13967
  const {
13935
13968
  colors,
@@ -13955,12 +13988,12 @@ var init_Devtools = __esm({
13955
13988
  }));
13956
13989
  const getObserverCountColorStyles = () => {
13957
13990
  if (color() === "gray") {
13958
- return u`
13991
+ return css`
13959
13992
  background-color: ${t2(colors[color()][200], colors[color()][700])};
13960
13993
  color: ${t2(colors[color()][700], colors[color()][300])};
13961
13994
  `;
13962
13995
  }
13963
- return u`
13996
+ return css`
13964
13997
  background-color: ${t2(colors[color()][200] + alpha[80], colors[color()][900])};
13965
13998
  color: ${t2(colors[color()][800], colors[color()][300])};
13966
13999
  `;
@@ -13999,8 +14032,11 @@ var init_Devtools = __esm({
13999
14032
  };
14000
14033
  MutationRow = (props) => {
14001
14034
  const theme = useTheme();
14035
+ const css = useQueryDevtoolsContext().shadowDOMTarget ? u.bind({
14036
+ target: useQueryDevtoolsContext().shadowDOMTarget
14037
+ }) : u;
14002
14038
  const styles = createMemo(() => {
14003
- return theme() === "dark" ? darkStyles2 : lightStyles2;
14039
+ return theme() === "dark" ? darkStyles2(css) : lightStyles2(css);
14004
14040
  });
14005
14041
  const {
14006
14042
  colors,
@@ -14032,12 +14068,12 @@ var init_Devtools = __esm({
14032
14068
  }));
14033
14069
  const getObserverCountColorStyles = () => {
14034
14070
  if (color() === "gray") {
14035
- return u`
14071
+ return css`
14036
14072
  background-color: ${t2(colors[color()][200], colors[color()][700])};
14037
14073
  color: ${t2(colors[color()][700], colors[color()][300])};
14038
14074
  `;
14039
14075
  }
14040
- return u`
14076
+ return css`
14041
14077
  background-color: ${t2(colors[color()][200] + alpha[80], colors[color()][900])};
14042
14078
  color: ${t2(colors[color()][800], colors[color()][300])};
14043
14079
  `;
@@ -14114,8 +14150,11 @@ var init_Devtools = __esm({
14114
14150
  const paused = createSubscribeToQueryCacheBatcher((queryCache) => queryCache().getAll().filter((q) => getQueryStatusLabel(q) === "paused").length);
14115
14151
  const inactive = createSubscribeToQueryCacheBatcher((queryCache) => queryCache().getAll().filter((q) => getQueryStatusLabel(q) === "inactive").length);
14116
14152
  const theme = useTheme();
14153
+ const css = useQueryDevtoolsContext().shadowDOMTarget ? u.bind({
14154
+ target: useQueryDevtoolsContext().shadowDOMTarget
14155
+ }) : u;
14117
14156
  const styles = createMemo(() => {
14118
- return theme() === "dark" ? darkStyles2 : lightStyles2;
14157
+ return theme() === "dark" ? darkStyles2(css) : lightStyles2(css);
14119
14158
  });
14120
14159
  return (() => {
14121
14160
  const _el$55 = _tmpl$26();
@@ -14176,8 +14215,11 @@ var init_Devtools = __esm({
14176
14215
  status: m.state.status
14177
14216
  }) === "red").length);
14178
14217
  const theme = useTheme();
14218
+ const css = useQueryDevtoolsContext().shadowDOMTarget ? u.bind({
14219
+ target: useQueryDevtoolsContext().shadowDOMTarget
14220
+ }) : u;
14179
14221
  const styles = createMemo(() => {
14180
- return theme() === "dark" ? darkStyles2 : lightStyles2;
14222
+ return theme() === "dark" ? darkStyles2(css) : lightStyles2(css);
14181
14223
  });
14182
14224
  return (() => {
14183
14225
  const _el$56 = _tmpl$26();
@@ -14215,8 +14257,11 @@ var init_Devtools = __esm({
14215
14257
  };
14216
14258
  QueryStatus = (props) => {
14217
14259
  const theme = useTheme();
14260
+ const css = useQueryDevtoolsContext().shadowDOMTarget ? u.bind({
14261
+ target: useQueryDevtoolsContext().shadowDOMTarget
14262
+ }) : u;
14218
14263
  const styles = createMemo(() => {
14219
- return theme() === "dark" ? darkStyles2 : lightStyles2;
14264
+ return theme() === "dark" ? darkStyles2(css) : lightStyles2(css);
14220
14265
  });
14221
14266
  const {
14222
14267
  colors,
@@ -14253,7 +14298,7 @@ var init_Devtools = __esm({
14253
14298
  return showLabel();
14254
14299
  },
14255
14300
  get ["class"]() {
14256
- return clsx(styles().queryStatusTag, !showLabel() && u`
14301
+ return clsx(styles().queryStatusTag, !showLabel() && css`
14257
14302
  cursor: pointer;
14258
14303
  &:hover {
14259
14304
  background: ${t2(colors.gray[200], colors.darkGray[400])}${alpha[80]};
@@ -14287,12 +14332,12 @@ var init_Devtools = __esm({
14287
14332
  }), _el$61);
14288
14333
  insert(_el$61, () => props.count);
14289
14334
  createRenderEffect((_p$) => {
14290
- const _v$32 = clsx(u`
14335
+ const _v$32 = clsx(css`
14291
14336
  width: ${tokens.size[1.5]};
14292
14337
  height: ${tokens.size[1.5]};
14293
14338
  border-radius: ${tokens.border.radius.full};
14294
14339
  background-color: ${tokens.colors[props.color][500]};
14295
- `, "tsqd-query-status-tag-dot"), _v$33 = clsx(styles().queryStatusCount, props.count > 0 && props.color !== "gray" && u`
14340
+ `, "tsqd-query-status-tag-dot"), _v$33 = clsx(styles().queryStatusCount, props.count > 0 && props.color !== "gray" && css`
14296
14341
  background-color: ${t2(colors[props.color][100], colors[props.color][900])};
14297
14342
  color: ${t2(colors[props.color][700], colors[props.color][300])};
14298
14343
  `, "tsqd-query-status-tag-count");
@@ -14308,8 +14353,11 @@ var init_Devtools = __esm({
14308
14353
  };
14309
14354
  QueryDetails = () => {
14310
14355
  const theme = useTheme();
14356
+ const css = useQueryDevtoolsContext().shadowDOMTarget ? u.bind({
14357
+ target: useQueryDevtoolsContext().shadowDOMTarget
14358
+ }) : u;
14311
14359
  const styles = createMemo(() => {
14312
- return theme() === "dark" ? darkStyles2 : lightStyles2;
14360
+ return theme() === "dark" ? darkStyles2(css) : lightStyles2(css);
14313
14361
  });
14314
14362
  const {
14315
14363
  colors
@@ -14372,13 +14420,13 @@ var init_Devtools = __esm({
14372
14420
  });
14373
14421
  const getQueryStatusColors = () => {
14374
14422
  if (color() === "gray") {
14375
- return u`
14423
+ return css`
14376
14424
  background-color: ${t2(colors[color()][200], colors[color()][700])};
14377
14425
  color: ${t2(colors[color()][700], colors[color()][300])};
14378
14426
  border-color: ${t2(colors[color()][400], colors[color()][600])};
14379
14427
  `;
14380
14428
  }
14381
- return u`
14429
+ return css`
14382
14430
  background-color: ${t2(colors[color()][100], colors[color()][900])};
14383
14431
  color: ${t2(colors[color()][700], colors[color()][300])};
14384
14432
  border-color: ${t2(colors[color()][400], colors[color()][600])};
@@ -14444,9 +14492,9 @@ var init_Devtools = __esm({
14444
14492
  };
14445
14493
  insert(_el$88, () => queryStatus() === "error" ? "Restore" : "Trigger", _el$90);
14446
14494
  createRenderEffect((_p$) => {
14447
- const _v$34 = clsx(u`
14495
+ const _v$34 = clsx(css`
14448
14496
  color: ${t2(colors.red[500], colors.red[400])};
14449
- `, "tsqd-query-details-actions-btn", "tsqd-query-details-action-error"), _v$35 = queryStatus() === "pending", _v$36 = u`
14497
+ `, "tsqd-query-details-actions-btn", "tsqd-query-details-action-error"), _v$35 = queryStatus() === "pending", _v$36 = css`
14450
14498
  background-color: ${t2(colors.red[500], colors.red[400])};
14451
14499
  `;
14452
14500
  _v$34 !== _p$._v$34 && className(_el$88, _p$._v$34 = _v$34);
@@ -14484,7 +14532,7 @@ var init_Devtools = __esm({
14484
14532
  }), null);
14485
14533
  insert(_el$91, createComponent(ChevronDown, {}), null);
14486
14534
  createRenderEffect((_p$) => {
14487
- const _v$37 = clsx(styles().actionsSelect, "tsqd-query-details-actions-btn", "tsqd-query-details-action-error-multiple"), _v$38 = u`
14535
+ const _v$37 = clsx(styles().actionsSelect, "tsqd-query-details-actions-btn", "tsqd-query-details-action-error-multiple"), _v$38 = css`
14488
14536
  background-color: ${tokens.colors.red[400]};
14489
14537
  `, _v$39 = queryStatus() === "pending";
14490
14538
  _v$37 !== _p$._v$37 && className(_el$91, _p$._v$37 = _v$37);
@@ -14518,25 +14566,25 @@ var init_Devtools = __esm({
14518
14566
  }
14519
14567
  }));
14520
14568
  createRenderEffect((_p$) => {
14521
- 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`
14569
+ 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`
14522
14570
  color: ${t2(colors.blue[600], colors.blue[400])};
14523
- `, "tsqd-query-details-actions-btn", "tsqd-query-details-action-refetch"), _v$47 = statusLabel() === "fetching", _v$48 = u`
14571
+ `, "tsqd-query-details-actions-btn", "tsqd-query-details-action-refetch"), _v$47 = statusLabel() === "fetching", _v$48 = css`
14524
14572
  background-color: ${t2(colors.blue[600], colors.blue[400])};
14525
- `, _v$49 = clsx(u`
14573
+ `, _v$49 = clsx(css`
14526
14574
  color: ${t2(colors.yellow[600], colors.yellow[400])};
14527
- `, "tsqd-query-details-actions-btn", "tsqd-query-details-action-invalidate"), _v$50 = queryStatus() === "pending", _v$51 = u`
14575
+ `, "tsqd-query-details-actions-btn", "tsqd-query-details-action-invalidate"), _v$50 = queryStatus() === "pending", _v$51 = css`
14528
14576
  background-color: ${t2(colors.yellow[600], colors.yellow[400])};
14529
- `, _v$52 = clsx(u`
14577
+ `, _v$52 = clsx(css`
14530
14578
  color: ${t2(colors.gray[600], colors.gray[300])};
14531
- `, "tsqd-query-details-actions-btn", "tsqd-query-details-action-reset"), _v$53 = queryStatus() === "pending", _v$54 = u`
14579
+ `, "tsqd-query-details-actions-btn", "tsqd-query-details-action-reset"), _v$53 = queryStatus() === "pending", _v$54 = css`
14532
14580
  background-color: ${t2(colors.gray[600], colors.gray[400])};
14533
- `, _v$55 = clsx(u`
14581
+ `, _v$55 = clsx(css`
14534
14582
  color: ${t2(colors.pink[500], colors.pink[400])};
14535
- `, "tsqd-query-details-actions-btn", "tsqd-query-details-action-remove"), _v$56 = statusLabel() === "fetching", _v$57 = u`
14583
+ `, "tsqd-query-details-actions-btn", "tsqd-query-details-action-remove"), _v$56 = statusLabel() === "fetching", _v$57 = css`
14536
14584
  background-color: ${t2(colors.pink[500], colors.pink[400])};
14537
- `, _v$58 = clsx(u`
14585
+ `, _v$58 = clsx(css`
14538
14586
  color: ${t2(colors.cyan[500], colors.cyan[400])};
14539
- `, "tsqd-query-details-actions-btn", "tsqd-query-details-action-loading"), _v$59 = restoringLoading(), _v$60 = u`
14587
+ `, "tsqd-query-details-actions-btn", "tsqd-query-details-action-loading"), _v$59 = restoringLoading(), _v$60 = css`
14540
14588
  background-color: ${t2(colors.cyan[500], colors.cyan[400])};
14541
14589
  `, _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];
14542
14590
  _v$40 !== _p$._v$40 && className(_el$62, _p$._v$40 = _v$40);
@@ -14598,8 +14646,11 @@ var init_Devtools = __esm({
14598
14646
  };
14599
14647
  MutationDetails = () => {
14600
14648
  const theme = useTheme();
14649
+ const css = useQueryDevtoolsContext().shadowDOMTarget ? u.bind({
14650
+ target: useQueryDevtoolsContext().shadowDOMTarget
14651
+ }) : u;
14601
14652
  const styles = createMemo(() => {
14602
- return theme() === "dark" ? darkStyles2 : lightStyles2;
14653
+ return theme() === "dark" ? darkStyles2(css) : lightStyles2(css);
14603
14654
  });
14604
14655
  const {
14605
14656
  colors
@@ -14626,13 +14677,13 @@ var init_Devtools = __esm({
14626
14677
  const activeMutation = createSubscribeToMutationCacheBatcher((mutationCache) => mutationCache().getAll().find((mutation) => mutation.mutationId === selectedMutationId()), false);
14627
14678
  const getQueryStatusColors = () => {
14628
14679
  if (color() === "gray") {
14629
- return u`
14680
+ return css`
14630
14681
  background-color: ${t2(colors[color()][200], colors[color()][700])};
14631
14682
  color: ${t2(colors[color()][700], colors[color()][300])};
14632
14683
  border-color: ${t2(colors[color()][400], colors[color()][600])};
14633
14684
  `;
14634
14685
  }
14635
- return u`
14686
+ return css`
14636
14687
  background-color: ${t2(colors[color()][100], colors[color()][900])};
14637
14688
  color: ${t2(colors[color()][700], colors[color()][300])};
14638
14689
  border-color: ${t2(colors[color()][400], colors[color()][600])};
@@ -14806,7 +14857,7 @@ var init_Devtools = __esm({
14806
14857
  });
14807
14858
  return value;
14808
14859
  };
14809
- stylesFactory2 = (theme) => {
14860
+ stylesFactory2 = (theme, css) => {
14810
14861
  const {
14811
14862
  colors,
14812
14863
  font,
@@ -14817,7 +14868,7 @@ var init_Devtools = __esm({
14817
14868
  } = tokens;
14818
14869
  const t2 = (light, dark) => theme === "light" ? light : dark;
14819
14870
  return {
14820
- devtoolsBtn: u`
14871
+ devtoolsBtn: css`
14821
14872
  z-index: 100000;
14822
14873
  position: fixed;
14823
14874
  padding: 4px;
@@ -14871,7 +14922,7 @@ var init_Devtools = __esm({
14871
14922
  }
14872
14923
  }
14873
14924
  `,
14874
- panel: u`
14925
+ panel: css`
14875
14926
  position: fixed;
14876
14927
  z-index: 9999;
14877
14928
  display: flex;
@@ -14897,26 +14948,26 @@ var init_Devtools = __esm({
14897
14948
  background: ${t2(colors.gray[400], colors.darkGray[300])};
14898
14949
  }
14899
14950
  `,
14900
- "devtoolsBtn-position-bottom-right": u`
14951
+ "devtoolsBtn-position-bottom-right": css`
14901
14952
  bottom: 12px;
14902
14953
  right: 12px;
14903
14954
  `,
14904
- "devtoolsBtn-position-bottom-left": u`
14955
+ "devtoolsBtn-position-bottom-left": css`
14905
14956
  bottom: 12px;
14906
14957
  left: 12px;
14907
14958
  `,
14908
- "devtoolsBtn-position-top-left": u`
14959
+ "devtoolsBtn-position-top-left": css`
14909
14960
  top: 12px;
14910
14961
  left: 12px;
14911
14962
  `,
14912
- "devtoolsBtn-position-top-right": u`
14963
+ "devtoolsBtn-position-top-right": css`
14913
14964
  top: 12px;
14914
14965
  right: 12px;
14915
14966
  `,
14916
- "devtoolsBtn-position-relative": u`
14967
+ "devtoolsBtn-position-relative": css`
14917
14968
  position: relative;
14918
14969
  `,
14919
- "panel-position-top": u`
14970
+ "panel-position-top": css`
14920
14971
  top: 0;
14921
14972
  right: 0;
14922
14973
  left: 0;
@@ -14924,7 +14975,7 @@ var init_Devtools = __esm({
14924
14975
  min-height: ${size2[14]};
14925
14976
  border-bottom: ${t2(colors.gray[400], colors.darkGray[300])} 1px solid;
14926
14977
  `,
14927
- "panel-position-bottom": u`
14978
+ "panel-position-bottom": css`
14928
14979
  bottom: 0;
14929
14980
  right: 0;
14930
14981
  left: 0;
@@ -14932,21 +14983,21 @@ var init_Devtools = __esm({
14932
14983
  min-height: ${size2[14]};
14933
14984
  border-top: ${t2(colors.gray[400], colors.darkGray[300])} 1px solid;
14934
14985
  `,
14935
- "panel-position-right": u`
14986
+ "panel-position-right": css`
14936
14987
  bottom: 0;
14937
14988
  right: 0;
14938
14989
  top: 0;
14939
14990
  border-left: ${t2(colors.gray[400], colors.darkGray[300])} 1px solid;
14940
14991
  max-width: 90%;
14941
14992
  `,
14942
- "panel-position-left": u`
14993
+ "panel-position-left": css`
14943
14994
  bottom: 0;
14944
14995
  left: 0;
14945
14996
  top: 0;
14946
14997
  border-right: ${t2(colors.gray[400], colors.darkGray[300])} 1px solid;
14947
14998
  max-width: 90%;
14948
14999
  `,
14949
- closeBtn: u`
15000
+ closeBtn: css`
14950
15001
  position: absolute;
14951
15002
  cursor: pointer;
14952
15003
  z-index: 5;
@@ -14967,7 +15018,7 @@ var init_Devtools = __esm({
14967
15018
  height: ${size2[2]};
14968
15019
  }
14969
15020
  `,
14970
- "closeBtn-position-top": u`
15021
+ "closeBtn-position-top": css`
14971
15022
  bottom: 0;
14972
15023
  right: ${size2[2]};
14973
15024
  transform: translate(0, 100%);
@@ -14991,7 +15042,7 @@ var init_Devtools = __esm({
14991
15042
  transform: rotate(180deg);
14992
15043
  }
14993
15044
  `,
14994
- "closeBtn-position-bottom": u`
15045
+ "closeBtn-position-bottom": css`
14995
15046
  top: 0;
14996
15047
  right: ${size2[2]};
14997
15048
  transform: translate(0, -100%);
@@ -15011,7 +15062,7 @@ var init_Devtools = __esm({
15011
15062
  width: calc(100% + ${size2[5]});
15012
15063
  }
15013
15064
  `,
15014
- "closeBtn-position-right": u`
15065
+ "closeBtn-position-right": css`
15015
15066
  bottom: ${size2[2]};
15016
15067
  left: 0;
15017
15068
  transform: translate(-100%, 0);
@@ -15034,7 +15085,7 @@ var init_Devtools = __esm({
15034
15085
  transform: rotate(-90deg);
15035
15086
  }
15036
15087
  `,
15037
- "closeBtn-position-left": u`
15088
+ "closeBtn-position-left": css`
15038
15089
  bottom: ${size2[2]};
15039
15090
  right: 0;
15040
15091
  transform: translate(100%, 0);
@@ -15057,7 +15108,7 @@ var init_Devtools = __esm({
15057
15108
  transform: rotate(90deg);
15058
15109
  }
15059
15110
  `,
15060
- queriesContainer: u`
15111
+ queriesContainer: css`
15061
15112
  flex: 1 1 700px;
15062
15113
  background-color: ${t2(colors.gray[50], colors.darkGray[700])};
15063
15114
  display: flex;
@@ -15066,7 +15117,7 @@ var init_Devtools = __esm({
15066
15117
  font-family: ui-sans-serif, Inter, system-ui, sans-serif, sans-serif;
15067
15118
  }
15068
15119
  `,
15069
- dragHandle: u`
15120
+ dragHandle: css`
15070
15121
  position: absolute;
15071
15122
  transition: background-color 0.125s ease;
15072
15123
  &:hover {
@@ -15074,31 +15125,31 @@ var init_Devtools = __esm({
15074
15125
  }
15075
15126
  z-index: 4;
15076
15127
  `,
15077
- "dragHandle-position-top": u`
15128
+ "dragHandle-position-top": css`
15078
15129
  bottom: 0;
15079
15130
  width: 100%;
15080
15131
  height: 3px;
15081
15132
  cursor: ns-resize;
15082
15133
  `,
15083
- "dragHandle-position-bottom": u`
15134
+ "dragHandle-position-bottom": css`
15084
15135
  top: 0;
15085
15136
  width: 100%;
15086
15137
  height: 3px;
15087
15138
  cursor: ns-resize;
15088
15139
  `,
15089
- "dragHandle-position-right": u`
15140
+ "dragHandle-position-right": css`
15090
15141
  left: 0;
15091
15142
  width: 3px;
15092
15143
  height: 100%;
15093
15144
  cursor: ew-resize;
15094
15145
  `,
15095
- "dragHandle-position-left": u`
15146
+ "dragHandle-position-left": css`
15096
15147
  right: 0;
15097
15148
  width: 3px;
15098
15149
  height: 100%;
15099
15150
  cursor: ew-resize;
15100
15151
  `,
15101
- row: u`
15152
+ row: css`
15102
15153
  display: flex;
15103
15154
  justify-content: space-between;
15104
15155
  align-items: center;
@@ -15115,12 +15166,12 @@ var init_Devtools = __esm({
15115
15166
  flex-direction: column;
15116
15167
  }
15117
15168
  `,
15118
- logoAndToggleContainer: u`
15169
+ logoAndToggleContainer: css`
15119
15170
  display: flex;
15120
15171
  gap: ${tokens.size[3]};
15121
15172
  align-items: center;
15122
15173
  `,
15123
- logo: u`
15174
+ logo: css`
15124
15175
  cursor: pointer;
15125
15176
  display: flex;
15126
15177
  flex-direction: column;
@@ -15137,14 +15188,14 @@ var init_Devtools = __esm({
15137
15188
  outline: 2px solid ${colors.blue[800]};
15138
15189
  }
15139
15190
  `,
15140
- tanstackLogo: u`
15191
+ tanstackLogo: css`
15141
15192
  font-size: ${font.size.md};
15142
15193
  font-weight: ${font.weight.bold};
15143
15194
  line-height: ${font.lineHeight.xs};
15144
15195
  white-space: nowrap;
15145
15196
  color: ${t2(colors.gray[600], colors.gray[300])};
15146
15197
  `,
15147
- queryFlavorLogo: u`
15198
+ queryFlavorLogo: css`
15148
15199
  font-weight: ${font.weight.semibold};
15149
15200
  font-size: ${font.size.xs};
15150
15201
  background: linear-gradient(
@@ -15157,12 +15208,12 @@ var init_Devtools = __esm({
15157
15208
  -webkit-text-fill-color: transparent;
15158
15209
  white-space: nowrap;
15159
15210
  `,
15160
- queryStatusContainer: u`
15211
+ queryStatusContainer: css`
15161
15212
  display: flex;
15162
15213
  gap: ${tokens.size[2]};
15163
15214
  height: min-content;
15164
15215
  `,
15165
- queryStatusTag: u`
15216
+ queryStatusTag: css`
15166
15217
  display: flex;
15167
15218
  gap: ${tokens.size[1.5]};
15168
15219
  box-sizing: border-box;
@@ -15183,10 +15234,10 @@ var init_Devtools = __esm({
15183
15234
  outline: 2px solid ${colors.blue[800]};
15184
15235
  }
15185
15236
  `,
15186
- queryStatusTagLabel: u`
15237
+ queryStatusTagLabel: css`
15187
15238
  font-size: ${font.size.xs};
15188
15239
  `,
15189
- queryStatusCount: u`
15240
+ queryStatusCount: css`
15190
15241
  font-size: ${font.size.xs};
15191
15242
  padding: 0 5px;
15192
15243
  display: flex;
@@ -15198,7 +15249,7 @@ var init_Devtools = __esm({
15198
15249
  font-variant-numeric: tabular-nums;
15199
15250
  height: ${tokens.size[4.5]};
15200
15251
  `,
15201
- statusTooltip: u`
15252
+ statusTooltip: css`
15202
15253
  position: absolute;
15203
15254
  z-index: 1;
15204
15255
  background-color: ${t2(colors.gray[50], colors.darkGray[500])};
@@ -15238,7 +15289,7 @@ var init_Devtools = __esm({
15238
15289
  border-width: 7px;
15239
15290
  }
15240
15291
  `,
15241
- filtersContainer: u`
15292
+ filtersContainer: css`
15242
15293
  display: flex;
15243
15294
  gap: ${tokens.size[2]};
15244
15295
  & > button {
@@ -15267,7 +15318,7 @@ var init_Devtools = __esm({
15267
15318
  }
15268
15319
  }
15269
15320
  `,
15270
- filterInput: u`
15321
+ filterInput: css`
15271
15322
  padding: ${size2[0.5]} ${size2[2]};
15272
15323
  border-radius: ${tokens.border.radius.sm};
15273
15324
  background-color: ${t2(colors.gray[100], colors.darkGray[400])};
@@ -15306,7 +15357,7 @@ var init_Devtools = __esm({
15306
15357
  outline: 2px solid ${colors.blue[800]};
15307
15358
  }
15308
15359
  `,
15309
- filterSelect: u`
15360
+ filterSelect: css`
15310
15361
  padding: ${tokens.size[0.5]} ${tokens.size[2]};
15311
15362
  border-radius: ${tokens.border.radius.sm};
15312
15363
  background-color: ${t2(colors.gray[100], colors.darkGray[400])};
@@ -15340,11 +15391,11 @@ var init_Devtools = __esm({
15340
15391
  outline: 2px solid ${colors.blue[800]};
15341
15392
  }
15342
15393
  `,
15343
- actionsContainer: u`
15394
+ actionsContainer: css`
15344
15395
  display: flex;
15345
15396
  gap: ${tokens.size[2]};
15346
15397
  `,
15347
- actionsBtn: u`
15398
+ actionsBtn: css`
15348
15399
  border-radius: ${tokens.border.radius.sm};
15349
15400
  background-color: ${t2(colors.gray[100], colors.darkGray[400])};
15350
15401
  border: 1px solid ${t2(colors.gray[300], colors.darkGray[200])};
@@ -15371,13 +15422,13 @@ var init_Devtools = __esm({
15371
15422
  outline: 2px solid ${colors.blue[800]};
15372
15423
  }
15373
15424
  `,
15374
- actionsBtnOffline: u`
15425
+ actionsBtnOffline: css`
15375
15426
  & svg {
15376
15427
  stroke: ${t2(colors.yellow[700], colors.yellow[500])};
15377
15428
  fill: ${t2(colors.yellow[700], colors.yellow[500])};
15378
15429
  }
15379
15430
  `,
15380
- overflowQueryContainer: u`
15431
+ overflowQueryContainer: css`
15381
15432
  flex: 1;
15382
15433
  overflow-y: auto;
15383
15434
  & > div {
@@ -15385,7 +15436,7 @@ var init_Devtools = __esm({
15385
15436
  flex-direction: column;
15386
15437
  }
15387
15438
  `,
15388
- queryRow: u`
15439
+ queryRow: css`
15389
15440
  display: flex;
15390
15441
  align-items: center;
15391
15442
  padding: 0;
@@ -15447,10 +15498,10 @@ var init_Devtools = __esm({
15447
15498
  font-size: ${font.size.xs};
15448
15499
  }
15449
15500
  `,
15450
- selectedQueryRow: u`
15501
+ selectedQueryRow: css`
15451
15502
  background-color: ${t2(colors.gray[200], colors.darkGray[500])};
15452
15503
  `,
15453
- detailsContainer: u`
15504
+ detailsContainer: css`
15454
15505
  flex: 1 1 700px;
15455
15506
  background-color: ${t2(colors.gray[50], colors.darkGray[700])};
15456
15507
  color: ${t2(colors.gray[700], colors.gray[300])};
@@ -15461,7 +15512,7 @@ var init_Devtools = __esm({
15461
15512
  display: flex;
15462
15513
  text-align: left;
15463
15514
  `,
15464
- detailsHeader: u`
15515
+ detailsHeader: css`
15465
15516
  font-family: ui-sans-serif, Inter, system-ui, sans-serif, sans-serif;
15466
15517
  position: sticky;
15467
15518
  top: 0;
@@ -15473,7 +15524,7 @@ var init_Devtools = __esm({
15473
15524
  line-height: ${font.lineHeight.xs};
15474
15525
  text-align: left;
15475
15526
  `,
15476
- detailsBody: u`
15527
+ detailsBody: css`
15477
15528
  margin: ${tokens.size[1.5]} 0px ${tokens.size[2]} 0px;
15478
15529
  & > div {
15479
15530
  display: flex;
@@ -15507,13 +15558,13 @@ var init_Devtools = __esm({
15507
15558
  align-items: center;
15508
15559
  }
15509
15560
  `,
15510
- queryDetailsStatus: u`
15561
+ queryDetailsStatus: css`
15511
15562
  border: 1px solid ${colors.darkGray[200]};
15512
15563
  border-radius: ${tokens.border.radius.sm};
15513
15564
  font-weight: ${font.weight.medium};
15514
15565
  padding: ${tokens.size[1]} ${tokens.size[2.5]};
15515
15566
  `,
15516
- actionsBody: u`
15567
+ actionsBody: css`
15517
15568
  flex-wrap: wrap;
15518
15569
  margin: ${tokens.size[2]} 0px ${tokens.size[2]} 0px;
15519
15570
  display: flex;
@@ -15553,7 +15604,7 @@ var init_Devtools = __esm({
15553
15604
  }
15554
15605
  }
15555
15606
  `,
15556
- actionsSelect: u`
15607
+ actionsSelect: css`
15557
15608
  font-size: ${font.size.xs};
15558
15609
  padding: ${tokens.size[0.5]} ${tokens.size[2]};
15559
15610
  display: flex;
@@ -15602,7 +15653,7 @@ var init_Devtools = __esm({
15602
15653
  height: ${tokens.size[2]};
15603
15654
  }
15604
15655
  `,
15605
- settingsMenu: u`
15656
+ settingsMenu: css`
15606
15657
  display: flex;
15607
15658
  & * {
15608
15659
  font-family: ui-sans-serif, Inter, system-ui, sans-serif, sans-serif;
@@ -15618,7 +15669,7 @@ var init_Devtools = __esm({
15618
15669
  min-width: 120px;
15619
15670
  padding: ${size2[0.5]};
15620
15671
  `,
15621
- settingsSubTrigger: u`
15672
+ settingsSubTrigger: css`
15622
15673
  display: flex;
15623
15674
  align-items: center;
15624
15675
  justify-content: space-between;
@@ -15646,14 +15697,14 @@ var init_Devtools = __esm({
15646
15697
  cursor: not-allowed;
15647
15698
  }
15648
15699
  `,
15649
- settingsMenuHeader: u`
15700
+ settingsMenuHeader: css`
15650
15701
  padding: ${tokens.size[1]} ${tokens.size[1]};
15651
15702
  font-weight: ${font.weight.medium};
15652
15703
  border-bottom: 1px solid ${t2(colors.gray[300], colors.darkGray[400])};
15653
15704
  color: ${t2(colors.gray[500], colors.gray[400])};
15654
15705
  font-size: ${font.size["xs"]};
15655
15706
  `,
15656
- settingsSubButton: u`
15707
+ settingsSubButton: css`
15657
15708
  display: flex;
15658
15709
  align-items: center;
15659
15710
  justify-content: space-between;
@@ -15675,7 +15726,7 @@ var init_Devtools = __esm({
15675
15726
  outline: 2px solid ${colors.blue[800]};
15676
15727
  }
15677
15728
  `,
15678
- themeSelectedButton: u`
15729
+ themeSelectedButton: css`
15679
15730
  background-color: ${t2(colors.purple[100], colors.purple[900])};
15680
15731
  color: ${t2(colors.purple[700], colors.purple[300])};
15681
15732
  & svg {
@@ -15685,7 +15736,7 @@ var init_Devtools = __esm({
15685
15736
  background-color: ${t2(colors.purple[100], colors.purple[900])};
15686
15737
  }
15687
15738
  `,
15688
- viewToggle: u`
15739
+ viewToggle: css`
15689
15740
  border-radius: ${tokens.border.radius.sm};
15690
15741
  background-color: ${t2(colors.gray[200], colors.darkGray[600])};
15691
15742
  border: 1px solid ${t2(colors.gray[300], colors.darkGray[200])};
@@ -15737,8 +15788,8 @@ var init_Devtools = __esm({
15737
15788
  `
15738
15789
  };
15739
15790
  };
15740
- lightStyles2 = stylesFactory2("light");
15741
- darkStyles2 = stylesFactory2("dark");
15791
+ lightStyles2 = (css) => stylesFactory2("light", css);
15792
+ darkStyles2 = (css) => stylesFactory2("dark", css);
15742
15793
  delegateEvents(["click", "mousedown", "input"]);
15743
15794
  }
15744
15795
  });
@@ -15756,6 +15807,7 @@ exports.TanstackQueryDevtools = class TanstackQueryDevtools {
15756
15807
  #version;
15757
15808
  #isMounted = false;
15758
15809
  #styleNonce;
15810
+ #shadowDOMTarget;
15759
15811
  #buttonPosition;
15760
15812
  #position;
15761
15813
  #initialIsOpen;
@@ -15772,13 +15824,15 @@ exports.TanstackQueryDevtools = class TanstackQueryDevtools {
15772
15824
  position,
15773
15825
  initialIsOpen,
15774
15826
  errorTypes,
15775
- styleNonce
15827
+ styleNonce,
15828
+ shadowDOMTarget
15776
15829
  } = config;
15777
15830
  this.#client = createSignal(client);
15778
15831
  this.#queryFlavor = queryFlavor;
15779
15832
  this.#version = version;
15780
15833
  this.#onlineManager = onlineManager;
15781
15834
  this.#styleNonce = styleNonce;
15835
+ this.#shadowDOMTarget = shadowDOMTarget;
15782
15836
  this.#buttonPosition = createSignal(buttonPosition);
15783
15837
  this.#position = createSignal(position);
15784
15838
  this.#initialIsOpen = createSignal(initialIsOpen);
@@ -15817,7 +15871,7 @@ exports.TanstackQueryDevtools = class TanstackQueryDevtools {
15817
15871
  Devtools2 = lazy(() => Promise.resolve().then(() => (init_Devtools(), Devtools_exports)));
15818
15872
  this.#Component = Devtools2;
15819
15873
  }
15820
- setupStyleSheet(this.#styleNonce);
15874
+ setupStyleSheet(this.#styleNonce, this.#shadowDOMTarget);
15821
15875
  return createComponent(Devtools2, mergeProps({
15822
15876
  get queryFlavor() {
15823
15877
  return _self$.#queryFlavor;
@@ -15827,6 +15881,9 @@ exports.TanstackQueryDevtools = class TanstackQueryDevtools {
15827
15881
  },
15828
15882
  get onlineManager() {
15829
15883
  return _self$.#onlineManager;
15884
+ },
15885
+ get shadowDOMTarget() {
15886
+ return _self$.#shadowDOMTarget;
15830
15887
  }
15831
15888
  }, {
15832
15889
  get client() {