react-native-inapp-inspector 1.0.9 → 1.0.11

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 (47) hide show
  1. package/README.md +5 -6
  2. package/dist/commonjs/components/AnalyticsDetail.js +28 -23
  3. package/dist/commonjs/components/AnalyticsEventCard.js +9 -9
  4. package/dist/commonjs/components/BrandSquareIcon.d.ts +5 -0
  5. package/dist/commonjs/components/BrandSquareIcon.js +180 -0
  6. package/dist/commonjs/components/CodeSnippet.js +32 -24
  7. package/dist/commonjs/components/ConsoleLogCard.js +127 -70
  8. package/dist/commonjs/components/JsonViewer.d.ts +2 -1
  9. package/dist/commonjs/components/JsonViewer.js +2 -2
  10. package/dist/commonjs/components/MetaAccordion.d.ts +1 -1
  11. package/dist/commonjs/components/MetaAccordion.js +45 -2
  12. package/dist/commonjs/components/NetworkIcons.d.ts +7 -0
  13. package/dist/commonjs/components/NetworkIcons.js +42 -1
  14. package/dist/commonjs/components/ReduxTreeView.d.ts +17 -0
  15. package/dist/commonjs/components/ReduxTreeView.js +630 -0
  16. package/dist/commonjs/components/TouchableScale.js +15 -1
  17. package/dist/commonjs/components/TreeNode.js +3 -3
  18. package/dist/commonjs/customHooks/reduxLogger.d.ts +12 -0
  19. package/dist/commonjs/customHooks/reduxLogger.js +71 -2
  20. package/dist/commonjs/index.js +1568 -505
  21. package/dist/commonjs/styles/index.d.ts +11 -1
  22. package/dist/commonjs/styles/index.js +19 -9
  23. package/dist/commonjs/types/index.d.ts +4 -0
  24. package/dist/esm/components/AnalyticsDetail.js +28 -23
  25. package/dist/esm/components/AnalyticsEventCard.js +9 -9
  26. package/dist/esm/components/BrandSquareIcon.d.ts +5 -0
  27. package/dist/esm/components/BrandSquareIcon.js +140 -0
  28. package/dist/esm/components/CodeSnippet.js +32 -24
  29. package/dist/esm/components/ConsoleLogCard.js +127 -70
  30. package/dist/esm/components/JsonViewer.d.ts +2 -1
  31. package/dist/esm/components/JsonViewer.js +2 -2
  32. package/dist/esm/components/MetaAccordion.d.ts +1 -1
  33. package/dist/esm/components/MetaAccordion.js +46 -3
  34. package/dist/esm/components/NetworkIcons.d.ts +7 -0
  35. package/dist/esm/components/NetworkIcons.js +34 -0
  36. package/dist/esm/components/ReduxTreeView.d.ts +17 -0
  37. package/dist/esm/components/ReduxTreeView.js +592 -0
  38. package/dist/esm/components/TouchableScale.js +16 -2
  39. package/dist/esm/components/TreeNode.js +3 -3
  40. package/dist/esm/customHooks/reduxLogger.d.ts +12 -0
  41. package/dist/esm/customHooks/reduxLogger.js +64 -1
  42. package/dist/esm/index.js +1571 -508
  43. package/dist/esm/styles/index.d.ts +11 -1
  44. package/dist/esm/styles/index.js +19 -9
  45. package/dist/esm/types/index.d.ts +4 -0
  46. package/example/App.tsx +46 -0
  47. package/package.json +7 -5
package/README.md CHANGED
@@ -31,18 +31,17 @@ npm install --save-dev react-native-inapp-inspector
31
31
  yarn add -D react-native-inapp-inspector
32
32
  ```
33
33
 
34
- ### Peer Dependencies
35
- Make sure you have the following peer dependencies installed in your project:
36
-
37
- ```bash
38
- npm install react-native-svg react-native-linear-gradient @react-navigation/native
39
- ```
34
+ The package will automatically install its dependencies (`@react-navigation/native`, `react-native-linear-gradient`, and `react-native-svg`).
40
35
 
41
36
  For iOS projects, don't forget to run pod install:
42
37
  ```bash
43
38
  cd ios && pod install
44
39
  ```
45
40
 
41
+ ### Dependency Isolation
42
+
43
+ This package is designed to operate in strict isolation. If the host application already uses `@react-navigation/native`, `react-native-linear-gradient`, or `react-native-svg`, the package's dependencies will not conflict with the application's runtime. The bundler (Metro/Webpack) and autolink systems automatically resolve duplicate native module links without affecting your main application environment.
44
+
46
45
  ---
47
46
 
48
47
  ## Integration
@@ -58,20 +58,20 @@ const ParamRowItem = ({ paramKey, value, }) => {
58
58
  const valStr = isObject ? JSON.stringify(value, null, 2) : String(value);
59
59
  const [expanded, setExpanded] = (0, react_1.useState)(false);
60
60
  const isLong = valStr.length > 80 || valStr.includes('\n') || isObject;
61
- return (<react_native_1.View style={detailStyles.dataBox}>
61
+ return (<react_native_1.View style={[detailStyles.dataBox, { backgroundColor: AppColors_1.AppColors.primaryLight, borderColor: AppColors_1.AppColors.grayBorderSecondary }]}>
62
62
  <react_native_1.View style={detailStyles.dataBoxHeader}>
63
- <react_native_1.Text style={detailStyles.dataBoxKey} numberOfLines={1}>
63
+ <react_native_1.Text style={[detailStyles.dataBoxKey, { color: AppColors_1.AppColors.primaryBlack }]} numberOfLines={1}>
64
64
  {paramKey}
65
65
  </react_native_1.Text>
66
66
  <CopyButton_1.default value={valStr} label={paramKey}/>
67
67
  </react_native_1.View>
68
- {expanded && isObject ? (<react_native_1.View style={detailStyles.jsonBlock}>
68
+ {expanded && isObject ? (<react_native_1.View style={[detailStyles.jsonBlock, { backgroundColor: AppColors_1.AppColors.grayBackground, borderColor: AppColors_1.AppColors.grayBorderSecondary }]}>
69
69
  <JsonViewer_1.default data={value}/>
70
- </react_native_1.View>) : (<react_native_1.Text style={detailStyles.dataBoxVal} selectable numberOfLines={expanded ? undefined : 2}>
70
+ </react_native_1.View>) : (<react_native_1.Text style={[detailStyles.dataBoxVal, { color: AppColors_1.AppColors.primaryBlack }]} selectable numberOfLines={expanded ? undefined : 2}>
71
71
  {valStr}
72
72
  </react_native_1.Text>)}
73
- {isLong && (<react_native_1.Pressable onPress={() => setExpanded(!expanded)} style={detailStyles.showMoreBtn}>
74
- <react_native_1.Text style={detailStyles.showMoreText}>
73
+ {isLong && (<react_native_1.Pressable onPress={() => setExpanded(!expanded)} style={[detailStyles.showMoreBtn, { backgroundColor: AppColors_1.AppColors.grayBackground }]}>
74
+ <react_native_1.Text style={[detailStyles.showMoreText, { color: AppColors_1.AppColors.grayTextStrong }]}>
75
75
  {expanded ? 'Show Less' : 'Show More'}
76
76
  </react_native_1.Text>
77
77
  </react_native_1.Pressable>)}
@@ -83,8 +83,8 @@ const ParamTable = ({ data, emptyLabel, }) => {
83
83
  value: data[key],
84
84
  }));
85
85
  if (entries.length === 0) {
86
- return (<react_native_1.View style={detailStyles.emptyParams}>
87
- <react_native_1.Text style={detailStyles.emptyParamsText}>
86
+ return (<react_native_1.View style={[detailStyles.emptyParams, { backgroundColor: AppColors_1.AppColors.primaryLight, borderColor: AppColors_1.AppColors.grayBorderSecondary }]}>
87
+ <react_native_1.Text style={[detailStyles.emptyParamsText, { color: AppColors_1.AppColors.grayTextWeak }]}>
88
88
  {emptyLabel ?? 'No parameters'}
89
89
  </react_native_1.Text>
90
90
  </react_native_1.View>);
@@ -99,14 +99,14 @@ const SectionCard = ({ title, children, count, accentColor = AppColors_1.AppColo
99
99
  {children}
100
100
  </react_native_1.View>);
101
101
  }
102
- return (<react_native_1.View style={detailStyles.sectionCard}>
102
+ return (<react_native_1.View style={[detailStyles.sectionCard, { backgroundColor: AppColors_1.AppColors.primaryLight, borderColor: AppColors_1.AppColors.grayBorderSecondary }]}>
103
103
  <react_native_1.View style={detailStyles.sectionHeader}>
104
104
  <react_native_1.View style={detailStyles.sectionTitleRow}>
105
105
  <react_native_1.View style={[
106
106
  detailStyles.sectionAccentDot,
107
107
  { backgroundColor: accentColor },
108
108
  ]}/>
109
- <react_native_1.Text style={detailStyles.sectionTitle}>{title.toUpperCase()}</react_native_1.Text>
109
+ <react_native_1.Text style={[detailStyles.sectionTitle, { color: AppColors_1.AppColors.primaryBlack }]}>{title.toUpperCase()}</react_native_1.Text>
110
110
  </react_native_1.View>
111
111
  {typeof count === 'number' && (<react_native_1.View style={[
112
112
  detailStyles.countBadge,
@@ -205,7 +205,7 @@ const AnalyticsDetail = ({ event, }) => {
205
205
  value: event.source,
206
206
  color: sourceColor,
207
207
  });
208
- return (<react_native_1.ScrollView style={detailStyles.scroll} contentContainerStyle={detailStyles.content} showsVerticalScrollIndicator contentInsetAdjustmentBehavior="never" automaticallyAdjustContentInsets={false}>
208
+ return (<react_native_1.ScrollView style={[detailStyles.scroll, { backgroundColor: AppColors_1.AppColors.grayBackground }]} contentContainerStyle={detailStyles.content} showsVerticalScrollIndicator contentInsetAdjustmentBehavior="never" automaticallyAdjustContentInsets={false}>
209
209
  <react_native_linear_gradient_1.default colors={[
210
210
  `${eventColor}18`,
211
211
  `${eventColor}06`,
@@ -251,9 +251,12 @@ const AnalyticsDetail = ({ event, }) => {
251
251
  {topMetrics.length > 0 && (<react_native_1.ScrollView horizontal showsHorizontalScrollIndicator={false} style={detailStyles.metricsScroll} contentContainerStyle={detailStyles.metricsGrid}>
252
252
  {topMetrics.map((item, idx) => (<react_native_1.View key={idx} style={[
253
253
  detailStyles.metricCard,
254
- { borderLeftColor: item.color },
254
+ {
255
+ borderLeftColor: item.color,
256
+ backgroundColor: AppColors_1.AppColors.primaryLight,
257
+ },
255
258
  ]}>
256
- <react_native_1.Text style={detailStyles.metricLabel}>{item.key}</react_native_1.Text>
259
+ <react_native_1.Text style={[detailStyles.metricLabel, { color: AppColors_1.AppColors.grayTextWeak }]}>{item.key}</react_native_1.Text>
257
260
  <react_native_1.Text style={[detailStyles.metricValue, { color: item.color }]} numberOfLines={1}>
258
261
  {item.value}
259
262
  </react_native_1.Text>
@@ -261,25 +264,27 @@ const AnalyticsDetail = ({ event, }) => {
261
264
  </react_native_1.ScrollView>)}
262
265
  </react_native_linear_gradient_1.default>
263
266
 
264
- <react_native_1.View style={detailStyles.tabRow}>
267
+ <react_native_1.View style={[detailStyles.tabRow, { backgroundColor: AppColors_1.AppColors.grayBackground }]}>
265
268
  <react_native_1.Pressable style={[
266
269
  detailStyles.tabButton,
267
- activeTab === 'unformatted' && detailStyles.tabActive,
270
+ activeTab === 'unformatted' && [detailStyles.tabActive, { backgroundColor: AppColors_1.AppColors.primaryLight }],
268
271
  ]} onPress={() => setActiveTab('unformatted')}>
269
272
  <react_native_1.Text style={[
270
273
  detailStyles.tabText,
271
- activeTab === 'unformatted' && detailStyles.tabTextActive,
274
+ { color: AppColors_1.AppColors.grayTextWeak },
275
+ activeTab === 'unformatted' && [detailStyles.tabTextActive, { color: AppColors_1.AppColors.primaryBlack }],
272
276
  ]}>
273
277
  JSON Viewer
274
278
  </react_native_1.Text>
275
279
  </react_native_1.Pressable>
276
280
  <react_native_1.Pressable style={[
277
281
  detailStyles.tabButton,
278
- activeTab === 'formatted' && detailStyles.tabActive,
282
+ activeTab === 'formatted' && [detailStyles.tabActive, { backgroundColor: AppColors_1.AppColors.primaryLight }],
279
283
  ]} onPress={() => setActiveTab('formatted')}>
280
284
  <react_native_1.Text style={[
281
285
  detailStyles.tabText,
282
- activeTab === 'formatted' && detailStyles.tabTextActive,
286
+ { color: AppColors_1.AppColors.grayTextWeak },
287
+ activeTab === 'formatted' && [detailStyles.tabTextActive, { color: AppColors_1.AppColors.primaryBlack }],
283
288
  ]}>
284
289
  Tabular View
285
290
  </react_native_1.Text>
@@ -287,8 +292,8 @@ const AnalyticsDetail = ({ event, }) => {
287
292
  </react_native_1.View>
288
293
 
289
294
  {activeTab === 'unformatted' && (<react_native_1.View style={detailStyles.searchRow}>
290
- <react_native_1.View style={styles_1.default.detailSearchBox}>
291
- <react_native_1.TextInput placeholder="Search JSON data..." placeholderTextColor={AppColors_1.AppColors.grayTextWeak} value={search} onChangeText={setSearch} style={styles_1.default.detailSearchInput} autoCorrect={false} autoCapitalize="none"/>
295
+ <react_native_1.View style={[styles_1.default.detailSearchBox, { backgroundColor: AppColors_1.AppColors.primaryLight, borderColor: AppColors_1.AppColors.grayBorderSecondary }]}>
296
+ <react_native_1.TextInput placeholder="Search JSON data..." placeholderTextColor={AppColors_1.AppColors.grayTextWeak} value={search} onChangeText={setSearch} style={[styles_1.default.detailSearchInput, { color: AppColors_1.AppColors.primaryBlack }]} autoCorrect={false} autoCapitalize="none"/>
292
297
  {search.length > 0 && (<react_native_1.Pressable onPress={() => setSearch('')} hitSlop={10} style={{ padding: 8 }}>
293
298
  <NetworkIcons_1.ClearIcon color={AppColors_1.AppColors.grayTextWeak} size={14}/>
294
299
  </react_native_1.Pressable>)}
@@ -306,7 +311,7 @@ const AnalyticsDetail = ({ event, }) => {
306
311
  </react_native_1.View>)}
307
312
 
308
313
  {activeTab === 'unformatted' && (<SectionCard accentColor={AppColors_1.AppColors.purple}>
309
- <react_native_1.View style={[detailStyles.jsonBlock, { marginLeft: 0, marginTop: 0 }]}>
314
+ <react_native_1.View style={[detailStyles.jsonBlock, { marginLeft: 0, marginTop: 0, backgroundColor: AppColors_1.AppColors.grayBackground, borderColor: AppColors_1.AppColors.grayBorderSecondary }]}>
310
315
  <JsonViewer_1.default data={{
311
316
  name: event.name,
312
317
  params: params,
@@ -320,8 +325,8 @@ const AnalyticsDetail = ({ event, }) => {
320
325
  </SectionCard>)}
321
326
 
322
327
  {/* Empty state */}
323
- {paramCount === 0 && upCount === 0 && activeTab !== 'unformatted' && (<react_native_1.View style={detailStyles.emptyParams}>
324
- <react_native_1.Text style={detailStyles.emptyParamsText}>
328
+ {paramCount === 0 && upCount === 0 && activeTab !== 'unformatted' && (<react_native_1.View style={[detailStyles.emptyParams, { backgroundColor: AppColors_1.AppColors.primaryLight, borderColor: AppColors_1.AppColors.grayBorderSecondary }]}>
329
+ <react_native_1.Text style={[detailStyles.emptyParamsText, { color: AppColors_1.AppColors.grayTextWeak }]}>
325
330
  No parameters recorded for this event
326
331
  </react_native_1.Text>
327
332
  </react_native_1.View>)}
@@ -102,11 +102,11 @@ const AnalyticsEventCard = react_1.default.memo(function AnalyticsEventCard({ ev
102
102
  return (<react_native_1.View style={cardStyles.container}>
103
103
  {/* ── Gap Indicator ─────────────────────────────────────────────────── */}
104
104
  {showGap && (<react_native_1.View style={cardStyles.gapContainer}>
105
- <react_native_1.Text style={cardStyles.gapText}>{formatGap(msSincePrev)}</react_native_1.Text>
105
+ <react_native_1.Text style={[cardStyles.gapText, { color: AppColors_1.AppColors.grayTextWeak }]}>{formatGap(msSincePrev)}</react_native_1.Text>
106
106
  </react_native_1.View>)}
107
107
 
108
108
  {/* ── Main Card ─────────────────────────────────────────────────────── */}
109
- <TouchableScale_1.default onPress={onPress} style={cardStyles.modernCard}>
109
+ <TouchableScale_1.default onPress={onPress} style={[cardStyles.modernCard, { backgroundColor: AppColors_1.AppColors.primaryLight, borderColor: AppColors_1.AppColors.grayBorderSecondary }]}>
110
110
  <react_native_1.Animated.View style={[
111
111
  react_native_1.StyleSheet.absoluteFill,
112
112
  {
@@ -143,7 +143,7 @@ const AnalyticsEventCard = react_1.default.memo(function AnalyticsEventCard({ ev
143
143
  </react_native_1.Text>
144
144
  </react_native_1.View>) : null}
145
145
  </react_native_1.View>
146
- <react_native_1.Text style={cardStyles.timestamp}>
146
+ <react_native_1.Text style={[cardStyles.timestamp, { color: AppColors_1.AppColors.grayTextWeak }]}>
147
147
  {formatTime(event.timestamp)}
148
148
  </react_native_1.Text>
149
149
  </react_native_1.View>
@@ -155,9 +155,9 @@ const AnalyticsEventCard = react_1.default.memo(function AnalyticsEventCard({ ev
155
155
  event.screenName ||
156
156
  event.params?.firebase_screen ||
157
157
  event.params?.screen_name ||
158
- event.params?.firebase_screen_class ? (<react_native_1.View style={cardStyles.chip}>
158
+ event.params?.firebase_screen_class ? (<react_native_1.View style={[cardStyles.chip, { backgroundColor: AppColors_1.AppColors.grayBackground, borderColor: AppColors_1.AppColors.grayBorderSecondary }]}>
159
159
  <react_native_1.View style={[cardStyles.screenDot, { backgroundColor: color }]}/>
160
- <react_native_1.Text style={cardStyles.chipText} numberOfLines={1}>
160
+ <react_native_1.Text style={[cardStyles.chipText, { color: AppColors_1.AppColors.grayText }]} numberOfLines={1}>
161
161
  {computedScreenName ||
162
162
  event.screenName ||
163
163
  event.params?.firebase_screen ||
@@ -166,14 +166,14 @@ const AnalyticsEventCard = react_1.default.memo(function AnalyticsEventCard({ ev
166
166
  </react_native_1.Text>
167
167
  </react_native_1.View>) : null}
168
168
 
169
- <react_native_1.View style={cardStyles.chip}>
170
- <react_native_1.Text style={cardStyles.chipText}>
169
+ <react_native_1.View style={[cardStyles.chip, { backgroundColor: AppColors_1.AppColors.grayBackground, borderColor: AppColors_1.AppColors.grayBorderSecondary }]}>
170
+ <react_native_1.Text style={[cardStyles.chipText, { color: AppColors_1.AppColors.grayText }]}>
171
171
  {'{} '} {paramCount} params
172
172
  </react_native_1.Text>
173
173
  </react_native_1.View>
174
174
 
175
- {userPropCount > 0 && (<react_native_1.View style={cardStyles.chip}>
176
- <react_native_1.Text style={cardStyles.chipText}>★ {userPropCount} props</react_native_1.Text>
175
+ {userPropCount > 0 && (<react_native_1.View style={[cardStyles.chip, { backgroundColor: AppColors_1.AppColors.grayBackground, borderColor: AppColors_1.AppColors.grayBorderSecondary }]}>
176
+ <react_native_1.Text style={[cardStyles.chipText, { color: AppColors_1.AppColors.grayText }]}>★ {userPropCount} props</react_native_1.Text>
177
177
  </react_native_1.View>)}
178
178
  </react_native_1.View>
179
179
 
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ export declare const BrandSquareIcon: ({ size }: {
3
+ size?: number;
4
+ }) => React.JSX.Element;
5
+ export default BrandSquareIcon;
@@ -0,0 +1,180 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ var __importDefault = (this && this.__importDefault) || function (mod) {
36
+ return (mod && mod.__esModule) ? mod : { "default": mod };
37
+ };
38
+ Object.defineProperty(exports, "__esModule", { value: true });
39
+ exports.BrandSquareIcon = void 0;
40
+ const react_1 = __importDefault(require("react"));
41
+ const react_native_svg_1 = __importStar(require("react-native-svg"));
42
+ const BrandSquareIcon = ({ size = 56 }) => {
43
+ return (<react_native_svg_1.default width={size} height={size} viewBox="0 0 256 256" fill="none">
44
+ <react_native_svg_1.Defs>
45
+ <react_native_svg_1.LinearGradient id="tileSquare" x1="30" y1="30" x2="210" y2="222" gradientUnits="userSpaceOnUse">
46
+ <react_native_svg_1.Stop offset="0" stopColor="#141B33"/>
47
+ <react_native_svg_1.Stop offset="1" stopColor="#0A0E1C"/>
48
+ </react_native_svg_1.LinearGradient>
49
+ <react_native_svg_1.LinearGradient id="edgeSquare" x1="14" y1="22" x2="220" y2="228" gradientUnits="userSpaceOnUse">
50
+ <react_native_svg_1.Stop offset="0" stopColor="#3A4E7A"/>
51
+ <react_native_svg_1.Stop offset="1" stopColor="#1A2238"/>
52
+ </react_native_svg_1.LinearGradient>
53
+ <react_native_svg_1.LinearGradient id="beamSquare" x1="70" y1="74" x2="194" y2="187" gradientUnits="userSpaceOnUse">
54
+ <react_native_svg_1.Stop offset="0" stopColor="#5EEAD4"/>
55
+ <react_native_svg_1.Stop offset="0.5" stopColor="#38BDF8"/>
56
+ <react_native_svg_1.Stop offset="1" stopColor="#A78BFA"/>
57
+ </react_native_svg_1.LinearGradient>
58
+ <react_native_svg_1.RadialGradient id="haloSquare" cx="0.5" cy="0.45" r="0.55">
59
+ <react_native_svg_1.Stop offset="0" stopColor="#38BDF8" stopOpacity={0.12}/>
60
+ <react_native_svg_1.Stop offset="1" stopColor="#38BDF8" stopOpacity={0}/>
61
+ </react_native_svg_1.RadialGradient>
62
+ <react_native_svg_1.LinearGradient id="owlbodySquare" x1="78" y1="60" x2="178" y2="186" gradientUnits="userSpaceOnUse">
63
+ <react_native_svg_1.Stop offset="0" stopColor="#202E55"/>
64
+ <react_native_svg_1.Stop offset="1" stopColor="#10182F"/>
65
+ </react_native_svg_1.LinearGradient>
66
+ <react_native_svg_1.LinearGradient id="beakSquare" x1="120" y1="151" x2="136" y2="168" gradientUnits="userSpaceOnUse">
67
+ <react_native_svg_1.Stop offset="0" stopColor="#FCD34D"/>
68
+ <react_native_svg_1.Stop offset="1" stopColor="#FB923C"/>
69
+ </react_native_svg_1.LinearGradient>
70
+ <react_native_svg_1.RadialGradient id="irisSquare" cx="0.42" cy="0.38" r="0.72">
71
+ <react_native_svg_1.Stop offset="0" stopColor="#FDE68A"/>
72
+ <react_native_svg_1.Stop offset="0.5" stopColor="#FBBF24"/>
73
+ <react_native_svg_1.Stop offset="1" stopColor="#F59E0B"/>
74
+ </react_native_svg_1.RadialGradient>
75
+ <react_native_svg_1.RadialGradient id="blushSquare" cx="0.5" cy="0.5" r="0.5">
76
+ <react_native_svg_1.Stop offset="0" stopColor="#FB7185" stopOpacity={0.5}/>
77
+ <react_native_svg_1.Stop offset="1" stopColor="#FB7185" stopOpacity={0}/>
78
+ </react_native_svg_1.RadialGradient>
79
+ <react_native_svg_1.LinearGradient id="wingSquare" x1="70" y1="120" x2="190" y2="206" gradientUnits="userSpaceOnUse">
80
+ <react_native_svg_1.Stop offset="0" stopColor="#1A2545"/>
81
+ <react_native_svg_1.Stop offset="1" stopColor="#0E1530"/>
82
+ </react_native_svg_1.LinearGradient>
83
+ <react_native_svg_1.LinearGradient id="faceplateSquare" x1="70" y1="72" x2="186" y2="152" gradientUnits="userSpaceOnUse">
84
+ <react_native_svg_1.Stop offset="0" stopColor="#35497E"/>
85
+ <react_native_svg_1.Stop offset="1" stopColor="#1E2D4D"/>
86
+ </react_native_svg_1.LinearGradient>
87
+ <react_native_svg_1.RadialGradient id="lensglassSquare" cx="0.4" cy="0.32" r="0.75">
88
+ <react_native_svg_1.Stop offset="0" stopColor="#7DE8FF" stopOpacity={0.22}/>
89
+ <react_native_svg_1.Stop offset="0.7" stopColor="#7DE8FF" stopOpacity={0.05}/>
90
+ <react_native_svg_1.Stop offset="1" stopColor="#7DE8FF" stopOpacity={0}/>
91
+ </react_native_svg_1.RadialGradient>
92
+ <react_native_svg_1.LinearGradient id="bellySquare" x1="94" y1="126" x2="162" y2="212" gradientUnits="userSpaceOnUse">
93
+ <react_native_svg_1.Stop offset="0" stopColor="#33477A"/>
94
+ <react_native_svg_1.Stop offset="1" stopColor="#1D2B53"/>
95
+ </react_native_svg_1.LinearGradient>
96
+ </react_native_svg_1.Defs>
97
+ <react_native_svg_1.Rect x={8} y={8} width={240} height={240} rx={58} fill="url(#tileSquare)"/>
98
+ <react_native_svg_1.Rect x={8.6} y={8.6} width={238.8} height={238.8} rx={57.4} fill="none" stroke="url(#edgeSquare)" strokeOpacity={0.6} strokeWidth={1.2}/>
99
+ <react_native_svg_1.Circle cx={128} cy={128} r={104} fill="url(#haloSquare)"/>
100
+ <react_native_svg_1.G transform="translate(128 128) scale(1.16) translate(-128 -134)">
101
+ {/* wing 1 */}
102
+ <react_native_svg_1.Path d="M74 124 C58 154 60 190 86 204 C79 176 77 148 88 126 Z" fill="url(#wingSquare)" stroke="url(#beamSquare)" strokeWidth={2.5} strokeOpacity={0.45}/>
103
+ {/* wing 2 */}
104
+ <react_native_svg_1.Path d="M182 124 C198 154 196 190 170 204 C177 176 179 148 168 126 Z" fill="url(#wingSquare)" stroke="url(#beamSquare)" strokeWidth={2.5} strokeOpacity={0.45}/>
105
+ {/* body */}
106
+ <react_native_svg_1.Path d="M62 150 C58 104 70 70 90 58 L98 42 L116 62 Q128 57 140 62 L158 42 L166 58 C186 70 198 104 194 150 C198 180 184 204 152 212 C140 216 116 216 104 212 C72 204 58 180 62 150 Z" fill="url(#owlbodySquare)" stroke="url(#beamSquare)" strokeWidth={4} strokeLinejoin="round"/>
107
+
108
+ {/* inner-ear shadows */}
109
+ <react_native_svg_1.Path d="M99 48 L114 62 L104 63 L98 55 Z" fill="#080F22" opacity={0.5}/>
110
+ <react_native_svg_1.Path d="M157 48 L142 62 L152 63 L158 55 Z" fill="#080F22" opacity={0.5}/>
111
+
112
+ {/* wing feather lines */}
113
+ <react_native_svg_1.G stroke="#22325A" strokeWidth={2.2} fill="none" strokeLinecap="round" opacity={0.75}>
114
+ <react_native_svg_1.Path d="M80 138 q-5 26 3 50"/>
115
+ <react_native_svg_1.Path d="M90 134 q-4 26 3 48"/>
116
+ <react_native_svg_1.Path d="M176 138 q5 26 -3 50"/>
117
+ <react_native_svg_1.Path d="M166 134 q4 26 -3 48"/>
118
+ </react_native_svg_1.G>
119
+
120
+ {/* belly plate */}
121
+ <react_native_svg_1.Path d="M128 126 C151 126 164 148 162 174 C160 198 146 212 128 212 C110 212 96 198 94 174 C92 148 105 126 128 126 Z" fill="url(#bellySquare)"/>
122
+
123
+ {/* belly feather scallops */}
124
+ <react_native_svg_1.G stroke="#3E588C" strokeWidth={2.3} fill="none" strokeLinecap="round" opacity={0.4}>
125
+ <react_native_svg_1.Path d="M110 154 Q118 162 126 154"/>
126
+ <react_native_svg_1.Path d="M126 154 Q134 162 142 154"/>
127
+ <react_native_svg_1.Path d="M142 154 Q150 162 158 154"/>
128
+ <react_native_svg_1.Path d="M102 172 Q110 180 118 172"/>
129
+ <react_native_svg_1.Path d="M150 172 Q158 180 166 172"/>
130
+ <react_native_svg_1.Path d="M112 190 Q120 198 128 190"/>
131
+ <react_native_svg_1.Path d="M128 190 Q136 198 144 190"/>
132
+ </react_native_svg_1.G>
133
+
134
+ {/* developer chest screen + code emblem */}
135
+ <react_native_svg_1.Rect x={107} y={161} width={42} height={32} rx={9} fill="#0C1426" stroke="url(#beamSquare)" strokeWidth={2} strokeOpacity={0.7}/>
136
+ <react_native_svg_1.G stroke="#8FD0EC" strokeWidth={3} strokeLinecap="round" strokeLinejoin="round" fill="none">
137
+ <react_native_svg_1.Path d="M122 170 L115 177 L122 184"/>
138
+ <react_native_svg_1.Path d="M134 170 L141 177 L134 184"/>
139
+ <react_native_svg_1.Path d="M130 168 L126 186"/>
140
+ </react_native_svg_1.G>
141
+
142
+ {/* facial disc */}
143
+ <react_native_svg_1.Path d="M128 92 C148 70 186 78 186 108 C186 134 160 152 128 152 C96 152 70 134 70 108 C70 78 108 70 128 92 Z" fill="url(#faceplateSquare)" stroke="#52709E" strokeWidth={2.6} strokeOpacity={0.7}/>
144
+ {/* facial-disc centre ridge */}
145
+ <react_native_svg_1.Path d="M128 96 L128 120" stroke="#52709E" strokeWidth={2} strokeLinecap="round" strokeOpacity={0.45}/>
146
+
147
+ {/* feet */}
148
+ <react_native_svg_1.G stroke="url(#beakSquare)" strokeWidth={5} strokeLinecap="round" fill="none">
149
+ <react_native_svg_1.Path d="M111 209 L105 224 M111 209 L111 226 M111 209 L117 224"/>
150
+ <react_native_svg_1.Path d="M145 209 L139 224 M145 209 L145 226 M145 209 L151 224"/>
151
+ </react_native_svg_1.G>
152
+
153
+ {/* normal eye: big cute yellow iris, dark pupil, sparkles */}
154
+ <react_native_svg_1.Circle cx={153} cy={107} r={17} fill="url(#irisSquare)" stroke="#1A1205" strokeWidth={2.2}/>
155
+ <react_native_svg_1.Circle cx={153} cy={108} r={8.2} fill="#0A0E18"/>
156
+ <react_native_svg_1.Circle cx={156.2} cy={104} r={3.1} fill="#ffffff" opacity={0.95}/>
157
+ <react_native_svg_1.Circle cx={149.6} cy={111} r={1.6} fill="#ffffff" opacity={0.7}/>
158
+
159
+ {/* beak */}
160
+ <react_native_svg_1.Path d="M123.5 123 Q128 121 132.5 123 Q131 132 128 134.5 Q125 132 123.5 123 Z" fill="url(#beakSquare)"/>
161
+
162
+ {/* magnifier held to the big (debug) eye */}
163
+ <react_native_svg_1.Circle cx={95} cy={103} r={20} fill="url(#irisSquare)" stroke="#1A1205" strokeWidth={2.6}/>
164
+ <react_native_svg_1.Circle cx={95} cy={104} r={10} fill="#0A0E18"/>
165
+ <react_native_svg_1.Circle cx={98.6} cy={100} r={3.4} fill="#ffffff" opacity={0.95}/>
166
+ <react_native_svg_1.Circle cx={91} cy={107} r={1.8} fill="#ffffff" opacity={0.7}/>
167
+ <react_native_svg_1.Circle cx={95} cy={103} r={28} fill="url(#lensglassSquare)"/>
168
+ <react_native_svg_1.Path d="M77 87 A28 28 0 0 1 106 79" fill="none" stroke="#ffffff" strokeWidth={4} strokeLinecap="round" strokeOpacity={0.5}/>
169
+ <react_native_svg_1.Line x1={75} y1={123} x2={54} y2={147} stroke="#0A0F1C" strokeWidth={14} strokeLinecap="round"/>
170
+ <react_native_svg_1.Line x1={75} y1={123} x2={54} y2={147} stroke="url(#beamSquare)" strokeWidth={8.5} strokeLinecap="round"/>
171
+ <react_native_svg_1.Circle cx={95} cy={103} r={28} fill="none" stroke="url(#beamSquare)" strokeWidth={7}/>
172
+
173
+ {/* rosy cheeks */}
174
+ <react_native_svg_1.Ellipse cx={83} cy={127} rx={9} ry={6} fill="url(#blushSquare)"/>
175
+ <react_native_svg_1.Ellipse cx={167} cy={122} rx={9} ry={6} fill="url(#blushSquare)"/>
176
+ </react_native_svg_1.G>
177
+ </react_native_svg_1.default>);
178
+ };
179
+ exports.BrandSquareIcon = BrandSquareIcon;
180
+ exports.default = exports.BrandSquareIcon;
@@ -262,7 +262,7 @@ const getStyleForType = (type) => {
262
262
  case 'value':
263
263
  return styles.value;
264
264
  default:
265
- return styles.plain;
265
+ return [styles.plain, { color: AppColors_1.AppColors.primaryBlack }];
266
266
  }
267
267
  };
268
268
  const ArrowUpIcon = ({ color = '#64748B', size = 16 }) => (<react_native_svg_1.default width={size} height={size} viewBox="0 0 24 24" fill="none">
@@ -296,26 +296,32 @@ const CodeSnippetLine = react_1.default.memo(({ line, lineIndex, language, searc
296
296
  };
297
297
  return (<react_native_1.View style={[styles.lineRow, isActiveMatch && styles.activeMatchRow]}>
298
298
  {/* Gutter Line Number */}
299
- <react_native_1.View style={[styles.gutter, isActiveMatch && styles.activeMatchGutter]}>
300
- <react_native_1.Text style={[styles.lineNumber, isActiveMatch && styles.activeMatchLineNumber]}>{lineIndex + 1}</react_native_1.Text>
299
+ <react_native_1.View style={[styles.gutter, { backgroundColor: AppColors_1.AppColors.grayBackground, borderRightColor: AppColors_1.AppColors.grayBorderSecondary }, isActiveMatch && styles.activeMatchGutter]}>
300
+ <react_native_1.Text style={[styles.lineNumber, { color: AppColors_1.AppColors.grayTextWeak }, isActiveMatch && styles.activeMatchLineNumber]}>{lineIndex + 1}</react_native_1.Text>
301
301
  </react_native_1.View>
302
302
 
303
303
  {/* Highlighted Code Line */}
304
304
  <react_native_1.View style={styles.codeLine}>
305
- <react_native_1.Text style={styles.codeLineText}>
306
- {tokens.length === 0 ? (<react_native_1.Text style={styles.plain}> </react_native_1.Text>) : (tokens.map((token, tokenIdx) => (<react_1.default.Fragment key={tokenIdx}>
305
+ <react_native_1.Text style={[styles.codeLineText, { color: AppColors_1.AppColors.primaryBlack }]}>
306
+ {tokens.length === 0 ? (<react_native_1.Text style={[styles.plain, { color: AppColors_1.AppColors.primaryBlack }]}> </react_native_1.Text>) : (tokens.map((token, tokenIdx) => (<react_1.default.Fragment key={tokenIdx}>
307
307
  {renderTokenText(token.text, token.type)}
308
308
  </react_1.default.Fragment>)))}
309
309
  </react_native_1.Text>
310
310
  </react_native_1.View>
311
311
  </react_native_1.View>);
312
312
  });
313
- const CodeSnippet = ({ code, language, }) => {
313
+ const CodeSnippet = ({ code, language, search, }) => {
314
314
  const [searchQuery, setSearchQuery] = (0, react_1.useState)('');
315
315
  const [debouncedQuery, setDebouncedQuery] = (0, react_1.useState)('');
316
316
  const [currentMatchIdx, setCurrentMatchIdx] = (0, react_1.useState)(-1);
317
317
  const [visibleLinesCount, setVisibleLinesCount] = (0, react_1.useState)(200);
318
318
  const flatListRef = (0, react_1.useRef)(null);
319
+ // Sync prop search to searchQuery
320
+ (0, react_1.useEffect)(() => {
321
+ if (search !== undefined) {
322
+ setSearchQuery(search);
323
+ }
324
+ }, [search]);
319
325
  // Debounce search query updates
320
326
  (0, react_1.useEffect)(() => {
321
327
  const timer = setTimeout(() => {
@@ -360,7 +366,7 @@ const CodeSnippet = ({ code, language, }) => {
360
366
  // Reset scroll and states on code/language changes
361
367
  (0, react_1.useEffect)(() => {
362
368
  setVisibleLinesCount(200);
363
- setSearchQuery('');
369
+ setSearchQuery(search || '');
364
370
  setCurrentMatchIdx(-1);
365
371
  }, [code, language]);
366
372
  // Auto-scroll to the first match when search query returns matches
@@ -386,32 +392,32 @@ const CodeSnippet = ({ code, language, }) => {
386
392
  try {
387
393
  flatListRef.current?.scrollToIndex({
388
394
  index: lineIdx,
389
- animated: true,
390
- viewPosition: 0.5,
395
+ animated: false,
396
+ viewPosition: 0.3,
391
397
  });
392
398
  }
393
399
  catch (e) {
394
400
  // Fallback recovery is handled by onScrollToIndexFailed
395
401
  }
396
- }, 100);
402
+ }, 50);
397
403
  };
398
404
  const onScrollToIndexFailed = (error) => {
399
405
  flatListRef.current?.scrollToOffset({
400
406
  offset: error.averageItemLength * error.index,
401
- animated: true,
407
+ animated: false,
402
408
  });
403
409
  setTimeout(() => {
404
410
  try {
405
411
  flatListRef.current?.scrollToIndex({
406
412
  index: error.index,
407
- animated: true,
408
- viewPosition: 0.5,
413
+ animated: false,
414
+ viewPosition: 0.3,
409
415
  });
410
416
  }
411
417
  catch (err) {
412
418
  console.warn('Scroll to line index failed after fallback retry:', err);
413
419
  }
414
- }, 120);
420
+ }, 60);
415
421
  };
416
422
  const handleNextMatch = () => {
417
423
  if (matches.length === 0)
@@ -442,12 +448,12 @@ const CodeSnippet = ({ code, language, }) => {
442
448
  return (<react_native_1.View style={{ flex: 1 }}>
443
449
  {/* Search Header Row */}
444
450
  <react_native_1.View style={styles.searchRow}>
445
- <react_native_1.View style={styles.searchBar}>
451
+ <react_native_1.View style={[styles.searchBar, { backgroundColor: AppColors_1.AppColors.primaryLight, borderColor: AppColors_1.AppColors.grayBorderSecondary }]}>
446
452
  <NetworkIcons_1.SearchIcon color={AppColors_1.AppColors.grayTextWeak} size={15}/>
447
- <react_native_1.TextInput placeholder={`Search ${language.toUpperCase()}...`} placeholderTextColor={AppColors_1.AppColors.grayTextWeak} value={searchQuery} onChangeText={setSearchQuery} style={styles.searchInput} autoCorrect={false} autoCapitalize="none"/>
453
+ <react_native_1.TextInput placeholder={`Search ${language.toUpperCase()}...`} placeholderTextColor={AppColors_1.AppColors.grayTextWeak} value={searchQuery} onChangeText={setSearchQuery} style={[styles.searchInput, { color: AppColors_1.AppColors.primaryBlack }]} autoCorrect={false} autoCapitalize="none"/>
448
454
 
449
455
  {/* Matches Info */}
450
- {debouncedQuery.length >= 2 && (<react_native_1.Text style={styles.matchCountText}>
456
+ {debouncedQuery.length >= 2 && (<react_native_1.Text style={[styles.matchCountText, { backgroundColor: AppColors_1.AppColors.grayBackground, color: AppColors_1.AppColors.grayTextWeak }]}>
451
457
  {matches.length > 0 ? `${currentMatchIdx + 1}/${matches.length}` : '0/0'}
452
458
  </react_native_1.Text>)}
453
459
 
@@ -457,12 +463,12 @@ const CodeSnippet = ({ code, language, }) => {
457
463
  </react_native_1.View>
458
464
 
459
465
  {/* Up / Down Arrow Navigation Buttons */}
460
- {matches.length > 0 && (<react_native_1.View style={styles.navArrowsGroup}>
466
+ {matches.length > 0 && (<react_native_1.View style={[styles.navArrowsGroup, { backgroundColor: AppColors_1.AppColors.primaryLight, borderColor: AppColors_1.AppColors.grayBorderSecondary }]}>
461
467
  <TouchableScale_1.default onPress={handlePrevMatch} hitSlop={8} style={styles.navArrowBtn}>
462
- <ArrowUpIcon color="#475569" size={14}/>
468
+ <ArrowUpIcon color={AppColors_1.AppColors.grayTextStrong} size={14}/>
463
469
  </TouchableScale_1.default>
464
470
  <TouchableScale_1.default onPress={handleNextMatch} hitSlop={8} style={styles.navArrowBtn}>
465
- <ArrowDownIcon color="#475569" size={14}/>
471
+ <ArrowDownIcon color={AppColors_1.AppColors.grayTextStrong} size={14}/>
466
472
  </TouchableScale_1.default>
467
473
  </react_native_1.View>)}
468
474
 
@@ -470,7 +476,7 @@ const CodeSnippet = ({ code, language, }) => {
470
476
  </react_native_1.View>
471
477
 
472
478
  {/* Code Snippet list container */}
473
- <react_native_1.View style={styles.container}>
479
+ <react_native_1.View style={[styles.container, { backgroundColor: AppColors_1.AppColors.grayBackground, borderColor: AppColors_1.AppColors.grayBorderSecondary }]}>
474
480
  <react_native_1.FlatList ref={flatListRef} data={visibleLines} renderItem={renderLine} keyExtractor={(_, index) => String(index)} maxToRenderPerBatch={30} windowSize={5} initialNumToRender={50} removeClippedSubviews={react_native_1.Platform.OS === 'android'} onEndReached={handleEndReached} onEndReachedThreshold={0.5} onScrollToIndexFailed={onScrollToIndexFailed}/>
475
481
  </react_native_1.View>
476
482
  </react_native_1.View>);
@@ -546,7 +552,9 @@ const styles = react_native_1.StyleSheet.create({
546
552
  paddingVertical: 1,
547
553
  },
548
554
  activeMatchRow: {
549
- backgroundColor: 'rgba(234, 179, 8, 0.15)',
555
+ backgroundColor: 'rgba(234, 179, 8, 0.22)',
556
+ borderLeftWidth: 4,
557
+ borderLeftColor: '#EAB308',
550
558
  },
551
559
  gutter: {
552
560
  width: 40,
@@ -559,8 +567,8 @@ const styles = react_native_1.StyleSheet.create({
559
567
  paddingTop: 1,
560
568
  },
561
569
  activeMatchGutter: {
562
- backgroundColor: 'rgba(234, 179, 8, 0.25)',
563
- borderRightColor: 'rgba(234, 179, 8, 0.4)',
570
+ backgroundColor: 'rgba(234, 179, 8, 0.35)',
571
+ borderRightColor: 'rgba(234, 179, 8, 0.5)',
564
572
  },
565
573
  lineNumber: {
566
574
  fontFamily: monoFont,