@tanstack/solid-query-devtools 5.101.4 → 5.102.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/dev.cjs +25 -163
- package/build/dev.js +22 -23
- package/build/dev.jsx +23 -38
- package/build/devtools-BFGGY7dV.cjs +57 -0
- package/build/devtools-C2-vOvXZ.js +57 -0
- package/build/devtools-CXrmuwV8.jsx +50 -0
- package/build/devtools-ZLm3XMpi.js +2 -0
- package/build/devtools-ZLm3XMpi.js.map +1 -0
- package/build/devtools-g4uuc_il.cjs +1 -0
- package/build/devtoolsPanel-BrOMNzf2.cjs +1 -0
- package/build/devtoolsPanel-CLvDG9kV.cjs +52 -0
- package/build/devtoolsPanel-CjUh_Osq.jsx +47 -0
- package/build/devtoolsPanel-Dk1_K0ko.js +52 -0
- package/build/devtoolsPanel-GNd-i8LJ.js +2 -0
- package/build/devtoolsPanel-GNd-i8LJ.js.map +1 -0
- package/build/index.cjs +1 -167
- package/build/index.d.cts +88 -86
- package/build/index.d.cts.map +1 -0
- package/build/index.d.ts +88 -86
- package/build/index.d.ts.map +1 -0
- package/build/index.js +2 -28
- package/build/index.js.map +1 -0
- package/build/index.jsx +23 -38
- package/package.json +8 -10
- package/build/devtools/32HRKFKI.jsx +0 -55
- package/build/devtools/BCD44V6M.js +0 -62
- package/build/devtoolsPanel/NDFIDQLQ.jsx +0 -50
- package/build/devtoolsPanel/VOW4J2DZ.js +0 -61
package/build/dev.cjs
CHANGED
|
@@ -1,167 +1,29 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
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
|
-
...props.style
|
|
136
|
-
}, _$p));
|
|
137
|
-
return _el$;
|
|
138
|
-
})();
|
|
139
|
-
}
|
|
140
|
-
var _tmpl$2;
|
|
141
|
-
var init_devtoolsPanel = __esm({
|
|
142
|
-
"src/devtoolsPanel.tsx"() {
|
|
143
|
-
_tmpl$2 = /* @__PURE__ */ web.template(`<div class=tsqd-parent-container style=height:500px>`);
|
|
144
|
-
}
|
|
145
|
-
});
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
let solid_js_web = require("solid-js/web");
|
|
3
|
+
let solid_js = require("solid-js");
|
|
4
|
+
//#region src/clientOnly.tsx
|
|
146
5
|
function clientOnly(fn) {
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
6
|
+
if (solid_js_web.isServer) return (props) => props.fallback;
|
|
7
|
+
const [comp, setComp] = (0, solid_js.createSignal)();
|
|
8
|
+
fn().then((m) => setComp(() => m.default));
|
|
9
|
+
return (props) => {
|
|
10
|
+
let Comp;
|
|
11
|
+
let m;
|
|
12
|
+
const [, rest] = (0, solid_js.splitProps)(props, ["fallback"]);
|
|
13
|
+
if ((Comp = comp()) && !solid_js.sharedConfig.context) return Comp(rest);
|
|
14
|
+
const [mounted, setMounted] = (0, solid_js.createSignal)(!solid_js.sharedConfig.context);
|
|
15
|
+
(0, solid_js.onMount)(() => setMounted(true));
|
|
16
|
+
return (0, solid_js.createMemo)(() => (Comp = comp(), m = mounted(), (0, solid_js.untrack)(() => Comp && m ? Comp(rest) : props.fallback)));
|
|
17
|
+
};
|
|
159
18
|
}
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
19
|
+
//#endregion
|
|
20
|
+
//#region src/index.tsx
|
|
21
|
+
const SolidQueryDevtools = solid_js_web.isDev ? clientOnly(() => Promise.resolve().then(() => require("./devtools-BFGGY7dV.cjs"))) : function() {
|
|
22
|
+
return null;
|
|
164
23
|
};
|
|
165
|
-
|
|
166
|
-
|
|
24
|
+
const SolidQueryDevtoolsPanel = solid_js_web.isDev ? clientOnly(() => Promise.resolve().then(() => require("./devtoolsPanel-CLvDG9kV.cjs"))) : function() {
|
|
25
|
+
return null;
|
|
167
26
|
};
|
|
27
|
+
//#endregion
|
|
28
|
+
exports.SolidQueryDevtools = SolidQueryDevtools;
|
|
29
|
+
exports.SolidQueryDevtoolsPanel = SolidQueryDevtoolsPanel;
|
package/build/dev.js
CHANGED
|
@@ -1,28 +1,27 @@
|
|
|
1
|
-
import { isDev, isServer } from
|
|
2
|
-
import { createSignal,
|
|
3
|
-
|
|
4
|
-
// src/index.tsx
|
|
1
|
+
import { isDev, isServer } from "solid-js/web";
|
|
2
|
+
import { createMemo, createSignal, onMount, sharedConfig, splitProps, untrack } from "solid-js";
|
|
3
|
+
//#region src/clientOnly.tsx
|
|
5
4
|
function clientOnly(fn) {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
5
|
+
if (isServer) return (props) => props.fallback;
|
|
6
|
+
const [comp, setComp] = createSignal();
|
|
7
|
+
fn().then((m) => setComp(() => m.default));
|
|
8
|
+
return (props) => {
|
|
9
|
+
let Comp;
|
|
10
|
+
let m;
|
|
11
|
+
const [, rest] = splitProps(props, ["fallback"]);
|
|
12
|
+
if ((Comp = comp()) && !sharedConfig.context) return Comp(rest);
|
|
13
|
+
const [mounted, setMounted] = createSignal(!sharedConfig.context);
|
|
14
|
+
onMount(() => setMounted(true));
|
|
15
|
+
return createMemo(() => (Comp = comp(), m = mounted(), untrack(() => Comp && m ? Comp(rest) : props.fallback)));
|
|
16
|
+
};
|
|
18
17
|
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
18
|
+
//#endregion
|
|
19
|
+
//#region src/index.tsx
|
|
20
|
+
const SolidQueryDevtools = isDev ? clientOnly(() => import("./devtools-C2-vOvXZ.js")) : function() {
|
|
21
|
+
return null;
|
|
23
22
|
};
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
const SolidQueryDevtoolsPanel = isDev ? clientOnly(() => import("./devtoolsPanel-Dk1_K0ko.js")) : function() {
|
|
24
|
+
return null;
|
|
26
25
|
};
|
|
27
|
-
|
|
26
|
+
//#endregion
|
|
28
27
|
export { SolidQueryDevtools, SolidQueryDevtoolsPanel };
|
package/build/dev.jsx
CHANGED
|
@@ -1,42 +1,27 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
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";
|
|
1
|
+
import { isDev, isServer } from "solid-js/web";
|
|
2
|
+
import { createMemo, createSignal, onMount, sharedConfig, splitProps, untrack } from "solid-js";
|
|
3
|
+
//#region src/clientOnly.tsx
|
|
14
4
|
function clientOnly(fn) {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
() => (Comp = comp(), m = mounted(), untrack(() => Comp && m ? Comp(rest) : props.fallback))
|
|
28
|
-
);
|
|
29
|
-
};
|
|
5
|
+
if (isServer) return (props) => props.fallback;
|
|
6
|
+
const [comp, setComp] = createSignal();
|
|
7
|
+
fn().then((m) => setComp(() => m.default));
|
|
8
|
+
return (props) => {
|
|
9
|
+
let Comp;
|
|
10
|
+
let m;
|
|
11
|
+
const [, rest] = splitProps(props, ["fallback"]);
|
|
12
|
+
if ((Comp = comp()) && !sharedConfig.context) return Comp(rest);
|
|
13
|
+
const [mounted, setMounted] = createSignal(!sharedConfig.context);
|
|
14
|
+
onMount(() => setMounted(true));
|
|
15
|
+
return createMemo(() => (Comp = comp(), m = mounted(), untrack(() => Comp && m ? Comp(rest) : props.fallback)));
|
|
16
|
+
};
|
|
30
17
|
}
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
18
|
+
//#endregion
|
|
19
|
+
//#region src/index.tsx
|
|
20
|
+
const SolidQueryDevtools = isDev ? clientOnly(() => import("./devtools-CXrmuwV8.jsx")) : function() {
|
|
21
|
+
return null;
|
|
35
22
|
};
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
};
|
|
39
|
-
export {
|
|
40
|
-
SolidQueryDevtools,
|
|
41
|
-
SolidQueryDevtoolsPanel
|
|
23
|
+
const SolidQueryDevtoolsPanel = isDev ? clientOnly(() => import("./devtoolsPanel-CjUh_Osq.jsx")) : function() {
|
|
24
|
+
return null;
|
|
42
25
|
};
|
|
26
|
+
//#endregion
|
|
27
|
+
export { SolidQueryDevtools, SolidQueryDevtoolsPanel };
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
let solid_js_web = require("solid-js/web");
|
|
2
|
+
let solid_js = require("solid-js");
|
|
3
|
+
let _tanstack_solid_query = require("@tanstack/solid-query");
|
|
4
|
+
let _tanstack_query_devtools = require("@tanstack/query-devtools");
|
|
5
|
+
//#region src/devtools.tsx
|
|
6
|
+
var _tmpl$ = /*#__PURE__*/ (0, solid_js_web.template)(`<div class=tsqd-parent-container>`);
|
|
7
|
+
function SolidQueryDevtools(props) {
|
|
8
|
+
const queryClient = (0, _tanstack_solid_query.useQueryClient)(props.client);
|
|
9
|
+
const client = (0, solid_js.createMemo)(() => queryClient);
|
|
10
|
+
let ref;
|
|
11
|
+
const devtools = new _tanstack_query_devtools.TanstackQueryDevtools({
|
|
12
|
+
client: client(),
|
|
13
|
+
queryFlavor: "Solid Query",
|
|
14
|
+
version: "5",
|
|
15
|
+
onlineManager: _tanstack_solid_query.onlineManager,
|
|
16
|
+
buttonPosition: props.buttonPosition,
|
|
17
|
+
position: props.position,
|
|
18
|
+
initialIsOpen: props.initialIsOpen,
|
|
19
|
+
errorTypes: props.errorTypes,
|
|
20
|
+
styleNonce: props.styleNonce,
|
|
21
|
+
shadowDOMTarget: props.shadowDOMTarget,
|
|
22
|
+
hideDisabledQueries: props.hideDisabledQueries,
|
|
23
|
+
theme: props.theme
|
|
24
|
+
});
|
|
25
|
+
(0, solid_js.createEffect)(() => {
|
|
26
|
+
devtools.setClient(client());
|
|
27
|
+
});
|
|
28
|
+
(0, solid_js.createEffect)(() => {
|
|
29
|
+
const buttonPos = props.buttonPosition;
|
|
30
|
+
if (buttonPos) devtools.setButtonPosition(buttonPos);
|
|
31
|
+
});
|
|
32
|
+
(0, solid_js.createEffect)(() => {
|
|
33
|
+
const pos = props.position;
|
|
34
|
+
if (pos) devtools.setPosition(pos);
|
|
35
|
+
});
|
|
36
|
+
(0, solid_js.createEffect)(() => {
|
|
37
|
+
devtools.setInitialIsOpen(props.initialIsOpen || false);
|
|
38
|
+
});
|
|
39
|
+
(0, solid_js.createEffect)(() => {
|
|
40
|
+
devtools.setErrorTypes(props.errorTypes || []);
|
|
41
|
+
});
|
|
42
|
+
(0, solid_js.createEffect)(() => {
|
|
43
|
+
devtools.setTheme(props.theme || "system");
|
|
44
|
+
});
|
|
45
|
+
(0, solid_js.onMount)(() => {
|
|
46
|
+
devtools.mount(ref);
|
|
47
|
+
(0, solid_js.onCleanup)(() => devtools.unmount());
|
|
48
|
+
});
|
|
49
|
+
return (() => {
|
|
50
|
+
var _el$ = _tmpl$();
|
|
51
|
+
var _ref$ = ref;
|
|
52
|
+
typeof _ref$ === "function" ? (0, solid_js_web.use)(_ref$, _el$) : ref = _el$;
|
|
53
|
+
return _el$;
|
|
54
|
+
})();
|
|
55
|
+
}
|
|
56
|
+
//#endregion
|
|
57
|
+
exports.default = SolidQueryDevtools;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { template, use } from "solid-js/web";
|
|
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
|
+
//#region src/devtools.tsx
|
|
6
|
+
var _tmpl$ = /*#__PURE__*/ template(`<div class=tsqd-parent-container>`);
|
|
7
|
+
function SolidQueryDevtools(props) {
|
|
8
|
+
const queryClient = useQueryClient(props.client);
|
|
9
|
+
const client = createMemo(() => queryClient);
|
|
10
|
+
let ref;
|
|
11
|
+
const devtools = new TanstackQueryDevtools({
|
|
12
|
+
client: client(),
|
|
13
|
+
queryFlavor: "Solid Query",
|
|
14
|
+
version: "5",
|
|
15
|
+
onlineManager,
|
|
16
|
+
buttonPosition: props.buttonPosition,
|
|
17
|
+
position: props.position,
|
|
18
|
+
initialIsOpen: props.initialIsOpen,
|
|
19
|
+
errorTypes: props.errorTypes,
|
|
20
|
+
styleNonce: props.styleNonce,
|
|
21
|
+
shadowDOMTarget: props.shadowDOMTarget,
|
|
22
|
+
hideDisabledQueries: props.hideDisabledQueries,
|
|
23
|
+
theme: props.theme
|
|
24
|
+
});
|
|
25
|
+
createEffect(() => {
|
|
26
|
+
devtools.setClient(client());
|
|
27
|
+
});
|
|
28
|
+
createEffect(() => {
|
|
29
|
+
const buttonPos = props.buttonPosition;
|
|
30
|
+
if (buttonPos) devtools.setButtonPosition(buttonPos);
|
|
31
|
+
});
|
|
32
|
+
createEffect(() => {
|
|
33
|
+
const pos = props.position;
|
|
34
|
+
if (pos) devtools.setPosition(pos);
|
|
35
|
+
});
|
|
36
|
+
createEffect(() => {
|
|
37
|
+
devtools.setInitialIsOpen(props.initialIsOpen || false);
|
|
38
|
+
});
|
|
39
|
+
createEffect(() => {
|
|
40
|
+
devtools.setErrorTypes(props.errorTypes || []);
|
|
41
|
+
});
|
|
42
|
+
createEffect(() => {
|
|
43
|
+
devtools.setTheme(props.theme || "system");
|
|
44
|
+
});
|
|
45
|
+
onMount(() => {
|
|
46
|
+
devtools.mount(ref);
|
|
47
|
+
onCleanup(() => devtools.unmount());
|
|
48
|
+
});
|
|
49
|
+
return (() => {
|
|
50
|
+
var _el$ = _tmpl$();
|
|
51
|
+
var _ref$ = ref;
|
|
52
|
+
typeof _ref$ === "function" ? use(_ref$, _el$) : ref = _el$;
|
|
53
|
+
return _el$;
|
|
54
|
+
})();
|
|
55
|
+
}
|
|
56
|
+
//#endregion
|
|
57
|
+
export { SolidQueryDevtools as default };
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { createEffect, createMemo, onCleanup, onMount } from "solid-js";
|
|
2
|
+
import { onlineManager, useQueryClient } from "@tanstack/solid-query";
|
|
3
|
+
import { TanstackQueryDevtools } from "@tanstack/query-devtools";
|
|
4
|
+
//#region src/devtools.tsx
|
|
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) devtools.setButtonPosition(buttonPos);
|
|
29
|
+
});
|
|
30
|
+
createEffect(() => {
|
|
31
|
+
const pos = props.position;
|
|
32
|
+
if (pos) devtools.setPosition(pos);
|
|
33
|
+
});
|
|
34
|
+
createEffect(() => {
|
|
35
|
+
devtools.setInitialIsOpen(props.initialIsOpen || false);
|
|
36
|
+
});
|
|
37
|
+
createEffect(() => {
|
|
38
|
+
devtools.setErrorTypes(props.errorTypes || []);
|
|
39
|
+
});
|
|
40
|
+
createEffect(() => {
|
|
41
|
+
devtools.setTheme(props.theme || "system");
|
|
42
|
+
});
|
|
43
|
+
onMount(() => {
|
|
44
|
+
devtools.mount(ref);
|
|
45
|
+
onCleanup(() => devtools.unmount());
|
|
46
|
+
});
|
|
47
|
+
return <div class="tsqd-parent-container" ref={ref}></div>;
|
|
48
|
+
}
|
|
49
|
+
//#endregion
|
|
50
|
+
export { SolidQueryDevtools as default };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{template as e,use as t}from"solid-js/web";import{createEffect as n,createMemo as r,onCleanup as i,onMount as a}from"solid-js";import{onlineManager as o,useQueryClient as s}from"@tanstack/solid-query";import{TanstackQueryDevtools as c}from"@tanstack/query-devtools";var l=e(`<div class=tsqd-parent-container>`);function u(e){let u=s(e.client),d=r(()=>u),f,p=new c({client:d(),queryFlavor:`Solid Query`,version:`5`,onlineManager:o,buttonPosition:e.buttonPosition,position:e.position,initialIsOpen:e.initialIsOpen,errorTypes:e.errorTypes,styleNonce:e.styleNonce,shadowDOMTarget:e.shadowDOMTarget,hideDisabledQueries:e.hideDisabledQueries,theme:e.theme});return n(()=>{p.setClient(d())}),n(()=>{let t=e.buttonPosition;t&&p.setButtonPosition(t)}),n(()=>{let t=e.position;t&&p.setPosition(t)}),n(()=>{p.setInitialIsOpen(e.initialIsOpen||!1)}),n(()=>{p.setErrorTypes(e.errorTypes||[])}),n(()=>{p.setTheme(e.theme||`system`)}),a(()=>{p.mount(f),i(()=>p.unmount())}),(()=>{var e=l(),n=f;return typeof n==`function`?t(n,e):f=e,e})()}export{u as default};
|
|
2
|
+
//# sourceMappingURL=devtools-ZLm3XMpi.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"devtools-ZLm3XMpi.js","names":["createEffect","createMemo","onCleanup","onMount","onlineManager","useQueryClient","TanstackQueryDevtools","DevtoolsButtonPosition","DevtoolsErrorType","DevtoolsPosition","Theme","QueryClient","DevtoolsOptions","initialIsOpen","buttonPosition","position","client","errorTypes","Array","styleNonce","shadowDOMTarget","ShadowRoot","hideDisabledQueries","theme","SolidQueryDevtools","props","queryClient","ref","HTMLDivElement","devtools","queryFlavor","version","setClient","buttonPos","setButtonPosition","pos","setPosition","setInitialIsOpen","setErrorTypes","setTheme","mount","unmount","_el$","_tmpl$","_ref$","_$use"],"sources":["../src/devtools.tsx"],"sourcesContent":["import { createEffect, createMemo, onCleanup, onMount } from 'solid-js'\nimport { onlineManager, useQueryClient } from '@tanstack/solid-query'\nimport { TanstackQueryDevtools } from '@tanstack/query-devtools'\nimport type {\n DevtoolsButtonPosition,\n DevtoolsErrorType,\n DevtoolsPosition,\n Theme,\n} from '@tanstack/query-devtools'\nimport type { QueryClient } from '@tanstack/solid-query'\n\ninterface DevtoolsOptions {\n /**\n * Set this true if you want the dev tools to default to being open\n */\n initialIsOpen?: boolean\n /**\n * The position of the TanStack logo to open and close the devtools panel.\n * 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right' | 'relative'\n * Defaults to 'bottom-right'.\n */\n buttonPosition?: DevtoolsButtonPosition\n /**\n * The position of the Solid Query devtools panel.\n * 'top' | 'bottom' | 'left' | 'right'\n * Defaults to 'bottom'.\n */\n position?: DevtoolsPosition\n /**\n * Custom instance of QueryClient\n */\n client?: QueryClient\n /**\n * Use this so you can define custom errors that can be shown in the devtools.\n */\n errorTypes?: Array<DevtoolsErrorType>\n /**\n * Use this to pass a nonce to the style tag that is added to the document head. This is useful if you are using a Content Security Policy (CSP) nonce to allow inline styles.\n */\n styleNonce?: string\n /**\n * Use this so you can attach the devtool's styles to specific element in the DOM.\n */\n shadowDOMTarget?: ShadowRoot\n /**\n * Set this to true to hide disabled queries from the devtools panel.\n */\n hideDisabledQueries?: boolean\n /**\n * Set this to 'light', 'dark', or 'system' to change the theme of the devtools panel.\n * Defaults to 'system'.\n */\n theme?: Theme\n}\n\nexport default function SolidQueryDevtools(props: DevtoolsOptions) {\n const queryClient = useQueryClient(props.client)\n const client = createMemo(() => queryClient)\n let ref!: HTMLDivElement\n const devtools = new TanstackQueryDevtools({\n client: client(),\n queryFlavor: 'Solid Query',\n version: '5',\n onlineManager,\n buttonPosition: props.buttonPosition,\n position: props.position,\n initialIsOpen: props.initialIsOpen,\n errorTypes: props.errorTypes,\n styleNonce: props.styleNonce,\n shadowDOMTarget: props.shadowDOMTarget,\n hideDisabledQueries: props.hideDisabledQueries,\n theme: props.theme,\n })\n\n createEffect(() => {\n devtools.setClient(client())\n })\n\n createEffect(() => {\n const buttonPos = props.buttonPosition\n if (buttonPos) {\n devtools.setButtonPosition(buttonPos)\n }\n })\n\n createEffect(() => {\n const pos = props.position\n if (pos) {\n devtools.setPosition(pos)\n }\n })\n\n createEffect(() => {\n devtools.setInitialIsOpen(props.initialIsOpen || false)\n })\n\n createEffect(() => {\n devtools.setErrorTypes(props.errorTypes || [])\n })\n\n createEffect(() => {\n devtools.setTheme(props.theme || 'system')\n })\n\n onMount(() => {\n devtools.mount(ref)\n onCleanup(() => devtools.unmount())\n })\n\n return <div class=\"tsqd-parent-container\" ref={ref}></div>\n}\n"],"mappings":"6TAuDA,SAAwBwB,EAAmBC,EAAwB,CACjE,IAAMC,EAAcrB,EAAeoB,EAAMT,MAAM,EACzCA,EAASf,MAAiByB,CAAW,EACvCC,EACEE,EAAW,IAAIvB,EAAsB,CACzCU,OAAQA,EAAO,EACfc,YAAa,cACbC,QAAS,IACT3B,gBACAU,eAAgBW,EAAMX,eACtBC,SAAUU,EAAMV,SAChBF,cAAeY,EAAMZ,cACrBI,WAAYQ,EAAMR,WAClBE,WAAYM,EAAMN,WAClBC,gBAAiBK,EAAML,gBACvBE,oBAAqBG,EAAMH,oBAC3BC,MAAOE,EAAMF,KACf,CAAC,EAqCD,OAnCAvB,MAAmB,CACjB6B,EAASG,UAAUhB,EAAO,CAAC,CAC7B,CAAC,EAEDhB,MAAmB,CACjB,IAAMiC,EAAYR,EAAMX,eACpBmB,GACFJ,EAASK,kBAAkBD,CAAS,CAExC,CAAC,EAEDjC,MAAmB,CACjB,IAAMmC,EAAMV,EAAMV,SACdoB,GACFN,EAASO,YAAYD,CAAG,CAE5B,CAAC,EAEDnC,MAAmB,CACjB6B,EAASQ,iBAAiBZ,EAAMZ,eAAiB,EAAK,CACxD,CAAC,EAEDb,MAAmB,CACjB6B,EAASS,cAAcb,EAAMR,YAAc,CAAA,CAAE,CAC/C,CAAC,EAEDjB,MAAmB,CACjB6B,EAASU,SAASd,EAAMF,OAAS,QAAQ,CAC3C,CAAC,EAEDpB,MAAc,CACZ0B,EAASW,MAAMb,CAAG,EAClBzB,MAAgB2B,EAASY,QAAQ,CAAC,CACpC,CAAC,OAED,CAAA,IAAAC,EAAAC,EAAA,EAAAC,EAA+CjB,EAAG,OAAA,OAAAiB,GAAA,WAAAC,EAAAD,EAAAF,CAAA,EAAHf,EAAGe,EAAAA,CAAA,EAAA,CAAA,CACpD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
let e=require("solid-js/web"),t=require("solid-js"),n=require("@tanstack/solid-query"),r=require("@tanstack/query-devtools");var i=(0,e.template)(`<div class=tsqd-parent-container>`);function a(a){let o=(0,n.useQueryClient)(a.client),s=(0,t.createMemo)(()=>o),c,l=new r.TanstackQueryDevtools({client:s(),queryFlavor:`Solid Query`,version:`5`,onlineManager:n.onlineManager,buttonPosition:a.buttonPosition,position:a.position,initialIsOpen:a.initialIsOpen,errorTypes:a.errorTypes,styleNonce:a.styleNonce,shadowDOMTarget:a.shadowDOMTarget,hideDisabledQueries:a.hideDisabledQueries,theme:a.theme});return(0,t.createEffect)(()=>{l.setClient(s())}),(0,t.createEffect)(()=>{let e=a.buttonPosition;e&&l.setButtonPosition(e)}),(0,t.createEffect)(()=>{let e=a.position;e&&l.setPosition(e)}),(0,t.createEffect)(()=>{l.setInitialIsOpen(a.initialIsOpen||!1)}),(0,t.createEffect)(()=>{l.setErrorTypes(a.errorTypes||[])}),(0,t.createEffect)(()=>{l.setTheme(a.theme||`system`)}),(0,t.onMount)(()=>{l.mount(c),(0,t.onCleanup)(()=>l.unmount())}),(()=>{var t=i(),n=c;return typeof n==`function`?(0,e.use)(n,t):c=t,t})()}exports.default=a;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
let e=require("solid-js/web"),t=require("solid-js"),n=require("@tanstack/solid-query"),r=require("@tanstack/query-devtools");var i=(0,e.template)(`<div class=tsqd-parent-container style=height:500px>`);function a(a){let o=(0,n.useQueryClient)(a.client),s=(0,t.createMemo)(()=>o),c,{errorTypes:l,styleNonce:u,shadowDOMTarget:d,hideDisabledQueries:f}=a,p=new r.TanstackQueryDevtoolsPanel({client:s(),queryFlavor:`Solid Query`,version:`5`,onlineManager:n.onlineManager,buttonPosition:`bottom-left`,position:`bottom`,initialIsOpen:!0,errorTypes:l,styleNonce:u,shadowDOMTarget:d,onClose:a.onClose,hideDisabledQueries:f,theme:a.theme});return(0,t.createEffect)(()=>{p.setClient(s())}),(0,t.createEffect)(()=>{p.setOnClose(a.onClose??(()=>{}))}),(0,t.createEffect)(()=>{p.setErrorTypes(a.errorTypes||[])}),(0,t.createEffect)(()=>{p.setTheme(a.theme||`system`)}),(0,t.onMount)(()=>{p.mount(c),(0,t.onCleanup)(()=>p.unmount())}),(()=>{var t=i(),n=c;return typeof n==`function`?(0,e.use)(n,t):c=t,(0,e.effect)(n=>(0,e.style)(t,{...a.style},n)),t})()}exports.default=a;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
let solid_js_web = require("solid-js/web");
|
|
2
|
+
let solid_js = require("solid-js");
|
|
3
|
+
let _tanstack_solid_query = require("@tanstack/solid-query");
|
|
4
|
+
let _tanstack_query_devtools = require("@tanstack/query-devtools");
|
|
5
|
+
//#region src/devtoolsPanel.tsx
|
|
6
|
+
var _tmpl$ = /*#__PURE__*/ (0, solid_js_web.template)(`<div class=tsqd-parent-container style=height:500px>`);
|
|
7
|
+
function SolidQueryDevtoolsPanel(props) {
|
|
8
|
+
const queryClient = (0, _tanstack_solid_query.useQueryClient)(props.client);
|
|
9
|
+
const client = (0, solid_js.createMemo)(() => queryClient);
|
|
10
|
+
let ref;
|
|
11
|
+
const { errorTypes, styleNonce, shadowDOMTarget, hideDisabledQueries } = props;
|
|
12
|
+
const devtools = new _tanstack_query_devtools.TanstackQueryDevtoolsPanel({
|
|
13
|
+
client: client(),
|
|
14
|
+
queryFlavor: "Solid Query",
|
|
15
|
+
version: "5",
|
|
16
|
+
onlineManager: _tanstack_solid_query.onlineManager,
|
|
17
|
+
buttonPosition: "bottom-left",
|
|
18
|
+
position: "bottom",
|
|
19
|
+
initialIsOpen: true,
|
|
20
|
+
errorTypes,
|
|
21
|
+
styleNonce,
|
|
22
|
+
shadowDOMTarget,
|
|
23
|
+
onClose: props.onClose,
|
|
24
|
+
hideDisabledQueries,
|
|
25
|
+
theme: props.theme
|
|
26
|
+
});
|
|
27
|
+
(0, solid_js.createEffect)(() => {
|
|
28
|
+
devtools.setClient(client());
|
|
29
|
+
});
|
|
30
|
+
(0, solid_js.createEffect)(() => {
|
|
31
|
+
devtools.setOnClose(props.onClose ?? (() => {}));
|
|
32
|
+
});
|
|
33
|
+
(0, solid_js.createEffect)(() => {
|
|
34
|
+
devtools.setErrorTypes(props.errorTypes || []);
|
|
35
|
+
});
|
|
36
|
+
(0, solid_js.createEffect)(() => {
|
|
37
|
+
devtools.setTheme(props.theme || "system");
|
|
38
|
+
});
|
|
39
|
+
(0, solid_js.onMount)(() => {
|
|
40
|
+
devtools.mount(ref);
|
|
41
|
+
(0, solid_js.onCleanup)(() => devtools.unmount());
|
|
42
|
+
});
|
|
43
|
+
return (() => {
|
|
44
|
+
var _el$ = _tmpl$();
|
|
45
|
+
var _ref$ = ref;
|
|
46
|
+
typeof _ref$ === "function" ? (0, solid_js_web.use)(_ref$, _el$) : ref = _el$;
|
|
47
|
+
(0, solid_js_web.effect)((_$p) => (0, solid_js_web.style)(_el$, { ...props.style }, _$p));
|
|
48
|
+
return _el$;
|
|
49
|
+
})();
|
|
50
|
+
}
|
|
51
|
+
//#endregion
|
|
52
|
+
exports.default = SolidQueryDevtoolsPanel;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { createEffect, createMemo, onCleanup, onMount } from "solid-js";
|
|
2
|
+
import { onlineManager, useQueryClient } from "@tanstack/solid-query";
|
|
3
|
+
import { TanstackQueryDevtoolsPanel } from "@tanstack/query-devtools";
|
|
4
|
+
//#region src/devtoolsPanel.tsx
|
|
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
|
+
createEffect(() => {
|
|
32
|
+
devtools.setErrorTypes(props.errorTypes || []);
|
|
33
|
+
});
|
|
34
|
+
createEffect(() => {
|
|
35
|
+
devtools.setTheme(props.theme || "system");
|
|
36
|
+
});
|
|
37
|
+
onMount(() => {
|
|
38
|
+
devtools.mount(ref);
|
|
39
|
+
onCleanup(() => devtools.unmount());
|
|
40
|
+
});
|
|
41
|
+
return <div style={{
|
|
42
|
+
height: "500px",
|
|
43
|
+
...props.style
|
|
44
|
+
}} class="tsqd-parent-container" ref={ref} />;
|
|
45
|
+
}
|
|
46
|
+
//#endregion
|
|
47
|
+
export { SolidQueryDevtoolsPanel as default };
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { effect, style, template, use } from "solid-js/web";
|
|
2
|
+
import { createEffect, createMemo, onCleanup, onMount } from "solid-js";
|
|
3
|
+
import { onlineManager, useQueryClient } from "@tanstack/solid-query";
|
|
4
|
+
import { TanstackQueryDevtoolsPanel } from "@tanstack/query-devtools";
|
|
5
|
+
//#region src/devtoolsPanel.tsx
|
|
6
|
+
var _tmpl$ = /*#__PURE__*/ template(`<div class=tsqd-parent-container style=height:500px>`);
|
|
7
|
+
function SolidQueryDevtoolsPanel(props) {
|
|
8
|
+
const queryClient = useQueryClient(props.client);
|
|
9
|
+
const client = createMemo(() => queryClient);
|
|
10
|
+
let ref;
|
|
11
|
+
const { errorTypes, styleNonce, shadowDOMTarget, hideDisabledQueries } = props;
|
|
12
|
+
const devtools = new TanstackQueryDevtoolsPanel({
|
|
13
|
+
client: client(),
|
|
14
|
+
queryFlavor: "Solid Query",
|
|
15
|
+
version: "5",
|
|
16
|
+
onlineManager,
|
|
17
|
+
buttonPosition: "bottom-left",
|
|
18
|
+
position: "bottom",
|
|
19
|
+
initialIsOpen: true,
|
|
20
|
+
errorTypes,
|
|
21
|
+
styleNonce,
|
|
22
|
+
shadowDOMTarget,
|
|
23
|
+
onClose: props.onClose,
|
|
24
|
+
hideDisabledQueries,
|
|
25
|
+
theme: props.theme
|
|
26
|
+
});
|
|
27
|
+
createEffect(() => {
|
|
28
|
+
devtools.setClient(client());
|
|
29
|
+
});
|
|
30
|
+
createEffect(() => {
|
|
31
|
+
devtools.setOnClose(props.onClose ?? (() => {}));
|
|
32
|
+
});
|
|
33
|
+
createEffect(() => {
|
|
34
|
+
devtools.setErrorTypes(props.errorTypes || []);
|
|
35
|
+
});
|
|
36
|
+
createEffect(() => {
|
|
37
|
+
devtools.setTheme(props.theme || "system");
|
|
38
|
+
});
|
|
39
|
+
onMount(() => {
|
|
40
|
+
devtools.mount(ref);
|
|
41
|
+
onCleanup(() => devtools.unmount());
|
|
42
|
+
});
|
|
43
|
+
return (() => {
|
|
44
|
+
var _el$ = _tmpl$();
|
|
45
|
+
var _ref$ = ref;
|
|
46
|
+
typeof _ref$ === "function" ? use(_ref$, _el$) : ref = _el$;
|
|
47
|
+
effect((_$p) => style(_el$, { ...props.style }, _$p));
|
|
48
|
+
return _el$;
|
|
49
|
+
})();
|
|
50
|
+
}
|
|
51
|
+
//#endregion
|
|
52
|
+
export { SolidQueryDevtoolsPanel as default };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{effect as e,style as t,template as n,use as r}from"solid-js/web";import{createEffect as i,createMemo as a,onCleanup as o,onMount as s}from"solid-js";import{onlineManager as c,useQueryClient as l}from"@tanstack/solid-query";import{TanstackQueryDevtoolsPanel as u}from"@tanstack/query-devtools";var d=n(`<div class=tsqd-parent-container style=height:500px>`);function f(n){let f=l(n.client),p=a(()=>f),m,{errorTypes:h,styleNonce:g,shadowDOMTarget:_,hideDisabledQueries:v}=n,y=new u({client:p(),queryFlavor:`Solid Query`,version:`5`,onlineManager:c,buttonPosition:`bottom-left`,position:`bottom`,initialIsOpen:!0,errorTypes:h,styleNonce:g,shadowDOMTarget:_,onClose:n.onClose,hideDisabledQueries:v,theme:n.theme});return i(()=>{y.setClient(p())}),i(()=>{y.setOnClose(n.onClose??(()=>{}))}),i(()=>{y.setErrorTypes(n.errorTypes||[])}),i(()=>{y.setTheme(n.theme||`system`)}),s(()=>{y.mount(m),o(()=>y.unmount())}),(()=>{var i=d(),a=m;return typeof a==`function`?r(a,i):m=i,e(e=>t(i,{...n.style},e)),i})()}export{f as default};
|
|
2
|
+
//# sourceMappingURL=devtoolsPanel-GNd-i8LJ.js.map
|