diff --git a/docs/plans/design-tokens-rollout.md b/docs/plans/design-tokens-rollout.md index 895edd2..cf9a6c4 100644 --- a/docs/plans/design-tokens-rollout.md +++ b/docs/plans/design-tokens-rollout.md @@ -88,6 +88,12 @@ **新增守卫**:`tests/theme-static-snapshot-test.js` —— CSS 静态快照必须等于 `derive()` 输出(58 色值 × 2 套)。 +**验收反馈修正(同日,D10)**:老马看暗色截图后指出「暗色的这些深色框是不是可以再浅一点,现在对比度高了一些」。 +采样确认卡片 `#3d3d3d` / 下拉 `#1a1a1a` / 任务卡 `#151515`(差 33–39 级)。新增 `--iwb-field`(卡片内控件面,暗 `#494949`) ++ 8 处节点内控件切换 + `field` 进 `textSurfaces` + `pluginInset` 提亮 + 反相主按钮文字色,卡片↔控件差降到 12 级。 +**这条说明 D6 只做对了一半**:把 `layer` 钉成「比 panel 暗」是对的,但没意识到「面板」和「节点卡片」不在同一亮度带 —— +`layer` 只对面板成立,卡片内需要另一层语义(判据见 `design-tokens.md` §1.9)。亮色 12 张基线逐像素 0 diff。 + **回滚**:M2 是一个 commit;`.theme-dark` 与 `:root` 的旧值都在 git 里,`git revert` 即回到「中灰暗色」。 diff --git a/docs/standards/design-tokens.md b/docs/standards/design-tokens.md index a31d7d3..e65b3a3 100644 --- a/docs/standards/design-tokens.md +++ b/docs/standards/design-tokens.md @@ -147,6 +147,20 @@ 后果:**自动配色/自定义种子只对亮色完整生效**。用户改了种子切到暗色,这 24 处仍是写死的灰 —— 这就是「两套外观系统」体感的真正来源(不是外观面板的问题,是暗色有一半是手绘的)。 +#### D10 卡片内的控件面没有独立语义,暗色下被算成「黑洞」 + +`--iwb-panel`(#1c1c1c) 与 `--iwb-layer`(#161616) 都是**贴着应用底色**派生的,用途是「面板」与「面板里的凹槽」。 +但节点卡片是画布派生的 `--iwb-node-bg`(#3d3d3d) —— 两者不在同一亮度带。 + +后果:`#3d3d3d` 的卡片里嵌入 `#1c1c1c` 的下拉框、`#161616` 的任务卡,灰阶差 33–39 级。 +亮色下看不出来,因为 panel(#fefefe) 与 nodeBg(#efefef) 本来就在同一带(差 15 级,且是「白底上浅灰」)。 +暗色这套算出来的不是「凹槽」,是「在同一张卡片上挖了六个洞」——用户第一眼给出的判词就是这个(2026-11-23)。 + +> **判据**:控件的光学重量应该由**它所在的那张卡片**决定,不是由应用底色决定。 +> 所以「嵌套在卡片里的控件面」必须相对 `nodeBg` 派生,和 `nodeBg` 相对 `canvas` 派生是同一条原则。 + +修法见 §1.9:新增 `--iwb-field`(亮=`#ffffff`,暗=`nodeBg` 往白 6% = `#494949`)。 + ### 1.6 结论:优化是必要的,但顺序要反过来 > **执行状态(2026-11-23)**:下表九条已全部修复,做法与实测数字见 §1.8。本节保留为「为什么必须先修色彩模型」的论证。 @@ -161,6 +175,7 @@ | D7 品牌色退化 | 值定义错 | 不能 | | D8 缺状态层/焦点环 | 层缺失 | 不能 | | D9 暗色 24 条硬编码补丁 | 派生未覆盖 | 不能 | +| D10 卡片内控件面缺语义(暗色黑洞) | 语义分层缺失 | 不能(§1.9 已修) | | 字号/圆角/间距离散 | 层缺失 | **能**(§3) | **所以优先级应为:先修色彩模型(D1–D9),再统一尺度(§3)。** 反过来的话,会把 30 档间距迁到一套「暗色下正文不达标、内嵌块方向相反」的配色上,等于把错误标准化。 @@ -222,6 +237,25 @@ **已知限制**:`depth` 拉到 60 且暗色时,画布 `#676767` / 节点 `#707070` 都处在中等亮度,text(7:1) 与 text2(4.5:1) 的可选区间被压到接近纯白(`#f6f6f6` / `#f4f4f4`),层级感会变弱。默认 `depth=22` 不受影响。 +### 1.9 验收反馈修正:暗色「黑洞方框」(2026-11-23,同版本内) + +用户看暗色截图的原话:**「暗色的这些深色框是不是可以再浅一点,现在对比度高了一些」**。 +实测采样(524×177 的节点截图,像素级确认):卡片 `#3d3d3d`、下拉框 `#1a1a1a`、任务卡 `#151515` —— 差 33–39 级。 + +| 改动 | 内容 | 数值 | +|---|---|---| +| 新增 `--iwb-field` | 「卡片内的控件面」:跟随 `nodeBg` 派生,暗色比节点**亮**一档(D10) | 亮 `#ffffff` / 暗 `#494949`(`nodeBg #3d3d3d` + 往白 6%) | +| 8 处节点内控件切换 | `.iwb-task`、`.iwb-gen-cell .iwb-input`、`.iwb-gen-settings` 的 input/pick/summary、`.iwb-node .iwb-input`(组合节点的分隔符 select 等)、`.iwb-out-group-card`、`.iwb-out-prog`、`.iwb-combine-src`、`.iwb-batch-src` | 卡片↔控件差从 33–39 级降到 **12 级**,靠 1px `#333` 描边定边界 | +| `field` 进 `textSurfaces` | 控件变亮后,暗色正文必须重新夹紧(否则正文只剩 5.9:1) | text `#d1d1d1→#e3e3e3`、text2 `#aaaaaa→#bababa`、textDim `#8a8a8a→#989898`、brandText `#a6aab2→#b6bac0`;实测 7.02 / 4.64 / 3.12 | +| `pluginInset` 暗色提亮 | `#101010`(对插件卡片 `#2c2c2c` 差 28 级,搜索框是黑窟窿)→ 从 `panel` 往下 10% | `#191919`(差 19 级,仍是凹槽) | +| 修 `.iwb-node .iwb-btn-primary` 的文字色 | 反相按钮(底=文字色)却用 `--iwb-on-brand`(#fff) 做字 → 白字压浅灰 | 改 `--iwb-bg`:亮 9.4:1 / 暗 13.9:1(「生成」从几乎看不见到可读) | +| 亮色不变的保证 | `field` 亮色取纯白(原输入框就是 `#fefefe`,差 1 级) | 亮色 12 张基线 **逐像素 0 diff**(Playwright 阈值 0.2 内) | + +**新增使用规则(写进 M3 的 token 文档)**: + +- 控件在**面板/弹窗/抽屉**里 → 用 `--iwb-layer` / `--iwb-layer2`(凹槽语义不变)。 +- 控件在**节点卡片**里 → 必须用 `--iwb-field`。判据不是「凹陷还是凸起」,而是「它贴在哪张卡片上」。 + ## 2. 目标架构 ### 2.1 三层模型(与 Primer / Ant Design v5 / Radix 同一套骨架) @@ -302,6 +336,7 @@ L3 Contract ── 组件整体换肤时才加,能不建就不建 | `--iwb-color-bg-panel` | `#ffffff` | `#a5a5a5` | 面板/弹窗/菜单 | 可覆盖 | | `--iwb-color-bg-card` | 同 panel | 同 panel | 卡片、列表项 | 可覆盖 | | `--iwb-color-bg-inset` | `#f0f1f4` | `#9c9c9c` | 输入框、分组底 | 可覆盖 | +| `--iwb-field` | `#ffffff` | `#494949` | **卡片内**控件面(输入框/下拉/任务卡/输出组);卡片外用 bg-inset | 否 | | `--iwb-color-bg-hover` | `#ececec` | 派生 | 行/卡 hover | 可覆盖 | | `--iwb-color-bg-selected` | `color-mix(brand 14%)` | 同 | 选中行 | 随品牌 | | `--iwb-color-text-primary` | `#1c2333` | `#111111` | 主文字 | 可覆盖 | diff --git a/scripts/token-audit.js b/scripts/token-audit.js index e6b1941..c6c829e 100644 --- a/scripts/token-audit.js +++ b/scripts/token-audit.js @@ -134,7 +134,7 @@ if (process.argv.includes('--contrast')) { process.exit(1) } const T = sandbox.IWBThemeTokens - const SURFACES = ['bg', 'panel', 'layer', 'layer2', 'nodeBg', 'canvasBg', 'pluginSurface', 'pluginCard'] + const SURFACES = ['bg', 'panel', 'layer', 'layer2', 'nodeBg', 'field', 'canvasBg', 'pluginSurface', 'pluginCard'] for (const dark of [false, true]) { const t = T.derive(T.DEFAULTS, dark) const MINS = { text: T.RATIO.text, text2: T.RATIO.text2, textDim: T.RATIO.dim } @@ -156,7 +156,7 @@ if (process.argv.includes('--contrast')) { const statDark = {} for (const m of darkBlock.matchAll(/--(?:iwb-)?([a-z0-9-]+)\s*:\s*(#[0-9a-fA-F]{6})\s*;/g)) statDark[m[1]] = m[2].toLowerCase() const d = T.derive(T.DEFAULTS, true) - const KEYS = { bg: 'bg', panel: 'panel', layer: 'layer', layer2: 'layer2', 'node-bg': 'nodeBg', text: 'text', text2: 'text2', 'text-dim': 'textDim' } + const KEYS = { bg: 'bg', panel: 'panel', layer: 'layer', layer2: 'layer2', 'node-bg': 'nodeBg', field: 'field', text: 'text', text2: 'text2', 'text-dim': 'textDim' } for (const [k, key] of Object.entries(KEYS)) { const sv = statDark[k] || '(表达式)' const ok = sv === d[key] diff --git a/src/theme-tokens.js b/src/theme-tokens.js index 035d17e..9a494d4 100644 --- a/src/theme-tokens.js +++ b/src/theme-tokens.js @@ -114,6 +114,12 @@ * 改成相对画布派生、两套主题都往白走:亮色 72%、暗色 6%, * depth 拉到 0/60 两端也都保证 nodeBg 不低于 canvas。 */ const nodeBg = mix(canvas, '#ffffff', d ? 0.06 : 0.72) + /* 卡片内的控件面(输入框 / 下拉 / 任务卡 / 输出组):亮色=白,暗色=比节点**亮**一档。 + * 旧实现让这些控件吃 --iwb-panel(#1c1c1c) / --iwb-layer(#161616),而节点是画布派生的 #3d3d3d + * —— 一张 #3d 的卡片里嵌着 #16 的方框,视觉上是「挖了个黑洞」(用户 2026-11-23 反馈)。 + * panel/layer 夹在应用底色附近,本身没问题;错的是「拿面板色的控件去铺在画布色的卡片上」。 + * 所以这里跟着 nodeBg 派生(与 nodeBg←canvas 同一套相对派生思路),暗色往白走一档。 */ + const field = d ? mix(nodeBg, '#ffffff', 0.06) : '#ffffff' /* —— 结构层(先算表面,文字要用它们做夹紧) —— * 这里的四个公式必须与 style.css 的 :root color-mix 完全一致: @@ -130,7 +136,9 @@ const surface = surface1 const pluginSurface = d ? mix(surface0, '#ffffff', 0.07) : mix(surface1, '#000000', 0.035) const pluginCard = d ? mix(surface0, '#ffffff', 0.11) : surface1 - const pluginInset = d ? mix(surface0, '#000000', 0.12) : mix(surface1, '#000000', 0.075) + /* 暗色内嵌块旧值 #101010:插件卡片是 #2c2c2c,差 28 级 —— 搜索框/列表底看着是「黑窟窿」。 + * 改成从面板色往下压 10%(#191919),与卡片差 10 级:仍是凹槽,但不再发黑。 */ + const pluginInset = d ? mix(surface1, '#000000', 0.10) : mix(surface1, '#000000', 0.075) const pluginHover = d ? mix(surface0, '#ffffff', 0.16) : mix(surface1, '#000000', 0.11) /* 浮层底(右键菜单 / 更多菜单 / 确认框)。浮层要「比它盖住的东西亮」: * 亮色直接用 panel(最白);暗色如果也用 panel(#1c1c1c),浮在画布(#313131)上反而更暗 —— @@ -139,7 +147,7 @@ /* 承载文字的整套表面。canvas 不在内 —— 画布上只有节点标题,另有专用色。 * 顺序无关,clampAgainst 取最差者。 */ - const textSurfaces = [surface0, surface1, inset, surface2, surface3, nodeBg, hover, dockBg, chrome, pluginSurface, pluginCard, pluginInset, pluginHover] + const textSurfaces = [surface0, surface1, inset, surface2, surface3, nodeBg, field, hover, dockBg, chrome, pluginSurface, pluginCard, pluginInset, pluginHover] const text = clampAgainst(mix(N, t, 0.06), textSurfaces, RATIO.text) const text2 = clampAgainst(mix(N, t, d ? 0.30 : 0.34), textSurfaces, RATIO.text2) @@ -179,6 +187,7 @@ layer: inset, layer2: d ? surface1 : '#ffffff', nodeBg, + field, canvasBg: canvas, chrome, homeBg, @@ -224,6 +233,7 @@ s('--iwb-layer', tokens.layer) s('--iwb-layer2', tokens.layer2) s('--iwb-node-bg', tokens.nodeBg) + s('--iwb-field', tokens.field) s('--iwb-plugin-surface', tokens.pluginSurface) s('--iwb-plugin-card', tokens.pluginCard) s('--iwb-plugin-inset', tokens.pluginInset) diff --git a/style.css b/style.css index 1abd1ba..4c92756 100644 --- a/style.css +++ b/style.css @@ -15,6 +15,11 @@ --iwb-layer2: #ffffff; --iwb-panel: #fefefe; --iwb-node-bg: #efefef; + /* 卡片内的控件面(输入框 / 下拉 / 任务卡 / 输出组):亮色=白。 + 暗色不是白色,而是「比节点亮一档」的灰(见 theme-tokens 的 field)。 + 用途区别很重要:卡片**外面**的控件仍用 --iwb-layer / --iwb-panel(凹槽语义), + 卡片**里面**的控件必须用 --iwb-field,否则 #3d 的卡片里会出现 #16 的黑洞(D10)。 */ + --iwb-field: #ffffff; /* 顶部 chrome 色:页面底与画布之间的过渡层(标签条用)。 比 --iwb-bg 深一号、比画布浅 → 顶部亮带贴画布的对比减弱(v3.1.0 顶栏配色); 调深浅改下面 60/40 两个百分比即可(越往画布色靠,对比越弱) */ @@ -137,24 +142,25 @@ --iwb-layer2: #1c1c1c; --iwb-panel: #1c1c1c; --iwb-node-bg: #3d3d3d; + --iwb-field: #494949; --iwb-border: #333333; --iwb-border2: #4d4d4d; --iwb-brand: #6b7280; - --iwb-brand-text: #a6aab2; - --iwb-text: #d1d1d1; - --iwb-text2: #aaaaaa; - --iwb-text-dim: #8a8a8a; + --iwb-brand-text: #b6bac0; + --iwb-text: #e3e3e3; + --iwb-text2: #bababa; + --iwb-text-dim: #989898; --iwb-color-text-on-canvas: #b2b2b2; - --iwb-node-text: #d1d1d1; + --iwb-node-text: #e3e3e3; --iwb-node-text2: #aaaaaa; - --iwb-tint: #d1d1d1; + --iwb-tint: #e3e3e3; --iwb-surface: #1c1c1c; --iwb-hover: #2a2a2a; --iwb-bg-menu: #3c3c3c; --iwb-grid-dot: #525252; --iwb-plugin-surface: #232323; --iwb-plugin-card: #2c2c2c; - --iwb-plugin-inset: #101010; + --iwb-plugin-inset: #191919; --iwb-plugin-hover: #383838; --iwb-err: #f26666; --iwb-ok: #4acf7b; @@ -479,7 +485,7 @@ button { font-family: inherit; } 现在只有两层:节点卡 + 选择框;左右内边距统一由 .iwb-node-body(10px) 提供, 按钮/信息行/任务行/标题全部左对齐。 */ .iwb-gen-settings { margin-top: 8px; border: none; border-bottom: 1px solid var(--iwb-border); border-radius: 0; padding: 4px 0 8px; margin-bottom: 4px; background: transparent; display: flex; flex-direction: column; gap: 4px; } -.iwb-task { border: 1px solid var(--iwb-border); border-radius: 8px; padding: 6px 8px; background: var(--iwb-layer); } +.iwb-task { border: 1px solid var(--iwb-border); border-radius: 8px; padding: 6px 8px; background: var(--iwb-field); } .iwb-task-head { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 6px; } .iwb-task-title { font-size: 13px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--iwb-text); } .iwb-task-title-text { font-size: 11px; font-weight: 400; color: var(--iwb-text2); margin-left: 3px; } @@ -839,6 +845,10 @@ html { scrollbar-width: thin; scrollbar-color: var(--iwb-border2) color-mix(in s .iwb-input:focus, .iwb-textarea:focus { border-color: var(--iwb-brand); box-shadow: 0 0 0 2px color-mix(in srgb, var(--iwb-brand) 20%, transparent); } /* 输入框提示文字统一淡色(层级:placeholder < 输入值 < 标签) */ .iwb-input::placeholder, .iwb-textarea::placeholder { color: color-mix(in srgb, var(--iwb-text) 34%, transparent); opacity: 1; } +/* 节点卡里的一切表单控件都吃「卡片内控件面」(D10)。 + 基础 .iwb-input 用的是 --iwb-layer2,在暗色等于面板色:铺在 #3d 的节点上就是一块近黑方框。 + 弹窗/抽屉里的输入框不受影响(它们不在 .iwb-node 内,仍用 layer2)。 */ +.iwb-node .iwb-input, .iwb-node .iwb-textarea { background: var(--iwb-field); } /* 设置面板:单行输入框/选择框限宽,不横向布满(表单化);行内组合(grow/num/keyname)与多行文本保持弹性 */ .iwb-settings-modal .iwb-input:not(.iwb-grow):not(.iwb-num):not(.iwb-keyname):not(.iwb-llm-keyname):not(.iwb-hdrbox) { max-width: 460px; } /* 宽度/弹性覆盖(必须在 .iwb-input 定义之后,否则 width:100% 覆盖固定宽度类导致排版错位) */ @@ -977,8 +987,8 @@ html { scrollbar-width: thin; scrollbar-color: var(--iwb-border2) color-mix(in s /* ---- 生图节点:参数设置(横向一行,无标题无分类) ---- */ .iwb-gen-row { display: flex; gap: 4px; align-items: center; } .iwb-gen-cell { flex: 0 1 auto; min-width: 0; display: flex; align-items: center; } -.iwb-gen-cell .iwb-input { width: auto; max-width: 100%; font-size: 15px; background-color: var(--iwb-panel); background-image: url("data:image/svg+xml;utf8,"); background-repeat: no-repeat; background-position: right 5px center; border: none; appearance: none; -webkit-appearance: none; -moz-appearance: none; } -.iwb-gen-cell .iwb-input:focus { outline: none; background-color: color-mix(in srgb, var(--iwb-brand) 6%, var(--iwb-panel)); } +.iwb-gen-cell .iwb-input { width: auto; max-width: 100%; font-size: 15px; background-color: var(--iwb-field); background-image: url("data:image/svg+xml;utf8,"); background-repeat: no-repeat; background-position: right 5px center; border: none; appearance: none; -webkit-appearance: none; -moz-appearance: none; } +.iwb-gen-cell .iwb-input:focus { outline: none; background-color: color-mix(in srgb, var(--iwb-brand) 6%, var(--iwb-field)); } /* ---- 任务卡:张数下拉移到右下角(状态在左) ---- */ .iwb-task-btns { display: inline-flex; align-items: center; gap: 4px; flex: 0 0 auto; } @@ -1034,11 +1044,11 @@ html { scrollbar-width: thin; scrollbar-color: var(--iwb-border2) color-mix(in s /* 文案组合节点 */ .iwb-combine-srcs { display: flex; flex-direction: column; gap: 3px; margin: 6px 0; } -.iwb-combine-src { font-size: 11px; color: var(--iwb-text2); background: var(--iwb-layer); border: 1px solid var(--iwb-border); border-radius: 6px; padding: 3px 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } +.iwb-combine-src { font-size: 11px; color: var(--iwb-text2); background: var(--iwb-field); border: 1px solid var(--iwb-border); border-radius: 6px; padding: 3px 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } /* 组合来源行里的「样式名」标签(2026-11-14):只给插件提示词类节点打标,帮用户认出这一行来自哪条风格 */ .iwb-combine-src-tag { display: inline-block; max-width: 9em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; margin-right: 4px; padding: 0 5px; border-radius: 4px; background: color-mix(in srgb, var(--iwb-brand) 16%, transparent); color: var(--iwb-brand-text, var(--iwb-brand)); font-size: 10px; line-height: 15px; } .iwb-batch-srcs { display: flex; flex-direction: column; gap: 3px; margin: 6px 0; } -.iwb-batch-src { font-size: 11px; color: var(--iwb-text2); background: var(--iwb-layer); border: 1px solid var(--iwb-border); border-radius: 6px; padding: 3px 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } +.iwb-batch-src { font-size: 11px; color: var(--iwb-text2); background: var(--iwb-field); border: 1px solid var(--iwb-border); border-radius: 6px; padding: 3px 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .iwb-combine-row { display: flex; align-items: center; gap: 6px; margin: 6px 0; } .iwb-combine-row .iwb-plabel { flex: 0 0 48px; font-size: 11px; color: var(--iwb-text2); } .iwb-combine-row .iwb-input { flex: 1 1 auto; font-size: 11px; padding: 3px 5px; } @@ -1050,8 +1060,11 @@ html { scrollbar-width: thin; scrollbar-color: var(--iwb-border2) color-mix(in s .iwb-out-head { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; } .iwb-out-run { width: 100%; justify-content: center; margin-bottom: 8px; } /* 画布节点内的主操作按钮统一「近黑底 + 白字」(用户要求;--iwb-text 亮色 #1c2333、暗色 #111) */ -.iwb-node .iwb-btn-primary { background: var(--iwb-text); border-color: var(--iwb-text); color: var(--iwb-on-brand); } -.iwb-node .iwb-btn-primary:hover { background: color-mix(in srgb, var(--iwb-tint) 86%, var(--iwb-panel)); border-color: var(--iwb-text); color: var(--iwb-on-brand); } +/* 节点内的主按钮是「反相」按钮:底色取文字色(深底上是浅块),字就必须取页面底 —— + 用 --iwb-on-brand(#fff) 会变成白字压浅灰(暗色 1.2:1,「生成」几乎看不见)。 + 亮色页面底 #f7f7f7 压在 #404040 上 = 9.4:1,暗色 #121212 压在 #e3e3e3 上 = 13.9:1。 */ +.iwb-node .iwb-btn-primary { background: var(--iwb-text); border-color: var(--iwb-text); color: var(--iwb-bg); } +.iwb-node .iwb-btn-primary:hover { background: color-mix(in srgb, var(--iwb-tint) 86%, var(--iwb-panel)); border-color: var(--iwb-text); color: var(--iwb-bg); } .iwb-node .iwb-btn-primary:disabled { opacity: .45; } .iwb-out-head .iwb-label { flex: 0 0 auto; } .iwb-out-tools { flex: 1 1 auto; display: flex; gap: 4px; justify-content: flex-end; } @@ -1067,7 +1080,7 @@ html { scrollbar-width: thin; scrollbar-color: var(--iwb-border2) color-mix(in s /* 输出节点:原比例自适应流式(组内横向排列,随节点宽度自动换行) */ .iwb-out-groups { display: flex; flex-direction: column; gap: 10px; } -.iwb-out-group-card { flex: none; width: 100%; border: 1px solid var(--iwb-border); border-radius: 10px; padding: 6px 8px 8px; background: var(--iwb-layer); } +.iwb-out-group-card { flex: none; width: 100%; border: 1px solid var(--iwb-border); border-radius: 10px; padding: 6px 8px 8px; background: var(--iwb-field); } .iwb-out-group-title { font-size: 11px; font-weight: 700; margin-bottom: 5px; color: var(--iwb-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } /* 旧任务残留说明(v3.24.44):只在「当前任务之外还有旧图」时出现,一行小字,不与任务组争视觉权重 */ .iwb-out-stale { margin-top: 8px; padding-top: 7px; border-top: 1px dashed var(--iwb-border); font-size: 11px; color: var(--iwb-text2); cursor: default; } @@ -1622,7 +1635,7 @@ html { scrollbar-width: thin; scrollbar-color: var(--iwb-border2) color-mix(in s .iwb-task-running::after { animation: none; opacity: 1; } } /* 输出节点紧凑进度行:一行内自适应,完整信息走 title 悬停;容器查询按自身宽度分档 */ -.iwb-out-prog { container-type: inline-size; position: relative; display: flex; align-items: center; gap: 6px; min-width: 0; overflow: hidden; padding: 4px 8px; margin-bottom: 4px; border-radius: 8px; border: 1px solid var(--iwb-border); border-left: 3px solid var(--iwb-brand); background: var(--iwb-layer); } +.iwb-out-prog { container-type: inline-size; position: relative; display: flex; align-items: center; gap: 6px; min-width: 0; overflow: hidden; padding: 4px 8px; margin-bottom: 4px; border-radius: 8px; border: 1px solid var(--iwb-border); border-left: 3px solid var(--iwb-brand); background: var(--iwb-field); } /* 背景动效:整行双色渐变持续流动。用 200% 宽的伪元素 + transform(合成层,不重绘), 5 段对称渐变保证位移半宽后图案完全重合 → 无缝循环 */ .iwb-out-prog::before { content: ''; position: absolute; inset: 0; width: 200%; z-index: 0; pointer-events: none; will-change: transform; @@ -1726,7 +1739,7 @@ html { scrollbar-width: thin; scrollbar-color: var(--iwb-border2) color-mix(in s .iwb-gen-summary { border: 1px solid var(--iwb-border); border-radius: 10px; - background: var(--iwb-panel); + background: var(--iwb-field); min-height: 38px; padding: 6px 26px 6px 12px; font-size: 15px; diff --git a/tests/_visual-tokens.spec.js-snapshots/02-canvas-dark-darwin.png b/tests/_visual-tokens.spec.js-snapshots/02-canvas-dark-darwin.png index b4ea7ad..4aef605 100644 Binary files a/tests/_visual-tokens.spec.js-snapshots/02-canvas-dark-darwin.png and b/tests/_visual-tokens.spec.js-snapshots/02-canvas-dark-darwin.png differ diff --git a/tests/_visual-tokens.spec.js-snapshots/04-drawer-gallery-dark-darwin.png b/tests/_visual-tokens.spec.js-snapshots/04-drawer-gallery-dark-darwin.png index de3037a..bf6b03b 100644 Binary files a/tests/_visual-tokens.spec.js-snapshots/04-drawer-gallery-dark-darwin.png and b/tests/_visual-tokens.spec.js-snapshots/04-drawer-gallery-dark-darwin.png differ diff --git a/tests/_visual-tokens.spec.js-snapshots/05-panel-promptlib-dark-darwin.png b/tests/_visual-tokens.spec.js-snapshots/05-panel-promptlib-dark-darwin.png index 7ef8be1..61b06c4 100644 Binary files a/tests/_visual-tokens.spec.js-snapshots/05-panel-promptlib-dark-darwin.png and b/tests/_visual-tokens.spec.js-snapshots/05-panel-promptlib-dark-darwin.png differ diff --git a/tests/_visual-tokens.spec.js-snapshots/06-ctxmenu-dark-darwin.png b/tests/_visual-tokens.spec.js-snapshots/06-ctxmenu-dark-darwin.png index f820271..ed90021 100644 Binary files a/tests/_visual-tokens.spec.js-snapshots/06-ctxmenu-dark-darwin.png and b/tests/_visual-tokens.spec.js-snapshots/06-ctxmenu-dark-darwin.png differ diff --git a/tests/theme-static-snapshot-test.js b/tests/theme-static-snapshot-test.js index 14b336f..3a0f57d 100644 --- a/tests/theme-static-snapshot-test.js +++ b/tests/theme-static-snapshot-test.js @@ -54,7 +54,7 @@ const darkVars = decls(block('.theme-dark')) // token 键(derive 返回的驼峰)→ CSS 变量名(kebab) const KEYS = [ - 'bg', 'canvasBg', 'panel', 'layer', 'layer2', 'nodeBg', 'border', 'border2', + 'bg', 'canvasBg', 'panel', 'layer', 'layer2', 'nodeBg', 'field', 'border', 'border2', 'text', 'text2', 'textDim', 'canvasText', 'nodeText', 'nodeText2', 'tint', 'surface', 'hover', 'menuBg', 'brand', 'brandText', 'gridDot', 'pluginSurface', 'pluginCard', 'pluginInset', 'pluginHover',