create-expo-stack 2.7.0-next.ba3b85d → 2.7.0-next.c16c251

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 (41) hide show
  1. package/README.md +16 -9
  2. package/build/commands/create-expo-stack.js +62 -15
  3. package/build/templates/base/app.json.ejs +5 -1
  4. package/build/templates/base/package.json.ejs +32 -3
  5. package/build/templates/base/tsconfig.json.ejs +1 -1
  6. package/build/templates/packages/nativewindui/app/+not-found.tsx.ejs +1 -1
  7. package/build/templates/packages/nativewindui/app/_layout.tsx.ejs +26 -19
  8. package/build/templates/packages/nativewindui/app/index.tsx.ejs +665 -123
  9. package/build/templates/packages/nativewindui/app/modal.tsx.ejs +20 -19
  10. package/build/templates/packages/nativewindui/components/nativewind-ui/ActivityIndicator.tsx.ejs +10 -0
  11. package/build/templates/packages/nativewindui/components/nativewind-ui/Avatar.tsx.ejs +139 -0
  12. package/build/templates/packages/nativewindui/components/nativewind-ui/DatePicker.android.tsx.ejs +66 -0
  13. package/build/templates/packages/nativewindui/components/nativewind-ui/DatePicker.tsx.ejs +10 -0
  14. package/build/templates/packages/nativewindui/components/nativewind-ui/Picker.tsx.ejs +39 -0
  15. package/build/templates/packages/nativewindui/components/nativewind-ui/ProgressIndicator.tsx.ejs +95 -0
  16. package/build/templates/packages/nativewindui/components/nativewind-ui/SegmentedControl.tsx.ejs +22 -0
  17. package/build/templates/packages/nativewindui/components/nativewind-ui/Sheet.tsx.ejs +59 -0
  18. package/build/templates/packages/nativewindui/components/nativewind-ui/Slider.tsx.ejs +28 -0
  19. package/build/templates/packages/nativewindui/components/{Text.tsx.ejs → nativewind-ui/Text.tsx.ejs} +26 -2
  20. package/build/templates/packages/nativewindui/components/{ThemeToggle.tsx.ejs → nativewind-ui/ThemeToggle.tsx.ejs} +6 -10
  21. package/build/templates/packages/nativewindui/components/{Toggle.tsx.ejs → nativewind-ui/Toggle.tsx.ejs} +3 -3
  22. package/build/templates/packages/nativewindui/global.css.ejs +3 -3
  23. package/build/templates/packages/nativewindui/lib/useColorScheme.tsx.ejs +44 -3
  24. package/build/templates/packages/nativewindui/lib/useHeaderSearchBar.tsx.ejs +2 -2
  25. package/build/templates/packages/nativewindui/theme/colors.ts.ejs +8 -8
  26. package/build/templates/packages/nativewindui/theme/index.ts.ejs +4 -4
  27. package/build/types/types.d.ts +2 -0
  28. package/build/types/utilities/clearNavigationPackages.d.ts +2 -0
  29. package/build/utilities/clearNavigationPackages.js +11 -0
  30. package/build/utilities/configureProjectFiles.js +64 -35
  31. package/build/utilities/runCLI.js +80 -26
  32. package/package.json +1 -1
  33. package/build/templates/packages/nativewindui/app/bottom-tabs/_layout.tsx.ejs +0 -34
  34. package/build/templates/packages/nativewindui/app/bottom-tabs/index.tsx.ejs +0 -11
  35. package/build/templates/packages/nativewindui/app/bottom-tabs/profile.tsx.ejs +0 -11
  36. package/build/templates/packages/nativewindui/app/drawer/_layout.tsx.ejs +0 -29
  37. package/build/templates/packages/nativewindui/app/drawer/index.tsx.ejs +0 -11
  38. package/build/templates/packages/nativewindui/app/top-tabs/_layout.tsx.ejs +0 -71
  39. package/build/templates/packages/nativewindui/app/top-tabs/following.tsx.ejs +0 -13
  40. package/build/templates/packages/nativewindui/app/top-tabs/index.tsx.ejs +0 -13
  41. package/build/templates/packages/nativewindui/app/top-tabs/my-group.tsx.ejs +0 -13
@@ -1,11 +0,0 @@
1
- import { router } from 'expo-router';
2
- import * as React from 'react';
3
- import { Button, View } from 'react-native';
4
-
5
- export default function HomeScreen() {
6
- return (
7
- <View className='flex-1 justify-center items-center'>
8
- <Button title='Go back' onPress={router.back} />
9
- </View>
10
- );
11
- }
@@ -1,11 +0,0 @@
1
- import { router } from 'expo-router';
2
- import * as React from 'react';
3
- import { Button, View } from 'react-native';
4
-
5
- export default function ProfileScreen() {
6
- return (
7
- <View className='flex-1 justify-center items-center'>
8
- <Button color={'orange'} title='Go to home tab' onPress={router.back} />
9
- </View>
10
- );
11
- }
@@ -1,29 +0,0 @@
1
- import { ThemeToggle } from '@/components/ThemeToggle';
2
- import { useColorScheme } from '@/lib/useColorScheme';
3
- import { Drawer } from 'expo-router/drawer';
4
- import { View } from 'react-native';
5
-
6
- export default function DrawerLayout() {
7
- const { colors } = useColorScheme();
8
- return (
9
- <Drawer
10
- screenOptions={{
11
- headerTintColor: colors.foreground,
12
- headerRight,
13
- }}
14
- >
15
- <Drawer.Screen name='index' options={EXPLORE_OPTIONS} />
16
- </Drawer>
17
- );
18
- }
19
-
20
- function headerRight() {
21
- return (
22
- <View className='px-4'>
23
- <ThemeToggle />
24
- </View>
25
- );
26
- }
27
- const EXPLORE_OPTIONS = {
28
- title: 'Explore',
29
- };
@@ -1,11 +0,0 @@
1
- import { router } from 'expo-router';
2
- import * as React from 'react';
3
- import { Button, View } from 'react-native';
4
-
5
- export default function ExploreScreen() {
6
- return (
7
- <View className='flex-1 justify-center items-center'>
8
- <Button title='Go back' onPress={router.back} />
9
- </View>
10
- );
11
- }
@@ -1,71 +0,0 @@
1
- import { useColorScheme } from '@/lib/useColorScheme';
2
- import type {
3
- MaterialTopTabNavigationEventMap,
4
- MaterialTopTabNavigationOptions,
5
- } from '@react-navigation/material-top-tabs';
6
- import { createMaterialTopTabNavigator } from '@react-navigation/material-top-tabs';
7
- import {
8
- type ParamListBase,
9
- type TabNavigationState,
10
- } from '@react-navigation/native';
11
- import { withLayoutContext } from 'expo-router';
12
- import { Dimensions } from 'react-native';
13
-
14
- const { width } = Dimensions.get('screen');
15
-
16
- const { Navigator } = createMaterialTopTabNavigator();
17
-
18
- const TopTabs = withLayoutContext<
19
- MaterialTopTabNavigationOptions,
20
- typeof Navigator,
21
- TabNavigationState<ParamListBase>,
22
- MaterialTopTabNavigationEventMap
23
- >(Navigator);
24
-
25
- const SCREENS = [
26
- {
27
- name: 'index',
28
- title: 'For You',
29
- },
30
- {
31
- name: 'following',
32
- title: 'Following',
33
- },
34
- {
35
- name: 'my-group',
36
- title: 'My Group',
37
- },
38
- ];
39
-
40
- export default function TopTabsLayout() {
41
- const { colors } = useColorScheme();
42
- return (
43
- <TopTabs
44
- initialRouteName='index'
45
- screenOptions={{
46
- tabBarActiveTintColor: colors.blue,
47
- tabBarInactiveTintColor: 'grey',
48
- tabBarLabelStyle: {
49
- fontSize: 14,
50
- textTransform: 'capitalize',
51
- fontWeight: 'bold',
52
- },
53
- tabBarIndicatorStyle: {
54
- backgroundColor: colors.blue,
55
- },
56
- tabBarScrollEnabled: true,
57
- tabBarItemStyle: { width: width / SCREENS.length },
58
- }}
59
- >
60
- {SCREENS.map(({ name, title }) => (
61
- <TopTabs.Screen
62
- key={name}
63
- name={name}
64
- options={{
65
- title,
66
- }}
67
- />
68
- ))}
69
- </TopTabs>
70
- );
71
- }
@@ -1,13 +0,0 @@
1
- import { Text } from '@/components/Text';
2
- import { View } from 'react-native';
3
-
4
- export default function FollowingScreen() {
5
- return (
6
- <View className='flex-1 justify-center items-center gap-5'>
7
- <View className='items-center gap-1'>
8
- <Text variant='title1'>Following Tab</Text>
9
- <Text>Swipe to see other tabs</Text>
10
- </View>
11
- </View>
12
- );
13
- }
@@ -1,13 +0,0 @@
1
- import { Text } from '@/components/Text';
2
- import { View } from 'react-native';
3
-
4
- export default function ForYouScreen() {
5
- return (
6
- <View className='flex-1 justify-center items-center gap-5'>
7
- <View className='items-center gap-1'>
8
- <Text variant='title1'>For You Tab</Text>
9
- <Text>Swipe to see other tabs</Text>
10
- </View>
11
- </View>
12
- );
13
- }
@@ -1,13 +0,0 @@
1
- import { View } from 'react-native';
2
- import { Text } from '@/components/Text';
3
-
4
- export default function MyGroupScreen() {
5
- return (
6
- <View className='flex-1 justify-center items-center gap-5'>
7
- <View className='items-center gap-1'>
8
- <Text variant='title1'>My Group Tab</Text>
9
- <Text>Swipe to see other tabs</Text>
10
- </View>
11
- </View>
12
- );
13
- }