@tanstack/solid-query-devtools 5.104.5 → 5.105.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/build/dev.cjs CHANGED
@@ -1,7 +1,7 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  let solid_js_web = require("solid-js/web");
3
3
  let solid_js = require("solid-js");
4
- //#region src/clientOnly.tsx
4
+ // src/clientOnly.tsx
5
5
  /**
6
6
  * This function has been taken from solid-start's codebase:
7
7
  * <https://github.com/solidjs/solid-start/blob/2967fc2db3f0df826f061020231dbdafdfa0746b/packages/start/islands/clientOnly.tsx>.
@@ -24,14 +24,12 @@ function clientOnly(fn) {
24
24
  return (0, solid_js.createMemo)(() => (Comp = comp(), m = mounted(), (0, solid_js.untrack)(() => Comp && m ? Comp(rest) : props.fallback)));
25
25
  };
26
26
  }
27
- //#endregion
28
- //#region src/index.tsx
29
- const SolidQueryDevtools = solid_js_web.isDev ? clientOnly(() => Promise.resolve().then(() => require("./devtools-BMFPTjfX.cjs"))) : function() {
27
+ // src/index.tsx
28
+ const SolidQueryDevtools = solid_js_web.isDev ? clientOnly(() => Promise.resolve().then(() => require("./devtools-8au4JaTw.cjs"))) : function() {
30
29
  return null;
31
30
  };
32
- const SolidQueryDevtoolsPanel = solid_js_web.isDev ? clientOnly(() => Promise.resolve().then(() => require("./devtoolsPanel-B1uOvxz4.cjs"))) : function() {
31
+ const SolidQueryDevtoolsPanel = solid_js_web.isDev ? clientOnly(() => Promise.resolve().then(() => require("./devtoolsPanel-DOI1y30E.cjs"))) : function() {
33
32
  return null;
34
33
  };
35
- //#endregion
36
34
  exports.SolidQueryDevtools = SolidQueryDevtools;
37
35
  exports.SolidQueryDevtoolsPanel = SolidQueryDevtoolsPanel;
package/build/dev.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { isDev, isServer } from "solid-js/web";
2
2
  import { createMemo, createSignal, onMount, sharedConfig, splitProps, untrack } from "solid-js";
3
- //#region src/clientOnly.tsx
3
+ // src/clientOnly.tsx
4
4
  /**
5
5
  * This function has been taken from solid-start's codebase:
6
6
  * <https://github.com/solidjs/solid-start/blob/2967fc2db3f0df826f061020231dbdafdfa0746b/packages/start/islands/clientOnly.tsx>.
@@ -23,13 +23,11 @@ function clientOnly(fn) {
23
23
  return createMemo(() => (Comp = comp(), m = mounted(), untrack(() => Comp && m ? Comp(rest) : props.fallback)));
24
24
  };
25
25
  }
26
- //#endregion
27
- //#region src/index.tsx
28
- const SolidQueryDevtools = isDev ? clientOnly(() => import("./devtools-DW3ZHOYk.js")) : function() {
26
+ // src/index.tsx
27
+ const SolidQueryDevtools = isDev ? clientOnly(() => import("./devtools-DS7Cagay.js")) : function() {
29
28
  return null;
30
29
  };
31
- const SolidQueryDevtoolsPanel = isDev ? clientOnly(() => import("./devtoolsPanel-CozcJrqa.js")) : function() {
30
+ const SolidQueryDevtoolsPanel = isDev ? clientOnly(() => import("./devtoolsPanel-JO2aJWEm.js")) : function() {
32
31
  return null;
33
32
  };
34
- //#endregion
35
33
  export { SolidQueryDevtools, SolidQueryDevtoolsPanel };
package/build/dev.jsx CHANGED
@@ -1,6 +1,6 @@
1
1
  import { isDev, isServer } from "solid-js/web";
2
2
  import { createMemo, createSignal, onMount, sharedConfig, splitProps, untrack } from "solid-js";
3
- //#region src/clientOnly.tsx
3
+ // src/clientOnly.tsx
4
4
  /**
5
5
  * This function has been taken from solid-start's codebase:
6
6
  * <https://github.com/solidjs/solid-start/blob/2967fc2db3f0df826f061020231dbdafdfa0746b/packages/start/islands/clientOnly.tsx>.
@@ -23,13 +23,11 @@ function clientOnly(fn) {
23
23
  return createMemo(() => (Comp = comp(), m = mounted(), untrack(() => Comp && m ? Comp(rest) : props.fallback)));
24
24
  };
25
25
  }
26
- //#endregion
27
- //#region src/index.tsx
28
- const SolidQueryDevtools = isDev ? clientOnly(() => import("./devtools-4DtrHfk8.jsx")) : function() {
26
+ // src/index.tsx
27
+ const SolidQueryDevtools = isDev ? clientOnly(() => import("./devtools-COkRtz4W.jsx")) : function() {
29
28
  return null;
30
29
  };
31
- const SolidQueryDevtoolsPanel = isDev ? clientOnly(() => import("./devtoolsPanel-CfOYIuMv.jsx")) : function() {
30
+ const SolidQueryDevtoolsPanel = isDev ? clientOnly(() => import("./devtoolsPanel-lDJwLIyQ.jsx")) : function() {
32
31
  return null;
33
32
  };
34
- //#endregion
35
33
  export { SolidQueryDevtools, SolidQueryDevtoolsPanel };
@@ -2,7 +2,7 @@ let solid_js_web = require("solid-js/web");
2
2
  let solid_js = require("solid-js");
3
3
  let _tanstack_solid_query = require("@tanstack/solid-query");
4
4
  let _tanstack_query_devtools = require("@tanstack/query-devtools");
5
- //#region src/devtools.tsx
5
+ // src/devtools.tsx
6
6
  var _tmpl$ = /*#__PURE__*/ (0, solid_js_web.template)(`<div class=tsqd-parent-container>`);
7
7
  /**
8
8
  * Renders the TanStack Query devtools, with a toggle button that opens them, for the given or
@@ -46,7 +46,7 @@ function SolidQueryDevtools(props) {
46
46
  devtools.setErrorTypes(props.errorTypes || []);
47
47
  });
48
48
  (0, solid_js.createEffect)(() => {
49
- devtools.setTheme(props.theme || "system");
49
+ devtools.setTheme(props.theme);
50
50
  });
51
51
  (0, solid_js.onMount)(() => {
52
52
  devtools.mount(ref);
@@ -59,5 +59,4 @@ function SolidQueryDevtools(props) {
59
59
  return _el$;
60
60
  })();
61
61
  }
62
- //#endregion
63
62
  exports.default = SolidQueryDevtools;
@@ -1,7 +1,7 @@
1
1
  import { createEffect, createMemo, onCleanup, onMount } from "solid-js";
2
2
  import { onlineManager, useQueryClient } from "@tanstack/solid-query";
3
3
  import { TanstackQueryDevtools } from "@tanstack/query-devtools";
4
- //#region src/devtools.tsx
4
+ // src/devtools.tsx
5
5
  /**
6
6
  * Renders the TanStack Query devtools, with a toggle button that opens them, for the given or
7
7
  * nearest `QueryClient`.
@@ -44,7 +44,7 @@ function SolidQueryDevtools(props) {
44
44
  devtools.setErrorTypes(props.errorTypes || []);
45
45
  });
46
46
  createEffect(() => {
47
- devtools.setTheme(props.theme || "system");
47
+ devtools.setTheme(props.theme);
48
48
  });
49
49
  onMount(() => {
50
50
  devtools.mount(ref);
@@ -52,5 +52,4 @@ function SolidQueryDevtools(props) {
52
52
  });
53
53
  return <div class="tsqd-parent-container" ref={ref} />;
54
54
  }
55
- //#endregion
56
55
  export { SolidQueryDevtools as default };
@@ -1 +1 @@
1
- let e=require("solid-js/web"),t=require("solid-js"),n=require("@tanstack/solid-query"),r=require("@tanstack/query-devtools");var i=/*#__PURE__*/ (0,e.template)(`<div class=tsqd-parent-container>`);function a(a){let o=(0,n.useQueryClient)(a.client),s=(0,t.createMemo)(()=>o),c,l=new r.TanstackQueryDevtools({client:s(),queryFlavor:`Solid Query`,version:`5`,onlineManager:n.onlineManager,buttonPosition:a.buttonPosition,position:a.position,initialIsOpen:a.initialIsOpen,errorTypes:a.errorTypes,styleNonce:a.styleNonce,shadowDOMTarget:a.shadowDOMTarget,hideDisabledQueries:a.hideDisabledQueries,theme:a.theme});return(0,t.createEffect)(()=>{l.setClient(s())}),(0,t.createEffect)(()=>{let e=a.buttonPosition;e&&l.setButtonPosition(e)}),(0,t.createEffect)(()=>{let e=a.position;e&&l.setPosition(e)}),(0,t.createEffect)(()=>{l.setInitialIsOpen(a.initialIsOpen||!1)}),(0,t.createEffect)(()=>{l.setErrorTypes(a.errorTypes||[])}),(0,t.createEffect)(()=>{l.setTheme(a.theme||`system`)}),(0,t.onMount)(()=>{l.mount(c),(0,t.onCleanup)(()=>l.unmount())}),(()=>{var t=i(),n=c;return typeof n==`function`?(0,e.use)(n,t):c=t,t})()}exports.default=a;
1
+ let e=require("solid-js/web"),t=require("solid-js"),n=require("@tanstack/solid-query"),r=require("@tanstack/query-devtools");var i=/*#__PURE__*/ (0,e.template)(`<div class=tsqd-parent-container>`);function a(a){let o=(0,n.useQueryClient)(a.client),s=(0,t.createMemo)(()=>o),c,l=new r.TanstackQueryDevtools({client:s(),queryFlavor:`Solid Query`,version:`5`,onlineManager:n.onlineManager,buttonPosition:a.buttonPosition,position:a.position,initialIsOpen:a.initialIsOpen,errorTypes:a.errorTypes,styleNonce:a.styleNonce,shadowDOMTarget:a.shadowDOMTarget,hideDisabledQueries:a.hideDisabledQueries,theme:a.theme});return(0,t.createEffect)(()=>{l.setClient(s())}),(0,t.createEffect)(()=>{let e=a.buttonPosition;e&&l.setButtonPosition(e)}),(0,t.createEffect)(()=>{let e=a.position;e&&l.setPosition(e)}),(0,t.createEffect)(()=>{l.setInitialIsOpen(a.initialIsOpen||!1)}),(0,t.createEffect)(()=>{l.setErrorTypes(a.errorTypes||[])}),(0,t.createEffect)(()=>{l.setTheme(a.theme)}),(0,t.onMount)(()=>{l.mount(c),(0,t.onCleanup)(()=>l.unmount())}),(()=>{var t=i(),n=c;return typeof n==`function`?(0,e.use)(n,t):c=t,t})()}exports.default=a;
@@ -2,7 +2,7 @@ import { template, use } from "solid-js/web";
2
2
  import { createEffect, createMemo, onCleanup, onMount } from "solid-js";
3
3
  import { onlineManager, useQueryClient } from "@tanstack/solid-query";
4
4
  import { TanstackQueryDevtools } from "@tanstack/query-devtools";
5
- //#region src/devtools.tsx
5
+ // src/devtools.tsx
6
6
  var _tmpl$ = /*#__PURE__*/ template(`<div class=tsqd-parent-container>`);
7
7
  /**
8
8
  * Renders the TanStack Query devtools, with a toggle button that opens them, for the given or
@@ -46,7 +46,7 @@ function SolidQueryDevtools(props) {
46
46
  devtools.setErrorTypes(props.errorTypes || []);
47
47
  });
48
48
  createEffect(() => {
49
- devtools.setTheme(props.theme || "system");
49
+ devtools.setTheme(props.theme);
50
50
  });
51
51
  onMount(() => {
52
52
  devtools.mount(ref);
@@ -59,5 +59,4 @@ function SolidQueryDevtools(props) {
59
59
  return _el$;
60
60
  })();
61
61
  }
62
- //#endregion
63
62
  export { SolidQueryDevtools as default };
@@ -1,2 +1,2 @@
1
- import{template as e,use as t}from"solid-js/web";import{createEffect as n,createMemo as r,onCleanup as i,onMount as a}from"solid-js";import{onlineManager as o,useQueryClient as s}from"@tanstack/solid-query";import{TanstackQueryDevtools as c}from"@tanstack/query-devtools";var l=/*#__PURE__*/ e(`<div class=tsqd-parent-container>`);function u(e){let u=s(e.client),d=r(()=>u),f,p=new c({client:d(),queryFlavor:`Solid Query`,version:`5`,onlineManager:o,buttonPosition:e.buttonPosition,position:e.position,initialIsOpen:e.initialIsOpen,errorTypes:e.errorTypes,styleNonce:e.styleNonce,shadowDOMTarget:e.shadowDOMTarget,hideDisabledQueries:e.hideDisabledQueries,theme:e.theme});return n(()=>{p.setClient(d())}),n(()=>{let t=e.buttonPosition;t&&p.setButtonPosition(t)}),n(()=>{let t=e.position;t&&p.setPosition(t)}),n(()=>{p.setInitialIsOpen(e.initialIsOpen||!1)}),n(()=>{p.setErrorTypes(e.errorTypes||[])}),n(()=>{p.setTheme(e.theme||`system`)}),a(()=>{p.mount(f),i(()=>p.unmount())}),(()=>{var e=l(),n=f;return typeof n==`function`?t(n,e):f=e,e})()}export{u as default};
2
- //# sourceMappingURL=devtools-CEvVAp2X.js.map
1
+ import{template as e,use as t}from"solid-js/web";import{createEffect as n,createMemo as r,onCleanup as i,onMount as a}from"solid-js";import{onlineManager as o,useQueryClient as s}from"@tanstack/solid-query";import{TanstackQueryDevtools as c}from"@tanstack/query-devtools";var l=/*#__PURE__*/ e(`<div class=tsqd-parent-container>`);function u(e){let u=s(e.client),d=r(()=>u),f,p=new c({client:d(),queryFlavor:`Solid Query`,version:`5`,onlineManager:o,buttonPosition:e.buttonPosition,position:e.position,initialIsOpen:e.initialIsOpen,errorTypes:e.errorTypes,styleNonce:e.styleNonce,shadowDOMTarget:e.shadowDOMTarget,hideDisabledQueries:e.hideDisabledQueries,theme:e.theme});return n(()=>{p.setClient(d())}),n(()=>{let t=e.buttonPosition;t&&p.setButtonPosition(t)}),n(()=>{let t=e.position;t&&p.setPosition(t)}),n(()=>{p.setInitialIsOpen(e.initialIsOpen||!1)}),n(()=>{p.setErrorTypes(e.errorTypes||[])}),n(()=>{p.setTheme(e.theme)}),a(()=>{p.mount(f),i(()=>p.unmount())}),(()=>{var e=l(),n=f;return typeof n==`function`?t(n,e):f=e,e})()}export{u as default};
2
+ //# sourceMappingURL=devtools-DWG-IwnT.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"devtools-DWG-IwnT.js","names":["createEffect","createMemo","onCleanup","onMount","onlineManager","useQueryClient","TanstackQueryDevtools","DevtoolsButtonPosition","DevtoolsErrorType","DevtoolsPosition","Theme","QueryClient","DevtoolsOptions","initialIsOpen","buttonPosition","position","client","errorTypes","Array","styleNonce","shadowDOMTarget","ShadowRoot","hideDisabledQueries","theme","SolidQueryDevtools","props","queryClient","ref","HTMLDivElement","devtools","queryFlavor","version","setClient","buttonPos","setButtonPosition","pos","setPosition","setInitialIsOpen","setErrorTypes","setTheme","mount","unmount","_el$","_tmpl$","_ref$","_$use","_$use","_tmpl$","SolidQueryDevtools","queryClient","useQueryClient","props","client","createMemo","ref","devtools","TanstackQueryDevtools","createEffect","buttonPos","pos","onMount","onCleanup","_el$","_ref$","use"],"sources":["../src/devtools.tsx"],"sourcesContent":["import { createEffect, createMemo, onCleanup, onMount } from 'solid-js'\nimport { onlineManager, useQueryClient } from '@tanstack/solid-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/solid-query'\n\ninterface 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 Solid Query devtools panel.\n * 'top' | 'bottom' | 'left' | 'right'\n * @defaultValue bottom\n */\n position?: DevtoolsPosition\n /**\n * Custom instance of QueryClient\n */\n client?: QueryClient\n /**\n * Use this so you can define custom errors that can be shown in the devtools.\n */\n errorTypes?: Array<DevtoolsErrorType>\n /**\n * Use this to pass a nonce to the style tag that is added to the document head. This is useful if you are using a Content Security Policy (CSP) nonce to allow inline styles.\n */\n styleNonce?: string\n /**\n * Use this to pass a shadow DOM target to the devtools so that the styles will be applied\n * within the shadow DOM instead of within the head tag in the light DOM.\n */\n shadowDOMTarget?: ShadowRoot\n /**\n * Set this to true to hide disabled queries from the devtools panel.\n */\n hideDisabledQueries?: boolean\n /**\n * Set this to 'light', 'dark', or 'system' to change the theme of the devtools panel.\n * This overrides the theme selected in the devtools Settings menu. When omitted, the\n * selected theme is used, or `'system'` if none is selected.\n */\n theme?: Theme\n}\n\n/**\n * Renders the TanStack Query devtools, with a toggle button that opens them, for the given or\n * nearest `QueryClient`.\n * @param props - The devtools options.\n * @returns The element the devtools are mounted in.\n */\nexport default function SolidQueryDevtools(props: DevtoolsOptions) {\n const queryClient = useQueryClient(props.client)\n const client = createMemo(() => queryClient)\n let ref!: HTMLDivElement\n const devtools = new TanstackQueryDevtools({\n client: client(),\n queryFlavor: 'Solid Query',\n version: '5',\n onlineManager,\n buttonPosition: props.buttonPosition,\n position: props.position,\n initialIsOpen: props.initialIsOpen,\n errorTypes: props.errorTypes,\n styleNonce: props.styleNonce,\n shadowDOMTarget: props.shadowDOMTarget,\n hideDisabledQueries: props.hideDisabledQueries,\n theme: props.theme,\n })\n\n createEffect(() => {\n devtools.setClient(client())\n })\n\n createEffect(() => {\n const buttonPos = props.buttonPosition\n if (buttonPos) {\n devtools.setButtonPosition(buttonPos)\n }\n })\n\n createEffect(() => {\n const pos = props.position\n if (pos) {\n devtools.setPosition(pos)\n }\n })\n\n createEffect(() => {\n devtools.setInitialIsOpen(props.initialIsOpen || false)\n })\n\n createEffect(() => {\n devtools.setErrorTypes(props.errorTypes || [])\n })\n\n createEffect(() => {\n devtools.setTheme(props.theme)\n })\n\n onMount(() => {\n devtools.mount(ref)\n onCleanup(() => devtools.unmount())\n })\n\n return <div class=\"tsqd-parent-container\" ref={ref} />\n}\n"],"mappings":"A,2UA+DA,SAAwBwB,EAAmBC,EAAwB,CACjE,IAAMC,EAAcrB,EAAeoB,EAAMT,MAAM,EACzCA,EAASf,MAAiByB,CAAW,EACvCC,EACEE,EAAW,IAAIvB,EAAsB,CACzCU,OAAQA,EAAO,EACfc,YAAa,cACbC,QAAS,IACT3B,gBACAU,eAAgBW,EAAMX,eACtBC,SAAUU,EAAMV,SAChBF,cAAeY,EAAMZ,cACrBI,WAAYQ,EAAMR,WAClBE,WAAYM,EAAMN,WAClBC,gBAAiBK,EAAML,gBACvBE,oBAAqBG,EAAMH,oBAC3BC,MAAOE,EAAMF,KACf,CAAC,EAqCD,OAnCAvB,MAAmB,CACjB6B,EAASG,UAAUhB,EAAO,CAAC,CAC7B,CAAC,EAEDhB,MAAmB,CACjB,IAAMiC,EAAYR,EAAMX,eACpBmB,GACFJ,EAASK,kBAAkBD,CAAS,CAExC,CAAC,EAEDjC,MAAmB,CACjB,IAAMmC,EAAMV,EAAMV,SACdoB,GACFN,EAASO,YAAYD,CAAG,CAE5B,CAAC,EAEDnC,MAAmB,CACjB6B,EAASQ,iBAAiBZ,EAAMZ,eAAiB,EAAK,CACxD,CAAC,EAEDb,MAAmB,CACjB6B,EAASS,cAAcb,EAAMR,YAAc,CAAA,CAAE,CAC/C,CAAC,EAEDjB,MAAmB,CACjB6B,EAASU,SAASd,EAAMF,KAAK,CAC/B,CAAC,EAEDpB,MAAc,CACZ0B,EAASW,MAAMb,CAAG,EAClBzB,MAAgB2B,EAASY,QAAQ,CAAC,CACpC,CAAC,OAED,CAAA,IAAAC,EAAAC,EAAA,EAAAC,EAA+CjB,EAAG,OAAA,OAAAiB,GAAA,WAAAC,EAAAD,EAAAF,CAAA,EAAHf,EAAGe,EAAAA,CAAA,EAAA,CAAA,CACpD,C"}
@@ -1,2 +1,2 @@
1
- import{effect as e,style as t,template as n,use as r}from"solid-js/web";import{createEffect as i,createMemo as a,onCleanup as o,onMount as s}from"solid-js";import{onlineManager as c,useQueryClient as l}from"@tanstack/solid-query";import{TanstackQueryDevtoolsPanel as u}from"@tanstack/query-devtools";var d=/*#__PURE__*/ n(`<div class=tsqd-parent-container style=height:500px>`);function f(n){let f=l(n.client),p=a(()=>f),m,{errorTypes:h,styleNonce:g,shadowDOMTarget:_,hideDisabledQueries:v}=n,y=new u({client:p(),queryFlavor:`Solid Query`,version:`5`,onlineManager:c,buttonPosition:`bottom-left`,position:`bottom`,initialIsOpen:!0,errorTypes:h,styleNonce:g,shadowDOMTarget:_,onClose:n.onClose,hideDisabledQueries:v,theme:n.theme});return i(()=>{y.setClient(p())}),i(()=>{y.setOnClose(n.onClose??(()=>{}))}),i(()=>{y.setErrorTypes(n.errorTypes||[])}),i(()=>{y.setTheme(n.theme||`system`)}),s(()=>{y.mount(m),o(()=>y.unmount())}),(()=>{var i=d(),a=m;return typeof a==`function`?r(a,i):m=i,e(e=>t(i,{...n.style},e)),i})()}export{f as default};
2
- //# sourceMappingURL=devtoolsPanel-glpBZk1i.js.map
1
+ import{effect as e,style as t,template as n,use as r}from"solid-js/web";import{createEffect as i,createMemo as a,onCleanup as o,onMount as s}from"solid-js";import{onlineManager as c,useQueryClient as l}from"@tanstack/solid-query";import{TanstackQueryDevtoolsPanel as u}from"@tanstack/query-devtools";var d=/*#__PURE__*/ n(`<div class=tsqd-parent-container style=height:500px>`);function f(n){let f=l(n.client),p=a(()=>f),m,{errorTypes:h,styleNonce:g,shadowDOMTarget:_,hideDisabledQueries:v}=n,y=new u({client:p(),queryFlavor:`Solid Query`,version:`5`,onlineManager:c,buttonPosition:`bottom-left`,position:`bottom`,initialIsOpen:!0,errorTypes:h,styleNonce:g,shadowDOMTarget:_,onClose:n.onClose,hideDisabledQueries:v,theme:n.theme});return i(()=>{y.setClient(p())}),i(()=>{y.setOnClose(n.onClose??(()=>{}))}),i(()=>{y.setErrorTypes(n.errorTypes||[])}),i(()=>{y.setTheme(n.theme)}),s(()=>{y.mount(m),o(()=>y.unmount())}),(()=>{var i=d(),a=m;return typeof a==`function`?r(a,i):m=i,e(e=>t(i,{...n.style},e)),i})()}export{f as default};
2
+ //# sourceMappingURL=devtoolsPanel-B_UgyNNb.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"devtoolsPanel-glpBZk1i.js","names":["createEffect","createMemo","onCleanup","onMount","onlineManager","useQueryClient","TanstackQueryDevtoolsPanel","DevtoolsErrorType","Theme","QueryClient","JSX","DevtoolsPanelOptions","client","errorTypes","Array","styleNonce","shadowDOMTarget","ShadowRoot","style","CSSProperties","onClose","hideDisabledQueries","theme","SolidQueryDevtoolsPanel","props","queryClient","ref","HTMLDivElement","devtools","queryFlavor","version","buttonPosition","position","initialIsOpen","setClient","setOnClose","setErrorTypes","setTheme","mount","unmount","_el$","_tmpl$","_ref$","_$use","_$effect","_$p","_$style","_$use","_$style","_tmpl$","SolidQueryDevtoolsPanel","queryClient","useQueryClient","props","client","createMemo","ref","devtools","TanstackQueryDevtoolsPanel","createEffect","onMount","onCleanup","_el$","_ref$","use","effect","style","_$p"],"sources":["../src/devtoolsPanel.tsx"],"sourcesContent":["import { createEffect, createMemo, onCleanup, onMount } from 'solid-js'\nimport { onlineManager, useQueryClient } from '@tanstack/solid-query'\nimport { TanstackQueryDevtoolsPanel } from '@tanstack/query-devtools'\nimport type { DevtoolsErrorType, Theme } from '@tanstack/query-devtools'\nimport type { QueryClient } from '@tanstack/solid-query'\nimport type { JSX } from 'solid-js'\n\n/**\n * The props of `SolidQueryDevtoolsPanel`, which renders the devtools panel inline.\n */\nexport interface DevtoolsPanelOptions {\n /**\n * Custom instance of QueryClient\n */\n client?: QueryClient\n /**\n * Use this so you can define custom errors that can be shown in the devtools.\n */\n errorTypes?: Array<DevtoolsErrorType>\n /**\n * Use this to pass a nonce to the style tag that is added to the document head. This is useful if you are using a Content Security Policy (CSP) nonce to allow inline styles.\n */\n styleNonce?: string\n /**\n * Use this to pass a shadow DOM target to the devtools so that the styles will be applied\n * within the shadow DOM instead of within the head tag in the light DOM.\n */\n shadowDOMTarget?: ShadowRoot\n\n /**\n * Custom styles for the devtools panel\n * @default { height: '500px' }\n * @example { height: '100%' }\n * @example { height: '100%', width: '100%' }\n */\n style?: JSX.CSSProperties\n\n /**\n * Callback function that is called when the devtools panel is closed\n */\n onClose?: () => void\n /**\n * Set this to true to hide disabled queries from the devtools panel.\n */\n hideDisabledQueries?: boolean\n /**\n * Set this to 'light', 'dark', or 'system' to change the theme of the devtools panel.\n * @defaultValue system\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 default function SolidQueryDevtoolsPanel(props: DevtoolsPanelOptions) {\n const queryClient = useQueryClient(props.client)\n const client = createMemo(() => queryClient)\n let ref!: HTMLDivElement\n const { errorTypes, styleNonce, shadowDOMTarget, hideDisabledQueries } = props\n const devtools = new TanstackQueryDevtoolsPanel({\n client: client(),\n queryFlavor: 'Solid 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: props.theme,\n })\n createEffect(() => {\n devtools.setClient(client())\n })\n createEffect(() => {\n devtools.setOnClose(props.onClose ?? (() => {}))\n })\n\n createEffect(() => {\n devtools.setErrorTypes(props.errorTypes || [])\n })\n\n createEffect(() => {\n devtools.setTheme(props.theme || 'system')\n })\n\n onMount(() => {\n devtools.mount(ref)\n onCleanup(() => devtools.unmount())\n })\n\n return (\n <div\n style={{ height: '500px', ...props.style }}\n class=\"tsqd-parent-container\"\n ref={ref}\n />\n )\n}\n"],"mappings":"0XAyDA,SAAwBuB,EAAwBC,EAA6B,CAC3E,IAAMC,EAAcpB,EAAemB,EAAMZ,MAAM,EACzCA,EAASX,MAAiBwB,CAAW,EACvCC,EACE,CAAEb,aAAYE,aAAYC,kBAAiBK,uBAAwBG,EACnEI,EAAW,IAAItB,EAA2B,CAC9CM,OAAQA,EAAO,EACfiB,YAAa,cACbC,QAAS,IACT1B,gBACA2B,eAAgB,cAChBC,SAAU,SACVC,cAAe,GACfpB,aACAE,aACAC,kBACAI,QAASI,EAAMJ,QACfC,sBACAC,MAAOE,EAAMF,KACf,CAAC,EAqBD,OApBAtB,MAAmB,CACjB4B,EAASM,UAAUtB,EAAO,CAAC,CAC7B,CAAC,EACDZ,MAAmB,CACjB4B,EAASO,WAAWX,EAAMJ,cAAkB,CAAC,EAAE,CACjD,CAAC,EAEDpB,MAAmB,CACjB4B,EAASQ,cAAcZ,EAAMX,YAAc,CAAA,CAAE,CAC/C,CAAC,EAEDb,MAAmB,CACjB4B,EAASS,SAASb,EAAMF,OAAS,QAAQ,CAC3C,CAAC,EAEDnB,MAAc,CACZyB,EAASU,MAAMZ,CAAG,EAClBxB,MAAgB0B,EAASW,QAAQ,CAAC,CACpC,CAAC,OAED,CAAA,IAAAC,EAAAC,EAAA,EAAAC,EAIShB,EAFqC,OAElC,OAAAgB,GAAA,WAAAC,EAAAD,EAAAF,CAAA,EAAHd,EAAGc,EAAAI,EAAAC,GAAAC,EAAAN,EAFD,CAAmB,GAAGhB,EAAMN,KAAM,EAAC2B,CAAA,CAAA,EAAAL,CAAA,EAAA,CAAA,CAKhD"}
1
+ {"version":3,"file":"devtoolsPanel-B_UgyNNb.js","names":["createEffect","createMemo","onCleanup","onMount","onlineManager","useQueryClient","TanstackQueryDevtoolsPanel","DevtoolsErrorType","Theme","QueryClient","JSX","DevtoolsPanelOptions","client","errorTypes","Array","styleNonce","shadowDOMTarget","ShadowRoot","style","CSSProperties","onClose","hideDisabledQueries","theme","SolidQueryDevtoolsPanel","props","queryClient","ref","HTMLDivElement","devtools","queryFlavor","version","buttonPosition","position","initialIsOpen","setClient","setOnClose","setErrorTypes","setTheme","mount","unmount","_el$","_tmpl$","_ref$","_$use","_$effect","_$p","_$style","_$use","_$style","_tmpl$","SolidQueryDevtoolsPanel","queryClient","useQueryClient","props","client","createMemo","ref","devtools","TanstackQueryDevtoolsPanel","createEffect","onMount","onCleanup","_el$","_ref$","use","effect","style","_$p"],"sources":["../src/devtoolsPanel.tsx"],"sourcesContent":["import { createEffect, createMemo, onCleanup, onMount } from 'solid-js'\nimport { onlineManager, useQueryClient } from '@tanstack/solid-query'\nimport { TanstackQueryDevtoolsPanel } from '@tanstack/query-devtools'\nimport type { DevtoolsErrorType, Theme } from '@tanstack/query-devtools'\nimport type { QueryClient } from '@tanstack/solid-query'\nimport type { JSX } from 'solid-js'\n\n/**\n * The props of `SolidQueryDevtoolsPanel`, which renders the devtools panel inline.\n */\nexport interface DevtoolsPanelOptions {\n /**\n * Custom instance of QueryClient\n */\n client?: QueryClient\n /**\n * Use this so you can define custom errors that can be shown in the devtools.\n */\n errorTypes?: Array<DevtoolsErrorType>\n /**\n * Use this to pass a nonce to the style tag that is added to the document head. This is useful if you are using a Content Security Policy (CSP) nonce to allow inline styles.\n */\n styleNonce?: string\n /**\n * Use this to pass a shadow DOM target to the devtools so that the styles will be applied\n * within the shadow DOM instead of within the head tag in the light DOM.\n */\n shadowDOMTarget?: ShadowRoot\n\n /**\n * Custom styles for the devtools panel\n * @default { height: '500px' }\n * @example { height: '100%' }\n * @example { height: '100%', width: '100%' }\n */\n style?: JSX.CSSProperties\n\n /**\n * Callback function that is called when the devtools panel is closed\n */\n onClose?: () => void\n /**\n * Set this to true to hide disabled queries from the devtools panel.\n */\n hideDisabledQueries?: boolean\n /**\n * Set this to 'light', 'dark', or 'system' to change the theme of the devtools panel.\n * This overrides the theme selected in the devtools Settings menu. When omitted, the\n * selected theme is used, or `'system'` if none is selected.\n */\n theme?: Theme\n}\n\n/**\n * Renders the TanStack Query devtools panel inline, for the given or nearest `QueryClient`.\n * @param props - The devtools panel options.\n * @returns The element the devtools panel is mounted in.\n */\nexport default function SolidQueryDevtoolsPanel(props: DevtoolsPanelOptions) {\n const queryClient = useQueryClient(props.client)\n const client = createMemo(() => queryClient)\n let ref!: HTMLDivElement\n const { errorTypes, styleNonce, shadowDOMTarget, hideDisabledQueries } = props\n const devtools = new TanstackQueryDevtoolsPanel({\n client: client(),\n queryFlavor: 'Solid 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: props.theme,\n })\n createEffect(() => {\n devtools.setClient(client())\n })\n createEffect(() => {\n devtools.setOnClose(props.onClose ?? (() => {}))\n })\n\n createEffect(() => {\n devtools.setErrorTypes(props.errorTypes || [])\n })\n\n createEffect(() => {\n devtools.setTheme(props.theme)\n })\n\n onMount(() => {\n devtools.mount(ref)\n onCleanup(() => devtools.unmount())\n })\n\n return (\n <div\n style={{ height: '500px', ...props.style }}\n class=\"tsqd-parent-container\"\n ref={ref}\n />\n )\n}\n"],"mappings":"A,0XA0DA,SAAwBuB,EAAwBC,EAA6B,CAC3E,IAAMC,EAAcpB,EAAemB,EAAMZ,MAAM,EACzCA,EAASX,MAAiBwB,CAAW,EACvCC,EACE,CAAEb,aAAYE,aAAYC,kBAAiBK,uBAAwBG,EACnEI,EAAW,IAAItB,EAA2B,CAC9CM,OAAQA,EAAO,EACfiB,YAAa,cACbC,QAAS,IACT1B,gBACA2B,eAAgB,cAChBC,SAAU,SACVC,cAAe,GACfpB,aACAE,aACAC,kBACAI,QAASI,EAAMJ,QACfC,sBACAC,MAAOE,EAAMF,KACf,CAAC,EAqBD,OApBAtB,MAAmB,CACjB4B,EAASM,UAAUtB,EAAO,CAAC,CAC7B,CAAC,EACDZ,MAAmB,CACjB4B,EAASO,WAAWX,EAAMJ,cAAkB,CAAC,EAAE,CACjD,CAAC,EAEDpB,MAAmB,CACjB4B,EAASQ,cAAcZ,EAAMX,YAAc,CAAA,CAAE,CAC/C,CAAC,EAEDb,MAAmB,CACjB4B,EAASS,SAASb,EAAMF,KAAK,CAC/B,CAAC,EAEDnB,MAAc,CACZyB,EAASU,MAAMZ,CAAG,EAClBxB,MAAgB0B,EAASW,QAAQ,CAAC,CACpC,CAAC,OAED,CAAA,IAAAC,EAAAC,EAAA,EAAAC,EAIShB,EAFqC,OAElC,OAAAgB,GAAA,WAAAC,EAAAD,EAAAF,CAAA,EAAHd,EAAGc,EAAAI,EAAAC,GAAAC,EAAAN,EAFD,CAAmB,GAAGhB,EAAMN,KAAM,EAAC2B,CAAA,CAAA,EAAAL,CAAA,EAAA,CAAA,CAKhD,C"}
@@ -2,7 +2,7 @@ let solid_js_web = require("solid-js/web");
2
2
  let solid_js = require("solid-js");
3
3
  let _tanstack_solid_query = require("@tanstack/solid-query");
4
4
  let _tanstack_query_devtools = require("@tanstack/query-devtools");
5
- //#region src/devtoolsPanel.tsx
5
+ // src/devtoolsPanel.tsx
6
6
  var _tmpl$ = /*#__PURE__*/ (0, solid_js_web.template)(`<div class=tsqd-parent-container style=height:500px>`);
7
7
  /**
8
8
  * Renders the TanStack Query devtools panel inline, for the given or nearest `QueryClient`.
@@ -39,7 +39,7 @@ function SolidQueryDevtoolsPanel(props) {
39
39
  devtools.setErrorTypes(props.errorTypes || []);
40
40
  });
41
41
  (0, solid_js.createEffect)(() => {
42
- devtools.setTheme(props.theme || "system");
42
+ devtools.setTheme(props.theme);
43
43
  });
44
44
  (0, solid_js.onMount)(() => {
45
45
  devtools.mount(ref);
@@ -53,5 +53,4 @@ function SolidQueryDevtoolsPanel(props) {
53
53
  return _el$;
54
54
  })();
55
55
  }
56
- //#endregion
57
56
  exports.default = SolidQueryDevtoolsPanel;
@@ -2,7 +2,7 @@ import { effect, style, template, use } from "solid-js/web";
2
2
  import { createEffect, createMemo, onCleanup, onMount } from "solid-js";
3
3
  import { onlineManager, useQueryClient } from "@tanstack/solid-query";
4
4
  import { TanstackQueryDevtoolsPanel } from "@tanstack/query-devtools";
5
- //#region src/devtoolsPanel.tsx
5
+ // src/devtoolsPanel.tsx
6
6
  var _tmpl$ = /*#__PURE__*/ template(`<div class=tsqd-parent-container style=height:500px>`);
7
7
  /**
8
8
  * Renders the TanStack Query devtools panel inline, for the given or nearest `QueryClient`.
@@ -39,7 +39,7 @@ function SolidQueryDevtoolsPanel(props) {
39
39
  devtools.setErrorTypes(props.errorTypes || []);
40
40
  });
41
41
  createEffect(() => {
42
- devtools.setTheme(props.theme || "system");
42
+ devtools.setTheme(props.theme);
43
43
  });
44
44
  onMount(() => {
45
45
  devtools.mount(ref);
@@ -53,5 +53,4 @@ function SolidQueryDevtoolsPanel(props) {
53
53
  return _el$;
54
54
  })();
55
55
  }
56
- //#endregion
57
56
  export { SolidQueryDevtoolsPanel as default };
@@ -1 +1 @@
1
- let e=require("solid-js/web"),t=require("solid-js"),n=require("@tanstack/solid-query"),r=require("@tanstack/query-devtools");var i=/*#__PURE__*/ (0,e.template)(`<div class=tsqd-parent-container style=height:500px>`);function a(a){let o=(0,n.useQueryClient)(a.client),s=(0,t.createMemo)(()=>o),c,{errorTypes:l,styleNonce:u,shadowDOMTarget:d,hideDisabledQueries:f}=a,p=new r.TanstackQueryDevtoolsPanel({client:s(),queryFlavor:`Solid Query`,version:`5`,onlineManager:n.onlineManager,buttonPosition:`bottom-left`,position:`bottom`,initialIsOpen:!0,errorTypes:l,styleNonce:u,shadowDOMTarget:d,onClose:a.onClose,hideDisabledQueries:f,theme:a.theme});return(0,t.createEffect)(()=>{p.setClient(s())}),(0,t.createEffect)(()=>{p.setOnClose(a.onClose??(()=>{}))}),(0,t.createEffect)(()=>{p.setErrorTypes(a.errorTypes||[])}),(0,t.createEffect)(()=>{p.setTheme(a.theme||`system`)}),(0,t.onMount)(()=>{p.mount(c),(0,t.onCleanup)(()=>p.unmount())}),(()=>{var t=i(),n=c;return typeof n==`function`?(0,e.use)(n,t):c=t,(0,e.effect)(n=>(0,e.style)(t,{...a.style},n)),t})()}exports.default=a;
1
+ let e=require("solid-js/web"),t=require("solid-js"),n=require("@tanstack/solid-query"),r=require("@tanstack/query-devtools");var i=/*#__PURE__*/ (0,e.template)(`<div class=tsqd-parent-container style=height:500px>`);function a(a){let o=(0,n.useQueryClient)(a.client),s=(0,t.createMemo)(()=>o),c,{errorTypes:l,styleNonce:u,shadowDOMTarget:d,hideDisabledQueries:f}=a,p=new r.TanstackQueryDevtoolsPanel({client:s(),queryFlavor:`Solid Query`,version:`5`,onlineManager:n.onlineManager,buttonPosition:`bottom-left`,position:`bottom`,initialIsOpen:!0,errorTypes:l,styleNonce:u,shadowDOMTarget:d,onClose:a.onClose,hideDisabledQueries:f,theme:a.theme});return(0,t.createEffect)(()=>{p.setClient(s())}),(0,t.createEffect)(()=>{p.setOnClose(a.onClose??(()=>{}))}),(0,t.createEffect)(()=>{p.setErrorTypes(a.errorTypes||[])}),(0,t.createEffect)(()=>{p.setTheme(a.theme)}),(0,t.onMount)(()=>{p.mount(c),(0,t.onCleanup)(()=>p.unmount())}),(()=>{var t=i(),n=c;return typeof n==`function`?(0,e.use)(n,t):c=t,(0,e.effect)(n=>(0,e.style)(t,{...a.style},n)),t})()}exports.default=a;
@@ -1,7 +1,7 @@
1
1
  import { createEffect, createMemo, onCleanup, onMount } from "solid-js";
2
2
  import { onlineManager, useQueryClient } from "@tanstack/solid-query";
3
3
  import { TanstackQueryDevtoolsPanel } from "@tanstack/query-devtools";
4
- //#region src/devtoolsPanel.tsx
4
+ // src/devtoolsPanel.tsx
5
5
  /**
6
6
  * Renders the TanStack Query devtools panel inline, for the given or nearest `QueryClient`.
7
7
  * @param props - The devtools panel options.
@@ -37,7 +37,7 @@ function SolidQueryDevtoolsPanel(props) {
37
37
  devtools.setErrorTypes(props.errorTypes || []);
38
38
  });
39
39
  createEffect(() => {
40
- devtools.setTheme(props.theme || "system");
40
+ devtools.setTheme(props.theme);
41
41
  });
42
42
  onMount(() => {
43
43
  devtools.mount(ref);
@@ -48,5 +48,4 @@ function SolidQueryDevtoolsPanel(props) {
48
48
  ...props.style
49
49
  }} class="tsqd-parent-container" ref={ref} />;
50
50
  }
51
- //#endregion
52
51
  export { SolidQueryDevtoolsPanel as default };
package/build/index.cjs CHANGED
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});let e=require("solid-js/web"),t=require("solid-js");function n(n){if(e.isServer)return e=>e.fallback;let[r,i]=(0,t.createSignal)();return n().then(e=>i(()=>e.default)),e=>{let n,i,[,a]=(0,t.splitProps)(e,[`fallback`]);if((n=r())&&!t.sharedConfig.context)return n(a);let[o,s]=(0,t.createSignal)(!t.sharedConfig.context);return(0,t.onMount)(()=>s(!0)),(0,t.createMemo)(()=>(n=r(),i=o(),(0,t.untrack)(()=>n&&i?n(a):e.fallback)))}}const r=e.isDev?n(()=>Promise.resolve().then(()=>require("./devtools-BjMCcqlJ.cjs"))):function(){return null},i=e.isDev?n(()=>Promise.resolve().then(()=>require("./devtoolsPanel-BE7EI8NW.cjs"))):function(){return null};exports.SolidQueryDevtools=r,exports.SolidQueryDevtoolsPanel=i;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});let e=require("solid-js/web"),t=require("solid-js");function n(n){if(e.isServer)return e=>e.fallback;let[r,i]=(0,t.createSignal)();return n().then(e=>i(()=>e.default)),e=>{let n,i,[,a]=(0,t.splitProps)(e,[`fallback`]);if((n=r())&&!t.sharedConfig.context)return n(a);let[o,s]=(0,t.createSignal)(!t.sharedConfig.context);return(0,t.onMount)(()=>s(!0)),(0,t.createMemo)(()=>(n=r(),i=o(),(0,t.untrack)(()=>n&&i?n(a):e.fallback)))}}const r=e.isDev?n(()=>Promise.resolve().then(()=>require("./devtools-CsBrM8Az.cjs"))):function(){return null},i=e.isDev?n(()=>Promise.resolve().then(()=>require("./devtoolsPanel-LS1BLA67.cjs"))):function(){return null};exports.SolidQueryDevtools=r,exports.SolidQueryDevtoolsPanel=i;
package/build/index.d.cts CHANGED
@@ -1,7 +1,6 @@
1
1
  import { DevtoolsButtonPosition, DevtoolsErrorType, DevtoolsPosition, Theme } from "@tanstack/query-devtools";
2
2
  import { QueryClient } from "@tanstack/solid-query";
3
3
  import { JSX as JSX$1 } from "solid-js";
4
- //#region src/devtools.d.ts
5
4
  interface DevtoolsOptions {
6
5
  /**
7
6
  * Set this true if you want the dev tools to default to being open
@@ -42,7 +41,8 @@ interface DevtoolsOptions {
42
41
  hideDisabledQueries?: boolean;
43
42
  /**
44
43
  * Set this to 'light', 'dark', or 'system' to change the theme of the devtools panel.
45
- * @defaultValue system
44
+ * This overrides the theme selected in the devtools Settings menu. When omitted, the
45
+ * selected theme is used, or `'system'` if none is selected.
46
46
  */
47
47
  theme?: Theme;
48
48
  }
@@ -53,8 +53,6 @@ interface DevtoolsOptions {
53
53
  * @returns The element the devtools are mounted in.
54
54
  */
55
55
  declare function SolidQueryDevtools$1(props: DevtoolsOptions): import("solid-js").JSX.Element;
56
- //#endregion
57
- //#region src/devtoolsPanel.d.ts
58
56
  /**
59
57
  * The props of `SolidQueryDevtoolsPanel`, which renders the devtools panel inline.
60
58
  */
@@ -93,7 +91,8 @@ interface DevtoolsPanelOptions {
93
91
  hideDisabledQueries?: boolean;
94
92
  /**
95
93
  * Set this to 'light', 'dark', or 'system' to change the theme of the devtools panel.
96
- * @defaultValue system
94
+ * This overrides the theme selected in the devtools Settings menu. When omitted, the
95
+ * selected theme is used, or `'system'` if none is selected.
97
96
  */
98
97
  theme?: Theme;
99
98
  }
@@ -103,10 +102,7 @@ interface DevtoolsPanelOptions {
103
102
  * @returns The element the devtools panel is mounted in.
104
103
  */
105
104
  declare function SolidQueryDevtoolsPanel$1(props: DevtoolsPanelOptions): JSX$1.Element;
106
- //#endregion
107
- //#region src/index.d.ts
108
105
  export declare const SolidQueryDevtools: typeof SolidQueryDevtools$1;
109
106
  export declare const SolidQueryDevtoolsPanel: typeof SolidQueryDevtoolsPanel$1;
110
- //#endregion
111
107
  export type { DevtoolsPanelOptions };
112
108
  //# sourceMappingURL=index.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.cts","names":["SolidQueryDevtools","JSX","SolidQueryDevtoolsPanel","SolidQueryDevtoolsComp","SolidQueryDevtoolsCompPanel"],"sources":["../src/devtools.tsx","../src/devtoolsPanel.tsx","../src/index.tsx"],"mappings":";;;;UAWU;;;;EAIR;;;;;;EAMA,iBAAiB;;;;;;EAMjB,WAAW;;;;EAIX,SAAS;;;;EAIT,aAAa,MAAM;;;;EAInB;;;;;EAKA,kBAAkB;;;;EAIlB;;;;;EAKA,QAAQ;;;;;;;;iBAScA,qBAAmB,OAAO,qCAAe,IAAA;;;;;;UCpDhD;;;;EAIf,SAAS;;;;EAIT,aAAa,MAAM;;;;EAInB;;;;;EAKA,kBAAkB;;;;;;;EAQlB,QAAQC,MAAI;;;;EAKZ;;;;EAIA;;;;;EAKA,QAAQ;;;;;;;iBAQcC,0BAAwB,OAAO,uBAAoBD,MAAA;;;qBCpD9D,2BAA2BE;qBAM3B,gCAAgCC"}
1
+ {"version":3,"file":"index.d.cts","names":["SolidQueryDevtools","JSX","SolidQueryDevtoolsPanel","SolidQueryDevtoolsComp","SolidQueryDevtoolsCompPanel"],"sources":["../src/devtools.tsx","../src/devtoolsPanel.tsx","../src/index.tsx"],"mappings":";;;UAWU;;;;EAIR;;;;;;EAMA,iBAAiB;;;;;;EAMjB,WAAW;;;;EAIX,SAAS;;;;EAIT,aAAa,MAAM;;;;EAInB;;;;;EAKA,kBAAkB;;;;EAIlB;;;;;;EAMA,QAAQ;;;;;;;;iBAScA,qBAAmB,OAAO,qCAAe,IAAA;;;;UCrDhD;;;;EAIf,SAAS;;;;EAIT,aAAa,MAAM;;;;EAInB;;;;;EAKA,kBAAkB;;;;;;;EAQlB,QAAQC,MAAI;;;;EAKZ;;;;EAIA;;;;;;EAMA,QAAQ;;;;;;;iBAQcC,0BAAwB,OAAO,uBAAoBD,MAAA;qBCrD9D,2BAA2BE;qBAM3B,gCAAgCC"}
package/build/index.d.ts CHANGED
@@ -1,7 +1,6 @@
1
1
  import { JSX as JSX$1 } from "solid-js";
2
2
  import { QueryClient } from "@tanstack/solid-query";
3
3
  import { DevtoolsButtonPosition, DevtoolsErrorType, DevtoolsPosition, Theme } from "@tanstack/query-devtools";
4
- //#region src/devtools.d.ts
5
4
  interface DevtoolsOptions {
6
5
  /**
7
6
  * Set this true if you want the dev tools to default to being open
@@ -42,7 +41,8 @@ interface DevtoolsOptions {
42
41
  hideDisabledQueries?: boolean;
43
42
  /**
44
43
  * Set this to 'light', 'dark', or 'system' to change the theme of the devtools panel.
45
- * @defaultValue system
44
+ * This overrides the theme selected in the devtools Settings menu. When omitted, the
45
+ * selected theme is used, or `'system'` if none is selected.
46
46
  */
47
47
  theme?: Theme;
48
48
  }
@@ -53,8 +53,6 @@ interface DevtoolsOptions {
53
53
  * @returns The element the devtools are mounted in.
54
54
  */
55
55
  declare function SolidQueryDevtools$1(props: DevtoolsOptions): import("solid-js").JSX.Element;
56
- //#endregion
57
- //#region src/devtoolsPanel.d.ts
58
56
  /**
59
57
  * The props of `SolidQueryDevtoolsPanel`, which renders the devtools panel inline.
60
58
  */
@@ -93,7 +91,8 @@ interface DevtoolsPanelOptions {
93
91
  hideDisabledQueries?: boolean;
94
92
  /**
95
93
  * Set this to 'light', 'dark', or 'system' to change the theme of the devtools panel.
96
- * @defaultValue system
94
+ * This overrides the theme selected in the devtools Settings menu. When omitted, the
95
+ * selected theme is used, or `'system'` if none is selected.
97
96
  */
98
97
  theme?: Theme;
99
98
  }
@@ -103,10 +102,7 @@ interface DevtoolsPanelOptions {
103
102
  * @returns The element the devtools panel is mounted in.
104
103
  */
105
104
  declare function SolidQueryDevtoolsPanel$1(props: DevtoolsPanelOptions): JSX$1.Element;
106
- //#endregion
107
- //#region src/index.d.ts
108
105
  export declare const SolidQueryDevtools: typeof SolidQueryDevtools$1;
109
106
  export declare const SolidQueryDevtoolsPanel: typeof SolidQueryDevtoolsPanel$1;
110
- //#endregion
111
107
  export type { DevtoolsPanelOptions };
112
108
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","names":["SolidQueryDevtools","JSX","SolidQueryDevtoolsPanel","SolidQueryDevtoolsComp","SolidQueryDevtoolsCompPanel"],"sources":["../src/devtools.tsx","../src/devtoolsPanel.tsx","../src/index.tsx"],"mappings":";;;;UAWU;;;;EAIR;;;;;;EAMA,iBAAiB;;;;;;EAMjB,WAAW;;;;EAIX,SAAS;;;;EAIT,aAAa,MAAM;;;;EAInB;;;;;EAKA,kBAAkB;;;;EAIlB;;;;;EAKA,QAAQ;;;;;;;;iBAScA,qBAAmB,OAAO,qCAAe,IAAA;;;;;;UCpDhD;;;;EAIf,SAAS;;;;EAIT,aAAa,MAAM;;;;EAInB;;;;;EAKA,kBAAkB;;;;;;;EAQlB,QAAQC,MAAI;;;;EAKZ;;;;EAIA;;;;;EAKA,QAAQ;;;;;;;iBAQcC,0BAAwB,OAAO,uBAAoBD,MAAA;;;qBCpD9D,2BAA2BE;qBAM3B,gCAAgCC"}
1
+ {"version":3,"file":"index.d.ts","names":["SolidQueryDevtools","JSX","SolidQueryDevtoolsPanel","SolidQueryDevtoolsComp","SolidQueryDevtoolsCompPanel"],"sources":["../src/devtools.tsx","../src/devtoolsPanel.tsx","../src/index.tsx"],"mappings":";;;UAWU;;;;EAIR;;;;;;EAMA,iBAAiB;;;;;;EAMjB,WAAW;;;;EAIX,SAAS;;;;EAIT,aAAa,MAAM;;;;EAInB;;;;;EAKA,kBAAkB;;;;EAIlB;;;;;;EAMA,QAAQ;;;;;;;;iBAScA,qBAAmB,OAAO,qCAAe,IAAA;;;;UCrDhD;;;;EAIf,SAAS;;;;EAIT,aAAa,MAAM;;;;EAInB;;;;;EAKA,kBAAkB;;;;;;;EAQlB,QAAQC,MAAI;;;;EAKZ;;;;EAIA;;;;;;EAMA,QAAQ;;;;;;;iBAQcC,0BAAwB,OAAO,uBAAoBD,MAAA;qBCrD9D,2BAA2BE;qBAM3B,gCAAgCC"}
package/build/index.js CHANGED
@@ -1,2 +1,2 @@
1
- import{isDev as e,isServer as t}from"solid-js/web";import{createMemo as n,createSignal as r,onMount as i,sharedConfig as a,splitProps as o,untrack as s}from"solid-js";function c(e){if(t)return e=>e.fallback;let[c,l]=r();return e().then(e=>l(()=>e.default)),e=>{let t,l,[,u]=o(e,[`fallback`]);if((t=c())&&!a.context)return t(u);let[d,f]=r(!a.context);return i(()=>f(!0)),n(()=>(t=c(),l=d(),s(()=>t&&l?t(u):e.fallback)))}}const l=e?c(()=>import(`./devtools-CEvVAp2X.js`)):function(){return null},u=e?c(()=>import(`./devtoolsPanel-glpBZk1i.js`)):function(){return null};export{l as SolidQueryDevtools,u as SolidQueryDevtoolsPanel};
1
+ import{isDev as e,isServer as t}from"solid-js/web";import{createMemo as n,createSignal as r,onMount as i,sharedConfig as a,splitProps as o,untrack as s}from"solid-js";function c(e){if(t)return e=>e.fallback;let[c,l]=r();return e().then(e=>l(()=>e.default)),e=>{let t,l,[,u]=o(e,[`fallback`]);if((t=c())&&!a.context)return t(u);let[d,f]=r(!a.context);return i(()=>f(!0)),n(()=>(t=c(),l=d(),s(()=>t&&l?t(u):e.fallback)))}}const l=e?c(()=>import(`./devtools-DWG-IwnT.js`)):function(){return null},u=e?c(()=>import(`./devtoolsPanel-B_UgyNNb.js`)):function(){return null};export{l as SolidQueryDevtools,u as SolidQueryDevtoolsPanel};
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["createMemo","createSignal","onMount","sharedConfig","splitProps","untrack","isServer","Component","ComponentProps","JSX","clientOnly","fn","Promise","default","T","props","fallback","Element","comp","setComp","then","m","Comp","rest","context","mounted","setMounted","isDev","clientOnly","SolidQueryDevtoolsComp","SolidQueryDevtoolsCompPanel","SolidQueryDevtools","SolidQueryDevtoolsPanel","DevtoolsPanelOptions","clientOnly","isServer","props","comp","setComp","createSignal","fn","m","Comp","rest","splitProps","sharedConfig","mounted","setMounted","onMount","createMemo","untrack","SolidQueryDevtools","isDev","SolidQueryDevtoolsPanel"],"sources":["../src/clientOnly.tsx","../src/index.tsx"],"sourcesContent":["import {\n createMemo,\n createSignal,\n onMount,\n sharedConfig,\n splitProps,\n untrack,\n} from 'solid-js'\nimport { isServer } from 'solid-js/web'\nimport type { Component, ComponentProps, JSX } from 'solid-js'\n\n/**\n * This function has been taken from solid-start's codebase:\n * <https://github.com/solidjs/solid-start/blob/2967fc2db3f0df826f061020231dbdafdfa0746b/packages/start/islands/clientOnly.tsx>.\n * This allows the devtools to be loaded only on the client and bypasses any server side rendering.\n * @param fn - Imports the module whose default export is the component.\n * @returns A component that renders `fallback` on the server and while the module loads on the\n * client, then the imported component.\n */\nexport default function clientOnly<T extends Component<any>>(\n fn: () => Promise<{\n default: T\n }>,\n) {\n if (isServer)\n return (props: ComponentProps<T> & { fallback?: JSX.Element }) =>\n props.fallback\n\n const [comp, setComp] = createSignal<T>()\n fn().then((m) => setComp(() => m.default))\n return (props: ComponentProps<T>) => {\n let Comp: T | undefined\n let m: boolean\n const [, rest] = splitProps(props, ['fallback'])\n if ((Comp = comp()) && !sharedConfig.context) return Comp(rest)\n const [mounted, setMounted] = createSignal(!sharedConfig.context)\n onMount(() => setMounted(true))\n return createMemo(\n () => (\n (Comp = comp()),\n (m = mounted()),\n untrack(() => (Comp && m ? Comp(rest) : props.fallback))\n ),\n )\n }\n}\n","import { isDev } from 'solid-js/web'\nimport clientOnly from './clientOnly'\nimport type SolidQueryDevtoolsComp from './devtools'\nimport type SolidQueryDevtoolsCompPanel from './devtoolsPanel'\n\nexport const SolidQueryDevtools: typeof SolidQueryDevtoolsComp = isDev\n ? clientOnly(() => import('./devtools'))\n : function () {\n return null\n }\n\nexport const SolidQueryDevtoolsPanel: typeof SolidQueryDevtoolsCompPanel = isDev\n ? clientOnly(() => import('./devtoolsPanel'))\n : function () {\n return null\n }\n\nexport type { DevtoolsPanelOptions } from './devtoolsPanel'\n"],"mappings":"uKAmBA,SAAwBU,EACtBC,EAGA,CACA,GAAIL,EACF,MAAQS,IACNA,EAAMC,SAEV,GAAM,CAACE,EAAMC,GAAWlB,EAAgB,EAExC,OADAU,EAAG,CAAC,CAACS,KAAMC,GAAMF,MAAcE,EAAER,OAAO,CAAC,EACjCE,GAA6B,CACnC,IAAIO,EACAD,EACE,EAAGE,GAAQnB,EAAWW,EAAO,CAAC,UAAU,CAAC,EAC/C,IAAKO,EAAOJ,EAAK,IAAM,CAACf,EAAaqB,QAAS,OAAOF,EAAKC,CAAI,EAC9D,GAAM,CAACE,EAASC,GAAczB,EAAa,CAACE,EAAaqB,OAAO,EAEhE,OADAtB,MAAcwB,EAAW,EAAI,CAAC,EACvB1B,OAEFsB,EAAOJ,EAAK,EACZG,EAAII,EAAQ,EACbpB,MAAeiB,GAAQD,EAAIC,EAAKC,CAAI,EAAIR,EAAMC,QAAS,EAE3D,CACF,CACF,CCxCA,MAAae,EAAoDJ,EAC7DC,MAAiB,OAAO,yBAAa,EACrC,UAAY,CACV,OAAO,IACT,EAESI,EAA8DL,EACvEC,MAAiB,OAAO,8BAAkB,EAC1C,UAAY,CACV,OAAO,IACT"}
1
+ {"version":3,"file":"index.js","names":["createMemo","createSignal","onMount","sharedConfig","splitProps","untrack","isServer","Component","ComponentProps","JSX","clientOnly","fn","Promise","default","T","props","fallback","Element","comp","setComp","then","m","Comp","rest","context","mounted","setMounted","isDev","clientOnly","SolidQueryDevtoolsComp","SolidQueryDevtoolsCompPanel","SolidQueryDevtools","SolidQueryDevtoolsPanel","DevtoolsPanelOptions","clientOnly","isServer","props","comp","setComp","createSignal","fn","m","Comp","rest","splitProps","sharedConfig","mounted","setMounted","onMount","createMemo","untrack","SolidQueryDevtools","isDev","SolidQueryDevtoolsPanel"],"sources":["../src/clientOnly.tsx","../src/index.tsx"],"sourcesContent":["import {\n createMemo,\n createSignal,\n onMount,\n sharedConfig,\n splitProps,\n untrack,\n} from 'solid-js'\nimport { isServer } from 'solid-js/web'\nimport type { Component, ComponentProps, JSX } from 'solid-js'\n\n/**\n * This function has been taken from solid-start's codebase:\n * <https://github.com/solidjs/solid-start/blob/2967fc2db3f0df826f061020231dbdafdfa0746b/packages/start/islands/clientOnly.tsx>.\n * This allows the devtools to be loaded only on the client and bypasses any server side rendering.\n * @param fn - Imports the module whose default export is the component.\n * @returns A component that renders `fallback` on the server and while the module loads on the\n * client, then the imported component.\n */\nexport default function clientOnly<T extends Component<any>>(\n fn: () => Promise<{\n default: T\n }>,\n) {\n if (isServer)\n return (props: ComponentProps<T> & { fallback?: JSX.Element }) =>\n props.fallback\n\n const [comp, setComp] = createSignal<T>()\n fn().then((m) => setComp(() => m.default))\n return (props: ComponentProps<T>) => {\n let Comp: T | undefined\n let m: boolean\n const [, rest] = splitProps(props, ['fallback'])\n if ((Comp = comp()) && !sharedConfig.context) return Comp(rest)\n const [mounted, setMounted] = createSignal(!sharedConfig.context)\n onMount(() => setMounted(true))\n return createMemo(\n () => (\n (Comp = comp()),\n (m = mounted()),\n untrack(() => (Comp && m ? Comp(rest) : props.fallback))\n ),\n )\n }\n}\n","import { isDev } from 'solid-js/web'\nimport clientOnly from './clientOnly'\nimport type SolidQueryDevtoolsComp from './devtools'\nimport type SolidQueryDevtoolsCompPanel from './devtoolsPanel'\n\nexport const SolidQueryDevtools: typeof SolidQueryDevtoolsComp = isDev\n ? clientOnly(() => import('./devtools'))\n : function () {\n return null\n }\n\nexport const SolidQueryDevtoolsPanel: typeof SolidQueryDevtoolsCompPanel = isDev\n ? clientOnly(() => import('./devtoolsPanel'))\n : function () {\n return null\n }\n\nexport type { DevtoolsPanelOptions } from './devtoolsPanel'\n"],"mappings":"A,uKAmBA,SAAwBU,EACtBC,EAGA,CACA,GAAIL,EACF,MAAQS,IACNA,EAAMC,SAEV,GAAM,CAACE,EAAMC,GAAWlB,EAAgB,EAExC,OADAU,EAAG,CAAC,CAACS,KAAMC,GAAMF,MAAcE,EAAER,OAAO,CAAC,EACjCE,GAA6B,CACnC,IAAIO,EACAD,EACE,EAAGE,GAAQnB,EAAWW,EAAO,CAAC,UAAU,CAAC,EAC/C,IAAKO,EAAOJ,EAAK,IAAM,CAACf,EAAaqB,QAAS,OAAOF,EAAKC,CAAI,EAC9D,GAAM,CAACE,EAASC,GAAczB,EAAa,CAACE,EAAaqB,OAAO,EAEhE,OADAtB,MAAcwB,EAAW,EAAI,CAAC,EACvB1B,OAEFsB,EAAOJ,EAAK,EACZG,EAAII,EAAQ,EACbpB,MAAeiB,GAAQD,EAAIC,EAAKC,CAAI,EAAIR,EAAMC,QAAS,EAE3D,CACF,CACF,CCxCA,MAAae,EAAoDJ,EAC7DC,MAAiB,OAAO,yBAAa,EACrC,UAAY,CACV,OAAO,IACT,EAESI,EAA8DL,EACvEC,MAAiB,OAAO,8BAAkB,EAC1C,UAAY,CACV,OAAO,IACT,E"}
package/build/index.jsx CHANGED
@@ -1,6 +1,6 @@
1
1
  import { isDev, isServer } from "solid-js/web";
2
2
  import { createMemo, createSignal, onMount, sharedConfig, splitProps, untrack } from "solid-js";
3
- //#region src/clientOnly.tsx
3
+ // src/clientOnly.tsx
4
4
  /**
5
5
  * This function has been taken from solid-start's codebase:
6
6
  * <https://github.com/solidjs/solid-start/blob/2967fc2db3f0df826f061020231dbdafdfa0746b/packages/start/islands/clientOnly.tsx>.
@@ -23,13 +23,11 @@ function clientOnly(fn) {
23
23
  return createMemo(() => (Comp = comp(), m = mounted(), untrack(() => Comp && m ? Comp(rest) : props.fallback)));
24
24
  };
25
25
  }
26
- //#endregion
27
- //#region src/index.tsx
28
- const SolidQueryDevtools = isDev ? clientOnly(() => import("./devtools-4DtrHfk8.jsx")) : function() {
26
+ // src/index.tsx
27
+ const SolidQueryDevtools = isDev ? clientOnly(() => import("./devtools-COkRtz4W.jsx")) : function() {
29
28
  return null;
30
29
  };
31
- const SolidQueryDevtoolsPanel = isDev ? clientOnly(() => import("./devtoolsPanel-CfOYIuMv.jsx")) : function() {
30
+ const SolidQueryDevtoolsPanel = isDev ? clientOnly(() => import("./devtoolsPanel-lDJwLIyQ.jsx")) : function() {
32
31
  return null;
33
32
  };
34
- //#endregion
35
33
  export { SolidQueryDevtools, SolidQueryDevtoolsPanel };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tanstack/solid-query-devtools",
3
- "version": "5.104.5",
3
+ "version": "5.105.1",
4
4
  "description": "Developer tools to interact with and visualize the TanStack/solid-query Query cache",
5
5
  "author": "tannerlinsley",
6
6
  "license": "MIT",
@@ -44,11 +44,11 @@
44
44
  "!src/__tests__"
45
45
  ],
46
46
  "dependencies": {
47
- "@tanstack/query-devtools": "5.104.5"
47
+ "@tanstack/query-devtools": "5.105.1"
48
48
  },
49
49
  "devDependencies": {
50
50
  "@solidjs/testing-library": "^0.8.10",
51
- "@tanstack/solid-query": "5.104.5",
51
+ "@tanstack/solid-query": "5.105.1",
52
52
  "eslint-plugin-solid": "^0.18.1",
53
53
  "solid-js": "^1.9.15",
54
54
  "typescript": "6.0.3",
@@ -56,7 +56,7 @@
56
56
  "vite-plugin-solid": "^2.11.14"
57
57
  },
58
58
  "peerDependencies": {
59
- "@tanstack/solid-query": "^5.104.5",
59
+ "@tanstack/solid-query": "^5.105.1",
60
60
  "solid-js": "^1.6.0"
61
61
  },
62
62
  "scripts": {
package/src/devtools.tsx CHANGED
@@ -49,7 +49,8 @@ interface DevtoolsOptions {
49
49
  hideDisabledQueries?: boolean
50
50
  /**
51
51
  * Set this to 'light', 'dark', or 'system' to change the theme of the devtools panel.
52
- * @defaultValue system
52
+ * This overrides the theme selected in the devtools Settings menu. When omitted, the
53
+ * selected theme is used, or `'system'` if none is selected.
53
54
  */
54
55
  theme?: Theme
55
56
  }
@@ -106,7 +107,7 @@ export default function SolidQueryDevtools(props: DevtoolsOptions) {
106
107
  })
107
108
 
108
109
  createEffect(() => {
109
- devtools.setTheme(props.theme || 'system')
110
+ devtools.setTheme(props.theme)
110
111
  })
111
112
 
112
113
  onMount(() => {
@@ -45,7 +45,8 @@ export interface DevtoolsPanelOptions {
45
45
  hideDisabledQueries?: boolean
46
46
  /**
47
47
  * Set this to 'light', 'dark', or 'system' to change the theme of the devtools panel.
48
- * @defaultValue system
48
+ * This overrides the theme selected in the devtools Settings menu. When omitted, the
49
+ * selected theme is used, or `'system'` if none is selected.
49
50
  */
50
51
  theme?: Theme
51
52
  }
@@ -87,7 +88,7 @@ export default function SolidQueryDevtoolsPanel(props: DevtoolsPanelOptions) {
87
88
  })
88
89
 
89
90
  createEffect(() => {
90
- devtools.setTheme(props.theme || 'system')
91
+ devtools.setTheme(props.theme)
91
92
  })
92
93
 
93
94
  onMount(() => {
@@ -1 +0,0 @@
1
- {"version":3,"file":"devtools-CEvVAp2X.js","names":["createEffect","createMemo","onCleanup","onMount","onlineManager","useQueryClient","TanstackQueryDevtools","DevtoolsButtonPosition","DevtoolsErrorType","DevtoolsPosition","Theme","QueryClient","DevtoolsOptions","initialIsOpen","buttonPosition","position","client","errorTypes","Array","styleNonce","shadowDOMTarget","ShadowRoot","hideDisabledQueries","theme","SolidQueryDevtools","props","queryClient","ref","HTMLDivElement","devtools","queryFlavor","version","setClient","buttonPos","setButtonPosition","pos","setPosition","setInitialIsOpen","setErrorTypes","setTheme","mount","unmount","_el$","_tmpl$","_ref$","_$use","_$use","_tmpl$","SolidQueryDevtools","queryClient","useQueryClient","props","client","createMemo","ref","devtools","TanstackQueryDevtools","createEffect","buttonPos","pos","onMount","onCleanup","_el$","_ref$","use"],"sources":["../src/devtools.tsx"],"sourcesContent":["import { createEffect, createMemo, onCleanup, onMount } from 'solid-js'\nimport { onlineManager, useQueryClient } from '@tanstack/solid-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/solid-query'\n\ninterface 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 Solid Query devtools panel.\n * 'top' | 'bottom' | 'left' | 'right'\n * @defaultValue bottom\n */\n position?: DevtoolsPosition\n /**\n * Custom instance of QueryClient\n */\n client?: QueryClient\n /**\n * Use this so you can define custom errors that can be shown in the devtools.\n */\n errorTypes?: Array<DevtoolsErrorType>\n /**\n * Use this to pass a nonce to the style tag that is added to the document head. This is useful if you are using a Content Security Policy (CSP) nonce to allow inline styles.\n */\n styleNonce?: string\n /**\n * Use this to pass a shadow DOM target to the devtools so that the styles will be applied\n * within the shadow DOM instead of within the head tag in the light DOM.\n */\n shadowDOMTarget?: ShadowRoot\n /**\n * Set this to true to hide disabled queries from the devtools panel.\n */\n hideDisabledQueries?: boolean\n /**\n * Set this to 'light', 'dark', or 'system' to change the theme of the devtools panel.\n * @defaultValue system\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 default function SolidQueryDevtools(props: DevtoolsOptions) {\n const queryClient = useQueryClient(props.client)\n const client = createMemo(() => queryClient)\n let ref!: HTMLDivElement\n const devtools = new TanstackQueryDevtools({\n client: client(),\n queryFlavor: 'Solid Query',\n version: '5',\n onlineManager,\n buttonPosition: props.buttonPosition,\n position: props.position,\n initialIsOpen: props.initialIsOpen,\n errorTypes: props.errorTypes,\n styleNonce: props.styleNonce,\n shadowDOMTarget: props.shadowDOMTarget,\n hideDisabledQueries: props.hideDisabledQueries,\n theme: props.theme,\n })\n\n createEffect(() => {\n devtools.setClient(client())\n })\n\n createEffect(() => {\n const buttonPos = props.buttonPosition\n if (buttonPos) {\n devtools.setButtonPosition(buttonPos)\n }\n })\n\n createEffect(() => {\n const pos = props.position\n if (pos) {\n devtools.setPosition(pos)\n }\n })\n\n createEffect(() => {\n devtools.setInitialIsOpen(props.initialIsOpen || false)\n })\n\n createEffect(() => {\n devtools.setErrorTypes(props.errorTypes || [])\n })\n\n createEffect(() => {\n devtools.setTheme(props.theme || 'system')\n })\n\n onMount(() => {\n devtools.mount(ref)\n onCleanup(() => devtools.unmount())\n })\n\n return <div class=\"tsqd-parent-container\" ref={ref} />\n}\n"],"mappings":"2UA8DA,SAAwBwB,EAAmBC,EAAwB,CACjE,IAAMC,EAAcrB,EAAeoB,EAAMT,MAAM,EACzCA,EAASf,MAAiByB,CAAW,EACvCC,EACEE,EAAW,IAAIvB,EAAsB,CACzCU,OAAQA,EAAO,EACfc,YAAa,cACbC,QAAS,IACT3B,gBACAU,eAAgBW,EAAMX,eACtBC,SAAUU,EAAMV,SAChBF,cAAeY,EAAMZ,cACrBI,WAAYQ,EAAMR,WAClBE,WAAYM,EAAMN,WAClBC,gBAAiBK,EAAML,gBACvBE,oBAAqBG,EAAMH,oBAC3BC,MAAOE,EAAMF,KACf,CAAC,EAqCD,OAnCAvB,MAAmB,CACjB6B,EAASG,UAAUhB,EAAO,CAAC,CAC7B,CAAC,EAEDhB,MAAmB,CACjB,IAAMiC,EAAYR,EAAMX,eACpBmB,GACFJ,EAASK,kBAAkBD,CAAS,CAExC,CAAC,EAEDjC,MAAmB,CACjB,IAAMmC,EAAMV,EAAMV,SACdoB,GACFN,EAASO,YAAYD,CAAG,CAE5B,CAAC,EAEDnC,MAAmB,CACjB6B,EAASQ,iBAAiBZ,EAAMZ,eAAiB,EAAK,CACxD,CAAC,EAEDb,MAAmB,CACjB6B,EAASS,cAAcb,EAAMR,YAAc,CAAA,CAAE,CAC/C,CAAC,EAEDjB,MAAmB,CACjB6B,EAASU,SAASd,EAAMF,OAAS,QAAQ,CAC3C,CAAC,EAEDpB,MAAc,CACZ0B,EAASW,MAAMb,CAAG,EAClBzB,MAAgB2B,EAASY,QAAQ,CAAC,CACpC,CAAC,OAED,CAAA,IAAAC,EAAAC,EAAA,EAAAC,EAA+CjB,EAAG,OAAA,OAAAiB,GAAA,WAAAC,EAAAD,EAAAF,CAAA,EAAHf,EAAGe,EAAAA,CAAA,EAAA,CAAA,CACpD"}