@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,1310 +1 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.NetworkFilterViewV3 = NetworkFilterViewV3;
7
- var _react = require("react");
8
- var _jsxRuntime = require("react/jsx-runtime");
9
- /**
10
- * NetworkFilterViewV3.web — DOM twin of NetworkFilterViewV3.tsx.
11
- *
12
- * Same props, same filter semantics, same screen inventory. Natively the
13
- * screen is a thin config over shared-ui's `DynamicFilterView`; the web shim
14
- * doesn't ship that component, so this twin renders the exact subtree
15
- * DynamicFilterView produces FOR THIS CONFIG (no tabs, no filter-summary, no
16
- * include-only, no preview — those config branches are disabled natively and
17
- * are not ported):
18
- *
19
- * 1. Facet card sections — Status (All/Success/Error/Pending, icon + count),
20
- * Method (colored method badge + count, no label — native's
21
- * `showLabel = type !== "method"`), Content Type (icon + count + label).
22
- * Same single-select method/content-type replace behavior
23
- * (`handleDynamicFilterChange` is native's handler, verbatim).
24
- * 2. ACTIVE FILTERS — add-pattern button → input (with the Match:
25
- * Contains/Exact mode toggle rendered above it, native `renderExtra`),
26
- * and the pattern list where each row removes on click and carries the
27
- * CONTAINS/EXACT mode badge (native `renderPatternMeta`) that toggles the
28
- * pattern's match mode.
29
- * 3. AVAILABLE DOMAINS & URLS — host + origin+pathname suggestions from the
30
- * visible events (30 per group), click-to-add with the currently selected
31
- * mode; suggestions already covered by an active pattern are hidden
32
- * (native's `item.includes(pattern)` filter).
33
- * 4. HOW NETWORK FILTERS WORK — description + examples.
34
- *
35
- * shared-ui RN chrome replicated as DOM with provenance:
36
- * - `buoyColors` — inlined verbatim subset from
37
- * shared/src/ui/gameUI/constants/gameUIColors.ts (DynamicFilterView /
38
- * SectionHeader / FilterComponents palette).
39
- * - `macOSColors` — inlined verbatim subset from
40
- * shared/src/ui/gameUI/constants/macOSDesignSystemColors.ts (the mode
41
- * toggle/badge palette the native screen uses directly).
42
- * - Icons — inline lucide SVGs (shared-ui's icons are lucide re-exports).
43
- * - Native card glow (`shadowColor` primary, opacity 0.3, radius 8) → an
44
- * equivalent CSS box-shadow; native text shadows → CSS text-shadow.
45
- *
46
- * Intentional deviations (all logged):
47
- * - Pattern rows nest a pressable mode badge inside a pressable row; RN's
48
- * inner Touchable swallows the press, DOM needs `stopPropagation()` on the
49
- * badge so toggling a mode doesn't also remove the pattern.
50
- * - Native's `adjustsFontSizeToFit` on the method badge has no DOM
51
- * equivalent — long method names ellipsize at the same max width instead.
52
- * - The add-pattern input autofocuses via the `autoFocus` attribute rather
53
- * than RN's imperative focus.
54
- *
55
- * @platform React DOM Web
56
- */
57
-
58
- // =============================
59
- // Native palettes (provenance)
60
- // =============================
61
-
62
- /** buoyColors subset — shared/src/ui/gameUI/constants/gameUIColors.ts, verbatim. */
63
- const buoyColors = {
64
- base: "#121212",
65
- card: "#1A1A1A",
66
- hover: "#242424",
67
- input: "#2A2A2A",
68
- border: "#333333",
69
- text: "#E0E0E0",
70
- textSecondary: "#A0A0A0",
71
- textMuted: "#888888",
72
- primary: "#20C997"
73
- };
74
-
75
- /** macOSColors subset — shared/src/ui/gameUI/constants/macOSDesignSystemColors.ts, verbatim. */
76
- const macOSColors = {
77
- background: {
78
- hover: "#1D1D1F"
79
- },
80
- border: {
81
- default: "#2D2D2F"
82
- },
83
- text: {
84
- secondary: "#A1A1A6",
85
- muted: "#8E8E93"
86
- },
87
- semantic: {
88
- success: "#34C759",
89
- error: "#FF453A",
90
- warning: "#FFEB3B",
91
- info: "#00B8E6",
92
- debug: "#BF5AF2"
93
- }
94
- };
95
-
96
- // =============================
97
- // Inline lucide icons (shared-ui icons are lucide re-exports)
98
- // =============================
99
-
100
- function Svg({
101
- size = 14,
102
- color = "currentColor",
103
- children
104
- }) {
105
- return /*#__PURE__*/(0, _jsxRuntime.jsx)("svg", {
106
- width: size,
107
- height: size,
108
- viewBox: "0 0 24 24",
109
- fill: "none",
110
- stroke: color,
111
- strokeWidth: 2,
112
- strokeLinecap: "round",
113
- strokeLinejoin: "round",
114
- style: {
115
- flexShrink: 0,
116
- display: "block"
117
- },
118
- children: children
119
- });
120
- }
121
- const CheckCircle = p => /*#__PURE__*/(0, _jsxRuntime.jsxs)(Svg, {
122
- ...p,
123
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
124
- d: "M21.801 10A10 10 0 1 1 17 3.335"
125
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
126
- d: "m9 11 3 3L22 4"
127
- })]
128
- });
129
- const XCircle = p => /*#__PURE__*/(0, _jsxRuntime.jsxs)(Svg, {
130
- ...p,
131
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("circle", {
132
- cx: "12",
133
- cy: "12",
134
- r: "10"
135
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
136
- d: "m15 9-6 6"
137
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
138
- d: "m9 9 6 6"
139
- })]
140
- });
141
- const Clock = p => /*#__PURE__*/(0, _jsxRuntime.jsxs)(Svg, {
142
- ...p,
143
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("circle", {
144
- cx: "12",
145
- cy: "12",
146
- r: "10"
147
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)("polyline", {
148
- points: "12 6 12 12 16 14"
149
- })]
150
- });
151
- const Globe = p => /*#__PURE__*/(0, _jsxRuntime.jsxs)(Svg, {
152
- ...p,
153
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("circle", {
154
- cx: "12",
155
- cy: "12",
156
- r: "10"
157
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
158
- d: "M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20"
159
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
160
- d: "M2 12h20"
161
- })]
162
- });
163
- const FileJson = p => /*#__PURE__*/(0, _jsxRuntime.jsxs)(Svg, {
164
- ...p,
165
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
166
- d: "M14 2v4a2 2 0 0 0 2 2h4"
167
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
168
- d: "M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v4"
169
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
170
- d: "M4 12a1 1 0 0 0-1 1v1a1 1 0 0 1-1 1 1 1 0 0 1 1 1v1a1 1 0 0 0 1 1"
171
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
172
- d: "M8 18a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1 1 1 0 0 1-1-1v-1a1 1 0 0 0-1-1"
173
- })]
174
- });
175
- const FileText = p => /*#__PURE__*/(0, _jsxRuntime.jsxs)(Svg, {
176
- ...p,
177
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
178
- d: "M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"
179
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
180
- d: "M14 2v4a2 2 0 0 0 2 2h4"
181
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
182
- d: "M10 9H8"
183
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
184
- d: "M16 13H8"
185
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
186
- d: "M16 17H8"
187
- })]
188
- });
189
- const ImageIcon = p => /*#__PURE__*/(0, _jsxRuntime.jsxs)(Svg, {
190
- ...p,
191
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("rect", {
192
- width: "18",
193
- height: "18",
194
- x: "3",
195
- y: "3",
196
- rx: "2",
197
- ry: "2"
198
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)("circle", {
199
- cx: "9",
200
- cy: "9",
201
- r: "2"
202
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
203
- d: "m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21"
204
- })]
205
- });
206
- const Film = p => /*#__PURE__*/(0, _jsxRuntime.jsxs)(Svg, {
207
- ...p,
208
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("rect", {
209
- width: "18",
210
- height: "18",
211
- x: "3",
212
- y: "3",
213
- rx: "2"
214
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
215
- d: "M7 3v18"
216
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
217
- d: "M3 7.5h4"
218
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
219
- d: "M3 12h18"
220
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
221
- d: "M3 16.5h4"
222
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
223
- d: "M17 3v18"
224
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
225
- d: "M17 7.5h4"
226
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
227
- d: "M17 16.5h4"
228
- })]
229
- });
230
- const Music = p => /*#__PURE__*/(0, _jsxRuntime.jsxs)(Svg, {
231
- ...p,
232
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
233
- d: "M9 18V5l12-2v13"
234
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)("circle", {
235
- cx: "6",
236
- cy: "18",
237
- r: "3"
238
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)("circle", {
239
- cx: "18",
240
- cy: "16",
241
- r: "3"
242
- })]
243
- });
244
- const Filter = p => /*#__PURE__*/(0, _jsxRuntime.jsx)(Svg, {
245
- ...p,
246
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)("polygon", {
247
- points: "22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3"
248
- })
249
- });
250
- const Plus = p => /*#__PURE__*/(0, _jsxRuntime.jsxs)(Svg, {
251
- ...p,
252
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
253
- d: "M5 12h14"
254
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
255
- d: "M12 5v14"
256
- })]
257
- });
258
- const X = p => /*#__PURE__*/(0, _jsxRuntime.jsxs)(Svg, {
259
- ...p,
260
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
261
- d: "M18 6 6 18"
262
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
263
- d: "m6 6 12 12"
264
- })]
265
- });
266
-
267
- // =============================
268
- // Native helpers (verbatim from NetworkFilterViewV3.tsx)
269
- // =============================
270
-
271
- function getContentType(event) {
272
- const headers = event.responseHeaders || event.requestHeaders;
273
- const contentType = headers?.["content-type"] || headers?.["Content-Type"] || "";
274
- if (contentType.includes("json")) return {
275
- type: "JSON",
276
- color: macOSColors.semantic.info
277
- };
278
- if (contentType.includes("xml")) return {
279
- type: "XML",
280
- color: macOSColors.semantic.success
281
- };
282
- if (contentType.includes("html")) return {
283
- type: "HTML",
284
- color: macOSColors.semantic.warning
285
- };
286
- if (contentType.includes("text")) return {
287
- type: "TEXT",
288
- color: macOSColors.semantic.success
289
- };
290
- if (contentType.includes("image")) return {
291
- type: "IMAGE",
292
- color: macOSColors.semantic.error
293
- };
294
- if (contentType.includes("video")) return {
295
- type: "VIDEO",
296
- color: macOSColors.semantic.error
297
- };
298
- if (contentType.includes("audio")) return {
299
- type: "AUDIO",
300
- color: macOSColors.semantic.debug
301
- };
302
- if (contentType.includes("form")) return {
303
- type: "FORM",
304
- color: macOSColors.semantic.info
305
- };
306
- return {
307
- type: "OTHER",
308
- color: macOSColors.text.muted
309
- };
310
- }
311
- function getContentTypeIcon(type) {
312
- switch (type) {
313
- case "JSON":
314
- return FileJson;
315
- case "HTML":
316
- case "XML":
317
- case "TEXT":
318
- return FileText;
319
- case "IMAGE":
320
- return ImageIcon;
321
- case "VIDEO":
322
- return Film;
323
- case "AUDIO":
324
- return Music;
325
- default:
326
- return Globe;
327
- }
328
- }
329
- function getMethodColor(method) {
330
- switch (method) {
331
- case "GET":
332
- return macOSColors.semantic.success;
333
- case "POST":
334
- return macOSColors.semantic.info;
335
- case "PUT":
336
- return macOSColors.semantic.warning;
337
- case "DELETE":
338
- return macOSColors.semantic.error;
339
- case "PATCH":
340
- return macOSColors.semantic.success;
341
- default:
342
- return macOSColors.text.muted;
343
- }
344
- }
345
-
346
- // =============================
347
- // DOM twins of the shared-ui pieces DynamicFilterView composes
348
- // =============================
349
-
350
- /** SectionHeader twin — shared/src/ui/components/SectionHeader.tsx. */
351
- function SectionHeader({
352
- icon: Icon,
353
- iconColor,
354
- title,
355
- badgeCount,
356
- badgeColor
357
- }) {
358
- return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
359
- style: styles.sectionHeader,
360
- children: [Icon ? /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
361
- style: styles.sectionHeaderIcon,
362
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(Icon, {
363
- size: 12,
364
- color: iconColor ?? buoyColors.primary
365
- })
366
- }) : null, /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
367
- style: styles.sectionHeaderTitle,
368
- children: title
369
- }), badgeCount !== undefined ? /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
370
- style: {
371
- ...styles.sectionHeaderBadge,
372
- backgroundColor: `${badgeColor ?? buoyColors.primary}15`,
373
- border: `1px solid ${badgeColor ?? buoyColors.primary}33`
374
- },
375
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
376
- style: {
377
- ...styles.sectionHeaderBadgeText,
378
- color: badgeColor ?? buoyColors.primary
379
- },
380
- children: badgeCount
381
- })
382
- }) : null]
383
- });
384
- }
385
-
386
- /** AddFilterButton twin — shared/src/ui/components/FilterComponents.tsx. */
387
- function AddFilterButton({
388
- onPress,
389
- color,
390
- label
391
- }) {
392
- return /*#__PURE__*/(0, _jsxRuntime.jsxs)("button", {
393
- type: "button",
394
- onClick: onPress,
395
- style: {
396
- ...styles.addButton,
397
- borderColor: `${color}40`
398
- },
399
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(Plus, {
400
- size: 14,
401
- color: color
402
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
403
- style: {
404
- ...styles.addButtonText,
405
- color
406
- },
407
- children: label
408
- })]
409
- });
410
- }
411
-
412
- /** AddFilterInput twin — shared/src/ui/components/FilterComponents.tsx. */
413
- function AddFilterInput({
414
- value,
415
- onChange,
416
- onSubmit,
417
- onCancel,
418
- placeholder,
419
- color
420
- }) {
421
- return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
422
- style: {
423
- ...styles.inputContainer,
424
- borderColor: `${color}40`
425
- },
426
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("input", {
427
- value: value,
428
- onChange: e => onChange(e.target.value),
429
- onKeyDown: e => {
430
- if (e.key === "Enter") onSubmit();
431
- },
432
- placeholder: placeholder,
433
- style: {
434
- ...styles.input,
435
- color
436
- },
437
- autoFocus: true,
438
- autoCorrect: "off",
439
- autoCapitalize: "none",
440
- autoComplete: "off",
441
- spellCheck: false
442
- }), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
443
- style: styles.inputButtons,
444
- children: [value.trim() ? /*#__PURE__*/(0, _jsxRuntime.jsx)("button", {
445
- type: "button",
446
- onClick: onSubmit,
447
- style: {
448
- ...styles.inlineAddButton,
449
- backgroundColor: `${color}15`,
450
- borderColor: `${color}40`
451
- },
452
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
453
- style: {
454
- ...styles.inlineAddButtonText,
455
- color
456
- },
457
- children: "Add"
458
- })
459
- }) : null, /*#__PURE__*/(0, _jsxRuntime.jsx)("button", {
460
- type: "button",
461
- onClick: onCancel,
462
- style: styles.cancelButton,
463
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(X, {
464
- size: 16,
465
- color: `${color}60`
466
- })
467
- })]
468
- })]
469
- });
470
- }
471
-
472
- /**
473
- * Control panel for filtering captured network events by status, method, and
474
- * content type, plus ignored-pattern management — same surface as native.
475
- */
476
- function NetworkFilterViewV3({
477
- events,
478
- filter,
479
- onFilterChange,
480
- ignoredPatterns = [],
481
- onRemovePattern = () => {},
482
- onAddPattern = () => {},
483
- onTogglePatternMode = () => {}
484
- }) {
485
- // Mode applied when the user submits the "Add pattern" input. Defaults to
486
- // `contains` so behavior matches the previous implementation until the user
487
- // opts into `exact`. (Native state, verbatim.)
488
- const [nextPatternMode, setNextPatternMode] = (0, _react.useState)("contains");
489
-
490
- // DynamicFilterView's `useFilterManager` input UI state — the subset this
491
- // config exercises (show/hide the add input + the draft value).
492
- const [showAddInput, setShowAddInput] = (0, _react.useState)(false);
493
- const [newFilter, setNewFilter] = (0, _react.useState)("");
494
- const patternModes = (0, _react.useMemo)(() => {
495
- const map = new Map();
496
- for (const p of ignoredPatterns) map.set(p.value, p.mode);
497
- return map;
498
- }, [ignoredPatterns]);
499
- const activePatterns = (0, _react.useMemo)(() => ignoredPatterns.map(p => p.value), [ignoredPatterns]);
500
- const handlePatternAdd = (0, _react.useCallback)(pattern => {
501
- onAddPattern({
502
- value: pattern,
503
- mode: nextPatternMode
504
- });
505
- }, [onAddPattern, nextPatternMode]);
506
-
507
- // DynamicFilterView.handleAddPattern: forward the trimmed draft, then reset
508
- // the input UI (its filterManager.addFilter side effect).
509
- const submitDraftPattern = (0, _react.useCallback)(() => {
510
- const trimmed = newFilter.trim();
511
- if (!trimmed) return;
512
- handlePatternAdd(trimmed);
513
- setNewFilter("");
514
- setShowAddInput(false);
515
- }, [newFilter, handlePatternAdd]);
516
- const statusCounts = (0, _react.useMemo)(() => {
517
- const counts = {
518
- all: events.length,
519
- success: 0,
520
- error: 0,
521
- pending: 0
522
- };
523
- events.forEach(event => {
524
- if (event.error || event.status && event.status >= 400) {
525
- counts.error += 1;
526
- return;
527
- }
528
- if (event.status && event.status >= 200 && event.status < 300) {
529
- counts.success += 1;
530
- return;
531
- }
532
- if (!event.status && !event.error) {
533
- counts.pending += 1;
534
- }
535
- });
536
- return counts;
537
- }, [events]);
538
- const methodCounts = (0, _react.useMemo)(() => {
539
- return events.reduce((acc, event) => {
540
- if (!event.method) return acc;
541
- acc[event.method] = (acc[event.method] || 0) + 1;
542
- return acc;
543
- }, {});
544
- }, [events]);
545
- const contentTypeCounts = (0, _react.useMemo)(() => {
546
- return events.reduce((acc, event) => {
547
- const {
548
- type
549
- } = getContentType(event);
550
- acc[type] = (acc[type] || 0) + 1;
551
- return acc;
552
- }, {});
553
- }, [events]);
554
- const availableDomains = (0, _react.useMemo)(() => {
555
- const domains = new Set();
556
- events.forEach(event => {
557
- if (event.host) {
558
- domains.add(event.host);
559
- return;
560
- }
561
- try {
562
- if (event.url) {
563
- const parsed = new URL(event.url);
564
- const host = String(parsed.host || "");
565
- if (host) domains.add(host);
566
- }
567
- } catch {
568
- // Ignore relative URLs
569
- }
570
- });
571
- return Array.from(domains).filter(domain => domain && domain !== "").sort((a, b) => a.localeCompare(b));
572
- }, [events]);
573
- const availableUrls = (0, _react.useMemo)(() => {
574
- const urls = new Set();
575
- events.forEach(event => {
576
- if (!event.url) return;
577
- try {
578
- const parsed = new URL(event.url);
579
- const origin = String(parsed.origin || "");
580
- const pathname = String(parsed.pathname || "");
581
- const normalized = `${origin}${pathname}`;
582
- urls.add(normalized);
583
- } catch {
584
- // URL constructor fails for relative paths - fall back to raw value
585
- urls.add(event.url);
586
- }
587
- });
588
- return Array.from(urls).filter(url => url && url !== "").sort((a, b) => a.localeCompare(b));
589
- }, [events]);
590
- const suggestionItems = (0, _react.useMemo)(() => {
591
- const maxItemsPerGroup = 30;
592
- const domainSuggestions = availableDomains.slice(0, maxItemsPerGroup);
593
- const urlSuggestions = availableUrls.slice(0, maxItemsPerGroup);
594
- return [...domainSuggestions, ...urlSuggestions];
595
- }, [availableDomains, availableUrls]);
596
-
597
- // DynamicFilterView.suggestedItems: hide suggestions any active pattern
598
- // already covers (substring test, native verbatim).
599
- const suggestedItems = (0, _react.useMemo)(() => suggestionItems.filter(item => !activePatterns.some(pattern => item.includes(pattern))), [suggestionItems, activePatterns]);
600
- const handleDynamicFilterChange = (0, _react.useCallback)((optionId, value) => {
601
- const [group] = optionId.split("::");
602
- if (group === "status") {
603
- const nextStatus = value === "all" ? undefined : value;
604
- onFilterChange({
605
- ...filter,
606
- status: nextStatus
607
- });
608
- return;
609
- }
610
- if (group === "method") {
611
- const methodValue = String(value);
612
- const currentMethods = filter.method || [];
613
- const hasMethod = currentMethods.includes(methodValue);
614
- const updatedMethods = hasMethod ? currentMethods.filter(method => method !== methodValue) : [methodValue];
615
- onFilterChange({
616
- ...filter,
617
- method: updatedMethods.length > 0 ? updatedMethods : undefined
618
- });
619
- return;
620
- }
621
- if (group === "contentType") {
622
- const typeValue = String(value);
623
- const currentTypes = filter.contentType || [];
624
- const hasType = currentTypes.includes(typeValue);
625
- const updatedTypes = hasType ? currentTypes.filter(type => type !== typeValue) : [typeValue];
626
- onFilterChange({
627
- ...filter,
628
- contentType: updatedTypes.length > 0 ? updatedTypes : undefined
629
- });
630
- }
631
- }, [filter, onFilterChange]);
632
-
633
- // =============================
634
- // Renderers (DynamicFilterView subtree for this config)
635
- // =============================
636
-
637
- const renderFilterCard = option => {
638
- const countIsZero = option.count === 0;
639
- // Native: showLabel = section.type !== "method" || option.icon
640
- const showLabel = !option.isMethod || option.icon;
641
- return /*#__PURE__*/(0, _jsxRuntime.jsxs)("button", {
642
- type: "button",
643
- onClick: () => handleDynamicFilterChange(option.id, option.value),
644
- style: {
645
- ...styles.filterCard,
646
- ...(option.isActive ? styles.activeFilterCard : null)
647
- },
648
- children: [option.icon ? /*#__PURE__*/(0, _jsxRuntime.jsx)(option.icon, {
649
- size: 24,
650
- color: option.color
651
- }) : option.isMethod ? /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
652
- style: {
653
- ...styles.methodBadgeCompact,
654
- backgroundColor: `${option.color}20`
655
- },
656
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
657
- style: {
658
- ...styles.methodTextCompact,
659
- color: option.color
660
- },
661
- children: option.label
662
- })
663
- }) : null, /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
664
- style: countIsZero ? styles.filterCountZero : styles.filterCountActive,
665
- children: option.count
666
- }), showLabel ? /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
667
- style: styles.filterLabelCompact,
668
- children: option.label
669
- }) : null]
670
- }, option.id);
671
- };
672
- const statusOptions = ["all", "success", "error", "pending"].map(status => ({
673
- id: `status::${status}`,
674
- label: status.charAt(0).toUpperCase() + status.slice(1),
675
- count: statusCounts[status],
676
- icon: status === "success" ? CheckCircle : status === "error" ? XCircle : status === "pending" ? Clock : Globe,
677
- color: status === "success" ? macOSColors.semantic.success : status === "error" ? macOSColors.semantic.error : status === "pending" ? macOSColors.semantic.warning : macOSColors.semantic.info,
678
- isActive: filter.status === status || !filter.status && status === "all",
679
- value: status
680
- }));
681
- const methodEntries = Object.entries(methodCounts);
682
- const contentTypeEntries = Object.entries(contentTypeCounts);
683
-
684
- // Native renderAddFilterExtra — the Match: Contains/Exact toggle shown
685
- // above the pattern input.
686
- const renderAddFilterExtra = () => {
687
- const options = [{
688
- label: "Contains",
689
- value: "contains",
690
- hint: "substring"
691
- }, {
692
- label: "Exact",
693
- value: "exact",
694
- hint: "whole path/host/url"
695
- }];
696
- return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
697
- style: styles.modeToggleRow,
698
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
699
- style: styles.modeToggleLabel,
700
- children: "Match:"
701
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
702
- style: styles.modeToggleGroup,
703
- children: options.map(opt => {
704
- const isActive = nextPatternMode === opt.value;
705
- return /*#__PURE__*/(0, _jsxRuntime.jsxs)("button", {
706
- type: "button",
707
- onClick: () => setNextPatternMode(opt.value),
708
- "aria-pressed": isActive,
709
- style: {
710
- ...styles.modeToggleButton,
711
- ...(isActive ? styles.modeToggleButtonActive : null)
712
- },
713
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
714
- style: {
715
- ...styles.modeToggleButtonText,
716
- ...(isActive ? styles.modeToggleButtonTextActive : null)
717
- },
718
- children: opt.label
719
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
720
- style: styles.modeToggleButtonHint,
721
- children: opt.hint
722
- })]
723
- }, opt.value);
724
- })
725
- })]
726
- });
727
- };
728
-
729
- // Native renderPatternMeta — the CONTAINS/EXACT badge on each pattern row.
730
- const renderPatternMeta = pattern => {
731
- const mode = patternModes.get(pattern) ?? "contains";
732
- const isExact = mode === "exact";
733
- const color = isExact ? macOSColors.semantic.warning : macOSColors.semantic.info;
734
- return /*#__PURE__*/(0, _jsxRuntime.jsx)("button", {
735
- type: "button",
736
- "aria-label": `Match mode: ${mode}. Tap to toggle.`,
737
- onClick: e => {
738
- // DEVIATION (logged): RN's nested Touchable swallows the press; DOM
739
- // must stop it reaching the row's remove handler.
740
- e.stopPropagation();
741
- onTogglePatternMode(pattern);
742
- },
743
- style: {
744
- ...styles.modeBadge,
745
- borderColor: `${color}60`,
746
- backgroundColor: `${color}15`
747
- },
748
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
749
- style: {
750
- ...styles.modeBadgeText,
751
- color
752
- },
753
- children: isExact ? "EXACT" : "CONTAINS"
754
- })
755
- });
756
- };
757
- return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
758
- style: styles.container,
759
- children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
760
- style: styles.content,
761
- children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
762
- style: styles.section,
763
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(SectionHeader, {
764
- title: "Status"
765
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
766
- style: styles.filterGrid,
767
- children: statusOptions.map(renderFilterCard)
768
- })]
769
- }), methodEntries.length > 0 ? /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
770
- style: styles.section,
771
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(SectionHeader, {
772
- title: "Method"
773
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
774
- style: styles.filterGrid,
775
- children: methodEntries.map(([method, count]) => renderFilterCard({
776
- id: `method::${method}`,
777
- label: method,
778
- count,
779
- color: getMethodColor(method),
780
- isActive: filter.method?.includes(method) ?? false,
781
- value: method,
782
- isMethod: true
783
- }))
784
- })]
785
- }) : null, contentTypeEntries.length > 0 ? /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
786
- style: styles.section,
787
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(SectionHeader, {
788
- title: "Content Type"
789
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
790
- style: styles.filterGrid,
791
- children: contentTypeEntries.map(([type, count]) => {
792
- const representativeEvent = events.find(event => getContentType(event).type === type);
793
- const {
794
- color
795
- } = representativeEvent ? getContentType(representativeEvent) : {
796
- color: macOSColors.text.muted
797
- };
798
- return renderFilterCard({
799
- id: `contentType::${type}`,
800
- label: type,
801
- count,
802
- icon: getContentTypeIcon(type),
803
- color,
804
- isActive: filter.contentType?.includes(type) ?? false,
805
- value: type
806
- });
807
- })
808
- })]
809
- }) : null, /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
810
- style: styles.excludeFiltersSection,
811
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(SectionHeader, {
812
- icon: Filter,
813
- iconColor: buoyColors.primary,
814
- title: "ACTIVE FILTERS",
815
- badgeCount: activePatterns.length > 0 ? activePatterns.length : undefined,
816
- badgeColor: buoyColors.primary
817
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
818
- style: styles.excludeFiltersDescription,
819
- children: "Hide queries matching these patterns from the list."
820
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
821
- style: styles.excludeFiltersInputWrapper,
822
- children: !showAddInput ? /*#__PURE__*/(0, _jsxRuntime.jsx)(AddFilterButton, {
823
- onPress: () => setShowAddInput(true),
824
- color: buoyColors.primary,
825
- label: "Add exclude pattern"
826
- }) : /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
827
- children: [renderAddFilterExtra(), /*#__PURE__*/(0, _jsxRuntime.jsx)(AddFilterInput, {
828
- value: newFilter,
829
- onChange: setNewFilter,
830
- onSubmit: submitDraftPattern,
831
- onCancel: () => {
832
- setShowAddInput(false);
833
- setNewFilter("");
834
- },
835
- placeholder: "Enter domain or URL pattern...",
836
- color: buoyColors.primary
837
- })]
838
- })
839
- }), activePatterns.length > 0 ? /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
840
- style: styles.excludeFiltersContent,
841
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
842
- style: styles.filterListColumn,
843
- children: activePatterns.map(pattern => /*#__PURE__*/(0, _jsxRuntime.jsxs)("button", {
844
- type: "button",
845
- onClick: () => onRemovePattern(pattern),
846
- style: styles.filterItemRow,
847
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
848
- style: {
849
- ...styles.filterItemText,
850
- color: buoyColors.primary
851
- },
852
- children: pattern
853
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
854
- style: styles.filterItemMeta,
855
- children: renderPatternMeta(pattern)
856
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(X, {
857
- size: 12,
858
- color: `${buoyColors.primary}80`
859
- })]
860
- }, pattern))
861
- })
862
- }) : null]
863
- }), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
864
- style: styles.availableKeysSection,
865
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(SectionHeader, {
866
- icon: Plus,
867
- iconColor: buoyColors.primary,
868
- title: "AVAILABLE DOMAINS & URLS",
869
- badgeCount: suggestedItems.length,
870
- badgeColor: buoyColors.primary
871
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
872
- style: styles.availableKeysScroll,
873
- children: suggestedItems.length > 0 ? suggestedItems.map(item => /*#__PURE__*/(0, _jsxRuntime.jsxs)("button", {
874
- type: "button",
875
- onClick: () => handlePatternAdd(item),
876
- style: styles.availableKeyItem,
877
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
878
- style: styles.availableKeyText,
879
- children: item
880
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(Plus, {
881
- size: 12,
882
- color: buoyColors.primary
883
- })]
884
- }, item)) : /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
885
- style: styles.emptyStateText,
886
- children: "No network events captured yet. Domains and URLs will appear here."
887
- })
888
- })]
889
- }), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
890
- style: styles.howItWorksSection,
891
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(SectionHeader, {
892
- icon: Filter,
893
- iconColor: buoyColors.textSecondary,
894
- title: "HOW NETWORK FILTERS WORK"
895
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
896
- style: styles.howItWorksText,
897
- children: "Patterns hide matching requests from the network event list. Each pattern has a match mode you can toggle on its badge: CONTAINS hides any URL containing the text; EXACT hides only an exact path/host/url match."
898
- }), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
899
- style: styles.examplesContainer,
900
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
901
- style: styles.examplesTitle,
902
- children: "EXAMPLES:"
903
- }), ["• example.com (CONTAINS) → any request whose URL contains example.com", "• example.com (EXACT) → only requests served by that exact host", "• /v1 (CONTAINS) → any URL containing /v1 (e.g. /v1, /v1/users)", "• /v1 (EXACT) → only requests whose pathname is exactly /v1"].map(example => /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
904
- style: styles.exampleItem,
905
- children: example
906
- }, example))]
907
- })]
908
- })]
909
- })
910
- });
911
- }
912
-
913
- // Values mirror the native StyleSheet blocks 1:1 (DynamicFilterView.tsx,
914
- // SectionHeader.tsx, FilterComponents.tsx, NetworkFilterViewV3.tsx).
915
- const styles = {
916
- container: {
917
- display: "flex",
918
- flexDirection: "column",
919
- flex: 1,
920
- minHeight: 0,
921
- backgroundColor: buoyColors.base
922
- },
923
- content: {
924
- flex: 1,
925
- minHeight: 0,
926
- overflowY: "auto",
927
- padding: "16px 16px 24px 16px"
928
- },
929
- section: {
930
- marginBottom: 8
931
- },
932
- // SectionHeader.tsx container/title/badge
933
- sectionHeader: {
934
- display: "flex",
935
- flexDirection: "row",
936
- alignItems: "center",
937
- padding: "8px 16px",
938
- backgroundColor: buoyColors.base,
939
- minHeight: 40,
940
- boxSizing: "border-box"
941
- },
942
- sectionHeaderIcon: {
943
- display: "inline-flex",
944
- marginRight: 8
945
- },
946
- sectionHeaderTitle: {
947
- flex: 1,
948
- fontSize: 14,
949
- fontWeight: 600,
950
- color: buoyColors.text,
951
- whiteSpace: "nowrap",
952
- overflow: "hidden",
953
- textOverflow: "ellipsis"
954
- },
955
- sectionHeaderBadge: {
956
- display: "inline-flex",
957
- alignItems: "center",
958
- padding: "3px 8px",
959
- borderRadius: 12,
960
- marginLeft: 8
961
- },
962
- sectionHeaderBadgeText: {
963
- fontSize: 12,
964
- fontWeight: 600
965
- },
966
- filterGrid: {
967
- display: "flex",
968
- flexDirection: "row",
969
- flexWrap: "wrap",
970
- gap: 8,
971
- marginTop: 8
972
- },
973
- filterCard: {
974
- display: "flex",
975
- backgroundColor: buoyColors.card,
976
- borderRadius: 12,
977
- padding: "10px 8px",
978
- flexDirection: "column",
979
- alignItems: "center",
980
- justifyContent: "center",
981
- border: `1px solid ${buoyColors.border}`,
982
- width: 72,
983
- minHeight: 68,
984
- boxSizing: "border-box",
985
- cursor: "pointer",
986
- margin: 0
987
- },
988
- activeFilterCard: {
989
- backgroundColor: `${buoyColors.primary}33`,
990
- border: `2px solid ${buoyColors.primary}`,
991
- // Native: shadowColor primary, offset 0/0, opacity 0.3, radius 8.
992
- boxShadow: `0 0 8px ${buoyColors.primary}4D`
993
- },
994
- filterCountActive: {
995
- fontSize: 14,
996
- fontWeight: 700,
997
- color: buoyColors.text,
998
- fontFamily: "ui-monospace, Menlo, monospace",
999
- marginTop: 3,
1000
- marginBottom: 1,
1001
- textShadow: "0 0.5px 1px rgba(0, 0, 0, 0.2)"
1002
- },
1003
- filterCountZero: {
1004
- fontSize: 11,
1005
- fontWeight: 500,
1006
- color: buoyColors.textMuted,
1007
- fontFamily: "ui-monospace, Menlo, monospace",
1008
- marginTop: 3,
1009
- marginBottom: 1
1010
- },
1011
- filterLabelCompact: {
1012
- fontSize: 10,
1013
- color: buoyColors.text,
1014
- fontWeight: 600,
1015
- textAlign: "center",
1016
- textTransform: "capitalize",
1017
- textShadow: "0 0.5px 1px rgba(0, 0, 0, 0.3)"
1018
- },
1019
- methodBadgeCompact: {
1020
- display: "inline-flex",
1021
- padding: "4px 8px",
1022
- borderRadius: 5,
1023
- minWidth: 48,
1024
- maxWidth: 60,
1025
- boxSizing: "border-box",
1026
- alignItems: "center",
1027
- justifyContent: "center"
1028
- },
1029
- methodTextCompact: {
1030
- fontSize: 13,
1031
- fontWeight: 700,
1032
- letterSpacing: 0.3,
1033
- fontFamily: "ui-monospace, Menlo, monospace",
1034
- whiteSpace: "nowrap",
1035
- overflow: "hidden",
1036
- textOverflow: "ellipsis"
1037
- },
1038
- excludeFiltersSection: {
1039
- backgroundColor: buoyColors.card,
1040
- borderRadius: 16,
1041
- border: `1px solid ${buoyColors.border}`,
1042
- marginTop: 16,
1043
- overflow: "hidden"
1044
- },
1045
- excludeFiltersDescription: {
1046
- fontSize: 10,
1047
- color: buoyColors.textSecondary,
1048
- padding: "8px 16px 0 16px",
1049
- lineHeight: "14px"
1050
- },
1051
- excludeFiltersInputWrapper: {
1052
- padding: "8px 16px"
1053
- },
1054
- excludeFiltersContent: {
1055
- padding: "0 16px 16px 16px",
1056
- maxHeight: 150,
1057
- overflowY: "auto"
1058
- },
1059
- filterListColumn: {
1060
- display: "flex",
1061
- flexDirection: "column",
1062
- gap: 8
1063
- },
1064
- filterItemRow: {
1065
- display: "flex",
1066
- flexDirection: "row",
1067
- alignItems: "center",
1068
- justifyContent: "space-between",
1069
- padding: "10px 12px",
1070
- backgroundColor: buoyColors.hover,
1071
- borderRadius: 8,
1072
- border: `1px solid ${buoyColors.border}`,
1073
- cursor: "pointer",
1074
- margin: 0,
1075
- width: "100%",
1076
- boxSizing: "border-box",
1077
- textAlign: "left"
1078
- },
1079
- filterItemText: {
1080
- flex: 1,
1081
- fontSize: 12,
1082
- fontFamily: "ui-monospace, Menlo, monospace",
1083
- marginRight: 8,
1084
- whiteSpace: "nowrap",
1085
- overflow: "hidden",
1086
- textOverflow: "ellipsis",
1087
- minWidth: 0
1088
- },
1089
- filterItemMeta: {
1090
- display: "inline-flex",
1091
- marginRight: 8
1092
- },
1093
- // NetworkFilterViewV3.tsx modeBadge / modeToggle styles
1094
- modeBadge: {
1095
- display: "inline-flex",
1096
- padding: "3px 8px",
1097
- borderRadius: 6,
1098
- borderWidth: 1,
1099
- borderStyle: "solid",
1100
- background: "none",
1101
- cursor: "pointer",
1102
- margin: 0
1103
- },
1104
- modeBadgeText: {
1105
- fontSize: 9,
1106
- fontFamily: "ui-monospace, Menlo, monospace",
1107
- fontWeight: 700,
1108
- letterSpacing: 0.5
1109
- },
1110
- modeToggleRow: {
1111
- display: "flex",
1112
- flexDirection: "row",
1113
- alignItems: "center",
1114
- gap: 8,
1115
- marginBottom: 8
1116
- },
1117
- modeToggleLabel: {
1118
- fontSize: 11,
1119
- fontWeight: 600,
1120
- color: macOSColors.text.secondary,
1121
- fontFamily: "ui-monospace, Menlo, monospace",
1122
- letterSpacing: 0.3
1123
- },
1124
- modeToggleGroup: {
1125
- display: "flex",
1126
- flexDirection: "row",
1127
- gap: 6,
1128
- flex: 1
1129
- },
1130
- modeToggleButton: {
1131
- flex: 1,
1132
- display: "flex",
1133
- flexDirection: "column",
1134
- padding: "6px 10px",
1135
- borderRadius: 8,
1136
- border: `1px solid ${macOSColors.border.default}`,
1137
- backgroundColor: macOSColors.background.hover,
1138
- alignItems: "center",
1139
- cursor: "pointer",
1140
- margin: 0
1141
- },
1142
- modeToggleButtonActive: {
1143
- border: `1px solid ${macOSColors.semantic.info}`,
1144
- backgroundColor: `${macOSColors.semantic.info}22`
1145
- },
1146
- modeToggleButtonText: {
1147
- fontSize: 11,
1148
- fontWeight: 700,
1149
- color: macOSColors.text.secondary,
1150
- fontFamily: "ui-monospace, Menlo, monospace",
1151
- letterSpacing: 0.3
1152
- },
1153
- modeToggleButtonTextActive: {
1154
- color: macOSColors.semantic.info
1155
- },
1156
- modeToggleButtonHint: {
1157
- fontSize: 9,
1158
- color: macOSColors.text.muted,
1159
- marginTop: 1
1160
- },
1161
- // FilterComponents.tsx add button/input
1162
- addButton: {
1163
- display: "flex",
1164
- flexDirection: "row",
1165
- alignItems: "center",
1166
- justifyContent: "center",
1167
- padding: "10px 14px",
1168
- borderRadius: 10,
1169
- borderWidth: 1,
1170
- borderStyle: "dashed",
1171
- backgroundColor: buoyColors.input,
1172
- cursor: "pointer",
1173
- margin: 0,
1174
- width: "100%",
1175
- boxSizing: "border-box"
1176
- },
1177
- addButtonText: {
1178
- fontSize: 13,
1179
- fontWeight: 500,
1180
- marginLeft: 6
1181
- },
1182
- inputContainer: {
1183
- display: "flex",
1184
- flexDirection: "row",
1185
- alignItems: "center",
1186
- backgroundColor: buoyColors.input,
1187
- borderRadius: 10,
1188
- borderWidth: 1,
1189
- borderStyle: "solid",
1190
- padding: "10px 14px",
1191
- marginBottom: 8,
1192
- boxSizing: "border-box"
1193
- },
1194
- input: {
1195
- flex: 1,
1196
- fontSize: 13,
1197
- padding: 0,
1198
- border: "none",
1199
- outline: "none",
1200
- background: "transparent",
1201
- fontFamily: "inherit",
1202
- minWidth: 0
1203
- },
1204
- inputButtons: {
1205
- display: "flex",
1206
- flexDirection: "row",
1207
- alignItems: "center",
1208
- gap: 8
1209
- },
1210
- cancelButton: {
1211
- display: "inline-flex",
1212
- padding: 4,
1213
- borderRadius: 6,
1214
- backgroundColor: buoyColors.hover,
1215
- border: "none",
1216
- cursor: "pointer",
1217
- margin: 0
1218
- },
1219
- inlineAddButton: {
1220
- display: "inline-flex",
1221
- padding: "6px 12px",
1222
- borderRadius: 6,
1223
- borderWidth: 1,
1224
- borderStyle: "solid",
1225
- cursor: "pointer",
1226
- margin: 0
1227
- },
1228
- inlineAddButtonText: {
1229
- fontSize: 12,
1230
- fontWeight: 600
1231
- },
1232
- availableKeysSection: {
1233
- backgroundColor: buoyColors.card,
1234
- borderRadius: 16,
1235
- border: `1px solid ${buoyColors.border}`,
1236
- marginTop: 16,
1237
- overflow: "hidden"
1238
- },
1239
- availableKeysScroll: {
1240
- maxHeight: 150,
1241
- overflowY: "auto",
1242
- padding: "8px 16px 16px 16px"
1243
- },
1244
- availableKeyItem: {
1245
- display: "flex",
1246
- flexDirection: "row",
1247
- alignItems: "center",
1248
- justifyContent: "space-between",
1249
- padding: "10px 12px",
1250
- backgroundColor: buoyColors.hover,
1251
- borderRadius: 8,
1252
- border: `1px solid ${buoyColors.border}`,
1253
- marginBottom: 8,
1254
- cursor: "pointer",
1255
- width: "100%",
1256
- boxSizing: "border-box",
1257
- textAlign: "left"
1258
- },
1259
- availableKeyText: {
1260
- flex: 1,
1261
- fontSize: 11,
1262
- color: buoyColors.text,
1263
- fontFamily: "ui-monospace, Menlo, monospace",
1264
- marginRight: 8,
1265
- whiteSpace: "nowrap",
1266
- overflow: "hidden",
1267
- textOverflow: "ellipsis",
1268
- minWidth: 0
1269
- },
1270
- emptyStateText: {
1271
- fontSize: 11,
1272
- color: buoyColors.textMuted,
1273
- fontStyle: "italic",
1274
- textAlign: "center",
1275
- padding: "12px 0"
1276
- },
1277
- howItWorksSection: {
1278
- backgroundColor: buoyColors.card,
1279
- borderRadius: 16,
1280
- border: `1px solid ${buoyColors.border}`,
1281
- marginTop: 16,
1282
- overflow: "hidden"
1283
- },
1284
- howItWorksText: {
1285
- fontSize: 11,
1286
- color: buoyColors.textSecondary,
1287
- lineHeight: "16px",
1288
- margin: "8px 0 12px 0",
1289
- padding: "0 16px",
1290
- fontFamily: "ui-monospace, Menlo, monospace"
1291
- },
1292
- examplesContainer: {
1293
- padding: "8px 16px 16px 16px",
1294
- borderTop: `1px solid ${buoyColors.border}`
1295
- },
1296
- examplesTitle: {
1297
- fontSize: 10,
1298
- fontWeight: 600,
1299
- color: buoyColors.textMuted,
1300
- fontFamily: "ui-monospace, Menlo, monospace",
1301
- letterSpacing: 0.5,
1302
- marginBottom: 6
1303
- },
1304
- exampleItem: {
1305
- fontSize: 10,
1306
- color: buoyColors.textMuted,
1307
- fontFamily: "ui-monospace, Menlo, monospace",
1308
- lineHeight: "16px"
1309
- }
1310
- };
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.NetworkFilterViewV3=NetworkFilterViewV3;var _react=require("react");var _jsxRuntime=require("react/jsx-runtime");const buoyColors={base:"#121212",card:"#1A1A1A",hover:"#242424",input:"#2A2A2A",border:"#333333",text:"#E0E0E0",textSecondary:"#A0A0A0",textMuted:"#888888",primary:"#20C997"};const macOSColors={background:{hover:"#1D1D1F"},border:{default:"#2D2D2F"},text:{secondary:"#A1A1A6",muted:"#8E8E93"},semantic:{success:"#34C759",error:"#FF453A",warning:"#FFEB3B",info:"#00B8E6",debug:"#BF5AF2"}};function Svg({size:o=14,color:r="currentColor",children:i}){return(0,_jsxRuntime.jsx)("svg",{width:o,height:o,viewBox:"0 0 24 24",fill:"none",stroke:r,strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",style:{flexShrink:0,display:"block"},children:i})}const CheckCircle=o=>(0,_jsxRuntime.jsxs)(Svg,{...o,children:[(0,_jsxRuntime.jsx)("path",{d:"M21.801 10A10 10 0 1 1 17 3.335"}),(0,_jsxRuntime.jsx)("path",{d:"m9 11 3 3L22 4"})]});const XCircle=o=>(0,_jsxRuntime.jsxs)(Svg,{...o,children:[(0,_jsxRuntime.jsx)("circle",{cx:"12",cy:"12",r:"10"}),(0,_jsxRuntime.jsx)("path",{d:"m15 9-6 6"}),(0,_jsxRuntime.jsx)("path",{d:"m9 9 6 6"})]});const Clock=o=>(0,_jsxRuntime.jsxs)(Svg,{...o,children:[(0,_jsxRuntime.jsx)("circle",{cx:"12",cy:"12",r:"10"}),(0,_jsxRuntime.jsx)("polyline",{points:"12 6 12 12 16 14"})]});const Globe=o=>(0,_jsxRuntime.jsxs)(Svg,{...o,children:[(0,_jsxRuntime.jsx)("circle",{cx:"12",cy:"12",r:"10"}),(0,_jsxRuntime.jsx)("path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20"}),(0,_jsxRuntime.jsx)("path",{d:"M2 12h20"})]});const FileJson=o=>(0,_jsxRuntime.jsxs)(Svg,{...o,children:[(0,_jsxRuntime.jsx)("path",{d:"M14 2v4a2 2 0 0 0 2 2h4"}),(0,_jsxRuntime.jsx)("path",{d:"M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v4"}),(0,_jsxRuntime.jsx)("path",{d:"M4 12a1 1 0 0 0-1 1v1a1 1 0 0 1-1 1 1 1 0 0 1 1 1v1a1 1 0 0 0 1 1"}),(0,_jsxRuntime.jsx)("path",{d:"M8 18a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1 1 1 0 0 1-1-1v-1a1 1 0 0 0-1-1"})]});const FileText=o=>(0,_jsxRuntime.jsxs)(Svg,{...o,children:[(0,_jsxRuntime.jsx)("path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"}),(0,_jsxRuntime.jsx)("path",{d:"M14 2v4a2 2 0 0 0 2 2h4"}),(0,_jsxRuntime.jsx)("path",{d:"M10 9H8"}),(0,_jsxRuntime.jsx)("path",{d:"M16 13H8"}),(0,_jsxRuntime.jsx)("path",{d:"M16 17H8"})]});const ImageIcon=o=>(0,_jsxRuntime.jsxs)(Svg,{...o,children:[(0,_jsxRuntime.jsx)("rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2"}),(0,_jsxRuntime.jsx)("circle",{cx:"9",cy:"9",r:"2"}),(0,_jsxRuntime.jsx)("path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21"})]});const Film=o=>(0,_jsxRuntime.jsxs)(Svg,{...o,children:[(0,_jsxRuntime.jsx)("rect",{width:"18",height:"18",x:"3",y:"3",rx:"2"}),(0,_jsxRuntime.jsx)("path",{d:"M7 3v18"}),(0,_jsxRuntime.jsx)("path",{d:"M3 7.5h4"}),(0,_jsxRuntime.jsx)("path",{d:"M3 12h18"}),(0,_jsxRuntime.jsx)("path",{d:"M3 16.5h4"}),(0,_jsxRuntime.jsx)("path",{d:"M17 3v18"}),(0,_jsxRuntime.jsx)("path",{d:"M17 7.5h4"}),(0,_jsxRuntime.jsx)("path",{d:"M17 16.5h4"})]});const Music=o=>(0,_jsxRuntime.jsxs)(Svg,{...o,children:[(0,_jsxRuntime.jsx)("path",{d:"M9 18V5l12-2v13"}),(0,_jsxRuntime.jsx)("circle",{cx:"6",cy:"18",r:"3"}),(0,_jsxRuntime.jsx)("circle",{cx:"18",cy:"16",r:"3"})]});const Filter=o=>(0,_jsxRuntime.jsx)(Svg,{...o,children:(0,_jsxRuntime.jsx)("polygon",{points:"22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3"})});const Plus=o=>(0,_jsxRuntime.jsxs)(Svg,{...o,children:[(0,_jsxRuntime.jsx)("path",{d:"M5 12h14"}),(0,_jsxRuntime.jsx)("path",{d:"M12 5v14"})]});const X=o=>(0,_jsxRuntime.jsxs)(Svg,{...o,children:[(0,_jsxRuntime.jsx)("path",{d:"M18 6 6 18"}),(0,_jsxRuntime.jsx)("path",{d:"m6 6 12 12"})]});function getContentType(o){const r=o.responseHeaders||o.requestHeaders;const i=r?.["content-type"]||r?.["Content-Type"]||"";if(i.includes("json"))return{type:"JSON",color:macOSColors.semantic.info};if(i.includes("xml"))return{type:"XML",color:macOSColors.semantic.success};if(i.includes("html"))return{type:"HTML",color:macOSColors.semantic.warning};if(i.includes("text"))return{type:"TEXT",color:macOSColors.semantic.success};if(i.includes("image"))return{type:"IMAGE",color:macOSColors.semantic.error};if(i.includes("video"))return{type:"VIDEO",color:macOSColors.semantic.error};if(i.includes("audio"))return{type:"AUDIO",color:macOSColors.semantic.debug};if(i.includes("form"))return{type:"FORM",color:macOSColors.semantic.info};return{type:"OTHER",color:macOSColors.text.muted}}function getContentTypeIcon(o){switch(o){case"JSON":return FileJson;case"HTML":case"XML":case"TEXT":return FileText;case"IMAGE":return ImageIcon;case"VIDEO":return Film;case"AUDIO":return Music;default:return Globe}}function getMethodColor(o){switch(o){case"GET":return macOSColors.semantic.success;case"POST":return macOSColors.semantic.info;case"PUT":return macOSColors.semantic.warning;case"DELETE":return macOSColors.semantic.error;case"PATCH":return macOSColors.semantic.success;default:return macOSColors.text.muted}}function SectionHeader({icon:o,iconColor:r,title:i,badgeCount:a,badgeColor:d}){return(0,_jsxRuntime.jsxs)("div",{style:styles.sectionHeader,children:[o?(0,_jsxRuntime.jsx)("span",{style:styles.sectionHeaderIcon,children:(0,_jsxRuntime.jsx)(o,{size:12,color:r??buoyColors.primary})}):null,(0,_jsxRuntime.jsx)("span",{style:styles.sectionHeaderTitle,children:i}),a!==void 0?(0,_jsxRuntime.jsx)("span",{style:{...styles.sectionHeaderBadge,backgroundColor:`${d??buoyColors.primary}15`,border:`1px solid ${d??buoyColors.primary}33`},children:(0,_jsxRuntime.jsx)("span",{style:{...styles.sectionHeaderBadgeText,color:d??buoyColors.primary},children:a})}):null]})}function AddFilterButton({onPress:o,color:r,label:i}){return(0,_jsxRuntime.jsxs)("button",{type:"button",onClick:o,style:{...styles.addButton,borderColor:`${r}40`},children:[(0,_jsxRuntime.jsx)(Plus,{size:14,color:r}),(0,_jsxRuntime.jsx)("span",{style:{...styles.addButtonText,color:r},children:i})]})}function AddFilterInput({value:o,onChange:r,onSubmit:i,onCancel:a,placeholder:d,color:c}){return(0,_jsxRuntime.jsxs)("div",{style:{...styles.inputContainer,borderColor:`${c}40`},children:[(0,_jsxRuntime.jsx)("input",{value:o,onChange:u=>r(u.target.value),onKeyDown:u=>{if(u.key==="Enter")i()},placeholder:d,style:{...styles.input,color:c},autoFocus:true,autoCorrect:"off",autoCapitalize:"none",autoComplete:"off",spellCheck:false}),(0,_jsxRuntime.jsxs)("div",{style:styles.inputButtons,children:[o.trim()?(0,_jsxRuntime.jsx)("button",{type:"button",onClick:i,style:{...styles.inlineAddButton,backgroundColor:`${c}15`,borderColor:`${c}40`},children:(0,_jsxRuntime.jsx)("span",{style:{...styles.inlineAddButtonText,color:c},children:"Add"})}):null,(0,_jsxRuntime.jsx)("button",{type:"button",onClick:a,style:styles.cancelButton,children:(0,_jsxRuntime.jsx)(X,{size:16,color:`${c}60`})})]})]})}function NetworkFilterViewV3({events:o,filter:r,onFilterChange:i,ignoredPatterns:a=[],onRemovePattern:d=()=>{},onAddPattern:c=()=>{},onTogglePatternMode:u=()=>{}}){const[h,I]=(0,_react.useState)("contains");const[k,g]=(0,_react.useState)(false);const[f,y]=(0,_react.useState)("");const B=(0,_react.useMemo)(()=>{const e=new Map;for(const t of a)e.set(t.value,t.mode);return e},[a]);const x=(0,_react.useMemo)(()=>a.map(e=>e.value),[a]);const b=(0,_react.useCallback)(e=>{c({value:e,mode:h})},[c,h]);const F=(0,_react.useCallback)(()=>{const e=f.trim();if(!e)return;b(e);y("");g(false)},[f,b]);const E=(0,_react.useMemo)(()=>{const e={all:o.length,success:0,error:0,pending:0};o.forEach(t=>{if(t.error||t.status&&t.status>=400){e.error+=1;return}if(t.status&&t.status>=200&&t.status<300){e.success+=1;return}if(!t.status&&!t.error){e.pending+=1}});return e},[o]);const R=(0,_react.useMemo)(()=>{return o.reduce((e,t)=>{if(!t.method)return e;e[t.method]=(e[t.method]||0)+1;return e},{})},[o]);const z=(0,_react.useMemo)(()=>{return o.reduce((e,t)=>{const{type:n}=getContentType(t);e[n]=(e[n]||0)+1;return e},{})},[o]);const S=(0,_react.useMemo)(()=>{const e=new Set;o.forEach(t=>{if(t.host){e.add(t.host);return}try{if(t.url){const n=new URL(t.url);const s=String(n.host||"");if(s)e.add(s)}}catch{}});return Array.from(e).filter(t=>t&&t!=="").sort((t,n)=>t.localeCompare(n))},[o]);const v=(0,_react.useMemo)(()=>{const e=new Set;o.forEach(t=>{if(!t.url)return;try{const n=new URL(t.url);const s=String(n.origin||"");const l=String(n.pathname||"");const p=`${s}${l}`;e.add(p)}catch{e.add(t.url)}});return Array.from(e).filter(t=>t&&t!=="").sort((t,n)=>t.localeCompare(n))},[o]);const w=(0,_react.useMemo)(()=>{const e=30;const t=S.slice(0,e);const n=v.slice(0,e);return[...t,...n]},[S,v]);const j=(0,_react.useMemo)(()=>w.filter(e=>!x.some(t=>e.includes(t))),[w,x]);const H=(0,_react.useCallback)((e,t)=>{const[n]=e.split("::");if(n==="status"){const s=t==="all"?void 0:t;i({...r,status:s});return}if(n==="method"){const s=String(t);const l=r.method||[];const p=l.includes(s);const m=p?l.filter(T=>T!==s):[s];i({...r,method:m.length>0?m:void 0});return}if(n==="contentType"){const s=String(t);const l=r.contentType||[];const p=l.includes(s);const m=p?l.filter(T=>T!==s):[s];i({...r,contentType:m.length>0?m:void 0})}},[r,i]);const C=e=>{const t=e.count===0;const n=!e.isMethod||e.icon;return(0,_jsxRuntime.jsxs)("button",{type:"button",onClick:()=>H(e.id,e.value),style:{...styles.filterCard,...e.isActive?styles.activeFilterCard:null},children:[e.icon?(0,_jsxRuntime.jsx)(e.icon,{size:24,color:e.color}):e.isMethod?(0,_jsxRuntime.jsx)("span",{style:{...styles.methodBadgeCompact,backgroundColor:`${e.color}20`},children:(0,_jsxRuntime.jsx)("span",{style:{...styles.methodTextCompact,color:e.color},children:e.label})}):null,(0,_jsxRuntime.jsx)("span",{style:t?styles.filterCountZero:styles.filterCountActive,children:e.count}),n?(0,_jsxRuntime.jsx)("span",{style:styles.filterLabelCompact,children:e.label}):null]},e.id)};const W=["all","success","error","pending"].map(e=>({id:`status::${e}`,label:e.charAt(0).toUpperCase()+e.slice(1),count:E[e],icon:e==="success"?CheckCircle:e==="error"?XCircle:e==="pending"?Clock:Globe,color:e==="success"?macOSColors.semantic.success:e==="error"?macOSColors.semantic.error:e==="pending"?macOSColors.semantic.warning:macOSColors.semantic.info,isActive:r.status===e||!r.status&&e==="all",value:e}));const M=Object.entries(R);const A=Object.entries(z);const D=()=>{const e=[{label:"Contains",value:"contains",hint:"substring"},{label:"Exact",value:"exact",hint:"whole path/host/url"}];return(0,_jsxRuntime.jsxs)("div",{style:styles.modeToggleRow,children:[(0,_jsxRuntime.jsx)("span",{style:styles.modeToggleLabel,children:"Match:"}),(0,_jsxRuntime.jsx)("div",{style:styles.modeToggleGroup,children:e.map(t=>{const n=h===t.value;return(0,_jsxRuntime.jsxs)("button",{type:"button",onClick:()=>I(t.value),"aria-pressed":n,style:{...styles.modeToggleButton,...n?styles.modeToggleButtonActive:null},children:[(0,_jsxRuntime.jsx)("span",{style:{...styles.modeToggleButtonText,...n?styles.modeToggleButtonTextActive:null},children:t.label}),(0,_jsxRuntime.jsx)("span",{style:styles.modeToggleButtonHint,children:t.hint})]},t.value)})})]})};const L=e=>{const t=B.get(e)??"contains";const n=t==="exact";const s=n?macOSColors.semantic.warning:macOSColors.semantic.info;return(0,_jsxRuntime.jsx)("button",{type:"button","aria-label":`Match mode: ${t}. Tap to toggle.`,onClick:l=>{l.stopPropagation();u(e)},style:{...styles.modeBadge,borderColor:`${s}60`,backgroundColor:`${s}15`},children:(0,_jsxRuntime.jsx)("span",{style:{...styles.modeBadgeText,color:s},children:n?"EXACT":"CONTAINS"})})};return(0,_jsxRuntime.jsx)("div",{style:styles.container,children:(0,_jsxRuntime.jsxs)("div",{style:styles.content,children:[(0,_jsxRuntime.jsxs)("div",{style:styles.section,children:[(0,_jsxRuntime.jsx)(SectionHeader,{title:"Status"}),(0,_jsxRuntime.jsx)("div",{style:styles.filterGrid,children:W.map(C)})]}),M.length>0?(0,_jsxRuntime.jsxs)("div",{style:styles.section,children:[(0,_jsxRuntime.jsx)(SectionHeader,{title:"Method"}),(0,_jsxRuntime.jsx)("div",{style:styles.filterGrid,children:M.map(([e,t])=>C({id:`method::${e}`,label:e,count:t,color:getMethodColor(e),isActive:r.method?.includes(e)??false,value:e,isMethod:true}))})]}):null,A.length>0?(0,_jsxRuntime.jsxs)("div",{style:styles.section,children:[(0,_jsxRuntime.jsx)(SectionHeader,{title:"Content Type"}),(0,_jsxRuntime.jsx)("div",{style:styles.filterGrid,children:A.map(([e,t])=>{const n=o.find(l=>getContentType(l).type===e);const{color:s}=n?getContentType(n):{color:macOSColors.text.muted};return C({id:`contentType::${e}`,label:e,count:t,icon:getContentTypeIcon(e),color:s,isActive:r.contentType?.includes(e)??false,value:e})})})]}):null,(0,_jsxRuntime.jsxs)("div",{style:styles.excludeFiltersSection,children:[(0,_jsxRuntime.jsx)(SectionHeader,{icon:Filter,iconColor:buoyColors.primary,title:"ACTIVE FILTERS",badgeCount:x.length>0?x.length:void 0,badgeColor:buoyColors.primary}),(0,_jsxRuntime.jsx)("div",{style:styles.excludeFiltersDescription,children:"Hide queries matching these patterns from the list."}),(0,_jsxRuntime.jsx)("div",{style:styles.excludeFiltersInputWrapper,children:!k?(0,_jsxRuntime.jsx)(AddFilterButton,{onPress:()=>g(true),color:buoyColors.primary,label:"Add exclude pattern"}):(0,_jsxRuntime.jsxs)(_jsxRuntime.Fragment,{children:[D(),(0,_jsxRuntime.jsx)(AddFilterInput,{value:f,onChange:y,onSubmit:F,onCancel:()=>{g(false);y("")},placeholder:"Enter domain or URL pattern...",color:buoyColors.primary})]})}),x.length>0?(0,_jsxRuntime.jsx)("div",{style:styles.excludeFiltersContent,children:(0,_jsxRuntime.jsx)("div",{style:styles.filterListColumn,children:x.map(e=>(0,_jsxRuntime.jsxs)("button",{type:"button",onClick:()=>d(e),style:styles.filterItemRow,children:[(0,_jsxRuntime.jsx)("span",{style:{...styles.filterItemText,color:buoyColors.primary},children:e}),(0,_jsxRuntime.jsx)("span",{style:styles.filterItemMeta,children:L(e)}),(0,_jsxRuntime.jsx)(X,{size:12,color:`${buoyColors.primary}80`})]},e))})}):null]}),(0,_jsxRuntime.jsxs)("div",{style:styles.availableKeysSection,children:[(0,_jsxRuntime.jsx)(SectionHeader,{icon:Plus,iconColor:buoyColors.primary,title:"AVAILABLE DOMAINS & URLS",badgeCount:j.length,badgeColor:buoyColors.primary}),(0,_jsxRuntime.jsx)("div",{style:styles.availableKeysScroll,children:j.length>0?j.map(e=>(0,_jsxRuntime.jsxs)("button",{type:"button",onClick:()=>b(e),style:styles.availableKeyItem,children:[(0,_jsxRuntime.jsx)("span",{style:styles.availableKeyText,children:e}),(0,_jsxRuntime.jsx)(Plus,{size:12,color:buoyColors.primary})]},e)):(0,_jsxRuntime.jsx)("div",{style:styles.emptyStateText,children:"No network events captured yet. Domains and URLs will appear here."})})]}),(0,_jsxRuntime.jsxs)("div",{style:styles.howItWorksSection,children:[(0,_jsxRuntime.jsx)(SectionHeader,{icon:Filter,iconColor:buoyColors.textSecondary,title:"HOW NETWORK FILTERS WORK"}),(0,_jsxRuntime.jsx)("div",{style:styles.howItWorksText,children:"Patterns hide matching requests from the network event list. Each pattern has a match mode you can toggle on its badge: CONTAINS hides any URL containing the text; EXACT hides only an exact path/host/url match."}),(0,_jsxRuntime.jsxs)("div",{style:styles.examplesContainer,children:[(0,_jsxRuntime.jsx)("div",{style:styles.examplesTitle,children:"EXAMPLES:"}),["\u2022 example.com (CONTAINS) \u2192 any request whose URL contains example.com","\u2022 example.com (EXACT) \u2192 only requests served by that exact host","\u2022 /v1 (CONTAINS) \u2192 any URL containing /v1 (e.g. /v1, /v1/users)","\u2022 /v1 (EXACT) \u2192 only requests whose pathname is exactly /v1"].map(e=>(0,_jsxRuntime.jsx)("div",{style:styles.exampleItem,children:e},e))]})]})]})})}const styles={container:{display:"flex",flexDirection:"column",flex:1,minHeight:0,backgroundColor:buoyColors.base},content:{flex:1,minHeight:0,overflowY:"auto",padding:"16px 16px 24px 16px"},section:{marginBottom:8},sectionHeader:{display:"flex",flexDirection:"row",alignItems:"center",padding:"8px 16px",backgroundColor:buoyColors.base,minHeight:40,boxSizing:"border-box"},sectionHeaderIcon:{display:"inline-flex",marginRight:8},sectionHeaderTitle:{flex:1,fontSize:14,fontWeight:600,color:buoyColors.text,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},sectionHeaderBadge:{display:"inline-flex",alignItems:"center",padding:"3px 8px",borderRadius:12,marginLeft:8},sectionHeaderBadgeText:{fontSize:12,fontWeight:600},filterGrid:{display:"flex",flexDirection:"row",flexWrap:"wrap",gap:8,marginTop:8},filterCard:{display:"flex",backgroundColor:buoyColors.card,borderRadius:12,padding:"10px 8px",flexDirection:"column",alignItems:"center",justifyContent:"center",border:`1px solid ${buoyColors.border}`,width:72,minHeight:68,boxSizing:"border-box",cursor:"pointer",margin:0},activeFilterCard:{backgroundColor:`${buoyColors.primary}33`,border:`2px solid ${buoyColors.primary}`,boxShadow:`0 0 8px ${buoyColors.primary}4D`},filterCountActive:{fontSize:14,fontWeight:700,color:buoyColors.text,fontFamily:"ui-monospace, Menlo, monospace",marginTop:3,marginBottom:1,textShadow:"0 0.5px 1px rgba(0, 0, 0, 0.2)"},filterCountZero:{fontSize:11,fontWeight:500,color:buoyColors.textMuted,fontFamily:"ui-monospace, Menlo, monospace",marginTop:3,marginBottom:1},filterLabelCompact:{fontSize:10,color:buoyColors.text,fontWeight:600,textAlign:"center",textTransform:"capitalize",textShadow:"0 0.5px 1px rgba(0, 0, 0, 0.3)"},methodBadgeCompact:{display:"inline-flex",padding:"4px 8px",borderRadius:5,minWidth:48,maxWidth:60,boxSizing:"border-box",alignItems:"center",justifyContent:"center"},methodTextCompact:{fontSize:13,fontWeight:700,letterSpacing:.3,fontFamily:"ui-monospace, Menlo, monospace",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},excludeFiltersSection:{backgroundColor:buoyColors.card,borderRadius:16,border:`1px solid ${buoyColors.border}`,marginTop:16,overflow:"hidden"},excludeFiltersDescription:{fontSize:10,color:buoyColors.textSecondary,padding:"8px 16px 0 16px",lineHeight:"14px"},excludeFiltersInputWrapper:{padding:"8px 16px"},excludeFiltersContent:{padding:"0 16px 16px 16px",maxHeight:150,overflowY:"auto"},filterListColumn:{display:"flex",flexDirection:"column",gap:8},filterItemRow:{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between",padding:"10px 12px",backgroundColor:buoyColors.hover,borderRadius:8,border:`1px solid ${buoyColors.border}`,cursor:"pointer",margin:0,width:"100%",boxSizing:"border-box",textAlign:"left"},filterItemText:{flex:1,fontSize:12,fontFamily:"ui-monospace, Menlo, monospace",marginRight:8,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",minWidth:0},filterItemMeta:{display:"inline-flex",marginRight:8},modeBadge:{display:"inline-flex",padding:"3px 8px",borderRadius:6,borderWidth:1,borderStyle:"solid",background:"none",cursor:"pointer",margin:0},modeBadgeText:{fontSize:9,fontFamily:"ui-monospace, Menlo, monospace",fontWeight:700,letterSpacing:.5},modeToggleRow:{display:"flex",flexDirection:"row",alignItems:"center",gap:8,marginBottom:8},modeToggleLabel:{fontSize:11,fontWeight:600,color:macOSColors.text.secondary,fontFamily:"ui-monospace, Menlo, monospace",letterSpacing:.3},modeToggleGroup:{display:"flex",flexDirection:"row",gap:6,flex:1},modeToggleButton:{flex:1,display:"flex",flexDirection:"column",padding:"6px 10px",borderRadius:8,border:`1px solid ${macOSColors.border.default}`,backgroundColor:macOSColors.background.hover,alignItems:"center",cursor:"pointer",margin:0},modeToggleButtonActive:{border:`1px solid ${macOSColors.semantic.info}`,backgroundColor:`${macOSColors.semantic.info}22`},modeToggleButtonText:{fontSize:11,fontWeight:700,color:macOSColors.text.secondary,fontFamily:"ui-monospace, Menlo, monospace",letterSpacing:.3},modeToggleButtonTextActive:{color:macOSColors.semantic.info},modeToggleButtonHint:{fontSize:9,color:macOSColors.text.muted,marginTop:1},addButton:{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center",padding:"10px 14px",borderRadius:10,borderWidth:1,borderStyle:"dashed",backgroundColor:buoyColors.input,cursor:"pointer",margin:0,width:"100%",boxSizing:"border-box"},addButtonText:{fontSize:13,fontWeight:500,marginLeft:6},inputContainer:{display:"flex",flexDirection:"row",alignItems:"center",backgroundColor:buoyColors.input,borderRadius:10,borderWidth:1,borderStyle:"solid",padding:"10px 14px",marginBottom:8,boxSizing:"border-box"},input:{flex:1,fontSize:13,padding:0,border:"none",outline:"none",background:"transparent",fontFamily:"inherit",minWidth:0},inputButtons:{display:"flex",flexDirection:"row",alignItems:"center",gap:8},cancelButton:{display:"inline-flex",padding:4,borderRadius:6,backgroundColor:buoyColors.hover,border:"none",cursor:"pointer",margin:0},inlineAddButton:{display:"inline-flex",padding:"6px 12px",borderRadius:6,borderWidth:1,borderStyle:"solid",cursor:"pointer",margin:0},inlineAddButtonText:{fontSize:12,fontWeight:600},availableKeysSection:{backgroundColor:buoyColors.card,borderRadius:16,border:`1px solid ${buoyColors.border}`,marginTop:16,overflow:"hidden"},availableKeysScroll:{maxHeight:150,overflowY:"auto",padding:"8px 16px 16px 16px"},availableKeyItem:{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between",padding:"10px 12px",backgroundColor:buoyColors.hover,borderRadius:8,border:`1px solid ${buoyColors.border}`,marginBottom:8,cursor:"pointer",width:"100%",boxSizing:"border-box",textAlign:"left"},availableKeyText:{flex:1,fontSize:11,color:buoyColors.text,fontFamily:"ui-monospace, Menlo, monospace",marginRight:8,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",minWidth:0},emptyStateText:{fontSize:11,color:buoyColors.textMuted,fontStyle:"italic",textAlign:"center",padding:"12px 0"},howItWorksSection:{backgroundColor:buoyColors.card,borderRadius:16,border:`1px solid ${buoyColors.border}`,marginTop:16,overflow:"hidden"},howItWorksText:{fontSize:11,color:buoyColors.textSecondary,lineHeight:"16px",margin:"8px 0 12px 0",padding:"0 16px",fontFamily:"ui-monospace, Menlo, monospace"},examplesContainer:{padding:"8px 16px 16px 16px",borderTop:`1px solid ${buoyColors.border}`},examplesTitle:{fontSize:10,fontWeight:600,color:buoyColors.textMuted,fontFamily:"ui-monospace, Menlo, monospace",letterSpacing:.5,marginBottom:6},exampleItem:{fontSize:10,color:buoyColors.textMuted,fontFamily:"ui-monospace, Menlo, monospace",lineHeight:"16px"}};