create-expo-stack 2.5.0-next.738ca1b → 2.5.0-next.77e2bc3

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.
Files changed (55) hide show
  1. package/build/templates/base/App.tsx.ejs +44 -110
  2. package/build/templates/base/components/BackButton.tsx.ejs +23 -0
  3. package/build/templates/base/components/Button.tsx.ejs +40 -0
  4. package/build/templates/base/components/EditScreenInfo.tsx.ejs +55 -0
  5. package/build/templates/base/components/HeaderButton.tsx.ejs +28 -0
  6. package/build/templates/base/components/ScreenContent.tsx.ejs +38 -0
  7. package/build/templates/base/components/TabBarIcon.tsx.ejs +15 -0
  8. package/build/templates/packages/expo-router/drawer/app/(drawer)/(tabs)/_layout.tsx.ejs +1 -13
  9. package/build/templates/packages/expo-router/drawer/app/(drawer)/(tabs)/index.tsx.ejs +18 -84
  10. package/build/templates/packages/expo-router/drawer/app/(drawer)/(tabs)/two.tsx.ejs +18 -84
  11. package/build/templates/packages/expo-router/drawer/app/(drawer)/_layout.tsx.ejs +4 -18
  12. package/build/templates/packages/expo-router/drawer/app/(drawer)/index.tsx.ejs +12 -98
  13. package/build/templates/packages/expo-router/drawer/app/modal.tsx.ejs +16 -92
  14. package/build/templates/packages/expo-router/stack/app/details.tsx.ejs +17 -171
  15. package/build/templates/packages/expo-router/stack/app/index.tsx.ejs +20 -202
  16. package/build/templates/packages/expo-router/tabs/app/(tabs)/_layout.tsx.ejs +6 -50
  17. package/build/templates/packages/expo-router/tabs/app/(tabs)/index.tsx.ejs +18 -102
  18. package/build/templates/packages/expo-router/tabs/app/(tabs)/two.tsx.ejs +18 -83
  19. package/build/templates/packages/expo-router/tabs/app/modal.tsx.ejs +17 -92
  20. package/build/templates/packages/i18next/components/InternalizationExample.tsx.ejs +1 -1
  21. package/build/templates/packages/i18next/translation/en.json.ejs +3 -3
  22. package/build/templates/packages/i18next/translation/fr.json.ejs +3 -3
  23. package/build/templates/packages/nativewind/components/BackButton.tsx.ejs +18 -0
  24. package/build/templates/packages/nativewind/components/Button.tsx.ejs +14 -0
  25. package/build/templates/packages/nativewind/components/EditScreenInfo.tsx.ejs +40 -0
  26. package/build/templates/packages/nativewind/components/ScreenContent.tsx.ejs +25 -0
  27. package/build/templates/packages/react-navigation/App.tsx.ejs +1 -1
  28. package/build/templates/packages/react-navigation/navigation/drawer-navigator.tsx.ejs +14 -26
  29. package/build/templates/packages/react-navigation/navigation/index.tsx.ejs +2 -101
  30. package/build/templates/packages/react-navigation/navigation/tab-navigator.tsx.ejs +8 -62
  31. package/build/templates/packages/react-navigation/screens/details.tsx.ejs +22 -108
  32. package/build/templates/packages/react-navigation/screens/home.tsx.ejs +3 -100
  33. package/build/templates/packages/react-navigation/screens/modal.tsx.ejs +16 -104
  34. package/build/templates/packages/react-navigation/screens/one.tsx.ejs +2 -115
  35. package/build/templates/packages/react-navigation/screens/overview.tsx.ejs +37 -199
  36. package/build/templates/packages/react-navigation/screens/two.tsx.ejs +3 -98
  37. package/build/templates/packages/restyle/components/BackButton.tsx.ejs +15 -0
  38. package/build/templates/packages/restyle/components/Button.tsx.ejs +32 -0
  39. package/build/templates/packages/restyle/components/EditScreenInfo.tsx.ejs +29 -0
  40. package/build/templates/packages/restyle/components/ScreenContent.tsx.ejs +20 -0
  41. package/build/templates/packages/tamagui/components/BackButton.tsx.ejs +19 -0
  42. package/build/templates/packages/tamagui/components/Button.tsx.ejs +9 -0
  43. package/build/templates/packages/tamagui/components/EditScreenInfo.tsx.ejs +29 -0
  44. package/build/templates/packages/tamagui/components/ScreenContent.tsx.ejs +22 -0
  45. package/build/templates/packages/unistyles/components/BackButton.tsx.ejs +26 -0
  46. package/build/templates/packages/unistyles/components/Button.tsx.ejs +12 -0
  47. package/build/templates/packages/unistyles/components/EditScreenInfo.tsx.ejs +61 -0
  48. package/build/templates/packages/unistyles/components/ScreenContent.tsx.ejs +24 -0
  49. package/build/templates/packages/unistyles/theme.ts.ejs +30 -46
  50. package/build/utilities/configureProjectFiles.js +68 -10
  51. package/build/utilities/generateProjectFiles.js +2 -2
  52. package/package.json +1 -1
  53. package/build/templates/packages/expo-router/drawer/components/edit-screen-info.tsx.ejs +0 -153
  54. package/build/templates/packages/expo-router/tabs/components/edit-screen-info.tsx.ejs +0 -153
  55. package/build/templates/packages/react-navigation/components/edit-screen-info.tsx.ejs +0 -180
@@ -1,153 +0,0 @@
1
- <% if (props.stylingPackage?.name === "nativewind") { %>
2
- import { Text, View } from "react-native";
3
- <% } else if (props.stylingPackage?.name === "tamagui") { %>
4
- import { YStack, H4, Paragraph } from "tamagui"
5
- <% } else if (props.stylingPackage?.name === "restyle") { %>
6
- import { Box, Text } from 'theme';
7
- <% } else if (props.stylingPackage?.name === "unistyles") { %>
8
- import { createStyleSheet, useStyles } from 'react-native-unistyles'
9
- import { Text, View } from 'react-native';
10
- <% } else { %>
11
- import { StyleSheet, Text, View } from "react-native";
12
- <% } %>
13
-
14
- export default function EditScreenInfo({ path }: { path: string }) {
15
- <% if (props.stylingPackage?.name === "unistyles") { %>
16
- const { styles } = useStyles(stylesheet);
17
- <% } %>
18
- <% if (props.stylingPackage?.name === "nativewind") { %>
19
- return (
20
- <View>
21
- <View className={styles.getStartedContainer}>
22
- <Text className={styles.getStartedText}>
23
- Open up the code for this screen:
24
- </Text>
25
- <View className={styles.codeHighlightContainer + styles.homeScreenFilename}>
26
- <Text>{path}</Text>
27
- </View>
28
- <Text className={styles.getStartedText}>
29
- Change any of the text, save the file, and your app will automatically update.
30
- </Text>
31
- </View>
32
- </View>
33
- );
34
- <% } else if (props.stylingPackage?.name === "tamagui") { %>
35
- return (
36
- <YStack>
37
- <YStack alignItems="center" marginHorizontal="$6">
38
- <H4>
39
- Open up the code for this screen:
40
- </H4>
41
- <YStack borderRadius="$3" marginVertical="$1">
42
- <Paragraph>{path}</Paragraph>
43
- </YStack>
44
- <Paragraph>
45
- Change any of the text, save the file, and your app will automatically update.
46
- </Paragraph>
47
- </YStack>
48
- </YStack>
49
- );
50
- <% } else if (props.stylingPackage?.name === "restyle") { %>
51
- return (
52
- <Box alignItems="center" marginHorizontal="xl_64">
53
- <Text variant="body" lineHeight={24} textAlign="center">
54
- Open up the code for this screen:
55
- </Text>
56
- <Box borderRadius="s_3" paddingHorizontal="xs_4" marginVertical="s_8">
57
- <Text>{path}</Text>
58
- </Box>
59
- <Text variant="body" lineHeight={24} textAlign="center">
60
- Change any of the text, save the file, and your app will automatically update.
61
- </Text>
62
- </Box>
63
- );
64
- <% } else { %>
65
- return (
66
- <View>
67
- <View style={styles.getStartedContainer}>
68
- <Text style={styles.getStartedText}>
69
- Open up the code for this screen:
70
- </Text>
71
- <View style={[styles.codeHighlightContainer, styles.homeScreenFilename]}>
72
- <Text>{path}</Text>
73
- </View>
74
- <Text style={styles.getStartedText}>
75
- Change any of the text, save the file, and your app will automatically update.
76
- </Text>
77
- </View>
78
- </View>
79
- );
80
- <% } %>
81
- }
82
-
83
- <% if (props.stylingPackage?.name === "nativewind") { %>
84
- const styles = {
85
- codeHighlightContainer: `rounded-md px-1`,
86
- getStartedContainer: `items-center mx-12`,
87
- getStartedText: `text-lg leading-6 text-center`,
88
- helpContainer: `items-center mx-5 mt-4`,
89
- helpLink: `py-4`,
90
- helpLinkText: `text-center`,
91
- homeScreenFilename: `my-2`,
92
- };
93
- <% } else if (props.stylingPackage?.name === "unistyles") { %>
94
- const stylesheet = createStyleSheet({
95
- codeHighlightContainer: {
96
- borderRadius: 3,
97
- paddingHorizontal: 4
98
- },
99
- getStartedContainer: {
100
- alignItems: 'center',
101
- marginHorizontal: 50
102
- },
103
- getStartedText: {
104
- fontSize: 17,
105
- lineHeight: 24,
106
- textAlign: 'center'
107
- },
108
- helpContainer: {
109
- alignItems: 'center',
110
- marginHorizontal: 20,
111
- marginTop: 15
112
- },
113
- helpLink: {
114
- paddingVertical: 15
115
- },
116
- helpLinkText: {
117
- textAlign: 'center'
118
- },
119
- homeScreenFilename: {
120
- marginVertical: 7
121
- }
122
- });
123
- <% } else if (props.stylingPackage?.name === "stylesheet") { %>
124
- const styles = StyleSheet.create({
125
- codeHighlightContainer: {
126
- borderRadius: 3,
127
- paddingHorizontal: 4
128
- },
129
- getStartedContainer: {
130
- alignItems: "center",
131
- marginHorizontal: 50
132
- },
133
- getStartedText: {
134
- fontSize: 17,
135
- lineHeight: 24,
136
- textAlign: "center"
137
- },
138
- helpContainer: {
139
- alignItems: "center",
140
- marginHorizontal: 20,
141
- marginTop: 15
142
- },
143
- helpLink: {
144
- paddingVertical: 15
145
- },
146
- helpLinkText: {
147
- textAlign: "center"
148
- },
149
- homeScreenFilename: {
150
- marginVertical: 7
151
- }
152
- });
153
- <% } %>
@@ -1,180 +0,0 @@
1
- import React from "react";
2
- <% if (props.stylingPackage?.name === "nativewind") { %>
3
- import { Text, View } from "react-native";
4
- <% } else if (props.stylingPackage?.name === "restyle") { %>
5
- import { Box, Text } from 'theme';
6
- <% } else if (props.stylingPackage?.name === "unistyles") { %>
7
- import { createStyleSheet, useStyles } from 'react-native-unistyles'
8
- import { Text, View } from 'react-native';
9
- <% } else { %>
10
- import { StyleSheet, Text, View } from "react-native";
11
- <% } %>
12
-
13
- <% if (props.stylingPackage?.name === "nativewind") { %>
14
- export default function EditScreenInfo({ path }: { path: string }) {
15
- return (
16
- <View>
17
- <View className={styles.getStartedContainer}>
18
- <Text
19
- className={styles.getStartedText}>
20
- Open up the code for this screen:
21
- </Text>
22
-
23
- <View
24
- className={styles.codeHighlightContainer}
25
- >
26
- <Text>{path}</Text>
27
- </View>
28
-
29
- <Text
30
- className={styles.getStartedText}
31
- >
32
- Change any of the text, save the file, and your app will automatically update.
33
- </Text>
34
- </View>
35
- </View>
36
- );
37
- }
38
- <% } else if (props.stylingPackage?.name === "restyle") { %>
39
- export default function EditScreenInfo({ path }: { path: string }) {
40
- return (
41
- <Box>
42
- <Box alignItems="center" marginHorizontal="xl_64">
43
- <Text variant="body" lineHeight={24} textAlign="center">
44
- Open up the code for this screen:
45
- </Text>
46
-
47
- <Box borderRadius="s_3" paddingHorizontal="xs_4" marginVertical="s_8">
48
- <Text>{path}</Text>
49
- </Box>
50
-
51
- <Text variant="body" lineHeight={24} textAlign="center">
52
- Change any of the text, save the file, and your app will automatically update.
53
- </Text>
54
- </Box>
55
- </Box>
56
- );
57
- }
58
- <% } else if (props.stylingPackage?.name === "unistyles") { %>
59
- export default function EditScreenInfo({ path }: { path: string }) {
60
- const { styles } = useStyles(stylesheet)
61
- return (
62
- <View>
63
- <View style={styles.getStartedContainer}>
64
- <Text
65
- style={styles.getStartedText}>
66
- Open up the code for this screen:
67
- </Text>
68
-
69
- <View
70
- style={[styles.codeHighlightContainer, styles.homeScreenFilename]}
71
- >
72
- <Text>{path}</Text>
73
- </View>
74
-
75
- <Text
76
- style={styles.getStartedText}
77
- >
78
- Change any of the text, save the file, and your app will automatically update.
79
- </Text>
80
- </View>
81
- </View>
82
- );
83
- }
84
- <% } else { %>
85
- export default function EditScreenInfo({ path }: { path: string }) {
86
- return (
87
- <View>
88
- <View style={styles.getStartedContainer}>
89
- <Text
90
- style={styles.getStartedText}>
91
- Open up the code for this screen:
92
- </Text>
93
-
94
- <View
95
- style={[styles.codeHighlightContainer, styles.homeScreenFilename]}
96
- >
97
- <Text>{path}</Text>
98
- </View>
99
-
100
- <Text
101
- style={styles.getStartedText}
102
- >
103
- Change any of the text, save the file, and your app will automatically update.
104
- </Text>
105
- </View>
106
- </View>
107
- );
108
- }
109
- <% } %>
110
-
111
- <% if (props.stylingPackage?.name === "nativewind") { %>
112
- const styles = {
113
- codeHighlightContainer: "rounded-md px-1 my-2",
114
- getStartedContainer: "items-center mx-12",
115
- getStartedText: "text-lg leading-6 text-center",
116
- helpContainer: "items-center mx-5 mt-4",
117
- helpLink: "py-4",
118
- helpLinkText: "text-center"
119
- };
120
- <% } else if (props.stylingPackage?.name === "unistyles") { %>
121
- const stylesheet = createStyleSheet({
122
- codeHighlightContainer: {
123
- borderRadius: 3,
124
- paddingHorizontal: 4
125
- },
126
- getStartedContainer: {
127
- alignItems: 'center',
128
- marginHorizontal: 50
129
- },
130
- getStartedText: {
131
- fontSize: 17,
132
- lineHeight: 24,
133
- textAlign: 'center'
134
- },
135
- helpContainer: {
136
- alignItems: 'center',
137
- marginHorizontal: 20,
138
- marginTop: 15
139
- },
140
- helpLink: {
141
- paddingVertical: 15
142
- },
143
- helpLinkText: {
144
- textAlign: 'center'
145
- },
146
- homeScreenFilename: {
147
- marginVertical: 7
148
- }
149
- });
150
- <% } else if (props.stylingPackage?.name !== "restyle") { %>
151
- const styles = StyleSheet.create({
152
- codeHighlightContainer: {
153
- borderRadius: 3,
154
- paddingHorizontal: 4
155
- },
156
- getStartedContainer: {
157
- alignItems: "center",
158
- marginHorizontal: 50
159
- },
160
- getStartedText: {
161
- fontSize: 17,
162
- lineHeight: 24,
163
- textAlign: "center"
164
- },
165
- helpContainer: {
166
- alignItems: "center",
167
- marginHorizontal: 20,
168
- marginTop: 15
169
- },
170
- helpLink: {
171
- paddingVertical: 15
172
- },
173
- helpLinkText: {
174
- textAlign: "center"
175
- },
176
- homeScreenFilename: {
177
- marginVertical: 7
178
- }
179
- });
180
- <% } %>