@tanstack/solid-query-devtools 5.107.1 → 5.108.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/dev.cjs +2 -2
- package/build/dev.js +2 -2
- package/build/dev.jsx +2 -2
- package/build/{devtoolsPanel-BC3mLtW8.d.ts → devtoolsPanel-iWIJVAfL.d.ts} +3 -3
- package/build/{devtoolsPanel-BC3mLtW8.d.ts.map → devtoolsPanel-iWIJVAfL.d.ts.map} +1 -1
- package/build/index.d.ts +1 -1
- package/build/production.cjs +1 -1
- package/build/production.d.ts +1 -1
- package/build/production.js +1 -1
- package/build/production.js.map +1 -1
- package/build/production.jsx +2 -2
- package/package.json +4 -4
- package/src/devtools.tsx +2 -2
- package/src/devtoolsPanel.tsx +2 -2
package/build/dev.cjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
let solid_js_web = require("solid-js/web");
|
|
3
|
-
let solid_js = require("solid-js");
|
|
4
|
-
let _tanstack_solid_query = require("@tanstack/solid-query");
|
|
5
3
|
let _tanstack_query_devtools = require("@tanstack/query-devtools");
|
|
4
|
+
let _tanstack_solid_query = require("@tanstack/solid-query");
|
|
5
|
+
let solid_js = require("solid-js");
|
|
6
6
|
// src/devtools.tsx
|
|
7
7
|
var _tmpl$$1 = /*#__PURE__*/ (0, solid_js_web.template)(`<div class=tsqd-parent-container>`);
|
|
8
8
|
/**
|
package/build/dev.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { effect, style, template, use } from "solid-js/web";
|
|
2
|
-
import { createEffect, createMemo, onCleanup, onMount } from "solid-js";
|
|
3
|
-
import { onlineManager, useQueryClient } from "@tanstack/solid-query";
|
|
4
2
|
import { TanstackQueryDevtools, TanstackQueryDevtoolsPanel } from "@tanstack/query-devtools";
|
|
3
|
+
import { onlineManager, useQueryClient } from "@tanstack/solid-query";
|
|
4
|
+
import { createEffect, createMemo, onCleanup, onMount } from "solid-js";
|
|
5
5
|
// src/devtools.tsx
|
|
6
6
|
var _tmpl$$1 = /*#__PURE__*/ template(`<div class=tsqd-parent-container>`);
|
|
7
7
|
/**
|
package/build/dev.jsx
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { createEffect, createMemo, onCleanup, onMount } from "solid-js";
|
|
2
|
-
import { onlineManager, useQueryClient } from "@tanstack/solid-query";
|
|
3
1
|
import { TanstackQueryDevtools, TanstackQueryDevtoolsPanel } from "@tanstack/query-devtools";
|
|
2
|
+
import { onlineManager, useQueryClient } from "@tanstack/solid-query";
|
|
3
|
+
import { createEffect, createMemo, onCleanup, onMount } from "solid-js";
|
|
4
4
|
// src/devtools.tsx
|
|
5
5
|
/**
|
|
6
6
|
* Renders the TanStack Query devtools, with a toggle button that opens them, for the given or
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { JSX as JSX$1 } from "solid-js";
|
|
2
|
-
import { QueryClient } from "@tanstack/solid-query";
|
|
3
1
|
import { DevtoolsButtonPosition, DevtoolsErrorType, DevtoolsPosition, Theme } from "@tanstack/query-devtools";
|
|
2
|
+
import { QueryClient } from "@tanstack/solid-query";
|
|
3
|
+
import { JSX as JSX$1 } from "solid-js";
|
|
4
4
|
interface DevtoolsOptions {
|
|
5
5
|
/**
|
|
6
6
|
* Set this true if you want the dev tools to default to being open
|
|
@@ -103,4 +103,4 @@ interface DevtoolsPanelOptions {
|
|
|
103
103
|
*/
|
|
104
104
|
declare function SolidQueryDevtoolsPanel(props: DevtoolsPanelOptions): JSX$1.Element;
|
|
105
105
|
export { SolidQueryDevtoolsPanel as n, SolidQueryDevtools as r, DevtoolsPanelOptions as t };
|
|
106
|
-
//# sourceMappingURL=devtoolsPanel-
|
|
106
|
+
//# sourceMappingURL=devtoolsPanel-iWIJVAfL.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"devtoolsPanel-
|
|
1
|
+
{"version":3,"file":"devtoolsPanel-iWIJVAfL.d.ts","names":["JSX"],"sources":["../src/devtools.tsx","../src/devtoolsPanel.tsx"],"mappings":";;;UAWU;;;;EAIR;;;;;;EAMA,iBAAiB;;;;;;EAMjB,WAAW;;;;EAIX,SAAS;;;;EAIT,aAAa,MAAM;;;;EAInB;;;;;EAKA,kBAAkB;;;;EAIlB;;;;;;EAMA,QAAQ;;;;;;;;iBASc,mBAAmB,OAAO,qCAAe,IAAA;;;;UCrDhD;;;;EAIf,SAAS;;;;EAIT,aAAa,MAAM;;;;EAInB;;;;;EAKA,kBAAkB;;;;;;;EAQlB,QAAQA,MAAI;;;;EAKZ;;;;EAIA;;;;;;EAMA,QAAQ;;;;;;;iBAQc,wBAAwB,OAAO,uBAAoBA,MAAA"}
|
package/build/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as SolidQueryDevtoolsPanel$1, r as SolidQueryDevtools$1, t as DevtoolsPanelOptions } from "./devtoolsPanel-
|
|
1
|
+
import { n as SolidQueryDevtoolsPanel$1, r as SolidQueryDevtools$1, t as DevtoolsPanelOptions } from "./devtoolsPanel-iWIJVAfL.js";
|
|
2
2
|
export declare const SolidQueryDevtools: typeof SolidQueryDevtools$1;
|
|
3
3
|
export declare const SolidQueryDevtoolsPanel: typeof SolidQueryDevtoolsPanel$1;
|
|
4
4
|
export type { DevtoolsPanelOptions };
|
package/build/production.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});let e=require("solid-js/web"),t=require("
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});let e=require("solid-js/web"),t=require("@tanstack/query-devtools"),n=require("@tanstack/solid-query"),r=require("solid-js");var i=/*#__PURE__*/ (0,e.template)(`<div class=tsqd-parent-container>`);function a(a){let o=(0,n.useQueryClient)(a.client),s=(0,r.createMemo)(()=>o),c,l=new t.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,r.createEffect)(()=>{l.setClient(s())}),(0,r.createEffect)(()=>{let e=a.buttonPosition;e&&l.setButtonPosition(e)}),(0,r.createEffect)(()=>{let e=a.position;e&&l.setPosition(e)}),(0,r.createEffect)(()=>{l.setInitialIsOpen(a.initialIsOpen||!1)}),(0,r.createEffect)(()=>{l.setErrorTypes(a.errorTypes||[])}),(0,r.createEffect)(()=>{l.setTheme(a.theme)}),(0,r.onMount)(()=>{l.mount(c),(0,r.onCleanup)(()=>l.unmount())}),(()=>{var t=i(),n=c;return typeof n==`function`?(0,e.use)(n,t):c=t,t})()}var o=/*#__PURE__*/ (0,e.template)(`<div class=tsqd-parent-container style=height:100%;display:flex;flex-direction:column>`);function s(i){let a=(0,n.useQueryClient)(i.client),s=(0,r.createMemo)(()=>a),c,{errorTypes:l,styleNonce:u,shadowDOMTarget:d,hideDisabledQueries:f}=i,p=new t.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:i.onClose,hideDisabledQueries:f,theme:i.theme});return(0,r.createEffect)(()=>{p.setClient(s())}),(0,r.createEffect)(()=>{p.setOnClose(i.onClose??(()=>{}))}),(0,r.createEffect)(()=>{p.setErrorTypes(i.errorTypes||[])}),(0,r.createEffect)(()=>{p.setTheme(i.theme)}),(0,r.onMount)(()=>{p.mount(c),(0,r.onCleanup)(()=>p.unmount())}),(()=>{var t=o(),n=c;return typeof n==`function`?(0,e.use)(n,t):c=t,(0,e.effect)(n=>(0,e.style)(t,{...i.style},n)),t})()}const c=a,l=s;exports.SolidQueryDevtools=c,exports.SolidQueryDevtoolsPanel=l;
|
package/build/production.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as SolidQueryDevtoolsPanel$1, r as SolidQueryDevtools$1, t as DevtoolsPanelOptions } from "./devtoolsPanel-
|
|
1
|
+
import { n as SolidQueryDevtoolsPanel$1, r as SolidQueryDevtools$1, t as DevtoolsPanelOptions } from "./devtoolsPanel-iWIJVAfL.js";
|
|
2
2
|
export declare const SolidQueryDevtools: typeof SolidQueryDevtools$1;
|
|
3
3
|
export declare const SolidQueryDevtoolsPanel: typeof SolidQueryDevtoolsPanel$1;
|
|
4
4
|
export type { DevtoolsPanelOptions };
|
package/build/production.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{effect as e,style as t,template as n,use as r}from"solid-js/web";import{
|
|
1
|
+
import{effect as e,style as t,template as n,use as r}from"solid-js/web";import{TanstackQueryDevtools as i,TanstackQueryDevtoolsPanel as a}from"@tanstack/query-devtools";import{onlineManager as o,useQueryClient as s}from"@tanstack/solid-query";import{createEffect as c,createMemo as l,onCleanup as u,onMount as d}from"solid-js";var f=/*#__PURE__*/ n(`<div class=tsqd-parent-container>`);function p(e){let t=s(e.client),n=l(()=>t),a,p=new i({client:n(),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 c(()=>{p.setClient(n())}),c(()=>{let t=e.buttonPosition;t&&p.setButtonPosition(t)}),c(()=>{let t=e.position;t&&p.setPosition(t)}),c(()=>{p.setInitialIsOpen(e.initialIsOpen||!1)}),c(()=>{p.setErrorTypes(e.errorTypes||[])}),c(()=>{p.setTheme(e.theme)}),d(()=>{p.mount(a),u(()=>p.unmount())}),(()=>{var e=f(),t=a;return typeof t==`function`?r(t,e):a=e,e})()}var m=/*#__PURE__*/ n(`<div class=tsqd-parent-container style=height:100%;display:flex;flex-direction:column>`);function h(n){let i=s(n.client),f=l(()=>i),p,{errorTypes:h,styleNonce:g,shadowDOMTarget:_,hideDisabledQueries:v}=n,y=new a({client:f(),queryFlavor:`Solid Query`,version:`5`,onlineManager:o,buttonPosition:`bottom-left`,position:`bottom`,initialIsOpen:!0,errorTypes:h,styleNonce:g,shadowDOMTarget:_,onClose:n.onClose,hideDisabledQueries:v,theme:n.theme});return c(()=>{y.setClient(f())}),c(()=>{y.setOnClose(n.onClose??(()=>{}))}),c(()=>{y.setErrorTypes(n.errorTypes||[])}),c(()=>{y.setTheme(n.theme)}),d(()=>{y.mount(p),u(()=>y.unmount())}),(()=>{var i=m(),a=p;return typeof a==`function`?r(a,i):p=i,e(e=>t(i,{...n.style},e)),i})()}const g=p,_=h;export{g as SolidQueryDevtools,_ as SolidQueryDevtoolsPanel};
|
|
2
2
|
//# sourceMappingURL=production.js.map
|
package/build/production.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"production.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","_tmpl$","SolidQueryDevtools","_$use","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","SolidQueryDevtoolsPanel","_$use","_$style","SolidQueryDevtoolsComp","SolidQueryDevtoolsCompPanel","SolidQueryDevtools","SolidQueryDevtoolsPanel","DevtoolsPanelOptions","SolidQueryDevtoolsComp","SolidQueryDevtoolsCompPanel","_tmpl$$1","SolidQueryDevtools$1","queryClient","useQueryClient","props","client","createMemo","ref","devtools","TanstackQueryDevtools","createEffect","buttonPos","pos","onMount","onCleanup","_el$","_ref$","use","_tmpl$","SolidQueryDevtoolsPanel$1","TanstackQueryDevtoolsPanel","effect","style","_$p","SolidQueryDevtools","SolidQueryDevtoolsPanel"],"sources":["../src/devtools.tsx","../src/devtoolsPanel.tsx","../src/production.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","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: '100%', display: 'flex', 'flex-direction': 'column' }\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={{\n height: '100%',\n display: 'flex',\n 'flex-direction': 'column',\n ...props.style,\n }}\n class=\"tsqd-parent-container\"\n ref={ref}\n />\n )\n}\n","import SolidQueryDevtoolsComp from './devtools'\nimport SolidQueryDevtoolsCompPanel from './devtoolsPanel'\n\nexport const SolidQueryDevtools = SolidQueryDevtoolsComp\nexport const SolidQueryDevtoolsPanel = SolidQueryDevtoolsCompPanel\n\nexport type { DevtoolsPanelOptions } from './devtoolsPanel'\n"],"mappings":"A,kYA+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,gHC5DA,SAAwB8B,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,EASShB,EAFJ,OAEO,OAAAgB,GAAA,WAAAC,EAAAD,EAAAF,CAAA,EAAHd,EAAGc,EAAAI,EAAAC,GAAAC,EAAAN,EAPD,CAIL,GAAGhB,EAAMN,KACX,EAAC2B,CAAA,CAAA,EAAAL,CAAA,EAAA,CAAA,CAKP,CC3GA,MAAaY,EAAqBF,EACrBG,EAA0BF,E"}
|
|
1
|
+
{"version":3,"file":"production.js","names":["TanstackQueryDevtools","onlineManager","useQueryClient","createEffect","createMemo","onCleanup","onMount","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","_tmpl$","SolidQueryDevtools","_$use","TanstackQueryDevtoolsPanel","onlineManager","useQueryClient","createEffect","createMemo","onCleanup","onMount","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","SolidQueryDevtoolsPanel","_$use","_$style","SolidQueryDevtoolsComp","SolidQueryDevtoolsCompPanel","SolidQueryDevtools","SolidQueryDevtoolsPanel","DevtoolsPanelOptions","SolidQueryDevtoolsComp","SolidQueryDevtoolsCompPanel","_tmpl$$1","SolidQueryDevtools$1","queryClient","useQueryClient","props","client","createMemo","ref","devtools","TanstackQueryDevtools","createEffect","buttonPos","pos","onMount","onCleanup","_el$","_ref$","use","_tmpl$","SolidQueryDevtoolsPanel$1","TanstackQueryDevtoolsPanel","effect","style","_$p","SolidQueryDevtools","SolidQueryDevtoolsPanel"],"sources":["../src/devtools.tsx","../src/devtoolsPanel.tsx","../src/production.tsx"],"sourcesContent":["import { TanstackQueryDevtools } from '@tanstack/query-devtools'\nimport { onlineManager, useQueryClient } from '@tanstack/solid-query'\nimport { createEffect, createMemo, onCleanup, onMount } from 'solid-js'\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","import { TanstackQueryDevtoolsPanel } from '@tanstack/query-devtools'\nimport { onlineManager, useQueryClient } from '@tanstack/solid-query'\nimport { createEffect, createMemo, onCleanup, onMount } from 'solid-js'\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: '100%', display: 'flex', 'flex-direction': 'column' }\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={{\n height: '100%',\n display: 'flex',\n 'flex-direction': 'column',\n ...props.style,\n }}\n class=\"tsqd-parent-container\"\n ref={ref}\n />\n )\n}\n","import SolidQueryDevtoolsComp from './devtools'\nimport SolidQueryDevtoolsCompPanel from './devtoolsPanel'\n\nexport const SolidQueryDevtools = SolidQueryDevtoolsComp\nexport const SolidQueryDevtoolsPanel = SolidQueryDevtoolsCompPanel\n\nexport type { DevtoolsPanelOptions } from './devtoolsPanel'\n"],"mappings":"A,kYA+DA,SAAwBwB,EAAmBC,EAAwB,CACjE,IAAMC,EAAcxB,EAAeuB,EAAMT,MAAM,EACzCA,EAASZ,MAAiBsB,CAAW,EACvCC,EACEE,EAAW,IAAI7B,EAAsB,CACzCgB,OAAQA,EAAO,EACfc,YAAa,cACbC,QAAS,IACT9B,gBACAa,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,OAnCApB,MAAmB,CACjB0B,EAASG,UAAUhB,EAAO,CAAC,CAC7B,CAAC,EAEDb,MAAmB,CACjB,IAAM8B,EAAYR,EAAMX,eACpBmB,GACFJ,EAASK,kBAAkBD,CAAS,CAExC,CAAC,EAED9B,MAAmB,CACjB,IAAMgC,EAAMV,EAAMV,SACdoB,GACFN,EAASO,YAAYD,CAAG,CAE5B,CAAC,EAEDhC,MAAmB,CACjB0B,EAASQ,iBAAiBZ,EAAMZ,eAAiB,EAAK,CACxD,CAAC,EAEDV,MAAmB,CACjB0B,EAASS,cAAcb,EAAMR,YAAc,CAAA,CAAE,CAC/C,CAAC,EAEDd,MAAmB,CACjB0B,EAASU,SAASd,EAAMF,KAAK,CAC/B,CAAC,EAEDjB,MAAc,CACZuB,EAASW,MAAMb,CAAG,EAClBtB,MAAgBwB,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,gHC5DA,SAAwB8B,EAAwBC,EAA6B,CAC3E,IAAMC,EAAcvB,EAAesB,EAAMZ,MAAM,EACzCA,EAASR,MAAiBqB,CAAW,EACvCC,EACE,CAAEb,aAAYE,aAAYC,kBAAiBK,uBAAwBG,EACnEI,EAAW,IAAI5B,EAA2B,CAC9CY,OAAQA,EAAO,EACfiB,YAAa,cACbC,QAAS,IACT7B,gBACA8B,eAAgB,cAChBC,SAAU,SACVC,cAAe,GACfpB,aACAE,aACAC,kBACAI,QAASI,EAAMJ,QACfC,sBACAC,MAAOE,EAAMF,KACf,CAAC,EAqBD,OApBAnB,MAAmB,CACjByB,EAASM,UAAUtB,EAAO,CAAC,CAC7B,CAAC,EACDT,MAAmB,CACjByB,EAASO,WAAWX,EAAMJ,cAAkB,CAAC,EAAE,CACjD,CAAC,EAEDjB,MAAmB,CACjByB,EAASQ,cAAcZ,EAAMX,YAAc,CAAA,CAAE,CAC/C,CAAC,EAEDV,MAAmB,CACjByB,EAASS,SAASb,EAAMF,KAAK,CAC/B,CAAC,EAEDhB,MAAc,CACZsB,EAASU,MAAMZ,CAAG,EAClBrB,MAAgBuB,EAASW,QAAQ,CAAC,CACpC,CAAC,OAED,CAAA,IAAAC,EAAAC,EAAA,EAAAC,EASShB,EAFJ,OAEO,OAAAgB,GAAA,WAAAC,EAAAD,EAAAF,CAAA,EAAHd,EAAGc,EAAAI,EAAAC,GAAAC,EAAAN,EAPD,CAIL,GAAGhB,EAAMN,KACX,EAAC2B,CAAA,CAAA,EAAAL,CAAA,EAAA,CAAA,CAKP,CC3GA,MAAaY,EAAqBF,EACrBG,EAA0BF,E"}
|
package/build/production.jsx
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { createEffect, createMemo, onCleanup, onMount } from "solid-js";
|
|
2
|
-
import { onlineManager, useQueryClient } from "@tanstack/solid-query";
|
|
3
1
|
import { TanstackQueryDevtools, TanstackQueryDevtoolsPanel } from "@tanstack/query-devtools";
|
|
2
|
+
import { onlineManager, useQueryClient } from "@tanstack/solid-query";
|
|
3
|
+
import { createEffect, createMemo, onCleanup, onMount } from "solid-js";
|
|
4
4
|
// src/devtools.tsx
|
|
5
5
|
/**
|
|
6
6
|
* Renders the TanStack Query devtools, with a toggle button that opens them, for the given or
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tanstack/solid-query-devtools",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.108.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",
|
|
@@ -57,11 +57,11 @@
|
|
|
57
57
|
"!src/__tests__"
|
|
58
58
|
],
|
|
59
59
|
"dependencies": {
|
|
60
|
-
"@tanstack/query-devtools": "5.
|
|
60
|
+
"@tanstack/query-devtools": "5.108.0"
|
|
61
61
|
},
|
|
62
62
|
"devDependencies": {
|
|
63
63
|
"@solidjs/testing-library": "^0.8.10",
|
|
64
|
-
"@tanstack/solid-query": "5.
|
|
64
|
+
"@tanstack/solid-query": "5.108.0",
|
|
65
65
|
"eslint-plugin-solid": "^0.18.1",
|
|
66
66
|
"solid-js": "^1.9.18",
|
|
67
67
|
"typescript": "6.0.3",
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
"vite-plugin-solid": "^2.11.15"
|
|
70
70
|
},
|
|
71
71
|
"peerDependencies": {
|
|
72
|
-
"@tanstack/solid-query": "^5.
|
|
72
|
+
"@tanstack/solid-query": "^5.108.0",
|
|
73
73
|
"solid-js": "^1.6.0"
|
|
74
74
|
},
|
|
75
75
|
"scripts": {
|
package/src/devtools.tsx
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { createEffect, createMemo, onCleanup, onMount } from 'solid-js'
|
|
2
|
-
import { onlineManager, useQueryClient } from '@tanstack/solid-query'
|
|
3
1
|
import { TanstackQueryDevtools } from '@tanstack/query-devtools'
|
|
2
|
+
import { onlineManager, useQueryClient } from '@tanstack/solid-query'
|
|
3
|
+
import { createEffect, createMemo, onCleanup, onMount } from 'solid-js'
|
|
4
4
|
import type {
|
|
5
5
|
DevtoolsButtonPosition,
|
|
6
6
|
DevtoolsErrorType,
|
package/src/devtoolsPanel.tsx
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { createEffect, createMemo, onCleanup, onMount } from 'solid-js'
|
|
2
|
-
import { onlineManager, useQueryClient } from '@tanstack/solid-query'
|
|
3
1
|
import { TanstackQueryDevtoolsPanel } from '@tanstack/query-devtools'
|
|
2
|
+
import { onlineManager, useQueryClient } from '@tanstack/solid-query'
|
|
3
|
+
import { createEffect, createMemo, onCleanup, onMount } from 'solid-js'
|
|
4
4
|
import type { DevtoolsErrorType, Theme } from '@tanstack/query-devtools'
|
|
5
5
|
import type { QueryClient } from '@tanstack/solid-query'
|
|
6
6
|
import type { JSX } from 'solid-js'
|