create-expo-stack 2.20.0-next.7f9c8bc → 2.20.0

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 (87) hide show
  1. package/README.md +1 -3
  2. package/build/cli.js +3 -2
  3. package/build/commands/create-expo-stack.js +9 -30
  4. package/build/constants.js +4 -4
  5. package/build/templates/base/App.tsx.ejs +12 -51
  6. package/build/templates/base/app.json.ejs +1 -0
  7. package/build/templates/base/babel.config.js.ejs +13 -16
  8. package/build/templates/base/components/Button.tsx.ejs +1 -0
  9. package/build/templates/base/components/Container.tsx.ejs +1 -0
  10. package/build/templates/base/package.json.ejs +34 -67
  11. package/build/templates/base/tsconfig.json.ejs +12 -7
  12. package/build/templates/packages/expo-router/drawer/app/+not-found.tsx.ejs +19 -60
  13. package/build/templates/packages/expo-router/drawer/app/_layout.tsx.ejs +2 -41
  14. package/build/templates/packages/expo-router/stack/app/+not-found.tsx.ejs +34 -66
  15. package/build/templates/packages/expo-router/stack/app/_layout.tsx.ejs +15 -51
  16. package/build/templates/packages/expo-router/stack/app/details.tsx.ejs +37 -5
  17. package/build/templates/packages/expo-router/stack/app/index.tsx.ejs +34 -11
  18. package/build/templates/packages/expo-router/tabs/app/+not-found.tsx.ejs +21 -60
  19. package/build/templates/packages/expo-router/tabs/app/_layout.tsx.ejs +8 -48
  20. package/build/templates/packages/nativewind/global.css +3 -2
  21. package/build/templates/packages/nativewind/metro.config.js +3 -4
  22. package/build/templates/packages/nativewind/nativewind-env.d.ts +1 -3
  23. package/build/templates/packages/nativewind/tailwind.config.js.ejs +15 -0
  24. package/build/templates/packages/nativewindui/components/Container.tsx.ejs +1 -0
  25. package/build/templates/packages/nativewindui/components/EditScreenInfo.tsx.ejs +1 -1
  26. package/build/templates/packages/nativewindui/components/ScreenContent.tsx.ejs +1 -1
  27. package/build/templates/packages/nativewindui/components/nativewindui/Icon/Icon.ios.tsx.ejs +52 -0
  28. package/build/templates/packages/nativewindui/components/nativewindui/Icon/Icon.tsx.ejs +58 -0
  29. package/build/templates/packages/nativewindui/components/nativewindui/Icon/index.ts.ejs +16 -0
  30. package/build/templates/packages/nativewindui/components/nativewindui/Icon/types.ts.ejs +18 -0
  31. package/build/templates/packages/nativewindui/components/{ThemeToggle.tsx.ejs → nativewindui/ThemeToggle.tsx.ejs} +8 -10
  32. package/build/templates/packages/nativewindui/drawer/app/(drawer)/index.tsx.ejs +17 -19
  33. package/build/templates/packages/nativewindui/drawer/app/+not-found.tsx.ejs +4 -44
  34. package/build/templates/packages/nativewindui/drawer/app/_layout.tsx.ejs +2 -2
  35. package/build/templates/packages/nativewindui/drawer/app/modal.tsx.ejs +4 -4
  36. package/build/templates/packages/nativewindui/lib/useColorScheme.tsx.ejs +3 -37
  37. package/build/templates/packages/nativewindui/stack/app/+not-found.tsx.ejs +1 -1
  38. package/build/templates/packages/nativewindui/stack/app/_layout.tsx.ejs +17 -34
  39. package/build/templates/packages/nativewindui/stack/app/index.tsx.ejs +230 -275
  40. package/build/templates/packages/nativewindui/stack/app/modal.tsx.ejs +7 -7
  41. package/build/templates/packages/nativewindui/tabs/app/(tabs)/index.tsx.ejs +6 -7
  42. package/build/templates/packages/nativewindui/tabs/app/+not-found.tsx.ejs +0 -40
  43. package/build/templates/packages/nativewindui/theme/colors.ts.ejs +52 -0
  44. package/build/templates/packages/nativewindui/theme/index.ts.ejs +2 -2
  45. package/build/templates/packages/nativewindui/theme/with-opacity.ts.ejs +155 -0
  46. package/build/templates/packages/react-navigation/App.tsx.ejs +2 -42
  47. package/build/types/constants.d.ts +1 -1
  48. package/build/types/types.d.ts +3 -3
  49. package/build/types/utilities/configAnalytics.d.ts +2 -2
  50. package/build/types.js +1 -3
  51. package/build/utilities/clearNavigationPackages.js +2 -2
  52. package/build/utilities/clearStylingPackages.js +2 -2
  53. package/build/utilities/configAnalytics.js +5 -4
  54. package/build/utilities/configureProjectFiles.js +31 -68
  55. package/build/utilities/copyBaseAssets.js +3 -2
  56. package/build/utilities/generateNWUI.js +8 -7
  57. package/build/utilities/generateProjectFiles.js +4 -9
  58. package/build/utilities/getPackageManager.js +6 -5
  59. package/build/utilities/printOutput.js +5 -16
  60. package/build/utilities/renderTitle.js +3 -2
  61. package/build/utilities/runCLI.js +15 -17
  62. package/build/utilities/runEasConfigure.js +3 -2
  63. package/build/utilities/runIgnite.js +3 -2
  64. package/build/utilities/showHelp.js +3 -4
  65. package/build/utilities/systemCommand.js +3 -3
  66. package/build/utilities/usePackage.js +3 -2
  67. package/build/utilities/validateProjectName.js +3 -2
  68. package/package.json +73 -71
  69. package/build/templates/packages/nativewind/postcss.config.mjs +0 -5
  70. package/build/templates/packages/nativewindui/components/BackButton.tsx.ejs +0 -23
  71. package/build/templates/packages/nativewindui/components/Button.tsx.ejs +0 -41
  72. package/build/templates/packages/nativewindui/lib/useHeaderSearchBar.tsx.ejs +0 -31
  73. package/build/templates/packages/restyle/components/BackButton.tsx.ejs +0 -15
  74. package/build/templates/packages/restyle/components/Button.tsx.ejs +0 -40
  75. package/build/templates/packages/restyle/components/Container.tsx.ejs +0 -6
  76. package/build/templates/packages/restyle/components/EditScreenInfo.tsx.ejs +0 -29
  77. package/build/templates/packages/restyle/components/ScreenContent.tsx.ejs +0 -21
  78. package/build/templates/packages/restyle/theme/Box.tsx.ejs +0 -6
  79. package/build/templates/packages/restyle/theme/Text.tsx.ejs +0 -6
  80. package/build/templates/packages/restyle/theme/index.ts.ejs +0 -6
  81. package/build/templates/packages/restyle/theme/theme.ts.ejs +0 -67
  82. package/build/templates/packages/tamagui/components/BackButton.tsx.ejs +0 -19
  83. package/build/templates/packages/tamagui/components/Button.tsx.ejs +0 -18
  84. package/build/templates/packages/tamagui/components/Container.tsx.ejs +0 -6
  85. package/build/templates/packages/tamagui/components/EditScreenInfo.tsx.ejs +0 -29
  86. package/build/templates/packages/tamagui/components/ScreenContent.tsx.ejs +0 -23
  87. package/build/templates/packages/tamagui/tamagui.config.ts.ejs +0 -130
@@ -9,23 +9,7 @@
9
9
  <% if (props.internalizationPackage?.name === "i18next") { %>
10
10
  import '../translation';
11
11
  <% } %>
12
-
13
- <% if (props.stylingPackage?.name === "tamagui") { %>
14
- import React, { useEffect } from "react";
15
- import { TamaguiProvider } from 'tamagui'
16
- import { SplashScreen, Stack } from "expo-router";
17
- import { useFonts } from "expo-font";
18
-
19
- import config from '../tamagui.config'
20
-
21
- SplashScreen.preventAutoHideAsync();
22
- <% } else if (props.stylingPackage?.name === "restyle") { %>
23
- import { ThemeProvider } from '@shopify/restyle';
24
- import { Stack } from 'expo-router';
25
- import { theme } from 'theme';
26
- <% } else { %>
27
12
  import { Stack } from "expo-router";
28
- <% } %>
29
13
 
30
14
  <% if (props.analyticsPackage?.name === "vexo-analytics") { %>
31
15
  import { vexo } from 'vexo-analytics';
@@ -39,30 +23,11 @@ export const unstable_settings = {
39
23
  };
40
24
 
41
25
  export default function RootLayout() {
42
- <% if (props.stylingPackage?.name === "tamagui") { %>
43
- const [loaded] = useFonts({
44
- Inter: require("@tamagui/font-inter/otf/Inter-Medium.otf"),
45
- InterBold: require("@tamagui/font-inter/otf/Inter-Bold.otf")
46
- });
47
-
48
- useEffect(() => {
49
- if (loaded) {
50
- SplashScreen.hideAsync();
51
- }
52
- }, [loaded]);
53
-
54
- if (!loaded) return null;
55
- <% } %>
56
- <% if (props.stylingPackage?.name === "unistyles") { %>
57
- const { theme } = useUnistyles();
58
- <% } %>
26
+ <% if (props.stylingPackage?.name === "unistyles") { %>
27
+ const { theme } = useUnistyles();
28
+ <% } %>
59
29
 
60
- return (
61
- <% if (props.stylingPackage?.name === "tamagui") { %>
62
- <TamaguiProvider config={config}>
63
- <% } else if (props.stylingPackage?.name === "restyle") { %>
64
- <ThemeProvider theme={theme}>
65
- <% } %>
30
+ return (
66
31
  <% if (props.stylingPackage?.name === "unistyles") { %>
67
32
  <Stack
68
33
  screenOptions={{
@@ -78,13 +43,8 @@ export default function RootLayout() {
78
43
  <% } else { %>
79
44
  <Stack>
80
45
  <% } %>
81
- <Stack.Screen name="(tabs)" options={{ headerShown: false }} />
82
- <Stack.Screen name="modal" options={{ presentation: "modal" }} />
83
- </Stack>
84
- <% if (props.stylingPackage?.name === "tamagui") { %>
85
- </TamaguiProvider>
86
- <% } else if (props.stylingPackage?.name === "restyle") { %>
87
- </ThemeProvider>
88
- <% } %>
89
- );
46
+ <Stack.Screen name="(tabs)" options={{ headerShown: false }} />
47
+ <Stack.Screen name="modal" options={{ presentation: "modal" }} />
48
+ </Stack>
49
+ );
90
50
  }
@@ -1,2 +1,3 @@
1
- @import 'tailwindcss';
2
- @import 'nativewind/theme';
1
+ @tailwind base;
2
+ @tailwind components;
3
+ @tailwind utilities;
@@ -1,8 +1,7 @@
1
- // Learn more https://docs.expo.io/guides/customizing-metro
2
1
  const { getDefaultConfig } = require('expo/metro-config');
3
- const { withNativewind } = require('nativewind/metro');
2
+ const { withNativeWind } = require('nativewind/metro');
4
3
 
5
- /** @type {import('expo/metro-config').MetroConfig} */
4
+ // eslint-disable-next-line no-undef
6
5
  const config = getDefaultConfig(__dirname);
7
6
 
8
- module.exports = withNativewind(config);
7
+ module.exports = withNativeWind(config, { input: './global.css' });
@@ -1,4 +1,2 @@
1
1
  // @ts-ignore
2
- /// <reference types="react-native-css/types" />
3
-
4
- // NOTE: This file should not be edited and should be committed with your source code. It is generated by react-native-css. If you need to move or disable this file, please see the documentation.
2
+ /// <reference types="nativewind/types" />
@@ -0,0 +1,15 @@
1
+ /** @type {import('tailwindcss').Config} */
2
+ module.exports = {
3
+ <% if (props.navigationPackage?.name === "react-navigation") { %>
4
+ content: ["./App.{js,ts,tsx}", "./components/**/*.{js,ts,tsx}", "./screens/**/*.{js,ts,tsx}", "./navigation/**/*.{js,ts,tsx}"],
5
+ <% } else if (props.navigationPackage?.name === "expo-router") { %>
6
+ content: ["./app/**/*.{js,ts,tsx}", "./components/**/*.{js,ts,tsx}"],
7
+ <% } else { %>
8
+ content: ["./App.{js,ts,tsx}", "./components/**/*.{js,ts,tsx}"],
9
+ <% } %>
10
+ presets: [require("nativewind/preset")],
11
+ theme: {
12
+ extend: {},
13
+ },
14
+ plugins: [],
15
+ }
@@ -8,6 +8,7 @@ const styles = StyleSheet.create({
8
8
  container: {
9
9
  flex: 1,
10
10
  padding: 24,
11
+ backgroundColor: 'white',
11
12
  },
12
13
  });
13
14
 
@@ -1,6 +1,6 @@
1
1
  import { StyleSheet, View } from 'react-native';
2
2
 
3
- import { Text } from '~/components/nativewindui/Text';
3
+ import { Text } from '@/components/nativewindui/Text';
4
4
 
5
5
  <% if (props.internalizationPackage?.name === "i18next") { %>
6
6
  import { useTranslation } from 'react-i18next';
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import { StyleSheet, View } from 'react-native';
3
3
 
4
- import { Text } from '~/components/nativewindui/Text';
4
+ import { Text } from '@/components/nativewindui/Text';
5
5
 
6
6
  import EditScreenInfo from './EditScreenInfo';
7
7
 
@@ -0,0 +1,52 @@
1
+ import { SymbolView } from 'expo-symbols';
2
+
3
+ import type { IconProps } from './types';
4
+
5
+ import { useColorScheme } from '@/lib/useColorScheme';
6
+
7
+ function Icon({
8
+ materialCommunityIcon: _materialCommunityIcon,
9
+ materialIcon: _materialIcon,
10
+ sfSymbol,
11
+ name,
12
+ color,
13
+ size = 24,
14
+ ...props
15
+ }: IconProps) {
16
+ const { colors } = useColorScheme();
17
+ return (
18
+ <SymbolView
19
+ name={name ?? 'questionmark'}
20
+ tintColor={rgbaToHex(color ?? colors.foreground)}
21
+ size={size}
22
+ resizeMode="scaleAspectFit"
23
+ {...props}
24
+ {...sfSymbol}
25
+ />
26
+ );
27
+ }
28
+
29
+ export { Icon };
30
+
31
+ // TODO: seems like the need to convert rgba to hex color is a bug in expo-symbols, accordion to the docs, it should accept a hex color, but it doesn't.
32
+
33
+ function rgbaToHex(color: string): string {
34
+ if (!color) return 'black';
35
+ const rgbaRegex =
36
+ /^rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})(?:\s*,\s*(\d*\.?\d+))?\s*\)$/i;
37
+ const match = color.match(rgbaRegex);
38
+
39
+ if (!match) {
40
+ return color;
41
+ }
42
+
43
+ const [, rStr, gStr, bStr, aStr] = match;
44
+ const r = Math.min(255, parseInt(rStr));
45
+ const g = Math.min(255, parseInt(gStr));
46
+ const b = Math.min(255, parseInt(bStr));
47
+ const a = aStr !== undefined ? Math.round(parseFloat(aStr) * 255) : 255;
48
+
49
+ const toHex = (n: number) => n.toString(16).padStart(2, '0');
50
+
51
+ return `#${toHex(r)}${toHex(g)}${toHex(b)}${a < 255 ? toHex(a) : ''}`;
52
+ }
@@ -0,0 +1,58 @@
1
+ import MaterialCommunityIcons from '@expo/vector-icons/MaterialCommunityIcons';
2
+ import MaterialIcons from '@expo/vector-icons/MaterialIcons';
3
+ import {
4
+ SF_SYMBOLS_TO_MATERIAL_COMMUNITY_ICONS,
5
+ SF_SYMBOLS_TO_MATERIAL_ICONS,
6
+ } from 'rn-icon-mapper';
7
+
8
+ import type { IconProps } from './types';
9
+
10
+ import { useColorScheme } from '@/lib/useColorScheme';
11
+
12
+ function Icon({
13
+ name,
14
+ materialCommunityIcon,
15
+ materialIcon,
16
+ sfSymbol: _sfSymbol,
17
+ size = 24,
18
+ ...props
19
+ }: IconProps) {
20
+ const { colors } = useColorScheme();
21
+ const defaultColor = colors.foreground;
22
+
23
+ if (materialCommunityIcon) {
24
+ return (
25
+ <MaterialCommunityIcons
26
+ size={size}
27
+ color={defaultColor}
28
+ {...props}
29
+ {...materialCommunityIcon}
30
+ />
31
+ );
32
+ }
33
+ if (materialIcon) {
34
+ return <MaterialIcons size={size} color={defaultColor} {...props} {...materialIcon} />;
35
+ }
36
+ const materialCommunityIconName =
37
+ SF_SYMBOLS_TO_MATERIAL_COMMUNITY_ICONS[
38
+ name as keyof typeof SF_SYMBOLS_TO_MATERIAL_COMMUNITY_ICONS
39
+ ];
40
+ if (materialCommunityIconName) {
41
+ return (
42
+ <MaterialCommunityIcons
43
+ name={materialCommunityIconName}
44
+ size={size}
45
+ color={defaultColor}
46
+ {...props}
47
+ />
48
+ );
49
+ }
50
+ const materialIconName =
51
+ SF_SYMBOLS_TO_MATERIAL_ICONS[name as keyof typeof SF_SYMBOLS_TO_MATERIAL_ICONS];
52
+ if (materialIconName) {
53
+ return <MaterialIcons name={materialIconName} size={size} color={defaultColor} {...props} />;
54
+ }
55
+ return <MaterialCommunityIcons name="help" size={size} color={defaultColor} {...props} />;
56
+ }
57
+
58
+ export { Icon };
@@ -0,0 +1,16 @@
1
+ import { cssInterop } from 'nativewind';
2
+
3
+ import { Icon } from './Icon';
4
+
5
+ cssInterop(Icon, {
6
+ className: {
7
+ target: 'style',
8
+ nativeStyleToProp: {
9
+ color: 'color',
10
+ height: 'size',
11
+ width: 'size',
12
+ },
13
+ },
14
+ });
15
+
16
+ export { Icon };
@@ -0,0 +1,18 @@
1
+ import type MaterialCommunityIcons from '@expo/vector-icons/MaterialCommunityIcons';
2
+ import type MaterialIcons from '@expo/vector-icons/MaterialIcons';
3
+ import type { SymbolViewProps } from 'expo-symbols';
4
+ import type { IconMapper } from 'rn-icon-mapper';
5
+
6
+ type MaterialCommunityIconsProps = React.ComponentProps<typeof MaterialCommunityIcons>;
7
+ type MaterialIconsProps = React.ComponentProps<typeof MaterialIcons>;
8
+
9
+ type Style = SymbolViewProps['style'] &
10
+ MaterialIconsProps['style'] &
11
+ MaterialCommunityIconsProps['style'];
12
+
13
+ type IconProps = IconMapper<SymbolViewProps, MaterialIconsProps, MaterialCommunityIconsProps> & {
14
+ style?: Style;
15
+ className?: string;
16
+ };
17
+
18
+ export type { IconProps };
@@ -1,10 +1,10 @@
1
- import { Icon } from '@roninoss/icons';
2
1
  import { Pressable, View } from 'react-native';
3
2
  import Animated, { LayoutAnimationConfig, ZoomInRotate } from 'react-native-reanimated';
4
3
 
5
- import { cn } from '~/lib/cn';
6
- import { useColorScheme } from '~/lib/useColorScheme';
7
- import { COLORS } from '~/theme/colors';
4
+ import { Icon } from '@/components/nativewindui/Icon';
5
+ import { cn } from '@/lib/cn';
6
+ import { useColorScheme } from '@/lib/useColorScheme';
7
+ import { COLORS } from '@/theme/colors';
8
8
 
9
9
  export function ThemeToggle() {
10
10
  const { colorScheme, toggleColorScheme } = useColorScheme();
@@ -14,22 +14,20 @@ export function ThemeToggle() {
14
14
  className="items-center justify-center"
15
15
  key={`toggle-${colorScheme}`}
16
16
  entering={ZoomInRotate}>
17
- <Pressable
18
- onPress={toggleColorScheme}
19
- className="opacity-80">
17
+ <Pressable onPress={toggleColorScheme} className="opacity-80">
20
18
  {colorScheme === 'dark'
21
19
  ? ({ pressed }) => (
22
20
  <View className={cn('px-0.5', pressed && 'opacity-50')}>
23
- <Icon namingScheme="sfSymbol" name="moon.stars" color={COLORS.white} />
21
+ <Icon name="moon.stars" color={COLORS.white} />
24
22
  </View>
25
23
  )
26
24
  : ({ pressed }) => (
27
25
  <View className={cn('px-0.5', pressed && 'opacity-50')}>
28
- <Icon namingScheme="sfSymbol" name="sun.min" color={COLORS.black} />
26
+ <Icon name="sun.min" color={COLORS.black} />
29
27
  </View>
30
28
  )}
31
29
  </Pressable>
32
30
  </Animated.View>
33
31
  </LayoutAnimationConfig>
34
32
  );
35
- }
33
+ }
@@ -1,6 +1,6 @@
1
1
  import { Stack } from 'expo-router';
2
2
  import { useHeaderHeight } from '@react-navigation/elements';
3
- import { LegendList } from '@legendapp/list';
3
+ import { FlashList } from '@shopify/flash-list';
4
4
  import { cssInterop } from 'nativewind';
5
5
  import * as React from 'react';
6
6
  import {
@@ -32,34 +32,33 @@ import { Icon } from '@roninoss/icons';
32
32
  import * as StoreReview from 'expo-store-review';
33
33
  <% } %>
34
34
 
35
- import { Container } from '~/components/Container';
35
+ import { Container } from '@/components/Container';
36
36
  <% if (props.stylingPackage?.options.selectedComponents.includes('activity-indicator')) { %>
37
- import { ActivityIndicator } from '~/components/nativewindui/ActivityIndicator';
37
+ import { ActivityIndicator } from '@/components/nativewindui/ActivityIndicator';
38
38
  <% } %>
39
39
  <% if (props.stylingPackage?.options.selectedComponents.includes('avatar')) { %>
40
- import { Avatar, AvatarFallback, AvatarImage } from '~/components/nativewindui/Avatar';
40
+ import { Avatar, AvatarFallback, AvatarImage } from '@/components/nativewindui/Avatar';
41
41
  <% } %>
42
42
  <% if (props.stylingPackage?.options.selectedComponents.includes('date-picker')) { %>
43
- import { DatePicker } from '~/components/nativewindui/DatePicker';
43
+ import { DatePicker } from '@/components/nativewindui/DatePicker';
44
44
  <% } %>
45
45
  <% if (props.stylingPackage?.options.selectedComponents.includes('picker')) { %>
46
- import { Picker, PickerItem } from '~/components/nativewindui/Picker';
46
+ import { Picker, PickerItem } from '@/components/nativewindui/Picker';
47
47
  <% } %>
48
48
  <% if (props.stylingPackage?.options.selectedComponents.includes('progress-indicator')) { %>
49
- import { ProgressIndicator } from '~/components/nativewindui/ProgressIndicator';
49
+ import { ProgressIndicator } from '@/components/nativewindui/ProgressIndicator';
50
50
  <% } %>
51
51
  <% if (props.stylingPackage?.options.selectedComponents.includes('bottom-sheet')) { %>
52
- import { Sheet, useSheetRef } from '~/components/nativewindui/Sheet';
52
+ import { Sheet, useSheetRef } from '@/components/nativewindui/Sheet';
53
53
  <% } %>
54
54
  <% if (props.stylingPackage?.options.selectedComponents.includes('slider')) { %>
55
- import { Slider } from '~/components/nativewindui/Slider';
55
+ import { Slider } from '@/components/nativewindui/Slider';
56
56
  <% } %>
57
- import { Text } from '~/components/nativewindui/Text';
57
+ import { Text } from '@/components/nativewindui/Text';
58
58
  <% if (props.stylingPackage?.options.selectedComponents.includes('toggle')) { %>
59
- import { Toggle } from '~/components/nativewindui/Toggle';
59
+ import { Toggle } from '@/components/nativewindui/Toggle';
60
60
  <% } %>
61
- import { useColorScheme } from '~/lib/useColorScheme';
62
- import { useHeaderSearchBar } from '~/lib/useHeaderSearchBar';
61
+ import { useColorScheme } from '@/lib/useColorScheme';
63
62
 
64
63
  export default function Home() {
65
64
  const searchValue = useHeaderSearchBar({ hideWhenScrolling: COMPONENTS.length === 0 });
@@ -72,7 +71,7 @@ export default function Home() {
72
71
  <>
73
72
  <Stack.Screen options={{ title: 'Home' }} />
74
73
  <Container>
75
- <LegendList
74
+ <FlashList
76
75
  contentInsetAdjustmentBehavior="automatic"
77
76
  keyboardShouldPersistTaps="handled"
78
77
  data={data}
@@ -83,14 +82,13 @@ export default function Home() {
83
82
  ItemSeparatorComponent={renderItemSeparator}
84
83
  renderItem={renderItem}
85
84
  ListEmptyComponent={COMPONENTS.length === 0 ? ListEmptyComponent : undefined}
86
- recycleItems
87
85
  />
88
86
  </Container>
89
87
  </>
90
88
  );
91
89
  }
92
90
 
93
- cssInterop(LegendList, {
91
+ cssInterop(FlashList, {
94
92
  className: 'style',
95
93
  contentContainerClassName: 'contentContainerStyle',
96
94
  });
@@ -125,7 +123,7 @@ function ListEmptyComponent() {
125
123
  variant='subhead'
126
124
  className='text-primary'
127
125
  >
128
- NativeWindUI
126
+ NativewindUI
129
127
  </Text>
130
128
  {' website.'}
131
129
  </Text>
@@ -466,7 +464,7 @@ const COMPONENTS: ComponentItem[] = [
466
464
  onPress={async () => {
467
465
  try {
468
466
  const result = await Share.share({
469
- message: 'NativeWindUI | Familiar interface, native feel.',
467
+ message: 'NativewindUI | Familiar interface, native feel.',
470
468
  });
471
469
  if (result.action === Share.sharedAction) {
472
470
  if (result.activityType) {
@@ -523,7 +521,7 @@ const COMPONENTS: ComponentItem[] = [
523
521
  const TWITTER_AVATAR_URI = 'https://pbs.twimg.com/profile_images/1782428433898708992/1voyv4_A_400x400.jpg';
524
522
  return (
525
523
  <View className='items-center'>
526
- <Avatar alt="NativeWindUI Avatar">
524
+ <Avatar alt="NativewindUI Avatar">
527
525
  <AvatarImage source={{ uri: TWITTER_AVATAR_URI }} />
528
526
  <AvatarFallback>
529
527
  <Text>NUI</Text>
@@ -2,29 +2,20 @@ import { Link, Stack } from 'expo-router';
2
2
  <% if (["nativewind", "nativewindui"].includes(props.stylingPackage?.name)) {%>
3
3
  import { Text } from 'react-native';
4
4
 
5
- import { Container } from '~/components/Container';
5
+ import { Container } from '@/components/Container';
6
6
  <% } else if (props.stylingPackage?.name === "unistyles") { %>
7
7
  import { createStyleSheet, useStyles } from 'react-native-unistyles'
8
8
  import { Text } from 'react-native';
9
9
 
10
- import { Container } from '~/components/Container';
10
+ import { Container } from '@/components/Container';
11
11
  <% } else if (props.stylingPackage?.name === "stylesheet") { %>
12
12
  import { StyleSheet, Text } from 'react-native';
13
13
 
14
- import { Container } from '~/components/Container';
15
- <% } else if (props.stylingPackage?.name === "tamagui") { %>
16
- import { YStack } from "tamagui";
17
- import { Container, Main, Subtitle, Title } from "../tamagui.config";
18
- <% } else if (props.stylingPackage?.name === "restyle") { %>
19
- import { Box, Text, makeStyles } from 'theme';
20
-
21
- import { Container } from '~/components/Container';
14
+ import { Container } from '@/components/Container';
22
15
  <% } %>
23
16
 
24
17
  export default function NotFoundScreen() {
25
- <% if (props.stylingPackage?.name === "restyle") { %>
26
- const styles = useStyles();
27
- <% } else if (props.stylingPackage?.name === "unistyles") {%>
18
+ <% if (props.stylingPackage?.name === "unistyles") {%>
28
19
  const { styles } = useStyles(stylesheet);
29
20
  <% } %>
30
21
 
@@ -39,30 +30,6 @@ export default function NotFoundScreen() {
39
30
  </Link>
40
31
  </Container>
41
32
  </>
42
- <% } else if (props.stylingPackage?.name === "tamagui") {%>
43
- <Container>
44
- <Stack.Screen options={{ title: "Oops!" }} />
45
- <Main>
46
- <YStack>
47
- <Title>{"This screen doesn't exist."}</Title>
48
- <Link href="/">
49
- <Subtitle>Go to home screen!</Subtitle>
50
- </Link>
51
- </YStack>
52
- </Main>
53
- </Container>
54
- <% } else if (props.stylingPackage?.name === "restyle") {%>
55
- <>
56
- <Stack.Screen options={{ title: 'Oops!' }} />
57
- <Container>
58
- <Text variant="title">{"This screen doesn't exist."}</Text>
59
- <Link href="/" style={styles.link}>
60
- <Text variant="body" color="blue">
61
- Go to home screen!
62
- </Text>
63
- </Link>
64
- </Container>
65
- </>
66
33
  <% } else { %>
67
34
  <>
68
35
  <Stack.Screen options={{ title: "Oops!" }} />
@@ -113,11 +80,4 @@ export default function NotFoundScreen() {
113
80
  color: '#2e78b7',
114
81
  },
115
82
  });
116
- <% } else if (props.stylingPackage?.name === "restyle") { %>
117
- const useStyles = makeStyles((theme) => ({
118
- link: {
119
- marginTop: theme.spacing.m_16,
120
- paddingVertical: theme.spacing.m_16,
121
- },
122
- }));
123
83
  <% } %>
@@ -13,8 +13,8 @@ import { StatusBar } from 'expo-status-bar';
13
13
  import { GestureHandlerRootView } from 'react-native-gesture-handler';
14
14
  <% } %>
15
15
 
16
- import { ThemeToggle } from '~/components/ThemeToggle';
17
- import { useColorScheme, useInitialAndroidBarSync } from '~/lib/useColorScheme';
16
+ import { ThemeToggle } from '@/components/ThemeToggle';
17
+ import { useColorScheme, useInitialAndroidBarSync } from '@/lib/useColorScheme';
18
18
  import { NAV_THEME } from '~/theme';
19
19
 
20
20
  export {
@@ -2,8 +2,8 @@ import { Icon } from '@roninoss/icons';
2
2
  import { StatusBar } from 'expo-status-bar';
3
3
  import { Linking, Platform, View } from 'react-native';
4
4
 
5
- import { Text } from '~/components/nativewindui/Text';
6
- import { useColorScheme } from '~/lib/useColorScheme';
5
+ import { Text } from '@/components/nativewindui/Text';
6
+ import { useColorScheme } from '@/lib/useColorScheme';
7
7
 
8
8
  export default function ModalScreen() {
9
9
  const { colors, colorScheme } = useColorScheme();
@@ -15,7 +15,7 @@ export default function ModalScreen() {
15
15
  <View className="flex-1 items-center justify-center gap-1 px-12">
16
16
  <Icon name="file-plus-outline" size={42} color={colors.grey} />
17
17
  <Text variant="title3" className="pb-1 text-center font-semibold">
18
- NativeWindUI
18
+ NativewindUI
19
19
  </Text>
20
20
  <Text color="tertiary" variant="subhead" className="pb-4 text-center">
21
21
  You can install any of the free components from the{' '}
@@ -23,7 +23,7 @@ export default function ModalScreen() {
23
23
  onPress={() => Linking.openURL('https://nativewindui.com')}
24
24
  variant="subhead"
25
25
  className="text-primary">
26
- NativeWindUI
26
+ NativewindUI
27
27
  </Text>
28
28
  {' website.'}
29
29
  </Text>
@@ -1,22 +1,9 @@
1
- import * as NavigationBar from 'expo-navigation-bar';
2
1
  import { useColorScheme as useNativewindColorScheme } from 'nativewind';
3
- import * as React from 'react';
4
- import { Platform } from 'react-native';
5
2
 
6
- import { COLORS } from '~/theme/colors';
3
+ import { COLORS } from '@/theme/colors';
7
4
 
8
5
  function useColorScheme() {
9
- const { colorScheme, setColorScheme: setNativeWindColorScheme } = useNativewindColorScheme();
10
-
11
- async function setColorScheme(colorScheme: 'light' | 'dark') {
12
- setNativeWindColorScheme(colorScheme);
13
- if (Platform.OS !== 'android') return;
14
- try {
15
- await setNavigationBar(colorScheme);
16
- } catch (error) {
17
- console.error('useColorScheme.tsx", "setColorScheme', error);
18
- }
19
- }
6
+ const { colorScheme, setColorScheme } = useNativewindColorScheme();
20
7
 
21
8
  function toggleColorScheme() {
22
9
  return setColorScheme(colorScheme === 'light' ? 'dark' : 'light');
@@ -31,25 +18,4 @@ function useColorScheme() {
31
18
  };
32
19
  }
33
20
 
34
- /**
35
- * Set the Android navigation bar color based on the color scheme.
36
- */
37
- function useInitialAndroidBarSync() {
38
- const { colorScheme } = useColorScheme();
39
- React.useEffect(() => {
40
- if (Platform.OS !== 'android') return;
41
- setNavigationBar(colorScheme).catch((error) => {
42
- console.error('useColorScheme.tsx", "useInitialColorScheme', error);
43
- });
44
- }, [colorScheme]);
45
- }
46
-
47
- export { useColorScheme, useInitialAndroidBarSync };
48
-
49
- function setNavigationBar(colorScheme: 'light' | 'dark') {
50
- return Promise.all([
51
- NavigationBar.setButtonStyleAsync(colorScheme === 'dark' ? 'light' : 'dark'),
52
- NavigationBar.setPositionAsync('absolute'),
53
- NavigationBar.setBackgroundColorAsync(colorScheme === 'dark' ? '#00000030' : '#ffffff80'),
54
- ]);
55
- }
21
+ export { useColorScheme };
@@ -1,6 +1,6 @@
1
1
  import { Link, Stack } from 'expo-router';
2
2
  import { View } from 'react-native';
3
- import { Text } from '~/components/nativewindui/Text';
3
+ import { Text } from '@/components/nativewindui/Text';
4
4
 
5
5
  export default function NotFoundScreen() {
6
6
  return (