create-expo-stack 2.10.0-next.8907a81 → 2.10.0-next.aa45674
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.
|
@@ -1,96 +1,68 @@
|
|
|
1
|
-
|
|
2
|
-
import '
|
|
3
|
-
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
import { ActionSheetProvider } from '@expo/react-native-action-sheet';
|
|
1
|
+
<% if (props.stylingPackage?.name === "nativewind") { %>
|
|
2
|
+
import '../global.css';
|
|
3
|
+
<% } else if (props.stylingPackage?.name === "nativewinui") { %>
|
|
4
|
+
import '../global.css';
|
|
5
|
+
import 'expo-dev-client';
|
|
7
6
|
<% } %>
|
|
8
|
-
<% if (props.stylingPackage?.
|
|
9
|
-
import
|
|
7
|
+
<% if (props.stylingPackage?.name === "unistyles") { %>
|
|
8
|
+
import '../unistyles';
|
|
10
9
|
<% } %>
|
|
11
|
-
|
|
12
|
-
import
|
|
13
|
-
import { Pressable, View } from 'react-native';
|
|
14
|
-
<% if (props.stylingPackage?.options.selectedComponents.includes('bottom-sheet')) { %>
|
|
15
|
-
import { GestureHandlerRootView } from 'react-native-gesture-handler';
|
|
10
|
+
<% if (props.internalizationPackage?.name === "i18next") { %>
|
|
11
|
+
import '../translation';
|
|
16
12
|
<% } %>
|
|
17
13
|
|
|
18
|
-
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
14
|
+
<% if (props.stylingPackage?.name === "tamagui") { %>
|
|
15
|
+
import React, { useEffect } from "react";
|
|
16
|
+
import { TamaguiProvider } from 'tamagui'
|
|
17
|
+
import { SplashScreen, Stack } from "expo-router";
|
|
18
|
+
import { useFonts } from "expo-font";
|
|
22
19
|
|
|
23
|
-
|
|
24
|
-
// Catch any errors thrown by the Layout component.
|
|
25
|
-
ErrorBoundary,
|
|
26
|
-
} from 'expo-router';
|
|
20
|
+
import config from '../tamagui.config'
|
|
27
21
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
style={isDarkColorScheme ? 'light' : 'dark'}
|
|
37
|
-
/>
|
|
38
|
-
<% if (props.stylingPackage?.options.selectedComponents.includes('bottom-sheet')) { %>
|
|
39
|
-
<GestureHandlerRootView style={{ flex: 1 }}>
|
|
40
|
-
<BottomSheetModalProvider>
|
|
41
|
-
<% } %>
|
|
42
|
-
<% if (props.stylingPackage?.options.selectedComponents.includes('action-sheet')) { %>
|
|
43
|
-
<ActionSheetProvider>
|
|
44
|
-
<% } %>
|
|
45
|
-
<NavThemeProvider value={NAV_THEME[colorScheme]}>
|
|
46
|
-
<Stack screenOptions={SCREEN_OPTIONS}>
|
|
47
|
-
<Stack.Screen name="(tabs)" options={TABS_OPTIONS} />
|
|
48
|
-
<Stack.Screen name="modal" options={MODAL_OPTIONS} />
|
|
49
|
-
</Stack>
|
|
50
|
-
</NavThemeProvider>
|
|
51
|
-
<% if (props.stylingPackage?.options.selectedComponents.includes('action-sheet')) { %>
|
|
52
|
-
</ActionSheetProvider>
|
|
53
|
-
<% } %>
|
|
54
|
-
<% if (props.stylingPackage?.options.selectedComponents.includes('bottom-sheet')) { %>
|
|
55
|
-
</BottomSheetModalProvider>
|
|
56
|
-
</GestureHandlerRootView>
|
|
57
|
-
<% } %>
|
|
58
|
-
</>
|
|
59
|
-
);
|
|
60
|
-
}
|
|
22
|
+
SplashScreen.preventAutoHideAsync();
|
|
23
|
+
<% } else if (props.stylingPackage?.name === "restyle") { %>
|
|
24
|
+
import { ThemeProvider } from '@shopify/restyle';
|
|
25
|
+
import { Stack } from 'expo-router';
|
|
26
|
+
import { theme } from 'theme';
|
|
27
|
+
<% } else { %>
|
|
28
|
+
import { Stack } from "expo-router";
|
|
29
|
+
<% } %>
|
|
61
30
|
|
|
62
|
-
const
|
|
63
|
-
|
|
64
|
-
|
|
31
|
+
export const unstable_settings = {
|
|
32
|
+
// Ensure that reloading on `/modal` keeps a back button present.
|
|
33
|
+
initialRouteName: "(tabs)",
|
|
34
|
+
};
|
|
65
35
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
36
|
+
export default function RootLayout() {
|
|
37
|
+
<% if (props.stylingPackage?.name === "tamagui") { %>
|
|
38
|
+
const [loaded] = useFonts({
|
|
39
|
+
Inter: require("@tamagui/font-inter/otf/Inter-Medium.otf"),
|
|
40
|
+
InterBold: require("@tamagui/font-inter/otf/Inter-Bold.otf")
|
|
41
|
+
});
|
|
69
42
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
}
|
|
43
|
+
useEffect(() => {
|
|
44
|
+
if (loaded) {
|
|
45
|
+
SplashScreen.hideAsync();
|
|
46
|
+
}
|
|
47
|
+
}, [loaded]);
|
|
75
48
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
return (
|
|
79
|
-
<Link href="/modal" asChild>
|
|
80
|
-
<Pressable className="opacity-80">
|
|
81
|
-
{({ pressed }) => (
|
|
82
|
-
<View className={cn(pressed ? 'opacity-50' : 'opacity-90')}>
|
|
83
|
-
<Icon name="cog-outline" color={colors.foreground} />
|
|
84
|
-
</View>
|
|
85
|
-
)}
|
|
86
|
-
</Pressable>
|
|
87
|
-
</Link>
|
|
88
|
-
);
|
|
89
|
-
}
|
|
49
|
+
if (!loaded) return null;
|
|
50
|
+
<% } %>
|
|
90
51
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
}
|
|
52
|
+
return (
|
|
53
|
+
<% if (props.stylingPackage?.name === "tamagui") { %>
|
|
54
|
+
<TamaguiProvider config={config}>
|
|
55
|
+
<% } else if (props.stylingPackage?.name === "restyle") { %>
|
|
56
|
+
<ThemeProvider theme={theme}>
|
|
57
|
+
<% } %>
|
|
58
|
+
<Stack>
|
|
59
|
+
<Stack.Screen name="(tabs)" options={{ headerShown: false }} />
|
|
60
|
+
<Stack.Screen name="modal" options={{ presentation: "modal" }} />
|
|
61
|
+
</Stack>
|
|
62
|
+
<% if (props.stylingPackage?.name === "tamagui") { %>
|
|
63
|
+
</TamaguiProvider>
|
|
64
|
+
<% } else if (props.stylingPackage?.name === "restyle") { %>
|
|
65
|
+
</ThemeProvider>
|
|
66
|
+
<% } %>
|
|
67
|
+
);
|
|
68
|
+
}
|