react-native-inapp-inspector 2.2.8 → 2.3.0

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 (100) hide show
  1. package/android/src/main/java/com/inappinspector/NetworkInspectorModule.kt +22 -7
  2. package/dist/commonjs/components/AppHeaderLogo.js +45 -12
  3. package/dist/commonjs/components/BrandSquareIcon.js +92 -49
  4. package/dist/commonjs/components/EmptyState.d.ts +7 -2
  5. package/dist/commonjs/components/EmptyState.js +11 -5
  6. package/dist/commonjs/components/Inspector/AnalyticsTab.js +29 -18
  7. package/dist/commonjs/components/Inspector/ConsoleTab.js +6 -1
  8. package/dist/commonjs/components/Inspector/CrashDetail.js +43 -9
  9. package/dist/commonjs/components/Inspector/CrashTab.js +34 -3
  10. package/dist/commonjs/components/Inspector/DeviceInfoTab.js +80 -16
  11. package/dist/commonjs/components/Inspector/InspectorHeader.js +16 -3
  12. package/dist/commonjs/components/Inspector/NetworkDetail.js +3 -2
  13. package/dist/commonjs/components/Inspector/NetworkTab.js +103 -4
  14. package/dist/commonjs/components/Inspector/ReduxTab.js +19 -3
  15. package/dist/commonjs/components/Inspector/SettingsPanel.js +4 -4
  16. package/dist/commonjs/components/Inspector/StorageTab.js +19 -3
  17. package/dist/commonjs/components/JsonViewer.js +2 -0
  18. package/dist/commonjs/components/MetaAccordion.js +15 -3
  19. package/dist/commonjs/constants/version.d.ts +1 -1
  20. package/dist/commonjs/constants/version.js +1 -1
  21. package/dist/commonjs/customHooks/networkLogger.d.ts +3 -0
  22. package/dist/commonjs/customHooks/networkLogger.js +10 -1
  23. package/dist/commonjs/helpers/index.d.ts +6 -0
  24. package/dist/commonjs/helpers/index.js +196 -6
  25. package/dist/commonjs/helpers/searchQueryParser.js +62 -20
  26. package/dist/commonjs/i18n/index.d.ts +13 -0
  27. package/dist/commonjs/i18n/index.js +35 -2
  28. package/dist/commonjs/index.d.ts +3 -0
  29. package/dist/commonjs/index.js +80 -11
  30. package/dist/commonjs/native/NativeInspector.js +13 -0
  31. package/dist/commonjs/native/NativeNetworkInspector.d.ts +1 -1
  32. package/dist/commonjs/styles/AppColors.d.ts +4 -0
  33. package/dist/commonjs/styles/AppColors.js +11 -1
  34. package/dist/commonjs/styles/AppFonts.d.ts +11 -0
  35. package/dist/commonjs/styles/AppFonts.js +11 -1
  36. package/dist/commonjs/types/interfaces.d.ts +1 -0
  37. package/dist/esm/components/AppHeaderLogo.js +45 -12
  38. package/dist/esm/components/BrandSquareIcon.js +92 -49
  39. package/dist/esm/components/EmptyState.d.ts +7 -2
  40. package/dist/esm/components/EmptyState.js +11 -5
  41. package/dist/esm/components/Inspector/AnalyticsTab.js +30 -19
  42. package/dist/esm/components/Inspector/ConsoleTab.js +6 -1
  43. package/dist/esm/components/Inspector/CrashDetail.js +43 -9
  44. package/dist/esm/components/Inspector/CrashTab.js +34 -3
  45. package/dist/esm/components/Inspector/DeviceInfoTab.js +80 -16
  46. package/dist/esm/components/Inspector/InspectorHeader.js +17 -4
  47. package/dist/esm/components/Inspector/NetworkDetail.js +3 -2
  48. package/dist/esm/components/Inspector/NetworkTab.js +103 -4
  49. package/dist/esm/components/Inspector/ReduxTab.js +19 -3
  50. package/dist/esm/components/Inspector/SettingsPanel.js +4 -4
  51. package/dist/esm/components/Inspector/StorageTab.js +19 -3
  52. package/dist/esm/components/JsonViewer.js +2 -0
  53. package/dist/esm/components/MetaAccordion.js +15 -3
  54. package/dist/esm/constants/version.d.ts +1 -1
  55. package/dist/esm/constants/version.js +1 -1
  56. package/dist/esm/customHooks/networkLogger.d.ts +3 -0
  57. package/dist/esm/customHooks/networkLogger.js +8 -0
  58. package/dist/esm/helpers/index.d.ts +6 -0
  59. package/dist/esm/helpers/index.js +193 -5
  60. package/dist/esm/helpers/searchQueryParser.js +62 -20
  61. package/dist/esm/i18n/index.d.ts +13 -0
  62. package/dist/esm/i18n/index.js +33 -3
  63. package/dist/esm/index.d.ts +3 -0
  64. package/dist/esm/index.js +68 -12
  65. package/dist/esm/native/NativeInspector.js +13 -0
  66. package/dist/esm/native/NativeNetworkInspector.d.ts +1 -1
  67. package/dist/esm/styles/AppColors.d.ts +4 -0
  68. package/dist/esm/styles/AppColors.js +9 -0
  69. package/dist/esm/styles/AppFonts.d.ts +11 -0
  70. package/dist/esm/styles/AppFonts.js +9 -0
  71. package/dist/esm/types/interfaces.d.ts +1 -0
  72. package/ios/NetworkInspectorModule.mm +11 -1
  73. package/package.json +1 -1
  74. package/src/components/AppHeaderLogo.tsx +46 -12
  75. package/src/components/BrandSquareIcon.tsx +127 -78
  76. package/src/components/EmptyState.tsx +27 -5
  77. package/src/components/Inspector/AnalyticsTab.tsx +48 -27
  78. package/src/components/Inspector/ConsoleTab.tsx +10 -0
  79. package/src/components/Inspector/CrashDetail.tsx +65 -9
  80. package/src/components/Inspector/CrashTab.tsx +41 -3
  81. package/src/components/Inspector/DeviceInfoTab.tsx +87 -16
  82. package/src/components/Inspector/InspectorHeader.tsx +24 -4
  83. package/src/components/Inspector/NetworkDetail.tsx +4 -4
  84. package/src/components/Inspector/NetworkTab.tsx +129 -4
  85. package/src/components/Inspector/ReduxTab.tsx +26 -8
  86. package/src/components/Inspector/SettingsPanel.tsx +4 -4
  87. package/src/components/Inspector/StorageTab.tsx +21 -3
  88. package/src/components/JsonViewer.tsx +2 -0
  89. package/src/components/MetaAccordion.tsx +18 -3
  90. package/src/constants/version.ts +1 -1
  91. package/src/customHooks/networkLogger.ts +15 -0
  92. package/src/helpers/index.ts +213 -5
  93. package/src/helpers/searchQueryParser.ts +63 -20
  94. package/src/i18n/index.ts +38 -3
  95. package/src/index.tsx +89 -11
  96. package/src/native/NativeInspector.ts +13 -0
  97. package/src/native/NativeNetworkInspector.ts +1 -1
  98. package/src/styles/AppColors.ts +9 -0
  99. package/src/styles/AppFonts.ts +16 -0
  100. package/src/types/interfaces.ts +1 -0
package/dist/esm/index.js CHANGED
@@ -8,12 +8,12 @@ import ErrorBoundary from './components/ErrorBoundary';
8
8
  import MainScreen from './components/Inspector/MainScreen';
9
9
  import { InspectorContext, animateNextLayout, } from './components/Inspector/InspectorContext';
10
10
  // Helpers
11
- import { formatDisplayUrl, getNavigationInfo, deduplicateLogs, getDomainColor, getEventCategory, matchNetworkLogQuery, setupMemoryWarningHandler, } from './helpers';
11
+ import { formatDisplayUrl, getNavigationInfo, getLogPageName, deduplicateLogs, getDomainColor, getEventCategory, matchNetworkLogQuery, setupMemoryWarningHandler, } from './helpers';
12
12
  // #5 — settings persistence
13
13
  import { loadSettings, saveSettings, setCustomStorage, clearPersistedSettings, calculateRamBasedLimits, } from './helpers/settingsStore';
14
14
  import { getNativeSystemMetrics, pushNativeLogRecord, fetchNativeCachedPage, } from './native/NativeInspector';
15
15
  // Network
16
- import { setupNetworkLogger, clearNetworkLogs, subscribeNetworkLogs, setNetworkModuleEnabled, setMaxNetworkLogsLimit, } from './customHooks/networkLogger';
16
+ import { setupNetworkLogger, clearNetworkLogs, subscribeNetworkLogs, setNetworkModuleEnabled, setMaxNetworkLogsLimit, setRouteInfoProvider, } from './customHooks/networkLogger';
17
17
  // Console
18
18
  import { setupConsoleLogger, clearConsoleLogs, subscribeConsoleLogs, setConsoleModuleEnabled, } from './customHooks/consoleLogger';
19
19
  import { IGNORED_LOG_PREFIXES } from './customHooks/logFilters';
@@ -183,8 +183,8 @@ const NetworkInspector = ({ enabled = true, isEnabled = true, storage, navigatio
183
183
  bundle: false,
184
184
  performance: false,
185
185
  crash: false,
186
- device: true,
187
- storage: true,
186
+ device: false,
187
+ storage: false,
188
188
  });
189
189
  const [maxNetworkLogs, setMaxNetworkLogs] = useState(100);
190
190
  const [maxAnalyticsEventsLimit, setMaxAnalyticsEventsLimit] = useState(75);
@@ -239,8 +239,8 @@ const NetworkInspector = ({ enabled = true, isEnabled = true, storage, navigatio
239
239
  bundle: false,
240
240
  performance: false,
241
241
  crash: false,
242
- device: true,
243
- storage: true,
242
+ device: false,
243
+ storage: false,
244
244
  });
245
245
  setDefaultTab('apis');
246
246
  setIsAutoRamLimitEnabled(true);
@@ -314,6 +314,8 @@ const NetworkInspector = ({ enabled = true, isEnabled = true, storage, navigatio
314
314
  bundle: false,
315
315
  performance: false,
316
316
  crash: false,
317
+ device: false,
318
+ storage: false,
317
319
  },
318
320
  ...(saved.tabVisibility || {}),
319
321
  apis: true,
@@ -539,12 +541,21 @@ const NetworkInspector = ({ enabled = true, isEnabled = true, storage, navigatio
539
541
  const navigationContext = React.useContext(NavigationContext);
540
542
  const hasNavigationContext = navigationContext !== undefined;
541
543
  const currentRouteRef = useRef({
542
- path: 'Navigators',
544
+ path: '',
543
545
  params: null,
544
546
  });
547
+ useEffect(() => {
548
+ setRouteInfoProvider(() => currentRouteRef.current);
549
+ return () => {
550
+ setRouteInfoProvider(null);
551
+ };
552
+ }, []);
545
553
  useEffect(() => {
546
554
  if (navState) {
547
- currentRouteRef.current = getNavigationInfo(navState);
555
+ const info = getNavigationInfo(navState);
556
+ if (info?.path) {
557
+ currentRouteRef.current = info;
558
+ }
548
559
  }
549
560
  }, [navState]);
550
561
  useEffect(() => {
@@ -553,9 +564,22 @@ const NetworkInspector = ({ enabled = true, isEnabled = true, storage, navigatio
553
564
  const updateState = () => {
554
565
  try {
555
566
  if (typeof navigationRef.isReady === 'function' && navigationRef.isReady()) {
567
+ const currentRoute = typeof navigationRef.getCurrentRoute === 'function'
568
+ ? navigationRef.getCurrentRoute()
569
+ : null;
570
+ if (currentRoute?.name) {
571
+ currentRouteRef.current = {
572
+ path: currentRoute.name,
573
+ params: currentRoute.params || null,
574
+ };
575
+ }
556
576
  const state = navigationRef.getRootState();
557
577
  if (state) {
558
578
  setNavState(state);
579
+ const routeInfo = getNavigationInfo(state);
580
+ if (routeInfo?.path) {
581
+ currentRouteRef.current = routeInfo;
582
+ }
559
583
  }
560
584
  }
561
585
  }
@@ -867,7 +891,9 @@ const NetworkInspector = ({ enabled = true, isEnabled = true, storage, navigatio
867
891
  if (freshIds.size > 0) {
868
892
  freshIds.forEach(id => {
869
893
  if (!logRouteMapRef.current.has(id)) {
870
- logRouteMapRef.current.set(id, currentRouteRef.current);
894
+ const matchedLog = deduped.find(l => l.id === id);
895
+ const resolvedRoute = matchedLog?.routeInfo || currentRouteRef.current;
896
+ logRouteMapRef.current.set(id, resolvedRoute);
871
897
  }
872
898
  });
873
899
  setNewLogIds(freshIds);
@@ -880,6 +906,12 @@ const NetworkInspector = ({ enabled = true, isEnabled = true, storage, navigatio
880
906
  const deduped = deduplicateLogs(raw);
881
907
  const incoming = new Set(deduped.map(l => l.id));
882
908
  prevLogIdsRef.current = incoming;
909
+ deduped.forEach(l => {
910
+ if (!logRouteMapRef.current.has(l.id)) {
911
+ const resolvedRoute = l?.routeInfo || currentRouteRef.current;
912
+ logRouteMapRef.current.set(l.id, resolvedRoute);
913
+ }
914
+ });
883
915
  setLogs(deduped);
884
916
  }
885
917
  else {
@@ -1151,8 +1183,8 @@ const NetworkInspector = ({ enabled = true, isEnabled = true, storage, navigatio
1151
1183
  const groups = [];
1152
1184
  for (let i = 0; i < filteredLogs.length; i++) {
1153
1185
  const log = filteredLogs[i];
1154
- const routeInfo = logRouteMapRef.current.get(log.id);
1155
- const pageName = routeInfo?.path || 'Navigators';
1186
+ const routeInfo = logRouteMapRef.current.get(log.id) || log?.routeInfo;
1187
+ const pageName = getLogPageName(log, routeInfo);
1156
1188
  if (groups.length === 0 ||
1157
1189
  groups[groups.length - 1].pageName !== pageName) {
1158
1190
  groups.push({ pageName, color: getDomainColor(pageName), logs: [] });
@@ -1405,7 +1437,28 @@ const NetworkInspector = ({ enabled = true, isEnabled = true, storage, navigatio
1405
1437
  log.type || '',
1406
1438
  log.sourceMethod || '',
1407
1439
  ].join(' ').toLowerCase();
1408
- return queryTokens.every(token => searchTarget.includes(token));
1440
+ return queryTokens.every(token => {
1441
+ if (token.startsWith('level:') || token.startsWith('is:') || token.startsWith('type:')) {
1442
+ const flag = token.replace(/^(level:|is:|type:)/, '').trim();
1443
+ if (flag === 'error' || flag === 'err')
1444
+ return log.type === 'error';
1445
+ if (flag === 'warn' || flag === 'warning')
1446
+ return log.type === 'warn';
1447
+ if (flag === 'info')
1448
+ return log.type === 'info';
1449
+ if (flag === 'log')
1450
+ return log.sourceMethod === 'log';
1451
+ if (flag === 'analytics')
1452
+ return (log.message || '').toLowerCase().includes('[analytics');
1453
+ }
1454
+ if (token === 'error' || token === 'err') {
1455
+ return log.type === 'error' || searchTarget.includes(token);
1456
+ }
1457
+ if (token === 'warn' || token === 'warning') {
1458
+ return log.type === 'warn' || searchTarget.includes(token);
1459
+ }
1460
+ return searchTarget.includes(token);
1461
+ });
1409
1462
  });
1410
1463
  }
1411
1464
  // #7 — apply sort order (newest/oldest first)
@@ -1824,3 +1877,6 @@ export { setMaxPerformanceEventsLimit, getMaxPerformanceEventsLimit, prunePerfor
1824
1877
  export { BrandSquareIcon, BrandCircleIcon, } from './components/NetworkIcons';
1825
1878
  export { connectAsyncStorage, connectMMKV, isAsyncStorageConnected, isMMKVConnected, getRegisteredMMKVInstanceIds, fetchStorageEntries, setStorageEntry, removeStorageEntry, clearStorageDriver, subscribeToStorageChanges, } from './customHooks/storageInspector';
1826
1879
  export { ActiveTab, Method, StatusFilter, SortOrder, LocalFilter, ModalAnimationType, SettingsPage, SettingsSubTab, LogFilter, ConsoleLogType, AnalyticsEventSource, GAEventCategory, StackFrameType, DiffResultType, BundleSubTab, PerformanceSubTab, CrashType, CrashExportFormat, CrashDetailSubTab, CrashFilterType, BreadcrumbType, } from './types';
1880
+ export { AppFonts, setAppFonts, } from './styles/AppFonts';
1881
+ export { AppColors, setAppColors, getThemeColors, updateAppColorsTheme, } from './styles/AppColors';
1882
+ export { t, i18n, useTranslation, setLanguage, addTranslations, setTranslations, I18nextProvider, } from './i18n';
@@ -138,6 +138,19 @@ export const subscribeNativeFloatingButtonPress = (callback) => {
138
138
  }
139
139
  catch (e) { }
140
140
  }
141
+ // Active Bridgeless / TurboModule tap detection
142
+ const interval = setInterval(async () => {
143
+ if (NativeModule && NativeModule.checkFloatingButtonPress) {
144
+ try {
145
+ const pressed = await NativeModule.checkFloatingButtonPress();
146
+ if (pressed) {
147
+ callback();
148
+ }
149
+ }
150
+ catch (e) { }
151
+ }
152
+ }, 180);
153
+ cleanups.push(() => clearInterval(interval));
141
154
  return () => {
142
155
  cleanups.forEach(fn => {
143
156
  try {
@@ -14,7 +14,7 @@ export interface Spec extends TurboModule {
14
14
  triggerHaptic(style: string): Promise<boolean>;
15
15
  getNativeSystemMetrics(): Promise<Object>;
16
16
  pushNativeLogRecord(pageKey: string, jsonPayload: string): Promise<boolean>;
17
- getNativeCachedPage(pageKey: string, offset: number, limit: number, query: string): Promise<string>;
17
+ checkFloatingButtonPress(): Promise<boolean>;
18
18
  addListener(eventName: string): void;
19
19
  removeListeners(count: number): void;
20
20
  }
@@ -344,4 +344,8 @@ export declare const getThemeColors: (isDark: boolean) => {
344
344
  };
345
345
  export declare const AppColors: typeof LightColors;
346
346
  export declare const updateAppColorsTheme: (isDark: boolean) => void;
347
+ /**
348
+ * Configure or override specific color tokens used throughout the inspector.
349
+ */
350
+ export declare const setAppColors: (customColors: Partial<typeof LightColors>) => void;
347
351
  export default AppColors;
@@ -384,4 +384,13 @@ Object.assign(AppColors, LightColors);
384
384
  export const updateAppColorsTheme = (isDark) => {
385
385
  Object.assign(AppColors, getThemeColors(isDark));
386
386
  };
387
+ /**
388
+ * Configure or override specific color tokens used throughout the inspector.
389
+ */
390
+ export const setAppColors = (customColors) => {
391
+ if (!customColors || typeof customColors !== 'object')
392
+ return;
393
+ Object.assign(AppColors, customColors);
394
+ Object.assign(LightColors, customColors);
395
+ };
387
396
  export default AppColors;
@@ -1,7 +1,18 @@
1
+ export interface AppFontConfig {
2
+ interRegular?: string;
3
+ interMedium?: string;
4
+ interBold?: string;
5
+ Sfprotext?: string;
6
+ }
1
7
  export declare const AppFonts: {
2
8
  interRegular: string;
3
9
  interMedium: string;
4
10
  interBold: string;
5
11
  Sfprotext: string;
6
12
  };
13
+ /**
14
+ * Configure or override font families used across all inspector screens.
15
+ * Useful when integrating into apps with custom font setups or system fonts.
16
+ */
17
+ export declare const setAppFonts: (customFonts: Partial<typeof AppFonts>) => void;
7
18
  export default AppFonts;
@@ -4,4 +4,13 @@ export const AppFonts = {
4
4
  interBold: 'Inter-Bold',
5
5
  Sfprotext: 'Inter-Regular',
6
6
  };
7
+ /**
8
+ * Configure or override font families used across all inspector screens.
9
+ * Useful when integrating into apps with custom font setups or system fonts.
10
+ */
11
+ export const setAppFonts = (customFonts) => {
12
+ if (!customFonts || typeof customFonts !== 'object')
13
+ return;
14
+ Object.assign(AppFonts, customFonts);
15
+ };
7
16
  export default AppFonts;
@@ -106,6 +106,7 @@ export interface NetworkLog {
106
106
  /** Client identifier: axios, fetch, xhr, apollo, etc. */
107
107
  client?: 'axios' | 'fetch' | 'xhr' | 'apollo' | 'graphql' | string;
108
108
  caller?: string;
109
+ routeInfo?: RouteInfo;
109
110
  }
110
111
  export interface RouteInfo {
111
112
  path: string;
@@ -5,6 +5,7 @@
5
5
 
6
6
  static NetworkInspectorModule *sharedInstance = nil;
7
7
  static NSUncaughtExceptionHandler *previousUncaughtExceptionHandler = NULL;
8
+ static BOOL g_floatingButtonPressed = NO;
8
9
 
9
10
  @interface InAppInspectorFloatingView : UIView
10
11
  @property (nonatomic, copy) void (^onTapBlock)(void);
@@ -410,6 +411,7 @@ RCT_EXPORT_MODULE(NetworkInspectorModule);
410
411
 
411
412
  - (void)safeSendEvent:(NSString *)eventName body:(id)body {
412
413
  if (!hasListeners) return;
414
+ if (self.bridge == nil) return;
413
415
  @try {
414
416
  [self sendEventWithName:eventName body:body];
415
417
  } @catch (NSException *ex) {
@@ -598,8 +600,9 @@ RCT_EXPORT_METHOD(showFloatingButton:(NSDictionary *)options
598
600
 
599
601
  __weak NetworkInspectorModule *weakSelf = self;
600
602
  floatingButtonView.onTapBlock = ^{
603
+ g_floatingButtonPressed = YES;
601
604
  NetworkInspectorModule *strongSelf = weakSelf ?: sharedInstance;
602
- if (strongSelf) {
605
+ if (strongSelf && strongSelf.bridge != nil) {
603
606
  [strongSelf safeSendEvent:@"onFloatingButtonPress" body:@{}];
604
607
  }
605
608
  };
@@ -674,6 +677,13 @@ RCT_EXPORT_METHOD(setFloatingButtonPosition:(double)x y:(double)y
674
677
  });
675
678
  }
676
679
 
680
+ RCT_EXPORT_METHOD(checkFloatingButtonPress:(RCTPromiseResolveBlock)resolve
681
+ reject:(RCTPromiseRejectBlock)reject) {
682
+ BOOL pressed = g_floatingButtonPressed;
683
+ g_floatingButtonPressed = NO;
684
+ resolve(@(pressed));
685
+ }
686
+
677
687
  RCT_EXPORT_METHOD(startFpsMonitoring:(RCTPromiseResolveBlock)resolve
678
688
  reject:(RCTPromiseRejectBlock)reject) {
679
689
  dispatch_async(dispatch_get_main_queue(), ^{
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-inapp-inspector",
3
- "version": "2.2.8",
3
+ "version": "2.3.0",
4
4
  "description": "The zero-config, all-in-one in-app debugger for React Native & Expo. Inspect Network (fetch/axios), Console logs, Stack Traces, Redux State, Firebase Analytics, and JS Bundle size directly on device.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -34,8 +34,12 @@ export const AppHeaderLogo: React.FC<AppHeaderLogoProps> = ({
34
34
  return (
35
35
  <View
36
36
  style={[
37
- logoStyles.container,
38
- {width: size, height: size, padding: 0, borderRadius: Math.round(size * 0.28)},
37
+ logoStyles.svgContainer,
38
+ {
39
+ width: size,
40
+ height: size,
41
+ borderRadius: Math.round(size * 0.23),
42
+ },
39
43
  ]}>
40
44
  {clonedIcon}
41
45
  </View>
@@ -44,8 +48,12 @@ export const AppHeaderLogo: React.FC<AppHeaderLogoProps> = ({
44
48
  return (
45
49
  <View
46
50
  style={[
47
- logoStyles.container,
48
- {width: size, height: size, borderRadius: Math.round(size * 0.28)},
51
+ logoStyles.imageContainer,
52
+ {
53
+ width: size,
54
+ height: size,
55
+ borderRadius: Math.round(size * 0.23),
56
+ },
49
57
  ]}>
50
58
  <Image
51
59
  source={customIcon as ImageSourcePropType}
@@ -65,7 +73,15 @@ export const AppHeaderLogo: React.FC<AppHeaderLogoProps> = ({
65
73
  });
66
74
 
67
75
  return (
68
- <View style={[logoStyles.container, {width: size, height: size}]}>
76
+ <View
77
+ style={[
78
+ logoStyles.imageContainer,
79
+ {
80
+ width: size,
81
+ height: size,
82
+ borderRadius: Math.round(size * 0.23),
83
+ },
84
+ ]}>
69
85
  <Image
70
86
  source={nativeSource}
71
87
  style={logoStyles.image}
@@ -80,8 +96,12 @@ export const AppHeaderLogo: React.FC<AppHeaderLogoProps> = ({
80
96
  return (
81
97
  <View
82
98
  style={[
83
- logoStyles.container,
84
- {width: size, height: size, padding: 0, borderRadius: Math.round(size * 0.28)},
99
+ logoStyles.svgContainer,
100
+ {
101
+ width: size,
102
+ height: size,
103
+ borderRadius: Math.round(size * 0.23),
104
+ },
85
105
  ]}>
86
106
  <BrandSquareIcon size={size} />
87
107
  </View>
@@ -89,20 +109,34 @@ export const AppHeaderLogo: React.FC<AppHeaderLogoProps> = ({
89
109
  };
90
110
 
91
111
  const logoStyles = StyleSheet.create({
92
- container: {
93
- borderRadius: 10,
112
+ svgContainer: {
113
+ overflow: 'hidden',
114
+ alignItems: 'center',
115
+ justifyContent: 'center',
116
+ shadowColor: '#000',
117
+ shadowOffset: {width: 0, height: 2},
118
+ shadowOpacity: 0.25,
119
+ shadowRadius: 3,
120
+ elevation: 3,
121
+ },
122
+ imageContainer: {
94
123
  overflow: 'hidden',
95
124
  backgroundColor: 'rgba(255, 255, 255, 0.15)',
96
125
  borderWidth: 1,
97
- borderColor: 'rgba(255, 255, 255, 0.28)',
98
- padding: 2.5,
126
+ borderColor: 'rgba(255, 255, 255, 0.35)',
127
+ padding: 2,
99
128
  alignItems: 'center',
100
129
  justifyContent: 'center',
130
+ shadowColor: '#000',
131
+ shadowOffset: {width: 0, height: 2},
132
+ shadowOpacity: 0.25,
133
+ shadowRadius: 3,
134
+ elevation: 3,
101
135
  },
102
136
  image: {
103
137
  width: '100%',
104
138
  height: '100%',
105
- borderRadius: 7.5,
139
+ borderRadius: 8,
106
140
  },
107
141
  });
108
142