@tanstack/query-devtools 5.104.0 → 5.104.2
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-BTIH1dw_.js +1238 -0
- package/build/Devtools-BTIH1dw_.js.map +1 -0
- package/build/{Devtools-XuAvSfeN.cjs → Devtools-CJHY2Wx-.cjs} +388 -66
- package/build/{Devtools-xfqOl5Dl.js → Devtools-DBqcRO2f.js} +371 -67
- package/build/Devtools-DE6wfpC3.cjs +1237 -0
- package/build/DevtoolsComponent-B-JX7seJ.js +2 -0
- package/build/DevtoolsComponent-B-JX7seJ.js.map +1 -0
- package/build/DevtoolsComponent-BdsgosNO.js +40 -0
- package/build/DevtoolsComponent-BjB9B9oL.cjs +40 -0
- package/build/DevtoolsComponent-u_hbjcma.cjs +1 -0
- package/build/DevtoolsPanelComponent-CdrNDWsc.js +2 -0
- package/build/DevtoolsPanelComponent-CdrNDWsc.js.map +1 -0
- package/build/DevtoolsPanelComponent-Co1Z91vW.cjs +47 -0
- package/build/DevtoolsPanelComponent-DyNlv9xD.cjs +1 -0
- package/build/DevtoolsPanelComponent-Jyh8juKn.js +47 -0
- package/build/dev.cjs +3 -3
- package/build/dev.js +3 -3
- package/build/index.cjs +1 -1
- package/build/index.d.cts +82 -0
- package/build/index.d.cts.map +1 -1
- package/build/index.d.ts +82 -0
- package/build/index.d.ts.map +1 -1
- package/build/index.js +1 -1
- package/build/index.js.map +1 -1
- package/build/{utils-BSq_mRvI.cjs → utils-C0KLuaCQ.cjs} +57 -12
- package/build/{utils-Fz9uQv9N.js → utils-DPVWL709.js} +57 -12
- package/build/utils-po3vZo_N.js.map +1 -1
- package/package.json +9 -9
- package/src/Devtools.tsx +87 -82
- package/src/DevtoolsComponent.tsx +17 -5
- package/src/DevtoolsPanelComponent.tsx +23 -14
- package/src/Explorer.tsx +18 -4
- package/src/TanstackQueryDevtools.tsx +11 -0
- package/src/TanstackQueryDevtoolsPanel.tsx +14 -0
- package/src/contexts/DevtoolsOfflineContext.ts +15 -0
- package/src/contexts/DevtoolsStateContext.ts +15 -0
- package/src/contexts/DevtoolsSubscriptionsContext.ts +16 -0
- package/src/contexts/PiPContext.tsx +13 -0
- package/src/contexts/QueryDevtoolsContext.ts +4 -0
- package/src/contexts/ThemeContext.ts +4 -0
- package/src/contexts/types.ts +133 -1
- package/src/createCacheSubscriptionRegistry.ts +58 -0
- package/src/icons/index.tsx +102 -0
- package/src/providers/DevtoolsOfflineProvider.tsx +37 -0
- package/src/providers/DevtoolsStateProvider.tsx +33 -0
- package/src/providers/DevtoolsSubscriptionsProvider.tsx +35 -0
- package/src/utils.tsx +59 -15
- package/build/Devtools-DP9QP4ya.cjs +0 -1237
- package/build/Devtools-DpIxfOum.js +0 -1238
- package/build/Devtools-DpIxfOum.js.map +0 -1
- package/build/DevtoolsComponent-BEFw32kp.js +0 -2
- package/build/DevtoolsComponent-BEFw32kp.js.map +0 -1
- package/build/DevtoolsComponent-DRjJuLRU.js +0 -34
- package/build/DevtoolsComponent-DjkCvfLf.cjs +0 -34
- package/build/DevtoolsComponent-bl_b_SFT.cjs +0 -1
- package/build/DevtoolsPanelComponent-BE6hbJd6.js +0 -2
- package/build/DevtoolsPanelComponent-BE6hbJd6.js.map +0 -1
- package/build/DevtoolsPanelComponent-BTfH8T_h.cjs +0 -41
- package/build/DevtoolsPanelComponent-CkmpODyJ.js +0 -41
- package/build/DevtoolsPanelComponent-DfaRC3RE.cjs +0 -1
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{L as e,V as t,a as n}from"./utils-po3vZo_N.js";import{a as r,c as i,d as a,i as o,l as s,n as c,s as l,u}from"./Devtools-BTIH1dw_.js";const d=d=>{let[f,p]=a({prefix:`TanstackQueryDevtools`}),m=n(),h=t(()=>{let e=d.theme||f.theme_preference||`system`;return e===`system`?m():e});return e(u.Provider,{value:d,get children(){return e(l,{get children(){return e(s,{get children(){return e(i,{get children(){return e(r,{localStore:f,setLocalStore:p,get children(){return e(o.Provider,{value:h,get children(){return e(c,{localStore:f,setLocalStore:p})}})}})}})}})}})}})};export{d as default};
|
|
2
|
+
//# sourceMappingURL=DevtoolsComponent-B-JX7seJ.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DevtoolsComponent-B-JX7seJ.js","names":["createLocalStorage","createMemo","DevtoolsOfflineProvider","DevtoolsSubscriptionsProvider","DevtoolsStateProvider","Devtools","getPreferredColorScheme","THEME_PREFERENCE","PiPProvider","QueryDevtoolsContext","ThemeContext","Theme","DevtoolsComponentType","DevtoolsComponent","props","localStore","setLocalStore","prefix","colorScheme","theme","preference","theme_preference","_$createComponent","Provider","value","children","_$createComponent","createComponent","createMemo","getPreferredColorScheme","PiPProvider","DevtoolsSubscriptionsProvider","createLocalStorage","ThemeContext","DevtoolsOfflineProvider","Devtools","DevtoolsStateProvider","DevtoolsComponent","localStore","setLocalStore","colorScheme","theme","preference","props","QueryDevtoolsContext"],"sources":["../src/DevtoolsComponent.tsx"],"sourcesContent":["import { createLocalStorage } from '@solid-primitives/storage'\nimport { createMemo } from 'solid-js'\nimport { DevtoolsOfflineProvider } from './providers/DevtoolsOfflineProvider'\nimport { DevtoolsSubscriptionsProvider } from './providers/DevtoolsSubscriptionsProvider'\nimport { DevtoolsStateProvider } from './providers/DevtoolsStateProvider'\nimport { Devtools } from './Devtools'\nimport { getPreferredColorScheme } from './utils'\nimport { THEME_PREFERENCE } from './constants'\nimport { PiPProvider, QueryDevtoolsContext, ThemeContext } from './contexts'\nimport type { Theme } from './contexts'\nimport type { DevtoolsComponentType } from './Devtools'\n\nconst DevtoolsComponent: DevtoolsComponentType = (props) => {\n const [localStore, setLocalStore] = createLocalStorage({\n prefix: 'TanstackQueryDevtools',\n })\n\n const colorScheme = getPreferredColorScheme()\n\n const theme = createMemo(() => {\n const preference = (props.theme ||\n localStore.theme_preference ||\n THEME_PREFERENCE) as Theme\n if (preference !== 'system') return preference\n return colorScheme()\n })\n\n return (\n <QueryDevtoolsContext.Provider value={props}>\n <DevtoolsStateProvider>\n <DevtoolsOfflineProvider>\n <DevtoolsSubscriptionsProvider>\n <PiPProvider localStore={localStore} setLocalStore={setLocalStore}>\n <ThemeContext.Provider value={theme}>\n <Devtools\n localStore={localStore}\n setLocalStore={setLocalStore}\n />\n </ThemeContext.Provider>\n </PiPProvider>\n </DevtoolsSubscriptionsProvider>\n </DevtoolsOfflineProvider>\n </DevtoolsStateProvider>\n </QueryDevtoolsContext.Provider>\n )\n}\n\nexport default DevtoolsComponent\n"],"mappings":"6IAYA,MAAMa,EAA4CC,GAAU,CAC1D,GAAM,CAACC,EAAYC,GAAiBhB,EAAmB,CACrDiB,OAAQ,uBACV,CAAC,EAEKC,EAAcZ,EAAwB,EAEtCa,EAAQlB,MAAiB,CAC7B,IAAMmB,EAAcN,EAAMK,OACxBJ,EAAWM,kBAAAA,SAGb,OADID,IAAe,SACZF,EAAY,EADiBE,CAEtC,CAAC,EAED,OAAAE,EACGb,EAAqBc,SAAQ,CAACC,MAAOV,EAAK,IAAAW,UAAA,CAAA,OAAAH,EACxClB,EAAqB,CAAA,IAAAqB,UAAA,CAAA,OAAAH,EACnBpB,EAAuB,CAAA,IAAAuB,UAAA,CAAA,OAAAH,EACrBnB,EAA6B,CAAA,IAAAsB,UAAA,CAAA,OAAAH,EAC3Bd,EAAW,CAAaO,aAA2BC,gBAAa,IAAAS,UAAA,CAAA,OAAAH,EAC9DZ,EAAaa,SAAQ,CAACC,MAAOL,EAAK,IAAAM,UAAA,CAAA,OAAAH,EAChCjB,EAAQ,CACKU,aACGC,eAAa,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAS9C"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { L as createComponent, V as createMemo, a as getPreferredColorScheme } from "./utils-DPVWL709.js";
|
|
2
|
+
import { a as PiPProvider, c as DevtoolsSubscriptionsProvider, d as createLocalStorage, i as ThemeContext, l as DevtoolsOfflineProvider, n as Devtools, s as DevtoolsStateProvider, u as QueryDevtoolsContext } from "./Devtools-DBqcRO2f.js";
|
|
3
|
+
//#region src/DevtoolsComponent.tsx
|
|
4
|
+
const DevtoolsComponent = (props) => {
|
|
5
|
+
const [localStore, setLocalStore] = createLocalStorage({ prefix: "TanstackQueryDevtools" });
|
|
6
|
+
const colorScheme = getPreferredColorScheme();
|
|
7
|
+
const theme = createMemo(() => {
|
|
8
|
+
const preference = props.theme || localStore.theme_preference || "system";
|
|
9
|
+
if (preference !== "system") return preference;
|
|
10
|
+
return colorScheme();
|
|
11
|
+
});
|
|
12
|
+
return createComponent(QueryDevtoolsContext.Provider, {
|
|
13
|
+
value: props,
|
|
14
|
+
get children() {
|
|
15
|
+
return createComponent(DevtoolsStateProvider, { get children() {
|
|
16
|
+
return createComponent(DevtoolsOfflineProvider, { get children() {
|
|
17
|
+
return createComponent(DevtoolsSubscriptionsProvider, { get children() {
|
|
18
|
+
return createComponent(PiPProvider, {
|
|
19
|
+
localStore,
|
|
20
|
+
setLocalStore,
|
|
21
|
+
get children() {
|
|
22
|
+
return createComponent(ThemeContext.Provider, {
|
|
23
|
+
value: theme,
|
|
24
|
+
get children() {
|
|
25
|
+
return createComponent(Devtools, {
|
|
26
|
+
localStore,
|
|
27
|
+
setLocalStore
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
} });
|
|
34
|
+
} });
|
|
35
|
+
} });
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
};
|
|
39
|
+
//#endregion
|
|
40
|
+
export { DevtoolsComponent as default };
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
const require_utils = require("./utils-C0KLuaCQ.cjs");
|
|
2
|
+
const require_Devtools = require("./Devtools-CJHY2Wx-.cjs");
|
|
3
|
+
//#region src/DevtoolsComponent.tsx
|
|
4
|
+
const DevtoolsComponent = (props) => {
|
|
5
|
+
const [localStore, setLocalStore] = require_Devtools.createLocalStorage({ prefix: "TanstackQueryDevtools" });
|
|
6
|
+
const colorScheme = require_utils.getPreferredColorScheme();
|
|
7
|
+
const theme = require_utils.createMemo(() => {
|
|
8
|
+
const preference = props.theme || localStore.theme_preference || "system";
|
|
9
|
+
if (preference !== "system") return preference;
|
|
10
|
+
return colorScheme();
|
|
11
|
+
});
|
|
12
|
+
return require_utils.createComponent(require_Devtools.QueryDevtoolsContext.Provider, {
|
|
13
|
+
value: props,
|
|
14
|
+
get children() {
|
|
15
|
+
return require_utils.createComponent(require_Devtools.DevtoolsStateProvider, { get children() {
|
|
16
|
+
return require_utils.createComponent(require_Devtools.DevtoolsOfflineProvider, { get children() {
|
|
17
|
+
return require_utils.createComponent(require_Devtools.DevtoolsSubscriptionsProvider, { get children() {
|
|
18
|
+
return require_utils.createComponent(require_Devtools.PiPProvider, {
|
|
19
|
+
localStore,
|
|
20
|
+
setLocalStore,
|
|
21
|
+
get children() {
|
|
22
|
+
return require_utils.createComponent(require_Devtools.ThemeContext.Provider, {
|
|
23
|
+
value: theme,
|
|
24
|
+
get children() {
|
|
25
|
+
return require_utils.createComponent(require_Devtools.Devtools, {
|
|
26
|
+
localStore,
|
|
27
|
+
setLocalStore
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
} });
|
|
34
|
+
} });
|
|
35
|
+
} });
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
};
|
|
39
|
+
//#endregion
|
|
40
|
+
exports.default = DevtoolsComponent;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("./utils-y9H3sLL0.cjs"),t=require("./Devtools-DE6wfpC3.cjs"),n=n=>{let[r,i]=t.d({prefix:`TanstackQueryDevtools`}),a=e.a(),o=e.V(()=>{let e=n.theme||r.theme_preference||`system`;return e===`system`?a():e});return e.L(t.u.Provider,{value:n,get children(){return e.L(t.s,{get children(){return e.L(t.l,{get children(){return e.L(t.c,{get children(){return e.L(t.a,{localStore:r,setLocalStore:i,get children(){return e.L(t.i.Provider,{value:o,get children(){return e.L(t.n,{localStore:r,setLocalStore:i})}})}})}})}})}})}})};exports.default=n;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{L as e,V as t,a as n}from"./utils-po3vZo_N.js";import{a as r,c as i,d as a,i as o,l as s,r as c,s as l,t as u,u as d}from"./Devtools-BTIH1dw_.js";const f=f=>{let[p,m]=a({prefix:`TanstackQueryDevtools`}),h=n(),g=t(()=>{let e=f.theme||p.theme_preference||`system`;return e===`system`?h():e});return e(d.Provider,{value:f,get children(){return e(l,{get children(){return e(s,{get children(){return e(i,{get children(){return e(r,{disabled:!0,localStore:p,setLocalStore:m,get children(){return e(o.Provider,{value:g,get children(){return e(c,{get children(){return e(u,{localStore:p,setLocalStore:m,get onClose(){return f.onClose},showPanelViewOnly:!0})}})}})}})}})}})}})}})};export{f as default};
|
|
2
|
+
//# sourceMappingURL=DevtoolsPanelComponent-CdrNDWsc.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DevtoolsPanelComponent-CdrNDWsc.js","names":["createLocalStorage","createMemo","DevtoolsOfflineProvider","DevtoolsSubscriptionsProvider","DevtoolsStateProvider","ContentView","ParentPanel","getPreferredColorScheme","THEME_PREFERENCE","PiPProvider","QueryDevtoolsContext","ThemeContext","Theme","DevtoolsComponentType","DevtoolsPanelComponent","props","localStore","setLocalStore","prefix","colorScheme","theme","preference","theme_preference","_$createComponent","Provider","value","children","disabled","onClose","showPanelViewOnly","_$createComponent","createComponent","createMemo","getPreferredColorScheme","PiPProvider","DevtoolsSubscriptionsProvider","createLocalStorage","ThemeContext","DevtoolsOfflineProvider","ParentPanel","DevtoolsStateProvider","ContentView","QueryDevtoolsContext","DevtoolsPanelComponent","localStore","setLocalStore","colorScheme","theme","preference","props"],"sources":["../src/DevtoolsPanelComponent.tsx"],"sourcesContent":["import { createLocalStorage } from '@solid-primitives/storage'\nimport { createMemo } from 'solid-js'\nimport { DevtoolsOfflineProvider } from './providers/DevtoolsOfflineProvider'\nimport { DevtoolsSubscriptionsProvider } from './providers/DevtoolsSubscriptionsProvider'\nimport { DevtoolsStateProvider } from './providers/DevtoolsStateProvider'\nimport { ContentView, ParentPanel } from './Devtools'\nimport { getPreferredColorScheme } from './utils'\nimport { THEME_PREFERENCE } from './constants'\nimport { PiPProvider, QueryDevtoolsContext, ThemeContext } from './contexts'\nimport type { Theme } from './contexts'\nimport type { DevtoolsComponentType } from './Devtools'\n\nconst DevtoolsPanelComponent: DevtoolsComponentType = (props) => {\n const [localStore, setLocalStore] = createLocalStorage({\n prefix: 'TanstackQueryDevtools',\n })\n\n const colorScheme = getPreferredColorScheme()\n\n const theme = createMemo(() => {\n const preference = (props.theme ||\n localStore.theme_preference ||\n THEME_PREFERENCE) as Theme\n if (preference !== 'system') return preference\n return colorScheme()\n })\n\n return (\n <QueryDevtoolsContext.Provider value={props}>\n <DevtoolsStateProvider>\n <DevtoolsOfflineProvider>\n <DevtoolsSubscriptionsProvider>\n <PiPProvider\n disabled\n localStore={localStore}\n setLocalStore={setLocalStore}\n >\n <ThemeContext.Provider value={theme}>\n <ParentPanel>\n <ContentView\n localStore={localStore}\n setLocalStore={setLocalStore}\n onClose={props.onClose}\n showPanelViewOnly\n />\n </ParentPanel>\n </ThemeContext.Provider>\n </PiPProvider>\n </DevtoolsSubscriptionsProvider>\n </DevtoolsOfflineProvider>\n </DevtoolsStateProvider>\n </QueryDevtoolsContext.Provider>\n )\n}\n\nexport default DevtoolsPanelComponent\n"],"mappings":"yJAYA,MAAMc,EAAiDC,GAAU,CAC/D,GAAM,CAACC,EAAYC,GAAiBjB,EAAmB,CACrDkB,OAAQ,uBACV,CAAC,EAEKC,EAAcZ,EAAwB,EAEtCa,EAAQnB,MAAiB,CAC7B,IAAMoB,EAAcN,EAAMK,OACxBJ,EAAWM,kBAAAA,SAGb,OADID,IAAe,SACZF,EAAY,EADiBE,CAEtC,CAAC,EAED,OAAAE,EACGb,EAAqBc,SAAQ,CAACC,MAAOV,EAAK,IAAAW,UAAA,CAAA,OAAAH,EACxCnB,EAAqB,CAAA,IAAAsB,UAAA,CAAA,OAAAH,EACnBrB,EAAuB,CAAA,IAAAwB,UAAA,CAAA,OAAAH,EACrBpB,EAA6B,CAAA,IAAAuB,UAAA,CAAA,OAAAH,EAC3Bd,EAAW,CACVkB,SAAQ,GACIX,aACGC,gBAAa,IAAAS,UAAA,CAAA,OAAAH,EAE3BZ,EAAaa,SAAQ,CAACC,MAAOL,EAAK,IAAAM,UAAA,CAAA,OAAAH,EAChCjB,EAAW,CAAA,IAAAoB,UAAA,CAAA,OAAAH,EACTlB,EAAW,CACEW,aACGC,gBAAa,IAC5BW,SAAO,CAAA,OAAEb,EAAMa,OAAO,EACtBC,kBAAiB,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAUrC"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
const require_utils = require("./utils-C0KLuaCQ.cjs");
|
|
2
|
+
const require_Devtools = require("./Devtools-CJHY2Wx-.cjs");
|
|
3
|
+
//#region src/DevtoolsPanelComponent.tsx
|
|
4
|
+
const DevtoolsPanelComponent = (props) => {
|
|
5
|
+
const [localStore, setLocalStore] = require_Devtools.createLocalStorage({ prefix: "TanstackQueryDevtools" });
|
|
6
|
+
const colorScheme = require_utils.getPreferredColorScheme();
|
|
7
|
+
const theme = require_utils.createMemo(() => {
|
|
8
|
+
const preference = props.theme || localStore.theme_preference || "system";
|
|
9
|
+
if (preference !== "system") return preference;
|
|
10
|
+
return colorScheme();
|
|
11
|
+
});
|
|
12
|
+
return require_utils.createComponent(require_Devtools.QueryDevtoolsContext.Provider, {
|
|
13
|
+
value: props,
|
|
14
|
+
get children() {
|
|
15
|
+
return require_utils.createComponent(require_Devtools.DevtoolsStateProvider, { get children() {
|
|
16
|
+
return require_utils.createComponent(require_Devtools.DevtoolsOfflineProvider, { get children() {
|
|
17
|
+
return require_utils.createComponent(require_Devtools.DevtoolsSubscriptionsProvider, { get children() {
|
|
18
|
+
return require_utils.createComponent(require_Devtools.PiPProvider, {
|
|
19
|
+
disabled: true,
|
|
20
|
+
localStore,
|
|
21
|
+
setLocalStore,
|
|
22
|
+
get children() {
|
|
23
|
+
return require_utils.createComponent(require_Devtools.ThemeContext.Provider, {
|
|
24
|
+
value: theme,
|
|
25
|
+
get children() {
|
|
26
|
+
return require_utils.createComponent(require_Devtools.ParentPanel, { get children() {
|
|
27
|
+
return require_utils.createComponent(require_Devtools.ContentView, {
|
|
28
|
+
localStore,
|
|
29
|
+
setLocalStore,
|
|
30
|
+
get onClose() {
|
|
31
|
+
return props.onClose;
|
|
32
|
+
},
|
|
33
|
+
showPanelViewOnly: true
|
|
34
|
+
});
|
|
35
|
+
} });
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
} });
|
|
41
|
+
} });
|
|
42
|
+
} });
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
};
|
|
46
|
+
//#endregion
|
|
47
|
+
exports.default = DevtoolsPanelComponent;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("./utils-y9H3sLL0.cjs"),t=require("./Devtools-DE6wfpC3.cjs"),n=n=>{let[r,i]=t.d({prefix:`TanstackQueryDevtools`}),a=e.a(),o=e.V(()=>{let e=n.theme||r.theme_preference||`system`;return e===`system`?a():e});return e.L(t.u.Provider,{value:n,get children(){return e.L(t.s,{get children(){return e.L(t.l,{get children(){return e.L(t.c,{get children(){return e.L(t.a,{disabled:!0,localStore:r,setLocalStore:i,get children(){return e.L(t.i.Provider,{value:o,get children(){return e.L(t.r,{get children(){return e.L(t.t,{localStore:r,setLocalStore:i,get onClose(){return n.onClose},showPanelViewOnly:!0})}})}})}})}})}})}})}})};exports.default=n;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { L as createComponent, V as createMemo, a as getPreferredColorScheme } from "./utils-DPVWL709.js";
|
|
2
|
+
import { a as PiPProvider, c as DevtoolsSubscriptionsProvider, d as createLocalStorage, i as ThemeContext, l as DevtoolsOfflineProvider, r as ParentPanel, s as DevtoolsStateProvider, t as ContentView, u as QueryDevtoolsContext } from "./Devtools-DBqcRO2f.js";
|
|
3
|
+
//#region src/DevtoolsPanelComponent.tsx
|
|
4
|
+
const DevtoolsPanelComponent = (props) => {
|
|
5
|
+
const [localStore, setLocalStore] = createLocalStorage({ prefix: "TanstackQueryDevtools" });
|
|
6
|
+
const colorScheme = getPreferredColorScheme();
|
|
7
|
+
const theme = createMemo(() => {
|
|
8
|
+
const preference = props.theme || localStore.theme_preference || "system";
|
|
9
|
+
if (preference !== "system") return preference;
|
|
10
|
+
return colorScheme();
|
|
11
|
+
});
|
|
12
|
+
return createComponent(QueryDevtoolsContext.Provider, {
|
|
13
|
+
value: props,
|
|
14
|
+
get children() {
|
|
15
|
+
return createComponent(DevtoolsStateProvider, { get children() {
|
|
16
|
+
return createComponent(DevtoolsOfflineProvider, { get children() {
|
|
17
|
+
return createComponent(DevtoolsSubscriptionsProvider, { get children() {
|
|
18
|
+
return createComponent(PiPProvider, {
|
|
19
|
+
disabled: true,
|
|
20
|
+
localStore,
|
|
21
|
+
setLocalStore,
|
|
22
|
+
get children() {
|
|
23
|
+
return createComponent(ThemeContext.Provider, {
|
|
24
|
+
value: theme,
|
|
25
|
+
get children() {
|
|
26
|
+
return createComponent(ParentPanel, { get children() {
|
|
27
|
+
return createComponent(ContentView, {
|
|
28
|
+
localStore,
|
|
29
|
+
setLocalStore,
|
|
30
|
+
get onClose() {
|
|
31
|
+
return props.onClose;
|
|
32
|
+
},
|
|
33
|
+
showPanelViewOnly: true
|
|
34
|
+
});
|
|
35
|
+
} });
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
} });
|
|
41
|
+
} });
|
|
42
|
+
} });
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
};
|
|
46
|
+
//#endregion
|
|
47
|
+
export { DevtoolsPanelComponent as default };
|
package/build/dev.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_utils = require("./utils-
|
|
2
|
+
const require_utils = require("./utils-C0KLuaCQ.cjs");
|
|
3
3
|
//#region src/TanstackQueryDevtools.tsx
|
|
4
4
|
var TanstackQueryDevtools = class {
|
|
5
5
|
#client;
|
|
@@ -64,7 +64,7 @@ var TanstackQueryDevtools = class {
|
|
|
64
64
|
let Devtools;
|
|
65
65
|
if (this.#Component) Devtools = this.#Component;
|
|
66
66
|
else {
|
|
67
|
-
Devtools = require_utils.lazy(() => Promise.resolve().then(() => require("./DevtoolsComponent-
|
|
67
|
+
Devtools = require_utils.lazy(() => Promise.resolve().then(() => require("./DevtoolsComponent-BjB9B9oL.cjs")));
|
|
68
68
|
this.#Component = Devtools;
|
|
69
69
|
}
|
|
70
70
|
require_utils.setupStyleSheet(this.#styleNonce, this.#shadowDOMTarget);
|
|
@@ -185,7 +185,7 @@ var TanstackQueryDevtoolsPanel = class {
|
|
|
185
185
|
let Devtools;
|
|
186
186
|
if (this.#Component) Devtools = this.#Component;
|
|
187
187
|
else {
|
|
188
|
-
Devtools = require_utils.lazy(() => Promise.resolve().then(() => require("./DevtoolsPanelComponent-
|
|
188
|
+
Devtools = require_utils.lazy(() => Promise.resolve().then(() => require("./DevtoolsPanelComponent-Co1Z91vW.cjs")));
|
|
189
189
|
this.#Component = Devtools;
|
|
190
190
|
}
|
|
191
191
|
require_utils.setupStyleSheet(this.#styleNonce, this.#shadowDOMTarget);
|
package/build/dev.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { J as mergeProps, L as createComponent, W as createSignal, d as setupStyleSheet, q as lazy, w as render } from "./utils-
|
|
1
|
+
import { J as mergeProps, L as createComponent, W as createSignal, d as setupStyleSheet, q as lazy, w as render } from "./utils-DPVWL709.js";
|
|
2
2
|
//#region src/TanstackQueryDevtools.tsx
|
|
3
3
|
var TanstackQueryDevtools = class {
|
|
4
4
|
#client;
|
|
@@ -63,7 +63,7 @@ var TanstackQueryDevtools = class {
|
|
|
63
63
|
let Devtools;
|
|
64
64
|
if (this.#Component) Devtools = this.#Component;
|
|
65
65
|
else {
|
|
66
|
-
Devtools = lazy(() => import("./DevtoolsComponent-
|
|
66
|
+
Devtools = lazy(() => import("./DevtoolsComponent-BdsgosNO.js"));
|
|
67
67
|
this.#Component = Devtools;
|
|
68
68
|
}
|
|
69
69
|
setupStyleSheet(this.#styleNonce, this.#shadowDOMTarget);
|
|
@@ -184,7 +184,7 @@ var TanstackQueryDevtoolsPanel = class {
|
|
|
184
184
|
let Devtools;
|
|
185
185
|
if (this.#Component) Devtools = this.#Component;
|
|
186
186
|
else {
|
|
187
|
-
Devtools = lazy(() => import("./DevtoolsPanelComponent-
|
|
187
|
+
Devtools = lazy(() => import("./DevtoolsPanelComponent-Jyh8juKn.js"));
|
|
188
188
|
this.#Component = Devtools;
|
|
189
189
|
}
|
|
190
190
|
setupStyleSheet(this.#styleNonce, this.#shadowDOMTarget);
|
package/build/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./utils-y9H3sLL0.cjs");var t=class{#e;#t;#n;#r;#i=!1;#a;#o;#s;#c;#l;#u;#d;#f;#p;#m;constructor(t){let{client:n,queryFlavor:r,version:i,onlineManager:a,buttonPosition:o,position:s,initialIsOpen:c,errorTypes:l,styleNonce:u,shadowDOMTarget:d,hideDisabledQueries:f,theme:p}=t;this.#e=e.W(n),this.#n=r,this.#r=i,this.#t=a,this.#a=u,this.#o=d,this.#s=e.W(o),this.#c=e.W(s),this.#l=e.W(c),this.#u=e.W(l),this.#d=e.W(f),this.#p=e.W(p)}setButtonPosition(e){this.#s[1](e)}setPosition(e){this.#c[1](e)}setInitialIsOpen(e){this.#l[1](e)}setErrorTypes(e){this.#u[1](e)}setClient(e){this.#e[1](e)}setTheme(e){this.#p[1](e)}mount(t){if(this.#i)throw Error(`Devtools is already mounted`);let n=e.w(()=>{let t=this,[n]=this.#s,[r]=this.#c,[i]=this.#l,[a]=this.#u,[o]=this.#d,[s]=this.#e,[c]=this.#p,l;return this.#f?l=this.#f:(l=e.q(()=>Promise.resolve().then(()=>require("./DevtoolsComponent-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./utils-y9H3sLL0.cjs");var t=class{#e;#t;#n;#r;#i=!1;#a;#o;#s;#c;#l;#u;#d;#f;#p;#m;constructor(t){let{client:n,queryFlavor:r,version:i,onlineManager:a,buttonPosition:o,position:s,initialIsOpen:c,errorTypes:l,styleNonce:u,shadowDOMTarget:d,hideDisabledQueries:f,theme:p}=t;this.#e=e.W(n),this.#n=r,this.#r=i,this.#t=a,this.#a=u,this.#o=d,this.#s=e.W(o),this.#c=e.W(s),this.#l=e.W(c),this.#u=e.W(l),this.#d=e.W(f),this.#p=e.W(p)}setButtonPosition(e){this.#s[1](e)}setPosition(e){this.#c[1](e)}setInitialIsOpen(e){this.#l[1](e)}setErrorTypes(e){this.#u[1](e)}setClient(e){this.#e[1](e)}setTheme(e){this.#p[1](e)}mount(t){if(this.#i)throw Error(`Devtools is already mounted`);let n=e.w(()=>{let t=this,[n]=this.#s,[r]=this.#c,[i]=this.#l,[a]=this.#u,[o]=this.#d,[s]=this.#e,[c]=this.#p,l;return this.#f?l=this.#f:(l=e.q(()=>Promise.resolve().then(()=>require("./DevtoolsComponent-u_hbjcma.cjs"))),this.#f=l),e.d(this.#a,this.#o),e.L(l,e.J({get queryFlavor(){return t.#n},get version(){return t.#r},get onlineManager(){return t.#t},get shadowDOMTarget(){return t.#o}},{get client(){return s()},get buttonPosition(){return n()},get position(){return r()},get initialIsOpen(){return i()},get errorTypes(){return a()},get hideDisabledQueries(){return o()},get theme(){return c()}}))},t);this.#i=!0,this.#m=n}unmount(){if(!this.#i)throw Error(`Devtools is not mounted`);this.#m?.(),this.#i=!1}},n=class{#e;#t;#n;#r;#i=!1;#a;#o;#s;#c;#l;#u;#d;#f;#p;#m;#h;constructor(t){let{client:n,queryFlavor:r,version:i,onlineManager:a,buttonPosition:o,position:s,initialIsOpen:c,errorTypes:l,styleNonce:u,shadowDOMTarget:d,onClose:f,hideDisabledQueries:p,theme:m}=t;this.#e=e.W(n),this.#n=r,this.#r=i,this.#t=a,this.#a=u,this.#o=d,this.#s=e.W(o),this.#c=e.W(s),this.#l=e.W(c),this.#u=e.W(l),this.#d=e.W(p),this.#f=e.W(f),this.#m=e.W(m)}setButtonPosition(e){this.#s[1](e)}setPosition(e){this.#c[1](e)}setInitialIsOpen(e){this.#l[1](e)}setErrorTypes(e){this.#u[1](e)}setClient(e){this.#e[1](e)}setOnClose(e){this.#f[1](()=>e)}setTheme(e){this.#m[1](e)}mount(t){if(this.#i)throw Error(`Devtools is already mounted`);let n=e.w(()=>{let t=this,[n]=this.#s,[r]=this.#c,[i]=this.#l,[a]=this.#u,[o]=this.#d,[s]=this.#e,[c]=this.#f,[l]=this.#m,u;return this.#p?u=this.#p:(u=e.q(()=>Promise.resolve().then(()=>require("./DevtoolsPanelComponent-DyNlv9xD.cjs"))),this.#p=u),e.d(this.#a,this.#o),e.L(u,e.J({get queryFlavor(){return t.#n},get version(){return t.#r},get onlineManager(){return t.#t},get shadowDOMTarget(){return t.#o}},{get client(){return s()},get buttonPosition(){return n()},get position(){return r()},get initialIsOpen(){return i()},get errorTypes(){return a()},get hideDisabledQueries(){return o()},get onClose(){return c()},get theme(){return l()}}))},t);this.#i=!0,this.#h=n}unmount(){if(!this.#i)throw Error(`Devtools is not mounted`);this.#h?.(),this.#i=!1}};exports.TanstackQueryDevtools=t,exports.TanstackQueryDevtoolsPanel=n;
|
package/build/index.d.cts
CHANGED
|
@@ -1,10 +1,24 @@
|
|
|
1
1
|
import { Query, QueryClient, onlineManager } from "@tanstack/query-core";
|
|
2
|
+
import "solid-js";
|
|
2
3
|
//#region src/contexts/types.d.ts
|
|
3
4
|
type XPosition = 'left' | 'right';
|
|
4
5
|
type YPosition = 'top' | 'bottom';
|
|
6
|
+
/**
|
|
7
|
+
* The side of the screen the devtools panel opens on.
|
|
8
|
+
*/
|
|
5
9
|
type DevtoolsPosition = XPosition | YPosition;
|
|
10
|
+
/**
|
|
11
|
+
* The corner of the screen the toggle button is placed in, or `'relative'` to place it in the
|
|
12
|
+
* normal document flow.
|
|
13
|
+
*/
|
|
6
14
|
type DevtoolsButtonPosition = `${YPosition}-${XPosition}` | 'relative';
|
|
15
|
+
/**
|
|
16
|
+
* The color theme of the devtools. `'system'` follows the user's color scheme preference.
|
|
17
|
+
*/
|
|
7
18
|
type Theme = 'dark' | 'light' | 'system';
|
|
19
|
+
/**
|
|
20
|
+
* A custom error that can be triggered on a query from the devtools.
|
|
21
|
+
*/
|
|
8
22
|
interface DevtoolsErrorType {
|
|
9
23
|
/**
|
|
10
24
|
* The name of the error.
|
|
@@ -15,24 +29,78 @@ interface DevtoolsErrorType {
|
|
|
15
29
|
*/
|
|
16
30
|
initializer: (query: Query) => Error;
|
|
17
31
|
}
|
|
32
|
+
/**
|
|
33
|
+
* The options shared by every devtools entry point: the `client` to inspect, the adapter's
|
|
34
|
+
* `queryFlavor` and `version` shown in the header, and the display options.
|
|
35
|
+
* `onClose` is only used by the panel entry point.
|
|
36
|
+
*/
|
|
18
37
|
interface QueryDevtoolsProps {
|
|
38
|
+
/**
|
|
39
|
+
* The `QueryClient` whose caches the devtools inspect.
|
|
40
|
+
*/
|
|
19
41
|
readonly client: QueryClient;
|
|
42
|
+
/**
|
|
43
|
+
* The adapter name shown next to the logo in the header, e.g. `'React Query'`.
|
|
44
|
+
*/
|
|
20
45
|
queryFlavor: string;
|
|
46
|
+
/**
|
|
47
|
+
* The adapter version shown next to `queryFlavor` in the header.
|
|
48
|
+
*/
|
|
21
49
|
version: string;
|
|
50
|
+
/**
|
|
51
|
+
* The `onlineManager` the devtools read and toggle to simulate going offline.
|
|
52
|
+
*/
|
|
22
53
|
onlineManager: typeof onlineManager;
|
|
54
|
+
/**
|
|
55
|
+
* The position of the TanStack logo to open and close the devtools panel.
|
|
56
|
+
*/
|
|
23
57
|
buttonPosition?: DevtoolsButtonPosition;
|
|
58
|
+
/**
|
|
59
|
+
* The position of the devtools panel.
|
|
60
|
+
*/
|
|
24
61
|
position?: DevtoolsPosition;
|
|
62
|
+
/**
|
|
63
|
+
* Set this to `true` if you want the devtools to default to being open.
|
|
64
|
+
*/
|
|
25
65
|
initialIsOpen?: boolean;
|
|
66
|
+
/**
|
|
67
|
+
* Use this so you can define custom errors that can be shown in the devtools.
|
|
68
|
+
*/
|
|
26
69
|
errorTypes?: Array<DevtoolsErrorType>;
|
|
70
|
+
/**
|
|
71
|
+
* Use this to pass a shadow DOM target to the devtools so that the styles will be applied
|
|
72
|
+
* within the shadow DOM instead of within the head tag in the light DOM.
|
|
73
|
+
*/
|
|
27
74
|
shadowDOMTarget?: ShadowRoot;
|
|
75
|
+
/**
|
|
76
|
+
* Callback function that is called when the devtools panel is closed. Only used by the panel
|
|
77
|
+
* entry point.
|
|
78
|
+
*/
|
|
28
79
|
onClose?: () => void;
|
|
80
|
+
/**
|
|
81
|
+
* Set this to `true` to hide disabled queries from the devtools panel.
|
|
82
|
+
*/
|
|
29
83
|
hideDisabledQueries?: boolean;
|
|
84
|
+
/**
|
|
85
|
+
* Set this to `'light'`, `'dark'`, or `'system'` to change the theme of the devtools panel.
|
|
86
|
+
*/
|
|
30
87
|
theme?: Theme;
|
|
31
88
|
}
|
|
32
89
|
//#endregion
|
|
33
90
|
//#region src/TanstackQueryDevtools.d.ts
|
|
91
|
+
/**
|
|
92
|
+
* The options for `TanstackQueryDevtools`, which mounts the floating devtools.
|
|
93
|
+
*/
|
|
34
94
|
interface TanstackQueryDevtoolsConfig extends QueryDevtoolsProps {
|
|
95
|
+
/**
|
|
96
|
+
* Use this to pass a nonce to the style tag that is added to the document head. This is useful if
|
|
97
|
+
* you are using a Content Security Policy (CSP) nonce to allow inline styles.
|
|
98
|
+
*/
|
|
35
99
|
styleNonce?: string;
|
|
100
|
+
/**
|
|
101
|
+
* Use this to pass a shadow DOM target to the devtools so that the styles will be applied
|
|
102
|
+
* within the shadow DOM instead of within the head tag in the light DOM.
|
|
103
|
+
*/
|
|
36
104
|
shadowDOMTarget?: ShadowRoot;
|
|
37
105
|
}
|
|
38
106
|
declare class TanstackQueryDevtools {
|
|
@@ -49,9 +117,23 @@ declare class TanstackQueryDevtools {
|
|
|
49
117
|
}
|
|
50
118
|
//#endregion
|
|
51
119
|
//#region src/TanstackQueryDevtoolsPanel.d.ts
|
|
120
|
+
/**
|
|
121
|
+
* The options for `TanstackQueryDevtoolsPanel`, which mounts the devtools as an embedded panel.
|
|
122
|
+
*/
|
|
52
123
|
interface TanstackQueryDevtoolsPanelConfig extends QueryDevtoolsProps {
|
|
124
|
+
/**
|
|
125
|
+
* Use this to pass a nonce to the style tag that is added to the document head. This is useful if
|
|
126
|
+
* you are using a Content Security Policy (CSP) nonce to allow inline styles.
|
|
127
|
+
*/
|
|
53
128
|
styleNonce?: string;
|
|
129
|
+
/**
|
|
130
|
+
* Use this to pass a shadow DOM target to the devtools so that the styles will be applied
|
|
131
|
+
* within the shadow DOM instead of within the head tag in the light DOM.
|
|
132
|
+
*/
|
|
54
133
|
shadowDOMTarget?: ShadowRoot;
|
|
134
|
+
/**
|
|
135
|
+
* Callback function that is called when the devtools panel is closed.
|
|
136
|
+
*/
|
|
55
137
|
onClose?: () => void;
|
|
56
138
|
}
|
|
57
139
|
declare class TanstackQueryDevtoolsPanel {
|
package/build/index.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/contexts/types.ts","../src/TanstackQueryDevtools.tsx","../src/TanstackQueryDevtoolsPanel.tsx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/contexts/types.ts","../src/TanstackQueryDevtools.tsx","../src/TanstackQueryDevtoolsPanel.tsx"],"mappings":";;;KAYK;KACA;;;;KAKO,mBAAmB,YAAY;;;;;KAK/B,4BAA4B,aAAa;;;;KAIzC;;;;UAKK;;;;EAIf;;;;EAIA,cAAc,OAAO,UAAU;;;;;;;UAQhB;;;;WAIN,QAAQ;;;;EAIjB;;;;EAIA;;;;EAIA,sBAAsB;;;;EAKtB,iBAAiB;;;;EAIjB,WAAW;;;;EAIX;;;;EAIA,aAAa,MAAM;;;;;EAKnB,kBAAkB;;;;;EAKlB;;;;EAIA;;;;EAIA,QAAQ;;;;;;;UC/EO,oCAAoC;;;;;EAKnD;;;;;EAKA,kBAAkB;;cAGd;;EAiBQ,YAAA,QAAQ;EA6BpB,kBAAkB,UAAU;EAI5B,YAAY,UAAU;EAItB,iBAAiB;EAIjB,cAAc,YAAY,MAAM;EAIhC,UAAU,QAAQ;EAIlB,SAAS,QAAQ;EAIjB,MAAM,UAAU,aAAa,IAAI;EA0DjC;;;;;;;UC7Ie,yCAAyC;;;;;EAKxD;;;;;EAKA,kBAAkB;;;;EAIlB;;cAGI;;EAkBQ,YAAA,QAAQ;EA+BpB,kBAAkB,UAAU;EAI5B,YAAY,UAAU;EAItB,iBAAiB;EAIjB,cAAc,YAAY,MAAM;EAIhC,UAAU,QAAQ;EAIlB,WAAW;EAIX,SAAS,QAAQ;EAIjB,MAAM,UAAU,aAAa,IAAI;EA8DjC"}
|
package/build/index.d.ts
CHANGED
|
@@ -1,10 +1,24 @@
|
|
|
1
1
|
import { Query, QueryClient, onlineManager } from "@tanstack/query-core";
|
|
2
|
+
import "solid-js";
|
|
2
3
|
//#region src/contexts/types.d.ts
|
|
3
4
|
type XPosition = 'left' | 'right';
|
|
4
5
|
type YPosition = 'top' | 'bottom';
|
|
6
|
+
/**
|
|
7
|
+
* The side of the screen the devtools panel opens on.
|
|
8
|
+
*/
|
|
5
9
|
type DevtoolsPosition = XPosition | YPosition;
|
|
10
|
+
/**
|
|
11
|
+
* The corner of the screen the toggle button is placed in, or `'relative'` to place it in the
|
|
12
|
+
* normal document flow.
|
|
13
|
+
*/
|
|
6
14
|
type DevtoolsButtonPosition = `${YPosition}-${XPosition}` | 'relative';
|
|
15
|
+
/**
|
|
16
|
+
* The color theme of the devtools. `'system'` follows the user's color scheme preference.
|
|
17
|
+
*/
|
|
7
18
|
type Theme = 'dark' | 'light' | 'system';
|
|
19
|
+
/**
|
|
20
|
+
* A custom error that can be triggered on a query from the devtools.
|
|
21
|
+
*/
|
|
8
22
|
interface DevtoolsErrorType {
|
|
9
23
|
/**
|
|
10
24
|
* The name of the error.
|
|
@@ -15,24 +29,78 @@ interface DevtoolsErrorType {
|
|
|
15
29
|
*/
|
|
16
30
|
initializer: (query: Query) => Error;
|
|
17
31
|
}
|
|
32
|
+
/**
|
|
33
|
+
* The options shared by every devtools entry point: the `client` to inspect, the adapter's
|
|
34
|
+
* `queryFlavor` and `version` shown in the header, and the display options.
|
|
35
|
+
* `onClose` is only used by the panel entry point.
|
|
36
|
+
*/
|
|
18
37
|
interface QueryDevtoolsProps {
|
|
38
|
+
/**
|
|
39
|
+
* The `QueryClient` whose caches the devtools inspect.
|
|
40
|
+
*/
|
|
19
41
|
readonly client: QueryClient;
|
|
42
|
+
/**
|
|
43
|
+
* The adapter name shown next to the logo in the header, e.g. `'React Query'`.
|
|
44
|
+
*/
|
|
20
45
|
queryFlavor: string;
|
|
46
|
+
/**
|
|
47
|
+
* The adapter version shown next to `queryFlavor` in the header.
|
|
48
|
+
*/
|
|
21
49
|
version: string;
|
|
50
|
+
/**
|
|
51
|
+
* The `onlineManager` the devtools read and toggle to simulate going offline.
|
|
52
|
+
*/
|
|
22
53
|
onlineManager: typeof onlineManager;
|
|
54
|
+
/**
|
|
55
|
+
* The position of the TanStack logo to open and close the devtools panel.
|
|
56
|
+
*/
|
|
23
57
|
buttonPosition?: DevtoolsButtonPosition;
|
|
58
|
+
/**
|
|
59
|
+
* The position of the devtools panel.
|
|
60
|
+
*/
|
|
24
61
|
position?: DevtoolsPosition;
|
|
62
|
+
/**
|
|
63
|
+
* Set this to `true` if you want the devtools to default to being open.
|
|
64
|
+
*/
|
|
25
65
|
initialIsOpen?: boolean;
|
|
66
|
+
/**
|
|
67
|
+
* Use this so you can define custom errors that can be shown in the devtools.
|
|
68
|
+
*/
|
|
26
69
|
errorTypes?: Array<DevtoolsErrorType>;
|
|
70
|
+
/**
|
|
71
|
+
* Use this to pass a shadow DOM target to the devtools so that the styles will be applied
|
|
72
|
+
* within the shadow DOM instead of within the head tag in the light DOM.
|
|
73
|
+
*/
|
|
27
74
|
shadowDOMTarget?: ShadowRoot;
|
|
75
|
+
/**
|
|
76
|
+
* Callback function that is called when the devtools panel is closed. Only used by the panel
|
|
77
|
+
* entry point.
|
|
78
|
+
*/
|
|
28
79
|
onClose?: () => void;
|
|
80
|
+
/**
|
|
81
|
+
* Set this to `true` to hide disabled queries from the devtools panel.
|
|
82
|
+
*/
|
|
29
83
|
hideDisabledQueries?: boolean;
|
|
84
|
+
/**
|
|
85
|
+
* Set this to `'light'`, `'dark'`, or `'system'` to change the theme of the devtools panel.
|
|
86
|
+
*/
|
|
30
87
|
theme?: Theme;
|
|
31
88
|
}
|
|
32
89
|
//#endregion
|
|
33
90
|
//#region src/TanstackQueryDevtools.d.ts
|
|
91
|
+
/**
|
|
92
|
+
* The options for `TanstackQueryDevtools`, which mounts the floating devtools.
|
|
93
|
+
*/
|
|
34
94
|
interface TanstackQueryDevtoolsConfig extends QueryDevtoolsProps {
|
|
95
|
+
/**
|
|
96
|
+
* Use this to pass a nonce to the style tag that is added to the document head. This is useful if
|
|
97
|
+
* you are using a Content Security Policy (CSP) nonce to allow inline styles.
|
|
98
|
+
*/
|
|
35
99
|
styleNonce?: string;
|
|
100
|
+
/**
|
|
101
|
+
* Use this to pass a shadow DOM target to the devtools so that the styles will be applied
|
|
102
|
+
* within the shadow DOM instead of within the head tag in the light DOM.
|
|
103
|
+
*/
|
|
36
104
|
shadowDOMTarget?: ShadowRoot;
|
|
37
105
|
}
|
|
38
106
|
declare class TanstackQueryDevtools {
|
|
@@ -49,9 +117,23 @@ declare class TanstackQueryDevtools {
|
|
|
49
117
|
}
|
|
50
118
|
//#endregion
|
|
51
119
|
//#region src/TanstackQueryDevtoolsPanel.d.ts
|
|
120
|
+
/**
|
|
121
|
+
* The options for `TanstackQueryDevtoolsPanel`, which mounts the devtools as an embedded panel.
|
|
122
|
+
*/
|
|
52
123
|
interface TanstackQueryDevtoolsPanelConfig extends QueryDevtoolsProps {
|
|
124
|
+
/**
|
|
125
|
+
* Use this to pass a nonce to the style tag that is added to the document head. This is useful if
|
|
126
|
+
* you are using a Content Security Policy (CSP) nonce to allow inline styles.
|
|
127
|
+
*/
|
|
53
128
|
styleNonce?: string;
|
|
129
|
+
/**
|
|
130
|
+
* Use this to pass a shadow DOM target to the devtools so that the styles will be applied
|
|
131
|
+
* within the shadow DOM instead of within the head tag in the light DOM.
|
|
132
|
+
*/
|
|
54
133
|
shadowDOMTarget?: ShadowRoot;
|
|
134
|
+
/**
|
|
135
|
+
* Callback function that is called when the devtools panel is closed.
|
|
136
|
+
*/
|
|
55
137
|
onClose?: () => void;
|
|
56
138
|
}
|
|
57
139
|
declare class TanstackQueryDevtoolsPanel {
|
package/build/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/contexts/types.ts","../src/TanstackQueryDevtools.tsx","../src/TanstackQueryDevtoolsPanel.tsx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/contexts/types.ts","../src/TanstackQueryDevtools.tsx","../src/TanstackQueryDevtoolsPanel.tsx"],"mappings":";;;KAYK;KACA;;;;KAKO,mBAAmB,YAAY;;;;;KAK/B,4BAA4B,aAAa;;;;KAIzC;;;;UAKK;;;;EAIf;;;;EAIA,cAAc,OAAO,UAAU;;;;;;;UAQhB;;;;WAIN,QAAQ;;;;EAIjB;;;;EAIA;;;;EAIA,sBAAsB;;;;EAKtB,iBAAiB;;;;EAIjB,WAAW;;;;EAIX;;;;EAIA,aAAa,MAAM;;;;;EAKnB,kBAAkB;;;;;EAKlB;;;;EAIA;;;;EAIA,QAAQ;;;;;;;UC/EO,oCAAoC;;;;;EAKnD;;;;;EAKA,kBAAkB;;cAGd;;EAiBQ,YAAA,QAAQ;EA6BpB,kBAAkB,UAAU;EAI5B,YAAY,UAAU;EAItB,iBAAiB;EAIjB,cAAc,YAAY,MAAM;EAIhC,UAAU,QAAQ;EAIlB,SAAS,QAAQ;EAIjB,MAAM,UAAU,aAAa,IAAI;EA0DjC;;;;;;;UC7Ie,yCAAyC;;;;;EAKxD;;;;;EAKA,kBAAkB;;;;EAIlB;;cAGI;;EAkBQ,YAAA,QAAQ;EA+BpB,kBAAkB,UAAU;EAI5B,YAAY,UAAU;EAItB,iBAAiB;EAIjB,cAAc,YAAY,MAAM;EAIhC,UAAU,QAAQ;EAIlB,WAAW;EAIX,SAAS,QAAQ;EAIjB,MAAM,UAAU,aAAa,IAAI;EA8DjC"}
|
package/build/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{J as e,L as t,W as n,d as r,q as i,w as a}from"./utils-po3vZo_N.js";var o=class{#e;#t;#n;#r;#i=!1;#a;#o;#s;#c;#l;#u;#d;#f;#p;#m;constructor(e){let{client:t,queryFlavor:r,version:i,onlineManager:a,buttonPosition:o,position:s,initialIsOpen:c,errorTypes:l,styleNonce:u,shadowDOMTarget:d,hideDisabledQueries:f,theme:p}=e;this.#e=n(t),this.#n=r,this.#r=i,this.#t=a,this.#a=u,this.#o=d,this.#s=n(o),this.#c=n(s),this.#l=n(c),this.#u=n(l),this.#d=n(f),this.#p=n(p)}setButtonPosition(e){this.#s[1](e)}setPosition(e){this.#c[1](e)}setInitialIsOpen(e){this.#l[1](e)}setErrorTypes(e){this.#u[1](e)}setClient(e){this.#e[1](e)}setTheme(e){this.#p[1](e)}mount(n){if(this.#i)throw Error(`Devtools is already mounted`);let o=a(()=>{let n=this,[a]=this.#s,[o]=this.#c,[s]=this.#l,[c]=this.#u,[l]=this.#d,[u]=this.#e,[d]=this.#p,f;return this.#f?f=this.#f:(f=i(()=>import(`./DevtoolsComponent-
|
|
1
|
+
import{J as e,L as t,W as n,d as r,q as i,w as a}from"./utils-po3vZo_N.js";var o=class{#e;#t;#n;#r;#i=!1;#a;#o;#s;#c;#l;#u;#d;#f;#p;#m;constructor(e){let{client:t,queryFlavor:r,version:i,onlineManager:a,buttonPosition:o,position:s,initialIsOpen:c,errorTypes:l,styleNonce:u,shadowDOMTarget:d,hideDisabledQueries:f,theme:p}=e;this.#e=n(t),this.#n=r,this.#r=i,this.#t=a,this.#a=u,this.#o=d,this.#s=n(o),this.#c=n(s),this.#l=n(c),this.#u=n(l),this.#d=n(f),this.#p=n(p)}setButtonPosition(e){this.#s[1](e)}setPosition(e){this.#c[1](e)}setInitialIsOpen(e){this.#l[1](e)}setErrorTypes(e){this.#u[1](e)}setClient(e){this.#e[1](e)}setTheme(e){this.#p[1](e)}mount(n){if(this.#i)throw Error(`Devtools is already mounted`);let o=a(()=>{let n=this,[a]=this.#s,[o]=this.#c,[s]=this.#l,[c]=this.#u,[l]=this.#d,[u]=this.#e,[d]=this.#p,f;return this.#f?f=this.#f:(f=i(()=>import(`./DevtoolsComponent-B-JX7seJ.js`)),this.#f=f),r(this.#a,this.#o),t(f,e({get queryFlavor(){return n.#n},get version(){return n.#r},get onlineManager(){return n.#t},get shadowDOMTarget(){return n.#o}},{get client(){return u()},get buttonPosition(){return a()},get position(){return o()},get initialIsOpen(){return s()},get errorTypes(){return c()},get hideDisabledQueries(){return l()},get theme(){return d()}}))},n);this.#i=!0,this.#m=o}unmount(){if(!this.#i)throw Error(`Devtools is not mounted`);this.#m?.(),this.#i=!1}},s=class{#e;#t;#n;#r;#i=!1;#a;#o;#s;#c;#l;#u;#d;#f;#p;#m;#h;constructor(e){let{client:t,queryFlavor:r,version:i,onlineManager:a,buttonPosition:o,position:s,initialIsOpen:c,errorTypes:l,styleNonce:u,shadowDOMTarget:d,onClose:f,hideDisabledQueries:p,theme:m}=e;this.#e=n(t),this.#n=r,this.#r=i,this.#t=a,this.#a=u,this.#o=d,this.#s=n(o),this.#c=n(s),this.#l=n(c),this.#u=n(l),this.#d=n(p),this.#f=n(f),this.#m=n(m)}setButtonPosition(e){this.#s[1](e)}setPosition(e){this.#c[1](e)}setInitialIsOpen(e){this.#l[1](e)}setErrorTypes(e){this.#u[1](e)}setClient(e){this.#e[1](e)}setOnClose(e){this.#f[1](()=>e)}setTheme(e){this.#m[1](e)}mount(n){if(this.#i)throw Error(`Devtools is already mounted`);let o=a(()=>{let n=this,[a]=this.#s,[o]=this.#c,[s]=this.#l,[c]=this.#u,[l]=this.#d,[u]=this.#e,[d]=this.#f,[f]=this.#m,p;return this.#p?p=this.#p:(p=i(()=>import(`./DevtoolsPanelComponent-CdrNDWsc.js`)),this.#p=p),r(this.#a,this.#o),t(p,e({get queryFlavor(){return n.#n},get version(){return n.#r},get onlineManager(){return n.#t},get shadowDOMTarget(){return n.#o}},{get client(){return u()},get buttonPosition(){return a()},get position(){return o()},get initialIsOpen(){return s()},get errorTypes(){return c()},get hideDisabledQueries(){return l()},get onClose(){return d()},get theme(){return f()}}))},n);this.#i=!0,this.#h=o}unmount(){if(!this.#i)throw Error(`Devtools is not mounted`);this.#h?.(),this.#i=!1}};export{o as TanstackQueryDevtools,s as TanstackQueryDevtoolsPanel};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|