@tanstack/solid-query-devtools 6.0.0-rc.4 → 6.0.0-rc.6
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/clientOnly-CEXX5Ps8.jsx +26 -0
- package/build/clientOnly-Cmw5kOEH.cjs +1 -0
- package/build/clientOnly-lrJ-FwVZ.js +2 -0
- package/build/clientOnly-lrJ-FwVZ.js.map +1 -0
- package/build/dev.cjs +29 -281
- package/build/dev.js +27 -23
- package/build/dev.jsx +27 -42
- package/build/devtools-BMem5cUa.jsx +62 -0
- package/build/devtools-DMwvwc4L.js +67 -0
- package/build/devtools-DPfipH2Y.js +2 -0
- package/build/devtools-DPfipH2Y.js.map +1 -0
- package/build/devtools-TPMm0sW8.cjs +1 -0
- package/build/devtools-m6r1o8lz.cjs +67 -0
- package/build/devtoolsPanel-BIXzHW6Y.cjs +1 -0
- package/build/devtoolsPanel-BbBQ7vKt.cjs +68 -0
- package/build/devtoolsPanel-CU_iFbJ3.jsx +62 -0
- package/build/devtoolsPanel-D71UlGwy.js +68 -0
- package/build/devtoolsPanel-DLEdindg.d.ts +106 -0
- package/build/devtoolsPanel-DLEdindg.d.ts.map +1 -0
- package/build/devtoolsPanel-Q67Cz4BM.d.cts +106 -0
- package/build/devtoolsPanel-Q67Cz4BM.d.cts.map +1 -0
- package/build/devtoolsPanel-hmH3gOTU.js +2 -0
- package/build/devtoolsPanel-hmH3gOTU.js.map +1 -0
- package/build/index.cjs +1 -285
- package/build/index.d.cts +5 -3
- package/build/index.d.cts.map +1 -0
- package/build/index.d.ts +5 -3
- package/build/index.d.ts.map +1 -0
- package/build/index.js +2 -29
- package/build/index.js.map +1 -0
- package/build/index.jsx +7 -45
- package/build/production.cjs +1 -0
- package/build/production.d.cts +5 -0
- package/build/production.d.cts.map +1 -0
- package/build/production.d.ts +5 -0
- package/build/production.d.ts.map +1 -0
- package/build/production.js +2 -0
- package/build/production.js.map +1 -0
- package/build/production.jsx +5 -0
- package/package.json +51 -37
- package/src/clientOnly.tsx +9 -8
- package/src/devtools.tsx +14 -6
- package/src/devtoolsPanel.tsx +20 -5
- package/src/production.tsx +12 -0
- package/build/_tsup-dts-rollup.d.cts +0 -109
- package/build/_tsup-dts-rollup.d.ts +0 -109
- package/build/chunk/6YEK5RSE.js +0 -91
- package/build/chunk/LZBCL5FW.js +0 -93
- package/build/dev.d.cts +0 -3
- package/build/dev.d.ts +0 -3
- package/build/devtools/7WZM3IT7.jsx +0 -82
- package/build/devtools/NS4HL5WJ.js +0 -68
- package/build/devtools/UQ6OWRDT.js +0 -68
- package/build/devtoolsPanel/FQC5JHFZ.jsx +0 -73
- package/build/devtoolsPanel/IQ6EXVZB.js +0 -71
- package/build/devtoolsPanel/JAI45AU2.js +0 -71
package/build/index.cjs
CHANGED
|
@@ -1,285 +1 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
var solidJs = require('solid-js');
|
|
4
|
-
var solidQuery = require('@tanstack/solid-query');
|
|
5
|
-
var queryDevtools = require('@tanstack/query-devtools');
|
|
6
|
-
|
|
7
|
-
var __defProp = Object.defineProperty;
|
|
8
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
9
|
-
var __esm = (fn, res) => function __init() {
|
|
10
|
-
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
|
|
11
|
-
};
|
|
12
|
-
var __export = (target, all) => {
|
|
13
|
-
for (var name in all)
|
|
14
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
15
|
-
};
|
|
16
|
-
function effect(fn, effectFn, options) {
|
|
17
|
-
solidJs.createRenderEffect(fn, effectFn, transparentOptions);
|
|
18
|
-
}
|
|
19
|
-
function create(html, bypassGuard, flag) {
|
|
20
|
-
const t = document.createElement("template");
|
|
21
|
-
t.innerHTML = html;
|
|
22
|
-
return flag === 2 ? t.content.firstChild.firstChild : t.content.firstChild;
|
|
23
|
-
}
|
|
24
|
-
function template(html, flag) {
|
|
25
|
-
let node;
|
|
26
|
-
const fn = flag === 1 ? (bypassGuard) => document.importNode(node || (node = create(html, bypassGuard, flag)), true) : (bypassGuard) => (node || (node = create(html, bypassGuard, flag))).cloneNode(true);
|
|
27
|
-
return fn;
|
|
28
|
-
}
|
|
29
|
-
function setAttribute(node, name, value) {
|
|
30
|
-
if (isHydrating(node)) return;
|
|
31
|
-
node.removeAttribute(name);
|
|
32
|
-
}
|
|
33
|
-
function style(node, value, prev) {
|
|
34
|
-
if (isHydrating(node)) return;
|
|
35
|
-
if (!value) {
|
|
36
|
-
if (prev || node._$styles) {
|
|
37
|
-
setAttribute(node, "style");
|
|
38
|
-
node._$styles = void 0;
|
|
39
|
-
}
|
|
40
|
-
return;
|
|
41
|
-
}
|
|
42
|
-
const nodeStyle = node.style;
|
|
43
|
-
if (typeof value === "string") {
|
|
44
|
-
node._$styles = void 0;
|
|
45
|
-
return nodeStyle.cssText = value;
|
|
46
|
-
}
|
|
47
|
-
if (typeof prev === "string") {
|
|
48
|
-
nodeStyle.cssText = "";
|
|
49
|
-
prev = void 0;
|
|
50
|
-
}
|
|
51
|
-
let applied = node._$styles;
|
|
52
|
-
if (!applied) {
|
|
53
|
-
applied = node._$styles = prev ? {
|
|
54
|
-
...prev
|
|
55
|
-
} : {};
|
|
56
|
-
}
|
|
57
|
-
let v, s;
|
|
58
|
-
for (s in applied) {
|
|
59
|
-
if (!hasOwn.call(value, s) || value[s] == null) {
|
|
60
|
-
nodeStyle.removeProperty(s);
|
|
61
|
-
delete applied[s];
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
for (s in value) {
|
|
65
|
-
if (!hasOwn.call(value, s)) continue;
|
|
66
|
-
v = value[s];
|
|
67
|
-
if (v != null && v !== applied[s]) {
|
|
68
|
-
nodeStyle.setProperty(s, v);
|
|
69
|
-
applied[s] = v;
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
function applyRef(r, element) {
|
|
74
|
-
Array.isArray(r) ? r.flat(Infinity).forEach((f) => f && f(element)) : r(element);
|
|
75
|
-
}
|
|
76
|
-
function ref(fn, element) {
|
|
77
|
-
const resolved = solidJs.untrack(fn);
|
|
78
|
-
solidJs.runWithOwner(null, () => applyRef(resolved, element));
|
|
79
|
-
}
|
|
80
|
-
function isHydrating(node) {
|
|
81
|
-
if (!solidJs.sharedConfig.hydrating) return false;
|
|
82
|
-
if (!node || node.isConnected) return true;
|
|
83
|
-
const roots = solidJs.sharedConfig.claimRoots;
|
|
84
|
-
if (roots) {
|
|
85
|
-
for (let i = 0; i < roots.length; i++) {
|
|
86
|
-
if (roots[i].contains(node)) return true;
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
return false;
|
|
90
|
-
}
|
|
91
|
-
var transparentOptions, hasOwn, isServer, isDev;
|
|
92
|
-
var init_web = __esm({
|
|
93
|
-
"../../node_modules/.pnpm/@solidjs+web@2.0.0-rc.6_solid-js@2.0.0-rc.6/node_modules/@solidjs/web/dist/web.js"() {
|
|
94
|
-
transparentOptions = {
|
|
95
|
-
transparent: true,
|
|
96
|
-
sync: true
|
|
97
|
-
};
|
|
98
|
-
hasOwn = Object.prototype.hasOwnProperty;
|
|
99
|
-
isServer = false;
|
|
100
|
-
isDev = false;
|
|
101
|
-
}
|
|
102
|
-
});
|
|
103
|
-
|
|
104
|
-
// src/devtools.tsx
|
|
105
|
-
var devtools_exports = {};
|
|
106
|
-
__export(devtools_exports, {
|
|
107
|
-
default: () => SolidQueryDevtools
|
|
108
|
-
});
|
|
109
|
-
function SolidQueryDevtools(props) {
|
|
110
|
-
const queryClient = solidQuery.useQueryClient(props.client);
|
|
111
|
-
const client = solidJs.createMemo(() => queryClient);
|
|
112
|
-
let ref2;
|
|
113
|
-
const devtools = new queryDevtools.TanstackQueryDevtools({
|
|
114
|
-
client: client(),
|
|
115
|
-
queryFlavor: "Solid Query",
|
|
116
|
-
version: "5",
|
|
117
|
-
onlineManager: solidQuery.onlineManager,
|
|
118
|
-
buttonPosition: props.buttonPosition,
|
|
119
|
-
position: props.position,
|
|
120
|
-
initialIsOpen: props.initialIsOpen,
|
|
121
|
-
errorTypes: props.errorTypes,
|
|
122
|
-
styleNonce: props.styleNonce,
|
|
123
|
-
shadowDOMTarget: props.shadowDOMTarget,
|
|
124
|
-
hideDisabledQueries: props.hideDisabledQueries,
|
|
125
|
-
theme: props.theme
|
|
126
|
-
});
|
|
127
|
-
solidJs.createEffect(() => client(), (c) => {
|
|
128
|
-
devtools.setClient(c);
|
|
129
|
-
});
|
|
130
|
-
solidJs.createEffect(() => props.buttonPosition, (buttonPos) => {
|
|
131
|
-
if (buttonPos) {
|
|
132
|
-
devtools.setButtonPosition(buttonPos);
|
|
133
|
-
}
|
|
134
|
-
});
|
|
135
|
-
solidJs.createEffect(() => props.position, (pos) => {
|
|
136
|
-
if (pos) {
|
|
137
|
-
devtools.setPosition(pos);
|
|
138
|
-
}
|
|
139
|
-
});
|
|
140
|
-
solidJs.createEffect(() => props.initialIsOpen, (initialIsOpen) => {
|
|
141
|
-
devtools.setInitialIsOpen(initialIsOpen || false);
|
|
142
|
-
});
|
|
143
|
-
solidJs.createEffect(() => props.errorTypes, (errorTypes) => {
|
|
144
|
-
devtools.setErrorTypes(errorTypes || []);
|
|
145
|
-
});
|
|
146
|
-
solidJs.createEffect(() => props.theme, (theme) => {
|
|
147
|
-
devtools.setTheme(theme || "system");
|
|
148
|
-
});
|
|
149
|
-
let mounted = false;
|
|
150
|
-
let disposed = false;
|
|
151
|
-
solidJs.onSettled(() => {
|
|
152
|
-
queueMicrotask(() => {
|
|
153
|
-
if (disposed) return;
|
|
154
|
-
solidJs.runWithOwner(null, () => devtools.mount(ref2));
|
|
155
|
-
mounted = true;
|
|
156
|
-
});
|
|
157
|
-
return () => {
|
|
158
|
-
disposed = true;
|
|
159
|
-
if (mounted) {
|
|
160
|
-
devtools.unmount();
|
|
161
|
-
}
|
|
162
|
-
};
|
|
163
|
-
});
|
|
164
|
-
var _el$ = _tmpl$();
|
|
165
|
-
var _ref$ = ref2;
|
|
166
|
-
typeof _ref$ === "function" || Array.isArray(_ref$) ? ref(() => _ref$, _el$) : ref2 = _el$;
|
|
167
|
-
return _el$;
|
|
168
|
-
}
|
|
169
|
-
var _tmpl$;
|
|
170
|
-
var init_devtools = __esm({
|
|
171
|
-
"src/devtools.tsx"() {
|
|
172
|
-
init_web();
|
|
173
|
-
init_web();
|
|
174
|
-
_tmpl$ = /* @__PURE__ */ template(`<div class=tsqd-parent-container>`);
|
|
175
|
-
}
|
|
176
|
-
});
|
|
177
|
-
|
|
178
|
-
// src/devtoolsPanel.tsx
|
|
179
|
-
var devtoolsPanel_exports = {};
|
|
180
|
-
__export(devtoolsPanel_exports, {
|
|
181
|
-
default: () => SolidQueryDevtoolsPanel
|
|
182
|
-
});
|
|
183
|
-
function SolidQueryDevtoolsPanel(props) {
|
|
184
|
-
const queryClient = solidQuery.useQueryClient(props.client);
|
|
185
|
-
const client = solidJs.createMemo(() => queryClient);
|
|
186
|
-
let ref2;
|
|
187
|
-
const {
|
|
188
|
-
errorTypes,
|
|
189
|
-
styleNonce,
|
|
190
|
-
shadowDOMTarget,
|
|
191
|
-
hideDisabledQueries
|
|
192
|
-
} = props;
|
|
193
|
-
const devtools = new queryDevtools.TanstackQueryDevtoolsPanel({
|
|
194
|
-
client: client(),
|
|
195
|
-
queryFlavor: "Solid Query",
|
|
196
|
-
version: "5",
|
|
197
|
-
onlineManager: solidQuery.onlineManager,
|
|
198
|
-
buttonPosition: "bottom-left",
|
|
199
|
-
position: "bottom",
|
|
200
|
-
initialIsOpen: true,
|
|
201
|
-
errorTypes,
|
|
202
|
-
styleNonce,
|
|
203
|
-
shadowDOMTarget,
|
|
204
|
-
onClose: props.onClose,
|
|
205
|
-
hideDisabledQueries,
|
|
206
|
-
theme: props.theme
|
|
207
|
-
});
|
|
208
|
-
solidJs.createEffect(() => client(), (c) => {
|
|
209
|
-
devtools.setClient(c);
|
|
210
|
-
});
|
|
211
|
-
solidJs.createEffect(() => props.onClose, (onClose) => {
|
|
212
|
-
devtools.setOnClose(onClose ?? (() => {
|
|
213
|
-
}));
|
|
214
|
-
});
|
|
215
|
-
solidJs.createEffect(() => props.errorTypes, (errorTypes2) => {
|
|
216
|
-
devtools.setErrorTypes(errorTypes2 || []);
|
|
217
|
-
});
|
|
218
|
-
solidJs.createEffect(() => props.theme, (theme) => {
|
|
219
|
-
devtools.setTheme(theme || "system");
|
|
220
|
-
});
|
|
221
|
-
let mounted = false;
|
|
222
|
-
let disposed = false;
|
|
223
|
-
solidJs.onSettled(() => {
|
|
224
|
-
queueMicrotask(() => {
|
|
225
|
-
if (disposed) return;
|
|
226
|
-
solidJs.runWithOwner(null, () => devtools.mount(ref2));
|
|
227
|
-
mounted = true;
|
|
228
|
-
});
|
|
229
|
-
return () => {
|
|
230
|
-
disposed = true;
|
|
231
|
-
if (mounted) {
|
|
232
|
-
devtools.unmount();
|
|
233
|
-
}
|
|
234
|
-
};
|
|
235
|
-
});
|
|
236
|
-
var _el$ = _tmpl$2();
|
|
237
|
-
var _ref$ = ref2;
|
|
238
|
-
typeof _ref$ === "function" || Array.isArray(_ref$) ? ref(() => _ref$, _el$) : ref2 = _el$;
|
|
239
|
-
effect(() => ({
|
|
240
|
-
...props.style
|
|
241
|
-
}), (_v$, _$p) => {
|
|
242
|
-
style(_el$, _v$, _$p);
|
|
243
|
-
});
|
|
244
|
-
return _el$;
|
|
245
|
-
}
|
|
246
|
-
var _tmpl$2;
|
|
247
|
-
var init_devtoolsPanel = __esm({
|
|
248
|
-
"src/devtoolsPanel.tsx"() {
|
|
249
|
-
init_web();
|
|
250
|
-
init_web();
|
|
251
|
-
init_web();
|
|
252
|
-
init_web();
|
|
253
|
-
_tmpl$2 = /* @__PURE__ */ template(`<div class=tsqd-parent-container style=height:500px>`);
|
|
254
|
-
}
|
|
255
|
-
});
|
|
256
|
-
|
|
257
|
-
// src/index.tsx
|
|
258
|
-
init_web();
|
|
259
|
-
|
|
260
|
-
// src/clientOnly.tsx
|
|
261
|
-
init_web();
|
|
262
|
-
function clientOnly(fn) {
|
|
263
|
-
if (isServer) return (props) => props.fallback;
|
|
264
|
-
const [comp, setComp] = solidJs.createSignal();
|
|
265
|
-
fn().then((m) => setComp(() => m.default));
|
|
266
|
-
return (props) => {
|
|
267
|
-
let Comp;
|
|
268
|
-
let m;
|
|
269
|
-
const rest = solidJs.omit(props, "fallback");
|
|
270
|
-
if ((Comp = comp()) && !solidJs.sharedConfig.hydrating) return Comp(rest);
|
|
271
|
-
const [mounted, setMounted] = solidJs.createSignal(!solidJs.sharedConfig.hydrating);
|
|
272
|
-
solidJs.onSettled(() => {
|
|
273
|
-
setMounted(true);
|
|
274
|
-
});
|
|
275
|
-
return solidJs.createMemo(() => (Comp = comp(), m = mounted(), solidJs.untrack(() => Comp && m ? Comp(rest) : props.fallback)));
|
|
276
|
-
};
|
|
277
|
-
}
|
|
278
|
-
|
|
279
|
-
// src/index.tsx
|
|
280
|
-
exports.SolidQueryDevtools = isDev ? clientOnly(() => Promise.resolve().then(() => (init_devtools(), devtools_exports))) : function() {
|
|
281
|
-
return null;
|
|
282
|
-
};
|
|
283
|
-
exports.SolidQueryDevtoolsPanel = isDev ? clientOnly(() => Promise.resolve().then(() => (init_devtoolsPanel(), devtoolsPanel_exports))) : function() {
|
|
284
|
-
return null;
|
|
285
|
-
};
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./clientOnly-Cmw5kOEH.cjs");let t=require("@solidjs/web");const n=t.isDev?e.t(()=>Promise.resolve().then(()=>require("./devtools-TPMm0sW8.cjs"))):function(){return null},r=t.isDev?e.t(()=>Promise.resolve().then(()=>require("./devtoolsPanel-BIXzHW6Y.cjs"))):function(){return null};exports.SolidQueryDevtools=n,exports.SolidQueryDevtoolsPanel=r;
|
package/build/index.d.cts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
export
|
|
3
|
-
export
|
|
1
|
+
import { n as SolidQueryDevtoolsPanel$1, r as SolidQueryDevtools$1, t as DevtoolsPanelOptions } from "./devtoolsPanel-Q67Cz4BM.cjs";
|
|
2
|
+
export declare const SolidQueryDevtools: typeof SolidQueryDevtools$1;
|
|
3
|
+
export declare const SolidQueryDevtoolsPanel: typeof SolidQueryDevtoolsPanel$1;
|
|
4
|
+
export type { DevtoolsPanelOptions };
|
|
5
|
+
//# sourceMappingURL=index.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.cts","names":["SolidQueryDevtoolsComp","SolidQueryDevtoolsCompPanel"],"sources":["../src/index.tsx"],"mappings":";qBAKa,2BAA2BA;qBAM3B,gCAAgCC"}
|
package/build/index.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
export
|
|
3
|
-
export
|
|
1
|
+
import { n as SolidQueryDevtoolsPanel$1, r as SolidQueryDevtools$1, t as DevtoolsPanelOptions } from "./devtoolsPanel-DLEdindg.js";
|
|
2
|
+
export declare const SolidQueryDevtools: typeof SolidQueryDevtools$1;
|
|
3
|
+
export declare const SolidQueryDevtoolsPanel: typeof SolidQueryDevtoolsPanel$1;
|
|
4
|
+
export type { DevtoolsPanelOptions };
|
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":["SolidQueryDevtoolsComp","SolidQueryDevtoolsCompPanel"],"sources":["../src/index.tsx"],"mappings":";qBAKa,2BAA2BA;qBAM3B,gCAAgCC"}
|
package/build/index.js
CHANGED
|
@@ -1,29 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
function clientOnly(fn) {
|
|
5
|
-
if (isServer) return (props) => props.fallback;
|
|
6
|
-
const [comp, setComp] = createSignal();
|
|
7
|
-
fn().then((m) => setComp(() => m.default));
|
|
8
|
-
return (props) => {
|
|
9
|
-
let Comp;
|
|
10
|
-
let m;
|
|
11
|
-
const rest = omit(props, "fallback");
|
|
12
|
-
if ((Comp = comp()) && !sharedConfig.hydrating) return Comp(rest);
|
|
13
|
-
const [mounted, setMounted] = createSignal(!sharedConfig.hydrating);
|
|
14
|
-
onSettled(() => {
|
|
15
|
-
setMounted(true);
|
|
16
|
-
});
|
|
17
|
-
return createMemo(() => (Comp = comp(), m = mounted(), untrack(() => Comp && m ? Comp(rest) : props.fallback)));
|
|
18
|
-
};
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
// src/index.tsx
|
|
22
|
-
var SolidQueryDevtools = isDev ? clientOnly(() => import('./devtools/NS4HL5WJ.js')) : function() {
|
|
23
|
-
return null;
|
|
24
|
-
};
|
|
25
|
-
var SolidQueryDevtoolsPanel = isDev ? clientOnly(() => import('./devtoolsPanel/IQ6EXVZB.js')) : function() {
|
|
26
|
-
return null;
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
export { SolidQueryDevtools, SolidQueryDevtoolsPanel };
|
|
1
|
+
import{t as e}from"./clientOnly-lrJ-FwVZ.js";import{isDev as t}from"@solidjs/web";const n=t?e(()=>import(`./devtools-DPfipH2Y.js`)):function(){return null},r=t?e(()=>import(`./devtoolsPanel-hmH3gOTU.js`)):function(){return null};export{n as SolidQueryDevtools,r as SolidQueryDevtoolsPanel};
|
|
2
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["isDev","clientOnly","SolidQueryDevtools","SolidQueryDevtoolsPanel","clientOnly","SolidQueryDevtools","isDev","SolidQueryDevtoolsPanel"],"sources":["../src/index.tsx"],"sourcesContent":["import { isDev } from '@solidjs/web'\nimport clientOnly from './clientOnly'\nimport type SolidQueryDevtoolsComp from './devtools'\nimport type SolidQueryDevtoolsCompPanel from './devtoolsPanel'\n\nexport const SolidQueryDevtools: typeof SolidQueryDevtoolsComp = isDev\n ? clientOnly(() => import('./devtools'))\n : function () {\n return null\n }\n\nexport const SolidQueryDevtoolsPanel: typeof SolidQueryDevtoolsCompPanel = isDev\n ? clientOnly(() => import('./devtoolsPanel'))\n : function () {\n return null\n }\n\nexport type { DevtoolsPanelOptions } from './devtoolsPanel'\n"],"mappings":"A,kFAKA,MAAaE,EAAoDF,EAC7DC,MAAiB,OAAO,yBAAa,EACrC,UAAY,CACV,OAAO,IACT,EAESE,EAA8DH,EACvEC,MAAiB,OAAO,8BAAkB,EAC1C,UAAY,CACV,OAAO,IACT,E"}
|
package/build/index.jsx
CHANGED
|
@@ -1,48 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
import { Errored, For, Hydration, Loading, Match, NoHydration, Repeat, Reveal, Show, Switch, createComponent as createComponent2, getOwner as getOwner2, merge, untrack as untrack2 } from "solid-js";
|
|
4
|
-
var FLASH_COOKIE = "flash";
|
|
5
|
-
var FLASH_MATCHER = new RegExp(`(?:^|;\\s*)${FLASH_COOKIE}=([^;]+)`);
|
|
6
|
-
var isServer = false;
|
|
7
|
-
var isDev = false;
|
|
8
|
-
|
|
9
|
-
// src/clientOnly.tsx
|
|
10
|
-
import {
|
|
11
|
-
createMemo as createMemo2,
|
|
12
|
-
createSignal as createSignal2,
|
|
13
|
-
omit as omit2,
|
|
14
|
-
onSettled,
|
|
15
|
-
sharedConfig as sharedConfig2,
|
|
16
|
-
untrack as untrack3
|
|
17
|
-
} from "solid-js";
|
|
18
|
-
function clientOnly(fn) {
|
|
19
|
-
if (isServer)
|
|
20
|
-
return (props) => props.fallback;
|
|
21
|
-
const [comp, setComp] = createSignal2();
|
|
22
|
-
fn().then((m) => setComp(() => m.default));
|
|
23
|
-
return (props) => {
|
|
24
|
-
let Comp;
|
|
25
|
-
let m;
|
|
26
|
-
const rest = omit2(props, "fallback");
|
|
27
|
-
if ((Comp = comp()) && !sharedConfig2.hydrating) return Comp(rest);
|
|
28
|
-
const [mounted, setMounted] = createSignal2(!sharedConfig2.hydrating);
|
|
29
|
-
onSettled(() => {
|
|
30
|
-
setMounted(true);
|
|
31
|
-
});
|
|
32
|
-
return createMemo2(
|
|
33
|
-
() => (Comp = comp(), m = mounted(), untrack3(() => Comp && m ? Comp(rest) : props.fallback))
|
|
34
|
-
);
|
|
35
|
-
};
|
|
36
|
-
}
|
|
37
|
-
|
|
1
|
+
import { t as clientOnly } from "./clientOnly-CEXX5Ps8.jsx";
|
|
2
|
+
import { isDev } from "@solidjs/web";
|
|
38
3
|
// src/index.tsx
|
|
39
|
-
|
|
40
|
-
|
|
4
|
+
const SolidQueryDevtools = isDev ? clientOnly(() => import("./devtools-BMem5cUa.jsx")) : function() {
|
|
5
|
+
return null;
|
|
41
6
|
};
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
};
|
|
45
|
-
export {
|
|
46
|
-
SolidQueryDevtools,
|
|
47
|
-
SolidQueryDevtoolsPanel
|
|
7
|
+
const SolidQueryDevtoolsPanel = isDev ? clientOnly(() => import("./devtoolsPanel-CU_iFbJ3.jsx")) : function() {
|
|
8
|
+
return null;
|
|
48
9
|
};
|
|
10
|
+
export { SolidQueryDevtools, SolidQueryDevtoolsPanel };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./clientOnly-Cmw5kOEH.cjs"),t=e.t(()=>Promise.resolve().then(()=>require("./devtools-TPMm0sW8.cjs"))),n=e.t(()=>Promise.resolve().then(()=>require("./devtoolsPanel-BIXzHW6Y.cjs")));exports.SolidQueryDevtools=t,exports.SolidQueryDevtoolsPanel=n;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { n as SolidQueryDevtoolsPanel$1, r as SolidQueryDevtools$1, t as DevtoolsPanelOptions } from "./devtoolsPanel-Q67Cz4BM.cjs";
|
|
2
|
+
export declare const SolidQueryDevtools: typeof SolidQueryDevtools$1;
|
|
3
|
+
export declare const SolidQueryDevtoolsPanel: typeof SolidQueryDevtoolsPanel$1;
|
|
4
|
+
export type { DevtoolsPanelOptions };
|
|
5
|
+
//# sourceMappingURL=production.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"production.d.cts","names":["SolidQueryDevtoolsComp","SolidQueryDevtoolsCompPanel"],"sources":["../src/production.tsx"],"mappings":";qBAIa,2BAA2BA;qBAI3B,gCAAgCC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { n as SolidQueryDevtoolsPanel$1, r as SolidQueryDevtools$1, t as DevtoolsPanelOptions } from "./devtoolsPanel-DLEdindg.js";
|
|
2
|
+
export declare const SolidQueryDevtools: typeof SolidQueryDevtools$1;
|
|
3
|
+
export declare const SolidQueryDevtoolsPanel: typeof SolidQueryDevtoolsPanel$1;
|
|
4
|
+
export type { DevtoolsPanelOptions };
|
|
5
|
+
//# sourceMappingURL=production.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"production.d.ts","names":["SolidQueryDevtoolsComp","SolidQueryDevtoolsCompPanel"],"sources":["../src/production.tsx"],"mappings":";qBAIa,2BAA2BA;qBAI3B,gCAAgCC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"production.js","names":["clientOnly","SolidQueryDevtools","SolidQueryDevtoolsPanel","clientOnly","SolidQueryDevtools","SolidQueryDevtoolsPanel"],"sources":["../src/production.tsx"],"sourcesContent":["import clientOnly from './clientOnly'\nimport type SolidQueryDevtoolsComp from './devtools'\nimport type SolidQueryDevtoolsCompPanel from './devtoolsPanel'\n\nexport const SolidQueryDevtools: typeof SolidQueryDevtoolsComp = clientOnly(\n () => import('./devtools'),\n)\n\nexport const SolidQueryDevtoolsPanel: typeof SolidQueryDevtoolsCompPanel =\n clientOnly(() => import('./devtoolsPanel'))\n\nexport type { DevtoolsPanelOptions } from './devtoolsPanel'\n"],"mappings":"A,6CAIA,MAAaC,EAAoDD,MACzD,OAAO,yBACf,EAEaE,EACXF,MAAiB,OAAO,8BAAkB,E"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { t as clientOnly } from "./clientOnly-CEXX5Ps8.jsx";
|
|
2
|
+
// src/production.tsx
|
|
3
|
+
const SolidQueryDevtools = clientOnly(() => import("./devtools-BMem5cUa.jsx"));
|
|
4
|
+
const SolidQueryDevtoolsPanel = clientOnly(() => import("./devtoolsPanel-CU_iFbJ3.jsx"));
|
|
5
|
+
export { SolidQueryDevtools, SolidQueryDevtoolsPanel };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tanstack/solid-query-devtools",
|
|
3
|
-
"version": "6.0.0-rc.
|
|
3
|
+
"version": "6.0.0-rc.6",
|
|
4
4
|
"description": "Developer tools to interact with and visualize the TanStack/solid-query Query cache",
|
|
5
5
|
"author": "tannerlinsley",
|
|
6
6
|
"license": "MIT",
|
|
@@ -20,65 +20,79 @@
|
|
|
20
20
|
"types": "./build/index.d.ts",
|
|
21
21
|
"browser": {},
|
|
22
22
|
"exports": {
|
|
23
|
-
"
|
|
24
|
-
|
|
25
|
-
"
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
23
|
+
".": {
|
|
24
|
+
"@tanstack/custom-condition": "./src/index.tsx",
|
|
25
|
+
"solid": {
|
|
26
|
+
"development": "./build/dev.jsx",
|
|
27
|
+
"import": "./build/index.jsx"
|
|
28
|
+
},
|
|
29
|
+
"development": {
|
|
30
|
+
"import": {
|
|
31
|
+
"types": "./build/index.d.ts",
|
|
32
|
+
"default": "./build/dev.js"
|
|
33
|
+
},
|
|
34
|
+
"require": "./build/dev.cjs"
|
|
35
|
+
},
|
|
29
36
|
"import": {
|
|
30
37
|
"types": "./build/index.d.ts",
|
|
31
|
-
"default": "./build/
|
|
38
|
+
"default": "./build/index.js"
|
|
32
39
|
},
|
|
33
|
-
"require": "./build/
|
|
40
|
+
"require": "./build/index.cjs"
|
|
34
41
|
},
|
|
35
|
-
"
|
|
36
|
-
"
|
|
37
|
-
"
|
|
42
|
+
"./production": {
|
|
43
|
+
"@tanstack/custom-condition": "./src/production.tsx",
|
|
44
|
+
"solid": "./build/production.jsx",
|
|
45
|
+
"import": {
|
|
46
|
+
"types": "./build/production.d.ts",
|
|
47
|
+
"default": "./build/production.js"
|
|
48
|
+
},
|
|
49
|
+
"require": "./build/production.cjs"
|
|
38
50
|
},
|
|
39
|
-
"
|
|
51
|
+
"./package.json": "./package.json"
|
|
40
52
|
},
|
|
53
|
+
"sideEffects": false,
|
|
41
54
|
"files": [
|
|
42
55
|
"build",
|
|
43
56
|
"src",
|
|
44
57
|
"!src/__tests__"
|
|
45
58
|
],
|
|
46
59
|
"dependencies": {
|
|
47
|
-
"@tanstack/query-devtools": "5.
|
|
60
|
+
"@tanstack/query-devtools": "5.107.1"
|
|
48
61
|
},
|
|
49
62
|
"devDependencies": {
|
|
50
63
|
"@babel/core": "^7.28.0",
|
|
51
64
|
"@babel/preset-typescript": "^7.18.6",
|
|
52
|
-
"@solidjs/
|
|
65
|
+
"@solidjs/babel-plugin": "^2.0.0",
|
|
66
|
+
"@solidjs/signals": "^2.0.0",
|
|
53
67
|
"@solidjs/testing-library": "^0.8.10",
|
|
54
|
-
"@solidjs/vite-plugin": "^3.0.0
|
|
55
|
-
"@solidjs/web": "^2.0.0
|
|
56
|
-
"
|
|
57
|
-
"
|
|
58
|
-
"solid
|
|
59
|
-
"
|
|
60
|
-
"
|
|
68
|
+
"@solidjs/vite-plugin": "^3.0.0",
|
|
69
|
+
"@solidjs/web": "^2.0.0",
|
|
70
|
+
"@tanstack/solid-query": "6.0.0-rc.6",
|
|
71
|
+
"@types/babel__core": "^7.20.5",
|
|
72
|
+
"eslint-plugin-solid": "^0.18.1",
|
|
73
|
+
"solid-js": "^2.0.0",
|
|
74
|
+
"typescript": "6.0.3"
|
|
61
75
|
},
|
|
62
76
|
"peerDependencies": {
|
|
63
|
-
"
|
|
64
|
-
"@tanstack/solid-query": "^6.0.0-rc.
|
|
77
|
+
"@solidjs/web": "^2.0.0",
|
|
78
|
+
"@tanstack/solid-query": "^6.0.0-rc.6",
|
|
79
|
+
"solid-js": "^2.0.0"
|
|
65
80
|
},
|
|
66
81
|
"scripts": {
|
|
67
|
-
"clean": "premove ./build ./coverage ./dist-ts",
|
|
68
|
-
"compile": "tsc --
|
|
69
|
-
"test:
|
|
70
|
-
"test:types": "npm
|
|
71
|
-
"test:types:
|
|
72
|
-
"test:types:
|
|
73
|
-
"test:types:
|
|
74
|
-
"test:types:
|
|
75
|
-
"test:types:
|
|
76
|
-
"test:types:
|
|
77
|
-
"test:types:ts60": "node ../../node_modules/typescript60/lib/tsc.js --build",
|
|
82
|
+
"clean": "premove ./build ./coverage ./dist-ts ./.cache/test-types",
|
|
83
|
+
"compile": "tsc --project tsconfig.json",
|
|
84
|
+
"test:oxlint": "oxlint ./src",
|
|
85
|
+
"test:types": "npm-run-all --serial test:types:*",
|
|
86
|
+
"test:types:ts57": "node ../../node_modules/typescript57/lib/tsc.js --project tsconfig.legacy.json --outDir .cache/test-types/ts57 --tsBuildInfoFile .cache/test-types/ts57.tsbuildinfo",
|
|
87
|
+
"test:types:ts58": "node ../../node_modules/typescript58/lib/tsc.js --project tsconfig.legacy.json --outDir .cache/test-types/ts58 --tsBuildInfoFile .cache/test-types/ts58.tsbuildinfo",
|
|
88
|
+
"test:types:ts59": "node ../../node_modules/typescript59/lib/tsc.js --project tsconfig.legacy.json --outDir .cache/test-types/ts59 --tsBuildInfoFile .cache/test-types/ts59.tsbuildinfo",
|
|
89
|
+
"test:types:tscurrent": "tsc --project tsconfig.json --outDir .cache/test-types/tscurrent --tsBuildInfoFile .cache/test-types/tscurrent.tsbuildinfo",
|
|
90
|
+
"test:types:ts70": "node ../../node_modules/typescript70/lib/tsc.js --project tsconfig.legacy.json --outDir .cache/test-types/ts70 --tsBuildInfoFile .cache/test-types/ts70.tsbuildinfo",
|
|
91
|
+
"test:types:ts71": "node ../../node_modules/typescript71/lib/tsc.js --project tsconfig.legacy.json --outDir .cache/test-types/ts71 --tsBuildInfoFile .cache/test-types/ts71.tsbuildinfo",
|
|
78
92
|
"test:build": "publint --strict && attw --pack",
|
|
79
93
|
"test:lib": "vitest --retry=3",
|
|
80
94
|
"test:lib:dev": "pnpm run test:lib --watch",
|
|
81
|
-
"build": "
|
|
82
|
-
"build:dev": "
|
|
95
|
+
"build": "tsdown --tsconfig tsconfig.prod.json",
|
|
96
|
+
"build:dev": "tsdown --watch"
|
|
83
97
|
}
|
|
84
98
|
}
|
package/src/clientOnly.tsx
CHANGED
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createMemo,
|
|
3
3
|
createSignal,
|
|
4
|
+
isHydrating,
|
|
4
5
|
omit,
|
|
5
6
|
onSettled,
|
|
6
|
-
sharedConfig,
|
|
7
7
|
untrack,
|
|
8
8
|
} from 'solid-js'
|
|
9
9
|
import { isServer } from '@solidjs/web'
|
|
10
10
|
import type { Component, ComponentProps } from 'solid-js'
|
|
11
11
|
import type { JSX } from '@solidjs/web'
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
13
|
+
/**
|
|
14
|
+
* Loads the devtools only on the client, so that they bypass any server side rendering. Taken from
|
|
15
|
+
* [solid-start's codebase](https://github.com/solidjs/solid-start/blob/2967fc2db3f0df826f061020231dbdafdfa0746b/packages/start/islands/clientOnly.tsx).
|
|
16
|
+
* @param fn - Dynamically imports the module whose default export is the component.
|
|
17
|
+
* @returns A component that renders `props.fallback` on the server and until the import resolves.
|
|
18
|
+
*/
|
|
18
19
|
export default function clientOnly<T extends Component<any>>(
|
|
19
20
|
fn: () => Promise<{
|
|
20
21
|
default: T
|
|
@@ -30,8 +31,8 @@ export default function clientOnly<T extends Component<any>>(
|
|
|
30
31
|
let Comp: T | undefined
|
|
31
32
|
let m: boolean
|
|
32
33
|
const rest = omit(props, 'fallback')
|
|
33
|
-
if ((Comp = comp()) && !
|
|
34
|
-
const [mounted, setMounted] = createSignal(!
|
|
34
|
+
if ((Comp = comp()) && !isHydrating()) return Comp(rest)
|
|
35
|
+
const [mounted, setMounted] = createSignal(!isHydrating())
|
|
35
36
|
onSettled(() => {
|
|
36
37
|
setMounted(true)
|
|
37
38
|
})
|