@tanstack/svelte-query-devtools 6.2.1 → 6.2.3
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/dist/Devtools.svelte +16 -2
- package/dist/Devtools.svelte.d.ts +10 -3
- package/dist/Devtools.svelte.d.ts.map +1 -1
- package/package.json +4 -4
- package/src/Devtools.svelte +16 -2
package/dist/Devtools.svelte
CHANGED
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
DevtoolsErrorType,
|
|
9
9
|
DevtoolsPosition,
|
|
10
10
|
TanstackQueryDevtools,
|
|
11
|
+
Theme,
|
|
11
12
|
} from '@tanstack/query-devtools'
|
|
12
13
|
|
|
13
14
|
interface DevtoolsOptions {
|
|
@@ -18,13 +19,15 @@
|
|
|
18
19
|
/**
|
|
19
20
|
* The position of the TanStack logo to open and close the devtools panel.
|
|
20
21
|
* 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right' | 'relative'
|
|
21
|
-
*
|
|
22
|
+
*
|
|
23
|
+
* @defaultValue bottom-right
|
|
22
24
|
*/
|
|
23
25
|
buttonPosition?: DevtoolsButtonPosition
|
|
24
26
|
/**
|
|
25
27
|
* The position of the Svelte Query devtools panel.
|
|
26
28
|
* 'top' | 'bottom' | 'left' | 'right'
|
|
27
|
-
*
|
|
29
|
+
*
|
|
30
|
+
* @defaultValue bottom
|
|
28
31
|
*/
|
|
29
32
|
position?: DevtoolsPosition
|
|
30
33
|
/**
|
|
@@ -47,6 +50,11 @@
|
|
|
47
50
|
* Set this to true to hide disabled queries from the devtools panel.
|
|
48
51
|
*/
|
|
49
52
|
hideDisabledQueries?: boolean
|
|
53
|
+
/**
|
|
54
|
+
* Set this to 'light', 'dark', or 'system' to change the theme of the devtools panel.
|
|
55
|
+
* Defaults to 'system'.
|
|
56
|
+
*/
|
|
57
|
+
theme?: Theme
|
|
50
58
|
}
|
|
51
59
|
|
|
52
60
|
let {
|
|
@@ -58,6 +66,7 @@
|
|
|
58
66
|
styleNonce = undefined,
|
|
59
67
|
shadowDOMTarget = undefined,
|
|
60
68
|
hideDisabledQueries = false,
|
|
69
|
+
theme = 'system',
|
|
61
70
|
}: DevtoolsOptions = $props()
|
|
62
71
|
|
|
63
72
|
let ref: HTMLDivElement
|
|
@@ -80,6 +89,7 @@
|
|
|
80
89
|
styleNonce,
|
|
81
90
|
shadowDOMTarget,
|
|
82
91
|
hideDisabledQueries,
|
|
92
|
+
theme,
|
|
83
93
|
})
|
|
84
94
|
|
|
85
95
|
devtools.mount(ref)
|
|
@@ -102,6 +112,10 @@
|
|
|
102
112
|
$effect(() => {
|
|
103
113
|
devtools?.setErrorTypes(errorTypes)
|
|
104
114
|
})
|
|
115
|
+
|
|
116
|
+
$effect(() => {
|
|
117
|
+
devtools?.setTheme(theme)
|
|
118
|
+
})
|
|
105
119
|
}
|
|
106
120
|
</script>
|
|
107
121
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { QueryClient } from '@tanstack/svelte-query';
|
|
2
|
-
import type { DevtoolsButtonPosition, DevtoolsErrorType, DevtoolsPosition } from '@tanstack/query-devtools';
|
|
2
|
+
import type { DevtoolsButtonPosition, DevtoolsErrorType, DevtoolsPosition, Theme } from '@tanstack/query-devtools';
|
|
3
3
|
interface DevtoolsOptions {
|
|
4
4
|
/**
|
|
5
5
|
* Set this true if you want the dev tools to default to being open
|
|
@@ -8,13 +8,15 @@ interface DevtoolsOptions {
|
|
|
8
8
|
/**
|
|
9
9
|
* The position of the TanStack logo to open and close the devtools panel.
|
|
10
10
|
* 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right' | 'relative'
|
|
11
|
-
*
|
|
11
|
+
*
|
|
12
|
+
* @defaultValue bottom-right
|
|
12
13
|
*/
|
|
13
14
|
buttonPosition?: DevtoolsButtonPosition;
|
|
14
15
|
/**
|
|
15
16
|
* The position of the Svelte Query devtools panel.
|
|
16
17
|
* 'top' | 'bottom' | 'left' | 'right'
|
|
17
|
-
*
|
|
18
|
+
*
|
|
19
|
+
* @defaultValue bottom
|
|
18
20
|
*/
|
|
19
21
|
position?: DevtoolsPosition;
|
|
20
22
|
/**
|
|
@@ -37,6 +39,11 @@ interface DevtoolsOptions {
|
|
|
37
39
|
* Set this to true to hide disabled queries from the devtools panel.
|
|
38
40
|
*/
|
|
39
41
|
hideDisabledQueries?: boolean;
|
|
42
|
+
/**
|
|
43
|
+
* Set this to 'light', 'dark', or 'system' to change the theme of the devtools panel.
|
|
44
|
+
* Defaults to 'system'.
|
|
45
|
+
*/
|
|
46
|
+
theme?: Theme;
|
|
40
47
|
}
|
|
41
48
|
declare const Devtools: import("svelte").Component<DevtoolsOptions, {}, "">;
|
|
42
49
|
type Devtools = ReturnType<typeof Devtools>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Devtools.svelte.d.ts","sourceRoot":"","sources":["../src/Devtools.svelte.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAA;AACzD,OAAO,KAAK,EACR,sBAAsB,EACtB,iBAAiB,EACjB,gBAAgB,
|
|
1
|
+
{"version":3,"file":"Devtools.svelte.d.ts","sourceRoot":"","sources":["../src/Devtools.svelte.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAA;AACzD,OAAO,KAAK,EACR,sBAAsB,EACtB,iBAAiB,EACjB,gBAAgB,EAEhB,KAAK,EACN,MAAM,0BAA0B,CAAC;AAGlC,UAAU,eAAe;IACvB;;OAEG;IACH,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB;;;;;OAKG;IACH,cAAc,CAAC,EAAE,sBAAsB,CAAA;IACvC;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,gBAAgB,CAAA;IAC3B;;OAEG;IACH,MAAM,CAAC,EAAE,WAAW,CAAA;IACpB;;OAEG;IACH,UAAU,CAAC,EAAE,KAAK,CAAC,iBAAiB,CAAC,CAAA;IACrC;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB;;OAEG;IACH,eAAe,CAAC,EAAE,UAAU,CAAA;IAC5B;;OAEG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAA;IAC7B;;;OAGG;IACH,KAAK,CAAC,EAAE,KAAK,CAAA;CACd;AA2EH,QAAA,MAAM,QAAQ,qDAAwC,CAAC;AACvD,KAAK,QAAQ,GAAG,UAAU,CAAC,OAAO,QAAQ,CAAC,CAAC;AAC5C,eAAe,QAAQ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tanstack/svelte-query-devtools",
|
|
3
|
-
"version": "6.2.
|
|
3
|
+
"version": "6.2.3",
|
|
4
4
|
"description": "Developer tools to interact with and visualize the TanStack/svelte-query cache",
|
|
5
5
|
"author": "Lachlan Collins",
|
|
6
6
|
"license": "MIT",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
],
|
|
40
40
|
"dependencies": {
|
|
41
41
|
"esm-env": "^1.2.1",
|
|
42
|
-
"@tanstack/query-devtools": "5.103.
|
|
42
|
+
"@tanstack/query-devtools": "5.103.2"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"@sveltejs/package": "^2.5.8",
|
|
@@ -50,11 +50,11 @@
|
|
|
50
50
|
"svelte": "^5.39.3",
|
|
51
51
|
"svelte-check": "^4.4.5",
|
|
52
52
|
"typescript": "5.9.3",
|
|
53
|
-
"@tanstack/svelte-query": "6.2.
|
|
53
|
+
"@tanstack/svelte-query": "6.2.3"
|
|
54
54
|
},
|
|
55
55
|
"peerDependencies": {
|
|
56
56
|
"svelte": "^5.25.0",
|
|
57
|
-
"@tanstack/svelte-query": "^6.2.
|
|
57
|
+
"@tanstack/svelte-query": "^6.2.3"
|
|
58
58
|
},
|
|
59
59
|
"scripts": {
|
|
60
60
|
"clean": "premove ./dist ./coverage ./.svelte-kit ./dist-ts",
|
package/src/Devtools.svelte
CHANGED
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
DevtoolsErrorType,
|
|
9
9
|
DevtoolsPosition,
|
|
10
10
|
TanstackQueryDevtools,
|
|
11
|
+
Theme,
|
|
11
12
|
} from '@tanstack/query-devtools'
|
|
12
13
|
|
|
13
14
|
interface DevtoolsOptions {
|
|
@@ -18,13 +19,15 @@
|
|
|
18
19
|
/**
|
|
19
20
|
* The position of the TanStack logo to open and close the devtools panel.
|
|
20
21
|
* 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right' | 'relative'
|
|
21
|
-
*
|
|
22
|
+
*
|
|
23
|
+
* @defaultValue bottom-right
|
|
22
24
|
*/
|
|
23
25
|
buttonPosition?: DevtoolsButtonPosition
|
|
24
26
|
/**
|
|
25
27
|
* The position of the Svelte Query devtools panel.
|
|
26
28
|
* 'top' | 'bottom' | 'left' | 'right'
|
|
27
|
-
*
|
|
29
|
+
*
|
|
30
|
+
* @defaultValue bottom
|
|
28
31
|
*/
|
|
29
32
|
position?: DevtoolsPosition
|
|
30
33
|
/**
|
|
@@ -47,6 +50,11 @@
|
|
|
47
50
|
* Set this to true to hide disabled queries from the devtools panel.
|
|
48
51
|
*/
|
|
49
52
|
hideDisabledQueries?: boolean
|
|
53
|
+
/**
|
|
54
|
+
* Set this to 'light', 'dark', or 'system' to change the theme of the devtools panel.
|
|
55
|
+
* Defaults to 'system'.
|
|
56
|
+
*/
|
|
57
|
+
theme?: Theme
|
|
50
58
|
}
|
|
51
59
|
|
|
52
60
|
let {
|
|
@@ -58,6 +66,7 @@
|
|
|
58
66
|
styleNonce = undefined,
|
|
59
67
|
shadowDOMTarget = undefined,
|
|
60
68
|
hideDisabledQueries = false,
|
|
69
|
+
theme = 'system',
|
|
61
70
|
}: DevtoolsOptions = $props()
|
|
62
71
|
|
|
63
72
|
let ref: HTMLDivElement
|
|
@@ -80,6 +89,7 @@
|
|
|
80
89
|
styleNonce,
|
|
81
90
|
shadowDOMTarget,
|
|
82
91
|
hideDisabledQueries,
|
|
92
|
+
theme,
|
|
83
93
|
})
|
|
84
94
|
|
|
85
95
|
devtools.mount(ref)
|
|
@@ -102,6 +112,10 @@
|
|
|
102
112
|
$effect(() => {
|
|
103
113
|
devtools?.setErrorTypes(errorTypes)
|
|
104
114
|
})
|
|
115
|
+
|
|
116
|
+
$effect(() => {
|
|
117
|
+
devtools?.setTheme(theme)
|
|
118
|
+
})
|
|
105
119
|
}
|
|
106
120
|
</script>
|
|
107
121
|
|