@buoy-gg/react-query 7.0.41 → 7.0.43

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 +4 -7
  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,119 +1 @@
1
- "use strict";
2
-
3
- import { useQueryClient } from "@tanstack/react-query";
4
- import ActionButton from "./ActionButton";
5
- import { getQueryStatusLabel } from "../../utils/getQueryStatusLabel";
6
- import triggerLoading from "../../utils/actions/triggerLoading";
7
- import refetch from "../../utils/actions/refetch";
8
- import reset from "../../utils/actions/reset";
9
- import remove from "../../utils/actions/remove";
10
- import invalidate from "../../utils/actions/invalidate";
11
- import triggerError from "../../utils/actions/triggerError";
12
- import { View, Text, StyleSheet } from "react-native";
13
- import { night } from "@buoy-gg/shared-ui";
14
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
15
- /**
16
- * Action panel rendered in query detail views providing mutation simulation and removal controls.
17
- */
18
- export default function QueryActions({
19
- query,
20
- setSelectedQuery
21
- }) {
22
- const queryClient = useQueryClient();
23
- if (query === undefined) {
24
- return null;
25
- }
26
- const queryStatus = query.state.status;
27
- const isFetching = getQueryStatusLabel(query) === "fetching";
28
- return /*#__PURE__*/_jsxs(View, {
29
- style: styles.container,
30
- children: [/*#__PURE__*/_jsxs(View, {
31
- style: styles.section,
32
- children: [/*#__PURE__*/_jsx(Text, {
33
- style: styles.sectionLabel,
34
- children: "Actions"
35
- }), /*#__PURE__*/_jsxs(View, {
36
- style: styles.buttonsRow,
37
- children: [/*#__PURE__*/_jsx(ActionButton, {
38
- disabled: isFetching,
39
- onClick: () => refetch({
40
- query
41
- }),
42
- variant: "refetch",
43
- text: "Refetch"
44
- }), /*#__PURE__*/_jsx(ActionButton, {
45
- disabled: queryStatus === "pending",
46
- onClick: () => invalidate({
47
- query,
48
- queryClient
49
- }),
50
- variant: "invalidate",
51
- text: "Invalidate"
52
- }), /*#__PURE__*/_jsx(ActionButton, {
53
- disabled: queryStatus === "pending",
54
- onClick: () => reset({
55
- queryClient,
56
- query
57
- }),
58
- variant: "reset",
59
- text: "Reset"
60
- }), /*#__PURE__*/_jsx(ActionButton, {
61
- disabled: isFetching,
62
- onClick: () => {
63
- remove({
64
- queryClient,
65
- query
66
- });
67
- setSelectedQuery(undefined);
68
- },
69
- variant: "remove",
70
- text: "Remove"
71
- })]
72
- })]
73
- }), /*#__PURE__*/_jsxs(View, {
74
- style: styles.section,
75
- children: [/*#__PURE__*/_jsx(Text, {
76
- style: styles.sectionLabel,
77
- children: "Triggers"
78
- }), /*#__PURE__*/_jsxs(View, {
79
- style: styles.buttonsRow,
80
- children: [/*#__PURE__*/_jsx(ActionButton, {
81
- disabled: false,
82
- onClick: () => triggerLoading({
83
- query
84
- }),
85
- variant: "triggerLoading",
86
- text: query.state.fetchStatus === "fetching" ? "Restore Loading" : "Trigger Loading"
87
- }), /*#__PURE__*/_jsx(ActionButton, {
88
- disabled: queryStatus === "pending",
89
- onClick: () => triggerError({
90
- query,
91
- queryClient
92
- }),
93
- variant: "triggerError",
94
- text: queryStatus === "error" ? "Restore Error" : "Trigger Error"
95
- })]
96
- })]
97
- })]
98
- });
99
- }
100
- const styles = StyleSheet.create({
101
- container: {
102
- gap: 16
103
- },
104
- section: {
105
- gap: 8
106
- },
107
- sectionLabel: {
108
- fontSize: 11,
109
- fontWeight: "600",
110
- color: night.color.textTertiary,
111
- textTransform: "uppercase",
112
- letterSpacing: 0.5
113
- },
114
- buttonsRow: {
115
- flexDirection: "row",
116
- flexWrap: "wrap",
117
- gap: 8
118
- }
119
- });
1
+ "use strict";import{useQueryClient as g}from"@tanstack/react-query";import i from"./ActionButton";import{getQueryStatusLabel as f}from"../../utils/getQueryStatusLabel";import m from"../../utils/actions/triggerLoading";import p from"../../utils/actions/refetch";import h from"../../utils/actions/reset";import x from"../../utils/actions/remove";import u from"../../utils/actions/invalidate";import b from"../../utils/actions/triggerError";import{View as o,Text as c,StyleSheet as v}from"react-native";import{night as C}from"@buoy-gg/shared-ui";import{jsx as e,jsxs as n}from"react/jsx-runtime";export default function L({query:t,setSelectedQuery:d}){const s=g();if(t===void 0){return null}const a=t.state.status;const l=f(t)==="fetching";return n(o,{style:r.container,children:[n(o,{style:r.section,children:[e(c,{style:r.sectionLabel,children:"Actions"}),n(o,{style:r.buttonsRow,children:[e(i,{disabled:l,onClick:()=>p({query:t}),variant:"refetch",text:"Refetch"}),e(i,{disabled:a==="pending",onClick:()=>u({query:t,queryClient:s}),variant:"invalidate",text:"Invalidate"}),e(i,{disabled:a==="pending",onClick:()=>h({queryClient:s,query:t}),variant:"reset",text:"Reset"}),e(i,{disabled:l,onClick:()=>{x({queryClient:s,query:t});d(void 0)},variant:"remove",text:"Remove"})]})]}),n(o,{style:r.section,children:[e(c,{style:r.sectionLabel,children:"Triggers"}),n(o,{style:r.buttonsRow,children:[e(i,{disabled:false,onClick:()=>m({query:t}),variant:"triggerLoading",text:t.state.fetchStatus==="fetching"?"Restore Loading":"Trigger Loading"}),e(i,{disabled:a==="pending",onClick:()=>b({query:t,queryClient:s}),variant:"triggerError",text:a==="error"?"Restore Error":"Trigger Error"})]})]})]})}const r=v.create({container:{gap:16},section:{gap:8},sectionLabel:{fontSize:11,fontWeight:"600",color:C.color.textTertiary,textTransform:"uppercase",letterSpacing:.5},buttonsRow:{flexDirection:"row",flexWrap:"wrap",gap:8}});
@@ -1,176 +1 @@
1
- "use strict";
2
-
3
- import { useMemo, useCallback } from "react";
4
- import { StyleSheet, FlatList } from "react-native";
5
- import QueryRow from "./QueryRow";
6
- import useAllQueries from "../../hooks/useAllQueries";
7
- import { getQueryStatusLabel } from "../../utils/getQueryStatusLabel";
8
- import { night, ToolEmptyState, EVENT_LIST_PRESET, monoFont } from "@buoy-gg/shared-ui";
9
- import { jsx as _jsx } from "react/jsx-runtime";
10
- /**
11
- * Scrollable list view of cached queries with filtering support and selection handling.
12
- */
13
- export default function QueryBrowser({
14
- selectedQuery,
15
- onQuerySelect,
16
- activeFilter,
17
- emptyStateMessage,
18
- emptyState,
19
- contentContainerStyle,
20
- queries: externalQueries,
21
- searchText = "",
22
- ignoredPatterns = new Set(),
23
- includedPatterns = new Set()
24
- }) {
25
- // Holds all queries using the working hook, or use external queries if provided
26
- const internalQueries = useAllQueries();
27
- const allQueries = externalQueries ?? internalQueries;
28
-
29
- // Filter queries based on active filter, search text, and ignored patterns
30
- const filteredQueries = useMemo(() => {
31
- let filtered = allQueries;
32
-
33
- // Apply status filter
34
- if (activeFilter) {
35
- filtered = filtered.filter(query => {
36
- const status = getQueryStatusLabel(query);
37
- return status === activeFilter;
38
- });
39
- }
40
-
41
- // Apply search filter on query keys
42
- if (searchText) {
43
- const searchLower = searchText.toLowerCase();
44
- filtered = filtered.filter(query => {
45
- if (!query?.queryKey) return false;
46
- const keys = Array.isArray(query.queryKey) ? query.queryKey : [query.queryKey];
47
- const keyString = keys.filter(k => k != null).map(k => String(k)).join(" ").toLowerCase();
48
- return keyString.includes(searchLower);
49
- });
50
- }
51
-
52
- // Apply included patterns filter (show ONLY queries matching any pattern)
53
- // This acts as a whitelist - if any include patterns exist, query must match at least one
54
- if (includedPatterns.size > 0) {
55
- filtered = filtered.filter(query => {
56
- if (!query?.queryKey) return false;
57
- const keys = Array.isArray(query.queryKey) ? query.queryKey : [query.queryKey];
58
- const keyString = keys.filter(k => k != null).map(k => String(k)).join(" ").toLowerCase();
59
-
60
- // Return true if query matches ANY included pattern
61
- return Array.from(includedPatterns).some(pattern => keyString.includes(pattern.toLowerCase()));
62
- });
63
- }
64
-
65
- // Apply ignored patterns filter (hide queries matching any pattern)
66
- if (ignoredPatterns.size > 0) {
67
- filtered = filtered.filter(query => {
68
- if (!query?.queryKey) return true;
69
- const keys = Array.isArray(query.queryKey) ? query.queryKey : [query.queryKey];
70
- const keyString = keys.filter(k => k != null).map(k => String(k)).join(" ").toLowerCase();
71
-
72
- // Return true if NO patterns match (i.e., keep the query)
73
- return !Array.from(ignoredPatterns).some(pattern => keyString.includes(pattern.toLowerCase()));
74
- });
75
- }
76
-
77
- // Sort by most recently updated (dataUpdatedAt descending)
78
- filtered.sort((a, b) => {
79
- const aTime = a.state.dataUpdatedAt || 0;
80
- const bTime = b.state.dataUpdatedAt || 0;
81
- return bTime - aTime; // Most recent first
82
- });
83
- return filtered;
84
- }, [allQueries, activeFilter, searchText, includedPatterns, ignoredPatterns]);
85
-
86
- // Function to handle query selection with stable comparison
87
- const handleQuerySelect = useCallback(query => {
88
- // Compare queries by their queryKey and queryHash for stable selection
89
- const isCurrentlySelected = selectedQuery?.queryHash === query.queryHash;
90
- if (isCurrentlySelected) {
91
- onQuerySelect(undefined); // Deselect
92
- return;
93
- }
94
- onQuerySelect(query);
95
- }, [selectedQuery?.queryHash, onQuerySelect]);
96
- if (filteredQueries.length === 0) {
97
- return /*#__PURE__*/_jsx(ToolEmptyState, {
98
- testID: "buoy-rq-empty",
99
- ...(emptyState ?? {
100
- otto: "empty",
101
- title: "No queries found",
102
- message: emptyStateMessage || (activeFilter ? `No ${activeFilter} queries found` : "No queries found")
103
- })
104
- });
105
- }
106
- return (
107
- /*#__PURE__*/
108
- // Virtualized list with STABLE keys (queryHash). The previous
109
- // ScrollView + map mounted every row, and its key included
110
- // dataUpdatedAt/fetchStatus so rows REMOUNTED on each update — at 300
111
- // seeded queries that measured 168% CPU with 546 row renders during a
112
- // 5s idle dwell (tool-bench 2026-07-06). TanStack Query objects are
113
- // mutable with stable identity, so `stateSig` carries the changing
114
- // fields for the row's memo comparison.
115
- _jsx(FlatList, {
116
- testID: "buoy-rq-query-list",
117
- style: styles.listWrapper,
118
- contentContainerStyle: contentContainerStyle || styles.listContent,
119
- data: filteredQueries,
120
- keyExtractor: queryKeyExtractor,
121
- renderItem: ({
122
- item: query
123
- }) => /*#__PURE__*/_jsx(QueryRow, {
124
- query: query,
125
- stateSig: computeQueryStateSig(query),
126
- isSelected: selectedQuery?.queryHash === query.queryHash,
127
- onSelect: handleQuerySelect
128
- }),
129
- showsVerticalScrollIndicator: true,
130
- ...EVENT_LIST_PRESET
131
- })
132
- );
133
- }
134
- const queryKeyExtractor = q => q.queryHash;
135
-
136
- /** The row-visible slice of a query's mutable state, as a comparable
137
- * string — drives QueryRow's memo (see comment above). */
138
- function computeQueryStateSig(q) {
139
- let observers = 0;
140
- let stale = false;
141
- try {
142
- observers = q.getObserversCount();
143
- stale = q.isStale();
144
- } catch {
145
- // defensive: state reads on a disposed query must not break the list
146
- }
147
- return `${q.state.dataUpdatedAt}|${q.state.fetchStatus}|${q.state.status}|${observers}|${stale}`;
148
- }
149
- const styles = StyleSheet.create({
150
- listWrapper: {
151
- flexGrow: 1
152
- },
153
- listContent: {
154
- paddingBottom: 16,
155
- // Transparent so JsModal's ToolBackground shows through (the modal paints opaque base beneath it).
156
- backgroundColor: "transparent"
157
- },
158
- emptyContainer: {
159
- flex: 1,
160
- justifyContent: "center",
161
- alignItems: "center",
162
- padding: 32,
163
- backgroundColor: night.color.surface,
164
- margin: 16,
165
- borderRadius: 8,
166
- borderWidth: 1,
167
- borderColor: night.color.border
168
- },
169
- emptyText: {
170
- color: night.color.textTertiary,
171
- fontSize: 14,
172
- textAlign: "center",
173
- fontFamily: monoFont,
174
- letterSpacing: 0.5
175
- }
176
- });
1
+ "use strict";import{useMemo as K,useCallback as q}from"react";import{StyleSheet as k,FlatList as L}from"react-native";import x from"./QueryRow";import E from"../../hooks/useAllQueries";import{getQueryStatusLabel as j}from"../../utils/getQueryStatusLabel";import{night as c,ToolEmptyState as H,EVENT_LIST_PRESET as I,monoFont as T}from"@buoy-gg/shared-ui";import{jsx as m}from"react/jsx-runtime";export default function $({selectedQuery:s,onQuerySelect:i,activeFilter:n,emptyStateMessage:g,emptyState:C,contentContainerStyle:b,queries:h,searchText:u="",ignoredPatterns:l=new Set,includedPatterns:y=new Set}){const w=E();const d=h??w;const p=K(()=>{let e=d;if(n){e=e.filter(t=>{const o=j(t);return o===n})}if(u){const t=u.toLowerCase();e=e.filter(o=>{if(!o?.queryKey)return false;const a=Array.isArray(o.queryKey)?o.queryKey:[o.queryKey];const r=a.filter(f=>f!=null).map(f=>String(f)).join(" ").toLowerCase();return r.includes(t)})}if(y.size>0){e=e.filter(t=>{if(!t?.queryKey)return false;const o=Array.isArray(t.queryKey)?t.queryKey:[t.queryKey];const a=o.filter(r=>r!=null).map(r=>String(r)).join(" ").toLowerCase();return Array.from(y).some(r=>a.includes(r.toLowerCase()))})}if(l.size>0){e=e.filter(t=>{if(!t?.queryKey)return true;const o=Array.isArray(t.queryKey)?t.queryKey:[t.queryKey];const a=o.filter(r=>r!=null).map(r=>String(r)).join(" ").toLowerCase();return!Array.from(l).some(r=>a.includes(r.toLowerCase()))})}e.sort((t,o)=>{const a=t.state.dataUpdatedAt||0;const r=o.state.dataUpdatedAt||0;return r-a});return e},[d,n,u,y,l]);const A=q(e=>{const t=s?.queryHash===e.queryHash;if(t){i(void 0);return}i(e)},[s?.queryHash,i]);if(p.length===0){return m(H,{testID:"buoy-rq-empty",...C??{otto:"empty",title:"No queries found",message:g||(n?`No ${n} queries found`:"No queries found")}})}return m(L,{testID:"buoy-rq-query-list",style:S.listWrapper,contentContainerStyle:b||S.listContent,data:p,keyExtractor:Q,renderItem:({item:e})=>m(x,{query:e,stateSig:N(e),isSelected:s?.queryHash===e.queryHash,onSelect:A}),showsVerticalScrollIndicator:true,...I})}const Q=s=>s.queryHash;function N(s){let i=0;let n=false;try{i=s.getObserversCount();n=s.isStale()}catch{}return`${s.state.dataUpdatedAt}|${s.state.fetchStatus}|${s.state.status}|${i}|${n}`}const S=k.create({listWrapper:{flexGrow:1},listContent:{paddingBottom:16,backgroundColor:"transparent"},emptyContainer:{flex:1,justifyContent:"center",alignItems:"center",padding:32,backgroundColor:c.color.surface,margin:16,borderRadius:8,borderWidth:1,borderColor:c.color.border},emptyText:{color:c.color.textTertiary,fontSize:14,textAlign:"center",fontFamily:T,letterSpacing:.5}});
@@ -1,136 +1 @@
1
- "use strict";
2
-
3
- import QueryDetailsChip from "./QueryDetailsChip";
4
- import { View, Text, ScrollView, StyleSheet } from "react-native";
5
- import { displayValue, night, monoFont } from "@buoy-gg/shared-ui";
6
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
7
- /**
8
- * Renders the primary metadata summary for a selected query, including fetch status and timings.
9
- */
10
- export default function QueryDetails({
11
- query
12
- }) {
13
- if (query === undefined) {
14
- return null;
15
- }
16
- // Convert the timestamp to a Date object and format it
17
- const lastUpdated = new Date(query.state.dataUpdatedAt).toLocaleTimeString("en-US", {
18
- hour: "2-digit",
19
- minute: "2-digit",
20
- second: "2-digit",
21
- hour12: true
22
- });
23
- return /*#__PURE__*/_jsxs(View, {
24
- style: styles.minWidth,
25
- children: [/*#__PURE__*/_jsx(Text, {
26
- style: styles.headerText,
27
- children: "Query Details"
28
- }), /*#__PURE__*/_jsxs(View, {
29
- style: styles.row,
30
- children: [/*#__PURE__*/_jsx(ScrollView, {
31
- "sentry-label": "ignore devtools query details scroll",
32
- horizontal: true,
33
- style: styles.flexOne,
34
- children: /*#__PURE__*/_jsx(Text, {
35
- testID: "buoy-rq-detail-key",
36
- style: styles.queryKeyText,
37
- children: displayValue(query.queryKey, true)
38
- })
39
- }), /*#__PURE__*/_jsx(QueryDetailsChip, {
40
- query: query,
41
- testID: "buoy-rq-detail-status"
42
- })]
43
- }), /*#__PURE__*/_jsxs(View, {
44
- style: styles.row,
45
- children: [/*#__PURE__*/_jsx(Text, {
46
- style: styles.labelText,
47
- children: "Observers:"
48
- }), /*#__PURE__*/_jsx(Text, {
49
- testID: "buoy-rq-detail-observers",
50
- style: styles.valueText,
51
- children: `${query.getObserversCount()}`
52
- })]
53
- }), /*#__PURE__*/_jsxs(View, {
54
- style: styles.row,
55
- children: [/*#__PURE__*/_jsx(Text, {
56
- style: styles.labelText,
57
- children: "Last Updated:"
58
- }), /*#__PURE__*/_jsx(Text, {
59
- testID: "buoy-rq-detail-updated",
60
- style: styles.valueText,
61
- children: `${lastUpdated}`
62
- })]
63
- })]
64
- });
65
- }
66
- const styles = StyleSheet.create({
67
- minWidth: {
68
- minWidth: 200,
69
- backgroundColor: night.color.surface,
70
- borderRadius: 6,
71
- borderWidth: 1,
72
- borderColor: night.color.accent + "4D",
73
- overflow: "hidden",
74
- shadowColor: night.color.accent,
75
- shadowOffset: {
76
- width: 0,
77
- height: 0
78
- },
79
- shadowOpacity: 0.1,
80
- shadowRadius: 6
81
- },
82
- headerText: {
83
- backgroundColor: night.color.accent + "15",
84
- paddingHorizontal: 12,
85
- paddingVertical: 10,
86
- fontWeight: "600",
87
- fontSize: 12,
88
- color: night.color.accent,
89
- borderBottomWidth: 1,
90
- borderBottomColor: night.color.accent + "33",
91
- letterSpacing: 0.5,
92
- textTransform: "uppercase",
93
- fontFamily: monoFont
94
- },
95
- row: {
96
- flexDirection: "row",
97
- justifyContent: "space-between",
98
- alignItems: "center",
99
- paddingHorizontal: 12,
100
- paddingVertical: 10,
101
- borderBottomWidth: 1,
102
- borderBottomColor: night.color.separator
103
- },
104
- flexOne: {
105
- flex: 1,
106
- marginRight: 8
107
- },
108
- queryKeyText: {
109
- fontSize: 12,
110
- color: night.color.text,
111
- fontFamily: monoFont,
112
- lineHeight: 18,
113
- flexShrink: 1,
114
- backgroundColor: night.color.accent + "15",
115
- paddingHorizontal: 8,
116
- paddingVertical: 4,
117
- borderRadius: 4,
118
- borderWidth: 1,
119
- borderColor: night.color.accent + "4D"
120
- },
121
- labelText: {
122
- fontSize: 10,
123
- color: night.color.textSecondary,
124
- fontWeight: "600",
125
- letterSpacing: 0.5,
126
- textTransform: "uppercase",
127
- fontFamily: monoFont
128
- },
129
- valueText: {
130
- fontSize: 12,
131
- color: night.color.text,
132
- fontWeight: "500",
133
- fontVariant: ["tabular-nums"],
134
- fontFamily: monoFont
135
- }
136
- });
1
+ "use strict";import s from"./QueryDetailsChip";import{View as i,Text as r,ScrollView as c,StyleSheet as h}from"react-native";import{displayValue as u,night as e,monoFont as a}from"@buoy-gg/shared-ui";import{jsx as o,jsxs as n}from"react/jsx-runtime";export default function y({query:l}){if(l===void 0){return null}const d=new Date(l.state.dataUpdatedAt).toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:true});return n(i,{style:t.minWidth,children:[o(r,{style:t.headerText,children:"Query Details"}),n(i,{style:t.row,children:[o(c,{"sentry-label":"ignore devtools query details scroll",horizontal:true,style:t.flexOne,children:o(r,{testID:"buoy-rq-detail-key",style:t.queryKeyText,children:u(l.queryKey,true)})}),o(s,{query:l,testID:"buoy-rq-detail-status"})]}),n(i,{style:t.row,children:[o(r,{style:t.labelText,children:"Observers:"}),o(r,{testID:"buoy-rq-detail-observers",style:t.valueText,children:`${l.getObserversCount()}`})]}),n(i,{style:t.row,children:[o(r,{style:t.labelText,children:"Last Updated:"}),o(r,{testID:"buoy-rq-detail-updated",style:t.valueText,children:`${d}`})]})]})}const t=h.create({minWidth:{minWidth:200,backgroundColor:e.color.surface,borderRadius:6,borderWidth:1,borderColor:e.color.accent+"4D",overflow:"hidden",shadowColor:e.color.accent,shadowOffset:{width:0,height:0},shadowOpacity:.1,shadowRadius:6},headerText:{backgroundColor:e.color.accent+"15",paddingHorizontal:12,paddingVertical:10,fontWeight:"600",fontSize:12,color:e.color.accent,borderBottomWidth:1,borderBottomColor:e.color.accent+"33",letterSpacing:.5,textTransform:"uppercase",fontFamily:a},row:{flexDirection:"row",justifyContent:"space-between",alignItems:"center",paddingHorizontal:12,paddingVertical:10,borderBottomWidth:1,borderBottomColor:e.color.separator},flexOne:{flex:1,marginRight:8},queryKeyText:{fontSize:12,color:e.color.text,fontFamily:a,lineHeight:18,flexShrink:1,backgroundColor:e.color.accent+"15",paddingHorizontal:8,paddingVertical:4,borderRadius:4,borderWidth:1,borderColor:e.color.accent+"4D"},labelText:{fontSize:10,color:e.color.textSecondary,fontWeight:"600",letterSpacing:.5,textTransform:"uppercase",fontFamily:a},valueText:{fontSize:12,color:e.color.text,fontWeight:"500",fontVariant:["tabular-nums"],fontFamily:a}});
@@ -1,74 +1 @@
1
- "use strict";
2
-
3
- import { getQueryStatusLabel } from "../../utils/getQueryStatusLabel";
4
- import { Text, View, StyleSheet } from "react-native";
5
- import { buoyColors, monoFont } from "@buoy-gg/shared-ui";
6
- import { jsx as _jsx } from "react/jsx-runtime";
7
- const backgroundColors = {
8
- fresh: buoyColors.success + "15",
9
- stale: buoyColors.warning + "15",
10
- fetching: buoyColors.primary + "15",
11
- paused: buoyColors.textMuted + "1A",
12
- noObserver: buoyColors.textMuted + "1A",
13
- error: buoyColors.error + "15",
14
- inactive: buoyColors.textMuted + "1A"
15
- };
16
- const borderColors = {
17
- fresh: buoyColors.success + "33",
18
- stale: buoyColors.warning + "33",
19
- fetching: buoyColors.primary + "33",
20
- paused: buoyColors.textMuted + "33",
21
- noObserver: buoyColors.textMuted + "33",
22
- error: buoyColors.error + "33",
23
- inactive: buoyColors.textMuted + "33"
24
- };
25
- const textColors = {
26
- fresh: buoyColors.success,
27
- stale: buoyColors.warning,
28
- fetching: buoyColors.primary,
29
- paused: buoyColors.textMuted,
30
- noObserver: buoyColors.textMuted,
31
- error: buoyColors.error,
32
- inactive: buoyColors.textMuted
33
- };
34
- /**
35
- * Chip component used to display small query metadata values (status, observers, etc.).
36
- */
37
- export default function QueryDetailsChip({
38
- query,
39
- testID
40
- }) {
41
- const status = getQueryStatusLabel(query);
42
- const backgroundColor = backgroundColors[status];
43
- const borderColor = borderColors[status];
44
- const textColor = textColors[status];
45
- return /*#__PURE__*/_jsx(View, {
46
- style: [styles.container, {
47
- backgroundColor,
48
- borderColor
49
- }],
50
- children: /*#__PURE__*/_jsx(Text, {
51
- testID: testID,
52
- style: [styles.text, {
53
- color: textColor
54
- }],
55
- children: status
56
- })
57
- });
58
- }
59
- const styles = StyleSheet.create({
60
- container: {
61
- paddingHorizontal: 8,
62
- paddingVertical: 4,
63
- borderWidth: 1,
64
- borderRadius: 6,
65
- alignSelf: "flex-start"
66
- },
67
- text: {
68
- fontSize: 11,
69
- fontWeight: "600",
70
- textTransform: "uppercase",
71
- letterSpacing: 0.5,
72
- fontFamily: monoFont
73
- }
74
- });
1
+ "use strict";import{getQueryStatusLabel as u}from"../../utils/getQueryStatusLabel";import{Text as d,View as l,StyleSheet as x}from"react-native";import{buoyColors as t,monoFont as f}from"@buoy-gg/shared-ui";import{jsx as r}from"react/jsx-runtime";const p={fresh:t.success+"15",stale:t.warning+"15",fetching:t.primary+"15",paused:t.textMuted+"1A",noObserver:t.textMuted+"1A",error:t.error+"15",inactive:t.textMuted+"1A"};const g={fresh:t.success+"33",stale:t.warning+"33",fetching:t.primary+"33",paused:t.textMuted+"33",noObserver:t.textMuted+"33",error:t.error+"33",inactive:t.textMuted+"33"};const m={fresh:t.success,stale:t.warning,fetching:t.primary,paused:t.textMuted,noObserver:t.textMuted,error:t.error,inactive:t.textMuted};export default function h({query:s,testID:n}){const e=u(s);const i=p[e];const a=g[e];const c=m[e];return r(l,{style:[o.container,{backgroundColor:i,borderColor:a}],children:r(d,{testID:n,style:[o.text,{color:c}],children:e})})}const o=x.create({container:{paddingHorizontal:8,paddingVertical:4,borderWidth:1,borderRadius:6,alignSelf:"flex-start"},text:{fontSize:11,fontWeight:"600",textTransform:"uppercase",letterSpacing:.5,fontFamily:f}});
@@ -1,90 +1 @@
1
- "use strict";
2
-
3
- import QueryDetails from "./QueryDetails";
4
- import QueryActions from "./QueryActions";
5
- import DataExplorer from "./Explorer";
6
- import { View, Text, ScrollView, StyleSheet } from "react-native";
7
- import { night } from "@buoy-gg/shared-ui";
8
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
9
- /**
10
- * Stacked detail view combining metadata, actions, and explorers for the selected query.
11
- */
12
- export default function QueryInformation({
13
- selectedQuery,
14
- setSelectedQuery
15
- }) {
16
- return /*#__PURE__*/_jsxs(ScrollView, {
17
- "sentry-label": "ignore devtools query info scroll",
18
- style: styles.flexOne,
19
- contentContainerStyle: styles.scrollContent,
20
- children: [/*#__PURE__*/_jsx(View, {
21
- style: styles.section,
22
- children: /*#__PURE__*/_jsx(QueryDetails, {
23
- query: selectedQuery
24
- })
25
- }), /*#__PURE__*/_jsx(View, {
26
- style: styles.section,
27
- children: /*#__PURE__*/_jsx(QueryActions, {
28
- query: selectedQuery,
29
- setSelectedQuery: setSelectedQuery
30
- })
31
- }), /*#__PURE__*/_jsxs(View, {
32
- style: styles.section,
33
- children: [/*#__PURE__*/_jsx(Text, {
34
- style: styles.headerText,
35
- children: "Data Explorer"
36
- }), /*#__PURE__*/_jsx(View, {
37
- style: styles.contentView,
38
- children: /*#__PURE__*/_jsx(DataExplorer, {
39
- editable: true,
40
- label: "Data",
41
- value: selectedQuery?.state.data,
42
- defaultExpanded: ["Data"],
43
- activeQuery: selectedQuery
44
- })
45
- })]
46
- }), /*#__PURE__*/_jsxs(View, {
47
- style: styles.section,
48
- children: [/*#__PURE__*/_jsx(Text, {
49
- style: styles.headerText,
50
- children: "Query Explorer"
51
- }), /*#__PURE__*/_jsx(View, {
52
- style: styles.contentView,
53
- children: /*#__PURE__*/_jsx(DataExplorer, {
54
- label: "Query",
55
- value: selectedQuery,
56
- defaultExpanded: ["Query", "queryKey"],
57
- activeQuery: selectedQuery
58
- })
59
- })]
60
- })]
61
- });
62
- }
63
- const styles = StyleSheet.create({
64
- flexOne: {
65
- flex: 1,
66
- // Transparent so the night sheet's star field shows through.
67
- backgroundColor: "transparent"
68
- },
69
- scrollContent: {
70
- paddingBottom: 16,
71
- paddingHorizontal: 8
72
- },
73
- section: {
74
- marginBottom: 16
75
- },
76
- headerText: {
77
- fontSize: 16,
78
- fontWeight: "600",
79
- color: night.color.text,
80
- marginBottom: 8,
81
- textAlign: "left"
82
- },
83
- contentView: {
84
- backgroundColor: night.color.surface,
85
- borderRadius: 12,
86
- borderWidth: 1,
87
- borderColor: night.color.border,
88
- padding: 16
89
- }
90
- });
1
+ "use strict";import c from"./QueryDetails";import d from"./QueryActions";import i from"./Explorer";import{View as o,Text as a,ScrollView as y,StyleSheet as u}from"react-native";import{night as n}from"@buoy-gg/shared-ui";import{jsx as e,jsxs as l}from"react/jsx-runtime";export default function f({selectedQuery:r,setSelectedQuery:s}){return l(y,{"sentry-label":"ignore devtools query info scroll",style:t.flexOne,contentContainerStyle:t.scrollContent,children:[e(o,{style:t.section,children:e(c,{query:r})}),e(o,{style:t.section,children:e(d,{query:r,setSelectedQuery:s})}),l(o,{style:t.section,children:[e(a,{style:t.headerText,children:"Data Explorer"}),e(o,{style:t.contentView,children:e(i,{editable:true,label:"Data",value:r?.state.data,defaultExpanded:["Data"],activeQuery:r})})]}),l(o,{style:t.section,children:[e(a,{style:t.headerText,children:"Query Explorer"}),e(o,{style:t.contentView,children:e(i,{label:"Query",value:r,defaultExpanded:["Query","queryKey"],activeQuery:r})})]})]})}const t=u.create({flexOne:{flex:1,backgroundColor:"transparent"},scrollContent:{paddingBottom:16,paddingHorizontal:8},section:{marginBottom:16},headerText:{fontSize:16,fontWeight:"600",color:n.color.text,marginBottom:8,textAlign:"left"},contentView:{backgroundColor:n.color.surface,borderRadius:12,borderWidth:1,borderColor:n.color.border,padding:16}});