@buoy-gg/react-query 3.0.1 → 3.0.2
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/lib/commonjs/index.js +20 -0
- package/lib/commonjs/preset.js +23 -0
- package/lib/commonjs/react-query/components/modals/MutationBrowserFooter.js +4 -2
- package/lib/commonjs/react-query/components/modals/QueryBrowserFooter.js +5 -2
- package/lib/commonjs/react-query/components/modals/ReactQueryModalHeader.js +24 -1
- package/lib/commonjs/react-query/components/modals/SwipeIndicator.js +2 -2
- package/lib/commonjs/react-query/components/query-browser/MutationStatusCount.js +10 -5
- package/lib/commonjs/react-query/components/query-browser/QueryStatus.js +25 -5
- package/lib/commonjs/react-query/components/query-browser/QueryStatusCount.js +12 -1
- package/lib/commonjs/react-query/sync/dehydrate.js +56 -0
- package/lib/commonjs/react-query/sync/reactQuerySyncAdapter.js +132 -0
- package/lib/commonjs/react-query/sync/useReactQuerySyncAdapter.js +26 -0
- package/lib/module/index.js +5 -0
- package/lib/module/preset.js +23 -0
- package/lib/module/react-query/components/modals/MutationBrowserFooter.js +4 -2
- package/lib/module/react-query/components/modals/QueryBrowserFooter.js +5 -2
- package/lib/module/react-query/components/modals/ReactQueryModalHeader.js +24 -1
- package/lib/module/react-query/components/modals/SwipeIndicator.js +2 -1
- package/lib/module/react-query/components/query-browser/MutationStatusCount.js +10 -5
- package/lib/module/react-query/components/query-browser/QueryStatus.js +25 -5
- package/lib/module/react-query/components/query-browser/QueryStatusCount.js +12 -1
- package/lib/module/react-query/sync/dehydrate.js +52 -0
- package/lib/module/react-query/sync/reactQuerySyncAdapter.js +127 -0
- package/lib/module/react-query/sync/useReactQuerySyncAdapter.js +23 -0
- package/lib/typescript/index.d.ts +3 -0
- package/lib/typescript/index.d.ts.map +1 -1
- package/lib/typescript/preset.d.ts.map +1 -1
- package/lib/typescript/react-query/components/modals/MutationBrowserFooter.d.ts +3 -1
- package/lib/typescript/react-query/components/modals/MutationBrowserFooter.d.ts.map +1 -1
- package/lib/typescript/react-query/components/modals/QueryBrowserFooter.d.ts +4 -1
- package/lib/typescript/react-query/components/modals/QueryBrowserFooter.d.ts.map +1 -1
- package/lib/typescript/react-query/components/modals/ReactQueryModalHeader.d.ts +6 -1
- package/lib/typescript/react-query/components/modals/ReactQueryModalHeader.d.ts.map +1 -1
- package/lib/typescript/react-query/components/modals/SwipeIndicator.d.ts.map +1 -1
- package/lib/typescript/react-query/components/query-browser/MutationStatusCount.d.ts +2 -0
- package/lib/typescript/react-query/components/query-browser/MutationStatusCount.d.ts.map +1 -1
- package/lib/typescript/react-query/components/query-browser/QueryStatus.d.ts +5 -0
- package/lib/typescript/react-query/components/query-browser/QueryStatus.d.ts.map +1 -1
- package/lib/typescript/react-query/components/query-browser/QueryStatusCount.d.ts +2 -0
- package/lib/typescript/react-query/components/query-browser/QueryStatusCount.d.ts.map +1 -1
- package/lib/typescript/react-query/sync/dehydrate.d.ts +30 -0
- package/lib/typescript/react-query/sync/dehydrate.d.ts.map +1 -0
- package/lib/typescript/react-query/sync/reactQuerySyncAdapter.d.ts +34 -0
- package/lib/typescript/react-query/sync/reactQuerySyncAdapter.d.ts.map +1 -0
- package/lib/typescript/react-query/sync/useReactQuerySyncAdapter.d.ts +9 -0
- package/lib/typescript/react-query/sync/useReactQuerySyncAdapter.d.ts.map +1 -0
- package/package.json +3 -3
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
import { ModalHeader, TabSelector, Search, X, Filter, Trash, buoyColors } from "@buoy-gg/shared-ui";
|
|
4
4
|
import { useState, useRef, useEffect } from "react";
|
|
5
5
|
import { View, TextInput, TouchableOpacity, StyleSheet } from "react-native";
|
|
6
|
+
import { WifiToggle } from "../WifiToggle";
|
|
6
7
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
7
8
|
/**
|
|
8
9
|
* Shared header for all React Query modals. Handles tab switching when browsing and presents
|
|
@@ -18,7 +19,8 @@ export function ReactQueryModalHeader({
|
|
|
18
19
|
onSearchChange,
|
|
19
20
|
onFilterPress,
|
|
20
21
|
hasActiveFilters = false,
|
|
21
|
-
onClearCache
|
|
22
|
+
onClearCache,
|
|
23
|
+
showWifiToggle = false
|
|
22
24
|
}) {
|
|
23
25
|
const [isSearchActive, setIsSearchActive] = useState(false);
|
|
24
26
|
const searchInputRef = useRef(null);
|
|
@@ -108,6 +110,18 @@ export function ReactQueryModalHeader({
|
|
|
108
110
|
color: buoyColors.textSecondary
|
|
109
111
|
})
|
|
110
112
|
}) : null]
|
|
113
|
+
}) : showWifiToggle ? /*#__PURE__*/_jsxs(View, {
|
|
114
|
+
style: styles.tabRow,
|
|
115
|
+
children: [/*#__PURE__*/_jsx(View, {
|
|
116
|
+
style: styles.tabSelectorWrap,
|
|
117
|
+
children: /*#__PURE__*/_jsx(TabSelector, {
|
|
118
|
+
tabs: tabs,
|
|
119
|
+
activeTab: activeTab,
|
|
120
|
+
onTabChange: tab => onTabChange(tab)
|
|
121
|
+
})
|
|
122
|
+
}), /*#__PURE__*/_jsx(WifiToggle, {
|
|
123
|
+
size: 16
|
|
124
|
+
})]
|
|
111
125
|
}) : /*#__PURE__*/_jsx(TabSelector, {
|
|
112
126
|
tabs: tabs,
|
|
113
127
|
activeTab: activeTab,
|
|
@@ -144,6 +158,15 @@ export function ReactQueryModalHeader({
|
|
|
144
158
|
});
|
|
145
159
|
}
|
|
146
160
|
const styles = StyleSheet.create({
|
|
161
|
+
tabRow: {
|
|
162
|
+
flex: 1,
|
|
163
|
+
flexDirection: "row",
|
|
164
|
+
alignItems: "center",
|
|
165
|
+
gap: 12
|
|
166
|
+
},
|
|
167
|
+
tabSelectorWrap: {
|
|
168
|
+
flex: 1
|
|
169
|
+
},
|
|
147
170
|
headerSearchContainer: {
|
|
148
171
|
flexDirection: "row",
|
|
149
172
|
alignItems: "center",
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
import { View, StyleSheet, Animated } from "react-native";
|
|
4
|
+
import { absoluteFill } from "@buoy-gg/shared-ui";
|
|
4
5
|
import { useMemo } from "react";
|
|
5
6
|
import { ChevronLeft, ChevronRight, buoyColors } from "@buoy-gg/shared-ui";
|
|
6
7
|
|
|
@@ -184,7 +185,7 @@ export function SwipeIndicator({
|
|
|
184
185
|
}
|
|
185
186
|
const styles = StyleSheet.create({
|
|
186
187
|
container: {
|
|
187
|
-
...
|
|
188
|
+
...absoluteFill,
|
|
188
189
|
zIndex: 1000,
|
|
189
190
|
justifyContent: "center",
|
|
190
191
|
alignItems: "center"
|
|
@@ -11,7 +11,8 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
11
11
|
*/
|
|
12
12
|
const MutationStatusCount = ({
|
|
13
13
|
activeFilter,
|
|
14
|
-
onFilterChange
|
|
14
|
+
onFilterChange,
|
|
15
|
+
size = "default"
|
|
15
16
|
}) => {
|
|
16
17
|
const {
|
|
17
18
|
pending,
|
|
@@ -57,7 +58,8 @@ const MutationStatusCount = ({
|
|
|
57
58
|
isActive: activeFilter === "pending",
|
|
58
59
|
onPress: event => handleFilterClick("pending", event),
|
|
59
60
|
onTouchStart: handleTouchStart,
|
|
60
|
-
showLabel: true
|
|
61
|
+
showLabel: true,
|
|
62
|
+
size: size
|
|
61
63
|
}), /*#__PURE__*/_jsx(QueryStatus, {
|
|
62
64
|
label: "Success",
|
|
63
65
|
color: "green",
|
|
@@ -65,7 +67,8 @@ const MutationStatusCount = ({
|
|
|
65
67
|
isActive: activeFilter === "success",
|
|
66
68
|
onPress: event => handleFilterClick("success", event),
|
|
67
69
|
onTouchStart: handleTouchStart,
|
|
68
|
-
showLabel: true
|
|
70
|
+
showLabel: true,
|
|
71
|
+
size: size
|
|
69
72
|
}), /*#__PURE__*/_jsx(QueryStatus, {
|
|
70
73
|
label: "Error",
|
|
71
74
|
color: "red",
|
|
@@ -73,7 +76,8 @@ const MutationStatusCount = ({
|
|
|
73
76
|
isActive: activeFilter === "error",
|
|
74
77
|
onPress: event => handleFilterClick("error", event),
|
|
75
78
|
onTouchStart: handleTouchStart,
|
|
76
|
-
showLabel: true
|
|
79
|
+
showLabel: true,
|
|
80
|
+
size: size
|
|
77
81
|
}), /*#__PURE__*/_jsx(QueryStatus, {
|
|
78
82
|
label: "Paused",
|
|
79
83
|
color: "purple",
|
|
@@ -81,7 +85,8 @@ const MutationStatusCount = ({
|
|
|
81
85
|
isActive: activeFilter === "paused",
|
|
82
86
|
onPress: event => handleFilterClick("paused", event),
|
|
83
87
|
onTouchStart: handleTouchStart,
|
|
84
|
-
showLabel: true
|
|
88
|
+
showLabel: true,
|
|
89
|
+
size: size
|
|
85
90
|
})]
|
|
86
91
|
})
|
|
87
92
|
});
|
|
@@ -13,8 +13,10 @@ const QueryStatus = ({
|
|
|
13
13
|
showLabel = true,
|
|
14
14
|
isActive = false,
|
|
15
15
|
onPress,
|
|
16
|
-
onTouchStart
|
|
16
|
+
onTouchStart,
|
|
17
|
+
size = "default"
|
|
17
18
|
}) => {
|
|
19
|
+
const isLarge = size === "large";
|
|
18
20
|
// Buoy theme color mapping for status indicators
|
|
19
21
|
const getStatusColors = colorName => {
|
|
20
22
|
const colorMap = {
|
|
@@ -60,7 +62,7 @@ const QueryStatus = ({
|
|
|
60
62
|
const statusColors = getStatusColors(color);
|
|
61
63
|
return /*#__PURE__*/_jsxs(TouchableOpacity, {
|
|
62
64
|
"sentry-label": "ignore devtools query status",
|
|
63
|
-
style: [styles.queryStatusTag, isActive && {
|
|
65
|
+
style: [styles.queryStatusTag, isLarge && styles.queryStatusTagLarge, isActive && {
|
|
64
66
|
backgroundColor: statusColors.dot + "15",
|
|
65
67
|
borderColor: statusColors.dot + "40"
|
|
66
68
|
}],
|
|
@@ -69,16 +71,16 @@ const QueryStatus = ({
|
|
|
69
71
|
onPressIn: onTouchStart,
|
|
70
72
|
activeOpacity: 0.7,
|
|
71
73
|
children: [/*#__PURE__*/_jsx(View, {
|
|
72
|
-
style: [styles.dot, {
|
|
74
|
+
style: [styles.dot, isLarge && styles.dotLarge, {
|
|
73
75
|
backgroundColor: statusColors.dot
|
|
74
76
|
}]
|
|
75
77
|
}), showLabel && /*#__PURE__*/_jsx(Text, {
|
|
76
|
-
style: [styles.label],
|
|
78
|
+
style: [styles.label, isLarge && styles.labelLarge],
|
|
77
79
|
numberOfLines: 1,
|
|
78
80
|
ellipsizeMode: "tail",
|
|
79
81
|
children: label
|
|
80
82
|
}), count > 0 && /*#__PURE__*/_jsx(Text, {
|
|
81
|
-
style: [styles.count, {
|
|
83
|
+
style: [styles.count, isLarge && styles.countLarge, {
|
|
82
84
|
color: statusColors.dot
|
|
83
85
|
}],
|
|
84
86
|
numberOfLines: 1,
|
|
@@ -99,23 +101,41 @@ const styles = StyleSheet.create({
|
|
|
99
101
|
borderWidth: 1,
|
|
100
102
|
borderColor: buoyColors.textMuted + "20"
|
|
101
103
|
},
|
|
104
|
+
queryStatusTagLarge: {
|
|
105
|
+
borderRadius: 18,
|
|
106
|
+
paddingHorizontal: 16,
|
|
107
|
+
paddingVertical: 9,
|
|
108
|
+
height: 40,
|
|
109
|
+
gap: 9
|
|
110
|
+
},
|
|
102
111
|
dot: {
|
|
103
112
|
width: 6,
|
|
104
113
|
height: 6,
|
|
105
114
|
borderRadius: 3
|
|
106
115
|
},
|
|
116
|
+
dotLarge: {
|
|
117
|
+
width: 9,
|
|
118
|
+
height: 9,
|
|
119
|
+
borderRadius: 4.5
|
|
120
|
+
},
|
|
107
121
|
label: {
|
|
108
122
|
fontSize: 11,
|
|
109
123
|
fontWeight: "500",
|
|
110
124
|
color: buoyColors.textSecondary,
|
|
111
125
|
fontFamily: "system"
|
|
112
126
|
},
|
|
127
|
+
labelLarge: {
|
|
128
|
+
fontSize: 15
|
|
129
|
+
},
|
|
113
130
|
count: {
|
|
114
131
|
fontSize: 11,
|
|
115
132
|
fontVariant: ["tabular-nums"],
|
|
116
133
|
fontWeight: "600",
|
|
117
134
|
marginLeft: "auto",
|
|
118
135
|
fontFamily: "system"
|
|
136
|
+
},
|
|
137
|
+
countLarge: {
|
|
138
|
+
fontSize: 15
|
|
119
139
|
}
|
|
120
140
|
});
|
|
121
141
|
export default QueryStatus;
|
|
@@ -10,7 +10,8 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
10
10
|
*/
|
|
11
11
|
const QueryStatusCount = ({
|
|
12
12
|
activeFilter,
|
|
13
|
-
onFilterChange
|
|
13
|
+
onFilterChange,
|
|
14
|
+
size = "default"
|
|
14
15
|
}) => {
|
|
15
16
|
const {
|
|
16
17
|
fresh,
|
|
@@ -64,6 +65,8 @@ const QueryStatusCount = ({
|
|
|
64
65
|
onPress: event => handleFilterClick("fresh", event),
|
|
65
66
|
onTouchStart: handleTouchStart,
|
|
66
67
|
showLabel: true // Always show labels now
|
|
68
|
+
,
|
|
69
|
+
size: size
|
|
67
70
|
}), /*#__PURE__*/_jsx(QueryStatus, {
|
|
68
71
|
label: "Loading",
|
|
69
72
|
color: "blue",
|
|
@@ -72,6 +75,8 @@ const QueryStatusCount = ({
|
|
|
72
75
|
onPress: event => handleFilterClick("fetching", event),
|
|
73
76
|
onTouchStart: handleTouchStart,
|
|
74
77
|
showLabel: true // Always show labels now
|
|
78
|
+
,
|
|
79
|
+
size: size
|
|
75
80
|
}), /*#__PURE__*/_jsx(QueryStatus, {
|
|
76
81
|
label: "Paused",
|
|
77
82
|
color: "purple",
|
|
@@ -80,6 +85,8 @@ const QueryStatusCount = ({
|
|
|
80
85
|
onPress: event => handleFilterClick("paused", event),
|
|
81
86
|
onTouchStart: handleTouchStart,
|
|
82
87
|
showLabel: true // Always show labels now
|
|
88
|
+
,
|
|
89
|
+
size: size
|
|
83
90
|
}), /*#__PURE__*/_jsx(QueryStatus, {
|
|
84
91
|
label: "Stale",
|
|
85
92
|
color: "yellow",
|
|
@@ -88,6 +95,8 @@ const QueryStatusCount = ({
|
|
|
88
95
|
onPress: event => handleFilterClick("stale", event),
|
|
89
96
|
onTouchStart: handleTouchStart,
|
|
90
97
|
showLabel: true // Always show labels now
|
|
98
|
+
,
|
|
99
|
+
size: size
|
|
91
100
|
}), /*#__PURE__*/_jsx(QueryStatus, {
|
|
92
101
|
label: "Idle",
|
|
93
102
|
color: "gray",
|
|
@@ -96,6 +105,8 @@ const QueryStatusCount = ({
|
|
|
96
105
|
onPress: event => handleFilterClick("inactive", event),
|
|
97
106
|
onTouchStart: handleTouchStart,
|
|
98
107
|
showLabel: true // Always show labels now
|
|
108
|
+
,
|
|
109
|
+
size: size
|
|
99
110
|
})]
|
|
100
111
|
})
|
|
101
112
|
});
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Dehydration for external sync — ported from buoy-desktop's
|
|
5
|
+
* react-query-external-sync/hydration.ts so the desktop dashboard can
|
|
6
|
+
* hydrate an identical mirror of the device's QueryClient.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
export function dehydrateQueryClient(client) {
|
|
10
|
+
const mutations = client.getMutationCache().getAll().map(mutation => dehydrateMutation(mutation));
|
|
11
|
+
const queries = client.getQueryCache().getAll().map(query => dehydrateQuery(query));
|
|
12
|
+
return {
|
|
13
|
+
mutations,
|
|
14
|
+
queries
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
function dehydrateMutation(mutation) {
|
|
18
|
+
return {
|
|
19
|
+
mutationId: mutation.mutationId,
|
|
20
|
+
mutationKey: mutation.options.mutationKey,
|
|
21
|
+
state: mutation.state,
|
|
22
|
+
...(mutation.options.scope && {
|
|
23
|
+
scope: mutation.options.scope
|
|
24
|
+
}),
|
|
25
|
+
...(mutation.meta && {
|
|
26
|
+
meta: mutation.meta
|
|
27
|
+
})
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
function dehydrateQuery(query) {
|
|
31
|
+
const observerStates = query.observers.map(observer => ({
|
|
32
|
+
queryHash: query.queryHash,
|
|
33
|
+
options: observer.options,
|
|
34
|
+
// Remove queryFn from observer options so the dashboard can't accidentally
|
|
35
|
+
// run device fetch functions (they aren't serializable anyway)
|
|
36
|
+
queryFn: undefined
|
|
37
|
+
}));
|
|
38
|
+
return {
|
|
39
|
+
state: {
|
|
40
|
+
...query.state,
|
|
41
|
+
...(query.state.data !== undefined && {
|
|
42
|
+
data: query.state.data
|
|
43
|
+
})
|
|
44
|
+
},
|
|
45
|
+
queryKey: query.queryKey,
|
|
46
|
+
queryHash: query.queryHash,
|
|
47
|
+
...(query.meta && {
|
|
48
|
+
meta: query.meta
|
|
49
|
+
}),
|
|
50
|
+
observers: observerStates
|
|
51
|
+
};
|
|
52
|
+
}
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Sync adapter for the React Query tool, consumed by @buoy-gg/external-sync's
|
|
5
|
+
* `useExternalSync` (structurally matches its ToolSyncAdapter interface so
|
|
6
|
+
* this package doesn't need a dependency on it).
|
|
7
|
+
*
|
|
8
|
+
* Action handlers are ported from buoy-desktop's react-query-external-sync
|
|
9
|
+
* (useSyncQueries.ts) so the dashboard keeps identical behavior, including
|
|
10
|
+
* the trigger/restore loading and error simulations used by the TanStack
|
|
11
|
+
* devtools UI.
|
|
12
|
+
*/
|
|
13
|
+
import { onlineManager } from "@tanstack/react-query";
|
|
14
|
+
import { dehydrateQueryClient } from "./dehydrate";
|
|
15
|
+
export function createReactQuerySyncAdapter(queryClient) {
|
|
16
|
+
const getQuery = params => {
|
|
17
|
+
const {
|
|
18
|
+
queryHash
|
|
19
|
+
} = params;
|
|
20
|
+
const query = queryClient.getQueryCache().get(queryHash);
|
|
21
|
+
if (!query) {
|
|
22
|
+
throw new Error(`Query with hash "${queryHash}" not found`);
|
|
23
|
+
}
|
|
24
|
+
return query;
|
|
25
|
+
};
|
|
26
|
+
return {
|
|
27
|
+
version: 1,
|
|
28
|
+
getSnapshot: () => ({
|
|
29
|
+
dehydratedState: dehydrateQueryClient(queryClient),
|
|
30
|
+
isOnlineManagerOnline: onlineManager.isOnline()
|
|
31
|
+
}),
|
|
32
|
+
subscribe: onChange => {
|
|
33
|
+
const unsubQueries = queryClient.getQueryCache().subscribe(onChange);
|
|
34
|
+
const unsubMutations = queryClient.getMutationCache().subscribe(onChange);
|
|
35
|
+
const unsubOnline = onlineManager.subscribe(onChange);
|
|
36
|
+
return () => {
|
|
37
|
+
unsubQueries();
|
|
38
|
+
unsubMutations();
|
|
39
|
+
unsubOnline();
|
|
40
|
+
};
|
|
41
|
+
},
|
|
42
|
+
actions: {
|
|
43
|
+
refetch: params => {
|
|
44
|
+
const query = getQuery(params);
|
|
45
|
+
// Swallow fetch rejections — the resulting error state syncs anyway
|
|
46
|
+
return query.fetch().catch(() => undefined);
|
|
47
|
+
},
|
|
48
|
+
invalidate: params => queryClient.invalidateQueries(getQuery(params)),
|
|
49
|
+
reset: params => queryClient.resetQueries(getQuery(params)),
|
|
50
|
+
remove: params => {
|
|
51
|
+
queryClient.removeQueries(getQuery(params));
|
|
52
|
+
},
|
|
53
|
+
setQueryData: params => {
|
|
54
|
+
const {
|
|
55
|
+
queryKey,
|
|
56
|
+
data
|
|
57
|
+
} = params;
|
|
58
|
+
queryClient.setQueryData(queryKey, data, {
|
|
59
|
+
updatedAt: Date.now()
|
|
60
|
+
});
|
|
61
|
+
},
|
|
62
|
+
triggerError: params => {
|
|
63
|
+
const query = getQuery(params);
|
|
64
|
+
const __previousQueryOptions = query.options;
|
|
65
|
+
query.setState({
|
|
66
|
+
status: "error",
|
|
67
|
+
error: new Error("Unknown error from devtools"),
|
|
68
|
+
fetchMeta: {
|
|
69
|
+
...query.state.fetchMeta,
|
|
70
|
+
// @ts-expect-error This does exist
|
|
71
|
+
__previousQueryOptions
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
},
|
|
75
|
+
restoreError: params => queryClient.resetQueries(getQuery(params)),
|
|
76
|
+
triggerLoading: params => {
|
|
77
|
+
const query = getQuery(params);
|
|
78
|
+
const __previousQueryOptions = query.options;
|
|
79
|
+
// Trigger a fetch in order to trigger suspense as well
|
|
80
|
+
query.fetch({
|
|
81
|
+
...__previousQueryOptions,
|
|
82
|
+
queryFn: () => new Promise(() => {
|
|
83
|
+
// Never resolve — simulates perpetual loading
|
|
84
|
+
}),
|
|
85
|
+
gcTime: -1
|
|
86
|
+
}).catch(() => undefined);
|
|
87
|
+
query.setState({
|
|
88
|
+
data: undefined,
|
|
89
|
+
status: "pending",
|
|
90
|
+
fetchMeta: {
|
|
91
|
+
...query.state.fetchMeta,
|
|
92
|
+
// @ts-expect-error This does exist
|
|
93
|
+
__previousQueryOptions
|
|
94
|
+
}
|
|
95
|
+
});
|
|
96
|
+
},
|
|
97
|
+
restoreLoading: params => {
|
|
98
|
+
const query = getQuery(params);
|
|
99
|
+
const previousState = query.state;
|
|
100
|
+
const previousOptions = query.state.fetchMeta ? query.state.fetchMeta.__previousQueryOptions : null;
|
|
101
|
+
query.cancel({
|
|
102
|
+
silent: true
|
|
103
|
+
});
|
|
104
|
+
query.setState({
|
|
105
|
+
...previousState,
|
|
106
|
+
fetchStatus: "idle",
|
|
107
|
+
fetchMeta: null
|
|
108
|
+
});
|
|
109
|
+
if (previousOptions) {
|
|
110
|
+
query.fetch(previousOptions).catch(() => undefined);
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
clearQueryCache: () => {
|
|
114
|
+
queryClient.getQueryCache().clear();
|
|
115
|
+
},
|
|
116
|
+
clearMutationCache: () => {
|
|
117
|
+
queryClient.getMutationCache().clear();
|
|
118
|
+
},
|
|
119
|
+
setOnline: params => {
|
|
120
|
+
const {
|
|
121
|
+
online
|
|
122
|
+
} = params;
|
|
123
|
+
onlineManager.setOnline(online);
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
};
|
|
127
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { useMemo } from "react";
|
|
4
|
+
import { useQueryClient } from "@tanstack/react-query";
|
|
5
|
+
import { createReactQuerySyncAdapter } from "./reactQuerySyncAdapter";
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Context-based variant of createReactQuerySyncAdapter for zero-config
|
|
9
|
+
* wiring (FloatingDevTools' auto external sync): reads the QueryClient from
|
|
10
|
+
* the surrounding QueryClientProvider. Returns null when rendered outside a
|
|
11
|
+
* provider so callers can skip registering the query tool.
|
|
12
|
+
*/
|
|
13
|
+
export function useReactQuerySyncAdapter() {
|
|
14
|
+
let queryClient;
|
|
15
|
+
try {
|
|
16
|
+
// Just a context read — throws only when there is no provider above us,
|
|
17
|
+
// which never changes for a mounted tree, so hook order stays stable.
|
|
18
|
+
queryClient = useQueryClient();
|
|
19
|
+
} catch {
|
|
20
|
+
queryClient = null;
|
|
21
|
+
}
|
|
22
|
+
return useMemo(() => queryClient ? createReactQuerySyncAdapter(queryClient) : null, [queryClient]);
|
|
23
|
+
}
|
|
@@ -9,6 +9,9 @@
|
|
|
9
9
|
*/
|
|
10
10
|
export { reactQueryToolPreset, createReactQueryTool, wifiTogglePreset, createWifiToggleTool, } from "./preset";
|
|
11
11
|
export { setQueryClient, disconnectQueryClient, type ReactQueryEvent, type ReactQueryEventType, } from "./react-query/stores/reactQueryEventStore";
|
|
12
|
+
export { createReactQuerySyncAdapter } from "./react-query/sync/reactQuerySyncAdapter";
|
|
13
|
+
export { useReactQuerySyncAdapter } from "./react-query/sync/useReactQuerySyncAdapter";
|
|
14
|
+
export type { DehydratedState, DehydratedQuery, DehydratedMutation, ObserverState, } from "./react-query/sync/dehydrate";
|
|
12
15
|
export { ReactQueryModal } from "./react-query/components/modals/ReactQueryModal";
|
|
13
16
|
export { ReactQueryModalHeader } from "./react-query/components/modals/ReactQueryModalHeader";
|
|
14
17
|
export { QueryBrowserModal } from "./react-query/components/modals/QueryBrowserModal";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAsBH,OAAO,EACL,oBAAoB,EACpB,oBAAoB,EACpB,gBAAgB,EAChB,oBAAoB,GACrB,MAAM,UAAU,CAAC;AAKlB,OAAO,EACL,cAAc,EACd,qBAAqB,EACrB,KAAK,eAAe,EACpB,KAAK,mBAAmB,GACzB,MAAM,2CAA2C,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAsBH,OAAO,EACL,oBAAoB,EACpB,oBAAoB,EACpB,gBAAgB,EAChB,oBAAoB,GACrB,MAAM,UAAU,CAAC;AAKlB,OAAO,EACL,cAAc,EACd,qBAAqB,EACrB,KAAK,eAAe,EACpB,KAAK,mBAAmB,GACzB,MAAM,2CAA2C,CAAC;AAKnD,OAAO,EAAE,2BAA2B,EAAE,MAAM,0CAA0C,CAAC;AACvF,OAAO,EAAE,wBAAwB,EAAE,MAAM,6CAA6C,CAAC;AACvF,YAAY,EACV,eAAe,EACf,eAAe,EACf,kBAAkB,EAClB,aAAa,GACd,MAAM,8BAA8B,CAAC;AAOtC,OAAO,EAAE,eAAe,EAAE,MAAM,iDAAiD,CAAC;AAClF,OAAO,EAAE,qBAAqB,EAAE,MAAM,uDAAuD,CAAC;AAC9F,OAAO,EAAE,iBAAiB,EAAE,MAAM,mDAAmD,CAAC;AACtF,OAAO,EAAE,oBAAoB,EAAE,MAAM,sDAAsD,CAAC;AAC5F,OAAO,EAAE,mBAAmB,EAAE,MAAM,qDAAqD,CAAC;AAC1F,OAAO,EAAE,eAAe,EAAE,MAAM,iDAAiD,CAAC;AAClF,OAAO,EAAE,kBAAkB,EAAE,MAAM,oDAAoD,CAAC;AACxF,OAAO,EAAE,qBAAqB,EAAE,MAAM,uDAAuD,CAAC;AAC9F,OAAO,EAAE,cAAc,EAAE,MAAM,gDAAgD,CAAC;AAGhF,OAAO,EACL,QAAQ,EACR,YAAY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BAWmC;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE;;;;;EA6BnD"}
|
|
@@ -3,6 +3,8 @@ interface MutationBrowserFooterProps {
|
|
|
3
3
|
activeFilter?: string | null;
|
|
4
4
|
onFilterChange?: (filter: string | null) => void;
|
|
5
5
|
modalMode: ModalMode;
|
|
6
|
+
/** Badge size, forwarded to the status count chips. */
|
|
7
|
+
size?: "default" | "large";
|
|
6
8
|
}
|
|
7
9
|
/**
|
|
8
10
|
* Footer component for MutationBrowserModal following composition principles
|
|
@@ -12,6 +14,6 @@ interface MutationBrowserFooterProps {
|
|
|
12
14
|
* - Prefer Composition over Configuration: Specialized footer matching DataEditorMode pattern
|
|
13
15
|
* - Extract Reusable Logic: Consistent footer styling across modal types
|
|
14
16
|
*/
|
|
15
|
-
export declare function MutationBrowserFooter({ activeFilter, onFilterChange, modalMode, }: MutationBrowserFooterProps): import("react").JSX.Element;
|
|
17
|
+
export declare function MutationBrowserFooter({ activeFilter, onFilterChange, modalMode, size, }: MutationBrowserFooterProps): import("react").JSX.Element;
|
|
16
18
|
export {};
|
|
17
19
|
//# sourceMappingURL=MutationBrowserFooter.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MutationBrowserFooter.d.ts","sourceRoot":"","sources":["../../../../../src/react-query/components/modals/MutationBrowserFooter.tsx"],"names":[],"mappings":"AACA,OAAO,EAAiC,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAI9E,UAAU,0BAA0B;IAClC,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IACjD,SAAS,EAAE,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"MutationBrowserFooter.d.ts","sourceRoot":"","sources":["../../../../../src/react-query/components/modals/MutationBrowserFooter.tsx"],"names":[],"mappings":"AACA,OAAO,EAAiC,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAI9E,UAAU,0BAA0B;IAClC,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IACjD,SAAS,EAAE,SAAS,CAAC;IACrB,uDAAuD;IACvD,IAAI,CAAC,EAAE,SAAS,GAAG,OAAO,CAAC;CAC5B;AAED;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CAAC,EACpC,YAAY,EACZ,cAAc,EACd,SAAS,EACT,IAAgB,GACjB,EAAE,0BAA0B,+BA4B5B"}
|
|
@@ -2,6 +2,8 @@ interface QueryBrowserFooterProps {
|
|
|
2
2
|
activeFilter?: string | null;
|
|
3
3
|
onFilterChange?: (filter: string | null) => void;
|
|
4
4
|
isFloatingMode?: boolean;
|
|
5
|
+
/** Badge size, forwarded to the status count chips. */
|
|
6
|
+
size?: "default" | "large";
|
|
5
7
|
}
|
|
6
8
|
/**
|
|
7
9
|
* Footer component for QueryBrowserModal following composition principles
|
|
@@ -11,6 +13,7 @@ interface QueryBrowserFooterProps {
|
|
|
11
13
|
* - Prefer Composition over Configuration: Specialized footer matching DataEditorMode pattern
|
|
12
14
|
* - Extract Reusable Logic: Consistent footer styling across modal types
|
|
13
15
|
*/
|
|
14
|
-
export declare function QueryBrowserFooter({ activeFilter, onFilterChange, isFloatingMode,
|
|
16
|
+
export declare function QueryBrowserFooter({ activeFilter, onFilterChange, isFloatingMode, // Default to floating mode if not specified
|
|
17
|
+
size, }: QueryBrowserFooterProps): import("react").JSX.Element;
|
|
15
18
|
export {};
|
|
16
19
|
//# sourceMappingURL=QueryBrowserFooter.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QueryBrowserFooter.d.ts","sourceRoot":"","sources":["../../../../../src/react-query/components/modals/QueryBrowserFooter.tsx"],"names":[],"mappings":"AAIA,UAAU,uBAAuB;IAC/B,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IACjD,cAAc,CAAC,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"QueryBrowserFooter.d.ts","sourceRoot":"","sources":["../../../../../src/react-query/components/modals/QueryBrowserFooter.tsx"],"names":[],"mappings":"AAIA,UAAU,uBAAuB;IAC/B,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IACjD,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,uDAAuD;IACvD,IAAI,CAAC,EAAE,SAAS,GAAG,OAAO,CAAC;CAC5B;AAED;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAAC,EACjC,YAAY,EACZ,cAAc,EACd,cAAqB,EAAE,4CAA4C;AACnE,IAAgB,GACjB,EAAE,uBAAuB,+BAuBzB"}
|
|
@@ -10,11 +10,16 @@ interface ReactQueryModalHeaderProps {
|
|
|
10
10
|
onFilterPress?: () => void;
|
|
11
11
|
hasActiveFilters?: boolean;
|
|
12
12
|
onClearCache?: () => void;
|
|
13
|
+
/**
|
|
14
|
+
* When true, renders a Wi-Fi toggle (React Query's onlineManager on/off) next
|
|
15
|
+
* to the Queries/Mutations tabs. Opt-in so existing consumers are unchanged.
|
|
16
|
+
*/
|
|
17
|
+
showWifiToggle?: boolean;
|
|
13
18
|
}
|
|
14
19
|
/**
|
|
15
20
|
* Shared header for all React Query modals. Handles tab switching when browsing and presents
|
|
16
21
|
* breadcrumbs when a specific query or mutation is selected.
|
|
17
22
|
*/
|
|
18
|
-
export declare function ReactQueryModalHeader({ selectedQuery, selectedMutation, activeTab, onTabChange, onBack, searchText, onSearchChange, onFilterPress, hasActiveFilters, onClearCache, }: ReactQueryModalHeaderProps): import("react").JSX.Element;
|
|
23
|
+
export declare function ReactQueryModalHeader({ selectedQuery, selectedMutation, activeTab, onTabChange, onBack, searchText, onSearchChange, onFilterPress, hasActiveFilters, onClearCache, showWifiToggle, }: ReactQueryModalHeaderProps): import("react").JSX.Element;
|
|
19
24
|
export {};
|
|
20
25
|
//# sourceMappingURL=ReactQueryModalHeader.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReactQueryModalHeader.d.ts","sourceRoot":"","sources":["../../../../../src/react-query/components/modals/ReactQueryModalHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"ReactQueryModalHeader.d.ts","sourceRoot":"","sources":["../../../../../src/react-query/components/modals/ReactQueryModalHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAMxD,UAAU,0BAA0B;IAClC,aAAa,CAAC,EAAE,KAAK,CAAC;IACtB,gBAAgB,CAAC,EAAE,QAAQ,CAAC;IAC5B,SAAS,EAAE,SAAS,GAAG,WAAW,CAAC;IACnC,WAAW,EAAE,CAAC,GAAG,EAAE,SAAS,GAAG,WAAW,KAAK,IAAI,CAAC;IACpD,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,cAAc,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;IAC3B,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IAC1B;;;OAGG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,EACpC,aAAa,EACb,gBAAgB,EAChB,SAAS,EACT,WAAW,EACX,MAAM,EACN,UAAe,EACf,cAAc,EACd,aAAa,EACb,gBAAwB,EACxB,YAAY,EACZ,cAAsB,GACvB,EAAE,0BAA0B,+BAsK5B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SwipeIndicator.d.ts","sourceRoot":"","sources":["../../../../../src/react-query/components/modals/SwipeIndicator.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAoB,QAAQ,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"SwipeIndicator.d.ts","sourceRoot":"","sources":["../../../../../src/react-query/components/modals/SwipeIndicator.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAoB,QAAQ,EAAE,MAAM,cAAc,CAAC;AAK1D;;;GAGG;AAEH,UAAU,mBAAmB;IAC3B,YAAY,EAAE,QAAQ,CAAC,KAAK,CAAC;IAC7B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB;AAYD,wBAAgB,cAAc,CAAC,EAC7B,YAAY,EACZ,cAAwC,EACxC,YAAmB,EACnB,aAAoB,GACrB,EAAE,mBAAmB,+BAqLrB"}
|
|
@@ -2,6 +2,8 @@ import { FC } from "react";
|
|
|
2
2
|
interface MutationStatusCountProps {
|
|
3
3
|
activeFilter?: string | null;
|
|
4
4
|
onFilterChange?: (filter: string | null) => void;
|
|
5
|
+
/** Badge size, forwarded to each QueryStatus chip. */
|
|
6
|
+
size?: "default" | "large";
|
|
5
7
|
}
|
|
6
8
|
/**
|
|
7
9
|
* Horizontal status filter bar tailored for mutations. Integrates scroll detection to avoid
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MutationStatusCount.d.ts","sourceRoot":"","sources":["../../../../../src/react-query/components/query-browser/MutationStatusCount.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,EAAE,EAAoB,MAAM,OAAO,CAAC;AAE7C,UAAU,wBAAwB;IAChC,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"MutationStatusCount.d.ts","sourceRoot":"","sources":["../../../../../src/react-query/components/query-browser/MutationStatusCount.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,EAAE,EAAoB,MAAM,OAAO,CAAC;AAE7C,UAAU,wBAAwB;IAChC,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IACjD,sDAAsD;IACtD,IAAI,CAAC,EAAE,SAAS,GAAG,OAAO,CAAC;CAC5B;AAED;;;GAGG;AACH,QAAA,MAAM,mBAAmB,EAAE,EAAE,CAAC,wBAAwB,CAuFrD,CAAC;AAoBF,eAAe,mBAAmB,CAAC"}
|
|
@@ -8,6 +8,11 @@ interface QueryStatusProps {
|
|
|
8
8
|
isActive?: boolean;
|
|
9
9
|
onPress?: (event: GestureResponderEvent) => void;
|
|
10
10
|
onTouchStart?: (event: GestureResponderEvent) => void;
|
|
11
|
+
/**
|
|
12
|
+
* Visual size. "default" matches the compact mobile chip; "large" bumps the
|
|
13
|
+
* badge / dot / text up for roomier surfaces like the desktop dashboard.
|
|
14
|
+
*/
|
|
15
|
+
size?: "default" | "large";
|
|
11
16
|
}
|
|
12
17
|
/**
|
|
13
18
|
* Pill-like status badge used within status filter rows. Displays label, dot, and count.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QueryStatus.d.ts","sourceRoot":"","sources":["../../../../../src/react-query/components/query-browser/QueryStatus.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAC3B,OAAO,EAKL,qBAAqB,EACtB,MAAM,cAAc,CAAC;AAGtB,UAAU,gBAAgB;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,OAAO,GAAG,QAAQ,GAAG,MAAM,GAAG,MAAM,GAAG,QAAQ,GAAG,KAAK,CAAC;IAC/D,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,qBAAqB,KAAK,IAAI,CAAC;IACjD,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,qBAAqB,KAAK,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"QueryStatus.d.ts","sourceRoot":"","sources":["../../../../../src/react-query/components/query-browser/QueryStatus.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAC3B,OAAO,EAKL,qBAAqB,EACtB,MAAM,cAAc,CAAC;AAGtB,UAAU,gBAAgB;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,OAAO,GAAG,QAAQ,GAAG,MAAM,GAAG,MAAM,GAAG,QAAQ,GAAG,KAAK,CAAC;IAC/D,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,qBAAqB,KAAK,IAAI,CAAC;IACjD,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,qBAAqB,KAAK,IAAI,CAAC;IACtD;;;OAGG;IACH,IAAI,CAAC,EAAE,SAAS,GAAG,OAAO,CAAC;CAC5B;AAID;;GAEG;AACH,QAAA,MAAM,WAAW,EAAE,EAAE,CAAC,gBAAgB,CAuGrC,CAAC;AAqDF,eAAe,WAAW,CAAC"}
|
|
@@ -2,6 +2,8 @@ import { FC } from "react";
|
|
|
2
2
|
interface QueryStatusCountProps {
|
|
3
3
|
activeFilter?: string | null;
|
|
4
4
|
onFilterChange?: (filter: string | null) => void;
|
|
5
|
+
/** Badge size, forwarded to each QueryStatus chip. */
|
|
6
|
+
size?: "default" | "large";
|
|
5
7
|
}
|
|
6
8
|
/**
|
|
7
9
|
* Horizontal status filter bar for queries with scroll-aware tap handling to prevent misfires.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QueryStatusCount.d.ts","sourceRoot":"","sources":["../../../../../src/react-query/components/query-browser/QueryStatusCount.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAoB,MAAM,OAAO,CAAC;AAU7C,UAAU,qBAAqB;IAC7B,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"QueryStatusCount.d.ts","sourceRoot":"","sources":["../../../../../src/react-query/components/query-browser/QueryStatusCount.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAoB,MAAM,OAAO,CAAC;AAU7C,UAAU,qBAAqB;IAC7B,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IACjD,sDAAsD;IACtD,IAAI,CAAC,EAAE,SAAS,GAAG,OAAO,CAAC;CAC5B;AAED;;GAEG;AACH,QAAA,MAAM,gBAAgB,EAAE,EAAE,CAAC,qBAAqB,CAqG/C,CAAC;AAuBF,eAAe,gBAAgB,CAAC"}
|