@coze-arch/cli 0.0.1-alpha.3002ee → 0.0.1-alpha.3ce8c6

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 (60) hide show
  1. package/lib/__templates__/expo/.coze +7 -2
  2. package/lib/__templates__/expo/.cozeproj/scripts/{deploy_build.sh → dev_build.sh} +4 -10
  3. package/lib/__templates__/expo/.cozeproj/scripts/{deploy_run.sh → dev_run.sh} +25 -57
  4. package/lib/__templates__/expo/.cozeproj/scripts/prod_build.sh +47 -0
  5. package/lib/__templates__/expo/.cozeproj/scripts/prod_run.sh +34 -0
  6. package/lib/__templates__/expo/README.md +41 -12
  7. package/lib/__templates__/expo/_gitignore +1 -1
  8. package/lib/__templates__/expo/_npmrc +3 -5
  9. package/lib/__templates__/expo/client/app/_layout.tsx +1 -1
  10. package/lib/__templates__/expo/client/app/index.ts +1 -0
  11. package/lib/__templates__/expo/client/app.config.ts +71 -0
  12. package/lib/__templates__/expo/client/components/ThemedText.tsx +33 -0
  13. package/lib/__templates__/expo/client/components/ThemedView.tsx +38 -0
  14. package/lib/__templates__/expo/client/constants/theme.ts +779 -47
  15. package/lib/__templates__/expo/client/contexts/AuthContext.tsx +14 -107
  16. package/lib/__templates__/expo/client/hooks/useTheme.ts +1 -1
  17. package/lib/__templates__/expo/client/metro.config.js +121 -0
  18. package/lib/__templates__/expo/client/package.json +92 -0
  19. package/lib/__templates__/expo/client/screens/home/index.tsx +1 -5
  20. package/lib/__templates__/expo/client/screens/home/styles.ts +1 -273
  21. package/lib/__templates__/expo/client/tsconfig.json +24 -0
  22. package/lib/__templates__/expo/client/utils/index.ts +1 -2
  23. package/lib/__templates__/expo/package.json +16 -12
  24. package/lib/__templates__/expo/pnpm-lock.yaml +383 -516
  25. package/lib/__templates__/expo/pnpm-workspace.yaml +3 -0
  26. package/lib/__templates__/expo/server/package.json +17 -0
  27. package/lib/__templates__/expo/{src → server/src}/index.ts +2 -2
  28. package/lib/__templates__/expo/template.config.js +1 -1
  29. package/lib/__templates__/expo/tsconfig.json +1 -24
  30. package/lib/__templates__/nextjs/.coze +3 -3
  31. package/lib/__templates__/nextjs/_npmrc +1 -1
  32. package/lib/__templates__/nextjs/package.json +8 -3
  33. package/lib/__templates__/nextjs/pnpm-lock.yaml +2495 -1122
  34. package/lib/__templates__/nextjs/scripts/dev.sh +8 -27
  35. package/lib/__templates__/nextjs/src/app/globals.css +99 -87
  36. package/lib/__templates__/nextjs/src/app/layout.tsx +18 -22
  37. package/lib/__templates__/nextjs/template.config.js +1 -1
  38. package/lib/__templates__/templates.json +7 -0
  39. package/lib/__templates__/vite/.coze +3 -3
  40. package/lib/__templates__/vite/README.md +204 -26
  41. package/lib/__templates__/vite/_npmrc +1 -1
  42. package/lib/__templates__/vite/package.json +1 -1
  43. package/lib/__templates__/vite/pnpm-lock.yaml +120 -120
  44. package/lib/__templates__/vite/scripts/dev.sh +7 -26
  45. package/lib/__templates__/vite/template.config.js +10 -1
  46. package/lib/__templates__/vite/vite.config.ts +3 -3
  47. package/lib/cli.js +408 -248
  48. package/package.json +7 -3
  49. package/lib/__templates__/expo/app.json +0 -63
  50. package/lib/__templates__/expo/babel.config.js +0 -9
  51. package/lib/__templates__/expo/client/app/(tabs)/_layout.tsx +0 -43
  52. package/lib/__templates__/expo/client/app/(tabs)/home.tsx +0 -1
  53. package/lib/__templates__/expo/client/app/(tabs)/index.tsx +0 -7
  54. package/lib/__templates__/expo/client/app/+not-found.tsx +0 -79
  55. package/lib/__templates__/expo/client/index.js +0 -12
  56. package/lib/__templates__/expo/metro.config.js +0 -53
  57. package/lib/__templates__/nextjs/.babelrc +0 -15
  58. package/lib/__templates__/nextjs/server.mjs +0 -50
  59. /package/lib/__templates__/expo/{eslint-formatter-simple.mjs → client/eslint-formatter-simple.mjs} +0 -0
  60. /package/lib/__templates__/expo/{eslint.config.mjs → client/eslint.config.mjs} +0 -0
@@ -4,19 +4,15 @@
4
4
  *
5
5
  * 基于固定的 API 接口实现,可复用到其他项目
6
6
  * 其他项目使用时,只需修改 @api 的导入路径指向项目的 api 模块
7
+ *
8
+ * 注意:
9
+ * - 如果需要登录/鉴权场景,请扩展本文件,完善 login/logout、token 管理、用户信息获取与刷新等逻辑
10
+ * - 将示例中的占位实现替换为项目实际的接口调用与状态管理
7
11
  */
8
- import React, {
9
- createContext,
10
- useContext,
11
- useState,
12
- useEffect,
13
- ReactNode,
14
- } from "react";
15
- import AsyncStorage from "@react-native-async-storage/async-storage";
16
- //import { UserOut, UsersService, AuthenticationService } from "@api";
12
+ import React, { createContext, useContext, ReactNode } from "react";
17
13
 
18
14
  interface UserOut {
19
-
15
+
20
16
  }
21
17
 
22
18
  interface AuthContextType {
@@ -31,105 +27,16 @@ interface AuthContextType {
31
27
 
32
28
  const AuthContext = createContext<AuthContextType | undefined>(undefined);
33
29
 
34
- export const AuthProvider: React.FC<{ children: ReactNode }> = ({
35
- children,
36
- }) => {
37
- const [user, setUser] = useState<UserOut | null>(null);
38
- const [token, setToken] = useState<string | null>(null);
39
- const [isLoading, setIsLoading] = useState(true);
40
-
41
- useEffect(() => {
42
- loadAuthData();
43
- }, []);
44
-
45
- const loadAuthData = async () => {
46
- try {
47
- const results = await AsyncStorage.multiGet(["access_token", "user_data"]);
48
- const storedToken = results?.[0]?.[1] ?? null;
49
- const storedUser = results?.[1]?.[1] ?? null;
50
-
51
- if (!storedToken) {
52
- setToken(null);
53
- setUser(null);
54
- await AsyncStorage.multiRemove(["access_token", "user_data"]);
55
- return;
56
- }
57
-
58
- if (storedToken && storedUser) {
59
- setToken(storedToken);
60
- setUser(JSON.parse(storedUser));
61
- } else if (storedToken && !storedUser) {
62
- // 若仅有 token,主动拉取当前用户信息
63
- setToken(storedToken);
64
- try {
65
- // const me = await UsersService.getCurrentUserApiV1UsersMeGet();
66
- //if (me?.success && me.data) {
67
- // setUser(me.data);
68
- // await AsyncStorage.setItem("user_data", JSON.stringify(me.data));
69
- //}
70
- } catch (e) {
71
- // 拉取失败则保持未登录状态
72
- console.error("Failed to fetch current user with stored token:", e);
73
- }
74
- }
75
- } catch (error) {
76
- console.error("Failed to load auth data:", error);
77
- } finally {
78
- setIsLoading(false);
79
- }
80
- };
81
-
82
- const login = async (newToken: string) => {
83
- try {
84
- setToken(newToken);
85
- // 统一写入 access_token,供 OpenAPI 读取并自动携带
86
- await AsyncStorage.setItem("access_token", newToken);
87
- // 登录后拉取当前用户并缓存
88
- try {
89
- const me = await UsersService.getCurrentUserApiV1UsersMeGet();
90
- if (me?.success && me.data) {
91
- setUser(me.data);
92
- await AsyncStorage.setItem("user_data", JSON.stringify(me.data));
93
- }
94
- } catch (e) {
95
- console.error("Fetch current user after login failed:", e);
96
- }
97
- } catch (error) {
98
- console.error("Login failed:", error);
99
- throw error;
100
- }
101
- };
102
-
103
- const logout = async () => {
104
- try {
105
- // await AuthenticationService.logoutApiV1AuthLogoutPost(true);
106
- } catch(error) {
107
- console.warn('Logout failed:', error);
108
- }
109
- // remove token
110
- setToken(null);
111
- setUser(null);
112
- await AsyncStorage.multiRemove(["auth_token", "access_token", "user_data"]);
113
- };
114
-
115
- const updateUser = (userData: Partial<UserOut>) => {
116
- if (user) {
117
- const updatedUser = { ...user, ...userData };
118
- setUser(updatedUser);
119
- AsyncStorage.setItem("user_data", JSON.stringify(updatedUser));
120
- }
121
- };
122
-
30
+ export const AuthProvider: React.FC<{ children: ReactNode }> = ({ children }) => {
123
31
  const value: AuthContextType = {
124
- user,
125
- token,
126
- isAuthenticated: !!token && !!user,
127
- isLoading,
128
- login,
129
- logout,
130
- updateUser,
32
+ user: null,
33
+ token: null,
34
+ isAuthenticated: false,
35
+ isLoading: false,
36
+ login: async (token: string) => {},
37
+ logout: async () => {},
38
+ updateUser: () => {},
131
39
  };
132
-
133
40
  return <AuthContext.Provider value={value}>{children}</AuthContext.Provider>;
134
41
  };
135
42
 
@@ -4,7 +4,7 @@ import { useColorScheme } from "@/hooks/useColorScheme";
4
4
  export function useTheme() {
5
5
  const colorScheme = useColorScheme();
6
6
  const isDark = colorScheme === "dark";
7
- const theme = Colors[colorScheme ?? "light"];
7
+ const theme = Colors[(colorScheme as "light" | "dark") ?? "light"];
8
8
 
9
9
  return {
10
10
  theme,
@@ -0,0 +1,121 @@
1
+ const { getDefaultConfig } = require('expo/metro-config');
2
+ const { createProxyMiddleware } = require('http-proxy-middleware');
3
+ const connect = require('connect');
4
+
5
+ const config = getDefaultConfig(__dirname);
6
+
7
+ // 安全地获取 Expo 的默认排除列表
8
+ const existingBlockList = [].concat(config.resolver.blockList || []);
9
+
10
+ config.resolver.blockList = [
11
+ ...existingBlockList,
12
+ /.*\/\.expo\/.*/, // Expo 的缓存和构建产物目录
13
+
14
+ // 1. 原生代码 (Java/C++/Objective-C)
15
+ /.*\/react-native\/ReactAndroid\/.*/,
16
+ /.*\/react-native\/ReactCommon\/.*/,
17
+
18
+ // 2. 纯开发和调试工具
19
+ // 这些工具只在开发电脑上运行,不会被打包到应用中
20
+ /.*\/@typescript-eslint\/eslint-plugin\/.*/,
21
+
22
+ // 3. 构建时数据
23
+ // 这个数据库只在打包过程中使用,应用运行时不需要
24
+ /.*\/caniuse-lite\/data\/.*/,
25
+
26
+ // 4. 通用规则
27
+ /.*\/__tests__\/.*/, // 排除所有测试目录
28
+ /.*\.git\/.*/, // 排除 Git 目录
29
+ ];
30
+
31
+ const BACKEND_TARGET = 'http://localhost:9091';
32
+
33
+ const apiProxy = createProxyMiddleware({
34
+ target: BACKEND_TARGET,
35
+ changeOrigin: true,
36
+ logLevel: 'debug',
37
+ proxyTimeout: 86400000,
38
+ onProxyReq: (proxyReq, req) => {
39
+ const accept = req.headers.accept || '';
40
+ if (accept.includes('text/event-stream')) {
41
+ proxyReq.setHeader('accept-encoding', 'identity');
42
+ }
43
+ },
44
+ onProxyRes: (proxyRes, req, res) => {
45
+ const contentType = proxyRes.headers['content-type'] || '';
46
+ if (contentType.includes('text/event-stream') || contentType.includes('application/stream')) {
47
+ res.setHeader('Cache-Control', 'no-cache');
48
+ res.setHeader('Connection', 'keep-alive');
49
+ res.setHeader('X-Accel-Buffering', 'no');
50
+ if (typeof res.flushHeaders === 'function') {
51
+ try { res.flushHeaders(); } catch {}
52
+ }
53
+ }
54
+ },
55
+ });
56
+
57
+ const streamProxy = createProxyMiddleware({
58
+ target: BACKEND_TARGET,
59
+ changeOrigin: true,
60
+ logLevel: 'debug',
61
+ ws: true,
62
+ proxyTimeout: 86400000,
63
+ onProxyReq: (proxyReq, req) => {
64
+ const upgrade = req.headers.upgrade;
65
+ const accept = req.headers.accept || '';
66
+ if (upgrade && upgrade.toLowerCase() === 'websocket') {
67
+ proxyReq.setHeader('Connection', 'upgrade');
68
+ proxyReq.setHeader('Upgrade', req.headers.upgrade);
69
+ } else if (accept.includes('text/event-stream')) {
70
+ proxyReq.setHeader('accept-encoding', 'identity');
71
+ proxyReq.setHeader('Connection', 'keep-alive');
72
+ }
73
+ },
74
+ onProxyRes: (proxyRes, req, res) => {
75
+ const contentType = proxyRes.headers['content-type'] || '';
76
+ if (contentType.includes('text/event-stream') || contentType.includes('application/stream')) {
77
+ res.setHeader('Cache-Control', 'no-cache');
78
+ res.setHeader('Connection', 'keep-alive');
79
+ res.setHeader('X-Accel-Buffering', 'no');
80
+ if (typeof res.flushHeaders === 'function') {
81
+ try { res.flushHeaders(); } catch {}
82
+ }
83
+ }
84
+ },
85
+ });
86
+
87
+ const shouldProxyToBackend = (url) => {
88
+ if (!url) return false;
89
+ if (/^\/api\/v\d+\//.test(url)) {
90
+ return true;
91
+ }
92
+ return false;
93
+ };
94
+
95
+ const isWebSocketRequest = (req) =>
96
+ !!(req.headers.upgrade && req.headers.upgrade.toLowerCase() === 'websocket');
97
+ const isSSERequest = (req) => {
98
+ const accept = req.headers.accept || '';
99
+ return accept.includes('text/event-stream');
100
+ };
101
+
102
+ config.server = {
103
+ ...config.server,
104
+ enhanceMiddleware: (metroMiddleware, metroServer) => {
105
+ return connect()
106
+ .use((req, res, next) => {
107
+ if (shouldProxyToBackend(req.url)) {
108
+ console.log(`[Metro Proxy] Forwarding ${req.method} ${req.url}`);
109
+
110
+ if (isWebSocketRequest(req) || isSSERequest(req)) {
111
+ return streamProxy(req, res, next);
112
+ }
113
+ return apiProxy(req, res, next);
114
+ }
115
+ next();
116
+ })
117
+ .use(metroMiddleware);
118
+ },
119
+ };
120
+
121
+ module.exports = config;
@@ -0,0 +1,92 @@
1
+ {
2
+ "name": "expo-app",
3
+ "description": "<%= appName %>",
4
+ "main": "expo-router/entry",
5
+ "private": true,
6
+ "scripts": {
7
+ "check-deps": "npx depcheck",
8
+ "postinstall": "npm run install-missing",
9
+ "install-missing": "node ./scripts/install-missing-deps.js",
10
+ "lint": "expo lint",
11
+ "start": "expo start --web --clear",
12
+ "test": "jest --watchAll"
13
+ },
14
+ "jest": {
15
+ "preset": "jest-expo"
16
+ },
17
+ "dependencies": {
18
+ "@expo/metro-runtime": "^6.1.2",
19
+ "@expo/vector-icons": "^15.0.0",
20
+ "@react-native-async-storage/async-storage": "^2.2.0",
21
+ "@react-native-community/datetimepicker": "^8.5.0",
22
+ "@react-native-community/slider": "^5.0.1",
23
+ "@react-native-masked-view/masked-view": "^0.3.2",
24
+ "@react-native-picker/picker": "^2.11.0",
25
+ "@react-navigation/bottom-tabs": "^7.2.0",
26
+ "@react-navigation/native": "^7.0.14",
27
+ "babel-plugin-module-resolver": "^5.0.2",
28
+ "babel-preset-expo": "^54.0.9",
29
+ "dayjs": "^1.11.19",
30
+ "expo": "^54.0.7",
31
+ "expo-auth-session": "^7.0.9",
32
+ "expo-av": "~16.0.6",
33
+ "expo-blur": "~15.0.6",
34
+ "expo-camera": "~17.0.10",
35
+ "expo-constants": "~18.0.8",
36
+ "expo-crypto": "^15.0.7",
37
+ "expo-font": "~14.0.7",
38
+ "expo-haptics": "~15.0.6",
39
+ "expo-image-picker": "~17.0.7",
40
+ "expo-linear-gradient": "~15.0.6",
41
+ "expo-linking": "~8.0.7",
42
+ "expo-location": "~19.0.7",
43
+ "expo-router": "~6.0.0",
44
+ "expo-splash-screen": "~31.0.8",
45
+ "expo-status-bar": "~3.0.7",
46
+ "expo-symbols": "~1.0.6",
47
+ "expo-system-ui": "~6.0.9",
48
+ "expo-web-browser": "~15.0.10",
49
+ "react": "19.1.0",
50
+ "react-dom": "19.1.0",
51
+ "react-native": "0.81.5",
52
+ "react-native-chart-kit": "^6.12.0",
53
+ "react-native-gesture-handler": "~2.28.0",
54
+ "react-native-keyboard-aware-scroll-view": "^0.9.5",
55
+ "react-native-modal-datetime-picker": "18.0.0",
56
+ "react-native-reanimated": "~4.1.0",
57
+ "react-native-safe-area-context": "~5.6.0",
58
+ "react-native-screens": "~4.16.0",
59
+ "react-native-svg": "15.15.0",
60
+ "react-native-toast-message": "^2.3.3",
61
+ "react-native-web": "^0.21.2",
62
+ "react-native-webview": "~13.15.0",
63
+ "react-native-worklets": "0.5.1",
64
+ "zod": "^4.2.1"
65
+ },
66
+ "devDependencies": {
67
+ "@babel/core": "^7.25.2",
68
+ "@eslint/js": "^9.27.0",
69
+ "@types/jest": "^29.5.12",
70
+ "@types/react": "~19.1.0",
71
+ "@types/react-test-renderer": "19.1.0",
72
+ "chalk": "^4.1.2",
73
+ "depcheck": "^1.4.7",
74
+ "esbuild": "0.27.2",
75
+ "eslint": "^9.39.2",
76
+ "eslint-formatter-compact": "^9.0.1",
77
+ "eslint-import-resolver-typescript": "^4.4.4",
78
+ "eslint-plugin-import": "^2.32.0",
79
+ "eslint-plugin-react": "^7.37.5",
80
+ "eslint-plugin-react-hooks": "^7.0.1",
81
+ "eslint-plugin-regexp": "^2.10.0",
82
+ "globals": "^16.1.0",
83
+ "jest": "^29.2.1",
84
+ "jest-expo": "~54.0.10",
85
+ "react-test-renderer": "19.1.0",
86
+ "tsx": "^4.21.0",
87
+ "typescript": "^5.8.3",
88
+ "typescript-eslint": "^8.32.1",
89
+ "connect": "^3.7.0",
90
+ "http-proxy-middleware": "^3.0.5"
91
+ }
92
+ }
@@ -3,10 +3,7 @@ import {
3
3
  View,
4
4
  Text,
5
5
  ScrollView,
6
- TouchableOpacity,
7
6
  RefreshControl,
8
- Image,
9
- ActivityIndicator,
10
7
  } from 'react-native';
11
8
  import { useRouter, useFocusEffect } from 'expo-router';
12
9
  import { FontAwesome6 } from '@expo/vector-icons';
@@ -15,8 +12,7 @@ import { useTheme } from "@/hooks/useTheme";
15
12
 
16
13
  import { Screen } from '@/components/Screen';
17
14
 
18
- import styles from './styles';
19
-
15
+ import { styles } from './styles';
20
16
 
21
17
  export default function HomeScreen() {
22
18
  const insets = useSafeAreaInsets();
@@ -1,6 +1,6 @@
1
1
  import { StyleSheet, Platform } from 'react-native';
2
2
 
3
- const styles = StyleSheet.create({
3
+ export const styles = StyleSheet.create({
4
4
  loadingContainer: {
5
5
  flex: 1,
6
6
  justifyContent: 'center',
@@ -22,18 +22,6 @@ const styles = StyleSheet.create({
22
22
  fontSize: 16,
23
23
  color: '#64748B',
24
24
  },
25
- retryButton: {
26
- marginTop: 20,
27
- paddingHorizontal: 24,
28
- paddingVertical: 12,
29
- backgroundColor: '#2563EB',
30
- borderRadius: 8,
31
- },
32
- retryButtonText: {
33
- color: '#FFFFFF',
34
- fontSize: 14,
35
- fontWeight: '600',
36
- },
37
25
  header: {
38
26
  flexDirection: 'row',
39
27
  justifyContent: 'space-between',
@@ -44,11 +32,6 @@ const styles = StyleSheet.create({
44
32
  // borderBottomWidth: 1,
45
33
  borderBottomColor: '#E2E8F0',
46
34
  },
47
- headerLeft: {
48
- flexDirection: 'row',
49
- alignItems: 'center',
50
- gap: 10,
51
- },
52
35
  logoContainer: {
53
36
  width: 32,
54
37
  height: 32,
@@ -74,259 +57,4 @@ const styles = StyleSheet.create({
74
57
  color: '#1E293B',
75
58
  letterSpacing: -0.5,
76
59
  },
77
- userMenuContainer: {
78
- flexDirection: 'row',
79
- alignItems: 'center',
80
- gap: 10,
81
- paddingLeft: 16,
82
- borderLeftWidth: 1,
83
- borderLeftColor: '#E2E8F0',
84
- },
85
- userInfo: {
86
- alignItems: 'flex-end',
87
- },
88
- userName: {
89
- fontSize: 14,
90
- fontWeight: '500',
91
- color: '#1E293B',
92
- },
93
- userRole: {
94
- fontSize: 12,
95
- color: '#64748B',
96
- },
97
- avatar: {
98
- width: 36,
99
- height: 36,
100
- borderRadius: 18,
101
- borderWidth: 2,
102
- borderColor: '#FFFFFF',
103
- ...Platform.select({
104
- ios: {
105
- shadowColor: '#000',
106
- shadowOffset: { width: 0, height: 1 },
107
- shadowOpacity: 0.1,
108
- shadowRadius: 2,
109
- },
110
- android: {
111
- elevation: 2,
112
- },
113
- }),
114
- },
115
- avatarPlaceholder: {
116
- width: 36,
117
- height: 36,
118
- borderRadius: 18,
119
- justifyContent: 'center',
120
- alignItems: 'center',
121
- borderWidth: 2,
122
- borderColor: '#FFFFFF',
123
- backgroundColor: '#3B82F6',
124
- ...Platform.select({
125
- ios: {
126
- shadowColor: '#000',
127
- shadowOffset: { width: 0, height: 1 },
128
- shadowOpacity: 0.1,
129
- shadowRadius: 2,
130
- },
131
- android: {
132
- elevation: 2,
133
- },
134
- }),
135
- },
136
- avatarInitial: {
137
- fontSize: 14,
138
- fontWeight: '700',
139
- color: '#FFFFFF',
140
- },
141
- content: {
142
- paddingHorizontal: 16,
143
- paddingTop: 24,
144
- },
145
- welcomeSection: {
146
- marginBottom: 24,
147
- },
148
- welcomeTitle: {
149
- fontSize: 22,
150
- fontWeight: '700',
151
- color: '#1E293B',
152
- marginBottom: 4,
153
- },
154
- welcomeSubtitle: {
155
- fontSize: 14,
156
- color: '#64748B',
157
- },
158
- statsGrid: {
159
- flexDirection: 'row',
160
- gap: 12,
161
- marginBottom: 24,
162
- },
163
- statCard: {
164
- flex: 1,
165
- backgroundColor: '#FFFFFF',
166
- borderRadius: 12,
167
- padding: 16,
168
- ...Platform.select({
169
- ios: {
170
- shadowColor: '#000',
171
- shadowOffset: { width: 0, height: 1 },
172
- shadowOpacity: 0.05,
173
- shadowRadius: 3,
174
- },
175
- android: {
176
- elevation: 2,
177
- },
178
- }),
179
- },
180
- statCardHeader: {
181
- flexDirection: 'row',
182
- justifyContent: 'space-between',
183
- alignItems: 'flex-start',
184
- marginBottom: 12,
185
- },
186
- statIconContainer: {
187
- width: 40,
188
- height: 40,
189
- borderRadius: 10,
190
- justifyContent: 'center',
191
- alignItems: 'center',
192
- },
193
- statIconBlue: {
194
- backgroundColor: '#EFF6FF',
195
- },
196
- statIconRed: {
197
- backgroundColor: '#FEF2F2',
198
- },
199
- statIconGreen: {
200
- backgroundColor: '#ECFDF5',
201
- },
202
- attentionBadge: {
203
- backgroundColor: '#FEF2F2',
204
- paddingHorizontal: 6,
205
- paddingVertical: 2,
206
- borderRadius: 10,
207
- },
208
- attentionBadgeText: {
209
- fontSize: 10,
210
- fontWeight: '500',
211
- color: '#EF4444',
212
- },
213
- rateBadge: {
214
- backgroundColor: '#ECFDF5',
215
- paddingHorizontal: 6,
216
- paddingVertical: 2,
217
- borderRadius: 10,
218
- },
219
- rateBadgeText: {
220
- fontSize: 10,
221
- fontWeight: '500',
222
- color: '#10B981',
223
- },
224
- statValue: {
225
- fontSize: 28,
226
- fontWeight: '700',
227
- color: '#1E293B',
228
- marginBottom: 2,
229
- },
230
- statLabel: {
231
- fontSize: 13,
232
- color: '#64748B',
233
- },
234
- shortcutsSection: {
235
- gap: 12,
236
- marginBottom: 24,
237
- },
238
- shortcutCard: {
239
- flexDirection: 'row',
240
- justifyContent: 'space-between',
241
- alignItems: 'center',
242
- backgroundColor: '#FFFFFF',
243
- borderRadius: 12,
244
- padding: 16,
245
- ...Platform.select({
246
- ios: {
247
- shadowColor: '#000',
248
- shadowOffset: { width: 0, height: 1 },
249
- shadowOpacity: 0.05,
250
- shadowRadius: 3,
251
- },
252
- android: {
253
- elevation: 2,
254
- },
255
- }),
256
- },
257
- shortcutContent: {
258
- flex: 1,
259
- marginRight: 16,
260
- },
261
- shortcutTitle: {
262
- fontSize: 16,
263
- fontWeight: '600',
264
- color: '#1E293B',
265
- marginBottom: 6,
266
- },
267
- shortcutDescription: {
268
- fontSize: 13,
269
- color: '#64748B',
270
- marginBottom: 10,
271
- lineHeight: 18,
272
- },
273
- shortcutAction: {
274
- flexDirection: 'row',
275
- alignItems: 'center',
276
- gap: 6,
277
- },
278
- shortcutActionText: {
279
- fontSize: 13,
280
- fontWeight: '500',
281
- color: '#2563EB',
282
- },
283
- shortcutIconContainer: {
284
- width: 56,
285
- height: 56,
286
- borderRadius: 28,
287
- justifyContent: 'center',
288
- alignItems: 'center',
289
- },
290
- shortcutIconBlue: {
291
- backgroundColor: '#EFF6FF',
292
- },
293
- shortcutIconGreen: {
294
- backgroundColor: '#ECFDF5',
295
- },
296
- bannerContainer: {
297
- height: 160,
298
- borderRadius: 12,
299
- overflow: 'hidden',
300
- backgroundColor: '#1E3A8A',
301
- },
302
- bannerOverlay: {
303
- flex: 1,
304
- justifyContent: 'center',
305
- paddingHorizontal: 20,
306
- },
307
- bannerTitle: {
308
- fontSize: 18,
309
- fontWeight: '700',
310
- color: '#FFFFFF',
311
- marginBottom: 6,
312
- },
313
- bannerSubtitle: {
314
- fontSize: 13,
315
- color: '#BFDBFE',
316
- marginBottom: 16,
317
- },
318
- bannerButton: {
319
- alignSelf: 'flex-start',
320
- backgroundColor: '#FFFFFF',
321
- paddingHorizontal: 20,
322
- paddingVertical: 10,
323
- borderRadius: 8,
324
- },
325
- bannerButtonText: {
326
- fontSize: 13,
327
- fontWeight: '500',
328
- color: '#2563EB',
329
- },
330
60
  });
331
-
332
- export default styles;
@@ -0,0 +1,24 @@
1
+ {
2
+ "extends": "expo/tsconfig.base",
3
+ "compilerOptions": {
4
+ "skipLibCheck": true,
5
+ "jsx": "react-jsx",
6
+ "baseUrl": ".",
7
+ "strict": true,
8
+ "noEmit": true,
9
+ "paths": {
10
+ "@/*": ["./*"]
11
+ }
12
+ },
13
+ "include": ["**/*.ts", "**/*.tsx", ".expo/types/**/*.ts", "expo-env.d.ts"],
14
+ "exclude": [
15
+ "node_modules",
16
+ "**/*.spec.ts",
17
+ "**/*.test.ts",
18
+ "**/*.spec.tsx",
19
+ "**/*.test.tsx",
20
+ "dist",
21
+ "build",
22
+ ".expo"
23
+ ]
24
+ }