@tanstack/solid-query-devtools 5.108.1 → 5.108.3

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
@@ -24,8 +24,8 @@ function SolidQueryDevtools$1(props) {
24
24
  position: props.position,
25
25
  initialIsOpen: props.initialIsOpen,
26
26
  errorTypes: props.errorTypes,
27
- styleNonce: props.styleNonce,
28
27
  shadowDOMTarget: props.shadowDOMTarget,
28
+ trustedTypesPolicy: props.trustedTypesPolicy,
29
29
  hideDisabledQueries: props.hideDisabledQueries,
30
30
  theme: props.theme
31
31
  });
@@ -71,7 +71,7 @@ function SolidQueryDevtoolsPanel$1(props) {
71
71
  const queryClient = (0, _tanstack_solid_query.useQueryClient)(props.client);
72
72
  const client = (0, solid_js.createMemo)(() => queryClient);
73
73
  let ref;
74
- const { errorTypes, styleNonce, shadowDOMTarget, hideDisabledQueries } = props;
74
+ const { errorTypes, shadowDOMTarget, trustedTypesPolicy, hideDisabledQueries } = props;
75
75
  const devtools = new _tanstack_query_devtools.TanstackQueryDevtoolsPanel({
76
76
  client: client(),
77
77
  queryFlavor: "Solid Query",
@@ -81,8 +81,8 @@ function SolidQueryDevtoolsPanel$1(props) {
81
81
  position: "bottom",
82
82
  initialIsOpen: true,
83
83
  errorTypes,
84
- styleNonce,
85
84
  shadowDOMTarget,
85
+ trustedTypesPolicy,
86
86
  onClose: props.onClose,
87
87
  hideDisabledQueries,
88
88
  theme: props.theme
package/build/dev.js CHANGED
@@ -23,8 +23,8 @@ function SolidQueryDevtools$1(props) {
23
23
  position: props.position,
24
24
  initialIsOpen: props.initialIsOpen,
25
25
  errorTypes: props.errorTypes,
26
- styleNonce: props.styleNonce,
27
26
  shadowDOMTarget: props.shadowDOMTarget,
27
+ trustedTypesPolicy: props.trustedTypesPolicy,
28
28
  hideDisabledQueries: props.hideDisabledQueries,
29
29
  theme: props.theme
30
30
  });
@@ -70,7 +70,7 @@ function SolidQueryDevtoolsPanel$1(props) {
70
70
  const queryClient = useQueryClient(props.client);
71
71
  const client = createMemo(() => queryClient);
72
72
  let ref;
73
- const { errorTypes, styleNonce, shadowDOMTarget, hideDisabledQueries } = props;
73
+ const { errorTypes, shadowDOMTarget, trustedTypesPolicy, hideDisabledQueries } = props;
74
74
  const devtools = new TanstackQueryDevtoolsPanel({
75
75
  client: client(),
76
76
  queryFlavor: "Solid Query",
@@ -80,8 +80,8 @@ function SolidQueryDevtoolsPanel$1(props) {
80
80
  position: "bottom",
81
81
  initialIsOpen: true,
82
82
  errorTypes,
83
- styleNonce,
84
83
  shadowDOMTarget,
84
+ trustedTypesPolicy,
85
85
  onClose: props.onClose,
86
86
  hideDisabledQueries,
87
87
  theme: props.theme
package/build/dev.jsx CHANGED
@@ -21,8 +21,8 @@ function SolidQueryDevtools$1(props) {
21
21
  position: props.position,
22
22
  initialIsOpen: props.initialIsOpen,
23
23
  errorTypes: props.errorTypes,
24
- styleNonce: props.styleNonce,
25
24
  shadowDOMTarget: props.shadowDOMTarget,
25
+ trustedTypesPolicy: props.trustedTypesPolicy,
26
26
  hideDisabledQueries: props.hideDisabledQueries,
27
27
  theme: props.theme
28
28
  });
@@ -62,7 +62,7 @@ function SolidQueryDevtoolsPanel$1(props) {
62
62
  const queryClient = useQueryClient(props.client);
63
63
  const client = createMemo(() => queryClient);
64
64
  let ref;
65
- const { errorTypes, styleNonce, shadowDOMTarget, hideDisabledQueries } = props;
65
+ const { errorTypes, shadowDOMTarget, trustedTypesPolicy, hideDisabledQueries } = props;
66
66
  const devtools = new TanstackQueryDevtoolsPanel({
67
67
  client: client(),
68
68
  queryFlavor: "Solid Query",
@@ -72,8 +72,8 @@ function SolidQueryDevtoolsPanel$1(props) {
72
72
  position: "bottom",
73
73
  initialIsOpen: true,
74
74
  errorTypes,
75
- styleNonce,
76
75
  shadowDOMTarget,
76
+ trustedTypesPolicy,
77
77
  onClose: props.onClose,
78
78
  hideDisabledQueries,
79
79
  theme: props.theme
@@ -27,14 +27,24 @@ interface DevtoolsOptions {
27
27
  */
28
28
  errorTypes?: Array<DevtoolsErrorType>;
29
29
  /**
30
- * 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.
30
+ * @deprecated The devtools no longer add a `<style>` element, so they need no
31
+ * nonce. This option does nothing.
31
32
  */
32
33
  styleNonce?: string;
33
34
  /**
34
- * Use this to pass a shadow DOM target to the devtools so that the styles will be applied
35
- * within the shadow DOM instead of within the head tag in the light DOM.
35
+ * The shadow root to add the devtools styles to. By default, the styles are
36
+ * added to the shadow root the devtools render in, or to the document when
37
+ * they do not render in a shadow root.
36
38
  */
37
39
  shadowDOMTarget?: ShadowRoot;
40
+ /**
41
+ * The Trusted Types policy the devtools use to create their HTML templates.
42
+ * Pass one when your page enforces `require-trusted-types-for 'script'`.
43
+ * The devtools only pass it their own markup.
44
+ */
45
+ trustedTypesPolicy?: {
46
+ createHTML: (html: string) => unknown;
47
+ };
38
48
  /**
39
49
  * Set this to true to hide disabled queries from the devtools panel.
40
50
  */
@@ -66,14 +76,24 @@ interface DevtoolsPanelOptions {
66
76
  */
67
77
  errorTypes?: Array<DevtoolsErrorType>;
68
78
  /**
69
- * 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.
79
+ * @deprecated The devtools no longer add a `<style>` element, so they need no
80
+ * nonce. This option does nothing.
70
81
  */
71
82
  styleNonce?: string;
72
83
  /**
73
- * Use this to pass a shadow DOM target to the devtools so that the styles will be applied
74
- * within the shadow DOM instead of within the head tag in the light DOM.
84
+ * The shadow root to add the devtools styles to. By default, the styles are
85
+ * added to the shadow root the devtools render in, or to the document when
86
+ * they do not render in a shadow root.
75
87
  */
76
88
  shadowDOMTarget?: ShadowRoot;
89
+ /**
90
+ * The Trusted Types policy the devtools use to create their HTML templates.
91
+ * Pass one when your page enforces `require-trusted-types-for 'script'`.
92
+ * The devtools only pass it their own markup.
93
+ */
94
+ trustedTypesPolicy?: {
95
+ createHTML: (html: string) => unknown;
96
+ };
77
97
  /**
78
98
  * Custom styles for the devtools panel
79
99
  * @default { height: '100%', display: 'flex', 'flex-direction': 'column' }
@@ -103,4 +123,4 @@ interface DevtoolsPanelOptions {
103
123
  */
104
124
  declare function SolidQueryDevtoolsPanel(props: DevtoolsPanelOptions): JSX$1.Element;
105
125
  export { SolidQueryDevtoolsPanel as n, SolidQueryDevtools as r, DevtoolsPanelOptions as t };
106
- //# sourceMappingURL=devtoolsPanel-iWIJVAfL.d.ts.map
126
+ //# sourceMappingURL=devtoolsPanel-Bdv26Okq.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"devtoolsPanel-Bdv26Okq.d.cts","names":["JSX"],"sources":["../src/devtools.tsx","../src/devtoolsPanel.tsx"],"mappings":";;;UAWU;;;;EAIR;;;;;;EAMA,iBAAiB;;;;;;EAMjB,WAAW;;;;EAIX,SAAS;;;;EAIT,aAAa,MAAM;;;;;EAKnB;;;;;;EAMA,kBAAkB;;;;;;EAMlB;IAAuB,aAAa;;;;;EAIpC;;;;;;EAMA,QAAQ;;;;;;;;iBASc,mBAAmB,OAAO,qCAAe,IAAA;;;;UC7DhD;;;;EAIf,SAAS;;;;EAIT,aAAa,MAAM;;;;;EAKnB;;;;;;EAMA,kBAAkB;;;;;;EAMlB;IAAuB,aAAa;;;;;;;;EAQpC,QAAQA,MAAI;;;;EAKZ;;;;EAIA;;;;;;EAMA,QAAQ;;;;;;;iBAQc,wBAAwB,OAAO,uBAAoBA,MAAA"}
@@ -27,14 +27,24 @@ interface DevtoolsOptions {
27
27
  */
28
28
  errorTypes?: Array<DevtoolsErrorType>;
29
29
  /**
30
- * 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.
30
+ * @deprecated The devtools no longer add a `<style>` element, so they need no
31
+ * nonce. This option does nothing.
31
32
  */
32
33
  styleNonce?: string;
33
34
  /**
34
- * Use this to pass a shadow DOM target to the devtools so that the styles will be applied
35
- * within the shadow DOM instead of within the head tag in the light DOM.
35
+ * The shadow root to add the devtools styles to. By default, the styles are
36
+ * added to the shadow root the devtools render in, or to the document when
37
+ * they do not render in a shadow root.
36
38
  */
37
39
  shadowDOMTarget?: ShadowRoot;
40
+ /**
41
+ * The Trusted Types policy the devtools use to create their HTML templates.
42
+ * Pass one when your page enforces `require-trusted-types-for 'script'`.
43
+ * The devtools only pass it their own markup.
44
+ */
45
+ trustedTypesPolicy?: {
46
+ createHTML: (html: string) => unknown;
47
+ };
38
48
  /**
39
49
  * Set this to true to hide disabled queries from the devtools panel.
40
50
  */
@@ -66,14 +76,24 @@ interface DevtoolsPanelOptions {
66
76
  */
67
77
  errorTypes?: Array<DevtoolsErrorType>;
68
78
  /**
69
- * 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.
79
+ * @deprecated The devtools no longer add a `<style>` element, so they need no
80
+ * nonce. This option does nothing.
70
81
  */
71
82
  styleNonce?: string;
72
83
  /**
73
- * Use this to pass a shadow DOM target to the devtools so that the styles will be applied
74
- * within the shadow DOM instead of within the head tag in the light DOM.
84
+ * The shadow root to add the devtools styles to. By default, the styles are
85
+ * added to the shadow root the devtools render in, or to the document when
86
+ * they do not render in a shadow root.
75
87
  */
76
88
  shadowDOMTarget?: ShadowRoot;
89
+ /**
90
+ * The Trusted Types policy the devtools use to create their HTML templates.
91
+ * Pass one when your page enforces `require-trusted-types-for 'script'`.
92
+ * The devtools only pass it their own markup.
93
+ */
94
+ trustedTypesPolicy?: {
95
+ createHTML: (html: string) => unknown;
96
+ };
77
97
  /**
78
98
  * Custom styles for the devtools panel
79
99
  * @default { height: '100%', display: 'flex', 'flex-direction': 'column' }
@@ -103,4 +123,4 @@ interface DevtoolsPanelOptions {
103
123
  */
104
124
  declare function SolidQueryDevtoolsPanel(props: DevtoolsPanelOptions): JSX$1.Element;
105
125
  export { SolidQueryDevtoolsPanel as n, SolidQueryDevtools as r, DevtoolsPanelOptions as t };
106
- //# sourceMappingURL=devtoolsPanel-iWIJVAfL.d.cts.map
126
+ //# sourceMappingURL=devtoolsPanel-Bdv26Okq.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"devtoolsPanel-Bdv26Okq.d.ts","names":["JSX"],"sources":["../src/devtools.tsx","../src/devtoolsPanel.tsx"],"mappings":";;;UAWU;;;;EAIR;;;;;;EAMA,iBAAiB;;;;;;EAMjB,WAAW;;;;EAIX,SAAS;;;;EAIT,aAAa,MAAM;;;;;EAKnB;;;;;;EAMA,kBAAkB;;;;;;EAMlB;IAAuB,aAAa;;;;;EAIpC;;;;;;EAMA,QAAQ;;;;;;;;iBASc,mBAAmB,OAAO,qCAAe,IAAA;;;;UC7DhD;;;;EAIf,SAAS;;;;EAIT,aAAa,MAAM;;;;;EAKnB;;;;;;EAMA,kBAAkB;;;;;;EAMlB;IAAuB,aAAa;;;;;;;;EAQpC,QAAQA,MAAI;;;;EAKZ;;;;EAIA;;;;;;EAMA,QAAQ;;;;;;;iBAQc,wBAAwB,OAAO,uBAAoBA,MAAA"}
package/build/index.d.cts CHANGED
@@ -1,4 +1,4 @@
1
- import { n as SolidQueryDevtoolsPanel$1, r as SolidQueryDevtools$1, t as DevtoolsPanelOptions } from "./devtoolsPanel-iWIJVAfL.cjs";
1
+ import { n as SolidQueryDevtoolsPanel$1, r as SolidQueryDevtools$1, t as DevtoolsPanelOptions } from "./devtoolsPanel-Bdv26Okq.cjs";
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/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { n as SolidQueryDevtoolsPanel$1, r as SolidQueryDevtools$1, t as DevtoolsPanelOptions } from "./devtoolsPanel-iWIJVAfL.js";
1
+ import { n as SolidQueryDevtoolsPanel$1, r as SolidQueryDevtools$1, t as DevtoolsPanelOptions } from "./devtoolsPanel-Bdv26Okq.js";
2
2
  export declare const SolidQueryDevtools: typeof SolidQueryDevtools$1;
3
3
  export declare const SolidQueryDevtoolsPanel: typeof SolidQueryDevtoolsPanel$1;
4
4
  export type { DevtoolsPanelOptions };
@@ -1 +1 @@
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;
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,shadowDOMTarget:a.shadowDOMTarget,trustedTypesPolicy:a.trustedTypesPolicy,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,shadowDOMTarget:u,trustedTypesPolicy: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,shadowDOMTarget:u,trustedTypesPolicy: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;
@@ -1,4 +1,4 @@
1
- import { n as SolidQueryDevtoolsPanel$1, r as SolidQueryDevtools$1, t as DevtoolsPanelOptions } from "./devtoolsPanel-iWIJVAfL.cjs";
1
+ import { n as SolidQueryDevtoolsPanel$1, r as SolidQueryDevtools$1, t as DevtoolsPanelOptions } from "./devtoolsPanel-Bdv26Okq.cjs";
2
2
  export declare const SolidQueryDevtools: typeof SolidQueryDevtools$1;
3
3
  export declare const SolidQueryDevtoolsPanel: typeof SolidQueryDevtoolsPanel$1;
4
4
  export type { DevtoolsPanelOptions };
@@ -1,4 +1,4 @@
1
- import { n as SolidQueryDevtoolsPanel$1, r as SolidQueryDevtools$1, t as DevtoolsPanelOptions } from "./devtoolsPanel-iWIJVAfL.js";
1
+ import { n as SolidQueryDevtoolsPanel$1, r as SolidQueryDevtools$1, t as DevtoolsPanelOptions } from "./devtoolsPanel-Bdv26Okq.js";
2
2
  export declare const SolidQueryDevtools: typeof SolidQueryDevtools$1;
3
3
  export declare const SolidQueryDevtoolsPanel: typeof SolidQueryDevtoolsPanel$1;
4
4
  export type { DevtoolsPanelOptions };
@@ -1,2 +1,2 @@
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};
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,shadowDOMTarget:e.shadowDOMTarget,trustedTypesPolicy:e.trustedTypesPolicy,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,shadowDOMTarget:g,trustedTypesPolicy:_,hideDisabledQueries:v}=n,y=new a({client:f(),queryFlavor:`Solid Query`,version:`5`,onlineManager:o,buttonPosition:`bottom-left`,position:`bottom`,initialIsOpen:!0,errorTypes:h,shadowDOMTarget:g,trustedTypesPolicy:_,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
@@ -1 +1 @@
1
- {"version":3,"file":"production.js","names":["TanstackQueryDevtools","onlineManager","useQueryClient","createEffect","createMemo","onCleanup","onMount","initialIsOpen","buttonPosition","position","client","errorTypes","styleNonce","shadowDOMTarget","hideDisabledQueries","theme","SolidQueryDevtools","props","queryClient","ref","devtools","queryFlavor","version","setClient","buttonPos","setButtonPosition","pos","setPosition","setInitialIsOpen","setErrorTypes","setTheme","mount","unmount","_el$","_tmpl$","_ref$","_$use","TanstackQueryDevtoolsPanel","onlineManager","useQueryClient","createEffect","createMemo","onCleanup","onMount","client","errorTypes","styleNonce","shadowDOMTarget","style","onClose","hideDisabledQueries","theme","SolidQueryDevtoolsPanel","props","queryClient","ref","devtools","queryFlavor","version","buttonPosition","position","initialIsOpen","setClient","setOnClose","setErrorTypes","setTheme","mount","unmount","_el$","_tmpl$","_ref$","_$use","_$effect","_$p","_$style","SolidQueryDevtoolsComp","SolidQueryDevtoolsCompPanel","SolidQueryDevtools","SolidQueryDevtoolsPanel","_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,SAAwBgB,EAAmBC,EAAwB,CACjE,IAAMC,EAAchB,EAAee,EAAMP,MAAM,EACzCA,EAASN,MAAiBc,CAAW,EACvCC,EACEC,EAAW,IAAIpB,EAAsB,CACzCU,OAAQA,EAAO,EACfW,YAAa,cACbC,QAAS,IACTrB,gBACAO,eAAgBS,EAAMT,eACtBC,SAAUQ,EAAMR,SAChBF,cAAeU,EAAMV,cACrBI,WAAYM,EAAMN,WAClBC,WAAYK,EAAML,WAClBC,gBAAiBI,EAAMJ,gBACvBC,oBAAqBG,EAAMH,oBAC3BC,MAAOE,EAAMF,KACf,CAAC,EAqCD,OAnCAZ,MAAmB,CACjBiB,EAASG,UAAUb,EAAO,CAAC,CAC7B,CAAC,EAEDP,MAAmB,CACjB,IAAMqB,EAAYP,EAAMT,eACpBgB,GACFJ,EAASK,kBAAkBD,CAAS,CAExC,CAAC,EAEDrB,MAAmB,CACjB,IAAMuB,EAAMT,EAAMR,SACdiB,GACFN,EAASO,YAAYD,CAAG,CAE5B,CAAC,EAEDvB,MAAmB,CACjBiB,EAASQ,iBAAiBX,EAAMV,eAAiB,EAAK,CACxD,CAAC,EAEDJ,MAAmB,CACjBiB,EAASS,cAAcZ,EAAMN,YAAc,CAAA,CAAE,CAC/C,CAAC,EAEDR,MAAmB,CACjBiB,EAASU,SAASb,EAAMF,KAAK,CAC/B,CAAC,EAEDT,MAAc,CACZc,EAASW,MAAMZ,CAAG,EAClBd,MAAgBe,EAASY,QAAQ,CAAC,CACpC,CAAC,OAED,CAAA,IAAAC,EAAAC,EAAA,EAAAC,EAA+ChB,EAAG,OAAA,OAAAgB,GAAA,WAAAC,EAAAD,EAAAF,CAAA,EAAHd,EAAGc,EAAAA,CAAA,EAAA,CAAA,CACpD,C,gHC5DA,SAAwBmB,EAAwBC,EAA6B,CAC3E,IAAMC,EAAcf,EAAec,EAAMT,MAAM,EACzCA,EAASH,MAAiBa,CAAW,EACvCC,EACE,CAAEV,aAAYC,aAAYC,kBAAiBG,uBAAwBG,EACnEG,EAAW,IAAInB,EAA2B,CAC9CO,OAAQA,EAAO,EACfa,YAAa,cACbC,QAAS,IACTpB,gBACAqB,eAAgB,cAChBC,SAAU,SACVC,cAAe,GACfhB,aACAC,aACAC,kBACAE,QAASI,EAAMJ,QACfC,sBACAC,MAAOE,EAAMF,KACf,CAAC,EAqBD,OApBAX,MAAmB,CACjBgB,EAASM,UAAUlB,EAAO,CAAC,CAC7B,CAAC,EACDJ,MAAmB,CACjBgB,EAASO,WAAWV,EAAMJ,cAAkB,CAAC,EAAE,CACjD,CAAC,EAEDT,MAAmB,CACjBgB,EAASQ,cAAcX,EAAMR,YAAc,CAAA,CAAE,CAC/C,CAAC,EAEDL,MAAmB,CACjBgB,EAASS,SAASZ,EAAMF,KAAK,CAC/B,CAAC,EAEDR,MAAc,CACZa,EAASU,MAAMX,CAAG,EAClBb,MAAgBc,EAASW,QAAQ,CAAC,CACpC,CAAC,OAED,CAAA,IAAAC,EAAAC,EAAA,EAAAC,EASSf,EAFJ,OAEO,OAAAe,GAAA,WAAAC,EAAAD,EAAAF,CAAA,EAAHb,EAAGa,EAAAI,EAAAC,GAAAC,EAAAN,EAPD,CAIL,GAAGf,EAAML,KACX,EAACyB,CAAA,CAAA,EAAAL,CAAA,EAAA,CAAA,CAKP,CC3GA,MAAaS,EAAqBF,EACrBG,EAA0BF,E"}
1
+ {"version":3,"file":"production.js","names":["TanstackQueryDevtools","onlineManager","useQueryClient","createEffect","createMemo","onCleanup","onMount","initialIsOpen","buttonPosition","position","client","errorTypes","shadowDOMTarget","trustedTypesPolicy","hideDisabledQueries","theme","SolidQueryDevtools","props","queryClient","ref","devtools","queryFlavor","version","setClient","buttonPos","setButtonPosition","pos","setPosition","setInitialIsOpen","setErrorTypes","setTheme","mount","unmount","_el$","_tmpl$","_ref$","_$use","TanstackQueryDevtoolsPanel","onlineManager","useQueryClient","createEffect","createMemo","onCleanup","onMount","client","errorTypes","shadowDOMTarget","trustedTypesPolicy","style","onClose","hideDisabledQueries","theme","SolidQueryDevtoolsPanel","props","queryClient","ref","devtools","queryFlavor","version","buttonPosition","position","initialIsOpen","setClient","setOnClose","setErrorTypes","setTheme","mount","unmount","_el$","_tmpl$","_ref$","_$use","_$effect","_$p","_$style","SolidQueryDevtoolsComp","SolidQueryDevtoolsCompPanel","SolidQueryDevtools","SolidQueryDevtoolsPanel","_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 * @deprecated The devtools no longer add a `<style>` element, so they need no\n * nonce. This option does nothing.\n */\n styleNonce?: string\n /**\n * The shadow root to add the devtools styles to. By default, the styles are\n * added to the shadow root the devtools render in, or to the document when\n * they do not render in a shadow root.\n */\n shadowDOMTarget?: ShadowRoot\n /**\n * The Trusted Types policy the devtools use to create their HTML templates.\n * Pass one when your page enforces `require-trusted-types-for 'script'`.\n * The devtools only pass it their own markup.\n */\n trustedTypesPolicy?: { createHTML: (html: string) => unknown }\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 shadowDOMTarget: props.shadowDOMTarget,\n trustedTypesPolicy: props.trustedTypesPolicy,\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 * @deprecated The devtools no longer add a `<style>` element, so they need no\n * nonce. This option does nothing.\n */\n styleNonce?: string\n /**\n * The shadow root to add the devtools styles to. By default, the styles are\n * added to the shadow root the devtools render in, or to the document when\n * they do not render in a shadow root.\n */\n shadowDOMTarget?: ShadowRoot\n /**\n * The Trusted Types policy the devtools use to create their HTML templates.\n * Pass one when your page enforces `require-trusted-types-for 'script'`.\n * The devtools only pass it their own markup.\n */\n trustedTypesPolicy?: { createHTML: (html: string) => unknown }\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 {\n errorTypes,\n shadowDOMTarget,\n trustedTypesPolicy,\n hideDisabledQueries,\n } = 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 shadowDOMTarget,\n trustedTypesPolicy,\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,kYAuEA,SAAwBgB,EAAmBC,EAAwB,CACjE,IAAMC,EAAchB,EAAee,EAAMP,MAAM,EACzCA,EAASN,MAAiBc,CAAW,EACvCC,EACEC,EAAW,IAAIpB,EAAsB,CACzCU,OAAQA,EAAO,EACfW,YAAa,cACbC,QAAS,IACTrB,gBACAO,eAAgBS,EAAMT,eACtBC,SAAUQ,EAAMR,SAChBF,cAAeU,EAAMV,cACrBI,WAAYM,EAAMN,WAClBC,gBAAiBK,EAAML,gBACvBC,mBAAoBI,EAAMJ,mBAC1BC,oBAAqBG,EAAMH,oBAC3BC,MAAOE,EAAMF,KACf,CAAC,EAqCD,OAnCAZ,MAAmB,CACjBiB,EAASG,UAAUb,EAAO,CAAC,CAC7B,CAAC,EAEDP,MAAmB,CACjB,IAAMqB,EAAYP,EAAMT,eACpBgB,GACFJ,EAASK,kBAAkBD,CAAS,CAExC,CAAC,EAEDrB,MAAmB,CACjB,IAAMuB,EAAMT,EAAMR,SACdiB,GACFN,EAASO,YAAYD,CAAG,CAE5B,CAAC,EAEDvB,MAAmB,CACjBiB,EAASQ,iBAAiBX,EAAMV,eAAiB,EAAK,CACxD,CAAC,EAEDJ,MAAmB,CACjBiB,EAASS,cAAcZ,EAAMN,YAAc,CAAA,CAAE,CAC/C,CAAC,EAEDR,MAAmB,CACjBiB,EAASU,SAASb,EAAMF,KAAK,CAC/B,CAAC,EAEDT,MAAc,CACZc,EAASW,MAAMZ,CAAG,EAClBd,MAAgBe,EAASY,QAAQ,CAAC,CACpC,CAAC,OAED,CAAA,IAAAC,EAAAC,EAAA,EAAAC,EAA+ChB,EAAG,OAAA,OAAAgB,GAAA,WAAAC,EAAAD,EAAAF,CAAA,EAAHd,EAAGc,EAAAA,CAAA,EAAA,CAAA,CACpD,C,gHC5DA,SAAwBmB,EAAwBC,EAA6B,CAC3E,IAAMC,EAAcf,EAAec,EAAMT,MAAM,EACzCA,EAASH,MAAiBa,CAAW,EACvCC,EACE,CACJV,aACAC,kBACAC,qBACAG,uBACEG,EACEG,EAAW,IAAInB,EAA2B,CAC9CO,OAAQA,EAAO,EACfa,YAAa,cACbC,QAAS,IACTpB,gBACAqB,eAAgB,cAChBC,SAAU,SACVC,cAAe,GACfhB,aACAC,kBACAC,qBACAE,QAASI,EAAMJ,QACfC,sBACAC,MAAOE,EAAMF,KACf,CAAC,EAqBD,OApBAX,MAAmB,CACjBgB,EAASM,UAAUlB,EAAO,CAAC,CAC7B,CAAC,EACDJ,MAAmB,CACjBgB,EAASO,WAAWV,EAAMJ,cAAkB,CAAC,EAAE,CACjD,CAAC,EAEDT,MAAmB,CACjBgB,EAASQ,cAAcX,EAAMR,YAAc,CAAA,CAAE,CAC/C,CAAC,EAEDL,MAAmB,CACjBgB,EAASS,SAASZ,EAAMF,KAAK,CAC/B,CAAC,EAEDR,MAAc,CACZa,EAASU,MAAMX,CAAG,EAClBb,MAAgBc,EAASW,QAAQ,CAAC,CACpC,CAAC,OAED,CAAA,IAAAC,EAAAC,EAAA,EAAAC,EASSf,EAFJ,OAEO,OAAAe,GAAA,WAAAC,EAAAD,EAAAF,CAAA,EAAHb,EAAGa,EAAAI,EAAAC,GAAAC,EAAAN,EAPD,CAIL,GAAGf,EAAML,KACX,EAACyB,CAAA,CAAA,EAAAL,CAAA,EAAA,CAAA,CAKP,CCxHA,MAAaS,EAAqBF,EACrBG,EAA0BF,E"}
@@ -21,8 +21,8 @@ function SolidQueryDevtools$1(props) {
21
21
  position: props.position,
22
22
  initialIsOpen: props.initialIsOpen,
23
23
  errorTypes: props.errorTypes,
24
- styleNonce: props.styleNonce,
25
24
  shadowDOMTarget: props.shadowDOMTarget,
25
+ trustedTypesPolicy: props.trustedTypesPolicy,
26
26
  hideDisabledQueries: props.hideDisabledQueries,
27
27
  theme: props.theme
28
28
  });
@@ -62,7 +62,7 @@ function SolidQueryDevtoolsPanel$1(props) {
62
62
  const queryClient = useQueryClient(props.client);
63
63
  const client = createMemo(() => queryClient);
64
64
  let ref;
65
- const { errorTypes, styleNonce, shadowDOMTarget, hideDisabledQueries } = props;
65
+ const { errorTypes, shadowDOMTarget, trustedTypesPolicy, hideDisabledQueries } = props;
66
66
  const devtools = new TanstackQueryDevtoolsPanel({
67
67
  client: client(),
68
68
  queryFlavor: "Solid Query",
@@ -72,8 +72,8 @@ function SolidQueryDevtoolsPanel$1(props) {
72
72
  position: "bottom",
73
73
  initialIsOpen: true,
74
74
  errorTypes,
75
- styleNonce,
76
75
  shadowDOMTarget,
76
+ trustedTypesPolicy,
77
77
  onClose: props.onClose,
78
78
  hideDisabledQueries,
79
79
  theme: props.theme
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tanstack/solid-query-devtools",
3
- "version": "5.108.1",
3
+ "version": "5.108.3",
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.108.1"
60
+ "@tanstack/query-devtools": "5.108.3"
61
61
  },
62
62
  "devDependencies": {
63
63
  "@solidjs/testing-library": "^0.8.10",
64
- "@tanstack/solid-query": "5.108.1",
64
+ "@tanstack/solid-query": "5.108.3",
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.108.1",
72
+ "@tanstack/solid-query": "^5.108.3",
73
73
  "solid-js": "^1.6.0"
74
74
  },
75
75
  "scripts": {
package/src/devtools.tsx CHANGED
@@ -35,14 +35,22 @@ interface DevtoolsOptions {
35
35
  */
36
36
  errorTypes?: Array<DevtoolsErrorType>
37
37
  /**
38
- * 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.
38
+ * @deprecated The devtools no longer add a `<style>` element, so they need no
39
+ * nonce. This option does nothing.
39
40
  */
40
41
  styleNonce?: string
41
42
  /**
42
- * Use this to pass a shadow DOM target to the devtools so that the styles will be applied
43
- * within the shadow DOM instead of within the head tag in the light DOM.
43
+ * The shadow root to add the devtools styles to. By default, the styles are
44
+ * added to the shadow root the devtools render in, or to the document when
45
+ * they do not render in a shadow root.
44
46
  */
45
47
  shadowDOMTarget?: ShadowRoot
48
+ /**
49
+ * The Trusted Types policy the devtools use to create their HTML templates.
50
+ * Pass one when your page enforces `require-trusted-types-for 'script'`.
51
+ * The devtools only pass it their own markup.
52
+ */
53
+ trustedTypesPolicy?: { createHTML: (html: string) => unknown }
46
54
  /**
47
55
  * Set this to true to hide disabled queries from the devtools panel.
48
56
  */
@@ -74,8 +82,8 @@ export default function SolidQueryDevtools(props: DevtoolsOptions) {
74
82
  position: props.position,
75
83
  initialIsOpen: props.initialIsOpen,
76
84
  errorTypes: props.errorTypes,
77
- styleNonce: props.styleNonce,
78
85
  shadowDOMTarget: props.shadowDOMTarget,
86
+ trustedTypesPolicy: props.trustedTypesPolicy,
79
87
  hideDisabledQueries: props.hideDisabledQueries,
80
88
  theme: props.theme,
81
89
  })
@@ -18,14 +18,22 @@ export interface DevtoolsPanelOptions {
18
18
  */
19
19
  errorTypes?: Array<DevtoolsErrorType>
20
20
  /**
21
- * 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.
21
+ * @deprecated The devtools no longer add a `<style>` element, so they need no
22
+ * nonce. This option does nothing.
22
23
  */
23
24
  styleNonce?: string
24
25
  /**
25
- * Use this to pass a shadow DOM target to the devtools so that the styles will be applied
26
- * within the shadow DOM instead of within the head tag in the light DOM.
26
+ * The shadow root to add the devtools styles to. By default, the styles are
27
+ * added to the shadow root the devtools render in, or to the document when
28
+ * they do not render in a shadow root.
27
29
  */
28
30
  shadowDOMTarget?: ShadowRoot
31
+ /**
32
+ * The Trusted Types policy the devtools use to create their HTML templates.
33
+ * Pass one when your page enforces `require-trusted-types-for 'script'`.
34
+ * The devtools only pass it their own markup.
35
+ */
36
+ trustedTypesPolicy?: { createHTML: (html: string) => unknown }
29
37
 
30
38
  /**
31
39
  * Custom styles for the devtools panel
@@ -60,7 +68,12 @@ export default function SolidQueryDevtoolsPanel(props: DevtoolsPanelOptions) {
60
68
  const queryClient = useQueryClient(props.client)
61
69
  const client = createMemo(() => queryClient)
62
70
  let ref!: HTMLDivElement
63
- const { errorTypes, styleNonce, shadowDOMTarget, hideDisabledQueries } = props
71
+ const {
72
+ errorTypes,
73
+ shadowDOMTarget,
74
+ trustedTypesPolicy,
75
+ hideDisabledQueries,
76
+ } = props
64
77
  const devtools = new TanstackQueryDevtoolsPanel({
65
78
  client: client(),
66
79
  queryFlavor: 'Solid Query',
@@ -70,8 +83,8 @@ export default function SolidQueryDevtoolsPanel(props: DevtoolsPanelOptions) {
70
83
  position: 'bottom',
71
84
  initialIsOpen: true,
72
85
  errorTypes,
73
- styleNonce,
74
86
  shadowDOMTarget,
87
+ trustedTypesPolicy,
75
88
  onClose: props.onClose,
76
89
  hideDisabledQueries,
77
90
  theme: props.theme,
@@ -1 +0,0 @@
1
- {"version":3,"file":"devtoolsPanel-iWIJVAfL.d.cts","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"}
@@ -1 +0,0 @@
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"}