@tanstack/preact-query-devtools 5.107.0 → 5.107.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.
Files changed (49) hide show
  1. package/build/legacy/{PreactQueryDevtools-CszvBE3E.d.cts → PreactQueryDevtools-BZb79hrw.d.cts} +2 -2
  2. package/build/{modern/PreactQueryDevtools-CszvBE3E.d.cts.map → legacy/PreactQueryDevtools-BZb79hrw.d.cts.map} +1 -1
  3. package/build/legacy/PreactQueryDevtools.cjs +1 -1
  4. package/build/legacy/PreactQueryDevtools.cjs.map +1 -1
  5. package/build/legacy/PreactQueryDevtools.d.cts +1 -1
  6. package/build/legacy/PreactQueryDevtools.js +1 -1
  7. package/build/legacy/PreactQueryDevtools.js.map +1 -1
  8. package/build/legacy/{PreactQueryDevtoolsPanel-Cf86o6V4.d.ts → PreactQueryDevtoolsPanel-B0phEg4g.d.cts} +4 -1
  9. package/build/legacy/PreactQueryDevtoolsPanel-B0phEg4g.d.cts.map +1 -0
  10. package/build/{modern/PreactQueryDevtoolsPanel-Cf86o6V4.d.ts → legacy/PreactQueryDevtoolsPanel-B0phEg4g.d.ts} +4 -1
  11. package/build/legacy/PreactQueryDevtoolsPanel-B0phEg4g.d.ts.map +1 -0
  12. package/build/legacy/PreactQueryDevtoolsPanel.cjs +1 -1
  13. package/build/legacy/PreactQueryDevtoolsPanel.cjs.map +1 -1
  14. package/build/legacy/PreactQueryDevtoolsPanel.d.cts +1 -1
  15. package/build/legacy/PreactQueryDevtoolsPanel.d.ts +1 -1
  16. package/build/legacy/PreactQueryDevtoolsPanel.js +1 -1
  17. package/build/legacy/PreactQueryDevtoolsPanel.js.map +1 -1
  18. package/build/legacy/index.d.cts +2 -2
  19. package/build/legacy/index.d.ts +1 -1
  20. package/build/legacy/production.d.cts +2 -2
  21. package/build/legacy/production.d.ts +1 -1
  22. package/build/modern/{PreactQueryDevtools-CszvBE3E.d.cts → PreactQueryDevtools-BZb79hrw.d.cts} +2 -2
  23. package/build/{legacy/PreactQueryDevtools-CszvBE3E.d.cts.map → modern/PreactQueryDevtools-BZb79hrw.d.cts.map} +1 -1
  24. package/build/modern/PreactQueryDevtools.cjs +1 -1
  25. package/build/modern/PreactQueryDevtools.cjs.map +1 -1
  26. package/build/modern/PreactQueryDevtools.d.cts +1 -1
  27. package/build/modern/PreactQueryDevtools.js +1 -1
  28. package/build/modern/PreactQueryDevtools.js.map +1 -1
  29. package/build/modern/{PreactQueryDevtoolsPanel-D1KDQUcf.d.cts → PreactQueryDevtoolsPanel-B0phEg4g.d.cts} +5 -2
  30. package/build/modern/PreactQueryDevtoolsPanel-B0phEg4g.d.cts.map +1 -0
  31. package/build/{legacy/PreactQueryDevtoolsPanel-D1KDQUcf.d.cts → modern/PreactQueryDevtoolsPanel-B0phEg4g.d.ts} +5 -2
  32. package/build/modern/PreactQueryDevtoolsPanel-B0phEg4g.d.ts.map +1 -0
  33. package/build/modern/PreactQueryDevtoolsPanel.cjs +1 -1
  34. package/build/modern/PreactQueryDevtoolsPanel.cjs.map +1 -1
  35. package/build/modern/PreactQueryDevtoolsPanel.d.cts +1 -1
  36. package/build/modern/PreactQueryDevtoolsPanel.d.ts +1 -1
  37. package/build/modern/PreactQueryDevtoolsPanel.js +1 -1
  38. package/build/modern/PreactQueryDevtoolsPanel.js.map +1 -1
  39. package/build/modern/index.d.cts +2 -2
  40. package/build/modern/index.d.ts +1 -1
  41. package/build/modern/production.d.cts +2 -2
  42. package/build/modern/production.d.ts +1 -1
  43. package/package.json +4 -4
  44. package/src/PreactQueryDevtools.tsx +2 -2
  45. package/src/PreactQueryDevtoolsPanel.tsx +5 -2
  46. package/build/legacy/PreactQueryDevtoolsPanel-Cf86o6V4.d.ts.map +0 -1
  47. package/build/legacy/PreactQueryDevtoolsPanel-D1KDQUcf.d.cts.map +0 -1
  48. package/build/modern/PreactQueryDevtoolsPanel-Cf86o6V4.d.ts.map +0 -1
  49. package/build/modern/PreactQueryDevtoolsPanel-D1KDQUcf.d.cts.map +0 -1
@@ -1,5 +1,5 @@
1
- import { DevtoolsButtonPosition, DevtoolsErrorType, DevtoolsPosition, Theme } from "@tanstack/query-devtools";
2
1
  import { QueryClient } from "@tanstack/preact-query";
2
+ import { DevtoolsButtonPosition, DevtoolsErrorType, DevtoolsPosition, Theme } from "@tanstack/query-devtools";
3
3
  import { VNode } from "preact";
4
4
  declare namespace PreactQueryDevtools_d_exports {
5
5
  export { DevtoolsOptions, PreactQueryDevtools };
@@ -64,4 +64,4 @@ interface DevtoolsOptions {
64
64
  */
65
65
  declare function PreactQueryDevtools(props: DevtoolsOptions): VNode | null;
66
66
  export { PreactQueryDevtools as n, PreactQueryDevtools_d_exports as r, DevtoolsOptions as t };
67
- //# sourceMappingURL=PreactQueryDevtools-CszvBE3E.d.cts.map
67
+ //# sourceMappingURL=PreactQueryDevtools-BZb79hrw.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"PreactQueryDevtools-CszvBE3E.d.cts","names":[],"sources":["../../src/PreactQueryDevtools.tsx"],"mappings":";;;;;;;;;;UAgBiB;;;;EAIf;;;;;;EAMA,iBAAiB;;;;;;EAMjB,WAAW;;;;;EAKX,SAAS;;;;EAIT,aAAa,MAAM;;;;;;EAMnB;;;;;EAKA,kBAAkB;;;;EAIlB;;;;;;EAMA,QAAQ;;;;;;;;iBASM,oBAAoB,OAAO,kBAAkB"}
1
+ {"version":3,"file":"PreactQueryDevtools-BZb79hrw.d.cts","names":[],"sources":["../../src/PreactQueryDevtools.tsx"],"mappings":";;;;;;;;;;UAgBiB;;;;EAIf;;;;;;EAMA,iBAAiB;;;;;;EAMjB,WAAW;;;;;EAKX,SAAS;;;;EAIT,aAAa,MAAM;;;;;;EAMnB;;;;;EAKA,kBAAkB;;;;EAIlB;;;;;;EAMA,QAAQ;;;;;;;;iBASM,oBAAoB,OAAO,kBAAkB"}
@@ -1,7 +1,7 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- let preact_hooks = require("preact/hooks");
3
2
  let _tanstack_preact_query = require("@tanstack/preact-query");
4
3
  let _tanstack_query_devtools = require("@tanstack/query-devtools");
4
+ let preact_hooks = require("preact/hooks");
5
5
  let preact_jsx_runtime = require("preact/jsx-runtime");
6
6
  // src/PreactQueryDevtools.tsx
7
7
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"PreactQueryDevtools.cjs","names":["useQueryClient","useRef","useState","TanstackQueryDevtools"],"sources":["../../src/PreactQueryDevtools.tsx"],"sourcesContent":["import { useEffect, useRef, useState } 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\n/**\n * The props of `PreactQueryDevtools`, 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 Preact Query devtools panel.\n * 'top' | 'bottom' | 'left' | 'right'\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 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 * 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 * 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 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 className=\"tsqd-parent-container\" ref={ref} />\n}\n"],"mappings":";;;;;;;;;;;;AAuEA,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,WAAU;EAA6B;CAAM,CAAA;AAC3D"}
1
+ {"version":3,"file":"PreactQueryDevtools.cjs","names":["useQueryClient","useRef","useState","TanstackQueryDevtools"],"sources":["../../src/PreactQueryDevtools.tsx"],"sourcesContent":["import { onlineManager, useQueryClient } from '@tanstack/preact-query'\nimport { TanstackQueryDevtools } from '@tanstack/query-devtools'\nimport { useEffect, useRef, useState } from 'preact/hooks'\nimport type { QueryClient } from '@tanstack/preact-query'\nimport type {\n DevtoolsButtonPosition,\n DevtoolsErrorType,\n DevtoolsPosition,\n Theme,\n} from '@tanstack/query-devtools'\nimport type { VNode } from 'preact'\n\n/**\n * The props of `PreactQueryDevtools`, 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 Preact Query devtools panel.\n * 'top' | 'bottom' | 'left' | 'right'\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 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 * 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 * 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 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 className=\"tsqd-parent-container\" ref={ref} />\n}\n"],"mappings":";;;;;;;;;;;;AAuEA,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,WAAU;EAA6B;CAAM,CAAA;AAC3D"}
@@ -1,2 +1,2 @@
1
- import { n as PreactQueryDevtools, t as DevtoolsOptions } from "./PreactQueryDevtools-CszvBE3E.cjs";
1
+ import { n as PreactQueryDevtools, t as DevtoolsOptions } from "./PreactQueryDevtools-BZb79hrw.cjs";
2
2
  export { DevtoolsOptions, PreactQueryDevtools };
@@ -1,6 +1,6 @@
1
- import { useEffect, useRef, useState } from "preact/hooks";
2
1
  import { onlineManager, useQueryClient } from "@tanstack/preact-query";
3
2
  import { TanstackQueryDevtools } from "@tanstack/query-devtools";
3
+ import { useEffect, useRef, useState } from "preact/hooks";
4
4
  import { jsx } from "preact/jsx-runtime";
5
5
  // src/PreactQueryDevtools.tsx
6
6
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"PreactQueryDevtools.js","names":[],"sources":["../../src/PreactQueryDevtools.tsx"],"sourcesContent":["import { useEffect, useRef, useState } 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\n/**\n * The props of `PreactQueryDevtools`, 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 Preact Query devtools panel.\n * 'top' | 'bottom' | 'left' | 'right'\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 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 * 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 * 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 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 className=\"tsqd-parent-container\" ref={ref} />\n}\n"],"mappings":";;;;;;;;;;;AAuEA,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,WAAU;EAA6B;CAAM,CAAA;AAC3D"}
1
+ {"version":3,"file":"PreactQueryDevtools.js","names":[],"sources":["../../src/PreactQueryDevtools.tsx"],"sourcesContent":["import { onlineManager, useQueryClient } from '@tanstack/preact-query'\nimport { TanstackQueryDevtools } from '@tanstack/query-devtools'\nimport { useEffect, useRef, useState } from 'preact/hooks'\nimport type { QueryClient } from '@tanstack/preact-query'\nimport type {\n DevtoolsButtonPosition,\n DevtoolsErrorType,\n DevtoolsPosition,\n Theme,\n} from '@tanstack/query-devtools'\nimport type { VNode } from 'preact'\n\n/**\n * The props of `PreactQueryDevtools`, 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 Preact Query devtools panel.\n * 'top' | 'bottom' | 'left' | 'right'\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 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 * 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 * 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 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 className=\"tsqd-parent-container\" ref={ref} />\n}\n"],"mappings":";;;;;;;;;;;AAuEA,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,WAAU;EAA6B;CAAM,CAAA;AAC3D"}
@@ -30,6 +30,9 @@ interface DevtoolsPanelOptions {
30
30
  shadowDOMTarget?: ShadowRoot;
31
31
  /**
32
32
  * Custom styles for the devtools panel container.
33
+ * @default { height: '100%', display: 'flex', flexDirection: 'column' }
34
+ * @example { height: '100%' }
35
+ * @example { height: '100%', width: '100%' }
33
36
  */
34
37
  style?: CSSProperties;
35
38
  /**
@@ -54,4 +57,4 @@ interface DevtoolsPanelOptions {
54
57
  */
55
58
  declare function PreactQueryDevtoolsPanel(props: DevtoolsPanelOptions): VNode | null;
56
59
  export { PreactQueryDevtoolsPanel as n, PreactQueryDevtoolsPanel_d_exports as r, DevtoolsPanelOptions as t };
57
- //# sourceMappingURL=PreactQueryDevtoolsPanel-Cf86o6V4.d.ts.map
60
+ //# sourceMappingURL=PreactQueryDevtoolsPanel-B0phEg4g.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PreactQueryDevtoolsPanel-B0phEg4g.d.cts","names":[],"sources":["../../src/PreactQueryDevtoolsPanel.tsx"],"mappings":";;;;;;;;;UAUiB;;;;;EAKf,SAAS;;;;EAIT,aAAa,MAAM;;;;;;EAMnB;;;;;EAKA,kBAAkB;;;;;;;EAOlB,QAAQ;;;;EAIR;;;;EAIA;;;;;;EAMA,QAAQ;;;;;;;iBAQM,yBACd,OAAO,uBACN"}
@@ -30,6 +30,9 @@ interface DevtoolsPanelOptions {
30
30
  shadowDOMTarget?: ShadowRoot;
31
31
  /**
32
32
  * Custom styles for the devtools panel container.
33
+ * @default { height: '100%', display: 'flex', flexDirection: 'column' }
34
+ * @example { height: '100%' }
35
+ * @example { height: '100%', width: '100%' }
33
36
  */
34
37
  style?: CSSProperties;
35
38
  /**
@@ -54,4 +57,4 @@ interface DevtoolsPanelOptions {
54
57
  */
55
58
  declare function PreactQueryDevtoolsPanel(props: DevtoolsPanelOptions): VNode | null;
56
59
  export { PreactQueryDevtoolsPanel as n, PreactQueryDevtoolsPanel_d_exports as r, DevtoolsPanelOptions as t };
57
- //# sourceMappingURL=PreactQueryDevtoolsPanel-Cf86o6V4.d.ts.map
60
+ //# sourceMappingURL=PreactQueryDevtoolsPanel-B0phEg4g.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PreactQueryDevtoolsPanel-B0phEg4g.d.ts","names":[],"sources":["../../src/PreactQueryDevtoolsPanel.tsx"],"mappings":";;;;;;;;;UAUiB;;;;;EAKf,SAAS;;;;EAIT,aAAa,MAAM;;;;;;EAMnB;;;;;EAKA,kBAAkB;;;;;;;EAOlB,QAAQ;;;;EAIR;;;;EAIA;;;;;;EAMA,QAAQ;;;;;;;iBAQM,yBACd,OAAO,uBACN"}
@@ -1,7 +1,7 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- let preact_hooks = require("preact/hooks");
3
2
  let _tanstack_preact_query = require("@tanstack/preact-query");
4
3
  let _tanstack_query_devtools = require("@tanstack/query-devtools");
4
+ let preact_hooks = require("preact/hooks");
5
5
  let preact_jsx_runtime = require("preact/jsx-runtime");
6
6
  // src/PreactQueryDevtoolsPanel.tsx
7
7
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"PreactQueryDevtoolsPanel.cjs","names":["useQueryClient","useRef","useState","TanstackQueryDevtoolsPanel"],"sources":["../../src/PreactQueryDevtoolsPanel.tsx"],"sourcesContent":["import { useEffect, useRef, useState } 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\n/**\n * The props of `PreactQueryDevtoolsPanel`, which renders the devtools panel inline.\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 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 * 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 * 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 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={{\n height: '100%',\n display: 'flex',\n flexDirection: 'column',\n ...props.style,\n }}\n className=\"tsqd-parent-container\"\n ref={ref}\n />\n )\n}\n"],"mappings":";;;;;;;;;;;AAwDA,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;GACL,QAAQ;GACR,SAAS;GACT,eAAe;GACf,GAAG,MAAM;EACX;EACA,WAAU;EACL;CACN,CAAA;AAEL"}
1
+ {"version":3,"file":"PreactQueryDevtoolsPanel.cjs","names":["useQueryClient","useRef","useState","TanstackQueryDevtoolsPanel"],"sources":["../../src/PreactQueryDevtoolsPanel.tsx"],"sourcesContent":["import { onlineManager, useQueryClient } from '@tanstack/preact-query'\nimport { TanstackQueryDevtoolsPanel } from '@tanstack/query-devtools'\nimport { useEffect, useRef, useState } from 'preact/hooks'\nimport type { QueryClient } from '@tanstack/preact-query'\nimport type { DevtoolsErrorType, Theme } from '@tanstack/query-devtools'\nimport type { CSSProperties, VNode } from 'preact'\n\n/**\n * The props of `PreactQueryDevtoolsPanel`, which renders the devtools panel inline.\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 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 * Custom styles for the devtools panel container.\n * @default { height: '100%', display: 'flex', flexDirection: 'column' }\n * @example { height: '100%' }\n * @example { height: '100%', width: '100%' }\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 * 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 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={{\n height: '100%',\n display: 'flex',\n flexDirection: 'column',\n ...props.style,\n }}\n className=\"tsqd-parent-container\"\n ref={ref}\n />\n )\n}\n"],"mappings":";;;;;;;;;;;AA2DA,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;GACL,QAAQ;GACR,SAAS;GACT,eAAe;GACf,GAAG,MAAM;EACX;EACA,WAAU;EACL;CACN,CAAA;AAEL"}
@@ -1,2 +1,2 @@
1
- import { n as PreactQueryDevtoolsPanel, t as DevtoolsPanelOptions } from "./PreactQueryDevtoolsPanel-D1KDQUcf.cjs";
1
+ import { n as PreactQueryDevtoolsPanel, t as DevtoolsPanelOptions } from "./PreactQueryDevtoolsPanel-B0phEg4g.cjs";
2
2
  export { DevtoolsPanelOptions, PreactQueryDevtoolsPanel };
@@ -1,2 +1,2 @@
1
- import { n as PreactQueryDevtoolsPanel, t as DevtoolsPanelOptions } from "./PreactQueryDevtoolsPanel-Cf86o6V4.js";
1
+ import { n as PreactQueryDevtoolsPanel, t as DevtoolsPanelOptions } from "./PreactQueryDevtoolsPanel-B0phEg4g.js";
2
2
  export { DevtoolsPanelOptions, PreactQueryDevtoolsPanel };
@@ -1,6 +1,6 @@
1
- import { useEffect, useRef, useState } from "preact/hooks";
2
1
  import { onlineManager, useQueryClient } from "@tanstack/preact-query";
3
2
  import { TanstackQueryDevtoolsPanel } from "@tanstack/query-devtools";
3
+ import { useEffect, useRef, useState } from "preact/hooks";
4
4
  import { jsx } from "preact/jsx-runtime";
5
5
  // src/PreactQueryDevtoolsPanel.tsx
6
6
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"PreactQueryDevtoolsPanel.js","names":[],"sources":["../../src/PreactQueryDevtoolsPanel.tsx"],"sourcesContent":["import { useEffect, useRef, useState } 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\n/**\n * The props of `PreactQueryDevtoolsPanel`, which renders the devtools panel inline.\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 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 * 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 * 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 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={{\n height: '100%',\n display: 'flex',\n flexDirection: 'column',\n ...props.style,\n }}\n className=\"tsqd-parent-container\"\n ref={ref}\n />\n )\n}\n"],"mappings":";;;;;;;;;;AAwDA,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;GACL,QAAQ;GACR,SAAS;GACT,eAAe;GACf,GAAG,MAAM;EACX;EACA,WAAU;EACL;CACN,CAAA;AAEL"}
1
+ {"version":3,"file":"PreactQueryDevtoolsPanel.js","names":[],"sources":["../../src/PreactQueryDevtoolsPanel.tsx"],"sourcesContent":["import { onlineManager, useQueryClient } from '@tanstack/preact-query'\nimport { TanstackQueryDevtoolsPanel } from '@tanstack/query-devtools'\nimport { useEffect, useRef, useState } from 'preact/hooks'\nimport type { QueryClient } from '@tanstack/preact-query'\nimport type { DevtoolsErrorType, Theme } from '@tanstack/query-devtools'\nimport type { CSSProperties, VNode } from 'preact'\n\n/**\n * The props of `PreactQueryDevtoolsPanel`, which renders the devtools panel inline.\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 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 * Custom styles for the devtools panel container.\n * @default { height: '100%', display: 'flex', flexDirection: 'column' }\n * @example { height: '100%' }\n * @example { height: '100%', width: '100%' }\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 * 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 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={{\n height: '100%',\n display: 'flex',\n flexDirection: 'column',\n ...props.style,\n }}\n className=\"tsqd-parent-container\"\n ref={ref}\n />\n )\n}\n"],"mappings":";;;;;;;;;;AA2DA,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;GACL,QAAQ;GACR,SAAS;GACT,eAAe;GACf,GAAG,MAAM;EACX;EACA,WAAU;EACL;CACN,CAAA;AAEL"}
@@ -1,5 +1,5 @@
1
- import { r as PreactQueryDevtools_d_exports } from "./PreactQueryDevtools-CszvBE3E.cjs";
2
- import { r as PreactQueryDevtoolsPanel_d_exports, t as DevtoolsPanelOptions$1 } from "./PreactQueryDevtoolsPanel-D1KDQUcf.cjs";
1
+ import { r as PreactQueryDevtools_d_exports } from "./PreactQueryDevtools-BZb79hrw.cjs";
2
+ import { r as PreactQueryDevtoolsPanel_d_exports, t as DevtoolsPanelOptions$1 } from "./PreactQueryDevtoolsPanel-B0phEg4g.cjs";
3
3
  export declare const PreactQueryDevtools: (typeof PreactQueryDevtools_d_exports)['PreactQueryDevtools'];
4
4
  export declare const PreactQueryDevtoolsPanel: (typeof PreactQueryDevtoolsPanel_d_exports)['PreactQueryDevtoolsPanel'];
5
5
  /**
@@ -1,5 +1,5 @@
1
1
  import { r as PreactQueryDevtools_d_exports } from "./PreactQueryDevtools-BZb79hrw.js";
2
- import { r as PreactQueryDevtoolsPanel_d_exports, t as DevtoolsPanelOptions$1 } from "./PreactQueryDevtoolsPanel-Cf86o6V4.js";
2
+ import { r as PreactQueryDevtoolsPanel_d_exports, t as DevtoolsPanelOptions$1 } from "./PreactQueryDevtoolsPanel-B0phEg4g.js";
3
3
  export declare const PreactQueryDevtools: (typeof PreactQueryDevtools_d_exports)['PreactQueryDevtools'];
4
4
  export declare const PreactQueryDevtoolsPanel: (typeof PreactQueryDevtoolsPanel_d_exports)['PreactQueryDevtoolsPanel'];
5
5
  /**
@@ -1,5 +1,5 @@
1
- import { n as PreactQueryDevtools$1, r as PreactQueryDevtools_d_exports } from "./PreactQueryDevtools-CszvBE3E.cjs";
2
- import { n as PreactQueryDevtoolsPanel$1, r as PreactQueryDevtoolsPanel_d_exports } from "./PreactQueryDevtoolsPanel-D1KDQUcf.cjs";
1
+ import { n as PreactQueryDevtools$1, r as PreactQueryDevtools_d_exports } from "./PreactQueryDevtools-BZb79hrw.cjs";
2
+ import { n as PreactQueryDevtoolsPanel$1, r as PreactQueryDevtoolsPanel_d_exports } from "./PreactQueryDevtoolsPanel-B0phEg4g.cjs";
3
3
  export declare const PreactQueryDevtools: typeof PreactQueryDevtools$1;
4
4
  export declare const PreactQueryDevtoolsPanel: typeof PreactQueryDevtoolsPanel$1;
5
5
  //# sourceMappingURL=production.d.cts.map
@@ -1,5 +1,5 @@
1
1
  import { n as PreactQueryDevtools$1, r as PreactQueryDevtools_d_exports } from "./PreactQueryDevtools-BZb79hrw.js";
2
- import { n as PreactQueryDevtoolsPanel$1, r as PreactQueryDevtoolsPanel_d_exports } from "./PreactQueryDevtoolsPanel-Cf86o6V4.js";
2
+ import { n as PreactQueryDevtoolsPanel$1, r as PreactQueryDevtoolsPanel_d_exports } from "./PreactQueryDevtoolsPanel-B0phEg4g.js";
3
3
  export declare const PreactQueryDevtools: typeof PreactQueryDevtools$1;
4
4
  export declare const PreactQueryDevtoolsPanel: typeof PreactQueryDevtoolsPanel$1;
5
5
  //# sourceMappingURL=production.d.ts.map
@@ -1,5 +1,5 @@
1
- import { DevtoolsButtonPosition, DevtoolsErrorType, DevtoolsPosition, Theme } from "@tanstack/query-devtools";
2
1
  import { QueryClient } from "@tanstack/preact-query";
2
+ import { DevtoolsButtonPosition, DevtoolsErrorType, DevtoolsPosition, Theme } from "@tanstack/query-devtools";
3
3
  import { VNode } from "preact";
4
4
  declare namespace PreactQueryDevtools_d_exports {
5
5
  export { DevtoolsOptions, PreactQueryDevtools };
@@ -64,4 +64,4 @@ interface DevtoolsOptions {
64
64
  */
65
65
  declare function PreactQueryDevtools(props: DevtoolsOptions): VNode | null;
66
66
  export { PreactQueryDevtools as n, PreactQueryDevtools_d_exports as r, DevtoolsOptions as t };
67
- //# sourceMappingURL=PreactQueryDevtools-CszvBE3E.d.cts.map
67
+ //# sourceMappingURL=PreactQueryDevtools-BZb79hrw.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"PreactQueryDevtools-CszvBE3E.d.cts","names":[],"sources":["../../src/PreactQueryDevtools.tsx"],"mappings":";;;;;;;;;;UAgBiB;;;;EAIf;;;;;;EAMA,iBAAiB;;;;;;EAMjB,WAAW;;;;;EAKX,SAAS;;;;EAIT,aAAa,MAAM;;;;;;EAMnB;;;;;EAKA,kBAAkB;;;;EAIlB;;;;;;EAMA,QAAQ;;;;;;;;iBASM,oBAAoB,OAAO,kBAAkB"}
1
+ {"version":3,"file":"PreactQueryDevtools-BZb79hrw.d.cts","names":[],"sources":["../../src/PreactQueryDevtools.tsx"],"mappings":";;;;;;;;;;UAgBiB;;;;EAIf;;;;;;EAMA,iBAAiB;;;;;;EAMjB,WAAW;;;;;EAKX,SAAS;;;;EAIT,aAAa,MAAM;;;;;;EAMnB;;;;;EAKA,kBAAkB;;;;EAIlB;;;;;;EAMA,QAAQ;;;;;;;;iBASM,oBAAoB,OAAO,kBAAkB"}
@@ -1,7 +1,7 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- let preact_hooks = require("preact/hooks");
3
2
  let _tanstack_preact_query = require("@tanstack/preact-query");
4
3
  let _tanstack_query_devtools = require("@tanstack/query-devtools");
4
+ let preact_hooks = require("preact/hooks");
5
5
  let preact_jsx_runtime = require("preact/jsx-runtime");
6
6
  // src/PreactQueryDevtools.tsx
7
7
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"PreactQueryDevtools.cjs","names":["useQueryClient","useRef","useState","TanstackQueryDevtools"],"sources":["../../src/PreactQueryDevtools.tsx"],"sourcesContent":["import { useEffect, useRef, useState } 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\n/**\n * The props of `PreactQueryDevtools`, 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 Preact Query devtools panel.\n * 'top' | 'bottom' | 'left' | 'right'\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 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 * 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 * 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 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 className=\"tsqd-parent-container\" ref={ref} />\n}\n"],"mappings":";;;;;;;;;;;;AAuEA,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,WAAU;EAA6B;CAAM,CAAA;AAC3D"}
1
+ {"version":3,"file":"PreactQueryDevtools.cjs","names":["useQueryClient","useRef","useState","TanstackQueryDevtools"],"sources":["../../src/PreactQueryDevtools.tsx"],"sourcesContent":["import { onlineManager, useQueryClient } from '@tanstack/preact-query'\nimport { TanstackQueryDevtools } from '@tanstack/query-devtools'\nimport { useEffect, useRef, useState } from 'preact/hooks'\nimport type { QueryClient } from '@tanstack/preact-query'\nimport type {\n DevtoolsButtonPosition,\n DevtoolsErrorType,\n DevtoolsPosition,\n Theme,\n} from '@tanstack/query-devtools'\nimport type { VNode } from 'preact'\n\n/**\n * The props of `PreactQueryDevtools`, 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 Preact Query devtools panel.\n * 'top' | 'bottom' | 'left' | 'right'\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 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 * 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 * 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 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 className=\"tsqd-parent-container\" ref={ref} />\n}\n"],"mappings":";;;;;;;;;;;;AAuEA,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,WAAU;EAA6B;CAAM,CAAA;AAC3D"}
@@ -1,2 +1,2 @@
1
- import { n as PreactQueryDevtools, t as DevtoolsOptions } from "./PreactQueryDevtools-CszvBE3E.cjs";
1
+ import { n as PreactQueryDevtools, t as DevtoolsOptions } from "./PreactQueryDevtools-BZb79hrw.cjs";
2
2
  export { DevtoolsOptions, PreactQueryDevtools };
@@ -1,6 +1,6 @@
1
- import { useEffect, useRef, useState } from "preact/hooks";
2
1
  import { onlineManager, useQueryClient } from "@tanstack/preact-query";
3
2
  import { TanstackQueryDevtools } from "@tanstack/query-devtools";
3
+ import { useEffect, useRef, useState } from "preact/hooks";
4
4
  import { jsx } from "preact/jsx-runtime";
5
5
  // src/PreactQueryDevtools.tsx
6
6
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"PreactQueryDevtools.js","names":[],"sources":["../../src/PreactQueryDevtools.tsx"],"sourcesContent":["import { useEffect, useRef, useState } 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\n/**\n * The props of `PreactQueryDevtools`, 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 Preact Query devtools panel.\n * 'top' | 'bottom' | 'left' | 'right'\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 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 * 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 * 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 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 className=\"tsqd-parent-container\" ref={ref} />\n}\n"],"mappings":";;;;;;;;;;;AAuEA,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,WAAU;EAA6B;CAAM,CAAA;AAC3D"}
1
+ {"version":3,"file":"PreactQueryDevtools.js","names":[],"sources":["../../src/PreactQueryDevtools.tsx"],"sourcesContent":["import { onlineManager, useQueryClient } from '@tanstack/preact-query'\nimport { TanstackQueryDevtools } from '@tanstack/query-devtools'\nimport { useEffect, useRef, useState } from 'preact/hooks'\nimport type { QueryClient } from '@tanstack/preact-query'\nimport type {\n DevtoolsButtonPosition,\n DevtoolsErrorType,\n DevtoolsPosition,\n Theme,\n} from '@tanstack/query-devtools'\nimport type { VNode } from 'preact'\n\n/**\n * The props of `PreactQueryDevtools`, 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 Preact Query devtools panel.\n * 'top' | 'bottom' | 'left' | 'right'\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 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 * 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 * 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 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 className=\"tsqd-parent-container\" ref={ref} />\n}\n"],"mappings":";;;;;;;;;;;AAuEA,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,WAAU;EAA6B;CAAM,CAAA;AAC3D"}
@@ -1,5 +1,5 @@
1
- import { DevtoolsErrorType, Theme } from "@tanstack/query-devtools";
2
1
  import { QueryClient } from "@tanstack/preact-query";
2
+ import { DevtoolsErrorType, Theme } from "@tanstack/query-devtools";
3
3
  import { CSSProperties, VNode } from "preact";
4
4
  declare namespace PreactQueryDevtoolsPanel_d_exports {
5
5
  export { DevtoolsPanelOptions, PreactQueryDevtoolsPanel };
@@ -30,6 +30,9 @@ interface DevtoolsPanelOptions {
30
30
  shadowDOMTarget?: ShadowRoot;
31
31
  /**
32
32
  * Custom styles for the devtools panel container.
33
+ * @default { height: '100%', display: 'flex', flexDirection: 'column' }
34
+ * @example { height: '100%' }
35
+ * @example { height: '100%', width: '100%' }
33
36
  */
34
37
  style?: CSSProperties;
35
38
  /**
@@ -54,4 +57,4 @@ interface DevtoolsPanelOptions {
54
57
  */
55
58
  declare function PreactQueryDevtoolsPanel(props: DevtoolsPanelOptions): VNode | null;
56
59
  export { PreactQueryDevtoolsPanel as n, PreactQueryDevtoolsPanel_d_exports as r, DevtoolsPanelOptions as t };
57
- //# sourceMappingURL=PreactQueryDevtoolsPanel-D1KDQUcf.d.cts.map
60
+ //# sourceMappingURL=PreactQueryDevtoolsPanel-B0phEg4g.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PreactQueryDevtoolsPanel-B0phEg4g.d.cts","names":[],"sources":["../../src/PreactQueryDevtoolsPanel.tsx"],"mappings":";;;;;;;;;UAUiB;;;;;EAKf,SAAS;;;;EAIT,aAAa,MAAM;;;;;;EAMnB;;;;;EAKA,kBAAkB;;;;;;;EAOlB,QAAQ;;;;EAIR;;;;EAIA;;;;;;EAMA,QAAQ;;;;;;;iBAQM,yBACd,OAAO,uBACN"}
@@ -1,5 +1,5 @@
1
- import { DevtoolsErrorType, Theme } from "@tanstack/query-devtools";
2
1
  import { QueryClient } from "@tanstack/preact-query";
2
+ import { DevtoolsErrorType, Theme } from "@tanstack/query-devtools";
3
3
  import { CSSProperties, VNode } from "preact";
4
4
  declare namespace PreactQueryDevtoolsPanel_d_exports {
5
5
  export { DevtoolsPanelOptions, PreactQueryDevtoolsPanel };
@@ -30,6 +30,9 @@ interface DevtoolsPanelOptions {
30
30
  shadowDOMTarget?: ShadowRoot;
31
31
  /**
32
32
  * Custom styles for the devtools panel container.
33
+ * @default { height: '100%', display: 'flex', flexDirection: 'column' }
34
+ * @example { height: '100%' }
35
+ * @example { height: '100%', width: '100%' }
33
36
  */
34
37
  style?: CSSProperties;
35
38
  /**
@@ -54,4 +57,4 @@ interface DevtoolsPanelOptions {
54
57
  */
55
58
  declare function PreactQueryDevtoolsPanel(props: DevtoolsPanelOptions): VNode | null;
56
59
  export { PreactQueryDevtoolsPanel as n, PreactQueryDevtoolsPanel_d_exports as r, DevtoolsPanelOptions as t };
57
- //# sourceMappingURL=PreactQueryDevtoolsPanel-D1KDQUcf.d.cts.map
60
+ //# sourceMappingURL=PreactQueryDevtoolsPanel-B0phEg4g.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PreactQueryDevtoolsPanel-B0phEg4g.d.ts","names":[],"sources":["../../src/PreactQueryDevtoolsPanel.tsx"],"mappings":";;;;;;;;;UAUiB;;;;;EAKf,SAAS;;;;EAIT,aAAa,MAAM;;;;;;EAMnB;;;;;EAKA,kBAAkB;;;;;;;EAOlB,QAAQ;;;;EAIR;;;;EAIA;;;;;;EAMA,QAAQ;;;;;;;iBAQM,yBACd,OAAO,uBACN"}
@@ -1,7 +1,7 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- let preact_hooks = require("preact/hooks");
3
2
  let _tanstack_preact_query = require("@tanstack/preact-query");
4
3
  let _tanstack_query_devtools = require("@tanstack/query-devtools");
4
+ let preact_hooks = require("preact/hooks");
5
5
  let preact_jsx_runtime = require("preact/jsx-runtime");
6
6
  // src/PreactQueryDevtoolsPanel.tsx
7
7
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"PreactQueryDevtoolsPanel.cjs","names":["useQueryClient","useRef","useState","TanstackQueryDevtoolsPanel"],"sources":["../../src/PreactQueryDevtoolsPanel.tsx"],"sourcesContent":["import { useEffect, useRef, useState } 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\n/**\n * The props of `PreactQueryDevtoolsPanel`, which renders the devtools panel inline.\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 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 * 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 * 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 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={{\n height: '100%',\n display: 'flex',\n flexDirection: 'column',\n ...props.style,\n }}\n className=\"tsqd-parent-container\"\n ref={ref}\n />\n )\n}\n"],"mappings":";;;;;;;;;;;AAwDA,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;GACL,QAAQ;GACR,SAAS;GACT,eAAe;GACf,GAAG,MAAM;EACX;EACA,WAAU;EACL;CACN,CAAA;AAEL"}
1
+ {"version":3,"file":"PreactQueryDevtoolsPanel.cjs","names":["useQueryClient","useRef","useState","TanstackQueryDevtoolsPanel"],"sources":["../../src/PreactQueryDevtoolsPanel.tsx"],"sourcesContent":["import { onlineManager, useQueryClient } from '@tanstack/preact-query'\nimport { TanstackQueryDevtoolsPanel } from '@tanstack/query-devtools'\nimport { useEffect, useRef, useState } from 'preact/hooks'\nimport type { QueryClient } from '@tanstack/preact-query'\nimport type { DevtoolsErrorType, Theme } from '@tanstack/query-devtools'\nimport type { CSSProperties, VNode } from 'preact'\n\n/**\n * The props of `PreactQueryDevtoolsPanel`, which renders the devtools panel inline.\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 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 * Custom styles for the devtools panel container.\n * @default { height: '100%', display: 'flex', flexDirection: 'column' }\n * @example { height: '100%' }\n * @example { height: '100%', width: '100%' }\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 * 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 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={{\n height: '100%',\n display: 'flex',\n flexDirection: 'column',\n ...props.style,\n }}\n className=\"tsqd-parent-container\"\n ref={ref}\n />\n )\n}\n"],"mappings":";;;;;;;;;;;AA2DA,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;GACL,QAAQ;GACR,SAAS;GACT,eAAe;GACf,GAAG,MAAM;EACX;EACA,WAAU;EACL;CACN,CAAA;AAEL"}
@@ -1,2 +1,2 @@
1
- import { n as PreactQueryDevtoolsPanel, t as DevtoolsPanelOptions } from "./PreactQueryDevtoolsPanel-D1KDQUcf.cjs";
1
+ import { n as PreactQueryDevtoolsPanel, t as DevtoolsPanelOptions } from "./PreactQueryDevtoolsPanel-B0phEg4g.cjs";
2
2
  export { DevtoolsPanelOptions, PreactQueryDevtoolsPanel };
@@ -1,2 +1,2 @@
1
- import { n as PreactQueryDevtoolsPanel, t as DevtoolsPanelOptions } from "./PreactQueryDevtoolsPanel-Cf86o6V4.js";
1
+ import { n as PreactQueryDevtoolsPanel, t as DevtoolsPanelOptions } from "./PreactQueryDevtoolsPanel-B0phEg4g.js";
2
2
  export { DevtoolsPanelOptions, PreactQueryDevtoolsPanel };
@@ -1,6 +1,6 @@
1
- import { useEffect, useRef, useState } from "preact/hooks";
2
1
  import { onlineManager, useQueryClient } from "@tanstack/preact-query";
3
2
  import { TanstackQueryDevtoolsPanel } from "@tanstack/query-devtools";
3
+ import { useEffect, useRef, useState } from "preact/hooks";
4
4
  import { jsx } from "preact/jsx-runtime";
5
5
  // src/PreactQueryDevtoolsPanel.tsx
6
6
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"PreactQueryDevtoolsPanel.js","names":[],"sources":["../../src/PreactQueryDevtoolsPanel.tsx"],"sourcesContent":["import { useEffect, useRef, useState } 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\n/**\n * The props of `PreactQueryDevtoolsPanel`, which renders the devtools panel inline.\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 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 * 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 * 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 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={{\n height: '100%',\n display: 'flex',\n flexDirection: 'column',\n ...props.style,\n }}\n className=\"tsqd-parent-container\"\n ref={ref}\n />\n )\n}\n"],"mappings":";;;;;;;;;;AAwDA,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;GACL,QAAQ;GACR,SAAS;GACT,eAAe;GACf,GAAG,MAAM;EACX;EACA,WAAU;EACL;CACN,CAAA;AAEL"}
1
+ {"version":3,"file":"PreactQueryDevtoolsPanel.js","names":[],"sources":["../../src/PreactQueryDevtoolsPanel.tsx"],"sourcesContent":["import { onlineManager, useQueryClient } from '@tanstack/preact-query'\nimport { TanstackQueryDevtoolsPanel } from '@tanstack/query-devtools'\nimport { useEffect, useRef, useState } from 'preact/hooks'\nimport type { QueryClient } from '@tanstack/preact-query'\nimport type { DevtoolsErrorType, Theme } from '@tanstack/query-devtools'\nimport type { CSSProperties, VNode } from 'preact'\n\n/**\n * The props of `PreactQueryDevtoolsPanel`, which renders the devtools panel inline.\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 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 * Custom styles for the devtools panel container.\n * @default { height: '100%', display: 'flex', flexDirection: 'column' }\n * @example { height: '100%' }\n * @example { height: '100%', width: '100%' }\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 * 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 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={{\n height: '100%',\n display: 'flex',\n flexDirection: 'column',\n ...props.style,\n }}\n className=\"tsqd-parent-container\"\n ref={ref}\n />\n )\n}\n"],"mappings":";;;;;;;;;;AA2DA,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;GACL,QAAQ;GACR,SAAS;GACT,eAAe;GACf,GAAG,MAAM;EACX;EACA,WAAU;EACL;CACN,CAAA;AAEL"}
@@ -1,5 +1,5 @@
1
- import { r as PreactQueryDevtools_d_exports } from "./PreactQueryDevtools-CszvBE3E.cjs";
2
- import { r as PreactQueryDevtoolsPanel_d_exports, t as DevtoolsPanelOptions$1 } from "./PreactQueryDevtoolsPanel-D1KDQUcf.cjs";
1
+ import { r as PreactQueryDevtools_d_exports } from "./PreactQueryDevtools-BZb79hrw.cjs";
2
+ import { r as PreactQueryDevtoolsPanel_d_exports, t as DevtoolsPanelOptions$1 } from "./PreactQueryDevtoolsPanel-B0phEg4g.cjs";
3
3
  export declare const PreactQueryDevtools: (typeof PreactQueryDevtools_d_exports)['PreactQueryDevtools'];
4
4
  export declare const PreactQueryDevtoolsPanel: (typeof PreactQueryDevtoolsPanel_d_exports)['PreactQueryDevtoolsPanel'];
5
5
  /**
@@ -1,5 +1,5 @@
1
1
  import { r as PreactQueryDevtools_d_exports } from "./PreactQueryDevtools-BZb79hrw.js";
2
- import { r as PreactQueryDevtoolsPanel_d_exports, t as DevtoolsPanelOptions$1 } from "./PreactQueryDevtoolsPanel-Cf86o6V4.js";
2
+ import { r as PreactQueryDevtoolsPanel_d_exports, t as DevtoolsPanelOptions$1 } from "./PreactQueryDevtoolsPanel-B0phEg4g.js";
3
3
  export declare const PreactQueryDevtools: (typeof PreactQueryDevtools_d_exports)['PreactQueryDevtools'];
4
4
  export declare const PreactQueryDevtoolsPanel: (typeof PreactQueryDevtoolsPanel_d_exports)['PreactQueryDevtoolsPanel'];
5
5
  /**
@@ -1,5 +1,5 @@
1
- import { n as PreactQueryDevtools$1, r as PreactQueryDevtools_d_exports } from "./PreactQueryDevtools-CszvBE3E.cjs";
2
- import { n as PreactQueryDevtoolsPanel$1, r as PreactQueryDevtoolsPanel_d_exports } from "./PreactQueryDevtoolsPanel-D1KDQUcf.cjs";
1
+ import { n as PreactQueryDevtools$1, r as PreactQueryDevtools_d_exports } from "./PreactQueryDevtools-BZb79hrw.cjs";
2
+ import { n as PreactQueryDevtoolsPanel$1, r as PreactQueryDevtoolsPanel_d_exports } from "./PreactQueryDevtoolsPanel-B0phEg4g.cjs";
3
3
  export declare const PreactQueryDevtools: typeof PreactQueryDevtools$1;
4
4
  export declare const PreactQueryDevtoolsPanel: typeof PreactQueryDevtoolsPanel$1;
5
5
  //# sourceMappingURL=production.d.cts.map
@@ -1,5 +1,5 @@
1
1
  import { n as PreactQueryDevtools$1, r as PreactQueryDevtools_d_exports } from "./PreactQueryDevtools-BZb79hrw.js";
2
- import { n as PreactQueryDevtoolsPanel$1, r as PreactQueryDevtoolsPanel_d_exports } from "./PreactQueryDevtoolsPanel-Cf86o6V4.js";
2
+ import { n as PreactQueryDevtoolsPanel$1, r as PreactQueryDevtoolsPanel_d_exports } from "./PreactQueryDevtoolsPanel-B0phEg4g.js";
3
3
  export declare const PreactQueryDevtools: typeof PreactQueryDevtools$1;
4
4
  export declare const PreactQueryDevtoolsPanel: typeof PreactQueryDevtoolsPanel$1;
5
5
  //# sourceMappingURL=production.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tanstack/preact-query-devtools",
3
- "version": "5.107.0",
3
+ "version": "5.107.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,17 +59,17 @@
59
59
  "!src/__tests__"
60
60
  ],
61
61
  "dependencies": {
62
- "@tanstack/query-devtools": "5.107.0"
62
+ "@tanstack/query-devtools": "5.107.2"
63
63
  },
64
64
  "devDependencies": {
65
65
  "@preact/preset-vite": "^2.10.6",
66
- "@tanstack/preact-query": "5.107.0",
66
+ "@tanstack/preact-query": "5.107.2",
67
67
  "@testing-library/preact": "^3.2.4",
68
68
  "preact": "^11.0.1",
69
69
  "typescript": "6.0.3"
70
70
  },
71
71
  "peerDependencies": {
72
- "@tanstack/preact-query": "^5.107.0",
72
+ "@tanstack/preact-query": "^5.107.2",
73
73
  "preact": "^10.0.0 || ^11.0.0-0"
74
74
  },
75
75
  "scripts": {
@@ -1,13 +1,13 @@
1
- import { useEffect, useRef, useState } from 'preact/hooks'
2
1
  import { onlineManager, useQueryClient } from '@tanstack/preact-query'
3
2
  import { TanstackQueryDevtools } from '@tanstack/query-devtools'
3
+ import { useEffect, useRef, useState } from 'preact/hooks'
4
+ import type { QueryClient } from '@tanstack/preact-query'
4
5
  import type {
5
6
  DevtoolsButtonPosition,
6
7
  DevtoolsErrorType,
7
8
  DevtoolsPosition,
8
9
  Theme,
9
10
  } from '@tanstack/query-devtools'
10
- import type { QueryClient } from '@tanstack/preact-query'
11
11
  import type { VNode } from 'preact'
12
12
 
13
13
  /**
@@ -1,8 +1,8 @@
1
- import { useEffect, useRef, useState } from 'preact/hooks'
2
1
  import { onlineManager, useQueryClient } from '@tanstack/preact-query'
3
2
  import { TanstackQueryDevtoolsPanel } from '@tanstack/query-devtools'
4
- import type { DevtoolsErrorType, Theme } from '@tanstack/query-devtools'
3
+ import { useEffect, useRef, useState } from 'preact/hooks'
5
4
  import type { QueryClient } from '@tanstack/preact-query'
5
+ import type { DevtoolsErrorType, Theme } from '@tanstack/query-devtools'
6
6
  import type { CSSProperties, VNode } from 'preact'
7
7
 
8
8
  /**
@@ -31,6 +31,9 @@ export interface DevtoolsPanelOptions {
31
31
  shadowDOMTarget?: ShadowRoot
32
32
  /**
33
33
  * Custom styles for the devtools panel container.
34
+ * @default { height: '100%', display: 'flex', flexDirection: 'column' }
35
+ * @example { height: '100%' }
36
+ * @example { height: '100%', width: '100%' }
34
37
  */
35
38
  style?: CSSProperties
36
39
  /**
@@ -1 +0,0 @@
1
- {"version":3,"file":"PreactQueryDevtoolsPanel-Cf86o6V4.d.ts","names":[],"sources":["../../src/PreactQueryDevtoolsPanel.tsx"],"mappings":";;;;;;;;;UAUiB;;;;;EAKf,SAAS;;;;EAIT,aAAa,MAAM;;;;;;EAMnB;;;;;EAKA,kBAAkB;;;;EAIlB,QAAQ;;;;EAIR;;;;EAIA;;;;;;EAMA,QAAQ;;;;;;;iBAQM,yBACd,OAAO,uBACN"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"PreactQueryDevtoolsPanel-D1KDQUcf.d.cts","names":[],"sources":["../../src/PreactQueryDevtoolsPanel.tsx"],"mappings":";;;;;;;;;UAUiB;;;;;EAKf,SAAS;;;;EAIT,aAAa,MAAM;;;;;;EAMnB;;;;;EAKA,kBAAkB;;;;EAIlB,QAAQ;;;;EAIR;;;;EAIA;;;;;;EAMA,QAAQ;;;;;;;iBAQM,yBACd,OAAO,uBACN"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"PreactQueryDevtoolsPanel-Cf86o6V4.d.ts","names":[],"sources":["../../src/PreactQueryDevtoolsPanel.tsx"],"mappings":";;;;;;;;;UAUiB;;;;;EAKf,SAAS;;;;EAIT,aAAa,MAAM;;;;;;EAMnB;;;;;EAKA,kBAAkB;;;;EAIlB,QAAQ;;;;EAIR;;;;EAIA;;;;;;EAMA,QAAQ;;;;;;;iBAQM,yBACd,OAAO,uBACN"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"PreactQueryDevtoolsPanel-D1KDQUcf.d.cts","names":[],"sources":["../../src/PreactQueryDevtoolsPanel.tsx"],"mappings":";;;;;;;;;UAUiB;;;;;EAKf,SAAS;;;;EAIT,aAAa,MAAM;;;;;;EAMnB;;;;;EAKA,kBAAkB;;;;EAIlB,QAAQ;;;;EAIR;;;;EAIA;;;;;;EAMA,QAAQ;;;;;;;iBAQM,yBACd,OAAO,uBACN"}