expo-template-default 56.0.26 → 56.0.28
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 +2 -4
- package/package.json +7 -7
- package/src/app/_layout.tsx +3 -0
- package/src/components/animated-icon.tsx +22 -6
package/app.json
CHANGED
package/package.json
CHANGED
|
@@ -2,18 +2,18 @@
|
|
|
2
2
|
"name": "expo-template-default",
|
|
3
3
|
"license": "0BSD",
|
|
4
4
|
"main": "expo-router/entry",
|
|
5
|
-
"version": "56.0.
|
|
5
|
+
"version": "56.0.28",
|
|
6
6
|
"dependencies": {
|
|
7
|
-
"@expo/ui": "~56.0.
|
|
8
|
-
"expo": "~56.0.
|
|
9
|
-
"expo-constants": "~56.0.
|
|
7
|
+
"@expo/ui": "~56.0.20",
|
|
8
|
+
"expo": "~56.0.14",
|
|
9
|
+
"expo-constants": "~56.0.20",
|
|
10
10
|
"expo-device": "~56.0.4",
|
|
11
11
|
"expo-font": "~56.0.7",
|
|
12
12
|
"expo-glass-effect": "~56.0.4",
|
|
13
13
|
"expo-image": "~56.0.11",
|
|
14
|
-
"expo-linking": "~56.0.
|
|
15
|
-
"expo-router": "~56.2.
|
|
16
|
-
"expo-splash-screen": "~56.0.
|
|
14
|
+
"expo-linking": "~56.0.15",
|
|
15
|
+
"expo-router": "~56.2.13",
|
|
16
|
+
"expo-splash-screen": "~56.0.12",
|
|
17
17
|
"expo-status-bar": "~56.0.4",
|
|
18
18
|
"expo-symbols": "~56.0.6",
|
|
19
19
|
"expo-system-ui": "~56.0.5",
|
package/src/app/_layout.tsx
CHANGED
|
@@ -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:
|
|
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
|
-
|
|
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.
|
|
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
|
-
|
|
141
|
+
splashOverlay: {
|
|
128
142
|
...StyleSheet.absoluteFill,
|
|
129
143
|
backgroundColor: '#208AEF',
|
|
144
|
+
alignItems: 'center',
|
|
145
|
+
justifyContent: 'center',
|
|
130
146
|
zIndex: 1000,
|
|
131
147
|
},
|
|
132
148
|
});
|