feat(tokens): M4-B5 节点 —— 端口不再在深色下变成黑洞(3.26.48)

用户能感知的只有一件:深色画布上节点的连接端口看得见了。它以前是嵌在卡片上的黑洞。

端口在两个主题下往相反方向错
- 暗色:--iwb-layer(#161616) 打在节点卡(#3d3d3d) 上,差 39 级 → 改 --iwb-field(#494949),差 12 级。
- 亮色:#f5f5f5 打在 #efefef 上只靠 1.5px 描边撑着 → 改 #ffffff + 描边,白点清晰。
- 同一病灶在节点内还有 6 处一并改 field:ref-img / ref-single / ref-upload-link /
  refmini-empty / task-result-img / node-head:hover。

浮条 hover 在深色下没有反馈(改数字治不好)
- 浮条底 --iwb-panel 与子项 hover 的 --iwb-layer2 深色下同为 #1c1c1c —— 换成
  color-mix(text 10%, transparent)。任务卡「等待」按钮同理(它贴在 field 卡上)。

归并
- 字号:12→sm、15→lg、11→xs、13→md,全部等值;8/10px 微缩徽标保留(11 会撑破 12px 角标)。
- 圆角:8→control、6/5→chip、14→popover,只剩 50% 与 2px 占位条。
- 间距:52 处等值、13 处 1px 级微调;提示词节点体 14/18→12/16(节点高 −4px)。
- 阴影:浮条与节点选中/连接态的内联 rgba 走 elevation-2。
- 删 6 个死类名 / 6 条规则:gen-sizerow gen-qualityrow gen-tag size-x size-align size-badge。

守卫(tests/node-scope-test.js,进 test:unit)
- 节点卡内部禁 --iwb-layer/layer2/panel 作背景(浮条除外,它是浮层);端口三态底色断言;
  节点区字号/间距/圆角必须走档位;6 个死类名不复现。

验收
- 计算样式逐属性 diff:节点/标题带/端口/浮条/生图参数/任务卡,变化全部为预期项。
- 12 张基线变了 8 张(②④⑤⑥ × 亮暗,④⑤⑥ 的画布背后也有节点),逐张核对无裁切/重叠。
- 审计:字号写死 212→188、圆角 128→104、间距 483→416、style.css 2314→2307。verify:ci 全绿。
This commit is contained in:
qiqi committed 2026-11-23 16:27:40 +08:00
1 parent 203098163c
commit cb9cb9ceec
16 files changed
+297 -113

No files matched your search

+35
View File
@@ -14,6 +14,41 @@
> 3. 核验正式地址版本 → 之后才移动 `stable` / `stable-verified-<日期>` 标签、更新本 CHANGELOG、写 GitHub Release(`gh release create`)。
> 测试发现问题 → 改 → 再 `deploy:test`,正式环境不受影响。回滚点 `git reset --hard stable`。
## v3.26.48(2026-11-23)画布节点:端口不再是黑洞
> **状态:待发布**(`verify:ci` 全绿、12 张视觉基线变了 8 张且逐张核对;未打 tag)
M4-B5 批次。用户能感知的是**深色画布上节点的连接端口看得见了**——它以前是嵌在卡片上的黑洞。
**端口在两个主题下往相反方向错**
| 主题 | 改前 | 改后 |
|---|---|---|
| 暗色 | `--iwb-layer` = `#161616` 打在节点卡 `#3d3d3d` 上,差 39 级 | `--iwb-field` = `#494949`,差 12 级,读作凸起小圆点 |
| 亮色 | `#f5f5f5` 打在 `#efefef` 卡上,只靠 1.5px 描边才勉强看见 | `#ffffff` + 描边,白点清晰 |
同一个病灶在节点内还有 6 处,一并改成 `field`:引用图占位(`.iwb-ref-img` / `.iwb-ref-single`)、
引用链接按钮、迷你引用空位、任务结果图、节点标题带 hover。
**浮条按钮 hover 在深色下完全没有反馈**
浮条底是 `--iwb-panel`(`#1c1c1c`),子项 hover 用 `--iwb-layer2`(也是 `#1c1c1c`)——改数字没用,
因为它俩就是同一个颜色。改为 `color-mix(text 10%, transparent)`。任务卡里的「等待」按钮同理。
**归并**
- 字号:12→`sm`、15→`lg`、11→`xs`、13→`md`,**全部等值**;8/10px 微缩徽标保留(闭集最低档 11 会把 12px 角标撑破)。
- 圆角:8px→`control`、6/5px→`chip`、14px→`popover`,只剩 `50%`(圆)与 `2px`(占位条)。
节点本体本来就走 `--iwb-node-radius`(外观里可调),不受影响。
- 间距:52 处等值、13 处 1px 级微调;最大一处是提示词节点体 `14px 18px → 12/16`(节点高度 −4px)。
- 阴影:浮条与节点选中/连接态的内联 `rgba(...)` 走 `elevation-2`。
- 删 6 个死类名 / 6 条规则:`gen-sizerow` `gen-qualityrow` `gen-tag` `size-x` `size-align` `size-badge`
(尺寸/质量 UI 早已并入图像设置浮层,这些规则还在样式表里躺着)。
**新增守卫** `tests/node-scope-test.js`(进 `test:unit`):节点卡内部禁 `--iwb-layer/layer2/panel` 作背景
(浮条除外,它本身就是浮层)、端口三态底色断言、节点区字号/间距/圆角必须走档位、死类名不复现。
验收:计算样式逐属性 diff(节点/标题带/端口/浮条/生图参数/任务卡),变化全部为预期项;
`verify:ci` 全绿;审计:字号写死 212→188、圆角 128→104、间距 483→416、`style.css` 2314→2307 行。
## v3.26.47(2026-11-23)设置页:输入框与按钮终于一样高,半像素字号清零
> **状态:待发布**(`verify:ci` 全绿、12 张视觉基线只有设置弹窗 2 张变化且已核对;未打 tag)
+1 -1
View File
@@ -41,7 +41,7 @@ build esbuild 打包到 dist/(单 dist/app.js = src/ 模块按序
node --check app.js 与 dist/app.js 语法
check-dist.js 产物体检
lint ESLint(src/ + app.js,正确性规则)
test:unit 120 个单测文件(jsdom 契约测试;2026-11-07 新增 sync-facts-guard(事实一致性)/ _helpers/source(统一源文本);2026-11-12 新增 provider-ping(测速 no-cors 兜底))
test:unit 121 个单测文件(jsdom 契约测试;2026-11-07 新增 sync-facts-guard(事实一致性)/ _helpers/source(统一源文本);2026-11-12 新增 provider-ping(测速 no-cors 兜底))
test relay-task-graph-fixture + iwb-v32-web-test
test:facts 事实基线守门(见 §5)
typecheck 渐进类型检查(tsc --noEmit;范围 = src/*.js,不含 app.js)
+32 -6
View File
@@ -135,7 +135,7 @@
| **B2 浮层** ✅ | `.iwb-modal/.iwb-fullmask/.iwb-command/.iwb-ctxmenu/.iwb-toast/.iwb-pop*` | 圆角 → `radius-panel/popover`;阴影 → `elevation-2/3/4`;z-index → `--iwb-z-*`(toast 提到 modal 之上) | 0.5d | 遮罩/弹窗层级实测:toast 在确认框之上 |
| **B3 首页/库** ✅ | `.iwb-home-*/.iwb-lib-*/.iwb-res-*` | 间距归并(就近下取)、字号 7 档(新增 `display`) | 0.5d | 首页截图;文案换行逐条看 |
| **B4 设置/外观** ✅ | `.iwb-settings-modal/.iwb-appear-*/.iwb-set*` | 控件统一 `control-h`(输入框与按钮等高);半像素字号清零 | 0.5d | 设置页截图 + 计算样式 diff |
| **B5 节点** | `.iwb-node*/.iwb-gen-*/.iwb-port` | 节点内字号 12/15 归口;圆角走 `--iwb-node-radius`;端口/小标签换 `bg-chip` | 1d | 画布截图(最复杂,单独一轮) |
| **B5 节点** ✅ | `.iwb-node*/.iwb-gen-*/.iwb-port` | 节点卡内部表面统一 `field`(修端口黑洞)、字号 12/15 归口、圆角归并 | 1d | 画布截图 + 计算样式 diff |
| **B6 插件** | `plugins/**` + 插件源码仓库 | 硬编码 → `--iwb-*`;`ALLOW_FILES` 逐项清零 | 0.5d | 契约测试白名单 4 → 0 |
**B1 执行结果(v3.26.44,2026-11-23)**:
@@ -231,6 +231,31 @@ B4/B5 建议照这个办法做(比逐张看截图快,也不会漏)。
设置页是控件最密、且**输入框与按钮并排**的地方(别处多是纯输入或纯按钮),先在这里立规矩,
B6 收尾时再决定全局跟不跟。
### B5 节点(3.26.48)执行结果
**计划里写的是「端口/小标签换 `bg-chip`」,实际发现没这个 token,而且诊断错了**。端口真正的问题不是缺个 chip 底,
是它在**两个主题下往相反方向错**:亮色 `#f5f5f5` 打在 `#efefef` 卡上几乎看不见(靠 1.5px 描边撑),
暗色 `#161616` 打在 `#3d3d3d` 卡上是一颗纯黑洞 —— 和 D10 修的「卡片内控件挖黑洞」同一个病,只是端口太小没人注意。
| 项 | 改前 | 改后 |
|---|---|---|
| 端口底色(暗色) | `#161616`(对卡片差 39 级) | `#494949`(差 12 级) |
| 端口底色(亮色) | `#f5f5f5`(差 6 级,几乎不可见) | `#ffffff` + 1.5px `#ababab` 描边 |
| 节点内用面板表面色的控件 | 7 处 | **0 处**(`ref-img`/`ref-single`/`upload-link`/`refmini-empty`/`task-result-img`/`node-head:hover`/端口) |
| 范围内字号写死 | 20 处 | 0(8/10px 微缩徽标按例外保留) |
| 范围内圆角写死 | 24 处 | 只剩 `50%` 与 `2px` 占位条 |
| 范围内间距写死 | 70 处 | 只剩端口热区 `inset: -9px` |
**第二个「改数字没反应」**:浮条底是 `--iwb-panel`,子项 hover 用 `--iwb-layer2` —— 深色下两者都是 `#1c1c1c`,
hover 完全没反馈。改成 `color-mix(text 10%, transparent)` 后两个主题都有。这类 bug 截图只能看出「好像没反应」,
计算样式能直接给出「hover 前后 background 都是 rgb(28,28,28)」。
**新增守卫 `tests/node-scope-test.js`**(进 `test:unit`):节点卡内部禁 `--iwb-layer/layer2/panel` 作背景
(浮条除外,它本身是浮层)、端口三态底色断言、节点区字号/间距/圆角必须走档位、6 个死类名不复现。
**验收偏差**:12 张基线里变了 **8 张**(②④⑤⑥ × 亮/暗),不是预期的 2 张 —— ④⑤⑥ 三个场景的画布背后
也有节点,端口与标题带的改动同样会显现。逐张看过:无裁切、无重叠、无错位。
**每批三条硬验收**:
1. 亮/暗两张截图 `0 diff`(B1 例外:允许 tab 视觉变化,需人工确认)
2. `token-audit.js` 对应计数下降
@@ -267,7 +292,8 @@ B6 收尾时再决定全局跟不跟。
| 3.26.45 | M4-B2 浮层 | 几乎零(阴影略软 + toast 可见性修复) | 层级表 + 阴影 4 档;toast 从「被弹窗盖住」修好,用户能感知的是「以前看不到的成功提示现在看得到」 |
| 3.26.46 | M4-B3 首页/库 | **有变化** | 首页主标题 26→24、侧栏条目 38→34、卡片脚注更紧;同时删了 30 条死规则。用户能感知的是「首页更紧凑」,附亮/暗前后对比图 |
| 3.26.47 | M4-B4 设置/外观 | **轻微** | 设置页正文 14→13、标题 16→15;同行输入框与按钮由「33 vs 24」变成都在 30。用户能感知的是「设置页更整齐」,不是「字变小」——13 与 15 仍在原层级里 |
| 3.26.48–3.26.50 | M4-B5–B6 | 仅 B5 有变化 | 每批可单独发 |
| 3.26.48 | M4-B5 节点 | **有变化(暗色改善明显)** | 端口从「黑洞」变成可见小圆点、提示词节点高度 −4px、浮条阴影统一。用户能感知的是「深色画布上端口看得见了」,附放大对比图 |
| 3.26.49–3.26.50 | M4-B6 | 零 | 收尾:清剩余 16 处半像素 + 全局 input 高度是否跟进 |
| 3.27.7 | M5 | 零 | 闸门上线 |
| 3.28.0 | M6 | 零 | 案例沉淀 |
@@ -279,12 +305,12 @@ B6 收尾时再决定全局跟不跟。
| 指标 | 基线(实测) | M4 后目标 | M6 后目标 |
|---|---|---|---|
| 引用但未定义的变量 | 7 | 0 | 0 |
| 字号档数 | 19 | 7(B4 后散值仍 **17**:13.5/12.5 在范围外还有 16 处;闭集 7 档已建) | 7 |
| 字号档数 | 19 | 7(B5 后散值仍 **17**:B5 范围清零,剩余 16 处半像素在备份/右键/插件市场卡;闭集 7 档已建) | 7 |
| 圆角档数 | 18 | 5 | 5 |
| 间距档数 | 30 | ≤16 | ≤16 |
| 字号写死处 | 268 | ≤60(B4 后 **212**) | ≤20 |
| 圆角写死处 | 164 | ≤40(B4 后 **128**) | ≤10 |
| 间距写死处 | 629 | ≤200(B4 后 **483**) | ≤80 |
| 字号写死处 | 268 | ≤60(B5 后 **188**) | ≤20 |
| 圆角写死处 | 164 | ≤40(B5 后 **104**) | ≤10 |
| 间距写死处 | 629 | ≤200(B5 后 **416**) | ≤80 |
| 阴影写法种类 | 52 | ≤8 | 5 |
| z-index 取值种类 | 42 | ≤10(B2 后 **31**) | 9 |
| `var(--iwb-layer)` 引用 | 59(一词多义) | 0(已拆) | 0 |
+36 -3
View File
@@ -281,6 +281,39 @@
浮层族禁裸 `z-index`、引用必须存在、toast 必须 portal。这条测试替换掉的是一类**没有报错的错**:
`z-index` 拼错变量名时会静默退化为 `auto`,只在特定操作顺序下露馅。
### 1.11 M4-B5 节点执行记录(2026-11-23,v3.26.48)
范围:`.iwb-node* / .iwb-gen-* / .iwb-port / .iwb-relay / .iwb-lod-* / .iwb-ref-* / .iwb-task-*`(205 条规则)。
**这一批把 D10 的原则推到了最细的部件上**。端口是典型:
| 主题 | 改前 | 改后 | 结果 |
|---|---|---|---|
| 暗色 | `--iwb-layer` = `#161616` 打在节点卡 `#3d3d3d` 上 | `--iwb-field` = `#494949` | 差 39 级(黑洞)→ 12 级(凸起小圆点) |
| 亮色 | `#f5f5f5` 打在 `#efefef` 卡上,靠 1.5px 描边才勉强看见 | `#ffffff` | 从「几乎不可见」到「白点带描边」 |
同一个病灶在节点内还有 6 处,一并改成 `field`:`.iwb-ref-img` / `.iwb-ref-single` /
`.iwb-ref-url-row .iwb-ref-upload-link` / `.iwb-refmini-empty` / `.iwb-task-result-img` /
`.iwb-node-head:hover`(标题带画在画布上)。
**另一类是「改数字没有反应」**:浮条底色是 `--iwb-panel`,子项 hover 用 `--iwb-layer2` ——
深色下两者都是 `#1c1c1c`,hover 完全没有反馈。改为 `color-mix(text 10%, transparent)`:
亮色压出浅灰、暗色提亮一档,两个主题都有反馈。`.iwb-task-btn-wait` 同理(它贴在 `field` 卡上)。
| 项 | 计划 | 实际 |
|---|---|---|
| 节点内字号 | 12 / 15 归口 | 12→`sm`、15→`lg`、11→`xs`、13→`md`(**全部等值**,零观感);8/10px 微缩徽标保留(闭集最低档 11 会撑破 12px 角标) |
| 圆角 | 走 `--iwb-node-radius` | 节点本体本来就走它(用户可调);其余 8px→`control`、6/5px→`chip`、14px→`popover`,只剩 `50%`(圆)与 `2px`(占位条) |
| 端口/小标签换 `bg-chip` | 换 `bg-chip` | **没有这个 token**,且端口真正的问题是「比卡片暗 39 级」而不是「缺个 chip 底」→ 改用 `field`,hover/选中态用 `color-mix(brand 18%, field)` |
| 间距归并 | 就近下取 | 52 处等值、13 处微调(1 的倍数级),最大一处是提示词节点体 `14px 18px → 12/16`(节点高度 −4px) |
| 阴影 | 走 `elevation-*` | 浮条 `rgba(15,23,42,.12)` → `elevation-2`;节点选中/连接态的内联 `0 6px 20px rgba(0,0,0,.25)` → `elevation-2` |
| 死规则 | — | 删 6 个类名 / 6 条规则:`gen-sizerow` `gen-qualityrow` `gen-tag` `size-x` `size-align` `size-badge`(尺寸/质量 UI 已并入图像设置浮层) |
**新增守卫**:`tests/node-scope-test.js`(进 `test:unit`)——① 节点卡内部禁 `--iwb-layer/layer2/panel`
作背景(浮条除外,它是浮层);② 端口三个态的底色断言;③ 节点区字号/间距/圆角必须走档位;
④ 6 个死类名不复现。第 ① 条是这一批的根因,写成断言比写进文档有效 —— 下一个加节点内控件的人
会在 CI 上被拦,而不是在暗色截图里被用户发现。
## 2. 目标架构
### 2.1 三层模型(与 Primer / Ant Design v5 / Radix 同一套骨架)
@@ -365,7 +398,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-field` | `#ffffff` | `#494949` | **卡片内**一切面:输入框/下拉/任务卡/输出组,以及节点上的端口、引用图占位、标题带 hover;卡片外用 bg-inset | 否 |
| `--iwb-color-bg-hover` | `#ececec` | 派生 | 行/卡 hover | 可覆盖 |
| `--iwb-color-bg-selected` | `color-mix(brand 14%)` | 同 | 选中行 | 随品牌 |
| `--iwb-color-text-primary` | `#1c2333` | `#111111` | 主文字 | 可覆盖 |
@@ -646,7 +679,7 @@ L3 Contract ── 组件整体换肤时才加,能不建就不建
| **B2 浮层** | `.iwb-modal` `.iwb-fullmask` `.iwb-command` `.iwb-ctxmenu` `.iwb-toast` `.iwb-pop*` | 圆角统一 → `radius-panel/popover`;阴影 → `elevation-2/3/4`;z-index → `--iwb-z-*` | 0.5 天 |
| **B3 首页/画布库** | `.iwb-home-*` `.iwb-lib-*` `.iwb-res-*` | 间距归并、字号归并 | 0.5 天 |
| **B4 设置/外观** ✅ | `.iwb-settings-modal` `.iwb-appear-*` `.iwb-set*` | 控件统一 `control-h`(输入框与按钮等高);半像素字号清零;删 21 条死规则 | 0.5 天 |
| **B5 节点** | `.iwb-node*` `.iwb-gen-*` `.iwb-port` | 节点内字号 12/15 归口;圆角走 `node-radius` | 1 天 |
| **B5 节点** ✅ | `.iwb-node*` `.iwb-gen-*` `.iwb-port` | 节点卡内部表面统一 `field`(修端口黑洞)、字号 12/15 归口、圆角归并 | 1 天 | 画布截图 + 计算样式 diff |
| **B6 插件** | `plugins/**` + 插件源码仓库 | 硬编码 → `--iwb-*`;`ALLOW_FILES` 逐项清零 | 配合插件发版 |
**每批验收**(三条同时满足):
@@ -794,7 +827,7 @@ L3 Contract ── 组件整体换肤时才加,能不建就不建
| # | 决定 | 裁定 | 影响与执行口径 |
|---|---|---|---|
| ① | 面板圆角 | **14px**(`radius-panel`) | 浮层(modal/fullmask/菜单/命令面板)统一 14;`popover` 用 12,`control` 用 8,`chip` 用 6,`round` 用 999。节点保持 `--iwb-node-radius`(默认 14)不受影响 |
| ② | 半像素字号 | **并入整数档**(10.5→10、11.5→11、12.5→12、13.5→13)|**已执行**:B3 清首页/库、B4 清设置/外观 | 闭集实际落在 7 档:11 / 12 / 13 / 15 / 17 / 20 / 24。迁移时逐条看换行,只允许「文案变短一行」不允许「挤出容器」。B5/B6 收尾时清剩余 16 处(备份、右键菜单、插件市场卡) |
| ② | 半像素字号 | **并入整数档**(10.5→10、11.5→11、12.5→12、13.5→13)|**已执行**:B3 清首页/库、B4 清设置/外观 | 闭集实际落在 7 档:11 / 12 / 13 / 15 / 17 / 20 / 24。迁移时逐条看换行,只允许「文案变短一行」不允许「挤出容器」。B5 范围外仍剩 16 处(备份页 2、右键菜单 1、操作日志 1、确认框 1、插件市场卡 9、资源浮标/继承条各 1),留给 B6 |
| ③ | 间距迁移 | **先等值替换**,收敛另起一轮 | M4 只换写法不换值(0 diff);30 档 → 16 档的收敛放到 M4 之后单独一批,届时逐屏对照 |
| ④ | 色彩模型修复范围 | **全修 D1–D9**,但**分两版**:3.26.43 只放 D1(零观感),D3/D4/D5/D6/D7/D8/D9 放 3.26.44 | D1 = 单一写入点(消闪变、修系统转暗不生效),观感零风险;其余会改变暗色观感,单独发版并附亮/暗对比图 |
+2 -2
View File
@@ -1,7 +1,7 @@
{
"name": "image-workbench-web",
"private": true,
"version": "3.26.47",
"version": "3.26.48",
"description": "Browser-based node canvas image workbench",
"scripts": {
"build": "node scripts/build.js && node scripts/copy-plugins.js",
@@ -10,7 +10,7 @@
"app:build": "tauri build",
"lint": "eslint src app.js",
"test": "node tests/relay-task-graph-fixture-test.js && node tests/plugin-style-node-test.js && node tests/inherit-text-test.js",
"test:unit": "node tests/plugin-archive-test.js && node tests/plugin-files-policy-test.js && node tests/theme-plugin-tokens-test.js && node tests/theme-static-snapshot-test.js && node tests/overlay-layer-test.js && node tests/settings-scope-test.js && node tests/appearance-v2-test.js && node tests/image-prompt-cover-test.js && node tests/unit-test.js && node tests/canvas-actions-test.js && node tests/canvas-performance-test.js && node tests/canvas-drag-performance-test.js && node tests/resize-observer-performance-test.js && node tests/node-drag-jank-test.js && node tests/edge-graph-performance-test.js && node tests/persistence-export-images-test.js && node tests/settings-hotkeys-size-presets-test.js && node tests/custom-size-validation-test.js && node tests/image-node-performance-test.js && node tests/drag-frame-performance-test.js && node tests/canvas-edge-memo-test.js && node tests/canvas-node-transform-test.js && node tests/canvas-dot-zoom-test.js && node tests/duplicate-ws-fresh-source-test.js && node tests/single-canvas-shell-test.js && node tests/navigation-layout-test.js && node tests/home-canvas-library-test.js && node tests/left-resource-layout-test.js && node tests/interface-hierarchy-test.js && node tests/three-page-layout-test.js && node tests/page-chrome-regression-test.js && node tests/task-cache-test.js && node tests/storage-config-shape-test.js && node tests/storage-zip-test.js && node tests/canvas-node-factory-test.js && node tests/runtime-error-test.js && node tests/runtime-lifecycle-test.js && node tests/runtime-fetch-test.js && node tests/runtime-channel-test.js && node tests/runtime-boundary-test.js && node tests/runtime-record-test.js && node tests/runtime-recovery-test.js && node tests/runtime-diagnostic-record-test.js && node tests/runtime-metrics-test.js && node tests/runtime-run-context-test.js && node tests/runtime-execution-context-test.js && node tests/storage-gc-canvas-refs-test.js && node tests/storage-health-test.js && node tests/generation-state-test.js && node tests/canvas-store-test.js && node tests/storage-result-test.js && node tests/storage-local-test.js && node tests/storage-domain-test.js && node tests/storage-runtime-test.js && node tests/storage-indexeddb-test.js && node tests/generation-scheduler-test.js && node tests/gallery-query-test.js && node tests/gallery-hydration-test.js && node tests/image-blob-store-test.js && node tests/image-preview-derive-test.js && node tests/image-format-test.js && node tests/clipboard-graph-test.js && node tests/clipboard-graph-fallback-test.js && node tests/image-admit-test.js && node tests/image-dedupe-test.js && node tests/clipboard-kind-test.js && node tests/clipboard-paste-test.js && node tests/clipboard-copy-test.js && node tests/paste-once-test.js && node tests/list-e2e-specs-test.js && node tests/desktop-csp-loopback-test.js && node tests/architecture-boundary-guard-test.js && node tests/plugin-host-test.js && node tests/plugin-data-test.js && node tests/plugin-loader-test.js && node tests/plugin-bundle-test.js && node tests/plugin-install-test.js && node tests/plugin-gallery-render-test.js && node tests/plugin-gallery-recovery-test.js && node tests/plugin-gallery-ux-test.js && node tests/plugin-grouplib-render-test.js && node tests/plugin-promptlib-render-test.js && node tests/image-compress-test.js && node tests/storage-fallback-indexeddb-test.js && node tests/canvas-normalize-test.js && node tests/canvas-geometry-test.js && node tests/canvas-history-test.js && node tests/canvas-ops-test.js && node tests/canvas-text-test.js && node tests/history-store-test.js && node tests/plugin-integrity-test.js && node tests/workspace-sessions-store-test.js && node tests/workspace-list-test.js && node tests/workspace-purge-test.js && node tests/provider-ping-test.js && node tests/runtime-diagnostics-hotpath-test.js && node tests/storage-log-failure-test.js && node tests/storage-convergence-test.js && node tests/swallow-wiring-test.js && node tests/workbench-logic-test.js && node tests/storage-autobackup-test.js && node tests/storage-outputs-mutate-test.js && node tests/sync-facts-guard-test.js && node tests/e2e-fixed-waits-ratchet-test.js && node tests/shell-render-behavior-test.js && node tests/canvas-meta-notice-behavior-test.js && node tests/source-text-ratchet-test.js && node tests/plugin-theme-contract-test.js && node tests/prompt-md-roundtrip-test.js && node tests/generation-results-store-test.js && node tests/out-groups-order-test.js && node tests/native-overlay-park-test.js && node tests/ui-dock-sanitize-test.js && node tests/ui-minimap-fit-test.js && node tests/ui-workbench-hooks-test.js",
"test:unit": "node tests/plugin-archive-test.js && node tests/plugin-files-policy-test.js && node tests/theme-plugin-tokens-test.js && node tests/theme-static-snapshot-test.js && node tests/overlay-layer-test.js && node tests/settings-scope-test.js && node tests/node-scope-test.js && node tests/appearance-v2-test.js && node tests/image-prompt-cover-test.js && node tests/unit-test.js && node tests/canvas-actions-test.js && node tests/canvas-performance-test.js && node tests/canvas-drag-performance-test.js && node tests/resize-observer-performance-test.js && node tests/node-drag-jank-test.js && node tests/edge-graph-performance-test.js && node tests/persistence-export-images-test.js && node tests/settings-hotkeys-size-presets-test.js && node tests/custom-size-validation-test.js && node tests/image-node-performance-test.js && node tests/drag-frame-performance-test.js && node tests/canvas-edge-memo-test.js && node tests/canvas-node-transform-test.js && node tests/canvas-dot-zoom-test.js && node tests/duplicate-ws-fresh-source-test.js && node tests/single-canvas-shell-test.js && node tests/navigation-layout-test.js && node tests/home-canvas-library-test.js && node tests/left-resource-layout-test.js && node tests/interface-hierarchy-test.js && node tests/three-page-layout-test.js && node tests/page-chrome-regression-test.js && node tests/task-cache-test.js && node tests/storage-config-shape-test.js && node tests/storage-zip-test.js && node tests/canvas-node-factory-test.js && node tests/runtime-error-test.js && node tests/runtime-lifecycle-test.js && node tests/runtime-fetch-test.js && node tests/runtime-channel-test.js && node tests/runtime-boundary-test.js && node tests/runtime-record-test.js && node tests/runtime-recovery-test.js && node tests/runtime-diagnostic-record-test.js && node tests/runtime-metrics-test.js && node tests/runtime-run-context-test.js && node tests/runtime-execution-context-test.js && node tests/storage-gc-canvas-refs-test.js && node tests/storage-health-test.js && node tests/generation-state-test.js && node tests/canvas-store-test.js && node tests/storage-result-test.js && node tests/storage-local-test.js && node tests/storage-domain-test.js && node tests/storage-runtime-test.js && node tests/storage-indexeddb-test.js && node tests/generation-scheduler-test.js && node tests/gallery-query-test.js && node tests/gallery-hydration-test.js && node tests/image-blob-store-test.js && node tests/image-preview-derive-test.js && node tests/image-format-test.js && node tests/clipboard-graph-test.js && node tests/clipboard-graph-fallback-test.js && node tests/image-admit-test.js && node tests/image-dedupe-test.js && node tests/clipboard-kind-test.js && node tests/clipboard-paste-test.js && node tests/clipboard-copy-test.js && node tests/paste-once-test.js && node tests/list-e2e-specs-test.js && node tests/desktop-csp-loopback-test.js && node tests/architecture-boundary-guard-test.js && node tests/plugin-host-test.js && node tests/plugin-data-test.js && node tests/plugin-loader-test.js && node tests/plugin-bundle-test.js && node tests/plugin-install-test.js && node tests/plugin-gallery-render-test.js && node tests/plugin-gallery-recovery-test.js && node tests/plugin-gallery-ux-test.js && node tests/plugin-grouplib-render-test.js && node tests/plugin-promptlib-render-test.js && node tests/image-compress-test.js && node tests/storage-fallback-indexeddb-test.js && node tests/canvas-normalize-test.js && node tests/canvas-geometry-test.js && node tests/canvas-history-test.js && node tests/canvas-ops-test.js && node tests/canvas-text-test.js && node tests/history-store-test.js && node tests/plugin-integrity-test.js && node tests/workspace-sessions-store-test.js && node tests/workspace-list-test.js && node tests/workspace-purge-test.js && node tests/provider-ping-test.js && node tests/runtime-diagnostics-hotpath-test.js && node tests/storage-log-failure-test.js && node tests/storage-convergence-test.js && node tests/swallow-wiring-test.js && node tests/workbench-logic-test.js && node tests/storage-autobackup-test.js && node tests/storage-outputs-mutate-test.js && node tests/sync-facts-guard-test.js && node tests/e2e-fixed-waits-ratchet-test.js && node tests/shell-render-behavior-test.js && node tests/canvas-meta-notice-behavior-test.js && node tests/source-text-ratchet-test.js && node tests/plugin-theme-contract-test.js && node tests/prompt-md-roundtrip-test.js && node tests/generation-results-store-test.js && node tests/out-groups-order-test.js && node tests/native-overlay-park-test.js && node tests/ui-dock-sanitize-test.js && node tests/ui-minimap-fit-test.js && node tests/ui-workbench-hooks-test.js",
"test:diagnostics": "node tests/runtime-diagnostics-hotpath-test.js",
"test:facts": "node tests/architecture-facts-guard-test.js && node tests/release-records-test.js",
"plugins:gc": "node scripts/plugins-publish.mjs --gc",
+1 -1
View File
@@ -1,7 +1,7 @@
{
"$schema": "../node_modules/@tauri-apps/cli/config.schema.json",
"productName": "image-workbench",
"version": "3.26.47",
"version": "3.26.48",
"identifier": "com.malongan.imageworkbench",
"build": {
"frontendDist": "../dist",
+93 -100
View File
@@ -40,8 +40,8 @@ button { font-family: inherit; }
.iwb-edge-downstream { stroke: var(--iwb-edge-hot); stroke-width: 1.2; opacity: 1; stroke-dasharray: none; }
.iwb-edge-detach { stroke: var(--iwb-err); stroke-width: 2.4; stroke-dasharray: 6 4; }
.iwb-edge-temp { stroke: var(--iwb-edge-hot); stroke-dasharray: 6 4; pointer-events: none; }
.iwb-node { position: absolute; --iwb-text: var(--iwb-node-text); --iwb-text2: var(--iwb-node-text2); background: var(--iwb-node-bg); border: 1px solid var(--iwb-border); border-top: 1px solid var(--iwb-border); border-radius: var(--iwb-node-radius); box-shadow: none; font-size: 12px; color: var(--iwb-text); display: flex; flex-direction: column; cursor: move; contain: layout style; }
.iwb-node-selected { border-color: var(--iwb-brand); box-shadow: 0 0 0 var(--iwb-node-sel-w) var(--iwb-brand), 0 6px 20px rgba(0,0,0,0.25); }
.iwb-node { position: absolute; --iwb-text: var(--iwb-node-text); --iwb-text2: var(--iwb-node-text2); background: var(--iwb-node-bg); border: 1px solid var(--iwb-border); border-top: 1px solid var(--iwb-border); border-radius: var(--iwb-node-radius); box-shadow: none; font-size: var(--iwb-font-sm); color: var(--iwb-text); display: flex; flex-direction: column; cursor: move; contain: layout style; }
.iwb-node-selected { border-color: var(--iwb-brand); box-shadow: 0 0 0 var(--iwb-node-sel-w) var(--iwb-brand), var(--iwb-elevation-2); }
.iwb-node:hover { z-index: 4; }
.iwb-node input, .iwb-node select, .iwb-node button { cursor: auto; }
.iwb-node .iwb-textarea:read-only { cursor: move; }
@@ -52,63 +52,63 @@ button { font-family: inherit; }
/* 节点标题带:节点外框上方、左对齐节点左边(参考设计稿:小图标 + 标题文字,无重边框)。
bottom:100% 相对节点 padding box 顶部(上边框 2px),margin-bottom:8px → 净间隙 6px,标题带总高 28px(世界坐标)。
高度恒定是气泡抬升公式 NODE_HEAD_H/NODE_HEAD_FB_GAP 成立的前提,故 .iwb-node-title 必须单行省略。 */
.iwb-node-head { display: flex; position: absolute; left: 0; bottom: 100%; align-items: center; gap: 5px; height: 22px; max-width: 190px; margin-bottom: 8px; padding: 0 7px; cursor: move; background: transparent; border-radius: 7px; font-weight: 600; }
.iwb-node-head:hover { background: var(--iwb-layer2); }
.iwb-node-head { display: flex; position: absolute; left: 0; bottom: 100%; align-items: center; gap: var(--iwb-space-6); height: 22px; max-width: 190px; margin-bottom: var(--iwb-space-8); padding: 0 var(--iwb-space-6); cursor: move; background: transparent; border-radius: var(--iwb-radius-control); font-weight: 600; }
.iwb-node-head:hover { background: var(--iwb-field); }
/* 标题带画在画布上(透明底),所以不能吃节点/界面的文字色 —— 用画布专用色。
专用色对 --iwb-canvas-bg 按 6:1 派生,抵消 opacity .8 合成后的衰减;实测合成后 ≥4.5。 */
.iwb-node-headicon { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; color: var(--iwb-color-text-on-canvas, var(--iwb-text2)); opacity: .75; }
.iwb-node-headicon .iwb-ic { width: 13px; height: 13px; }
/* 标题统一灰色(不再按节点类型着色;类型由左侧图标区分) */
.iwb-node-title { font-size: 12px; color: var(--iwb-color-text-on-canvas, var(--iwb-text2)); opacity: 0.8; font-weight: 500; line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: opacity .15s, font-weight .15s; }
.iwb-node-title { font-size: var(--iwb-font-sm); color: var(--iwb-color-text-on-canvas, var(--iwb-text2)); opacity: 0.8; font-weight: 500; line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: opacity .15s, font-weight .15s; }
.iwb-node-selected .iwb-node-title { opacity: 1; font-weight: 600; }
/* 头部操作按钮继续隐藏:其功能在气泡 / 右键菜单中已有,显示后会与气泡重复。 */
.iwb-node-head .iwb-node-headbtns { display: none; }
/* 选中时顶部浮动气泡操作条(复刻 infinite-canvas/opentu) */
/* --iwb-fb-k:气泡尺寸随视口缩放(见 app.js floatbarScale)。transform-origin 取贴边中点,
保证缩放后 bottom-center 仍精确落在 left/top 锚点上 → 位置公式无需随 k 改变。 */
.iwb-node-floatbar { position: absolute; z-index: 70; display: flex; align-items: center; gap: 2px; padding: 4px; border-radius: 14px; background: var(--iwb-panel); border: 1px solid var(--iwb-border); box-shadow: 0 8px 28px rgba(15,23,42,.12); transform: translate(-50%, -100%) scale(var(--iwb-fb-k, 1)); transform-origin: 50% 100%; pointer-events: auto; left: 50%; top: -6px; }
.iwb-node-floatbar { position: absolute; z-index: 70; display: flex; align-items: center; gap: var(--iwb-space-2); padding: var(--iwb-space-4); border-radius: var(--iwb-radius-popover); background: var(--iwb-panel); border: 1px solid var(--iwb-border); box-shadow: var(--iwb-elevation-2); transform: translate(-50%, -100%) scale(var(--iwb-fb-k, 1)); transform-origin: 50% 100%; pointer-events: auto; left: 50%; top: -6px; }
/* 上方放不下时改挂节点下方(避免被 .iwb-canvas 的 overflow:hidden 裁掉):origin 改为上边中点 */
.iwb-node-floatbar.iwb-node-floatbar-below { transform: translate(-50%, 0) scale(var(--iwb-fb-k, 1)); transform-origin: 50% 0; }
.iwb-node-floatbar button { width: 30px; height: 28px; border: 0; border-radius: 8px; background: transparent; color: var(--iwb-text2); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.iwb-node-floatbar label { width: 30px; height: 28px; border: 0; border-radius: 8px; background: transparent; color: var(--iwb-text2); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.iwb-node-floatbar button:hover, .iwb-node-floatbar label:hover { background: var(--iwb-layer2); color: var(--iwb-text); }
.iwb-node-floatbar button { width: 30px; height: 28px; border: 0; border-radius: var(--iwb-radius-control); background: transparent; color: var(--iwb-text2); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.iwb-node-floatbar label { width: 30px; height: 28px; border: 0; border-radius: var(--iwb-radius-control); background: transparent; color: var(--iwb-text2); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.iwb-node-floatbar button:hover, .iwb-node-floatbar label:hover { background: color-mix(in srgb, var(--iwb-text) 10%, transparent); color: var(--iwb-text); }
.iwb-node-floatbar button:disabled, .iwb-node-floatbar label:disabled { opacity: 0.4; cursor: default; background: transparent; }
.iwb-node-floatbar-title { font-size: 12px; font-weight: 600; color: var(--iwb-text); padding: 4px 10px; border-radius: 8px; cursor: default; white-space: nowrap; max-width: 180px; overflow: hidden; text-overflow: ellipsis; }
.iwb-node-floatbar-title:hover { background: var(--iwb-layer2); }
.iwb-node-floatbar-title { font-size: var(--iwb-font-sm); font-weight: 600; color: var(--iwb-text); padding: var(--iwb-space-4) var(--iwb-space-10); border-radius: var(--iwb-radius-control); cursor: default; white-space: nowrap; max-width: 180px; overflow: hidden; text-overflow: ellipsis; }
.iwb-node-floatbar-title:hover { background: color-mix(in srgb, var(--iwb-text) 10%, transparent); }
/* 气泡删除按钮(2026-11-09 恢复;用户 2026-10-30 曾以「防误删」为由移除)。
方案 B:静态态与其它气泡按钮完全一致(灰图标、透明底),只有 hover 才亮红 ——
不做红底常驻,避免把删除变成常驻视觉焦点;误删由 Ctrl+Z(deleteNodes 会 pushHistory)兜底。
红色复用既有 token --iwb-err(与右键菜单「删除」同语义),不新增变量。 */
.iwb-node-floatbar button.iwb-fb-del:hover { color: var(--iwb-err); background: color-mix(in srgb, var(--iwb-err) 12%, transparent); }
.iwb-node-headbtns { display: flex; gap: 2px; }
.iwb-node-del { background: none; border: none; color: var(--iwb-text2); cursor: pointer; font-size: 12px; padding: 0 3px; display: inline-flex; align-items: center; justify-content: center; }
.iwb-node-headbtns { display: flex; gap: var(--iwb-space-2); }
.iwb-node-del { background: none; border: none; color: var(--iwb-text2); cursor: pointer; font-size: var(--iwb-font-sm); padding: 0 var(--iwb-space-2); display: inline-flex; align-items: center; justify-content: center; }
.iwb-node-del:hover { color: var(--iwb-brand-text, var(--iwb-brand)); }
.iwb-node-body { padding: 8px 10px; overflow: visible; flex: 1 1 auto; min-height: 0; }
.iwb-node-body { padding: var(--iwb-space-8) var(--iwb-space-10); overflow: visible; flex: 1 1 auto; min-height: 0; }
/* 插件自定义节点体容器(2026-11-14):宿主只提供一块稳定画布(防 React 重建导致输入框失焦),
内部排版(缩略图 / 变量行 / 开关)全由插件自己的 CSS 决定,这里不给内边距也不预设布局。 */
.iwb-plugin-node-body { padding: 0; display: flex; flex-direction: column; overflow: visible; }
/* LOD 低细节占位体(v3.24.77 起):节点在屏幕上宽 < 64px 时**不渲染** body 内容。
不给暗示的话,缩小后整块画布会变成一堆空心框,看起来像「图丢了」。 */
.iwb-node-body-lod { padding: 9px 10px; display: flex; flex-direction: column; justify-content: center; gap: 5px; }
.iwb-lod-img { padding: 0; margin: 8px; border-radius: 8px; flex: 1 1 auto; min-height: 20px; background: color-mix(in srgb, var(--iwb-border) 55%, transparent); }
.iwb-node-body-lod { padding: var(--iwb-space-8) var(--iwb-space-10); display: flex; flex-direction: column; justify-content: center; gap: var(--iwb-space-4); }
.iwb-lod-img { padding: 0; margin: var(--iwb-space-8); border-radius: var(--iwb-radius-control); flex: 1 1 auto; min-height: 20px; background: color-mix(in srgb, var(--iwb-border) 55%, transparent); }
.iwb-lod-text::before, .iwb-lod-text::after { content: ''; display: block; height: 4px; border-radius: 2px; background: color-mix(in srgb, var(--iwb-border) 55%, transparent); }
.iwb-lod-text::after { width: 58%; }
/* LOD lite 档(v3.24.78):灰块认不出是哪个节点 —— 图片节点画一张代表图,文本节点画首行文字。
仍然不建 textarea / 图片网格 / 按钮 / 事件,成本只比纯占位多一个 <img>。 */
.iwb-lod-lite.iwb-lod-img { overflow: hidden; }
.iwb-lod-thumb { display: block; width: 100%; flex: 1 1 auto; min-height: 0; object-fit: cover; border-radius: 8px; }
.iwb-lod-thumb { display: block; width: 100%; flex: 1 1 auto; min-height: 0; object-fit: cover; border-radius: var(--iwb-radius-control); }
.iwb-lod-has-text { justify-content: flex-start; }
.iwb-lod-has-text::before, .iwb-lod-has-text::after { display: none; }
.iwb-lod-line { font-size: 11px; line-height: 1.3; color: var(--iwb-text2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.iwb-lod-line { font-size: var(--iwb-font-xs); line-height: 1.3; color: var(--iwb-text2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* 提示词节点:文本内容与外框再留大一点边距(参考截图) */
.iwb-node:has(.iwb-textarea-plain) .iwb-node-body { padding: 14px 18px; }
.iwb-node:has(.iwb-textarea-plain) .iwb-node-body { padding: var(--iwb-space-12) var(--iwb-space-16); }
.iwb-node-relay { width: 72px !important; min-height: 72px !important; border-radius: 50%; border: 0; background: transparent; display: flex; align-items: center; justify-content: center; }
.iwb-node-relay .iwb-node-body { padding: 0; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.iwb-relay-ring { position: absolute; inset: 0; border-radius: 50%; border: 10px solid var(--iwb-node-bg); background: transparent; box-shadow: 0 2px 10px rgba(0,0,0,0.12); }
/* 中继节点设了背景色时:**圆环**取色、中间保持透明(2026-11-01 用户要求,避免整块实心圆) */
.iwb-node.iwb-node-relay[data-bg] { background: transparent; border-color: transparent; }
.iwb-node.iwb-node-relay[data-bg] .iwb-relay-ring { border-color: var(--iwb-node-color); }
.iwb-ref-actions { display: flex; gap: 6px; padding: 2px 0 0; }
.iwb-ref-actions { display: flex; gap: var(--iwb-space-6); padding: var(--iwb-space-2) 0 0; }
.iwb-ref-actions .iwb-ref-change { white-space: nowrap; }
.iwb-textarea { min-height: 56px; overflow-y: auto; }
.iwb-resize { position: absolute; right: -6px; bottom: -6px; width: 14px; height: 14px; cursor: nwse-resize; z-index: 6; }
@@ -117,8 +117,8 @@ button { font-family: inherit; }
.iwb-grow { flex: 1; }
.iwb-row { display: flex; gap: 6px; align-items: center; }
.iwb-actions { margin-top: 8px; }
.iwb-port { position: absolute; width: 12px; height: 12px; border-radius: 50%; background: var(--iwb-layer); border: 1.5px solid var(--iwb-border2); transform: translate(-50%, -50%); z-index: 7; }
.iwb-node:hover .iwb-port { border-color: var(--iwb-brand); background: var(--iwb-panel); }
.iwb-port { position: absolute; width: 12px; height: 12px; border-radius: 50%; background: var(--iwb-field); border: 1.5px solid var(--iwb-border2); transform: translate(-50%, -50%); z-index: 7; }
.iwb-node:hover .iwb-port { border-color: var(--iwb-brand); background: var(--iwb-field); }
.iwb-port:hover { border-color: var(--iwb-brand) !important; box-shadow: 0 0 0 4px color-mix(in srgb, var(--iwb-brand) 25%, transparent); }
.iwb-port::after { content: ''; position: absolute; inset: -9px; border-radius: 50%; }
/* 端口「+」提示(2026-11-01 用户要求,参照参考图):hover 靠近、或选中节点且该端口未连线时显示加号。
@@ -133,7 +133,7 @@ button { font-family: inherit; }
}
/* 选中且未连线:加号放大(约 2 倍视觉,2026-11-01 用户要求) */
.iwb-node-selected .iwb-port:not(.iwb-port-linked) { width: 22px; height: 22px; }
.iwb-node-selected .iwb-port:not(.iwb-port-linked)::before { opacity: 1; inset: 4px; }
.iwb-node-selected .iwb-port:not(.iwb-port-linked)::before { opacity: 1; inset: var(--iwb-space-4); }
/* 已连线:选中(未 hover)不显示加号,避免误以为还能加 */
.iwb-node-selected .iwb-port-linked::before { opacity: 0; }
/* 鼠标靠近端点:**再放大一档**,且**已连线的端口也显示**(节点可多连)。
@@ -141,19 +141,19 @@ button { font-family: inherit; }
.iwb-port:hover, .iwb-node-selected .iwb-port:hover { width: 24px; height: 24px; transition: width .1s, height .1s; }
.iwb-port:hover::before,
.iwb-node-selected .iwb-port:hover::before,
.iwb-node-selected .iwb-port-linked:hover::before { opacity: 1; inset: 5px; }
.iwb-port:hover { border-color: var(--iwb-brand); background: var(--iwb-layer2); }
.iwb-node-selected .iwb-port:not(.iwb-port-linked) { background: var(--iwb-layer2); }
.iwb-node-selected .iwb-port-linked:hover::before { opacity: 1; inset: var(--iwb-space-4); }
.iwb-port:hover { border-color: var(--iwb-brand); background: color-mix(in srgb, var(--iwb-brand) 18%, var(--iwb-field)); }
.iwb-node-selected .iwb-port:not(.iwb-port-linked) { background: color-mix(in srgb, var(--iwb-brand) 18%, var(--iwb-field)); }
.iwb-connecting .iwb-port-in { border-color: var(--iwb-brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--iwb-brand) 30%, transparent); }
.iwb-port-in { left: 0; cursor: crosshair; }
.iwb-port-out { left: 100%; cursor: crosshair; }
.iwb-ref-thumb { width: 100%; height: 84px; object-fit: cover; border-radius: 6px; border: 1px solid var(--iwb-border); }
.iwb-ref-empty { height: 84px; display: flex; align-items: center; justify-content: center; color: var(--iwb-text2); border: 1px dashed var(--iwb-border2); border-radius: 6px; font-size: 12px; }
.iwb-ref-images { display: flex; flex-direction: column; gap: 6px; }
.iwb-ref-imgrow { display: flex; align-items: center; gap: 6px; }
.iwb-ref-thumb { width: 100%; height: 84px; object-fit: cover; border-radius: var(--iwb-radius-chip); border: 1px solid var(--iwb-border); }
.iwb-ref-empty { height: 84px; display: flex; align-items: center; justify-content: center; color: var(--iwb-text2); border: 1px dashed var(--iwb-border2); border-radius: var(--iwb-radius-chip); font-size: var(--iwb-font-sm); }
.iwb-ref-images { display: flex; flex-direction: column; gap: var(--iwb-space-6); }
.iwb-ref-imgrow { display: flex; align-items: center; gap: var(--iwb-space-6); }
.iwb-ref-idx { flex: 0 0 18px; height: 18px; border-radius: 50%; background: var(--iwb-brand); color: var(--iwb-on-brand); font-size: 10px; display: flex; align-items: center; justify-content: center; }
.iwb-ref-img { flex: 1; max-height: 90px; object-fit: contain; border-radius: 6px; border: 1px solid var(--iwb-border); background: var(--iwb-layer2); cursor: move; min-width: 0; }
.iwb-ref-imgactions { flex: 0 0 auto; display: flex; flex-direction: column; gap: 2px; }
.iwb-ref-img { flex: 1; max-height: 90px; object-fit: contain; border-radius: var(--iwb-radius-chip); border: 1px solid var(--iwb-border); background: var(--iwb-field); cursor: move; min-width: 0; }
.iwb-ref-imgactions { flex: 0 0 auto; display: flex; flex-direction: column; gap: var(--iwb-space-2); }
.iwb-file { display: inline-block; margin-top: 6px; padding: 4px 10px; border: 1px dashed var(--iwb-border2); border-radius: 6px; font-size: 12px; cursor: pointer; color: var(--iwb-text2); }
.iwb-file:hover { border-color: var(--iwb-brand); color: var(--iwb-brand-text, var(--iwb-brand)); }
.iwb-hint { font-size: 10px; color: var(--iwb-text2); margin-top: 4px; }
@@ -303,22 +303,22 @@ button { font-family: inherit; }
.iwb-ptext { font-size: 11px; color: var(--iwb-text2); margin-top: 4px; line-height: 1.5; white-space: pre-wrap; word-break: break-all; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.iwb-tag { display: inline-block; background: color-mix(in srgb, var(--iwb-tint) 7%, transparent); color: var(--iwb-text2); border-radius: 4px; font-size: 10px; padding: 1px 6px; margin: 3px 4px 0 0; }
.iwb-pedit { border: 1px solid var(--iwb-border); border-radius: 8px; padding: 10px; display: flex; flex-direction: column; gap: 6px; }
.iwb-tasks { margin-top: 8px; display: flex; flex-direction: column; gap: 8px; }
.iwb-gen-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.iwb-tasks { margin-top: var(--iwb-space-8); display: flex; flex-direction: column; gap: var(--iwb-space-8); }
.iwb-gen-head { display: flex; align-items: center; justify-content: space-between; gap: var(--iwb-space-6); }
.iwb-gen-title { font-weight: 600; }
/* 2026-10-30:参数区**不再叠一层灰底卡片**(用户反馈「三层边缘、左边间距不统一」)。
现在只有两层:节点卡 + 选择框;左右内边距统一由 .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-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; }
.iwb-task-refs { display: flex; gap: 4px; margin-top: 6px; flex-wrap: wrap; }
.iwb-task-ref { object-fit: cover; border-radius: 5px; border: 1px solid var(--iwb-border); cursor: zoom-in; }
.iwb-gen-settings { margin-top: var(--iwb-space-8); border: none; border-bottom: 1px solid var(--iwb-border); border-radius: 0; padding: var(--iwb-space-4) 0 var(--iwb-space-8); margin-bottom: var(--iwb-space-4); background: transparent; display: flex; flex-direction: column; gap: var(--iwb-space-4); }
.iwb-task { border: 1px solid var(--iwb-border); border-radius: var(--iwb-radius-control); padding: var(--iwb-space-6) var(--iwb-space-8); background: var(--iwb-field); }
.iwb-task-head { position: relative; display: flex; align-items: center; justify-content: space-between; gap: var(--iwb-space-6); }
.iwb-task-title { font-size: var(--iwb-font-md); font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--iwb-text); }
.iwb-task-title-text { font-size: var(--iwb-font-xs); font-weight: 400; color: var(--iwb-text2); margin-left: var(--iwb-space-2); }
.iwb-task-refs { display: flex; gap: var(--iwb-space-4); margin-top: var(--iwb-space-6); flex-wrap: wrap; }
.iwb-task-ref { object-fit: cover; border-radius: var(--iwb-radius-chip); border: 1px solid var(--iwb-border); cursor: zoom-in; }
.iwb-ref-head { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.iwb-ref-single { width: 100%; min-height: 60px; max-height: 340px; object-fit: contain; object-position: center; border-radius: 6px; border: 1px solid var(--iwb-border); background: var(--iwb-layer2); cursor: move; }
.iwb-ref-head { display: flex; align-items: center; gap: var(--iwb-space-8); margin-bottom: var(--iwb-space-4); }
.iwb-ref-single { width: 100%; min-height: 60px; max-height: 340px; object-fit: contain; object-position: center; border-radius: var(--iwb-radius-chip); border: 1px solid var(--iwb-border); background: var(--iwb-field); cursor: move; }
.iwb-history { position: absolute; left: 12px; right: 12px; bottom: 46px; background: var(--iwb-panel); border: 1px solid var(--iwb-border); border-radius: var(--iwb-radius-panel); z-index: 30; box-shadow: var(--iwb-elevation-2); padding: 8px 12px; max-height: 180px; display: flex; flex-direction: column; }
.iwb-history-grid { display: flex; gap: 8px; overflow-x: auto; padding: 8px 2px; flex: 1; }
.iwb-history-item { position: relative; flex: 0 0 110px; }
@@ -330,21 +330,21 @@ button { font-family: inherit; }
.iwb-pickrow { display: flex; gap: 8px; align-items: flex-start; padding: 5px 0; cursor: pointer; font-size: 12px; }
.iwb-picktext { color: var(--iwb-text); line-height: 1.4; word-break: break-all; }
.iwb-ref-upload { flex: 1 1 auto; min-height: 110px; display: flex; align-items: center; justify-content: center; border: 1.5px dashed var(--iwb-border2); border-radius: 8px; color: var(--iwb-text2); font-size: 13px; cursor: move; }
.iwb-ref-upload { flex: 1 1 auto; min-height: 110px; display: flex; align-items: center; justify-content: center; border: 1.5px dashed var(--iwb-border2); border-radius: var(--iwb-radius-control); color: var(--iwb-text2); font-size: var(--iwb-font-md); cursor: move; }
.iwb-ref-upload:hover { border-color: var(--iwb-brand); color: var(--iwb-brand-text, var(--iwb-brand)); }
.iwb-ref-emptybox { flex: 1 1 auto; min-height: 110px; display: flex; flex-direction: column; gap: 6px; }
.iwb-ref-url-row { display: flex; gap: 5px; align-items: center; }
.iwb-ref-url-row .iwb-ref-upload-link { background: var(--iwb-layer); border-color: var(--iwb-border); color: var(--iwb-text2); }
.iwb-ref-upload-link:hover { background: color-mix(in srgb, var(--iwb-brand) 10%, var(--iwb-layer)); border-color: var(--iwb-border2); color: var(--iwb-text); }
.iwb-ref-url-input { min-width: 0; flex: 1 1 auto; font-size: 11px; }
.iwb-ref-emptybox { flex: 1 1 auto; min-height: 110px; display: flex; flex-direction: column; gap: var(--iwb-space-6); }
.iwb-ref-url-row { display: flex; gap: var(--iwb-space-4); align-items: center; }
.iwb-ref-url-row .iwb-ref-upload-link { background: var(--iwb-field); border-color: var(--iwb-border); color: var(--iwb-text2); }
.iwb-ref-upload-link:hover { background: color-mix(in srgb, var(--iwb-brand) 10%, var(--iwb-field)); border-color: var(--iwb-border2); color: var(--iwb-text); }
.iwb-ref-url-input { min-width: 0; flex: 1 1 auto; font-size: var(--iwb-font-xs); }
.iwb-ref-url-current { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--iwb-text2); font-size: 10px; }
.iwb-ref-show { flex: 1 1 auto; min-height: 0; display: flex; align-items: center; justify-content: center; }
.iwb-ref-miniactions .iwb-btn { font-size: 10px; padding: 1px 6px; text-decoration: none; }
.iwb-ref-miniactions .iwb-btn { font-size: 10px; padding: var(--iwb-space-2) var(--iwb-space-6); text-decoration: none; }
.iwb-task-ref { width: 28px; height: 28px; }
.iwb-refmini { position: relative; }
.iwb-refmini-empty { width: 28px; height: 28px; border-radius: 5px; border: 1px solid var(--iwb-border); background: var(--iwb-layer); display: flex; align-items: center; justify-content: center; color: #9aa1ad; }
.iwb-refmini-empty { width: 28px; height: 28px; border-radius: var(--iwb-radius-chip); border: 1px solid var(--iwb-border); background: var(--iwb-field); display: flex; align-items: center; justify-content: center; color: #9aa1ad; }
.iwb-refmini-empty .iwb-refmini-warn { display: inline-flex; }
.iwb-refmini .iwb-refmini-idx { position: absolute; left: -3px; top: -3px; background: var(--iwb-brand); color: var(--iwb-on-brand); font-size: 8px; min-width: 12px; height: 12px; border-radius: 6px; display: flex; align-items: center; justify-content: center; padding: 0 2px; z-index: 2; }
.iwb-refmini .iwb-refmini-idx { position: absolute; left: -3px; top: -3px; background: var(--iwb-brand); color: var(--iwb-on-brand); font-size: 8px; min-width: 12px; height: 12px; border-radius: var(--iwb-radius-chip); display: flex; align-items: center; justify-content: center; padding: 0 var(--iwb-space-2); z-index: 2; }
/* ---- v2 P2:图片传输设置 + 出图清理 ---- */
.iwb-section { border-top: 1px solid var(--iwb-border); margin-top: 16px; padding-top: 12px; }
@@ -493,7 +493,7 @@ button { font-family: inherit; }
/* 节点停用(M 键):不参与执行,半透明 + 灰色虚线边 */
.iwb-node-disabled { opacity: 0.55; filter: grayscale(0.35); }
.iwb-node-disabled .iwb-node-head { background: color-mix(in srgb, var(--iwb-layer2) 60%, transparent); }
.iwb-node-disabled .iwb-node-head { background: color-mix(in srgb, var(--iwb-field) 60%, transparent); }
.iwb-node-disabled .iwb-port { opacity: 0.45; }
.iwb-canvas { transition: left 0.15s; }
.iwb-toolbar-wrap { position: absolute; left: 0; right: 60px; bottom: 14px; display: flex; justify-content: center; pointer-events: none; z-index: 10; }
@@ -515,8 +515,8 @@ button { font-family: inherit; }
.iwb-modal-lg .iwb-textarea { flex: 1 1 auto; min-height: 200px; }
/* ---- 参考图节点:图片随框自适应 / 底部操作栏 / 固定高度填满 ---- */
.iwb-ref-body { display: flex; flex-direction: column; gap: 6px; min-height: 0; position: relative; }
.iwb-ref-foot { flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.iwb-ref-body { display: flex; flex-direction: column; gap: var(--iwb-space-6); min-height: 0; position: relative; }
.iwb-ref-foot { flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; gap: var(--iwb-space-6); }
.iwb-node-fixed .iwb-ref-single { flex: 1 1 auto; min-height: 0; max-height: none; height: auto; }
.iwb-node-fixed .iwb-ref-show { flex: 1 1 auto; min-height: 0; }
@@ -697,9 +697,9 @@ html { scrollbar-width: thin; scrollbar-color: var(--iwb-border2) color-mix(in s
.iwb-toolbar-bottom .iwb-btn-fit { padding: 7px 7px; }
/* ---- 连线拖拽反馈:可连接绿框 / 不可连接红框 ---- */
.iwb-node.iwb-conn-ok { border-color: var(--iwb-ok) !important; box-shadow: 0 0 0 2px color-mix(in srgb, var(--iwb-ok) 45%, transparent), 0 6px 20px rgba(0,0,0,0.25) !important; }
.iwb-node.iwb-conn-bad { border-color: var(--iwb-err) !important; box-shadow: 0 0 0 2px color-mix(in srgb, var(--iwb-err) 55%, transparent), 0 6px 20px rgba(0,0,0,0.25) !important; }
.iwb-conn-hint { position: absolute; left: 8px; right: 8px; bottom: 6px; z-index: 6; padding: 4px 6px; border-radius: 5px; color: var(--iwb-err); background: rgba(254, 226, 226, 0.96); border: 1px solid rgba(239, 68, 68, 0.35); font-size: 11px; line-height: 1.25; pointer-events: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.iwb-node.iwb-conn-ok { border-color: var(--iwb-ok) !important; box-shadow: 0 0 0 2px color-mix(in srgb, var(--iwb-ok) 45%, transparent), var(--iwb-elevation-2) !important; }
.iwb-node.iwb-conn-bad { border-color: var(--iwb-err) !important; box-shadow: 0 0 0 2px color-mix(in srgb, var(--iwb-err) 55%, transparent), var(--iwb-elevation-2) !important; }
.iwb-conn-hint { position: absolute; left: 8px; right: 8px; bottom: 6px; z-index: 6; padding: var(--iwb-space-4) var(--iwb-space-6); border-radius: var(--iwb-radius-chip); color: var(--iwb-err); background: rgba(254, 226, 226, 0.96); border: 1px solid rgba(239, 68, 68, 0.35); font-size: var(--iwb-font-xs); line-height: 1.25; pointer-events: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.iwb-command-mask { position: fixed; inset: 0; z-index: var(--iwb-z-command); display: flex; justify-content: center; align-items: flex-start; padding-top: 13vh; background: rgba(10, 12, 18, 0.32); }
.iwb-command { width: min(560px, calc(100vw - 32px)); max-height: min(560px, 72vh); overflow: hidden; background: var(--iwb-panel); border: 1px solid var(--iwb-border2); border-radius: var(--iwb-radius-panel); box-shadow: var(--iwb-elevation-3); display: flex; flex-direction: column; }
.iwb-command-head { display: flex; align-items: center; gap: 9px; padding: 12px 14px; border-bottom: 1px solid var(--iwb-border); }
@@ -716,10 +716,10 @@ html { scrollbar-width: thin; scrollbar-color: var(--iwb-border2) color-mix(in s
.iwb-edge-temp.iwb-edge-bad { stroke: var(--iwb-err) !important; }
/* 任务失败详情 */
.iwb-task-err-toggle { display: block; width: 100%; text-align: left; margin-top: 6px; font-size: 11px; color: var(--iwb-err); background: color-mix(in srgb, var(--iwb-err) 8%, transparent); border: 1px solid color-mix(in srgb, var(--iwb-err) 35%, transparent); border-radius: 5px; cursor: pointer; padding: 4px 6px; }
.iwb-task-err-toggle { display: block; width: 100%; text-align: left; margin-top: var(--iwb-space-6); font-size: var(--iwb-font-xs); color: var(--iwb-err); background: color-mix(in srgb, var(--iwb-err) 8%, transparent); border: 1px solid color-mix(in srgb, var(--iwb-err) 35%, transparent); border-radius: var(--iwb-radius-chip); cursor: pointer; padding: var(--iwb-space-4) var(--iwb-space-6); }
.iwb-task-err-toggle:hover { background: color-mix(in srgb, var(--iwb-err) 14%, transparent); }
.iwb-task-err { margin-top: 6px; border: 1px solid color-mix(in srgb, var(--iwb-err) 40%, transparent); border-radius: 6px; background: color-mix(in srgb, var(--iwb-err) 6%, transparent); padding: 6px 8px; }
.iwb-task-errline { font-size: 11px; color: var(--iwb-err); word-break: break-all; line-height: 1.6; padding: 1px 0; }
.iwb-task-err { margin-top: var(--iwb-space-6); border: 1px solid color-mix(in srgb, var(--iwb-err) 40%, transparent); border-radius: var(--iwb-radius-chip); background: color-mix(in srgb, var(--iwb-err) 6%, transparent); padding: var(--iwb-space-6) var(--iwb-space-8); }
.iwb-task-errline { font-size: var(--iwb-font-xs); color: var(--iwb-err); word-break: break-all; line-height: 1.6; padding: var(--iwb-space-2) 0; }
/* 失败分类颜色:连接=红、资源/额度=橙、密钥=紫、服务商=红棕、其他=灰 */
.iwb-err-conn { color: var(--iwb-err); }
.iwb-err-quota { color: var(--iwb-warn); }
@@ -791,23 +791,23 @@ html { scrollbar-width: thin; scrollbar-color: var(--iwb-border2) color-mix(in s
.iwb-history-check .iwb-ic { width: 12px; height: 12px; }
/* ---- 生图节点:参数设置(横向一行,无标题无分类) ---- */
.iwb-gen-row { display: flex; gap: 4px; align-items: center; }
.iwb-gen-row { display: flex; gap: var(--iwb-space-4); 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-field); background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path d='M1 1l4 4 4-4' stroke='%23c8cdd6' stroke-width='1.6' fill='none' stroke-linecap='round'/></svg>"); background-repeat: no-repeat; background-position: right 5px center; border: none; appearance: none; -webkit-appearance: none; -moz-appearance: none; }
.iwb-gen-cell .iwb-input { width: auto; max-width: 100%; font-size: var(--iwb-font-lg); background-color: var(--iwb-field); background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path d='M1 1l4 4 4-4' stroke='%23c8cdd6' stroke-width='1.6' fill='none' stroke-linecap='round'/></svg>"); 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; }
.iwb-task-btns { display: inline-flex; align-items: center; gap: var(--iwb-space-4); flex: 0 0 auto; }
/* 任务卡左侧有 1px 描边 + 8px 内边距,批量管理行没有 ⇒ 补 9px 让两处复选框落在同一条竖线上(2026-11-01) */
.iwb-task-bulkbar { padding-left: 9px; }
.iwb-task-check { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; flex: 0 0 auto; cursor: pointer; border-radius: 7px; margin-right: 2px; transition: background 0.12s; }
.iwb-task-bulkbar { padding-left: var(--iwb-space-8); }
.iwb-task-check { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; flex: 0 0 auto; cursor: pointer; border-radius: var(--iwb-radius-chip); margin-right: var(--iwb-space-2); transition: background 0.12s; }
.iwb-task-check:hover { background: color-mix(in srgb, var(--iwb-brand) 12%, transparent); }
.iwb-task-check input { width: 16px; height: 16px; margin: 0; cursor: pointer; accent-color: var(--iwb-text); }
.iwb-task-title { flex: 1 1 auto; min-width: 0; }
.iwb-task-inactive { opacity: 0.55; border-left-color: var(--iwb-border2); }
.iwb-task-inactive .iwb-task-title { text-decoration: line-through; }
.iwb-task { position: relative; overflow: hidden; }
.iwb-task-refinfo { font-size: 10px; font-weight: 400; color: var(--iwb-text-dim); margin-left: 3px; white-space: nowrap; }
.iwb-task-refinfo { font-size: 10px; font-weight: 400; color: var(--iwb-text-dim); margin-left: var(--iwb-space-2); white-space: nowrap; }
.iwb-generation-spinner { position: relative; z-index: 2; display: inline-block; width: 12px; height: 12px; flex: 0 0 12px; border: 2px solid var(--iwb-anim-track); border-top-color: var(--iwb-anim); border-right-color: var(--iwb-anim); border-radius: 50%; animation: iwb-generation-spinner-spin 0.9s linear infinite; }
.iwb-task-count-sel { min-width: 56px; border: none; background-color: transparent; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path d='M1 1l4 4 4-4' stroke='%23c8cdd6' stroke-width='1.6' fill='none' stroke-linecap='round'/></svg>"); background-repeat: no-repeat; background-position: right 3px center; appearance: none; -webkit-appearance: none; -moz-appearance: none; }
@keyframes iwb-generation-spinner-spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@@ -836,14 +836,14 @@ html { scrollbar-width: thin; scrollbar-color: var(--iwb-border2) color-mix(in s
.iwb-wsrail-foot-collapsed { padding: 8px 6px; }
/* 节点标题编辑 */
.iwb-node-title-input { flex: 1 1 auto; min-width: 0; font-size: 12px; font-weight: 600; padding: 1px 4px; height: 22px; }
.iwb-node-title-input { flex: 1 1 auto; min-width: 0; font-size: var(--iwb-font-sm); font-weight: 600; padding: var(--iwb-space-2) var(--iwb-space-4); height: 22px; }
/* 任务卡结果图(与提示词一一对应) */
.iwb-task-results { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 8px; }
.iwb-task-results { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--iwb-space-6); margin-top: var(--iwb-space-8); }
.iwb-task-result { position: relative; }
.iwb-task-result-img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; border: 1px solid var(--iwb-border); cursor: zoom-in; background: var(--iwb-layer2); display: block; transition: border-color 0.12s; }
.iwb-task-result-img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--iwb-radius-control); border: 1px solid var(--iwb-border); cursor: zoom-in; background: var(--iwb-field); display: block; transition: border-color 0.12s; }
.iwb-task-result-img:hover { border-color: var(--iwb-brand); }
.iwb-task-result-meta { font-size: 10px; color: var(--iwb-text2); text-align: center; margin-top: 2px; }
.iwb-task-result-meta { font-size: 10px; color: var(--iwb-text2); text-align: center; margin-top: var(--iwb-space-2); }
.iwb-task-result-dl { position: absolute; left: 0; right: 0; bottom: 0; height: 30px; border-radius: 0 0 8px 8px; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,0.45); opacity: 0; transition: opacity 0.15s; }
.iwb-task-result:hover .iwb-task-result-dl { opacity: 1; }
.iwb-task-result-dl .iwb-ic { width: 16px; height: 16px; color: var(--iwb-on-brand); }
@@ -980,11 +980,11 @@ html { scrollbar-width: thin; scrollbar-color: var(--iwb-border2) color-mix(in s
.iwb-oplog-kind { flex: 0 0 44px; color: var(--iwb-brand-text, var(--iwb-brand)); font-weight: 700; }
.iwb-oplog-msg { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.iwb-gen-cell .iwb-input { min-height: 32px; padding: 5px 24px 5px 8px; cursor: pointer; }
.iwb-gen-row { gap: 6px; min-height: 36px; }
.iwb-size-preset-grid { display: grid; grid-template-columns: 110px repeat(3, minmax(108px, 1fr)); gap: 6px; align-items: center; margin: 8px 0; }
.iwb-size-preset-head { color: var(--iwb-text2); font-size: 12px; font-weight: 700; }
.iwb-size-preset-name { font-size: 12px; font-weight: 700; }
.iwb-gen-cell .iwb-input { min-height: 32px; padding: var(--iwb-space-4) var(--iwb-space-24) var(--iwb-space-4) var(--iwb-space-8); cursor: pointer; }
.iwb-gen-row { gap: var(--iwb-space-6); min-height: 36px; }
.iwb-size-preset-grid { display: grid; grid-template-columns: 110px repeat(3, minmax(108px, 1fr)); gap: var(--iwb-space-6); align-items: center; margin: var(--iwb-space-8) 0; }
.iwb-size-preset-head { color: var(--iwb-text2); font-size: var(--iwb-font-sm); font-weight: 700; }
.iwb-size-preset-name { font-size: var(--iwb-font-sm); font-weight: 700; }
.iwb-size-preset-grid .iwb-input { min-width: 0; min-height: 34px; }
.iwb-size-preset-grid-edit { grid-template-columns: minmax(120px, 1fr) repeat(3, minmax(108px, 1fr)) 38px; }
@@ -1359,14 +1359,14 @@ html { scrollbar-width: thin; scrollbar-color: var(--iwb-border2) color-mix(in s
.iwb-product-nav .iwb-product-item.active { background: color-mix(in srgb, var(--iwb-text) 12%, transparent); }
/* 任务级计时(等宽数字避免抖动) */
.iwb-task-timer { flex: 0 0 auto; font-size: 11px; font-weight: 700; color: var(--iwb-text2); white-space: nowrap; font-variant-numeric: tabular-nums; margin-right: 2px; }
.iwb-task-timer { flex: 0 0 auto; font-size: var(--iwb-font-xs); font-weight: 700; color: var(--iwb-text2); white-space: nowrap; font-variant-numeric: tabular-nums; margin-right: var(--iwb-space-2); }
.iwb-task-timer-run { color: var(--iwb-brand-text, var(--iwb-brand)); }
.iwb-task-timer-done { color: var(--iwb-text2); }
/* 运行中的任务(v3.24.42 重做):去掉左侧竖条与底部进度线,改为两层克制的动效——
* ① 一次性扫光(::before,1.05s 掠过):任务「刚开始」时的一道淡白光,只跑一次,不循环打扰;
* ② 持续呼吸描边(::after,2.6s):1px 内描边淡入淡出,让「还在跑」有存在感又不抢注意力。
* 两层都只动 transform / opacity(合成层),不重排、不重绘;1 张任务也能看出"活着"。 */
.iwb-task-running { background: var(--iwb-anim-tint); border-radius: 8px; }
.iwb-task-running { background: var(--iwb-anim-tint); border-radius: var(--iwb-radius-control); }
/* ① 扫光:窄条高光从左掠到右,skew 一点更像反光而不是进度条 */
.iwb-task-running::before {
content: ''; position: absolute; top: 0; bottom: 0; left: -34%; width: 34%;
@@ -1382,7 +1382,7 @@ html { scrollbar-width: thin; scrollbar-color: var(--iwb-border2) color-mix(in s
}
/* ② 呼吸描边:整行一圈细边随呼吸淡入淡出 */
.iwb-task-running::after {
content: ''; position: absolute; inset: 0; border-radius: 8px;
content: ''; position: absolute; inset: 0; border-radius: var(--iwb-radius-control);
pointer-events: none; z-index: 2;
box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--iwb-tint) 26%, transparent);
animation: iwb-task-breathe 2.6s ease-in-out infinite;
@@ -1414,9 +1414,9 @@ html { scrollbar-width: thin; scrollbar-color: var(--iwb-border2) color-mix(in s
@container (max-width: 120px) { .iwb-out-prog { padding: 3px 5px; gap: 4px; } .iwb-out-prog-count { font-size: 11px; } }
/* 任务条三态按钮的「等待」态:中性色 + 12px 小环(可点,但点击只弹确认 → 防误触) */
.iwb-task-btn-wait { color: var(--iwb-text2); background: var(--iwb-layer2); border-color: var(--iwb-border); }
.iwb-task-btn-wait:hover { color: var(--iwb-text); border-color: var(--iwb-brand); background: var(--iwb-layer2); }
.iwb-task-btn-ring { display: inline-block; width: 11px; height: 11px; margin-right: 4px; flex: 0 0 11px; border: 2px solid var(--iwb-anim-track); border-top-color: var(--iwb-anim); border-right-color: var(--iwb-anim); border-radius: 50%; animation: iwb-generation-spinner-spin 0.9s linear infinite; }
.iwb-task-btn-wait { color: var(--iwb-text2); background: color-mix(in srgb, var(--iwb-text) 8%, transparent); border-color: var(--iwb-border); }
.iwb-task-btn-wait:hover { color: var(--iwb-text); border-color: var(--iwb-brand); background: color-mix(in srgb, var(--iwb-text) 14%, transparent); }
.iwb-task-btn-ring { display: inline-block; width: 11px; height: 11px; margin-right: var(--iwb-space-4); flex: 0 0 11px; border: 2px solid var(--iwb-anim-track); border-top-color: var(--iwb-anim); border-right-color: var(--iwb-anim); border-radius: 50%; animation: iwb-generation-spinner-spin 0.9s linear infinite; }
@media (prefers-reduced-motion: reduce) { .iwb-task-btn-ring { animation: none; } }
/* 暗色主题专用:给旋转环与等待小环加一圈白光晕,让"正在跑"的信号更明确(亮色主题不加,保持零变化) */
@@ -1425,16 +1425,9 @@ html { scrollbar-width: thin; scrollbar-color: var(--iwb-border2) color-mix(in s
/* 暗色主题:描边用较弱的白(暗色主题的行底是中灰,纯亮白描边会偏刺眼) */
.theme-dark .iwb-task-running::after { box-shadow: inset 0 0 0 1px color-mix(in srgb, #ffffff 32%, transparent); }
/* ===== v3.86.4 gen 节点「尺寸」与「质量」两行 ===== */
.iwb-gen-sizerow, .iwb-gen-qualityrow { gap: 6px; flex-wrap: wrap; align-items: center; }
.iwb-gen-tag { flex: 0 0 auto; color: var(--iwb-text2); font-size: 12px; font-weight: 700; }
.iwb-size-num { flex: 0 0 auto; width: 60px; min-width: 0; min-height: 30px; padding: 4px 6px; text-align: center; font-size: 14px; font-variant-numeric: tabular-nums; -moz-appearance: textfield; appearance: textfield; }
/* ===== v3.86.4 尺寸自定义输入(尺寸/质量其余 UI 已并入图像设置浮层) ===== */
.iwb-size-num { flex: 0 0 auto; width: 60px; min-width: 0; min-height: 30px; padding: var(--iwb-space-4) var(--iwb-space-6); text-align: center; font-size: 14px; font-variant-numeric: tabular-nums; -moz-appearance: textfield; appearance: textfield; }
.iwb-size-num::-webkit-outer-spin-button, .iwb-size-num::-webkit-inner-spin-button { -webkit-appearance: none; appearance: none; margin: 0; }
.iwb-size-x { flex: 0 0 auto; margin: 0; }
.iwb-size-align { flex: 0 0 auto; white-space: nowrap; }
.iwb-size-align input { margin: 0; }
.iwb-size-badge { flex: 0 0 auto; margin: 0; padding: 1px 7px; border-radius: 999px; background: var(--iwb-layer); border: 1px solid var(--iwb-border); white-space: nowrap; }
.iwb-gen-qualityrow .iwb-chip { font-size: 12px; padding: 2px 10px; }
/* ===== v3.86.5 图像设置浮层(质量 / 尺寸 / 分辨率 / 宽高比网格) ===== */
.iwb-image-settings { width: 380px; max-width: calc(100vw - 32px); }
@@ -1471,7 +1464,7 @@ html { scrollbar-width: thin; scrollbar-color: var(--iwb-border2) color-mix(in s
/* 节点内图像设置汇总条(唯一入口,点击弹出面板) */
.iwb-gen-summary { align-self: flex-start; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-variant-numeric: tabular-nums; }
/* ===== v3.86.6 节点参数:一行排布 + 服务商/分组/模型 自绘气泡 + 字号统一 15px ===== */
.iwb-gen-settings .iwb-input { font-size: 15px; }
.iwb-gen-settings .iwb-input { font-size: var(--iwb-font-lg); }
/* 强制单行:不换行 + 允许收缩省略,保证「设置排成一行」 */
.iwb-gen-settings .iwb-gen-row { flex-wrap: nowrap; min-height: 40px; }
/* v3.24.24 参数行宽度分配:模型框吃满剩余宽度、图像设置框定宽 200px,两者 + gap 恰好铺满节点内容宽。
@@ -1488,22 +1481,22 @@ html { scrollbar-width: thin; scrollbar-color: var(--iwb-border2) color-mix(in s
.iwb-gen-settings .iwb-pick,
.iwb-gen-summary {
border: 1px solid var(--iwb-border);
border-radius: 10px;
border-radius: var(--iwb-radius-card);
background: var(--iwb-field);
min-height: 38px;
padding: 6px 26px 6px 12px;
font-size: 15px;
padding: var(--iwb-space-6) var(--iwb-space-24) var(--iwb-space-6) var(--iwb-space-12);
font-size: var(--iwb-font-lg);
}
/* 触发器(服务商 / 分组 / 模型):与汇总条同款胶囊,只是左侧内边距收窄、文本可省略 */
.iwb-gen-settings .iwb-pick {
display: inline-flex; align-items: center; justify-content: flex-start;
max-width: 100%; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
/* 与「尺寸」汇总条保持同一左右内边距(实测原来 12 vs 14 不统一) */
padding: 6px 14px; line-height: 1.2;
padding: var(--iwb-space-6) var(--iwb-space-12); line-height: 1.2;
}
.iwb-gen-settings .iwb-pick:hover { border-color: var(--iwb-brand); color: var(--iwb-brand-text, var(--iwb-brand)); }
.iwb-gen-settings .iwb-pick:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
.iwb-gen-summary { font-size: 15px; padding: 6px 14px; }
.iwb-gen-summary { font-size: var(--iwb-font-lg); padding: var(--iwb-space-6) var(--iwb-space-12); }
/* ===== v3.86.7 通用选择气泡(PickerBubble):与图像设置面板同一套 popover 外观 ===== */
/* v3.87.3:面板宽度按内容自适应(原来写死 240px,长模型名被硬切且连省略号都没有)。
@@ -1618,7 +1611,7 @@ html { scrollbar-width: thin; scrollbar-color: var(--iwb-border2) color-mix(in s
模型列表用「标签流式排列」:每个按内容宽度,排满一行自动折行(2026-10-31 用户指定样式);
超长名字靠 min-width: max-content 撑开 ⇒ 面板内横向滚动,仍不省略。
文字 nowrap + 不设 text-overflow ⇒ 永不省略(省略会导致无法识别具体模型)。 */
.iwb-gen-config { width: min(92vw, 320px); max-height: min(78vh, calc(100vh - 24px)); display: flex; flex-direction: column; gap: 10px; padding: 14px 18px; }
.iwb-gen-config { width: min(92vw, 320px); max-height: min(78vh, calc(100vh - 24px)); display: flex; flex-direction: column; gap: var(--iwb-space-10); padding: var(--iwb-space-12) var(--iwb-space-16); }
.iwb-gc-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.iwb-gc-field { display: flex; align-items: center; gap: 6px; min-width: 0; }
.iwb-gc-label { font-size: 12px; color: var(--iwb-text2); white-space: nowrap; }
@@ -1776,10 +1769,10 @@ html { scrollbar-width: thin; scrollbar-color: var(--iwb-border2) color-mix(in s
/* 模型触发器内部拆成「名字 + 箭头」两段(v3.24.24):按钮被拉宽后箭头必须贴右,
否则长空白会让它看着不像下拉框。名字段承担省略号,箭头固定不压缩。 */
.iwb-gen-settings .iwb-pick-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.iwb-gen-settings .iwb-pick-caret { flex: 0 0 auto; margin-left: auto; padding-left: 8px; opacity: 0.8; }
.iwb-gen-settings .iwb-pick-caret { flex: 0 0 auto; margin-left: auto; padding-left: var(--iwb-space-8); opacity: 0.8; }
/* 组合节点:分隔符下拉挪到「组合(N)」同一行右侧(2026-10-30) */
.iwb-gen-head .iwb-combine-sep { width: auto; min-width: 64px; max-width: 46%; flex: 0 1 auto; font-size: 12px; padding: 2px 22px 2px 6px; height: 26px;
.iwb-gen-head .iwb-combine-sep { width: auto; min-width: 64px; max-width: 46%; flex: 0 1 auto; font-size: var(--iwb-font-sm); padding: var(--iwb-space-2) var(--iwb-space-24) var(--iwb-space-2) var(--iwb-space-6); height: 26px;
/* 与配置节点下拉统一:去掉系统三角,改用同款 chevron(向下) */
appearance: none; -webkit-appearance: none;
background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'><path d='m6 9 6 6 6-6'/></svg>");
Binary file not shown.

Before

Width:  |  Height:  |  Size: 63 KiB

After

Width:  |  Height:  |  Size: 63 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 66 KiB

After

Width:  |  Height:  |  Size: 65 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 70 KiB

After

Width:  |  Height:  |  Size: 69 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 72 KiB

After

Width:  |  Height:  |  Size: 71 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 74 KiB

After

Width:  |  Height:  |  Size: 74 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 76 KiB

After

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 67 KiB

After

Width:  |  Height:  |  Size: 67 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 71 KiB

After

Width:  |  Height:  |  Size: 70 KiB

+97
View File
@@ -0,0 +1,97 @@
// B5 节点:三条不变量
//
// 这一批的病灶和 B3/B4 同源,但表现更狠:节点卡内部的控件沿用了「面板」的表面色
// (--iwb-layer / --iwb-layer2)。深色下这两个值是 #161616 / #1c1c1c,而节点卡是 #3d3d3d ——
// 端口就成了一颗嵌在卡片上的纯黑洞(差 39 级),任务卡里的等待按钮同理。
// 按 D10 的相对派生原则:**控件明暗由贴着的那张卡片决定**,节点卡内一律用 --iwb-field。
//
// 另一类:浮条底是 --iwb-panel,子项 hover 也用 --iwb-layer2,深色下两者都是 #1c1c1c,
// hover 完全没有反馈 —— 这类「改数字不生效」只能靠断言兜。
const assert = require('assert')
const fs = require('fs')
const path = require('path')
const root = path.join(__dirname, '..')
const css = fs.readFileSync(path.join(root, 'style.css'), 'utf8')
// 按 } 切块,取每块选择器的最后一行(多选择器组只影响可读性,不影响 body)
const blocks = []
for (const chunk of css.split('}')) {
const i = chunk.lastIndexOf('{')
if (i < 0) continue
const sel = chunk.slice(0, i).split('\n').filter((l) => l.trim()).pop() || ''
blocks.push({ sel: sel.trim(), body: chunk.slice(i + 1) })
}
const NODE_SCOPE = /^\.iwb-(node|gen|port|relay|conn|lod|ref|resize|task|size)/
const nodeBlocks = blocks.filter((b) => NODE_SCOPE.test(b.sel))
// ── 1. 节点卡内部不许用「面板表面色」 ──
// 浮条例外:它是浮层(底就是 --iwb-panel),不贴在卡片上。
const PANEL_SURFACE = /background(?:-color)?:\s*var\(--iwb-(?:layer|layer2|panel)\)/
const offenders = nodeBlocks
.filter((b) => !/floatbar/.test(b.sel))
.filter((b) => PANEL_SURFACE.test(b.body))
.map((b) => b.sel)
assert.deepStrictEqual(
offenders,
[],
'节点卡内部的控件必须用 --iwb-field(深色下 layer/layer2 #161616/#1c1c1c 打在节点卡 #3d3d3d 上等于黑洞)'
)
// 端口是本批的「样板」:它的底色必须是 field,三个态都不能退回 layer/panel
const port = blocks.find((b) => b.sel === '.iwb-port')
assert.ok(port, '找不到 .iwb-port 规则')
assert.ok(port.body.includes('background: var(--iwb-field)'), '.iwb-port 底色必须是 --iwb-field')
for (const sel of ['.iwb-node:hover .iwb-port', '.iwb-port:hover', '.iwb-node-selected .iwb-port:not(.iwb-port-linked)']) {
const b = blocks.find((x) => x.sel === sel)
assert.ok(b, '找不到规则:' + sel)
assert.ok(
!/var\(--iwb-(?:layer|layer2|panel)\)/.test(b.body),
sel + ' 不能用面板表面色 —— 端口贴在节点卡上,深色下会变成黑洞'
)
}
// ── 2. 节点区字号必须走档位,不写死 ──
// 例外:8px / 10px 是微缩徽标(序号角标、图片计数),闭集最低档 11px 会把它们撑出圆点;
// 14px 是尺寸自定义输入(属于图像设置浮层,不在节点卡内)。
const MICRO = new Set(['8px', '10px', '14px'])
const bareFont = []
for (const b of nodeBlocks) {
for (const m of b.body.matchAll(/font-size:\s*([\d.]+px)/g)) {
if (!MICRO.has(m[1])) bareFont.push(b.sel + ' → ' + m[1])
}
}
assert.deepStrictEqual(bareFont, [], '节点区字号必须用 --iwb-font-*,不写死 px(微缩徽标 8/10px 除外)')
// ── 3. 节点区间距与圆角同样走档位 ──
// 例外:端口热区 inset 是负数(扩大点击区,不是节奏值);圆角只允许 token 或 50%/2px(圆形与占位条)
const bareSpace = []
for (const b of nodeBlocks) {
for (const m of b.body.matchAll(/(?:padding|margin|gap)(?:-(?:top|right|bottom|left))?:\s*([^;}]+)/g)) {
if (/(^|[\s(])\d+px/.test(m[1])) bareSpace.push(b.sel + ' → ' + m[0].trim())
}
}
assert.deepStrictEqual(bareSpace, [], '节点区间距必须用 --iwb-space-*,不写死 px')
const bareRadius = []
for (const b of nodeBlocks) {
for (const m of b.body.matchAll(/border-radius:\s*([\d.]+px)/g)) {
if (m[1] !== '2px') bareRadius.push(b.sel + ' → ' + m[1])
}
}
assert.deepStrictEqual(bareRadius, [], '节点区圆角必须用 --iwb-radius-*,不写死 px(2px 占位条除外)')
// ── 4. 已删除的死规则不许回来 ──
// 判据:dist/app.js 与 plugins/** 里都是 0 次(尺寸/质量行已并入图像设置浮层)。
const DEAD = [
'.iwb-gen-sizerow', '.iwb-gen-qualityrow', '.iwb-gen-tag',
'.iwb-size-x', '.iwb-size-align', '.iwb-size-badge',
]
for (const cls of DEAD) {
const re = new RegExp('\\' + cls + '(?![-A-Za-z0-9_])')
assert.ok(!re.test(css), cls + ' 已确认无生产者(DOM 与插件都不再产出),不该重新出现')
}
console.log('node scope checks passed(端口用 field / ' + nodeBlocks.length + ' 条节点规则字号·间距·圆角全走档位 / ' + DEAD.length + ' 个死类名不复现)')