@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/index.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 };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tanstack/solid-query-devtools",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.102.0",
|
|
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,36 +44,34 @@
|
|
|
44
44
|
"!src/__tests__"
|
|
45
45
|
],
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@tanstack/query-devtools": "5.
|
|
47
|
+
"@tanstack/query-devtools": "5.102.0"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
50
|
"@solidjs/testing-library": "^0.8.10",
|
|
51
51
|
"npm-run-all2": "^5.0.0",
|
|
52
52
|
"solid-js": "^1.9.7",
|
|
53
|
-
"
|
|
53
|
+
"unplugin-solid": "^2.0.0",
|
|
54
54
|
"vite-plugin-solid": "^2.11.6",
|
|
55
|
-
"@tanstack/solid-query": "5.
|
|
55
|
+
"@tanstack/solid-query": "5.102.0"
|
|
56
56
|
},
|
|
57
57
|
"peerDependencies": {
|
|
58
58
|
"solid-js": "^1.6.0",
|
|
59
|
-
"@tanstack/solid-query": "^5.
|
|
59
|
+
"@tanstack/solid-query": "^5.102.0"
|
|
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:ts54": "node ../../node_modules/typescript54/lib/tsc.js --build",
|
|
67
|
-
"test:types:ts55": "node ../../node_modules/typescript55/lib/tsc.js --build",
|
|
68
66
|
"test:types:ts56": "node ../../node_modules/typescript56/lib/tsc.js --build",
|
|
69
67
|
"test:types:ts57": "node ../../node_modules/typescript57/lib/tsc.js --build",
|
|
70
68
|
"test:types:ts58": "node ../../node_modules/typescript58/lib/tsc.js --build",
|
|
71
69
|
"test:types:ts59": "node ../../node_modules/typescript59/lib/tsc.js --build",
|
|
72
|
-
"test:types:
|
|
70
|
+
"test:types:ts70": "node ../../node_modules/typescript70/lib/tsc.js --build",
|
|
73
71
|
"test:build": "publint --strict && attw --pack",
|
|
74
72
|
"test:lib": "vitest --retry=3",
|
|
75
73
|
"test:lib:dev": "pnpm run test:lib --watch",
|
|
76
|
-
"build": "
|
|
77
|
-
"build:dev": "
|
|
74
|
+
"build": "tsdown --tsconfig tsconfig.prod.json",
|
|
75
|
+
"build:dev": "tsdown --watch"
|
|
78
76
|
}
|
|
79
77
|
}
|
|
@@ -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 { use, template } 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,61 +0,0 @@
|
|
|
1
|
-
import { use, effect, style, template } 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 style=height:500px>`);
|
|
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
|
-
...props.style
|
|
56
|
-
}, _$p));
|
|
57
|
-
return _el$;
|
|
58
|
-
})();
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
export { SolidQueryDevtoolsPanel as default };
|