react-native-inapp-inspector 1.1.28 → 1.1.29

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 (57) hide show
  1. package/android/src/main/java/com/inappinspector/NetworkInspectorModule.java +29 -80
  2. package/dist/commonjs/components/AppHeaderLogo.js +12 -15
  3. package/dist/commonjs/components/ConsoleLogCard.js +31 -7
  4. package/dist/commonjs/components/CopyButton.js +15 -1
  5. package/dist/commonjs/components/DomainHeader.js +56 -28
  6. package/dist/commonjs/components/HighlightText.js +7 -1
  7. package/dist/commonjs/components/Inspector/AnalyticsTab.js +35 -21
  8. package/dist/commonjs/components/Inspector/InspectorHeader.js +17 -3
  9. package/dist/commonjs/components/Inspector/LogDetail.js +8 -5
  10. package/dist/commonjs/components/Inspector/MainScreen.js +4 -0
  11. package/dist/commonjs/components/Inspector/NetworkDetail.js +24 -24
  12. package/dist/commonjs/components/JsonViewer.js +25 -3
  13. package/dist/commonjs/components/LogCard.js +103 -11
  14. package/dist/commonjs/components/Toast.d.ts +3 -0
  15. package/dist/commonjs/components/Toast.js +152 -0
  16. package/dist/commonjs/components/TouchableScale.d.ts +1 -0
  17. package/dist/commonjs/components/TouchableScale.js +3 -3
  18. package/dist/commonjs/components/TreeNode.js +1 -1
  19. package/dist/commonjs/constants/index.js +6 -6
  20. package/dist/commonjs/constants/version.d.ts +1 -1
  21. package/dist/commonjs/constants/version.js +1 -1
  22. package/dist/commonjs/helpers/index.d.ts +4 -0
  23. package/dist/commonjs/helpers/index.js +91 -92
  24. package/dist/commonjs/helpers/toast.d.ts +4 -0
  25. package/dist/commonjs/helpers/toast.js +20 -0
  26. package/dist/commonjs/i18n/locales/en.json +4 -1
  27. package/dist/commonjs/styles/index.d.ts +60 -14
  28. package/dist/commonjs/styles/index.js +71 -26
  29. package/dist/esm/components/AppHeaderLogo.js +12 -15
  30. package/dist/esm/components/ConsoleLogCard.js +33 -9
  31. package/dist/esm/components/CopyButton.js +15 -1
  32. package/dist/esm/components/DomainHeader.js +56 -28
  33. package/dist/esm/components/HighlightText.js +7 -1
  34. package/dist/esm/components/Inspector/AnalyticsTab.js +36 -22
  35. package/dist/esm/components/Inspector/InspectorHeader.js +18 -4
  36. package/dist/esm/components/Inspector/LogDetail.js +10 -7
  37. package/dist/esm/components/Inspector/MainScreen.js +4 -0
  38. package/dist/esm/components/Inspector/NetworkDetail.js +25 -25
  39. package/dist/esm/components/JsonViewer.js +25 -3
  40. package/dist/esm/components/LogCard.js +105 -13
  41. package/dist/esm/components/Toast.d.ts +3 -0
  42. package/dist/esm/components/Toast.js +117 -0
  43. package/dist/esm/components/TouchableScale.d.ts +1 -0
  44. package/dist/esm/components/TouchableScale.js +3 -3
  45. package/dist/esm/components/TreeNode.js +1 -1
  46. package/dist/esm/constants/index.js +6 -6
  47. package/dist/esm/constants/version.d.ts +1 -1
  48. package/dist/esm/constants/version.js +1 -1
  49. package/dist/esm/helpers/index.d.ts +4 -0
  50. package/dist/esm/helpers/index.js +86 -92
  51. package/dist/esm/helpers/toast.d.ts +4 -0
  52. package/dist/esm/helpers/toast.js +15 -0
  53. package/dist/esm/i18n/locales/en.json +4 -1
  54. package/dist/esm/styles/index.d.ts +60 -14
  55. package/dist/esm/styles/index.js +71 -26
  56. package/ios/NetworkInspectorModule.m +0 -10
  57. package/package.json +4 -1
@@ -1,7 +1,12 @@
1
1
  "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
2
5
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getRuntimeDiagnostics = exports.getCategoryColors = exports.registerGAPlugin = exports.getEventCategory = exports.getEventColor = exports.ANALYTICS_EVENT_PALETTE = exports.parseStackLine = exports.getJsonPreviewText = exports.getJsonContent = exports.formatGap = exports.formatTime = exports.formatTimeShort = exports.handleOpenExternalLink = exports.getAppName = exports.getBundleIdentifier = exports.formatDateTimeToAnalytics = exports.isAllValuesEmpty = exports.getLocalizedFilePathWithSlash = exports.getLocalizedFilePath = exports.formatDisplayUrl = exports.getDiff = exports.flattenObject = exports.getNavigationInfo = exports.escapeRegex = exports.deduplicateLogs = exports.getFetchCommand = exports.getCurlCommand = exports.getBaseUrl = exports.getPath = exports.copyToClipboard = exports.getSize = exports.getDurationColor = exports.getStatusColor = exports.formatDateTime = exports.getDomainColor = void 0;
6
+ exports.getRuntimeDiagnostics = exports.getCategoryColors = exports.registerGAPlugin = exports.getEventCategory = exports.getEventColor = exports.ANALYTICS_EVENT_PALETTE = exports.openInVSCode = exports.parseStackLine = exports.getJsonPreviewText = exports.getJsonContent = exports.formatGap = exports.formatTime = exports.formatTimeShort = exports.handleOpenExternalLink = exports.getAppName = exports.getBundleIdentifier = exports.formatDateTimeToAnalytics = exports.isAllValuesEmpty = exports.getLocalizedFilePathWithSlash = exports.getLocalizedFilePath = exports.formatDisplayUrl = exports.getDiff = exports.flattenObject = exports.getNavigationInfo = exports.escapeRegex = exports.deduplicateLogs = exports.getFetchCommand = exports.getCurlCommand = exports.getBaseUrl = exports.getPath = exports.copyToClipboard = exports.getSize = exports.getDurationColor = exports.getStatusColor = exports.formatTimestamp = exports.formatDateTime = exports.getDomainColor = void 0;
4
7
  const react_native_1 = require("react-native");
8
+ const clipboard_1 = __importDefault(require("@react-native-clipboard/clipboard"));
9
+ const toast_1 = require("./toast");
5
10
  // Stylesheet
6
11
  const AppColors_1 = require("../styles/AppColors");
7
12
  // Constants
@@ -28,6 +33,20 @@ const formatDateTime = (timestamp) => {
28
33
  return `${day}/${month}/${year} ${hours}:${minutes}:${seconds}`;
29
34
  };
30
35
  exports.formatDateTime = formatDateTime;
36
+ const formatTimestamp = (timestamp) => {
37
+ try {
38
+ const date = new Date(timestamp);
39
+ const hours = date.getHours().toString().padStart(2, '0');
40
+ const minutes = date.getMinutes().toString().padStart(2, '0');
41
+ const seconds = date.getSeconds().toString().padStart(2, '0');
42
+ const ms = date.getMilliseconds().toString().padStart(3, '0');
43
+ return `${hours}:${minutes}:${seconds}.${ms}`;
44
+ }
45
+ catch {
46
+ return '—';
47
+ }
48
+ };
49
+ exports.formatTimestamp = formatTimestamp;
31
50
  const getStatusColor = (status) => {
32
51
  if (!status || status === 0)
33
52
  return AppColors_1.AppColors.errorColor;
@@ -60,104 +79,43 @@ const getSize = (data) => {
60
79
  }
61
80
  };
62
81
  exports.getSize = getSize;
63
- // Safely detect and load clipboard natively without static require() calls that Metro fails on
64
- const getClipboardModule = () => {
65
- // 1. Check our built-in native module (NetworkInspectorModule)
66
- try {
67
- const tmReg = react_native_1.TurboModuleRegistry || globalThis.__turboModuleProxy;
68
- const inspectorMod = react_native_1.NativeModules?.NetworkInspectorModule ||
69
- (tmReg?.get ? tmReg.get('NetworkInspectorModule') : null);
70
- if (inspectorMod && typeof inspectorMod.copyToClipboard === 'function') {
71
- return {
72
- setString: (str) => inspectorMod.copyToClipboard(str),
73
- setStringAsync: (str) => inspectorMod.copyToClipboard(str),
74
- };
75
- }
82
+ const copyToClipboard = (value, label) => {
83
+ const resolved = typeof value === 'function' ? value() : value;
84
+ let textToCopy = '';
85
+ if (typeof resolved === 'string') {
86
+ textToCopy = resolved;
76
87
  }
77
- catch { }
78
- // 2. Check TurboModuleRegistry (TurboModules / New Architecture)
79
- try {
80
- const tmReg = react_native_1.TurboModuleRegistry || globalThis.__turboModuleProxy;
81
- if (tmReg?.get) {
82
- const tm = tmReg.get('RNCClipboard') ||
83
- tmReg.get('NativeClipboard') ||
84
- tmReg.get('ExpoClipboard');
85
- if (tm &&
86
- (typeof tm.setString === 'function' ||
87
- typeof tm.setStringAsync === 'function')) {
88
- return tm;
89
- }
88
+ else {
89
+ try {
90
+ textToCopy = JSON.stringify(resolved, null, 2);
91
+ }
92
+ catch {
93
+ textToCopy = String(resolved);
90
94
  }
91
95
  }
92
- catch { }
93
- // 3. Check legacy NativeModules table (Bridge / Old Architecture)
96
+ // Use @react-native-clipboard/clipboard npm package
94
97
  try {
95
- if (react_native_1.NativeModules?.RNCClipboard &&
96
- typeof react_native_1.NativeModules.RNCClipboard.setString === 'function') {
97
- return react_native_1.NativeModules.RNCClipboard;
98
- }
99
- if (react_native_1.NativeModules?.ExpoClipboard &&
100
- typeof react_native_1.NativeModules.ExpoClipboard.setStringAsync === 'function') {
101
- return react_native_1.NativeModules.ExpoClipboard;
98
+ if (typeof clipboard_1.default?.setString === 'function') {
99
+ clipboard_1.default.setString(textToCopy);
102
100
  }
103
- if (react_native_1.NativeModules?.Clipboard &&
104
- typeof react_native_1.NativeModules.Clipboard.setString === 'function') {
105
- return react_native_1.NativeModules.Clipboard;
101
+ else if (typeof clipboard_1.default?.default?.setString === 'function') {
102
+ clipboard_1.default.default.setString(textToCopy);
106
103
  }
107
104
  }
108
- catch { }
109
- // 4. Check legacy React Native core Clipboard
110
- try {
111
- if (react_native_1.Clipboard && typeof react_native_1.Clipboard.setString === 'function') {
112
- return react_native_1.Clipboard;
105
+ catch (err) {
106
+ if (__DEV__) {
107
+ console.warn('[NetworkInspector] Clipboard.setString failed:', err);
113
108
  }
114
109
  }
115
- catch { }
116
- return null;
117
- };
118
- const copyToClipboard = (value, label) => {
119
- const resolved = typeof value === 'function' ? value() : value;
120
- const text = typeof resolved === 'string' ? resolved : JSON.stringify(resolved, null, 2);
121
- const textToCopy = text ?? '';
122
- let copied = false;
110
+ // Trigger floating in-app bottom toast notification
123
111
  try {
124
- const cb = getClipboardModule();
125
- if (cb) {
126
- if (typeof cb.setStringAsync === 'function') {
127
- cb.setStringAsync(textToCopy);
128
- copied = true;
129
- }
130
- else if (typeof cb.setString === 'function') {
131
- cb.setString(textToCopy);
132
- copied = true;
133
- }
134
- }
112
+ (0, toast_1.showToast)(label ? `${label} copied to clipboard` : 'Copied to clipboard');
135
113
  }
136
114
  catch { }
137
- // Built-in native module direct invocation
138
- if (!copied) {
139
- try {
140
- const inspectorMod = react_native_1.NativeModules?.NetworkInspectorModule;
141
- if (inspectorMod && typeof inspectorMod.copyToClipboard === 'function') {
142
- inspectorMod.copyToClipboard(textToCopy);
143
- copied = true;
144
- }
145
- }
146
- catch { }
147
- }
148
- if (!copied) {
149
- try {
150
- if (typeof navigator !== 'undefined' && navigator?.clipboard?.writeText) {
151
- navigator.clipboard.writeText(textToCopy);
152
- copied = true;
153
- }
154
- }
155
- catch { }
156
- }
157
- // Visual toast feedback on Android if ToastAndroid exists
115
+ // Native Android Toast fallback
158
116
  try {
159
117
  if (react_native_1.Platform.OS === 'android' && react_native_1.ToastAndroid?.show) {
160
- react_native_1.ToastAndroid.show(`${label} copied`, react_native_1.ToastAndroid.SHORT);
118
+ react_native_1.ToastAndroid.show(label ? `${label} copied to clipboard` : 'Copied to clipboard', react_native_1.ToastAndroid.SHORT);
161
119
  }
162
120
  }
163
121
  catch { }
@@ -566,11 +524,16 @@ const parseStackLine = (rawLine, isOrigin = false) => {
566
524
  (functionName === 'next' && isNative);
567
525
  const isDependency = cleanPath.includes('node_modules') ||
568
526
  cleanPath.includes('react-native/Libraries') ||
569
- (cleanPath.includes('react-native-inapp-inspector') && !cleanPath.includes('/example/'));
527
+ (cleanPath.includes('react-native-inapp-inspector') &&
528
+ !cleanPath.includes('/example/'));
570
529
  const isUserCode = !isNative &&
571
530
  !isInternalBytecode &&
572
531
  !isDependency &&
573
- (fileExt === 'tsx' || fileExt === 'jsx' || fileExt === 'ts' || fileExt === 'js' || !fileName.includes('.bundle'));
532
+ (fileExt === 'tsx' ||
533
+ fileExt === 'jsx' ||
534
+ fileExt === 'ts' ||
535
+ fileExt === 'js' ||
536
+ !fileName.includes('.bundle'));
574
537
  const frameType = isUserCode
575
538
  ? 'app'
576
539
  : isDependency
@@ -578,7 +541,10 @@ const parseStackLine = (rawLine, isOrigin = false) => {
578
541
  : isNative
579
542
  ? 'native'
580
543
  : 'runtime';
581
- const isRuntimeNoise = isInternalBytecode || isNative || functionName === 'asyncGeneratorStep' || functionName === '_next';
544
+ const isRuntimeNoise = isInternalBytecode ||
545
+ isNative ||
546
+ functionName === 'asyncGeneratorStep' ||
547
+ functionName === '_next';
582
548
  // Format clean relative project path
583
549
  let relativePath = cleanPath;
584
550
  if (relativePath.includes('/example/')) {
@@ -598,6 +564,7 @@ const parseStackLine = (rawLine, isOrigin = false) => {
598
564
  functionName,
599
565
  fileName,
600
566
  fullPath: relativePath,
567
+ rawFilePath: fullPath,
601
568
  fileExt,
602
569
  frameType,
603
570
  isUserCode,
@@ -609,6 +576,31 @@ const parseStackLine = (rawLine, isOrigin = false) => {
609
576
  };
610
577
  };
611
578
  exports.parseStackLine = parseStackLine;
579
+ /** Opens a file and line number directly in VS Code */
580
+ const openInVSCode = (filePath, lineNumber, columnNumber) => {
581
+ const line = lineNumber ? `:${lineNumber}` : '';
582
+ const col = columnNumber ? `:${columnNumber}` : '';
583
+ const cleanPath = filePath.replace(/^file:\/\//, '');
584
+ const vscodeUrl = `vscode://file/${cleanPath.replace(/^\/+/, '')}${line}${col}`;
585
+ react_native_1.Linking.canOpenURL(vscodeUrl)
586
+ .then(supported => {
587
+ if (supported) {
588
+ react_native_1.Linking.openURL(vscodeUrl);
589
+ }
590
+ else {
591
+ react_native_1.Linking.openURL(vscodeUrl).catch(() => {
592
+ const insidersUrl = `vscode-insiders://file/${cleanPath.replace(/^\/+/, '')}${line}${col}`;
593
+ react_native_1.Linking.openURL(insidersUrl).catch(() => {
594
+ react_native_1.Alert.alert('Open in VS Code', `Target location:\n${cleanPath}${line}${col}\n\nPlease ensure VS Code is installed.`, [{ text: 'OK' }]);
595
+ });
596
+ });
597
+ }
598
+ })
599
+ .catch(() => {
600
+ react_native_1.Linking.openURL(vscodeUrl).catch(() => { });
601
+ });
602
+ };
603
+ exports.openInVSCode = openInVSCode;
612
604
  // ─── Analytics Helpers ────────────────────────────────────────────────────────
613
605
  exports.ANALYTICS_EVENT_PALETTE = [
614
606
  AppColors_1.AppColors.googleBlue,
@@ -667,7 +659,11 @@ exports.getCategoryColors = getCategoryColors;
667
659
  const getRuntimeDiagnostics = () => {
668
660
  const isHermes = typeof global.HermesInternal !== 'undefined';
669
661
  const isV8 = typeof global._v8runtime !== 'undefined';
670
- const engineType = isHermes ? 'hermes' : isV8 ? 'v8' : 'jsc';
662
+ const engineType = isHermes
663
+ ? 'hermes'
664
+ : isV8
665
+ ? 'v8'
666
+ : 'jsc';
671
667
  const isFabric = typeof global.nativeFabricUIManager !== 'undefined' ||
672
668
  Boolean(global.__turboModuleProxy);
673
669
  const archType = isFabric ? 'fabric' : 'paper';
@@ -677,11 +673,14 @@ const getRuntimeDiagnostics = () => {
677
673
  const hermesStats = global.HermesInternal?.getInstrumentedStats?.();
678
674
  if (hermesStats?.js_heap_size) {
679
675
  usedHeapMb = Number((hermesStats.js_heap_size / (1024 * 1024)).toFixed(1));
680
- totalAllocMb = Number(((hermesStats.js_allocated_bytes || hermesStats.js_heap_size * 1.6) / (1024 * 1024)).toFixed(1));
676
+ totalAllocMb = Number(((hermesStats.js_allocated_bytes || hermesStats.js_heap_size * 1.6) /
677
+ (1024 * 1024)).toFixed(1));
681
678
  }
682
679
  else if (global.performance?.memory?.usedJSHeapSize) {
683
- usedHeapMb = Number((global.performance.memory.usedJSHeapSize / (1024 * 1024)).toFixed(1));
684
- totalAllocMb = Number((global.performance.memory.totalJSHeapSize / (1024 * 1024)).toFixed(1));
680
+ usedHeapMb = Number((global.performance.memory.usedJSHeapSize /
681
+ (1024 * 1024)).toFixed(1));
682
+ totalAllocMb = Number((global.performance.memory.totalJSHeapSize /
683
+ (1024 * 1024)).toFixed(1));
685
684
  }
686
685
  }
687
686
  catch { }
@@ -0,0 +1,4 @@
1
+ type ToastListener = (message: string) => void;
2
+ export declare const showToast: (message: string) => void;
3
+ export declare const subscribeToast: (listener: ToastListener) => () => void;
4
+ export {};
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.subscribeToast = exports.showToast = void 0;
4
+ const listeners = new Set();
5
+ const showToast = (message) => {
6
+ listeners.forEach(fn => {
7
+ try {
8
+ fn(message);
9
+ }
10
+ catch { }
11
+ });
12
+ };
13
+ exports.showToast = showToast;
14
+ const subscribeToast = (listener) => {
15
+ listeners.add(listener);
16
+ return () => {
17
+ listeners.delete(listener);
18
+ };
19
+ };
20
+ exports.subscribeToast = subscribeToast;
@@ -15,7 +15,10 @@
15
15
  "expandAll": "Expand All",
16
16
  "viewOnNpm": "View on NPM",
17
17
  "later": "Later",
18
- "source": "SOURCE"
18
+ "source": "SOURCE",
19
+ "open": "Open",
20
+ "openInBrowser": "Open in Browser",
21
+ "openInBrowserPrompt": "Are you sure you want to open this URL in your external browser?"
19
22
  },
20
23
  "header": {
21
24
  "updateAvailableTitle": "Update Available",
@@ -20,17 +20,22 @@ export declare const getRawStyles: (colors: typeof AppColors) => {
20
20
  };
21
21
  headerLeft: {
22
22
  flex: number;
23
+ minWidth: number;
23
24
  alignItems: string;
24
25
  };
25
26
  headerCenter: {
26
27
  flex: number;
28
+ minWidth: number;
27
29
  alignItems: string;
30
+ justifyContent: string;
31
+ paddingHorizontal: number;
28
32
  };
29
33
  headerRight: {
30
- flex: number;
34
+ flexShrink: number;
31
35
  flexDirection: string;
32
36
  alignItems: string;
33
37
  justifyContent: string;
38
+ gap: number;
34
39
  };
35
40
  headerTitle: {
36
41
  fontFamily: string;
@@ -176,6 +181,7 @@ export declare const getRawStyles: (colors: typeof AppColors) => {
176
181
  justifyContent: string;
177
182
  borderWidth: number;
178
183
  borderColor: string;
184
+ overflow: string;
179
185
  };
180
186
  fabWrapper: {
181
187
  position: string;
@@ -250,6 +256,13 @@ export declare const getRawStyles: (colors: typeof AppColors) => {
250
256
  gap: number;
251
257
  };
252
258
  toolbarBtn: {
259
+ shadowColor: string;
260
+ shadowOffset: {
261
+ width: number;
262
+ height: number;
263
+ };
264
+ shadowOpacity: number;
265
+ shadowRadius: number;
253
266
  width: number;
254
267
  height: number;
255
268
  borderRadius: number;
@@ -258,14 +271,16 @@ export declare const getRawStyles: (colors: typeof AppColors) => {
258
271
  backgroundColor: string;
259
272
  borderWidth: number;
260
273
  borderColor: string;
261
- shadowColor: string;
262
- shadowOffset: {
263
- width: number;
264
- height: number;
265
- };
266
- shadowOpacity: number;
267
- shadowRadius: number;
274
+ } | {
268
275
  elevation: number;
276
+ width: number;
277
+ height: number;
278
+ borderRadius: number;
279
+ alignItems: string;
280
+ justifyContent: string;
281
+ backgroundColor: string;
282
+ borderWidth: number;
283
+ borderColor: string;
269
284
  };
270
285
  toolbarBtnActive: {
271
286
  borderColor: string;
@@ -452,18 +467,38 @@ export declare const getRawStyles: (colors: typeof AppColors) => {
452
467
  fontFamily: string;
453
468
  fontSize: number;
454
469
  };
470
+ domainProgressSection: {
471
+ marginTop: number;
472
+ gap: number;
473
+ width: string;
474
+ };
455
475
  domainProgressTrack: {
456
476
  flexDirection: string;
457
477
  height: number;
458
478
  borderRadius: number;
459
479
  overflow: string;
460
480
  backgroundColor: string;
461
- marginTop: number;
462
481
  width: string;
463
482
  };
464
483
  domainProgressSegment: {
465
484
  height: string;
466
485
  };
486
+ domainProgressLabelsRow: {
487
+ flexDirection: string;
488
+ alignItems: string;
489
+ justifyContent: string;
490
+ paddingHorizontal: number;
491
+ };
492
+ domainProgressRateText: {
493
+ fontFamily: string;
494
+ fontSize: number;
495
+ color: string;
496
+ };
497
+ domainProgressSummaryText: {
498
+ fontFamily: string;
499
+ fontSize: number;
500
+ color: string;
501
+ };
467
502
  domainStatsGroup: {
468
503
  flexDirection: string;
469
504
  alignItems: string;
@@ -580,11 +615,6 @@ export declare const getRawStyles: (colors: typeof AppColors) => {
580
615
  fontSize: number;
581
616
  };
582
617
  methodBadge: {
583
- paddingHorizontal: number;
584
- paddingVertical: number;
585
- borderRadius: number;
586
- alignItems: string;
587
- justifyContent: string;
588
618
  shadowColor: string;
589
619
  shadowOffset: {
590
620
  width: number;
@@ -592,12 +622,28 @@ export declare const getRawStyles: (colors: typeof AppColors) => {
592
622
  };
593
623
  shadowOpacity: number;
594
624
  shadowRadius: number;
625
+ paddingHorizontal: number;
626
+ paddingVertical: number;
627
+ borderRadius: number;
628
+ alignItems: string;
629
+ justifyContent: string;
630
+ borderWidth: number;
631
+ borderColor: string;
632
+ } | {
595
633
  elevation: number;
634
+ paddingHorizontal: number;
635
+ paddingVertical: number;
636
+ borderRadius: number;
637
+ alignItems: string;
638
+ justifyContent: string;
639
+ borderWidth: number;
640
+ borderColor: string;
596
641
  };
597
642
  methodBadgeText: {
598
643
  fontFamily: string;
599
644
  fontSize: number;
600
645
  letterSpacing: number;
646
+ color: string;
601
647
  };
602
648
  cardHostText: {
603
649
  fontFamily: string;
@@ -43,23 +43,34 @@ const getRawStyles = (colors) => ({
43
43
  header: {
44
44
  flexDirection: 'row',
45
45
  alignItems: 'center',
46
- paddingHorizontal: 12,
47
- paddingVertical: 10,
46
+ paddingHorizontal: 10,
47
+ paddingVertical: 8,
48
48
  zIndex: 10,
49
- minHeight: 64,
49
+ minHeight: 56,
50
50
  shadowColor: colors.black,
51
51
  shadowOffset: { width: 0, height: 2 },
52
52
  shadowOpacity: 0.08,
53
53
  shadowRadius: 4,
54
- elevation: 4,
54
+ elevation: 3,
55
55
  },
56
- headerLeft: { flex: 2, alignItems: 'flex-start' },
57
- headerCenter: { flex: 3, alignItems: 'center' },
58
- headerRight: {
56
+ headerLeft: {
59
57
  flex: 1,
58
+ minWidth: 0,
59
+ alignItems: 'flex-start',
60
+ },
61
+ headerCenter: {
62
+ flex: 1,
63
+ minWidth: 0,
64
+ alignItems: 'center',
65
+ justifyContent: 'center',
66
+ paddingHorizontal: 4,
67
+ },
68
+ headerRight: {
69
+ flexShrink: 0,
60
70
  flexDirection: 'row',
61
71
  alignItems: 'center',
62
72
  justifyContent: 'flex-end',
73
+ gap: 6,
63
74
  },
64
75
  headerTitle: {
65
76
  fontFamily: AppFonts_1.AppFonts.interBold,
@@ -185,11 +196,12 @@ const getRawStyles = (colors) => ({
185
196
  width: 32,
186
197
  height: 32,
187
198
  borderRadius: 8,
188
- backgroundColor: `${colors.white}26`,
199
+ backgroundColor: `${colors.white}2B`,
189
200
  alignItems: 'center',
190
201
  justifyContent: 'center',
191
202
  borderWidth: 1,
192
- borderColor: `${colors.white}14`,
203
+ borderColor: `${colors.white}33`,
204
+ overflow: 'hidden',
193
205
  },
194
206
  fabWrapper: {
195
207
  position: 'absolute',
@@ -266,11 +278,16 @@ const getRawStyles = (colors) => ({
266
278
  backgroundColor: colors.primaryLight,
267
279
  borderWidth: 1.5,
268
280
  borderColor: colors.grayBorderSecondary,
269
- shadowColor: colors.black,
270
- shadowOffset: { width: 0, height: 1 },
271
- shadowOpacity: 0.04,
272
- shadowRadius: 2,
273
- elevation: 1,
281
+ ...(react_native_1.Platform.OS === 'ios'
282
+ ? {
283
+ shadowColor: colors.black,
284
+ shadowOffset: { width: 0, height: 1 },
285
+ shadowOpacity: 0.04,
286
+ shadowRadius: 2,
287
+ }
288
+ : {
289
+ elevation: 0,
290
+ }),
274
291
  },
275
292
  toolbarBtnActive: {
276
293
  borderColor: colors.purple,
@@ -447,18 +464,38 @@ const getRawStyles = (colors) => ({
447
464
  fontFamily: AppFonts_1.AppFonts.interBold,
448
465
  fontSize: 9.5,
449
466
  },
467
+ domainProgressSection: {
468
+ marginTop: 8,
469
+ gap: 4,
470
+ width: '100%',
471
+ },
450
472
  domainProgressTrack: {
451
473
  flexDirection: 'row',
452
- height: 2.5,
453
- borderRadius: 1.25,
474
+ height: 4,
475
+ borderRadius: 2,
454
476
  overflow: 'hidden',
455
- backgroundColor: 'rgba(148, 163, 184, 0.2)',
456
- marginTop: 6,
477
+ backgroundColor: '#E2E8F0',
457
478
  width: '100%',
458
479
  },
459
480
  domainProgressSegment: {
460
481
  height: '100%',
461
482
  },
483
+ domainProgressLabelsRow: {
484
+ flexDirection: 'row',
485
+ alignItems: 'center',
486
+ justifyContent: 'space-between',
487
+ paddingHorizontal: 2,
488
+ },
489
+ domainProgressRateText: {
490
+ fontFamily: AppFonts_1.AppFonts.interBold,
491
+ fontSize: 9.5,
492
+ color: colors.grayTextStrong,
493
+ },
494
+ domainProgressSummaryText: {
495
+ fontFamily: AppFonts_1.AppFonts.interMedium,
496
+ fontSize: 9,
497
+ color: colors.grayTextWeak,
498
+ },
462
499
  domainStatsGroup: {
463
500
  flexDirection: 'row',
464
501
  alignItems: 'center',
@@ -572,21 +609,29 @@ const getRawStyles = (colors) => ({
572
609
  fontSize: 10,
573
610
  },
574
611
  methodBadge: {
575
- paddingHorizontal: 6,
612
+ paddingHorizontal: 6.5,
576
613
  paddingVertical: 2.5,
577
- borderRadius: 6,
614
+ borderRadius: 5,
578
615
  alignItems: 'center',
579
616
  justifyContent: 'center',
580
- shadowColor: colors.black,
581
- shadowOffset: { width: 0, height: 1 },
582
- shadowOpacity: 0.08,
583
- shadowRadius: 2,
584
- elevation: 1,
617
+ borderWidth: 1,
618
+ borderColor: 'rgba(255, 255, 255, 0.3)',
619
+ ...(react_native_1.Platform.OS === 'ios'
620
+ ? {
621
+ shadowColor: colors.black,
622
+ shadowOffset: { width: 0, height: 1 },
623
+ shadowOpacity: 0.12,
624
+ shadowRadius: 2,
625
+ }
626
+ : {
627
+ elevation: 1,
628
+ }),
585
629
  },
586
630
  methodBadgeText: {
587
631
  fontFamily: AppFonts_1.AppFonts.interBold,
588
632
  fontSize: 9.5,
589
- letterSpacing: 0.4,
633
+ letterSpacing: 0.6,
634
+ color: colors.white,
590
635
  },
591
636
  cardHostText: {
592
637
  fontFamily: AppFonts_1.AppFonts.interMedium,
@@ -1,13 +1,12 @@
1
1
  import React, { useState } from 'react';
2
2
  import { Image, Platform, StyleSheet, View, } from 'react-native';
3
3
  import BrandSquareIcon from './BrandSquareIcon';
4
- import { AppColors } from '../styles/AppColors';
5
4
  export const AppHeaderLogo = ({ size = 46, customIcon, }) => {
6
5
  const [loadError, setLoadError] = useState(false);
7
- // 1. If customIcon is explicitly provided, render it directly
6
+ // 1. If customIcon is explicitly provided, render it directly edge-to-edge
8
7
  if (customIcon) {
9
8
  return (<View style={[logoStyles.container, { width: size, height: size }]}>
10
- <Image source={customIcon} style={{ width: size - 4, height: size - 4, borderRadius: 10 }} resizeMode="cover"/>
9
+ <Image source={customIcon} style={logoStyles.image} resizeMode="cover"/>
11
10
  </View>);
12
11
  }
13
12
  // 2. Dynamically query installed native app icon (AppIcon on iOS, ic_launcher on Android)
@@ -18,28 +17,26 @@ export const AppHeaderLogo = ({ size = 46, customIcon, }) => {
18
17
  default: { uri: 'AppIcon' },
19
18
  });
20
19
  return (<View style={[logoStyles.container, { width: size, height: size }]}>
21
- <Image source={nativeSource} style={{ width: size - 4, height: size - 4, borderRadius: 10 }} resizeMode="cover" onError={() => setLoadError(true)}/>
20
+ <Image source={nativeSource} style={logoStyles.image} resizeMode="cover" onError={() => setLoadError(true)}/>
22
21
  </View>);
23
22
  }
24
23
  // 3. Fallback: Inspector's Signature Owl Brand Logo
25
24
  return (<View style={[logoStyles.container, { width: size, height: size }]}>
26
- <BrandSquareIcon size={size - 4}/>
25
+ <BrandSquareIcon size={size}/>
27
26
  </View>);
28
27
  };
29
28
  const logoStyles = StyleSheet.create({
30
29
  container: {
30
+ borderRadius: 10,
31
+ overflow: 'hidden',
32
+ backgroundColor: 'transparent',
31
33
  alignItems: 'center',
32
34
  justifyContent: 'center',
33
- borderRadius: 12,
34
- backgroundColor: `${AppColors.white}24`,
35
- borderWidth: 1.5,
36
- borderColor: `${AppColors.white}4D`,
37
- overflow: 'hidden',
38
- shadowColor: AppColors.primaryBlack,
39
- shadowOffset: { width: 0, height: 2 },
40
- shadowOpacity: 0.15,
41
- shadowRadius: 4,
42
- elevation: 3,
35
+ },
36
+ image: {
37
+ width: '100%',
38
+ height: '100%',
39
+ borderRadius: 10,
43
40
  },
44
41
  });
45
42
  export default AppHeaderLogo;