@tanstack/react-query-devtools 5.104.5 → 5.105.1
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/ReactQueryDevtools-BhjVbJyl.d.cts +64 -0
- package/build/legacy/ReactQueryDevtools-BhjVbJyl.d.cts.map +1 -0
- package/build/legacy/ReactQueryDevtools-CaecJz_D.d.ts +64 -0
- package/build/legacy/ReactQueryDevtools-CaecJz_D.d.ts.map +1 -0
- package/build/legacy/ReactQueryDevtools.cjs +2 -3
- package/build/legacy/ReactQueryDevtools.cjs.map +1 -1
- package/build/legacy/ReactQueryDevtools.d.cts +2 -64
- package/build/legacy/ReactQueryDevtools.d.ts +2 -64
- package/build/legacy/ReactQueryDevtools.js +1 -2
- package/build/legacy/ReactQueryDevtools.js.map +1 -1
- package/build/legacy/ReactQueryDevtoolsPanel-C2_VXpks.d.ts +57 -0
- package/build/legacy/ReactQueryDevtoolsPanel-C2_VXpks.d.ts.map +1 -0
- package/build/legacy/ReactQueryDevtoolsPanel-DKrB7Z0x.d.cts +57 -0
- package/build/legacy/ReactQueryDevtoolsPanel-DKrB7Z0x.d.cts.map +1 -0
- package/build/legacy/ReactQueryDevtoolsPanel.cjs +2 -3
- package/build/legacy/ReactQueryDevtoolsPanel.cjs.map +1 -1
- package/build/legacy/ReactQueryDevtoolsPanel.d.cts +2 -57
- package/build/legacy/ReactQueryDevtoolsPanel.d.ts +2 -57
- package/build/legacy/ReactQueryDevtoolsPanel.js +1 -2
- package/build/legacy/ReactQueryDevtoolsPanel.js.map +1 -1
- package/build/legacy/index.cjs +1 -2
- package/build/legacy/index.d.cts +2 -4
- package/build/legacy/index.d.cts.map +1 -1
- package/build/legacy/index.d.ts +2 -4
- package/build/legacy/index.d.ts.map +1 -1
- package/build/legacy/index.js +1 -2
- package/build/legacy/production.cjs +1 -2
- package/build/legacy/production.d.cts +2 -4
- package/build/legacy/production.d.cts.map +1 -1
- package/build/legacy/production.d.ts +2 -4
- package/build/legacy/production.d.ts.map +1 -1
- package/build/legacy/production.js +1 -2
- package/build/legacy/{rolldown-runtime-VH7oDXx4.cjs → rolldown-runtime-CmQyd0Gu.cjs} +1 -2
- package/build/legacy/{rolldown-runtime-D7D4PA-g.js → rolldown-runtime-D8jQpDG7.js} +1 -2
- package/build/modern/ReactQueryDevtools-BhjVbJyl.d.cts +64 -0
- package/build/modern/ReactQueryDevtools-BhjVbJyl.d.cts.map +1 -0
- package/build/modern/ReactQueryDevtools-CaecJz_D.d.ts +64 -0
- package/build/modern/ReactQueryDevtools-CaecJz_D.d.ts.map +1 -0
- package/build/modern/ReactQueryDevtools.cjs +2 -3
- package/build/modern/ReactQueryDevtools.cjs.map +1 -1
- package/build/modern/ReactQueryDevtools.d.cts +2 -64
- package/build/modern/ReactQueryDevtools.d.ts +2 -64
- package/build/modern/ReactQueryDevtools.js +1 -2
- package/build/modern/ReactQueryDevtools.js.map +1 -1
- package/build/modern/ReactQueryDevtoolsPanel-C2_VXpks.d.ts +57 -0
- package/build/modern/ReactQueryDevtoolsPanel-C2_VXpks.d.ts.map +1 -0
- package/build/modern/ReactQueryDevtoolsPanel-DKrB7Z0x.d.cts +57 -0
- package/build/modern/ReactQueryDevtoolsPanel-DKrB7Z0x.d.cts.map +1 -0
- package/build/modern/ReactQueryDevtoolsPanel.cjs +2 -3
- package/build/modern/ReactQueryDevtoolsPanel.cjs.map +1 -1
- package/build/modern/ReactQueryDevtoolsPanel.d.cts +2 -57
- package/build/modern/ReactQueryDevtoolsPanel.d.ts +2 -57
- package/build/modern/ReactQueryDevtoolsPanel.js +1 -2
- package/build/modern/ReactQueryDevtoolsPanel.js.map +1 -1
- package/build/modern/index.cjs +1 -2
- package/build/modern/index.d.cts +2 -4
- package/build/modern/index.d.cts.map +1 -1
- package/build/modern/index.d.ts +2 -4
- package/build/modern/index.d.ts.map +1 -1
- package/build/modern/index.js +1 -2
- package/build/modern/production.cjs +1 -2
- package/build/modern/production.d.cts +2 -4
- package/build/modern/production.d.cts.map +1 -1
- package/build/modern/production.d.ts +2 -4
- package/build/modern/production.d.ts.map +1 -1
- package/build/modern/production.js +1 -2
- package/build/modern/{rolldown-runtime-VH7oDXx4.cjs → rolldown-runtime-CmQyd0Gu.cjs} +1 -2
- package/build/modern/{rolldown-runtime-D7D4PA-g.js → rolldown-runtime-D8jQpDG7.js} +1 -2
- package/package.json +7 -7
- package/src/ReactQueryDevtools.tsx +2 -1
- package/src/ReactQueryDevtoolsPanel.tsx +2 -1
- package/build/legacy/ReactQueryDevtools.d.cts.map +0 -1
- package/build/legacy/ReactQueryDevtools.d.ts.map +0 -1
- package/build/legacy/ReactQueryDevtoolsPanel.d.cts.map +0 -1
- package/build/legacy/ReactQueryDevtoolsPanel.d.ts.map +0 -1
- package/build/modern/ReactQueryDevtools.d.cts.map +0 -1
- package/build/modern/ReactQueryDevtools.d.ts.map +0 -1
- package/build/modern/ReactQueryDevtoolsPanel.d.cts.map +0 -1
- package/build/modern/ReactQueryDevtoolsPanel.d.ts.map +0 -1
|
@@ -1,57 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
import { DevtoolsErrorType, Theme } from "@tanstack/query-devtools";
|
|
4
|
-
declare namespace ReactQueryDevtoolsPanel_d_exports {
|
|
5
|
-
export { DevtoolsPanelOptions, ReactQueryDevtoolsPanel };
|
|
6
|
-
}
|
|
7
|
-
/**
|
|
8
|
-
* The props of `ReactQueryDevtoolsPanel`, which renders the devtools panel inline.
|
|
9
|
-
*/
|
|
10
|
-
export interface DevtoolsPanelOptions {
|
|
11
|
-
/**
|
|
12
|
-
* Custom instance of QueryClient
|
|
13
|
-
*/
|
|
14
|
-
client?: QueryClient;
|
|
15
|
-
/**
|
|
16
|
-
* Use this so you can define custom errors that can be shown in the devtools.
|
|
17
|
-
*/
|
|
18
|
-
errorTypes?: Array<DevtoolsErrorType>;
|
|
19
|
-
/**
|
|
20
|
-
* Use this to pass a nonce to the style tag that is added to the document head. This is useful if you are using a Content Security Policy (CSP) nonce to allow inline styles.
|
|
21
|
-
*/
|
|
22
|
-
styleNonce?: string;
|
|
23
|
-
/**
|
|
24
|
-
* Use this to pass a shadow DOM target to the devtools so that the styles will be applied
|
|
25
|
-
* within the shadow DOM instead of within the head tag in the light DOM.
|
|
26
|
-
*/
|
|
27
|
-
shadowDOMTarget?: ShadowRoot;
|
|
28
|
-
/**
|
|
29
|
-
* Custom styles for the devtools panel
|
|
30
|
-
* @default { height: '500px' }
|
|
31
|
-
* @example { height: '100%' }
|
|
32
|
-
* @example { height: '100%', width: '100%' }
|
|
33
|
-
*/
|
|
34
|
-
style?: React.CSSProperties;
|
|
35
|
-
/**
|
|
36
|
-
* Callback function that is called when the devtools panel is closed
|
|
37
|
-
*/
|
|
38
|
-
onClose?: () => void;
|
|
39
|
-
/**
|
|
40
|
-
* Set this to true to hide disabled queries from the devtools panel.
|
|
41
|
-
*/
|
|
42
|
-
hideDisabledQueries?: boolean;
|
|
43
|
-
/**
|
|
44
|
-
* Set this to 'light', 'dark', or 'system' to change the theme of the devtools panel.
|
|
45
|
-
* @defaultValue system
|
|
46
|
-
*/
|
|
47
|
-
theme?: Theme;
|
|
48
|
-
}
|
|
49
|
-
/**
|
|
50
|
-
* Renders the TanStack Query devtools panel inline, for the given or nearest `QueryClient`.
|
|
51
|
-
* @param props - The devtools panel options.
|
|
52
|
-
* @returns The element the devtools panel is mounted in.
|
|
53
|
-
*/
|
|
54
|
-
export declare function ReactQueryDevtoolsPanel(props: DevtoolsPanelOptions): React.ReactElement | null;
|
|
55
|
-
//#endregion
|
|
56
|
-
export { ReactQueryDevtoolsPanel_d_exports as t };
|
|
57
|
-
//# sourceMappingURL=ReactQueryDevtoolsPanel.d.ts.map
|
|
1
|
+
import { n as ReactQueryDevtoolsPanel, t as DevtoolsPanelOptions } from "./ReactQueryDevtoolsPanel-C2_VXpks.js";
|
|
2
|
+
export { DevtoolsPanelOptions, ReactQueryDevtoolsPanel };
|
|
@@ -3,7 +3,7 @@ import * as React from "react";
|
|
|
3
3
|
import { onlineManager, useQueryClient } from "@tanstack/react-query";
|
|
4
4
|
import { TanstackQueryDevtoolsPanel } from "@tanstack/query-devtools";
|
|
5
5
|
import { jsx } from "react/jsx-runtime";
|
|
6
|
-
|
|
6
|
+
// src/ReactQueryDevtoolsPanel.tsx
|
|
7
7
|
/**
|
|
8
8
|
* Renders the TanStack Query devtools panel inline, for the given or nearest `QueryClient`.
|
|
9
9
|
* @param props - The devtools panel options.
|
|
@@ -55,7 +55,6 @@ function ReactQueryDevtoolsPanel(props) {
|
|
|
55
55
|
ref
|
|
56
56
|
});
|
|
57
57
|
}
|
|
58
|
-
//#endregion
|
|
59
58
|
export { ReactQueryDevtoolsPanel };
|
|
60
59
|
|
|
61
60
|
//# sourceMappingURL=ReactQueryDevtoolsPanel.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReactQueryDevtoolsPanel.js","names":[],"sources":["../../src/ReactQueryDevtoolsPanel.tsx"],"sourcesContent":["'use client'\nimport * as React from 'react'\nimport { onlineManager, useQueryClient } from '@tanstack/react-query'\nimport { TanstackQueryDevtoolsPanel } from '@tanstack/query-devtools'\nimport type { DevtoolsErrorType, Theme } from '@tanstack/query-devtools'\nimport type { QueryClient } from '@tanstack/react-query'\n\n/**\n * The props of `ReactQueryDevtoolsPanel`, which renders the devtools panel inline.\n */\nexport interface DevtoolsPanelOptions {\n /**\n * Custom instance of QueryClient\n */\n client?: QueryClient\n /**\n * Use this so you can define custom errors that can 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 head. This is useful if you are using a Content Security Policy (CSP) nonce to allow inline styles.\n */\n styleNonce?: string\n /**\n * Use this to pass a shadow DOM target to the devtools so that the styles will be applied\n * within the shadow DOM instead of within the head tag in the light DOM.\n */\n shadowDOMTarget?: ShadowRoot\n\n /**\n * Custom styles for the devtools panel\n * @default { height: '500px' }\n * @example { height: '100%' }\n * @example { height: '100%', width: '100%' }\n */\n style?: React.CSSProperties\n\n /**\n * Callback function that is called when the devtools panel is closed\n */\n onClose?: () => void\n /**\n * Set this to true to hide disabled queries from the devtools panel.\n */\n hideDisabledQueries?: boolean\n /**\n * Set this to 'light', 'dark', or 'system' to change the theme of the devtools panel.\n *
|
|
1
|
+
{"version":3,"file":"ReactQueryDevtoolsPanel.js","names":[],"sources":["../../src/ReactQueryDevtoolsPanel.tsx"],"sourcesContent":["'use client'\nimport * as React from 'react'\nimport { onlineManager, useQueryClient } from '@tanstack/react-query'\nimport { TanstackQueryDevtoolsPanel } from '@tanstack/query-devtools'\nimport type { DevtoolsErrorType, Theme } from '@tanstack/query-devtools'\nimport type { QueryClient } from '@tanstack/react-query'\n\n/**\n * The props of `ReactQueryDevtoolsPanel`, which renders the devtools panel inline.\n */\nexport interface DevtoolsPanelOptions {\n /**\n * Custom instance of QueryClient\n */\n client?: QueryClient\n /**\n * Use this so you can define custom errors that can 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 head. This is useful if you are using a Content Security Policy (CSP) nonce to allow inline styles.\n */\n styleNonce?: string\n /**\n * Use this to pass a shadow DOM target to the devtools so that the styles will be applied\n * within the shadow DOM instead of within the head tag in the light DOM.\n */\n shadowDOMTarget?: ShadowRoot\n\n /**\n * Custom styles for the devtools panel\n * @default { height: '500px' }\n * @example { height: '100%' }\n * @example { height: '100%', width: '100%' }\n */\n style?: React.CSSProperties\n\n /**\n * Callback function that is called when the devtools panel is closed\n */\n onClose?: () => void\n /**\n * Set this to true to hide disabled queries from the devtools panel.\n */\n hideDisabledQueries?: boolean\n /**\n * Set this to 'light', 'dark', or 'system' to change the theme of the devtools panel.\n * This overrides the theme selected in the devtools Settings menu. When omitted, the\n * selected theme is used, or `'system'` if none is selected.\n */\n theme?: Theme\n}\n\n/**\n * Renders the TanStack Query devtools panel inline, for the given or nearest `QueryClient`.\n * @param props - The devtools panel options.\n * @returns The element the devtools panel is mounted in.\n */\nexport function ReactQueryDevtoolsPanel(\n props: DevtoolsPanelOptions,\n): React.ReactElement | null {\n const queryClient = useQueryClient(props.client)\n const ref = React.useRef<HTMLDivElement>(null)\n const {\n errorTypes,\n styleNonce,\n shadowDOMTarget,\n hideDisabledQueries,\n theme,\n } = props\n const [devtools] = React.useState(\n () =>\n new TanstackQueryDevtoolsPanel({\n client: queryClient,\n queryFlavor: 'React 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 React.useEffect(() => {\n devtools.setClient(queryClient)\n }, [queryClient, devtools])\n\n React.useEffect(() => {\n devtools.setOnClose(props.onClose ?? (() => {}))\n }, [props.onClose, devtools])\n\n React.useEffect(() => {\n devtools.setErrorTypes(errorTypes || [])\n }, [errorTypes, devtools])\n\n React.useEffect(() => {\n devtools.setTheme(theme)\n }, [theme, devtools])\n\n React.useEffect(() => {\n if (ref.current) {\n devtools.mount(ref.current)\n }\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 ></div>\n )\n}\n"],"mappings":";;;;;;;;;;;AA0DA,SAAgB,wBACd,OAC2B;CAC3B,MAAM,cAAc,eAAe,MAAM,MAAM;CAC/C,MAAM,MAAM,MAAM,OAAuB,IAAI;CAC7C,MAAM,EACJ,YACA,YACA,iBACA,qBACA,UACE;CACJ,MAAM,CAAC,YAAY,MAAM,eAErB,IAAI,2BAA2B;EAC7B,QAAQ;EACR,aAAa;EACb,SAAS;EACT;EACA,gBAAgB;EAChB,UAAU;EACV,eAAe;EACf;EACA;EACA;EACA,SAAS,MAAM;EACf;EACA;CACF,CAAC,CACL;CAEA,MAAM,gBAAgB;EACpB,SAAS,UAAU,WAAW;CAChC,GAAG,CAAC,aAAa,QAAQ,CAAC;CAE1B,MAAM,gBAAgB;EACpB,SAAS,WAAW,MAAM,kBAAkB,CAAC,EAAE;CACjD,GAAG,CAAC,MAAM,SAAS,QAAQ,CAAC;CAE5B,MAAM,gBAAgB;EACpB,SAAS,cAAc,cAAc,CAAC,CAAC;CACzC,GAAG,CAAC,YAAY,QAAQ,CAAC;CAEzB,MAAM,gBAAgB;EACpB,SAAS,SAAS,KAAK;CACzB,GAAG,CAAC,OAAO,QAAQ,CAAC;CAEpB,MAAM,gBAAgB;EACpB,IAAI,IAAI,SACN,SAAS,MAAM,IAAI,OAAO;EAG5B,aAAa;GACX,SAAS,QAAQ;EACnB;CACF,GAAG,CAAC,QAAQ,CAAC;CAEb,OACE,oBAAC,OAAD;EACE,OAAO;GAAE,QAAQ;GAAS,GAAG,MAAM;EAAM;EACzC,WAAU;EACL;CACD,CAAA;AAEV"}
|
package/build/legacy/index.cjs
CHANGED
|
@@ -2,14 +2,13 @@
|
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const require_ReactQueryDevtools = require("./ReactQueryDevtools.cjs");
|
|
4
4
|
const require_ReactQueryDevtoolsPanel = require("./ReactQueryDevtoolsPanel.cjs");
|
|
5
|
-
|
|
5
|
+
// src/index.ts
|
|
6
6
|
const ReactQueryDevtools = process.env.NODE_ENV !== "development" ? function() {
|
|
7
7
|
return null;
|
|
8
8
|
} : require_ReactQueryDevtools.ReactQueryDevtools;
|
|
9
9
|
const ReactQueryDevtoolsPanel = process.env.NODE_ENV !== "development" ? function() {
|
|
10
10
|
return null;
|
|
11
11
|
} : require_ReactQueryDevtoolsPanel.ReactQueryDevtoolsPanel;
|
|
12
|
-
//#endregion
|
|
13
12
|
exports.ReactQueryDevtools = ReactQueryDevtools;
|
|
14
13
|
exports.ReactQueryDevtoolsPanel = ReactQueryDevtoolsPanel;
|
|
15
14
|
|
package/build/legacy/index.d.cts
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
//#region src/index.d.ts
|
|
1
|
+
import { r as ReactQueryDevtools_d_exports } from "./ReactQueryDevtools-BhjVbJyl.cjs";
|
|
2
|
+
import { r as ReactQueryDevtoolsPanel_d_exports, t as DevtoolsPanelOptions$1 } from "./ReactQueryDevtoolsPanel-DKrB7Z0x.cjs";
|
|
4
3
|
export declare const ReactQueryDevtools: (typeof ReactQueryDevtools_d_exports)['ReactQueryDevtools'];
|
|
5
4
|
export declare const ReactQueryDevtoolsPanel: (typeof ReactQueryDevtoolsPanel_d_exports)['ReactQueryDevtoolsPanel'];
|
|
6
5
|
/**
|
|
7
6
|
* The props of `ReactQueryDevtoolsPanel`, which renders the devtools panel inline.
|
|
8
7
|
*/
|
|
9
8
|
export type DevtoolsPanelOptions = DevtoolsPanelOptions$1;
|
|
10
|
-
//#endregion
|
|
11
9
|
//# sourceMappingURL=index.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","names":["Devtools","DevtoolsPanel","DevtoolsPanel.DevtoolsPanelOptions"],"sources":["../../src/index.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.cts","names":["Devtools","DevtoolsPanel","DevtoolsPanel.DevtoolsPanelOptions"],"sources":["../../src/index.ts"],"mappings":";;qBAKa,4BAA4BA;qBAO5B,iCAAiCC;;;;YAUlC,uBAAuBC"}
|
package/build/legacy/index.d.ts
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
//#region src/index.d.ts
|
|
1
|
+
import { r as ReactQueryDevtools_d_exports } from "./ReactQueryDevtools-CaecJz_D.js";
|
|
2
|
+
import { r as ReactQueryDevtoolsPanel_d_exports, t as DevtoolsPanelOptions$1 } from "./ReactQueryDevtoolsPanel-C2_VXpks.js";
|
|
4
3
|
export declare const ReactQueryDevtools: (typeof ReactQueryDevtools_d_exports)['ReactQueryDevtools'];
|
|
5
4
|
export declare const ReactQueryDevtoolsPanel: (typeof ReactQueryDevtoolsPanel_d_exports)['ReactQueryDevtoolsPanel'];
|
|
6
5
|
/**
|
|
7
6
|
* The props of `ReactQueryDevtoolsPanel`, which renders the devtools panel inline.
|
|
8
7
|
*/
|
|
9
8
|
export type DevtoolsPanelOptions = DevtoolsPanelOptions$1;
|
|
10
|
-
//#endregion
|
|
11
9
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":["Devtools","DevtoolsPanel","DevtoolsPanel.DevtoolsPanelOptions"],"sources":["../../src/index.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":["Devtools","DevtoolsPanel","DevtoolsPanel.DevtoolsPanelOptions"],"sources":["../../src/index.ts"],"mappings":";;qBAKa,4BAA4BA;qBAO5B,iCAAiCC;;;;YAUlC,uBAAuBC"}
|
package/build/legacy/index.js
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { ReactQueryDevtools as ReactQueryDevtools$1 } from "./ReactQueryDevtools.js";
|
|
3
3
|
import { ReactQueryDevtoolsPanel as ReactQueryDevtoolsPanel$1 } from "./ReactQueryDevtoolsPanel.js";
|
|
4
|
-
|
|
4
|
+
// src/index.ts
|
|
5
5
|
const ReactQueryDevtools = process.env.NODE_ENV !== "development" ? function() {
|
|
6
6
|
return null;
|
|
7
7
|
} : ReactQueryDevtools$1;
|
|
8
8
|
const ReactQueryDevtoolsPanel = process.env.NODE_ENV !== "development" ? function() {
|
|
9
9
|
return null;
|
|
10
10
|
} : ReactQueryDevtoolsPanel$1;
|
|
11
|
-
//#endregion
|
|
12
11
|
export { ReactQueryDevtools, ReactQueryDevtoolsPanel };
|
|
13
12
|
|
|
14
13
|
//# sourceMappingURL=index.js.map
|
|
@@ -2,10 +2,9 @@
|
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const require_ReactQueryDevtools = require("./ReactQueryDevtools.cjs");
|
|
4
4
|
const require_ReactQueryDevtoolsPanel = require("./ReactQueryDevtoolsPanel.cjs");
|
|
5
|
-
|
|
5
|
+
// src/production.ts
|
|
6
6
|
const ReactQueryDevtools = require_ReactQueryDevtools.ReactQueryDevtools;
|
|
7
7
|
const ReactQueryDevtoolsPanel = require_ReactQueryDevtoolsPanel.ReactQueryDevtoolsPanel;
|
|
8
|
-
//#endregion
|
|
9
8
|
exports.ReactQueryDevtools = ReactQueryDevtools;
|
|
10
9
|
exports.ReactQueryDevtoolsPanel = ReactQueryDevtoolsPanel;
|
|
11
10
|
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
//#region src/production.d.ts
|
|
1
|
+
import { n as ReactQueryDevtools$1, r as ReactQueryDevtools_d_exports } from "./ReactQueryDevtools-BhjVbJyl.cjs";
|
|
2
|
+
import { n as ReactQueryDevtoolsPanel$1, r as ReactQueryDevtoolsPanel_d_exports } from "./ReactQueryDevtoolsPanel-DKrB7Z0x.cjs";
|
|
4
3
|
export declare const ReactQueryDevtools: typeof ReactQueryDevtools$1;
|
|
5
4
|
export declare const ReactQueryDevtoolsPanel: typeof ReactQueryDevtoolsPanel$1;
|
|
6
|
-
//#endregion
|
|
7
5
|
//# sourceMappingURL=production.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"production.d.cts","names":["Devtools","Devtools.ReactQueryDevtools","DevtoolsPanel","DevtoolsPanel.ReactQueryDevtoolsPanel"],"sources":["../../src/production.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"production.d.cts","names":["Devtools","Devtools.ReactQueryDevtools","DevtoolsPanel","DevtoolsPanel.ReactQueryDevtoolsPanel"],"sources":["../../src/production.ts"],"mappings":";;qBAKa,2BAAkBC;qBAClB,gCAAuBE"}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
//#region src/production.d.ts
|
|
1
|
+
import { n as ReactQueryDevtools$1, r as ReactQueryDevtools_d_exports } from "./ReactQueryDevtools-CaecJz_D.js";
|
|
2
|
+
import { n as ReactQueryDevtoolsPanel$1, r as ReactQueryDevtoolsPanel_d_exports } from "./ReactQueryDevtoolsPanel-C2_VXpks.js";
|
|
4
3
|
export declare const ReactQueryDevtools: typeof ReactQueryDevtools$1;
|
|
5
4
|
export declare const ReactQueryDevtoolsPanel: typeof ReactQueryDevtoolsPanel$1;
|
|
6
|
-
//#endregion
|
|
7
5
|
//# sourceMappingURL=production.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"production.d.ts","names":["Devtools","Devtools.ReactQueryDevtools","DevtoolsPanel","DevtoolsPanel.ReactQueryDevtoolsPanel"],"sources":["../../src/production.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"production.d.ts","names":["Devtools","Devtools.ReactQueryDevtools","DevtoolsPanel","DevtoolsPanel.ReactQueryDevtoolsPanel"],"sources":["../../src/production.ts"],"mappings":";;qBAKa,2BAAkBC;qBAClB,gCAAuBE"}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { ReactQueryDevtools as ReactQueryDevtools$1 } from "./ReactQueryDevtools.js";
|
|
3
3
|
import { ReactQueryDevtoolsPanel as ReactQueryDevtoolsPanel$1 } from "./ReactQueryDevtoolsPanel.js";
|
|
4
|
-
|
|
4
|
+
// src/production.ts
|
|
5
5
|
const ReactQueryDevtools = ReactQueryDevtools$1;
|
|
6
6
|
const ReactQueryDevtoolsPanel = ReactQueryDevtoolsPanel$1;
|
|
7
|
-
//#endregion
|
|
8
7
|
export { ReactQueryDevtools, ReactQueryDevtoolsPanel };
|
|
9
8
|
|
|
10
9
|
//# sourceMappingURL=production.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// \0rolldown/runtime.js
|
|
2
2
|
var __create = Object.create;
|
|
3
3
|
var __defProp = Object.defineProperty;
|
|
4
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
@@ -19,7 +19,6 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
19
19
|
value: mod,
|
|
20
20
|
enumerable: true
|
|
21
21
|
}) : target, mod));
|
|
22
|
-
//#endregion
|
|
23
22
|
Object.defineProperty(exports, "__toESM", {
|
|
24
23
|
enumerable: true,
|
|
25
24
|
get: function() {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// \0rolldown/runtime.js
|
|
2
2
|
var __defProp = Object.defineProperty;
|
|
3
3
|
var __exportAll = (all, no_symbols) => {
|
|
4
4
|
let target = {};
|
|
@@ -9,5 +9,4 @@ var __exportAll = (all, no_symbols) => {
|
|
|
9
9
|
if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
|
|
10
10
|
return target;
|
|
11
11
|
};
|
|
12
|
-
//#endregion
|
|
13
12
|
export { __exportAll as t };
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { DevtoolsButtonPosition, DevtoolsErrorType, DevtoolsPosition, Theme } from "@tanstack/query-devtools";
|
|
3
|
+
import { QueryClient } from "@tanstack/react-query";
|
|
4
|
+
declare namespace ReactQueryDevtools_d_exports {
|
|
5
|
+
export { DevtoolsOptions, ReactQueryDevtools };
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* The props of `ReactQueryDevtools`, which renders the devtools with a toggle button that opens
|
|
9
|
+
* them.
|
|
10
|
+
*/
|
|
11
|
+
interface DevtoolsOptions {
|
|
12
|
+
/**
|
|
13
|
+
* Set this true if you want the dev tools to default to being open
|
|
14
|
+
*/
|
|
15
|
+
initialIsOpen?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* The position of the TanStack logo to open and close the devtools panel.
|
|
18
|
+
* 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right' | 'relative'
|
|
19
|
+
* @defaultValue bottom-right
|
|
20
|
+
*/
|
|
21
|
+
buttonPosition?: DevtoolsButtonPosition;
|
|
22
|
+
/**
|
|
23
|
+
* The position of the React Query devtools panel.
|
|
24
|
+
* 'top' | 'bottom' | 'left' | 'right'
|
|
25
|
+
* @defaultValue bottom
|
|
26
|
+
*/
|
|
27
|
+
position?: DevtoolsPosition;
|
|
28
|
+
/**
|
|
29
|
+
* Custom instance of QueryClient
|
|
30
|
+
*/
|
|
31
|
+
client?: QueryClient;
|
|
32
|
+
/**
|
|
33
|
+
* Use this so you can define custom errors that can be shown in the devtools.
|
|
34
|
+
*/
|
|
35
|
+
errorTypes?: Array<DevtoolsErrorType>;
|
|
36
|
+
/**
|
|
37
|
+
* Use this to pass a nonce to the style tag that is added to the document head. This is useful if you are using a Content Security Policy (CSP) nonce to allow inline styles.
|
|
38
|
+
*/
|
|
39
|
+
styleNonce?: string;
|
|
40
|
+
/**
|
|
41
|
+
* Use this to pass a shadow DOM target to the devtools so that the styles will be applied
|
|
42
|
+
* within the shadow DOM instead of within the head tag in the light DOM.
|
|
43
|
+
*/
|
|
44
|
+
shadowDOMTarget?: ShadowRoot;
|
|
45
|
+
/**
|
|
46
|
+
* Set this to true to hide disabled queries from the devtools panel.
|
|
47
|
+
*/
|
|
48
|
+
hideDisabledQueries?: boolean;
|
|
49
|
+
/**
|
|
50
|
+
* Set this to 'light', 'dark', or 'system' to change the theme of the devtools panel.
|
|
51
|
+
* This overrides the theme selected in the devtools Settings menu. When omitted, the
|
|
52
|
+
* selected theme is used, or `'system'` if none is selected.
|
|
53
|
+
*/
|
|
54
|
+
theme?: Theme;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Renders the TanStack Query devtools, with a toggle button that opens them, for the given or
|
|
58
|
+
* nearest `QueryClient`.
|
|
59
|
+
* @param props - The devtools options.
|
|
60
|
+
* @returns The element the devtools are mounted in.
|
|
61
|
+
*/
|
|
62
|
+
declare function ReactQueryDevtools(props: DevtoolsOptions): React.ReactElement | null;
|
|
63
|
+
export { ReactQueryDevtools as n, ReactQueryDevtools_d_exports as r, DevtoolsOptions as t };
|
|
64
|
+
//# sourceMappingURL=ReactQueryDevtools-BhjVbJyl.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ReactQueryDevtools-BhjVbJyl.d.cts","names":[],"sources":["../../src/ReactQueryDevtools.tsx"],"mappings":";;;;;;;;;;UAgBiB;;;;EAIf;;;;;;EAMA,iBAAiB;;;;;;EAMjB,WAAW;;;;EAIX,SAAS;;;;EAIT,aAAa,MAAM;;;;EAInB;;;;;EAKA,kBAAkB;;;;EAIlB;;;;;;EAMA,QAAQ;;;;;;;;iBASM,mBACd,OAAO,kBACN,MAAM"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { QueryClient } from "@tanstack/react-query";
|
|
3
|
+
import { DevtoolsButtonPosition, DevtoolsErrorType, DevtoolsPosition, Theme } from "@tanstack/query-devtools";
|
|
4
|
+
declare namespace ReactQueryDevtools_d_exports {
|
|
5
|
+
export { DevtoolsOptions, ReactQueryDevtools };
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* The props of `ReactQueryDevtools`, which renders the devtools with a toggle button that opens
|
|
9
|
+
* them.
|
|
10
|
+
*/
|
|
11
|
+
interface DevtoolsOptions {
|
|
12
|
+
/**
|
|
13
|
+
* Set this true if you want the dev tools to default to being open
|
|
14
|
+
*/
|
|
15
|
+
initialIsOpen?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* The position of the TanStack logo to open and close the devtools panel.
|
|
18
|
+
* 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right' | 'relative'
|
|
19
|
+
* @defaultValue bottom-right
|
|
20
|
+
*/
|
|
21
|
+
buttonPosition?: DevtoolsButtonPosition;
|
|
22
|
+
/**
|
|
23
|
+
* The position of the React Query devtools panel.
|
|
24
|
+
* 'top' | 'bottom' | 'left' | 'right'
|
|
25
|
+
* @defaultValue bottom
|
|
26
|
+
*/
|
|
27
|
+
position?: DevtoolsPosition;
|
|
28
|
+
/**
|
|
29
|
+
* Custom instance of QueryClient
|
|
30
|
+
*/
|
|
31
|
+
client?: QueryClient;
|
|
32
|
+
/**
|
|
33
|
+
* Use this so you can define custom errors that can be shown in the devtools.
|
|
34
|
+
*/
|
|
35
|
+
errorTypes?: Array<DevtoolsErrorType>;
|
|
36
|
+
/**
|
|
37
|
+
* Use this to pass a nonce to the style tag that is added to the document head. This is useful if you are using a Content Security Policy (CSP) nonce to allow inline styles.
|
|
38
|
+
*/
|
|
39
|
+
styleNonce?: string;
|
|
40
|
+
/**
|
|
41
|
+
* Use this to pass a shadow DOM target to the devtools so that the styles will be applied
|
|
42
|
+
* within the shadow DOM instead of within the head tag in the light DOM.
|
|
43
|
+
*/
|
|
44
|
+
shadowDOMTarget?: ShadowRoot;
|
|
45
|
+
/**
|
|
46
|
+
* Set this to true to hide disabled queries from the devtools panel.
|
|
47
|
+
*/
|
|
48
|
+
hideDisabledQueries?: boolean;
|
|
49
|
+
/**
|
|
50
|
+
* Set this to 'light', 'dark', or 'system' to change the theme of the devtools panel.
|
|
51
|
+
* This overrides the theme selected in the devtools Settings menu. When omitted, the
|
|
52
|
+
* selected theme is used, or `'system'` if none is selected.
|
|
53
|
+
*/
|
|
54
|
+
theme?: Theme;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Renders the TanStack Query devtools, with a toggle button that opens them, for the given or
|
|
58
|
+
* nearest `QueryClient`.
|
|
59
|
+
* @param props - The devtools options.
|
|
60
|
+
* @returns The element the devtools are mounted in.
|
|
61
|
+
*/
|
|
62
|
+
declare function ReactQueryDevtools(props: DevtoolsOptions): React.ReactElement | null;
|
|
63
|
+
export { ReactQueryDevtools as n, ReactQueryDevtools_d_exports as r, DevtoolsOptions as t };
|
|
64
|
+
//# sourceMappingURL=ReactQueryDevtools-CaecJz_D.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ReactQueryDevtools-CaecJz_D.d.ts","names":[],"sources":["../../src/ReactQueryDevtools.tsx"],"mappings":";;;;;;;;;;UAgBiB;;;;EAIf;;;;;;EAMA,iBAAiB;;;;;;EAMjB,WAAW;;;;EAIX,SAAS;;;;EAIT,aAAa,MAAM;;;;EAInB;;;;;EAKA,kBAAkB;;;;EAIlB;;;;;;EAMA,QAAQ;;;;;;;;iBASM,mBACd,OAAO,kBACN,MAAM"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const require_rolldown_runtime = require("./rolldown-runtime-
|
|
3
|
+
const require_rolldown_runtime = require("./rolldown-runtime-CmQyd0Gu.cjs");
|
|
4
4
|
let react = require("react");
|
|
5
5
|
react = require_rolldown_runtime.__toESM(react, 1);
|
|
6
6
|
let _tanstack_react_query = require("@tanstack/react-query");
|
|
7
7
|
let _tanstack_query_devtools = require("@tanstack/query-devtools");
|
|
8
8
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
9
|
-
|
|
9
|
+
// src/ReactQueryDevtools.tsx
|
|
10
10
|
/**
|
|
11
11
|
* Renders the TanStack Query devtools, with a toggle button that opens them, for the given or
|
|
12
12
|
* nearest `QueryClient`.
|
|
@@ -61,7 +61,6 @@ function ReactQueryDevtools(props) {
|
|
|
61
61
|
ref
|
|
62
62
|
});
|
|
63
63
|
}
|
|
64
|
-
//#endregion
|
|
65
64
|
exports.ReactQueryDevtools = ReactQueryDevtools;
|
|
66
65
|
|
|
67
66
|
//# sourceMappingURL=ReactQueryDevtools.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReactQueryDevtools.cjs","names":["useQueryClient","React","TanstackQueryDevtools"],"sources":["../../src/ReactQueryDevtools.tsx"],"sourcesContent":["'use client'\nimport * as React from 'react'\nimport { onlineManager, useQueryClient } from '@tanstack/react-query'\nimport { TanstackQueryDevtools } from '@tanstack/query-devtools'\nimport type {\n DevtoolsButtonPosition,\n DevtoolsErrorType,\n DevtoolsPosition,\n Theme,\n} from '@tanstack/query-devtools'\nimport type { QueryClient } from '@tanstack/react-query'\n\n/**\n * The props of `ReactQueryDevtools`, which renders the devtools with a toggle button that opens\n * them.\n */\nexport interface DevtoolsOptions {\n /**\n * Set this true if you want the dev tools to default to being open\n */\n initialIsOpen?: boolean\n /**\n * The position of the TanStack logo to open and close the devtools panel.\n * 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right' | 'relative'\n * @defaultValue bottom-right\n */\n buttonPosition?: DevtoolsButtonPosition\n /**\n * The position of the React Query devtools panel.\n * 'top' | 'bottom' | 'left' | 'right'\n * @defaultValue bottom\n */\n position?: DevtoolsPosition\n /**\n * Custom instance of QueryClient\n */\n client?: QueryClient\n /**\n * Use this so you can define custom errors that can 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 head. This is useful if you are using a Content Security Policy (CSP) nonce to allow inline styles.\n */\n styleNonce?: string\n /**\n * Use this to pass a shadow DOM target to the devtools so that the styles will be applied\n * within the shadow DOM instead of within the head tag in the light DOM.\n */\n shadowDOMTarget?: ShadowRoot\n /**\n * Set this to true to hide disabled queries from the devtools panel.\n */\n hideDisabledQueries?: boolean\n /**\n * Set this to 'light', 'dark', or 'system' to change the theme of the devtools panel.\n *
|
|
1
|
+
{"version":3,"file":"ReactQueryDevtools.cjs","names":["useQueryClient","React","TanstackQueryDevtools"],"sources":["../../src/ReactQueryDevtools.tsx"],"sourcesContent":["'use client'\nimport * as React from 'react'\nimport { onlineManager, useQueryClient } from '@tanstack/react-query'\nimport { TanstackQueryDevtools } from '@tanstack/query-devtools'\nimport type {\n DevtoolsButtonPosition,\n DevtoolsErrorType,\n DevtoolsPosition,\n Theme,\n} from '@tanstack/query-devtools'\nimport type { QueryClient } from '@tanstack/react-query'\n\n/**\n * The props of `ReactQueryDevtools`, which renders the devtools with a toggle button that opens\n * them.\n */\nexport interface DevtoolsOptions {\n /**\n * Set this true if you want the dev tools to default to being open\n */\n initialIsOpen?: boolean\n /**\n * The position of the TanStack logo to open and close the devtools panel.\n * 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right' | 'relative'\n * @defaultValue bottom-right\n */\n buttonPosition?: DevtoolsButtonPosition\n /**\n * The position of the React Query devtools panel.\n * 'top' | 'bottom' | 'left' | 'right'\n * @defaultValue bottom\n */\n position?: DevtoolsPosition\n /**\n * Custom instance of QueryClient\n */\n client?: QueryClient\n /**\n * Use this so you can define custom errors that can 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 head. This is useful if you are using a Content Security Policy (CSP) nonce to allow inline styles.\n */\n styleNonce?: string\n /**\n * Use this to pass a shadow DOM target to the devtools so that the styles will be applied\n * within the shadow DOM instead of within the head tag in the light DOM.\n */\n shadowDOMTarget?: ShadowRoot\n /**\n * Set this to true to hide disabled queries from the devtools panel.\n */\n hideDisabledQueries?: boolean\n /**\n * Set this to 'light', 'dark', or 'system' to change the theme of the devtools panel.\n * This overrides the theme selected in the devtools Settings menu. When omitted, the\n * selected theme is used, or `'system'` if none is selected.\n */\n theme?: Theme\n}\n\n/**\n * Renders the TanStack Query devtools, with a toggle button that opens them, for the given or\n * nearest `QueryClient`.\n * @param props - The devtools options.\n * @returns The element the devtools are mounted in.\n */\nexport function ReactQueryDevtools(\n props: DevtoolsOptions,\n): React.ReactElement | null {\n const queryClient = useQueryClient(props.client)\n const ref = React.useRef<HTMLDivElement>(null)\n const {\n buttonPosition,\n position,\n initialIsOpen,\n errorTypes,\n styleNonce,\n shadowDOMTarget,\n hideDisabledQueries,\n theme,\n } = props\n const [devtools] = React.useState(\n () =>\n new TanstackQueryDevtools({\n client: queryClient,\n queryFlavor: 'React Query',\n version: '5',\n onlineManager,\n buttonPosition,\n position,\n initialIsOpen,\n errorTypes,\n styleNonce,\n shadowDOMTarget,\n hideDisabledQueries,\n theme,\n }),\n )\n\n React.useEffect(() => {\n devtools.setClient(queryClient)\n }, [queryClient, devtools])\n\n React.useEffect(() => {\n if (buttonPosition) {\n devtools.setButtonPosition(buttonPosition)\n }\n }, [buttonPosition, devtools])\n\n React.useEffect(() => {\n if (position) {\n devtools.setPosition(position)\n }\n }, [position, devtools])\n\n React.useEffect(() => {\n devtools.setInitialIsOpen(initialIsOpen || false)\n }, [initialIsOpen, devtools])\n\n React.useEffect(() => {\n devtools.setErrorTypes(errorTypes || [])\n }, [errorTypes, devtools])\n\n React.useEffect(() => {\n devtools.setTheme(theme)\n }, [theme, devtools])\n\n React.useEffect(() => {\n if (ref.current) {\n devtools.mount(ref.current)\n }\n\n return () => {\n devtools.unmount()\n }\n }, [devtools])\n\n return <div dir=\"ltr\" className=\"tsqd-parent-container\" ref={ref}></div>\n}\n"],"mappings":";;;;;;;;;;;;;;;AAoEA,SAAgB,mBACd,OAC2B;CAC3B,MAAM,eAAA,GAAcA,sBAAAA,eAAAA,CAAe,MAAM,MAAM;CAC/C,MAAM,MAAMC,MAAM,OAAuB,IAAI;CAC7C,MAAM,EACJ,gBACA,UACA,eACA,YACA,YACA,iBACA,qBACA,UACE;CACJ,MAAM,CAAC,YAAYA,MAAM,eAErB,IAAIC,yBAAAA,sBAAsB;EACxB,QAAQ;EACR,aAAa;EACb,SAAS;EACT,eAAA,sBAAA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF,CAAC,CACL;CAEA,MAAM,gBAAgB;EACpB,SAAS,UAAU,WAAW;CAChC,GAAG,CAAC,aAAa,QAAQ,CAAC;CAE1B,MAAM,gBAAgB;EACpB,IAAI,gBACF,SAAS,kBAAkB,cAAc;CAE7C,GAAG,CAAC,gBAAgB,QAAQ,CAAC;CAE7B,MAAM,gBAAgB;EACpB,IAAI,UACF,SAAS,YAAY,QAAQ;CAEjC,GAAG,CAAC,UAAU,QAAQ,CAAC;CAEvB,MAAM,gBAAgB;EACpB,SAAS,iBAAiB,iBAAiB,KAAK;CAClD,GAAG,CAAC,eAAe,QAAQ,CAAC;CAE5B,MAAM,gBAAgB;EACpB,SAAS,cAAc,cAAc,CAAC,CAAC;CACzC,GAAG,CAAC,YAAY,QAAQ,CAAC;CAEzB,MAAM,gBAAgB;EACpB,SAAS,SAAS,KAAK;CACzB,GAAG,CAAC,OAAO,QAAQ,CAAC;CAEpB,MAAM,gBAAgB;EACpB,IAAI,IAAI,SACN,SAAS,MAAM,IAAI,OAAO;EAG5B,aAAa;GACX,SAAS,QAAQ;EACnB;CACF,GAAG,CAAC,QAAQ,CAAC;CAEb,OAAO,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAD;EAAK,KAAI;EAAM,WAAU;EAA6B;CAAU,CAAA;AACzE"}
|
|
@@ -1,64 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
import { QueryClient } from "@tanstack/react-query";
|
|
4
|
-
declare namespace ReactQueryDevtools_d_exports {
|
|
5
|
-
export { DevtoolsOptions, ReactQueryDevtools };
|
|
6
|
-
}
|
|
7
|
-
/**
|
|
8
|
-
* The props of `ReactQueryDevtools`, which renders the devtools with a toggle button that opens
|
|
9
|
-
* them.
|
|
10
|
-
*/
|
|
11
|
-
export interface DevtoolsOptions {
|
|
12
|
-
/**
|
|
13
|
-
* Set this true if you want the dev tools to default to being open
|
|
14
|
-
*/
|
|
15
|
-
initialIsOpen?: boolean;
|
|
16
|
-
/**
|
|
17
|
-
* The position of the TanStack logo to open and close the devtools panel.
|
|
18
|
-
* 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right' | 'relative'
|
|
19
|
-
* @defaultValue bottom-right
|
|
20
|
-
*/
|
|
21
|
-
buttonPosition?: DevtoolsButtonPosition;
|
|
22
|
-
/**
|
|
23
|
-
* The position of the React Query devtools panel.
|
|
24
|
-
* 'top' | 'bottom' | 'left' | 'right'
|
|
25
|
-
* @defaultValue bottom
|
|
26
|
-
*/
|
|
27
|
-
position?: DevtoolsPosition;
|
|
28
|
-
/**
|
|
29
|
-
* Custom instance of QueryClient
|
|
30
|
-
*/
|
|
31
|
-
client?: QueryClient;
|
|
32
|
-
/**
|
|
33
|
-
* Use this so you can define custom errors that can be shown in the devtools.
|
|
34
|
-
*/
|
|
35
|
-
errorTypes?: Array<DevtoolsErrorType>;
|
|
36
|
-
/**
|
|
37
|
-
* Use this to pass a nonce to the style tag that is added to the document head. This is useful if you are using a Content Security Policy (CSP) nonce to allow inline styles.
|
|
38
|
-
*/
|
|
39
|
-
styleNonce?: string;
|
|
40
|
-
/**
|
|
41
|
-
* Use this to pass a shadow DOM target to the devtools so that the styles will be applied
|
|
42
|
-
* within the shadow DOM instead of within the head tag in the light DOM.
|
|
43
|
-
*/
|
|
44
|
-
shadowDOMTarget?: ShadowRoot;
|
|
45
|
-
/**
|
|
46
|
-
* Set this to true to hide disabled queries from the devtools panel.
|
|
47
|
-
*/
|
|
48
|
-
hideDisabledQueries?: boolean;
|
|
49
|
-
/**
|
|
50
|
-
* Set this to 'light', 'dark', or 'system' to change the theme of the devtools panel.
|
|
51
|
-
* @defaultValue system
|
|
52
|
-
*/
|
|
53
|
-
theme?: Theme;
|
|
54
|
-
}
|
|
55
|
-
/**
|
|
56
|
-
* Renders the TanStack Query devtools, with a toggle button that opens them, for the given or
|
|
57
|
-
* nearest `QueryClient`.
|
|
58
|
-
* @param props - The devtools options.
|
|
59
|
-
* @returns The element the devtools are mounted in.
|
|
60
|
-
*/
|
|
61
|
-
export declare function ReactQueryDevtools(props: DevtoolsOptions): React.ReactElement | null;
|
|
62
|
-
//#endregion
|
|
63
|
-
export { ReactQueryDevtools_d_exports as t };
|
|
64
|
-
//# sourceMappingURL=ReactQueryDevtools.d.cts.map
|
|
1
|
+
import { n as ReactQueryDevtools, t as DevtoolsOptions } from "./ReactQueryDevtools-BhjVbJyl.cjs";
|
|
2
|
+
export { DevtoolsOptions, ReactQueryDevtools };
|
|
@@ -1,64 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
import { DevtoolsButtonPosition, DevtoolsErrorType, DevtoolsPosition, Theme } from "@tanstack/query-devtools";
|
|
4
|
-
declare namespace ReactQueryDevtools_d_exports {
|
|
5
|
-
export { DevtoolsOptions, ReactQueryDevtools };
|
|
6
|
-
}
|
|
7
|
-
/**
|
|
8
|
-
* The props of `ReactQueryDevtools`, which renders the devtools with a toggle button that opens
|
|
9
|
-
* them.
|
|
10
|
-
*/
|
|
11
|
-
export interface DevtoolsOptions {
|
|
12
|
-
/**
|
|
13
|
-
* Set this true if you want the dev tools to default to being open
|
|
14
|
-
*/
|
|
15
|
-
initialIsOpen?: boolean;
|
|
16
|
-
/**
|
|
17
|
-
* The position of the TanStack logo to open and close the devtools panel.
|
|
18
|
-
* 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right' | 'relative'
|
|
19
|
-
* @defaultValue bottom-right
|
|
20
|
-
*/
|
|
21
|
-
buttonPosition?: DevtoolsButtonPosition;
|
|
22
|
-
/**
|
|
23
|
-
* The position of the React Query devtools panel.
|
|
24
|
-
* 'top' | 'bottom' | 'left' | 'right'
|
|
25
|
-
* @defaultValue bottom
|
|
26
|
-
*/
|
|
27
|
-
position?: DevtoolsPosition;
|
|
28
|
-
/**
|
|
29
|
-
* Custom instance of QueryClient
|
|
30
|
-
*/
|
|
31
|
-
client?: QueryClient;
|
|
32
|
-
/**
|
|
33
|
-
* Use this so you can define custom errors that can be shown in the devtools.
|
|
34
|
-
*/
|
|
35
|
-
errorTypes?: Array<DevtoolsErrorType>;
|
|
36
|
-
/**
|
|
37
|
-
* Use this to pass a nonce to the style tag that is added to the document head. This is useful if you are using a Content Security Policy (CSP) nonce to allow inline styles.
|
|
38
|
-
*/
|
|
39
|
-
styleNonce?: string;
|
|
40
|
-
/**
|
|
41
|
-
* Use this to pass a shadow DOM target to the devtools so that the styles will be applied
|
|
42
|
-
* within the shadow DOM instead of within the head tag in the light DOM.
|
|
43
|
-
*/
|
|
44
|
-
shadowDOMTarget?: ShadowRoot;
|
|
45
|
-
/**
|
|
46
|
-
* Set this to true to hide disabled queries from the devtools panel.
|
|
47
|
-
*/
|
|
48
|
-
hideDisabledQueries?: boolean;
|
|
49
|
-
/**
|
|
50
|
-
* Set this to 'light', 'dark', or 'system' to change the theme of the devtools panel.
|
|
51
|
-
* @defaultValue system
|
|
52
|
-
*/
|
|
53
|
-
theme?: Theme;
|
|
54
|
-
}
|
|
55
|
-
/**
|
|
56
|
-
* Renders the TanStack Query devtools, with a toggle button that opens them, for the given or
|
|
57
|
-
* nearest `QueryClient`.
|
|
58
|
-
* @param props - The devtools options.
|
|
59
|
-
* @returns The element the devtools are mounted in.
|
|
60
|
-
*/
|
|
61
|
-
export declare function ReactQueryDevtools(props: DevtoolsOptions): React.ReactElement | null;
|
|
62
|
-
//#endregion
|
|
63
|
-
export { ReactQueryDevtools_d_exports as t };
|
|
64
|
-
//# sourceMappingURL=ReactQueryDevtools.d.ts.map
|
|
1
|
+
import { n as ReactQueryDevtools, t as DevtoolsOptions } from "./ReactQueryDevtools-CaecJz_D.js";
|
|
2
|
+
export { DevtoolsOptions, ReactQueryDevtools };
|
|
@@ -3,7 +3,7 @@ import * as React from "react";
|
|
|
3
3
|
import { onlineManager, useQueryClient } from "@tanstack/react-query";
|
|
4
4
|
import { TanstackQueryDevtools } from "@tanstack/query-devtools";
|
|
5
5
|
import { jsx } from "react/jsx-runtime";
|
|
6
|
-
|
|
6
|
+
// src/ReactQueryDevtools.tsx
|
|
7
7
|
/**
|
|
8
8
|
* Renders the TanStack Query devtools, with a toggle button that opens them, for the given or
|
|
9
9
|
* nearest `QueryClient`.
|
|
@@ -58,7 +58,6 @@ function ReactQueryDevtools(props) {
|
|
|
58
58
|
ref
|
|
59
59
|
});
|
|
60
60
|
}
|
|
61
|
-
//#endregion
|
|
62
61
|
export { ReactQueryDevtools };
|
|
63
62
|
|
|
64
63
|
//# sourceMappingURL=ReactQueryDevtools.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReactQueryDevtools.js","names":[],"sources":["../../src/ReactQueryDevtools.tsx"],"sourcesContent":["'use client'\nimport * as React from 'react'\nimport { onlineManager, useQueryClient } from '@tanstack/react-query'\nimport { TanstackQueryDevtools } from '@tanstack/query-devtools'\nimport type {\n DevtoolsButtonPosition,\n DevtoolsErrorType,\n DevtoolsPosition,\n Theme,\n} from '@tanstack/query-devtools'\nimport type { QueryClient } from '@tanstack/react-query'\n\n/**\n * The props of `ReactQueryDevtools`, which renders the devtools with a toggle button that opens\n * them.\n */\nexport interface DevtoolsOptions {\n /**\n * Set this true if you want the dev tools to default to being open\n */\n initialIsOpen?: boolean\n /**\n * The position of the TanStack logo to open and close the devtools panel.\n * 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right' | 'relative'\n * @defaultValue bottom-right\n */\n buttonPosition?: DevtoolsButtonPosition\n /**\n * The position of the React Query devtools panel.\n * 'top' | 'bottom' | 'left' | 'right'\n * @defaultValue bottom\n */\n position?: DevtoolsPosition\n /**\n * Custom instance of QueryClient\n */\n client?: QueryClient\n /**\n * Use this so you can define custom errors that can 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 head. This is useful if you are using a Content Security Policy (CSP) nonce to allow inline styles.\n */\n styleNonce?: string\n /**\n * Use this to pass a shadow DOM target to the devtools so that the styles will be applied\n * within the shadow DOM instead of within the head tag in the light DOM.\n */\n shadowDOMTarget?: ShadowRoot\n /**\n * Set this to true to hide disabled queries from the devtools panel.\n */\n hideDisabledQueries?: boolean\n /**\n * Set this to 'light', 'dark', or 'system' to change the theme of the devtools panel.\n *
|
|
1
|
+
{"version":3,"file":"ReactQueryDevtools.js","names":[],"sources":["../../src/ReactQueryDevtools.tsx"],"sourcesContent":["'use client'\nimport * as React from 'react'\nimport { onlineManager, useQueryClient } from '@tanstack/react-query'\nimport { TanstackQueryDevtools } from '@tanstack/query-devtools'\nimport type {\n DevtoolsButtonPosition,\n DevtoolsErrorType,\n DevtoolsPosition,\n Theme,\n} from '@tanstack/query-devtools'\nimport type { QueryClient } from '@tanstack/react-query'\n\n/**\n * The props of `ReactQueryDevtools`, which renders the devtools with a toggle button that opens\n * them.\n */\nexport interface DevtoolsOptions {\n /**\n * Set this true if you want the dev tools to default to being open\n */\n initialIsOpen?: boolean\n /**\n * The position of the TanStack logo to open and close the devtools panel.\n * 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right' | 'relative'\n * @defaultValue bottom-right\n */\n buttonPosition?: DevtoolsButtonPosition\n /**\n * The position of the React Query devtools panel.\n * 'top' | 'bottom' | 'left' | 'right'\n * @defaultValue bottom\n */\n position?: DevtoolsPosition\n /**\n * Custom instance of QueryClient\n */\n client?: QueryClient\n /**\n * Use this so you can define custom errors that can 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 head. This is useful if you are using a Content Security Policy (CSP) nonce to allow inline styles.\n */\n styleNonce?: string\n /**\n * Use this to pass a shadow DOM target to the devtools so that the styles will be applied\n * within the shadow DOM instead of within the head tag in the light DOM.\n */\n shadowDOMTarget?: ShadowRoot\n /**\n * Set this to true to hide disabled queries from the devtools panel.\n */\n hideDisabledQueries?: boolean\n /**\n * Set this to 'light', 'dark', or 'system' to change the theme of the devtools panel.\n * This overrides the theme selected in the devtools Settings menu. When omitted, the\n * selected theme is used, or `'system'` if none is selected.\n */\n theme?: Theme\n}\n\n/**\n * Renders the TanStack Query devtools, with a toggle button that opens them, for the given or\n * nearest `QueryClient`.\n * @param props - The devtools options.\n * @returns The element the devtools are mounted in.\n */\nexport function ReactQueryDevtools(\n props: DevtoolsOptions,\n): React.ReactElement | null {\n const queryClient = useQueryClient(props.client)\n const ref = React.useRef<HTMLDivElement>(null)\n const {\n buttonPosition,\n position,\n initialIsOpen,\n errorTypes,\n styleNonce,\n shadowDOMTarget,\n hideDisabledQueries,\n theme,\n } = props\n const [devtools] = React.useState(\n () =>\n new TanstackQueryDevtools({\n client: queryClient,\n queryFlavor: 'React Query',\n version: '5',\n onlineManager,\n buttonPosition,\n position,\n initialIsOpen,\n errorTypes,\n styleNonce,\n shadowDOMTarget,\n hideDisabledQueries,\n theme,\n }),\n )\n\n React.useEffect(() => {\n devtools.setClient(queryClient)\n }, [queryClient, devtools])\n\n React.useEffect(() => {\n if (buttonPosition) {\n devtools.setButtonPosition(buttonPosition)\n }\n }, [buttonPosition, devtools])\n\n React.useEffect(() => {\n if (position) {\n devtools.setPosition(position)\n }\n }, [position, devtools])\n\n React.useEffect(() => {\n devtools.setInitialIsOpen(initialIsOpen || false)\n }, [initialIsOpen, devtools])\n\n React.useEffect(() => {\n devtools.setErrorTypes(errorTypes || [])\n }, [errorTypes, devtools])\n\n React.useEffect(() => {\n devtools.setTheme(theme)\n }, [theme, devtools])\n\n React.useEffect(() => {\n if (ref.current) {\n devtools.mount(ref.current)\n }\n\n return () => {\n devtools.unmount()\n }\n }, [devtools])\n\n return <div dir=\"ltr\" className=\"tsqd-parent-container\" ref={ref}></div>\n}\n"],"mappings":";;;;;;;;;;;;AAoEA,SAAgB,mBACd,OAC2B;CAC3B,MAAM,cAAc,eAAe,MAAM,MAAM;CAC/C,MAAM,MAAM,MAAM,OAAuB,IAAI;CAC7C,MAAM,EACJ,gBACA,UACA,eACA,YACA,YACA,iBACA,qBACA,UACE;CACJ,MAAM,CAAC,YAAY,MAAM,eAErB,IAAI,sBAAsB;EACxB,QAAQ;EACR,aAAa;EACb,SAAS;EACT;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF,CAAC,CACL;CAEA,MAAM,gBAAgB;EACpB,SAAS,UAAU,WAAW;CAChC,GAAG,CAAC,aAAa,QAAQ,CAAC;CAE1B,MAAM,gBAAgB;EACpB,IAAI,gBACF,SAAS,kBAAkB,cAAc;CAE7C,GAAG,CAAC,gBAAgB,QAAQ,CAAC;CAE7B,MAAM,gBAAgB;EACpB,IAAI,UACF,SAAS,YAAY,QAAQ;CAEjC,GAAG,CAAC,UAAU,QAAQ,CAAC;CAEvB,MAAM,gBAAgB;EACpB,SAAS,iBAAiB,iBAAiB,KAAK;CAClD,GAAG,CAAC,eAAe,QAAQ,CAAC;CAE5B,MAAM,gBAAgB;EACpB,SAAS,cAAc,cAAc,CAAC,CAAC;CACzC,GAAG,CAAC,YAAY,QAAQ,CAAC;CAEzB,MAAM,gBAAgB;EACpB,SAAS,SAAS,KAAK;CACzB,GAAG,CAAC,OAAO,QAAQ,CAAC;CAEpB,MAAM,gBAAgB;EACpB,IAAI,IAAI,SACN,SAAS,MAAM,IAAI,OAAO;EAG5B,aAAa;GACX,SAAS,QAAQ;EACnB;CACF,GAAG,CAAC,QAAQ,CAAC;CAEb,OAAO,oBAAC,OAAD;EAAK,KAAI;EAAM,WAAU;EAA6B;CAAU,CAAA;AACzE"}
|