@buoy-gg/react-query 7.0.40 → 7.0.42
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/README.md +11 -69
- package/lib/commonjs/checkPeer.js +1 -0
- package/lib/commonjs/checkPeer.web.js +1 -0
- package/lib/commonjs/index.js +1 -736
- package/lib/commonjs/preset.js +1 -243
- package/lib/commonjs/react-query/components/DataEditorMode.js +1 -317
- package/lib/commonjs/react-query/components/FilterStatusBadge.js +1 -55
- package/lib/commonjs/react-query/components/MutationBrowserMode.js +1 -52
- package/lib/commonjs/react-query/components/MutationEditorMode.js +1 -276
- package/lib/commonjs/react-query/components/QueryBrowserMode.js +1 -99
- package/lib/commonjs/react-query/components/QueryDebugInfo.js +1 -107
- package/lib/commonjs/react-query/components/QueryFilterViewV3.js +1 -224
- package/lib/commonjs/react-query/components/QuerySelector.js +1 -209
- package/lib/commonjs/react-query/components/ReactQueryDevToolsModal.js +1 -91
- package/lib/commonjs/react-query/components/ReactQuerySection.js +1 -47
- package/lib/commonjs/react-query/components/ReactQueryTracker.js +1 -38
- package/lib/commonjs/react-query/components/WifiToggle.js +1 -51
- package/lib/commonjs/react-query/components/modals/DataEditorModal.js +1 -103
- package/lib/commonjs/react-query/components/modals/MutationBrowserFooter.js +1 -61
- package/lib/commonjs/react-query/components/modals/MutationBrowserModal.js +1 -164
- package/lib/commonjs/react-query/components/modals/MutationEditorModal.js +1 -106
- package/lib/commonjs/react-query/components/modals/QueryBrowserFooter.js +1 -56
- package/lib/commonjs/react-query/components/modals/QueryBrowserModal.js +1 -254
- package/lib/commonjs/react-query/components/modals/ReactQueryModal.js +1 -83
- package/lib/commonjs/react-query/components/modals/ReactQueryModalHeader.js +1 -194
- package/lib/commonjs/react-query/components/modals/SwipeIndicator.js +1 -204
- package/lib/commonjs/react-query/components/query-browser/ActionButton.js +1 -100
- package/lib/commonjs/react-query/components/query-browser/ClearCacheButton.js +1 -53
- package/lib/commonjs/react-query/components/query-browser/Explorer.js +1 -75
- package/lib/commonjs/react-query/components/query-browser/MutationButton.js +1 -190
- package/lib/commonjs/react-query/components/query-browser/MutationDetails.js +1 -124
- package/lib/commonjs/react-query/components/query-browser/MutationDetailsChips.js +1 -68
- package/lib/commonjs/react-query/components/query-browser/MutationInformation.js +1 -118
- package/lib/commonjs/react-query/components/query-browser/MutationStatusCount.js +1 -84
- package/lib/commonjs/react-query/components/query-browser/MutationsList.js +1 -220
- package/lib/commonjs/react-query/components/query-browser/NetworkToggleButton.js +1 -54
- package/lib/commonjs/react-query/components/query-browser/QueryActions.js +1 -124
- package/lib/commonjs/react-query/components/query-browser/QueryBrowser.js +1 -181
- package/lib/commonjs/react-query/components/query-browser/QueryDetails.js +1 -141
- package/lib/commonjs/react-query/components/query-browser/QueryDetailsChip.js +1 -78
- package/lib/commonjs/react-query/components/query-browser/QueryInformation.js +1 -95
- package/lib/commonjs/react-query/components/query-browser/QueryRow.js +1 -96
- package/lib/commonjs/react-query/components/query-browser/QueryStatus.js +1 -167
- package/lib/commonjs/react-query/components/query-browser/QueryStatusCount.js +1 -100
- package/lib/commonjs/react-query/components/query-browser/StorageStatusCount.js +1 -61
- package/lib/commonjs/react-query/components/query-browser/index.js +1 -170
- package/lib/commonjs/react-query/components/query-browser/svgs.js +1 -72
- package/lib/commonjs/react-query/hooks/useActionButtons.js +1 -51
- package/lib/commonjs/react-query/hooks/useAllMutations.js +1 -85
- package/lib/commonjs/react-query/hooks/useAllQueries.js +1 -117
- package/lib/commonjs/react-query/hooks/useModalManager.js +1 -178
- package/lib/commonjs/react-query/hooks/useModalPersistence.js +1 -71
- package/lib/commonjs/react-query/hooks/useMutationActionButtons.js +1 -21
- package/lib/commonjs/react-query/hooks/useQueryStatusCounts.js +1 -114
- package/lib/commonjs/react-query/hooks/useReactQueryState.js +1 -24
- package/lib/commonjs/react-query/hooks/useSelectedMutation.js +1 -30
- package/lib/commonjs/react-query/hooks/useSelectedQuery.js +1 -96
- package/lib/commonjs/react-query/hooks/useStorageQueryCounts.js +1 -28
- package/lib/commonjs/react-query/hooks/useWifiState.js +1 -67
- package/lib/commonjs/react-query/stores/reactQueryEventStore.js +1 -302
- package/lib/commonjs/react-query/sync/dehydrate.js +1 -166
- package/lib/commonjs/react-query/sync/reactQuerySyncAdapter.js +1 -593
- package/lib/commonjs/react-query/sync/snapshotProvider.js +1 -289
- package/lib/commonjs/react-query/sync/useReactQuerySyncAdapter.js +1 -34
- package/lib/commonjs/react-query/types/types.js +1 -14
- package/lib/commonjs/react-query/utils/actions/deleteItem.js +1 -23
- package/lib/commonjs/react-query/utils/actions/emitDevToolsEvent.js +1 -40
- package/lib/commonjs/react-query/utils/actions/invalidate.js +1 -15
- package/lib/commonjs/react-query/utils/actions/refetch.js +1 -17
- package/lib/commonjs/react-query/utils/actions/remove.js +1 -15
- package/lib/commonjs/react-query/utils/actions/reset.js +1 -17
- package/lib/commonjs/react-query/utils/actions/triggerError.js +1 -33
- package/lib/commonjs/react-query/utils/actions/triggerLoading.js +1 -54
- package/lib/commonjs/react-query/utils/deleteNestedDataByPath.js +1 -56
- package/lib/commonjs/react-query/utils/getQueryStatusColor.js +1 -16
- package/lib/commonjs/react-query/utils/getQueryStatusLabel.js +1 -23
- package/lib/commonjs/react-query/utils/getStorageQueryCounts.js +1 -35
- package/lib/commonjs/react-query/utils/modalStorageOperations.js +1 -127
- package/lib/commonjs/react-query/utils/storageQueryUtils.js +1 -149
- package/lib/commonjs/react-query/utils/testIDs.js +1 -61
- package/lib/commonjs/react-query/utils/updateNestedDataByPath.js +1 -61
- package/lib/module/checkPeer.js +1 -0
- package/lib/module/checkPeer.web.js +1 -0
- package/lib/module/index.js +1 -135
- package/lib/module/preset.js +1 -239
- package/lib/module/react-query/components/DataEditorMode.js +1 -311
- package/lib/module/react-query/components/FilterStatusBadge.js +1 -51
- package/lib/module/react-query/components/MutationBrowserMode.js +1 -47
- package/lib/module/react-query/components/MutationEditorMode.js +1 -270
- package/lib/module/react-query/components/QueryBrowserMode.js +1 -94
- package/lib/module/react-query/components/QueryDebugInfo.js +1 -104
- package/lib/module/react-query/components/QueryFilterViewV3.js +1 -221
- package/lib/module/react-query/components/QuerySelector.js +1 -205
- package/lib/module/react-query/components/ReactQueryDevToolsModal.js +1 -87
- package/lib/module/react-query/components/ReactQuerySection.js +1 -43
- package/lib/module/react-query/components/ReactQueryTracker.js +1 -35
- package/lib/module/react-query/components/WifiToggle.js +1 -48
- package/lib/module/react-query/components/modals/DataEditorModal.js +1 -99
- package/lib/module/react-query/components/modals/MutationBrowserFooter.js +1 -56
- package/lib/module/react-query/components/modals/MutationBrowserModal.js +1 -161
- package/lib/module/react-query/components/modals/MutationEditorModal.js +1 -102
- package/lib/module/react-query/components/modals/QueryBrowserFooter.js +1 -51
- package/lib/module/react-query/components/modals/QueryBrowserModal.js +1 -250
- package/lib/module/react-query/components/modals/ReactQueryModal.js +1 -79
- package/lib/module/react-query/components/modals/ReactQueryModalHeader.js +1 -190
- package/lib/module/react-query/components/modals/SwipeIndicator.js +1 -201
- package/lib/module/react-query/components/query-browser/ActionButton.js +1 -96
- package/lib/module/react-query/components/query-browser/ClearCacheButton.js +1 -49
- package/lib/module/react-query/components/query-browser/Explorer.js +1 -70
- package/lib/module/react-query/components/query-browser/MutationButton.js +1 -186
- package/lib/module/react-query/components/query-browser/MutationDetails.js +1 -119
- package/lib/module/react-query/components/query-browser/MutationDetailsChips.js +1 -64
- package/lib/module/react-query/components/query-browser/MutationInformation.js +1 -113
- package/lib/module/react-query/components/query-browser/MutationStatusCount.js +1 -79
- package/lib/module/react-query/components/query-browser/MutationsList.js +1 -215
- package/lib/module/react-query/components/query-browser/NetworkToggleButton.js +1 -50
- package/lib/module/react-query/components/query-browser/QueryActions.js +1 -119
- package/lib/module/react-query/components/query-browser/QueryBrowser.js +1 -176
- package/lib/module/react-query/components/query-browser/QueryDetails.js +1 -136
- package/lib/module/react-query/components/query-browser/QueryDetailsChip.js +1 -74
- package/lib/module/react-query/components/query-browser/QueryInformation.js +1 -90
- package/lib/module/react-query/components/query-browser/QueryRow.js +1 -92
- package/lib/module/react-query/components/query-browser/QueryStatus.js +1 -163
- package/lib/module/react-query/components/query-browser/QueryStatusCount.js +1 -95
- package/lib/module/react-query/components/query-browser/StorageStatusCount.js +1 -56
- package/lib/module/react-query/components/query-browser/index.js +1 -22
- package/lib/module/react-query/components/query-browser/svgs.js +1 -64
- package/lib/module/react-query/hooks/useActionButtons.js +1 -46
- package/lib/module/react-query/hooks/useAllMutations.js +1 -82
- package/lib/module/react-query/hooks/useAllQueries.js +1 -114
- package/lib/module/react-query/hooks/useModalManager.js +1 -175
- package/lib/module/react-query/hooks/useModalPersistence.js +1 -67
- package/lib/module/react-query/hooks/useMutationActionButtons.js +1 -17
- package/lib/module/react-query/hooks/useQueryStatusCounts.js +1 -112
- package/lib/module/react-query/hooks/useReactQueryState.js +1 -20
- package/lib/module/react-query/hooks/useSelectedMutation.js +1 -27
- package/lib/module/react-query/hooks/useSelectedQuery.js +1 -92
- package/lib/module/react-query/hooks/useStorageQueryCounts.js +1 -25
- package/lib/module/react-query/hooks/useWifiState.js +1 -64
- package/lib/module/react-query/stores/reactQueryEventStore.js +1 -293
- package/lib/module/react-query/sync/dehydrate.js +1 -156
- package/lib/module/react-query/sync/reactQuerySyncAdapter.js +1 -589
- package/lib/module/react-query/sync/snapshotProvider.js +1 -284
- package/lib/module/react-query/sync/useReactQuerySyncAdapter.js +1 -31
- package/lib/module/react-query/types/types.js +1 -10
- package/lib/module/react-query/utils/actions/deleteItem.js +1 -19
- package/lib/module/react-query/utils/actions/emitDevToolsEvent.js +1 -36
- package/lib/module/react-query/utils/actions/invalidate.js +1 -11
- package/lib/module/react-query/utils/actions/refetch.js +1 -13
- package/lib/module/react-query/utils/actions/remove.js +1 -11
- package/lib/module/react-query/utils/actions/reset.js +1 -13
- package/lib/module/react-query/utils/actions/triggerError.js +1 -29
- package/lib/module/react-query/utils/actions/triggerLoading.js +1 -50
- package/lib/module/react-query/utils/deleteNestedDataByPath.js +1 -51
- package/lib/module/react-query/utils/getQueryStatusColor.js +1 -12
- package/lib/module/react-query/utils/getQueryStatusLabel.js +1 -19
- package/lib/module/react-query/utils/getStorageQueryCounts.js +1 -31
- package/lib/module/react-query/utils/modalStorageOperations.js +1 -117
- package/lib/module/react-query/utils/storageQueryUtils.js +1 -140
- package/lib/module/react-query/utils/testIDs.js +1 -54
- package/lib/module/react-query/utils/updateNestedDataByPath.js +1 -56
- package/lib/typescript/checkPeer.d.ts +1 -0
- package/lib/typescript/checkPeer.web.d.ts +2 -0
- package/lib/typescript/index.d.ts +1 -0
- package/lib/web/index.mjs +11 -0
- package/package.json +36 -12
- package/lib/typescript/index.d.ts.map +0 -1
- package/lib/typescript/preset.d.ts.map +0 -1
- package/lib/typescript/react-query/components/DataEditorMode.d.ts.map +0 -1
- package/lib/typescript/react-query/components/FilterStatusBadge.d.ts.map +0 -1
- package/lib/typescript/react-query/components/MutationBrowserMode.d.ts.map +0 -1
- package/lib/typescript/react-query/components/MutationEditorMode.d.ts.map +0 -1
- package/lib/typescript/react-query/components/QueryBrowserMode.d.ts.map +0 -1
- package/lib/typescript/react-query/components/QueryDebugInfo.d.ts.map +0 -1
- package/lib/typescript/react-query/components/QueryFilterViewV3.d.ts.map +0 -1
- package/lib/typescript/react-query/components/QuerySelector.d.ts.map +0 -1
- package/lib/typescript/react-query/components/ReactQueryDevToolsModal.d.ts.map +0 -1
- package/lib/typescript/react-query/components/ReactQuerySection.d.ts.map +0 -1
- package/lib/typescript/react-query/components/ReactQueryTracker.d.ts.map +0 -1
- package/lib/typescript/react-query/components/WifiToggle.d.ts.map +0 -1
- package/lib/typescript/react-query/components/modals/DataEditorModal.d.ts.map +0 -1
- package/lib/typescript/react-query/components/modals/MutationBrowserFooter.d.ts.map +0 -1
- package/lib/typescript/react-query/components/modals/MutationBrowserModal.d.ts.map +0 -1
- package/lib/typescript/react-query/components/modals/MutationEditorModal.d.ts.map +0 -1
- package/lib/typescript/react-query/components/modals/QueryBrowserFooter.d.ts.map +0 -1
- package/lib/typescript/react-query/components/modals/QueryBrowserModal.d.ts.map +0 -1
- package/lib/typescript/react-query/components/modals/ReactQueryModal.d.ts.map +0 -1
- package/lib/typescript/react-query/components/modals/ReactQueryModalHeader.d.ts.map +0 -1
- package/lib/typescript/react-query/components/modals/SwipeIndicator.d.ts.map +0 -1
- package/lib/typescript/react-query/components/query-browser/ActionButton.d.ts.map +0 -1
- package/lib/typescript/react-query/components/query-browser/ClearCacheButton.d.ts.map +0 -1
- package/lib/typescript/react-query/components/query-browser/Explorer.d.ts.map +0 -1
- package/lib/typescript/react-query/components/query-browser/MutationButton.d.ts.map +0 -1
- package/lib/typescript/react-query/components/query-browser/MutationDetails.d.ts.map +0 -1
- package/lib/typescript/react-query/components/query-browser/MutationDetailsChips.d.ts.map +0 -1
- package/lib/typescript/react-query/components/query-browser/MutationInformation.d.ts.map +0 -1
- package/lib/typescript/react-query/components/query-browser/MutationStatusCount.d.ts.map +0 -1
- package/lib/typescript/react-query/components/query-browser/MutationsList.d.ts.map +0 -1
- package/lib/typescript/react-query/components/query-browser/NetworkToggleButton.d.ts.map +0 -1
- package/lib/typescript/react-query/components/query-browser/QueryActions.d.ts.map +0 -1
- package/lib/typescript/react-query/components/query-browser/QueryBrowser.d.ts.map +0 -1
- package/lib/typescript/react-query/components/query-browser/QueryDetails.d.ts.map +0 -1
- package/lib/typescript/react-query/components/query-browser/QueryDetailsChip.d.ts.map +0 -1
- package/lib/typescript/react-query/components/query-browser/QueryInformation.d.ts.map +0 -1
- package/lib/typescript/react-query/components/query-browser/QueryRow.d.ts.map +0 -1
- package/lib/typescript/react-query/components/query-browser/QueryStatus.d.ts.map +0 -1
- package/lib/typescript/react-query/components/query-browser/QueryStatusCount.d.ts.map +0 -1
- package/lib/typescript/react-query/components/query-browser/StorageStatusCount.d.ts.map +0 -1
- package/lib/typescript/react-query/components/query-browser/index.d.ts.map +0 -1
- package/lib/typescript/react-query/components/query-browser/svgs.d.ts.map +0 -1
- package/lib/typescript/react-query/hooks/useActionButtons.d.ts.map +0 -1
- package/lib/typescript/react-query/hooks/useAllMutations.d.ts.map +0 -1
- package/lib/typescript/react-query/hooks/useAllQueries.d.ts.map +0 -1
- package/lib/typescript/react-query/hooks/useModalManager.d.ts.map +0 -1
- package/lib/typescript/react-query/hooks/useModalPersistence.d.ts.map +0 -1
- package/lib/typescript/react-query/hooks/useMutationActionButtons.d.ts.map +0 -1
- package/lib/typescript/react-query/hooks/useQueryStatusCounts.d.ts.map +0 -1
- package/lib/typescript/react-query/hooks/useReactQueryState.d.ts.map +0 -1
- package/lib/typescript/react-query/hooks/useSelectedMutation.d.ts.map +0 -1
- package/lib/typescript/react-query/hooks/useSelectedQuery.d.ts.map +0 -1
- package/lib/typescript/react-query/hooks/useStorageQueryCounts.d.ts.map +0 -1
- package/lib/typescript/react-query/hooks/useWifiState.d.ts.map +0 -1
- package/lib/typescript/react-query/stores/reactQueryEventStore.d.ts.map +0 -1
- package/lib/typescript/react-query/sync/dehydrate.d.ts.map +0 -1
- package/lib/typescript/react-query/sync/reactQuerySyncAdapter.d.ts.map +0 -1
- package/lib/typescript/react-query/sync/snapshotProvider.d.ts.map +0 -1
- package/lib/typescript/react-query/sync/useReactQuerySyncAdapter.d.ts.map +0 -1
- package/lib/typescript/react-query/types/types.d.ts.map +0 -1
- package/lib/typescript/react-query/utils/actions/deleteItem.d.ts.map +0 -1
- package/lib/typescript/react-query/utils/actions/emitDevToolsEvent.d.ts.map +0 -1
- package/lib/typescript/react-query/utils/actions/invalidate.d.ts.map +0 -1
- package/lib/typescript/react-query/utils/actions/refetch.d.ts.map +0 -1
- package/lib/typescript/react-query/utils/actions/remove.d.ts.map +0 -1
- package/lib/typescript/react-query/utils/actions/reset.d.ts.map +0 -1
- package/lib/typescript/react-query/utils/actions/triggerError.d.ts.map +0 -1
- package/lib/typescript/react-query/utils/actions/triggerLoading.d.ts.map +0 -1
- package/lib/typescript/react-query/utils/deleteNestedDataByPath.d.ts.map +0 -1
- package/lib/typescript/react-query/utils/getQueryStatusColor.d.ts.map +0 -1
- package/lib/typescript/react-query/utils/getQueryStatusLabel.d.ts.map +0 -1
- package/lib/typescript/react-query/utils/getStorageQueryCounts.d.ts.map +0 -1
- package/lib/typescript/react-query/utils/modalStorageOperations.d.ts.map +0 -1
- package/lib/typescript/react-query/utils/storageQueryUtils.d.ts.map +0 -1
- package/lib/typescript/react-query/utils/testIDs.d.ts.map +0 -1
- package/lib/typescript/react-query/utils/updateNestedDataByPath.d.ts.map +0 -1
|
@@ -1,95 +1 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = QueryInformation;
|
|
7
|
-
var _QueryDetails = _interopRequireDefault(require("./QueryDetails"));
|
|
8
|
-
var _QueryActions = _interopRequireDefault(require("./QueryActions"));
|
|
9
|
-
var _Explorer = _interopRequireDefault(require("./Explorer"));
|
|
10
|
-
var _reactNative = require("react-native");
|
|
11
|
-
var _sharedUi = require("@buoy-gg/shared-ui");
|
|
12
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
14
|
-
/**
|
|
15
|
-
* Stacked detail view combining metadata, actions, and explorers for the selected query.
|
|
16
|
-
*/
|
|
17
|
-
function QueryInformation({
|
|
18
|
-
selectedQuery,
|
|
19
|
-
setSelectedQuery
|
|
20
|
-
}) {
|
|
21
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.ScrollView, {
|
|
22
|
-
"sentry-label": "ignore devtools query info scroll",
|
|
23
|
-
style: styles.flexOne,
|
|
24
|
-
contentContainerStyle: styles.scrollContent,
|
|
25
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
26
|
-
style: styles.section,
|
|
27
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_QueryDetails.default, {
|
|
28
|
-
query: selectedQuery
|
|
29
|
-
})
|
|
30
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
31
|
-
style: styles.section,
|
|
32
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_QueryActions.default, {
|
|
33
|
-
query: selectedQuery,
|
|
34
|
-
setSelectedQuery: setSelectedQuery
|
|
35
|
-
})
|
|
36
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
37
|
-
style: styles.section,
|
|
38
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
39
|
-
style: styles.headerText,
|
|
40
|
-
children: "Data Explorer"
|
|
41
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
42
|
-
style: styles.contentView,
|
|
43
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Explorer.default, {
|
|
44
|
-
editable: true,
|
|
45
|
-
label: "Data",
|
|
46
|
-
value: selectedQuery?.state.data,
|
|
47
|
-
defaultExpanded: ["Data"],
|
|
48
|
-
activeQuery: selectedQuery
|
|
49
|
-
})
|
|
50
|
-
})]
|
|
51
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
52
|
-
style: styles.section,
|
|
53
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
54
|
-
style: styles.headerText,
|
|
55
|
-
children: "Query Explorer"
|
|
56
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
57
|
-
style: styles.contentView,
|
|
58
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Explorer.default, {
|
|
59
|
-
label: "Query",
|
|
60
|
-
value: selectedQuery,
|
|
61
|
-
defaultExpanded: ["Query", "queryKey"],
|
|
62
|
-
activeQuery: selectedQuery
|
|
63
|
-
})
|
|
64
|
-
})]
|
|
65
|
-
})]
|
|
66
|
-
});
|
|
67
|
-
}
|
|
68
|
-
const styles = _reactNative.StyleSheet.create({
|
|
69
|
-
flexOne: {
|
|
70
|
-
flex: 1,
|
|
71
|
-
// Transparent so the night sheet's star field shows through.
|
|
72
|
-
backgroundColor: "transparent"
|
|
73
|
-
},
|
|
74
|
-
scrollContent: {
|
|
75
|
-
paddingBottom: 16,
|
|
76
|
-
paddingHorizontal: 8
|
|
77
|
-
},
|
|
78
|
-
section: {
|
|
79
|
-
marginBottom: 16
|
|
80
|
-
},
|
|
81
|
-
headerText: {
|
|
82
|
-
fontSize: 16,
|
|
83
|
-
fontWeight: "600",
|
|
84
|
-
color: _sharedUi.night.color.text,
|
|
85
|
-
marginBottom: 8,
|
|
86
|
-
textAlign: "left"
|
|
87
|
-
},
|
|
88
|
-
contentView: {
|
|
89
|
-
backgroundColor: _sharedUi.night.color.surface,
|
|
90
|
-
borderRadius: 12,
|
|
91
|
-
borderWidth: 1,
|
|
92
|
-
borderColor: _sharedUi.night.color.border,
|
|
93
|
-
padding: 16
|
|
94
|
-
}
|
|
95
|
-
});
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=QueryInformation;var _QueryDetails=_interopRequireDefault(require("./QueryDetails"));var _QueryActions=_interopRequireDefault(require("./QueryActions"));var _Explorer=_interopRequireDefault(require("./Explorer"));var _reactNative=require("react-native");var _sharedUi=require("@buoy-gg/shared-ui");var _jsxRuntime=require("react/jsx-runtime");function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function QueryInformation({selectedQuery:e,setSelectedQuery:t}){return(0,_jsxRuntime.jsxs)(_reactNative.ScrollView,{"sentry-label":"ignore devtools query info scroll",style:styles.flexOne,contentContainerStyle:styles.scrollContent,children:[(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.section,children:(0,_jsxRuntime.jsx)(_QueryDetails.default,{query:e})}),(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.section,children:(0,_jsxRuntime.jsx)(_QueryActions.default,{query:e,setSelectedQuery:t})}),(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.section,children:[(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.headerText,children:"Data Explorer"}),(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.contentView,children:(0,_jsxRuntime.jsx)(_Explorer.default,{editable:true,label:"Data",value:e?.state.data,defaultExpanded:["Data"],activeQuery:e})})]}),(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.section,children:[(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.headerText,children:"Query Explorer"}),(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.contentView,children:(0,_jsxRuntime.jsx)(_Explorer.default,{label:"Query",value:e,defaultExpanded:["Query","queryKey"],activeQuery:e})})]})]})}const styles=_reactNative.StyleSheet.create({flexOne:{flex:1,backgroundColor:"transparent"},scrollContent:{paddingBottom:16,paddingHorizontal:8},section:{marginBottom:16},headerText:{fontSize:16,fontWeight:"600",color:_sharedUi.night.color.text,marginBottom:8,textAlign:"left"},contentView:{backgroundColor:_sharedUi.night.color.surface,borderRadius:12,borderWidth:1,borderColor:_sharedUi.night.color.border,padding:16}});
|
|
@@ -1,96 +1 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
var _react = require("react");
|
|
8
|
-
var _getQueryStatusLabel = require("../../utils/getQueryStatusLabel");
|
|
9
|
-
var _sharedUi = require("@buoy-gg/shared-ui");
|
|
10
|
-
var _testIDs = require("../../utils/testIDs");
|
|
11
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
|
-
const getQueryText = query => {
|
|
13
|
-
if (!query?.queryKey) return "Unknown Query";
|
|
14
|
-
const keys = Array.isArray(query.queryKey) ? query.queryKey : [query.queryKey];
|
|
15
|
-
return keys.filter(k => k != null).map(k => String(k)).join(" › ") || "Unknown Query";
|
|
16
|
-
};
|
|
17
|
-
/**
|
|
18
|
-
* Single row representation of a query for the list view, showing status and observer count.
|
|
19
|
-
*/
|
|
20
|
-
// Memo justified by profiling (tool-bench 2026-07-06): 546 row renders in
|
|
21
|
-
// a 5s idle dwell at 300 queries. `stateSig` exists ONLY for this memo —
|
|
22
|
-
// Query objects are mutable with stable identity, so shallow-comparing
|
|
23
|
-
// `query` alone would never re-render (see QueryBrowser).
|
|
24
|
-
const QueryRow = /*#__PURE__*/(0, _react.memo)(function QueryRow({
|
|
25
|
-
query,
|
|
26
|
-
isSelected,
|
|
27
|
-
onSelect
|
|
28
|
-
}) {
|
|
29
|
-
// Buoy theme status color mapping
|
|
30
|
-
const getStatusHexColor = status => {
|
|
31
|
-
switch (status) {
|
|
32
|
-
case "disabled":
|
|
33
|
-
return _sharedUi.buoyColors.textMuted + "80";
|
|
34
|
-
// More muted for disabled
|
|
35
|
-
case "error":
|
|
36
|
-
return _sharedUi.buoyColors.error;
|
|
37
|
-
// red — failed with no cached data
|
|
38
|
-
case "fresh":
|
|
39
|
-
return _sharedUi.buoyColors.success;
|
|
40
|
-
case "stale":
|
|
41
|
-
return _sharedUi.buoyColors.warning;
|
|
42
|
-
case "inactive":
|
|
43
|
-
return _sharedUi.buoyColors.textMuted;
|
|
44
|
-
case "fetching":
|
|
45
|
-
return _sharedUi.buoyColors.primary;
|
|
46
|
-
// teal instead of blue
|
|
47
|
-
case "paused":
|
|
48
|
-
return _sharedUi.buoyColors.textMuted;
|
|
49
|
-
// muted instead of purple
|
|
50
|
-
default:
|
|
51
|
-
return _sharedUi.buoyColors.textSecondary;
|
|
52
|
-
}
|
|
53
|
-
};
|
|
54
|
-
const status = (0, _getQueryStatusLabel.getQueryStatusLabel)(query);
|
|
55
|
-
const observerCount = query.getObserversCount();
|
|
56
|
-
const isDisabled = query.isDisabled();
|
|
57
|
-
const queryHash = getQueryText(query);
|
|
58
|
-
|
|
59
|
-
// Get the best available timestamp for this query
|
|
60
|
-
const bestTimestamp = (() => {
|
|
61
|
-
if (isDisabled) return null;
|
|
62
|
-
if (query.state.dataUpdatedAt && query.state.dataUpdatedAt > 0) {
|
|
63
|
-
return query.state.dataUpdatedAt;
|
|
64
|
-
}
|
|
65
|
-
// @ts-ignore - exploring state fields for debugging
|
|
66
|
-
const stateAny = query.state;
|
|
67
|
-
if (stateAny.fetchedAt && stateAny.fetchedAt > 0) {
|
|
68
|
-
return stateAny.fetchedAt;
|
|
69
|
-
}
|
|
70
|
-
return null;
|
|
71
|
-
})();
|
|
72
|
-
const relativeTime = (0, _sharedUi.useRelativeTime)(bestTimestamp);
|
|
73
|
-
const lastUpdated = isDisabled ? "Disabled" : relativeTime || (query.state.dataUpdatedAt === 0 ? "Not fetched" : `N/A (${query.state.dataUpdatedAt || 0})`);
|
|
74
|
-
const testID = (0, _testIDs.queryRowTestID)(query.queryKey);
|
|
75
|
-
const observerText = `${observerCount} observer${observerCount !== 1 ? "s" : ""}`;
|
|
76
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.CompactRow, {
|
|
77
|
-
testID: testID,
|
|
78
|
-
statusTestID: `${testID}-status`,
|
|
79
|
-
statusSublabelTestID: `${testID}-observers`
|
|
80
|
-
// Spelled out for assistive tech: on Fabric the dot + two words merge
|
|
81
|
-
// into the row's own accessibility container, so without this the row
|
|
82
|
-
// announces as a control VoiceOver cannot name.
|
|
83
|
-
,
|
|
84
|
-
accessibilityLabel: `${queryHash}, ${status}, ${observerText}`,
|
|
85
|
-
statusDotColor: getStatusHexColor(status),
|
|
86
|
-
statusLabel: status.charAt(0).toUpperCase() + status.slice(1),
|
|
87
|
-
statusSublabel: observerText,
|
|
88
|
-
primaryText: queryHash,
|
|
89
|
-
bottomRightText: lastUpdated,
|
|
90
|
-
badgeText: observerCount,
|
|
91
|
-
badgeColor: getStatusHexColor(status),
|
|
92
|
-
isSelected: isSelected,
|
|
93
|
-
onPress: () => onSelect(query)
|
|
94
|
-
});
|
|
95
|
-
});
|
|
96
|
-
var _default = exports.default = QueryRow;
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _react=require("react");var _getQueryStatusLabel=require("../../utils/getQueryStatusLabel");var _sharedUi=require("@buoy-gg/shared-ui");var _testIDs=require("../../utils/testIDs");var _jsxRuntime=require("react/jsx-runtime");const getQueryText=e=>{if(!e?.queryKey)return"Unknown Query";const t=Array.isArray(e.queryKey)?e.queryKey:[e.queryKey];return t.filter(s=>s!=null).map(s=>String(s)).join(" \u203A ")||"Unknown Query"};const QueryRow=(0,_react.memo)(function e({query:t,isSelected:s,onSelect:d}){const n=a=>{switch(a){case"disabled":return _sharedUi.buoyColors.textMuted+"80";case"error":return _sharedUi.buoyColors.error;case"fresh":return _sharedUi.buoyColors.success;case"stale":return _sharedUi.buoyColors.warning;case"inactive":return _sharedUi.buoyColors.textMuted;case"fetching":return _sharedUi.buoyColors.primary;case"paused":return _sharedUi.buoyColors.textMuted;default:return _sharedUi.buoyColors.textSecondary}};const r=(0,_getQueryStatusLabel.getQueryStatusLabel)(t);const o=t.getObserversCount();const i=t.isDisabled();const l=getQueryText(t);const b=(()=>{if(i)return null;if(t.state.dataUpdatedAt&&t.state.dataUpdatedAt>0){return t.state.dataUpdatedAt}const a=t.state;if(a.fetchedAt&&a.fetchedAt>0){return a.fetchedAt}return null})();const y=(0,_sharedUi.useRelativeTime)(b);const p=i?"Disabled":y||(t.state.dataUpdatedAt===0?"Not fetched":`N/A (${t.state.dataUpdatedAt||0})`);const u=(0,_testIDs.queryRowTestID)(t.queryKey);const c=`${o} observer${o!==1?"s":""}`;return(0,_jsxRuntime.jsx)(_sharedUi.CompactRow,{testID:u,statusTestID:`${u}-status`,statusSublabelTestID:`${u}-observers`,accessibilityLabel:`${l}, ${r}, ${c}`,statusDotColor:n(r),statusLabel:r.charAt(0).toUpperCase()+r.slice(1),statusSublabel:c,primaryText:l,bottomRightText:p,badgeText:o,badgeColor:n(r),isSelected:s,onPress:()=>d(t)})});var _default=exports.default=QueryRow;
|
|
@@ -1,167 +1 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
var _reactNative = require("react-native");
|
|
8
|
-
var _sharedUi = require("@buoy-gg/shared-ui");
|
|
9
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
10
|
-
/**
|
|
11
|
-
* Pill-like status badge used within status filter rows. Displays label, dot, and count.
|
|
12
|
-
*/
|
|
13
|
-
const QueryStatus = ({
|
|
14
|
-
label,
|
|
15
|
-
color,
|
|
16
|
-
count,
|
|
17
|
-
showLabel = true,
|
|
18
|
-
isActive = false,
|
|
19
|
-
onPress,
|
|
20
|
-
onTouchStart,
|
|
21
|
-
size = "default",
|
|
22
|
-
testID
|
|
23
|
-
}) => {
|
|
24
|
-
const isLarge = size === "large";
|
|
25
|
-
// Buoy theme color mapping for status indicators
|
|
26
|
-
const getStatusColors = colorName => {
|
|
27
|
-
const colorMap = {
|
|
28
|
-
green: {
|
|
29
|
-
bg: _sharedUi.buoyColors.success + "15",
|
|
30
|
-
border: _sharedUi.buoyColors.success + "40",
|
|
31
|
-
dot: _sharedUi.buoyColors.success,
|
|
32
|
-
text: _sharedUi.buoyColors.success
|
|
33
|
-
},
|
|
34
|
-
yellow: {
|
|
35
|
-
bg: _sharedUi.buoyColors.warning + "15",
|
|
36
|
-
border: _sharedUi.buoyColors.warning + "40",
|
|
37
|
-
dot: _sharedUi.buoyColors.warning,
|
|
38
|
-
text: _sharedUi.buoyColors.warning
|
|
39
|
-
},
|
|
40
|
-
blue: {
|
|
41
|
-
bg: _sharedUi.buoyColors.primary + "15",
|
|
42
|
-
border: _sharedUi.buoyColors.primary + "40",
|
|
43
|
-
dot: _sharedUi.buoyColors.primary,
|
|
44
|
-
text: _sharedUi.buoyColors.primary
|
|
45
|
-
},
|
|
46
|
-
purple: {
|
|
47
|
-
bg: _sharedUi.night.color.fillSecondary,
|
|
48
|
-
border: _sharedUi.night.color.fillTertiary,
|
|
49
|
-
dot: _sharedUi.night.color.textTertiary,
|
|
50
|
-
text: _sharedUi.night.color.textTertiary
|
|
51
|
-
},
|
|
52
|
-
red: {
|
|
53
|
-
bg: _sharedUi.buoyColors.error + "15",
|
|
54
|
-
border: _sharedUi.buoyColors.error + "40",
|
|
55
|
-
dot: _sharedUi.buoyColors.error,
|
|
56
|
-
text: _sharedUi.buoyColors.error
|
|
57
|
-
},
|
|
58
|
-
gray: {
|
|
59
|
-
bg: _sharedUi.night.color.fillSecondary,
|
|
60
|
-
border: _sharedUi.night.color.fillTertiary,
|
|
61
|
-
dot: _sharedUi.night.color.textTertiary,
|
|
62
|
-
text: _sharedUi.night.color.textTertiary
|
|
63
|
-
}
|
|
64
|
-
};
|
|
65
|
-
return colorMap[colorName] || colorMap.gray;
|
|
66
|
-
};
|
|
67
|
-
const statusColors = getStatusColors(color);
|
|
68
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.TouchableOpacity, {
|
|
69
|
-
"sentry-label": "ignore devtools query status",
|
|
70
|
-
testID: testID,
|
|
71
|
-
accessibilityRole: "button"
|
|
72
|
-
// The dot, the word and the number merge into one container on Fabric,
|
|
73
|
-
// so the chip is announced without any of them unless it is spelled out.
|
|
74
|
-
,
|
|
75
|
-
accessibilityLabel: `${label}, ${count}${isActive ? ", selected" : ""}`,
|
|
76
|
-
accessibilityState: {
|
|
77
|
-
selected: isActive
|
|
78
|
-
},
|
|
79
|
-
style: [styles.queryStatusTag, isLarge && styles.queryStatusTagLarge,
|
|
80
|
-
// The night chip contract (see NightChip): resting fill never changes;
|
|
81
|
-
// selection is signaled by the tinted border and label.
|
|
82
|
-
isActive && {
|
|
83
|
-
backgroundColor: statusColors.bg,
|
|
84
|
-
borderColor: statusColors.border
|
|
85
|
-
}],
|
|
86
|
-
disabled: !onPress,
|
|
87
|
-
onPress: onPress,
|
|
88
|
-
onPressIn: onTouchStart,
|
|
89
|
-
activeOpacity: 0.7,
|
|
90
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
91
|
-
style: [styles.dot, isLarge && styles.dotLarge, {
|
|
92
|
-
backgroundColor: statusColors.dot
|
|
93
|
-
}]
|
|
94
|
-
}), showLabel && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
95
|
-
style: [styles.label, isLarge && styles.labelLarge, isActive && {
|
|
96
|
-
color: statusColors.text
|
|
97
|
-
}],
|
|
98
|
-
numberOfLines: 1,
|
|
99
|
-
ellipsizeMode: "tail",
|
|
100
|
-
children: label
|
|
101
|
-
}), count > 0 && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
102
|
-
testID: testID ? `${testID}-count` : undefined,
|
|
103
|
-
style: [styles.count, isLarge && styles.countLarge, {
|
|
104
|
-
color: statusColors.dot
|
|
105
|
-
}],
|
|
106
|
-
numberOfLines: 1,
|
|
107
|
-
children: count
|
|
108
|
-
})]
|
|
109
|
-
});
|
|
110
|
-
};
|
|
111
|
-
const styles = _reactNative.StyleSheet.create({
|
|
112
|
-
queryStatusTag: {
|
|
113
|
-
flexDirection: "row",
|
|
114
|
-
alignItems: "center",
|
|
115
|
-
// Night chip: dark-glass fill, fully-rounded pill, hairline border.
|
|
116
|
-
backgroundColor: _sharedUi.night.color.buttonSurface,
|
|
117
|
-
borderRadius: 13,
|
|
118
|
-
paddingHorizontal: 10,
|
|
119
|
-
paddingVertical: 5,
|
|
120
|
-
height: 26,
|
|
121
|
-
gap: 6,
|
|
122
|
-
borderWidth: 1,
|
|
123
|
-
borderColor: _sharedUi.night.color.border
|
|
124
|
-
},
|
|
125
|
-
queryStatusTagLarge: {
|
|
126
|
-
borderRadius: 16,
|
|
127
|
-
paddingHorizontal: 13,
|
|
128
|
-
paddingVertical: 6,
|
|
129
|
-
height: 32,
|
|
130
|
-
gap: 7
|
|
131
|
-
},
|
|
132
|
-
dot: {
|
|
133
|
-
width: 6,
|
|
134
|
-
height: 6,
|
|
135
|
-
borderRadius: 3
|
|
136
|
-
},
|
|
137
|
-
dotLarge: {
|
|
138
|
-
width: 8,
|
|
139
|
-
height: 8,
|
|
140
|
-
borderRadius: 4
|
|
141
|
-
},
|
|
142
|
-
label: {
|
|
143
|
-
fontSize: 11,
|
|
144
|
-
fontWeight: "500",
|
|
145
|
-
color: _sharedUi.night.color.textSecondary,
|
|
146
|
-
fontFamily: "system"
|
|
147
|
-
},
|
|
148
|
-
labelLarge: {
|
|
149
|
-
fontSize: 13,
|
|
150
|
-
fontWeight: "600",
|
|
151
|
-
letterSpacing: 0.2,
|
|
152
|
-
fontFamily: '"SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif'
|
|
153
|
-
},
|
|
154
|
-
count: {
|
|
155
|
-
fontSize: 11,
|
|
156
|
-
fontVariant: ["tabular-nums"],
|
|
157
|
-
fontWeight: "600",
|
|
158
|
-
marginLeft: "auto",
|
|
159
|
-
fontFamily: "system"
|
|
160
|
-
},
|
|
161
|
-
countLarge: {
|
|
162
|
-
fontSize: 13,
|
|
163
|
-
fontWeight: "700",
|
|
164
|
-
fontFamily: '"SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif'
|
|
165
|
-
}
|
|
166
|
-
});
|
|
167
|
-
var _default = exports.default = QueryStatus;
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _reactNative=require("react-native");var _sharedUi=require("@buoy-gg/shared-ui");var _jsxRuntime=require("react/jsx-runtime");const QueryStatus=({label:l,color:n,count:t,showLabel:u=true,isActive:r=false,onPress:s,onTouchStart:d,size:g="default",testID:a})=>{const o=g==="large";const c=y=>{const i={green:{bg:_sharedUi.buoyColors.success+"15",border:_sharedUi.buoyColors.success+"40",dot:_sharedUi.buoyColors.success,text:_sharedUi.buoyColors.success},yellow:{bg:_sharedUi.buoyColors.warning+"15",border:_sharedUi.buoyColors.warning+"40",dot:_sharedUi.buoyColors.warning,text:_sharedUi.buoyColors.warning},blue:{bg:_sharedUi.buoyColors.primary+"15",border:_sharedUi.buoyColors.primary+"40",dot:_sharedUi.buoyColors.primary,text:_sharedUi.buoyColors.primary},purple:{bg:_sharedUi.night.color.fillSecondary,border:_sharedUi.night.color.fillTertiary,dot:_sharedUi.night.color.textTertiary,text:_sharedUi.night.color.textTertiary},red:{bg:_sharedUi.buoyColors.error+"15",border:_sharedUi.buoyColors.error+"40",dot:_sharedUi.buoyColors.error,text:_sharedUi.buoyColors.error},gray:{bg:_sharedUi.night.color.fillSecondary,border:_sharedUi.night.color.fillTertiary,dot:_sharedUi.night.color.textTertiary,text:_sharedUi.night.color.textTertiary}};return i[y]||i.gray};const e=c(n);return(0,_jsxRuntime.jsxs)(_reactNative.TouchableOpacity,{"sentry-label":"ignore devtools query status",testID:a,accessibilityRole:"button",accessibilityLabel:`${l}, ${t}${r?", selected":""}`,accessibilityState:{selected:r},style:[styles.queryStatusTag,o&&styles.queryStatusTagLarge,r&&{backgroundColor:e.bg,borderColor:e.border}],disabled:!s,onPress:s,onPressIn:d,activeOpacity:.7,children:[(0,_jsxRuntime.jsx)(_reactNative.View,{style:[styles.dot,o&&styles.dotLarge,{backgroundColor:e.dot}]}),u&&(0,_jsxRuntime.jsx)(_reactNative.Text,{style:[styles.label,o&&styles.labelLarge,r&&{color:e.text}],numberOfLines:1,ellipsizeMode:"tail",children:l}),t>0&&(0,_jsxRuntime.jsx)(_reactNative.Text,{testID:a?`${a}-count`:void 0,style:[styles.count,o&&styles.countLarge,{color:e.dot}],numberOfLines:1,children:t})]})};const styles=_reactNative.StyleSheet.create({queryStatusTag:{flexDirection:"row",alignItems:"center",backgroundColor:_sharedUi.night.color.buttonSurface,borderRadius:13,paddingHorizontal:10,paddingVertical:5,height:26,gap:6,borderWidth:1,borderColor:_sharedUi.night.color.border},queryStatusTagLarge:{borderRadius:16,paddingHorizontal:13,paddingVertical:6,height:32,gap:7},dot:{width:6,height:6,borderRadius:3},dotLarge:{width:8,height:8,borderRadius:4},label:{fontSize:11,fontWeight:"500",color:_sharedUi.night.color.textSecondary,fontFamily:"system"},labelLarge:{fontSize:13,fontWeight:"600",letterSpacing:.2,fontFamily:'"SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif'},count:{fontSize:11,fontVariant:["tabular-nums"],fontWeight:"600",marginLeft:"auto",fontFamily:"system"},countLarge:{fontSize:13,fontWeight:"700",fontFamily:'"SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif'}});var _default=exports.default=QueryStatus;
|
|
@@ -1,100 +1 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
var _sharedUi = require("@buoy-gg/shared-ui");
|
|
8
|
-
var _QueryStatus = _interopRequireDefault(require("./QueryStatus"));
|
|
9
|
-
var _useQueryStatusCounts = _interopRequireDefault(require("../../hooks/useQueryStatusCounts"));
|
|
10
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
12
|
-
/**
|
|
13
|
-
* Horizontal status filter bar for queries with scroll-aware tap handling to prevent misfires.
|
|
14
|
-
*/
|
|
15
|
-
const QueryStatusCount = ({
|
|
16
|
-
activeFilter,
|
|
17
|
-
onFilterChange,
|
|
18
|
-
size = "default"
|
|
19
|
-
}) => {
|
|
20
|
-
const {
|
|
21
|
-
fresh,
|
|
22
|
-
stale,
|
|
23
|
-
fetching,
|
|
24
|
-
paused,
|
|
25
|
-
inactive
|
|
26
|
-
} = (0, _useQueryStatusCounts.default)();
|
|
27
|
-
const {
|
|
28
|
-
scrollProps,
|
|
29
|
-
onTouchStart: handleTouchStart,
|
|
30
|
-
isTap
|
|
31
|
-
} = (0, _sharedUi.useChipTap)();
|
|
32
|
-
const handleFilterClick = (filter, event) => {
|
|
33
|
-
if (!isTap(event)) return;
|
|
34
|
-
if (onFilterChange) {
|
|
35
|
-
// Toggle filter: if already active, clear it; otherwise set it
|
|
36
|
-
onFilterChange(activeFilter === filter ? null : filter);
|
|
37
|
-
}
|
|
38
|
-
};
|
|
39
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_sharedUi.ChipStrip, {
|
|
40
|
-
scrollProps: scrollProps,
|
|
41
|
-
sentryLabel: "ignore devtools query status count scroll",
|
|
42
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_QueryStatus.default, {
|
|
43
|
-
label: "Fresh",
|
|
44
|
-
color: "green",
|
|
45
|
-
count: fresh,
|
|
46
|
-
isActive: activeFilter === "fresh",
|
|
47
|
-
onPress: event => handleFilterClick("fresh", event),
|
|
48
|
-
onTouchStart: handleTouchStart,
|
|
49
|
-
testID: "buoy-rq-status-fresh",
|
|
50
|
-
showLabel: true // Always show labels now
|
|
51
|
-
,
|
|
52
|
-
size: size
|
|
53
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_QueryStatus.default, {
|
|
54
|
-
label: "Loading",
|
|
55
|
-
color: "blue",
|
|
56
|
-
count: fetching,
|
|
57
|
-
isActive: activeFilter === "fetching",
|
|
58
|
-
onPress: event => handleFilterClick("fetching", event),
|
|
59
|
-
onTouchStart: handleTouchStart,
|
|
60
|
-
testID: "buoy-rq-status-fetching",
|
|
61
|
-
showLabel: true // Always show labels now
|
|
62
|
-
,
|
|
63
|
-
size: size
|
|
64
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_QueryStatus.default, {
|
|
65
|
-
label: "Paused",
|
|
66
|
-
color: "purple",
|
|
67
|
-
count: paused,
|
|
68
|
-
isActive: activeFilter === "paused",
|
|
69
|
-
onPress: event => handleFilterClick("paused", event),
|
|
70
|
-
onTouchStart: handleTouchStart,
|
|
71
|
-
testID: "buoy-rq-status-paused",
|
|
72
|
-
showLabel: true // Always show labels now
|
|
73
|
-
,
|
|
74
|
-
size: size
|
|
75
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_QueryStatus.default, {
|
|
76
|
-
label: "Stale",
|
|
77
|
-
color: "yellow",
|
|
78
|
-
count: stale,
|
|
79
|
-
isActive: activeFilter === "stale",
|
|
80
|
-
onPress: event => handleFilterClick("stale", event),
|
|
81
|
-
onTouchStart: handleTouchStart,
|
|
82
|
-
testID: "buoy-rq-status-stale",
|
|
83
|
-
showLabel: true // Always show labels now
|
|
84
|
-
,
|
|
85
|
-
size: size
|
|
86
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_QueryStatus.default, {
|
|
87
|
-
label: "Idle",
|
|
88
|
-
color: "gray",
|
|
89
|
-
count: inactive,
|
|
90
|
-
isActive: activeFilter === "inactive",
|
|
91
|
-
onPress: event => handleFilterClick("inactive", event),
|
|
92
|
-
onTouchStart: handleTouchStart,
|
|
93
|
-
testID: "buoy-rq-status-inactive",
|
|
94
|
-
showLabel: true // Always show labels now
|
|
95
|
-
,
|
|
96
|
-
size: size
|
|
97
|
-
})]
|
|
98
|
-
});
|
|
99
|
-
};
|
|
100
|
-
var _default = exports.default = QueryStatusCount;
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _sharedUi=require("@buoy-gg/shared-ui");var _QueryStatus=_interopRequireDefault(require("./QueryStatus"));var _useQueryStatusCounts=_interopRequireDefault(require("../../hooks/useQueryStatusCounts"));var _jsxRuntime=require("react/jsx-runtime");function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}const QueryStatusCount=({activeFilter:t,onFilterChange:o,size:s="default"})=>{const{fresh:a,stale:l,fetching:n,paused:c,inactive:i}=(0,_useQueryStatusCounts.default)();const{scrollProps:d,onTouchStart:u,isTap:h}=(0,_sharedUi.useChipTap)();const r=(e,f)=>{if(!h(f))return;if(o){o(t===e?null:e)}};return(0,_jsxRuntime.jsxs)(_sharedUi.ChipStrip,{scrollProps:d,sentryLabel:"ignore devtools query status count scroll",children:[(0,_jsxRuntime.jsx)(_QueryStatus.default,{label:"Fresh",color:"green",count:a,isActive:t==="fresh",onPress:e=>r("fresh",e),onTouchStart:u,testID:"buoy-rq-status-fresh",showLabel:true,size:s}),(0,_jsxRuntime.jsx)(_QueryStatus.default,{label:"Loading",color:"blue",count:n,isActive:t==="fetching",onPress:e=>r("fetching",e),onTouchStart:u,testID:"buoy-rq-status-fetching",showLabel:true,size:s}),(0,_jsxRuntime.jsx)(_QueryStatus.default,{label:"Paused",color:"purple",count:c,isActive:t==="paused",onPress:e=>r("paused",e),onTouchStart:u,testID:"buoy-rq-status-paused",showLabel:true,size:s}),(0,_jsxRuntime.jsx)(_QueryStatus.default,{label:"Stale",color:"yellow",count:l,isActive:t==="stale",onPress:e=>r("stale",e),onTouchStart:u,testID:"buoy-rq-status-stale",showLabel:true,size:s}),(0,_jsxRuntime.jsx)(_QueryStatus.default,{label:"Idle",color:"gray",count:i,isActive:t==="inactive",onPress:e=>r("inactive",e),onTouchStart:u,testID:"buoy-rq-status-inactive",showLabel:true,size:s})]})};var _default=exports.default=QueryStatusCount;
|
|
@@ -1,61 +1 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
var _sharedUi = require("@buoy-gg/shared-ui");
|
|
8
|
-
var _QueryStatus = _interopRequireDefault(require("./QueryStatus"));
|
|
9
|
-
var _storageQueryUtils = require("../../utils/storageQueryUtils");
|
|
10
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
12
|
-
const allStorageTypes = ["mmkv", "async", "secure"];
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* Storage type filter component following composition principles
|
|
16
|
-
*
|
|
17
|
-
* Applied principles:
|
|
18
|
-
* - Decompose by Responsibility: Dedicated component for storage type filtering
|
|
19
|
-
* - No unnecessary memoization - simple toggle state management [[memory:4875074]]
|
|
20
|
-
*/
|
|
21
|
-
const StorageStatusCount = ({
|
|
22
|
-
activeStorageTypes = new Set(allStorageTypes),
|
|
23
|
-
onStorageTypesChange,
|
|
24
|
-
counts
|
|
25
|
-
}) => {
|
|
26
|
-
const {
|
|
27
|
-
scrollProps,
|
|
28
|
-
onTouchStart: handleTouchStart,
|
|
29
|
-
isTap
|
|
30
|
-
} = (0, _sharedUi.useChipTap)();
|
|
31
|
-
const handleStorageTypeToggle = (storageType, event) => {
|
|
32
|
-
if (!isTap(event)) return;
|
|
33
|
-
if (onStorageTypesChange) {
|
|
34
|
-
const newStorageTypes = new Set(activeStorageTypes);
|
|
35
|
-
if (newStorageTypes.has(storageType)) {
|
|
36
|
-
newStorageTypes.delete(storageType);
|
|
37
|
-
} else {
|
|
38
|
-
newStorageTypes.add(storageType);
|
|
39
|
-
}
|
|
40
|
-
onStorageTypesChange(newStorageTypes);
|
|
41
|
-
}
|
|
42
|
-
};
|
|
43
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.ChipStrip, {
|
|
44
|
-
scrollProps: scrollProps,
|
|
45
|
-
sentryLabel: "ignore devtools storage status count scroll",
|
|
46
|
-
children: allStorageTypes.map(storageType => {
|
|
47
|
-
const count = counts?.[storageType] ?? 0;
|
|
48
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_QueryStatus.default, {
|
|
49
|
-
label: (0, _storageQueryUtils.getStorageTypeLabel)(storageType),
|
|
50
|
-
color: (0, _storageQueryUtils.getStorageTypeColor)(storageType),
|
|
51
|
-
count: count // Show actual storage query counts
|
|
52
|
-
,
|
|
53
|
-
isActive: activeStorageTypes.has(storageType),
|
|
54
|
-
onPress: event => handleStorageTypeToggle(storageType, event),
|
|
55
|
-
onTouchStart: handleTouchStart,
|
|
56
|
-
showLabel: true
|
|
57
|
-
}, storageType);
|
|
58
|
-
})
|
|
59
|
-
});
|
|
60
|
-
};
|
|
61
|
-
var _default = exports.default = StorageStatusCount;
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _sharedUi=require("@buoy-gg/shared-ui");var _QueryStatus=_interopRequireDefault(require("./QueryStatus"));var _storageQueryUtils=require("../../utils/storageQueryUtils");var _jsxRuntime=require("react/jsx-runtime");function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}const allStorageTypes=["mmkv","async","secure"];const StorageStatusCount=({activeStorageTypes:t=new Set(allStorageTypes),onStorageTypesChange:s,counts:o})=>{const{scrollProps:a,onTouchStart:l,isTap:n}=(0,_sharedUi.useChipTap)();const i=(e,u)=>{if(!n(u))return;if(s){const r=new Set(t);if(r.has(e)){r.delete(e)}else{r.add(e)}s(r)}};return(0,_jsxRuntime.jsx)(_sharedUi.ChipStrip,{scrollProps:a,sentryLabel:"ignore devtools storage status count scroll",children:allStorageTypes.map(e=>{const u=o?.[e]??0;return(0,_jsxRuntime.jsx)(_QueryStatus.default,{label:(0,_storageQueryUtils.getStorageTypeLabel)(e),color:(0,_storageQueryUtils.getStorageTypeColor)(e),count:u,isActive:t.has(e),onPress:r=>i(e,r),onTouchStart:l,showLabel:true},e)})})};var _default=exports.default=StorageStatusCount;
|