@tanstack/query-devtools 5.23.0 → 5.24.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 → 335X72D7.js} +17 -12
- package/build/Devtools/{6EDF3GZQ.jsx → 36BZFNWK.jsx} +26 -12
- package/build/Devtools/{T73WTYCS.jsx → VAXLBYTT.jsx} +26 -12
- package/build/Devtools/{QUGYIDRL.js → XYYT2JS6.js} +18 -11
- package/build/chunk/{O2PITFF6.js → 7LTSZCE6.js} +8 -2
- package/build/chunk/{PQZZ5Z2E.jsx → IQDKCOXE.jsx} +8 -0
- package/build/chunk/{XKKA3NOX.js → KQZGNKMT.js} +9 -1
- package/build/chunk/{AZNCIVVX.jsx → LJVATCV2.jsx} +8 -0
- package/build/dev.cjs +23 -10
- package/build/dev.js +2 -2
- package/build/dev.jsx +2 -2
- package/build/index.cjs +23 -10
- package/build/index.js +2 -2
- package/build/index.jsx +2 -2
- package/package.json +1 -1
- package/src/Devtools.tsx +33 -14
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createContext, delegateEvents, sortFns, mutationSortFns, createSignal, $PROXY, $TRACK, getListener, batch, getPreferredColorScheme, createMemo, createComponent, createEffect, onMount, onCleanup, Show, Portal, use, insert, createRenderEffect, className, on, setAttribute, getQueryStatusColor, getMutationStatusColor, getQueryStatusLabel, spread, mergeProps, getQueryStatusColorByLabel, displayValue, For, isServer, createUniqueId, useContext, Index, updateNestedDataByPath, template, convertRemToPixels, getSidedProp, untrack, useTransition, createRoot, splitProps, addEventListener, stringify, Switch, Match, deleteNestedDataByPath, Dynamic, children, createComputed, getOwner, DEV } from '../chunk/
|
|
1
|
+
import { createContext, delegateEvents, sortFns, mutationSortFns, createSignal, $PROXY, $TRACK, getListener, batch, getPreferredColorScheme, createMemo, createComponent, createEffect, onMount, onCleanup, Show, Portal, use, insert, createRenderEffect, className, on, setAttribute, getQueryStatusColor, getMutationStatusColor, getQueryStatusLabel, spread, mergeProps, getQueryStatusColorByLabel, displayValue, For, isServer, createUniqueId, useContext, Index, updateNestedDataByPath, template, convertRemToPixels, getSidedProp, untrack, useTransition, createRoot, splitProps, addEventListener, stringify, Switch, Match, deleteNestedDataByPath, clearDelegatedEvents, Dynamic, children, createComputed, getOwner, DEV } from '../chunk/7LTSZCE6.js';
|
|
2
2
|
|
|
3
3
|
// ../../node_modules/.pnpm/@tanstack+match-sorter-utils@8.11.8/node_modules/@tanstack/match-sorter-utils/build/lib/index.mjs
|
|
4
4
|
var characterMap = {
|
|
@@ -8903,7 +8903,6 @@ var CopyButton = (props) => {
|
|
|
8903
8903
|
setCopyState("NoCopy");
|
|
8904
8904
|
}, 1500);
|
|
8905
8905
|
}, (err) => {
|
|
8906
|
-
console.error("Failed to copy: ", err);
|
|
8907
8906
|
setCopyState("ErrorCopy");
|
|
8908
8907
|
setTimeout(() => {
|
|
8909
8908
|
setCopyState("NoCopy");
|
|
@@ -9552,13 +9551,17 @@ var PiPProvider = (props) => {
|
|
|
9552
9551
|
if (pipWindow() != null) {
|
|
9553
9552
|
return;
|
|
9554
9553
|
}
|
|
9555
|
-
const pip = window.open("", "", `width=${width},height=${height},popup`);
|
|
9554
|
+
const pip = window.open("", "TSQD-Devtools-Panel", `width=${width},height=${height},popup`);
|
|
9556
9555
|
if (!pip) {
|
|
9557
9556
|
throw new Error("Failed to open popup. Please allow popups for this site to view the devtools in picture-in-picture mode.");
|
|
9558
9557
|
}
|
|
9558
|
+
pip.document.head.innerHTML = "";
|
|
9559
|
+
pip.document.body.innerHTML = "";
|
|
9560
|
+
clearDelegatedEvents(pip.document);
|
|
9559
9561
|
pip.document.title = "TanStack Query Devtools";
|
|
9560
9562
|
pip.document.body.style.margin = "0";
|
|
9561
9563
|
pip.addEventListener("pagehide", () => {
|
|
9564
|
+
props.setLocalStore("pip_open", "false");
|
|
9562
9565
|
setPipWindow(null);
|
|
9563
9566
|
});
|
|
9564
9567
|
[...document.styleSheets].forEach((styleSheet) => {
|
|
@@ -9588,16 +9591,14 @@ var PiPProvider = (props) => {
|
|
|
9588
9591
|
}
|
|
9589
9592
|
});
|
|
9590
9593
|
delegateEvents(["focusin", "focusout", "pointermove", "keydown", "pointerdown", "pointerup", "click", "mousedown", "input"], pip.document);
|
|
9594
|
+
props.setLocalStore("pip_open", "true");
|
|
9591
9595
|
setPipWindow(pip);
|
|
9592
9596
|
};
|
|
9593
9597
|
createEffect(() => {
|
|
9594
|
-
const
|
|
9595
|
-
|
|
9596
|
-
|
|
9597
|
-
|
|
9598
|
-
onCleanup(() => {
|
|
9599
|
-
window.removeEventListener("beforeunload", closePipWindowOnUnload);
|
|
9600
|
-
});
|
|
9598
|
+
const pip_open = props.localStore.pip_open ?? "false";
|
|
9599
|
+
if (pip_open === "true") {
|
|
9600
|
+
requestPipWindow(Number(window.innerWidth), Number(props.localStore.height || DEFAULT_HEIGHT));
|
|
9601
|
+
}
|
|
9601
9602
|
});
|
|
9602
9603
|
createEffect(() => {
|
|
9603
9604
|
const gooberStyles = document.getElementById("_goober");
|
|
@@ -9659,6 +9660,8 @@ var DevtoolsComponent = (props) => {
|
|
|
9659
9660
|
value: props,
|
|
9660
9661
|
get children() {
|
|
9661
9662
|
return createComponent(PiPProvider, {
|
|
9663
|
+
localStore,
|
|
9664
|
+
setLocalStore,
|
|
9662
9665
|
get children() {
|
|
9663
9666
|
return createComponent(ThemeContext.Provider, {
|
|
9664
9667
|
value: theme,
|
|
@@ -9711,9 +9714,10 @@ var Devtools = (props) => {
|
|
|
9711
9714
|
window.removeEventListener("focus", onFocus);
|
|
9712
9715
|
});
|
|
9713
9716
|
});
|
|
9717
|
+
const pip_open = createMemo(() => props.localStore.pip_open ?? "false");
|
|
9714
9718
|
return [createComponent(Show, {
|
|
9715
9719
|
get when() {
|
|
9716
|
-
return pip().pipWindow;
|
|
9720
|
+
return createMemo(() => !!pip().pipWindow)() && pip_open() == "true";
|
|
9717
9721
|
},
|
|
9718
9722
|
get children() {
|
|
9719
9723
|
return createComponent(Portal, {
|
|
@@ -9745,7 +9749,7 @@ var Devtools = (props) => {
|
|
|
9745
9749
|
get children() {
|
|
9746
9750
|
return createComponent(Show, {
|
|
9747
9751
|
get when() {
|
|
9748
|
-
return createMemo(() => !!isOpen()
|
|
9752
|
+
return createMemo(() => !!(isOpen() && !pip().pipWindow))() && pip_open() == "false";
|
|
9749
9753
|
},
|
|
9750
9754
|
get children() {
|
|
9751
9755
|
return createComponent(DevtoolsPanel, {
|
|
@@ -9839,6 +9843,7 @@ var PiPPanel = (props) => {
|
|
|
9839
9843
|
};
|
|
9840
9844
|
if (win) {
|
|
9841
9845
|
win.addEventListener("resize", resizeCB);
|
|
9846
|
+
resizeCB();
|
|
9842
9847
|
}
|
|
9843
9848
|
onCleanup(() => {
|
|
9844
9849
|
if (win) {
|
|
@@ -11,6 +11,7 @@ import {
|
|
|
11
11
|
Switch,
|
|
12
12
|
batch,
|
|
13
13
|
children,
|
|
14
|
+
clearDelegatedEvents,
|
|
14
15
|
convertRemToPixels,
|
|
15
16
|
createComponent,
|
|
16
17
|
createComputed,
|
|
@@ -49,7 +50,7 @@ import {
|
|
|
49
50
|
use,
|
|
50
51
|
useContext,
|
|
51
52
|
useTransition
|
|
52
|
-
} from "../chunk/
|
|
53
|
+
} from "../chunk/LJVATCV2.jsx";
|
|
53
54
|
|
|
54
55
|
// ../../node_modules/.pnpm/@tanstack+match-sorter-utils@8.11.8/node_modules/@tanstack/match-sorter-utils/build/lib/index.mjs
|
|
55
56
|
var characterMap = {
|
|
@@ -10466,15 +10467,23 @@ var PiPProvider = (props) => {
|
|
|
10466
10467
|
if (pipWindow() != null) {
|
|
10467
10468
|
return;
|
|
10468
10469
|
}
|
|
10469
|
-
const pip = window.open(
|
|
10470
|
+
const pip = window.open(
|
|
10471
|
+
"",
|
|
10472
|
+
"TSQD-Devtools-Panel",
|
|
10473
|
+
`width=${width},height=${height},popup`
|
|
10474
|
+
);
|
|
10470
10475
|
if (!pip) {
|
|
10471
10476
|
throw new Error(
|
|
10472
10477
|
"Failed to open popup. Please allow popups for this site to view the devtools in picture-in-picture mode."
|
|
10473
10478
|
);
|
|
10474
10479
|
}
|
|
10480
|
+
pip.document.head.innerHTML = "";
|
|
10481
|
+
pip.document.body.innerHTML = "";
|
|
10482
|
+
clearDelegatedEvents(pip.document);
|
|
10475
10483
|
pip.document.title = "TanStack Query Devtools";
|
|
10476
10484
|
pip.document.body.style.margin = "0";
|
|
10477
10485
|
pip.addEventListener("pagehide", () => {
|
|
10486
|
+
props.setLocalStore("pip_open", "false");
|
|
10478
10487
|
setPipWindow(null);
|
|
10479
10488
|
});
|
|
10480
10489
|
[...document.styleSheets].forEach((styleSheet) => {
|
|
@@ -10517,16 +10526,17 @@ var PiPProvider = (props) => {
|
|
|
10517
10526
|
],
|
|
10518
10527
|
pip.document
|
|
10519
10528
|
);
|
|
10529
|
+
props.setLocalStore("pip_open", "true");
|
|
10520
10530
|
setPipWindow(pip);
|
|
10521
10531
|
};
|
|
10522
10532
|
createEffect(() => {
|
|
10523
|
-
const
|
|
10524
|
-
|
|
10525
|
-
|
|
10526
|
-
|
|
10527
|
-
|
|
10528
|
-
|
|
10529
|
-
}
|
|
10533
|
+
const pip_open = props.localStore.pip_open ?? "false";
|
|
10534
|
+
if (pip_open === "true") {
|
|
10535
|
+
requestPipWindow(
|
|
10536
|
+
Number(window.innerWidth),
|
|
10537
|
+
Number(props.localStore.height || DEFAULT_HEIGHT)
|
|
10538
|
+
);
|
|
10539
|
+
}
|
|
10530
10540
|
});
|
|
10531
10541
|
createEffect(() => {
|
|
10532
10542
|
const gooberStyles = document.getElementById("_goober");
|
|
@@ -10579,7 +10589,7 @@ var DevtoolsComponent = (props) => {
|
|
|
10579
10589
|
return preference;
|
|
10580
10590
|
return colorScheme();
|
|
10581
10591
|
});
|
|
10582
|
-
return <QueryDevtoolsContext.Provider value={props}><PiPProvider><ThemeContext.Provider value={theme}><Devtools localStore={localStore} setLocalStore={setLocalStore} /></ThemeContext.Provider></PiPProvider></QueryDevtoolsContext.Provider>;
|
|
10592
|
+
return <QueryDevtoolsContext.Provider value={props}><PiPProvider localStore={localStore} setLocalStore={setLocalStore}><ThemeContext.Provider value={theme}><Devtools localStore={localStore} setLocalStore={setLocalStore} /></ThemeContext.Provider></PiPProvider></QueryDevtoolsContext.Provider>;
|
|
10583
10593
|
};
|
|
10584
10594
|
var Devtools_default = DevtoolsComponent;
|
|
10585
10595
|
var Devtools = (props) => {
|
|
@@ -10624,8 +10634,11 @@ var Devtools = (props) => {
|
|
|
10624
10634
|
window.removeEventListener("focus", onFocus);
|
|
10625
10635
|
});
|
|
10626
10636
|
});
|
|
10637
|
+
const pip_open = createMemo(
|
|
10638
|
+
() => props.localStore.pip_open ?? "false"
|
|
10639
|
+
);
|
|
10627
10640
|
return <>
|
|
10628
|
-
<Show when={pip().pipWindow}><Portal mount={pip().pipWindow?.document.body}><PiPPanel><ContentView
|
|
10641
|
+
<Show when={pip().pipWindow && pip_open() == "true"}><Portal mount={pip().pipWindow?.document.body}><PiPPanel><ContentView
|
|
10629
10642
|
localStore={props.localStore}
|
|
10630
10643
|
setLocalStore={props.setLocalStore}
|
|
10631
10644
|
/></PiPPanel></Portal></Show>
|
|
@@ -10662,7 +10675,7 @@ var Devtools = (props) => {
|
|
|
10662
10675
|
)}
|
|
10663
10676
|
ref={transitionsContainerRef}
|
|
10664
10677
|
>
|
|
10665
|
-
<TransitionGroup name="tsqd-panel-transition"><Show when={isOpen() && !pip().pipWindow}><DevtoolsPanel
|
|
10678
|
+
<TransitionGroup name="tsqd-panel-transition"><Show when={isOpen() && !pip().pipWindow && pip_open() == "false"}><DevtoolsPanel
|
|
10666
10679
|
localStore={props.localStore}
|
|
10667
10680
|
setLocalStore={props.setLocalStore}
|
|
10668
10681
|
/></Show></TransitionGroup>
|
|
@@ -10712,6 +10725,7 @@ var PiPPanel = (props) => {
|
|
|
10712
10725
|
};
|
|
10713
10726
|
if (win) {
|
|
10714
10727
|
win.addEventListener("resize", resizeCB);
|
|
10728
|
+
resizeCB();
|
|
10715
10729
|
}
|
|
10716
10730
|
onCleanup(() => {
|
|
10717
10731
|
if (win) {
|
|
@@ -11,6 +11,7 @@ import {
|
|
|
11
11
|
Switch,
|
|
12
12
|
batch,
|
|
13
13
|
children,
|
|
14
|
+
clearDelegatedEvents,
|
|
14
15
|
convertRemToPixels,
|
|
15
16
|
createComponent,
|
|
16
17
|
createComputed,
|
|
@@ -49,7 +50,7 @@ import {
|
|
|
49
50
|
use,
|
|
50
51
|
useContext,
|
|
51
52
|
useTransition
|
|
52
|
-
} from "../chunk/
|
|
53
|
+
} from "../chunk/IQDKCOXE.jsx";
|
|
53
54
|
|
|
54
55
|
// ../../node_modules/.pnpm/@tanstack+match-sorter-utils@8.11.8/node_modules/@tanstack/match-sorter-utils/build/lib/index.mjs
|
|
55
56
|
var characterMap = {
|
|
@@ -10467,15 +10468,23 @@ var PiPProvider = (props) => {
|
|
|
10467
10468
|
if (pipWindow() != null) {
|
|
10468
10469
|
return;
|
|
10469
10470
|
}
|
|
10470
|
-
const pip = window.open(
|
|
10471
|
+
const pip = window.open(
|
|
10472
|
+
"",
|
|
10473
|
+
"TSQD-Devtools-Panel",
|
|
10474
|
+
`width=${width},height=${height},popup`
|
|
10475
|
+
);
|
|
10471
10476
|
if (!pip) {
|
|
10472
10477
|
throw new Error(
|
|
10473
10478
|
"Failed to open popup. Please allow popups for this site to view the devtools in picture-in-picture mode."
|
|
10474
10479
|
);
|
|
10475
10480
|
}
|
|
10481
|
+
pip.document.head.innerHTML = "";
|
|
10482
|
+
pip.document.body.innerHTML = "";
|
|
10483
|
+
clearDelegatedEvents(pip.document);
|
|
10476
10484
|
pip.document.title = "TanStack Query Devtools";
|
|
10477
10485
|
pip.document.body.style.margin = "0";
|
|
10478
10486
|
pip.addEventListener("pagehide", () => {
|
|
10487
|
+
props.setLocalStore("pip_open", "false");
|
|
10479
10488
|
setPipWindow(null);
|
|
10480
10489
|
});
|
|
10481
10490
|
[...document.styleSheets].forEach((styleSheet) => {
|
|
@@ -10518,16 +10527,17 @@ var PiPProvider = (props) => {
|
|
|
10518
10527
|
],
|
|
10519
10528
|
pip.document
|
|
10520
10529
|
);
|
|
10530
|
+
props.setLocalStore("pip_open", "true");
|
|
10521
10531
|
setPipWindow(pip);
|
|
10522
10532
|
};
|
|
10523
10533
|
createEffect(() => {
|
|
10524
|
-
const
|
|
10525
|
-
|
|
10526
|
-
|
|
10527
|
-
|
|
10528
|
-
|
|
10529
|
-
|
|
10530
|
-
}
|
|
10534
|
+
const pip_open = props.localStore.pip_open ?? "false";
|
|
10535
|
+
if (pip_open === "true") {
|
|
10536
|
+
requestPipWindow(
|
|
10537
|
+
Number(window.innerWidth),
|
|
10538
|
+
Number(props.localStore.height || DEFAULT_HEIGHT)
|
|
10539
|
+
);
|
|
10540
|
+
}
|
|
10531
10541
|
});
|
|
10532
10542
|
createEffect(() => {
|
|
10533
10543
|
const gooberStyles = document.getElementById("_goober");
|
|
@@ -10580,7 +10590,7 @@ var DevtoolsComponent = (props) => {
|
|
|
10580
10590
|
return preference;
|
|
10581
10591
|
return colorScheme();
|
|
10582
10592
|
});
|
|
10583
|
-
return <QueryDevtoolsContext.Provider value={props}><PiPProvider><ThemeContext.Provider value={theme}><Devtools localStore={localStore} setLocalStore={setLocalStore} /></ThemeContext.Provider></PiPProvider></QueryDevtoolsContext.Provider>;
|
|
10593
|
+
return <QueryDevtoolsContext.Provider value={props}><PiPProvider localStore={localStore} setLocalStore={setLocalStore}><ThemeContext.Provider value={theme}><Devtools localStore={localStore} setLocalStore={setLocalStore} /></ThemeContext.Provider></PiPProvider></QueryDevtoolsContext.Provider>;
|
|
10584
10594
|
};
|
|
10585
10595
|
var Devtools_default = DevtoolsComponent;
|
|
10586
10596
|
var Devtools = (props) => {
|
|
@@ -10625,8 +10635,11 @@ var Devtools = (props) => {
|
|
|
10625
10635
|
window.removeEventListener("focus", onFocus);
|
|
10626
10636
|
});
|
|
10627
10637
|
});
|
|
10638
|
+
const pip_open = createMemo(
|
|
10639
|
+
() => props.localStore.pip_open ?? "false"
|
|
10640
|
+
);
|
|
10628
10641
|
return <>
|
|
10629
|
-
<Show when={pip().pipWindow}><Portal mount={pip().pipWindow?.document.body}><PiPPanel><ContentView
|
|
10642
|
+
<Show when={pip().pipWindow && pip_open() == "true"}><Portal mount={pip().pipWindow?.document.body}><PiPPanel><ContentView
|
|
10630
10643
|
localStore={props.localStore}
|
|
10631
10644
|
setLocalStore={props.setLocalStore}
|
|
10632
10645
|
/></PiPPanel></Portal></Show>
|
|
@@ -10663,7 +10676,7 @@ var Devtools = (props) => {
|
|
|
10663
10676
|
)}
|
|
10664
10677
|
ref={transitionsContainerRef}
|
|
10665
10678
|
>
|
|
10666
|
-
<TransitionGroup name="tsqd-panel-transition"><Show when={isOpen() && !pip().pipWindow}><DevtoolsPanel
|
|
10679
|
+
<TransitionGroup name="tsqd-panel-transition"><Show when={isOpen() && !pip().pipWindow && pip_open() == "false"}><DevtoolsPanel
|
|
10667
10680
|
localStore={props.localStore}
|
|
10668
10681
|
setLocalStore={props.setLocalStore}
|
|
10669
10682
|
/></Show></TransitionGroup>
|
|
@@ -10713,6 +10726,7 @@ var PiPPanel = (props) => {
|
|
|
10713
10726
|
};
|
|
10714
10727
|
if (win) {
|
|
10715
10728
|
win.addEventListener("resize", resizeCB);
|
|
10729
|
+
resizeCB();
|
|
10716
10730
|
}
|
|
10717
10731
|
onCleanup(() => {
|
|
10718
10732
|
if (win) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createContext, delegateEvents, sortFns, mutationSortFns, createSignal, $PROXY, $TRACK, getListener, batch, getPreferredColorScheme, createMemo, createComponent, createEffect, onMount, onCleanup, Show, Portal, use, insert, createRenderEffect, className, on, setAttribute, getQueryStatusColor, getMutationStatusColor, getQueryStatusLabel, spread, mergeProps, getQueryStatusColorByLabel, displayValue, For, isServer, createUniqueId, useContext, Index, updateNestedDataByPath, template, convertRemToPixels, getSidedProp, untrack, useTransition, createRoot, splitProps, addEventListener, stringify, Switch, Match, deleteNestedDataByPath, Dynamic, children, createComputed, getOwner, DEV } from '../chunk/
|
|
1
|
+
import { createContext, delegateEvents, sortFns, mutationSortFns, createSignal, $PROXY, $TRACK, getListener, batch, getPreferredColorScheme, createMemo, createComponent, createEffect, onMount, onCleanup, Show, Portal, use, insert, createRenderEffect, className, on, setAttribute, getQueryStatusColor, getMutationStatusColor, getQueryStatusLabel, spread, mergeProps, getQueryStatusColorByLabel, displayValue, For, isServer, createUniqueId, useContext, Index, updateNestedDataByPath, template, convertRemToPixels, getSidedProp, untrack, useTransition, createRoot, splitProps, addEventListener, stringify, Switch, Match, deleteNestedDataByPath, clearDelegatedEvents, Dynamic, children, createComputed, getOwner, DEV } from '../chunk/KQZGNKMT.js';
|
|
2
2
|
|
|
3
3
|
// ../../node_modules/.pnpm/@tanstack+match-sorter-utils@8.11.8/node_modules/@tanstack/match-sorter-utils/build/lib/index.mjs
|
|
4
4
|
var characterMap = {
|
|
@@ -8903,6 +8903,7 @@ var CopyButton = (props) => {
|
|
|
8903
8903
|
setCopyState("NoCopy");
|
|
8904
8904
|
}, 1500);
|
|
8905
8905
|
}, (err) => {
|
|
8906
|
+
console.error("Failed to copy: ", err);
|
|
8906
8907
|
setCopyState("ErrorCopy");
|
|
8907
8908
|
setTimeout(() => {
|
|
8908
8909
|
setCopyState("NoCopy");
|
|
@@ -9551,13 +9552,17 @@ var PiPProvider = (props) => {
|
|
|
9551
9552
|
if (pipWindow() != null) {
|
|
9552
9553
|
return;
|
|
9553
9554
|
}
|
|
9554
|
-
const pip = window.open("", "", `width=${width},height=${height},popup`);
|
|
9555
|
+
const pip = window.open("", "TSQD-Devtools-Panel", `width=${width},height=${height},popup`);
|
|
9555
9556
|
if (!pip) {
|
|
9556
9557
|
throw new Error("Failed to open popup. Please allow popups for this site to view the devtools in picture-in-picture mode.");
|
|
9557
9558
|
}
|
|
9559
|
+
pip.document.head.innerHTML = "";
|
|
9560
|
+
pip.document.body.innerHTML = "";
|
|
9561
|
+
clearDelegatedEvents(pip.document);
|
|
9558
9562
|
pip.document.title = "TanStack Query Devtools";
|
|
9559
9563
|
pip.document.body.style.margin = "0";
|
|
9560
9564
|
pip.addEventListener("pagehide", () => {
|
|
9565
|
+
props.setLocalStore("pip_open", "false");
|
|
9561
9566
|
setPipWindow(null);
|
|
9562
9567
|
});
|
|
9563
9568
|
[...document.styleSheets].forEach((styleSheet) => {
|
|
@@ -9587,16 +9592,14 @@ var PiPProvider = (props) => {
|
|
|
9587
9592
|
}
|
|
9588
9593
|
});
|
|
9589
9594
|
delegateEvents(["focusin", "focusout", "pointermove", "keydown", "pointerdown", "pointerup", "click", "mousedown", "input"], pip.document);
|
|
9595
|
+
props.setLocalStore("pip_open", "true");
|
|
9590
9596
|
setPipWindow(pip);
|
|
9591
9597
|
};
|
|
9592
9598
|
createEffect(() => {
|
|
9593
|
-
const
|
|
9594
|
-
|
|
9595
|
-
|
|
9596
|
-
|
|
9597
|
-
onCleanup(() => {
|
|
9598
|
-
window.removeEventListener("beforeunload", closePipWindowOnUnload);
|
|
9599
|
-
});
|
|
9599
|
+
const pip_open = props.localStore.pip_open ?? "false";
|
|
9600
|
+
if (pip_open === "true") {
|
|
9601
|
+
requestPipWindow(Number(window.innerWidth), Number(props.localStore.height || DEFAULT_HEIGHT));
|
|
9602
|
+
}
|
|
9600
9603
|
});
|
|
9601
9604
|
createEffect(() => {
|
|
9602
9605
|
const gooberStyles = document.getElementById("_goober");
|
|
@@ -9658,6 +9661,8 @@ var DevtoolsComponent = (props) => {
|
|
|
9658
9661
|
value: props,
|
|
9659
9662
|
get children() {
|
|
9660
9663
|
return createComponent(PiPProvider, {
|
|
9664
|
+
localStore,
|
|
9665
|
+
setLocalStore,
|
|
9661
9666
|
get children() {
|
|
9662
9667
|
return createComponent(ThemeContext.Provider, {
|
|
9663
9668
|
value: theme,
|
|
@@ -9710,9 +9715,10 @@ var Devtools = (props) => {
|
|
|
9710
9715
|
window.removeEventListener("focus", onFocus);
|
|
9711
9716
|
});
|
|
9712
9717
|
});
|
|
9718
|
+
const pip_open = createMemo(() => props.localStore.pip_open ?? "false");
|
|
9713
9719
|
return [createComponent(Show, {
|
|
9714
9720
|
get when() {
|
|
9715
|
-
return pip().pipWindow;
|
|
9721
|
+
return createMemo(() => !!pip().pipWindow)() && pip_open() == "true";
|
|
9716
9722
|
},
|
|
9717
9723
|
get children() {
|
|
9718
9724
|
return createComponent(Portal, {
|
|
@@ -9744,7 +9750,7 @@ var Devtools = (props) => {
|
|
|
9744
9750
|
get children() {
|
|
9745
9751
|
return createComponent(Show, {
|
|
9746
9752
|
get when() {
|
|
9747
|
-
return createMemo(() => !!isOpen()
|
|
9753
|
+
return createMemo(() => !!(isOpen() && !pip().pipWindow))() && pip_open() == "false";
|
|
9748
9754
|
},
|
|
9749
9755
|
get children() {
|
|
9750
9756
|
return createComponent(DevtoolsPanel, {
|
|
@@ -9838,6 +9844,7 @@ var PiPPanel = (props) => {
|
|
|
9838
9844
|
};
|
|
9839
9845
|
if (win) {
|
|
9840
9846
|
win.addEventListener("resize", resizeCB);
|
|
9847
|
+
resizeCB();
|
|
9841
9848
|
}
|
|
9842
9849
|
onCleanup(() => {
|
|
9843
9850
|
if (win) {
|
|
@@ -1491,6 +1491,13 @@ function delegateEvents(eventNames, document2 = window.document) {
|
|
|
1491
1491
|
}
|
|
1492
1492
|
}
|
|
1493
1493
|
}
|
|
1494
|
+
function clearDelegatedEvents(document2 = window.document) {
|
|
1495
|
+
if (document2[$$EVENTS]) {
|
|
1496
|
+
for (let name of document2[$$EVENTS].keys())
|
|
1497
|
+
document2.removeEventListener(name, eventHandler);
|
|
1498
|
+
delete document2[$$EVENTS];
|
|
1499
|
+
}
|
|
1500
|
+
}
|
|
1494
1501
|
function setAttribute(node, name, value) {
|
|
1495
1502
|
if (sharedConfig.context)
|
|
1496
1503
|
return;
|
|
@@ -2276,7 +2283,6 @@ var simpleRules = [
|
|
|
2276
2283
|
if (typeof BigInt !== "undefined") {
|
|
2277
2284
|
return BigInt(v);
|
|
2278
2285
|
}
|
|
2279
|
-
console.error("Please add a BigInt polyfill.");
|
|
2280
2286
|
return v;
|
|
2281
2287
|
}),
|
|
2282
2288
|
simpleTransformation(isDate, "Date", function(v) {
|
|
@@ -3130,4 +3136,4 @@ var setupStyleSheet = (nonce) => {
|
|
|
3130
3136
|
document.head.appendChild(styleTag);
|
|
3131
3137
|
};
|
|
3132
3138
|
|
|
3133
|
-
export { $PROXY, $TRACK, DEV, Dynamic, For, Index, Match, Portal, Show, Switch, addEventListener, batch, children, className, convertRemToPixels, createComponent, createComputed, createContext, createEffect, createMemo, createRenderEffect, createRoot, createSignal, createUniqueId, delegateEvents, deleteNestedDataByPath, displayValue, getListener, getMutationStatusColor, getOwner, getPreferredColorScheme, getQueryStatusColor, getQueryStatusColorByLabel, getQueryStatusLabel, getSidedProp, insert, isServer, lazy, mergeProps, mutationSortFns, on, onCleanup, onMount, render, setAttribute, setupStyleSheet, sortFns, splitProps, spread, stringify, template, untrack, updateNestedDataByPath, use, useContext, useTransition };
|
|
3139
|
+
export { $PROXY, $TRACK, DEV, Dynamic, For, Index, Match, Portal, Show, Switch, addEventListener, batch, children, className, clearDelegatedEvents, convertRemToPixels, createComponent, createComputed, createContext, createEffect, createMemo, createRenderEffect, createRoot, createSignal, createUniqueId, delegateEvents, deleteNestedDataByPath, displayValue, getListener, getMutationStatusColor, getOwner, getPreferredColorScheme, getQueryStatusColor, getQueryStatusColorByLabel, getQueryStatusLabel, getSidedProp, insert, isServer, lazy, mergeProps, mutationSortFns, on, onCleanup, onMount, render, setAttribute, setupStyleSheet, sortFns, splitProps, spread, stringify, template, untrack, updateNestedDataByPath, use, useContext, useTransition };
|
|
@@ -1493,6 +1493,13 @@ function delegateEvents(eventNames, document2 = window.document) {
|
|
|
1493
1493
|
}
|
|
1494
1494
|
}
|
|
1495
1495
|
}
|
|
1496
|
+
function clearDelegatedEvents(document2 = window.document) {
|
|
1497
|
+
if (document2[$$EVENTS]) {
|
|
1498
|
+
for (let name of document2[$$EVENTS].keys())
|
|
1499
|
+
document2.removeEventListener(name, eventHandler);
|
|
1500
|
+
delete document2[$$EVENTS];
|
|
1501
|
+
}
|
|
1502
|
+
}
|
|
1496
1503
|
function setAttribute(node, name, value) {
|
|
1497
1504
|
if (sharedConfig.context)
|
|
1498
1505
|
return;
|
|
@@ -3175,6 +3182,7 @@ export {
|
|
|
3175
3182
|
render,
|
|
3176
3183
|
template,
|
|
3177
3184
|
delegateEvents,
|
|
3185
|
+
clearDelegatedEvents,
|
|
3178
3186
|
setAttribute,
|
|
3179
3187
|
spread,
|
|
3180
3188
|
use,
|
|
@@ -1491,6 +1491,13 @@ function delegateEvents(eventNames, document2 = window.document) {
|
|
|
1491
1491
|
}
|
|
1492
1492
|
}
|
|
1493
1493
|
}
|
|
1494
|
+
function clearDelegatedEvents(document2 = window.document) {
|
|
1495
|
+
if (document2[$$EVENTS]) {
|
|
1496
|
+
for (let name of document2[$$EVENTS].keys())
|
|
1497
|
+
document2.removeEventListener(name, eventHandler);
|
|
1498
|
+
delete document2[$$EVENTS];
|
|
1499
|
+
}
|
|
1500
|
+
}
|
|
1494
1501
|
function setAttribute(node, name, value) {
|
|
1495
1502
|
if (sharedConfig.context)
|
|
1496
1503
|
return;
|
|
@@ -2276,6 +2283,7 @@ var simpleRules = [
|
|
|
2276
2283
|
if (typeof BigInt !== "undefined") {
|
|
2277
2284
|
return BigInt(v);
|
|
2278
2285
|
}
|
|
2286
|
+
console.error("Please add a BigInt polyfill.");
|
|
2279
2287
|
return v;
|
|
2280
2288
|
}),
|
|
2281
2289
|
simpleTransformation(isDate, "Date", function(v) {
|
|
@@ -3129,4 +3137,4 @@ var setupStyleSheet = (nonce) => {
|
|
|
3129
3137
|
document.head.appendChild(styleTag);
|
|
3130
3138
|
};
|
|
3131
3139
|
|
|
3132
|
-
export { $PROXY, $TRACK, DEV, Dynamic, For, Index, Match, Portal, Show, Switch, addEventListener, batch, children, className, convertRemToPixels, createComponent, createComputed, createContext, createEffect, createMemo, createRenderEffect, createRoot, createSignal, createUniqueId, delegateEvents, deleteNestedDataByPath, displayValue, getListener, getMutationStatusColor, getOwner, getPreferredColorScheme, getQueryStatusColor, getQueryStatusColorByLabel, getQueryStatusLabel, getSidedProp, insert, isServer, lazy, mergeProps, mutationSortFns, on, onCleanup, onMount, render, setAttribute, setupStyleSheet, sortFns, splitProps, spread, stringify, template, untrack, updateNestedDataByPath, use, useContext, useTransition };
|
|
3140
|
+
export { $PROXY, $TRACK, DEV, Dynamic, For, Index, Match, Portal, Show, Switch, addEventListener, batch, children, className, clearDelegatedEvents, convertRemToPixels, createComponent, createComputed, createContext, createEffect, createMemo, createRenderEffect, createRoot, createSignal, createUniqueId, delegateEvents, deleteNestedDataByPath, displayValue, getListener, getMutationStatusColor, getOwner, getPreferredColorScheme, getQueryStatusColor, getQueryStatusColorByLabel, getQueryStatusLabel, getSidedProp, insert, isServer, lazy, mergeProps, mutationSortFns, on, onCleanup, onMount, render, setAttribute, setupStyleSheet, sortFns, splitProps, spread, stringify, template, untrack, updateNestedDataByPath, use, useContext, useTransition };
|
|
@@ -1493,6 +1493,13 @@ function delegateEvents(eventNames, document2 = window.document) {
|
|
|
1493
1493
|
}
|
|
1494
1494
|
}
|
|
1495
1495
|
}
|
|
1496
|
+
function clearDelegatedEvents(document2 = window.document) {
|
|
1497
|
+
if (document2[$$EVENTS]) {
|
|
1498
|
+
for (let name of document2[$$EVENTS].keys())
|
|
1499
|
+
document2.removeEventListener(name, eventHandler);
|
|
1500
|
+
delete document2[$$EVENTS];
|
|
1501
|
+
}
|
|
1502
|
+
}
|
|
1496
1503
|
function setAttribute(node, name, value) {
|
|
1497
1504
|
if (sharedConfig.context)
|
|
1498
1505
|
return;
|
|
@@ -3174,6 +3181,7 @@ export {
|
|
|
3174
3181
|
render,
|
|
3175
3182
|
template,
|
|
3176
3183
|
delegateEvents,
|
|
3184
|
+
clearDelegatedEvents,
|
|
3177
3185
|
setAttribute,
|
|
3178
3186
|
spread,
|
|
3179
3187
|
use,
|
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;
|
|
@@ -12970,13 +12977,17 @@ var init_Devtools = __esm({
|
|
|
12970
12977
|
if (pipWindow() != null) {
|
|
12971
12978
|
return;
|
|
12972
12979
|
}
|
|
12973
|
-
const pip = window.open("", "", `width=${width},height=${height},popup`);
|
|
12980
|
+
const pip = window.open("", "TSQD-Devtools-Panel", `width=${width},height=${height},popup`);
|
|
12974
12981
|
if (!pip) {
|
|
12975
12982
|
throw new Error("Failed to open popup. Please allow popups for this site to view the devtools in picture-in-picture mode.");
|
|
12976
12983
|
}
|
|
12984
|
+
pip.document.head.innerHTML = "";
|
|
12985
|
+
pip.document.body.innerHTML = "";
|
|
12986
|
+
clearDelegatedEvents(pip.document);
|
|
12977
12987
|
pip.document.title = "TanStack Query Devtools";
|
|
12978
12988
|
pip.document.body.style.margin = "0";
|
|
12979
12989
|
pip.addEventListener("pagehide", () => {
|
|
12990
|
+
props.setLocalStore("pip_open", "false");
|
|
12980
12991
|
setPipWindow(null);
|
|
12981
12992
|
});
|
|
12982
12993
|
[...document.styleSheets].forEach((styleSheet) => {
|
|
@@ -13006,16 +13017,14 @@ var init_Devtools = __esm({
|
|
|
13006
13017
|
}
|
|
13007
13018
|
});
|
|
13008
13019
|
delegateEvents(["focusin", "focusout", "pointermove", "keydown", "pointerdown", "pointerup", "click", "mousedown", "input"], pip.document);
|
|
13020
|
+
props.setLocalStore("pip_open", "true");
|
|
13009
13021
|
setPipWindow(pip);
|
|
13010
13022
|
};
|
|
13011
13023
|
createEffect(() => {
|
|
13012
|
-
const
|
|
13013
|
-
|
|
13014
|
-
|
|
13015
|
-
|
|
13016
|
-
onCleanup(() => {
|
|
13017
|
-
window.removeEventListener("beforeunload", closePipWindowOnUnload);
|
|
13018
|
-
});
|
|
13024
|
+
const pip_open = props.localStore.pip_open ?? "false";
|
|
13025
|
+
if (pip_open === "true") {
|
|
13026
|
+
requestPipWindow(Number(window.innerWidth), Number(props.localStore.height || DEFAULT_HEIGHT));
|
|
13027
|
+
}
|
|
13019
13028
|
});
|
|
13020
13029
|
createEffect(() => {
|
|
13021
13030
|
const gooberStyles = document.getElementById("_goober");
|
|
@@ -13077,6 +13086,8 @@ var init_Devtools = __esm({
|
|
|
13077
13086
|
value: props,
|
|
13078
13087
|
get children() {
|
|
13079
13088
|
return createComponent(PiPProvider, {
|
|
13089
|
+
localStore,
|
|
13090
|
+
setLocalStore,
|
|
13080
13091
|
get children() {
|
|
13081
13092
|
return createComponent(ThemeContext.Provider, {
|
|
13082
13093
|
value: theme,
|
|
@@ -13129,9 +13140,10 @@ var init_Devtools = __esm({
|
|
|
13129
13140
|
window.removeEventListener("focus", onFocus);
|
|
13130
13141
|
});
|
|
13131
13142
|
});
|
|
13143
|
+
const pip_open = createMemo(() => props.localStore.pip_open ?? "false");
|
|
13132
13144
|
return [createComponent(Show, {
|
|
13133
13145
|
get when() {
|
|
13134
|
-
return pip().pipWindow;
|
|
13146
|
+
return createMemo(() => !!pip().pipWindow)() && pip_open() == "true";
|
|
13135
13147
|
},
|
|
13136
13148
|
get children() {
|
|
13137
13149
|
return createComponent(Portal, {
|
|
@@ -13163,7 +13175,7 @@ var init_Devtools = __esm({
|
|
|
13163
13175
|
get children() {
|
|
13164
13176
|
return createComponent(Show, {
|
|
13165
13177
|
get when() {
|
|
13166
|
-
return createMemo(() => !!isOpen()
|
|
13178
|
+
return createMemo(() => !!(isOpen() && !pip().pipWindow))() && pip_open() == "false";
|
|
13167
13179
|
},
|
|
13168
13180
|
get children() {
|
|
13169
13181
|
return createComponent(DevtoolsPanel, {
|
|
@@ -13257,6 +13269,7 @@ var init_Devtools = __esm({
|
|
|
13257
13269
|
};
|
|
13258
13270
|
if (win) {
|
|
13259
13271
|
win.addEventListener("resize", resizeCB);
|
|
13272
|
+
resizeCB();
|
|
13260
13273
|
}
|
|
13261
13274
|
onCleanup(() => {
|
|
13262
13275
|
if (win) {
|
package/build/dev.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createSignal, render, lazy, setupStyleSheet, createComponent, mergeProps } from './chunk/
|
|
1
|
+
import { createSignal, render, lazy, setupStyleSheet, createComponent, mergeProps } from './chunk/KQZGNKMT.js';
|
|
2
2
|
|
|
3
3
|
// src/index.tsx
|
|
4
4
|
var TanstackQueryDevtools = class {
|
|
@@ -66,7 +66,7 @@ var TanstackQueryDevtools = class {
|
|
|
66
66
|
if (this.#Component) {
|
|
67
67
|
Devtools = this.#Component;
|
|
68
68
|
} else {
|
|
69
|
-
Devtools = lazy(() => import('./Devtools/
|
|
69
|
+
Devtools = lazy(() => import('./Devtools/XYYT2JS6.js'));
|
|
70
70
|
this.#Component = Devtools;
|
|
71
71
|
}
|
|
72
72
|
setupStyleSheet(this.#styleNonce);
|
package/build/dev.jsx
CHANGED
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
lazy,
|
|
4
4
|
render,
|
|
5
5
|
setupStyleSheet
|
|
6
|
-
} from "./chunk/
|
|
6
|
+
} from "./chunk/IQDKCOXE.jsx";
|
|
7
7
|
|
|
8
8
|
// src/index.tsx
|
|
9
9
|
var TanstackQueryDevtools = class {
|
|
@@ -70,7 +70,7 @@ var TanstackQueryDevtools = class {
|
|
|
70
70
|
if (this.#Component) {
|
|
71
71
|
Devtools = this.#Component;
|
|
72
72
|
} else {
|
|
73
|
-
Devtools = lazy(() => import("./Devtools/
|
|
73
|
+
Devtools = lazy(() => import("./Devtools/VAXLBYTT.jsx"));
|
|
74
74
|
this.#Component = Devtools;
|
|
75
75
|
}
|
|
76
76
|
setupStyleSheet(this.#styleNonce);
|
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;
|
|
@@ -12968,13 +12975,17 @@ var init_Devtools = __esm({
|
|
|
12968
12975
|
if (pipWindow() != null) {
|
|
12969
12976
|
return;
|
|
12970
12977
|
}
|
|
12971
|
-
const pip = window.open("", "", `width=${width},height=${height},popup`);
|
|
12978
|
+
const pip = window.open("", "TSQD-Devtools-Panel", `width=${width},height=${height},popup`);
|
|
12972
12979
|
if (!pip) {
|
|
12973
12980
|
throw new Error("Failed to open popup. Please allow popups for this site to view the devtools in picture-in-picture mode.");
|
|
12974
12981
|
}
|
|
12982
|
+
pip.document.head.innerHTML = "";
|
|
12983
|
+
pip.document.body.innerHTML = "";
|
|
12984
|
+
clearDelegatedEvents(pip.document);
|
|
12975
12985
|
pip.document.title = "TanStack Query Devtools";
|
|
12976
12986
|
pip.document.body.style.margin = "0";
|
|
12977
12987
|
pip.addEventListener("pagehide", () => {
|
|
12988
|
+
props.setLocalStore("pip_open", "false");
|
|
12978
12989
|
setPipWindow(null);
|
|
12979
12990
|
});
|
|
12980
12991
|
[...document.styleSheets].forEach((styleSheet) => {
|
|
@@ -13004,16 +13015,14 @@ var init_Devtools = __esm({
|
|
|
13004
13015
|
}
|
|
13005
13016
|
});
|
|
13006
13017
|
delegateEvents(["focusin", "focusout", "pointermove", "keydown", "pointerdown", "pointerup", "click", "mousedown", "input"], pip.document);
|
|
13018
|
+
props.setLocalStore("pip_open", "true");
|
|
13007
13019
|
setPipWindow(pip);
|
|
13008
13020
|
};
|
|
13009
13021
|
createEffect(() => {
|
|
13010
|
-
const
|
|
13011
|
-
|
|
13012
|
-
|
|
13013
|
-
|
|
13014
|
-
onCleanup(() => {
|
|
13015
|
-
window.removeEventListener("beforeunload", closePipWindowOnUnload);
|
|
13016
|
-
});
|
|
13022
|
+
const pip_open = props.localStore.pip_open ?? "false";
|
|
13023
|
+
if (pip_open === "true") {
|
|
13024
|
+
requestPipWindow(Number(window.innerWidth), Number(props.localStore.height || DEFAULT_HEIGHT));
|
|
13025
|
+
}
|
|
13017
13026
|
});
|
|
13018
13027
|
createEffect(() => {
|
|
13019
13028
|
const gooberStyles = document.getElementById("_goober");
|
|
@@ -13075,6 +13084,8 @@ var init_Devtools = __esm({
|
|
|
13075
13084
|
value: props,
|
|
13076
13085
|
get children() {
|
|
13077
13086
|
return createComponent(PiPProvider, {
|
|
13087
|
+
localStore,
|
|
13088
|
+
setLocalStore,
|
|
13078
13089
|
get children() {
|
|
13079
13090
|
return createComponent(ThemeContext.Provider, {
|
|
13080
13091
|
value: theme,
|
|
@@ -13127,9 +13138,10 @@ var init_Devtools = __esm({
|
|
|
13127
13138
|
window.removeEventListener("focus", onFocus);
|
|
13128
13139
|
});
|
|
13129
13140
|
});
|
|
13141
|
+
const pip_open = createMemo(() => props.localStore.pip_open ?? "false");
|
|
13130
13142
|
return [createComponent(Show, {
|
|
13131
13143
|
get when() {
|
|
13132
|
-
return pip().pipWindow;
|
|
13144
|
+
return createMemo(() => !!pip().pipWindow)() && pip_open() == "true";
|
|
13133
13145
|
},
|
|
13134
13146
|
get children() {
|
|
13135
13147
|
return createComponent(Portal, {
|
|
@@ -13161,7 +13173,7 @@ var init_Devtools = __esm({
|
|
|
13161
13173
|
get children() {
|
|
13162
13174
|
return createComponent(Show, {
|
|
13163
13175
|
get when() {
|
|
13164
|
-
return createMemo(() => !!isOpen()
|
|
13176
|
+
return createMemo(() => !!(isOpen() && !pip().pipWindow))() && pip_open() == "false";
|
|
13165
13177
|
},
|
|
13166
13178
|
get children() {
|
|
13167
13179
|
return createComponent(DevtoolsPanel, {
|
|
@@ -13255,6 +13267,7 @@ var init_Devtools = __esm({
|
|
|
13255
13267
|
};
|
|
13256
13268
|
if (win) {
|
|
13257
13269
|
win.addEventListener("resize", resizeCB);
|
|
13270
|
+
resizeCB();
|
|
13258
13271
|
}
|
|
13259
13272
|
onCleanup(() => {
|
|
13260
13273
|
if (win) {
|
package/build/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createSignal, render, lazy, setupStyleSheet, createComponent, mergeProps } from './chunk/
|
|
1
|
+
import { createSignal, render, lazy, setupStyleSheet, createComponent, mergeProps } from './chunk/7LTSZCE6.js';
|
|
2
2
|
|
|
3
3
|
// src/index.tsx
|
|
4
4
|
var TanstackQueryDevtools = class {
|
|
@@ -66,7 +66,7 @@ var TanstackQueryDevtools = class {
|
|
|
66
66
|
if (this.#Component) {
|
|
67
67
|
Devtools = this.#Component;
|
|
68
68
|
} else {
|
|
69
|
-
Devtools = lazy(() => import('./Devtools/
|
|
69
|
+
Devtools = lazy(() => import('./Devtools/335X72D7.js'));
|
|
70
70
|
this.#Component = Devtools;
|
|
71
71
|
}
|
|
72
72
|
setupStyleSheet(this.#styleNonce);
|
package/build/index.jsx
CHANGED
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
lazy,
|
|
4
4
|
render,
|
|
5
5
|
setupStyleSheet
|
|
6
|
-
} from "./chunk/
|
|
6
|
+
} from "./chunk/LJVATCV2.jsx";
|
|
7
7
|
|
|
8
8
|
// src/index.tsx
|
|
9
9
|
var TanstackQueryDevtools = class {
|
|
@@ -70,7 +70,7 @@ var TanstackQueryDevtools = class {
|
|
|
70
70
|
if (this.#Component) {
|
|
71
71
|
Devtools = this.#Component;
|
|
72
72
|
} else {
|
|
73
|
-
Devtools = lazy(() => import("./Devtools/
|
|
73
|
+
Devtools = lazy(() => import("./Devtools/36BZFNWK.jsx"));
|
|
74
74
|
this.#Component = Devtools;
|
|
75
75
|
}
|
|
76
76
|
setupStyleSheet(this.#styleNonce);
|
package/package.json
CHANGED
package/src/Devtools.tsx
CHANGED
|
@@ -19,7 +19,7 @@ import { Key } from '@solid-primitives/keyed'
|
|
|
19
19
|
import { createLocalStorage } from '@solid-primitives/storage'
|
|
20
20
|
import { createResizeObserver } from '@solid-primitives/resize-observer'
|
|
21
21
|
import { DropdownMenu, RadioGroup } from '@kobalte/core'
|
|
22
|
-
import { Portal, delegateEvents } from 'solid-js/web'
|
|
22
|
+
import { Portal, clearDelegatedEvents, delegateEvents } from 'solid-js/web'
|
|
23
23
|
import { tokens } from './theme'
|
|
24
24
|
import {
|
|
25
25
|
convertRemToPixels,
|
|
@@ -115,6 +115,8 @@ export type DevtoolsComponentType = Component<QueryDevtoolsProps>
|
|
|
115
115
|
|
|
116
116
|
interface PiPProviderProps {
|
|
117
117
|
children: JSX.Element
|
|
118
|
+
localStore: StorageObject<string>
|
|
119
|
+
setLocalStore: StorageSetter<string, unknown>
|
|
118
120
|
}
|
|
119
121
|
|
|
120
122
|
type PiPContextType = {
|
|
@@ -147,17 +149,31 @@ const PiPProvider = (props: PiPProviderProps) => {
|
|
|
147
149
|
return
|
|
148
150
|
}
|
|
149
151
|
|
|
150
|
-
const pip = window.open(
|
|
152
|
+
const pip = window.open(
|
|
153
|
+
'',
|
|
154
|
+
'TSQD-Devtools-Panel',
|
|
155
|
+
`width=${width},height=${height},popup`,
|
|
156
|
+
)
|
|
157
|
+
|
|
151
158
|
if (!pip) {
|
|
152
159
|
throw new Error(
|
|
153
160
|
'Failed to open popup. Please allow popups for this site to view the devtools in picture-in-picture mode.',
|
|
154
161
|
)
|
|
155
162
|
}
|
|
163
|
+
|
|
164
|
+
// Remove existing styles
|
|
165
|
+
pip.document.head.innerHTML = ''
|
|
166
|
+
// Remove existing body
|
|
167
|
+
pip.document.body.innerHTML = ''
|
|
168
|
+
// Clear Delegated Events
|
|
169
|
+
clearDelegatedEvents(pip.document)
|
|
170
|
+
|
|
156
171
|
pip.document.title = 'TanStack Query Devtools'
|
|
157
172
|
pip.document.body.style.margin = '0'
|
|
158
173
|
|
|
159
174
|
// Detect when window is closed by user
|
|
160
175
|
pip.addEventListener('pagehide', () => {
|
|
176
|
+
props.setLocalStore('pip_open', 'false')
|
|
161
177
|
setPipWindow(null)
|
|
162
178
|
})
|
|
163
179
|
|
|
@@ -208,20 +224,18 @@ const PiPProvider = (props: PiPProviderProps) => {
|
|
|
208
224
|
],
|
|
209
225
|
pip.document,
|
|
210
226
|
)
|
|
227
|
+
props.setLocalStore('pip_open', 'true')
|
|
211
228
|
setPipWindow(pip)
|
|
212
229
|
}
|
|
213
230
|
|
|
214
231
|
createEffect(() => {
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
232
|
+
const pip_open = (props.localStore.pip_open ?? 'false') as 'true' | 'false'
|
|
233
|
+
if (pip_open === 'true') {
|
|
234
|
+
requestPipWindow(
|
|
235
|
+
Number(window.innerWidth),
|
|
236
|
+
Number(props.localStore.height || DEFAULT_HEIGHT),
|
|
237
|
+
)
|
|
218
238
|
}
|
|
219
|
-
|
|
220
|
-
window.addEventListener('beforeunload', closePipWindowOnUnload)
|
|
221
|
-
|
|
222
|
-
onCleanup(() => {
|
|
223
|
-
window.removeEventListener('beforeunload', closePipWindowOnUnload)
|
|
224
|
-
})
|
|
225
239
|
})
|
|
226
240
|
|
|
227
241
|
createEffect(() => {
|
|
@@ -286,7 +300,7 @@ const DevtoolsComponent: DevtoolsComponentType = (props) => {
|
|
|
286
300
|
|
|
287
301
|
return (
|
|
288
302
|
<QueryDevtoolsContext.Provider value={props}>
|
|
289
|
-
<PiPProvider>
|
|
303
|
+
<PiPProvider localStore={localStore} setLocalStore={setLocalStore}>
|
|
290
304
|
<ThemeContext.Provider value={theme}>
|
|
291
305
|
<Devtools localStore={localStore} setLocalStore={setLocalStore} />
|
|
292
306
|
</ThemeContext.Provider>
|
|
@@ -358,9 +372,13 @@ const Devtools: Component<DevtoolsPanelProps> = (props) => {
|
|
|
358
372
|
})
|
|
359
373
|
})
|
|
360
374
|
|
|
375
|
+
const pip_open = createMemo(
|
|
376
|
+
() => (props.localStore.pip_open ?? 'false') as 'true' | 'false',
|
|
377
|
+
)
|
|
378
|
+
|
|
361
379
|
return (
|
|
362
380
|
<>
|
|
363
|
-
<Show when={pip().pipWindow}>
|
|
381
|
+
<Show when={pip().pipWindow && pip_open() == 'true'}>
|
|
364
382
|
<Portal mount={pip().pipWindow?.document.body}>
|
|
365
383
|
<PiPPanel>
|
|
366
384
|
<ContentView
|
|
@@ -413,7 +431,7 @@ const Devtools: Component<DevtoolsPanelProps> = (props) => {
|
|
|
413
431
|
ref={transitionsContainerRef}
|
|
414
432
|
>
|
|
415
433
|
<TransitionGroup name="tsqd-panel-transition">
|
|
416
|
-
<Show when={isOpen() && !pip().pipWindow}>
|
|
434
|
+
<Show when={isOpen() && !pip().pipWindow && pip_open() == 'false'}>
|
|
417
435
|
<DevtoolsPanel
|
|
418
436
|
localStore={props.localStore}
|
|
419
437
|
setLocalStore={props.setLocalStore}
|
|
@@ -480,6 +498,7 @@ const PiPPanel: Component<{
|
|
|
480
498
|
}
|
|
481
499
|
if (win) {
|
|
482
500
|
win.addEventListener('resize', resizeCB)
|
|
501
|
+
resizeCB()
|
|
483
502
|
}
|
|
484
503
|
|
|
485
504
|
onCleanup(() => {
|