@tanstack/query-devtools 5.100.8 → 5.100.10

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/index.d.cts CHANGED
@@ -1,8 +1,69 @@
1
- export { DevtoolsButtonPosition } from './_tsup-dts-rollup.cjs';
2
- export { DevtoolsErrorType } from './_tsup-dts-rollup.cjs';
3
- export { DevtoolsPosition } from './_tsup-dts-rollup.cjs';
4
- export { Theme } from './_tsup-dts-rollup.cjs';
5
- export { TanstackQueryDevtools_alias_1 as TanstackQueryDevtools } from './_tsup-dts-rollup.cjs';
6
- export { TanstackQueryDevtoolsConfig_alias_1 as TanstackQueryDevtoolsConfig } from './_tsup-dts-rollup.cjs';
7
- export { TanstackQueryDevtoolsPanel_alias_1 as TanstackQueryDevtoolsPanel } from './_tsup-dts-rollup.cjs';
8
- export { TanstackQueryDevtoolsPanelConfig_alias_1 as TanstackQueryDevtoolsPanelConfig } from './_tsup-dts-rollup.cjs';
1
+ import { Query, QueryClient, onlineManager } from '@tanstack/query-core';
2
+
3
+ type XPosition = 'left' | 'right';
4
+ type YPosition = 'top' | 'bottom';
5
+ type DevtoolsPosition = XPosition | YPosition;
6
+ type DevtoolsButtonPosition = `${YPosition}-${XPosition}` | 'relative';
7
+ type Theme = 'dark' | 'light' | 'system';
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?: Array<DevtoolsErrorType>;
27
+ shadowDOMTarget?: ShadowRoot;
28
+ onClose?: () => void;
29
+ hideDisabledQueries?: boolean;
30
+ theme?: Theme;
31
+ }
32
+
33
+ interface TanstackQueryDevtoolsConfig extends QueryDevtoolsProps {
34
+ styleNonce?: string;
35
+ shadowDOMTarget?: ShadowRoot;
36
+ }
37
+ declare class TanstackQueryDevtools {
38
+ #private;
39
+ constructor(config: TanstackQueryDevtoolsConfig);
40
+ setButtonPosition(position: DevtoolsButtonPosition): void;
41
+ setPosition(position: DevtoolsPosition): void;
42
+ setInitialIsOpen(isOpen: boolean): void;
43
+ setErrorTypes(errorTypes: Array<DevtoolsErrorType>): void;
44
+ setClient(client: QueryClient): void;
45
+ setTheme(theme?: Theme): void;
46
+ mount<T extends HTMLElement>(el: T): void;
47
+ unmount(): void;
48
+ }
49
+
50
+ interface TanstackQueryDevtoolsPanelConfig extends QueryDevtoolsProps {
51
+ styleNonce?: string;
52
+ shadowDOMTarget?: ShadowRoot;
53
+ onClose?: () => void;
54
+ }
55
+ declare class TanstackQueryDevtoolsPanel {
56
+ #private;
57
+ constructor(config: TanstackQueryDevtoolsPanelConfig);
58
+ setButtonPosition(position: DevtoolsButtonPosition): void;
59
+ setPosition(position: DevtoolsPosition): void;
60
+ setInitialIsOpen(isOpen: boolean): void;
61
+ setErrorTypes(errorTypes: Array<DevtoolsErrorType>): void;
62
+ setClient(client: QueryClient): void;
63
+ setOnClose(onClose: () => void): void;
64
+ setTheme(theme?: Theme): void;
65
+ mount<T extends HTMLElement>(el: T): void;
66
+ unmount(): void;
67
+ }
68
+
69
+ export { type DevtoolsButtonPosition, type DevtoolsErrorType, type DevtoolsPosition, TanstackQueryDevtools, type TanstackQueryDevtoolsConfig, TanstackQueryDevtoolsPanel, type TanstackQueryDevtoolsPanelConfig, type Theme };
package/build/index.d.ts CHANGED
@@ -1,8 +1,69 @@
1
- export { DevtoolsButtonPosition } from './_tsup-dts-rollup.js';
2
- export { DevtoolsErrorType } from './_tsup-dts-rollup.js';
3
- export { DevtoolsPosition } from './_tsup-dts-rollup.js';
4
- export { Theme } from './_tsup-dts-rollup.js';
5
- export { TanstackQueryDevtools_alias_1 as TanstackQueryDevtools } from './_tsup-dts-rollup.js';
6
- export { TanstackQueryDevtoolsConfig_alias_1 as TanstackQueryDevtoolsConfig } from './_tsup-dts-rollup.js';
7
- export { TanstackQueryDevtoolsPanel_alias_1 as TanstackQueryDevtoolsPanel } from './_tsup-dts-rollup.js';
8
- export { TanstackQueryDevtoolsPanelConfig_alias_1 as TanstackQueryDevtoolsPanelConfig } from './_tsup-dts-rollup.js';
1
+ import { Query, QueryClient, onlineManager } from '@tanstack/query-core';
2
+
3
+ type XPosition = 'left' | 'right';
4
+ type YPosition = 'top' | 'bottom';
5
+ type DevtoolsPosition = XPosition | YPosition;
6
+ type DevtoolsButtonPosition = `${YPosition}-${XPosition}` | 'relative';
7
+ type Theme = 'dark' | 'light' | 'system';
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?: Array<DevtoolsErrorType>;
27
+ shadowDOMTarget?: ShadowRoot;
28
+ onClose?: () => void;
29
+ hideDisabledQueries?: boolean;
30
+ theme?: Theme;
31
+ }
32
+
33
+ interface TanstackQueryDevtoolsConfig extends QueryDevtoolsProps {
34
+ styleNonce?: string;
35
+ shadowDOMTarget?: ShadowRoot;
36
+ }
37
+ declare class TanstackQueryDevtools {
38
+ #private;
39
+ constructor(config: TanstackQueryDevtoolsConfig);
40
+ setButtonPosition(position: DevtoolsButtonPosition): void;
41
+ setPosition(position: DevtoolsPosition): void;
42
+ setInitialIsOpen(isOpen: boolean): void;
43
+ setErrorTypes(errorTypes: Array<DevtoolsErrorType>): void;
44
+ setClient(client: QueryClient): void;
45
+ setTheme(theme?: Theme): void;
46
+ mount<T extends HTMLElement>(el: T): void;
47
+ unmount(): void;
48
+ }
49
+
50
+ interface TanstackQueryDevtoolsPanelConfig extends QueryDevtoolsProps {
51
+ styleNonce?: string;
52
+ shadowDOMTarget?: ShadowRoot;
53
+ onClose?: () => void;
54
+ }
55
+ declare class TanstackQueryDevtoolsPanel {
56
+ #private;
57
+ constructor(config: TanstackQueryDevtoolsPanelConfig);
58
+ setButtonPosition(position: DevtoolsButtonPosition): void;
59
+ setPosition(position: DevtoolsPosition): void;
60
+ setInitialIsOpen(isOpen: boolean): void;
61
+ setErrorTypes(errorTypes: Array<DevtoolsErrorType>): void;
62
+ setClient(client: QueryClient): void;
63
+ setOnClose(onClose: () => void): void;
64
+ setTheme(theme?: Theme): void;
65
+ mount<T extends HTMLElement>(el: T): void;
66
+ unmount(): void;
67
+ }
68
+
69
+ export { type DevtoolsButtonPosition, type DevtoolsErrorType, type DevtoolsPosition, TanstackQueryDevtools, type TanstackQueryDevtoolsConfig, TanstackQueryDevtoolsPanel, type TanstackQueryDevtoolsPanelConfig, type Theme };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tanstack/query-devtools",
3
- "version": "5.100.8",
3
+ "version": "5.100.10",
4
4
  "description": "Developer tools to interact with and visualize the TanStack Query cache",
5
5
  "author": "tannerlinsley",
6
6
  "license": "MIT",
@@ -48,6 +48,7 @@
48
48
  "@solid-primitives/keyed": "^1.2.2",
49
49
  "@solid-primitives/resize-observer": "^2.0.26",
50
50
  "@solid-primitives/storage": "^1.3.11",
51
+ "@solidjs/testing-library": "^0.8.10",
51
52
  "@tanstack/match-sorter-utils": "^8.19.4",
52
53
  "clsx": "^2.1.1",
53
54
  "goober": "^2.1.16",
@@ -57,7 +58,7 @@
57
58
  "superjson": "^2.2.2",
58
59
  "tsup-preset-solid": "^2.2.0",
59
60
  "vite-plugin-solid": "^2.11.6",
60
- "@tanstack/query-core": "5.100.8"
61
+ "@tanstack/query-core": "5.100.10"
61
62
  },
62
63
  "scripts": {
63
64
  "clean": "premove ./build ./coverage ./dist-ts",
@@ -34,7 +34,7 @@ class TanstackQueryDevtoolsPanel {
34
34
  #initialIsOpen: Signal<boolean | undefined>
35
35
  #errorTypes: Signal<Array<DevtoolsErrorType> | undefined>
36
36
  #hideDisabledQueries: Signal<boolean | undefined>
37
- #onClose: Signal<(() => unknown) | undefined>
37
+ #onClose: Signal<(() => void) | undefined>
38
38
  #Component: DevtoolsComponentType | undefined
39
39
  #theme: Signal<Theme | undefined>
40
40
  #dispose?: () => void
@@ -90,7 +90,7 @@ class TanstackQueryDevtoolsPanel {
90
90
  this.#client[1](client)
91
91
  }
92
92
 
93
- setOnClose(onClose: () => unknown) {
93
+ setOnClose(onClose: () => void) {
94
94
  this.#onClose[1](() => onClose)
95
95
  }
96
96