@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 { View, Text, ScrollView, StyleSheet } from "react-native";
4
- import { displayValue, night, monoFont } from "@buoy-gg/shared-ui";
5
- import MutationDetailsChips from "./MutationDetailsChips";
6
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
7
- /**
8
- * Displays high-level mutation metadata such as status, retries, and timestamps.
9
- */
10
- export default function MutationDetails({
11
- selectedMutation
12
- }) {
13
- if (selectedMutation === undefined) {
14
- return null;
15
- }
16
- const submittedAt = new Date(selectedMutation.state.submittedAt).toLocaleTimeString();
17
- return /*#__PURE__*/_jsxs(View, {
18
- style: styles.minWidth,
19
- children: [/*#__PURE__*/_jsx(Text, {
20
- style: styles.headerText,
21
- children: "Mutation Details"
22
- }), /*#__PURE__*/_jsxs(View, {
23
- style: styles.row,
24
- children: [/*#__PURE__*/_jsx(ScrollView, {
25
- "sentry-label": "ignore devtools mutation details scroll",
26
- horizontal: true,
27
- style: styles.flex1,
28
- children: /*#__PURE__*/_jsx(Text, {
29
- testID: "buoy-rq-mutation-detail-key",
30
- style: styles.flexWrap,
31
- children: `${selectedMutation.options.mutationKey ? displayValue(selectedMutation.options.mutationKey, true) : "No mutationKey found"}`
32
- })
33
- }), /*#__PURE__*/_jsx(MutationDetailsChips, {
34
- status: selectedMutation.state.status,
35
- testID: "buoy-rq-mutation-detail-status"
36
- })]
37
- }), /*#__PURE__*/_jsxs(View, {
38
- style: styles.row,
39
- children: [/*#__PURE__*/_jsx(Text, {
40
- style: styles.labelText,
41
- children: "Submitted At:"
42
- }), /*#__PURE__*/_jsx(Text, {
43
- style: styles.valueText,
44
- children: submittedAt
45
- })]
46
- })]
47
- });
48
- }
49
- const styles = StyleSheet.create({
50
- minWidth: {
51
- minWidth: 200,
52
- backgroundColor: night.color.surface,
53
- borderRadius: 6,
54
- borderWidth: 1,
55
- borderColor: night.color.accent + "4D",
56
- overflow: "hidden",
57
- shadowColor: night.color.accent,
58
- shadowOffset: {
59
- width: 0,
60
- height: 0
61
- },
62
- shadowOpacity: 0.1,
63
- shadowRadius: 6
64
- },
65
- headerText: {
66
- backgroundColor: night.color.accent + "15",
67
- paddingHorizontal: 12,
68
- paddingVertical: 10,
69
- fontWeight: "600",
70
- fontSize: 12,
71
- color: night.color.accent,
72
- borderBottomWidth: 1,
73
- borderBottomColor: night.color.accent + "33",
74
- letterSpacing: 0.5,
75
- textTransform: "uppercase",
76
- fontFamily: monoFont
77
- },
78
- row: {
79
- flexDirection: "row",
80
- justifyContent: "space-between",
81
- alignItems: "center",
82
- paddingHorizontal: 12,
83
- paddingVertical: 10,
84
- borderBottomWidth: 1,
85
- borderBottomColor: night.color.separator
86
- },
87
- flex1: {
88
- flex: 1,
89
- marginRight: 8
90
- },
91
- flexWrap: {
92
- fontSize: 12,
93
- color: night.color.text,
94
- fontFamily: monoFont,
95
- lineHeight: 18,
96
- flexShrink: 1,
97
- backgroundColor: night.color.accent + "15",
98
- paddingHorizontal: 8,
99
- paddingVertical: 4,
100
- borderRadius: 4,
101
- borderWidth: 1,
102
- borderColor: night.color.accent + "4D"
103
- },
104
- labelText: {
105
- fontSize: 10,
106
- color: night.color.textSecondary,
107
- fontWeight: "600",
108
- letterSpacing: 0.5,
109
- textTransform: "uppercase",
110
- fontFamily: monoFont
111
- },
112
- valueText: {
113
- fontSize: 12,
114
- color: night.color.text,
115
- fontWeight: "500",
116
- fontVariant: ["tabular-nums"],
117
- fontFamily: monoFont
118
- }
119
- });
1
+ "use strict";import{View as a,Text as i,ScrollView as s,StyleSheet as c}from"react-native";import{displayValue as u,night as t,monoFont as l}from"@buoy-gg/shared-ui";import f from"./MutationDetailsChips";import{jsx as e,jsxs as n}from"react/jsx-runtime";export default function h({selectedMutation:r}){if(r===void 0){return null}const d=new Date(r.state.submittedAt).toLocaleTimeString();return n(a,{style:o.minWidth,children:[e(i,{style:o.headerText,children:"Mutation Details"}),n(a,{style:o.row,children:[e(s,{"sentry-label":"ignore devtools mutation details scroll",horizontal:true,style:o.flex1,children:e(i,{testID:"buoy-rq-mutation-detail-key",style:o.flexWrap,children:`${r.options.mutationKey?u(r.options.mutationKey,true):"No mutationKey found"}`})}),e(f,{status:r.state.status,testID:"buoy-rq-mutation-detail-status"})]}),n(a,{style:o.row,children:[e(i,{style:o.labelText,children:"Submitted At:"}),e(i,{style:o.valueText,children:d})]})]})}const o=c.create({minWidth:{minWidth:200,backgroundColor:t.color.surface,borderRadius:6,borderWidth:1,borderColor:t.color.accent+"4D",overflow:"hidden",shadowColor:t.color.accent,shadowOffset:{width:0,height:0},shadowOpacity:.1,shadowRadius:6},headerText:{backgroundColor:t.color.accent+"15",paddingHorizontal:12,paddingVertical:10,fontWeight:"600",fontSize:12,color:t.color.accent,borderBottomWidth:1,borderBottomColor:t.color.accent+"33",letterSpacing:.5,textTransform:"uppercase",fontFamily:l},row:{flexDirection:"row",justifyContent:"space-between",alignItems:"center",paddingHorizontal:12,paddingVertical:10,borderBottomWidth:1,borderBottomColor:t.color.separator},flex1:{flex:1,marginRight:8},flexWrap:{fontSize:12,color:t.color.text,fontFamily:l,lineHeight:18,flexShrink:1,backgroundColor:t.color.accent+"15",paddingHorizontal:8,paddingVertical:4,borderRadius:4,borderWidth:1,borderColor:t.color.accent+"4D"},labelText:{fontSize:10,color:t.color.textSecondary,fontWeight:"600",letterSpacing:.5,textTransform:"uppercase",fontFamily:l},valueText:{fontSize:12,color:t.color.text,fontWeight:"500",fontVariant:["tabular-nums"],fontFamily:l}});
@@ -1,64 +1 @@
1
- "use strict";
2
-
3
- import { Text, View, StyleSheet } from "react-native";
4
- import { buoyColors, monoFont } from "@buoy-gg/shared-ui";
5
- import { jsx as _jsx } from "react/jsx-runtime";
6
- const backgroundColors = {
7
- success: buoyColors.success + "15",
8
- error: buoyColors.error + "15",
9
- pending: buoyColors.primary + "15",
10
- idle: buoyColors.textMuted + "1A"
11
- };
12
- const borderColors = {
13
- success: buoyColors.success + "33",
14
- error: buoyColors.error + "33",
15
- pending: buoyColors.primary + "33",
16
- idle: buoyColors.textMuted + "33"
17
- };
18
- const textColors = {
19
- success: buoyColors.success,
20
- error: buoyColors.error,
21
- pending: buoyColors.primary,
22
- idle: buoyColors.textMuted
23
- };
24
- /**
25
- * Small status chip used in mutation detail views that adapts styling to the mutation status.
26
- */
27
- export default function QueryDetailsChip({
28
- status,
29
- testID
30
- }) {
31
- const statusToColor = status;
32
- const backgroundColor = backgroundColors[statusToColor];
33
- const borderColor = borderColors[statusToColor];
34
- const textColor = textColors[statusToColor];
35
- return /*#__PURE__*/_jsx(View, {
36
- style: [styles.container, {
37
- backgroundColor,
38
- borderColor
39
- }],
40
- children: /*#__PURE__*/_jsx(Text, {
41
- testID: testID,
42
- style: [styles.text, {
43
- color: textColor
44
- }],
45
- children: status
46
- })
47
- });
48
- }
49
- const styles = StyleSheet.create({
50
- container: {
51
- paddingHorizontal: 8,
52
- paddingVertical: 4,
53
- borderWidth: 1,
54
- borderRadius: 6,
55
- alignSelf: "flex-start"
56
- },
57
- text: {
58
- fontSize: 11,
59
- fontWeight: "600",
60
- textTransform: "uppercase",
61
- letterSpacing: 0.5,
62
- fontFamily: monoFont
63
- }
64
- });
1
+ "use strict";import{Text as d,View as a,StyleSheet as u}from"react-native";import{buoyColors as r,monoFont as p}from"@buoy-gg/shared-ui";import{jsx as o}from"react/jsx-runtime";const x={success:r.success+"15",error:r.error+"15",pending:r.primary+"15",idle:r.textMuted+"1A"};const m={success:r.success+"33",error:r.error+"33",pending:r.primary+"33",idle:r.textMuted+"33"};const f={success:r.success,error:r.error,pending:r.primary,idle:r.textMuted};export default function g({status:t,testID:n}){const e=t;const c=x[e];const i=m[e];const l=f[e];return o(a,{style:[s.container,{backgroundColor:c,borderColor:i}],children:o(d,{testID:n,style:[s.text,{color:l}],children:t})})}const s=u.create({container:{paddingHorizontal:8,paddingVertical:4,borderWidth:1,borderRadius:6,alignSelf:"flex-start"},text:{fontSize:11,fontWeight:"600",textTransform:"uppercase",letterSpacing:.5,fontFamily:p}});
@@ -1,113 +1 @@
1
- "use strict";
2
-
3
- import DataExplorer from "./Explorer";
4
- import { ScrollView, Text, View, StyleSheet } from "react-native";
5
- import MutationDetails from "./MutationDetails";
6
- import { night, monoFont } from "@buoy-gg/shared-ui";
7
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
8
- /** Detailed information block for a selected mutation within the modal experience. */
9
- export default function MutationInformation({
10
- selectedMutation
11
- }) {
12
- return /*#__PURE__*/_jsxs(ScrollView, {
13
- "sentry-label": "ignore devtools mutation information scroll",
14
- style: styles.flex1,
15
- contentContainerStyle: styles.scrollContent,
16
- children: [/*#__PURE__*/_jsx(View, {
17
- style: styles.section,
18
- children: /*#__PURE__*/_jsx(MutationDetails, {
19
- selectedMutation: selectedMutation
20
- })
21
- }), /*#__PURE__*/_jsxs(View, {
22
- style: styles.section,
23
- children: [/*#__PURE__*/_jsx(Text, {
24
- style: styles.textHeader,
25
- children: "Variables Details"
26
- }), /*#__PURE__*/_jsx(View, {
27
- style: styles.padding,
28
- children: /*#__PURE__*/_jsx(DataExplorer, {
29
- label: "Variables",
30
- value: selectedMutation?.state.variables,
31
- defaultExpanded: ["Variables"]
32
- })
33
- })]
34
- }), /*#__PURE__*/_jsxs(View, {
35
- style: styles.section,
36
- children: [/*#__PURE__*/_jsx(Text, {
37
- style: styles.textHeader,
38
- children: "Context Details"
39
- }), /*#__PURE__*/_jsx(View, {
40
- style: styles.padding,
41
- children: /*#__PURE__*/_jsx(DataExplorer, {
42
- label: "Context",
43
- value: selectedMutation?.state.context,
44
- defaultExpanded: ["Context"]
45
- })
46
- })]
47
- }), /*#__PURE__*/_jsxs(View, {
48
- style: styles.section,
49
- children: [/*#__PURE__*/_jsx(Text, {
50
- style: styles.textHeader,
51
- children: "Data Explorer"
52
- }), /*#__PURE__*/_jsx(View, {
53
- style: styles.padding,
54
- children: /*#__PURE__*/_jsx(DataExplorer, {
55
- label: "Data",
56
- defaultExpanded: ["Data"],
57
- value: selectedMutation?.state.data
58
- })
59
- })]
60
- }), /*#__PURE__*/_jsxs(View, {
61
- style: styles.section,
62
- children: [/*#__PURE__*/_jsx(Text, {
63
- style: styles.textHeader,
64
- children: "Mutations Explorer"
65
- }), /*#__PURE__*/_jsx(View, {
66
- style: styles.padding,
67
- children: /*#__PURE__*/_jsx(DataExplorer, {
68
- label: "Mutation",
69
- defaultExpanded: ["Mutation"],
70
- value: selectedMutation
71
- })
72
- })]
73
- })]
74
- });
75
- }
76
- const styles = StyleSheet.create({
77
- flex1: {
78
- flex: 1,
79
- // Transparent so the night sheet's star field shows through.
80
- backgroundColor: "transparent"
81
- },
82
- scrollContent: {
83
- paddingBottom: 16,
84
- paddingHorizontal: 8
85
- },
86
- section: {
87
- marginBottom: 16
88
- },
89
- textHeader: {
90
- textAlign: "left",
91
- backgroundColor: night.color.accent + "15",
92
- padding: 12,
93
- fontSize: 12,
94
- fontWeight: "700",
95
- color: night.color.accent,
96
- borderTopLeftRadius: 8,
97
- borderTopRightRadius: 8,
98
- borderBottomWidth: 1,
99
- borderBottomColor: night.color.accent + "33",
100
- fontFamily: monoFont,
101
- letterSpacing: 1,
102
- textTransform: "uppercase"
103
- },
104
- padding: {
105
- padding: 12,
106
- backgroundColor: night.color.surface,
107
- borderBottomLeftRadius: 8,
108
- borderBottomRightRadius: 8,
109
- borderWidth: 1,
110
- borderColor: night.color.border,
111
- borderTopWidth: 0
112
- }
113
- });
1
+ "use strict";import n from"./Explorer";import{ScrollView as d,Text as i,View as o,StyleSheet as s}from"react-native";import c from"./MutationDetails";import{night as l,monoFont as p}from"@buoy-gg/shared-ui";import{jsx as e,jsxs as a}from"react/jsx-runtime";export default function x({selectedMutation:r}){return a(d,{"sentry-label":"ignore devtools mutation information scroll",style:t.flex1,contentContainerStyle:t.scrollContent,children:[e(o,{style:t.section,children:e(c,{selectedMutation:r})}),a(o,{style:t.section,children:[e(i,{style:t.textHeader,children:"Variables Details"}),e(o,{style:t.padding,children:e(n,{label:"Variables",value:r?.state.variables,defaultExpanded:["Variables"]})})]}),a(o,{style:t.section,children:[e(i,{style:t.textHeader,children:"Context Details"}),e(o,{style:t.padding,children:e(n,{label:"Context",value:r?.state.context,defaultExpanded:["Context"]})})]}),a(o,{style:t.section,children:[e(i,{style:t.textHeader,children:"Data Explorer"}),e(o,{style:t.padding,children:e(n,{label:"Data",defaultExpanded:["Data"],value:r?.state.data})})]}),a(o,{style:t.section,children:[e(i,{style:t.textHeader,children:"Mutations Explorer"}),e(o,{style:t.padding,children:e(n,{label:"Mutation",defaultExpanded:["Mutation"],value:r})})]})]})}const t=s.create({flex1:{flex:1,backgroundColor:"transparent"},scrollContent:{paddingBottom:16,paddingHorizontal:8},section:{marginBottom:16},textHeader:{textAlign:"left",backgroundColor:l.color.accent+"15",padding:12,fontSize:12,fontWeight:"700",color:l.color.accent,borderTopLeftRadius:8,borderTopRightRadius:8,borderBottomWidth:1,borderBottomColor:l.color.accent+"33",fontFamily:p,letterSpacing:1,textTransform:"uppercase"},padding:{padding:12,backgroundColor:l.color.surface,borderBottomLeftRadius:8,borderBottomRightRadius:8,borderWidth:1,borderColor:l.color.border,borderTopWidth:0}});
@@ -1,79 +1 @@
1
- "use strict";
2
-
3
- import { ChipStrip, useChipTap } from "@buoy-gg/shared-ui";
4
- import QueryStatus from "./QueryStatus";
5
- import { useMutationStatusCounts } from "../../hooks/useQueryStatusCounts";
6
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
7
- /**
8
- * Horizontal status filter bar tailored for mutations. Integrates scroll detection to avoid
9
- * accidental filter toggles while panning.
10
- */
11
- const MutationStatusCount = ({
12
- activeFilter,
13
- onFilterChange,
14
- size = "default"
15
- }) => {
16
- const {
17
- pending,
18
- success,
19
- error,
20
- paused
21
- } = useMutationStatusCounts();
22
- const {
23
- scrollProps,
24
- onTouchStart: handleTouchStart,
25
- isTap
26
- } = useChipTap();
27
- const handleFilterClick = (filter, event) => {
28
- if (!isTap(event)) return;
29
- if (onFilterChange) {
30
- onFilterChange(activeFilter === filter ? null : filter);
31
- }
32
- };
33
- return /*#__PURE__*/_jsxs(ChipStrip, {
34
- scrollProps: scrollProps,
35
- sentryLabel: "ignore devtools mutation status count scroll",
36
- children: [/*#__PURE__*/_jsx(QueryStatus, {
37
- label: "Pending",
38
- color: "blue",
39
- count: pending,
40
- isActive: activeFilter === "pending",
41
- onPress: event => handleFilterClick("pending", event),
42
- onTouchStart: handleTouchStart,
43
- testID: "buoy-rq-mstatus-pending",
44
- showLabel: true,
45
- size: size
46
- }), /*#__PURE__*/_jsx(QueryStatus, {
47
- label: "Success",
48
- color: "green",
49
- count: success,
50
- isActive: activeFilter === "success",
51
- onPress: event => handleFilterClick("success", event),
52
- onTouchStart: handleTouchStart,
53
- testID: "buoy-rq-mstatus-success",
54
- showLabel: true,
55
- size: size
56
- }), /*#__PURE__*/_jsx(QueryStatus, {
57
- label: "Error",
58
- color: "red",
59
- count: error,
60
- isActive: activeFilter === "error",
61
- onPress: event => handleFilterClick("error", event),
62
- onTouchStart: handleTouchStart,
63
- testID: "buoy-rq-mstatus-error",
64
- showLabel: true,
65
- size: size
66
- }), /*#__PURE__*/_jsx(QueryStatus, {
67
- label: "Paused",
68
- color: "purple",
69
- count: paused,
70
- isActive: activeFilter === "paused",
71
- onPress: event => handleFilterClick("paused", event),
72
- onTouchStart: handleTouchStart,
73
- testID: "buoy-rq-mstatus-paused",
74
- showLabel: true,
75
- size: size
76
- })]
77
- });
78
- };
79
- export default MutationStatusCount;
1
+ "use strict";import{ChipStrip as m,useChipTap as S}from"@buoy-gg/shared-ui";import u from"./QueryStatus";import{useMutationStatusCounts as P}from"../../hooks/useQueryStatusCounts";import{jsx as n,jsxs as T}from"react/jsx-runtime";const f=({activeFilter:o,onFilterChange:c,size:t="default"})=>{const{pending:a,success:l,error:i,paused:p}=P();const{scrollProps:d,onTouchStart:r,isTap:b}=S();const e=(s,h)=>{if(!b(h))return;if(c){c(o===s?null:s)}};return T(m,{scrollProps:d,sentryLabel:"ignore devtools mutation status count scroll",children:[n(u,{label:"Pending",color:"blue",count:a,isActive:o==="pending",onPress:s=>e("pending",s),onTouchStart:r,testID:"buoy-rq-mstatus-pending",showLabel:true,size:t}),n(u,{label:"Success",color:"green",count:l,isActive:o==="success",onPress:s=>e("success",s),onTouchStart:r,testID:"buoy-rq-mstatus-success",showLabel:true,size:t}),n(u,{label:"Error",color:"red",count:i,isActive:o==="error",onPress:s=>e("error",s),onTouchStart:r,testID:"buoy-rq-mstatus-error",showLabel:true,size:t}),n(u,{label:"Paused",color:"purple",count:p,isActive:o==="paused",onPress:s=>e("paused",s),onTouchStart:r,testID:"buoy-rq-mstatus-paused",showLabel:true,size:t})]})};export default f;
@@ -1,215 +1 @@
1
- "use strict";
2
-
3
- import { useState, useRef, useMemo, useCallback } from "react";
4
- import { View, StyleSheet, PanResponder, Animated, Dimensions, FlatList } from "react-native";
5
- import MutationButton from "./MutationButton";
6
- import MutationInformation from "./MutationInformation";
7
- import useAllMutations from "../../hooks/useAllMutations";
8
- import { night, ToolEmptyState, monoFont } from "@buoy-gg/shared-ui";
9
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
10
- /**
11
- * Virtualized list of mutations with filtering and selection support for the mutation browser.
12
- */
13
- export default function MutationsList({
14
- selectedMutation,
15
- setSelectedMutation,
16
- activeFilter,
17
- hideInfoPanel = false,
18
- contentContainerStyle,
19
- searchText = ""
20
- }) {
21
- const {
22
- mutations: allmutations
23
- } = useAllMutations();
24
-
25
- // Helper function to get mutation status for filtering
26
- const getMutationStatus = mutation => {
27
- if (mutation.state.isPaused) return "paused";
28
- const status = mutation.state.status;
29
- return status; // 'idle', 'pending', 'success', 'error'
30
- };
31
-
32
- // Filter mutations based on active filter and search text
33
- const filteredMutations = useMemo(() => {
34
- let filtered = allmutations;
35
-
36
- // Apply status filter
37
- if (activeFilter) {
38
- filtered = filtered.filter(mutation => {
39
- const status = getMutationStatus(mutation);
40
- return status === activeFilter;
41
- });
42
- }
43
-
44
- // Apply search filter on mutation keys
45
- if (searchText) {
46
- const searchLower = searchText.toLowerCase();
47
- filtered = filtered.filter(mutation => {
48
- const mutationKey = mutation.options.mutationKey;
49
- if (!mutationKey) return false;
50
- const keys = Array.isArray(mutationKey) ? mutationKey : [mutationKey];
51
- const keyString = keys.filter(k => k != null).map(k => String(k)).join(" ").toLowerCase();
52
- return keyString.includes(searchLower);
53
- });
54
- }
55
- return filtered;
56
- }, [allmutations, activeFilter, searchText]);
57
-
58
- // Height management for resizable mutation information panel
59
- const screenHeight = Dimensions.get("window").height;
60
- const defaultInfoHeight = screenHeight * 0.4; // 40% of screen height
61
- const minInfoHeight = 150;
62
- const maxInfoHeight = screenHeight * 0.7; // 70% of screen height
63
-
64
- const infoHeightAnim = useRef(new Animated.Value(defaultInfoHeight)).current;
65
- const [, setCurrentInfoHeight] = useState(defaultInfoHeight);
66
- const currentInfoHeightRef = useRef(defaultInfoHeight);
67
-
68
- // Pan responder for dragging the mutation information panel
69
- const infoPanResponder = useRef(PanResponder.create({
70
- onMoveShouldSetPanResponder: (evt, gestureState) => {
71
- return Math.abs(gestureState.dy) > Math.abs(gestureState.dx) && Math.abs(gestureState.dy) > 10;
72
- },
73
- onPanResponderGrant: () => {
74
- infoHeightAnim.stopAnimation(value => {
75
- setCurrentInfoHeight(value);
76
- currentInfoHeightRef.current = value;
77
- infoHeightAnim.setValue(value);
78
- });
79
- },
80
- onPanResponderMove: (evt, gestureState) => {
81
- // Use the ref value which is always current
82
- const newHeight = currentInfoHeightRef.current - gestureState.dy;
83
- const clampedHeight = Math.max(minInfoHeight, Math.min(maxInfoHeight, newHeight));
84
- infoHeightAnim.setValue(clampedHeight);
85
- },
86
- onPanResponderRelease: (evt, gestureState) => {
87
- const finalHeight = Math.max(minInfoHeight, Math.min(maxInfoHeight, currentInfoHeightRef.current - gestureState.dy));
88
- setCurrentInfoHeight(finalHeight);
89
- currentInfoHeightRef.current = finalHeight;
90
- Animated.timing(infoHeightAnim, {
91
- toValue: finalHeight,
92
- duration: 200,
93
- useNativeDriver: false
94
- }).start(() => {
95
- // Ensure the animated value and state are perfectly synced after animation
96
- infoHeightAnim.setValue(finalHeight);
97
- setCurrentInfoHeight(finalHeight);
98
- currentInfoHeightRef.current = finalHeight;
99
- });
100
- }
101
- })).current;
102
-
103
- // Optimize FlatList performance - memoize renderItem to prevent re-renders
104
- const renderMutation = useCallback(({
105
- item
106
- }) => /*#__PURE__*/_jsx(MutationButton, {
107
- selected: selectedMutation,
108
- setSelectedMutation: setSelectedMutation,
109
- mutation: item
110
- }), [selectedMutation, setSelectedMutation]);
111
- return /*#__PURE__*/_jsxs(View, {
112
- style: styles.container,
113
- children: [filteredMutations.length > 0 ? /*#__PURE__*/_jsx(View, {
114
- style: styles.listWrapper,
115
- children: /*#__PURE__*/_jsx(FlatList, {
116
- "sentry-label": "ignore devtools mutations list",
117
- testID: "buoy-rq-mutation-list",
118
- data: filteredMutations,
119
- renderItem: renderMutation,
120
- keyExtractor: (item, index) => `${item.mutationId}-${item.state.submittedAt}-${item.state.status}-${index}`,
121
- inverted: true,
122
- showsVerticalScrollIndicator: true
123
- // See QueryBrowser: e2e bundles keep every cell mounted so Detox's
124
- // hittability check doesn't reject an on-screen row as clipped.
125
- ,
126
- removeClippedSubviews: !(typeof process !== "undefined" && process.env?.EXPO_PUBLIC_E2E),
127
- contentContainerStyle: contentContainerStyle || styles.listContent,
128
- initialNumToRender: 10,
129
- maxToRenderPerBatch: 10,
130
- windowSize: 10,
131
- scrollEnabled: false
132
- })
133
- }) : /*#__PURE__*/_jsx(ToolEmptyState, {
134
- testID: "buoy-rq-mutations-empty",
135
- otto: activeFilter ? "filtering" : "scanning",
136
- title: "No mutations found",
137
- message: activeFilter ? `No ${activeFilter} mutations. Pick another status to see the rest.` : "Mutations run through useMutation will appear here."
138
- }), selectedMutation && !hideInfoPanel && /*#__PURE__*/_jsxs(Animated.View, {
139
- style: [styles.mutationInfo, {
140
- height: infoHeightAnim
141
- }],
142
- children: [/*#__PURE__*/_jsx(View, {
143
- style: styles.dragHandle,
144
- ...infoPanResponder.panHandlers,
145
- children: /*#__PURE__*/_jsx(View, {
146
- style: styles.dragIndicator
147
- })
148
- }), /*#__PURE__*/_jsx(View, {
149
- style: styles.mutationInfoContent,
150
- children: /*#__PURE__*/_jsx(MutationInformation, {
151
- selectedMutation: selectedMutation
152
- })
153
- })]
154
- })]
155
- });
156
- }
157
- const styles = StyleSheet.create({
158
- container: {
159
- flex: 1,
160
- // Transparent so JsModal's ToolBackground shows through (the modal paints opaque base beneath it).
161
- backgroundColor: "transparent"
162
- },
163
- listWrapper: {
164
- flex: 1
165
- },
166
- listContent: {
167
- // Transparent so JsModal's ToolBackground shows through (the modal paints opaque base beneath it).
168
- backgroundColor: "transparent",
169
- paddingHorizontal: 8,
170
- paddingTop: 8
171
- },
172
- mutationInfo: {
173
- borderTopWidth: 1,
174
- borderTopColor: night.color.border,
175
- // Transparent so the night sheet's star field shows through.
176
- backgroundColor: "transparent"
177
- },
178
- dragHandle: {
179
- height: 20,
180
- justifyContent: "center",
181
- alignItems: "center",
182
- backgroundColor: night.color.surface,
183
- borderBottomWidth: 1,
184
- borderBottomColor: night.color.border
185
- },
186
- dragIndicator: {
187
- width: 40,
188
- height: 4,
189
- backgroundColor: night.color.placeholder,
190
- borderRadius: 2
191
- },
192
- mutationInfoContent: {
193
- flex: 1,
194
- // Transparent so the night sheet's star field shows through.
195
- backgroundColor: "transparent"
196
- },
197
- emptyContainer: {
198
- flex: 1,
199
- justifyContent: "center",
200
- alignItems: "center",
201
- padding: 32,
202
- backgroundColor: night.color.surface,
203
- margin: 16,
204
- borderRadius: 8,
205
- borderWidth: 1,
206
- borderColor: night.color.border
207
- },
208
- emptyText: {
209
- color: night.color.textTertiary,
210
- fontSize: 14,
211
- textAlign: "center",
212
- fontFamily: monoFont,
213
- letterSpacing: 0.5
214
- }
215
- });
1
+ "use strict";import{useState as E,useRef as g,useMemo as L,useCallback as T}from"react";import{View as d,StyleSheet as v,PanResponder as B,Animated as y,Dimensions as W,FlatList as $}from"react-native";import D from"./MutationButton";import N from"./MutationInformation";import _ from"../../hooks/useAllMutations";import{night as r,ToolEmptyState as z,monoFont as q}from"@buoy-gg/shared-ui";import{jsx as n,jsxs as H}from"react/jsx-runtime";export default function K({selectedMutation:c,setSelectedMutation:b,activeFilter:s,hideInfoPanel:R=false,contentContainerStyle:S,searchText:m=""}){const{mutations:C}=_();const k=t=>{if(t.state.isPaused)return"paused";const e=t.state.status;return e};const I=L(()=>{let t=C;if(s){t=t.filter(e=>{const o=k(e);return o===s})}if(m){const e=m.toLowerCase();t=t.filter(o=>{const l=o.options.mutationKey;if(!l)return false;const V=Array.isArray(l)?l:[l];const j=V.filter(h=>h!=null).map(h=>String(h)).join(" ").toLowerCase();return j.includes(e)})}return t},[C,s,m]);const M=W.get("window").height;const f=M*.4;const x=150;const w=M*.7;const i=g(new y.Value(f)).current;const[,p]=E(f);const u=g(f);const P=g(B.create({onMoveShouldSetPanResponder:(t,e)=>{return Math.abs(e.dy)>Math.abs(e.dx)&&Math.abs(e.dy)>10},onPanResponderGrant:()=>{i.stopAnimation(t=>{p(t);u.current=t;i.setValue(t)})},onPanResponderMove:(t,e)=>{const o=u.current-e.dy;const l=Math.max(x,Math.min(w,o));i.setValue(l)},onPanResponderRelease:(t,e)=>{const o=Math.max(x,Math.min(w,u.current-e.dy));p(o);u.current=o;y.timing(i,{toValue:o,duration:200,useNativeDriver:false}).start(()=>{i.setValue(o);p(o);u.current=o})}})).current;const A=T(({item:t})=>n(D,{selected:c,setSelectedMutation:b,mutation:t}),[c,b]);return H(d,{style:a.container,children:[I.length>0?n(d,{style:a.listWrapper,children:n($,{"sentry-label":"ignore devtools mutations list",testID:"buoy-rq-mutation-list",data:I,renderItem:A,keyExtractor:(t,e)=>`${t.mutationId}-${t.state.submittedAt}-${t.state.status}-${e}`,inverted:true,showsVerticalScrollIndicator:true,removeClippedSubviews:!(typeof process!=="undefined"&&process.env?.EXPO_PUBLIC_E2E),contentContainerStyle:S||a.listContent,initialNumToRender:10,maxToRenderPerBatch:10,windowSize:10,scrollEnabled:false})}):n(z,{testID:"buoy-rq-mutations-empty",otto:s?"filtering":"scanning",title:"No mutations found",message:s?`No ${s} mutations. Pick another status to see the rest.`:"Mutations run through useMutation will appear here."}),c&&!R&&H(y.View,{style:[a.mutationInfo,{height:i}],children:[n(d,{style:a.dragHandle,...P.panHandlers,children:n(d,{style:a.dragIndicator})}),n(d,{style:a.mutationInfoContent,children:n(N,{selectedMutation:c})})]})]})}const a=v.create({container:{flex:1,backgroundColor:"transparent"},listWrapper:{flex:1},listContent:{backgroundColor:"transparent",paddingHorizontal:8,paddingTop:8},mutationInfo:{borderTopWidth:1,borderTopColor:r.color.border,backgroundColor:"transparent"},dragHandle:{height:20,justifyContent:"center",alignItems:"center",backgroundColor:r.color.surface,borderBottomWidth:1,borderBottomColor:r.color.border},dragIndicator:{width:40,height:4,backgroundColor:r.color.placeholder,borderRadius:2},mutationInfoContent:{flex:1,backgroundColor:"transparent"},emptyContainer:{flex:1,justifyContent:"center",alignItems:"center",padding:32,backgroundColor:r.color.surface,margin:16,borderRadius:8,borderWidth:1,borderColor:r.color.border},emptyText:{color:r.color.textTertiary,fontSize:14,textAlign:"center",fontFamily:q,letterSpacing:.5}});
@@ -1,50 +1 @@
1
- "use strict";
2
-
3
- import { TouchableOpacity, StyleSheet } from "react-native";
4
- import { Wifi, buoyColors } from "@buoy-gg/shared-ui";
5
- import { jsx as _jsx } from "react/jsx-runtime";
6
- /**
7
- * Small toggle used in the query browser to mock offline/online behavior.
8
- */
9
- const NetworkToggleButton = ({
10
- isOffline,
11
- onToggle
12
- }) => {
13
- return /*#__PURE__*/_jsx(TouchableOpacity, {
14
- "sentry-label": "ignore devtools network toggle button",
15
- style: [styles.button, isOffline && styles.offlineButton],
16
- onPress: onToggle,
17
- activeOpacity: 0.7,
18
- accessibilityLabel: isOffline ? "Unset offline mocking behavior" : "Mock offline behavior",
19
- accessibilityRole: "button",
20
- accessibilityState: {
21
- selected: isOffline
22
- },
23
- children: isOffline ? /*#__PURE__*/_jsx(Wifi, {
24
- size: 16,
25
- color: buoyColors.error,
26
- strokeWidth: 2
27
- }) : /*#__PURE__*/_jsx(Wifi, {
28
- size: 16,
29
- color: buoyColors.success,
30
- strokeWidth: 2
31
- })
32
- });
33
- };
34
- const styles = StyleSheet.create({
35
- button: {
36
- width: 32,
37
- height: 32,
38
- borderRadius: 6,
39
- backgroundColor: "rgba(16, 185, 129, 0.1)",
40
- justifyContent: "center",
41
- alignItems: "center",
42
- borderWidth: 1,
43
- borderColor: "rgba(16, 185, 129, 0.2)"
44
- },
45
- offlineButton: {
46
- backgroundColor: "rgba(239, 68, 68, 0.1)",
47
- borderColor: "rgba(239, 68, 68, 0.2)"
48
- }
49
- });
50
- export default NetworkToggleButton;
1
+ "use strict";import{TouchableOpacity as c,StyleSheet as l}from"react-native";import{Wifi as e,buoyColors as r}from"@buoy-gg/shared-ui";import{jsx as t}from"react/jsx-runtime";const n=({isOffline:o,onToggle:s})=>{return t(c,{"sentry-label":"ignore devtools network toggle button",style:[i.button,o&&i.offlineButton],onPress:s,activeOpacity:.7,accessibilityLabel:o?"Unset offline mocking behavior":"Mock offline behavior",accessibilityRole:"button",accessibilityState:{selected:o},children:o?t(e,{size:16,color:r.error,strokeWidth:2}):t(e,{size:16,color:r.success,strokeWidth:2})})};const i=l.create({button:{width:32,height:32,borderRadius:6,backgroundColor:"rgba(16, 185, 129, 0.1)",justifyContent:"center",alignItems:"center",borderWidth:1,borderColor:"rgba(16, 185, 129, 0.2)"},offlineButton:{backgroundColor:"rgba(239, 68, 68, 0.1)",borderColor:"rgba(239, 68, 68, 0.2)"}});export default n;