@tanstack/solid-query-devtools 6.0.0-beta.3 → 6.0.0-beta.5
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 +5 -15
- package/build/_tsup-dts-rollup.d.ts +5 -15
- package/build/chunk/5YUDKRGO.js +57 -0
- package/build/chunk/OIFXIFGE.js +59 -0
- package/build/dev.cjs +67 -1272
- package/build/dev.js +3 -3
- package/build/dev.jsx +7 -1218
- package/build/devtools/{R2AGYIME.jsx → 7WZM3IT7.jsx} +15 -13
- package/build/devtools/{BS6AII4K.js → FNDI35UR.js} +20 -20
- package/build/devtools/{IWG4ZJJU.js → T3N3FX25.js} +20 -20
- package/build/devtoolsPanel/{VZGSCV56.js → 5CAQ2WGQ.js} +24 -24
- package/build/devtoolsPanel/{NAMW3JP3.js → DXOBITS6.js} +24 -24
- package/build/devtoolsPanel/{QZBU22C7.jsx → FQC5JHFZ.jsx} +15 -13
- package/build/index.cjs +57 -1228
- package/build/index.js +3 -3
- package/build/index.jsx +7 -1181
- package/package.json +8 -8
- package/src/clientOnly.tsx +2 -1
- package/src/devtools.tsx +21 -17
- package/src/devtoolsPanel.tsx +20 -16
- package/build/chunk/P6IZ7GTW.js +0 -1224
- package/build/chunk/ZANDWIFD.js +0 -1260
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tanstack/solid-query-devtools",
|
|
3
|
-
"version": "6.0.0-beta.
|
|
3
|
+
"version": "6.0.0-beta.5",
|
|
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,23 +44,23 @@
|
|
|
44
44
|
"!src/__tests__"
|
|
45
45
|
],
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@tanstack/query-devtools": "5.
|
|
47
|
+
"@tanstack/query-devtools": "5.101.0"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
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.15",
|
|
54
|
+
"babel-preset-solid": "2.0.0-beta.15",
|
|
55
55
|
"npm-run-all2": "^5.0.0",
|
|
56
|
-
"solid-js": "2.0.0-beta.
|
|
56
|
+
"solid-js": "2.0.0-beta.15",
|
|
57
57
|
"tsup-preset-solid": "^2.2.0",
|
|
58
|
-
"vite-plugin-solid": "3.0.0-next.
|
|
59
|
-
"@tanstack/solid-query": "6.0.0-beta.
|
|
58
|
+
"vite-plugin-solid": "3.0.0-next.5",
|
|
59
|
+
"@tanstack/solid-query": "6.0.0-beta.5"
|
|
60
60
|
},
|
|
61
61
|
"peerDependencies": {
|
|
62
62
|
"solid-js": ">=2.0.0-beta.0 <3.0.0",
|
|
63
|
-
"@tanstack/solid-query": "^6.0.0-beta.
|
|
63
|
+
"@tanstack/solid-query": "^6.0.0-beta.5"
|
|
64
64
|
},
|
|
65
65
|
"scripts": {
|
|
66
66
|
"clean": "premove ./build ./coverage ./dist-ts",
|
package/src/clientOnly.tsx
CHANGED
|
@@ -7,7 +7,8 @@ import {
|
|
|
7
7
|
untrack,
|
|
8
8
|
} from 'solid-js'
|
|
9
9
|
import { isServer } from '@solidjs/web'
|
|
10
|
-
import type { Component, ComponentProps
|
|
10
|
+
import type { Component, ComponentProps } from 'solid-js'
|
|
11
|
+
import type { JSX } from '@solidjs/web'
|
|
11
12
|
|
|
12
13
|
/*
|
|
13
14
|
This function has been taken from solid-start's codebase
|
package/src/devtools.tsx
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createEffect, createMemo,
|
|
1
|
+
import { createEffect, createMemo, onSettled, runWithOwner } from 'solid-js'
|
|
2
2
|
import { onlineManager, useQueryClient } from '@tanstack/solid-query'
|
|
3
3
|
import { TanstackQueryDevtools } from '@tanstack/query-devtools'
|
|
4
4
|
import type {
|
|
@@ -15,13 +15,13 @@ interface DevtoolsOptions {
|
|
|
15
15
|
*/
|
|
16
16
|
initialIsOpen?: boolean
|
|
17
17
|
/**
|
|
18
|
-
* The position of the
|
|
19
|
-
* 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right'
|
|
18
|
+
* The position of the TanStack logo to open and close the devtools panel.
|
|
19
|
+
* 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right' | 'relative'
|
|
20
20
|
* Defaults to 'bottom-right'.
|
|
21
21
|
*/
|
|
22
22
|
buttonPosition?: DevtoolsButtonPosition
|
|
23
23
|
/**
|
|
24
|
-
* The position of the
|
|
24
|
+
* The position of the Solid Query devtools panel.
|
|
25
25
|
* 'top' | 'bottom' | 'left' | 'right'
|
|
26
26
|
* Defaults to 'bottom'.
|
|
27
27
|
*/
|
|
@@ -118,19 +118,23 @@ export default function SolidQueryDevtools(props: DevtoolsOptions) {
|
|
|
118
118
|
},
|
|
119
119
|
)
|
|
120
120
|
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
121
|
+
// devtools.mount() calls render() from solid-js/web, which calls flush().
|
|
122
|
+
// flush() is not reentrant inside onSettled, so defer the mount to a
|
|
123
|
+
// microtask. runWithOwner(null) escapes the owned scope because
|
|
124
|
+
// devtools.mount renders a nested Solid app (creating reactive primitives).
|
|
125
|
+
let mounted = false
|
|
126
|
+
let disposed = false
|
|
127
|
+
onSettled(() => {
|
|
128
|
+
queueMicrotask(() => {
|
|
129
|
+
if (disposed) return
|
|
130
|
+
runWithOwner(null, () => devtools.mount(ref))
|
|
131
|
+
mounted = true
|
|
132
|
+
})
|
|
133
|
+
return () => {
|
|
134
|
+
disposed = true
|
|
135
|
+
if (mounted) {
|
|
136
|
+
devtools.unmount()
|
|
137
|
+
}
|
|
134
138
|
}
|
|
135
139
|
})
|
|
136
140
|
|
package/src/devtoolsPanel.tsx
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { createEffect, createMemo,
|
|
1
|
+
import { createEffect, createMemo, onSettled, runWithOwner } 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'
|
|
5
5
|
import type { QueryClient } from '@tanstack/solid-query'
|
|
6
|
-
import type { JSX } from '
|
|
6
|
+
import type { JSX } from '@solidjs/web'
|
|
7
7
|
|
|
8
8
|
export interface DevtoolsPanelOptions {
|
|
9
9
|
/**
|
|
@@ -34,7 +34,7 @@ export interface DevtoolsPanelOptions {
|
|
|
34
34
|
/**
|
|
35
35
|
* Callback function that is called when the devtools panel is closed
|
|
36
36
|
*/
|
|
37
|
-
onClose?: () =>
|
|
37
|
+
onClose?: () => void
|
|
38
38
|
/**
|
|
39
39
|
* Set this to true to hide disabled queries from the devtools panel.
|
|
40
40
|
*/
|
|
@@ -93,19 +93,23 @@ export default function SolidQueryDevtoolsPanel(props: DevtoolsPanelOptions) {
|
|
|
93
93
|
},
|
|
94
94
|
)
|
|
95
95
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
96
|
+
// devtools.mount() calls render() from solid-js/web, which calls flush().
|
|
97
|
+
// flush() is not reentrant inside onSettled, so defer the mount to a
|
|
98
|
+
// microtask. runWithOwner(null) escapes the owned scope because
|
|
99
|
+
// devtools.mount renders a nested Solid app (creating reactive primitives).
|
|
100
|
+
let mounted = false
|
|
101
|
+
let disposed = false
|
|
102
|
+
onSettled(() => {
|
|
103
|
+
queueMicrotask(() => {
|
|
104
|
+
if (disposed) return
|
|
105
|
+
runWithOwner(null, () => devtools.mount(ref))
|
|
106
|
+
mounted = true
|
|
107
|
+
})
|
|
108
|
+
return () => {
|
|
109
|
+
disposed = true
|
|
110
|
+
if (mounted) {
|
|
111
|
+
devtools.unmount()
|
|
112
|
+
}
|
|
109
113
|
}
|
|
110
114
|
})
|
|
111
115
|
|