@tanstack/preact-query-devtools 5.94.4 → 5.95.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/legacy/PreactQueryDevtools.cjs +95 -0
- package/build/legacy/PreactQueryDevtools.cjs.map +1 -0
- package/build/legacy/PreactQueryDevtools.d.cts +2 -0
- package/build/legacy/PreactQueryDevtools.d.ts +2 -0
- package/build/legacy/PreactQueryDevtools.js +70 -0
- package/build/legacy/PreactQueryDevtools.js.map +1 -0
- package/build/legacy/PreactQueryDevtoolsPanel.cjs +91 -0
- package/build/legacy/PreactQueryDevtoolsPanel.cjs.map +1 -0
- package/build/legacy/PreactQueryDevtoolsPanel.d.cts +2 -0
- package/build/legacy/PreactQueryDevtoolsPanel.d.ts +2 -0
- package/build/legacy/PreactQueryDevtoolsPanel.js +66 -0
- package/build/legacy/PreactQueryDevtoolsPanel.js.map +1 -0
- package/build/legacy/_tsup-dts-rollup.d.cts +149 -0
- package/build/legacy/_tsup-dts-rollup.d.ts +149 -0
- package/build/legacy/index.cjs +50 -0
- package/build/legacy/index.cjs.map +1 -0
- package/build/legacy/index.d.cts +3 -0
- package/build/legacy/index.d.ts +3 -0
- package/build/legacy/index.js +14 -0
- package/build/legacy/index.js.map +1 -0
- package/build/legacy/production.cjs +46 -0
- package/build/legacy/production.cjs.map +1 -0
- package/build/legacy/production.d.cts +2 -0
- package/build/legacy/production.d.ts +2 -0
- package/build/legacy/production.js +10 -0
- package/build/legacy/production.js.map +1 -0
- package/build/modern/PreactQueryDevtools.cjs +95 -0
- package/build/modern/PreactQueryDevtools.cjs.map +1 -0
- package/build/modern/PreactQueryDevtools.d.cts +2 -0
- package/build/modern/PreactQueryDevtools.d.ts +2 -0
- package/build/modern/PreactQueryDevtools.js +70 -0
- package/build/modern/PreactQueryDevtools.js.map +1 -0
- package/build/modern/PreactQueryDevtoolsPanel.cjs +91 -0
- package/build/modern/PreactQueryDevtoolsPanel.cjs.map +1 -0
- package/build/modern/PreactQueryDevtoolsPanel.d.cts +2 -0
- package/build/modern/PreactQueryDevtoolsPanel.d.ts +2 -0
- package/build/modern/PreactQueryDevtoolsPanel.js +66 -0
- package/build/modern/PreactQueryDevtoolsPanel.js.map +1 -0
- package/build/modern/_tsup-dts-rollup.d.cts +149 -0
- package/build/modern/_tsup-dts-rollup.d.ts +149 -0
- package/build/modern/index.cjs +50 -0
- package/build/modern/index.cjs.map +1 -0
- package/build/modern/index.d.cts +3 -0
- package/build/modern/index.d.ts +3 -0
- package/build/modern/index.js +14 -0
- package/build/modern/index.js.map +1 -0
- package/build/modern/production.cjs +46 -0
- package/build/modern/production.cjs.map +1 -0
- package/build/modern/production.d.cts +2 -0
- package/build/modern/production.d.ts +2 -0
- package/build/modern/production.js +10 -0
- package/build/modern/production.js.map +1 -0
- package/package.json +4 -4
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
// src/PreactQueryDevtoolsPanel.tsx
|
|
2
|
+
import { useRef, useState, useEffect } from "preact/hooks";
|
|
3
|
+
import { onlineManager, useQueryClient } from "@tanstack/preact-query";
|
|
4
|
+
import { TanstackQueryDevtoolsPanel } from "@tanstack/query-devtools";
|
|
5
|
+
import { jsx } from "preact/jsx-runtime";
|
|
6
|
+
function PreactQueryDevtoolsPanel(props) {
|
|
7
|
+
const queryClient = useQueryClient(props.client);
|
|
8
|
+
const ref = useRef(null);
|
|
9
|
+
const {
|
|
10
|
+
errorTypes,
|
|
11
|
+
styleNonce,
|
|
12
|
+
shadowDOMTarget,
|
|
13
|
+
hideDisabledQueries,
|
|
14
|
+
theme
|
|
15
|
+
} = props;
|
|
16
|
+
const [devtools] = useState(
|
|
17
|
+
() => new TanstackQueryDevtoolsPanel({
|
|
18
|
+
client: queryClient,
|
|
19
|
+
queryFlavor: "Preact Query",
|
|
20
|
+
version: "5",
|
|
21
|
+
onlineManager,
|
|
22
|
+
buttonPosition: "bottom-left",
|
|
23
|
+
position: "bottom",
|
|
24
|
+
initialIsOpen: true,
|
|
25
|
+
errorTypes,
|
|
26
|
+
styleNonce,
|
|
27
|
+
shadowDOMTarget,
|
|
28
|
+
onClose: props.onClose,
|
|
29
|
+
hideDisabledQueries,
|
|
30
|
+
theme
|
|
31
|
+
})
|
|
32
|
+
);
|
|
33
|
+
useEffect(() => {
|
|
34
|
+
devtools.setClient(queryClient);
|
|
35
|
+
}, [queryClient, devtools]);
|
|
36
|
+
useEffect(() => {
|
|
37
|
+
devtools.setOnClose(props.onClose ?? (() => {
|
|
38
|
+
}));
|
|
39
|
+
}, [props.onClose, devtools]);
|
|
40
|
+
useEffect(() => {
|
|
41
|
+
devtools.setErrorTypes(errorTypes || []);
|
|
42
|
+
}, [errorTypes, devtools]);
|
|
43
|
+
useEffect(() => {
|
|
44
|
+
devtools.setTheme(theme);
|
|
45
|
+
}, [theme, devtools]);
|
|
46
|
+
useEffect(() => {
|
|
47
|
+
if (ref.current) {
|
|
48
|
+
devtools.mount(ref.current);
|
|
49
|
+
}
|
|
50
|
+
return () => {
|
|
51
|
+
devtools.unmount();
|
|
52
|
+
};
|
|
53
|
+
}, [devtools]);
|
|
54
|
+
return /* @__PURE__ */ jsx(
|
|
55
|
+
"div",
|
|
56
|
+
{
|
|
57
|
+
style: { height: "500px", ...props.style },
|
|
58
|
+
className: "tsqd-parent-container",
|
|
59
|
+
ref
|
|
60
|
+
}
|
|
61
|
+
);
|
|
62
|
+
}
|
|
63
|
+
export {
|
|
64
|
+
PreactQueryDevtoolsPanel
|
|
65
|
+
};
|
|
66
|
+
//# sourceMappingURL=PreactQueryDevtoolsPanel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/PreactQueryDevtoolsPanel.tsx"],"sourcesContent":["import { useRef, useState, useEffect } from 'preact/hooks'\nimport { onlineManager, useQueryClient } from '@tanstack/preact-query'\nimport { TanstackQueryDevtoolsPanel } from '@tanstack/query-devtools'\nimport type { DevtoolsErrorType, Theme } from '@tanstack/query-devtools'\nimport type { QueryClient } from '@tanstack/preact-query'\nimport type { JSX, VNode } from 'preact'\n\nexport interface DevtoolsPanelOptions {\n /**\n * Use this to provide a custom QueryClient. Otherwise, the one from the\n * nearest QueryClientProvider will be used.\n */\n client?: QueryClient\n /**\n * Custom error types to be shown in the devtools.\n */\n errorTypes?: Array<DevtoolsErrorType>\n /**\n * Use this to pass a nonce to the style tag that is added to the document\n * head. This is useful if you are using a Content Security Policy (CSP)\n * nonce to allow inline styles.\n */\n styleNonce?: string\n /**\n * Use this to render the devtools inside a Shadow DOM.\n */\n shadowDOMTarget?: ShadowRoot\n /**\n * Custom styles for the devtools panel container.\n */\n style?: JSX.CSSProperties\n /**\n * Callback function when the devtools panel is closed.\n */\n onClose?: () => unknown\n /**\n * Use this to hide disabled queries from the devtools panel.\n */\n hideDisabledQueries?: boolean\n /**\n * Use this to set the theme of the devtools panel.\n * Defaults to 'system'.\n */\n theme?: Theme\n}\n\nexport function PreactQueryDevtoolsPanel(\n props: DevtoolsPanelOptions,\n): VNode | null {\n const queryClient = useQueryClient(props.client)\n const ref = useRef<HTMLDivElement>(null)\n const {\n errorTypes,\n styleNonce,\n shadowDOMTarget,\n hideDisabledQueries,\n theme,\n } = props\n const [devtools] = useState(\n () =>\n new TanstackQueryDevtoolsPanel({\n client: queryClient,\n queryFlavor: 'Preact Query',\n version: '5',\n onlineManager,\n buttonPosition: 'bottom-left',\n position: 'bottom',\n initialIsOpen: true,\n errorTypes,\n styleNonce,\n shadowDOMTarget,\n onClose: props.onClose,\n hideDisabledQueries,\n theme,\n }),\n )\n\n useEffect(() => {\n devtools.setClient(queryClient)\n }, [queryClient, devtools])\n\n useEffect(() => {\n devtools.setOnClose(props.onClose ?? (() => {}))\n }, [props.onClose, devtools])\n\n useEffect(() => {\n devtools.setErrorTypes(errorTypes || [])\n }, [errorTypes, devtools])\n\n useEffect(() => {\n devtools.setTheme(theme)\n }, [theme, devtools])\n\n useEffect(() => {\n if (ref.current) {\n devtools.mount(ref.current)\n }\n return () => {\n devtools.unmount()\n }\n }, [devtools])\n\n return (\n <div\n style={{ height: '500px', ...props.style }}\n className=\"tsqd-parent-container\"\n ref={ref}\n />\n )\n}\n"],"mappings":";AAAA,SAAS,QAAQ,UAAU,iBAAiB;AAC5C,SAAS,eAAe,sBAAsB;AAC9C,SAAS,kCAAkC;AAqGvC;AAzDG,SAAS,yBACd,OACc;AACd,QAAM,cAAc,eAAe,MAAM,MAAM;AAC/C,QAAM,MAAM,OAAuB,IAAI;AACvC,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,IAAI;AACJ,QAAM,CAAC,QAAQ,IAAI;AAAA,IACjB,MACE,IAAI,2BAA2B;AAAA,MAC7B,QAAQ;AAAA,MACR,aAAa;AAAA,MACb,SAAS;AAAA,MACT;AAAA,MACA,gBAAgB;AAAA,MAChB,UAAU;AAAA,MACV,eAAe;AAAA,MACf;AAAA,MACA;AAAA,MACA;AAAA,MACA,SAAS,MAAM;AAAA,MACf;AAAA,MACA;AAAA,IACF,CAAC;AAAA,EACL;AAEA,YAAU,MAAM;AACd,aAAS,UAAU,WAAW;AAAA,EAChC,GAAG,CAAC,aAAa,QAAQ,CAAC;AAE1B,YAAU,MAAM;AACd,aAAS,WAAW,MAAM,YAAY,MAAM;AAAA,IAAC,EAAE;AAAA,EACjD,GAAG,CAAC,MAAM,SAAS,QAAQ,CAAC;AAE5B,YAAU,MAAM;AACd,aAAS,cAAc,cAAc,CAAC,CAAC;AAAA,EACzC,GAAG,CAAC,YAAY,QAAQ,CAAC;AAEzB,YAAU,MAAM;AACd,aAAS,SAAS,KAAK;AAAA,EACzB,GAAG,CAAC,OAAO,QAAQ,CAAC;AAEpB,YAAU,MAAM;AACd,QAAI,IAAI,SAAS;AACf,eAAS,MAAM,IAAI,OAAO;AAAA,IAC5B;AACA,WAAO,MAAM;AACX,eAAS,QAAQ;AAAA,IACnB;AAAA,EACF,GAAG,CAAC,QAAQ,CAAC;AAEb,SACE;AAAA,IAAC;AAAA;AAAA,MACC,OAAO,EAAE,QAAQ,SAAS,GAAG,MAAM,MAAM;AAAA,MACzC,WAAU;AAAA,MACV;AAAA;AAAA,EACF;AAEJ;","names":[]}
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
import type { DevtoolsButtonPosition } from '@tanstack/query-devtools';
|
|
2
|
+
import type { DevtoolsErrorType } from '@tanstack/query-devtools';
|
|
3
|
+
import type { DevtoolsPosition } from '@tanstack/query-devtools';
|
|
4
|
+
import type { JSX } from 'preact';
|
|
5
|
+
import { Options } from 'tsup';
|
|
6
|
+
import type { QueryClient } from '@tanstack/preact-query';
|
|
7
|
+
import type { Theme } from '@tanstack/query-devtools';
|
|
8
|
+
import type { UserConfig } from 'vite';
|
|
9
|
+
import type { VNode } from 'preact';
|
|
10
|
+
|
|
11
|
+
export declare const default_alias: any[];
|
|
12
|
+
|
|
13
|
+
export declare const default_alias_1: any[];
|
|
14
|
+
|
|
15
|
+
export declare const default_alias_2: Options | Options[] | ((overrideOptions: Options) => Options | Options[] | Promise<Options | Options[]>);
|
|
16
|
+
|
|
17
|
+
export declare const default_alias_3: UserConfig;
|
|
18
|
+
|
|
19
|
+
declare namespace Devtools {
|
|
20
|
+
export {
|
|
21
|
+
PreactQueryDevtools,
|
|
22
|
+
DevtoolsOptions
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export declare interface DevtoolsOptions {
|
|
27
|
+
/**
|
|
28
|
+
* Set this true if you want the dev tools to default to being open
|
|
29
|
+
*/
|
|
30
|
+
initialIsOpen?: boolean;
|
|
31
|
+
/**
|
|
32
|
+
* The position of the TanStack logo to open and close the devtools panel.
|
|
33
|
+
* Defaults to 'bottom-right'.
|
|
34
|
+
*/
|
|
35
|
+
buttonPosition?: DevtoolsButtonPosition;
|
|
36
|
+
/**
|
|
37
|
+
* The position of the Preact Query devtools panel.
|
|
38
|
+
* Defaults to 'bottom'.
|
|
39
|
+
*/
|
|
40
|
+
position?: DevtoolsPosition;
|
|
41
|
+
/**
|
|
42
|
+
* Use this to provide a custom QueryClient. Otherwise, the one from the
|
|
43
|
+
* nearest QueryClientProvider will be used.
|
|
44
|
+
*/
|
|
45
|
+
client?: QueryClient;
|
|
46
|
+
/**
|
|
47
|
+
* Use this to provide custom error type handlers for the devtools panel.
|
|
48
|
+
*/
|
|
49
|
+
errorTypes?: Array<DevtoolsErrorType>;
|
|
50
|
+
/**
|
|
51
|
+
* Use this to pass a nonce to the style tag that is added to the document
|
|
52
|
+
* head. This is useful if you are using a Content Security Policy (CSP)
|
|
53
|
+
* nonce to allow inline styles.
|
|
54
|
+
*/
|
|
55
|
+
styleNonce?: string;
|
|
56
|
+
/**
|
|
57
|
+
* Use this to render the devtools inside a Shadow DOM.
|
|
58
|
+
*/
|
|
59
|
+
shadowDOMTarget?: ShadowRoot;
|
|
60
|
+
/**
|
|
61
|
+
* Use this to hide disabled queries from the devtools panel.
|
|
62
|
+
*/
|
|
63
|
+
hideDisabledQueries?: boolean;
|
|
64
|
+
/**
|
|
65
|
+
* Use this to set the theme of the devtools panel.
|
|
66
|
+
* Defaults to 'system'.
|
|
67
|
+
*/
|
|
68
|
+
theme?: Theme;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
declare namespace DevtoolsPanel {
|
|
72
|
+
export {
|
|
73
|
+
PreactQueryDevtoolsPanel,
|
|
74
|
+
DevtoolsPanelOptions
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export declare interface DevtoolsPanelOptions {
|
|
79
|
+
/**
|
|
80
|
+
* Use this to provide a custom QueryClient. Otherwise, the one from the
|
|
81
|
+
* nearest QueryClientProvider will be used.
|
|
82
|
+
*/
|
|
83
|
+
client?: QueryClient;
|
|
84
|
+
/**
|
|
85
|
+
* Custom error types to be shown in the devtools.
|
|
86
|
+
*/
|
|
87
|
+
errorTypes?: Array<DevtoolsErrorType>;
|
|
88
|
+
/**
|
|
89
|
+
* Use this to pass a nonce to the style tag that is added to the document
|
|
90
|
+
* head. This is useful if you are using a Content Security Policy (CSP)
|
|
91
|
+
* nonce to allow inline styles.
|
|
92
|
+
*/
|
|
93
|
+
styleNonce?: string;
|
|
94
|
+
/**
|
|
95
|
+
* Use this to render the devtools inside a Shadow DOM.
|
|
96
|
+
*/
|
|
97
|
+
shadowDOMTarget?: ShadowRoot;
|
|
98
|
+
/**
|
|
99
|
+
* Custom styles for the devtools panel container.
|
|
100
|
+
*/
|
|
101
|
+
style?: JSX.CSSProperties;
|
|
102
|
+
/**
|
|
103
|
+
* Callback function when the devtools panel is closed.
|
|
104
|
+
*/
|
|
105
|
+
onClose?: () => unknown;
|
|
106
|
+
/**
|
|
107
|
+
* Use this to hide disabled queries from the devtools panel.
|
|
108
|
+
*/
|
|
109
|
+
hideDisabledQueries?: boolean;
|
|
110
|
+
/**
|
|
111
|
+
* Use this to set the theme of the devtools panel.
|
|
112
|
+
* Defaults to 'system'.
|
|
113
|
+
*/
|
|
114
|
+
theme?: Theme;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
export declare type DevtoolsPanelOptions_alias_1 = DevtoolsPanel.DevtoolsPanelOptions;
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* @param {Object} opts - Options for building configurations.
|
|
121
|
+
* @param {string[]} opts.entry - The entry array.
|
|
122
|
+
* @returns {import('tsup').Options}
|
|
123
|
+
*/
|
|
124
|
+
export declare function legacyConfig(opts: {
|
|
125
|
+
entry: string[];
|
|
126
|
+
}): Options;
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* @param {Object} opts - Options for building configurations.
|
|
130
|
+
* @param {string[]} opts.entry - The entry array.
|
|
131
|
+
* @returns {import('tsup').Options}
|
|
132
|
+
*/
|
|
133
|
+
export declare function modernConfig(opts: {
|
|
134
|
+
entry: string[];
|
|
135
|
+
}): Options;
|
|
136
|
+
|
|
137
|
+
export declare function PreactQueryDevtools(props: DevtoolsOptions): VNode | null;
|
|
138
|
+
|
|
139
|
+
export declare const PreactQueryDevtools_alias_1: (typeof Devtools)['PreactQueryDevtools'];
|
|
140
|
+
|
|
141
|
+
export declare const PreactQueryDevtools_alias_2: typeof Devtools.PreactQueryDevtools;
|
|
142
|
+
|
|
143
|
+
export declare function PreactQueryDevtoolsPanel(props: DevtoolsPanelOptions): VNode | null;
|
|
144
|
+
|
|
145
|
+
export declare const PreactQueryDevtoolsPanel_alias_1: (typeof DevtoolsPanel)['PreactQueryDevtoolsPanel'];
|
|
146
|
+
|
|
147
|
+
export declare const PreactQueryDevtoolsPanel_alias_2: typeof DevtoolsPanel.PreactQueryDevtoolsPanel;
|
|
148
|
+
|
|
149
|
+
export { }
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
import type { DevtoolsButtonPosition } from '@tanstack/query-devtools';
|
|
2
|
+
import type { DevtoolsErrorType } from '@tanstack/query-devtools';
|
|
3
|
+
import type { DevtoolsPosition } from '@tanstack/query-devtools';
|
|
4
|
+
import type { JSX } from 'preact';
|
|
5
|
+
import { Options } from 'tsup';
|
|
6
|
+
import type { QueryClient } from '@tanstack/preact-query';
|
|
7
|
+
import type { Theme } from '@tanstack/query-devtools';
|
|
8
|
+
import type { UserConfig } from 'vite';
|
|
9
|
+
import type { VNode } from 'preact';
|
|
10
|
+
|
|
11
|
+
export declare const default_alias: any[];
|
|
12
|
+
|
|
13
|
+
export declare const default_alias_1: any[];
|
|
14
|
+
|
|
15
|
+
export declare const default_alias_2: Options | Options[] | ((overrideOptions: Options) => Options | Options[] | Promise<Options | Options[]>);
|
|
16
|
+
|
|
17
|
+
export declare const default_alias_3: UserConfig;
|
|
18
|
+
|
|
19
|
+
declare namespace Devtools {
|
|
20
|
+
export {
|
|
21
|
+
PreactQueryDevtools,
|
|
22
|
+
DevtoolsOptions
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export declare interface DevtoolsOptions {
|
|
27
|
+
/**
|
|
28
|
+
* Set this true if you want the dev tools to default to being open
|
|
29
|
+
*/
|
|
30
|
+
initialIsOpen?: boolean;
|
|
31
|
+
/**
|
|
32
|
+
* The position of the TanStack logo to open and close the devtools panel.
|
|
33
|
+
* Defaults to 'bottom-right'.
|
|
34
|
+
*/
|
|
35
|
+
buttonPosition?: DevtoolsButtonPosition;
|
|
36
|
+
/**
|
|
37
|
+
* The position of the Preact Query devtools panel.
|
|
38
|
+
* Defaults to 'bottom'.
|
|
39
|
+
*/
|
|
40
|
+
position?: DevtoolsPosition;
|
|
41
|
+
/**
|
|
42
|
+
* Use this to provide a custom QueryClient. Otherwise, the one from the
|
|
43
|
+
* nearest QueryClientProvider will be used.
|
|
44
|
+
*/
|
|
45
|
+
client?: QueryClient;
|
|
46
|
+
/**
|
|
47
|
+
* Use this to provide custom error type handlers for the devtools panel.
|
|
48
|
+
*/
|
|
49
|
+
errorTypes?: Array<DevtoolsErrorType>;
|
|
50
|
+
/**
|
|
51
|
+
* Use this to pass a nonce to the style tag that is added to the document
|
|
52
|
+
* head. This is useful if you are using a Content Security Policy (CSP)
|
|
53
|
+
* nonce to allow inline styles.
|
|
54
|
+
*/
|
|
55
|
+
styleNonce?: string;
|
|
56
|
+
/**
|
|
57
|
+
* Use this to render the devtools inside a Shadow DOM.
|
|
58
|
+
*/
|
|
59
|
+
shadowDOMTarget?: ShadowRoot;
|
|
60
|
+
/**
|
|
61
|
+
* Use this to hide disabled queries from the devtools panel.
|
|
62
|
+
*/
|
|
63
|
+
hideDisabledQueries?: boolean;
|
|
64
|
+
/**
|
|
65
|
+
* Use this to set the theme of the devtools panel.
|
|
66
|
+
* Defaults to 'system'.
|
|
67
|
+
*/
|
|
68
|
+
theme?: Theme;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
declare namespace DevtoolsPanel {
|
|
72
|
+
export {
|
|
73
|
+
PreactQueryDevtoolsPanel,
|
|
74
|
+
DevtoolsPanelOptions
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export declare interface DevtoolsPanelOptions {
|
|
79
|
+
/**
|
|
80
|
+
* Use this to provide a custom QueryClient. Otherwise, the one from the
|
|
81
|
+
* nearest QueryClientProvider will be used.
|
|
82
|
+
*/
|
|
83
|
+
client?: QueryClient;
|
|
84
|
+
/**
|
|
85
|
+
* Custom error types to be shown in the devtools.
|
|
86
|
+
*/
|
|
87
|
+
errorTypes?: Array<DevtoolsErrorType>;
|
|
88
|
+
/**
|
|
89
|
+
* Use this to pass a nonce to the style tag that is added to the document
|
|
90
|
+
* head. This is useful if you are using a Content Security Policy (CSP)
|
|
91
|
+
* nonce to allow inline styles.
|
|
92
|
+
*/
|
|
93
|
+
styleNonce?: string;
|
|
94
|
+
/**
|
|
95
|
+
* Use this to render the devtools inside a Shadow DOM.
|
|
96
|
+
*/
|
|
97
|
+
shadowDOMTarget?: ShadowRoot;
|
|
98
|
+
/**
|
|
99
|
+
* Custom styles for the devtools panel container.
|
|
100
|
+
*/
|
|
101
|
+
style?: JSX.CSSProperties;
|
|
102
|
+
/**
|
|
103
|
+
* Callback function when the devtools panel is closed.
|
|
104
|
+
*/
|
|
105
|
+
onClose?: () => unknown;
|
|
106
|
+
/**
|
|
107
|
+
* Use this to hide disabled queries from the devtools panel.
|
|
108
|
+
*/
|
|
109
|
+
hideDisabledQueries?: boolean;
|
|
110
|
+
/**
|
|
111
|
+
* Use this to set the theme of the devtools panel.
|
|
112
|
+
* Defaults to 'system'.
|
|
113
|
+
*/
|
|
114
|
+
theme?: Theme;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
export declare type DevtoolsPanelOptions_alias_1 = DevtoolsPanel.DevtoolsPanelOptions;
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* @param {Object} opts - Options for building configurations.
|
|
121
|
+
* @param {string[]} opts.entry - The entry array.
|
|
122
|
+
* @returns {import('tsup').Options}
|
|
123
|
+
*/
|
|
124
|
+
export declare function legacyConfig(opts: {
|
|
125
|
+
entry: string[];
|
|
126
|
+
}): Options;
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* @param {Object} opts - Options for building configurations.
|
|
130
|
+
* @param {string[]} opts.entry - The entry array.
|
|
131
|
+
* @returns {import('tsup').Options}
|
|
132
|
+
*/
|
|
133
|
+
export declare function modernConfig(opts: {
|
|
134
|
+
entry: string[];
|
|
135
|
+
}): Options;
|
|
136
|
+
|
|
137
|
+
export declare function PreactQueryDevtools(props: DevtoolsOptions): VNode | null;
|
|
138
|
+
|
|
139
|
+
export declare const PreactQueryDevtools_alias_1: (typeof Devtools)['PreactQueryDevtools'];
|
|
140
|
+
|
|
141
|
+
export declare const PreactQueryDevtools_alias_2: typeof Devtools.PreactQueryDevtools;
|
|
142
|
+
|
|
143
|
+
export declare function PreactQueryDevtoolsPanel(props: DevtoolsPanelOptions): VNode | null;
|
|
144
|
+
|
|
145
|
+
export declare const PreactQueryDevtoolsPanel_alias_1: (typeof DevtoolsPanel)['PreactQueryDevtoolsPanel'];
|
|
146
|
+
|
|
147
|
+
export declare const PreactQueryDevtoolsPanel_alias_2: typeof DevtoolsPanel.PreactQueryDevtoolsPanel;
|
|
148
|
+
|
|
149
|
+
export { }
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
|
|
30
|
+
// src/index.ts
|
|
31
|
+
var index_exports = {};
|
|
32
|
+
__export(index_exports, {
|
|
33
|
+
PreactQueryDevtools: () => PreactQueryDevtools2,
|
|
34
|
+
PreactQueryDevtoolsPanel: () => PreactQueryDevtoolsPanel2
|
|
35
|
+
});
|
|
36
|
+
module.exports = __toCommonJS(index_exports);
|
|
37
|
+
var Devtools = __toESM(require("./PreactQueryDevtools.cjs"), 1);
|
|
38
|
+
var DevtoolsPanel = __toESM(require("./PreactQueryDevtoolsPanel.cjs"), 1);
|
|
39
|
+
var PreactQueryDevtools2 = process.env.NODE_ENV !== "development" ? function() {
|
|
40
|
+
return null;
|
|
41
|
+
} : Devtools.PreactQueryDevtools;
|
|
42
|
+
var PreactQueryDevtoolsPanel2 = process.env.NODE_ENV !== "development" ? function() {
|
|
43
|
+
return null;
|
|
44
|
+
} : DevtoolsPanel.PreactQueryDevtoolsPanel;
|
|
45
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
46
|
+
0 && (module.exports = {
|
|
47
|
+
PreactQueryDevtools,
|
|
48
|
+
PreactQueryDevtoolsPanel
|
|
49
|
+
});
|
|
50
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/index.ts"],"sourcesContent":["import * as Devtools from './PreactQueryDevtools'\nimport * as DevtoolsPanel from './PreactQueryDevtoolsPanel'\n\nexport const PreactQueryDevtools: (typeof Devtools)['PreactQueryDevtools'] =\n process.env.NODE_ENV !== 'development'\n ? function () {\n return null\n }\n : Devtools.PreactQueryDevtools\n\nexport const PreactQueryDevtoolsPanel: (typeof DevtoolsPanel)['PreactQueryDevtoolsPanel'] =\n process.env.NODE_ENV !== 'development'\n ? function () {\n return null\n }\n : DevtoolsPanel.PreactQueryDevtoolsPanel\n\nexport type DevtoolsPanelOptions = DevtoolsPanel.DevtoolsPanelOptions\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,6BAAAA;AAAA,EAAA,gCAAAC;AAAA;AAAA;AAAA,eAA0B;AAC1B,oBAA+B;AAExB,IAAMD,uBACX,QAAQ,IAAI,aAAa,gBACrB,WAAY;AACV,SAAO;AACT,IACS;AAER,IAAMC,4BACX,QAAQ,IAAI,aAAa,gBACrB,WAAY;AACV,SAAO;AACT,IACc;","names":["PreactQueryDevtools","PreactQueryDevtoolsPanel"]}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { PreactQueryDevtools_alias_1 as PreactQueryDevtools } from './_tsup-dts-rollup.cjs';
|
|
2
|
+
export { PreactQueryDevtoolsPanel_alias_1 as PreactQueryDevtoolsPanel } from './_tsup-dts-rollup.cjs';
|
|
3
|
+
export { DevtoolsPanelOptions_alias_1 as DevtoolsPanelOptions } from './_tsup-dts-rollup.cjs';
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { PreactQueryDevtools_alias_1 as PreactQueryDevtools } from './_tsup-dts-rollup.js';
|
|
2
|
+
export { PreactQueryDevtoolsPanel_alias_1 as PreactQueryDevtoolsPanel } from './_tsup-dts-rollup.js';
|
|
3
|
+
export { DevtoolsPanelOptions_alias_1 as DevtoolsPanelOptions } from './_tsup-dts-rollup.js';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// src/index.ts
|
|
2
|
+
import * as Devtools from "./PreactQueryDevtools.js";
|
|
3
|
+
import * as DevtoolsPanel from "./PreactQueryDevtoolsPanel.js";
|
|
4
|
+
var PreactQueryDevtools2 = process.env.NODE_ENV !== "development" ? function() {
|
|
5
|
+
return null;
|
|
6
|
+
} : Devtools.PreactQueryDevtools;
|
|
7
|
+
var PreactQueryDevtoolsPanel2 = process.env.NODE_ENV !== "development" ? function() {
|
|
8
|
+
return null;
|
|
9
|
+
} : DevtoolsPanel.PreactQueryDevtoolsPanel;
|
|
10
|
+
export {
|
|
11
|
+
PreactQueryDevtools2 as PreactQueryDevtools,
|
|
12
|
+
PreactQueryDevtoolsPanel2 as PreactQueryDevtoolsPanel
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/index.ts"],"sourcesContent":["import * as Devtools from './PreactQueryDevtools'\nimport * as DevtoolsPanel from './PreactQueryDevtoolsPanel'\n\nexport const PreactQueryDevtools: (typeof Devtools)['PreactQueryDevtools'] =\n process.env.NODE_ENV !== 'development'\n ? function () {\n return null\n }\n : Devtools.PreactQueryDevtools\n\nexport const PreactQueryDevtoolsPanel: (typeof DevtoolsPanel)['PreactQueryDevtoolsPanel'] =\n process.env.NODE_ENV !== 'development'\n ? function () {\n return null\n }\n : DevtoolsPanel.PreactQueryDevtoolsPanel\n\nexport type DevtoolsPanelOptions = DevtoolsPanel.DevtoolsPanelOptions\n"],"mappings":";AAAA,YAAY,cAAc;AAC1B,YAAY,mBAAmB;AAExB,IAAMA,uBACX,QAAQ,IAAI,aAAa,gBACrB,WAAY;AACV,SAAO;AACT,IACS;AAER,IAAMC,4BACX,QAAQ,IAAI,aAAa,gBACrB,WAAY;AACV,SAAO;AACT,IACc;","names":["PreactQueryDevtools","PreactQueryDevtoolsPanel"]}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
|
|
30
|
+
// src/production.ts
|
|
31
|
+
var production_exports = {};
|
|
32
|
+
__export(production_exports, {
|
|
33
|
+
PreactQueryDevtools: () => PreactQueryDevtools2,
|
|
34
|
+
PreactQueryDevtoolsPanel: () => PreactQueryDevtoolsPanel2
|
|
35
|
+
});
|
|
36
|
+
module.exports = __toCommonJS(production_exports);
|
|
37
|
+
var Devtools = __toESM(require("./PreactQueryDevtools.cjs"), 1);
|
|
38
|
+
var DevtoolsPanel = __toESM(require("./PreactQueryDevtoolsPanel.cjs"), 1);
|
|
39
|
+
var PreactQueryDevtools2 = Devtools.PreactQueryDevtools;
|
|
40
|
+
var PreactQueryDevtoolsPanel2 = DevtoolsPanel.PreactQueryDevtoolsPanel;
|
|
41
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
42
|
+
0 && (module.exports = {
|
|
43
|
+
PreactQueryDevtools,
|
|
44
|
+
PreactQueryDevtoolsPanel
|
|
45
|
+
});
|
|
46
|
+
//# sourceMappingURL=production.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/production.ts"],"sourcesContent":["import * as Devtools from './PreactQueryDevtools'\nimport * as DevtoolsPanel from './PreactQueryDevtoolsPanel'\n\nexport const PreactQueryDevtools = Devtools.PreactQueryDevtools\nexport const PreactQueryDevtoolsPanel = DevtoolsPanel.PreactQueryDevtoolsPanel\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,6BAAAA;AAAA,EAAA,gCAAAC;AAAA;AAAA;AAAA,eAA0B;AAC1B,oBAA+B;AAExB,IAAMD,uBAA+B;AACrC,IAAMC,4BAAyC;","names":["PreactQueryDevtools","PreactQueryDevtoolsPanel"]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// src/production.ts
|
|
2
|
+
import * as Devtools from "./PreactQueryDevtools.js";
|
|
3
|
+
import * as DevtoolsPanel from "./PreactQueryDevtoolsPanel.js";
|
|
4
|
+
var PreactQueryDevtools2 = Devtools.PreactQueryDevtools;
|
|
5
|
+
var PreactQueryDevtoolsPanel2 = DevtoolsPanel.PreactQueryDevtoolsPanel;
|
|
6
|
+
export {
|
|
7
|
+
PreactQueryDevtools2 as PreactQueryDevtools,
|
|
8
|
+
PreactQueryDevtoolsPanel2 as PreactQueryDevtoolsPanel
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=production.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/production.ts"],"sourcesContent":["import * as Devtools from './PreactQueryDevtools'\nimport * as DevtoolsPanel from './PreactQueryDevtoolsPanel'\n\nexport const PreactQueryDevtools = Devtools.PreactQueryDevtools\nexport const PreactQueryDevtoolsPanel = DevtoolsPanel.PreactQueryDevtoolsPanel\n"],"mappings":";AAAA,YAAY,cAAc;AAC1B,YAAY,mBAAmB;AAExB,IAAMA,uBAA+B;AACrC,IAAMC,4BAAyC;","names":["PreactQueryDevtools","PreactQueryDevtoolsPanel"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tanstack/preact-query-devtools",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.95.0",
|
|
4
4
|
"description": "Developer tools to interact with and visualize the TanStack/preact-query cache",
|
|
5
5
|
"author": "tannerlinsley",
|
|
6
6
|
"license": "MIT",
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
"!src/__tests__"
|
|
60
60
|
],
|
|
61
61
|
"dependencies": {
|
|
62
|
-
"@tanstack/query-devtools": "5.
|
|
62
|
+
"@tanstack/query-devtools": "5.95.0"
|
|
63
63
|
},
|
|
64
64
|
"devDependencies": {
|
|
65
65
|
"@preact/preset-vite": "^2.10.2",
|
|
@@ -69,11 +69,11 @@
|
|
|
69
69
|
"preact": "^10.28.0",
|
|
70
70
|
"typescript": "5.9.3",
|
|
71
71
|
"typescript-eslint": "^8.54.0",
|
|
72
|
-
"@tanstack/preact-query": "5.
|
|
72
|
+
"@tanstack/preact-query": "5.95.0"
|
|
73
73
|
},
|
|
74
74
|
"peerDependencies": {
|
|
75
75
|
"preact": "^10.0.0",
|
|
76
|
-
"@tanstack/preact-query": "^5.
|
|
76
|
+
"@tanstack/preact-query": "^5.95.0"
|
|
77
77
|
},
|
|
78
78
|
"scripts": {
|
|
79
79
|
"clean": "premove ./build ./coverage ./dist-ts",
|