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
@@ -0,0 +1,19 @@
1
+ import React from 'react';
2
+ import { Animated } from 'react-native';
3
+ import { NetworkLog, AnalyticsEvent, ConsoleLog } from '../types';
4
+ interface InspectorHeaderProps {
5
+ headerTopPadding: number;
6
+ selected: NetworkLog | null;
7
+ selectedEvent: AnalyticsEvent | null;
8
+ selectedConsoleLog: ConsoleLog | null;
9
+ detailTitle: string;
10
+ showHeaderInfo: boolean;
11
+ clearAnim: Animated.Value;
12
+ onBack: () => void;
13
+ onToggleHeaderInfo: () => void;
14
+ onClearAll: () => void;
15
+ onOpenSettings: () => void;
16
+ onCloseModal: () => void;
17
+ }
18
+ export declare const InspectorHeader: React.FC<InspectorHeaderProps>;
19
+ export default InspectorHeader;
@@ -0,0 +1,323 @@
1
+ import React from 'react';
2
+ import { Alert, Animated, Text, View, } from 'react-native';
3
+ import LinearGradient from 'react-native-linear-gradient';
4
+ import { useTranslation } from 'react-i18next';
5
+ import TouchableScale from './TouchableScale';
6
+ import { WhiteBackNavigation, WipeIcon, SettingsIcon, CloseWhite, ClockIcon, BrandCircleIcon, ChevronIcon, } from './NetworkIcons';
7
+ import { AppColors } from '../styles/AppColors';
8
+ import { AppFonts } from '../styles/AppFonts';
9
+ import styles from '../styles';
10
+ import { METHOD_COLORS, LIB_VERSION } from '../constants';
11
+ import { getStatusColor, getAppName } from '../helpers';
12
+ export const InspectorHeader = React.memo(({ headerTopPadding, selected, selectedEvent, selectedConsoleLog, detailTitle, showHeaderInfo, clearAnim, onBack, onToggleHeaderInfo, onClearAll, onOpenSettings, onCloseModal, }) => {
13
+ const { t } = useTranslation();
14
+ const isNoDetailSelected = selected == null && selectedEvent == null && selectedConsoleLog == null;
15
+ return (<LinearGradient colors={[AppColors.purple, AppColors.gradientPurpleStart]} style={styles.headerGradient}>
16
+ <View style={{ paddingTop: headerTopPadding, width: '100%' }}>
17
+ <View style={styles.header}>
18
+ <View style={[
19
+ styles.headerLeft,
20
+ {
21
+ flexDirection: 'row',
22
+ alignItems: 'center',
23
+ gap: 16,
24
+ flex: isNoDetailSelected ? 5 : 1,
25
+ },
26
+ ]}>
27
+ <TouchableScale onPress={onBack} hitSlop={15} style={[
28
+ {
29
+ width: 38,
30
+ height: 38,
31
+ borderRadius: 19,
32
+ alignItems: 'center',
33
+ justifyContent: 'center',
34
+ backgroundColor: 'rgba(255,255,255,0.18)',
35
+ borderWidth: 1,
36
+ borderColor: 'rgba(255,255,255,0.30)',
37
+ },
38
+ isNoDetailSelected && { display: 'none' },
39
+ ]}>
40
+ <View style={{
41
+ position: 'absolute',
42
+ width: 48,
43
+ height: 48,
44
+ borderRadius: 24,
45
+ backgroundColor: 'rgba(255,255,255,0.10)',
46
+ }}/>
47
+ <WhiteBackNavigation />
48
+ </TouchableScale>
49
+
50
+ {isNoDetailSelected ? (<TouchableScale onPress={onToggleHeaderInfo} style={{
51
+ flexDirection: 'row',
52
+ alignItems: 'center',
53
+ gap: 10,
54
+ flex: 1,
55
+ }}>
56
+ <View style={{
57
+ width: 38,
58
+ height: 38,
59
+ borderRadius: 19,
60
+ backgroundColor: 'rgba(255,255,255,0.13)',
61
+ borderWidth: 1.5,
62
+ borderColor: 'rgba(255,255,255,0.25)',
63
+ alignItems: 'center',
64
+ justifyContent: 'center',
65
+ }}>
66
+ <BrandCircleIcon size={26} color={AppColors.white}/>
67
+ </View>
68
+ <View style={styles.columnFlex1}>
69
+ <View style={styles.rowGap4}>
70
+ <Text style={[
71
+ styles.headerTitle,
72
+ { fontSize: 16, color: AppColors.white },
73
+ ]}>
74
+ {t('header.title')}
75
+ </Text>
76
+ <View style={{
77
+ transform: [
78
+ { rotate: showHeaderInfo ? '180deg' : '0deg' },
79
+ ],
80
+ }}>
81
+ <ChevronIcon color="rgba(255,255,255,0.7)" size={12}/>
82
+ </View>
83
+ </View>
84
+
85
+ {showHeaderInfo && (<View style={{
86
+ marginTop: 4,
87
+ padding: 8,
88
+ backgroundColor: 'rgba(0,0,0,0.25)',
89
+ borderRadius: 8,
90
+ borderWidth: 1,
91
+ borderColor: 'rgba(255,255,255,0.15)',
92
+ gap: 4,
93
+ }}>
94
+ <Text style={{
95
+ fontFamily: AppFonts.interBold,
96
+ fontSize: 11,
97
+ color: AppColors.white,
98
+ }}>
99
+ {getAppName()}
100
+ </Text>
101
+ <View style={{
102
+ flexDirection: 'row',
103
+ alignItems: 'center',
104
+ gap: 6,
105
+ }}>
106
+ <Text style={{
107
+ fontFamily: AppFonts.interMedium,
108
+ fontSize: 10,
109
+ color: 'rgba(255,255,255,0.8)',
110
+ }}>
111
+ {t('header.engine')}
112
+ </Text>
113
+ <View style={{
114
+ paddingHorizontal: 6,
115
+ paddingVertical: 1,
116
+ borderRadius: 4,
117
+ backgroundColor: 'rgba(255,255,255,0.2)',
118
+ }}>
119
+ <Text style={{
120
+ fontFamily: AppFonts.interBold,
121
+ fontSize: 9,
122
+ color: AppColors.white,
123
+ }}>
124
+ v{LIB_VERSION}
125
+ </Text>
126
+ </View>
127
+ </View>
128
+ </View>)}
129
+ </View>
130
+ </TouchableScale>) : null}
131
+ </View>
132
+
133
+ {!isNoDetailSelected && (<View style={styles.headerCenter}>
134
+ {selected != null ? (<View style={styles.headerDetailCenter}>
135
+ <View style={styles.headerDetailRow}>
136
+ <View style={[
137
+ styles.headerMethodBadge,
138
+ {
139
+ backgroundColor: METHOD_COLORS[selected.method] ??
140
+ AppColors.grayText,
141
+ },
142
+ ]}>
143
+ <Text style={styles.headerMethodText}>
144
+ {selected.method}
145
+ </Text>
146
+ </View>
147
+ <Text style={styles.headerDetailTitle} numberOfLines={1} ellipsizeMode="middle">
148
+ {detailTitle}
149
+ </Text>
150
+ </View>
151
+ <View style={styles.headerDetailSubRow}>
152
+ <View style={{
153
+ flexDirection: 'row',
154
+ alignItems: 'center',
155
+ gap: 5,
156
+ paddingHorizontal: 8,
157
+ paddingVertical: 3,
158
+ borderRadius: 20,
159
+ backgroundColor: `${getStatusColor(selected.status)}26`,
160
+ borderWidth: 1,
161
+ borderColor: `${getStatusColor(selected.status)}55`,
162
+ }}>
163
+ <View style={[
164
+ styles.headerStatusDot,
165
+ {
166
+ backgroundColor: getStatusColor(selected.status),
167
+ },
168
+ ]}/>
169
+ <Text style={[
170
+ styles.headerSubTitle,
171
+ { fontFamily: AppFonts.interBold },
172
+ ]}>
173
+ {selected.status === 0
174
+ ? 'Failed'
175
+ : selected.status ?? 'Pending'}
176
+ </Text>
177
+ </View>
178
+ <View style={{
179
+ flexDirection: 'row',
180
+ alignItems: 'center',
181
+ gap: 4,
182
+ paddingHorizontal: 8,
183
+ paddingVertical: 3,
184
+ borderRadius: 20,
185
+ backgroundColor: 'rgba(255,255,255,0.16)',
186
+ }}>
187
+ <ClockIcon color={AppColors.white} size={11}/>
188
+ <Text style={styles.headerSubTitle}>
189
+ {selected.duration != null
190
+ ? `${selected.duration}ms`
191
+ : '—'}
192
+ </Text>
193
+ </View>
194
+ </View>
195
+ </View>) : selectedEvent != null ? (<View style={styles.headerDetailCenter}>
196
+ <View style={styles.headerDetailRow}>
197
+ <View style={[
198
+ styles.headerMethodBadge,
199
+ {
200
+ backgroundColor: selectedEvent.source === 'firebase'
201
+ ? 'rgba(224,123,26,0.3)'
202
+ : 'rgba(124,92,191,0.3)',
203
+ },
204
+ ]}>
205
+ <Text style={styles.headerMethodText}>
206
+ {selectedEvent.source === 'firebase' ? 'FB' : 'MAN'}
207
+ </Text>
208
+ </View>
209
+ <Text style={styles.headerDetailTitle} numberOfLines={1} ellipsizeMode="middle">
210
+ {selectedEvent.name}
211
+ </Text>
212
+ </View>
213
+ <View style={styles.headerDetailSubRow}>
214
+ <View style={[
215
+ styles.headerStatusDot,
216
+ {
217
+ backgroundColor: selectedEvent.source === 'firebase'
218
+ ? AppColors.amber
219
+ : AppColors.purple,
220
+ },
221
+ ]}/>
222
+ <Text style={styles.headerSubTitle}>
223
+ {Object.keys(selectedEvent.params ?? {}).length} param
224
+ {Object.keys(selectedEvent.params ?? {}).length !== 1
225
+ ? 's'
226
+ : ''}
227
+ {' · '}
228
+ {selectedEvent.source}
229
+ </Text>
230
+ </View>
231
+ </View>) : selectedConsoleLog != null ? (<View style={styles.headerDetailCenter}>
232
+ <View style={styles.headerDetailRow}>
233
+ <View style={[
234
+ styles.headerMethodBadge,
235
+ {
236
+ backgroundColor: selectedConsoleLog.type === 'error'
237
+ ? AppColors.errorColor
238
+ : selectedConsoleLog.type === 'warn'
239
+ ? AppColors.lightOrange
240
+ : AppColors.purple,
241
+ },
242
+ ]}>
243
+ <Text style={styles.headerMethodText}>
244
+ {selectedConsoleLog.type?.toUpperCase() || 'LOG'}
245
+ </Text>
246
+ </View>
247
+ <Text style={styles.headerDetailTitle} numberOfLines={1} ellipsizeMode="middle">
248
+ {t('details.console_log')} #{selectedConsoleLog.id + 1}
249
+ </Text>
250
+ </View>
251
+ <View style={styles.headerDetailSubRow}>
252
+ <Text style={styles.headerSubTitle}>
253
+ console.
254
+ {selectedConsoleLog.sourceMethod ||
255
+ selectedConsoleLog.type ||
256
+ 'log'}
257
+ </Text>
258
+ </View>
259
+ </View>) : null}
260
+ </View>)}
261
+
262
+ <View style={[
263
+ styles.headerRight,
264
+ isNoDetailSelected && {
265
+ flexShrink: 0,
266
+ minWidth: 116,
267
+ },
268
+ ]}>
269
+ {isNoDetailSelected && (<TouchableScale onPress={() => {
270
+ Alert.alert(t('header.clear_all'), t('header.clear_all_confirm'), [
271
+ { text: t('header.cancel'), style: 'cancel' },
272
+ {
273
+ text: t('header.clear'),
274
+ onPress: onClearAll,
275
+ style: 'destructive',
276
+ },
277
+ ]);
278
+ }} hitSlop={15} style={[
279
+ styles.closeButtonSquare,
280
+ {
281
+ marginRight: 8,
282
+ backgroundColor: 'rgba(255,255,255,0.15)',
283
+ },
284
+ ]}>
285
+ <Animated.View style={{
286
+ transform: [
287
+ {
288
+ rotate: clearAnim.interpolate({
289
+ inputRange: [0, 1],
290
+ outputRange: ['0deg', '-25deg'],
291
+ }),
292
+ },
293
+ {
294
+ scale: clearAnim.interpolate({
295
+ inputRange: [0, 0.5, 1],
296
+ outputRange: [1, 1.25, 1],
297
+ }),
298
+ },
299
+ ],
300
+ }}>
301
+ <WipeIcon color={AppColors.white} size={16}/>
302
+ </Animated.View>
303
+ </TouchableScale>)}
304
+
305
+ {isNoDetailSelected && (<TouchableScale onPress={onOpenSettings} hitSlop={15} style={[
306
+ styles.closeButtonSquare,
307
+ {
308
+ marginRight: 8,
309
+ backgroundColor: 'rgba(255,255,255,0.15)',
310
+ },
311
+ ]}>
312
+ <SettingsIcon color={AppColors.white} size={16}/>
313
+ </TouchableScale>)}
314
+
315
+ <TouchableScale onPress={onCloseModal} hitSlop={15} style={styles.closeButtonSquare}>
316
+ <CloseWhite size={16}/>
317
+ </TouchableScale>
318
+ </View>
319
+ </View>
320
+ </View>
321
+ </LinearGradient>);
322
+ });
323
+ export default InspectorHeader;
@@ -0,0 +1,16 @@
1
+ import React from 'react';
2
+ import { Animated } from 'react-native';
3
+ import { ActiveTab } from '../types';
4
+ interface InspectorTabBarProps {
5
+ activeTab: ActiveTab;
6
+ tabVisibility: Record<string, boolean>;
7
+ apisCount: number;
8
+ logsCount: number;
9
+ analyticsCount: number;
10
+ hasUnreadApis: boolean;
11
+ hasUnreadLogs: boolean;
12
+ unreadPulseAnim: Animated.Value;
13
+ onSelectTab: (tabKey: ActiveTab) => void;
14
+ }
15
+ export declare const InspectorTabBar: React.FC<InspectorTabBarProps>;
16
+ export default InspectorTabBar;
@@ -0,0 +1,84 @@
1
+ import React from 'react';
2
+ import { Animated, ScrollView, Text, View } from 'react-native';
3
+ import { useTranslation } from 'react-i18next';
4
+ import TouchableScale from './TouchableScale';
5
+ import { SignalIcon, TerminalIcon, AnalyticsIcon, } from './NetworkIcons';
6
+ import { InspectorTab } from '../enums';
7
+ import { AppColors } from '../styles/AppColors';
8
+ import styles from '../styles';
9
+ export const InspectorTabBar = React.memo(({ activeTab, tabVisibility, apisCount, logsCount, analyticsCount, hasUnreadApis, hasUnreadLogs, unreadPulseAnim, onSelectTab, }) => {
10
+ const { t } = useTranslation();
11
+ const tabs = [
12
+ {
13
+ key: InspectorTab.APIs,
14
+ label: t('tabs.apis'),
15
+ count: apisCount,
16
+ hasUnread: hasUnreadApis,
17
+ icon: (color) => <SignalIcon color={color} size={14}/>,
18
+ },
19
+ {
20
+ key: InspectorTab.Logs,
21
+ label: t('tabs.logs'),
22
+ count: logsCount,
23
+ hasUnread: hasUnreadLogs,
24
+ icon: (color) => <TerminalIcon color={color} size={14}/>,
25
+ },
26
+ {
27
+ key: InspectorTab.Analytics,
28
+ label: t('tabs.analytics'),
29
+ count: analyticsCount,
30
+ hasUnread: false,
31
+ icon: (color) => <AnalyticsIcon color={color} size={14}/>,
32
+ },
33
+ {
34
+ key: InspectorTab.Redux,
35
+ label: t('tabs.redux'),
36
+ count: null,
37
+ hasUnread: false,
38
+ icon: (color) => (<View style={{ width: 14, height: 14, alignItems: 'center', justifyContent: 'center' }}>
39
+ <Text style={{ fontSize: 10, color, fontWeight: '700' }}>⚛︎</Text>
40
+ </View>),
41
+ },
42
+ ];
43
+ return (<View style={styles.tabBarContainer}>
44
+ <ScrollView horizontal showsHorizontalScrollIndicator={false} contentContainerStyle={{ paddingRight: 16 }}>
45
+ {tabs
46
+ .filter(tab => tabVisibility?.[tab.key])
47
+ .map(tab => {
48
+ const isActive = activeTab === tab.key;
49
+ const iconColor = isActive ? AppColors.white : AppColors.grayText;
50
+ const countLabel = tab.count > 99 ? '99+' : String(tab.count);
51
+ const showUnread = (tab.key === 'apis' && hasUnreadApis) ||
52
+ (tab.key === 'logs' && hasUnreadLogs);
53
+ return (<TouchableScale key={tab.key} onPress={() => onSelectTab(tab.key)} style={[
54
+ styles.contentTabButton,
55
+ isActive && styles.contentTabButtonActive,
56
+ ]}>
57
+ <View style={{
58
+ flexDirection: 'row',
59
+ alignItems: 'center',
60
+ gap: 6,
61
+ }}>
62
+ {typeof tab.icon === 'function' ? tab.icon(iconColor) : null}
63
+ <Text numberOfLines={1} ellipsizeMode="tail" style={[
64
+ styles.contentTabButtonText,
65
+ isActive && styles.contentTabButtonTextActive,
66
+ ]}>
67
+ {tab.label} {tab.count > 0 ? `(${countLabel})` : ''}
68
+ </Text>
69
+ {showUnread && (<Animated.View style={{
70
+ width: 6,
71
+ height: 6,
72
+ borderRadius: 3,
73
+ backgroundColor: AppColors.errorColor,
74
+ marginLeft: 4,
75
+ alignSelf: 'center',
76
+ transform: [{ scale: unreadPulseAnim }],
77
+ }}/>)}
78
+ </View>
79
+ </TouchableScale>);
80
+ })}
81
+ </ScrollView>
82
+ </View>);
83
+ });
84
+ export default InspectorTabBar;
@@ -1,11 +1,14 @@
1
1
  import React from 'react';
2
- declare const JsonViewer: ({ data, search, forceOpen, defaultExpandDepth, wrap, fullHeight, onModeChange, }: {
2
+ declare const JsonViewer: ({ data, search, forceOpen, defaultExpandDepth, wrap, fullHeight, maxHeight, mode: externalMode, onModeChange, hideTabs, }: {
3
3
  data: unknown;
4
4
  search?: string;
5
5
  forceOpen?: boolean;
6
6
  defaultExpandDepth?: number;
7
7
  wrap?: boolean;
8
8
  fullHeight?: boolean;
9
+ maxHeight?: number;
10
+ mode?: "pretty" | "raw" | "table";
9
11
  onModeChange?: (mode: "pretty" | "raw" | "table") => void;
12
+ hideTabs?: boolean;
10
13
  }) => React.JSX.Element;
11
14
  export default JsonViewer;