@buoy-gg/network 7.0.40 → 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 (275) hide show
  1. package/README.md +11 -79
  2. package/lib/commonjs/index.js +1 -325
  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 -404
  22. package/lib/commonjs/network/components/NetworkListScreen.web.js +1 -625
  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 -110
  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 -453
  61. package/lib/commonjs/network/overrides/engine.js +1 -93
  62. package/lib/commonjs/network/overrides/matchRule.js +1 -81
  63. package/lib/commonjs/network/overrides/overriddenRows.js +1 -0
  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 -393
  80. package/lib/commonjs/network/utils/networkListener.js +4 -1259
  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 -0
  85. package/lib/commonjs/network/utils/resolveRequestUrl.js +1 -0
  86. package/lib/commonjs/network/utils/selectSavedEvents.js +1 -39
  87. package/lib/commonjs/network/utils/startNetworkCapture.js +1 -0
  88. package/lib/commonjs/network/utils/withPinnedFirst.js +1 -32
  89. package/lib/commonjs/preset.js +1 -102
  90. package/lib/module/index.js +1 -103
  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 -400
  110. package/lib/module/network/components/NetworkListScreen.web.js +1 -623
  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 -106
  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 -446
  149. package/lib/module/network/overrides/engine.js +1 -85
  150. package/lib/module/network/overrides/matchRule.js +1 -75
  151. package/lib/module/network/overrides/overriddenRows.js +1 -0
  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 -391
  168. package/lib/module/network/utils/networkListener.js +4 -1249
  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 -0
  173. package/lib/module/network/utils/resolveRequestUrl.js +1 -0
  174. package/lib/module/network/utils/selectSavedEvents.js +1 -35
  175. package/lib/module/network/utils/startNetworkCapture.js +1 -0
  176. package/lib/module/network/utils/withPinnedFirst.js +1 -28
  177. package/lib/module/preset.js +1 -100
  178. package/lib/typescript/index.d.ts +1 -0
  179. package/lib/typescript/network/overrides/applyToXhr.d.ts +1 -0
  180. package/lib/typescript/network/overrides/engine.d.ts +1 -1
  181. package/lib/typescript/network/overrides/matchRule.d.ts +1 -1
  182. package/lib/typescript/network/overrides/overriddenRows.d.ts +16 -0
  183. package/lib/typescript/network/overrides/resolveOverride.d.ts +2 -2
  184. package/lib/typescript/network/overrides/types.d.ts +9 -0
  185. package/lib/typescript/network/utils/networkListener.d.ts +14 -4
  186. package/lib/typescript/network/utils/networkSavedStore.d.ts +4 -4
  187. package/lib/typescript/network/utils/realNow.d.ts +18 -0
  188. package/lib/typescript/network/utils/requestId.d.ts +2 -0
  189. package/lib/typescript/network/utils/resolveRequestUrl.d.ts +3 -0
  190. package/lib/typescript/network/utils/startNetworkCapture.d.ts +6 -0
  191. package/lib/web/index.mjs +145 -0
  192. package/package.json +32 -10
  193. package/lib/typescript/index.d.ts.map +0 -1
  194. package/lib/typescript/index.web.d.ts.map +0 -1
  195. package/lib/typescript/network/components/DataViewer.web.d.ts.map +0 -1
  196. package/lib/typescript/network/components/NetworkCopyScreen.web.d.ts.map +0 -1
  197. package/lib/typescript/network/components/NetworkCopySettingsView.d.ts.map +0 -1
  198. package/lib/typescript/network/components/NetworkCopySettingsView.web.d.ts.map +0 -1
  199. package/lib/typescript/network/components/NetworkDetailScreen.web.d.ts.map +0 -1
  200. package/lib/typescript/network/components/NetworkDetailStepper.d.ts.map +0 -1
  201. package/lib/typescript/network/components/NetworkDetailStepper.web.d.ts.map +0 -1
  202. package/lib/typescript/network/components/NetworkEventDetailView.d.ts.map +0 -1
  203. package/lib/typescript/network/components/NetworkEventDetailView.web.d.ts.map +0 -1
  204. package/lib/typescript/network/components/NetworkEventItemCompact.d.ts.map +0 -1
  205. package/lib/typescript/network/components/NetworkEventItemCompact.web.d.ts.map +0 -1
  206. package/lib/typescript/network/components/NetworkFilterScreen.web.d.ts.map +0 -1
  207. package/lib/typescript/network/components/NetworkFilterViewV3.d.ts.map +0 -1
  208. package/lib/typescript/network/components/NetworkFilterViewV3.web.d.ts.map +0 -1
  209. package/lib/typescript/network/components/NetworkHeaderLive.d.ts.map +0 -1
  210. package/lib/typescript/network/components/NetworkHeaderLive.web.d.ts.map +0 -1
  211. package/lib/typescript/network/components/NetworkHeaderMenu.d.ts.map +0 -1
  212. package/lib/typescript/network/components/NetworkListScreen.d.ts.map +0 -1
  213. package/lib/typescript/network/components/NetworkListScreen.web.d.ts.map +0 -1
  214. package/lib/typescript/network/components/NetworkModal.d.ts.map +0 -1
  215. package/lib/typescript/network/components/NetworkNumberPrompt.d.ts.map +0 -1
  216. package/lib/typescript/network/components/NetworkNumberPrompt.web.d.ts.map +0 -1
  217. package/lib/typescript/network/components/NetworkOverrideEditor.d.ts.map +0 -1
  218. package/lib/typescript/network/components/NetworkOverrideEditor.web.d.ts.map +0 -1
  219. package/lib/typescript/network/components/NetworkOverrideHeaderButton.d.ts.map +0 -1
  220. package/lib/typescript/network/components/NetworkOverrideHeaderButton.web.d.ts.map +0 -1
  221. package/lib/typescript/network/components/NetworkOverridesButton.d.ts.map +0 -1
  222. package/lib/typescript/network/components/NetworkOverridesButton.web.d.ts.map +0 -1
  223. package/lib/typescript/network/components/NetworkOverridesScreen.d.ts.map +0 -1
  224. package/lib/typescript/network/components/NetworkOverridesScreen.web.d.ts.map +0 -1
  225. package/lib/typescript/network/components/NetworkSavedScreen.d.ts.map +0 -1
  226. package/lib/typescript/network/components/NetworkSavedScreen.web.d.ts.map +0 -1
  227. package/lib/typescript/network/components/NetworkUpgradeBanner.d.ts.map +0 -1
  228. package/lib/typescript/network/components/response-editor/Explorer.d.ts.map +0 -1
  229. package/lib/typescript/network/components/response-editor/Explorer.web.d.ts.map +0 -1
  230. package/lib/typescript/network/components/response-editor/deleteNestedDataByPath.d.ts.map +0 -1
  231. package/lib/typescript/network/components/response-editor/editorContext.d.ts.map +0 -1
  232. package/lib/typescript/network/components/response-editor/updateNestedDataByPath.d.ts.map +0 -1
  233. package/lib/typescript/network/conditions/NetworkConditionsControl.d.ts.map +0 -1
  234. package/lib/typescript/network/conditions/NetworkConditionsControl.test.d.ts.map +0 -1
  235. package/lib/typescript/network/conditions/NetworkConditionsIcon.d.ts.map +0 -1
  236. package/lib/typescript/network/conditions/NetworkFloatingTool.d.ts.map +0 -1
  237. package/lib/typescript/network/conditions/NetworkFloatingTool.test.d.ts.map +0 -1
  238. package/lib/typescript/network/conditions/store.d.ts.map +0 -1
  239. package/lib/typescript/network/conditions/wait.d.ts.map +0 -1
  240. package/lib/typescript/network/conditions/xhr.d.ts.map +0 -1
  241. package/lib/typescript/network/hooks/useLiveNetworkEvent.d.ts.map +0 -1
  242. package/lib/typescript/network/hooks/useNetworkBadgeCounts.d.ts.map +0 -1
  243. package/lib/typescript/network/hooks/useNetworkEventList.d.ts.map +0 -1
  244. package/lib/typescript/network/hooks/useNetworkEvents.d.ts.map +0 -1
  245. package/lib/typescript/network/hooks/useNetworkHasMatches.d.ts.map +0 -1
  246. package/lib/typescript/network/hooks/useNetworkSaved.d.ts.map +0 -1
  247. package/lib/typescript/network/hooks/useNetworkSelection.d.ts.map +0 -1
  248. package/lib/typescript/network/hooks/useOverrideRules.d.ts.map +0 -1
  249. package/lib/typescript/network/hooks/useTickEveryMinute.d.ts.map +0 -1
  250. package/lib/typescript/network/overrides/applyToFetch.d.ts.map +0 -1
  251. package/lib/typescript/network/overrides/applyToXhr.d.ts.map +0 -1
  252. package/lib/typescript/network/overrides/engine.d.ts.map +0 -1
  253. package/lib/typescript/network/overrides/matchRule.d.ts.map +0 -1
  254. package/lib/typescript/network/overrides/overrideRulesStore.d.ts.map +0 -1
  255. package/lib/typescript/network/overrides/presets.d.ts.map +0 -1
  256. package/lib/typescript/network/overrides/resolveOverride.d.ts.map +0 -1
  257. package/lib/typescript/network/overrides/types.d.ts.map +0 -1
  258. package/lib/typescript/network/sync/networkBodyResolver.d.ts.map +0 -1
  259. package/lib/typescript/network/sync/networkSyncAdapter.d.ts.map +0 -1
  260. package/lib/typescript/network/sync/overrideHonesty.release.test.d.ts.map +0 -1
  261. package/lib/typescript/network/types/index.d.ts.map +0 -1
  262. package/lib/typescript/network/utils/extractOperationName.d.ts.map +0 -1
  263. package/lib/typescript/network/utils/filterNetworkEvents.d.ts.map +0 -1
  264. package/lib/typescript/network/utils/formatGraphQLVariables.d.ts.map +0 -1
  265. package/lib/typescript/network/utils/formatting.d.ts.map +0 -1
  266. package/lib/typescript/network/utils/generateCurl.d.ts.map +0 -1
  267. package/lib/typescript/network/utils/generateNetworkCopyText.d.ts.map +0 -1
  268. package/lib/typescript/network/utils/httpCompletion.d.ts.map +0 -1
  269. package/lib/typescript/network/utils/networkEventStore.d.ts.map +0 -1
  270. package/lib/typescript/network/utils/networkListener.d.ts.map +0 -1
  271. package/lib/typescript/network/utils/networkSavedStore.d.ts.map +0 -1
  272. package/lib/typescript/network/utils/networkSelectionStore.d.ts.map +0 -1
  273. package/lib/typescript/network/utils/selectSavedEvents.d.ts.map +0 -1
  274. package/lib/typescript/network/utils/withPinnedFirst.d.ts.map +0 -1
  275. package/lib/typescript/preset.d.ts.map +0 -1
@@ -1,623 +1 @@
1
- "use strict";
2
-
3
- /**
4
- * NetworkListScreen.web — DOM twin of NetworkListScreen.tsx.
5
- *
6
- * The network tool's LIST screen: owns the event-store subscription, the
7
- * scrolling list, the OVERRIDDEN and PINNED strips, empty state, disabled
8
- * banner, and the free-tier locked-history footer. Identical prop contract,
9
- * hook usage and derivation order as the native file — the data layer is
10
- * REUSED, not forked (`useNetworkEventList`, `useNetworkSaved`,
11
- * `useOverrideRules`, `ruleMatches`, `splitPinned` are all platform-free).
12
- *
13
- * Stable-tree contract (rule4): hooks run unconditionally, then the
14
- * component returns null when not visible. The subscription is gated with
15
- * `paused || !visible` so a hidden list doesn't subscribe at all.
16
- *
17
- * shared-ui RN chrome is replicated as DOM with provenance (web consumers
18
- * resolve `@buoy-gg/shared-ui` to a minimal shim):
19
- * - `macOSColors` / `buoyColors` — inlined verbatim subsets from
20
- * shared/src/ui/gameUI/constants/.
21
- * - Icons — inline lucide SVGs (shared-ui's icons are lucide re-exports).
22
- * - `NetworkUpgradeBanner` (which itself leans on shared-ui `ProBadge` +
23
- * `Zap`) — inlined DOM twin below, values from
24
- * NetworkUpgradeBanner.tsx + license/FeatureGate.tsx `proBadge` styles.
25
- *
26
- * Intentional deviations (all logged):
27
- * - FlatList virtualization → a plain scrolled div. The store caps at 500
28
- * events and web rows are cheap DOM; the window/batch tuning the native
29
- * list carries is a FlatList-only concern.
30
- * (`extraData={savedLiveIds}` is likewise moot — plain `map` has no
31
- * PureComponent bail-out to bust.)
32
- * - The upgrade banner's `ProBadge` renders the static gold "PRO" — the
33
- * Weekend Pass variant reads `useProAccess` from @buoy-gg/license, which
34
- * is not part of the web port.
35
- * - `onEventPress` opens the detail view (ported in F3 as
36
- * NetworkEventDetailView.web / NetworkDetailScreen.web) — callers wire the
37
- * prop to `networkSelectionStore.select`, the screen just calls it
38
- * (native behavior; nothing stubbed here).
39
- * - Native's row tap opens the detail view and long-press toggles the pin;
40
- * both are wired identically here (long-press = 500ms pointer hold, see
41
- * NetworkEventItemCompact.web).
42
- *
43
- * F4 integration point: `ignoredPatterns` is a prop (same as native). The
44
- * native root feeds it from shared-ui's persisted `useIgnoredPatterns` store,
45
- * which the web shim does not expose — web hosts pass `[]` until the filter
46
- * feature lands.
47
- *
48
- * @platform React DOM Web
49
- */
50
-
51
- import { useCallback } from "react";
52
- import { NetworkEventItemCompact } from "./NetworkEventItemCompact.web";
53
- import { useNetworkEventList } from "../hooks/useNetworkEventList";
54
- import { useNetworkSaved } from "../hooks/useNetworkSaved";
55
- import { useOverrideRules } from "../hooks/useOverrideRules";
56
- import { ruleMatches } from "../overrides/matchRule";
57
- import { splitPinned } from "../utils/withPinnedFirst";
58
-
59
- // =============================
60
- // Native palettes (provenance)
61
- // =============================
62
-
63
- /** macOSColors subset — shared/src/ui/gameUI/constants/macOSDesignSystemColors.ts, verbatim. */
64
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
65
- const macOSColors = {
66
- background: {
67
- card: "#1A1A1C"
68
- },
69
- border: {
70
- default: "#2D2D2F"
71
- },
72
- text: {
73
- primary: "#F5F5F7",
74
- muted: "#8E8E93"
75
- },
76
- semantic: {
77
- warning: "#FFEB3B",
78
- warningBackground: "rgba(255, 235, 59, 0.15)",
79
- info: "#00B8E6"
80
- }
81
- };
82
-
83
- /** buoyColors subset — shared/src/ui/gameUI/constants/gameUIColors.ts (macOS theme), verbatim. */
84
- const buoy = {
85
- card: "#1A1A1A",
86
- text: "#E0E0E0",
87
- textMuted: "#888888",
88
- primary: "#20C997"
89
- };
90
-
91
- // =============================
92
- // Inline lucide icons (shared-ui icons are lucide re-exports)
93
- // =============================
94
-
95
- function Svg({
96
- size = 14,
97
- color = "currentColor",
98
- children
99
- }) {
100
- return /*#__PURE__*/_jsx("svg", {
101
- width: size,
102
- height: size,
103
- viewBox: "0 0 24 24",
104
- fill: "none",
105
- stroke: color,
106
- strokeWidth: 2,
107
- strokeLinecap: "round",
108
- strokeLinejoin: "round",
109
- style: {
110
- flexShrink: 0,
111
- display: "block"
112
- },
113
- children: children
114
- });
115
- }
116
- const Globe = p => /*#__PURE__*/_jsxs(Svg, {
117
- ...p,
118
- children: [/*#__PURE__*/_jsx("circle", {
119
- cx: "12",
120
- cy: "12",
121
- r: "10"
122
- }), /*#__PURE__*/_jsx("path", {
123
- d: "M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20"
124
- }), /*#__PURE__*/_jsx("path", {
125
- d: "M2 12h20"
126
- })]
127
- });
128
- const Pin = ({
129
- active,
130
- ...p
131
- }) => /*#__PURE__*/_jsx(Svg, {
132
- ...p,
133
- children: /*#__PURE__*/_jsxs("g", {
134
- transform: active ? "rotate(-45 12 12) translate(12 12) scale(0.92) translate(-12 -12)" : undefined,
135
- children: [/*#__PURE__*/_jsx("path", {
136
- d: "M2.97 21.03 8.18 15.82"
137
- }), /*#__PURE__*/_jsx("path", {
138
- d: "M4.4 10.81 13.19 19.6"
139
- }), /*#__PURE__*/_jsx("path", {
140
- d: "M5.17 10.54 11.43 8.83"
141
- }), /*#__PURE__*/_jsx("path", {
142
- d: "M13.46 18.83 15.17 12.57"
143
- }), /*#__PURE__*/_jsx("rect", {
144
- x: "12.15",
145
- y: "5.4",
146
- width: "9.38",
147
- height: "3.52",
148
- rx: "1.07",
149
- transform: "rotate(-45 16.84 7.16)"
150
- })]
151
- })
152
- });
153
- const Power = p => /*#__PURE__*/_jsxs(Svg, {
154
- ...p,
155
- children: [/*#__PURE__*/_jsx("path", {
156
- d: "M12 2v10"
157
- }), /*#__PURE__*/_jsx("path", {
158
- d: "M18.4 6.6a9 9 0 1 1-12.77.04"
159
- })]
160
- });
161
- const FlaskConical = p => /*#__PURE__*/_jsxs(Svg, {
162
- ...p,
163
- children: [/*#__PURE__*/_jsx("path", {
164
- d: "M10 2v7.527a2 2 0 0 1-.211.896L4.72 20.55a1 1 0 0 0 .9 1.45h12.76a1 1 0 0 0 .9-1.45l-5.069-10.127A2 2 0 0 1 14 9.527V2"
165
- }), /*#__PURE__*/_jsx("path", {
166
- d: "M8.5 2h7"
167
- }), /*#__PURE__*/_jsx("path", {
168
- d: "M7 16h10"
169
- })]
170
- });
171
- const Zap = p => /*#__PURE__*/_jsx(Svg, {
172
- ...p,
173
- children: /*#__PURE__*/_jsx("polygon", {
174
- points: "13 2 3 14 12 14 11 22 21 10 12 10 13 2"
175
- })
176
- });
177
-
178
- // =============================
179
- // NetworkUpgradeBanner DOM twin (provenance: NetworkUpgradeBanner.tsx +
180
- // license/FeatureGate.tsx proBadge styles; ProBadge is static "PRO" — see
181
- // the deviations log)
182
- // =============================
183
-
184
- function NetworkUpgradeBannerWeb({
185
- title,
186
- subtitle,
187
- onPress
188
- }) {
189
- return /*#__PURE__*/_jsxs("button", {
190
- type: "button",
191
- style: styles.upgradeBanner,
192
- onClick: onPress,
193
- children: [/*#__PURE__*/_jsxs("span", {
194
- style: styles.upgradeContent,
195
- children: [/*#__PURE__*/_jsxs("span", {
196
- style: styles.upgradeLeft,
197
- children: [/*#__PURE__*/_jsx(Zap, {
198
- size: 16,
199
- color: buoy.primary
200
- }), /*#__PURE__*/_jsx("span", {
201
- style: styles.upgradeTitle,
202
- children: title
203
- })]
204
- }), /*#__PURE__*/_jsx("span", {
205
- style: styles.proBadge,
206
- children: "PRO"
207
- })]
208
- }), /*#__PURE__*/_jsx("span", {
209
- style: styles.upgradeSubtitle,
210
- children: subtitle
211
- })]
212
- });
213
- }
214
-
215
- // =============================
216
- // Screen (structure mirrors the native file 1:1)
217
- // =============================
218
-
219
- function EmptyState({
220
- isEnabled
221
- }) {
222
- return /*#__PURE__*/_jsxs("div", {
223
- style: styles.emptyState,
224
- children: [/*#__PURE__*/_jsx(Globe, {
225
- size: 32,
226
- color: macOSColors.text.muted
227
- }), /*#__PURE__*/_jsx("div", {
228
- style: styles.emptyTitle,
229
- children: "No network events"
230
- }), /*#__PURE__*/_jsx("div", {
231
- style: styles.emptyText,
232
- children: isEnabled ? "Network requests will appear here" : "Enable interception to start capturing"
233
- })]
234
- });
235
- }
236
-
237
- /**
238
- * The PINNED strip above the live list. Renders OUTSIDE the scrolled list on
239
- * purpose — pins ignore the filters, are bounded at MAX_PINNED in the store,
240
- * and keeping them out of the list keeps the boundary from moving as events
241
- * arrive (same rationale as native).
242
- */
243
- function PinnedSection({
244
- events,
245
- onEventPress,
246
- onLongPress,
247
- savedLiveIds,
248
- onClearPinned
249
- }) {
250
- if (events.length === 0) return null;
251
- return /*#__PURE__*/_jsxs("div", {
252
- style: styles.pinnedSection,
253
- children: [/*#__PURE__*/_jsxs("div", {
254
- style: styles.pinnedHeader,
255
- children: [/*#__PURE__*/_jsx(Pin, {
256
- size: 11,
257
- active: true,
258
- color: macOSColors.semantic.info
259
- }), /*#__PURE__*/_jsxs("span", {
260
- style: styles.pinnedTitle,
261
- children: ["PINNED \xB7 ", events.length]
262
- }), /*#__PURE__*/_jsx("button", {
263
- type: "button",
264
- onClick: onClearPinned,
265
- style: styles.pinnedClear,
266
- children: /*#__PURE__*/_jsx("span", {
267
- style: styles.pinnedClearText,
268
- children: "Unpin all"
269
- })
270
- })]
271
- }), events.map(event => /*#__PURE__*/_jsx(NetworkEventItemCompact, {
272
- event: event,
273
- onPress: onEventPress,
274
- onLongPress: onLongPress,
275
- pinned: true,
276
- saved: savedLiveIds.has(event.id)
277
- }, event.id))]
278
- });
279
- }
280
-
281
- /**
282
- * The OVERRIDDEN strip, above the pins. Rows are matched against the RULES
283
- * rather than filtered on the `override` mark, and the header button is
284
- * PAUSE, not "Manage" — same reasoning as native (see NetworkListScreen.tsx).
285
- */
286
- function OverriddenSection({
287
- events,
288
- onEventPress,
289
- onLongPress,
290
- savedLiveIds,
291
- paused,
292
- onTogglePaused
293
- }) {
294
- if (events.length === 0) return null;
295
- return /*#__PURE__*/_jsxs("div", {
296
- style: {
297
- ...styles.overriddenSection,
298
- ...(paused ? styles.overriddenSectionOff : null)
299
- },
300
- children: [/*#__PURE__*/_jsxs("div", {
301
- style: styles.overriddenHeader,
302
- children: [/*#__PURE__*/_jsx(FlaskConical, {
303
- size: 11,
304
- color: paused ? macOSColors.text.muted : macOSColors.semantic.warning
305
- }), /*#__PURE__*/_jsx("span", {
306
- style: {
307
- ...styles.overriddenTitle,
308
- ...(paused ? styles.overriddenTitleOff : null)
309
- },
310
- children: paused ? `PAUSED · ${events.length}` : `OVERRIDDEN · ${events.length}`
311
- }), /*#__PURE__*/_jsx("button", {
312
- type: "button",
313
- onClick: onTogglePaused,
314
- style: styles.overriddenManage,
315
- children: /*#__PURE__*/_jsx("span", {
316
- style: {
317
- ...styles.overriddenManageText,
318
- ...(paused ? styles.overriddenTitleOff : null)
319
- },
320
- children: paused ? "Resume" : "Pause"
321
- })
322
- })]
323
- }), events.map(event => /*#__PURE__*/_jsx(NetworkEventItemCompact, {
324
- event: event,
325
- onPress: onEventPress,
326
- onLongPress: onLongPress,
327
- overridden: true,
328
- saved: savedLiveIds.has(event.id)
329
- }, event.id))]
330
- });
331
- }
332
- export function NetworkListScreen({
333
- visible,
334
- paused,
335
- filter,
336
- ignoredPatterns,
337
- isPro,
338
- searchText,
339
- onEventPress,
340
- onUpgradePress
341
- }) {
342
- const {
343
- visibleEvents,
344
- hasLockedEvents,
345
- lockedEventCount
346
- } = useNetworkEventList({
347
- filter,
348
- ignoredPatterns,
349
- paused: paused || !visible,
350
- isPro
351
- });
352
-
353
- // Pins come from the persisted saved store, NOT from the live list — that is
354
- // what lets a pinned failure survive Clear, the 500-event cap and a reload.
355
- const {
356
- pinnedEvents,
357
- pinnedLiveIds,
358
- savedLiveIds,
359
- togglePin,
360
- clearPinned
361
- } = useNetworkSaved();
362
-
363
- // Which rules are live right now — the strip below reflects the rules, not
364
- // the history, so it's correct the moment a rule is made or removed.
365
- const {
366
- rules,
367
- enabled: overridesEnabled,
368
- setEnabled,
369
- isRuleSpent
370
- } = useOverrideRules();
371
-
372
- // Stable identity: handed to memoized rows.
373
- const handleLongPress = useCallback(event => {
374
- togglePin(event);
375
- }, [togglePin]);
376
-
377
- // Everything above is a hook and must run unconditionally; everything below
378
- // is work (same rule4 contract as native).
379
- if (!visible) return null;
380
- const {
381
- pinned,
382
- rest
383
- } = splitPinned(visibleEvents, pinnedEvents, pinnedLiveIds);
384
-
385
- // Hoist anything an active rule covers. Done after `splitPinned` so a request
386
- // that is both pinned and overridden appears once, in the louder section.
387
- const activeRules = rules.filter(rule => rule.enabled && !isRuleSpent(rule));
388
- const isOverridden = event => activeRules.some(rule => ruleMatches(rule, event.url, String(event.method || "GET")));
389
- const overridden = activeRules.length ? [...pinned, ...rest].filter(isOverridden) : [];
390
- const overriddenIds = new Set(overridden.map(event => event.id));
391
- const pinnedRows = pinned.filter(event => !overriddenIds.has(event.id));
392
- const restRows = overriddenIds.size ? rest.filter(event => !overriddenIds.has(event.id)) : rest;
393
- const isEnabled = !paused;
394
- const renderListFooter = () => {
395
- if (!hasLockedEvents) return null;
396
- const isSearching = searchText.length > 0;
397
- const bannerText = isSearching ? `${lockedEventCount} matching ${lockedEventCount === 1 ? "request" : "requests"} in locked history` : `${lockedEventCount} requests locked`;
398
- const subtextMessage = isSearching ? "Upgrade to Pro to search your full request history" : "Upgrade to Pro to unlock full request history";
399
- return /*#__PURE__*/_jsx(NetworkUpgradeBannerWeb, {
400
- title: bannerText,
401
- subtitle: subtextMessage,
402
- onPress: onUpgradePress
403
- });
404
- };
405
- return /*#__PURE__*/_jsxs("div", {
406
- style: styles.root,
407
- children: [!isEnabled ? /*#__PURE__*/_jsxs("div", {
408
- style: styles.disabledBanner,
409
- children: [/*#__PURE__*/_jsx(Power, {
410
- size: 14,
411
- color: macOSColors.semantic.warning
412
- }), /*#__PURE__*/_jsx("span", {
413
- style: styles.disabledText,
414
- children: "Network interception is disabled"
415
- })]
416
- }) : null, /*#__PURE__*/_jsx(OverriddenSection, {
417
- events: overridden,
418
- onEventPress: onEventPress,
419
- onLongPress: handleLongPress,
420
- savedLiveIds: savedLiveIds,
421
- paused: !overridesEnabled,
422
- onTogglePaused: () => setEnabled(!overridesEnabled)
423
- }), /*#__PURE__*/_jsx(PinnedSection, {
424
- events: pinnedRows,
425
- onEventPress: onEventPress,
426
- onLongPress: handleLongPress,
427
- savedLiveIds: savedLiveIds,
428
- onClearPinned: clearPinned
429
- }), restRows.length > 0 || hasLockedEvents ?
430
- /*#__PURE__*/
431
- // DEVIATION: FlatList → plain scrolled div (see file header). The
432
- // list still OWNS scrolling — hosts render this screen without a
433
- // scroll wrapper (JsModal's `disableScrollWrapper`), same as native.
434
- _jsx("div", {
435
- style: styles.list,
436
- "aria-label": "Network events list",
437
- children: /*#__PURE__*/_jsxs("div", {
438
- style: styles.listContent,
439
- children: [restRows.map(item => /*#__PURE__*/_jsx(NetworkEventItemCompact, {
440
- event: item,
441
- onPress: onEventPress,
442
- onLongPress: handleLongPress,
443
- saved: savedLiveIds.has(item.id)
444
- }, item.id)), renderListFooter()]
445
- })
446
- }) : pinnedRows.length > 0 || overridden.length > 0 ? null : /*#__PURE__*/_jsx(EmptyState, {
447
- isEnabled: isEnabled
448
- })]
449
- });
450
- }
451
-
452
- // Values mirror the native StyleSheet block 1:1.
453
- const styles = {
454
- root: {
455
- display: "flex",
456
- flexDirection: "column",
457
- flex: 1,
458
- minHeight: 0
459
- },
460
- /**
461
- * The strip is separated from the live list by a real rule, not just space:
462
- * these rows do NOT obey the filters, and the boundary is what tells the
463
- * user why a request they just filtered out is still on screen.
464
- */
465
- overriddenSection: {
466
- borderBottom: `1px solid ${macOSColors.semantic.warning}44`,
467
- backgroundColor: macOSColors.semantic.warningBackground
468
- },
469
- overriddenSectionOff: {
470
- borderBottom: `1px solid ${macOSColors.border.default}`,
471
- backgroundColor: macOSColors.background.card
472
- },
473
- overriddenTitleOff: {
474
- color: macOSColors.text.muted
475
- },
476
- overriddenHeader: {
477
- display: "flex",
478
- flexDirection: "row",
479
- alignItems: "center",
480
- gap: 6,
481
- padding: "8px 12px 4px"
482
- },
483
- overriddenTitle: {
484
- flex: 1,
485
- fontSize: 10,
486
- fontWeight: 700,
487
- letterSpacing: 0.8,
488
- color: macOSColors.semantic.warning
489
- },
490
- overriddenManage: {
491
- padding: "2px 6px",
492
- background: "none",
493
- border: "none",
494
- cursor: "pointer",
495
- margin: 0
496
- },
497
- overriddenManageText: {
498
- fontSize: 10,
499
- fontWeight: 600,
500
- color: macOSColors.semantic.warning
501
- },
502
- pinnedSection: {
503
- borderBottom: `1px solid ${macOSColors.border.default}`,
504
- paddingBottom: 4
505
- },
506
- pinnedHeader: {
507
- display: "flex",
508
- flexDirection: "row",
509
- alignItems: "center",
510
- gap: 6,
511
- padding: "10px 20px 6px"
512
- },
513
- pinnedTitle: {
514
- flex: 1,
515
- color: macOSColors.semantic.info,
516
- fontSize: 10,
517
- fontWeight: 700,
518
- letterSpacing: 0.6,
519
- fontFamily: "ui-monospace, Menlo, monospace"
520
- },
521
- pinnedClear: {
522
- padding: "2px 6px",
523
- background: "none",
524
- border: "none",
525
- cursor: "pointer",
526
- margin: 0
527
- },
528
- pinnedClearText: {
529
- color: macOSColors.text.muted,
530
- fontSize: 10
531
- },
532
- disabledBanner: {
533
- display: "flex",
534
- flexDirection: "row",
535
- alignItems: "center",
536
- gap: 8,
537
- padding: 10,
538
- margin: "8px 12px 0",
539
- backgroundColor: macOSColors.semantic.warningBackground,
540
- borderRadius: 8,
541
- border: `1px solid ${macOSColors.semantic.warning}20`
542
- },
543
- disabledText: {
544
- color: macOSColors.semantic.warning,
545
- fontSize: 11,
546
- flex: 1
547
- },
548
- list: {
549
- flex: 1,
550
- minHeight: 0,
551
- overflowY: "auto"
552
- },
553
- listContent: {
554
- paddingTop: 8
555
- },
556
- emptyState: {
557
- display: "flex",
558
- flexDirection: "column",
559
- alignItems: "center",
560
- padding: "40px 0"
561
- },
562
- emptyTitle: {
563
- color: macOSColors.text.primary,
564
- fontSize: 14,
565
- fontWeight: 600,
566
- marginTop: 12,
567
- marginBottom: 6
568
- },
569
- emptyText: {
570
- color: macOSColors.text.muted,
571
- fontSize: 12,
572
- textAlign: "center"
573
- },
574
- // NetworkUpgradeBanner.tsx values (buoyColors), verbatim.
575
- upgradeBanner: {
576
- display: "block",
577
- width: "calc(100% - 24px)",
578
- boxSizing: "border-box",
579
- backgroundColor: buoy.card,
580
- borderRadius: 10,
581
- border: `1px solid ${buoy.primary}40`,
582
- padding: 12,
583
- margin: "12px 12px 34px",
584
- textAlign: "left",
585
- cursor: "pointer",
586
- fontFamily: "inherit"
587
- },
588
- upgradeContent: {
589
- display: "flex",
590
- flexDirection: "row",
591
- alignItems: "center",
592
- justifyContent: "space-between",
593
- marginBottom: 4
594
- },
595
- upgradeLeft: {
596
- display: "inline-flex",
597
- flexDirection: "row",
598
- alignItems: "center",
599
- gap: 8
600
- },
601
- upgradeTitle: {
602
- color: buoy.text,
603
- fontSize: 13,
604
- fontWeight: 600
605
- },
606
- upgradeSubtitle: {
607
- display: "block",
608
- color: buoy.textMuted,
609
- fontSize: 11
610
- },
611
- // license/FeatureGate.tsx `proBadge`/`proBadgeText`, verbatim.
612
- proBadge: {
613
- display: "inline-flex",
614
- backgroundColor: `${buoy.primary}15`,
615
- borderRadius: 4,
616
- border: `1px solid ${buoy.primary}40`,
617
- padding: "2px 6px",
618
- fontSize: 10,
619
- fontWeight: 700,
620
- color: buoy.primary,
621
- letterSpacing: 0.5
622
- }
623
- };
1
+ "use strict";import{useCallback as W}from"react";import{NetworkEventItemCompact as v}from"./NetworkEventItemCompact.web";import{useNetworkEventList as j}from"../hooks/useNetworkEventList";import{useNetworkSaved as q}from"../hooks/useNetworkSaved";import{useOverrideRules as H}from"../hooks/useOverrideRules";import{overriddenEvents as U}from"../overrides/overriddenRows";import{splitPinned as V}from"../utils/withPinnedFirst";import{jsx as e,jsxs as o}from"react/jsx-runtime";const r={background:{card:"#1A1A1C"},border:{default:"#2D2D2F"},text:{primary:"#F5F5F7",muted:"#8E8E93"},semantic:{warning:"#FFEB3B",warningBackground:"rgba(255, 235, 59, 0.15)",info:"#00B8E6"}};const s={card:"#1A1A1A",text:"#E0E0E0",textMuted:"#888888",primary:"#20C997"};function u({size:n=14,color:d="currentColor",children:a}){return e("svg",{width:n,height:n,viewBox:"0 0 24 24",fill:"none",stroke:d,strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",style:{flexShrink:0,display:"block"},children:a})}const _=n=>o(u,{...n,children:[e("circle",{cx:"12",cy:"12",r:"10"}),e("path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20"}),e("path",{d:"M2 12h20"})]});const G=({active:n,...d})=>e(u,{...d,children:o("g",{transform:n?"rotate(-45 12 12) translate(12 12) scale(0.92) translate(-12 -12)":void 0,children:[e("path",{d:"M2.97 21.03 8.18 15.82"}),e("path",{d:"M4.4 10.81 13.19 19.6"}),e("path",{d:"M5.17 10.54 11.43 8.83"}),e("path",{d:"M13.46 18.83 15.17 12.57"}),e("rect",{x:"12.15",y:"5.4",width:"9.38",height:"3.52",rx:"1.07",transform:"rotate(-45 16.84 7.16)"})]})});const Y=n=>o(u,{...n,children:[e("path",{d:"M12 2v10"}),e("path",{d:"M18.4 6.6a9 9 0 1 1-12.77.04"})]});const Z=n=>o(u,{...n,children:[e("path",{d:"M10 2v7.527a2 2 0 0 1-.211.896L4.72 20.55a1 1 0 0 0 .9 1.45h12.76a1 1 0 0 0 .9-1.45l-5.069-10.127A2 2 0 0 1 14 9.527V2"}),e("path",{d:"M8.5 2h7"}),e("path",{d:"M7 16h10"})]});const J=n=>e(u,{...n,children:e("polygon",{points:"13 2 3 14 12 14 11 22 21 10 12 10 13 2"})});function K({title:n,subtitle:d,onPress:a}){return o("button",{type:"button",style:t.upgradeBanner,onClick:a,children:[o("span",{style:t.upgradeContent,children:[o("span",{style:t.upgradeLeft,children:[e(J,{size:16,color:s.primary}),e("span",{style:t.upgradeTitle,children:n})]}),e("span",{style:t.proBadge,children:"PRO"})]}),e("span",{style:t.upgradeSubtitle,children:d})]})}function Q({isEnabled:n}){return o("div",{style:t.emptyState,children:[e(_,{size:32,color:r.text.muted}),e("div",{style:t.emptyTitle,children:"No network events"}),e("div",{style:t.emptyText,children:n?"Network requests will appear here":"Enable interception to start capturing"})]})}function X({events:n,onEventPress:d,onLongPress:a,savedLiveIds:g,onClearPinned:l}){if(n.length===0)return null;return o("div",{style:t.pinnedSection,children:[o("div",{style:t.pinnedHeader,children:[e(G,{size:11,active:true,color:r.semantic.info}),o("span",{style:t.pinnedTitle,children:["PINNED \xB7 ",n.length]}),e("button",{type:"button",onClick:l,style:t.pinnedClear,children:e("span",{style:t.pinnedClearText,children:"Unpin all"})})]}),n.map(c=>e(v,{event:c,onPress:d,onLongPress:a,pinned:true,saved:g.has(c.id)},c.id))]})}function ee({events:n,onEventPress:d,onLongPress:a,savedLiveIds:g,paused:l,onTogglePaused:c}){if(n.length===0)return null;return o("div",{style:{...t.overriddenSection,...l?t.overriddenSectionOff:null},children:[o("div",{style:t.overriddenHeader,children:[e(Z,{size:11,color:l?r.text.muted:r.semantic.warning}),e("span",{style:{...t.overriddenTitle,...l?t.overriddenTitleOff:null},children:l?`PAUSED \xB7 ${n.length}`:`OVERRIDDEN \xB7 ${n.length}`}),e("button",{type:"button",onClick:c,style:t.overriddenManage,children:e("span",{style:{...t.overriddenManageText,...l?t.overriddenTitleOff:null},children:l?"Resume":"Pause"})})]}),n.map(p=>e(v,{event:p,onPress:d,onLongPress:a,overridden:true,saved:g.has(p.id)},p.id))]})}export function NetworkListScreen({visible:n,paused:d,filter:a,ignoredPatterns:g,isPro:l,searchText:c,onEventPress:p,onUpgradePress:B}){const{visibleEvents:L,hasLockedEvents:k,lockedEventCount:f}=j({filter:a,ignoredPatterns:g,paused:d||!n,isPro:l});const{pinnedEvents:M,pinnedLiveIds:z,savedLiveIds:h,togglePin:w,clearPinned:I}=q();const{rules:D,enabled:S,setEnabled:N,isRuleSpent:R}=H();const m=W(i=>{w(i)},[w]);if(!n)return null;const{pinned:C,rest:x}=V(L,M,z);const $=D.filter(i=>i.enabled&&!R(i));const y=U([...C,...x],$);const b=new Set(y.map(i=>i.id));const E=C.filter(i=>!b.has(i.id));const P=b.size?x.filter(i=>!b.has(i.id)):x;const T=!d;const F=()=>{if(!k)return null;const i=c.length>0;const O=i?`${f} matching ${f===1?"request":"requests"} in locked history`:`${f} requests locked`;const A=i?"Upgrade to Pro to search your full request history":"Upgrade to Pro to unlock full request history";return e(K,{title:O,subtitle:A,onPress:B})};return o("div",{style:t.root,children:[!T?o("div",{style:t.disabledBanner,children:[e(Y,{size:14,color:r.semantic.warning}),e("span",{style:t.disabledText,children:"Network interception is disabled"})]}):null,e(ee,{events:y,onEventPress:p,onLongPress:m,savedLiveIds:h,paused:!S,onTogglePaused:()=>N(!S)}),e(X,{events:E,onEventPress:p,onLongPress:m,savedLiveIds:h,onClearPinned:I}),P.length>0||k?e("div",{style:t.list,"aria-label":"Network events list",children:o("div",{style:t.listContent,children:[P.map(i=>e(v,{event:i,onPress:p,onLongPress:m,saved:h.has(i.id)},i.id)),F()]})}):E.length>0||y.length>0?null:e(Q,{isEnabled:T})]})}const t={root:{display:"flex",flexDirection:"column",flex:1,minHeight:0},overriddenSection:{borderBottom:`1px solid ${r.semantic.warning}44`,backgroundColor:r.semantic.warningBackground},overriddenSectionOff:{borderBottom:`1px solid ${r.border.default}`,backgroundColor:r.background.card},overriddenTitleOff:{color:r.text.muted},overriddenHeader:{display:"flex",flexDirection:"row",alignItems:"center",gap:6,padding:"8px 12px 4px"},overriddenTitle:{flex:1,fontSize:10,fontWeight:700,letterSpacing:.8,color:r.semantic.warning},overriddenManage:{padding:"2px 6px",background:"none",border:"none",cursor:"pointer",margin:0},overriddenManageText:{fontSize:10,fontWeight:600,color:r.semantic.warning},pinnedSection:{borderBottom:`1px solid ${r.border.default}`,paddingBottom:4},pinnedHeader:{display:"flex",flexDirection:"row",alignItems:"center",gap:6,padding:"10px 20px 6px"},pinnedTitle:{flex:1,color:r.semantic.info,fontSize:10,fontWeight:700,letterSpacing:.6,fontFamily:"ui-monospace, Menlo, monospace"},pinnedClear:{padding:"2px 6px",background:"none",border:"none",cursor:"pointer",margin:0},pinnedClearText:{color:r.text.muted,fontSize:10},disabledBanner:{display:"flex",flexDirection:"row",alignItems:"center",gap:8,padding:10,margin:"8px 12px 0",backgroundColor:r.semantic.warningBackground,borderRadius:8,border:`1px solid ${r.semantic.warning}20`},disabledText:{color:r.semantic.warning,fontSize:11,flex:1},list:{flex:1,minHeight:0,overflowY:"auto"},listContent:{paddingTop:8},emptyState:{display:"flex",flexDirection:"column",alignItems:"center",padding:"40px 0"},emptyTitle:{color:r.text.primary,fontSize:14,fontWeight:600,marginTop:12,marginBottom:6},emptyText:{color:r.text.muted,fontSize:12,textAlign:"center"},upgradeBanner:{display:"block",width:"calc(100% - 24px)",boxSizing:"border-box",backgroundColor:s.card,borderRadius:10,border:`1px solid ${s.primary}40`,padding:12,margin:"12px 12px 34px",textAlign:"left",cursor:"pointer",fontFamily:"inherit"},upgradeContent:{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between",marginBottom:4},upgradeLeft:{display:"inline-flex",flexDirection:"row",alignItems:"center",gap:8},upgradeTitle:{color:s.text,fontSize:13,fontWeight:600},upgradeSubtitle:{display:"block",color:s.textMuted,fontSize:11},proBadge:{display:"inline-flex",backgroundColor:`${s.primary}15`,borderRadius:4,border:`1px solid ${s.primary}40`,padding:"2px 6px",fontSize:10,fontWeight:700,color:s.primary,letterSpacing:.5}};