create-expo-stack 2.7.0-next.a59a8d8 → 2.7.0-next.b1717c9

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 (23) hide show
  1. package/build/templates/base/app.json.ejs +5 -1
  2. package/build/templates/base/package.json.ejs +29 -0
  3. package/build/templates/packages/nativewindui/app/_layout.tsx.ejs +21 -15
  4. package/build/templates/packages/nativewindui/app/index.tsx.ejs +602 -19
  5. package/build/templates/packages/nativewindui/app/modal.tsx.ejs +20 -19
  6. package/build/templates/packages/nativewindui/components/nativewind-ui/ActivityIndicator.tsx.ejs +10 -0
  7. package/build/templates/packages/nativewindui/components/nativewind-ui/Avatar.tsx.ejs +139 -0
  8. package/build/templates/packages/nativewindui/components/nativewind-ui/DatePicker.android.tsx.ejs +66 -0
  9. package/build/templates/packages/nativewindui/components/nativewind-ui/DatePicker.tsx.ejs +10 -0
  10. package/build/templates/packages/nativewindui/components/nativewind-ui/Picker.tsx.ejs +39 -0
  11. package/build/templates/packages/nativewindui/components/nativewind-ui/ProgressIndicator.tsx.ejs +95 -0
  12. package/build/templates/packages/nativewindui/components/nativewind-ui/SegmentedControl.tsx.ejs +22 -0
  13. package/build/templates/packages/nativewindui/components/nativewind-ui/Sheet.tsx.ejs +59 -0
  14. package/build/templates/packages/nativewindui/components/nativewind-ui/Slider.tsx.ejs +28 -0
  15. package/build/templates/packages/nativewindui/components/nativewind-ui/Text.tsx.ejs +25 -1
  16. package/build/templates/packages/nativewindui/components/{ThemeToggle.tsx.ejs → nativewind-ui/ThemeToggle.tsx.ejs} +3 -5
  17. package/build/templates/packages/nativewindui/components/nativewind-ui/Toggle.tsx.ejs +17 -0
  18. package/build/templates/packages/nativewindui/global.css.ejs +2 -2
  19. package/build/templates/packages/nativewindui/lib/useHeaderSearchBar.tsx.ejs +1 -1
  20. package/build/types/types.d.ts +2 -0
  21. package/build/utilities/configureProjectFiles.js +41 -11
  22. package/build/utilities/runCLI.js +80 -26
  23. package/package.json +1 -1
@@ -39,7 +39,11 @@
39
39
  <% } %>
40
40
  "orientation": "portrait",
41
41
  "icon": "./assets/icon.png",
42
- "userInterfaceStyle": "light",
42
+ <% if (props.stylingPackage?.name === "nativewindui") { %>
43
+ "userInterfaceStyle": "automatic",
44
+ <% } else { %>
45
+ "userInterfaceStyle": "light",
46
+ <% } %>
43
47
  "splash": {
44
48
  "image": "./assets/splash.png",
45
49
  "resizeMode": "contain",
@@ -26,8 +26,37 @@
26
26
  "clsx": "^2.1.0",
27
27
  "expo-dev-client": "~3.3.8",
28
28
  "tailwind-merge": "^2.2.1",
29
+ <% if (props.stylingPackage?.options.selectedComponents.includes('selectable-text')) { %>
29
30
  "react-native-uitextview": "^1.1.4",
31
+ <% } %>
30
32
  "react-native-pager-view": "6.2.3",
33
+ <% if (props.stylingPackage?.options.selectedComponents.includes('date-picker')) { %>
34
+ "@react-native-community/datetimepicker": "7.7.0",
35
+ <% } %>
36
+ <% if (props.stylingPackage?.options.selectedComponents.includes('segmented-control')) { %>
37
+ "@react-native-segmented-control/segmented-control": "2.4.1",
38
+ <% } %>
39
+ <% if (props.stylingPackage?.options.selectedComponents.includes('picker')) { %>
40
+ "@react-native-picker/picker": "2.6.1",
41
+ <% } %>
42
+ <% if (props.stylingPackage?.options.selectedComponents.includes('bottom-sheet')) { %>
43
+ "@gorhom/bottom-sheet": "^4",
44
+ <% } %>
45
+ <% if (props.stylingPackage?.options.selectedComponents.includes('action-sheet')) { %>
46
+ "@expo/react-native-action-sheet": "^4.0.1",
47
+ <% } %>
48
+ <% if (props.stylingPackage?.options.selectedComponents.includes('context-menu') || props.stylingPackage?.options.selectedComponents.includes('dropdown-menu')) { %>
49
+ "zeego": "^1.9.1",
50
+ "react-native-ios-context-menu": "^2.5.0",
51
+ "react-native-ios-utilities": "^4.4.0",
52
+ "@react-native-menu/menu": "^0.9.1",
53
+ <% } %>
54
+ <% if (props.stylingPackage?.options.selectedComponents.includes('ratings-indicator')) { %>
55
+ "expo-store-review": "~6.8.3",
56
+ <% } %>
57
+ <% if (props.stylingPackage?.options.selectedComponents.includes('slider')) { %>
58
+ "@react-native-community/slider": "4.4.2",
59
+ <% } %>
31
60
  <% } %>
32
61
 
33
62
  <% if (props.stylingPackage?.name === "restyle") { %>
@@ -2,12 +2,20 @@ import '~/global.css';
2
2
  import 'expo-dev-client';
3
3
  import { ThemeProvider as NavThemeProvider } from '@react-navigation/native';
4
4
  import { Icon } from '@roninoss/icons';
5
+ <% if (props.stylingPackage?.options.selectedComponents.includes('action-sheet')) { %>
6
+ import { ActionSheetProvider } from '@expo/react-native-action-sheet';
7
+ <% } %>
8
+ <% if (props.stylingPackage?.options.selectedComponents.includes('bottom-sheet')) { %>
9
+ import { BottomSheetModalProvider } from '@gorhom/bottom-sheet';
10
+ <% } %>
5
11
  import { Link, Stack } from 'expo-router';
6
12
  import { StatusBar } from 'expo-status-bar';
7
13
  import { Pressable, View } from 'react-native';
14
+ <% if (props.stylingPackage?.options.selectedComponents.includes('bottom-sheet')) { %>
8
15
  import { GestureHandlerRootView } from 'react-native-gesture-handler';
16
+ <% } %>
9
17
 
10
- import { ThemeToggle } from '~/components/ThemeToggle';
18
+ import { ThemeToggle } from '~/components/nativewind-ui/ThemeToggle';
11
19
  import { cn } from '~/lib/cn';
12
20
  import { useColorScheme } from '~/lib/useColorScheme';
13
21
  import { NAV_THEME } from '~/theme';
@@ -26,17 +34,26 @@ export default function RootLayout() {
26
34
  key={`root-status-bar-${isDarkColorScheme ? 'light' : 'dark'}`}
27
35
  style={isDarkColorScheme ? 'light' : 'dark'}
28
36
  />
37
+ <% if (props.stylingPackage?.options.selectedComponents.includes('bottom-sheet')) { %>
29
38
  <GestureHandlerRootView style={{ flex: 1 }}>
39
+ <BottomSheetModalProvider>
40
+ <% } %>
41
+ <% if (props.stylingPackage?.options.selectedComponents.includes('action-sheet')) { %>
42
+ <ActionSheetProvider>
43
+ <% } %>
30
44
  <NavThemeProvider value={NAV_THEME[colorScheme]}>
31
45
  <Stack screenOptions={SCREEN_OPTIONS}>
32
46
  <Stack.Screen name="index" options={INDEX_OPTIONS} />
33
- <Stack.Screen name="top-tabs" options={TOP_TABS_OPTIONS} />
34
- <Stack.Screen name="drawer" options={DEFAULT_OPTIONS} />
35
- <Stack.Screen name="bottom-tabs" options={DEFAULT_OPTIONS} />
36
47
  <Stack.Screen name="modal" options={MODAL_OPTIONS} />
37
48
  </Stack>
38
49
  </NavThemeProvider>
50
+ <% if (props.stylingPackage?.options.selectedComponents.includes('action-sheet')) { %>
51
+ </ActionSheetProvider>
52
+ <% } %>
53
+ <% if (props.stylingPackage?.options.selectedComponents.includes('bottom-sheet')) { %>
54
+ </BottomSheetModalProvider>
39
55
  </GestureHandlerRootView>
56
+ <% } %>
40
57
  </>
41
58
  );
42
59
  }
@@ -66,20 +83,9 @@ function SettingsIcon() {
66
83
  );
67
84
  }
68
85
 
69
- const TOP_TABS_OPTIONS = {
70
- title: 'Top Tabs',
71
- headerShadowVisible: false,
72
- headerBackTitle: 'Back',
73
- headerRight: () => <ThemeToggle />,
74
- } as const;
75
-
76
86
  const MODAL_OPTIONS = {
77
87
  presentation: 'modal',
78
88
  animation: 'fade_from_bottom', // for android
79
89
  title: 'Settings',
80
90
  headerRight: () => <ThemeToggle />,
81
91
  } as const;
82
-
83
- const DEFAULT_OPTIONS = {
84
- headerShown: false,
85
- };