create-expo-stack 2.18.5 → 2.18.6-next.4a27460
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/build/templates/packages/react-navigation/App.tsx.ejs +42 -11
- package/build/templates/packages/react-navigation/navigation/drawer-navigator.tsx.ejs +20 -55
- package/build/templates/packages/react-navigation/navigation/index.tsx.ejs +87 -135
- package/build/templates/packages/react-navigation/navigation/tab-navigator.tsx.ejs +30 -52
- package/build/templates/packages/react-navigation/screens/details.tsx.ejs +6 -8
- package/build/templates/packages/react-navigation/screens/overview.tsx.ejs +1 -5
- package/package.json +73 -72
|
@@ -6,13 +6,20 @@
|
|
|
6
6
|
<% } %>
|
|
7
7
|
<% if (props.stylingPackage?.name === "unistyles") { %>
|
|
8
8
|
import './unistyles';
|
|
9
|
+
import { DefaultTheme, DarkTheme } from '@react-navigation/native';
|
|
10
|
+
import { useUnistyles } from 'react-native-unistyles';
|
|
11
|
+
import { useMemo } from 'react';
|
|
12
|
+
<% } else if (props.stylingPackage?.name === "tamagui" || props.stylingPackage?.name === "restyle" || props.stylingPackage?.name === "nativewind" || props.stylingPackage?.name === "stylesheet") { %>
|
|
13
|
+
import { DefaultTheme, DarkTheme } from '@react-navigation/native';
|
|
14
|
+
import { useColorScheme } from 'react-native';
|
|
15
|
+
import { useMemo } from 'react';
|
|
9
16
|
<% } %>
|
|
10
17
|
<% if (props.internalizationPackage?.name === "i18next") { %>
|
|
11
18
|
import './translation';
|
|
12
19
|
<% } %>
|
|
13
20
|
import "react-native-gesture-handler";
|
|
14
21
|
<% if (props.stylingPackage?.name === "tamagui") { %>
|
|
15
|
-
import React
|
|
22
|
+
import React from "react";
|
|
16
23
|
import { TamaguiProvider } from 'tamagui';
|
|
17
24
|
import * as SplashScreen from 'expo-splash-screen';
|
|
18
25
|
import { useFonts } from 'expo-font';
|
|
@@ -30,9 +37,9 @@ import "react-native-gesture-handler";
|
|
|
30
37
|
|
|
31
38
|
vexo(process.env.VEXO_API_KEY); // eslint-disable-line
|
|
32
39
|
|
|
33
|
-
import
|
|
40
|
+
import Navigation from "./navigation"; // eslint-disable-line
|
|
34
41
|
<% } else { %>
|
|
35
|
-
import
|
|
42
|
+
import Navigation from "./navigation";
|
|
36
43
|
<% } %>
|
|
37
44
|
|
|
38
45
|
export default function App() {
|
|
@@ -42,11 +49,8 @@ export default function App() {
|
|
|
42
49
|
InterBold: require("@tamagui/font-inter/otf/Inter-Bold.otf"),
|
|
43
50
|
});
|
|
44
51
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
SplashScreen.hideAsync();
|
|
48
|
-
}
|
|
49
|
-
}, [loaded])
|
|
52
|
+
const colorScheme = useColorScheme();
|
|
53
|
+
const theme = useMemo(() => colorScheme === 'dark' ? DarkTheme : DefaultTheme, [colorScheme]);
|
|
50
54
|
|
|
51
55
|
if (!loaded) {
|
|
52
56
|
return null;
|
|
@@ -54,16 +58,43 @@ export default function App() {
|
|
|
54
58
|
|
|
55
59
|
return (
|
|
56
60
|
<TamaguiProvider config={config}>
|
|
57
|
-
<
|
|
61
|
+
<Navigation theme={theme} onReady={() => SplashScreen.hideAsync()} />
|
|
58
62
|
</TamaguiProvider>
|
|
59
63
|
);
|
|
60
64
|
<% } else if (props.stylingPackage?.name === "restyle") { %>
|
|
65
|
+
const colorScheme = useColorScheme();
|
|
66
|
+
const navigationTheme = useMemo(() => colorScheme === 'dark' ? DarkTheme : DefaultTheme, [colorScheme]);
|
|
67
|
+
|
|
61
68
|
return (
|
|
62
69
|
<ThemeProvider theme={theme}>
|
|
63
|
-
<
|
|
70
|
+
<Navigation theme={navigationTheme} />
|
|
64
71
|
</ThemeProvider>
|
|
65
72
|
);
|
|
73
|
+
<% } else if (props.stylingPackage?.name === "unistyles") { %>
|
|
74
|
+
const { theme, rt } = useUnistyles();
|
|
75
|
+
|
|
76
|
+
const baseTheme = rt.colorScheme === 'dark' ? DarkTheme : DefaultTheme;
|
|
77
|
+
const mergedTheme = useMemo(() => ({
|
|
78
|
+
...baseTheme,
|
|
79
|
+
colors: {
|
|
80
|
+
...baseTheme.colors,
|
|
81
|
+
background: theme.colors.background,
|
|
82
|
+
text: theme.colors.typography,
|
|
83
|
+
primary: theme.colors.astral,
|
|
84
|
+
secondary: theme.colors.cornflowerBlue,
|
|
85
|
+
border: theme.colors.limedSpruce,
|
|
86
|
+
card: theme.colors.background,
|
|
87
|
+
notification: theme.colors.astral,
|
|
88
|
+
},
|
|
89
|
+
}), [baseTheme, theme.colors.background, theme.colors.typography, theme.colors.astral, theme.colors.cornflowerBlue, theme.colors.limedSpruce]);
|
|
90
|
+
|
|
91
|
+
return <Navigation theme={mergedTheme} />;
|
|
92
|
+
<% } else if (props.stylingPackage?.name === "nativewind" || props.stylingPackage?.name === "stylesheet") { %>
|
|
93
|
+
const colorScheme = useColorScheme();
|
|
94
|
+
const theme = useMemo(() => colorScheme === 'dark' ? DarkTheme : DefaultTheme, [colorScheme]);
|
|
95
|
+
|
|
96
|
+
return <Navigation theme={theme} />;
|
|
66
97
|
<% } else { %>
|
|
67
|
-
return <
|
|
98
|
+
return <Navigation />;
|
|
68
99
|
<% } %>
|
|
69
100
|
}
|
|
@@ -1,66 +1,31 @@
|
|
|
1
1
|
import { Ionicons, MaterialIcons } from '@expo/vector-icons';
|
|
2
2
|
import { createDrawerNavigator } from '@react-navigation/drawer';
|
|
3
|
-
import { StackScreenProps } from '@react-navigation/stack';
|
|
4
3
|
import { HeaderButton } from 'components/HeaderButton';
|
|
5
|
-
<% if (props.stylingPackage?.name === "unistyles") { %>
|
|
6
|
-
import { useUnistyles } from 'react-native-unistyles';
|
|
7
|
-
<% } %>
|
|
8
|
-
|
|
9
|
-
import { RootStackParamList } from '.';
|
|
10
4
|
import TabNavigator from './tab-navigator';
|
|
11
5
|
import Home from '../screens/home';
|
|
12
6
|
|
|
13
|
-
type Props = StackScreenProps<RootStackParamList, 'DrawerNavigator'>;
|
|
14
|
-
|
|
15
|
-
const Drawer = createDrawerNavigator();
|
|
16
7
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
color: theme.colors.typography,
|
|
31
|
-
},
|
|
32
|
-
headerTintColor: theme.colors.typography,
|
|
33
|
-
drawerStyle: {
|
|
34
|
-
backgroundColor: theme.colors.background,
|
|
35
|
-
},
|
|
36
|
-
drawerLabelStyle: {
|
|
37
|
-
color: theme.colors.typography,
|
|
38
|
-
},
|
|
39
|
-
drawerInactiveTintColor: theme.colors.typography,
|
|
40
|
-
}}
|
|
41
|
-
>
|
|
42
|
-
<% } else { %>
|
|
43
|
-
<Drawer.Navigator>
|
|
44
|
-
<% } %>
|
|
45
|
-
<Drawer.Screen
|
|
46
|
-
name="Home"
|
|
47
|
-
component={Home}
|
|
48
|
-
options={{
|
|
49
|
-
drawerIcon: ({ size, color }) => (
|
|
50
|
-
<Ionicons name="home-outline" size={size} color={color} />
|
|
51
|
-
),
|
|
52
|
-
}}
|
|
53
|
-
/>
|
|
54
|
-
<Drawer.Screen
|
|
55
|
-
name="Tabs"
|
|
56
|
-
component={TabNavigator}
|
|
57
|
-
options={{
|
|
8
|
+
const Drawer = createDrawerNavigator({
|
|
9
|
+
screens: {
|
|
10
|
+
Home: {
|
|
11
|
+
screen: Home,
|
|
12
|
+
options: {
|
|
13
|
+
drawerIcon: ({ size, color }) => (
|
|
14
|
+
<Ionicons name="home-outline" size={size} color={color} />
|
|
15
|
+
),
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
Tabs: {
|
|
19
|
+
screen: TabNavigator,
|
|
20
|
+
options: ({ navigation })=> ({
|
|
58
21
|
headerRight: () => <HeaderButton onPress={() => navigation.navigate('Modal')} />,
|
|
59
22
|
drawerIcon: ({ size, color }) => (
|
|
60
23
|
<MaterialIcons name="border-bottom" size={size} color={color} />
|
|
61
24
|
),
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
25
|
+
})
|
|
26
|
+
},
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
export default Drawer;
|
|
31
|
+
|
|
@@ -1,156 +1,108 @@
|
|
|
1
1
|
<% if (props.navigationPackage?.options.type === 'stack') { %>
|
|
2
|
-
import {
|
|
3
|
-
import { createStackNavigator } from
|
|
4
|
-
|
|
5
|
-
<% if (props.stylingPackage?.name === "unistyles") { %>
|
|
6
|
-
import { useUnistyles } from 'react-native-unistyles';
|
|
7
|
-
<% } %>
|
|
8
|
-
|
|
2
|
+
import { createStaticNavigation, StaticParamList } from '@react-navigation/native';
|
|
3
|
+
import { createStackNavigator } from '@react-navigation/stack';
|
|
9
4
|
import Overview from "../screens/overview";
|
|
10
5
|
import Details from "../screens/details";
|
|
11
|
-
|
|
6
|
+
import { BackButton } from '../components/BackButton';
|
|
12
7
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
8
|
+
const Stack = createStackNavigator({
|
|
9
|
+
screens: {
|
|
10
|
+
Overview: {
|
|
11
|
+
screen: Overview,
|
|
12
|
+
},
|
|
13
|
+
Details: {
|
|
14
|
+
screen: Details,
|
|
15
|
+
options: ({ navigation }) => ({
|
|
16
|
+
headerLeft: () => <BackButton onPress={navigation.goBack} />,
|
|
17
|
+
})
|
|
18
|
+
},
|
|
19
|
+
}
|
|
20
|
+
});
|
|
17
21
|
|
|
18
|
-
|
|
22
|
+
type RootNavigatorParamList = StaticParamList<typeof Stack>;
|
|
19
23
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
screenOptions={{
|
|
30
|
-
headerStyle: {
|
|
31
|
-
backgroundColor: theme.colors.background,
|
|
32
|
-
},
|
|
33
|
-
headerTitleStyle: {
|
|
34
|
-
color: theme.colors.typography,
|
|
35
|
-
},
|
|
36
|
-
headerTintColor: theme.colors.typography,
|
|
37
|
-
}}
|
|
38
|
-
<% } %>
|
|
39
|
-
>
|
|
40
|
-
<Stack.Screen name="Overview" component={Overview} />
|
|
41
|
-
<Stack.Screen
|
|
42
|
-
name="Details"
|
|
43
|
-
component={Details}
|
|
44
|
-
options={({ navigation }) => ({
|
|
45
|
-
headerLeft: () => <BackButton onPress={navigation.goBack} />,
|
|
46
|
-
})}
|
|
47
|
-
/>
|
|
48
|
-
</Stack.Navigator>
|
|
49
|
-
</NavigationContainer>
|
|
50
|
-
);
|
|
51
|
-
}
|
|
24
|
+
declare global {
|
|
25
|
+
namespace ReactNavigation {
|
|
26
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
|
27
|
+
interface RootParamList extends RootNavigatorParamList {}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
const Navigation = createStaticNavigation(Stack);
|
|
32
|
+
export default Navigation;
|
|
52
33
|
|
|
53
34
|
<% } else if (props.navigationPackage?.options.type === 'tabs') { %>
|
|
54
|
-
|
|
35
|
+
import { createStaticNavigation, StaticParamList } from '@react-navigation/native';
|
|
55
36
|
import { createStackNavigator } from "@react-navigation/stack";
|
|
56
|
-
<% if (props.stylingPackage?.name === "unistyles") { %>
|
|
57
|
-
import { useUnistyles } from 'react-native-unistyles';
|
|
58
|
-
<% } %>
|
|
59
|
-
|
|
60
37
|
import Modal from "../screens/modal";
|
|
61
38
|
import TabNavigator from "./tab-navigator";
|
|
62
39
|
|
|
63
|
-
export type RootStackParamList = {
|
|
64
|
-
TabNavigator: undefined;
|
|
65
|
-
Modal: undefined;
|
|
66
|
-
};
|
|
67
40
|
|
|
68
|
-
const Stack = createStackNavigator
|
|
41
|
+
const Stack = createStackNavigator({
|
|
42
|
+
screens: {
|
|
43
|
+
TabNavigator: {
|
|
44
|
+
screen: TabNavigator,
|
|
45
|
+
options: {
|
|
46
|
+
headerShown: false,
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
Modal: {
|
|
50
|
+
screen: Modal,
|
|
51
|
+
options: {
|
|
52
|
+
presentation: "modal",
|
|
53
|
+
headerLeft: () => null,
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
}
|
|
57
|
+
});
|
|
69
58
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
backgroundColor: theme.colors.background,
|
|
82
|
-
},
|
|
83
|
-
headerTitleStyle: {
|
|
84
|
-
color: theme.colors.typography,
|
|
85
|
-
},
|
|
86
|
-
headerTintColor: theme.colors.typography,
|
|
87
|
-
}}
|
|
88
|
-
<% } %>
|
|
89
|
-
>
|
|
90
|
-
<Stack.Screen
|
|
91
|
-
name="TabNavigator"
|
|
92
|
-
component={TabNavigator}
|
|
93
|
-
options={{ headerShown: false }}
|
|
94
|
-
/>
|
|
95
|
-
<Stack.Screen
|
|
96
|
-
name="Modal"
|
|
97
|
-
component={Modal}
|
|
98
|
-
options={{ presentation: "modal", headerLeft: () => null }}
|
|
99
|
-
/>
|
|
100
|
-
</Stack.Navigator>
|
|
101
|
-
</NavigationContainer>
|
|
102
|
-
);
|
|
103
|
-
}
|
|
104
|
-
<% } else if (props.navigationPackage?.options.type === 'drawer + tabs') { %>
|
|
105
|
-
import { NavigationContainer } from "@react-navigation/native";
|
|
106
|
-
import { createStackNavigator } from '@react-navigation/stack';
|
|
107
|
-
<% if (props.stylingPackage?.name === "unistyles") { %>
|
|
108
|
-
import { useUnistyles } from 'react-native-unistyles';
|
|
109
|
-
<% } %>
|
|
59
|
+
type RootNavigatorParamList = StaticParamList<typeof Stack>;
|
|
60
|
+
|
|
61
|
+
declare global {
|
|
62
|
+
namespace ReactNavigation {
|
|
63
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
|
64
|
+
interface RootParamList extends RootNavigatorParamList {}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
const Navigation = createStaticNavigation(Stack);
|
|
69
|
+
export default Navigation;
|
|
110
70
|
|
|
71
|
+
<% } else if (props.navigationPackage?.options.type === 'drawer + tabs') { %>
|
|
72
|
+
import { createStaticNavigation, StaticParamList } from '@react-navigation/native';
|
|
73
|
+
import { createStackNavigator } from '@react-navigation/stack';
|
|
111
74
|
import Modal from "../screens/modal";
|
|
112
75
|
import DrawerNavigator from "./drawer-navigator";
|
|
113
76
|
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
77
|
+
|
|
78
|
+
const Stack = createStackNavigator({
|
|
79
|
+
screens: {
|
|
80
|
+
DrawerNavigator: {
|
|
81
|
+
screen: DrawerNavigator,
|
|
82
|
+
options: {
|
|
83
|
+
headerShown: false,
|
|
84
|
+
},
|
|
85
|
+
},
|
|
86
|
+
Modal: {
|
|
87
|
+
screen: Modal,
|
|
88
|
+
options: {
|
|
89
|
+
presentation: "modal",
|
|
90
|
+
headerLeft: () => null,
|
|
91
|
+
},
|
|
92
|
+
},
|
|
93
|
+
}
|
|
94
|
+
});
|
|
95
|
+
|
|
96
|
+
type RootNavigatorParamList = StaticParamList<typeof Stack>;
|
|
119
97
|
|
|
120
|
-
|
|
98
|
+
declare global {
|
|
99
|
+
namespace ReactNavigation {
|
|
100
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
|
101
|
+
interface RootParamList extends RootNavigatorParamList {}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
121
104
|
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
<% } %>
|
|
126
|
-
return (
|
|
127
|
-
<NavigationContainer>
|
|
128
|
-
<Stack.Navigator
|
|
129
|
-
initialRouteName="DrawerNavigator"
|
|
130
|
-
<% if (props.stylingPackage?.name === "unistyles") { %>
|
|
131
|
-
screenOptions={{
|
|
132
|
-
headerStyle: {
|
|
133
|
-
backgroundColor: theme.colors.background,
|
|
134
|
-
},
|
|
135
|
-
headerTitleStyle: {
|
|
136
|
-
color: theme.colors.typography,
|
|
137
|
-
},
|
|
138
|
-
headerTintColor: theme.colors.typography,
|
|
139
|
-
}}
|
|
140
|
-
<% } %>
|
|
141
|
-
>
|
|
142
|
-
<Stack.Screen
|
|
143
|
-
name="DrawerNavigator"
|
|
144
|
-
component={DrawerNavigator}
|
|
145
|
-
options={{ headerShown: false }}
|
|
146
|
-
/>
|
|
147
|
-
<Stack.Screen
|
|
148
|
-
name="Modal"
|
|
149
|
-
component={Modal}
|
|
150
|
-
options={{ presentation: "modal", headerLeft: () => null }}
|
|
151
|
-
/>
|
|
152
|
-
</Stack.Navigator>
|
|
153
|
-
</NavigationContainer>
|
|
154
|
-
);
|
|
155
|
-
}
|
|
105
|
+
const Navigation = createStaticNavigation(Stack);
|
|
106
|
+
export default Navigation;
|
|
107
|
+
|
|
156
108
|
<% } %>
|
|
@@ -1,60 +1,38 @@
|
|
|
1
1
|
import { createBottomTabNavigator } from '@react-navigation/bottom-tabs';
|
|
2
|
-
import { StackScreenProps } from '@react-navigation/stack';
|
|
3
|
-
<% if (props.stylingPackage?.name === "unistyles") { %>
|
|
4
|
-
import { useUnistyles } from 'react-native-unistyles';
|
|
5
|
-
<% } %>
|
|
6
|
-
import { RootStackParamList } from '.';
|
|
7
2
|
import { HeaderButton } from '../components/HeaderButton';
|
|
8
3
|
import { TabBarIcon } from '../components/TabBarIcon';
|
|
9
4
|
import One from '../screens/one';
|
|
10
5
|
import Two from '../screens/two';
|
|
11
6
|
|
|
12
|
-
const Tab = createBottomTabNavigator(
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
<% } %>
|
|
20
|
-
return (
|
|
21
|
-
<Tab.Navigator
|
|
22
|
-
screenOptions={{
|
|
23
|
-
<% if (props.stylingPackage?.name === "unistyles") { %>
|
|
24
|
-
headerStyle: {
|
|
25
|
-
backgroundColor: theme.colors.background,
|
|
26
|
-
},
|
|
27
|
-
headerTitleStyle: {
|
|
28
|
-
color: theme.colors.typography,
|
|
29
|
-
},
|
|
30
|
-
tabBarActiveTintColor: theme.colors.astral,
|
|
31
|
-
tabBarStyle: {
|
|
32
|
-
backgroundColor: theme.colors.background,
|
|
33
|
-
},
|
|
34
|
-
<% } else { %>
|
|
35
|
-
tabBarActiveTintColor: 'black',
|
|
36
|
-
<% } %>
|
|
37
|
-
<% if (props.navigationPackage?.options.type === 'drawer + tabs') { %>
|
|
7
|
+
const Tab = createBottomTabNavigator({
|
|
8
|
+
screenOptions: function ScreenOptions() {
|
|
9
|
+
return {
|
|
10
|
+
<% if (props.stylingPackage?.name !== "unistyles") { %>
|
|
11
|
+
tabBarActiveTintColor: 'black',
|
|
12
|
+
<% } %>
|
|
13
|
+
<% if (props.navigationPackage?.options.type === 'drawer + tabs') { %>
|
|
38
14
|
headerShown: false,
|
|
39
15
|
<% } %>
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
screens: {
|
|
19
|
+
One: {
|
|
20
|
+
screen: One,
|
|
21
|
+
options: ({ navigation }) => ({
|
|
22
|
+
title: 'Tab One',
|
|
23
|
+
tabBarIcon: ({ color }) => <TabBarIcon name="code" color={color} />,
|
|
24
|
+
headerRight: () => <HeaderButton onPress={() => navigation.navigate('Modal')} />,
|
|
25
|
+
})
|
|
26
|
+
},
|
|
27
|
+
Two: {
|
|
28
|
+
screen: Two,
|
|
29
|
+
options: {
|
|
30
|
+
title: 'Tab Two',
|
|
31
|
+
tabBarIcon: ({ color }) => <TabBarIcon name="code" color={color} />,
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
export default Tab;
|
|
38
|
+
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { StaticScreenProps } from '@react-navigation/native';
|
|
2
2
|
import { ScreenContent } from 'components/ScreenContent';
|
|
3
3
|
<% if (props.stylingPackage?.name === "unistyles") { %>
|
|
4
4
|
import { View } from 'react-native';
|
|
@@ -7,18 +7,16 @@ import { StyleSheet } from 'react-native-unistyles';
|
|
|
7
7
|
import { StyleSheet, View } from 'react-native';
|
|
8
8
|
<% } %>
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
export default function Details() {
|
|
15
|
-
const router = useRoute<DetailsScreenRouteProp>();
|
|
10
|
+
type Props = StaticScreenProps<{
|
|
11
|
+
name: string;
|
|
12
|
+
}>;
|
|
16
13
|
|
|
14
|
+
export default function Details({ route }: Props) {
|
|
17
15
|
return (
|
|
18
16
|
<View style={styles.container}>
|
|
19
17
|
<ScreenContent
|
|
20
18
|
path="screens/details.tsx"
|
|
21
|
-
title={`Showing details for user ${
|
|
19
|
+
title={`Showing details for user ${route.params?.name}`}
|
|
22
20
|
/>
|
|
23
21
|
</View>
|
|
24
22
|
);
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { useNavigation } from '@react-navigation/native';
|
|
2
|
-
import { StackNavigationProp } from '@react-navigation/stack';
|
|
3
2
|
import { ScreenContent } from 'components/ScreenContent';
|
|
4
3
|
<% if (props.stylingPackage?.name === "unistyles") { %>
|
|
5
4
|
import { View } from 'react-native';
|
|
@@ -13,12 +12,9 @@ import { StyleSheet, View } from 'react-native';
|
|
|
13
12
|
<% } %>
|
|
14
13
|
|
|
15
14
|
import { Button } from '../components/Button';
|
|
16
|
-
import { RootStackParamList } from '../navigation';
|
|
17
|
-
|
|
18
|
-
type OverviewScreenNavigationProps = StackNavigationProp<RootStackParamList, 'Overview'>;
|
|
19
15
|
|
|
20
16
|
export default function Overview() {
|
|
21
|
-
const navigation = useNavigation
|
|
17
|
+
const navigation = useNavigation();
|
|
22
18
|
|
|
23
19
|
return (
|
|
24
20
|
<View style={styles.container}>
|
package/package.json
CHANGED
|
@@ -1,74 +1,75 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
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
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
2
|
+
"name": "create-expo-stack",
|
|
3
|
+
"version": "2.18.6-next.4a27460",
|
|
4
|
+
"description": "CLI tool to initialize a React Native application with Expo",
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "https://github.com/roninoss/create-expo-stack.git",
|
|
8
|
+
"directory": "cli"
|
|
9
|
+
},
|
|
10
|
+
"homepage": "https://rn.new",
|
|
11
|
+
"license": "MIT",
|
|
12
|
+
"types": "build/types/types.d.ts",
|
|
13
|
+
"bin": {
|
|
14
|
+
"create-expo-stack": "bin/create-expo-stack.js"
|
|
15
|
+
},
|
|
16
|
+
"files": [
|
|
17
|
+
"build",
|
|
18
|
+
"LICENSE",
|
|
19
|
+
"readme.md",
|
|
20
|
+
"docs",
|
|
21
|
+
"bin"
|
|
22
|
+
],
|
|
23
|
+
"scripts": {
|
|
24
|
+
"build": "bun run clean-build && bun run compile && bun run copy-templates && bun run lint-templates",
|
|
25
|
+
"bump": "bun run ./src/utilities/bumpVersion.ts",
|
|
26
|
+
"clean-build": "rm -rf ./build",
|
|
27
|
+
"compile": "tsc -p .",
|
|
28
|
+
"copy-templates": "bun run copyfiles -u 2 -a \"./src/templates/**/*\" ./build/templates",
|
|
29
|
+
"dev": "bun run build && NODE_ENV=development bun run bin/create-expo-stack.js",
|
|
30
|
+
"format": "eslint \"**/*.{js,jsx,ts,tsx}\" --fix --resolve-plugins-relative-to . && prettier \"**/*.{js,jsx,ts,tsx,json}\" --write",
|
|
31
|
+
"lint-templates": "bun run ejslint ./src/templates",
|
|
32
|
+
"prepublishOnly": "bun run build",
|
|
33
|
+
"publishPublic": "bun run build && npm publish --access public",
|
|
34
|
+
"snapshot-update": "bun test --bail=1 --timeout 160000 --update-snapshots",
|
|
35
|
+
"test:watch": "bun test --watch",
|
|
36
|
+
"test": "bun test --bail=1 --timeout 160000",
|
|
37
|
+
"test:skip-snapshots": "INCLUDE_REACT_NAVIGATION_TESTS=1 SKIP_SNAPSHOTS=1 bun test bun test --bail=1 --timeout 160000",
|
|
38
|
+
"test:all": "ALL_PACKAGE_MANAGERS=true bun test --bail=1 --timeout 160000"
|
|
39
|
+
},
|
|
40
|
+
"prettier": {
|
|
41
|
+
"arrowParens": "always",
|
|
42
|
+
"bracketSameLine": false,
|
|
43
|
+
"bracketSpacing": true,
|
|
44
|
+
"printWidth": 120,
|
|
45
|
+
"semi": true,
|
|
46
|
+
"singleQuote": true,
|
|
47
|
+
"tabWidth": 2,
|
|
48
|
+
"trailingComma": "none",
|
|
49
|
+
"useTabs": false
|
|
50
|
+
},
|
|
51
|
+
"dependencies": {
|
|
52
|
+
"@clack/prompts": "^0.7.0",
|
|
53
|
+
"ejs-lint": "^2.0.0",
|
|
54
|
+
"expo": "~53.0.6",
|
|
55
|
+
"figlet": "^1.6.0",
|
|
56
|
+
"gluegun": "latest",
|
|
57
|
+
"google-auth-library": "^9.11.0",
|
|
58
|
+
"googleapis": "^140.0.0",
|
|
59
|
+
"gradient-string": "^2.0.2"
|
|
60
|
+
},
|
|
61
|
+
"devDependencies": {
|
|
62
|
+
"@types/gradient-string": "^1.1.2",
|
|
63
|
+
"@typescript-eslint/eslint-plugin": "^6.9.1",
|
|
64
|
+
"@typescript-eslint/parser": "^6.9.1",
|
|
65
|
+
"copyfiles": "^2.4.1",
|
|
66
|
+
"eslint": "^8.53.0",
|
|
67
|
+
"eslint-config-prettier": "^9.0.0",
|
|
68
|
+
"eslint-plugin-prettier": "^5.0.1",
|
|
69
|
+
"husky": "^5.1.3",
|
|
70
|
+
"prettier": "^3.1.0"
|
|
71
|
+
},
|
|
72
|
+
"publishConfig": {
|
|
73
|
+
"provenance": false
|
|
74
|
+
}
|
|
74
75
|
}
|