@coze-arch/cli 0.0.1-alpha.4c5c53 → 0.0.1-alpha.531ccd
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/lib/__templates__/expo/.cozeproj/scripts/dev_run.sh +12 -4
- package/lib/__templates__/expo/README.md +7 -5
- package/lib/__templates__/expo/client/app/+not-found.tsx +15 -0
- package/lib/__templates__/expo/client/app/_layout.tsx +14 -12
- package/lib/__templates__/expo/client/app.config.ts +2 -2
- package/lib/__templates__/expo/client/components/Screen.tsx +1 -17
- package/lib/__templates__/expo/client/eslint.config.mjs +20 -0
- package/lib/__templates__/expo/client/global.css +76 -0
- package/lib/__templates__/expo/client/hooks/useSafeRouter.ts +152 -0
- package/lib/__templates__/expo/client/metro.config.js +8 -1
- package/lib/__templates__/expo/client/package.json +11 -7
- package/lib/__templates__/expo/client/screens/demo/index.tsx +6 -12
- package/lib/__templates__/expo/client/uniwind-types.d.ts +10 -0
- package/lib/__templates__/expo/eslint-plugins/fontawesome6/names.js +1886 -2483
- package/lib/__templates__/expo/eslint-plugins/fontawesome6/rule.js +20 -1
- package/lib/__templates__/expo/eslint-plugins/fontawesome6/v5-only-names.js +388 -0
- package/lib/__templates__/expo/eslint-plugins/react-native/index.js +9 -0
- package/lib/__templates__/expo/eslint-plugins/react-native/rule.js +64 -0
- package/lib/__templates__/expo/eslint-plugins/reanimated/index.js +9 -0
- package/lib/__templates__/expo/eslint-plugins/reanimated/rule.js +88 -0
- package/lib/__templates__/expo/package.json +3 -0
- package/lib/__templates__/expo/patches/expo@54.0.32.patch +44 -0
- package/lib/__templates__/expo/pnpm-lock.yaml +1924 -1846
- package/lib/__templates__/nextjs/.babelrc +15 -0
- package/lib/__templates__/nextjs/package.json +9 -1
- package/lib/__templates__/nextjs/pnpm-lock.yaml +2603 -1728
- package/lib/__templates__/nextjs/src/app/layout.tsx +5 -3
- package/lib/__templates__/nextjs/template.config.js +5 -5
- package/lib/__templates__/vite/package.json +6 -1
- package/lib/__templates__/vite/pnpm-lock.yaml +504 -982
- package/lib/__templates__/vite/template.config.js +6 -4
- package/lib/cli.js +819 -105
- package/package.json +1 -1
- package/lib/__templates__/expo/client/components/ThemedText.tsx +0 -33
- package/lib/__templates__/expo/client/components/ThemedView.tsx +0 -38
- package/lib/__templates__/expo/client/constants/theme.ts +0 -854
- package/lib/__templates__/expo/client/hooks/useColorScheme.ts +0 -34
- package/lib/__templates__/expo/client/hooks/useTheme.ts +0 -33
package/package.json
CHANGED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Text, TextProps, TextStyle } from 'react-native';
|
|
3
|
-
import { useTheme } from '@/hooks/useTheme';
|
|
4
|
-
import { Typography } from '@/constants/theme';
|
|
5
|
-
|
|
6
|
-
type TypographyVariant = keyof typeof Typography;
|
|
7
|
-
|
|
8
|
-
interface ThemedTextProps extends TextProps {
|
|
9
|
-
variant?: TypographyVariant;
|
|
10
|
-
color?: string;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export function ThemedText({
|
|
14
|
-
variant = 'body',
|
|
15
|
-
color,
|
|
16
|
-
style,
|
|
17
|
-
children,
|
|
18
|
-
...props
|
|
19
|
-
}: ThemedTextProps) {
|
|
20
|
-
const { theme } = useTheme();
|
|
21
|
-
const typographyStyle = Typography[variant];
|
|
22
|
-
|
|
23
|
-
const textStyle: TextStyle = {
|
|
24
|
-
...typographyStyle,
|
|
25
|
-
color: color ?? theme.textPrimary,
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
return (
|
|
29
|
-
<Text style={[textStyle, style]} {...props}>
|
|
30
|
-
{children}
|
|
31
|
-
</Text>
|
|
32
|
-
);
|
|
33
|
-
}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { View, ViewProps, ViewStyle } from 'react-native';
|
|
3
|
-
import { useTheme } from '@/hooks/useTheme';
|
|
4
|
-
|
|
5
|
-
type BackgroundLevel = 'root' | 'default' | 'secondary' | 'tertiary';
|
|
6
|
-
|
|
7
|
-
interface ThemedViewProps extends ViewProps {
|
|
8
|
-
level?: BackgroundLevel;
|
|
9
|
-
backgroundColor?: string;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
const backgroundMap: Record<BackgroundLevel, string> = {
|
|
13
|
-
root: 'backgroundRoot',
|
|
14
|
-
default: 'backgroundDefault',
|
|
15
|
-
secondary: 'backgroundSecondary',
|
|
16
|
-
tertiary: 'backgroundTertiary',
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
export function ThemedView({
|
|
20
|
-
level = 'root',
|
|
21
|
-
backgroundColor,
|
|
22
|
-
style,
|
|
23
|
-
children,
|
|
24
|
-
...props
|
|
25
|
-
}: ThemedViewProps) {
|
|
26
|
-
const { theme } = useTheme();
|
|
27
|
-
const bgColor = backgroundColor ?? (theme as any)[backgroundMap[level]];
|
|
28
|
-
|
|
29
|
-
const viewStyle: ViewStyle = {
|
|
30
|
-
backgroundColor: bgColor,
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
return (
|
|
34
|
-
<View style={[viewStyle, style]} {...props}>
|
|
35
|
-
{children}
|
|
36
|
-
</View>
|
|
37
|
-
);
|
|
38
|
-
}
|