@buoy-gg/network 7.0.41 → 7.0.42

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (272) hide show
  1. package/README.md +11 -85
  2. package/lib/commonjs/index.js +1 -332
  3. package/lib/commonjs/index.web.js +1 -420
  4. package/lib/commonjs/network/components/DataViewer.web.js +1 -879
  5. package/lib/commonjs/network/components/NetworkCopyScreen.web.js +1 -48
  6. package/lib/commonjs/network/components/NetworkCopySettingsView.js +27 -755
  7. package/lib/commonjs/network/components/NetworkCopySettingsView.web.js +14 -1242
  8. package/lib/commonjs/network/components/NetworkDetailScreen.web.js +1 -101
  9. package/lib/commonjs/network/components/NetworkDetailStepper.js +1 -108
  10. package/lib/commonjs/network/components/NetworkDetailStepper.web.js +1 -298
  11. package/lib/commonjs/network/components/NetworkEventDetailView.js +15 -1130
  12. package/lib/commonjs/network/components/NetworkEventDetailView.web.js +15 -1484
  13. package/lib/commonjs/network/components/NetworkEventItemCompact.js +2 -401
  14. package/lib/commonjs/network/components/NetworkEventItemCompact.web.js +2 -820
  15. package/lib/commonjs/network/components/NetworkFilterScreen.web.js +1 -55
  16. package/lib/commonjs/network/components/NetworkFilterViewV3.js +1 -442
  17. package/lib/commonjs/network/components/NetworkFilterViewV3.web.js +1 -1310
  18. package/lib/commonjs/network/components/NetworkHeaderLive.js +1 -375
  19. package/lib/commonjs/network/components/NetworkHeaderLive.web.js +1 -623
  20. package/lib/commonjs/network/components/NetworkHeaderMenu.js +1 -190
  21. package/lib/commonjs/network/components/NetworkListScreen.js +1 -403
  22. package/lib/commonjs/network/components/NetworkListScreen.web.js +1 -624
  23. package/lib/commonjs/network/components/NetworkModal.js +1 -786
  24. package/lib/commonjs/network/components/NetworkNumberPrompt.js +1 -178
  25. package/lib/commonjs/network/components/NetworkNumberPrompt.web.js +1 -232
  26. package/lib/commonjs/network/components/NetworkOverrideEditor.js +1 -814
  27. package/lib/commonjs/network/components/NetworkOverrideEditor.web.js +1 -942
  28. package/lib/commonjs/network/components/NetworkOverrideHeaderButton.js +1 -107
  29. package/lib/commonjs/network/components/NetworkOverrideHeaderButton.web.js +1 -133
  30. package/lib/commonjs/network/components/NetworkOverridesButton.js +1 -90
  31. package/lib/commonjs/network/components/NetworkOverridesButton.web.js +1 -143
  32. package/lib/commonjs/network/components/NetworkOverridesScreen.js +1 -543
  33. package/lib/commonjs/network/components/NetworkOverridesScreen.web.js +1 -830
  34. package/lib/commonjs/network/components/NetworkSavedScreen.js +1 -226
  35. package/lib/commonjs/network/components/NetworkSavedScreen.web.js +1 -463
  36. package/lib/commonjs/network/components/NetworkUpgradeBanner.js +1 -76
  37. package/lib/commonjs/network/components/response-editor/Explorer.js +1 -973
  38. package/lib/commonjs/network/components/response-editor/Explorer.web.js +1 -1136
  39. package/lib/commonjs/network/components/response-editor/deleteNestedDataByPath.js +1 -56
  40. package/lib/commonjs/network/components/response-editor/editorContext.js +1 -33
  41. package/lib/commonjs/network/components/response-editor/updateNestedDataByPath.js +1 -61
  42. package/lib/commonjs/network/conditions/NetworkConditionsControl.js +1 -235
  43. package/lib/commonjs/network/conditions/NetworkConditionsControl.test.js +1 -136
  44. package/lib/commonjs/network/conditions/NetworkConditionsIcon.js +1 -33
  45. package/lib/commonjs/network/conditions/NetworkFloatingTool.js +1 -310
  46. package/lib/commonjs/network/conditions/NetworkFloatingTool.test.js +1 -219
  47. package/lib/commonjs/network/conditions/store.js +1 -75
  48. package/lib/commonjs/network/conditions/wait.js +1 -43
  49. package/lib/commonjs/network/conditions/xhr.js +1 -135
  50. package/lib/commonjs/network/hooks/useLiveNetworkEvent.js +1 -62
  51. package/lib/commonjs/network/hooks/useNetworkBadgeCounts.js +1 -83
  52. package/lib/commonjs/network/hooks/useNetworkEventList.js +1 -108
  53. package/lib/commonjs/network/hooks/useNetworkEvents.js +1 -318
  54. package/lib/commonjs/network/hooks/useNetworkHasMatches.js +1 -56
  55. package/lib/commonjs/network/hooks/useNetworkSaved.js +1 -38
  56. package/lib/commonjs/network/hooks/useNetworkSelection.js +1 -53
  57. package/lib/commonjs/network/hooks/useOverrideRules.js +1 -36
  58. package/lib/commonjs/network/hooks/useTickEveryMinute.js +1 -21
  59. package/lib/commonjs/network/overrides/applyToFetch.js +1 -80
  60. package/lib/commonjs/network/overrides/applyToXhr.js +2 -510
  61. package/lib/commonjs/network/overrides/engine.js +1 -93
  62. package/lib/commonjs/network/overrides/matchRule.js +1 -87
  63. package/lib/commonjs/network/overrides/overriddenRows.js +1 -37
  64. package/lib/commonjs/network/overrides/overrideRulesStore.js +1 -550
  65. package/lib/commonjs/network/overrides/presets.js +1 -70
  66. package/lib/commonjs/network/overrides/resolveOverride.js +1 -158
  67. package/lib/commonjs/network/overrides/types.js +1 -90
  68. package/lib/commonjs/network/sync/networkBodyResolver.js +1 -39
  69. package/lib/commonjs/network/sync/networkSyncAdapter.js +1 -882
  70. package/lib/commonjs/network/sync/overrideHonesty.release.test.js +1 -36
  71. package/lib/commonjs/network/types/index.js +1 -5
  72. package/lib/commonjs/network/utils/extractOperationName.js +1 -80
  73. package/lib/commonjs/network/utils/filterNetworkEvents.js +1 -96
  74. package/lib/commonjs/network/utils/formatGraphQLVariables.js +1 -219
  75. package/lib/commonjs/network/utils/formatting.js +1 -30
  76. package/lib/commonjs/network/utils/generateCurl.js +2 -71
  77. package/lib/commonjs/network/utils/generateNetworkCopyText.js +37 -166
  78. package/lib/commonjs/network/utils/httpCompletion.js +1 -37
  79. package/lib/commonjs/network/utils/networkEventStore.js +1 -411
  80. package/lib/commonjs/network/utils/networkListener.js +4 -1352
  81. package/lib/commonjs/network/utils/networkSavedStore.js +3 -577
  82. package/lib/commonjs/network/utils/networkSelectionStore.js +1 -193
  83. package/lib/commonjs/network/utils/realNow.js +1 -0
  84. package/lib/commonjs/network/utils/requestId.js +1 -16
  85. package/lib/commonjs/network/utils/resolveRequestUrl.js +1 -15
  86. package/lib/commonjs/network/utils/selectSavedEvents.js +1 -39
  87. package/lib/commonjs/network/utils/startNetworkCapture.js +1 -24
  88. package/lib/commonjs/network/utils/withPinnedFirst.js +1 -32
  89. package/lib/commonjs/preset.js +1 -93
  90. package/lib/module/index.js +1 -104
  91. package/lib/module/index.web.js +1 -82
  92. package/lib/module/network/components/DataViewer.web.js +1 -875
  93. package/lib/module/network/components/NetworkCopyScreen.web.js +1 -44
  94. package/lib/module/network/components/NetworkCopySettingsView.js +27 -750
  95. package/lib/module/network/components/NetworkCopySettingsView.web.js +14 -1237
  96. package/lib/module/network/components/NetworkDetailScreen.web.js +1 -97
  97. package/lib/module/network/components/NetworkDetailStepper.js +1 -104
  98. package/lib/module/network/components/NetworkDetailStepper.web.js +1 -296
  99. package/lib/module/network/components/NetworkEventDetailView.js +15 -1129
  100. package/lib/module/network/components/NetworkEventDetailView.web.js +15 -1482
  101. package/lib/module/network/components/NetworkEventItemCompact.js +2 -398
  102. package/lib/module/network/components/NetworkEventItemCompact.web.js +2 -818
  103. package/lib/module/network/components/NetworkFilterScreen.web.js +1 -51
  104. package/lib/module/network/components/NetworkFilterViewV3.js +1 -438
  105. package/lib/module/network/components/NetworkFilterViewV3.web.js +1 -1306
  106. package/lib/module/network/components/NetworkHeaderLive.js +1 -366
  107. package/lib/module/network/components/NetworkHeaderLive.web.js +1 -617
  108. package/lib/module/network/components/NetworkHeaderMenu.js +1 -184
  109. package/lib/module/network/components/NetworkListScreen.js +1 -399
  110. package/lib/module/network/components/NetworkListScreen.web.js +1 -622
  111. package/lib/module/network/components/NetworkModal.js +1 -781
  112. package/lib/module/network/components/NetworkNumberPrompt.js +1 -174
  113. package/lib/module/network/components/NetworkNumberPrompt.web.js +1 -230
  114. package/lib/module/network/components/NetworkOverrideEditor.js +1 -811
  115. package/lib/module/network/components/NetworkOverrideEditor.web.js +1 -939
  116. package/lib/module/network/components/NetworkOverrideHeaderButton.js +1 -104
  117. package/lib/module/network/components/NetworkOverrideHeaderButton.web.js +1 -131
  118. package/lib/module/network/components/NetworkOverridesButton.js +1 -87
  119. package/lib/module/network/components/NetworkOverridesButton.web.js +1 -141
  120. package/lib/module/network/components/NetworkOverridesScreen.js +1 -539
  121. package/lib/module/network/components/NetworkOverridesScreen.web.js +1 -826
  122. package/lib/module/network/components/NetworkSavedScreen.js +1 -222
  123. package/lib/module/network/components/NetworkSavedScreen.web.js +1 -461
  124. package/lib/module/network/components/NetworkUpgradeBanner.js +1 -72
  125. package/lib/module/network/components/response-editor/Explorer.js +1 -972
  126. package/lib/module/network/components/response-editor/Explorer.web.js +1 -1133
  127. package/lib/module/network/components/response-editor/deleteNestedDataByPath.js +1 -51
  128. package/lib/module/network/components/response-editor/editorContext.js +1 -29
  129. package/lib/module/network/components/response-editor/updateNestedDataByPath.js +1 -56
  130. package/lib/module/network/conditions/NetworkConditionsControl.js +1 -231
  131. package/lib/module/network/conditions/NetworkConditionsControl.test.js +1 -135
  132. package/lib/module/network/conditions/NetworkConditionsIcon.js +1 -29
  133. package/lib/module/network/conditions/NetworkFloatingTool.js +1 -304
  134. package/lib/module/network/conditions/NetworkFloatingTool.test.js +1 -218
  135. package/lib/module/network/conditions/store.js +1 -65
  136. package/lib/module/network/conditions/wait.js +1 -38
  137. package/lib/module/network/conditions/xhr.js +1 -131
  138. package/lib/module/network/hooks/useLiveNetworkEvent.js +1 -58
  139. package/lib/module/network/hooks/useNetworkBadgeCounts.js +1 -79
  140. package/lib/module/network/hooks/useNetworkEventList.js +1 -104
  141. package/lib/module/network/hooks/useNetworkEvents.js +1 -314
  142. package/lib/module/network/hooks/useNetworkHasMatches.js +1 -52
  143. package/lib/module/network/hooks/useNetworkSaved.js +1 -34
  144. package/lib/module/network/hooks/useNetworkSelection.js +1 -46
  145. package/lib/module/network/hooks/useOverrideRules.js +1 -32
  146. package/lib/module/network/hooks/useTickEveryMinute.js +1 -11
  147. package/lib/module/network/overrides/applyToFetch.js +1 -72
  148. package/lib/module/network/overrides/applyToXhr.js +2 -502
  149. package/lib/module/network/overrides/engine.js +1 -85
  150. package/lib/module/network/overrides/matchRule.js +1 -81
  151. package/lib/module/network/overrides/overriddenRows.js +1 -33
  152. package/lib/module/network/overrides/overrideRulesStore.js +1 -547
  153. package/lib/module/network/overrides/presets.js +1 -65
  154. package/lib/module/network/overrides/resolveOverride.js +1 -152
  155. package/lib/module/network/overrides/types.js +1 -86
  156. package/lib/module/network/sync/networkBodyResolver.js +1 -34
  157. package/lib/module/network/sync/networkSyncAdapter.js +1 -880
  158. package/lib/module/network/sync/overrideHonesty.release.test.js +1 -35
  159. package/lib/module/network/types/index.js +1 -3
  160. package/lib/module/network/utils/extractOperationName.js +1 -76
  161. package/lib/module/network/utils/filterNetworkEvents.js +1 -92
  162. package/lib/module/network/utils/formatGraphQLVariables.js +1 -213
  163. package/lib/module/network/utils/formatting.js +1 -9
  164. package/lib/module/network/utils/generateCurl.js +2 -67
  165. package/lib/module/network/utils/generateNetworkCopyText.js +37 -162
  166. package/lib/module/network/utils/httpCompletion.js +1 -32
  167. package/lib/module/network/utils/networkEventStore.js +1 -409
  168. package/lib/module/network/utils/networkListener.js +4 -1341
  169. package/lib/module/network/utils/networkSavedStore.js +3 -572
  170. package/lib/module/network/utils/networkSelectionStore.js +1 -188
  171. package/lib/module/network/utils/realNow.js +1 -0
  172. package/lib/module/network/utils/requestId.js +1 -12
  173. package/lib/module/network/utils/resolveRequestUrl.js +1 -11
  174. package/lib/module/network/utils/selectSavedEvents.js +1 -35
  175. package/lib/module/network/utils/startNetworkCapture.js +1 -21
  176. package/lib/module/network/utils/withPinnedFirst.js +1 -28
  177. package/lib/module/preset.js +1 -91
  178. package/lib/typescript/network/overrides/engine.d.ts +1 -1
  179. package/lib/typescript/network/overrides/matchRule.d.ts +1 -1
  180. package/lib/typescript/network/overrides/resolveOverride.d.ts +2 -2
  181. package/lib/typescript/network/overrides/types.d.ts +9 -0
  182. package/lib/typescript/network/utils/networkListener.d.ts +11 -0
  183. package/lib/typescript/network/utils/realNow.d.ts +18 -0
  184. package/lib/web/index.mjs +73 -74
  185. package/package.json +2 -2
  186. package/lib/typescript/index.d.ts.map +0 -1
  187. package/lib/typescript/index.web.d.ts.map +0 -1
  188. package/lib/typescript/network/components/DataViewer.web.d.ts.map +0 -1
  189. package/lib/typescript/network/components/NetworkCopyScreen.web.d.ts.map +0 -1
  190. package/lib/typescript/network/components/NetworkCopySettingsView.d.ts.map +0 -1
  191. package/lib/typescript/network/components/NetworkCopySettingsView.web.d.ts.map +0 -1
  192. package/lib/typescript/network/components/NetworkDetailScreen.web.d.ts.map +0 -1
  193. package/lib/typescript/network/components/NetworkDetailStepper.d.ts.map +0 -1
  194. package/lib/typescript/network/components/NetworkDetailStepper.web.d.ts.map +0 -1
  195. package/lib/typescript/network/components/NetworkEventDetailView.d.ts.map +0 -1
  196. package/lib/typescript/network/components/NetworkEventDetailView.web.d.ts.map +0 -1
  197. package/lib/typescript/network/components/NetworkEventItemCompact.d.ts.map +0 -1
  198. package/lib/typescript/network/components/NetworkEventItemCompact.web.d.ts.map +0 -1
  199. package/lib/typescript/network/components/NetworkFilterScreen.web.d.ts.map +0 -1
  200. package/lib/typescript/network/components/NetworkFilterViewV3.d.ts.map +0 -1
  201. package/lib/typescript/network/components/NetworkFilterViewV3.web.d.ts.map +0 -1
  202. package/lib/typescript/network/components/NetworkHeaderLive.d.ts.map +0 -1
  203. package/lib/typescript/network/components/NetworkHeaderLive.web.d.ts.map +0 -1
  204. package/lib/typescript/network/components/NetworkHeaderMenu.d.ts.map +0 -1
  205. package/lib/typescript/network/components/NetworkListScreen.d.ts.map +0 -1
  206. package/lib/typescript/network/components/NetworkListScreen.web.d.ts.map +0 -1
  207. package/lib/typescript/network/components/NetworkModal.d.ts.map +0 -1
  208. package/lib/typescript/network/components/NetworkNumberPrompt.d.ts.map +0 -1
  209. package/lib/typescript/network/components/NetworkNumberPrompt.web.d.ts.map +0 -1
  210. package/lib/typescript/network/components/NetworkOverrideEditor.d.ts.map +0 -1
  211. package/lib/typescript/network/components/NetworkOverrideEditor.web.d.ts.map +0 -1
  212. package/lib/typescript/network/components/NetworkOverrideHeaderButton.d.ts.map +0 -1
  213. package/lib/typescript/network/components/NetworkOverrideHeaderButton.web.d.ts.map +0 -1
  214. package/lib/typescript/network/components/NetworkOverridesButton.d.ts.map +0 -1
  215. package/lib/typescript/network/components/NetworkOverridesButton.web.d.ts.map +0 -1
  216. package/lib/typescript/network/components/NetworkOverridesScreen.d.ts.map +0 -1
  217. package/lib/typescript/network/components/NetworkOverridesScreen.web.d.ts.map +0 -1
  218. package/lib/typescript/network/components/NetworkSavedScreen.d.ts.map +0 -1
  219. package/lib/typescript/network/components/NetworkSavedScreen.web.d.ts.map +0 -1
  220. package/lib/typescript/network/components/NetworkUpgradeBanner.d.ts.map +0 -1
  221. package/lib/typescript/network/components/response-editor/Explorer.d.ts.map +0 -1
  222. package/lib/typescript/network/components/response-editor/Explorer.web.d.ts.map +0 -1
  223. package/lib/typescript/network/components/response-editor/deleteNestedDataByPath.d.ts.map +0 -1
  224. package/lib/typescript/network/components/response-editor/editorContext.d.ts.map +0 -1
  225. package/lib/typescript/network/components/response-editor/updateNestedDataByPath.d.ts.map +0 -1
  226. package/lib/typescript/network/conditions/NetworkConditionsControl.d.ts.map +0 -1
  227. package/lib/typescript/network/conditions/NetworkConditionsControl.test.d.ts.map +0 -1
  228. package/lib/typescript/network/conditions/NetworkConditionsIcon.d.ts.map +0 -1
  229. package/lib/typescript/network/conditions/NetworkFloatingTool.d.ts.map +0 -1
  230. package/lib/typescript/network/conditions/NetworkFloatingTool.test.d.ts.map +0 -1
  231. package/lib/typescript/network/conditions/store.d.ts.map +0 -1
  232. package/lib/typescript/network/conditions/wait.d.ts.map +0 -1
  233. package/lib/typescript/network/conditions/xhr.d.ts.map +0 -1
  234. package/lib/typescript/network/hooks/useLiveNetworkEvent.d.ts.map +0 -1
  235. package/lib/typescript/network/hooks/useNetworkBadgeCounts.d.ts.map +0 -1
  236. package/lib/typescript/network/hooks/useNetworkEventList.d.ts.map +0 -1
  237. package/lib/typescript/network/hooks/useNetworkEvents.d.ts.map +0 -1
  238. package/lib/typescript/network/hooks/useNetworkHasMatches.d.ts.map +0 -1
  239. package/lib/typescript/network/hooks/useNetworkSaved.d.ts.map +0 -1
  240. package/lib/typescript/network/hooks/useNetworkSelection.d.ts.map +0 -1
  241. package/lib/typescript/network/hooks/useOverrideRules.d.ts.map +0 -1
  242. package/lib/typescript/network/hooks/useTickEveryMinute.d.ts.map +0 -1
  243. package/lib/typescript/network/overrides/applyToFetch.d.ts.map +0 -1
  244. package/lib/typescript/network/overrides/applyToXhr.d.ts.map +0 -1
  245. package/lib/typescript/network/overrides/engine.d.ts.map +0 -1
  246. package/lib/typescript/network/overrides/matchRule.d.ts.map +0 -1
  247. package/lib/typescript/network/overrides/overriddenRows.d.ts.map +0 -1
  248. package/lib/typescript/network/overrides/overrideRulesStore.d.ts.map +0 -1
  249. package/lib/typescript/network/overrides/presets.d.ts.map +0 -1
  250. package/lib/typescript/network/overrides/resolveOverride.d.ts.map +0 -1
  251. package/lib/typescript/network/overrides/types.d.ts.map +0 -1
  252. package/lib/typescript/network/sync/networkBodyResolver.d.ts.map +0 -1
  253. package/lib/typescript/network/sync/networkSyncAdapter.d.ts.map +0 -1
  254. package/lib/typescript/network/sync/overrideHonesty.release.test.d.ts.map +0 -1
  255. package/lib/typescript/network/types/index.d.ts.map +0 -1
  256. package/lib/typescript/network/utils/extractOperationName.d.ts.map +0 -1
  257. package/lib/typescript/network/utils/filterNetworkEvents.d.ts.map +0 -1
  258. package/lib/typescript/network/utils/formatGraphQLVariables.d.ts.map +0 -1
  259. package/lib/typescript/network/utils/formatting.d.ts.map +0 -1
  260. package/lib/typescript/network/utils/generateCurl.d.ts.map +0 -1
  261. package/lib/typescript/network/utils/generateNetworkCopyText.d.ts.map +0 -1
  262. package/lib/typescript/network/utils/httpCompletion.d.ts.map +0 -1
  263. package/lib/typescript/network/utils/networkEventStore.d.ts.map +0 -1
  264. package/lib/typescript/network/utils/networkListener.d.ts.map +0 -1
  265. package/lib/typescript/network/utils/networkSavedStore.d.ts.map +0 -1
  266. package/lib/typescript/network/utils/networkSelectionStore.d.ts.map +0 -1
  267. package/lib/typescript/network/utils/requestId.d.ts.map +0 -1
  268. package/lib/typescript/network/utils/resolveRequestUrl.d.ts.map +0 -1
  269. package/lib/typescript/network/utils/selectSavedEvents.d.ts.map +0 -1
  270. package/lib/typescript/network/utils/startNetworkCapture.d.ts.map +0 -1
  271. package/lib/typescript/network/utils/withPinnedFirst.d.ts.map +0 -1
  272. package/lib/typescript/preset.d.ts.map +0 -1
@@ -1,184 +1 @@
1
- "use strict";
2
-
3
- import { StyleSheet, Text, TouchableOpacity, View } from "react-native";
4
- import { absoluteFill, night } from "@buoy-gg/shared-ui";
5
-
6
- /**
7
- * The header's overflow menu.
8
- *
9
- * The toolbar had grown to three status badges and six icon buttons, which on a
10
- * 402pt screen meant the pending badge was being overlapped by the search
11
- * button. Something had to leave, and the rule for deciding what is:
12
- *
13
- * **A control that COMMUNICATES STATE stays visible. A destination or a rare
14
- * action goes in the menu.**
15
- *
16
- * That keeps the power toggle (are we capturing?), the overrides flask (is the
17
- * app being lied to, and how many rules?), the status badges (what happened)
18
- * and Clear (the reproduce loop is clear → repro → read, and burying the first
19
- * step doubles it). Search stays because it's the only way through 500 rows.
20
- *
21
- * Filters, Saved and Copy leave. Filters is the interesting one — it does show
22
- * state, so the ⋯ carries a dot when a filter is applied rather than hiding
23
- * that fact.
24
- */
25
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
26
- export function NetworkHeaderMenuButton({
27
- onPress,
28
- isOpen,
29
- hasIndicator
30
- }) {
31
- return /*#__PURE__*/_jsxs(TouchableOpacity, {
32
- onPress: onPress,
33
- "sentry-label": "ignore toggle header menu",
34
- testID: "buoy-network-menu",
35
- accessibilityRole: "button",
36
- accessibilityLabel: isOpen ? "Close menu" : "More actions",
37
- style: [styles.button, isOpen && styles.buttonOpen],
38
- children: [/*#__PURE__*/_jsxs(View, {
39
- style: styles.dots,
40
- children: [/*#__PURE__*/_jsx(View, {
41
- style: [styles.dot, isOpen && styles.dotOpen]
42
- }), /*#__PURE__*/_jsx(View, {
43
- style: [styles.dot, isOpen && styles.dotOpen]
44
- }), /*#__PURE__*/_jsx(View, {
45
- style: [styles.dot, isOpen && styles.dotOpen]
46
- })]
47
- }), hasIndicator ? /*#__PURE__*/_jsx(View, {
48
- style: styles.indicator
49
- }) : null]
50
- });
51
- }
52
- /**
53
- * The dropdown itself, rendered in the modal BODY rather than the header —
54
- * the header is a fixed-height row and anything overflowing it is clipped, so
55
- * a panel anchored to the top-right of the body lands exactly where a dropdown
56
- * from the ⋯ should appear.
57
- */
58
- export function NetworkHeaderMenu({
59
- onClose,
60
- children
61
- }) {
62
- return /*#__PURE__*/_jsxs(View, {
63
- style: styles.overlay,
64
- children: [/*#__PURE__*/_jsx(TouchableOpacity, {
65
- style: styles.backdrop,
66
- activeOpacity: 1,
67
- onPress: onClose,
68
- "sentry-label": "ignore dismiss header menu"
69
- }), /*#__PURE__*/_jsx(View, {
70
- style: styles.panel,
71
- children: children
72
- })]
73
- });
74
- }
75
- export function NetworkHeaderMenuItem({
76
- icon,
77
- label,
78
- detail,
79
- testID,
80
- onPress
81
- }) {
82
- return /*#__PURE__*/_jsxs(TouchableOpacity, {
83
- onPress: onPress,
84
- "sentry-label": "ignore header menu item",
85
- testID: testID,
86
- accessibilityRole: "button",
87
- accessibilityLabel: label,
88
- style: styles.item,
89
- children: [/*#__PURE__*/_jsx(View, {
90
- style: styles.itemIcon,
91
- children: icon
92
- }), /*#__PURE__*/_jsx(Text, {
93
- style: styles.itemLabel,
94
- children: label
95
- }), detail ? /*#__PURE__*/_jsx(Text, {
96
- style: styles.itemDetail,
97
- children: detail
98
- }) : null]
99
- });
100
- }
101
- const styles = StyleSheet.create({
102
- // The same 32×32 box every other header action uses, minus the fill and
103
- // border. Padding alone gave a 3pt-wide hit area AND a shorter box than its
104
- // neighbours, which is why the dots sat high in the row; a fixed square
105
- // centres the glyph on the same baseline as the search/power/clear icons.
106
- button: {
107
- width: 32,
108
- height: 32,
109
- borderRadius: 8,
110
- alignItems: "center",
111
- justifyContent: "center"
112
- },
113
- // Only lit while the menu is down — the button is the one thing not covered
114
- // by the backdrop, so it has to look like the thing that is currently open.
115
- buttonOpen: {
116
- backgroundColor: night.color.surfaceElevated
117
- },
118
- dots: {
119
- flexDirection: "column",
120
- gap: 2.5,
121
- alignItems: "center"
122
- },
123
- dot: {
124
- width: 3,
125
- height: 3,
126
- borderRadius: 2,
127
- backgroundColor: night.color.textSecondary
128
- },
129
- dotOpen: {
130
- backgroundColor: night.color.text
131
- },
132
- indicator: {
133
- position: "absolute",
134
- // Sits just up-and-right of the top dot. Anchored to the 32pt box's corner
135
- // it would float off on its own, since the dot column is only 3pt wide.
136
- top: 6,
137
- right: 8,
138
- width: 6,
139
- height: 6,
140
- borderRadius: 3,
141
- backgroundColor: night.color.accent
142
- },
143
- overlay: {
144
- ...absoluteFill,
145
- zIndex: 50
146
- },
147
- backdrop: {
148
- ...absoluteFill,
149
- backgroundColor: "rgba(0,0,0,0.5)"
150
- },
151
- // The night card: near-black surface, hairline border, row radius.
152
- panel: {
153
- position: "absolute",
154
- top: 6,
155
- right: 8,
156
- minWidth: 196,
157
- paddingVertical: 4,
158
- borderRadius: 10,
159
- borderWidth: 1,
160
- borderColor: night.color.border,
161
- backgroundColor: night.color.surface
162
- },
163
- item: {
164
- flexDirection: "row",
165
- alignItems: "center",
166
- gap: 10,
167
- paddingHorizontal: 12,
168
- paddingVertical: 11
169
- },
170
- itemIcon: {
171
- width: 16,
172
- alignItems: "center"
173
- },
174
- itemLabel: {
175
- flex: 1,
176
- fontSize: 13,
177
- fontWeight: "600",
178
- color: night.color.text
179
- },
180
- itemDetail: {
181
- fontSize: 11,
182
- color: night.color.textTertiary
183
- }
184
- });
1
+ "use strict";import{StyleSheet as y,Text as s,TouchableOpacity as c,View as r}from"react-native";import{absoluteFill as d,night as i}from"@buoy-gg/shared-ui";import{jsx as o,jsxs as a}from"react/jsx-runtime";export function NetworkHeaderMenuButton({onPress:n,isOpen:t,hasIndicator:l}){return a(c,{onPress:n,"sentry-label":"ignore toggle header menu",testID:"buoy-network-menu",accessibilityRole:"button",accessibilityLabel:t?"Close menu":"More actions",style:[e.button,t&&e.buttonOpen],children:[a(r,{style:e.dots,children:[o(r,{style:[e.dot,t&&e.dotOpen]}),o(r,{style:[e.dot,t&&e.dotOpen]}),o(r,{style:[e.dot,t&&e.dotOpen]})]}),l?o(r,{style:e.indicator}):null]})}export function NetworkHeaderMenu({onClose:n,children:t}){return a(r,{style:e.overlay,children:[o(c,{style:e.backdrop,activeOpacity:1,onPress:n,"sentry-label":"ignore dismiss header menu"}),o(r,{style:e.panel,children:t})]})}export function NetworkHeaderMenuItem({icon:n,label:t,detail:l,testID:u,onPress:b}){return a(c,{onPress:b,"sentry-label":"ignore header menu item",testID:u,accessibilityRole:"button",accessibilityLabel:t,style:e.item,children:[o(r,{style:e.itemIcon,children:n}),o(s,{style:e.itemLabel,children:t}),l?o(s,{style:e.itemDetail,children:l}):null]})}const e=y.create({button:{width:32,height:32,borderRadius:8,alignItems:"center",justifyContent:"center"},buttonOpen:{backgroundColor:i.color.surfaceElevated},dots:{flexDirection:"column",gap:2.5,alignItems:"center"},dot:{width:3,height:3,borderRadius:2,backgroundColor:i.color.textSecondary},dotOpen:{backgroundColor:i.color.text},indicator:{position:"absolute",top:6,right:8,width:6,height:6,borderRadius:3,backgroundColor:i.color.accent},overlay:{...d,zIndex:50},backdrop:{...d,backgroundColor:"rgba(0,0,0,0.5)"},panel:{position:"absolute",top:6,right:8,minWidth:196,paddingVertical:4,borderRadius:10,borderWidth:1,borderColor:i.color.border,backgroundColor:i.color.surface},item:{flexDirection:"row",alignItems:"center",gap:10,paddingHorizontal:12,paddingVertical:11},itemIcon:{width:16,alignItems:"center"},itemLabel:{flex:1,fontSize:13,fontWeight:"600",color:i.color.text},itemDetail:{fontSize:11,color:i.color.textTertiary}});
@@ -1,399 +1 @@
1
- "use strict";
2
-
3
- /**
4
- * The network tool's LIST screen — owns the event-store subscription, the
5
- * FlatList, empty state, disabled banner, and the free-tier locked-history
6
- * footer. Decomposed from NetworkModal per rule3 so per-event re-renders
7
- * are confined to this subtree (plus the header's live leaves) instead of
8
- * the whole modal.
9
- *
10
- * Stable-tree contract (rule4): hooks run unconditionally, then the
11
- * component returns null when not visible. The subscription is gated with
12
- * `paused || !visible` so a hidden list doesn't subscribe at all.
13
- */
14
-
15
- import { useCallback } from "react";
16
- import { FlatList, StyleSheet, Text, TouchableOpacity, View } from "react-native";
17
- import { FlaskConical, Pin, Power, macOSColors, ToolEmptyState, resolveListEmptyState, EVENT_LIST_PRESET, monoFont } from "@buoy-gg/shared-ui";
18
- import { NetworkEventItemCompact } from "./NetworkEventItemCompact";
19
- import { NetworkUpgradeBanner } from "./NetworkUpgradeBanner";
20
- import { useNetworkEventList } from "../hooks/useNetworkEventList";
21
- import { useNetworkSaved } from "../hooks/useNetworkSaved";
22
- import { useOverrideRules } from "../hooks/useOverrideRules";
23
- import { overriddenEvents } from "../overrides/overriddenRows";
24
- import { splitPinned } from "../utils/withPinnedFirst";
25
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
26
- const keyExtractor = item => item.id;
27
-
28
- /**
29
- * The PINNED strip above the live list.
30
- *
31
- * It renders OUTSIDE the FlatList on purpose. The list's window/batch values
32
- * are a measured configuration (see the FlatList below), and merging pins into
33
- * `data` would mean sentinel items in `keyExtractor`/`renderItem` and a
34
- * section boundary that moves as events arrive. Keeping pins in their own
35
- * bounded strip (capped at MAX_PINNED in the store) leaves that tuning
36
- * untouched — and makes "pins ignore the filters" fall out for free, because
37
- * this strip is never handed the filter.
38
- */
39
- function PinnedSection({
40
- events,
41
- onEventPress,
42
- onLongPress,
43
- savedLiveIds,
44
- onClearPinned
45
- }) {
46
- if (events.length === 0) return null;
47
- return /*#__PURE__*/_jsxs(View, {
48
- style: styles.pinnedSection,
49
- children: [/*#__PURE__*/_jsxs(View, {
50
- style: styles.pinnedHeader,
51
- children: [/*#__PURE__*/_jsx(Pin, {
52
- size: 11,
53
- active: true,
54
- color: macOSColors.semantic.info
55
- }), /*#__PURE__*/_jsxs(Text, {
56
- style: styles.pinnedTitle,
57
- children: ["PINNED \xB7 ", events.length]
58
- }), /*#__PURE__*/_jsx(TouchableOpacity, {
59
- onPress: onClearPinned,
60
- "sentry-label": "ignore unpin all",
61
- style: styles.pinnedClear,
62
- children: /*#__PURE__*/_jsx(Text, {
63
- style: styles.pinnedClearText,
64
- children: "Unpin all"
65
- })
66
- })]
67
- }), events.map(event => /*#__PURE__*/_jsx(NetworkEventItemCompact, {
68
- event: event,
69
- onPress: onEventPress,
70
- onLongPress: onLongPress,
71
- pinned: true,
72
- saved: savedLiveIds.has(event.id)
73
- }, event.id))]
74
- });
75
- }
76
-
77
- /**
78
- * The OVERRIDDEN strip, above the pins.
79
- *
80
- * An overridden request is the one thing in this list that isn't true — the app
81
- * got something the server never sent. That has to be impossible to miss, and a
82
- * glyph on a row twenty scroll-positions down isn't. It sits ABOVE pins because
83
- * a stale override explains a bug, whereas a pin only marks one.
84
- *
85
- * Rows are matched against the RULES rather than filtered on the `override`
86
- * mark, so the request you built a rule from hoists immediately instead of
87
- * waiting for the endpoint to be called again.
88
- *
89
- * The header button is PAUSE, not "Manage". Flipping overrides off and on is by
90
- * far the most repeated action in a testing session — force the failure, check
91
- * the UI, turn it off, check the happy path, turn it back on — and it used to
92
- * cost a trip to another screen each way. The manager is still one tap away on
93
- * the toolbar; it just isn't the thing you reach for twenty times an hour.
94
- */
95
- function OverriddenSection({
96
- events,
97
- onEventPress,
98
- onLongPress,
99
- savedLiveIds,
100
- paused,
101
- onTogglePaused
102
- }) {
103
- if (events.length === 0) return null;
104
- return /*#__PURE__*/_jsxs(View, {
105
- style: [styles.overriddenSection, paused && styles.overriddenSectionOff],
106
- children: [/*#__PURE__*/_jsxs(View, {
107
- style: styles.overriddenHeader,
108
- children: [/*#__PURE__*/_jsx(FlaskConical, {
109
- size: 11,
110
- color: paused ? macOSColors.text.muted : macOSColors.semantic.warning
111
- }), /*#__PURE__*/_jsx(Text, {
112
- testID: "buoy-network-overridden-strip",
113
- style: [styles.overriddenTitle, paused && styles.overriddenTitleOff],
114
- children: paused ? `PAUSED · ${events.length}` : `OVERRIDDEN · ${events.length}`
115
- }), /*#__PURE__*/_jsx(TouchableOpacity, {
116
- onPress: onTogglePaused,
117
- "sentry-label": "ignore pause overrides",
118
- style: styles.overriddenManage,
119
- children: /*#__PURE__*/_jsx(Text, {
120
- style: [styles.overriddenManageText, paused && styles.overriddenTitleOff],
121
- children: paused ? "Resume" : "Pause"
122
- })
123
- })]
124
- }), events.map(event => /*#__PURE__*/_jsx(NetworkEventItemCompact, {
125
- event: event,
126
- onPress: onEventPress,
127
- onLongPress: onLongPress,
128
- overridden: true,
129
- saved: savedLiveIds.has(event.id)
130
- }, event.id))]
131
- });
132
- }
133
- export function NetworkListScreen({
134
- visible,
135
- paused,
136
- filter,
137
- ignoredPatterns,
138
- isPro,
139
- searchText,
140
- onEventPress,
141
- onUpgradePress
142
- }) {
143
- const {
144
- visibleEvents,
145
- hasLockedEvents,
146
- lockedEventCount,
147
- totalEvents
148
- } = useNetworkEventList({
149
- filter,
150
- ignoredPatterns,
151
- paused,
152
- visible,
153
- isPro
154
- });
155
-
156
- // Pins come from the persisted saved store, NOT from the live list — that is
157
- // what lets a pinned failure survive Clear, the 500-event cap and a reload.
158
- const {
159
- pinnedEvents,
160
- pinnedLiveIds,
161
- savedLiveIds,
162
- togglePin,
163
- clearPinned
164
- } = useNetworkSaved();
165
-
166
- // Which rules are live right now — the strip below reflects the rules, not
167
- // the history, so it's correct the moment a rule is made or removed.
168
- const {
169
- rules,
170
- enabled: overridesEnabled,
171
- setEnabled,
172
- isRuleSpent
173
- } = useOverrideRules();
174
-
175
- // Stable identity: handed to memoized rows.
176
- const handleLongPress = useCallback(event => {
177
- togglePin(event);
178
- }, [togglePin]);
179
-
180
- // Everything above is a hook and must run unconditionally; everything below
181
- // is work. `splitPinned` is an O(n) pass over the whole list, and this screen
182
- // re-renders on every modal-root state change — including every prev/next
183
- // step, where it is hidden and the result is thrown away.
184
- if (!visible) return null;
185
- const {
186
- pinned,
187
- rest
188
- } = splitPinned(visibleEvents, pinnedEvents, pinnedLiveIds);
189
-
190
- // Hoist anything an active rule covers. Done after `splitPinned` so a request
191
- // that is both pinned and overridden appears once, in the louder section.
192
- // Paused rules still populate the strip — that's how you find the thing you
193
- // paused in order to resume it. The header says PAUSED instead.
194
- const activeRules = rules.filter(rule => rule.enabled && !isRuleSpent(rule));
195
- const overridden = overriddenEvents([...pinned, ...rest], activeRules);
196
- const overriddenIds = new Set(overridden.map(event => event.id));
197
- const pinnedRows = pinned.filter(event => !overriddenIds.has(event.id));
198
- const restRows = overriddenIds.size ? rest.filter(event => !overriddenIds.has(event.id)) : rest;
199
- const isEnabled = !paused;
200
- const renderItem = ({
201
- item
202
- }) => /*#__PURE__*/_jsx(NetworkEventItemCompact, {
203
- event: item,
204
- onPress: onEventPress,
205
- onLongPress: handleLongPress,
206
- saved: savedLiveIds.has(item.id)
207
- });
208
-
209
- // Which flavour of "nothing here" this is. Pins and overrides render
210
- // outside the list, so a screen showing only those is not empty at all.
211
- const renderEmpty = () => {
212
- // Pins and overrides render outside the list, so a screen showing only
213
- // those is not empty at all.
214
- if (pinnedRows.length > 0 || overridden.length > 0) return null;
215
- return /*#__PURE__*/_jsx(ToolEmptyState, {
216
- testID: "buoy-network-empty",
217
- ...resolveListEmptyState({
218
- subject: "requests",
219
- search: searchText,
220
- total: totalEvents,
221
- capturing: isEnabled,
222
- waiting: {
223
- // fishing = capture is on and nothing has arrived.
224
- otto: "fishing",
225
- title: "No network events",
226
- message: "Network requests will appear here"
227
- },
228
- paused: {
229
- // paused = capture off. Both are literally what the copy says.
230
- title: "No network events",
231
- message: "Enable interception to start capturing"
232
- }
233
- })
234
- });
235
- };
236
- const renderListFooter = () => {
237
- if (!hasLockedEvents) return null;
238
- const isSearching = searchText.length > 0;
239
- const bannerText = isSearching ? `${lockedEventCount} matching ${lockedEventCount === 1 ? "request" : "requests"} in locked history` : `${lockedEventCount} requests locked`;
240
- const subtextMessage = isSearching ? "Upgrade to Pro to search your full request history" : "Upgrade to Pro to unlock full request history";
241
- return /*#__PURE__*/_jsx(NetworkUpgradeBanner, {
242
- title: bannerText,
243
- subtitle: subtextMessage,
244
- onPress: onUpgradePress
245
- });
246
- };
247
- return /*#__PURE__*/_jsxs(View, {
248
- style: styles.root,
249
- children: [!isEnabled ? /*#__PURE__*/_jsxs(View, {
250
- style: styles.disabledBanner,
251
- children: [/*#__PURE__*/_jsx(Power, {
252
- size: 14,
253
- color: macOSColors.semantic.warning
254
- }), /*#__PURE__*/_jsx(Text, {
255
- style: styles.disabledText,
256
- children: "Network interception is disabled"
257
- })]
258
- }) : null, /*#__PURE__*/_jsx(OverriddenSection, {
259
- events: overridden,
260
- onEventPress: onEventPress,
261
- onLongPress: handleLongPress,
262
- savedLiveIds: savedLiveIds,
263
- paused: !overridesEnabled,
264
- onTogglePaused: () => setEnabled(!overridesEnabled)
265
- }), /*#__PURE__*/_jsx(PinnedSection, {
266
- events: pinnedRows,
267
- onEventPress: onEventPress,
268
- onLongPress: handleLongPress,
269
- savedLiveIds: savedLiveIds,
270
- onClearPinned: clearPinned
271
- }), restRows.length > 0 || hasLockedEvents ? /*#__PURE__*/_jsx(FlatList, {
272
- testID: "buoy-network-list",
273
- data: restRows,
274
- renderItem: renderItem,
275
- keyExtractor: keyExtractor,
276
- contentContainerStyle: styles.listContent,
277
- showsVerticalScrollIndicator: true
278
- // Clipped cells falsely fail Detox's hittability check (known
279
- // RN+Detox issue), so e2e bundles (Metro started with
280
- // EXPO_PUBLIC_E2E=1) turn clipping off — see EVENT_LIST_PRESET.
281
- ,
282
- onEndReachedThreshold: 0.8
283
- // The list OWNS scrolling (NetworkModal passes
284
- // disableScrollWrapper while this screen is visible) so FlatList
285
- // virtualization actually works. The previous shipped config —
286
- // scrollEnabled=false inside JsModal's ScrollView — mounted ALL
287
- // rows: at the store's 500-event cap that measured 17 JS FPS /
288
- // 133% CPU / 1.4GB vs ~53 JS FPS / 52% / 360MB virtualized
289
- // (buoy-optimize batch 2026-07-06, batch-1783396983529-6l7w).
290
- // Window/batch values are the batch's "tuned" winner (EVENT_LIST_PRESET).
291
- ,
292
- scrollEnabled: true,
293
- ...EVENT_LIST_PRESET,
294
- // Saving a request from the detail view changes a row's glyph
295
- // without changing `data`. VirtualizedList is a PureComponent, so
296
- // the Set has to be declared as a re-render marker rather than
297
- // relying on `renderItem` getting a fresh identity.
298
- extraData: savedLiveIds,
299
- "sentry-label": "ignore network events list",
300
- ListFooterComponent: renderListFooter
301
- }) : renderEmpty()]
302
- });
303
- }
304
- const styles = StyleSheet.create({
305
- root: {
306
- flex: 1,
307
- minHeight: 0
308
- },
309
- /**
310
- * The strip is separated from the live list by a real rule, not just space:
311
- * these rows do NOT obey the filters, and the boundary is what tells the
312
- * user why a request they just filtered out is still on screen.
313
- */
314
- overriddenSection: {
315
- borderBottomWidth: 1,
316
- borderBottomColor: macOSColors.semantic.warning + "44",
317
- backgroundColor: macOSColors.semantic.warningBackground
318
- },
319
- overriddenSectionOff: {
320
- borderBottomColor: macOSColors.border.default,
321
- backgroundColor: macOSColors.background.card
322
- },
323
- overriddenTitleOff: {
324
- color: macOSColors.text.muted
325
- },
326
- overriddenHeader: {
327
- flexDirection: "row",
328
- alignItems: "center",
329
- gap: 6,
330
- paddingHorizontal: 12,
331
- paddingTop: 8,
332
- paddingBottom: 4
333
- },
334
- overriddenTitle: {
335
- flex: 1,
336
- fontSize: 10,
337
- fontWeight: "700",
338
- letterSpacing: 0.8,
339
- color: macOSColors.semantic.warning
340
- },
341
- overriddenManage: {
342
- paddingHorizontal: 6,
343
- paddingVertical: 2
344
- },
345
- overriddenManageText: {
346
- fontSize: 10,
347
- fontWeight: "600",
348
- color: macOSColors.semantic.warning
349
- },
350
- pinnedSection: {
351
- borderBottomWidth: 1,
352
- borderBottomColor: macOSColors.border.default,
353
- paddingBottom: 4
354
- },
355
- pinnedHeader: {
356
- flexDirection: "row",
357
- alignItems: "center",
358
- gap: 6,
359
- paddingHorizontal: 20,
360
- paddingTop: 10,
361
- paddingBottom: 6
362
- },
363
- pinnedTitle: {
364
- flex: 1,
365
- color: macOSColors.semantic.info,
366
- fontSize: 10,
367
- fontWeight: "700",
368
- letterSpacing: 0.6,
369
- fontFamily: monoFont
370
- },
371
- pinnedClear: {
372
- paddingHorizontal: 6,
373
- paddingVertical: 2
374
- },
375
- pinnedClearText: {
376
- color: macOSColors.text.muted,
377
- fontSize: 10
378
- },
379
- disabledBanner: {
380
- flexDirection: "row",
381
- alignItems: "center",
382
- gap: 8,
383
- padding: 10,
384
- marginHorizontal: 12,
385
- marginTop: 8,
386
- backgroundColor: macOSColors.semantic.warningBackground,
387
- borderRadius: 8,
388
- borderWidth: 1,
389
- borderColor: macOSColors.semantic.warning + "20"
390
- },
391
- disabledText: {
392
- color: macOSColors.semantic.warning,
393
- fontSize: 11,
394
- flex: 1
395
- },
396
- listContent: {
397
- paddingTop: 8
398
- }
399
- });
1
+ "use strict";import{useCallback as $}from"react";import{FlatList as _,StyleSheet as A,Text as m,TouchableOpacity as I,View as c}from"react-native";import{FlaskConical as G,Pin as J,Power as K,macOSColors as e,ToolEmptyState as Q,resolveListEmptyState as X,EVENT_LIST_PRESET as Y,monoFont as Z}from"@buoy-gg/shared-ui";import{NetworkEventItemCompact as w}from"./NetworkEventItemCompact";import{NetworkUpgradeBanner as ee}from"./NetworkUpgradeBanner";import{useNetworkEventList as ne}from"../hooks/useNetworkEventList";import{useNetworkSaved as te}from"../hooks/useNetworkSaved";import{useOverrideRules as re}from"../hooks/useOverrideRules";import{overriddenEvents as oe}from"../overrides/overriddenRows";import{splitPinned as ie}from"../utils/withPinnedFirst";import{jsx as n,jsxs as l}from"react/jsx-runtime";const de=o=>o.id;function se({events:o,onEventPress:a,onLongPress:g,savedLiveIds:p,onClearPinned:i}){if(o.length===0)return null;return l(c,{style:t.pinnedSection,children:[l(c,{style:t.pinnedHeader,children:[n(J,{size:11,active:true,color:e.semantic.info}),l(m,{style:t.pinnedTitle,children:["PINNED \xB7 ",o.length]}),n(I,{onPress:i,"sentry-label":"ignore unpin all",style:t.pinnedClear,children:n(m,{style:t.pinnedClearText,children:"Unpin all"})})]}),o.map(d=>n(w,{event:d,onPress:a,onLongPress:g,pinned:true,saved:p.has(d.id)},d.id))]})}function le({events:o,onEventPress:a,onLongPress:g,savedLiveIds:p,paused:i,onTogglePaused:d}){if(o.length===0)return null;return l(c,{style:[t.overriddenSection,i&&t.overriddenSectionOff],children:[l(c,{style:t.overriddenHeader,children:[n(G,{size:11,color:i?e.text.muted:e.semantic.warning}),n(m,{testID:"buoy-network-overridden-strip",style:[t.overriddenTitle,i&&t.overriddenTitleOff],children:i?`PAUSED \xB7 ${o.length}`:`OVERRIDDEN \xB7 ${o.length}`}),n(I,{onPress:d,"sentry-label":"ignore pause overrides",style:t.overriddenManage,children:n(m,{style:[t.overriddenManageText,i&&t.overriddenTitleOff],children:i?"Resume":"Pause"})})]}),o.map(s=>n(w,{event:s,onPress:a,onLongPress:g,overridden:true,saved:p.has(s.id)},s.id))]})}export function NetworkListScreen({visible:o,paused:a,filter:g,ignoredPatterns:p,isPro:i,searchText:d,onEventPress:s,onUpgradePress:L}){const{visibleEvents:z,hasLockedEvents:S,lockedEventCount:f,totalEvents:B}=ne({filter:g,ignoredPatterns:p,paused:a,visible:o,isPro:i});const{pinnedEvents:N,pinnedLiveIds:D,savedLiveIds:u,togglePin:k,clearPinned:R}=te();const{rules:H,enabled:x,setEnabled:O,isRuleSpent:q}=re();const h=$(r=>{k(r)},[k]);if(!o)return null;const{pinned:E,rest:v}=ie(z,N,D);const F=H.filter(r=>r.enabled&&!q(r));const b=oe([...E,...v],F);const y=new Set(b.map(r=>r.id));const P=E.filter(r=>!y.has(r.id));const T=y.size?v.filter(r=>!y.has(r.id)):v;const C=!a;const V=({item:r})=>n(w,{event:r,onPress:s,onLongPress:h,saved:u.has(r.id)});const W=()=>{if(P.length>0||b.length>0)return null;return n(Q,{testID:"buoy-network-empty",...X({subject:"requests",search:d,total:B,capturing:C,waiting:{otto:"fishing",title:"No network events",message:"Network requests will appear here"},paused:{title:"No network events",message:"Enable interception to start capturing"}})})};const j=()=>{if(!S)return null;const r=d.length>0;const M=r?`${f} matching ${f===1?"request":"requests"} in locked history`:`${f} requests locked`;const U=r?"Upgrade to Pro to search your full request history":"Upgrade to Pro to unlock full request history";return n(ee,{title:M,subtitle:U,onPress:L})};return l(c,{style:t.root,children:[!C?l(c,{style:t.disabledBanner,children:[n(K,{size:14,color:e.semantic.warning}),n(m,{style:t.disabledText,children:"Network interception is disabled"})]}):null,n(le,{events:b,onEventPress:s,onLongPress:h,savedLiveIds:u,paused:!x,onTogglePaused:()=>O(!x)}),n(se,{events:P,onEventPress:s,onLongPress:h,savedLiveIds:u,onClearPinned:R}),T.length>0||S?n(_,{testID:"buoy-network-list",data:T,renderItem:V,keyExtractor:de,contentContainerStyle:t.listContent,showsVerticalScrollIndicator:true,onEndReachedThreshold:.8,scrollEnabled:true,...Y,extraData:u,"sentry-label":"ignore network events list",ListFooterComponent:j}):W()]})}const t=A.create({root:{flex:1,minHeight:0},overriddenSection:{borderBottomWidth:1,borderBottomColor:e.semantic.warning+"44",backgroundColor:e.semantic.warningBackground},overriddenSectionOff:{borderBottomColor:e.border.default,backgroundColor:e.background.card},overriddenTitleOff:{color:e.text.muted},overriddenHeader:{flexDirection:"row",alignItems:"center",gap:6,paddingHorizontal:12,paddingTop:8,paddingBottom:4},overriddenTitle:{flex:1,fontSize:10,fontWeight:"700",letterSpacing:.8,color:e.semantic.warning},overriddenManage:{paddingHorizontal:6,paddingVertical:2},overriddenManageText:{fontSize:10,fontWeight:"600",color:e.semantic.warning},pinnedSection:{borderBottomWidth:1,borderBottomColor:e.border.default,paddingBottom:4},pinnedHeader:{flexDirection:"row",alignItems:"center",gap:6,paddingHorizontal:20,paddingTop:10,paddingBottom:6},pinnedTitle:{flex:1,color:e.semantic.info,fontSize:10,fontWeight:"700",letterSpacing:.6,fontFamily:Z},pinnedClear:{paddingHorizontal:6,paddingVertical:2},pinnedClearText:{color:e.text.muted,fontSize:10},disabledBanner:{flexDirection:"row",alignItems:"center",gap:8,padding:10,marginHorizontal:12,marginTop:8,backgroundColor:e.semantic.warningBackground,borderRadius:8,borderWidth:1,borderColor:e.semantic.warning+"20"},disabledText:{color:e.semantic.warning,fontSize:11,flex:1},listContent:{paddingTop:8}});