@varlet/cli 3.3.3 → 3.3.5-alpha.1720530125141

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.
@@ -102,7 +102,7 @@ export function watchTheme(cb, shouldUnmount = true) {
102
102
  cb(getBrowserTheme(), 'default');
103
103
  }
104
104
  export function getMobileIndex() {
105
- const isCf = window.location.origin.includes('pages.dev');
105
+ const isCf = config._cf.some((path) => window.location.origin.includes(path));
106
106
  return isCf ? './mobile' : './mobile.html';
107
107
  }
108
108
  export { AppType, StyleProvider };
@@ -170,6 +170,7 @@ export interface VarletConfig {
170
170
  * Directive folder name for component library.
171
171
  */
172
172
  directives?: string[];
173
+ _cf?: string[];
173
174
  }
174
175
  export declare function defineConfig(config: VarletConfig): VarletConfig;
175
176
  export declare function mergeStrategy(_: any, srcValue: any, key: any, _object: any, _source: any): any[] | undefined;
@@ -1,15 +1,63 @@
1
1
  import { defineConfig } from './varlet.config.js';
2
2
  const title = {
3
- 'zh-CN': 'Varlet - Vue3 Material Design 移动端组件库',
4
- 'en-US': 'Varlet - Material design mobile components built for Vue3',
3
+ 'zh-CN': 'Varlet - Vue3 Material Design 组件库',
4
+ 'en-US': 'Varlet - Vue3 Material design component library',
5
5
  };
6
6
  const description = {
7
- 'zh-CN': 'Varlet 是一个基于 Vue3 开发的 Material Design 移动端组件库,全面拥抱 Vue3 生态,由社区团队维护。支持 Typescript、按需引入、暗黑模式、主题定制、国际化,并提供 VSCode 插件保障良好的开发体验。',
8
- 'en-US': 'Varlet is a Material design mobile component library developed based on Vue3, developed and maintained by partners in the community. Support Typescript, import on demand, dark mode, theme customization, internationalization, and provide VSCode plugin to ensure a good development experience.',
7
+ 'zh-CN': 'Varlet 是一个基于 Vue3 开发的 Material Design 组件库,全面拥抱 Vue3 生态,支持移动端和桌面端,由 varletjs 组织维护。支持 Typescript、按需引入、暗黑模式、主题定制、国际化,并提供 VSCode 插件保障良好的开发验。',
8
+ 'en-US': 'Varlet is a Material design component library developed based on Vue3, supporting mobile and desktop, developed and maintained by varletjs organization. Support Typescript, import on demand, dark mode, theme customization, internationalization, and provide VSCode plugin to ensure a good development experience.',
9
9
  };
10
10
  const keywords = {
11
- 'zh-CN': 'Varlet,UI,Vue3 移动端组件库,Material Design 2,Material Design 3',
12
- 'en-US': 'Varlet,UI,Vue3 Mobile Components Library,Material Design 2,Material Design 3',
11
+ 'zh-CN': [
12
+ 'Varlet',
13
+ 'Varlet UI',
14
+ 'varlet',
15
+ 'varlet-ui',
16
+ 'Vue3 组件库',
17
+ 'Material Design 2',
18
+ 'Material Design 3',
19
+ '移动端',
20
+ '桌面端',
21
+ '提供 60+ 个高质量通用组件',
22
+ '组件十分轻量',
23
+ '由国人开发,完善的中英文文档和后勤保障',
24
+ '支持按需引入',
25
+ '支持主题定制',
26
+ '支持国际化',
27
+ '支持 webstorm 组件属性高亮',
28
+ '支持 SSR',
29
+ '支持 Nuxt Module',
30
+ '支持 Typescript',
31
+ '提供官方的 VSCode 插件',
32
+ '支持无障碍访问(持续改进中)',
33
+ ].join(','),
34
+ 'en-US': [
35
+ 'Varlet',
36
+ 'Varlet UI',
37
+ 'varlet',
38
+ 'varlet-ui',
39
+ 'UI',
40
+ 'Vue3 Mobile Components Library',
41
+ 'Material Design 2',
42
+ 'Material Design 3',
43
+ 'Mobile',
44
+ 'Desktop',
45
+ 'Provide 60+ high quality general purpose components',
46
+ 'Components are very lightweight',
47
+ 'Developed by Chinese, complete Chinese and English documentation and logistics support',
48
+ 'Support on-demand introduction',
49
+ 'Support theme customization',
50
+ 'Support internationalization',
51
+ 'Support WebStorm syntax highlighting',
52
+ 'Support the SSR',
53
+ 'Support Nuxt Module',
54
+ 'Support the Typescript',
55
+ 'Make sure more than 90 percent unit test coverage, providing stability assurance',
56
+ 'Supports both Material Design 2 and Material Design 3 design systems',
57
+ 'Support dark mode',
58
+ 'Provide official VSCode extension',
59
+ 'Support Accessibility (still improving)',
60
+ ].join(','),
13
61
  };
14
62
  export default defineConfig({
15
63
  name: 'Varlet',
@@ -496,6 +544,7 @@ export default defineConfig({
496
544
  themeKey: 'VARLET_V3_THEME',
497
545
  defaultLightTheme: 'md3LightTheme',
498
546
  defaultDarkTheme: 'md3DarkTheme',
547
+ _cf: ['pages.dev', 'varletjs.org'],
499
548
  lightTheme: {
500
549
  'color-body': '#fff',
501
550
  'color-index-page-background': '#fff',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@varlet/cli",
3
- "version": "3.3.3",
3
+ "version": "3.3.5-alpha.1720530125141",
4
4
  "type": "module",
5
5
  "description": "cli of varlet",
6
6
  "bin": {
@@ -64,8 +64,8 @@
64
64
  "vite": "5.0.10",
65
65
  "vitest": "1.1.0",
66
66
  "vue": "3.4.21",
67
- "@varlet/vite-plugins": "3.3.3",
68
- "@varlet/shared": "3.3.3"
67
+ "@varlet/shared": "3.3.5-alpha.1720530125141",
68
+ "@varlet/vite-plugins": "3.3.5-alpha.1720530125141"
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/ui": "3.3.3",
84
- "@varlet/touch-emulator": "3.3.3",
85
- "@varlet/icons": "3.3.3"
83
+ "@varlet/ui": "3.3.5-alpha.1720530125141",
84
+ "@varlet/touch-emulator": "3.3.5-alpha.1720530125141",
85
+ "@varlet/icons": "3.3.5-alpha.1720530125141"
86
86
  },
87
87
  "peerDependencies": {
88
88
  "@vitest/coverage-istanbul": "1.1.0",
@@ -94,9 +94,9 @@
94
94
  "lodash-es": "^4.17.21",
95
95
  "vue": "3.4.21",
96
96
  "vue-router": "4.2.0",
97
- "@varlet/touch-emulator": "3.3.3",
98
- "@varlet/ui": "3.3.3",
99
- "@varlet/icons": "3.3.3"
97
+ "@varlet/icons": "3.3.5-alpha.1720530125141",
98
+ "@varlet/touch-emulator": "3.3.5-alpha.1720530125141",
99
+ "@varlet/ui": "3.3.5-alpha.1720530125141"
100
100
  },
101
101
  "scripts": {
102
102
  "dev": "tsc --watch",
package/site/index.html CHANGED
@@ -74,6 +74,11 @@
74
74
  %>
75
75
  </head>
76
76
  <body>
77
+ <div style="position: absolute; top: -99999px; z-index: -99999">
78
+ <h1><%= pcTitle %></h1>
79
+ <h2><%= pcKeywords %></h2>
80
+ <p><%= pcDescription %></p>
81
+ </div>
77
82
  <%
78
83
  pcHtmlInject.body.start.forEach(function(tag) { %>
79
84
  <%- tag %>
package/site/mobile.html CHANGED
@@ -55,6 +55,11 @@
55
55
  %>
56
56
  </head>
57
57
  <body>
58
+ <div style="position: absolute; top: -99999px; z-index: -99999">
59
+ <h1><%= mobileTitle %></h1>
60
+ <h2><%= mobileKeywords %></h2>
61
+ <p><%= mobileDescription %></p>
62
+ </div>
58
63
  <%
59
64
  mobileHtmlInject.body.start.forEach(function(tag) { %>
60
65
  <%- tag %>