lucy-cli 2.0.0-alpha.1 → 2.0.0-alpha.10
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/dist/init.js +44 -18
- package/files/expo/.prettierrc.js +16 -0
- package/files/expo/.yarnrc.yml +1 -1
- package/files/expo/assets/fonts/SpaceMono-Regular.ttf +0 -0
- package/files/expo/assets/images/adaptive-icon.png +0 -0
- package/files/expo/assets/images/favicon.png +0 -0
- package/files/expo/assets/images/icon.png +0 -0
- package/files/expo/assets/images/splash-icon.png +0 -0
- package/files/expo/babel.config.js +7 -6
- package/files/expo/components/.gitkeep +0 -0
- package/files/expo/components/ui/.gitkeep +0 -0
- package/files/expo/constants/theme.ts +17 -17
- package/files/expo/eas.json +9 -3
- package/files/expo/{eslint.config.js → eslint.config.mjs} +15 -19
- package/files/expo/hooks/useColorScheme.ts +13 -7
- package/files/expo/index.ts +11 -0
- package/files/expo/lib/data.ts +36 -33
- package/files/expo/lib/utils/index.ts +7 -2
- package/files/expo/lib/utils/polyfills.ts +1 -1
- package/files/expo/lib/wix/client.ts +3 -5
- package/files/expo/lib/wix/error.ts +3 -0
- package/files/expo/lib/wix/index.ts +1 -0
- package/files/expo/metro.config.js +57 -0
- package/files/expo/scripts/reset-project.ts +116 -0
- package/files/expo/tailwind.config.js +61 -196
- package/files/expo/tsconfig.json +32 -26
- package/package.json +3 -2
- package/src/init.ts +62 -21
- package/files/expo/.env +0 -1
- package/files/expo/.prettierrc.json +0 -16
- package/files/expo/app/(tabs)/_layout.tsx +0 -45
- package/files/expo/app/_layout.tsx +0 -45
- package/files/expo/constants/Colors.ts +0 -27
- package/files/expo/hooks/useColorScheme.web.ts +0 -21
- package/files/expo/hooks/useColorSchemeRN.ts +0 -1
- package/files/expo/hooks/useThemeColor.ts +0 -21
- /package/files/expo/{readme.md → README.md} +0 -0
- /package/files/expo/{types/nativewind-env.d.ts → nativewind-env.d.ts} +0 -0
@@ -1,45 +0,0 @@
|
|
1
|
-
import { Tabs } from 'expo-router';
|
2
|
-
import React from 'react';
|
3
|
-
import { Platform } from 'react-native';
|
4
|
-
|
5
|
-
import { HapticTab } from '@/components/HapticTab';
|
6
|
-
import { IconSymbol } from '@/components/ui/IconSymbol';
|
7
|
-
import TabBarBackground from '@/components/ui/TabBarBackground.ios';
|
8
|
-
import { Colors } from '@/constants/Colors';
|
9
|
-
import { useColorScheme } from '@/hooks/useColorSchemeRN';
|
10
|
-
|
11
|
-
export default function TabLayout() {
|
12
|
-
const colorScheme = useColorScheme();
|
13
|
-
|
14
|
-
return (
|
15
|
-
<Tabs
|
16
|
-
screenOptions={{
|
17
|
-
tabBarActiveTintColor: Colors[colorScheme ?? 'light'].tint,
|
18
|
-
headerShown: false,
|
19
|
-
tabBarButton: HapticTab,
|
20
|
-
tabBarBackground: TabBarBackground,
|
21
|
-
tabBarStyle: Platform.select({
|
22
|
-
ios: {
|
23
|
-
// Use a transparent background on iOS to show the blur effect
|
24
|
-
position: 'absolute',
|
25
|
-
},
|
26
|
-
default: {},
|
27
|
-
}),
|
28
|
-
}}>
|
29
|
-
<Tabs.Screen
|
30
|
-
name="index"
|
31
|
-
options={{
|
32
|
-
title: 'Home',
|
33
|
-
tabBarIcon: ({ color }) => <IconSymbol size={28} name="house.fill" color={color} />,
|
34
|
-
}}
|
35
|
-
/>
|
36
|
-
<Tabs.Screen
|
37
|
-
name="explore"
|
38
|
-
options={{
|
39
|
-
title: 'Explore',
|
40
|
-
tabBarIcon: ({ color }) => <IconSymbol size={28} name="paperplane.fill" color={color} />,
|
41
|
-
}}
|
42
|
-
/>
|
43
|
-
</Tabs>
|
44
|
-
);
|
45
|
-
}
|
@@ -1,45 +0,0 @@
|
|
1
|
-
import '@/global.css';
|
2
|
-
import "@/lib/utils/polyfills";
|
3
|
-
|
4
|
-
import { NAV_THEME } from '@/constants/theme';
|
5
|
-
import { useColorScheme } from '@/hooks/useColorScheme';
|
6
|
-
import { DarkTheme, DefaultTheme, Theme, ThemeProvider } from '@react-navigation/native';
|
7
|
-
import { Stack } from 'expo-router';
|
8
|
-
import { StatusBar } from 'expo-status-bar';
|
9
|
-
import * as React from 'react';
|
10
|
-
import { Platform } from 'react-native';
|
11
|
-
const LIGHT_THEME: Theme = {
|
12
|
-
...DefaultTheme,
|
13
|
-
colors: NAV_THEME.light,
|
14
|
-
};
|
15
|
-
const DARK_THEME: Theme = {
|
16
|
-
...DarkTheme,
|
17
|
-
colors: NAV_THEME.dark,
|
18
|
-
};
|
19
|
-
export { ErrorBoundary } from 'expo-router';
|
20
|
-
export default function RootLayout() {
|
21
|
-
const hasMounted = React.useRef(false);
|
22
|
-
const { colorScheme, isDarkColorScheme } = useColorScheme();
|
23
|
-
const [isColorSchemeLoaded, setIsColorSchemeLoaded] = React.useState(false);
|
24
|
-
useIsomorphicLayoutEffect(() => {
|
25
|
-
if (hasMounted.current) {
|
26
|
-
return;
|
27
|
-
}
|
28
|
-
if (Platform.OS === 'web') {
|
29
|
-
// Adds the background color to the html element to prevent white background on overscroll.
|
30
|
-
document.documentElement.classList.add('bg-background');
|
31
|
-
}
|
32
|
-
setIsColorSchemeLoaded(true);
|
33
|
-
hasMounted.current = true;
|
34
|
-
}, []);
|
35
|
-
if (!isColorSchemeLoaded) {
|
36
|
-
return null;
|
37
|
-
}
|
38
|
-
return (
|
39
|
-
<ThemeProvider value={isDarkColorScheme ? DARK_THEME : LIGHT_THEME}>
|
40
|
-
<StatusBar style={isDarkColorScheme ? 'light' : 'dark'} />
|
41
|
-
<Stack />
|
42
|
-
</ThemeProvider>
|
43
|
-
);
|
44
|
-
}
|
45
|
-
const useIsomorphicLayoutEffect = Platform.OS === 'web' && typeof window === 'undefined' ? React.useEffect : React.useLayoutEffect;
|
@@ -1,27 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* Below are the colors that are used in the app. The colors are defined in the light and dark mode.
|
3
|
-
* There are many other ways to style your app. For example, [Nativewind](https://www.nativewind.dev/), [Tamagui](https://tamagui.dev/), [unistyles](https://reactnativeunistyles.vercel.app), etc.
|
4
|
-
*/
|
5
|
-
|
6
|
-
const tintColorLight = '#0a7ea4';
|
7
|
-
const tintColorDark = '#fff';
|
8
|
-
|
9
|
-
export const Colors = {
|
10
|
-
light: {
|
11
|
-
text: '#11181C',
|
12
|
-
background: '#fff',
|
13
|
-
tint: tintColorLight,
|
14
|
-
icon: '#687076',
|
15
|
-
tabIconDefault: '#687076',
|
16
|
-
tabIconSelected: tintColorLight,
|
17
|
-
},
|
18
|
-
dark: {
|
19
|
-
text: '#ECEDEE',
|
20
|
-
background: '#151718',
|
21
|
-
tint: tintColorDark,
|
22
|
-
icon: '#9BA1A6',
|
23
|
-
tabIconDefault: '#9BA1A6',
|
24
|
-
tabIconSelected: tintColorDark,
|
25
|
-
},
|
26
|
-
};
|
27
|
-
|
@@ -1,21 +0,0 @@
|
|
1
|
-
import { useEffect, useState } from 'react';
|
2
|
-
import { useColorScheme as useRNColorScheme } from 'react-native';
|
3
|
-
|
4
|
-
/**
|
5
|
-
* To support static rendering, this value needs to be re-calculated on the client side for web
|
6
|
-
*/
|
7
|
-
export function useColorScheme() {
|
8
|
-
const [hasHydrated, setHasHydrated] = useState(false);
|
9
|
-
|
10
|
-
useEffect(() => {
|
11
|
-
setHasHydrated(true);
|
12
|
-
}, []);
|
13
|
-
|
14
|
-
const colorScheme = useRNColorScheme();
|
15
|
-
|
16
|
-
if (hasHydrated) {
|
17
|
-
return colorScheme;
|
18
|
-
}
|
19
|
-
|
20
|
-
return 'light';
|
21
|
-
}
|
@@ -1 +0,0 @@
|
|
1
|
-
export { useColorScheme } from 'react-native';
|
@@ -1,21 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* Learn more about light and dark modes:
|
3
|
-
* https://docs.expo.dev/guides/color-schemes/
|
4
|
-
*/
|
5
|
-
|
6
|
-
import { Colors } from '@/constants/Colors';
|
7
|
-
import { useColorScheme } from './useColorSchemeRN';
|
8
|
-
|
9
|
-
export function useThemeColor(
|
10
|
-
props: { light?: string; dark?: string },
|
11
|
-
colorName: keyof typeof Colors.light & keyof typeof Colors.dark
|
12
|
-
) {
|
13
|
-
const theme = useColorScheme() ?? 'light';
|
14
|
-
const colorFromProps = props[theme];
|
15
|
-
|
16
|
-
if (colorFromProps) {
|
17
|
-
return colorFromProps;
|
18
|
-
} else {
|
19
|
-
return Colors[theme][colorName];
|
20
|
-
}
|
21
|
-
}
|
File without changes
|
File without changes
|