create-expo-stack 2.12.2 → 2.12.3-next.2ac5c4a
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 +17 -10
- package/build/templates/base/App.tsx.ejs +4 -1
- package/build/templates/base/app.json.ejs +5 -2
- package/build/templates/base/babel.config.js.ejs +11 -1
- package/build/templates/base/package.json.ejs +23 -18
- package/build/templates/packages/expo-router/drawer/app/(drawer)/(tabs)/_layout.tsx.ejs +13 -1
- package/build/templates/packages/expo-router/drawer/app/(drawer)/_layout.tsx.ejs +57 -27
- package/build/templates/packages/expo-router/drawer/app/+html.tsx.ejs +6 -3
- package/build/templates/packages/expo-router/drawer/app/+not-found.tsx.ejs +4 -5
- package/build/templates/packages/expo-router/drawer/app/_layout.tsx.ejs +30 -5
- package/build/templates/packages/expo-router/index.js.ejs +4 -0
- package/build/templates/packages/expo-router/stack/app/+html.tsx.ejs +6 -3
- package/build/templates/packages/expo-router/stack/app/+not-found.tsx.ejs +8 -11
- package/build/templates/packages/expo-router/stack/app/_layout.tsx.ejs +19 -3
- package/build/templates/packages/expo-router/stack/app/index.tsx.ejs +18 -2
- package/build/templates/packages/expo-router/tabs/app/(tabs)/_layout.tsx.ejs +20 -3
- package/build/templates/packages/expo-router/tabs/app/(tabs)/index.tsx.ejs +19 -4
- package/build/templates/packages/expo-router/tabs/app/(tabs)/two.tsx.ejs +19 -4
- package/build/templates/packages/expo-router/tabs/app/+html.tsx.ejs +6 -3
- package/build/templates/packages/expo-router/tabs/app/+not-found.tsx.ejs +3 -7
- package/build/templates/packages/expo-router/tabs/app/_layout.tsx.ejs +21 -5
- package/build/templates/packages/react-navigation/navigation/drawer-navigator.tsx.ejs +28 -0
- package/build/templates/packages/react-navigation/navigation/index.tsx.ejs +67 -10
- package/build/templates/packages/react-navigation/navigation/tab-navigator.tsx.ejs +21 -3
- package/build/templates/packages/react-navigation/screens/details.tsx.ejs +20 -4
- package/build/templates/packages/react-navigation/screens/overview.tsx.ejs +20 -5
- package/build/templates/packages/unistyles/components/BackButton.tsx.ejs +22 -20
- package/build/templates/packages/unistyles/components/Button.tsx.ejs +31 -9
- package/build/templates/packages/unistyles/components/Container.tsx.ejs +13 -5
- package/build/templates/packages/unistyles/components/EditScreenInfo.tsx.ejs +52 -49
- package/build/templates/packages/unistyles/components/ScreenContent.tsx.ejs +33 -15
- package/build/templates/packages/unistyles/theme.ts.ejs +29 -56
- package/build/templates/packages/unistyles/unistyles.ts.ejs +17 -17
- package/build/types/utilities/systemCommand.d.ts +3 -2
- package/build/utilities/configureProjectFiles.js +2 -1
- package/build/utilities/printOutput.js +24 -2
- package/build/utilities/systemCommand.js +6 -3
- package/package.json +72 -72
package/README.md
CHANGED
|
@@ -74,7 +74,7 @@ Each project is generated based on the results of the CLI, on a per-file basis.
|
|
|
74
74
|
| NativeWind | UI Framework | v4.1 | Tailwind CSS for React Native |
|
|
75
75
|
| Restyle | UI Framework | v2 | Theme-based styling library for React Native |
|
|
76
76
|
| Tamagui | UI Framework | v1 | Universal UI with a smart optimizing compiler |
|
|
77
|
-
| Unistyles | UI Framework |
|
|
77
|
+
| Unistyles | UI Framework | v3 | Superset of StyleSheet |
|
|
78
78
|
| Safe Area Context | Safe Area Library | v4 | Safe area support |
|
|
79
79
|
| React Native Web | Web Support | v0.19 | React Native for Web |
|
|
80
80
|
| Firebase | Backend and Auth | v10 | Cloud-hosted NoSQL database from Google |
|
|
@@ -260,21 +260,28 @@ Thanks go to these wonderful people:
|
|
|
260
260
|
<sub><b>Gilson Alencar</b></sub>
|
|
261
261
|
</a>
|
|
262
262
|
</td>
|
|
263
|
+
<td align="center">
|
|
264
|
+
<a href="https://github.com/jpudysz">
|
|
265
|
+
<img src="https://avatars.githubusercontent.com/u/9088288?v=4" width="100;" alt="jpudysz"/>
|
|
266
|
+
<br />
|
|
267
|
+
<sub><b>Jacek Pudysz</b></sub>
|
|
268
|
+
</a>
|
|
269
|
+
</td>
|
|
263
270
|
<td align="center">
|
|
264
271
|
<a href="https://github.com/mwarger">
|
|
265
272
|
<img src="https://avatars.githubusercontent.com/u/686823?v=4" width="100;" alt="mwarger"/>
|
|
266
273
|
<br />
|
|
267
274
|
<sub><b>Mat Warger</b></sub>
|
|
268
275
|
</a>
|
|
269
|
-
</td>
|
|
276
|
+
</td></tr>
|
|
277
|
+
<tr>
|
|
270
278
|
<td align="center">
|
|
271
279
|
<a href="https://github.com/gabimoncha">
|
|
272
280
|
<img src="https://avatars.githubusercontent.com/u/39256258?v=4" width="100;" alt="gabimoncha"/>
|
|
273
281
|
<br />
|
|
274
282
|
<sub><b>Gabimoncha</b></sub>
|
|
275
283
|
</a>
|
|
276
|
-
</td
|
|
277
|
-
<tr>
|
|
284
|
+
</td>
|
|
278
285
|
<td align="center">
|
|
279
286
|
<a href="https://github.com/ralacerda">
|
|
280
287
|
<img src="https://avatars.githubusercontent.com/u/19380403?v=4" width="100;" alt="ralacerda"/>
|
|
@@ -309,15 +316,15 @@ Thanks go to these wonderful people:
|
|
|
309
316
|
<br />
|
|
310
317
|
<sub><b>YOUNESS HASSOUNE</b></sub>
|
|
311
318
|
</a>
|
|
312
|
-
</td>
|
|
319
|
+
</td></tr>
|
|
320
|
+
<tr>
|
|
313
321
|
<td align="center">
|
|
314
322
|
<a href="https://github.com/abhishekmg">
|
|
315
323
|
<img src="https://avatars.githubusercontent.com/u/34393560?v=4" width="100;" alt="abhishekmg"/>
|
|
316
324
|
<br />
|
|
317
325
|
<sub><b>Null</b></sub>
|
|
318
326
|
</a>
|
|
319
|
-
</td
|
|
320
|
-
<tr>
|
|
327
|
+
</td>
|
|
321
328
|
<td align="center">
|
|
322
329
|
<a href="https://github.com/bautistaaa">
|
|
323
330
|
<img src="https://avatars.githubusercontent.com/u/3660667?v=4" width="100;" alt="bautistaaa"/>
|
|
@@ -352,15 +359,15 @@ Thanks go to these wonderful people:
|
|
|
352
359
|
<br />
|
|
353
360
|
<sub><b>Mahir Kadić</b></sub>
|
|
354
361
|
</a>
|
|
355
|
-
</td>
|
|
362
|
+
</td></tr>
|
|
363
|
+
<tr>
|
|
356
364
|
<td align="center">
|
|
357
365
|
<a href="https://github.com/Joehoel">
|
|
358
366
|
<img src="https://avatars.githubusercontent.com/u/31251240?v=4" width="100;" alt="Joehoel"/>
|
|
359
367
|
<br />
|
|
360
368
|
<sub><b>Joël Kuijper</b></sub>
|
|
361
369
|
</a>
|
|
362
|
-
</td
|
|
363
|
-
<tr>
|
|
370
|
+
</td>
|
|
364
371
|
<td align="center">
|
|
365
372
|
<a href="https://github.com/zamplyy">
|
|
366
373
|
<img src="https://avatars.githubusercontent.com/u/26258710?v=4" width="100;" alt="zamplyy"/>
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
<% if (props.stylingPackage?.name === "unistyles") { %>
|
|
2
|
+
import './unistyles';
|
|
3
|
+
<% } %>
|
|
1
4
|
import { ScreenContent } from 'components/ScreenContent';
|
|
2
5
|
import { StatusBar } from 'expo-status-bar';
|
|
3
6
|
|
|
@@ -29,7 +32,7 @@ import { StatusBar } from 'expo-status-bar';
|
|
|
29
32
|
<% } %>
|
|
30
33
|
|
|
31
34
|
<% if (props.stylingPackage?.name === "restyle") {%>
|
|
32
|
-
export default function App() {
|
|
35
|
+
export default function App() {
|
|
33
36
|
return (
|
|
34
37
|
<ThemeProvider theme={theme}>
|
|
35
38
|
<ScreenContent title="Home" path="App.tsx">
|
|
@@ -3,6 +3,9 @@
|
|
|
3
3
|
"name": "<%= props.projectName %>",
|
|
4
4
|
"slug": "<%= props.projectName %>",
|
|
5
5
|
"version": "1.0.0",
|
|
6
|
+
<% if (props.stylingPackage?.name === "unistyles") { %>
|
|
7
|
+
"newArchEnabled": true,
|
|
8
|
+
<% } %>
|
|
6
9
|
<% if (props.navigationPackage?.name === 'expo-router') { %>
|
|
7
10
|
"scheme": "<%= props.projectName %>",
|
|
8
11
|
"web": {
|
|
@@ -58,7 +61,7 @@
|
|
|
58
61
|
<% } %>
|
|
59
62
|
"orientation": "portrait",
|
|
60
63
|
"icon": "./assets/icon.png",
|
|
61
|
-
<% if (props.stylingPackage?.name === "nativewindui") { %>
|
|
64
|
+
<% if (props.stylingPackage?.name === "nativewindui" || props.stylingPackage?.name === "unistyles") { %>
|
|
62
65
|
"userInterfaceStyle": "automatic",
|
|
63
66
|
<% } else { %>
|
|
64
67
|
"userInterfaceStyle": "light",
|
|
@@ -81,4 +84,4 @@
|
|
|
81
84
|
}
|
|
82
85
|
}
|
|
83
86
|
}
|
|
84
|
-
}
|
|
87
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
module.exports = function(api) {
|
|
2
2
|
api.cache(true);
|
|
3
3
|
let plugins = [];
|
|
4
|
-
|
|
4
|
+
|
|
5
5
|
<% if (props.stylingPackage?.name === "tamagui") { %>
|
|
6
6
|
plugins.push([
|
|
7
7
|
'@tamagui/babel-plugin',
|
|
@@ -12,6 +12,16 @@ module.exports = function(api) {
|
|
|
12
12
|
]);
|
|
13
13
|
<% } %>
|
|
14
14
|
|
|
15
|
+
<% if (props.stylingPackage?.name === "unistyles") { %>
|
|
16
|
+
plugins.push([
|
|
17
|
+
'react-native-unistyles/plugin',
|
|
18
|
+
{
|
|
19
|
+
autoProcessRoot: 'app',
|
|
20
|
+
autoProcessImports: ['~/components']
|
|
21
|
+
}
|
|
22
|
+
]);
|
|
23
|
+
<% } %>
|
|
24
|
+
|
|
15
25
|
<% if (props.navigationPackage?.options.type === "drawer + tabs") { %>
|
|
16
26
|
plugins.push('react-native-reanimated/plugin');
|
|
17
27
|
<% } %>
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "<%= props.projectName %>",
|
|
3
3
|
"version": "1.0.0",
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
<% if (props.navigationPackage?.name === "expo-router" && props.stylingPackage?.name === 'unistyles') { %>
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
<% } else if (props.navigationPackage?.name === "expo-router") { %>
|
|
7
|
+
"main": "expo-router/entry",
|
|
8
|
+
<% } %>
|
|
7
9
|
"scripts": {
|
|
8
10
|
<% if (props.flags?.eas) { %>
|
|
9
11
|
"start": "expo start --dev-client",
|
|
@@ -71,22 +73,25 @@
|
|
|
71
73
|
<% if (props.stateManagementPackage?.name === "zustand") { %>
|
|
72
74
|
"zustand": "^4.5.1",
|
|
73
75
|
<% } %>
|
|
74
|
-
|
|
76
|
+
|
|
75
77
|
<% if (props.stylingPackage?.name === "restyle") { %>
|
|
76
78
|
"@shopify/restyle": "^2.4.2",
|
|
77
79
|
<% } %>
|
|
78
80
|
|
|
79
81
|
<% if (props.stylingPackage?.name === "tamagui") { %>
|
|
80
|
-
"tamagui": "1.
|
|
81
|
-
"@tamagui/
|
|
82
|
-
"@tamagui/shorthands": "1.
|
|
83
|
-
"@tamagui/themes": "1.
|
|
84
|
-
"
|
|
85
|
-
"
|
|
82
|
+
"@tamagui/font-inter": "^1.125.8",
|
|
83
|
+
"@tamagui/react-native-media-driver": "^1.125.8",
|
|
84
|
+
"@tamagui/shorthands": "^1.125.8",
|
|
85
|
+
"@tamagui/themes": "^1.125.8",
|
|
86
|
+
"tamagui": "^1.125.8",
|
|
87
|
+
"@tamagui/animations-react-native": "^1.125.8",
|
|
88
|
+
"expo-font": "~13.0.3",
|
|
86
89
|
<% } %>
|
|
87
90
|
|
|
88
91
|
<% if (props.stylingPackage?.name === "unistyles") { %>
|
|
89
|
-
|
|
92
|
+
"react-native-unistyles": "3.0.0-beta.8",
|
|
93
|
+
"react-native-nitro-modules": "0.24.1",
|
|
94
|
+
"react-native-edge-to-edge": "1.4.3",
|
|
90
95
|
<% } %>
|
|
91
96
|
|
|
92
97
|
<% if (props.navigationPackage?.type === "navigation") { %>
|
|
@@ -121,12 +126,12 @@
|
|
|
121
126
|
"@react-navigation/drawer": "^7.0.0",
|
|
122
127
|
"@react-navigation/bottom-tabs": "^7.0.5",
|
|
123
128
|
<% } %>
|
|
124
|
-
|
|
129
|
+
|
|
125
130
|
<% if (props.navigationPackage?.name === "expo-router") { %>
|
|
126
131
|
"@expo/vector-icons": "^14.0.0",
|
|
127
132
|
"expo-linking": "~6.3.1",
|
|
128
|
-
"expo-router": "~4.0.6",
|
|
129
|
-
"expo-constants": "~16.0.1",
|
|
133
|
+
"expo-router": "~4.0.6",
|
|
134
|
+
"expo-constants": "~16.0.1",
|
|
130
135
|
"expo-system-ui": "~3.0.4",
|
|
131
136
|
"expo-web-browser": "~13.0.3",
|
|
132
137
|
"react-dom": "18.3.1",
|
|
@@ -142,15 +147,15 @@
|
|
|
142
147
|
<% if (props.authenticationPackage?.name === "firebase") { %>
|
|
143
148
|
"firebase": "^10.5.2",
|
|
144
149
|
<% } %>
|
|
145
|
-
|
|
150
|
+
|
|
146
151
|
<% if (props.internalizationPackage?.name === "i18next") { %>
|
|
147
152
|
"i18next": "^23.7.20",
|
|
148
153
|
"react-i18next": "^14.0.1",
|
|
149
154
|
"expo-localization": "~14.8.3",
|
|
150
|
-
<% } %>
|
|
155
|
+
<% } %>
|
|
151
156
|
<% if (props.flags?.eas || props.stylingPackage?.name === "nativewindui") { %>
|
|
152
157
|
"expo-dev-client": "~5.0.4",
|
|
153
|
-
"expo-dev-launcher": "^5.0.17",
|
|
158
|
+
"expo-dev-launcher": "^5.0.17",
|
|
154
159
|
<% } %>
|
|
155
160
|
|
|
156
161
|
"expo": "^52.0.7",
|
|
@@ -175,7 +180,7 @@
|
|
|
175
180
|
"prettier-plugin-tailwindcss": "^0.5.11",
|
|
176
181
|
<% } %>
|
|
177
182
|
<% if (props.stylingPackage?.name === "tamagui") { %>
|
|
178
|
-
"@tamagui/babel-plugin": "1.
|
|
183
|
+
"@tamagui/babel-plugin": "^1.125.8",
|
|
179
184
|
<% } %>
|
|
180
185
|
"typescript": "~5.3.3"
|
|
181
186
|
},
|
|
@@ -1,13 +1,25 @@
|
|
|
1
1
|
import { Tabs } from 'expo-router';
|
|
2
2
|
import { TabBarIcon } from '~/components/TabBarIcon';
|
|
3
|
-
|
|
3
|
+
<% if (props.stylingPackage?.name === "unistyles") { %>
|
|
4
|
+
import { useUnistyles } from "react-native-unistyles";
|
|
5
|
+
<% } %>
|
|
4
6
|
|
|
5
7
|
export default function TabLayout() {
|
|
8
|
+
<% if (props.stylingPackage?.name === "unistyles") { %>
|
|
9
|
+
const { theme } = useUnistyles();
|
|
10
|
+
<% } %>
|
|
6
11
|
return (
|
|
7
12
|
<Tabs
|
|
8
13
|
screenOptions={{
|
|
9
14
|
headerShown: false,
|
|
15
|
+
<% if (props.stylingPackage?.name === "unistyles") { %>
|
|
16
|
+
tabBarActiveTintColor: theme.colors.astral,
|
|
17
|
+
tabBarStyle: {
|
|
18
|
+
backgroundColor: theme.colors.background,
|
|
19
|
+
}
|
|
20
|
+
<% } else { %>
|
|
10
21
|
tabBarActiveTintColor: 'black',
|
|
22
|
+
<% } %>
|
|
11
23
|
}}>
|
|
12
24
|
<Tabs.Screen
|
|
13
25
|
name="index"
|
|
@@ -1,35 +1,65 @@
|
|
|
1
1
|
import { Ionicons, MaterialIcons } from '@expo/vector-icons';
|
|
2
2
|
import { Link } from 'expo-router';
|
|
3
3
|
import { Drawer } from 'expo-router/drawer';
|
|
4
|
+
<% if (props.stylingPackage?.name === "unistyles") { %>
|
|
5
|
+
import { useUnistyles } from "react-native-unistyles";
|
|
6
|
+
<% } %>
|
|
4
7
|
|
|
5
8
|
import { HeaderButton } from '../../components/HeaderButton';
|
|
6
9
|
|
|
7
|
-
const DrawerLayout = () =>
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
10
|
+
const DrawerLayout = () => {
|
|
11
|
+
<% if (props.stylingPackage?.name === "unistyles") { %>
|
|
12
|
+
const { theme } = useUnistyles();
|
|
13
|
+
<% } %>
|
|
14
|
+
|
|
15
|
+
return (
|
|
16
|
+
<% if (props.stylingPackage?.name === "unistyles") { %>
|
|
17
|
+
<Drawer
|
|
18
|
+
screenOptions={{
|
|
19
|
+
headerStyle: {
|
|
20
|
+
backgroundColor: theme.colors.background,
|
|
21
|
+
},
|
|
22
|
+
headerTitleStyle: {
|
|
23
|
+
color: theme.colors.typography,
|
|
24
|
+
},
|
|
25
|
+
headerTintColor: theme.colors.typography,
|
|
26
|
+
drawerStyle: {
|
|
27
|
+
backgroundColor: theme.colors.background,
|
|
28
|
+
},
|
|
29
|
+
drawerLabelStyle: {
|
|
30
|
+
color: theme.colors.typography,
|
|
31
|
+
},
|
|
32
|
+
drawerInactiveTintColor: theme.colors.typography,
|
|
33
|
+
}}
|
|
34
|
+
>
|
|
35
|
+
<% } else { %>
|
|
36
|
+
<Drawer>
|
|
37
|
+
<% } %>
|
|
38
|
+
<Drawer.Screen
|
|
39
|
+
name="index"
|
|
40
|
+
options={{
|
|
41
|
+
headerTitle: 'Home',
|
|
42
|
+
drawerLabel: 'Home',
|
|
43
|
+
drawerIcon: ({ size, color }) => <Ionicons name="home-outline" size={size} color={color} />,
|
|
44
|
+
}}
|
|
45
|
+
/>
|
|
46
|
+
<Drawer.Screen
|
|
47
|
+
name="(tabs)"
|
|
48
|
+
options={{
|
|
49
|
+
headerTitle: 'Tabs',
|
|
50
|
+
drawerLabel: 'Tabs',
|
|
51
|
+
drawerIcon: ({ size, color }) => (
|
|
52
|
+
<MaterialIcons name="border-bottom" size={size} color={color} />
|
|
53
|
+
),
|
|
54
|
+
headerRight: () => (
|
|
55
|
+
<Link href="/modal" asChild>
|
|
56
|
+
<HeaderButton />
|
|
57
|
+
</Link>
|
|
58
|
+
),
|
|
59
|
+
}}
|
|
60
|
+
/>
|
|
61
|
+
</Drawer>
|
|
62
|
+
);
|
|
63
|
+
}
|
|
34
64
|
|
|
35
65
|
export default DrawerLayout;
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import { ScrollViewStyleReset } from 'expo-router/html';
|
|
2
|
+
<% if (props.stylingPackage?.name === "unistyles") { %>
|
|
3
|
+
import '../unistyles';
|
|
4
|
+
<% } %>
|
|
2
5
|
|
|
3
6
|
// This file is web-only and used to configure the root HTML for every
|
|
4
7
|
// web page during static rendering.
|
|
@@ -11,7 +14,7 @@ export default function Root({ children }: { children: React.ReactNode }) {
|
|
|
11
14
|
<meta charSet="utf-8" />
|
|
12
15
|
<meta httpEquiv="X-UA-Compatible" content="IE=edge" />
|
|
13
16
|
|
|
14
|
-
{/*
|
|
17
|
+
{/*
|
|
15
18
|
This viewport disables scaling which makes the mobile website act more like a native app.
|
|
16
19
|
However this does reduce built-in accessibility. If you want to enable scaling, use this instead:
|
|
17
20
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover" />
|
|
@@ -20,8 +23,8 @@ export default function Root({ children }: { children: React.ReactNode }) {
|
|
|
20
23
|
name="viewport"
|
|
21
24
|
content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1.00001,viewport-fit=cover"
|
|
22
25
|
/>
|
|
23
|
-
{/*
|
|
24
|
-
Disable body scrolling on web. This makes ScrollView components work closer to how they do on native.
|
|
26
|
+
{/*
|
|
27
|
+
Disable body scrolling on web. This makes ScrollView components work closer to how they do on native.
|
|
25
28
|
However, body scrolling is often nice to have for mobile web. If you want to enable it, remove this line.
|
|
26
29
|
*/}
|
|
27
30
|
<ScrollViewStyleReset />
|
|
@@ -4,7 +4,7 @@ import { Link, Stack } from 'expo-router';
|
|
|
4
4
|
|
|
5
5
|
import { Container } from '~/components/Container';
|
|
6
6
|
<% } else if (props.stylingPackage?.name === "unistyles") { %>
|
|
7
|
-
import {
|
|
7
|
+
import { StyleSheet } from 'react-native-unistyles'
|
|
8
8
|
import { Text } from 'react-native';
|
|
9
9
|
|
|
10
10
|
import { Container } from '~/components/Container';
|
|
@@ -24,8 +24,6 @@ import { Link, Stack } from 'expo-router';
|
|
|
24
24
|
export default function NotFoundScreen() {
|
|
25
25
|
<% if (props.stylingPackage?.name === "restyle") { %>
|
|
26
26
|
const styles = useStyles();
|
|
27
|
-
<% } else if (props.stylingPackage?.name === "unistyles") {%>
|
|
28
|
-
const { styles } = useStyles(stylesheet);
|
|
29
27
|
<% } %>
|
|
30
28
|
|
|
31
29
|
return (
|
|
@@ -84,10 +82,11 @@ export default function NotFoundScreen() {
|
|
|
84
82
|
linkText: `text-base text-[#2e78b7]`,
|
|
85
83
|
};
|
|
86
84
|
<% } else if (props.stylingPackage?.name === "unistyles") { %>
|
|
87
|
-
const
|
|
85
|
+
const styles = StyleSheet.create((theme) => ({
|
|
88
86
|
title: {
|
|
89
87
|
fontSize: 20,
|
|
90
88
|
fontWeight: 'bold',
|
|
89
|
+
color: theme.colors.typography,
|
|
91
90
|
},
|
|
92
91
|
link: {
|
|
93
92
|
marginTop: 16,
|
|
@@ -120,4 +119,4 @@ export default function NotFoundScreen() {
|
|
|
120
119
|
paddingVertical: theme.spacing.m_16,
|
|
121
120
|
},
|
|
122
121
|
}));
|
|
123
|
-
<% } %>
|
|
122
|
+
<% } %>
|
|
@@ -4,9 +4,6 @@
|
|
|
4
4
|
import '../global.css';
|
|
5
5
|
import 'expo-dev-client';
|
|
6
6
|
<% } %>
|
|
7
|
-
<% if (props.stylingPackage?.name === "unistyles") { %>
|
|
8
|
-
import '../unistyles';
|
|
9
|
-
<% } %>
|
|
10
7
|
|
|
11
8
|
<% if (props.internalizationPackage?.name === "i18next") { %>
|
|
12
9
|
import '../translation';
|
|
@@ -27,10 +24,14 @@ import { Stack } from 'expo-router';
|
|
|
27
24
|
SplashScreen.preventAutoHideAsync();
|
|
28
25
|
<% } else if (props.stylingPackage?.name === "restyle") { %>
|
|
29
26
|
import { ThemeProvider } from '@shopify/restyle';
|
|
30
|
-
|
|
27
|
+
|
|
31
28
|
import { theme } from '../theme';
|
|
32
29
|
<% } %>
|
|
33
30
|
|
|
31
|
+
<% if (props.stylingPackage?.name === "unistyles") { %>
|
|
32
|
+
import { useUnistyles } from "react-native-unistyles";
|
|
33
|
+
<% } %>
|
|
34
|
+
|
|
34
35
|
<% if (props.analyticsPackage?.name === "vexo-analytics") { %>
|
|
35
36
|
import { vexo } from 'vexo-analytics';
|
|
36
37
|
|
|
@@ -57,6 +58,9 @@ export default function RootLayout() {
|
|
|
57
58
|
|
|
58
59
|
if (!loaded) return null;
|
|
59
60
|
<% } %>
|
|
61
|
+
<% if (props.stylingPackage?.name === "unistyles") { %>
|
|
62
|
+
const { theme } = useUnistyles();
|
|
63
|
+
<% } %>
|
|
60
64
|
|
|
61
65
|
return (
|
|
62
66
|
<% if (props.stylingPackage?.name === "tamagui") { %>
|
|
@@ -65,7 +69,28 @@ export default function RootLayout() {
|
|
|
65
69
|
<ThemeProvider theme={theme}>
|
|
66
70
|
<% } %>
|
|
67
71
|
<GestureHandlerRootView style={{ flex: 1 }}>
|
|
72
|
+
<% if (props.stylingPackage?.name === "unistyles") { %>
|
|
73
|
+
<Stack
|
|
74
|
+
screenOptions={{
|
|
75
|
+
headerStyle: {
|
|
76
|
+
backgroundColor: theme.colors.background,
|
|
77
|
+
},
|
|
78
|
+
headerTitleStyle: {
|
|
79
|
+
color: theme.colors.typography,
|
|
80
|
+
},
|
|
81
|
+
headerTintColor: theme.colors.typography,
|
|
82
|
+
drawerStyle: {
|
|
83
|
+
backgroundColor: theme.colors.background,
|
|
84
|
+
},
|
|
85
|
+
drawerLabelStyle: {
|
|
86
|
+
color: theme.colors.typography,
|
|
87
|
+
},
|
|
88
|
+
drawerInactiveTintColor: theme.colors.typography,
|
|
89
|
+
}}
|
|
90
|
+
>
|
|
91
|
+
<% } else { %>
|
|
68
92
|
<Stack>
|
|
93
|
+
<% } %>
|
|
69
94
|
<Stack.Screen name="(drawer)" options={{ headerShown: false }} />
|
|
70
95
|
<Stack.Screen name="modal" options={{ title: 'Modal', presentation: 'modal' }} />
|
|
71
96
|
</Stack>
|
|
@@ -76,4 +101,4 @@ export default function RootLayout() {
|
|
|
76
101
|
</ThemeProvider>
|
|
77
102
|
<% } %>
|
|
78
103
|
);
|
|
79
|
-
}
|
|
104
|
+
}
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import { ScrollViewStyleReset } from 'expo-router/html';
|
|
2
|
+
<% if (props.stylingPackage?.name === "unistyles") { %>
|
|
3
|
+
import '../unistyles';
|
|
4
|
+
<% } %>
|
|
2
5
|
|
|
3
6
|
// This file is web-only and used to configure the root HTML for every
|
|
4
7
|
// web page during static rendering.
|
|
@@ -11,7 +14,7 @@ export default function Root({ children }: { children: React.ReactNode }) {
|
|
|
11
14
|
<meta charSet="utf-8" />
|
|
12
15
|
<meta httpEquiv="X-UA-Compatible" content="IE=edge" />
|
|
13
16
|
|
|
14
|
-
{/*
|
|
17
|
+
{/*
|
|
15
18
|
This viewport disables scaling which makes the mobile website act more like a native app.
|
|
16
19
|
However this does reduce built-in accessibility. If you want to enable scaling, use this instead:
|
|
17
20
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover" />
|
|
@@ -20,8 +23,8 @@ export default function Root({ children }: { children: React.ReactNode }) {
|
|
|
20
23
|
name="viewport"
|
|
21
24
|
content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1.00001,viewport-fit=cover"
|
|
22
25
|
/>
|
|
23
|
-
{/*
|
|
24
|
-
Disable body scrolling on web. This makes ScrollView components work closer to how they do on native.
|
|
26
|
+
{/*
|
|
27
|
+
Disable body scrolling on web. This makes ScrollView components work closer to how they do on native.
|
|
25
28
|
However, body scrolling is often nice to have for mobile web. If you want to enable it, remove this line.
|
|
26
29
|
*/}
|
|
27
30
|
<ScrollViewStyleReset />
|
|
@@ -4,7 +4,7 @@ import { Link, Stack } from 'expo-router';
|
|
|
4
4
|
|
|
5
5
|
import { Container } from '~/components/Container';
|
|
6
6
|
<% } else if (props.stylingPackage?.name === "unistyles") { %>
|
|
7
|
-
import {
|
|
7
|
+
import { StyleSheet } from 'react-native-unistyles'
|
|
8
8
|
import { Text } from 'react-native';
|
|
9
9
|
|
|
10
10
|
import { Container } from '~/components/Container';
|
|
@@ -26,10 +26,6 @@ export default function NotFoundScreen() {
|
|
|
26
26
|
const styles = useStyles();
|
|
27
27
|
<% } %>
|
|
28
28
|
|
|
29
|
-
<% if (props.stylingPackage?.name === "unistyles") {%>
|
|
30
|
-
const { styles } = useStyles(stylesheet)
|
|
31
|
-
<% } %>
|
|
32
|
-
|
|
33
29
|
return (
|
|
34
30
|
<% if (props.stylingPackage?.name === "nativewind") {%>
|
|
35
31
|
<>
|
|
@@ -86,10 +82,11 @@ export default function NotFoundScreen() {
|
|
|
86
82
|
linkText: `text-base text-[#2e78b7]`,
|
|
87
83
|
};
|
|
88
84
|
<% } else if (props.stylingPackage?.name === "unistyles") { %>
|
|
89
|
-
|
|
85
|
+
const styles = StyleSheet.create((theme) => ({
|
|
90
86
|
title: {
|
|
91
87
|
fontSize: 20,
|
|
92
88
|
fontWeight: 'bold',
|
|
89
|
+
color: theme.colors.typography,
|
|
93
90
|
},
|
|
94
91
|
link: {
|
|
95
92
|
marginTop: 16,
|
|
@@ -97,11 +94,11 @@ export default function NotFoundScreen() {
|
|
|
97
94
|
},
|
|
98
95
|
linkText: {
|
|
99
96
|
fontSize: 14,
|
|
100
|
-
color:
|
|
97
|
+
color: theme.colors.astral
|
|
101
98
|
},
|
|
102
|
-
|
|
99
|
+
}));
|
|
103
100
|
<% } else if (props.stylingPackage?.name === "stylesheet") { %>
|
|
104
|
-
|
|
101
|
+
const styles = StyleSheet.create({
|
|
105
102
|
title: {
|
|
106
103
|
fontSize: 20,
|
|
107
104
|
fontWeight: 'bold',
|
|
@@ -114,7 +111,7 @@ export default function NotFoundScreen() {
|
|
|
114
111
|
fontSize: 14,
|
|
115
112
|
color: '#2e78b7',
|
|
116
113
|
},
|
|
117
|
-
|
|
114
|
+
});
|
|
118
115
|
<% } else if (props.stylingPackage?.name === "restyle") { %>
|
|
119
116
|
const useStyles = makeStyles((theme) => ({
|
|
120
117
|
link: {
|
|
@@ -122,4 +119,4 @@ export default function NotFoundScreen() {
|
|
|
122
119
|
paddingVertical: theme.spacing.m_16,
|
|
123
120
|
},
|
|
124
121
|
}));
|
|
125
|
-
<% } %>
|
|
122
|
+
<% } %>
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<% } %>
|
|
4
4
|
|
|
5
5
|
<% if (props.stylingPackage?.name === "unistyles") { %>
|
|
6
|
-
import
|
|
6
|
+
import { useUnistyles } from "react-native-unistyles";
|
|
7
7
|
<% } %>
|
|
8
8
|
<% if (props.internalizationPackage?.name === "i18next") { %>
|
|
9
9
|
import '../translation';
|
|
@@ -29,7 +29,9 @@ import '../unistyles';
|
|
|
29
29
|
<% } %>
|
|
30
30
|
|
|
31
31
|
export default function Layout() {
|
|
32
|
-
|
|
32
|
+
<% if (props.stylingPackage?.name === "unistyles") { %>
|
|
33
|
+
const { theme } = useUnistyles();
|
|
34
|
+
<% } %>
|
|
33
35
|
<% if (props.stylingPackage?.name === "tamagui") { %>
|
|
34
36
|
const [loaded] = useFonts({
|
|
35
37
|
Inter: require("@tamagui/font-inter/otf/Inter-Medium.otf"),
|
|
@@ -51,7 +53,21 @@ export default function Layout() {
|
|
|
51
53
|
<% } else if (props.stylingPackage?.name === "restyle") { %>
|
|
52
54
|
<ThemeProvider theme={theme}>
|
|
53
55
|
<% } %>
|
|
54
|
-
|
|
56
|
+
<% if (props.stylingPackage?.name === "unistyles") { %>
|
|
57
|
+
<Stack
|
|
58
|
+
screenOptions={{
|
|
59
|
+
headerStyle: {
|
|
60
|
+
backgroundColor: theme.colors.background,
|
|
61
|
+
},
|
|
62
|
+
headerTitleStyle: {
|
|
63
|
+
color: theme.colors.typography,
|
|
64
|
+
},
|
|
65
|
+
headerTintColor: theme.colors.typography
|
|
66
|
+
}}
|
|
67
|
+
/>
|
|
68
|
+
<% } else { %>
|
|
69
|
+
<Stack />
|
|
70
|
+
<% } %>
|
|
55
71
|
<% if (props.stylingPackage?.name === "tamagui") { %>
|
|
56
72
|
</TamaguiProvider>
|
|
57
73
|
<% } else if (props.stylingPackage?.name === "restyle") { %>
|