@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,221 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.QueryFilterViewV3 = QueryFilterViewV3;
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
var _sharedUi = require("@buoy-gg/shared-ui");
|
|
9
|
+
var _getQueryStatusLabel = require("../utils/getQueryStatusLabel");
|
|
10
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
|
+
/**
|
|
12
|
+
* Comprehensive filter control panel for React Query DevTools matching the Network DevTools
|
|
13
|
+
* filter UI pattern. Provides status filtering and query key pattern-based filtering.
|
|
14
|
+
*/
|
|
15
|
+
function QueryFilterViewV3({
|
|
16
|
+
queries,
|
|
17
|
+
activeFilter,
|
|
18
|
+
onFilterChange,
|
|
19
|
+
ignoredPatterns,
|
|
20
|
+
onPatternToggle,
|
|
21
|
+
includedPatterns,
|
|
22
|
+
onIncludedPatternToggle
|
|
23
|
+
}) {
|
|
24
|
+
// Calculate status counts
|
|
25
|
+
const statusCounts = (0, _react.useMemo)(() => {
|
|
26
|
+
const counts = {
|
|
27
|
+
all: queries.length,
|
|
28
|
+
disabled: 0,
|
|
29
|
+
fresh: 0,
|
|
30
|
+
stale: 0,
|
|
31
|
+
fetching: 0,
|
|
32
|
+
paused: 0,
|
|
33
|
+
inactive: 0,
|
|
34
|
+
error: 0
|
|
35
|
+
};
|
|
36
|
+
queries.forEach(query => {
|
|
37
|
+
const status = (0, _getQueryStatusLabel.getQueryStatusLabel)(query);
|
|
38
|
+
if (status === "disabled") counts.disabled++;else if (status === "fresh") counts.fresh++;else if (status === "stale") counts.stale++;else if (status === "fetching") counts.fetching++;else if (status === "paused") counts.paused++;else if (status === "inactive") counts.inactive++;
|
|
39
|
+
if (query.state.error) counts.error++;
|
|
40
|
+
});
|
|
41
|
+
return counts;
|
|
42
|
+
}, [queries]);
|
|
43
|
+
|
|
44
|
+
// Extract available query keys (excluding numeric-only keys)
|
|
45
|
+
const availableQueryKeys = (0, _react.useMemo)(() => {
|
|
46
|
+
const keys = new Set();
|
|
47
|
+
queries.forEach(query => {
|
|
48
|
+
if (!query?.queryKey) return;
|
|
49
|
+
const queryKeys = Array.isArray(query.queryKey) ? query.queryKey : [query.queryKey];
|
|
50
|
+
queryKeys.forEach(key => {
|
|
51
|
+
if (key != null) {
|
|
52
|
+
const keyStr = String(key);
|
|
53
|
+
// Skip if key is purely numeric (likely a dynamic ID)
|
|
54
|
+
if (!/^\d+$/.test(keyStr)) {
|
|
55
|
+
keys.add(keyStr);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
});
|
|
59
|
+
});
|
|
60
|
+
return Array.from(keys).sort().slice(0, 50); // Limit to 50
|
|
61
|
+
}, [queries]);
|
|
62
|
+
|
|
63
|
+
// Convert available query keys to suggestion items (just strings)
|
|
64
|
+
const suggestionItems = (0, _react.useMemo)(() => {
|
|
65
|
+
return availableQueryKeys;
|
|
66
|
+
}, [availableQueryKeys]);
|
|
67
|
+
|
|
68
|
+
// Calculate filtered query count based on active patterns
|
|
69
|
+
const filteredCount = (0, _react.useMemo)(() => {
|
|
70
|
+
let filtered = queries;
|
|
71
|
+
|
|
72
|
+
// Apply included patterns filter
|
|
73
|
+
if (includedPatterns.size > 0) {
|
|
74
|
+
filtered = filtered.filter(query => {
|
|
75
|
+
if (!query?.queryKey) return false;
|
|
76
|
+
const keys = Array.isArray(query.queryKey) ? query.queryKey : [query.queryKey];
|
|
77
|
+
const keyString = keys.filter(k => k != null).map(k => String(k)).join(" ").toLowerCase();
|
|
78
|
+
return Array.from(includedPatterns).some(pattern => keyString.includes(pattern.toLowerCase()));
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
// Apply ignored patterns filter
|
|
83
|
+
if (ignoredPatterns.size > 0) {
|
|
84
|
+
filtered = filtered.filter(query => {
|
|
85
|
+
if (!query?.queryKey) return true;
|
|
86
|
+
const keys = Array.isArray(query.queryKey) ? query.queryKey : [query.queryKey];
|
|
87
|
+
const keyString = keys.filter(k => k != null).map(k => String(k)).join(" ").toLowerCase();
|
|
88
|
+
return !Array.from(ignoredPatterns).some(pattern => keyString.includes(pattern.toLowerCase()));
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
return filtered.length;
|
|
92
|
+
}, [queries, includedPatterns, ignoredPatterns]);
|
|
93
|
+
|
|
94
|
+
// Build the filter configuration
|
|
95
|
+
const filterConfig = (0, _react.useMemo)(() => {
|
|
96
|
+
return {
|
|
97
|
+
filterSummarySection: {
|
|
98
|
+
enabled: true,
|
|
99
|
+
totalCount: queries.length,
|
|
100
|
+
filteredCount: filteredCount,
|
|
101
|
+
includePatterns: includedPatterns,
|
|
102
|
+
excludePatterns: ignoredPatterns
|
|
103
|
+
},
|
|
104
|
+
sections: [
|
|
105
|
+
// Status section - radio button style
|
|
106
|
+
{
|
|
107
|
+
id: "status",
|
|
108
|
+
title: "Status",
|
|
109
|
+
type: "status",
|
|
110
|
+
data: [{
|
|
111
|
+
id: "status::all",
|
|
112
|
+
label: "All",
|
|
113
|
+
count: statusCounts.all,
|
|
114
|
+
icon: _sharedUi.Globe,
|
|
115
|
+
color: _sharedUi.buoyColors.primary,
|
|
116
|
+
isActive: !activeFilter || activeFilter === "all"
|
|
117
|
+
}, {
|
|
118
|
+
id: "status::disabled",
|
|
119
|
+
label: "Disabled",
|
|
120
|
+
count: statusCounts.disabled,
|
|
121
|
+
icon: _sharedUi.XCircle,
|
|
122
|
+
color: _sharedUi.buoyColors.textMuted,
|
|
123
|
+
isActive: activeFilter === "disabled"
|
|
124
|
+
}, {
|
|
125
|
+
id: "status::fresh",
|
|
126
|
+
label: "Fresh",
|
|
127
|
+
count: statusCounts.fresh,
|
|
128
|
+
icon: _sharedUi.Zap,
|
|
129
|
+
color: _sharedUi.buoyColors.success,
|
|
130
|
+
isActive: activeFilter === "fresh"
|
|
131
|
+
}, {
|
|
132
|
+
id: "status::stale",
|
|
133
|
+
label: "Stale",
|
|
134
|
+
count: statusCounts.stale,
|
|
135
|
+
icon: _sharedUi.Clock,
|
|
136
|
+
color: _sharedUi.buoyColors.warning,
|
|
137
|
+
isActive: activeFilter === "stale"
|
|
138
|
+
}, {
|
|
139
|
+
id: "status::fetching",
|
|
140
|
+
label: "Fetching",
|
|
141
|
+
count: statusCounts.fetching,
|
|
142
|
+
icon: _sharedUi.RefreshCw,
|
|
143
|
+
color: _sharedUi.buoyColors.primary,
|
|
144
|
+
isActive: activeFilter === "fetching"
|
|
145
|
+
}, {
|
|
146
|
+
id: "status::paused",
|
|
147
|
+
label: "Paused",
|
|
148
|
+
count: statusCounts.paused,
|
|
149
|
+
icon: _sharedUi.Clock,
|
|
150
|
+
color: _sharedUi.buoyColors.textMuted,
|
|
151
|
+
isActive: activeFilter === "paused"
|
|
152
|
+
}, {
|
|
153
|
+
id: "status::inactive",
|
|
154
|
+
label: "Inactive",
|
|
155
|
+
count: statusCounts.inactive,
|
|
156
|
+
icon: _sharedUi.Clock,
|
|
157
|
+
color: _sharedUi.buoyColors.textSecondary,
|
|
158
|
+
isActive: activeFilter === "inactive"
|
|
159
|
+
}, {
|
|
160
|
+
id: "status::error",
|
|
161
|
+
label: "Error",
|
|
162
|
+
count: statusCounts.error,
|
|
163
|
+
icon: _sharedUi.XCircle,
|
|
164
|
+
color: _sharedUi.buoyColors.error,
|
|
165
|
+
isActive: activeFilter === "error"
|
|
166
|
+
}]
|
|
167
|
+
}],
|
|
168
|
+
addFilterSection: {
|
|
169
|
+
enabled: true,
|
|
170
|
+
placeholder: "Enter pattern to exclude...",
|
|
171
|
+
title: "EXCLUDE FILTERS",
|
|
172
|
+
icon: _sharedUi.Filter
|
|
173
|
+
},
|
|
174
|
+
includeOnlySection: {
|
|
175
|
+
enabled: true,
|
|
176
|
+
title: "INCLUDE ONLY FILTERS",
|
|
177
|
+
description: "Show ONLY queries matching these patterns. All non-matching queries will be hidden.",
|
|
178
|
+
placeholder: "Enter pattern to include...",
|
|
179
|
+
icon: _sharedUi.Eye,
|
|
180
|
+
patterns: includedPatterns,
|
|
181
|
+
onPatternToggle: onIncludedPatternToggle,
|
|
182
|
+
onPatternAdd: onIncludedPatternToggle
|
|
183
|
+
},
|
|
184
|
+
availableItemsSection: {
|
|
185
|
+
enabled: true,
|
|
186
|
+
title: "AVAILABLE QUERY KEYS",
|
|
187
|
+
emptyMessage: "No queries found. Query keys will appear here once queries are active.",
|
|
188
|
+
items: suggestionItems
|
|
189
|
+
},
|
|
190
|
+
howItWorksSection: {
|
|
191
|
+
enabled: true,
|
|
192
|
+
title: "HOW QUERY FILTERS WORK",
|
|
193
|
+
description: "There are two types of query key filters:",
|
|
194
|
+
examples: ["", "INCLUDE ONLY (green):", "• Shows ONLY queries matching the pattern", "• Example: 'rewards' → shows only reward queries", "• When active, non-matching queries are hidden", "", "EXCLUDE (blue):", "• Hides queries matching the pattern", "• Example: 'analytics' → hides analytics queries", "", "Filters are case-insensitive and match partial keys."]
|
|
195
|
+
},
|
|
196
|
+
activePatterns: ignoredPatterns
|
|
197
|
+
};
|
|
198
|
+
}, [statusCounts, activeFilter, ignoredPatterns, includedPatterns, suggestionItems, onIncludedPatternToggle, queries.length, filteredCount]);
|
|
199
|
+
|
|
200
|
+
// Handle filter item clicks
|
|
201
|
+
const handleFilterSelect = itemId => {
|
|
202
|
+
const [section, value] = itemId.split("::");
|
|
203
|
+
if (section === "status") {
|
|
204
|
+
// Status filters are mutually exclusive
|
|
205
|
+
if (value === "all" || activeFilter === value) {
|
|
206
|
+
onFilterChange(null);
|
|
207
|
+
} else {
|
|
208
|
+
onFilterChange(value);
|
|
209
|
+
}
|
|
210
|
+
} else if (section === "suggestion") {
|
|
211
|
+
// Toggle pattern
|
|
212
|
+
onPatternToggle(value);
|
|
213
|
+
}
|
|
214
|
+
};
|
|
215
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.DynamicFilterView, {
|
|
216
|
+
...filterConfig,
|
|
217
|
+
onFilterChange: handleFilterSelect,
|
|
218
|
+
onPatternToggle: onPatternToggle,
|
|
219
|
+
onPatternAdd: onPatternToggle
|
|
220
|
+
});
|
|
221
|
+
}
|
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.QuerySelector = QuerySelector;
|
|
7
|
+
var _reactNative = require("react-native");
|
|
8
|
+
var _getQueryStatusColor = require("../utils/getQueryStatusColor");
|
|
9
|
+
var _QueryDebugInfo = require("./QueryDebugInfo");
|
|
10
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
|
+
/**
|
|
12
|
+
* Modal selector that lists all known queries, highlighting status and enabling the user to focus
|
|
13
|
+
* a specific query within the dev tools experience.
|
|
14
|
+
*/
|
|
15
|
+
function QuerySelector({
|
|
16
|
+
queries,
|
|
17
|
+
selectedQuery,
|
|
18
|
+
isOpen,
|
|
19
|
+
onClose,
|
|
20
|
+
onSelect
|
|
21
|
+
}) {
|
|
22
|
+
const getQueryDisplayName = query => {
|
|
23
|
+
return Array.isArray(query.queryKey) ? query.queryKey.join(" - ") : String(query.queryKey);
|
|
24
|
+
};
|
|
25
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Modal, {
|
|
26
|
+
accessibilityLabel: "Query selector",
|
|
27
|
+
accessibilityHint: "View query selector",
|
|
28
|
+
"sentry-label": "ignore query selector",
|
|
29
|
+
visible: isOpen,
|
|
30
|
+
transparent: true,
|
|
31
|
+
animationType: "fade",
|
|
32
|
+
onRequestClose: onClose,
|
|
33
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Pressable, {
|
|
34
|
+
accessibilityLabel: "Query selector overlay",
|
|
35
|
+
accessibilityHint: "View query selector overlay",
|
|
36
|
+
"sentry-label": "ignore query selector overlay",
|
|
37
|
+
style: styles.modalOverlay,
|
|
38
|
+
onPress: onClose,
|
|
39
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
40
|
+
accessibilityLabel: "Query selector content",
|
|
41
|
+
accessibilityHint: "View query selector content",
|
|
42
|
+
"sentry-label": "ignore query selector content",
|
|
43
|
+
style: styles.modalContent,
|
|
44
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
45
|
+
style: styles.modalHeader,
|
|
46
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
47
|
+
style: styles.modalTitle,
|
|
48
|
+
children: "Select Query"
|
|
49
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.Text, {
|
|
50
|
+
style: styles.modalSubtitle,
|
|
51
|
+
children: [queries.length, " ", queries.length === 1 ? "query" : "queries", " ", "available"]
|
|
52
|
+
})]
|
|
53
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ScrollView, {
|
|
54
|
+
accessibilityLabel: "Query selector scroll view",
|
|
55
|
+
accessibilityHint: "View query selector scroll view",
|
|
56
|
+
"sentry-label": "ignore query selector scroll view",
|
|
57
|
+
style: styles.scrollView,
|
|
58
|
+
contentContainerStyle: styles.scrollViewContent,
|
|
59
|
+
showsVerticalScrollIndicator: true,
|
|
60
|
+
children: queries.length === 0 ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
61
|
+
style: styles.emptyState,
|
|
62
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
63
|
+
style: styles.emptyTitle,
|
|
64
|
+
children: "No Queries Found"
|
|
65
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.Text, {
|
|
66
|
+
style: styles.emptyDescription,
|
|
67
|
+
children: ["No React Query queries are currently active.", "\n\n", "To see queries here:", "\n", "\u2022 Make API calls using useQuery", "\n", "\u2022 Ensure queries are within QueryClientProvider", "\n", "\u2022 Check console for debugging info"]
|
|
68
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_QueryDebugInfo.QueryDebugInfo, {})]
|
|
69
|
+
}) : queries.map((query, index) => {
|
|
70
|
+
const displayName = getQueryDisplayName(query);
|
|
71
|
+
const statusColorName = (0, _getQueryStatusColor.getQueryStatusColor)({
|
|
72
|
+
queryState: query.state,
|
|
73
|
+
observerCount: query.getObserversCount(),
|
|
74
|
+
isStale: query.isStale()
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
// Convert color names to hex colors
|
|
78
|
+
const colorMap = {
|
|
79
|
+
blue: "#3B82F6",
|
|
80
|
+
gray: "#6B7280",
|
|
81
|
+
purple: "#8B5CF6",
|
|
82
|
+
yellow: "#F59E0B",
|
|
83
|
+
green: "#10B981"
|
|
84
|
+
};
|
|
85
|
+
const statusColor = colorMap[statusColorName] || "#6B7280";
|
|
86
|
+
const isSelected = query === selectedQuery;
|
|
87
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.TouchableOpacity, {
|
|
88
|
+
accessibilityLabel: `Query ${displayName}`,
|
|
89
|
+
accessibilityHint: `View query ${displayName}`,
|
|
90
|
+
"sentry-label": `ignore query ${displayName}`,
|
|
91
|
+
style: [styles.queryItem, isSelected && styles.selectedQueryItem],
|
|
92
|
+
onPress: () => onSelect(query),
|
|
93
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
94
|
+
style: [styles.statusDot, {
|
|
95
|
+
backgroundColor: statusColor
|
|
96
|
+
}]
|
|
97
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
98
|
+
style: [styles.queryText, isSelected && styles.selectedQueryText],
|
|
99
|
+
numberOfLines: 1,
|
|
100
|
+
children: displayName
|
|
101
|
+
})]
|
|
102
|
+
}, `${query.queryHash}-${index}`);
|
|
103
|
+
})
|
|
104
|
+
})]
|
|
105
|
+
})
|
|
106
|
+
})
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
const styles = _reactNative.StyleSheet.create({
|
|
110
|
+
modalOverlay: {
|
|
111
|
+
flex: 1,
|
|
112
|
+
backgroundColor: "rgba(0, 0, 0, 0.5)",
|
|
113
|
+
justifyContent: "center",
|
|
114
|
+
alignItems: "center"
|
|
115
|
+
},
|
|
116
|
+
modalContent: {
|
|
117
|
+
backgroundColor: "#1F1F1F",
|
|
118
|
+
borderRadius: 8,
|
|
119
|
+
width: "80%",
|
|
120
|
+
maxHeight: "80%",
|
|
121
|
+
minHeight: "50%",
|
|
122
|
+
borderWidth: 1,
|
|
123
|
+
borderColor: "rgba(255, 255, 255, 0.1)",
|
|
124
|
+
flex: 0
|
|
125
|
+
},
|
|
126
|
+
modalHeader: {
|
|
127
|
+
padding: 16,
|
|
128
|
+
borderBottomWidth: 1,
|
|
129
|
+
borderBottomColor: "rgba(255, 255, 255, 0.1)"
|
|
130
|
+
},
|
|
131
|
+
modalTitle: {
|
|
132
|
+
color: "#FFFFFF",
|
|
133
|
+
fontSize: 16,
|
|
134
|
+
fontWeight: "600",
|
|
135
|
+
marginBottom: 4
|
|
136
|
+
},
|
|
137
|
+
modalSubtitle: {
|
|
138
|
+
color: "#9CA3AF",
|
|
139
|
+
fontSize: 12
|
|
140
|
+
},
|
|
141
|
+
scrollView: {
|
|
142
|
+
flex: 1
|
|
143
|
+
},
|
|
144
|
+
scrollViewContent: {
|
|
145
|
+
padding: 8,
|
|
146
|
+
flexGrow: 1
|
|
147
|
+
},
|
|
148
|
+
emptyState: {
|
|
149
|
+
padding: 32,
|
|
150
|
+
alignItems: "center",
|
|
151
|
+
justifyContent: "center"
|
|
152
|
+
},
|
|
153
|
+
emptyTitle: {
|
|
154
|
+
color: "#E5E7EB",
|
|
155
|
+
fontSize: 16,
|
|
156
|
+
fontWeight: "500",
|
|
157
|
+
marginBottom: 8,
|
|
158
|
+
textAlign: "center"
|
|
159
|
+
},
|
|
160
|
+
emptyDescription: {
|
|
161
|
+
color: "#9CA3AF",
|
|
162
|
+
fontSize: 14,
|
|
163
|
+
textAlign: "center",
|
|
164
|
+
lineHeight: 20
|
|
165
|
+
},
|
|
166
|
+
queryItem: {
|
|
167
|
+
flexDirection: "row",
|
|
168
|
+
alignItems: "center",
|
|
169
|
+
padding: 8,
|
|
170
|
+
borderRadius: 4
|
|
171
|
+
},
|
|
172
|
+
selectedQueryItem: {
|
|
173
|
+
backgroundColor: "rgba(255, 255, 255, 0.1)"
|
|
174
|
+
},
|
|
175
|
+
statusDot: {
|
|
176
|
+
width: 8,
|
|
177
|
+
height: 8,
|
|
178
|
+
borderRadius: 4,
|
|
179
|
+
marginRight: 8
|
|
180
|
+
},
|
|
181
|
+
queryText: {
|
|
182
|
+
color: "#E5E7EB",
|
|
183
|
+
fontSize: 14,
|
|
184
|
+
flex: 1
|
|
185
|
+
},
|
|
186
|
+
selectedQueryText: {
|
|
187
|
+
color: "#FFFFFF",
|
|
188
|
+
fontWeight: "500"
|
|
189
|
+
},
|
|
190
|
+
trigger: {
|
|
191
|
+
flexDirection: "row",
|
|
192
|
+
alignItems: "center",
|
|
193
|
+
backgroundColor: "rgba(255, 255, 255, 0.05)",
|
|
194
|
+
borderRadius: 4,
|
|
195
|
+
paddingHorizontal: 8,
|
|
196
|
+
paddingVertical: 6,
|
|
197
|
+
borderWidth: 1,
|
|
198
|
+
borderColor: "rgba(255, 255, 255, 0.1)",
|
|
199
|
+
minWidth: 120,
|
|
200
|
+
maxWidth: 200
|
|
201
|
+
},
|
|
202
|
+
triggerText: {
|
|
203
|
+
color: "#E5E7EB",
|
|
204
|
+
fontSize: 12,
|
|
205
|
+
flex: 1,
|
|
206
|
+
marginHorizontal: 6
|
|
207
|
+
}
|
|
208
|
+
});
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.ReactQueryDevToolsModal = ReactQueryDevToolsModal;
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
var _ReactQueryModal = require("./modals/ReactQueryModal");
|
|
9
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
10
|
+
/** Configuration options for the high-level React Query dev tools modal wrapper. */
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Opinionated wrapper around `ReactQueryModal` that manages selection state and filters so
|
|
14
|
+
* consumers can drop in the full dev tools experience with a single component.
|
|
15
|
+
*/
|
|
16
|
+
function ReactQueryDevToolsModal({
|
|
17
|
+
visible,
|
|
18
|
+
onClose,
|
|
19
|
+
onMinimize,
|
|
20
|
+
enableSharedModalDimensions = true
|
|
21
|
+
}) {
|
|
22
|
+
const [selectedQueryKey, setSelectedQueryKey] = (0, _react.useState)(undefined);
|
|
23
|
+
const [selectedMutationId, setSelectedMutationId] = (0, _react.useState)(undefined);
|
|
24
|
+
const [activeFilter, setActiveFilter] = (0, _react.useState)(null);
|
|
25
|
+
const [activeTab, setActiveTab] = (0, _react.useState)("queries");
|
|
26
|
+
const [searchText, setSearchText] = (0, _react.useState)("");
|
|
27
|
+
const resetState = (0, _react.useCallback)(() => {
|
|
28
|
+
setSelectedQueryKey(undefined);
|
|
29
|
+
setSelectedMutationId(undefined);
|
|
30
|
+
setActiveFilter(null);
|
|
31
|
+
setActiveTab("queries");
|
|
32
|
+
setSearchText("");
|
|
33
|
+
}, []);
|
|
34
|
+
const handleClose = (0, _react.useCallback)(() => {
|
|
35
|
+
resetState();
|
|
36
|
+
onClose();
|
|
37
|
+
}, [onClose, resetState]);
|
|
38
|
+
const handleQuerySelect = (0, _react.useCallback)(query => {
|
|
39
|
+
setSelectedQueryKey(query?.queryKey);
|
|
40
|
+
}, []);
|
|
41
|
+
const handleMutationSelect = (0, _react.useCallback)(mutation => {
|
|
42
|
+
setSelectedMutationId(mutation?.mutationId);
|
|
43
|
+
}, []);
|
|
44
|
+
const handleFilterChange = (0, _react.useCallback)(filter => {
|
|
45
|
+
setActiveFilter(filter);
|
|
46
|
+
}, []);
|
|
47
|
+
const handleTabChange = (0, _react.useCallback)(tab => {
|
|
48
|
+
setActiveTab(tab);
|
|
49
|
+
setActiveFilter(null);
|
|
50
|
+
setSelectedQueryKey(undefined);
|
|
51
|
+
setSelectedMutationId(undefined);
|
|
52
|
+
setSearchText("");
|
|
53
|
+
}, []);
|
|
54
|
+
const handleSearchChange = (0, _react.useCallback)(text => {
|
|
55
|
+
setSearchText(text);
|
|
56
|
+
}, []);
|
|
57
|
+
if (!visible) {
|
|
58
|
+
return null;
|
|
59
|
+
}
|
|
60
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_ReactQueryModal.ReactQueryModal, {
|
|
61
|
+
visible: visible,
|
|
62
|
+
selectedQueryKey: selectedQueryKey,
|
|
63
|
+
selectedMutationId: selectedMutationId,
|
|
64
|
+
onQuerySelect: handleQuerySelect,
|
|
65
|
+
onMutationSelect: handleMutationSelect,
|
|
66
|
+
onClose: handleClose,
|
|
67
|
+
onMinimize: onMinimize,
|
|
68
|
+
activeFilter: activeFilter,
|
|
69
|
+
onFilterChange: handleFilterChange,
|
|
70
|
+
activeTab: activeTab,
|
|
71
|
+
onTabChange: handleTabChange,
|
|
72
|
+
searchText: searchText,
|
|
73
|
+
onSearchChange: handleSearchChange,
|
|
74
|
+
enableSharedModalDimensions: enableSharedModalDimensions
|
|
75
|
+
});
|
|
76
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.ReactQuerySection = ReactQuerySection;
|
|
7
|
+
var _reactNative = require("react-native");
|
|
8
|
+
var _sharedUi = require("@buoy-gg/shared-ui");
|
|
9
|
+
var _svgs = require("./query-browser/svgs");
|
|
10
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
|
+
// Component definition moved outside render to prevent recreation on every render
|
|
12
|
+
const TanstackIcon = () => /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
13
|
+
style: {
|
|
14
|
+
width: 24,
|
|
15
|
+
height: 24
|
|
16
|
+
},
|
|
17
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_svgs.TanstackLogo, {})
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* React Query section component following composition principles.
|
|
22
|
+
* Encapsulates React Query specific business logic and UI.
|
|
23
|
+
*/
|
|
24
|
+
function ReactQuerySection({
|
|
25
|
+
onPress,
|
|
26
|
+
getReactBuoySubtitle
|
|
27
|
+
}) {
|
|
28
|
+
// Format subtitle to be shorter: "45 queries • 10 mutations" → "45Q • 10M"
|
|
29
|
+
const formatSubtitle = () => {
|
|
30
|
+
const full = getReactBuoySubtitle();
|
|
31
|
+
const match = full.match(/(\d+) queries • (\d+) mutations/);
|
|
32
|
+
if (match) {
|
|
33
|
+
return `${match[1]}Q • ${match[2]}M`;
|
|
34
|
+
}
|
|
35
|
+
return "No data";
|
|
36
|
+
};
|
|
37
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.CyberpunkSectionButton, {
|
|
38
|
+
id: "react-buoy-dev-tools",
|
|
39
|
+
title: "QUERY",
|
|
40
|
+
subtitle: formatSubtitle(),
|
|
41
|
+
icon: TanstackIcon,
|
|
42
|
+
iconColor: _sharedUi.buoyColors.error,
|
|
43
|
+
iconBackgroundColor: _sharedUi.buoyColors.error + "1A",
|
|
44
|
+
onPress: onPress,
|
|
45
|
+
index: 1
|
|
46
|
+
});
|
|
47
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.WifiToggle = WifiToggle;
|
|
7
|
+
var _reactNative = require("react-native");
|
|
8
|
+
var _sharedUi = require("@buoy-gg/shared-ui");
|
|
9
|
+
var _useWifiState = require("../hooks/useWifiState");
|
|
10
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
|
+
/**
|
|
12
|
+
* Small icon button that toggles React Query’s online manager, allowing developers to simulate
|
|
13
|
+
* offline scenarios directly from the modal header.
|
|
14
|
+
*/
|
|
15
|
+
function WifiToggle({
|
|
16
|
+
size = 16
|
|
17
|
+
}) {
|
|
18
|
+
const {
|
|
19
|
+
isOnline,
|
|
20
|
+
handleWifiToggle
|
|
21
|
+
} = (0, _useWifiState.useWifiState)();
|
|
22
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
|
|
23
|
+
"sentry-label": `ignore toggle WiFi ${isOnline ? "On" : "Off"}`,
|
|
24
|
+
accessibilityRole: "button",
|
|
25
|
+
accessibilityLabel: `WiFi ${isOnline ? "On" : "Off"}`,
|
|
26
|
+
accessibilityHint: `Tap to turn WiFi ${isOnline ? "off" : "on"} for React Query`,
|
|
27
|
+
onPress: handleWifiToggle,
|
|
28
|
+
hitSlop: {
|
|
29
|
+
top: 10,
|
|
30
|
+
bottom: 10,
|
|
31
|
+
left: 10,
|
|
32
|
+
right: 10
|
|
33
|
+
},
|
|
34
|
+
activeOpacity: 0.7,
|
|
35
|
+
style: {
|
|
36
|
+
alignItems: "center",
|
|
37
|
+
justifyContent: "center",
|
|
38
|
+
width: 14,
|
|
39
|
+
flexShrink: 0
|
|
40
|
+
},
|
|
41
|
+
children: isOnline ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.Wifi, {
|
|
42
|
+
size: size,
|
|
43
|
+
color: "#10B981"
|
|
44
|
+
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.Wifi, {
|
|
45
|
+
size: size,
|
|
46
|
+
color: "#DC2626"
|
|
47
|
+
})
|
|
48
|
+
});
|
|
49
|
+
}
|