react-native-inapp-inspector 1.1.13 → 1.1.15

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 (250) hide show
  1. package/README.md +9 -34
  2. package/dist/commonjs/assets/svgAssets.d.ts +3 -0
  3. package/dist/commonjs/assets/svgAssets.js +17 -0
  4. package/dist/commonjs/components/AnalyticsEventCard.d.ts +1 -14
  5. package/dist/commonjs/components/AnalyticsEventCard.js +120 -50
  6. package/dist/commonjs/components/AnalyticsGraph.d.ts +2 -6
  7. package/dist/commonjs/components/AnalyticsGraph.js +8 -8
  8. package/dist/commonjs/components/AnalyticsTabView.d.ts +15 -0
  9. package/dist/commonjs/components/AnalyticsTabView.js +157 -0
  10. package/dist/commonjs/components/AnimatedEntrance.d.ts +1 -1
  11. package/dist/commonjs/components/AnimatedEntrance.js +2 -2
  12. package/dist/commonjs/components/ApiDetailView.d.ts +22 -0
  13. package/dist/commonjs/components/ApiDetailView.js +304 -0
  14. package/dist/commonjs/components/ApisTabView.d.ts +33 -0
  15. package/dist/commonjs/components/ApisTabView.js +235 -0
  16. package/dist/commonjs/components/CodeSnippet.d.ts +1 -5
  17. package/dist/commonjs/components/CodeSnippet.js +34 -34
  18. package/dist/commonjs/components/ConsoleLogCard.d.ts +1 -8
  19. package/dist/commonjs/components/ConsoleLogCard.js +262 -442
  20. package/dist/commonjs/components/ConsoleLogDetailView.d.ts +9 -0
  21. package/dist/commonjs/components/ConsoleLogDetailView.js +278 -0
  22. package/dist/commonjs/components/ConsoleLogsTabView.d.ts +24 -0
  23. package/dist/commonjs/components/ConsoleLogsTabView.js +354 -0
  24. package/dist/commonjs/components/DiffViewer.js +4 -2
  25. package/dist/commonjs/components/DomainHeader.js +66 -41
  26. package/dist/commonjs/components/EmptyState.d.ts +2 -2
  27. package/dist/commonjs/components/EmptyState.js +2 -2
  28. package/dist/commonjs/components/EndOfListFooter.d.ts +8 -0
  29. package/dist/commonjs/components/EndOfListFooter.js +90 -0
  30. package/dist/commonjs/components/ErrorBoundary.d.ts +5 -14
  31. package/dist/commonjs/components/ErrorBoundary.js +28 -28
  32. package/dist/commonjs/components/FloatingBubble.d.ts +14 -0
  33. package/dist/commonjs/components/FloatingBubble.js +75 -0
  34. package/dist/commonjs/components/HeadersSection.js +5 -3
  35. package/dist/commonjs/components/HighlightText.d.ts +1 -1
  36. package/dist/commonjs/components/HighlightText.js +5 -7
  37. package/dist/commonjs/components/Inspector/AnalyticsTab.d.ts +3 -0
  38. package/dist/commonjs/components/Inspector/AnalyticsTab.js +232 -0
  39. package/dist/commonjs/components/Inspector/ConsoleTab.d.ts +3 -0
  40. package/dist/commonjs/components/Inspector/ConsoleTab.js +410 -0
  41. package/dist/commonjs/components/Inspector/FabLauncher.d.ts +3 -0
  42. package/dist/commonjs/components/Inspector/FabLauncher.js +54 -0
  43. package/dist/commonjs/components/Inspector/InsightsDashboard.d.ts +3 -0
  44. package/dist/commonjs/components/Inspector/InsightsDashboard.js +619 -0
  45. package/dist/commonjs/components/Inspector/InspectorContext.d.ts +5 -0
  46. package/dist/commonjs/components/Inspector/InspectorContext.js +18 -0
  47. package/dist/commonjs/components/Inspector/InspectorHeader.d.ts +3 -0
  48. package/dist/commonjs/components/Inspector/InspectorHeader.js +452 -0
  49. package/dist/commonjs/components/Inspector/LogDetail.d.ts +3 -0
  50. package/dist/commonjs/components/Inspector/LogDetail.js +963 -0
  51. package/dist/commonjs/components/Inspector/MainScreen.d.ts +3 -0
  52. package/dist/commonjs/components/Inspector/MainScreen.js +68 -0
  53. package/dist/commonjs/components/Inspector/NavigationTracker.d.ts +3 -0
  54. package/dist/commonjs/components/Inspector/NavigationTracker.js +12 -0
  55. package/dist/commonjs/components/Inspector/NetworkDetail.d.ts +3 -0
  56. package/dist/commonjs/components/Inspector/NetworkDetail.js +405 -0
  57. package/dist/commonjs/components/Inspector/NetworkTab.d.ts +3 -0
  58. package/dist/commonjs/components/Inspector/NetworkTab.js +281 -0
  59. package/dist/commonjs/components/Inspector/ReduxTab.d.ts +3 -0
  60. package/dist/commonjs/components/Inspector/ReduxTab.js +75 -0
  61. package/dist/commonjs/components/Inspector/SettingsPanel.d.ts +3 -0
  62. package/dist/commonjs/components/Inspector/SettingsPanel.js +1476 -0
  63. package/dist/commonjs/components/Inspector/TabBar.d.ts +3 -0
  64. package/dist/commonjs/components/Inspector/TabBar.js +95 -0
  65. package/dist/commonjs/components/Inspector/WebViewTab.d.ts +3 -0
  66. package/dist/commonjs/components/Inspector/WebViewTab.js +757 -0
  67. package/dist/commonjs/components/InspectorHeader.d.ts +19 -0
  68. package/dist/commonjs/components/InspectorHeader.js +329 -0
  69. package/dist/commonjs/components/InspectorTabBar.d.ts +16 -0
  70. package/dist/commonjs/components/InspectorTabBar.js +90 -0
  71. package/dist/commonjs/components/JsonViewer.d.ts +4 -1
  72. package/dist/commonjs/components/JsonViewer.js +110 -171
  73. package/dist/commonjs/components/LogCard.js +109 -86
  74. package/dist/commonjs/components/MetaAccordion.d.ts +1 -10
  75. package/dist/commonjs/components/MetaAccordion.js +23 -21
  76. package/dist/commonjs/components/NavigationTracker.d.ts +7 -0
  77. package/dist/commonjs/components/NavigationTracker.js +76 -0
  78. package/dist/commonjs/components/NetworkIcons.d.ts +6 -0
  79. package/dist/commonjs/components/NetworkIcons.js +54 -8
  80. package/dist/commonjs/components/ReduxTabView.d.ts +9 -0
  81. package/dist/commonjs/components/ReduxTabView.js +56 -0
  82. package/dist/commonjs/components/ReduxTreeView.js +241 -200
  83. package/dist/commonjs/components/SegmentedTabs.d.ts +15 -0
  84. package/dist/commonjs/components/SegmentedTabs.js +52 -0
  85. package/dist/commonjs/components/SettingsView.d.ts +13 -0
  86. package/dist/commonjs/components/SettingsView.js +328 -0
  87. package/dist/commonjs/components/TouchableScale.d.ts +2 -2
  88. package/dist/commonjs/components/TouchableScale.js +2 -2
  89. package/dist/commonjs/components/TreeNode.js +2 -2
  90. package/dist/commonjs/constants/index.js +1 -12
  91. package/dist/commonjs/constants/version.d.ts +1 -1
  92. package/dist/commonjs/constants/version.js +1 -1
  93. package/dist/commonjs/customHooks/analyticsLogger.d.ts +8 -0
  94. package/dist/commonjs/customHooks/analyticsLogger.js +42 -1
  95. package/dist/commonjs/customHooks/consoleLogger.js +137 -13
  96. package/dist/commonjs/customHooks/networkLogger.d.ts +0 -1
  97. package/dist/commonjs/customHooks/networkLogger.js +0 -1
  98. package/dist/commonjs/customHooks/reduxLogger.d.ts +2 -9
  99. package/dist/commonjs/enums/index.d.ts +39 -0
  100. package/dist/commonjs/enums/index.js +50 -0
  101. package/dist/commonjs/helpers/index.d.ts +27 -1
  102. package/dist/commonjs/helpers/index.js +187 -12
  103. package/dist/commonjs/helpers/settingsStore.d.ts +2 -24
  104. package/dist/commonjs/i18n/en.json +144 -0
  105. package/dist/commonjs/i18n/index.d.ts +2 -0
  106. package/dist/commonjs/i18n/index.js +27 -0
  107. package/dist/commonjs/i18n/locales/en.json +314 -0
  108. package/dist/commonjs/index.d.ts +2 -3
  109. package/dist/commonjs/index.js +207 -4927
  110. package/dist/commonjs/styles/AppColors.d.ts +148 -0
  111. package/dist/commonjs/styles/AppColors.js +176 -0
  112. package/dist/commonjs/styles/common.d.ts +3 -0
  113. package/dist/commonjs/styles/common.js +201 -0
  114. package/dist/commonjs/styles/index.d.ts +219 -435
  115. package/dist/commonjs/styles/index.js +312 -488
  116. package/dist/commonjs/types/enums.d.ts +9 -0
  117. package/dist/commonjs/types/enums.js +4 -0
  118. package/dist/commonjs/types/index.d.ts +4 -111
  119. package/dist/commonjs/types/index.js +16 -0
  120. package/dist/commonjs/types/interfaces.d.ts +337 -0
  121. package/dist/commonjs/types/interfaces.js +2 -0
  122. package/dist/esm/assets/svgAssets.d.ts +3 -0
  123. package/dist/esm/assets/svgAssets.js +14 -0
  124. package/dist/esm/components/AnalyticsEventCard.d.ts +1 -14
  125. package/dist/esm/components/AnalyticsEventCard.js +118 -48
  126. package/dist/esm/components/AnalyticsGraph.d.ts +2 -6
  127. package/dist/esm/components/AnalyticsGraph.js +8 -8
  128. package/dist/esm/components/AnalyticsTabView.d.ts +15 -0
  129. package/dist/esm/components/AnalyticsTabView.js +151 -0
  130. package/dist/esm/components/AnimatedEntrance.d.ts +1 -1
  131. package/dist/esm/components/AnimatedEntrance.js +2 -2
  132. package/dist/esm/components/ApiDetailView.d.ts +22 -0
  133. package/dist/esm/components/ApiDetailView.js +264 -0
  134. package/dist/esm/components/ApisTabView.d.ts +33 -0
  135. package/dist/esm/components/ApisTabView.js +196 -0
  136. package/dist/esm/components/CodeSnippet.d.ts +1 -5
  137. package/dist/esm/components/CodeSnippet.js +34 -34
  138. package/dist/esm/components/ConsoleLogCard.d.ts +1 -8
  139. package/dist/esm/components/ConsoleLogCard.js +262 -409
  140. package/dist/esm/components/ConsoleLogDetailView.d.ts +9 -0
  141. package/dist/esm/components/ConsoleLogDetailView.js +271 -0
  142. package/dist/esm/components/ConsoleLogsTabView.d.ts +24 -0
  143. package/dist/esm/components/ConsoleLogsTabView.js +348 -0
  144. package/dist/esm/components/DiffViewer.js +4 -2
  145. package/dist/esm/components/DomainHeader.js +66 -41
  146. package/dist/esm/components/EmptyState.d.ts +2 -2
  147. package/dist/esm/components/EmptyState.js +2 -2
  148. package/dist/esm/components/EndOfListFooter.d.ts +8 -0
  149. package/dist/esm/components/EndOfListFooter.js +83 -0
  150. package/dist/esm/components/ErrorBoundary.d.ts +5 -14
  151. package/dist/esm/components/ErrorBoundary.js +29 -29
  152. package/dist/esm/components/FloatingBubble.d.ts +14 -0
  153. package/dist/esm/components/FloatingBubble.js +68 -0
  154. package/dist/esm/components/HeadersSection.js +5 -3
  155. package/dist/esm/components/HighlightText.d.ts +1 -1
  156. package/dist/esm/components/HighlightText.js +5 -7
  157. package/dist/esm/components/Inspector/AnalyticsTab.d.ts +3 -0
  158. package/dist/esm/components/Inspector/AnalyticsTab.js +194 -0
  159. package/dist/esm/components/Inspector/ConsoleTab.d.ts +3 -0
  160. package/dist/esm/components/Inspector/ConsoleTab.js +372 -0
  161. package/dist/esm/components/Inspector/FabLauncher.d.ts +3 -0
  162. package/dist/esm/components/Inspector/FabLauncher.js +49 -0
  163. package/dist/esm/components/Inspector/InsightsDashboard.d.ts +3 -0
  164. package/dist/esm/components/Inspector/InsightsDashboard.js +614 -0
  165. package/dist/esm/components/Inspector/InspectorContext.d.ts +5 -0
  166. package/dist/esm/components/Inspector/InspectorContext.js +13 -0
  167. package/dist/esm/components/Inspector/InspectorHeader.d.ts +3 -0
  168. package/dist/esm/components/Inspector/InspectorHeader.js +447 -0
  169. package/dist/esm/components/Inspector/LogDetail.d.ts +3 -0
  170. package/dist/esm/components/Inspector/LogDetail.js +925 -0
  171. package/dist/esm/components/Inspector/MainScreen.d.ts +3 -0
  172. package/dist/esm/components/Inspector/MainScreen.js +63 -0
  173. package/dist/esm/components/Inspector/NavigationTracker.d.ts +3 -0
  174. package/dist/esm/components/Inspector/NavigationTracker.js +10 -0
  175. package/dist/esm/components/Inspector/NetworkDetail.d.ts +3 -0
  176. package/dist/esm/components/Inspector/NetworkDetail.js +367 -0
  177. package/dist/esm/components/Inspector/NetworkTab.d.ts +3 -0
  178. package/dist/esm/components/Inspector/NetworkTab.js +243 -0
  179. package/dist/esm/components/Inspector/ReduxTab.d.ts +3 -0
  180. package/dist/esm/components/Inspector/ReduxTab.js +70 -0
  181. package/dist/esm/components/Inspector/SettingsPanel.d.ts +3 -0
  182. package/dist/esm/components/Inspector/SettingsPanel.js +1438 -0
  183. package/dist/esm/components/Inspector/TabBar.d.ts +3 -0
  184. package/dist/esm/components/Inspector/TabBar.js +90 -0
  185. package/dist/esm/components/Inspector/WebViewTab.d.ts +3 -0
  186. package/dist/esm/components/Inspector/WebViewTab.js +752 -0
  187. package/dist/esm/components/InspectorHeader.d.ts +19 -0
  188. package/dist/esm/components/InspectorHeader.js +323 -0
  189. package/dist/esm/components/InspectorTabBar.d.ts +16 -0
  190. package/dist/esm/components/InspectorTabBar.js +84 -0
  191. package/dist/esm/components/JsonViewer.d.ts +4 -1
  192. package/dist/esm/components/JsonViewer.js +111 -172
  193. package/dist/esm/components/LogCard.js +111 -88
  194. package/dist/esm/components/MetaAccordion.d.ts +1 -10
  195. package/dist/esm/components/MetaAccordion.js +23 -21
  196. package/dist/esm/components/NavigationTracker.d.ts +7 -0
  197. package/dist/esm/components/NavigationTracker.js +39 -0
  198. package/dist/esm/components/NetworkIcons.d.ts +6 -0
  199. package/dist/esm/components/NetworkIcons.js +46 -6
  200. package/dist/esm/components/ReduxTabView.d.ts +9 -0
  201. package/dist/esm/components/ReduxTabView.js +50 -0
  202. package/dist/esm/components/ReduxTreeView.js +243 -202
  203. package/dist/esm/components/SegmentedTabs.d.ts +15 -0
  204. package/dist/esm/components/SegmentedTabs.js +47 -0
  205. package/dist/esm/components/SettingsView.d.ts +13 -0
  206. package/dist/esm/components/SettingsView.js +321 -0
  207. package/dist/esm/components/TouchableScale.d.ts +2 -2
  208. package/dist/esm/components/TouchableScale.js +2 -2
  209. package/dist/esm/components/TreeNode.js +2 -2
  210. package/dist/esm/constants/index.js +1 -12
  211. package/dist/esm/constants/version.d.ts +1 -1
  212. package/dist/esm/constants/version.js +1 -1
  213. package/dist/esm/customHooks/analyticsLogger.d.ts +8 -0
  214. package/dist/esm/customHooks/analyticsLogger.js +37 -0
  215. package/dist/esm/customHooks/consoleLogger.js +137 -13
  216. package/dist/esm/customHooks/networkLogger.d.ts +0 -1
  217. package/dist/esm/customHooks/networkLogger.js +0 -1
  218. package/dist/esm/customHooks/reduxLogger.d.ts +2 -9
  219. package/dist/esm/enums/index.d.ts +39 -0
  220. package/dist/esm/enums/index.js +47 -0
  221. package/dist/esm/helpers/index.d.ts +27 -1
  222. package/dist/esm/helpers/index.js +180 -11
  223. package/dist/esm/helpers/settingsStore.d.ts +2 -24
  224. package/dist/esm/i18n/en.json +144 -0
  225. package/dist/esm/i18n/index.d.ts +2 -0
  226. package/dist/esm/i18n/index.js +22 -0
  227. package/dist/esm/i18n/locales/en.json +314 -0
  228. package/dist/esm/index.d.ts +2 -3
  229. package/dist/esm/index.js +207 -4923
  230. package/dist/esm/styles/AppColors.d.ts +148 -0
  231. package/dist/esm/styles/AppColors.js +176 -0
  232. package/dist/esm/styles/common.d.ts +3 -0
  233. package/dist/esm/styles/common.js +197 -0
  234. package/dist/esm/styles/index.d.ts +219 -435
  235. package/dist/esm/styles/index.js +312 -488
  236. package/dist/esm/types/enums.d.ts +9 -0
  237. package/dist/esm/types/enums.js +3 -0
  238. package/dist/esm/types/index.d.ts +4 -111
  239. package/dist/esm/types/index.js +2 -1
  240. package/dist/esm/types/interfaces.d.ts +337 -0
  241. package/dist/esm/types/interfaces.js +1 -0
  242. package/example/App.tsx +88 -1
  243. package/example/android/app/build.gradle +29 -1
  244. package/example/android/app/src/main/java/com/example/MainApplication.kt +25 -0
  245. package/example/android/build.gradle +31 -4
  246. package/example/android/gradle/wrapper/gradle-wrapper.properties +1 -1
  247. package/example/android/gradle.properties +1 -0
  248. package/example/android/settings.gradle +20 -1
  249. package/example/package-lock.json +1 -1
  250. package/package.json +3 -1
@@ -22,77 +22,102 @@ const DomainHeader = ({ pageName, color, stats, activeFilters, onToggleFilter, i
22
22
  outputRange: ['-90deg', '0deg'],
23
23
  });
24
24
  const visibleStats = ['success', 'failed', 'loading'];
25
- return (<Pressable style={[styles.domainHeaderRow, !isFirst && styles.domainHeaderSeparator]} onPress={() => onToggleCollapse(pageName)}>
26
- <View style={styles.domainHeaderLeft}>
27
- <Animated.View style={{ transform: [{ rotate: chevronRotate }] }}>
28
- <ChevronIcon color={AppColors.grayTextWeak} size={14}/>
29
- </Animated.View>
30
- <ScreenIcon color={color} size={16}/>
31
- <View style={{ flex: 1, marginLeft: 6, justifyContent: 'center' }}>
32
- <Text style={[styles.domainHeaderText, { color, marginLeft: 0 }]} numberOfLines={1}>
33
- {pageName}
34
- </Text>
35
- <View style={styles.domainSubRow}>
36
- <Text style={styles.domainTimestamp}>
25
+ const total = stats.success + stats.failed + stats.loading;
26
+ const pctSuccess = total > 0 ? Math.round((stats.success / total) * 100) : 0;
27
+ const pctFailed = total > 0 ? Math.round((stats.failed / total) * 100) : 0;
28
+ const pctLoading = total > 0 ? Math.round((stats.loading / total) * 100) : 0;
29
+ return (<Pressable style={styles.domainHeaderCard} onPress={() => onToggleCollapse(pageName)}>
30
+ <View style={styles.domainHeaderTopRow}>
31
+ <View style={styles.domainHeaderLeft}>
32
+ <Animated.View style={{ transform: [{ rotate: chevronRotate }] }}>
33
+ <ChevronIcon color={AppColors.grayTextWeak} size={13}/>
34
+ </Animated.View>
35
+ <View style={[styles.domainIconWrap, { backgroundColor: `${color}18` }]}>
36
+ <ScreenIcon color={color} size={14}/>
37
+ </View>
38
+ <View style={{ flex: 1, justifyContent: 'center' }}>
39
+ <Text style={styles.domainTitleText} numberOfLines={1}>
40
+ {pageName}
41
+ </Text>
42
+ <Text style={styles.domainSummaryText} numberOfLines={1}>
37
43
  {formatDateTime(timestamp)}
38
44
  </Text>
39
45
  </View>
40
46
  </View>
41
- </View>
42
47
 
43
- <View style={styles.domainStatsGroup}>
44
- {visibleStats.map((type, index) => {
45
- const isLast = index === visibleStats.length - 1;
48
+ <View style={styles.domainStatsGroup}>
49
+ {visibleStats.map(type => {
46
50
  const isActive = activeFilters.has(type);
47
51
  let IconComponent;
48
52
  let activeColor = '';
49
53
  let count = 0;
50
- let bgStyle = {};
51
54
  if (type === 'success') {
52
55
  IconComponent = CheckIcon;
53
56
  activeColor = AppColors.greenColor;
54
57
  count = stats.success;
55
- bgStyle = {
56
- backgroundColor: isActive
57
- ? `${AppColors.greenColor}15`
58
- : 'transparent',
59
- };
60
58
  }
61
59
  else if (type === 'failed') {
62
60
  IconComponent = FailIcon;
63
61
  activeColor = AppColors.errorColor;
64
62
  count = stats.failed;
65
- bgStyle = {
66
- backgroundColor: isActive
67
- ? `${AppColors.errorColor}15`
68
- : 'transparent',
69
- };
70
63
  }
71
64
  else {
72
65
  IconComponent = ClockIcon;
73
66
  activeColor = AppColors.darkOrange;
74
67
  count = stats.loading;
75
- bgStyle = {
76
- backgroundColor: isActive
77
- ? `${AppColors.darkOrange}15`
78
- : 'transparent',
79
- };
80
68
  }
81
- return (<Pressable key={type} onPress={() => onToggleFilter(pageName, type)} style={[
82
- styles.groupBtnItem,
83
- bgStyle,
84
- !isLast && styles.groupBtnBorderRight,
69
+ return (<Pressable key={type} onPress={() => onToggleFilter(pageName, type)} hitSlop={6} style={[
70
+ styles.domainStatPill,
71
+ isActive && {
72
+ borderColor: `${activeColor}40`,
73
+ backgroundColor: `${activeColor}12`,
74
+ },
85
75
  ]}>
86
- <IconComponent color={isActive ? activeColor : AppColors.grayTextWeak} size={type === 'failed' ? 8 : 10}/>
87
- <Text style={[
76
+ <View style={[
77
+ styles.filterCheckbox,
78
+ { marginRight: 0, width: 11, height: 11, borderRadius: 2.5 },
79
+ isActive && [
80
+ styles.filterCheckboxActive,
81
+ { backgroundColor: activeColor },
82
+ ],
83
+ ]}>
84
+ {isActive && (<CheckIcon color={AppColors.white} size={7}/>)}
85
+ </View>
86
+ <IconComponent color={isActive ? activeColor : AppColors.grayTextWeak} size={type === 'failed' ? 8 : 10}/>
87
+ <Text style={[
88
88
  styles.domainStatText,
89
89
  { color: isActive ? activeColor : AppColors.grayTextWeak },
90
90
  ]}>
91
- {count}
92
- </Text>
93
- </Pressable>);
91
+ {count}
92
+ </Text>
93
+ </Pressable>);
94
94
  })}
95
+ </View>
95
96
  </View>
97
+
98
+ {total > 0 && (<View style={styles.domainProgressTrack}>
99
+ {pctSuccess > 0 && (<View style={[
100
+ styles.domainProgressSegment,
101
+ {
102
+ width: `${pctSuccess}%`,
103
+ backgroundColor: AppColors.greenColor,
104
+ },
105
+ ]}/>)}
106
+ {pctFailed > 0 && (<View style={[
107
+ styles.domainProgressSegment,
108
+ {
109
+ width: `${pctFailed}%`,
110
+ backgroundColor: AppColors.errorColor,
111
+ },
112
+ ]}/>)}
113
+ {pctLoading > 0 && (<View style={[
114
+ styles.domainProgressSegment,
115
+ {
116
+ width: `${pctLoading}%`,
117
+ backgroundColor: AppColors.darkOrange,
118
+ },
119
+ ]}/>)}
120
+ </View>)}
96
121
  </Pressable>);
97
122
  };
98
123
  export default DomainHeader;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- declare const EmptyState: ({ isSearch }: {
2
+ declare const EmptyState: React.NamedExoticComponent<{
3
3
  isSearch?: boolean;
4
- }) => React.JSX.Element;
4
+ }>;
5
5
  export default EmptyState;
@@ -8,7 +8,7 @@ import { EmptyRadarIcon } from './NetworkIcons';
8
8
  // Stylesheet
9
9
  import { AppColors } from '../styles/AppColors';
10
10
  import styles from '../styles';
11
- const EmptyState = ({ isSearch }) => {
11
+ const EmptyState = React.memo(function EmptyState({ isSearch }) {
12
12
  const iconPulse = useRef(new Animated.Value(1)).current;
13
13
  useEffect(() => {
14
14
  const loop = Animated.loop(Animated.sequence([
@@ -49,5 +49,5 @@ const EmptyState = ({ isSearch }) => {
49
49
  <Text style={styles.reloadBtnText}>Reload App</Text>
50
50
  </TouchableScale>)}
51
51
  </AnimatedEntrance>);
52
- };
52
+ });
53
53
  export default EmptyState;
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ interface EndOfListFooterProps {
3
+ count?: number;
4
+ label?: string;
5
+ message?: string;
6
+ }
7
+ export declare const EndOfListFooter: React.FC<EndOfListFooterProps>;
8
+ export default EndOfListFooter;
@@ -0,0 +1,83 @@
1
+ import React from 'react';
2
+ import { StyleSheet, Text, View } from 'react-native';
3
+ import { AppColors } from '../styles/AppColors';
4
+ import { AppFonts } from '../styles/AppFonts';
5
+ import { CheckIcon } from './NetworkIcons';
6
+ export const EndOfListFooter = ({ count, label, message = "You've reached the end of the list", }) => {
7
+ return (<View style={styles.container}>
8
+ <View style={styles.dividerLine}/>
9
+ <View style={styles.badgePill}>
10
+ <View style={styles.iconCircle}>
11
+ <CheckIcon color={AppColors.purple} size={8}/>
12
+ </View>
13
+ <Text style={styles.messageText}>{message}</Text>
14
+ {count != null && count > 0 && (<View style={styles.countBadge}>
15
+ <Text style={styles.countText}>
16
+ {count} {label ? (count === 1 ? label.replace(/s$/, '') : label) : ''}
17
+ </Text>
18
+ </View>)}
19
+ </View>
20
+ <View style={styles.dividerLine}/>
21
+ </View>);
22
+ };
23
+ const styles = StyleSheet.create({
24
+ container: {
25
+ flexDirection: 'row',
26
+ alignItems: 'center',
27
+ justifyContent: 'center',
28
+ paddingHorizontal: 16,
29
+ paddingTop: 16,
30
+ paddingBottom: 28,
31
+ gap: 8,
32
+ },
33
+ dividerLine: {
34
+ flex: 1,
35
+ height: 1,
36
+ backgroundColor: AppColors.dividerColor,
37
+ opacity: 0.7,
38
+ },
39
+ badgePill: {
40
+ flexDirection: 'row',
41
+ alignItems: 'center',
42
+ gap: 6,
43
+ paddingHorizontal: 10,
44
+ paddingVertical: 5,
45
+ borderRadius: 999,
46
+ backgroundColor: AppColors.primaryLight,
47
+ borderWidth: 1,
48
+ borderColor: AppColors.grayBorderSecondary,
49
+ shadowColor: AppColors.black,
50
+ shadowOffset: { width: 0, height: 1 },
51
+ shadowOpacity: 0.04,
52
+ shadowRadius: 2,
53
+ elevation: 1,
54
+ },
55
+ iconCircle: {
56
+ width: 14,
57
+ height: 14,
58
+ borderRadius: 7,
59
+ backgroundColor: `${AppColors.purple}18`,
60
+ alignItems: 'center',
61
+ justifyContent: 'center',
62
+ },
63
+ messageText: {
64
+ fontFamily: AppFonts.interMedium,
65
+ fontSize: 11,
66
+ color: AppColors.grayTextWeak,
67
+ letterSpacing: 0.1,
68
+ },
69
+ countBadge: {
70
+ paddingHorizontal: 5,
71
+ paddingVertical: 1,
72
+ borderRadius: 6,
73
+ backgroundColor: AppColors.grayBackground,
74
+ borderWidth: 1,
75
+ borderColor: AppColors.grayBorderSecondary,
76
+ },
77
+ countText: {
78
+ fontFamily: AppFonts.interBold,
79
+ fontSize: 9.5,
80
+ color: AppColors.grayTextStrong,
81
+ },
82
+ });
83
+ export default EndOfListFooter;
@@ -1,17 +1,8 @@
1
- import React, { Component, ErrorInfo, ReactNode } from 'react';
2
- interface Props {
3
- children: ReactNode;
4
- onClose?: () => void;
5
- onReset?: () => void;
6
- fallbackType?: 'modal' | 'inline';
7
- }
8
- interface State {
9
- hasError: boolean;
10
- error: Error | null;
11
- }
12
- export declare class ErrorBoundary extends Component<Props, State> {
13
- state: State;
14
- static getDerivedStateFromError(error: Error): State;
1
+ import React, { Component, ErrorInfo } from 'react';
2
+ import { ErrorBoundaryProps, ErrorBoundaryState } from '../types';
3
+ export declare class ErrorBoundary extends Component<ErrorBoundaryProps, ErrorBoundaryState> {
4
+ state: ErrorBoundaryState;
5
+ static getDerivedStateFromError(error: Error): ErrorBoundaryState;
15
6
  componentDidCatch(error: Error, errorInfo: ErrorInfo): void;
16
7
  private handleReset;
17
8
  private handleCopyTrace;
@@ -1,5 +1,5 @@
1
1
  import React, { Component } from 'react';
2
- import { StyleSheet, Text, View, ScrollView, TouchableOpacity, Platform } from 'react-native';
2
+ import { StyleSheet, Text, View, ScrollView, TouchableOpacity } from 'react-native';
3
3
  import { AppColors } from '../styles/AppColors';
4
4
  import { AppFonts } from '../styles/AppFonts';
5
5
  import { copyToClipboard } from '../helpers';
@@ -91,7 +91,7 @@ ${error.stack}`;
91
91
  <View style={{
92
92
  flexDirection: 'row',
93
93
  alignItems: 'center',
94
- backgroundColor: isNativeCrash ? 'rgba(239, 68, 68, 0.1)' : 'rgba(245, 158, 11, 0.1)',
94
+ backgroundColor: isNativeCrash ? `${AppColors.errorColor}1A` : `${AppColors.amber500}1A`,
95
95
  paddingHorizontal: 10,
96
96
  paddingVertical: 4,
97
97
  borderRadius: 20,
@@ -101,7 +101,7 @@ ${error.stack}`;
101
101
  <Text style={{
102
102
  fontSize: 10,
103
103
  fontWeight: 'bold',
104
- color: isNativeCrash ? '#EF4444' : '#F59E0B',
104
+ color: isNativeCrash ? AppColors.errorColor : AppColors.amber500,
105
105
  fontFamily: AppFonts.interBold || 'System'
106
106
  }}>
107
107
  {isNativeCrash ? '🔴 NATIVE CRASH' : '🟡 JAVASCRIPT CRASH'}
@@ -113,22 +113,22 @@ ${error.stack}`;
113
113
  </Text>
114
114
 
115
115
  {parsed && (<View style={{
116
- backgroundColor: '#F1F5F9',
116
+ backgroundColor: AppColors.slate100,
117
117
  borderRadius: 8,
118
118
  padding: 10,
119
119
  width: '100%',
120
120
  marginBottom: 10,
121
121
  borderWidth: 1,
122
- borderColor: '#E2E8F0',
122
+ borderColor: AppColors.slate200,
123
123
  gap: 4
124
124
  }}>
125
- <Text style={{ fontSize: 11, color: '#475569', fontFamily: AppFonts.interMedium }} numberOfLines={1}>
125
+ <Text style={{ fontSize: 11, color: AppColors.slate600, fontFamily: AppFonts.interMedium }} numberOfLines={1}>
126
126
  <Text style={{ fontWeight: 'bold' }}>Method:</Text> {parsed.method}
127
127
  </Text>
128
- <Text style={{ fontSize: 11, color: '#475569', fontFamily: AppFonts.interMedium }} numberOfLines={1}>
128
+ <Text style={{ fontSize: 11, color: AppColors.slate600, fontFamily: AppFonts.interMedium }} numberOfLines={1}>
129
129
  <Text style={{ fontWeight: 'bold' }}>File:</Text> {parsed.file}
130
130
  </Text>
131
- <Text style={{ fontSize: 11, color: '#475569', fontFamily: AppFonts.interMedium }}>
131
+ <Text style={{ fontSize: 11, color: AppColors.slate600, fontFamily: AppFonts.interMedium }}>
132
132
  <Text style={{ fontWeight: 'bold' }}>Line:</Text> {parsed.line} <Text style={{ fontWeight: 'bold' }}>Col:</Text> {parsed.column}
133
133
  </Text>
134
134
  </View>)}
@@ -143,7 +143,7 @@ ${error.stack}`;
143
143
 
144
144
  <View style={{ width: '100%', gap: 8, marginBottom: 12 }}>
145
145
  <TouchableOpacity style={{
146
- backgroundColor: '#0F172A',
146
+ backgroundColor: AppColors.slate900,
147
147
  height: 38,
148
148
  borderRadius: 8,
149
149
  justifyContent: 'center',
@@ -151,7 +151,7 @@ ${error.stack}`;
151
151
  flexDirection: 'row',
152
152
  gap: 6
153
153
  }} onPress={this.handleCopyTrace}>
154
- <Text style={{ color: '#FFFFFF', fontSize: 12, fontWeight: 'bold', fontFamily: AppFonts.interBold || 'System' }}>
154
+ <Text style={{ color: AppColors.white, fontSize: 12, fontWeight: 'bold', fontFamily: AppFonts.interBold || 'System' }}>
155
155
  📋 Copy Crash Traceback
156
156
  </Text>
157
157
  </TouchableOpacity>
@@ -172,11 +172,11 @@ ${error.stack}`;
172
172
  return this.props.children;
173
173
  }
174
174
  }
175
- const monoFont = Platform.OS === 'ios' ? 'Menlo' : 'monospace';
175
+ const monoFont = AppFonts.interRegular;
176
176
  const styles = StyleSheet.create({
177
177
  container: {
178
178
  flex: 1,
179
- backgroundColor: 'rgba(0,0,0,0.3)',
179
+ backgroundColor: `${AppColors.black}4D`,
180
180
  justifyContent: 'center',
181
181
  alignItems: 'center',
182
182
  padding: 16,
@@ -184,11 +184,11 @@ const styles = StyleSheet.create({
184
184
  card: {
185
185
  width: '100%',
186
186
  maxWidth: 400,
187
- backgroundColor: '#FFFFFF',
187
+ backgroundColor: AppColors.white,
188
188
  borderRadius: 16,
189
189
  padding: 20,
190
190
  alignItems: 'center',
191
- shadowColor: '#000000',
191
+ shadowColor: AppColors.black,
192
192
  shadowOffset: { width: 0, height: 4 },
193
193
  shadowOpacity: 0.1,
194
194
  shadowRadius: 12,
@@ -201,14 +201,14 @@ const styles = StyleSheet.create({
201
201
  title: {
202
202
  fontFamily: AppFonts.interBold || 'System',
203
203
  fontSize: 18,
204
- color: '#0F172A',
204
+ color: AppColors.slate900,
205
205
  marginBottom: 8,
206
206
  textAlign: 'center',
207
207
  },
208
208
  subtitle: {
209
209
  fontFamily: AppFonts.interRegular || 'System',
210
210
  fontSize: 12,
211
- color: '#64748B',
211
+ color: AppColors.slate500,
212
212
  lineHeight: 18,
213
213
  textAlign: 'center',
214
214
  marginBottom: 16,
@@ -216,10 +216,10 @@ const styles = StyleSheet.create({
216
216
  scroll: {
217
217
  width: '100%',
218
218
  maxHeight: 180,
219
- backgroundColor: '#F8FAFC',
219
+ backgroundColor: AppColors.slate50,
220
220
  borderRadius: 8,
221
221
  borderWidth: 1,
222
- borderColor: '#E2E8F0',
222
+ borderColor: AppColors.slate200,
223
223
  padding: 10,
224
224
  marginBottom: 20,
225
225
  },
@@ -229,7 +229,7 @@ const styles = StyleSheet.create({
229
229
  code: {
230
230
  fontFamily: monoFont,
231
231
  fontSize: 11,
232
- color: '#E11D48',
232
+ color: AppColors.rose600,
233
233
  },
234
234
  btnRow: {
235
235
  flexDirection: 'row',
@@ -238,7 +238,7 @@ const styles = StyleSheet.create({
238
238
  },
239
239
  resetBtn: {
240
240
  flex: 1,
241
- backgroundColor: AppColors.purple || '#684B9B',
241
+ backgroundColor: AppColors.purple,
242
242
  height: 40,
243
243
  borderRadius: 8,
244
244
  justifyContent: 'center',
@@ -247,13 +247,13 @@ const styles = StyleSheet.create({
247
247
  resetBtnText: {
248
248
  fontFamily: AppFonts.interBold || 'System',
249
249
  fontSize: 13,
250
- color: '#FFFFFF',
250
+ color: AppColors.white,
251
251
  },
252
252
  closeBtn: {
253
253
  flex: 1,
254
- backgroundColor: '#F1F5F9',
254
+ backgroundColor: AppColors.slate100,
255
255
  borderWidth: 1,
256
- borderColor: '#E2E8F0',
256
+ borderColor: AppColors.slate200,
257
257
  height: 40,
258
258
  borderRadius: 8,
259
259
  justifyContent: 'center',
@@ -262,13 +262,13 @@ const styles = StyleSheet.create({
262
262
  closeBtnText: {
263
263
  fontFamily: AppFonts.interBold || 'System',
264
264
  fontSize: 13,
265
- color: '#475569',
265
+ color: AppColors.slate600,
266
266
  },
267
267
  inlineContainer: {
268
268
  padding: 8,
269
- backgroundColor: '#FFE4E6',
269
+ backgroundColor: AppColors.roseBg,
270
270
  borderWidth: 1,
271
- borderColor: '#FCA5A5',
271
+ borderColor: AppColors.errorBorder,
272
272
  borderRadius: 8,
273
273
  flexDirection: 'row',
274
274
  alignItems: 'center',
@@ -278,10 +278,10 @@ const styles = StyleSheet.create({
278
278
  inlineTitle: {
279
279
  fontFamily: AppFonts.interBold || 'System',
280
280
  fontSize: 11,
281
- color: '#991B1B',
281
+ color: AppColors.redErrorText,
282
282
  },
283
283
  inlineResetBtn: {
284
- backgroundColor: '#991B1B',
284
+ backgroundColor: AppColors.redErrorText,
285
285
  paddingHorizontal: 10,
286
286
  paddingVertical: 4,
287
287
  borderRadius: 4,
@@ -289,7 +289,7 @@ const styles = StyleSheet.create({
289
289
  inlineResetText: {
290
290
  fontFamily: AppFonts.interBold || 'System',
291
291
  fontSize: 10,
292
- color: '#FFFFFF',
292
+ color: AppColors.white,
293
293
  },
294
294
  });
295
295
  export default ErrorBoundary;
@@ -0,0 +1,14 @@
1
+ import React from 'react';
2
+ import { Animated, PanResponder } from 'react-native';
3
+ interface FloatingBubbleProps {
4
+ pan: Animated.ValueXY;
5
+ panResponder: ReturnType<typeof PanResponder.create>;
6
+ fabScaleAnim: Animated.Value;
7
+ fabRotateAnim: Animated.Value;
8
+ fabShineAnim: Animated.Value;
9
+ unreadPulseAnim: Animated.Value;
10
+ hasUnread: boolean;
11
+ onPress: () => void;
12
+ }
13
+ export declare const FloatingBubble: React.FC<FloatingBubbleProps>;
14
+ export default FloatingBubble;
@@ -0,0 +1,68 @@
1
+ import React from 'react';
2
+ import { Animated, View } from 'react-native';
3
+ import LinearGradient from 'react-native-linear-gradient';
4
+ import TouchableScale from './TouchableScale';
5
+ import { BrandCircleIcon } from './BrandCircleIcon';
6
+ import styles from '../styles';
7
+ import { AppColors } from '../styles/AppColors';
8
+ export const FloatingBubble = ({ pan, panResponder, fabScaleAnim, fabRotateAnim, fabShineAnim, unreadPulseAnim, hasUnread, onPress, }) => {
9
+ return (<Animated.View style={[
10
+ styles.fabContainer,
11
+ {
12
+ transform: [
13
+ { translateX: pan.x },
14
+ { translateY: pan.y },
15
+ { scale: fabScaleAnim },
16
+ ],
17
+ },
18
+ ]} {...panResponder.panHandlers}>
19
+ <TouchableScale style={styles.fabGradientTouchable} onPress={onPress} activeScale={0.88}>
20
+ <LinearGradient colors={[
21
+ AppColors.gradientPurpleStart,
22
+ AppColors.gradientPurpleMid,
23
+ AppColors.gradientPurpleEnd,
24
+ ]} start={{ x: 0, y: 0 }} end={{ x: 1, y: 1 }} style={styles.fabGradientInner}>
25
+ <Animated.View style={{
26
+ transform: [
27
+ {
28
+ rotate: fabRotateAnim.interpolate({
29
+ inputRange: [0, 1],
30
+ outputRange: ['0deg', '360deg'],
31
+ }),
32
+ },
33
+ ],
34
+ }}>
35
+ <BrandCircleIcon size={38}/>
36
+ </Animated.View>
37
+ </LinearGradient>
38
+
39
+ <View pointerEvents="none" style={styles.fabShineClip}>
40
+ <Animated.View style={[
41
+ styles.fabShineStreak,
42
+ {
43
+ transform: [
44
+ {
45
+ translateX: fabShineAnim.interpolate({
46
+ inputRange: [0, 1],
47
+ outputRange: [-48, 96],
48
+ }),
49
+ },
50
+ { rotate: '25deg' },
51
+ ],
52
+ },
53
+ ]}>
54
+ <LinearGradient colors={[
55
+ 'rgba(255,255,255,0)',
56
+ 'rgba(255,255,255,0.55)',
57
+ 'rgba(255,255,255,0)',
58
+ ]} start={{ x: 0, y: 0.5 }} end={{ x: 1, y: 0.5 }} style={{ flex: 1 }}/>
59
+ </Animated.View>
60
+ </View>
61
+ {hasUnread && (<Animated.View style={[
62
+ styles.fabGreenDot,
63
+ { transform: [{ scale: unreadPulseAnim }] },
64
+ ]}/>)}
65
+ </TouchableScale>
66
+ </Animated.View>);
67
+ };
68
+ export default FloatingBubble;
@@ -1,4 +1,5 @@
1
1
  import React, { useEffect, useMemo, useRef, useState } from 'react';
2
+ import { useTranslation } from 'react-i18next';
2
3
  import { View, Pressable, Text, Animated } from 'react-native';
3
4
  // Components
4
5
  import CopyButton from './CopyButton';
@@ -58,6 +59,7 @@ const HeaderRow = React.memo(function HeaderRow({ headerKey, value, isLast, inde
58
59
  </Animated.View>);
59
60
  });
60
61
  const HeadersSection = ({ title, headers, search, resetKey, }) => {
62
+ const { t } = useTranslation();
61
63
  const { toggleOpen, forceOpen, chevronStyle, bodyStyle } = useAccordion(false, 2400, 300);
62
64
  useEffect(() => {
63
65
  forceOpen(false);
@@ -104,12 +106,12 @@ const HeadersSection = ({ title, headers, search, resetKey, }) => {
104
106
 
105
107
  <Animated.View style={bodyStyle}>
106
108
  <View style={styles.htColHeadRow}>
107
- <Text style={[styles.htColHead, { width: '30%' }]}>KEY</Text>
108
- <Text style={[styles.htColHead, { flex: 1 }]}>VALUE</Text>
109
+ <Text style={[styles.htColHead, { width: '30%' }]}>{t('network.jsonViewer.key')}</Text>
110
+ <Text style={[styles.htColHead, { flex: 1 }]}>{t('network.jsonViewer.value')}</Text>
109
111
  </View>
110
112
 
111
113
  {filtered.length > 0 ? (filtered.map(([k, v], i) => (<HeaderRow key={k} headerKey={k} value={v} isLast={i === filtered.length - 1} index={i}/>))) : (<View style={styles.htEmpty}>
112
- <Text style={styles.htEmptyText}>No matching headers</Text>
114
+ <Text style={styles.htEmptyText}>{t('network.noMatchingHeaders')}</Text>
113
115
  </View>)}
114
116
  </Animated.View>
115
117
  </View>);
@@ -1,3 +1,3 @@
1
1
  import React from 'react';
2
- declare const HighlightText: ({ text, search, style, highlightStyle, detectLinks, ...rest }: any) => React.JSX.Element;
2
+ declare const HighlightText: React.NamedExoticComponent<any>;
3
3
  export default HighlightText;
@@ -2,9 +2,7 @@ import React from 'react';
2
2
  import { Text } from 'react-native';
3
3
  // Helpers
4
4
  import { escapeRegex, handleOpenExternalLink } from '../helpers';
5
- const HighlightText = ({ text, search, style, highlightStyle, detectLinks, ...rest }) => {
6
- const hasNumberOfLines = 'numberOfLines' in rest;
7
- const numLines = hasNumberOfLines ? rest.numberOfLines : 1;
5
+ const HighlightText = React.memo(function HighlightText({ text, search, style, highlightStyle, detectLinks, numberOfLines, ...rest }) {
8
6
  // Regex to detect absolute URLs
9
7
  const URL_REGEX = /(https?:\/\/[^\s]+)/g;
10
8
  const renderNormalOrHighlighted = (subText, keyPrefix) => {
@@ -21,7 +19,7 @@ const HighlightText = ({ text, search, style, highlightStyle, detectLinks, ...re
21
19
  };
22
20
  if (detectLinks && text) {
23
21
  const parts = text.split(URL_REGEX);
24
- return (<Text style={style} numberOfLines={numLines} {...rest}>
22
+ return (<Text style={style} numberOfLines={numberOfLines} {...rest}>
25
23
  {parts.map((part, i) => {
26
24
  if (part.match(URL_REGEX)) {
27
25
  return (<Text key={`link-${i}`} style={{
@@ -38,15 +36,15 @@ const HighlightText = ({ text, search, style, highlightStyle, detectLinks, ...re
38
36
  </Text>);
39
37
  }
40
38
  if (!search)
41
- return (<Text style={style} numberOfLines={numLines} {...rest}>
39
+ return (<Text style={style} numberOfLines={numberOfLines} {...rest}>
42
40
  {text}
43
41
  </Text>);
44
42
  const regex = new RegExp(`(${escapeRegex(search)})`, 'gi');
45
43
  const parts = text.split(regex);
46
- return (<Text style={style} numberOfLines={numLines} {...rest}>
44
+ return (<Text style={style} numberOfLines={numberOfLines} {...rest}>
47
45
  {parts.map((part, i) => part.toLowerCase() === search.toLowerCase() ? (<Text key={i} style={highlightStyle}>
48
46
  {part}
49
47
  </Text>) : (<Text key={i}>{part}</Text>))}
50
48
  </Text>);
51
- };
49
+ });
52
50
  export default HighlightText;
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ declare const AnalyticsTab: () => React.JSX.Element;
3
+ export default AnalyticsTab;