CSS 自定义属性名大小写敏感,而 semanticVars() 的键是 camelCase、样式表读的是
kebab-case:chrome.ts 直接写 `--ot-${key}` 时,9 个多词变量(--ot-text-muted、
--ot-text-secondary、--ot-surface-raised、--ot-border-strong、--ot-success-fg、
--ot-danger-fg、--ot-warning-fg、--ot-info-fg、--ot-scrollbar-active、
--ot-focus-ring)从未真正生效,元素一律回落到 global.css :root 的深色兜底值——
浅色主题正是靠这些变量修可读性的,等于白改(--ot-text-muted 48 处引用仍是
#8a8a8a,白底 3.25:1;--ot-danger-fg 仍是 #f85149,3.15:1)。
- 键 `muted` 改名 `textMuted`(CSS 读的是 --ot-text-muted)
- 新增 semantic.ts 的 cssVarName()/semanticCssVars(),chrome.ts 只调用它们,
命名逻辑单一来源
- 新增 tests/ot-var-names.mjs:把「CSS 引用名 = JS 写入名 = :root 声明名」
三集合锁在一起(值测试看不出这类问题),已用「去掉转换」验证会失败
- AGENTS/STATE 同步该铁律;测试数 22/25 的陈旧计数修正为实际的 29
51 lines
2.5 KiB
JSON
51 lines
2.5 KiB
JSON
{
|
|
"name": "open-terminal",
|
|
"productName": "OpenTerminal",
|
|
"version": "1.0.28",
|
|
"description": "Open-source terminal with SSH, split panes, themes and fonts",
|
|
"main": "out/main/index.js",
|
|
"author": "CodingPlan.Site",
|
|
"license": "MIT",
|
|
"private": true,
|
|
"scripts": {
|
|
"dev": "electron-vite dev",
|
|
"build": "electron-vite build",
|
|
"preview": "electron-vite preview",
|
|
"typecheck": "tsc --noEmit -p tsconfig.node.json && tsc --noEmit -p tsconfig.web.json",
|
|
"pretest": "npm run typecheck",
|
|
"test": "node tests/build-bundles.cjs && node tests/ssh-loopback.mjs && node tests/commands-store.mjs && node tests/connections-store.mjs && node tests/settings-store.mjs && node tests/local-path-grants.mjs && node tests/lock-store.mjs && node tests/lock-controller.mjs && node tests/lock-shortcuts.mjs && node tests/reserved-accelerators.mjs && node tests/.terminal-title.cjs && node tests/ipc-guard.mjs && node tests/updater-fallback.mjs && node tests/log-sanitizer.mjs && node tests/app-log.mjs && node tests/sftp-timeout.mjs && node tests/.hl-split-smoke.cjs && node tests/.hl-rules.cjs && node tests/zmodem-e2e.mjs && node tests/ssh-session-e2e.mjs && node tests/sysinfo-e2e.mjs && node tests/terminal-cwd.mjs && node tests/terminal-links.mjs && node tests/broadcast-store.mjs && node tests/write-batcher.mjs && node tests/refit-throttle.mjs && node tests/semantic-theme.mjs && node tests/theme-contrast.mjs && node tests/css-theme-vars.mjs && node tests/ot-var-names.mjs",
|
|
"predist": "node scripts/verify-deps.cjs && npm test && npm install --package-lock-only",
|
|
"dist": "electron-vite build && electron-builder --win nsis",
|
|
"dist:dir": "electron-vite build && electron-builder --win --dir"
|
|
},
|
|
"dependencies": {
|
|
"@lydell/node-pty": "^1.2.0-beta.15",
|
|
"electron-updater": "^6.8.9",
|
|
"font-list": "^2.1.0",
|
|
"ssh2": "^1.17.0",
|
|
"zmodem.js": "^0.1.10"
|
|
},
|
|
"devDependencies": {
|
|
"@types/node": "^24.0.0",
|
|
"@types/react": "^19.2.0",
|
|
"@types/react-dom": "^19.2.0",
|
|
"@vitejs/plugin-react": "^5.0.0",
|
|
"@xterm/addon-fit": "^0.11.0",
|
|
"@xterm/addon-search": "^0.16.0",
|
|
"@xterm/addon-webgl": "^0.19.0",
|
|
"@xterm/xterm": "6.1.0-beta.304",
|
|
"antd": "^6.6.2",
|
|
"dockview-react": "^8.2.0",
|
|
"electron": "^44.2.0",
|
|
"electron-builder": "^26.15.3",
|
|
"electron-vite": "^5.0.0",
|
|
"esbuild": "^0.25.12",
|
|
"react": "^19.2.8",
|
|
"react-dom": "^19.2.8",
|
|
"typescript": "~5.9.0",
|
|
"undici": "^7.29.1",
|
|
"vite": "^7.0.0",
|
|
"zustand": "^5.0.15"
|
|
}
|
|
}
|