react-native-inapp-inspector 1.1.20 → 1.1.22

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 (66) hide show
  1. package/README.md +34 -10
  2. package/dist/commonjs/components/AnalyticsDetail.js +5 -3
  3. package/dist/commonjs/components/AnalyticsEventCard.d.ts +0 -1
  4. package/dist/commonjs/components/AnalyticsEventCard.js +85 -96
  5. package/dist/commonjs/components/ConsoleLogCard.js +2 -2
  6. package/dist/commonjs/components/DiffViewer.js +2 -2
  7. package/dist/commonjs/components/HeadersSection.js +2 -2
  8. package/dist/commonjs/components/Inspector/BundleTab.js +488 -653
  9. package/dist/commonjs/components/Inspector/ConsoleTab.js +2 -2
  10. package/dist/commonjs/components/Inspector/LogDetail.js +2 -2
  11. package/dist/commonjs/components/Inspector/NetworkDetail.js +2 -2
  12. package/dist/commonjs/components/Inspector/PerformanceTab.js +185 -244
  13. package/dist/commonjs/components/Inspector/ReduxDetail.js +4 -4
  14. package/dist/commonjs/components/Inspector/ReduxTab.js +3 -3
  15. package/dist/commonjs/components/JsonViewer.js +2 -2
  16. package/dist/commonjs/components/LogCard.js +2 -2
  17. package/dist/commonjs/components/MetaAccordion.js +2 -2
  18. package/dist/commonjs/constants/version.d.ts +1 -1
  19. package/dist/commonjs/constants/version.js +1 -1
  20. package/dist/commonjs/customHooks/bundleAnalyzer.d.ts +115 -0
  21. package/dist/commonjs/customHooks/bundleAnalyzer.js +561 -0
  22. package/dist/commonjs/customHooks/performanceTracker.d.ts +84 -0
  23. package/dist/commonjs/customHooks/performanceTracker.js +541 -0
  24. package/dist/commonjs/helpers/index.d.ts +15 -0
  25. package/dist/commonjs/helpers/index.js +112 -1
  26. package/dist/commonjs/i18n/index.d.ts +27 -1
  27. package/dist/commonjs/i18n/index.js +66 -21
  28. package/dist/commonjs/i18n/locales/en.json +225 -2
  29. package/dist/commonjs/index.d.ts +2 -1
  30. package/dist/commonjs/index.js +8 -4
  31. package/dist/commonjs/styles/AppColors.d.ts +110 -0
  32. package/dist/commonjs/styles/AppColors.js +114 -0
  33. package/dist/commonjs/types/interfaces.d.ts +1 -0
  34. package/dist/esm/components/AnalyticsDetail.js +5 -3
  35. package/dist/esm/components/AnalyticsEventCard.d.ts +0 -1
  36. package/dist/esm/components/AnalyticsEventCard.js +85 -95
  37. package/dist/esm/components/ConsoleLogCard.js +1 -1
  38. package/dist/esm/components/DiffViewer.js +1 -1
  39. package/dist/esm/components/HeadersSection.js +1 -1
  40. package/dist/esm/components/Inspector/BundleTab.js +489 -654
  41. package/dist/esm/components/Inspector/ConsoleTab.js +1 -1
  42. package/dist/esm/components/Inspector/LogDetail.js +1 -1
  43. package/dist/esm/components/Inspector/NetworkDetail.js +1 -1
  44. package/dist/esm/components/Inspector/PerformanceTab.js +185 -244
  45. package/dist/esm/components/Inspector/ReduxDetail.js +3 -3
  46. package/dist/esm/components/Inspector/ReduxTab.js +3 -3
  47. package/dist/esm/components/JsonViewer.js +1 -1
  48. package/dist/esm/components/LogCard.js +1 -1
  49. package/dist/esm/components/MetaAccordion.js +1 -1
  50. package/dist/esm/constants/version.d.ts +1 -1
  51. package/dist/esm/constants/version.js +1 -1
  52. package/dist/esm/customHooks/bundleAnalyzer.d.ts +115 -0
  53. package/dist/esm/customHooks/bundleAnalyzer.js +554 -0
  54. package/dist/esm/customHooks/performanceTracker.d.ts +84 -0
  55. package/dist/esm/customHooks/performanceTracker.js +537 -0
  56. package/dist/esm/helpers/index.d.ts +15 -0
  57. package/dist/esm/helpers/index.js +107 -0
  58. package/dist/esm/i18n/index.d.ts +27 -1
  59. package/dist/esm/i18n/index.js +61 -20
  60. package/dist/esm/i18n/locales/en.json +225 -2
  61. package/dist/esm/index.d.ts +2 -1
  62. package/dist/esm/index.js +6 -2
  63. package/dist/esm/styles/AppColors.d.ts +110 -0
  64. package/dist/esm/styles/AppColors.js +114 -0
  65. package/dist/esm/types/interfaces.d.ts +1 -0
  66. package/package.json +35 -13
package/README.md CHANGED
@@ -10,11 +10,16 @@
10
10
 
11
11
  <p align="center">
12
12
  <a href="https://www.npmjs.com/package/react-native-inapp-inspector"><img src="https://img.shields.io/npm/v/react-native-inapp-inspector?color=6366f1&label=npm" alt="npm version" /></a>
13
+ <a href="https://www.npmjs.com/package/react-native-inapp-inspector"><img src="https://img.shields.io/npm/dm/react-native-inapp-inspector?color=3b82f6&label=downloads" alt="npm downloads" /></a>
14
+ <a href="https://bundlephobia.com/package/react-native-inapp-inspector"><img src="https://img.shields.io/bundlephobia/minzip/react-native-inapp-inspector?color=10b981&label=minzipped" alt="bundle size" /></a>
13
15
  <a href="https://github.com/vengatmacuser/react-native-inapp-inspector/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-MIT-green" alt="license" /></a>
14
- <a href="https://github.com/vengatmacuser/react-native-inapp-inspector"><img src="https://img.shields.io/badge/platform-iOS%20%7C%20Android-blue" alt="platform" /></a>
16
+ <a href="https://github.com/vengatmacuser/react-native-inapp-inspector"><img src="https://img.shields.io/badge/platform-iOS%20%7C%20Android%20%7C%20Expo-blue" alt="platform" /></a>
17
+ <a href="https://github.com/vengatmacuser/react-native-inapp-inspector"><img src="https://img.shields.io/badge/TypeScript-Ready-3178c6" alt="TypeScript" /></a>
15
18
  </p>
16
19
 
17
- A self-contained, developer-first in-app debugging overlay for React Native. Inspect network traffic, console logs, stack traces, analytics events, and Redux state directly on your device or simulator with zero external dependencies.
20
+ The **zero-config, all-in-one in-app debugging overlay for React Native & Expo**. Inspect network traffic (fetch/Axios), console logs with Metro symbolicated stack traces, Redux state diffs, Firebase Analytics events, and JavaScript bundle size directly on your device or simulator with zero native setup.
21
+
22
+ > 🚀 **The modern, lightweight alternative to Flipper and Chucker** — works standalone on device, in test builds, and across standalone APKs/IPAs without desktop companion apps, cables, or open debugger ports.
18
23
 
19
24
  <p align="center">
20
25
  <img src="https://raw.githubusercontent.com/vengatmacuser/react-native-inapp-inspector/main/assets/walkthrough.gif" alt="React Native In-App Inspector Walkthrough" width="360" style="border-radius: 20px;" />
@@ -22,6 +27,22 @@ A self-contained, developer-first in-app debugging overlay for React Native. Ins
22
27
 
23
28
  ---
24
29
 
30
+ ## ⚡ Why Choose `react-native-inapp-inspector`?
31
+
32
+ | Capability | **react-native-inapp-inspector** | react-native-network-logger | Flipper / RN Debugger |
33
+ | :--- | :---: | :---: | :---: |
34
+ | **Zero Native Setup / No Cables** | ✅ | ✅ | ❌ (Requires desktop app/cables) |
35
+ | **Network Inspector (Fetch & Axios)** | ✅ | ✅ | ✅ |
36
+ | **cURL & Fetch Snippet Export** | ✅ | ❌ | ⚠️ |
37
+ | **Console Logger + Stack Traces** | ✅ (Metro Symbolicated) | ❌ | ✅ |
38
+ | **Redux State & Action Diffs** | ✅ | ❌ | ⚠️ |
39
+ | **Firebase Analytics Tracker** | ✅ | ❌ | ❌ |
40
+ | **JS Bundle Size & Hermes Analyzer** | ✅ | ❌ | ❌ |
41
+ | **Live Traffic Stream Freeze** | ✅ | ❌ | ❌ |
42
+ | **Expo & Bare React Native** | ✅ | ✅ | ⚠️ |
43
+
44
+ ---
45
+
25
46
  ## ✨ Features
26
47
 
27
48
  | Feature | Description |
@@ -45,25 +66,28 @@ A self-contained, developer-first in-app debugging overlay for React Native. Ins
45
66
 
46
67
  ## 📦 Installation
47
68
 
69
+ ### Bare React Native
48
70
  ```bash
49
71
  npm install --save-dev react-native-inapp-inspector axios
72
+ # or
73
+ yarn add -D react-native-inapp-inspector axios
50
74
  ```
51
75
 
52
76
  ```bash
53
- yarn add -D react-native-inapp-inspector axios
77
+ # iOS Pods
78
+ cd ios && pod install
54
79
  ```
55
80
 
56
- ### Peer & Native Dependencies
81
+ ### Expo Projects
82
+ ```bash
83
+ npx expo install react-native-inapp-inspector react-native-svg react-native-linear-gradient
84
+ ```
57
85
 
58
- The package has React and React Native as peer dependencies. It depends on `@react-navigation/native`, `react-native-linear-gradient`, and `react-native-svg`.
86
+ ### Dependencies
87
+ The package requires React (`>=18.0.0`) and React Native (`>=0.60.0`) as peer dependencies and utilizes `@react-navigation/native`, `react-native-linear-gradient`, and `react-native-svg`.
59
88
 
60
89
  *(Optional)* If you use `@react-native-clipboard/clipboard` in your project, the inspector automatically detects and utilizes native clipboard bridges for seamless emulator-to-host copying.
61
90
 
62
- ```bash
63
- # iOS Pods installation
64
- cd ios && pod install
65
- ```
66
-
67
91
  ---
68
92
 
69
93
  ## 🚀 Basic Setup
@@ -47,7 +47,9 @@ const AppFonts_1 = require("../styles/AppFonts");
47
47
  const helpers_1 = require("../helpers");
48
48
  // Stylesheet
49
49
  const AppColors_1 = require("../styles/AppColors");
50
+ const i18n_1 = require("../i18n");
50
51
  const AnalyticsDetail = ({ event, }) => {
52
+ const { t } = (0, i18n_1.useTranslation)();
51
53
  const [expandDepth, setExpandDepth] = (0, react_1.useState)(1);
52
54
  const [treeKey, setTreeKey] = (0, react_1.useState)(0);
53
55
  const params = event.params ?? {};
@@ -67,7 +69,7 @@ const AnalyticsDetail = ({ event, }) => {
67
69
  }
68
70
  else if (isArray) {
69
71
  typeLabel = 'array';
70
- countLabel = `${jsonData.length} items`;
72
+ countLabel = `${jsonData.length} ${t('analytics.items')}`;
71
73
  }
72
74
  else if (isObject) {
73
75
  typeLabel = 'object';
@@ -107,7 +109,7 @@ const AnalyticsDetail = ({ event, }) => {
107
109
  fontSize: 12,
108
110
  color: AppColors_1.AppColors.purple,
109
111
  }}>
110
- {expandDepth === 99 ? 'Collapse All' : 'Expand All'}
112
+ {expandDepth === 99 ? t('common.collapseAll') : t('common.expandAll')}
111
113
  </react_native_1.Text>
112
114
  </TouchableScale_1.default>
113
115
  <react_native_1.View style={{
@@ -144,7 +146,7 @@ const AnalyticsDetail = ({ event, }) => {
144
146
  </react_native_1.View>
145
147
  </react_native_1.View>
146
148
 
147
- <CopyButton_1.default value={JSON.stringify(jsonData, null, 2)} label="Copy JSON"/>
149
+ <CopyButton_1.default value={JSON.stringify(jsonData, null, 2)} label={t('common.copyJson')}/>
148
150
  </react_native_1.View>
149
151
 
150
152
  {/* Direct JSON Viewer View */}
@@ -1,5 +1,4 @@
1
1
  import React from 'react';
2
2
  import { AnalyticsEventCardProps } from '../types';
3
- export declare function getEventColor(name: string): string;
4
3
  declare const AnalyticsEventCard: React.NamedExoticComponent<AnalyticsEventCardProps>;
5
4
  export default AnalyticsEventCard;
@@ -36,94 +36,18 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
36
36
  return (mod && mod.__esModule) ? mod : { "default": mod };
37
37
  };
38
38
  Object.defineProperty(exports, "__esModule", { value: true });
39
- exports.getEventColor = getEventColor;
40
39
  const react_1 = __importStar(require("react"));
41
40
  const react_native_1 = require("react-native");
42
41
  const AppColors_1 = require("../styles/AppColors");
43
42
  const AppFonts_1 = require("../styles/AppFonts");
44
43
  const helpers_1 = require("../helpers");
44
+ const i18n_1 = require("../i18n");
45
45
  const HighlightText_1 = __importDefault(require("./HighlightText"));
46
46
  const TouchableScale_1 = __importDefault(require("./TouchableScale"));
47
- // ─── Palette (Google Analytics colours) ───────────────────────────────────────
48
- const EVENT_PALETTE = [
49
- AppColors_1.AppColors.googleBlue, // blue
50
- AppColors_1.AppColors.googleGreen, // green
51
- AppColors_1.AppColors.googlePurple, // purple
52
- AppColors_1.AppColors.googleTeal, // teal
53
- AppColors_1.AppColors.googleRed, // red
54
- AppColors_1.AppColors.googleOrange, // orange
55
- AppColors_1.AppColors.blue700, // dark blue
56
- AppColors_1.AppColors.materialGreen, // dark green
57
- ];
58
- function getEventColor(name) {
59
- const safeName = typeof name === 'string' ? name : String(name || '');
60
- let hash = 0;
61
- for (let i = 0; i < safeName.length; i++) {
62
- hash = (hash * 31 + safeName.charCodeAt(i)) | 0;
63
- }
64
- return EVENT_PALETTE[Math.abs(hash) % EVENT_PALETTE.length];
65
- }
66
- // ─── Helpers ──────────────────────────────────────────────────────────────────
67
- function getEventCategory(name) {
68
- if (!name)
69
- return 'Custom';
70
- const lowercaseName = name.toLowerCase();
71
- if (lowercaseName === 'screen_view' || lowercaseName === 'page_view') {
72
- return 'Page View';
73
- }
74
- // Ecommerce events
75
- const ecommerceEvents = [
76
- 'purchase', 'add_to_cart', 'begin_checkout', 'view_item',
77
- 'select_item', 'remove_from_cart', 'view_cart',
78
- 'add_shipping_info', 'add_payment_info', 'refund',
79
- 'view_item_list', 'select_promotion', 'view_promotion'
80
- ];
81
- if (ecommerceEvents.includes(lowercaseName)) {
82
- return 'Ecommerce';
83
- }
84
- // Firebase System Auto-events
85
- const systemEvents = [
86
- 'first_open', 'session_start', 'user_engagement',
87
- 'app_clear_data', 'app_exception', 'app_update', 'os_update',
88
- 'notification_receive', 'notification_open', 'notification_dismiss',
89
- 'screen_active', 'screen_inactive'
90
- ];
91
- if (systemEvents.includes(lowercaseName) || lowercaseName.startsWith('firebase_') || lowercaseName.startsWith('_')) {
92
- return 'System';
93
- }
94
- return 'Custom';
95
- }
96
- function getCategoryColors(category) {
97
- switch (category) {
98
- case 'Page View':
99
- return {
100
- bg: AppColors_1.AppColors.blueBg,
101
- border: AppColors_1.AppColors.blueBorder,
102
- text: AppColors_1.AppColors.blue800,
103
- };
104
- case 'Ecommerce':
105
- return {
106
- bg: AppColors_1.AppColors.greenBg,
107
- border: AppColors_1.AppColors.greenBorder,
108
- text: AppColors_1.AppColors.materialGreen,
109
- };
110
- case 'System':
111
- return {
112
- bg: AppColors_1.AppColors.greyBg,
113
- border: AppColors_1.AppColors.greyBorder,
114
- text: AppColors_1.AppColors.grey600,
115
- };
116
- default:
117
- return {
118
- bg: AppColors_1.AppColors.purpleBg,
119
- border: AppColors_1.AppColors.purpleBorder,
120
- text: AppColors_1.AppColors.purpleText,
121
- };
122
- }
123
- }
124
47
  // ─── Component ────────────────────────────────────────────────────────────────
125
48
  const AnalyticsEventCard = react_1.default.memo(function AnalyticsEventCard({ event, onPress, isNew = false, searchStr = '', msSincePrev, computedScreenName, }) {
126
- const color = getEventColor(event.name);
49
+ const { t } = (0, i18n_1.useTranslation)();
50
+ const color = (0, helpers_1.getEventColor)(event.name);
127
51
  const paramCount = event.params ? Object.keys(event.params).length : 0;
128
52
  const userPropCount = event.userProperties
129
53
  ? Object.keys(event.userProperties).length
@@ -143,11 +67,19 @@ const AnalyticsEventCard = react_1.default.memo(function AnalyticsEventCard({ ev
143
67
  return (<react_native_1.View style={cardStyles.container}>
144
68
  {/* ── Gap Indicator ─────────────────────────────────────────────────── */}
145
69
  {showGap && (<react_native_1.View style={cardStyles.gapContainer}>
146
- <react_native_1.Text style={[cardStyles.gapText, { color: AppColors_1.AppColors.grayTextWeak }]}>{(0, helpers_1.formatGap)(msSincePrev)}</react_native_1.Text>
70
+ <react_native_1.Text style={[cardStyles.gapText, { color: AppColors_1.AppColors.grayTextWeak }]}>
71
+ {(0, helpers_1.formatGap)(msSincePrev)}
72
+ </react_native_1.Text>
147
73
  </react_native_1.View>)}
148
74
 
149
75
  {/* ── Main Card ─────────────────────────────────────────────────────── */}
150
- <TouchableScale_1.default onPress={onPress} style={[cardStyles.modernCard, { backgroundColor: AppColors_1.AppColors.primaryLight, borderColor: AppColors_1.AppColors.grayBorderSecondary }]}>
76
+ <TouchableScale_1.default onPress={onPress} style={[
77
+ cardStyles.modernCard,
78
+ {
79
+ backgroundColor: AppColors_1.AppColors.primaryLight,
80
+ borderColor: AppColors_1.AppColors.grayBorderSecondary,
81
+ },
82
+ ]}>
151
83
  <react_native_1.Animated.View style={[
152
84
  react_native_1.StyleSheet.absoluteFill,
153
85
  {
@@ -170,14 +102,21 @@ const AnalyticsEventCard = react_1.default.memo(function AnalyticsEventCard({ ev
170
102
  </react_native_1.View>
171
103
 
172
104
  {(() => {
173
- const category = getEventCategory(event.name);
174
- const tagColors = getCategoryColors(category);
105
+ const catKey = (0, helpers_1.getEventCategory)(event.name);
106
+ const tagColors = (0, helpers_1.getCategoryColors)(catKey);
107
+ const categoryLabel = catKey === 'page_view'
108
+ ? t('analytics.pageViewCategory')
109
+ : catKey === 'ecommerce'
110
+ ? t('analytics.ecommerceCategory')
111
+ : catKey === 'system'
112
+ ? t('analytics.systemCategory')
113
+ : t('analytics.customCategory');
175
114
  return (<react_native_1.View style={[
176
115
  cardStyles.categoryBadge,
177
116
  { backgroundColor: tagColors.bg, borderColor: tagColors.border },
178
117
  ]}>
179
118
  <react_native_1.Text style={[cardStyles.categoryText, { color: tagColors.text }]}>
180
- {category}
119
+ {categoryLabel}
181
120
  </react_native_1.Text>
182
121
  </react_native_1.View>);
183
122
  })()}
@@ -193,7 +132,8 @@ const AnalyticsEventCard = react_1.default.memo(function AnalyticsEventCard({ ev
193
132
  cardStyles.duplicateText,
194
133
  event.count === 1 && { color: AppColors_1.AppColors.grayTextStrong },
195
134
  ]}>
196
- {event.count}×{event.count > 1 ? ' Duplicate' : ''}
135
+ {event.count}×
136
+ {event.count > 1 ? ` ${t('analytics.duplicate')}` : ''}
197
137
  </react_native_1.Text>
198
138
  </react_native_1.View>) : null}
199
139
  </react_native_1.View>
@@ -216,7 +156,13 @@ const AnalyticsEventCard = react_1.default.memo(function AnalyticsEventCard({ ev
216
156
  const screenNameStr = typeof rawScreenName === 'object'
217
157
  ? JSON.stringify(rawScreenName)
218
158
  : String(rawScreenName);
219
- return (<react_native_1.View style={[cardStyles.chip, { backgroundColor: AppColors_1.AppColors.grayBackground, borderColor: AppColors_1.AppColors.grayBorderSecondary }]}>
159
+ return (<react_native_1.View style={[
160
+ cardStyles.chip,
161
+ {
162
+ backgroundColor: AppColors_1.AppColors.grayBackground,
163
+ borderColor: AppColors_1.AppColors.grayBorderSecondary,
164
+ },
165
+ ]}>
220
166
  <react_native_1.View style={[cardStyles.screenDot, { backgroundColor: color }]}/>
221
167
  <react_native_1.Text style={[cardStyles.chipText, { color: AppColors_1.AppColors.grayText }]} numberOfLines={1}>
222
168
  {screenNameStr}
@@ -224,22 +170,51 @@ const AnalyticsEventCard = react_1.default.memo(function AnalyticsEventCard({ ev
224
170
  </react_native_1.View>);
225
171
  })()}
226
172
 
227
- <react_native_1.View style={[cardStyles.chip, { backgroundColor: AppColors_1.AppColors.grayBackground, borderColor: AppColors_1.AppColors.grayBorderSecondary }]}>
173
+ <react_native_1.View style={[
174
+ cardStyles.chip,
175
+ {
176
+ backgroundColor: AppColors_1.AppColors.grayBackground,
177
+ borderColor: AppColors_1.AppColors.grayBorderSecondary,
178
+ },
179
+ ]}>
228
180
  <react_native_1.Text style={[cardStyles.chipText, { color: AppColors_1.AppColors.grayText }]}>
229
- {'{} '} {paramCount} params
181
+ {'{} '} {paramCount} {t('analytics.params')}
230
182
  </react_native_1.Text>
231
183
  </react_native_1.View>
232
184
 
233
- {userPropCount > 0 && (<react_native_1.View style={[cardStyles.chip, { backgroundColor: AppColors_1.AppColors.grayBackground, borderColor: AppColors_1.AppColors.grayBorderSecondary }]}>
234
- <react_native_1.Text style={[cardStyles.chipText, { color: AppColors_1.AppColors.grayText }]}>★ {userPropCount} props</react_native_1.Text>
185
+ {userPropCount > 0 && (<react_native_1.View style={[
186
+ cardStyles.chip,
187
+ {
188
+ backgroundColor: AppColors_1.AppColors.grayBackground,
189
+ borderColor: AppColors_1.AppColors.grayBorderSecondary,
190
+ },
191
+ ]}>
192
+ <react_native_1.Text style={[cardStyles.chipText, { color: AppColors_1.AppColors.grayText }]}>
193
+ ★ {userPropCount} {t('analytics.props')}
194
+ </react_native_1.Text>
235
195
  </react_native_1.View>)}
236
196
 
237
197
  {(() => {
238
198
  const items = event.params?.items;
239
199
  if (Array.isArray(items) && items.length > 0) {
240
- return (<react_native_1.View style={[cardStyles.chip, { backgroundColor: AppColors_1.AppColors.amberBg, borderColor: AppColors_1.AppColors.amberBorder }]}>
241
- <react_native_1.Text style={[cardStyles.chipText, { color: AppColors_1.AppColors.amber700, fontFamily: AppFonts_1.AppFonts.interBold }]}>
242
- 🛒 {items.length} {items.length === 1 ? 'item' : 'items'}
200
+ return (<react_native_1.View style={[
201
+ cardStyles.chip,
202
+ {
203
+ backgroundColor: AppColors_1.AppColors.amberBg,
204
+ borderColor: AppColors_1.AppColors.amberBorder,
205
+ },
206
+ ]}>
207
+ <react_native_1.Text style={[
208
+ cardStyles.chipText,
209
+ {
210
+ color: AppColors_1.AppColors.amber700,
211
+ fontFamily: AppFonts_1.AppFonts.interBold,
212
+ },
213
+ ]}>
214
+ 🛒 {items.length}{' '}
215
+ {items.length === 1
216
+ ? t('analytics.item')
217
+ : t('analytics.items')}
243
218
  </react_native_1.Text>
244
219
  </react_native_1.View>);
245
220
  }
@@ -251,9 +226,23 @@ const AnalyticsEventCard = react_1.default.memo(function AnalyticsEventCard({ ev
251
226
  const currency = event.params?.currency ?? '';
252
227
  const isPrimitive = typeof val === 'string' || typeof val === 'number';
253
228
  if (isPrimitive) {
254
- const currencyStr = typeof currency === 'string' || typeof currency === 'number' ? String(currency) : '';
255
- return (<react_native_1.View style={[cardStyles.chip, { backgroundColor: AppColors_1.AppColors.emeraldBg, borderColor: AppColors_1.AppColors.emeraldBorder }]}>
256
- <react_native_1.Text style={[cardStyles.chipText, { color: AppColors_1.AppColors.emerald600, fontFamily: AppFonts_1.AppFonts.interBold }]}>
229
+ const currencyStr = typeof currency === 'string' || typeof currency === 'number'
230
+ ? String(currency)
231
+ : '';
232
+ return (<react_native_1.View style={[
233
+ cardStyles.chip,
234
+ {
235
+ backgroundColor: AppColors_1.AppColors.emeraldBg,
236
+ borderColor: AppColors_1.AppColors.emeraldBorder,
237
+ },
238
+ ]}>
239
+ <react_native_1.Text style={[
240
+ cardStyles.chipText,
241
+ {
242
+ color: AppColors_1.AppColors.emerald600,
243
+ fontFamily: AppFonts_1.AppFonts.interBold,
244
+ },
245
+ ]}>
257
246
  💰 {String(val)} {currencyStr}
258
247
  </react_native_1.Text>
259
248
  </react_native_1.View>);
@@ -5,7 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.ConsoleLogCard = void 0;
7
7
  const react_1 = __importDefault(require("react"));
8
- const react_i18next_1 = require("react-i18next");
8
+ const i18n_1 = require("../i18n");
9
9
  const react_native_1 = require("react-native");
10
10
  const AppColors_1 = require("../styles/AppColors");
11
11
  const AppFonts_1 = require("../styles/AppFonts");
@@ -64,7 +64,7 @@ const getLogMessageWithBadges = (message, searchStr, textStyle, highlightStyle,
64
64
  };
65
65
  exports.ConsoleLogCard = react_1.default.memo(function ConsoleLogCard({ item, searchStr = '', }) {
66
66
  const { setSelectedLog } = (0, InspectorContext_1.useInspector)();
67
- const { t } = (0, react_i18next_1.useTranslation)();
67
+ const { t } = (0, i18n_1.useTranslation)();
68
68
  const jsonContent = (0, helpers_1.getJsonContent)(item.message);
69
69
  const isAnalyticsError = item.message
70
70
  .toLowerCase()
@@ -36,7 +36,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
36
36
  return (mod && mod.__esModule) ? mod : { "default": mod };
37
37
  };
38
38
  Object.defineProperty(exports, "__esModule", { value: true });
39
- const react_i18next_1 = require("react-i18next");
39
+ const i18n_1 = require("../i18n");
40
40
  const react_1 = __importStar(require("react"));
41
41
  const react_native_1 = require("react-native");
42
42
  // Helpers
@@ -45,7 +45,7 @@ const helpers_1 = require("../helpers");
45
45
  const AppColors_1 = require("../styles/AppColors");
46
46
  const styles_1 = __importDefault(require("../styles"));
47
47
  const DiffViewer = react_1.default.memo(({ oldData, newData, forceOpen, }) => {
48
- const { t } = (0, react_i18next_1.useTranslation)();
48
+ const { t } = (0, i18n_1.useTranslation)();
49
49
  const diffs = (0, react_1.useMemo)(() => (0, helpers_1.getDiff)(oldData, newData), [oldData, newData]);
50
50
  if (forceOpen === false) {
51
51
  return (<react_native_1.View style={styles_1.default.codeBlock}>
@@ -37,7 +37,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
37
37
  };
38
38
  Object.defineProperty(exports, "__esModule", { value: true });
39
39
  const react_1 = __importStar(require("react"));
40
- const react_i18next_1 = require("react-i18next");
40
+ const i18n_1 = require("../i18n");
41
41
  const react_native_1 = require("react-native");
42
42
  // Components
43
43
  const CopyButton_1 = __importDefault(require("./CopyButton"));
@@ -97,7 +97,7 @@ const HeaderRow = react_1.default.memo(function HeaderRow({ headerKey, value, is
97
97
  </react_native_1.Animated.View>);
98
98
  });
99
99
  const HeadersSection = ({ title, headers, search, resetKey, }) => {
100
- const { t } = (0, react_i18next_1.useTranslation)();
100
+ const { t } = (0, i18n_1.useTranslation)();
101
101
  const { toggleOpen, forceOpen, chevronStyle, bodyStyle } = (0, useAccordion_1.default)(false, 2400, 300);
102
102
  (0, react_1.useEffect)(() => {
103
103
  forceOpen(false);