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,590 +0,0 @@
1
- import React, {useCallback, useEffect, useRef, useState} from 'react';
2
- import {
3
- Animated,
4
- PanResponder,
5
- Platform,
6
- StyleSheet,
7
- Text,
8
- TouchableOpacity,
9
- useWindowDimensions,
10
- View,
11
- } from 'react-native';
12
- import LinearGradient from 'react-native-linear-gradient';
13
- import {useInspector} from './InspectorContext';
14
- import TouchableScale from '../TouchableScale';
15
- import AppHeaderLogo from '../AppHeaderLogo';
16
- import BrandCircleIcon from '../BrandCircleIcon';
17
- import {
18
- AndroidIcon,
19
- AppleIcon,
20
- CameraIcon,
21
- NpmIcon,
22
- VideoCameraIcon,
23
- } from '../NetworkIcons';
24
- import {CapturedMediaItem, ScreenCapture} from '../../capture';
25
- import {triggerNativeHaptic} from '../../native/NativeInspector';
26
- import {showToast} from '../../helpers/toast';
27
- import {getAppName, getAppVersionAndBuild} from '../../helpers';
28
- import {LIB_VERSION} from '../../constants';
29
- import {AppColors} from '../../styles/AppColors';
30
- import {AppFonts} from '../../styles/AppFonts';
31
- import styles from '../../styles';
32
- import {useTranslation} from '../../i18n';
33
- import {MediaPreviewModal} from './MediaPreviewModal';
34
-
35
- const FabLauncher = () => {
36
- const {
37
- setVisible,
38
- isMinimized,
39
- setIsMinimized,
40
- appIcon,
41
- fabPan,
42
- fabPanResponder,
43
- fabDraggedRef,
44
- pulseAnim,
45
- fabShineAnim,
46
- unreadPulseAnim,
47
- logs,
48
- analyticsEvents,
49
- refreshMediaCount,
50
- } = useInspector();
51
- const {width: screenWidth} = useWindowDimensions();
52
- const {t} = useTranslation();
53
-
54
- const [appVersionString] = useState<string>(() => {
55
- return getAppVersionAndBuild().formatted;
56
- });
57
-
58
- const [isRecording, setIsRecording] = useState(false);
59
- const [recordingSeconds, setRecordingSeconds] = useState(0);
60
- const recordingTimerRef = useRef<NodeJS.Timeout | null>(null);
61
- const [previewMediaItem, setPreviewMediaItem] =
62
- useState<CapturedMediaItem | null>(null);
63
-
64
- // Draggable pan responder for the minimized floating player bar
65
- const playerPan = useRef(new Animated.ValueXY({x: 0, y: 0})).current;
66
- const playerPanRef = useRef({x: 0, y: 0});
67
- useEffect(() => {
68
- const idX = playerPan.x.addListener(v => (playerPanRef.current.x = v.value));
69
- const idY = playerPan.y.addListener(v => (playerPanRef.current.y = v.value));
70
- return () => {
71
- playerPan.x.removeListener(idX);
72
- playerPan.y.removeListener(idY);
73
- };
74
- }, [playerPan]);
75
- const playerDraggedRef = useRef(false);
76
- const playerPanResponder = useRef(
77
- PanResponder.create({
78
- onStartShouldSetPanResponder: () => false,
79
- onMoveShouldSetPanResponder: (_e, g) =>
80
- Math.abs(g.dx) > 4 || Math.abs(g.dy) > 4,
81
- onPanResponderGrant: () => {
82
- playerDraggedRef.current = true;
83
- playerPan.setOffset({
84
- x: playerPanRef.current.x,
85
- y: playerPanRef.current.y,
86
- });
87
- playerPan.setValue({x: 0, y: 0});
88
- },
89
- onPanResponderMove: Animated.event(
90
- [null, {dx: playerPan.x, dy: playerPan.y}],
91
- {useNativeDriver: false},
92
- ),
93
- onPanResponderRelease: () => {
94
- playerPan.flattenOffset();
95
- setTimeout(() => {
96
- playerDraggedRef.current = false;
97
- }, 50);
98
- },
99
- onPanResponderTerminate: () => {
100
- playerPan.flattenOffset();
101
- playerDraggedRef.current = false;
102
- },
103
- }),
104
- ).current;
105
-
106
- // Sync initial recording state
107
- useEffect(() => {
108
- ScreenCapture.isRecording()
109
- .then(active => {
110
- setIsRecording(Boolean(active));
111
- })
112
- .catch(() => {});
113
- }, []);
114
-
115
- // Timer tick for video recording
116
- useEffect(() => {
117
- if (isRecording) {
118
- setRecordingSeconds(0);
119
- recordingTimerRef.current = setInterval(() => {
120
- setRecordingSeconds(prev => prev + 1);
121
- }, 1000);
122
- } else {
123
- if (recordingTimerRef.current) {
124
- clearInterval(recordingTimerRef.current);
125
- recordingTimerRef.current = null;
126
- }
127
- setRecordingSeconds(0);
128
- }
129
- return () => {
130
- if (recordingTimerRef.current) {
131
- clearInterval(recordingTimerRef.current);
132
- }
133
- };
134
- }, [isRecording]);
135
-
136
- const handleTakeScreenshot = useCallback(async () => {
137
- if (playerDraggedRef.current) return;
138
- try {
139
- triggerNativeHaptic('light');
140
- const result = await ScreenCapture.takeScreenshot({
141
- format: 'png',
142
- quality: 0.9,
143
- hideInspector: true,
144
- });
145
- if (result) {
146
- triggerNativeHaptic('success');
147
- const newItem: CapturedMediaItem = {
148
- id: `screenshot_${result.timestamp}.png`,
149
- type: 'image',
150
- format: result.format,
151
- uri: result.uri,
152
- filename:
153
- result.uri.split('/').pop() || `screenshot_${result.timestamp}.png`,
154
- sizeBytes: result.sizeBytes,
155
- timestamp: result.timestamp,
156
- width: result.width,
157
- height: result.height,
158
- };
159
- setPreviewMediaItem(newItem);
160
- refreshMediaCount?.().catch(() => {});
161
- showToast(t('header.screenshotCaptured', 'Screenshot captured'));
162
- } else {
163
- showToast(t('header.screenshotFailed', 'Failed to capture screenshot'));
164
- }
165
- } catch {
166
- showToast(t('header.screenshotError', 'Error capturing screenshot'));
167
- }
168
- }, [refreshMediaCount, t]);
169
-
170
- const handleToggleVideoRecording = useCallback(async () => {
171
- if (playerDraggedRef.current) return;
172
- try {
173
- if (isRecording) {
174
- triggerNativeHaptic('medium');
175
- const result = await ScreenCapture.stopRecording();
176
- setIsRecording(false);
177
- if (result) {
178
- triggerNativeHaptic('success');
179
- const newItem: CapturedMediaItem = {
180
- id: `video_${result.timestamp}.${result.format}`,
181
- type: result.format === 'gif' ? 'gif' : 'video',
182
- format: result.format,
183
- uri: result.uri,
184
- filename:
185
- result.uri.split('/').pop() ||
186
- `video_${result.timestamp}.${result.format}`,
187
- sizeBytes: result.sizeBytes,
188
- timestamp: result.timestamp,
189
- durationMs: result.durationMs,
190
- width: result.width,
191
- height: result.height,
192
- hasAudio: result.hasAudio,
193
- };
194
- setPreviewMediaItem(newItem);
195
- refreshMediaCount?.().catch(() => {});
196
- showToast(
197
- t('header.recordingSaved', {
198
- duration: (result.durationMs / 1000).toFixed(1),
199
- defaultValue: `Recording saved (${(result.durationMs / 1000).toFixed(1)}s)`,
200
- }),
201
- );
202
- }
203
- } else {
204
- triggerNativeHaptic('medium');
205
- const started = await ScreenCapture.startRecording({
206
- fps: 24,
207
- audioSource: 'none',
208
- });
209
- if (started) {
210
- setIsRecording(true);
211
- showToast(t('header.recordingStarted', 'Recording started'));
212
- } else {
213
- showToast(t('header.recordingStartFailed', 'Failed to start recording'));
214
- }
215
- }
216
- } catch {
217
- showToast(t('header.recordingError', 'Error during screen recording'));
218
- setIsRecording(false);
219
- }
220
- }, [isRecording, refreshMediaCount, t]);
221
-
222
- const handleExpandInspector = useCallback(() => {
223
- if (playerDraggedRef.current) return;
224
- triggerNativeHaptic('light');
225
- setIsMinimized?.(false);
226
- setVisible(true);
227
- }, [setIsMinimized, setVisible]);
228
-
229
- const formatTime = (secs: number) => {
230
- const mins = Math.floor(secs / 60);
231
- const remainingSecs = secs % 60;
232
- return `${mins}:${remainingSecs < 10 ? '0' : ''}${remainingSecs}`;
233
- };
234
-
235
- return (
236
- <>
237
- {/* ─── Case 1: Minimized Music Player-Style Bottom Bar (Draggable) ─── */}
238
- {isMinimized ? (
239
- <Animated.View
240
- style={[
241
- fabStyles.playerContainer,
242
- {transform: playerPan.getTranslateTransform()},
243
- ]}
244
- {...playerPanResponder.panHandlers}>
245
- {/* Header-matched Gradient Background */}
246
- <LinearGradient
247
- colors={[AppColors.indigo600, AppColors.violet600]}
248
- start={{x: 0, y: 0}}
249
- end={{x: 1, y: 1}}
250
- style={fabStyles.gradientBg}
251
- pointerEvents="none"
252
- />
253
-
254
- {/* Enhanced Shining sweep streak across the player bar */}
255
- <View pointerEvents="none" style={fabStyles.playerShineClip}>
256
- <Animated.View
257
- style={[
258
- fabStyles.playerShineStreak,
259
- {
260
- transform: [
261
- {
262
- translateX: fabShineAnim.interpolate({
263
- inputRange: [0, 1],
264
- outputRange: [-80, screenWidth + 80],
265
- }),
266
- },
267
- {rotate: '28deg'},
268
- ],
269
- },
270
- ]}>
271
- <LinearGradient
272
- colors={[
273
- 'rgba(255, 255, 255, 0)',
274
- 'rgba(255, 255, 255, 0.18)',
275
- 'rgba(255, 255, 255, 0.70)',
276
- 'rgba(255, 255, 255, 1)',
277
- 'rgba(255, 255, 255, 0.70)',
278
- 'rgba(255, 255, 255, 0.18)',
279
- 'rgba(255, 255, 255, 0)',
280
- ]}
281
- locations={[0, 0.22, 0.44, 0.5, 0.56, 0.78, 1]}
282
- start={{x: 0, y: 0.5}}
283
- end={{x: 1, y: 0.5}}
284
- style={{flex: 1}}
285
- />
286
- </Animated.View>
287
- </View>
288
-
289
- {/* App Logo & Expand Info (Music Player Left Section) */}
290
- <TouchableOpacity
291
- activeOpacity={0.75}
292
- onPress={handleExpandInspector}
293
- style={fabStyles.brandSection}
294
- accessibilityRole="button"
295
- accessibilityLabel={t('mediaGallery.expand', 'Expand Inspector')}>
296
- <AppHeaderLogo size={36} customIcon={appIcon} />
297
- <View style={fabStyles.titleWrapper}>
298
- <Text style={fabStyles.appTitle} numberOfLines={1}>
299
- {getAppName()}
300
- </Text>
301
- <View style={fabStyles.versionRow}>
302
- {/* OS Version Chip */}
303
- <View style={fabStyles.versionChip}>
304
- {Platform.OS === 'ios' ? (
305
- <AppleIcon
306
- color={`${AppColors.white}E6`}
307
- size={9}
308
- />
309
- ) : (
310
- <AndroidIcon
311
- color={`${AppColors.white}E6`}
312
- size={9}
313
- />
314
- )}
315
- <Text style={fabStyles.versionChipText} numberOfLines={1}>
316
- {appVersionString}
317
- </Text>
318
- </View>
319
-
320
- {/* NPM Version Chip */}
321
- <View style={fabStyles.versionChip}>
322
- <NpmIcon size={9} color={AppColors.npmRedLight} />
323
- <Text style={fabStyles.versionChipText} numberOfLines={1}>
324
- v{LIB_VERSION}
325
- </Text>
326
- </View>
327
- </View>
328
- </View>
329
- </TouchableOpacity>
330
-
331
- {/* Action Buttons: Photo & Record (Matching Header Toolbar Style) */}
332
- <View style={fabStyles.actionsRow}>
333
- {/* Photo Action */}
334
- <TouchableScale
335
- onPress={handleTakeScreenshot}
336
- hitSlop={{top: 6, bottom: 6, left: 6, right: 6}}
337
- style={fabStyles.actionBtn}>
338
- <CameraIcon size={13} color={AppColors.white} />
339
- <Text style={fabStyles.actionText}>
340
- {t('header.photo', 'Photo')}
341
- </Text>
342
- </TouchableScale>
343
-
344
- {/* Record Action */}
345
- <TouchableScale
346
- onPress={handleToggleVideoRecording}
347
- hitSlop={{top: 6, bottom: 6, left: 6, right: 6}}
348
- style={[
349
- fabStyles.actionBtn,
350
- isRecording && fabStyles.recordingBtnActive,
351
- ]}>
352
- {isRecording ? (
353
- <View style={fabStyles.recordingDot} />
354
- ) : (
355
- <VideoCameraIcon size={13} color={AppColors.white} />
356
- )}
357
- <Text
358
- style={[
359
- fabStyles.actionText,
360
- isRecording && {color: AppColors.red300},
361
- ]}>
362
- {isRecording
363
- ? `${t('header.rec', 'REC')} ${formatTime(recordingSeconds)}`
364
- : t('header.record', 'Record')}
365
- </Text>
366
- </TouchableScale>
367
- </View>
368
- </Animated.View>
369
- ) : (
370
- /* ─── Case 2: Full Original Circular Draggable FAB Icon (when Inspector is closed) ── */
371
- <Animated.View
372
- style={[styles.fabWrapper, {transform: fabPan.getTranslateTransform()}]}
373
- {...fabPanResponder.panHandlers}>
374
- <TouchableScale
375
- style={{alignItems: 'center', justifyContent: 'center'}}
376
- onPress={() => {
377
- if (fabDraggedRef.current) return;
378
- triggerNativeHaptic('light');
379
- setVisible(true);
380
- }}
381
- hitSlop={10}>
382
- <Animated.View
383
- style={[styles.fabPulseRing, {transform: [{scale: pulseAnim}]}]}
384
- />
385
- <BrandCircleIcon size={62} />
386
- {/* Shining sweep, clipped inside the circular launcher */}
387
- <View pointerEvents="none" style={styles.fabShineClip}>
388
- <Animated.View
389
- style={[
390
- styles.fabShineStreak,
391
- {
392
- transform: [
393
- {
394
- translateX: fabShineAnim.interpolate({
395
- inputRange: [0, 1],
396
- outputRange: [-48, 96],
397
- }),
398
- },
399
- {rotate: '25deg'},
400
- ],
401
- },
402
- ]}>
403
- <LinearGradient
404
- colors={[
405
- 'rgba(255, 255, 255, 0)',
406
- 'rgba(255, 255, 255, 0.25)',
407
- 'rgba(255, 255, 255, 0.95)',
408
- 'rgba(255, 255, 255, 0.25)',
409
- 'rgba(255, 255, 255, 0)',
410
- ]}
411
- locations={[0, 0.25, 0.5, 0.75, 1]}
412
- start={{x: 0, y: 0.5}}
413
- end={{x: 1, y: 0.5}}
414
- style={{flex: 1}}
415
- />
416
- </Animated.View>
417
- </View>
418
- {(logs.length > 0 || analyticsEvents.length > 0) && (
419
- <Animated.View
420
- style={[
421
- styles.fabGreenDot,
422
- {transform: [{scale: unreadPulseAnim}]},
423
- ]}
424
- />
425
- )}
426
- </TouchableScale>
427
- </Animated.View>
428
- )}
429
-
430
- {/* Instant Media Preview Modal for Screenshots and Screen Recordings */}
431
- <MediaPreviewModal
432
- item={previewMediaItem}
433
- visible={!!previewMediaItem}
434
- onClose={() => setPreviewMediaItem(null)}
435
- onDelete={async item => {
436
- await ScreenCapture.deleteMedia(item.uri);
437
- refreshMediaCount?.().catch(() => {});
438
- setPreviewMediaItem(null);
439
- }}
440
- onConvertToGif={async item => {
441
- const gif = await ScreenCapture.convertToGif(item.uri, {
442
- fps: 12,
443
- width: 480,
444
- });
445
- if (gif) {
446
- refreshMediaCount?.().catch(() => {});
447
- setPreviewMediaItem({
448
- id: `anim_${gif.timestamp}.gif`,
449
- type: 'gif',
450
- format: 'gif',
451
- uri: gif.uri,
452
- filename: gif.uri.split('/').pop() || `anim_${gif.timestamp}.gif`,
453
- sizeBytes: gif.sizeBytes,
454
- timestamp: gif.timestamp,
455
- durationMs: gif.durationMs,
456
- });
457
- }
458
- }}
459
- />
460
- </>
461
- );
462
- };
463
-
464
- const fabStyles = StyleSheet.create({
465
- // ─── Music Player Bar Styles (Matching Header Gradient & Aesthetic) ───
466
- playerContainer: {
467
- position: 'absolute',
468
- bottom: Platform.OS === 'ios' ? 34 : 18,
469
- left: 12,
470
- right: 12,
471
- minHeight: 58,
472
- flexDirection: 'row',
473
- alignItems: 'center',
474
- justifyContent: 'space-between',
475
- borderRadius: 16,
476
- borderWidth: 1,
477
- borderColor: 'rgba(255, 255, 255, 0.28)',
478
- paddingHorizontal: 12,
479
- paddingVertical: 7,
480
- gap: 8,
481
- zIndex: 99999,
482
- elevation: 25,
483
- shadowColor: AppColors.indigo600,
484
- shadowOffset: {width: 0, height: 8},
485
- shadowOpacity: 0.45,
486
- shadowRadius: 14,
487
- overflow: 'hidden',
488
- },
489
- gradientBg: {
490
- position: 'absolute',
491
- top: 0,
492
- left: 0,
493
- right: 0,
494
- bottom: 0,
495
- borderRadius: 16,
496
- },
497
- playerShineClip: {
498
- position: 'absolute',
499
- top: 0,
500
- left: 0,
501
- right: 0,
502
- bottom: 0,
503
- borderRadius: 16,
504
- overflow: 'hidden',
505
- },
506
- playerShineStreak: {
507
- position: 'absolute',
508
- top: -60,
509
- width: 75,
510
- height: 200,
511
- },
512
- brandSection: {
513
- flexDirection: 'row',
514
- alignItems: 'center',
515
- gap: 9,
516
- flex: 1,
517
- minWidth: 0,
518
- paddingVertical: 2,
519
- },
520
- titleWrapper: {
521
- flex: 1,
522
- minWidth: 0,
523
- justifyContent: 'center',
524
- gap: 2,
525
- },
526
- appTitle: {
527
- fontFamily: AppFonts.interBold,
528
- fontSize: 13.5,
529
- color: AppColors.white,
530
- letterSpacing: -0.2,
531
- },
532
- versionRow: {
533
- flexDirection: 'row',
534
- alignItems: 'center',
535
- gap: 4,
536
- minWidth: 0,
537
- },
538
- versionChip: {
539
- flexDirection: 'row',
540
- alignItems: 'center',
541
- backgroundColor: `${AppColors.white}1F`,
542
- borderRadius: 5,
543
- paddingHorizontal: 5,
544
- paddingVertical: 1.5,
545
- gap: 3,
546
- borderWidth: 1,
547
- borderColor: `${AppColors.white}2E`,
548
- flexShrink: 1,
549
- minWidth: 0,
550
- },
551
- versionChipText: {
552
- fontFamily: AppFonts.interMedium,
553
- fontSize: 8.5,
554
- color: `${AppColors.white}EB`,
555
- letterSpacing: 0.1,
556
- },
557
- actionsRow: {
558
- flexDirection: 'row',
559
- alignItems: 'center',
560
- gap: 6,
561
- },
562
- actionBtn: {
563
- flexDirection: 'row',
564
- alignItems: 'center',
565
- gap: 4.5,
566
- backgroundColor: 'rgba(255, 255, 255, 0.22)',
567
- paddingHorizontal: 10,
568
- paddingVertical: 6,
569
- borderRadius: 7,
570
- borderWidth: 1,
571
- borderColor: 'rgba(255, 255, 255, 0.32)',
572
- },
573
- recordingBtnActive: {
574
- backgroundColor: 'rgba(239, 68, 68, 0.32)',
575
- borderColor: AppColors.red500,
576
- },
577
- recordingDot: {
578
- width: 6,
579
- height: 6,
580
- borderRadius: 3,
581
- backgroundColor: AppColors.red500,
582
- },
583
- actionText: {
584
- fontFamily: AppFonts.interSemiBold,
585
- fontSize: 11,
586
- color: AppColors.white,
587
- },
588
- });
589
-
590
- export default FabLauncher;
@@ -1,94 +0,0 @@
1
- import React, {useState} from 'react';
2
- import {StyleSheet, Text, View, Pressable} from 'react-native';
3
- import {AppColors} from '../../styles/AppColors';
4
- import {AppFonts} from '../../styles/AppFonts';
5
- import {WarningTriangleIcon, SparkleIcon, ClearIcon} from '../NetworkIcons';
6
-
7
- interface FeatureUnderDevNoticeProps {
8
- featureName?: string;
9
- compact?: boolean;
10
- }
11
-
12
- export const FeatureUnderDevNotice: React.FC<FeatureUnderDevNoticeProps> = ({
13
- featureName,
14
- compact = false,
15
- }) => {
16
- const [isDismissed, setIsDismissed] = useState(false);
17
-
18
- if (isDismissed) return null;
19
-
20
- return (
21
- <View style={[styles.container, compact && styles.containerCompact]}>
22
- <View style={styles.contentRow}>
23
- <View style={styles.badgeWrap}>
24
- <WarningTriangleIcon color={AppColors.warningIconGold} size={12} />
25
- <Text style={styles.badgeText}>IN ACTIVE DEVELOPMENT</Text>
26
- </View>
27
-
28
- <Pressable
29
- onPress={() => setIsDismissed(true)}
30
- hitSlop={8}
31
- style={styles.dismissBtn}
32
- accessible={true}
33
- accessibilityRole="button"
34
- accessibilityLabel="Dismiss notice">
35
- <ClearIcon color={AppColors.grayTextWeak} size={11} />
36
- </Pressable>
37
- </View>
38
-
39
- <Text style={styles.messageText}>
40
- {featureName ? `${featureName} is` : 'This module is'} currently in active
41
- development. Results and metrics may vary in accuracy. We are continuously
42
- improving this feature for upcoming releases.
43
- </Text>
44
- </View>
45
- );
46
- };
47
-
48
- const styles = StyleSheet.create({
49
- container: {
50
- marginHorizontal: 12,
51
- marginTop: 8,
52
- marginBottom: 6,
53
- paddingHorizontal: 12,
54
- paddingVertical: 9,
55
- borderRadius: 8,
56
- backgroundColor: `${AppColors.warningIconGold}12`,
57
- borderWidth: 1,
58
- borderColor: `${AppColors.warningIconGold}30`,
59
- },
60
- containerCompact: {
61
- marginTop: 4,
62
- marginBottom: 4,
63
- paddingVertical: 7,
64
- paddingHorizontal: 10,
65
- },
66
- contentRow: {
67
- flexDirection: 'row',
68
- alignItems: 'center',
69
- justifyContent: 'space-between',
70
- marginBottom: 4,
71
- },
72
- badgeWrap: {
73
- flexDirection: 'row',
74
- alignItems: 'center',
75
- gap: 4.5,
76
- },
77
- badgeText: {
78
- fontFamily: AppFonts.interBold,
79
- fontSize: 9.5,
80
- color: AppColors.warningIconGold,
81
- letterSpacing: 0.4,
82
- },
83
- dismissBtn: {
84
- padding: 2,
85
- },
86
- messageText: {
87
- fontFamily: AppFonts.interRegular,
88
- fontSize: 10.5,
89
- color: AppColors.grayText,
90
- lineHeight: 15,
91
- },
92
- });
93
-
94
- export default FeatureUnderDevNotice;