@tanstack/query-devtools 5.107.1 → 5.108.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.
Files changed (46) hide show
  1. package/build/DevtoolsComponent-BGJcHYi5.cjs +2 -0
  2. package/build/DevtoolsComponent-KSaqMRUY.cjs +45 -0
  3. package/build/{DevtoolsComponent-C7hVCcUy.js → DevtoolsComponent-e0KiEsCw.js} +1 -1
  4. package/build/DevtoolsComponent-u2WBBkWz.js +3 -0
  5. package/build/DevtoolsComponent-u2WBBkWz.js.map +1 -0
  6. package/build/DevtoolsPanelComponent-1kShldEU.cjs +2 -0
  7. package/build/{DevtoolsPanelComponent-Dc49CXag.cjs → DevtoolsPanelComponent-CpAkTR9C.cjs} +11 -11
  8. package/build/{DevtoolsPanelComponent-XShN-s8X.js → DevtoolsPanelComponent-D9e2k2ne.js} +1 -1
  9. package/build/DevtoolsPanelComponent-DKq0vg7C.js +3 -0
  10. package/build/DevtoolsPanelComponent-DKq0vg7C.js.map +1 -0
  11. package/build/DevtoolsSubscriptionsProvider-BQAD7Uyk.js +1292 -0
  12. package/build/DevtoolsSubscriptionsProvider-BQAD7Uyk.js.map +1 -0
  13. package/build/DevtoolsSubscriptionsProvider-B_iiu5dm.cjs +1291 -0
  14. package/build/{Devtools-CXcMqCPe.js → DevtoolsSubscriptionsProvider-CtZ2t7t0.js} +949 -949
  15. package/build/dev.cjs +2 -2
  16. package/build/dev.js +2 -2
  17. package/build/index.cjs +1 -1
  18. package/build/index.js +1 -1
  19. package/build/index.js.map +1 -1
  20. package/build/utils-DC2pN79q.js.map +1 -1
  21. package/package.json +2 -2
  22. package/src/Devtools.tsx +52 -46
  23. package/src/DevtoolsComponent.tsx +6 -6
  24. package/src/DevtoolsPanelComponent.tsx +6 -6
  25. package/src/Explorer.tsx +13 -13
  26. package/src/TanstackQueryDevtools.tsx +2 -2
  27. package/src/TanstackQueryDevtoolsPanel.tsx +2 -2
  28. package/src/VirtualList.tsx +1 -1
  29. package/src/contexts/PiPContext.tsx +1 -1
  30. package/src/contexts/index.ts +13 -3
  31. package/src/createCacheSubscriptionRegistry.ts +4 -1
  32. package/src/providers/DevtoolsOfflineProvider.tsx +2 -2
  33. package/src/providers/DevtoolsStateProvider.tsx +1 -1
  34. package/src/providers/DevtoolsSubscriptionsProvider.tsx +2 -2
  35. package/src/utils.tsx +1 -1
  36. package/build/Devtools-B2jiIqEJ.js +0 -1292
  37. package/build/Devtools-B2jiIqEJ.js.map +0 -1
  38. package/build/Devtools-C6D0zIvx.cjs +0 -1291
  39. package/build/DevtoolsComponent-CfBgdmsl.cjs +0 -45
  40. package/build/DevtoolsComponent-D5toeyeh.cjs +0 -2
  41. package/build/DevtoolsComponent-DGRxtIwZ.js +0 -3
  42. package/build/DevtoolsComponent-DGRxtIwZ.js.map +0 -1
  43. package/build/DevtoolsPanelComponent-CPGCRAPs.js +0 -3
  44. package/build/DevtoolsPanelComponent-CPGCRAPs.js.map +0 -1
  45. package/build/DevtoolsPanelComponent-D_S99j7E.cjs +0 -2
  46. package/build/{Devtools-Dy8Npldt.cjs → DevtoolsSubscriptionsProvider-D9zXQvDq.cjs} +948 -948
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tanstack/query-devtools",
3
- "version": "5.107.1",
3
+ "version": "5.108.0",
4
4
  "description": "Developer tools to interact with and visualize the TanStack Query cache",
5
5
  "author": "tannerlinsley",
6
6
  "license": "MIT",
@@ -49,7 +49,7 @@
49
49
  "@solid-primitives/resize-observer": "^2.2.0",
50
50
  "@solid-primitives/storage": "^1.3.11",
51
51
  "@tanstack/match-sorter-utils": "^9.1.2",
52
- "@tanstack/query-core": "5.107.1",
52
+ "@tanstack/query-core": "5.108.0",
53
53
  "@tanstack/solid-virtual": "^3.13.52",
54
54
  "clsx": "^2.1.1",
55
55
  "goober": "^2.1.19",
package/src/Devtools.tsx CHANGED
@@ -1,3 +1,8 @@
1
+ import { DropdownMenu, RadioGroup } from '@kobalte/core'
2
+ import { createResizeObserver } from '@solid-primitives/resize-observer'
3
+ import { rankItem } from '@tanstack/match-sorter-utils'
4
+ import { clsx as cx } from 'clsx'
5
+ import * as goober from 'goober'
1
6
  import {
2
7
  For,
3
8
  Show,
@@ -9,28 +14,30 @@ import {
9
14
  onCleanup,
10
15
  onMount,
11
16
  } from 'solid-js'
12
- import { rankItem } from '@tanstack/match-sorter-utils'
13
- import * as goober from 'goober'
14
- import { clsx as cx } from 'clsx'
15
- import { TransitionGroup } from 'solid-transition-group'
16
- import { createResizeObserver } from '@solid-primitives/resize-observer'
17
- import { DropdownMenu, RadioGroup } from '@kobalte/core'
18
17
  import { Portal } from 'solid-js/web'
18
+ import { TransitionGroup } from 'solid-transition-group'
19
+ import Explorer, { SearchableExplorer } from './Explorer'
20
+ import { VirtualList } from './VirtualList'
21
+ import {
22
+ BUTTON_POSITION,
23
+ DEFAULT_FILTER_SCOPE,
24
+ DEFAULT_HEIGHT,
25
+ DEFAULT_MUTATION_SORT_FN_NAME,
26
+ DEFAULT_SORT_FN_NAME,
27
+ DEFAULT_SORT_ORDER,
28
+ DEFAULT_WIDTH,
29
+ FILTER_SCOPES,
30
+ INITIAL_IS_OPEN,
31
+ POSITION,
32
+ firstBreakpoint,
33
+ secondBreakpoint,
34
+ thirdBreakpoint,
35
+ } from './constants'
36
+ import { usePiPWindow, useQueryDevtoolsContext, useTheme } from './contexts'
19
37
  import { useDevtoolsOffline } from './contexts/DevtoolsOfflineContext'
20
- import { useDevtoolsSubscriptions } from './contexts/DevtoolsSubscriptionsContext'
21
38
  import { useDevtoolsState } from './contexts/DevtoolsStateContext'
22
- import { tokens } from './theme'
23
- import {
24
- convertRemToPixels,
25
- displayValue,
26
- getMutationStatusColor,
27
- getQueryStatusColor,
28
- getQueryStatusColorByLabel,
29
- getQueryStatusLabel,
30
- getSidedProp,
31
- mutationSortFns,
32
- sortFns,
33
- } from './utils'
39
+ import { useDevtoolsSubscriptions } from './contexts/DevtoolsSubscriptionsContext'
40
+ import { createSearchText } from './explorerSearch'
34
41
  import {
35
42
  ArrowDown,
36
43
  ArrowLeft,
@@ -52,31 +59,19 @@ import {
52
59
  Wifi,
53
60
  XCircle,
54
61
  } from './icons'
55
- import Explorer, { SearchableExplorer } from './Explorer'
56
- import { createSearchText } from './explorerSearch'
57
- import { VirtualList } from './VirtualList'
58
- import { usePiPWindow, useQueryDevtoolsContext, useTheme } from './contexts'
62
+ import { tokens } from './theme'
59
63
  import {
60
- BUTTON_POSITION,
61
- DEFAULT_FILTER_SCOPE,
62
- DEFAULT_HEIGHT,
63
- DEFAULT_MUTATION_SORT_FN_NAME,
64
- DEFAULT_SORT_FN_NAME,
65
- DEFAULT_SORT_ORDER,
66
- DEFAULT_WIDTH,
67
- FILTER_SCOPES,
68
- INITIAL_IS_OPEN,
69
- POSITION,
70
- firstBreakpoint,
71
- secondBreakpoint,
72
- thirdBreakpoint,
73
- } from './constants'
74
- import type { FilterScope } from './constants'
75
- import type {
76
- DevtoolsErrorType,
77
- DevtoolsPosition,
78
- QueryDevtoolsProps,
79
- } from './contexts'
64
+ convertRemToPixels,
65
+ displayValue,
66
+ getMutationStatusColor,
67
+ getQueryStatusColor,
68
+ getQueryStatusColorByLabel,
69
+ getQueryStatusLabel,
70
+ getSidedProp,
71
+ mutationSortFns,
72
+ sortFns,
73
+ } from './utils'
74
+ import type { StorageObject, StorageSetter } from '@solid-primitives/storage'
80
75
  import type {
81
76
  Mutation,
82
77
  MutationCache,
@@ -85,8 +80,13 @@ import type {
85
80
  QueryCache,
86
81
  QueryCacheNotifyEvent,
87
82
  } from '@tanstack/query-core'
88
- import type { StorageObject, StorageSetter } from '@solid-primitives/storage'
89
83
  import type { Accessor, Component, JSX } from 'solid-js'
84
+ import type { FilterScope } from './constants'
85
+ import type {
86
+ DevtoolsErrorType,
87
+ DevtoolsPosition,
88
+ QueryDevtoolsProps,
89
+ } from './contexts'
90
90
 
91
91
  const filterScopeLabels: Record<FilterScope, string> = {
92
92
  key: 'Key',
@@ -2728,7 +2728,10 @@ const setupQueryCacheSubscription = () => {
2728
2728
  }
2729
2729
 
2730
2730
  const createSubscribeToQueryCacheBatcher = <T,>(
2731
- callback: (queryCache: Accessor<QueryCache>) => Exclude<T, Function>,
2731
+ callback: (
2732
+ queryCache: Accessor<QueryCache>,
2733
+ // oxlint-disable-next-line typescript/no-unsafe-function-type -- matches the 'Exclude<T, Function>' that Solid's 'Setter' accepts
2734
+ ) => Exclude<T, Function>,
2732
2735
  equalityCheck: boolean = true,
2733
2736
  shouldUpdate: (event: QueryCacheNotifyEvent) => boolean = () => true,
2734
2737
  ) => {
@@ -2781,7 +2784,10 @@ const setupMutationCacheSubscription = () => {
2781
2784
  }
2782
2785
 
2783
2786
  const createSubscribeToMutationCacheBatcher = <T,>(
2784
- callback: (queryCache: Accessor<MutationCache>) => Exclude<T, Function>,
2787
+ callback: (
2788
+ queryCache: Accessor<MutationCache>,
2789
+ // oxlint-disable-next-line typescript/no-unsafe-function-type -- matches the 'Exclude<T, Function>' that Solid's 'Setter' accepts
2790
+ ) => Exclude<T, Function>,
2785
2791
  equalityCheck: boolean = true,
2786
2792
  shouldUpdate: (event: MutationCacheNotifyEvent) => boolean = () => true,
2787
2793
  ) => {
@@ -1,15 +1,15 @@
1
- import { createLocalStorage } from '@solid-primitives/storage'
2
1
  import { I18nProvider } from '@kobalte/core'
2
+ import { createLocalStorage } from '@solid-primitives/storage'
3
3
  import { createMemo } from 'solid-js'
4
- import { DevtoolsOfflineProvider } from './providers/DevtoolsOfflineProvider'
5
- import { DevtoolsSubscriptionsProvider } from './providers/DevtoolsSubscriptionsProvider'
6
- import { DevtoolsStateProvider } from './providers/DevtoolsStateProvider'
7
4
  import { Devtools } from './Devtools'
8
- import { getPreferredColorScheme } from './utils'
9
5
  import { THEME_PREFERENCE } from './constants'
10
6
  import { PiPProvider, QueryDevtoolsContext, ThemeContext } from './contexts'
11
- import type { Theme } from './contexts'
7
+ import { DevtoolsOfflineProvider } from './providers/DevtoolsOfflineProvider'
8
+ import { DevtoolsStateProvider } from './providers/DevtoolsStateProvider'
9
+ import { DevtoolsSubscriptionsProvider } from './providers/DevtoolsSubscriptionsProvider'
10
+ import { getPreferredColorScheme } from './utils'
12
11
  import type { DevtoolsComponentType } from './Devtools'
12
+ import type { Theme } from './contexts'
13
13
 
14
14
  const DevtoolsComponent: DevtoolsComponentType = (props) => {
15
15
  const [localStore, setLocalStore] = createLocalStorage({
@@ -1,15 +1,15 @@
1
- import { createLocalStorage } from '@solid-primitives/storage'
2
1
  import { I18nProvider } from '@kobalte/core'
2
+ import { createLocalStorage } from '@solid-primitives/storage'
3
3
  import { createMemo } from 'solid-js'
4
- import { DevtoolsOfflineProvider } from './providers/DevtoolsOfflineProvider'
5
- import { DevtoolsSubscriptionsProvider } from './providers/DevtoolsSubscriptionsProvider'
6
- import { DevtoolsStateProvider } from './providers/DevtoolsStateProvider'
7
4
  import { ContentView, ParentPanel } from './Devtools'
8
- import { getPreferredColorScheme } from './utils'
9
5
  import { THEME_PREFERENCE } from './constants'
10
6
  import { PiPProvider, QueryDevtoolsContext, ThemeContext } from './contexts'
11
- import type { Theme } from './contexts'
7
+ import { DevtoolsOfflineProvider } from './providers/DevtoolsOfflineProvider'
8
+ import { DevtoolsStateProvider } from './providers/DevtoolsStateProvider'
9
+ import { DevtoolsSubscriptionsProvider } from './providers/DevtoolsSubscriptionsProvider'
10
+ import { getPreferredColorScheme } from './utils'
12
11
  import type { DevtoolsComponentType } from './Devtools'
12
+ import type { Theme } from './contexts'
13
13
 
14
14
  const DevtoolsPanelComponent: DevtoolsComponentType = (props) => {
15
15
  const [localStore, setLocalStore] = createLocalStorage({
package/src/Explorer.tsx CHANGED
@@ -1,5 +1,6 @@
1
- import { serialize, stringify } from 'superjson'
1
+ import { Key } from '@solid-primitives/keyed'
2
2
  import { clsx as cx } from 'clsx'
3
+ import * as goober from 'goober'
3
4
  import {
4
5
  Index,
5
6
  Match,
@@ -13,15 +14,9 @@ import {
13
14
  onCleanup,
14
15
  onMount,
15
16
  } from 'solid-js'
16
- import { Key } from '@solid-primitives/keyed'
17
- import * as goober from 'goober'
18
- import { tokens } from './theme'
19
- import {
20
- deleteNestedDataByPath,
21
- displayValue,
22
- isPlainObject,
23
- updateNestedDataByPath,
24
- } from './utils'
17
+ import { serialize, stringify } from 'superjson'
18
+ import { useQueryDevtoolsContext, useTheme } from './contexts'
19
+ import { primitiveText, searchEntries, searchExplorer } from './explorerSearch'
25
20
  import {
26
21
  Check,
27
22
  CopiedCopier,
@@ -31,11 +26,16 @@ import {
31
26
  Pencil,
32
27
  Trash,
33
28
  } from './icons'
34
- import { useQueryDevtoolsContext, useTheme } from './contexts'
35
- import { primitiveText, searchEntries, searchExplorer } from './explorerSearch'
36
29
  import { getNativeObjectType } from './nativeObjectType'
37
- import type { ExplorerSearch } from './explorerSearch'
30
+ import { tokens } from './theme'
31
+ import {
32
+ deleteNestedDataByPath,
33
+ displayValue,
34
+ isPlainObject,
35
+ updateNestedDataByPath,
36
+ } from './utils'
38
37
  import type { Query } from '@tanstack/query-core'
38
+ import type { ExplorerSearch } from './explorerSearch'
39
39
 
40
40
  /**
41
41
  * Chunk elements in the array by size.
@@ -1,10 +1,11 @@
1
- import { render } from 'solid-js/web'
2
1
  import { createSignal, lazy } from 'solid-js'
2
+ import { render } from 'solid-js/web'
3
3
  import { setupStyleSheet } from './utils'
4
4
  import type {
5
5
  QueryClient,
6
6
  onlineManager as TOnlineManager,
7
7
  } from '@tanstack/query-core'
8
+ import type { Signal } from 'solid-js'
8
9
  import type { DevtoolsComponentType } from './Devtools'
9
10
  import type {
10
11
  DevtoolsButtonPosition,
@@ -13,7 +14,6 @@ import type {
13
14
  QueryDevtoolsProps,
14
15
  Theme,
15
16
  } from './contexts/types'
16
- import type { Signal } from 'solid-js'
17
17
 
18
18
  /**
19
19
  * The options for `TanstackQueryDevtools`, which mounts the floating devtools.
@@ -1,10 +1,11 @@
1
- import { render } from 'solid-js/web'
2
1
  import { createSignal, lazy } from 'solid-js'
2
+ import { render } from 'solid-js/web'
3
3
  import { setupStyleSheet } from './utils'
4
4
  import type {
5
5
  QueryClient,
6
6
  onlineManager as TOnlineManager,
7
7
  } from '@tanstack/query-core'
8
+ import type { Signal } from 'solid-js'
8
9
  import type { DevtoolsComponentType } from './Devtools'
9
10
  import type {
10
11
  DevtoolsButtonPosition,
@@ -13,7 +14,6 @@ import type {
13
14
  QueryDevtoolsProps,
14
15
  Theme,
15
16
  } from './contexts/types'
16
- import type { Signal } from 'solid-js'
17
17
 
18
18
  /**
19
19
  * The options for `TanstackQueryDevtoolsPanel`, which mounts the devtools as an embedded panel.
@@ -1,6 +1,6 @@
1
- import { createEffect, createMemo, on, onCleanup } from 'solid-js'
2
1
  import { Key } from '@solid-primitives/keyed'
3
2
  import { createVirtualizer } from '@tanstack/solid-virtual'
3
+ import { createEffect, createMemo, on, onCleanup } from 'solid-js'
4
4
  import type { VirtualItem } from '@tanstack/solid-virtual'
5
5
  import type { Accessor, JSX } from 'solid-js'
6
6
 
@@ -9,8 +9,8 @@ import {
9
9
  import { clearDelegatedEvents, delegateEvents } from 'solid-js/web'
10
10
  import { PIP_DEFAULT_HEIGHT } from '../constants'
11
11
  import { useQueryDevtoolsContext } from './QueryDevtoolsContext'
12
- import type { Accessor, JSX } from 'solid-js'
13
12
  import type { StorageObject, StorageSetter } from '@solid-primitives/storage'
13
+ import type { Accessor, JSX } from 'solid-js'
14
14
 
15
15
  interface PiPProviderProps {
16
16
  children: JSX.Element
@@ -1,3 +1,13 @@
1
- export * from './PiPContext'
2
- export * from './QueryDevtoolsContext'
3
- export * from './ThemeContext'
1
+ export { PiPProvider, usePiPWindow } from './PiPContext'
2
+ export {
3
+ useQueryDevtoolsContext,
4
+ QueryDevtoolsContext,
5
+ } from './QueryDevtoolsContext'
6
+ export type {
7
+ DevtoolsButtonPosition,
8
+ DevtoolsErrorType,
9
+ DevtoolsPosition,
10
+ QueryDevtoolsProps,
11
+ Theme,
12
+ } from './QueryDevtoolsContext'
13
+ export { useTheme, ThemeContext } from './ThemeContext'
@@ -23,7 +23,10 @@ export function createCacheSubscriptionRegistry<TCache, TEvent>() {
23
23
  * event.
24
24
  */
25
25
  function register<T>(
26
- callback: (cache: Accessor<TCache>) => Exclude<T, Function>,
26
+ callback: (
27
+ cache: Accessor<TCache>,
28
+ // oxlint-disable-next-line typescript/no-unsafe-function-type -- matches the 'Exclude<T, Function>' that Solid's 'Setter' accepts
29
+ ) => Exclude<T, Function>,
27
30
  setter: Setter<T>,
28
31
  shouldUpdate: (event: TEvent) => boolean = () => true,
29
32
  ) {
@@ -1,8 +1,8 @@
1
1
  import { createEffect, createSignal, onCleanup } from 'solid-js'
2
- import { useQueryDevtoolsContext } from '../contexts/QueryDevtoolsContext'
3
2
  import { DevtoolsOfflineContext } from '../contexts/DevtoolsOfflineContext'
4
- import type { DevtoolsOfflineState } from '../contexts/types'
3
+ import { useQueryDevtoolsContext } from '../contexts/QueryDevtoolsContext'
5
4
  import type { ParentProps } from 'solid-js'
5
+ import type { DevtoolsOfflineState } from '../contexts/types'
6
6
 
7
7
  /**
8
8
  * Provides its children with the offline state of the devtools `onlineManager`, and a function
@@ -1,7 +1,7 @@
1
1
  import { createSignal } from 'solid-js'
2
2
  import { DevtoolsStateContext } from '../contexts/DevtoolsStateContext'
3
- import type { DevtoolsState } from '../contexts/types'
4
3
  import type { ParentProps } from 'solid-js'
4
+ import type { DevtoolsState } from '../contexts/types'
5
5
 
6
6
  /**
7
7
  * Provides the selected query and mutation and the panel width to its children.
@@ -1,13 +1,13 @@
1
- import { createCacheSubscriptionRegistry } from '../createCacheSubscriptionRegistry'
2
1
  import { DevtoolsSubscriptionsContext } from '../contexts/DevtoolsSubscriptionsContext'
2
+ import { createCacheSubscriptionRegistry } from '../createCacheSubscriptionRegistry'
3
3
  import type {
4
4
  MutationCache,
5
5
  MutationCacheNotifyEvent,
6
6
  QueryCache,
7
7
  QueryCacheNotifyEvent,
8
8
  } from '@tanstack/query-core'
9
- import type { DevtoolsSubscriptions } from '../contexts/types'
10
9
  import type { ParentProps } from 'solid-js'
10
+ import type { DevtoolsSubscriptions } from '../contexts/types'
11
11
 
12
12
  /**
13
13
  * Provides the query and mutation cache subscription registries to its children.
package/src/utils.tsx CHANGED
@@ -1,5 +1,5 @@
1
- import { serialize } from 'superjson'
2
1
  import { createSignal, onCleanup, onMount } from 'solid-js'
2
+ import { serialize } from 'superjson'
3
3
  import { getNativeObjectType } from './nativeObjectType'
4
4
  import type { Mutation, Query } from '@tanstack/query-core'
5
5
  import type { DevtoolsPosition } from './contexts'