@tanstack/preact-query-devtools 5.103.0 → 5.103.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/legacy/PreactQueryDevtools.cjs.map +1 -1
- package/build/legacy/PreactQueryDevtools.d.cts +6 -3
- package/build/legacy/PreactQueryDevtools.d.cts.map +1 -1
- package/build/legacy/PreactQueryDevtools.d.ts +6 -3
- package/build/legacy/PreactQueryDevtools.d.ts.map +1 -1
- package/build/legacy/PreactQueryDevtools.js.map +1 -1
- package/build/legacy/PreactQueryDevtoolsPanel.cjs.map +1 -1
- package/build/legacy/PreactQueryDevtoolsPanel.d.cts +2 -1
- package/build/legacy/PreactQueryDevtoolsPanel.d.cts.map +1 -1
- package/build/legacy/PreactQueryDevtoolsPanel.d.ts +2 -1
- package/build/legacy/PreactQueryDevtoolsPanel.d.ts.map +1 -1
- package/build/legacy/PreactQueryDevtoolsPanel.js.map +1 -1
- package/build/modern/PreactQueryDevtools.cjs.map +1 -1
- package/build/modern/PreactQueryDevtools.d.cts +6 -3
- package/build/modern/PreactQueryDevtools.d.cts.map +1 -1
- package/build/modern/PreactQueryDevtools.d.ts +6 -3
- package/build/modern/PreactQueryDevtools.d.ts.map +1 -1
- package/build/modern/PreactQueryDevtools.js.map +1 -1
- package/build/modern/PreactQueryDevtoolsPanel.cjs.map +1 -1
- package/build/modern/PreactQueryDevtoolsPanel.d.cts +2 -1
- package/build/modern/PreactQueryDevtoolsPanel.d.cts.map +1 -1
- package/build/modern/PreactQueryDevtoolsPanel.d.ts +2 -1
- package/build/modern/PreactQueryDevtoolsPanel.d.ts.map +1 -1
- package/build/modern/PreactQueryDevtoolsPanel.js.map +1 -1
- package/package.json +4 -4
- package/src/PreactQueryDevtools.tsx +6 -3
- package/src/PreactQueryDevtoolsPanel.tsx +2 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PreactQueryDevtools.cjs","names":["useQueryClient","useRef","useState","TanstackQueryDevtools"],"sources":["../../src/PreactQueryDevtools.tsx"],"sourcesContent":["import { useRef, useState, useEffect } from 'preact/hooks'\nimport { onlineManager, useQueryClient } from '@tanstack/preact-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/preact-query'\nimport type { VNode } from 'preact'\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 *
|
|
1
|
+
{"version":3,"file":"PreactQueryDevtools.cjs","names":["useQueryClient","useRef","useState","TanstackQueryDevtools"],"sources":["../../src/PreactQueryDevtools.tsx"],"sourcesContent":["import { useRef, useState, useEffect } from 'preact/hooks'\nimport { onlineManager, useQueryClient } from '@tanstack/preact-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/preact-query'\nimport type { VNode } from 'preact'\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 *\n * @defaultValue bottom-right\n */\n buttonPosition?: DevtoolsButtonPosition\n /**\n * The position of the Preact Query devtools panel.\n * 'top' | 'bottom' | 'left' | 'right'\n *\n * @defaultValue bottom\n */\n position?: DevtoolsPosition\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 * Use this to provide custom error type handlers for the devtools panel.\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 * 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 *\n * @defaultValue system\n */\n theme?: Theme\n}\n\nexport function PreactQueryDevtools(props: DevtoolsOptions): VNode | null {\n const queryClient = useQueryClient(props.client)\n const ref = 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] = useState(\n () =>\n new TanstackQueryDevtools({\n client: queryClient,\n queryFlavor: 'Preact 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 useEffect(() => {\n devtools.setClient(queryClient)\n }, [queryClient, devtools])\n\n useEffect(() => {\n if (buttonPosition) {\n devtools.setButtonPosition(buttonPosition)\n }\n }, [buttonPosition, devtools])\n\n useEffect(() => {\n if (position) {\n devtools.setPosition(position)\n }\n }, [position, devtools])\n\n useEffect(() => {\n devtools.setInitialIsOpen(initialIsOpen || false)\n }, [initialIsOpen, 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 <div dir=\"ltr\" className=\"tsqd-parent-container\" ref={ref} />\n}\n"],"mappings":";;;;;;AA8DA,SAAgB,oBAAoB,OAAsC;CACxE,MAAM,eAAA,GAAcA,uBAAAA,eAAAA,CAAe,MAAM,MAAM;CAC/C,MAAM,OAAA,GAAMC,aAAAA,OAAAA,CAAuB,IAAI;CACvC,MAAM,EACJ,gBACA,UACA,eACA,YACA,YACA,iBACA,qBACA,UACE;CACJ,MAAM,CAAC,aAAA,GAAYC,aAAAA,SAAAA,OAEf,IAAIC,yBAAAA,sBAAsB;EACxB,QAAQ;EACR,aAAa;EACb,SAAS;EACT,eAAA,uBAAA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF,CAAC,CACL;CAEA,CAAA,GAAA,aAAA,UAAA,OAAgB;EACd,SAAS,UAAU,WAAW;CAChC,GAAG,CAAC,aAAa,QAAQ,CAAC;CAE1B,CAAA,GAAA,aAAA,UAAA,OAAgB;EACd,IAAI,gBACF,SAAS,kBAAkB,cAAc;CAE7C,GAAG,CAAC,gBAAgB,QAAQ,CAAC;CAE7B,CAAA,GAAA,aAAA,UAAA,OAAgB;EACd,IAAI,UACF,SAAS,YAAY,QAAQ;CAEjC,GAAG,CAAC,UAAU,QAAQ,CAAC;CAEvB,CAAA,GAAA,aAAA,UAAA,OAAgB;EACd,SAAS,iBAAiB,iBAAiB,KAAK;CAClD,GAAG,CAAC,eAAe,QAAQ,CAAC;CAE5B,CAAA,GAAA,aAAA,UAAA,OAAgB;EACd,SAAS,cAAc,cAAc,CAAC,CAAC;CACzC,GAAG,CAAC,YAAY,QAAQ,CAAC;CAEzB,CAAA,GAAA,aAAA,UAAA,OAAgB;EACd,SAAS,SAAS,KAAK;CACzB,GAAG,CAAC,OAAO,QAAQ,CAAC;CAEpB,CAAA,GAAA,aAAA,UAAA,OAAgB;EACd,IAAI,IAAI,SACN,SAAS,MAAM,IAAI,OAAO;EAE5B,aAAa;GACX,SAAS,QAAQ;EACnB;CACF,GAAG,CAAC,QAAQ,CAAC;CAEb,OAAO,iBAAA,GAAA,mBAAA,IAAA,CAAC,OAAD;EAAK,KAAI;EAAM,WAAU;EAA6B;CAAM,CAAA;AACrE"}
|
|
@@ -12,13 +12,15 @@ interface DevtoolsOptions {
|
|
|
12
12
|
/**
|
|
13
13
|
* The position of the TanStack logo to open and close the devtools panel.
|
|
14
14
|
* 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right' | 'relative'
|
|
15
|
-
*
|
|
15
|
+
*
|
|
16
|
+
* @defaultValue bottom-right
|
|
16
17
|
*/
|
|
17
18
|
buttonPosition?: DevtoolsButtonPosition;
|
|
18
19
|
/**
|
|
19
20
|
* The position of the Preact Query devtools panel.
|
|
20
21
|
* 'top' | 'bottom' | 'left' | 'right'
|
|
21
|
-
*
|
|
22
|
+
*
|
|
23
|
+
* @defaultValue bottom
|
|
22
24
|
*/
|
|
23
25
|
position?: DevtoolsPosition;
|
|
24
26
|
/**
|
|
@@ -46,7 +48,8 @@ interface DevtoolsOptions {
|
|
|
46
48
|
hideDisabledQueries?: boolean;
|
|
47
49
|
/**
|
|
48
50
|
* Use this to set the theme of the devtools panel.
|
|
49
|
-
*
|
|
51
|
+
*
|
|
52
|
+
* @defaultValue system
|
|
50
53
|
*/
|
|
51
54
|
theme?: Theme;
|
|
52
55
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PreactQueryDevtools.d.cts","names":[],"sources":["../../src/PreactQueryDevtools.tsx"],"mappings":";;;;;;UAYiB;;;;EAIf
|
|
1
|
+
{"version":3,"file":"PreactQueryDevtools.d.cts","names":[],"sources":["../../src/PreactQueryDevtools.tsx"],"mappings":";;;;;;UAYiB;;;;EAIf;;;;;;;EAOA,iBAAiB;;;;;;;EAOjB,WAAW;;;;;EAKX,SAAS;;;;EAIT,aAAa,MAAM;;;;;;EAMnB;;;;EAIA,kBAAkB;;;;EAIlB;;;;;;EAMA,QAAQ;;iBAGM,oBAAoB,OAAO,kBAAkB"}
|
|
@@ -12,13 +12,15 @@ interface DevtoolsOptions {
|
|
|
12
12
|
/**
|
|
13
13
|
* The position of the TanStack logo to open and close the devtools panel.
|
|
14
14
|
* 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right' | 'relative'
|
|
15
|
-
*
|
|
15
|
+
*
|
|
16
|
+
* @defaultValue bottom-right
|
|
16
17
|
*/
|
|
17
18
|
buttonPosition?: DevtoolsButtonPosition;
|
|
18
19
|
/**
|
|
19
20
|
* The position of the Preact Query devtools panel.
|
|
20
21
|
* 'top' | 'bottom' | 'left' | 'right'
|
|
21
|
-
*
|
|
22
|
+
*
|
|
23
|
+
* @defaultValue bottom
|
|
22
24
|
*/
|
|
23
25
|
position?: DevtoolsPosition;
|
|
24
26
|
/**
|
|
@@ -46,7 +48,8 @@ interface DevtoolsOptions {
|
|
|
46
48
|
hideDisabledQueries?: boolean;
|
|
47
49
|
/**
|
|
48
50
|
* Use this to set the theme of the devtools panel.
|
|
49
|
-
*
|
|
51
|
+
*
|
|
52
|
+
* @defaultValue system
|
|
50
53
|
*/
|
|
51
54
|
theme?: Theme;
|
|
52
55
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PreactQueryDevtools.d.ts","names":[],"sources":["../../src/PreactQueryDevtools.tsx"],"mappings":";;;;;;UAYiB;;;;EAIf
|
|
1
|
+
{"version":3,"file":"PreactQueryDevtools.d.ts","names":[],"sources":["../../src/PreactQueryDevtools.tsx"],"mappings":";;;;;;UAYiB;;;;EAIf;;;;;;;EAOA,iBAAiB;;;;;;;EAOjB,WAAW;;;;;EAKX,SAAS;;;;EAIT,aAAa,MAAM;;;;;;EAMnB;;;;EAIA,kBAAkB;;;;EAIlB;;;;;;EAMA,QAAQ;;iBAGM,oBAAoB,OAAO,kBAAkB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PreactQueryDevtools.js","names":[],"sources":["../../src/PreactQueryDevtools.tsx"],"sourcesContent":["import { useRef, useState, useEffect } from 'preact/hooks'\nimport { onlineManager, useQueryClient } from '@tanstack/preact-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/preact-query'\nimport type { VNode } from 'preact'\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 *
|
|
1
|
+
{"version":3,"file":"PreactQueryDevtools.js","names":[],"sources":["../../src/PreactQueryDevtools.tsx"],"sourcesContent":["import { useRef, useState, useEffect } from 'preact/hooks'\nimport { onlineManager, useQueryClient } from '@tanstack/preact-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/preact-query'\nimport type { VNode } from 'preact'\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 *\n * @defaultValue bottom-right\n */\n buttonPosition?: DevtoolsButtonPosition\n /**\n * The position of the Preact Query devtools panel.\n * 'top' | 'bottom' | 'left' | 'right'\n *\n * @defaultValue bottom\n */\n position?: DevtoolsPosition\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 * Use this to provide custom error type handlers for the devtools panel.\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 * 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 *\n * @defaultValue system\n */\n theme?: Theme\n}\n\nexport function PreactQueryDevtools(props: DevtoolsOptions): VNode | null {\n const queryClient = useQueryClient(props.client)\n const ref = 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] = useState(\n () =>\n new TanstackQueryDevtools({\n client: queryClient,\n queryFlavor: 'Preact 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 useEffect(() => {\n devtools.setClient(queryClient)\n }, [queryClient, devtools])\n\n useEffect(() => {\n if (buttonPosition) {\n devtools.setButtonPosition(buttonPosition)\n }\n }, [buttonPosition, devtools])\n\n useEffect(() => {\n if (position) {\n devtools.setPosition(position)\n }\n }, [position, devtools])\n\n useEffect(() => {\n devtools.setInitialIsOpen(initialIsOpen || false)\n }, [initialIsOpen, 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 <div dir=\"ltr\" className=\"tsqd-parent-container\" ref={ref} />\n}\n"],"mappings":";;;;;AA8DA,SAAgB,oBAAoB,OAAsC;CACxE,MAAM,cAAc,eAAe,MAAM,MAAM;CAC/C,MAAM,MAAM,OAAuB,IAAI;CACvC,MAAM,EACJ,gBACA,UACA,eACA,YACA,YACA,iBACA,qBACA,UACE;CACJ,MAAM,CAAC,YAAY,eAEf,IAAI,sBAAsB;EACxB,QAAQ;EACR,aAAa;EACb,SAAS;EACT;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF,CAAC,CACL;CAEA,gBAAgB;EACd,SAAS,UAAU,WAAW;CAChC,GAAG,CAAC,aAAa,QAAQ,CAAC;CAE1B,gBAAgB;EACd,IAAI,gBACF,SAAS,kBAAkB,cAAc;CAE7C,GAAG,CAAC,gBAAgB,QAAQ,CAAC;CAE7B,gBAAgB;EACd,IAAI,UACF,SAAS,YAAY,QAAQ;CAEjC,GAAG,CAAC,UAAU,QAAQ,CAAC;CAEvB,gBAAgB;EACd,SAAS,iBAAiB,iBAAiB,KAAK;CAClD,GAAG,CAAC,eAAe,QAAQ,CAAC;CAE5B,gBAAgB;EACd,SAAS,cAAc,cAAc,CAAC,CAAC;CACzC,GAAG,CAAC,YAAY,QAAQ,CAAC;CAEzB,gBAAgB;EACd,SAAS,SAAS,KAAK;CACzB,GAAG,CAAC,OAAO,QAAQ,CAAC;CAEpB,gBAAgB;EACd,IAAI,IAAI,SACN,SAAS,MAAM,IAAI,OAAO;EAE5B,aAAa;GACX,SAAS,QAAQ;EACnB;CACF,GAAG,CAAC,QAAQ,CAAC;CAEb,OAAO,oBAAC,OAAD;EAAK,KAAI;EAAM,WAAU;EAA6B;CAAM,CAAA;AACrE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PreactQueryDevtoolsPanel.cjs","names":["useQueryClient","useRef","useState","TanstackQueryDevtoolsPanel"],"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 { CSSProperties, 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?: 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 *
|
|
1
|
+
{"version":3,"file":"PreactQueryDevtoolsPanel.cjs","names":["useQueryClient","useRef","useState","TanstackQueryDevtoolsPanel"],"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 { CSSProperties, 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?: 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 *\n * @defaultValue 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":";;;;;;AA+CA,SAAgB,yBACd,OACc;CACd,MAAM,eAAA,GAAcA,uBAAAA,eAAAA,CAAe,MAAM,MAAM;CAC/C,MAAM,OAAA,GAAMC,aAAAA,OAAAA,CAAuB,IAAI;CACvC,MAAM,EACJ,YACA,YACA,iBACA,qBACA,UACE;CACJ,MAAM,CAAC,aAAA,GAAYC,aAAAA,SAAAA,OAEf,IAAIC,yBAAAA,2BAA2B;EAC7B,QAAQ;EACR,aAAa;EACb,SAAS;EACT,eAAA,uBAAA;EACA,gBAAgB;EAChB,UAAU;EACV,eAAe;EACf;EACA;EACA;EACA,SAAS,MAAM;EACf;EACA;CACF,CAAC,CACL;CAEA,CAAA,GAAA,aAAA,UAAA,OAAgB;EACd,SAAS,UAAU,WAAW;CAChC,GAAG,CAAC,aAAa,QAAQ,CAAC;CAE1B,CAAA,GAAA,aAAA,UAAA,OAAgB;EACd,SAAS,WAAW,MAAM,kBAAkB,CAAC,EAAE;CACjD,GAAG,CAAC,MAAM,SAAS,QAAQ,CAAC;CAE5B,CAAA,GAAA,aAAA,UAAA,OAAgB;EACd,SAAS,cAAc,cAAc,CAAC,CAAC;CACzC,GAAG,CAAC,YAAY,QAAQ,CAAC;CAEzB,CAAA,GAAA,aAAA,UAAA,OAAgB;EACd,SAAS,SAAS,KAAK;CACzB,GAAG,CAAC,OAAO,QAAQ,CAAC;CAEpB,CAAA,GAAA,aAAA,UAAA,OAAgB;EACd,IAAI,IAAI,SACN,SAAS,MAAM,IAAI,OAAO;EAE5B,aAAa;GACX,SAAS,QAAQ;EACnB;CACF,GAAG,CAAC,QAAQ,CAAC;CAEb,OACE,iBAAA,GAAA,mBAAA,IAAA,CAAC,OAAD;EACE,OAAO;GAAE,QAAQ;GAAS,GAAG,MAAM;EAAM;EACzC,WAAU;EACL;CACN,CAAA;AAEL"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PreactQueryDevtoolsPanel.d.cts","names":[],"sources":["../../src/PreactQueryDevtoolsPanel.tsx"],"mappings":";;;;;;UAOiB;;;;;EAKf,SAAS;;;;EAIT,aAAa,MAAM;;;;;;EAMnB;;;;EAIA,kBAAkB;;;;EAIlB,QAAQ;;;;EAIR;;;;EAIA
|
|
1
|
+
{"version":3,"file":"PreactQueryDevtoolsPanel.d.cts","names":[],"sources":["../../src/PreactQueryDevtoolsPanel.tsx"],"mappings":";;;;;;UAOiB;;;;;EAKf,SAAS;;;;EAIT,aAAa,MAAM;;;;;;EAMnB;;;;EAIA,kBAAkB;;;;EAIlB,QAAQ;;;;EAIR;;;;EAIA;;;;;;EAMA,QAAQ;;iBAGM,yBACd,OAAO,uBACN"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PreactQueryDevtoolsPanel.d.ts","names":[],"sources":["../../src/PreactQueryDevtoolsPanel.tsx"],"mappings":";;;;;;UAOiB;;;;;EAKf,SAAS;;;;EAIT,aAAa,MAAM;;;;;;EAMnB;;;;EAIA,kBAAkB;;;;EAIlB,QAAQ;;;;EAIR;;;;EAIA
|
|
1
|
+
{"version":3,"file":"PreactQueryDevtoolsPanel.d.ts","names":[],"sources":["../../src/PreactQueryDevtoolsPanel.tsx"],"mappings":";;;;;;UAOiB;;;;;EAKf,SAAS;;;;EAIT,aAAa,MAAM;;;;;;EAMnB;;;;EAIA,kBAAkB;;;;EAIlB,QAAQ;;;;EAIR;;;;EAIA;;;;;;EAMA,QAAQ;;iBAGM,yBACd,OAAO,uBACN"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PreactQueryDevtoolsPanel.js","names":[],"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 { CSSProperties, 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?: 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 *
|
|
1
|
+
{"version":3,"file":"PreactQueryDevtoolsPanel.js","names":[],"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 { CSSProperties, 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?: 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 *\n * @defaultValue 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":";;;;;AA+CA,SAAgB,yBACd,OACc;CACd,MAAM,cAAc,eAAe,MAAM,MAAM;CAC/C,MAAM,MAAM,OAAuB,IAAI;CACvC,MAAM,EACJ,YACA,YACA,iBACA,qBACA,UACE;CACJ,MAAM,CAAC,YAAY,eAEf,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,gBAAgB;EACd,SAAS,UAAU,WAAW;CAChC,GAAG,CAAC,aAAa,QAAQ,CAAC;CAE1B,gBAAgB;EACd,SAAS,WAAW,MAAM,kBAAkB,CAAC,EAAE;CACjD,GAAG,CAAC,MAAM,SAAS,QAAQ,CAAC;CAE5B,gBAAgB;EACd,SAAS,cAAc,cAAc,CAAC,CAAC;CACzC,GAAG,CAAC,YAAY,QAAQ,CAAC;CAEzB,gBAAgB;EACd,SAAS,SAAS,KAAK;CACzB,GAAG,CAAC,OAAO,QAAQ,CAAC;CAEpB,gBAAgB;EACd,IAAI,IAAI,SACN,SAAS,MAAM,IAAI,OAAO;EAE5B,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;CACN,CAAA;AAEL"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PreactQueryDevtools.cjs","names":["useQueryClient","useRef","useState","TanstackQueryDevtools"],"sources":["../../src/PreactQueryDevtools.tsx"],"sourcesContent":["import { useRef, useState, useEffect } from 'preact/hooks'\nimport { onlineManager, useQueryClient } from '@tanstack/preact-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/preact-query'\nimport type { VNode } from 'preact'\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 *
|
|
1
|
+
{"version":3,"file":"PreactQueryDevtools.cjs","names":["useQueryClient","useRef","useState","TanstackQueryDevtools"],"sources":["../../src/PreactQueryDevtools.tsx"],"sourcesContent":["import { useRef, useState, useEffect } from 'preact/hooks'\nimport { onlineManager, useQueryClient } from '@tanstack/preact-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/preact-query'\nimport type { VNode } from 'preact'\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 *\n * @defaultValue bottom-right\n */\n buttonPosition?: DevtoolsButtonPosition\n /**\n * The position of the Preact Query devtools panel.\n * 'top' | 'bottom' | 'left' | 'right'\n *\n * @defaultValue bottom\n */\n position?: DevtoolsPosition\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 * Use this to provide custom error type handlers for the devtools panel.\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 * 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 *\n * @defaultValue system\n */\n theme?: Theme\n}\n\nexport function PreactQueryDevtools(props: DevtoolsOptions): VNode | null {\n const queryClient = useQueryClient(props.client)\n const ref = 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] = useState(\n () =>\n new TanstackQueryDevtools({\n client: queryClient,\n queryFlavor: 'Preact 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 useEffect(() => {\n devtools.setClient(queryClient)\n }, [queryClient, devtools])\n\n useEffect(() => {\n if (buttonPosition) {\n devtools.setButtonPosition(buttonPosition)\n }\n }, [buttonPosition, devtools])\n\n useEffect(() => {\n if (position) {\n devtools.setPosition(position)\n }\n }, [position, devtools])\n\n useEffect(() => {\n devtools.setInitialIsOpen(initialIsOpen || false)\n }, [initialIsOpen, 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 <div dir=\"ltr\" className=\"tsqd-parent-container\" ref={ref} />\n}\n"],"mappings":";;;;;;AA8DA,SAAgB,oBAAoB,OAAsC;CACxE,MAAM,eAAA,GAAcA,uBAAAA,eAAAA,CAAe,MAAM,MAAM;CAC/C,MAAM,OAAA,GAAMC,aAAAA,OAAAA,CAAuB,IAAI;CACvC,MAAM,EACJ,gBACA,UACA,eACA,YACA,YACA,iBACA,qBACA,UACE;CACJ,MAAM,CAAC,aAAA,GAAYC,aAAAA,SAAAA,OAEf,IAAIC,yBAAAA,sBAAsB;EACxB,QAAQ;EACR,aAAa;EACb,SAAS;EACT,eAAA,uBAAA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF,CAAC,CACL;CAEA,CAAA,GAAA,aAAA,UAAA,OAAgB;EACd,SAAS,UAAU,WAAW;CAChC,GAAG,CAAC,aAAa,QAAQ,CAAC;CAE1B,CAAA,GAAA,aAAA,UAAA,OAAgB;EACd,IAAI,gBACF,SAAS,kBAAkB,cAAc;CAE7C,GAAG,CAAC,gBAAgB,QAAQ,CAAC;CAE7B,CAAA,GAAA,aAAA,UAAA,OAAgB;EACd,IAAI,UACF,SAAS,YAAY,QAAQ;CAEjC,GAAG,CAAC,UAAU,QAAQ,CAAC;CAEvB,CAAA,GAAA,aAAA,UAAA,OAAgB;EACd,SAAS,iBAAiB,iBAAiB,KAAK;CAClD,GAAG,CAAC,eAAe,QAAQ,CAAC;CAE5B,CAAA,GAAA,aAAA,UAAA,OAAgB;EACd,SAAS,cAAc,cAAc,CAAC,CAAC;CACzC,GAAG,CAAC,YAAY,QAAQ,CAAC;CAEzB,CAAA,GAAA,aAAA,UAAA,OAAgB;EACd,SAAS,SAAS,KAAK;CACzB,GAAG,CAAC,OAAO,QAAQ,CAAC;CAEpB,CAAA,GAAA,aAAA,UAAA,OAAgB;EACd,IAAI,IAAI,SACN,SAAS,MAAM,IAAI,OAAO;EAE5B,aAAa;GACX,SAAS,QAAQ;EACnB;CACF,GAAG,CAAC,QAAQ,CAAC;CAEb,OAAO,iBAAA,GAAA,mBAAA,IAAA,CAAC,OAAD;EAAK,KAAI;EAAM,WAAU;EAA6B;CAAM,CAAA;AACrE"}
|
|
@@ -12,13 +12,15 @@ interface DevtoolsOptions {
|
|
|
12
12
|
/**
|
|
13
13
|
* The position of the TanStack logo to open and close the devtools panel.
|
|
14
14
|
* 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right' | 'relative'
|
|
15
|
-
*
|
|
15
|
+
*
|
|
16
|
+
* @defaultValue bottom-right
|
|
16
17
|
*/
|
|
17
18
|
buttonPosition?: DevtoolsButtonPosition;
|
|
18
19
|
/**
|
|
19
20
|
* The position of the Preact Query devtools panel.
|
|
20
21
|
* 'top' | 'bottom' | 'left' | 'right'
|
|
21
|
-
*
|
|
22
|
+
*
|
|
23
|
+
* @defaultValue bottom
|
|
22
24
|
*/
|
|
23
25
|
position?: DevtoolsPosition;
|
|
24
26
|
/**
|
|
@@ -46,7 +48,8 @@ interface DevtoolsOptions {
|
|
|
46
48
|
hideDisabledQueries?: boolean;
|
|
47
49
|
/**
|
|
48
50
|
* Use this to set the theme of the devtools panel.
|
|
49
|
-
*
|
|
51
|
+
*
|
|
52
|
+
* @defaultValue system
|
|
50
53
|
*/
|
|
51
54
|
theme?: Theme;
|
|
52
55
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PreactQueryDevtools.d.cts","names":[],"sources":["../../src/PreactQueryDevtools.tsx"],"mappings":";;;;;;UAYiB;;;;EAIf
|
|
1
|
+
{"version":3,"file":"PreactQueryDevtools.d.cts","names":[],"sources":["../../src/PreactQueryDevtools.tsx"],"mappings":";;;;;;UAYiB;;;;EAIf;;;;;;;EAOA,iBAAiB;;;;;;;EAOjB,WAAW;;;;;EAKX,SAAS;;;;EAIT,aAAa,MAAM;;;;;;EAMnB;;;;EAIA,kBAAkB;;;;EAIlB;;;;;;EAMA,QAAQ;;iBAGM,oBAAoB,OAAO,kBAAkB"}
|
|
@@ -12,13 +12,15 @@ interface DevtoolsOptions {
|
|
|
12
12
|
/**
|
|
13
13
|
* The position of the TanStack logo to open and close the devtools panel.
|
|
14
14
|
* 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right' | 'relative'
|
|
15
|
-
*
|
|
15
|
+
*
|
|
16
|
+
* @defaultValue bottom-right
|
|
16
17
|
*/
|
|
17
18
|
buttonPosition?: DevtoolsButtonPosition;
|
|
18
19
|
/**
|
|
19
20
|
* The position of the Preact Query devtools panel.
|
|
20
21
|
* 'top' | 'bottom' | 'left' | 'right'
|
|
21
|
-
*
|
|
22
|
+
*
|
|
23
|
+
* @defaultValue bottom
|
|
22
24
|
*/
|
|
23
25
|
position?: DevtoolsPosition;
|
|
24
26
|
/**
|
|
@@ -46,7 +48,8 @@ interface DevtoolsOptions {
|
|
|
46
48
|
hideDisabledQueries?: boolean;
|
|
47
49
|
/**
|
|
48
50
|
* Use this to set the theme of the devtools panel.
|
|
49
|
-
*
|
|
51
|
+
*
|
|
52
|
+
* @defaultValue system
|
|
50
53
|
*/
|
|
51
54
|
theme?: Theme;
|
|
52
55
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PreactQueryDevtools.d.ts","names":[],"sources":["../../src/PreactQueryDevtools.tsx"],"mappings":";;;;;;UAYiB;;;;EAIf
|
|
1
|
+
{"version":3,"file":"PreactQueryDevtools.d.ts","names":[],"sources":["../../src/PreactQueryDevtools.tsx"],"mappings":";;;;;;UAYiB;;;;EAIf;;;;;;;EAOA,iBAAiB;;;;;;;EAOjB,WAAW;;;;;EAKX,SAAS;;;;EAIT,aAAa,MAAM;;;;;;EAMnB;;;;EAIA,kBAAkB;;;;EAIlB;;;;;;EAMA,QAAQ;;iBAGM,oBAAoB,OAAO,kBAAkB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PreactQueryDevtools.js","names":[],"sources":["../../src/PreactQueryDevtools.tsx"],"sourcesContent":["import { useRef, useState, useEffect } from 'preact/hooks'\nimport { onlineManager, useQueryClient } from '@tanstack/preact-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/preact-query'\nimport type { VNode } from 'preact'\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 *
|
|
1
|
+
{"version":3,"file":"PreactQueryDevtools.js","names":[],"sources":["../../src/PreactQueryDevtools.tsx"],"sourcesContent":["import { useRef, useState, useEffect } from 'preact/hooks'\nimport { onlineManager, useQueryClient } from '@tanstack/preact-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/preact-query'\nimport type { VNode } from 'preact'\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 *\n * @defaultValue bottom-right\n */\n buttonPosition?: DevtoolsButtonPosition\n /**\n * The position of the Preact Query devtools panel.\n * 'top' | 'bottom' | 'left' | 'right'\n *\n * @defaultValue bottom\n */\n position?: DevtoolsPosition\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 * Use this to provide custom error type handlers for the devtools panel.\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 * 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 *\n * @defaultValue system\n */\n theme?: Theme\n}\n\nexport function PreactQueryDevtools(props: DevtoolsOptions): VNode | null {\n const queryClient = useQueryClient(props.client)\n const ref = 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] = useState(\n () =>\n new TanstackQueryDevtools({\n client: queryClient,\n queryFlavor: 'Preact 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 useEffect(() => {\n devtools.setClient(queryClient)\n }, [queryClient, devtools])\n\n useEffect(() => {\n if (buttonPosition) {\n devtools.setButtonPosition(buttonPosition)\n }\n }, [buttonPosition, devtools])\n\n useEffect(() => {\n if (position) {\n devtools.setPosition(position)\n }\n }, [position, devtools])\n\n useEffect(() => {\n devtools.setInitialIsOpen(initialIsOpen || false)\n }, [initialIsOpen, 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 <div dir=\"ltr\" className=\"tsqd-parent-container\" ref={ref} />\n}\n"],"mappings":";;;;;AA8DA,SAAgB,oBAAoB,OAAsC;CACxE,MAAM,cAAc,eAAe,MAAM,MAAM;CAC/C,MAAM,MAAM,OAAuB,IAAI;CACvC,MAAM,EACJ,gBACA,UACA,eACA,YACA,YACA,iBACA,qBACA,UACE;CACJ,MAAM,CAAC,YAAY,eAEf,IAAI,sBAAsB;EACxB,QAAQ;EACR,aAAa;EACb,SAAS;EACT;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF,CAAC,CACL;CAEA,gBAAgB;EACd,SAAS,UAAU,WAAW;CAChC,GAAG,CAAC,aAAa,QAAQ,CAAC;CAE1B,gBAAgB;EACd,IAAI,gBACF,SAAS,kBAAkB,cAAc;CAE7C,GAAG,CAAC,gBAAgB,QAAQ,CAAC;CAE7B,gBAAgB;EACd,IAAI,UACF,SAAS,YAAY,QAAQ;CAEjC,GAAG,CAAC,UAAU,QAAQ,CAAC;CAEvB,gBAAgB;EACd,SAAS,iBAAiB,iBAAiB,KAAK;CAClD,GAAG,CAAC,eAAe,QAAQ,CAAC;CAE5B,gBAAgB;EACd,SAAS,cAAc,cAAc,CAAC,CAAC;CACzC,GAAG,CAAC,YAAY,QAAQ,CAAC;CAEzB,gBAAgB;EACd,SAAS,SAAS,KAAK;CACzB,GAAG,CAAC,OAAO,QAAQ,CAAC;CAEpB,gBAAgB;EACd,IAAI,IAAI,SACN,SAAS,MAAM,IAAI,OAAO;EAE5B,aAAa;GACX,SAAS,QAAQ;EACnB;CACF,GAAG,CAAC,QAAQ,CAAC;CAEb,OAAO,oBAAC,OAAD;EAAK,KAAI;EAAM,WAAU;EAA6B;CAAM,CAAA;AACrE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PreactQueryDevtoolsPanel.cjs","names":["useQueryClient","useRef","useState","TanstackQueryDevtoolsPanel"],"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 { CSSProperties, 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?: 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 *
|
|
1
|
+
{"version":3,"file":"PreactQueryDevtoolsPanel.cjs","names":["useQueryClient","useRef","useState","TanstackQueryDevtoolsPanel"],"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 { CSSProperties, 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?: 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 *\n * @defaultValue 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":";;;;;;AA+CA,SAAgB,yBACd,OACc;CACd,MAAM,eAAA,GAAcA,uBAAAA,eAAAA,CAAe,MAAM,MAAM;CAC/C,MAAM,OAAA,GAAMC,aAAAA,OAAAA,CAAuB,IAAI;CACvC,MAAM,EACJ,YACA,YACA,iBACA,qBACA,UACE;CACJ,MAAM,CAAC,aAAA,GAAYC,aAAAA,SAAAA,OAEf,IAAIC,yBAAAA,2BAA2B;EAC7B,QAAQ;EACR,aAAa;EACb,SAAS;EACT,eAAA,uBAAA;EACA,gBAAgB;EAChB,UAAU;EACV,eAAe;EACf;EACA;EACA;EACA,SAAS,MAAM;EACf;EACA;CACF,CAAC,CACL;CAEA,CAAA,GAAA,aAAA,UAAA,OAAgB;EACd,SAAS,UAAU,WAAW;CAChC,GAAG,CAAC,aAAa,QAAQ,CAAC;CAE1B,CAAA,GAAA,aAAA,UAAA,OAAgB;EACd,SAAS,WAAW,MAAM,kBAAkB,CAAC,EAAE;CACjD,GAAG,CAAC,MAAM,SAAS,QAAQ,CAAC;CAE5B,CAAA,GAAA,aAAA,UAAA,OAAgB;EACd,SAAS,cAAc,cAAc,CAAC,CAAC;CACzC,GAAG,CAAC,YAAY,QAAQ,CAAC;CAEzB,CAAA,GAAA,aAAA,UAAA,OAAgB;EACd,SAAS,SAAS,KAAK;CACzB,GAAG,CAAC,OAAO,QAAQ,CAAC;CAEpB,CAAA,GAAA,aAAA,UAAA,OAAgB;EACd,IAAI,IAAI,SACN,SAAS,MAAM,IAAI,OAAO;EAE5B,aAAa;GACX,SAAS,QAAQ;EACnB;CACF,GAAG,CAAC,QAAQ,CAAC;CAEb,OACE,iBAAA,GAAA,mBAAA,IAAA,CAAC,OAAD;EACE,OAAO;GAAE,QAAQ;GAAS,GAAG,MAAM;EAAM;EACzC,WAAU;EACL;CACN,CAAA;AAEL"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PreactQueryDevtoolsPanel.d.cts","names":[],"sources":["../../src/PreactQueryDevtoolsPanel.tsx"],"mappings":";;;;;;UAOiB;;;;;EAKf,SAAS;;;;EAIT,aAAa,MAAM;;;;;;EAMnB;;;;EAIA,kBAAkB;;;;EAIlB,QAAQ;;;;EAIR;;;;EAIA
|
|
1
|
+
{"version":3,"file":"PreactQueryDevtoolsPanel.d.cts","names":[],"sources":["../../src/PreactQueryDevtoolsPanel.tsx"],"mappings":";;;;;;UAOiB;;;;;EAKf,SAAS;;;;EAIT,aAAa,MAAM;;;;;;EAMnB;;;;EAIA,kBAAkB;;;;EAIlB,QAAQ;;;;EAIR;;;;EAIA;;;;;;EAMA,QAAQ;;iBAGM,yBACd,OAAO,uBACN"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PreactQueryDevtoolsPanel.d.ts","names":[],"sources":["../../src/PreactQueryDevtoolsPanel.tsx"],"mappings":";;;;;;UAOiB;;;;;EAKf,SAAS;;;;EAIT,aAAa,MAAM;;;;;;EAMnB;;;;EAIA,kBAAkB;;;;EAIlB,QAAQ;;;;EAIR;;;;EAIA
|
|
1
|
+
{"version":3,"file":"PreactQueryDevtoolsPanel.d.ts","names":[],"sources":["../../src/PreactQueryDevtoolsPanel.tsx"],"mappings":";;;;;;UAOiB;;;;;EAKf,SAAS;;;;EAIT,aAAa,MAAM;;;;;;EAMnB;;;;EAIA,kBAAkB;;;;EAIlB,QAAQ;;;;EAIR;;;;EAIA;;;;;;EAMA,QAAQ;;iBAGM,yBACd,OAAO,uBACN"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PreactQueryDevtoolsPanel.js","names":[],"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 { CSSProperties, 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?: 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 *
|
|
1
|
+
{"version":3,"file":"PreactQueryDevtoolsPanel.js","names":[],"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 { CSSProperties, 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?: 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 *\n * @defaultValue 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":";;;;;AA+CA,SAAgB,yBACd,OACc;CACd,MAAM,cAAc,eAAe,MAAM,MAAM;CAC/C,MAAM,MAAM,OAAuB,IAAI;CACvC,MAAM,EACJ,YACA,YACA,iBACA,qBACA,UACE;CACJ,MAAM,CAAC,YAAY,eAEf,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,gBAAgB;EACd,SAAS,UAAU,WAAW;CAChC,GAAG,CAAC,aAAa,QAAQ,CAAC;CAE1B,gBAAgB;EACd,SAAS,WAAW,MAAM,kBAAkB,CAAC,EAAE;CACjD,GAAG,CAAC,MAAM,SAAS,QAAQ,CAAC;CAE5B,gBAAgB;EACd,SAAS,cAAc,cAAc,CAAC,CAAC;CACzC,GAAG,CAAC,YAAY,QAAQ,CAAC;CAEzB,gBAAgB;EACd,SAAS,SAAS,KAAK;CACzB,GAAG,CAAC,OAAO,QAAQ,CAAC;CAEpB,gBAAgB;EACd,IAAI,IAAI,SACN,SAAS,MAAM,IAAI,OAAO;EAE5B,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;CACN,CAAA;AAEL"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tanstack/preact-query-devtools",
|
|
3
|
-
"version": "5.103.
|
|
3
|
+
"version": "5.103.2",
|
|
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.103.
|
|
62
|
+
"@tanstack/query-devtools": "5.103.2"
|
|
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": "6.0.3",
|
|
71
71
|
"typescript-eslint": "^8.54.0",
|
|
72
|
-
"@tanstack/preact-query": "5.103.
|
|
72
|
+
"@tanstack/preact-query": "5.103.2"
|
|
73
73
|
},
|
|
74
74
|
"peerDependencies": {
|
|
75
75
|
"preact": "^10.0.0",
|
|
76
|
-
"@tanstack/preact-query": "^5.103.
|
|
76
|
+
"@tanstack/preact-query": "^5.103.2"
|
|
77
77
|
},
|
|
78
78
|
"scripts": {
|
|
79
79
|
"clean": "premove ./build ./coverage ./dist-ts ./.cache/test-types",
|
|
@@ -18,13 +18,15 @@ export interface DevtoolsOptions {
|
|
|
18
18
|
/**
|
|
19
19
|
* The position of the TanStack logo to open and close the devtools panel.
|
|
20
20
|
* 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right' | 'relative'
|
|
21
|
-
*
|
|
21
|
+
*
|
|
22
|
+
* @defaultValue bottom-right
|
|
22
23
|
*/
|
|
23
24
|
buttonPosition?: DevtoolsButtonPosition
|
|
24
25
|
/**
|
|
25
26
|
* The position of the Preact Query devtools panel.
|
|
26
27
|
* 'top' | 'bottom' | 'left' | 'right'
|
|
27
|
-
*
|
|
28
|
+
*
|
|
29
|
+
* @defaultValue bottom
|
|
28
30
|
*/
|
|
29
31
|
position?: DevtoolsPosition
|
|
30
32
|
/**
|
|
@@ -52,7 +54,8 @@ export interface DevtoolsOptions {
|
|
|
52
54
|
hideDisabledQueries?: boolean
|
|
53
55
|
/**
|
|
54
56
|
* Use this to set the theme of the devtools panel.
|
|
55
|
-
*
|
|
57
|
+
*
|
|
58
|
+
* @defaultValue system
|
|
56
59
|
*/
|
|
57
60
|
theme?: Theme
|
|
58
61
|
}
|