@umituz/react-native-design-system 2.9.52 → 2.9.53

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@umituz/react-native-design-system",
3
- "version": "2.9.52",
3
+ "version": "2.9.53",
4
4
  "description": "Universal design system for React Native apps - Consolidated package with atoms, molecules, organisms, theme, typography, responsive, safe area, exception, infinite scroll, UUID, image, timezone, offline, onboarding, and loading utilities",
5
5
  "main": "./src/index.ts",
6
6
  "types": "./src/index.ts",
@@ -1,7 +1,6 @@
1
1
 
2
2
  import React, { useEffect, useState, useCallback } from "react";
3
- import { View, Image, StyleSheet } from "react-native";
4
- import { useSafeAreaInsets } from "../../../safe-area";
3
+ import { View, Image, StyleSheet, Platform, StatusBar } from "react-native";
5
4
  import { AtomicText, AtomicSpinner } from "../../../atoms";
6
5
  import { useAppDesignTokens } from "../../../theme";
7
6
  import type { SplashScreenProps, SplashColors } from "../types";
@@ -9,6 +8,16 @@ import { SPLASH_CONSTANTS } from "../constants";
9
8
 
10
9
  declare const __DEV__: boolean;
11
10
 
11
+ // Fixed safe area values for splash screen (before SafeAreaProvider initializes)
12
+ const FIXED_SAFE_AREA = {
13
+ top: Platform.select({
14
+ ios: StatusBar.currentHeight || 44,
15
+ android: StatusBar.currentHeight || 0,
16
+ default: 0,
17
+ }),
18
+ bottom: Platform.select({ ios: 34, default: 0 }),
19
+ };
20
+
12
21
  export const SplashScreen: React.FC<SplashScreenProps> = ({
13
22
  icon,
14
23
  appName,
@@ -20,7 +29,6 @@ export const SplashScreen: React.FC<SplashScreenProps> = ({
20
29
  onReady,
21
30
  style,
22
31
  }: SplashScreenProps) => {
23
- const insets = useSafeAreaInsets();
24
32
  const tokens = useAppDesignTokens();
25
33
  const [timedOut, setTimedOut] = useState(false);
26
34
 
@@ -69,8 +77,8 @@ export const SplashScreen: React.FC<SplashScreenProps> = ({
69
77
  const iconPlaceholderColor = colors.iconPlaceholder ?? `${colors.text}30`;
70
78
 
71
79
  const contentStyle = {
72
- paddingTop: insets.top + SPLASH_CONSTANTS.CONTENT_PADDING,
73
- paddingBottom: insets.bottom + SPLASH_CONSTANTS.CONTENT_PADDING,
80
+ paddingTop: FIXED_SAFE_AREA.top + SPLASH_CONSTANTS.CONTENT_PADDING,
81
+ paddingBottom: FIXED_SAFE_AREA.bottom + SPLASH_CONSTANTS.CONTENT_PADDING,
74
82
  };
75
83
 
76
84
  const content = (