expo-template-default 57.0.0 → 57.0.1

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/app.json CHANGED
@@ -29,10 +29,8 @@
29
29
  "expo-splash-screen",
30
30
  {
31
31
  "backgroundColor": "#208AEF",
32
- "android": {
33
- "image": "./assets/images/splash-icon.png",
34
- "imageWidth": 76
35
- }
32
+ "image": "./assets/images/splash-icon.png",
33
+ "imageWidth": 76
36
34
  }
37
35
  ]
38
36
  ],
package/package.json CHANGED
@@ -2,17 +2,17 @@
2
2
  "name": "expo-template-default",
3
3
  "license": "0BSD",
4
4
  "main": "expo-router/entry",
5
- "version": "57.0.0",
5
+ "version": "57.0.1",
6
6
  "dependencies": {
7
- "@expo/ui": "~57.0.0",
8
- "expo": "~57.0.0-preview.0",
9
- "expo-constants": "~57.0.0",
7
+ "@expo/ui": "~57.0.1",
8
+ "expo": "~57.0.0-preview.1",
9
+ "expo-constants": "~57.0.1",
10
10
  "expo-device": "~57.0.0",
11
11
  "expo-font": "~57.0.0",
12
12
  "expo-glass-effect": "~57.0.0",
13
13
  "expo-image": "~57.0.0",
14
14
  "expo-linking": "~57.0.0",
15
- "expo-router": "~57.0.0",
15
+ "expo-router": "~57.0.1",
16
16
  "expo-splash-screen": "~57.0.0",
17
17
  "expo-status-bar": "~57.0.0",
18
18
  "expo-symbols": "~57.0.0",
@@ -1,9 +1,12 @@
1
1
  import { DarkTheme, DefaultTheme, ThemeProvider } from 'expo-router';
2
+ import * as SplashScreen from 'expo-splash-screen';
2
3
  import { useColorScheme } from 'react-native';
3
4
 
4
5
  import { AnimatedSplashOverlay } from '@/components/animated-icon';
5
6
  import AppTabs from '@/components/app-tabs';
6
7
 
8
+ SplashScreen.preventAutoHideAsync();
9
+
7
10
  export default function TabLayout() {
8
11
  const colorScheme = useColorScheme();
9
12
  return (
@@ -1,4 +1,5 @@
1
1
  import { Image } from 'expo-image';
2
+ import * as SplashScreen from 'expo-splash-screen';
2
3
  import { useState } from 'react';
3
4
  import { Dimensions, StyleSheet, View } from 'react-native';
4
5
  import Animated, { Easing, Keyframe } from 'react-native-reanimated';
@@ -8,13 +9,14 @@ const INITIAL_SCALE_FACTOR = Dimensions.get('screen').height / 90;
8
9
  const DURATION = 600;
9
10
 
10
11
  export function AnimatedSplashOverlay() {
12
+ const [animate, setAnimate] = useState(false);
11
13
  const [visible, setVisible] = useState(true);
12
14
 
13
15
  if (!visible) return null;
14
16
 
15
17
  const splashKeyframe = new Keyframe({
16
18
  0: {
17
- transform: [{ scale: INITIAL_SCALE_FACTOR }],
19
+ transform: [{ scale: 1 }],
18
20
  opacity: 1,
19
21
  },
20
22
  20: {
@@ -31,7 +33,9 @@ export function AnimatedSplashOverlay() {
31
33
  },
32
34
  });
33
35
 
34
- return (
36
+ const image = <Image style={styles.image} source={require('@/assets/images/expo-logo.png')} />;
37
+
38
+ return animate ? (
35
39
  <Animated.View
36
40
  entering={splashKeyframe.duration(DURATION).withCallback((finished) => {
37
41
  'worklet';
@@ -39,8 +43,19 @@ export function AnimatedSplashOverlay() {
39
43
  scheduleOnRN(setVisible, false);
40
44
  }
41
45
  })}
42
- style={styles.backgroundSolidColor}
43
- />
46
+ style={styles.splashOverlay}>
47
+ {image}
48
+ </Animated.View>
49
+ ) : (
50
+ <View
51
+ onLayout={() => {
52
+ SplashScreen.hideAsync().finally(() => {
53
+ setAnimate(true);
54
+ });
55
+ }}
56
+ style={styles.splashOverlay}>
57
+ {image}
58
+ </View>
44
59
  );
45
60
  }
46
61
 
@@ -113,7 +128,6 @@ const styles = StyleSheet.create({
113
128
  zIndex: 100,
114
129
  },
115
130
  image: {
116
- position: 'absolute',
117
131
  width: 76,
118
132
  height: 71,
119
133
  },
@@ -124,9 +138,11 @@ const styles = StyleSheet.create({
124
138
  height: 128,
125
139
  position: 'absolute',
126
140
  },
127
- backgroundSolidColor: {
141
+ splashOverlay: {
128
142
  ...StyleSheet.absoluteFill,
129
143
  backgroundColor: '#208AEF',
144
+ alignItems: 'center',
145
+ justifyContent: 'center',
130
146
  zIndex: 1000,
131
147
  },
132
148
  });