@tanstack/query-devtools 5.94.4 → 5.94.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.
@@ -0,0 +1,8 @@
1
+ export { DevtoolsButtonPosition } from './_tsup-dts-rollup.cjs';
2
+ export { DevtoolsErrorType } from './_tsup-dts-rollup.cjs';
3
+ export { DevtoolsPosition } from './_tsup-dts-rollup.cjs';
4
+ export { Theme } from './_tsup-dts-rollup.cjs';
5
+ export { TanstackQueryDevtools_alias_1 as TanstackQueryDevtools } from './_tsup-dts-rollup.cjs';
6
+ export { TanstackQueryDevtoolsConfig_alias_1 as TanstackQueryDevtoolsConfig } from './_tsup-dts-rollup.cjs';
7
+ export { TanstackQueryDevtoolsPanel_alias_1 as TanstackQueryDevtoolsPanel } from './_tsup-dts-rollup.cjs';
8
+ export { TanstackQueryDevtoolsPanelConfig_alias_1 as TanstackQueryDevtoolsPanelConfig } from './_tsup-dts-rollup.cjs';
package/build/dev.d.ts ADDED
@@ -0,0 +1,8 @@
1
+ export { DevtoolsButtonPosition } from './_tsup-dts-rollup.js';
2
+ export { DevtoolsErrorType } from './_tsup-dts-rollup.js';
3
+ export { DevtoolsPosition } from './_tsup-dts-rollup.js';
4
+ export { Theme } from './_tsup-dts-rollup.js';
5
+ export { TanstackQueryDevtools_alias_1 as TanstackQueryDevtools } from './_tsup-dts-rollup.js';
6
+ export { TanstackQueryDevtoolsConfig_alias_1 as TanstackQueryDevtoolsConfig } from './_tsup-dts-rollup.js';
7
+ export { TanstackQueryDevtoolsPanel_alias_1 as TanstackQueryDevtoolsPanel } from './_tsup-dts-rollup.js';
8
+ export { TanstackQueryDevtoolsPanelConfig_alias_1 as TanstackQueryDevtoolsPanelConfig } from './_tsup-dts-rollup.js';
package/build/dev.js ADDED
@@ -0,0 +1,279 @@
1
+ import { createSignal, render, lazy, setupStyleSheet, createComponent, mergeProps } from './chunk/EO4IN5ML.js';
2
+
3
+ // src/TanstackQueryDevtools.tsx
4
+ var TanstackQueryDevtools = class {
5
+ #client;
6
+ #onlineManager;
7
+ #queryFlavor;
8
+ #version;
9
+ #isMounted = false;
10
+ #styleNonce;
11
+ #shadowDOMTarget;
12
+ #buttonPosition;
13
+ #position;
14
+ #initialIsOpen;
15
+ #errorTypes;
16
+ #hideDisabledQueries;
17
+ #Component;
18
+ #theme;
19
+ #dispose;
20
+ constructor(config) {
21
+ const {
22
+ client,
23
+ queryFlavor,
24
+ version,
25
+ onlineManager,
26
+ buttonPosition,
27
+ position,
28
+ initialIsOpen,
29
+ errorTypes,
30
+ styleNonce,
31
+ shadowDOMTarget,
32
+ hideDisabledQueries,
33
+ theme
34
+ } = config;
35
+ this.#client = createSignal(client);
36
+ this.#queryFlavor = queryFlavor;
37
+ this.#version = version;
38
+ this.#onlineManager = onlineManager;
39
+ this.#styleNonce = styleNonce;
40
+ this.#shadowDOMTarget = shadowDOMTarget;
41
+ this.#buttonPosition = createSignal(buttonPosition);
42
+ this.#position = createSignal(position);
43
+ this.#initialIsOpen = createSignal(initialIsOpen);
44
+ this.#errorTypes = createSignal(errorTypes);
45
+ this.#hideDisabledQueries = createSignal(hideDisabledQueries);
46
+ this.#theme = createSignal(theme);
47
+ }
48
+ setButtonPosition(position) {
49
+ this.#buttonPosition[1](position);
50
+ }
51
+ setPosition(position) {
52
+ this.#position[1](position);
53
+ }
54
+ setInitialIsOpen(isOpen) {
55
+ this.#initialIsOpen[1](isOpen);
56
+ }
57
+ setErrorTypes(errorTypes) {
58
+ this.#errorTypes[1](errorTypes);
59
+ }
60
+ setClient(client) {
61
+ this.#client[1](client);
62
+ }
63
+ setTheme(theme) {
64
+ this.#theme[1](theme);
65
+ }
66
+ mount(el) {
67
+ if (this.#isMounted) {
68
+ throw new Error("Devtools is already mounted");
69
+ }
70
+ const dispose = render(() => {
71
+ const _self$ = this;
72
+ const [btnPosition] = this.#buttonPosition;
73
+ const [pos] = this.#position;
74
+ const [isOpen] = this.#initialIsOpen;
75
+ const [errors] = this.#errorTypes;
76
+ const [hideDisabledQueries] = this.#hideDisabledQueries;
77
+ const [queryClient] = this.#client;
78
+ const [theme] = this.#theme;
79
+ let Devtools;
80
+ if (this.#Component) {
81
+ Devtools = this.#Component;
82
+ } else {
83
+ Devtools = lazy(() => import('./DevtoolsComponent/XMTSMVTM.js'));
84
+ this.#Component = Devtools;
85
+ }
86
+ setupStyleSheet(this.#styleNonce, this.#shadowDOMTarget);
87
+ return createComponent(Devtools, mergeProps({
88
+ get queryFlavor() {
89
+ return _self$.#queryFlavor;
90
+ },
91
+ get version() {
92
+ return _self$.#version;
93
+ },
94
+ get onlineManager() {
95
+ return _self$.#onlineManager;
96
+ },
97
+ get shadowDOMTarget() {
98
+ return _self$.#shadowDOMTarget;
99
+ }
100
+ }, {
101
+ get client() {
102
+ return queryClient();
103
+ },
104
+ get buttonPosition() {
105
+ return btnPosition();
106
+ },
107
+ get position() {
108
+ return pos();
109
+ },
110
+ get initialIsOpen() {
111
+ return isOpen();
112
+ },
113
+ get errorTypes() {
114
+ return errors();
115
+ },
116
+ get hideDisabledQueries() {
117
+ return hideDisabledQueries();
118
+ },
119
+ get theme() {
120
+ return theme();
121
+ }
122
+ }));
123
+ }, el);
124
+ this.#isMounted = true;
125
+ this.#dispose = dispose;
126
+ }
127
+ unmount() {
128
+ if (!this.#isMounted) {
129
+ throw new Error("Devtools is not mounted");
130
+ }
131
+ this.#dispose?.();
132
+ this.#isMounted = false;
133
+ }
134
+ };
135
+
136
+ // src/TanstackQueryDevtoolsPanel.tsx
137
+ var TanstackQueryDevtoolsPanel = class {
138
+ #client;
139
+ #onlineManager;
140
+ #queryFlavor;
141
+ #version;
142
+ #isMounted = false;
143
+ #styleNonce;
144
+ #shadowDOMTarget;
145
+ #buttonPosition;
146
+ #position;
147
+ #initialIsOpen;
148
+ #errorTypes;
149
+ #hideDisabledQueries;
150
+ #onClose;
151
+ #Component;
152
+ #theme;
153
+ #dispose;
154
+ constructor(config) {
155
+ const {
156
+ client,
157
+ queryFlavor,
158
+ version,
159
+ onlineManager,
160
+ buttonPosition,
161
+ position,
162
+ initialIsOpen,
163
+ errorTypes,
164
+ styleNonce,
165
+ shadowDOMTarget,
166
+ onClose,
167
+ hideDisabledQueries,
168
+ theme
169
+ } = config;
170
+ this.#client = createSignal(client);
171
+ this.#queryFlavor = queryFlavor;
172
+ this.#version = version;
173
+ this.#onlineManager = onlineManager;
174
+ this.#styleNonce = styleNonce;
175
+ this.#shadowDOMTarget = shadowDOMTarget;
176
+ this.#buttonPosition = createSignal(buttonPosition);
177
+ this.#position = createSignal(position);
178
+ this.#initialIsOpen = createSignal(initialIsOpen);
179
+ this.#errorTypes = createSignal(errorTypes);
180
+ this.#hideDisabledQueries = createSignal(hideDisabledQueries);
181
+ this.#onClose = createSignal(onClose);
182
+ this.#theme = createSignal(theme);
183
+ }
184
+ setButtonPosition(position) {
185
+ this.#buttonPosition[1](position);
186
+ }
187
+ setPosition(position) {
188
+ this.#position[1](position);
189
+ }
190
+ setInitialIsOpen(isOpen) {
191
+ this.#initialIsOpen[1](isOpen);
192
+ }
193
+ setErrorTypes(errorTypes) {
194
+ this.#errorTypes[1](errorTypes);
195
+ }
196
+ setClient(client) {
197
+ this.#client[1](client);
198
+ }
199
+ setOnClose(onClose) {
200
+ this.#onClose[1](() => onClose);
201
+ }
202
+ setTheme(theme) {
203
+ this.#theme[1](theme);
204
+ }
205
+ mount(el) {
206
+ if (this.#isMounted) {
207
+ throw new Error("Devtools is already mounted");
208
+ }
209
+ const dispose = render(() => {
210
+ const _self$ = this;
211
+ const [btnPosition] = this.#buttonPosition;
212
+ const [pos] = this.#position;
213
+ const [isOpen] = this.#initialIsOpen;
214
+ const [errors] = this.#errorTypes;
215
+ const [hideDisabledQueries] = this.#hideDisabledQueries;
216
+ const [queryClient] = this.#client;
217
+ const [onClose] = this.#onClose;
218
+ const [theme] = this.#theme;
219
+ let Devtools;
220
+ if (this.#Component) {
221
+ Devtools = this.#Component;
222
+ } else {
223
+ Devtools = lazy(() => import('./DevtoolsPanelComponent/AY2UQYZQ.js'));
224
+ this.#Component = Devtools;
225
+ }
226
+ setupStyleSheet(this.#styleNonce, this.#shadowDOMTarget);
227
+ return createComponent(Devtools, mergeProps({
228
+ get queryFlavor() {
229
+ return _self$.#queryFlavor;
230
+ },
231
+ get version() {
232
+ return _self$.#version;
233
+ },
234
+ get onlineManager() {
235
+ return _self$.#onlineManager;
236
+ },
237
+ get shadowDOMTarget() {
238
+ return _self$.#shadowDOMTarget;
239
+ }
240
+ }, {
241
+ get client() {
242
+ return queryClient();
243
+ },
244
+ get buttonPosition() {
245
+ return btnPosition();
246
+ },
247
+ get position() {
248
+ return pos();
249
+ },
250
+ get initialIsOpen() {
251
+ return isOpen();
252
+ },
253
+ get errorTypes() {
254
+ return errors();
255
+ },
256
+ get hideDisabledQueries() {
257
+ return hideDisabledQueries();
258
+ },
259
+ get onClose() {
260
+ return onClose();
261
+ },
262
+ get theme() {
263
+ return theme();
264
+ }
265
+ }));
266
+ }, el);
267
+ this.#isMounted = true;
268
+ this.#dispose = dispose;
269
+ }
270
+ unmount() {
271
+ if (!this.#isMounted) {
272
+ throw new Error("Devtools is not mounted");
273
+ }
274
+ this.#dispose?.();
275
+ this.#isMounted = false;
276
+ }
277
+ };
278
+
279
+ export { TanstackQueryDevtools, TanstackQueryDevtoolsPanel };