@tanstack/solid-query-devtools 5.94.5 → 6.0.0-alpha.1
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/chunk/75V4Q6CI.js +1231 -0
- package/build/chunk/AU2REB6C.js +1195 -0
- package/build/dev.cjs +1310 -44
- package/build/dev.js +10 -9
- package/build/dev.jsx +1202 -16
- package/build/devtools/{BCD44V6M.js → BK5V6NH3.js} +27 -21
- package/build/devtools/CBPRJMAC.js +68 -0
- package/build/devtools/R2AGYIME.jsx +80 -0
- package/build/devtoolsPanel/{VOW4J2DZ.js → A5BO2WVY.js} +29 -19
- package/build/devtoolsPanel/KNUODKZO.js +71 -0
- package/build/devtoolsPanel/{NDFIDQLQ.jsx → QZBU22C7.jsx} +37 -16
- package/build/index.cjs +1274 -44
- package/build/index.js +10 -9
- package/build/index.jsx +1165 -16
- package/package.json +11 -7
- package/src/clientOnly.tsx +9 -7
- package/src/devtools.tsx +54 -27
- package/src/devtoolsPanel.tsx +38 -15
- package/src/index.tsx +1 -1
- package/build/devtools/32HRKFKI.jsx +0 -55
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { createMemo, createEffect,
|
|
1
|
+
import { ref, template } from '../chunk/AU2REB6C.js';
|
|
2
|
+
import { createMemo, createEffect, onCleanup } from 'solid-js';
|
|
3
3
|
import { useQueryClient, onlineManager } from '@tanstack/solid-query';
|
|
4
4
|
import { TanstackQueryDevtools } from '@tanstack/query-devtools';
|
|
5
5
|
|
|
6
|
-
// src/devtools.tsx
|
|
7
6
|
var _tmpl$ = /* @__PURE__ */ template(`<div class=tsqd-parent-container>`);
|
|
8
7
|
function SolidQueryDevtools(props) {
|
|
9
8
|
const queryClient = useQueryClient(props.client);
|
|
10
9
|
const client = createMemo(() => queryClient);
|
|
11
|
-
let
|
|
10
|
+
let ref2;
|
|
12
11
|
const devtools = new TanstackQueryDevtools({
|
|
13
12
|
client: client(),
|
|
14
13
|
queryFlavor: "Solid Query",
|
|
@@ -23,38 +22,45 @@ function SolidQueryDevtools(props) {
|
|
|
23
22
|
hideDisabledQueries: props.hideDisabledQueries,
|
|
24
23
|
theme: props.theme
|
|
25
24
|
});
|
|
26
|
-
createEffect(() => {
|
|
27
|
-
devtools.setClient(
|
|
25
|
+
createEffect(() => client(), (c) => {
|
|
26
|
+
devtools.setClient(c);
|
|
28
27
|
});
|
|
29
|
-
createEffect(() => {
|
|
30
|
-
const buttonPos = props.buttonPosition;
|
|
28
|
+
createEffect(() => props.buttonPosition, (buttonPos) => {
|
|
31
29
|
if (buttonPos) {
|
|
32
30
|
devtools.setButtonPosition(buttonPos);
|
|
33
31
|
}
|
|
34
32
|
});
|
|
35
|
-
createEffect(() => {
|
|
36
|
-
const pos = props.position;
|
|
33
|
+
createEffect(() => props.position, (pos) => {
|
|
37
34
|
if (pos) {
|
|
38
35
|
devtools.setPosition(pos);
|
|
39
36
|
}
|
|
40
37
|
});
|
|
41
|
-
createEffect(() => {
|
|
42
|
-
devtools.setInitialIsOpen(
|
|
38
|
+
createEffect(() => props.initialIsOpen, (initialIsOpen) => {
|
|
39
|
+
devtools.setInitialIsOpen(initialIsOpen || false);
|
|
43
40
|
});
|
|
44
|
-
createEffect(() => {
|
|
45
|
-
devtools.setErrorTypes(
|
|
41
|
+
createEffect(() => props.errorTypes, (errorTypes) => {
|
|
42
|
+
devtools.setErrorTypes(errorTypes || []);
|
|
46
43
|
});
|
|
47
|
-
createEffect(() => {
|
|
48
|
-
devtools.setTheme(
|
|
44
|
+
createEffect(() => props.theme, (theme) => {
|
|
45
|
+
devtools.setTheme(theme || "system");
|
|
49
46
|
});
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
47
|
+
let isMounted = false;
|
|
48
|
+
let isDisposed = false;
|
|
49
|
+
queueMicrotask(() => {
|
|
50
|
+
if (isDisposed) return;
|
|
51
|
+
devtools.mount(ref2);
|
|
52
|
+
isMounted = true;
|
|
53
|
+
});
|
|
54
|
+
onCleanup(() => {
|
|
55
|
+
isDisposed = true;
|
|
56
|
+
if (isMounted) {
|
|
57
|
+
devtools.unmount();
|
|
58
|
+
}
|
|
53
59
|
});
|
|
54
60
|
return (() => {
|
|
55
61
|
var _el$ = _tmpl$();
|
|
56
|
-
var _ref$ =
|
|
57
|
-
typeof _ref$ === "function" ?
|
|
62
|
+
var _ref$ = ref2;
|
|
63
|
+
typeof _ref$ === "function" || Array.isArray(_ref$) ? ref(() => _ref$, _el$) : ref2 = _el$;
|
|
58
64
|
return _el$;
|
|
59
65
|
})();
|
|
60
66
|
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { ref, template } from '../chunk/75V4Q6CI.js';
|
|
2
|
+
import { createMemo, createEffect, onCleanup } from 'solid-js';
|
|
3
|
+
import { useQueryClient, onlineManager } from '@tanstack/solid-query';
|
|
4
|
+
import { TanstackQueryDevtools } from '@tanstack/query-devtools';
|
|
5
|
+
|
|
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 ref2;
|
|
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(() => client(), (c) => {
|
|
26
|
+
devtools.setClient(c);
|
|
27
|
+
});
|
|
28
|
+
createEffect(() => props.buttonPosition, (buttonPos) => {
|
|
29
|
+
if (buttonPos) {
|
|
30
|
+
devtools.setButtonPosition(buttonPos);
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
createEffect(() => props.position, (pos) => {
|
|
34
|
+
if (pos) {
|
|
35
|
+
devtools.setPosition(pos);
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
createEffect(() => props.initialIsOpen, (initialIsOpen) => {
|
|
39
|
+
devtools.setInitialIsOpen(initialIsOpen || false);
|
|
40
|
+
});
|
|
41
|
+
createEffect(() => props.errorTypes, (errorTypes) => {
|
|
42
|
+
devtools.setErrorTypes(errorTypes || []);
|
|
43
|
+
});
|
|
44
|
+
createEffect(() => props.theme, (theme) => {
|
|
45
|
+
devtools.setTheme(theme || "system");
|
|
46
|
+
});
|
|
47
|
+
let isMounted = false;
|
|
48
|
+
let isDisposed = false;
|
|
49
|
+
queueMicrotask(() => {
|
|
50
|
+
if (isDisposed) return;
|
|
51
|
+
devtools.mount(ref2);
|
|
52
|
+
isMounted = true;
|
|
53
|
+
});
|
|
54
|
+
onCleanup(() => {
|
|
55
|
+
isDisposed = true;
|
|
56
|
+
if (isMounted) {
|
|
57
|
+
devtools.unmount();
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
return (() => {
|
|
61
|
+
var _el$ = _tmpl$();
|
|
62
|
+
var _ref$ = ref2;
|
|
63
|
+
typeof _ref$ === "function" || Array.isArray(_ref$) ? ref(() => _ref$, _el$) : ref2 = _el$;
|
|
64
|
+
return _el$;
|
|
65
|
+
})();
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export { SolidQueryDevtools as default };
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
// src/devtools.tsx
|
|
2
|
+
import { createEffect, createMemo, onCleanup } 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
|
+
() => client(),
|
|
25
|
+
(c) => {
|
|
26
|
+
devtools.setClient(c);
|
|
27
|
+
}
|
|
28
|
+
);
|
|
29
|
+
createEffect(
|
|
30
|
+
() => props.buttonPosition,
|
|
31
|
+
(buttonPos) => {
|
|
32
|
+
if (buttonPos) {
|
|
33
|
+
devtools.setButtonPosition(buttonPos);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
);
|
|
37
|
+
createEffect(
|
|
38
|
+
() => props.position,
|
|
39
|
+
(pos) => {
|
|
40
|
+
if (pos) {
|
|
41
|
+
devtools.setPosition(pos);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
);
|
|
45
|
+
createEffect(
|
|
46
|
+
() => props.initialIsOpen,
|
|
47
|
+
(initialIsOpen) => {
|
|
48
|
+
devtools.setInitialIsOpen(initialIsOpen || false);
|
|
49
|
+
}
|
|
50
|
+
);
|
|
51
|
+
createEffect(
|
|
52
|
+
() => props.errorTypes,
|
|
53
|
+
(errorTypes) => {
|
|
54
|
+
devtools.setErrorTypes(errorTypes || []);
|
|
55
|
+
}
|
|
56
|
+
);
|
|
57
|
+
createEffect(
|
|
58
|
+
() => props.theme,
|
|
59
|
+
(theme) => {
|
|
60
|
+
devtools.setTheme(theme || "system");
|
|
61
|
+
}
|
|
62
|
+
);
|
|
63
|
+
let isMounted = false;
|
|
64
|
+
let isDisposed = false;
|
|
65
|
+
queueMicrotask(() => {
|
|
66
|
+
if (isDisposed) return;
|
|
67
|
+
devtools.mount(ref);
|
|
68
|
+
isMounted = true;
|
|
69
|
+
});
|
|
70
|
+
onCleanup(() => {
|
|
71
|
+
isDisposed = true;
|
|
72
|
+
if (isMounted) {
|
|
73
|
+
devtools.unmount();
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
return <div class="tsqd-parent-container" ref={ref} />;
|
|
77
|
+
}
|
|
78
|
+
export {
|
|
79
|
+
SolidQueryDevtools as default
|
|
80
|
+
};
|
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { createMemo, createEffect,
|
|
1
|
+
import { ref, effect, style, template } from '../chunk/AU2REB6C.js';
|
|
2
|
+
import { createMemo, createEffect, onCleanup } from 'solid-js';
|
|
3
3
|
import { useQueryClient, onlineManager } from '@tanstack/solid-query';
|
|
4
4
|
import { TanstackQueryDevtoolsPanel } from '@tanstack/query-devtools';
|
|
5
5
|
|
|
6
|
-
// src/devtoolsPanel.tsx
|
|
7
6
|
var _tmpl$ = /* @__PURE__ */ template(`<div class=tsqd-parent-container style=height:500px>`);
|
|
8
7
|
function SolidQueryDevtoolsPanel(props) {
|
|
9
8
|
const queryClient = useQueryClient(props.client);
|
|
10
9
|
const client = createMemo(() => queryClient);
|
|
11
|
-
let
|
|
10
|
+
let ref2;
|
|
12
11
|
const {
|
|
13
12
|
errorTypes,
|
|
14
13
|
styleNonce,
|
|
@@ -30,30 +29,41 @@ function SolidQueryDevtoolsPanel(props) {
|
|
|
30
29
|
hideDisabledQueries,
|
|
31
30
|
theme: props.theme
|
|
32
31
|
});
|
|
33
|
-
createEffect(() => {
|
|
34
|
-
devtools.setClient(
|
|
32
|
+
createEffect(() => client(), (c) => {
|
|
33
|
+
devtools.setClient(c);
|
|
35
34
|
});
|
|
36
|
-
createEffect(() => {
|
|
37
|
-
devtools.setOnClose(
|
|
35
|
+
createEffect(() => props.onClose, (onClose) => {
|
|
36
|
+
devtools.setOnClose(onClose ?? (() => {
|
|
38
37
|
}));
|
|
39
38
|
});
|
|
40
|
-
createEffect(() => {
|
|
41
|
-
devtools.setErrorTypes(
|
|
39
|
+
createEffect(() => props.errorTypes, (errorTypes2) => {
|
|
40
|
+
devtools.setErrorTypes(errorTypes2 || []);
|
|
42
41
|
});
|
|
43
|
-
createEffect(() => {
|
|
44
|
-
devtools.setTheme(
|
|
42
|
+
createEffect(() => props.theme, (theme) => {
|
|
43
|
+
devtools.setTheme(theme || "system");
|
|
45
44
|
});
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
45
|
+
let isMounted = false;
|
|
46
|
+
let isDisposed = false;
|
|
47
|
+
queueMicrotask(() => {
|
|
48
|
+
if (isDisposed) return;
|
|
49
|
+
devtools.mount(ref2);
|
|
50
|
+
isMounted = true;
|
|
51
|
+
});
|
|
52
|
+
onCleanup(() => {
|
|
53
|
+
isDisposed = true;
|
|
54
|
+
if (isMounted) {
|
|
55
|
+
devtools.unmount();
|
|
56
|
+
}
|
|
49
57
|
});
|
|
50
58
|
return (() => {
|
|
51
59
|
var _el$ = _tmpl$();
|
|
52
|
-
var _ref$ =
|
|
53
|
-
typeof _ref$ === "function" ?
|
|
54
|
-
effect((
|
|
60
|
+
var _ref$ = ref2;
|
|
61
|
+
typeof _ref$ === "function" || Array.isArray(_ref$) ? ref(() => _ref$, _el$) : ref2 = _el$;
|
|
62
|
+
effect(() => ({
|
|
55
63
|
...props.style
|
|
56
|
-
}, _$p)
|
|
64
|
+
}), (_v$, _$p) => {
|
|
65
|
+
style(_el$, _v$, _$p);
|
|
66
|
+
});
|
|
57
67
|
return _el$;
|
|
58
68
|
})();
|
|
59
69
|
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { ref, effect, style, template } from '../chunk/75V4Q6CI.js';
|
|
2
|
+
import { createMemo, createEffect, onCleanup } from 'solid-js';
|
|
3
|
+
import { useQueryClient, onlineManager } from '@tanstack/solid-query';
|
|
4
|
+
import { TanstackQueryDevtoolsPanel } from '@tanstack/query-devtools';
|
|
5
|
+
|
|
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 ref2;
|
|
11
|
+
const {
|
|
12
|
+
errorTypes,
|
|
13
|
+
styleNonce,
|
|
14
|
+
shadowDOMTarget,
|
|
15
|
+
hideDisabledQueries
|
|
16
|
+
} = props;
|
|
17
|
+
const devtools = new TanstackQueryDevtoolsPanel({
|
|
18
|
+
client: client(),
|
|
19
|
+
queryFlavor: "Solid Query",
|
|
20
|
+
version: "5",
|
|
21
|
+
onlineManager,
|
|
22
|
+
buttonPosition: "bottom-left",
|
|
23
|
+
position: "bottom",
|
|
24
|
+
initialIsOpen: true,
|
|
25
|
+
errorTypes,
|
|
26
|
+
styleNonce,
|
|
27
|
+
shadowDOMTarget,
|
|
28
|
+
onClose: props.onClose,
|
|
29
|
+
hideDisabledQueries,
|
|
30
|
+
theme: props.theme
|
|
31
|
+
});
|
|
32
|
+
createEffect(() => client(), (c) => {
|
|
33
|
+
devtools.setClient(c);
|
|
34
|
+
});
|
|
35
|
+
createEffect(() => props.onClose, (onClose) => {
|
|
36
|
+
devtools.setOnClose(onClose ?? (() => {
|
|
37
|
+
}));
|
|
38
|
+
});
|
|
39
|
+
createEffect(() => props.errorTypes, (errorTypes2) => {
|
|
40
|
+
devtools.setErrorTypes(errorTypes2 || []);
|
|
41
|
+
});
|
|
42
|
+
createEffect(() => props.theme, (theme) => {
|
|
43
|
+
devtools.setTheme(theme || "system");
|
|
44
|
+
});
|
|
45
|
+
let isMounted = false;
|
|
46
|
+
let isDisposed = false;
|
|
47
|
+
queueMicrotask(() => {
|
|
48
|
+
if (isDisposed) return;
|
|
49
|
+
devtools.mount(ref2);
|
|
50
|
+
isMounted = true;
|
|
51
|
+
});
|
|
52
|
+
onCleanup(() => {
|
|
53
|
+
isDisposed = true;
|
|
54
|
+
if (isMounted) {
|
|
55
|
+
devtools.unmount();
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
return (() => {
|
|
59
|
+
var _el$ = _tmpl$();
|
|
60
|
+
var _ref$ = ref2;
|
|
61
|
+
typeof _ref$ === "function" || Array.isArray(_ref$) ? ref(() => _ref$, _el$) : ref2 = _el$;
|
|
62
|
+
effect(() => ({
|
|
63
|
+
...props.style
|
|
64
|
+
}), (_v$, _$p) => {
|
|
65
|
+
style(_el$, _v$, _$p);
|
|
66
|
+
});
|
|
67
|
+
return _el$;
|
|
68
|
+
})();
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export { SolidQueryDevtoolsPanel as default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// src/devtoolsPanel.tsx
|
|
2
|
-
import { createEffect, createMemo, onCleanup
|
|
2
|
+
import { createEffect, createMemo, onCleanup } from "solid-js";
|
|
3
3
|
import { onlineManager, useQueryClient } from "@tanstack/solid-query";
|
|
4
4
|
import { TanstackQueryDevtoolsPanel } from "@tanstack/query-devtools";
|
|
5
5
|
function SolidQueryDevtoolsPanel(props) {
|
|
@@ -22,22 +22,43 @@ function SolidQueryDevtoolsPanel(props) {
|
|
|
22
22
|
hideDisabledQueries,
|
|
23
23
|
theme: props.theme
|
|
24
24
|
});
|
|
25
|
-
createEffect(
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
25
|
+
createEffect(
|
|
26
|
+
() => client(),
|
|
27
|
+
(c) => {
|
|
28
|
+
devtools.setClient(c);
|
|
29
|
+
}
|
|
30
|
+
);
|
|
31
|
+
createEffect(
|
|
32
|
+
() => props.onClose,
|
|
33
|
+
(onClose) => {
|
|
34
|
+
devtools.setOnClose(onClose ?? (() => {
|
|
35
|
+
}));
|
|
36
|
+
}
|
|
37
|
+
);
|
|
38
|
+
createEffect(
|
|
39
|
+
() => props.errorTypes,
|
|
40
|
+
(errorTypes2) => {
|
|
41
|
+
devtools.setErrorTypes(errorTypes2 || []);
|
|
42
|
+
}
|
|
43
|
+
);
|
|
44
|
+
createEffect(
|
|
45
|
+
() => props.theme,
|
|
46
|
+
(theme) => {
|
|
47
|
+
devtools.setTheme(theme || "system");
|
|
48
|
+
}
|
|
49
|
+
);
|
|
50
|
+
let isMounted = false;
|
|
51
|
+
let isDisposed = false;
|
|
52
|
+
queueMicrotask(() => {
|
|
53
|
+
if (isDisposed) return;
|
|
39
54
|
devtools.mount(ref);
|
|
40
|
-
|
|
55
|
+
isMounted = true;
|
|
56
|
+
});
|
|
57
|
+
onCleanup(() => {
|
|
58
|
+
isDisposed = true;
|
|
59
|
+
if (isMounted) {
|
|
60
|
+
devtools.unmount();
|
|
61
|
+
}
|
|
41
62
|
});
|
|
42
63
|
return <div
|
|
43
64
|
style={{ height: "500px", ...props.style }}
|