@tanstack/solid-query-devtools 5.91.3 → 6.0.0-alpha.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/_tsup-dts-rollup.d.cts +119 -0
- package/build/_tsup-dts-rollup.d.ts +119 -0
- package/build/chunk/KLS34EMT.js +1065 -0
- package/build/chunk/RDKFYAW3.js +1034 -0
- package/build/dev.cjs +1124 -43
- package/build/dev.d.cts +3 -0
- package/build/dev.d.ts +3 -0
- package/build/dev.js +10 -9
- package/build/dev.jsx +1033 -16
- package/build/devtools/{BCD44V6M.js → CHPGNEUY.js} +17 -20
- package/build/devtools/{32HRKFKI.jsx → MU7AYS7J.jsx} +40 -24
- package/build/devtools/OWDQYIA3.js +59 -0
- package/build/devtoolsPanel/{VKJ7SILT.js → CQ4HXSZG.js} +20 -20
- package/build/devtoolsPanel/LLRYE7CA.js +62 -0
- package/build/devtoolsPanel/{NDFIDQLQ.jsx → NLCUKFXJ.jsx} +27 -15
- package/build/index.cjs +1093 -43
- package/build/index.d.cts +3 -94
- package/build/index.d.ts +3 -94
- package/build/index.js +10 -9
- package/build/index.jsx +1004 -16
- package/package.json +13 -10
- package/src/clientOnly.tsx +9 -7
- package/src/devtools.tsx +42 -26
- package/src/devtoolsPanel.tsx +26 -14
- package/src/index.tsx +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tanstack/solid-query-devtools",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "6.0.0-alpha.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",
|
|
@@ -47,30 +47,33 @@
|
|
|
47
47
|
"@tanstack/query-devtools": "5.93.0"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
|
+
"@babel/core": "^7.28.0",
|
|
51
|
+
"@babel/preset-typescript": "^7.18.6",
|
|
50
52
|
"@solidjs/testing-library": "^0.8.10",
|
|
53
|
+
"@solidjs/web": "2.0.0-beta.2",
|
|
54
|
+
"babel-preset-solid": "2.0.0-beta.2",
|
|
51
55
|
"npm-run-all2": "^5.0.0",
|
|
52
|
-
"solid-js": "
|
|
56
|
+
"solid-js": "2.0.0-beta.2",
|
|
53
57
|
"tsup-preset-solid": "^2.2.0",
|
|
54
|
-
"vite-plugin-solid": "
|
|
55
|
-
"@tanstack/solid-query": "
|
|
58
|
+
"vite-plugin-solid": "3.0.0-next.2",
|
|
59
|
+
"@tanstack/solid-query": "6.0.0-alpha.0"
|
|
56
60
|
},
|
|
57
61
|
"peerDependencies": {
|
|
58
|
-
"solid-js": "
|
|
59
|
-
"@tanstack/solid-query": "^
|
|
62
|
+
"solid-js": ">=2.0.0-beta.0 <3.0.0",
|
|
63
|
+
"@tanstack/solid-query": "^6.0.0-alpha.0"
|
|
60
64
|
},
|
|
61
65
|
"scripts": {
|
|
62
66
|
"clean": "premove ./build ./coverage ./dist-ts",
|
|
63
67
|
"compile": "tsc --build",
|
|
64
68
|
"test:eslint": "eslint --concurrency=auto ./src",
|
|
65
69
|
"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
70
|
"test:types:ts54": "node ../../node_modules/typescript54/lib/tsc.js --build",
|
|
71
71
|
"test:types:ts55": "node ../../node_modules/typescript55/lib/tsc.js --build",
|
|
72
72
|
"test:types:ts56": "node ../../node_modules/typescript56/lib/tsc.js --build",
|
|
73
73
|
"test:types:ts57": "node ../../node_modules/typescript57/lib/tsc.js --build",
|
|
74
|
+
"test:types:ts58": "node ../../node_modules/typescript58/lib/tsc.js --build",
|
|
75
|
+
"test:types:ts59": "node ../../node_modules/typescript59/lib/tsc.js --build",
|
|
76
|
+
"test:types:ts60": "node ../../node_modules/typescript60/lib/tsc.js --build",
|
|
74
77
|
"test:build": "publint --strict && attw --pack",
|
|
75
78
|
"test:lib": "vitest --retry=3",
|
|
76
79
|
"test:lib:dev": "pnpm run test:lib --watch",
|
package/src/clientOnly.tsx
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createMemo,
|
|
3
3
|
createSignal,
|
|
4
|
-
|
|
4
|
+
omit,
|
|
5
|
+
onSettled,
|
|
5
6
|
sharedConfig,
|
|
6
|
-
splitProps,
|
|
7
7
|
untrack,
|
|
8
8
|
} from 'solid-js'
|
|
9
|
-
import { isServer } from '
|
|
9
|
+
import { isServer } from '@solidjs/web'
|
|
10
10
|
import type { Component, ComponentProps, JSX } from 'solid-js'
|
|
11
11
|
|
|
12
12
|
/*
|
|
@@ -28,10 +28,12 @@ export default function clientOnly<T extends Component<any>>(
|
|
|
28
28
|
return (props: ComponentProps<T>) => {
|
|
29
29
|
let Comp: T | undefined
|
|
30
30
|
let m: boolean
|
|
31
|
-
const
|
|
32
|
-
if ((Comp = comp()) && !sharedConfig.
|
|
33
|
-
const [mounted, setMounted] = createSignal(!sharedConfig.
|
|
34
|
-
|
|
31
|
+
const rest = omit(props, 'fallback')
|
|
32
|
+
if ((Comp = comp()) && !sharedConfig.hydrating) return Comp(rest)
|
|
33
|
+
const [mounted, setMounted] = createSignal(!sharedConfig.hydrating)
|
|
34
|
+
onSettled(() => {
|
|
35
|
+
setMounted(true)
|
|
36
|
+
})
|
|
35
37
|
return createMemo(
|
|
36
38
|
() => (
|
|
37
39
|
(Comp = comp()),
|
package/src/devtools.tsx
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createEffect, createMemo, onCleanup,
|
|
1
|
+
import { createEffect, createMemo, onCleanup, onSettled } from 'solid-js'
|
|
2
2
|
import { onlineManager, useQueryClient } from '@tanstack/solid-query'
|
|
3
3
|
import { TanstackQueryDevtools } from '@tanstack/query-devtools'
|
|
4
4
|
import type {
|
|
@@ -72,37 +72,53 @@ export default function SolidQueryDevtools(props: DevtoolsOptions) {
|
|
|
72
72
|
theme: props.theme,
|
|
73
73
|
})
|
|
74
74
|
|
|
75
|
-
createEffect(
|
|
76
|
-
|
|
77
|
-
|
|
75
|
+
createEffect(
|
|
76
|
+
() => client(),
|
|
77
|
+
(c) => {
|
|
78
|
+
devtools.setClient(c)
|
|
79
|
+
},
|
|
80
|
+
)
|
|
78
81
|
|
|
79
|
-
createEffect(
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
82
|
+
createEffect(
|
|
83
|
+
() => props.buttonPosition,
|
|
84
|
+
(buttonPos) => {
|
|
85
|
+
if (buttonPos) {
|
|
86
|
+
devtools.setButtonPosition(buttonPos)
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
)
|
|
85
90
|
|
|
86
|
-
createEffect(
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
91
|
+
createEffect(
|
|
92
|
+
() => props.position,
|
|
93
|
+
(pos) => {
|
|
94
|
+
if (pos) {
|
|
95
|
+
devtools.setPosition(pos)
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
)
|
|
92
99
|
|
|
93
|
-
createEffect(
|
|
94
|
-
|
|
95
|
-
|
|
100
|
+
createEffect(
|
|
101
|
+
() => props.initialIsOpen,
|
|
102
|
+
(initialIsOpen) => {
|
|
103
|
+
devtools.setInitialIsOpen(initialIsOpen || false)
|
|
104
|
+
},
|
|
105
|
+
)
|
|
96
106
|
|
|
97
|
-
createEffect(
|
|
98
|
-
|
|
99
|
-
|
|
107
|
+
createEffect(
|
|
108
|
+
() => props.errorTypes,
|
|
109
|
+
(errorTypes) => {
|
|
110
|
+
devtools.setErrorTypes(errorTypes || [])
|
|
111
|
+
},
|
|
112
|
+
)
|
|
100
113
|
|
|
101
|
-
createEffect(
|
|
102
|
-
|
|
103
|
-
|
|
114
|
+
createEffect(
|
|
115
|
+
() => props.theme,
|
|
116
|
+
(theme) => {
|
|
117
|
+
devtools.setTheme(theme || 'system')
|
|
118
|
+
},
|
|
119
|
+
)
|
|
104
120
|
|
|
105
|
-
|
|
121
|
+
onSettled(() => {
|
|
106
122
|
devtools.mount(ref)
|
|
107
123
|
onCleanup(() => devtools.unmount())
|
|
108
124
|
})
|
package/src/devtoolsPanel.tsx
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createEffect, createMemo, onCleanup,
|
|
1
|
+
import { createEffect, createMemo, onCleanup, onSettled } from 'solid-js'
|
|
2
2
|
import { onlineManager, useQueryClient } from '@tanstack/solid-query'
|
|
3
3
|
import { TanstackQueryDevtoolsPanel } from '@tanstack/query-devtools'
|
|
4
4
|
import type { DevtoolsErrorType, Theme } from '@tanstack/query-devtools'
|
|
@@ -66,22 +66,34 @@ export default function SolidQueryDevtoolsPanel(props: DevtoolsPanelOptions) {
|
|
|
66
66
|
hideDisabledQueries,
|
|
67
67
|
theme: props.theme,
|
|
68
68
|
})
|
|
69
|
-
createEffect(
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
69
|
+
createEffect(
|
|
70
|
+
() => client(),
|
|
71
|
+
(c) => {
|
|
72
|
+
devtools.setClient(c)
|
|
73
|
+
},
|
|
74
|
+
)
|
|
75
|
+
createEffect(
|
|
76
|
+
() => props.onClose,
|
|
77
|
+
(onClose) => {
|
|
78
|
+
devtools.setOnClose(onClose ?? (() => {}))
|
|
79
|
+
},
|
|
80
|
+
)
|
|
75
81
|
|
|
76
|
-
createEffect(
|
|
77
|
-
|
|
78
|
-
|
|
82
|
+
createEffect(
|
|
83
|
+
() => props.errorTypes,
|
|
84
|
+
(errorTypes2) => {
|
|
85
|
+
devtools.setErrorTypes(errorTypes2 || [])
|
|
86
|
+
},
|
|
87
|
+
)
|
|
79
88
|
|
|
80
|
-
createEffect(
|
|
81
|
-
|
|
82
|
-
|
|
89
|
+
createEffect(
|
|
90
|
+
() => props.theme,
|
|
91
|
+
(theme) => {
|
|
92
|
+
devtools.setTheme(theme || 'system')
|
|
93
|
+
},
|
|
94
|
+
)
|
|
83
95
|
|
|
84
|
-
|
|
96
|
+
onSettled(() => {
|
|
85
97
|
devtools.mount(ref)
|
|
86
98
|
onCleanup(() => devtools.unmount())
|
|
87
99
|
})
|
package/src/index.tsx
CHANGED