@tanstack/solid-query-devtools 6.0.0-beta.4 → 6.0.0-beta.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/_tsup-dts-rollup.d.cts +5 -15
- package/build/_tsup-dts-rollup.d.ts +5 -15
- package/build/chunk/{OUUOFKOT.js → C73S7YTW.js} +46 -12
- package/build/chunk/{RNXRSYV2.js → KGLMGK4M.js} +46 -12
- package/build/dev.cjs +87 -53
- package/build/dev.js +3 -3
- package/build/dev.jsx +15 -7
- package/build/devtools/{R2AGYIME.jsx → 7WZM3IT7.jsx} +15 -13
- package/build/devtools/{BN3QOQGH.js → JA7A2ZGS.js} +20 -20
- package/build/devtools/{DAAYGNEN.js → N77BMJWV.js} +20 -20
- package/build/devtoolsPanel/{SQHQ34QQ.js → CMV5IMZB.js} +24 -24
- package/build/devtoolsPanel/{QZBU22C7.jsx → FQC5JHFZ.jsx} +15 -13
- package/build/devtoolsPanel/{FI3ZIJCV.js → PHKM6EE4.js} +24 -24
- package/build/index.cjs +87 -53
- package/build/index.js +3 -3
- package/build/index.jsx +15 -7
- package/package.json +9 -8
- package/src/clientOnly.tsx +2 -1
- package/src/devtools.tsx +21 -17
- package/src/devtoolsPanel.tsx +20 -16
|
@@ -3,11 +3,9 @@ import type { ComponentProps } from 'solid-js';
|
|
|
3
3
|
import type { DevtoolsButtonPosition } from '@tanstack/query-devtools';
|
|
4
4
|
import type { DevtoolsErrorType } from '@tanstack/query-devtools';
|
|
5
5
|
import type { DevtoolsPosition } from '@tanstack/query-devtools';
|
|
6
|
-
import { JSX } from '
|
|
7
|
-
import { Options } from 'tsup';
|
|
6
|
+
import { JSX } from '@solidjs/web';
|
|
8
7
|
import type { QueryClient } from '@tanstack/solid-query';
|
|
9
8
|
import type { Theme } from '@tanstack/query-devtools';
|
|
10
|
-
import { UserConfig } from 'vite';
|
|
11
9
|
|
|
12
10
|
export declare function default_alias<T extends Component<any>>(fn: () => Promise<{
|
|
13
11
|
default: T;
|
|
@@ -19,27 +17,19 @@ export declare function default_alias_1(props: DevtoolsOptions): JSX;
|
|
|
19
17
|
|
|
20
18
|
export declare function default_alias_2(props: DevtoolsPanelOptions): JSX.Element;
|
|
21
19
|
|
|
22
|
-
export declare const default_alias_3: any[];
|
|
23
|
-
|
|
24
|
-
export declare const default_alias_4: any[];
|
|
25
|
-
|
|
26
|
-
export declare const default_alias_5: Options | Options[] | ((overrideOptions: Options) => Options | Options[] | Promise<Options | Options[]>);
|
|
27
|
-
|
|
28
|
-
export declare const default_alias_6: UserConfig;
|
|
29
|
-
|
|
30
20
|
declare interface DevtoolsOptions {
|
|
31
21
|
/**
|
|
32
22
|
* Set this true if you want the dev tools to default to being open
|
|
33
23
|
*/
|
|
34
24
|
initialIsOpen?: boolean;
|
|
35
25
|
/**
|
|
36
|
-
* The position of the
|
|
37
|
-
* 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right'
|
|
26
|
+
* The position of the TanStack logo to open and close the devtools panel.
|
|
27
|
+
* 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right' | 'relative'
|
|
38
28
|
* Defaults to 'bottom-right'.
|
|
39
29
|
*/
|
|
40
30
|
buttonPosition?: DevtoolsButtonPosition;
|
|
41
31
|
/**
|
|
42
|
-
* The position of the
|
|
32
|
+
* The position of the Solid Query devtools panel.
|
|
43
33
|
* 'top' | 'bottom' | 'left' | 'right'
|
|
44
34
|
* Defaults to 'bottom'.
|
|
45
35
|
*/
|
|
@@ -98,7 +88,7 @@ declare interface DevtoolsPanelOptions {
|
|
|
98
88
|
/**
|
|
99
89
|
* Callback function that is called when the devtools panel is closed
|
|
100
90
|
*/
|
|
101
|
-
onClose?: () =>
|
|
91
|
+
onClose?: () => void;
|
|
102
92
|
/**
|
|
103
93
|
* Set this to true to hide disabled queries from the devtools panel.
|
|
104
94
|
*/
|
|
@@ -3,11 +3,9 @@ import type { ComponentProps } from 'solid-js';
|
|
|
3
3
|
import type { DevtoolsButtonPosition } from '@tanstack/query-devtools';
|
|
4
4
|
import type { DevtoolsErrorType } from '@tanstack/query-devtools';
|
|
5
5
|
import type { DevtoolsPosition } from '@tanstack/query-devtools';
|
|
6
|
-
import { JSX } from '
|
|
7
|
-
import { Options } from 'tsup';
|
|
6
|
+
import { JSX } from '@solidjs/web';
|
|
8
7
|
import type { QueryClient } from '@tanstack/solid-query';
|
|
9
8
|
import type { Theme } from '@tanstack/query-devtools';
|
|
10
|
-
import { UserConfig } from 'vite';
|
|
11
9
|
|
|
12
10
|
export declare function default_alias<T extends Component<any>>(fn: () => Promise<{
|
|
13
11
|
default: T;
|
|
@@ -19,27 +17,19 @@ export declare function default_alias_1(props: DevtoolsOptions): JSX;
|
|
|
19
17
|
|
|
20
18
|
export declare function default_alias_2(props: DevtoolsPanelOptions): JSX.Element;
|
|
21
19
|
|
|
22
|
-
export declare const default_alias_3: any[];
|
|
23
|
-
|
|
24
|
-
export declare const default_alias_4: any[];
|
|
25
|
-
|
|
26
|
-
export declare const default_alias_5: Options | Options[] | ((overrideOptions: Options) => Options | Options[] | Promise<Options | Options[]>);
|
|
27
|
-
|
|
28
|
-
export declare const default_alias_6: UserConfig;
|
|
29
|
-
|
|
30
20
|
declare interface DevtoolsOptions {
|
|
31
21
|
/**
|
|
32
22
|
* Set this true if you want the dev tools to default to being open
|
|
33
23
|
*/
|
|
34
24
|
initialIsOpen?: boolean;
|
|
35
25
|
/**
|
|
36
|
-
* The position of the
|
|
37
|
-
* 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right'
|
|
26
|
+
* The position of the TanStack logo to open and close the devtools panel.
|
|
27
|
+
* 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right' | 'relative'
|
|
38
28
|
* Defaults to 'bottom-right'.
|
|
39
29
|
*/
|
|
40
30
|
buttonPosition?: DevtoolsButtonPosition;
|
|
41
31
|
/**
|
|
42
|
-
* The position of the
|
|
32
|
+
* The position of the Solid Query devtools panel.
|
|
43
33
|
* 'top' | 'bottom' | 'left' | 'right'
|
|
44
34
|
* Defaults to 'bottom'.
|
|
45
35
|
*/
|
|
@@ -98,7 +88,7 @@ declare interface DevtoolsPanelOptions {
|
|
|
98
88
|
/**
|
|
99
89
|
* Callback function that is called when the devtools panel is closed
|
|
100
90
|
*/
|
|
101
|
-
onClose?: () =>
|
|
91
|
+
onClose?: () => void;
|
|
102
92
|
/**
|
|
103
93
|
* Set this to true to hide disabled queries from the devtools panel.
|
|
104
94
|
*/
|
|
@@ -1,9 +1,15 @@
|
|
|
1
1
|
import { createRenderEffect, untrack, runWithOwner, sharedConfig } from 'solid-js';
|
|
2
2
|
|
|
3
|
-
// ../../node_modules/.pnpm/@solidjs+web@2.0.0-beta.
|
|
4
|
-
var
|
|
5
|
-
transparent: true
|
|
6
|
-
|
|
3
|
+
// ../../node_modules/.pnpm/@solidjs+web@2.0.0-beta.21_solid-js@2.0.0-beta.21/node_modules/@solidjs/web/dist/dev.js
|
|
4
|
+
var transparentOptions = {
|
|
5
|
+
transparent: true,
|
|
6
|
+
sync: true
|
|
7
|
+
};
|
|
8
|
+
var effect = (fn, effectFn, options) => createRenderEffect(fn, effectFn, options ? {
|
|
9
|
+
sync: true,
|
|
10
|
+
...options,
|
|
11
|
+
transparent: !options.scope
|
|
12
|
+
} : transparentOptions);
|
|
7
13
|
function create(html, bypassGuard, flag) {
|
|
8
14
|
if (isHydrating() && !bypassGuard) throw new Error("Failed attempt to create new DOM elements during hydration. Check that the libraries you are using support hydration.");
|
|
9
15
|
const t = document.createElement("template");
|
|
@@ -22,21 +28,41 @@ function setAttribute(node, name, value) {
|
|
|
22
28
|
}
|
|
23
29
|
function style(node, value, prev) {
|
|
24
30
|
if (!value) {
|
|
25
|
-
if (prev
|
|
31
|
+
if (prev || node._$styles) {
|
|
32
|
+
setAttribute(node, "style");
|
|
33
|
+
node._$styles = void 0;
|
|
34
|
+
}
|
|
26
35
|
return;
|
|
27
36
|
}
|
|
28
37
|
const nodeStyle = node.style;
|
|
29
|
-
if (typeof value === "string")
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
38
|
+
if (typeof value === "string") {
|
|
39
|
+
node._$styles = void 0;
|
|
40
|
+
return nodeStyle.cssText = value;
|
|
41
|
+
}
|
|
42
|
+
if (typeof prev === "string") {
|
|
43
|
+
nodeStyle.cssText = "";
|
|
44
|
+
prev = void 0;
|
|
45
|
+
}
|
|
46
|
+
let applied = node._$styles;
|
|
47
|
+
if (!applied) {
|
|
48
|
+
applied = node._$styles = prev ? {
|
|
49
|
+
...prev
|
|
50
|
+
} : {};
|
|
51
|
+
}
|
|
33
52
|
let v, s;
|
|
53
|
+
for (s in applied) {
|
|
54
|
+
if (value[s] == null) {
|
|
55
|
+
nodeStyle.removeProperty(s);
|
|
56
|
+
delete applied[s];
|
|
57
|
+
}
|
|
58
|
+
}
|
|
34
59
|
for (s in value) {
|
|
35
60
|
v = value[s];
|
|
36
|
-
if (v !==
|
|
37
|
-
|
|
61
|
+
if (v != null && v !== applied[s]) {
|
|
62
|
+
nodeStyle.setProperty(s, v);
|
|
63
|
+
applied[s] = v;
|
|
64
|
+
}
|
|
38
65
|
}
|
|
39
|
-
for (s in prev) value[s] == null && nodeStyle.removeProperty(s);
|
|
40
66
|
}
|
|
41
67
|
function applyRef(r, element) {
|
|
42
68
|
Array.isArray(r) ? r.flat(Infinity).forEach((f) => f && f(element)) : r(element);
|
|
@@ -48,6 +74,14 @@ function ref(fn, element) {
|
|
|
48
74
|
function isHydrating(node) {
|
|
49
75
|
return sharedConfig.hydrating && (!node || node.isConnected);
|
|
50
76
|
}
|
|
77
|
+
var ENVELOPE = /* @__PURE__ */ Symbol.for("solid.ResponseEnvelope");
|
|
78
|
+
var ResponseEnvelope = class {
|
|
79
|
+
constructor(response, value) {
|
|
80
|
+
this.response = response;
|
|
81
|
+
this.value = value;
|
|
82
|
+
}
|
|
83
|
+
};
|
|
84
|
+
ResponseEnvelope.prototype[ENVELOPE] = true;
|
|
51
85
|
var isServer = false;
|
|
52
86
|
var isDev = true;
|
|
53
87
|
|
|
@@ -1,9 +1,15 @@
|
|
|
1
1
|
import { createRenderEffect, untrack, runWithOwner, sharedConfig } from 'solid-js';
|
|
2
2
|
|
|
3
|
-
// ../../node_modules/.pnpm/@solidjs+web@2.0.0-beta.
|
|
4
|
-
var
|
|
5
|
-
transparent: true
|
|
6
|
-
|
|
3
|
+
// ../../node_modules/.pnpm/@solidjs+web@2.0.0-beta.21_solid-js@2.0.0-beta.21/node_modules/@solidjs/web/dist/web.js
|
|
4
|
+
var transparentOptions = {
|
|
5
|
+
transparent: true,
|
|
6
|
+
sync: true
|
|
7
|
+
};
|
|
8
|
+
var effect = (fn, effectFn, options) => createRenderEffect(fn, effectFn, options ? {
|
|
9
|
+
sync: true,
|
|
10
|
+
...options,
|
|
11
|
+
transparent: !options.scope
|
|
12
|
+
} : transparentOptions);
|
|
7
13
|
function create(html, bypassGuard, flag) {
|
|
8
14
|
const t = document.createElement("template");
|
|
9
15
|
t.innerHTML = html;
|
|
@@ -20,21 +26,41 @@ function setAttribute(node, name, value) {
|
|
|
20
26
|
}
|
|
21
27
|
function style(node, value, prev) {
|
|
22
28
|
if (!value) {
|
|
23
|
-
if (prev
|
|
29
|
+
if (prev || node._$styles) {
|
|
30
|
+
setAttribute(node, "style");
|
|
31
|
+
node._$styles = void 0;
|
|
32
|
+
}
|
|
24
33
|
return;
|
|
25
34
|
}
|
|
26
35
|
const nodeStyle = node.style;
|
|
27
|
-
if (typeof value === "string")
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
36
|
+
if (typeof value === "string") {
|
|
37
|
+
node._$styles = void 0;
|
|
38
|
+
return nodeStyle.cssText = value;
|
|
39
|
+
}
|
|
40
|
+
if (typeof prev === "string") {
|
|
41
|
+
nodeStyle.cssText = "";
|
|
42
|
+
prev = void 0;
|
|
43
|
+
}
|
|
44
|
+
let applied = node._$styles;
|
|
45
|
+
if (!applied) {
|
|
46
|
+
applied = node._$styles = prev ? {
|
|
47
|
+
...prev
|
|
48
|
+
} : {};
|
|
49
|
+
}
|
|
31
50
|
let v, s;
|
|
51
|
+
for (s in applied) {
|
|
52
|
+
if (value[s] == null) {
|
|
53
|
+
nodeStyle.removeProperty(s);
|
|
54
|
+
delete applied[s];
|
|
55
|
+
}
|
|
56
|
+
}
|
|
32
57
|
for (s in value) {
|
|
33
58
|
v = value[s];
|
|
34
|
-
if (v !==
|
|
35
|
-
|
|
59
|
+
if (v != null && v !== applied[s]) {
|
|
60
|
+
nodeStyle.setProperty(s, v);
|
|
61
|
+
applied[s] = v;
|
|
62
|
+
}
|
|
36
63
|
}
|
|
37
|
-
for (s in prev) value[s] == null && nodeStyle.removeProperty(s);
|
|
38
64
|
}
|
|
39
65
|
function applyRef(r, element) {
|
|
40
66
|
Array.isArray(r) ? r.flat(Infinity).forEach((f) => f && f(element)) : r(element);
|
|
@@ -46,6 +72,14 @@ function ref(fn, element) {
|
|
|
46
72
|
function isHydrating(node) {
|
|
47
73
|
return sharedConfig.hydrating && (!node || node.isConnected);
|
|
48
74
|
}
|
|
75
|
+
var ENVELOPE = /* @__PURE__ */ Symbol.for("solid.ResponseEnvelope");
|
|
76
|
+
var ResponseEnvelope = class {
|
|
77
|
+
constructor(response, value) {
|
|
78
|
+
this.response = response;
|
|
79
|
+
this.value = value;
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
ResponseEnvelope.prototype[ENVELOPE] = true;
|
|
49
83
|
var isServer = false;
|
|
50
84
|
var isDev = false;
|
|
51
85
|
|
package/build/dev.cjs
CHANGED
|
@@ -31,21 +31,41 @@ function setAttribute(node, name, value) {
|
|
|
31
31
|
}
|
|
32
32
|
function style(node, value, prev) {
|
|
33
33
|
if (!value) {
|
|
34
|
-
if (prev
|
|
34
|
+
if (prev || node._$styles) {
|
|
35
|
+
setAttribute(node, "style");
|
|
36
|
+
node._$styles = void 0;
|
|
37
|
+
}
|
|
35
38
|
return;
|
|
36
39
|
}
|
|
37
40
|
const nodeStyle = node.style;
|
|
38
|
-
if (typeof value === "string")
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
41
|
+
if (typeof value === "string") {
|
|
42
|
+
node._$styles = void 0;
|
|
43
|
+
return nodeStyle.cssText = value;
|
|
44
|
+
}
|
|
45
|
+
if (typeof prev === "string") {
|
|
46
|
+
nodeStyle.cssText = "";
|
|
47
|
+
prev = void 0;
|
|
48
|
+
}
|
|
49
|
+
let applied = node._$styles;
|
|
50
|
+
if (!applied) {
|
|
51
|
+
applied = node._$styles = prev ? {
|
|
52
|
+
...prev
|
|
53
|
+
} : {};
|
|
54
|
+
}
|
|
42
55
|
let v, s;
|
|
56
|
+
for (s in applied) {
|
|
57
|
+
if (value[s] == null) {
|
|
58
|
+
nodeStyle.removeProperty(s);
|
|
59
|
+
delete applied[s];
|
|
60
|
+
}
|
|
61
|
+
}
|
|
43
62
|
for (s in value) {
|
|
44
63
|
v = value[s];
|
|
45
|
-
if (v !==
|
|
46
|
-
|
|
64
|
+
if (v != null && v !== applied[s]) {
|
|
65
|
+
nodeStyle.setProperty(s, v);
|
|
66
|
+
applied[s] = v;
|
|
67
|
+
}
|
|
47
68
|
}
|
|
48
|
-
for (s in prev) value[s] == null && nodeStyle.removeProperty(s);
|
|
49
69
|
}
|
|
50
70
|
function applyRef(r, element) {
|
|
51
71
|
Array.isArray(r) ? r.flat(Infinity).forEach((f) => f && f(element)) : r(element);
|
|
@@ -57,12 +77,26 @@ function ref(fn, element) {
|
|
|
57
77
|
function isHydrating(node) {
|
|
58
78
|
return solidJs.sharedConfig.hydrating && (!node || node.isConnected);
|
|
59
79
|
}
|
|
60
|
-
var effect, isServer, isDev;
|
|
80
|
+
var transparentOptions, effect, ENVELOPE, ResponseEnvelope, isServer, isDev;
|
|
61
81
|
var init_dev = __esm({
|
|
62
|
-
"../../node_modules/.pnpm/@solidjs+web@2.0.0-beta.
|
|
63
|
-
|
|
64
|
-
transparent: true
|
|
65
|
-
|
|
82
|
+
"../../node_modules/.pnpm/@solidjs+web@2.0.0-beta.21_solid-js@2.0.0-beta.21/node_modules/@solidjs/web/dist/dev.js"() {
|
|
83
|
+
transparentOptions = {
|
|
84
|
+
transparent: true,
|
|
85
|
+
sync: true
|
|
86
|
+
};
|
|
87
|
+
effect = (fn, effectFn, options) => solidJs.createRenderEffect(fn, effectFn, options ? {
|
|
88
|
+
sync: true,
|
|
89
|
+
...options,
|
|
90
|
+
transparent: !options.scope
|
|
91
|
+
} : transparentOptions);
|
|
92
|
+
ENVELOPE = /* @__PURE__ */ Symbol.for("solid.ResponseEnvelope");
|
|
93
|
+
ResponseEnvelope = class {
|
|
94
|
+
constructor(response, value) {
|
|
95
|
+
this.response = response;
|
|
96
|
+
this.value = value;
|
|
97
|
+
}
|
|
98
|
+
};
|
|
99
|
+
ResponseEnvelope.prototype[ENVELOPE] = true;
|
|
66
100
|
isServer = false;
|
|
67
101
|
isDev = true;
|
|
68
102
|
}
|
|
@@ -113,25 +147,25 @@ function SolidQueryDevtools(props) {
|
|
|
113
147
|
solidJs.createEffect(() => props.theme, (theme) => {
|
|
114
148
|
devtools.setTheme(theme || "system");
|
|
115
149
|
});
|
|
116
|
-
let
|
|
117
|
-
let
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
150
|
+
let mounted = false;
|
|
151
|
+
let disposed = false;
|
|
152
|
+
solidJs.onSettled(() => {
|
|
153
|
+
queueMicrotask(() => {
|
|
154
|
+
if (disposed) return;
|
|
155
|
+
solidJs.runWithOwner(null, () => devtools.mount(ref2));
|
|
156
|
+
mounted = true;
|
|
157
|
+
});
|
|
158
|
+
return () => {
|
|
159
|
+
disposed = true;
|
|
160
|
+
if (mounted) {
|
|
161
|
+
devtools.unmount();
|
|
162
|
+
}
|
|
163
|
+
};
|
|
128
164
|
});
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
return _el$;
|
|
134
|
-
})();
|
|
165
|
+
var _el$ = _tmpl$();
|
|
166
|
+
var _ref$ = ref2;
|
|
167
|
+
typeof _ref$ === "function" || Array.isArray(_ref$) ? ref(() => _ref$, _el$) : ref2 = _el$;
|
|
168
|
+
return _el$;
|
|
135
169
|
}
|
|
136
170
|
var _tmpl$;
|
|
137
171
|
var init_devtools = __esm({
|
|
@@ -185,30 +219,30 @@ function SolidQueryDevtoolsPanel(props) {
|
|
|
185
219
|
solidJs.createEffect(() => props.theme, (theme) => {
|
|
186
220
|
devtools.setTheme(theme || "system");
|
|
187
221
|
});
|
|
188
|
-
let
|
|
189
|
-
let
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
222
|
+
let mounted = false;
|
|
223
|
+
let disposed = false;
|
|
224
|
+
solidJs.onSettled(() => {
|
|
225
|
+
queueMicrotask(() => {
|
|
226
|
+
if (disposed) return;
|
|
227
|
+
solidJs.runWithOwner(null, () => devtools.mount(ref2));
|
|
228
|
+
mounted = true;
|
|
229
|
+
});
|
|
230
|
+
return () => {
|
|
231
|
+
disposed = true;
|
|
232
|
+
if (mounted) {
|
|
233
|
+
devtools.unmount();
|
|
234
|
+
}
|
|
235
|
+
};
|
|
194
236
|
});
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
237
|
+
var _el$ = _tmpl$2();
|
|
238
|
+
var _ref$ = ref2;
|
|
239
|
+
typeof _ref$ === "function" || Array.isArray(_ref$) ? ref(() => _ref$, _el$) : ref2 = _el$;
|
|
240
|
+
effect(() => ({
|
|
241
|
+
...props.style
|
|
242
|
+
}), (_v$, _$p) => {
|
|
243
|
+
style(_el$, _v$, _$p);
|
|
200
244
|
});
|
|
201
|
-
return
|
|
202
|
-
var _el$ = _tmpl$2();
|
|
203
|
-
var _ref$ = ref2;
|
|
204
|
-
typeof _ref$ === "function" || Array.isArray(_ref$) ? ref(() => _ref$, _el$) : ref2 = _el$;
|
|
205
|
-
effect(() => ({
|
|
206
|
-
...props.style
|
|
207
|
-
}), (_v$, _$p) => {
|
|
208
|
-
style(_el$, _v$, _$p);
|
|
209
|
-
});
|
|
210
|
-
return _el$;
|
|
211
|
-
})();
|
|
245
|
+
return _el$;
|
|
212
246
|
}
|
|
213
247
|
var _tmpl$2;
|
|
214
248
|
var init_devtoolsPanel = __esm({
|
package/build/dev.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { isDev, isServer } from './chunk/
|
|
1
|
+
import { isDev, isServer } from './chunk/C73S7YTW.js';
|
|
2
2
|
import { createSignal, omit, sharedConfig, onSettled, createMemo, untrack } from 'solid-js';
|
|
3
3
|
|
|
4
4
|
function clientOnly(fn) {
|
|
@@ -19,10 +19,10 @@ function clientOnly(fn) {
|
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
// src/index.tsx
|
|
22
|
-
var SolidQueryDevtools = isDev ? clientOnly(() => import('./devtools/
|
|
22
|
+
var SolidQueryDevtools = isDev ? clientOnly(() => import('./devtools/JA7A2ZGS.js')) : function() {
|
|
23
23
|
return null;
|
|
24
24
|
};
|
|
25
|
-
var SolidQueryDevtoolsPanel = isDev ? clientOnly(() => import('./devtoolsPanel/
|
|
25
|
+
var SolidQueryDevtoolsPanel = isDev ? clientOnly(() => import('./devtoolsPanel/CMV5IMZB.js')) : function() {
|
|
26
26
|
return null;
|
|
27
27
|
};
|
|
28
28
|
|
package/build/dev.jsx
CHANGED
|
@@ -1,12 +1,20 @@
|
|
|
1
|
-
// ../../node_modules/.pnpm/@solidjs+web@2.0.0-beta.
|
|
2
|
-
import { createRenderEffect, createMemo
|
|
3
|
-
import { Errored, For, Hydration, Loading, Match, NoHydration, Repeat, Reveal, Show, Switch, createComponent, getOwner
|
|
1
|
+
// ../../node_modules/.pnpm/@solidjs+web@2.0.0-beta.21_solid-js@2.0.0-beta.21/node_modules/@solidjs/web/dist/dev.js
|
|
2
|
+
import { createRenderEffect, createMemo, sharedConfig, untrack, runWithOwner, flatten, createRoot, merge, createComponent, omit, createOwner, $DEVCOMP, enableHydration, enforceLoadingBoundary, flush, getOwner, createEffect } from "solid-js";
|
|
3
|
+
import { Errored, For, Hydration, Loading, Match, NoHydration, Repeat, Reveal, Show, Switch, createComponent as createComponent2, getOwner as getOwner2, untrack as untrack2 } from "solid-js";
|
|
4
|
+
var ENVELOPE = /* @__PURE__ */ Symbol.for("solid.ResponseEnvelope");
|
|
5
|
+
var ResponseEnvelope = class {
|
|
6
|
+
constructor(response, value) {
|
|
7
|
+
this.response = response;
|
|
8
|
+
this.value = value;
|
|
9
|
+
}
|
|
10
|
+
};
|
|
11
|
+
ResponseEnvelope.prototype[ENVELOPE] = true;
|
|
4
12
|
var isServer = false;
|
|
5
13
|
var isDev = true;
|
|
6
14
|
|
|
7
15
|
// src/clientOnly.tsx
|
|
8
16
|
import {
|
|
9
|
-
createMemo,
|
|
17
|
+
createMemo as createMemo2,
|
|
10
18
|
createSignal,
|
|
11
19
|
omit as omit2,
|
|
12
20
|
onSettled,
|
|
@@ -27,17 +35,17 @@ function clientOnly(fn) {
|
|
|
27
35
|
onSettled(() => {
|
|
28
36
|
setMounted(true);
|
|
29
37
|
});
|
|
30
|
-
return
|
|
38
|
+
return createMemo2(
|
|
31
39
|
() => (Comp = comp(), m = mounted(), untrack3(() => Comp && m ? Comp(rest) : props.fallback))
|
|
32
40
|
);
|
|
33
41
|
};
|
|
34
42
|
}
|
|
35
43
|
|
|
36
44
|
// src/index.tsx
|
|
37
|
-
var SolidQueryDevtools = isDev ? clientOnly(() => import("./devtools/
|
|
45
|
+
var SolidQueryDevtools = isDev ? clientOnly(() => import("./devtools/7WZM3IT7.jsx")) : function() {
|
|
38
46
|
return null;
|
|
39
47
|
};
|
|
40
|
-
var SolidQueryDevtoolsPanel = isDev ? clientOnly(() => import("./devtoolsPanel/
|
|
48
|
+
var SolidQueryDevtoolsPanel = isDev ? clientOnly(() => import("./devtoolsPanel/FQC5JHFZ.jsx")) : function() {
|
|
41
49
|
return null;
|
|
42
50
|
};
|
|
43
51
|
export {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// src/devtools.tsx
|
|
2
|
-
import { createEffect, createMemo,
|
|
2
|
+
import { createEffect, createMemo, onSettled, runWithOwner } from "solid-js";
|
|
3
3
|
import { onlineManager, useQueryClient } from "@tanstack/solid-query";
|
|
4
4
|
import { TanstackQueryDevtools } from "@tanstack/query-devtools";
|
|
5
5
|
function SolidQueryDevtools(props) {
|
|
@@ -60,18 +60,20 @@ function SolidQueryDevtools(props) {
|
|
|
60
60
|
devtools.setTheme(theme || "system");
|
|
61
61
|
}
|
|
62
62
|
);
|
|
63
|
-
let
|
|
64
|
-
let
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
63
|
+
let mounted = false;
|
|
64
|
+
let disposed = false;
|
|
65
|
+
onSettled(() => {
|
|
66
|
+
queueMicrotask(() => {
|
|
67
|
+
if (disposed) return;
|
|
68
|
+
runWithOwner(null, () => devtools.mount(ref));
|
|
69
|
+
mounted = true;
|
|
70
|
+
});
|
|
71
|
+
return () => {
|
|
72
|
+
disposed = true;
|
|
73
|
+
if (mounted) {
|
|
74
|
+
devtools.unmount();
|
|
75
|
+
}
|
|
76
|
+
};
|
|
75
77
|
});
|
|
76
78
|
return <div class="tsqd-parent-container" ref={ref} />;
|
|
77
79
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ref, template } from '../chunk/
|
|
2
|
-
import { createMemo, createEffect,
|
|
1
|
+
import { ref, template } from '../chunk/C73S7YTW.js';
|
|
2
|
+
import { createMemo, createEffect, onSettled, runWithOwner } from 'solid-js';
|
|
3
3
|
import { useQueryClient, onlineManager } from '@tanstack/solid-query';
|
|
4
4
|
import { TanstackQueryDevtools } from '@tanstack/query-devtools';
|
|
5
5
|
|
|
@@ -44,25 +44,25 @@ function SolidQueryDevtools(props) {
|
|
|
44
44
|
createEffect(() => props.theme, (theme) => {
|
|
45
45
|
devtools.setTheme(theme || "system");
|
|
46
46
|
});
|
|
47
|
-
let
|
|
48
|
-
let
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
47
|
+
let mounted = false;
|
|
48
|
+
let disposed = false;
|
|
49
|
+
onSettled(() => {
|
|
50
|
+
queueMicrotask(() => {
|
|
51
|
+
if (disposed) return;
|
|
52
|
+
runWithOwner(null, () => devtools.mount(ref2));
|
|
53
|
+
mounted = true;
|
|
54
|
+
});
|
|
55
|
+
return () => {
|
|
56
|
+
disposed = true;
|
|
57
|
+
if (mounted) {
|
|
58
|
+
devtools.unmount();
|
|
59
|
+
}
|
|
60
|
+
};
|
|
53
61
|
});
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
}
|
|
59
|
-
});
|
|
60
|
-
return (() => {
|
|
61
|
-
var _el$ = _tmpl$();
|
|
62
|
-
var _ref$ = ref2;
|
|
63
|
-
typeof _ref$ === "function" || Array.isArray(_ref$) ? ref(() => _ref$, _el$) : ref2 = _el$;
|
|
64
|
-
return _el$;
|
|
65
|
-
})();
|
|
62
|
+
var _el$ = _tmpl$();
|
|
63
|
+
var _ref$ = ref2;
|
|
64
|
+
typeof _ref$ === "function" || Array.isArray(_ref$) ? ref(() => _ref$, _el$) : ref2 = _el$;
|
|
65
|
+
return _el$;
|
|
66
66
|
}
|
|
67
67
|
|
|
68
68
|
export { SolidQueryDevtools as default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ref, template } from '../chunk/
|
|
2
|
-
import { createMemo, createEffect,
|
|
1
|
+
import { ref, template } from '../chunk/KGLMGK4M.js';
|
|
2
|
+
import { createMemo, createEffect, onSettled, runWithOwner } from 'solid-js';
|
|
3
3
|
import { useQueryClient, onlineManager } from '@tanstack/solid-query';
|
|
4
4
|
import { TanstackQueryDevtools } from '@tanstack/query-devtools';
|
|
5
5
|
|
|
@@ -44,25 +44,25 @@ function SolidQueryDevtools(props) {
|
|
|
44
44
|
createEffect(() => props.theme, (theme) => {
|
|
45
45
|
devtools.setTheme(theme || "system");
|
|
46
46
|
});
|
|
47
|
-
let
|
|
48
|
-
let
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
47
|
+
let mounted = false;
|
|
48
|
+
let disposed = false;
|
|
49
|
+
onSettled(() => {
|
|
50
|
+
queueMicrotask(() => {
|
|
51
|
+
if (disposed) return;
|
|
52
|
+
runWithOwner(null, () => devtools.mount(ref2));
|
|
53
|
+
mounted = true;
|
|
54
|
+
});
|
|
55
|
+
return () => {
|
|
56
|
+
disposed = true;
|
|
57
|
+
if (mounted) {
|
|
58
|
+
devtools.unmount();
|
|
59
|
+
}
|
|
60
|
+
};
|
|
53
61
|
});
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
}
|
|
59
|
-
});
|
|
60
|
-
return (() => {
|
|
61
|
-
var _el$ = _tmpl$();
|
|
62
|
-
var _ref$ = ref2;
|
|
63
|
-
typeof _ref$ === "function" || Array.isArray(_ref$) ? ref(() => _ref$, _el$) : ref2 = _el$;
|
|
64
|
-
return _el$;
|
|
65
|
-
})();
|
|
62
|
+
var _el$ = _tmpl$();
|
|
63
|
+
var _ref$ = ref2;
|
|
64
|
+
typeof _ref$ === "function" || Array.isArray(_ref$) ? ref(() => _ref$, _el$) : ref2 = _el$;
|
|
65
|
+
return _el$;
|
|
66
66
|
}
|
|
67
67
|
|
|
68
68
|
export { SolidQueryDevtools as default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ref, effect, style, template } from '../chunk/
|
|
2
|
-
import { createMemo, createEffect,
|
|
1
|
+
import { ref, effect, style, template } from '../chunk/C73S7YTW.js';
|
|
2
|
+
import { createMemo, createEffect, onSettled, runWithOwner } from 'solid-js';
|
|
3
3
|
import { useQueryClient, onlineManager } from '@tanstack/solid-query';
|
|
4
4
|
import { TanstackQueryDevtoolsPanel } from '@tanstack/query-devtools';
|
|
5
5
|
|
|
@@ -42,30 +42,30 @@ function SolidQueryDevtoolsPanel(props) {
|
|
|
42
42
|
createEffect(() => props.theme, (theme) => {
|
|
43
43
|
devtools.setTheme(theme || "system");
|
|
44
44
|
});
|
|
45
|
-
let
|
|
46
|
-
let
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
45
|
+
let mounted = false;
|
|
46
|
+
let disposed = false;
|
|
47
|
+
onSettled(() => {
|
|
48
|
+
queueMicrotask(() => {
|
|
49
|
+
if (disposed) return;
|
|
50
|
+
runWithOwner(null, () => devtools.mount(ref2));
|
|
51
|
+
mounted = true;
|
|
52
|
+
});
|
|
53
|
+
return () => {
|
|
54
|
+
disposed = true;
|
|
55
|
+
if (mounted) {
|
|
56
|
+
devtools.unmount();
|
|
57
|
+
}
|
|
58
|
+
};
|
|
51
59
|
});
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
60
|
+
var _el$ = _tmpl$();
|
|
61
|
+
var _ref$ = ref2;
|
|
62
|
+
typeof _ref$ === "function" || Array.isArray(_ref$) ? ref(() => _ref$, _el$) : ref2 = _el$;
|
|
63
|
+
effect(() => ({
|
|
64
|
+
...props.style
|
|
65
|
+
}), (_v$, _$p) => {
|
|
66
|
+
style(_el$, _v$, _$p);
|
|
57
67
|
});
|
|
58
|
-
return
|
|
59
|
-
var _el$ = _tmpl$();
|
|
60
|
-
var _ref$ = ref2;
|
|
61
|
-
typeof _ref$ === "function" || Array.isArray(_ref$) ? ref(() => _ref$, _el$) : ref2 = _el$;
|
|
62
|
-
effect(() => ({
|
|
63
|
-
...props.style
|
|
64
|
-
}), (_v$, _$p) => {
|
|
65
|
-
style(_el$, _v$, _$p);
|
|
66
|
-
});
|
|
67
|
-
return _el$;
|
|
68
|
-
})();
|
|
68
|
+
return _el$;
|
|
69
69
|
}
|
|
70
70
|
|
|
71
71
|
export { SolidQueryDevtoolsPanel as default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// src/devtoolsPanel.tsx
|
|
2
|
-
import { createEffect, createMemo,
|
|
2
|
+
import { createEffect, createMemo, onSettled, runWithOwner } from "solid-js";
|
|
3
3
|
import { onlineManager, useQueryClient } from "@tanstack/solid-query";
|
|
4
4
|
import { TanstackQueryDevtoolsPanel } from "@tanstack/query-devtools";
|
|
5
5
|
function SolidQueryDevtoolsPanel(props) {
|
|
@@ -47,18 +47,20 @@ function SolidQueryDevtoolsPanel(props) {
|
|
|
47
47
|
devtools.setTheme(theme || "system");
|
|
48
48
|
}
|
|
49
49
|
);
|
|
50
|
-
let
|
|
51
|
-
let
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
50
|
+
let mounted = false;
|
|
51
|
+
let disposed = false;
|
|
52
|
+
onSettled(() => {
|
|
53
|
+
queueMicrotask(() => {
|
|
54
|
+
if (disposed) return;
|
|
55
|
+
runWithOwner(null, () => devtools.mount(ref));
|
|
56
|
+
mounted = true;
|
|
57
|
+
});
|
|
58
|
+
return () => {
|
|
59
|
+
disposed = true;
|
|
60
|
+
if (mounted) {
|
|
61
|
+
devtools.unmount();
|
|
62
|
+
}
|
|
63
|
+
};
|
|
62
64
|
});
|
|
63
65
|
return <div
|
|
64
66
|
style={{ height: "500px", ...props.style }}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ref, effect, style, template } from '../chunk/
|
|
2
|
-
import { createMemo, createEffect,
|
|
1
|
+
import { ref, effect, style, template } from '../chunk/KGLMGK4M.js';
|
|
2
|
+
import { createMemo, createEffect, onSettled, runWithOwner } from 'solid-js';
|
|
3
3
|
import { useQueryClient, onlineManager } from '@tanstack/solid-query';
|
|
4
4
|
import { TanstackQueryDevtoolsPanel } from '@tanstack/query-devtools';
|
|
5
5
|
|
|
@@ -42,30 +42,30 @@ function SolidQueryDevtoolsPanel(props) {
|
|
|
42
42
|
createEffect(() => props.theme, (theme) => {
|
|
43
43
|
devtools.setTheme(theme || "system");
|
|
44
44
|
});
|
|
45
|
-
let
|
|
46
|
-
let
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
45
|
+
let mounted = false;
|
|
46
|
+
let disposed = false;
|
|
47
|
+
onSettled(() => {
|
|
48
|
+
queueMicrotask(() => {
|
|
49
|
+
if (disposed) return;
|
|
50
|
+
runWithOwner(null, () => devtools.mount(ref2));
|
|
51
|
+
mounted = true;
|
|
52
|
+
});
|
|
53
|
+
return () => {
|
|
54
|
+
disposed = true;
|
|
55
|
+
if (mounted) {
|
|
56
|
+
devtools.unmount();
|
|
57
|
+
}
|
|
58
|
+
};
|
|
51
59
|
});
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
60
|
+
var _el$ = _tmpl$();
|
|
61
|
+
var _ref$ = ref2;
|
|
62
|
+
typeof _ref$ === "function" || Array.isArray(_ref$) ? ref(() => _ref$, _el$) : ref2 = _el$;
|
|
63
|
+
effect(() => ({
|
|
64
|
+
...props.style
|
|
65
|
+
}), (_v$, _$p) => {
|
|
66
|
+
style(_el$, _v$, _$p);
|
|
57
67
|
});
|
|
58
|
-
return
|
|
59
|
-
var _el$ = _tmpl$();
|
|
60
|
-
var _ref$ = ref2;
|
|
61
|
-
typeof _ref$ === "function" || Array.isArray(_ref$) ? ref(() => _ref$, _el$) : ref2 = _el$;
|
|
62
|
-
effect(() => ({
|
|
63
|
-
...props.style
|
|
64
|
-
}), (_v$, _$p) => {
|
|
65
|
-
style(_el$, _v$, _$p);
|
|
66
|
-
});
|
|
67
|
-
return _el$;
|
|
68
|
-
})();
|
|
68
|
+
return _el$;
|
|
69
69
|
}
|
|
70
70
|
|
|
71
71
|
export { SolidQueryDevtoolsPanel as default };
|
package/build/index.cjs
CHANGED
|
@@ -29,21 +29,41 @@ function setAttribute(node, name, value) {
|
|
|
29
29
|
}
|
|
30
30
|
function style(node, value, prev) {
|
|
31
31
|
if (!value) {
|
|
32
|
-
if (prev
|
|
32
|
+
if (prev || node._$styles) {
|
|
33
|
+
setAttribute(node, "style");
|
|
34
|
+
node._$styles = void 0;
|
|
35
|
+
}
|
|
33
36
|
return;
|
|
34
37
|
}
|
|
35
38
|
const nodeStyle = node.style;
|
|
36
|
-
if (typeof value === "string")
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
39
|
+
if (typeof value === "string") {
|
|
40
|
+
node._$styles = void 0;
|
|
41
|
+
return nodeStyle.cssText = value;
|
|
42
|
+
}
|
|
43
|
+
if (typeof prev === "string") {
|
|
44
|
+
nodeStyle.cssText = "";
|
|
45
|
+
prev = void 0;
|
|
46
|
+
}
|
|
47
|
+
let applied = node._$styles;
|
|
48
|
+
if (!applied) {
|
|
49
|
+
applied = node._$styles = prev ? {
|
|
50
|
+
...prev
|
|
51
|
+
} : {};
|
|
52
|
+
}
|
|
40
53
|
let v, s;
|
|
54
|
+
for (s in applied) {
|
|
55
|
+
if (value[s] == null) {
|
|
56
|
+
nodeStyle.removeProperty(s);
|
|
57
|
+
delete applied[s];
|
|
58
|
+
}
|
|
59
|
+
}
|
|
41
60
|
for (s in value) {
|
|
42
61
|
v = value[s];
|
|
43
|
-
if (v !==
|
|
44
|
-
|
|
62
|
+
if (v != null && v !== applied[s]) {
|
|
63
|
+
nodeStyle.setProperty(s, v);
|
|
64
|
+
applied[s] = v;
|
|
65
|
+
}
|
|
45
66
|
}
|
|
46
|
-
for (s in prev) value[s] == null && nodeStyle.removeProperty(s);
|
|
47
67
|
}
|
|
48
68
|
function applyRef(r, element) {
|
|
49
69
|
Array.isArray(r) ? r.flat(Infinity).forEach((f) => f && f(element)) : r(element);
|
|
@@ -55,12 +75,26 @@ function ref(fn, element) {
|
|
|
55
75
|
function isHydrating(node) {
|
|
56
76
|
return solidJs.sharedConfig.hydrating && (!node || node.isConnected);
|
|
57
77
|
}
|
|
58
|
-
var effect, isServer, isDev;
|
|
78
|
+
var transparentOptions, effect, ENVELOPE, ResponseEnvelope, isServer, isDev;
|
|
59
79
|
var init_web = __esm({
|
|
60
|
-
"../../node_modules/.pnpm/@solidjs+web@2.0.0-beta.
|
|
61
|
-
|
|
62
|
-
transparent: true
|
|
63
|
-
|
|
80
|
+
"../../node_modules/.pnpm/@solidjs+web@2.0.0-beta.21_solid-js@2.0.0-beta.21/node_modules/@solidjs/web/dist/web.js"() {
|
|
81
|
+
transparentOptions = {
|
|
82
|
+
transparent: true,
|
|
83
|
+
sync: true
|
|
84
|
+
};
|
|
85
|
+
effect = (fn, effectFn, options) => solidJs.createRenderEffect(fn, effectFn, options ? {
|
|
86
|
+
sync: true,
|
|
87
|
+
...options,
|
|
88
|
+
transparent: !options.scope
|
|
89
|
+
} : transparentOptions);
|
|
90
|
+
ENVELOPE = /* @__PURE__ */ Symbol.for("solid.ResponseEnvelope");
|
|
91
|
+
ResponseEnvelope = class {
|
|
92
|
+
constructor(response, value) {
|
|
93
|
+
this.response = response;
|
|
94
|
+
this.value = value;
|
|
95
|
+
}
|
|
96
|
+
};
|
|
97
|
+
ResponseEnvelope.prototype[ENVELOPE] = true;
|
|
64
98
|
isServer = false;
|
|
65
99
|
isDev = false;
|
|
66
100
|
}
|
|
@@ -111,25 +145,25 @@ function SolidQueryDevtools(props) {
|
|
|
111
145
|
solidJs.createEffect(() => props.theme, (theme) => {
|
|
112
146
|
devtools.setTheme(theme || "system");
|
|
113
147
|
});
|
|
114
|
-
let
|
|
115
|
-
let
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
148
|
+
let mounted = false;
|
|
149
|
+
let disposed = false;
|
|
150
|
+
solidJs.onSettled(() => {
|
|
151
|
+
queueMicrotask(() => {
|
|
152
|
+
if (disposed) return;
|
|
153
|
+
solidJs.runWithOwner(null, () => devtools.mount(ref2));
|
|
154
|
+
mounted = true;
|
|
155
|
+
});
|
|
156
|
+
return () => {
|
|
157
|
+
disposed = true;
|
|
158
|
+
if (mounted) {
|
|
159
|
+
devtools.unmount();
|
|
160
|
+
}
|
|
161
|
+
};
|
|
126
162
|
});
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
return _el$;
|
|
132
|
-
})();
|
|
163
|
+
var _el$ = _tmpl$();
|
|
164
|
+
var _ref$ = ref2;
|
|
165
|
+
typeof _ref$ === "function" || Array.isArray(_ref$) ? ref(() => _ref$, _el$) : ref2 = _el$;
|
|
166
|
+
return _el$;
|
|
133
167
|
}
|
|
134
168
|
var _tmpl$;
|
|
135
169
|
var init_devtools = __esm({
|
|
@@ -183,30 +217,30 @@ function SolidQueryDevtoolsPanel(props) {
|
|
|
183
217
|
solidJs.createEffect(() => props.theme, (theme) => {
|
|
184
218
|
devtools.setTheme(theme || "system");
|
|
185
219
|
});
|
|
186
|
-
let
|
|
187
|
-
let
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
220
|
+
let mounted = false;
|
|
221
|
+
let disposed = false;
|
|
222
|
+
solidJs.onSettled(() => {
|
|
223
|
+
queueMicrotask(() => {
|
|
224
|
+
if (disposed) return;
|
|
225
|
+
solidJs.runWithOwner(null, () => devtools.mount(ref2));
|
|
226
|
+
mounted = true;
|
|
227
|
+
});
|
|
228
|
+
return () => {
|
|
229
|
+
disposed = true;
|
|
230
|
+
if (mounted) {
|
|
231
|
+
devtools.unmount();
|
|
232
|
+
}
|
|
233
|
+
};
|
|
192
234
|
});
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
235
|
+
var _el$ = _tmpl$2();
|
|
236
|
+
var _ref$ = ref2;
|
|
237
|
+
typeof _ref$ === "function" || Array.isArray(_ref$) ? ref(() => _ref$, _el$) : ref2 = _el$;
|
|
238
|
+
effect(() => ({
|
|
239
|
+
...props.style
|
|
240
|
+
}), (_v$, _$p) => {
|
|
241
|
+
style(_el$, _v$, _$p);
|
|
198
242
|
});
|
|
199
|
-
return
|
|
200
|
-
var _el$ = _tmpl$2();
|
|
201
|
-
var _ref$ = ref2;
|
|
202
|
-
typeof _ref$ === "function" || Array.isArray(_ref$) ? ref(() => _ref$, _el$) : ref2 = _el$;
|
|
203
|
-
effect(() => ({
|
|
204
|
-
...props.style
|
|
205
|
-
}), (_v$, _$p) => {
|
|
206
|
-
style(_el$, _v$, _$p);
|
|
207
|
-
});
|
|
208
|
-
return _el$;
|
|
209
|
-
})();
|
|
243
|
+
return _el$;
|
|
210
244
|
}
|
|
211
245
|
var _tmpl$2;
|
|
212
246
|
var init_devtoolsPanel = __esm({
|
package/build/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { isDev, isServer } from './chunk/
|
|
1
|
+
import { isDev, isServer } from './chunk/KGLMGK4M.js';
|
|
2
2
|
import { createSignal, omit, sharedConfig, onSettled, createMemo, untrack } from 'solid-js';
|
|
3
3
|
|
|
4
4
|
function clientOnly(fn) {
|
|
@@ -19,10 +19,10 @@ function clientOnly(fn) {
|
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
// src/index.tsx
|
|
22
|
-
var SolidQueryDevtools = isDev ? clientOnly(() => import('./devtools/
|
|
22
|
+
var SolidQueryDevtools = isDev ? clientOnly(() => import('./devtools/N77BMJWV.js')) : function() {
|
|
23
23
|
return null;
|
|
24
24
|
};
|
|
25
|
-
var SolidQueryDevtoolsPanel = isDev ? clientOnly(() => import('./devtoolsPanel/
|
|
25
|
+
var SolidQueryDevtoolsPanel = isDev ? clientOnly(() => import('./devtoolsPanel/PHKM6EE4.js')) : function() {
|
|
26
26
|
return null;
|
|
27
27
|
};
|
|
28
28
|
|
package/build/index.jsx
CHANGED
|
@@ -1,12 +1,20 @@
|
|
|
1
|
-
// ../../node_modules/.pnpm/@solidjs+web@2.0.0-beta.
|
|
2
|
-
import { createRenderEffect, createMemo
|
|
3
|
-
import { Errored, For, Hydration, Loading, Match, NoHydration, Repeat, Reveal, Show, Switch, createComponent, getOwner
|
|
1
|
+
// ../../node_modules/.pnpm/@solidjs+web@2.0.0-beta.21_solid-js@2.0.0-beta.21/node_modules/@solidjs/web/dist/web.js
|
|
2
|
+
import { createRenderEffect, createMemo, sharedConfig, untrack, runWithOwner, flatten, createRoot, merge, createComponent, omit, createOwner, enableHydration, flush, getOwner, createEffect } from "solid-js";
|
|
3
|
+
import { Errored, For, Hydration, Loading, Match, NoHydration, Repeat, Reveal, Show, Switch, createComponent as createComponent2, getOwner as getOwner2, untrack as untrack2 } from "solid-js";
|
|
4
|
+
var ENVELOPE = /* @__PURE__ */ Symbol.for("solid.ResponseEnvelope");
|
|
5
|
+
var ResponseEnvelope = class {
|
|
6
|
+
constructor(response, value) {
|
|
7
|
+
this.response = response;
|
|
8
|
+
this.value = value;
|
|
9
|
+
}
|
|
10
|
+
};
|
|
11
|
+
ResponseEnvelope.prototype[ENVELOPE] = true;
|
|
4
12
|
var isServer = false;
|
|
5
13
|
var isDev = false;
|
|
6
14
|
|
|
7
15
|
// src/clientOnly.tsx
|
|
8
16
|
import {
|
|
9
|
-
createMemo,
|
|
17
|
+
createMemo as createMemo2,
|
|
10
18
|
createSignal,
|
|
11
19
|
omit as omit2,
|
|
12
20
|
onSettled,
|
|
@@ -27,17 +35,17 @@ function clientOnly(fn) {
|
|
|
27
35
|
onSettled(() => {
|
|
28
36
|
setMounted(true);
|
|
29
37
|
});
|
|
30
|
-
return
|
|
38
|
+
return createMemo2(
|
|
31
39
|
() => (Comp = comp(), m = mounted(), untrack3(() => Comp && m ? Comp(rest) : props.fallback))
|
|
32
40
|
);
|
|
33
41
|
};
|
|
34
42
|
}
|
|
35
43
|
|
|
36
44
|
// src/index.tsx
|
|
37
|
-
var SolidQueryDevtools = isDev ? clientOnly(() => import("./devtools/
|
|
45
|
+
var SolidQueryDevtools = isDev ? clientOnly(() => import("./devtools/7WZM3IT7.jsx")) : function() {
|
|
38
46
|
return null;
|
|
39
47
|
};
|
|
40
|
-
var SolidQueryDevtoolsPanel = isDev ? clientOnly(() => import("./devtoolsPanel/
|
|
48
|
+
var SolidQueryDevtoolsPanel = isDev ? clientOnly(() => import("./devtoolsPanel/FQC5JHFZ.jsx")) : function() {
|
|
41
49
|
return null;
|
|
42
50
|
};
|
|
43
51
|
export {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tanstack/solid-query-devtools",
|
|
3
|
-
"version": "6.0.0-beta.
|
|
3
|
+
"version": "6.0.0-beta.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",
|
|
@@ -44,23 +44,24 @@
|
|
|
44
44
|
"!src/__tests__"
|
|
45
45
|
],
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@tanstack/query-devtools": "5.
|
|
47
|
+
"@tanstack/query-devtools": "5.101.0"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
50
|
"@babel/core": "^7.28.0",
|
|
51
51
|
"@babel/preset-typescript": "^7.18.6",
|
|
52
|
+
"@solidjs/signals": "^2.0.0-beta.21",
|
|
52
53
|
"@solidjs/testing-library": "^0.8.10",
|
|
53
|
-
"@solidjs/web": "2.0.0-beta.
|
|
54
|
-
"babel-preset-solid": "2.0.0-beta.
|
|
54
|
+
"@solidjs/web": "2.0.0-beta.21",
|
|
55
|
+
"babel-preset-solid": "2.0.0-beta.21",
|
|
55
56
|
"npm-run-all2": "^5.0.0",
|
|
56
|
-
"solid-js": "2.0.0-beta.
|
|
57
|
+
"solid-js": "2.0.0-beta.21",
|
|
57
58
|
"tsup-preset-solid": "^2.2.0",
|
|
58
|
-
"vite-plugin-solid": "3.0.0-next.
|
|
59
|
-
"@tanstack/solid-query": "6.0.0-beta.
|
|
59
|
+
"vite-plugin-solid": "3.0.0-next.14",
|
|
60
|
+
"@tanstack/solid-query": "6.0.0-beta.6"
|
|
60
61
|
},
|
|
61
62
|
"peerDependencies": {
|
|
62
63
|
"solid-js": ">=2.0.0-beta.0 <3.0.0",
|
|
63
|
-
"@tanstack/solid-query": "^6.0.0-beta.
|
|
64
|
+
"@tanstack/solid-query": "^6.0.0-beta.6"
|
|
64
65
|
},
|
|
65
66
|
"scripts": {
|
|
66
67
|
"clean": "premove ./build ./coverage ./dist-ts",
|
package/src/clientOnly.tsx
CHANGED
|
@@ -7,7 +7,8 @@ import {
|
|
|
7
7
|
untrack,
|
|
8
8
|
} from 'solid-js'
|
|
9
9
|
import { isServer } from '@solidjs/web'
|
|
10
|
-
import type { Component, ComponentProps
|
|
10
|
+
import type { Component, ComponentProps } from 'solid-js'
|
|
11
|
+
import type { JSX } from '@solidjs/web'
|
|
11
12
|
|
|
12
13
|
/*
|
|
13
14
|
This function has been taken from solid-start's codebase
|
package/src/devtools.tsx
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createEffect, createMemo,
|
|
1
|
+
import { createEffect, createMemo, onSettled, runWithOwner } from 'solid-js'
|
|
2
2
|
import { onlineManager, useQueryClient } from '@tanstack/solid-query'
|
|
3
3
|
import { TanstackQueryDevtools } from '@tanstack/query-devtools'
|
|
4
4
|
import type {
|
|
@@ -15,13 +15,13 @@ interface DevtoolsOptions {
|
|
|
15
15
|
*/
|
|
16
16
|
initialIsOpen?: boolean
|
|
17
17
|
/**
|
|
18
|
-
* The position of the
|
|
19
|
-
* 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right'
|
|
18
|
+
* The position of the TanStack logo to open and close the devtools panel.
|
|
19
|
+
* 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right' | 'relative'
|
|
20
20
|
* Defaults to 'bottom-right'.
|
|
21
21
|
*/
|
|
22
22
|
buttonPosition?: DevtoolsButtonPosition
|
|
23
23
|
/**
|
|
24
|
-
* The position of the
|
|
24
|
+
* The position of the Solid Query devtools panel.
|
|
25
25
|
* 'top' | 'bottom' | 'left' | 'right'
|
|
26
26
|
* Defaults to 'bottom'.
|
|
27
27
|
*/
|
|
@@ -118,19 +118,23 @@ export default function SolidQueryDevtools(props: DevtoolsOptions) {
|
|
|
118
118
|
},
|
|
119
119
|
)
|
|
120
120
|
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
121
|
+
// devtools.mount() calls render() from solid-js/web, which calls flush().
|
|
122
|
+
// flush() is not reentrant inside onSettled, so defer the mount to a
|
|
123
|
+
// microtask. runWithOwner(null) escapes the owned scope because
|
|
124
|
+
// devtools.mount renders a nested Solid app (creating reactive primitives).
|
|
125
|
+
let mounted = false
|
|
126
|
+
let disposed = false
|
|
127
|
+
onSettled(() => {
|
|
128
|
+
queueMicrotask(() => {
|
|
129
|
+
if (disposed) return
|
|
130
|
+
runWithOwner(null, () => devtools.mount(ref))
|
|
131
|
+
mounted = true
|
|
132
|
+
})
|
|
133
|
+
return () => {
|
|
134
|
+
disposed = true
|
|
135
|
+
if (mounted) {
|
|
136
|
+
devtools.unmount()
|
|
137
|
+
}
|
|
134
138
|
}
|
|
135
139
|
})
|
|
136
140
|
|
package/src/devtoolsPanel.tsx
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { createEffect, createMemo,
|
|
1
|
+
import { createEffect, createMemo, onSettled, runWithOwner } from 'solid-js'
|
|
2
2
|
import { onlineManager, useQueryClient } from '@tanstack/solid-query'
|
|
3
3
|
import { TanstackQueryDevtoolsPanel } from '@tanstack/query-devtools'
|
|
4
4
|
import type { DevtoolsErrorType, Theme } from '@tanstack/query-devtools'
|
|
5
5
|
import type { QueryClient } from '@tanstack/solid-query'
|
|
6
|
-
import type { JSX } from '
|
|
6
|
+
import type { JSX } from '@solidjs/web'
|
|
7
7
|
|
|
8
8
|
export interface DevtoolsPanelOptions {
|
|
9
9
|
/**
|
|
@@ -34,7 +34,7 @@ export interface DevtoolsPanelOptions {
|
|
|
34
34
|
/**
|
|
35
35
|
* Callback function that is called when the devtools panel is closed
|
|
36
36
|
*/
|
|
37
|
-
onClose?: () =>
|
|
37
|
+
onClose?: () => void
|
|
38
38
|
/**
|
|
39
39
|
* Set this to true to hide disabled queries from the devtools panel.
|
|
40
40
|
*/
|
|
@@ -93,19 +93,23 @@ export default function SolidQueryDevtoolsPanel(props: DevtoolsPanelOptions) {
|
|
|
93
93
|
},
|
|
94
94
|
)
|
|
95
95
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
96
|
+
// devtools.mount() calls render() from solid-js/web, which calls flush().
|
|
97
|
+
// flush() is not reentrant inside onSettled, so defer the mount to a
|
|
98
|
+
// microtask. runWithOwner(null) escapes the owned scope because
|
|
99
|
+
// devtools.mount renders a nested Solid app (creating reactive primitives).
|
|
100
|
+
let mounted = false
|
|
101
|
+
let disposed = false
|
|
102
|
+
onSettled(() => {
|
|
103
|
+
queueMicrotask(() => {
|
|
104
|
+
if (disposed) return
|
|
105
|
+
runWithOwner(null, () => devtools.mount(ref))
|
|
106
|
+
mounted = true
|
|
107
|
+
})
|
|
108
|
+
return () => {
|
|
109
|
+
disposed = true
|
|
110
|
+
if (mounted) {
|
|
111
|
+
devtools.unmount()
|
|
112
|
+
}
|
|
109
113
|
}
|
|
110
114
|
})
|
|
111
115
|
|