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,1397 +0,0 @@
1
- import React, {useState, useEffect, useMemo, useCallback} from 'react';
2
- import {
3
- View,
4
- Text,
5
- ScrollView,
6
- TextInput,
7
- Dimensions,
8
- Platform,
9
- PixelRatio,
10
- StatusBar,
11
- StyleSheet,
12
- ActivityIndicator,
13
- NativeModules,
14
- } from 'react-native';
15
- import TouchableScale from '../TouchableScale';
16
- import CopyButton from '../CopyButton';
17
- import {AppColors} from '../../styles/AppColors';
18
- import {AppFonts} from '../../styles/AppFonts';
19
- import {useTranslation} from '../../i18n';
20
- import {
21
- SmartphoneIcon,
22
- CpuIcon,
23
- WifiIcon,
24
- ScreenIcon,
25
- LayersIcon,
26
- KeyIcon,
27
- ShieldCheckIcon,
28
- SearchIcon,
29
- ClearIcon,
30
- CopyIcon,
31
- CircleCheckIcon,
32
- CircleAlertIcon,
33
- BoltIcon,
34
- CheckIcon,
35
- SignalIcon,
36
- BrainIcon,
37
- AppleIcon,
38
- AndroidIcon,
39
- ExportIcon,
40
- } from '../NetworkIcons';
41
- import {
42
- getNativeDeviceMetrics,
43
- getNativeSystemMetrics,
44
- NativeDeviceMetrics,
45
- NativeSystemMetrics,
46
- } from '../../native/NativeInspector';
47
- import {copyToClipboard, getAppName} from '../../helpers';
48
- import {showToast} from '../../helpers/toast';
49
- import {LIB_VERSION} from '../../constants';
50
-
51
- type DeviceSubTab =
52
- | 'overview'
53
- | 'hardware'
54
- | 'network'
55
- | 'display'
56
- | 'runtime'
57
- | 'security';
58
-
59
- interface InfoRowProps {
60
- label: string;
61
- value: string | number | boolean | null | undefined;
62
- copyable?: boolean;
63
- badge?: {
64
- text: string;
65
- color: string;
66
- bg: string;
67
- };
68
- subtext?: string;
69
- isLast?: boolean;
70
- }
71
-
72
- const InfoRow = React.memo(
73
- ({label, value, copyable = true, badge, subtext, isLast = false}: InfoRowProps) => {
74
- const displayValue =
75
- value === null || value === undefined
76
- ? '—'
77
- : typeof value === 'boolean'
78
- ? value
79
- ? 'Yes'
80
- : 'No'
81
- : String(value);
82
-
83
- return (
84
- <View
85
- style={[
86
- styles.infoRow,
87
- isLast && {borderBottomWidth: 0},
88
- ]}>
89
- <View style={{flex: 1, paddingRight: 8, minWidth: 0}}>
90
- <View style={{flexDirection: 'row', alignItems: 'center', flexWrap: 'wrap', gap: 6}}>
91
- <Text style={styles.infoLabel} numberOfLines={2}>{label}</Text>
92
- {badge && (
93
- <View
94
- style={[
95
- styles.infoBadge,
96
- {backgroundColor: badge.bg, borderColor: `${badge.color}33`},
97
- ]}>
98
- <Text style={[styles.infoBadgeText, {color: badge.color}]}>
99
- {badge.text}
100
- </Text>
101
- </View>
102
- )}
103
- </View>
104
- {subtext && <Text style={styles.infoSubtext} numberOfLines={2}>{subtext}</Text>}
105
- </View>
106
- <View
107
- style={{
108
- flexDirection: 'row',
109
- alignItems: 'center',
110
- gap: 6,
111
- flexShrink: 0,
112
- maxWidth: '58%',
113
- justifyContent: 'flex-end',
114
- }}>
115
- <Text
116
- style={[
117
- styles.infoValue,
118
- typeof value === 'boolean' && {
119
- color: value ? AppColors.emerald500 : AppColors.errorColor,
120
- },
121
- ]}
122
- numberOfLines={3}
123
- selectable>
124
- {displayValue}
125
- </Text>
126
- {copyable && value !== null && value !== undefined && (
127
- <TouchableScale
128
- hitSlop={8}
129
- onPress={() => {
130
- copyToClipboard(displayValue, label);
131
- showToast(`Copied ${label}`);
132
- }}
133
- style={styles.rowCopyBtn}>
134
- <CopyIcon size={11} color={AppColors.grayTextWeak} />
135
- </TouchableScale>
136
- )}
137
- </View>
138
- </View>
139
- );
140
- },
141
- );
142
-
143
- export const DeviceInfoTab = React.memo(() => {
144
- const {t} = useTranslation();
145
- const [activeSubTab, setActiveSubTab] = useState<DeviceSubTab>('overview');
146
- const [search, setSearch] = useState<string>('');
147
- const [isLoading, setIsLoading] = useState<boolean>(true);
148
- const [deviceMetrics, setDeviceMetrics] = useState<NativeDeviceMetrics | null>(null);
149
- const [systemMetrics, setSystemMetrics] = useState<NativeSystemMetrics | null>(null);
150
- const [ipAddress, setIpAddress] = useState<string>('Detecting...');
151
- const [deviceUptime, setDeviceUptime] = useState<string>('0s');
152
-
153
- const startTimeRef = React.useRef<number>(Date.now());
154
-
155
- // Load hardware metrics and IP
156
- const fetchMetrics = useCallback(async () => {
157
- try {
158
- const [devMetrics, sysMetrics] = await Promise.all([
159
- getNativeDeviceMetrics(),
160
- getNativeSystemMetrics(),
161
- ]);
162
- setDeviceMetrics(devMetrics);
163
- setSystemMetrics(sysMetrics);
164
- } catch {
165
- // Fallback
166
- } finally {
167
- setIsLoading(false);
168
- }
169
- }, []);
170
-
171
- useEffect(() => {
172
- fetchMetrics();
173
- const interval = setInterval(fetchMetrics, 3000);
174
- return () => clearInterval(interval);
175
- }, [fetchMetrics]);
176
-
177
- // Probe local IP address
178
- useEffect(() => {
179
- let isMounted = true;
180
- const probeIp = async () => {
181
- // 1. Try NativeModules or PlatformConstants
182
- try {
183
- const serverHost =
184
- NativeModules?.PlatformConstants?.serverHost ||
185
- NativeModules?.AndroidConstants?.serverHost ||
186
- NativeModules?.DevSettings?.serverHost;
187
- if (serverHost && typeof serverHost === 'string') {
188
- const cleanHost = serverHost.split(':')[0].replace(/https?:\/\//, '');
189
- if (cleanHost && cleanHost !== 'localhost' && cleanHost !== '127.0.0.1') {
190
- if (isMounted) setIpAddress(cleanHost);
191
- return;
192
- }
193
- }
194
- } catch {}
195
-
196
- // 2. Query dynamic candidate ip endpoints
197
- try {
198
- const controller = new AbortController();
199
- const timer = setTimeout(() => controller.abort(), 1200);
200
- const res = await fetch('https://api.ipify.org?format=json', {
201
- signal: controller.signal,
202
- });
203
- clearTimeout(timer);
204
- if (res.ok) {
205
- const data = await res.json();
206
- if (data && data.ip && isMounted) {
207
- setIpAddress(data.ip);
208
- return;
209
- }
210
- }
211
- } catch {}
212
-
213
- if (isMounted) {
214
- setIpAddress(Platform.OS === 'android' ? '10.0.2.15 (Local)' : '127.0.0.1 (Local)');
215
- }
216
- };
217
-
218
- probeIp();
219
- return () => {
220
- isMounted = false;
221
- };
222
- }, []);
223
-
224
- // Calculate Uptime
225
- useEffect(() => {
226
- const updateUptime = () => {
227
- const diffSec = Math.floor((Date.now() - startTimeRef.current) / 1000);
228
- const hours = Math.floor(diffSec / 3600);
229
- const mins = Math.floor((diffSec % 3600) / 60);
230
- const secs = diffSec % 60;
231
- if (hours > 0) {
232
- setDeviceUptime(`${hours}h ${mins}m ${secs}s`);
233
- } else if (mins > 0) {
234
- setDeviceUptime(`${mins}m ${secs}s`);
235
- } else {
236
- setDeviceUptime(`${secs}s`);
237
- }
238
- };
239
- const timer = setInterval(updateUptime, 1000);
240
- updateUptime();
241
- return () => clearInterval(timer);
242
- }, []);
243
-
244
- // Screen Geometry
245
- const windowDims = Dimensions.get('window');
246
- const screenDims = Dimensions.get('screen');
247
- const pixelRatio = PixelRatio.get();
248
- const fontScale = PixelRatio.getFontScale();
249
- const isTablet = windowDims.width >= 600 || windowDims.height >= 1000;
250
- const isLandscape = windowDims.width > windowDims.height;
251
- const statusBarHeight =
252
- Platform.OS === 'android'
253
- ? StatusBar.currentHeight || 24
254
- : (windowDims.height >= 812 ? 44 : 20);
255
-
256
- // Pseudo-UDID deterministic identifier
257
- const pseudoUDID = useMemo(() => {
258
- const raw = `${Platform.OS}-${Platform.Version}-${screenDims.width}x${screenDims.height}-${pixelRatio}-${(Platform.constants as any)?.Brand || 'generic'}`;
259
- let hash = 0;
260
- for (let i = 0; i < raw.length; i++) {
261
- hash = (hash << 5) - hash + raw.charCodeAt(i);
262
- hash |= 0;
263
- }
264
- const hex = Math.abs(hash).toString(16).padStart(8, '0');
265
- return `UDID-${Platform.OS.toUpperCase()}-${hex.slice(0, 4)}-${hex.slice(4, 8)}-${Date.now().toString(16).slice(-4)}`.toUpperCase();
266
- }, [screenDims.width, screenDims.height, pixelRatio]);
267
-
268
- // Hermes & TurboModule engine status
269
- const isHermes = Boolean((global as any)?.HermesInternal);
270
- const isTurboModule = Boolean((globalThis as any)?.__turboModuleProxy);
271
- const reactNativeVersion = useMemo(() => {
272
- const v = (Platform.constants as any)?.reactNativeVersion;
273
- if (v) {
274
- return `${v.major}.${v.minor}.${v.patch}${v.prerelease != null ? `-${v.prerelease}` : ''}`;
275
- }
276
- return '0.74+';
277
- }, []);
278
-
279
- const totalRamMb = deviceMetrics?.totalRAM
280
- ? Math.round(deviceMetrics.totalRAM / (1024 * 1024))
281
- : systemMetrics?.totalPhysicalRamMb || 4096;
282
- const freeRamMb = deviceMetrics?.freeRAM
283
- ? Math.round(deviceMetrics.freeRAM / (1024 * 1024))
284
- : Math.max(0, totalRamMb - (systemMetrics?.residentRamMb || 1200));
285
- const usedRamMb = Math.max(0, totalRamMb - freeRamMb);
286
- const ramUsagePct = totalRamMb > 0 ? Math.round((usedRamMb / totalRamMb) * 100) : 45;
287
-
288
- const totalStorageGb = deviceMetrics?.totalStorage
289
- ? (deviceMetrics.totalStorage / (1024 * 1024 * 1024)).toFixed(1)
290
- : '128.0';
291
- const freeStorageGb = deviceMetrics?.freeStorage
292
- ? (deviceMetrics.freeStorage / (1024 * 1024 * 1024)).toFixed(1)
293
- : '64.2';
294
-
295
- // Sub-Tab Definitions
296
- const subTabs = useMemo(
297
- () => [
298
- {
299
- key: 'overview',
300
- label: 'Overview',
301
- icon: (c: string) => <LayersIcon size={12} color={c} />,
302
- },
303
- {
304
- key: 'hardware',
305
- label: 'Hardware',
306
- icon: (c: string) => <CpuIcon size={12} color={c} />,
307
- },
308
- {
309
- key: 'network',
310
- label: 'Network & IP',
311
- icon: (c: string) => <WifiIcon size={12} color={c} />,
312
- },
313
- {
314
- key: 'display',
315
- label: 'Display',
316
- icon: (c: string) => <ScreenIcon size={12} color={c} />,
317
- },
318
- {
319
- key: 'runtime',
320
- label: 'Runtime & App',
321
- icon: (c: string) => <BoltIcon size={12} color={c} />,
322
- },
323
- {
324
- key: 'security',
325
- label: 'Security & IDs',
326
- icon: (c: string) => <KeyIcon size={12} color={c} />,
327
- },
328
- ],
329
- [],
330
- );
331
-
332
- // Full device JSON export
333
- const fullDeviceData = useMemo(
334
- () => ({
335
- identifiers: {
336
- pseudoUDID,
337
- bundleId: deviceMetrics?.appBundleId || deviceMetrics?.appPackageName || 'com.app.inspector',
338
- },
339
- hardware: {
340
- model: deviceMetrics?.deviceModel || (Platform.constants as any)?.Model || 'Unknown Device',
341
- brand: deviceMetrics?.deviceBrand || (Platform.constants as any)?.Brand || (Platform.OS === 'ios' ? 'Apple' : 'Android'),
342
- osVersion: `${Platform.OS} ${Platform.Version}`,
343
- apiLevel: deviceMetrics?.apiLevel || (Platform.constants as any)?.Version || null,
344
- cpuAbi: deviceMetrics?.cpuAbi || (Platform.constants as any)?.ServerHost || 'arm64-v8a',
345
- totalRamMb,
346
- freeRamMb,
347
- usedRamMb,
348
- totalStorageGb: `${totalStorageGb} GB`,
349
- freeStorageGb: `${freeStorageGb} GB`,
350
- batteryPercent: deviceMetrics?.batteryPercent ?? 100,
351
- isCharging: deviceMetrics?.isCharging ?? false,
352
- },
353
- network: {
354
- ipAddress,
355
- isWifi: true,
356
- reachability: 'Online',
357
- },
358
- display: {
359
- windowWidth: windowDims.width,
360
- windowHeight: windowDims.height,
361
- screenWidth: screenDims.width,
362
- screenHeight: screenDims.height,
363
- pixelRatio,
364
- fontScale,
365
- statusBarHeight,
366
- isTablet,
367
- orientation: isLandscape ? 'Landscape' : 'Portrait',
368
- },
369
- runtime: {
370
- appName: getAppName(),
371
- appVersion: deviceMetrics?.appVersion || '1.0.0',
372
- appBuild: deviceMetrics?.appBuild || '1',
373
- reactNativeVersion,
374
- inspectorVersion: LIB_VERSION,
375
- isHermes,
376
- isTurboModule,
377
- isDev: __DEV__,
378
- jsEngine: isHermes ? 'Hermes' : 'JSC',
379
- timezone: Intl.DateTimeFormat().resolvedOptions().timeZone,
380
- locale: Intl.DateTimeFormat().resolvedOptions().locale,
381
- sessionUptime: deviceUptime,
382
- },
383
- }),
384
- [
385
- pseudoUDID,
386
- deviceMetrics,
387
- totalRamMb,
388
- freeRamMb,
389
- usedRamMb,
390
- totalStorageGb,
391
- freeStorageGb,
392
- ipAddress,
393
- windowDims,
394
- screenDims,
395
- pixelRatio,
396
- fontScale,
397
- statusBarHeight,
398
- isTablet,
399
- isLandscape,
400
- reactNativeVersion,
401
- isHermes,
402
- isTurboModule,
403
- deviceUptime,
404
- ],
405
- );
406
-
407
- const handleExportJson = () => {
408
- copyToClipboard(JSON.stringify(fullDeviceData, null, 2), 'Device Full Report');
409
- showToast('Copied Full Device JSON Report!');
410
- };
411
-
412
- const handleExportMarkdown = () => {
413
- const md = `# Device Information Report
414
- **Generated by React Native In-App Inspector v${LIB_VERSION}**
415
-
416
- ## 📱 Hardware & System
417
- - **Device Model:** ${fullDeviceData.hardware.model}
418
- - **Brand / Manufacturer:** ${fullDeviceData.hardware.brand}
419
- - **OS Version:** ${fullDeviceData.hardware.osVersion}
420
- - **CPU Architecture:** ${fullDeviceData.hardware.cpuAbi}
421
- - **Total RAM:** ${totalRamMb} MB (Free: ${freeRamMb} MB)
422
- - **Total Storage:** ${totalStorageGb} GB (Free: ${freeStorageGb} GB)
423
- - **Battery:** ${fullDeviceData.hardware.batteryPercent}% (${fullDeviceData.hardware.isCharging ? 'Charging' : 'Unplugged'})
424
-
425
- ## 🌐 Network & Connectivity
426
- - **IP Address:** ${ipAddress}
427
- - **Status:** Online
428
-
429
- ## 🖥 Display & Geometry
430
- - **Resolution:** ${screenDims.width} × ${screenDims.height} pt (@${pixelRatio}x)
431
- - **Form Factor:** ${isTablet ? 'Tablet' : 'Phone'} (${isLandscape ? 'Landscape' : 'Portrait'})
432
- - **Status Bar Height:** ${statusBarHeight} pt
433
-
434
- ## ⚙️ Runtime & App
435
- - **App Name:** ${fullDeviceData.runtime.appName}
436
- - **App Version:** ${fullDeviceData.runtime.appVersion} (${fullDeviceData.runtime.appBuild})
437
- - **React Native:** v${reactNativeVersion}
438
- - **JS Engine:** ${isHermes ? 'Hermes' : 'JSC'} (Bridgeless TurboModule: ${isTurboModule ? 'Yes' : 'No'})
439
- - **Environment:** ${__DEV__ ? 'Development (__DEV__)' : 'Production (Release)'}
440
- - **Timezone:** ${fullDeviceData.runtime.timezone}
441
- - **Session Uptime:** ${deviceUptime}
442
-
443
- ## 🔑 Identifiers & Security
444
- - **Pseudo-UDID:** \`${pseudoUDID}\`
445
- - **Bundle ID:** \`${fullDeviceData.identifiers.bundleId}\`
446
- `;
447
- copyToClipboard(md, 'Device Markdown Report');
448
- showToast('Copied Markdown Report to Clipboard!');
449
- };
450
-
451
- // Filter items matching search (checking label, value, and optional subtext)
452
- const isMatch = useCallback(
453
- (label: string, value?: any, subtext?: any) => {
454
- if (!search.trim()) return true;
455
- const query = search.toLowerCase().trim();
456
- const strVal =
457
- value != null
458
- ? typeof value === 'object'
459
- ? JSON.stringify(value)
460
- : String(value)
461
- : '';
462
- const strSub = subtext != null ? String(subtext) : '';
463
- return (
464
- label.toLowerCase().includes(query) ||
465
- strVal.toLowerCase().includes(query) ||
466
- strSub.toLowerCase().includes(query)
467
- );
468
- },
469
- [search],
470
- );
471
-
472
- const hasHeroMatch = useMemo(() => {
473
- if (!search.trim()) return true;
474
- return (
475
- isMatch('Model', deviceMetrics?.deviceModel || (Platform.constants as any)?.Model) ||
476
- isMatch('OS', Platform.OS) ||
477
- isMatch('IP Address', ipAddress) ||
478
- isMatch('RAM', `${usedRamMb}/${totalRamMb}`) ||
479
- isMatch('Uptime', deviceUptime)
480
- );
481
- }, [search, isMatch, deviceMetrics, ipAddress, usedRamMb, totalRamMb, deviceUptime]);
482
-
483
- const hasOverviewMatch = useMemo(() => {
484
- if (!search.trim()) return true;
485
- return (
486
- isMatch('Device Model', fullDeviceData.hardware.model) ||
487
- isMatch('Manufacturer', fullDeviceData.hardware.brand) ||
488
- isMatch('Operating System', fullDeviceData.hardware.osVersion) ||
489
- isMatch('IP Address', ipAddress) ||
490
- isMatch('RAM Memory', `${usedRamMb} MB / ${totalRamMb} MB (${ramUsagePct}%)`, `Free Memory: ${freeRamMb} MB`) ||
491
- isMatch('Storage Capacity', `${freeStorageGb} GB Free / ${totalStorageGb} GB Total`) ||
492
- isMatch('App Version', `v${fullDeviceData.runtime.appVersion} (${fullDeviceData.runtime.appBuild})`) ||
493
- isMatch('JavaScript Engine', isHermes ? 'Hermes Bytecode Engine' : 'JavaScriptCore (JSC)') ||
494
- isMatch('UDID Identifier', pseudoUDID)
495
- );
496
- }, [search, isMatch, fullDeviceData, ipAddress, usedRamMb, totalRamMb, ramUsagePct, freeRamMb, freeStorageGb, totalStorageGb, isHermes, pseudoUDID]);
497
-
498
- const hasHardwareMatch = useMemo(() => {
499
- if (!search.trim()) return true;
500
- return (
501
- isMatch('CPU Architecture', fullDeviceData.hardware.cpuAbi) ||
502
- isMatch('Total RAM', `${totalRamMb} MB`) ||
503
- isMatch('Free RAM', `${freeRamMb} MB`) ||
504
- isMatch('Storage Capacity', `${totalStorageGb} GB`) ||
505
- isMatch('Available Storage', `${freeStorageGb} GB`) ||
506
- isMatch('Battery', `${deviceMetrics?.batteryPercent ?? 100}%`) ||
507
- isMatch('API Level', `API ${deviceMetrics?.apiLevel || Platform.Version}`) ||
508
- isMatch('Thermal State', 'Nominal (Cool)')
509
- );
510
- }, [search, isMatch, fullDeviceData, totalRamMb, freeRamMb, totalStorageGb, freeStorageGb, deviceMetrics]);
511
-
512
- const hasNetworkMatch = useMemo(() => {
513
- if (!search.trim()) return true;
514
- return (
515
- isMatch('IP Address', ipAddress) ||
516
- isMatch('Internet Reachability', 'Connected') ||
517
- isMatch('Connection Type', 'Wi-Fi / Local Area Network') ||
518
- isMatch('Metro Dev Server', NativeModules?.PlatformConstants?.serverHost || NativeModules?.AndroidConstants?.serverHost || 'localhost:8081') ||
519
- isMatch('WebSocket Protocol', 'Active & Enabled') ||
520
- isMatch('Network Inspector Interceptor', 'Intercepting XHR & Fetch')
521
- );
522
- }, [search, isMatch, ipAddress]);
523
-
524
- const hasDisplayMatch = useMemo(() => {
525
- if (!search.trim()) return true;
526
- return (
527
- isMatch('Window Resolution', `${windowDims.width.toFixed(0)} × ${windowDims.height.toFixed(0)} pt`) ||
528
- isMatch('Screen Physical Size', `${(screenDims.width * pixelRatio).toFixed(0)} × ${(screenDims.height * pixelRatio).toFixed(0)} px`) ||
529
- isMatch('Pixel Density', `@${pixelRatio}x (${Math.round(pixelRatio * 160)} dpi)`) ||
530
- isMatch('Font Scale', `${fontScale}x`) ||
531
- isMatch('Form Factor', isTablet ? 'Tablet' : 'Smartphone') ||
532
- isMatch('Orientation', isLandscape ? 'Landscape' : 'Portrait') ||
533
- isMatch('Status Bar Height', `${statusBarHeight} pt`)
534
- );
535
- }, [search, isMatch, windowDims, screenDims, pixelRatio, fontScale, isTablet, isLandscape, statusBarHeight]);
536
-
537
- const hasRuntimeMatch = useMemo(() => {
538
- if (!search.trim()) return true;
539
- return (
540
- isMatch('App Name', fullDeviceData.runtime.appName) ||
541
- isMatch('Bundle ID', fullDeviceData.identifiers.bundleId) ||
542
- isMatch('App Version', `v${fullDeviceData.runtime.appVersion} (${fullDeviceData.runtime.appBuild})`) ||
543
- isMatch('React Native', `v${reactNativeVersion}`) ||
544
- isMatch('In-App Inspector Version', `v${LIB_VERSION}`) ||
545
- isMatch('Hermes Engine', isHermes ? 'Enabled (AOT Bytecode)' : 'Disabled (JSC)') ||
546
- isMatch('New Architecture', isTurboModule ? 'Enabled' : 'Legacy Bridge') ||
547
- isMatch('Build Type', __DEV__ ? 'Debug (__DEV__ = true)' : 'Release / Production') ||
548
- isMatch('Timezone', fullDeviceData.runtime.timezone) ||
549
- isMatch('Locale', fullDeviceData.runtime.locale) ||
550
- isMatch('Session Uptime', deviceUptime)
551
- );
552
- }, [search, isMatch, fullDeviceData, reactNativeVersion, isHermes, isTurboModule, deviceUptime]);
553
-
554
- const hasSecurityMatch = useMemo(() => {
555
- if (!search.trim()) return true;
556
- return (
557
- isMatch('Pseudo-UDID', pseudoUDID) ||
558
- isMatch('Bundle ID', fullDeviceData.identifiers.bundleId) ||
559
- isMatch('Root / Jailbreak', 'Clean (Standard Sandbox)') ||
560
- isMatch('Simulator / Emulator', (Platform.constants as any)?.Model?.includes?.('sdk') || (Platform.constants as any)?.Model?.includes?.('Emulator') || (Platform.constants as any)?.Model?.includes?.('Simulator') ? 'Virtual Simulator' : 'Physical Device') ||
561
- isMatch('Sandbox Integrity', 'Enforced by OS Kernel')
562
- );
563
- }, [search, isMatch, pseudoUDID, fullDeviceData]);
564
-
565
- const hasAnyMatch = useMemo(() => {
566
- if (!search.trim()) return true;
567
- return (
568
- hasHeroMatch ||
569
- hasOverviewMatch ||
570
- hasHardwareMatch ||
571
- hasNetworkMatch ||
572
- hasDisplayMatch ||
573
- hasRuntimeMatch ||
574
- hasSecurityMatch
575
- );
576
- }, [
577
- search,
578
- hasHeroMatch,
579
- hasOverviewMatch,
580
- hasHardwareMatch,
581
- hasNetworkMatch,
582
- hasDisplayMatch,
583
- hasRuntimeMatch,
584
- hasSecurityMatch,
585
- ]);
586
-
587
- return (
588
- <View style={styles.container}>
589
- {/* ─── Top Sub-Tabs Navigation Bar ─── */}
590
- <View style={styles.subTabsWrapper}>
591
- <ScrollView
592
- horizontal
593
- showsHorizontalScrollIndicator={false}
594
- contentContainerStyle={styles.subTabsContainer}>
595
- {subTabs.map(tab => {
596
- const isActive = activeSubTab === tab.key;
597
- const color = isActive ? AppColors.white : AppColors.grayText;
598
- return (
599
- <TouchableScale
600
- key={tab.key}
601
- onPress={() => setActiveSubTab(tab.key as DeviceSubTab)}
602
- style={[styles.subTabPill, isActive && styles.subTabPillActive]}>
603
- {tab.icon(color)}
604
- <Text
605
- style={[
606
- styles.subTabPillText,
607
- isActive && styles.subTabPillTextActive,
608
- ]}>
609
- {tab.label}
610
- </Text>
611
- </TouchableScale>
612
- );
613
- })}
614
- </ScrollView>
615
- </View>
616
-
617
- {/* ─── Search & Export Action Bar ─── */}
618
- <View style={styles.actionBar}>
619
- <View style={styles.searchBar}>
620
- <SearchIcon size={14} color={AppColors.grayTextWeak} />
621
- <TextInput
622
- value={search}
623
- onChangeText={setSearch}
624
- placeholder="Search specs, UDID, IP, screen..."
625
- placeholderTextColor={AppColors.grayTextWeak}
626
- style={styles.searchInput}
627
- clearButtonMode="while-editing"
628
- />
629
- {search.length > 0 && (
630
- <TouchableScale onPress={() => setSearch('')} hitSlop={8}>
631
- <ClearIcon size={13} color={AppColors.grayTextWeak} />
632
- </TouchableScale>
633
- )}
634
- </View>
635
-
636
- <TouchableScale
637
- onPress={handleExportJson}
638
- style={styles.exportButton}
639
- hitSlop={6}>
640
- <ExportIcon size={12} color={AppColors.purple} />
641
- <Text style={styles.exportButtonText}>JSON</Text>
642
- </TouchableScale>
643
-
644
- <TouchableScale
645
- onPress={handleExportMarkdown}
646
- style={[styles.exportButton, {backgroundColor: `${AppColors.emerald500}14`, borderColor: `${AppColors.emerald500}33`}]}
647
- hitSlop={6}>
648
- <CopyIcon size={12} color={AppColors.emerald500} />
649
- <Text style={[styles.exportButtonText, {color: AppColors.emerald500}]}>MD</Text>
650
- </TouchableScale>
651
- </View>
652
-
653
- {/* ─── Main Content Scroll View ─── */}
654
- <ScrollView
655
- style={styles.scrollArea}
656
- contentContainerStyle={styles.scrollContent}
657
- showsVerticalScrollIndicator={false}>
658
- {/* Hero Card */}
659
- {(!search.trim() || hasHeroMatch) && (
660
- <View style={styles.heroCard}>
661
- <View style={styles.heroHeader}>
662
- <View style={styles.heroIconWrap}>
663
- {Platform.OS === 'ios' ? (
664
- <AppleIcon size={20} color={AppColors.white} />
665
- ) : (
666
- <AndroidIcon size={20} color={AppColors.white} />
667
- )}
668
- </View>
669
- <View style={{flex: 1, minWidth: 0}}>
670
- <Text style={styles.heroTitle} numberOfLines={1} ellipsizeMode="tail">
671
- {deviceMetrics?.deviceModel || (Platform.constants as any)?.Model || (Platform.OS === 'ios' ? 'Apple iPhone' : 'Android Device')}
672
- </Text>
673
- <Text style={styles.heroSubtitle} numberOfLines={1} ellipsizeMode="tail">
674
- {Platform.OS === 'ios' ? `iOS ${Platform.Version}` : `Android ${Platform.Version} (API ${deviceMetrics?.apiLevel || Platform.Version})`}
675
- </Text>
676
- </View>
677
- <View style={styles.heroBadge}>
678
- <View style={styles.pulseDot} />
679
- <Text style={styles.heroBadgeText}>LIVE</Text>
680
- </View>
681
- </View>
682
-
683
- {/* Quick Metrics Strip */}
684
- <View style={styles.heroMetricsStrip}>
685
- <View style={styles.heroMetricItem}>
686
- <Text style={styles.heroMetricLabel} numberOfLines={1} ellipsizeMode="tail">IP ADDRESS</Text>
687
- <Text style={styles.heroMetricValue} numberOfLines={1} ellipsizeMode="tail">
688
- {ipAddress}
689
- </Text>
690
- </View>
691
- <View style={styles.heroMetricDivider} />
692
- <View style={styles.heroMetricItem}>
693
- <Text style={styles.heroMetricLabel} numberOfLines={1} ellipsizeMode="tail">RAM (USED/TOTAL)</Text>
694
- <Text style={styles.heroMetricValue} numberOfLines={1} ellipsizeMode="tail">
695
- {usedRamMb}/{totalRamMb} MB
696
- </Text>
697
- </View>
698
- <View style={styles.heroMetricDivider} />
699
- <View style={styles.heroMetricItem}>
700
- <Text style={styles.heroMetricLabel} numberOfLines={1} ellipsizeMode="tail">UPTIME</Text>
701
- <Text style={styles.heroMetricValue} numberOfLines={1} ellipsizeMode="tail">{deviceUptime}</Text>
702
- </View>
703
- </View>
704
- </View>
705
- )}
706
-
707
- {/* ── SUB-TAB 1: OVERVIEW ── */}
708
- {(activeSubTab === 'overview' || search.length > 0) && hasOverviewMatch && (
709
- <View style={styles.sectionCard}>
710
- <Text style={styles.sectionTitle}>DEVICE OVERVIEW</Text>
711
- {isMatch('Device Model', fullDeviceData.hardware.model) && (
712
- <InfoRow
713
- label="Device Model"
714
- value={fullDeviceData.hardware.model}
715
- />
716
- )}
717
- {isMatch('Manufacturer', fullDeviceData.hardware.brand) && (
718
- <InfoRow
719
- label="Manufacturer / Brand"
720
- value={fullDeviceData.hardware.brand}
721
- />
722
- )}
723
- {isMatch('Operating System', fullDeviceData.hardware.osVersion) && (
724
- <InfoRow
725
- label="Operating System"
726
- value={fullDeviceData.hardware.osVersion}
727
- badge={{text: Platform.OS.toUpperCase(), color: AppColors.blue500, bg: `${AppColors.blue500}18`}}
728
- />
729
- )}
730
- {isMatch('IP Address', ipAddress) && (
731
- <InfoRow
732
- label="Local IP Address"
733
- value={ipAddress}
734
- badge={{text: 'ONLINE', color: AppColors.emerald500, bg: `${AppColors.emerald500}18`}}
735
- />
736
- )}
737
- {isMatch('RAM Memory', `${usedRamMb} MB / ${totalRamMb} MB (${ramUsagePct}%)`, `Free Memory: ${freeRamMb} MB`) && (
738
- <InfoRow
739
- label="RAM Memory"
740
- value={`${usedRamMb} MB / ${totalRamMb} MB (${ramUsagePct}%)`}
741
- subtext={`Free Memory: ${freeRamMb} MB`}
742
- />
743
- )}
744
- {isMatch('Storage Capacity', `${freeStorageGb} GB Free / ${totalStorageGb} GB Total`) && (
745
- <InfoRow
746
- label="Internal Storage"
747
- value={`${freeStorageGb} GB Free / ${totalStorageGb} GB Total`}
748
- />
749
- )}
750
- {isMatch('App Version', `v${fullDeviceData.runtime.appVersion} (${fullDeviceData.runtime.appBuild})`) && (
751
- <InfoRow
752
- label="Host App Version"
753
- value={`v${fullDeviceData.runtime.appVersion} (${fullDeviceData.runtime.appBuild})`}
754
- />
755
- )}
756
- {isMatch('JavaScript Engine', isHermes ? 'Hermes Bytecode Engine' : 'JavaScriptCore (JSC)') && (
757
- <InfoRow
758
- label="JS Runtime Engine"
759
- value={isHermes ? 'Hermes Bytecode Engine' : 'JavaScriptCore (JSC)'}
760
- badge={
761
- isHermes
762
- ? {text: 'HERMES', color: AppColors.purple, bg: `${AppColors.purple}18`}
763
- : {text: 'JSC', color: AppColors.sky500, bg: `${AppColors.sky500}18`}
764
- }
765
- />
766
- )}
767
- {isMatch('UDID Identifier', pseudoUDID) && (
768
- <InfoRow
769
- label="Pseudo-UDID"
770
- value={pseudoUDID}
771
- isLast
772
- />
773
- )}
774
- </View>
775
- )}
776
-
777
- {/* ── SUB-TAB 2: HARDWARE & SYSTEM ── */}
778
- {(activeSubTab === 'hardware' || search.length > 0) && hasHardwareMatch && (
779
- <View style={styles.sectionCard}>
780
- <Text style={styles.sectionTitle}>HARDWARE & SYSTEM SPECIFICATIONS</Text>
781
- {isMatch('CPU Architecture', fullDeviceData.hardware.cpuAbi) && (
782
- <InfoRow
783
- label="CPU Architecture / ABI"
784
- value={fullDeviceData.hardware.cpuAbi}
785
- badge={{text: '64-BIT', color: AppColors.purple, bg: `${AppColors.purple}18`}}
786
- />
787
- )}
788
- {isMatch('Total RAM', `${totalRamMb} MB`) && (
789
- <InfoRow
790
- label="Total Physical RAM"
791
- value={`${totalRamMb} MB`}
792
- />
793
- )}
794
- {isMatch('Free RAM', `${freeRamMb} MB`) && (
795
- <InfoRow
796
- label="Available Free RAM"
797
- value={`${freeRamMb} MB`}
798
- badge={{
799
- text: freeRamMb < 500 ? 'LOW' : 'HEALTHY',
800
- color: freeRamMb < 500 ? AppColors.errorColor : AppColors.emerald500,
801
- bg: freeRamMb < 500 ? `${AppColors.errorColor}18` : `${AppColors.emerald500}18`,
802
- }}
803
- />
804
- )}
805
- {isMatch('Storage Capacity', `${totalStorageGb} GB`) && (
806
- <InfoRow
807
- label="Disk Storage Total"
808
- value={`${totalStorageGb} GB`}
809
- />
810
- )}
811
- {isMatch('Available Storage', `${freeStorageGb} GB`) && (
812
- <InfoRow
813
- label="Disk Storage Available"
814
- value={`${freeStorageGb} GB`}
815
- />
816
- )}
817
- {isMatch('Battery', `${deviceMetrics?.batteryPercent ?? 100}%`) && (
818
- <InfoRow
819
- label="Battery Level"
820
- value={`${deviceMetrics?.batteryPercent ?? 100}%`}
821
- badge={{
822
- text: deviceMetrics?.isCharging ? 'CHARGING' : 'DISCHARGING',
823
- color: deviceMetrics?.isCharging ? AppColors.emerald500 : AppColors.grayText,
824
- bg: deviceMetrics?.isCharging ? `${AppColors.emerald500}18` : `${AppColors.grayText}18`,
825
- }}
826
- />
827
- )}
828
- {isMatch('API Level', `API ${deviceMetrics?.apiLevel || Platform.Version}`) && Platform.OS === 'android' && (
829
- <InfoRow
830
- label="Android API SDK Level"
831
- value={`API ${deviceMetrics?.apiLevel || Platform.Version}`}
832
- />
833
- )}
834
- {isMatch('Thermal State', 'Nominal (Cool)') && (
835
- <InfoRow
836
- label="Thermal State"
837
- value="Nominal (Cool)"
838
- badge={{text: 'OPTIMAL', color: AppColors.emerald500, bg: `${AppColors.emerald500}18`}}
839
- isLast
840
- />
841
- )}
842
- </View>
843
- )}
844
-
845
- {/* ── SUB-TAB 3: NETWORK & CONNECTIVITY ── */}
846
- {(activeSubTab === 'network' || search.length > 0) && hasNetworkMatch && (
847
- <View style={styles.sectionCard}>
848
- <Text style={styles.sectionTitle}>NETWORK & CONNECTIVITY</Text>
849
- {isMatch('IP Address', ipAddress) && (
850
- <InfoRow
851
- label="Local Device IP"
852
- value={ipAddress}
853
- badge={{text: 'IPV4', color: AppColors.blue500, bg: `${AppColors.blue500}18`}}
854
- />
855
- )}
856
- {isMatch('Internet Reachability', 'Connected') && (
857
- <InfoRow
858
- label="Internet Reachability"
859
- value="Connected"
860
- badge={{text: 'ONLINE', color: AppColors.emerald500, bg: `${AppColors.emerald500}18`}}
861
- />
862
- )}
863
- {isMatch('Connection Type', 'Wi-Fi / Local Area Network') && (
864
- <InfoRow
865
- label="Active Connection Type"
866
- value="Wi-Fi / Local Area Network"
867
- />
868
- )}
869
- {isMatch('Metro Dev Server', NativeModules?.PlatformConstants?.serverHost || NativeModules?.AndroidConstants?.serverHost || 'localhost:8081') && (
870
- <InfoRow
871
- label="Metro Packager Host"
872
- value={
873
- NativeModules?.PlatformConstants?.serverHost ||
874
- NativeModules?.AndroidConstants?.serverHost ||
875
- 'localhost:8081'
876
- }
877
- />
878
- )}
879
- {isMatch('WebSocket Protocol', 'Active & Enabled') && (
880
- <InfoRow
881
- label="WebSocket (WSS) Support"
882
- value="Active & Enabled"
883
- />
884
- )}
885
- {isMatch('Network Inspector Interceptor', 'Intercepting XHR & Fetch') && (
886
- <InfoRow
887
- label="Network Interceptor Status"
888
- value="Intercepting XHR & Fetch"
889
- badge={{text: 'MONITORING', color: AppColors.purple, bg: `${AppColors.purple}18`}}
890
- isLast
891
- />
892
- )}
893
- </View>
894
- )}
895
-
896
- {/* ── SUB-TAB 4: DISPLAY & SCREEN GEOMETRY ── */}
897
- {(activeSubTab === 'display' || search.length > 0) && hasDisplayMatch && (
898
- <View style={styles.sectionCard}>
899
- <Text style={styles.sectionTitle}>DISPLAY & SCREEN GEOMETRY</Text>
900
- {isMatch('Window Resolution', `${windowDims.width.toFixed(0)} × ${windowDims.height.toFixed(0)} pt`) && (
901
- <InfoRow
902
- label="Window Logical Size"
903
- value={`${windowDims.width.toFixed(0)} × ${windowDims.height.toFixed(0)} pt`}
904
- />
905
- )}
906
- {isMatch('Screen Physical Size', `${(screenDims.width * pixelRatio).toFixed(0)} × ${(screenDims.height * pixelRatio).toFixed(0)} px`) && (
907
- <InfoRow
908
- label="Physical Screen Size"
909
- value={`${(screenDims.width * pixelRatio).toFixed(0)} × ${(screenDims.height * pixelRatio).toFixed(0)} px`}
910
- />
911
- )}
912
- {isMatch('Pixel Density', `@${pixelRatio}x (${Math.round(pixelRatio * 160)} dpi)`) && (
913
- <InfoRow
914
- label="Pixel Ratio (DPI Scale)"
915
- value={`@${pixelRatio}x (${Math.round(pixelRatio * 160)} dpi)`}
916
- badge={{text: `@${pixelRatio}x`, color: AppColors.purple, bg: `${AppColors.purple}18`}}
917
- />
918
- )}
919
- {isMatch('Font Scale', `${fontScale}x`) && (
920
- <InfoRow
921
- label="User Font Scale"
922
- value={`${fontScale}x (${fontScale === 1 ? 'Default' : fontScale > 1 ? 'Enlarged' : 'Compact'})`}
923
- />
924
- )}
925
- {isMatch('Form Factor', isTablet ? 'Tablet' : 'Smartphone') && (
926
- <InfoRow
927
- label="Device Form Factor"
928
- value={isTablet ? 'Tablet' : 'Smartphone'}
929
- badge={{
930
- text: isTablet ? 'TABLET' : 'PHONE',
931
- color: isTablet ? AppColors.blue500 : AppColors.purple,
932
- bg: isTablet ? `${AppColors.blue500}18` : `${AppColors.purple}18`,
933
- }}
934
- />
935
- )}
936
- {isMatch('Orientation', isLandscape ? 'Landscape' : 'Portrait') && (
937
- <InfoRow
938
- label="Screen Orientation"
939
- value={isLandscape ? 'Landscape' : 'Portrait'}
940
- />
941
- )}
942
- {isMatch('Status Bar Height', `${statusBarHeight} pt`) && (
943
- <InfoRow
944
- label="Status Bar Inset"
945
- value={`${statusBarHeight} pt`}
946
- isLast
947
- />
948
- )}
949
- </View>
950
- )}
951
-
952
- {/* ── SUB-TAB 5: RUNTIME & APPLICATION ── */}
953
- {(activeSubTab === 'runtime' || search.length > 0) && hasRuntimeMatch && (
954
- <View style={styles.sectionCard}>
955
- <Text style={styles.sectionTitle}>RUNTIME & APPLICATION</Text>
956
- {isMatch('App Name', fullDeviceData.runtime.appName) && (
957
- <InfoRow
958
- label="Application Name"
959
- value={fullDeviceData.runtime.appName}
960
- />
961
- )}
962
- {isMatch('Bundle ID', fullDeviceData.identifiers.bundleId) && (
963
- <InfoRow
964
- label="Bundle Identifier / Package"
965
- value={fullDeviceData.identifiers.bundleId}
966
- />
967
- )}
968
- {isMatch('App Version', `v${fullDeviceData.runtime.appVersion} (${fullDeviceData.runtime.appBuild})`) && (
969
- <InfoRow
970
- label="Application Version"
971
- value={`v${fullDeviceData.runtime.appVersion} (${fullDeviceData.runtime.appBuild})`}
972
- />
973
- )}
974
- {isMatch('React Native', `v${reactNativeVersion}`) && (
975
- <InfoRow
976
- label="React Native Framework"
977
- value={`v${reactNativeVersion}`}
978
- badge={{text: 'RN', color: AppColors.sky500, bg: `${AppColors.sky500}18`}}
979
- />
980
- )}
981
- {isMatch('In-App Inspector Version', `v${LIB_VERSION}`) && (
982
- <InfoRow
983
- label="In-App Inspector Library"
984
- value={`v${LIB_VERSION}`}
985
- badge={{text: 'LATEST', color: AppColors.purple, bg: `${AppColors.purple}18`}}
986
- />
987
- )}
988
- {isMatch('Hermes Engine', isHermes ? 'Enabled (AOT Bytecode)' : 'Disabled (JSC)') && (
989
- <InfoRow
990
- label="Hermes JavaScript Engine"
991
- value={isHermes ? 'Enabled (AOT Bytecode)' : 'Disabled (JSC)'}
992
- badge={{
993
- text: isHermes ? 'HERMES' : 'JSC',
994
- color: isHermes ? AppColors.purple : AppColors.grayText,
995
- bg: isHermes ? `${AppColors.purple}18` : `${AppColors.grayText}18`,
996
- }}
997
- />
998
- )}
999
- {isMatch('New Architecture', isTurboModule ? 'Enabled' : 'Legacy Bridge') && (
1000
- <InfoRow
1001
- label="Bridgeless TurboModules (New Arch)"
1002
- value={isTurboModule ? 'Enabled' : 'Legacy Bridge'}
1003
- badge={{
1004
- text: isTurboModule ? 'NEW ARCH' : 'LEGACY',
1005
- color: isTurboModule ? AppColors.emerald500 : AppColors.blue500,
1006
- bg: isTurboModule ? `${AppColors.emerald500}18` : `${AppColors.blue500}18`,
1007
- }}
1008
- />
1009
- )}
1010
- {isMatch('Build Type', __DEV__ ? 'Debug (__DEV__ = true)' : 'Release / Production') && (
1011
- <InfoRow
1012
- label="Build Configuration"
1013
- value={__DEV__ ? 'Debug (__DEV__ = true)' : 'Release / Production'}
1014
- badge={{
1015
- text: __DEV__ ? 'DEBUG' : 'RELEASE',
1016
- color: __DEV__ ? AppColors.warningIconGold : AppColors.emerald500,
1017
- bg: __DEV__ ? `${AppColors.warningIconGold}18` : `${AppColors.emerald500}18`,
1018
- }}
1019
- />
1020
- )}
1021
- {isMatch('Timezone', fullDeviceData.runtime.timezone) && (
1022
- <InfoRow
1023
- label="System Timezone"
1024
- value={fullDeviceData.runtime.timezone}
1025
- />
1026
- )}
1027
- {isMatch('Locale', fullDeviceData.runtime.locale) && (
1028
- <InfoRow
1029
- label="System Language & Locale"
1030
- value={fullDeviceData.runtime.locale}
1031
- />
1032
- )}
1033
- {isMatch('Session Uptime', deviceUptime) && (
1034
- <InfoRow
1035
- label="Inspector Session Uptime"
1036
- value={deviceUptime}
1037
- isLast
1038
- />
1039
- )}
1040
- </View>
1041
- )}
1042
-
1043
- {/* ── SUB-TAB 6: SECURITY & IDENTIFIERS ── */}
1044
- {(activeSubTab === 'security' || search.length > 0) && hasSecurityMatch && (
1045
- <View style={styles.sectionCard}>
1046
- <Text style={styles.sectionTitle}>DEVICE IDENTIFIERS & SECURITY</Text>
1047
- {isMatch('Pseudo-UDID', pseudoUDID) && (
1048
- <InfoRow
1049
- label="Deterministic Pseudo-UDID"
1050
- value={pseudoUDID}
1051
- subtext="Stable hardware signature hash for testing & diagnostics"
1052
- badge={{text: 'PERSISTENT', color: AppColors.purple, bg: `${AppColors.purple}18`}}
1053
- />
1054
- )}
1055
- {isMatch('Bundle ID', fullDeviceData.identifiers.bundleId) && (
1056
- <InfoRow
1057
- label="Application Bundle ID"
1058
- value={fullDeviceData.identifiers.bundleId}
1059
- />
1060
- )}
1061
- {isMatch('Root / Jailbreak', 'Clean (Standard Sandbox)') && (
1062
- <InfoRow
1063
- label="Root / Jailbreak Heuristic"
1064
- value="Clean (Standard Sandbox)"
1065
- badge={{text: 'SECURE', color: AppColors.emerald500, bg: `${AppColors.emerald500}18`}}
1066
- />
1067
- )}
1068
- {isMatch('Simulator / Emulator', (Platform.constants as any)?.Model?.includes?.('sdk') || (Platform.constants as any)?.Model?.includes?.('Emulator') || (Platform.constants as any)?.Model?.includes?.('Simulator') ? 'Virtual Simulator' : 'Physical Device') && (
1069
- <InfoRow
1070
- label="Emulator / Physical Device"
1071
- value={
1072
- (Platform.constants as any)?.Model?.includes?.('sdk') ||
1073
- (Platform.constants as any)?.Model?.includes?.('Emulator') ||
1074
- (Platform.constants as any)?.Model?.includes?.('Simulator')
1075
- ? 'Virtual Simulator'
1076
- : 'Physical Device'
1077
- }
1078
- />
1079
- )}
1080
- {isMatch('Sandbox Integrity', 'Enforced by OS Kernel') && (
1081
- <InfoRow
1082
- label="App Sandbox File Isolation"
1083
- value="Enforced by OS Kernel"
1084
- isLast
1085
- />
1086
- )}
1087
- </View>
1088
- )}
1089
-
1090
- {/* Empty search results state */}
1091
- {search.trim().length > 0 && !hasAnyMatch && (
1092
- <View style={styles.emptySearchCard}>
1093
- <SearchIcon size={26} color={AppColors.grayTextWeak} />
1094
- <Text style={styles.emptySearchTitle}>No matching device specifications</Text>
1095
- <Text style={styles.emptySearchSubtitle}>
1096
- No properties matched &ldquo;{search}&rdquo;
1097
- </Text>
1098
- <TouchableScale
1099
- onPress={() => setSearch('')}
1100
- style={styles.clearSearchBtn}>
1101
- <Text style={styles.clearSearchBtnText}>Clear Search</Text>
1102
- </TouchableScale>
1103
- </View>
1104
- )}
1105
-
1106
- <View style={{height: 48}} />
1107
- </ScrollView>
1108
- </View>
1109
- );
1110
- });
1111
-
1112
- const styles = StyleSheet.create({
1113
- container: {
1114
- flex: 1,
1115
- backgroundColor: AppColors.grayBackground,
1116
- },
1117
- subTabsWrapper: {
1118
- backgroundColor: AppColors.primaryLight,
1119
- borderBottomWidth: 1,
1120
- borderBottomColor: AppColors.dividerColor,
1121
- paddingVertical: 8,
1122
- },
1123
- subTabsContainer: {
1124
- paddingHorizontal: 12,
1125
- flexDirection: 'row',
1126
- alignItems: 'center',
1127
- gap: 6,
1128
- },
1129
- subTabPill: {
1130
- flexDirection: 'row',
1131
- alignItems: 'center',
1132
- gap: 5,
1133
- paddingHorizontal: 10,
1134
- paddingVertical: 5.5,
1135
- borderRadius: 8,
1136
- backgroundColor: AppColors.grayBackground,
1137
- borderWidth: 1,
1138
- borderColor: AppColors.grayBorderSecondary,
1139
- },
1140
- subTabPillActive: {
1141
- backgroundColor: AppColors.purple,
1142
- borderColor: AppColors.purple,
1143
- },
1144
- subTabPillText: {
1145
- fontFamily: AppFonts.interBold,
1146
- fontSize: 11,
1147
- color: AppColors.grayText,
1148
- },
1149
- subTabPillTextActive: {
1150
- color: AppColors.white,
1151
- },
1152
- actionBar: {
1153
- flexDirection: 'row',
1154
- alignItems: 'center',
1155
- paddingHorizontal: 12,
1156
- paddingVertical: 8,
1157
- backgroundColor: AppColors.primaryLight,
1158
- borderBottomWidth: 1,
1159
- borderBottomColor: AppColors.dividerColor,
1160
- gap: 8,
1161
- },
1162
- searchBar: {
1163
- flex: 1,
1164
- flexDirection: 'row',
1165
- alignItems: 'center',
1166
- backgroundColor: AppColors.grayBackground,
1167
- borderRadius: 8,
1168
- paddingHorizontal: 9,
1169
- paddingVertical: Platform.OS === 'ios' ? 6 : 2,
1170
- borderWidth: 1,
1171
- borderColor: AppColors.grayBorderSecondary,
1172
- gap: 6,
1173
- },
1174
- searchInput: {
1175
- flex: 1,
1176
- fontFamily: AppFonts.interMedium,
1177
- fontSize: 12,
1178
- color: AppColors.primaryBlack,
1179
- padding: 0,
1180
- },
1181
- exportButton: {
1182
- flexDirection: 'row',
1183
- alignItems: 'center',
1184
- gap: 4,
1185
- paddingHorizontal: 9,
1186
- paddingVertical: 6,
1187
- borderRadius: 8,
1188
- backgroundColor: `${AppColors.purple}14`,
1189
- borderWidth: 1,
1190
- borderColor: `${AppColors.purple}33`,
1191
- },
1192
- exportButtonText: {
1193
- fontFamily: AppFonts.interBold,
1194
- fontSize: 11,
1195
- color: AppColors.purple,
1196
- },
1197
- scrollArea: {
1198
- flex: 1,
1199
- },
1200
- scrollContent: {
1201
- padding: 12,
1202
- gap: 12,
1203
- paddingBottom: 100,
1204
- },
1205
- heroCard: {
1206
- backgroundColor: AppColors.primaryLight,
1207
- borderRadius: 14,
1208
- borderWidth: 1,
1209
- borderColor: AppColors.grayBorderSecondary,
1210
- padding: 14,
1211
- shadowColor: AppColors.black,
1212
- shadowOpacity: 0.04,
1213
- shadowRadius: 4,
1214
- shadowOffset: {width: 0, height: 2},
1215
- elevation: 1,
1216
- gap: 12,
1217
- },
1218
- heroHeader: {
1219
- flexDirection: 'row',
1220
- alignItems: 'center',
1221
- gap: 10,
1222
- },
1223
- heroIconWrap: {
1224
- width: 38,
1225
- height: 38,
1226
- borderRadius: 10,
1227
- backgroundColor: AppColors.purple,
1228
- alignItems: 'center',
1229
- justifyContent: 'center',
1230
- shadowColor: AppColors.purple,
1231
- shadowOpacity: 0.25,
1232
- shadowRadius: 4,
1233
- shadowOffset: {width: 0, height: 2},
1234
- elevation: 2,
1235
- },
1236
- heroTitle: {
1237
- fontFamily: AppFonts.interBold,
1238
- fontSize: 15,
1239
- color: AppColors.primaryBlack,
1240
- letterSpacing: -0.2,
1241
- },
1242
- heroSubtitle: {
1243
- fontFamily: AppFonts.interRegular,
1244
- fontSize: 11.5,
1245
- color: AppColors.grayText,
1246
- marginTop: 1,
1247
- },
1248
- heroBadge: {
1249
- flexDirection: 'row',
1250
- alignItems: 'center',
1251
- gap: 4,
1252
- backgroundColor: `${AppColors.emerald500}18`,
1253
- paddingHorizontal: 7,
1254
- paddingVertical: 3,
1255
- borderRadius: 6,
1256
- },
1257
- pulseDot: {
1258
- width: 6,
1259
- height: 6,
1260
- borderRadius: 3,
1261
- backgroundColor: AppColors.emerald500,
1262
- },
1263
- heroBadgeText: {
1264
- fontFamily: AppFonts.interBold,
1265
- fontSize: 9.5,
1266
- color: AppColors.emerald500,
1267
- },
1268
- heroMetricsStrip: {
1269
- flexDirection: 'row',
1270
- alignItems: 'center',
1271
- backgroundColor: AppColors.grayBackground,
1272
- borderRadius: 10,
1273
- paddingVertical: 8,
1274
- paddingHorizontal: 10,
1275
- },
1276
- heroMetricItem: {
1277
- flex: 1,
1278
- alignItems: 'center',
1279
- paddingHorizontal: 2,
1280
- minWidth: 0,
1281
- },
1282
- heroMetricLabel: {
1283
- fontFamily: AppFonts.interBold,
1284
- fontSize: 8.5,
1285
- color: AppColors.grayTextWeak,
1286
- letterSpacing: 0.4,
1287
- },
1288
- heroMetricValue: {
1289
- fontFamily: AppFonts.interBold,
1290
- fontSize: 11,
1291
- color: AppColors.primaryBlack,
1292
- marginTop: 2,
1293
- },
1294
- heroMetricDivider: {
1295
- width: 1,
1296
- height: 20,
1297
- backgroundColor: AppColors.dividerColor,
1298
- },
1299
- sectionCard: {
1300
- backgroundColor: AppColors.primaryLight,
1301
- borderRadius: 14,
1302
- borderWidth: 1,
1303
- borderColor: AppColors.grayBorderSecondary,
1304
- padding: 14,
1305
- shadowColor: AppColors.black,
1306
- shadowOpacity: 0.03,
1307
- shadowRadius: 3,
1308
- shadowOffset: {width: 0, height: 1},
1309
- elevation: 1,
1310
- },
1311
- sectionTitle: {
1312
- fontFamily: AppFonts.interBold,
1313
- fontSize: 10.5,
1314
- color: AppColors.grayTextWeak,
1315
- letterSpacing: 0.8,
1316
- marginBottom: 8,
1317
- textTransform: 'uppercase',
1318
- },
1319
- infoRow: {
1320
- flexDirection: 'row',
1321
- alignItems: 'center',
1322
- justifyContent: 'space-between',
1323
- paddingVertical: 9,
1324
- borderBottomWidth: 1,
1325
- borderBottomColor: AppColors.dividerColor,
1326
- },
1327
- infoLabel: {
1328
- fontFamily: AppFonts.interMedium,
1329
- fontSize: 12.5,
1330
- color: AppColors.primaryBlack,
1331
- },
1332
- infoSubtext: {
1333
- fontFamily: AppFonts.interRegular,
1334
- fontSize: 10,
1335
- color: AppColors.grayTextWeak,
1336
- marginTop: 1,
1337
- },
1338
- infoBadge: {
1339
- paddingHorizontal: 5,
1340
- paddingVertical: 1,
1341
- borderRadius: 4,
1342
- borderWidth: 1,
1343
- },
1344
- infoBadgeText: {
1345
- fontFamily: AppFonts.interBold,
1346
- fontSize: 8.5,
1347
- },
1348
- infoValue: {
1349
- fontFamily: AppFonts.interBold,
1350
- fontSize: 12,
1351
- color: AppColors.primaryBlack,
1352
- flexShrink: 1,
1353
- textAlign: 'right',
1354
- },
1355
- rowCopyBtn: {
1356
- padding: 4,
1357
- borderRadius: 4,
1358
- backgroundColor: AppColors.grayBackground,
1359
- },
1360
- emptySearchCard: {
1361
- backgroundColor: AppColors.primaryLight,
1362
- borderRadius: 14,
1363
- borderWidth: 1,
1364
- borderColor: AppColors.grayBorderSecondary,
1365
- padding: 24,
1366
- alignItems: 'center',
1367
- justifyContent: 'center',
1368
- gap: 8,
1369
- marginTop: 8,
1370
- },
1371
- emptySearchTitle: {
1372
- fontFamily: AppFonts.interBold,
1373
- fontSize: 13.5,
1374
- color: AppColors.primaryBlack,
1375
- textAlign: 'center',
1376
- },
1377
- emptySearchSubtitle: {
1378
- fontFamily: AppFonts.interRegular,
1379
- fontSize: 11.5,
1380
- color: AppColors.grayTextWeak,
1381
- textAlign: 'center',
1382
- },
1383
- clearSearchBtn: {
1384
- marginTop: 6,
1385
- paddingHorizontal: 14,
1386
- paddingVertical: 6.5,
1387
- borderRadius: 8,
1388
- backgroundColor: AppColors.purple,
1389
- },
1390
- clearSearchBtnText: {
1391
- fontFamily: AppFonts.interBold,
1392
- fontSize: 11,
1393
- color: AppColors.white,
1394
- },
1395
- });
1396
-
1397
- export default DeviceInfoTab;