@coze-arch/cli 0.0.1-alpha.2f99e6 → 0.0.1-alpha.302c56

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 (239) hide show
  1. package/README.md +1 -0
  2. package/lib/__templates__/expo/.coze +1 -1
  3. package/lib/__templates__/expo/.cozeproj/scripts/dev_build.sh +19 -82
  4. package/lib/__templates__/expo/.cozeproj/scripts/dev_run.sh +82 -88
  5. package/lib/__templates__/expo/.cozeproj/scripts/prod_build.sh +2 -2
  6. package/lib/__templates__/expo/.cozeproj/scripts/prod_run.sh +3 -4
  7. package/lib/__templates__/expo/.cozeproj/scripts/server_dev_run.sh +46 -0
  8. package/lib/__templates__/expo/README.md +68 -7
  9. package/lib/__templates__/expo/client/app/+not-found.tsx +30 -0
  10. package/lib/__templates__/expo/client/{src/app → app}/_layout.tsx +15 -12
  11. package/lib/__templates__/expo/client/app/index.tsx +1 -0
  12. package/lib/__templates__/expo/client/app.config.ts +76 -0
  13. package/lib/__templates__/expo/client/{src/components → components}/Screen.tsx +3 -19
  14. package/lib/__templates__/expo/client/components/ThemedText.tsx +33 -0
  15. package/lib/__templates__/expo/client/components/ThemedView.tsx +37 -0
  16. package/lib/__templates__/expo/client/constants/theme.ts +177 -0
  17. package/lib/__templates__/expo/client/declarations.d.ts +5 -0
  18. package/lib/__templates__/expo/client/eslint.config.mjs +40 -10
  19. package/lib/__templates__/expo/client/hooks/useColorScheme.tsx +48 -0
  20. package/lib/__templates__/expo/client/hooks/useSafeRouter.ts +152 -0
  21. package/lib/__templates__/expo/client/hooks/useTheme.ts +33 -0
  22. package/lib/__templates__/expo/client/metro.config.js +78 -5
  23. package/lib/__templates__/expo/client/package.json +36 -33
  24. package/lib/__templates__/expo/client/screens/demo/index.tsx +25 -0
  25. package/lib/__templates__/expo/client/screens/demo/styles.ts +28 -0
  26. package/lib/__templates__/expo/client/scripts/install-missing-deps.js +11 -10
  27. package/lib/__templates__/expo/client/tsconfig.json +1 -1
  28. package/lib/__templates__/expo/client/{src/utils → utils}/index.ts +22 -0
  29. package/lib/__templates__/expo/eslint-plugins/fontawesome6/index.js +9 -0
  30. package/lib/__templates__/expo/eslint-plugins/fontawesome6/names.js +1889 -0
  31. package/lib/__templates__/expo/eslint-plugins/fontawesome6/rule.js +174 -0
  32. package/lib/__templates__/expo/eslint-plugins/fontawesome6/v5-only-names.js +388 -0
  33. package/lib/__templates__/expo/eslint-plugins/forbid-emoji/index.js +9 -0
  34. package/lib/__templates__/expo/eslint-plugins/forbid-emoji/rule.js +112 -0
  35. package/lib/__templates__/expo/eslint-plugins/forbid-emoji/tech.md +94 -0
  36. package/lib/__templates__/expo/eslint-plugins/react-native/index.js +9 -0
  37. package/lib/__templates__/expo/eslint-plugins/react-native/rule.js +64 -0
  38. package/lib/__templates__/expo/eslint-plugins/reanimated/index.js +9 -0
  39. package/lib/__templates__/expo/eslint-plugins/reanimated/rule.js +88 -0
  40. package/lib/__templates__/expo/eslint-plugins/restrict-linear-gradient/index.js +9 -0
  41. package/lib/__templates__/expo/eslint-plugins/restrict-linear-gradient/rule.js +120 -0
  42. package/lib/__templates__/expo/eslint-plugins/restrict-linear-gradient/tech.md +58 -0
  43. package/lib/__templates__/expo/package.json +9 -100
  44. package/lib/__templates__/expo/patches/expo@54.0.33.patch +45 -0
  45. package/lib/__templates__/expo/pnpm-lock.yaml +1420 -2939
  46. package/lib/__templates__/expo/server/build.js +21 -0
  47. package/lib/__templates__/expo/server/package.json +22 -5
  48. package/lib/__templates__/expo/server/src/index.ts +10 -2
  49. package/lib/__templates__/expo/server/tsconfig.json +24 -0
  50. package/lib/__templates__/expo/template.config.js +57 -0
  51. package/lib/__templates__/native-static/.coze +11 -0
  52. package/lib/__templates__/native-static/index.html +33 -0
  53. package/lib/__templates__/native-static/styles/main.css +136 -0
  54. package/lib/__templates__/native-static/template.config.js +22 -0
  55. package/lib/__templates__/nextjs/.babelrc +15 -0
  56. package/lib/__templates__/nextjs/.coze +1 -0
  57. package/lib/__templates__/nextjs/README.md +5 -0
  58. package/lib/__templates__/nextjs/_npmrc +1 -0
  59. package/lib/__templates__/nextjs/eslint.config.mjs +5 -0
  60. package/lib/__templates__/nextjs/next.config.ts +11 -0
  61. package/lib/__templates__/nextjs/package.json +10 -2
  62. package/lib/__templates__/nextjs/pnpm-lock.yaml +3488 -1569
  63. package/lib/__templates__/nextjs/scripts/build.sh +4 -1
  64. package/lib/__templates__/nextjs/scripts/dev.sh +8 -2
  65. package/lib/__templates__/nextjs/scripts/prepare.sh +9 -0
  66. package/lib/__templates__/nextjs/scripts/start.sh +7 -1
  67. package/lib/__templates__/nextjs/src/app/globals.css +10 -2
  68. package/lib/__templates__/nextjs/src/app/layout.tsx +5 -14
  69. package/lib/__templates__/nextjs/src/app/page.tsx +18 -49
  70. package/lib/__templates__/nextjs/src/components/ui/resizable.tsx +29 -22
  71. package/lib/__templates__/nextjs/src/components/ui/sidebar.tsx +228 -230
  72. package/lib/__templates__/nextjs/src/server.ts +35 -0
  73. package/lib/__templates__/nextjs/template.config.js +67 -2
  74. package/lib/__templates__/nextjs/tsconfig.json +1 -1
  75. package/lib/__templates__/nuxt-vue/.coze +12 -0
  76. package/lib/__templates__/nuxt-vue/README.md +73 -0
  77. package/lib/__templates__/nuxt-vue/_gitignore +24 -0
  78. package/lib/__templates__/nuxt-vue/_npmrc +23 -0
  79. package/lib/__templates__/nuxt-vue/app/app.vue +6 -0
  80. package/lib/__templates__/nuxt-vue/app/pages/index.vue +23 -0
  81. package/lib/__templates__/nuxt-vue/assets/css/main.css +24 -0
  82. package/lib/__templates__/nuxt-vue/nuxt.config.ts +116 -0
  83. package/lib/__templates__/nuxt-vue/package.json +35 -0
  84. package/lib/__templates__/nuxt-vue/pnpm-lock.yaml +8759 -0
  85. package/lib/__templates__/nuxt-vue/postcss.config.mjs +8 -0
  86. package/lib/__templates__/nuxt-vue/public/favicon.ico +0 -0
  87. package/lib/__templates__/nuxt-vue/public/robots.txt +2 -0
  88. package/lib/__templates__/nuxt-vue/scripts/build.sh +14 -0
  89. package/lib/__templates__/nuxt-vue/scripts/dev.sh +39 -0
  90. package/lib/__templates__/nuxt-vue/scripts/prepare.sh +14 -0
  91. package/lib/__templates__/nuxt-vue/scripts/start.sh +21 -0
  92. package/lib/__templates__/nuxt-vue/server/api/hello.ts +10 -0
  93. package/lib/__templates__/nuxt-vue/server/middleware/logger.ts +10 -0
  94. package/lib/__templates__/nuxt-vue/server/routes/health.ts +10 -0
  95. package/lib/__templates__/nuxt-vue/tailwind.config.js +13 -0
  96. package/lib/__templates__/nuxt-vue/template.config.js +87 -0
  97. package/lib/__templates__/nuxt-vue/tsconfig.json +18 -0
  98. package/lib/__templates__/taro/.coze +14 -0
  99. package/lib/__templates__/taro/.cozeproj/scripts/deploy_build.sh +19 -0
  100. package/lib/__templates__/taro/.cozeproj/scripts/deploy_run.sh +14 -0
  101. package/lib/__templates__/taro/.cozeproj/scripts/dev_build.sh +2 -0
  102. package/lib/__templates__/taro/.cozeproj/scripts/dev_run.sh +151 -0
  103. package/lib/__templates__/taro/.cozeproj/scripts/init_env.sh +5 -0
  104. package/lib/__templates__/taro/.cozeproj/scripts/pack.sh +24 -0
  105. package/lib/__templates__/taro/AGENTS.md +6 -0
  106. package/lib/__templates__/taro/README.md +763 -0
  107. package/lib/__templates__/taro/_gitignore +40 -0
  108. package/lib/__templates__/taro/_npmrc +18 -0
  109. package/lib/__templates__/taro/babel.config.js +12 -0
  110. package/lib/__templates__/taro/config/dev.ts +9 -0
  111. package/lib/__templates__/taro/config/index.ts +238 -0
  112. package/lib/__templates__/taro/config/prod.ts +34 -0
  113. package/lib/__templates__/taro/eslint.config.mjs +135 -0
  114. package/lib/__templates__/taro/key/private.appid.key +0 -0
  115. package/lib/__templates__/taro/package.json +112 -0
  116. package/lib/__templates__/taro/patches/@tarojs__plugin-mini-ci@4.1.9.patch +30 -0
  117. package/lib/__templates__/taro/pnpm-lock.yaml +23412 -0
  118. package/lib/__templates__/taro/pnpm-workspace.yaml +2 -0
  119. package/lib/__templates__/taro/project.config.json +15 -0
  120. package/lib/__templates__/taro/server/nest-cli.json +10 -0
  121. package/lib/__templates__/taro/server/package.json +40 -0
  122. package/lib/__templates__/taro/server/src/app.controller.ts +23 -0
  123. package/lib/__templates__/taro/server/src/app.module.ts +10 -0
  124. package/lib/__templates__/taro/server/src/app.service.ts +8 -0
  125. package/lib/__templates__/taro/server/src/interceptors/http-status.interceptor.ts +23 -0
  126. package/lib/__templates__/taro/server/src/main.ts +49 -0
  127. package/lib/__templates__/taro/server/tsconfig.json +24 -0
  128. package/lib/__templates__/taro/src/app.config.ts +11 -0
  129. package/lib/__templates__/taro/src/app.css +156 -0
  130. package/lib/__templates__/taro/src/app.tsx +9 -0
  131. package/lib/__templates__/taro/src/components/ui/accordion.tsx +159 -0
  132. package/lib/__templates__/taro/src/components/ui/alert-dialog.tsx +260 -0
  133. package/lib/__templates__/taro/src/components/ui/alert.tsx +60 -0
  134. package/lib/__templates__/taro/src/components/ui/aspect-ratio.tsx +36 -0
  135. package/lib/__templates__/taro/src/components/ui/avatar.tsx +84 -0
  136. package/lib/__templates__/taro/src/components/ui/badge.tsx +37 -0
  137. package/lib/__templates__/taro/src/components/ui/breadcrumb.tsx +117 -0
  138. package/lib/__templates__/taro/src/components/ui/button-group.tsx +83 -0
  139. package/lib/__templates__/taro/src/components/ui/button.tsx +67 -0
  140. package/lib/__templates__/taro/src/components/ui/calendar.tsx +394 -0
  141. package/lib/__templates__/taro/src/components/ui/card.tsx +108 -0
  142. package/lib/__templates__/taro/src/components/ui/carousel.tsx +228 -0
  143. package/lib/__templates__/taro/src/components/ui/checkbox.tsx +58 -0
  144. package/lib/__templates__/taro/src/components/ui/code-block.tsx +169 -0
  145. package/lib/__templates__/taro/src/components/ui/collapsible.tsx +71 -0
  146. package/lib/__templates__/taro/src/components/ui/command.tsx +385 -0
  147. package/lib/__templates__/taro/src/components/ui/context-menu.tsx +614 -0
  148. package/lib/__templates__/taro/src/components/ui/dialog.tsx +256 -0
  149. package/lib/__templates__/taro/src/components/ui/drawer.tsx +192 -0
  150. package/lib/__templates__/taro/src/components/ui/dropdown-menu.tsx +561 -0
  151. package/lib/__templates__/taro/src/components/ui/field.tsx +228 -0
  152. package/lib/__templates__/taro/src/components/ui/hover-card.tsx +282 -0
  153. package/lib/__templates__/taro/src/components/ui/input-group.tsx +197 -0
  154. package/lib/__templates__/taro/src/components/ui/input-otp.tsx +136 -0
  155. package/lib/__templates__/taro/src/components/ui/input.tsx +56 -0
  156. package/lib/__templates__/taro/src/components/ui/label.tsx +24 -0
  157. package/lib/__templates__/taro/src/components/ui/menubar.tsx +595 -0
  158. package/lib/__templates__/taro/src/components/ui/navigation-menu.tsx +264 -0
  159. package/lib/__templates__/taro/src/components/ui/pagination.tsx +118 -0
  160. package/lib/__templates__/taro/src/components/ui/popover.tsx +291 -0
  161. package/lib/__templates__/taro/src/components/ui/portal.tsx +19 -0
  162. package/lib/__templates__/taro/src/components/ui/progress.tsx +28 -0
  163. package/lib/__templates__/taro/src/components/ui/radio-group.tsx +64 -0
  164. package/lib/__templates__/taro/src/components/ui/resizable.tsx +346 -0
  165. package/lib/__templates__/taro/src/components/ui/scroll-area.tsx +34 -0
  166. package/lib/__templates__/taro/src/components/ui/select.tsx +438 -0
  167. package/lib/__templates__/taro/src/components/ui/separator.tsx +30 -0
  168. package/lib/__templates__/taro/src/components/ui/sheet.tsx +262 -0
  169. package/lib/__templates__/taro/src/components/ui/skeleton.tsx +17 -0
  170. package/lib/__templates__/taro/src/components/ui/slider.tsx +203 -0
  171. package/lib/__templates__/taro/src/components/ui/sonner.tsx +1 -0
  172. package/lib/__templates__/taro/src/components/ui/switch.tsx +55 -0
  173. package/lib/__templates__/taro/src/components/ui/table.tsx +142 -0
  174. package/lib/__templates__/taro/src/components/ui/tabs.tsx +114 -0
  175. package/lib/__templates__/taro/src/components/ui/textarea.tsx +54 -0
  176. package/lib/__templates__/taro/src/components/ui/toast.tsx +517 -0
  177. package/lib/__templates__/taro/src/components/ui/toggle-group.tsx +120 -0
  178. package/lib/__templates__/taro/src/components/ui/toggle.tsx +77 -0
  179. package/lib/__templates__/taro/src/components/ui/tooltip.tsx +455 -0
  180. package/lib/__templates__/taro/src/index.html +39 -0
  181. package/lib/__templates__/taro/src/lib/hooks/use-keyboard-offset.ts +37 -0
  182. package/lib/__templates__/taro/src/lib/measure.ts +115 -0
  183. package/lib/__templates__/taro/src/lib/platform.ts +12 -0
  184. package/lib/__templates__/taro/src/lib/utils.ts +6 -0
  185. package/lib/__templates__/taro/src/network.ts +39 -0
  186. package/lib/__templates__/taro/src/pages/index/index.config.ts +3 -0
  187. package/lib/__templates__/taro/src/pages/index/index.css +1 -0
  188. package/lib/__templates__/taro/src/pages/index/index.tsx +33 -0
  189. package/lib/__templates__/taro/src/presets/dev-debug.ts +23 -0
  190. package/lib/__templates__/taro/src/presets/h5-container.tsx +15 -0
  191. package/lib/__templates__/taro/src/presets/h5-navbar.tsx +238 -0
  192. package/lib/__templates__/taro/src/presets/h5-styles.ts +220 -0
  193. package/lib/__templates__/taro/src/presets/index.tsx +18 -0
  194. package/lib/__templates__/taro/stylelint.config.mjs +4 -0
  195. package/lib/__templates__/taro/template.config.js +68 -0
  196. package/lib/__templates__/taro/tsconfig.json +29 -0
  197. package/lib/__templates__/taro/types/global.d.ts +32 -0
  198. package/lib/__templates__/templates.json +136 -43
  199. package/lib/__templates__/vite/.coze +1 -0
  200. package/lib/__templates__/vite/README.md +190 -11
  201. package/lib/__templates__/vite/_gitignore +1 -0
  202. package/lib/__templates__/vite/_npmrc +1 -0
  203. package/lib/__templates__/vite/eslint.config.mjs +14 -0
  204. package/lib/__templates__/vite/package.json +22 -2
  205. package/lib/__templates__/vite/pnpm-lock.yaml +2398 -182
  206. package/lib/__templates__/vite/scripts/build.sh +4 -1
  207. package/lib/__templates__/vite/scripts/dev.sh +9 -2
  208. package/lib/__templates__/vite/scripts/prepare.sh +9 -0
  209. package/lib/__templates__/vite/scripts/start.sh +9 -3
  210. package/lib/__templates__/vite/server/routes/index.ts +31 -0
  211. package/lib/__templates__/vite/server/server.ts +65 -0
  212. package/lib/__templates__/vite/server/vite.ts +67 -0
  213. package/lib/__templates__/vite/src/main.ts +17 -48
  214. package/lib/__templates__/vite/template.config.js +67 -6
  215. package/lib/__templates__/vite/tsconfig.json +4 -3
  216. package/lib/__templates__/vite/vite.config.ts +5 -0
  217. package/lib/cli.js +1084 -225
  218. package/package.json +12 -4
  219. package/lib/__templates__/expo/client/app.json +0 -63
  220. package/lib/__templates__/expo/client/src/app/index.ts +0 -1
  221. package/lib/__templates__/expo/client/src/constants/theme.ts +0 -128
  222. package/lib/__templates__/expo/client/src/hooks/useColorScheme.ts +0 -1
  223. package/lib/__templates__/expo/client/src/hooks/useTheme.ts +0 -13
  224. package/lib/__templates__/expo/client/src/screens/home/index.tsx +0 -50
  225. package/lib/__templates__/expo/client/src/screens/home/styles.ts +0 -60
  226. package/lib/__templates__/nextjs/.vscode/settings.json +0 -121
  227. package/lib/__templates__/vite/.vscode/settings.json +0 -7
  228. /package/lib/__templates__/expo/client/{src/assets → assets}/fonts/SpaceMono-Regular.ttf +0 -0
  229. /package/lib/__templates__/expo/client/{src/assets → assets}/images/adaptive-icon.png +0 -0
  230. /package/lib/__templates__/expo/client/{src/assets → assets}/images/default-avatar.png +0 -0
  231. /package/lib/__templates__/expo/client/{src/assets → assets}/images/favicon.png +0 -0
  232. /package/lib/__templates__/expo/client/{src/assets → assets}/images/icon.png +0 -0
  233. /package/lib/__templates__/expo/client/{src/assets → assets}/images/partial-react-logo.png +0 -0
  234. /package/lib/__templates__/expo/client/{src/assets → assets}/images/react-logo.png +0 -0
  235. /package/lib/__templates__/expo/client/{src/assets → assets}/images/react-logo@2x.png +0 -0
  236. /package/lib/__templates__/expo/client/{src/assets → assets}/images/react-logo@3x.png +0 -0
  237. /package/lib/__templates__/expo/client/{src/assets → assets}/images/splash-icon.png +0 -0
  238. /package/lib/__templates__/expo/client/{src/components → components}/SmartDateInput.tsx +0 -0
  239. /package/lib/__templates__/expo/client/{src/contexts → contexts}/AuthContext.tsx +0 -0
@@ -8,7 +8,10 @@ cd "${COZE_WORKSPACE_PATH}"
8
8
  echo "Installing dependencies..."
9
9
  pnpm install --prefer-frozen-lockfile --prefer-offline --loglevel debug --reporter=append-only
10
10
 
11
- echo "Building the project..."
11
+ echo "Building the Next.js project..."
12
12
  npx next build
13
13
 
14
+ echo "Bundling server with tsup..."
15
+ npx tsup src/server.ts --format cjs --platform node --target node20 --outDir dist --no-splitting --no-minify
16
+
14
17
  echo "Build completed successfully!"
@@ -1,10 +1,16 @@
1
1
  #!/bin/bash
2
2
  set -Eeuo pipefail
3
3
 
4
+ <% if (process.env.NODE_ENV === 'test') { %>
5
+ # 测试环境:支持环境变量覆盖端口
6
+ PORT="${PORT:-<%= port %>}"
7
+ COZE_WORKSPACE_PATH="${COZE_WORKSPACE_PATH:-$(pwd)}"
8
+ DEPLOY_RUN_PORT="${DEPLOY_RUN_PORT:-${PORT}}"
9
+ <% } else { %>
4
10
  PORT=<%= port %>
5
11
  COZE_WORKSPACE_PATH="${COZE_WORKSPACE_PATH:-$(pwd)}"
6
- NODE_ENV=development
7
12
  DEPLOY_RUN_PORT=<%= port %>
13
+ <% } %>
8
14
 
9
15
  cd "${COZE_WORKSPACE_PATH}"
10
16
 
@@ -30,4 +36,4 @@ echo "Clearing port ${PORT} before start."
30
36
  kill_port_if_listening
31
37
  echo "Starting HTTP service on port ${PORT} for dev..."
32
38
 
33
- npx next dev --webpack --port $PORT
39
+ PORT=$PORT npx tsx watch src/server.ts
@@ -0,0 +1,9 @@
1
+ #!/bin/bash
2
+ set -Eeuo pipefail
3
+
4
+ COZE_WORKSPACE_PATH="${COZE_WORKSPACE_PATH:-$(pwd)}"
5
+
6
+ cd "${COZE_WORKSPACE_PATH}"
7
+
8
+ echo "Installing dependencies..."
9
+ pnpm install --prefer-frozen-lockfile --prefer-offline --loglevel debug --reporter=append-only
@@ -2,13 +2,19 @@
2
2
  set -Eeuo pipefail
3
3
 
4
4
  COZE_WORKSPACE_PATH="${COZE_WORKSPACE_PATH:-$(pwd)}"
5
+ <% if (process.env.NODE_ENV === 'test') { %>
6
+ # 测试环境:支持环境变量覆盖端口
7
+ PORT="${PORT:-<%= port %>}"
8
+ DEPLOY_RUN_PORT="${DEPLOY_RUN_PORT:-${PORT}}"
9
+ <% } else { %>
5
10
  PORT=<%= port %>
6
11
  DEPLOY_RUN_PORT="${DEPLOY_RUN_PORT:-$PORT}"
12
+ <% } %>
7
13
 
8
14
  start_service() {
9
15
  cd "${COZE_WORKSPACE_PATH}"
10
16
  echo "Starting HTTP service on port ${DEPLOY_RUN_PORT} for deploy..."
11
- npx next start --port ${DEPLOY_RUN_PORT}
17
+ PORT=${DEPLOY_RUN_PORT} node dist/server.js
12
18
  }
13
19
 
14
20
  echo "Starting HTTP service on port ${DEPLOY_RUN_PORT} for deploy..."
@@ -6,8 +6,6 @@
6
6
  @theme inline {
7
7
  --color-background: var(--background);
8
8
  --color-foreground: var(--foreground);
9
- --font-sans: var(--font-geist-sans);
10
- --font-mono: var(--font-geist-mono);
11
9
  --color-sidebar-ring: var(--sidebar-ring);
12
10
  --color-sidebar-border: var(--sidebar-border);
13
11
  --color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
@@ -44,6 +42,16 @@
44
42
  --radius-2xl: calc(var(--radius) + 8px);
45
43
  --radius-3xl: calc(var(--radius) + 12px);
46
44
  --radius-4xl: calc(var(--radius) + 16px);
45
+ --font-sans:
46
+ 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', ui-sans-serif,
47
+ system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
48
+ 'Helvetica Neue', Arial, sans-serif;
49
+ --font-mono:
50
+ ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono',
51
+ 'Courier New', monospace;
52
+ --font-serif:
53
+ 'Noto Serif SC', 'Songti SC', 'SimSun', ui-serif, Georgia, Cambria,
54
+ 'Times New Roman', Times, serif;
47
55
  }
48
56
 
49
57
  :root {
@@ -1,17 +1,7 @@
1
1
  import type { Metadata } from 'next';
2
- import { Geist, Geist_Mono } from 'next/font/google';
2
+ import { Inspector } from 'react-dev-inspector';
3
3
  import './globals.css';
4
4
 
5
- const geistSans = Geist({
6
- variable: '--font-geist-sans',
7
- subsets: ['latin'],
8
- });
9
-
10
- const geistMono = Geist_Mono({
11
- variable: '--font-geist-mono',
12
- subsets: ['latin'],
13
- });
14
-
15
5
  export const metadata: Metadata = {
16
6
  title: {
17
7
  default: '新应用 | 扣子编程',
@@ -71,11 +61,12 @@ export default function RootLayout({
71
61
  }: Readonly<{
72
62
  children: React.ReactNode;
73
63
  }>) {
64
+ const isDev = process.env.COZE_PROJECT_ENV === 'DEV';
65
+
74
66
  return (
75
67
  <html lang="en">
76
- <body
77
- className={`${geistSans.variable} ${geistMono.variable} antialiased`}
78
- >
68
+ <body className={`antialiased`}>
69
+ {isDev && <Inspector />}
79
70
  {children}
80
71
  </body>
81
72
  </html>
@@ -1,4 +1,5 @@
1
1
  import type { Metadata } from 'next';
2
+ import Image from 'next/image';
2
3
 
3
4
  export const metadata: Metadata = {
4
5
  title: '扣子编程 - AI 开发伙伴',
@@ -7,58 +8,26 @@ export const metadata: Metadata = {
7
8
 
8
9
  export default function Home() {
9
10
  return (
10
- <div className="flex min-h-screen items-center justify-center bg-white text-black transition-colors duration-300 dark:bg-black dark:text-white">
11
+ <div className="flex h-full items-center justify-center bg-background text-foreground transition-colors duration-300 dark:bg-background dark:text-foreground overflow-hidden min-h-screen">
11
12
  {/* 主容器 */}
12
- <main className="flex min-h-screen w-full max-w-3xl flex-col items-center justify-between px-16 py-32 sm:items-start">
13
- {/* 头部:Logo 产品名称 */}
14
- <div className="flex items-center gap-3">
15
- {/* 注意:生产环境建议使用 next/image 并配置 remotePatterns */}
16
- <img
17
- className="dark:invert"
18
- src="https://lf3-static.bytednsdoc.com/obj/eden-cn/hkpzboz/coze_logo.png"
13
+ <main className="flex w-full h-full max-w-3xl flex-col items-center justify-center px-16 py-32 sm:items-center">
14
+ <div className="flex flex-col items-center justify-between gap-4">
15
+ <Image
16
+ src="https://lf-coze-web-cdn.coze.cn/obj/eden-cn/lm-lgvj/ljhwZthlaukjlkulzlp/coze-coding/icon/coze-coding.gif"
19
17
  alt="扣子编程 Logo"
20
- width={40}
21
- height={40}
22
- style={{ width: '40px', height: '40px', objectFit: 'contain' }}
18
+ width={156}
19
+ height={130}
23
20
  />
24
- <span className="text-xl font-bold tracking-tight text-black dark:text-zinc-50">
25
- 扣子编程
26
- </span>
27
- </div>
28
-
29
- {/* 中间内容区:主标题和副标题 */}
30
- <div className="flex flex-col items-center gap-6 text-center sm:items-start sm:text-left">
31
- <h1 className="max-w-xl text-4xl font-semibold leading-tight tracking-tight text-black dark:text-zinc-50">
32
- 扣子编程,你的 AI 开发伙伴已就位
33
- </h1>
34
- <p className="max-w-2xl text-lg leading-8 text-zinc-600 dark:text-zinc-400">
35
- 当前是空白入口文件,项目正在开发中,请稍候...
36
- <br />
37
- 开发完成后界面将自动更新。如未自动更新成功,可以手动点击右上角刷新或重启按钮查看效果。
38
- </p>
39
- </div>
40
-
41
- {/* 底部按钮区 */}
42
- <div className="flex w-full flex-col gap-4 text-base font-medium sm:w-auto sm:flex-row">
43
- {/* 按钮 1:前往首页 */}
44
- <a
45
- className="flex h-12 w-full min-w-[160px] items-center justify-center gap-2 rounded-full bg-black px-8 text-white transition-colors hover:bg-zinc-800 dark:bg-white dark:text-black dark:hover:bg-zinc-200 md:w-auto"
46
- href="https://code.coze.cn/"
47
- target="_blank"
48
- rel="noopener noreferrer"
49
- >
50
- 前往首页
51
- </a>
52
-
53
- {/* 按钮 2:查看文档 */}
54
- <a
55
- className="flex h-12 w-full min-w-[160px] items-center justify-center rounded-full border border-solid border-black/[.08] px-8 transition-colors hover:border-transparent hover:bg-black/[.04] dark:border-white/[.145] dark:hover:bg-[#1a1a1a] md:w-auto"
56
- href="https://docs.coze.cn/"
57
- target="_blank"
58
- rel="noopener noreferrer"
59
- >
60
- 查看文档
61
- </a>
21
+ <div>
22
+ <div className="flex flex-col items-center gap-2 text-center sm:items-center sm:text-center">
23
+ <h1 className="max-w-xl text-base font-semibold leading-tight tracking-tight text-foreground dark:text-foreground">
24
+ 应用开发中
25
+ </h1>
26
+ <p className="max-w-2xl text-sm leading-8 text-muted-foreground dark:text-muted-foreground">
27
+ 请稍后,页面即将呈现
28
+ </p>
29
+ </div>
30
+ </div>
62
31
  </div>
63
32
  </main>
64
33
  </div>
@@ -1,46 +1,53 @@
1
- "use client"
1
+ 'use client';
2
2
 
3
- import * as React from "react"
4
- import { GripVerticalIcon } from "lucide-react"
5
- import * as ResizablePrimitive from "react-resizable-panels"
3
+ import { GripVerticalIcon } from 'lucide-react';
4
+ import {
5
+ Group,
6
+ Panel,
7
+ Separator,
8
+ type GroupProps,
9
+ type PanelProps,
10
+ type SeparatorProps,
11
+ } from 'react-resizable-panels';
6
12
 
7
- import { cn } from "@/lib/utils"
13
+ import { cn } from '@/lib/utils';
8
14
 
9
15
  function ResizablePanelGroup({
10
16
  className,
17
+ orientation = 'horizontal',
11
18
  ...props
12
- }: React.ComponentProps<typeof ResizablePrimitive.PanelGroup>) {
19
+ }: GroupProps) {
13
20
  return (
14
- <ResizablePrimitive.PanelGroup
21
+ <Group
15
22
  data-slot="resizable-panel-group"
23
+ data-panel-group-direction={orientation}
24
+ orientation={orientation}
16
25
  className={cn(
17
- "flex h-full w-full data-[panel-group-direction=vertical]:flex-col",
18
- className
26
+ 'flex h-full w-full data-[panel-group-direction=vertical]:flex-col',
27
+ className,
19
28
  )}
20
29
  {...props}
21
30
  />
22
- )
31
+ );
23
32
  }
24
33
 
25
- function ResizablePanel({
26
- ...props
27
- }: React.ComponentProps<typeof ResizablePrimitive.Panel>) {
28
- return <ResizablePrimitive.Panel data-slot="resizable-panel" {...props} />
34
+ function ResizablePanel({ ...props }: PanelProps) {
35
+ return <Panel data-slot="resizable-panel" {...props} />;
29
36
  }
30
37
 
31
38
  function ResizableHandle({
32
39
  withHandle,
33
40
  className,
34
41
  ...props
35
- }: React.ComponentProps<typeof ResizablePrimitive.PanelResizeHandle> & {
36
- withHandle?: boolean
42
+ }: SeparatorProps & {
43
+ withHandle?: boolean;
37
44
  }) {
38
45
  return (
39
- <ResizablePrimitive.PanelResizeHandle
46
+ <Separator
40
47
  data-slot="resizable-handle"
41
48
  className={cn(
42
- "bg-border focus-visible:ring-ring relative flex w-px items-center justify-center after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-offset-1 focus-visible:outline-hidden data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:translate-x-0 data-[panel-group-direction=vertical]:after:-translate-y-1/2 [&[data-panel-group-direction=vertical]>div]:rotate-90",
43
- className
49
+ 'bg-border focus-visible:ring-ring relative flex w-px items-center justify-center after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-offset-1 focus-visible:outline-hidden data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:translate-x-0 data-[panel-group-direction=vertical]:after:-translate-y-1/2 [&[data-panel-group-direction=vertical]>div]:rotate-90',
50
+ className,
44
51
  )}
45
52
  {...props}
46
53
  >
@@ -49,8 +56,8 @@ function ResizableHandle({
49
56
  <GripVerticalIcon className="size-2.5" />
50
57
  </div>
51
58
  )}
52
- </ResizablePrimitive.PanelResizeHandle>
53
- )
59
+ </Separator>
60
+ );
54
61
  }
55
62
 
56
- export { ResizablePanelGroup, ResizablePanel, ResizableHandle }
63
+ export { ResizablePanelGroup, ResizablePanel, ResizableHandle };