@coze-arch/cli 0.0.1-alpha.f9be02 → 0.0.1-alpha.fd3d56
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/.coze +1 -1
- package/lib/__templates__/expo/.cozeproj/scripts/dev_build.sh +19 -82
- package/lib/__templates__/expo/.cozeproj/scripts/dev_run.sh +75 -86
- package/lib/__templates__/expo/.cozeproj/scripts/prod_build.sh +2 -2
- package/lib/__templates__/expo/.cozeproj/scripts/prod_run.sh +2 -2
- package/lib/__templates__/expo/.cozeproj/scripts/server_dev_run.sh +45 -0
- package/lib/__templates__/expo/README.md +68 -7
- package/lib/__templates__/expo/client/app/+not-found.tsx +30 -0
- package/lib/__templates__/expo/client/{src/app → app}/_layout.tsx +15 -12
- package/lib/__templates__/expo/client/app/index.tsx +1 -0
- package/lib/__templates__/expo/client/app.config.ts +65 -60
- package/lib/__templates__/expo/client/{src/components → components}/Screen.tsx +1 -17
- package/lib/__templates__/expo/client/{src/components → components}/ThemedView.tsx +1 -2
- package/lib/__templates__/expo/client/constants/theme.ts +177 -0
- package/lib/__templates__/expo/client/declarations.d.ts +5 -0
- package/lib/__templates__/expo/client/eslint.config.mjs +30 -10
- package/lib/__templates__/expo/client/hooks/useColorScheme.tsx +48 -0
- package/lib/__templates__/expo/client/hooks/useSafeRouter.ts +152 -0
- package/lib/__templates__/expo/client/hooks/useTheme.ts +33 -0
- package/lib/__templates__/expo/client/package.json +6 -3
- package/lib/__templates__/expo/client/screens/demo/index.tsx +25 -0
- package/lib/__templates__/expo/client/screens/demo/styles.ts +28 -0
- package/lib/__templates__/expo/client/scripts/install-missing-deps.js +1 -0
- package/lib/__templates__/expo/client/tsconfig.json +1 -1
- package/lib/__templates__/expo/client/{src/utils → utils}/index.ts +22 -0
- package/lib/__templates__/expo/eslint-plugins/fontawesome6/index.js +9 -0
- package/lib/__templates__/expo/eslint-plugins/fontawesome6/names.js +1889 -0
- package/lib/__templates__/expo/eslint-plugins/fontawesome6/rule.js +174 -0
- package/lib/__templates__/expo/eslint-plugins/fontawesome6/v5-only-names.js +388 -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 +7 -98
- package/lib/__templates__/expo/patches/expo@54.0.32.patch +44 -0
- package/lib/__templates__/expo/pnpm-lock.yaml +2001 -2124
- package/lib/__templates__/expo/server/build.js +21 -0
- package/lib/__templates__/expo/server/package.json +19 -4
- package/lib/__templates__/expo/server/src/index.ts +9 -2
- package/lib/__templates__/expo/server/tsconfig.json +24 -0
- package/lib/__templates__/expo/template.config.js +1 -0
- package/lib/__templates__/nextjs/.babelrc +15 -0
- package/lib/__templates__/nextjs/.coze +1 -0
- package/lib/__templates__/nextjs/_npmrc +1 -0
- package/lib/__templates__/nextjs/next.config.ts +12 -0
- package/lib/__templates__/nextjs/package.json +10 -11
- package/lib/__templates__/nextjs/pnpm-lock.yaml +2543 -1747
- package/lib/__templates__/nextjs/scripts/prepare.sh +9 -0
- package/lib/__templates__/nextjs/src/app/globals.css +10 -2
- package/lib/__templates__/nextjs/src/app/layout.tsx +5 -14
- package/lib/__templates__/nextjs/src/app/page.tsx +35 -23
- package/lib/__templates__/nextjs/src/components/ui/resizable.tsx +29 -22
- package/lib/__templates__/nextjs/src/components/ui/sidebar.tsx +228 -230
- package/lib/__templates__/nextjs/template.config.js +30 -0
- package/lib/__templates__/templates.json +61 -43
- package/lib/__templates__/vite/.coze +1 -0
- package/lib/__templates__/vite/_npmrc +1 -0
- package/lib/__templates__/vite/eslint.config.mjs +9 -0
- package/lib/__templates__/vite/package.json +10 -1
- package/lib/__templates__/vite/pnpm-lock.yaml +3115 -126
- package/lib/__templates__/vite/scripts/prepare.sh +9 -0
- package/lib/__templates__/vite/src/main.ts +1 -2
- package/lib/__templates__/vite/template.config.js +30 -4
- package/lib/cli.js +691 -130
- package/package.json +5 -3
- package/lib/__templates__/expo/client/src/app/index.ts +0 -1
- package/lib/__templates__/expo/client/src/constants/theme.ts +0 -850
- package/lib/__templates__/expo/client/src/hooks/useColorScheme.ts +0 -1
- package/lib/__templates__/expo/client/src/hooks/useTheme.ts +0 -13
- package/lib/__templates__/expo/client/src/screens/home/index.tsx +0 -50
- package/lib/__templates__/expo/client/src/screens/home/styles.ts +0 -60
- package/lib/__templates__/nextjs/.vscode/settings.json +0 -121
- package/lib/__templates__/vite/.vscode/settings.json +0 -7
- /package/lib/__templates__/expo/client/{src/assets → assets}/fonts/SpaceMono-Regular.ttf +0 -0
- /package/lib/__templates__/expo/client/{src/assets → assets}/images/adaptive-icon.png +0 -0
- /package/lib/__templates__/expo/client/{src/assets → assets}/images/default-avatar.png +0 -0
- /package/lib/__templates__/expo/client/{src/assets → assets}/images/favicon.png +0 -0
- /package/lib/__templates__/expo/client/{src/assets → assets}/images/icon.png +0 -0
- /package/lib/__templates__/expo/client/{src/assets → assets}/images/partial-react-logo.png +0 -0
- /package/lib/__templates__/expo/client/{src/assets → assets}/images/react-logo.png +0 -0
- /package/lib/__templates__/expo/client/{src/assets → assets}/images/react-logo@2x.png +0 -0
- /package/lib/__templates__/expo/client/{src/assets → assets}/images/react-logo@3x.png +0 -0
- /package/lib/__templates__/expo/client/{src/assets → assets}/images/splash-icon.png +0 -0
- /package/lib/__templates__/expo/client/{src/components → components}/SmartDateInput.tsx +0 -0
- /package/lib/__templates__/expo/client/{src/components → components}/ThemedText.tsx +0 -0
- /package/lib/__templates__/expo/client/{src/contexts → contexts}/AuthContext.tsx +0 -0
|
@@ -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 {
|
|
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.NODE_ENV === 'development';
|
|
65
|
+
|
|
74
66
|
return (
|
|
75
67
|
<html lang="en">
|
|
76
|
-
<body
|
|
77
|
-
|
|
78
|
-
>
|
|
68
|
+
<body className={`antialiased`}>
|
|
69
|
+
{isDev && <Inspector />}
|
|
79
70
|
{children}
|
|
80
71
|
</body>
|
|
81
72
|
</html>
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import type { Metadata } from 'next';
|
|
2
|
+
import Image from 'next/image';
|
|
3
|
+
import { Button } from '@/components/ui/button';
|
|
2
4
|
|
|
3
5
|
export const metadata: Metadata = {
|
|
4
6
|
title: '扣子编程 - AI 开发伙伴',
|
|
@@ -7,31 +9,29 @@ export const metadata: Metadata = {
|
|
|
7
9
|
|
|
8
10
|
export default function Home() {
|
|
9
11
|
return (
|
|
10
|
-
<div className="flex min-h-screen items-center justify-center bg-
|
|
12
|
+
<div className="flex min-h-screen items-center justify-center bg-background text-foreground transition-colors duration-300 dark:bg-background dark:text-foreground">
|
|
11
13
|
{/* 主容器 */}
|
|
12
14
|
<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
15
|
{/* 头部:Logo 和 产品名称 */}
|
|
14
16
|
<div className="flex items-center gap-3">
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
className="dark:invert"
|
|
18
|
-
src="https://lf3-static.bytednsdoc.com/obj/eden-cn/hkpzboz/coze_logo.png"
|
|
17
|
+
<Image
|
|
18
|
+
src="https://lf-coze-web-cdn.coze.cn/obj/eden-cn/lm-lgvj/ljhwZthlaukjlkulzlp/favicon.svg"
|
|
19
19
|
alt="扣子编程 Logo"
|
|
20
20
|
width={40}
|
|
21
21
|
height={40}
|
|
22
|
-
|
|
22
|
+
unoptimized
|
|
23
23
|
/>
|
|
24
|
-
<span className="text-xl font-bold tracking-tight text-
|
|
24
|
+
<span className="text-xl font-bold tracking-tight text-foreground dark:text-foreground">
|
|
25
25
|
扣子编程
|
|
26
26
|
</span>
|
|
27
27
|
</div>
|
|
28
28
|
|
|
29
29
|
{/* 中间内容区:主标题和副标题 */}
|
|
30
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-
|
|
31
|
+
<h1 className="max-w-xl text-4xl font-semibold leading-tight tracking-tight text-foreground dark:text-foreground">
|
|
32
32
|
扣子编程,你的 AI 开发伙伴已就位
|
|
33
33
|
</h1>
|
|
34
|
-
<p className="max-w-2xl text-lg leading-8 text-
|
|
34
|
+
<p className="max-w-2xl text-lg leading-8 text-muted-foreground dark:text-muted-foreground">
|
|
35
35
|
当前是空白入口文件,项目正在开发中,请稍候...
|
|
36
36
|
<br />
|
|
37
37
|
开发完成后界面将自动更新。如未自动更新成功,可以手动点击右上角刷新或重启按钮查看效果。
|
|
@@ -41,24 +41,36 @@ export default function Home() {
|
|
|
41
41
|
{/* 底部按钮区 */}
|
|
42
42
|
<div className="flex w-full flex-col gap-4 text-base font-medium sm:w-auto sm:flex-row">
|
|
43
43
|
{/* 按钮 1:前往首页 */}
|
|
44
|
-
<
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
44
|
+
<Button
|
|
45
|
+
asChild
|
|
46
|
+
variant="default"
|
|
47
|
+
size="lg"
|
|
48
|
+
className="h-12 min-w-[160px] rounded-full px-8"
|
|
49
49
|
>
|
|
50
|
-
|
|
51
|
-
|
|
50
|
+
<a
|
|
51
|
+
href="https://code.coze.cn/"
|
|
52
|
+
target="_blank"
|
|
53
|
+
rel="noopener noreferrer"
|
|
54
|
+
>
|
|
55
|
+
前往首页
|
|
56
|
+
</a>
|
|
57
|
+
</Button>
|
|
52
58
|
|
|
53
59
|
{/* 按钮 2:查看文档 */}
|
|
54
|
-
<
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
60
|
+
<Button
|
|
61
|
+
asChild
|
|
62
|
+
variant="outline"
|
|
63
|
+
size="lg"
|
|
64
|
+
className="h-12 min-w-[160px] rounded-full px-8"
|
|
59
65
|
>
|
|
60
|
-
|
|
61
|
-
|
|
66
|
+
<a
|
|
67
|
+
href="https://docs.coze.cn/"
|
|
68
|
+
target="_blank"
|
|
69
|
+
rel="noopener noreferrer"
|
|
70
|
+
>
|
|
71
|
+
查看文档
|
|
72
|
+
</a>
|
|
73
|
+
</Button>
|
|
62
74
|
</div>
|
|
63
75
|
</main>
|
|
64
76
|
</div>
|
|
@@ -1,46 +1,53 @@
|
|
|
1
|
-
|
|
1
|
+
'use client';
|
|
2
2
|
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
|
|
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
|
|
13
|
+
import { cn } from '@/lib/utils';
|
|
8
14
|
|
|
9
15
|
function ResizablePanelGroup({
|
|
10
16
|
className,
|
|
17
|
+
orientation = 'horizontal',
|
|
11
18
|
...props
|
|
12
|
-
}:
|
|
19
|
+
}: GroupProps) {
|
|
13
20
|
return (
|
|
14
|
-
<
|
|
21
|
+
<Group
|
|
15
22
|
data-slot="resizable-panel-group"
|
|
23
|
+
data-panel-group-direction={orientation}
|
|
24
|
+
orientation={orientation}
|
|
16
25
|
className={cn(
|
|
17
|
-
|
|
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
|
-
}:
|
|
36
|
-
withHandle?: boolean
|
|
42
|
+
}: SeparatorProps & {
|
|
43
|
+
withHandle?: boolean;
|
|
37
44
|
}) {
|
|
38
45
|
return (
|
|
39
|
-
<
|
|
46
|
+
<Separator
|
|
40
47
|
data-slot="resizable-handle"
|
|
41
48
|
className={cn(
|
|
42
|
-
|
|
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
|
-
</
|
|
53
|
-
)
|
|
59
|
+
</Separator>
|
|
60
|
+
);
|
|
54
61
|
}
|
|
55
62
|
|
|
56
|
-
export { ResizablePanelGroup, ResizablePanel, ResizableHandle }
|
|
63
|
+
export { ResizablePanelGroup, ResizablePanel, ResizableHandle };
|