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,1545 +0,0 @@
1
- import React, {useMemo} from 'react';
2
- import {
3
- Alert,
4
- Animated,
5
- Linking,
6
- Platform,
7
- Pressable,
8
- ScrollView,
9
- Text,
10
- TouchableOpacity,
11
- useWindowDimensions,
12
- View,
13
- } from 'react-native';
14
- import LinearGradient from 'react-native-linear-gradient';
15
- import {useInspector} from './InspectorContext';
16
- import TouchableScale from '../TouchableScale';
17
- import AppHeaderLogo from '../AppHeaderLogo';
18
- import styles from '../../styles';
19
- import {AppColors} from '../../styles/AppColors';
20
- import {AppFonts} from '../../styles/AppFonts';
21
- import {METHOD_COLORS} from '../../constants';
22
- import {LIB_VERSION} from '../../constants';
23
- import {Method} from '../../types';
24
- import {
25
- getStatusColor,
26
- getAppName,
27
- formatTime,
28
- getSize,
29
- getAppVersionAndBuild,
30
- } from '../../helpers';
31
- import {
32
- getNativeDeviceMetrics,
33
- triggerNativeHaptic,
34
- } from '../../native/NativeInspector';
35
- import {ScreenCapture, CapturedMediaItem} from '../../capture';
36
- import {showToast} from '../../helpers/toast';
37
- import {UpdateAvailableModal} from './UpdateAvailableModal';
38
- import {MediaPreviewModal} from './MediaPreviewModal';
39
- import {
40
- WhiteBackNavigation,
41
- TrashIcon,
42
- SettingsIcon,
43
- CloseWhite,
44
- ClockIcon,
45
- SizeIcon,
46
- AppleIcon,
47
- AndroidIcon,
48
- NpmIcon,
49
- ResetIcon,
50
- BoltIcon,
51
- InfoCircleIcon,
52
- CameraIcon,
53
- VideoCameraIcon,
54
- } from '../NetworkIcons';
55
- import {useTranslation} from '../../i18n';
56
-
57
- const InspectorHeader = React.memo(() => {
58
- const {t} = useTranslation();
59
- const {
60
- modalHeightPercent,
61
- appIcon,
62
- selected,
63
- setSelected,
64
- selectedEvent,
65
- setSelectedEvent,
66
- selectedLog,
67
- setSelectedLog,
68
- selectedReduxSlice,
69
- setSelectedReduxSlice,
70
- selectedReduxAction,
71
- setSelectedReduxAction,
72
- reduxState,
73
- reduxLastActionMap,
74
- showHeaderInfo,
75
- setShowHeaderInfo,
76
- updateAvailable,
77
- latestNpmVersion,
78
- clearAnim,
79
- activePulseAnim,
80
- unreadPulseAnim,
81
- runClearAllWithAnimation,
82
- settingsPage,
83
- setSettingsPage,
84
- setSettingsActiveSubTab,
85
- isFeedbackOpen,
86
- setIsFeedbackOpen,
87
- resetToDefaults,
88
- closeModal,
89
- detailTitle,
90
- activeTab,
91
- environment,
92
- visible,
93
- selectedCrash,
94
- setSelectedCrash,
95
- } = useInspector();
96
-
97
- const {width: windowWidth} = useWindowDimensions();
98
- const isNarrow = windowWidth < 360;
99
- const isCompact = windowWidth < 400;
100
- const isTablet = windowWidth >= 600;
101
-
102
- const [showUpdateModal, setShowUpdateModal] = React.useState<boolean>(false);
103
- const [appVersionString, setAppVersionString] = React.useState<string>(() => {
104
- return getAppVersionAndBuild().formatted;
105
- });
106
-
107
- const [isRecording, setIsRecording] = React.useState<boolean>(false);
108
- const [recordingSeconds, setRecordingSeconds] = React.useState<number>(0);
109
- const recordingTimerRef = React.useRef<any>(null);
110
-
111
- React.useEffect(() => {
112
- ScreenCapture.isRecording()
113
- .then(active => {
114
- setIsRecording(active);
115
- })
116
- .catch(() => {});
117
- }, []);
118
-
119
- React.useEffect(() => {
120
- if (isRecording) {
121
- setRecordingSeconds(0);
122
- recordingTimerRef.current = setInterval(() => {
123
- setRecordingSeconds(s => s + 1);
124
- }, 1000);
125
- } else {
126
- if (recordingTimerRef.current) {
127
- clearInterval(recordingTimerRef.current);
128
- recordingTimerRef.current = null;
129
- }
130
- setRecordingSeconds(0);
131
- }
132
- return () => {
133
- if (recordingTimerRef.current) {
134
- clearInterval(recordingTimerRef.current);
135
- }
136
- };
137
- }, [isRecording]);
138
-
139
- const [previewMediaItem, setPreviewMediaItem] =
140
- React.useState<CapturedMediaItem | null>(null);
141
-
142
- const handleTakeScreenshot = React.useCallback(async () => {
143
- try {
144
- triggerNativeHaptic('light');
145
- const result = await ScreenCapture.takeScreenshot({
146
- format: 'png',
147
- quality: 0.9,
148
- hideInspector: true,
149
- });
150
- if (result) {
151
- triggerNativeHaptic('success');
152
- const newItem: CapturedMediaItem = {
153
- id: `screenshot_${result.timestamp}.png`,
154
- type: 'image',
155
- format: result.format,
156
- uri: result.uri,
157
- filename:
158
- result.uri.split('/').pop() || `screenshot_${result.timestamp}.png`,
159
- sizeBytes: result.sizeBytes,
160
- timestamp: result.timestamp,
161
- width: result.width,
162
- height: result.height,
163
- };
164
- setPreviewMediaItem(newItem);
165
- showToast(t('header.screenshotCaptured'));
166
- } else {
167
- showToast(t('header.screenshotFailed'));
168
- }
169
- } catch {
170
- showToast(t('header.screenshotError'));
171
- }
172
- }, [t]);
173
-
174
- const handleToggleVideoRecording = React.useCallback(async () => {
175
- try {
176
- if (isRecording) {
177
- triggerNativeHaptic('medium');
178
- const result = await ScreenCapture.stopRecording();
179
- setIsRecording(false);
180
- if (result) {
181
- triggerNativeHaptic('success');
182
- const newItem: CapturedMediaItem = {
183
- id: `video_${result.timestamp}.${result.format}`,
184
- type: result.format === 'gif' ? 'gif' : 'video',
185
- format: result.format,
186
- uri: result.uri,
187
- filename:
188
- result.uri.split('/').pop() ||
189
- `video_${result.timestamp}.${result.format}`,
190
- sizeBytes: result.sizeBytes,
191
- timestamp: result.timestamp,
192
- durationMs: result.durationMs,
193
- width: result.width,
194
- height: result.height,
195
- hasAudio: result.hasAudio,
196
- };
197
- setPreviewMediaItem(newItem);
198
- showToast(
199
- t('header.recordingSaved', {
200
- duration: (result.durationMs / 1000).toFixed(1),
201
- }),
202
- );
203
- }
204
- } else {
205
- triggerNativeHaptic('medium');
206
- const started = await ScreenCapture.startRecording({
207
- fps: 24,
208
- audioSource: 'none',
209
- });
210
- if (started) {
211
- setIsRecording(true);
212
- showToast(t('header.recordingStarted'));
213
- } else {
214
- showToast(t('header.recordingStartFailed'));
215
- }
216
- }
217
- } catch {
218
- showToast(t('header.recordingError'));
219
- setIsRecording(false);
220
- }
221
- }, [isRecording, t]);
222
-
223
- const formatTimer = (totalSeconds: number) => {
224
- const mins = Math.floor(totalSeconds / 60);
225
- const secs = totalSeconds % 60;
226
- return `${mins.toString().padStart(2, '0')}:${secs
227
- .toString()
228
- .padStart(2, '0')}`;
229
- };
230
-
231
- const envConfig = useMemo(() => {
232
- const rawEnv = (environment || (__DEV__ ? 'DEV' : 'PROD')).trim();
233
- const clean = rawEnv.toUpperCase();
234
-
235
- if (clean === 'DEV' || clean.includes('DEV') || clean === 'LOCAL') {
236
- return {
237
- label: rawEnv,
238
- bg: `${AppColors.emerald500}40`,
239
- border: `${AppColors.emerald400}8C`,
240
- text: AppColors.mintGreenBorder,
241
- };
242
- }
243
- if (clean === 'UAT' || clean === 'QA' || clean === 'TEST') {
244
- return {
245
- label: rawEnv,
246
- bg: `${AppColors.amber500}47`,
247
- border: `${AppColors.amber400}99`,
248
- text: AppColors.amberWarmBorder,
249
- };
250
- }
251
- if (clean === 'PREPROD' || clean === 'STAGE' || clean === 'STAGING') {
252
- return {
253
- label: rawEnv,
254
- bg: `${AppColors.purple500}47`,
255
- border: `${AppColors.purple400}99`,
256
- text: AppColors.violetSoftBorder,
257
- };
258
- }
259
- return {
260
- label: rawEnv,
261
- bg: `${AppColors.rose500}40`,
262
- border: `${AppColors.roseBorder}8C`,
263
- text: AppColors.errorBorder,
264
- };
265
- }, [environment]);
266
-
267
- const isDetailView =
268
- (activeTab === 'apis' && selected != null) ||
269
- (activeTab === 'analytics' && selectedEvent != null) ||
270
- (activeTab === 'logs' && selectedLog != null) ||
271
- (activeTab === 'redux' &&
272
- (selectedReduxSlice != null || selectedReduxAction != null)) ||
273
- (activeTab === 'crash' && selectedCrash != null);
274
-
275
- const isSettingsView = settingsPage !== null;
276
- const isAnySelected = isDetailView || isSettingsView || isFeedbackOpen;
277
-
278
- const settingsModuleTitle = useMemo(() => {
279
- switch (settingsPage) {
280
- case 'apis':
281
- return 'APIs (Network)';
282
- case 'logs':
283
- return 'Console Logs';
284
- case 'performance':
285
- return 'Performance Tracker';
286
- case 'bundle':
287
- return 'Bundle Analyzer';
288
- case 'crash':
289
- return 'Crash Protection';
290
- case 'analytics':
291
- return 'Analytics Logger';
292
- case 'redux':
293
- return 'Redux Inspector';
294
- default:
295
- return 'Settings & Modules';
296
- }
297
- }, [settingsPage]);
298
-
299
- const headerTopPadding =
300
- Platform.OS === 'ios' && modalHeightPercent >= 95 ? 44 : 0;
301
-
302
- const buttonSize = isNarrow ? 28 : isCompact ? 30 : 32;
303
- const logoSize = isNarrow ? 36 : isCompact ? 40 : 44;
304
-
305
- return (
306
- <>
307
- <View
308
- style={[
309
- styles.headerGradient,
310
- {
311
- minHeight: (isNarrow ? 48 : 52) + headerTopPadding,
312
- },
313
- ]}>
314
- {/* LinearGradient as absolute background layer to avoid Fabric view recycling crash.
315
- BVLinearGradient as a direct parent of conditionally-mounted children triggers
316
- RCTComponentViewRegistry 'Attempt to recycle a mounted view' assertion. */}
317
- <LinearGradient
318
- colors={[AppColors.indigo600, AppColors.violet600]}
319
- start={{x: 0, y: 0}}
320
- end={{x: 1, y: 1}}
321
- style={{
322
- position: 'absolute',
323
- top: 0,
324
- left: 0,
325
- right: 0,
326
- bottom: 0,
327
- borderTopLeftRadius: 20,
328
- borderTopRightRadius: 20,
329
- }}
330
- pointerEvents="none"
331
- />
332
- <View style={{paddingTop: headerTopPadding, width: '100%'}}>
333
- <View
334
- style={[
335
- styles.header,
336
- {
337
- paddingHorizontal: isNarrow ? 8 : 12,
338
- paddingVertical: isNarrow ? 6 : 8,
339
- minHeight: isNarrow ? 48 : 52,
340
- },
341
- ]}>
342
- <View
343
- style={{
344
- flexDirection: 'row',
345
- alignItems: 'center',
346
- gap: isNarrow ? 6 : 8,
347
- flexShrink: 0,
348
- flex: isAnySelected ? undefined : 1,
349
- minWidth: isAnySelected ? (isNarrow ? 32 : 36) : 0,
350
- }}>
351
- {isAnySelected && (
352
- <TouchableScale
353
- onPress={() => {
354
- if (isFeedbackOpen) {
355
- setIsFeedbackOpen(false);
356
- return;
357
- }
358
- if (isSettingsView) {
359
- if (settingsPage === 'main') {
360
- setSettingsPage(null);
361
- } else {
362
- setSettingsPage('main');
363
- }
364
- return;
365
- }
366
- setSelected(null);
367
- setSelectedEvent(null);
368
- setSelectedLog(null);
369
- setSelectedReduxSlice(null);
370
- setSelectedReduxAction(null);
371
- setSelectedCrash(null);
372
- }}
373
- hitSlop={15}
374
- style={{
375
- width: isNarrow ? 32 : 36,
376
- height: isNarrow ? 32 : 36,
377
- borderRadius: isNarrow ? 16 : 18,
378
- alignItems: 'center',
379
- justifyContent: 'center',
380
- backgroundColor: `${AppColors.white}2E`,
381
- borderWidth: 1,
382
- borderColor: `${AppColors.white}4D`,
383
- }}>
384
- <View
385
- style={{
386
- position: 'absolute',
387
- width: isNarrow ? 40 : 44,
388
- height: isNarrow ? 40 : 44,
389
- borderRadius: 22,
390
- backgroundColor: `${AppColors.white}1A`,
391
- }}
392
- />
393
- <WhiteBackNavigation />
394
- </TouchableScale>
395
- )}
396
-
397
- {isFeedbackOpen ? (
398
- <View style={{gap: 2, flex: 1, minWidth: 0}}>
399
- <View
400
- style={{
401
- flexDirection: 'row',
402
- alignItems: 'center',
403
- gap: 6,
404
- }}>
405
- <Text
406
- style={{
407
- fontFamily: AppFonts.interBold,
408
- fontSize: isNarrow ? 14 : 16,
409
- color: AppColors.white,
410
- letterSpacing: -0.2,
411
- }}
412
- numberOfLines={1}>
413
- Support & Feedback
414
- </Text>
415
- <View
416
- style={{
417
- backgroundColor: `${AppColors.white}26`,
418
- paddingHorizontal: isNarrow ? 4 : 6,
419
- paddingVertical: 1.5,
420
- borderRadius: 10,
421
- borderWidth: 1,
422
- borderColor: `${AppColors.white}20`,
423
- }}>
424
- <Text
425
- style={{
426
- fontFamily: AppFonts.interBold,
427
- fontSize: isNarrow ? 8 : 9,
428
- color: AppColors.white,
429
- }}>
430
- v{LIB_VERSION}
431
- </Text>
432
- </View>
433
- </View>
434
- <Text
435
- style={{
436
- fontFamily: AppFonts.interRegular,
437
- fontSize: isNarrow ? 9.5 : 10.5,
438
- color: `${AppColors.white}CC`,
439
- }}
440
- numberOfLines={1}>
441
- Direct line to maintainers & developers
442
- </Text>
443
- </View>
444
- ) : isSettingsView ? (
445
- <View style={{gap: 2, flex: 1, minWidth: 0}}>
446
- <View
447
- style={{
448
- flexDirection: 'row',
449
- alignItems: 'center',
450
- gap: 6,
451
- }}>
452
- <Text
453
- style={{
454
- fontFamily: AppFonts.interBold,
455
- fontSize: isNarrow ? 14 : 16,
456
- color: AppColors.white,
457
- letterSpacing: -0.2,
458
- }}
459
- numberOfLines={1}>
460
- {settingsModuleTitle}
461
- </Text>
462
- {settingsPage === 'main' && (
463
- <View
464
- style={{
465
- backgroundColor: `${AppColors.white}26`,
466
- paddingHorizontal: isNarrow ? 4 : 6,
467
- paddingVertical: 1.5,
468
- borderRadius: 10,
469
- borderWidth: 1,
470
- borderColor: `${AppColors.white}20`,
471
- }}>
472
- <Text
473
- style={{
474
- fontFamily: AppFonts.interBold,
475
- fontSize: isNarrow ? 8 : 9,
476
- color: AppColors.white,
477
- }}>
478
- v{LIB_VERSION}
479
- </Text>
480
- </View>
481
- )}
482
- </View>
483
- <Text
484
- style={{
485
- fontFamily: AppFonts.interRegular,
486
- fontSize: isNarrow ? 9.5 : 10.5,
487
- color: `${AppColors.white}CC`,
488
- }}
489
- numberOfLines={1}>
490
- {settingsPage === 'main'
491
- ? 'Manage modules and preferences'
492
- : 'Configure module parameters'}
493
- </Text>
494
- </View>
495
- ) : !isAnySelected ? (
496
- <View
497
- style={{
498
- flexDirection: 'row',
499
- alignItems: 'center',
500
- gap: isNarrow ? 6 : 8,
501
- flex: 1,
502
- minWidth: 0,
503
- marginRight: 4,
504
- }}>
505
- <AppHeaderLogo size={logoSize} customIcon={appIcon} />
506
- <View style={{gap: 2, flex: 1, minWidth: 0}}>
507
- <View
508
- style={{
509
- flexDirection: 'row',
510
- alignItems: 'center',
511
- gap: isNarrow ? 4 : 6,
512
- minWidth: 0,
513
- }}>
514
- <Text
515
- style={[
516
- styles.headerTitle,
517
- {
518
- fontSize: isNarrow ? 13.5 : isCompact ? 14.5 : 15.5,
519
- flexShrink: 1,
520
- paddingBottom: 0,
521
- },
522
- ]}
523
- numberOfLines={1}
524
- ellipsizeMode="tail">
525
- {getAppName()}
526
- </Text>
527
- <View
528
- style={[
529
- styles.envBadge,
530
- {
531
- backgroundColor: envConfig.bg,
532
- borderColor: envConfig.border,
533
- flexShrink: 0,
534
- paddingHorizontal: isNarrow ? 4.5 : 6,
535
- paddingVertical: 1.5,
536
- marginBottom: 0,
537
- },
538
- ]}>
539
- <Text
540
- style={[
541
- styles.envBadgeText,
542
- {
543
- color: envConfig.text,
544
- fontSize: isNarrow ? 8.5 : 9.5,
545
- },
546
- ]}>
547
- {envConfig.label}
548
- </Text>
549
- </View>
550
- {updateAvailable && (
551
- <Pressable
552
- hitSlop={10}
553
- onPress={() => setShowUpdateModal(true)}
554
- style={{
555
- flexDirection: 'row',
556
- alignItems: 'center',
557
- backgroundColor: AppColors.warningAmber,
558
- borderRadius: 5,
559
- paddingHorizontal: isNarrow ? 4 : 5.5,
560
- paddingVertical: 1.5,
561
- gap: 3,
562
- shadowColor: AppColors.warningAmber,
563
- shadowOffset: {width: 0, height: 1.5},
564
- shadowOpacity: 0.35,
565
- shadowRadius: 3,
566
- elevation: 3,
567
- flexShrink: 0,
568
- }}>
569
- <Animated.View
570
- style={{
571
- width: 5,
572
- height: 5,
573
- borderRadius: 2.5,
574
- backgroundColor: AppColors.white,
575
- opacity: activePulseAnim,
576
- transform: [{scale: unreadPulseAnim}],
577
- }}
578
- />
579
- {!isNarrow && (
580
- <Text
581
- style={{
582
- fontFamily: AppFonts.interBold,
583
- fontSize: 8.5,
584
- color: AppColors.white,
585
- letterSpacing: 0.3,
586
- }}>
587
- UPDATE
588
- </Text>
589
- )}
590
- <BoltIcon
591
- size={isNarrow ? 8 : 9}
592
- color={AppColors.white}
593
- />
594
- </Pressable>
595
- )}
596
- </View>
597
-
598
- {/* OS & NPM Version Representation */}
599
- <View
600
- style={{
601
- flexDirection: 'row',
602
- alignItems: 'center',
603
- gap: isNarrow ? 4 : 5,
604
- minWidth: 0,
605
- }}>
606
- <View
607
- style={{
608
- flexDirection: 'row',
609
- alignItems: 'center',
610
- backgroundColor: `${AppColors.white}1F`,
611
- borderRadius: 5,
612
- paddingHorizontal: isNarrow ? 4.5 : 6,
613
- paddingVertical: 2,
614
- gap: 3.5,
615
- borderWidth: 1,
616
- borderColor: `${AppColors.white}2E`,
617
- flexShrink: 1,
618
- minWidth: 0,
619
- }}>
620
- {Platform.OS === 'ios' ? (
621
- <AppleIcon
622
- color={`${AppColors.white}E6`}
623
- size={isNarrow ? 9 : 10}
624
- />
625
- ) : (
626
- <AndroidIcon
627
- color={`${AppColors.white}E6`}
628
- size={isNarrow ? 9 : 10}
629
- />
630
- )}
631
- <Text
632
- style={{
633
- fontFamily: AppFonts.interMedium,
634
- fontSize: isNarrow ? 8.5 : 9.5,
635
- color: `${AppColors.white}EB`,
636
- letterSpacing: 0.1,
637
- }}
638
- numberOfLines={1}
639
- ellipsizeMode="tail">
640
- {appVersionString}
641
- </Text>
642
- </View>
643
-
644
- <Pressable
645
- onPress={() => {
646
- if (updateAvailable) {
647
- setShowUpdateModal(true);
648
- } else {
649
- Linking.openURL(
650
- 'https://www.npmjs.com/package/react-native-inapp-inspector',
651
- ).catch(() => {});
652
- }
653
- }}
654
- style={{
655
- flexDirection: 'row',
656
- alignItems: 'center',
657
- backgroundColor: `${AppColors.white}1F`,
658
- borderRadius: 5,
659
- paddingHorizontal: isNarrow ? 4.5 : 6,
660
- paddingVertical: 2,
661
- gap: 3.5,
662
- borderWidth: 1,
663
- borderColor: `${AppColors.white}2E`,
664
- flexShrink: 0,
665
- }}>
666
- <NpmIcon
667
- size={isNarrow ? 9 : 10}
668
- color={AppColors.npmRedLight}
669
- />
670
- <Text
671
- style={{
672
- fontFamily: AppFonts.interMedium,
673
- fontSize: isNarrow ? 8.5 : 9.5,
674
- color: `${AppColors.white}EB`,
675
- letterSpacing: 0.1,
676
- }}
677
- numberOfLines={1}>
678
- v{LIB_VERSION}
679
- </Text>
680
- {updateAvailable && (
681
- <Text
682
- style={{
683
- fontFamily: AppFonts.interBold,
684
- fontSize: 8.5,
685
- color: AppColors.warningAmber,
686
- }}>
687
- ●
688
- </Text>
689
- )}
690
- </Pressable>
691
- </View>
692
- </View>
693
- </View>
694
- ) : null}
695
- </View>
696
-
697
- {isDetailView && (
698
- <View
699
- style={[
700
- styles.headerCenter,
701
- {paddingHorizontal: isNarrow ? 2 : 6},
702
- ]}>
703
- {activeTab === 'apis' && selected != null ? (
704
- <View style={styles.headerDetailCenter}>
705
- <View style={styles.headerDetailRow}>
706
- <View
707
- style={[
708
- styles.headerMethodBadge,
709
- {
710
- backgroundColor:
711
- METHOD_COLORS[selected.method as Method] ??
712
- AppColors.grayText,
713
- paddingHorizontal: isNarrow ? 5 : 6,
714
- paddingVertical: isNarrow ? 2 : 3,
715
- },
716
- ]}>
717
- <Text
718
- style={[
719
- styles.headerMethodText,
720
- {fontSize: isNarrow ? 9 : 10},
721
- ]}>
722
- {selected.method}
723
- </Text>
724
- </View>
725
- <Text
726
- style={[
727
- styles.headerDetailTitle,
728
- {fontSize: isNarrow ? 13.5 : 15},
729
- ]}
730
- numberOfLines={1}
731
- ellipsizeMode="middle">
732
- {detailTitle}
733
- </Text>
734
- </View>
735
- <View
736
- style={{
737
- flexDirection: 'row',
738
- alignItems: 'center',
739
- gap: isNarrow ? 4 : 6,
740
- marginTop: 3,
741
- paddingVertical: 1,
742
- }}>
743
- <View
744
- style={{
745
- flexDirection: 'row',
746
- alignItems: 'center',
747
- gap: 4,
748
- paddingHorizontal: isNarrow ? 6 : 8,
749
- paddingVertical: 2.5,
750
- borderRadius: 20,
751
- backgroundColor: `${getStatusColor(
752
- selected.status,
753
- )}26`,
754
- borderWidth: 1,
755
- borderColor: `${getStatusColor(selected.status)}55`,
756
- }}>
757
- <View
758
- style={[
759
- styles.headerStatusDot,
760
- {
761
- backgroundColor: getStatusColor(selected.status),
762
- width: isNarrow ? 6 : 7,
763
- height: isNarrow ? 6 : 7,
764
- },
765
- ]}
766
- />
767
- <Text
768
- style={[
769
- styles.headerSubTitle,
770
- {
771
- fontFamily: AppFonts.interBold,
772
- fontSize: isNarrow ? 10 : 11,
773
- },
774
- ]}>
775
- {selected.status === 0
776
- ? 'Failed'
777
- : selected.status ?? 'Pending'}
778
- </Text>
779
- </View>
780
- <View
781
- style={{
782
- flexDirection: 'row',
783
- alignItems: 'center',
784
- gap: 4,
785
- paddingHorizontal: isNarrow ? 6 : 8,
786
- paddingVertical: 2.5,
787
- borderRadius: 20,
788
- backgroundColor: `${AppColors.white}29`,
789
- }}>
790
- <ClockIcon
791
- color={AppColors.white}
792
- size={isNarrow ? 10 : 11}
793
- />
794
- <Text
795
- style={[
796
- styles.headerSubTitle,
797
- {fontSize: isNarrow ? 10 : 11},
798
- ]}>
799
- {selected.duration != null
800
- ? `${selected.duration}ms`
801
- : '—'}
802
- </Text>
803
- </View>
804
- {selected.response != null && (
805
- <View
806
- style={{
807
- flexDirection: 'row',
808
- alignItems: 'center',
809
- gap: 4,
810
- paddingHorizontal: isNarrow ? 6 : 8,
811
- paddingVertical: 2.5,
812
- borderRadius: 20,
813
- backgroundColor: `${AppColors.white}29`,
814
- }}>
815
- <SizeIcon
816
- color={AppColors.white}
817
- size={isNarrow ? 10 : 11}
818
- />
819
- <Text
820
- style={[
821
- styles.headerSubTitle,
822
- {fontSize: isNarrow ? 10 : 11},
823
- ]}>
824
- {getSize(selected.response)}
825
- </Text>
826
- </View>
827
- )}
828
- </View>
829
- </View>
830
- ) : activeTab === 'analytics' && selectedEvent != null ? (
831
- <View style={styles.headerDetailCenter}>
832
- <View style={styles.headerDetailRow}>
833
- <View
834
- style={[
835
- styles.headerMethodBadge,
836
- {
837
- backgroundColor:
838
- selectedEvent.source === 'firebase'
839
- ? `${AppColors.firebaseOrange}4D`
840
- : `${AppColors.purple}4D`,
841
- paddingHorizontal: isNarrow ? 5 : 6,
842
- paddingVertical: isNarrow ? 2 : 3,
843
- },
844
- ]}>
845
- <Text
846
- style={[
847
- styles.headerMethodText,
848
- {fontSize: isNarrow ? 9 : 10},
849
- ]}>
850
- {selectedEvent.source === 'firebase' ? 'FB' : 'MAN'}
851
- </Text>
852
- </View>
853
- <Text
854
- style={[
855
- styles.headerDetailTitle,
856
- {fontSize: isNarrow ? 13.5 : 15},
857
- ]}
858
- numberOfLines={1}
859
- ellipsizeMode="middle">
860
- {selectedEvent.name}
861
- </Text>
862
- </View>
863
- <View
864
- style={{
865
- flexDirection: 'row',
866
- alignItems: 'center',
867
- gap: isNarrow ? 4 : 6,
868
- marginTop: 3,
869
- paddingVertical: 1,
870
- }}>
871
- <View
872
- style={[
873
- styles.headerStatusDot,
874
- {
875
- backgroundColor:
876
- selectedEvent.source === 'firebase'
877
- ? AppColors.firebaseOrange
878
- : AppColors.purple,
879
- width: isNarrow ? 6 : 7,
880
- height: isNarrow ? 6 : 7,
881
- },
882
- ]}
883
- />
884
- <Text
885
- style={[
886
- styles.headerSubTitle,
887
- {fontSize: isNarrow ? 10 : 11},
888
- ]}>
889
- {Object.keys(selectedEvent.params).length} param
890
- {Object.keys(selectedEvent.params).length !== 1
891
- ? 's'
892
- : ''}
893
- {' · '}
894
- {selectedEvent.source}
895
- </Text>
896
- </View>
897
- </View>
898
- ) : activeTab === 'logs' && selectedLog != null ? (
899
- <View style={styles.headerDetailCenter}>
900
- <View style={styles.headerDetailRow}>
901
- <View
902
- style={[
903
- styles.headerMethodBadge,
904
- {
905
- backgroundColor:
906
- selectedLog.type === 'error'
907
- ? `${AppColors.errorColor}4D`
908
- : selectedLog.type === 'warn'
909
- ? `${AppColors.lightOrange}4D`
910
- : `${AppColors.purple}4D`,
911
- paddingHorizontal: isNarrow ? 5 : 6,
912
- paddingVertical: isNarrow ? 2 : 3,
913
- },
914
- ]}>
915
- <Text
916
- style={[
917
- styles.headerMethodText,
918
- {fontSize: isNarrow ? 9 : 10},
919
- ]}>
920
- {selectedLog.type.toUpperCase()}
921
- </Text>
922
- </View>
923
- <Text
924
- style={[
925
- styles.headerDetailTitle,
926
- {fontSize: isNarrow ? 13.5 : 15},
927
- ]}
928
- numberOfLines={1}
929
- ellipsizeMode="middle">
930
- console.
931
- {selectedLog.sourceMethod || selectedLog.type || 'log'}
932
- </Text>
933
- </View>
934
- <View
935
- style={{
936
- flexDirection: 'row',
937
- alignItems: 'center',
938
- gap: isNarrow ? 4 : 6,
939
- marginTop: 3,
940
- paddingVertical: 1,
941
- }}>
942
- <View
943
- style={{
944
- flexDirection: 'row',
945
- alignItems: 'center',
946
- gap: 4,
947
- paddingHorizontal: isNarrow ? 6 : 8,
948
- paddingVertical: 2.5,
949
- borderRadius: 20,
950
- backgroundColor: `${AppColors.white}29`,
951
- }}>
952
- <ClockIcon
953
- color={AppColors.white}
954
- size={isNarrow ? 10 : 11}
955
- />
956
- <Text
957
- style={[
958
- styles.headerSubTitle,
959
- {fontSize: isNarrow ? 10 : 11},
960
- ]}>
961
- {formatTime(selectedLog.timestamp)}
962
- </Text>
963
- </View>
964
- </View>
965
- </View>
966
- ) : activeTab === 'redux' && selectedReduxSlice != null ? (
967
- (() => {
968
- const sliceData = reduxState?.[selectedReduxSlice];
969
- const keyCount =
970
- sliceData && typeof sliceData === 'object'
971
- ? Object.keys(sliceData).length
972
- : typeof sliceData !== 'undefined'
973
- ? 1
974
- : 0;
975
- const sliceSize = getSize(sliceData);
976
- const lastAction = reduxLastActionMap[selectedReduxSlice];
977
-
978
- return (
979
- <View style={styles.headerDetailCenter}>
980
- <View style={styles.headerDetailRow}>
981
- <View
982
- style={[
983
- styles.headerMethodBadge,
984
- {
985
- backgroundColor: `${AppColors.purple}4D`,
986
- paddingHorizontal: isNarrow ? 5 : 6,
987
- paddingVertical: isNarrow ? 2 : 3,
988
- },
989
- ]}>
990
- <Text
991
- style={[
992
- styles.headerMethodText,
993
- {fontSize: isNarrow ? 9 : 10},
994
- ]}>
995
- SLICE
996
- </Text>
997
- </View>
998
- <Text
999
- style={[
1000
- styles.headerDetailTitle,
1001
- {fontSize: isNarrow ? 13.5 : 15},
1002
- ]}
1003
- numberOfLines={1}
1004
- ellipsizeMode="middle">
1005
- {selectedReduxSlice}
1006
- </Text>
1007
- </View>
1008
- <View
1009
- style={{
1010
- flexDirection: 'row',
1011
- alignItems: 'center',
1012
- gap: isNarrow ? 4 : 6,
1013
- marginTop: 3,
1014
- paddingVertical: 1,
1015
- }}>
1016
- <View
1017
- style={[
1018
- styles.headerStatusDot,
1019
- {
1020
- backgroundColor: AppColors.liveGreen,
1021
- width: isNarrow ? 6 : 7,
1022
- height: isNarrow ? 6 : 7,
1023
- },
1024
- ]}
1025
- />
1026
- <Text
1027
- style={[
1028
- styles.headerSubTitle,
1029
- {fontSize: isNarrow ? 10 : 11},
1030
- ]}>
1031
- Live
1032
- </Text>
1033
- <Text
1034
- style={[
1035
- styles.headerSubTitle,
1036
- {opacity: 0.6, fontSize: isNarrow ? 10 : 11},
1037
- ]}>
1038
- •
1039
- </Text>
1040
- <Text
1041
- style={[
1042
- styles.headerSubTitle,
1043
- {fontSize: isNarrow ? 10 : 11},
1044
- ]}>
1045
- {keyCount} keys
1046
- </Text>
1047
- <Text
1048
- style={[
1049
- styles.headerSubTitle,
1050
- {opacity: 0.6, fontSize: isNarrow ? 10 : 11},
1051
- ]}>
1052
- •
1053
- </Text>
1054
- <Text
1055
- style={[
1056
- styles.headerSubTitle,
1057
- {fontSize: isNarrow ? 10 : 11},
1058
- ]}>
1059
- {sliceSize}
1060
- </Text>
1061
- {lastAction?.timestamp && (
1062
- <>
1063
- <Text
1064
- style={[
1065
- styles.headerSubTitle,
1066
- {opacity: 0.6, fontSize: isNarrow ? 10 : 11},
1067
- ]}>
1068
- •
1069
- </Text>
1070
- <View
1071
- style={{
1072
- flexDirection: 'row',
1073
- alignItems: 'center',
1074
- gap: 3,
1075
- }}>
1076
- <ClockIcon
1077
- color={AppColors.white}
1078
- size={isNarrow ? 9 : 10}
1079
- />
1080
- <Text
1081
- style={[
1082
- styles.headerSubTitle,
1083
- {fontSize: isNarrow ? 10 : 11},
1084
- ]}>
1085
- {lastAction.timestamp}
1086
- </Text>
1087
- </View>
1088
- </>
1089
- )}
1090
- </View>
1091
- </View>
1092
- );
1093
- })()
1094
- ) : activeTab === 'redux' && selectedReduxAction != null ? (
1095
- <View style={styles.headerDetailCenter}>
1096
- <View style={styles.headerDetailRow}>
1097
- <View
1098
- style={[
1099
- styles.headerMethodBadge,
1100
- {
1101
- backgroundColor: `${AppColors.brandPurple}4D`,
1102
- paddingHorizontal: isNarrow ? 5 : 6,
1103
- paddingVertical: isNarrow ? 2 : 3,
1104
- },
1105
- ]}>
1106
- <Text
1107
- style={[
1108
- styles.headerMethodText,
1109
- {fontSize: isNarrow ? 9 : 10},
1110
- ]}>
1111
- ACTION
1112
- </Text>
1113
- </View>
1114
- <Text
1115
- style={[
1116
- styles.headerDetailTitle,
1117
- {fontSize: isNarrow ? 13.5 : 15},
1118
- ]}
1119
- numberOfLines={1}
1120
- ellipsizeMode="middle">
1121
- {selectedReduxAction.type}
1122
- </Text>
1123
- </View>
1124
- <View
1125
- style={{
1126
- flexDirection: 'row',
1127
- alignItems: 'center',
1128
- gap: isNarrow ? 4 : 6,
1129
- marginTop: 3,
1130
- paddingVertical: 1,
1131
- }}>
1132
- <View
1133
- style={[
1134
- styles.headerStatusDot,
1135
- {
1136
- backgroundColor: AppColors.purple,
1137
- width: isNarrow ? 6 : 7,
1138
- height: isNarrow ? 6 : 7,
1139
- },
1140
- ]}
1141
- />
1142
- <Text
1143
- style={[
1144
- styles.headerSubTitle,
1145
- {fontSize: isNarrow ? 10 : 11},
1146
- ]}>
1147
- {selectedReduxAction.timestamp || 'Dispatched'}
1148
- </Text>
1149
- </View>
1150
- </View>
1151
- ) : activeTab === 'crash' && selectedCrash != null ? (
1152
- <View style={styles.headerDetailCenter}>
1153
- <View style={styles.headerDetailRow}>
1154
- <View
1155
- style={[
1156
- styles.headerMethodBadge,
1157
- {
1158
- backgroundColor: selectedCrash.isFatal
1159
- ? AppColors.red600
1160
- : AppColors.amber600,
1161
- paddingHorizontal: isNarrow ? 5 : 6,
1162
- paddingVertical: isNarrow ? 2 : 3,
1163
- },
1164
- ]}>
1165
- <Text
1166
- style={[
1167
- styles.headerMethodText,
1168
- {fontSize: isNarrow ? 9 : 10},
1169
- ]}>
1170
- {selectedCrash.isFatal
1171
- ? 'FATAL'
1172
- : selectedCrash.type.toUpperCase()}
1173
- </Text>
1174
- </View>
1175
- <Text
1176
- style={[
1177
- styles.headerDetailTitle,
1178
- {fontSize: isNarrow ? 13.5 : 15},
1179
- ]}
1180
- numberOfLines={1}
1181
- ellipsizeMode="middle">
1182
- {selectedCrash.name || selectedCrash.message}
1183
- </Text>
1184
- </View>
1185
- <View
1186
- style={{
1187
- flexDirection: 'row',
1188
- alignItems: 'center',
1189
- gap: isNarrow ? 4 : 6,
1190
- marginTop: 3,
1191
- paddingVertical: 1,
1192
- }}>
1193
- <View
1194
- style={[
1195
- styles.headerStatusDot,
1196
- {
1197
- backgroundColor: selectedCrash.isFatal
1198
- ? AppColors.red600
1199
- : AppColors.amber500,
1200
- width: isNarrow ? 6 : 7,
1201
- height: isNarrow ? 6 : 7,
1202
- },
1203
- ]}
1204
- />
1205
- <Text
1206
- style={[
1207
- styles.headerSubTitle,
1208
- {fontSize: isNarrow ? 10 : 11},
1209
- ]}>
1210
- {selectedCrash.timeStr ||
1211
- new Date(
1212
- selectedCrash.timestamp,
1213
- ).toLocaleTimeString()}
1214
- </Text>
1215
- {selectedCrash.deviceInfo?.platform && (
1216
- <>
1217
- <Text
1218
- style={[
1219
- styles.headerSubTitle,
1220
- {opacity: 0.6, fontSize: isNarrow ? 10 : 11},
1221
- ]}>
1222
- •
1223
- </Text>
1224
- <Text
1225
- style={[
1226
- styles.headerSubTitle,
1227
- {fontSize: isNarrow ? 10 : 11},
1228
- ]}>
1229
- {selectedCrash.deviceInfo.platform.toUpperCase()}
1230
- </Text>
1231
- </>
1232
- )}
1233
- </View>
1234
- </View>
1235
- ) : null}
1236
- </View>
1237
- )}
1238
-
1239
- <View
1240
- style={[
1241
- styles.headerRight,
1242
- {
1243
- flexDirection: 'row',
1244
- alignItems: 'center',
1245
- justifyContent: 'flex-end',
1246
- flexShrink: 0,
1247
- gap: isNarrow ? 5 : 7,
1248
- },
1249
- ]}>
1250
- {isSettingsView && (
1251
- <TouchableScale
1252
- onPress={() => {
1253
- Alert.alert(
1254
- 'Reset All Settings',
1255
- 'This restores all module visibility and UI preferences to defaults. Continue?',
1256
- [
1257
- {text: 'Cancel', style: 'cancel'},
1258
- {
1259
- text: 'Reset',
1260
- style: 'destructive',
1261
- onPress: resetToDefaults,
1262
- },
1263
- ],
1264
- );
1265
- }}
1266
- hitSlop={15}
1267
- style={[
1268
- styles.closeButtonSquare,
1269
- {
1270
- width: buttonSize,
1271
- height: buttonSize,
1272
- borderRadius: isNarrow ? 6 : 7,
1273
- },
1274
- ]}>
1275
- <ResetIcon
1276
- color={AppColors.white}
1277
- size={isNarrow ? 12 : 14}
1278
- />
1279
- </TouchableScale>
1280
- )}
1281
-
1282
- {!isAnySelected && (
1283
- <TouchableScale
1284
- accessible={true}
1285
- accessibilityRole="button"
1286
- accessibilityLabel="Settings"
1287
- onPress={() => setSettingsPage('main')}
1288
- hitSlop={15}
1289
- style={[
1290
- styles.closeButtonSquare,
1291
- {
1292
- width: buttonSize,
1293
- height: buttonSize,
1294
- borderRadius: isNarrow ? 6 : 7,
1295
- },
1296
- ]}>
1297
- <SettingsIcon
1298
- color={AppColors.white}
1299
- size={isNarrow ? 12 : 14}
1300
- />
1301
- </TouchableScale>
1302
- )}
1303
-
1304
- <TouchableOpacity
1305
- onPress={closeModal}
1306
- hitSlop={{top: 12, bottom: 12, left: 12, right: 12}}
1307
- activeOpacity={0.6}
1308
- style={[
1309
- styles.closeButtonSquare,
1310
- {
1311
- width: buttonSize,
1312
- height: buttonSize,
1313
- borderRadius: isNarrow ? 6 : 7,
1314
- },
1315
- ]}>
1316
- <CloseWhite size={isNarrow ? 12 : 14} />
1317
- </TouchableOpacity>
1318
- </View>
1319
- </View>
1320
-
1321
- {/* Secondary Action Header (Sub-Toolbar) */}
1322
- {!isAnySelected && (
1323
- <View
1324
- style={{
1325
- flexDirection: 'row',
1326
- alignItems: 'center',
1327
- justifyContent: 'space-between',
1328
- paddingHorizontal: isNarrow ? 8 : 12,
1329
- paddingBottom: isNarrow ? 6 : 8,
1330
- paddingTop: 0,
1331
- gap: 6,
1332
- }}>
1333
- <View
1334
- style={{flexDirection: 'row', alignItems: 'center', gap: 6}}>
1335
- {/* Photo Capture Button */}
1336
- <TouchableScale
1337
- onPress={handleTakeScreenshot}
1338
- style={{
1339
- flexDirection: 'row',
1340
- alignItems: 'center',
1341
- gap: 4.5,
1342
- backgroundColor: `${AppColors.white}24`,
1343
- paddingHorizontal: isNarrow ? 8 : 10,
1344
- paddingVertical: isNarrow ? 4 : 5,
1345
- borderRadius: 6,
1346
- borderWidth: 1,
1347
- borderColor: `${AppColors.white}33`,
1348
- }}>
1349
- <CameraIcon
1350
- size={isNarrow ? 12 : 13}
1351
- color={AppColors.white}
1352
- />
1353
- <Text
1354
- style={{
1355
- fontFamily: AppFonts.interSemiBold,
1356
- fontSize: isNarrow ? 10 : 11,
1357
- color: AppColors.white,
1358
- }}>
1359
- {t('header.photo')}
1360
- </Text>
1361
- </TouchableScale>
1362
-
1363
- {/* Video / GIF Record Button */}
1364
- <TouchableScale
1365
- onPress={handleToggleVideoRecording}
1366
- style={{
1367
- flexDirection: 'row',
1368
- alignItems: 'center',
1369
- gap: 4.5,
1370
- backgroundColor: isRecording
1371
- ? `${AppColors.red500}33`
1372
- : `${AppColors.white}24`,
1373
- paddingHorizontal: isNarrow ? 8 : 10,
1374
- paddingVertical: isNarrow ? 4 : 5,
1375
- borderRadius: 6,
1376
- borderWidth: 1,
1377
- borderColor: isRecording
1378
- ? AppColors.red500
1379
- : `${AppColors.white}33`,
1380
- }}>
1381
- {isRecording ? (
1382
- <Animated.View
1383
- style={{
1384
- width: 6,
1385
- height: 6,
1386
- borderRadius: 3,
1387
- backgroundColor: AppColors.red500,
1388
- }}
1389
- />
1390
- ) : (
1391
- <VideoCameraIcon
1392
- size={isNarrow ? 12 : 13}
1393
- color={AppColors.white}
1394
- />
1395
- )}
1396
- <Text
1397
- style={{
1398
- fontFamily: AppFonts.interSemiBold,
1399
- fontSize: isNarrow ? 10 : 11,
1400
- color: isRecording ? AppColors.red300 : AppColors.white,
1401
- }}>
1402
- {isRecording
1403
- ? `${t('header.rec')} ${formatTimer(recordingSeconds)}`
1404
- : t('header.record')}
1405
- </Text>
1406
- </TouchableScale>
1407
- </View>
1408
-
1409
- <View
1410
- style={{flexDirection: 'row', alignItems: 'center', gap: 6}}>
1411
- {/* Clear All Action */}
1412
- <TouchableScale
1413
- onPress={() => {
1414
- Alert.alert(
1415
- t('header.clearEverythingTitle'),
1416
- t('header.clearEverythingMessage'),
1417
- [
1418
- {text: t('common.cancel'), style: 'cancel'},
1419
- {
1420
- text: t('common.clearAll'),
1421
- onPress: runClearAllWithAnimation,
1422
- style: 'destructive',
1423
- },
1424
- ],
1425
- );
1426
- }}
1427
- style={{
1428
- flexDirection: 'row',
1429
- alignItems: 'center',
1430
- gap: 4,
1431
- backgroundColor: `${AppColors.white}1A`,
1432
- paddingHorizontal: isNarrow ? 7 : 9,
1433
- paddingVertical: isNarrow ? 4 : 5,
1434
- borderRadius: 6,
1435
- borderWidth: 1,
1436
- borderColor: `${AppColors.white}26`,
1437
- }}>
1438
- <Animated.View
1439
- style={{
1440
- transform: [
1441
- {
1442
- rotate: clearAnim.interpolate({
1443
- inputRange: [0, 1],
1444
- outputRange: ['0deg', '-25deg'],
1445
- }),
1446
- },
1447
- {
1448
- scale: clearAnim.interpolate({
1449
- inputRange: [0, 0.5, 1],
1450
- outputRange: [1, 1.25, 1],
1451
- }),
1452
- },
1453
- ],
1454
- }}>
1455
- <TrashIcon
1456
- color={AppColors.white}
1457
- size={isNarrow ? 11 : 12}
1458
- />
1459
- </Animated.View>
1460
- <Text
1461
- style={{
1462
- fontFamily: AppFonts.interMedium,
1463
- fontSize: isNarrow ? 10 : 11,
1464
- color: `${AppColors.white}E6`,
1465
- }}>
1466
- {t('header.clear')}
1467
- </Text>
1468
- </TouchableScale>
1469
-
1470
- {/* About Action */}
1471
- <TouchableScale
1472
- onPress={() => {
1473
- setSettingsActiveSubTab('about');
1474
- setSettingsPage('main');
1475
- }}
1476
- style={{
1477
- flexDirection: 'row',
1478
- alignItems: 'center',
1479
- gap: 4,
1480
- backgroundColor: `${AppColors.white}1A`,
1481
- paddingHorizontal: isNarrow ? 7 : 9,
1482
- paddingVertical: isNarrow ? 4 : 5,
1483
- borderRadius: 6,
1484
- borderWidth: 1,
1485
- borderColor: `${AppColors.white}26`,
1486
- }}>
1487
- <InfoCircleIcon
1488
- color={AppColors.white}
1489
- size={isNarrow ? 11 : 12}
1490
- />
1491
- <Text
1492
- style={{
1493
- fontFamily: AppFonts.interMedium,
1494
- fontSize: isNarrow ? 10 : 11,
1495
- color: `${AppColors.white}E6`,
1496
- }}>
1497
- {t('header.about')}
1498
- </Text>
1499
- </TouchableScale>
1500
- </View>
1501
- </View>
1502
- )}
1503
- </View>
1504
- </View>
1505
-
1506
- {/* Dedicated Update Available Details Modal */}
1507
- <UpdateAvailableModal
1508
- visible={showUpdateModal}
1509
- latestVersion={latestNpmVersion}
1510
- onClose={() => setShowUpdateModal(false)}
1511
- />
1512
-
1513
- {/* Instant Media Preview Modal for Screenshots and Video Recordings */}
1514
- <MediaPreviewModal
1515
- item={previewMediaItem}
1516
- visible={!!previewMediaItem}
1517
- onClose={() => setPreviewMediaItem(null)}
1518
- onDelete={async item => {
1519
- await ScreenCapture.deleteMedia(item.uri);
1520
- setPreviewMediaItem(null);
1521
- }}
1522
- onConvertToGif={async item => {
1523
- const gif = await ScreenCapture.convertToGif(item.uri, {
1524
- fps: 12,
1525
- width: 480,
1526
- });
1527
- if (gif) {
1528
- setPreviewMediaItem({
1529
- id: `anim_${gif.timestamp}.gif`,
1530
- type: 'gif',
1531
- format: 'gif',
1532
- uri: gif.uri,
1533
- filename: gif.uri.split('/').pop() || `anim_${gif.timestamp}.gif`,
1534
- sizeBytes: gif.sizeBytes,
1535
- timestamp: gif.timestamp,
1536
- durationMs: gif.durationMs,
1537
- });
1538
- }
1539
- }}
1540
- />
1541
- </>
1542
- );
1543
- });
1544
-
1545
- export default InspectorHeader;