create-expo-stack 2.6.5 → 2.7.0-next.ba3b85d
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/README.md +7 -0
- package/build/templates/base/App.tsx.ejs +3 -0
- package/build/templates/base/babel.config.js.ejs +1 -1
- package/build/templates/base/package.json.ejs +14 -3
- package/build/templates/base/prettier.config.js.ejs +1 -1
- package/build/templates/base/tsconfig.json.ejs +10 -6
- package/build/templates/packages/expo-router/drawer/app/_layout.tsx.ejs +4 -1
- package/build/templates/packages/expo-router/stack/app/_layout.tsx.ejs +4 -1
- package/build/templates/packages/expo-router/tabs/app/_layout.tsx.ejs +4 -1
- package/build/templates/packages/nativewindui/app/+not-found.tsx.ejs +18 -0
- package/build/templates/packages/nativewindui/app/_layout.tsx.ejs +85 -0
- package/build/templates/packages/nativewindui/app/bottom-tabs/_layout.tsx.ejs +34 -0
- package/build/templates/packages/nativewindui/app/bottom-tabs/index.tsx.ejs +11 -0
- package/build/templates/packages/nativewindui/app/bottom-tabs/profile.tsx.ejs +11 -0
- package/build/templates/packages/nativewindui/app/drawer/_layout.tsx.ejs +29 -0
- package/build/templates/packages/nativewindui/app/drawer/index.tsx.ejs +11 -0
- package/build/templates/packages/nativewindui/app/index.tsx.ejs +165 -0
- package/build/templates/packages/nativewindui/app/modal.tsx.ejs +32 -0
- package/build/templates/packages/nativewindui/app/top-tabs/_layout.tsx.ejs +71 -0
- package/build/templates/packages/nativewindui/app/top-tabs/following.tsx.ejs +13 -0
- package/build/templates/packages/nativewindui/app/top-tabs/index.tsx.ejs +13 -0
- package/build/templates/packages/nativewindui/app/top-tabs/my-group.tsx.ejs +13 -0
- package/build/templates/packages/nativewindui/components/Text.tsx.ejs +55 -0
- package/build/templates/packages/nativewindui/components/ThemeToggle.tsx.ejs +39 -0
- package/build/templates/packages/nativewindui/components/Toggle.tsx.ejs +17 -0
- package/build/templates/packages/nativewindui/expo-env.d.ts.ejs +3 -0
- package/build/templates/packages/nativewindui/global.css.ejs +91 -0
- package/build/templates/packages/nativewindui/lib/cn.ts.ejs +6 -0
- package/build/templates/packages/nativewindui/lib/useColorScheme.tsx.ejs +14 -0
- package/build/templates/packages/nativewindui/lib/useHeaderSearchBar.tsx.ejs +31 -0
- package/build/templates/packages/nativewindui/metro.config.js.ejs +10 -0
- package/build/templates/packages/nativewindui/nativewind-env.d.ts.ejs +1 -0
- package/build/templates/packages/nativewindui/tailwind.config.js.ejs +66 -0
- package/build/templates/packages/nativewindui/theme/colors.ts.ejs +71 -0
- package/build/templates/packages/nativewindui/theme/index.ts.ejs +29 -0
- package/build/templates/packages/react-navigation/App.tsx.ejs +4 -1
- package/build/types/types.d.ts +2 -2
- package/build/types.js +2 -1
- package/build/utilities/configureProjectFiles.js +239 -200
- package/build/utilities/generateProjectFiles.js +18 -13
- package/build/utilities/printOutput.js +5 -5
- package/build/utilities/runCLI.js +45 -22
- package/package.json +67 -67
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { VariantProps, cva } from 'class-variance-authority';
|
|
2
|
+
import { cssInterop } from 'nativewind';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { UITextView } from 'react-native-uitextview';
|
|
5
|
+
|
|
6
|
+
import { cn } from '@/lib/cn';
|
|
7
|
+
|
|
8
|
+
cssInterop(UITextView, { className: 'style' });
|
|
9
|
+
|
|
10
|
+
const textVariants = cva('text-foreground', {
|
|
11
|
+
variants: {
|
|
12
|
+
variant: {
|
|
13
|
+
largeTitle: 'text-4xl',
|
|
14
|
+
title1: 'text-2xl',
|
|
15
|
+
title2: 'text-[22px] leading-7',
|
|
16
|
+
title3: 'text-xl',
|
|
17
|
+
heading: 'text-[17px] leading-6 font-semibold',
|
|
18
|
+
body: 'text-[17px] leading-6',
|
|
19
|
+
callout: 'text-base',
|
|
20
|
+
subhead: 'text-[15px] leading-6',
|
|
21
|
+
footnote: 'text-[13px] leading-5',
|
|
22
|
+
caption1: 'text-xs',
|
|
23
|
+
caption2: 'text-[11px] leading-4',
|
|
24
|
+
},
|
|
25
|
+
color: {
|
|
26
|
+
primary: '',
|
|
27
|
+
secondary: 'text-secondary-foreground/90',
|
|
28
|
+
tertiary: 'text-muted-foreground/90',
|
|
29
|
+
quarternary: 'text-muted-foreground/50',
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
defaultVariants: {
|
|
33
|
+
variant: 'body',
|
|
34
|
+
color: 'primary',
|
|
35
|
+
},
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
const TextClassContext = React.createContext<string | undefined>(undefined);
|
|
39
|
+
|
|
40
|
+
function Text({
|
|
41
|
+
className,
|
|
42
|
+
variant,
|
|
43
|
+
color,
|
|
44
|
+
...props
|
|
45
|
+
}: React.ComponentPropsWithoutRef<typeof UITextView> & VariantProps<typeof textVariants>) {
|
|
46
|
+
const textClassName = React.useContext(TextClassContext);
|
|
47
|
+
return (
|
|
48
|
+
<UITextView
|
|
49
|
+
className={cn(textVariants({ variant, color }), textClassName, className)}
|
|
50
|
+
{...props}
|
|
51
|
+
/>
|
|
52
|
+
);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export { Text, TextClassContext, textVariants };
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { Icon } from '@roninoss/icons';
|
|
2
|
+
import { Appearance, Pressable, View } from 'react-native';
|
|
3
|
+
import Animated, { LayoutAnimationConfig, ZoomInRotate } from 'react-native-reanimated';
|
|
4
|
+
|
|
5
|
+
import { cn } from '@/lib/cn';
|
|
6
|
+
import { useColorScheme } from '@/lib/useColorScheme';
|
|
7
|
+
import { COLORS } from '@/theme/colors';
|
|
8
|
+
|
|
9
|
+
export function ThemeToggle() {
|
|
10
|
+
const { colorScheme, toggleColorScheme } = useColorScheme();
|
|
11
|
+
return (
|
|
12
|
+
<LayoutAnimationConfig skipEntering>
|
|
13
|
+
<Animated.View
|
|
14
|
+
className="h-6 w-6 items-center justify-center"
|
|
15
|
+
key={`toggle-${colorScheme}`}
|
|
16
|
+
entering={ZoomInRotate}>
|
|
17
|
+
<Pressable
|
|
18
|
+
onPress={() => {
|
|
19
|
+
// ColorScheme is set with `Appearance` as well for the iOS header search placeholder text: https://github.com/software-mansion/react-native-screens/discussions/1758
|
|
20
|
+
Appearance.setColorScheme(colorScheme === 'dark' ? 'light' : 'dark');
|
|
21
|
+
toggleColorScheme();
|
|
22
|
+
}}
|
|
23
|
+
className="opacity-80">
|
|
24
|
+
{colorScheme === 'dark'
|
|
25
|
+
? ({ pressed }) => (
|
|
26
|
+
<View className={cn('px-0.5', pressed && 'opacity-50')}>
|
|
27
|
+
<Icon namingScheme="sfSymbol" name="moon.stars" color={COLORS.white} />
|
|
28
|
+
</View>
|
|
29
|
+
)
|
|
30
|
+
: ({ pressed }) => (
|
|
31
|
+
<View className={cn('px-0.5', pressed && 'opacity-50')}>
|
|
32
|
+
<Icon namingScheme="sfSymbol" name="sun.min" color={COLORS.black} />
|
|
33
|
+
</View>
|
|
34
|
+
)}
|
|
35
|
+
</Pressable>
|
|
36
|
+
</Animated.View>
|
|
37
|
+
</LayoutAnimationConfig>
|
|
38
|
+
);
|
|
39
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { useColorScheme } from '@/lib/useColorScheme';
|
|
2
|
+
import { COLORS } from '@/theme/colors';
|
|
3
|
+
import { Switch } from 'react-native';
|
|
4
|
+
|
|
5
|
+
export function Toggle(props: React.ComponentPropsWithoutRef<typeof Switch>) {
|
|
6
|
+
const { colors } = useColorScheme();
|
|
7
|
+
return (
|
|
8
|
+
<Switch
|
|
9
|
+
trackColor={{
|
|
10
|
+
true: colors.blue,
|
|
11
|
+
false: colors.grey,
|
|
12
|
+
}}
|
|
13
|
+
thumbColor={COLORS.white}
|
|
14
|
+
{...props}
|
|
15
|
+
/>
|
|
16
|
+
);
|
|
17
|
+
}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
@tailwind base;
|
|
2
|
+
@tailwind components;
|
|
3
|
+
@tailwind utilities;
|
|
4
|
+
|
|
5
|
+
@layer base {
|
|
6
|
+
:root {
|
|
7
|
+
--background: 242 242 247;
|
|
8
|
+
--foreground: 0 0 0;
|
|
9
|
+
--card: 255 255 255;
|
|
10
|
+
--card-foreground: 8 28 30;
|
|
11
|
+
--popover: 230 230 235;
|
|
12
|
+
--popover-foreground: 0 0 0;
|
|
13
|
+
--primary: 0 123 254;
|
|
14
|
+
--primary-foreground: 255 255 255;
|
|
15
|
+
--secondary: 45 175 231;
|
|
16
|
+
--secondary-foreground: 255 255 255;
|
|
17
|
+
--muted: 175 176 180;
|
|
18
|
+
--muted-foreground: 142 142 147;
|
|
19
|
+
--accent: 255 40 84;
|
|
20
|
+
--accent-foreground: 255 255 255;
|
|
21
|
+
--destructive: 255 56 43;
|
|
22
|
+
--destructive-foreground: 255 255 255;
|
|
23
|
+
--border: 230 230 235;
|
|
24
|
+
--input: 210 210 215;
|
|
25
|
+
--ring: 230 230 235;
|
|
26
|
+
|
|
27
|
+
--android-background: 249 249 255;
|
|
28
|
+
--android-foreground: 0 0 0;
|
|
29
|
+
--android-card: 255 255 255;
|
|
30
|
+
--android-card-foreground: 24 28 35;
|
|
31
|
+
--android-popover: 215 217 228;
|
|
32
|
+
--android-popover-foreground: 0 0 0;
|
|
33
|
+
--android-primary: 0 112 233;
|
|
34
|
+
--android-primary-foreground: 255 255 255;
|
|
35
|
+
--android-secondary: 176 201 255;
|
|
36
|
+
--android-secondary-foreground: 20 55 108;
|
|
37
|
+
--android-muted: 193 198 215;
|
|
38
|
+
--android-muted-foreground: 113 119 134;
|
|
39
|
+
--android-accent: 169 73 204;
|
|
40
|
+
--android-accent-foreground: 255 255 255;
|
|
41
|
+
--android-destructive: 254 67 54;
|
|
42
|
+
--android-destructive-foreground: 255 255 255;
|
|
43
|
+
--android-border: 215 217 228;
|
|
44
|
+
--android-input: 210 210 215;
|
|
45
|
+
--android-ring: 215 217 228;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
@media (prefers-color-scheme: dark) {
|
|
49
|
+
:root {
|
|
50
|
+
--background: 0 0 0;
|
|
51
|
+
--foreground: 255 255 255;
|
|
52
|
+
--card: 21 21 24;
|
|
53
|
+
--card-foreground: 255 255 255;
|
|
54
|
+
--popover: 40 40 42;
|
|
55
|
+
--popover-foreground: 255 255 255;
|
|
56
|
+
--primary: 3 133 255;
|
|
57
|
+
--primary-foreground: 255 255 255;
|
|
58
|
+
--secondary: 100 211 254;
|
|
59
|
+
--secondary-foreground: 255 255 255;
|
|
60
|
+
--muted: 70 70 73;
|
|
61
|
+
--muted-foreground: 142 142 147;
|
|
62
|
+
--accent: 255 52 95;
|
|
63
|
+
--accent-foreground: 255 255 255;
|
|
64
|
+
--destructive: 254 67 54;
|
|
65
|
+
--destructive-foreground: 255 255 255;
|
|
66
|
+
--border: 40 40 42;
|
|
67
|
+
--input: 55 55 57;
|
|
68
|
+
--ring: 40 40 42;
|
|
69
|
+
|
|
70
|
+
--android-background: 0 0 0;
|
|
71
|
+
--android-foreground: 255 255 255;
|
|
72
|
+
--android-card: 16 19 27;
|
|
73
|
+
--android-card-foreground: 224 226 237;
|
|
74
|
+
--android-popover: 39 42 50;
|
|
75
|
+
--android-popover-foreground: 224 226 237;
|
|
76
|
+
--android-primary: 3 133 255;
|
|
77
|
+
--android-primary-foreground: 255 255 255;
|
|
78
|
+
--android-secondary: 28 60 114;
|
|
79
|
+
--android-secondary-foreground: 189 209 255;
|
|
80
|
+
--android-muted: 216 226 255;
|
|
81
|
+
--android-muted-foreground: 0 26 64;
|
|
82
|
+
--android-accent: 83 0 111;
|
|
83
|
+
--android-accent-foreground: 238 177 255;
|
|
84
|
+
--android-destructive: 147 0 10;
|
|
85
|
+
--android-destructive-foreground: 255 255 255;
|
|
86
|
+
--android-border: 39 42 50;
|
|
87
|
+
--android-input: 55 55 57;
|
|
88
|
+
--android-ring: 39 42 50;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { useColorScheme as useNativewindColorScheme } from 'nativewind';
|
|
2
|
+
|
|
3
|
+
import { COLORS } from '@/theme/colors';
|
|
4
|
+
|
|
5
|
+
export function useColorScheme() {
|
|
6
|
+
const { colorScheme, setColorScheme, toggleColorScheme } = useNativewindColorScheme();
|
|
7
|
+
return {
|
|
8
|
+
colorScheme: colorScheme ?? 'light',
|
|
9
|
+
isDarkColorScheme: colorScheme === 'dark',
|
|
10
|
+
setColorScheme,
|
|
11
|
+
toggleColorScheme,
|
|
12
|
+
colors: COLORS[colorScheme ?? 'light'],
|
|
13
|
+
};
|
|
14
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { COLORS } from '@/theme/colors';
|
|
2
|
+
import { useNavigation } from 'expo-router';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { SearchBarProps } from 'react-native-screens';
|
|
5
|
+
import { useColorScheme } from './useColorScheme';
|
|
6
|
+
|
|
7
|
+
export function useHeaderSearchBar(props: SearchBarProps = {}) {
|
|
8
|
+
const { colorScheme, colors } = useColorScheme();
|
|
9
|
+
const navigation = useNavigation();
|
|
10
|
+
const [search, setSearch] = React.useState('');
|
|
11
|
+
|
|
12
|
+
React.useLayoutEffect(() => {
|
|
13
|
+
navigation.setOptions({
|
|
14
|
+
headerSearchBarOptions: {
|
|
15
|
+
placeholder: 'Search...',
|
|
16
|
+
barTintColor: colorScheme === 'dark' ? COLORS.black : COLORS.white,
|
|
17
|
+
textColor: colors.foreground,
|
|
18
|
+
tintColor: colors.blue,
|
|
19
|
+
headerIconColor: colors.foreground,
|
|
20
|
+
hintTextColor: colors.grey,
|
|
21
|
+
hideWhenScrolling: false,
|
|
22
|
+
onChangeText(ev) {
|
|
23
|
+
setSearch(ev.nativeEvent.text);
|
|
24
|
+
},
|
|
25
|
+
...props,
|
|
26
|
+
} satisfies SearchBarProps,
|
|
27
|
+
});
|
|
28
|
+
}, [navigation, colorScheme]);
|
|
29
|
+
|
|
30
|
+
return search;
|
|
31
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
const { getDefaultConfig } = require('expo/metro-config');
|
|
2
|
+
const { withNativeWind } = require('nativewind/metro');
|
|
3
|
+
|
|
4
|
+
// eslint-disable-next-line no-undef
|
|
5
|
+
const config = getDefaultConfig(__dirname);
|
|
6
|
+
|
|
7
|
+
module.exports = withNativeWind(config, {
|
|
8
|
+
input: './global.css',
|
|
9
|
+
inlineRem: 16,
|
|
10
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/// <reference types="nativewind/types" />
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
const { hairlineWidth, platformSelect } = require('nativewind/theme');
|
|
2
|
+
|
|
3
|
+
/** @type {import('tailwindcss').Config} */
|
|
4
|
+
module.exports = {
|
|
5
|
+
// NOTE: Update this to include the paths to all of your component files.
|
|
6
|
+
content: ['./app/**/*.{js,jsx,ts,tsx}', './components/**/*.{js,jsx,ts,tsx}'],
|
|
7
|
+
presets: [require('nativewind/preset')],
|
|
8
|
+
theme: {
|
|
9
|
+
extend: {
|
|
10
|
+
colors: {
|
|
11
|
+
border: withOpacity('border'),
|
|
12
|
+
input: withOpacity('input'),
|
|
13
|
+
ring: withOpacity('ring'),
|
|
14
|
+
background: withOpacity('background'),
|
|
15
|
+
foreground: withOpacity('foreground'),
|
|
16
|
+
primary: {
|
|
17
|
+
DEFAULT: withOpacity('primary'),
|
|
18
|
+
foreground: withOpacity('primary-foreground'),
|
|
19
|
+
},
|
|
20
|
+
secondary: {
|
|
21
|
+
DEFAULT: withOpacity('secondary'),
|
|
22
|
+
foreground: withOpacity('secondary-foreground'),
|
|
23
|
+
},
|
|
24
|
+
destructive: {
|
|
25
|
+
DEFAULT: withOpacity('destructive'),
|
|
26
|
+
foreground: withOpacity('destructive-foreground'),
|
|
27
|
+
},
|
|
28
|
+
muted: {
|
|
29
|
+
DEFAULT: withOpacity('muted'),
|
|
30
|
+
foreground: withOpacity('muted-foreground'),
|
|
31
|
+
},
|
|
32
|
+
accent: {
|
|
33
|
+
DEFAULT: withOpacity('accent'),
|
|
34
|
+
foreground: withOpacity('accent-foreground'),
|
|
35
|
+
},
|
|
36
|
+
popover: {
|
|
37
|
+
DEFAULT: withOpacity('popover'),
|
|
38
|
+
foreground: withOpacity('popover-foreground'),
|
|
39
|
+
},
|
|
40
|
+
card: {
|
|
41
|
+
DEFAULT: withOpacity('card'),
|
|
42
|
+
foreground: withOpacity('card-foreground'),
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
borderWidth: {
|
|
46
|
+
hairline: hairlineWidth(),
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
plugins: [],
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
function withOpacity(variableName) {
|
|
54
|
+
return ({ opacityValue }) => {
|
|
55
|
+
if (opacityValue !== undefined) {
|
|
56
|
+
return platformSelect({
|
|
57
|
+
ios: `rgb(var(--${variableName}) / ${opacityValue})`,
|
|
58
|
+
android: `rgb(var(--android-${variableName}) / ${opacityValue})`,
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
return platformSelect({
|
|
62
|
+
ios: `rgb(var(--${variableName}))`,
|
|
63
|
+
android: `rgb(var(--android-${variableName}))`,
|
|
64
|
+
});
|
|
65
|
+
};
|
|
66
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { Platform } from 'react-native';
|
|
2
|
+
|
|
3
|
+
const IOS_SYSTEM_COLORS = {
|
|
4
|
+
white: 'rgb(255, 255, 255)',
|
|
5
|
+
black: 'rgb(0, 0, 0)',
|
|
6
|
+
light: {
|
|
7
|
+
grey6: 'rgb(242, 242, 247)',
|
|
8
|
+
grey5: 'rgb(230, 230, 235)',
|
|
9
|
+
grey4: 'rgb(210, 210, 215)',
|
|
10
|
+
grey3: 'rgb(199, 199, 204)',
|
|
11
|
+
grey2: 'rgb(175, 176, 180)',
|
|
12
|
+
grey: 'rgb(142, 142, 147)',
|
|
13
|
+
background: 'rgb(242, 242, 247)',
|
|
14
|
+
foreground: 'rgb(0, 0, 0)',
|
|
15
|
+
root: 'rgb(255, 255, 255)',
|
|
16
|
+
card: 'rgb(255, 255, 255)',
|
|
17
|
+
red: 'rgb(255, 56, 43)',
|
|
18
|
+
blue: 'rgb(0, 123, 254)',
|
|
19
|
+
},
|
|
20
|
+
dark: {
|
|
21
|
+
grey6: 'rgb(21, 21, 24)',
|
|
22
|
+
grey5: 'rgb(40, 40, 42)',
|
|
23
|
+
grey4: 'rgb(55, 55, 57)',
|
|
24
|
+
grey3: 'rgb(70, 70, 73)',
|
|
25
|
+
grey2: 'rgb(99, 99, 102)',
|
|
26
|
+
grey: 'rgb(142, 142, 147)',
|
|
27
|
+
background: 'rgb(0, 0, 0)',
|
|
28
|
+
foreground: 'rgb(255, 255, 255)',
|
|
29
|
+
root: 'rgb(0, 0, 0)',
|
|
30
|
+
card: 'rgb(28, 28, 30)',
|
|
31
|
+
red: 'rgb(254, 67, 54)',
|
|
32
|
+
blue: 'rgb(3, 133, 255)',
|
|
33
|
+
},
|
|
34
|
+
} as const;
|
|
35
|
+
|
|
36
|
+
const ANDROID_COLORS = {
|
|
37
|
+
white: 'rgb(255, 255, 255)',
|
|
38
|
+
black: 'rgb(0, 0, 0)',
|
|
39
|
+
light: {
|
|
40
|
+
grey6: 'rgb(249, 249, 255)',
|
|
41
|
+
grey5: 'rgb(215, 217, 228)',
|
|
42
|
+
grey4: 'rgb(193, 198, 215)',
|
|
43
|
+
grey3: 'rgb(113, 119, 134)',
|
|
44
|
+
grey2: 'rgb(65, 71, 84)',
|
|
45
|
+
grey: 'rgb(24, 28, 35)',
|
|
46
|
+
background: 'rgb(249, 249, 255)',
|
|
47
|
+
foreground: 'rgb(0, 0, 0)',
|
|
48
|
+
root: 'rgb(255, 255, 255)',
|
|
49
|
+
card: 'rgb(255, 255, 255)',
|
|
50
|
+
red: 'rgb(186, 26, 26)',
|
|
51
|
+
blue: 'rgb(0, 112, 233)',
|
|
52
|
+
},
|
|
53
|
+
dark: {
|
|
54
|
+
grey6: 'rgb(16, 19, 27)',
|
|
55
|
+
grey5: 'rgb(39, 42, 50)',
|
|
56
|
+
grey4: 'rgb(49, 53, 61)',
|
|
57
|
+
grey3: 'rgb(54, 57, 66)',
|
|
58
|
+
grey2: 'rgb(139, 144, 160)',
|
|
59
|
+
grey: 'rgb(193, 198, 215)',
|
|
60
|
+
background: 'rgb(0, 0, 0)',
|
|
61
|
+
foreground: 'rgb(255, 255, 255)',
|
|
62
|
+
root: 'rgb(0, 0, 0)',
|
|
63
|
+
card: 'rgb(16, 19, 27)',
|
|
64
|
+
red: 'rgb(147, 0, 10)',
|
|
65
|
+
blue: 'rgb(3, 133, 255)',
|
|
66
|
+
},
|
|
67
|
+
} as const;
|
|
68
|
+
|
|
69
|
+
const COLORS = Platform.OS === 'ios' ? IOS_SYSTEM_COLORS : ANDROID_COLORS;
|
|
70
|
+
|
|
71
|
+
export { COLORS };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { Theme } from '@react-navigation/native';
|
|
2
|
+
import { COLORS } from './colors';
|
|
3
|
+
|
|
4
|
+
const NAV_THEME: { light: Theme; dark: Theme } = {
|
|
5
|
+
light: {
|
|
6
|
+
dark: false,
|
|
7
|
+
colors: {
|
|
8
|
+
background: COLORS.light.background,
|
|
9
|
+
border: COLORS.light.grey5,
|
|
10
|
+
card: COLORS.light.card,
|
|
11
|
+
notification: COLORS.light.red,
|
|
12
|
+
primary: COLORS.light.blue, // BRAND COLOR
|
|
13
|
+
text: COLORS.black,
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
dark: {
|
|
17
|
+
dark: true,
|
|
18
|
+
colors: {
|
|
19
|
+
background: COLORS.dark.background,
|
|
20
|
+
border: COLORS.dark.grey5,
|
|
21
|
+
card: COLORS.dark.grey6,
|
|
22
|
+
notification: COLORS.dark.red,
|
|
23
|
+
primary: COLORS.dark.blue, // BRAND COLOR
|
|
24
|
+
text: COLORS.white,
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
export { NAV_THEME };
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
<% if (props.stylingPackage?.name === "nativewind") { %>
|
|
2
|
-
import './global.css';
|
|
2
|
+
import './global.css';
|
|
3
|
+
<% } else if (props.stylingPackage?.name === "nativewinui") { %>
|
|
4
|
+
import './global.css';
|
|
5
|
+
import 'expo-dev-client';
|
|
3
6
|
<% } %>
|
|
4
7
|
<% if (props.stylingPackage?.name === "unistyles") { %>
|
|
5
8
|
import './unistyles';
|
package/build/types/types.d.ts
CHANGED
|
@@ -5,11 +5,11 @@ export interface CliFlags {
|
|
|
5
5
|
importAlias: string | boolean;
|
|
6
6
|
packageManager: PackageManager;
|
|
7
7
|
}
|
|
8
|
-
export declare const availablePackages: readonly ["@react-navigation/drawer", "expo-router", "expoRouter", "firebase", "nativewind", "react-navigation", "reactNavigation", "react-native-gesture-handler", "react-native-reanimated", "reactnavigation", "stylesheet", "supabase", "tamagui", "restyle", "unistyles", "i18next"];
|
|
8
|
+
export declare const availablePackages: readonly ["@react-navigation/drawer", "expo-router", "expoRouter", "firebase", "nativewind", "nativewindui", "react-navigation", "reactNavigation", "react-native-gesture-handler", "react-native-reanimated", "reactnavigation", "stylesheet", "supabase", "tamagui", "restyle", "unistyles", "i18next"];
|
|
9
9
|
export type AuthenticationSelect = 'supabase' | 'firebase' | undefined;
|
|
10
10
|
export type NavigationSelect = 'react-navigation' | 'expo-router' | undefined;
|
|
11
11
|
export type NavigationTypes = 'stack' | 'tabs' | 'drawer + tabs' | undefined;
|
|
12
|
-
export type StylingSelect = 'nativewind' | 'restyle' | 'stylesheet' | 'tamagui' | 'unistyles';
|
|
12
|
+
export type StylingSelect = 'nativewind' | 'restyle' | 'stylesheet' | 'tamagui' | 'unistyles' | 'nativewindui';
|
|
13
13
|
export type PackageManager = 'yarn' | 'npm' | 'pnpm' | 'bun';
|
|
14
14
|
export type Internalization = 'i18next';
|
|
15
15
|
export type AvailablePackages = {
|
package/build/types.js
CHANGED
|
@@ -7,6 +7,7 @@ exports.availablePackages = [
|
|
|
7
7
|
'expoRouter',
|
|
8
8
|
'firebase',
|
|
9
9
|
'nativewind',
|
|
10
|
+
'nativewindui',
|
|
10
11
|
'react-navigation',
|
|
11
12
|
'reactNavigation',
|
|
12
13
|
'react-native-gesture-handler',
|
|
@@ -19,4 +20,4 @@ exports.availablePackages = [
|
|
|
19
20
|
'unistyles',
|
|
20
21
|
'i18next'
|
|
21
22
|
];
|
|
22
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
23
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHlwZXMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvdHlwZXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBU2EsUUFBQSxpQkFBaUIsR0FBRztJQUMvQiwwQkFBMEI7SUFDMUIsYUFBYTtJQUNiLFlBQVk7SUFDWixVQUFVO0lBQ1YsWUFBWTtJQUNaLGNBQWM7SUFDZCxrQkFBa0I7SUFDbEIsaUJBQWlCO0lBQ2pCLDhCQUE4QjtJQUM5Qix5QkFBeUI7SUFDekIsaUJBQWlCO0lBQ2pCLFlBQVk7SUFDWixVQUFVO0lBQ1YsU0FBUztJQUNULFNBQVM7SUFDVCxXQUFXO0lBQ1gsU0FBUztDQUNELENBQUMifQ==
|