@tanstack/query-devtools 5.0.0-alpha.27 → 5.0.0-alpha.31
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/.tsbuildinfo +1 -1
- package/build/cjs/index.js +9 -5
- package/build/cjs/index.js.map +1 -1
- package/build/esm/{index.js → index.mjs} +10 -6
- package/build/esm/index.mjs.map +1 -0
- package/build/source/Devtools.jsx +1 -1
- package/build/source/index.jsx +9 -2
- package/build/types/index.d.ts +2 -1
- package/build/types/index.d.ts.map +1 -1
- package/build/umd/index.js +2 -2
- package/build/umd/index.js.map +1 -1
- package/package.json +10 -8
- package/src/Devtools.tsx +1 -1
- package/src/index.tsx +10 -3
- package/build/esm/index.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tanstack/query-devtools",
|
|
3
|
-
"version": "5.0.0-alpha.
|
|
3
|
+
"version": "5.0.0-alpha.31",
|
|
4
4
|
"description": "Developer tools to interact with and visualize the TanStack Query cache",
|
|
5
5
|
"author": "tannerlinsley",
|
|
6
6
|
"license": "MIT",
|
|
@@ -10,15 +10,17 @@
|
|
|
10
10
|
"type": "github",
|
|
11
11
|
"url": "https://github.com/sponsors/tannerlinsley"
|
|
12
12
|
},
|
|
13
|
-
"types": "
|
|
14
|
-
"main": "
|
|
15
|
-
"module": "
|
|
13
|
+
"types": "build/types/index.d.ts",
|
|
14
|
+
"main": "build/umd/index.js",
|
|
15
|
+
"module": "build/esm/index.mjs",
|
|
16
16
|
"exports": {
|
|
17
17
|
".": {
|
|
18
|
-
"
|
|
18
|
+
"types": "./build/types/index.d.ts",
|
|
19
|
+
"import": "./build/esm/index.mjs",
|
|
19
20
|
"require": "./build/umd/index.js",
|
|
20
21
|
"default": "./build/umd/index.js"
|
|
21
|
-
}
|
|
22
|
+
},
|
|
23
|
+
"./package.json": "./package.json"
|
|
22
24
|
},
|
|
23
25
|
"files": [
|
|
24
26
|
"build",
|
|
@@ -26,7 +28,7 @@
|
|
|
26
28
|
],
|
|
27
29
|
"devDependencies": {
|
|
28
30
|
"vite-plugin-solid": "^2.5.0",
|
|
29
|
-
"@tanstack/query-core": "5.0.0-alpha.
|
|
31
|
+
"@tanstack/query-core": "5.0.0-alpha.31"
|
|
30
32
|
},
|
|
31
33
|
"dependencies": {
|
|
32
34
|
"@emotion/css": "^11.10.5",
|
|
@@ -39,7 +41,7 @@
|
|
|
39
41
|
"superjson": "^1.12.1"
|
|
40
42
|
},
|
|
41
43
|
"peerDependencies": {
|
|
42
|
-
"@tanstack/query-core": "5.0.0-alpha.
|
|
44
|
+
"@tanstack/query-core": "5.0.0-alpha.31"
|
|
43
45
|
},
|
|
44
46
|
"peerDependenciesMeta": {},
|
|
45
47
|
"scripts": {
|
package/src/Devtools.tsx
CHANGED
|
@@ -1844,7 +1844,7 @@ const getStyles = () => {
|
|
|
1844
1844
|
background-color: ${colors.darkGray[400]};
|
|
1845
1845
|
font-size: ${font.size.sm};
|
|
1846
1846
|
color: ${colors.gray[500]};
|
|
1847
|
-
z-index:
|
|
1847
|
+
z-index: 7;
|
|
1848
1848
|
`,
|
|
1849
1849
|
settingsMenuHeader: css`
|
|
1850
1850
|
padding: ${tokens.size[1.5]} ${tokens.size[2.5]};
|
package/src/index.tsx
CHANGED
|
@@ -17,7 +17,7 @@ export type { DevtoolsButtonPosition, DevtoolsPosition, DevToolsErrorType }
|
|
|
17
17
|
export interface TanstackQueryDevtoolsConfig extends QueryDevtoolsProps {}
|
|
18
18
|
|
|
19
19
|
class TanstackQueryDevtools {
|
|
20
|
-
client: QueryClient
|
|
20
|
+
client: Signal<QueryClient>
|
|
21
21
|
onlineManager: typeof TonlineManager
|
|
22
22
|
queryFlavor: string
|
|
23
23
|
version: string
|
|
@@ -39,7 +39,7 @@ class TanstackQueryDevtools {
|
|
|
39
39
|
initialIsOpen,
|
|
40
40
|
errorTypes,
|
|
41
41
|
} = config
|
|
42
|
-
this.client = client
|
|
42
|
+
this.client = createSignal(client)
|
|
43
43
|
this.queryFlavor = queryFlavor
|
|
44
44
|
this.version = version
|
|
45
45
|
this.onlineManager = onlineManager
|
|
@@ -65,6 +65,10 @@ class TanstackQueryDevtools {
|
|
|
65
65
|
this.errorTypes[1](errorTypes)
|
|
66
66
|
}
|
|
67
67
|
|
|
68
|
+
setClient(client: QueryClient) {
|
|
69
|
+
this.client[1](client)
|
|
70
|
+
}
|
|
71
|
+
|
|
68
72
|
mount<T extends HTMLElement>(el: T) {
|
|
69
73
|
if (this.isMounted) {
|
|
70
74
|
throw new Error('Devtools is already mounted')
|
|
@@ -74,13 +78,16 @@ class TanstackQueryDevtools {
|
|
|
74
78
|
const [pos] = this.position
|
|
75
79
|
const [isOpen] = this.initialIsOpen
|
|
76
80
|
const [errors] = this.errorTypes
|
|
81
|
+
const [queryClient] = this.client
|
|
77
82
|
return (
|
|
78
83
|
<DevtoolsComponent
|
|
79
|
-
client={this.client}
|
|
80
84
|
queryFlavor={this.queryFlavor}
|
|
81
85
|
version={this.version}
|
|
82
86
|
onlineManager={this.onlineManager}
|
|
83
87
|
{...{
|
|
88
|
+
get client() {
|
|
89
|
+
return queryClient()
|
|
90
|
+
},
|
|
84
91
|
get buttonPosition() {
|
|
85
92
|
return btnPosition()
|
|
86
93
|
},
|