@tanstack/query-devtools 5.51.16 → 5.54.0
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/DevtoolsComponent/AIPVUCAN.js +39 -0
- package/build/DevtoolsComponent/PTNKQWC6.js +39 -0
- package/build/DevtoolsPanelComponent/SA34RK37.js +48 -0
- package/build/DevtoolsPanelComponent/YCAYD3IW.js +48 -0
- package/build/{Devtools/E6UWR6XD.js → chunk/7U2COR24.js} +935 -889
- package/build/{Devtools/2FJCTAHO.js → chunk/WK5KHUSK.js} +935 -889
- package/build/dev.cjs +1700 -1385
- package/build/dev.js +129 -3
- package/build/index.cjs +1700 -1385
- package/build/index.d.cts +23 -4
- package/build/index.d.ts +23 -4
- package/build/index.js +129 -3
- package/package.json +2 -2
- package/src/Devtools.tsx +202 -326
- package/src/DevtoolsComponent.tsx +36 -0
- package/src/DevtoolsPanelComponent.tsx +47 -0
- package/src/Explorer.tsx +1 -1
- package/src/{index.tsx → TanstackQueryDevtools.tsx} +5 -6
- package/src/TanstackQueryDevtoolsPanel.tsx +153 -0
- package/src/constants.ts +17 -0
- package/src/contexts/PiPContext.tsx +191 -0
- package/src/{Context.ts → contexts/QueryDevtoolsContext.ts} +3 -11
- package/src/contexts/ThemeContext.ts +10 -0
- package/src/contexts/index.ts +3 -0
- package/src/index.ts +13 -0
- package/src/utils.tsx +1 -1
- package/build/Devtools/2DN67TWN.jsx +0 -12505
- package/build/Devtools/EFVQE642.jsx +0 -12504
- package/build/chunk/G72LLS32.jsx +0 -2939
- package/build/chunk/H7KAW27I.jsx +0 -2940
- package/build/dev.jsx +0 -117
- package/build/index.jsx +0 -117
package/build/index.d.cts
CHANGED
|
@@ -4,7 +4,7 @@ type XPosition = 'left' | 'right';
|
|
|
4
4
|
type YPosition = 'top' | 'bottom';
|
|
5
5
|
type DevtoolsPosition = XPosition | YPosition;
|
|
6
6
|
type DevtoolsButtonPosition = `${YPosition}-${XPosition}` | 'relative';
|
|
7
|
-
interface
|
|
7
|
+
interface DevtoolsErrorType {
|
|
8
8
|
/**
|
|
9
9
|
* The name of the error.
|
|
10
10
|
*/
|
|
@@ -22,8 +22,9 @@ interface QueryDevtoolsProps {
|
|
|
22
22
|
buttonPosition?: DevtoolsButtonPosition;
|
|
23
23
|
position?: DevtoolsPosition;
|
|
24
24
|
initialIsOpen?: boolean;
|
|
25
|
-
errorTypes?: Array<
|
|
25
|
+
errorTypes?: Array<DevtoolsErrorType>;
|
|
26
26
|
shadowDOMTarget?: ShadowRoot;
|
|
27
|
+
onClose?: () => unknown;
|
|
27
28
|
}
|
|
28
29
|
|
|
29
30
|
interface TanstackQueryDevtoolsConfig extends QueryDevtoolsProps {
|
|
@@ -36,10 +37,28 @@ declare class TanstackQueryDevtools {
|
|
|
36
37
|
setButtonPosition(position: DevtoolsButtonPosition): void;
|
|
37
38
|
setPosition(position: DevtoolsPosition): void;
|
|
38
39
|
setInitialIsOpen(isOpen: boolean): void;
|
|
39
|
-
setErrorTypes(errorTypes: Array<
|
|
40
|
+
setErrorTypes(errorTypes: Array<DevtoolsErrorType>): void;
|
|
40
41
|
setClient(client: QueryClient): void;
|
|
41
42
|
mount<T extends HTMLElement>(el: T): void;
|
|
42
43
|
unmount(): void;
|
|
43
44
|
}
|
|
44
45
|
|
|
45
|
-
|
|
46
|
+
interface TanstackQueryDevtoolsPanelConfig extends QueryDevtoolsProps {
|
|
47
|
+
styleNonce?: string;
|
|
48
|
+
shadowDOMTarget?: ShadowRoot;
|
|
49
|
+
onClose?: () => unknown;
|
|
50
|
+
}
|
|
51
|
+
declare class TanstackQueryDevtoolsPanel {
|
|
52
|
+
#private;
|
|
53
|
+
constructor(config: TanstackQueryDevtoolsPanelConfig);
|
|
54
|
+
setButtonPosition(position: DevtoolsButtonPosition): void;
|
|
55
|
+
setPosition(position: DevtoolsPosition): void;
|
|
56
|
+
setInitialIsOpen(isOpen: boolean): void;
|
|
57
|
+
setErrorTypes(errorTypes: Array<DevtoolsErrorType>): void;
|
|
58
|
+
setClient(client: QueryClient): void;
|
|
59
|
+
setOnClose(onClose: () => unknown): void;
|
|
60
|
+
mount<T extends HTMLElement>(el: T): void;
|
|
61
|
+
unmount(): void;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export { type DevtoolsButtonPosition, type DevtoolsErrorType, type DevtoolsPosition, TanstackQueryDevtools, type TanstackQueryDevtoolsConfig, TanstackQueryDevtoolsPanel, type TanstackQueryDevtoolsPanelConfig };
|
package/build/index.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ type XPosition = 'left' | 'right';
|
|
|
4
4
|
type YPosition = 'top' | 'bottom';
|
|
5
5
|
type DevtoolsPosition = XPosition | YPosition;
|
|
6
6
|
type DevtoolsButtonPosition = `${YPosition}-${XPosition}` | 'relative';
|
|
7
|
-
interface
|
|
7
|
+
interface DevtoolsErrorType {
|
|
8
8
|
/**
|
|
9
9
|
* The name of the error.
|
|
10
10
|
*/
|
|
@@ -22,8 +22,9 @@ interface QueryDevtoolsProps {
|
|
|
22
22
|
buttonPosition?: DevtoolsButtonPosition;
|
|
23
23
|
position?: DevtoolsPosition;
|
|
24
24
|
initialIsOpen?: boolean;
|
|
25
|
-
errorTypes?: Array<
|
|
25
|
+
errorTypes?: Array<DevtoolsErrorType>;
|
|
26
26
|
shadowDOMTarget?: ShadowRoot;
|
|
27
|
+
onClose?: () => unknown;
|
|
27
28
|
}
|
|
28
29
|
|
|
29
30
|
interface TanstackQueryDevtoolsConfig extends QueryDevtoolsProps {
|
|
@@ -36,10 +37,28 @@ declare class TanstackQueryDevtools {
|
|
|
36
37
|
setButtonPosition(position: DevtoolsButtonPosition): void;
|
|
37
38
|
setPosition(position: DevtoolsPosition): void;
|
|
38
39
|
setInitialIsOpen(isOpen: boolean): void;
|
|
39
|
-
setErrorTypes(errorTypes: Array<
|
|
40
|
+
setErrorTypes(errorTypes: Array<DevtoolsErrorType>): void;
|
|
40
41
|
setClient(client: QueryClient): void;
|
|
41
42
|
mount<T extends HTMLElement>(el: T): void;
|
|
42
43
|
unmount(): void;
|
|
43
44
|
}
|
|
44
45
|
|
|
45
|
-
|
|
46
|
+
interface TanstackQueryDevtoolsPanelConfig extends QueryDevtoolsProps {
|
|
47
|
+
styleNonce?: string;
|
|
48
|
+
shadowDOMTarget?: ShadowRoot;
|
|
49
|
+
onClose?: () => unknown;
|
|
50
|
+
}
|
|
51
|
+
declare class TanstackQueryDevtoolsPanel {
|
|
52
|
+
#private;
|
|
53
|
+
constructor(config: TanstackQueryDevtoolsPanelConfig);
|
|
54
|
+
setButtonPosition(position: DevtoolsButtonPosition): void;
|
|
55
|
+
setPosition(position: DevtoolsPosition): void;
|
|
56
|
+
setInitialIsOpen(isOpen: boolean): void;
|
|
57
|
+
setErrorTypes(errorTypes: Array<DevtoolsErrorType>): void;
|
|
58
|
+
setClient(client: QueryClient): void;
|
|
59
|
+
setOnClose(onClose: () => unknown): void;
|
|
60
|
+
mount<T extends HTMLElement>(el: T): void;
|
|
61
|
+
unmount(): void;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export { type DevtoolsButtonPosition, type DevtoolsErrorType, type DevtoolsPosition, TanstackQueryDevtools, type TanstackQueryDevtoolsConfig, TanstackQueryDevtoolsPanel, type TanstackQueryDevtoolsPanelConfig };
|
package/build/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createSignal, render, lazy, setupStyleSheet, createComponent, mergeProps } from './chunk/TU4XCPXB.js';
|
|
2
2
|
|
|
3
|
-
// src/
|
|
3
|
+
// src/TanstackQueryDevtools.tsx
|
|
4
4
|
var TanstackQueryDevtools = class {
|
|
5
5
|
#client;
|
|
6
6
|
#onlineManager;
|
|
@@ -69,7 +69,7 @@ var TanstackQueryDevtools = class {
|
|
|
69
69
|
if (this.#Component) {
|
|
70
70
|
Devtools = this.#Component;
|
|
71
71
|
} else {
|
|
72
|
-
Devtools = lazy(() => import('./
|
|
72
|
+
Devtools = lazy(() => import('./DevtoolsComponent/PTNKQWC6.js'));
|
|
73
73
|
this.#Component = Devtools;
|
|
74
74
|
}
|
|
75
75
|
setupStyleSheet(this.#styleNonce, this.#shadowDOMTarget);
|
|
@@ -116,4 +116,130 @@ var TanstackQueryDevtools = class {
|
|
|
116
116
|
}
|
|
117
117
|
};
|
|
118
118
|
|
|
119
|
-
|
|
119
|
+
// src/TanstackQueryDevtoolsPanel.tsx
|
|
120
|
+
var TanstackQueryDevtoolsPanel = class {
|
|
121
|
+
#client;
|
|
122
|
+
#onlineManager;
|
|
123
|
+
#queryFlavor;
|
|
124
|
+
#version;
|
|
125
|
+
#isMounted = false;
|
|
126
|
+
#styleNonce;
|
|
127
|
+
#shadowDOMTarget;
|
|
128
|
+
#buttonPosition;
|
|
129
|
+
#position;
|
|
130
|
+
#initialIsOpen;
|
|
131
|
+
#errorTypes;
|
|
132
|
+
#onClose;
|
|
133
|
+
#Component;
|
|
134
|
+
#dispose;
|
|
135
|
+
constructor(config) {
|
|
136
|
+
const {
|
|
137
|
+
client,
|
|
138
|
+
queryFlavor,
|
|
139
|
+
version,
|
|
140
|
+
onlineManager,
|
|
141
|
+
buttonPosition,
|
|
142
|
+
position,
|
|
143
|
+
initialIsOpen,
|
|
144
|
+
errorTypes,
|
|
145
|
+
styleNonce,
|
|
146
|
+
shadowDOMTarget,
|
|
147
|
+
onClose
|
|
148
|
+
} = config;
|
|
149
|
+
this.#client = createSignal(client);
|
|
150
|
+
this.#queryFlavor = queryFlavor;
|
|
151
|
+
this.#version = version;
|
|
152
|
+
this.#onlineManager = onlineManager;
|
|
153
|
+
this.#styleNonce = styleNonce;
|
|
154
|
+
this.#shadowDOMTarget = shadowDOMTarget;
|
|
155
|
+
this.#buttonPosition = createSignal(buttonPosition);
|
|
156
|
+
this.#position = createSignal(position);
|
|
157
|
+
this.#initialIsOpen = createSignal(initialIsOpen);
|
|
158
|
+
this.#errorTypes = createSignal(errorTypes);
|
|
159
|
+
this.#onClose = createSignal(onClose);
|
|
160
|
+
}
|
|
161
|
+
setButtonPosition(position) {
|
|
162
|
+
this.#buttonPosition[1](position);
|
|
163
|
+
}
|
|
164
|
+
setPosition(position) {
|
|
165
|
+
this.#position[1](position);
|
|
166
|
+
}
|
|
167
|
+
setInitialIsOpen(isOpen) {
|
|
168
|
+
this.#initialIsOpen[1](isOpen);
|
|
169
|
+
}
|
|
170
|
+
setErrorTypes(errorTypes) {
|
|
171
|
+
this.#errorTypes[1](errorTypes);
|
|
172
|
+
}
|
|
173
|
+
setClient(client) {
|
|
174
|
+
this.#client[1](client);
|
|
175
|
+
}
|
|
176
|
+
setOnClose(onClose) {
|
|
177
|
+
this.#onClose[1](() => onClose);
|
|
178
|
+
}
|
|
179
|
+
mount(el) {
|
|
180
|
+
if (this.#isMounted) {
|
|
181
|
+
throw new Error("Devtools is already mounted");
|
|
182
|
+
}
|
|
183
|
+
const dispose = render(() => {
|
|
184
|
+
const _self$ = this;
|
|
185
|
+
const [btnPosition] = this.#buttonPosition;
|
|
186
|
+
const [pos] = this.#position;
|
|
187
|
+
const [isOpen] = this.#initialIsOpen;
|
|
188
|
+
const [errors] = this.#errorTypes;
|
|
189
|
+
const [queryClient] = this.#client;
|
|
190
|
+
const [onClose] = this.#onClose;
|
|
191
|
+
let Devtools;
|
|
192
|
+
if (this.#Component) {
|
|
193
|
+
Devtools = this.#Component;
|
|
194
|
+
} else {
|
|
195
|
+
Devtools = lazy(() => import('./DevtoolsPanelComponent/SA34RK37.js'));
|
|
196
|
+
this.#Component = Devtools;
|
|
197
|
+
}
|
|
198
|
+
setupStyleSheet(this.#styleNonce, this.#shadowDOMTarget);
|
|
199
|
+
return createComponent(Devtools, mergeProps({
|
|
200
|
+
get queryFlavor() {
|
|
201
|
+
return _self$.#queryFlavor;
|
|
202
|
+
},
|
|
203
|
+
get version() {
|
|
204
|
+
return _self$.#version;
|
|
205
|
+
},
|
|
206
|
+
get onlineManager() {
|
|
207
|
+
return _self$.#onlineManager;
|
|
208
|
+
},
|
|
209
|
+
get shadowDOMTarget() {
|
|
210
|
+
return _self$.#shadowDOMTarget;
|
|
211
|
+
}
|
|
212
|
+
}, {
|
|
213
|
+
get client() {
|
|
214
|
+
return queryClient();
|
|
215
|
+
},
|
|
216
|
+
get buttonPosition() {
|
|
217
|
+
return btnPosition();
|
|
218
|
+
},
|
|
219
|
+
get position() {
|
|
220
|
+
return pos();
|
|
221
|
+
},
|
|
222
|
+
get initialIsOpen() {
|
|
223
|
+
return isOpen();
|
|
224
|
+
},
|
|
225
|
+
get errorTypes() {
|
|
226
|
+
return errors();
|
|
227
|
+
},
|
|
228
|
+
get onClose() {
|
|
229
|
+
return onClose();
|
|
230
|
+
}
|
|
231
|
+
}));
|
|
232
|
+
}, el);
|
|
233
|
+
this.#isMounted = true;
|
|
234
|
+
this.#dispose = dispose;
|
|
235
|
+
}
|
|
236
|
+
unmount() {
|
|
237
|
+
if (!this.#isMounted) {
|
|
238
|
+
throw new Error("Devtools is not mounted");
|
|
239
|
+
}
|
|
240
|
+
this.#dispose?.();
|
|
241
|
+
this.#isMounted = false;
|
|
242
|
+
}
|
|
243
|
+
};
|
|
244
|
+
|
|
245
|
+
export { TanstackQueryDevtools, TanstackQueryDevtoolsPanel };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tanstack/query-devtools",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.54.0",
|
|
4
4
|
"description": "Developer tools to interact with and visualize the TanStack Query cache",
|
|
5
5
|
"author": "tannerlinsley",
|
|
6
6
|
"license": "MIT",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"superjson": "^2.2.1",
|
|
55
55
|
"tsup-preset-solid": "^2.2.0",
|
|
56
56
|
"vite-plugin-solid": "^2.10.2",
|
|
57
|
-
"@tanstack/query-core": "5.
|
|
57
|
+
"@tanstack/query-core": "5.53.3"
|
|
58
58
|
},
|
|
59
59
|
"scripts": {}
|
|
60
60
|
}
|