@tanstack/solid-query-devtools 6.0.0-alpha.0 → 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/{KLS34EMT.js → 75V4Q6CI.js} +337 -171
- package/build/chunk/{RDKFYAW3.js → AU2REB6C.js} +526 -365
- package/build/dev.cjs +360 -176
- package/build/dev.js +3 -3
- package/build/dev.jsx +343 -174
- package/build/devtools/{OWDQYIA3.js → BK5V6NH3.js} +13 -4
- package/build/devtools/{CHPGNEUY.js → CBPRJMAC.js} +13 -4
- package/build/devtools/{MU7AYS7J.jsx → R2AGYIME.jsx} +12 -3
- package/build/devtoolsPanel/{CQ4HXSZG.js → A5BO2WVY.js} +13 -4
- package/build/devtoolsPanel/{LLRYE7CA.js → KNUODKZO.js} +13 -4
- package/build/devtoolsPanel/{NLCUKFXJ.jsx → QZBU22C7.jsx} +12 -3
- package/build/index.cjs +549 -370
- package/build/index.js +3 -3
- package/build/index.jsx +528 -367
- package/package.json +6 -6
- package/src/devtools.tsx +14 -3
- package/src/devtoolsPanel.tsx +14 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tanstack/solid-query-devtools",
|
|
3
|
-
"version": "6.0.0-alpha.
|
|
3
|
+
"version": "6.0.0-alpha.1",
|
|
4
4
|
"description": "Developer tools to interact with and visualize the TanStack/solid-query Query cache",
|
|
5
5
|
"author": "tannerlinsley",
|
|
6
6
|
"license": "MIT",
|
|
@@ -50,17 +50,17 @@
|
|
|
50
50
|
"@babel/core": "^7.28.0",
|
|
51
51
|
"@babel/preset-typescript": "^7.18.6",
|
|
52
52
|
"@solidjs/testing-library": "^0.8.10",
|
|
53
|
-
"@solidjs/web": "2.0.0-beta.
|
|
54
|
-
"babel-preset-solid": "2.0.0-beta.
|
|
53
|
+
"@solidjs/web": "2.0.0-beta.4",
|
|
54
|
+
"babel-preset-solid": "2.0.0-beta.4",
|
|
55
55
|
"npm-run-all2": "^5.0.0",
|
|
56
|
-
"solid-js": "2.0.0-beta.
|
|
56
|
+
"solid-js": "2.0.0-beta.4",
|
|
57
57
|
"tsup-preset-solid": "^2.2.0",
|
|
58
58
|
"vite-plugin-solid": "3.0.0-next.2",
|
|
59
|
-
"@tanstack/solid-query": "6.0.0-alpha.
|
|
59
|
+
"@tanstack/solid-query": "6.0.0-alpha.1"
|
|
60
60
|
},
|
|
61
61
|
"peerDependencies": {
|
|
62
62
|
"solid-js": ">=2.0.0-beta.0 <3.0.0",
|
|
63
|
-
"@tanstack/solid-query": "^6.0.0-alpha.
|
|
63
|
+
"@tanstack/solid-query": "^6.0.0-alpha.1"
|
|
64
64
|
},
|
|
65
65
|
"scripts": {
|
|
66
66
|
"clean": "premove ./build ./coverage ./dist-ts",
|
package/src/devtools.tsx
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createEffect, createMemo, onCleanup
|
|
1
|
+
import { createEffect, createMemo, onCleanup } from 'solid-js'
|
|
2
2
|
import { onlineManager, useQueryClient } from '@tanstack/solid-query'
|
|
3
3
|
import { TanstackQueryDevtools } from '@tanstack/query-devtools'
|
|
4
4
|
import type {
|
|
@@ -118,9 +118,20 @@ export default function SolidQueryDevtools(props: DevtoolsOptions) {
|
|
|
118
118
|
},
|
|
119
119
|
)
|
|
120
120
|
|
|
121
|
-
|
|
121
|
+
let isMounted = false
|
|
122
|
+
let isDisposed = false
|
|
123
|
+
|
|
124
|
+
queueMicrotask(() => {
|
|
125
|
+
if (isDisposed) return
|
|
122
126
|
devtools.mount(ref)
|
|
123
|
-
|
|
127
|
+
isMounted = true
|
|
128
|
+
})
|
|
129
|
+
|
|
130
|
+
onCleanup(() => {
|
|
131
|
+
isDisposed = true
|
|
132
|
+
if (isMounted) {
|
|
133
|
+
devtools.unmount()
|
|
134
|
+
}
|
|
124
135
|
})
|
|
125
136
|
|
|
126
137
|
return <div class="tsqd-parent-container" ref={ref}></div>
|
package/src/devtoolsPanel.tsx
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createEffect, createMemo, onCleanup
|
|
1
|
+
import { createEffect, createMemo, onCleanup } 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'
|
|
@@ -93,9 +93,20 @@ export default function SolidQueryDevtoolsPanel(props: DevtoolsPanelOptions) {
|
|
|
93
93
|
},
|
|
94
94
|
)
|
|
95
95
|
|
|
96
|
-
|
|
96
|
+
let isMounted = false
|
|
97
|
+
let isDisposed = false
|
|
98
|
+
|
|
99
|
+
queueMicrotask(() => {
|
|
100
|
+
if (isDisposed) return
|
|
97
101
|
devtools.mount(ref)
|
|
98
|
-
|
|
102
|
+
isMounted = true
|
|
103
|
+
})
|
|
104
|
+
|
|
105
|
+
onCleanup(() => {
|
|
106
|
+
isDisposed = true
|
|
107
|
+
if (isMounted) {
|
|
108
|
+
devtools.unmount()
|
|
109
|
+
}
|
|
99
110
|
})
|
|
100
111
|
|
|
101
112
|
return (
|