@buoy-gg/react-query 7.0.41 → 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 -73
- package/lib/commonjs/checkPeer.js +1 -8
- package/lib/commonjs/checkPeer.web.js +1 -3
- package/lib/commonjs/index.js +1 -657
- 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 -8
- package/lib/module/checkPeer.web.js +1 -3
- package/lib/module/index.js +1 -130
- 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/web/index.mjs +3 -4
- package/package.json +3 -3
- package/lib/typescript/checkPeer.d.ts.map +0 -1
- package/lib/typescript/checkPeer.web.d.ts.map +0 -1
- 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,204 +1 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.SwipeIndicator = SwipeIndicator;
|
|
7
|
-
var _reactNative = require("react-native");
|
|
8
|
-
var _sharedUi = require("@buoy-gg/shared-ui");
|
|
9
|
-
var _react = require("react");
|
|
10
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
|
-
/**
|
|
12
|
-
* Morphing swipe indicator – thin line ➜ pill ➜ circle with a pop-out cue at
|
|
13
|
-
* full commit. Visual-only; gesture logic lives upstream.
|
|
14
|
-
*/
|
|
15
|
-
|
|
16
|
-
/* -------------------------------------------------------------------------- */
|
|
17
|
-
// VISUAL CONSTANTS – tuned for typical back-gesture UX
|
|
18
|
-
/* -------------------------------------------------------------------------- */
|
|
19
|
-
const INDICATOR_HEIGHT = 32; // ⬆️ bigger circle (line height)
|
|
20
|
-
const MIN_WIDTH = 6; // hairline start
|
|
21
|
-
const MAX_WIDTH = INDICATOR_HEIGHT; // circle when width == height
|
|
22
|
-
const DEFAULT_MAX_TRANSLATION = 120;
|
|
23
|
-
const POP_OUT_START = 0.95; // progress at which pop-out begins
|
|
24
|
-
const POP_OUT_SCALE = 1.15; // final scale factor when fully committed
|
|
25
|
-
|
|
26
|
-
function SwipeIndicator({
|
|
27
|
-
translationX,
|
|
28
|
-
maxTranslation = DEFAULT_MAX_TRANSLATION,
|
|
29
|
-
canSwipeLeft = true,
|
|
30
|
-
canSwipeRight = true
|
|
31
|
-
}) {
|
|
32
|
-
/* ---------------- LEFT EDGE (Back) ---------------- */
|
|
33
|
-
const leftProgress = (0, _react.useMemo)(() => {
|
|
34
|
-
return translationX.interpolate({
|
|
35
|
-
inputRange: [0, maxTranslation],
|
|
36
|
-
outputRange: [0, 1],
|
|
37
|
-
extrapolate: "clamp"
|
|
38
|
-
});
|
|
39
|
-
}, [translationX, maxTranslation]);
|
|
40
|
-
const leftIndicatorWidth = (0, _react.useMemo)(() => {
|
|
41
|
-
return leftProgress.interpolate({
|
|
42
|
-
inputRange: [0, 1],
|
|
43
|
-
outputRange: [MIN_WIDTH, MAX_WIDTH]
|
|
44
|
-
});
|
|
45
|
-
}, [leftProgress]);
|
|
46
|
-
const leftIndicatorScale = (0, _react.useMemo)(() => {
|
|
47
|
-
return leftProgress.interpolate({
|
|
48
|
-
inputRange: [0, POP_OUT_START, 1],
|
|
49
|
-
outputRange: [1, 1, POP_OUT_SCALE]
|
|
50
|
-
});
|
|
51
|
-
}, [leftProgress]);
|
|
52
|
-
const leftIndicatorTranslateX = (0, _react.useMemo)(() => {
|
|
53
|
-
return leftProgress.interpolate({
|
|
54
|
-
inputRange: [0, 0.99, 1],
|
|
55
|
-
outputRange: [0, 0, 16]
|
|
56
|
-
});
|
|
57
|
-
}, [leftProgress]);
|
|
58
|
-
const leftIndicatorOpacity = (0, _react.useMemo)(() => {
|
|
59
|
-
return leftProgress.interpolate({
|
|
60
|
-
inputRange: [0, 0.01],
|
|
61
|
-
outputRange: [0, 1],
|
|
62
|
-
extrapolate: "clamp"
|
|
63
|
-
});
|
|
64
|
-
}, [leftProgress]);
|
|
65
|
-
const leftArrowOpacity = (0, _react.useMemo)(() => {
|
|
66
|
-
return leftProgress.interpolate({
|
|
67
|
-
inputRange: [0, 0.5, 1],
|
|
68
|
-
outputRange: [0, 0, 1],
|
|
69
|
-
extrapolate: "clamp"
|
|
70
|
-
});
|
|
71
|
-
}, [leftProgress]);
|
|
72
|
-
const leftArrowScale = (0, _react.useMemo)(() => {
|
|
73
|
-
return leftProgress.interpolate({
|
|
74
|
-
inputRange: [0, 0.5, POP_OUT_START, 1],
|
|
75
|
-
outputRange: [0.8, 0.8, 1, 1.2]
|
|
76
|
-
});
|
|
77
|
-
}, [leftProgress]);
|
|
78
|
-
|
|
79
|
-
/* ---------------- RIGHT EDGE ---------------- */
|
|
80
|
-
const rightProgress = (0, _react.useMemo)(() => {
|
|
81
|
-
return translationX.interpolate({
|
|
82
|
-
inputRange: [-maxTranslation, 0],
|
|
83
|
-
outputRange: [1, 0],
|
|
84
|
-
extrapolate: "clamp"
|
|
85
|
-
});
|
|
86
|
-
}, [translationX, maxTranslation]);
|
|
87
|
-
const rightIndicatorWidth = (0, _react.useMemo)(() => {
|
|
88
|
-
return rightProgress.interpolate({
|
|
89
|
-
inputRange: [0, 1],
|
|
90
|
-
outputRange: [MIN_WIDTH, MAX_WIDTH]
|
|
91
|
-
});
|
|
92
|
-
}, [rightProgress]);
|
|
93
|
-
const rightIndicatorScale = (0, _react.useMemo)(() => {
|
|
94
|
-
return rightProgress.interpolate({
|
|
95
|
-
inputRange: [0, POP_OUT_START, 1],
|
|
96
|
-
outputRange: [1, 1, POP_OUT_SCALE]
|
|
97
|
-
});
|
|
98
|
-
}, [rightProgress]);
|
|
99
|
-
const rightIndicatorTranslateX = (0, _react.useMemo)(() => {
|
|
100
|
-
return rightProgress.interpolate({
|
|
101
|
-
inputRange: [0, 0.99, 1],
|
|
102
|
-
outputRange: [0, 0, -16]
|
|
103
|
-
});
|
|
104
|
-
}, [rightProgress]);
|
|
105
|
-
const rightIndicatorOpacity = (0, _react.useMemo)(() => {
|
|
106
|
-
return rightProgress.interpolate({
|
|
107
|
-
inputRange: [0, 0.01],
|
|
108
|
-
outputRange: [0, 1],
|
|
109
|
-
extrapolate: "clamp"
|
|
110
|
-
});
|
|
111
|
-
}, [rightProgress]);
|
|
112
|
-
const rightArrowOpacity = (0, _react.useMemo)(() => {
|
|
113
|
-
return rightProgress.interpolate({
|
|
114
|
-
inputRange: [0, 0.5, 1],
|
|
115
|
-
outputRange: [0, 0, 1],
|
|
116
|
-
extrapolate: "clamp"
|
|
117
|
-
});
|
|
118
|
-
}, [rightProgress]);
|
|
119
|
-
const rightArrowScale = (0, _react.useMemo)(() => {
|
|
120
|
-
return rightProgress.interpolate({
|
|
121
|
-
inputRange: [0, 0.5, POP_OUT_START, 1],
|
|
122
|
-
outputRange: [0.8, 0.8, 1, 1.2]
|
|
123
|
-
});
|
|
124
|
-
}, [rightProgress]);
|
|
125
|
-
|
|
126
|
-
/* ---------------- Render ---------------- */
|
|
127
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
128
|
-
style: styles.container,
|
|
129
|
-
pointerEvents: "none",
|
|
130
|
-
children: [canSwipeRight && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Animated.View, {
|
|
131
|
-
style: [styles.leftWrapper, {
|
|
132
|
-
width: leftIndicatorWidth,
|
|
133
|
-
height: INDICATOR_HEIGHT,
|
|
134
|
-
borderRadius: INDICATOR_HEIGHT / 2,
|
|
135
|
-
backgroundColor: _sharedUi.night.color.text + "E6",
|
|
136
|
-
justifyContent: "center",
|
|
137
|
-
alignItems: "center",
|
|
138
|
-
opacity: leftIndicatorOpacity,
|
|
139
|
-
transform: [{
|
|
140
|
-
scale: leftIndicatorScale
|
|
141
|
-
}, {
|
|
142
|
-
translateX: leftIndicatorTranslateX
|
|
143
|
-
}]
|
|
144
|
-
}],
|
|
145
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Animated.View, {
|
|
146
|
-
style: {
|
|
147
|
-
opacity: leftArrowOpacity,
|
|
148
|
-
transform: [{
|
|
149
|
-
scale: leftArrowScale
|
|
150
|
-
}]
|
|
151
|
-
},
|
|
152
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.ChevronLeft, {
|
|
153
|
-
size: INDICATOR_HEIGHT * 0.6,
|
|
154
|
-
color: _sharedUi.night.color.accent,
|
|
155
|
-
strokeWidth: 3
|
|
156
|
-
})
|
|
157
|
-
})
|
|
158
|
-
}), canSwipeLeft && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Animated.View, {
|
|
159
|
-
style: [styles.rightWrapper, {
|
|
160
|
-
width: rightIndicatorWidth,
|
|
161
|
-
height: INDICATOR_HEIGHT,
|
|
162
|
-
borderRadius: INDICATOR_HEIGHT / 2,
|
|
163
|
-
backgroundColor: _sharedUi.night.color.text + "E6",
|
|
164
|
-
justifyContent: "center",
|
|
165
|
-
alignItems: "center",
|
|
166
|
-
opacity: rightIndicatorOpacity,
|
|
167
|
-
transform: [{
|
|
168
|
-
scale: rightIndicatorScale
|
|
169
|
-
}, {
|
|
170
|
-
translateX: rightIndicatorTranslateX
|
|
171
|
-
}]
|
|
172
|
-
}],
|
|
173
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Animated.View, {
|
|
174
|
-
style: {
|
|
175
|
-
opacity: rightArrowOpacity,
|
|
176
|
-
transform: [{
|
|
177
|
-
scale: rightArrowScale
|
|
178
|
-
}]
|
|
179
|
-
},
|
|
180
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.ChevronRight, {
|
|
181
|
-
size: INDICATOR_HEIGHT * 0.6,
|
|
182
|
-
color: _sharedUi.night.color.accent,
|
|
183
|
-
strokeWidth: 3
|
|
184
|
-
})
|
|
185
|
-
})
|
|
186
|
-
})]
|
|
187
|
-
});
|
|
188
|
-
}
|
|
189
|
-
const styles = _reactNative.StyleSheet.create({
|
|
190
|
-
container: {
|
|
191
|
-
..._sharedUi.absoluteFill,
|
|
192
|
-
zIndex: 1000,
|
|
193
|
-
justifyContent: "center",
|
|
194
|
-
alignItems: "center"
|
|
195
|
-
},
|
|
196
|
-
leftWrapper: {
|
|
197
|
-
position: "absolute",
|
|
198
|
-
left: 16
|
|
199
|
-
},
|
|
200
|
-
rightWrapper: {
|
|
201
|
-
position: "absolute",
|
|
202
|
-
right: 16
|
|
203
|
-
}
|
|
204
|
-
});
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.SwipeIndicator=SwipeIndicator;var _reactNative=require("react-native");var _sharedUi=require("@buoy-gg/shared-ui");var _react=require("react");var _jsxRuntime=require("react/jsx-runtime");const INDICATOR_HEIGHT=32;const MIN_WIDTH=6;const MAX_WIDTH=INDICATOR_HEIGHT;const DEFAULT_MAX_TRANSLATION=120;const POP_OUT_START=.95;const POP_OUT_SCALE=1.15;function SwipeIndicator({translationX:r,maxTranslation:n=DEFAULT_MAX_TRANSLATION,canSwipeLeft:o=true,canSwipeRight:a=true}){const e=(0,_react.useMemo)(()=>{return r.interpolate({inputRange:[0,n],outputRange:[0,1],extrapolate:"clamp"})},[r,n]);const i=(0,_react.useMemo)(()=>{return e.interpolate({inputRange:[0,1],outputRange:[MIN_WIDTH,MAX_WIDTH]})},[e]);const u=(0,_react.useMemo)(()=>{return e.interpolate({inputRange:[0,POP_OUT_START,1],outputRange:[1,1,POP_OUT_SCALE]})},[e]);const c=(0,_react.useMemo)(()=>{return e.interpolate({inputRange:[0,.99,1],outputRange:[0,0,16]})},[e]);const s=(0,_react.useMemo)(()=>{return e.interpolate({inputRange:[0,.01],outputRange:[0,1],extrapolate:"clamp"})},[e]);const p=(0,_react.useMemo)(()=>{return e.interpolate({inputRange:[0,.5,1],outputRange:[0,0,1],extrapolate:"clamp"})},[e]);const l=(0,_react.useMemo)(()=>{return e.interpolate({inputRange:[0,.5,POP_OUT_START,1],outputRange:[.8,.8,1,1.2]})},[e]);const t=(0,_react.useMemo)(()=>{return r.interpolate({inputRange:[-n,0],outputRange:[1,0],extrapolate:"clamp"})},[r,n]);const g=(0,_react.useMemo)(()=>{return t.interpolate({inputRange:[0,1],outputRange:[MIN_WIDTH,MAX_WIDTH]})},[t]);const d=(0,_react.useMemo)(()=>{return t.interpolate({inputRange:[0,POP_OUT_START,1],outputRange:[1,1,POP_OUT_SCALE]})},[t]);const h=(0,_react.useMemo)(()=>{return t.interpolate({inputRange:[0,.99,1],outputRange:[0,0,-16]})},[t]);const R=(0,_react.useMemo)(()=>{return t.interpolate({inputRange:[0,.01],outputRange:[0,1],extrapolate:"clamp"})},[t]);const m=(0,_react.useMemo)(()=>{return t.interpolate({inputRange:[0,.5,1],outputRange:[0,0,1],extrapolate:"clamp"})},[t]);const I=(0,_react.useMemo)(()=>{return t.interpolate({inputRange:[0,.5,POP_OUT_START,1],outputRange:[.8,.8,1,1.2]})},[t]);return(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.container,pointerEvents:"none",children:[a&&(0,_jsxRuntime.jsx)(_reactNative.Animated.View,{style:[styles.leftWrapper,{width:i,height:INDICATOR_HEIGHT,borderRadius:INDICATOR_HEIGHT/2,backgroundColor:_sharedUi.night.color.text+"E6",justifyContent:"center",alignItems:"center",opacity:s,transform:[{scale:u},{translateX:c}]}],children:(0,_jsxRuntime.jsx)(_reactNative.Animated.View,{style:{opacity:p,transform:[{scale:l}]},children:(0,_jsxRuntime.jsx)(_sharedUi.ChevronLeft,{size:INDICATOR_HEIGHT*.6,color:_sharedUi.night.color.accent,strokeWidth:3})})}),o&&(0,_jsxRuntime.jsx)(_reactNative.Animated.View,{style:[styles.rightWrapper,{width:g,height:INDICATOR_HEIGHT,borderRadius:INDICATOR_HEIGHT/2,backgroundColor:_sharedUi.night.color.text+"E6",justifyContent:"center",alignItems:"center",opacity:R,transform:[{scale:d},{translateX:h}]}],children:(0,_jsxRuntime.jsx)(_reactNative.Animated.View,{style:{opacity:m,transform:[{scale:I}]},children:(0,_jsxRuntime.jsx)(_sharedUi.ChevronRight,{size:INDICATOR_HEIGHT*.6,color:_sharedUi.night.color.accent,strokeWidth:3})})})]})}const styles=_reactNative.StyleSheet.create({container:{..._sharedUi.absoluteFill,zIndex:1e3,justifyContent:"center",alignItems:"center"},leftWrapper:{position:"absolute",left:16},rightWrapper:{position:"absolute",right:16}});
|
|
@@ -1,100 +1 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = ActionButton;
|
|
7
|
-
var _reactNative = require("react-native");
|
|
8
|
-
var _sharedUi = require("@buoy-gg/shared-ui");
|
|
9
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
10
|
-
// Clean, minimal color config matching React Query DevTools style
|
|
11
|
-
const buttonConfigs = {
|
|
12
|
-
refetch: {
|
|
13
|
-
dotColor: _sharedUi.night.color.accent,
|
|
14
|
-
textColor: _sharedUi.night.color.text,
|
|
15
|
-
borderColor: _sharedUi.night.color.border
|
|
16
|
-
},
|
|
17
|
-
invalidate: {
|
|
18
|
-
dotColor: _sharedUi.night.color.warning,
|
|
19
|
-
textColor: _sharedUi.night.color.text,
|
|
20
|
-
borderColor: _sharedUi.night.color.border
|
|
21
|
-
},
|
|
22
|
-
reset: {
|
|
23
|
-
dotColor: _sharedUi.night.color.textSecondary,
|
|
24
|
-
textColor: _sharedUi.night.color.text,
|
|
25
|
-
borderColor: _sharedUi.night.color.border
|
|
26
|
-
},
|
|
27
|
-
remove: {
|
|
28
|
-
dotColor: _sharedUi.night.color.danger,
|
|
29
|
-
textColor: _sharedUi.night.color.danger,
|
|
30
|
-
borderColor: _sharedUi.night.color.danger + "40"
|
|
31
|
-
},
|
|
32
|
-
triggerLoading: {
|
|
33
|
-
dotColor: _sharedUi.night.color.info,
|
|
34
|
-
textColor: _sharedUi.night.color.info,
|
|
35
|
-
borderColor: _sharedUi.night.color.info + "40"
|
|
36
|
-
},
|
|
37
|
-
triggerError: {
|
|
38
|
-
dotColor: _sharedUi.night.color.danger,
|
|
39
|
-
textColor: _sharedUi.night.color.danger,
|
|
40
|
-
borderColor: _sharedUi.night.color.danger + "40"
|
|
41
|
-
}
|
|
42
|
-
};
|
|
43
|
-
/** Clean, minimal action button matching React Query DevTools style. */
|
|
44
|
-
function ActionButton({
|
|
45
|
-
onClick,
|
|
46
|
-
text,
|
|
47
|
-
variant,
|
|
48
|
-
disabled,
|
|
49
|
-
testID
|
|
50
|
-
}) {
|
|
51
|
-
const config = buttonConfigs[variant];
|
|
52
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.TouchableOpacity, {
|
|
53
|
-
"sentry-label": "ignore devtools action button",
|
|
54
|
-
testID: testID,
|
|
55
|
-
disabled: disabled,
|
|
56
|
-
onPress: onClick,
|
|
57
|
-
style: [styles.button, {
|
|
58
|
-
borderColor: disabled ? _sharedUi.night.color.border : config.borderColor,
|
|
59
|
-
opacity: disabled ? 0.4 : 1
|
|
60
|
-
}],
|
|
61
|
-
activeOpacity: 0.7,
|
|
62
|
-
accessibilityRole: "button",
|
|
63
|
-
accessibilityLabel: text,
|
|
64
|
-
accessibilityState: {
|
|
65
|
-
disabled
|
|
66
|
-
},
|
|
67
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
68
|
-
style: [styles.dot, {
|
|
69
|
-
backgroundColor: disabled ? _sharedUi.night.color.textTertiary : config.dotColor
|
|
70
|
-
}]
|
|
71
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
72
|
-
style: [styles.text, {
|
|
73
|
-
color: disabled ? _sharedUi.night.color.textTertiary : config.textColor
|
|
74
|
-
}],
|
|
75
|
-
children: text
|
|
76
|
-
})]
|
|
77
|
-
});
|
|
78
|
-
}
|
|
79
|
-
const styles = _reactNative.StyleSheet.create({
|
|
80
|
-
button: {
|
|
81
|
-
flexDirection: "row",
|
|
82
|
-
alignItems: "center",
|
|
83
|
-
justifyContent: "center",
|
|
84
|
-
borderRadius: 4,
|
|
85
|
-
borderWidth: 1,
|
|
86
|
-
paddingHorizontal: 8,
|
|
87
|
-
paddingVertical: 4,
|
|
88
|
-
backgroundColor: "transparent"
|
|
89
|
-
},
|
|
90
|
-
dot: {
|
|
91
|
-
width: 6,
|
|
92
|
-
height: 6,
|
|
93
|
-
borderRadius: 3,
|
|
94
|
-
marginRight: 6
|
|
95
|
-
},
|
|
96
|
-
text: {
|
|
97
|
-
fontSize: 12,
|
|
98
|
-
fontWeight: "500"
|
|
99
|
-
}
|
|
100
|
-
});
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=ActionButton;var _reactNative=require("react-native");var _sharedUi=require("@buoy-gg/shared-ui");var _jsxRuntime=require("react/jsx-runtime");const buttonConfigs={refetch:{dotColor:_sharedUi.night.color.accent,textColor:_sharedUi.night.color.text,borderColor:_sharedUi.night.color.border},invalidate:{dotColor:_sharedUi.night.color.warning,textColor:_sharedUi.night.color.text,borderColor:_sharedUi.night.color.border},reset:{dotColor:_sharedUi.night.color.textSecondary,textColor:_sharedUi.night.color.text,borderColor:_sharedUi.night.color.border},remove:{dotColor:_sharedUi.night.color.danger,textColor:_sharedUi.night.color.danger,borderColor:_sharedUi.night.color.danger+"40"},triggerLoading:{dotColor:_sharedUi.night.color.info,textColor:_sharedUi.night.color.info,borderColor:_sharedUi.night.color.info+"40"},triggerError:{dotColor:_sharedUi.night.color.danger,textColor:_sharedUi.night.color.danger,borderColor:_sharedUi.night.color.danger+"40"}};function ActionButton({onClick:e,text:r,variant:i,disabled:o,testID:n}){const t=buttonConfigs[i];return(0,_jsxRuntime.jsxs)(_reactNative.TouchableOpacity,{"sentry-label":"ignore devtools action button",testID:n,disabled:o,onPress:e,style:[styles.button,{borderColor:o?_sharedUi.night.color.border:t.borderColor,opacity:o?.4:1}],activeOpacity:.7,accessibilityRole:"button",accessibilityLabel:r,accessibilityState:{disabled:o},children:[(0,_jsxRuntime.jsx)(_reactNative.View,{style:[styles.dot,{backgroundColor:o?_sharedUi.night.color.textTertiary:t.dotColor}]}),(0,_jsxRuntime.jsx)(_reactNative.Text,{style:[styles.text,{color:o?_sharedUi.night.color.textTertiary:t.textColor}],children:r})]})}const styles=_reactNative.StyleSheet.create({button:{flexDirection:"row",alignItems:"center",justifyContent:"center",borderRadius:4,borderWidth:1,paddingHorizontal:8,paddingVertical:4,backgroundColor:"transparent"},dot:{width:6,height:6,borderRadius:3,marginRight:6},text:{fontSize:12,fontWeight:"500"}});
|
|
@@ -1,53 +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
|
-
* Icon-only button for clearing either the query or mutation cache from the dev tools UI.
|
|
12
|
-
*/
|
|
13
|
-
const ClearCacheButton = ({
|
|
14
|
-
type,
|
|
15
|
-
onClear,
|
|
16
|
-
disabled = false
|
|
17
|
-
}) => {
|
|
18
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
|
|
19
|
-
"sentry-label": "ignore devtools clear cache button",
|
|
20
|
-
style: [styles.button, disabled && styles.disabledButton],
|
|
21
|
-
onPress: onClear,
|
|
22
|
-
disabled: disabled,
|
|
23
|
-
activeOpacity: 0.7,
|
|
24
|
-
accessibilityLabel: `Clear ${type} cache`,
|
|
25
|
-
accessibilityRole: "button",
|
|
26
|
-
accessibilityState: {
|
|
27
|
-
disabled
|
|
28
|
-
},
|
|
29
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.Trash, {
|
|
30
|
-
size: 16,
|
|
31
|
-
strokeWidth: 2,
|
|
32
|
-
color: disabled ? _sharedUi.night.color.textTertiary : _sharedUi.night.color.warning
|
|
33
|
-
})
|
|
34
|
-
});
|
|
35
|
-
};
|
|
36
|
-
const styles = _reactNative.StyleSheet.create({
|
|
37
|
-
button: {
|
|
38
|
-
width: 32,
|
|
39
|
-
height: 32,
|
|
40
|
-
borderRadius: 6,
|
|
41
|
-
backgroundColor: _sharedUi.night.color.warningSoft,
|
|
42
|
-
justifyContent: "center",
|
|
43
|
-
alignItems: "center",
|
|
44
|
-
borderWidth: 1,
|
|
45
|
-
borderColor: _sharedUi.night.color.warning + "33"
|
|
46
|
-
},
|
|
47
|
-
disabledButton: {
|
|
48
|
-
opacity: 0.5,
|
|
49
|
-
backgroundColor: _sharedUi.night.color.fill,
|
|
50
|
-
borderColor: _sharedUi.night.color.border
|
|
51
|
-
}
|
|
52
|
-
});
|
|
53
|
-
var _default = exports.default = ClearCacheButton;
|
|
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 ClearCacheButton=({type:t,onClear:r,disabled:e=false})=>{return(0,_jsxRuntime.jsx)(_reactNative.TouchableOpacity,{"sentry-label":"ignore devtools clear cache button",style:[styles.button,e&&styles.disabledButton],onPress:r,disabled:e,activeOpacity:.7,accessibilityLabel:`Clear ${t} cache`,accessibilityRole:"button",accessibilityState:{disabled:e},children:(0,_jsxRuntime.jsx)(_sharedUi.Trash,{size:16,strokeWidth:2,color:e?_sharedUi.night.color.textTertiary:_sharedUi.night.color.warning})})};const styles=_reactNative.StyleSheet.create({button:{width:32,height:32,borderRadius:6,backgroundColor:_sharedUi.night.color.warningSoft,justifyContent:"center",alignItems:"center",borderWidth:1,borderColor:_sharedUi.night.color.warning+"33"},disabledButton:{opacity:.5,backgroundColor:_sharedUi.night.color.fill,borderColor:_sharedUi.night.color.border}});var _default=exports.default=ClearCacheButton;
|
|
@@ -1,75 +1 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = Explorer;
|
|
7
|
-
var _react = require("react");
|
|
8
|
-
var _reactQuery = require("@tanstack/react-query");
|
|
9
|
-
var _updateNestedDataByPath = require("../../utils/updateNestedDataByPath");
|
|
10
|
-
var _deleteItem = _interopRequireDefault(require("../../utils/actions/deleteItem"));
|
|
11
|
-
var _testIDs = require("../../utils/testIDs");
|
|
12
|
-
var _dataViewer = require("@buoy-gg/shared-ui/dataViewer");
|
|
13
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
14
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
15
|
-
/**
|
|
16
|
-
* React Query's data explorer — now a thin wrapper over shared-ui's
|
|
17
|
-
* {@link LiveExplorer}, which is this component's own implementation hoisted
|
|
18
|
-
* so every tool (react-query, zustand, storage, whatever comes next) edits
|
|
19
|
-
* data through ONE live editor.
|
|
20
|
-
*
|
|
21
|
-
* Everything RQ-specific stays here and only here:
|
|
22
|
-
* - the WRITER: edits go through `queryClient.setQueryData` against the
|
|
23
|
-
* active query (deletes via `deleteItem`, which forces a fresh reference so
|
|
24
|
-
* observers re-render);
|
|
25
|
-
* - the HANDLE scheme: `explorerTestID` keeps every existing
|
|
26
|
-
* `buoy-rq-explorer-*` testID exactly as the Detox suite knows them;
|
|
27
|
-
* - the cadence: `debounceMs: 0` — a cache write is free and unlogged, so RQ
|
|
28
|
-
* keeps its original per-keystroke behavior.
|
|
29
|
-
*/
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
* Recursive data explorer component used for both editable and read-only JSON
|
|
33
|
-
* trees inside the React Query dev tools.
|
|
34
|
-
*/
|
|
35
|
-
function Explorer({
|
|
36
|
-
editable,
|
|
37
|
-
label,
|
|
38
|
-
value,
|
|
39
|
-
defaultExpanded,
|
|
40
|
-
activeQuery,
|
|
41
|
-
dataPath,
|
|
42
|
-
itemsDeletable,
|
|
43
|
-
dataVersion = 0
|
|
44
|
-
}) {
|
|
45
|
-
const queryClient = (0, _reactQuery.useQueryClient)();
|
|
46
|
-
const writer = (0, _react.useMemo)(() => {
|
|
47
|
-
if (!activeQuery) return undefined;
|
|
48
|
-
return {
|
|
49
|
-
update: (path, next) => {
|
|
50
|
-
const oldData = activeQuery.state.data;
|
|
51
|
-
const newData = (0, _updateNestedDataByPath.updateNestedDataByPath)(oldData, path, next);
|
|
52
|
-
queryClient.setQueryData(activeQuery.queryKey, newData);
|
|
53
|
-
},
|
|
54
|
-
remove: path => {
|
|
55
|
-
(0, _deleteItem.default)({
|
|
56
|
-
queryClient,
|
|
57
|
-
activeQuery,
|
|
58
|
-
dataPath: path
|
|
59
|
-
});
|
|
60
|
-
}
|
|
61
|
-
};
|
|
62
|
-
}, [queryClient, activeQuery]);
|
|
63
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_dataViewer.LiveExplorer, {
|
|
64
|
-
editable: editable,
|
|
65
|
-
label: label,
|
|
66
|
-
value: value,
|
|
67
|
-
defaultExpanded: defaultExpanded,
|
|
68
|
-
writer: writer,
|
|
69
|
-
dataPath: dataPath,
|
|
70
|
-
itemsDeletable: itemsDeletable,
|
|
71
|
-
dataVersion: dataVersion,
|
|
72
|
-
testIDForPath: _testIDs.explorerTestID,
|
|
73
|
-
debounceMs: 0
|
|
74
|
-
});
|
|
75
|
-
}
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=Explorer;var _react=require("react");var _reactQuery=require("@tanstack/react-query");var _updateNestedDataByPath=require("../../utils/updateNestedDataByPath");var _deleteItem=_interopRequireDefault(require("../../utils/actions/deleteItem"));var _testIDs=require("../../utils/testIDs");var _dataViewer=require("@buoy-gg/shared-ui/dataViewer");var _jsxRuntime=require("react/jsx-runtime");function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function Explorer({editable:e,label:u,value:s,defaultExpanded:d,activeQuery:t,dataPath:i,itemsDeletable:n,dataVersion:l=0}){const r=(0,_reactQuery.useQueryClient)();const o=(0,_react.useMemo)(()=>{if(!t)return void 0;return{update:(a,c)=>{const p=t.state.data;const D=(0,_updateNestedDataByPath.updateNestedDataByPath)(p,a,c);r.setQueryData(t.queryKey,D)},remove:a=>{(0,_deleteItem.default)({queryClient:r,activeQuery:t,dataPath:a})}}},[r,t]);return(0,_jsxRuntime.jsx)(_dataViewer.LiveExplorer,{editable:e,label:u,value:s,defaultExpanded:d,writer:o,dataPath:i,itemsDeletable:n,dataVersion:l,testIDForPath:_testIDs.explorerTestID,debounceMs:0})}
|
|
@@ -1,190 +1 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = MutationButton;
|
|
7
|
-
var _reactNative = require("react-native");
|
|
8
|
-
var _svgs = require("./svgs");
|
|
9
|
-
var _sharedUi = require("@buoy-gg/shared-ui");
|
|
10
|
-
var _testIDs = require("../../utils/testIDs");
|
|
11
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
|
-
const getMutationText = mutation => {
|
|
13
|
-
if (!mutation.options.mutationKey) return "Anonymous Mutation";
|
|
14
|
-
const keys = Array.isArray(mutation.options.mutationKey) ? mutation.options.mutationKey : [mutation.options.mutationKey];
|
|
15
|
-
return keys.filter(k => k != null).map(k => String(k)).join(" › ") || "Anonymous Mutation";
|
|
16
|
-
};
|
|
17
|
-
/**
|
|
18
|
-
* List-row button for displaying mutation metadata and selecting it for detail inspection.
|
|
19
|
-
*/
|
|
20
|
-
function MutationButton({
|
|
21
|
-
mutation,
|
|
22
|
-
setSelectedMutation,
|
|
23
|
-
selected
|
|
24
|
-
}) {
|
|
25
|
-
const submittedAt = new Date(mutation.state.submittedAt).toLocaleTimeString();
|
|
26
|
-
|
|
27
|
-
// Get the best available timestamp for this mutation
|
|
28
|
-
const bestTimestamp = (() => {
|
|
29
|
-
if (mutation.state.submittedAt && mutation.state.submittedAt > 0) {
|
|
30
|
-
return mutation.state.submittedAt;
|
|
31
|
-
}
|
|
32
|
-
// @ts-ignore - exploring state fields for debugging
|
|
33
|
-
const stateAny = mutation.state;
|
|
34
|
-
if (stateAny.updatedAt && stateAny.updatedAt > 0) {
|
|
35
|
-
return stateAny.updatedAt;
|
|
36
|
-
}
|
|
37
|
-
return null;
|
|
38
|
-
})();
|
|
39
|
-
const relativeTime = (0, _sharedUi.useRelativeTime)(bestTimestamp);
|
|
40
|
-
const lastUpdated = relativeTime || `N/A (${mutation.state.submittedAt || 0})`;
|
|
41
|
-
const getStatusInfo = () => {
|
|
42
|
-
if (mutation.state.isPaused) {
|
|
43
|
-
return {
|
|
44
|
-
status: "Paused",
|
|
45
|
-
color: _sharedUi.buoyColors.textMuted,
|
|
46
|
-
icon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_svgs.PauseCircle, {})
|
|
47
|
-
};
|
|
48
|
-
}
|
|
49
|
-
switch (mutation.state.status) {
|
|
50
|
-
case "success":
|
|
51
|
-
return {
|
|
52
|
-
status: "Success",
|
|
53
|
-
color: _sharedUi.buoyColors.success,
|
|
54
|
-
icon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_svgs.CheckCircle, {})
|
|
55
|
-
};
|
|
56
|
-
case "error":
|
|
57
|
-
return {
|
|
58
|
-
status: "Error",
|
|
59
|
-
color: _sharedUi.buoyColors.error,
|
|
60
|
-
icon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_svgs.XCircle, {})
|
|
61
|
-
};
|
|
62
|
-
case "pending":
|
|
63
|
-
return {
|
|
64
|
-
status: "Loading",
|
|
65
|
-
color: _sharedUi.buoyColors.primary,
|
|
66
|
-
icon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_svgs.LoadingCircle, {})
|
|
67
|
-
};
|
|
68
|
-
default:
|
|
69
|
-
return {
|
|
70
|
-
status: "Idle",
|
|
71
|
-
color: _sharedUi.buoyColors.textMuted,
|
|
72
|
-
icon: null
|
|
73
|
-
};
|
|
74
|
-
}
|
|
75
|
-
};
|
|
76
|
-
const statusInfo = getStatusInfo();
|
|
77
|
-
const mutationText = getMutationText(mutation);
|
|
78
|
-
const testID = (0, _testIDs.mutationRowTestID)(mutation.options.mutationKey, mutation.mutationId);
|
|
79
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.TouchableOpacity, {
|
|
80
|
-
"sentry-label": "ignore devtools mutation button",
|
|
81
|
-
testID: testID,
|
|
82
|
-
accessibilityRole: "button"
|
|
83
|
-
// Same Fabric merge as the query rows: without a spelled-out label the
|
|
84
|
-
// row announces as an unnamed button.
|
|
85
|
-
,
|
|
86
|
-
accessibilityLabel: `${mutationText}, ${statusInfo.status}`,
|
|
87
|
-
onPress: () => setSelectedMutation(mutation === selected ? undefined : mutation),
|
|
88
|
-
style: [styles.button, selected?.mutationId === mutation.mutationId && styles.selected],
|
|
89
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
90
|
-
style: styles.rowContent,
|
|
91
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
92
|
-
style: styles.statusSection,
|
|
93
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
94
|
-
style: [styles.statusDot, {
|
|
95
|
-
backgroundColor: statusInfo.color
|
|
96
|
-
}]
|
|
97
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
98
|
-
style: styles.statusInfo,
|
|
99
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
100
|
-
testID: `${testID}-status`,
|
|
101
|
-
style: [styles.statusLabel, {
|
|
102
|
-
color: statusInfo.color
|
|
103
|
-
}],
|
|
104
|
-
children: statusInfo.status
|
|
105
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
106
|
-
style: styles.submittedText,
|
|
107
|
-
children: submittedAt
|
|
108
|
-
})]
|
|
109
|
-
})]
|
|
110
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
111
|
-
style: styles.mutationSection,
|
|
112
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
113
|
-
testID: `${testID}-key`,
|
|
114
|
-
style: styles.mutationKey,
|
|
115
|
-
children: mutationText
|
|
116
|
-
})
|
|
117
|
-
})]
|
|
118
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
119
|
-
style: styles.bottomRightContainer,
|
|
120
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
121
|
-
style: styles.bottomRightText,
|
|
122
|
-
children: lastUpdated
|
|
123
|
-
})
|
|
124
|
-
})]
|
|
125
|
-
});
|
|
126
|
-
}
|
|
127
|
-
const styles = _reactNative.StyleSheet.create({
|
|
128
|
-
button: {
|
|
129
|
-
backgroundColor: _sharedUi.night.color.surface,
|
|
130
|
-
borderRadius: 8,
|
|
131
|
-
borderWidth: 1,
|
|
132
|
-
borderColor: _sharedUi.night.color.border,
|
|
133
|
-
marginHorizontal: 8,
|
|
134
|
-
marginVertical: 3,
|
|
135
|
-
padding: 12
|
|
136
|
-
},
|
|
137
|
-
selected: {
|
|
138
|
-
backgroundColor: _sharedUi.night.color.accentSoft,
|
|
139
|
-
borderColor: _sharedUi.night.color.accentBorderStrong
|
|
140
|
-
},
|
|
141
|
-
rowContent: {
|
|
142
|
-
flexDirection: "row",
|
|
143
|
-
alignItems: "center",
|
|
144
|
-
justifyContent: "space-between"
|
|
145
|
-
},
|
|
146
|
-
statusSection: {
|
|
147
|
-
flexDirection: "row",
|
|
148
|
-
alignItems: "center",
|
|
149
|
-
gap: 8,
|
|
150
|
-
flex: 1
|
|
151
|
-
},
|
|
152
|
-
statusDot: {
|
|
153
|
-
width: 8,
|
|
154
|
-
height: 8,
|
|
155
|
-
borderRadius: 4
|
|
156
|
-
},
|
|
157
|
-
statusInfo: {
|
|
158
|
-
flex: 1
|
|
159
|
-
},
|
|
160
|
-
statusLabel: {
|
|
161
|
-
fontSize: 11,
|
|
162
|
-
fontWeight: "600",
|
|
163
|
-
lineHeight: 14
|
|
164
|
-
},
|
|
165
|
-
submittedText: {
|
|
166
|
-
fontSize: 10,
|
|
167
|
-
color: _sharedUi.night.color.textTertiary,
|
|
168
|
-
marginTop: 1
|
|
169
|
-
},
|
|
170
|
-
mutationSection: {
|
|
171
|
-
flex: 2,
|
|
172
|
-
paddingHorizontal: 12
|
|
173
|
-
},
|
|
174
|
-
mutationKey: {
|
|
175
|
-
fontFamily: _sharedUi.monoFont,
|
|
176
|
-
fontSize: 12,
|
|
177
|
-
color: _sharedUi.night.color.text,
|
|
178
|
-
lineHeight: 16
|
|
179
|
-
},
|
|
180
|
-
bottomRightContainer: {
|
|
181
|
-
position: "absolute",
|
|
182
|
-
bottom: 4,
|
|
183
|
-
right: 8
|
|
184
|
-
},
|
|
185
|
-
bottomRightText: {
|
|
186
|
-
fontSize: 9,
|
|
187
|
-
color: _sharedUi.night.color.textTertiary,
|
|
188
|
-
fontFamily: _sharedUi.monoFont
|
|
189
|
-
}
|
|
190
|
-
});
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=MutationButton;var _reactNative=require("react-native");var _svgs=require("./svgs");var _sharedUi=require("@buoy-gg/shared-ui");var _testIDs=require("../../utils/testIDs");var _jsxRuntime=require("react/jsx-runtime");const getMutationText=t=>{if(!t.options.mutationKey)return"Anonymous Mutation";const s=Array.isArray(t.options.mutationKey)?t.options.mutationKey:[t.options.mutationKey];return s.filter(e=>e!=null).map(e=>String(e)).join(" \u203A ")||"Anonymous Mutation"};function MutationButton({mutation:t,setSelectedMutation:s,selected:e}){const a=new Date(t.state.submittedAt).toLocaleTimeString();const l=(()=>{if(t.state.submittedAt&&t.state.submittedAt>0){return t.state.submittedAt}const i=t.state;if(i.updatedAt&&i.updatedAt>0){return i.updatedAt}return null})();const u=(0,_sharedUi.useRelativeTime)(l);const c=u||`N/A (${t.state.submittedAt||0})`;const d=()=>{if(t.state.isPaused){return{status:"Paused",color:_sharedUi.buoyColors.textMuted,icon:(0,_jsxRuntime.jsx)(_svgs.PauseCircle,{})}}switch(t.state.status){case"success":return{status:"Success",color:_sharedUi.buoyColors.success,icon:(0,_jsxRuntime.jsx)(_svgs.CheckCircle,{})};case"error":return{status:"Error",color:_sharedUi.buoyColors.error,icon:(0,_jsxRuntime.jsx)(_svgs.XCircle,{})};case"pending":return{status:"Loading",color:_sharedUi.buoyColors.primary,icon:(0,_jsxRuntime.jsx)(_svgs.LoadingCircle,{})};default:return{status:"Idle",color:_sharedUi.buoyColors.textMuted,icon:null}}};const o=d();const n=getMutationText(t);const r=(0,_testIDs.mutationRowTestID)(t.options.mutationKey,t.mutationId);return(0,_jsxRuntime.jsxs)(_reactNative.TouchableOpacity,{"sentry-label":"ignore devtools mutation button",testID:r,accessibilityRole:"button",accessibilityLabel:`${n}, ${o.status}`,onPress:()=>s(t===e?void 0:t),style:[styles.button,e?.mutationId===t.mutationId&&styles.selected],children:[(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.rowContent,children:[(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.statusSection,children:[(0,_jsxRuntime.jsx)(_reactNative.View,{style:[styles.statusDot,{backgroundColor:o.color}]}),(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.statusInfo,children:[(0,_jsxRuntime.jsx)(_reactNative.Text,{testID:`${r}-status`,style:[styles.statusLabel,{color:o.color}],children:o.status}),(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.submittedText,children:a})]})]}),(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.mutationSection,children:(0,_jsxRuntime.jsx)(_reactNative.Text,{testID:`${r}-key`,style:styles.mutationKey,children:n})})]}),(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.bottomRightContainer,children:(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.bottomRightText,children:c})})]})}const styles=_reactNative.StyleSheet.create({button:{backgroundColor:_sharedUi.night.color.surface,borderRadius:8,borderWidth:1,borderColor:_sharedUi.night.color.border,marginHorizontal:8,marginVertical:3,padding:12},selected:{backgroundColor:_sharedUi.night.color.accentSoft,borderColor:_sharedUi.night.color.accentBorderStrong},rowContent:{flexDirection:"row",alignItems:"center",justifyContent:"space-between"},statusSection:{flexDirection:"row",alignItems:"center",gap:8,flex:1},statusDot:{width:8,height:8,borderRadius:4},statusInfo:{flex:1},statusLabel:{fontSize:11,fontWeight:"600",lineHeight:14},submittedText:{fontSize:10,color:_sharedUi.night.color.textTertiary,marginTop:1},mutationSection:{flex:2,paddingHorizontal:12},mutationKey:{fontFamily:_sharedUi.monoFont,fontSize:12,color:_sharedUi.night.color.text,lineHeight:16},bottomRightContainer:{position:"absolute",bottom:4,right:8},bottomRightText:{fontSize:9,color:_sharedUi.night.color.textTertiary,fontFamily:_sharedUi.monoFont}});
|