react-native-inapp-inspector 2.3.18 → 2.3.20

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 (358) hide show
  1. package/android/src/main/java/com/inappinspector/NetworkInspectorModule.kt +57 -0
  2. package/dist/commonjs/analytics.js +1 -24
  3. package/dist/commonjs/bundle.js +1 -16
  4. package/dist/commonjs/capture.d.ts +2 -0
  5. package/dist/commonjs/capture.js +1 -32
  6. package/dist/commonjs/components/AnalyticsDetail.js +92 -623
  7. package/dist/commonjs/components/AnalyticsEventCard.js +54 -350
  8. package/dist/commonjs/components/AnalyticsGraph.js +70 -370
  9. package/dist/commonjs/components/AnimatedEntrance.js +1 -11
  10. package/dist/commonjs/components/AppHeaderLogo.js +7 -134
  11. package/dist/commonjs/components/BrandCircleIcon.js +73 -118
  12. package/dist/commonjs/components/BrandSquareIcon.js +63 -108
  13. package/dist/commonjs/components/CodeSnippet.js +48 -623
  14. package/dist/commonjs/components/ConsoleLogCard.js +63 -537
  15. package/dist/commonjs/components/CopyButton.js +3 -89
  16. package/dist/commonjs/components/DiffViewer.js +19 -83
  17. package/dist/commonjs/components/DomainHeader.js +27 -127
  18. package/dist/commonjs/components/EmptyState.d.ts +1 -0
  19. package/dist/commonjs/components/EmptyState.js +10 -87
  20. package/dist/commonjs/components/EndOfListFooter.js +7 -81
  21. package/dist/commonjs/components/ErrorBoundary.js +72 -566
  22. package/dist/commonjs/components/HeadersSection.js +31 -110
  23. package/dist/commonjs/components/HighlightText.js +17 -58
  24. package/dist/commonjs/components/Inspector/AboutModal.d.ts +6 -0
  25. package/dist/commonjs/components/Inspector/AboutModal.js +351 -0
  26. package/dist/commonjs/components/Inspector/AnalyticsFilterModal.js +98 -797
  27. package/dist/commonjs/components/Inspector/AnalyticsTab.js +284 -930
  28. package/dist/commonjs/components/Inspector/BundleTab.js +551 -2918
  29. package/dist/commonjs/components/Inspector/ConsoleTab.js +79 -492
  30. package/dist/commonjs/components/Inspector/CrashDetail.js +123 -672
  31. package/dist/commonjs/components/Inspector/CrashFilterModal.js +66 -498
  32. package/dist/commonjs/components/Inspector/CrashTab.js +98 -670
  33. package/dist/commonjs/components/Inspector/DebuggingTab.js +64 -871
  34. package/dist/commonjs/components/Inspector/DeviceInfoTab.js +143 -907
  35. package/dist/commonjs/components/Inspector/FabLauncher.js +85 -54
  36. package/dist/commonjs/components/Inspector/FeatureUnderDevNotice.js +6 -99
  37. package/dist/commonjs/components/Inspector/FeedbackModal.d.ts +9 -0
  38. package/dist/commonjs/components/Inspector/FeedbackModal.js +167 -521
  39. package/dist/commonjs/components/Inspector/InspectorContext.js +1 -21
  40. package/dist/commonjs/components/Inspector/InspectorHeader.js +219 -1093
  41. package/dist/commonjs/components/Inspector/LogDetail.js +168 -994
  42. package/dist/commonjs/components/Inspector/MainScreen.js +60 -332
  43. package/dist/commonjs/components/Inspector/MediaGalleryTab.js +136 -278
  44. package/dist/commonjs/components/Inspector/MediaPreviewModal.js +134 -361
  45. package/dist/commonjs/components/Inspector/NavigationTracker.js +1 -12
  46. package/dist/commonjs/components/Inspector/NetworkDetail.js +96 -432
  47. package/dist/commonjs/components/Inspector/NetworkFilterModal.js +60 -576
  48. package/dist/commonjs/components/Inspector/NetworkTab.js +84 -514
  49. package/dist/commonjs/components/Inspector/NpmStarPrompt.js +17 -433
  50. package/dist/commonjs/components/Inspector/NpmUpdateToast.js +25 -298
  51. package/dist/commonjs/components/Inspector/PerformanceTab.js +182 -1397
  52. package/dist/commonjs/components/Inspector/ReduxDetail.js +188 -1089
  53. package/dist/commonjs/components/Inspector/ReduxTab.js +85 -701
  54. package/dist/commonjs/components/Inspector/SettingsPanel.js +431 -3431
  55. package/dist/commonjs/components/Inspector/SkeletonPlaceholder.js +11 -180
  56. package/dist/commonjs/components/Inspector/StorageTab.js +93 -826
  57. package/dist/commonjs/components/Inspector/TabBar.js +47 -183
  58. package/dist/commonjs/components/Inspector/UpdateAvailableModal.js +34 -408
  59. package/dist/commonjs/components/JsonViewer.js +168 -380
  60. package/dist/commonjs/components/LogCard.js +57 -567
  61. package/dist/commonjs/components/LogSyntaxHighlighter.js +11 -130
  62. package/dist/commonjs/components/MetaAccordion.js +69 -238
  63. package/dist/commonjs/components/MiniBarChart.js +3 -56
  64. package/dist/commonjs/components/MiniLineChart.js +3 -58
  65. package/dist/commonjs/components/NetworkIcons.d.ts +7 -0
  66. package/dist/commonjs/components/NetworkIcons.js +479 -997
  67. package/dist/commonjs/components/QRCodeView.js +5 -79
  68. package/dist/commonjs/components/SectionHeader.js +15 -37
  69. package/dist/commonjs/components/SegmentedTabs.js +7 -61
  70. package/dist/commonjs/components/SkeletonPlaceholder.js +11 -180
  71. package/dist/commonjs/components/Slider.js +15 -243
  72. package/dist/commonjs/components/SourcePageCard.js +30 -89
  73. package/dist/commonjs/components/Toast.js +5 -147
  74. package/dist/commonjs/components/TouchableScale.js +3 -24
  75. package/dist/commonjs/components/TreeNode.js +55 -130
  76. package/dist/commonjs/console.js +1 -16
  77. package/dist/commonjs/constants/index.js +1 -32
  78. package/dist/commonjs/constants/telemetryConfig.js +1 -6
  79. package/dist/commonjs/constants/version.d.ts +1 -1
  80. package/dist/commonjs/constants/version.js +1 -4
  81. package/dist/commonjs/crash.js +1 -23
  82. package/dist/commonjs/customHooks/analyticsLogger.js +1 -250
  83. package/dist/commonjs/customHooks/bundleAnalyzer.js +1 -957
  84. package/dist/commonjs/customHooks/consoleLogger.js +6 -445
  85. package/dist/commonjs/customHooks/crashHandler.js +7 -656
  86. package/dist/commonjs/customHooks/logFilters.js +1 -23
  87. package/dist/commonjs/customHooks/networkLogger.js +2 -536
  88. package/dist/commonjs/customHooks/performanceTracker.js +63 -750
  89. package/dist/commonjs/customHooks/reduxLogger.js +2 -313
  90. package/dist/commonjs/customHooks/storageInspector.js +1 -435
  91. package/dist/commonjs/customHooks/useAccordion.js +1 -18
  92. package/dist/commonjs/decorators/index.js +1 -100
  93. package/dist/commonjs/helpers/gaAnalyticsRegistry.js +1 -148
  94. package/dist/commonjs/helpers/index.js +8 -921
  95. package/dist/commonjs/helpers/memoryManager.js +1 -99
  96. package/dist/commonjs/helpers/qrGenerator.js +1 -367
  97. package/dist/commonjs/helpers/remoteConfig.js +1 -165
  98. package/dist/commonjs/helpers/searchQueryParser.js +1 -62
  99. package/dist/commonjs/helpers/settingsStore.js +1 -144
  100. package/dist/commonjs/helpers/telemetry.js +1 -501
  101. package/dist/commonjs/helpers/toast.js +1 -20
  102. package/dist/commonjs/i18n/index.js +1 -90
  103. package/dist/commonjs/i18n/locales/en.json +1 -1122
  104. package/dist/commonjs/index.js +5 -2153
  105. package/dist/commonjs/metro.js +6 -468
  106. package/dist/commonjs/native/NativeInspector.d.ts +3 -0
  107. package/dist/commonjs/native/NativeInspector.js +1 -402
  108. package/dist/commonjs/native/NativeNetworkInspector.d.ts +1 -0
  109. package/dist/commonjs/native/NativeNetworkInspector.js +1 -4
  110. package/dist/commonjs/network.js +1 -13
  111. package/dist/commonjs/performance.js +1 -29
  112. package/dist/commonjs/redux.js +1 -20
  113. package/dist/commonjs/storage.js +1 -14
  114. package/dist/commonjs/styles/AppColors.js +1 -423
  115. package/dist/commonjs/styles/AppFonts.js +1 -17
  116. package/dist/commonjs/styles/common.js +1 -190
  117. package/dist/commonjs/styles/index.d.ts +6 -0
  118. package/dist/commonjs/styles/index.js +1 -1589
  119. package/dist/commonjs/types/enums.d.ts +2 -1
  120. package/dist/commonjs/types/enums.js +1 -150
  121. package/dist/commonjs/types/index.js +1 -18
  122. package/dist/commonjs/types/interfaces.d.ts +7 -0
  123. package/dist/commonjs/types/interfaces.js +1 -2
  124. package/dist/esm/analytics.js +1 -2
  125. package/dist/esm/bundle.js +1 -2
  126. package/dist/esm/capture.d.ts +2 -0
  127. package/dist/esm/capture.js +1 -29
  128. package/dist/esm/components/AnalyticsDetail.js +171 -664
  129. package/dist/esm/components/AnalyticsEventCard.js +77 -335
  130. package/dist/esm/components/AnalyticsGraph.js +95 -357
  131. package/dist/esm/components/AnimatedEntrance.js +1 -6
  132. package/dist/esm/components/AppHeaderLogo.js +7 -94
  133. package/dist/esm/components/BrandCircleIcon.js +114 -119
  134. package/dist/esm/components/BrandSquareIcon.js +73 -78
  135. package/dist/esm/components/CodeSnippet.js +58 -595
  136. package/dist/esm/components/ConsoleLogCard.js +91 -526
  137. package/dist/esm/components/CopyButton.js +3 -51
  138. package/dist/esm/components/DiffViewer.js +22 -48
  139. package/dist/esm/components/DomainHeader.js +43 -138
  140. package/dist/esm/components/EmptyState.d.ts +1 -0
  141. package/dist/esm/components/EmptyState.js +17 -56
  142. package/dist/esm/components/EndOfListFooter.js +15 -83
  143. package/dist/esm/components/ErrorBoundary.js +125 -582
  144. package/dist/esm/components/HeadersSection.js +52 -93
  145. package/dist/esm/components/HighlightText.js +17 -53
  146. package/dist/esm/components/Inspector/AboutModal.d.ts +6 -0
  147. package/dist/esm/components/Inspector/AboutModal.js +351 -0
  148. package/dist/esm/components/Inspector/AnalyticsFilterModal.js +225 -886
  149. package/dist/esm/components/Inspector/AnalyticsTab.js +296 -904
  150. package/dist/esm/components/Inspector/BundleTab.js +1175 -3502
  151. package/dist/esm/components/Inspector/ConsoleTab.js +113 -488
  152. package/dist/esm/components/Inspector/CrashDetail.js +236 -747
  153. package/dist/esm/components/Inspector/CrashFilterModal.js +149 -541
  154. package/dist/esm/components/Inspector/CrashTab.js +177 -711
  155. package/dist/esm/components/Inspector/DebuggingTab.js +156 -923
  156. package/dist/esm/components/Inspector/DeviceInfoTab.js +199 -924
  157. package/dist/esm/components/Inspector/FabLauncher.js +85 -49
  158. package/dist/esm/components/Inspector/FeatureUnderDevNotice.js +14 -70
  159. package/dist/esm/components/Inspector/FeedbackModal.d.ts +9 -0
  160. package/dist/esm/components/Inspector/FeedbackModal.js +182 -499
  161. package/dist/esm/components/Inspector/InspectorContext.js +1 -12
  162. package/dist/esm/components/Inspector/InspectorHeader.js +309 -1145
  163. package/dist/esm/components/Inspector/LogDetail.js +235 -1023
  164. package/dist/esm/components/Inspector/MainScreen.js +86 -320
  165. package/dist/esm/components/Inspector/MediaGalleryTab.js +157 -259
  166. package/dist/esm/components/Inspector/MediaPreviewModal.js +153 -340
  167. package/dist/esm/components/Inspector/NavigationTracker.js +1 -10
  168. package/dist/esm/components/Inspector/NetworkDetail.js +141 -472
  169. package/dist/esm/components/Inspector/NetworkFilterModal.js +122 -597
  170. package/dist/esm/components/Inspector/NetworkTab.js +125 -517
  171. package/dist/esm/components/Inspector/NpmStarPrompt.js +58 -434
  172. package/dist/esm/components/Inspector/NpmUpdateToast.js +45 -281
  173. package/dist/esm/components/Inspector/PerformanceTab.js +393 -1570
  174. package/dist/esm/components/Inspector/ReduxDetail.js +307 -1170
  175. package/dist/esm/components/Inspector/ReduxTab.js +144 -722
  176. package/dist/esm/components/Inspector/SettingsPanel.js +647 -3609
  177. package/dist/esm/components/Inspector/SkeletonPlaceholder.js +30 -163
  178. package/dist/esm/components/Inspector/StorageTab.js +172 -866
  179. package/dist/esm/components/Inspector/TabBar.js +52 -183
  180. package/dist/esm/components/Inspector/UpdateAvailableModal.js +79 -416
  181. package/dist/esm/components/JsonViewer.js +179 -353
  182. package/dist/esm/components/LogCard.js +93 -565
  183. package/dist/esm/components/LogSyntaxHighlighter.js +11 -123
  184. package/dist/esm/components/MetaAccordion.js +136 -267
  185. package/dist/esm/components/MiniBarChart.js +3 -18
  186. package/dist/esm/components/MiniLineChart.js +3 -20
  187. package/dist/esm/components/NetworkIcons.d.ts +7 -0
  188. package/dist/esm/components/NetworkIcons.js +481 -817
  189. package/dist/esm/components/QRCodeView.js +8 -45
  190. package/dist/esm/components/SectionHeader.js +22 -39
  191. package/dist/esm/components/SegmentedTabs.js +8 -57
  192. package/dist/esm/components/SkeletonPlaceholder.js +30 -163
  193. package/dist/esm/components/Slider.js +24 -213
  194. package/dist/esm/components/SourcePageCard.js +65 -86
  195. package/dist/esm/components/Toast.js +10 -117
  196. package/dist/esm/components/TouchableScale.js +3 -19
  197. package/dist/esm/components/TreeNode.js +58 -95
  198. package/dist/esm/console.js +1 -2
  199. package/dist/esm/constants/index.js +1 -28
  200. package/dist/esm/constants/telemetryConfig.js +1 -3
  201. package/dist/esm/constants/version.d.ts +1 -1
  202. package/dist/esm/constants/version.js +1 -1
  203. package/dist/esm/crash.js +1 -2
  204. package/dist/esm/customHooks/analyticsLogger.js +1 -230
  205. package/dist/esm/customHooks/bundleAnalyzer.js +1 -944
  206. package/dist/esm/customHooks/consoleLogger.js +6 -432
  207. package/dist/esm/customHooks/crashHandler.js +7 -630
  208. package/dist/esm/customHooks/logFilters.js +1 -20
  209. package/dist/esm/customHooks/networkLogger.js +2 -519
  210. package/dist/esm/customHooks/performanceTracker.js +63 -723
  211. package/dist/esm/customHooks/reduxLogger.js +2 -293
  212. package/dist/esm/customHooks/storageInspector.js +1 -418
  213. package/dist/esm/customHooks/useAccordion.js +1 -16
  214. package/dist/esm/decorators/index.js +1 -95
  215. package/dist/esm/helpers/gaAnalyticsRegistry.js +1 -143
  216. package/dist/esm/helpers/index.js +8 -861
  217. package/dist/esm/helpers/memoryManager.js +1 -91
  218. package/dist/esm/helpers/qrGenerator.js +1 -364
  219. package/dist/esm/helpers/remoteConfig.js +1 -160
  220. package/dist/esm/helpers/searchQueryParser.js +1 -59
  221. package/dist/esm/helpers/settingsStore.js +1 -134
  222. package/dist/esm/helpers/telemetry.js +1 -489
  223. package/dist/esm/helpers/toast.js +1 -15
  224. package/dist/esm/i18n/index.js +1 -78
  225. package/dist/esm/i18n/locales/en.json +1 -1122
  226. package/dist/esm/index.js +7 -1967
  227. package/dist/esm/metro.js +6 -459
  228. package/dist/esm/native/NativeInspector.d.ts +3 -0
  229. package/dist/esm/native/NativeInspector.js +1 -370
  230. package/dist/esm/native/NativeNetworkInspector.d.ts +1 -0
  231. package/dist/esm/native/NativeNetworkInspector.js +1 -2
  232. package/dist/esm/network.js +1 -1
  233. package/dist/esm/performance.js +1 -2
  234. package/dist/esm/redux.js +1 -1
  235. package/dist/esm/storage.js +1 -1
  236. package/dist/esm/styles/AppColors.js +1 -417
  237. package/dist/esm/styles/AppFonts.js +1 -13
  238. package/dist/esm/styles/common.js +1 -186
  239. package/dist/esm/styles/index.d.ts +6 -0
  240. package/dist/esm/styles/index.js +1 -1551
  241. package/dist/esm/types/enums.d.ts +2 -1
  242. package/dist/esm/types/enums.js +1 -147
  243. package/dist/esm/types/index.js +1 -2
  244. package/dist/esm/types/interfaces.d.ts +7 -0
  245. package/dist/esm/types/interfaces.js +1 -1
  246. package/ios/NetworkInspectorModule.mm +253 -136
  247. package/package.json +5 -3
  248. package/react-native-inapp-inspector.podspec +1 -1
  249. package/src/native/NativeInspector.ts +17 -0
  250. package/src/native/NativeNetworkInspector.ts +1 -0
  251. package/src/analytics.ts +0 -35
  252. package/src/bundle.ts +0 -25
  253. package/src/capture.ts +0 -101
  254. package/src/components/AnalyticsDetail.tsx +0 -870
  255. package/src/components/AnalyticsEventCard.tsx +0 -444
  256. package/src/components/AnalyticsGraph.tsx +0 -583
  257. package/src/components/AnimatedEntrance.tsx +0 -20
  258. package/src/components/AppHeaderLogo.tsx +0 -143
  259. package/src/components/BrandCircleIcon.tsx +0 -144
  260. package/src/components/BrandSquareIcon.tsx +0 -184
  261. package/src/components/CodeSnippet.tsx +0 -725
  262. package/src/components/ConsoleLogCard.tsx +0 -679
  263. package/src/components/CopyButton.tsx +0 -87
  264. package/src/components/DiffViewer.tsx +0 -82
  265. package/src/components/DomainHeader.tsx +0 -224
  266. package/src/components/EmptyState.tsx +0 -95
  267. package/src/components/EndOfListFooter.tsx +0 -100
  268. package/src/components/ErrorBoundary.tsx +0 -688
  269. package/src/components/HeadersSection.tsx +0 -172
  270. package/src/components/HighlightText.tsx +0 -100
  271. package/src/components/Inspector/AnalyticsFilterModal.tsx +0 -1250
  272. package/src/components/Inspector/AnalyticsTab.tsx +0 -1362
  273. package/src/components/Inspector/BundleTab.tsx +0 -4768
  274. package/src/components/Inspector/ConsoleTab.tsx +0 -726
  275. package/src/components/Inspector/CrashDetail.tsx +0 -997
  276. package/src/components/Inspector/CrashFilterModal.tsx +0 -721
  277. package/src/components/Inspector/CrashTab.tsx +0 -933
  278. package/src/components/Inspector/DebuggingTab.tsx +0 -1103
  279. package/src/components/Inspector/DeviceInfoTab.tsx +0 -1397
  280. package/src/components/Inspector/FabLauncher.tsx +0 -80
  281. package/src/components/Inspector/FeatureUnderDevNotice.tsx +0 -94
  282. package/src/components/Inspector/FeedbackModal.tsx +0 -626
  283. package/src/components/Inspector/InspectorContext.tsx +0 -28
  284. package/src/components/Inspector/InspectorHeader.tsx +0 -1545
  285. package/src/components/Inspector/LogDetail.tsx +0 -1431
  286. package/src/components/Inspector/MainScreen.tsx +0 -459
  287. package/src/components/Inspector/MediaGalleryTab.tsx +0 -355
  288. package/src/components/Inspector/MediaPreviewModal.tsx +0 -435
  289. package/src/components/Inspector/NavigationTracker.tsx +0 -13
  290. package/src/components/Inspector/NetworkDetail.tsx +0 -795
  291. package/src/components/Inspector/NetworkFilterModal.tsx +0 -730
  292. package/src/components/Inspector/NetworkTab.tsx +0 -820
  293. package/src/components/Inspector/NpmStarPrompt.tsx +0 -532
  294. package/src/components/Inspector/NpmUpdateToast.tsx +0 -387
  295. package/src/components/Inspector/PerformanceTab.tsx +0 -1967
  296. package/src/components/Inspector/ReduxDetail.tsx +0 -1651
  297. package/src/components/Inspector/ReduxTab.tsx +0 -987
  298. package/src/components/Inspector/SettingsPanel.tsx +0 -4580
  299. package/src/components/Inspector/SkeletonPlaceholder.tsx +0 -206
  300. package/src/components/Inspector/StorageTab.tsx +0 -1159
  301. package/src/components/Inspector/TabBar.tsx +0 -263
  302. package/src/components/Inspector/UpdateAvailableModal.tsx +0 -555
  303. package/src/components/JsonViewer.tsx +0 -547
  304. package/src/components/LogCard.tsx +0 -694
  305. package/src/components/LogSyntaxHighlighter.tsx +0 -178
  306. package/src/components/MetaAccordion.tsx +0 -355
  307. package/src/components/MiniBarChart.tsx +0 -42
  308. package/src/components/MiniLineChart.tsx +0 -33
  309. package/src/components/NetworkIcons.tsx +0 -2599
  310. package/src/components/QRCodeView.tsx +0 -75
  311. package/src/components/SectionHeader.tsx +0 -101
  312. package/src/components/SegmentedTabs.tsx +0 -83
  313. package/src/components/SkeletonPlaceholder.tsx +0 -206
  314. package/src/components/Slider.tsx +0 -300
  315. package/src/components/SourcePageCard.tsx +0 -150
  316. package/src/components/Toast.tsx +0 -131
  317. package/src/components/TouchableScale.tsx +0 -61
  318. package/src/components/TreeNode.tsx +0 -171
  319. package/src/console.ts +0 -24
  320. package/src/constants/index.ts +0 -41
  321. package/src/constants/telemetryConfig.ts +0 -4
  322. package/src/constants/version.ts +0 -3
  323. package/src/crash.ts +0 -32
  324. package/src/customHooks/analyticsLogger.ts +0 -336
  325. package/src/customHooks/bundleAnalyzer.ts +0 -1256
  326. package/src/customHooks/consoleLogger.ts +0 -530
  327. package/src/customHooks/crashHandler.ts +0 -944
  328. package/src/customHooks/logFilters.ts +0 -32
  329. package/src/customHooks/networkLogger.ts +0 -624
  330. package/src/customHooks/performanceTracker.ts +0 -1014
  331. package/src/customHooks/reduxLogger.ts +0 -406
  332. package/src/customHooks/storageInspector.ts +0 -513
  333. package/src/customHooks/useAccordion.tsx +0 -27
  334. package/src/decorators/index.ts +0 -184
  335. package/src/helpers/gaAnalyticsRegistry.ts +0 -204
  336. package/src/helpers/index.ts +0 -1092
  337. package/src/helpers/memoryManager.ts +0 -138
  338. package/src/helpers/qrGenerator.ts +0 -430
  339. package/src/helpers/remoteConfig.ts +0 -212
  340. package/src/helpers/searchQueryParser.ts +0 -84
  341. package/src/helpers/settingsStore.ts +0 -171
  342. package/src/helpers/telemetry.ts +0 -568
  343. package/src/helpers/toast.ts +0 -17
  344. package/src/i18n/index.ts +0 -104
  345. package/src/i18n/locales/en.json +0 -1125
  346. package/src/index.tsx +0 -2635
  347. package/src/metro.ts +0 -598
  348. package/src/network.ts +0 -22
  349. package/src/performance.ts +0 -38
  350. package/src/redux.ts +0 -23
  351. package/src/storage.ts +0 -18
  352. package/src/styles/AppColors.ts +0 -455
  353. package/src/styles/AppFonts.ts +0 -26
  354. package/src/styles/common.ts +0 -209
  355. package/src/styles/index.ts +0 -1606
  356. package/src/types/enums.ts +0 -208
  357. package/src/types/index.ts +0 -34
  358. package/src/types/interfaces.ts +0 -530
@@ -1,613 +1,138 @@
1
- import React, { useEffect, useMemo, useState } from 'react';
2
- import { Modal, Pressable, ScrollView, StyleSheet, Text, TouchableOpacity, View, } from 'react-native';
3
- import { useInspector } from './InspectorContext';
4
- import { AppColors } from '../../styles/AppColors';
5
- import { AppFonts } from '../../styles/AppFonts';
6
- import { useTranslation } from '../../i18n';
7
- import { METHOD_COLORS } from '../../constants';
8
- import { FilterIcon, CloseWhite, ClockIcon, CircleCheckIcon, CircleAlertIcon, CircleXIcon, LayersIcon, RepeatIcon, ShieldAlertIcon, BoltIcon, GlobeIcon, LockIcon, UnlockIcon, RocketIcon, TurtleIcon, HourglassIcon, PackageIcon, } from '../NetworkIcons';
9
- import TouchableScale from '../TouchableScale';
10
- export const DEFAULT_NETWORK_FILTERS = {
11
- statusCodes: new Set(['all']),
12
- methods: new Set(['all']),
13
- latency: 'all',
14
- protocol: 'all',
15
- sortBy: 'time_desc',
16
- };
17
- export const isNetworkFiltersDefault = (f) => (f.statusCodes.has('all') || f.statusCodes.size === 0) &&
18
- (f.methods.has('all') || f.methods.size === 0) &&
19
- f.latency === 'all' &&
20
- f.protocol === 'all' &&
21
- f.sortBy === 'time_desc';
22
- export const NetworkFilterModal = ({ visible, onClose, filters, onApply, searchQuery = '', }) => {
23
- const { t } = useTranslation();
24
- const { logs } = useInspector();
25
- const [draft, setDraft] = useState(() => ({
26
- ...filters,
27
- statusCodes: new Set(filters.statusCodes),
28
- methods: new Set(filters.methods),
29
- }));
30
- useEffect(() => {
31
- if (visible) {
32
- setDraft({
33
- ...filters,
34
- statusCodes: new Set(filters.statusCodes),
35
- methods: new Set(filters.methods),
36
- });
37
- }
38
- }, [visible, filters]);
39
- const counts = useMemo(() => {
40
- const statusMap = {
41
- all: logs.length,
42
- '2xx': 0,
43
- '3xx': 0,
44
- '4xx': 0,
45
- '5xx': 0,
46
- failed: 0,
47
- };
48
- const methodMap = { all: logs.length };
49
- let fastCount = 0;
50
- let normalCount = 0;
51
- let slowCount = 0;
52
- let httpsCount = 0;
53
- let httpCount = 0;
54
- for (const log of logs) {
55
- const s = typeof log.status === 'number' ? log.status : parseInt(String(log.status), 10);
56
- if (log.status === 0 || log.status == null) {
57
- statusMap.failed = (statusMap.failed || 0) + 1;
58
- }
59
- else if (!isNaN(s)) {
60
- if (s >= 200 && s < 300)
61
- statusMap['2xx'] = (statusMap['2xx'] || 0) + 1;
62
- else if (s >= 300 && s < 400)
63
- statusMap['3xx'] = (statusMap['3xx'] || 0) + 1;
64
- else if (s >= 400 && s < 500)
65
- statusMap['4xx'] = (statusMap['4xx'] || 0) + 1;
66
- else if (s >= 500)
67
- statusMap['5xx'] = (statusMap['5xx'] || 0) + 1;
68
- }
69
- const m = (log.method || 'GET').toUpperCase();
70
- methodMap[m] = (methodMap[m] || 0) + 1;
71
- const dur = log.duration || 0;
72
- if (dur < 200)
73
- fastCount++;
74
- else if (dur <= 500)
75
- normalCount++;
76
- else
77
- slowCount++;
78
- if ((log.url || '').toLowerCase().startsWith('https'))
79
- httpsCount++;
80
- else
81
- httpCount++;
82
- }
83
- return {
84
- statusMap,
85
- methodMap,
86
- fastCount,
87
- normalCount,
88
- slowCount,
89
- httpsCount,
90
- httpCount,
91
- };
92
- }, [logs]);
93
- const previewMatchCount = useMemo(() => {
94
- return logs.filter(log => {
95
- if (!draft.statusCodes.has('all') && draft.statusCodes.size > 0) {
96
- const s = typeof log.status === 'number' ? log.status : parseInt(String(log.status), 10);
97
- let matches = false;
98
- if (draft.statusCodes.has('failed') && (log.status === 0 || log.status == null))
99
- matches = true;
100
- if (draft.statusCodes.has('2xx') && !isNaN(s) && s >= 200 && s < 300)
101
- matches = true;
102
- if (draft.statusCodes.has('3xx') && !isNaN(s) && s >= 300 && s < 400)
103
- matches = true;
104
- if (draft.statusCodes.has('4xx') && !isNaN(s) && s >= 400 && s < 500)
105
- matches = true;
106
- if (draft.statusCodes.has('5xx') && !isNaN(s) && s >= 500)
107
- matches = true;
108
- if (!matches)
109
- return false;
110
- }
111
- if (!draft.methods.has('all') && draft.methods.size > 0) {
112
- const m = (log.method || 'GET').toUpperCase();
113
- if (!draft.methods.has(m))
114
- return false;
115
- }
116
- const dur = log.duration || 0;
117
- if (draft.latency === 'fast' && dur >= 200)
118
- return false;
119
- if (draft.latency === 'normal' && (dur < 200 || dur > 500))
120
- return false;
121
- if (draft.latency === 'slow' && dur <= 500)
122
- return false;
123
- const isHttps = (log.url || '').toLowerCase().startsWith('https');
124
- if (draft.protocol === 'https' && !isHttps)
125
- return false;
126
- if (draft.protocol === 'http' && isHttps)
127
- return false;
128
- if (searchQuery.trim().length > 0) {
129
- const q = searchQuery.toLowerCase();
130
- const u = (log.url || '').toLowerCase();
131
- if (!u.includes(q))
132
- return false;
133
- }
134
- return true;
135
- }).length;
136
- }, [logs, draft, searchQuery]);
137
- const toggleStatus = (key) => {
138
- setDraft(prev => {
139
- const next = new Set(prev.statusCodes);
140
- if (key === 'all') {
141
- return { ...prev, statusCodes: new Set(['all']) };
142
- }
143
- next.delete('all');
144
- if (next.has(key)) {
145
- next.delete(key);
146
- if (next.size === 0)
147
- next.add('all');
148
- }
149
- else {
150
- next.add(key);
151
- }
152
- return { ...prev, statusCodes: next };
153
- });
154
- };
155
- const toggleMethod = (key) => {
156
- setDraft(prev => {
157
- const next = new Set(prev.methods);
158
- if (key === 'all') {
159
- return { ...prev, methods: new Set(['all']) };
160
- }
161
- next.delete('all');
162
- if (next.has(key)) {
163
- next.delete(key);
164
- if (next.size === 0)
165
- next.add('all');
166
- }
167
- else {
168
- next.add(key);
169
- }
170
- return { ...prev, methods: next };
171
- });
172
- };
173
- const handleReset = () => {
174
- setDraft({
175
- statusCodes: new Set(['all']),
176
- methods: new Set(['all']),
177
- latency: 'all',
178
- protocol: 'all',
179
- sortBy: 'time_desc',
180
- });
181
- };
182
- const handleApply = () => {
183
- onApply(draft);
184
- onClose();
185
- };
186
- const activeFiltersCount = useMemo(() => {
187
- let count = 0;
188
- if (!draft.statusCodes.has('all') && draft.statusCodes.size > 0)
189
- count += draft.statusCodes.size;
190
- if (!draft.methods.has('all') && draft.methods.size > 0)
191
- count += draft.methods.size;
192
- if (draft.latency !== 'all')
193
- count++;
194
- if (draft.protocol !== 'all')
195
- count++;
196
- if (draft.sortBy !== 'time_desc')
197
- count++;
198
- return count;
199
- }, [draft]);
200
- return (<Modal visible={visible} transparent animationType="fade" onRequestClose={onClose}>
201
- <Pressable style={styles.overlay} onPress={onClose}>
202
- <Pressable style={styles.modalCard} onPress={e => e.stopPropagation()}>
1
+ import{useEffect as te,useMemo as N,useState as le}from"react";import{Modal as Ce,Pressable as Y,ScrollView as Te,StyleSheet as we,Text as S,TouchableOpacity as L,View as T}from"react-native";import{useInspector as me}from"./InspectorContext";import{AppColors as t}from"../../styles/AppColors";import{AppFonts as B}from"../../styles/AppFonts";import{useTranslation as ke}from"../../i18n";import{METHOD_COLORS as Se}from"../../constants";import{FilterIcon as Be,CloseWhite as Pe,ClockIcon as K,CircleCheckIcon as Ie,CircleAlertIcon as X,CircleXIcon as Oe,LayersIcon as A,RepeatIcon as ze,ShieldAlertIcon as Ve,BoltIcon as Re,GlobeIcon as Fe,LockIcon as Le,UnlockIcon as We,RocketIcon as Ee,TurtleIcon as Me,HourglassIcon as Ne,PackageIcon as Ae}from"../NetworkIcons";import J from"../TouchableScale";export const DEFAULT_NETWORK_FILTERS={statusCodes:new Set(["all"]),methods:new Set(["all"]),latency:"all",protocol:"all",sortBy:"time_desc"},isNetworkFiltersDefault=I=>(I.statusCodes.has("all")||I.statusCodes.size===0)&&(I.methods.has("all")||I.methods.size===0)&&I.latency==="all"&&I.protocol==="all"&&I.sortBy==="time_desc",NetworkFilterModal=({visible:I,onClose:E,filters:R,onApply:Z,searchQuery:M=""})=>{const{t:De}=ke(),{logs:W}=me(),[r,F]=le(()=>({...R,statusCodes:new Set(R.statusCodes),methods:new Set(R.methods)}));te(()=>{I&&F({...R,statusCodes:new Set(R.statusCodes),methods:new Set(R.methods)})},[I,R]);const P=N(()=>{const e={all:W.length,"2xx":0,"3xx":0,"4xx":0,"5xx":0,failed:0},l={all:W.length};let C=0,g=0,O=0,v=0,_=0;for(const z of W){const V=typeof z.status=="number"?z.status:parseInt(String(z.status),10);z.status===0||z.status==null?e.failed=(e.failed||0)+1:isNaN(V)||(V>=200&&V<300?e["2xx"]=(e["2xx"]||0)+1:V>=300&&V<400?e["3xx"]=(e["3xx"]||0)+1:V>=400&&V<500?e["4xx"]=(e["4xx"]||0)+1:V>=500&&(e["5xx"]=(e["5xx"]||0)+1));const U=(z.method||"GET").toUpperCase();l[U]=(l[U]||0)+1;const G=z.duration||0;G<200?C++:G<=500?g++:O++,(z.url||"").toLowerCase().startsWith("https")?v++:_++}return{statusMap:e,methodMap:l,fastCount:C,normalCount:g,slowCount:O,httpsCount:v,httpCount:_}},[W]),D=N(()=>W.filter(e=>{if(!r.statusCodes.has("all")&&r.statusCodes.size>0){const g=typeof e.status=="number"?e.status:parseInt(String(e.status),10);let O=!1;if(r.statusCodes.has("failed")&&(e.status===0||e.status==null)&&(O=!0),r.statusCodes.has("2xx")&&!isNaN(g)&&g>=200&&g<300&&(O=!0),r.statusCodes.has("3xx")&&!isNaN(g)&&g>=300&&g<400&&(O=!0),r.statusCodes.has("4xx")&&!isNaN(g)&&g>=400&&g<500&&(O=!0),r.statusCodes.has("5xx")&&!isNaN(g)&&g>=500&&(O=!0),!O)return!1}if(!r.methods.has("all")&&r.methods.size>0){const g=(e.method||"GET").toUpperCase();if(!r.methods.has(g))return!1}const l=e.duration||0;if(r.latency==="fast"&&l>=200||r.latency==="normal"&&(l<200||l>500)||r.latency==="slow"&&l<=500)return!1;const C=(e.url||"").toLowerCase().startsWith("https");if(r.protocol==="https"&&!C||r.protocol==="http"&&C)return!1;if(M.trim().length>0){const g=M.toLowerCase();if(!(e.url||"").toLowerCase().includes(g))return!1}return!0}).length,[W,r,M]),Q=e=>{F(l=>{const C=new Set(l.statusCodes);return e==="all"?{...l,statusCodes:new Set(["all"])}:(C.delete("all"),C.has(e)?(C.delete(e),C.size===0&&C.add("all")):C.add(e),{...l,statusCodes:C})})},H=e=>{F(l=>{const C=new Set(l.methods);return e==="all"?{...l,methods:new Set(["all"])}:(C.delete("all"),C.has(e)?(C.delete(e),C.size===0&&C.add("all")):C.add(e),{...l,methods:C})})},ee=()=>{F({statusCodes:new Set(["all"]),methods:new Set(["all"]),latency:"all",protocol:"all",sortBy:"time_desc"})},oe=()=>{Z(r),E()},$=N(()=>{let e=0;return!r.statusCodes.has("all")&&r.statusCodes.size>0&&(e+=r.statusCodes.size),!r.methods.has("all")&&r.methods.size>0&&(e+=r.methods.size),r.latency!=="all"&&e++,r.protocol!=="all"&&e++,r.sortBy!=="time_desc"&&e++,e},[r]);return<Ce visible={I}transparent animationType="fade"onRequestClose={E}>
2
+ <Y style={o.overlay}onPress={E}>
3
+ <Y style={o.modalCard}onPress={e=>e.stopPropagation()}>
203
4
 
204
- <View style={styles.header}>
205
- <View style={styles.headerLeft}>
206
- <View style={styles.iconCircle}>
207
- <FilterIcon size={16} color={AppColors.purple}/>
208
- </View>
209
- <View>
210
- <View style={{ flexDirection: 'row', alignItems: 'center', gap: 6 }}>
211
- <Text style={styles.title}>Network Filters</Text>
212
- {activeFiltersCount > 0 && (<View style={styles.activeBadge}>
213
- <Text style={styles.activeBadgeText}>{activeFiltersCount} active</Text>
214
- </View>)}
215
- </View>
216
- <Text style={styles.subtitle}>Filter requests by status, method & speed</Text>
217
- </View>
218
- </View>
219
- <TouchableOpacity onPress={onClose} hitSlop={10} style={styles.closeBtn}>
220
- <CloseWhite size={14} color={AppColors.grayText}/>
221
- </TouchableOpacity>
222
- </View>
5
+ <T style={o.header}>
6
+ <T style={o.headerLeft}>
7
+ <T style={o.iconCircle}>
8
+ <Be size={16}color={t.purple}/>
9
+ </T>
10
+ <T>
11
+ <T style={{flexDirection:"row",alignItems:"center",gap:6}}>
12
+ <S style={o.title}>Network Filters</S>
13
+ {$>0&&<T style={o.activeBadge}>
14
+ <S style={o.activeBadgeText}>{$} active</S>
15
+ </T>}
16
+ </T>
17
+ <S style={o.subtitle}>Filter requests by status, method & speed</S>
18
+ </T>
19
+ </T>
20
+ <L onPress={E}hitSlop={10}style={o.closeBtn}>
21
+ <Pe size={14}color={t.grayText}/>
22
+ </L>
23
+ </T>
223
24
 
224
- <ScrollView style={styles.scrollArea} contentContainerStyle={styles.scrollContent} showsVerticalScrollIndicator={false}>
25
+ <Te style={o.scrollArea}contentContainerStyle={o.scrollContent}showsVerticalScrollIndicator={!1}>
225
26
 
226
- <View style={styles.section}>
227
- <Text style={styles.sectionTitle}>HTTP STATUS CODE</Text>
228
- <View style={styles.chipsWrap}>
229
- {[
230
- { key: 'all', label: 'All Statuses', color: AppColors.purple, icon: LayersIcon, count: counts.statusMap.all },
231
- { key: '2xx', label: '2xx Success', color: AppColors.greenColor, icon: CircleCheckIcon, count: counts.statusMap['2xx'] || 0 },
232
- { key: '3xx', label: '3xx Redirect', color: AppColors.warningIconGold, icon: RepeatIcon, count: counts.statusMap['3xx'] || 0 },
233
- { key: '4xx', label: '4xx Client Error', color: AppColors.darkOrange, icon: CircleAlertIcon, count: counts.statusMap['4xx'] || 0 },
234
- { key: '5xx', label: '5xx Server Error', color: AppColors.errorColor, icon: CircleXIcon, count: counts.statusMap['5xx'] || 0 },
235
- { key: 'failed', label: 'Network Failed / 0', color: AppColors.errorColor, icon: ShieldAlertIcon, count: counts.statusMap.failed || 0 },
236
- ].map(item => {
237
- const isSelected = draft.statusCodes.has(item.key);
238
- const IconComp = item.icon;
239
- return (<TouchableOpacity key={item.key} activeOpacity={0.7} onPress={() => toggleStatus(item.key)} style={[
240
- styles.chip,
241
- isSelected && {
242
- backgroundColor: `${item.color}15`,
243
- borderColor: item.color,
244
- },
245
- ]}>
246
- <IconComp size={13} color={isSelected ? item.color : AppColors.grayTextWeak}/>
247
- <Text style={[
248
- styles.chipLabel,
249
- isSelected && { color: item.color, fontFamily: AppFonts.interBold },
250
- ]}>
251
- {item.label}
252
- </Text>
253
- <View style={[
254
- styles.countPill,
255
- isSelected && { backgroundColor: `${item.color}25` },
256
- ]}>
257
- <Text style={[
258
- styles.countPillText,
259
- isSelected && { color: item.color },
260
- ]}>
261
- {item.count}
262
- </Text>
263
- </View>
264
- </TouchableOpacity>);
265
- })}
266
- </View>
267
- </View>
27
+ <T style={o.section}>
28
+ <S style={o.sectionTitle}>HTTP STATUS CODE</S>
29
+ <T style={o.chipsWrap}>
30
+ {[{key:"all",label:"All Statuses",color:t.purple,icon:A,count:P.statusMap.all},{key:"2xx",label:"2xx Success",color:t.greenColor,icon:Ie,count:P.statusMap["2xx"]||0},{key:"3xx",label:"3xx Redirect",color:t.warningIconGold,icon:ze,count:P.statusMap["3xx"]||0},{key:"4xx",label:"4xx Client Error",color:t.darkOrange,icon:X,count:P.statusMap["4xx"]||0},{key:"5xx",label:"5xx Server Error",color:t.errorColor,icon:Oe,count:P.statusMap["5xx"]||0},{key:"failed",label:"Network Failed / 0",color:t.errorColor,icon:Ve,count:P.statusMap.failed||0}].map(e=>{const l=r.statusCodes.has(e.key),C=e.icon;return<L key={e.key}activeOpacity={.7}onPress={()=>Q(e.key)}style={[o.chip,l&&{backgroundColor:`${e.color}15`,borderColor:e.color}]}>
31
+ <C size={13}color={l?e.color:t.grayTextWeak}/>
32
+ <S style={[o.chipLabel,l&&{color:e.color,fontFamily:B.interBold}]}>
33
+ {e.label}
34
+ </S>
35
+ <T style={[o.countPill,l&&{backgroundColor:`${e.color}25`}]}>
36
+ <S style={[o.countPillText,l&&{color:e.color}]}>
37
+ {e.count}
38
+ </S>
39
+ </T>
40
+ </L>})}
41
+ </T>
42
+ </T>
268
43
 
269
44
 
270
- <View style={styles.section}>
271
- <Text style={styles.sectionTitle}>HTTP METHOD</Text>
272
- <View style={styles.chipsWrap}>
273
- <TouchableOpacity activeOpacity={0.7} onPress={() => toggleMethod('all')} style={[
274
- styles.chip,
275
- draft.methods.has('all') && {
276
- backgroundColor: `${AppColors.purple}15`,
277
- borderColor: AppColors.purple,
278
- },
279
- ]}>
280
- <LayersIcon size={12} color={draft.methods.has('all') ? AppColors.purple : AppColors.grayTextWeak}/>
281
- <Text style={[
282
- styles.chipLabel,
283
- draft.methods.has('all') && { color: AppColors.purple, fontFamily: AppFonts.interBold },
284
- ]}>
45
+ <T style={o.section}>
46
+ <S style={o.sectionTitle}>HTTP METHOD</S>
47
+ <T style={o.chipsWrap}>
48
+ <L activeOpacity={.7}onPress={()=>H("all")}style={[o.chip,r.methods.has("all")&&{backgroundColor:`${t.purple}15`,borderColor:t.purple}]}>
49
+ <A size={12}color={r.methods.has("all")?t.purple:t.grayTextWeak}/>
50
+ <S style={[o.chipLabel,r.methods.has("all")&&{color:t.purple,fontFamily:B.interBold}]}>
285
51
  All Methods
286
- </Text>
287
- <View style={[styles.countPill, draft.methods.has('all') && { backgroundColor: `${AppColors.purple}25` }]}>
288
- <Text style={[styles.countPillText, draft.methods.has('all') && { color: AppColors.purple }]}>
289
- {counts.methodMap.all}
290
- </Text>
291
- </View>
292
- </TouchableOpacity>
52
+ </S>
53
+ <T style={[o.countPill,r.methods.has("all")&&{backgroundColor:`${t.purple}25`}]}>
54
+ <S style={[o.countPillText,r.methods.has("all")&&{color:t.purple}]}>
55
+ {P.methodMap.all}
56
+ </S>
57
+ </T>
58
+ </L>
293
59
 
294
- {['GET', 'POST', 'PUT', 'DELETE', 'PATCH', 'QUERY', 'OPTIONS', 'HEAD'].map(m => {
295
- const isSelected = draft.methods.has(m);
296
- const mColor = METHOD_COLORS[m] || AppColors.grayText;
297
- const count = counts.methodMap[m] || 0;
298
- return (<TouchableOpacity key={m} activeOpacity={0.7} onPress={() => toggleMethod(m)} style={[
299
- styles.chip,
300
- isSelected && {
301
- backgroundColor: `${mColor}18`,
302
- borderColor: mColor,
303
- },
304
- ]}>
305
- <View style={[styles.methodDot, { backgroundColor: mColor }]}/>
306
- <Text style={[
307
- styles.chipLabel,
308
- isSelected && { color: mColor, fontFamily: AppFonts.interBold },
309
- ]}>
310
- {m}
311
- </Text>
312
- <View style={[
313
- styles.countPill,
314
- isSelected && { backgroundColor: `${mColor}25` },
315
- ]}>
316
- <Text style={[
317
- styles.countPillText,
318
- isSelected && { color: mColor },
319
- ]}>
320
- {count}
321
- </Text>
322
- </View>
323
- </TouchableOpacity>);
324
- })}
325
- </View>
326
- </View>
60
+ {["GET","POST","PUT","DELETE","PATCH","QUERY","OPTIONS","HEAD"].map(e=>{const l=r.methods.has(e),C=Se[e]||t.grayText,g=P.methodMap[e]||0;return<L key={e}activeOpacity={.7}onPress={()=>H(e)}style={[o.chip,l&&{backgroundColor:`${C}18`,borderColor:C}]}>
61
+ <T style={[o.methodDot,{backgroundColor:C}]}/>
62
+ <S style={[o.chipLabel,l&&{color:C,fontFamily:B.interBold}]}>
63
+ {e}
64
+ </S>
65
+ <T style={[o.countPill,l&&{backgroundColor:`${C}25`}]}>
66
+ <S style={[o.countPillText,l&&{color:C}]}>
67
+ {g}
68
+ </S>
69
+ </T>
70
+ </L>})}
71
+ </T>
72
+ </T>
327
73
 
328
74
 
329
- <View style={styles.section}>
330
- <Text style={styles.sectionTitle}>LATENCY & SPEED</Text>
331
- <View style={styles.chipsWrap}>
332
- {[
333
- { key: 'all', label: 'All Speeds', color: AppColors.purple, icon: LayersIcon },
334
- { key: 'fast', label: 'Fast (<200ms)', color: AppColors.greenColor, icon: BoltIcon, count: counts.fastCount },
335
- { key: 'normal', label: 'Normal (200-500ms)', color: AppColors.skyBlue, icon: ClockIcon, count: counts.normalCount },
336
- { key: 'slow', label: 'Slow (>500ms)', color: AppColors.errorColor, icon: CircleAlertIcon, count: counts.slowCount },
337
- ].map(item => {
338
- const isSelected = draft.latency === item.key;
339
- const IconComp = item.icon;
340
- return (<TouchableOpacity key={item.key} activeOpacity={0.7} onPress={() => setDraft(prev => ({ ...prev, latency: item.key }))} style={[
341
- styles.chip,
342
- isSelected && {
343
- backgroundColor: `${item.color}15`,
344
- borderColor: item.color,
345
- },
346
- ]}>
347
- <IconComp size={13} color={isSelected ? item.color : AppColors.grayTextWeak}/>
348
- <Text style={[
349
- styles.chipLabel,
350
- isSelected && { color: item.color, fontFamily: AppFonts.interBold },
351
- ]}>
352
- {item.label}
353
- </Text>
354
- {item.count != null && (<View style={[styles.countPill, isSelected && { backgroundColor: `${item.color}25` }]}>
355
- <Text style={[styles.countPillText, isSelected && { color: item.color }]}>
356
- {item.count}
357
- </Text>
358
- </View>)}
359
- </TouchableOpacity>);
360
- })}
361
- </View>
362
- </View>
75
+ <T style={o.section}>
76
+ <S style={o.sectionTitle}>LATENCY & SPEED</S>
77
+ <T style={o.chipsWrap}>
78
+ {[{key:"all",label:"All Speeds",color:t.purple,icon:A},{key:"fast",label:"Fast (<200ms)",color:t.greenColor,icon:Re,count:P.fastCount},{key:"normal",label:"Normal (200-500ms)",color:t.skyBlue,icon:K,count:P.normalCount},{key:"slow",label:"Slow (>500ms)",color:t.errorColor,icon:X,count:P.slowCount}].map(e=>{const l=r.latency===e.key,C=e.icon;return<L key={e.key}activeOpacity={.7}onPress={()=>F(g=>({...g,latency:e.key}))}style={[o.chip,l&&{backgroundColor:`${e.color}15`,borderColor:e.color}]}>
79
+ <C size={13}color={l?e.color:t.grayTextWeak}/>
80
+ <S style={[o.chipLabel,l&&{color:e.color,fontFamily:B.interBold}]}>
81
+ {e.label}
82
+ </S>
83
+ {e.count!=null&&<T style={[o.countPill,l&&{backgroundColor:`${e.color}25`}]}>
84
+ <S style={[o.countPillText,l&&{color:e.color}]}>
85
+ {e.count}
86
+ </S>
87
+ </T>}
88
+ </L>})}
89
+ </T>
90
+ </T>
363
91
 
364
92
 
365
- <View style={styles.section}>
366
- <Text style={styles.sectionTitle}>PROTOCOL</Text>
367
- <View style={styles.chipsWrap}>
368
- {[
369
- { key: 'all', label: 'All Protocols', color: AppColors.purple, icon: GlobeIcon },
370
- { key: 'https', label: 'HTTPS Secure', color: AppColors.mintGreenText, icon: LockIcon, count: counts.httpsCount },
371
- { key: 'http', label: 'HTTP Insecure', color: AppColors.amber700, icon: UnlockIcon, count: counts.httpCount },
372
- ].map(item => {
373
- const isSelected = draft.protocol === item.key;
374
- const IconComp = item.icon;
375
- return (<TouchableOpacity key={item.key} activeOpacity={0.7} onPress={() => setDraft(prev => ({ ...prev, protocol: item.key }))} style={[
376
- styles.chip,
377
- isSelected && {
378
- backgroundColor: `${item.color}15`,
379
- borderColor: item.color,
380
- },
381
- ]}>
382
- <IconComp size={13} color={isSelected ? item.color : AppColors.grayTextWeak}/>
383
- <Text style={[
384
- styles.chipLabel,
385
- isSelected && { color: item.color, fontFamily: AppFonts.interBold },
386
- ]}>
387
- {item.label}
388
- </Text>
389
- {item.count != null && (<View style={[styles.countPill, isSelected && { backgroundColor: `${item.color}25` }]}>
390
- <Text style={[styles.countPillText, isSelected && { color: item.color }]}>
391
- {item.count}
392
- </Text>
393
- </View>)}
394
- </TouchableOpacity>);
395
- })}
396
- </View>
397
- </View>
93
+ <T style={o.section}>
94
+ <S style={o.sectionTitle}>PROTOCOL</S>
95
+ <T style={o.chipsWrap}>
96
+ {[{key:"all",label:"All Protocols",color:t.purple,icon:Fe},{key:"https",label:"HTTPS Secure",color:t.mintGreenText,icon:Le,count:P.httpsCount},{key:"http",label:"HTTP Insecure",color:t.amber700,icon:We,count:P.httpCount}].map(e=>{const l=r.protocol===e.key,C=e.icon;return<L key={e.key}activeOpacity={.7}onPress={()=>F(g=>({...g,protocol:e.key}))}style={[o.chip,l&&{backgroundColor:`${e.color}15`,borderColor:e.color}]}>
97
+ <C size={13}color={l?e.color:t.grayTextWeak}/>
98
+ <S style={[o.chipLabel,l&&{color:e.color,fontFamily:B.interBold}]}>
99
+ {e.label}
100
+ </S>
101
+ {e.count!=null&&<T style={[o.countPill,l&&{backgroundColor:`${e.color}25`}]}>
102
+ <S style={[o.countPillText,l&&{color:e.color}]}>
103
+ {e.count}
104
+ </S>
105
+ </T>}
106
+ </L>})}
107
+ </T>
108
+ </T>
398
109
 
399
110
 
400
- <View style={styles.section}>
401
- <Text style={styles.sectionTitle}>SORT BY</Text>
402
- <View style={styles.chipsWrap}>
403
- {[
404
- { key: 'time_desc', label: 'Newest First (Default)', icon: ClockIcon },
405
- { key: 'time_asc', label: 'Oldest First', icon: HourglassIcon },
406
- { key: 'duration_desc', label: 'Slowest Response', icon: TurtleIcon },
407
- { key: 'duration_asc', label: 'Fastest Response', icon: RocketIcon },
408
- { key: 'size_desc', label: 'Largest Response Size', icon: PackageIcon },
409
- ].map(item => {
410
- const isSelected = draft.sortBy === item.key;
411
- const IconComp = item.icon;
412
- return (<TouchableOpacity key={item.key} activeOpacity={0.7} onPress={() => setDraft(prev => ({ ...prev, sortBy: item.key }))} style={[
413
- styles.chip,
414
- isSelected && {
415
- backgroundColor: `${AppColors.purple}15`,
416
- borderColor: AppColors.purple,
417
- },
418
- ]}>
419
- <IconComp size={13} color={isSelected ? AppColors.purple : AppColors.grayTextWeak}/>
420
- <Text style={[
421
- styles.chipLabel,
422
- isSelected && { color: AppColors.purple, fontFamily: AppFonts.interBold },
423
- ]}>
424
- {item.label}
425
- </Text>
426
- </TouchableOpacity>);
427
- })}
428
- </View>
429
- </View>
430
- </ScrollView>
111
+ <T style={o.section}>
112
+ <S style={o.sectionTitle}>SORT BY</S>
113
+ <T style={o.chipsWrap}>
114
+ {[{key:"time_desc",label:"Newest First (Default)",icon:K},{key:"time_asc",label:"Oldest First",icon:Ne},{key:"duration_desc",label:"Slowest Response",icon:Me},{key:"duration_asc",label:"Fastest Response",icon:Ee},{key:"size_desc",label:"Largest Response Size",icon:Ae}].map(e=>{const l=r.sortBy===e.key,C=e.icon;return<L key={e.key}activeOpacity={.7}onPress={()=>F(g=>({...g,sortBy:e.key}))}style={[o.chip,l&&{backgroundColor:`${t.purple}15`,borderColor:t.purple}]}>
115
+ <C size={13}color={l?t.purple:t.grayTextWeak}/>
116
+ <S style={[o.chipLabel,l&&{color:t.purple,fontFamily:B.interBold}]}>
117
+ {e.label}
118
+ </S>
119
+ </L>})}
120
+ </T>
121
+ </T>
122
+ </Te>
431
123
 
432
124
 
433
- <View style={styles.footer}>
434
- <TouchableScale onPress={handleReset} style={styles.resetBtn}>
435
- <Text style={styles.resetBtnText}>Reset All</Text>
436
- </TouchableScale>
125
+ <T style={o.footer}>
126
+ <J onPress={ee}style={o.resetBtn}>
127
+ <S style={o.resetBtnText}>Reset All</S>
128
+ </J>
437
129
 
438
- <TouchableScale onPress={handleApply} style={styles.applyBtn}>
439
- <Text style={styles.applyBtnText}>
440
- Apply ({previewMatchCount} Request{previewMatchCount === 1 ? '' : 's'})
441
- </Text>
442
- </TouchableScale>
443
- </View>
444
- </Pressable>
445
- </Pressable>
446
- </Modal>);
447
- };
448
- const styles = StyleSheet.create({
449
- overlay: {
450
- flex: 1,
451
- backgroundColor: 'rgba(0, 0, 0, 0.55)',
452
- justifyContent: 'flex-end',
453
- },
454
- modalCard: {
455
- backgroundColor: AppColors.primaryLight,
456
- borderTopLeftRadius: 20,
457
- borderTopRightRadius: 20,
458
- maxHeight: '85%',
459
- shadowColor: AppColors.black,
460
- shadowOffset: { width: 0, height: -4 },
461
- shadowOpacity: 0.15,
462
- shadowRadius: 10,
463
- elevation: 8,
464
- },
465
- header: {
466
- flexDirection: 'row',
467
- alignItems: 'center',
468
- justifyContent: 'space-between',
469
- paddingHorizontal: 16,
470
- paddingTop: 16,
471
- paddingBottom: 12,
472
- borderBottomWidth: 1,
473
- borderBottomColor: AppColors.grayBorderSecondary,
474
- },
475
- headerLeft: {
476
- flexDirection: 'row',
477
- alignItems: 'center',
478
- gap: 10,
479
- flex: 1,
480
- },
481
- iconCircle: {
482
- width: 34,
483
- height: 34,
484
- borderRadius: 10,
485
- backgroundColor: `${AppColors.purple}15`,
486
- alignItems: 'center',
487
- justifyContent: 'center',
488
- },
489
- title: {
490
- fontFamily: AppFonts.interBold,
491
- fontSize: 16,
492
- color: AppColors.primaryBlack,
493
- },
494
- subtitle: {
495
- fontFamily: AppFonts.interRegular,
496
- fontSize: 11,
497
- color: AppColors.grayText,
498
- marginTop: 1,
499
- },
500
- activeBadge: {
501
- backgroundColor: `${AppColors.purple}20`,
502
- paddingHorizontal: 6,
503
- paddingVertical: 1.5,
504
- borderRadius: 8,
505
- borderWidth: 1,
506
- borderColor: `${AppColors.purple}40`,
507
- },
508
- activeBadgeText: {
509
- fontFamily: AppFonts.interBold,
510
- fontSize: 9.5,
511
- color: AppColors.purple,
512
- },
513
- closeBtn: {
514
- padding: 6,
515
- },
516
- scrollArea: {
517
- maxHeight: 460,
518
- },
519
- scrollContent: {
520
- padding: 16,
521
- gap: 16,
522
- },
523
- section: {
524
- gap: 8,
525
- },
526
- sectionTitle: {
527
- fontFamily: AppFonts.interBold,
528
- fontSize: 11,
529
- color: AppColors.grayTextWeak,
530
- letterSpacing: 0.8,
531
- },
532
- chipsWrap: {
533
- flexDirection: 'row',
534
- flexWrap: 'wrap',
535
- gap: 8,
536
- },
537
- chip: {
538
- flexDirection: 'row',
539
- alignItems: 'center',
540
- gap: 6,
541
- paddingHorizontal: 10,
542
- paddingVertical: 6,
543
- borderRadius: 8,
544
- backgroundColor: AppColors.grayBackground,
545
- borderWidth: 1,
546
- borderColor: AppColors.grayBorderSecondary,
547
- },
548
- chipLabel: {
549
- fontFamily: AppFonts.interMedium,
550
- fontSize: 12,
551
- color: AppColors.primaryBlack,
552
- },
553
- methodDot: {
554
- width: 6.5,
555
- height: 6.5,
556
- borderRadius: 3.5,
557
- },
558
- countPill: {
559
- backgroundColor: `${AppColors.grayBorderSecondary}50`,
560
- paddingHorizontal: 5,
561
- paddingVertical: 1,
562
- borderRadius: 6,
563
- },
564
- countPillText: {
565
- fontFamily: AppFonts.interBold,
566
- fontSize: 9.5,
567
- color: AppColors.grayText,
568
- },
569
- footer: {
570
- flexDirection: 'row',
571
- alignItems: 'center',
572
- gap: 10,
573
- paddingHorizontal: 16,
574
- paddingVertical: 14,
575
- borderTopWidth: 1,
576
- borderTopColor: AppColors.grayBorderSecondary,
577
- backgroundColor: AppColors.primaryLight,
578
- },
579
- resetBtn: {
580
- flex: 1,
581
- paddingVertical: 11,
582
- borderRadius: 10,
583
- borderWidth: 1,
584
- borderColor: AppColors.grayBorderSecondary,
585
- alignItems: 'center',
586
- justifyContent: 'center',
587
- backgroundColor: AppColors.grayBackground,
588
- },
589
- resetBtnText: {
590
- fontFamily: AppFonts.interBold,
591
- fontSize: 13,
592
- color: AppColors.grayTextStrong,
593
- },
594
- applyBtn: {
595
- flex: 2,
596
- paddingVertical: 11,
597
- borderRadius: 10,
598
- alignItems: 'center',
599
- justifyContent: 'center',
600
- backgroundColor: AppColors.purple,
601
- shadowColor: AppColors.purple,
602
- shadowOffset: { width: 0, height: 2 },
603
- shadowOpacity: 0.25,
604
- shadowRadius: 4,
605
- elevation: 3,
606
- },
607
- applyBtnText: {
608
- fontFamily: AppFonts.interBold,
609
- fontSize: 13,
610
- color: AppColors.white,
611
- },
612
- });
613
- export default NetworkFilterModal;
130
+ <J onPress={oe}style={o.applyBtn}>
131
+ <S style={o.applyBtnText}>
132
+ Apply ({D} Request{D===1?"":"s"})
133
+ </S>
134
+ </J>
135
+ </T>
136
+ </Y>
137
+ </Y>
138
+ </Ce>};const o=we.create({overlay:{flex:1,backgroundColor:"rgba(0, 0, 0, 0.55)",justifyContent:"flex-end"},modalCard:{backgroundColor:t.primaryLight,borderTopLeftRadius:20,borderTopRightRadius:20,maxHeight:"85%",shadowColor:t.black,shadowOffset:{width:0,height:-4},shadowOpacity:.15,shadowRadius:10,elevation:8},header:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",paddingHorizontal:16,paddingTop:16,paddingBottom:12,borderBottomWidth:1,borderBottomColor:t.grayBorderSecondary},headerLeft:{flexDirection:"row",alignItems:"center",gap:10,flex:1},iconCircle:{width:34,height:34,borderRadius:10,backgroundColor:`${t.purple}15`,alignItems:"center",justifyContent:"center"},title:{fontFamily:B.interBold,fontSize:16,color:t.primaryBlack},subtitle:{fontFamily:B.interRegular,fontSize:11,color:t.grayText,marginTop:1},activeBadge:{backgroundColor:`${t.purple}20`,paddingHorizontal:6,paddingVertical:1.5,borderRadius:8,borderWidth:1,borderColor:`${t.purple}40`},activeBadgeText:{fontFamily:B.interBold,fontSize:9.5,color:t.purple},closeBtn:{padding:6},scrollArea:{maxHeight:460},scrollContent:{padding:16,gap:16},section:{gap:8},sectionTitle:{fontFamily:B.interBold,fontSize:11,color:t.grayTextWeak,letterSpacing:.8},chipsWrap:{flexDirection:"row",flexWrap:"wrap",gap:8},chip:{flexDirection:"row",alignItems:"center",gap:6,paddingHorizontal:10,paddingVertical:6,borderRadius:8,backgroundColor:t.grayBackground,borderWidth:1,borderColor:t.grayBorderSecondary},chipLabel:{fontFamily:B.interMedium,fontSize:12,color:t.primaryBlack},methodDot:{width:6.5,height:6.5,borderRadius:3.5},countPill:{backgroundColor:`${t.grayBorderSecondary}50`,paddingHorizontal:5,paddingVertical:1,borderRadius:6},countPillText:{fontFamily:B.interBold,fontSize:9.5,color:t.grayText},footer:{flexDirection:"row",alignItems:"center",gap:10,paddingHorizontal:16,paddingVertical:14,borderTopWidth:1,borderTopColor:t.grayBorderSecondary,backgroundColor:t.primaryLight},resetBtn:{flex:1,paddingVertical:11,borderRadius:10,borderWidth:1,borderColor:t.grayBorderSecondary,alignItems:"center",justifyContent:"center",backgroundColor:t.grayBackground},resetBtnText:{fontFamily:B.interBold,fontSize:13,color:t.grayTextStrong},applyBtn:{flex:2,paddingVertical:11,borderRadius:10,alignItems:"center",justifyContent:"center",backgroundColor:t.purple,shadowColor:t.purple,shadowOffset:{width:0,height:2},shadowOpacity:.25,shadowRadius:4,elevation:3},applyBtnText:{fontFamily:B.interBold,fontSize:13,color:t.white}});export default NetworkFilterModal;