@tanstack/query-devtools 5.0.0-alpha.86 → 5.0.0-alpha.87
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/Devtools/OYHFZDAP.jsx +6711 -0
- package/build/Devtools/QBS7PB6D.js +5885 -0
- package/build/Devtools/QPWQM7BG.js +6068 -0
- package/build/Devtools/RZF5MSB2.jsx +6637 -0
- package/build/chunk/DFC6JMPR.jsx +1280 -0
- package/build/chunk/LOJK4LQB.jsx +1280 -0
- package/{dist/esm/index-7b089165.js → build/chunk/MZOCHHZD.js} +648 -416
- package/{dist/cjs/index-94a2ab18.cjs → build/chunk/YHTPXJWR.js} +648 -446
- package/build/dev.cjs +8116 -0
- package/build/dev.js +99 -0
- package/build/dev.jsx +98 -0
- package/build/index.cjs +7940 -0
- package/build/index.d.cts +55 -0
- package/build/index.d.ts +55 -0
- package/build/index.js +99 -0
- package/build/index.jsx +98 -0
- package/package.json +24 -18
- package/dist/cjs/Devtools-5eee2153.cjs +0 -6764
- package/dist/cjs/Devtools-5eee2153.cjs.map +0 -1
- package/dist/cjs/index-94a2ab18.cjs.map +0 -1
- package/dist/cjs/index.cjs +0 -8
- package/dist/cjs/index.cjs.map +0 -1
- package/dist/esm/Devtools-74e35f67.js +0 -6756
- package/dist/esm/Devtools-74e35f67.js.map +0 -1
- package/dist/esm/index-7b089165.js.map +0 -1
- package/dist/esm/index.js +0 -2
- package/dist/esm/index.js.map +0 -1
- package/dist/source/Context.js +0 -10
- package/dist/source/Devtools.jsx +0 -1510
- package/dist/source/Explorer.jsx +0 -264
- package/dist/source/fonts.js +0 -7
- package/dist/source/icons/index.jsx +0 -344
- package/dist/source/index.jsx +0 -88
- package/dist/source/theme.js +0 -304
- package/dist/source/utils.jsx +0 -77
- package/dist/types/Context.d.ts +0 -28
- package/dist/types/Devtools.d.ts +0 -22
- package/dist/types/Explorer.d.ts +0 -21
- package/dist/types/fonts.d.ts +0 -1
- package/dist/types/icons/index.d.ts +0 -11
- package/dist/types/index.d.ts +0 -29
- package/dist/types/theme.d.ts +0 -296
- package/dist/types/utils.d.ts +0 -23
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { Query, QueryClient, onlineManager } from '@tanstack/query-core';
|
|
2
|
+
import { Component, Signal } from 'solid-js';
|
|
3
|
+
|
|
4
|
+
type XPosition = 'left' | 'right';
|
|
5
|
+
type YPosition = 'top' | 'bottom';
|
|
6
|
+
type DevtoolsPosition = XPosition | YPosition;
|
|
7
|
+
type DevtoolsButtonPosition = `${YPosition}-${XPosition}`;
|
|
8
|
+
interface DevToolsErrorType {
|
|
9
|
+
/**
|
|
10
|
+
* The name of the error.
|
|
11
|
+
*/
|
|
12
|
+
name: string;
|
|
13
|
+
/**
|
|
14
|
+
* How the error is initialized.
|
|
15
|
+
*/
|
|
16
|
+
initializer: (query: Query) => Error;
|
|
17
|
+
}
|
|
18
|
+
interface QueryDevtoolsProps {
|
|
19
|
+
readonly client: QueryClient;
|
|
20
|
+
queryFlavor: string;
|
|
21
|
+
version: string;
|
|
22
|
+
onlineManager: typeof onlineManager;
|
|
23
|
+
buttonPosition?: DevtoolsButtonPosition;
|
|
24
|
+
position?: DevtoolsPosition;
|
|
25
|
+
initialIsOpen?: boolean;
|
|
26
|
+
errorTypes?: DevToolsErrorType[];
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
declare const DevtoolsComponent: Component<QueryDevtoolsProps>;
|
|
30
|
+
|
|
31
|
+
interface TanstackQueryDevtoolsConfig extends QueryDevtoolsProps {
|
|
32
|
+
}
|
|
33
|
+
declare class TanstackQueryDevtools {
|
|
34
|
+
client: Signal<QueryClient>;
|
|
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<DevToolsErrorType[] | undefined>;
|
|
43
|
+
Component: typeof DevtoolsComponent | undefined;
|
|
44
|
+
dispose?: () => void;
|
|
45
|
+
constructor(config: TanstackQueryDevtoolsConfig);
|
|
46
|
+
setButtonPosition(position: DevtoolsButtonPosition): void;
|
|
47
|
+
setPosition(position: DevtoolsPosition): void;
|
|
48
|
+
setInitialIsOpen(isOpen: boolean): void;
|
|
49
|
+
setErrorTypes(errorTypes: DevToolsErrorType[]): void;
|
|
50
|
+
setClient(client: QueryClient): void;
|
|
51
|
+
mount<T extends HTMLElement>(el: T): void;
|
|
52
|
+
unmount(): void;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export { DevToolsErrorType, DevtoolsButtonPosition, DevtoolsPosition, TanstackQueryDevtools, TanstackQueryDevtoolsConfig };
|
package/build/index.d.ts
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { Query, QueryClient, onlineManager } from '@tanstack/query-core';
|
|
2
|
+
import { Component, Signal } from 'solid-js';
|
|
3
|
+
|
|
4
|
+
type XPosition = 'left' | 'right';
|
|
5
|
+
type YPosition = 'top' | 'bottom';
|
|
6
|
+
type DevtoolsPosition = XPosition | YPosition;
|
|
7
|
+
type DevtoolsButtonPosition = `${YPosition}-${XPosition}`;
|
|
8
|
+
interface DevToolsErrorType {
|
|
9
|
+
/**
|
|
10
|
+
* The name of the error.
|
|
11
|
+
*/
|
|
12
|
+
name: string;
|
|
13
|
+
/**
|
|
14
|
+
* How the error is initialized.
|
|
15
|
+
*/
|
|
16
|
+
initializer: (query: Query) => Error;
|
|
17
|
+
}
|
|
18
|
+
interface QueryDevtoolsProps {
|
|
19
|
+
readonly client: QueryClient;
|
|
20
|
+
queryFlavor: string;
|
|
21
|
+
version: string;
|
|
22
|
+
onlineManager: typeof onlineManager;
|
|
23
|
+
buttonPosition?: DevtoolsButtonPosition;
|
|
24
|
+
position?: DevtoolsPosition;
|
|
25
|
+
initialIsOpen?: boolean;
|
|
26
|
+
errorTypes?: DevToolsErrorType[];
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
declare const DevtoolsComponent: Component<QueryDevtoolsProps>;
|
|
30
|
+
|
|
31
|
+
interface TanstackQueryDevtoolsConfig extends QueryDevtoolsProps {
|
|
32
|
+
}
|
|
33
|
+
declare class TanstackQueryDevtools {
|
|
34
|
+
client: Signal<QueryClient>;
|
|
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<DevToolsErrorType[] | undefined>;
|
|
43
|
+
Component: typeof DevtoolsComponent | undefined;
|
|
44
|
+
dispose?: () => void;
|
|
45
|
+
constructor(config: TanstackQueryDevtoolsConfig);
|
|
46
|
+
setButtonPosition(position: DevtoolsButtonPosition): void;
|
|
47
|
+
setPosition(position: DevtoolsPosition): void;
|
|
48
|
+
setInitialIsOpen(isOpen: boolean): void;
|
|
49
|
+
setErrorTypes(errorTypes: DevToolsErrorType[]): void;
|
|
50
|
+
setClient(client: QueryClient): void;
|
|
51
|
+
mount<T extends HTMLElement>(el: T): void;
|
|
52
|
+
unmount(): void;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export { DevToolsErrorType, DevtoolsButtonPosition, DevtoolsPosition, TanstackQueryDevtools, TanstackQueryDevtoolsConfig };
|
package/build/index.js
ADDED
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import { createSignal, render, lazy, createComponent, mergeProps } from './chunk/MZOCHHZD.js';
|
|
2
|
+
|
|
3
|
+
// src/index.tsx
|
|
4
|
+
var TanstackQueryDevtools = class {
|
|
5
|
+
isMounted = false;
|
|
6
|
+
constructor(config) {
|
|
7
|
+
const {
|
|
8
|
+
client,
|
|
9
|
+
queryFlavor,
|
|
10
|
+
version,
|
|
11
|
+
onlineManager,
|
|
12
|
+
buttonPosition,
|
|
13
|
+
position,
|
|
14
|
+
initialIsOpen,
|
|
15
|
+
errorTypes
|
|
16
|
+
} = config;
|
|
17
|
+
this.client = createSignal(client);
|
|
18
|
+
this.queryFlavor = queryFlavor;
|
|
19
|
+
this.version = version;
|
|
20
|
+
this.onlineManager = onlineManager;
|
|
21
|
+
this.buttonPosition = createSignal(buttonPosition);
|
|
22
|
+
this.position = createSignal(position);
|
|
23
|
+
this.initialIsOpen = createSignal(initialIsOpen);
|
|
24
|
+
this.errorTypes = createSignal(errorTypes);
|
|
25
|
+
}
|
|
26
|
+
setButtonPosition(position) {
|
|
27
|
+
this.buttonPosition[1](position);
|
|
28
|
+
}
|
|
29
|
+
setPosition(position) {
|
|
30
|
+
this.position[1](position);
|
|
31
|
+
}
|
|
32
|
+
setInitialIsOpen(isOpen) {
|
|
33
|
+
this.initialIsOpen[1](isOpen);
|
|
34
|
+
}
|
|
35
|
+
setErrorTypes(errorTypes) {
|
|
36
|
+
this.errorTypes[1](errorTypes);
|
|
37
|
+
}
|
|
38
|
+
setClient(client) {
|
|
39
|
+
this.client[1](client);
|
|
40
|
+
}
|
|
41
|
+
mount(el) {
|
|
42
|
+
if (this.isMounted) {
|
|
43
|
+
throw new Error("Devtools is already mounted");
|
|
44
|
+
}
|
|
45
|
+
const dispose = render(() => {
|
|
46
|
+
const [btnPosition] = this.buttonPosition;
|
|
47
|
+
const [pos] = this.position;
|
|
48
|
+
const [isOpen] = this.initialIsOpen;
|
|
49
|
+
const [errors] = this.errorTypes;
|
|
50
|
+
const [queryClient] = this.client;
|
|
51
|
+
let Devtools;
|
|
52
|
+
if (this.Component) {
|
|
53
|
+
Devtools = this.Component;
|
|
54
|
+
} else {
|
|
55
|
+
Devtools = lazy(() => import('./Devtools/QBS7PB6D.js'));
|
|
56
|
+
this.Component = Devtools;
|
|
57
|
+
}
|
|
58
|
+
const _self$ = this;
|
|
59
|
+
return createComponent(Devtools, mergeProps({
|
|
60
|
+
get queryFlavor() {
|
|
61
|
+
return _self$.queryFlavor;
|
|
62
|
+
},
|
|
63
|
+
get version() {
|
|
64
|
+
return _self$.version;
|
|
65
|
+
},
|
|
66
|
+
get onlineManager() {
|
|
67
|
+
return _self$.onlineManager;
|
|
68
|
+
}
|
|
69
|
+
}, {
|
|
70
|
+
get client() {
|
|
71
|
+
return queryClient();
|
|
72
|
+
},
|
|
73
|
+
get buttonPosition() {
|
|
74
|
+
return btnPosition();
|
|
75
|
+
},
|
|
76
|
+
get position() {
|
|
77
|
+
return pos();
|
|
78
|
+
},
|
|
79
|
+
get initialIsOpen() {
|
|
80
|
+
return isOpen();
|
|
81
|
+
},
|
|
82
|
+
get errorTypes() {
|
|
83
|
+
return errors();
|
|
84
|
+
}
|
|
85
|
+
}));
|
|
86
|
+
}, el);
|
|
87
|
+
this.isMounted = true;
|
|
88
|
+
this.dispose = dispose;
|
|
89
|
+
}
|
|
90
|
+
unmount() {
|
|
91
|
+
if (!this.isMounted) {
|
|
92
|
+
throw new Error("Devtools is not mounted");
|
|
93
|
+
}
|
|
94
|
+
this.dispose?.();
|
|
95
|
+
this.isMounted = false;
|
|
96
|
+
}
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
export { TanstackQueryDevtools };
|
package/build/index.jsx
ADDED
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createSignal,
|
|
3
|
+
lazy,
|
|
4
|
+
render
|
|
5
|
+
} from "./chunk/LOJK4LQB.jsx";
|
|
6
|
+
|
|
7
|
+
// src/index.tsx
|
|
8
|
+
var TanstackQueryDevtools = class {
|
|
9
|
+
constructor(config) {
|
|
10
|
+
this.isMounted = false;
|
|
11
|
+
const {
|
|
12
|
+
client,
|
|
13
|
+
queryFlavor,
|
|
14
|
+
version,
|
|
15
|
+
onlineManager,
|
|
16
|
+
buttonPosition,
|
|
17
|
+
position,
|
|
18
|
+
initialIsOpen,
|
|
19
|
+
errorTypes
|
|
20
|
+
} = config;
|
|
21
|
+
this.client = createSignal(client);
|
|
22
|
+
this.queryFlavor = queryFlavor;
|
|
23
|
+
this.version = version;
|
|
24
|
+
this.onlineManager = onlineManager;
|
|
25
|
+
this.buttonPosition = createSignal(buttonPosition);
|
|
26
|
+
this.position = createSignal(position);
|
|
27
|
+
this.initialIsOpen = createSignal(initialIsOpen);
|
|
28
|
+
this.errorTypes = createSignal(errorTypes);
|
|
29
|
+
}
|
|
30
|
+
setButtonPosition(position) {
|
|
31
|
+
this.buttonPosition[1](position);
|
|
32
|
+
}
|
|
33
|
+
setPosition(position) {
|
|
34
|
+
this.position[1](position);
|
|
35
|
+
}
|
|
36
|
+
setInitialIsOpen(isOpen) {
|
|
37
|
+
this.initialIsOpen[1](isOpen);
|
|
38
|
+
}
|
|
39
|
+
setErrorTypes(errorTypes) {
|
|
40
|
+
this.errorTypes[1](errorTypes);
|
|
41
|
+
}
|
|
42
|
+
setClient(client) {
|
|
43
|
+
this.client[1](client);
|
|
44
|
+
}
|
|
45
|
+
mount(el) {
|
|
46
|
+
if (this.isMounted) {
|
|
47
|
+
throw new Error("Devtools is already mounted");
|
|
48
|
+
}
|
|
49
|
+
const dispose = render(() => {
|
|
50
|
+
const [btnPosition] = this.buttonPosition;
|
|
51
|
+
const [pos] = this.position;
|
|
52
|
+
const [isOpen] = this.initialIsOpen;
|
|
53
|
+
const [errors] = this.errorTypes;
|
|
54
|
+
const [queryClient] = this.client;
|
|
55
|
+
let Devtools;
|
|
56
|
+
if (this.Component) {
|
|
57
|
+
Devtools = this.Component;
|
|
58
|
+
} else {
|
|
59
|
+
Devtools = lazy(() => import("./Devtools/RZF5MSB2.jsx"));
|
|
60
|
+
this.Component = Devtools;
|
|
61
|
+
}
|
|
62
|
+
return <Devtools
|
|
63
|
+
queryFlavor={this.queryFlavor}
|
|
64
|
+
version={this.version}
|
|
65
|
+
onlineManager={this.onlineManager}
|
|
66
|
+
{...{
|
|
67
|
+
get client() {
|
|
68
|
+
return queryClient();
|
|
69
|
+
},
|
|
70
|
+
get buttonPosition() {
|
|
71
|
+
return btnPosition();
|
|
72
|
+
},
|
|
73
|
+
get position() {
|
|
74
|
+
return pos();
|
|
75
|
+
},
|
|
76
|
+
get initialIsOpen() {
|
|
77
|
+
return isOpen();
|
|
78
|
+
},
|
|
79
|
+
get errorTypes() {
|
|
80
|
+
return errors();
|
|
81
|
+
}
|
|
82
|
+
}}
|
|
83
|
+
/>;
|
|
84
|
+
}, el);
|
|
85
|
+
this.isMounted = true;
|
|
86
|
+
this.dispose = dispose;
|
|
87
|
+
}
|
|
88
|
+
unmount() {
|
|
89
|
+
if (!this.isMounted) {
|
|
90
|
+
throw new Error("Devtools is not mounted");
|
|
91
|
+
}
|
|
92
|
+
this.dispose?.();
|
|
93
|
+
this.isMounted = false;
|
|
94
|
+
}
|
|
95
|
+
};
|
|
96
|
+
export {
|
|
97
|
+
TanstackQueryDevtools
|
|
98
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tanstack/query-devtools",
|
|
3
|
-
"version": "5.0.0-alpha.
|
|
3
|
+
"version": "5.0.0-alpha.87",
|
|
4
4
|
"description": "Developer tools to interact with and visualize the TanStack Query cache",
|
|
5
5
|
"author": "tannerlinsley",
|
|
6
6
|
"license": "MIT",
|
|
@@ -11,25 +11,30 @@
|
|
|
11
11
|
"url": "https://github.com/sponsors/tannerlinsley"
|
|
12
12
|
},
|
|
13
13
|
"type": "module",
|
|
14
|
-
"
|
|
15
|
-
"
|
|
16
|
-
"
|
|
14
|
+
"main": "./build/index.cjs",
|
|
15
|
+
"module": "./build/index.js",
|
|
16
|
+
"types": "./build/index.d.ts",
|
|
17
|
+
"browser": {},
|
|
17
18
|
"exports": {
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
"
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
"
|
|
19
|
+
"solid": {
|
|
20
|
+
"development": "./build/dev.jsx",
|
|
21
|
+
"import": "./build/index.jsx"
|
|
22
|
+
},
|
|
23
|
+
"development": {
|
|
24
|
+
"import": {
|
|
25
|
+
"types": "./build/index.d.ts",
|
|
26
|
+
"default": "./build/dev.js"
|
|
25
27
|
},
|
|
26
|
-
"require": "./
|
|
27
|
-
|
|
28
|
+
"require": "./build/dev.cjs"
|
|
29
|
+
},
|
|
30
|
+
"import": {
|
|
31
|
+
"types": "./build/index.d.ts",
|
|
32
|
+
"default": "./build/index.js"
|
|
28
33
|
},
|
|
29
|
-
"
|
|
34
|
+
"require": "./build/index.cjs"
|
|
30
35
|
},
|
|
31
36
|
"files": [
|
|
32
|
-
"
|
|
37
|
+
"build",
|
|
33
38
|
"src"
|
|
34
39
|
],
|
|
35
40
|
"dependencies": {
|
|
@@ -43,16 +48,17 @@
|
|
|
43
48
|
"superjson": "^1.12.4"
|
|
44
49
|
},
|
|
45
50
|
"devDependencies": {
|
|
51
|
+
"tsup-preset-solid": "^0.1.8",
|
|
46
52
|
"vite-plugin-solid": "^2.5.0",
|
|
47
|
-
"@tanstack/query-core": "5.0.0-alpha.
|
|
53
|
+
"@tanstack/query-core": "5.0.0-alpha.87"
|
|
48
54
|
},
|
|
49
55
|
"scripts": {
|
|
50
|
-
"clean": "rimraf ./
|
|
56
|
+
"clean": "rimraf ./build && rimraf ./coverage",
|
|
51
57
|
"test:eslint": "eslint --ext .ts,.tsx ./src",
|
|
52
58
|
"test:types": "tsc --noEmit",
|
|
53
59
|
"test:lib": "vitest run --coverage",
|
|
54
60
|
"test:lib:dev": "pnpm run test:lib --watch",
|
|
55
61
|
"test:build": "publint --strict",
|
|
56
|
-
"build": "
|
|
62
|
+
"build": "tsup"
|
|
57
63
|
}
|
|
58
64
|
}
|