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β
9/**
10 * The props of `VueQueryDevtools`, which renders the devtools with a toggle button that opens them.
11 */
12export interface DevtoolsOptions {
13 /**
14 * Set this true if you want the dev tools to default to being open
15 */
16 initialIsOpen?: boolean
17 /**
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 * @defaultValue bottom-right
21 */
22 buttonPosition?: DevtoolsButtonPosition
23 /**
24 * The position of the Vue Query devtools panel.
25 * 'top' | 'bottom' | 'left' | 'right'
26 * @defaultValue bottom
27 */
28 position?: DevtoolsPosition
29 /**
30 * Custom instance of QueryClient
31 */
32 client?: QueryClient
33 /**
34 * Use this so you can define custom errors that can be shown in the devtools.
35 */
36 errorTypes?: Array<DevtoolsErrorType>
37 /**
38 * 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.
39 */
40 styleNonce?: string
41 /**
42 * Use this to pass a shadow DOM target to the devtools so that the styles will be applied
43 * within the shadow DOM instead of within the head tag in the light DOM.
44 */
45 shadowDOMTarget?: ShadowRoot
46 /**
47 * Set this to true to hide disabled queries from the devtools panel.
48 */
49 hideDisabledQueries?: boolean
50 /**
51 * Set this to 'light', 'dark', or 'system' to change the theme of the devtools panel.
52 * @defaultValue system
53 */
54 theme?: Theme
55}
56β
57/**
58 * The props of `VueQueryDevtoolsPanel`, which renders the devtools panel inline.
59 */
60export interface DevtoolsPanelOptions {
61 /**
62 * Custom instance of QueryClient
63 */
64 client?: QueryClient
65 /**
66 * Use this so you can define custom errors that can be shown in the devtools.
67 */
68 errorTypes?: Array<DevtoolsErrorType>
69 /**
70 * 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.
71 */
72 styleNonce?: string
73 /**
74 * Use this to pass a shadow DOM target to the devtools so that the styles will be applied
75 * within the shadow DOM instead of within the head tag in the light DOM.
76 */
77 shadowDOMTarget?: ShadowRoot
78β
79 /**
80 * Custom styles for the devtools panel
81 * @default { height: '500px' }
82 * @example { height: '100%' }
83 * @example { height: '100%', width: '100%' }
84 */
85 style?: Partial<CSSStyleDeclaration>
86β
87 /**
88 * Callback function that is called when the devtools panel is closed
89 */
90 onClose?: () => void
91 /**
92 * Set this to true to hide disabled queries from the devtools panel.
93 */
94 hideDisabledQueries?: boolean
95 /**
96 * Set this to 'light', 'dark', or 'system' to change the theme of the devtools panel.
97 * @defaultValue system
98 */
99 theme?: Theme
100}