@buoy-gg/react-query 1.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +389 -0
- package/lib/commonjs/index.js +107 -0
- package/lib/commonjs/package.json +1 -0
- package/lib/commonjs/preset.js +220 -0
- package/lib/commonjs/react-query/ReactQueryDevTools.js +335 -0
- package/lib/commonjs/react-query/components/DataEditorMode.js +316 -0
- package/lib/commonjs/react-query/components/FilterStatusBadge.js +51 -0
- package/lib/commonjs/react-query/components/MutationBrowserMode.js +51 -0
- package/lib/commonjs/react-query/components/MutationEditorMode.js +257 -0
- package/lib/commonjs/react-query/components/QueryBrowserMode.js +82 -0
- package/lib/commonjs/react-query/components/QueryDebugInfo.js +107 -0
- package/lib/commonjs/react-query/components/QueryFilterViewV3.js +221 -0
- package/lib/commonjs/react-query/components/QuerySelector.js +208 -0
- package/lib/commonjs/react-query/components/ReactQueryDevToolsModal.js +76 -0
- package/lib/commonjs/react-query/components/ReactQuerySection.js +47 -0
- package/lib/commonjs/react-query/components/WifiToggle.js +49 -0
- package/lib/commonjs/react-query/components/index.js +253 -0
- package/lib/commonjs/react-query/components/modals/DataEditorModal.js +70 -0
- package/lib/commonjs/react-query/components/modals/MutationBrowserFooter.js +69 -0
- package/lib/commonjs/react-query/components/modals/MutationBrowserModal.js +146 -0
- package/lib/commonjs/react-query/components/modals/MutationEditorModal.js +58 -0
- package/lib/commonjs/react-query/components/modals/QueryBrowserFooter.js +63 -0
- package/lib/commonjs/react-query/components/modals/QueryBrowserModal.js +237 -0
- package/lib/commonjs/react-query/components/modals/ReactQueryModal.js +83 -0
- package/lib/commonjs/react-query/components/modals/ReactQueryModalHeader.js +171 -0
- package/lib/commonjs/react-query/components/modals/SwipeIndicator.js +204 -0
- package/lib/commonjs/react-query/components/query-browser/ActionButton.js +127 -0
- package/lib/commonjs/react-query/components/query-browser/ClearCacheButton.js +53 -0
- package/lib/commonjs/react-query/components/query-browser/Explorer.js +985 -0
- package/lib/commonjs/react-query/components/query-browser/MutationButton.js +184 -0
- package/lib/commonjs/react-query/components/query-browser/MutationDetails.js +122 -0
- package/lib/commonjs/react-query/components/query-browser/MutationDetailsChips.js +66 -0
- package/lib/commonjs/react-query/components/query-browser/MutationInformation.js +117 -0
- package/lib/commonjs/react-query/components/query-browser/MutationStatusCount.js +111 -0
- package/lib/commonjs/react-query/components/query-browser/MutationsList.js +212 -0
- package/lib/commonjs/react-query/components/query-browser/NetworkToggleButton.js +54 -0
- package/lib/commonjs/react-query/components/query-browser/QueryActions.js +138 -0
- package/lib/commonjs/react-query/components/query-browser/QueryBrowser.js +146 -0
- package/lib/commonjs/react-query/components/query-browser/QueryDetails.js +137 -0
- package/lib/commonjs/react-query/components/query-browser/QueryDetailsChip.js +76 -0
- package/lib/commonjs/react-query/components/query-browser/QueryInformation.js +94 -0
- package/lib/commonjs/react-query/components/query-browser/QueryRow.js +93 -0
- package/lib/commonjs/react-query/components/query-browser/QueryStatus.js +125 -0
- package/lib/commonjs/react-query/components/query-browser/QueryStatusCount.js +130 -0
- package/lib/commonjs/react-query/components/query-browser/StorageStatusCount.js +106 -0
- package/lib/commonjs/react-query/components/query-browser/index.js +170 -0
- package/lib/commonjs/react-query/components/query-browser/svgs.js +74 -0
- package/lib/commonjs/react-query/hooks/index.js +96 -0
- package/lib/commonjs/react-query/hooks/useActionButtons.js +59 -0
- package/lib/commonjs/react-query/hooks/useAllMutations.js +35 -0
- package/lib/commonjs/react-query/hooks/useAllQueries.js +117 -0
- package/lib/commonjs/react-query/hooks/useModalManager.js +178 -0
- package/lib/commonjs/react-query/hooks/useModalPersistence.js +71 -0
- package/lib/commonjs/react-query/hooks/useMutationActionButtons.js +22 -0
- package/lib/commonjs/react-query/hooks/useQueryStatusCounts.js +110 -0
- package/lib/commonjs/react-query/hooks/useReactQueryState.js +24 -0
- package/lib/commonjs/react-query/hooks/useSelectedMutation.js +30 -0
- package/lib/commonjs/react-query/hooks/useSelectedQuery.js +96 -0
- package/lib/commonjs/react-query/hooks/useStorageQueryCounts.js +28 -0
- package/lib/commonjs/react-query/hooks/useWifiState.js +67 -0
- package/lib/commonjs/react-query/index.js +16 -0
- package/lib/commonjs/react-query/types/index.js +16 -0
- package/lib/commonjs/react-query/types/types.js +14 -0
- package/lib/commonjs/react-query/utils/actions/deleteItem.js +23 -0
- package/lib/commonjs/react-query/utils/actions/invalidate.js +13 -0
- package/lib/commonjs/react-query/utils/actions/refetch.js +15 -0
- package/lib/commonjs/react-query/utils/actions/remove.js +12 -0
- package/lib/commonjs/react-query/utils/actions/reset.js +15 -0
- package/lib/commonjs/react-query/utils/actions/triggerError.js +30 -0
- package/lib/commonjs/react-query/utils/actions/triggerLoading.js +51 -0
- package/lib/commonjs/react-query/utils/deleteNestedDataByPath.js +56 -0
- package/lib/commonjs/react-query/utils/formatRelativeTime.js +29 -0
- package/lib/commonjs/react-query/utils/getQueryStatusColor.js +16 -0
- package/lib/commonjs/react-query/utils/getQueryStatusLabel.js +17 -0
- package/lib/commonjs/react-query/utils/getStorageQueryCounts.js +35 -0
- package/lib/commonjs/react-query/utils/index.js +170 -0
- package/lib/commonjs/react-query/utils/modalStorageOperations.js +127 -0
- package/lib/commonjs/react-query/utils/storageQueryUtils.js +149 -0
- package/lib/commonjs/react-query/utils/updateNestedDataByPath.js +61 -0
- package/lib/module/index.js +19 -0
- package/lib/module/preset.js +216 -0
- package/lib/module/react-query/ReactQueryDevTools.js +68 -0
- package/lib/module/react-query/components/DataEditorMode.js +310 -0
- package/lib/module/react-query/components/FilterStatusBadge.js +47 -0
- package/lib/module/react-query/components/MutationBrowserMode.js +46 -0
- package/lib/module/react-query/components/MutationEditorMode.js +252 -0
- package/lib/module/react-query/components/QueryBrowserMode.js +77 -0
- package/lib/module/react-query/components/QueryDebugInfo.js +104 -0
- package/lib/module/react-query/components/QueryFilterViewV3.js +218 -0
- package/lib/module/react-query/components/QuerySelector.js +204 -0
- package/lib/module/react-query/components/ReactQueryDevToolsModal.js +72 -0
- package/lib/module/react-query/components/ReactQuerySection.js +43 -0
- package/lib/module/react-query/components/WifiToggle.js +46 -0
- package/lib/module/react-query/components/index.js +29 -0
- package/lib/module/react-query/components/modals/DataEditorModal.js +66 -0
- package/lib/module/react-query/components/modals/MutationBrowserFooter.js +64 -0
- package/lib/module/react-query/components/modals/MutationBrowserModal.js +143 -0
- package/lib/module/react-query/components/modals/MutationEditorModal.js +54 -0
- package/lib/module/react-query/components/modals/QueryBrowserFooter.js +58 -0
- package/lib/module/react-query/components/modals/QueryBrowserModal.js +233 -0
- package/lib/module/react-query/components/modals/ReactQueryModal.js +79 -0
- package/lib/module/react-query/components/modals/ReactQueryModalHeader.js +167 -0
- package/lib/module/react-query/components/modals/SwipeIndicator.js +200 -0
- package/lib/module/react-query/components/query-browser/ActionButton.js +124 -0
- package/lib/module/react-query/components/query-browser/ClearCacheButton.js +49 -0
- package/lib/module/react-query/components/query-browser/Explorer.js +983 -0
- package/lib/module/react-query/components/query-browser/MutationButton.js +180 -0
- package/lib/module/react-query/components/query-browser/MutationDetails.js +117 -0
- package/lib/module/react-query/components/query-browser/MutationDetailsChips.js +62 -0
- package/lib/module/react-query/components/query-browser/MutationInformation.js +112 -0
- package/lib/module/react-query/components/query-browser/MutationStatusCount.js +106 -0
- package/lib/module/react-query/components/query-browser/MutationsList.js +207 -0
- package/lib/module/react-query/components/query-browser/NetworkToggleButton.js +50 -0
- package/lib/module/react-query/components/query-browser/QueryActions.js +133 -0
- package/lib/module/react-query/components/query-browser/QueryBrowser.js +141 -0
- package/lib/module/react-query/components/query-browser/QueryDetails.js +132 -0
- package/lib/module/react-query/components/query-browser/QueryDetailsChip.js +72 -0
- package/lib/module/react-query/components/query-browser/QueryInformation.js +89 -0
- package/lib/module/react-query/components/query-browser/QueryRow.js +89 -0
- package/lib/module/react-query/components/query-browser/QueryStatus.js +121 -0
- package/lib/module/react-query/components/query-browser/QueryStatusCount.js +125 -0
- package/lib/module/react-query/components/query-browser/StorageStatusCount.js +101 -0
- package/lib/module/react-query/components/query-browser/index.js +22 -0
- package/lib/module/react-query/components/query-browser/svgs.js +66 -0
- package/lib/module/react-query/hooks/index.js +23 -0
- package/lib/module/react-query/hooks/useActionButtons.js +54 -0
- package/lib/module/react-query/hooks/useAllMutations.js +32 -0
- package/lib/module/react-query/hooks/useAllQueries.js +114 -0
- package/lib/module/react-query/hooks/useModalManager.js +175 -0
- package/lib/module/react-query/hooks/useModalPersistence.js +67 -0
- package/lib/module/react-query/hooks/useMutationActionButtons.js +18 -0
- package/lib/module/react-query/hooks/useQueryStatusCounts.js +108 -0
- package/lib/module/react-query/hooks/useReactQueryState.js +20 -0
- package/lib/module/react-query/hooks/useSelectedMutation.js +27 -0
- package/lib/module/react-query/hooks/useSelectedQuery.js +92 -0
- package/lib/module/react-query/hooks/useStorageQueryCounts.js +25 -0
- package/lib/module/react-query/hooks/useWifiState.js +64 -0
- package/lib/module/react-query/index.js +3 -0
- package/lib/module/react-query/types/index.js +3 -0
- package/lib/module/react-query/types/types.js +10 -0
- package/lib/module/react-query/utils/actions/deleteItem.js +19 -0
- package/lib/module/react-query/utils/actions/invalidate.js +9 -0
- package/lib/module/react-query/utils/actions/refetch.js +11 -0
- package/lib/module/react-query/utils/actions/remove.js +8 -0
- package/lib/module/react-query/utils/actions/reset.js +11 -0
- package/lib/module/react-query/utils/actions/triggerError.js +26 -0
- package/lib/module/react-query/utils/actions/triggerLoading.js +47 -0
- package/lib/module/react-query/utils/deleteNestedDataByPath.js +51 -0
- package/lib/module/react-query/utils/formatRelativeTime.js +25 -0
- package/lib/module/react-query/utils/getQueryStatusColor.js +12 -0
- package/lib/module/react-query/utils/getQueryStatusLabel.js +13 -0
- package/lib/module/react-query/utils/getStorageQueryCounts.js +31 -0
- package/lib/module/react-query/utils/index.js +27 -0
- package/lib/module/react-query/utils/modalStorageOperations.js +117 -0
- package/lib/module/react-query/utils/storageQueryUtils.js +140 -0
- package/lib/module/react-query/utils/updateNestedDataByPath.js +56 -0
- package/lib/typescript/index.d.ts +7 -0
- package/lib/typescript/index.d.ts.map +1 -0
- package/lib/typescript/preset.d.ts +160 -0
- package/lib/typescript/preset.d.ts.map +1 -0
- package/lib/typescript/react-query/ReactQueryDevTools.d.ts +45 -0
- package/lib/typescript/react-query/ReactQueryDevTools.d.ts.map +1 -0
- package/lib/typescript/react-query/components/DataEditorMode.d.ts +25 -0
- package/lib/typescript/react-query/components/DataEditorMode.d.ts.map +1 -0
- package/lib/typescript/react-query/components/FilterStatusBadge.d.ts +12 -0
- package/lib/typescript/react-query/components/FilterStatusBadge.d.ts.map +1 -0
- package/lib/typescript/react-query/components/MutationBrowserMode.d.ts +14 -0
- package/lib/typescript/react-query/components/MutationBrowserMode.d.ts.map +1 -0
- package/lib/typescript/react-query/components/MutationEditorMode.d.ts +12 -0
- package/lib/typescript/react-query/components/MutationEditorMode.d.ts.map +1 -0
- package/lib/typescript/react-query/components/QueryBrowserMode.d.ts +14 -0
- package/lib/typescript/react-query/components/QueryBrowserMode.d.ts.map +1 -0
- package/lib/typescript/react-query/components/QueryDebugInfo.d.ts +6 -0
- package/lib/typescript/react-query/components/QueryDebugInfo.d.ts.map +1 -0
- package/lib/typescript/react-query/components/QueryFilterViewV3.d.ts +17 -0
- package/lib/typescript/react-query/components/QueryFilterViewV3.d.ts.map +1 -0
- package/lib/typescript/react-query/components/QuerySelector.d.ts +15 -0
- package/lib/typescript/react-query/components/QuerySelector.d.ts.map +1 -0
- package/lib/typescript/react-query/components/ReactQueryDevToolsModal.d.ts +19 -0
- package/lib/typescript/react-query/components/ReactQueryDevToolsModal.d.ts.map +1 -0
- package/lib/typescript/react-query/components/ReactQuerySection.d.ts +11 -0
- package/lib/typescript/react-query/components/ReactQuerySection.d.ts.map +1 -0
- package/lib/typescript/react-query/components/WifiToggle.d.ts +8 -0
- package/lib/typescript/react-query/components/WifiToggle.d.ts.map +1 -0
- package/lib/typescript/react-query/components/index.d.ts +21 -0
- package/lib/typescript/react-query/components/index.d.ts.map +1 -0
- package/lib/typescript/react-query/components/modals/DataEditorModal.d.ts +17 -0
- package/lib/typescript/react-query/components/modals/DataEditorModal.d.ts.map +1 -0
- package/lib/typescript/react-query/components/modals/MutationBrowserFooter.d.ts +17 -0
- package/lib/typescript/react-query/components/modals/MutationBrowserFooter.d.ts.map +1 -0
- package/lib/typescript/react-query/components/modals/MutationBrowserModal.d.ts +21 -0
- package/lib/typescript/react-query/components/modals/MutationBrowserModal.d.ts.map +1 -0
- package/lib/typescript/react-query/components/modals/MutationEditorModal.d.ts +17 -0
- package/lib/typescript/react-query/components/modals/MutationEditorModal.d.ts.map +1 -0
- package/lib/typescript/react-query/components/modals/QueryBrowserFooter.d.ts +16 -0
- package/lib/typescript/react-query/components/modals/QueryBrowserFooter.d.ts.map +1 -0
- package/lib/typescript/react-query/components/modals/QueryBrowserModal.d.ts +21 -0
- package/lib/typescript/react-query/components/modals/QueryBrowserModal.d.ts.map +1 -0
- package/lib/typescript/react-query/components/modals/ReactQueryModal.d.ts +29 -0
- package/lib/typescript/react-query/components/modals/ReactQueryModal.d.ts.map +1 -0
- package/lib/typescript/react-query/components/modals/ReactQueryModalHeader.d.ts +19 -0
- package/lib/typescript/react-query/components/modals/ReactQueryModalHeader.d.ts.map +1 -0
- package/lib/typescript/react-query/components/modals/SwipeIndicator.d.ts +14 -0
- package/lib/typescript/react-query/components/modals/SwipeIndicator.d.ts.map +1 -0
- package/lib/typescript/react-query/components/query-browser/ActionButton.d.ts +49 -0
- package/lib/typescript/react-query/components/query-browser/ActionButton.d.ts.map +1 -0
- package/lib/typescript/react-query/components/query-browser/ClearCacheButton.d.ts +12 -0
- package/lib/typescript/react-query/components/query-browser/ClearCacheButton.d.ts.map +1 -0
- package/lib/typescript/react-query/components/query-browser/Explorer.d.ts +19 -0
- package/lib/typescript/react-query/components/query-browser/Explorer.d.ts.map +1 -0
- package/lib/typescript/react-query/components/query-browser/MutationButton.d.ts +12 -0
- package/lib/typescript/react-query/components/query-browser/MutationButton.d.ts.map +1 -0
- package/lib/typescript/react-query/components/query-browser/MutationDetails.d.ts +10 -0
- package/lib/typescript/react-query/components/query-browser/MutationDetails.d.ts.map +1 -0
- package/lib/typescript/react-query/components/query-browser/MutationDetailsChips.d.ts +10 -0
- package/lib/typescript/react-query/components/query-browser/MutationDetailsChips.d.ts.map +1 -0
- package/lib/typescript/react-query/components/query-browser/MutationInformation.d.ts +8 -0
- package/lib/typescript/react-query/components/query-browser/MutationInformation.d.ts.map +1 -0
- package/lib/typescript/react-query/components/query-browser/MutationStatusCount.d.ts +12 -0
- package/lib/typescript/react-query/components/query-browser/MutationStatusCount.d.ts.map +1 -0
- package/lib/typescript/react-query/components/query-browser/MutationsList.d.ts +17 -0
- package/lib/typescript/react-query/components/query-browser/MutationsList.d.ts.map +1 -0
- package/lib/typescript/react-query/components/query-browser/NetworkToggleButton.d.ts +11 -0
- package/lib/typescript/react-query/components/query-browser/NetworkToggleButton.d.ts.map +1 -0
- package/lib/typescript/react-query/components/query-browser/QueryActions.d.ts +12 -0
- package/lib/typescript/react-query/components/query-browser/QueryActions.d.ts.map +1 -0
- package/lib/typescript/react-query/components/query-browser/QueryBrowser.d.ts +19 -0
- package/lib/typescript/react-query/components/query-browser/QueryBrowser.d.ts.map +1 -0
- package/lib/typescript/react-query/components/query-browser/QueryDetails.d.ts +10 -0
- package/lib/typescript/react-query/components/query-browser/QueryDetails.d.ts.map +1 -0
- package/lib/typescript/react-query/components/query-browser/QueryDetailsChip.d.ts +10 -0
- package/lib/typescript/react-query/components/query-browser/QueryDetailsChip.d.ts.map +1 -0
- package/lib/typescript/react-query/components/query-browser/QueryInformation.d.ts +12 -0
- package/lib/typescript/react-query/components/query-browser/QueryInformation.d.ts.map +1 -0
- package/lib/typescript/react-query/components/query-browser/QueryRow.d.ts +12 -0
- package/lib/typescript/react-query/components/query-browser/QueryRow.d.ts.map +1 -0
- package/lib/typescript/react-query/components/query-browser/QueryStatus.d.ts +17 -0
- package/lib/typescript/react-query/components/query-browser/QueryStatus.d.ts.map +1 -0
- package/lib/typescript/react-query/components/query-browser/QueryStatusCount.d.ts +11 -0
- package/lib/typescript/react-query/components/query-browser/QueryStatusCount.d.ts.map +1 -0
- package/lib/typescript/react-query/components/query-browser/StorageStatusCount.d.ts +18 -0
- package/lib/typescript/react-query/components/query-browser/StorageStatusCount.d.ts.map +1 -0
- package/lib/typescript/react-query/components/query-browser/index.d.ts +21 -0
- package/lib/typescript/react-query/components/query-browser/index.d.ts.map +1 -0
- package/lib/typescript/react-query/components/query-browser/svgs.d.ts +17 -0
- package/lib/typescript/react-query/components/query-browser/svgs.d.ts.map +1 -0
- package/lib/typescript/react-query/hooks/index.d.ts +13 -0
- package/lib/typescript/react-query/hooks/index.d.ts.map +1 -0
- package/lib/typescript/react-query/hooks/useActionButtons.d.ts +21 -0
- package/lib/typescript/react-query/hooks/useActionButtons.d.ts.map +1 -0
- package/lib/typescript/react-query/hooks/useAllMutations.d.ts +10 -0
- package/lib/typescript/react-query/hooks/useAllMutations.d.ts.map +1 -0
- package/lib/typescript/react-query/hooks/useAllQueries.d.ts +12 -0
- package/lib/typescript/react-query/hooks/useAllQueries.d.ts.map +1 -0
- package/lib/typescript/react-query/hooks/useModalManager.d.ts +39 -0
- package/lib/typescript/react-query/hooks/useModalManager.d.ts.map +1 -0
- package/lib/typescript/react-query/hooks/useModalPersistence.d.ts +29 -0
- package/lib/typescript/react-query/hooks/useModalPersistence.d.ts.map +1 -0
- package/lib/typescript/react-query/hooks/useMutationActionButtons.d.ts +15 -0
- package/lib/typescript/react-query/hooks/useMutationActionButtons.d.ts.map +1 -0
- package/lib/typescript/react-query/hooks/useQueryStatusCounts.d.ts +25 -0
- package/lib/typescript/react-query/hooks/useQueryStatusCounts.d.ts.map +1 -0
- package/lib/typescript/react-query/hooks/useReactQueryState.d.ts +9 -0
- package/lib/typescript/react-query/hooks/useReactQueryState.d.ts.map +1 -0
- package/lib/typescript/react-query/hooks/useSelectedMutation.d.ts +7 -0
- package/lib/typescript/react-query/hooks/useSelectedMutation.d.ts.map +1 -0
- package/lib/typescript/react-query/hooks/useSelectedQuery.d.ts +25 -0
- package/lib/typescript/react-query/hooks/useSelectedQuery.d.ts.map +1 -0
- package/lib/typescript/react-query/hooks/useStorageQueryCounts.d.ts +10 -0
- package/lib/typescript/react-query/hooks/useStorageQueryCounts.d.ts.map +1 -0
- package/lib/typescript/react-query/hooks/useWifiState.d.ts +9 -0
- package/lib/typescript/react-query/hooks/useWifiState.d.ts.map +1 -0
- package/lib/typescript/react-query/index.d.ts +2 -0
- package/lib/typescript/react-query/index.d.ts.map +1 -0
- package/lib/typescript/react-query/types/index.d.ts +2 -0
- package/lib/typescript/react-query/types/index.d.ts.map +1 -0
- package/lib/typescript/react-query/types/types.d.ts +10 -0
- package/lib/typescript/react-query/types/types.d.ts.map +1 -0
- package/lib/typescript/react-query/utils/actions/deleteItem.d.ts +9 -0
- package/lib/typescript/react-query/utils/actions/deleteItem.d.ts.map +1 -0
- package/lib/typescript/react-query/utils/actions/invalidate.d.ts +8 -0
- package/lib/typescript/react-query/utils/actions/invalidate.d.ts.map +1 -0
- package/lib/typescript/react-query/utils/actions/refetch.d.ts +7 -0
- package/lib/typescript/react-query/utils/actions/refetch.d.ts.map +1 -0
- package/lib/typescript/react-query/utils/actions/remove.d.ts +8 -0
- package/lib/typescript/react-query/utils/actions/remove.d.ts.map +1 -0
- package/lib/typescript/react-query/utils/actions/reset.d.ts +8 -0
- package/lib/typescript/react-query/utils/actions/reset.d.ts.map +1 -0
- package/lib/typescript/react-query/utils/actions/triggerError.d.ts +8 -0
- package/lib/typescript/react-query/utils/actions/triggerError.d.ts.map +1 -0
- package/lib/typescript/react-query/utils/actions/triggerLoading.d.ts +7 -0
- package/lib/typescript/react-query/utils/actions/triggerLoading.d.ts.map +1 -0
- package/lib/typescript/react-query/utils/deleteNestedDataByPath.d.ts +9 -0
- package/lib/typescript/react-query/utils/deleteNestedDataByPath.d.ts.map +1 -0
- package/lib/typescript/react-query/utils/formatRelativeTime.d.ts +7 -0
- package/lib/typescript/react-query/utils/formatRelativeTime.d.ts.map +1 -0
- package/lib/typescript/react-query/utils/getQueryStatusColor.d.ts +10 -0
- package/lib/typescript/react-query/utils/getQueryStatusColor.d.ts.map +1 -0
- package/lib/typescript/react-query/utils/getQueryStatusLabel.d.ts +9 -0
- package/lib/typescript/react-query/utils/getQueryStatusLabel.d.ts.map +1 -0
- package/lib/typescript/react-query/utils/getStorageQueryCounts.d.ts +13 -0
- package/lib/typescript/react-query/utils/getStorageQueryCounts.d.ts.map +1 -0
- package/lib/typescript/react-query/utils/index.d.ts +17 -0
- package/lib/typescript/react-query/utils/index.d.ts.map +1 -0
- package/lib/typescript/react-query/utils/modalStorageOperations.d.ts +55 -0
- package/lib/typescript/react-query/utils/modalStorageOperations.d.ts.map +1 -0
- package/lib/typescript/react-query/utils/storageQueryUtils.d.ts +69 -0
- package/lib/typescript/react-query/utils/storageQueryUtils.d.ts.map +1 -0
- package/lib/typescript/react-query/utils/updateNestedDataByPath.d.ts +10 -0
- package/lib/typescript/react-query/utils/updateNestedDataByPath.d.ts.map +1 -0
- package/package.json +68 -0
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { View } from "react-native";
|
|
4
|
+
import { CyberpunkSectionButton, buoyColors } from "@buoy-gg/shared-ui";
|
|
5
|
+
import { TanstackLogo } from "./query-browser/svgs";
|
|
6
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
|
+
// Component definition moved outside render to prevent recreation on every render
|
|
8
|
+
const TanstackIcon = () => /*#__PURE__*/_jsx(View, {
|
|
9
|
+
style: {
|
|
10
|
+
width: 24,
|
|
11
|
+
height: 24
|
|
12
|
+
},
|
|
13
|
+
children: /*#__PURE__*/_jsx(TanstackLogo, {})
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* React Query section component following composition principles.
|
|
18
|
+
* Encapsulates React Query specific business logic and UI.
|
|
19
|
+
*/
|
|
20
|
+
export function ReactQuerySection({
|
|
21
|
+
onPress,
|
|
22
|
+
getReactBuoySubtitle
|
|
23
|
+
}) {
|
|
24
|
+
// Format subtitle to be shorter: "45 queries • 10 mutations" → "45Q • 10M"
|
|
25
|
+
const formatSubtitle = () => {
|
|
26
|
+
const full = getReactBuoySubtitle();
|
|
27
|
+
const match = full.match(/(\d+) queries • (\d+) mutations/);
|
|
28
|
+
if (match) {
|
|
29
|
+
return `${match[1]}Q • ${match[2]}M`;
|
|
30
|
+
}
|
|
31
|
+
return "No data";
|
|
32
|
+
};
|
|
33
|
+
return /*#__PURE__*/_jsx(CyberpunkSectionButton, {
|
|
34
|
+
id: "react-buoy-dev-tools",
|
|
35
|
+
title: "QUERY",
|
|
36
|
+
subtitle: formatSubtitle(),
|
|
37
|
+
icon: TanstackIcon,
|
|
38
|
+
iconColor: buoyColors.error,
|
|
39
|
+
iconBackgroundColor: buoyColors.error + "1A",
|
|
40
|
+
onPress: onPress,
|
|
41
|
+
index: 1
|
|
42
|
+
});
|
|
43
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { TouchableOpacity } from "react-native";
|
|
4
|
+
import { Wifi } from "@buoy-gg/shared-ui";
|
|
5
|
+
import { useWifiState } from "../hooks/useWifiState";
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Small icon button that toggles React Query’s online manager, allowing developers to simulate
|
|
9
|
+
* offline scenarios directly from the modal header.
|
|
10
|
+
*/
|
|
11
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
12
|
+
export function WifiToggle({
|
|
13
|
+
size = 16
|
|
14
|
+
}) {
|
|
15
|
+
const {
|
|
16
|
+
isOnline,
|
|
17
|
+
handleWifiToggle
|
|
18
|
+
} = useWifiState();
|
|
19
|
+
return /*#__PURE__*/_jsx(TouchableOpacity, {
|
|
20
|
+
"sentry-label": `ignore toggle WiFi ${isOnline ? "On" : "Off"}`,
|
|
21
|
+
accessibilityRole: "button",
|
|
22
|
+
accessibilityLabel: `WiFi ${isOnline ? "On" : "Off"}`,
|
|
23
|
+
accessibilityHint: `Tap to turn WiFi ${isOnline ? "off" : "on"} for React Query`,
|
|
24
|
+
onPress: handleWifiToggle,
|
|
25
|
+
hitSlop: {
|
|
26
|
+
top: 10,
|
|
27
|
+
bottom: 10,
|
|
28
|
+
left: 10,
|
|
29
|
+
right: 10
|
|
30
|
+
},
|
|
31
|
+
activeOpacity: 0.7,
|
|
32
|
+
style: {
|
|
33
|
+
alignItems: "center",
|
|
34
|
+
justifyContent: "center",
|
|
35
|
+
width: 14,
|
|
36
|
+
flexShrink: 0
|
|
37
|
+
},
|
|
38
|
+
children: isOnline ? /*#__PURE__*/_jsx(Wifi, {
|
|
39
|
+
size: size,
|
|
40
|
+
color: "#10B981"
|
|
41
|
+
}) : /*#__PURE__*/_jsx(Wifi, {
|
|
42
|
+
size: size,
|
|
43
|
+
color: "#DC2626"
|
|
44
|
+
})
|
|
45
|
+
});
|
|
46
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
// Modal components
|
|
4
|
+
export * from "./modals/ReactQueryModal";
|
|
5
|
+
export * from "./modals/ReactQueryModalHeader";
|
|
6
|
+
export * from "./modals/QueryBrowserModal";
|
|
7
|
+
export * from "./modals/MutationBrowserModal";
|
|
8
|
+
export * from "./modals/MutationEditorModal";
|
|
9
|
+
export * from "./modals/DataEditorModal";
|
|
10
|
+
export * from "./modals/QueryBrowserFooter";
|
|
11
|
+
export * from "./modals/MutationBrowserFooter";
|
|
12
|
+
export * from "./modals/SwipeIndicator";
|
|
13
|
+
|
|
14
|
+
// Query browser components (via barrel that maps defaults to named)
|
|
15
|
+
export * from "./query-browser";
|
|
16
|
+
|
|
17
|
+
// Shared components
|
|
18
|
+
export { VirtualizedDataExplorer, DataViewer, TypeLegend } from "@buoy-gg/shared-ui/dataViewer";
|
|
19
|
+
|
|
20
|
+
// Mode components
|
|
21
|
+
export * from "./QueryBrowserMode";
|
|
22
|
+
export * from "./MutationBrowserMode";
|
|
23
|
+
export * from "./MutationEditorMode";
|
|
24
|
+
export * from "./DataEditorMode";
|
|
25
|
+
export * from "./QuerySelector";
|
|
26
|
+
export * from "./QueryDebugInfo";
|
|
27
|
+
export * from "./WifiToggle";
|
|
28
|
+
export * from "./ReactQuerySection";
|
|
29
|
+
export { ReactQueryDevToolsModal } from "./ReactQueryDevToolsModal";
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { JsModal, devToolsStorageKeys } from "@buoy-gg/shared-ui";
|
|
4
|
+
import { useGetQueryByQueryKeyWithVersion } from "../../hooks/useSelectedQuery";
|
|
5
|
+
import { ReactQueryModalHeader } from "./ReactQueryModalHeader";
|
|
6
|
+
import { DataEditorMode, DataEditorActionsFooter } from "../DataEditorMode";
|
|
7
|
+
import { useState, useCallback } from "react";
|
|
8
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
9
|
+
/**
|
|
10
|
+
* Specialized modal for data editing following "Decompose by Responsibility"
|
|
11
|
+
* Single purpose: Display data editor when a query is selected
|
|
12
|
+
*/
|
|
13
|
+
export function DataEditorModal({
|
|
14
|
+
visible,
|
|
15
|
+
selectedQueryKey,
|
|
16
|
+
onQuerySelect,
|
|
17
|
+
onClose,
|
|
18
|
+
onMinimize,
|
|
19
|
+
enableSharedModalDimensions = false,
|
|
20
|
+
onTabChange
|
|
21
|
+
}) {
|
|
22
|
+
const {
|
|
23
|
+
query: selectedQuery,
|
|
24
|
+
version: queryVersion
|
|
25
|
+
} = useGetQueryByQueryKeyWithVersion(selectedQueryKey);
|
|
26
|
+
const [modalMode, setModalMode] = useState("bottomSheet");
|
|
27
|
+
const handleModeChange = useCallback(mode => {
|
|
28
|
+
setModalMode(mode);
|
|
29
|
+
}, []);
|
|
30
|
+
const renderHeaderContent = () => /*#__PURE__*/_jsx(ReactQueryModalHeader, {
|
|
31
|
+
selectedQuery: selectedQuery,
|
|
32
|
+
activeTab: "queries",
|
|
33
|
+
onTabChange: onTabChange,
|
|
34
|
+
onBack: () => onQuerySelect(undefined)
|
|
35
|
+
});
|
|
36
|
+
const storagePrefix = enableSharedModalDimensions ? devToolsStorageKeys.reactQuery.modal() : `${devToolsStorageKeys.reactQuery.modal()}_data_editor`;
|
|
37
|
+
if (!visible || !selectedQuery) return null;
|
|
38
|
+
const footerNode = /*#__PURE__*/_jsx(DataEditorActionsFooter, {
|
|
39
|
+
selectedQuery: selectedQuery,
|
|
40
|
+
isFloatingMode: modalMode === "floating",
|
|
41
|
+
queryVersion: queryVersion
|
|
42
|
+
}, `footer-${queryVersion}`);
|
|
43
|
+
return /*#__PURE__*/_jsx(JsModal, {
|
|
44
|
+
visible: visible,
|
|
45
|
+
onClose: onClose,
|
|
46
|
+
onMinimize: onMinimize,
|
|
47
|
+
persistenceKey: storagePrefix,
|
|
48
|
+
header: {
|
|
49
|
+
customContent: renderHeaderContent(),
|
|
50
|
+
showToggleButton: true
|
|
51
|
+
},
|
|
52
|
+
onModeChange: handleModeChange,
|
|
53
|
+
enablePersistence: true,
|
|
54
|
+
initialMode: "bottomSheet",
|
|
55
|
+
enableGlitchEffects: true,
|
|
56
|
+
styles: {},
|
|
57
|
+
footer: footerNode,
|
|
58
|
+
footerHeight: 72,
|
|
59
|
+
children: /*#__PURE__*/_jsx(DataEditorMode, {
|
|
60
|
+
selectedQuery: selectedQuery,
|
|
61
|
+
isFloatingMode: modalMode === "floating",
|
|
62
|
+
disableInternalFooter: true,
|
|
63
|
+
queryVersion: queryVersion
|
|
64
|
+
})
|
|
65
|
+
});
|
|
66
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { View, StyleSheet } from "react-native";
|
|
4
|
+
import { useSafeAreaInsets, buoyColors } from "@buoy-gg/shared-ui";
|
|
5
|
+
import MutationStatusCount from "../query-browser/MutationStatusCount";
|
|
6
|
+
import { useMemo } from "react";
|
|
7
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
|
+
/**
|
|
9
|
+
* Footer component for MutationBrowserModal following composition principles
|
|
10
|
+
*
|
|
11
|
+
* Applied principles:
|
|
12
|
+
* - Decompose by Responsibility: Dedicated footer component for mutation filter controls
|
|
13
|
+
* - Prefer Composition over Configuration: Specialized footer matching DataEditorMode pattern
|
|
14
|
+
* - Extract Reusable Logic: Consistent footer styling across modal types
|
|
15
|
+
*/
|
|
16
|
+
export function MutationBrowserFooter({
|
|
17
|
+
activeFilter,
|
|
18
|
+
onFilterChange,
|
|
19
|
+
modalMode
|
|
20
|
+
}) {
|
|
21
|
+
const isFloatingMode = modalMode === "floating";
|
|
22
|
+
const insets = useSafeAreaInsets({
|
|
23
|
+
minBottom: 16
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
// Use useMemo to ensure paddingBottom is recalculated when isFloatingMode changes
|
|
27
|
+
const paddingBottom = useMemo(() => {
|
|
28
|
+
return !isFloatingMode ? insets.bottom : 0;
|
|
29
|
+
}, [isFloatingMode, insets.bottom]);
|
|
30
|
+
return /*#__PURE__*/_jsx(View, {
|
|
31
|
+
// Force re-render with key change
|
|
32
|
+
style: [styles.filterFooter, {
|
|
33
|
+
paddingBottom
|
|
34
|
+
},
|
|
35
|
+
// Remove border radius when docked to bottom
|
|
36
|
+
!isFloatingMode && styles.dockedFooter],
|
|
37
|
+
children: /*#__PURE__*/_jsx(View, {
|
|
38
|
+
style: styles.filterContainer,
|
|
39
|
+
children: /*#__PURE__*/_jsx(MutationStatusCount, {
|
|
40
|
+
activeFilter: activeFilter,
|
|
41
|
+
onFilterChange: onFilterChange
|
|
42
|
+
})
|
|
43
|
+
})
|
|
44
|
+
}, `footer-${isFloatingMode ? "floating" : "docked"}`);
|
|
45
|
+
}
|
|
46
|
+
const styles = StyleSheet.create({
|
|
47
|
+
filterFooter: {
|
|
48
|
+
borderTopWidth: 1,
|
|
49
|
+
borderTopColor: buoyColors.border,
|
|
50
|
+
paddingVertical: 8,
|
|
51
|
+
paddingHorizontal: 0,
|
|
52
|
+
backgroundColor: buoyColors.base,
|
|
53
|
+
borderBottomLeftRadius: 14,
|
|
54
|
+
borderBottomRightRadius: 14
|
|
55
|
+
},
|
|
56
|
+
dockedFooter: {
|
|
57
|
+
borderBottomLeftRadius: 0,
|
|
58
|
+
borderBottomRightRadius: 0
|
|
59
|
+
},
|
|
60
|
+
filterContainer: {
|
|
61
|
+
minHeight: 32,
|
|
62
|
+
justifyContent: "center"
|
|
63
|
+
}
|
|
64
|
+
});
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { useCallback, useState, useRef } from "react";
|
|
4
|
+
import { useGetMutationById } from "../../hooks/useSelectedMutation";
|
|
5
|
+
import { MutationBrowserMode } from "../MutationBrowserMode";
|
|
6
|
+
import { MutationBrowserFooter } from "./MutationBrowserFooter";
|
|
7
|
+
import { JsModal } from "@buoy-gg/shared-ui";
|
|
8
|
+
import { ReactQueryModalHeader } from "./ReactQueryModalHeader";
|
|
9
|
+
import { View, Animated, PanResponder } from "react-native";
|
|
10
|
+
import { SwipeIndicator } from "./SwipeIndicator";
|
|
11
|
+
import { devToolsStorageKeys } from "@buoy-gg/shared-ui";
|
|
12
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
+
/**
|
|
14
|
+
* Specialized modal wrapper for browsing mutations. Handles persistence, swipe gestures, and
|
|
15
|
+
* filter coordination before delegating to the underlying list view.
|
|
16
|
+
*/
|
|
17
|
+
export function MutationBrowserModal({
|
|
18
|
+
visible,
|
|
19
|
+
selectedMutationId,
|
|
20
|
+
onMutationSelect,
|
|
21
|
+
onClose,
|
|
22
|
+
onMinimize,
|
|
23
|
+
activeFilter: externalActiveFilter,
|
|
24
|
+
onFilterChange: externalOnFilterChange,
|
|
25
|
+
onTabChange,
|
|
26
|
+
enableSharedModalDimensions = false,
|
|
27
|
+
searchText = "",
|
|
28
|
+
onSearchChange
|
|
29
|
+
}) {
|
|
30
|
+
const selectedMutation = useGetMutationById(selectedMutationId);
|
|
31
|
+
const [internalActiveFilter, setInternalActiveFilter] = useState(null);
|
|
32
|
+
const activeFilter = externalActiveFilter ?? internalActiveFilter;
|
|
33
|
+
const setActiveFilter = externalOnFilterChange ?? setInternalActiveFilter;
|
|
34
|
+
|
|
35
|
+
// Track modal mode for conditional styling
|
|
36
|
+
// Initialize with bottomSheet but it will be updated from persisted state if available
|
|
37
|
+
const [modalMode, setModalMode] = useState("bottomSheet");
|
|
38
|
+
const storagePrefix = enableSharedModalDimensions ? devToolsStorageKeys.reactQuery.modal() : devToolsStorageKeys.reactQuery.mutationModal();
|
|
39
|
+
|
|
40
|
+
// Animated value for gesture tracking [[memory:4875251]]
|
|
41
|
+
const translationX = useRef(new Animated.Value(0)).current;
|
|
42
|
+
const handleSwipeNavigation = useCallback(direction => {
|
|
43
|
+
if (direction === "right") {
|
|
44
|
+
onTabChange("queries");
|
|
45
|
+
}
|
|
46
|
+
}, [onTabChange]);
|
|
47
|
+
const handleModeChange = useCallback(mode => {
|
|
48
|
+
setModalMode(mode);
|
|
49
|
+
}, []);
|
|
50
|
+
|
|
51
|
+
// Create PanResponder for swipe navigation
|
|
52
|
+
const panResponder = useRef(PanResponder.create({
|
|
53
|
+
onStartShouldSetPanResponder: () => false,
|
|
54
|
+
onMoveShouldSetPanResponder: (evt, gestureState) => {
|
|
55
|
+
// Only capture horizontal swipes
|
|
56
|
+
return Math.abs(gestureState.dx) > 5 && Math.abs(gestureState.dy) < 10;
|
|
57
|
+
},
|
|
58
|
+
onPanResponderMove: (evt, gestureState) => {
|
|
59
|
+
// Update translation for visual feedback
|
|
60
|
+
translationX.setValue(gestureState.dx);
|
|
61
|
+
},
|
|
62
|
+
onPanResponderRelease: (evt, gestureState) => {
|
|
63
|
+
const {
|
|
64
|
+
dx,
|
|
65
|
+
vx
|
|
66
|
+
} = gestureState;
|
|
67
|
+
const swipeThreshold = 80; // Match EDGE_THRESHOLD from SwipeIndicator
|
|
68
|
+
const velocityThreshold = 0.5;
|
|
69
|
+
|
|
70
|
+
// Reset visual feedback with spring animation
|
|
71
|
+
Animated.spring(translationX, {
|
|
72
|
+
toValue: 0,
|
|
73
|
+
useNativeDriver: true
|
|
74
|
+
}).start();
|
|
75
|
+
if (Math.abs(dx) > swipeThreshold || Math.abs(vx) > velocityThreshold) {
|
|
76
|
+
if (dx > 0 || vx > 0) {
|
|
77
|
+
handleSwipeNavigation("right");
|
|
78
|
+
} else {
|
|
79
|
+
handleSwipeNavigation("left");
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
onPanResponderTerminate: () => {
|
|
84
|
+
// Reset on termination
|
|
85
|
+
Animated.spring(translationX, {
|
|
86
|
+
toValue: 0,
|
|
87
|
+
useNativeDriver: true
|
|
88
|
+
}).start();
|
|
89
|
+
}
|
|
90
|
+
})).current;
|
|
91
|
+
if (!visible) return null;
|
|
92
|
+
const renderHeaderContent = () => /*#__PURE__*/_jsx(ReactQueryModalHeader, {
|
|
93
|
+
selectedMutation: selectedMutation,
|
|
94
|
+
activeTab: "mutations",
|
|
95
|
+
onTabChange: onTabChange,
|
|
96
|
+
onBack: () => onMutationSelect(undefined),
|
|
97
|
+
searchText: searchText,
|
|
98
|
+
onSearchChange: onSearchChange
|
|
99
|
+
});
|
|
100
|
+
const footerNode = /*#__PURE__*/_jsx(MutationBrowserFooter, {
|
|
101
|
+
activeFilter: activeFilter,
|
|
102
|
+
onFilterChange: setActiveFilter,
|
|
103
|
+
modalMode: modalMode
|
|
104
|
+
});
|
|
105
|
+
return /*#__PURE__*/_jsx(JsModal, {
|
|
106
|
+
visible: visible,
|
|
107
|
+
onClose: onClose,
|
|
108
|
+
onMinimize: onMinimize,
|
|
109
|
+
persistenceKey: storagePrefix,
|
|
110
|
+
header: {
|
|
111
|
+
customContent: renderHeaderContent(),
|
|
112
|
+
showToggleButton: true
|
|
113
|
+
},
|
|
114
|
+
onModeChange: handleModeChange,
|
|
115
|
+
enablePersistence: true,
|
|
116
|
+
initialMode: "bottomSheet",
|
|
117
|
+
enableGlitchEffects: true,
|
|
118
|
+
styles: {},
|
|
119
|
+
footer: footerNode,
|
|
120
|
+
footerHeight: 56,
|
|
121
|
+
children: /*#__PURE__*/_jsx(View, {
|
|
122
|
+
style: {
|
|
123
|
+
flex: 1
|
|
124
|
+
},
|
|
125
|
+
children: /*#__PURE__*/_jsxs(View, {
|
|
126
|
+
...panResponder.panHandlers,
|
|
127
|
+
style: {
|
|
128
|
+
flex: 1
|
|
129
|
+
},
|
|
130
|
+
children: [/*#__PURE__*/_jsx(SwipeIndicator, {
|
|
131
|
+
translationX: translationX,
|
|
132
|
+
canSwipeLeft: false,
|
|
133
|
+
canSwipeRight: true
|
|
134
|
+
}), /*#__PURE__*/_jsx(MutationBrowserMode, {
|
|
135
|
+
selectedMutation: selectedMutation,
|
|
136
|
+
onMutationSelect: onMutationSelect,
|
|
137
|
+
activeFilter: activeFilter,
|
|
138
|
+
searchText: searchText
|
|
139
|
+
})]
|
|
140
|
+
})
|
|
141
|
+
})
|
|
142
|
+
});
|
|
143
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { JsModal, devToolsStorageKeys } from "@buoy-gg/shared-ui";
|
|
4
|
+
import { useGetMutationById } from "../../hooks/useSelectedMutation";
|
|
5
|
+
import { ReactQueryModalHeader } from "./ReactQueryModalHeader";
|
|
6
|
+
import { MutationEditorMode } from "../MutationEditorMode";
|
|
7
|
+
import { useState, useCallback } from "react";
|
|
8
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
9
|
+
/**
|
|
10
|
+
* Modal variant dedicated to editing a single mutation entry. Restores persisted positioning and
|
|
11
|
+
* mirrors the behavior of the query editor.
|
|
12
|
+
*/
|
|
13
|
+
export function MutationEditorModal({
|
|
14
|
+
visible,
|
|
15
|
+
selectedMutationId,
|
|
16
|
+
onMutationSelect,
|
|
17
|
+
onClose,
|
|
18
|
+
onMinimize,
|
|
19
|
+
onTabChange,
|
|
20
|
+
enableSharedModalDimensions = false
|
|
21
|
+
}) {
|
|
22
|
+
const selectedMutation = useGetMutationById(selectedMutationId);
|
|
23
|
+
const [modalMode, setModalMode] = useState("bottomSheet");
|
|
24
|
+
const handleModeChange = useCallback(mode => {
|
|
25
|
+
setModalMode(mode);
|
|
26
|
+
}, []);
|
|
27
|
+
const renderHeaderContent = () => /*#__PURE__*/_jsx(ReactQueryModalHeader, {
|
|
28
|
+
selectedMutation: selectedMutation,
|
|
29
|
+
activeTab: "mutations",
|
|
30
|
+
onTabChange: onTabChange,
|
|
31
|
+
onBack: () => onMutationSelect(undefined)
|
|
32
|
+
});
|
|
33
|
+
const storagePrefix = enableSharedModalDimensions ? devToolsStorageKeys.reactQuery.modal() : devToolsStorageKeys.reactQuery.mutationModal();
|
|
34
|
+
if (!visible || !selectedMutation) return null;
|
|
35
|
+
return /*#__PURE__*/_jsx(JsModal, {
|
|
36
|
+
visible: visible,
|
|
37
|
+
onClose: onClose,
|
|
38
|
+
onMinimize: onMinimize,
|
|
39
|
+
persistenceKey: storagePrefix,
|
|
40
|
+
header: {
|
|
41
|
+
customContent: renderHeaderContent(),
|
|
42
|
+
showToggleButton: true
|
|
43
|
+
},
|
|
44
|
+
onModeChange: handleModeChange,
|
|
45
|
+
enablePersistence: true,
|
|
46
|
+
initialMode: "bottomSheet",
|
|
47
|
+
enableGlitchEffects: true,
|
|
48
|
+
styles: {},
|
|
49
|
+
children: /*#__PURE__*/_jsx(MutationEditorMode, {
|
|
50
|
+
selectedMutation: selectedMutation,
|
|
51
|
+
isFloatingMode: modalMode === "floating"
|
|
52
|
+
})
|
|
53
|
+
});
|
|
54
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { View, StyleSheet } from "react-native";
|
|
4
|
+
import { useSafeAreaInsets, buoyColors } from "@buoy-gg/shared-ui";
|
|
5
|
+
import QueryStatusCount from "../query-browser/QueryStatusCount";
|
|
6
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
|
+
/**
|
|
8
|
+
* Footer component for QueryBrowserModal following composition principles
|
|
9
|
+
*
|
|
10
|
+
* Applied principles:
|
|
11
|
+
* - Decompose by Responsibility: Dedicated footer component for filter controls
|
|
12
|
+
* - Prefer Composition over Configuration: Specialized footer matching DataEditorMode pattern
|
|
13
|
+
* - Extract Reusable Logic: Consistent footer styling across modal types
|
|
14
|
+
*/
|
|
15
|
+
export function QueryBrowserFooter({
|
|
16
|
+
activeFilter,
|
|
17
|
+
onFilterChange,
|
|
18
|
+
isFloatingMode = true // Default to floating mode if not specified
|
|
19
|
+
}) {
|
|
20
|
+
// Use safe area insets with a minimum bottom padding of 16 for docked mode
|
|
21
|
+
// This ensures proper spacing even on resized simulators or devices without home indicator
|
|
22
|
+
const insets = useSafeAreaInsets({
|
|
23
|
+
minBottom: 16
|
|
24
|
+
});
|
|
25
|
+
return /*#__PURE__*/_jsx(View, {
|
|
26
|
+
style: [styles.filterFooter, {
|
|
27
|
+
paddingBottom: !isFloatingMode ? insets.bottom : 0
|
|
28
|
+
},
|
|
29
|
+
// Remove border radius when docked to bottom
|
|
30
|
+
!isFloatingMode && styles.dockedFooter],
|
|
31
|
+
children: /*#__PURE__*/_jsx(View, {
|
|
32
|
+
style: styles.filterContainer,
|
|
33
|
+
children: /*#__PURE__*/_jsx(QueryStatusCount, {
|
|
34
|
+
activeFilter: activeFilter,
|
|
35
|
+
onFilterChange: onFilterChange
|
|
36
|
+
})
|
|
37
|
+
})
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
const styles = StyleSheet.create({
|
|
41
|
+
filterFooter: {
|
|
42
|
+
borderTopWidth: 1,
|
|
43
|
+
borderTopColor: buoyColors.border,
|
|
44
|
+
paddingVertical: 8,
|
|
45
|
+
paddingHorizontal: 0,
|
|
46
|
+
backgroundColor: buoyColors.base,
|
|
47
|
+
borderBottomLeftRadius: 14,
|
|
48
|
+
borderBottomRightRadius: 14
|
|
49
|
+
},
|
|
50
|
+
dockedFooter: {
|
|
51
|
+
borderBottomLeftRadius: 0,
|
|
52
|
+
borderBottomRightRadius: 0
|
|
53
|
+
},
|
|
54
|
+
filterContainer: {
|
|
55
|
+
minHeight: 32,
|
|
56
|
+
justifyContent: "center"
|
|
57
|
+
}
|
|
58
|
+
});
|