@tanstack/query-devtools 5.0.0-rc.13 → 5.0.0-rc.14
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/dev.cjs +41 -31
- package/build/dev.js +41 -31
- package/build/dev.jsx +41 -31
- package/build/index.cjs +41 -31
- package/build/index.d.cts +1 -14
- package/build/index.d.ts +1 -14
- package/build/index.js +41 -31
- package/build/index.jsx +41 -31
- package/package.json +1 -1
- package/src/index.tsx +41 -41
package/build/dev.cjs
CHANGED
|
@@ -14311,7 +14311,17 @@ init_web();
|
|
|
14311
14311
|
init_web();
|
|
14312
14312
|
init_solid();
|
|
14313
14313
|
exports.TanstackQueryDevtools = class TanstackQueryDevtools {
|
|
14314
|
-
|
|
14314
|
+
#client;
|
|
14315
|
+
#onlineManager;
|
|
14316
|
+
#queryFlavor;
|
|
14317
|
+
#version;
|
|
14318
|
+
#isMounted = false;
|
|
14319
|
+
#buttonPosition;
|
|
14320
|
+
#position;
|
|
14321
|
+
#initialIsOpen;
|
|
14322
|
+
#errorTypes;
|
|
14323
|
+
#Component;
|
|
14324
|
+
#dispose;
|
|
14315
14325
|
constructor(config) {
|
|
14316
14326
|
const {
|
|
14317
14327
|
client,
|
|
@@ -14323,57 +14333,57 @@ exports.TanstackQueryDevtools = class TanstackQueryDevtools {
|
|
|
14323
14333
|
initialIsOpen,
|
|
14324
14334
|
errorTypes
|
|
14325
14335
|
} = config;
|
|
14326
|
-
this
|
|
14327
|
-
this
|
|
14328
|
-
this
|
|
14329
|
-
this
|
|
14330
|
-
this
|
|
14331
|
-
this
|
|
14332
|
-
this
|
|
14333
|
-
this
|
|
14336
|
+
this.#client = createSignal(client);
|
|
14337
|
+
this.#queryFlavor = queryFlavor;
|
|
14338
|
+
this.#version = version;
|
|
14339
|
+
this.#onlineManager = onlineManager;
|
|
14340
|
+
this.#buttonPosition = createSignal(buttonPosition);
|
|
14341
|
+
this.#position = createSignal(position);
|
|
14342
|
+
this.#initialIsOpen = createSignal(initialIsOpen);
|
|
14343
|
+
this.#errorTypes = createSignal(errorTypes);
|
|
14334
14344
|
}
|
|
14335
14345
|
setButtonPosition(position) {
|
|
14336
|
-
this
|
|
14346
|
+
this.#buttonPosition[1](position);
|
|
14337
14347
|
}
|
|
14338
14348
|
setPosition(position) {
|
|
14339
|
-
this
|
|
14349
|
+
this.#position[1](position);
|
|
14340
14350
|
}
|
|
14341
14351
|
setInitialIsOpen(isOpen) {
|
|
14342
|
-
this
|
|
14352
|
+
this.#initialIsOpen[1](isOpen);
|
|
14343
14353
|
}
|
|
14344
14354
|
setErrorTypes(errorTypes) {
|
|
14345
|
-
this
|
|
14355
|
+
this.#errorTypes[1](errorTypes);
|
|
14346
14356
|
}
|
|
14347
14357
|
setClient(client) {
|
|
14348
|
-
this
|
|
14358
|
+
this.#client[1](client);
|
|
14349
14359
|
}
|
|
14350
14360
|
mount(el) {
|
|
14351
|
-
if (this
|
|
14361
|
+
if (this.#isMounted) {
|
|
14352
14362
|
throw new Error("Devtools is already mounted");
|
|
14353
14363
|
}
|
|
14354
14364
|
const dispose3 = render(() => {
|
|
14355
|
-
const [btnPosition] = this
|
|
14356
|
-
const [pos] = this
|
|
14357
|
-
const [isOpen] = this
|
|
14358
|
-
const [errors] = this
|
|
14359
|
-
const [queryClient] = this
|
|
14365
|
+
const [btnPosition] = this.#buttonPosition;
|
|
14366
|
+
const [pos] = this.#position;
|
|
14367
|
+
const [isOpen] = this.#initialIsOpen;
|
|
14368
|
+
const [errors] = this.#errorTypes;
|
|
14369
|
+
const [queryClient] = this.#client;
|
|
14360
14370
|
let Devtools2;
|
|
14361
|
-
if (this
|
|
14362
|
-
Devtools2 = this
|
|
14371
|
+
if (this.#Component) {
|
|
14372
|
+
Devtools2 = this.#Component;
|
|
14363
14373
|
} else {
|
|
14364
14374
|
Devtools2 = lazy(() => Promise.resolve().then(() => (init_Devtools(), Devtools_exports)));
|
|
14365
|
-
this
|
|
14375
|
+
this.#Component = Devtools2;
|
|
14366
14376
|
}
|
|
14367
14377
|
const _self$ = this;
|
|
14368
14378
|
return createComponent(Devtools2, mergeProps({
|
|
14369
14379
|
get queryFlavor() {
|
|
14370
|
-
return _self
|
|
14380
|
+
return _self$.#queryFlavor;
|
|
14371
14381
|
},
|
|
14372
14382
|
get version() {
|
|
14373
|
-
return _self
|
|
14383
|
+
return _self$.#version;
|
|
14374
14384
|
},
|
|
14375
14385
|
get onlineManager() {
|
|
14376
|
-
return _self
|
|
14386
|
+
return _self$.#onlineManager;
|
|
14377
14387
|
}
|
|
14378
14388
|
}, {
|
|
14379
14389
|
get client() {
|
|
@@ -14393,15 +14403,15 @@ exports.TanstackQueryDevtools = class TanstackQueryDevtools {
|
|
|
14393
14403
|
}
|
|
14394
14404
|
}));
|
|
14395
14405
|
}, el);
|
|
14396
|
-
this
|
|
14397
|
-
this
|
|
14406
|
+
this.#isMounted = true;
|
|
14407
|
+
this.#dispose = dispose3;
|
|
14398
14408
|
}
|
|
14399
14409
|
unmount() {
|
|
14400
|
-
if (!this
|
|
14410
|
+
if (!this.#isMounted) {
|
|
14401
14411
|
throw new Error("Devtools is not mounted");
|
|
14402
14412
|
}
|
|
14403
|
-
this
|
|
14404
|
-
this
|
|
14413
|
+
this.#dispose?.();
|
|
14414
|
+
this.#isMounted = false;
|
|
14405
14415
|
}
|
|
14406
14416
|
};
|
|
14407
14417
|
/*! Bundled license information:
|
package/build/dev.js
CHANGED
|
@@ -2,7 +2,17 @@ import { createSignal, render, lazy, createComponent, mergeProps } from './chunk
|
|
|
2
2
|
|
|
3
3
|
// src/index.tsx
|
|
4
4
|
var TanstackQueryDevtools = class {
|
|
5
|
-
|
|
5
|
+
#client;
|
|
6
|
+
#onlineManager;
|
|
7
|
+
#queryFlavor;
|
|
8
|
+
#version;
|
|
9
|
+
#isMounted = false;
|
|
10
|
+
#buttonPosition;
|
|
11
|
+
#position;
|
|
12
|
+
#initialIsOpen;
|
|
13
|
+
#errorTypes;
|
|
14
|
+
#Component;
|
|
15
|
+
#dispose;
|
|
6
16
|
constructor(config) {
|
|
7
17
|
const {
|
|
8
18
|
client,
|
|
@@ -14,57 +24,57 @@ var TanstackQueryDevtools = class {
|
|
|
14
24
|
initialIsOpen,
|
|
15
25
|
errorTypes
|
|
16
26
|
} = config;
|
|
17
|
-
this
|
|
18
|
-
this
|
|
19
|
-
this
|
|
20
|
-
this
|
|
21
|
-
this
|
|
22
|
-
this
|
|
23
|
-
this
|
|
24
|
-
this
|
|
27
|
+
this.#client = createSignal(client);
|
|
28
|
+
this.#queryFlavor = queryFlavor;
|
|
29
|
+
this.#version = version;
|
|
30
|
+
this.#onlineManager = onlineManager;
|
|
31
|
+
this.#buttonPosition = createSignal(buttonPosition);
|
|
32
|
+
this.#position = createSignal(position);
|
|
33
|
+
this.#initialIsOpen = createSignal(initialIsOpen);
|
|
34
|
+
this.#errorTypes = createSignal(errorTypes);
|
|
25
35
|
}
|
|
26
36
|
setButtonPosition(position) {
|
|
27
|
-
this
|
|
37
|
+
this.#buttonPosition[1](position);
|
|
28
38
|
}
|
|
29
39
|
setPosition(position) {
|
|
30
|
-
this
|
|
40
|
+
this.#position[1](position);
|
|
31
41
|
}
|
|
32
42
|
setInitialIsOpen(isOpen) {
|
|
33
|
-
this
|
|
43
|
+
this.#initialIsOpen[1](isOpen);
|
|
34
44
|
}
|
|
35
45
|
setErrorTypes(errorTypes) {
|
|
36
|
-
this
|
|
46
|
+
this.#errorTypes[1](errorTypes);
|
|
37
47
|
}
|
|
38
48
|
setClient(client) {
|
|
39
|
-
this
|
|
49
|
+
this.#client[1](client);
|
|
40
50
|
}
|
|
41
51
|
mount(el) {
|
|
42
|
-
if (this
|
|
52
|
+
if (this.#isMounted) {
|
|
43
53
|
throw new Error("Devtools is already mounted");
|
|
44
54
|
}
|
|
45
55
|
const dispose = render(() => {
|
|
46
|
-
const [btnPosition] = this
|
|
47
|
-
const [pos] = this
|
|
48
|
-
const [isOpen] = this
|
|
49
|
-
const [errors] = this
|
|
50
|
-
const [queryClient] = this
|
|
56
|
+
const [btnPosition] = this.#buttonPosition;
|
|
57
|
+
const [pos] = this.#position;
|
|
58
|
+
const [isOpen] = this.#initialIsOpen;
|
|
59
|
+
const [errors] = this.#errorTypes;
|
|
60
|
+
const [queryClient] = this.#client;
|
|
51
61
|
let Devtools;
|
|
52
|
-
if (this
|
|
53
|
-
Devtools = this
|
|
62
|
+
if (this.#Component) {
|
|
63
|
+
Devtools = this.#Component;
|
|
54
64
|
} else {
|
|
55
65
|
Devtools = lazy(() => import('./Devtools/YSRICXZI.js'));
|
|
56
|
-
this
|
|
66
|
+
this.#Component = Devtools;
|
|
57
67
|
}
|
|
58
68
|
const _self$ = this;
|
|
59
69
|
return createComponent(Devtools, mergeProps({
|
|
60
70
|
get queryFlavor() {
|
|
61
|
-
return _self
|
|
71
|
+
return _self$.#queryFlavor;
|
|
62
72
|
},
|
|
63
73
|
get version() {
|
|
64
|
-
return _self
|
|
74
|
+
return _self$.#version;
|
|
65
75
|
},
|
|
66
76
|
get onlineManager() {
|
|
67
|
-
return _self
|
|
77
|
+
return _self$.#onlineManager;
|
|
68
78
|
}
|
|
69
79
|
}, {
|
|
70
80
|
get client() {
|
|
@@ -84,15 +94,15 @@ var TanstackQueryDevtools = class {
|
|
|
84
94
|
}
|
|
85
95
|
}));
|
|
86
96
|
}, el);
|
|
87
|
-
this
|
|
88
|
-
this
|
|
97
|
+
this.#isMounted = true;
|
|
98
|
+
this.#dispose = dispose;
|
|
89
99
|
}
|
|
90
100
|
unmount() {
|
|
91
|
-
if (!this
|
|
101
|
+
if (!this.#isMounted) {
|
|
92
102
|
throw new Error("Devtools is not mounted");
|
|
93
103
|
}
|
|
94
|
-
this
|
|
95
|
-
this
|
|
104
|
+
this.#dispose?.();
|
|
105
|
+
this.#isMounted = false;
|
|
96
106
|
}
|
|
97
107
|
};
|
|
98
108
|
|
package/build/dev.jsx
CHANGED
|
@@ -6,8 +6,18 @@ import {
|
|
|
6
6
|
|
|
7
7
|
// src/index.tsx
|
|
8
8
|
var TanstackQueryDevtools = class {
|
|
9
|
+
#client;
|
|
10
|
+
#onlineManager;
|
|
11
|
+
#queryFlavor;
|
|
12
|
+
#version;
|
|
13
|
+
#isMounted = false;
|
|
14
|
+
#buttonPosition;
|
|
15
|
+
#position;
|
|
16
|
+
#initialIsOpen;
|
|
17
|
+
#errorTypes;
|
|
18
|
+
#Component;
|
|
19
|
+
#dispose;
|
|
9
20
|
constructor(config) {
|
|
10
|
-
this.isMounted = false;
|
|
11
21
|
const {
|
|
12
22
|
client,
|
|
13
23
|
queryFlavor,
|
|
@@ -18,51 +28,51 @@ var TanstackQueryDevtools = class {
|
|
|
18
28
|
initialIsOpen,
|
|
19
29
|
errorTypes
|
|
20
30
|
} = config;
|
|
21
|
-
this
|
|
22
|
-
this
|
|
23
|
-
this
|
|
24
|
-
this
|
|
25
|
-
this
|
|
26
|
-
this
|
|
27
|
-
this
|
|
28
|
-
this
|
|
31
|
+
this.#client = createSignal(client);
|
|
32
|
+
this.#queryFlavor = queryFlavor;
|
|
33
|
+
this.#version = version;
|
|
34
|
+
this.#onlineManager = onlineManager;
|
|
35
|
+
this.#buttonPosition = createSignal(buttonPosition);
|
|
36
|
+
this.#position = createSignal(position);
|
|
37
|
+
this.#initialIsOpen = createSignal(initialIsOpen);
|
|
38
|
+
this.#errorTypes = createSignal(errorTypes);
|
|
29
39
|
}
|
|
30
40
|
setButtonPosition(position) {
|
|
31
|
-
this
|
|
41
|
+
this.#buttonPosition[1](position);
|
|
32
42
|
}
|
|
33
43
|
setPosition(position) {
|
|
34
|
-
this
|
|
44
|
+
this.#position[1](position);
|
|
35
45
|
}
|
|
36
46
|
setInitialIsOpen(isOpen) {
|
|
37
|
-
this
|
|
47
|
+
this.#initialIsOpen[1](isOpen);
|
|
38
48
|
}
|
|
39
49
|
setErrorTypes(errorTypes) {
|
|
40
|
-
this
|
|
50
|
+
this.#errorTypes[1](errorTypes);
|
|
41
51
|
}
|
|
42
52
|
setClient(client) {
|
|
43
|
-
this
|
|
53
|
+
this.#client[1](client);
|
|
44
54
|
}
|
|
45
55
|
mount(el) {
|
|
46
|
-
if (this
|
|
56
|
+
if (this.#isMounted) {
|
|
47
57
|
throw new Error("Devtools is already mounted");
|
|
48
58
|
}
|
|
49
59
|
const dispose = render(() => {
|
|
50
|
-
const [btnPosition] = this
|
|
51
|
-
const [pos] = this
|
|
52
|
-
const [isOpen] = this
|
|
53
|
-
const [errors] = this
|
|
54
|
-
const [queryClient] = this
|
|
60
|
+
const [btnPosition] = this.#buttonPosition;
|
|
61
|
+
const [pos] = this.#position;
|
|
62
|
+
const [isOpen] = this.#initialIsOpen;
|
|
63
|
+
const [errors] = this.#errorTypes;
|
|
64
|
+
const [queryClient] = this.#client;
|
|
55
65
|
let Devtools;
|
|
56
|
-
if (this
|
|
57
|
-
Devtools = this
|
|
66
|
+
if (this.#Component) {
|
|
67
|
+
Devtools = this.#Component;
|
|
58
68
|
} else {
|
|
59
69
|
Devtools = lazy(() => import("./Devtools/OWSLDUSP.jsx"));
|
|
60
|
-
this
|
|
70
|
+
this.#Component = Devtools;
|
|
61
71
|
}
|
|
62
72
|
return <Devtools
|
|
63
|
-
queryFlavor={this
|
|
64
|
-
version={this
|
|
65
|
-
onlineManager={this
|
|
73
|
+
queryFlavor={this.#queryFlavor}
|
|
74
|
+
version={this.#version}
|
|
75
|
+
onlineManager={this.#onlineManager}
|
|
66
76
|
{...{
|
|
67
77
|
get client() {
|
|
68
78
|
return queryClient();
|
|
@@ -82,15 +92,15 @@ var TanstackQueryDevtools = class {
|
|
|
82
92
|
}}
|
|
83
93
|
/>;
|
|
84
94
|
}, el);
|
|
85
|
-
this
|
|
86
|
-
this
|
|
95
|
+
this.#isMounted = true;
|
|
96
|
+
this.#dispose = dispose;
|
|
87
97
|
}
|
|
88
98
|
unmount() {
|
|
89
|
-
if (!this
|
|
99
|
+
if (!this.#isMounted) {
|
|
90
100
|
throw new Error("Devtools is not mounted");
|
|
91
101
|
}
|
|
92
|
-
this
|
|
93
|
-
this
|
|
102
|
+
this.#dispose?.();
|
|
103
|
+
this.#isMounted = false;
|
|
94
104
|
}
|
|
95
105
|
};
|
|
96
106
|
export {
|
package/build/index.cjs
CHANGED
|
@@ -14309,7 +14309,17 @@ init_web();
|
|
|
14309
14309
|
init_web();
|
|
14310
14310
|
init_solid();
|
|
14311
14311
|
exports.TanstackQueryDevtools = class TanstackQueryDevtools {
|
|
14312
|
-
|
|
14312
|
+
#client;
|
|
14313
|
+
#onlineManager;
|
|
14314
|
+
#queryFlavor;
|
|
14315
|
+
#version;
|
|
14316
|
+
#isMounted = false;
|
|
14317
|
+
#buttonPosition;
|
|
14318
|
+
#position;
|
|
14319
|
+
#initialIsOpen;
|
|
14320
|
+
#errorTypes;
|
|
14321
|
+
#Component;
|
|
14322
|
+
#dispose;
|
|
14313
14323
|
constructor(config) {
|
|
14314
14324
|
const {
|
|
14315
14325
|
client,
|
|
@@ -14321,57 +14331,57 @@ exports.TanstackQueryDevtools = class TanstackQueryDevtools {
|
|
|
14321
14331
|
initialIsOpen,
|
|
14322
14332
|
errorTypes
|
|
14323
14333
|
} = config;
|
|
14324
|
-
this
|
|
14325
|
-
this
|
|
14326
|
-
this
|
|
14327
|
-
this
|
|
14328
|
-
this
|
|
14329
|
-
this
|
|
14330
|
-
this
|
|
14331
|
-
this
|
|
14334
|
+
this.#client = createSignal(client);
|
|
14335
|
+
this.#queryFlavor = queryFlavor;
|
|
14336
|
+
this.#version = version;
|
|
14337
|
+
this.#onlineManager = onlineManager;
|
|
14338
|
+
this.#buttonPosition = createSignal(buttonPosition);
|
|
14339
|
+
this.#position = createSignal(position);
|
|
14340
|
+
this.#initialIsOpen = createSignal(initialIsOpen);
|
|
14341
|
+
this.#errorTypes = createSignal(errorTypes);
|
|
14332
14342
|
}
|
|
14333
14343
|
setButtonPosition(position) {
|
|
14334
|
-
this
|
|
14344
|
+
this.#buttonPosition[1](position);
|
|
14335
14345
|
}
|
|
14336
14346
|
setPosition(position) {
|
|
14337
|
-
this
|
|
14347
|
+
this.#position[1](position);
|
|
14338
14348
|
}
|
|
14339
14349
|
setInitialIsOpen(isOpen) {
|
|
14340
|
-
this
|
|
14350
|
+
this.#initialIsOpen[1](isOpen);
|
|
14341
14351
|
}
|
|
14342
14352
|
setErrorTypes(errorTypes) {
|
|
14343
|
-
this
|
|
14353
|
+
this.#errorTypes[1](errorTypes);
|
|
14344
14354
|
}
|
|
14345
14355
|
setClient(client) {
|
|
14346
|
-
this
|
|
14356
|
+
this.#client[1](client);
|
|
14347
14357
|
}
|
|
14348
14358
|
mount(el) {
|
|
14349
|
-
if (this
|
|
14359
|
+
if (this.#isMounted) {
|
|
14350
14360
|
throw new Error("Devtools is already mounted");
|
|
14351
14361
|
}
|
|
14352
14362
|
const dispose3 = render(() => {
|
|
14353
|
-
const [btnPosition] = this
|
|
14354
|
-
const [pos] = this
|
|
14355
|
-
const [isOpen] = this
|
|
14356
|
-
const [errors] = this
|
|
14357
|
-
const [queryClient] = this
|
|
14363
|
+
const [btnPosition] = this.#buttonPosition;
|
|
14364
|
+
const [pos] = this.#position;
|
|
14365
|
+
const [isOpen] = this.#initialIsOpen;
|
|
14366
|
+
const [errors] = this.#errorTypes;
|
|
14367
|
+
const [queryClient] = this.#client;
|
|
14358
14368
|
let Devtools2;
|
|
14359
|
-
if (this
|
|
14360
|
-
Devtools2 = this
|
|
14369
|
+
if (this.#Component) {
|
|
14370
|
+
Devtools2 = this.#Component;
|
|
14361
14371
|
} else {
|
|
14362
14372
|
Devtools2 = lazy(() => Promise.resolve().then(() => (init_Devtools(), Devtools_exports)));
|
|
14363
|
-
this
|
|
14373
|
+
this.#Component = Devtools2;
|
|
14364
14374
|
}
|
|
14365
14375
|
const _self$ = this;
|
|
14366
14376
|
return createComponent(Devtools2, mergeProps({
|
|
14367
14377
|
get queryFlavor() {
|
|
14368
|
-
return _self
|
|
14378
|
+
return _self$.#queryFlavor;
|
|
14369
14379
|
},
|
|
14370
14380
|
get version() {
|
|
14371
|
-
return _self
|
|
14381
|
+
return _self$.#version;
|
|
14372
14382
|
},
|
|
14373
14383
|
get onlineManager() {
|
|
14374
|
-
return _self
|
|
14384
|
+
return _self$.#onlineManager;
|
|
14375
14385
|
}
|
|
14376
14386
|
}, {
|
|
14377
14387
|
get client() {
|
|
@@ -14391,15 +14401,15 @@ exports.TanstackQueryDevtools = class TanstackQueryDevtools {
|
|
|
14391
14401
|
}
|
|
14392
14402
|
}));
|
|
14393
14403
|
}, el);
|
|
14394
|
-
this
|
|
14395
|
-
this
|
|
14404
|
+
this.#isMounted = true;
|
|
14405
|
+
this.#dispose = dispose3;
|
|
14396
14406
|
}
|
|
14397
14407
|
unmount() {
|
|
14398
|
-
if (!this
|
|
14408
|
+
if (!this.#isMounted) {
|
|
14399
14409
|
throw new Error("Devtools is not mounted");
|
|
14400
14410
|
}
|
|
14401
|
-
this
|
|
14402
|
-
this
|
|
14411
|
+
this.#dispose?.();
|
|
14412
|
+
this.#isMounted = false;
|
|
14403
14413
|
}
|
|
14404
14414
|
};
|
|
14405
14415
|
/*! Bundled license information:
|
package/build/index.d.cts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Query, QueryClient, onlineManager } from '@tanstack/query-core';
|
|
2
|
-
import { Component, Signal } from 'solid-js';
|
|
3
2
|
|
|
4
3
|
type XPosition = 'left' | 'right';
|
|
5
4
|
type YPosition = 'top' | 'bottom';
|
|
@@ -26,22 +25,10 @@ interface QueryDevtoolsProps {
|
|
|
26
25
|
errorTypes?: Array<DevToolsErrorType>;
|
|
27
26
|
}
|
|
28
27
|
|
|
29
|
-
declare const DevtoolsComponent: Component<QueryDevtoolsProps>;
|
|
30
|
-
|
|
31
28
|
interface TanstackQueryDevtoolsConfig extends QueryDevtoolsProps {
|
|
32
29
|
}
|
|
33
30
|
declare class TanstackQueryDevtools {
|
|
34
|
-
|
|
35
|
-
onlineManager: typeof onlineManager;
|
|
36
|
-
queryFlavor: string;
|
|
37
|
-
version: string;
|
|
38
|
-
isMounted: boolean;
|
|
39
|
-
buttonPosition: Signal<DevtoolsButtonPosition | undefined>;
|
|
40
|
-
position: Signal<DevtoolsPosition | undefined>;
|
|
41
|
-
initialIsOpen: Signal<boolean | undefined>;
|
|
42
|
-
errorTypes: Signal<Array<DevToolsErrorType> | undefined>;
|
|
43
|
-
Component: typeof DevtoolsComponent | undefined;
|
|
44
|
-
dispose?: () => void;
|
|
31
|
+
#private;
|
|
45
32
|
constructor(config: TanstackQueryDevtoolsConfig);
|
|
46
33
|
setButtonPosition(position: DevtoolsButtonPosition): void;
|
|
47
34
|
setPosition(position: DevtoolsPosition): void;
|
package/build/index.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Query, QueryClient, onlineManager } from '@tanstack/query-core';
|
|
2
|
-
import { Component, Signal } from 'solid-js';
|
|
3
2
|
|
|
4
3
|
type XPosition = 'left' | 'right';
|
|
5
4
|
type YPosition = 'top' | 'bottom';
|
|
@@ -26,22 +25,10 @@ interface QueryDevtoolsProps {
|
|
|
26
25
|
errorTypes?: Array<DevToolsErrorType>;
|
|
27
26
|
}
|
|
28
27
|
|
|
29
|
-
declare const DevtoolsComponent: Component<QueryDevtoolsProps>;
|
|
30
|
-
|
|
31
28
|
interface TanstackQueryDevtoolsConfig extends QueryDevtoolsProps {
|
|
32
29
|
}
|
|
33
30
|
declare class TanstackQueryDevtools {
|
|
34
|
-
|
|
35
|
-
onlineManager: typeof onlineManager;
|
|
36
|
-
queryFlavor: string;
|
|
37
|
-
version: string;
|
|
38
|
-
isMounted: boolean;
|
|
39
|
-
buttonPosition: Signal<DevtoolsButtonPosition | undefined>;
|
|
40
|
-
position: Signal<DevtoolsPosition | undefined>;
|
|
41
|
-
initialIsOpen: Signal<boolean | undefined>;
|
|
42
|
-
errorTypes: Signal<Array<DevToolsErrorType> | undefined>;
|
|
43
|
-
Component: typeof DevtoolsComponent | undefined;
|
|
44
|
-
dispose?: () => void;
|
|
31
|
+
#private;
|
|
45
32
|
constructor(config: TanstackQueryDevtoolsConfig);
|
|
46
33
|
setButtonPosition(position: DevtoolsButtonPosition): void;
|
|
47
34
|
setPosition(position: DevtoolsPosition): void;
|
package/build/index.js
CHANGED
|
@@ -2,7 +2,17 @@ import { createSignal, render, lazy, createComponent, mergeProps } from './chunk
|
|
|
2
2
|
|
|
3
3
|
// src/index.tsx
|
|
4
4
|
var TanstackQueryDevtools = class {
|
|
5
|
-
|
|
5
|
+
#client;
|
|
6
|
+
#onlineManager;
|
|
7
|
+
#queryFlavor;
|
|
8
|
+
#version;
|
|
9
|
+
#isMounted = false;
|
|
10
|
+
#buttonPosition;
|
|
11
|
+
#position;
|
|
12
|
+
#initialIsOpen;
|
|
13
|
+
#errorTypes;
|
|
14
|
+
#Component;
|
|
15
|
+
#dispose;
|
|
6
16
|
constructor(config) {
|
|
7
17
|
const {
|
|
8
18
|
client,
|
|
@@ -14,57 +24,57 @@ var TanstackQueryDevtools = class {
|
|
|
14
24
|
initialIsOpen,
|
|
15
25
|
errorTypes
|
|
16
26
|
} = config;
|
|
17
|
-
this
|
|
18
|
-
this
|
|
19
|
-
this
|
|
20
|
-
this
|
|
21
|
-
this
|
|
22
|
-
this
|
|
23
|
-
this
|
|
24
|
-
this
|
|
27
|
+
this.#client = createSignal(client);
|
|
28
|
+
this.#queryFlavor = queryFlavor;
|
|
29
|
+
this.#version = version;
|
|
30
|
+
this.#onlineManager = onlineManager;
|
|
31
|
+
this.#buttonPosition = createSignal(buttonPosition);
|
|
32
|
+
this.#position = createSignal(position);
|
|
33
|
+
this.#initialIsOpen = createSignal(initialIsOpen);
|
|
34
|
+
this.#errorTypes = createSignal(errorTypes);
|
|
25
35
|
}
|
|
26
36
|
setButtonPosition(position) {
|
|
27
|
-
this
|
|
37
|
+
this.#buttonPosition[1](position);
|
|
28
38
|
}
|
|
29
39
|
setPosition(position) {
|
|
30
|
-
this
|
|
40
|
+
this.#position[1](position);
|
|
31
41
|
}
|
|
32
42
|
setInitialIsOpen(isOpen) {
|
|
33
|
-
this
|
|
43
|
+
this.#initialIsOpen[1](isOpen);
|
|
34
44
|
}
|
|
35
45
|
setErrorTypes(errorTypes) {
|
|
36
|
-
this
|
|
46
|
+
this.#errorTypes[1](errorTypes);
|
|
37
47
|
}
|
|
38
48
|
setClient(client) {
|
|
39
|
-
this
|
|
49
|
+
this.#client[1](client);
|
|
40
50
|
}
|
|
41
51
|
mount(el) {
|
|
42
|
-
if (this
|
|
52
|
+
if (this.#isMounted) {
|
|
43
53
|
throw new Error("Devtools is already mounted");
|
|
44
54
|
}
|
|
45
55
|
const dispose = render(() => {
|
|
46
|
-
const [btnPosition] = this
|
|
47
|
-
const [pos] = this
|
|
48
|
-
const [isOpen] = this
|
|
49
|
-
const [errors] = this
|
|
50
|
-
const [queryClient] = this
|
|
56
|
+
const [btnPosition] = this.#buttonPosition;
|
|
57
|
+
const [pos] = this.#position;
|
|
58
|
+
const [isOpen] = this.#initialIsOpen;
|
|
59
|
+
const [errors] = this.#errorTypes;
|
|
60
|
+
const [queryClient] = this.#client;
|
|
51
61
|
let Devtools;
|
|
52
|
-
if (this
|
|
53
|
-
Devtools = this
|
|
62
|
+
if (this.#Component) {
|
|
63
|
+
Devtools = this.#Component;
|
|
54
64
|
} else {
|
|
55
65
|
Devtools = lazy(() => import('./Devtools/4TNE5QTO.js'));
|
|
56
|
-
this
|
|
66
|
+
this.#Component = Devtools;
|
|
57
67
|
}
|
|
58
68
|
const _self$ = this;
|
|
59
69
|
return createComponent(Devtools, mergeProps({
|
|
60
70
|
get queryFlavor() {
|
|
61
|
-
return _self
|
|
71
|
+
return _self$.#queryFlavor;
|
|
62
72
|
},
|
|
63
73
|
get version() {
|
|
64
|
-
return _self
|
|
74
|
+
return _self$.#version;
|
|
65
75
|
},
|
|
66
76
|
get onlineManager() {
|
|
67
|
-
return _self
|
|
77
|
+
return _self$.#onlineManager;
|
|
68
78
|
}
|
|
69
79
|
}, {
|
|
70
80
|
get client() {
|
|
@@ -84,15 +94,15 @@ var TanstackQueryDevtools = class {
|
|
|
84
94
|
}
|
|
85
95
|
}));
|
|
86
96
|
}, el);
|
|
87
|
-
this
|
|
88
|
-
this
|
|
97
|
+
this.#isMounted = true;
|
|
98
|
+
this.#dispose = dispose;
|
|
89
99
|
}
|
|
90
100
|
unmount() {
|
|
91
|
-
if (!this
|
|
101
|
+
if (!this.#isMounted) {
|
|
92
102
|
throw new Error("Devtools is not mounted");
|
|
93
103
|
}
|
|
94
|
-
this
|
|
95
|
-
this
|
|
104
|
+
this.#dispose?.();
|
|
105
|
+
this.#isMounted = false;
|
|
96
106
|
}
|
|
97
107
|
};
|
|
98
108
|
|
package/build/index.jsx
CHANGED
|
@@ -6,8 +6,18 @@ import {
|
|
|
6
6
|
|
|
7
7
|
// src/index.tsx
|
|
8
8
|
var TanstackQueryDevtools = class {
|
|
9
|
+
#client;
|
|
10
|
+
#onlineManager;
|
|
11
|
+
#queryFlavor;
|
|
12
|
+
#version;
|
|
13
|
+
#isMounted = false;
|
|
14
|
+
#buttonPosition;
|
|
15
|
+
#position;
|
|
16
|
+
#initialIsOpen;
|
|
17
|
+
#errorTypes;
|
|
18
|
+
#Component;
|
|
19
|
+
#dispose;
|
|
9
20
|
constructor(config) {
|
|
10
|
-
this.isMounted = false;
|
|
11
21
|
const {
|
|
12
22
|
client,
|
|
13
23
|
queryFlavor,
|
|
@@ -18,51 +28,51 @@ var TanstackQueryDevtools = class {
|
|
|
18
28
|
initialIsOpen,
|
|
19
29
|
errorTypes
|
|
20
30
|
} = config;
|
|
21
|
-
this
|
|
22
|
-
this
|
|
23
|
-
this
|
|
24
|
-
this
|
|
25
|
-
this
|
|
26
|
-
this
|
|
27
|
-
this
|
|
28
|
-
this
|
|
31
|
+
this.#client = createSignal(client);
|
|
32
|
+
this.#queryFlavor = queryFlavor;
|
|
33
|
+
this.#version = version;
|
|
34
|
+
this.#onlineManager = onlineManager;
|
|
35
|
+
this.#buttonPosition = createSignal(buttonPosition);
|
|
36
|
+
this.#position = createSignal(position);
|
|
37
|
+
this.#initialIsOpen = createSignal(initialIsOpen);
|
|
38
|
+
this.#errorTypes = createSignal(errorTypes);
|
|
29
39
|
}
|
|
30
40
|
setButtonPosition(position) {
|
|
31
|
-
this
|
|
41
|
+
this.#buttonPosition[1](position);
|
|
32
42
|
}
|
|
33
43
|
setPosition(position) {
|
|
34
|
-
this
|
|
44
|
+
this.#position[1](position);
|
|
35
45
|
}
|
|
36
46
|
setInitialIsOpen(isOpen) {
|
|
37
|
-
this
|
|
47
|
+
this.#initialIsOpen[1](isOpen);
|
|
38
48
|
}
|
|
39
49
|
setErrorTypes(errorTypes) {
|
|
40
|
-
this
|
|
50
|
+
this.#errorTypes[1](errorTypes);
|
|
41
51
|
}
|
|
42
52
|
setClient(client) {
|
|
43
|
-
this
|
|
53
|
+
this.#client[1](client);
|
|
44
54
|
}
|
|
45
55
|
mount(el) {
|
|
46
|
-
if (this
|
|
56
|
+
if (this.#isMounted) {
|
|
47
57
|
throw new Error("Devtools is already mounted");
|
|
48
58
|
}
|
|
49
59
|
const dispose = render(() => {
|
|
50
|
-
const [btnPosition] = this
|
|
51
|
-
const [pos] = this
|
|
52
|
-
const [isOpen] = this
|
|
53
|
-
const [errors] = this
|
|
54
|
-
const [queryClient] = this
|
|
60
|
+
const [btnPosition] = this.#buttonPosition;
|
|
61
|
+
const [pos] = this.#position;
|
|
62
|
+
const [isOpen] = this.#initialIsOpen;
|
|
63
|
+
const [errors] = this.#errorTypes;
|
|
64
|
+
const [queryClient] = this.#client;
|
|
55
65
|
let Devtools;
|
|
56
|
-
if (this
|
|
57
|
-
Devtools = this
|
|
66
|
+
if (this.#Component) {
|
|
67
|
+
Devtools = this.#Component;
|
|
58
68
|
} else {
|
|
59
69
|
Devtools = lazy(() => import("./Devtools/3BAJISSX.jsx"));
|
|
60
|
-
this
|
|
70
|
+
this.#Component = Devtools;
|
|
61
71
|
}
|
|
62
72
|
return <Devtools
|
|
63
|
-
queryFlavor={this
|
|
64
|
-
version={this
|
|
65
|
-
onlineManager={this
|
|
73
|
+
queryFlavor={this.#queryFlavor}
|
|
74
|
+
version={this.#version}
|
|
75
|
+
onlineManager={this.#onlineManager}
|
|
66
76
|
{...{
|
|
67
77
|
get client() {
|
|
68
78
|
return queryClient();
|
|
@@ -82,15 +92,15 @@ var TanstackQueryDevtools = class {
|
|
|
82
92
|
}}
|
|
83
93
|
/>;
|
|
84
94
|
}, el);
|
|
85
|
-
this
|
|
86
|
-
this
|
|
95
|
+
this.#isMounted = true;
|
|
96
|
+
this.#dispose = dispose;
|
|
87
97
|
}
|
|
88
98
|
unmount() {
|
|
89
|
-
if (!this
|
|
99
|
+
if (!this.#isMounted) {
|
|
90
100
|
throw new Error("Devtools is not mounted");
|
|
91
101
|
}
|
|
92
|
-
this
|
|
93
|
-
this
|
|
102
|
+
this.#dispose?.();
|
|
103
|
+
this.#isMounted = false;
|
|
94
104
|
}
|
|
95
105
|
};
|
|
96
106
|
export {
|
package/package.json
CHANGED
package/src/index.tsx
CHANGED
|
@@ -17,17 +17,17 @@ export type { DevtoolsButtonPosition, DevtoolsPosition, DevToolsErrorType }
|
|
|
17
17
|
export interface TanstackQueryDevtoolsConfig extends QueryDevtoolsProps {}
|
|
18
18
|
|
|
19
19
|
class TanstackQueryDevtools {
|
|
20
|
-
client: Signal<QueryClient>
|
|
21
|
-
onlineManager: typeof TonlineManager
|
|
22
|
-
queryFlavor: string
|
|
23
|
-
version: string
|
|
24
|
-
isMounted = false
|
|
25
|
-
buttonPosition: Signal<DevtoolsButtonPosition | undefined>
|
|
26
|
-
position: Signal<DevtoolsPosition | undefined>
|
|
27
|
-
initialIsOpen: Signal<boolean | undefined>
|
|
28
|
-
errorTypes: Signal<Array<DevToolsErrorType> | undefined>
|
|
29
|
-
Component: typeof DevtoolsComponent | undefined
|
|
30
|
-
dispose?: () => void
|
|
20
|
+
#client: Signal<QueryClient>
|
|
21
|
+
#onlineManager: typeof TonlineManager
|
|
22
|
+
#queryFlavor: string
|
|
23
|
+
#version: string
|
|
24
|
+
#isMounted = false
|
|
25
|
+
#buttonPosition: Signal<DevtoolsButtonPosition | undefined>
|
|
26
|
+
#position: Signal<DevtoolsPosition | undefined>
|
|
27
|
+
#initialIsOpen: Signal<boolean | undefined>
|
|
28
|
+
#errorTypes: Signal<Array<DevToolsErrorType> | undefined>
|
|
29
|
+
#Component: typeof DevtoolsComponent | undefined
|
|
30
|
+
#dispose?: () => void
|
|
31
31
|
|
|
32
32
|
constructor(config: TanstackQueryDevtoolsConfig) {
|
|
33
33
|
const {
|
|
@@ -40,61 +40,61 @@ class TanstackQueryDevtools {
|
|
|
40
40
|
initialIsOpen,
|
|
41
41
|
errorTypes,
|
|
42
42
|
} = config
|
|
43
|
-
this
|
|
44
|
-
this
|
|
45
|
-
this
|
|
46
|
-
this
|
|
47
|
-
this
|
|
48
|
-
this
|
|
49
|
-
this
|
|
50
|
-
this
|
|
43
|
+
this.#client = createSignal(client)
|
|
44
|
+
this.#queryFlavor = queryFlavor
|
|
45
|
+
this.#version = version
|
|
46
|
+
this.#onlineManager = onlineManager
|
|
47
|
+
this.#buttonPosition = createSignal(buttonPosition)
|
|
48
|
+
this.#position = createSignal(position)
|
|
49
|
+
this.#initialIsOpen = createSignal(initialIsOpen)
|
|
50
|
+
this.#errorTypes = createSignal(errorTypes)
|
|
51
51
|
}
|
|
52
52
|
|
|
53
53
|
setButtonPosition(position: DevtoolsButtonPosition) {
|
|
54
|
-
this
|
|
54
|
+
this.#buttonPosition[1](position)
|
|
55
55
|
}
|
|
56
56
|
|
|
57
57
|
setPosition(position: DevtoolsPosition) {
|
|
58
|
-
this
|
|
58
|
+
this.#position[1](position)
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
setInitialIsOpen(isOpen: boolean) {
|
|
62
|
-
this
|
|
62
|
+
this.#initialIsOpen[1](isOpen)
|
|
63
63
|
}
|
|
64
64
|
|
|
65
65
|
setErrorTypes(errorTypes: Array<DevToolsErrorType>) {
|
|
66
|
-
this
|
|
66
|
+
this.#errorTypes[1](errorTypes)
|
|
67
67
|
}
|
|
68
68
|
|
|
69
69
|
setClient(client: QueryClient) {
|
|
70
|
-
this
|
|
70
|
+
this.#client[1](client)
|
|
71
71
|
}
|
|
72
72
|
|
|
73
73
|
mount<T extends HTMLElement>(el: T) {
|
|
74
|
-
if (this
|
|
74
|
+
if (this.#isMounted) {
|
|
75
75
|
throw new Error('Devtools is already mounted')
|
|
76
76
|
}
|
|
77
77
|
const dispose = render(() => {
|
|
78
|
-
const [btnPosition] = this
|
|
79
|
-
const [pos] = this
|
|
80
|
-
const [isOpen] = this
|
|
81
|
-
const [errors] = this
|
|
82
|
-
const [queryClient] = this
|
|
78
|
+
const [btnPosition] = this.#buttonPosition
|
|
79
|
+
const [pos] = this.#position
|
|
80
|
+
const [isOpen] = this.#initialIsOpen
|
|
81
|
+
const [errors] = this.#errorTypes
|
|
82
|
+
const [queryClient] = this.#client
|
|
83
83
|
|
|
84
84
|
let Devtools: typeof DevtoolsComponent
|
|
85
85
|
|
|
86
|
-
if (this
|
|
87
|
-
Devtools = this
|
|
86
|
+
if (this.#Component) {
|
|
87
|
+
Devtools = this.#Component
|
|
88
88
|
} else {
|
|
89
89
|
Devtools = lazy(() => import('./Devtools'))
|
|
90
|
-
this
|
|
90
|
+
this.#Component = Devtools
|
|
91
91
|
}
|
|
92
92
|
|
|
93
93
|
return (
|
|
94
94
|
<Devtools
|
|
95
|
-
queryFlavor={this
|
|
96
|
-
version={this
|
|
97
|
-
onlineManager={this
|
|
95
|
+
queryFlavor={this.#queryFlavor}
|
|
96
|
+
version={this.#version}
|
|
97
|
+
onlineManager={this.#onlineManager}
|
|
98
98
|
{...{
|
|
99
99
|
get client() {
|
|
100
100
|
return queryClient()
|
|
@@ -115,16 +115,16 @@ class TanstackQueryDevtools {
|
|
|
115
115
|
/>
|
|
116
116
|
)
|
|
117
117
|
}, el)
|
|
118
|
-
this
|
|
119
|
-
this
|
|
118
|
+
this.#isMounted = true
|
|
119
|
+
this.#dispose = dispose
|
|
120
120
|
}
|
|
121
121
|
|
|
122
122
|
unmount() {
|
|
123
|
-
if (!this
|
|
123
|
+
if (!this.#isMounted) {
|
|
124
124
|
throw new Error('Devtools is not mounted')
|
|
125
125
|
}
|
|
126
|
-
this
|
|
127
|
-
this
|
|
126
|
+
this.#dispose?.()
|
|
127
|
+
this.#isMounted = false
|
|
128
128
|
}
|
|
129
129
|
}
|
|
130
130
|
|