Open History to see the last commit
1import type {
2 DevtoolsButtonPosition,
3 DevtoolsErrorType,
4 DevtoolsPosition,
5 Theme,
6} from '@tanstack/query-devtools'
7import type { QueryClient } from '@tanstack/vue-query'
8β
9export interface DevtoolsOptions {
10 /**
11 * Set this true if you want the dev tools to default to being open
12 */
13 initialIsOpen?: boolean
14 /**
15 * The position of the React Query logo to open and close the devtools panel.
16 * 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right'
17 * Defaults to 'bottom-right'.
18 */
19 buttonPosition?: DevtoolsButtonPosition
20 /**
21 * The position of the React Query devtools panel.
22 * 'top' | 'bottom' | 'left' | 'right'
23 * Defaults to 'bottom'.
24 */
25 position?: DevtoolsPosition
26 /**
27 * Custom instance of QueryClient
28 */
29 client?: QueryClient
30 /**
31 * Use this so you can define custom errors that can be shown in the devtools.
32 */
33 errorTypes?: Array<DevtoolsErrorType>
34 /**
35 * Use this to pass a nonce to the style tag that is added to the document head. This is useful if you are using a Content Security Policy (CSP) nonce to allow inline styles.
36 */
37 styleNonce?: string
38 /**
39 * Use this so you can attach the devtool's styles to specific element in the DOM.
40 */
41 shadowDOMTarget?: ShadowRoot
42 /**
43 * Set this to true to hide disabled queries from the devtools panel.
44 */
45 hideDisabledQueries?: boolean
46 /**
47 * Set this to 'light', 'dark', or 'system' to change the theme of the devtools panel.
48 * Defaults to 'system'.
49 */
50 theme?: Theme
51}
52β
53export interface DevtoolsPanelOptions {
54 /**
55 * Custom instance of QueryClient
56 */
57 client?: QueryClient
58 /**
59 * Use this so you can define custom errors that can be shown in the devtools.
60 */
61 errorTypes?: Array<DevtoolsErrorType>
62 /**
63 * Use this to pass a nonce to the style tag that is added to the document head. This is useful if you are using a Content Security Policy (CSP) nonce to allow inline styles.
64 */
65 styleNonce?: string
66 /**
67 * Use this so you can attach the devtool's styles to specific element in the DOM.
68 */
69 shadowDOMTarget?: ShadowRoot
70β
71 /**
72 * Custom styles for the devtools panel
73 * @default { height: '500px' }
74 * @example { height: '100%' }
75 * @example { height: '100%', width: '100%' }
76 */
77 style?: React.CSSProperties
78β
79 /**
80 * Callback function that is called when the devtools panel is closed
81 */
82 onClose?: () => unknown
83 /**
84 * Set this to true to hide disabled queries from the devtools panel.
85 */
86 hideDisabledQueries?: boolean
87 /**
88 * Set this to 'light', 'dark', or 'system' to change the theme of the devtools panel.
89 * Defaults to 'system'.
90 */
91 theme?: Theme
92}