@tanstack/solid-query-devtools 5.103.2 → 5.104.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/devtools-BjMCcqlJ.cjs +1 -0
- package/build/devtools-CEvVAp2X.js +2 -0
- package/build/devtools-CEvVAp2X.js.map +1 -0
- package/build/devtoolsPanel-BE7EI8NW.cjs +1 -0
- package/build/devtoolsPanel-glpBZk1i.js +2 -0
- package/build/devtoolsPanel-glpBZk1i.js.map +1 -0
- package/build/index.cjs +1 -1
- package/build/index.d.cts +6 -6
- package/build/index.d.cts.map +1 -1
- package/build/index.d.ts +6 -6
- package/build/index.d.ts.map +1 -1
- package/build/index.js +1 -1
- package/build/index.js.map +1 -1
- package/package.json +8 -8
- package/build/devtools-ZLm3XMpi.js +0 -2
- package/build/devtools-ZLm3XMpi.js.map +0 -1
- package/build/devtools-g4uuc_il.cjs +0 -1
- package/build/devtoolsPanel-BrOMNzf2.cjs +0 -1
- package/build/devtoolsPanel-GNd-i8LJ.js +0 -2
- package/build/devtoolsPanel-GNd-i8LJ.js.map +0 -1
|
@@ -0,0 +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;
|
|
@@ -0,0 +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
|
|
@@ -0,0 +1 @@
|
|
|
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 *\n * @defaultValue bottom-right\n */\n buttonPosition?: DevtoolsButtonPosition\n /**\n * The position of the Solid Query devtools panel.\n * 'top' | 'bottom' | 'left' | 'right'\n *\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 so you can attach the devtool's styles to specific element in the 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 *\n * @defaultValue system\n */\n theme?: Theme\n}\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}></div>\n}\n"],"mappings":"2UA0DA,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"}
|
|
@@ -0,0 +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;
|
|
@@ -0,0 +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
|
|
@@ -0,0 +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\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 so you can attach the devtool's styles to specific element in the 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 *\n * @defaultValue system\n */\n theme?: Theme\n}\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":"0XAiDA,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"}
|
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-
|
|
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;
|
package/build/index.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DevtoolsButtonPosition, DevtoolsErrorType, DevtoolsPosition, Theme } from "@tanstack/query-devtools";
|
|
2
2
|
import { QueryClient } from "@tanstack/solid-query";
|
|
3
|
-
import { JSX } from "solid-js";
|
|
3
|
+
import { JSX as JSX$1 } from "solid-js";
|
|
4
4
|
//#region src/devtools.d.ts
|
|
5
5
|
interface DevtoolsOptions {
|
|
6
6
|
/**
|
|
@@ -74,7 +74,7 @@ interface DevtoolsPanelOptions {
|
|
|
74
74
|
* @example { height: '100%' }
|
|
75
75
|
* @example { height: '100%', width: '100%' }
|
|
76
76
|
*/
|
|
77
|
-
style?: JSX.CSSProperties;
|
|
77
|
+
style?: JSX$1.CSSProperties;
|
|
78
78
|
/**
|
|
79
79
|
* Callback function that is called when the devtools panel is closed
|
|
80
80
|
*/
|
|
@@ -90,11 +90,11 @@ interface DevtoolsPanelOptions {
|
|
|
90
90
|
*/
|
|
91
91
|
theme?: Theme;
|
|
92
92
|
}
|
|
93
|
-
declare function SolidQueryDevtoolsPanel$1(props: DevtoolsPanelOptions): JSX.Element;
|
|
93
|
+
declare function SolidQueryDevtoolsPanel$1(props: DevtoolsPanelOptions): JSX$1.Element;
|
|
94
94
|
//#endregion
|
|
95
95
|
//#region src/index.d.ts
|
|
96
|
-
declare const SolidQueryDevtools: typeof SolidQueryDevtools$1;
|
|
97
|
-
declare const SolidQueryDevtoolsPanel: typeof SolidQueryDevtoolsPanel$1;
|
|
96
|
+
export declare const SolidQueryDevtools: typeof SolidQueryDevtools$1;
|
|
97
|
+
export declare const SolidQueryDevtoolsPanel: typeof SolidQueryDevtoolsPanel$1;
|
|
98
98
|
//#endregion
|
|
99
|
-
export {
|
|
99
|
+
export type { DevtoolsPanelOptions };
|
|
100
100
|
//# sourceMappingURL=index.d.cts.map
|
package/build/index.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/devtools.tsx","../src/devtoolsPanel.tsx","../src/index.tsx"],"mappings":";;;;UAWU;;;;EAIR;;;;;;;EAOA,iBAAiB;;;;;;;EAOjB,WAAW;;;;EAIX,SAAS;;;;EAIT,aAAa,MAAM;;;;EAInB;;;;EAIA,kBAAkB;;;;EAIlB;;;;;;EAMA,QAAQ;;
|
|
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;;;;;;;EAOA,iBAAiB;;;;;;;EAOjB,WAAW;;;;EAIX,SAAS;;;;EAIT,aAAa,MAAM;;;;EAInB;;;;EAIA,kBAAkB;;;;EAIlB;;;;;;EAMA,QAAQ;;iBAGcA,qBAAmB,OAAO,qCAAe,IAAA;;;UCnDhD;;;;EAIf,SAAS;;;;EAIT,aAAa,MAAM;;;;EAInB;;;;EAIA,kBAAkB;;;;;;;EAQlB,QAAQC,MAAI;;;;EAKZ;;;;EAIA;;;;;;EAMA,QAAQ;;iBAGcC,0BAAwB,OAAO,uBAAoBD,MAAA;;;qBC5C9D,2BAA2BE;qBAM3B,gCAAgCC"}
|
package/build/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { JSX } from "solid-js";
|
|
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
4
|
//#region src/devtools.d.ts
|
|
@@ -74,7 +74,7 @@ interface DevtoolsPanelOptions {
|
|
|
74
74
|
* @example { height: '100%' }
|
|
75
75
|
* @example { height: '100%', width: '100%' }
|
|
76
76
|
*/
|
|
77
|
-
style?: JSX.CSSProperties;
|
|
77
|
+
style?: JSX$1.CSSProperties;
|
|
78
78
|
/**
|
|
79
79
|
* Callback function that is called when the devtools panel is closed
|
|
80
80
|
*/
|
|
@@ -90,11 +90,11 @@ interface DevtoolsPanelOptions {
|
|
|
90
90
|
*/
|
|
91
91
|
theme?: Theme;
|
|
92
92
|
}
|
|
93
|
-
declare function SolidQueryDevtoolsPanel$1(props: DevtoolsPanelOptions): JSX.Element;
|
|
93
|
+
declare function SolidQueryDevtoolsPanel$1(props: DevtoolsPanelOptions): JSX$1.Element;
|
|
94
94
|
//#endregion
|
|
95
95
|
//#region src/index.d.ts
|
|
96
|
-
declare const SolidQueryDevtools: typeof SolidQueryDevtools$1;
|
|
97
|
-
declare const SolidQueryDevtoolsPanel: typeof SolidQueryDevtoolsPanel$1;
|
|
96
|
+
export declare const SolidQueryDevtools: typeof SolidQueryDevtools$1;
|
|
97
|
+
export declare const SolidQueryDevtoolsPanel: typeof SolidQueryDevtoolsPanel$1;
|
|
98
98
|
//#endregion
|
|
99
|
-
export {
|
|
99
|
+
export type { DevtoolsPanelOptions };
|
|
100
100
|
//# sourceMappingURL=index.d.ts.map
|
package/build/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/devtools.tsx","../src/devtoolsPanel.tsx","../src/index.tsx"],"mappings":";;;;UAWU;;;;EAIR;;;;;;;EAOA,iBAAiB;;;;;;;EAOjB,WAAW;;;;EAIX,SAAS;;;;EAIT,aAAa,MAAM;;;;EAInB;;;;EAIA,kBAAkB;;;;EAIlB;;;;;;EAMA,QAAQ;;
|
|
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;;;;;;;EAOA,iBAAiB;;;;;;;EAOjB,WAAW;;;;EAIX,SAAS;;;;EAIT,aAAa,MAAM;;;;EAInB;;;;EAIA,kBAAkB;;;;EAIlB;;;;;;EAMA,QAAQ;;iBAGcA,qBAAmB,OAAO,qCAAe,IAAA;;;UCnDhD;;;;EAIf,SAAS;;;;EAIT,aAAa,MAAM;;;;EAInB;;;;EAIA,kBAAkB;;;;;;;EAQlB,QAAQC,MAAI;;;;EAKZ;;;;EAIA;;;;;;EAMA,QAAQ;;iBAGcC,0BAAwB,OAAO,uBAAoBD,MAAA;;;qBC5C9D,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-
|
|
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};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/build/index.js.map
CHANGED
|
@@ -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"],"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 This allows the devtools to be loaded only on the client and bypasses any server side rendering\n https://github.com/solidjs/solid-start/blob/2967fc2db3f0df826f061020231dbdafdfa0746b/packages/start/islands/clientOnly.tsx\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":"uKAgBA,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,CCrCA,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 This allows the devtools to be loaded only on the client and bypasses any server side rendering\n https://github.com/solidjs/solid-start/blob/2967fc2db3f0df826f061020231dbdafdfa0746b/packages/start/islands/clientOnly.tsx\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":"uKAgBA,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,CCrCA,MAAae,EAAoDJ,EAC7DC,MAAiB,OAAO,yBAAa,EACrC,UAAY,CACV,OAAO,IACT,EAESI,EAA8DL,EACvEC,MAAiB,OAAO,8BAAkB,EAC1C,UAAY,CACV,OAAO,IACT"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tanstack/solid-query-devtools",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.104.0",
|
|
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,19 +44,19 @@
|
|
|
44
44
|
"!src/__tests__"
|
|
45
45
|
],
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@tanstack/query-devtools": "5.
|
|
47
|
+
"@tanstack/query-devtools": "5.104.0"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
50
|
"@solidjs/testing-library": "^0.8.10",
|
|
51
|
-
"
|
|
52
|
-
"
|
|
51
|
+
"@tanstack/solid-query": "5.104.0",
|
|
52
|
+
"npm-run-all2": "^9.0.3",
|
|
53
|
+
"solid-js": "^1.9.15",
|
|
53
54
|
"unplugin-solid": "^2.0.0",
|
|
54
|
-
"vite-plugin-solid": "^2.11.
|
|
55
|
-
"@tanstack/solid-query": "5.103.2"
|
|
55
|
+
"vite-plugin-solid": "^2.11.14"
|
|
56
56
|
},
|
|
57
57
|
"peerDependencies": {
|
|
58
|
-
"solid-
|
|
59
|
-
"
|
|
58
|
+
"@tanstack/solid-query": "^5.104.0",
|
|
59
|
+
"solid-js": "^1.6.0"
|
|
60
60
|
},
|
|
61
61
|
"scripts": {
|
|
62
62
|
"clean": "premove ./build ./coverage ./dist-ts ./.cache/test-types",
|
|
@@ -1,2 +0,0 @@
|
|
|
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=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-ZLm3XMpi.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"devtools-ZLm3XMpi.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"],"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 *\n * @defaultValue bottom-right\n */\n buttonPosition?: DevtoolsButtonPosition\n /**\n * The position of the Solid Query devtools panel.\n * 'top' | 'bottom' | 'left' | 'right'\n *\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 so you can attach the devtool's styles to specific element in the 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 *\n * @defaultValue system\n */\n theme?: Theme\n}\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}></div>\n}\n"],"mappings":"6TA0DA,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"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
let e=require("solid-js/web"),t=require("solid-js"),n=require("@tanstack/solid-query"),r=require("@tanstack/query-devtools");var i=(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 +0,0 @@
|
|
|
1
|
-
let e=require("solid-js/web"),t=require("solid-js"),n=require("@tanstack/solid-query"),r=require("@tanstack/query-devtools");var i=(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,2 +0,0 @@
|
|
|
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=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-GNd-i8LJ.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"devtoolsPanel-GNd-i8LJ.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"],"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\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 so you can attach the devtool's styles to specific element in the 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 *\n * @defaultValue system\n */\n theme?: Theme\n}\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":"4WAiDA,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"}
|