@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,270 +1 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
import { View, Text, StyleSheet, ScrollView } from "react-native";
|
|
4
|
-
import { useSafeAreaInsets, night, monoFont } from "@buoy-gg/shared-ui";
|
|
5
|
-
import Explorer from "./query-browser/Explorer";
|
|
6
|
-
import MutationDetails from "./query-browser/MutationDetails";
|
|
7
|
-
import ActionButton from "./query-browser/ActionButton";
|
|
8
|
-
import { useMutationActionButtons } from "../hooks/useMutationActionButtons";
|
|
9
|
-
import { DataViewer } from "@buoy-gg/shared-ui/dataViewer";
|
|
10
|
-
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
11
|
-
/**
|
|
12
|
-
* Mutation-focused editing experience mirroring the query editor layout. Provides mutation detail
|
|
13
|
-
* panels, data inspector, and action buttons for the selected mutation entry.
|
|
14
|
-
*/
|
|
15
|
-
export function MutationEditorMode({
|
|
16
|
-
selectedMutation,
|
|
17
|
-
isFloatingMode,
|
|
18
|
-
disableInternalFooter = false
|
|
19
|
-
}) {
|
|
20
|
-
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
21
|
-
children: [/*#__PURE__*/_jsxs(ScrollView, {
|
|
22
|
-
testID: "buoy-rq-mutation-detail-scroll",
|
|
23
|
-
accessibilityLabel: "Mutation editor mode",
|
|
24
|
-
accessibilityHint: "View mutation editor mode",
|
|
25
|
-
"sentry-label": "ignore mutation editor mode",
|
|
26
|
-
style: styles.explorerScrollContainer,
|
|
27
|
-
contentContainerStyle: styles.explorerScrollContent,
|
|
28
|
-
children: [/*#__PURE__*/_jsxs(View, {
|
|
29
|
-
style: styles.section,
|
|
30
|
-
children: [/*#__PURE__*/_jsx(DataExplorer, {
|
|
31
|
-
visible: !!selectedMutation.state.data,
|
|
32
|
-
selectedMutation: selectedMutation
|
|
33
|
-
}), /*#__PURE__*/_jsx(DataEmptyState, {
|
|
34
|
-
visible: !selectedMutation.state.data,
|
|
35
|
-
selectedMutation: selectedMutation
|
|
36
|
-
})]
|
|
37
|
-
}), /*#__PURE__*/_jsx(View, {
|
|
38
|
-
style: styles.section,
|
|
39
|
-
children: /*#__PURE__*/_jsx(MutationDetails, {
|
|
40
|
-
selectedMutation: selectedMutation
|
|
41
|
-
})
|
|
42
|
-
}), /*#__PURE__*/_jsx(View, {
|
|
43
|
-
style: styles.section,
|
|
44
|
-
children: /*#__PURE__*/_jsxs(View, {
|
|
45
|
-
style: styles.mutationExplorerContainer,
|
|
46
|
-
children: [/*#__PURE__*/_jsx(Text, {
|
|
47
|
-
style: styles.mutationExplorerHeader,
|
|
48
|
-
children: "Mutation Explorer"
|
|
49
|
-
}), /*#__PURE__*/_jsx(View, {
|
|
50
|
-
style: styles.mutationExplorerContent,
|
|
51
|
-
children: /*#__PURE__*/_jsx(DataViewer, {
|
|
52
|
-
title: "",
|
|
53
|
-
data: selectedMutation,
|
|
54
|
-
maxDepth: 10,
|
|
55
|
-
rawMode: true,
|
|
56
|
-
showTypeFilter: true,
|
|
57
|
-
initialExpanded: false
|
|
58
|
-
})
|
|
59
|
-
})]
|
|
60
|
-
})
|
|
61
|
-
})]
|
|
62
|
-
}), !disableInternalFooter && /*#__PURE__*/_jsx(MutationEditorActionsFooter, {
|
|
63
|
-
selectedMutation: selectedMutation,
|
|
64
|
-
isFloatingMode: isFloatingMode
|
|
65
|
-
})]
|
|
66
|
-
});
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
/**
|
|
70
|
-
* Standalone action footer for the mutation editor, so modal wrappers can pin it through
|
|
71
|
-
* JsModal's footer prop (mirrors DataEditorActionsFooter).
|
|
72
|
-
*/
|
|
73
|
-
export function MutationEditorActionsFooter({
|
|
74
|
-
selectedMutation,
|
|
75
|
-
isFloatingMode
|
|
76
|
-
}) {
|
|
77
|
-
const insets = useSafeAreaInsets({
|
|
78
|
-
minBottom: 16
|
|
79
|
-
});
|
|
80
|
-
const actionButtons = useMutationActionButtons(selectedMutation);
|
|
81
|
-
return /*#__PURE__*/_jsx(View, {
|
|
82
|
-
style: [styles.actionFooter, {
|
|
83
|
-
paddingBottom: isFloatingMode ? 0 : insets.bottom + 8
|
|
84
|
-
}],
|
|
85
|
-
children: /*#__PURE__*/_jsx(View, {
|
|
86
|
-
style: styles.actionsGrid,
|
|
87
|
-
children: actionButtons.map((action, index) => /*#__PURE__*/_jsx(ActionButton, {
|
|
88
|
-
testID: `buoy-rq-action-${action.variant}`,
|
|
89
|
-
onClick: action.onPress,
|
|
90
|
-
text: action.label,
|
|
91
|
-
variant: action.variant,
|
|
92
|
-
disabled: action.disabled
|
|
93
|
-
}, index))
|
|
94
|
-
})
|
|
95
|
-
});
|
|
96
|
-
}
|
|
97
|
-
function DataExplorer({
|
|
98
|
-
visible,
|
|
99
|
-
selectedMutation
|
|
100
|
-
}) {
|
|
101
|
-
if (!visible) return null;
|
|
102
|
-
return /*#__PURE__*/_jsxs(View, {
|
|
103
|
-
style: styles.dataContainer,
|
|
104
|
-
children: [/*#__PURE__*/_jsx(Text, {
|
|
105
|
-
style: styles.dataHeader,
|
|
106
|
-
children: "Data Editor"
|
|
107
|
-
}), /*#__PURE__*/_jsx(View, {
|
|
108
|
-
style: styles.dataContent,
|
|
109
|
-
children: /*#__PURE__*/_jsx(Explorer, {
|
|
110
|
-
editable: true,
|
|
111
|
-
label: "Data",
|
|
112
|
-
value: selectedMutation.state.data,
|
|
113
|
-
defaultExpanded: ["Data"]
|
|
114
|
-
}, selectedMutation.mutationId)
|
|
115
|
-
})]
|
|
116
|
-
});
|
|
117
|
-
}
|
|
118
|
-
function DataEmptyState({
|
|
119
|
-
visible,
|
|
120
|
-
selectedMutation
|
|
121
|
-
}) {
|
|
122
|
-
if (!visible) return null;
|
|
123
|
-
const getEmptyStateContent = () => {
|
|
124
|
-
if (selectedMutation.state.status === "pending") {
|
|
125
|
-
return {
|
|
126
|
-
title: "Pending...",
|
|
127
|
-
description: "The mutation is in progress."
|
|
128
|
-
};
|
|
129
|
-
}
|
|
130
|
-
if (selectedMutation.state.status === "error") {
|
|
131
|
-
return {
|
|
132
|
-
title: "Mutation Error",
|
|
133
|
-
description: selectedMutation.state.error?.message || "An error occurred."
|
|
134
|
-
};
|
|
135
|
-
}
|
|
136
|
-
return {
|
|
137
|
-
title: "No Data Available",
|
|
138
|
-
description: "This mutation has no data."
|
|
139
|
-
};
|
|
140
|
-
};
|
|
141
|
-
const {
|
|
142
|
-
title,
|
|
143
|
-
description
|
|
144
|
-
} = getEmptyStateContent();
|
|
145
|
-
return /*#__PURE__*/_jsxs(View, {
|
|
146
|
-
style: styles.emptyState,
|
|
147
|
-
children: [/*#__PURE__*/_jsx(Text, {
|
|
148
|
-
testID: "buoy-rq-mutation-detail-empty-title",
|
|
149
|
-
style: styles.emptyTitle,
|
|
150
|
-
children: title
|
|
151
|
-
}), /*#__PURE__*/_jsx(Text, {
|
|
152
|
-
testID: "buoy-rq-mutation-detail-empty-description",
|
|
153
|
-
style: styles.emptyDescription,
|
|
154
|
-
children: description
|
|
155
|
-
})]
|
|
156
|
-
});
|
|
157
|
-
}
|
|
158
|
-
const styles = StyleSheet.create({
|
|
159
|
-
explorerScrollContainer: {
|
|
160
|
-
flex: 1
|
|
161
|
-
},
|
|
162
|
-
explorerScrollContent: {
|
|
163
|
-
paddingBottom: 16,
|
|
164
|
-
paddingHorizontal: 8,
|
|
165
|
-
flexGrow: 1
|
|
166
|
-
},
|
|
167
|
-
section: {
|
|
168
|
-
marginBottom: 16
|
|
169
|
-
},
|
|
170
|
-
emptyState: {
|
|
171
|
-
flex: 1,
|
|
172
|
-
justifyContent: "center",
|
|
173
|
-
alignItems: "center",
|
|
174
|
-
padding: 32
|
|
175
|
-
},
|
|
176
|
-
emptyTitle: {
|
|
177
|
-
color: night.color.text,
|
|
178
|
-
fontSize: 18,
|
|
179
|
-
fontWeight: "600",
|
|
180
|
-
marginBottom: 8,
|
|
181
|
-
textAlign: "center"
|
|
182
|
-
},
|
|
183
|
-
emptyDescription: {
|
|
184
|
-
color: night.color.textSecondary,
|
|
185
|
-
fontSize: 14,
|
|
186
|
-
textAlign: "center",
|
|
187
|
-
lineHeight: 20,
|
|
188
|
-
maxWidth: 280
|
|
189
|
-
},
|
|
190
|
-
actionFooter: {
|
|
191
|
-
borderTopWidth: 1,
|
|
192
|
-
borderTopColor: night.color.border,
|
|
193
|
-
paddingVertical: 8,
|
|
194
|
-
paddingHorizontal: 12,
|
|
195
|
-
// Transparent so the night sheet's star field shows through.
|
|
196
|
-
backgroundColor: "transparent",
|
|
197
|
-
borderBottomLeftRadius: 14,
|
|
198
|
-
borderBottomRightRadius: 14
|
|
199
|
-
},
|
|
200
|
-
actionsGrid: {
|
|
201
|
-
flexDirection: "row",
|
|
202
|
-
flexWrap: "wrap",
|
|
203
|
-
gap: 6,
|
|
204
|
-
justifyContent: "space-between"
|
|
205
|
-
},
|
|
206
|
-
// Mutation Explorer styled container matching QueryDetails
|
|
207
|
-
mutationExplorerContainer: {
|
|
208
|
-
minWidth: 200,
|
|
209
|
-
backgroundColor: night.color.surface,
|
|
210
|
-
borderRadius: 6,
|
|
211
|
-
borderWidth: 1,
|
|
212
|
-
borderColor: night.color.accent + "4D",
|
|
213
|
-
overflow: "hidden",
|
|
214
|
-
shadowColor: night.color.accent,
|
|
215
|
-
shadowOffset: {
|
|
216
|
-
width: 0,
|
|
217
|
-
height: 0
|
|
218
|
-
},
|
|
219
|
-
shadowOpacity: 0.1,
|
|
220
|
-
shadowRadius: 6
|
|
221
|
-
},
|
|
222
|
-
mutationExplorerHeader: {
|
|
223
|
-
backgroundColor: night.color.accent + "1A",
|
|
224
|
-
paddingHorizontal: 12,
|
|
225
|
-
paddingVertical: 10,
|
|
226
|
-
fontWeight: "600",
|
|
227
|
-
fontSize: 12,
|
|
228
|
-
color: night.color.accent,
|
|
229
|
-
borderBottomWidth: 1,
|
|
230
|
-
borderBottomColor: night.color.accent + "33",
|
|
231
|
-
letterSpacing: 0.5,
|
|
232
|
-
textTransform: "uppercase",
|
|
233
|
-
fontFamily: monoFont
|
|
234
|
-
},
|
|
235
|
-
mutationExplorerContent: {
|
|
236
|
-
padding: 8
|
|
237
|
-
},
|
|
238
|
-
// Data section matching query editor theme for consistency
|
|
239
|
-
dataContainer: {
|
|
240
|
-
minWidth: 200,
|
|
241
|
-
backgroundColor: night.color.surface,
|
|
242
|
-
borderRadius: 6,
|
|
243
|
-
borderWidth: 1,
|
|
244
|
-
borderColor: night.color.accent + "4D",
|
|
245
|
-
overflow: "hidden",
|
|
246
|
-
shadowColor: night.color.accent,
|
|
247
|
-
shadowOffset: {
|
|
248
|
-
width: 0,
|
|
249
|
-
height: 0
|
|
250
|
-
},
|
|
251
|
-
shadowOpacity: 0.1,
|
|
252
|
-
shadowRadius: 6
|
|
253
|
-
},
|
|
254
|
-
dataHeader: {
|
|
255
|
-
backgroundColor: night.color.accent + "1A",
|
|
256
|
-
paddingHorizontal: 12,
|
|
257
|
-
paddingVertical: 10,
|
|
258
|
-
fontWeight: "600",
|
|
259
|
-
fontSize: 12,
|
|
260
|
-
color: night.color.accent,
|
|
261
|
-
borderBottomWidth: 1,
|
|
262
|
-
borderBottomColor: night.color.accent + "33",
|
|
263
|
-
letterSpacing: 0.5,
|
|
264
|
-
textTransform: "uppercase",
|
|
265
|
-
fontFamily: monoFont
|
|
266
|
-
},
|
|
267
|
-
dataContent: {
|
|
268
|
-
padding: 8
|
|
269
|
-
}
|
|
270
|
-
});
|
|
1
|
+
"use strict";import{View as n,Text as s,StyleSheet as u,ScrollView as h}from"react-native";import{useSafeAreaInsets as f,night as e,monoFont as p}from"@buoy-gg/shared-ui";import y from"./query-browser/Explorer";import g from"./query-browser/MutationDetails";import b from"./query-browser/ActionButton";import{useMutationActionButtons as x}from"../hooks/useMutationActionButtons";import{DataViewer as C}from"@buoy-gg/shared-ui/dataViewer";import{jsx as t,jsxs as l,Fragment as w}from"react/jsx-runtime";export function MutationEditorMode({selectedMutation:r,isFloatingMode:i,disableInternalFooter:d=false}){return l(w,{children:[l(h,{testID:"buoy-rq-mutation-detail-scroll",accessibilityLabel:"Mutation editor mode",accessibilityHint:"View mutation editor mode","sentry-label":"ignore mutation editor mode",style:o.explorerScrollContainer,contentContainerStyle:o.explorerScrollContent,children:[l(n,{style:o.section,children:[t(S,{visible:!!r.state.data,selectedMutation:r}),t(D,{visible:!r.state.data,selectedMutation:r})]}),t(n,{style:o.section,children:t(g,{selectedMutation:r})}),t(n,{style:o.section,children:l(n,{style:o.mutationExplorerContainer,children:[t(s,{style:o.mutationExplorerHeader,children:"Mutation Explorer"}),t(n,{style:o.mutationExplorerContent,children:t(C,{title:"",data:r,maxDepth:10,rawMode:true,showTypeFilter:true,initialExpanded:false})})]})})]}),!d&&t(MutationEditorActionsFooter,{selectedMutation:r,isFloatingMode:i})]})}export function MutationEditorActionsFooter({selectedMutation:r,isFloatingMode:i}){const d=f({minBottom:16});const c=x(r);return t(n,{style:[o.actionFooter,{paddingBottom:i?0:d.bottom+8}],children:t(n,{style:o.actionsGrid,children:c.map((a,m)=>t(b,{testID:`buoy-rq-action-${a.variant}`,onClick:a.onPress,text:a.label,variant:a.variant,disabled:a.disabled},m))})})}function S({visible:r,selectedMutation:i}){if(!r)return null;return l(n,{style:o.dataContainer,children:[t(s,{style:o.dataHeader,children:"Data Editor"}),t(n,{style:o.dataContent,children:t(y,{editable:true,label:"Data",value:i.state.data,defaultExpanded:["Data"]},i.mutationId)})]})}function D({visible:r,selectedMutation:i}){if(!r)return null;const d=()=>{if(i.state.status==="pending"){return{title:"Pending...",description:"The mutation is in progress."}}if(i.state.status==="error"){return{title:"Mutation Error",description:i.state.error?.message||"An error occurred."}}return{title:"No Data Available",description:"This mutation has no data."}};const{title:c,description:a}=d();return l(n,{style:o.emptyState,children:[t(s,{testID:"buoy-rq-mutation-detail-empty-title",style:o.emptyTitle,children:c}),t(s,{testID:"buoy-rq-mutation-detail-empty-description",style:o.emptyDescription,children:a})]})}const o=u.create({explorerScrollContainer:{flex:1},explorerScrollContent:{paddingBottom:16,paddingHorizontal:8,flexGrow:1},section:{marginBottom:16},emptyState:{flex:1,justifyContent:"center",alignItems:"center",padding:32},emptyTitle:{color:e.color.text,fontSize:18,fontWeight:"600",marginBottom:8,textAlign:"center"},emptyDescription:{color:e.color.textSecondary,fontSize:14,textAlign:"center",lineHeight:20,maxWidth:280},actionFooter:{borderTopWidth:1,borderTopColor:e.color.border,paddingVertical:8,paddingHorizontal:12,backgroundColor:"transparent",borderBottomLeftRadius:14,borderBottomRightRadius:14},actionsGrid:{flexDirection:"row",flexWrap:"wrap",gap:6,justifyContent:"space-between"},mutationExplorerContainer:{minWidth:200,backgroundColor:e.color.surface,borderRadius:6,borderWidth:1,borderColor:e.color.accent+"4D",overflow:"hidden",shadowColor:e.color.accent,shadowOffset:{width:0,height:0},shadowOpacity:.1,shadowRadius:6},mutationExplorerHeader:{backgroundColor:e.color.accent+"1A",paddingHorizontal:12,paddingVertical:10,fontWeight:"600",fontSize:12,color:e.color.accent,borderBottomWidth:1,borderBottomColor:e.color.accent+"33",letterSpacing:.5,textTransform:"uppercase",fontFamily:p},mutationExplorerContent:{padding:8},dataContainer:{minWidth:200,backgroundColor:e.color.surface,borderRadius:6,borderWidth:1,borderColor:e.color.accent+"4D",overflow:"hidden",shadowColor:e.color.accent,shadowOffset:{width:0,height:0},shadowOpacity:.1,shadowRadius:6},dataHeader:{backgroundColor:e.color.accent+"1A",paddingHorizontal:12,paddingVertical:10,fontWeight:"600",fontSize:12,color:e.color.accent,borderBottomWidth:1,borderBottomColor:e.color.accent+"33",letterSpacing:.5,textTransform:"uppercase",fontFamily:p},dataContent:{padding:8}});
|
|
@@ -1,94 +1 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
import { resolveListEmptyState } from "@buoy-gg/shared-ui";
|
|
4
|
-
import { View, StyleSheet } from "react-native";
|
|
5
|
-
import { useMemo } from "react";
|
|
6
|
-
import { QueryBrowser } from "./query-browser/index";
|
|
7
|
-
import { FilterStatusBadge } from "./FilterStatusBadge";
|
|
8
|
-
import useAllQueries from "../hooks/useAllQueries";
|
|
9
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
10
|
-
/** Wrapper around the query list experience used inside the modal view. */
|
|
11
|
-
export function QueryBrowserMode({
|
|
12
|
-
selectedQuery,
|
|
13
|
-
onQuerySelect,
|
|
14
|
-
activeFilter,
|
|
15
|
-
searchText = "",
|
|
16
|
-
ignoredPatterns = new Set(),
|
|
17
|
-
includedPatterns = new Set(),
|
|
18
|
-
onFilterPress
|
|
19
|
-
}) {
|
|
20
|
-
const hasIncludeFilters = includedPatterns.size > 0;
|
|
21
|
-
const hasExcludeFilters = ignoredPatterns.size > 0;
|
|
22
|
-
const allQueries = useAllQueries();
|
|
23
|
-
|
|
24
|
-
// Calculate filtered count for the badge
|
|
25
|
-
const filteredCount = useMemo(() => {
|
|
26
|
-
let filtered = allQueries;
|
|
27
|
-
|
|
28
|
-
// Apply included patterns filter
|
|
29
|
-
if (includedPatterns.size > 0) {
|
|
30
|
-
filtered = filtered.filter(query => {
|
|
31
|
-
if (!query?.queryKey) return false;
|
|
32
|
-
const keys = Array.isArray(query.queryKey) ? query.queryKey : [query.queryKey];
|
|
33
|
-
const keyString = keys.filter(k => k != null).map(k => String(k)).join(" ").toLowerCase();
|
|
34
|
-
return Array.from(includedPatterns).some(pattern => keyString.includes(pattern.toLowerCase()));
|
|
35
|
-
});
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
// Apply ignored patterns filter
|
|
39
|
-
if (ignoredPatterns.size > 0) {
|
|
40
|
-
filtered = filtered.filter(query => {
|
|
41
|
-
if (!query?.queryKey) return true;
|
|
42
|
-
const keys = Array.isArray(query.queryKey) ? query.queryKey : [query.queryKey];
|
|
43
|
-
const keyString = keys.filter(k => k != null).map(k => String(k)).join(" ").toLowerCase();
|
|
44
|
-
return !Array.from(ignoredPatterns).some(pattern => keyString.includes(pattern.toLowerCase()));
|
|
45
|
-
});
|
|
46
|
-
}
|
|
47
|
-
return filtered.length;
|
|
48
|
-
}, [allQueries, includedPatterns, ignoredPatterns]);
|
|
49
|
-
return /*#__PURE__*/_jsxs(View, {
|
|
50
|
-
style: styles.queryListContainer,
|
|
51
|
-
children: [(hasIncludeFilters || hasExcludeFilters) && /*#__PURE__*/_jsx(FilterStatusBadge, {
|
|
52
|
-
totalCount: allQueries.length,
|
|
53
|
-
filteredCount: filteredCount,
|
|
54
|
-
onPress: onFilterPress
|
|
55
|
-
}), /*#__PURE__*/_jsx(QueryBrowser, {
|
|
56
|
-
selectedQuery: selectedQuery,
|
|
57
|
-
onQuerySelect: onQuerySelect,
|
|
58
|
-
activeFilter: activeFilter,
|
|
59
|
-
searchText: searchText,
|
|
60
|
-
ignoredPatterns: ignoredPatterns,
|
|
61
|
-
includedPatterns: includedPatterns,
|
|
62
|
-
emptyState: resolveListEmptyState({
|
|
63
|
-
subject: "queries",
|
|
64
|
-
verb: "active",
|
|
65
|
-
search: searchText,
|
|
66
|
-
total: allQueries.length,
|
|
67
|
-
// Include/exclude patterns and the status filter are all "your
|
|
68
|
-
// filters hid it", but each names the control that undoes it.
|
|
69
|
-
blocked: activeFilter ? `No ${activeFilter} queries. Pick another status to see the rest.` : hasIncludeFilters ? `No queries match your "include only" filters. ${includedPatterns.size} pattern(s) active.` : hasExcludeFilters ? `No queries match the current filters. ${ignoredPatterns.size} pattern(s) excluded.` : undefined,
|
|
70
|
-
waiting: {
|
|
71
|
-
// scanning = the cache was inspected and came back empty; this is
|
|
72
|
-
// a setup problem, not a stream that has not started.
|
|
73
|
-
otto: "scanning",
|
|
74
|
-
title: "No queries found",
|
|
75
|
-
message: "No React Query queries are currently active.\n\nTo see queries here:\n• Make API calls using useQuery\n• Ensure queries are within QueryClientProvider\n• Check console for debugging info"
|
|
76
|
-
}
|
|
77
|
-
}),
|
|
78
|
-
contentContainerStyle: styles.queryListContent
|
|
79
|
-
})]
|
|
80
|
-
});
|
|
81
|
-
}
|
|
82
|
-
const styles = StyleSheet.create({
|
|
83
|
-
queryListContainer: {
|
|
84
|
-
flex: 1,
|
|
85
|
-
// Transparent so JsModal's ToolBackground shows through (the modal paints opaque base beneath it).
|
|
86
|
-
backgroundColor: "transparent"
|
|
87
|
-
},
|
|
88
|
-
queryListContent: {
|
|
89
|
-
padding: 8,
|
|
90
|
-
// Transparent so JsModal's ToolBackground shows through (the modal paints opaque base beneath it).
|
|
91
|
-
backgroundColor: "transparent",
|
|
92
|
-
flexGrow: 1
|
|
93
|
-
}
|
|
94
|
-
});
|
|
1
|
+
"use strict";import{resolveListEmptyState as q}from"@buoy-gg/shared-ui";import{View as S,StyleSheet as d}from"react-native";import{useMemo as w}from"react";import{QueryBrowser as k}from"./query-browser/index";import{FilterStatusBadge as x}from"./FilterStatusBadge";import L from"../hooks/useAllQueries";import{jsx as f,jsxs as Q}from"react/jsx-runtime";export function QueryBrowserMode({selectedQuery:p,onQuerySelect:h,activeFilter:n,searchText:a="",ignoredPatterns:t=new Set,includedPatterns:s=new Set,onFilterPress:C}){const y=s.size>0;const c=t.size>0;const i=L();const g=w(()=>{let o=i;if(s.size>0){o=o.filter(r=>{if(!r?.queryKey)return false;const u=Array.isArray(r.queryKey)?r.queryKey:[r.queryKey];const l=u.filter(e=>e!=null).map(e=>String(e)).join(" ").toLowerCase();return Array.from(s).some(e=>l.includes(e.toLowerCase()))})}if(t.size>0){o=o.filter(r=>{if(!r?.queryKey)return true;const u=Array.isArray(r.queryKey)?r.queryKey:[r.queryKey];const l=u.filter(e=>e!=null).map(e=>String(e)).join(" ").toLowerCase();return!Array.from(t).some(e=>l.includes(e.toLowerCase()))})}return o.length},[i,s,t]);return Q(S,{style:m.queryListContainer,children:[(y||c)&&f(x,{totalCount:i.length,filteredCount:g,onPress:C}),f(k,{selectedQuery:p,onQuerySelect:h,activeFilter:n,searchText:a,ignoredPatterns:t,includedPatterns:s,emptyState:q({subject:"queries",verb:"active",search:a,total:i.length,blocked:n?`No ${n} queries. Pick another status to see the rest.`:y?`No queries match your "include only" filters. ${s.size} pattern(s) active.`:c?`No queries match the current filters. ${t.size} pattern(s) excluded.`:void 0,waiting:{otto:"scanning",title:"No queries found",message:"No React Query queries are currently active.\n\nTo see queries here:\n\u2022 Make API calls using useQuery\n\u2022 Ensure queries are within QueryClientProvider\n\u2022 Check console for debugging info"}}),contentContainerStyle:m.queryListContent})]})}const m=d.create({queryListContainer:{flex:1,backgroundColor:"transparent"},queryListContent:{padding:8,backgroundColor:"transparent",flexGrow:1}});
|
|
@@ -1,104 +1 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
import { View, Text, StyleSheet } from "react-native";
|
|
4
|
-
import { useQueryClient } from "@tanstack/react-query";
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* Lightweight debug panel that surfaces high-level QueryClient information and recently seen
|
|
8
|
-
* query keys. Intended primarily for the React Query dev tools modal.
|
|
9
|
-
*/
|
|
10
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
11
|
-
export function QueryDebugInfo() {
|
|
12
|
-
try {
|
|
13
|
-
const queryClient = useQueryClient();
|
|
14
|
-
const queries = queryClient.getQueryCache().getAll();
|
|
15
|
-
const mutations = queryClient.getMutationCache().getAll();
|
|
16
|
-
return /*#__PURE__*/_jsxs(View, {
|
|
17
|
-
style: styles.container,
|
|
18
|
-
children: [/*#__PURE__*/_jsx(Text, {
|
|
19
|
-
style: styles.title,
|
|
20
|
-
children: "Debug Info"
|
|
21
|
-
}), /*#__PURE__*/_jsx(Text, {
|
|
22
|
-
style: styles.info,
|
|
23
|
-
children: "QueryClient: \u2705 Available"
|
|
24
|
-
}), /*#__PURE__*/_jsxs(Text, {
|
|
25
|
-
style: styles.info,
|
|
26
|
-
children: ["Queries: ", queries.length]
|
|
27
|
-
}), /*#__PURE__*/_jsxs(Text, {
|
|
28
|
-
style: styles.info,
|
|
29
|
-
children: ["Mutations: ", mutations.length]
|
|
30
|
-
}), queries.length > 0 && /*#__PURE__*/_jsxs(View, {
|
|
31
|
-
style: styles.queriesList,
|
|
32
|
-
children: [/*#__PURE__*/_jsx(Text, {
|
|
33
|
-
style: styles.subtitle,
|
|
34
|
-
children: "Query Keys:"
|
|
35
|
-
}), queries.slice(0, 3).map((query, index) => /*#__PURE__*/_jsxs(Text, {
|
|
36
|
-
style: styles.queryKey,
|
|
37
|
-
children: ["\u2022", " ", Array.isArray(query.queryKey) ? query.queryKey.join(" - ") : String(query.queryKey)]
|
|
38
|
-
}, index)), queries.length > 3 && /*#__PURE__*/_jsxs(Text, {
|
|
39
|
-
style: styles.more,
|
|
40
|
-
children: ["... and ", queries.length - 3, " more"]
|
|
41
|
-
})]
|
|
42
|
-
})]
|
|
43
|
-
});
|
|
44
|
-
} catch (error) {
|
|
45
|
-
return /*#__PURE__*/_jsxs(View, {
|
|
46
|
-
style: styles.container,
|
|
47
|
-
children: [/*#__PURE__*/_jsx(Text, {
|
|
48
|
-
style: styles.title,
|
|
49
|
-
children: "Debug Info"
|
|
50
|
-
}), /*#__PURE__*/_jsxs(Text, {
|
|
51
|
-
style: styles.error,
|
|
52
|
-
children: ["\u274C QueryClient Error: ", String(error)]
|
|
53
|
-
})]
|
|
54
|
-
});
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
const styles = StyleSheet.create({
|
|
58
|
-
container: {
|
|
59
|
-
padding: 16,
|
|
60
|
-
backgroundColor: "rgba(0, 0, 0, 0.3)",
|
|
61
|
-
borderRadius: 8,
|
|
62
|
-
margin: 16,
|
|
63
|
-
borderWidth: 1,
|
|
64
|
-
borderColor: "rgba(255, 255, 255, 0.1)"
|
|
65
|
-
},
|
|
66
|
-
title: {
|
|
67
|
-
color: "#FFFFFF",
|
|
68
|
-
fontSize: 14,
|
|
69
|
-
fontWeight: "600",
|
|
70
|
-
marginBottom: 8
|
|
71
|
-
},
|
|
72
|
-
subtitle: {
|
|
73
|
-
color: "#E5E7EB",
|
|
74
|
-
fontSize: 12,
|
|
75
|
-
fontWeight: "500",
|
|
76
|
-
marginTop: 8,
|
|
77
|
-
marginBottom: 4
|
|
78
|
-
},
|
|
79
|
-
info: {
|
|
80
|
-
color: "#9CA3AF",
|
|
81
|
-
fontSize: 12,
|
|
82
|
-
marginBottom: 4
|
|
83
|
-
},
|
|
84
|
-
error: {
|
|
85
|
-
color: "#EF4444",
|
|
86
|
-
fontSize: 12,
|
|
87
|
-
marginBottom: 4
|
|
88
|
-
},
|
|
89
|
-
queriesList: {
|
|
90
|
-
marginTop: 4
|
|
91
|
-
},
|
|
92
|
-
queryKey: {
|
|
93
|
-
color: "#60A5FA",
|
|
94
|
-
fontSize: 11,
|
|
95
|
-
marginLeft: 8,
|
|
96
|
-
marginBottom: 2
|
|
97
|
-
},
|
|
98
|
-
more: {
|
|
99
|
-
color: "#9CA3AF",
|
|
100
|
-
fontSize: 11,
|
|
101
|
-
fontStyle: "italic",
|
|
102
|
-
marginLeft: 8
|
|
103
|
-
}
|
|
104
|
-
});
|
|
1
|
+
"use strict";import{View as s,Text as t,StyleSheet as y}from"react-native";import{useQueryClient as u}from"@tanstack/react-query";import{jsx as n,jsxs as r}from"react/jsx-runtime";export function QueryDebugInfo(){try{const i=u();const o=i.getQueryCache().getAll();const c=i.getMutationCache().getAll();return r(s,{style:e.container,children:[n(t,{style:e.title,children:"Debug Info"}),n(t,{style:e.info,children:"QueryClient: \u2705 Available"}),r(t,{style:e.info,children:["Queries: ",o.length]}),r(t,{style:e.info,children:["Mutations: ",c.length]}),o.length>0&&r(s,{style:e.queriesList,children:[n(t,{style:e.subtitle,children:"Query Keys:"}),o.slice(0,3).map((l,a)=>r(t,{style:e.queryKey,children:["\u2022"," ",Array.isArray(l.queryKey)?l.queryKey.join(" - "):String(l.queryKey)]},a)),o.length>3&&r(t,{style:e.more,children:["... and ",o.length-3," more"]})]})]})}catch(i){return r(s,{style:e.container,children:[n(t,{style:e.title,children:"Debug Info"}),r(t,{style:e.error,children:["\u274C QueryClient Error: ",String(i)]})]})}}const e=y.create({container:{padding:16,backgroundColor:"rgba(0, 0, 0, 0.3)",borderRadius:8,margin:16,borderWidth:1,borderColor:"rgba(255, 255, 255, 0.1)"},title:{color:"#FFFFFF",fontSize:14,fontWeight:"600",marginBottom:8},subtitle:{color:"#E5E7EB",fontSize:12,fontWeight:"500",marginTop:8,marginBottom:4},info:{color:"#9CA3AF",fontSize:12,marginBottom:4},error:{color:"#EF4444",fontSize:12,marginBottom:4},queriesList:{marginTop:4},queryKey:{color:"#60A5FA",fontSize:11,marginLeft:8,marginBottom:2},more:{color:"#9CA3AF",fontSize:11,fontStyle:"italic",marginLeft:8}});
|