react-native-inapp-inspector 1.1.14 → 1.1.16

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 (246) hide show
  1. package/README.md +133 -151
  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 +34 -51
  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/CopyButton.d.ts +1 -1
  25. package/dist/commonjs/components/CopyButton.js +4 -4
  26. package/dist/commonjs/components/DiffViewer.js +4 -2
  27. package/dist/commonjs/components/DomainHeader.js +66 -41
  28. package/dist/commonjs/components/EmptyState.d.ts +2 -2
  29. package/dist/commonjs/components/EmptyState.js +2 -2
  30. package/dist/commonjs/components/EndOfListFooter.d.ts +8 -0
  31. package/dist/commonjs/components/EndOfListFooter.js +89 -0
  32. package/dist/commonjs/components/ErrorBoundary.d.ts +5 -14
  33. package/dist/commonjs/components/ErrorBoundary.js +28 -28
  34. package/dist/commonjs/components/FloatingBubble.d.ts +14 -0
  35. package/dist/commonjs/components/FloatingBubble.js +75 -0
  36. package/dist/commonjs/components/HeadersSection.js +5 -3
  37. package/dist/commonjs/components/HighlightText.d.ts +1 -1
  38. package/dist/commonjs/components/HighlightText.js +5 -7
  39. package/dist/commonjs/components/Inspector/AnalyticsTab.d.ts +3 -0
  40. package/dist/commonjs/components/Inspector/AnalyticsTab.js +231 -0
  41. package/dist/commonjs/components/Inspector/ConsoleTab.d.ts +3 -0
  42. package/dist/commonjs/components/Inspector/ConsoleTab.js +410 -0
  43. package/dist/commonjs/components/Inspector/FabLauncher.d.ts +3 -0
  44. package/dist/commonjs/components/Inspector/FabLauncher.js +54 -0
  45. package/dist/commonjs/components/Inspector/InsightsDashboard.d.ts +3 -0
  46. package/dist/commonjs/components/Inspector/InsightsDashboard.js +619 -0
  47. package/dist/commonjs/components/Inspector/InspectorContext.d.ts +5 -0
  48. package/dist/commonjs/components/Inspector/InspectorContext.js +18 -0
  49. package/dist/commonjs/components/Inspector/InspectorHeader.d.ts +3 -0
  50. package/dist/commonjs/components/Inspector/InspectorHeader.js +452 -0
  51. package/dist/commonjs/components/Inspector/LogDetail.d.ts +3 -0
  52. package/dist/commonjs/components/Inspector/LogDetail.js +963 -0
  53. package/dist/commonjs/components/Inspector/MainScreen.d.ts +3 -0
  54. package/dist/commonjs/components/Inspector/MainScreen.js +68 -0
  55. package/dist/commonjs/components/Inspector/NavigationTracker.d.ts +3 -0
  56. package/dist/commonjs/components/Inspector/NavigationTracker.js +12 -0
  57. package/dist/commonjs/components/Inspector/NetworkDetail.d.ts +3 -0
  58. package/dist/commonjs/components/Inspector/NetworkDetail.js +405 -0
  59. package/dist/commonjs/components/Inspector/NetworkTab.d.ts +3 -0
  60. package/dist/commonjs/components/Inspector/NetworkTab.js +282 -0
  61. package/dist/commonjs/components/Inspector/ReduxTab.d.ts +3 -0
  62. package/dist/commonjs/components/Inspector/ReduxTab.js +75 -0
  63. package/dist/commonjs/components/Inspector/SettingsPanel.d.ts +3 -0
  64. package/dist/commonjs/components/Inspector/SettingsPanel.js +1476 -0
  65. package/dist/commonjs/components/Inspector/TabBar.d.ts +3 -0
  66. package/dist/commonjs/components/Inspector/TabBar.js +95 -0
  67. package/dist/commonjs/components/Inspector/WebViewTab.d.ts +3 -0
  68. package/dist/commonjs/components/Inspector/WebViewTab.js +757 -0
  69. package/dist/commonjs/components/InspectorHeader.d.ts +19 -0
  70. package/dist/commonjs/components/InspectorHeader.js +329 -0
  71. package/dist/commonjs/components/InspectorTabBar.d.ts +16 -0
  72. package/dist/commonjs/components/InspectorTabBar.js +90 -0
  73. package/dist/commonjs/components/JsonViewer.d.ts +5 -2
  74. package/dist/commonjs/components/JsonViewer.js +111 -172
  75. package/dist/commonjs/components/LogCard.js +109 -86
  76. package/dist/commonjs/components/MetaAccordion.d.ts +1 -10
  77. package/dist/commonjs/components/MetaAccordion.js +23 -21
  78. package/dist/commonjs/components/NavigationTracker.d.ts +7 -0
  79. package/dist/commonjs/components/NavigationTracker.js +76 -0
  80. package/dist/commonjs/components/NetworkIcons.d.ts +6 -0
  81. package/dist/commonjs/components/NetworkIcons.js +54 -8
  82. package/dist/commonjs/components/ReduxTabView.d.ts +9 -0
  83. package/dist/commonjs/components/ReduxTabView.js +56 -0
  84. package/dist/commonjs/components/ReduxTreeView.d.ts +2 -2
  85. package/dist/commonjs/components/ReduxTreeView.js +243 -203
  86. package/dist/commonjs/components/SegmentedTabs.d.ts +15 -0
  87. package/dist/commonjs/components/SegmentedTabs.js +52 -0
  88. package/dist/commonjs/components/SettingsView.d.ts +13 -0
  89. package/dist/commonjs/components/SettingsView.js +328 -0
  90. package/dist/commonjs/components/TouchableScale.d.ts +2 -2
  91. package/dist/commonjs/components/TouchableScale.js +2 -2
  92. package/dist/commonjs/components/TreeNode.js +2 -2
  93. package/dist/commonjs/constants/index.js +1 -12
  94. package/dist/commonjs/constants/version.d.ts +1 -1
  95. package/dist/commonjs/constants/version.js +1 -1
  96. package/dist/commonjs/customHooks/consoleLogger.js +137 -13
  97. package/dist/commonjs/customHooks/networkLogger.d.ts +0 -1
  98. package/dist/commonjs/customHooks/networkLogger.js +0 -1
  99. package/dist/commonjs/customHooks/reduxLogger.d.ts +2 -9
  100. package/dist/commonjs/enums/index.d.ts +39 -0
  101. package/dist/commonjs/enums/index.js +50 -0
  102. package/dist/commonjs/helpers/index.d.ts +27 -1
  103. package/dist/commonjs/helpers/index.js +187 -12
  104. package/dist/commonjs/helpers/settingsStore.d.ts +2 -24
  105. package/dist/commonjs/i18n/en.json +144 -0
  106. package/dist/commonjs/i18n/index.d.ts +2 -0
  107. package/dist/commonjs/i18n/index.js +27 -0
  108. package/dist/commonjs/i18n/locales/en.json +314 -0
  109. package/dist/commonjs/index.d.ts +1 -2
  110. package/dist/commonjs/index.js +196 -4800
  111. package/dist/commonjs/styles/AppColors.d.ts +148 -0
  112. package/dist/commonjs/styles/AppColors.js +176 -0
  113. package/dist/commonjs/styles/common.d.ts +3 -0
  114. package/dist/commonjs/styles/common.js +201 -0
  115. package/dist/commonjs/styles/index.d.ts +167 -442
  116. package/dist/commonjs/styles/index.js +239 -471
  117. package/dist/commonjs/types/enums.d.ts +9 -0
  118. package/dist/commonjs/types/enums.js +4 -0
  119. package/dist/commonjs/types/index.d.ts +4 -111
  120. package/dist/commonjs/types/index.js +16 -0
  121. package/dist/commonjs/types/interfaces.d.ts +337 -0
  122. package/dist/commonjs/types/interfaces.js +2 -0
  123. package/dist/esm/assets/svgAssets.d.ts +3 -0
  124. package/dist/esm/assets/svgAssets.js +14 -0
  125. package/dist/esm/components/AnalyticsEventCard.d.ts +1 -14
  126. package/dist/esm/components/AnalyticsEventCard.js +32 -49
  127. package/dist/esm/components/AnalyticsGraph.d.ts +2 -6
  128. package/dist/esm/components/AnalyticsGraph.js +8 -8
  129. package/dist/esm/components/AnalyticsTabView.d.ts +15 -0
  130. package/dist/esm/components/AnalyticsTabView.js +151 -0
  131. package/dist/esm/components/AnimatedEntrance.d.ts +1 -1
  132. package/dist/esm/components/AnimatedEntrance.js +2 -2
  133. package/dist/esm/components/ApiDetailView.d.ts +22 -0
  134. package/dist/esm/components/ApiDetailView.js +264 -0
  135. package/dist/esm/components/ApisTabView.d.ts +33 -0
  136. package/dist/esm/components/ApisTabView.js +196 -0
  137. package/dist/esm/components/CodeSnippet.d.ts +1 -5
  138. package/dist/esm/components/CodeSnippet.js +34 -34
  139. package/dist/esm/components/ConsoleLogCard.d.ts +1 -8
  140. package/dist/esm/components/ConsoleLogCard.js +262 -409
  141. package/dist/esm/components/ConsoleLogDetailView.d.ts +9 -0
  142. package/dist/esm/components/ConsoleLogDetailView.js +271 -0
  143. package/dist/esm/components/ConsoleLogsTabView.d.ts +24 -0
  144. package/dist/esm/components/ConsoleLogsTabView.js +348 -0
  145. package/dist/esm/components/CopyButton.d.ts +1 -1
  146. package/dist/esm/components/CopyButton.js +5 -5
  147. package/dist/esm/components/DiffViewer.js +4 -2
  148. package/dist/esm/components/DomainHeader.js +66 -41
  149. package/dist/esm/components/EmptyState.d.ts +2 -2
  150. package/dist/esm/components/EmptyState.js +2 -2
  151. package/dist/esm/components/EndOfListFooter.d.ts +8 -0
  152. package/dist/esm/components/EndOfListFooter.js +83 -0
  153. package/dist/esm/components/ErrorBoundary.d.ts +5 -14
  154. package/dist/esm/components/ErrorBoundary.js +29 -29
  155. package/dist/esm/components/FloatingBubble.d.ts +14 -0
  156. package/dist/esm/components/FloatingBubble.js +68 -0
  157. package/dist/esm/components/HeadersSection.js +5 -3
  158. package/dist/esm/components/HighlightText.d.ts +1 -1
  159. package/dist/esm/components/HighlightText.js +5 -7
  160. package/dist/esm/components/Inspector/AnalyticsTab.d.ts +3 -0
  161. package/dist/esm/components/Inspector/AnalyticsTab.js +193 -0
  162. package/dist/esm/components/Inspector/ConsoleTab.d.ts +3 -0
  163. package/dist/esm/components/Inspector/ConsoleTab.js +372 -0
  164. package/dist/esm/components/Inspector/FabLauncher.d.ts +3 -0
  165. package/dist/esm/components/Inspector/FabLauncher.js +49 -0
  166. package/dist/esm/components/Inspector/InsightsDashboard.d.ts +3 -0
  167. package/dist/esm/components/Inspector/InsightsDashboard.js +614 -0
  168. package/dist/esm/components/Inspector/InspectorContext.d.ts +5 -0
  169. package/dist/esm/components/Inspector/InspectorContext.js +13 -0
  170. package/dist/esm/components/Inspector/InspectorHeader.d.ts +3 -0
  171. package/dist/esm/components/Inspector/InspectorHeader.js +447 -0
  172. package/dist/esm/components/Inspector/LogDetail.d.ts +3 -0
  173. package/dist/esm/components/Inspector/LogDetail.js +925 -0
  174. package/dist/esm/components/Inspector/MainScreen.d.ts +3 -0
  175. package/dist/esm/components/Inspector/MainScreen.js +63 -0
  176. package/dist/esm/components/Inspector/NavigationTracker.d.ts +3 -0
  177. package/dist/esm/components/Inspector/NavigationTracker.js +10 -0
  178. package/dist/esm/components/Inspector/NetworkDetail.d.ts +3 -0
  179. package/dist/esm/components/Inspector/NetworkDetail.js +367 -0
  180. package/dist/esm/components/Inspector/NetworkTab.d.ts +3 -0
  181. package/dist/esm/components/Inspector/NetworkTab.js +244 -0
  182. package/dist/esm/components/Inspector/ReduxTab.d.ts +3 -0
  183. package/dist/esm/components/Inspector/ReduxTab.js +70 -0
  184. package/dist/esm/components/Inspector/SettingsPanel.d.ts +3 -0
  185. package/dist/esm/components/Inspector/SettingsPanel.js +1438 -0
  186. package/dist/esm/components/Inspector/TabBar.d.ts +3 -0
  187. package/dist/esm/components/Inspector/TabBar.js +90 -0
  188. package/dist/esm/components/Inspector/WebViewTab.d.ts +3 -0
  189. package/dist/esm/components/Inspector/WebViewTab.js +752 -0
  190. package/dist/esm/components/InspectorHeader.d.ts +19 -0
  191. package/dist/esm/components/InspectorHeader.js +323 -0
  192. package/dist/esm/components/InspectorTabBar.d.ts +16 -0
  193. package/dist/esm/components/InspectorTabBar.js +84 -0
  194. package/dist/esm/components/JsonViewer.d.ts +5 -2
  195. package/dist/esm/components/JsonViewer.js +112 -173
  196. package/dist/esm/components/LogCard.js +111 -88
  197. package/dist/esm/components/MetaAccordion.d.ts +1 -10
  198. package/dist/esm/components/MetaAccordion.js +23 -21
  199. package/dist/esm/components/NavigationTracker.d.ts +7 -0
  200. package/dist/esm/components/NavigationTracker.js +39 -0
  201. package/dist/esm/components/NetworkIcons.d.ts +6 -0
  202. package/dist/esm/components/NetworkIcons.js +46 -6
  203. package/dist/esm/components/ReduxTabView.d.ts +9 -0
  204. package/dist/esm/components/ReduxTabView.js +50 -0
  205. package/dist/esm/components/ReduxTreeView.d.ts +2 -2
  206. package/dist/esm/components/ReduxTreeView.js +245 -204
  207. package/dist/esm/components/SegmentedTabs.d.ts +15 -0
  208. package/dist/esm/components/SegmentedTabs.js +47 -0
  209. package/dist/esm/components/SettingsView.d.ts +13 -0
  210. package/dist/esm/components/SettingsView.js +321 -0
  211. package/dist/esm/components/TouchableScale.d.ts +2 -2
  212. package/dist/esm/components/TouchableScale.js +2 -2
  213. package/dist/esm/components/TreeNode.js +2 -2
  214. package/dist/esm/constants/index.js +1 -12
  215. package/dist/esm/constants/version.d.ts +1 -1
  216. package/dist/esm/constants/version.js +1 -1
  217. package/dist/esm/customHooks/consoleLogger.js +137 -13
  218. package/dist/esm/customHooks/networkLogger.d.ts +0 -1
  219. package/dist/esm/customHooks/networkLogger.js +0 -1
  220. package/dist/esm/customHooks/reduxLogger.d.ts +2 -9
  221. package/dist/esm/enums/index.d.ts +39 -0
  222. package/dist/esm/enums/index.js +47 -0
  223. package/dist/esm/helpers/index.d.ts +27 -1
  224. package/dist/esm/helpers/index.js +180 -11
  225. package/dist/esm/helpers/settingsStore.d.ts +2 -24
  226. package/dist/esm/i18n/en.json +144 -0
  227. package/dist/esm/i18n/index.d.ts +2 -0
  228. package/dist/esm/i18n/index.js +22 -0
  229. package/dist/esm/i18n/locales/en.json +314 -0
  230. package/dist/esm/index.d.ts +1 -2
  231. package/dist/esm/index.js +200 -4796
  232. package/dist/esm/styles/AppColors.d.ts +148 -0
  233. package/dist/esm/styles/AppColors.js +176 -0
  234. package/dist/esm/styles/common.d.ts +3 -0
  235. package/dist/esm/styles/common.js +197 -0
  236. package/dist/esm/styles/index.d.ts +167 -442
  237. package/dist/esm/styles/index.js +239 -471
  238. package/dist/esm/types/enums.d.ts +9 -0
  239. package/dist/esm/types/enums.js +3 -0
  240. package/dist/esm/types/index.d.ts +4 -111
  241. package/dist/esm/types/index.js +2 -1
  242. package/dist/esm/types/interfaces.d.ts +337 -0
  243. package/dist/esm/types/interfaces.js +1 -0
  244. package/example/App.tsx +145 -2
  245. package/example/README.md +33 -77
  246. package/package.json +3 -1
@@ -0,0 +1,13 @@
1
+ import React from 'react';
2
+ import { ActiveTab } from '../types';
3
+ interface SettingsViewProps {
4
+ headerTopPadding: number;
5
+ activeTab?: ActiveTab;
6
+ defaultTab: ActiveTab;
7
+ tabVisibility: Record<string, boolean>;
8
+ onCloseSettings: () => void;
9
+ onUpdateTabVisibility: (key: ActiveTab, val: boolean) => void;
10
+ onSetDefaultTab: (key: ActiveTab) => void;
11
+ }
12
+ export declare const SettingsView: React.FC<SettingsViewProps>;
13
+ export default SettingsView;
@@ -0,0 +1,328 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.SettingsView = void 0;
7
+ const react_1 = __importDefault(require("react"));
8
+ const react_native_1 = require("react-native");
9
+ const react_native_linear_gradient_1 = __importDefault(require("react-native-linear-gradient"));
10
+ const react_i18next_1 = require("react-i18next");
11
+ const TouchableScale_1 = __importDefault(require("./TouchableScale"));
12
+ const NetworkIcons_1 = require("./NetworkIcons");
13
+ const AppColors_1 = require("../styles/AppColors");
14
+ const AppFonts_1 = require("../styles/AppFonts");
15
+ const styles_1 = require("../styles");
16
+ const settingsStore_1 = require("../helpers/settingsStore");
17
+ const SettingsView = ({ headerTopPadding, defaultTab, tabVisibility, onCloseSettings, onUpdateTabVisibility, onSetDefaultTab, }) => {
18
+ const { t } = (0, react_i18next_1.useTranslation)();
19
+ const [themeMode, setThemeMode] = react_1.default.useState(AppColors_1.AppColors.primaryLight === AppColors_1.AppColors.white ? 'light' : 'dark');
20
+ const handleToggleTheme = () => {
21
+ const nextIsDark = themeMode !== 'dark';
22
+ (0, styles_1.toggleGlobalTheme)(nextIsDark);
23
+ const newTheme = nextIsDark ? 'dark' : 'light';
24
+ setThemeMode(newTheme);
25
+ (0, settingsStore_1.saveSettings)({ isDark: nextIsDark, theme: newTheme });
26
+ };
27
+ const renderSettingRow = (opts) => {
28
+ return (<react_native_1.Pressable onPress={opts.onPress} disabled={!opts.onPress} style={{
29
+ flexDirection: 'row',
30
+ alignItems: 'center',
31
+ justifyContent: 'space-between',
32
+ paddingVertical: 12,
33
+ paddingHorizontal: 16,
34
+ borderBottomWidth: 1,
35
+ borderBottomColor: AppColors_1.AppColors.dividerColor,
36
+ }}>
37
+ <react_native_1.View style={{
38
+ flexDirection: 'row',
39
+ alignItems: 'center',
40
+ gap: 12,
41
+ flex: 1,
42
+ marginRight: 8,
43
+ }}>
44
+ <react_native_1.View style={{
45
+ width: 32,
46
+ height: 32,
47
+ borderRadius: 8,
48
+ backgroundColor: AppColors_1.AppColors.grayBackground,
49
+ alignItems: 'center',
50
+ justifyContent: 'center',
51
+ }}>
52
+ {opts.icon}
53
+ </react_native_1.View>
54
+ <react_native_1.View style={{ flex: 1 }}>
55
+ <react_native_1.Text style={{
56
+ fontFamily: AppFonts_1.AppFonts.interBold,
57
+ fontSize: 13,
58
+ color: AppColors_1.AppColors.primaryBlack,
59
+ }}>
60
+ {opts.title}
61
+ </react_native_1.Text>
62
+ {opts.description ? (<react_native_1.Text style={{
63
+ fontFamily: AppFonts_1.AppFonts.interRegular,
64
+ fontSize: 11,
65
+ color: AppColors_1.AppColors.grayTextWeak,
66
+ marginTop: 2,
67
+ }}>
68
+ {opts.description}
69
+ </react_native_1.Text>) : null}
70
+ </react_native_1.View>
71
+ </react_native_1.View>
72
+ {opts.rightComponent}
73
+ </react_native_1.Pressable>);
74
+ };
75
+ return (<react_native_1.View style={{ flex: 1, backgroundColor: AppColors_1.AppColors.grayBackground }}>
76
+ <react_native_linear_gradient_1.default colors={[AppColors_1.AppColors.purple, '#6B4EFF']} style={{ paddingTop: headerTopPadding, paddingBottom: 16 }}>
77
+ <react_native_1.View style={{
78
+ flexDirection: 'row',
79
+ alignItems: 'center',
80
+ paddingHorizontal: 16,
81
+ gap: 12,
82
+ }}>
83
+ <TouchableScale_1.default onPress={onCloseSettings} hitSlop={15} style={{
84
+ width: 36,
85
+ height: 36,
86
+ borderRadius: 18,
87
+ alignItems: 'center',
88
+ justifyContent: 'center',
89
+ backgroundColor: 'rgba(255,255,255,0.18)',
90
+ }}>
91
+ <NetworkIcons_1.WhiteBackNavigation />
92
+ </TouchableScale_1.default>
93
+ <react_native_1.Text style={{
94
+ fontFamily: AppFonts_1.AppFonts.interBold,
95
+ fontSize: 18,
96
+ color: AppColors_1.AppColors.white,
97
+ }}>
98
+ {t('settings.title')}
99
+ </react_native_1.Text>
100
+ </react_native_1.View>
101
+ </react_native_linear_gradient_1.default>
102
+
103
+ <react_native_1.ScrollView style={{ flex: 1 }} contentContainerStyle={{ paddingBottom: 32, gap: 16, paddingTop: 16 }}>
104
+ {/* Theme Settings */}
105
+ <react_native_1.View style={{
106
+ backgroundColor: AppColors_1.AppColors.primaryLight,
107
+ marginHorizontal: 16,
108
+ borderRadius: 12,
109
+ borderWidth: 1,
110
+ borderColor: AppColors_1.AppColors.grayBorderSecondary,
111
+ overflow: 'hidden',
112
+ }}>
113
+ <react_native_1.View style={{
114
+ paddingHorizontal: 16,
115
+ paddingVertical: 10,
116
+ backgroundColor: AppColors_1.AppColors.grayBackground,
117
+ borderBottomWidth: 1,
118
+ borderBottomColor: AppColors_1.AppColors.dividerColor,
119
+ }}>
120
+ <react_native_1.Text style={{
121
+ fontFamily: AppFonts_1.AppFonts.interBold,
122
+ fontSize: 11,
123
+ color: AppColors_1.AppColors.grayTextWeak,
124
+ letterSpacing: 0.5,
125
+ }}>
126
+ {t('settings.appearance')}
127
+ </react_native_1.Text>
128
+ </react_native_1.View>
129
+ {renderSettingRow({
130
+ icon: themeMode === 'dark' ? (<NetworkIcons_1.MoonIcon color={AppColors_1.AppColors.purple} size={16}/>) : (<NetworkIcons_1.SunIcon color={AppColors_1.AppColors.lightOrange} size={16}/>),
131
+ title: t('settings.dark_mode'),
132
+ description: t('settings.dark_mode_desc'),
133
+ rightComponent: (<react_native_1.Switch value={themeMode === 'dark'} onValueChange={handleToggleTheme} trackColor={{
134
+ false: AppColors_1.AppColors.grayBorderSecondary,
135
+ true: AppColors_1.AppColors.purple,
136
+ }}/>),
137
+ })}
138
+ </react_native_1.View>
139
+
140
+ {/* Module Visibility Settings */}
141
+ <react_native_1.View style={{
142
+ backgroundColor: AppColors_1.AppColors.primaryLight,
143
+ marginHorizontal: 16,
144
+ borderRadius: 12,
145
+ borderWidth: 1,
146
+ borderColor: AppColors_1.AppColors.grayBorderSecondary,
147
+ overflow: 'hidden',
148
+ }}>
149
+ <react_native_1.View style={{
150
+ paddingHorizontal: 16,
151
+ paddingVertical: 10,
152
+ backgroundColor: AppColors_1.AppColors.grayBackground,
153
+ borderBottomWidth: 1,
154
+ borderBottomColor: AppColors_1.AppColors.dividerColor,
155
+ }}>
156
+ <react_native_1.Text style={{
157
+ fontFamily: AppFonts_1.AppFonts.interBold,
158
+ fontSize: 11,
159
+ color: AppColors_1.AppColors.grayTextWeak,
160
+ letterSpacing: 0.5,
161
+ }}>
162
+ {t('settings.module_visibility')}
163
+ </react_native_1.Text>
164
+ </react_native_1.View>
165
+
166
+ {renderSettingRow({
167
+ icon: <NetworkIcons_1.SignalIcon color={AppColors_1.AppColors.purple} size={16}/>,
168
+ title: t('settings.apis_tab'),
169
+ description: t('settings.apis_tab_desc'),
170
+ rightComponent: (<react_native_1.Switch value={tabVisibility.apis !== false} onValueChange={val => onUpdateTabVisibility('apis', val)} trackColor={{
171
+ false: AppColors_1.AppColors.grayBorderSecondary,
172
+ true: AppColors_1.AppColors.purple,
173
+ }}/>),
174
+ })}
175
+
176
+ {renderSettingRow({
177
+ icon: <NetworkIcons_1.TerminalIcon color={AppColors_1.AppColors.purple} size={16}/>,
178
+ title: t('settings.logs_tab'),
179
+ description: t('settings.logs_tab_desc'),
180
+ rightComponent: (<react_native_1.Switch value={tabVisibility.logs !== false} onValueChange={val => onUpdateTabVisibility('logs', val)} trackColor={{
181
+ false: AppColors_1.AppColors.grayBorderSecondary,
182
+ true: AppColors_1.AppColors.purple,
183
+ }}/>),
184
+ })}
185
+
186
+ {renderSettingRow({
187
+ icon: <NetworkIcons_1.AnalyticsIcon color={AppColors_1.AppColors.purple} size={16}/>,
188
+ title: t('settings.analytics_tab'),
189
+ description: t('settings.analytics_tab_desc'),
190
+ rightComponent: (<react_native_1.Switch value={tabVisibility.analytics !== false} onValueChange={val => onUpdateTabVisibility('analytics', val)} trackColor={{
191
+ false: AppColors_1.AppColors.grayBorderSecondary,
192
+ true: AppColors_1.AppColors.purple,
193
+ }}/>),
194
+ })}
195
+
196
+ {renderSettingRow({
197
+ icon: <NetworkIcons_1.TerminalIcon color={AppColors_1.AppColors.purple} size={16}/>,
198
+ title: t('settings.redux_tab'),
199
+ description: t('settings.redux_tab_desc'),
200
+ rightComponent: (<react_native_1.Switch value={tabVisibility.redux !== false} onValueChange={val => onUpdateTabVisibility('redux', val)} trackColor={{
201
+ false: AppColors_1.AppColors.grayBorderSecondary,
202
+ true: AppColors_1.AppColors.purple,
203
+ }}/>),
204
+ })}
205
+ </react_native_1.View>
206
+
207
+ {/* Landing Tab Preference */}
208
+ <react_native_1.View style={{
209
+ backgroundColor: AppColors_1.AppColors.primaryLight,
210
+ marginHorizontal: 16,
211
+ borderRadius: 12,
212
+ borderWidth: 1,
213
+ borderColor: AppColors_1.AppColors.grayBorderSecondary,
214
+ overflow: 'hidden',
215
+ }}>
216
+ <react_native_1.View style={{
217
+ paddingHorizontal: 16,
218
+ paddingVertical: 10,
219
+ backgroundColor: AppColors_1.AppColors.grayBackground,
220
+ borderBottomWidth: 1,
221
+ borderBottomColor: AppColors_1.AppColors.dividerColor,
222
+ }}>
223
+ <react_native_1.Text style={{
224
+ fontFamily: AppFonts_1.AppFonts.interBold,
225
+ fontSize: 11,
226
+ color: AppColors_1.AppColors.grayTextWeak,
227
+ letterSpacing: 0.5,
228
+ }}>
229
+ {t('settings.default_landing_tab')}
230
+ </react_native_1.Text>
231
+ </react_native_1.View>
232
+ {['apis', 'logs', 'analytics', 'redux'].map(tabKey => {
233
+ if (!tabVisibility[tabKey])
234
+ return null;
235
+ const isSelected = defaultTab === tabKey;
236
+ return (<TouchableScale_1.default key={tabKey} onPress={() => onSetDefaultTab(tabKey)} style={{
237
+ flexDirection: 'row',
238
+ alignItems: 'center',
239
+ justifyContent: 'space-between',
240
+ paddingVertical: 12,
241
+ paddingHorizontal: 16,
242
+ borderBottomWidth: 1,
243
+ borderBottomColor: AppColors_1.AppColors.dividerColor,
244
+ backgroundColor: isSelected
245
+ ? 'rgba(107, 78, 255, 0.05)'
246
+ : AppColors_1.AppColors.primaryLight,
247
+ }}>
248
+ <react_native_1.Text style={{
249
+ fontFamily: isSelected
250
+ ? AppFonts_1.AppFonts.interBold
251
+ : AppFonts_1.AppFonts.interMedium,
252
+ fontSize: 13,
253
+ color: isSelected
254
+ ? AppColors_1.AppColors.purple
255
+ : AppColors_1.AppColors.primaryBlack,
256
+ }}>
257
+ {tabKey.toUpperCase()} Tab
258
+ </react_native_1.Text>
259
+ <react_native_1.View style={{
260
+ width: 18,
261
+ height: 18,
262
+ borderRadius: 9,
263
+ borderWidth: isSelected ? 5 : 2,
264
+ borderColor: isSelected
265
+ ? AppColors_1.AppColors.purple
266
+ : AppColors_1.AppColors.grayBorderSecondary,
267
+ }}/>
268
+ </TouchableScale_1.default>);
269
+ })}
270
+ </react_native_1.View>
271
+
272
+ {/* Storage & Persistence Settings */}
273
+ <react_native_1.View style={{
274
+ backgroundColor: AppColors_1.AppColors.primaryLight,
275
+ marginHorizontal: 16,
276
+ borderRadius: 12,
277
+ borderWidth: 1,
278
+ borderColor: AppColors_1.AppColors.grayBorderSecondary,
279
+ overflow: 'hidden',
280
+ }}>
281
+ <react_native_1.View style={{
282
+ paddingHorizontal: 16,
283
+ paddingVertical: 10,
284
+ backgroundColor: AppColors_1.AppColors.grayBackground,
285
+ borderBottomWidth: 1,
286
+ borderBottomColor: AppColors_1.AppColors.dividerColor,
287
+ }}>
288
+ <react_native_1.Text style={{
289
+ fontFamily: AppFonts_1.AppFonts.interBold,
290
+ fontSize: 11,
291
+ color: AppColors_1.AppColors.grayTextWeak,
292
+ letterSpacing: 0.5,
293
+ }}>
294
+ {t('settings.storage_persistence')}
295
+ </react_native_1.Text>
296
+ </react_native_1.View>
297
+ {renderSettingRow({
298
+ icon: <NetworkIcons_1.GlobeIcon color={AppColors_1.AppColors.purple} size={16}/>,
299
+ title: t('settings.custom_storage'),
300
+ description: (0, settingsStore_1.isPersistentStorageAvailable)()
301
+ ? t('settings.custom_storage_active')
302
+ : t('settings.custom_storage_memory'),
303
+ })}
304
+
305
+ {renderSettingRow({
306
+ icon: <NetworkIcons_1.TrashIcon color={AppColors_1.AppColors.errorColor} size={16}/>,
307
+ title: t('settings.reset_settings'),
308
+ description: t('settings.reset_settings_desc'),
309
+ onPress: () => {
310
+ react_native_1.Alert.alert(t('settings.reset_confirm_title'), t('settings.reset_confirm_msg'), [
311
+ { text: t('header.cancel'), style: 'cancel' },
312
+ {
313
+ text: t('settings.reset'),
314
+ style: 'destructive',
315
+ onPress: () => {
316
+ (0, settingsStore_1.clearPersistedSettings)();
317
+ react_native_1.Alert.alert(t('settings.reset'), t('settings.reset_done'));
318
+ },
319
+ },
320
+ ]);
321
+ },
322
+ })}
323
+ </react_native_1.View>
324
+ </react_native_1.ScrollView>
325
+ </react_native_1.View>);
326
+ };
327
+ exports.SettingsView = SettingsView;
328
+ exports.default = exports.SettingsView;
@@ -1,9 +1,9 @@
1
1
  import React from 'react';
2
- declare const TouchableScale: ({ onPress, style, children, hitSlop, disabled, }: {
2
+ declare const TouchableScale: React.NamedExoticComponent<{
3
3
  onPress?: () => void;
4
4
  style?: any;
5
5
  children?: React.ReactNode;
6
6
  hitSlop?: any;
7
7
  disabled?: boolean;
8
- }) => React.JSX.Element;
8
+ }>;
9
9
  export default TouchableScale;
@@ -35,7 +35,7 @@ var __importStar = (this && this.__importStar) || (function () {
35
35
  Object.defineProperty(exports, "__esModule", { value: true });
36
36
  const react_1 = __importStar(require("react"));
37
37
  const react_native_1 = require("react-native");
38
- const TouchableScale = ({ onPress, style, children, hitSlop, disabled, }) => {
38
+ const TouchableScale = react_1.default.memo(function TouchableScale({ onPress, style, children, hitSlop, disabled, }) {
39
39
  if (react_native_1.Platform.OS === 'android') {
40
40
  return (<react_native_1.Pressable disabled={disabled} onPress={onPress} hitSlop={hitSlop} style={({ pressed }) => [
41
41
  style,
@@ -78,5 +78,5 @@ const TouchableScale = ({ onPress, style, children, hitSlop, disabled, }) => {
78
78
  {children}
79
79
  </react_native_1.Animated.View>
80
80
  </react_native_1.Pressable>);
81
- };
81
+ });
82
82
  exports.default = TouchableScale;
@@ -46,8 +46,8 @@ const NetworkIcons_1 = require("./NetworkIcons");
46
46
  const AppColors_1 = require("../styles/AppColors");
47
47
  const styles_1 = __importDefault(require("../styles"));
48
48
  const TreeNode = react_1.default.memo(function TreeNode({ data, name, level = 0, search, forceOpen, defaultExpandDepth, }) {
49
- const [localOpen, setLocalOpen] = (0, react_1.useState)(level < (defaultExpandDepth ?? 1));
50
- const open = forceOpen !== undefined ? forceOpen : localOpen;
49
+ const [localOpen, setLocalOpen] = (0, react_1.useState)(forceOpen || level < (defaultExpandDepth ?? 1));
50
+ const open = localOpen;
51
51
  const isObject = typeof data === 'object' && data !== null;
52
52
  const isArray = Array.isArray(data);
53
53
  function renderHighlighted(text) {
@@ -19,18 +19,7 @@ exports.METHOD_COLORS = {
19
19
  PATCH: AppColors_1.AppColors.offerPurple,
20
20
  DELETE: AppColors_1.AppColors.errorColor,
21
21
  };
22
- exports.DOMAIN_COLORS = [
23
- '#1a5276',
24
- '#8e44ad',
25
- '#1e8449',
26
- '#c0392b',
27
- '#d35400',
28
- '#d68910',
29
- '#16a085',
30
- '#27ae60',
31
- '#2c3e50',
32
- '#c2185b',
33
- ];
22
+ exports.DOMAIN_COLORS = AppColors_1.AppColors.domainColors;
34
23
  exports.DURATION_FAST_MS = 200;
35
24
  exports.DURATION_SLOW_MS = 800;
36
25
  // Package version — auto-generated from package.json at build time.
@@ -1 +1 @@
1
- export declare const LIB_VERSION = "1.1.14";
1
+ export declare const LIB_VERSION = "1.1.16";
@@ -3,4 +3,4 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.LIB_VERSION = void 0;
4
4
  // AUTO-GENERATED FILE — do not edit by hand.
5
5
  // Regenerated from package.json on every build by scripts/gen-version.js.
6
- exports.LIB_VERSION = '1.1.14';
6
+ exports.LIB_VERSION = '1.1.16';
@@ -27,26 +27,102 @@ const formatArgs = (args) => {
27
27
  })
28
28
  .join(' ');
29
29
  };
30
- const getCallerFromStack = () => {
30
+ // ─── Symbolication Helper for React Native Metro ────────────────────────────
31
+ const symbolicateStack = async (stackString) => {
32
+ if (typeof __DEV__ === 'undefined' || !__DEV__)
33
+ return null;
31
34
  try {
32
- const stack = new Error().stack;
33
- if (!stack)
34
- return 'Unknown';
35
- const lines = stack.split('\n');
35
+ // 1. Try React Native's built-in symbolicateStackTrace if available
36
+ let symModule = null;
37
+ try {
38
+ // @ts-ignore
39
+ symModule = require('react-native/Libraries/Core/Devtools/symbolicateStackTrace');
40
+ }
41
+ catch { }
42
+ const symFn = symModule?.default || symModule;
43
+ if (typeof symFn === 'function') {
44
+ const res = await symFn(stackString);
45
+ if (res && Array.isArray(res.stack)) {
46
+ return res.stack;
47
+ }
48
+ }
49
+ }
50
+ catch { }
51
+ try {
52
+ // 2. Direct HTTP symbolication to Metro packager endpoint
53
+ const metroUrl = 'http://localhost:8081/symbolicate';
54
+ const response = await fetch(metroUrl, {
55
+ method: 'POST',
56
+ headers: { 'Content-Type': 'application/json' },
57
+ body: JSON.stringify({ stack: stackString }),
58
+ });
59
+ if (response.ok) {
60
+ const json = await response.json();
61
+ if (json && Array.isArray(json.stack)) {
62
+ return json.stack;
63
+ }
64
+ }
65
+ }
66
+ catch { }
67
+ return null;
68
+ };
69
+ const getStackDetails = (args) => {
70
+ try {
71
+ let errorStack;
72
+ if (args && args.length > 0) {
73
+ for (const arg of args) {
74
+ if (arg instanceof Error && arg.stack) {
75
+ errorStack = arg.stack;
76
+ break;
77
+ }
78
+ else if (arg &&
79
+ typeof arg === 'object' &&
80
+ typeof arg.stack === 'string') {
81
+ errorStack = arg.stack;
82
+ break;
83
+ }
84
+ }
85
+ }
86
+ const rawStack = new Error().stack;
87
+ const stackToUse = errorStack || rawStack;
88
+ if (!stackToUse)
89
+ return { caller: 'Unknown', errorStack };
90
+ const lines = stackToUse.split('\n');
91
+ let userCaller;
92
+ let fallbackCaller;
36
93
  for (let i = 0; i < lines.length; i++) {
37
94
  const line = lines[i];
38
- // Skip internal console logger stack frames and native helpers
39
- if (line.includes('consoleLogger') ||
95
+ if (!line ||
96
+ line.includes('consoleLogger') ||
40
97
  line.includes('setupConsoleLogger') ||
41
- line.includes('node_modules') ||
42
- line.includes('Error')) {
98
+ line.includes('react-native-inapp-inspector') ||
99
+ line.trim() === 'Error') {
43
100
  continue;
44
101
  }
45
- return line.trim().replace(/^at /, '');
102
+ const isInternal = line.includes('react-native/Libraries') ||
103
+ line.includes('setUpConsole') ||
104
+ line.includes('ExceptionsManager') ||
105
+ line.includes('MessageQueue') ||
106
+ line.includes('metro-runtime') ||
107
+ line.includes('regenerator-runtime');
108
+ if (!fallbackCaller && !line.includes('setUpConsole')) {
109
+ fallbackCaller = line.trim().replace(/^at /, '');
110
+ }
111
+ if (!isInternal) {
112
+ userCaller = line.trim().replace(/^at /, '');
113
+ break;
114
+ }
46
115
  }
116
+ const cleanedStack = lines
117
+ .filter(l => !l.includes('consoleLogger') &&
118
+ !l.includes('setupConsoleLogger'))
119
+ .join('\n');
120
+ const caller = userCaller || fallbackCaller || 'Unknown';
121
+ return { caller, stack: cleanedStack || stackToUse, errorStack, stackToUse };
122
+ }
123
+ catch (e) {
124
+ return { caller: 'Unknown' };
47
125
  }
48
- catch (e) { }
49
- return 'Unknown';
50
126
  };
51
127
  const notify = () => {
52
128
  const snapshot = [...logs];
@@ -71,18 +147,66 @@ const addLog = (type, args, sourceMethod) => {
71
147
  message.toLowerCase().trim().includes(prefix.toLowerCase().trim()))) {
72
148
  return;
73
149
  }
74
- const caller = getCallerFromStack();
150
+ const { caller, stack, errorStack, stackToUse } = getStackDetails(args);
75
151
  const newLog = {
76
152
  id: counter++,
77
153
  type,
78
154
  message,
79
155
  timestamp: Date.now(),
80
156
  caller,
157
+ stack,
158
+ errorStack,
159
+ rawArgs: args,
81
160
  sourceMethod,
82
161
  };
83
162
  logs.unshift(newLog);
84
163
  logs = logs.slice(0, MAX_LOGS);
85
164
  notify();
165
+ // Asynchronously symbolicate stack trace using Metro in DEV mode
166
+ if (stackToUse && typeof __DEV__ !== 'undefined' && __DEV__) {
167
+ const currentLogId = newLog.id;
168
+ symbolicateStack(stackToUse)
169
+ .then(symFrames => {
170
+ if (symFrames && Array.isArray(symFrames) && symFrames.length > 0) {
171
+ const symLines = [];
172
+ let symUserCaller;
173
+ for (const frame of symFrames) {
174
+ const file = (frame.file || '').replace(/^webpack:\/\/\/?/, '');
175
+ const method = frame.methodName || '<anonymous>';
176
+ const line = frame.lineNumber != null ? `:${frame.lineNumber}` : '';
177
+ const col = frame.column != null ? `:${frame.column}` : '';
178
+ const lineStr = `at ${method} (${file}${line}${col})`;
179
+ symLines.push(lineStr);
180
+ const isUserFile = file &&
181
+ !file.includes('node_modules') &&
182
+ !file.includes('react-native/') &&
183
+ !file.includes('consoleLogger') &&
184
+ !file.includes('setupConsoleLogger') &&
185
+ (file.endsWith('.tsx') ||
186
+ file.endsWith('.jsx') ||
187
+ file.endsWith('.ts') ||
188
+ file.endsWith('.js'));
189
+ if (!symUserCaller && isUserFile) {
190
+ symUserCaller = `${method} (${file}${line}${col})`;
191
+ }
192
+ }
193
+ const targetLog = logs.find(l => l.id === currentLogId);
194
+ if (targetLog) {
195
+ if (symUserCaller) {
196
+ targetLog.caller = symUserCaller;
197
+ }
198
+ else if (symLines.length > 0) {
199
+ targetLog.caller = symLines[0].replace(/^at /, '');
200
+ }
201
+ if (symLines.length > 0) {
202
+ targetLog.stack = symLines.join('\n');
203
+ }
204
+ notify();
205
+ }
206
+ }
207
+ })
208
+ .catch(() => { });
209
+ }
86
210
  }
87
211
  catch (e) {
88
212
  // Fail-safe to prevent crash during logging
@@ -1,4 +1,3 @@
1
- import "./webViewLogger";
2
1
  type NetworkLog = {
3
2
  id: number;
4
3
  url: string;
@@ -4,7 +4,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.addAxiosInterceptors = exports.setupNetworkLogger = exports.getNetworkLogs = exports.clearNetworkLogs = exports.subscribeNetworkLogs = void 0;
7
- require("./webViewLogger");
8
7
  const axios_1 = __importDefault(require("axios"));
9
8
  let logs = [];
10
9
  let listeners = [];
@@ -1,12 +1,5 @@
1
- export interface ReduxHistoryEntry {
2
- id: number;
3
- type: string;
4
- payload: any;
5
- timestamp: string;
6
- affectedSlices: string[];
7
- prevState?: any;
8
- nextState?: any;
9
- }
1
+ import { ReduxHistoryEntry } from '../types';
2
+ export { ReduxHistoryEntry };
10
3
  export declare const getReduxState: () => any;
11
4
  export declare const setReduxAutoRefresh: (val: boolean) => void;
12
5
  export declare const getReduxAutoRefresh: () => boolean;
@@ -0,0 +1,39 @@
1
+ export declare enum InspectorTab {
2
+ APIs = "apis",
3
+ Logs = "logs",
4
+ Analytics = "analytics",
5
+ Redux = "redux"
6
+ }
7
+ export declare enum ApiDetailTab {
8
+ Response = "response",
9
+ Request = "request",
10
+ Headers = "headers",
11
+ Metadata = "metadata"
12
+ }
13
+ export declare enum JsonViewerMode {
14
+ Pretty = "pretty",
15
+ Raw = "raw",
16
+ Table = "table"
17
+ }
18
+ export declare enum ReduxSubTab {
19
+ State = "state",
20
+ Timeline = "timeline"
21
+ }
22
+ export declare enum ReduxActionSubTab {
23
+ Payload = "payload",
24
+ Diff = "diff",
25
+ State = "state"
26
+ }
27
+ export declare enum ConsoleLogLevel {
28
+ Info = "info",
29
+ Warn = "warn",
30
+ Error = "error"
31
+ }
32
+ export declare enum SortOrderEnum {
33
+ Newest = "newest",
34
+ Oldest = "oldest"
35
+ }
36
+ export declare enum AnalyticsSource {
37
+ Firebase = "firebase",
38
+ Manual = "manual"
39
+ }