feat(canvas): 气泡解组只移出当前节点;画布卡片补强选中态(新增设计 token)
Verify (Gitea) / gate (build · unit · facts) (push) Failing after 1m10s
Verify (Gitea) / gate (build · unit · facts) (push) Failing after 1m10s
1) 节点气泡「解组」语义调整(用户反馈): 原实现解散整个节点组。现在只把**当前选中节点**移出组: - src/runtime-workbench-logic.js 新增 ungroupNode(nid):组内剩 ≥2 个 → 只改成员;剩 1 个 → 组自动解散; 组 id / 名字保持不变,并显式 saveNow 立即落盘。 - app.js 单选气泡按钮改调 ungroupNode(sn.id),提示文案改为「移出节点组」; 多选气泡的「解组」仍是整组解散(语义不同,保持不变)。 2) 画布库卡片选中态(用户反馈:看不出当前选中哪张,易误删): - 原有 .iwb-home-card-selected 只用了 border2(弱描边),且被后面 .iwb-home-card 基础规则按源码顺序覆盖 ⇒ 改为 .iwb-home-card.iwb-home-card-selected(提高优先级,与顺序无关)。 - 新增两个设计 token(单一源 src/theme-tokens.js,生成到 design-tokens.css / tokens.json): · --iwb-sel-surface:选中底色(亮色比卡片略深、暗色比面板略亮) · --iwb-sel-ring:选中描边(由文字色派生:亮色压深 12%、暗色提亮 18%,品牌色为中性灰时也能拉开) - 实测(1440×1000,亮色):未选中 bc #c2c2c2 / bg #fefefe → 选中 bc #383838 / bg #eff0f1 + 2px 外环。 门禁:tokens:check / token-ratchet / theme-contrast(138 对) / verify:ci 全绿(含 e2e 冒烟 31 条)。
This commit is contained in:
1 parent
2cd52d1d4e
commit
e91618603c
9 files changed
+38
-12
No files matched your search
@@ -62,7 +62,7 @@ const varName = (k) => '--iwb-' + (ALIAS[k] || k.replace(/[A-Z]/g, (m) => '-' +
|
||||
/* 一个 token 在 CSS 里出现的顺序(= 阅读顺序:先表面、再描边、再文字、再品牌、再插件) */
|
||||
const COLOR_ORDER = [
|
||||
'bg', 'canvasBg', 'layer', 'layer2', 'panel', 'nodeBg', 'field',
|
||||
'border', 'border2',
|
||||
'border', 'border2', 'selSurface', 'selRing',
|
||||
'text', 'text2', 'textDim', 'canvasText', 'nodeText', 'nodeText2', 'tint',
|
||||
'brand', 'brandText', 'onBrand', 'edge', 'edgeHot', 'gridDot',
|
||||
'surface', 'hover', 'menuBg',
|
||||
@@ -350,7 +350,7 @@ function buildCss () {
|
||||
L.push(' /* —— 结构层(公式与 derive 一致,见文件头) —— */')
|
||||
L.push(...LIGHT_ONLY.map(decl))
|
||||
L.push(' /* —— 描边 / 文字三级(目标对比度见 IWBThemeTokens.RATIO) —— */')
|
||||
L.push(...colorDecls(LIGHT, ['border', 'border2', 'text', 'text2', 'textDim', 'canvasText', 'nodeText', 'nodeText2', 'tint']))
|
||||
L.push(...colorDecls(LIGHT, ['border', 'border2', 'selSurface', 'selRing', 'text', 'text2', 'textDim', 'canvasText', 'nodeText', 'nodeText2', 'tint']))
|
||||
L.push(' /* —— 品牌色:填充与文字是两个角色(D7) —— */')
|
||||
L.push(...colorDecls(LIGHT, ['brand', 'brandText', 'onBrand', 'gridDot']))
|
||||
L.push(' /* —— 插件表面四层(只提供取值,不做变量重指) —— */')
|
||||
@@ -371,7 +371,7 @@ function buildCss () {
|
||||
L.push(' /* 生图动效在暗色下必须「发亮」:--iwb-brand 是中性灰,直接用会糊在深底里 */')
|
||||
L.push(...DARK_ANIM.map(decl))
|
||||
L.push(' /* —— 表面阶 —— */')
|
||||
L.push(...colorDecls(DARK, ['bg', 'canvasBg', 'layer', 'layer2', 'panel', 'nodeBg', 'field', 'border', 'border2']))
|
||||
L.push(...colorDecls(DARK, ['bg', 'canvasBg', 'layer', 'layer2', 'panel', 'nodeBg', 'field', 'border', 'border2', 'selSurface', 'selRing']))
|
||||
L.push(' /* —— 文字 / 品牌 —— */')
|
||||
L.push(...colorDecls(DARK, ['text', 'text2', 'textDim', 'canvasText', 'nodeText', 'nodeText2', 'tint', 'brand', 'brandText', 'onBrand', 'gridDot']))
|
||||
L.push(' /* —— 插件表面 / 浮层 / 语义色 —— */')
|
||||
|
||||
Reference in new issue
Block a user