@tanstack/solid-query-devtools 5.91.2 → 5.94.4

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tanstack/solid-query-devtools",
3
- "version": "5.91.2",
3
+ "version": "5.94.4",
4
4
  "description": "Developer tools to interact with and visualize the TanStack/solid-query Query cache",
5
5
  "author": "tannerlinsley",
6
6
  "license": "MIT",
@@ -44,7 +44,7 @@
44
44
  "!src/__tests__"
45
45
  ],
46
46
  "dependencies": {
47
- "@tanstack/query-devtools": "5.92.0"
47
+ "@tanstack/query-devtools": "5.94.4"
48
48
  },
49
49
  "devDependencies": {
50
50
  "@solidjs/testing-library": "^0.8.10",
@@ -52,25 +52,24 @@
52
52
  "solid-js": "^1.9.7",
53
53
  "tsup-preset-solid": "^2.2.0",
54
54
  "vite-plugin-solid": "^2.11.6",
55
- "@tanstack/solid-query": "5.90.17"
55
+ "@tanstack/solid-query": "5.94.4"
56
56
  },
57
57
  "peerDependencies": {
58
58
  "solid-js": "^1.6.0",
59
- "@tanstack/solid-query": "^5.90.17"
59
+ "@tanstack/solid-query": "^5.94.4"
60
60
  },
61
61
  "scripts": {
62
62
  "clean": "premove ./build ./coverage ./dist-ts",
63
63
  "compile": "tsc --build",
64
64
  "test:eslint": "eslint --concurrency=auto ./src",
65
65
  "test:types": "npm run compile && npm-run-all --serial test:types:*",
66
- "test:types:ts50": "node ../../node_modules/typescript50/lib/tsc.js --build",
67
- "test:types:ts51": "node ../../node_modules/typescript51/lib/tsc.js --build",
68
- "test:types:ts52": "node ../../node_modules/typescript52/lib/tsc.js --build",
69
- "test:types:ts53": "node ../../node_modules/typescript53/lib/tsc.js --build",
70
66
  "test:types:ts54": "node ../../node_modules/typescript54/lib/tsc.js --build",
71
67
  "test:types:ts55": "node ../../node_modules/typescript55/lib/tsc.js --build",
72
68
  "test:types:ts56": "node ../../node_modules/typescript56/lib/tsc.js --build",
73
69
  "test:types:ts57": "node ../../node_modules/typescript57/lib/tsc.js --build",
70
+ "test:types:ts58": "node ../../node_modules/typescript58/lib/tsc.js --build",
71
+ "test:types:ts59": "node ../../node_modules/typescript59/lib/tsc.js --build",
72
+ "test:types:ts60": "node ../../node_modules/typescript60/lib/tsc.js --build",
74
73
  "test:build": "publint --strict && attw --pack",
75
74
  "test:lib": "vitest --retry=3",
76
75
  "test:lib:dev": "pnpm run test:lib --watch",
package/build/dev.cjs DELETED
@@ -1,168 +0,0 @@
1
- 'use strict';
2
-
3
- var web = require('solid-js/web');
4
- var solidJs = require('solid-js');
5
- var solidQuery = require('@tanstack/solid-query');
6
- var queryDevtools = require('@tanstack/query-devtools');
7
-
8
- var __defProp = Object.defineProperty;
9
- var __getOwnPropNames = Object.getOwnPropertyNames;
10
- var __esm = (fn, res) => function __init() {
11
- return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
12
- };
13
- var __export = (target, all) => {
14
- for (var name in all)
15
- __defProp(target, name, { get: all[name], enumerable: true });
16
- };
17
-
18
- // src/devtools.tsx
19
- var devtools_exports = {};
20
- __export(devtools_exports, {
21
- default: () => SolidQueryDevtools
22
- });
23
- function SolidQueryDevtools(props) {
24
- const queryClient = solidQuery.useQueryClient(props.client);
25
- const client = solidJs.createMemo(() => queryClient);
26
- let ref;
27
- const devtools = new queryDevtools.TanstackQueryDevtools({
28
- client: client(),
29
- queryFlavor: "Solid Query",
30
- version: "5",
31
- onlineManager: solidQuery.onlineManager,
32
- buttonPosition: props.buttonPosition,
33
- position: props.position,
34
- initialIsOpen: props.initialIsOpen,
35
- errorTypes: props.errorTypes,
36
- styleNonce: props.styleNonce,
37
- shadowDOMTarget: props.shadowDOMTarget,
38
- hideDisabledQueries: props.hideDisabledQueries,
39
- theme: props.theme
40
- });
41
- solidJs.createEffect(() => {
42
- devtools.setClient(client());
43
- });
44
- solidJs.createEffect(() => {
45
- const buttonPos = props.buttonPosition;
46
- if (buttonPos) {
47
- devtools.setButtonPosition(buttonPos);
48
- }
49
- });
50
- solidJs.createEffect(() => {
51
- const pos = props.position;
52
- if (pos) {
53
- devtools.setPosition(pos);
54
- }
55
- });
56
- solidJs.createEffect(() => {
57
- devtools.setInitialIsOpen(props.initialIsOpen || false);
58
- });
59
- solidJs.createEffect(() => {
60
- devtools.setErrorTypes(props.errorTypes || []);
61
- });
62
- solidJs.createEffect(() => {
63
- devtools.setTheme(props.theme || "system");
64
- });
65
- solidJs.onMount(() => {
66
- devtools.mount(ref);
67
- solidJs.onCleanup(() => devtools.unmount());
68
- });
69
- return (() => {
70
- var _el$ = _tmpl$();
71
- var _ref$ = ref;
72
- typeof _ref$ === "function" ? web.use(_ref$, _el$) : ref = _el$;
73
- return _el$;
74
- })();
75
- }
76
- var _tmpl$;
77
- var init_devtools = __esm({
78
- "src/devtools.tsx"() {
79
- _tmpl$ = /* @__PURE__ */ web.template(`<div class=tsqd-parent-container>`);
80
- }
81
- });
82
-
83
- // src/devtoolsPanel.tsx
84
- var devtoolsPanel_exports = {};
85
- __export(devtoolsPanel_exports, {
86
- default: () => SolidQueryDevtoolsPanel
87
- });
88
- function SolidQueryDevtoolsPanel(props) {
89
- const queryClient = solidQuery.useQueryClient(props.client);
90
- const client = solidJs.createMemo(() => queryClient);
91
- let ref;
92
- const {
93
- errorTypes,
94
- styleNonce,
95
- shadowDOMTarget,
96
- hideDisabledQueries
97
- } = props;
98
- const devtools = new queryDevtools.TanstackQueryDevtoolsPanel({
99
- client: client(),
100
- queryFlavor: "Solid Query",
101
- version: "5",
102
- onlineManager: solidQuery.onlineManager,
103
- buttonPosition: "bottom-left",
104
- position: "bottom",
105
- initialIsOpen: true,
106
- errorTypes,
107
- styleNonce,
108
- shadowDOMTarget,
109
- onClose: props.onClose,
110
- hideDisabledQueries,
111
- theme: props.theme
112
- });
113
- solidJs.createEffect(() => {
114
- devtools.setClient(client());
115
- });
116
- solidJs.createEffect(() => {
117
- devtools.setOnClose(props.onClose ?? (() => {
118
- }));
119
- });
120
- solidJs.createEffect(() => {
121
- devtools.setErrorTypes(props.errorTypes || []);
122
- });
123
- solidJs.createEffect(() => {
124
- devtools.setTheme(props.theme || "system");
125
- });
126
- solidJs.onMount(() => {
127
- devtools.mount(ref);
128
- solidJs.onCleanup(() => devtools.unmount());
129
- });
130
- return (() => {
131
- var _el$ = _tmpl$2();
132
- var _ref$ = ref;
133
- typeof _ref$ === "function" ? web.use(_ref$, _el$) : ref = _el$;
134
- web.effect((_$p) => web.style(_el$, {
135
- height: "500px",
136
- ...props.style
137
- }, _$p));
138
- return _el$;
139
- })();
140
- }
141
- var _tmpl$2;
142
- var init_devtoolsPanel = __esm({
143
- "src/devtoolsPanel.tsx"() {
144
- _tmpl$2 = /* @__PURE__ */ web.template(`<div class=tsqd-parent-container>`);
145
- }
146
- });
147
- function clientOnly(fn) {
148
- if (web.isServer) return (props) => props.fallback;
149
- const [comp, setComp] = solidJs.createSignal();
150
- fn().then((m) => setComp(() => m.default));
151
- return (props) => {
152
- let Comp;
153
- let m;
154
- const [, rest] = solidJs.splitProps(props, ["fallback"]);
155
- if ((Comp = comp()) && !solidJs.sharedConfig.context) return Comp(rest);
156
- const [mounted, setMounted] = solidJs.createSignal(!solidJs.sharedConfig.context);
157
- solidJs.onMount(() => setMounted(true));
158
- return solidJs.createMemo(() => (Comp = comp(), m = mounted(), solidJs.untrack(() => Comp && m ? Comp(rest) : props.fallback)));
159
- };
160
- }
161
-
162
- // src/index.tsx
163
- exports.SolidQueryDevtools = web.isDev ? clientOnly(() => Promise.resolve().then(() => (init_devtools(), devtools_exports))) : function() {
164
- return null;
165
- };
166
- exports.SolidQueryDevtoolsPanel = web.isDev ? clientOnly(() => Promise.resolve().then(() => (init_devtoolsPanel(), devtoolsPanel_exports))) : function() {
167
- return null;
168
- };
package/build/dev.js DELETED
@@ -1,28 +0,0 @@
1
- import { isDev, isServer } from 'solid-js/web';
2
- import { createSignal, splitProps, sharedConfig, onMount, createMemo, untrack } from 'solid-js';
3
-
4
- // src/index.tsx
5
- function clientOnly(fn) {
6
- if (isServer) return (props) => props.fallback;
7
- const [comp, setComp] = createSignal();
8
- fn().then((m) => setComp(() => m.default));
9
- return (props) => {
10
- let Comp;
11
- let m;
12
- const [, rest] = splitProps(props, ["fallback"]);
13
- if ((Comp = comp()) && !sharedConfig.context) return Comp(rest);
14
- const [mounted, setMounted] = createSignal(!sharedConfig.context);
15
- onMount(() => setMounted(true));
16
- return createMemo(() => (Comp = comp(), m = mounted(), untrack(() => Comp && m ? Comp(rest) : props.fallback)));
17
- };
18
- }
19
-
20
- // src/index.tsx
21
- var SolidQueryDevtools = isDev ? clientOnly(() => import('./devtools/BCD44V6M.js')) : function() {
22
- return null;
23
- };
24
- var SolidQueryDevtoolsPanel = isDev ? clientOnly(() => import('./devtoolsPanel/VKJ7SILT.js')) : function() {
25
- return null;
26
- };
27
-
28
- export { SolidQueryDevtools, SolidQueryDevtoolsPanel };
package/build/dev.jsx DELETED
@@ -1,42 +0,0 @@
1
- // src/index.tsx
2
- import { isDev } from "solid-js/web";
3
-
4
- // src/clientOnly.tsx
5
- import {
6
- createMemo,
7
- createSignal,
8
- onMount,
9
- sharedConfig,
10
- splitProps,
11
- untrack
12
- } from "solid-js";
13
- import { isServer } from "solid-js/web";
14
- function clientOnly(fn) {
15
- if (isServer)
16
- return (props) => props.fallback;
17
- const [comp, setComp] = createSignal();
18
- fn().then((m) => setComp(() => m.default));
19
- return (props) => {
20
- let Comp;
21
- let m;
22
- const [, rest] = splitProps(props, ["fallback"]);
23
- if ((Comp = comp()) && !sharedConfig.context) return Comp(rest);
24
- const [mounted, setMounted] = createSignal(!sharedConfig.context);
25
- onMount(() => setMounted(true));
26
- return createMemo(
27
- () => (Comp = comp(), m = mounted(), untrack(() => Comp && m ? Comp(rest) : props.fallback))
28
- );
29
- };
30
- }
31
-
32
- // src/index.tsx
33
- var SolidQueryDevtools = isDev ? clientOnly(() => import("./devtools/32HRKFKI.jsx")) : function() {
34
- return null;
35
- };
36
- var SolidQueryDevtoolsPanel = isDev ? clientOnly(() => import("./devtoolsPanel/NDFIDQLQ.jsx")) : function() {
37
- return null;
38
- };
39
- export {
40
- SolidQueryDevtools,
41
- SolidQueryDevtoolsPanel
42
- };
@@ -1,55 +0,0 @@
1
- // src/devtools.tsx
2
- import { createEffect, createMemo, onCleanup, onMount } from "solid-js";
3
- import { onlineManager, useQueryClient } from "@tanstack/solid-query";
4
- import { TanstackQueryDevtools } from "@tanstack/query-devtools";
5
- function SolidQueryDevtools(props) {
6
- const queryClient = useQueryClient(props.client);
7
- const client = createMemo(() => queryClient);
8
- let ref;
9
- const devtools = new TanstackQueryDevtools({
10
- client: client(),
11
- queryFlavor: "Solid Query",
12
- version: "5",
13
- onlineManager,
14
- buttonPosition: props.buttonPosition,
15
- position: props.position,
16
- initialIsOpen: props.initialIsOpen,
17
- errorTypes: props.errorTypes,
18
- styleNonce: props.styleNonce,
19
- shadowDOMTarget: props.shadowDOMTarget,
20
- hideDisabledQueries: props.hideDisabledQueries,
21
- theme: props.theme
22
- });
23
- createEffect(() => {
24
- devtools.setClient(client());
25
- });
26
- createEffect(() => {
27
- const buttonPos = props.buttonPosition;
28
- if (buttonPos) {
29
- devtools.setButtonPosition(buttonPos);
30
- }
31
- });
32
- createEffect(() => {
33
- const pos = props.position;
34
- if (pos) {
35
- devtools.setPosition(pos);
36
- }
37
- });
38
- createEffect(() => {
39
- devtools.setInitialIsOpen(props.initialIsOpen || false);
40
- });
41
- createEffect(() => {
42
- devtools.setErrorTypes(props.errorTypes || []);
43
- });
44
- createEffect(() => {
45
- devtools.setTheme(props.theme || "system");
46
- });
47
- onMount(() => {
48
- devtools.mount(ref);
49
- onCleanup(() => devtools.unmount());
50
- });
51
- return <div class="tsqd-parent-container" ref={ref} />;
52
- }
53
- export {
54
- SolidQueryDevtools as default
55
- };
@@ -1,62 +0,0 @@
1
- import { template, use } from 'solid-js/web';
2
- import { createMemo, createEffect, onMount, onCleanup } from 'solid-js';
3
- import { useQueryClient, onlineManager } from '@tanstack/solid-query';
4
- import { TanstackQueryDevtools } from '@tanstack/query-devtools';
5
-
6
- // src/devtools.tsx
7
- var _tmpl$ = /* @__PURE__ */ template(`<div class=tsqd-parent-container>`);
8
- function SolidQueryDevtools(props) {
9
- const queryClient = useQueryClient(props.client);
10
- const client = createMemo(() => queryClient);
11
- let ref;
12
- const devtools = new TanstackQueryDevtools({
13
- client: client(),
14
- queryFlavor: "Solid Query",
15
- version: "5",
16
- onlineManager,
17
- buttonPosition: props.buttonPosition,
18
- position: props.position,
19
- initialIsOpen: props.initialIsOpen,
20
- errorTypes: props.errorTypes,
21
- styleNonce: props.styleNonce,
22
- shadowDOMTarget: props.shadowDOMTarget,
23
- hideDisabledQueries: props.hideDisabledQueries,
24
- theme: props.theme
25
- });
26
- createEffect(() => {
27
- devtools.setClient(client());
28
- });
29
- createEffect(() => {
30
- const buttonPos = props.buttonPosition;
31
- if (buttonPos) {
32
- devtools.setButtonPosition(buttonPos);
33
- }
34
- });
35
- createEffect(() => {
36
- const pos = props.position;
37
- if (pos) {
38
- devtools.setPosition(pos);
39
- }
40
- });
41
- createEffect(() => {
42
- devtools.setInitialIsOpen(props.initialIsOpen || false);
43
- });
44
- createEffect(() => {
45
- devtools.setErrorTypes(props.errorTypes || []);
46
- });
47
- createEffect(() => {
48
- devtools.setTheme(props.theme || "system");
49
- });
50
- onMount(() => {
51
- devtools.mount(ref);
52
- onCleanup(() => devtools.unmount());
53
- });
54
- return (() => {
55
- var _el$ = _tmpl$();
56
- var _ref$ = ref;
57
- typeof _ref$ === "function" ? use(_ref$, _el$) : ref = _el$;
58
- return _el$;
59
- })();
60
- }
61
-
62
- export { SolidQueryDevtools as default };
@@ -1,50 +0,0 @@
1
- // src/devtoolsPanel.tsx
2
- import { createEffect, createMemo, onCleanup, onMount } from "solid-js";
3
- import { onlineManager, useQueryClient } from "@tanstack/solid-query";
4
- import { TanstackQueryDevtoolsPanel } from "@tanstack/query-devtools";
5
- function SolidQueryDevtoolsPanel(props) {
6
- const queryClient = useQueryClient(props.client);
7
- const client = createMemo(() => queryClient);
8
- let ref;
9
- const { errorTypes, styleNonce, shadowDOMTarget, hideDisabledQueries } = props;
10
- const devtools = new TanstackQueryDevtoolsPanel({
11
- client: client(),
12
- queryFlavor: "Solid Query",
13
- version: "5",
14
- onlineManager,
15
- buttonPosition: "bottom-left",
16
- position: "bottom",
17
- initialIsOpen: true,
18
- errorTypes,
19
- styleNonce,
20
- shadowDOMTarget,
21
- onClose: props.onClose,
22
- hideDisabledQueries,
23
- theme: props.theme
24
- });
25
- createEffect(() => {
26
- devtools.setClient(client());
27
- });
28
- createEffect(() => {
29
- devtools.setOnClose(props.onClose ?? (() => {
30
- }));
31
- });
32
- createEffect(() => {
33
- devtools.setErrorTypes(props.errorTypes || []);
34
- });
35
- createEffect(() => {
36
- devtools.setTheme(props.theme || "system");
37
- });
38
- onMount(() => {
39
- devtools.mount(ref);
40
- onCleanup(() => devtools.unmount());
41
- });
42
- return <div
43
- style={{ height: "500px", ...props.style }}
44
- class="tsqd-parent-container"
45
- ref={ref}
46
- />;
47
- }
48
- export {
49
- SolidQueryDevtoolsPanel as default
50
- };
@@ -1,62 +0,0 @@
1
- import { template, use, effect, style } from 'solid-js/web';
2
- import { createMemo, createEffect, onMount, onCleanup } from 'solid-js';
3
- import { useQueryClient, onlineManager } from '@tanstack/solid-query';
4
- import { TanstackQueryDevtoolsPanel } from '@tanstack/query-devtools';
5
-
6
- // src/devtoolsPanel.tsx
7
- var _tmpl$ = /* @__PURE__ */ template(`<div class=tsqd-parent-container>`);
8
- function SolidQueryDevtoolsPanel(props) {
9
- const queryClient = useQueryClient(props.client);
10
- const client = createMemo(() => queryClient);
11
- let ref;
12
- const {
13
- errorTypes,
14
- styleNonce,
15
- shadowDOMTarget,
16
- hideDisabledQueries
17
- } = props;
18
- const devtools = new TanstackQueryDevtoolsPanel({
19
- client: client(),
20
- queryFlavor: "Solid Query",
21
- version: "5",
22
- onlineManager,
23
- buttonPosition: "bottom-left",
24
- position: "bottom",
25
- initialIsOpen: true,
26
- errorTypes,
27
- styleNonce,
28
- shadowDOMTarget,
29
- onClose: props.onClose,
30
- hideDisabledQueries,
31
- theme: props.theme
32
- });
33
- createEffect(() => {
34
- devtools.setClient(client());
35
- });
36
- createEffect(() => {
37
- devtools.setOnClose(props.onClose ?? (() => {
38
- }));
39
- });
40
- createEffect(() => {
41
- devtools.setErrorTypes(props.errorTypes || []);
42
- });
43
- createEffect(() => {
44
- devtools.setTheme(props.theme || "system");
45
- });
46
- onMount(() => {
47
- devtools.mount(ref);
48
- onCleanup(() => devtools.unmount());
49
- });
50
- return (() => {
51
- var _el$ = _tmpl$();
52
- var _ref$ = ref;
53
- typeof _ref$ === "function" ? use(_ref$, _el$) : ref = _el$;
54
- effect((_$p) => style(_el$, {
55
- height: "500px",
56
- ...props.style
57
- }, _$p));
58
- return _el$;
59
- })();
60
- }
61
-
62
- export { SolidQueryDevtoolsPanel as default };
package/build/index.cjs DELETED
@@ -1,168 +0,0 @@
1
- 'use strict';
2
-
3
- var web = require('solid-js/web');
4
- var solidJs = require('solid-js');
5
- var solidQuery = require('@tanstack/solid-query');
6
- var queryDevtools = require('@tanstack/query-devtools');
7
-
8
- var __defProp = Object.defineProperty;
9
- var __getOwnPropNames = Object.getOwnPropertyNames;
10
- var __esm = (fn, res) => function __init() {
11
- return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
12
- };
13
- var __export = (target, all) => {
14
- for (var name in all)
15
- __defProp(target, name, { get: all[name], enumerable: true });
16
- };
17
-
18
- // src/devtools.tsx
19
- var devtools_exports = {};
20
- __export(devtools_exports, {
21
- default: () => SolidQueryDevtools
22
- });
23
- function SolidQueryDevtools(props) {
24
- const queryClient = solidQuery.useQueryClient(props.client);
25
- const client = solidJs.createMemo(() => queryClient);
26
- let ref;
27
- const devtools = new queryDevtools.TanstackQueryDevtools({
28
- client: client(),
29
- queryFlavor: "Solid Query",
30
- version: "5",
31
- onlineManager: solidQuery.onlineManager,
32
- buttonPosition: props.buttonPosition,
33
- position: props.position,
34
- initialIsOpen: props.initialIsOpen,
35
- errorTypes: props.errorTypes,
36
- styleNonce: props.styleNonce,
37
- shadowDOMTarget: props.shadowDOMTarget,
38
- hideDisabledQueries: props.hideDisabledQueries,
39
- theme: props.theme
40
- });
41
- solidJs.createEffect(() => {
42
- devtools.setClient(client());
43
- });
44
- solidJs.createEffect(() => {
45
- const buttonPos = props.buttonPosition;
46
- if (buttonPos) {
47
- devtools.setButtonPosition(buttonPos);
48
- }
49
- });
50
- solidJs.createEffect(() => {
51
- const pos = props.position;
52
- if (pos) {
53
- devtools.setPosition(pos);
54
- }
55
- });
56
- solidJs.createEffect(() => {
57
- devtools.setInitialIsOpen(props.initialIsOpen || false);
58
- });
59
- solidJs.createEffect(() => {
60
- devtools.setErrorTypes(props.errorTypes || []);
61
- });
62
- solidJs.createEffect(() => {
63
- devtools.setTheme(props.theme || "system");
64
- });
65
- solidJs.onMount(() => {
66
- devtools.mount(ref);
67
- solidJs.onCleanup(() => devtools.unmount());
68
- });
69
- return (() => {
70
- var _el$ = _tmpl$();
71
- var _ref$ = ref;
72
- typeof _ref$ === "function" ? web.use(_ref$, _el$) : ref = _el$;
73
- return _el$;
74
- })();
75
- }
76
- var _tmpl$;
77
- var init_devtools = __esm({
78
- "src/devtools.tsx"() {
79
- _tmpl$ = /* @__PURE__ */ web.template(`<div class=tsqd-parent-container>`);
80
- }
81
- });
82
-
83
- // src/devtoolsPanel.tsx
84
- var devtoolsPanel_exports = {};
85
- __export(devtoolsPanel_exports, {
86
- default: () => SolidQueryDevtoolsPanel
87
- });
88
- function SolidQueryDevtoolsPanel(props) {
89
- const queryClient = solidQuery.useQueryClient(props.client);
90
- const client = solidJs.createMemo(() => queryClient);
91
- let ref;
92
- const {
93
- errorTypes,
94
- styleNonce,
95
- shadowDOMTarget,
96
- hideDisabledQueries
97
- } = props;
98
- const devtools = new queryDevtools.TanstackQueryDevtoolsPanel({
99
- client: client(),
100
- queryFlavor: "Solid Query",
101
- version: "5",
102
- onlineManager: solidQuery.onlineManager,
103
- buttonPosition: "bottom-left",
104
- position: "bottom",
105
- initialIsOpen: true,
106
- errorTypes,
107
- styleNonce,
108
- shadowDOMTarget,
109
- onClose: props.onClose,
110
- hideDisabledQueries,
111
- theme: props.theme
112
- });
113
- solidJs.createEffect(() => {
114
- devtools.setClient(client());
115
- });
116
- solidJs.createEffect(() => {
117
- devtools.setOnClose(props.onClose ?? (() => {
118
- }));
119
- });
120
- solidJs.createEffect(() => {
121
- devtools.setErrorTypes(props.errorTypes || []);
122
- });
123
- solidJs.createEffect(() => {
124
- devtools.setTheme(props.theme || "system");
125
- });
126
- solidJs.onMount(() => {
127
- devtools.mount(ref);
128
- solidJs.onCleanup(() => devtools.unmount());
129
- });
130
- return (() => {
131
- var _el$ = _tmpl$2();
132
- var _ref$ = ref;
133
- typeof _ref$ === "function" ? web.use(_ref$, _el$) : ref = _el$;
134
- web.effect((_$p) => web.style(_el$, {
135
- height: "500px",
136
- ...props.style
137
- }, _$p));
138
- return _el$;
139
- })();
140
- }
141
- var _tmpl$2;
142
- var init_devtoolsPanel = __esm({
143
- "src/devtoolsPanel.tsx"() {
144
- _tmpl$2 = /* @__PURE__ */ web.template(`<div class=tsqd-parent-container>`);
145
- }
146
- });
147
- function clientOnly(fn) {
148
- if (web.isServer) return (props) => props.fallback;
149
- const [comp, setComp] = solidJs.createSignal();
150
- fn().then((m) => setComp(() => m.default));
151
- return (props) => {
152
- let Comp;
153
- let m;
154
- const [, rest] = solidJs.splitProps(props, ["fallback"]);
155
- if ((Comp = comp()) && !solidJs.sharedConfig.context) return Comp(rest);
156
- const [mounted, setMounted] = solidJs.createSignal(!solidJs.sharedConfig.context);
157
- solidJs.onMount(() => setMounted(true));
158
- return solidJs.createMemo(() => (Comp = comp(), m = mounted(), solidJs.untrack(() => Comp && m ? Comp(rest) : props.fallback)));
159
- };
160
- }
161
-
162
- // src/index.tsx
163
- exports.SolidQueryDevtools = web.isDev ? clientOnly(() => Promise.resolve().then(() => (init_devtools(), devtools_exports))) : function() {
164
- return null;
165
- };
166
- exports.SolidQueryDevtoolsPanel = web.isDev ? clientOnly(() => Promise.resolve().then(() => (init_devtoolsPanel(), devtoolsPanel_exports))) : function() {
167
- return null;
168
- };
package/build/index.d.cts DELETED
@@ -1,94 +0,0 @@
1
- import * as solid_js from 'solid-js';
2
- import { JSX } from 'solid-js';
3
- import { DevtoolsButtonPosition, DevtoolsPosition, DevtoolsErrorType, Theme } from '@tanstack/query-devtools';
4
- import { QueryClient } from '@tanstack/solid-query';
5
-
6
- interface DevtoolsOptions {
7
- /**
8
- * Set this true if you want the dev tools to default to being open
9
- */
10
- initialIsOpen?: boolean;
11
- /**
12
- * The position of the React Query logo to open and close the devtools panel.
13
- * 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right'
14
- * Defaults to 'bottom-right'.
15
- */
16
- buttonPosition?: DevtoolsButtonPosition;
17
- /**
18
- * The position of the React Query devtools panel.
19
- * 'top' | 'bottom' | 'left' | 'right'
20
- * Defaults to 'bottom'.
21
- */
22
- position?: DevtoolsPosition;
23
- /**
24
- * Custom instance of QueryClient
25
- */
26
- client?: QueryClient;
27
- /**
28
- * Use this so you can define custom errors that can be shown in the devtools.
29
- */
30
- errorTypes?: Array<DevtoolsErrorType>;
31
- /**
32
- * 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.
33
- */
34
- styleNonce?: string;
35
- /**
36
- * Use this so you can attach the devtool's styles to specific element in the DOM.
37
- */
38
- shadowDOMTarget?: ShadowRoot;
39
- /**
40
- * Set this to true to hide disabled queries from the devtools panel.
41
- */
42
- hideDisabledQueries?: boolean;
43
- /**
44
- * Set this to 'light', 'dark', or 'system' to change the theme of the devtools panel.
45
- * Defaults to 'system'.
46
- */
47
- theme?: Theme;
48
- }
49
- declare function SolidQueryDevtools$1(props: DevtoolsOptions): solid_js.JSX.Element;
50
-
51
- interface DevtoolsPanelOptions {
52
- /**
53
- * Custom instance of QueryClient
54
- */
55
- client?: QueryClient;
56
- /**
57
- * Use this so you can define custom errors that can be shown in the devtools.
58
- */
59
- errorTypes?: Array<DevtoolsErrorType>;
60
- /**
61
- * 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.
62
- */
63
- styleNonce?: string;
64
- /**
65
- * Use this so you can attach the devtool's styles to specific element in the DOM.
66
- */
67
- shadowDOMTarget?: ShadowRoot;
68
- /**
69
- * Custom styles for the devtools panel
70
- * @default { height: '500px' }
71
- * @example { height: '100%' }
72
- * @example { height: '100%', width: '100%' }
73
- */
74
- style?: JSX.CSSProperties;
75
- /**
76
- * Callback function that is called when the devtools panel is closed
77
- */
78
- onClose?: () => unknown;
79
- /**
80
- * Set this to true to hide disabled queries from the devtools panel.
81
- */
82
- hideDisabledQueries?: boolean;
83
- /**
84
- * Set this to 'light', 'dark', or 'system' to change the theme of the devtools panel.
85
- * Defaults to 'system'.
86
- */
87
- theme?: Theme;
88
- }
89
- declare function SolidQueryDevtoolsPanel$1(props: DevtoolsPanelOptions): JSX.Element;
90
-
91
- declare const SolidQueryDevtools: typeof SolidQueryDevtools$1;
92
- declare const SolidQueryDevtoolsPanel: typeof SolidQueryDevtoolsPanel$1;
93
-
94
- export { type DevtoolsPanelOptions, SolidQueryDevtools, SolidQueryDevtoolsPanel };
package/build/index.d.ts DELETED
@@ -1,94 +0,0 @@
1
- import * as solid_js from 'solid-js';
2
- import { JSX } from 'solid-js';
3
- import { DevtoolsButtonPosition, DevtoolsPosition, DevtoolsErrorType, Theme } from '@tanstack/query-devtools';
4
- import { QueryClient } from '@tanstack/solid-query';
5
-
6
- interface DevtoolsOptions {
7
- /**
8
- * Set this true if you want the dev tools to default to being open
9
- */
10
- initialIsOpen?: boolean;
11
- /**
12
- * The position of the React Query logo to open and close the devtools panel.
13
- * 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right'
14
- * Defaults to 'bottom-right'.
15
- */
16
- buttonPosition?: DevtoolsButtonPosition;
17
- /**
18
- * The position of the React Query devtools panel.
19
- * 'top' | 'bottom' | 'left' | 'right'
20
- * Defaults to 'bottom'.
21
- */
22
- position?: DevtoolsPosition;
23
- /**
24
- * Custom instance of QueryClient
25
- */
26
- client?: QueryClient;
27
- /**
28
- * Use this so you can define custom errors that can be shown in the devtools.
29
- */
30
- errorTypes?: Array<DevtoolsErrorType>;
31
- /**
32
- * 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.
33
- */
34
- styleNonce?: string;
35
- /**
36
- * Use this so you can attach the devtool's styles to specific element in the DOM.
37
- */
38
- shadowDOMTarget?: ShadowRoot;
39
- /**
40
- * Set this to true to hide disabled queries from the devtools panel.
41
- */
42
- hideDisabledQueries?: boolean;
43
- /**
44
- * Set this to 'light', 'dark', or 'system' to change the theme of the devtools panel.
45
- * Defaults to 'system'.
46
- */
47
- theme?: Theme;
48
- }
49
- declare function SolidQueryDevtools$1(props: DevtoolsOptions): solid_js.JSX.Element;
50
-
51
- interface DevtoolsPanelOptions {
52
- /**
53
- * Custom instance of QueryClient
54
- */
55
- client?: QueryClient;
56
- /**
57
- * Use this so you can define custom errors that can be shown in the devtools.
58
- */
59
- errorTypes?: Array<DevtoolsErrorType>;
60
- /**
61
- * 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.
62
- */
63
- styleNonce?: string;
64
- /**
65
- * Use this so you can attach the devtool's styles to specific element in the DOM.
66
- */
67
- shadowDOMTarget?: ShadowRoot;
68
- /**
69
- * Custom styles for the devtools panel
70
- * @default { height: '500px' }
71
- * @example { height: '100%' }
72
- * @example { height: '100%', width: '100%' }
73
- */
74
- style?: JSX.CSSProperties;
75
- /**
76
- * Callback function that is called when the devtools panel is closed
77
- */
78
- onClose?: () => unknown;
79
- /**
80
- * Set this to true to hide disabled queries from the devtools panel.
81
- */
82
- hideDisabledQueries?: boolean;
83
- /**
84
- * Set this to 'light', 'dark', or 'system' to change the theme of the devtools panel.
85
- * Defaults to 'system'.
86
- */
87
- theme?: Theme;
88
- }
89
- declare function SolidQueryDevtoolsPanel$1(props: DevtoolsPanelOptions): JSX.Element;
90
-
91
- declare const SolidQueryDevtools: typeof SolidQueryDevtools$1;
92
- declare const SolidQueryDevtoolsPanel: typeof SolidQueryDevtoolsPanel$1;
93
-
94
- export { type DevtoolsPanelOptions, SolidQueryDevtools, SolidQueryDevtoolsPanel };
package/build/index.js DELETED
@@ -1,28 +0,0 @@
1
- import { isDev, isServer } from 'solid-js/web';
2
- import { createSignal, splitProps, sharedConfig, onMount, createMemo, untrack } from 'solid-js';
3
-
4
- // src/index.tsx
5
- function clientOnly(fn) {
6
- if (isServer) return (props) => props.fallback;
7
- const [comp, setComp] = createSignal();
8
- fn().then((m) => setComp(() => m.default));
9
- return (props) => {
10
- let Comp;
11
- let m;
12
- const [, rest] = splitProps(props, ["fallback"]);
13
- if ((Comp = comp()) && !sharedConfig.context) return Comp(rest);
14
- const [mounted, setMounted] = createSignal(!sharedConfig.context);
15
- onMount(() => setMounted(true));
16
- return createMemo(() => (Comp = comp(), m = mounted(), untrack(() => Comp && m ? Comp(rest) : props.fallback)));
17
- };
18
- }
19
-
20
- // src/index.tsx
21
- var SolidQueryDevtools = isDev ? clientOnly(() => import('./devtools/BCD44V6M.js')) : function() {
22
- return null;
23
- };
24
- var SolidQueryDevtoolsPanel = isDev ? clientOnly(() => import('./devtoolsPanel/VKJ7SILT.js')) : function() {
25
- return null;
26
- };
27
-
28
- export { SolidQueryDevtools, SolidQueryDevtoolsPanel };
package/build/index.jsx DELETED
@@ -1,42 +0,0 @@
1
- // src/index.tsx
2
- import { isDev } from "solid-js/web";
3
-
4
- // src/clientOnly.tsx
5
- import {
6
- createMemo,
7
- createSignal,
8
- onMount,
9
- sharedConfig,
10
- splitProps,
11
- untrack
12
- } from "solid-js";
13
- import { isServer } from "solid-js/web";
14
- function clientOnly(fn) {
15
- if (isServer)
16
- return (props) => props.fallback;
17
- const [comp, setComp] = createSignal();
18
- fn().then((m) => setComp(() => m.default));
19
- return (props) => {
20
- let Comp;
21
- let m;
22
- const [, rest] = splitProps(props, ["fallback"]);
23
- if ((Comp = comp()) && !sharedConfig.context) return Comp(rest);
24
- const [mounted, setMounted] = createSignal(!sharedConfig.context);
25
- onMount(() => setMounted(true));
26
- return createMemo(
27
- () => (Comp = comp(), m = mounted(), untrack(() => Comp && m ? Comp(rest) : props.fallback))
28
- );
29
- };
30
- }
31
-
32
- // src/index.tsx
33
- var SolidQueryDevtools = isDev ? clientOnly(() => import("./devtools/32HRKFKI.jsx")) : function() {
34
- return null;
35
- };
36
- var SolidQueryDevtoolsPanel = isDev ? clientOnly(() => import("./devtoolsPanel/NDFIDQLQ.jsx")) : function() {
37
- return null;
38
- };
39
- export {
40
- SolidQueryDevtools,
41
- SolidQueryDevtoolsPanel
42
- };