feat: 构建系统重构 + VCHSM 架构迁移 + 右键菜单修复 + 尺寸参数统一

## 构建、打包与分发系统重构 (build/)

- 构建系统收敛至 build/ 目录:build.mjs + electron-builder.js + 6 个脚本

- electron-builder 配置从 package.json 提取为 build/electron-builder.js

- 新增 --edition (personal/enterprise) 和 --channel (stable/beta/alpha) 参数

- OSS 路径按渠道隔离

- 新增 pre-build-check.mjs:Git/CHANGELOG/版本/环境变量校验

- 新增 bump-version.mjs:版本号管理 + CHANGELOG 自动生成

- updater.ts 发送 channel/edition/deviceFingerprint

- 新增 src/shared/utils/rollout.ts 灰度测试工具

- 新增 10 条 NPM 脚本

## VCHSM 五层架构迁移

- 7 个业务模块 + ~500 处导入路径同步

## 修复

- MediaCardContextMenu 改用共享 ContextMenu 组件

- ComboBox 尺寸参数显示统一 (size-format.ts)

## 文档

- UpdateA.md / build/README.md / README.md / .env.example 更新

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2026-06-29 18:41:07 +08:00
parent e0d91335c7
commit 337d6c1205
187 changed files with 5252 additions and 1702 deletions

View File

@@ -0,0 +1,75 @@
// ============================================================
// Keyboard Key Constants — 键盘按键枚举值
//
// 用法:
// import { Key } from '@shared/constants/keyboard';
// if (e.key === Key.Delete) { ... }
// if (e.key === Key.ArrowLeft) { ... }
//
// 避免手动编写字符串,防止拼写错误。
// ============================================================
export const Key = {
// ── 导航键 ──
Enter: 'Enter',
Escape: 'Escape',
Tab: 'Tab',
Space: ' ',
Backspace: 'Backspace',
Delete: 'Delete',
// ── 方向键 ──
ArrowUp: 'ArrowUp',
ArrowDown: 'ArrowDown',
ArrowLeft: 'ArrowLeft',
ArrowRight: 'ArrowRight',
// ── 定位键 ──
Home: 'Home',
End: 'End',
PageUp: 'PageUp',
PageDown: 'PageDown',
// ── 修饰键 ──
Control: 'Control',
Shift: 'Shift',
Alt: 'Alt',
Meta: 'Meta',
// ── 字母 ──
A: 'a', B: 'b', C: 'c', D: 'd',
E: 'e', F: 'f', G: 'g', H: 'h',
I: 'i', J: 'j', K: 'k', L: 'l',
M: 'm', N: 'n', O: 'o', P: 'p',
Q: 'q', R: 'r', S: 's', T: 't',
U: 'u', V: 'v', W: 'w', X: 'x',
Y: 'y', Z: 'z',
// ── 数字 ──
Digit0: '0',
Digit1: '1',
Digit2: '2',
Digit3: '3',
Digit4: '4',
Digit5: '5',
Digit6: '6',
Digit7: '7',
Digit8: '8',
Digit9: '9',
// ── 功能键 ──
F1: 'F1',
F2: 'F2',
F3: 'F3',
F4: 'F4',
F5: 'F5',
F6: 'F6',
F7: 'F7',
F8: 'F8',
F9: 'F9',
F10: 'F10',
F11: 'F11',
F12: 'F12',
} as const;
export type Key = (typeof Key)[keyof typeof Key];