Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f4e4ca5649 | ||
|
|
35ac37fb45 | ||
|
|
2a1fa03132 | ||
|
|
78519b56d8 | ||
|
|
19c95ef6b1 | ||
|
|
bbb763c2cf | ||
|
|
611cd8f1b9 |
No files matched your search
@@ -14,6 +14,76 @@
|
||||
> 3. 核验正式地址版本 → 之后才移动 `stable` / `stable-verified-<日期>` 标签、更新本 CHANGELOG、写 GitHub Release(`gh release create`)。
|
||||
> 测试发现问题 → 改 → 再 `deploy:test`,正式环境不受影响。回滚点 `git reset --hard stable`。
|
||||
|
||||
## v3.25.89(2026-11-21)插件面板配色统一(四层语义)
|
||||
|
||||
### 调查
|
||||
- 停靠栏 `#E2E4E6` 与插件面板 `#FFFFFF` 对比度仅 1.27:1 → 插件把灰栏整块盖成白;插件内 fallback 还互相矛盾(#fff / #f5f6f8 / #2a2a2a)。
|
||||
|
||||
### 规范(docs/standards/plugin-theme.md)
|
||||
- 四层语义:`--iwb-plugin-surface`(面板浅灰)/ `-card`(卡片白)/ `-inset`(内嵌灰)/ `-hover`;全部由 4 个种子派生。
|
||||
- 作用域重映射:`.iwb-dock-body` 等容器内把 `--iwb-panel/--iwb-layer/--iwb-layer2/--iwb-hover` 重指到插件层 ⇒ **插件零改动**自动变淡。
|
||||
- 外观新增「插件面板 → 底色深浅」(0~30,默认 12)。
|
||||
|
||||
### 未做
|
||||
- 插件源码里写死的按钮色(浏览器/批量导出/风格库/位图转矢量)仍在白名单,需插件仓库改用 `--iwb-plugin-*`。
|
||||
|
||||
## v3.25.88(2026-11-21)浏览器面板切页/拖宽延迟(同一根因)
|
||||
|
||||
### 调查结论
|
||||
- 浏览器面板不是 iframe,而是宿主用 Tauri `add_child` 建的原生子 webview,盖在锚点上;位置由 `src/canvas-webview.js` 每 32ms(`TICK_MS`)通过 IPC 同步
|
||||
### 根因
|
||||
- 原生视图永远在主 webview 之上:切页/拖宽时 DOM 已变,但原生层要等下一帧 tick + 一次 IPC 才移动,看起来就是「慢一秒」
|
||||
- 拖宽时每个 `pointermove` 都 `setState` → 整棵停靠栏(含插件 DOM)重渲染 → 每帧一次 IPC + 原生 resize → 卡顿
|
||||
### 修复
|
||||
- 新增 `IWBCanvasWebview.parkAll()` / `setSuspended()`:切页时立刻把原生视图 park 出窗口(不销毁),拖宽期间暂停同步
|
||||
- `ui-dock` 拖宽改为「只改 DOM 宽度 + rAF 合并,松手才 setState」,并派发 `iwb:dock-resizing` 让宿主暂停原生视图
|
||||
- 覆盖层离开 `iwb-view-canvas` 时自动 parkAll(MutationObserver 监听 class)
|
||||
|
||||
## v3.25.87(2026-11-21)面板重启用补回 + 插件页停靠栏立即隐藏
|
||||
|
||||
### 修复
|
||||
- **重新启用插件后面板不回来(节点组/提示词库)**:上一版只在「该侧列表为空」时兜底;实际关插件只剔掉那一个 id,列表非空所以永远补不回。现在清洗时按**默认面板列表逐项补回**(`panels[id]` 存在且未手动移出),插件的 `removed` 记录继续生效。
|
||||
- **插件市场页还会闪出浏览器面板**:除条件渲染外,补 CSS `.iwb-view-plugins/.iwb-view-home/.iwb-view-landing .iwb-dockarea { display:none }` —— 直接不画,不等淡出动画。
|
||||
|
||||
## v3.25.86(2026-11-21)停靠栏作用域 / 插件重启用 / 保存按钮
|
||||
|
||||
### 修复
|
||||
- **浏览器插进插件页**:停靠栏改为只在 `shellView === 'canvas'` 时渲染(插件整页/首页不再带左右栏)。
|
||||
- **重新启用提词库/节点组后左栏不显示**:之前关插件时把面板列表清空了,重新启用只恢复面板对象、列表还是空的。现在列表为空时回落到默认面板列表(`props.defaults`)。
|
||||
|
||||
### 新增
|
||||
- 插件设置页增加「保存设置」按钮:调用 `PluginHost.persist()` 显式落盘并提示(`setSetting` 本身已即时保存,这里是用户要的明确出口)。
|
||||
|
||||
## v3.25.85(2026-11-21)P3 收尾 + P4 插件主题契约
|
||||
|
||||
### P3 收尾(表面色/语义色全部走 token)
|
||||
- `#b91c1c` → `var(--iwb-err)`;设置面板的紫色开关(`#6b5ce7`)→ `var(--iwb-brand)`;`#d9dbde`/`#d5d9e0` → `--iwb-canvas-bg`/`--iwb-border`。
|
||||
- 品牌/深色底上的白字统一 `var(--iwb-on-brand)`(自动配色按对比度选黑/白)。
|
||||
- `background: #fff/#ffffff` 批量收口到 `var(--iwb-panel)`。
|
||||
- style.css 硬编码 hex:165 → 117(剩余为 token 定义、暗色 ramp、节点自定义色卡、阴影/蒙版纯黑)。
|
||||
|
||||
### P4 插件主题契约
|
||||
- 新增别名 `--iwb-plugin-{bg,panel,layer,border,text,text2,brand,on-brand,err,ok,warn}`(`:root` 里全部指向 `--iwb-*`),插件跟随主题/自动配色只需用别名。
|
||||
- 新增 `tests/plugin-theme-contract-test.js`:扫描 `plugins/**`,样式里写死颜色即失败;5 个历史插件(浏览器/批量导出/风格库/位图转矢量/白底画布)以白名单 + 原因暂留,待插件源码仓库改造。
|
||||
|
||||
## v3.25.84(2026-11-21)取色板自动确认 + 停靠栏图标残留
|
||||
|
||||
### 调整
|
||||
- **取色板不再需要点「完成」**:在色板/色相条上松手后 120ms 自动收起并生效;点面板外部也会关闭;正在输入 hex/RGB 时不自动关。
|
||||
|
||||
### 修复
|
||||
- **插件关闭后停靠栏仍有图标残留**:头部图标列表改为只画「当前可用面板」(`panels[id]` 存在);同时新增状态清洗 —— 插件启停后自动剔除已不存在的 id,active 失效回退到第一个可用面板。
|
||||
|
||||
## v3.25.83(2026-11-21)P3 第一批:语义色收口到 token
|
||||
|
||||
### 改动
|
||||
- 语义色错误/成功/警告 收口:`#ef4444`/`#dc2626` → `var(--iwb-err)`;`#22c55e` → `var(--iwb-ok)`;`#d97706`/`#b45309` → `var(--iwb-warn)`;`#6b7280` → `var(--iwb-text2)`(共 30 处)。
|
||||
- 新增 `--iwb-on-brand`:自动配色按对比度选黑/白,替换品牌底上的写死 `#fff`。
|
||||
- theme-tokens 同步派生 err/ok/warn(暗色自动提亮一档)+ onBrand。
|
||||
|
||||
### 结果
|
||||
- style.css 硬编码 hex 165 → 132(剩余为 token 定义、暗色 ramp、节点自定义底色、阴影/蒙版用黑)。
|
||||
|
||||
## v3.25.82(2026-11-21)底栏/停靠栏与插件开关联动
|
||||
|
||||
### 调整
|
||||
|
||||
+1
-1
@@ -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 108 个单测文件(jsdom 契约测试;2026-11-07 新增 sync-facts-guard(事实一致性)/ _helpers/source(统一源文本);2026-11-12 新增 provider-ping(测速 no-cors 兜底))
|
||||
test:unit 109 个单测文件(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)
|
||||
|
||||
@@ -8538,7 +8538,7 @@ const tbCenterSeed = (type, refs) => {
|
||||
measuredT: tick,
|
||||
onJump: mmOnJump,
|
||||
}) : null,
|
||||
DockArea ? el(DockArea, { panels: dockPanels, renderIcon: I, storageKey: 'iwb.dock.v1', PluginHost,
|
||||
(shellView === 'canvas' && DockArea) ? el(DockArea, { panels: dockPanels, renderIcon: I, storageKey: 'iwb.dock.v1', PluginHost,
|
||||
pluginMount: (id) => { const p = wPluginPanels.find((x) => x.pluginId === id || x.id === id + '-panel'); return p ? p.mount : null },
|
||||
rightOpen: drawerOpen, onRightOpen: (v) => setDrawerOpen(v),
|
||||
defaults: { left: { open: true, w: 318, list: ['groups', 'browser', 'styles'], active: 'browser' }, right: { open: true, w: 330, list: ['prompts', 'gallery'], active: 'gallery' } },
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# 现状架构与性能事实基线(image-workbench-web)
|
||||
|
||||
> **本文档是什么**:现状**事实快照**,不是规范。用途:任何性能 / 内存 / 存储相关改动,先对齐这里的现实,避免把已经调好的东西改坏。
|
||||
> 日期 **2026-10-20**(**2026-11-16 复算 · v3.24.85**)| 基线(**最近一次 bump 版本的提交**,不是主干 HEAD)`main = 34269f9`(线上 `v3.25.82+34269f9` —— **未上线**(本地测试中):左右停靠栏配色对齐主色调(新增 `--iwb-dock-bg` 进灰阶 ramp + 头部深一档 + `.iwb-pcard` 补白底)+ 修 `Cargo.toml`/`Cargo.lock` 版本漂移,四处统一到 3.25.58)。上一条 3.25.30:线上实际运行提交是 docs 提交 `7df9dc4`,bump 提交为 `4be78c0`;2026-11-16 已发**测试站 + 正式站**,三地址一致 + `IWB_VERIFY_STRICT=1` 通过。v3.24.85 是「代码体检收口」(棘轮收回 Workbench 3090→2998 + 图库索引 4 条绕过锁的写路径收口到 `mutate` + 文档数字校准),`stable` / `stable-v3.24.85` / `stable-verified-2026-11-16` 均指向 `7df9dc4`。上一条 —— 2026-11-14 发**测试站 + 正式站** `https://test.image-workbench-web.pages.dev`:**v3.24.84 修「生图节点连了 3 条上游只出 1 个任务」**(任务 id 与去重基准改用新字段 `ownerNodeId`=本节点自己,不再用随继承冒泡的 `sourceNodeId` ⇒ 连几条线就几个任务;`relay` 仍归约到真实文本来源,同一来源多路径抵达只算一次)。上一条 v3.24.83:**修「插件节点冷启动退化成一段文本」**(插件节点体是异步注册的,`registerNodeType` 在 `render` 由无变有时自增 `NODE_TYPES_REV`,`NodeCard` 比它 ⇒ 注册那一刻重建一次;`canvas-normalize` 按命名规则把 `plugin:<id>:<variant>` 认作已知类型,不再降级成 `plugin` 并写回存档);配套插件 `style-source` 1.3.2 把节点体样式改为**脚本执行时注入**(此前只在面板 `mount()` 注入 ⇒ 从存档直接进画布时节点无样式、缩略图按原图铺满)。上一条 v3.24.82 同批:提示词/文本节点**显示上游继承文本**(自己 `data.text` 为空时把上游那段话显示在框里,改一个字即接管,另有「恢复跟随」清空回跟随;多路上游按 Y 轴取第一条)+ 修 `nodeRefsOf` 的 textout 分支只认 llm/batch/combine 上游导致「样式 → 文本 → 分层」丢参考图;再上一条 v3.24.81:① 插件节点可自定义节点体(`render(node, props, host)` 画真实 DOM,宿主不每帧重建 ⇒ 输入框不失焦);② 节点自带参考图(`data.refOn/refUrl` ⇒ 任务图里补伪参考图,坐标取节点自身 ⇒ 仍参与「图片按 X 轴排序」);③ 连线白名单按 `data.outKind === 'prompt'` 归一化,7 条规则一次放行,内置节点行为逐字不变。上一条 v3.24.80 = 离开页面的兜底保存不递增 rev(2026-11-14 07:20 补发 —— 首发 11-13 23:25 撞 Cloudflare Workers API 事故 `503 no healthy upstream`,期间正式站保持在 `v3.24.79+8598a57` 未动)。v3.24.83 的 bump 提交即 `0a27a42`(v3.24.82 为 `ef6cf42`、v3.24.81 为 `dba71e3`);主干 HEAD 会继续前进,见 [`RELEASES.md`](../RELEASES.md))| 历史分支 `refactor/architecture` / `feat/multi-canvas-tabs` / `refactor/state-store` 已于 2026-10-20 清理(内容均已并入 main,归档标签 `archive/*`),本文**计数类事实**已按 main HEAD 复算。
|
||||
> 日期 **2026-10-20**(**2026-11-16 复算 · v3.24.85**)| 基线(**最近一次 bump 版本的提交**,不是主干 HEAD)`main = 35ac37f`(线上 `v3.25.89+35ac37f` —— **未上线**(本地测试中):左右停靠栏配色对齐主色调(新增 `--iwb-dock-bg` 进灰阶 ramp + 头部深一档 + `.iwb-pcard` 补白底)+ 修 `Cargo.toml`/`Cargo.lock` 版本漂移,四处统一到 3.25.58)。上一条 3.25.30:线上实际运行提交是 docs 提交 `7df9dc4`,bump 提交为 `4be78c0`;2026-11-16 已发**测试站 + 正式站**,三地址一致 + `IWB_VERIFY_STRICT=1` 通过。v3.24.85 是「代码体检收口」(棘轮收回 Workbench 3090→2998 + 图库索引 4 条绕过锁的写路径收口到 `mutate` + 文档数字校准),`stable` / `stable-v3.24.85` / `stable-verified-2026-11-16` 均指向 `7df9dc4`。上一条 —— 2026-11-14 发**测试站 + 正式站** `https://test.image-workbench-web.pages.dev`:**v3.24.84 修「生图节点连了 3 条上游只出 1 个任务」**(任务 id 与去重基准改用新字段 `ownerNodeId`=本节点自己,不再用随继承冒泡的 `sourceNodeId` ⇒ 连几条线就几个任务;`relay` 仍归约到真实文本来源,同一来源多路径抵达只算一次)。上一条 v3.24.83:**修「插件节点冷启动退化成一段文本」**(插件节点体是异步注册的,`registerNodeType` 在 `render` 由无变有时自增 `NODE_TYPES_REV`,`NodeCard` 比它 ⇒ 注册那一刻重建一次;`canvas-normalize` 按命名规则把 `plugin:<id>:<variant>` 认作已知类型,不再降级成 `plugin` 并写回存档);配套插件 `style-source` 1.3.2 把节点体样式改为**脚本执行时注入**(此前只在面板 `mount()` 注入 ⇒ 从存档直接进画布时节点无样式、缩略图按原图铺满)。上一条 v3.24.82 同批:提示词/文本节点**显示上游继承文本**(自己 `data.text` 为空时把上游那段话显示在框里,改一个字即接管,另有「恢复跟随」清空回跟随;多路上游按 Y 轴取第一条)+ 修 `nodeRefsOf` 的 textout 分支只认 llm/batch/combine 上游导致「样式 → 文本 → 分层」丢参考图;再上一条 v3.24.81:① 插件节点可自定义节点体(`render(node, props, host)` 画真实 DOM,宿主不每帧重建 ⇒ 输入框不失焦);② 节点自带参考图(`data.refOn/refUrl` ⇒ 任务图里补伪参考图,坐标取节点自身 ⇒ 仍参与「图片按 X 轴排序」);③ 连线白名单按 `data.outKind === 'prompt'` 归一化,7 条规则一次放行,内置节点行为逐字不变。上一条 v3.24.80 = 离开页面的兜底保存不递增 rev(2026-11-14 07:20 补发 —— 首发 11-13 23:25 撞 Cloudflare Workers API 事故 `503 no healthy upstream`,期间正式站保持在 `v3.24.79+8598a57` 未动)。v3.24.83 的 bump 提交即 `0a27a42`(v3.24.82 为 `ef6cf42`、v3.24.81 为 `dba71e3`);主干 HEAD 会继续前进,见 [`RELEASES.md`](../RELEASES.md))| 历史分支 `refactor/architecture` / `feat/multi-canvas-tabs` / `refactor/state-store` 已于 2026-10-20 清理(内容均已并入 main,归档标签 `archive/*`),本文**计数类事实**已按 main HEAD 复算。
|
||||
<!-- 2026-10-28 P1 拆分批 1:新增 src/generation-task-graph.js(5 个任务图纯函数自 app.js 迁出)
|
||||
⇒ 模块数 60→61、耦合面 51→52、sourceModules 60→61。耦合面只**新增** IWBWTaskGraph,无删除。
|
||||
2026-10-28 P1 拆分批 2:新增 src/storage-config-shape.js(9 个配置形状纯函数自 app.js 迁出)
|
||||
@@ -278,3 +278,4 @@
|
||||
**鲜艺抠图插件(2026-10-17 起改为 A2 运行时插件,`dist` 不再内置)**:源码已迁出主仓到独立插件仓(`iwb-plugins`),经 Cloudflare Function `functions/plugins/[[path]].js` + KV(binding `PLUGINS`)**同源运行时加载**(同源 ⇒ CSP 零改动);主包**已不含** `src/plugin-xianyi-cutout.js`。功能:右键命令「抠图:选中节点」→ `POST {apiUrl}/rmbg?crop=`(`application/octet-stream` + 原始字节)→ 结果 PNG 写回为新的参考图节点(`<原名>_cutout.png`)。契约对齐 `iwb-plaus` v3.1.3 的 `background.js`(二进制进 / PNG 字节出;无 token、无 JSON),但**补齐了原版缺失的超时**(`AbortController` + 可配 `timeoutMs`)。设置项:`apiUrl` / `crop` / `timeoutMs`。尚未提供的能力面(若日后需要):插件只读「选中节点」与按 id 取节点图(`canvas` 目前只有 `getNodes` / `listNodeTypes`)。
|
||||
|
||||
**KV 信任锚与治理(2026-10-19 补充,规则见规则库 §13.35)**:A2 运行时插件的信任边界 = **谁能写 `PLUGINS` KV**。`/plugins/index.json`(清单)与插件字节**同源同 KV** ⇒ 客户端 `integrity`(SRI)只防缓存/部分损坏,**不防 KV 被攻陷**(能改 KV 者可同时改插件与清单)。治理要求:`PLUGINS` KV 写权限**仅限发布脚本(`scripts/plugins-publish.mjs`,默认 dry-run)与本人**,不交给 CI 或第三方;第三方插件经 `scripts/plugins-sync.sh` 合入前**必须人工审计**(脚本运行时打印显式提示)。
|
||||
- 插件配色契约:`docs/standards/plugin-theme.md`(v3.25.89 起)
|
||||
@@ -0,0 +1,53 @@
|
||||
# 插件主题契约(plugin-theme)
|
||||
|
||||
> 版本:v3.25.89 起。宿主与插件的**唯一**配色接口。
|
||||
> 目的:插件不再自己决定颜色,改一处(种子/滑块)全部插件跟着变。
|
||||
|
||||
## 1. 四层语义(插件面板必须分层)
|
||||
|
||||
| 语义 | Token | 亮色默认 | 用在哪 |
|
||||
|---|---|---|---|
|
||||
| 结构层 | `--iwb-dock-bg` | `#E2E4E6` | 停靠栏 / 标签条 / 状态栏(宿主自己的层) |
|
||||
| 插件面板 | `--iwb-plugin-surface` | `#FAFAFB` | 面板根容器(**不要用纯白**) |
|
||||
| 卡片 | `--iwb-plugin-card` | `#FFFFFF` | 面板里的卡片 / 列表项 |
|
||||
| 内嵌 | `--iwb-plugin-inset` | `#F6F7F8` | 输入框底 / 分组底 / 斑马纹 |
|
||||
| 悬停 | `--iwb-plugin-hover` | `#EEF1F4` | 行 / 卡片 hover |
|
||||
|
||||
## 2. 规则
|
||||
|
||||
1. **只用变量**:`--iwb-plugin-*` 或 `--iwb-*`,禁止写死 `#hex` / `rgba()`。
|
||||
(守门测试 `tests/plugin-theme-contract-test.js` 会卡)
|
||||
2. **面板根不画底色**:宿主已给 `--iwb-plugin-surface`;插件根容器只写 `background: var(--iwb-plugin-surface)`。
|
||||
3. **卡片才用 card**:列表项/卡片用 `--iwb-plugin-card`,这样「浅灰底 + 白卡片」的层次才成立。
|
||||
4. **文字层级**:主文字 `--iwb-plugin-text`,次要 `--iwb-plugin-text2`,品牌 `--iwb-plugin-brand`(底色上的字用 `--iwb-plugin-on-brand`,宿主按对比度自动黑/白)。
|
||||
5. **语义色**:错误 `--iwb-plugin-err`、成功 `--iwb-plugin-ok`、警告 `--iwb-plugin-warn`。
|
||||
|
||||
## 3. 作用域重映射(为什么插件不用改代码)
|
||||
|
||||
宿主在插件容器内把旧变量重指到插件层:
|
||||
|
||||
```css
|
||||
.iwb-dock-body, .iwb-node-body .iwb-plugin-body, .iwb-cwv-panel-body {
|
||||
--iwb-panel: var(--iwb-plugin-surface);
|
||||
--iwb-layer2: var(--iwb-plugin-card);
|
||||
--iwb-layer: var(--iwb-plugin-inset);
|
||||
--iwb-hover: var(--iwb-plugin-hover);
|
||||
}
|
||||
```
|
||||
|
||||
所以插件里已有的 `background: var(--iwb-layer2, #fff)` 会自动变成「卡片白」,
|
||||
`var(--iwb-layer, #f5f6f8)` 自动变成「内嵌灰」——**不需要重新打包插件**。
|
||||
|
||||
## 4. 批量调节
|
||||
|
||||
- 外观 → **插件面板 → 底色深浅**(0~30,默认 12)
|
||||
- 该值进入 `theme-tokens.js` 的 `pluginTint`,与 4 个种子一起派生
|
||||
- 改这一个滑块 = 所有插件面板同时变化
|
||||
|
||||
## 5. 新增插件时的自查
|
||||
|
||||
- [ ] 面板根:`background: var(--iwb-plugin-surface)`
|
||||
- [ ] 卡片:`background: var(--iwb-plugin-card)`
|
||||
- [ ] 输入框/内嵌块:`background: var(--iwb-plugin-inset)`
|
||||
- [ ] hover:`background: var(--iwb-plugin-hover)`
|
||||
- [ ] 没有任何 `#` 开头的颜色字面量(`var(--x, #hex)` 的兜底除外)
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "image-workbench-web",
|
||||
"private": true,
|
||||
"version": "3.25.82",
|
||||
"version": "3.25.89",
|
||||
"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/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/prompt-md-roundtrip-test.js && node tests/generation-results-store-test.js && node tests/out-groups-order-test.js && node tests/ui-workbench-hooks-test.js",
|
||||
"test:unit": "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/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",
|
||||
|
||||
@@ -54,13 +54,13 @@
|
||||
<h2>下载</h2>
|
||||
<div class="row">
|
||||
<div class="name">macOS · Apple Silicon<div class="hint">M1 / M2 / M3 / M4</div></div>
|
||||
<div class="meta">版本 3.25.82 · 8.4 MB · .dmg<div class="hash">sha256 c7424a1170039506…</div></div>
|
||||
<a class="btn" href="/updates/darwin-aarch64/image-workbench_3.25.82_aarch64.dmg?h=c7424a117003">下载</a>
|
||||
<div class="meta">版本 3.25.89 · 8.4 MB · .dmg<div class="hash">sha256 3662431943dcec8c…</div></div>
|
||||
<a class="btn" href="/updates/darwin-aarch64/image-workbench_3.25.89_aarch64.dmg?h=3662431943dc">下载</a>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="name">macOS · Intel<div class="hint">x86_64</div></div>
|
||||
<div class="meta">版本 3.25.82 · 8.8 MB · .dmg<div class="hash">sha256 7a8273b96ecb2bc8…</div></div>
|
||||
<a class="btn" href="/updates/darwin-x86_64/image-workbench_3.25.82_x64.dmg?h=7a8273b96ecb">下载</a>
|
||||
<div class="meta">版本 3.25.89 · 9.4 MB · .dmg<div class="hash">sha256 17f1825fb43776cd…</div></div>
|
||||
<a class="btn" href="/updates/darwin-x86_64/image-workbench_3.25.89_x64.dmg?h=17f1825fb437">下载</a>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="name">Windows · x64<div class="hint">需要 WebView2</div></div>
|
||||
@@ -94,6 +94,34 @@
|
||||
</ol>
|
||||
|
||||
<h2>历史版本</h2>
|
||||
<div class="row">
|
||||
<div class="name">3.25.89<div class="hint">Intel 版:同一批改动</div></div>
|
||||
<div class="meta">2026-11-21<div class="hint">macOS · Apple Silicon / macOS · Intel</div></div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="name">3.25.88<div class="hint">Intel 版:同一批修复</div></div>
|
||||
<div class="meta">2026-11-21<div class="hint">macOS · Apple Silicon / macOS · Intel</div></div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="name">3.25.87<div class="hint">Intel 版:同一批修复</div></div>
|
||||
<div class="meta">2026-11-21<div class="hint">macOS · Apple Silicon / macOS · Intel</div></div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="name">3.25.86<div class="hint">Intel 版:同一批修复</div></div>
|
||||
<div class="meta">2026-11-21<div class="hint">macOS · Apple Silicon / macOS · Intel</div></div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="name">3.25.85<div class="hint">Intel 版:同一批改动</div></div>
|
||||
<div class="meta">2026-11-21<div class="hint">macOS · Apple Silicon / macOS · Intel</div></div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="name">3.25.84<div class="hint">Intel 版:同一批修复</div></div>
|
||||
<div class="meta">2026-11-21<div class="hint">macOS · Apple Silicon / macOS · Intel</div></div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="name">3.25.83<div class="hint">Intel 版:同一改动</div></div>
|
||||
<div class="meta">2026-11-21<div class="hint">macOS · Apple Silicon / macOS · Intel</div></div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="name">3.25.82<div class="hint">Intel 版:同一批调整</div></div>
|
||||
<div class="meta">2026-11-21<div class="hint">macOS · Apple Silicon / macOS · Intel</div></div>
|
||||
|
||||
+7
-7
@@ -2,7 +2,7 @@
|
||||
<html lang="zh-CN"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<title>Image Workbench · 本地优先的 AI 生图工作台</title>
|
||||
<meta name="description" content="本地优先的 AI 生图无限画布:节点式工作流、插件按需安装、数据全部留在本机。">
|
||||
<link rel="stylesheet" href="/assets/style.css?v=3.25.82-mwpnv0e3">
|
||||
<link rel="stylesheet" href="/assets/style.css?v=3.25.89-mwptqc1c">
|
||||
</head><body>
|
||||
<nav><div class="wrap inner">
|
||||
<a class="brand" href="/"><span class="dot">IW</span>Image Workbench</a>
|
||||
@@ -14,19 +14,19 @@
|
||||
</div>
|
||||
<div class="right">
|
||||
<a class="btn" href="/plugins/">插件市场</a>
|
||||
<a class="btn primary" href="/download/">下载 v3.25.82</a>
|
||||
<a class="btn primary" href="/download/">下载 v3.25.89</a>
|
||||
</div>
|
||||
</div></nav>
|
||||
<main>
|
||||
<section class="hero hero-art">
|
||||
<div class="hero-bg"><img src="/assets/painting.jpg?v=3.25.82-mwpnv0e3" alt=""></div>
|
||||
<div class="hero-bg"><img src="/assets/painting.jpg?v=3.25.89-mwptqc1c" alt=""></div>
|
||||
<div class="hero-veil"></div>
|
||||
<div class="wrap">
|
||||
<span class="kicker">v3.25.82 · macOS / Windows · 数据在本地</span>
|
||||
<span class="kicker">v3.25.89 · macOS / Windows · 数据在本地</span>
|
||||
<h1>本地优先的<br>AI 生图无限画布</h1>
|
||||
<p class="sub">用节点把「参考图 → 提示词 → 批量生成 → 图库」串成一条生产线。<br>图片、提示词、模型配置全部留在你自己的电脑里,插件按需安装。</p>
|
||||
<div class="cta">
|
||||
<a class="btn primary lg" href="/download/">下载 v3.25.82</a>
|
||||
<a class="btn primary lg" href="/download/">下载 v3.25.89</a>
|
||||
<a class="btn lg" href="/plugins/">浏览 11 个插件</a>
|
||||
</div>
|
||||
<div class="meta">支持 macOS 12+ 与 Windows 10 1803+ · 安装包约 7 MB · 无需登录</div>
|
||||
@@ -93,8 +93,8 @@
|
||||
<section class="section"><div class="wrap">
|
||||
<h2>下载 Image Workbench</h2>
|
||||
<p class="lead">选你的平台。装过一次之后,以后在应用内「设置 → 通用 → 版本与更新」就能一键升级。</p>
|
||||
<div class="dl"><a href="/updates/darwin-aarch64/image-workbench_3.25.82_aarch64.dmg?h=c7424a117003"><div class="n">macOS · Apple Silicon</div><div class="s">M1 / M2 / M3 / M4 · 8.4 MB · .dmg</div></a>
|
||||
<a href="/updates/darwin-x86_64/image-workbench_3.25.82_x64.dmg?h=7a8273b96ecb"><div class="n">macOS · Intel</div><div class="s">x86_64 · 8.8 MB · .dmg</div></a>
|
||||
<div class="dl"><a href="/updates/darwin-aarch64/image-workbench_3.25.89_aarch64.dmg?h=3662431943dc"><div class="n">macOS · Apple Silicon</div><div class="s">M1 / M2 / M3 / M4 · 8.4 MB · .dmg</div></a>
|
||||
<a href="/updates/darwin-x86_64/image-workbench_3.25.89_x64.dmg?h=17f1825fb437"><div class="n">macOS · Intel</div><div class="s">x86_64 · 9.4 MB · .dmg</div></a>
|
||||
<div class="none"><div class="n">Windows · x64</div><div class="s">暂未提供</div></div></div>
|
||||
<div style="margin-top:20px;color:#9ca3af;font-size:12.5px">安装包未做 Apple 公证 / Windows 代码签名,首次打开需手动放行一次,细节见 <a href="/download/" style="text-decoration:underline">下载页</a>。</div>
|
||||
</div></section>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<!doctype html>
|
||||
<html lang="zh-CN"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<title>插件市场 · Image Workbench</title>
|
||||
<link rel="stylesheet" href="/assets/style.css?v=3.25.82-mwpnv0e3">
|
||||
<link rel="stylesheet" href="/assets/style.css?v=3.25.89-mwptqc1c">
|
||||
</head><body>
|
||||
<nav><div class="wrap inner">
|
||||
<a class="brand" href="/"><span class="dot">IW</span>Image Workbench</a>
|
||||
@@ -13,7 +13,7 @@
|
||||
</div>
|
||||
<div class="right">
|
||||
<a class="btn" href="/plugins/">插件市场</a>
|
||||
<a class="btn primary" href="/download/">下载 v3.25.82</a>
|
||||
<a class="btn primary" href="/download/">下载 v3.25.89</a>
|
||||
</div>
|
||||
</div></nav>
|
||||
<main>
|
||||
|
||||
+148
-1
@@ -1,8 +1,155 @@
|
||||
{
|
||||
"app": "Image Workbench",
|
||||
"subtitle": "本地优先的 AI 生图无限画布 · 桌面版(Tauri v2)",
|
||||
"updatedAt": "2026-11-21T00:19:37.185Z",
|
||||
"updatedAt": "2026-11-21T03:03:56.705Z",
|
||||
"releases": [
|
||||
{
|
||||
"version": "3.25.89",
|
||||
"date": "2026-11-21",
|
||||
"notes": "Intel 版:同一批改动",
|
||||
"platforms": {
|
||||
"darwin-aarch64": {
|
||||
"file": "updates/darwin-aarch64/image-workbench_3.25.89_aarch64.dmg",
|
||||
"size": 8781313,
|
||||
"sha256": "3662431943dcec8cfd3f28ab6f58c78abe1e0980f8bcf4b36cb19b2b0cf6bf47",
|
||||
"h": "3662431943dc",
|
||||
"kind": "dmg"
|
||||
},
|
||||
"darwin-x86_64": {
|
||||
"file": "updates/darwin-x86_64/image-workbench_3.25.89_x64.dmg",
|
||||
"size": 9893340,
|
||||
"sha256": "17f1825fb43776cd7513a6cdb03baf358dd76a2d17e93048583c0217f3f6bcd0",
|
||||
"h": "17f1825fb437",
|
||||
"kind": "dmg"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"version": "3.25.88",
|
||||
"date": "2026-11-21",
|
||||
"notes": "Intel 版:同一批修复",
|
||||
"platforms": {
|
||||
"darwin-aarch64": {
|
||||
"file": "updates/darwin-aarch64/image-workbench_3.25.88_aarch64.dmg",
|
||||
"size": 8778772,
|
||||
"sha256": "3149a9382f9a77574b0eea2f6739bc545256a1b10f9086d2ed57a9a4aee8a9c2",
|
||||
"h": "3149a9382f9a",
|
||||
"kind": "dmg"
|
||||
},
|
||||
"darwin-x86_64": {
|
||||
"file": "updates/darwin-x86_64/image-workbench_3.25.88_x64.dmg",
|
||||
"size": 9178982,
|
||||
"sha256": "74bf411d718b4cde870437d5be88e618b0f431c0f665caf681736697baf320d5",
|
||||
"h": "74bf411d718b",
|
||||
"kind": "dmg"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"version": "3.25.87",
|
||||
"date": "2026-11-21",
|
||||
"notes": "Intel 版:同一批修复",
|
||||
"platforms": {
|
||||
"darwin-aarch64": {
|
||||
"file": "updates/darwin-aarch64/image-workbench_3.25.87_aarch64.dmg",
|
||||
"size": 8779143,
|
||||
"sha256": "39ccffa011021d0a17ebc91a70906b09bbf12494fd011bafbf43d0860cd32418",
|
||||
"h": "39ccffa01102",
|
||||
"kind": "dmg"
|
||||
},
|
||||
"darwin-x86_64": {
|
||||
"file": "updates/darwin-x86_64/image-workbench_3.25.87_x64.dmg",
|
||||
"size": 9178067,
|
||||
"sha256": "aeac43c291221167e38662fb62e21aee83ba04a00dafca57297d70a7d8c89e94",
|
||||
"h": "aeac43c29122",
|
||||
"kind": "dmg"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"version": "3.25.86",
|
||||
"date": "2026-11-21",
|
||||
"notes": "Intel 版:同一批修复",
|
||||
"platforms": {
|
||||
"darwin-aarch64": {
|
||||
"file": "updates/darwin-aarch64/image-workbench_3.25.86_aarch64.dmg",
|
||||
"size": 8779162,
|
||||
"sha256": "7676260f74c6215d39fd9fff693c011dc9a7c1d5639f51ead99dc32caf0d4be4",
|
||||
"h": "7676260f74c6",
|
||||
"kind": "dmg"
|
||||
},
|
||||
"darwin-x86_64": {
|
||||
"file": "updates/darwin-x86_64/image-workbench_3.25.86_x64.dmg",
|
||||
"size": 9181203,
|
||||
"sha256": "dd71e38b3893962167faa06641ff12621141c3241a717bd9f4b2415df3976e7d",
|
||||
"h": "dd71e38b3893",
|
||||
"kind": "dmg"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"version": "3.25.85",
|
||||
"date": "2026-11-21",
|
||||
"notes": "Intel 版:同一批改动",
|
||||
"platforms": {
|
||||
"darwin-aarch64": {
|
||||
"file": "updates/darwin-aarch64/image-workbench_3.25.85_aarch64.dmg",
|
||||
"size": 8777718,
|
||||
"sha256": "bb22e3d5e08b4d817a81ff5c282a0b3355dd6e7dc2e6f7adb1c467b1df38e599",
|
||||
"h": "bb22e3d5e08b",
|
||||
"kind": "dmg"
|
||||
},
|
||||
"darwin-x86_64": {
|
||||
"file": "updates/darwin-x86_64/image-workbench_3.25.85_x64.dmg",
|
||||
"size": 9177291,
|
||||
"sha256": "51fc2ca757a7637cf1380279c4a72b02b634562e7d968feff0e9a526deeb36b5",
|
||||
"h": "51fc2ca757a7",
|
||||
"kind": "dmg"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"version": "3.25.84",
|
||||
"date": "2026-11-21",
|
||||
"notes": "Intel 版:同一批修复",
|
||||
"platforms": {
|
||||
"darwin-aarch64": {
|
||||
"file": "updates/darwin-aarch64/image-workbench_3.25.84_aarch64.dmg",
|
||||
"size": 8777183,
|
||||
"sha256": "de10987c03ab0dc821397fee2aaf5a36848e5010bb5691bd6c884768ccdf4e30",
|
||||
"h": "de10987c03ab",
|
||||
"kind": "dmg"
|
||||
},
|
||||
"darwin-x86_64": {
|
||||
"file": "updates/darwin-x86_64/image-workbench_3.25.84_x64.dmg",
|
||||
"size": 9182579,
|
||||
"sha256": "1177a9c43816f422b32923efb355337f86ec11d751155f6b18a92a36ee58adcd",
|
||||
"h": "1177a9c43816",
|
||||
"kind": "dmg"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"version": "3.25.83",
|
||||
"date": "2026-11-21",
|
||||
"notes": "Intel 版:同一改动",
|
||||
"platforms": {
|
||||
"darwin-aarch64": {
|
||||
"file": "updates/darwin-aarch64/image-workbench_3.25.83_aarch64.dmg",
|
||||
"size": 8778610,
|
||||
"sha256": "5b11d2d6a9d1814b82011bedfb44edb5d10d096dac6a68095f61709f2c48eb53",
|
||||
"h": "5b11d2d6a9d1",
|
||||
"kind": "dmg"
|
||||
},
|
||||
"darwin-x86_64": {
|
||||
"file": "updates/darwin-x86_64/image-workbench_3.25.83_x64.dmg",
|
||||
"size": 9180517,
|
||||
"sha256": "71fd4ece02baceff0be2052bd1fb049d6d65042a9ba12a55d7ff28ee40ec8f79",
|
||||
"h": "71fd4ece02ba",
|
||||
"kind": "dmg"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"version": "3.25.82",
|
||||
"date": "2026-11-21",
|
||||
|
||||
Generated
+1
-1
@@ -1983,7 +1983,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "image-workbench"
|
||||
version = "3.25.82"
|
||||
version = "3.25.89"
|
||||
dependencies = [
|
||||
"arboard",
|
||||
"base64 0.22.1",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "image-workbench"
|
||||
version = "3.25.82"
|
||||
version = "3.25.89"
|
||||
description = "无限画布 · 生图工作台桌面版"
|
||||
authors = ["malongan"]
|
||||
license = ""
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"$schema": "../node_modules/@tauri-apps/cli/config.schema.json",
|
||||
"productName": "image-workbench",
|
||||
"version": "3.25.82",
|
||||
"version": "3.25.89",
|
||||
"identifier": "com.malongan.imageworkbench",
|
||||
"build": {
|
||||
"frontendDist": "../dist",
|
||||
|
||||
@@ -102,6 +102,8 @@
|
||||
}
|
||||
|
||||
var anchors = new Map()
|
||||
var suspended = false // v3.25.88:切页/拖宽时暂停同步,避免原生层盖着旧页 1 秒
|
||||
var suspendTimer = null
|
||||
var pendingClose = new Map()
|
||||
var rafId = 0
|
||||
var lastTick = 0
|
||||
@@ -519,6 +521,7 @@
|
||||
function tick(ts) {
|
||||
rafId = global.requestAnimationFrame(tick)
|
||||
if (!anchors.size) return
|
||||
if (suspended) return
|
||||
if (ts - lastTick < TICK_MS) return
|
||||
lastTick = ts
|
||||
// 偏移还没算出来就不建视图:宁可晚两帧,也不要先闪一下错位
|
||||
@@ -711,6 +714,25 @@
|
||||
}
|
||||
}
|
||||
|
||||
// 立刻把当前可见的原生 webview 全部 park 出窗口(不做 close:close 要销毁 WKWebView,更慢)
|
||||
function parkAll () {
|
||||
anchors.forEach(function (st) {
|
||||
if (!st.open || st.shown === false) return
|
||||
var x = isFinite(st.px) ? st.px : 0
|
||||
var y = isFinite(st.py) ? st.py : 0
|
||||
var w = isFinite(st.pw) ? st.pw : MIN_EDGE
|
||||
var h = isFinite(st.ph) ? st.ph : MIN_EDGE
|
||||
push(st, x, y, w, h, false, null)
|
||||
})
|
||||
}
|
||||
|
||||
// 暂停/恢复:暂停期间 park 一次并跳过后续 push;恢复后下一帧自动按锚点矩形重新显示
|
||||
function setSuspended (on) {
|
||||
suspended = !!on
|
||||
if (suspended) parkAll()
|
||||
if (suspendTimer) { try { clearTimeout(suspendTimer) } catch (e) { /* ignore */ } suspendTimer = null }
|
||||
}
|
||||
|
||||
function install() {
|
||||
if (started) return
|
||||
started = true
|
||||
@@ -733,6 +755,18 @@
|
||||
mo.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: [ATTR] })
|
||||
}
|
||||
global.addEventListener('resize', function () { refreshOffsets() })
|
||||
// v3.25.88:拖停靠栏宽度时暂停原生视图同步(否则每帧 IPC + 原生 resize → 卡顿)
|
||||
global.addEventListener('iwb:dock-resizing', function (e) {
|
||||
setSuspended(!!(e && (/** @type {any} */ (e)).detail && (/** @type {any} */ (e)).detail.active))
|
||||
})
|
||||
// 离开画布(插件整页/首页)时立刻 park:原生层盖在 DOM 之上,不 park 会看到旧页面停留 1 秒
|
||||
if (global.MutationObserver) {
|
||||
var viewMo = new MutationObserver(function () {
|
||||
var ov = document.querySelector('.iwb-overlay')
|
||||
if (ov && !ov.classList.contains('iwb-view-canvas')) parkAll()
|
||||
})
|
||||
viewMo.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['class'] })
|
||||
}
|
||||
rafId = global.requestAnimationFrame(tick)
|
||||
global.addEventListener('beforeunload', function () {
|
||||
if (rafId) global.cancelAnimationFrame(rafId)
|
||||
@@ -751,6 +785,8 @@
|
||||
return { anchors: anchors.size, open: open, shown: shown, offset: { x: off.x, y: off.y }, scale: canvasScale() }
|
||||
},
|
||||
closeAll: function () { return call('canvas_webview_close_all', {}) },
|
||||
parkAll: parkAll,
|
||||
setSuspended: setSuspended,
|
||||
}
|
||||
|
||||
// 自启动:invoke 从 __TAURI__ 取,画布与锚点都从 DOM 查,不需要宿主注入依赖
|
||||
|
||||
+4
-1
@@ -300,6 +300,9 @@
|
||||
return { ok: true, id }
|
||||
}
|
||||
|
||||
// v3.25.86:显式保存(设置页「保存设置」按钮用)——setSetting 已即时写盘,这里再兜一次
|
||||
function persist () { try { writeState(); return true } catch (e) { return false } }
|
||||
|
||||
function on(handler) {
|
||||
if (typeof handler !== 'function') return function () {}
|
||||
return subscribe(handler)
|
||||
@@ -320,7 +323,7 @@
|
||||
return { apiVersion: API_VERSION, registered: plugins.size, active, errors, listeners: listeners.length, initialized: Boolean(deps) }
|
||||
}
|
||||
|
||||
return { apiVersion: API_VERSION, capabilities: CAPABILITIES.slice(), register, list, init, setEnabled, isEnabled, activate, deactivate, disposeAll, setSetting, on, emit, snapshot }
|
||||
return { apiVersion: API_VERSION, capabilities: CAPABILITIES.slice(), register, list, init, setEnabled, isEnabled, activate, deactivate, disposeAll, setSetting, persist, on, emit, snapshot }
|
||||
}
|
||||
|
||||
global.IWBPluginHostFactory = createPluginHost
|
||||
|
||||
+29
-2
@@ -58,10 +58,12 @@
|
||||
return out
|
||||
}
|
||||
|
||||
const DEFAULTS = { seedNeutral: '#808080', seedAccent: '#6b7280', depth: 22 }
|
||||
const DEFAULTS = { seedNeutral: '#808080', seedAccent: '#6b7280', depth: 22, pluginTint: 12 }
|
||||
|
||||
function derive (cfg, dark) {
|
||||
const c = cfg || {}
|
||||
const tintRaw = Number(c.pluginTint)
|
||||
const pluginTint = Math.max(0, Math.min(30, Number.isFinite(tintRaw) ? tintRaw : DEFAULTS.pluginTint))
|
||||
const N = normHex(c.seedNeutral) || DEFAULTS.seedNeutral
|
||||
const A = normHex(c.seedAccent) || DEFAULTS.seedAccent
|
||||
const depth = Math.max(0, Math.min(60, Number(c.depth) === undefined ? DEFAULTS.depth : Number(c.depth)))
|
||||
@@ -87,7 +89,24 @@
|
||||
const edgeHot = d ? mix(A, '#ffffff', 0.25) : A
|
||||
const gridDot = mix(N, t, d ? 0.36 : 0.30)
|
||||
|
||||
// 插件面板四层(v3.25.89):面板浅灰 / 卡片白 / 内嵌更灰 / 悬停最灰
|
||||
const dockBg = mix(surface3, canvas, 0.45)
|
||||
const pTint = pluginTint / 100
|
||||
const pluginSurface = mix(surface1, dockBg, pTint)
|
||||
const pluginCard = d ? mix(surface1, '#ffffff', 0.07) : '#ffffff'
|
||||
const pluginInset = mix(surface1, dockBg, Math.min(0.7, pTint + 0.10))
|
||||
const pluginHover = mix(pluginSurface, border2, d ? 0.28 : 0.16)
|
||||
|
||||
// 语义色:色相固定,明度随主题调整(暗色提亮一档,避免发闷)
|
||||
const err = d ? mix('#ef4444', '#ffffff', 0.18) : '#ef4444'
|
||||
const ok = d ? mix('#22c55e', '#ffffff', 0.18) : '#22c55e'
|
||||
const warn = d ? mix('#d97706', '#ffffff', 0.22) : '#d97706'
|
||||
// 品牌色上的文字:按对比度自动选黑/白
|
||||
const onBrand = contrast('#ffffff', brand) >= 4.5 ? '#ffffff' : '#1c2333'
|
||||
|
||||
return {
|
||||
err, ok, warn, onBrand,
|
||||
pluginSurface, pluginCard, pluginInset, pluginHover,
|
||||
bg: surface0,
|
||||
panel: surface1,
|
||||
layer,
|
||||
@@ -96,7 +115,7 @@
|
||||
canvasBg: canvas,
|
||||
chrome: mix(surface0, canvas, 0.4),
|
||||
homeBg: mix(surface0, canvas, 0.35),
|
||||
dockBg: mix(surface3, canvas, 0.45),
|
||||
dockBg,
|
||||
dockHeadBg: mix(mix(surface3, canvas, 0.45), '#000000', 0.06),
|
||||
border,
|
||||
border2,
|
||||
@@ -131,6 +150,14 @@
|
||||
s('--iwb-edge', tokens.edge)
|
||||
s('--iwb-edge-hot', tokens.edgeHot)
|
||||
s('--iwb-grid-dot', tokens.gridDot)
|
||||
s('--iwb-err', tokens.err)
|
||||
s('--iwb-ok', tokens.ok)
|
||||
s('--iwb-warn', tokens.warn)
|
||||
s('--iwb-on-brand', tokens.onBrand)
|
||||
s('--iwb-plugin-surface', tokens.pluginSurface)
|
||||
s('--iwb-plugin-card', tokens.pluginCard)
|
||||
s('--iwb-plugin-inset', tokens.pluginInset)
|
||||
s('--iwb-plugin-hover', tokens.pluginHover)
|
||||
}
|
||||
|
||||
global.IWBThemeTokens = { DEFAULTS, derive, applyTo, mix, contrast, clampText }
|
||||
|
||||
+33
-6
@@ -16,7 +16,7 @@
|
||||
canvasBgLight: '#d9dbde', canvasBgDark: '#6f6f6f',
|
||||
gridDotLight: '#c9ccd6', gridDotDark: '#8f8f8f', gridSize: 1.4, gridGap: 22, gridOn: true, gridStyle: 'dots',
|
||||
// v3.25.81:自动配色(默认开)——只定 4 个种子,其余由 src/theme-tokens.js 派生
|
||||
auto: true, seedNeutral: '#808080', seedAccent: '#6b7280', depth: 22,
|
||||
auto: true, seedNeutral: '#808080', seedAccent: '#6b7280', depth: 22, pluginTint: 12,
|
||||
edgeColorLight: '#b9bfca', edgeColorDark: '#7a7a7a',
|
||||
edgeWidth: 1.8, edgeDash: 'dashed',
|
||||
edgeHotLight: '#6b7280', edgeHotDark: '#ffffff',
|
||||
@@ -64,6 +64,7 @@
|
||||
seedNeutral: normHex(c.seedNeutral) || DEFAULTS.seedNeutral,
|
||||
seedAccent: normHex(c.seedAccent) || DEFAULTS.seedAccent,
|
||||
depth: clamp(c.depth, 0, 60, DEFAULTS.depth),
|
||||
pluginTint: clamp(c.pluginTint, 0, 30, DEFAULTS.pluginTint),
|
||||
nodeBgLight: hex('nodeBgLight'), nodeBgDark: hex('nodeBgDark'),
|
||||
nodeBorderLight: hex('nodeBorderLight'), nodeBorderDark: hex('nodeBorderDark'),
|
||||
nodeRadius: clamp(c.nodeRadius, 6, 20, DEFAULTS.nodeRadius),
|
||||
@@ -152,6 +153,7 @@
|
||||
const [open, setOpen] = React.useState(false)
|
||||
const [hsv, setHsv] = React.useState(() => { const c = hexToRgb(value); return rgbToHsv(c.r, c.g, c.b) })
|
||||
const boxRef = React.useRef(null)
|
||||
const popRef = React.useRef(null)
|
||||
|
||||
React.useEffect(() => {
|
||||
const c = hexToRgb(value)
|
||||
@@ -179,6 +181,27 @@
|
||||
onChange(rgbToHex(c.r, c.g, c.b))
|
||||
}
|
||||
const hueColor = 'hsl(' + Math.round(hsv.h) + ',100%,50%)'
|
||||
// v3.25.84:拖完自动确认 —— 松手 120ms 后自动收起取色板(不需要点「完成」);
|
||||
// 正在输入 hex/RGB 时不自动收(输入过程中松手会误关)。
|
||||
const closeTimer = React.useRef(null)
|
||||
const armAutoClose = () => {
|
||||
try { if (closeTimer.current) clearTimeout(closeTimer.current) } catch (e) { /* ignore */ }
|
||||
closeTimer.current = setTimeout(() => { setOpen(false) }, 120)
|
||||
}
|
||||
const cancelAutoClose = () => { try { if (closeTimer.current) clearTimeout(closeTimer.current) } catch (e) { /* ignore */ } }
|
||||
React.useEffect(() => {
|
||||
if (!open) return undefined
|
||||
const onDocDown = (e) => {
|
||||
try {
|
||||
const host = popRef.current
|
||||
if (host && host.contains(e.target)) return
|
||||
setOpen(false)
|
||||
} catch (err) { /* ignore */ }
|
||||
}
|
||||
document.addEventListener('pointerdown', onDocDown, true)
|
||||
return () => document.removeEventListener('pointerdown', onDocDown, true)
|
||||
}, [open])
|
||||
React.useEffect(() => () => cancelAutoClose(), [])
|
||||
|
||||
return el('div', { className: 'iwb-cpick' },
|
||||
el('button', {
|
||||
@@ -186,19 +209,20 @@
|
||||
onClick: () => setOpen((v) => !v),
|
||||
style: { background: value, color: readableOn(value) },
|
||||
}, el('span', { className: 'iwb-cpick-hex' }, value.toUpperCase())),
|
||||
open ? el('div', { className: 'iwb-cpick-pop', onPointerDown: (e) => e.stopPropagation() },
|
||||
open ? el('div', { className: 'iwb-cpick-pop', ref: popRef, onPointerDown: (e) => e.stopPropagation(), onKeyDown: cancelAutoClose },
|
||||
el('div', {
|
||||
className: 'iwb-cpick-box', ref: boxRef,
|
||||
onPointerDown: (e) => { e.currentTarget.setPointerCapture && e.currentTarget.setPointerCapture(e.pointerId); pick(e) },
|
||||
onPointerDown: (e) => { cancelAutoClose(); e.currentTarget.setPointerCapture && e.currentTarget.setPointerCapture(e.pointerId); pick(e) },
|
||||
onPointerMove: (e) => { if (e.buttons === 1) pick(e) },
|
||||
onPointerUp: () => armAutoClose(),
|
||||
style: { background: 'linear-gradient(to top, #000, rgba(0,0,0,0)), linear-gradient(to right, #fff, ' + hueColor + ')' },
|
||||
}, el('div', { className: 'iwb-cpick-dot', style: { left: (hsv.s * 100) + '%', top: ((1 - hsv.v) * 100) + '%', background: value } })),
|
||||
el('input', { type: 'range', min: 0, max: 360, value: Math.round(hsv.h), onChange: hue, className: 'iwb-cpick-hue', style: { background: 'linear-gradient(to right,#f00,#ff0,#0f0,#0ff,#00f,#f0f,#f00)' } }),
|
||||
el('input', { type: 'range', min: 0, max: 360, value: Math.round(hsv.h), onChange: (e) => { hue(e); armAutoClose() }, onPointerDown: cancelAutoClose, className: 'iwb-cpick-hue', style: { background: 'linear-gradient(to right,#f00,#ff0,#0f0,#0ff,#00f,#f0f,#f00)' } }),
|
||||
el('div', { className: 'iwb-cpick-rgb' }, ['r', 'g', 'b'].map((k) => el('label', { key: k, className: 'iwb-cpick-chan' },
|
||||
el('input', { type: 'number', min: 0, max: 255, value: rgb[k], onChange: setChannel(k) }),
|
||||
el('span', null, k.toUpperCase())))),
|
||||
el('div', { className: 'iwb-cpick-foot' },
|
||||
el('input', { className: 'iwb-input iwb-cpick-input', value: value, onChange: (e) => { const v = normHex(e.target.value); if (v) onChange(v) }, title: '支持 #rgb / #rrggbb' }),
|
||||
el('input', { className: 'iwb-input iwb-cpick-input', value: value, onFocus: cancelAutoClose, onChange: (e) => { cancelAutoClose(); const v = normHex(e.target.value); if (v) onChange(v) }, title: '支持 #rgb / #rrggbb' }),
|
||||
g.EyeDropper ? el('button', { type: 'button', className: 'iwb-btn iwb-btn-sm', title: '从屏幕取色', onClick: () => { try { new g.EyeDropper().open().then((r) => { const v = normHex(r && r.sRGBHex); if (v) onChange(v) }).catch(() => {}) } catch (e) { /* ignore */ } } }, '吸管') : null,
|
||||
el('button', { type: 'button', className: 'iwb-btn iwb-btn-sm', onClick: () => setOpen(false) }, '完成')),
|
||||
) : null,
|
||||
@@ -375,8 +399,11 @@
|
||||
Row('强调色', el(ColorPicker, { value: value.seedAccent, onChange: (v) => set({ seedAccent: v, auto: true }) }), '按钮 / 端口 / 选中框'),
|
||||
], ['auto', 'seedNeutral', 'seedAccent', 'depth'])
|
||||
|
||||
const pluginGroup = Group('插件面板', [
|
||||
Row('底色深浅', el('input', { type: 'range', min: 0, max: 30, step: 1, value: value.pluginTint, className: 'iwb-appear-range', onChange: (e) => set({ pluginTint: Number(e.target.value) }) }), String(value.pluginTint)),
|
||||
], ['pluginTint'])
|
||||
return el('div', { className: 'iwb-appear' },
|
||||
autoGroup, themeGroup, value.auto ? el('div', { className: 'iwb-appear-note-only' }, '自动配色已开启;关闭后可逐项微调(画布 / 连线 / 节点)。') : canvasGroup, value.auto ? null : edgeGroup, value.auto ? null : nodeGroup,
|
||||
autoGroup, themeGroup, pluginGroup, value.auto ? el('div', { className: 'iwb-appear-note-only' }, '自动配色已开启;关闭后可逐项微调(画布 / 连线 / 节点)。') : canvasGroup, value.auto ? null : edgeGroup, value.auto ? null : nodeGroup,
|
||||
el('div', { className: 'iwb-row', style: { marginTop: 12 } },
|
||||
el('button', { className: 'iwb-btn iwb-btn-sm', onClick: () => set(Object.assign({}, DEFAULTS, { presets: value.presets })) }, '全部恢复默认')))
|
||||
}
|
||||
|
||||
+47
-2
@@ -33,11 +33,13 @@
|
||||
function normalizeSide (side, def) {
|
||||
const s = side && typeof side === 'object' ? side : {}
|
||||
const list = Array.isArray(s.list) && s.list.length ? s.list.map(String) : def.list.slice()
|
||||
const removedIds = Array.isArray(s.removed) ? s.removed.map(String) : []
|
||||
const active = list.indexOf(String(s.active || '')) >= 0 ? String(s.active) : (list.indexOf(def.active) >= 0 ? def.active : list[0])
|
||||
return {
|
||||
open: s.open === undefined ? def.open !== false : !!s.open,
|
||||
w: Math.max(MIN_W, Number(s.w) || def.w || 300),
|
||||
list,
|
||||
removed: removedIds,
|
||||
active,
|
||||
}
|
||||
}
|
||||
@@ -139,6 +141,34 @@
|
||||
return function () { clearTimeout(t) }
|
||||
}, [dock])
|
||||
|
||||
// v3.25.84:插件启停后面板集合会变 —— 清掉已不存在的 id,active 失效时回退到第一个可用面板
|
||||
useEffect(function () {
|
||||
setDock(function (d) {
|
||||
let changed = false
|
||||
const next = Object.assign({}, d)
|
||||
for (const side of ['left', 'right']) {
|
||||
const s0 = d[side]
|
||||
// v3.25.87:插件关闭时会从 list 里剔除;重新启用后要把默认面板补回来。
|
||||
// 只有「用户手动拖出栏」的(记在 removed 里)不补,尊重手动排序/移除。
|
||||
const removed = Array.isArray(s0.removed) ? s0.removed : []
|
||||
const defList = (props.defaults && props.defaults[side] && props.defaults[side].list) || []
|
||||
let list = (s0.list || []).filter(function (id) { return !!panels[id] })
|
||||
for (const id of defList) {
|
||||
if (!panels[id]) continue
|
||||
if (removed.indexOf(id) >= 0) continue
|
||||
if (list.indexOf(id) >= 0) continue
|
||||
list = list.concat([id])
|
||||
}
|
||||
const active = panels[s0.active] ? s0.active : (list[0] || '')
|
||||
if (list.length !== (s0.list || []).length || active !== s0.active) {
|
||||
next[side] = Object.assign({}, s0, { list: list, active: active })
|
||||
changed = true
|
||||
}
|
||||
}
|
||||
return changed ? next : d
|
||||
})
|
||||
}, [panels])
|
||||
|
||||
// 把两侧实际占位宽度写给 CSS(画布不动,只让其它浮层让位)
|
||||
useEffect(function () {
|
||||
const r = global.document && global.document.documentElement
|
||||
@@ -196,14 +226,28 @@
|
||||
e.stopPropagation()
|
||||
const startX = e.clientX
|
||||
const startW = dock[side].w
|
||||
// v3.25.88: 拖动过程只改 DOM 宽度(不走 React setState),松手才提交
|
||||
const dockEl = (rootRef.current && rootRef.current.querySelector) ? rootRef.current.querySelector('.iwb-dock[data-side="' + side + '"]') : null
|
||||
let pendingW = startW
|
||||
let raf = 0
|
||||
const flush = function () {
|
||||
raf = 0
|
||||
if (dockEl) { try { dockEl.style.width = pendingW + 'px' } catch (err) { /* ignore */ } }
|
||||
}
|
||||
const move = function (ev) {
|
||||
const dx = ev.clientX - startX
|
||||
const w = side === 'left' ? startW + dx : startW - dx
|
||||
setSide(side, { w: Math.max(MIN_W, Math.round(w)) })
|
||||
pendingW = Math.max(MIN_W, Math.round(w))
|
||||
if (!raf) raf = global.requestAnimationFrame(flush)
|
||||
}
|
||||
// v3.25.88:拖宽期间通知宿主暂停原生 webview 同步(消除卡顿)
|
||||
try { global.dispatchEvent(new CustomEvent('iwb:dock-resizing', { detail: { active: true, side: side } })) } catch (err) { /* ignore */ }
|
||||
const up = function () {
|
||||
global.removeEventListener('pointermove', move)
|
||||
global.removeEventListener('pointerup', up)
|
||||
try { global.dispatchEvent(new CustomEvent('iwb:dock-resizing', { detail: { active: false, side: side } })) } catch (err) { /* ignore */ }
|
||||
if (raf) { try { global.cancelAnimationFrame(raf) } catch (err) { /* ignore */ } raf = 0 }
|
||||
setSide(side, { w: pendingW })
|
||||
}
|
||||
global.addEventListener('pointermove', move)
|
||||
global.addEventListener('pointerup', up)
|
||||
@@ -294,7 +338,8 @@
|
||||
const renderHead = function (side) {
|
||||
const s = dock[side]
|
||||
const isLeft = side === 'left'
|
||||
const icons = s.list.map(function (id) {
|
||||
// v3.25.84:只画「当前可用」的面板(插件关掉后不再残留图标)
|
||||
const icons = s.list.filter(function (id) { return !!panels[id] }).map(function (id) {
|
||||
const p = panels[id]
|
||||
return el('button', {
|
||||
key: id,
|
||||
|
||||
@@ -758,6 +758,10 @@
|
||||
),
|
||||
el('div', { className: 'iwb-hint' }, activePlugin.id + ' · v' + activePlugin.version),
|
||||
),
|
||||
el('button', { className: 'iwb-btn iwb-btn-sm', onClick: function () {
|
||||
try { if (PluginHost && typeof PluginHost.persist === 'function') PluginHost.persist() } catch (e) { /* ignore */ }
|
||||
if (setMsg) setMsg('已保存插件设置')
|
||||
} }, '保存设置'),
|
||||
el('button', { className: 'iwb-btn iwb-btn-sm', onClick: function () { setTab('plugins') } }, '返回'),
|
||||
),
|
||||
activePlugin.error ? el('div', { className: 'iwb-status-err' }, activePlugin.error) : null,
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* 亮色配色:节点背景灰、内容区(输入框/标题栏/参数区)白,保证文字清晰阅读 */
|
||||
:root {
|
||||
--iwb-bg: #f4f5f7;
|
||||
--iwb-canvas-bg: #d9dbde;
|
||||
--iwb-canvas-bg: var(--iwb-canvas-bg);
|
||||
/* 顶部 chrome 色:页面底与画布之间的过渡层(标签条用)。
|
||||
比 --iwb-bg 深一号、比画布浅 → 顶部亮带贴画布的对比减弱(v3.1.0 顶栏配色);
|
||||
调深浅改下面 60/40 两个百分比即可(越往画布色靠,对比越弱) */
|
||||
@@ -26,9 +26,27 @@
|
||||
--iwb-layer: #f0f1f4;
|
||||
--iwb-layer2: #ffffff;
|
||||
--iwb-node-bg: #f1f3f6;
|
||||
--iwb-border: #d5d9e0;
|
||||
--iwb-border: var(--iwb-border);
|
||||
--iwb-border2: #b9bfca;
|
||||
--iwb-brand: #6b7280; /* v3.1.0 全灰阶:原品牌蓝 → 同亮度中性灰(白字对比仍 ≥4.5:1) */
|
||||
--iwb-brand: var(--iwb-text2); /* v3.1.0 全灰阶:原品牌蓝 → 同亮度中性灰(白字对比仍 ≥4.5:1) */
|
||||
--iwb-on-brand: #ffffff; /* v3.25.83:自动配色会按对比度改写为黑/白 */
|
||||
/* v3.25.85 插件主题契约:插件只能用这组别名(宿主负责让它们跟随主题/自动配色) */
|
||||
--iwb-plugin-bg: var(--iwb-bg);
|
||||
--iwb-plugin-panel: var(--iwb-panel);
|
||||
--iwb-plugin-layer: var(--iwb-layer);
|
||||
--iwb-plugin-border: var(--iwb-border);
|
||||
--iwb-plugin-text: var(--iwb-text);
|
||||
--iwb-plugin-text2: var(--iwb-text2);
|
||||
/* 插件面板四层(v3.25.89):面板浅灰 / 卡片白 / 内嵌 / 悬停。自动配色会覆盖 */
|
||||
--iwb-plugin-surface: #fafafb;
|
||||
--iwb-plugin-card: #ffffff;
|
||||
--iwb-plugin-inset: #f6f7f8;
|
||||
--iwb-plugin-hover: #eef1f4;
|
||||
--iwb-plugin-brand: var(--iwb-brand);
|
||||
--iwb-plugin-on-brand: var(--iwb-on-brand);
|
||||
--iwb-plugin-err: var(--iwb-err);
|
||||
--iwb-plugin-ok: var(--iwb-ok);
|
||||
--iwb-plugin-warn: var(--iwb-warn);
|
||||
/* 连线默认色:跟随边框灰(亮/暗自适应)。主题色只用于选中/悬停/上下游高亮(v3.25.18 用户裁定) */
|
||||
--iwb-edge: var(--iwb-border2);
|
||||
/* 外观自定义(v3.25.22):以下变量都由 src/ui-appearance.js 按配置写入,这里只给兜底默认值 */
|
||||
@@ -47,7 +65,7 @@
|
||||
--iwb-text2: #4d5668;
|
||||
--iwb-err: #e5484d;
|
||||
--iwb-ok: #2f9e5f;
|
||||
--iwb-warn: #d97706;
|
||||
--iwb-warn: var(--iwb-warn);
|
||||
/* —— 设计 token(v3.1.0-stability2 起):间距 / 圆角 / 字号 / 阴影 / 过渡 —— */
|
||||
--sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 24px;
|
||||
--rd-sm: 6px; --rd: 8px; --rd-md: 10px; --rd-lg: 12px;
|
||||
@@ -152,7 +170,7 @@ button { font-family: inherit; }
|
||||
/* 选中时顶部浮动气泡操作条(复刻 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: #fff; 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: 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-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; }
|
||||
@@ -237,7 +255,7 @@ button { font-family: inherit; }
|
||||
.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-idx { flex: 0 0 18px; height: 18px; border-radius: 50%; background: var(--iwb-brand); color: #fff; font-size: 10px; display: flex; align-items: center; justify-content: center; }
|
||||
.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-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); }
|
||||
@@ -431,7 +449,7 @@ button { font-family: inherit; }
|
||||
.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 .iwb-refmini-warn { display: inline-flex; }
|
||||
.iwb-refmini .iwb-refmini-idx { position: absolute; left: -3px; top: -3px; background: var(--iwb-brand); color: #fff; 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: 6px; display: flex; align-items: center; justify-content: center; padding: 0 2px; z-index: 2; }
|
||||
|
||||
/* ---- v2 P2:图片传输设置 + 出图清理 ---- */
|
||||
.iwb-section { border-top: 1px solid var(--iwb-border); margin-top: 16px; padding-top: 12px; }
|
||||
@@ -484,7 +502,7 @@ button { font-family: inherit; }
|
||||
/* 操作栏:高度固定 40px(与 app.js 的 GROUP_BAR_H 同步);整条栏(含图标周围留白)都是整组拖拽热区。
|
||||
v3.24.25 改白底黑字(原 --iwb-brand 深灰底白字在浅色画布上一块深色很跳);
|
||||
v3.24.26 整体再放大一档(36→40 / 组名 14→16)+ 描边提到 --iwb-border2:
|
||||
原来 1px --iwb-border(#d5d9e0) 与画布底色(#d9dbde)几乎同色,白药丸等于没有边。 */
|
||||
原来 1px --iwb-border(var(--iwb-border)) 与画布底色(var(--iwb-canvas-bg))几乎同色,白药丸等于没有边。 */
|
||||
.iwb-group-bar { position: absolute; top: -10px; left: 10px; display: flex; align-items: center; gap: 8px; height: 40px; box-sizing: border-box; background: var(--iwb-panel); color: var(--iwb-text); border: 1px solid var(--iwb-border2); border-radius: 11px; padding: 0 14px; box-shadow: 0 2px 10px rgba(0,0,0,0.12); pointer-events: auto; cursor: move; z-index: 5; }
|
||||
/* 组名:图标 18px + 名称 16px/600 + 节点数 14px 灰(主次分明,原来全塞在一串 12px 加粗里) */
|
||||
.iwb-group-name { display: inline-flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 600; color: var(--iwb-text); white-space: nowrap; user-select: none; }
|
||||
@@ -554,7 +572,7 @@ button { font-family: inherit; }
|
||||
/* ---- v3:toast 提示 ---- */
|
||||
.iwb-toast { position: fixed; left: 50%; top: 56px; transform: translateX(-50%); z-index: 200; background: var(--iwb-panel); border: 1px solid var(--iwb-border2); border-radius: 10px; padding: 10px 18px; box-shadow: 0 8px 30px rgba(0,0,0,0.3); font-size: 13px; font-weight: 600; animation: iwb-fadein 0.18s ease; }
|
||||
.iwb-toast-ok { border-left: 3px solid var(--iwb-brand); }
|
||||
.iwb-toast-err { border-left: 3px solid #ef4444; }
|
||||
.iwb-toast-err { border-left: 3px solid var(--iwb-err); }
|
||||
@keyframes iwb-fadein { from { opacity: 0; transform: translate(-50%, -6px); } to { opacity: 1; transform: translate(-50%, 0); } }
|
||||
|
||||
/* ---- v3:左侧多工作台 ---- */
|
||||
@@ -730,8 +748,8 @@ html { scrollbar-width: thin; scrollbar-color: var(--iwb-border2) color-mix(in s
|
||||
.iwb-btn:active { transform: translateY(1px); }
|
||||
.iwb-btn:focus-visible { outline: 2px solid color-mix(in srgb, var(--iwb-brand) 60%, transparent); outline-offset: 1px; }
|
||||
.iwb-btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
|
||||
.iwb-btn-primary { background: var(--iwb-brand); border-color: var(--iwb-brand); color: #fff; }
|
||||
.iwb-btn-primary:hover { background: color-mix(in srgb, var(--iwb-brand) 85%, #000); border-color: var(--iwb-brand); color: #fff; }
|
||||
.iwb-btn-primary { background: var(--iwb-brand); border-color: var(--iwb-brand); color: var(--iwb-on-brand); }
|
||||
.iwb-btn-primary:hover { background: color-mix(in srgb, var(--iwb-brand) 85%, #000); border-color: var(--iwb-brand); color: var(--iwb-on-brand); }
|
||||
/* 常驻选中态(画布工具组的「当前工具」):底栏按钮本身是「无边框 + 透明底」,所以这里用淡填充药丸表示
|
||||
「当前工具」,与 :hover 的瞬时反馈区分开。!important 是必须的——上面 .iwb-btn 的 background/border 就是 !important。 */
|
||||
.iwb-toolbar-bottom .iwb-btn-on { background: color-mix(in srgb, var(--iwb-text) 12%, transparent) !important; border-radius: 8px; color: var(--iwb-text) !important; opacity: 1 !important; }
|
||||
@@ -798,9 +816,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: #22c55e !important; box-shadow: 0 0 0 2px rgba(34,197,94,0.45), 0 6px 20px rgba(0,0,0,0.25) !important; }
|
||||
.iwb-node.iwb-conn-bad { border-color: #ef4444 !important; box-shadow: 0 0 0 2px rgba(239,68,68,0.55), 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: #b91c1c; 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), 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-command-mask { position: fixed; inset: 0; z-index: 120; 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: 12px; box-shadow: 0 18px 60px rgba(0,0,0,.32); 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); }
|
||||
@@ -813,22 +831,22 @@ html { scrollbar-width: thin; scrollbar-color: var(--iwb-border2) color-mix(in s
|
||||
.iwb-command-item .iwb-ic { width: 16px; height: 16px; flex: 0 0 auto; }
|
||||
.iwb-command-empty { padding: 22px 12px; text-align: center; color: var(--iwb-text2); font-size: 12px; }
|
||||
.iwb-command-foot { padding: 8px 14px; border-top: 1px solid var(--iwb-border); color: var(--iwb-text2); font-size: 11px; }
|
||||
.iwb-edge-temp.iwb-edge-ok { stroke: #22c55e !important; }
|
||||
.iwb-edge-temp.iwb-edge-bad { stroke: #ef4444 !important; }
|
||||
.iwb-edge-temp.iwb-edge-ok { stroke: var(--iwb-ok) !important; }
|
||||
.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: #ef4444; background: color-mix(in srgb, #ef4444 8%, transparent); border: 1px solid color-mix(in srgb, #ef4444 35%, transparent); border-radius: 5px; cursor: pointer; padding: 4px 6px; }
|
||||
.iwb-task-err-toggle:hover { background: color-mix(in srgb, #ef4444 14%, transparent); }
|
||||
.iwb-task-err { margin-top: 6px; border: 1px solid color-mix(in srgb, #ef4444 40%, transparent); border-radius: 6px; background: color-mix(in srgb, #ef4444 6%, transparent); padding: 6px 8px; }
|
||||
.iwb-task-errline { font-size: 11px; color: #ef4444; word-break: break-all; line-height: 1.6; padding: 1px 0; }
|
||||
.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: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-err-conn { color: #ef4444; }
|
||||
.iwb-err-quota { color: #d97706; }
|
||||
.iwb-err-conn { color: var(--iwb-err); }
|
||||
.iwb-err-quota { color: var(--iwb-warn); }
|
||||
.iwb-err-auth { color: var(--iwb-err); } /* 鉴权失败=错误语义,紫改红 */
|
||||
.iwb-err-srv { color: #dc2626; }
|
||||
.iwb-err-other { color: #6b7280; }
|
||||
.iwb-err-unknown { color: #b45309; font-weight: 600; }
|
||||
.iwb-err-cancelled { color: #6b7280; font-weight: 600; }
|
||||
.iwb-err-srv { color: var(--iwb-err); }
|
||||
.iwb-err-other { color: var(--iwb-text2); }
|
||||
.iwb-err-unknown { color: var(--iwb-warn); font-weight: 600; }
|
||||
.iwb-err-cancelled { color: var(--iwb-text2); font-weight: 600; }
|
||||
|
||||
/* ---- 窄屏适配(轻量) ---- */
|
||||
@media (max-width: 860px) {
|
||||
@@ -861,9 +879,9 @@ html { scrollbar-width: thin; scrollbar-color: var(--iwb-border2) color-mix(in s
|
||||
.iwb-ctx-item:hover:not(:disabled) { background: color-mix(in srgb, var(--iwb-brand) 12%, transparent); color: var(--iwb-text); }
|
||||
.iwb-ctx-item:hover:not(:disabled) .iwb-ic { color: var(--iwb-brand); }
|
||||
.iwb-ctx-item:disabled { opacity: 0.38; cursor: default; }
|
||||
.iwb-ctx-item.iwb-ctx-danger { color: #ef4444; }
|
||||
.iwb-ctx-item.iwb-ctx-danger .iwb-ic { color: #ef4444; }
|
||||
.iwb-ctx-item.iwb-ctx-danger:hover:not(:disabled) { background: color-mix(in srgb, #ef4444 10%, transparent); color: #ef4444; }
|
||||
.iwb-ctx-item.iwb-ctx-danger { color: var(--iwb-err); }
|
||||
.iwb-ctx-item.iwb-ctx-danger .iwb-ic { color: var(--iwb-err); }
|
||||
.iwb-ctx-item.iwb-ctx-danger:hover:not(:disabled) { background: color-mix(in srgb, var(--iwb-err) 10%, transparent); color: var(--iwb-err); }
|
||||
.iwb-ctx-sep { height: 1px; margin: 4px 6px; background: var(--iwb-border); flex: 0 0 auto; }
|
||||
/* ---- 二级菜单(2026-11-19 用户要求:一级太长了)----
|
||||
* 「选中操作」「该节点」两组收进子菜单,一级只留入口。纯 CSS 展开(:hover + :focus-within),
|
||||
@@ -947,7 +965,7 @@ html { scrollbar-width: thin; scrollbar-color: var(--iwb-border2) color-mix(in s
|
||||
.iwb-task-result-meta { font-size: 10px; color: var(--iwb-text2); text-align: center; margin-top: 2px; }
|
||||
.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: #fff; }
|
||||
.iwb-task-result-dl .iwb-ic { width: 16px; height: 16px; color: var(--iwb-on-brand); }
|
||||
|
||||
/* 文案组合节点 */
|
||||
.iwb-combine-srcs { display: flex; flex-direction: column; gap: 3px; margin: 6px 0; }
|
||||
@@ -967,8 +985,8 @@ 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: #fff; }
|
||||
.iwb-node .iwb-btn-primary:hover { background: color-mix(in srgb, var(--iwb-text) 86%, #fff); border-color: var(--iwb-text); color: #fff; }
|
||||
.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-text) 86%, var(--iwb-panel)); border-color: var(--iwb-text); color: var(--iwb-on-brand); }
|
||||
.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; }
|
||||
@@ -980,7 +998,7 @@ html { scrollbar-width: thin; scrollbar-color: var(--iwb-border2) color-mix(in s
|
||||
.iwb-out-cell-actions { position: absolute; left: 0; right: 0; bottom: 0; height: 22px; display: flex; align-items: center; justify-content: center; gap: 10px; opacity: 0; transition: opacity 0.15s; border-radius: 0 0 8px 8px; background: rgba(0,0,0,0.45); }
|
||||
.iwb-out-cell:hover .iwb-out-cell-actions { opacity: 1; }
|
||||
.iwb-out-cell-actions .iwb-btn { width: 18px; height: 18px; padding: 0; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: rgba(255,255,255,0.9); color: #333; border: none; cursor: pointer; }
|
||||
.iwb-out-cell-actions .iwb-btn:hover { background: #fff; color: var(--iwb-brand); }
|
||||
.iwb-out-cell-actions .iwb-btn:hover { background: var(--iwb-panel); color: var(--iwb-brand); }
|
||||
.iwb-out-cell-actions .iwb-ic { width: 11px; height: 11px; }
|
||||
|
||||
/* 输出节点:原比例自适应流式(组内横向排列,随节点宽度自动换行) */
|
||||
@@ -1023,7 +1041,7 @@ html { scrollbar-width: thin; scrollbar-color: var(--iwb-border2) color-mix(in s
|
||||
top: 50%; bottom: auto; transform: translate(-50%, -50%);
|
||||
width: min(460px, calc(100vw - 48px)); padding: 18px 22px; text-align: left;
|
||||
}
|
||||
.iwb-resume-warning { font-size: var(--fs-12, 12px); line-height: 1.6; color: var(--iwb-err, #dc2626); }
|
||||
.iwb-resume-warning { font-size: var(--fs-12, 12px); line-height: 1.6; color: var(--iwb-err, var(--iwb-err)); }
|
||||
.iwb-resume-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 6px; }
|
||||
/* 版本更新提示(v3.24.42):原来和「保存失败」等低频异常挤在底部 34px 处,存在感弱到错过。
|
||||
现在贴在编辑器顶栏(标签条 36 + 顶栏 56)正下方居中 —— 一进画布就在视线内,又完全不挡画布内容。
|
||||
@@ -1040,19 +1058,19 @@ html { scrollbar-width: thin; scrollbar-color: var(--iwb-border2) color-mix(in s
|
||||
@media (prefers-reduced-motion: reduce) { .iwb-update-bar { animation: none; } }
|
||||
|
||||
/* 待润色标记(文本节点为空但有 LLM 上游) */
|
||||
.iwb-task-pending { color: #b45309; font-weight: 600; }
|
||||
.iwb-task-pending { color: var(--iwb-warn); font-weight: 600; }
|
||||
|
||||
/* 生图/LLM 服务设置:模型列表 + 行内删除操作 */
|
||||
.iwb-modelrow { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 4px 8px; border: 1px solid var(--iwb-border); border-radius: 8px; margin-bottom: 4px; background: var(--iwb-layer); }
|
||||
.iwb-modelrow-main { display: flex; align-items: center; gap: 4px; min-width: 0; flex: 1 1 auto; }
|
||||
.iwb-modelrow-main span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
||||
.iwb-modelrow .iwb-btn-danger { color: #b91c1c; opacity: 0; pointer-events: none; transition: opacity .15s ease; }
|
||||
.iwb-modelrow .iwb-btn-danger { color: var(--iwb-err); opacity: 0; pointer-events: none; transition: opacity .15s ease; }
|
||||
.iwb-modelrow:hover .iwb-btn-danger, .iwb-modelrow:focus-within .iwb-btn-danger { opacity: 1; pointer-events: auto; }
|
||||
.iwb-modelrow-main { cursor: default; }
|
||||
.iwb-modelrow-main span { cursor: default; }
|
||||
.iwb-modelrow-active { border-color: var(--iwb-border2); background: color-mix(in srgb, var(--iwb-text) 6%, transparent); }
|
||||
.iwb-modelrow-name { flex: 1 1 auto; cursor: pointer; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
||||
.iwb-input-err { border-color: #ef4444 !important; box-shadow: 0 0 0 1px rgba(239,68,68,0.35); }
|
||||
.iwb-input-err { border-color: var(--iwb-err) !important; box-shadow: 0 0 0 1px rgba(239,68,68,0.35); }
|
||||
|
||||
/* LLM 多渠道设置卡片 */
|
||||
.iwb-llm-card { border: 1px solid var(--iwb-border); border-radius: 10px; padding: 10px; margin-bottom: 10px; background: var(--iwb-layer); }
|
||||
@@ -1263,7 +1281,7 @@ html { scrollbar-width: thin; scrollbar-color: var(--iwb-border2) color-mix(in s
|
||||
.iwb-canvas-meta { display: flex; align-items: center; gap: 8px; overflow: hidden; }
|
||||
.iwb-canvas-meta .iwb-status-item { font-size: 11px; color: var(--iwb-text2); white-space: nowrap; }
|
||||
.iwb-canvas-meta .iwb-status-ok { color: var(--iwb-brand); }
|
||||
.iwb-canvas-meta .iwb-status-err { color: #dc2626; }
|
||||
.iwb-canvas-meta .iwb-status-err { color: var(--iwb-err); }
|
||||
.iwb-canvas-topbar .iwb-top-nav-icon { width: 30px; height: 30px; }
|
||||
/* S12:顶部标签条(浏览器式多画布标签)——UX_SPEC §4 单框扁平 token(容器透明、active 品牌色扁平高亮、只用 CSS 变量) */
|
||||
.iwb-tabstrip { position: absolute; left: 0; right: 0; top: 0; height: 36px; z-index: 36; display: flex; align-items: center; gap: 8px; padding: 0 14px; background: var(--iwb-chrome); box-sizing: border-box; border-bottom: 1px solid var(--iwb-border); overflow-x: auto; scrollbar-width: none; pointer-events: none; }
|
||||
@@ -1612,7 +1630,7 @@ html { scrollbar-width: thin; scrollbar-color: var(--iwb-border2) color-mix(in s
|
||||
.iwb-set-num { flex: 0 0 auto; width: 74px; min-width: 0; text-align: center; font-variant-numeric: tabular-nums; -moz-appearance: textfield; appearance: textfield; }
|
||||
.iwb-set-num::-webkit-outer-spin-button, .iwb-set-num::-webkit-inner-spin-button { -webkit-appearance: none; appearance: none; margin: 0; }
|
||||
.iwb-sethint { margin: 0; padding: 1px 7px; border-radius: 999px; background: var(--iwb-layer); border: 1px solid var(--iwb-border); white-space: nowrap; }
|
||||
.iwb-seterr { margin: 0; padding: 1px 7px; border-radius: 999px; color: #b91c1c; border: 1px solid #b91c1c; white-space: nowrap; }
|
||||
.iwb-seterr { margin: 0; padding: 1px 7px; border-radius: 999px; color: var(--iwb-err); border: 1px solid var(--iwb-err); white-space: nowrap; }
|
||||
.iwb-setgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
|
||||
.iwb-setcell { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; height: 62px; padding: 0; cursor: pointer; background: transparent; border: 1px solid var(--iwb-border); border-radius: 12px; color: var(--iwb-text); transition: border-color .15s, opacity .15s; }
|
||||
.iwb-setcell:hover { opacity: .8; }
|
||||
@@ -1950,7 +1968,7 @@ html { scrollbar-width: thin; scrollbar-color: var(--iwb-border2) color-mix(in s
|
||||
.iwb-gc-tick { margin-left: auto; color: var(--iwb-brand); font-weight: 700; }
|
||||
.iwb-gc-item:hover { border-color: var(--iwb-brand); color: var(--iwb-brand); }
|
||||
.iwb-gc-item-on { border-color: var(--iwb-brand); box-shadow: 0 0 0 2px color-mix(in srgb, var(--iwb-brand) 18%, transparent); }
|
||||
.iwb-gc-item-err { border-color: #ef4444; color: #ef4444; }
|
||||
.iwb-gc-item-err { border-color: var(--iwb-err); color: var(--iwb-err); }
|
||||
.iwb-gc-empty { font-size: 12px; color: var(--iwb-text2); padding: 6px 2px; }
|
||||
/* 节点上的模型触发器:节点宽度固定(480)时长名必须省略,否则会溢出压到「尺寸」按钮上。
|
||||
(面板里的模型名永远完整显示:nowrap 且不设省略) */
|
||||
@@ -2023,8 +2041,8 @@ html { scrollbar-width: thin; scrollbar-color: var(--iwb-border2) color-mix(in s
|
||||
.iwb-switch { display: inline-flex; align-items: center; cursor: pointer; flex: 0 0 auto; }
|
||||
.iwb-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
|
||||
.iwb-switch-track { width: 38px; height: 22px; border-radius: 999px; background: var(--iwb-border); position: relative; transition: background .15s; }
|
||||
.iwb-switch-dot { position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
|
||||
.iwb-switch input:checked + .iwb-switch-track { background: #6b5ce7; }
|
||||
.iwb-switch-dot { position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: var(--iwb-panel); transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
|
||||
.iwb-switch input:checked + .iwb-switch-track { background: var(--iwb-brand); }
|
||||
.iwb-switch input:checked + .iwb-switch-track .iwb-switch-dot { transform: translateX(16px); }
|
||||
.iwb-switch input:disabled + .iwb-switch-track { opacity: .45; }
|
||||
|
||||
@@ -2082,13 +2100,13 @@ html { scrollbar-width: thin; scrollbar-color: var(--iwb-border2) color-mix(in s
|
||||
/* LLM 渠道:去掉外框,改成分区 + 细分隔线;默认渠道用左侧色条标记 */
|
||||
.iwb-settings-modal .iwb-llm-card { border: 0; border-top: 1px solid var(--iwb-border); border-radius: 0; background: transparent; padding: 12px 0 8px; margin: 0; }
|
||||
.iwb-settings-modal .iwb-llm-card:first-of-type { border-top: 0; }
|
||||
.iwb-settings-modal .iwb-llm-card-def { border-left: 2px solid #6b5ce7; padding-left: 12px; }
|
||||
.iwb-settings-modal .iwb-llm-card-def { border-left: 2px solid var(--iwb-brand); padding-left: 12px; }
|
||||
.iwb-settings-modal .iwb-llm-card .iwb-label { font-size: 12px; color: var(--iwb-text2); font-weight: 600; margin: 10px 0 4px; }
|
||||
.iwb-settings-modal .iwb-llm-card .iwb-row { margin: 4px 0; gap: 8px; }
|
||||
.iwb-settings-modal .iwb-llm-card .iwb-input { padding: 6px 10px; font-size: 13px; }
|
||||
.iwb-settings-modal .iwb-modellist { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 4px; }
|
||||
.iwb-settings-modal .iwb-modelrow { padding: 2px 8px; border-radius: 999px; background: var(--iwb-layer2); border: 1px solid transparent; margin: 0; font-size: 12.5px; }
|
||||
.iwb-settings-modal .iwb-modelrow-active { border-color: #6b5ce7; background: rgba(107,92,231,.08); }
|
||||
.iwb-settings-modal .iwb-modelrow-active { border-color: var(--iwb-brand); background: color-mix(in srgb, var(--iwb-brand) 8%, transparent); }
|
||||
.iwb-settings-modal .iwb-llm-card .iwb-btn-xs { opacity: .5; }
|
||||
.iwb-settings-modal .iwb-llm-card .iwb-btn-xs:hover { opacity: 1; }
|
||||
/* ── 外观:取色器(v3.25.14,仿 Obsidian 的取色面板) ───────────────── */
|
||||
@@ -2102,7 +2120,7 @@ html { scrollbar-width: thin; scrollbar-color: var(--iwb-border2) color-mix(in s
|
||||
.iwb-cpick-box { position: relative; height: 132px; border-radius: 6px; cursor: crosshair; }
|
||||
.iwb-cpick-dot { position: absolute; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.4); pointer-events: none; }
|
||||
.iwb-cpick-hue { width: 100%; height: 12px; margin: 10px 0 8px; border-radius: 6px; -webkit-appearance: none; appearance: none; }
|
||||
.iwb-cpick-hue::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 2px solid rgba(0,0,0,.45); cursor: pointer; }
|
||||
.iwb-cpick-hue::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; border-radius: 50%; background: var(--iwb-panel); border: 2px solid rgba(0,0,0,.45); cursor: pointer; }
|
||||
.iwb-cpick-rgb { display: flex; gap: 6px; }
|
||||
.iwb-cpick-chan { flex: 1 1 0; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 10px; color: var(--iwb-text2); }
|
||||
.iwb-cpick-chan input { width: 100%; height: 26px; padding: 0 4px; text-align: center; border-radius: 5px; border: 1px solid var(--iwb-border); background: var(--iwb-layer2); color: var(--iwb-text); font-size: 11px; }
|
||||
@@ -2243,7 +2261,7 @@ html { scrollbar-width: thin; scrollbar-color: var(--iwb-border2) color-mix(in s
|
||||
.iwb-nav-item:hover { background: var(--iwb-layer); color: var(--iwb-text); }
|
||||
.iwb-nav-item.on { background: color-mix(in srgb, var(--iwb-text) 82%, #000); color: #fff; }
|
||||
.iwb-nav-item.on:hover { background: color-mix(in srgb, var(--iwb-text) 90%, #000); }
|
||||
.theme-dark .iwb-nav-item.on { background: color-mix(in srgb, #ffffff 88%, #000); color: #1c2333; }
|
||||
.theme-dark .iwb-nav-item.on { background: color-mix(in srgb, #ffffff 88%, #000); color: var(--iwb-text); }
|
||||
.ws-expanded .iwb-navrail { width: 52px; }
|
||||
|
||||
/* ── 插件整页(v3.25.59)──────────────────────────────────────────────── */
|
||||
@@ -2341,3 +2359,27 @@ html { scrollbar-width: thin; scrollbar-color: var(--iwb-border2) color-mix(in s
|
||||
|
||||
/* 自动配色开启时的提示行(v3.25.81) */
|
||||
.iwb-appear-note-only { font-size: 12px; color: var(--iwb-text2); padding: 4px 0 0 2px; }
|
||||
|
||||
/* v3.25.87:插件整页/首页不显示停靠栏(含 iframe 残影,直接 display:none 而不是等淡出) */
|
||||
.iwb-overlay.iwb-view-plugins .iwb-dockarea,
|
||||
.iwb-overlay.iwb-view-home .iwb-dockarea,
|
||||
.iwb-overlay.iwb-view-landing .iwb-dockarea { display: none !important; }
|
||||
|
||||
/* 插件面板作用域重映射(v3.25.89):
|
||||
停靠栏/画布里的插件面板根容器原来直接用 --iwb-panel/--iwb-layer2(亮色下都是纯白),
|
||||
盖在灰色停靠栏上就是"一块白纸"。这里在插件容器内部把旧变量重指到四层插件色:
|
||||
面板根(--iwb-panel)→ surface 浅灰
|
||||
卡片/输入(--iwb-layer2)→ card 纯白
|
||||
内嵌/行(--iwb-layer)→ inset 更灰
|
||||
插件源码写的是 var(--iwb-layer2,#fff),不用改插件即可跟随。 */
|
||||
.iwb-dock-body,
|
||||
.iwb-node-body .iwb-plugin-body,
|
||||
.iwb-cwv-panel-body {
|
||||
--iwb-panel: var(--iwb-plugin-surface);
|
||||
--iwb-layer2: var(--iwb-plugin-card);
|
||||
--iwb-layer: var(--iwb-plugin-inset);
|
||||
--iwb-hover: var(--iwb-plugin-hover);
|
||||
}
|
||||
/* 兜底:插件面板根若写死了白底,这里压平(只对直接子元素,避免影响卡片) */
|
||||
.iwb-dock-body > div[style*="background:#fff" i],
|
||||
.iwb-dock-body > div[style*="background: #fff" i] { background: var(--iwb-plugin-surface) !important; }
|
||||
@@ -57,7 +57,7 @@ assert.ok(/\.iwb-home-main-head \.iwb-btn \{[^}]*color-mix/.test(css))
|
||||
assert.ok(/\.iwb-home-main-head \.iwb-btn-primary \{[^}]*var\(--iwb-text2\)/.test(css))
|
||||
assert.ok(/\.iwb-home-search \.iwb-input \{[^}]*color-mix/.test(css))
|
||||
// v3.1.0 全灰阶收口:品牌 token=同亮度灰;画布选中标签=亮灰;app 内无蓝色 hex(节点色/连线)
|
||||
assert.ok(css.includes('--iwb-brand: #6b7280'))
|
||||
assert.ok(css.includes('--iwb-brand: var(--iwb-text2)'), '品牌色默认跟随文字二级色(v3.25.83);自动配色会改写这个变量')
|
||||
assert.ok(/\.iwb-tab-active \{ background: color-mix\(in srgb, var\(--iwb-text\) 9%, transparent\)/.test(css))
|
||||
assert.ok(!/(#4f6ef7|#6366f1|#3b82f6|#0ea5e9|#8b5cf6)/i.test(css))
|
||||
assert.ok(!/(#4f6ef7|#6366f1|#3b82f6|#0ea5e9|#8b5cf6|#f59e0b|#10b981)/i.test(source))
|
||||
|
||||
@@ -0,0 +1,60 @@
|
||||
'use strict'
|
||||
// 插件主题契约守门(v3.25.85,P4)
|
||||
//
|
||||
// 规则:插件给**面板/弹层**写的样式必须用宿主主题变量(--iwb-* / --iwb-plugin-*),
|
||||
// 不允许把颜色写死 —— 否则自动配色/暗色主题下插件永远是白底黑字。
|
||||
//
|
||||
// 允许的例外(写进 ALLOW 列表并在注释里说明为什么):
|
||||
// · var(--x, #hex) 形式里的 fallback(浏览器不支持变量时的兜底)
|
||||
// · 画布内容自身的颜色(画笔色、填充色),属于数据不属于主题
|
||||
const assert = require('assert')
|
||||
const fs = require('fs')
|
||||
const path = require('path')
|
||||
|
||||
const ROOT = path.join(__dirname, '..')
|
||||
const PLUG_DIR = path.join(ROOT, 'plugins')
|
||||
const ALLOW_FILES = new Set([
|
||||
'plugin-image-annotate.7a865c7c353c.js', // 画笔/文字颜色是用户内容色
|
||||
'plugin-blank-canvas.67763893fa99.js', // 画布填充色(白底画布内容)+ 变量 fallback
|
||||
'plugin-image-vectorize.7014982f60e6.js', // 位图转矢量的浮层是深色自绘 UI(#1b1b22 等),待插件源码改用 --iwb-*
|
||||
'plugin-style-source.ee7168565a44.js', // 风格库角标:白字(品牌底)+ 琥珀色提示,属内容色
|
||||
'plugin-browser.8161a82890d9.js', // 浏览器面板的刷新/危险按钮用自家色(#e05252/#1d9e75/#888780)
|
||||
'plugin-batch-export.b7d13ba66cf9.js', // 导出面板按钮用自家品牌色(#1d9e75/#d85a30/#2f6fed),待插件源码仓库改用 --iwb-*
|
||||
])
|
||||
|
||||
function walk (dir, out) {
|
||||
for (const e of fs.readdirSync(dir, { withFileTypes: true })) {
|
||||
const p = path.join(dir, e.name)
|
||||
if (e.isDirectory()) walk(p, out)
|
||||
else if (/\.js$/i.test(e.name)) out.push(p)
|
||||
}
|
||||
return out
|
||||
}
|
||||
|
||||
if (!fs.existsSync(PLUG_DIR)) {
|
||||
console.log('plugin theme contract checks skipped(无 plugins 目录)')
|
||||
process.exit(0)
|
||||
}
|
||||
|
||||
const files = walk(PLUG_DIR, [])
|
||||
let checked = 0
|
||||
const bad = []
|
||||
for (const f of files) {
|
||||
const base = path.basename(f)
|
||||
if (ALLOW_FILES.has(base)) continue
|
||||
// 已知 plugin-batch-export 的导出按钮色写死(#1d9e75 等),留给插件源码仓库修。
|
||||
const src = fs.readFileSync(f, 'utf8')
|
||||
if (!/(background|border)|\bcolor\s*:/.test(src)) continue // 没有样式声明的插件跳过
|
||||
checked++
|
||||
// 找 background/color/border 声明里直接写 hex(排除 var(--x,#hex) 的 fallback)
|
||||
const re = /(background(?:-color)?|color|border(?:-color)?)\s*:\s*([^;'"]{0,80})/gi
|
||||
let m
|
||||
while ((m = re.exec(src))) {
|
||||
const val = m[2]
|
||||
if (!/#[0-9a-f]{3,8}/i.test(val)) continue
|
||||
if (/var\(--[a-z0-9-]+\s*,\s*#[0-9a-f]{3,8}/i.test(val)) continue // fallback
|
||||
bad.push(base + ' → ' + m[1] + ': ' + val.trim().slice(0, 60))
|
||||
}
|
||||
}
|
||||
assert.strictEqual(bad.length, 0, '插件样式不得写死颜色(改用 --iwb-plugin-*):\n' + bad.slice(0, 10).join('\n'))
|
||||
console.log('plugin theme contract checks passed(检查 ' + checked + ' 个插件文件)')
|
||||
Reference in new issue
Block a user