@melt-js/comps-vue3 2026.11.5 → 2026.11.6-2

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/package.json CHANGED
@@ -1,67 +1,72 @@
1
- {
2
- "name": "@melt-js/comps-vue3",
3
- "appGroupName": "comps-vue3",
4
- "version": "2026.11.5",
5
- "main": "hel_proxy/entry.js",
6
- "module": "hel_proxy_es/entry.js",
7
- "types": "src/entrance/libTypes.ts",
8
- "unpkg": "hel_dist/index.html",
9
- "publishConfig": {
10
- "access": "public",
11
- "registry": "https://registry.npmjs.org"
12
- },
13
- "files": [
14
- "hel_dist",
15
- "hel_proxy",
16
- "hel_proxy_es",
17
- "scripts",
18
- "src",
19
- "README.md"
20
- ],
21
- "scripts": {
22
- "start": "cross-env PORT=20020 node ./node_modules/@vue/cli-service/bin/vue-cli-service.js serve",
23
- "build": "pnpm run check_name && pnpm run build_dist && pnpm run build_meta && pnpm run build_proxy",
24
- "build:local": "cross-env HEL_APP_HOME_PAGE=http://localhost:20020 pnpm run build",
25
- "build_dist": "cross-env NODE_OPTIONS=--openssl-legacy-provider node ./node_modules/@vue/cli-service/bin/vue-cli-service.js build",
26
- "check_name": "node ./scripts/check.js",
27
- "build_proxy": "pnpm run build_proxy_umd && pnpm run build_proxy_es && shx cp ./hel_proxy/entry.js ./hel_dist",
28
- "build_proxy_umd": "rollup -c",
29
- "build_proxy_es": "cross-env BUILD_ENV=es rollup -c",
30
- "build_meta": "node scripts/meta.js",
31
- "preview": "cross-env PORT=20020 node scripts/preview.js",
32
- "prepublishOnly": "node ./scripts/prepublishOnly.js",
33
- "publish:stage": "pnpm run build && npx -y npm@11 stage publish"
34
- },
35
- "dependencies": {
36
- "core-js": "3.51.0",
37
- "hel-iso": "4.4.0",
38
- "hel-lib-proxy": "4.12.3"
39
- },
40
- "peerDependencies": {
41
- "hel-lib-proxy": "4.12.3",
42
- "vue": "3.5.44"
43
- },
44
- "devDependencies": {
45
- "@rollup/plugin-typescript": "12.3.1",
46
- "@vue/cli-plugin-babel": "5.0.9",
47
- "@vue/cli-plugin-typescript": "5.0.9",
48
- "@vue/cli-service": "5.0.9",
49
- "cross-env": "7.0.3",
50
- "hel-dev-utils": "5.4.3",
51
- "rollup": "4.67.5",
52
- "shx": "0.4.0",
53
- "tslib": "2.8.1",
54
- "typescript": "5.9.3",
55
- "vue": "3.5.44",
56
- "webpack": "5.112.2"
57
- },
58
- "engines": {
59
- "node": ">=18"
60
- },
61
- "browserslist": [
62
- "> 1%",
63
- "last 2 versions",
64
- "not dead",
65
- "not ie 11"
66
- ]
67
- }
1
+ {
2
+ "name": "@melt-js/comps-vue3",
3
+ "appGroupName": "comps-vue3",
4
+ "version": "2026.11.6-2",
5
+ "main": "hel_proxy/entry.js",
6
+ "module": "hel_proxy_es/entry.js",
7
+ "types": "src/entrance/libTypes.ts",
8
+ "unpkg": "hel_dist/index.html",
9
+ "publishConfig": {
10
+ "access": "public",
11
+ "registry": "https://registry.npmjs.org",
12
+ "tag": "latest"
13
+ },
14
+ "files": [
15
+ "hel_dist",
16
+ "hel_proxy",
17
+ "hel_proxy_es",
18
+ "scripts",
19
+ "src",
20
+ "README.md"
21
+ ],
22
+ "scripts": {
23
+ "start": "pnpm run gen:schema && cross-env PORT=20020 node ./node_modules/@vue/cli-service/bin/vue-cli-service.js serve",
24
+ "gen:schema": "vue3-leva-gen-schema",
25
+ "build": "pnpm run check_name && pnpm run build_dist && pnpm run build_meta && pnpm run build_proxy",
26
+ "build:local": "cross-env HEL_APP_HOME_PAGE=http://localhost:20020 pnpm run build",
27
+ "build_dist": "pnpm run gen:schema && cross-env NODE_OPTIONS=--openssl-legacy-provider node ./node_modules/@vue/cli-service/bin/vue-cli-service.js build",
28
+ "check_name": "node ./scripts/check.js",
29
+ "build_proxy": "pnpm run build_proxy_umd && pnpm run build_proxy_es && shx cp ./hel_proxy/entry.js ./hel_dist",
30
+ "build_proxy_umd": "rollup -c",
31
+ "build_proxy_es": "cross-env BUILD_ENV=es rollup -c",
32
+ "build_meta": "node scripts/meta.js",
33
+ "preview": "cross-env PORT=20020 node scripts/preview.js",
34
+ "prepublishOnly": "node ./scripts/prepublishOnly.js",
35
+ "publish:stage": "pnpm run build && npx -y npm@11 stage publish"
36
+ },
37
+ "dependencies": {
38
+ "@melt-js/libs-vue3-leva": "workspace:*",
39
+ "core-js": "3.51.0",
40
+ "hel-iso": "4.4.0",
41
+ "hel-lib-proxy": "4.12.3"
42
+ },
43
+ "peerDependencies": {
44
+ "hel-lib-proxy": "4.12.3",
45
+ "vue": "3.5.45"
46
+ },
47
+ "devDependencies": {
48
+ "@rollup/plugin-typescript": "12.3.1",
49
+ "@vue/cli-plugin-babel": "5.0.9",
50
+ "@vue/cli-plugin-typescript": "5.0.9",
51
+ "@vue/cli-service": "5.0.9",
52
+ "cross-env": "7.0.3",
53
+ "hel-dev-utils": "5.4.3",
54
+ "javascript-obfuscator": "4.2.2",
55
+ "rollup": "4.67.5",
56
+ "shx": "0.4.0",
57
+ "tslib": "2.9.1",
58
+ "typescript": "5.9.3",
59
+ "vue": "3.5.45",
60
+ "webpack": "5.112.2",
61
+ "webpack-obfuscator": "3.6.1"
62
+ },
63
+ "engines": {
64
+ "node": ">=18"
65
+ },
66
+ "browserslist": [
67
+ "> 1%",
68
+ "last 2 versions",
69
+ "not dead",
70
+ "not ie 11"
71
+ ]
72
+ }
package/scripts/meta.js CHANGED
@@ -1,53 +1,53 @@
1
- /*
2
- |--------------------------------------------------------------------------
3
- |
4
- | 生成 hel-meta.json(写入 hel_dist)
5
- |
6
- |--------------------------------------------------------------------------
7
- */
8
- const fs = require('fs')
9
- const path = require('path')
10
- const helDevUtils = require('hel-dev-utils')
11
- const packageJson = require('../package.json')
12
- const appInfo = require('../appInfo')
13
-
14
- const META_PATH = path.join(__dirname, '../hel_dist/hel-meta.json')
15
-
16
- /**
17
- * hel-dev-utils 在 Windows 下会把 dist 扫描出来的资源路径拼成反斜杠形式,
18
- * 形如 https://unpkg.com/xxx/hel_dist/\js\app.js,CDN 上是无效地址。
19
- * 这里统一转成 / 并去重,保证发布的 hel-meta.json 在 Windows 构建也正确。
20
- */
21
- function normalizePathSeparators(value) {
22
- if (typeof value === 'string') {
23
- return value
24
- .replace(/\\/g, '/')
25
- .replace(/([^:])\/{2,}/g, '$1/')
26
- }
27
- if (Array.isArray(value)) {
28
- return [...new Set(value.map(normalizePathSeparators))]
29
- }
30
- if (value && typeof value === 'object') {
31
- return Object.fromEntries(
32
- Object.entries(value).map(([key, val]) => [key, normalizePathSeparators(val)]),
33
- )
34
- }
35
- return value
36
- }
37
-
38
- async function main() {
39
- const meta = await helDevUtils.extractHelMetaJson({
40
- appInfo,
41
- buildDirFullPath: path.join(__dirname, '../hel_dist'),
42
- packageJson,
43
- })
44
-
45
- const normalizedMeta = normalizePathSeparators(meta)
46
- fs.writeFileSync(META_PATH, JSON.stringify(normalizedMeta, null, 2))
47
- console.log('[comps-vue3] hel-meta.json 生成完成')
48
- }
49
-
50
- main().catch((err) => {
51
- console.error('[comps-vue3] hel-meta.json 生成失败:', err)
52
- process.exit(-1)
53
- })
1
+ /*
2
+ |--------------------------------------------------------------------------
3
+ |
4
+ | 生成 hel-meta.json(写入 hel_dist)
5
+ |
6
+ |--------------------------------------------------------------------------
7
+ */
8
+ const fs = require('fs')
9
+ const path = require('path')
10
+ const helDevUtils = require('hel-dev-utils')
11
+ const packageJson = require('../package.json')
12
+ const appInfo = require('../appInfo')
13
+
14
+ const META_PATH = path.join(__dirname, '../hel_dist/hel-meta.json')
15
+
16
+ /**
17
+ * hel-dev-utils 在 Windows 下会把 dist 扫描出来的资源路径拼成反斜杠形式,
18
+ * 形如 https://unpkg.com/xxx/hel_dist/\js\app.js,CDN 上是无效地址。
19
+ * 这里统一转成 / 并去重,保证发布的 hel-meta.json 在 Windows 构建也正确。
20
+ */
21
+ function normalizePathSeparators(value) {
22
+ if (typeof value === 'string') {
23
+ return value
24
+ .replace(/\\/g, '/')
25
+ .replace(/([^:])\/{2,}/g, '$1/')
26
+ }
27
+ if (Array.isArray(value)) {
28
+ return [...new Set(value.map(normalizePathSeparators))]
29
+ }
30
+ if (value && typeof value === 'object') {
31
+ return Object.fromEntries(
32
+ Object.entries(value).map(([key, val]) => [key, normalizePathSeparators(val)]),
33
+ )
34
+ }
35
+ return value
36
+ }
37
+
38
+ async function main() {
39
+ const meta = await helDevUtils.extractHelMetaJson({
40
+ appInfo,
41
+ buildDirFullPath: path.join(__dirname, '../hel_dist'),
42
+ packageJson,
43
+ })
44
+
45
+ const normalizedMeta = normalizePathSeparators(meta)
46
+ fs.writeFileSync(META_PATH, JSON.stringify(normalizedMeta, null, 2))
47
+ console.log('[comps-vue3] hel-meta.json 生成完成')
48
+ }
49
+
50
+ main().catch((err) => {
51
+ console.error('[comps-vue3] hel-meta.json 生成失败:', err)
52
+ process.exit(-1)
53
+ })
@@ -1,27 +1,27 @@
1
- /*
2
- |--------------------------------------------------------------------------
3
- | npm publish 前检查根目录下 package.json 的版本号是否和 hel_dist/hel-meta.json 一致
4
- |--------------------------------------------------------------------------
5
- */
6
-
7
- const pkg = require('../package.json')
8
- const fs = require('fs')
9
- const path = require('path')
10
-
11
- const helDistPath = path.resolve(__dirname, '../hel_dist/hel-meta.json')
12
- const existHelMeata = fs.existsSync(helDistPath)
13
-
14
- // 检查是否执行 pnpm run build 打包命令
15
- if (!existHelMeata) {
16
- console.log("Run the 'pnpm run build' command first.\n")
17
- process.exit(1)
18
- }
19
-
20
- const { app } = JSON.parse(fs.readFileSync(helDistPath, 'utf-8'))
21
- // 检查根目录下 package.json 的版本号是否和 hel_dist/hel-meta.json 一致
22
- if (app?.build_version !== pkg.version) {
23
- console.log(
24
- 'The package.json version number and the hel_dist/hel-meta.json version number must be the same.\n',
25
- )
26
- process.exit(1)
27
- }
1
+ /*
2
+ |--------------------------------------------------------------------------
3
+ | npm publish 前检查根目录下 package.json 的版本号是否和 hel_dist/hel-meta.json 一致
4
+ |--------------------------------------------------------------------------
5
+ */
6
+
7
+ const pkg = require('../package.json')
8
+ const fs = require('fs')
9
+ const path = require('path')
10
+
11
+ const helDistPath = path.resolve(__dirname, '../hel_dist/hel-meta.json')
12
+ const existHelMeata = fs.existsSync(helDistPath)
13
+
14
+ // 检查是否执行 pnpm run build 打包命令
15
+ if (!existHelMeata) {
16
+ console.log("Run the 'pnpm run build' command first.\n")
17
+ process.exit(1)
18
+ }
19
+
20
+ const { app } = JSON.parse(fs.readFileSync(helDistPath, 'utf-8'))
21
+ // 检查根目录下 package.json 的版本号是否和 hel_dist/hel-meta.json 一致
22
+ if (app?.build_version !== pkg.version) {
23
+ console.log(
24
+ 'The package.json version number and the hel_dist/hel-meta.json version number must be the same.\n',
25
+ )
26
+ process.exit(1)
27
+ }
@@ -1,72 +1,72 @@
1
- /*
2
- |--------------------------------------------------------------------------
3
- | 本地预览 hel_dist 构建产物(默认 20020,带 CORS)
4
- |--------------------------------------------------------------------------
5
- | 预览前请先执行 `pnpm run build:local`,让产物里的资源地址指向
6
- | http://localhost:20020,否则 index.html 会引用 unpkg 上的线上地址。
7
- */
8
- const http = require('node:http')
9
- const fs = require('node:fs')
10
- const path = require('node:path')
11
-
12
- // 端口写死,保证本包脱离 monorepo 也能独立运行(全局规则见根目录 ports.json)
13
- const PORT = Number(process.env.PORT) || 20020
14
- const ROOT = path.resolve(__dirname, '../hel_dist')
15
-
16
- const MIME = {
17
- '.html': 'text/html; charset=utf-8',
18
- '.js': 'text/javascript; charset=utf-8',
19
- '.mjs': 'text/javascript; charset=utf-8',
20
- '.css': 'text/css; charset=utf-8',
21
- '.json': 'application/json; charset=utf-8',
22
- '.map': 'application/json; charset=utf-8',
23
- '.png': 'image/png',
24
- '.jpg': 'image/jpeg',
25
- '.jpeg': 'image/jpeg',
26
- '.gif': 'image/gif',
27
- '.svg': 'image/svg+xml',
28
- '.ico': 'image/x-icon',
29
- '.woff': 'font/woff',
30
- '.woff2': 'font/woff2',
31
- }
32
-
33
- function send(res, status, body, headers = {}) {
34
- res.writeHead(status, {
35
- 'Access-Control-Allow-Origin': '*',
36
- 'Access-Control-Allow-Methods': '*',
37
- 'Access-Control-Allow-Headers': '*',
38
- ...headers,
39
- })
40
- res.end(body)
41
- }
42
-
43
- http
44
- .createServer((req, res) => {
45
- const urlPath = decodeURIComponent((req.url || '/').split('?')[0])
46
- const relativePath = urlPath === '/' ? 'index.html' : urlPath.replace(/^\/+/, '')
47
- let filePath = path.resolve(ROOT, relativePath)
48
-
49
- // 防止路径穿越
50
- if (filePath !== ROOT && !filePath.startsWith(`${ROOT}${path.sep}`)) {
51
- send(res, 403, 'Forbidden')
52
- return
53
- }
54
-
55
- fs.stat(filePath, (statErr, stat) => {
56
- if (!statErr && stat.isDirectory()) {
57
- filePath = path.join(filePath, 'index.html')
58
- }
59
-
60
- fs.readFile(filePath, (readErr, content) => {
61
- if (readErr) {
62
- send(res, 404, 'Not Found')
63
- return
64
- }
65
- const contentType = MIME[path.extname(filePath).toLowerCase()] || 'application/octet-stream'
66
- send(res, 200, content, { 'Content-Type': contentType })
67
- })
68
- })
69
- })
70
- .listen(PORT, () => {
71
- console.log(`[comps-vue3] preview: http://localhost:${PORT}`)
72
- })
1
+ /*
2
+ |--------------------------------------------------------------------------
3
+ | 本地预览 hel_dist 构建产物(默认 20020,带 CORS)
4
+ |--------------------------------------------------------------------------
5
+ | 预览前请先执行 `pnpm run build:local`,让产物里的资源地址指向
6
+ | http://localhost:20020,否则 index.html 会引用 unpkg 上的线上地址。
7
+ */
8
+ const http = require('node:http')
9
+ const fs = require('node:fs')
10
+ const path = require('node:path')
11
+
12
+ // 端口写死,保证本包脱离 monorepo 也能独立运行(全局规则见根目录 ports.json)
13
+ const PORT = Number(process.env.PORT) || 20020
14
+ const ROOT = path.resolve(__dirname, '../hel_dist')
15
+
16
+ const MIME = {
17
+ '.html': 'text/html; charset=utf-8',
18
+ '.js': 'text/javascript; charset=utf-8',
19
+ '.mjs': 'text/javascript; charset=utf-8',
20
+ '.css': 'text/css; charset=utf-8',
21
+ '.json': 'application/json; charset=utf-8',
22
+ '.map': 'application/json; charset=utf-8',
23
+ '.png': 'image/png',
24
+ '.jpg': 'image/jpeg',
25
+ '.jpeg': 'image/jpeg',
26
+ '.gif': 'image/gif',
27
+ '.svg': 'image/svg+xml',
28
+ '.ico': 'image/x-icon',
29
+ '.woff': 'font/woff',
30
+ '.woff2': 'font/woff2',
31
+ }
32
+
33
+ function send(res, status, body, headers = {}) {
34
+ res.writeHead(status, {
35
+ 'Access-Control-Allow-Origin': '*',
36
+ 'Access-Control-Allow-Methods': '*',
37
+ 'Access-Control-Allow-Headers': '*',
38
+ ...headers,
39
+ })
40
+ res.end(body)
41
+ }
42
+
43
+ http
44
+ .createServer((req, res) => {
45
+ const urlPath = decodeURIComponent((req.url || '/').split('?')[0])
46
+ const relativePath = urlPath === '/' ? 'index.html' : urlPath.replace(/^\/+/, '')
47
+ let filePath = path.resolve(ROOT, relativePath)
48
+
49
+ // 防止路径穿越
50
+ if (filePath !== ROOT && !filePath.startsWith(`${ROOT}${path.sep}`)) {
51
+ send(res, 403, 'Forbidden')
52
+ return
53
+ }
54
+
55
+ fs.stat(filePath, (statErr, stat) => {
56
+ if (!statErr && stat.isDirectory()) {
57
+ filePath = path.join(filePath, 'index.html')
58
+ }
59
+
60
+ fs.readFile(filePath, (readErr, content) => {
61
+ if (readErr) {
62
+ send(res, 404, 'Not Found')
63
+ return
64
+ }
65
+ const contentType = MIME[path.extname(filePath).toLowerCase()] || 'application/octet-stream'
66
+ send(res, 200, content, { 'Content-Type': contentType })
67
+ })
68
+ })
69
+ })
70
+ .listen(PORT, () => {
71
+ console.log(`[comps-vue3] preview: http://localhost:${PORT}`)
72
+ })
@@ -0,0 +1,134 @@
1
+ [
2
+ {
3
+ "name": "items",
4
+ "type": "CircularMenuItem[]",
5
+ "description": "菜单项,label 是文案,href 给了就走链接,active 是高亮态",
6
+ "default": "",
7
+ "required": true,
8
+ "version": "",
9
+ "isEvent": false,
10
+ "bindable": false
11
+ },
12
+ {
13
+ "name": "variant",
14
+ "type": "'wheel' | 'fan'",
15
+ "description": "形态:wheel 是半圆扇环,fan 是整圆扇环",
16
+ "default": "\"wheel\"",
17
+ "required": false,
18
+ "version": "",
19
+ "isEvent": false,
20
+ "bindable": true,
21
+ "value": "wheel",
22
+ "control": {
23
+ "options": {
24
+ "wheel": "wheel",
25
+ "fan": "fan"
26
+ }
27
+ }
28
+ },
29
+ {
30
+ "name": "position",
31
+ "type": "'relative' | 'absolute' | 'sticky' | 'fixed'",
32
+ "description": "定位方式:relative 随文档流滚动,sticky 吸附,fixed 贴视口,absolute 贴定位祖先",
33
+ "default": "\"relative\"",
34
+ "required": false,
35
+ "version": "",
36
+ "isEvent": false,
37
+ "bindable": true,
38
+ "value": "relative",
39
+ "control": {
40
+ "options": {
41
+ "relative": "relative",
42
+ "absolute": "absolute",
43
+ "sticky": "sticky",
44
+ "fixed": "fixed"
45
+ }
46
+ }
47
+ },
48
+ {
49
+ "name": "anchor",
50
+ "type": "'center' | 'top' | 'bottom' | 'left' | 'right' | 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right'",
51
+ "description": "锚点:非 relative 时按钮中心贴在哪条边,left/right 会在另一轴上居中",
52
+ "default": "\"bottom\"",
53
+ "required": false,
54
+ "version": "",
55
+ "isEvent": false,
56
+ "bindable": true,
57
+ "value": "bottom",
58
+ "control": {
59
+ "options": {
60
+ "center": "center",
61
+ "top": "top",
62
+ "bottom": "bottom",
63
+ "left": "left",
64
+ "right": "right",
65
+ "top-left": "top-left",
66
+ "top-right": "top-right",
67
+ "bottom-left": "bottom-left",
68
+ "bottom-right": "bottom-right"
69
+ }
70
+ }
71
+ },
72
+ {
73
+ "name": "offset",
74
+ "type": "number",
75
+ "description": "距锚点边的距离,单位 px",
76
+ "default": "0",
77
+ "required": false,
78
+ "version": "",
79
+ "isEvent": false,
80
+ "bindable": true,
81
+ "value": 0
82
+ },
83
+ {
84
+ "name": "direction",
85
+ "type": "'up' | 'down' | 'auto'",
86
+ "description": "展开方向:up 向上展开,down 向下展开,auto 按锚点推断(贴顶时向下)",
87
+ "default": "\"auto\"",
88
+ "required": false,
89
+ "version": "",
90
+ "isEvent": false,
91
+ "bindable": true,
92
+ "value": "auto",
93
+ "control": {
94
+ "options": {
95
+ "up": "up",
96
+ "down": "down",
97
+ "auto": "auto"
98
+ }
99
+ }
100
+ },
101
+ {
102
+ "name": "overlay",
103
+ "type": "boolean",
104
+ "description": "是否显示半透明遮罩(一般配 fixed/absolute 使用)",
105
+ "default": "false",
106
+ "required": false,
107
+ "version": "",
108
+ "isEvent": false,
109
+ "bindable": true,
110
+ "value": false
111
+ },
112
+ {
113
+ "name": "openText",
114
+ "type": "string",
115
+ "description": "展开时的按钮文案,不传则按形态用默认符号",
116
+ "default": "",
117
+ "required": false,
118
+ "version": "",
119
+ "isEvent": false,
120
+ "bindable": true,
121
+ "value": ""
122
+ },
123
+ {
124
+ "name": "closeText",
125
+ "type": "string",
126
+ "description": "收起时的按钮文案,不传则按形态用默认符号",
127
+ "default": "",
128
+ "required": false,
129
+ "version": "",
130
+ "isEvent": false,
131
+ "bindable": true,
132
+ "value": ""
133
+ }
134
+ ]