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,178 +0,0 @@
1
- import React from 'react';
2
- import {StyleSheet, Text, View, TextStyle, Linking} from 'react-native';
3
- import {AppColors} from '../styles/AppColors';
4
- import {AppFonts} from '../styles/AppFonts';
5
- import {escapeRegex, handleOpenExternalLink} from '../helpers';
6
-
7
- export interface LogSyntaxHighlighterProps {
8
- text: string;
9
- search?: string;
10
- numberOfLines?: number;
11
- style?: TextStyle | TextStyle[];
12
- detectLinks?: boolean;
13
- }
14
-
15
- interface Token {
16
- type:
17
- | 'key'
18
- | 'string'
19
- | 'number'
20
- | 'boolean'
21
- | 'null'
22
- | 'url'
23
- | 'bracket'
24
- | 'tag'
25
- | 'plain';
26
- value: string;
27
- }
28
-
29
- const TOKEN_REGEX =
30
- /("(?:\\.|[^"\\])*"(?=\s*:))|("(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*')|(\b-?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?\b)|(\b(?:true|false)\b)|(\b(?:null|undefined|NaN)\b)|(https?:\/\/[^\s"',]+)|(\[[\w\s_-]+\])|([{}[\],:])|([^"'\d\s{}[\],:]+|[ \t\r\n]+)/g;
31
-
32
- export const tokenizeText = (input: string): Token[] => {
33
- if (!input) return [];
34
- const tokens: Token[] = [];
35
- let match: RegExpExecArray | null;
36
- TOKEN_REGEX.lastIndex = 0;
37
-
38
- while ((match = TOKEN_REGEX.exec(input)) !== null) {
39
- if (match[1]) {
40
- tokens.push({type: 'key', value: match[1]});
41
- } else if (match[2]) {
42
- tokens.push({type: 'string', value: match[2]});
43
- } else if (match[3]) {
44
- tokens.push({type: 'number', value: match[3]});
45
- } else if (match[4]) {
46
- tokens.push({type: 'boolean', value: match[4]});
47
- } else if (match[5]) {
48
- tokens.push({type: 'null', value: match[5]});
49
- } else if (match[6]) {
50
- tokens.push({type: 'url', value: match[6]});
51
- } else if (match[7]) {
52
- tokens.push({type: 'tag', value: match[7]});
53
- } else if (match[8]) {
54
- tokens.push({type: 'bracket', value: match[8]});
55
- } else if (match[9]) {
56
- tokens.push({type: 'plain', value: match[9]});
57
- }
58
- }
59
-
60
- return tokens;
61
- };
62
-
63
- const getTokenColor = (type: Token['type']): string => {
64
- switch (type) {
65
- case 'key':
66
- return AppColors.sky600 || '#0369a1';
67
- case 'string':
68
- return AppColors.emerald600 || '#059669';
69
- case 'number':
70
- return AppColors.amber600 || '#d97706';
71
- case 'boolean':
72
- return AppColors.purple || '#7c3aed';
73
- case 'null':
74
- return AppColors.red600 || '#dc2626';
75
- case 'url':
76
- return '#0284c7';
77
- case 'tag':
78
- return AppColors.violet600 || '#7c3aed';
79
- case 'bracket':
80
- return AppColors.slate500 || '#64748b';
81
- case 'plain':
82
- default:
83
- return AppColors.primaryBlack || '#1e293b';
84
- }
85
- };
86
-
87
- export const LogSyntaxHighlighter: React.FC<LogSyntaxHighlighterProps> = React.memo(
88
- ({text, search, numberOfLines, style, detectLinks = true}) => {
89
- if (!text) return null;
90
-
91
- const tokens = React.useMemo(() => tokenizeText(text), [text]);
92
-
93
- const renderToken = (token: Token, tokenIdx: number) => {
94
- const baseColor = getTokenColor(token.type);
95
- const isUrl = token.type === 'url';
96
- const isKey = token.type === 'key';
97
-
98
- const tokenStyle: TextStyle = {
99
- color: baseColor,
100
- fontFamily: isKey ? AppFonts.interBold : AppFonts.interRegular,
101
- textDecorationLine: isUrl ? 'underline' : 'none',
102
- };
103
-
104
- if (!search || search.trim().length === 0) {
105
- return (
106
- <Text
107
- key={tokenIdx}
108
- style={tokenStyle}
109
- onPress={
110
- isUrl && detectLinks
111
- ? () => handleOpenExternalLink(token.value)
112
- : undefined
113
- }>
114
- {token.value}
115
- </Text>
116
- );
117
- }
118
-
119
- const regex = new RegExp(`(${escapeRegex(search.trim())})`, 'gi');
120
- const parts = token.value.split(regex);
121
-
122
- return (
123
- <Text key={tokenIdx} style={tokenStyle}>
124
- {parts.map((part, partIdx) => {
125
- const isMatch =
126
- part.toLowerCase() === search.trim().toLowerCase();
127
- return isMatch ? (
128
- <Text
129
- key={partIdx}
130
- style={[
131
- tokenStyle,
132
- styles.searchHighlight,
133
- ]}>
134
- {part}
135
- </Text>
136
- ) : (
137
- <Text
138
- key={partIdx}
139
- style={tokenStyle}
140
- onPress={
141
- isUrl && detectLinks
142
- ? () => handleOpenExternalLink(token.value)
143
- : undefined
144
- }>
145
- {part}
146
- </Text>
147
- );
148
- })}
149
- </Text>
150
- );
151
- };
152
-
153
- return (
154
- <Text
155
- style={[styles.containerText, style]}
156
- numberOfLines={numberOfLines}>
157
- {tokens.map(renderToken)}
158
- </Text>
159
- );
160
- },
161
- );
162
-
163
- const styles = StyleSheet.create({
164
- containerText: {
165
- fontFamily: AppFonts.interRegular,
166
- fontSize: 12,
167
- lineHeight: 18,
168
- color: AppColors.primaryBlack,
169
- },
170
- searchHighlight: {
171
- backgroundColor: '#fef08a',
172
- color: '#854d0e',
173
- fontFamily: AppFonts.interBold,
174
- borderRadius: 2,
175
- },
176
- });
177
-
178
- export default LogSyntaxHighlighter;
@@ -1,355 +0,0 @@
1
- import React, {useState} from 'react';
2
- import {useTranslation} from '../i18n';
3
- import {View, Pressable, Text} from 'react-native';
4
-
5
- // Constants
6
- import {DURATION_FAST_MS, DURATION_SLOW_MS} from '../constants';
7
-
8
- // Custom Hooks
9
- import useAccordion from '../customHooks/useAccordion';
10
-
11
- // Helpers
12
- import {getDurationColor, handleOpenExternalLink} from '../helpers';
13
-
14
- // Types
15
- import {MetaAccordionProps} from '../types';
16
-
17
- // Assets
18
- import {
19
- ChevronIcon,
20
- CalendarIcon,
21
- StatusIcon,
22
- ClockIcon,
23
- SizeIcon,
24
- TerminalIcon,
25
- GlobeIcon,
26
- } from './NetworkIcons';
27
-
28
- // Components
29
- import TouchableScale from './TouchableScale';
30
- import CopyButton from './CopyButton';
31
-
32
- // Stylesheet
33
- import {AppColors} from '../styles/AppColors';
34
- import {AppFonts} from '../styles/AppFonts';
35
- import styles from '../styles';
36
-
37
- const MetaAccordion = ({
38
- status,
39
- statusColor,
40
- duration,
41
- size,
42
- triggeredAt,
43
- method,
44
- contentType,
45
- url,
46
- }: MetaAccordionProps) => {
47
- const {t} = useTranslation();
48
- const [urlExpanded, setUrlExpanded] = useState(false);
49
- const {isOpen, toggleOpen, chevronStyle} = useAccordion(true);
50
- const isFailed = status === 0 || status == null;
51
-
52
- const renderFormattedUrl = (rawUrl: string) => {
53
- if (!rawUrl) return '—';
54
- try {
55
- const doubleSlashIndex = rawUrl.indexOf('//');
56
- let temp = rawUrl;
57
- let protocol = '';
58
- if (doubleSlashIndex !== -1) {
59
- protocol = rawUrl.substring(0, doubleSlashIndex + 2);
60
- temp = rawUrl.substring(doubleSlashIndex + 2);
61
- }
62
-
63
- const slashIndex = temp.indexOf('/');
64
- let host = temp;
65
- let pathAndSearch = '';
66
- if (slashIndex !== -1) {
67
- host = temp.substring(0, slashIndex);
68
- pathAndSearch = temp.substring(slashIndex);
69
- }
70
-
71
- const queryIndex = pathAndSearch.indexOf('?');
72
- let pathname = pathAndSearch;
73
- let search = '';
74
- if (queryIndex !== -1) {
75
- pathname = pathAndSearch.substring(0, queryIndex);
76
- search = pathAndSearch.substring(queryIndex);
77
- }
78
-
79
- return (
80
- <Text style={{lineHeight: 16}}>
81
- {protocol ? (
82
- <Text style={{color: AppColors.slate400, fontFamily: AppFonts.interRegular}}>{protocol}</Text>
83
- ) : null}
84
- <Text style={{color: AppColors.purple, fontFamily: AppFonts.interBold}}>{host}</Text>
85
- <Text style={{color: AppColors.slate700, fontFamily: AppFonts.interMedium}}>{pathname}</Text>
86
- {search ? (
87
- <Text style={{color: AppColors.teal600, fontFamily: AppFonts.interRegular}}>{search}</Text>
88
- ) : null}
89
- </Text>
90
- );
91
- } catch {
92
- return rawUrl;
93
- }
94
- };
95
-
96
- return (
97
- <View style={styles.metaContainer}>
98
- <Pressable onPress={toggleOpen} hitSlop={12}>
99
- <View style={styles.metaHeader}>
100
- <Text style={styles.metaTitle}>Metadata</Text>
101
- <View style={{flexDirection: 'row', alignItems: 'center', gap: 8}}>
102
- <CopyButton
103
- value={{
104
- status: status ?? 0,
105
- duration: duration != null ? `${duration} ms` : '—',
106
- size: size || '—',
107
- triggeredAt: triggeredAt || '',
108
- method: method || 'GET',
109
- contentType: contentType || 'application/json',
110
- url: url || '',
111
- }}
112
- label="Metadata"
113
- />
114
- <View style={chevronStyle}>
115
- <ChevronIcon color={AppColors.grayTextWeak} size={14} />
116
- </View>
117
- </View>
118
- </View>
119
- </Pressable>
120
-
121
- {isOpen && (
122
- <View style={styles.metaBody}>
123
- <View style={styles.metaRow}>
124
- <View style={styles.metaLabelRow}>
125
- <CalendarIcon color={AppColors.grayTextWeak} size={14} />
126
- <Text style={styles.metaLabel}>{t('network.triggeredAt')}</Text>
127
- </View>
128
- <Text
129
- style={[
130
- styles.metaValue,
131
- {color: AppColors.purple, fontSize: 12},
132
- ]}>
133
- {triggeredAt}
134
- </Text>
135
- </View>
136
- <View style={styles.metaDivider} />
137
-
138
- <View style={styles.metaRow}>
139
- <View style={styles.metaLabelRow}>
140
- <TerminalIcon color={AppColors.grayTextWeak} size={14} />
141
- <Text style={styles.metaLabel}>{t('network.methodHeader')}</Text>
142
- </View>
143
- <View
144
- style={[
145
- styles.statusChip,
146
- {
147
- borderColor: `${AppColors.brandPurple}40`,
148
- backgroundColor: `${AppColors.brandPurple}14`,
149
- },
150
- ]}>
151
- <Text
152
- style={[
153
- styles.statusText,
154
- {color: AppColors.purple, fontFamily: AppFonts.interBold},
155
- ]}>
156
- {method || 'GET'}
157
- </Text>
158
- </View>
159
- </View>
160
- <View style={styles.metaDivider} />
161
-
162
- <View style={styles.metaRow}>
163
- <View style={styles.metaLabelRow}>
164
- <StatusIcon color={AppColors.grayTextWeak} />
165
- <Text style={styles.metaLabel}>{t('network.statusHeader')}</Text>
166
- </View>
167
- <View
168
- style={[
169
- styles.statusChip,
170
- {
171
- borderColor: isFailed
172
- ? `${AppColors.errorColor}40`
173
- : `${statusColor}40`,
174
- backgroundColor: isFailed
175
- ? `${AppColors.errorColor}15`
176
- : `${statusColor}15`,
177
- },
178
- ]}>
179
- <Text
180
- style={[
181
- styles.statusText,
182
- {color: isFailed ? AppColors.errorColor : statusColor},
183
- ]}>
184
- {isFailed ? t('network.failedNetworkError') : String(status)}
185
- </Text>
186
- </View>
187
- </View>
188
- <View style={styles.metaDivider} />
189
-
190
- <View style={styles.metaRow}>
191
- <View style={styles.metaLabelRow}>
192
- <GlobeIcon color={AppColors.grayTextWeak} size={14} />
193
- <Text style={styles.metaLabel}>{t('network.contentType')}</Text>
194
- </View>
195
- <Text style={styles.metaValue}>
196
- {contentType || 'application/json'}
197
- </Text>
198
- </View>
199
- <View style={styles.metaDivider} />
200
-
201
- <View style={styles.metaRow}>
202
- <View style={styles.metaLabelRow}>
203
- <ClockIcon color={AppColors.grayTextWeak} size={14} />
204
- <Text style={styles.metaLabel}>{t('network.durationHeader')}</Text>
205
- </View>
206
- <View style={styles.metaValueRow}>
207
- {duration != null && !isFailed && (
208
- <View
209
- style={[
210
- styles.perfBadge,
211
- {
212
- backgroundColor: `${getDurationColor(duration)}15`,
213
- borderColor: `${getDurationColor(duration)}40`,
214
- },
215
- ]}>
216
- <Text
217
- style={[
218
- styles.perfBadgeText,
219
- {color: getDurationColor(duration)},
220
- ]}>
221
- {duration < DURATION_FAST_MS
222
- ? t('network.perf.fast')
223
- : duration < DURATION_SLOW_MS
224
- ? t('network.perf.moderate')
225
- : t('network.perf.slow')}
226
- </Text>
227
- </View>
228
- )}
229
- <Text style={styles.metaValue}>
230
- {duration != null ? `${duration} ms` : '—'}
231
- </Text>
232
- </View>
233
- </View>
234
-
235
- {/* Visual Latency Timing Breakdown Waterfall */}
236
- {duration != null && !isFailed && (
237
- <View style={{paddingVertical: 8, gap: 6}}>
238
- <View style={{flexDirection: 'row', justifyContent: 'space-between', alignItems: 'center'}}>
239
- <Text style={{fontFamily: AppFonts.interBold, fontSize: 11, color: AppColors.primaryBlack}}>
240
- {t('network.timingWaterfall')}
241
- </Text>
242
- <Text style={{fontFamily: AppFonts.interMedium, fontSize: 10.5, color: getDurationColor(duration)}}>
243
- {duration < DURATION_FAST_MS
244
- ? t('network.perf.fast')
245
- : duration < DURATION_SLOW_MS
246
- ? t('network.perf.moderate')
247
- : t('network.perf.slow')}
248
- </Text>
249
- </View>
250
-
251
- <View
252
- style={{
253
- height: 6,
254
- backgroundColor: AppColors.grayBorderSecondary,
255
- borderRadius: 3,
256
- overflow: 'hidden',
257
- }}>
258
- <View
259
- style={{
260
- height: '100%',
261
- width: `${Math.min(100, Math.max(8, (duration / 1200) * 100))}%`,
262
- backgroundColor: getDurationColor(duration),
263
- borderRadius: 3,
264
- }}
265
- />
266
- </View>
267
-
268
- <View style={{flexDirection: 'row', justifyContent: 'space-between', alignItems: 'center', marginTop: 1}}>
269
- <Text style={{fontFamily: AppFonts.interRegular, fontSize: 9.5, color: AppColors.grayTextWeak}}>
270
- 0 ms
271
- </Text>
272
- <Text style={{fontFamily: AppFonts.interBold, fontSize: 10, color: getDurationColor(duration)}}>
273
- {duration} ms
274
- </Text>
275
- <Text style={{fontFamily: AppFonts.interRegular, fontSize: 9.5, color: AppColors.grayTextWeak}}>
276
- 1,200+ ms
277
- </Text>
278
- </View>
279
- </View>
280
- )}
281
- <View style={styles.metaDivider} />
282
-
283
- <View style={styles.metaRow}>
284
- <View style={styles.metaLabelRow}>
285
- <SizeIcon color={AppColors.grayTextWeak} />
286
- <Text style={styles.metaLabel}>{t('network.sizeHeader')}</Text>
287
- </View>
288
- <Text style={styles.metaValue}>{size}</Text>
289
- </View>
290
- <View style={styles.metaDivider} />
291
-
292
- <View style={[styles.metaRow, {alignItems: 'flex-start', flexDirection: 'column', gap: 6}]}>
293
- <View style={{flexDirection: 'row', justifyContent: 'space-between', width: '100%', alignItems: 'center'}}>
294
- <View style={styles.metaLabelRow}>
295
- <GlobeIcon color={AppColors.grayTextWeak} size={14} />
296
- <Text style={styles.metaLabel}>{t('network.fullUrl')}</Text>
297
- </View>
298
-
299
- <View style={{flexDirection: 'row', alignItems: 'center', gap: 10}}>
300
- {url && url.length > 50 && (
301
- <TouchableScale onPress={() => setUrlExpanded(prev => !prev)} hitSlop={8}>
302
- <Text style={{
303
- fontFamily: AppFonts.interBold,
304
- fontSize: 10.5,
305
- color: AppColors.purple,
306
- }}>
307
- {urlExpanded ? t('network.showLess') : t('network.showMore')}
308
- </Text>
309
- </TouchableScale>
310
- )}
311
-
312
- {url && (
313
- <TouchableScale onPress={() => handleOpenExternalLink(url)} hitSlop={8}>
314
- <Text style={{
315
- fontFamily: AppFonts.interBold,
316
- fontSize: 10.5,
317
- color: AppColors.purple,
318
- textDecorationLine: 'underline',
319
- }}>
320
- {t('network.open')}
321
- </Text>
322
- </TouchableScale>
323
- )}
324
- </View>
325
- </View>
326
-
327
- <View style={{
328
- backgroundColor: AppColors.slate50,
329
- borderRadius: 8,
330
- padding: 8,
331
- borderWidth: 1.5,
332
- borderColor: AppColors.slate200,
333
- width: '100%',
334
- marginTop: 2,
335
- }}>
336
- <Text
337
- selectable={true}
338
- numberOfLines={urlExpanded ? undefined : 2}
339
- ellipsizeMode="tail"
340
- style={{
341
- fontSize: 11,
342
- textAlign: 'left',
343
- lineHeight: 16.5,
344
- }}>
345
- {renderFormattedUrl(url)}
346
- </Text>
347
- </View>
348
- </View>
349
- </View>
350
- )}
351
- </View>
352
- );
353
- };
354
-
355
- export default MetaAccordion;
@@ -1,42 +0,0 @@
1
- import React from 'react';
2
- import Svg, {Rect} from 'react-native-svg';
3
-
4
- const MiniBarChart = ({
5
- data,
6
- color,
7
- maxVal,
8
- }: {
9
- data: number[];
10
- color: string;
11
- maxVal?: number;
12
- }) => {
13
- if (!data || data.length === 0) return <Svg width={40} height={16} />;
14
- const max = maxVal || Math.max(...data, 1);
15
- const paddedData =
16
- data.length < 10
17
- ? [...Array(10 - data.length).fill(0), ...data]
18
- : data.slice(-10);
19
-
20
- return (
21
- <Svg width={40} height={16} viewBox="0 0 40 16">
22
- {paddedData.map((val, i) => {
23
- const h = Math.max((val / max) * 16, 2);
24
- const opacity = val === 0 && maxVal === 1 ? 0.2 : 1;
25
- return (
26
- <Rect
27
- key={i}
28
- x={i * 4}
29
- y={16 - h}
30
- width={2.5}
31
- height={h}
32
- fill={color}
33
- rx={1}
34
- opacity={opacity}
35
- />
36
- );
37
- })}
38
- </Svg>
39
- );
40
- };
41
-
42
- export default MiniBarChart;
@@ -1,33 +0,0 @@
1
- import React from 'react';
2
- import Svg, {Path} from 'react-native-svg';
3
-
4
- const MiniLineChart = ({data, color}: {data: number[]; color: string}) => {
5
- if (!data || data.length === 0) return <Svg width={40} height={16} />;
6
-
7
- const paddedData =
8
- data.length < 10
9
- ? [...Array(10 - data.length).fill(data[0] || 0), ...data]
10
- : data.slice(-10);
11
- const max = Math.max(...paddedData, 1);
12
- const min = Math.min(...paddedData, 0);
13
- const range = max - min || 1;
14
- const dx = 40 / 9;
15
- const points = paddedData
16
- .map((d, i) => `${i * dx},${14 - ((d - min) / range) * 12}`)
17
- .join(' L ');
18
-
19
- return (
20
- <Svg width={40} height={16} viewBox="0 0 40 16">
21
- <Path
22
- d={`M ${points}`}
23
- fill="none"
24
- stroke={color}
25
- strokeWidth={1.5}
26
- strokeLinecap="round"
27
- strokeLinejoin="round"
28
- />
29
- </Svg>
30
- );
31
- };
32
-
33
- export default MiniLineChart;