@tanstack/react-query-devtools 4.3.9 → 4.5.0
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/lib/__tests__/utils.d.ts +1 -1
- package/build/lib/devtools.d.ts +1 -1
- package/build/lib/devtools.esm.js +9 -10
- package/build/lib/devtools.esm.js.map +1 -1
- package/build/lib/devtools.js +8 -9
- package/build/lib/devtools.js.map +1 -1
- package/build/lib/devtools.mjs +9 -10
- package/build/lib/devtools.mjs.map +1 -1
- package/build/lib/index.prod.esm.js +9 -10
- package/build/lib/index.prod.esm.js.map +1 -1
- package/build/lib/index.prod.js +8 -9
- package/build/lib/index.prod.js.map +1 -1
- package/build/lib/index.prod.mjs +9 -10
- package/build/lib/index.prod.mjs.map +1 -1
- package/build/lib/utils.d.ts +1 -1
- package/build/lib/utils.esm.js.map +1 -1
- package/build/lib/utils.js.map +1 -1
- package/build/lib/utils.mjs.map +1 -1
- package/build/umd/index.development.js +8 -9
- package/build/umd/index.development.js.map +1 -1
- package/package.json +2 -2
- package/src/__tests__/devtools.test.tsx +2 -1
- package/src/__tests__/utils.tsx +1 -1
- package/src/devtools.tsx +12 -12
- package/src/utils.ts +2 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tanstack/react-query-devtools",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.5.0",
|
|
4
4
|
"description": "TODO",
|
|
5
5
|
"author": "tannerlinsley",
|
|
6
6
|
"license": "MIT",
|
|
@@ -51,6 +51,6 @@
|
|
|
51
51
|
"peerDependencies": {
|
|
52
52
|
"react": "^16.8.0 || ^17.0.0 || ^18.0.0",
|
|
53
53
|
"react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0",
|
|
54
|
-
"@tanstack/react-query": "4.
|
|
54
|
+
"@tanstack/react-query": "4.5.0"
|
|
55
55
|
}
|
|
56
56
|
}
|
|
@@ -2,7 +2,8 @@ import * as React from 'react'
|
|
|
2
2
|
import { fireEvent, screen, waitFor, act } from '@testing-library/react'
|
|
3
3
|
import { ErrorBoundary } from 'react-error-boundary'
|
|
4
4
|
import '@testing-library/jest-dom'
|
|
5
|
-
import {
|
|
5
|
+
import type { QueryClient } from '@tanstack/react-query'
|
|
6
|
+
import { useQuery } from '@tanstack/react-query'
|
|
6
7
|
import { sortFns } from '../utils'
|
|
7
8
|
import {
|
|
8
9
|
getByTextContent,
|
package/src/__tests__/utils.tsx
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { MatcherFunction } from '@testing-library/dom/types/matches'
|
|
1
|
+
import type { MatcherFunction } from '@testing-library/dom/types/matches'
|
|
2
2
|
import { render } from '@testing-library/react'
|
|
3
3
|
import * as React from 'react'
|
|
4
4
|
import { ReactQueryDevtools } from '../devtools'
|
package/src/devtools.tsx
CHANGED
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
import * as React from 'react'
|
|
2
2
|
import { useSyncExternalStore } from './useSyncExternalStore'
|
|
3
|
-
import {
|
|
4
|
-
useQueryClient,
|
|
5
|
-
onlineManager,
|
|
6
|
-
notifyManager,
|
|
3
|
+
import type {
|
|
7
4
|
QueryCache,
|
|
8
5
|
QueryClient,
|
|
9
6
|
QueryKey as QueryKeyType,
|
|
10
7
|
ContextOptions,
|
|
11
8
|
} from '@tanstack/react-query'
|
|
9
|
+
import {
|
|
10
|
+
useQueryClient,
|
|
11
|
+
onlineManager,
|
|
12
|
+
notifyManager,
|
|
13
|
+
} from '@tanstack/react-query'
|
|
12
14
|
import { rankItem, compareItems } from '@tanstack/match-sorter-utils'
|
|
13
15
|
import useLocalStorage from './useLocalStorage'
|
|
14
16
|
import { sortFns, useIsMounted } from './utils'
|
|
@@ -192,12 +194,13 @@ export function ReactQueryDevtools({
|
|
|
192
194
|
|
|
193
195
|
React.useEffect(() => {
|
|
194
196
|
if (isResolvedOpen) {
|
|
195
|
-
const
|
|
197
|
+
const root = rootRef.current
|
|
198
|
+
const previousValue = root?.parentElement?.style.paddingBottom
|
|
196
199
|
|
|
197
200
|
const run = () => {
|
|
198
201
|
const containerHeight = panelRef.current?.getBoundingClientRect().height
|
|
199
|
-
if (
|
|
200
|
-
|
|
202
|
+
if (root?.parentElement) {
|
|
203
|
+
root.parentElement.style.paddingBottom = `${containerHeight}px`
|
|
201
204
|
}
|
|
202
205
|
}
|
|
203
206
|
|
|
@@ -208,11 +211,8 @@ export function ReactQueryDevtools({
|
|
|
208
211
|
|
|
209
212
|
return () => {
|
|
210
213
|
window.removeEventListener('resize', run)
|
|
211
|
-
if (
|
|
212
|
-
|
|
213
|
-
typeof previousValue === 'string'
|
|
214
|
-
) {
|
|
215
|
-
rootRef.current.parentElement.style.paddingBottom = previousValue
|
|
214
|
+
if (root?.parentElement && typeof previousValue === 'string') {
|
|
215
|
+
root.parentElement.style.paddingBottom = previousValue
|
|
216
216
|
}
|
|
217
217
|
}
|
|
218
218
|
}
|
package/src/utils.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import * as React from 'react'
|
|
2
2
|
import type { Query } from '@tanstack/react-query'
|
|
3
3
|
|
|
4
|
-
import { Theme
|
|
4
|
+
import type { Theme } from './theme'
|
|
5
|
+
import { useTheme } from './theme'
|
|
5
6
|
import useMediaQuery from './useMediaQuery'
|
|
6
7
|
|
|
7
8
|
type StyledComponent<T> = T extends 'button'
|