create-expo-stack 2.20.0-next.7f9c8bc → 2.20.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.
- package/README.md +1 -3
- package/build/cli.js +3 -2
- package/build/commands/create-expo-stack.js +9 -30
- package/build/constants.js +4 -4
- package/build/templates/base/App.tsx.ejs +12 -51
- package/build/templates/base/app.json.ejs +1 -0
- package/build/templates/base/babel.config.js.ejs +13 -16
- package/build/templates/base/components/Button.tsx.ejs +1 -0
- package/build/templates/base/components/Container.tsx.ejs +1 -0
- package/build/templates/base/package.json.ejs +34 -67
- package/build/templates/base/tsconfig.json.ejs +12 -7
- package/build/templates/packages/expo-router/drawer/app/+not-found.tsx.ejs +19 -60
- package/build/templates/packages/expo-router/drawer/app/_layout.tsx.ejs +2 -41
- package/build/templates/packages/expo-router/stack/app/+not-found.tsx.ejs +34 -66
- package/build/templates/packages/expo-router/stack/app/_layout.tsx.ejs +15 -51
- package/build/templates/packages/expo-router/stack/app/details.tsx.ejs +37 -5
- package/build/templates/packages/expo-router/stack/app/index.tsx.ejs +34 -11
- package/build/templates/packages/expo-router/tabs/app/+not-found.tsx.ejs +21 -60
- package/build/templates/packages/expo-router/tabs/app/_layout.tsx.ejs +8 -48
- package/build/templates/packages/nativewind/global.css +3 -2
- package/build/templates/packages/nativewind/metro.config.js +3 -4
- package/build/templates/packages/nativewind/nativewind-env.d.ts +1 -3
- package/build/templates/packages/nativewind/tailwind.config.js.ejs +15 -0
- package/build/templates/packages/nativewindui/components/Container.tsx.ejs +1 -0
- package/build/templates/packages/nativewindui/components/EditScreenInfo.tsx.ejs +1 -1
- package/build/templates/packages/nativewindui/components/ScreenContent.tsx.ejs +1 -1
- package/build/templates/packages/nativewindui/components/nativewindui/Icon/Icon.ios.tsx.ejs +52 -0
- package/build/templates/packages/nativewindui/components/nativewindui/Icon/Icon.tsx.ejs +58 -0
- package/build/templates/packages/nativewindui/components/nativewindui/Icon/index.ts.ejs +16 -0
- package/build/templates/packages/nativewindui/components/nativewindui/Icon/types.ts.ejs +18 -0
- package/build/templates/packages/nativewindui/components/{ThemeToggle.tsx.ejs → nativewindui/ThemeToggle.tsx.ejs} +8 -10
- package/build/templates/packages/nativewindui/drawer/app/(drawer)/index.tsx.ejs +17 -19
- package/build/templates/packages/nativewindui/drawer/app/+not-found.tsx.ejs +4 -44
- package/build/templates/packages/nativewindui/drawer/app/_layout.tsx.ejs +2 -2
- package/build/templates/packages/nativewindui/drawer/app/modal.tsx.ejs +4 -4
- package/build/templates/packages/nativewindui/lib/useColorScheme.tsx.ejs +3 -37
- package/build/templates/packages/nativewindui/stack/app/+not-found.tsx.ejs +1 -1
- package/build/templates/packages/nativewindui/stack/app/_layout.tsx.ejs +17 -34
- package/build/templates/packages/nativewindui/stack/app/index.tsx.ejs +230 -275
- package/build/templates/packages/nativewindui/stack/app/modal.tsx.ejs +7 -7
- package/build/templates/packages/nativewindui/tabs/app/(tabs)/index.tsx.ejs +6 -7
- package/build/templates/packages/nativewindui/tabs/app/+not-found.tsx.ejs +0 -40
- package/build/templates/packages/nativewindui/theme/colors.ts.ejs +52 -0
- package/build/templates/packages/nativewindui/theme/index.ts.ejs +2 -2
- package/build/templates/packages/nativewindui/theme/with-opacity.ts.ejs +155 -0
- package/build/templates/packages/react-navigation/App.tsx.ejs +2 -42
- package/build/types/constants.d.ts +1 -1
- package/build/types/types.d.ts +3 -3
- package/build/types/utilities/configAnalytics.d.ts +2 -2
- package/build/types.js +1 -3
- package/build/utilities/clearNavigationPackages.js +2 -2
- package/build/utilities/clearStylingPackages.js +2 -2
- package/build/utilities/configAnalytics.js +5 -4
- package/build/utilities/configureProjectFiles.js +31 -68
- package/build/utilities/copyBaseAssets.js +3 -2
- package/build/utilities/generateNWUI.js +8 -7
- package/build/utilities/generateProjectFiles.js +4 -9
- package/build/utilities/getPackageManager.js +6 -5
- package/build/utilities/printOutput.js +5 -16
- package/build/utilities/renderTitle.js +3 -2
- package/build/utilities/runCLI.js +15 -17
- package/build/utilities/runEasConfigure.js +3 -2
- package/build/utilities/runIgnite.js +3 -2
- package/build/utilities/showHelp.js +3 -4
- package/build/utilities/systemCommand.js +3 -3
- package/build/utilities/usePackage.js +3 -2
- package/build/utilities/validateProjectName.js +3 -2
- package/package.json +73 -71
- package/build/templates/packages/nativewind/postcss.config.mjs +0 -5
- package/build/templates/packages/nativewindui/components/BackButton.tsx.ejs +0 -23
- package/build/templates/packages/nativewindui/components/Button.tsx.ejs +0 -41
- package/build/templates/packages/nativewindui/lib/useHeaderSearchBar.tsx.ejs +0 -31
- package/build/templates/packages/restyle/components/BackButton.tsx.ejs +0 -15
- package/build/templates/packages/restyle/components/Button.tsx.ejs +0 -40
- package/build/templates/packages/restyle/components/Container.tsx.ejs +0 -6
- package/build/templates/packages/restyle/components/EditScreenInfo.tsx.ejs +0 -29
- package/build/templates/packages/restyle/components/ScreenContent.tsx.ejs +0 -21
- package/build/templates/packages/restyle/theme/Box.tsx.ejs +0 -6
- package/build/templates/packages/restyle/theme/Text.tsx.ejs +0 -6
- package/build/templates/packages/restyle/theme/index.ts.ejs +0 -6
- package/build/templates/packages/restyle/theme/theme.ts.ejs +0 -67
- package/build/templates/packages/tamagui/components/BackButton.tsx.ejs +0 -19
- package/build/templates/packages/tamagui/components/Button.tsx.ejs +0 -18
- package/build/templates/packages/tamagui/components/Container.tsx.ejs +0 -6
- package/build/templates/packages/tamagui/components/EditScreenInfo.tsx.ejs +0 -29
- package/build/templates/packages/tamagui/components/ScreenContent.tsx.ejs +0 -23
- package/build/templates/packages/tamagui/tamagui.config.ts.ejs +0 -130
|
@@ -11,67 +11,33 @@ import { Link, Stack } from 'expo-router';
|
|
|
11
11
|
<% } else if (props.stylingPackage?.name === "stylesheet") { %>
|
|
12
12
|
import { StyleSheet, Text } from 'react-native';
|
|
13
13
|
|
|
14
|
-
import { Container } from '~/components/Container';
|
|
15
|
-
<% } else if (props.stylingPackage?.name === "tamagui") { %>
|
|
16
|
-
import { YStack } from "tamagui";
|
|
17
|
-
import { Container, Main, Subtitle, Title } from "../tamagui.config";
|
|
18
|
-
<% } else if (props.stylingPackage?.name === "restyle") { %>
|
|
19
|
-
import { Box, Text, makeStyles } from 'theme';
|
|
20
|
-
|
|
21
14
|
import { Container } from '~/components/Container';
|
|
22
15
|
<% } %>
|
|
23
16
|
|
|
24
17
|
export default function NotFoundScreen() {
|
|
25
|
-
<% if (props.stylingPackage?.name === "restyle") { %>
|
|
26
|
-
const styles = useStyles();
|
|
27
|
-
<% } %>
|
|
28
18
|
|
|
29
19
|
return (
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
20
|
+
<% if (props.stylingPackage?.name === "nativewind") {%>
|
|
21
|
+
<>
|
|
22
|
+
<Stack.Screen options={{ title: "Oops!" }} />
|
|
23
|
+
<Container>
|
|
24
|
+
<Text className={styles.title}>{"This screen doesn't exist."}</Text>
|
|
25
|
+
<Link href="/" className={styles.link}>
|
|
26
|
+
<Text className={styles.linkText}>Go to home screen!</Text>
|
|
27
|
+
</Link>
|
|
28
|
+
</Container>
|
|
29
|
+
</>
|
|
30
|
+
<% } else { %>
|
|
31
|
+
<>
|
|
32
|
+
<Stack.Screen options={{ title: "Oops!" }} />
|
|
41
33
|
<Container>
|
|
42
|
-
<
|
|
43
|
-
<
|
|
44
|
-
<
|
|
45
|
-
|
|
46
|
-
<Link href="/">
|
|
47
|
-
<Subtitle>Go to home screen!</Subtitle>
|
|
48
|
-
</Link>
|
|
49
|
-
</YStack>
|
|
50
|
-
</Main>
|
|
34
|
+
<Text style={styles.title}>{"This screen doesn't exist."}</Text>
|
|
35
|
+
<Link href="/" style={styles.link}>
|
|
36
|
+
<Text style={styles.linkText}>Go to home screen!</Text>
|
|
37
|
+
</Link>
|
|
51
38
|
</Container>
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
<Stack.Screen options={{ title: 'Oops!' }} />
|
|
55
|
-
<Container>
|
|
56
|
-
<Text variant="title">{"This screen doesn't exist."}</Text>
|
|
57
|
-
<Link href="/" style={styles.link}>
|
|
58
|
-
<Text variant="body" color="blue">
|
|
59
|
-
Go to home screen!
|
|
60
|
-
</Text>
|
|
61
|
-
</Link>
|
|
62
|
-
</Container>
|
|
63
|
-
</>
|
|
64
|
-
<% } else { %>
|
|
65
|
-
<>
|
|
66
|
-
<Stack.Screen options={{ title: "Oops!" }} />
|
|
67
|
-
<Container>
|
|
68
|
-
<Text style={styles.title}>{"This screen doesn't exist."}</Text>
|
|
69
|
-
<Link href="/" style={styles.link}>
|
|
70
|
-
<Text style={styles.linkText}>Go to home screen!</Text>
|
|
71
|
-
</Link>
|
|
72
|
-
</Container>
|
|
73
|
-
</>
|
|
74
|
-
<% } %>
|
|
39
|
+
</>
|
|
40
|
+
<% } %>
|
|
75
41
|
);
|
|
76
42
|
}
|
|
77
43
|
|
|
@@ -112,11 +78,4 @@ export default function NotFoundScreen() {
|
|
|
112
78
|
color: '#2e78b7',
|
|
113
79
|
},
|
|
114
80
|
});
|
|
115
|
-
<% } else if (props.stylingPackage?.name === "restyle") { %>
|
|
116
|
-
const useStyles = makeStyles((theme) => ({
|
|
117
|
-
link: {
|
|
118
|
-
marginTop: theme.spacing.m_16,
|
|
119
|
-
paddingVertical: theme.spacing.m_16,
|
|
120
|
-
},
|
|
121
|
-
}));
|
|
122
81
|
<% } %>
|
|
@@ -13,23 +13,8 @@ import 'react-native-gesture-handler';
|
|
|
13
13
|
import { GestureHandlerRootView } from 'react-native-gesture-handler';
|
|
14
14
|
import { Stack } from 'expo-router';
|
|
15
15
|
|
|
16
|
-
<% if (props.stylingPackage?.name==="tamagui" ) { %>
|
|
17
|
-
import React, { useEffect } from "react";
|
|
18
|
-
import { TamaguiProvider } from 'tamagui'
|
|
19
|
-
import { SplashScreen } from "expo-router";
|
|
20
|
-
import { useFonts } from "expo-font";
|
|
21
|
-
|
|
22
|
-
import config from '../tamagui.config';
|
|
23
|
-
|
|
24
|
-
SplashScreen.preventAutoHideAsync();
|
|
25
|
-
<% } else if (props.stylingPackage?.name === "restyle") { %>
|
|
26
|
-
import { ThemeProvider } from '@shopify/restyle';
|
|
27
|
-
|
|
28
|
-
import { theme } from '../theme';
|
|
29
|
-
<% } %>
|
|
30
|
-
|
|
31
16
|
<% if (props.stylingPackage?.name === "unistyles") { %>
|
|
32
|
-
|
|
17
|
+
import { useUnistyles } from "react-native-unistyles";
|
|
33
18
|
<% } %>
|
|
34
19
|
|
|
35
20
|
<% if (props.analyticsPackage?.name === "vexo-analytics") { %>
|
|
@@ -44,30 +29,11 @@ export const unstable_settings = {
|
|
|
44
29
|
};
|
|
45
30
|
|
|
46
31
|
export default function RootLayout() {
|
|
47
|
-
<% if (props.stylingPackage?.name==="tamagui" ) { %>
|
|
48
|
-
const [loaded] = useFonts({
|
|
49
|
-
Inter: require("@tamagui/font-inter/otf/Inter-Medium.otf"),
|
|
50
|
-
InterBold: require("@tamagui/font-inter/otf/Inter-Bold.otf")
|
|
51
|
-
});
|
|
52
|
-
|
|
53
|
-
useEffect(() => {
|
|
54
|
-
if (loaded) {
|
|
55
|
-
SplashScreen.hideAsync();
|
|
56
|
-
}
|
|
57
|
-
}, [loaded]);
|
|
58
|
-
|
|
59
|
-
if (!loaded) return null;
|
|
60
|
-
<% } %>
|
|
61
32
|
<% if (props.stylingPackage?.name === "unistyles") { %>
|
|
62
33
|
const { theme } = useUnistyles();
|
|
63
34
|
<% } %>
|
|
64
35
|
|
|
65
|
-
|
|
66
|
-
<% if (props.stylingPackage?.name === "tamagui") { %>
|
|
67
|
-
<TamaguiProvider config={config}>
|
|
68
|
-
<% } else if (props.stylingPackage?.name === "restyle") { %>
|
|
69
|
-
<ThemeProvider theme={theme}>
|
|
70
|
-
<% } %>
|
|
36
|
+
return (
|
|
71
37
|
<GestureHandlerRootView style={{ flex: 1 }}>
|
|
72
38
|
<% if (props.stylingPackage?.name === "unistyles") { %>
|
|
73
39
|
<Stack
|
|
@@ -95,10 +61,5 @@ export default function RootLayout() {
|
|
|
95
61
|
<Stack.Screen name="modal" options={{ title: 'Modal', presentation: 'modal' }} />
|
|
96
62
|
</Stack>
|
|
97
63
|
</GestureHandlerRootView>
|
|
98
|
-
<% if (props.stylingPackage?.name === "tamagui") { %>
|
|
99
|
-
</TamaguiProvider>
|
|
100
|
-
<% } else if (props.stylingPackage?.name === "restyle") { %>
|
|
101
|
-
</ThemeProvider>
|
|
102
|
-
<% } %>
|
|
103
64
|
);
|
|
104
65
|
}
|
|
@@ -1,88 +1,59 @@
|
|
|
1
1
|
import { Link, Stack } from 'expo-router';
|
|
2
2
|
<% if (props.stylingPackage?.name === "nativewind") {%>
|
|
3
|
-
import { Text } from 'react-native';
|
|
3
|
+
import { Text, View } from 'react-native';
|
|
4
4
|
|
|
5
|
-
import { Container } from '
|
|
5
|
+
import { Container } from '@/components/Container';
|
|
6
6
|
<% } else if (props.stylingPackage?.name === "unistyles") { %>
|
|
7
7
|
import { StyleSheet } from 'react-native-unistyles'
|
|
8
|
-
import { Text } from 'react-native';
|
|
8
|
+
import { Text, View } from 'react-native';
|
|
9
9
|
|
|
10
|
-
import { Container } from '
|
|
10
|
+
import { Container } from '@/components/Container';
|
|
11
11
|
<% } else if (props.stylingPackage?.name === "stylesheet") { %>
|
|
12
|
-
import { StyleSheet, Text } from 'react-native';
|
|
12
|
+
import { StyleSheet, Text, View } from 'react-native';
|
|
13
13
|
|
|
14
|
-
import { Container } from '
|
|
15
|
-
<% } else if (props.stylingPackage?.name === "tamagui") { %>
|
|
16
|
-
import { YStack } from "tamagui";
|
|
17
|
-
import { Container, Main, Subtitle, Title } from "../tamagui.config";
|
|
18
|
-
<% } else if (props.stylingPackage?.name === "restyle") { %>
|
|
19
|
-
import { Box, Text, makeStyles } from 'theme';
|
|
20
|
-
|
|
21
|
-
import { Container } from '~/components/Container';
|
|
14
|
+
import { Container } from '@/components/Container';
|
|
22
15
|
<% } %>
|
|
23
16
|
|
|
24
17
|
export default function NotFoundScreen() {
|
|
25
|
-
<% if (props.stylingPackage?.name === "restyle") { %>
|
|
26
|
-
const styles = useStyles();
|
|
27
|
-
<% } %>
|
|
28
18
|
|
|
29
19
|
return (
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
20
|
+
<% if (props.stylingPackage?.name === "nativewind") { %>
|
|
21
|
+
<View className={styles.container}>
|
|
22
|
+
<Stack.Screen options={{ title: "Oops!" }} />
|
|
23
|
+
<Container>
|
|
24
|
+
<Text className={styles.title}>{"This screen doesn't exist."}</Text>
|
|
25
|
+
<Link href="/" className={styles.link}>
|
|
26
|
+
<Text className={styles.linkText}>Go to home screen!</Text>
|
|
27
|
+
</Link>
|
|
28
|
+
</Container>
|
|
29
|
+
</View>
|
|
30
|
+
<% } else { %>
|
|
31
|
+
<View style={styles.container}>
|
|
32
|
+
<Stack.Screen options={{ title: "Oops!" }} />
|
|
41
33
|
<Container>
|
|
42
|
-
<
|
|
43
|
-
<
|
|
44
|
-
<
|
|
45
|
-
|
|
46
|
-
<Link href="/">
|
|
47
|
-
<Subtitle>Go to home screen!</Subtitle>
|
|
48
|
-
</Link>
|
|
49
|
-
</YStack>
|
|
50
|
-
</Main>
|
|
34
|
+
<Text style={styles.title}>{"This screen doesn't exist."}</Text>
|
|
35
|
+
<Link href="/" style={styles.link}>
|
|
36
|
+
<Text style={styles.linkText}>Go to home screen!</Text>
|
|
37
|
+
</Link>
|
|
51
38
|
</Container>
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
<Stack.Screen options={{ title: 'Oops!' }} />
|
|
55
|
-
<Box flex={1} justifyContent="center" alignItems="center" padding="ml_24">
|
|
56
|
-
<Text variant="title">{"This screen doesn't exist."}</Text>
|
|
57
|
-
<Link href="/" style={styles.link}>
|
|
58
|
-
<Text variant="body" color="blue">
|
|
59
|
-
Go to home screen!
|
|
60
|
-
</Text>
|
|
61
|
-
</Link>
|
|
62
|
-
</Box>
|
|
63
|
-
</>
|
|
64
|
-
<% } else { %>
|
|
65
|
-
<>
|
|
66
|
-
<Stack.Screen options={{ title: "Oops!" }} />
|
|
67
|
-
<Container>
|
|
68
|
-
<Text style={styles.title}>{"This screen doesn't exist."}</Text>
|
|
69
|
-
<Link href="/" style={styles.link}>
|
|
70
|
-
<Text style={styles.linkText}>Go to home screen!</Text>
|
|
71
|
-
</Link>
|
|
72
|
-
</Container>
|
|
73
|
-
</>
|
|
74
|
-
<% } %>
|
|
39
|
+
</View>
|
|
40
|
+
<% } %>
|
|
75
41
|
);
|
|
76
42
|
}
|
|
77
43
|
|
|
78
44
|
<% if (props.stylingPackage?.name === "nativewind") { %>
|
|
79
45
|
const styles = {
|
|
46
|
+
container: `flex flex-1 bg-white`,
|
|
80
47
|
title: `text-xl font-bold`,
|
|
81
48
|
link: `mt-4 pt-4`,
|
|
82
49
|
linkText: `text-base text-[#2e78b7]`,
|
|
83
50
|
};
|
|
84
51
|
<% } else if (props.stylingPackage?.name === "unistyles") { %>
|
|
85
52
|
const styles = StyleSheet.create((theme) => ({
|
|
53
|
+
container: {
|
|
54
|
+
flex: 1,
|
|
55
|
+
backgroundColor: 'white',
|
|
56
|
+
},
|
|
86
57
|
title: {
|
|
87
58
|
fontSize: 20,
|
|
88
59
|
fontWeight: 'bold',
|
|
@@ -99,6 +70,10 @@ const styles = StyleSheet.create((theme) => ({
|
|
|
99
70
|
}));
|
|
100
71
|
<% } else if (props.stylingPackage?.name === "stylesheet") { %>
|
|
101
72
|
const styles = StyleSheet.create({
|
|
73
|
+
container: {
|
|
74
|
+
flex: 1,
|
|
75
|
+
backgroundColor: 'white',
|
|
76
|
+
},
|
|
102
77
|
title: {
|
|
103
78
|
fontSize: 20,
|
|
104
79
|
fontWeight: 'bold',
|
|
@@ -112,11 +87,4 @@ const styles = StyleSheet.create({
|
|
|
112
87
|
color: '#2e78b7',
|
|
113
88
|
},
|
|
114
89
|
});
|
|
115
|
-
<% } else if (props.stylingPackage?.name === "restyle") { %>
|
|
116
|
-
const useStyles = makeStyles((theme) => ({
|
|
117
|
-
link: {
|
|
118
|
-
marginTop: theme.spacing.m_16,
|
|
119
|
-
paddingVertical: theme.spacing.m_16,
|
|
120
|
-
},
|
|
121
|
-
}));
|
|
122
90
|
<% } %>
|
|
@@ -8,18 +8,6 @@
|
|
|
8
8
|
<% if (props.internalizationPackage?.name === "i18next") { %>
|
|
9
9
|
import '../translation';
|
|
10
10
|
<% } %>
|
|
11
|
-
|
|
12
|
-
<% if (props.stylingPackage?.name === "tamagui") { %>
|
|
13
|
-
import { useFonts } from 'expo-font';
|
|
14
|
-
import { SplashScreen, Stack } from 'expo-router';
|
|
15
|
-
import { useEffect } from 'react';
|
|
16
|
-
import { TamaguiProvider } from 'tamagui';
|
|
17
|
-
|
|
18
|
-
import config from '../tamagui.config';
|
|
19
|
-
<% } else if (props.stylingPackage?.name === "restyle") { %>
|
|
20
|
-
import { ThemeProvider } from '@shopify/restyle';
|
|
21
|
-
import { theme } from 'theme';
|
|
22
|
-
<% } %>
|
|
23
11
|
import { Stack } from "expo-router";
|
|
24
12
|
|
|
25
13
|
<% if (props.analyticsPackage?.name === "vexo-analytics") { %>
|
|
@@ -32,46 +20,22 @@ export default function Layout() {
|
|
|
32
20
|
<% if (props.stylingPackage?.name === "unistyles") { %>
|
|
33
21
|
const { theme } = useUnistyles();
|
|
34
22
|
<% } %>
|
|
35
|
-
<% if (props.stylingPackage?.name === "tamagui") { %>
|
|
36
|
-
const [loaded] = useFonts({
|
|
37
|
-
Inter: require("@tamagui/font-inter/otf/Inter-Medium.otf"),
|
|
38
|
-
InterBold: require("@tamagui/font-inter/otf/Inter-Bold.otf")
|
|
39
|
-
});
|
|
40
|
-
|
|
41
|
-
useEffect(() => {
|
|
42
|
-
if (loaded) {
|
|
43
|
-
SplashScreen.hideAsync();
|
|
44
|
-
}
|
|
45
|
-
}, [loaded]);
|
|
46
|
-
|
|
47
|
-
if (!loaded) return null;
|
|
48
|
-
<% } %>
|
|
49
23
|
|
|
50
24
|
return (
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
}}
|
|
67
|
-
/>
|
|
68
|
-
<% } else { %>
|
|
69
|
-
<Stack />
|
|
70
|
-
<% } %>
|
|
71
|
-
<% if (props.stylingPackage?.name === "tamagui") { %>
|
|
72
|
-
</TamaguiProvider>
|
|
73
|
-
<% } else if (props.stylingPackage?.name === "restyle") { %>
|
|
74
|
-
</ThemeProvider >
|
|
75
|
-
<% } %>
|
|
25
|
+
<% if (props.stylingPackage?.name === "unistyles") { %>
|
|
26
|
+
<Stack
|
|
27
|
+
screenOptions={{
|
|
28
|
+
headerStyle: {
|
|
29
|
+
backgroundColor: theme.colors.background,
|
|
30
|
+
},
|
|
31
|
+
headerTitleStyle: {
|
|
32
|
+
color: theme.colors.typography,
|
|
33
|
+
},
|
|
34
|
+
headerTintColor: theme.colors.typography
|
|
35
|
+
}}
|
|
36
|
+
/>
|
|
37
|
+
<% } else { %>
|
|
38
|
+
<Stack />
|
|
39
|
+
<% } %>
|
|
76
40
|
);
|
|
77
41
|
}
|
|
@@ -1,17 +1,49 @@
|
|
|
1
|
+
<% if (props.stylingPackage?.name === "stylesheet") { %>
|
|
2
|
+
import { StyleSheet, View } from 'react-native';
|
|
3
|
+
<% } else if (props.stylingPackage?.name === "unistyles") { %>
|
|
4
|
+
import { StyleSheet } from 'react-native-unistyles';
|
|
5
|
+
import { View } from 'react-native';
|
|
6
|
+
<% } else { %>
|
|
7
|
+
import { View } from 'react-native';
|
|
8
|
+
<% } %>
|
|
1
9
|
import { Stack, useLocalSearchParams } from 'expo-router';
|
|
2
10
|
|
|
3
|
-
import { Container } from '
|
|
4
|
-
import { ScreenContent } from '
|
|
11
|
+
import { Container } from '@/components/Container';
|
|
12
|
+
import { ScreenContent } from '@/components/ScreenContent';
|
|
5
13
|
|
|
6
14
|
export default function Details() {
|
|
7
15
|
const { name } = useLocalSearchParams();
|
|
8
16
|
|
|
9
17
|
return (
|
|
10
|
-
|
|
18
|
+
<% if (props.stylingPackage?.name === "nativewind") { %>
|
|
19
|
+
<View className={styles.container}>
|
|
20
|
+
<% } else { %>
|
|
21
|
+
<View style={styles.container}>
|
|
22
|
+
<% } %>
|
|
11
23
|
<Stack.Screen options={{ title: 'Details' }} />
|
|
12
24
|
<Container>
|
|
13
25
|
<ScreenContent path="screens/details.tsx" title={`Showing details for user ${name}`} />
|
|
14
26
|
</Container>
|
|
15
|
-
|
|
27
|
+
</View>
|
|
16
28
|
);
|
|
17
|
-
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
<% if (props.stylingPackage?.name === "nativewind") { %>
|
|
32
|
+
const styles = {
|
|
33
|
+
container: "flex flex-1 bg-white",
|
|
34
|
+
}
|
|
35
|
+
<% } else if (props.stylingPackage?.name === "stylesheet") { %>
|
|
36
|
+
const styles = StyleSheet.create({
|
|
37
|
+
container: {
|
|
38
|
+
flex: 1,
|
|
39
|
+
backgroundColor: 'white',
|
|
40
|
+
},
|
|
41
|
+
});
|
|
42
|
+
<% } else if (props.stylingPackage?.name === "unistyles") { %>
|
|
43
|
+
const styles = StyleSheet.create((theme) => ({
|
|
44
|
+
container: {
|
|
45
|
+
flex: 1,
|
|
46
|
+
backgroundColor: 'white',
|
|
47
|
+
},
|
|
48
|
+
}));
|
|
49
|
+
<% } %>
|
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
import { Stack, Link } from 'expo-router';
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
<% if (props.stylingPackage?.name === "stylesheet") { %>
|
|
3
|
+
import { StyleSheet, View } from 'react-native';
|
|
4
|
+
<% } else if (props.stylingPackage?.name === "unistyles") { %>
|
|
4
5
|
import { StyleSheet } from 'react-native-unistyles';
|
|
6
|
+
import { View } from 'react-native';
|
|
7
|
+
<% } else { %>
|
|
8
|
+
import { View } from 'react-native';
|
|
5
9
|
<% } %>
|
|
6
10
|
|
|
7
|
-
import { Button } from '
|
|
8
|
-
import { Container } from '
|
|
9
|
-
import { ScreenContent } from '
|
|
11
|
+
import { Button } from '@/components/Button';
|
|
12
|
+
import { Container } from '@/components/Container';
|
|
13
|
+
import { ScreenContent } from '@/components/ScreenContent';
|
|
10
14
|
|
|
11
15
|
<% if (props.internalizationPackage?.name === "i18next") { %>
|
|
12
16
|
import { InternalizationExample } from 'components/InternalizationExample';
|
|
@@ -14,7 +18,11 @@ import { ScreenContent } from '~/components/ScreenContent';
|
|
|
14
18
|
|
|
15
19
|
export default function Home() {
|
|
16
20
|
return (
|
|
17
|
-
|
|
21
|
+
<% if (props.stylingPackage?.name === "nativewind") { %>
|
|
22
|
+
<View className={styles.container}>
|
|
23
|
+
<% } else { %>
|
|
24
|
+
<View style={styles.container}>
|
|
25
|
+
<% } %>
|
|
18
26
|
<Stack.Screen options={{ title: 'Home' }} />
|
|
19
27
|
<Container>
|
|
20
28
|
<ScreenContent path="app/index.tsx" title="Home">
|
|
@@ -30,14 +38,29 @@ export default function Home() {
|
|
|
30
38
|
<% } %>
|
|
31
39
|
</Link>
|
|
32
40
|
</Container>
|
|
33
|
-
|
|
41
|
+
</View>
|
|
34
42
|
);
|
|
35
43
|
}
|
|
36
44
|
|
|
37
|
-
<% if (props.stylingPackage?.name === "
|
|
45
|
+
<% if (props.stylingPackage?.name === "nativewind") { %>
|
|
46
|
+
const styles = {
|
|
47
|
+
container: "flex flex-1 bg-white",
|
|
48
|
+
}
|
|
49
|
+
<% } else if (props.stylingPackage?.name === "stylesheet") { %>
|
|
50
|
+
const styles = StyleSheet.create({
|
|
51
|
+
container: {
|
|
52
|
+
flex: 1,
|
|
53
|
+
backgroundColor: 'white',
|
|
54
|
+
},
|
|
55
|
+
});
|
|
56
|
+
<% } else if (props.stylingPackage?.name === "unistyles") { %>
|
|
38
57
|
const styles = StyleSheet.create((theme) => ({
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
58
|
+
container: {
|
|
59
|
+
flex: 1,
|
|
60
|
+
backgroundColor: 'white',
|
|
61
|
+
},
|
|
62
|
+
button: {
|
|
63
|
+
marginHorizontal: theme.margins.xl,
|
|
64
|
+
},
|
|
42
65
|
}));
|
|
43
66
|
<% } %>
|
|
@@ -6,64 +6,32 @@ import { Link, Stack } from 'expo-router';
|
|
|
6
6
|
import { Text, View } from 'react-native';
|
|
7
7
|
<% } else if (props.stylingPackage?.name === "stylesheet") { %>
|
|
8
8
|
import { StyleSheet, Text, View } from 'react-native';
|
|
9
|
-
<% } else if (props.stylingPackage?.name === "tamagui") { %>
|
|
10
|
-
import { YStack } from "tamagui";
|
|
11
|
-
import { Container, Main, Subtitle, Title } from "../tamagui.config";
|
|
12
|
-
<% } else if (props.stylingPackage?.name === "restyle") { %>
|
|
13
|
-
import { Box, Text, makeStyles } from 'theme';
|
|
14
9
|
<% } %>
|
|
15
10
|
|
|
16
11
|
export default function NotFoundScreen() {
|
|
17
|
-
<% if (props.stylingPackage?.name === "restyle") { %>
|
|
18
|
-
const styles = useStyles();
|
|
19
|
-
<% } %>
|
|
20
12
|
|
|
21
13
|
return (
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
</Container>
|
|
44
|
-
<% } else if (props.stylingPackage?.name === "restyle") {%>
|
|
45
|
-
<>
|
|
46
|
-
<Stack.Screen options={{ title: 'Oops!' }} />
|
|
47
|
-
<Box flex={1} justifyContent="center" alignItems="center" padding="ml_24">
|
|
48
|
-
<Text variant="title">{"This screen doesn't exist."}</Text>
|
|
49
|
-
<Link href="/" style={styles.link}>
|
|
50
|
-
<Text variant="body" color="blue">
|
|
51
|
-
Go to home screen!
|
|
52
|
-
</Text>
|
|
53
|
-
</Link>
|
|
54
|
-
</Box>
|
|
55
|
-
</>
|
|
56
|
-
<% } else { %>
|
|
57
|
-
<>
|
|
58
|
-
<Stack.Screen options={{ title: "Oops!" }} />
|
|
59
|
-
<View style={styles.container}>
|
|
60
|
-
<Text style={styles.title}>{"This screen doesn't exist."}</Text>
|
|
61
|
-
<Link href="/" style={styles.link}>
|
|
62
|
-
<Text style={styles.linkText}>Go to home screen!</Text>
|
|
63
|
-
</Link>
|
|
64
|
-
</View>
|
|
65
|
-
</>
|
|
66
|
-
<% } %>
|
|
14
|
+
<% if (props.stylingPackage?.name === "nativewind") {%>
|
|
15
|
+
<>
|
|
16
|
+
<Stack.Screen options={{ title: "Oops!" }} />
|
|
17
|
+
<View className={styles.container}>
|
|
18
|
+
<Text className={styles.title}>{"This screen doesn't exist."}</Text>
|
|
19
|
+
<Link href="/" className={styles.link}>
|
|
20
|
+
<Text className={styles.linkText}>Go to home screen!</Text>
|
|
21
|
+
</Link>
|
|
22
|
+
</View>
|
|
23
|
+
</>
|
|
24
|
+
<% } else { %>
|
|
25
|
+
<>
|
|
26
|
+
<Stack.Screen options={{ title: "Oops!" }} />
|
|
27
|
+
<View style={styles.container}>
|
|
28
|
+
<Text style={styles.title}>{"This screen doesn't exist."}</Text>
|
|
29
|
+
<Link href="/" style={styles.link}>
|
|
30
|
+
<Text style={styles.linkText}>Go to home screen!</Text>
|
|
31
|
+
</Link>
|
|
32
|
+
</View>
|
|
33
|
+
</>
|
|
34
|
+
<% } %>
|
|
67
35
|
);
|
|
68
36
|
}
|
|
69
37
|
|
|
@@ -116,11 +84,4 @@ export default function NotFoundScreen() {
|
|
|
116
84
|
color: '#2e78b7',
|
|
117
85
|
},
|
|
118
86
|
});
|
|
119
|
-
<% } else if (props.stylingPackage?.name === "restyle") { %>
|
|
120
|
-
const useStyles = makeStyles((theme) => ({
|
|
121
|
-
link: {
|
|
122
|
-
marginTop: theme.spacing.m_16,
|
|
123
|
-
paddingVertical: theme.spacing.m_16,
|
|
124
|
-
},
|
|
125
|
-
}));
|
|
126
87
|
<% } %>
|