react-native-inapp-inspector 2.3.19 → 2.3.21

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 (353) hide show
  1. package/README.md +14 -14
  2. package/android/src/main/java/com/inappinspector/NetworkInspectorModule.kt +67 -0
  3. package/dist/commonjs/analytics.js +1 -24
  4. package/dist/commonjs/bundle.js +1 -16
  5. package/dist/commonjs/capture.js +1 -35
  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.js +10 -87
  19. package/dist/commonjs/components/EndOfListFooter.js +7 -81
  20. package/dist/commonjs/components/ErrorBoundary.js +72 -566
  21. package/dist/commonjs/components/HeadersSection.js +31 -110
  22. package/dist/commonjs/components/HighlightText.js +17 -58
  23. package/dist/commonjs/components/Inspector/AboutModal.d.ts +6 -0
  24. package/dist/commonjs/components/Inspector/AboutModal.js +243 -0
  25. package/dist/commonjs/components/Inspector/AnalyticsFilterModal.js +98 -797
  26. package/dist/commonjs/components/Inspector/AnalyticsTab.js +284 -930
  27. package/dist/commonjs/components/Inspector/BundleTab.js +551 -2918
  28. package/dist/commonjs/components/Inspector/ConsoleTab.js +79 -492
  29. package/dist/commonjs/components/Inspector/CrashDetail.js +123 -672
  30. package/dist/commonjs/components/Inspector/CrashFilterModal.js +66 -498
  31. package/dist/commonjs/components/Inspector/CrashTab.js +98 -670
  32. package/dist/commonjs/components/Inspector/DebuggingTab.js +74 -875
  33. package/dist/commonjs/components/Inspector/DeviceInfoTab.js +143 -907
  34. package/dist/commonjs/components/Inspector/FabLauncher.js +42 -466
  35. package/dist/commonjs/components/Inspector/FeatureUnderDevNotice.js +6 -99
  36. package/dist/commonjs/components/Inspector/InspectorContext.js +1 -21
  37. package/dist/commonjs/components/Inspector/InspectorHeader.js +191 -1110
  38. package/dist/commonjs/components/Inspector/LogDetail.js +168 -994
  39. package/dist/commonjs/components/Inspector/MainScreen.js +52 -335
  40. package/dist/commonjs/components/Inspector/MediaGalleryTab.js +97 -644
  41. package/dist/commonjs/components/Inspector/MediaPreviewModal.js +90 -605
  42. package/dist/commonjs/components/Inspector/NavigationTracker.js +1 -12
  43. package/dist/commonjs/components/Inspector/NetworkDetail.js +89 -411
  44. package/dist/commonjs/components/Inspector/NetworkFilterModal.js +60 -576
  45. package/dist/commonjs/components/Inspector/NetworkTab.js +84 -514
  46. package/dist/commonjs/components/Inspector/NpmStarPrompt.js +18 -434
  47. package/dist/commonjs/components/Inspector/NpmUpdateToast.js +25 -298
  48. package/dist/commonjs/components/Inspector/PerformanceTab.js +182 -1397
  49. package/dist/commonjs/components/Inspector/ReduxDetail.js +188 -1089
  50. package/dist/commonjs/components/Inspector/ReduxTab.js +85 -701
  51. package/dist/commonjs/components/Inspector/SettingsPanel.js +427 -3807
  52. package/dist/commonjs/components/Inspector/SkeletonPlaceholder.js +11 -180
  53. package/dist/commonjs/components/Inspector/StorageTab.js +93 -826
  54. package/dist/commonjs/components/Inspector/TabBar.js +36 -334
  55. package/dist/commonjs/components/Inspector/UpdateAvailableModal.js +37 -412
  56. package/dist/commonjs/components/JsonViewer.js +168 -381
  57. package/dist/commonjs/components/LogCard.js +57 -567
  58. package/dist/commonjs/components/LogSyntaxHighlighter.js +11 -130
  59. package/dist/commonjs/components/MetaAccordion.js +69 -238
  60. package/dist/commonjs/components/MiniBarChart.js +3 -56
  61. package/dist/commonjs/components/MiniLineChart.js +3 -58
  62. package/dist/commonjs/components/NetworkIcons.d.ts +13 -0
  63. package/dist/commonjs/components/NetworkIcons.js +521 -1022
  64. package/dist/commonjs/components/QRCodeView.js +5 -79
  65. package/dist/commonjs/components/SectionHeader.js +15 -37
  66. package/dist/commonjs/components/SegmentedTabs.js +7 -62
  67. package/dist/commonjs/components/SkeletonPlaceholder.js +11 -180
  68. package/dist/commonjs/components/Slider.js +15 -243
  69. package/dist/commonjs/components/SourcePageCard.js +30 -89
  70. package/dist/commonjs/components/Toast.js +5 -147
  71. package/dist/commonjs/components/TouchableScale.js +3 -24
  72. package/dist/commonjs/components/TreeNode.js +55 -130
  73. package/dist/commonjs/console.js +1 -16
  74. package/dist/commonjs/constants/index.js +1 -32
  75. package/dist/commonjs/constants/telemetryConfig.js +1 -6
  76. package/dist/commonjs/constants/version.d.ts +1 -1
  77. package/dist/commonjs/constants/version.js +1 -4
  78. package/dist/commonjs/crash.js +1 -23
  79. package/dist/commonjs/customHooks/analyticsLogger.js +1 -250
  80. package/dist/commonjs/customHooks/bundleAnalyzer.js +1 -957
  81. package/dist/commonjs/customHooks/consoleLogger.js +6 -445
  82. package/dist/commonjs/customHooks/crashHandler.js +7 -656
  83. package/dist/commonjs/customHooks/logFilters.js +1 -23
  84. package/dist/commonjs/customHooks/networkLogger.js +2 -536
  85. package/dist/commonjs/customHooks/performanceTracker.js +63 -750
  86. package/dist/commonjs/customHooks/reduxLogger.js +2 -313
  87. package/dist/commonjs/customHooks/storageInspector.js +1 -435
  88. package/dist/commonjs/customHooks/useAccordion.js +1 -18
  89. package/dist/commonjs/decorators/index.js +1 -100
  90. package/dist/commonjs/helpers/gaAnalyticsRegistry.js +1 -148
  91. package/dist/commonjs/helpers/index.d.ts +1 -0
  92. package/dist/commonjs/helpers/index.js +8 -921
  93. package/dist/commonjs/helpers/memoryManager.js +1 -99
  94. package/dist/commonjs/helpers/qrGenerator.js +1 -367
  95. package/dist/commonjs/helpers/remoteConfig.js +1 -165
  96. package/dist/commonjs/helpers/searchQueryParser.js +1 -62
  97. package/dist/commonjs/helpers/settingsStore.js +1 -144
  98. package/dist/commonjs/helpers/telemetry.js +1 -501
  99. package/dist/commonjs/helpers/toast.js +1 -20
  100. package/dist/commonjs/i18n/index.js +1 -90
  101. package/dist/commonjs/i18n/locales/en.json +1 -1140
  102. package/dist/commonjs/index.js +5 -2168
  103. package/dist/commonjs/metro.js +6 -468
  104. package/dist/commonjs/native/NativeInspector.d.ts +1 -0
  105. package/dist/commonjs/native/NativeInspector.js +1 -415
  106. package/dist/commonjs/native/NativeNetworkInspector.js +1 -4
  107. package/dist/commonjs/network.js +1 -13
  108. package/dist/commonjs/performance.js +1 -29
  109. package/dist/commonjs/redux.js +1 -20
  110. package/dist/commonjs/storage.js +1 -14
  111. package/dist/commonjs/styles/AppColors.js +1 -423
  112. package/dist/commonjs/styles/AppFonts.js +1 -17
  113. package/dist/commonjs/styles/common.js +1 -190
  114. package/dist/commonjs/styles/index.d.ts +6 -0
  115. package/dist/commonjs/styles/index.js +1 -1589
  116. package/dist/commonjs/types/enums.d.ts +0 -1
  117. package/dist/commonjs/types/enums.js +1 -152
  118. package/dist/commonjs/types/index.js +1 -18
  119. package/dist/commonjs/types/interfaces.d.ts +2 -2
  120. package/dist/commonjs/types/interfaces.js +1 -2
  121. package/dist/esm/analytics.js +1 -2
  122. package/dist/esm/bundle.js +1 -2
  123. package/dist/esm/capture.js +1 -32
  124. package/dist/esm/components/AnalyticsDetail.js +171 -664
  125. package/dist/esm/components/AnalyticsEventCard.js +77 -335
  126. package/dist/esm/components/AnalyticsGraph.js +95 -357
  127. package/dist/esm/components/AnimatedEntrance.js +1 -6
  128. package/dist/esm/components/AppHeaderLogo.js +7 -94
  129. package/dist/esm/components/BrandCircleIcon.js +114 -119
  130. package/dist/esm/components/BrandSquareIcon.js +73 -78
  131. package/dist/esm/components/CodeSnippet.js +58 -595
  132. package/dist/esm/components/ConsoleLogCard.js +91 -526
  133. package/dist/esm/components/CopyButton.js +3 -51
  134. package/dist/esm/components/DiffViewer.js +22 -48
  135. package/dist/esm/components/DomainHeader.js +43 -138
  136. package/dist/esm/components/EmptyState.js +17 -56
  137. package/dist/esm/components/EndOfListFooter.js +15 -83
  138. package/dist/esm/components/ErrorBoundary.js +125 -582
  139. package/dist/esm/components/HeadersSection.js +52 -93
  140. package/dist/esm/components/HighlightText.js +17 -53
  141. package/dist/esm/components/Inspector/AboutModal.d.ts +6 -0
  142. package/dist/esm/components/Inspector/AboutModal.js +243 -0
  143. package/dist/esm/components/Inspector/AnalyticsFilterModal.js +225 -886
  144. package/dist/esm/components/Inspector/AnalyticsTab.js +296 -904
  145. package/dist/esm/components/Inspector/BundleTab.js +1175 -3502
  146. package/dist/esm/components/Inspector/ConsoleTab.js +113 -488
  147. package/dist/esm/components/Inspector/CrashDetail.js +236 -747
  148. package/dist/esm/components/Inspector/CrashFilterModal.js +149 -541
  149. package/dist/esm/components/Inspector/CrashTab.js +177 -711
  150. package/dist/esm/components/Inspector/DebuggingTab.js +164 -925
  151. package/dist/esm/components/Inspector/DeviceInfoTab.js +199 -924
  152. package/dist/esm/components/Inspector/FabLauncher.js +68 -454
  153. package/dist/esm/components/Inspector/FeatureUnderDevNotice.js +14 -70
  154. package/dist/esm/components/Inspector/InspectorContext.js +1 -12
  155. package/dist/esm/components/Inspector/InspectorHeader.js +282 -1163
  156. package/dist/esm/components/Inspector/LogDetail.js +235 -1023
  157. package/dist/esm/components/Inspector/MainScreen.js +78 -323
  158. package/dist/esm/components/Inspector/MediaGalleryTab.js +143 -650
  159. package/dist/esm/components/Inspector/MediaPreviewModal.js +138 -613
  160. package/dist/esm/components/Inspector/NavigationTracker.js +1 -10
  161. package/dist/esm/components/Inspector/NetworkDetail.js +138 -455
  162. package/dist/esm/components/Inspector/NetworkFilterModal.js +122 -597
  163. package/dist/esm/components/Inspector/NetworkTab.js +125 -517
  164. package/dist/esm/components/Inspector/NpmStarPrompt.js +58 -434
  165. package/dist/esm/components/Inspector/NpmUpdateToast.js +45 -281
  166. package/dist/esm/components/Inspector/PerformanceTab.js +393 -1570
  167. package/dist/esm/components/Inspector/ReduxDetail.js +307 -1170
  168. package/dist/esm/components/Inspector/ReduxTab.js +144 -722
  169. package/dist/esm/components/Inspector/SettingsPanel.js +643 -3985
  170. package/dist/esm/components/Inspector/SkeletonPlaceholder.js +30 -163
  171. package/dist/esm/components/Inspector/StorageTab.js +172 -866
  172. package/dist/esm/components/Inspector/TabBar.js +45 -305
  173. package/dist/esm/components/Inspector/UpdateAvailableModal.js +80 -418
  174. package/dist/esm/components/JsonViewer.js +179 -354
  175. package/dist/esm/components/LogCard.js +93 -565
  176. package/dist/esm/components/LogSyntaxHighlighter.js +11 -123
  177. package/dist/esm/components/MetaAccordion.js +136 -267
  178. package/dist/esm/components/MiniBarChart.js +3 -18
  179. package/dist/esm/components/MiniLineChart.js +3 -20
  180. package/dist/esm/components/NetworkIcons.d.ts +13 -0
  181. package/dist/esm/components/NetworkIcons.js +523 -838
  182. package/dist/esm/components/QRCodeView.js +8 -45
  183. package/dist/esm/components/SectionHeader.js +22 -39
  184. package/dist/esm/components/SegmentedTabs.js +8 -58
  185. package/dist/esm/components/SkeletonPlaceholder.js +30 -163
  186. package/dist/esm/components/Slider.js +24 -213
  187. package/dist/esm/components/SourcePageCard.js +65 -86
  188. package/dist/esm/components/Toast.js +10 -117
  189. package/dist/esm/components/TouchableScale.js +3 -19
  190. package/dist/esm/components/TreeNode.js +58 -95
  191. package/dist/esm/console.js +1 -2
  192. package/dist/esm/constants/index.js +1 -28
  193. package/dist/esm/constants/telemetryConfig.js +1 -3
  194. package/dist/esm/constants/version.d.ts +1 -1
  195. package/dist/esm/constants/version.js +1 -1
  196. package/dist/esm/crash.js +1 -2
  197. package/dist/esm/customHooks/analyticsLogger.js +1 -230
  198. package/dist/esm/customHooks/bundleAnalyzer.js +1 -944
  199. package/dist/esm/customHooks/consoleLogger.js +6 -432
  200. package/dist/esm/customHooks/crashHandler.js +7 -630
  201. package/dist/esm/customHooks/logFilters.js +1 -20
  202. package/dist/esm/customHooks/networkLogger.js +2 -519
  203. package/dist/esm/customHooks/performanceTracker.js +63 -723
  204. package/dist/esm/customHooks/reduxLogger.js +2 -293
  205. package/dist/esm/customHooks/storageInspector.js +1 -418
  206. package/dist/esm/customHooks/useAccordion.js +1 -16
  207. package/dist/esm/decorators/index.js +1 -95
  208. package/dist/esm/helpers/gaAnalyticsRegistry.js +1 -143
  209. package/dist/esm/helpers/index.d.ts +1 -0
  210. package/dist/esm/helpers/index.js +8 -861
  211. package/dist/esm/helpers/memoryManager.js +1 -91
  212. package/dist/esm/helpers/qrGenerator.js +1 -364
  213. package/dist/esm/helpers/remoteConfig.js +1 -160
  214. package/dist/esm/helpers/searchQueryParser.js +1 -59
  215. package/dist/esm/helpers/settingsStore.js +1 -134
  216. package/dist/esm/helpers/telemetry.js +1 -489
  217. package/dist/esm/helpers/toast.js +1 -15
  218. package/dist/esm/i18n/index.js +1 -78
  219. package/dist/esm/i18n/locales/en.json +1 -1140
  220. package/dist/esm/index.js +7 -1982
  221. package/dist/esm/metro.js +6 -459
  222. package/dist/esm/native/NativeInspector.d.ts +1 -0
  223. package/dist/esm/native/NativeInspector.js +1 -382
  224. package/dist/esm/native/NativeNetworkInspector.js +1 -2
  225. package/dist/esm/network.js +1 -1
  226. package/dist/esm/performance.js +1 -2
  227. package/dist/esm/redux.js +1 -1
  228. package/dist/esm/storage.js +1 -1
  229. package/dist/esm/styles/AppColors.js +1 -417
  230. package/dist/esm/styles/AppFonts.js +1 -13
  231. package/dist/esm/styles/common.js +1 -186
  232. package/dist/esm/styles/index.d.ts +6 -0
  233. package/dist/esm/styles/index.js +1 -1551
  234. package/dist/esm/types/enums.d.ts +0 -1
  235. package/dist/esm/types/enums.js +1 -149
  236. package/dist/esm/types/index.js +1 -2
  237. package/dist/esm/types/interfaces.d.ts +2 -2
  238. package/dist/esm/types/interfaces.js +1 -1
  239. package/ios/NetworkInspectorModule.mm +60 -12
  240. package/package.json +5 -3
  241. package/src/native/NativeInspector.ts +18 -0
  242. package/dist/commonjs/components/Inspector/FeedbackModal.d.ts +0 -7
  243. package/dist/commonjs/components/Inspector/FeedbackModal.js +0 -552
  244. package/dist/esm/components/Inspector/FeedbackModal.d.ts +0 -7
  245. package/dist/esm/components/Inspector/FeedbackModal.js +0 -515
  246. package/src/analytics.ts +0 -35
  247. package/src/bundle.ts +0 -25
  248. package/src/capture.ts +0 -109
  249. package/src/components/AnalyticsDetail.tsx +0 -870
  250. package/src/components/AnalyticsEventCard.tsx +0 -444
  251. package/src/components/AnalyticsGraph.tsx +0 -583
  252. package/src/components/AnimatedEntrance.tsx +0 -20
  253. package/src/components/AppHeaderLogo.tsx +0 -143
  254. package/src/components/BrandCircleIcon.tsx +0 -144
  255. package/src/components/BrandSquareIcon.tsx +0 -184
  256. package/src/components/CodeSnippet.tsx +0 -725
  257. package/src/components/ConsoleLogCard.tsx +0 -679
  258. package/src/components/CopyButton.tsx +0 -87
  259. package/src/components/DiffViewer.tsx +0 -82
  260. package/src/components/DomainHeader.tsx +0 -224
  261. package/src/components/EmptyState.tsx +0 -97
  262. package/src/components/EndOfListFooter.tsx +0 -100
  263. package/src/components/ErrorBoundary.tsx +0 -688
  264. package/src/components/HeadersSection.tsx +0 -172
  265. package/src/components/HighlightText.tsx +0 -100
  266. package/src/components/Inspector/AnalyticsFilterModal.tsx +0 -1250
  267. package/src/components/Inspector/AnalyticsTab.tsx +0 -1362
  268. package/src/components/Inspector/BundleTab.tsx +0 -4768
  269. package/src/components/Inspector/ConsoleTab.tsx +0 -726
  270. package/src/components/Inspector/CrashDetail.tsx +0 -997
  271. package/src/components/Inspector/CrashFilterModal.tsx +0 -721
  272. package/src/components/Inspector/CrashTab.tsx +0 -933
  273. package/src/components/Inspector/DebuggingTab.tsx +0 -1103
  274. package/src/components/Inspector/DeviceInfoTab.tsx +0 -1397
  275. package/src/components/Inspector/FabLauncher.tsx +0 -590
  276. package/src/components/Inspector/FeatureUnderDevNotice.tsx +0 -94
  277. package/src/components/Inspector/FeedbackModal.tsx +0 -626
  278. package/src/components/Inspector/InspectorContext.tsx +0 -28
  279. package/src/components/Inspector/InspectorHeader.tsx +0 -1583
  280. package/src/components/Inspector/LogDetail.tsx +0 -1431
  281. package/src/components/Inspector/MainScreen.tsx +0 -460
  282. package/src/components/Inspector/MediaGalleryTab.tsx +0 -829
  283. package/src/components/Inspector/MediaPreviewModal.tsx +0 -783
  284. package/src/components/Inspector/NavigationTracker.tsx +0 -13
  285. package/src/components/Inspector/NetworkDetail.tsx +0 -778
  286. package/src/components/Inspector/NetworkFilterModal.tsx +0 -730
  287. package/src/components/Inspector/NetworkTab.tsx +0 -820
  288. package/src/components/Inspector/NpmStarPrompt.tsx +0 -532
  289. package/src/components/Inspector/NpmUpdateToast.tsx +0 -387
  290. package/src/components/Inspector/PerformanceTab.tsx +0 -1967
  291. package/src/components/Inspector/ReduxDetail.tsx +0 -1651
  292. package/src/components/Inspector/ReduxTab.tsx +0 -987
  293. package/src/components/Inspector/SettingsPanel.tsx +0 -5136
  294. package/src/components/Inspector/SkeletonPlaceholder.tsx +0 -206
  295. package/src/components/Inspector/StorageTab.tsx +0 -1159
  296. package/src/components/Inspector/TabBar.tsx +0 -431
  297. package/src/components/Inspector/UpdateAvailableModal.tsx +0 -555
  298. package/src/components/JsonViewer.tsx +0 -549
  299. package/src/components/LogCard.tsx +0 -694
  300. package/src/components/LogSyntaxHighlighter.tsx +0 -178
  301. package/src/components/MetaAccordion.tsx +0 -355
  302. package/src/components/MiniBarChart.tsx +0 -42
  303. package/src/components/MiniLineChart.tsx +0 -33
  304. package/src/components/NetworkIcons.tsx +0 -2655
  305. package/src/components/QRCodeView.tsx +0 -75
  306. package/src/components/SectionHeader.tsx +0 -101
  307. package/src/components/SegmentedTabs.tsx +0 -84
  308. package/src/components/SkeletonPlaceholder.tsx +0 -206
  309. package/src/components/Slider.tsx +0 -300
  310. package/src/components/SourcePageCard.tsx +0 -150
  311. package/src/components/Toast.tsx +0 -131
  312. package/src/components/TouchableScale.tsx +0 -61
  313. package/src/components/TreeNode.tsx +0 -171
  314. package/src/console.ts +0 -24
  315. package/src/constants/index.ts +0 -41
  316. package/src/constants/telemetryConfig.ts +0 -4
  317. package/src/constants/version.ts +0 -3
  318. package/src/crash.ts +0 -32
  319. package/src/customHooks/analyticsLogger.ts +0 -336
  320. package/src/customHooks/bundleAnalyzer.ts +0 -1256
  321. package/src/customHooks/consoleLogger.ts +0 -530
  322. package/src/customHooks/crashHandler.ts +0 -944
  323. package/src/customHooks/logFilters.ts +0 -32
  324. package/src/customHooks/networkLogger.ts +0 -624
  325. package/src/customHooks/performanceTracker.ts +0 -1014
  326. package/src/customHooks/reduxLogger.ts +0 -406
  327. package/src/customHooks/storageInspector.ts +0 -513
  328. package/src/customHooks/useAccordion.tsx +0 -27
  329. package/src/decorators/index.ts +0 -184
  330. package/src/helpers/gaAnalyticsRegistry.ts +0 -204
  331. package/src/helpers/index.ts +0 -1092
  332. package/src/helpers/memoryManager.ts +0 -138
  333. package/src/helpers/qrGenerator.ts +0 -430
  334. package/src/helpers/remoteConfig.ts +0 -212
  335. package/src/helpers/searchQueryParser.ts +0 -84
  336. package/src/helpers/settingsStore.ts +0 -171
  337. package/src/helpers/telemetry.ts +0 -568
  338. package/src/helpers/toast.ts +0 -17
  339. package/src/i18n/index.ts +0 -104
  340. package/src/i18n/locales/en.json +0 -1141
  341. package/src/index.tsx +0 -2650
  342. package/src/metro.ts +0 -598
  343. package/src/network.ts +0 -22
  344. package/src/performance.ts +0 -38
  345. package/src/redux.ts +0 -23
  346. package/src/storage.ts +0 -18
  347. package/src/styles/AppColors.ts +0 -455
  348. package/src/styles/AppFonts.ts +0 -26
  349. package/src/styles/common.ts +0 -209
  350. package/src/styles/index.ts +0 -1606
  351. package/src/types/enums.ts +0 -210
  352. package/src/types/index.ts +0 -34
  353. package/src/types/interfaces.ts +0 -535
@@ -1,933 +0,0 @@
1
- import React, {useCallback, useEffect, useMemo, useRef, useState} from 'react';
2
- import {
3
- Alert,
4
- FlatList,
5
- Modal,
6
- Platform,
7
- Pressable,
8
- ScrollView,
9
- StyleSheet,
10
- Text,
11
- TextInput,
12
- TouchableOpacity,
13
- View,
14
- } from 'react-native';
15
- import {useTranslation} from '../../i18n';
16
- import {useInspector} from './InspectorContext';
17
- import TouchableScale from '../TouchableScale';
18
- import AnimatedEntrance from '../AnimatedEntrance';
19
- import EmptyState from '../EmptyState';
20
- import EndOfListFooter from '../EndOfListFooter';
21
- import FeatureUnderDevNotice from './FeatureUnderDevNotice';
22
- import HighlightText from '../HighlightText';
23
- import JsonViewer from '../JsonViewer';
24
- import styles from '../../styles';
25
- import {AppColors} from '../../styles/AppColors';
26
- import {AppFonts} from '../../styles/AppFonts';
27
- import {
28
- CrashRecord,
29
- ParsedStackFrame,
30
- CrashBreadcrumb,
31
- } from '../../types';
32
- import {
33
- CrashFilterType,
34
- CrashType,
35
- } from '../../types/enums';
36
- import {
37
- clearCrashRecords,
38
- } from '../../customHooks/crashHandler';
39
- import CrashFilterModal, {
40
- CrashFilters,
41
- DEFAULT_CRASH_FILTERS,
42
- isCrashFiltersDefault,
43
- } from './CrashFilterModal';
44
- import {
45
- CrashIcon,
46
- SearchIcon,
47
- ClearIcon,
48
- TrashIcon,
49
- WarningTriangleIcon,
50
- TerminalIcon,
51
- LayersIcon,
52
- ClockIcon,
53
- ShieldAlertIcon,
54
- CircleAlertIcon,
55
- CircleCheckIcon,
56
- CloseWhite,
57
- WhiteBackNavigation,
58
- GlobeIcon,
59
- FlameIcon,
60
- JsIcon,
61
- HourglassIcon,
62
- SkullIcon,
63
- LayoutIcon,
64
- ChipIcon,
65
- AppleIcon,
66
- AndroidIcon,
67
- RepeatIcon,
68
- CodeBracketsIcon,
69
- FilterIcon,
70
- ChevronIcon,
71
- } from '../NetworkIcons';
72
-
73
- const getRelativeTime = (timestamp: number): string => {
74
- const now = Date.now();
75
- const diff = Math.max(0, now - timestamp);
76
- const seconds = Math.floor(diff / 1000);
77
- const minutes = Math.floor(seconds / 60);
78
- const hours = Math.floor(minutes / 60);
79
- const days = Math.floor(hours / 24);
80
-
81
- if (seconds < 60) return `${seconds}s ago`;
82
- if (minutes < 60) return `${minutes}m ago`;
83
- if (hours < 24) return `${hours}h ago`;
84
- return `${days}d ago`;
85
- };
86
-
87
-
88
-
89
- const CrashTab = React.memo(() => {
90
- const {t} = useTranslation();
91
- const {crashRecords, selectedCrash, setSelectedCrash} = useInspector();
92
-
93
- const listRef = useRef<FlatList>(null);
94
- const [searchQuery, setSearchQuery] = useState('');
95
- const [filterType, setFilterType] = useState<CrashFilterType>('all');
96
- const [crashFilters, setCrashFilters] = useState<CrashFilters>(
97
- DEFAULT_CRASH_FILTERS,
98
- );
99
- const [isFilterModalOpen, setIsFilterModalOpen] = useState(false);
100
- const [detailSubTab, setDetailSubTab] = useState<
101
- 'stack' | 'device' | 'breadcrumbs' | 'raw'
102
- >('stack');
103
-
104
- // Calculate statistics
105
- const stats = useMemo(() => {
106
- const total = crashRecords.length;
107
- let fatalCount = 0;
108
- let jsCount = 0;
109
- let promiseCount = 0;
110
- let renderCount = 0;
111
- let nativeCount = 0;
112
-
113
- crashRecords.forEach(c => {
114
- if (c.isFatal) fatalCount++;
115
- if (c.type === 'js') jsCount++;
116
- else if (c.type === 'promise') promiseCount++;
117
- else if (c.type === 'render') renderCount++;
118
- else if (c.type === 'native') nativeCount++;
119
- });
120
-
121
- return {total, fatalCount, jsCount, promiseCount, renderCount, nativeCount};
122
- }, [crashRecords]);
123
-
124
- // Filtered crash list
125
- const filteredList = useMemo(() => {
126
- let list = crashRecords.filter(item => {
127
- // Type filter
128
- if (filterType === 'fatal' && !item.isFatal) return false;
129
- if (filterType === 'js' && item.type !== 'js') return false;
130
- if (filterType === 'promise' && item.type !== 'promise') return false;
131
- if (filterType === 'render' && item.type !== 'render') return false;
132
- if (filterType === 'native' && item.type !== 'native') return false;
133
-
134
- // Modal filters: crash types
135
- if (crashFilters.types.size > 0 && !crashFilters.types.has('all')) {
136
- const matches =
137
- (crashFilters.types.has('fatal') && item.isFatal) ||
138
- (crashFilters.types.has('js') && item.type === 'js') ||
139
- (crashFilters.types.has('promise') && item.type === 'promise') ||
140
- (crashFilters.types.has('render') && item.type === 'render') ||
141
- (crashFilters.types.has('native') && item.type === 'native');
142
- if (!matches) return false;
143
- }
144
-
145
- // Modal filters: time window
146
- if (crashFilters.timeWindow !== 'all') {
147
- const now = Date.now();
148
- const cutoff =
149
- crashFilters.timeWindow === '15m'
150
- ? now - 15 * 60 * 1000
151
- : crashFilters.timeWindow === '1h'
152
- ? now - 60 * 60 * 1000
153
- : crashFilters.timeWindow === '24h'
154
- ? now - 24 * 60 * 60 * 1000
155
- : now - 7 * 24 * 60 * 60 * 1000;
156
- if (item.timestamp < cutoff) return false;
157
- }
158
-
159
- // Modal filters: platform
160
- if (crashFilters.platform !== 'all') {
161
- const platform = (item.deviceInfo?.platform || '').toLowerCase();
162
- if (platform !== crashFilters.platform) return false;
163
- }
164
-
165
- // Modal filters: engine
166
- if (crashFilters.engine !== 'all') {
167
- const isHermes = item.deviceInfo?.isHermes;
168
- if (crashFilters.engine === 'hermes' && isHermes !== true) return false;
169
- if (crashFilters.engine === 'jsc' && (isHermes === true)) return false;
170
- }
171
-
172
- // Search filter
173
- if (searchQuery.trim().length > 0) {
174
- const queryTokens = searchQuery.trim().toLowerCase().split(/\s+/).filter(Boolean);
175
- const searchTarget = [
176
- item.message || '',
177
- item.name || '',
178
- item.stack || '',
179
- item.type || '',
180
- item.deviceInfo?.platform || '',
181
- ...(item.breadcrumbs || []).map(b => `${b.type || ''} ${b.message || ''}`),
182
- ].join(' ').toLowerCase();
183
-
184
- return queryTokens.every(token => searchTarget.includes(token));
185
- }
186
-
187
- return true;
188
- });
189
-
190
- // Modal filters: sort order
191
- if (crashFilters.sortBy === 'time_asc') {
192
- list = [...list].sort((a, b) => a.timestamp - b.timestamp);
193
- }
194
-
195
- return list;
196
- }, [crashRecords, filterType, searchQuery, crashFilters]);
197
-
198
- const handleClearAll = () => {
199
- Alert.alert(
200
- t('crash.clearTitle'),
201
- t('crash.clearMessage'),
202
- [
203
- {text: t('crash.clearCancel'), style: 'cancel'},
204
- {
205
- text: t('crash.clearConfirm'),
206
- style: 'destructive',
207
- onPress: () => clearCrashRecords(),
208
- },
209
- ],
210
- );
211
- };
212
-
213
- const renderCard = useCallback(
214
- ({item, index}: {item: CrashRecord; index: number}) => {
215
- const isFatal = item.isFatal;
216
- const typeLabel = item.type.toUpperCase();
217
- const topFrame = item.parsedStack && item.parsedStack.length > 0
218
- ? item.parsedStack.find(f => f.isAppCode) || item.parsedStack[0]
219
- : null;
220
-
221
- const typeBadgeBg =
222
- item.type === 'native'
223
- ? `${AppColors.errorColor}22`
224
- : item.type === 'render'
225
- ? `${AppColors.purple}22`
226
- : item.type === 'promise'
227
- ? `${AppColors.darkOrange}22`
228
- : `${AppColors.offerPurple}22`;
229
-
230
- const typeBadgeColor =
231
- item.type === 'native'
232
- ? AppColors.errorColor
233
- : item.type === 'render'
234
- ? AppColors.purple
235
- : item.type === 'promise'
236
- ? AppColors.darkOrange
237
- : AppColors.offerPurple;
238
-
239
- return (
240
- <AnimatedEntrance index={index} distance={8}>
241
- <TouchableScale
242
- onPress={() => {
243
- setSelectedCrash(item);
244
- }}
245
- style={[
246
- localStyles.cardContainer,
247
- isFatal && localStyles.fatalCardBorder,
248
- ]}>
249
- {/* Header: #S.No, Badges & Timestamp */}
250
- <View style={localStyles.cardHeader}>
251
- <View style={localStyles.badgeRow}>
252
- <View style={localStyles.sNoBadge}>
253
- <Text style={localStyles.sNoBadgeText}>#{index + 1}</Text>
254
- </View>
255
-
256
- {isFatal ? (
257
- <View style={localStyles.fatalBadge}>
258
- <FlameIcon size={10} color={AppColors.white} />
259
- <Text style={localStyles.fatalBadgeText}>{t('crash.fatalBadge')}</Text>
260
- </View>
261
- ) : (
262
- <View style={localStyles.caughtBadge}>
263
- <Text style={localStyles.caughtBadgeText}>{t('crash.handledBadge')}</Text>
264
- </View>
265
- )}
266
-
267
- <View
268
- style={[
269
- localStyles.typeBadge,
270
- {backgroundColor: typeBadgeBg},
271
- ]}>
272
- <Text
273
- style={[
274
- localStyles.typeBadgeText,
275
- {color: typeBadgeColor},
276
- ]}>
277
- {typeLabel}
278
- </Text>
279
- </View>
280
- </View>
281
-
282
- <View style={localStyles.timeRow}>
283
- <ClockIcon size={11} color={AppColors.grayTextWeak} />
284
- <Text style={localStyles.timestampText}>
285
- {item.timeStr || new Date(item.timestamp).toLocaleTimeString()}
286
- </Text>
287
- <Text style={localStyles.relativeTimeText}>
288
- {getRelativeTime(item.timestamp)}
289
- </Text>
290
- </View>
291
- </View>
292
-
293
- {/* Error Message */}
294
- <View style={{marginVertical: 6}}>
295
- <HighlightText
296
- text={item.message || t('crash.unknownException')}
297
- highlight={searchQuery}
298
- numberOfLines={3}
299
- style={localStyles.errorMessageText}
300
- />
301
- </View>
302
-
303
- {/* Top stack frame location if available */}
304
- {topFrame && (
305
- <View style={localStyles.locationRow}>
306
- <TerminalIcon size={12} color={AppColors.grayTextWeak} />
307
- <Text
308
- numberOfLines={1}
309
- ellipsizeMode="middle"
310
- style={localStyles.locationText}>
311
- {topFrame.method !== '<anonymous>' ? `${topFrame.method} ` : ''}
312
- <Text style={{color: AppColors.purple, fontFamily: AppFonts.interBold}}>
313
- {topFrame.file}:{topFrame.lineNumber}
314
- </Text>
315
- </Text>
316
- </View>
317
- )}
318
-
319
- {/* Footer row: Actions */}
320
- <View style={localStyles.cardFooter}>
321
- <View style={{flexDirection: 'row', alignItems: 'center', gap: 6, flexWrap: 'wrap'}}>
322
- {item.deviceInfo && (
323
- <View style={localStyles.metaPill}>
324
- {item.deviceInfo.platform === 'ios' ? (
325
- <AppleIcon size={10} color={AppColors.grayText} />
326
- ) : item.deviceInfo.platform === 'android' ? (
327
- <AndroidIcon size={10} color={AppColors.grayText} />
328
- ) : null}
329
- <Text style={localStyles.metaPillText}>
330
- {item.deviceInfo.platform?.toUpperCase()}{' '}
331
- {item.deviceInfo.osVersion || ''}
332
- </Text>
333
- </View>
334
- )}
335
- {item.deviceInfo && (
336
- <View style={localStyles.metaPill}>
337
- <Text style={localStyles.metaPillText}>
338
- {item.deviceInfo.isHermes ? 'Hermes' : 'JSC'}
339
- </Text>
340
- </View>
341
- )}
342
- {item.parsedStack && item.parsedStack.length > 0 && (
343
- <View style={localStyles.metaPill}>
344
- <CodeBracketsIcon size={10} color={AppColors.grayText} />
345
- <Text style={localStyles.metaPillText}>
346
- {item.parsedStack.length}
347
- </Text>
348
- </View>
349
- )}
350
- {item.breadcrumbs && item.breadcrumbs.length > 0 && (
351
- <View style={localStyles.metaPill}>
352
- <RepeatIcon size={10} color={AppColors.grayText} />
353
- <Text style={localStyles.metaPillText}>
354
- {item.breadcrumbs.length} trail
355
- </Text>
356
- </View>
357
- )}
358
- {item.memoryInfo && (
359
- <View style={localStyles.metaPill}>
360
- <Text style={localStyles.metaPillText}>
361
- {item.memoryInfo.usedJSHeapSize} MB
362
- </Text>
363
- </View>
364
- )}
365
- </View>
366
- </View>
367
- </TouchableScale>
368
- </AnimatedEntrance>
369
- );
370
- },
371
- [searchQuery, setSelectedCrash],
372
- );
373
-
374
- return (
375
- <View style={localStyles.container}>
376
- {crashRecords.length > 0 && (
377
- <>
378
- {/* ─── Top Stats Bar ─── */}
379
- <View style={localStyles.statsBar}>
380
- <ScrollView
381
- horizontal
382
- showsHorizontalScrollIndicator={false}
383
- contentContainerStyle={localStyles.statsScrollContent}>
384
- <View style={[localStyles.statChip, localStyles.statChipActive]}>
385
- <Text style={localStyles.statChipValue}>{stats.total}</Text>
386
- <Text style={localStyles.statChipLabel}>{t('crash.statCrashes')}</Text>
387
- </View>
388
-
389
- <View style={localStyles.statChip}>
390
- <Text style={[localStyles.statChipValue, {color: AppColors.errorColor}]}>
391
- {stats.fatalCount}
392
- </Text>
393
- <Text style={localStyles.statChipLabel}>{t('crash.statFatal')}</Text>
394
- </View>
395
-
396
- <View style={localStyles.statChip}>
397
- <Text style={[localStyles.statChipValue, {color: AppColors.offerPurple}]}>
398
- {stats.jsCount}
399
- </Text>
400
- <Text style={localStyles.statChipLabel}>{t('crash.statJsErrors')}</Text>
401
- </View>
402
-
403
- <View style={localStyles.statChip}>
404
- <Text style={[localStyles.statChipValue, {color: AppColors.darkOrange}]}>
405
- {stats.promiseCount}
406
- </Text>
407
- <Text style={localStyles.statChipLabel}>{t('crash.statPromises')}</Text>
408
- </View>
409
-
410
- <View style={localStyles.statChip}>
411
- <Text style={[localStyles.statChipValue, {color: AppColors.purple}]}>
412
- {stats.renderCount}
413
- </Text>
414
- <Text style={localStyles.statChipLabel}>{t('crash.statRender')}</Text>
415
- </View>
416
-
417
- <View style={localStyles.statChip}>
418
- <Text style={[localStyles.statChipValue, {color: AppColors.skyBlue}]}>
419
- {stats.nativeCount}
420
- </Text>
421
- <Text style={localStyles.statChipLabel}>{t('crash.statNative')}</Text>
422
- </View>
423
- </ScrollView>
424
- </View>
425
-
426
- {/* ─── Search & Controls ─── */}
427
- <View style={localStyles.controlsContainer}>
428
- <View style={localStyles.searchRow}>
429
- <View style={localStyles.searchInputWrapper}>
430
- <SearchIcon color={AppColors.grayTextWeak} size={14} />
431
- <TextInput
432
- value={searchQuery}
433
- onChangeText={setSearchQuery}
434
- placeholder={t('crash.searchPlaceholder')}
435
- placeholderTextColor={AppColors.grayTextWeak}
436
- style={localStyles.searchInput}
437
- autoCapitalize="none"
438
- autoCorrect={false}
439
- />
440
- {searchQuery.length > 0 && (
441
- <View style={{flexDirection: 'row', alignItems: 'center', gap: 4}}>
442
- <View
443
- style={{
444
- backgroundColor: `${AppColors.purple}20`,
445
- borderRadius: 10,
446
- paddingHorizontal: 6,
447
- paddingVertical: 1.5,
448
- }}>
449
- <Text
450
- style={{
451
- color: AppColors.purple,
452
- fontSize: 9.5,
453
- fontFamily: AppFonts.interBold,
454
- }}>
455
- {filteredList.length}
456
- </Text>
457
- </View>
458
- <TouchableOpacity onPress={() => setSearchQuery('')} hitSlop={8}>
459
- <ClearIcon color={AppColors.grayTextWeak} size={14} />
460
- </TouchableOpacity>
461
- </View>
462
- )}
463
- </View>
464
-
465
- {/* Crash Filters */}
466
- <TouchableScale
467
- onPress={() => setIsFilterModalOpen(true)}
468
- style={[
469
- localStyles.filterButton,
470
- !isCrashFiltersDefault(crashFilters) && {
471
- borderColor: `${AppColors.brandPurple}60`,
472
- backgroundColor: `${AppColors.brandPurple}15`,
473
- },
474
- ]}>
475
- <FilterIcon
476
- size={14}
477
- color={
478
- isCrashFiltersDefault(crashFilters)
479
- ? AppColors.grayTextStrong
480
- : AppColors.brandPurple
481
- }
482
- />
483
- {!isCrashFiltersDefault(crashFilters) && (
484
- <View
485
- style={{
486
- position: 'absolute',
487
- top: 2,
488
- right: 2,
489
- width: 7,
490
- height: 7,
491
- borderRadius: 3.5,
492
- backgroundColor: AppColors.darkOrange,
493
- borderWidth: 1,
494
- borderColor: AppColors.white,
495
- }}
496
- />
497
- )}
498
- </TouchableScale>
499
-
500
- {/* Clear Crashes */}
501
- <TouchableScale
502
- onPress={handleClearAll}
503
- style={localStyles.clearButton}>
504
- <TrashIcon size={14} color={AppColors.errorColor} />
505
- </TouchableScale>
506
- </View>
507
-
508
- <FeatureUnderDevNotice featureName="Crash & Exception Sentinel" />
509
-
510
- {/* ─── Filter Chips ─── */}
511
- <ScrollView
512
- horizontal
513
- showsHorizontalScrollIndicator={false}
514
- contentContainerStyle={localStyles.filterScrollContent}>
515
- {(
516
- [
517
- {key: 'all', label: t('crash.filterAll'), Icon: LayersIcon},
518
- {key: 'fatal', label: t('crash.filterFatal'), Icon: SkullIcon},
519
- {key: 'js', label: t('crash.filterJsError'), Icon: JsIcon},
520
- {key: 'promise', label: t('crash.filterPromise'), Icon: HourglassIcon},
521
- {key: 'render', label: t('crash.filterRender'), Icon: LayoutIcon},
522
- {key: 'native', label: t('crash.filterNative'), Icon: ChipIcon},
523
- ] as const
524
- ).map(chip => {
525
- const isActive = filterType === chip.key;
526
- return (
527
- <TouchableOpacity
528
- key={chip.key}
529
- onPress={() => setFilterType(chip.key)}
530
- style={[
531
- localStyles.filterChip,
532
- isActive && localStyles.filterChipActive,
533
- ]}>
534
- <chip.Icon
535
- size={12}
536
- color={isActive ? AppColors.white : AppColors.grayTextStrong}
537
- />
538
- <Text
539
- style={[
540
- localStyles.filterChipText,
541
- isActive && localStyles.filterChipTextActive,
542
- ]}>
543
- {chip.label}
544
- </Text>
545
- </TouchableOpacity>
546
- );
547
- })}
548
- </ScrollView>
549
- </View>
550
- </>
551
- )}
552
-
553
- {/* ─── Crash List or Empty State ─── */}
554
- {filteredList.length === 0 ? (
555
- <ScrollView
556
- contentContainerStyle={localStyles.emptyContainer}
557
- showsVerticalScrollIndicator={false}>
558
- <View style={localStyles.emptyIconCircle}>
559
- <ShieldAlertIcon size={38} color={AppColors.greenColor} />
560
- </View>
561
- <Text style={localStyles.emptyTitle}>
562
- {searchQuery.length > 0
563
- ? 'No matching crash entries'
564
- : filterType !== 'all' || !isCrashFiltersDefault(crashFilters)
565
- ? 'No crashes match filters'
566
- : t('crash.emptyTitle')}
567
- </Text>
568
- <Text style={localStyles.emptySub}>
569
- {searchQuery
570
- ? `No crash entries matched "${searchQuery}"`
571
- : filterType !== 'all' || !isCrashFiltersDefault(crashFilters)
572
- ? 'Try adjusting your filters or search keywords.'
573
- : t('crash.emptySubtitle')}
574
- </Text>
575
- {(searchQuery.length > 0 ||
576
- filterType !== 'all' ||
577
- !isCrashFiltersDefault(crashFilters)) && (
578
- <TouchableScale
579
- onPress={() => {
580
- setSearchQuery('');
581
- setFilterType('all');
582
- setCrashFilters(DEFAULT_CRASH_FILTERS);
583
- }}
584
- style={{
585
- marginTop: 10,
586
- paddingHorizontal: 14,
587
- paddingVertical: 7,
588
- borderRadius: 8,
589
- backgroundColor: AppColors.purple,
590
- }}>
591
- <Text
592
- style={{
593
- fontFamily: AppFonts.interBold,
594
- fontSize: 11.5,
595
- color: AppColors.white,
596
- }}>
597
- Clear Search & Filters
598
- </Text>
599
- </TouchableScale>
600
- )}
601
- </ScrollView>
602
- ) : (
603
- <>
604
- <FlatList
605
- ref={listRef}
606
- data={filteredList}
607
- keyExtractor={item => item.id}
608
- renderItem={renderCard}
609
- initialNumToRender={12}
610
- maxToRenderPerBatch={8}
611
- windowSize={5}
612
- removeClippedSubviews={Platform.OS === 'android'}
613
- renderToHardwareTextureAndroid={true}
614
- contentContainerStyle={localStyles.listContent}
615
- showsVerticalScrollIndicator={false}
616
- ListFooterComponent={<EndOfListFooter />}
617
- />
618
- </>
619
- )}
620
-
621
- {/* Filter Modal */}
622
- <CrashFilterModal
623
- visible={isFilterModalOpen}
624
- onClose={() => setIsFilterModalOpen(false)}
625
- filters={crashFilters}
626
- onApply={setCrashFilters}
627
- searchQuery={searchQuery}
628
- />
629
- </View>
630
- );
631
- });
632
-
633
- export default CrashTab;
634
-
635
- const localStyles = StyleSheet.create({
636
- container: {
637
- flex: 1,
638
- backgroundColor: AppColors.grayBackground,
639
- },
640
- statsBar: {
641
- backgroundColor: AppColors.primaryLight,
642
- borderBottomWidth: 1,
643
- borderBottomColor: AppColors.grayBorderSecondary,
644
- paddingVertical: 10,
645
- },
646
- statsScrollContent: {
647
- paddingHorizontal: 16,
648
- gap: 8,
649
- },
650
- statChip: {
651
- flexDirection: 'row',
652
- alignItems: 'center',
653
- gap: 6,
654
- paddingHorizontal: 10,
655
- paddingVertical: 5,
656
- borderRadius: 8,
657
- backgroundColor: AppColors.purpleShade50,
658
- borderWidth: 1,
659
- borderColor: `${AppColors.purple}14`,
660
- },
661
- statChipActive: {
662
- backgroundColor: `${AppColors.purple}14`,
663
- borderColor: `${AppColors.purple}33`,
664
- },
665
- statChipValue: {
666
- fontFamily: AppFonts.interBold,
667
- fontSize: 13,
668
- color: AppColors.primaryBlack,
669
- },
670
- statChipLabel: {
671
- fontFamily: AppFonts.interMedium,
672
- fontSize: 11,
673
- color: AppColors.grayText,
674
- },
675
- controlsContainer: {
676
- paddingHorizontal: 16,
677
- paddingTop: 12,
678
- paddingBottom: 6,
679
- backgroundColor: AppColors.grayBackground,
680
- },
681
- searchRow: {
682
- flexDirection: 'row',
683
- alignItems: 'center',
684
- gap: 8,
685
- },
686
- searchInputWrapper: {
687
- flex: 1,
688
- flexDirection: 'row',
689
- alignItems: 'center',
690
- backgroundColor: AppColors.primaryLight,
691
- borderWidth: 1,
692
- borderColor: AppColors.grayBorderSecondary,
693
- borderRadius: 10,
694
- paddingHorizontal: 10,
695
- height: 38,
696
- gap: 8,
697
- },
698
- searchInput: {
699
- flex: 1,
700
- fontFamily: AppFonts.interRegular,
701
- fontSize: 13,
702
- color: AppColors.primaryBlack,
703
- paddingVertical: 0,
704
- },
705
- clearButton: {
706
- width: 38,
707
- height: 38,
708
- borderRadius: 10,
709
- backgroundColor: `${AppColors.errorColor}14`,
710
- borderWidth: 1,
711
- borderColor: `${AppColors.errorColor}22`,
712
- alignItems: 'center',
713
- justifyContent: 'center',
714
- },
715
- filterButton: {
716
- width: 38,
717
- height: 38,
718
- borderRadius: 10,
719
- backgroundColor: `${AppColors.brandPurple}0F`,
720
- borderWidth: 1,
721
- borderColor: `${AppColors.brandPurple}30`,
722
- alignItems: 'center',
723
- justifyContent: 'center',
724
- },
725
- filterScrollContent: {
726
- paddingVertical: 10,
727
- gap: 6,
728
- },
729
- filterChip: {
730
- flexDirection: 'row',
731
- alignItems: 'center',
732
- gap: 5,
733
- paddingHorizontal: 12,
734
- paddingVertical: 6,
735
- borderRadius: 8,
736
- backgroundColor: AppColors.primaryLight,
737
- borderWidth: 1,
738
- borderColor: AppColors.grayBorderSecondary,
739
- },
740
- filterChipActive: {
741
- backgroundColor: AppColors.purple,
742
- borderColor: AppColors.purple,
743
- },
744
- filterChipText: {
745
- fontFamily: AppFonts.interMedium,
746
- fontSize: 12,
747
- color: AppColors.grayText,
748
- },
749
- filterChipTextActive: {
750
- fontFamily: AppFonts.interBold,
751
- color: AppColors.white,
752
- },
753
- listContent: {
754
- paddingHorizontal: 16,
755
- paddingTop: 4,
756
- paddingBottom: 24,
757
- gap: 10,
758
- },
759
- cardContainer: {
760
- backgroundColor: AppColors.primaryLight,
761
- borderRadius: 12,
762
- borderWidth: 1,
763
- borderColor: AppColors.grayBorderSecondary,
764
- padding: 14,
765
- shadowColor: AppColors.shadowColorString,
766
- shadowOffset: {width: 0, height: 1},
767
- shadowOpacity: 0.05,
768
- shadowRadius: 3,
769
- elevation: 2,
770
- },
771
- fatalCardBorder: {
772
- borderColor: `${AppColors.errorColor}44`,
773
- },
774
- cardHeader: {
775
- flexDirection: 'row',
776
- alignItems: 'center',
777
- justifyContent: 'space-between',
778
- },
779
- badgeRow: {
780
- flexDirection: 'row',
781
- alignItems: 'center',
782
- gap: 6,
783
- flexShrink: 1,
784
- },
785
- sNoBadge: {
786
- backgroundColor: AppColors.grayBackground,
787
- borderWidth: 1,
788
- borderColor: AppColors.grayBorderSecondary,
789
- paddingHorizontal: 6,
790
- paddingVertical: 3,
791
- borderRadius: 5,
792
- },
793
- sNoBadgeText: {
794
- fontFamily: AppFonts.interBold,
795
- fontSize: 9.5,
796
- color: AppColors.grayText,
797
- letterSpacing: 0.3,
798
- },
799
- fatalBadge: {
800
- flexDirection: 'row',
801
- alignItems: 'center',
802
- gap: 4,
803
- backgroundColor: AppColors.errorColor,
804
- paddingHorizontal: 6,
805
- paddingVertical: 3,
806
- borderRadius: 5,
807
- },
808
- fatalBadgeText: {
809
- fontFamily: AppFonts.interBold,
810
- fontSize: 9.5,
811
- color: AppColors.white,
812
- letterSpacing: 0.5,
813
- },
814
- caughtBadge: {
815
- backgroundColor: `${AppColors.greenColor}1F`,
816
- paddingHorizontal: 6,
817
- paddingVertical: 3,
818
- borderRadius: 5,
819
- },
820
- caughtBadgeText: {
821
- fontFamily: AppFonts.interBold,
822
- fontSize: 9.5,
823
- color: AppColors.greenColor,
824
- letterSpacing: 0.5,
825
- },
826
- typeBadge: {
827
- paddingHorizontal: 6,
828
- paddingVertical: 3,
829
- borderRadius: 5,
830
- },
831
- typeBadgeText: {
832
- fontFamily: AppFonts.interBold,
833
- fontSize: 9.5,
834
- letterSpacing: 0.5,
835
- },
836
- timeRow: {
837
- flexDirection: 'row',
838
- alignItems: 'center',
839
- gap: 4,
840
- flexShrink: 1,
841
- },
842
- timestampText: {
843
- fontFamily: AppFonts.interRegular,
844
- fontSize: 11,
845
- color: AppColors.grayTextWeak,
846
- },
847
- relativeTimeText: {
848
- fontFamily: AppFonts.interBold,
849
- fontSize: 10,
850
- color: AppColors.grayTextWeak,
851
- backgroundColor: AppColors.grayBackground,
852
- paddingHorizontal: 5,
853
- paddingVertical: 1,
854
- borderRadius: 4,
855
- overflow: 'hidden',
856
- },
857
- errorMessageText: {
858
- fontFamily: AppFonts.interBold,
859
- fontSize: 13.5,
860
- color: AppColors.primaryBlack,
861
- lineHeight: 18,
862
- },
863
- locationRow: {
864
- flexDirection: 'row',
865
- alignItems: 'center',
866
- gap: 6,
867
- marginTop: 2,
868
- marginBottom: 6,
869
- backgroundColor: AppColors.purpleShade50,
870
- paddingHorizontal: 8,
871
- paddingVertical: 4,
872
- borderRadius: 6,
873
- },
874
- locationText: {
875
- fontFamily: AppFonts.interRegular,
876
- fontSize: 11,
877
- color: AppColors.grayText,
878
- flex: 1,
879
- },
880
- cardFooter: {
881
- flexDirection: 'row',
882
- alignItems: 'center',
883
- justifyContent: 'space-between',
884
- marginTop: 6,
885
- paddingTop: 8,
886
- borderTopWidth: 1,
887
- borderTopColor: AppColors.dividerColor,
888
- },
889
- metaPill: {
890
- flexDirection: 'row',
891
- alignItems: 'center',
892
- gap: 4,
893
- backgroundColor: AppColors.purpleShade50,
894
- paddingHorizontal: 6,
895
- paddingVertical: 2,
896
- borderRadius: 4,
897
- },
898
- metaPillText: {
899
- fontFamily: AppFonts.interMedium,
900
- fontSize: 10,
901
- color: AppColors.grayTextWeak,
902
- },
903
- emptyContainer: {
904
- flexGrow: 1,
905
- alignItems: 'center',
906
- justifyContent: 'center',
907
- padding: 32,
908
- paddingBottom: 80,
909
- },
910
- emptyIconCircle: {
911
- width: 72,
912
- height: 72,
913
- borderRadius: 36,
914
- backgroundColor: `${AppColors.greenColor}1F`,
915
- alignItems: 'center',
916
- justifyContent: 'center',
917
- marginBottom: 16,
918
- },
919
- emptyTitle: {
920
- fontFamily: AppFonts.interBold,
921
- fontSize: 17,
922
- color: AppColors.primaryBlack,
923
- marginBottom: 6,
924
- },
925
- emptySub: {
926
- fontFamily: AppFonts.interRegular,
927
- fontSize: 13,
928
- color: AppColors.grayText,
929
- textAlign: 'center',
930
- lineHeight: 18,
931
- maxWidth: 280,
932
- },
933
- });