@coze-arch/cli 0.0.1-alpha.bd5b49 → 0.0.1-alpha.c199b3
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/README.md +1 -0
- package/lib/__templates__/expo/README.md +16 -13
- package/lib/__templates__/expo/_npmrc +1 -0
- package/lib/__templates__/expo/client/app/+not-found.tsx +19 -4
- package/lib/__templates__/expo/client/app/_layout.tsx +17 -16
- package/lib/__templates__/expo/client/components/Screen.tsx +2 -2
- package/lib/__templates__/expo/client/constants/theme.ts +177 -0
- package/lib/__templates__/expo/client/eslint.config.mjs +7 -0
- package/lib/__templates__/expo/client/hooks/useColorScheme.tsx +48 -0
- package/lib/__templates__/expo/client/hooks/useTheme.ts +33 -0
- package/lib/__templates__/expo/client/metro.config.js +4 -8
- package/lib/__templates__/expo/client/package.json +1 -3
- package/lib/__templates__/expo/client/screens/demo/index.tsx +13 -7
- package/lib/__templates__/expo/client/screens/demo/styles.ts +28 -0
- package/lib/__templates__/expo/client/scripts/install-missing-deps.js +10 -10
- package/lib/__templates__/expo/eslint-plugins/forbid-emoji/index.js +9 -0
- package/lib/__templates__/expo/eslint-plugins/forbid-emoji/rule.js +112 -0
- package/lib/__templates__/expo/eslint-plugins/forbid-emoji/tech.md +94 -0
- package/lib/__templates__/expo/eslint-plugins/restrict-linear-gradient/index.js +9 -0
- package/lib/__templates__/expo/eslint-plugins/restrict-linear-gradient/rule.js +120 -0
- package/lib/__templates__/expo/eslint-plugins/restrict-linear-gradient/tech.md +58 -0
- package/lib/__templates__/native-static/.coze +11 -0
- package/lib/__templates__/native-static/index.html +33 -0
- package/lib/__templates__/native-static/styles/main.css +136 -0
- package/lib/__templates__/native-static/template.config.js +22 -0
- package/lib/__templates__/nextjs/AGENTS.md +54 -0
- package/lib/__templates__/nextjs/README.md +5 -0
- package/lib/__templates__/nextjs/eslint.config.mjs +5 -0
- package/lib/__templates__/nextjs/next.config.ts +1 -2
- package/lib/__templates__/nextjs/package.json +2 -5
- package/lib/__templates__/nextjs/pnpm-lock.yaml +1028 -5
- package/lib/__templates__/nextjs/scripts/build.sh +4 -1
- package/lib/__templates__/nextjs/scripts/dev.sh +8 -2
- package/lib/__templates__/nextjs/scripts/start.sh +7 -1
- package/lib/__templates__/nextjs/src/app/layout.tsx +1 -1
- package/lib/__templates__/nextjs/src/app/page.tsx +1 -2
- package/lib/__templates__/nextjs/src/server.ts +35 -0
- package/lib/__templates__/nextjs/tsconfig.json +1 -1
- package/lib/__templates__/nuxt-vue/.coze +12 -0
- package/lib/__templates__/nuxt-vue/AGENTS.md +42 -0
- package/lib/__templates__/nuxt-vue/README.md +73 -0
- package/lib/__templates__/nuxt-vue/_gitignore +24 -0
- package/lib/__templates__/nuxt-vue/_npmrc +23 -0
- package/lib/__templates__/nuxt-vue/app/app.vue +6 -0
- package/lib/__templates__/nuxt-vue/app/pages/index.vue +23 -0
- package/lib/__templates__/nuxt-vue/assets/css/main.css +24 -0
- package/lib/__templates__/nuxt-vue/nuxt.config.ts +116 -0
- package/lib/__templates__/nuxt-vue/package.json +35 -0
- package/lib/__templates__/nuxt-vue/pnpm-lock.yaml +8759 -0
- package/lib/__templates__/nuxt-vue/postcss.config.mjs +8 -0
- package/lib/__templates__/nuxt-vue/public/favicon.ico +0 -0
- package/lib/__templates__/nuxt-vue/public/robots.txt +2 -0
- package/lib/__templates__/nuxt-vue/scripts/build.sh +14 -0
- package/lib/__templates__/nuxt-vue/scripts/dev.sh +39 -0
- package/lib/__templates__/nuxt-vue/scripts/prepare.sh +14 -0
- package/lib/__templates__/nuxt-vue/scripts/start.sh +21 -0
- package/lib/__templates__/nuxt-vue/server/api/hello.ts +10 -0
- package/lib/__templates__/nuxt-vue/server/middleware/logger.ts +10 -0
- package/lib/__templates__/nuxt-vue/server/routes/health.ts +10 -0
- package/lib/__templates__/nuxt-vue/tailwind.config.js +13 -0
- package/lib/__templates__/nuxt-vue/template.config.js +87 -0
- package/lib/__templates__/nuxt-vue/tsconfig.json +18 -0
- package/lib/__templates__/taro/.cozeproj/scripts/dev_run.sh +107 -36
- package/lib/__templates__/taro/.cozeproj/scripts/pack.sh +24 -1
- package/lib/__templates__/taro/README.md +61 -45
- package/lib/__templates__/taro/config/index.ts +106 -41
- package/lib/__templates__/taro/config/prod.ts +4 -5
- package/lib/__templates__/taro/eslint.config.mjs +82 -4
- package/lib/__templates__/taro/package.json +22 -7
- package/lib/__templates__/taro/patches/@tarojs__plugin-mini-ci@4.1.9.patch +30 -0
- package/lib/__templates__/taro/pnpm-lock.yaml +924 -220
- package/lib/__templates__/taro/server/package.json +0 -1
- package/lib/__templates__/taro/src/app.css +140 -36
- package/lib/__templates__/taro/src/app.tsx +9 -0
- package/lib/__templates__/taro/src/components/ui/accordion.tsx +159 -0
- package/lib/__templates__/taro/src/components/ui/alert-dialog.tsx +260 -0
- package/lib/__templates__/taro/src/components/ui/alert.tsx +60 -0
- package/lib/__templates__/taro/src/components/ui/aspect-ratio.tsx +36 -0
- package/lib/__templates__/taro/src/components/ui/avatar.tsx +84 -0
- package/lib/__templates__/taro/src/components/ui/badge.tsx +37 -0
- package/lib/__templates__/taro/src/components/ui/breadcrumb.tsx +117 -0
- package/lib/__templates__/taro/src/components/ui/button-group.tsx +83 -0
- package/lib/__templates__/taro/src/components/ui/button.tsx +67 -0
- package/lib/__templates__/taro/src/components/ui/calendar.tsx +394 -0
- package/lib/__templates__/taro/src/components/ui/card.tsx +108 -0
- package/lib/__templates__/taro/src/components/ui/carousel.tsx +228 -0
- package/lib/__templates__/taro/src/components/ui/checkbox.tsx +58 -0
- package/lib/__templates__/taro/src/components/ui/code-block.tsx +169 -0
- package/lib/__templates__/taro/src/components/ui/collapsible.tsx +71 -0
- package/lib/__templates__/taro/src/components/ui/command.tsx +385 -0
- package/lib/__templates__/taro/src/components/ui/context-menu.tsx +614 -0
- package/lib/__templates__/taro/src/components/ui/dialog.tsx +256 -0
- package/lib/__templates__/taro/src/components/ui/drawer.tsx +192 -0
- package/lib/__templates__/taro/src/components/ui/dropdown-menu.tsx +561 -0
- package/lib/__templates__/taro/src/components/ui/field.tsx +228 -0
- package/lib/__templates__/taro/src/components/ui/hover-card.tsx +282 -0
- package/lib/__templates__/taro/src/components/ui/input-group.tsx +197 -0
- package/lib/__templates__/taro/src/components/ui/input-otp.tsx +136 -0
- package/lib/__templates__/taro/src/components/ui/input.tsx +56 -0
- package/lib/__templates__/taro/src/components/ui/label.tsx +24 -0
- package/lib/__templates__/taro/src/components/ui/menubar.tsx +595 -0
- package/lib/__templates__/taro/src/components/ui/navigation-menu.tsx +264 -0
- package/lib/__templates__/taro/src/components/ui/pagination.tsx +118 -0
- package/lib/__templates__/taro/src/components/ui/popover.tsx +291 -0
- package/lib/__templates__/taro/src/components/ui/portal.tsx +19 -0
- package/lib/__templates__/taro/src/components/ui/progress.tsx +28 -0
- package/lib/__templates__/taro/src/components/ui/radio-group.tsx +64 -0
- package/lib/__templates__/taro/src/components/ui/resizable.tsx +346 -0
- package/lib/__templates__/taro/src/components/ui/scroll-area.tsx +34 -0
- package/lib/__templates__/taro/src/components/ui/select.tsx +438 -0
- package/lib/__templates__/taro/src/components/ui/separator.tsx +30 -0
- package/lib/__templates__/taro/src/components/ui/sheet.tsx +262 -0
- package/lib/__templates__/taro/src/components/ui/skeleton.tsx +17 -0
- package/lib/__templates__/taro/src/components/ui/slider.tsx +203 -0
- package/lib/__templates__/taro/src/components/ui/sonner.tsx +1 -0
- package/lib/__templates__/taro/src/components/ui/switch.tsx +55 -0
- package/lib/__templates__/taro/src/components/ui/table.tsx +142 -0
- package/lib/__templates__/taro/src/components/ui/tabs.tsx +114 -0
- package/lib/__templates__/taro/src/components/ui/textarea.tsx +54 -0
- package/lib/__templates__/taro/src/components/ui/toast.tsx +517 -0
- package/lib/__templates__/taro/src/components/ui/toggle-group.tsx +120 -0
- package/lib/__templates__/taro/src/components/ui/toggle.tsx +77 -0
- package/lib/__templates__/taro/src/components/ui/tooltip.tsx +455 -0
- package/lib/__templates__/taro/src/lib/hooks/use-keyboard-offset.ts +37 -0
- package/lib/__templates__/taro/src/lib/measure.ts +115 -0
- package/lib/__templates__/taro/src/lib/platform.ts +12 -0
- package/lib/__templates__/taro/src/lib/utils.ts +6 -0
- package/lib/__templates__/taro/src/presets/dev-debug.ts +23 -0
- package/lib/__templates__/taro/src/presets/h5-container.tsx +15 -0
- package/lib/__templates__/taro/src/presets/h5-navbar.tsx +238 -0
- package/lib/__templates__/taro/src/presets/h5-styles.ts +220 -0
- package/lib/__templates__/taro/src/presets/index.tsx +18 -0
- package/lib/__templates__/templates.json +43 -0
- package/lib/__templates__/vite/AGENTS.md +41 -0
- package/lib/__templates__/vite/README.md +190 -11
- package/lib/__templates__/vite/_gitignore +1 -0
- package/lib/__templates__/vite/eslint.config.mjs +6 -1
- package/lib/__templates__/vite/package.json +10 -3
- package/lib/__templates__/vite/pnpm-lock.yaml +755 -15
- package/lib/__templates__/vite/scripts/build.sh +4 -1
- package/lib/__templates__/vite/scripts/dev.sh +9 -2
- package/lib/__templates__/vite/scripts/start.sh +9 -3
- package/lib/__templates__/vite/server/routes/index.ts +31 -0
- package/lib/__templates__/vite/server/server.ts +65 -0
- package/lib/__templates__/vite/server/vite.ts +67 -0
- package/lib/__templates__/vite/tsconfig.json +4 -3
- package/lib/__templates__/vite/vite.config.ts +5 -0
- package/lib/cli.js +3037 -535
- package/package.json +10 -3
- package/lib/__templates__/expo/client/global.css +0 -78
- package/lib/__templates__/expo/client/styles.css +0 -263
- package/lib/__templates__/expo/client/uniwind-types.d.ts +0 -10
- package/lib/__templates__/taro/src/app.ts +0 -14
- package/lib/__templates__/taro/src/utils/h5-styles.ts +0 -33
- package/lib/__templates__/taro/src/utils/wx-debug.ts +0 -23
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coze-arch/cli",
|
|
3
|
-
"version": "0.0.1-alpha.
|
|
3
|
+
"version": "0.0.1-alpha.c199b3",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "coze coding devtools cli",
|
|
6
6
|
"license": "MIT",
|
|
@@ -36,6 +36,7 @@
|
|
|
36
36
|
"ajv-formats": "^3.0.1",
|
|
37
37
|
"change-case": "^5.4.4",
|
|
38
38
|
"commander": "~12.1.0",
|
|
39
|
+
"debug": "^4.3.7",
|
|
39
40
|
"ejs": "^3.1.10",
|
|
40
41
|
"js-yaml": "^4.1.0",
|
|
41
42
|
"minimist": "^1.2.5",
|
|
@@ -43,6 +44,7 @@
|
|
|
43
44
|
},
|
|
44
45
|
"devDependencies": {
|
|
45
46
|
"@coze-arch/cli-logger": "workspace:*",
|
|
47
|
+
"@coze-arch/cli-slardar": "workspace:*",
|
|
46
48
|
"@coze-arch/eslint-config": "workspace:*",
|
|
47
49
|
"@coze-arch/monorepo-kits": "workspace:*",
|
|
48
50
|
"@coze-arch/rollup-config": "workspace:*",
|
|
@@ -50,6 +52,8 @@
|
|
|
50
52
|
"@coze-arch/vitest-config": "workspace:*",
|
|
51
53
|
"@coze-coding/lambda": "workspace:*",
|
|
52
54
|
"@inquirer/prompts": "^3.2.0",
|
|
55
|
+
"@playwright/test": "~1.55.0",
|
|
56
|
+
"@types/debug": "^4.1.12",
|
|
53
57
|
"@types/ejs": "^3.1.5",
|
|
54
58
|
"@types/iarna__toml": "^2.0.5",
|
|
55
59
|
"@types/js-yaml": "^4.0.9",
|
|
@@ -57,13 +61,16 @@
|
|
|
57
61
|
"@types/minimist": "^1.2.5",
|
|
58
62
|
"@types/node": "^24",
|
|
59
63
|
"@types/shelljs": "^0.10.0",
|
|
60
|
-
"@vitest/coverage-v8": "~4.0.
|
|
64
|
+
"@vitest/coverage-v8": "~4.0.18",
|
|
61
65
|
"json-schema-to-typescript": "^15.0.3",
|
|
62
66
|
"minimatch": "^10.0.1",
|
|
67
|
+
"playwright": "~1.55.0",
|
|
63
68
|
"rollup": "^4.41.1",
|
|
64
69
|
"sucrase": "^3.35.0",
|
|
70
|
+
"tree-kill": "^1.2.2",
|
|
65
71
|
"tsx": "^4.20.6",
|
|
66
|
-
"
|
|
72
|
+
"vite-tsconfig-paths": "^4.2.1",
|
|
73
|
+
"vitest": "~4.0.18"
|
|
67
74
|
},
|
|
68
75
|
"publishConfig": {
|
|
69
76
|
"access": "public",
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
@import 'tailwindcss';
|
|
2
|
-
@import 'uniwind';
|
|
3
|
-
|
|
4
|
-
@import './styles';
|
|
5
|
-
|
|
6
|
-
:root,
|
|
7
|
-
.light,
|
|
8
|
-
.default,
|
|
9
|
-
[data-theme="light"],
|
|
10
|
-
[data-theme="default"] {
|
|
11
|
-
/* Theme Colors (Light Mode) */
|
|
12
|
-
--accent: oklch(55.00% 0.2500 254.00);
|
|
13
|
-
--accent-foreground: oklch(99.11% 0 0);
|
|
14
|
-
--background: oklch(97.02% 0.0040 254.00);
|
|
15
|
-
--border: oklch(90.00% 0.0040 254.00);
|
|
16
|
-
--danger: oklch(65.32% 0.2347 25.76);
|
|
17
|
-
--danger-foreground: oklch(99.11% 0 0);
|
|
18
|
-
--default: oklch(94.00% 0.0040 254.00);
|
|
19
|
-
--default-foreground: oklch(21.03% 0.0059 254.00);
|
|
20
|
-
--field-background: oklch(100.00% 0.0020 254.00);
|
|
21
|
-
--field-foreground: oklch(21.03% 0.0059 254.00);
|
|
22
|
-
--field-placeholder: oklch(55.17% 0.0081 254.00);
|
|
23
|
-
--focus: oklch(55.00% 0.2500 254.00);
|
|
24
|
-
--foreground: oklch(21.03% 0.0059 254.00);
|
|
25
|
-
--muted: oklch(55.17% 0.0081 254.00);
|
|
26
|
-
--overlay: oklch(100.00% 0.0012 254.00);
|
|
27
|
-
--overlay-foreground: oklch(21.03% 0.0059 254.00);
|
|
28
|
-
--scrollbar: oklch(87.10% 0.0040 254.00);
|
|
29
|
-
--segment: oklch(100.00% 0.0040 254.00);
|
|
30
|
-
--segment-foreground: oklch(21.03% 0.0059 254.00);
|
|
31
|
-
--separator: oklch(92.00% 0.0040 254.00);
|
|
32
|
-
--success: oklch(73.29% 0.1951 150.83);
|
|
33
|
-
--success-foreground: oklch(21.03% 0.0059 150.83);
|
|
34
|
-
--surface: oklch(100.00% 0.0020 254.00);
|
|
35
|
-
--surface-foreground: oklch(21.03% 0.0059 254.00);
|
|
36
|
-
--warning: oklch(78.19% 0.1598 72.35);
|
|
37
|
-
--warning-foreground: oklch(21.03% 0.0059 72.35);
|
|
38
|
-
|
|
39
|
-
/* Border Radius */
|
|
40
|
-
--radius: 0.75rem;
|
|
41
|
-
--field-radius: 0.5rem;
|
|
42
|
-
|
|
43
|
-
/* Font Family */
|
|
44
|
-
/* Make sure to load Google Sans font in your app */
|
|
45
|
-
--font-sans: var(--font-google-sans);
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
.dark,
|
|
49
|
-
[data-theme="dark"] {
|
|
50
|
-
color-scheme: dark;
|
|
51
|
-
/* Theme Colors (Dark Mode) */
|
|
52
|
-
--accent: oklch(55.00% 0.2500 254.00);
|
|
53
|
-
--accent-foreground: oklch(99.11% 0 0);
|
|
54
|
-
--background: oklch(12.00% 0.0040 254.00);
|
|
55
|
-
--border: oklch(28.00% 0.0040 254.00);
|
|
56
|
-
--danger: oklch(59.40% 0.1983 24.65);
|
|
57
|
-
--danger-foreground: oklch(99.11% 0 0);
|
|
58
|
-
--default: oklch(27.40% 0.0040 254.00);
|
|
59
|
-
--default-foreground: oklch(99.11% 0 0);
|
|
60
|
-
--field-background: oklch(21.03% 0.0081 254.00);
|
|
61
|
-
--field-foreground: oklch(99.11% 0.0000 0.00);
|
|
62
|
-
--field-placeholder: oklch(70.50% 0.0081 254.00);
|
|
63
|
-
--focus: oklch(55.00% 0.2500 254.00);
|
|
64
|
-
--foreground: oklch(99.11% 0.0000 0.00);
|
|
65
|
-
--muted: oklch(70.50% 0.0081 254.00);
|
|
66
|
-
--overlay: oklch(21.03% 0.0081 254.00);
|
|
67
|
-
--overlay-foreground: oklch(99.11% 0.0000 0.00);
|
|
68
|
-
--scrollbar: oklch(70.50% 0.0040 254.00);
|
|
69
|
-
--segment: oklch(39.64% 0.0040 254.00);
|
|
70
|
-
--segment-foreground: oklch(99.11% 0.0000 0.00);
|
|
71
|
-
--separator: oklch(25.00% 0.0040 254.00);
|
|
72
|
-
--success: oklch(73.29% 0.1951 150.83);
|
|
73
|
-
--success-foreground: oklch(21.03% 0.0059 150.83);
|
|
74
|
-
--surface: oklch(21.03% 0.0081 254.00);
|
|
75
|
-
--surface-foreground: oklch(99.11% 0.0000 0.00);
|
|
76
|
-
--warning: oklch(82.03% 0.1399 76.36);
|
|
77
|
-
--warning-foreground: oklch(21.03% 0.0059 76.36);
|
|
78
|
-
}
|
|
@@ -1,263 +0,0 @@
|
|
|
1
|
-
@theme {
|
|
2
|
-
/* Primitive Colors (Do not change between light and dark) */
|
|
3
|
-
--white: oklch(100% 0 0);
|
|
4
|
-
--black: oklch(0% 0 0);
|
|
5
|
-
--snow: oklch(0.9911 0 0);
|
|
6
|
-
--eclipse: oklch(0.2103 0.0059 285.89);
|
|
7
|
-
|
|
8
|
-
/* Border */
|
|
9
|
-
--border-width: 1px;
|
|
10
|
-
--field-border-width: 0px;
|
|
11
|
-
|
|
12
|
-
/* Base radius */
|
|
13
|
-
--radius: 0.5rem;
|
|
14
|
-
--field-radius: calc(var(--radius) * 1.5);
|
|
15
|
-
|
|
16
|
-
/* Opacity */
|
|
17
|
-
--opacity-disabled: 0.5;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
@layer theme {
|
|
21
|
-
:root {
|
|
22
|
-
@variant light {
|
|
23
|
-
/* Base Colors */
|
|
24
|
-
--background: oklch(0.9702 0 0);
|
|
25
|
-
--foreground: var(--eclipse);
|
|
26
|
-
|
|
27
|
-
/* Surface: Used for non-overlay components (cards, accordions, disclosure groups) */
|
|
28
|
-
--surface: var(--white);
|
|
29
|
-
--surface-foreground: var(--foreground);
|
|
30
|
-
|
|
31
|
-
/* Overlay: Used for floating/overlay components (dialogs, popovers, modals, menus) */
|
|
32
|
-
--overlay: var(--white);
|
|
33
|
-
--overlay-foreground: var(--foreground);
|
|
34
|
-
|
|
35
|
-
--muted: oklch(0.5517 0.0138 285.94);
|
|
36
|
-
|
|
37
|
-
--default: oklch(94% 0.001 286.375);
|
|
38
|
-
--default-foreground: var(--eclipse);
|
|
39
|
-
|
|
40
|
-
--accent: oklch(0.6204 0.195 253.83);
|
|
41
|
-
--accent-foreground: var(--snow);
|
|
42
|
-
|
|
43
|
-
/* Form Fields */
|
|
44
|
-
--field-background: var(--white);
|
|
45
|
-
--field-foreground: oklch(0.2103 0.0059 285.89);
|
|
46
|
-
--field-placeholder: var(--muted);
|
|
47
|
-
--field-border: transparent; /* no border by default on form fields */
|
|
48
|
-
|
|
49
|
-
/* Status Colors */
|
|
50
|
-
--success: oklch(0.7329 0.1935 150.81);
|
|
51
|
-
--success-foreground: var(--eclipse);
|
|
52
|
-
|
|
53
|
-
--warning: oklch(0.7819 0.1585 72.33);
|
|
54
|
-
--warning-foreground: var(--eclipse);
|
|
55
|
-
|
|
56
|
-
--danger: oklch(0.6532 0.2328 25.74);
|
|
57
|
-
--danger-foreground: var(--snow);
|
|
58
|
-
|
|
59
|
-
/* Component Colors */
|
|
60
|
-
--segment: var(--white);
|
|
61
|
-
--segment-foreground: var(--eclipse);
|
|
62
|
-
|
|
63
|
-
/* Misc Colors */
|
|
64
|
-
--border: oklch(90% 0.004 286.32);
|
|
65
|
-
--separator: oklch(74% 0.004 286.32);
|
|
66
|
-
--focus: var(--accent);
|
|
67
|
-
--link: var(--foreground);
|
|
68
|
-
|
|
69
|
-
/* Shadows */
|
|
70
|
-
--surface-shadow:
|
|
71
|
-
0 2px 4px 0 rgba(0, 0, 0, 0.04), 0 1px 2px 0 rgba(0, 0, 0, 0.06),
|
|
72
|
-
0 0 1px 0 rgba(0, 0, 0, 0.06);
|
|
73
|
-
--overlay-shadow:
|
|
74
|
-
0 2px 8px 0 rgba(0, 0, 0, 0.04), 0 -6px 12px 0 rgba(0, 0, 0, 0.02),
|
|
75
|
-
0 14px 28px 0 rgba(0, 0, 0, 0.06);
|
|
76
|
-
--field-shadow:
|
|
77
|
-
0 2px 4px 0 rgba(0, 0, 0, 0.04), 0 1px 2px 0 rgba(0, 0, 0, 0.06),
|
|
78
|
-
0 0 1px 0 rgba(0, 0, 0, 0.06);
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
@variant dark {
|
|
82
|
-
/* Base Colors */
|
|
83
|
-
--background: oklch(12% 0.005 285.823);
|
|
84
|
-
--foreground: var(--snow);
|
|
85
|
-
|
|
86
|
-
/* Surface: Used for non-overlay components (cards, accordions, disclosure groups) */
|
|
87
|
-
--surface: oklch(0.2103 0.0059 285.89);
|
|
88
|
-
--surface-foreground: var(--foreground);
|
|
89
|
-
|
|
90
|
-
/* Overlay: Used for floating/overlay components (dialogs, popovers, modals, menus) - lighter for contrast */
|
|
91
|
-
--overlay: oklch(0.2103 0.0059 285.89);
|
|
92
|
-
--overlay-foreground: var(--foreground);
|
|
93
|
-
|
|
94
|
-
--muted: oklch(70.5% 0.015 286.067);
|
|
95
|
-
|
|
96
|
-
--default: oklch(27.4% 0.006 286.033);
|
|
97
|
-
--default-foreground: var(--snow);
|
|
98
|
-
|
|
99
|
-
--accent: oklch(0.6204 0.195 253.83);
|
|
100
|
-
--accent-foreground: var(--snow);
|
|
101
|
-
|
|
102
|
-
/* Form Field Defaults - Colors (only the ones that are different from light theme) */
|
|
103
|
-
--field-background: oklch(0.2103 0.0059 285.89);
|
|
104
|
-
--field-foreground: var(--foreground);
|
|
105
|
-
--field-placeholder: var(--muted);
|
|
106
|
-
--field-border: transparent; /* no border by default on form fields */
|
|
107
|
-
|
|
108
|
-
/* Status Colors */
|
|
109
|
-
--success: oklch(0.7329 0.1935 150.81);
|
|
110
|
-
--success-foreground: var(--eclipse);
|
|
111
|
-
|
|
112
|
-
--warning: oklch(0.8203 0.1388 76.34);
|
|
113
|
-
--warning-foreground: var(--eclipse);
|
|
114
|
-
|
|
115
|
-
--danger: oklch(0.594 0.1967 24.63);
|
|
116
|
-
--danger-foreground: var(--snow);
|
|
117
|
-
|
|
118
|
-
/* Component Colors */
|
|
119
|
-
--segment: oklch(0.3964 0.01 285.93);
|
|
120
|
-
--segment-foreground: var(--foreground);
|
|
121
|
-
|
|
122
|
-
/* Misc Colors */
|
|
123
|
-
--border: oklch(28% 0.006 286.033);
|
|
124
|
-
--separator: oklch(40% 0.006 286.033);
|
|
125
|
-
--focus: var(--accent);
|
|
126
|
-
--link: var(--foreground);
|
|
127
|
-
|
|
128
|
-
/* Shadows */
|
|
129
|
-
--surface-shadow: 0 0 0 0 transparent inset; /* No shadow on dark mode */
|
|
130
|
-
--overlay-shadow: 0 0 1px 0 rgba(255, 255, 255, 0.2) inset;
|
|
131
|
-
--field-shadow: 0 0 0 0 transparent inset; /* Transparent shadow to allow ring utilities to work */
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
@theme inline static {
|
|
137
|
-
--color-background: var(--background);
|
|
138
|
-
--color-foreground: var(--foreground);
|
|
139
|
-
|
|
140
|
-
--color-surface: var(--surface);
|
|
141
|
-
--color-surface-foreground: var(--surface-foreground);
|
|
142
|
-
--color-surface-hover: color-mix(in oklab, var(--surface) 92%, var(--surface-foreground) 8%);
|
|
143
|
-
|
|
144
|
-
--color-overlay: var(--overlay);
|
|
145
|
-
--color-overlay-foreground: var(--overlay-foreground);
|
|
146
|
-
|
|
147
|
-
--color-muted: var(--muted);
|
|
148
|
-
|
|
149
|
-
--color-accent: var(--accent);
|
|
150
|
-
--color-accent-foreground: var(--accent-foreground);
|
|
151
|
-
|
|
152
|
-
--color-segment: var(--segment);
|
|
153
|
-
--color-segment-foreground: var(--segment-foreground);
|
|
154
|
-
|
|
155
|
-
--color-border: var(--border);
|
|
156
|
-
--color-separator: var(--separator);
|
|
157
|
-
--color-focus: var(--focus);
|
|
158
|
-
--color-link: var(--link);
|
|
159
|
-
|
|
160
|
-
--color-default: var(--default);
|
|
161
|
-
--color-default-foreground: var(--default-foreground);
|
|
162
|
-
|
|
163
|
-
--color-success: var(--success);
|
|
164
|
-
--color-success-foreground: var(--success-foreground);
|
|
165
|
-
|
|
166
|
-
--color-warning: var(--warning);
|
|
167
|
-
--color-warning-foreground: var(--warning-foreground);
|
|
168
|
-
|
|
169
|
-
--color-danger: var(--danger);
|
|
170
|
-
--color-danger-foreground: var(--danger-foreground);
|
|
171
|
-
|
|
172
|
-
/* Form Field Tokens */
|
|
173
|
-
--color-field: var(--field-background, var(--default));
|
|
174
|
-
--color-field-foreground: var(--field-foreground, var(--foreground));
|
|
175
|
-
--color-field-placeholder: var(--field-placeholder, var(--muted));
|
|
176
|
-
--color-field-border: var(--field-border, var(--border));
|
|
177
|
-
--radius-field: var(--field-radius, var(--radius-xl));
|
|
178
|
-
--border-width-field: var(--field-border-width, var(--border-width));
|
|
179
|
-
|
|
180
|
-
--shadow-surface: var(--surface-shadow);
|
|
181
|
-
--shadow-overlay: var(--overlay-shadow);
|
|
182
|
-
--shadow-field: var(--field-shadow);
|
|
183
|
-
|
|
184
|
-
/* Calculated Variables */
|
|
185
|
-
|
|
186
|
-
/* Colors */
|
|
187
|
-
|
|
188
|
-
/* --- background shades --- */
|
|
189
|
-
--color-background-secondary: color-mix(in oklab, var(--background) 96%, var(--foreground) 4%);
|
|
190
|
-
--color-background-tertiary: color-mix(in oklab, var(--background) 92%, var(--foreground) 8%);
|
|
191
|
-
--color-background-inverse: var(--foreground);
|
|
192
|
-
|
|
193
|
-
/* ------------------------- */
|
|
194
|
-
--color-default-hover: color-mix(in oklab, var(--default) 96%, var(--default-foreground) 4%);
|
|
195
|
-
--color-accent-hover: color-mix(in oklab, var(--accent) 90%, var(--accent-foreground) 10%);
|
|
196
|
-
--color-success-hover: color-mix(in oklab, var(--success) 90%, var(--success-foreground) 10%);
|
|
197
|
-
--color-warning-hover: color-mix(in oklab, var(--warning) 90%, var(--warning-foreground) 10%);
|
|
198
|
-
--color-danger-hover: color-mix(in oklab, var(--danger) 90%, var(--danger-foreground) 10%);
|
|
199
|
-
|
|
200
|
-
/* Form Field Colors */
|
|
201
|
-
--color-field-hover: color-mix(in oklab, var(--field-background, var(--default)) 90%, var(--field-foreground, var(--foreground)) 2%);
|
|
202
|
-
--color-field-focus: var(--field-background, var(--default));
|
|
203
|
-
--color-field-border-hover: color-mix(in oklab, var(--field-border, var(--border)) 88%, var(--field-foreground, var(--foreground)) 10%);
|
|
204
|
-
--color-field-border-focus: color-mix(in oklab, var(--field-border, var(--border)) 74%, var(--field-foreground, var(--foreground)) 22%);
|
|
205
|
-
|
|
206
|
-
/* Soft Colors */
|
|
207
|
-
--color-accent-soft: color-mix(in oklab, var(--accent) 15%, transparent);
|
|
208
|
-
--color-accent-soft-foreground: var(--accent);
|
|
209
|
-
--color-accent-soft-hover: color-mix(in oklab, var(--accent) 20%, transparent);
|
|
210
|
-
|
|
211
|
-
--color-danger-soft: color-mix(in oklab, var(--danger) 15%, transparent);
|
|
212
|
-
--color-danger-soft-foreground: var(--danger);
|
|
213
|
-
--color-danger-soft-hover: color-mix(in oklab, var(--danger) 20%, transparent);
|
|
214
|
-
|
|
215
|
-
--color-warning-soft: color-mix(in oklab, var(--warning) 15%, transparent);
|
|
216
|
-
--color-warning-soft-foreground: var(--warning);
|
|
217
|
-
--color-warning-soft-hover: color-mix(in oklab, var(--warning) 20%, transparent);
|
|
218
|
-
|
|
219
|
-
--color-success-soft: color-mix(in oklab, var(--success) 15%, transparent);
|
|
220
|
-
--color-success-soft-foreground: var(--success);
|
|
221
|
-
--color-success-soft-hover: color-mix(in oklab, var(--success) 20%, transparent);
|
|
222
|
-
|
|
223
|
-
/* Surface Levels - progressively darker/lighter shades for layering */
|
|
224
|
-
--color-surface-secondary: color-mix(in oklab, var(--surface) 94%, var(--surface-foreground) 6%);
|
|
225
|
-
--color-surface-tertiary: color-mix(in oklab, var(--surface) 92%, var(--surface-foreground) 8%);
|
|
226
|
-
|
|
227
|
-
/* On Surface Colors */
|
|
228
|
-
--color-on-surface: color-mix(in oklab, var(--surface) 93%, var(--surface-foreground) 7%);
|
|
229
|
-
--color-on-surface-foreground: var(--surface-foreground);
|
|
230
|
-
--color-on-surface-hover: color-mix(in oklab, var(--surface) 91%, var(--surface-foreground) 9%);
|
|
231
|
-
--color-on-surface-focus: color-mix(in oklab, var(--surface) 93%, var(--surface-foreground) 7%);
|
|
232
|
-
|
|
233
|
-
/* On Surface Colors - Secondary (on secondary surface) */
|
|
234
|
-
--color-on-surface-secondary: color-mix(in oklab, var(--surface) 87%, var(--surface-foreground) 13%);
|
|
235
|
-
--color-on-surface-secondary-foreground: var(--surface-foreground);
|
|
236
|
-
--color-on-surface-secondary-hover: color-mix(in oklab, var(--surface) 85%, var(--surface-foreground) 15%);
|
|
237
|
-
--color-on-surface-secondary-focus: color-mix(in oklab, var(--surface) 87%, var(--surface-foreground) 13%);
|
|
238
|
-
|
|
239
|
-
/* On Surface Colors - Tertiary (on tertiary surface) */
|
|
240
|
-
--color-on-surface-tertiary: color-mix(in oklab, var(--surface) 85%, var(--surface-foreground) 15%);
|
|
241
|
-
--color-on-surface-tertiary-foreground: var(--surface-foreground);
|
|
242
|
-
--color-on-surface-tertiary-hover: color-mix(in oklab, var(--surface) 84%, var(--surface-foreground) 16%);
|
|
243
|
-
--color-on-surface-tertiary-focus: color-mix(in oklab, var(--surface) 85%, var(--surface-foreground) 15%);
|
|
244
|
-
|
|
245
|
-
/* Separator Colors - Levels */
|
|
246
|
-
--color-separator-secondary: color-mix(in oklab, var(--surface) 85%, var(--surface-foreground) 15%);
|
|
247
|
-
--color-separator-tertiary: color-mix(in oklab, var(--surface) 81%, var(--surface-foreground) 19%);
|
|
248
|
-
|
|
249
|
-
/* Border Colors - Levels (progressive contrast: default → secondary → tertiary) */
|
|
250
|
-
/* Light mode: lighter → darker | Dark mode: darker → lighter */
|
|
251
|
-
--color-border-secondary: color-mix(in oklab, var(--surface) 78%, var(--surface-foreground) 22%);
|
|
252
|
-
--color-border-tertiary: color-mix(in oklab, var(--surface) 66%, var(--surface-foreground) 34%);
|
|
253
|
-
|
|
254
|
-
/* Radius and default sizes - defaults can change by just changing the --radius */
|
|
255
|
-
--radius-xs: calc(var(--radius) * 0.25); /* 0.125rem (2px) */
|
|
256
|
-
--radius-sm: calc(var(--radius) * 0.5); /* 0.25rem (4px) */
|
|
257
|
-
--radius-md: calc(var(--radius) * 0.75); /* 0.375rem (6px) */
|
|
258
|
-
--radius-lg: calc(var(--radius) * 1); /* 0.5rem (8px) */
|
|
259
|
-
--radius-xl: calc(var(--radius) * 1.5); /* 0.75rem (12px) */
|
|
260
|
-
--radius-2xl: calc(var(--radius) * 2); /* 1rem (16px) */
|
|
261
|
-
--radius-3xl: calc(var(--radius) * 3); /* 1.5rem (24px) */
|
|
262
|
-
--radius-4xl: calc(var(--radius) * 4); /* 2rem (32px) */
|
|
263
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { PropsWithChildren } from 'react';
|
|
2
|
-
import { useLaunch } from '@tarojs/taro';
|
|
3
|
-
import { injectH5Styles } from '@/utils/h5-styles';
|
|
4
|
-
import { enableWxDebugIfNeeded } from '@/utils/wx-debug';
|
|
5
|
-
import '@/app.css';
|
|
6
|
-
|
|
7
|
-
export default ({ children }: PropsWithChildren<any>) => {
|
|
8
|
-
useLaunch(() => {
|
|
9
|
-
enableWxDebugIfNeeded();
|
|
10
|
-
injectH5Styles();
|
|
11
|
-
});
|
|
12
|
-
|
|
13
|
-
return children;
|
|
14
|
-
};
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* H5 端特殊样式注入
|
|
3
|
-
* 如无必要,请勿修改本文件
|
|
4
|
-
*/
|
|
5
|
-
export function injectH5Styles() {
|
|
6
|
-
if (TARO_ENV !== 'h5') return;
|
|
7
|
-
|
|
8
|
-
const style = document.createElement('style');
|
|
9
|
-
style.innerHTML = `
|
|
10
|
-
/* H5 端隐藏 TabBar 空图标(只隐藏没有 src 的图标) */
|
|
11
|
-
.weui-tabbar__icon:not([src]),
|
|
12
|
-
.weui-tabbar__icon[src=''] {
|
|
13
|
-
display: none !important;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
.weui-tabbar__item:has(.weui-tabbar__icon:not([src])) .weui-tabbar__label,
|
|
17
|
-
.weui-tabbar__item:has(.weui-tabbar__icon[src='']) .weui-tabbar__label {
|
|
18
|
-
margin-top: 0 !important;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
/* Vite 错误覆盖层无法选择文本的问题 */
|
|
22
|
-
vite-error-overlay {
|
|
23
|
-
/* stylelint-disable-next-line property-no-vendor-prefix */
|
|
24
|
-
-webkit-user-select: text !important;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
vite-error-overlay::part(window) {
|
|
28
|
-
max-width: 90vw;
|
|
29
|
-
padding: 10px;
|
|
30
|
-
}
|
|
31
|
-
`;
|
|
32
|
-
document.head.appendChild(style);
|
|
33
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import Taro from '@tarojs/taro'
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* 微信小程序调试工具
|
|
5
|
-
* 在开发版/体验版自动开启调试模式
|
|
6
|
-
*/
|
|
7
|
-
export function enableWxDebugIfNeeded() {
|
|
8
|
-
// 仅在微信小程序环境执行
|
|
9
|
-
if (Taro.getEnv() === Taro.ENV_TYPE.WEAPP) {
|
|
10
|
-
try {
|
|
11
|
-
const accountInfo = Taro.getAccountInfoSync()
|
|
12
|
-
const envVersion = accountInfo.miniProgram.envVersion
|
|
13
|
-
console.log('[Debug] envVersion:', envVersion)
|
|
14
|
-
|
|
15
|
-
// 开发版/体验版自动开启调试
|
|
16
|
-
if (envVersion !== 'release') {
|
|
17
|
-
Taro.setEnableDebug({ enableDebug: true })
|
|
18
|
-
}
|
|
19
|
-
} catch (error) {
|
|
20
|
-
console.error('[Debug] 开启调试模式失败:', error)
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
}
|