@tanstack/svelte-query-devtools 6.2.2 → 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
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 {
|
|
@@ -49,6 +50,11 @@
|
|
|
49
50
|
* Set this to true to hide disabled queries from the devtools panel.
|
|
50
51
|
*/
|
|
51
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
|
|
52
58
|
}
|
|
53
59
|
|
|
54
60
|
let {
|
|
@@ -60,6 +66,7 @@
|
|
|
60
66
|
styleNonce = undefined,
|
|
61
67
|
shadowDOMTarget = undefined,
|
|
62
68
|
hideDisabledQueries = false,
|
|
69
|
+
theme = 'system',
|
|
63
70
|
}: DevtoolsOptions = $props()
|
|
64
71
|
|
|
65
72
|
let ref: HTMLDivElement
|
|
@@ -82,6 +89,7 @@
|
|
|
82
89
|
styleNonce,
|
|
83
90
|
shadowDOMTarget,
|
|
84
91
|
hideDisabledQueries,
|
|
92
|
+
theme,
|
|
85
93
|
})
|
|
86
94
|
|
|
87
95
|
devtools.mount(ref)
|
|
@@ -104,6 +112,10 @@
|
|
|
104
112
|
$effect(() => {
|
|
105
113
|
devtools?.setErrorTypes(errorTypes)
|
|
106
114
|
})
|
|
115
|
+
|
|
116
|
+
$effect(() => {
|
|
117
|
+
devtools?.setTheme(theme)
|
|
118
|
+
})
|
|
107
119
|
}
|
|
108
120
|
</script>
|
|
109
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
|
|
@@ -39,6 +39,11 @@ interface DevtoolsOptions {
|
|
|
39
39
|
* Set this to true to hide disabled queries from the devtools panel.
|
|
40
40
|
*/
|
|
41
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;
|
|
42
47
|
}
|
|
43
48
|
declare const Devtools: import("svelte").Component<DevtoolsOptions, {}, "">;
|
|
44
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",
|
|
@@ -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 {
|
|
@@ -49,6 +50,11 @@
|
|
|
49
50
|
* Set this to true to hide disabled queries from the devtools panel.
|
|
50
51
|
*/
|
|
51
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
|
|
52
58
|
}
|
|
53
59
|
|
|
54
60
|
let {
|
|
@@ -60,6 +66,7 @@
|
|
|
60
66
|
styleNonce = undefined,
|
|
61
67
|
shadowDOMTarget = undefined,
|
|
62
68
|
hideDisabledQueries = false,
|
|
69
|
+
theme = 'system',
|
|
63
70
|
}: DevtoolsOptions = $props()
|
|
64
71
|
|
|
65
72
|
let ref: HTMLDivElement
|
|
@@ -82,6 +89,7 @@
|
|
|
82
89
|
styleNonce,
|
|
83
90
|
shadowDOMTarget,
|
|
84
91
|
hideDisabledQueries,
|
|
92
|
+
theme,
|
|
85
93
|
})
|
|
86
94
|
|
|
87
95
|
devtools.mount(ref)
|
|
@@ -104,6 +112,10 @@
|
|
|
104
112
|
$effect(() => {
|
|
105
113
|
devtools?.setErrorTypes(errorTypes)
|
|
106
114
|
})
|
|
115
|
+
|
|
116
|
+
$effect(() => {
|
|
117
|
+
devtools?.setTheme(theme)
|
|
118
|
+
})
|
|
107
119
|
}
|
|
108
120
|
</script>
|
|
109
121
|
|