@tanstack/query-devtools 5.52.3 → 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 +20 -1
- package/build/index.d.ts +20 -1
- package/build/index.js +129 -3
- package/package.json +2 -2
- package/src/Devtools.tsx +200 -324
- package/src/DevtoolsComponent.tsx +36 -0
- package/src/DevtoolsPanelComponent.tsx +47 -0
- package/src/Explorer.tsx +1 -1
- package/src/{index.tsx → TanstackQueryDevtools.tsx} +2 -3
- 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} +1 -9
- 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/dev.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createSignal, render, lazy, setupStyleSheet, createComponent, mergeProps } from './chunk/GMHTURR6.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/AIPVUCAN.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/YCAYD3IW.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 };
|