@buoy-gg/react-query 7.0.41 → 7.0.42

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (243) hide show
  1. package/README.md +11 -73
  2. package/lib/commonjs/checkPeer.js +1 -8
  3. package/lib/commonjs/checkPeer.web.js +1 -3
  4. package/lib/commonjs/index.js +1 -657
  5. package/lib/commonjs/preset.js +1 -243
  6. package/lib/commonjs/react-query/components/DataEditorMode.js +1 -317
  7. package/lib/commonjs/react-query/components/FilterStatusBadge.js +1 -55
  8. package/lib/commonjs/react-query/components/MutationBrowserMode.js +1 -52
  9. package/lib/commonjs/react-query/components/MutationEditorMode.js +1 -276
  10. package/lib/commonjs/react-query/components/QueryBrowserMode.js +1 -99
  11. package/lib/commonjs/react-query/components/QueryDebugInfo.js +1 -107
  12. package/lib/commonjs/react-query/components/QueryFilterViewV3.js +1 -224
  13. package/lib/commonjs/react-query/components/QuerySelector.js +1 -209
  14. package/lib/commonjs/react-query/components/ReactQueryDevToolsModal.js +1 -91
  15. package/lib/commonjs/react-query/components/ReactQuerySection.js +1 -47
  16. package/lib/commonjs/react-query/components/ReactQueryTracker.js +1 -38
  17. package/lib/commonjs/react-query/components/WifiToggle.js +1 -51
  18. package/lib/commonjs/react-query/components/modals/DataEditorModal.js +1 -103
  19. package/lib/commonjs/react-query/components/modals/MutationBrowserFooter.js +1 -61
  20. package/lib/commonjs/react-query/components/modals/MutationBrowserModal.js +1 -164
  21. package/lib/commonjs/react-query/components/modals/MutationEditorModal.js +1 -106
  22. package/lib/commonjs/react-query/components/modals/QueryBrowserFooter.js +1 -56
  23. package/lib/commonjs/react-query/components/modals/QueryBrowserModal.js +1 -254
  24. package/lib/commonjs/react-query/components/modals/ReactQueryModal.js +1 -83
  25. package/lib/commonjs/react-query/components/modals/ReactQueryModalHeader.js +1 -194
  26. package/lib/commonjs/react-query/components/modals/SwipeIndicator.js +1 -204
  27. package/lib/commonjs/react-query/components/query-browser/ActionButton.js +1 -100
  28. package/lib/commonjs/react-query/components/query-browser/ClearCacheButton.js +1 -53
  29. package/lib/commonjs/react-query/components/query-browser/Explorer.js +1 -75
  30. package/lib/commonjs/react-query/components/query-browser/MutationButton.js +1 -190
  31. package/lib/commonjs/react-query/components/query-browser/MutationDetails.js +1 -124
  32. package/lib/commonjs/react-query/components/query-browser/MutationDetailsChips.js +1 -68
  33. package/lib/commonjs/react-query/components/query-browser/MutationInformation.js +1 -118
  34. package/lib/commonjs/react-query/components/query-browser/MutationStatusCount.js +1 -84
  35. package/lib/commonjs/react-query/components/query-browser/MutationsList.js +1 -220
  36. package/lib/commonjs/react-query/components/query-browser/NetworkToggleButton.js +1 -54
  37. package/lib/commonjs/react-query/components/query-browser/QueryActions.js +1 -124
  38. package/lib/commonjs/react-query/components/query-browser/QueryBrowser.js +1 -181
  39. package/lib/commonjs/react-query/components/query-browser/QueryDetails.js +1 -141
  40. package/lib/commonjs/react-query/components/query-browser/QueryDetailsChip.js +1 -78
  41. package/lib/commonjs/react-query/components/query-browser/QueryInformation.js +1 -95
  42. package/lib/commonjs/react-query/components/query-browser/QueryRow.js +1 -96
  43. package/lib/commonjs/react-query/components/query-browser/QueryStatus.js +1 -167
  44. package/lib/commonjs/react-query/components/query-browser/QueryStatusCount.js +1 -100
  45. package/lib/commonjs/react-query/components/query-browser/StorageStatusCount.js +1 -61
  46. package/lib/commonjs/react-query/components/query-browser/index.js +1 -170
  47. package/lib/commonjs/react-query/components/query-browser/svgs.js +1 -72
  48. package/lib/commonjs/react-query/hooks/useActionButtons.js +1 -51
  49. package/lib/commonjs/react-query/hooks/useAllMutations.js +1 -85
  50. package/lib/commonjs/react-query/hooks/useAllQueries.js +1 -117
  51. package/lib/commonjs/react-query/hooks/useModalManager.js +1 -178
  52. package/lib/commonjs/react-query/hooks/useModalPersistence.js +1 -71
  53. package/lib/commonjs/react-query/hooks/useMutationActionButtons.js +1 -21
  54. package/lib/commonjs/react-query/hooks/useQueryStatusCounts.js +1 -114
  55. package/lib/commonjs/react-query/hooks/useReactQueryState.js +1 -24
  56. package/lib/commonjs/react-query/hooks/useSelectedMutation.js +1 -30
  57. package/lib/commonjs/react-query/hooks/useSelectedQuery.js +1 -96
  58. package/lib/commonjs/react-query/hooks/useStorageQueryCounts.js +1 -28
  59. package/lib/commonjs/react-query/hooks/useWifiState.js +1 -67
  60. package/lib/commonjs/react-query/stores/reactQueryEventStore.js +1 -302
  61. package/lib/commonjs/react-query/sync/dehydrate.js +1 -166
  62. package/lib/commonjs/react-query/sync/reactQuerySyncAdapter.js +1 -593
  63. package/lib/commonjs/react-query/sync/snapshotProvider.js +1 -289
  64. package/lib/commonjs/react-query/sync/useReactQuerySyncAdapter.js +1 -34
  65. package/lib/commonjs/react-query/types/types.js +1 -14
  66. package/lib/commonjs/react-query/utils/actions/deleteItem.js +1 -23
  67. package/lib/commonjs/react-query/utils/actions/emitDevToolsEvent.js +1 -40
  68. package/lib/commonjs/react-query/utils/actions/invalidate.js +1 -15
  69. package/lib/commonjs/react-query/utils/actions/refetch.js +1 -17
  70. package/lib/commonjs/react-query/utils/actions/remove.js +1 -15
  71. package/lib/commonjs/react-query/utils/actions/reset.js +1 -17
  72. package/lib/commonjs/react-query/utils/actions/triggerError.js +1 -33
  73. package/lib/commonjs/react-query/utils/actions/triggerLoading.js +1 -54
  74. package/lib/commonjs/react-query/utils/deleteNestedDataByPath.js +1 -56
  75. package/lib/commonjs/react-query/utils/getQueryStatusColor.js +1 -16
  76. package/lib/commonjs/react-query/utils/getQueryStatusLabel.js +1 -23
  77. package/lib/commonjs/react-query/utils/getStorageQueryCounts.js +1 -35
  78. package/lib/commonjs/react-query/utils/modalStorageOperations.js +1 -127
  79. package/lib/commonjs/react-query/utils/storageQueryUtils.js +1 -149
  80. package/lib/commonjs/react-query/utils/testIDs.js +1 -61
  81. package/lib/commonjs/react-query/utils/updateNestedDataByPath.js +1 -61
  82. package/lib/module/checkPeer.js +1 -8
  83. package/lib/module/checkPeer.web.js +1 -3
  84. package/lib/module/index.js +1 -130
  85. package/lib/module/preset.js +1 -239
  86. package/lib/module/react-query/components/DataEditorMode.js +1 -311
  87. package/lib/module/react-query/components/FilterStatusBadge.js +1 -51
  88. package/lib/module/react-query/components/MutationBrowserMode.js +1 -47
  89. package/lib/module/react-query/components/MutationEditorMode.js +1 -270
  90. package/lib/module/react-query/components/QueryBrowserMode.js +1 -94
  91. package/lib/module/react-query/components/QueryDebugInfo.js +1 -104
  92. package/lib/module/react-query/components/QueryFilterViewV3.js +1 -221
  93. package/lib/module/react-query/components/QuerySelector.js +1 -205
  94. package/lib/module/react-query/components/ReactQueryDevToolsModal.js +1 -87
  95. package/lib/module/react-query/components/ReactQuerySection.js +1 -43
  96. package/lib/module/react-query/components/ReactQueryTracker.js +1 -35
  97. package/lib/module/react-query/components/WifiToggle.js +1 -48
  98. package/lib/module/react-query/components/modals/DataEditorModal.js +1 -99
  99. package/lib/module/react-query/components/modals/MutationBrowserFooter.js +1 -56
  100. package/lib/module/react-query/components/modals/MutationBrowserModal.js +1 -161
  101. package/lib/module/react-query/components/modals/MutationEditorModal.js +1 -102
  102. package/lib/module/react-query/components/modals/QueryBrowserFooter.js +1 -51
  103. package/lib/module/react-query/components/modals/QueryBrowserModal.js +1 -250
  104. package/lib/module/react-query/components/modals/ReactQueryModal.js +1 -79
  105. package/lib/module/react-query/components/modals/ReactQueryModalHeader.js +1 -190
  106. package/lib/module/react-query/components/modals/SwipeIndicator.js +1 -201
  107. package/lib/module/react-query/components/query-browser/ActionButton.js +1 -96
  108. package/lib/module/react-query/components/query-browser/ClearCacheButton.js +1 -49
  109. package/lib/module/react-query/components/query-browser/Explorer.js +1 -70
  110. package/lib/module/react-query/components/query-browser/MutationButton.js +1 -186
  111. package/lib/module/react-query/components/query-browser/MutationDetails.js +1 -119
  112. package/lib/module/react-query/components/query-browser/MutationDetailsChips.js +1 -64
  113. package/lib/module/react-query/components/query-browser/MutationInformation.js +1 -113
  114. package/lib/module/react-query/components/query-browser/MutationStatusCount.js +1 -79
  115. package/lib/module/react-query/components/query-browser/MutationsList.js +1 -215
  116. package/lib/module/react-query/components/query-browser/NetworkToggleButton.js +1 -50
  117. package/lib/module/react-query/components/query-browser/QueryActions.js +1 -119
  118. package/lib/module/react-query/components/query-browser/QueryBrowser.js +1 -176
  119. package/lib/module/react-query/components/query-browser/QueryDetails.js +1 -136
  120. package/lib/module/react-query/components/query-browser/QueryDetailsChip.js +1 -74
  121. package/lib/module/react-query/components/query-browser/QueryInformation.js +1 -90
  122. package/lib/module/react-query/components/query-browser/QueryRow.js +1 -92
  123. package/lib/module/react-query/components/query-browser/QueryStatus.js +1 -163
  124. package/lib/module/react-query/components/query-browser/QueryStatusCount.js +1 -95
  125. package/lib/module/react-query/components/query-browser/StorageStatusCount.js +1 -56
  126. package/lib/module/react-query/components/query-browser/index.js +1 -22
  127. package/lib/module/react-query/components/query-browser/svgs.js +1 -64
  128. package/lib/module/react-query/hooks/useActionButtons.js +1 -46
  129. package/lib/module/react-query/hooks/useAllMutations.js +1 -82
  130. package/lib/module/react-query/hooks/useAllQueries.js +1 -114
  131. package/lib/module/react-query/hooks/useModalManager.js +1 -175
  132. package/lib/module/react-query/hooks/useModalPersistence.js +1 -67
  133. package/lib/module/react-query/hooks/useMutationActionButtons.js +1 -17
  134. package/lib/module/react-query/hooks/useQueryStatusCounts.js +1 -112
  135. package/lib/module/react-query/hooks/useReactQueryState.js +1 -20
  136. package/lib/module/react-query/hooks/useSelectedMutation.js +1 -27
  137. package/lib/module/react-query/hooks/useSelectedQuery.js +1 -92
  138. package/lib/module/react-query/hooks/useStorageQueryCounts.js +1 -25
  139. package/lib/module/react-query/hooks/useWifiState.js +1 -64
  140. package/lib/module/react-query/stores/reactQueryEventStore.js +1 -293
  141. package/lib/module/react-query/sync/dehydrate.js +1 -156
  142. package/lib/module/react-query/sync/reactQuerySyncAdapter.js +1 -589
  143. package/lib/module/react-query/sync/snapshotProvider.js +1 -284
  144. package/lib/module/react-query/sync/useReactQuerySyncAdapter.js +1 -31
  145. package/lib/module/react-query/types/types.js +1 -10
  146. package/lib/module/react-query/utils/actions/deleteItem.js +1 -19
  147. package/lib/module/react-query/utils/actions/emitDevToolsEvent.js +1 -36
  148. package/lib/module/react-query/utils/actions/invalidate.js +1 -11
  149. package/lib/module/react-query/utils/actions/refetch.js +1 -13
  150. package/lib/module/react-query/utils/actions/remove.js +1 -11
  151. package/lib/module/react-query/utils/actions/reset.js +1 -13
  152. package/lib/module/react-query/utils/actions/triggerError.js +1 -29
  153. package/lib/module/react-query/utils/actions/triggerLoading.js +1 -50
  154. package/lib/module/react-query/utils/deleteNestedDataByPath.js +1 -51
  155. package/lib/module/react-query/utils/getQueryStatusColor.js +1 -12
  156. package/lib/module/react-query/utils/getQueryStatusLabel.js +1 -19
  157. package/lib/module/react-query/utils/getStorageQueryCounts.js +1 -31
  158. package/lib/module/react-query/utils/modalStorageOperations.js +1 -117
  159. package/lib/module/react-query/utils/storageQueryUtils.js +1 -140
  160. package/lib/module/react-query/utils/testIDs.js +1 -54
  161. package/lib/module/react-query/utils/updateNestedDataByPath.js +1 -56
  162. package/lib/web/index.mjs +3 -4
  163. package/package.json +3 -3
  164. package/lib/typescript/checkPeer.d.ts.map +0 -1
  165. package/lib/typescript/checkPeer.web.d.ts.map +0 -1
  166. package/lib/typescript/index.d.ts.map +0 -1
  167. package/lib/typescript/preset.d.ts.map +0 -1
  168. package/lib/typescript/react-query/components/DataEditorMode.d.ts.map +0 -1
  169. package/lib/typescript/react-query/components/FilterStatusBadge.d.ts.map +0 -1
  170. package/lib/typescript/react-query/components/MutationBrowserMode.d.ts.map +0 -1
  171. package/lib/typescript/react-query/components/MutationEditorMode.d.ts.map +0 -1
  172. package/lib/typescript/react-query/components/QueryBrowserMode.d.ts.map +0 -1
  173. package/lib/typescript/react-query/components/QueryDebugInfo.d.ts.map +0 -1
  174. package/lib/typescript/react-query/components/QueryFilterViewV3.d.ts.map +0 -1
  175. package/lib/typescript/react-query/components/QuerySelector.d.ts.map +0 -1
  176. package/lib/typescript/react-query/components/ReactQueryDevToolsModal.d.ts.map +0 -1
  177. package/lib/typescript/react-query/components/ReactQuerySection.d.ts.map +0 -1
  178. package/lib/typescript/react-query/components/ReactQueryTracker.d.ts.map +0 -1
  179. package/lib/typescript/react-query/components/WifiToggle.d.ts.map +0 -1
  180. package/lib/typescript/react-query/components/modals/DataEditorModal.d.ts.map +0 -1
  181. package/lib/typescript/react-query/components/modals/MutationBrowserFooter.d.ts.map +0 -1
  182. package/lib/typescript/react-query/components/modals/MutationBrowserModal.d.ts.map +0 -1
  183. package/lib/typescript/react-query/components/modals/MutationEditorModal.d.ts.map +0 -1
  184. package/lib/typescript/react-query/components/modals/QueryBrowserFooter.d.ts.map +0 -1
  185. package/lib/typescript/react-query/components/modals/QueryBrowserModal.d.ts.map +0 -1
  186. package/lib/typescript/react-query/components/modals/ReactQueryModal.d.ts.map +0 -1
  187. package/lib/typescript/react-query/components/modals/ReactQueryModalHeader.d.ts.map +0 -1
  188. package/lib/typescript/react-query/components/modals/SwipeIndicator.d.ts.map +0 -1
  189. package/lib/typescript/react-query/components/query-browser/ActionButton.d.ts.map +0 -1
  190. package/lib/typescript/react-query/components/query-browser/ClearCacheButton.d.ts.map +0 -1
  191. package/lib/typescript/react-query/components/query-browser/Explorer.d.ts.map +0 -1
  192. package/lib/typescript/react-query/components/query-browser/MutationButton.d.ts.map +0 -1
  193. package/lib/typescript/react-query/components/query-browser/MutationDetails.d.ts.map +0 -1
  194. package/lib/typescript/react-query/components/query-browser/MutationDetailsChips.d.ts.map +0 -1
  195. package/lib/typescript/react-query/components/query-browser/MutationInformation.d.ts.map +0 -1
  196. package/lib/typescript/react-query/components/query-browser/MutationStatusCount.d.ts.map +0 -1
  197. package/lib/typescript/react-query/components/query-browser/MutationsList.d.ts.map +0 -1
  198. package/lib/typescript/react-query/components/query-browser/NetworkToggleButton.d.ts.map +0 -1
  199. package/lib/typescript/react-query/components/query-browser/QueryActions.d.ts.map +0 -1
  200. package/lib/typescript/react-query/components/query-browser/QueryBrowser.d.ts.map +0 -1
  201. package/lib/typescript/react-query/components/query-browser/QueryDetails.d.ts.map +0 -1
  202. package/lib/typescript/react-query/components/query-browser/QueryDetailsChip.d.ts.map +0 -1
  203. package/lib/typescript/react-query/components/query-browser/QueryInformation.d.ts.map +0 -1
  204. package/lib/typescript/react-query/components/query-browser/QueryRow.d.ts.map +0 -1
  205. package/lib/typescript/react-query/components/query-browser/QueryStatus.d.ts.map +0 -1
  206. package/lib/typescript/react-query/components/query-browser/QueryStatusCount.d.ts.map +0 -1
  207. package/lib/typescript/react-query/components/query-browser/StorageStatusCount.d.ts.map +0 -1
  208. package/lib/typescript/react-query/components/query-browser/index.d.ts.map +0 -1
  209. package/lib/typescript/react-query/components/query-browser/svgs.d.ts.map +0 -1
  210. package/lib/typescript/react-query/hooks/useActionButtons.d.ts.map +0 -1
  211. package/lib/typescript/react-query/hooks/useAllMutations.d.ts.map +0 -1
  212. package/lib/typescript/react-query/hooks/useAllQueries.d.ts.map +0 -1
  213. package/lib/typescript/react-query/hooks/useModalManager.d.ts.map +0 -1
  214. package/lib/typescript/react-query/hooks/useModalPersistence.d.ts.map +0 -1
  215. package/lib/typescript/react-query/hooks/useMutationActionButtons.d.ts.map +0 -1
  216. package/lib/typescript/react-query/hooks/useQueryStatusCounts.d.ts.map +0 -1
  217. package/lib/typescript/react-query/hooks/useReactQueryState.d.ts.map +0 -1
  218. package/lib/typescript/react-query/hooks/useSelectedMutation.d.ts.map +0 -1
  219. package/lib/typescript/react-query/hooks/useSelectedQuery.d.ts.map +0 -1
  220. package/lib/typescript/react-query/hooks/useStorageQueryCounts.d.ts.map +0 -1
  221. package/lib/typescript/react-query/hooks/useWifiState.d.ts.map +0 -1
  222. package/lib/typescript/react-query/stores/reactQueryEventStore.d.ts.map +0 -1
  223. package/lib/typescript/react-query/sync/dehydrate.d.ts.map +0 -1
  224. package/lib/typescript/react-query/sync/reactQuerySyncAdapter.d.ts.map +0 -1
  225. package/lib/typescript/react-query/sync/snapshotProvider.d.ts.map +0 -1
  226. package/lib/typescript/react-query/sync/useReactQuerySyncAdapter.d.ts.map +0 -1
  227. package/lib/typescript/react-query/types/types.d.ts.map +0 -1
  228. package/lib/typescript/react-query/utils/actions/deleteItem.d.ts.map +0 -1
  229. package/lib/typescript/react-query/utils/actions/emitDevToolsEvent.d.ts.map +0 -1
  230. package/lib/typescript/react-query/utils/actions/invalidate.d.ts.map +0 -1
  231. package/lib/typescript/react-query/utils/actions/refetch.d.ts.map +0 -1
  232. package/lib/typescript/react-query/utils/actions/remove.d.ts.map +0 -1
  233. package/lib/typescript/react-query/utils/actions/reset.d.ts.map +0 -1
  234. package/lib/typescript/react-query/utils/actions/triggerError.d.ts.map +0 -1
  235. package/lib/typescript/react-query/utils/actions/triggerLoading.d.ts.map +0 -1
  236. package/lib/typescript/react-query/utils/deleteNestedDataByPath.d.ts.map +0 -1
  237. package/lib/typescript/react-query/utils/getQueryStatusColor.d.ts.map +0 -1
  238. package/lib/typescript/react-query/utils/getQueryStatusLabel.d.ts.map +0 -1
  239. package/lib/typescript/react-query/utils/getStorageQueryCounts.d.ts.map +0 -1
  240. package/lib/typescript/react-query/utils/modalStorageOperations.d.ts.map +0 -1
  241. package/lib/typescript/react-query/utils/storageQueryUtils.d.ts.map +0 -1
  242. package/lib/typescript/react-query/utils/testIDs.d.ts.map +0 -1
  243. package/lib/typescript/react-query/utils/updateNestedDataByPath.d.ts.map +0 -1
@@ -1,239 +1 @@
1
- "use strict";
2
-
3
- /**
4
- * Pre-configured React Query devtools for FloatingDevTools
5
- *
6
- * This preset provides a zero-config way to add React Query inspection to your dev tools.
7
- * Just import and add it to your apps array!
8
- *
9
- * @example
10
- * ```tsx
11
- * import { reactQueryToolPreset } from '@buoy-gg/react-query';
12
- *
13
- * const installedApps = [
14
- * reactQueryToolPreset, // That's it!
15
- * // ...other tools
16
- * ];
17
- * ```
18
- */
19
-
20
- import { QueryIcon } from "@buoy-gg/floating-tools-core";
21
- import { Wifi } from "@buoy-gg/shared-ui";
22
- import { ReactQueryDevToolsModal } from "./react-query/components/ReactQueryDevToolsModal";
23
- import { onlineManager } from "@tanstack/react-query";
24
- import { devToolsStorageKeys, persistentStorage } from "@buoy-gg/shared-ui";
25
-
26
- // Empty component for toggle-only mode
27
- const EmptyComponent = () => null;
28
-
29
- // Save WiFi state to storage
30
- const saveWifiState = async enabled => {
31
- try {
32
- await persistentStorage.setItem(devToolsStorageKeys.settings.wifiEnabled(), enabled.toString());
33
- } catch (error) {
34
- // Failed to save WiFi state
35
- }
36
- };
37
-
38
- /**
39
- * Restore the persisted WiFi state into onlineManager on app load.
40
- *
41
- * The toggle is rendered as a `toggle-only` tool whose state lives in
42
- * `onlineManager`, not in a mounted React component. The `useWifiState` hook
43
- * only restores when its component (the modal) mounts, so without this the
44
- * persisted offline state is lost on reload and defaults back to online.
45
- * Running this at module load ensures the saved state is applied eagerly.
46
- */
47
- const restoreWifiState = async () => {
48
- try {
49
- const savedState = await persistentStorage.getItem(devToolsStorageKeys.settings.wifiEnabled());
50
- if (savedState !== null) {
51
- onlineManager.setOnline(savedState === "true");
52
- }
53
- } catch (error) {
54
- // Failed to restore WiFi state
55
- }
56
- };
57
-
58
- // Eagerly restore persisted WiFi state on import so offline mode survives reloads.
59
- restoreWifiState();
60
- import { useState, useEffect } from "react";
61
-
62
- /**
63
- * WiFi icon component - uses hooks to subscribe to onlineManager changes.
64
- *
65
- * ⚠️ IMPORTANT - DO NOT MODIFY THIS COMPONENT ⚠️
66
- * This component MUST use useState and useEffect hooks to subscribe to onlineManager.
67
- * It is rendered as a JSX component (<IconComponent />) in FloatingMenu and DialIcon,
68
- * which allows hooks to work properly.
69
- *
70
- * If you remove the hooks or change this to read onlineManager.isOnline() directly,
71
- * the icon color will NOT update when the WiFi toggle is pressed.
72
- *
73
- * See: FloatingMenu.tsx (renders as <IconComponent />)
74
- * See: DialIcon.tsx (renders as <icon.iconComponent />)
75
- */
76
- import { jsx as _jsx } from "react/jsx-runtime";
77
- function WifiIcon({
78
- size
79
- }) {
80
- const [isOnline, setIsOnline] = useState(() => onlineManager.isOnline());
81
- useEffect(() => {
82
- const unsubscribe = onlineManager.subscribe(online => {
83
- setIsOnline(online);
84
- });
85
- return unsubscribe;
86
- }, []);
87
- const color = isOnline ? "#10B981" : "#DC2626";
88
- return /*#__PURE__*/_jsx(Wifi, {
89
- size: size,
90
- color: color
91
- });
92
- }
93
-
94
- /**
95
- * Pre-configured React Query devtools for FloatingDevTools.
96
- * Includes:
97
- * - Query browser and inspector
98
- * - Mutation tracking
99
- * - Cache inspection
100
- * - Query invalidation
101
- * - Performance monitoring
102
- */
103
- export const reactQueryToolPreset = {
104
- id: "query",
105
- name: "QUERY",
106
- description: "React Query inspector",
107
- slot: "both",
108
- icon: ({
109
- size
110
- }) => /*#__PURE__*/_jsx(QueryIcon, {
111
- size: size
112
- }),
113
- component: ReactQueryDevToolsModal,
114
- props: {
115
- enableSharedModalDimensions: false
116
- }
117
- };
118
-
119
- /**
120
- * Create a custom React Query devtools configuration.
121
- * Use this if you want to override default settings.
122
- *
123
- * @example
124
- * ```tsx
125
- * import { createReactQueryTool } from '@buoy-gg/react-query';
126
- *
127
- * const myQueryTool = createReactQueryTool({
128
- * name: "TANSTACK",
129
- * colorPreset: "purple",
130
- * enableSharedModalDimensions: true,
131
- * });
132
- * ```
133
- */
134
- export function createReactQueryTool(options) {
135
- return {
136
- id: options?.id || "query",
137
- name: options?.name || "QUERY",
138
- description: options?.description || "React Query inspector",
139
- slot: "both",
140
- icon: ({
141
- size
142
- }) => /*#__PURE__*/_jsx(QueryIcon, {
143
- size: size
144
- }),
145
- component: ReactQueryDevToolsModal,
146
- props: {
147
- enableSharedModalDimensions: options?.enableSharedModalDimensions !== undefined ? options.enableSharedModalDimensions : false
148
- }
149
- };
150
- }
151
-
152
- /**
153
- * Pre-configured WiFi toggle tool for FloatingDevTools.
154
- * Allows toggling React Query's online state to simulate offline scenarios.
155
- * Simple toggle - no modal needed!
156
- *
157
- * @example
158
- * ```tsx
159
- * import { wifiTogglePreset } from '@buoy-gg/react-query';
160
- *
161
- * const installedApps = [
162
- * wifiTogglePreset, // That's it!
163
- * // ...other tools
164
- * ];
165
- * ```
166
- */
167
- export const wifiTogglePreset = {
168
- id: "query-wifi-toggle",
169
- name: "WIFI",
170
- description: "Toggle React Query online/offline state",
171
- slot: "row",
172
- icon: WifiIcon,
173
- component: EmptyComponent,
174
- props: {},
175
- launchMode: "toggle-only",
176
- onPress: () => {
177
- const newState = !onlineManager.isOnline();
178
- onlineManager.setOnline(newState);
179
- saveWifiState(newState);
180
- }
181
- };
182
-
183
- /**
184
- * Create a custom WiFi toggle tool configuration.
185
- * Use this if you want to override default settings.
186
- *
187
- * @example
188
- * ```tsx
189
- * import { createWifiToggleTool } from '@buoy-gg/react-query';
190
- *
191
- * const myWifiTool = createWifiToggleTool({
192
- * name: "OFFLINE",
193
- * onColor: "#10B981",
194
- * offColor: "#DC2626",
195
- * });
196
- * ```
197
- */
198
- export function createWifiToggleTool(options) {
199
- const onColor = options?.onColor || "#10B981";
200
- const offColor = options?.offColor || "#DC2626";
201
-
202
- /**
203
- * Custom WiFi icon component with hooks - rendered as JSX component.
204
- *
205
- * ⚠️ IMPORTANT - DO NOT MODIFY THIS COMPONENT ⚠️
206
- * This component MUST use useState and useEffect hooks to subscribe to onlineManager.
207
- * See the comment on WifiIcon above for full explanation.
208
- */
209
- const CustomWifiIcon = ({
210
- size
211
- }) => {
212
- const [isOnline, setIsOnline] = useState(() => onlineManager.isOnline());
213
- useEffect(() => {
214
- const unsubscribe = onlineManager.subscribe(online => {
215
- setIsOnline(online);
216
- });
217
- return unsubscribe;
218
- }, []);
219
- return /*#__PURE__*/_jsx(Wifi, {
220
- size: size,
221
- color: isOnline ? onColor : offColor
222
- });
223
- };
224
- return {
225
- id: options?.id || "query-wifi-toggle",
226
- name: options?.name || "WIFI",
227
- description: options?.description || "Toggle React Query online/offline state",
228
- slot: "row",
229
- icon: CustomWifiIcon,
230
- component: EmptyComponent,
231
- props: {},
232
- launchMode: "toggle-only",
233
- onPress: () => {
234
- const newState = !onlineManager.isOnline();
235
- onlineManager.setOnline(newState);
236
- saveWifiState(newState);
237
- }
238
- };
239
- }
1
+ "use strict";import{QueryIcon as l}from"@buoy-gg/floating-tools-core";import{Wifi as a}from"@buoy-gg/shared-ui";import{ReactQueryDevToolsModal as u}from"./react-query/components/ReactQueryDevToolsModal";import{onlineManager as o}from"@tanstack/react-query";import{devToolsStorageKeys as f,persistentStorage as m}from"@buoy-gg/shared-ui";const d=()=>null;const p=async e=>{try{await m.setItem(f.settings.wifiEnabled(),e.toString())}catch(n){}};const I=async()=>{try{const e=await m.getItem(f.settings.wifiEnabled());if(e!==null){o.setOnline(e==="true")}}catch(e){}};I();import{useState as g,useEffect as y}from"react";import{jsx as i}from"react/jsx-runtime";function O({size:e}){const[n,r]=g(()=>o.isOnline());y(()=>{const t=o.subscribe(c=>{r(c)});return t},[]);const s=n?"#10B981":"#DC2626";return i(a,{size:e,color:s})}export const reactQueryToolPreset={id:"query",name:"QUERY",description:"React Query inspector",slot:"both",icon:({size:e})=>i(l,{size:e}),component:u,props:{enableSharedModalDimensions:false}};export function createReactQueryTool(e){return{id:e?.id||"query",name:e?.name||"QUERY",description:e?.description||"React Query inspector",slot:"both",icon:({size:n})=>i(l,{size:n}),component:u,props:{enableSharedModalDimensions:e?.enableSharedModalDimensions!==void 0?e.enableSharedModalDimensions:false}}}export const wifiTogglePreset={id:"query-wifi-toggle",name:"WIFI",description:"Toggle React Query online/offline state",slot:"row",icon:O,component:d,props:{},launchMode:"toggle-only",onPress:()=>{const e=!o.isOnline();o.setOnline(e);p(e)}};export function createWifiToggleTool(e){const n=e?.onColor||"#10B981";const r=e?.offColor||"#DC2626";const s=({size:t})=>{const[c,b]=g(()=>o.isOnline());y(()=>{const S=o.subscribe(w=>{b(w)});return S},[]);return i(a,{size:t,color:c?n:r})};return{id:e?.id||"query-wifi-toggle",name:e?.name||"WIFI",description:e?.description||"Toggle React Query online/offline state",slot:"row",icon:s,component:d,props:{},launchMode:"toggle-only",onPress:()=>{const t=!o.isOnline();o.setOnline(t);p(t)}}}
@@ -1,311 +1 @@
1
- "use strict";
2
-
3
- import { View, Text, StyleSheet, ScrollView } from "react-native";
4
- import { useQueryClient } from "@tanstack/react-query";
5
- import { useSafeAreaInsets, night, monoFont } from "@buoy-gg/shared-ui";
6
- import Explorer from "./query-browser/Explorer";
7
- import QueryDetails from "./query-browser/QueryDetails";
8
- import ActionButton from "./query-browser/ActionButton";
9
- import { getQueryStatusLabel } from "../utils/getQueryStatusLabel";
10
- import { useActionButtons } from "../hooks/useActionButtons";
11
- import { DataViewer } from "@buoy-gg/shared-ui/dataViewer";
12
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
13
- /**
14
- * Primary data editing surface displayed inside the React Query modal. Couples the editable
15
- * explorer, read-only insight panels, and action footer for the selected query.
16
- */
17
- export function DataEditorMode({
18
- selectedQuery,
19
- isFloatingMode,
20
- disableInternalFooter = false,
21
- queryVersion
22
- }) {
23
- const insets = useSafeAreaInsets({
24
- minBottom: 16
25
- });
26
- const queryClient = useQueryClient();
27
- const actionButtons = useActionButtons(selectedQuery, queryClient, queryVersion);
28
- return /*#__PURE__*/_jsxs(_Fragment, {
29
- children: [/*#__PURE__*/_jsxs(ScrollView, {
30
- testID: "buoy-rq-detail-scroll",
31
- accessibilityLabel: "Data editor mode",
32
- accessibilityHint: "View data editor mode",
33
- "sentry-label": "ignore data editor mode",
34
- style: styles.explorerScrollContainer,
35
- contentContainerStyle: [styles.explorerScrollContent, !disableInternalFooter && {
36
- paddingBottom: 72
37
- }],
38
- children: [/*#__PURE__*/_jsxs(View, {
39
- style: styles.section,
40
- children: [/*#__PURE__*/_jsx(DataExplorer, {
41
- visible: !!selectedQuery.state.data,
42
- selectedQuery: selectedQuery,
43
- queryVersion: queryVersion
44
- }), /*#__PURE__*/_jsx(DataEmptyState, {
45
- visible: !selectedQuery.state.data,
46
- selectedQuery: selectedQuery
47
- })]
48
- }), /*#__PURE__*/_jsx(View, {
49
- style: styles.section,
50
- children: /*#__PURE__*/_jsx(QueryDetails, {
51
- query: selectedQuery
52
- })
53
- }), /*#__PURE__*/_jsx(View, {
54
- style: styles.section,
55
- children: /*#__PURE__*/_jsxs(View, {
56
- style: styles.queryExplorerContainer,
57
- children: [/*#__PURE__*/_jsx(Text, {
58
- testID: "buoy-rq-query-explorer-header",
59
- style: styles.queryExplorerHeader,
60
- children: "Query Explorer"
61
- }), /*#__PURE__*/_jsx(View, {
62
- style: styles.queryExplorerContent,
63
- children: /*#__PURE__*/_jsx(DataViewer, {
64
- title: "",
65
- data: selectedQuery,
66
- maxDepth: 10,
67
- rawMode: true,
68
- showTypeFilter: true,
69
- initialExpanded: false
70
- })
71
- })]
72
- })
73
- })]
74
- }), !disableInternalFooter && /*#__PURE__*/_jsx(View, {
75
- style: [styles.actionFooter, {
76
- paddingBottom: isFloatingMode ? 0 : insets.bottom + 8
77
- }],
78
- children: /*#__PURE__*/_jsx(View, {
79
- style: styles.actionsRow,
80
- children: actionButtons.map((action, index) => /*#__PURE__*/_jsx(ActionButton, {
81
- testID: `buoy-rq-action-${action.variant}`,
82
- onClick: action.onPress,
83
- text: action.label,
84
- variant: action.variant,
85
- disabled: action.disabled
86
- }, index))
87
- })
88
- })]
89
- });
90
- }
91
-
92
- // External footer component for sticky modal footer usage
93
- /**
94
- * Standalone footer variant that can be composed into sticky modal layouts while reusing the
95
- * standard action button arrangement.
96
- */
97
- export function DataEditorActionsFooter({
98
- selectedQuery,
99
- isFloatingMode,
100
- queryVersion
101
- }) {
102
- const insets = useSafeAreaInsets({
103
- minBottom: 16
104
- });
105
- const queryClient = useQueryClient();
106
- const actionButtons = useActionButtons(selectedQuery, queryClient, queryVersion);
107
- return /*#__PURE__*/_jsx(View, {
108
- style: [styles.actionFooter, {
109
- paddingBottom: isFloatingMode ? 0 : insets.bottom + 8
110
- }],
111
- children: /*#__PURE__*/_jsx(View, {
112
- style: styles.actionsRow,
113
- children: actionButtons.map((action, index) => /*#__PURE__*/_jsx(ActionButton, {
114
- testID: `buoy-rq-action-${action.variant}`,
115
- onClick: action.onPress,
116
- text: action.label,
117
- variant: action.variant,
118
- disabled: action.disabled
119
- }, index))
120
- })
121
- });
122
- }
123
- function DataExplorer({
124
- visible,
125
- selectedQuery,
126
- queryVersion = 0
127
- }) {
128
- if (!visible) return null;
129
- return /*#__PURE__*/_jsxs(View, {
130
- style: styles.dataContainer,
131
- children: [/*#__PURE__*/_jsx(Text, {
132
- testID: "buoy-rq-data-header",
133
- style: styles.dataHeader,
134
- children: "Data Editor"
135
- }), /*#__PURE__*/_jsx(View, {
136
- style: styles.dataContent,
137
- children: /*#__PURE__*/_jsx(Explorer, {
138
- editable: true,
139
- label: "Data",
140
- value: selectedQuery.state.data,
141
- defaultExpanded: ["Data"],
142
- activeQuery: selectedQuery,
143
- dataVersion: queryVersion
144
- })
145
- })]
146
- });
147
- }
148
- function DataEmptyState({
149
- visible,
150
- selectedQuery
151
- }) {
152
- if (!visible) return null;
153
- const getEmptyStateContent = () => {
154
- // Check if query is disabled first
155
- if (selectedQuery.isDisabled()) {
156
- return {
157
- title: "Query Disabled",
158
- description: "This query is disabled and won't automatically fetch. Enable the query or manually trigger a fetch to load data."
159
- };
160
- }
161
- if (selectedQuery.state.status === "pending" || getQueryStatusLabel(selectedQuery) === "fetching") {
162
- return {
163
- title: selectedQuery.state.status === "pending" ? "Loading..." : "Refetching...",
164
- description: "Please wait while the query is being executed."
165
- };
166
- }
167
- if (selectedQuery.state.status === "error") {
168
- return {
169
- title: "Query Error",
170
- description: selectedQuery.state.error?.message || "An error occurred while fetching data."
171
- };
172
- }
173
- return {
174
- title: "No Data Available",
175
- description: "This query has no data to edit. Try refetching the query first."
176
- };
177
- };
178
- const {
179
- title,
180
- description
181
- } = getEmptyStateContent();
182
- return /*#__PURE__*/_jsxs(View, {
183
- style: styles.emptyState,
184
- children: [/*#__PURE__*/_jsx(Text, {
185
- testID: "buoy-rq-detail-empty-title",
186
- style: styles.emptyTitle,
187
- children: title
188
- }), /*#__PURE__*/_jsx(Text, {
189
- testID: "buoy-rq-detail-empty-description",
190
- style: styles.emptyDescription,
191
- children: description
192
- })]
193
- });
194
- }
195
- const styles = StyleSheet.create({
196
- // Explorer section
197
- explorerScrollContainer: {
198
- flex: 1
199
- },
200
- explorerScrollContent: {
201
- paddingBottom: 16,
202
- paddingHorizontal: 8,
203
- flexGrow: 1
204
- },
205
- // Section layout matching QueryInformation
206
- section: {
207
- marginBottom: 16
208
- },
209
- // Empty states matching main dev tools
210
- emptyState: {
211
- flex: 1,
212
- justifyContent: "center",
213
- alignItems: "center",
214
- padding: 32
215
- },
216
- emptyTitle: {
217
- color: night.color.text,
218
- fontSize: 18,
219
- fontWeight: "600",
220
- marginBottom: 8,
221
- textAlign: "center"
222
- },
223
- emptyDescription: {
224
- color: night.color.textSecondary,
225
- fontSize: 14,
226
- textAlign: "center",
227
- lineHeight: 20,
228
- maxWidth: 280
229
- },
230
- // Action footer - compact single row layout
231
- actionFooter: {
232
- borderTopWidth: 1,
233
- borderTopColor: night.color.border,
234
- paddingTop: 8,
235
- paddingHorizontal: 12,
236
- // Transparent so the night sheet's star field shows through.
237
- backgroundColor: "transparent",
238
- borderBottomLeftRadius: 14,
239
- borderBottomRightRadius: 14
240
- },
241
- actionsRow: {
242
- flexDirection: "row",
243
- alignItems: "center",
244
- gap: 8
245
- },
246
- // Query Explorer styled container matching QueryDetails
247
- queryExplorerContainer: {
248
- minWidth: 200,
249
- backgroundColor: night.color.surface,
250
- borderRadius: 6,
251
- borderWidth: 1,
252
- borderColor: night.color.accent + "4D",
253
- overflow: "hidden",
254
- shadowColor: night.color.accent,
255
- shadowOffset: {
256
- width: 0,
257
- height: 0
258
- },
259
- shadowOpacity: 0.1,
260
- shadowRadius: 6
261
- },
262
- queryExplorerHeader: {
263
- backgroundColor: night.color.accent + "1A",
264
- paddingHorizontal: 12,
265
- paddingVertical: 10,
266
- fontWeight: "600",
267
- fontSize: 12,
268
- color: night.color.accent,
269
- borderBottomWidth: 1,
270
- borderBottomColor: night.color.accent + "33",
271
- letterSpacing: 0.5,
272
- textTransform: "uppercase",
273
- fontFamily: monoFont
274
- },
275
- queryExplorerContent: {
276
- padding: 8
277
- },
278
- // Data section with teal accent - editable/success theme
279
- dataContainer: {
280
- minWidth: 200,
281
- backgroundColor: night.color.surface,
282
- borderRadius: 6,
283
- borderWidth: 1,
284
- borderColor: night.color.accent + "4D",
285
- overflow: "hidden",
286
- shadowColor: night.color.accent,
287
- shadowOffset: {
288
- width: 0,
289
- height: 0
290
- },
291
- shadowOpacity: 0.1,
292
- shadowRadius: 6,
293
- marginTop: 8
294
- },
295
- dataHeader: {
296
- backgroundColor: night.color.accent + "1A",
297
- paddingHorizontal: 12,
298
- paddingVertical: 10,
299
- fontWeight: "600",
300
- fontSize: 12,
301
- color: night.color.accent,
302
- borderBottomWidth: 1,
303
- borderBottomColor: night.color.accent + "33",
304
- letterSpacing: 0.5,
305
- textTransform: "uppercase",
306
- fontFamily: monoFont
307
- },
308
- dataContent: {
309
- padding: 8
310
- }
311
- });
1
+ "use strict";import{View as a,Text as m,StyleSheet as C,ScrollView as w}from"react-native";import{useQueryClient as h}from"@tanstack/react-query";import{useSafeAreaInsets as y,night as o,monoFont as f}from"@buoy-gg/shared-ui";import D from"./query-browser/Explorer";import q from"./query-browser/QueryDetails";import g from"./query-browser/ActionButton";import{getQueryStatusLabel as S}from"../utils/getQueryStatusLabel";import{useActionButtons as b}from"../hooks/useActionButtons";import{DataViewer as B}from"@buoy-gg/shared-ui/dataViewer";import{jsx as t,jsxs as c,Fragment as E}from"react/jsx-runtime";export function DataEditorMode({selectedQuery:r,isFloatingMode:i,disableInternalFooter:n=false,queryVersion:s}){const p=y({minBottom:16});const u=h();const l=b(r,u,s);return c(E,{children:[c(w,{testID:"buoy-rq-detail-scroll",accessibilityLabel:"Data editor mode",accessibilityHint:"View data editor mode","sentry-label":"ignore data editor mode",style:e.explorerScrollContainer,contentContainerStyle:[e.explorerScrollContent,!n&&{paddingBottom:72}],children:[c(a,{style:e.section,children:[t(v,{visible:!!r.state.data,selectedQuery:r,queryVersion:s}),t(T,{visible:!r.state.data,selectedQuery:r})]}),t(a,{style:e.section,children:t(q,{query:r})}),t(a,{style:e.section,children:c(a,{style:e.queryExplorerContainer,children:[t(m,{testID:"buoy-rq-query-explorer-header",style:e.queryExplorerHeader,children:"Query Explorer"}),t(a,{style:e.queryExplorerContent,children:t(B,{title:"",data:r,maxDepth:10,rawMode:true,showTypeFilter:true,initialExpanded:false})})]})})]}),!n&&t(a,{style:[e.actionFooter,{paddingBottom:i?0:p.bottom+8}],children:t(a,{style:e.actionsRow,children:l.map((d,x)=>t(g,{testID:`buoy-rq-action-${d.variant}`,onClick:d.onPress,text:d.label,variant:d.variant,disabled:d.disabled},x))})})]})}export function DataEditorActionsFooter({selectedQuery:r,isFloatingMode:i,queryVersion:n}){const s=y({minBottom:16});const p=h();const u=b(r,p,n);return t(a,{style:[e.actionFooter,{paddingBottom:i?0:s.bottom+8}],children:t(a,{style:e.actionsRow,children:u.map((l,d)=>t(g,{testID:`buoy-rq-action-${l.variant}`,onClick:l.onPress,text:l.label,variant:l.variant,disabled:l.disabled},d))})})}function v({visible:r,selectedQuery:i,queryVersion:n=0}){if(!r)return null;return c(a,{style:e.dataContainer,children:[t(m,{testID:"buoy-rq-data-header",style:e.dataHeader,children:"Data Editor"}),t(a,{style:e.dataContent,children:t(D,{editable:true,label:"Data",value:i.state.data,defaultExpanded:["Data"],activeQuery:i,dataVersion:n})})]})}function T({visible:r,selectedQuery:i}){if(!r)return null;const n=()=>{if(i.isDisabled()){return{title:"Query Disabled",description:"This query is disabled and won't automatically fetch. Enable the query or manually trigger a fetch to load data."}}if(i.state.status==="pending"||S(i)==="fetching"){return{title:i.state.status==="pending"?"Loading...":"Refetching...",description:"Please wait while the query is being executed."}}if(i.state.status==="error"){return{title:"Query Error",description:i.state.error?.message||"An error occurred while fetching data."}}return{title:"No Data Available",description:"This query has no data to edit. Try refetching the query first."}};const{title:s,description:p}=n();return c(a,{style:e.emptyState,children:[t(m,{testID:"buoy-rq-detail-empty-title",style:e.emptyTitle,children:s}),t(m,{testID:"buoy-rq-detail-empty-description",style:e.emptyDescription,children:p})]})}const e=C.create({explorerScrollContainer:{flex:1},explorerScrollContent:{paddingBottom:16,paddingHorizontal:8,flexGrow:1},section:{marginBottom:16},emptyState:{flex:1,justifyContent:"center",alignItems:"center",padding:32},emptyTitle:{color:o.color.text,fontSize:18,fontWeight:"600",marginBottom:8,textAlign:"center"},emptyDescription:{color:o.color.textSecondary,fontSize:14,textAlign:"center",lineHeight:20,maxWidth:280},actionFooter:{borderTopWidth:1,borderTopColor:o.color.border,paddingTop:8,paddingHorizontal:12,backgroundColor:"transparent",borderBottomLeftRadius:14,borderBottomRightRadius:14},actionsRow:{flexDirection:"row",alignItems:"center",gap:8},queryExplorerContainer:{minWidth:200,backgroundColor:o.color.surface,borderRadius:6,borderWidth:1,borderColor:o.color.accent+"4D",overflow:"hidden",shadowColor:o.color.accent,shadowOffset:{width:0,height:0},shadowOpacity:.1,shadowRadius:6},queryExplorerHeader:{backgroundColor:o.color.accent+"1A",paddingHorizontal:12,paddingVertical:10,fontWeight:"600",fontSize:12,color:o.color.accent,borderBottomWidth:1,borderBottomColor:o.color.accent+"33",letterSpacing:.5,textTransform:"uppercase",fontFamily:f},queryExplorerContent:{padding:8},dataContainer:{minWidth:200,backgroundColor:o.color.surface,borderRadius:6,borderWidth:1,borderColor:o.color.accent+"4D",overflow:"hidden",shadowColor:o.color.accent,shadowOffset:{width:0,height:0},shadowOpacity:.1,shadowRadius:6,marginTop:8},dataHeader:{backgroundColor:o.color.accent+"1A",paddingHorizontal:12,paddingVertical:10,fontWeight:"600",fontSize:12,color:o.color.accent,borderBottomWidth:1,borderBottomColor:o.color.accent+"33",letterSpacing:.5,textTransform:"uppercase",fontFamily:f},dataContent:{padding:8}});
@@ -1,51 +1 @@
1
- "use strict";
2
-
3
- import { View, Text, StyleSheet, TouchableOpacity } from "react-native";
4
- import { night, monoFont } from "@buoy-gg/shared-ui";
5
- import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
6
- /**
7
- * Compact badge showing filter status (e.g., "Showing 5 of 12")
8
- * Displayed below the header when filters are active
9
- */
10
- export function FilterStatusBadge({
11
- totalCount,
12
- filteredCount,
13
- onPress
14
- }) {
15
- // Don't show if no filtering is happening
16
- if (filteredCount === totalCount) {
17
- return null;
18
- }
19
- const content = /*#__PURE__*/_jsx(View, {
20
- style: styles.container,
21
- children: /*#__PURE__*/_jsxs(Text, {
22
- testID: "buoy-rq-filter-badge",
23
- style: styles.text,
24
- children: ["Showing ", filteredCount, " of ", totalCount]
25
- })
26
- });
27
- if (onPress) {
28
- return /*#__PURE__*/_jsx(TouchableOpacity, {
29
- testID: "buoy-rq-filter-badge-button",
30
- accessibilityRole: "button",
31
- accessibilityLabel: `Showing ${filteredCount} of ${totalCount}, open filters`,
32
- onPress: onPress,
33
- activeOpacity: 0.7,
34
- children: content
35
- });
36
- }
37
- return content;
38
- }
39
- const styles = StyleSheet.create({
40
- container: {
41
- flexDirection: "row",
42
- alignItems: "center",
43
- justifyContent: "center",
44
- paddingVertical: 2
45
- },
46
- text: {
47
- fontSize: 9,
48
- color: night.color.textTertiary,
49
- fontFamily: monoFont
50
- }
51
- });
1
+ "use strict";import{View as s,Text as c,StyleSheet as l,TouchableOpacity as a}from"react-native";import{night as f,monoFont as y}from"@buoy-gg/shared-ui";import{jsxs as b,jsx as n}from"react/jsx-runtime";export function FilterStatusBadge({totalCount:t,filteredCount:e,onPress:i}){if(e===t){return null}const r=n(s,{style:o.container,children:b(c,{testID:"buoy-rq-filter-badge",style:o.text,children:["Showing ",e," of ",t]})});if(i){return n(a,{testID:"buoy-rq-filter-badge-button",accessibilityRole:"button",accessibilityLabel:`Showing ${e} of ${t}, open filters`,onPress:i,activeOpacity:.7,children:r})}return r}const o=l.create({container:{flexDirection:"row",alignItems:"center",justifyContent:"center",paddingVertical:2},text:{fontSize:9,color:f.color.textTertiary,fontFamily:y}});
@@ -1,47 +1 @@
1
- "use strict";
2
-
3
- import { View, StyleSheet } from "react-native";
4
- import MutationsList from "./query-browser/MutationsList";
5
- import { jsx as _jsx } from "react/jsx-runtime";
6
- /**
7
- * Layout wrapper that renders the mutation list alongside selection handling glue logic used by
8
- * the React Query modal.
9
- */
10
- export function MutationBrowserMode({
11
- selectedMutation,
12
- onMutationSelect,
13
- activeFilter,
14
- searchText = ""
15
- }) {
16
- // Convert function to Dispatch compatible format
17
- const handleMutationSelect = action => {
18
- if (typeof action === "function") {
19
- onMutationSelect(action(selectedMutation));
20
- } else {
21
- onMutationSelect(action);
22
- }
23
- };
24
- return /*#__PURE__*/_jsx(View, {
25
- style: styles.mutationListContainer,
26
- children: /*#__PURE__*/_jsx(MutationsList, {
27
- selectedMutation: selectedMutation,
28
- setSelectedMutation: handleMutationSelect,
29
- activeFilter: activeFilter,
30
- searchText: searchText,
31
- hideInfoPanel: true,
32
- contentContainerStyle: styles.mutationListContent
33
- })
34
- });
35
- }
36
- const styles = StyleSheet.create({
37
- mutationListContainer: {
38
- flex: 1,
39
- // Transparent so JsModal's ToolBackground shows through (the modal paints opaque base beneath it).
40
- backgroundColor: "transparent"
41
- },
42
- mutationListContent: {
43
- padding: 8,
44
- // Transparent so JsModal's ToolBackground shows through (the modal paints opaque base beneath it).
45
- backgroundColor: "transparent"
46
- }
47
- });
1
+ "use strict";import{View as u,StyleSheet as l}from"react-native";import c from"./query-browser/MutationsList";import{jsx as o}from"react/jsx-runtime";export function MutationBrowserMode({selectedMutation:e,onMutationSelect:n,activeFilter:i,searchText:s=""}){const a=t=>{if(typeof t==="function"){n(t(e))}else{n(t)}};return o(u,{style:r.mutationListContainer,children:o(c,{selectedMutation:e,setSelectedMutation:a,activeFilter:i,searchText:s,hideInfoPanel:true,contentContainerStyle:r.mutationListContent})})}const r=l.create({mutationListContainer:{flex:1,backgroundColor:"transparent"},mutationListContent:{padding:8,backgroundColor:"transparent"}});