@qilitt-mickey/vue3-temp-skill 1.1.34 → 1.1.36

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.
Files changed (83) hide show
  1. package/README.md +6 -34
  2. package/SKILL.md +11 -17
  3. package/bin/cli.js +19 -51
  4. package/dist/mapping-type.d.ts +33 -0
  5. package/dist/theme-vars.js +61 -0
  6. package/dist/theme-vars.ts +111 -0
  7. package/dist/theme.css +72 -0
  8. package/mapping/basic/color.json +34 -0
  9. package/mapping/basic/radius.json +17 -0
  10. package/mapping/basic/semantic-values.json +72 -0
  11. package/mapping/basic/spacing.json +21 -0
  12. package/mapping/basic/typography.json +21 -0
  13. package/mapping/component/button.json +59 -0
  14. package/mapping/component/input.json +39 -0
  15. package/mapping/component/overlay.json +63 -0
  16. package/mapping/component/table.json +42 -0
  17. package/mapping/layout/breakpoint.json +20 -0
  18. package/mapping/layout/shell-geometry.json +26 -0
  19. package/mapping/scenes/admin/content.json +112 -0
  20. package/mapping/scenes/admin/layout.json +331 -0
  21. package/package.json +8 -3
  22. package/parser/fixtures/changeset-legacy.json +11 -0
  23. package/parser/fixtures/changeset-neg1.json +17 -0
  24. package/parser/fixtures/changeset-neg2.json +10 -0
  25. package/parser/fixtures/changeset-neg3.json +22 -0
  26. package/parser/fixtures/changeset-pos.json +43 -0
  27. package/parser/generator.js +178 -0
  28. package/parser/index.js +553 -0
  29. package/parser/loader.js +66 -0
  30. package/parser/override.js +119 -0
  31. package/parser/regression.js +137 -0
  32. package/parser/validator.js +137 -0
  33. package/parser/watch.js +103 -0
  34. package/references/addon-enable.md +1 -1
  35. package/references/api-check.md +1 -1
  36. package/references/auth-pages.md +1 -1
  37. package/references/base-code-dict.md +1 -1
  38. package/references/chart-echarts.md +1 -1
  39. package/references/code-quality.md +25 -24
  40. package/references/core-kernel.md +3 -5
  41. package/references/crud-pages.md +20 -292
  42. package/references/data-compare.md +1 -1
  43. package/references/data-mapping.md +229 -229
  44. package/references/data-screen.md +102 -102
  45. package/references/data-writeback.md +1 -1
  46. package/references/design-apply.md +177 -0
  47. package/references/detail-page.md +1 -1
  48. package/references/directives-advanced.md +7 -7
  49. package/references/download-export.md +1 -1
  50. package/references/feedback-loading.md +1 -1
  51. package/references/feedback-ui.md +1 -1
  52. package/references/file-management.md +7 -7
  53. package/references/flowchart-g6.md +260 -260
  54. package/references/form-advanced.md +2 -2
  55. package/references/graph-relation.md +8 -8
  56. package/references/http-api.md +1 -1
  57. package/references/i18n-localization.md +1 -1
  58. package/references/icons.md +1 -1
  59. package/references/layout-theme.md +513 -520
  60. package/references/mobile-h5.md +1 -1
  61. package/references/particles.md +7 -7
  62. package/references/permission-auth.md +1 -1
  63. package/references/project-inventory.md +1 -1
  64. package/references/qrcode-barcode.md +117 -117
  65. package/references/rich-text.md +1 -1
  66. package/references/seamless-scroll.md +1 -1
  67. package/references/table-vxe.md +1 -1
  68. package/references/tree-table.md +7 -7
  69. package/references/ui-components.md +1 -1
  70. package/references/verify-captcha.md +1 -1
  71. package/references/websocket-realtime.md +7 -7
  72. package/references/wechat-js.md +1 -1
  73. package/references/workflow-bpmn.md +214 -214
  74. package/scripts/check.mjs +84 -84
  75. package/scripts/cli.mjs +115 -120
  76. package/scripts/match.py +134 -134
  77. package/scripts/modules.json +109 -103
  78. package/scripts/validate.mjs +106 -106
  79. package/references/design-handoff.md +0 -777
  80. package/references/design-system.md +0 -142
  81. package/references/design-verify.md +0 -444
  82. package/scripts/check.cmd +0 -9
  83. package/scripts/handoff.mjs +0 -108
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # vue3-temp-skill
2
2
 
3
- Vue 3 企业级项目开发技能包。面向 vue3-web-temp 及其派生项目,把产品点子快速做成可演示、可验证、可继续演进的 Demo,同时约束代码质量和设计落地。
3
+ Vue 3 企业级项目开发技能包。面向 vue3-web-temp 及其派生项目,把产品点子快速做成可演示、可验证、可继续演进的 Demo,同时约束代码质量。
4
4
 
5
5
  ## 文档分工
6
6
 
@@ -19,7 +19,6 @@ Vue 3 企业级项目开发技能包。面向 vue3-web-temp 及其派生项目
19
19
  - **按需** `project-inventory`(查依赖 / 装包 / 查 Re* 名录)
20
20
  - **按需** `addon-enable` — 只有目标项目确实存在排除项、占位插件或缺失接线时才读
21
21
  - **生成后闸门** `code-quality`:清单 + `pnpm lint:fix` + `pnpm type-check` + 结果块
22
- - **设计交接** 有 `design-handoff/v1` 时读 `design-handoff`,落地后用 `handoff.mjs` 做轻量校验
23
22
 
24
23
  ## 使用方式
25
24
 
@@ -41,7 +40,7 @@ Vue 3 企业级项目开发技能包。面向 vue3-web-temp 及其派生项目
41
40
  |------|------|
42
41
  | 始终 | core-kernel |
43
42
  | 闸门 | code-quality |
44
- | 高频 | page-crud、page-detail、data-service、forms、access、design-implementation、shared-ui |
43
+ | 高频 | page-crud、page-detail、data-service、forms、access、theme-layout、shared-ui |
45
44
  | 专项 | table-advanced、visualization、workflow、files-and-editors、realtime-and-mobile、data-compare、i18n |
46
45
  | 工程 | project-setup(project-inventory + addon-enable) |
47
46
 
@@ -58,7 +57,9 @@ Vue 3 企业级项目开发技能包。面向 vue3-web-temp 及其派生项目
58
57
  | 脚本 | 职责 |
59
58
  |------|------|
60
59
  | `scripts/match.py` | 能力路由器:输入需求,输出 JSON(`load_files`、同批加载、闸门项) |
61
- | `scripts/handoff.mjs` | 设计交接:`init` 校验 JSON 并建 session,`check` 校验关键接线 |
60
+ | `parser/index.js` | 设计变更集解析器:`build` 校验编译 / `match` 三级匹配 / `list` 词典清单 / `query` 单条详情(design-apply 能力组) |
61
+ | `parser/watch.js` / `npm run mapping:watch` | 开发态监听 mapping/ 变更自动重编译 dist/ |
62
+ | `parser/override.js` | 业务级映射覆写 API(链路 A 配套,`overrideMapping` / `overrideMappings`) |
62
63
 
63
64
  **匹配器调用(本地环境):**
64
65
 
@@ -76,8 +77,6 @@ python scripts/match.py --batch # 15 个典型场景回归
76
77
  ```bash
77
78
  npm run match # python scripts/match.py
78
79
  npm run match:batch # 批量回归
79
- npm run handoff:init # node scripts/handoff.mjs init(需追加 --project 等参数)
80
- npm run handoff:check # node scripts/handoff.mjs check
81
80
  ```
82
81
 
83
82
  ### 维护者(不随技能安装分发)
@@ -104,7 +103,7 @@ Node.js >= 22.12.0
104
103
  npx @qilitt-mickey/vue3-temp-skill@latest install all
105
104
  ```
106
105
 
107
- 安装器只复制 AI 运行时文件:`match.py`、`modules.json`、`handoff.mjs`。validate / check / cli 留在技能包仓库供维护使用。
106
+ 安装器复制 AI 运行时文件:`match.py`、`modules.json`、`mapping/`(语义 ID 词典)、`parser/`(变更集解析器)。validate / check / cli / release 留在技能包仓库供维护使用。
108
107
 
109
108
  | 目标 | 说明 |
110
109
  |------|------|
@@ -113,32 +112,6 @@ npx @qilitt-mickey/vue3-temp-skill@latest install all
113
112
 
114
113
  具体路径因 AI 环境而异,安装完成后以安装器输出为准。
115
114
 
116
- ### 设计落地(可选)
117
-
118
- handoff JSON 可以来自对话、临时文件或管道。状态默认保存在用户级状态目录,**不在业务项目创建 `.handoff/`**:
119
-
120
- - 默认路径:`~/.workbuddy/state/vue3-temp-skill/<项目哈希>/handoff.json`
121
- - Windows 示例:`%USERPROFILE%\.workbuddy\state\vue3-temp-skill\<项目哈希>\handoff.json`
122
-
123
- ```bash
124
- # 动手前:校验 JSON 规格并建立 session
125
- node scripts/handoff.mjs init --project ./my-vue-app --file C:/temp/handoff.json
126
-
127
- # 落地后:确认关键接线存在
128
- node scripts/handoff.mjs check --project ./my-vue-app --require-session
129
- ```
130
-
131
- 也支持显式指定状态目录(适合 CI 或多工作区):追加 `--state-dir <项目外状态目录>`。
132
-
133
- 通过 npm 包 CLI:
134
-
135
- ```bash
136
- npx @qilitt-mickey/vue3-temp-skill handoff init --project ./my-vue-app --file C:/temp/handoff.json
137
- npx @qilitt-mickey/vue3-temp-skill handoff check --project ./my-vue-app --require-session
138
- ```
139
-
140
- `handoff.mjs` 只做两件事:确认 JSON 规格完整,确认目标项目存在落地所需关键接线。它不统计改动文件数量,也不要求全项目遍历。
141
-
142
115
  ## 与模版的关系
143
116
 
144
117
  本 Skill 约定对齐 **vue3-web-temp** 精简脚手架:
@@ -154,4 +127,3 @@ npx @qilitt-mickey/vue3-temp-skill handoff check --project ./my-vue-app --requir
154
127
  - **标准样板**:在本包 `references/`;模板 `views/` 主要用于确认真实接线,不直接复制演示文案
155
128
  - 壳层、组件和 API 以当前项目源码为准;规范文档只补充实现方法
156
129
  - HTTP:仅经 `@/utils/http`;版本以目标项目 `package.json` 和锁文件为准
157
- - **设计协同**:定制 UI 由**设计技能**出稿(含 `design-handoff/v1` JSON)→ 本 Skill 工程落地;不引入其他设计 Skill
package/SKILL.md CHANGED
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: "vue3-temp-skill"
3
- description: "Vue 3 企业级项目开发技能。面向 vue3-web-temp 及其派生项目,帮助产品经理和前端快速把点子做成可演示、可验证、可继续演进的 Demo;同时约束真实模板复用、代码质量和设计交接落地。"
3
+ description: "Vue 3 企业级项目开发技能。面向 vue3-web-temp 及其派生项目,帮助产品经理和前端快速把点子做成可演示、可验证、可继续演进的 Demo;同时约束真实模板复用和代码质量。"
4
4
  scope: project
5
5
  agent_created: true
6
6
  tags: [vue3, typescript, element-plus, pinia, vite, unocss, crud, demo, code-quality]
@@ -21,15 +21,16 @@ tags: [vue3, typescript, element-plus, pinia, vite, unocss, crud, demo, code-qua
21
21
  典型需求:
22
22
 
23
23
  - 开发客户管理列表,支持搜索、分页、编辑和详情
24
- - 做一个有设计感的订单仪表盘,沿用设计 handoff
24
+ - 做一个订单仪表盘,含统计卡片和趋势图
25
25
  - 给现有 Demo 增加附件上传、导出或审批流
26
26
  - 把一个页面从 mock 改成真实 API
27
+ - 落地一份设计变更集 JSON(上游 project-ui-design 产出,含语义 ID + 抽象样式字段)
27
28
 
28
29
  ## 运行时只保留三件事
29
30
 
30
31
  1. **项目探查**:读取目标项目的 `package.json`、路由、页面、`Re*` 组件、Hooks、API 和样式;以源码事实为准。
31
32
  2. **能力路由**:运行 `scripts/match.py "需求" --json`,**仅**按输出中的 `load_files` 阅读 reference;禁止自行展开全部 `references/`。无 Python 时按下方能力组表手动匹配。
32
- 3. **质量闸门**:代码完成后读取 `references/code-quality.md`,执行清单和项目命令;有设计 handoff 时完成交接检查(init → 改代码 → check exit 0)。
33
+ 3. **质量闸门**:代码完成后读取 `references/code-quality.md`,执行清单和项目命令。
33
34
 
34
35
  ## 能力组路由
35
36
 
@@ -40,7 +41,7 @@ tags: [vue3, typescript, element-plus, pinia, vite, unocss, crud, demo, code-qua
40
41
  | `data-service` | HTTP、API、类型、mock、联调 | `http-api.md`、`api-check.md` |
41
42
  | `forms` | 表单、弹窗、远程选择、回显、字典、反馈 | `form-advanced.md`、`data-writeback.md`、`base-code-dict.md`、`feedback-loading.md` |
42
43
  | `access` | 权限、认证页面 | `permission-auth.md`、`auth-pages.md` |
43
- | `design-implementation` | 设计 handoff、主题、布局、组件样式 | `design-handoff.md`、`design-system.md`、`layout-theme.md` |
44
+ | `theme-layout` | 布局、主题色、暗黑模式、侧栏配色、令牌 | `layout-theme.md` |
44
45
  | `shared-ui` | Re*、图标、通用展示和指令 | `ui-components.md`、`icons.md`、`feedback-ui.md`、`directives-advanced.md` |
45
46
  | `table-advanced` | 树表、VXE 表格 | `tree-table.md`、`table-vxe.md` |
46
47
  | `visualization` | 图表、大屏、关系图谱 | `chart-echarts.md`、`data-screen.md`、`graph-relation.md` |
@@ -48,6 +49,7 @@ tags: [vue3, typescript, element-plus, pinia, vite, unocss, crud, demo, code-qua
48
49
  | `files-and-editors` | 附件、预览、下载、富文本、二维码 | `file-management.md`、`download-export.md`、`rich-text.md`、`qrcode-barcode.md` |
49
50
  | `realtime-and-mobile` | WebSocket、移动端、微信、验证码、动效 | 对应专项 reference |
50
51
  | `data-compare` | 编辑页变更对比和汇总 | `data-compare.md` |
52
+ | `design-apply` | 设计变更集落地:语义 ID 三级匹配、结构/形态/两层样式转换、L3 新模块、合规闸门 | `design-apply.md`、`mapping/`、`parser/` |
51
53
 
52
54
  ## 工作流
53
55
 
@@ -55,7 +57,7 @@ tags: [vue3, typescript, element-plus, pinia, vite, unocss, crud, demo, code-qua
55
57
 
56
58
  - 确认目标项目根目录;没有明确目标时先询问,不在技能仓库里写业务代码。
57
59
  - 判断是 Demo 验证、功能增量还是正式业务开发。
58
- - 判断是否有设计稿或 `design-handoff/v1` JSON。没有时保留目标项目当前初始化视觉;有时按设计要求落地,不让开发技能自行设计。
60
+ - 保留目标项目当前初始化视觉,不让开发技能自行设计。
59
61
 
60
62
  ### 2. 读取事实
61
63
 
@@ -72,20 +74,13 @@ tags: [vue3, typescript, element-plus, pinia, vite, unocss, crud, demo, code-qua
72
74
  - Demo 可以最小化数据和接口,但目录、类型、命名和组件边界要能承接后续开发。
73
75
  - 新依赖先检查目标项目;缺失时说明精确版本、原因和构建接线,确认后再安装。
74
76
  - 只有目标项目确实存在排除项、占位插件或缺失接线时,才读取 `addon-enable.md` 恢复配置。
77
+ - **输入为设计变更集时**:不走常规闭环,改走 `design-apply.md` 协议——变更集是设计技能(project-ui-design)的中立产出(设计侧不感知下游),本 Skill 是统一获取与执行方;parser 匹配出施工坐标后按「结构先行、样式两层转换」落地,并过变更集合规闸门。
75
78
 
76
- ### 4. 设计交接
77
-
78
- - 发现 `$schema: design-handoff/v1` 后,读取 `references/design-handoff.md`。
79
- - 动手前初始化 handoff session;设计决定视觉、结构和交互意图,本技能只负责映射到真实模板并保留业务逻辑。
80
- - 只修改 handoff 明确覆盖的文件和页面;不为通过检查虚构修改、不强制全项目遍历。
81
- - 项目级视觉改造只有在用户明确要求时才执行;单页 Demo 默认只处理当前页面及必要共享组件。
82
-
83
- ### 5. 验证与交付
79
+ ### 4. 验证与交付
84
80
 
85
81
  - 对照 `references/code-quality.md` 检查类型、组件复用、API、路由、权限、安全、异常反馈、响应式和可演进性。
86
82
  - 在目标项目执行 `pnpm lint:fix`、`pnpm type-check`;改动构建配置时再执行 `pnpm build`。
87
- - 有 handoff 时:落地前 init session,完成后 handoff check(`--require-session`)须 **exit 0** 才能声称设计落地完成。
88
- - 最终说明:命中能力组、修改文件、功能验证、设计落地范围、命令结果、未解决问题和下一步。
83
+ - 最终说明:命中能力组、修改文件、功能验证、命令结果、未解决问题和下一步。
89
84
 
90
85
  ## 项目事实优先级
91
86
 
@@ -97,7 +92,7 @@ tags: [vue3, typescript, element-plus, pinia, vite, unocss, crud, demo, code-qua
97
92
  - 不二次挂载 `Layout`,不把模板演示页原样当业务页面。
98
93
  - 不使用裸 `v-if` 代替权限指令,不使用不可信 `v-html`。
99
94
  - 不为了视觉效果引入未经确认的新 UI 框架或图表库。
100
- - 不把 lint 通过当成业务闭环完成,也不把 handoff 文件修改数量当成设计质量证明。
95
+ - 不把 lint 通过当成业务闭环完成。
101
96
 
102
97
  ## 最终回复格式
103
98
 
@@ -110,7 +105,6 @@ tags: [vue3, typescript, element-plus, pinia, vite, unocss, crud, demo, code-qua
110
105
 
111
106
  ## 验证结果
112
107
  - 功能:...
113
- - 设计交接:未涉及 | 已按 handoff 落地 ...
114
108
  - `pnpm lint:fix`:通过 | 失败(原因)
115
109
  - `pnpm type-check`:通过 | 失败(原因)
116
110
  - 待确认:...
package/bin/cli.js CHANGED
@@ -18,23 +18,21 @@
18
18
  * npx @qilitt-mickey/vue3-temp-skill@latest update
19
19
  */
20
20
 
21
- const fs = require("fs");
22
- const path = require("path");
23
- const os = require("os");
24
- const { execFileSync, execSync } = require("child_process");
21
+ import fs from "node:fs";
22
+ import path from "node:path";
23
+ import os from "node:os";
24
+ import { execFileSync, execSync } from "node:child_process";
25
+ import { fileURLToPath } from "node:url";
25
26
 
26
27
  const HOME = os.homedir();
27
28
  // bin/cli.js → 上一级即包根目录
29
+ const __dirname = path.dirname(fileURLToPath(import.meta.url));
28
30
  const SKILL_DIR = path.resolve(__dirname, "..");
29
31
  const SKILL_NAME = "vue3-temp-skill";
30
32
  const TRACK_FILE = path.join(HOME, ".vue3-temp-skill.json");
31
33
  // 只复制 AI 运行时真正需要的文件;validate/check/cli 属于作者侧工具,不随技能分发
32
- const RUNTIME_SCRIPT_FILES = ["match.py", "modules.json", "handoff.mjs"];
33
-
34
- // ============================================================
35
- // 版本
36
- // ============================================================
37
- const PKG_VERSION = require(path.join(SKILL_DIR, "package.json")).version;
34
+ const RUNTIME_SCRIPT_FILES = ["match.py", "modules.json"];
35
+ const PKG_VERSION = JSON.parse(fs.readFileSync(path.join(SKILL_DIR, "package.json"), "utf-8")).version;
38
36
 
39
37
  // ============================================================
40
38
  // AI 工具配置
@@ -130,14 +128,16 @@ function copyFile(src, dest) {
130
128
 
131
129
  /**
132
130
  * 复制目录(仅用于 references/ 等已知安全的小目录)
131
+ * @param {string[]} [skipDirs] 需要排除的子目录名(不随分发,如 fixtures 作者侧回归数据)
133
132
  */
134
- function copyDir(src, dest) {
133
+ function copyDir(src, dest, skipDirs = []) {
135
134
  ensureDir(dest);
136
135
  for (const entry of fs.readdirSync(src, { withFileTypes: true })) {
137
136
  if (entry.name.startsWith(".") || entry.isSymbolicLink()) continue;
137
+ if (entry.isDirectory() && skipDirs.includes(entry.name)) continue;
138
138
  const s = path.join(src, entry.name);
139
139
  const d = path.join(dest, entry.name);
140
- if (entry.isDirectory()) copyDir(s, d);
140
+ if (entry.isDirectory()) copyDir(s, d, skipDirs);
141
141
  else fs.copyFileSync(s, d);
142
142
  }
143
143
  }
@@ -262,6 +262,13 @@ function installSkills(targetKey, projectDir) {
262
262
  }
263
263
  }
264
264
 
265
+ // design-apply 能力组依赖:mapping/ 词典 + parser/ 解析器(变更集落地的运行时依赖)
266
+ // parser/fixtures/ 为作者侧回归夹具(A-H 八步测试数据),不随技能分发,保留在仓库
267
+ for (const runtimeDir of ["mapping", "parser"]) {
268
+ const src = path.join(SKILL_DIR, runtimeDir);
269
+ if (fs.existsSync(src)) copyDir(src, path.join(dest, runtimeDir), ["fixtures"]);
270
+ }
271
+
265
272
  // Cursor:清理旧版 rules/*.mdc,避免与 skills 重复
266
273
  if (cfg.legacyRulesFile) {
267
274
  const legacy = cfg.legacyRulesFile(projectDir);
@@ -348,8 +355,6 @@ ${bold("命令:")}
348
355
  update [target] 更新已安装的技能(默认更新全部已安装目标)
349
356
  uninstall [target] 卸载技能(默认卸载全部已安装目标)
350
357
  list 查看已安装的目标和版本
351
- handoff init 校验 handoff JSON 规格,在用户级目录建立会话(不污染业务项目)
352
- handoff check 确认目标项目存在设计落地所需的关键接线
353
358
 
354
359
  ${bold("目标 (target):")}
355
360
  cursor → Cursor ~/.cursor/skills/
@@ -382,10 +387,6 @@ ${bold("示例:")}
382
387
 
383
388
  ${dim("# 查看已安装情况")}
384
389
  npx @qilitt-mickey/vue3-temp-skill list
385
-
386
- ${dim("# 设计交接(在业务项目根目录执行)")}
387
- npx @qilitt-mickey/vue3-temp-skill handoff init --project ./my-app --file C:/temp/handoff.json
388
- npx @qilitt-mickey/vue3-temp-skill handoff check --project ./my-app --require-session
389
390
  `);
390
391
  }
391
392
 
@@ -605,36 +606,6 @@ function cmdList() {
605
606
  }
606
607
  }
607
608
 
608
- function cmdHandoff(sub, args, projectDir) {
609
- const proj = projectDir || process.cwd();
610
- const fileIdx = args.indexOf("--file");
611
- const handoffFile = fileIdx !== -1 ? path.resolve(args[fileIdx + 1]) : null;
612
- const stateDirIdx = args.indexOf("--state-dir");
613
- const stateDir = stateDirIdx !== -1 ? path.resolve(args[stateDirIdx + 1]) : null;
614
- const requireSession = args.includes("--require-session");
615
- const scriptDir = path.join(SKILL_DIR, "scripts");
616
-
617
- if (sub !== "init" && sub !== "check") {
618
- console.error(red("✗ handoff 子命令: init | check"));
619
- console.error(dim(" handoff init --project <dir> --file <handoff.json> [--state-dir <dir>]"));
620
- console.error(dim(" handoff check --project <dir> [--state-dir <dir>] [--require-session]"));
621
- console.error(dim(" 默认状态目录见 README.md「设计落地」"));
622
- process.exit(1);
623
- }
624
-
625
- const script = path.join(scriptDir, "handoff.mjs");
626
- const childArgs = [script, sub, "--project", proj];
627
- if (sub === "init" && handoffFile) childArgs.push("--file", handoffFile);
628
- if (stateDir) childArgs.push("--state-dir", stateDir);
629
- if (sub === "check" && requireSession) childArgs.push("--require-session");
630
-
631
- try {
632
- execFileSync(process.execPath, childArgs, { stdio: "inherit" });
633
- } catch (e) {
634
- process.exit(e.status ?? 1);
635
- }
636
- }
637
-
638
609
  // ============================================================
639
610
  // 入口
640
611
  // ============================================================
@@ -670,9 +641,6 @@ function main() {
670
641
  case "list":
671
642
  cmdList();
672
643
  break;
673
- case "handoff":
674
- cmdHandoff(target, args.slice(2), projectDir);
675
- break;
676
644
  default:
677
645
  // 兼容旧用法:直接传 target 名当作 install
678
646
  if (TARGETS[command] || command === "all") {
@@ -0,0 +1,33 @@
1
+ // AUTO-GENERATED by vue3-temp-skill parser/generator.js — DO NOT EDIT
2
+
3
+ /** 语义 ID 映射条目(结构与 mapping/scenes/**.json 条目一致) */
4
+ export interface SemanticMappingEntry {
5
+ type: 'module' | 'component' | 'element' | 'global_component' | 'global_token';
6
+ selector?: string;
7
+ component?: string;
8
+ file?: string;
9
+ style_scope: string;
10
+ default_props?: Record<string, unknown>;
11
+ children?: string[];
12
+ forms?: Record<string, string>;
13
+ visible_prop?: string;
14
+ css_vars?: Record<string, string>;
15
+ custom_style_map?: Record<string, string>;
16
+ [key: string]: unknown;
17
+ }
18
+
19
+ /** 设计变更集(design.changeset/1.0 输入,兼容历史值 design-changeset/v1) */
20
+ export interface DesignChangeset {
21
+ schema: 'design.changeset/1.0' | 'design-changeset/v1';
22
+ mapping_version?: string;
23
+ scene: string;
24
+ layout_type?: string;
25
+ global?: Record<string, Record<string, string | number>>;
26
+ changes: Array<{
27
+ id: string;
28
+ visible?: boolean;
29
+ position?: Record<string, string>;
30
+ form?: string;
31
+ style?: Record<string, string | number>;
32
+ }>;
33
+ }
@@ -0,0 +1,61 @@
1
+ // AUTO-GENERATED by vue3-temp-skill parser/generator.js — DO NOT EDIT
2
+ // 链路 A 运行时入口:themeVars + overrideMapping(业务级覆写,V3.1 §3.4.4.3)
3
+ // 用法:import { themeVars, overrideMapping } from '@qilitt-mickey/vue3-temp-skill/dist/theme-vars.js';
4
+ // const custom = overrideMapping(themeVars, { color: { brandPrimary: '#ff6600' } });
5
+ export const themeVars = {
6
+ brandPrimary: '',
7
+ brandHover: '',
8
+ brandActive: '',
9
+ successColor: '',
10
+ warningColor: '',
11
+ errorColor: '',
12
+ textPrimary: '',
13
+ textSecondary: '',
14
+ textTertiary: '',
15
+ textDisabled: '',
16
+ borderColor: '',
17
+ borderColorSecondary: '',
18
+ componentBg: '',
19
+ layoutBg: '',
20
+ primaryBg: '',
21
+ radiusSm: '4px',
22
+ radiusBase: '6px',
23
+ radiusLg: '8px',
24
+ dialogRadius: '10px',
25
+ switchRadius: '10px',
26
+ spaceUnit: '4px',
27
+ spacingSm: '8px',
28
+ spacingMd: '16px',
29
+ spacingLg: '24px',
30
+ contentPadding: '8px',
31
+ cardPadding: '24px',
32
+ controlPaddingX: '12px',
33
+ buttonPaddingX: '15px',
34
+ headerPaddingX: '16px',
35
+ fontFamily: '系统栈(PingFang SC / Microsoft YaHei 等)',
36
+ fontSizeSm: '12px',
37
+ fontSizeBase: '14px',
38
+ fontSizeLg: '16px',
39
+ fontSizeXl: '20px',
40
+ fontWeightRegular: '400',
41
+ fontWeightMedium: '500',
42
+ fontWeightSemibold: '600',
43
+ lineHeight: '1.5715',
44
+ bpMobile: '',
45
+ bpCollapse: '',
46
+ bpExpand: '',
47
+ unocssSm: '',
48
+ unocssMd: '',
49
+ unocssLg: '',
50
+ unocssXl: '',
51
+ headerHeight: '48px',
52
+ tabsHeight: '32px',
53
+ sidebarWidth: '208px',
54
+ sidebarCollapsedWidth: '64px',
55
+ sidebarCollapseBarHeight: '40px',
56
+ layoutFooterHeight: '48px',
57
+ tabsItemHeight: '46px',
58
+ menuItemHeight: '40px',
59
+ };
60
+
61
+ export { overrideMapping, overrideMappings } from '../parser/override.js';
@@ -0,0 +1,111 @@
1
+ // AUTO-GENERATED by vue3-temp-skill parser/generator.js — DO NOT EDIT
2
+ export const themeVars = {
3
+ /** --brand-primary */
4
+ /** --brand-hover */
5
+ /** --brand-active */
6
+ /** --success-color */
7
+ /** --warning-color */
8
+ /** --error-color */
9
+ /** --text-primary */
10
+ /** --text-secondary */
11
+ /** --text-tertiary */
12
+ /** --text-disabled */
13
+ /** --border-color */
14
+ /** --border-color-secondary */
15
+ /** --component-bg */
16
+ /** --layout-bg */
17
+ /** --primary-bg */
18
+ /** --radius-sm → --border-radius-sm 出厂 4px */
19
+ /** --radius-base → --border-radius-base 出厂 6px */
20
+ /** --radius-lg → --border-radius-lg 出厂 8px */
21
+ /** --dialog-border-radius 出厂 10px */
22
+ /** --switch-border-radius 出厂 10px */
23
+ /** --space-unit 出厂 4px */
24
+ /** --spacing-sm 出厂 8px */
25
+ /** --spacing-md 出厂 16px */
26
+ /** --spacing-lg 出厂 24px */
27
+ /** --layout-content-padding → --vts-margin 出厂 8px */
28
+ /** --card-padding → --vts-card-padding 出厂 24px */
29
+ /** --control-padding-x 出厂 12px */
30
+ /** --button-padding-x 出厂 15px */
31
+ /** --header-padding-x 出厂 16px */
32
+ /** --font-family → --el-font-family 出厂 系统栈(PingFang SC / Microsoft YaHei 等) */
33
+ /** --font-size-sm → --el-font-size-small 出厂 12px */
34
+ /** --font-size-base → --el-font-size-base 出厂 14px */
35
+ /** --font-size-lg → --el-font-size-large 出厂 16px */
36
+ /** --font-size-xl → --el-font-size-extra-large 出厂 20px */
37
+ /** --font-weight-regular → --el-font-weight-primary 出厂 400 */
38
+ /** --font-weight-medium 出厂 500 */
39
+ /** --font-weight-semibold 出厂 600 */
40
+ /** --line-height 出厂 1.5715 */
41
+ /** value token */
42
+ /** value token */
43
+ /** value token */
44
+ /** value token */
45
+ /** value token */
46
+ /** value token */
47
+ /** value token */
48
+ /** --header-height → --vts-bar-height 出厂 48px */
49
+ /** --tabs-height → --vts-tabs-height 出厂 32px */
50
+ /** --sidebar-width 出厂 208px */
51
+ /** --sidebar-collapsed-width 出厂 64px */
52
+ /** --sidebar-collapse-bar-height 出厂 40px */
53
+ /** --layout-footer-height 出厂 48px */
54
+ /** --tabs-item-height 出厂 46px */
55
+ /** --el-menu-item-height 出厂 40px */
56
+ brandPrimary: '' as string,
57
+ brandHover: '' as string,
58
+ brandActive: '' as string,
59
+ successColor: '' as string,
60
+ warningColor: '' as string,
61
+ errorColor: '' as string,
62
+ textPrimary: '' as string,
63
+ textSecondary: '' as string,
64
+ textTertiary: '' as string,
65
+ textDisabled: '' as string,
66
+ borderColor: '' as string,
67
+ borderColorSecondary: '' as string,
68
+ componentBg: '' as string,
69
+ layoutBg: '' as string,
70
+ primaryBg: '' as string,
71
+ radiusSm: '4px' as string,
72
+ radiusBase: '6px' as string,
73
+ radiusLg: '8px' as string,
74
+ dialogRadius: '10px' as string,
75
+ switchRadius: '10px' as string,
76
+ spaceUnit: '4px' as string,
77
+ spacingSm: '8px' as string,
78
+ spacingMd: '16px' as string,
79
+ spacingLg: '24px' as string,
80
+ contentPadding: '8px' as string,
81
+ cardPadding: '24px' as string,
82
+ controlPaddingX: '12px' as string,
83
+ buttonPaddingX: '15px' as string,
84
+ headerPaddingX: '16px' as string,
85
+ fontFamily: '系统栈(PingFang SC / Microsoft YaHei 等)' as string,
86
+ fontSizeSm: '12px' as string,
87
+ fontSizeBase: '14px' as string,
88
+ fontSizeLg: '16px' as string,
89
+ fontSizeXl: '20px' as string,
90
+ fontWeightRegular: '400' as string,
91
+ fontWeightMedium: '500' as string,
92
+ fontWeightSemibold: '600' as string,
93
+ lineHeight: '1.5715' as string,
94
+ bpMobile: '' as string,
95
+ bpCollapse: '' as string,
96
+ bpExpand: '' as string,
97
+ unocssSm: '' as string,
98
+ unocssMd: '' as string,
99
+ unocssLg: '' as string,
100
+ unocssXl: '' as string,
101
+ headerHeight: '48px' as string,
102
+ tabsHeight: '32px' as string,
103
+ sidebarWidth: '208px' as string,
104
+ sidebarCollapsedWidth: '64px' as string,
105
+ sidebarCollapseBarHeight: '40px' as string,
106
+ layoutFooterHeight: '48px' as string,
107
+ tabsItemHeight: '46px' as string,
108
+ menuItemHeight: '40px' as string,
109
+ } as const;
110
+
111
+ export type ThemeVarKey = keyof typeof themeVars;
package/dist/theme.css ADDED
@@ -0,0 +1,72 @@
1
+ /* AUTO-GENERATED by vue3-temp-skill parser/generator.js — DO NOT EDIT */
2
+ /* 链路 A(基线注入)产物:全局令牌变量基线(V3.1 §4.5.3)。
3
+ * 仅空白新项目从零接入 Skill 主题体系时在样式入口引入一次;
4
+ * 成熟模板项目(自有 design-tokens.scss 权威令牌源)不得引入,避免双令牌源冲突。 */
5
+ :root {
6
+ /* brand_primary → --brand-primary(无出厂值,需项目侧定值) */
7
+ /* brand_hover → --brand-hover(无出厂值,需项目侧定值) */
8
+ /* brand_active → --brand-active(无出厂值,需项目侧定值) */
9
+ /* success_color → --success-color(无出厂值,需项目侧定值) */
10
+ /* warning_color → --warning-color(无出厂值,需项目侧定值) */
11
+ /* error_color → --error-color(无出厂值,需项目侧定值) */
12
+ /* text_primary → --text-primary(无出厂值,需项目侧定值) */
13
+ /* text_secondary → --text-secondary(无出厂值,需项目侧定值) */
14
+ /* text_tertiary → --text-tertiary(无出厂值,需项目侧定值) */
15
+ /* text_disabled → --text-disabled(无出厂值,需项目侧定值) */
16
+ /* border_color → --border-color(无出厂值,需项目侧定值) */
17
+ /* border_color_secondary → --border-color-secondary(无出厂值,需项目侧定值) */
18
+ /* component_bg → --component-bg(无出厂值,需项目侧定值) */
19
+ /* layout_bg → --layout-bg(无出厂值,需项目侧定值) */
20
+ /* primary_bg → --primary-bg(无出厂值,需项目侧定值) */
21
+ --radius-sm: 4px; /* ← radius_sm */
22
+ --border-radius-sm: 4px; /* ← radius_sm */
23
+ --radius-base: 6px; /* ← radius_base */
24
+ --border-radius-base: 6px; /* ← radius_base */
25
+ --radius-lg: 8px; /* ← radius_lg */
26
+ --border-radius-lg: 8px; /* ← radius_lg */
27
+ --dialog-border-radius: 10px; /* ← dialog_radius */
28
+ --switch-border-radius: 10px; /* ← switch_radius */
29
+ --space-unit: 4px; /* ← space_unit */
30
+ --spacing-sm: 8px; /* ← spacing_sm */
31
+ --spacing-md: 16px; /* ← spacing_md */
32
+ --spacing-lg: 24px; /* ← spacing_lg */
33
+ --layout-content-padding: 8px; /* ← content_padding */
34
+ --vts-margin: 8px; /* ← content_padding */
35
+ --card-padding: 24px; /* ← card_padding */
36
+ --vts-card-padding: 24px; /* ← card_padding */
37
+ --control-padding-x: 12px; /* ← control_padding_x */
38
+ --button-padding-x: 15px; /* ← button_padding_x */
39
+ --header-padding-x: 16px; /* ← header_padding_x */
40
+ --font-family: 系统栈(PingFang SC / Microsoft YaHei 等); /* ← font_family */
41
+ --el-font-family: 系统栈(PingFang SC / Microsoft YaHei 等); /* ← font_family */
42
+ --font-size-sm: 12px; /* ← font_size_sm */
43
+ --el-font-size-small: 12px; /* ← font_size_sm */
44
+ --font-size-base: 14px; /* ← font_size_base */
45
+ --el-font-size-base: 14px; /* ← font_size_base */
46
+ --font-size-lg: 16px; /* ← font_size_lg */
47
+ --el-font-size-large: 16px; /* ← font_size_lg */
48
+ --font-size-xl: 20px; /* ← font_size_xl */
49
+ --el-font-size-extra-large: 20px; /* ← font_size_xl */
50
+ --font-weight-regular: 400; /* ← font_weight_regular */
51
+ --el-font-weight-primary: 400; /* ← font_weight_regular */
52
+ --font-weight-medium: 500; /* ← font_weight_medium */
53
+ --font-weight-semibold: 600; /* ← font_weight_semibold */
54
+ --line-height: 1.5715; /* ← line_height */
55
+ /* bp_mobile → (value token)(无出厂值,需项目侧定值) */
56
+ /* bp_collapse → (value token)(无出厂值,需项目侧定值) */
57
+ /* bp_expand → (value token)(无出厂值,需项目侧定值) */
58
+ /* unocss_sm → (value token)(无出厂值,需项目侧定值) */
59
+ /* unocss_md → (value token)(无出厂值,需项目侧定值) */
60
+ /* unocss_lg → (value token)(无出厂值,需项目侧定值) */
61
+ /* unocss_xl → (value token)(无出厂值,需项目侧定值) */
62
+ --header-height: 48px; /* ← header_height */
63
+ --vts-bar-height: 48px; /* ← header_height */
64
+ --tabs-height: 32px; /* ← tabs_height */
65
+ --vts-tabs-height: 32px; /* ← tabs_height */
66
+ --sidebar-width: 208px; /* ← sidebar_width */
67
+ --sidebar-collapsed-width: 64px; /* ← sidebar_collapsed_width */
68
+ --sidebar-collapse-bar-height: 40px; /* ← sidebar_collapse_bar_height */
69
+ --layout-footer-height: 48px; /* ← layout_footer_height */
70
+ --tabs-item-height: 46px; /* ← tabs_item_height */
71
+ --el-menu-item-height: 40px; /* ← menu_item_height */
72
+ }
@@ -0,0 +1,34 @@
1
+ {
2
+ "$comment": "全局原子层 · 基础色彩令牌映射。abstract_field 为设计侧抽象样式字段名(纯视觉语义);token 为项目侧实现令牌(design-tokens.scss :root 或 EP 官方变量);design_range 为设计侧可选值域说明。由 vue3-temp-skill mapping 体系维护,禁止业务项目修改。",
3
+ "meta": {
4
+ "layer": "basic",
5
+ "domain": "color",
6
+ "version": "1.0.0",
7
+ "scene": "global",
8
+ "tech_stack": "vue3 + element-plus + vue3-web-temp"
9
+ },
10
+ "tokens": {
11
+ "brand_primary": { "token": "--brand-primary", "type": "color", "desc": "品牌主色" },
12
+ "brand_hover": { "token": "--brand-hover", "type": "color", "desc": "品牌悬停色" },
13
+ "brand_active": { "token": "--brand-active", "type": "color", "desc": "品牌激活色" },
14
+ "success_color": { "token": "--success-color", "type": "color", "desc": "成功功能色" },
15
+ "warning_color": { "token": "--warning-color", "type": "color", "desc": "警告功能色" },
16
+ "error_color": { "token": "--error-color", "type": "color", "desc": "错误功能色" },
17
+ "text_primary": { "token": "--text-primary", "type": "color", "desc": "主文字色" },
18
+ "text_secondary": { "token": "--text-secondary", "type": "color", "desc": "次文字色" },
19
+ "text_tertiary": { "token": "--text-tertiary", "type": "color", "desc": "三级文字色" },
20
+ "text_disabled": { "token": "--text-disabled", "type": "color", "desc": "禁用文字色" },
21
+ "border_color": { "token": "--border-color", "type": "color", "desc": "主边框色" },
22
+ "border_color_secondary": { "token": "--border-color-secondary", "type": "color", "desc": "次边框色" },
23
+ "component_bg": { "token": "--component-bg", "type": "color", "desc": "组件面background(卡片/弹层底色)" },
24
+ "layout_bg": { "token": "--layout-bg", "type": "color", "desc": "页面布局背景" },
25
+ "primary_bg": { "token": "--primary-bg", "type": "color", "desc": "主色浅底(自动 color-mix 派生,一般不直改)" }
26
+ },
27
+ "el_bridge": {
28
+ "$comment": "EP 官方变量桥接关系(只读说明):--brand-primary 等经 design-tokens.scss 自动桥接至 --el-color-primary/--el-bg-color/--el-text-color-* 等,设计侧无需输出 --el-* 字段。",
29
+ "brand_primary_to_el": "--el-color-primary",
30
+ "component_bg_to_el": "--el-bg-color",
31
+ "layout_bg_to_el": "--el-bg-color-page",
32
+ "text_primary_to_el": "--el-text-color-primary"
33
+ }
34
+ }
@@ -0,0 +1,17 @@
1
+ {
2
+ "$comment": "全局原子层 · 圆角令牌映射。radius 为设计侧抽象字段;token 为项目实现令牌(design-tokens.scss :root,并桥接 EP --el-border-radius-*)。",
3
+ "meta": {
4
+ "layer": "basic",
5
+ "domain": "radius",
6
+ "version": "1.0.0",
7
+ "scene": "global",
8
+ "tech_stack": "vue3 + element-plus + vue3-web-temp"
9
+ },
10
+ "tokens": {
11
+ "radius_sm": { "token": "--radius-sm → --border-radius-sm", "type": "size", "default": "4px", "desc": "小控件圆角(Tag/小按钮)", "el_bridge": "--el-border-radius-small" },
12
+ "radius_base": { "token": "--radius-base → --border-radius-base", "type": "size", "default": "6px", "desc": "标准控件圆角(按钮/输入框)", "el_bridge": "--el-border-radius-base" },
13
+ "radius_lg": { "token": "--radius-lg → --border-radius-lg", "type": "size", "default": "8px", "desc": "卡片级圆角", "el_bridge": null },
14
+ "dialog_radius": { "token": "--dialog-border-radius", "type": "size", "default": "10px", "desc": "弹窗圆角(出厂 ReDialog 观感)", "el_bridge": null },
15
+ "switch_radius": { "token": "--switch-border-radius", "type": "size", "default": "10px", "desc": "开关圆角", "el_bridge": null }
16
+ }
17
+ }