@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/Devtools/{NXICSXP3.js → DBFR2OSQ.js} +154 -115
- package/build/Devtools/{T73WTYCS.jsx → MZG6MFIN.jsx} +141 -115
- package/build/Devtools/{QUGYIDRL.js → UXHVNKJK.js} +155 -114
- package/build/Devtools/{6EDF3GZQ.jsx → ZI3HPF3S.jsx} +141 -115
- package/build/chunk/{AZNCIVVX.jsx → 4MX274MJ.jsx} +15 -3
- package/build/chunk/{XKKA3NOX.js → BWUNFN7M.js} +15 -4
- package/build/chunk/{O2PITFF6.js → EY5FZ5D2.js} +15 -4
- package/build/chunk/{PQZZ5Z2E.jsx → HLOIZPIT.jsx} +15 -3
- package/build/dev.cjs +175 -118
- package/build/dev.js +10 -4
- package/build/dev.jsx +8 -4
- package/build/index.cjs +175 -118
- package/build/index.d.cts +2 -0
- package/build/index.d.ts +2 -0
- package/build/index.js +10 -4
- package/build/index.jsx +8 -4
- package/package.json +2 -2
- package/src/Context.ts +2 -0
- package/src/Devtools.tsx +93 -32
- package/src/index.tsx +6 -1
- package/src/utils.tsx +9 -3
package/build/dev.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;
|
|
@@ -3216,10 +3223,10 @@ var init_utils = __esm({
|
|
|
3216
3223
|
}
|
|
3217
3224
|
return oldData;
|
|
3218
3225
|
};
|
|
3219
|
-
setupStyleSheet = (nonce) => {
|
|
3226
|
+
setupStyleSheet = (nonce, target) => {
|
|
3220
3227
|
if (!nonce)
|
|
3221
3228
|
return;
|
|
3222
|
-
const styleExists = document.querySelector("#_goober");
|
|
3229
|
+
const styleExists = document.querySelector("#_goober") || target?.querySelector("#_goober");
|
|
3223
3230
|
if (styleExists)
|
|
3224
3231
|
return;
|
|
3225
3232
|
const styleTag = document.createElement("style");
|
|
@@ -3227,7 +3234,11 @@ var init_utils = __esm({
|
|
|
3227
3234
|
styleTag.appendChild(textNode);
|
|
3228
3235
|
styleTag.id = "_goober";
|
|
3229
3236
|
styleTag.setAttribute("nonce", nonce);
|
|
3230
|
-
|
|
3237
|
+
if (target) {
|
|
3238
|
+
target.appendChild(styleTag);
|
|
3239
|
+
} else {
|
|
3240
|
+
document.head.appendChild(styleTag);
|
|
3241
|
+
}
|
|
3231
3242
|
};
|
|
3232
3243
|
}
|
|
3233
3244
|
});
|
|
@@ -12202,7 +12213,8 @@ var init_Context = __esm({
|
|
|
12202
12213
|
client: void 0,
|
|
12203
12214
|
onlineManager: void 0,
|
|
12204
12215
|
queryFlavor: "",
|
|
12205
|
-
version: ""
|
|
12216
|
+
version: "",
|
|
12217
|
+
shadowDOMTarget: void 0
|
|
12206
12218
|
});
|
|
12207
12219
|
ThemeContext = createContext(
|
|
12208
12220
|
() => "dark"
|
|
@@ -12970,13 +12982,17 @@ var init_Devtools = __esm({
|
|
|
12970
12982
|
if (pipWindow() != null) {
|
|
12971
12983
|
return;
|
|
12972
12984
|
}
|
|
12973
|
-
const pip = window.open("", "", `width=${width},height=${height},popup`);
|
|
12985
|
+
const pip = window.open("", "TSQD-Devtools-Panel", `width=${width},height=${height},popup`);
|
|
12974
12986
|
if (!pip) {
|
|
12975
12987
|
throw new Error("Failed to open popup. Please allow popups for this site to view the devtools in picture-in-picture mode.");
|
|
12976
12988
|
}
|
|
12989
|
+
pip.document.head.innerHTML = "";
|
|
12990
|
+
pip.document.body.innerHTML = "";
|
|
12991
|
+
clearDelegatedEvents(pip.document);
|
|
12977
12992
|
pip.document.title = "TanStack Query Devtools";
|
|
12978
12993
|
pip.document.body.style.margin = "0";
|
|
12979
12994
|
pip.addEventListener("pagehide", () => {
|
|
12995
|
+
props.setLocalStore("pip_open", "false");
|
|
12980
12996
|
setPipWindow(null);
|
|
12981
12997
|
});
|
|
12982
12998
|
[...document.styleSheets].forEach((styleSheet) => {
|
|
@@ -13006,23 +13022,21 @@ var init_Devtools = __esm({
|
|
|
13006
13022
|
}
|
|
13007
13023
|
});
|
|
13008
13024
|
delegateEvents(["focusin", "focusout", "pointermove", "keydown", "pointerdown", "pointerup", "click", "mousedown", "input"], pip.document);
|
|
13025
|
+
props.setLocalStore("pip_open", "true");
|
|
13009
13026
|
setPipWindow(pip);
|
|
13010
13027
|
};
|
|
13011
13028
|
createEffect(() => {
|
|
13012
|
-
const
|
|
13013
|
-
|
|
13014
|
-
|
|
13015
|
-
|
|
13016
|
-
onCleanup(() => {
|
|
13017
|
-
window.removeEventListener("beforeunload", closePipWindowOnUnload);
|
|
13018
|
-
});
|
|
13029
|
+
const pip_open = props.localStore.pip_open ?? "false";
|
|
13030
|
+
if (pip_open === "true") {
|
|
13031
|
+
requestPipWindow(Number(window.innerWidth), Number(props.localStore.height || DEFAULT_HEIGHT));
|
|
13032
|
+
}
|
|
13019
13033
|
});
|
|
13020
13034
|
createEffect(() => {
|
|
13021
|
-
const gooberStyles = document.
|
|
13035
|
+
const gooberStyles = (useQueryDevtoolsContext().shadowDOMTarget || document).querySelector("#_goober");
|
|
13022
13036
|
const w = pipWindow();
|
|
13023
13037
|
if (gooberStyles && w) {
|
|
13024
13038
|
const observer = new MutationObserver(() => {
|
|
13025
|
-
const pip_style = w.document.
|
|
13039
|
+
const pip_style = (useQueryDevtoolsContext().shadowDOMTarget || w.document).querySelector("#_goober");
|
|
13026
13040
|
if (pip_style) {
|
|
13027
13041
|
pip_style.textContent = gooberStyles.textContent;
|
|
13028
13042
|
}
|
|
@@ -13077,6 +13091,8 @@ var init_Devtools = __esm({
|
|
|
13077
13091
|
value: props,
|
|
13078
13092
|
get children() {
|
|
13079
13093
|
return createComponent(PiPProvider, {
|
|
13094
|
+
localStore,
|
|
13095
|
+
setLocalStore,
|
|
13080
13096
|
get children() {
|
|
13081
13097
|
return createComponent(ThemeContext.Provider, {
|
|
13082
13098
|
value: theme,
|
|
@@ -13095,8 +13111,11 @@ var init_Devtools = __esm({
|
|
|
13095
13111
|
Devtools_default = DevtoolsComponent;
|
|
13096
13112
|
Devtools = (props) => {
|
|
13097
13113
|
const theme = useTheme();
|
|
13114
|
+
const css = useQueryDevtoolsContext().shadowDOMTarget ? u.bind({
|
|
13115
|
+
target: useQueryDevtoolsContext().shadowDOMTarget
|
|
13116
|
+
}) : u;
|
|
13098
13117
|
const styles = createMemo(() => {
|
|
13099
|
-
return theme() === "dark" ? darkStyles2 : lightStyles2;
|
|
13118
|
+
return theme() === "dark" ? darkStyles2(css) : lightStyles2(css);
|
|
13100
13119
|
});
|
|
13101
13120
|
const pip = usePiPWindow();
|
|
13102
13121
|
const buttonPosition = createMemo(() => {
|
|
@@ -13129,9 +13148,10 @@ var init_Devtools = __esm({
|
|
|
13129
13148
|
window.removeEventListener("focus", onFocus);
|
|
13130
13149
|
});
|
|
13131
13150
|
});
|
|
13151
|
+
const pip_open = createMemo(() => props.localStore.pip_open ?? "false");
|
|
13132
13152
|
return [createComponent(Show, {
|
|
13133
13153
|
get when() {
|
|
13134
|
-
return pip().pipWindow;
|
|
13154
|
+
return createMemo(() => !!pip().pipWindow)() && pip_open() == "true";
|
|
13135
13155
|
},
|
|
13136
13156
|
get children() {
|
|
13137
13157
|
return createComponent(Portal, {
|
|
@@ -13163,7 +13183,7 @@ var init_Devtools = __esm({
|
|
|
13163
13183
|
get children() {
|
|
13164
13184
|
return createComponent(Show, {
|
|
13165
13185
|
get when() {
|
|
13166
|
-
return createMemo(() => !!isOpen()
|
|
13186
|
+
return createMemo(() => !!(isOpen() && !pip().pipWindow))() && pip_open() == "false";
|
|
13167
13187
|
},
|
|
13168
13188
|
get children() {
|
|
13169
13189
|
return createComponent(DevtoolsPanel, {
|
|
@@ -13196,7 +13216,7 @@ var init_Devtools = __esm({
|
|
|
13196
13216
|
});
|
|
13197
13217
|
}
|
|
13198
13218
|
}), null);
|
|
13199
|
-
createRenderEffect(() => className(_el$, clsx(
|
|
13219
|
+
createRenderEffect(() => className(_el$, clsx(css`
|
|
13200
13220
|
& .tsqd-panel-transition-exit-active,
|
|
13201
13221
|
& .tsqd-panel-transition-enter-active {
|
|
13202
13222
|
transition:
|
|
@@ -13229,8 +13249,11 @@ var init_Devtools = __esm({
|
|
|
13229
13249
|
PiPPanel = (props) => {
|
|
13230
13250
|
const pip = usePiPWindow();
|
|
13231
13251
|
const theme = useTheme();
|
|
13252
|
+
const css = useQueryDevtoolsContext().shadowDOMTarget ? u.bind({
|
|
13253
|
+
target: useQueryDevtoolsContext().shadowDOMTarget
|
|
13254
|
+
}) : u;
|
|
13232
13255
|
const styles = createMemo(() => {
|
|
13233
|
-
return theme() === "dark" ? darkStyles2 : lightStyles2;
|
|
13256
|
+
return theme() === "dark" ? darkStyles2(css) : lightStyles2(css);
|
|
13234
13257
|
});
|
|
13235
13258
|
const getPanelDynamicStyles = () => {
|
|
13236
13259
|
const {
|
|
@@ -13238,12 +13261,12 @@ var init_Devtools = __esm({
|
|
|
13238
13261
|
} = tokens;
|
|
13239
13262
|
const t2 = (light, dark) => theme() === "dark" ? dark : light;
|
|
13240
13263
|
if (panelWidth() < secondBreakpoint) {
|
|
13241
|
-
return
|
|
13264
|
+
return css`
|
|
13242
13265
|
flex-direction: column;
|
|
13243
13266
|
background-color: ${t2(colors.gray[300], colors.gray[600])};
|
|
13244
13267
|
`;
|
|
13245
13268
|
}
|
|
13246
|
-
return
|
|
13269
|
+
return css`
|
|
13247
13270
|
flex-direction: row;
|
|
13248
13271
|
background-color: ${t2(colors.gray[200], colors.darkGray[900])};
|
|
13249
13272
|
`;
|
|
@@ -13257,6 +13280,7 @@ var init_Devtools = __esm({
|
|
|
13257
13280
|
};
|
|
13258
13281
|
if (win) {
|
|
13259
13282
|
win.addEventListener("resize", resizeCB);
|
|
13283
|
+
resizeCB();
|
|
13260
13284
|
}
|
|
13261
13285
|
onCleanup(() => {
|
|
13262
13286
|
if (win) {
|
|
@@ -13272,7 +13296,7 @@ var init_Devtools = __esm({
|
|
|
13272
13296
|
_el$5.style.setProperty("width", "100vw");
|
|
13273
13297
|
insert(_el$5, () => props.children);
|
|
13274
13298
|
createRenderEffect(() => className(_el$5, clsx(styles().panel, getPanelDynamicStyles(), {
|
|
13275
|
-
[
|
|
13299
|
+
[css`
|
|
13276
13300
|
min-width: min-content;
|
|
13277
13301
|
`]: panelWidth() < thirdBreakpoint
|
|
13278
13302
|
}, "tsqd-main-panel")));
|
|
@@ -13281,8 +13305,11 @@ var init_Devtools = __esm({
|
|
|
13281
13305
|
};
|
|
13282
13306
|
DevtoolsPanel = (props) => {
|
|
13283
13307
|
const theme = useTheme();
|
|
13308
|
+
const css = useQueryDevtoolsContext().shadowDOMTarget ? u.bind({
|
|
13309
|
+
target: useQueryDevtoolsContext().shadowDOMTarget
|
|
13310
|
+
}) : u;
|
|
13284
13311
|
const styles = createMemo(() => {
|
|
13285
|
-
return theme() === "dark" ? darkStyles2 : lightStyles2;
|
|
13312
|
+
return theme() === "dark" ? darkStyles2(css) : lightStyles2(css);
|
|
13286
13313
|
});
|
|
13287
13314
|
const [isResizing, setIsResizing] = createSignal(false);
|
|
13288
13315
|
const position = createMemo(() => props.localStore.position || useQueryDevtoolsContext().position || POSITION);
|
|
@@ -13376,12 +13403,12 @@ var init_Devtools = __esm({
|
|
|
13376
13403
|
} = tokens;
|
|
13377
13404
|
const t2 = (light, dark) => theme() === "dark" ? dark : light;
|
|
13378
13405
|
if (panelWidth() < secondBreakpoint) {
|
|
13379
|
-
return
|
|
13406
|
+
return css`
|
|
13380
13407
|
flex-direction: column;
|
|
13381
13408
|
background-color: ${t2(colors.gray[300], colors.gray[600])};
|
|
13382
13409
|
`;
|
|
13383
13410
|
}
|
|
13384
|
-
return
|
|
13411
|
+
return css`
|
|
13385
13412
|
flex-direction: row;
|
|
13386
13413
|
background-color: ${t2(colors.gray[200], colors.darkGray[900])};
|
|
13387
13414
|
`;
|
|
@@ -13403,7 +13430,7 @@ var init_Devtools = __esm({
|
|
|
13403
13430
|
}), null);
|
|
13404
13431
|
createRenderEffect((_p$) => {
|
|
13405
13432
|
const _v$ = clsx(styles().panel, styles()[`panel-position-${position()}`], getPanelDynamicStyles(), {
|
|
13406
|
-
[
|
|
13433
|
+
[css`
|
|
13407
13434
|
min-width: min-content;
|
|
13408
13435
|
`]: panelWidth() < thirdBreakpoint && (position() === "right" || position() === "left")
|
|
13409
13436
|
}, "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");
|
|
@@ -13428,8 +13455,11 @@ var init_Devtools = __esm({
|
|
|
13428
13455
|
setupMutationCacheSubscription();
|
|
13429
13456
|
let containerRef;
|
|
13430
13457
|
const theme = useTheme();
|
|
13458
|
+
const css = useQueryDevtoolsContext().shadowDOMTarget ? u.bind({
|
|
13459
|
+
target: useQueryDevtoolsContext().shadowDOMTarget
|
|
13460
|
+
}) : u;
|
|
13431
13461
|
const styles = createMemo(() => {
|
|
13432
|
-
return theme() === "dark" ? darkStyles2 : lightStyles2;
|
|
13462
|
+
return theme() === "dark" ? darkStyles2(css) : lightStyles2(css);
|
|
13433
13463
|
});
|
|
13434
13464
|
const pip = usePiPWindow();
|
|
13435
13465
|
const [selectedView, setSelectedView] = createSignal("queries");
|
|
@@ -13860,10 +13890,10 @@ var init_Devtools = __esm({
|
|
|
13860
13890
|
}
|
|
13861
13891
|
}), null);
|
|
13862
13892
|
createRenderEffect((_p$) => {
|
|
13863
|
-
const _v$6 = clsx(styles().queriesContainer, panelWidth() < secondBreakpoint && (selectedQueryHash() || selectedMutationId()) &&
|
|
13893
|
+
const _v$6 = clsx(styles().queriesContainer, panelWidth() < secondBreakpoint && (selectedQueryHash() || selectedMutationId()) && css`
|
|
13864
13894
|
height: 50%;
|
|
13865
13895
|
max-height: 50%;
|
|
13866
|
-
`, panelWidth() < secondBreakpoint && !(selectedQueryHash() || selectedMutationId()) &&
|
|
13896
|
+
`, panelWidth() < secondBreakpoint && !(selectedQueryHash() || selectedMutationId()) && css`
|
|
13867
13897
|
height: 100%;
|
|
13868
13898
|
max-height: 100%;
|
|
13869
13899
|
`, "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"}`;
|
|
@@ -13930,8 +13960,11 @@ var init_Devtools = __esm({
|
|
|
13930
13960
|
};
|
|
13931
13961
|
QueryRow = (props) => {
|
|
13932
13962
|
const theme = useTheme();
|
|
13963
|
+
const css = useQueryDevtoolsContext().shadowDOMTarget ? u.bind({
|
|
13964
|
+
target: useQueryDevtoolsContext().shadowDOMTarget
|
|
13965
|
+
}) : u;
|
|
13933
13966
|
const styles = createMemo(() => {
|
|
13934
|
-
return theme() === "dark" ? darkStyles2 : lightStyles2;
|
|
13967
|
+
return theme() === "dark" ? darkStyles2(css) : lightStyles2(css);
|
|
13935
13968
|
});
|
|
13936
13969
|
const {
|
|
13937
13970
|
colors,
|
|
@@ -13957,12 +13990,12 @@ var init_Devtools = __esm({
|
|
|
13957
13990
|
}));
|
|
13958
13991
|
const getObserverCountColorStyles = () => {
|
|
13959
13992
|
if (color() === "gray") {
|
|
13960
|
-
return
|
|
13993
|
+
return css`
|
|
13961
13994
|
background-color: ${t2(colors[color()][200], colors[color()][700])};
|
|
13962
13995
|
color: ${t2(colors[color()][700], colors[color()][300])};
|
|
13963
13996
|
`;
|
|
13964
13997
|
}
|
|
13965
|
-
return
|
|
13998
|
+
return css`
|
|
13966
13999
|
background-color: ${t2(colors[color()][200] + alpha[80], colors[color()][900])};
|
|
13967
14000
|
color: ${t2(colors[color()][800], colors[color()][300])};
|
|
13968
14001
|
`;
|
|
@@ -14001,8 +14034,11 @@ var init_Devtools = __esm({
|
|
|
14001
14034
|
};
|
|
14002
14035
|
MutationRow = (props) => {
|
|
14003
14036
|
const theme = useTheme();
|
|
14037
|
+
const css = useQueryDevtoolsContext().shadowDOMTarget ? u.bind({
|
|
14038
|
+
target: useQueryDevtoolsContext().shadowDOMTarget
|
|
14039
|
+
}) : u;
|
|
14004
14040
|
const styles = createMemo(() => {
|
|
14005
|
-
return theme() === "dark" ? darkStyles2 : lightStyles2;
|
|
14041
|
+
return theme() === "dark" ? darkStyles2(css) : lightStyles2(css);
|
|
14006
14042
|
});
|
|
14007
14043
|
const {
|
|
14008
14044
|
colors,
|
|
@@ -14034,12 +14070,12 @@ var init_Devtools = __esm({
|
|
|
14034
14070
|
}));
|
|
14035
14071
|
const getObserverCountColorStyles = () => {
|
|
14036
14072
|
if (color() === "gray") {
|
|
14037
|
-
return
|
|
14073
|
+
return css`
|
|
14038
14074
|
background-color: ${t2(colors[color()][200], colors[color()][700])};
|
|
14039
14075
|
color: ${t2(colors[color()][700], colors[color()][300])};
|
|
14040
14076
|
`;
|
|
14041
14077
|
}
|
|
14042
|
-
return
|
|
14078
|
+
return css`
|
|
14043
14079
|
background-color: ${t2(colors[color()][200] + alpha[80], colors[color()][900])};
|
|
14044
14080
|
color: ${t2(colors[color()][800], colors[color()][300])};
|
|
14045
14081
|
`;
|
|
@@ -14116,8 +14152,11 @@ var init_Devtools = __esm({
|
|
|
14116
14152
|
const paused = createSubscribeToQueryCacheBatcher((queryCache) => queryCache().getAll().filter((q) => getQueryStatusLabel(q) === "paused").length);
|
|
14117
14153
|
const inactive = createSubscribeToQueryCacheBatcher((queryCache) => queryCache().getAll().filter((q) => getQueryStatusLabel(q) === "inactive").length);
|
|
14118
14154
|
const theme = useTheme();
|
|
14155
|
+
const css = useQueryDevtoolsContext().shadowDOMTarget ? u.bind({
|
|
14156
|
+
target: useQueryDevtoolsContext().shadowDOMTarget
|
|
14157
|
+
}) : u;
|
|
14119
14158
|
const styles = createMemo(() => {
|
|
14120
|
-
return theme() === "dark" ? darkStyles2 : lightStyles2;
|
|
14159
|
+
return theme() === "dark" ? darkStyles2(css) : lightStyles2(css);
|
|
14121
14160
|
});
|
|
14122
14161
|
return (() => {
|
|
14123
14162
|
const _el$55 = _tmpl$26();
|
|
@@ -14178,8 +14217,11 @@ var init_Devtools = __esm({
|
|
|
14178
14217
|
status: m.state.status
|
|
14179
14218
|
}) === "red").length);
|
|
14180
14219
|
const theme = useTheme();
|
|
14220
|
+
const css = useQueryDevtoolsContext().shadowDOMTarget ? u.bind({
|
|
14221
|
+
target: useQueryDevtoolsContext().shadowDOMTarget
|
|
14222
|
+
}) : u;
|
|
14181
14223
|
const styles = createMemo(() => {
|
|
14182
|
-
return theme() === "dark" ? darkStyles2 : lightStyles2;
|
|
14224
|
+
return theme() === "dark" ? darkStyles2(css) : lightStyles2(css);
|
|
14183
14225
|
});
|
|
14184
14226
|
return (() => {
|
|
14185
14227
|
const _el$56 = _tmpl$26();
|
|
@@ -14217,8 +14259,11 @@ var init_Devtools = __esm({
|
|
|
14217
14259
|
};
|
|
14218
14260
|
QueryStatus = (props) => {
|
|
14219
14261
|
const theme = useTheme();
|
|
14262
|
+
const css = useQueryDevtoolsContext().shadowDOMTarget ? u.bind({
|
|
14263
|
+
target: useQueryDevtoolsContext().shadowDOMTarget
|
|
14264
|
+
}) : u;
|
|
14220
14265
|
const styles = createMemo(() => {
|
|
14221
|
-
return theme() === "dark" ? darkStyles2 : lightStyles2;
|
|
14266
|
+
return theme() === "dark" ? darkStyles2(css) : lightStyles2(css);
|
|
14222
14267
|
});
|
|
14223
14268
|
const {
|
|
14224
14269
|
colors,
|
|
@@ -14255,7 +14300,7 @@ var init_Devtools = __esm({
|
|
|
14255
14300
|
return showLabel();
|
|
14256
14301
|
},
|
|
14257
14302
|
get ["class"]() {
|
|
14258
|
-
return clsx(styles().queryStatusTag, !showLabel() &&
|
|
14303
|
+
return clsx(styles().queryStatusTag, !showLabel() && css`
|
|
14259
14304
|
cursor: pointer;
|
|
14260
14305
|
&:hover {
|
|
14261
14306
|
background: ${t2(colors.gray[200], colors.darkGray[400])}${alpha[80]};
|
|
@@ -14289,12 +14334,12 @@ var init_Devtools = __esm({
|
|
|
14289
14334
|
}), _el$61);
|
|
14290
14335
|
insert(_el$61, () => props.count);
|
|
14291
14336
|
createRenderEffect((_p$) => {
|
|
14292
|
-
const _v$32 = clsx(
|
|
14337
|
+
const _v$32 = clsx(css`
|
|
14293
14338
|
width: ${tokens.size[1.5]};
|
|
14294
14339
|
height: ${tokens.size[1.5]};
|
|
14295
14340
|
border-radius: ${tokens.border.radius.full};
|
|
14296
14341
|
background-color: ${tokens.colors[props.color][500]};
|
|
14297
|
-
`, "tsqd-query-status-tag-dot"), _v$33 = clsx(styles().queryStatusCount, props.count > 0 && props.color !== "gray" &&
|
|
14342
|
+
`, "tsqd-query-status-tag-dot"), _v$33 = clsx(styles().queryStatusCount, props.count > 0 && props.color !== "gray" && css`
|
|
14298
14343
|
background-color: ${t2(colors[props.color][100], colors[props.color][900])};
|
|
14299
14344
|
color: ${t2(colors[props.color][700], colors[props.color][300])};
|
|
14300
14345
|
`, "tsqd-query-status-tag-count");
|
|
@@ -14310,8 +14355,11 @@ var init_Devtools = __esm({
|
|
|
14310
14355
|
};
|
|
14311
14356
|
QueryDetails = () => {
|
|
14312
14357
|
const theme = useTheme();
|
|
14358
|
+
const css = useQueryDevtoolsContext().shadowDOMTarget ? u.bind({
|
|
14359
|
+
target: useQueryDevtoolsContext().shadowDOMTarget
|
|
14360
|
+
}) : u;
|
|
14313
14361
|
const styles = createMemo(() => {
|
|
14314
|
-
return theme() === "dark" ? darkStyles2 : lightStyles2;
|
|
14362
|
+
return theme() === "dark" ? darkStyles2(css) : lightStyles2(css);
|
|
14315
14363
|
});
|
|
14316
14364
|
const {
|
|
14317
14365
|
colors
|
|
@@ -14374,13 +14422,13 @@ var init_Devtools = __esm({
|
|
|
14374
14422
|
});
|
|
14375
14423
|
const getQueryStatusColors = () => {
|
|
14376
14424
|
if (color() === "gray") {
|
|
14377
|
-
return
|
|
14425
|
+
return css`
|
|
14378
14426
|
background-color: ${t2(colors[color()][200], colors[color()][700])};
|
|
14379
14427
|
color: ${t2(colors[color()][700], colors[color()][300])};
|
|
14380
14428
|
border-color: ${t2(colors[color()][400], colors[color()][600])};
|
|
14381
14429
|
`;
|
|
14382
14430
|
}
|
|
14383
|
-
return
|
|
14431
|
+
return css`
|
|
14384
14432
|
background-color: ${t2(colors[color()][100], colors[color()][900])};
|
|
14385
14433
|
color: ${t2(colors[color()][700], colors[color()][300])};
|
|
14386
14434
|
border-color: ${t2(colors[color()][400], colors[color()][600])};
|
|
@@ -14446,9 +14494,9 @@ var init_Devtools = __esm({
|
|
|
14446
14494
|
};
|
|
14447
14495
|
insert(_el$88, () => queryStatus() === "error" ? "Restore" : "Trigger", _el$90);
|
|
14448
14496
|
createRenderEffect((_p$) => {
|
|
14449
|
-
const _v$34 = clsx(
|
|
14497
|
+
const _v$34 = clsx(css`
|
|
14450
14498
|
color: ${t2(colors.red[500], colors.red[400])};
|
|
14451
|
-
`, "tsqd-query-details-actions-btn", "tsqd-query-details-action-error"), _v$35 = queryStatus() === "pending", _v$36 =
|
|
14499
|
+
`, "tsqd-query-details-actions-btn", "tsqd-query-details-action-error"), _v$35 = queryStatus() === "pending", _v$36 = css`
|
|
14452
14500
|
background-color: ${t2(colors.red[500], colors.red[400])};
|
|
14453
14501
|
`;
|
|
14454
14502
|
_v$34 !== _p$._v$34 && className(_el$88, _p$._v$34 = _v$34);
|
|
@@ -14486,7 +14534,7 @@ var init_Devtools = __esm({
|
|
|
14486
14534
|
}), null);
|
|
14487
14535
|
insert(_el$91, createComponent(ChevronDown, {}), null);
|
|
14488
14536
|
createRenderEffect((_p$) => {
|
|
14489
|
-
const _v$37 = clsx(styles().actionsSelect, "tsqd-query-details-actions-btn", "tsqd-query-details-action-error-multiple"), _v$38 =
|
|
14537
|
+
const _v$37 = clsx(styles().actionsSelect, "tsqd-query-details-actions-btn", "tsqd-query-details-action-error-multiple"), _v$38 = css`
|
|
14490
14538
|
background-color: ${tokens.colors.red[400]};
|
|
14491
14539
|
`, _v$39 = queryStatus() === "pending";
|
|
14492
14540
|
_v$37 !== _p$._v$37 && className(_el$91, _p$._v$37 = _v$37);
|
|
@@ -14520,25 +14568,25 @@ var init_Devtools = __esm({
|
|
|
14520
14568
|
}
|
|
14521
14569
|
}));
|
|
14522
14570
|
createRenderEffect((_p$) => {
|
|
14523
|
-
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(
|
|
14571
|
+
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`
|
|
14524
14572
|
color: ${t2(colors.blue[600], colors.blue[400])};
|
|
14525
|
-
`, "tsqd-query-details-actions-btn", "tsqd-query-details-action-refetch"), _v$47 = statusLabel() === "fetching", _v$48 =
|
|
14573
|
+
`, "tsqd-query-details-actions-btn", "tsqd-query-details-action-refetch"), _v$47 = statusLabel() === "fetching", _v$48 = css`
|
|
14526
14574
|
background-color: ${t2(colors.blue[600], colors.blue[400])};
|
|
14527
|
-
`, _v$49 = clsx(
|
|
14575
|
+
`, _v$49 = clsx(css`
|
|
14528
14576
|
color: ${t2(colors.yellow[600], colors.yellow[400])};
|
|
14529
|
-
`, "tsqd-query-details-actions-btn", "tsqd-query-details-action-invalidate"), _v$50 = queryStatus() === "pending", _v$51 =
|
|
14577
|
+
`, "tsqd-query-details-actions-btn", "tsqd-query-details-action-invalidate"), _v$50 = queryStatus() === "pending", _v$51 = css`
|
|
14530
14578
|
background-color: ${t2(colors.yellow[600], colors.yellow[400])};
|
|
14531
|
-
`, _v$52 = clsx(
|
|
14579
|
+
`, _v$52 = clsx(css`
|
|
14532
14580
|
color: ${t2(colors.gray[600], colors.gray[300])};
|
|
14533
|
-
`, "tsqd-query-details-actions-btn", "tsqd-query-details-action-reset"), _v$53 = queryStatus() === "pending", _v$54 =
|
|
14581
|
+
`, "tsqd-query-details-actions-btn", "tsqd-query-details-action-reset"), _v$53 = queryStatus() === "pending", _v$54 = css`
|
|
14534
14582
|
background-color: ${t2(colors.gray[600], colors.gray[400])};
|
|
14535
|
-
`, _v$55 = clsx(
|
|
14583
|
+
`, _v$55 = clsx(css`
|
|
14536
14584
|
color: ${t2(colors.pink[500], colors.pink[400])};
|
|
14537
|
-
`, "tsqd-query-details-actions-btn", "tsqd-query-details-action-remove"), _v$56 = statusLabel() === "fetching", _v$57 =
|
|
14585
|
+
`, "tsqd-query-details-actions-btn", "tsqd-query-details-action-remove"), _v$56 = statusLabel() === "fetching", _v$57 = css`
|
|
14538
14586
|
background-color: ${t2(colors.pink[500], colors.pink[400])};
|
|
14539
|
-
`, _v$58 = clsx(
|
|
14587
|
+
`, _v$58 = clsx(css`
|
|
14540
14588
|
color: ${t2(colors.cyan[500], colors.cyan[400])};
|
|
14541
|
-
`, "tsqd-query-details-actions-btn", "tsqd-query-details-action-loading"), _v$59 = restoringLoading(), _v$60 =
|
|
14589
|
+
`, "tsqd-query-details-actions-btn", "tsqd-query-details-action-loading"), _v$59 = restoringLoading(), _v$60 = css`
|
|
14542
14590
|
background-color: ${t2(colors.cyan[500], colors.cyan[400])};
|
|
14543
14591
|
`, _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];
|
|
14544
14592
|
_v$40 !== _p$._v$40 && className(_el$62, _p$._v$40 = _v$40);
|
|
@@ -14600,8 +14648,11 @@ var init_Devtools = __esm({
|
|
|
14600
14648
|
};
|
|
14601
14649
|
MutationDetails = () => {
|
|
14602
14650
|
const theme = useTheme();
|
|
14651
|
+
const css = useQueryDevtoolsContext().shadowDOMTarget ? u.bind({
|
|
14652
|
+
target: useQueryDevtoolsContext().shadowDOMTarget
|
|
14653
|
+
}) : u;
|
|
14603
14654
|
const styles = createMemo(() => {
|
|
14604
|
-
return theme() === "dark" ? darkStyles2 : lightStyles2;
|
|
14655
|
+
return theme() === "dark" ? darkStyles2(css) : lightStyles2(css);
|
|
14605
14656
|
});
|
|
14606
14657
|
const {
|
|
14607
14658
|
colors
|
|
@@ -14628,13 +14679,13 @@ var init_Devtools = __esm({
|
|
|
14628
14679
|
const activeMutation = createSubscribeToMutationCacheBatcher((mutationCache) => mutationCache().getAll().find((mutation) => mutation.mutationId === selectedMutationId()), false);
|
|
14629
14680
|
const getQueryStatusColors = () => {
|
|
14630
14681
|
if (color() === "gray") {
|
|
14631
|
-
return
|
|
14682
|
+
return css`
|
|
14632
14683
|
background-color: ${t2(colors[color()][200], colors[color()][700])};
|
|
14633
14684
|
color: ${t2(colors[color()][700], colors[color()][300])};
|
|
14634
14685
|
border-color: ${t2(colors[color()][400], colors[color()][600])};
|
|
14635
14686
|
`;
|
|
14636
14687
|
}
|
|
14637
|
-
return
|
|
14688
|
+
return css`
|
|
14638
14689
|
background-color: ${t2(colors[color()][100], colors[color()][900])};
|
|
14639
14690
|
color: ${t2(colors[color()][700], colors[color()][300])};
|
|
14640
14691
|
border-color: ${t2(colors[color()][400], colors[color()][600])};
|
|
@@ -14808,7 +14859,7 @@ var init_Devtools = __esm({
|
|
|
14808
14859
|
});
|
|
14809
14860
|
return value;
|
|
14810
14861
|
};
|
|
14811
|
-
stylesFactory2 = (theme) => {
|
|
14862
|
+
stylesFactory2 = (theme, css) => {
|
|
14812
14863
|
const {
|
|
14813
14864
|
colors,
|
|
14814
14865
|
font,
|
|
@@ -14819,7 +14870,7 @@ var init_Devtools = __esm({
|
|
|
14819
14870
|
} = tokens;
|
|
14820
14871
|
const t2 = (light, dark) => theme === "light" ? light : dark;
|
|
14821
14872
|
return {
|
|
14822
|
-
devtoolsBtn:
|
|
14873
|
+
devtoolsBtn: css`
|
|
14823
14874
|
z-index: 100000;
|
|
14824
14875
|
position: fixed;
|
|
14825
14876
|
padding: 4px;
|
|
@@ -14873,7 +14924,7 @@ var init_Devtools = __esm({
|
|
|
14873
14924
|
}
|
|
14874
14925
|
}
|
|
14875
14926
|
`,
|
|
14876
|
-
panel:
|
|
14927
|
+
panel: css`
|
|
14877
14928
|
position: fixed;
|
|
14878
14929
|
z-index: 9999;
|
|
14879
14930
|
display: flex;
|
|
@@ -14899,26 +14950,26 @@ var init_Devtools = __esm({
|
|
|
14899
14950
|
background: ${t2(colors.gray[400], colors.darkGray[300])};
|
|
14900
14951
|
}
|
|
14901
14952
|
`,
|
|
14902
|
-
"devtoolsBtn-position-bottom-right":
|
|
14953
|
+
"devtoolsBtn-position-bottom-right": css`
|
|
14903
14954
|
bottom: 12px;
|
|
14904
14955
|
right: 12px;
|
|
14905
14956
|
`,
|
|
14906
|
-
"devtoolsBtn-position-bottom-left":
|
|
14957
|
+
"devtoolsBtn-position-bottom-left": css`
|
|
14907
14958
|
bottom: 12px;
|
|
14908
14959
|
left: 12px;
|
|
14909
14960
|
`,
|
|
14910
|
-
"devtoolsBtn-position-top-left":
|
|
14961
|
+
"devtoolsBtn-position-top-left": css`
|
|
14911
14962
|
top: 12px;
|
|
14912
14963
|
left: 12px;
|
|
14913
14964
|
`,
|
|
14914
|
-
"devtoolsBtn-position-top-right":
|
|
14965
|
+
"devtoolsBtn-position-top-right": css`
|
|
14915
14966
|
top: 12px;
|
|
14916
14967
|
right: 12px;
|
|
14917
14968
|
`,
|
|
14918
|
-
"devtoolsBtn-position-relative":
|
|
14969
|
+
"devtoolsBtn-position-relative": css`
|
|
14919
14970
|
position: relative;
|
|
14920
14971
|
`,
|
|
14921
|
-
"panel-position-top":
|
|
14972
|
+
"panel-position-top": css`
|
|
14922
14973
|
top: 0;
|
|
14923
14974
|
right: 0;
|
|
14924
14975
|
left: 0;
|
|
@@ -14926,7 +14977,7 @@ var init_Devtools = __esm({
|
|
|
14926
14977
|
min-height: ${size2[14]};
|
|
14927
14978
|
border-bottom: ${t2(colors.gray[400], colors.darkGray[300])} 1px solid;
|
|
14928
14979
|
`,
|
|
14929
|
-
"panel-position-bottom":
|
|
14980
|
+
"panel-position-bottom": css`
|
|
14930
14981
|
bottom: 0;
|
|
14931
14982
|
right: 0;
|
|
14932
14983
|
left: 0;
|
|
@@ -14934,21 +14985,21 @@ var init_Devtools = __esm({
|
|
|
14934
14985
|
min-height: ${size2[14]};
|
|
14935
14986
|
border-top: ${t2(colors.gray[400], colors.darkGray[300])} 1px solid;
|
|
14936
14987
|
`,
|
|
14937
|
-
"panel-position-right":
|
|
14988
|
+
"panel-position-right": css`
|
|
14938
14989
|
bottom: 0;
|
|
14939
14990
|
right: 0;
|
|
14940
14991
|
top: 0;
|
|
14941
14992
|
border-left: ${t2(colors.gray[400], colors.darkGray[300])} 1px solid;
|
|
14942
14993
|
max-width: 90%;
|
|
14943
14994
|
`,
|
|
14944
|
-
"panel-position-left":
|
|
14995
|
+
"panel-position-left": css`
|
|
14945
14996
|
bottom: 0;
|
|
14946
14997
|
left: 0;
|
|
14947
14998
|
top: 0;
|
|
14948
14999
|
border-right: ${t2(colors.gray[400], colors.darkGray[300])} 1px solid;
|
|
14949
15000
|
max-width: 90%;
|
|
14950
15001
|
`,
|
|
14951
|
-
closeBtn:
|
|
15002
|
+
closeBtn: css`
|
|
14952
15003
|
position: absolute;
|
|
14953
15004
|
cursor: pointer;
|
|
14954
15005
|
z-index: 5;
|
|
@@ -14969,7 +15020,7 @@ var init_Devtools = __esm({
|
|
|
14969
15020
|
height: ${size2[2]};
|
|
14970
15021
|
}
|
|
14971
15022
|
`,
|
|
14972
|
-
"closeBtn-position-top":
|
|
15023
|
+
"closeBtn-position-top": css`
|
|
14973
15024
|
bottom: 0;
|
|
14974
15025
|
right: ${size2[2]};
|
|
14975
15026
|
transform: translate(0, 100%);
|
|
@@ -14993,7 +15044,7 @@ var init_Devtools = __esm({
|
|
|
14993
15044
|
transform: rotate(180deg);
|
|
14994
15045
|
}
|
|
14995
15046
|
`,
|
|
14996
|
-
"closeBtn-position-bottom":
|
|
15047
|
+
"closeBtn-position-bottom": css`
|
|
14997
15048
|
top: 0;
|
|
14998
15049
|
right: ${size2[2]};
|
|
14999
15050
|
transform: translate(0, -100%);
|
|
@@ -15013,7 +15064,7 @@ var init_Devtools = __esm({
|
|
|
15013
15064
|
width: calc(100% + ${size2[5]});
|
|
15014
15065
|
}
|
|
15015
15066
|
`,
|
|
15016
|
-
"closeBtn-position-right":
|
|
15067
|
+
"closeBtn-position-right": css`
|
|
15017
15068
|
bottom: ${size2[2]};
|
|
15018
15069
|
left: 0;
|
|
15019
15070
|
transform: translate(-100%, 0);
|
|
@@ -15036,7 +15087,7 @@ var init_Devtools = __esm({
|
|
|
15036
15087
|
transform: rotate(-90deg);
|
|
15037
15088
|
}
|
|
15038
15089
|
`,
|
|
15039
|
-
"closeBtn-position-left":
|
|
15090
|
+
"closeBtn-position-left": css`
|
|
15040
15091
|
bottom: ${size2[2]};
|
|
15041
15092
|
right: 0;
|
|
15042
15093
|
transform: translate(100%, 0);
|
|
@@ -15059,7 +15110,7 @@ var init_Devtools = __esm({
|
|
|
15059
15110
|
transform: rotate(90deg);
|
|
15060
15111
|
}
|
|
15061
15112
|
`,
|
|
15062
|
-
queriesContainer:
|
|
15113
|
+
queriesContainer: css`
|
|
15063
15114
|
flex: 1 1 700px;
|
|
15064
15115
|
background-color: ${t2(colors.gray[50], colors.darkGray[700])};
|
|
15065
15116
|
display: flex;
|
|
@@ -15068,7 +15119,7 @@ var init_Devtools = __esm({
|
|
|
15068
15119
|
font-family: ui-sans-serif, Inter, system-ui, sans-serif, sans-serif;
|
|
15069
15120
|
}
|
|
15070
15121
|
`,
|
|
15071
|
-
dragHandle:
|
|
15122
|
+
dragHandle: css`
|
|
15072
15123
|
position: absolute;
|
|
15073
15124
|
transition: background-color 0.125s ease;
|
|
15074
15125
|
&:hover {
|
|
@@ -15076,31 +15127,31 @@ var init_Devtools = __esm({
|
|
|
15076
15127
|
}
|
|
15077
15128
|
z-index: 4;
|
|
15078
15129
|
`,
|
|
15079
|
-
"dragHandle-position-top":
|
|
15130
|
+
"dragHandle-position-top": css`
|
|
15080
15131
|
bottom: 0;
|
|
15081
15132
|
width: 100%;
|
|
15082
15133
|
height: 3px;
|
|
15083
15134
|
cursor: ns-resize;
|
|
15084
15135
|
`,
|
|
15085
|
-
"dragHandle-position-bottom":
|
|
15136
|
+
"dragHandle-position-bottom": css`
|
|
15086
15137
|
top: 0;
|
|
15087
15138
|
width: 100%;
|
|
15088
15139
|
height: 3px;
|
|
15089
15140
|
cursor: ns-resize;
|
|
15090
15141
|
`,
|
|
15091
|
-
"dragHandle-position-right":
|
|
15142
|
+
"dragHandle-position-right": css`
|
|
15092
15143
|
left: 0;
|
|
15093
15144
|
width: 3px;
|
|
15094
15145
|
height: 100%;
|
|
15095
15146
|
cursor: ew-resize;
|
|
15096
15147
|
`,
|
|
15097
|
-
"dragHandle-position-left":
|
|
15148
|
+
"dragHandle-position-left": css`
|
|
15098
15149
|
right: 0;
|
|
15099
15150
|
width: 3px;
|
|
15100
15151
|
height: 100%;
|
|
15101
15152
|
cursor: ew-resize;
|
|
15102
15153
|
`,
|
|
15103
|
-
row:
|
|
15154
|
+
row: css`
|
|
15104
15155
|
display: flex;
|
|
15105
15156
|
justify-content: space-between;
|
|
15106
15157
|
align-items: center;
|
|
@@ -15117,12 +15168,12 @@ var init_Devtools = __esm({
|
|
|
15117
15168
|
flex-direction: column;
|
|
15118
15169
|
}
|
|
15119
15170
|
`,
|
|
15120
|
-
logoAndToggleContainer:
|
|
15171
|
+
logoAndToggleContainer: css`
|
|
15121
15172
|
display: flex;
|
|
15122
15173
|
gap: ${tokens.size[3]};
|
|
15123
15174
|
align-items: center;
|
|
15124
15175
|
`,
|
|
15125
|
-
logo:
|
|
15176
|
+
logo: css`
|
|
15126
15177
|
cursor: pointer;
|
|
15127
15178
|
display: flex;
|
|
15128
15179
|
flex-direction: column;
|
|
@@ -15139,14 +15190,14 @@ var init_Devtools = __esm({
|
|
|
15139
15190
|
outline: 2px solid ${colors.blue[800]};
|
|
15140
15191
|
}
|
|
15141
15192
|
`,
|
|
15142
|
-
tanstackLogo:
|
|
15193
|
+
tanstackLogo: css`
|
|
15143
15194
|
font-size: ${font.size.md};
|
|
15144
15195
|
font-weight: ${font.weight.bold};
|
|
15145
15196
|
line-height: ${font.lineHeight.xs};
|
|
15146
15197
|
white-space: nowrap;
|
|
15147
15198
|
color: ${t2(colors.gray[600], colors.gray[300])};
|
|
15148
15199
|
`,
|
|
15149
|
-
queryFlavorLogo:
|
|
15200
|
+
queryFlavorLogo: css`
|
|
15150
15201
|
font-weight: ${font.weight.semibold};
|
|
15151
15202
|
font-size: ${font.size.xs};
|
|
15152
15203
|
background: linear-gradient(
|
|
@@ -15159,12 +15210,12 @@ var init_Devtools = __esm({
|
|
|
15159
15210
|
-webkit-text-fill-color: transparent;
|
|
15160
15211
|
white-space: nowrap;
|
|
15161
15212
|
`,
|
|
15162
|
-
queryStatusContainer:
|
|
15213
|
+
queryStatusContainer: css`
|
|
15163
15214
|
display: flex;
|
|
15164
15215
|
gap: ${tokens.size[2]};
|
|
15165
15216
|
height: min-content;
|
|
15166
15217
|
`,
|
|
15167
|
-
queryStatusTag:
|
|
15218
|
+
queryStatusTag: css`
|
|
15168
15219
|
display: flex;
|
|
15169
15220
|
gap: ${tokens.size[1.5]};
|
|
15170
15221
|
box-sizing: border-box;
|
|
@@ -15185,10 +15236,10 @@ var init_Devtools = __esm({
|
|
|
15185
15236
|
outline: 2px solid ${colors.blue[800]};
|
|
15186
15237
|
}
|
|
15187
15238
|
`,
|
|
15188
|
-
queryStatusTagLabel:
|
|
15239
|
+
queryStatusTagLabel: css`
|
|
15189
15240
|
font-size: ${font.size.xs};
|
|
15190
15241
|
`,
|
|
15191
|
-
queryStatusCount:
|
|
15242
|
+
queryStatusCount: css`
|
|
15192
15243
|
font-size: ${font.size.xs};
|
|
15193
15244
|
padding: 0 5px;
|
|
15194
15245
|
display: flex;
|
|
@@ -15200,7 +15251,7 @@ var init_Devtools = __esm({
|
|
|
15200
15251
|
font-variant-numeric: tabular-nums;
|
|
15201
15252
|
height: ${tokens.size[4.5]};
|
|
15202
15253
|
`,
|
|
15203
|
-
statusTooltip:
|
|
15254
|
+
statusTooltip: css`
|
|
15204
15255
|
position: absolute;
|
|
15205
15256
|
z-index: 1;
|
|
15206
15257
|
background-color: ${t2(colors.gray[50], colors.darkGray[500])};
|
|
@@ -15240,7 +15291,7 @@ var init_Devtools = __esm({
|
|
|
15240
15291
|
border-width: 7px;
|
|
15241
15292
|
}
|
|
15242
15293
|
`,
|
|
15243
|
-
filtersContainer:
|
|
15294
|
+
filtersContainer: css`
|
|
15244
15295
|
display: flex;
|
|
15245
15296
|
gap: ${tokens.size[2]};
|
|
15246
15297
|
& > button {
|
|
@@ -15269,7 +15320,7 @@ var init_Devtools = __esm({
|
|
|
15269
15320
|
}
|
|
15270
15321
|
}
|
|
15271
15322
|
`,
|
|
15272
|
-
filterInput:
|
|
15323
|
+
filterInput: css`
|
|
15273
15324
|
padding: ${size2[0.5]} ${size2[2]};
|
|
15274
15325
|
border-radius: ${tokens.border.radius.sm};
|
|
15275
15326
|
background-color: ${t2(colors.gray[100], colors.darkGray[400])};
|
|
@@ -15308,7 +15359,7 @@ var init_Devtools = __esm({
|
|
|
15308
15359
|
outline: 2px solid ${colors.blue[800]};
|
|
15309
15360
|
}
|
|
15310
15361
|
`,
|
|
15311
|
-
filterSelect:
|
|
15362
|
+
filterSelect: css`
|
|
15312
15363
|
padding: ${tokens.size[0.5]} ${tokens.size[2]};
|
|
15313
15364
|
border-radius: ${tokens.border.radius.sm};
|
|
15314
15365
|
background-color: ${t2(colors.gray[100], colors.darkGray[400])};
|
|
@@ -15342,11 +15393,11 @@ var init_Devtools = __esm({
|
|
|
15342
15393
|
outline: 2px solid ${colors.blue[800]};
|
|
15343
15394
|
}
|
|
15344
15395
|
`,
|
|
15345
|
-
actionsContainer:
|
|
15396
|
+
actionsContainer: css`
|
|
15346
15397
|
display: flex;
|
|
15347
15398
|
gap: ${tokens.size[2]};
|
|
15348
15399
|
`,
|
|
15349
|
-
actionsBtn:
|
|
15400
|
+
actionsBtn: css`
|
|
15350
15401
|
border-radius: ${tokens.border.radius.sm};
|
|
15351
15402
|
background-color: ${t2(colors.gray[100], colors.darkGray[400])};
|
|
15352
15403
|
border: 1px solid ${t2(colors.gray[300], colors.darkGray[200])};
|
|
@@ -15373,13 +15424,13 @@ var init_Devtools = __esm({
|
|
|
15373
15424
|
outline: 2px solid ${colors.blue[800]};
|
|
15374
15425
|
}
|
|
15375
15426
|
`,
|
|
15376
|
-
actionsBtnOffline:
|
|
15427
|
+
actionsBtnOffline: css`
|
|
15377
15428
|
& svg {
|
|
15378
15429
|
stroke: ${t2(colors.yellow[700], colors.yellow[500])};
|
|
15379
15430
|
fill: ${t2(colors.yellow[700], colors.yellow[500])};
|
|
15380
15431
|
}
|
|
15381
15432
|
`,
|
|
15382
|
-
overflowQueryContainer:
|
|
15433
|
+
overflowQueryContainer: css`
|
|
15383
15434
|
flex: 1;
|
|
15384
15435
|
overflow-y: auto;
|
|
15385
15436
|
& > div {
|
|
@@ -15387,7 +15438,7 @@ var init_Devtools = __esm({
|
|
|
15387
15438
|
flex-direction: column;
|
|
15388
15439
|
}
|
|
15389
15440
|
`,
|
|
15390
|
-
queryRow:
|
|
15441
|
+
queryRow: css`
|
|
15391
15442
|
display: flex;
|
|
15392
15443
|
align-items: center;
|
|
15393
15444
|
padding: 0;
|
|
@@ -15449,10 +15500,10 @@ var init_Devtools = __esm({
|
|
|
15449
15500
|
font-size: ${font.size.xs};
|
|
15450
15501
|
}
|
|
15451
15502
|
`,
|
|
15452
|
-
selectedQueryRow:
|
|
15503
|
+
selectedQueryRow: css`
|
|
15453
15504
|
background-color: ${t2(colors.gray[200], colors.darkGray[500])};
|
|
15454
15505
|
`,
|
|
15455
|
-
detailsContainer:
|
|
15506
|
+
detailsContainer: css`
|
|
15456
15507
|
flex: 1 1 700px;
|
|
15457
15508
|
background-color: ${t2(colors.gray[50], colors.darkGray[700])};
|
|
15458
15509
|
color: ${t2(colors.gray[700], colors.gray[300])};
|
|
@@ -15463,7 +15514,7 @@ var init_Devtools = __esm({
|
|
|
15463
15514
|
display: flex;
|
|
15464
15515
|
text-align: left;
|
|
15465
15516
|
`,
|
|
15466
|
-
detailsHeader:
|
|
15517
|
+
detailsHeader: css`
|
|
15467
15518
|
font-family: ui-sans-serif, Inter, system-ui, sans-serif, sans-serif;
|
|
15468
15519
|
position: sticky;
|
|
15469
15520
|
top: 0;
|
|
@@ -15475,7 +15526,7 @@ var init_Devtools = __esm({
|
|
|
15475
15526
|
line-height: ${font.lineHeight.xs};
|
|
15476
15527
|
text-align: left;
|
|
15477
15528
|
`,
|
|
15478
|
-
detailsBody:
|
|
15529
|
+
detailsBody: css`
|
|
15479
15530
|
margin: ${tokens.size[1.5]} 0px ${tokens.size[2]} 0px;
|
|
15480
15531
|
& > div {
|
|
15481
15532
|
display: flex;
|
|
@@ -15509,13 +15560,13 @@ var init_Devtools = __esm({
|
|
|
15509
15560
|
align-items: center;
|
|
15510
15561
|
}
|
|
15511
15562
|
`,
|
|
15512
|
-
queryDetailsStatus:
|
|
15563
|
+
queryDetailsStatus: css`
|
|
15513
15564
|
border: 1px solid ${colors.darkGray[200]};
|
|
15514
15565
|
border-radius: ${tokens.border.radius.sm};
|
|
15515
15566
|
font-weight: ${font.weight.medium};
|
|
15516
15567
|
padding: ${tokens.size[1]} ${tokens.size[2.5]};
|
|
15517
15568
|
`,
|
|
15518
|
-
actionsBody:
|
|
15569
|
+
actionsBody: css`
|
|
15519
15570
|
flex-wrap: wrap;
|
|
15520
15571
|
margin: ${tokens.size[2]} 0px ${tokens.size[2]} 0px;
|
|
15521
15572
|
display: flex;
|
|
@@ -15555,7 +15606,7 @@ var init_Devtools = __esm({
|
|
|
15555
15606
|
}
|
|
15556
15607
|
}
|
|
15557
15608
|
`,
|
|
15558
|
-
actionsSelect:
|
|
15609
|
+
actionsSelect: css`
|
|
15559
15610
|
font-size: ${font.size.xs};
|
|
15560
15611
|
padding: ${tokens.size[0.5]} ${tokens.size[2]};
|
|
15561
15612
|
display: flex;
|
|
@@ -15604,7 +15655,7 @@ var init_Devtools = __esm({
|
|
|
15604
15655
|
height: ${tokens.size[2]};
|
|
15605
15656
|
}
|
|
15606
15657
|
`,
|
|
15607
|
-
settingsMenu:
|
|
15658
|
+
settingsMenu: css`
|
|
15608
15659
|
display: flex;
|
|
15609
15660
|
& * {
|
|
15610
15661
|
font-family: ui-sans-serif, Inter, system-ui, sans-serif, sans-serif;
|
|
@@ -15620,7 +15671,7 @@ var init_Devtools = __esm({
|
|
|
15620
15671
|
min-width: 120px;
|
|
15621
15672
|
padding: ${size2[0.5]};
|
|
15622
15673
|
`,
|
|
15623
|
-
settingsSubTrigger:
|
|
15674
|
+
settingsSubTrigger: css`
|
|
15624
15675
|
display: flex;
|
|
15625
15676
|
align-items: center;
|
|
15626
15677
|
justify-content: space-between;
|
|
@@ -15648,14 +15699,14 @@ var init_Devtools = __esm({
|
|
|
15648
15699
|
cursor: not-allowed;
|
|
15649
15700
|
}
|
|
15650
15701
|
`,
|
|
15651
|
-
settingsMenuHeader:
|
|
15702
|
+
settingsMenuHeader: css`
|
|
15652
15703
|
padding: ${tokens.size[1]} ${tokens.size[1]};
|
|
15653
15704
|
font-weight: ${font.weight.medium};
|
|
15654
15705
|
border-bottom: 1px solid ${t2(colors.gray[300], colors.darkGray[400])};
|
|
15655
15706
|
color: ${t2(colors.gray[500], colors.gray[400])};
|
|
15656
15707
|
font-size: ${font.size["xs"]};
|
|
15657
15708
|
`,
|
|
15658
|
-
settingsSubButton:
|
|
15709
|
+
settingsSubButton: css`
|
|
15659
15710
|
display: flex;
|
|
15660
15711
|
align-items: center;
|
|
15661
15712
|
justify-content: space-between;
|
|
@@ -15677,7 +15728,7 @@ var init_Devtools = __esm({
|
|
|
15677
15728
|
outline: 2px solid ${colors.blue[800]};
|
|
15678
15729
|
}
|
|
15679
15730
|
`,
|
|
15680
|
-
themeSelectedButton:
|
|
15731
|
+
themeSelectedButton: css`
|
|
15681
15732
|
background-color: ${t2(colors.purple[100], colors.purple[900])};
|
|
15682
15733
|
color: ${t2(colors.purple[700], colors.purple[300])};
|
|
15683
15734
|
& svg {
|
|
@@ -15687,7 +15738,7 @@ var init_Devtools = __esm({
|
|
|
15687
15738
|
background-color: ${t2(colors.purple[100], colors.purple[900])};
|
|
15688
15739
|
}
|
|
15689
15740
|
`,
|
|
15690
|
-
viewToggle:
|
|
15741
|
+
viewToggle: css`
|
|
15691
15742
|
border-radius: ${tokens.border.radius.sm};
|
|
15692
15743
|
background-color: ${t2(colors.gray[200], colors.darkGray[600])};
|
|
15693
15744
|
border: 1px solid ${t2(colors.gray[300], colors.darkGray[200])};
|
|
@@ -15739,8 +15790,8 @@ var init_Devtools = __esm({
|
|
|
15739
15790
|
`
|
|
15740
15791
|
};
|
|
15741
15792
|
};
|
|
15742
|
-
lightStyles2 = stylesFactory2("light");
|
|
15743
|
-
darkStyles2 = stylesFactory2("dark");
|
|
15793
|
+
lightStyles2 = (css) => stylesFactory2("light", css);
|
|
15794
|
+
darkStyles2 = (css) => stylesFactory2("dark", css);
|
|
15744
15795
|
delegateEvents(["click", "mousedown", "input"]);
|
|
15745
15796
|
}
|
|
15746
15797
|
});
|
|
@@ -15758,6 +15809,7 @@ exports.TanstackQueryDevtools = class TanstackQueryDevtools {
|
|
|
15758
15809
|
#version;
|
|
15759
15810
|
#isMounted = false;
|
|
15760
15811
|
#styleNonce;
|
|
15812
|
+
#shadowDOMTarget;
|
|
15761
15813
|
#buttonPosition;
|
|
15762
15814
|
#position;
|
|
15763
15815
|
#initialIsOpen;
|
|
@@ -15774,13 +15826,15 @@ exports.TanstackQueryDevtools = class TanstackQueryDevtools {
|
|
|
15774
15826
|
position,
|
|
15775
15827
|
initialIsOpen,
|
|
15776
15828
|
errorTypes,
|
|
15777
|
-
styleNonce
|
|
15829
|
+
styleNonce,
|
|
15830
|
+
shadowDOMTarget
|
|
15778
15831
|
} = config;
|
|
15779
15832
|
this.#client = createSignal(client);
|
|
15780
15833
|
this.#queryFlavor = queryFlavor;
|
|
15781
15834
|
this.#version = version;
|
|
15782
15835
|
this.#onlineManager = onlineManager;
|
|
15783
15836
|
this.#styleNonce = styleNonce;
|
|
15837
|
+
this.#shadowDOMTarget = shadowDOMTarget;
|
|
15784
15838
|
this.#buttonPosition = createSignal(buttonPosition);
|
|
15785
15839
|
this.#position = createSignal(position);
|
|
15786
15840
|
this.#initialIsOpen = createSignal(initialIsOpen);
|
|
@@ -15819,7 +15873,7 @@ exports.TanstackQueryDevtools = class TanstackQueryDevtools {
|
|
|
15819
15873
|
Devtools2 = lazy(() => Promise.resolve().then(() => (init_Devtools(), Devtools_exports)));
|
|
15820
15874
|
this.#Component = Devtools2;
|
|
15821
15875
|
}
|
|
15822
|
-
setupStyleSheet(this.#styleNonce);
|
|
15876
|
+
setupStyleSheet(this.#styleNonce, this.#shadowDOMTarget);
|
|
15823
15877
|
return createComponent(Devtools2, mergeProps({
|
|
15824
15878
|
get queryFlavor() {
|
|
15825
15879
|
return _self$.#queryFlavor;
|
|
@@ -15829,6 +15883,9 @@ exports.TanstackQueryDevtools = class TanstackQueryDevtools {
|
|
|
15829
15883
|
},
|
|
15830
15884
|
get onlineManager() {
|
|
15831
15885
|
return _self$.#onlineManager;
|
|
15886
|
+
},
|
|
15887
|
+
get shadowDOMTarget() {
|
|
15888
|
+
return _self$.#shadowDOMTarget;
|
|
15832
15889
|
}
|
|
15833
15890
|
}, {
|
|
15834
15891
|
get client() {
|