@varlet/cli 2.22.3 → 3.0.0-alpha.1707916363117
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 +30 -18
- package/README.zh-CN.md +16 -4
- package/lib/client/index.d.ts +3 -2
- package/lib/client/index.js +20 -11
- package/lib/node/bin.js +7 -0
- package/lib/node/commands/styleVars.d.ts +1 -0
- package/lib/node/commands/styleVars.js +6 -0
- package/lib/node/config/varlet.config.d.ts +4 -0
- package/lib/node/config/varlet.default.config.js +121 -9
- package/lib/node/index.d.ts +1 -0
- package/lib/node/index.js +1 -0
- package/package.json +9 -9
- package/site/mobile/App.vue +63 -23
- package/site/pc/Layout.vue +7 -1
- package/site/pc/components/AppHeader.vue +78 -35
- package/site/pc/components/code-example/CodeExample.vue +1 -1
- package/site/pc/components/code-example/codeExample.less +1 -1
- package/site/pc/pages/index/index.vue +10 -9
- package/site/utils.ts +0 -6
- package/template/create/example/locale/_index.ts +4 -4
- package/template/create/example/locale/index.ts +4 -4
- package/template/generators/config/i18n/base/types/locale.d.ts +14 -10
- package/template/generators/config/i18n/sfc/src/button/example/BasicUse.vue +2 -2
- package/template/generators/config/i18n/sfc/src/button/example/ModifyColor.vue +2 -2
- package/template/generators/config/i18n/sfc/src/button/example/index.vue +5 -5
- package/template/generators/config/i18n/sfc/src/button/example/locale/index.ts +4 -4
- package/template/generators/config/i18n/sfc/src/locale/index.ts +31 -21
- package/template/generators/config/i18n/tsx/src/button/example/BasicUse.vue +2 -2
- package/template/generators/config/i18n/tsx/src/button/example/ModifyColor.vue +2 -2
- package/template/generators/config/i18n/tsx/src/button/example/index.vue +5 -5
- package/template/generators/config/i18n/tsx/src/button/example/locale/index.ts +4 -4
- package/template/generators/config/i18n/tsx/src/locale/index.ts +33 -21
package/README.md
CHANGED
|
@@ -16,7 +16,7 @@ The out-of-the-box `Vue3 component library` rapid prototyping tool provides a se
|
|
|
16
16
|
- 💪 Support for `VSCode` extension development
|
|
17
17
|
- 💪 Support `build svg to web fonts`
|
|
18
18
|
- 💪 Support for `Typescript`
|
|
19
|
-
- 💪 Support `
|
|
19
|
+
- 💪 Support `Various themes, including md2, md3, dark mode`
|
|
20
20
|
- 🌍 Support `Internationalization`
|
|
21
21
|
- 🚀 Based on `pnpm`
|
|
22
22
|
|
|
@@ -40,30 +40,35 @@ The default configuration can be viewed [varlet.default.config.ts](https://githu
|
|
|
40
40
|
Also refer to `@varlet/ui` [varlet.config.mjs](https://github.com/varletjs/varlet/blob/dev/packages/varlet-ui/varlet.config.mjs).
|
|
41
41
|
|
|
42
42
|
| Parameter | Description | Type | Default |
|
|
43
|
-
|
|
|
43
|
+
| --- | -------------- | -------- | ---------- |
|
|
44
44
|
| `name` | The full name of the component library, which will be used as the package name | _string_ | `Varlet` |
|
|
45
|
-
| `namespace` | Component library namespace,
|
|
45
|
+
| `namespace` | Component library namespace, will be used as component prefix | _string_ | `var` |
|
|
46
46
|
| `host` | Development server host | _number_ | `localhost` |
|
|
47
47
|
| `port` | Development server port | _number_ | `8080` |
|
|
48
|
-
| `title` | The title of the component library in the
|
|
49
|
-
| `logo` | The logo of the component library in the
|
|
50
|
-
| `defaultLanguage` |
|
|
51
|
-
| `
|
|
52
|
-
| `
|
|
53
|
-
| `
|
|
54
|
-
| `
|
|
48
|
+
| `title` | The title of the component library in the document | _string_ | `VARLET` |
|
|
49
|
+
| `logo` | The logo of the component library in the document | _string_ | `-` |
|
|
50
|
+
| `defaultLanguage` | Document default language | _string_ | `zh-CN` |
|
|
51
|
+
| `defaultLightTheme` | The default light theme | _string_ | `md3LightTheme` |
|
|
52
|
+
| `defaultDarkTheme` | The default dark theme | _string_ | `md3DarkTheme` |
|
|
53
|
+
| `useMobile` | Whether to display the mobile phone preview on the right | _boolean_ | `false` |
|
|
54
|
+
| `themeKey` | The key of the theme in local storage | _string_ | `VARLET_THEME` |
|
|
55
|
+
| `lightTheme` | md2 light mode document theme | _Record<string, any>_ | `-` |
|
|
56
|
+
| `darkTheme` | md2 dark mode document theme | _Record<string, any>_ | `-` |
|
|
57
|
+
| `md3LightTheme` | md3 light mode document theme | _Record<string, any>_ | `-` |
|
|
58
|
+
| `md3DarkTheme` | md3 dark mode document theme | _Record<string, any>_ | `-` |
|
|
59
|
+
| `highlight` | Document code snippet style related | _{ style: string }_ | `-` |
|
|
55
60
|
| `analysis` | Document statistics related | _{ baidu: string }_ | `-` |
|
|
56
|
-
| `pc` | PC
|
|
57
|
-
| `mobile` | Mobile
|
|
58
|
-
| `directives` |
|
|
59
|
-
| `copy` | Copy file
|
|
60
|
-
| `icons` | Font icon packaging related
|
|
61
|
-
| `esbuild` |
|
|
61
|
+
| `pc` | PC side document structure configuration | _Record<string, any>_ | `-` |
|
|
62
|
+
| `mobile` | Mobile document structure configuration | _Record<string, any>_ | `-` |
|
|
63
|
+
| `directives` | Component library directive folder name | _string[]_ | `[]` |
|
|
64
|
+
| `copy` | Copy file configuration | _[CopyPath[]](https://github.com/varletjs/varlet/blob/dev/packages/varlet-vite-plugins/src/copy.ts)_ | `- ` |
|
|
65
|
+
| `icons` | Font icon packaging related configurations | _[VarletConfigIcons](https://github.com/varletjs/varlet/blob/dev/packages/varlet-cli/src/node/config/varlet.config.ts) _ | `-` |
|
|
66
|
+
| `esbuild` | esbuild configuration | _[VarletConfigEsbuild](https://github.com/varletjs/varlet/blob/dev/packages/varlet-cli/src/node/config/varlet.config.ts)_ | ` -` |
|
|
62
67
|
|
|
63
68
|
#### Menu
|
|
64
69
|
|
|
65
|
-
|
|
|
66
|
-
|
|
|
70
|
+
| Parameter | Description | Type | Default |
|
|
71
|
+
| --- | -------------- | -------- | ---------- |
|
|
67
72
|
| `doc` | The document page corresponds to the matching file name, required | _string_ | `-` |
|
|
68
73
|
| `type` | The type of menu, when the type is `1`, it means the category menu, when the type is `2`, the doc field matches the component file under src, when the type is `3`, the doc field matches the md file under docs, required | _MenuTypes_ | `-` |
|
|
69
74
|
| `text` | The text displayed in the menu, English display text can be configured when internationalization is set, required | _Record<string, string>_ | `-` |
|
|
@@ -138,6 +143,13 @@ varlet-cli preview
|
|
|
138
143
|
varlet-cli compile
|
|
139
144
|
```
|
|
140
145
|
|
|
146
|
+
#### Compile style vars types declaration file
|
|
147
|
+
|
|
148
|
+
```shell
|
|
149
|
+
# playground-ignore
|
|
150
|
+
varlet-cli compile:style-vars
|
|
151
|
+
```
|
|
152
|
+
|
|
141
153
|
#### Run VSCode extension development environment
|
|
142
154
|
|
|
143
155
|
```shell
|
package/README.zh-CN.md
CHANGED
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
- 💪 支持 `VSCode` 插件开发
|
|
17
17
|
- 💪 支持 `字体图标打包`
|
|
18
18
|
- 💪 支持 `Typescript`
|
|
19
|
-
- 💪 支持
|
|
19
|
+
- 💪 支持 `多种主题, 包含 md2、md3、暗黑模式`
|
|
20
20
|
- 🌍 支持 `国际化`
|
|
21
21
|
- 🚀 基于 `pnpm`
|
|
22
22
|
|
|
@@ -48,9 +48,14 @@ varlet-cli gen
|
|
|
48
48
|
| `title` | 文档中组件库的标题 | _string_ | `VARLET` |
|
|
49
49
|
| `logo` | 文档中组件库的logo | _string_ | `-` |
|
|
50
50
|
| `defaultLanguage` | 文档默认语言 | _string_ | `zh-CN` |
|
|
51
|
+
| `defaultLightTheme` | 默认的亮色主题 | _string_ | `md3LightTheme` |
|
|
52
|
+
| `defaultDarkTheme` | 默认的暗色主题 | _string_ | `md3DarkTheme` |
|
|
51
53
|
| `useMobile` | 是否显示右侧手机预览 | _boolean_ | `false` |
|
|
52
|
-
| `
|
|
53
|
-
| `
|
|
54
|
+
| `themeKey` | 主题在本地存储中的 key | _string_ | `VARLET_THEME` |
|
|
55
|
+
| `lightTheme` | md2 亮色模式文档主题 | _Record<string, any>_ | `-` |
|
|
56
|
+
| `darkTheme` | md2 暗黑模式文档主题 | _Record<string, any>_ | `-` |
|
|
57
|
+
| `md3LightTheme` | md3 亮色模式文档主题 | _Record<string, any>_ | `-` |
|
|
58
|
+
| `md3DarkTheme` | md3 暗黑模式文档主题 | _Record<string, any>_ | `-` |
|
|
54
59
|
| `highlight` | 文档代码片段样式相关 | _{ style: string }_ | `-` |
|
|
55
60
|
| `analysis` | 文档统计相关 | _{ baidu: string }_ | `-` |
|
|
56
61
|
| `pc` | pc 端文档结构配置 | _Record<string, any>_ | `-` |
|
|
@@ -58,7 +63,7 @@ varlet-cli gen
|
|
|
58
63
|
| `directives` | 组件库指令文件夹名称 | _string[]_ | `[]` |
|
|
59
64
|
| `copy` | 复制文件配置 | _[CopyPath[]](https://github.com/varletjs/varlet/blob/dev/packages/varlet-vite-plugins/src/copy.ts)_ | `-` |
|
|
60
65
|
| `icons` | 字体图标打包相关配置 | _[VarletConfigIcons](https://github.com/varletjs/varlet/blob/dev/packages/varlet-cli/src/node/config/varlet.config.ts)_ | `-` |
|
|
61
|
-
| `esbuild` |
|
|
66
|
+
| `esbuild` | esbuild 配置 | _[VarletConfigEsbuild](https://github.com/varletjs/varlet/blob/dev/packages/varlet-cli/src/node/config/varlet.config.ts)_ | `-` |
|
|
62
67
|
|
|
63
68
|
#### Menu
|
|
64
69
|
|
|
@@ -137,6 +142,13 @@ varlet-cli preview
|
|
|
137
142
|
varlet-cli compile
|
|
138
143
|
```
|
|
139
144
|
|
|
145
|
+
#### 构建样式变量类型声明文件
|
|
146
|
+
|
|
147
|
+
```shell
|
|
148
|
+
# playground-ignore
|
|
149
|
+
varlet-cli compile:style-vars
|
|
150
|
+
```
|
|
151
|
+
|
|
140
152
|
#### 启动 VSCode 插件开发环境
|
|
141
153
|
|
|
142
154
|
```shell
|
package/lib/client/index.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ interface PCLocationInfo {
|
|
|
5
5
|
menuName: string;
|
|
6
6
|
hash: string;
|
|
7
7
|
}
|
|
8
|
-
export type Theme = 'lightTheme' | 'darkTheme';
|
|
8
|
+
export type Theme = 'lightTheme' | 'darkTheme' | 'md3LightTheme' | 'md3DarkTheme';
|
|
9
9
|
export type StyleVars = Record<string, string>;
|
|
10
10
|
export declare function getPCLocationInfo(): PCLocationInfo;
|
|
11
11
|
export declare function getBrowserTheme(): Theme;
|
|
@@ -13,7 +13,8 @@ export declare function watchLang(cb: (lang: string) => void, platform?: 'pc' |
|
|
|
13
13
|
export declare function withSiteConfigNamespace(styleVars: Record<string, any>): StyleVars;
|
|
14
14
|
export declare function watchPlatform(cb: (platform: string) => void): void;
|
|
15
15
|
export declare function useRouteListener(cb: () => void): void;
|
|
16
|
-
export declare function
|
|
16
|
+
export declare function setTheme(theme: Theme): void;
|
|
17
|
+
export declare function onThemeChange(cb?: (theme: Theme) => void): void;
|
|
17
18
|
export declare function getSiteStyleVars(theme: Theme): StyleVars;
|
|
18
19
|
export declare function setColorScheme(theme: Theme): void;
|
|
19
20
|
export declare function watchTheme(cb: (theme: Theme, from: 'pc' | 'mobile' | 'default' | 'playground') => void, shouldUnmount?: boolean): void;
|
package/lib/client/index.js
CHANGED
|
@@ -19,13 +19,13 @@ function getHashSearch() {
|
|
|
19
19
|
}
|
|
20
20
|
export function getBrowserTheme() {
|
|
21
21
|
const themeKey = get(config, 'themeKey');
|
|
22
|
-
const
|
|
23
|
-
|
|
24
|
-
return 'lightTheme';
|
|
25
|
-
}
|
|
22
|
+
const defaultLightTheme = get(config, 'defaultLightTheme');
|
|
23
|
+
const defaultDarkTheme = get(config, 'defaultDarkTheme');
|
|
26
24
|
const storageTheme = window.localStorage.getItem(themeKey);
|
|
27
25
|
if (!storageTheme) {
|
|
28
|
-
const preferTheme = window.matchMedia?.('(prefers-color-scheme: dark)').matches
|
|
26
|
+
const preferTheme = window.matchMedia?.('(prefers-color-scheme: dark)').matches
|
|
27
|
+
? defaultDarkTheme
|
|
28
|
+
: defaultLightTheme;
|
|
29
29
|
window.localStorage.setItem(themeKey, preferTheme);
|
|
30
30
|
return preferTheme;
|
|
31
31
|
}
|
|
@@ -63,12 +63,21 @@ export function useRouteListener(cb) {
|
|
|
63
63
|
window.removeEventListener('popstate', cb);
|
|
64
64
|
});
|
|
65
65
|
}
|
|
66
|
-
|
|
66
|
+
const themeMap = {
|
|
67
|
+
lightTheme: null,
|
|
68
|
+
darkTheme: Themes.dark,
|
|
69
|
+
md3LightTheme: Themes.md3Light,
|
|
70
|
+
md3DarkTheme: Themes.md3Dark,
|
|
71
|
+
};
|
|
72
|
+
export function setTheme(theme) {
|
|
73
|
+
const siteStyleVars = withSiteConfigNamespace(get(config, theme, {}));
|
|
74
|
+
const styleVars = { ...siteStyleVars, ...(themeMap[theme] ?? {}) };
|
|
75
|
+
StyleProvider(styleVars);
|
|
76
|
+
setColorScheme(theme);
|
|
77
|
+
}
|
|
78
|
+
export function onThemeChange(cb) {
|
|
67
79
|
watchTheme((theme) => {
|
|
68
|
-
|
|
69
|
-
const darkStyleVars = { ...siteStyleVars, ...Themes.dark, ...dark };
|
|
70
|
-
StyleProvider(theme === 'darkTheme' ? darkStyleVars : siteStyleVars);
|
|
71
|
-
setColorScheme(theme);
|
|
80
|
+
setTheme(theme);
|
|
72
81
|
cb?.(theme);
|
|
73
82
|
});
|
|
74
83
|
}
|
|
@@ -76,7 +85,7 @@ export function getSiteStyleVars(theme) {
|
|
|
76
85
|
return withSiteConfigNamespace(get(config, theme, {}));
|
|
77
86
|
}
|
|
78
87
|
export function setColorScheme(theme) {
|
|
79
|
-
document.documentElement.style.setProperty('color-scheme', theme
|
|
88
|
+
document.documentElement.style.setProperty('color-scheme', theme.toLowerCase().includes('dark') ? 'dark' : 'light');
|
|
80
89
|
}
|
|
81
90
|
export function watchTheme(cb, shouldUnmount = true) {
|
|
82
91
|
const handleThemeChange = (event) => {
|
package/lib/node/bin.js
CHANGED
|
@@ -68,6 +68,13 @@ program
|
|
|
68
68
|
const { compile } = await import('./commands/compile.js');
|
|
69
69
|
return compile();
|
|
70
70
|
});
|
|
71
|
+
program
|
|
72
|
+
.command('compile:style-vars')
|
|
73
|
+
.description('Compile varlet style vars')
|
|
74
|
+
.action(async () => {
|
|
75
|
+
const { styleVars } = await import('./commands/styleVars.js');
|
|
76
|
+
return styleVars();
|
|
77
|
+
});
|
|
71
78
|
program
|
|
72
79
|
.command('lint')
|
|
73
80
|
.description('Lint code')
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function styleVars(): void;
|
|
@@ -70,6 +70,10 @@ export interface VarletConfig {
|
|
|
70
70
|
useMobile?: boolean;
|
|
71
71
|
lightTheme?: Record<string, string>;
|
|
72
72
|
darkTheme?: Record<string, string>;
|
|
73
|
+
md3LightTheme?: Record<string, string>;
|
|
74
|
+
md3DarkTheme?: Record<string, string>;
|
|
75
|
+
defaultLightTheme?: 'lightTheme' | 'md3LightTheme';
|
|
76
|
+
defaultDarkTheme?: 'darkTheme' | 'md3DarkTheme';
|
|
73
77
|
highlight?: {
|
|
74
78
|
style: string;
|
|
75
79
|
};
|
|
@@ -450,7 +450,12 @@ export default defineConfig({
|
|
|
450
450
|
github: 'https://github.com/varletjs/varlet',
|
|
451
451
|
changelog: 'https://github.com/varletjs/varlet/blob/main/CHANGELOG.md',
|
|
452
452
|
playground: 'https://varlet.gitee.io/varlet-ui-playground',
|
|
453
|
-
|
|
453
|
+
themes: [
|
|
454
|
+
{ 'zh-CN': 'Md2 亮色', 'en-US': 'Md2 Light', value: 'lightTheme' },
|
|
455
|
+
{ 'zh-CN': 'Md2 暗色', 'en-US': 'Md2 Dark', value: 'darkTheme' },
|
|
456
|
+
{ 'zh-CN': 'Md3 亮色', 'en-US': 'Md3 Light', value: 'md3LightTheme' },
|
|
457
|
+
{ 'zh-CN': 'Md3 暗色', 'en-US': 'Md3 Dark', value: 'md3DarkTheme' },
|
|
458
|
+
],
|
|
454
459
|
},
|
|
455
460
|
clipboard: {
|
|
456
461
|
'zh-CN': '代码已复制到剪切板',
|
|
@@ -472,21 +477,27 @@ export default defineConfig({
|
|
|
472
477
|
'en-US': 'English',
|
|
473
478
|
},
|
|
474
479
|
github: 'https://github.com/varletjs/varlet',
|
|
475
|
-
|
|
480
|
+
themes: [
|
|
481
|
+
{ 'zh-CN': 'Md2 亮色', 'en-US': 'Md2 Light', value: 'lightTheme' },
|
|
482
|
+
{ 'zh-CN': 'Md2 暗色', 'en-US': 'Md2 Dark', value: 'darkTheme' },
|
|
483
|
+
{ 'zh-CN': 'Md3 亮色', 'en-US': 'Md3 Light', value: 'md3LightTheme' },
|
|
484
|
+
{ 'zh-CN': 'Md3 暗色', 'en-US': 'Md3 Dark', value: 'md3DarkTheme' },
|
|
485
|
+
],
|
|
476
486
|
},
|
|
477
487
|
},
|
|
478
|
-
themeKey: '
|
|
488
|
+
themeKey: 'VARLET_V3_THEME',
|
|
489
|
+
defaultLightTheme: 'md3LightTheme',
|
|
490
|
+
defaultDarkTheme: 'md3DarkTheme',
|
|
479
491
|
lightTheme: {
|
|
480
492
|
'color-body': '#fff',
|
|
481
493
|
'color-index-page-background': '#fff',
|
|
482
494
|
'color-index-page-get-started-button': '#3a7afe',
|
|
483
|
-
'color-index-page-github-button': '#212121',
|
|
484
|
-
'color-index-page-feature-background': '#fff',
|
|
485
495
|
'color-index-page-logo-mask-background': 'linear-gradient(-45deg, #8baff8 50%, #84e0ff 50%)',
|
|
486
496
|
'color-index-page-second-text-color': 'rgba(60, 60, 60, .7)',
|
|
487
497
|
'color-index-page-divider-color': '#ddd',
|
|
498
|
+
'card-border-radius': '12px',
|
|
499
|
+
'code-example-border-radius': '8px',
|
|
488
500
|
'color-bar': '#fff',
|
|
489
|
-
'color-sub-bar': '#f5f5f5',
|
|
490
501
|
'color-text': '#555',
|
|
491
502
|
'color-sub-text': '#888',
|
|
492
503
|
'color-border': 'rgba(0, 0, 0, 0.12)',
|
|
@@ -505,6 +516,11 @@ export default defineConfig({
|
|
|
505
516
|
'color-pc-language-active-background': '#edf5ff',
|
|
506
517
|
'color-mobile-language-active': '#3a7afe',
|
|
507
518
|
'color-mobile-language-active-background': '#edf5ff',
|
|
519
|
+
'color-pc-theme-active': '#3a7afe',
|
|
520
|
+
'color-pc-theme-active-background': '#edf5ff',
|
|
521
|
+
'color-mobile-theme-active': '#3a7afe',
|
|
522
|
+
'color-mobile-theme-active-background': '#edf5ff',
|
|
523
|
+
'color-mobile-body': '#fff',
|
|
508
524
|
'color-hl-background': '#fafafa',
|
|
509
525
|
'color-hl-code': '#58727e',
|
|
510
526
|
'color-hl-border': '#f3f3f3',
|
|
@@ -521,14 +537,13 @@ export default defineConfig({
|
|
|
521
537
|
darkTheme: {
|
|
522
538
|
'color-body': '#121212',
|
|
523
539
|
'color-index-page-background': '#1e1e1e',
|
|
524
|
-
'color-index-page-get-started-button': '#4a7afe',
|
|
525
|
-
'color-index-page-github-button': '#303030',
|
|
526
540
|
'color-index-page-feature-background': '#303030',
|
|
527
541
|
'color-index-page-logo-mask-background': 'linear-gradient(-45deg, #729dfc 50%, #6859f4 50%)',
|
|
528
542
|
'color-index-page-second-text-color': 'rgba(255, 255, 255, .75)',
|
|
529
543
|
'color-index-page-divider-color': 'rgba(84, 84, 84, .8)',
|
|
544
|
+
'card-border-radius': '12px',
|
|
545
|
+
'code-example-border-radius': '8px',
|
|
530
546
|
'color-bar': '#1e1e1e',
|
|
531
|
-
'color-sub-bar': '#272727',
|
|
532
547
|
'color-text': '#fff',
|
|
533
548
|
'color-sub-text': '#aaa',
|
|
534
549
|
'color-border': '#333',
|
|
@@ -547,6 +562,11 @@ export default defineConfig({
|
|
|
547
562
|
'color-pc-language-active-background': '#4a7afe20',
|
|
548
563
|
'color-mobile-language-active': '#4a7afe',
|
|
549
564
|
'color-mobile-language-active-background': '#4a7afe20',
|
|
565
|
+
'color-pc-theme-active': '#4a7afe',
|
|
566
|
+
'color-pc-theme-active-background': '#4a7afe20',
|
|
567
|
+
'color-mobile-theme-active': '#4a7afe',
|
|
568
|
+
'color-mobile-theme-active-background': '#4a7afe20',
|
|
569
|
+
'color-mobile-body': '#1e1e1e',
|
|
550
570
|
'color-hl-background': '#272727',
|
|
551
571
|
'color-hl-code': '#fff',
|
|
552
572
|
'color-hl-border': '#272727',
|
|
@@ -560,6 +580,98 @@ export default defineConfig({
|
|
|
560
580
|
'color-hl-group-h': '#14a6e9',
|
|
561
581
|
'color-hl-group-i': '#96cbfe',
|
|
562
582
|
},
|
|
583
|
+
md3LightTheme: {
|
|
584
|
+
'color-body': '#fff',
|
|
585
|
+
'color-index-page-background': '#fff',
|
|
586
|
+
'color-index-page-feature-background': '#fff',
|
|
587
|
+
'color-index-page-logo-mask-background': 'linear-gradient(-45deg, #8baff8 50%, #84e0ff 50%)',
|
|
588
|
+
'color-index-page-second-text-color': 'rgba(60, 60, 60, .7)',
|
|
589
|
+
'color-index-page-divider-color': '#ddd',
|
|
590
|
+
'card-border-radius': '12px',
|
|
591
|
+
'code-example-border-radius': '8px',
|
|
592
|
+
'color-bar': '#fff',
|
|
593
|
+
'color-text': '#555',
|
|
594
|
+
'color-sub-text': '#888',
|
|
595
|
+
'color-border': 'rgba(0, 0, 0, 0.12)',
|
|
596
|
+
'color-shadow': '#eee',
|
|
597
|
+
'color-introduce-border': '#6750A4',
|
|
598
|
+
'color-primary': '#6750A4',
|
|
599
|
+
'color-link': '#536525',
|
|
600
|
+
'color-type': '#536525',
|
|
601
|
+
'color-loading-bar': '#6750A4',
|
|
602
|
+
'color-side-bar': '#6750A4',
|
|
603
|
+
'color-side-bar-active-background': '#E8DEF8',
|
|
604
|
+
'color-app-bar': '#6750A4',
|
|
605
|
+
'color-nav-button-hover-background': 'rgba(0, 0, 0, 0.08)',
|
|
606
|
+
'color-mobile-cell-hover': '#6750A4',
|
|
607
|
+
'color-pc-language-active': '#6750A4',
|
|
608
|
+
'color-pc-language-active-background': '#E8DEF8',
|
|
609
|
+
'color-mobile-language-active': '#6750A4',
|
|
610
|
+
'color-mobile-language-active-background': '#E8DEF8',
|
|
611
|
+
'color-pc-theme-active': '#6750A4',
|
|
612
|
+
'color-pc-theme-active-background': '#E8DEF8',
|
|
613
|
+
'color-mobile-theme-active': '#6750A4',
|
|
614
|
+
'color-mobile-theme-active-background': '#E8DEF8',
|
|
615
|
+
'color-mobile-body': '#FEF7FF',
|
|
616
|
+
'color-hl-background': '#fafafa',
|
|
617
|
+
'color-hl-code': '#58727e',
|
|
618
|
+
'color-hl-border': '#f3f3f3',
|
|
619
|
+
'color-hl-group-a': '#7c7c7c',
|
|
620
|
+
'color-hl-group-b': '#6750A4',
|
|
621
|
+
'color-hl-group-c': '#7D5260',
|
|
622
|
+
'color-hl-group-d': '#B3261E',
|
|
623
|
+
'color-hl-group-e': '#7D5260',
|
|
624
|
+
'color-hl-group-f': '#7D5260',
|
|
625
|
+
'color-hl-group-g': '#7D5260',
|
|
626
|
+
'color-hl-group-h': '#633B48',
|
|
627
|
+
'color-hl-group-i': '#633B48',
|
|
628
|
+
},
|
|
629
|
+
md3DarkTheme: {
|
|
630
|
+
'color-body': '#050505',
|
|
631
|
+
'color-index-page-background': '#1e1e1e',
|
|
632
|
+
'color-index-page-feature-background': '#303030',
|
|
633
|
+
'color-index-page-logo-mask-background': 'linear-gradient(-45deg, #729dfc 50%, #6859f4 50%)',
|
|
634
|
+
'color-index-page-second-text-color': 'rgba(255, 255, 255, .75)',
|
|
635
|
+
'color-index-page-divider-color': 'rgba(84, 84, 84, .8)',
|
|
636
|
+
'card-border-radius': '12px',
|
|
637
|
+
'code-example-border-radius': '8px',
|
|
638
|
+
'color-bar': '#1e1e1e',
|
|
639
|
+
'color-text': '#fff',
|
|
640
|
+
'color-sub-text': '#aaa',
|
|
641
|
+
'color-border': '#333',
|
|
642
|
+
'color-shadow': '#090909',
|
|
643
|
+
'color-introduce-border': '#555',
|
|
644
|
+
'color-primary': '#D0BCFF',
|
|
645
|
+
'color-link': '#BACF83',
|
|
646
|
+
'color-type': '#BACF83',
|
|
647
|
+
'color-loading-bar': '#D0BCFF',
|
|
648
|
+
'color-side-bar': '#D0BCFF',
|
|
649
|
+
'color-side-bar-active-background': '#4A4458',
|
|
650
|
+
'color-app-bar': '#211F26',
|
|
651
|
+
'color-nav-button-hover-background': 'rgba(255, 255, 255, 0.08)',
|
|
652
|
+
'color-mobile-cell-hover': '#D0BCFF',
|
|
653
|
+
'color-pc-language-active': '#D0BCFF',
|
|
654
|
+
'color-pc-language-active-background': '#4A4458',
|
|
655
|
+
'color-mobile-language-active': '#D0BCFF',
|
|
656
|
+
'color-mobile-language-active-background': '#4A4458',
|
|
657
|
+
'color-pc-theme-active': '#D0BCFF',
|
|
658
|
+
'color-pc-theme-active-background': '#4A4458',
|
|
659
|
+
'color-mobile-theme-active': '#D0BCFF',
|
|
660
|
+
'color-mobile-theme-active-background': '#4A4458',
|
|
661
|
+
'color-mobile-body': '#141218',
|
|
662
|
+
'color-hl-background': '#272727',
|
|
663
|
+
'color-hl-code': '#fff',
|
|
664
|
+
'color-hl-border': '#272727',
|
|
665
|
+
'color-hl-group-a': '#7c7c7c',
|
|
666
|
+
'color-hl-group-b': '#D0BCFF',
|
|
667
|
+
'color-hl-group-c': '#EFB8C8',
|
|
668
|
+
'color-hl-group-d': '#F2B8B5',
|
|
669
|
+
'color-hl-group-e': '#EFB8C8',
|
|
670
|
+
'color-hl-group-f': '#EFB8C8',
|
|
671
|
+
'color-hl-group-g': '#EFB8C8',
|
|
672
|
+
'color-hl-group-h': '#EFB8C8',
|
|
673
|
+
'color-hl-group-i': '#EFB8C8',
|
|
674
|
+
},
|
|
563
675
|
icons: {
|
|
564
676
|
name: 'varlet-icons',
|
|
565
677
|
namespace: 'var-icon',
|
package/lib/node/index.d.ts
CHANGED
package/lib/node/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@varlet/cli",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0-alpha.1707916363117",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "cli of varlet",
|
|
6
6
|
"bin": {
|
|
@@ -64,8 +64,8 @@
|
|
|
64
64
|
"slash": "^3.0.0",
|
|
65
65
|
"typescript": "^5.1.5",
|
|
66
66
|
"webfont": "11.2.26",
|
|
67
|
-
"@varlet/shared": "
|
|
68
|
-
"@varlet/vite-plugins": "
|
|
67
|
+
"@varlet/shared": "3.0.0-alpha.1707916363117",
|
|
68
|
+
"@varlet/vite-plugins": "3.0.0-alpha.1707916363117"
|
|
69
69
|
},
|
|
70
70
|
"devDependencies": {
|
|
71
71
|
"@types/babel__core": "^7.20.1",
|
|
@@ -80,9 +80,9 @@
|
|
|
80
80
|
"@types/semver": "^7.3.9",
|
|
81
81
|
"@types/sharp": "0.31.1",
|
|
82
82
|
"rimraf": "^5.0.1",
|
|
83
|
-
"@varlet/
|
|
84
|
-
"@varlet/touch-emulator": "
|
|
85
|
-
"@varlet/
|
|
83
|
+
"@varlet/icons": "3.0.0-alpha.1707916363117",
|
|
84
|
+
"@varlet/touch-emulator": "3.0.0-alpha.1707916363117",
|
|
85
|
+
"@varlet/ui": "3.0.0-alpha.1707916363117"
|
|
86
86
|
},
|
|
87
87
|
"peerDependencies": {
|
|
88
88
|
"@vue/runtime-core": "3.4.15",
|
|
@@ -95,9 +95,9 @@
|
|
|
95
95
|
"lodash-es": "^4.17.21",
|
|
96
96
|
"vue": "3.4.15",
|
|
97
97
|
"vue-router": "4.2.0",
|
|
98
|
-
"@varlet/
|
|
99
|
-
"@varlet/
|
|
100
|
-
"@varlet/
|
|
98
|
+
"@varlet/icons": "3.0.0-alpha.1707916363117",
|
|
99
|
+
"@varlet/touch-emulator": "3.0.0-alpha.1707916363117",
|
|
100
|
+
"@varlet/ui": "3.0.0-alpha.1707916363117"
|
|
101
101
|
},
|
|
102
102
|
"scripts": {
|
|
103
103
|
"dev": "tsc --watch",
|