@buoy-gg/react-query 3.0.2 → 4.0.1
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/react-query/components/QueryFilterViewV3.js +5 -2
- package/lib/commonjs/react-query/components/QuerySelector.js +2 -1
- package/lib/commonjs/react-query/components/query-browser/QueryRow.js +3 -0
- package/lib/commonjs/react-query/components/query-browser/QueryStatus.js +15 -10
- package/lib/commonjs/react-query/hooks/useQueryStatusCounts.js +6 -2
- package/lib/commonjs/react-query/utils/getQueryStatusColor.js +1 -1
- package/lib/commonjs/react-query/utils/getQueryStatusLabel.js +8 -2
- package/lib/module/react-query/components/QueryFilterViewV3.js +5 -2
- package/lib/module/react-query/components/QuerySelector.js +2 -1
- package/lib/module/react-query/components/query-browser/QueryRow.js +3 -0
- package/lib/module/react-query/components/query-browser/QueryStatus.js +15 -10
- package/lib/module/react-query/hooks/useQueryStatusCounts.js +6 -2
- package/lib/module/react-query/utils/getQueryStatusColor.js +1 -1
- package/lib/module/react-query/utils/getQueryStatusLabel.js +8 -2
- package/lib/typescript/react-query/components/QueryFilterViewV3.d.ts.map +1 -1
- package/lib/typescript/react-query/components/QuerySelector.d.ts.map +1 -1
- package/lib/typescript/react-query/components/query-browser/QueryRow.d.ts.map +1 -1
- package/lib/typescript/react-query/components/query-browser/QueryStatus.d.ts.map +1 -1
- package/lib/typescript/react-query/hooks/useQueryStatusCounts.d.ts +2 -0
- package/lib/typescript/react-query/hooks/useQueryStatusCounts.d.ts.map +1 -1
- package/lib/typescript/react-query/utils/getQueryStatusColor.d.ts +1 -1
- package/lib/typescript/react-query/utils/getQueryStatusColor.d.ts.map +1 -1
- package/lib/typescript/react-query/utils/getQueryStatusLabel.d.ts +7 -1
- package/lib/typescript/react-query/utils/getQueryStatusLabel.d.ts.map +1 -1
- package/package.json +3 -3
|
@@ -34,9 +34,12 @@ function QueryFilterViewV3({
|
|
|
34
34
|
error: 0
|
|
35
35
|
};
|
|
36
36
|
queries.forEach(query => {
|
|
37
|
+
// Count by the status LABEL (single source of truth) so the Error chip's
|
|
38
|
+
// count matches exactly what the cards show and what the Error filter
|
|
39
|
+
// returns. (Previously error was counted off `state.error`, a different
|
|
40
|
+
// axis than the label, so the count, cards, and filter could disagree.)
|
|
37
41
|
const status = (0, _getQueryStatusLabel.getQueryStatusLabel)(query);
|
|
38
|
-
if (status === "disabled") counts.disabled++;else if (status === "fresh") counts.fresh++;else if (status === "stale") counts.stale++;else if (status === "fetching") counts.fetching++;else if (status === "paused") counts.paused++;else if (status === "inactive") counts.inactive++;
|
|
39
|
-
if (query.state.error) counts.error++;
|
|
42
|
+
if (status === "disabled") counts.disabled++;else if (status === "error") counts.error++;else if (status === "fresh") counts.fresh++;else if (status === "stale") counts.stale++;else if (status === "fetching") counts.fetching++;else if (status === "paused") counts.paused++;else if (status === "inactive") counts.inactive++;
|
|
40
43
|
});
|
|
41
44
|
return counts;
|
|
42
45
|
}, [queries]);
|
|
@@ -80,7 +80,8 @@ function QuerySelector({
|
|
|
80
80
|
gray: "#6B7280",
|
|
81
81
|
purple: "#8B5CF6",
|
|
82
82
|
yellow: "#F59E0B",
|
|
83
|
-
green: "#10B981"
|
|
83
|
+
green: "#10B981",
|
|
84
|
+
red: "#EF4444"
|
|
84
85
|
};
|
|
85
86
|
const statusColor = colorMap[statusColorName] || "#6B7280";
|
|
86
87
|
const isSelected = query === selectedQuery;
|
|
@@ -26,6 +26,9 @@ const QueryRow = ({
|
|
|
26
26
|
case "disabled":
|
|
27
27
|
return _sharedUi.buoyColors.textMuted + "80";
|
|
28
28
|
// More muted for disabled
|
|
29
|
+
case "error":
|
|
30
|
+
return _sharedUi.buoyColors.error;
|
|
31
|
+
// red — failed with no cached data
|
|
29
32
|
case "fresh":
|
|
30
33
|
return _sharedUi.buoyColors.success;
|
|
31
34
|
case "stale":
|
|
@@ -106,11 +106,11 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
106
106
|
borderColor: _sharedUi.buoyColors.textMuted + "20"
|
|
107
107
|
},
|
|
108
108
|
queryStatusTagLarge: {
|
|
109
|
-
borderRadius:
|
|
110
|
-
paddingHorizontal:
|
|
111
|
-
paddingVertical:
|
|
112
|
-
height:
|
|
113
|
-
gap:
|
|
109
|
+
borderRadius: 16,
|
|
110
|
+
paddingHorizontal: 13,
|
|
111
|
+
paddingVertical: 6,
|
|
112
|
+
height: 32,
|
|
113
|
+
gap: 7
|
|
114
114
|
},
|
|
115
115
|
dot: {
|
|
116
116
|
width: 6,
|
|
@@ -118,9 +118,9 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
118
118
|
borderRadius: 3
|
|
119
119
|
},
|
|
120
120
|
dotLarge: {
|
|
121
|
-
width:
|
|
122
|
-
height:
|
|
123
|
-
borderRadius: 4
|
|
121
|
+
width: 8,
|
|
122
|
+
height: 8,
|
|
123
|
+
borderRadius: 4
|
|
124
124
|
},
|
|
125
125
|
label: {
|
|
126
126
|
fontSize: 11,
|
|
@@ -129,7 +129,10 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
129
129
|
fontFamily: "system"
|
|
130
130
|
},
|
|
131
131
|
labelLarge: {
|
|
132
|
-
fontSize:
|
|
132
|
+
fontSize: 13,
|
|
133
|
+
fontWeight: "600",
|
|
134
|
+
letterSpacing: 0.2,
|
|
135
|
+
fontFamily: '"SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif'
|
|
133
136
|
},
|
|
134
137
|
count: {
|
|
135
138
|
fontSize: 11,
|
|
@@ -139,7 +142,9 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
139
142
|
fontFamily: "system"
|
|
140
143
|
},
|
|
141
144
|
countLarge: {
|
|
142
|
-
fontSize:
|
|
145
|
+
fontSize: 13,
|
|
146
|
+
fontWeight: "700",
|
|
147
|
+
fontFamily: '"SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif'
|
|
143
148
|
}
|
|
144
149
|
});
|
|
145
150
|
var _default = exports.default = QueryStatus;
|
|
@@ -19,7 +19,9 @@ function useQueryStatusCounts() {
|
|
|
19
19
|
stale: 0,
|
|
20
20
|
fetching: 0,
|
|
21
21
|
paused: 0,
|
|
22
|
-
inactive: 0
|
|
22
|
+
inactive: 0,
|
|
23
|
+
error: 0,
|
|
24
|
+
disabled: 0
|
|
23
25
|
});
|
|
24
26
|
(0, _react.useEffect)(() => {
|
|
25
27
|
const updateCounts = () => {
|
|
@@ -33,7 +35,9 @@ function useQueryStatusCounts() {
|
|
|
33
35
|
stale: 0,
|
|
34
36
|
fetching: 0,
|
|
35
37
|
paused: 0,
|
|
36
|
-
inactive: 0
|
|
38
|
+
inactive: 0,
|
|
39
|
+
error: 0,
|
|
40
|
+
disabled: 0
|
|
37
41
|
});
|
|
38
42
|
setTimeout(() => setCounts(newCounts), 0);
|
|
39
43
|
};
|
|
@@ -12,5 +12,5 @@ function getQueryStatusColor({
|
|
|
12
12
|
observerCount,
|
|
13
13
|
isStale
|
|
14
14
|
}) {
|
|
15
|
-
return queryState.fetchStatus === "fetching" ? "blue" : !observerCount ? "gray" : queryState.fetchStatus === "paused" ? "purple" : isStale ? "yellow" : "green";
|
|
15
|
+
return queryState.fetchStatus === "fetching" ? "blue" : queryState.status === "error" ? "red" : !observerCount ? "gray" : queryState.fetchStatus === "paused" ? "purple" : isStale ? "yellow" : "green";
|
|
16
16
|
}
|
|
@@ -6,12 +6,18 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.getQueryStatusLabel = getQueryStatusLabel;
|
|
7
7
|
/**
|
|
8
8
|
* Converts a query object into a human-friendly status string for badge rendering.
|
|
9
|
-
* Priority order: disabled > fetching > inactive > paused > stale > fresh
|
|
9
|
+
* Priority order: disabled > fetching > error > inactive > paused > stale > fresh
|
|
10
|
+
*
|
|
11
|
+
* "error" sits just below "fetching" so a hard-failed query (status === "error",
|
|
12
|
+
* i.e. failed with no cached data) surfaces as an error instead of hiding under
|
|
13
|
+
* "inactive"/"stale", while an in-flight retry still reads as "fetching". This
|
|
14
|
+
* is the single source of truth every consumer (cards, dots, counts, the Error
|
|
15
|
+
* filter) reads, and it matches the dashboard sidebar's error dot exactly.
|
|
10
16
|
*/
|
|
11
17
|
function getQueryStatusLabel(query) {
|
|
12
18
|
// Check disabled first - disabled queries won't automatically fetch
|
|
13
19
|
if (query.isDisabled()) {
|
|
14
20
|
return "disabled";
|
|
15
21
|
}
|
|
16
|
-
return query.state.fetchStatus === "fetching" ? "fetching" : !query.getObserversCount() ? "inactive" : query.state.fetchStatus === "paused" ? "paused" : query.isStale() ? "stale" : "fresh";
|
|
22
|
+
return query.state.fetchStatus === "fetching" ? "fetching" : query.state.status === "error" ? "error" : !query.getObserversCount() ? "inactive" : query.state.fetchStatus === "paused" ? "paused" : query.isStale() ? "stale" : "fresh";
|
|
17
23
|
}
|
|
@@ -31,9 +31,12 @@ export function QueryFilterViewV3({
|
|
|
31
31
|
error: 0
|
|
32
32
|
};
|
|
33
33
|
queries.forEach(query => {
|
|
34
|
+
// Count by the status LABEL (single source of truth) so the Error chip's
|
|
35
|
+
// count matches exactly what the cards show and what the Error filter
|
|
36
|
+
// returns. (Previously error was counted off `state.error`, a different
|
|
37
|
+
// axis than the label, so the count, cards, and filter could disagree.)
|
|
34
38
|
const status = getQueryStatusLabel(query);
|
|
35
|
-
if (status === "disabled") counts.disabled++;else if (status === "fresh") counts.fresh++;else if (status === "stale") counts.stale++;else if (status === "fetching") counts.fetching++;else if (status === "paused") counts.paused++;else if (status === "inactive") counts.inactive++;
|
|
36
|
-
if (query.state.error) counts.error++;
|
|
39
|
+
if (status === "disabled") counts.disabled++;else if (status === "error") counts.error++;else if (status === "fresh") counts.fresh++;else if (status === "stale") counts.stale++;else if (status === "fetching") counts.fetching++;else if (status === "paused") counts.paused++;else if (status === "inactive") counts.inactive++;
|
|
37
40
|
});
|
|
38
41
|
return counts;
|
|
39
42
|
}, [queries]);
|
|
@@ -76,7 +76,8 @@ export function QuerySelector({
|
|
|
76
76
|
gray: "#6B7280",
|
|
77
77
|
purple: "#8B5CF6",
|
|
78
78
|
yellow: "#F59E0B",
|
|
79
|
-
green: "#10B981"
|
|
79
|
+
green: "#10B981",
|
|
80
|
+
red: "#EF4444"
|
|
80
81
|
};
|
|
81
82
|
const statusColor = colorMap[statusColorName] || "#6B7280";
|
|
82
83
|
const isSelected = query === selectedQuery;
|
|
@@ -102,11 +102,11 @@ const styles = StyleSheet.create({
|
|
|
102
102
|
borderColor: buoyColors.textMuted + "20"
|
|
103
103
|
},
|
|
104
104
|
queryStatusTagLarge: {
|
|
105
|
-
borderRadius:
|
|
106
|
-
paddingHorizontal:
|
|
107
|
-
paddingVertical:
|
|
108
|
-
height:
|
|
109
|
-
gap:
|
|
105
|
+
borderRadius: 16,
|
|
106
|
+
paddingHorizontal: 13,
|
|
107
|
+
paddingVertical: 6,
|
|
108
|
+
height: 32,
|
|
109
|
+
gap: 7
|
|
110
110
|
},
|
|
111
111
|
dot: {
|
|
112
112
|
width: 6,
|
|
@@ -114,9 +114,9 @@ const styles = StyleSheet.create({
|
|
|
114
114
|
borderRadius: 3
|
|
115
115
|
},
|
|
116
116
|
dotLarge: {
|
|
117
|
-
width:
|
|
118
|
-
height:
|
|
119
|
-
borderRadius: 4
|
|
117
|
+
width: 8,
|
|
118
|
+
height: 8,
|
|
119
|
+
borderRadius: 4
|
|
120
120
|
},
|
|
121
121
|
label: {
|
|
122
122
|
fontSize: 11,
|
|
@@ -125,7 +125,10 @@ const styles = StyleSheet.create({
|
|
|
125
125
|
fontFamily: "system"
|
|
126
126
|
},
|
|
127
127
|
labelLarge: {
|
|
128
|
-
fontSize:
|
|
128
|
+
fontSize: 13,
|
|
129
|
+
fontWeight: "600",
|
|
130
|
+
letterSpacing: 0.2,
|
|
131
|
+
fontFamily: '"SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif'
|
|
129
132
|
},
|
|
130
133
|
count: {
|
|
131
134
|
fontSize: 11,
|
|
@@ -135,7 +138,9 @@ const styles = StyleSheet.create({
|
|
|
135
138
|
fontFamily: "system"
|
|
136
139
|
},
|
|
137
140
|
countLarge: {
|
|
138
|
-
fontSize:
|
|
141
|
+
fontSize: 13,
|
|
142
|
+
fontWeight: "700",
|
|
143
|
+
fontFamily: '"SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif'
|
|
139
144
|
}
|
|
140
145
|
});
|
|
141
146
|
export default QueryStatus;
|
|
@@ -14,7 +14,9 @@ function useQueryStatusCounts() {
|
|
|
14
14
|
stale: 0,
|
|
15
15
|
fetching: 0,
|
|
16
16
|
paused: 0,
|
|
17
|
-
inactive: 0
|
|
17
|
+
inactive: 0,
|
|
18
|
+
error: 0,
|
|
19
|
+
disabled: 0
|
|
18
20
|
});
|
|
19
21
|
useEffect(() => {
|
|
20
22
|
const updateCounts = () => {
|
|
@@ -28,7 +30,9 @@ function useQueryStatusCounts() {
|
|
|
28
30
|
stale: 0,
|
|
29
31
|
fetching: 0,
|
|
30
32
|
paused: 0,
|
|
31
|
-
inactive: 0
|
|
33
|
+
inactive: 0,
|
|
34
|
+
error: 0,
|
|
35
|
+
disabled: 0
|
|
32
36
|
});
|
|
33
37
|
setTimeout(() => setCounts(newCounts), 0);
|
|
34
38
|
};
|
|
@@ -8,5 +8,5 @@ export function getQueryStatusColor({
|
|
|
8
8
|
observerCount,
|
|
9
9
|
isStale
|
|
10
10
|
}) {
|
|
11
|
-
return queryState.fetchStatus === "fetching" ? "blue" : !observerCount ? "gray" : queryState.fetchStatus === "paused" ? "purple" : isStale ? "yellow" : "green";
|
|
11
|
+
return queryState.fetchStatus === "fetching" ? "blue" : queryState.status === "error" ? "red" : !observerCount ? "gray" : queryState.fetchStatus === "paused" ? "purple" : isStale ? "yellow" : "green";
|
|
12
12
|
}
|
|
@@ -2,12 +2,18 @@
|
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Converts a query object into a human-friendly status string for badge rendering.
|
|
5
|
-
* Priority order: disabled > fetching > inactive > paused > stale > fresh
|
|
5
|
+
* Priority order: disabled > fetching > error > inactive > paused > stale > fresh
|
|
6
|
+
*
|
|
7
|
+
* "error" sits just below "fetching" so a hard-failed query (status === "error",
|
|
8
|
+
* i.e. failed with no cached data) surfaces as an error instead of hiding under
|
|
9
|
+
* "inactive"/"stale", while an in-flight retry still reads as "fetching". This
|
|
10
|
+
* is the single source of truth every consumer (cards, dots, counts, the Error
|
|
11
|
+
* filter) reads, and it matches the dashboard sidebar's error dot exactly.
|
|
6
12
|
*/
|
|
7
13
|
export function getQueryStatusLabel(query) {
|
|
8
14
|
// Check disabled first - disabled queries won't automatically fetch
|
|
9
15
|
if (query.isDisabled()) {
|
|
10
16
|
return "disabled";
|
|
11
17
|
}
|
|
12
|
-
return query.state.fetchStatus === "fetching" ? "fetching" : !query.getObserversCount() ? "inactive" : query.state.fetchStatus === "paused" ? "paused" : query.isStale() ? "stale" : "fresh";
|
|
18
|
+
return query.state.fetchStatus === "fetching" ? "fetching" : query.state.status === "error" ? "error" : !query.getObserversCount() ? "inactive" : query.state.fetchStatus === "paused" ? "paused" : query.isStale() ? "stale" : "fresh";
|
|
13
19
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QueryFilterViewV3.d.ts","sourceRoot":"","sources":["../../../../src/react-query/components/QueryFilterViewV3.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAkB9C,UAAU,sBAAsB;IAC9B,OAAO,EAAE,KAAK,EAAE,CAAC;IACjB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,cAAc,EAAE,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IAChD,eAAe,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAC7B,eAAe,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3C,gBAAgB,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAC9B,uBAAuB,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;CACpD;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,EAChC,OAAO,EACP,YAAY,EACZ,cAAc,EACd,eAAe,EACf,eAAe,EACf,gBAAgB,EAChB,uBAAuB,GACxB,EAAE,sBAAsB,+
|
|
1
|
+
{"version":3,"file":"QueryFilterViewV3.d.ts","sourceRoot":"","sources":["../../../../src/react-query/components/QueryFilterViewV3.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAkB9C,UAAU,sBAAsB;IAC9B,OAAO,EAAE,KAAK,EAAE,CAAC;IACjB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,cAAc,EAAE,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IAChD,eAAe,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAC7B,eAAe,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3C,gBAAgB,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAC9B,uBAAuB,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;CACpD;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,EAChC,OAAO,EACP,YAAY,EACZ,cAAc,EACd,eAAe,EACf,eAAe,EACf,gBAAgB,EAChB,uBAAuB,GACxB,EAAE,sBAAsB,+BAmPxB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QuerySelector.d.ts","sourceRoot":"","sources":["../../../../src/react-query/components/QuerySelector.tsx"],"names":[],"mappings":"AASA,OAAO,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAM9C,UAAU,kBAAkB;IAC1B,OAAO,EAAE,KAAK,EAAE,CAAC;IACjB,aAAa,CAAC,EAAE,KAAK,CAAC;IACtB,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,QAAQ,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;CAClC;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,EAC5B,OAAO,EACP,aAAa,EACb,MAAM,EACN,OAAO,EACP,QAAQ,GACT,EAAE,kBAAkB,+
|
|
1
|
+
{"version":3,"file":"QuerySelector.d.ts","sourceRoot":"","sources":["../../../../src/react-query/components/QuerySelector.tsx"],"names":[],"mappings":"AASA,OAAO,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAM9C,UAAU,kBAAkB;IAC1B,OAAO,EAAE,KAAK,EAAE,CAAC;IACjB,aAAa,CAAC,EAAE,KAAK,CAAC;IACtB,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,QAAQ,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;CAClC;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,EAC5B,OAAO,EACP,aAAa,EACb,MAAM,EACN,OAAO,EACP,QAAQ,GACT,EAAE,kBAAkB,+BAoHpB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QueryRow.d.ts","sourceRoot":"","sources":["../../../../../src/react-query/components/query-browser/QueryRow.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAiB9C,UAAU,aAAa;IACrB,KAAK,EAAE,KAAK,CAAC;IACb,UAAU,EAAE,OAAO,CAAC;IACpB,QAAQ,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;CAClC;AAED;;GAEG;AACH,QAAA,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,
|
|
1
|
+
{"version":3,"file":"QueryRow.d.ts","sourceRoot":"","sources":["../../../../../src/react-query/components/query-browser/QueryRow.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAiB9C,UAAU,aAAa;IACrB,KAAK,EAAE,KAAK,CAAC;IACb,UAAU,EAAE,OAAO,CAAC;IACpB,QAAQ,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;CAClC;AAED;;GAEG;AACH,QAAA,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CA6DrC,CAAC;AAEF,eAAe,QAAQ,CAAC"}
|
|
@@ -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;IACtD;;;OAGG;IACH,IAAI,CAAC,EAAE,SAAS,GAAG,OAAO,CAAC;CAC5B;AAID;;GAEG;AACH,QAAA,MAAM,WAAW,EAAE,EAAE,CAAC,gBAAgB,CAuGrC,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;AA4DF,eAAe,WAAW,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useQueryStatusCounts.d.ts","sourceRoot":"","sources":["../../../../src/react-query/hooks/useQueryStatusCounts.ts"],"names":[],"mappings":"AAIA,UAAU,iBAAiB;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;;GAGG;AACH,iBAAS,oBAAoB,IAAI,iBAAiB,
|
|
1
|
+
{"version":3,"file":"useQueryStatusCounts.d.ts","sourceRoot":"","sources":["../../../../src/react-query/hooks/useQueryStatusCounts.ts"],"names":[],"mappings":"AAIA,UAAU,iBAAiB;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;;GAGG;AACH,iBAAS,oBAAoB,IAAI,iBAAiB,CAwCjD;AAED,eAAe,oBAAoB,CAAC;AAGpC,UAAU,oBAAoB;IAC5B,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;GAEG;AACH,wBAAgB,uBAAuB,IAAI,oBAAoB,CAwD9D"}
|
|
@@ -6,5 +6,5 @@ export declare function getQueryStatusColor({ queryState, observerCount, isStale
|
|
|
6
6
|
queryState: Query["state"];
|
|
7
7
|
observerCount: number;
|
|
8
8
|
isStale: boolean;
|
|
9
|
-
}): "blue" | "green" | "gray" | "yellow" | "purple";
|
|
9
|
+
}): "blue" | "green" | "gray" | "yellow" | "purple" | "red";
|
|
10
10
|
//# sourceMappingURL=getQueryStatusColor.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getQueryStatusColor.d.ts","sourceRoot":"","sources":["../../../../src/react-query/utils/getQueryStatusColor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAEnD;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,EAClC,UAAU,EACV,aAAa,EACb,OAAO,GACR,EAAE;IACD,UAAU,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC;IAC3B,aAAa,EAAE,MAAM,CAAC;IACtB,OAAO,EAAE,OAAO,CAAC;CAClB,
|
|
1
|
+
{"version":3,"file":"getQueryStatusColor.d.ts","sourceRoot":"","sources":["../../../../src/react-query/utils/getQueryStatusColor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAEnD;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,EAClC,UAAU,EACV,aAAa,EACb,OAAO,GACR,EAAE;IACD,UAAU,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC;IAC3B,aAAa,EAAE,MAAM,CAAC;IACtB,OAAO,EAAE,OAAO,CAAC;CAClB,2DAYA"}
|
|
@@ -2,7 +2,13 @@ import { Query } from "@tanstack/react-query";
|
|
|
2
2
|
type QueryStatus = "disabled" | "fetching" | "inactive" | "paused" | "stale" | "fresh" | "error";
|
|
3
3
|
/**
|
|
4
4
|
* Converts a query object into a human-friendly status string for badge rendering.
|
|
5
|
-
* Priority order: disabled > fetching > inactive > paused > stale > fresh
|
|
5
|
+
* Priority order: disabled > fetching > error > inactive > paused > stale > fresh
|
|
6
|
+
*
|
|
7
|
+
* "error" sits just below "fetching" so a hard-failed query (status === "error",
|
|
8
|
+
* i.e. failed with no cached data) surfaces as an error instead of hiding under
|
|
9
|
+
* "inactive"/"stale", while an in-flight retry still reads as "fetching". This
|
|
10
|
+
* is the single source of truth every consumer (cards, dots, counts, the Error
|
|
11
|
+
* filter) reads, and it matches the dashboard sidebar's error dot exactly.
|
|
6
12
|
*/
|
|
7
13
|
export declare function getQueryStatusLabel(query: Query): QueryStatus;
|
|
8
14
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getQueryStatusLabel.d.ts","sourceRoot":"","sources":["../../../../src/react-query/utils/getQueryStatusLabel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAC9C,KAAK,WAAW,GACZ,UAAU,GACV,UAAU,GACV,UAAU,GACV,QAAQ,GACR,OAAO,GACP,OAAO,GACP,OAAO,CAAC;AAEZ
|
|
1
|
+
{"version":3,"file":"getQueryStatusLabel.d.ts","sourceRoot":"","sources":["../../../../src/react-query/utils/getQueryStatusLabel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAC9C,KAAK,WAAW,GACZ,UAAU,GACV,UAAU,GACV,UAAU,GACV,QAAQ,GACR,OAAO,GACP,OAAO,GACP,OAAO,CAAC;AAEZ;;;;;;;;;GASG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,KAAK,GAAG,WAAW,CAiB7D"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@buoy-gg/react-query",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.1",
|
|
4
4
|
"description": "react-query package",
|
|
5
5
|
"main": "lib/commonjs/index.js",
|
|
6
6
|
"module": "lib/module/index.js",
|
|
@@ -26,8 +26,8 @@
|
|
|
26
26
|
],
|
|
27
27
|
"sideEffects": false,
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@buoy-gg/
|
|
30
|
-
"@buoy-gg/
|
|
29
|
+
"@buoy-gg/floating-tools-core": "4.0.1",
|
|
30
|
+
"@buoy-gg/shared-ui": "4.0.1"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
33
33
|
"@tanstack/react-query": ">=5.0.0",
|