@tanstack/react-query-devtools 5.0.0-alpha.26 → 5.0.0-alpha.27

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.
Files changed (159) hide show
  1. package/build/lib/__tests__/devtools.test.d.ts +0 -1
  2. package/build/lib/__tests__/devtools.test.d.ts.map +1 -1
  3. package/build/lib/devtools.d.ts +8 -30
  4. package/build/lib/devtools.d.ts.map +1 -1
  5. package/build/lib/devtools.esm.js +47 -226
  6. package/build/lib/devtools.esm.js.map +1 -1
  7. package/build/lib/devtools.js +45 -244
  8. package/build/lib/devtools.js.map +1 -1
  9. package/build/lib/devtools.mjs +47 -225
  10. package/build/lib/devtools.mjs.map +1 -1
  11. package/build/lib/index.d.ts +0 -1
  12. package/build/lib/index.d.ts.map +1 -1
  13. package/build/lib/index.esm.js +8 -5
  14. package/build/lib/index.esm.js.map +1 -1
  15. package/build/lib/index.js +7 -5
  16. package/build/lib/index.js.map +1 -1
  17. package/build/lib/index.mjs +8 -5
  18. package/build/lib/index.mjs.map +1 -1
  19. package/build/lib/index.prod.d.ts +0 -1
  20. package/build/lib/index.prod.esm.js +7901 -1501
  21. package/build/lib/index.prod.esm.js.map +1 -1
  22. package/build/lib/index.prod.js +7909 -1528
  23. package/build/lib/index.prod.js.map +1 -1
  24. package/build/lib/index.prod.mjs +7922 -1489
  25. package/build/lib/index.prod.mjs.map +1 -1
  26. package/build/umd/index.development.js +7146 -2375
  27. package/build/umd/index.development.js.map +1 -1
  28. package/build/umd/index.production.js +1 -1
  29. package/build/umd/index.production.js.map +1 -1
  30. package/package.json +2 -3
  31. package/src/__tests__/devtools.test.tsx +1 -1135
  32. package/src/devtools.tsx +52 -306
  33. package/src/index.ts +6 -6
  34. package/build/lib/CachePanel/ActiveQuery.d.ts +0 -19
  35. package/build/lib/CachePanel/ActiveQuery.d.ts.map +0 -1
  36. package/build/lib/CachePanel/ActiveQuery.esm.js +0 -277
  37. package/build/lib/CachePanel/ActiveQuery.esm.js.map +0 -1
  38. package/build/lib/CachePanel/ActiveQuery.js +0 -281
  39. package/build/lib/CachePanel/ActiveQuery.js.map +0 -1
  40. package/build/lib/CachePanel/ActiveQuery.mjs +0 -261
  41. package/build/lib/CachePanel/ActiveQuery.mjs.map +0 -1
  42. package/build/lib/CachePanel/CachePanel.d.ts +0 -58
  43. package/build/lib/CachePanel/CachePanel.d.ts.map +0 -1
  44. package/build/lib/CachePanel/CachePanel.esm.js +0 -310
  45. package/build/lib/CachePanel/CachePanel.esm.js.map +0 -1
  46. package/build/lib/CachePanel/CachePanel.js +0 -315
  47. package/build/lib/CachePanel/CachePanel.js.map +0 -1
  48. package/build/lib/CachePanel/CachePanel.mjs +0 -310
  49. package/build/lib/CachePanel/CachePanel.mjs.map +0 -1
  50. package/build/lib/CachePanel/Header/QueryStatusCount.d.ts +0 -8
  51. package/build/lib/CachePanel/Header/QueryStatusCount.d.ts.map +0 -1
  52. package/build/lib/CachePanel/Header/QueryStatusCount.esm.js +0 -49
  53. package/build/lib/CachePanel/Header/QueryStatusCount.esm.js.map +0 -1
  54. package/build/lib/CachePanel/Header/QueryStatusCount.js +0 -53
  55. package/build/lib/CachePanel/Header/QueryStatusCount.js.map +0 -1
  56. package/build/lib/CachePanel/Header/QueryStatusCount.mjs +0 -49
  57. package/build/lib/CachePanel/Header/QueryStatusCount.mjs.map +0 -1
  58. package/build/lib/CachePanel/QueryRow.d.ts +0 -14
  59. package/build/lib/CachePanel/QueryRow.d.ts.map +0 -1
  60. package/build/lib/CachePanel/QueryRow.esm.js +0 -98
  61. package/build/lib/CachePanel/QueryRow.esm.js.map +0 -1
  62. package/build/lib/CachePanel/QueryRow.js +0 -102
  63. package/build/lib/CachePanel/QueryRow.js.map +0 -1
  64. package/build/lib/CachePanel/QueryRow.mjs +0 -82
  65. package/build/lib/CachePanel/QueryRow.mjs.map +0 -1
  66. package/build/lib/Explorer.d.ts +0 -51
  67. package/build/lib/Explorer.d.ts.map +0 -1
  68. package/build/lib/Explorer.esm.js +0 -254
  69. package/build/lib/Explorer.esm.js.map +0 -1
  70. package/build/lib/Explorer.js +0 -288
  71. package/build/lib/Explorer.js.map +0 -1
  72. package/build/lib/Explorer.mjs +0 -254
  73. package/build/lib/Explorer.mjs.map +0 -1
  74. package/build/lib/Logo.d.ts +0 -2
  75. package/build/lib/Logo.esm.js +0 -32
  76. package/build/lib/Logo.esm.js.map +0 -1
  77. package/build/lib/Logo.js +0 -55
  78. package/build/lib/Logo.js.map +0 -1
  79. package/build/lib/Logo.mjs +0 -32
  80. package/build/lib/Logo.mjs.map +0 -1
  81. package/build/lib/__tests__/Explorer.test.d.ts +0 -2
  82. package/build/lib/__tests__/Explorer.test.d.ts.map +0 -1
  83. package/build/lib/_virtual/_rollupPluginBabelHelpers.esm.js +0 -17
  84. package/build/lib/_virtual/_rollupPluginBabelHelpers.esm.js.map +0 -1
  85. package/build/lib/_virtual/_rollupPluginBabelHelpers.js +0 -19
  86. package/build/lib/_virtual/_rollupPluginBabelHelpers.js.map +0 -1
  87. package/build/lib/_virtual/_rollupPluginBabelHelpers.mjs +0 -17
  88. package/build/lib/_virtual/_rollupPluginBabelHelpers.mjs.map +0 -1
  89. package/build/lib/noop.d.ts +0 -3
  90. package/build/lib/screenreader.d.ts +0 -4
  91. package/build/lib/screenreader.esm.js +0 -17
  92. package/build/lib/screenreader.esm.js.map +0 -1
  93. package/build/lib/screenreader.js +0 -40
  94. package/build/lib/screenreader.js.map +0 -1
  95. package/build/lib/screenreader.mjs +0 -17
  96. package/build/lib/screenreader.mjs.map +0 -1
  97. package/build/lib/styledComponents.d.ts +0 -9
  98. package/build/lib/styledComponents.d.ts.map +0 -1
  99. package/build/lib/styledComponents.esm.js +0 -103
  100. package/build/lib/styledComponents.esm.js.map +0 -1
  101. package/build/lib/styledComponents.js +0 -112
  102. package/build/lib/styledComponents.js.map +0 -1
  103. package/build/lib/styledComponents.mjs +0 -103
  104. package/build/lib/styledComponents.mjs.map +0 -1
  105. package/build/lib/theme.d.ts +0 -37
  106. package/build/lib/theme.esm.js +0 -33
  107. package/build/lib/theme.esm.js.map +0 -1
  108. package/build/lib/theme.js +0 -56
  109. package/build/lib/theme.js.map +0 -1
  110. package/build/lib/theme.mjs +0 -33
  111. package/build/lib/theme.mjs.map +0 -1
  112. package/build/lib/types.d.ts +0 -12
  113. package/build/lib/types.d.ts.map +0 -1
  114. package/build/lib/useLocalStorage.d.ts +0 -2
  115. package/build/lib/useLocalStorage.esm.js +0 -40
  116. package/build/lib/useLocalStorage.esm.js.map +0 -1
  117. package/build/lib/useLocalStorage.js +0 -63
  118. package/build/lib/useLocalStorage.js.map +0 -1
  119. package/build/lib/useLocalStorage.mjs +0 -40
  120. package/build/lib/useLocalStorage.mjs.map +0 -1
  121. package/build/lib/useMediaQuery.d.ts +0 -2
  122. package/build/lib/useMediaQuery.esm.js +0 -36
  123. package/build/lib/useMediaQuery.esm.js.map +0 -1
  124. package/build/lib/useMediaQuery.js +0 -59
  125. package/build/lib/useMediaQuery.js.map +0 -1
  126. package/build/lib/useMediaQuery.mjs +0 -36
  127. package/build/lib/useMediaQuery.mjs.map +0 -1
  128. package/build/lib/useSubscribeToQueryCache.d.ts +0 -4
  129. package/build/lib/useSubscribeToQueryCache.d.ts.map +0 -1
  130. package/build/lib/useSubscribeToQueryCache.esm.js +0 -15
  131. package/build/lib/useSubscribeToQueryCache.esm.js.map +0 -1
  132. package/build/lib/useSubscribeToQueryCache.js +0 -19
  133. package/build/lib/useSubscribeToQueryCache.js.map +0 -1
  134. package/build/lib/useSubscribeToQueryCache.mjs +0 -15
  135. package/build/lib/useSubscribeToQueryCache.mjs.map +0 -1
  136. package/build/lib/utils.d.ts +0 -80
  137. package/build/lib/utils.d.ts.map +0 -1
  138. package/build/lib/utils.esm.js +0 -184
  139. package/build/lib/utils.esm.js.map +0 -1
  140. package/build/lib/utils.js +0 -218
  141. package/build/lib/utils.js.map +0 -1
  142. package/build/lib/utils.mjs +0 -184
  143. package/build/lib/utils.mjs.map +0 -1
  144. package/src/CachePanel/ActiveQuery.tsx +0 -388
  145. package/src/CachePanel/CachePanel.tsx +0 -439
  146. package/src/CachePanel/Header/QueryStatusCount.tsx +0 -93
  147. package/src/CachePanel/QueryRow.tsx +0 -125
  148. package/src/Explorer.tsx +0 -385
  149. package/src/Logo.tsx +0 -32
  150. package/src/__tests__/Explorer.test.tsx +0 -150
  151. package/src/noop.ts +0 -7
  152. package/src/screenreader.tsx +0 -16
  153. package/src/styledComponents.ts +0 -126
  154. package/src/theme.tsx +0 -33
  155. package/src/types.ts +0 -12
  156. package/src/useLocalStorage.ts +0 -52
  157. package/src/useMediaQuery.ts +0 -34
  158. package/src/useSubscribeToQueryCache.ts +0 -26
  159. package/src/utils.ts +0 -319
package/src/devtools.tsx CHANGED
@@ -1,343 +1,89 @@
1
1
  'use client'
2
- import * as React from 'react'
2
+ import { useRef, useState, useEffect } from 'react'
3
3
  import type { QueryClient } from '@tanstack/react-query'
4
- import useLocalStorage from './useLocalStorage'
5
- import {
6
- isVerticalSide,
7
- useIsMounted,
8
- getSidePanelStyle,
9
- minPanelSize,
10
- getSidedProp,
11
- defaultPanelSize,
12
- } from './utils'
13
- import type { Corner, Side } from './utils'
14
- import ScreenReader from './screenreader'
15
- import { ThemeProvider, defaultTheme as theme } from './theme'
16
- import Logo from './Logo'
17
-
18
- import type { DevToolsErrorType } from './types'
19
- import ReactQueryDevtoolsPanel from './CachePanel/CachePanel'
20
-
21
- export { default as ReactQueryDevtoolsPanel } from './CachePanel/CachePanel'
22
-
4
+ import { useQueryClient, onlineManager } from '@tanstack/react-query'
5
+ import type {
6
+ DevtoolsButtonPosition,
7
+ DevtoolsPosition,
8
+ DevToolsErrorType,
9
+ } from '@tanstack/query-devtools'
10
+ import { TanstackQueryDevtools } from '@tanstack/query-devtools'
11
+ import React from 'react'
23
12
  export interface DevtoolsOptions {
24
13
  /**
25
14
  * Set this true if you want the dev tools to default to being open
26
15
  */
27
16
  initialIsOpen?: boolean
28
- /**
29
- * Use this to add props to the panel. For example, you can add className, style (merge and override default style), etc.
30
- */
31
- panelProps?: React.ComponentPropsWithoutRef<'div'>
32
- /**
33
- * Use this to add props to the close button. For example, you can add className, style (merge and override default style), onClick (extend default handler), etc.
34
- */
35
- closeButtonProps?: React.ComponentPropsWithoutRef<'button'>
36
- /**
37
- * Use this to add props to the toggle button. For example, you can add className, style (merge and override default style), onClick (extend default handler), etc.
38
- */
39
- toggleButtonProps?: React.ComponentPropsWithoutRef<'button'>
40
17
  /**
41
18
  * The position of the React Query logo to open and close the devtools panel.
19
+ * 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right'
42
20
  * Defaults to 'bottom-left'.
43
21
  */
44
- position?: Corner
22
+ buttonPosition?: DevtoolsButtonPosition
45
23
  /**
46
24
  * The position of the React Query devtools panel.
25
+ * 'top' | 'bottom' | 'left' | 'right'
47
26
  * Defaults to 'bottom'.
48
27
  */
49
- panelPosition?: Side
50
- /**
51
- * Use this to render the devtools inside a different type of container element for a11y purposes.
52
- * Any string which corresponds to a valid intrinsic JSX element is allowed.
53
- * Defaults to 'aside'.
54
- */
55
- containerElement?: string | any
56
- /**
57
- * nonce for style element for CSP
58
- */
59
- styleNonce?: string
28
+ position?: DevtoolsPosition
60
29
  /**
61
30
  * Custom instance of QueryClient
62
31
  */
63
- queryClient?: QueryClient
32
+ client?: QueryClient
64
33
  /**
65
34
  * Use this so you can define custom errors that can be shown in the devtools.
66
35
  */
67
36
  errorTypes?: DevToolsErrorType[]
68
37
  }
69
38
 
70
- export function ReactQueryDevtools({
71
- initialIsOpen,
72
- panelProps = {},
73
- closeButtonProps = {},
74
- toggleButtonProps = {},
75
- position = 'bottom-left',
76
- containerElement: Container = 'aside',
77
- queryClient,
78
- styleNonce,
79
- panelPosition: initialPanelPosition = 'bottom',
80
- errorTypes = [],
81
- }: DevtoolsOptions): React.ReactElement | null {
82
- const rootRef = React.useRef<HTMLDivElement>(null)
83
- const panelRef = React.useRef<HTMLDivElement>(null)
84
- const [isOpen, setIsOpen] = useLocalStorage(
85
- 'reactQueryDevtoolsOpen',
86
- initialIsOpen,
87
- )
88
- const [devtoolsHeight, setDevtoolsHeight] = useLocalStorage<number>(
89
- 'reactQueryDevtoolsHeight',
90
- defaultPanelSize,
91
- )
92
- const [devtoolsWidth, setDevtoolsWidth] = useLocalStorage<number>(
93
- 'reactQueryDevtoolsWidth',
94
- defaultPanelSize,
39
+ export function ReactQueryDevtools(
40
+ props: DevtoolsOptions,
41
+ ): React.ReactElement | null {
42
+ const queryClient = useQueryClient()
43
+ const ref = useRef<HTMLDivElement>(null)
44
+ const { buttonPosition, position, initialIsOpen, errorTypes } = props
45
+ const [devtools] = useState(
46
+ new TanstackQueryDevtools({
47
+ client: props.client || queryClient,
48
+ queryFlavor: 'React Query',
49
+ version: '5',
50
+ onlineManager,
51
+ buttonPosition,
52
+ position,
53
+ initialIsOpen,
54
+ errorTypes,
55
+ }),
95
56
  )
96
57
 
97
- const [panelPosition = 'bottom', setPanelPosition] = useLocalStorage<Side>(
98
- 'reactQueryDevtoolsPanelPosition',
99
- initialPanelPosition,
100
- )
101
-
102
- const [isResolvedOpen, setIsResolvedOpen] = React.useState(false)
103
- const [isResizing, setIsResizing] = React.useState(false)
104
- const isMounted = useIsMounted()
105
-
106
- const handleDragStart = (
107
- panelElement: HTMLDivElement | null,
108
- startEvent: React.MouseEvent<HTMLDivElement, MouseEvent>,
109
- ) => {
110
- if (!panelElement) return
111
- if (startEvent.button !== 0) return // Only allow left click for drag
112
- const isVertical = isVerticalSide(panelPosition)
113
- setIsResizing(true)
114
-
115
- const { height, width } = panelElement.getBoundingClientRect()
116
- const startX = startEvent.clientX
117
- const startY = startEvent.clientY
118
- let newSize = 0
119
-
120
- const run = (moveEvent: MouseEvent) => {
121
- // prevent mouse selecting stuff with mouse drag
122
- moveEvent.preventDefault()
123
-
124
- // calculate the correct size based on mouse position and current panel position
125
- // hint: it is different formula for the opposite sides
126
- if (isVertical) {
127
- newSize =
128
- width +
129
- (panelPosition === 'right'
130
- ? startX - moveEvent.clientX
131
- : moveEvent.clientX - startX)
132
- setDevtoolsWidth(newSize)
133
- } else {
134
- newSize =
135
- height +
136
- (panelPosition === 'bottom'
137
- ? startY - moveEvent.clientY
138
- : moveEvent.clientY - startY)
139
- setDevtoolsHeight(newSize)
140
- }
141
-
142
- if (newSize < minPanelSize) {
143
- setIsOpen(false)
144
- } else {
145
- setIsOpen(true)
146
- }
58
+ useEffect(() => {
59
+ if (buttonPosition) {
60
+ devtools.setButtonPosition(buttonPosition)
147
61
  }
62
+ }, [buttonPosition, devtools])
148
63
 
149
- const unsub = () => {
150
- if (isResizing) {
151
- setIsResizing(false)
152
- }
153
-
154
- document.removeEventListener('mousemove', run, false)
155
- document.removeEventListener('mouseUp', unsub, false)
64
+ useEffect(() => {
65
+ if (position) {
66
+ devtools.setPosition(position)
156
67
  }
68
+ }, [position, devtools])
157
69
 
158
- document.addEventListener('mousemove', run, false)
159
- document.addEventListener('mouseup', unsub, false)
160
- }
161
-
162
- React.useEffect(() => {
163
- setIsResolvedOpen(isOpen ?? false)
164
- }, [isOpen, isResolvedOpen, setIsResolvedOpen])
70
+ useEffect(() => {
71
+ devtools.setInitialIsOpen(initialIsOpen || false)
72
+ }, [initialIsOpen, devtools])
165
73
 
166
- // Toggle panel visibility before/after transition (depending on direction).
167
- // Prevents focusing in a closed panel.
168
- React.useEffect(() => {
169
- const ref = panelRef.current
170
- if (ref) {
171
- const handlePanelTransitionStart = () => {
172
- if (isResolvedOpen) {
173
- ref.style.visibility = 'visible'
174
- }
175
- }
74
+ useEffect(() => {
75
+ devtools.setErrorTypes(errorTypes || [])
76
+ }, [errorTypes, devtools])
176
77
 
177
- const handlePanelTransitionEnd = () => {
178
- if (!isResolvedOpen) {
179
- ref.style.visibility = 'hidden'
180
- }
181
- }
182
-
183
- ref.addEventListener('transitionstart', handlePanelTransitionStart)
184
- ref.addEventListener('transitionend', handlePanelTransitionEnd)
185
-
186
- return () => {
187
- ref.removeEventListener('transitionstart', handlePanelTransitionStart)
188
- ref.removeEventListener('transitionend', handlePanelTransitionEnd)
189
- }
78
+ useEffect(() => {
79
+ if (ref.current) {
80
+ devtools.mount(ref.current)
190
81
  }
191
- return
192
- }, [isResolvedOpen])
193
-
194
- React.useEffect(() => {
195
- if (isResolvedOpen && rootRef.current?.parentElement) {
196
- const { parentElement } = rootRef.current
197
- const styleProp = getSidedProp('padding', panelPosition)
198
- const isVertical = isVerticalSide(panelPosition)
199
-
200
- const previousPaddings = (({
201
- padding,
202
- paddingTop,
203
- paddingBottom,
204
- paddingLeft,
205
- paddingRight,
206
- }) => ({
207
- padding,
208
- paddingTop,
209
- paddingBottom,
210
- paddingLeft,
211
- paddingRight,
212
- }))(parentElement.style)
213
82
 
214
- const run = () => {
215
- // reset the padding
216
- parentElement.style.padding = '0px'
217
- parentElement.style.paddingTop = '0px'
218
- parentElement.style.paddingBottom = '0px'
219
- parentElement.style.paddingLeft = '0px'
220
- parentElement.style.paddingRight = '0px'
221
- // set the new padding based on the new panel position
222
-
223
- parentElement.style[styleProp] = `${
224
- isVertical ? devtoolsWidth : devtoolsHeight
225
- }px`
226
- }
227
-
228
- run()
229
-
230
- if (typeof window !== 'undefined') {
231
- window.addEventListener('resize', run)
232
-
233
- return () => {
234
- window.removeEventListener('resize', run)
235
- Object.entries(previousPaddings).forEach(
236
- ([property, previousValue]) => {
237
- parentElement.style[property as keyof typeof previousPaddings] =
238
- previousValue
239
- },
240
- )
241
- }
242
- }
83
+ return () => {
84
+ devtools.unmount()
243
85
  }
244
- return
245
- }, [isResolvedOpen, panelPosition, devtoolsHeight, devtoolsWidth])
246
-
247
- const { style: panelStyle = {}, ...otherPanelProps } = panelProps
86
+ }, [devtools])
248
87
 
249
- const {
250
- style: toggleButtonStyle = {},
251
- onClick: onToggleClick,
252
- ...otherToggleButtonProps
253
- } = toggleButtonProps
254
-
255
- // get computed style based on panel position
256
- const style = getSidePanelStyle({
257
- position: panelPosition,
258
- devtoolsTheme: theme,
259
- isOpen: isResolvedOpen,
260
- height: devtoolsHeight,
261
- width: devtoolsWidth,
262
- isResizing,
263
- panelStyle,
264
- })
265
-
266
- // Do not render on the server
267
- if (!isMounted()) return null
268
-
269
- return (
270
- <Container
271
- ref={rootRef}
272
- className="ReactQueryDevtools"
273
- aria-label="React Query Devtools"
274
- >
275
- <ThemeProvider theme={theme}>
276
- <ReactQueryDevtoolsPanel
277
- ref={panelRef as any}
278
- queryClient={queryClient}
279
- styleNonce={styleNonce}
280
- position={panelPosition}
281
- onPositionChange={setPanelPosition}
282
- showCloseButton
283
- closeButtonProps={closeButtonProps}
284
- {...otherPanelProps}
285
- style={style}
286
- isOpen={isResolvedOpen}
287
- setIsOpen={setIsOpen}
288
- onDragStart={(e) => handleDragStart(panelRef.current, e)}
289
- errorTypes={errorTypes}
290
- />
291
- </ThemeProvider>
292
- {!isResolvedOpen ? (
293
- <button
294
- type="button"
295
- {...otherToggleButtonProps}
296
- aria-label="Open React Query Devtools"
297
- aria-controls="ReactQueryDevtoolsPanel"
298
- aria-haspopup="true"
299
- aria-expanded="false"
300
- onClick={(e) => {
301
- setIsOpen(true)
302
- onToggleClick?.(e)
303
- }}
304
- style={{
305
- background: 'none',
306
- border: 0,
307
- padding: 0,
308
- position: 'fixed',
309
- zIndex: 99999,
310
- display: 'inline-flex',
311
- fontSize: '1.5em',
312
- margin: '.5em',
313
- cursor: 'pointer',
314
- width: 'fit-content',
315
- ...(position === 'top-right'
316
- ? {
317
- top: '0',
318
- right: '0',
319
- }
320
- : position === 'top-left'
321
- ? {
322
- top: '0',
323
- left: '0',
324
- }
325
- : position === 'bottom-right'
326
- ? {
327
- bottom: '0',
328
- right: '0',
329
- }
330
- : {
331
- bottom: '0',
332
- left: '0',
333
- }),
334
- ...toggleButtonStyle,
335
- }}
336
- >
337
- <Logo aria-hidden />
338
- <ScreenReader text="Open React Query Devtools" />
339
- </button>
340
- ) : null}
341
- </Container>
342
- )
88
+ return <div ref={ref}></div>
343
89
  }
package/src/index.ts CHANGED
@@ -9,9 +9,9 @@ export const ReactQueryDevtools: (typeof devtools)['ReactQueryDevtools'] =
9
9
  }
10
10
  : devtools.ReactQueryDevtools
11
11
 
12
- export const ReactQueryDevtoolsPanel: (typeof devtools)['ReactQueryDevtoolsPanel'] =
13
- process.env.NODE_ENV !== 'development'
14
- ? (function () {
15
- return null
16
- } as any)
17
- : devtools.ReactQueryDevtoolsPanel
12
+ // export const ReactQueryDevtoolsPanel: (typeof devtools)['ReactQueryDevtoolsPanel'] =
13
+ // process.env.NODE_ENV !== 'development'
14
+ // ? (function () {
15
+ // return null
16
+ // } as any)
17
+ // : devtools.ReactQueryDevtoolsPanel
@@ -1,19 +0,0 @@
1
- import type { QueryCache, QueryClient } from '@tanstack/react-query';
2
- import type { DevToolsErrorType } from '../types';
3
- /**
4
- * Panel for the query currently being inspected
5
- *
6
- * It displays query details (key, observers...), query actions,
7
- * the data explorer and the query explorer
8
- */
9
- declare const ActiveQuery: {
10
- ({ queryCache, activeQueryHash, queryClient, errorTypes, }: {
11
- queryCache: QueryCache;
12
- activeQueryHash: string;
13
- queryClient: QueryClient;
14
- errorTypes: DevToolsErrorType[];
15
- }): JSX.Element | null;
16
- displayName: string;
17
- };
18
- export default ActiveQuery;
19
- //# sourceMappingURL=ActiveQuery.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ActiveQuery.d.ts","sourceRoot":"","sources":["../../../src/CachePanel/ActiveQuery.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAWpE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAA;AAMjD;;;;;GAKG;AACH,QAAA,MAAM,WAAW;;oBAMH,UAAU;yBACL,MAAM;qBACV,WAAW;oBACZ,iBAAiB,EAAE;;;CA8VhC,CAAA;AAID,eAAe,WAAW,CAAA"}