dsh-opencode-palette 2.0.2 → 2.0.3

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 (2) hide show
  1. package/lib/client.js +26 -3
  2. package/package.json +4 -1
package/lib/client.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * dsh-opencode-palette v2.0.2 — 浏览器半(构建产物,勿手改)
2
+ * dsh-opencode-palette v2.0.3 — 浏览器半(构建产物,勿手改)
3
3
  * 数据驱动管线:opencode v1.18.12 官方主题 JSON → 颜色解析 → DSH 适配注入
4
4
  * 面板「检查更新」:dsh-plugin-update 客户端入口经构建期内联(vendor)
5
5
  * 源:src/engine/* + runtime/*.mjs + npm 包 dsh-log / dsh-plugin-update 的客户端入口
@@ -971,7 +971,8 @@ const TOKEN_MAP = [
971
971
  ['--dsw-alias-bg-overlay', 'background'],
972
972
  ['--dsw-alias-bg-layer-3', 'background'],
973
973
  ['--dsw-specific-sidebar-fill', 'background'],
974
- ['--dsw-specific-menu', 'background'],
974
+ // F3 退出:--dsw-specific-menu 不透明底杀毛玻璃(DSH 0.1.7 起半透明材料 + web-styling 禁止覆盖菜单材料)
975
+ // 老版影响为菜单回默认、可读,不算功能回归;菜单材料/滤镜变量永不输出。
975
976
  ['--dsw-alias-markdown-code-segment-unselected', 'background'],
976
977
  ['--dsw-alias-markdown-code-segment-selected', 'backgroundElement'],
977
978
  // 中层芯片:step2(DSH 深色 850 级:tag/placeholder/bubble/multi-select)
@@ -990,6 +991,8 @@ const TOKEN_MAP = [
990
991
  ['--dsw-specific-login-input', 'backgroundPanel'],
991
992
  ['--dsw-alias-markdown-code-block', 'backgroundPanel'],
992
993
  ['--dsw-alias-markdown-code-block-banner', 'backgroundElement'],
994
+ // F2 新头部(DSH 0.1.7 CodeCard.header 只读此变量,不读 banner token;老横幅路径保留,老版继续命中)
995
+ ['--dsl-code-block-background', 'backgroundElement'],
993
996
  ['--dsw-alias-toast-bg', 'backgroundElement'],
994
997
  ['--dsw-alias-tooltip-bg', 'backgroundElement'],
995
998
  ['--dsw-alias-button-elevated-fill', 'backgroundPanel'],
@@ -1001,6 +1004,8 @@ const TOKEN_MAP = [
1001
1004
  ['--dsw-alias-label-tertiary', 'textMuted'],
1002
1005
  ['--dsw-alias-label-caption', 'textMuted'],
1003
1006
  ['--dsw-alias-label-primary-bluish', 'markdownLink'],
1007
+ // F1 链接(上游 .markdown a 只读此变量;老 bluish/shiki-link/裸 a 规则全部保留,加法兼容)
1008
+ ['--dsw-alias-link', 'markdownLink'],
1004
1009
  // 品牌与状态(含旧报告 R2/R3 修复后迁入派生的 invert/dimmed/ghost,见 §2)
1005
1010
  ['--dsw-alias-brand-primary', 'primary'],
1006
1011
  ['--dsw-alias-brand-text', 'primary'],
@@ -1019,6 +1024,20 @@ const TOKEN_MAP = [
1019
1024
  ['--dsw-alias-border-l3', 'borderActive'],
1020
1025
  ['--dsw-alias-border-l4', 'borderActive'],
1021
1026
  ['--dsw-alias-button-ghost-active-border', 'borderActive'],
1027
+ // F5 新增缺口(DSH 0.1.7 rc.1/rc.2 design-platform diff 全量直配;缺槽/透明靠 usable() 跳过,不污染)
1028
+ // diff 系取增/删前景与背景槽直配;state-idle 取中性次级(缺槽即跳过);菜单/toast/tooltip 取中性直配。
1029
+ ['--dsw-alias-code-diff-added', 'diffAdded'],
1030
+ ['--dsw-alias-code-diff-deleted', 'diffRemoved'],
1031
+ ['--dsw-alias-file-diff-added-bg', 'diffAddedBg'],
1032
+ ['--dsw-alias-file-diff-added-gutter', 'diffAddedLineNumberBg'],
1033
+ ['--dsw-alias-file-diff-added-marker', 'diffAdded'],
1034
+ ['--dsw-alias-file-diff-deleted-bg', 'diffRemovedBg'],
1035
+ ['--dsw-alias-file-diff-deleted-gutter', 'diffRemovedLineNumberBg'],
1036
+ ['--dsw-alias-file-diff-deleted-marker', 'diffRemoved'],
1037
+ ['--dsw-alias-state-idle-primary', 'secondary'],
1038
+ ['--dsw-alias-menu-icon', 'textMuted'],
1039
+ ['--dsw-alias-toast-label', 'text'],
1040
+ ['--dsw-alias-tooltip-key-bg', 'backgroundElement'],
1022
1041
  // 内联代码无芯片(opencode TUI 风格,固定 transparent)
1023
1042
  ['--dsw-alias-markdown-inline-code', '__transparent__'],
1024
1043
  ]
@@ -1088,6 +1107,8 @@ const SHIKI_MAP = [
1088
1107
  const CSS_RULES = [
1089
1108
  { selector: 'body h1,body h2,body h3,body h4,body h5,body h6', prop: 'color', from: 'markdownHeading' },
1090
1109
  { selector: 'a', prop: 'color', from: 'markdownLink' },
1110
+ // F1 链接:与上游 MarkdownText.module.css 选择器镜像(.markdown a 0,1,1 碾压裸 a 0,0,1;老 a 规则保留,老版继续命中)
1111
+ { selector: '.markdown a, .markdown .fileLink', prop: 'color', from: 'markdownLink' },
1091
1112
  { selector: 'code:not(pre code)', prop: 'color', from: 'markdownCode' },
1092
1113
  { selector: 'em', prop: 'color', from: 'markdownEmph' },
1093
1114
  { selector: 'strong', prop: 'color', from: 'markdownStrong' },
@@ -1508,6 +1529,8 @@ function buildTypographyCss(typography) {
1508
1529
  'body,body[data-ds-dark-theme]{',
1509
1530
  '--dsw-font-family:' + bodyFont + ';',
1510
1531
  '--ds-font-family-code:' + codeFont + ';',
1532
+ // F4 新卡片字号(DSH 0.1.7 CodeCard .card/.body 只读此变量;size=13 默认恰好还原上游 11px/19px,跟随 11–18 档)
1533
+ '--dsw-font-markdown-code-block:' + (size - 2) + 'px/' + (size + 6) + 'px var(--ds-font-family-code);',
1511
1534
  '--dsw-font-markdown-base:' + size + 'px/' + lh + 'px var(--dsw-font-family);',
1512
1535
  '--dsw-font-markdown-base-font-size:' + size + 'px;',
1513
1536
  '--dsw-font-markdown-base-line-height:' + lh + 'px;',
@@ -9963,7 +9986,7 @@ const STORAGE_KEY = 'dsh.opencode-palette.v2'
9963
9986
  const LEGACY_STORAGE_KEY = 'dsh.opencode-tui-theme.v2'
9964
9987
  const DEFAULT_STATE = { enabled: true, theme: 'opencode', mode: 'mono', size: 13, fontKey: 'JetBrains Mono' }
9965
9988
  // 构建时由 scripts/build-client.mjs 替换为 package.json 版本(面板底部署小字)
9966
- const PALETTE_VERSION = '2.0.2'
9989
+ const PALETTE_VERSION = '2.0.3'
9967
9990
 
9968
9991
  function getReact() {
9969
9992
  if (typeof require === 'function') { try { return require('react') } catch (e) { /* 动态版无 require */ } }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-opencode-palette",
3
- "version": "2.0.2",
3
+ "version": "2.0.3",
4
4
  "description": "让 DeepSeek Harness 穿上 38 款经典皮肤——东京的霓虹夜色、德古拉的暗红月光、复古工坊的暖黄灯火、黑客帝国的数字雨、玫瑰松林间的风……一键换肤,即点即换,重启不丢。38 legendary skins for DeepSeek Harness — tokyonight's neon dusk, dracula's crimson moon, gruvbox's retro glow, the matrix's digital rain, rose-pine's rosewood calm… one click, instant, persisted.",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",
@@ -35,6 +35,9 @@
35
35
  "dependencies": {
36
36
  "dsh-log": "0.2.1"
37
37
  },
38
+ "engines": {
39
+ "dsh": ">=0.1.0-rc.6 <0.2.0-0"
40
+ },
38
41
  "dsh": {
39
42
  "bundle": {
40
43
  "patch": "./cordis.patch.yml"