@tanstack/query-devtools 5.108.1 → 5.108.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. package/build/{DevtoolsComponent-e0KiEsCw.js → DevtoolsComponent-BBTUIw3a.js} +2 -2
  2. package/build/DevtoolsComponent-CqaQIX_J.cjs +45 -0
  3. package/build/DevtoolsComponent-KaCCT4mO.js +3 -0
  4. package/build/{DevtoolsComponent-CJG_H2ix.js.map → DevtoolsComponent-KaCCT4mO.js.map} +1 -1
  5. package/build/DevtoolsComponent-NOj66Dgq.cjs +2 -0
  6. package/build/DevtoolsPanelComponent-1en47poS.js +3 -0
  7. package/build/{DevtoolsPanelComponent-By2KdGQW.js.map → DevtoolsPanelComponent-1en47poS.js.map} +1 -1
  8. package/build/DevtoolsPanelComponent-C6-KUZMt.cjs +2 -0
  9. package/build/{DevtoolsPanelComponent-D9e2k2ne.js → DevtoolsPanelComponent-DA61oPj3.js} +2 -2
  10. package/build/DevtoolsPanelComponent-DHv0HzmU.cjs +52 -0
  11. package/build/{DevtoolsSubscriptionsProvider-CtZ2t7t0.js → DevtoolsSubscriptionsProvider-Cl_PUkf2.js} +1636 -2295
  12. package/build/{DevtoolsSubscriptionsProvider-D9zXQvDq.cjs → DevtoolsSubscriptionsProvider-DC-V1gB8.cjs} +2520 -3173
  13. package/build/DevtoolsSubscriptionsProvider-DpHm90Dj.js +10 -0
  14. package/build/DevtoolsSubscriptionsProvider-DpHm90Dj.js.map +1 -0
  15. package/build/DevtoolsSubscriptionsProvider-gZwQB0lN.cjs +9 -0
  16. package/build/dev.cjs +30 -30
  17. package/build/dev.js +11 -11
  18. package/build/index.cjs +1 -1
  19. package/build/index.d.cts +26 -10
  20. package/build/index.d.cts.map +1 -1
  21. package/build/index.d.ts +26 -10
  22. package/build/index.d.ts.map +1 -1
  23. package/build/index.js +1 -1
  24. package/build/index.js.map +1 -1
  25. package/build/{utils-CzP8C7c0.cjs → web-BD1Jlb-z.cjs} +43 -1036
  26. package/build/web-BRnEZuZ3.cjs +2 -0
  27. package/build/{utils-D7iZi04l.js → web-BZdVkndN.js} +42 -939
  28. package/build/web-da-lPyZC.js +3 -0
  29. package/build/web-da-lPyZC.js.map +1 -0
  30. package/package.json +3 -5
  31. package/src/Devtools.tsx +127 -1712
  32. package/src/Explorer.tsx +78 -285
  33. package/src/TanstackQueryDevtools.tsx +19 -10
  34. package/src/TanstackQueryDevtoolsPanel.tsx +19 -10
  35. package/src/contexts/PiPContext.tsx +4 -31
  36. package/src/contexts/types.ts +2 -2
  37. package/src/global.d.ts +1 -0
  38. package/src/styles.css +2158 -0
  39. package/src/styles.ts +49 -0
  40. package/src/utils.tsx +0 -23
  41. package/build/DevtoolsComponent-CJG_H2ix.js +0 -3
  42. package/build/DevtoolsComponent-CJb6tQE-.cjs +0 -2
  43. package/build/DevtoolsComponent-KSaqMRUY.cjs +0 -45
  44. package/build/DevtoolsPanelComponent-BXsLpTv2.cjs +0 -2
  45. package/build/DevtoolsPanelComponent-By2KdGQW.js +0 -3
  46. package/build/DevtoolsPanelComponent-CpAkTR9C.cjs +0 -52
  47. package/build/DevtoolsSubscriptionsProvider-CBn1lU_l.cjs +0 -1291
  48. package/build/DevtoolsSubscriptionsProvider-DQhbYH9U.js +0 -1292
  49. package/build/DevtoolsSubscriptionsProvider-DQhbYH9U.js.map +0 -1
  50. package/build/utils-DC2pN79q.js +0 -3
  51. package/build/utils-DC2pN79q.js.map +0 -1
  52. package/build/utils-DJl-N7L2.cjs +0 -2
package/build/dev.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  /* @refresh skip */
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const require_utils = require("./utils-CzP8C7c0.cjs");
3
+ const require_web = require("./web-BD1Jlb-z.cjs");
4
4
  // src/TanstackQueryDevtools.tsx
5
5
  var TanstackQueryDevtools = class {
6
6
  #client;
@@ -8,8 +8,8 @@ var TanstackQueryDevtools = class {
8
8
  #queryFlavor;
9
9
  #version;
10
10
  #isMounted = false;
11
- #styleNonce;
12
11
  #shadowDOMTarget;
12
+ #trustedTypesPolicy;
13
13
  #buttonPosition;
14
14
  #position;
15
15
  #initialIsOpen;
@@ -19,19 +19,19 @@ var TanstackQueryDevtools = class {
19
19
  #theme;
20
20
  #dispose;
21
21
  constructor(config) {
22
- const { client, queryFlavor, version, onlineManager, buttonPosition, position, initialIsOpen, errorTypes, styleNonce, shadowDOMTarget, hideDisabledQueries, theme } = config;
23
- this.#client = require_utils.createSignal(client);
22
+ const { client, queryFlavor, version, onlineManager, buttonPosition, position, initialIsOpen, errorTypes, shadowDOMTarget, trustedTypesPolicy, hideDisabledQueries, theme } = config;
23
+ this.#client = require_web.createSignal(client);
24
24
  this.#queryFlavor = queryFlavor;
25
25
  this.#version = version;
26
26
  this.#onlineManager = onlineManager;
27
- this.#styleNonce = styleNonce;
28
27
  this.#shadowDOMTarget = shadowDOMTarget;
29
- this.#buttonPosition = require_utils.createSignal(buttonPosition);
30
- this.#position = require_utils.createSignal(position);
31
- this.#initialIsOpen = require_utils.createSignal(initialIsOpen);
32
- this.#errorTypes = require_utils.createSignal(errorTypes);
33
- this.#hideDisabledQueries = require_utils.createSignal(hideDisabledQueries);
34
- this.#theme = require_utils.createSignal(theme);
28
+ this.#trustedTypesPolicy = trustedTypesPolicy;
29
+ this.#buttonPosition = require_web.createSignal(buttonPosition);
30
+ this.#position = require_web.createSignal(position);
31
+ this.#initialIsOpen = require_web.createSignal(initialIsOpen);
32
+ this.#errorTypes = require_web.createSignal(errorTypes);
33
+ this.#hideDisabledQueries = require_web.createSignal(hideDisabledQueries);
34
+ this.#theme = require_web.createSignal(theme);
35
35
  }
36
36
  setButtonPosition(position) {
37
37
  this.#buttonPosition[1](position);
@@ -53,7 +53,8 @@ var TanstackQueryDevtools = class {
53
53
  }
54
54
  mount(el) {
55
55
  if (this.#isMounted) throw new Error("Devtools is already mounted");
56
- const dispose = require_utils.render(() => {
56
+ if (this.#trustedTypesPolicy) require_web.setTrustedTypesPolicy(this.#trustedTypesPolicy);
57
+ const dispose = require_web.render(() => {
57
58
  const _self$ = this;
58
59
  const [btnPosition] = this.#buttonPosition;
59
60
  const [pos] = this.#position;
@@ -65,11 +66,10 @@ var TanstackQueryDevtools = class {
65
66
  let Devtools;
66
67
  if (this.#Component) Devtools = this.#Component;
67
68
  else {
68
- Devtools = require_utils.lazy(() => Promise.resolve().then(() => require("./DevtoolsComponent-KSaqMRUY.cjs")));
69
+ Devtools = require_web.lazy(() => Promise.resolve().then(() => require("./DevtoolsComponent-CqaQIX_J.cjs")));
69
70
  this.#Component = Devtools;
70
71
  }
71
- require_utils.setupStyleSheet(this.#styleNonce, this.#shadowDOMTarget);
72
- return require_utils.createComponent(Devtools, require_utils.mergeProps({
72
+ return require_web.createComponent(Devtools, require_web.mergeProps({
73
73
  get queryFlavor() {
74
74
  return _self$.#queryFlavor;
75
75
  },
@@ -122,8 +122,8 @@ var TanstackQueryDevtoolsPanel = class {
122
122
  #queryFlavor;
123
123
  #version;
124
124
  #isMounted = false;
125
- #styleNonce;
126
125
  #shadowDOMTarget;
126
+ #trustedTypesPolicy;
127
127
  #buttonPosition;
128
128
  #position;
129
129
  #initialIsOpen;
@@ -134,20 +134,20 @@ var TanstackQueryDevtoolsPanel = class {
134
134
  #theme;
135
135
  #dispose;
136
136
  constructor(config) {
137
- const { client, queryFlavor, version, onlineManager, buttonPosition, position, initialIsOpen, errorTypes, styleNonce, shadowDOMTarget, onClose, hideDisabledQueries, theme } = config;
138
- this.#client = require_utils.createSignal(client);
137
+ const { client, queryFlavor, version, onlineManager, buttonPosition, position, initialIsOpen, errorTypes, shadowDOMTarget, trustedTypesPolicy, onClose, hideDisabledQueries, theme } = config;
138
+ this.#client = require_web.createSignal(client);
139
139
  this.#queryFlavor = queryFlavor;
140
140
  this.#version = version;
141
141
  this.#onlineManager = onlineManager;
142
- this.#styleNonce = styleNonce;
143
142
  this.#shadowDOMTarget = shadowDOMTarget;
144
- this.#buttonPosition = require_utils.createSignal(buttonPosition);
145
- this.#position = require_utils.createSignal(position);
146
- this.#initialIsOpen = require_utils.createSignal(initialIsOpen);
147
- this.#errorTypes = require_utils.createSignal(errorTypes);
148
- this.#hideDisabledQueries = require_utils.createSignal(hideDisabledQueries);
149
- this.#onClose = require_utils.createSignal(onClose);
150
- this.#theme = require_utils.createSignal(theme);
143
+ this.#trustedTypesPolicy = trustedTypesPolicy;
144
+ this.#buttonPosition = require_web.createSignal(buttonPosition);
145
+ this.#position = require_web.createSignal(position);
146
+ this.#initialIsOpen = require_web.createSignal(initialIsOpen);
147
+ this.#errorTypes = require_web.createSignal(errorTypes);
148
+ this.#hideDisabledQueries = require_web.createSignal(hideDisabledQueries);
149
+ this.#onClose = require_web.createSignal(onClose);
150
+ this.#theme = require_web.createSignal(theme);
151
151
  }
152
152
  setButtonPosition(position) {
153
153
  this.#buttonPosition[1](position);
@@ -172,7 +172,8 @@ var TanstackQueryDevtoolsPanel = class {
172
172
  }
173
173
  mount(el) {
174
174
  if (this.#isMounted) throw new Error("Devtools is already mounted");
175
- const dispose = require_utils.render(() => {
175
+ if (this.#trustedTypesPolicy) require_web.setTrustedTypesPolicy(this.#trustedTypesPolicy);
176
+ const dispose = require_web.render(() => {
176
177
  const _self$ = this;
177
178
  const [btnPosition] = this.#buttonPosition;
178
179
  const [pos] = this.#position;
@@ -185,11 +186,10 @@ var TanstackQueryDevtoolsPanel = class {
185
186
  let Devtools;
186
187
  if (this.#Component) Devtools = this.#Component;
187
188
  else {
188
- Devtools = require_utils.lazy(() => Promise.resolve().then(() => require("./DevtoolsPanelComponent-CpAkTR9C.cjs")));
189
+ Devtools = require_web.lazy(() => Promise.resolve().then(() => require("./DevtoolsPanelComponent-DHv0HzmU.cjs")));
189
190
  this.#Component = Devtools;
190
191
  }
191
- require_utils.setupStyleSheet(this.#styleNonce, this.#shadowDOMTarget);
192
- return require_utils.createComponent(Devtools, require_utils.mergeProps({
192
+ return require_web.createComponent(Devtools, require_web.mergeProps({
193
193
  get queryFlavor() {
194
194
  return _self$.#queryFlavor;
195
195
  },
package/build/dev.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /* @refresh skip */
2
- import { B as createComponent, E as render, Q as mergeProps, Z as lazy, f as setupStyleSheet, q as createSignal } from "./utils-D7iZi04l.js";
2
+ import { F as lazy, I as mergeProps, f as setTrustedTypesPolicy, j as createSignal, l as render, w as createComponent } from "./web-BZdVkndN.js";
3
3
  // src/TanstackQueryDevtools.tsx
4
4
  var TanstackQueryDevtools = class {
5
5
  #client;
@@ -7,8 +7,8 @@ var TanstackQueryDevtools = class {
7
7
  #queryFlavor;
8
8
  #version;
9
9
  #isMounted = false;
10
- #styleNonce;
11
10
  #shadowDOMTarget;
11
+ #trustedTypesPolicy;
12
12
  #buttonPosition;
13
13
  #position;
14
14
  #initialIsOpen;
@@ -18,13 +18,13 @@ var TanstackQueryDevtools = class {
18
18
  #theme;
19
19
  #dispose;
20
20
  constructor(config) {
21
- const { client, queryFlavor, version, onlineManager, buttonPosition, position, initialIsOpen, errorTypes, styleNonce, shadowDOMTarget, hideDisabledQueries, theme } = config;
21
+ const { client, queryFlavor, version, onlineManager, buttonPosition, position, initialIsOpen, errorTypes, shadowDOMTarget, trustedTypesPolicy, hideDisabledQueries, theme } = config;
22
22
  this.#client = createSignal(client);
23
23
  this.#queryFlavor = queryFlavor;
24
24
  this.#version = version;
25
25
  this.#onlineManager = onlineManager;
26
- this.#styleNonce = styleNonce;
27
26
  this.#shadowDOMTarget = shadowDOMTarget;
27
+ this.#trustedTypesPolicy = trustedTypesPolicy;
28
28
  this.#buttonPosition = createSignal(buttonPosition);
29
29
  this.#position = createSignal(position);
30
30
  this.#initialIsOpen = createSignal(initialIsOpen);
@@ -52,6 +52,7 @@ var TanstackQueryDevtools = class {
52
52
  }
53
53
  mount(el) {
54
54
  if (this.#isMounted) throw new Error("Devtools is already mounted");
55
+ if (this.#trustedTypesPolicy) setTrustedTypesPolicy(this.#trustedTypesPolicy);
55
56
  const dispose = render(() => {
56
57
  const _self$ = this;
57
58
  const [btnPosition] = this.#buttonPosition;
@@ -64,10 +65,9 @@ var TanstackQueryDevtools = class {
64
65
  let Devtools;
65
66
  if (this.#Component) Devtools = this.#Component;
66
67
  else {
67
- Devtools = lazy(() => import("./DevtoolsComponent-e0KiEsCw.js"));
68
+ Devtools = lazy(() => import("./DevtoolsComponent-BBTUIw3a.js"));
68
69
  this.#Component = Devtools;
69
70
  }
70
- setupStyleSheet(this.#styleNonce, this.#shadowDOMTarget);
71
71
  return createComponent(Devtools, mergeProps({
72
72
  get queryFlavor() {
73
73
  return _self$.#queryFlavor;
@@ -121,8 +121,8 @@ var TanstackQueryDevtoolsPanel = class {
121
121
  #queryFlavor;
122
122
  #version;
123
123
  #isMounted = false;
124
- #styleNonce;
125
124
  #shadowDOMTarget;
125
+ #trustedTypesPolicy;
126
126
  #buttonPosition;
127
127
  #position;
128
128
  #initialIsOpen;
@@ -133,13 +133,13 @@ var TanstackQueryDevtoolsPanel = class {
133
133
  #theme;
134
134
  #dispose;
135
135
  constructor(config) {
136
- const { client, queryFlavor, version, onlineManager, buttonPosition, position, initialIsOpen, errorTypes, styleNonce, shadowDOMTarget, onClose, hideDisabledQueries, theme } = config;
136
+ const { client, queryFlavor, version, onlineManager, buttonPosition, position, initialIsOpen, errorTypes, shadowDOMTarget, trustedTypesPolicy, onClose, hideDisabledQueries, theme } = config;
137
137
  this.#client = createSignal(client);
138
138
  this.#queryFlavor = queryFlavor;
139
139
  this.#version = version;
140
140
  this.#onlineManager = onlineManager;
141
- this.#styleNonce = styleNonce;
142
141
  this.#shadowDOMTarget = shadowDOMTarget;
142
+ this.#trustedTypesPolicy = trustedTypesPolicy;
143
143
  this.#buttonPosition = createSignal(buttonPosition);
144
144
  this.#position = createSignal(position);
145
145
  this.#initialIsOpen = createSignal(initialIsOpen);
@@ -171,6 +171,7 @@ var TanstackQueryDevtoolsPanel = class {
171
171
  }
172
172
  mount(el) {
173
173
  if (this.#isMounted) throw new Error("Devtools is already mounted");
174
+ if (this.#trustedTypesPolicy) setTrustedTypesPolicy(this.#trustedTypesPolicy);
174
175
  const dispose = render(() => {
175
176
  const _self$ = this;
176
177
  const [btnPosition] = this.#buttonPosition;
@@ -184,10 +185,9 @@ var TanstackQueryDevtoolsPanel = class {
184
185
  let Devtools;
185
186
  if (this.#Component) Devtools = this.#Component;
186
187
  else {
187
- Devtools = lazy(() => import("./DevtoolsPanelComponent-D9e2k2ne.js"));
188
+ Devtools = lazy(() => import("./DevtoolsPanelComponent-DA61oPj3.js"));
188
189
  this.#Component = Devtools;
189
190
  }
190
- setupStyleSheet(this.#styleNonce, this.#shadowDOMTarget);
191
191
  return createComponent(Devtools, mergeProps({
192
192
  get queryFlavor() {
193
193
  return _self$.#queryFlavor;
package/build/index.cjs CHANGED
@@ -1,2 +1,2 @@
1
1
  /* @refresh skip */
2
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./utils-DJl-N7L2.cjs");var t=class{#e;#t;#n;#r;#i=!1;#a;#o;#s;#c;#l;#u;#d;#f;#p;#m;constructor(t){let{client:n,queryFlavor:r,version:i,onlineManager:a,buttonPosition:o,position:s,initialIsOpen:c,errorTypes:l,styleNonce:u,shadowDOMTarget:d,hideDisabledQueries:f,theme:p}=t;this.#e=e.q(n),this.#n=r,this.#r=i,this.#t=a,this.#a=u,this.#o=d,this.#s=e.q(o),this.#c=e.q(s),this.#l=e.q(c),this.#u=e.q(l),this.#d=e.q(f),this.#p=e.q(p)}setButtonPosition(e){this.#s[1](e)}setPosition(e){this.#c[1](e)}setInitialIsOpen(e){this.#l[1](e)}setErrorTypes(e){this.#u[1](e)}setClient(e){this.#e[1](e)}setTheme(e){this.#p[1](e)}mount(t){if(this.#i)throw Error(`Devtools is already mounted`);let n=e.E(()=>{let t=this,[n]=this.#s,[r]=this.#c,[i]=this.#l,[a]=this.#u,[o]=this.#d,[s]=this.#e,[c]=this.#p,l;return this.#f?l=this.#f:(l=e.Z(()=>Promise.resolve().then(()=>require("./DevtoolsComponent-CJb6tQE-.cjs"))),this.#f=l),e.f(this.#a,this.#o),e.B(l,e.Q({get queryFlavor(){return t.#n},get version(){return t.#r},get onlineManager(){return t.#t},get shadowDOMTarget(){return t.#o}},{get client(){return s()},get buttonPosition(){return n()},get position(){return r()},get initialIsOpen(){return i()},get errorTypes(){return a()},get hideDisabledQueries(){return o()},get theme(){return c()}}))},t);this.#i=!0,this.#m=n}unmount(){if(!this.#i)throw Error(`Devtools is not mounted`);this.#m?.(),this.#i=!1}},n=class{#e;#t;#n;#r;#i=!1;#a;#o;#s;#c;#l;#u;#d;#f;#p;#m;#h;constructor(t){let{client:n,queryFlavor:r,version:i,onlineManager:a,buttonPosition:o,position:s,initialIsOpen:c,errorTypes:l,styleNonce:u,shadowDOMTarget:d,onClose:f,hideDisabledQueries:p,theme:m}=t;this.#e=e.q(n),this.#n=r,this.#r=i,this.#t=a,this.#a=u,this.#o=d,this.#s=e.q(o),this.#c=e.q(s),this.#l=e.q(c),this.#u=e.q(l),this.#d=e.q(p),this.#f=e.q(f),this.#m=e.q(m)}setButtonPosition(e){this.#s[1](e)}setPosition(e){this.#c[1](e)}setInitialIsOpen(e){this.#l[1](e)}setErrorTypes(e){this.#u[1](e)}setClient(e){this.#e[1](e)}setOnClose(e){this.#f[1](()=>e)}setTheme(e){this.#m[1](e)}mount(t){if(this.#i)throw Error(`Devtools is already mounted`);let n=e.E(()=>{let t=this,[n]=this.#s,[r]=this.#c,[i]=this.#l,[a]=this.#u,[o]=this.#d,[s]=this.#e,[c]=this.#f,[l]=this.#m,u;return this.#p?u=this.#p:(u=e.Z(()=>Promise.resolve().then(()=>require("./DevtoolsPanelComponent-BXsLpTv2.cjs"))),this.#p=u),e.f(this.#a,this.#o),e.B(u,e.Q({get queryFlavor(){return t.#n},get version(){return t.#r},get onlineManager(){return t.#t},get shadowDOMTarget(){return t.#o}},{get client(){return s()},get buttonPosition(){return n()},get position(){return r()},get initialIsOpen(){return i()},get errorTypes(){return a()},get hideDisabledQueries(){return o()},get onClose(){return c()},get theme(){return l()}}))},t);this.#i=!0,this.#h=n}unmount(){if(!this.#i)throw Error(`Devtools is not mounted`);this.#h?.(),this.#i=!1}};exports.TanstackQueryDevtools=t,exports.TanstackQueryDevtoolsPanel=n;
2
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./web-BRnEZuZ3.cjs");var t=class{#e;#t;#n;#r;#i=!1;#a;#o;#s;#c;#l;#u;#d;#f;#p;#m;constructor(t){let{client:n,queryFlavor:r,version:i,onlineManager:a,buttonPosition:o,position:s,initialIsOpen:c,errorTypes:l,shadowDOMTarget:u,trustedTypesPolicy:d,hideDisabledQueries:f,theme:p}=t;this.#e=e.j(n),this.#n=r,this.#r=i,this.#t=a,this.#a=u,this.#o=d,this.#s=e.j(o),this.#c=e.j(s),this.#l=e.j(c),this.#u=e.j(l),this.#d=e.j(f),this.#p=e.j(p)}setButtonPosition(e){this.#s[1](e)}setPosition(e){this.#c[1](e)}setInitialIsOpen(e){this.#l[1](e)}setErrorTypes(e){this.#u[1](e)}setClient(e){this.#e[1](e)}setTheme(e){this.#p[1](e)}mount(t){if(this.#i)throw Error(`Devtools is already mounted`);this.#o&&e.f(this.#o);let n=e.l(()=>{let t=this,[n]=this.#s,[r]=this.#c,[i]=this.#l,[a]=this.#u,[o]=this.#d,[s]=this.#e,[c]=this.#p,l;return this.#f?l=this.#f:(l=e.F(()=>Promise.resolve().then(()=>require("./DevtoolsComponent-NOj66Dgq.cjs"))),this.#f=l),e.w(l,e.I({get queryFlavor(){return t.#n},get version(){return t.#r},get onlineManager(){return t.#t},get shadowDOMTarget(){return t.#a}},{get client(){return s()},get buttonPosition(){return n()},get position(){return r()},get initialIsOpen(){return i()},get errorTypes(){return a()},get hideDisabledQueries(){return o()},get theme(){return c()}}))},t);this.#i=!0,this.#m=n}unmount(){if(!this.#i)throw Error(`Devtools is not mounted`);this.#m?.(),this.#i=!1}},n=class{#e;#t;#n;#r;#i=!1;#a;#o;#s;#c;#l;#u;#d;#f;#p;#m;#h;constructor(t){let{client:n,queryFlavor:r,version:i,onlineManager:a,buttonPosition:o,position:s,initialIsOpen:c,errorTypes:l,shadowDOMTarget:u,trustedTypesPolicy:d,onClose:f,hideDisabledQueries:p,theme:m}=t;this.#e=e.j(n),this.#n=r,this.#r=i,this.#t=a,this.#a=u,this.#o=d,this.#s=e.j(o),this.#c=e.j(s),this.#l=e.j(c),this.#u=e.j(l),this.#d=e.j(p),this.#f=e.j(f),this.#m=e.j(m)}setButtonPosition(e){this.#s[1](e)}setPosition(e){this.#c[1](e)}setInitialIsOpen(e){this.#l[1](e)}setErrorTypes(e){this.#u[1](e)}setClient(e){this.#e[1](e)}setOnClose(e){this.#f[1](()=>e)}setTheme(e){this.#m[1](e)}mount(t){if(this.#i)throw Error(`Devtools is already mounted`);this.#o&&e.f(this.#o);let n=e.l(()=>{let t=this,[n]=this.#s,[r]=this.#c,[i]=this.#l,[a]=this.#u,[o]=this.#d,[s]=this.#e,[c]=this.#f,[l]=this.#m,u;return this.#p?u=this.#p:(u=e.F(()=>Promise.resolve().then(()=>require("./DevtoolsPanelComponent-C6-KUZMt.cjs"))),this.#p=u),e.w(u,e.I({get queryFlavor(){return t.#n},get version(){return t.#r},get onlineManager(){return t.#t},get shadowDOMTarget(){return t.#a}},{get client(){return s()},get buttonPosition(){return n()},get position(){return r()},get initialIsOpen(){return i()},get errorTypes(){return a()},get hideDisabledQueries(){return o()},get onClose(){return c()},get theme(){return l()}}))},t);this.#i=!0,this.#h=n}unmount(){if(!this.#i)throw Error(`Devtools is not mounted`);this.#h?.(),this.#i=!1}};exports.TanstackQueryDevtools=t,exports.TanstackQueryDevtoolsPanel=n;
package/build/index.d.cts CHANGED
@@ -68,8 +68,8 @@ interface QueryDevtoolsProps {
68
68
  */
69
69
  errorTypes?: Array<DevtoolsErrorType>;
70
70
  /**
71
- * Use this to pass a shadow DOM target to the devtools so that the styles will be applied
72
- * within the shadow DOM instead of within the head tag in the light DOM.
71
+ * The shadow root to add the devtools styles to. By default, the styles are added to the shadow
72
+ * root the devtools render in, or to the document when they do not render in a shadow root.
73
73
  */
74
74
  shadowDOMTarget?: ShadowRoot;
75
75
  /**
@@ -91,15 +91,23 @@ interface QueryDevtoolsProps {
91
91
  */
92
92
  interface TanstackQueryDevtoolsConfig extends QueryDevtoolsProps {
93
93
  /**
94
- * Use this to pass a nonce to the style tag that is added to the document head. This is useful if
95
- * you are using a Content Security Policy (CSP) nonce to allow inline styles.
94
+ * @deprecated The devtools no longer add a `<style>` element, so they need no nonce. This option
95
+ * does nothing.
96
96
  */
97
97
  styleNonce?: string;
98
98
  /**
99
- * Use this to pass a shadow DOM target to the devtools so that the styles will be applied
100
- * within the shadow DOM instead of within the head tag in the light DOM.
99
+ * The shadow root to add the devtools styles to. By default, the styles are added to the shadow
100
+ * root the devtools render in, or to the document when they do not render in a shadow root.
101
101
  */
102
102
  shadowDOMTarget?: ShadowRoot;
103
+ /**
104
+ * The Trusted Types policy the devtools use to create their HTML templates.
105
+ * Pass one when your page enforces `require-trusted-types-for 'script'`.
106
+ * The devtools only pass it their own markup.
107
+ */
108
+ trustedTypesPolicy?: {
109
+ createHTML: (html: string) => unknown;
110
+ };
103
111
  }
104
112
  declare class TanstackQueryDevtools {
105
113
  #private;
@@ -118,15 +126,23 @@ declare class TanstackQueryDevtools {
118
126
  */
119
127
  interface TanstackQueryDevtoolsPanelConfig extends QueryDevtoolsProps {
120
128
  /**
121
- * Use this to pass a nonce to the style tag that is added to the document head. This is useful if
122
- * you are using a Content Security Policy (CSP) nonce to allow inline styles.
129
+ * @deprecated The devtools no longer add a `<style>` element, so they need no nonce. This option
130
+ * does nothing.
123
131
  */
124
132
  styleNonce?: string;
125
133
  /**
126
- * Use this to pass a shadow DOM target to the devtools so that the styles will be applied
127
- * within the shadow DOM instead of within the head tag in the light DOM.
134
+ * The shadow root to add the devtools styles to. By default, the styles are added to the shadow
135
+ * root the devtools render in, or to the document when they do not render in a shadow root.
128
136
  */
129
137
  shadowDOMTarget?: ShadowRoot;
138
+ /**
139
+ * The Trusted Types policy the devtools use to create their HTML templates.
140
+ * Pass one when your page enforces `require-trusted-types-for 'script'`.
141
+ * The devtools only pass it their own markup.
142
+ */
143
+ trustedTypesPolicy?: {
144
+ createHTML: (html: string) => unknown;
145
+ };
130
146
  /**
131
147
  * Callback function that is called when the devtools panel is closed.
132
148
  */
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.cts","names":[],"sources":["../src/contexts/types.ts","../src/TanstackQueryDevtools.tsx","../src/TanstackQueryDevtoolsPanel.tsx"],"mappings":";;;KAYK;KACA;;;;KAKO,mBAAmB,YAAY;;;;;KAK/B,4BAA4B,aAAa;;;;KAIzC;;;;UAKK;;;;EAIf;;;;EAIA,cAAc,OAAO,UAAU;;;;;;;UAQhB;;;;WAIN,QAAQ;;;;EAIjB;;;;EAIA;;;;EAIA,sBAAsB;;;;EAKtB,iBAAiB;;;;EAIjB,WAAW;;;;EAIX;;;;EAIA,aAAa,MAAM;;;;;EAKnB,kBAAkB;;;;;EAKlB;;;;EAIA;;;;EAIA,QAAQ;;;;;UC/EO,oCAAoC;;;;;EAKnD;;;;;EAKA,kBAAkB;;cAGd;;EAiBQ,YAAA,QAAQ;EA6BpB,kBAAkB,UAAU;EAI5B,YAAY,UAAU;EAItB,iBAAiB;EAIjB,cAAc,YAAY,MAAM;EAIhC,UAAU,QAAQ;EAIlB,SAAS,QAAQ;EAIjB,MAAM,UAAU,aAAa,IAAI;EA0DjC;;;;;UC7Ie,yCAAyC;;;;;EAKxD;;;;;EAKA,kBAAkB;;;;EAIlB;;cAGI;;EAkBQ,YAAA,QAAQ;EA+BpB,kBAAkB,UAAU;EAI5B,YAAY,UAAU;EAItB,iBAAiB;EAIjB,cAAc,YAAY,MAAM;EAIhC,UAAU,QAAQ;EAIlB,WAAW;EAIX,SAAS,QAAQ;EAIjB,MAAM,UAAU,aAAa,IAAI;EA8DjC"}
1
+ {"version":3,"file":"index.d.cts","names":[],"sources":["../src/contexts/types.ts","../src/TanstackQueryDevtools.tsx","../src/TanstackQueryDevtoolsPanel.tsx"],"mappings":";;;KAYK;KACA;;;;KAKO,mBAAmB,YAAY;;;;;KAK/B,4BAA4B,aAAa;;;;KAIzC;;;;UAKK;;;;EAIf;;;;EAIA,cAAc,OAAO,UAAU;;;;;;;UAQhB;;;;WAIN,QAAQ;;;;EAIjB;;;;EAIA;;;;EAIA,sBAAsB;;;;EAKtB,iBAAiB;;;;EAIjB,WAAW;;;;EAIX;;;;EAIA,aAAa,MAAM;;;;;EAKnB,kBAAkB;;;;;EAKlB;;;;EAIA;;;;EAIA,QAAQ;;;;;UChFO,oCAAoC;;;;;EAKnD;;;;;EAKA,kBAAkB;;;;;;EAMlB;IAAuB,aAAa;;;cAGhC;;EAiBQ,YAAA,QAAQ;EA6BpB,kBAAkB,UAAU;EAI5B,YAAY,UAAU;EAItB,iBAAiB;EAIjB,cAAc,YAAY,MAAM;EAIhC,UAAU,QAAQ;EAIlB,SAAS,QAAQ;EAIjB,MAAM,UAAU,aAAa,IAAI;EA8DjC;;;;;UCvJe,yCAAyC;;;;;EAKxD;;;;;EAKA,kBAAkB;;;;;;EAMlB;IAAuB,aAAa;;;;;EAIpC;;cAGI;;EAkBQ,YAAA,QAAQ;EA+BpB,kBAAkB,UAAU;EAI5B,YAAY,UAAU;EAItB,iBAAiB;EAIjB,cAAc,YAAY,MAAM;EAIhC,UAAU,QAAQ;EAIlB,WAAW;EAIX,SAAS,QAAQ;EAIjB,MAAM,UAAU,aAAa,IAAI;EAkEjC"}
package/build/index.d.ts CHANGED
@@ -68,8 +68,8 @@ interface QueryDevtoolsProps {
68
68
  */
69
69
  errorTypes?: Array<DevtoolsErrorType>;
70
70
  /**
71
- * Use this to pass a shadow DOM target to the devtools so that the styles will be applied
72
- * within the shadow DOM instead of within the head tag in the light DOM.
71
+ * The shadow root to add the devtools styles to. By default, the styles are added to the shadow
72
+ * root the devtools render in, or to the document when they do not render in a shadow root.
73
73
  */
74
74
  shadowDOMTarget?: ShadowRoot;
75
75
  /**
@@ -91,15 +91,23 @@ interface QueryDevtoolsProps {
91
91
  */
92
92
  interface TanstackQueryDevtoolsConfig extends QueryDevtoolsProps {
93
93
  /**
94
- * Use this to pass a nonce to the style tag that is added to the document head. This is useful if
95
- * you are using a Content Security Policy (CSP) nonce to allow inline styles.
94
+ * @deprecated The devtools no longer add a `<style>` element, so they need no nonce. This option
95
+ * does nothing.
96
96
  */
97
97
  styleNonce?: string;
98
98
  /**
99
- * Use this to pass a shadow DOM target to the devtools so that the styles will be applied
100
- * within the shadow DOM instead of within the head tag in the light DOM.
99
+ * The shadow root to add the devtools styles to. By default, the styles are added to the shadow
100
+ * root the devtools render in, or to the document when they do not render in a shadow root.
101
101
  */
102
102
  shadowDOMTarget?: ShadowRoot;
103
+ /**
104
+ * The Trusted Types policy the devtools use to create their HTML templates.
105
+ * Pass one when your page enforces `require-trusted-types-for 'script'`.
106
+ * The devtools only pass it their own markup.
107
+ */
108
+ trustedTypesPolicy?: {
109
+ createHTML: (html: string) => unknown;
110
+ };
103
111
  }
104
112
  declare class TanstackQueryDevtools {
105
113
  #private;
@@ -118,15 +126,23 @@ declare class TanstackQueryDevtools {
118
126
  */
119
127
  interface TanstackQueryDevtoolsPanelConfig extends QueryDevtoolsProps {
120
128
  /**
121
- * Use this to pass a nonce to the style tag that is added to the document head. This is useful if
122
- * you are using a Content Security Policy (CSP) nonce to allow inline styles.
129
+ * @deprecated The devtools no longer add a `<style>` element, so they need no nonce. This option
130
+ * does nothing.
123
131
  */
124
132
  styleNonce?: string;
125
133
  /**
126
- * Use this to pass a shadow DOM target to the devtools so that the styles will be applied
127
- * within the shadow DOM instead of within the head tag in the light DOM.
134
+ * The shadow root to add the devtools styles to. By default, the styles are added to the shadow
135
+ * root the devtools render in, or to the document when they do not render in a shadow root.
128
136
  */
129
137
  shadowDOMTarget?: ShadowRoot;
138
+ /**
139
+ * The Trusted Types policy the devtools use to create their HTML templates.
140
+ * Pass one when your page enforces `require-trusted-types-for 'script'`.
141
+ * The devtools only pass it their own markup.
142
+ */
143
+ trustedTypesPolicy?: {
144
+ createHTML: (html: string) => unknown;
145
+ };
130
146
  /**
131
147
  * Callback function that is called when the devtools panel is closed.
132
148
  */
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","names":[],"sources":["../src/contexts/types.ts","../src/TanstackQueryDevtools.tsx","../src/TanstackQueryDevtoolsPanel.tsx"],"mappings":";;;KAYK;KACA;;;;KAKO,mBAAmB,YAAY;;;;;KAK/B,4BAA4B,aAAa;;;;KAIzC;;;;UAKK;;;;EAIf;;;;EAIA,cAAc,OAAO,UAAU;;;;;;;UAQhB;;;;WAIN,QAAQ;;;;EAIjB;;;;EAIA;;;;EAIA,sBAAsB;;;;EAKtB,iBAAiB;;;;EAIjB,WAAW;;;;EAIX;;;;EAIA,aAAa,MAAM;;;;;EAKnB,kBAAkB;;;;;EAKlB;;;;EAIA;;;;EAIA,QAAQ;;;;;UC/EO,oCAAoC;;;;;EAKnD;;;;;EAKA,kBAAkB;;cAGd;;EAiBQ,YAAA,QAAQ;EA6BpB,kBAAkB,UAAU;EAI5B,YAAY,UAAU;EAItB,iBAAiB;EAIjB,cAAc,YAAY,MAAM;EAIhC,UAAU,QAAQ;EAIlB,SAAS,QAAQ;EAIjB,MAAM,UAAU,aAAa,IAAI;EA0DjC;;;;;UC7Ie,yCAAyC;;;;;EAKxD;;;;;EAKA,kBAAkB;;;;EAIlB;;cAGI;;EAkBQ,YAAA,QAAQ;EA+BpB,kBAAkB,UAAU;EAI5B,YAAY,UAAU;EAItB,iBAAiB;EAIjB,cAAc,YAAY,MAAM;EAIhC,UAAU,QAAQ;EAIlB,WAAW;EAIX,SAAS,QAAQ;EAIjB,MAAM,UAAU,aAAa,IAAI;EA8DjC"}
1
+ {"version":3,"file":"index.d.ts","names":[],"sources":["../src/contexts/types.ts","../src/TanstackQueryDevtools.tsx","../src/TanstackQueryDevtoolsPanel.tsx"],"mappings":";;;KAYK;KACA;;;;KAKO,mBAAmB,YAAY;;;;;KAK/B,4BAA4B,aAAa;;;;KAIzC;;;;UAKK;;;;EAIf;;;;EAIA,cAAc,OAAO,UAAU;;;;;;;UAQhB;;;;WAIN,QAAQ;;;;EAIjB;;;;EAIA;;;;EAIA,sBAAsB;;;;EAKtB,iBAAiB;;;;EAIjB,WAAW;;;;EAIX;;;;EAIA,aAAa,MAAM;;;;;EAKnB,kBAAkB;;;;;EAKlB;;;;EAIA;;;;EAIA,QAAQ;;;;;UChFO,oCAAoC;;;;;EAKnD;;;;;EAKA,kBAAkB;;;;;;EAMlB;IAAuB,aAAa;;;cAGhC;;EAiBQ,YAAA,QAAQ;EA6BpB,kBAAkB,UAAU;EAI5B,YAAY,UAAU;EAItB,iBAAiB;EAIjB,cAAc,YAAY,MAAM;EAIhC,UAAU,QAAQ;EAIlB,SAAS,QAAQ;EAIjB,MAAM,UAAU,aAAa,IAAI;EA8DjC;;;;;UCvJe,yCAAyC;;;;;EAKxD;;;;;EAKA,kBAAkB;;;;;;EAMlB;IAAuB,aAAa;;;;;EAIpC;;cAGI;;EAkBQ,YAAA,QAAQ;EA+BpB,kBAAkB,UAAU;EAI5B,YAAY,UAAU;EAItB,iBAAiB;EAIjB,cAAc,YAAY,MAAM;EAIhC,UAAU,QAAQ;EAIlB,WAAW;EAIX,SAAS,QAAQ;EAIjB,MAAM,UAAU,aAAa,IAAI;EAkEjC"}
package/build/index.js CHANGED
@@ -1,3 +1,3 @@
1
1
  /* @refresh skip */
2
- import{B as e,E as t,Q as n,Z as r,f as i,q as a}from"./utils-DC2pN79q.js";var o=class{#e;#t;#n;#r;#i=!1;#a;#o;#s;#c;#l;#u;#d;#f;#p;#m;constructor(e){let{client:t,queryFlavor:n,version:r,onlineManager:i,buttonPosition:o,position:s,initialIsOpen:c,errorTypes:l,styleNonce:u,shadowDOMTarget:d,hideDisabledQueries:f,theme:p}=e;this.#e=a(t),this.#n=n,this.#r=r,this.#t=i,this.#a=u,this.#o=d,this.#s=a(o),this.#c=a(s),this.#l=a(c),this.#u=a(l),this.#d=a(f),this.#p=a(p)}setButtonPosition(e){this.#s[1](e)}setPosition(e){this.#c[1](e)}setInitialIsOpen(e){this.#l[1](e)}setErrorTypes(e){this.#u[1](e)}setClient(e){this.#e[1](e)}setTheme(e){this.#p[1](e)}mount(a){if(this.#i)throw Error(`Devtools is already mounted`);let o=t(()=>{let t=this,[a]=this.#s,[o]=this.#c,[s]=this.#l,[c]=this.#u,[l]=this.#d,[u]=this.#e,[d]=this.#p,f;return this.#f?f=this.#f:(f=r(()=>import(`./DevtoolsComponent-CJG_H2ix.js`)),this.#f=f),i(this.#a,this.#o),e(f,n({get queryFlavor(){return t.#n},get version(){return t.#r},get onlineManager(){return t.#t},get shadowDOMTarget(){return t.#o}},{get client(){return u()},get buttonPosition(){return a()},get position(){return o()},get initialIsOpen(){return s()},get errorTypes(){return c()},get hideDisabledQueries(){return l()},get theme(){return d()}}))},a);this.#i=!0,this.#m=o}unmount(){if(!this.#i)throw Error(`Devtools is not mounted`);this.#m?.(),this.#i=!1}},s=class{#e;#t;#n;#r;#i=!1;#a;#o;#s;#c;#l;#u;#d;#f;#p;#m;#h;constructor(e){let{client:t,queryFlavor:n,version:r,onlineManager:i,buttonPosition:o,position:s,initialIsOpen:c,errorTypes:l,styleNonce:u,shadowDOMTarget:d,onClose:f,hideDisabledQueries:p,theme:m}=e;this.#e=a(t),this.#n=n,this.#r=r,this.#t=i,this.#a=u,this.#o=d,this.#s=a(o),this.#c=a(s),this.#l=a(c),this.#u=a(l),this.#d=a(p),this.#f=a(f),this.#m=a(m)}setButtonPosition(e){this.#s[1](e)}setPosition(e){this.#c[1](e)}setInitialIsOpen(e){this.#l[1](e)}setErrorTypes(e){this.#u[1](e)}setClient(e){this.#e[1](e)}setOnClose(e){this.#f[1](()=>e)}setTheme(e){this.#m[1](e)}mount(a){if(this.#i)throw Error(`Devtools is already mounted`);let o=t(()=>{let t=this,[a]=this.#s,[o]=this.#c,[s]=this.#l,[c]=this.#u,[l]=this.#d,[u]=this.#e,[d]=this.#f,[f]=this.#m,p;return this.#p?p=this.#p:(p=r(()=>import(`./DevtoolsPanelComponent-By2KdGQW.js`)),this.#p=p),i(this.#a,this.#o),e(p,n({get queryFlavor(){return t.#n},get version(){return t.#r},get onlineManager(){return t.#t},get shadowDOMTarget(){return t.#o}},{get client(){return u()},get buttonPosition(){return a()},get position(){return o()},get initialIsOpen(){return s()},get errorTypes(){return c()},get hideDisabledQueries(){return l()},get onClose(){return d()},get theme(){return f()}}))},a);this.#i=!0,this.#h=o}unmount(){if(!this.#i)throw Error(`Devtools is not mounted`);this.#h?.(),this.#i=!1}};export{o as TanstackQueryDevtools,s as TanstackQueryDevtoolsPanel};
2
+ import{F as e,I as t,f as n,j as r,l as i,w as a}from"./web-da-lPyZC.js";var o=class{#e;#t;#n;#r;#i=!1;#a;#o;#s;#c;#l;#u;#d;#f;#p;#m;constructor(e){let{client:t,queryFlavor:n,version:i,onlineManager:a,buttonPosition:o,position:s,initialIsOpen:c,errorTypes:l,shadowDOMTarget:u,trustedTypesPolicy:d,hideDisabledQueries:f,theme:p}=e;this.#e=r(t),this.#n=n,this.#r=i,this.#t=a,this.#a=u,this.#o=d,this.#s=r(o),this.#c=r(s),this.#l=r(c),this.#u=r(l),this.#d=r(f),this.#p=r(p)}setButtonPosition(e){this.#s[1](e)}setPosition(e){this.#c[1](e)}setInitialIsOpen(e){this.#l[1](e)}setErrorTypes(e){this.#u[1](e)}setClient(e){this.#e[1](e)}setTheme(e){this.#p[1](e)}mount(r){if(this.#i)throw Error(`Devtools is already mounted`);this.#o&&n(this.#o);let o=i(()=>{let n=this,[r]=this.#s,[i]=this.#c,[o]=this.#l,[s]=this.#u,[c]=this.#d,[l]=this.#e,[u]=this.#p,d;return this.#f?d=this.#f:(d=e(()=>import(`./DevtoolsComponent-KaCCT4mO.js`)),this.#f=d),a(d,t({get queryFlavor(){return n.#n},get version(){return n.#r},get onlineManager(){return n.#t},get shadowDOMTarget(){return n.#a}},{get client(){return l()},get buttonPosition(){return r()},get position(){return i()},get initialIsOpen(){return o()},get errorTypes(){return s()},get hideDisabledQueries(){return c()},get theme(){return u()}}))},r);this.#i=!0,this.#m=o}unmount(){if(!this.#i)throw Error(`Devtools is not mounted`);this.#m?.(),this.#i=!1}},s=class{#e;#t;#n;#r;#i=!1;#a;#o;#s;#c;#l;#u;#d;#f;#p;#m;#h;constructor(e){let{client:t,queryFlavor:n,version:i,onlineManager:a,buttonPosition:o,position:s,initialIsOpen:c,errorTypes:l,shadowDOMTarget:u,trustedTypesPolicy:d,onClose:f,hideDisabledQueries:p,theme:m}=e;this.#e=r(t),this.#n=n,this.#r=i,this.#t=a,this.#a=u,this.#o=d,this.#s=r(o),this.#c=r(s),this.#l=r(c),this.#u=r(l),this.#d=r(p),this.#f=r(f),this.#m=r(m)}setButtonPosition(e){this.#s[1](e)}setPosition(e){this.#c[1](e)}setInitialIsOpen(e){this.#l[1](e)}setErrorTypes(e){this.#u[1](e)}setClient(e){this.#e[1](e)}setOnClose(e){this.#f[1](()=>e)}setTheme(e){this.#m[1](e)}mount(r){if(this.#i)throw Error(`Devtools is already mounted`);this.#o&&n(this.#o);let o=i(()=>{let n=this,[r]=this.#s,[i]=this.#c,[o]=this.#l,[s]=this.#u,[c]=this.#d,[l]=this.#e,[u]=this.#f,[d]=this.#m,f;return this.#p?f=this.#p:(f=e(()=>import(`./DevtoolsPanelComponent-1en47poS.js`)),this.#p=f),a(f,t({get queryFlavor(){return n.#n},get version(){return n.#r},get onlineManager(){return n.#t},get shadowDOMTarget(){return n.#a}},{get client(){return l()},get buttonPosition(){return r()},get position(){return i()},get initialIsOpen(){return o()},get errorTypes(){return s()},get hideDisabledQueries(){return c()},get onClose(){return u()},get theme(){return d()}}))},r);this.#i=!0,this.#h=o}unmount(){if(!this.#i)throw Error(`Devtools is not mounted`);this.#h?.(),this.#i=!1}};export{o as TanstackQueryDevtools,s as TanstackQueryDevtoolsPanel};
3
3
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["createSignal","lazy","render","setupStyleSheet","onlineManager","styleNonce","shadowDOMTarget","TanstackQueryDevtools","client","queryFlavor","version","buttonPosition","position","initialIsOpen","errorTypes","hideDisabledQueries","theme","dispose","constructor","config","setButtonPosition","setPosition","setInitialIsOpen","isOpen","setErrorTypes","setClient","setTheme","mount","el","Error","_self$","btnPosition","pos","errors","queryClient","Devtools","_$createComponent","_$mergeProps","unmount","createSignal","lazy","render","setupStyleSheet","onlineManager","styleNonce","shadowDOMTarget","onClose","TanstackQueryDevtoolsPanel","client","queryFlavor","version","buttonPosition","position","initialIsOpen","errorTypes","hideDisabledQueries","theme","dispose","constructor","config","setButtonPosition","setPosition","setInitialIsOpen","isOpen","setErrorTypes","setClient","setOnClose","setTheme","mount","el","Error","_self$","btnPosition","pos","errors","queryClient","Devtools","_$createComponent","_$mergeProps","unmount","createComponent","render","mergeProps","lazy","setupStyleSheet","createSignal","TanstackQueryDevtools","config","#client","client","#queryFlavor","queryFlavor","#version","version","#onlineManager","onlineManager","#styleNonce","styleNonce","#shadowDOMTarget","shadowDOMTarget","#buttonPosition","buttonPosition","#position","position","#initialIsOpen","initialIsOpen","#errorTypes","errorTypes","#hideDisabledQueries","hideDisabledQueries","#theme","theme","isOpen","#isMounted","dispose","_self$","btnPosition","pos","errors","queryClient","Devtools","#Component","el","#dispose","TanstackQueryDevtoolsPanel","#onClose","onClose"],"sources":["../src/TanstackQueryDevtools.tsx","../src/TanstackQueryDevtoolsPanel.tsx"],"sourcesContent":["import { createSignal, lazy } from 'solid-js'\nimport { render } from 'solid-js/web'\nimport { setupStyleSheet } from './utils'\nimport type {\n QueryClient,\n onlineManager as TOnlineManager,\n} from '@tanstack/query-core'\nimport type { Signal } from 'solid-js'\nimport type { DevtoolsComponentType } from './Devtools'\nimport type {\n DevtoolsButtonPosition,\n DevtoolsErrorType,\n DevtoolsPosition,\n QueryDevtoolsProps,\n Theme,\n} from './contexts/types'\n\n/**\n * The options for `TanstackQueryDevtools`, which mounts the floating devtools.\n */\nexport interface TanstackQueryDevtoolsConfig extends QueryDevtoolsProps {\n /**\n * Use this to pass a nonce to the style tag that is added to the document head. This is useful if\n * 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\nclass TanstackQueryDevtools {\n #client: Signal<QueryClient>\n #onlineManager: typeof TOnlineManager\n #queryFlavor: string\n #version: string\n #isMounted = false\n #styleNonce?: string\n #shadowDOMTarget?: ShadowRoot\n #buttonPosition: Signal<DevtoolsButtonPosition | undefined>\n #position: Signal<DevtoolsPosition | undefined>\n #initialIsOpen: Signal<boolean | undefined>\n #errorTypes: Signal<Array<DevtoolsErrorType> | undefined>\n #hideDisabledQueries: Signal<boolean | undefined>\n #Component: DevtoolsComponentType | undefined\n #theme: Signal<Theme | undefined>\n #dispose?: () => void\n\n constructor(config: TanstackQueryDevtoolsConfig) {\n const {\n client,\n queryFlavor,\n version,\n onlineManager,\n buttonPosition,\n position,\n initialIsOpen,\n errorTypes,\n styleNonce,\n shadowDOMTarget,\n hideDisabledQueries,\n theme,\n } = config\n this.#client = createSignal(client)\n this.#queryFlavor = queryFlavor\n this.#version = version\n this.#onlineManager = onlineManager\n this.#styleNonce = styleNonce\n this.#shadowDOMTarget = shadowDOMTarget\n this.#buttonPosition = createSignal(buttonPosition)\n this.#position = createSignal(position)\n this.#initialIsOpen = createSignal(initialIsOpen)\n this.#errorTypes = createSignal(errorTypes)\n this.#hideDisabledQueries = createSignal(hideDisabledQueries)\n this.#theme = createSignal(theme)\n }\n\n setButtonPosition(position: DevtoolsButtonPosition) {\n this.#buttonPosition[1](position)\n }\n\n setPosition(position: DevtoolsPosition) {\n this.#position[1](position)\n }\n\n setInitialIsOpen(isOpen: boolean) {\n this.#initialIsOpen[1](isOpen)\n }\n\n setErrorTypes(errorTypes: Array<DevtoolsErrorType>) {\n this.#errorTypes[1](errorTypes)\n }\n\n setClient(client: QueryClient) {\n this.#client[1](client)\n }\n\n setTheme(theme?: Theme) {\n this.#theme[1](theme)\n }\n\n mount<T extends HTMLElement>(el: T) {\n if (this.#isMounted) {\n throw new Error('Devtools is already mounted')\n }\n const dispose = render(() => {\n const [btnPosition] = this.#buttonPosition\n const [pos] = this.#position\n const [isOpen] = this.#initialIsOpen\n const [errors] = this.#errorTypes\n const [hideDisabledQueries] = this.#hideDisabledQueries\n const [queryClient] = this.#client\n const [theme] = this.#theme\n let Devtools: DevtoolsComponentType\n\n if (this.#Component) {\n Devtools = this.#Component\n } else {\n Devtools = lazy(() => import('./DevtoolsComponent'))\n this.#Component = Devtools\n }\n\n setupStyleSheet(this.#styleNonce, this.#shadowDOMTarget)\n return (\n <Devtools\n queryFlavor={this.#queryFlavor}\n version={this.#version}\n onlineManager={this.#onlineManager}\n shadowDOMTarget={this.#shadowDOMTarget}\n {...{\n get client() {\n return queryClient()\n },\n get buttonPosition() {\n return btnPosition()\n },\n get position() {\n return pos()\n },\n get initialIsOpen() {\n return isOpen()\n },\n get errorTypes() {\n return errors()\n },\n get hideDisabledQueries() {\n return hideDisabledQueries()\n },\n get theme() {\n return theme()\n },\n }}\n />\n )\n }, el)\n this.#isMounted = true\n this.#dispose = dispose\n }\n\n unmount() {\n if (!this.#isMounted) {\n throw new Error('Devtools is not mounted')\n }\n this.#dispose?.()\n this.#isMounted = false\n }\n}\n\nexport { TanstackQueryDevtools }\n","import { createSignal, lazy } from 'solid-js'\nimport { render } from 'solid-js/web'\nimport { setupStyleSheet } from './utils'\nimport type {\n QueryClient,\n onlineManager as TOnlineManager,\n} from '@tanstack/query-core'\nimport type { Signal } from 'solid-js'\nimport type { DevtoolsComponentType } from './Devtools'\nimport type {\n DevtoolsButtonPosition,\n DevtoolsErrorType,\n DevtoolsPosition,\n QueryDevtoolsProps,\n Theme,\n} from './contexts/types'\n\n/**\n * The options for `TanstackQueryDevtoolsPanel`, which mounts the devtools as an embedded panel.\n */\nexport interface TanstackQueryDevtoolsPanelConfig extends QueryDevtoolsProps {\n /**\n * Use this to pass a nonce to the style tag that is added to the document head. This is useful if\n * 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 * Callback function that is called when the devtools panel is closed.\n */\n onClose?: () => void\n}\n\nclass TanstackQueryDevtoolsPanel {\n #client: Signal<QueryClient>\n #onlineManager: typeof TOnlineManager\n #queryFlavor: string\n #version: string\n #isMounted = false\n #styleNonce?: string\n #shadowDOMTarget?: ShadowRoot\n #buttonPosition: Signal<DevtoolsButtonPosition | undefined>\n #position: Signal<DevtoolsPosition | undefined>\n #initialIsOpen: Signal<boolean | undefined>\n #errorTypes: Signal<Array<DevtoolsErrorType> | undefined>\n #hideDisabledQueries: Signal<boolean | undefined>\n #onClose: Signal<(() => void) | undefined>\n #Component: DevtoolsComponentType | undefined\n #theme: Signal<Theme | undefined>\n #dispose?: () => void\n\n constructor(config: TanstackQueryDevtoolsPanelConfig) {\n const {\n client,\n queryFlavor,\n version,\n onlineManager,\n buttonPosition,\n position,\n initialIsOpen,\n errorTypes,\n styleNonce,\n shadowDOMTarget,\n onClose,\n hideDisabledQueries,\n theme,\n } = config\n this.#client = createSignal(client)\n this.#queryFlavor = queryFlavor\n this.#version = version\n this.#onlineManager = onlineManager\n this.#styleNonce = styleNonce\n this.#shadowDOMTarget = shadowDOMTarget\n this.#buttonPosition = createSignal(buttonPosition)\n this.#position = createSignal(position)\n this.#initialIsOpen = createSignal(initialIsOpen)\n this.#errorTypes = createSignal(errorTypes)\n this.#hideDisabledQueries = createSignal(hideDisabledQueries)\n this.#onClose = createSignal(onClose)\n this.#theme = createSignal(theme)\n }\n\n setButtonPosition(position: DevtoolsButtonPosition) {\n this.#buttonPosition[1](position)\n }\n\n setPosition(position: DevtoolsPosition) {\n this.#position[1](position)\n }\n\n setInitialIsOpen(isOpen: boolean) {\n this.#initialIsOpen[1](isOpen)\n }\n\n setErrorTypes(errorTypes: Array<DevtoolsErrorType>) {\n this.#errorTypes[1](errorTypes)\n }\n\n setClient(client: QueryClient) {\n this.#client[1](client)\n }\n\n setOnClose(onClose: () => void) {\n this.#onClose[1](() => onClose)\n }\n\n setTheme(theme?: Theme) {\n this.#theme[1](theme)\n }\n\n mount<T extends HTMLElement>(el: T) {\n if (this.#isMounted) {\n throw new Error('Devtools is already mounted')\n }\n const dispose = render(() => {\n const [btnPosition] = this.#buttonPosition\n const [pos] = this.#position\n const [isOpen] = this.#initialIsOpen\n const [errors] = this.#errorTypes\n const [hideDisabledQueries] = this.#hideDisabledQueries\n const [queryClient] = this.#client\n const [onClose] = this.#onClose\n const [theme] = this.#theme\n let Devtools: DevtoolsComponentType\n\n if (this.#Component) {\n Devtools = this.#Component\n } else {\n Devtools = lazy(() => import('./DevtoolsPanelComponent'))\n this.#Component = Devtools\n }\n\n setupStyleSheet(this.#styleNonce, this.#shadowDOMTarget)\n return (\n <Devtools\n queryFlavor={this.#queryFlavor}\n version={this.#version}\n onlineManager={this.#onlineManager}\n shadowDOMTarget={this.#shadowDOMTarget}\n {...{\n get client() {\n return queryClient()\n },\n get buttonPosition() {\n return btnPosition()\n },\n get position() {\n return pos()\n },\n get initialIsOpen() {\n return isOpen()\n },\n get errorTypes() {\n return errors()\n },\n get hideDisabledQueries() {\n return hideDisabledQueries()\n },\n get onClose() {\n return onClose()\n },\n get theme() {\n return theme()\n },\n }}\n />\n )\n }, el)\n this.#isMounted = true\n this.#dispose = dispose\n }\n\n unmount() {\n if (!this.#isMounted) {\n throw new Error('Devtools is not mounted')\n }\n this.#dispose?.()\n this.#isMounted = false\n }\n}\n\nexport { TanstackQueryDevtoolsPanel }\n"],"mappings":";A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AC1C,GAAW,KAAK+E,GACjB,CAACrE,GAAS,KAAKsD,GACjBlC,EAUJ,OARI,KAAK6C,GACP7C,EAAW,KAAK6C,IAEhB7C,EAAWpC,MAAW,OAAO,uCAA2B,EACxD,KAAKiF,GAAa7C,GAGpBlC,EAAgB,KAAKsD,GAAa,KAAKE,EAAgB,EACvDrB,EACGD,EAAQE,EAAA,CAAA,IACP7B,aAAW,CAAA,OAAEsB,EAAKmB,EAAY,EAAA,IAC9BxC,SAAO,CAAA,OAAEqB,EAAKqB,EAAQ,EAAA,IACtBjD,eAAa,CAAA,OAAE4B,EAAKuB,EAAc,EAAA,IAClCjD,iBAAe,CAAA,OAAE0B,EAAK2B,EAAgB,CAAA,EAClC,CACF,IAAIlD,QAAS,CACX,OAAO2B,EAAY,CACrB,EACA,IAAIxB,gBAAiB,CACnB,OAAOqB,EAAY,CACrB,EACA,IAAIpB,UAAW,CACb,OAAOqB,EAAI,CACb,EACA,IAAIpB,eAAgB,CAClB,OAAOU,EAAO,CAChB,EACA,IAAIT,YAAa,CACf,OAAOoB,EAAO,CAChB,EACA,IAAInB,qBAAsB,CACxB,OAAOA,EAAoB,CAC7B,EACA,IAAIT,SAAU,CACZ,OAAOA,EAAQ,CACjB,EACA,IAAIU,OAAQ,CACV,OAAOA,EAAM,CACf,CACF,CAAC,CAAA,CAGP,EAAGa,CAAE,EACL,KAAK4C,GAAa,GAClB,KAAKU,GAAWlE,CAClB,CAEAsB,SAAU,CACR,GAAI,CAAC,KAAKkC,GACR,MAAU3C,MAAM,yBAAyB,EAE3C,KAAKqD,KAAW,EAChB,KAAKV,GAAa,EACpB,CACF,E"}
1
+ {"version":3,"file":"index.js","names":["createSignal","lazy","render","setTrustedTypesPolicy","onlineManager","shadowDOMTarget","trustedTypesPolicy","TanstackQueryDevtools","client","queryFlavor","version","buttonPosition","position","initialIsOpen","errorTypes","hideDisabledQueries","theme","dispose","constructor","config","setButtonPosition","setPosition","setInitialIsOpen","isOpen","setErrorTypes","setClient","setTheme","mount","el","Error","_self$","btnPosition","pos","errors","queryClient","Devtools","_$createComponent","_$mergeProps","unmount","createSignal","lazy","render","setTrustedTypesPolicy","onlineManager","shadowDOMTarget","trustedTypesPolicy","onClose","TanstackQueryDevtoolsPanel","client","queryFlavor","version","buttonPosition","position","initialIsOpen","errorTypes","hideDisabledQueries","theme","dispose","constructor","config","setButtonPosition","setPosition","setInitialIsOpen","isOpen","setErrorTypes","setClient","setOnClose","setTheme","mount","el","Error","_self$","btnPosition","pos","errors","queryClient","Devtools","_$createComponent","_$mergeProps","unmount","lazy","mergeProps","setTrustedTypesPolicy","createSignal","render","createComponent","TanstackQueryDevtools","config","#client","client","#queryFlavor","queryFlavor","#version","version","#onlineManager","onlineManager","#shadowDOMTarget","shadowDOMTarget","#trustedTypesPolicy","trustedTypesPolicy","#buttonPosition","buttonPosition","#position","position","#initialIsOpen","initialIsOpen","#errorTypes","errorTypes","#hideDisabledQueries","hideDisabledQueries","#theme","theme","isOpen","#isMounted","dispose","_self$","btnPosition","pos","errors","queryClient","Devtools","#Component","el","#dispose","TanstackQueryDevtoolsPanel","#onClose","onClose"],"sources":["../src/TanstackQueryDevtools.tsx","../src/TanstackQueryDevtoolsPanel.tsx"],"sourcesContent":["import { createSignal, lazy } from 'solid-js'\nimport { render, setTrustedTypesPolicy } from 'solid-js/web'\nimport type {\n QueryClient,\n onlineManager as TOnlineManager,\n} from '@tanstack/query-core'\nimport type { Signal } from 'solid-js'\nimport type { DevtoolsComponentType } from './Devtools'\nimport type {\n DevtoolsButtonPosition,\n DevtoolsErrorType,\n DevtoolsPosition,\n QueryDevtoolsProps,\n Theme,\n} from './contexts/types'\n\n/**\n * The options for `TanstackQueryDevtools`, which mounts the floating devtools.\n */\nexport interface TanstackQueryDevtoolsConfig extends QueryDevtoolsProps {\n /**\n * @deprecated The devtools no longer add a `<style>` element, so they need no nonce. This option\n * does nothing.\n */\n styleNonce?: string\n /**\n * The shadow root to add the devtools styles to. By default, the styles are added to the shadow\n * root the devtools render in, or to the document when 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\nclass TanstackQueryDevtools {\n #client: Signal<QueryClient>\n #onlineManager: typeof TOnlineManager\n #queryFlavor: string\n #version: string\n #isMounted = false\n #shadowDOMTarget?: ShadowRoot\n #trustedTypesPolicy?: { createHTML: (html: string) => unknown }\n #buttonPosition: Signal<DevtoolsButtonPosition | undefined>\n #position: Signal<DevtoolsPosition | undefined>\n #initialIsOpen: Signal<boolean | undefined>\n #errorTypes: Signal<Array<DevtoolsErrorType> | undefined>\n #hideDisabledQueries: Signal<boolean | undefined>\n #Component: DevtoolsComponentType | undefined\n #theme: Signal<Theme | undefined>\n #dispose?: () => void\n\n constructor(config: TanstackQueryDevtoolsConfig) {\n const {\n client,\n queryFlavor,\n version,\n onlineManager,\n buttonPosition,\n position,\n initialIsOpen,\n errorTypes,\n shadowDOMTarget,\n trustedTypesPolicy,\n hideDisabledQueries,\n theme,\n } = config\n this.#client = createSignal(client)\n this.#queryFlavor = queryFlavor\n this.#version = version\n this.#onlineManager = onlineManager\n this.#shadowDOMTarget = shadowDOMTarget\n this.#trustedTypesPolicy = trustedTypesPolicy\n this.#buttonPosition = createSignal(buttonPosition)\n this.#position = createSignal(position)\n this.#initialIsOpen = createSignal(initialIsOpen)\n this.#errorTypes = createSignal(errorTypes)\n this.#hideDisabledQueries = createSignal(hideDisabledQueries)\n this.#theme = createSignal(theme)\n }\n\n setButtonPosition(position: DevtoolsButtonPosition) {\n this.#buttonPosition[1](position)\n }\n\n setPosition(position: DevtoolsPosition) {\n this.#position[1](position)\n }\n\n setInitialIsOpen(isOpen: boolean) {\n this.#initialIsOpen[1](isOpen)\n }\n\n setErrorTypes(errorTypes: Array<DevtoolsErrorType>) {\n this.#errorTypes[1](errorTypes)\n }\n\n setClient(client: QueryClient) {\n this.#client[1](client)\n }\n\n setTheme(theme?: Theme) {\n this.#theme[1](theme)\n }\n\n mount<T extends HTMLElement>(el: T) {\n if (this.#isMounted) {\n throw new Error('Devtools is already mounted')\n }\n // Solid creates each template once, so set the policy before rendering.\n // It is shared by every devtools instance, so never reset it.\n if (this.#trustedTypesPolicy) {\n setTrustedTypesPolicy(this.#trustedTypesPolicy)\n }\n const dispose = render(() => {\n const [btnPosition] = this.#buttonPosition\n const [pos] = this.#position\n const [isOpen] = this.#initialIsOpen\n const [errors] = this.#errorTypes\n const [hideDisabledQueries] = this.#hideDisabledQueries\n const [queryClient] = this.#client\n const [theme] = this.#theme\n let Devtools: DevtoolsComponentType\n\n if (this.#Component) {\n Devtools = this.#Component\n } else {\n Devtools = lazy(() => import('./DevtoolsComponent'))\n this.#Component = Devtools\n }\n\n return (\n <Devtools\n queryFlavor={this.#queryFlavor}\n version={this.#version}\n onlineManager={this.#onlineManager}\n shadowDOMTarget={this.#shadowDOMTarget}\n {...{\n get client() {\n return queryClient()\n },\n get buttonPosition() {\n return btnPosition()\n },\n get position() {\n return pos()\n },\n get initialIsOpen() {\n return isOpen()\n },\n get errorTypes() {\n return errors()\n },\n get hideDisabledQueries() {\n return hideDisabledQueries()\n },\n get theme() {\n return theme()\n },\n }}\n />\n )\n }, el)\n this.#isMounted = true\n this.#dispose = dispose\n }\n\n unmount() {\n if (!this.#isMounted) {\n throw new Error('Devtools is not mounted')\n }\n this.#dispose?.()\n this.#isMounted = false\n }\n}\n\nexport { TanstackQueryDevtools }\n","import { createSignal, lazy } from 'solid-js'\nimport { render, setTrustedTypesPolicy } from 'solid-js/web'\nimport type {\n QueryClient,\n onlineManager as TOnlineManager,\n} from '@tanstack/query-core'\nimport type { Signal } from 'solid-js'\nimport type { DevtoolsComponentType } from './Devtools'\nimport type {\n DevtoolsButtonPosition,\n DevtoolsErrorType,\n DevtoolsPosition,\n QueryDevtoolsProps,\n Theme,\n} from './contexts/types'\n\n/**\n * The options for `TanstackQueryDevtoolsPanel`, which mounts the devtools as an embedded panel.\n */\nexport interface TanstackQueryDevtoolsPanelConfig extends QueryDevtoolsProps {\n /**\n * @deprecated The devtools no longer add a `<style>` element, so they need no nonce. This option\n * does nothing.\n */\n styleNonce?: string\n /**\n * The shadow root to add the devtools styles to. By default, the styles are added to the shadow\n * root the devtools render in, or to the document when 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 * Callback function that is called when the devtools panel is closed.\n */\n onClose?: () => void\n}\n\nclass TanstackQueryDevtoolsPanel {\n #client: Signal<QueryClient>\n #onlineManager: typeof TOnlineManager\n #queryFlavor: string\n #version: string\n #isMounted = false\n #shadowDOMTarget?: ShadowRoot\n #trustedTypesPolicy?: { createHTML: (html: string) => unknown }\n #buttonPosition: Signal<DevtoolsButtonPosition | undefined>\n #position: Signal<DevtoolsPosition | undefined>\n #initialIsOpen: Signal<boolean | undefined>\n #errorTypes: Signal<Array<DevtoolsErrorType> | undefined>\n #hideDisabledQueries: Signal<boolean | undefined>\n #onClose: Signal<(() => void) | undefined>\n #Component: DevtoolsComponentType | undefined\n #theme: Signal<Theme | undefined>\n #dispose?: () => void\n\n constructor(config: TanstackQueryDevtoolsPanelConfig) {\n const {\n client,\n queryFlavor,\n version,\n onlineManager,\n buttonPosition,\n position,\n initialIsOpen,\n errorTypes,\n shadowDOMTarget,\n trustedTypesPolicy,\n onClose,\n hideDisabledQueries,\n theme,\n } = config\n this.#client = createSignal(client)\n this.#queryFlavor = queryFlavor\n this.#version = version\n this.#onlineManager = onlineManager\n this.#shadowDOMTarget = shadowDOMTarget\n this.#trustedTypesPolicy = trustedTypesPolicy\n this.#buttonPosition = createSignal(buttonPosition)\n this.#position = createSignal(position)\n this.#initialIsOpen = createSignal(initialIsOpen)\n this.#errorTypes = createSignal(errorTypes)\n this.#hideDisabledQueries = createSignal(hideDisabledQueries)\n this.#onClose = createSignal(onClose)\n this.#theme = createSignal(theme)\n }\n\n setButtonPosition(position: DevtoolsButtonPosition) {\n this.#buttonPosition[1](position)\n }\n\n setPosition(position: DevtoolsPosition) {\n this.#position[1](position)\n }\n\n setInitialIsOpen(isOpen: boolean) {\n this.#initialIsOpen[1](isOpen)\n }\n\n setErrorTypes(errorTypes: Array<DevtoolsErrorType>) {\n this.#errorTypes[1](errorTypes)\n }\n\n setClient(client: QueryClient) {\n this.#client[1](client)\n }\n\n setOnClose(onClose: () => void) {\n this.#onClose[1](() => onClose)\n }\n\n setTheme(theme?: Theme) {\n this.#theme[1](theme)\n }\n\n mount<T extends HTMLElement>(el: T) {\n if (this.#isMounted) {\n throw new Error('Devtools is already mounted')\n }\n // Solid creates each template once, so set the policy before rendering.\n // It is shared by every devtools instance, so never reset it.\n if (this.#trustedTypesPolicy) {\n setTrustedTypesPolicy(this.#trustedTypesPolicy)\n }\n const dispose = render(() => {\n const [btnPosition] = this.#buttonPosition\n const [pos] = this.#position\n const [isOpen] = this.#initialIsOpen\n const [errors] = this.#errorTypes\n const [hideDisabledQueries] = this.#hideDisabledQueries\n const [queryClient] = this.#client\n const [onClose] = this.#onClose\n const [theme] = this.#theme\n let Devtools: DevtoolsComponentType\n\n if (this.#Component) {\n Devtools = this.#Component\n } else {\n Devtools = lazy(() => import('./DevtoolsPanelComponent'))\n this.#Component = Devtools\n }\n\n return (\n <Devtools\n queryFlavor={this.#queryFlavor}\n version={this.#version}\n onlineManager={this.#onlineManager}\n shadowDOMTarget={this.#shadowDOMTarget}\n {...{\n get client() {\n return queryClient()\n },\n get buttonPosition() {\n return btnPosition()\n },\n get position() {\n return pos()\n },\n get initialIsOpen() {\n return isOpen()\n },\n get errorTypes() {\n return errors()\n },\n get hideDisabledQueries() {\n return hideDisabledQueries()\n },\n get onClose() {\n return onClose()\n },\n get theme() {\n return theme()\n },\n }}\n />\n )\n }, el)\n this.#isMounted = true\n this.#dispose = dispose\n }\n\n unmount() {\n if (!this.#isMounted) {\n throw new Error('Devtools is not mounted')\n }\n this.#dispose?.()\n this.#isMounted = false\n }\n}\n\nexport { TanstackQueryDevtoolsPanel }\n"],"mappings":";A,yEAsCA,IAAMO,EAAN,KAA4B,CAC1B,GACA,GACA,GACA,GACA,GAAa,GACb,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GAEAW,YAAYC,EAAqC,CAC/C,GAAM,CACJX,SACAC,cACAC,UACAN,gBACAO,iBACAC,WACAC,gBACAC,aACAT,kBACAC,qBACAS,sBACAC,SACEG,EACJ,KAAKqE,GAAUxF,EAAaQ,CAAM,EAClC,KAAKkF,GAAejF,EACpB,KAAKmF,GAAWlF,EAChB,KAAKoF,GAAiB1F,EACtB,KAAK4F,GAAmB3F,EACxB,KAAK6F,GAAsB5F,EAC3B,KAAK8F,GAAkBpG,EAAaW,CAAc,EAClD,KAAK2F,GAAYtG,EAAaY,CAAQ,EACtC,KAAK4F,GAAiBxG,EAAaa,CAAa,EAChD,KAAK6F,GAAc1G,EAAac,CAAU,EAC1C,KAAK8F,GAAuB5G,EAAae,CAAmB,EAC5D,KAAK+F,GAAS9G,EAAagB,CAAK,CAClC,CAEAI,kBAAkBR,EAAkC,CAClD,KAAKwF,GAAgB,EAAE,CAACxF,CAAQ,CAClC,CAEAS,YAAYT,EAA4B,CACtC,KAAK0F,GAAU,EAAE,CAAC1F,CAAQ,CAC5B,CAEAU,iBAAiBC,EAAiB,CAChC,KAAKiF,GAAe,EAAE,CAACjF,CAAM,CAC/B,CAEAC,cAAcV,EAAsC,CAClD,KAAK4F,GAAY,EAAE,CAAC5F,CAAU,CAChC,CAEAW,UAAUjB,EAAqB,CAC7B,KAAKgF,GAAQ,EAAE,CAAChF,CAAM,CACxB,CAEAkB,SAASV,EAAe,CACtB,KAAK8F,GAAO,EAAE,CAAC9F,CAAK,CACtB,CAE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