create-wizze-app 0.1.2 → 0.1.4
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/README.md +18 -1
- package/dist/index.js +139 -47
- package/package.json +3 -2
- package/templates/expo-default-sdk55/.claude/settings.json +5 -0
- package/templates/expo-default-sdk55/.vscode/extensions.json +1 -0
- package/templates/expo-default-sdk55/.vscode/settings.json +7 -0
- package/templates/expo-default-sdk55/AGENTS.md +3 -0
- package/templates/expo-default-sdk55/CLAUDE.md +1 -0
- package/templates/expo-default-sdk55/README.md +56 -0
- package/templates/expo-default-sdk55/app.json +44 -0
- package/templates/expo-default-sdk55/assets/expo.icon/Assets/expo-symbol 2.svg +3 -0
- package/templates/expo-default-sdk55/assets/expo.icon/Assets/grid.png +0 -0
- package/templates/expo-default-sdk55/assets/expo.icon/icon.json +40 -0
- package/templates/expo-default-sdk55/assets/images/android-icon-background.png +0 -0
- package/templates/expo-default-sdk55/assets/images/android-icon-foreground.png +0 -0
- package/templates/expo-default-sdk55/assets/images/android-icon-monochrome.png +0 -0
- package/templates/expo-default-sdk55/assets/images/expo-badge-white.png +0 -0
- package/templates/expo-default-sdk55/assets/images/expo-badge.png +0 -0
- package/templates/expo-default-sdk55/assets/images/expo-logo.png +0 -0
- package/templates/expo-default-sdk55/assets/images/favicon.png +0 -0
- package/templates/expo-default-sdk55/assets/images/icon.png +0 -0
- package/templates/expo-default-sdk55/assets/images/logo-glow.png +0 -0
- package/templates/expo-default-sdk55/assets/images/react-logo.png +0 -0
- package/templates/expo-default-sdk55/assets/images/react-logo@2x.png +0 -0
- package/templates/expo-default-sdk55/assets/images/react-logo@3x.png +0 -0
- package/templates/expo-default-sdk55/assets/images/splash-icon.png +0 -0
- package/templates/expo-default-sdk55/assets/images/tabIcons/explore.png +0 -0
- package/templates/expo-default-sdk55/assets/images/tabIcons/explore@2x.png +0 -0
- package/templates/expo-default-sdk55/assets/images/tabIcons/explore@3x.png +0 -0
- package/templates/expo-default-sdk55/assets/images/tabIcons/home.png +0 -0
- package/templates/expo-default-sdk55/assets/images/tabIcons/home@2x.png +0 -0
- package/templates/expo-default-sdk55/assets/images/tabIcons/home@3x.png +0 -0
- package/templates/expo-default-sdk55/assets/images/tutorial-web.png +0 -0
- package/templates/expo-default-sdk55/package.json +45 -0
- package/templates/expo-default-sdk55/scripts/reset-project.js +114 -0
- package/templates/expo-default-sdk55/src/app/_layout.tsx +16 -0
- package/templates/expo-default-sdk55/src/app/explore.tsx +181 -0
- package/templates/expo-default-sdk55/src/app/index.tsx +98 -0
- package/templates/expo-default-sdk55/src/components/animated-icon.module.css +6 -0
- package/templates/expo-default-sdk55/src/components/animated-icon.tsx +132 -0
- package/templates/expo-default-sdk55/src/components/animated-icon.web.tsx +108 -0
- package/templates/expo-default-sdk55/src/components/app-tabs.tsx +33 -0
- package/templates/expo-default-sdk55/src/components/app-tabs.web.tsx +116 -0
- package/templates/expo-default-sdk55/src/components/external-link.tsx +25 -0
- package/templates/expo-default-sdk55/src/components/hint-row.tsx +35 -0
- package/templates/expo-default-sdk55/src/components/themed-text.tsx +73 -0
- package/templates/expo-default-sdk55/src/components/themed-view.tsx +16 -0
- package/templates/expo-default-sdk55/src/components/ui/collapsible.tsx +65 -0
- package/templates/expo-default-sdk55/src/components/web-badge.tsx +44 -0
- package/templates/expo-default-sdk55/src/constants/theme.ts +65 -0
- package/templates/expo-default-sdk55/src/global.css +9 -0
- package/templates/expo-default-sdk55/src/hooks/use-color-scheme.ts +1 -0
- package/templates/expo-default-sdk55/src/hooks/use-color-scheme.web.ts +21 -0
- package/templates/expo-default-sdk55/src/hooks/use-theme.ts +14 -0
- package/templates/expo-default-sdk55/tsconfig.json +20 -0
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { DarkTheme, DefaultTheme, ThemeProvider } from '@react-navigation/native';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { useColorScheme } from 'react-native';
|
|
4
|
+
|
|
5
|
+
import { AnimatedSplashOverlay } from '@/components/animated-icon';
|
|
6
|
+
import AppTabs from '@/components/app-tabs';
|
|
7
|
+
|
|
8
|
+
export default function TabLayout() {
|
|
9
|
+
const colorScheme = useColorScheme();
|
|
10
|
+
return (
|
|
11
|
+
<ThemeProvider value={colorScheme === 'dark' ? DarkTheme : DefaultTheme}>
|
|
12
|
+
<AnimatedSplashOverlay />
|
|
13
|
+
<AppTabs />
|
|
14
|
+
</ThemeProvider>
|
|
15
|
+
);
|
|
16
|
+
}
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
import { Image } from 'expo-image';
|
|
2
|
+
import { SymbolView } from 'expo-symbols';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { Platform, Pressable, ScrollView, StyleSheet } from 'react-native';
|
|
5
|
+
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
6
|
+
|
|
7
|
+
import { ExternalLink } from '@/components/external-link';
|
|
8
|
+
import { ThemedText } from '@/components/themed-text';
|
|
9
|
+
import { ThemedView } from '@/components/themed-view';
|
|
10
|
+
import { Collapsible } from '@/components/ui/collapsible';
|
|
11
|
+
import { WebBadge } from '@/components/web-badge';
|
|
12
|
+
import { BottomTabInset, MaxContentWidth, Spacing } from '@/constants/theme';
|
|
13
|
+
import { useTheme } from '@/hooks/use-theme';
|
|
14
|
+
|
|
15
|
+
export default function TabTwoScreen() {
|
|
16
|
+
const safeAreaInsets = useSafeAreaInsets();
|
|
17
|
+
const insets = {
|
|
18
|
+
...safeAreaInsets,
|
|
19
|
+
bottom: safeAreaInsets.bottom + BottomTabInset + Spacing.three,
|
|
20
|
+
};
|
|
21
|
+
const theme = useTheme();
|
|
22
|
+
|
|
23
|
+
const contentPlatformStyle = Platform.select({
|
|
24
|
+
android: {
|
|
25
|
+
paddingTop: insets.top,
|
|
26
|
+
paddingLeft: insets.left,
|
|
27
|
+
paddingRight: insets.right,
|
|
28
|
+
paddingBottom: insets.bottom,
|
|
29
|
+
},
|
|
30
|
+
web: {
|
|
31
|
+
paddingTop: Spacing.six,
|
|
32
|
+
paddingBottom: Spacing.four,
|
|
33
|
+
},
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
return (
|
|
37
|
+
<ScrollView
|
|
38
|
+
style={[styles.scrollView, { backgroundColor: theme.background }]}
|
|
39
|
+
contentInset={insets}
|
|
40
|
+
contentContainerStyle={[styles.contentContainer, contentPlatformStyle]}>
|
|
41
|
+
<ThemedView style={styles.container}>
|
|
42
|
+
<ThemedView style={styles.titleContainer}>
|
|
43
|
+
<ThemedText type="subtitle">Explore</ThemedText>
|
|
44
|
+
<ThemedText style={styles.centerText} themeColor="textSecondary">
|
|
45
|
+
This starter app includes example{'\n'}code to help you get started.
|
|
46
|
+
</ThemedText>
|
|
47
|
+
|
|
48
|
+
<ExternalLink href="https://docs.expo.dev" asChild>
|
|
49
|
+
<Pressable style={({ pressed }) => pressed && styles.pressed}>
|
|
50
|
+
<ThemedView type="backgroundElement" style={styles.linkButton}>
|
|
51
|
+
<ThemedText type="link">Expo documentation</ThemedText>
|
|
52
|
+
<SymbolView
|
|
53
|
+
tintColor={theme.text}
|
|
54
|
+
name={{ ios: 'arrow.up.right.square', android: 'link', web: 'link' }}
|
|
55
|
+
size={12}
|
|
56
|
+
/>
|
|
57
|
+
</ThemedView>
|
|
58
|
+
</Pressable>
|
|
59
|
+
</ExternalLink>
|
|
60
|
+
</ThemedView>
|
|
61
|
+
|
|
62
|
+
<ThemedView style={styles.sectionsWrapper}>
|
|
63
|
+
<Collapsible title="File-based routing">
|
|
64
|
+
<ThemedText type="small">
|
|
65
|
+
This app has two screens: <ThemedText type="code">src/app/index.tsx</ThemedText> and{' '}
|
|
66
|
+
<ThemedText type="code">src/app/explore.tsx</ThemedText>
|
|
67
|
+
</ThemedText>
|
|
68
|
+
<ThemedText type="small">
|
|
69
|
+
The layout file in <ThemedText type="code">src/app/_layout.tsx</ThemedText> sets up
|
|
70
|
+
the tab navigator.
|
|
71
|
+
</ThemedText>
|
|
72
|
+
<ExternalLink href="https://docs.expo.dev/router/introduction">
|
|
73
|
+
<ThemedText type="linkPrimary">Learn more</ThemedText>
|
|
74
|
+
</ExternalLink>
|
|
75
|
+
</Collapsible>
|
|
76
|
+
|
|
77
|
+
<Collapsible title="Android, iOS, and web support">
|
|
78
|
+
<ThemedView type="backgroundElement" style={styles.collapsibleContent}>
|
|
79
|
+
<ThemedText type="small">
|
|
80
|
+
You can open this project on Android, iOS, and the web. To open the web version,
|
|
81
|
+
press <ThemedText type="smallBold">w</ThemedText> in the terminal running this
|
|
82
|
+
project.
|
|
83
|
+
</ThemedText>
|
|
84
|
+
<Image
|
|
85
|
+
source={require('@/assets/images/tutorial-web.png')}
|
|
86
|
+
style={styles.imageTutorial}
|
|
87
|
+
/>
|
|
88
|
+
</ThemedView>
|
|
89
|
+
</Collapsible>
|
|
90
|
+
|
|
91
|
+
<Collapsible title="Images">
|
|
92
|
+
<ThemedText type="small">
|
|
93
|
+
For static images, you can use the <ThemedText type="code">@2x</ThemedText> and{' '}
|
|
94
|
+
<ThemedText type="code">@3x</ThemedText> suffixes to provide files for different
|
|
95
|
+
screen densities.
|
|
96
|
+
</ThemedText>
|
|
97
|
+
<Image source={require('@/assets/images/react-logo.png')} style={styles.imageReact} />
|
|
98
|
+
<ExternalLink href="https://reactnative.dev/docs/images">
|
|
99
|
+
<ThemedText type="linkPrimary">Learn more</ThemedText>
|
|
100
|
+
</ExternalLink>
|
|
101
|
+
</Collapsible>
|
|
102
|
+
|
|
103
|
+
<Collapsible title="Light and dark mode components">
|
|
104
|
+
<ThemedText type="small">
|
|
105
|
+
This template has light and dark mode support. The{' '}
|
|
106
|
+
<ThemedText type="code">useColorScheme()</ThemedText> hook lets you inspect what the
|
|
107
|
+
user's current color scheme is, and so you can adjust UI colors accordingly.
|
|
108
|
+
</ThemedText>
|
|
109
|
+
<ExternalLink href="https://docs.expo.dev/develop/user-interface/color-themes/">
|
|
110
|
+
<ThemedText type="linkPrimary">Learn more</ThemedText>
|
|
111
|
+
</ExternalLink>
|
|
112
|
+
</Collapsible>
|
|
113
|
+
|
|
114
|
+
<Collapsible title="Animations">
|
|
115
|
+
<ThemedText type="small">
|
|
116
|
+
This template includes an example of an animated component. The{' '}
|
|
117
|
+
<ThemedText type="code">src/components/ui/collapsible.tsx</ThemedText> component uses
|
|
118
|
+
the powerful <ThemedText type="code">react-native-reanimated</ThemedText> library to
|
|
119
|
+
animate opening this hint.
|
|
120
|
+
</ThemedText>
|
|
121
|
+
</Collapsible>
|
|
122
|
+
</ThemedView>
|
|
123
|
+
{Platform.OS === 'web' && <WebBadge />}
|
|
124
|
+
</ThemedView>
|
|
125
|
+
</ScrollView>
|
|
126
|
+
);
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
const styles = StyleSheet.create({
|
|
130
|
+
scrollView: {
|
|
131
|
+
flex: 1,
|
|
132
|
+
},
|
|
133
|
+
contentContainer: {
|
|
134
|
+
flexDirection: 'row',
|
|
135
|
+
justifyContent: 'center',
|
|
136
|
+
},
|
|
137
|
+
container: {
|
|
138
|
+
maxWidth: MaxContentWidth,
|
|
139
|
+
flexGrow: 1,
|
|
140
|
+
},
|
|
141
|
+
titleContainer: {
|
|
142
|
+
gap: Spacing.three,
|
|
143
|
+
alignItems: 'center',
|
|
144
|
+
paddingHorizontal: Spacing.four,
|
|
145
|
+
paddingVertical: Spacing.six,
|
|
146
|
+
},
|
|
147
|
+
centerText: {
|
|
148
|
+
textAlign: 'center',
|
|
149
|
+
},
|
|
150
|
+
pressed: {
|
|
151
|
+
opacity: 0.7,
|
|
152
|
+
},
|
|
153
|
+
linkButton: {
|
|
154
|
+
flexDirection: 'row',
|
|
155
|
+
paddingHorizontal: Spacing.four,
|
|
156
|
+
paddingVertical: Spacing.two,
|
|
157
|
+
borderRadius: Spacing.five,
|
|
158
|
+
justifyContent: 'center',
|
|
159
|
+
gap: Spacing.one,
|
|
160
|
+
alignItems: 'center',
|
|
161
|
+
},
|
|
162
|
+
sectionsWrapper: {
|
|
163
|
+
gap: Spacing.five,
|
|
164
|
+
paddingHorizontal: Spacing.four,
|
|
165
|
+
paddingTop: Spacing.three,
|
|
166
|
+
},
|
|
167
|
+
collapsibleContent: {
|
|
168
|
+
alignItems: 'center',
|
|
169
|
+
},
|
|
170
|
+
imageTutorial: {
|
|
171
|
+
width: '100%',
|
|
172
|
+
aspectRatio: 296 / 171,
|
|
173
|
+
borderRadius: Spacing.three,
|
|
174
|
+
marginTop: Spacing.two,
|
|
175
|
+
},
|
|
176
|
+
imageReact: {
|
|
177
|
+
width: 100,
|
|
178
|
+
height: 100,
|
|
179
|
+
alignSelf: 'center',
|
|
180
|
+
},
|
|
181
|
+
});
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import * as Device from 'expo-device';
|
|
2
|
+
import { Platform, StyleSheet } from 'react-native';
|
|
3
|
+
import { SafeAreaView } from 'react-native-safe-area-context';
|
|
4
|
+
|
|
5
|
+
import { AnimatedIcon } from '@/components/animated-icon';
|
|
6
|
+
import { HintRow } from '@/components/hint-row';
|
|
7
|
+
import { ThemedText } from '@/components/themed-text';
|
|
8
|
+
import { ThemedView } from '@/components/themed-view';
|
|
9
|
+
import { WebBadge } from '@/components/web-badge';
|
|
10
|
+
import { BottomTabInset, MaxContentWidth, Spacing } from '@/constants/theme';
|
|
11
|
+
|
|
12
|
+
function getDevMenuHint() {
|
|
13
|
+
if (Platform.OS === 'web') {
|
|
14
|
+
return <ThemedText type="small">use browser devtools</ThemedText>;
|
|
15
|
+
}
|
|
16
|
+
if (Device.isDevice) {
|
|
17
|
+
return (
|
|
18
|
+
<ThemedText type="small">
|
|
19
|
+
shake device or press <ThemedText type="code">m</ThemedText> in terminal
|
|
20
|
+
</ThemedText>
|
|
21
|
+
);
|
|
22
|
+
}
|
|
23
|
+
const shortcut = Platform.OS === 'android' ? 'cmd+m (or ctrl+m)' : 'cmd+d';
|
|
24
|
+
return (
|
|
25
|
+
<ThemedText type="small">
|
|
26
|
+
press <ThemedText type="code">{shortcut}</ThemedText>
|
|
27
|
+
</ThemedText>
|
|
28
|
+
);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export default function HomeScreen() {
|
|
32
|
+
return (
|
|
33
|
+
<ThemedView style={styles.container}>
|
|
34
|
+
<SafeAreaView style={styles.safeArea}>
|
|
35
|
+
<ThemedView style={styles.heroSection}>
|
|
36
|
+
<AnimatedIcon />
|
|
37
|
+
<ThemedText type="title" style={styles.title}>
|
|
38
|
+
Welcome to Expo
|
|
39
|
+
</ThemedText>
|
|
40
|
+
</ThemedView>
|
|
41
|
+
|
|
42
|
+
<ThemedText type="code" style={styles.code}>
|
|
43
|
+
get started
|
|
44
|
+
</ThemedText>
|
|
45
|
+
|
|
46
|
+
<ThemedView type="backgroundElement" style={styles.stepContainer}>
|
|
47
|
+
<HintRow
|
|
48
|
+
title="Try editing"
|
|
49
|
+
hint={<ThemedText type="code">src/app/index.tsx</ThemedText>}
|
|
50
|
+
/>
|
|
51
|
+
<HintRow title="Dev tools" hint={getDevMenuHint()} />
|
|
52
|
+
<HintRow
|
|
53
|
+
title="Fresh start"
|
|
54
|
+
hint={<ThemedText type="code">npm run reset-project</ThemedText>}
|
|
55
|
+
/>
|
|
56
|
+
</ThemedView>
|
|
57
|
+
|
|
58
|
+
{Platform.OS === 'web' && <WebBadge />}
|
|
59
|
+
</SafeAreaView>
|
|
60
|
+
</ThemedView>
|
|
61
|
+
);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
const styles = StyleSheet.create({
|
|
65
|
+
container: {
|
|
66
|
+
flex: 1,
|
|
67
|
+
justifyContent: 'center',
|
|
68
|
+
flexDirection: 'row',
|
|
69
|
+
},
|
|
70
|
+
safeArea: {
|
|
71
|
+
flex: 1,
|
|
72
|
+
paddingHorizontal: Spacing.four,
|
|
73
|
+
alignItems: 'center',
|
|
74
|
+
gap: Spacing.three,
|
|
75
|
+
paddingBottom: BottomTabInset + Spacing.three,
|
|
76
|
+
maxWidth: MaxContentWidth,
|
|
77
|
+
},
|
|
78
|
+
heroSection: {
|
|
79
|
+
alignItems: 'center',
|
|
80
|
+
justifyContent: 'center',
|
|
81
|
+
flex: 1,
|
|
82
|
+
paddingHorizontal: Spacing.four,
|
|
83
|
+
gap: Spacing.four,
|
|
84
|
+
},
|
|
85
|
+
title: {
|
|
86
|
+
textAlign: 'center',
|
|
87
|
+
},
|
|
88
|
+
code: {
|
|
89
|
+
textTransform: 'uppercase',
|
|
90
|
+
},
|
|
91
|
+
stepContainer: {
|
|
92
|
+
gap: Spacing.three,
|
|
93
|
+
alignSelf: 'stretch',
|
|
94
|
+
paddingHorizontal: Spacing.three,
|
|
95
|
+
paddingVertical: Spacing.four,
|
|
96
|
+
borderRadius: Spacing.four,
|
|
97
|
+
},
|
|
98
|
+
});
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import { Image } from 'expo-image';
|
|
2
|
+
import { useState } from 'react';
|
|
3
|
+
import { Dimensions, StyleSheet, View } from 'react-native';
|
|
4
|
+
import Animated, { Easing, Keyframe } from 'react-native-reanimated';
|
|
5
|
+
import { scheduleOnRN } from 'react-native-worklets';
|
|
6
|
+
|
|
7
|
+
const INITIAL_SCALE_FACTOR = Dimensions.get('screen').height / 90;
|
|
8
|
+
const DURATION = 600;
|
|
9
|
+
|
|
10
|
+
export function AnimatedSplashOverlay() {
|
|
11
|
+
const [visible, setVisible] = useState(true);
|
|
12
|
+
|
|
13
|
+
if (!visible) return null;
|
|
14
|
+
|
|
15
|
+
const splashKeyframe = new Keyframe({
|
|
16
|
+
0: {
|
|
17
|
+
transform: [{ scale: INITIAL_SCALE_FACTOR }],
|
|
18
|
+
opacity: 1,
|
|
19
|
+
},
|
|
20
|
+
20: {
|
|
21
|
+
opacity: 1,
|
|
22
|
+
},
|
|
23
|
+
70: {
|
|
24
|
+
opacity: 0,
|
|
25
|
+
easing: Easing.elastic(0.7),
|
|
26
|
+
},
|
|
27
|
+
100: {
|
|
28
|
+
opacity: 0,
|
|
29
|
+
transform: [{ scale: 1 }],
|
|
30
|
+
easing: Easing.elastic(0.7),
|
|
31
|
+
},
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
return (
|
|
35
|
+
<Animated.View
|
|
36
|
+
entering={splashKeyframe.duration(DURATION).withCallback((finished) => {
|
|
37
|
+
'worklet';
|
|
38
|
+
if (finished) {
|
|
39
|
+
scheduleOnRN(setVisible, false);
|
|
40
|
+
}
|
|
41
|
+
})}
|
|
42
|
+
style={styles.backgroundSolidColor}
|
|
43
|
+
/>
|
|
44
|
+
);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
const keyframe = new Keyframe({
|
|
48
|
+
0: {
|
|
49
|
+
transform: [{ scale: INITIAL_SCALE_FACTOR }],
|
|
50
|
+
},
|
|
51
|
+
100: {
|
|
52
|
+
transform: [{ scale: 1 }],
|
|
53
|
+
easing: Easing.elastic(0.7),
|
|
54
|
+
},
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
const logoKeyframe = new Keyframe({
|
|
58
|
+
0: {
|
|
59
|
+
transform: [{ scale: 1.3 }],
|
|
60
|
+
opacity: 0,
|
|
61
|
+
},
|
|
62
|
+
40: {
|
|
63
|
+
transform: [{ scale: 1.3 }],
|
|
64
|
+
opacity: 0,
|
|
65
|
+
easing: Easing.elastic(0.7),
|
|
66
|
+
},
|
|
67
|
+
100: {
|
|
68
|
+
opacity: 1,
|
|
69
|
+
transform: [{ scale: 1 }],
|
|
70
|
+
easing: Easing.elastic(0.7),
|
|
71
|
+
},
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
const glowKeyframe = new Keyframe({
|
|
75
|
+
0: {
|
|
76
|
+
transform: [{ rotateZ: '0deg' }],
|
|
77
|
+
},
|
|
78
|
+
100: {
|
|
79
|
+
transform: [{ rotateZ: '7200deg' }],
|
|
80
|
+
},
|
|
81
|
+
});
|
|
82
|
+
|
|
83
|
+
export function AnimatedIcon() {
|
|
84
|
+
return (
|
|
85
|
+
<View style={styles.iconContainer}>
|
|
86
|
+
<Animated.View entering={glowKeyframe.duration(60 * 1000 * 4)} style={styles.glow}>
|
|
87
|
+
<Image style={styles.glow} source={require('@/assets/images/logo-glow.png')} />
|
|
88
|
+
</Animated.View>
|
|
89
|
+
|
|
90
|
+
<Animated.View entering={keyframe.duration(DURATION)} style={styles.background} />
|
|
91
|
+
<Animated.View style={styles.imageContainer} entering={logoKeyframe.duration(DURATION)}>
|
|
92
|
+
<Image style={styles.image} source={require('@/assets/images/expo-logo.png')} />
|
|
93
|
+
</Animated.View>
|
|
94
|
+
</View>
|
|
95
|
+
);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
const styles = StyleSheet.create({
|
|
99
|
+
imageContainer: {
|
|
100
|
+
justifyContent: 'center',
|
|
101
|
+
alignItems: 'center',
|
|
102
|
+
},
|
|
103
|
+
glow: {
|
|
104
|
+
width: 201,
|
|
105
|
+
height: 201,
|
|
106
|
+
position: 'absolute',
|
|
107
|
+
},
|
|
108
|
+
iconContainer: {
|
|
109
|
+
justifyContent: 'center',
|
|
110
|
+
alignItems: 'center',
|
|
111
|
+
width: 128,
|
|
112
|
+
height: 128,
|
|
113
|
+
zIndex: 100,
|
|
114
|
+
},
|
|
115
|
+
image: {
|
|
116
|
+
position: 'absolute',
|
|
117
|
+
width: 76,
|
|
118
|
+
height: 71,
|
|
119
|
+
},
|
|
120
|
+
background: {
|
|
121
|
+
borderRadius: 40,
|
|
122
|
+
experimental_backgroundImage: `linear-gradient(180deg, #3C9FFE, #0274DF)`,
|
|
123
|
+
width: 128,
|
|
124
|
+
height: 128,
|
|
125
|
+
position: 'absolute',
|
|
126
|
+
},
|
|
127
|
+
backgroundSolidColor: {
|
|
128
|
+
...StyleSheet.absoluteFillObject,
|
|
129
|
+
backgroundColor: '#208AEF',
|
|
130
|
+
zIndex: 1000,
|
|
131
|
+
},
|
|
132
|
+
});
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { Image } from 'expo-image';
|
|
2
|
+
import { StyleSheet, View } from 'react-native';
|
|
3
|
+
import Animated, { Keyframe, Easing } from 'react-native-reanimated';
|
|
4
|
+
|
|
5
|
+
import classes from './animated-icon.module.css';
|
|
6
|
+
const DURATION = 300;
|
|
7
|
+
|
|
8
|
+
export function AnimatedSplashOverlay() {
|
|
9
|
+
return null;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
const keyframe = new Keyframe({
|
|
13
|
+
0: {
|
|
14
|
+
transform: [{ scale: 0 }],
|
|
15
|
+
},
|
|
16
|
+
60: {
|
|
17
|
+
transform: [{ scale: 1.2 }],
|
|
18
|
+
easing: Easing.elastic(1.2),
|
|
19
|
+
},
|
|
20
|
+
100: {
|
|
21
|
+
transform: [{ scale: 1 }],
|
|
22
|
+
easing: Easing.elastic(1.2),
|
|
23
|
+
},
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
const logoKeyframe = new Keyframe({
|
|
27
|
+
0: {
|
|
28
|
+
opacity: 0,
|
|
29
|
+
},
|
|
30
|
+
60: {
|
|
31
|
+
transform: [{ scale: 1.2 }],
|
|
32
|
+
opacity: 0,
|
|
33
|
+
easing: Easing.elastic(1.2),
|
|
34
|
+
},
|
|
35
|
+
100: {
|
|
36
|
+
transform: [{ scale: 1 }],
|
|
37
|
+
opacity: 1,
|
|
38
|
+
easing: Easing.elastic(1.2),
|
|
39
|
+
},
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
const glowKeyframe = new Keyframe({
|
|
43
|
+
0: {
|
|
44
|
+
transform: [{ rotateZ: '-180deg' }, { scale: 0.8 }],
|
|
45
|
+
opacity: 0,
|
|
46
|
+
},
|
|
47
|
+
[DURATION / 1000]: {
|
|
48
|
+
transform: [{ rotateZ: '0deg' }, { scale: 1 }],
|
|
49
|
+
opacity: 1,
|
|
50
|
+
easing: Easing.elastic(0.7),
|
|
51
|
+
},
|
|
52
|
+
100: {
|
|
53
|
+
transform: [{ rotateZ: '7200deg' }],
|
|
54
|
+
},
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
export function AnimatedIcon() {
|
|
58
|
+
return (
|
|
59
|
+
<View style={styles.iconContainer}>
|
|
60
|
+
<Animated.View entering={glowKeyframe.duration(60 * 1000 * 4)} style={styles.glow}>
|
|
61
|
+
<Image style={styles.glow} source={require('@/assets/images/logo-glow.png')} />
|
|
62
|
+
</Animated.View>
|
|
63
|
+
|
|
64
|
+
<Animated.View style={styles.background} entering={keyframe.duration(DURATION)}>
|
|
65
|
+
<div className={classes.expoLogoBackground} />
|
|
66
|
+
</Animated.View>
|
|
67
|
+
|
|
68
|
+
<Animated.View style={styles.imageContainer} entering={logoKeyframe.duration(DURATION)}>
|
|
69
|
+
<Image style={styles.image} source={require('@/assets/images/expo-logo.png')} />
|
|
70
|
+
</Animated.View>
|
|
71
|
+
</View>
|
|
72
|
+
);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
const styles = StyleSheet.create({
|
|
76
|
+
container: {
|
|
77
|
+
alignItems: 'center',
|
|
78
|
+
width: '100%',
|
|
79
|
+
zIndex: 1000,
|
|
80
|
+
position: 'absolute',
|
|
81
|
+
top: 128 / 2 + 138,
|
|
82
|
+
},
|
|
83
|
+
imageContainer: {
|
|
84
|
+
justifyContent: 'center',
|
|
85
|
+
alignItems: 'center',
|
|
86
|
+
},
|
|
87
|
+
glow: {
|
|
88
|
+
width: 201,
|
|
89
|
+
height: 201,
|
|
90
|
+
position: 'absolute',
|
|
91
|
+
},
|
|
92
|
+
iconContainer: {
|
|
93
|
+
justifyContent: 'center',
|
|
94
|
+
alignItems: 'center',
|
|
95
|
+
width: 128,
|
|
96
|
+
height: 128,
|
|
97
|
+
},
|
|
98
|
+
image: {
|
|
99
|
+
position: 'absolute',
|
|
100
|
+
width: 76,
|
|
101
|
+
height: 71,
|
|
102
|
+
},
|
|
103
|
+
background: {
|
|
104
|
+
width: 128,
|
|
105
|
+
height: 128,
|
|
106
|
+
position: 'absolute',
|
|
107
|
+
},
|
|
108
|
+
});
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { NativeTabs } from 'expo-router/unstable-native-tabs';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { useColorScheme } from 'react-native';
|
|
4
|
+
|
|
5
|
+
import { Colors } from '@/constants/theme';
|
|
6
|
+
|
|
7
|
+
export default function AppTabs() {
|
|
8
|
+
const scheme = useColorScheme();
|
|
9
|
+
const colors = Colors[scheme === 'unspecified' ? 'light' : scheme];
|
|
10
|
+
|
|
11
|
+
return (
|
|
12
|
+
<NativeTabs
|
|
13
|
+
backgroundColor={colors.background}
|
|
14
|
+
indicatorColor={colors.backgroundElement}
|
|
15
|
+
labelStyle={{ selected: { color: colors.text } }}>
|
|
16
|
+
<NativeTabs.Trigger name="index">
|
|
17
|
+
<NativeTabs.Trigger.Label>Home</NativeTabs.Trigger.Label>
|
|
18
|
+
<NativeTabs.Trigger.Icon
|
|
19
|
+
src={require('@/assets/images/tabIcons/home.png')}
|
|
20
|
+
renderingMode="template"
|
|
21
|
+
/>
|
|
22
|
+
</NativeTabs.Trigger>
|
|
23
|
+
|
|
24
|
+
<NativeTabs.Trigger name="explore">
|
|
25
|
+
<NativeTabs.Trigger.Label>Explore</NativeTabs.Trigger.Label>
|
|
26
|
+
<NativeTabs.Trigger.Icon
|
|
27
|
+
src={require('@/assets/images/tabIcons/explore.png')}
|
|
28
|
+
renderingMode="template"
|
|
29
|
+
/>
|
|
30
|
+
</NativeTabs.Trigger>
|
|
31
|
+
</NativeTabs>
|
|
32
|
+
);
|
|
33
|
+
}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Tabs,
|
|
3
|
+
TabList,
|
|
4
|
+
TabTrigger,
|
|
5
|
+
TabSlot,
|
|
6
|
+
TabTriggerSlotProps,
|
|
7
|
+
TabListProps,
|
|
8
|
+
} from 'expo-router/ui';
|
|
9
|
+
import { SymbolView } from 'expo-symbols';
|
|
10
|
+
import React from 'react';
|
|
11
|
+
import { Pressable, useColorScheme, View, StyleSheet } from 'react-native';
|
|
12
|
+
|
|
13
|
+
import { ExternalLink } from './external-link';
|
|
14
|
+
import { ThemedText } from './themed-text';
|
|
15
|
+
import { ThemedView } from './themed-view';
|
|
16
|
+
|
|
17
|
+
import { Colors, MaxContentWidth, Spacing } from '@/constants/theme';
|
|
18
|
+
|
|
19
|
+
export default function AppTabs() {
|
|
20
|
+
return (
|
|
21
|
+
<Tabs>
|
|
22
|
+
<TabSlot style={{ height: '100%' }} />
|
|
23
|
+
<TabList asChild>
|
|
24
|
+
<CustomTabList>
|
|
25
|
+
<TabTrigger name="home" href="/" asChild>
|
|
26
|
+
<TabButton>Home</TabButton>
|
|
27
|
+
</TabTrigger>
|
|
28
|
+
<TabTrigger name="explore" href="/explore" asChild>
|
|
29
|
+
<TabButton>Explore</TabButton>
|
|
30
|
+
</TabTrigger>
|
|
31
|
+
</CustomTabList>
|
|
32
|
+
</TabList>
|
|
33
|
+
</Tabs>
|
|
34
|
+
);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export function TabButton({ children, isFocused, ...props }: TabTriggerSlotProps) {
|
|
38
|
+
return (
|
|
39
|
+
<Pressable {...props} style={({ pressed }) => pressed && styles.pressed}>
|
|
40
|
+
<ThemedView
|
|
41
|
+
type={isFocused ? 'backgroundSelected' : 'backgroundElement'}
|
|
42
|
+
style={styles.tabButtonView}>
|
|
43
|
+
<ThemedText type="small" themeColor={isFocused ? 'text' : 'textSecondary'}>
|
|
44
|
+
{children}
|
|
45
|
+
</ThemedText>
|
|
46
|
+
</ThemedView>
|
|
47
|
+
</Pressable>
|
|
48
|
+
);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export function CustomTabList(props: TabListProps) {
|
|
52
|
+
const scheme = useColorScheme();
|
|
53
|
+
const colors = Colors[scheme === 'unspecified' ? 'light' : scheme];
|
|
54
|
+
|
|
55
|
+
return (
|
|
56
|
+
<View {...props} style={styles.tabListContainer}>
|
|
57
|
+
<ThemedView type="backgroundElement" style={styles.innerContainer}>
|
|
58
|
+
<ThemedText type="smallBold" style={styles.brandText}>
|
|
59
|
+
Expo Starter
|
|
60
|
+
</ThemedText>
|
|
61
|
+
|
|
62
|
+
{props.children}
|
|
63
|
+
|
|
64
|
+
<ExternalLink href="https://docs.expo.dev" asChild>
|
|
65
|
+
<Pressable style={styles.externalPressable}>
|
|
66
|
+
<ThemedText type="link">Docs</ThemedText>
|
|
67
|
+
<SymbolView
|
|
68
|
+
tintColor={colors.text}
|
|
69
|
+
name={{ ios: 'arrow.up.right.square', web: 'link' }}
|
|
70
|
+
size={12}
|
|
71
|
+
/>
|
|
72
|
+
</Pressable>
|
|
73
|
+
</ExternalLink>
|
|
74
|
+
</ThemedView>
|
|
75
|
+
</View>
|
|
76
|
+
);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
const styles = StyleSheet.create({
|
|
80
|
+
tabListContainer: {
|
|
81
|
+
position: 'absolute',
|
|
82
|
+
width: '100%',
|
|
83
|
+
padding: Spacing.three,
|
|
84
|
+
justifyContent: 'center',
|
|
85
|
+
alignItems: 'center',
|
|
86
|
+
flexDirection: 'row',
|
|
87
|
+
},
|
|
88
|
+
innerContainer: {
|
|
89
|
+
paddingVertical: Spacing.two,
|
|
90
|
+
paddingHorizontal: Spacing.five,
|
|
91
|
+
borderRadius: Spacing.five,
|
|
92
|
+
flexDirection: 'row',
|
|
93
|
+
alignItems: 'center',
|
|
94
|
+
flexGrow: 1,
|
|
95
|
+
gap: Spacing.two,
|
|
96
|
+
maxWidth: MaxContentWidth,
|
|
97
|
+
},
|
|
98
|
+
brandText: {
|
|
99
|
+
marginRight: 'auto',
|
|
100
|
+
},
|
|
101
|
+
pressed: {
|
|
102
|
+
opacity: 0.7,
|
|
103
|
+
},
|
|
104
|
+
tabButtonView: {
|
|
105
|
+
paddingVertical: Spacing.one,
|
|
106
|
+
paddingHorizontal: Spacing.three,
|
|
107
|
+
borderRadius: Spacing.three,
|
|
108
|
+
},
|
|
109
|
+
externalPressable: {
|
|
110
|
+
flexDirection: 'row',
|
|
111
|
+
justifyContent: 'center',
|
|
112
|
+
alignItems: 'center',
|
|
113
|
+
gap: Spacing.one,
|
|
114
|
+
marginLeft: Spacing.three,
|
|
115
|
+
},
|
|
116
|
+
});
|