Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d7fdae8877 | ||
|
|
bc77f007a0 | ||
|
|
d2bef9f348 | ||
|
|
06d2a8bc5b | ||
|
|
d9e3d84c0c | ||
|
|
af3a9cdf8f | ||
|
|
92a8b6af0d | ||
|
|
f6c66fcd89 | ||
|
|
262bcc037b | ||
|
|
2cc5126f70 | ||
|
|
5d68e0249a | ||
|
|
bb0b3f3e8f | ||
|
|
204f9103aa | ||
|
|
8e40ba2870 | ||
|
|
d45065101b | ||
|
|
702fbf5132 | ||
|
|
8944f2a78f | ||
|
|
7335f59288 | ||
|
|
16109a39f4 | ||
|
|
b25ba45872 | ||
|
|
b8f5d4d8eb | ||
|
|
fb69d17615 | ||
|
|
98f7f8e6d4 | ||
|
|
0e80c55adf | ||
|
|
dd58e4a7b5 | ||
|
|
e9435a5cfe | ||
|
|
054aec958e | ||
|
|
96c786e8ca | ||
|
|
3792081ddd | ||
|
|
b1e3fea494 | ||
|
|
81c520fe52 |
No files matched your search
@@ -14,6 +14,11 @@
|
||||
> 3. 核验正式地址版本 → 之后才移动 `stable` / `stable-verified-<日期>` 标签、更新本 CHANGELOG、写 GitHub Release(`gh release create`)。
|
||||
> 测试发现问题 → 改 → 再 `deploy:test`,正式环境不受影响。回滚点 `git reset --hard stable`。
|
||||
|
||||
## v3.26.40(2026-11-23)Windows:修复 PowerShell 弹窗
|
||||
|
||||
- Windows 状态栏内存探测改用 CREATE_NO_WINDOW 启动 PowerShell,不再每 4 秒弹出控制台窗口。
|
||||
- macOS 行为不变(Unix 分支仍用 ps)。
|
||||
|
||||
## v3.26.39(2026-11-22)修正插件插入落点与封面插入
|
||||
|
||||
- promptlib 1.6.18:拖拽落点按节点宽高居中到鼠标;详情「插入模板节点/插入画布/插入图片」落到画布可视中心;拖拽期间禁用文本选择。
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# 现状架构与性能事实基线(image-workbench-web)
|
||||
|
||||
> **本文档是什么**:现状**事实快照**,不是规范。用途:任何性能 / 内存 / 存储相关改动,先对齐这里的现实,避免把已经调好的东西改坏。
|
||||
> 日期 **2026-10-20**(**2026-11-16 复算 · v3.24.85**)| 基线(**最近一次 bump 版本的提交**,不是主干 HEAD)`main = 5e2f9dd`(线上 `v3.26.39+5e2f9dd` —— **未上线**(本地测试中):左右停靠栏配色对齐主色调(新增 `--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 = d9e3d84`(线上 `v3.26.40+d9e3d84` —— **未上线**(本地测试中):左右停靠栏配色对齐主色调(新增 `--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 迁出)
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
# promptlib 迭代复盘(2026-11-22)
|
||||
|
||||
> 记录本轮提示词库 1.6.6 → 1.8.8 迭代中遇到的问题、根因与必须遵守的做法。
|
||||
|
||||
## 1. 发布纪律(最大教训)
|
||||
|
||||
- 每次改动同时做三件事:插件 package.json version、入口 version、市场发布(gen-market + 上传 NAS)。
|
||||
- 只在本机手工替换 manifest 不上市场,用户端永远是旧版本。
|
||||
- 发布前必须 node --check;1.8.5 曾因转义把正则写成真实换行,语法损坏。
|
||||
- 上市场后让用户「刷新市场 → 更新」,必要时重启。
|
||||
|
||||
## 2. 拖入画布(不要用原生 HTML5 DnD)
|
||||
|
||||
- 原生 drag&drop 在 WKWebView 吞掉 pointerup,落点节点带焦点残留。
|
||||
- 用 pointerdown → pointermove(>5px) 幽灵 → pointerup → canvas.screenToWorld → canvasWrite.createNode。
|
||||
- 落点 = 鼠标位置 = 节点左上角(对齐风格库),不要居中偏移。
|
||||
- 拖拽期间 body 加 user-select:none。
|
||||
|
||||
## 3. 详情插入:两步放置
|
||||
|
||||
- 点插入后关闭详情 → 跟手灰色小方框(112×112,左上角对齐鼠标)→ 点击画布落点;Esc 取消。
|
||||
|
||||
## 4. 编辑面板
|
||||
|
||||
- 三栏:左 236 固定 / 中自适应 / 右可变(默认 300,190–460),分割条 6px。
|
||||
- 正文 flex:1 到底;变量区独立滚动。
|
||||
- 变量 = 单个输入框,与正文双向同步;重名阻止并回退。
|
||||
- i 按钮展开说明,可多开、各自收起;说明透明背景 + 虚线框。
|
||||
- 正文变量高亮覆盖层与 textarea 的字体/行高/内边距必须一致,否则光标错位;程序改 value 后手动重绘。
|
||||
- 标签用输入框 + 加号生成 chips,可删除。
|
||||
|
||||
## 5. 详情面板
|
||||
|
||||
- 左卡片:封面 contain 完整展示 → 标题 14px → 分割线 → 分组/标签/字数(去底色、带冒号、行间浅线)。
|
||||
- 右卡片:标题 + 正文独立滚动(flex + min-height:0 + overflow:auto)。
|
||||
- 左右卡片等距等高,align-items: stretch,否则右侧没有滚动条。
|
||||
- 右上角编辑 + 关闭;底部插入沿用两步放置;编辑取消回到详情。
|
||||
|
||||
## 6. 节点与输出
|
||||
|
||||
- 变量输入框 placeholder = 说明文字。
|
||||
- 节点保存 tpl(含变量,供编辑)与 text(填值后剔除未填占位,供下游/生图)。
|
||||
- 旧节点 render 时自愈 text。
|
||||
|
||||
## 7. 样式
|
||||
|
||||
- 输入框比底色更亮 + 极浅描边,聚焦纯白 + 淡紫光圈;不要深灰条。
|
||||
- 变量行不要套边框;说明透明 + 虚线。
|
||||
- 插件样式自包含;参考 docs/standards/plugin-development.md 与 plugin-node-drag.md。
|
||||
|
||||
## 8. 版本记录
|
||||
|
||||
1.6.6 封面文件化 / 1.6.7 outKind / 1.6.15 指针拖拽 / 1.6.18–19 落点 / 1.6.20 封面插入 / 1.6.21 两步放置 / 1.6.22–23 放置框 / 1.7.0 三栏编辑 / 1.7.1 视觉精修 / 1.7.2 变量黑粗 / 1.7.3 正文显示 / 1.7.4 名称可拖高 / 1.7.5–1.7.6 封面 contain + 取消回详情 / 1.7.7 字体度量 / 1.7.8 重绘 / 1.7.9 滚动 / 1.8.0 标题下移 + 标签编辑器 / 1.8.1 元信息 / 1.8.2 卡片化 / 1.8.3–1.8.4 布局 / 1.8.5–1.8.6 输出剔除变量 / 1.8.7–1.8.8 细节。
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "image-workbench-web",
|
||||
"private": true,
|
||||
"version": "3.26.39",
|
||||
"version": "3.26.40",
|
||||
"description": "Browser-based node canvas image workbench",
|
||||
"scripts": {
|
||||
"build": "node scripts/build.js && node scripts/copy-plugins.js",
|
||||
|
||||
+3
-3
@@ -44,10 +44,10 @@
|
||||
"dir": "promptlib",
|
||||
"main": "main.js",
|
||||
"style": "styles.css",
|
||||
"version": "1.6.18",
|
||||
"version": "1.8.8",
|
||||
"files": {
|
||||
"main.js": "0efdfbbfe7e9318610bb94330c0a3c361a0aa38f2b3a44c243c872f0e02a09e8",
|
||||
"styles.css": "1fdad04e2ffe1c8ba2a991a88072f780b65238096f9ccd1b5adba671ff2c9cb3"
|
||||
"main.js": "91fde4bcfa888b04ee2b0e79a05d951a56247bc76ecd11b5d9500131df11d542",
|
||||
"styles.css": "70cc02f98bed580f70ef9c71009dde29e01a92684c28d69016438d49c1e0a95b"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
||||
+242
-75
@@ -95,6 +95,12 @@
|
||||
})
|
||||
}
|
||||
|
||||
// 提交给下游/生图的文本:填完变量后,把未填的 {占位} 从输出里剔除(只在编辑器里展示)。
|
||||
function outputText (tpl, vals) {
|
||||
var s = fillTpl(tpl, vals)
|
||||
return s.replace(/[{][^{}]{1,24}[}]/g, ' ').replace(/[ ]{2,}/g, ' ').trim()
|
||||
}
|
||||
|
||||
function varsOf (p) {
|
||||
if (!p) return []
|
||||
if (Array.isArray(p.vars) && p.vars.length) {
|
||||
@@ -771,10 +777,10 @@
|
||||
if (!w) return
|
||||
var vd = varsOf(st.p)
|
||||
if (vd.length) {
|
||||
api2.createNode('ptpl', w.x - 210, w.y - 20, { promptId: '', name: st.p.name || '提示词模板', tpl: st.p.text || '', vdefs: vd, vars: {}, cover: st.p.cover || '', refOn: false, text: st.p.text || '', outKind: 'prompt' })
|
||||
api2.createNode('ptpl', w.x, w.y, { promptId: '', name: st.p.name || '提示词模板', tpl: st.p.text || '', vdefs: vd, vars: {}, cover: st.p.cover || '', refOn: false, text: outputText(st.p.text || '', {}), outKind: 'prompt' })
|
||||
notify('已插入模板节点:' + (st.p.name || ''))
|
||||
} else {
|
||||
api2.createNode('prompt', w.x - 132, w.y - 20, { text: st.p.text || '', title: st.p.name || '' })
|
||||
api2.createNode('prompt', w.x, w.y, { text: st.p.text || '', title: st.p.name || '' })
|
||||
notify('已插入提示词:' + (st.p.name || ''))
|
||||
}
|
||||
} catch (err) { notify('拖拽插入失败:' + ((err && err.message) || err), 'err') }
|
||||
@@ -790,6 +796,75 @@
|
||||
return pt ? { x: pt.x - (w || 0) / 2, y: pt.y - (h || 0) / 2 } : null
|
||||
} catch (e) { return null }
|
||||
}
|
||||
// v1.6.21:详情里的「插入」改成两步放置:先出现跟手幽灵,再点画布落点。
|
||||
var placement = null
|
||||
function cancelPlacement () {
|
||||
var st = placement
|
||||
if (!st) return
|
||||
placement = null
|
||||
try {
|
||||
global.removeEventListener('pointermove', st.move, true)
|
||||
global.removeEventListener('pointerdown', st.down, true)
|
||||
global.removeEventListener('keydown', st.key, true)
|
||||
} catch (e) { /* ignore */ }
|
||||
if (st.ghost && st.ghost.parentNode) st.ghost.parentNode.removeChild(st.ghost)
|
||||
try { document.body.style.cursor = '' } catch (e) { /* ignore */ }
|
||||
}
|
||||
// v1.6.22:放置指示改成半透明矩形框(跟手、左上角对齐落点),不再用卡片式幽灵。
|
||||
function makePlaceGhost (kind) {
|
||||
var dims = { w: 112, h: 112 }
|
||||
var box = el('div', { class: 'iwb-plp-placebox' })
|
||||
box.style.width = dims.w + 'px'
|
||||
box.style.height = dims.h + 'px'
|
||||
box.appendChild(el('div', { class: 'iwb-plp-placebox-t', text: '点击放置' }))
|
||||
return box
|
||||
}
|
||||
function beginPlacement (kind, payload) {
|
||||
cancelPlacement()
|
||||
var ghost = makePlaceGhost(kind)
|
||||
document.body.appendChild(ghost)
|
||||
var st = { ghost: ghost, kind: kind, payload: payload }
|
||||
st.move = function (e) {
|
||||
ghost.style.left = e.clientX + 'px'
|
||||
ghost.style.top = e.clientY + 'px'
|
||||
}
|
||||
st.down = function (e) {
|
||||
var c = document.querySelector('.iwb-canvas')
|
||||
if (!c || !c.contains(e.target)) return
|
||||
e.preventDefault(); e.stopPropagation()
|
||||
st.move(e)
|
||||
placeAt(st.kind, st.payload, e.clientX, e.clientY)
|
||||
}
|
||||
st.key = function (e) { if (e.key === 'Escape') { e.preventDefault(); cancelPlacement(); notify('已取消放置') } }
|
||||
global.addEventListener('pointermove', st.move, true)
|
||||
global.addEventListener('pointerdown', st.down, true)
|
||||
global.addEventListener('keydown', st.key, true)
|
||||
placement = st
|
||||
try { document.body.style.cursor = 'copy' } catch (e) { /* ignore */ }
|
||||
notify('移动鼠标到目标位置后单击放置(Esc 取消)')
|
||||
}
|
||||
function placeAt (kind, payload, cx, cy) {
|
||||
try {
|
||||
var sw = ctx.canvas && typeof ctx.canvas.screenToWorld === 'function' ? ctx.canvas.screenToWorld(cx, cy) : null
|
||||
var cw = ctx.canvasWrite || ctx.canvas
|
||||
if (!sw || !cw) { notify('当前宿主不支持放置', 'err'); cancelPlacement(); return }
|
||||
if (kind === 'img') {
|
||||
var iid = cw.createImageNode({ dataUrl: payload.dataUrl, name: payload.name || '封面图片', x: sw.x, y: sw.y })
|
||||
if (!iid) { notify('插入封面失败', 'err'); cancelPlacement(); return }
|
||||
notify('已插入封面图片')
|
||||
} else if (kind === 'ptpl') {
|
||||
var p = payload
|
||||
var id2 = cw.createNode('ptpl', sw.x, sw.y, { promptId: p.id, name: p.name || '提示词模板', tpl: p.text || '', vdefs: varsOf(p), vars: {}, outKind: 'prompt', cover: p.cover || coverNameOf(p), refOn: false, text: outputText(p.text || '', {}) })
|
||||
if (!id2) { notify('插入失败', 'err'); cancelPlacement(); return }
|
||||
notify('已插入模板节点')
|
||||
} else {
|
||||
var id3 = cw.createNode('prompt', sw.x, sw.y, { text: payload.text || '', title: payload.name || '' })
|
||||
if (!id3) { notify('插入失败', 'err'); cancelPlacement(); return }
|
||||
notify('已插入提示词')
|
||||
}
|
||||
} catch (err) { notify('插入失败:' + ((err && err.message) || err), 'err') }
|
||||
cancelPlacement()
|
||||
}
|
||||
function startCardDrag (e, p, card) {
|
||||
if (e.button !== 0) return
|
||||
// 不用 preventDefault:否则 WebKit 可能吞掉 click/dblclick(双击详情失效)
|
||||
@@ -899,54 +974,69 @@
|
||||
|
||||
// ===== v1.5.0:变量编辑器(新建/编辑弹窗用)=====
|
||||
// 变量来自正文的 {名字}:自动检测、可改标签/默认值/说明;留空时渲染保留 {原名}。
|
||||
function makeVarsEditor (text, initial) {
|
||||
function makeVarsEditor (text, initial, onTextChange) {
|
||||
var box = el('div', { class: 'iwb-plp-vars' })
|
||||
var head = el('div', { class: 'iwb-plp-vhead' })
|
||||
head.appendChild(el('span', { text: '变量' }))
|
||||
head.appendChild(el('span', { class: 'iwb-plp-vhint', text: '从正文 {…} 自动检测,可改标签 / 默认值 / 说明' }))
|
||||
var chips = el('div', { class: 'iwb-plp-vchips' })
|
||||
var head = el('div', { class: 'iwb-plp-vhead' },
|
||||
el('span', { text: '变量' }),
|
||||
el('span', { class: 'iwb-plp-vhint', text: '与正文双向同步 · 点 i 写说明' }))
|
||||
var rows = el('div', { class: 'iwb-plp-vrows' })
|
||||
var prev = el('div', { class: 'iwb-plp-vprev' })
|
||||
box.appendChild(head); box.appendChild(chips); box.appendChild(rows); box.appendChild(prev)
|
||||
box.appendChild(head); box.appendChild(rows)
|
||||
var list = []
|
||||
if (Array.isArray(initial) && initial.length) list = initial.map(function (v) { return { key: String(v.key || ''), label: String(v.label || v.key || ''), desc: String(v.desc || ''), def: String(v.def || '') } })
|
||||
var open = {}
|
||||
var norm = function (v) { return { key: String(v.key || ''), desc: String(v.desc || ''), def: String(v.def || '') } }
|
||||
if (Array.isArray(initial) && initial.length) list = initial.filter(function (v) { return v && v.key }).map(norm)
|
||||
function values () {
|
||||
var m = {}
|
||||
list.forEach(function (v) { if (v.def) m[v.key] = v.def })
|
||||
return m
|
||||
}
|
||||
function paint () {
|
||||
clear(chips); clear(rows)
|
||||
clear(rows)
|
||||
list.forEach(function (v) {
|
||||
var chip = el('span', { class: 'iwb-plp-vchip', text: v.label || v.key })
|
||||
var x = el('i', { class: 'iwb-plp-vx', text: '×', title: '忽略这个变量' })
|
||||
x.addEventListener('click', function () { list = list.filter(function (z) { return z.key !== v.key }); paint() })
|
||||
chip.appendChild(x)
|
||||
chips.appendChild(chip)
|
||||
var row = el('div', { class: 'iwb-plp-vrow' })
|
||||
row.appendChild(el('span', { class: 'iwb-plp-vk', text: '{' + v.key + '}' }))
|
||||
var def = el('input', { class: 'iwb-input iwb-plp-vin', placeholder: '默认值(可留空)' })
|
||||
def.value = v.def || ''
|
||||
def.addEventListener('input', function () { v.def = def.value; paintPrev() })
|
||||
var desc = el('input', { class: 'iwb-input iwb-plp-vin', placeholder: '说明(如:如「11.9」)' })
|
||||
desc.value = v.desc || ''
|
||||
desc.addEventListener('input', function () { v.desc = desc.value })
|
||||
row.appendChild(def); row.appendChild(desc)
|
||||
rows.appendChild(row)
|
||||
var item = el('div', { class: 'iwb-plp-vitem' })
|
||||
var row = el('div', { class: 'iwb-plp-vrow2' })
|
||||
var nameIn = el('input', { class: 'iwb-input iwb-plp-vname', placeholder: '变量名' })
|
||||
nameIn.value = v.key
|
||||
var iBtn = el('button', { class: 'iwb-plp-vi' + (open[v.key] ? ' is-open' : ''), type: 'button', title: '说明', text: 'i' })
|
||||
iBtn.addEventListener('click', function () { open[v.key] = !open[v.key]; paint() })
|
||||
nameIn.addEventListener('blur', function () { renameTo(v, nameIn.value) })
|
||||
nameIn.addEventListener('keydown', function (e) { if (e.key === 'Enter') { e.preventDefault(); nameIn.blur() } })
|
||||
row.appendChild(nameIn); row.appendChild(iBtn)
|
||||
item.appendChild(row)
|
||||
if (open[v.key]) {
|
||||
var d = el('input', { class: 'iwb-input iwb-plp-vdesc', placeholder: '说明(会作为节点输入框的占位提示)' })
|
||||
d.value = v.desc || ''
|
||||
d.addEventListener('input', function () { v.desc = d.value })
|
||||
item.appendChild(d)
|
||||
}
|
||||
rows.appendChild(item)
|
||||
})
|
||||
if (!list.length) rows.appendChild(el('div', { class: 'iwb-hint', text: '正文里没有 {变量};写入 {产品名} 这样的大括号即会被识别。' }))
|
||||
paintPrev()
|
||||
if (!list.length) rows.appendChild(el('div', { class: 'iwb-hint', text: '正文里没有 {变量};输入 {产品名} 即会被识别。' }))
|
||||
}
|
||||
function renameTo (v, raw) {
|
||||
var next = String(raw || '').replace(/[{}]/g, '').trim()
|
||||
if (!next || next === v.key) { paint(); return }
|
||||
if (list.some(function (x) { return x !== v && x.key === next })) { notify('变量名重复:' + next, 'err'); paint(); return }
|
||||
var old = v.key
|
||||
v.key = next
|
||||
if (open[old] !== undefined) { open[next] = open[old]; delete open[old] }
|
||||
var nt = String(text || '').split('{' + old + '}').join('{' + next + '}')
|
||||
text = nt
|
||||
if (typeof onTextChange === 'function') onTextChange(nt)
|
||||
paint()
|
||||
}
|
||||
function paintPrev () { prev.textContent = fillTpl(text, values()) }
|
||||
function sync (nextText) {
|
||||
text = String(nextText || '')
|
||||
var found = detectVars(text)
|
||||
var old = {}
|
||||
list.forEach(function (v) { old[v.key] = v })
|
||||
list = found.map(function (v) { return old[v.key] ? Object.assign({}, v, old[v.key]) : v })
|
||||
list = found.map(function (v) {
|
||||
var prev = old[v.key]
|
||||
return { key: v.key, desc: prev ? prev.desc : v.desc, def: prev ? prev.def : '' }
|
||||
})
|
||||
paint()
|
||||
}
|
||||
if (!list.length) list = detectVars(text)
|
||||
if (!list.length) list = detectVars(text).map(norm)
|
||||
paint()
|
||||
return { node: box, sync: sync, list: function () { return list }, values: values }
|
||||
}
|
||||
@@ -1262,48 +1352,55 @@
|
||||
var closeBtn = el('button', { class: 'iwb-btn iwb-btn-sm', title: '关闭', text: '✕' })
|
||||
var dlg = openDialog({
|
||||
key: 'detail',
|
||||
title: p.name || '未命名',
|
||||
width: 880, height: 640,
|
||||
title: '提示词详情',
|
||||
width: 1180, height: 720,
|
||||
actions: [edit, closeBtn],
|
||||
build: function (bodyEl, footEl) {
|
||||
var cov = el('div', { class: 'iwb-plp-dcov' })
|
||||
paintCoverInto(cov, p)
|
||||
var leftCol = el('div', { class: 'iwb-plp-dleftcol' })
|
||||
leftCol.appendChild(cov)
|
||||
leftCol.appendChild(el('div', { class: 'iwb-plp-dtitle', text: p.name || '未命名' }))
|
||||
var meta = el('div', { class: 'iwb-plp-dmeta' })
|
||||
function metaRow (label, nodes) {
|
||||
var row = el('div', { class: 'iwb-plp-dmrow' })
|
||||
row.appendChild(el('span', { class: 'iwb-plp-dmk', text: label }))
|
||||
var val = el('div', { class: 'iwb-plp-dmv' })
|
||||
;(Array.isArray(nodes) ? nodes : [nodes]).forEach(function (n) { val.appendChild(n) })
|
||||
row.appendChild(val)
|
||||
return row
|
||||
}
|
||||
meta.appendChild(metaRow('分组:', el('span', { class: 'iwb-plp-dgroup', text: p.group || '未分组' })))
|
||||
var tagNodes = (p.tags || []).map(function (t) { return el('span', { class: 'iwb-plp-dtag', text: '#' + t }) })
|
||||
if (!tagNodes.length) tagNodes = [el('span', { class: 'iwb-plp-dempty', text: '无' })]
|
||||
meta.appendChild(metaRow('标签:', tagNodes))
|
||||
meta.appendChild(metaRow('字数:', el('span', { class: 'iwb-plp-dlen', text: String(p.text || '').length + ' 字' })))
|
||||
leftCol.appendChild(meta)
|
||||
var right = el('div', { class: 'iwb-plp-dright' })
|
||||
right.appendChild(el('div', { class: 'iwb-hint', text: [p.group || '未分组'].concat(p.tags || []).join(' · ') + ' · ' + String(p.text || '').length + ' 字' }))
|
||||
var vlist = varsOf(p)
|
||||
var vals = {}
|
||||
var txt = el('div', { class: 'iwb-plp-dtext', text: p.text || '' })
|
||||
var txt = el('div', { class: 'iwb-plp-dtext' })
|
||||
;(function paintText () {
|
||||
var str = String(p.text || '')
|
||||
var re = /[{]([^{}]{1,24})[}]/g, last = 0, m
|
||||
while ((m = re.exec(str))) {
|
||||
if (m.index > last) txt.appendChild(document.createTextNode(str.slice(last, m.index)))
|
||||
txt.appendChild(el('span', { class: 'iwb-plp-dvar', text: m[0] }))
|
||||
last = m.index + m[0].length
|
||||
}
|
||||
if (last < str.length) txt.appendChild(document.createTextNode(str.slice(last)))
|
||||
})()
|
||||
function filled () { return vlist.length ? fillTpl(p.text, vals) : String(p.text || '') }
|
||||
if (vlist.length) {
|
||||
var vbox = el('div', { class: 'iwb-plp-dvars' })
|
||||
vlist.forEach(function (v) {
|
||||
var row = el('div', { class: 'iwb-plp-vrow' })
|
||||
row.appendChild(el('span', { class: 'iwb-plp-vk', text: v.label || v.key }))
|
||||
var inp = el('input', { class: 'iwb-input iwb-plp-vin', placeholder: v.desc || v.def || '' })
|
||||
inp.value = v.def || ''
|
||||
inp.addEventListener('input', function () { vals[v.key] = inp.value; txt.textContent = filled() })
|
||||
row.appendChild(inp)
|
||||
vbox.appendChild(row)
|
||||
})
|
||||
right.appendChild(vbox)
|
||||
right.appendChild(el('div', { class: 'iwb-hint', text: '预览(留空的变量保留 {原名})' }))
|
||||
}
|
||||
right.appendChild(el('div', { class: 'iwb-plp-dsec', text: '提示词内容' }))
|
||||
right.appendChild(txt)
|
||||
bodyEl.appendChild(cov); bodyEl.appendChild(right)
|
||||
bodyEl.appendChild(leftCol); bodyEl.appendChild(right)
|
||||
var del = el('button', { class: 'iwb-btn iwb-btn-sm iwb-btn-danger', text: '删除' })
|
||||
var cp = el('button', { class: 'iwb-btn iwb-btn-sm', text: '复制全文' })
|
||||
var insTpl = null
|
||||
var cw = ctx.canvasWrite || ctx.canvas
|
||||
if (ctx.nodes && cw && typeof cw.createNode === 'function') {
|
||||
insTpl = el('button', { class: 'iwb-btn iwb-btn-sm iwb-btn-primary', title: '插入可填变量的模板节点', text: '插入模板节点' })
|
||||
insTpl.addEventListener('click', function () {
|
||||
var ctr = canvasCenter(420, 260)
|
||||
var id = cw.createNode('ptpl', ctr ? ctr.x : null, ctr ? ctr.y : null, {
|
||||
promptId: p.id, name: p.name || '提示词模板', tpl: p.text || '', vdefs: vlist, vars: vals, outKind: 'prompt',
|
||||
cover: p.cover || coverNameOf(p), refOn: false, text: filled(),
|
||||
})
|
||||
if (id) { notify('已插入模板节点'); dlg.close() } else notify('插入失败', 'err')
|
||||
})
|
||||
insTpl.addEventListener('click', function () { dlg.close(); beginPlacement('ptpl', p) })
|
||||
}
|
||||
var ins = el('button', { class: 'iwb-btn iwb-btn-sm', text: '插入画布' })
|
||||
del.addEventListener('click', function () {
|
||||
@@ -1314,17 +1411,17 @@
|
||||
})
|
||||
})
|
||||
cp.addEventListener('click', function () { Promise.resolve(api.copy(filled())).then(function (r) { if (r && r.ok === false) notify('复制失败', 'err'); else notify('已复制全文') }) })
|
||||
ins.addEventListener('click', function () { Promise.resolve(api.insert(filled(), p.name || '')).then(function () { notify('已插入画布:' + (p.name || '提示词')); dlg.close() }).catch(function () { notify('插入画布失败', 'err') }) })
|
||||
ins.addEventListener('click', function () { dlg.close(); beginPlacement('prompt', { text: filled(), name: p.name || '' }) })
|
||||
var insImg = null
|
||||
if (p.cover) {
|
||||
insImg = el('button', { class: 'iwb-btn iwb-btn-sm', title: '把这条提示词的封面作为参考图插入画布', text: '插入图片' })
|
||||
insImg.addEventListener('click', function () {
|
||||
var covName = coverNameOf(p)
|
||||
var covData = (covName && FILEAPI) ? Promise.resolve(FILEAPI.get(covName)).then(function (x) { return x && x.ok ? x.url : '' }).catch(function () { return '' }) : Promise.resolve(typeof p.cover === 'string' ? p.cover : '')
|
||||
covData.then(function (u) { return api.insertImage(u, p.name || '') }).then(function (r) {
|
||||
if (r && r.ok === false) { notify((r && r.error) || '插入封面失败', 'err'); return }
|
||||
notify('已插入封面图片')
|
||||
covData.then(function (u) {
|
||||
if (!u) { notify('封面文件读取失败(可能文件已丢失)', 'err'); return }
|
||||
dlg.close()
|
||||
beginPlacement('img', { dataUrl: u, name: p.name || '封面图片' })
|
||||
}).catch(function () { notify('插入封面失败', 'err') })
|
||||
})
|
||||
}
|
||||
@@ -1385,19 +1482,65 @@
|
||||
})
|
||||
delCover.addEventListener('click', function () { draft.cover = ''; dirty = true; Object.keys(coverCache).forEach(function (k) { if (k.indexOf(draft.id + '|') === 0) delete coverCache[k] }); repaint() })
|
||||
left.appendChild(cov); left.appendChild(el('div', { class: 'iwb-row' }, upBtn, delCover)); left.appendChild(fileIn)
|
||||
var nameIn = el('input', { class: 'iwb-input', placeholder: '名称', value: draft.name || '' })
|
||||
var nameIn = el('textarea', { class: 'iwb-input iwb-plp-namebox', placeholder: '名称', rows: '1' })
|
||||
nameIn.value = draft.name || ''
|
||||
var groupIn = el('input', { class: 'iwb-input', placeholder: '分组', value: draft.group || '' })
|
||||
var tagsIn = el('input', { class: 'iwb-input', placeholder: '标签,逗号分隔', value: (draft.tags || []).join(', ') })
|
||||
;[nameIn, groupIn, tagsIn].forEach(function (i) { i.addEventListener('input', function () { dirty = true }) })
|
||||
var tags = (draft.tags || []).slice()
|
||||
var tagWrap = el('div', { class: 'iwb-plp-tagwrap' })
|
||||
var tagChips = el('div', { class: 'iwb-plp-tagchips' })
|
||||
var tagIn = el('input', { class: 'iwb-input iwb-plp-tagin', placeholder: '添加标签' })
|
||||
var tagAdd = el('button', { class: 'iwb-btn iwb-btn-sm iwb-plp-tagadd', type: 'button', text: '+' })
|
||||
function paintTags () {
|
||||
tagChips.textContent = ''
|
||||
tags.forEach(function (t, ti) {
|
||||
var chip = el('span', { class: 'iwb-plp-tagchip' })
|
||||
chip.appendChild(document.createTextNode(t))
|
||||
var x = el('i', { class: 'iwb-plp-tagx', text: '×', title: '移除标签' })
|
||||
x.addEventListener('click', function () { tags.splice(ti, 1); dirty = true; paintTags() })
|
||||
chip.appendChild(x)
|
||||
tagChips.appendChild(chip)
|
||||
})
|
||||
}
|
||||
function addTag () {
|
||||
var t = String(tagIn.value || '').trim()
|
||||
if (!t) return
|
||||
if (!tags.some(function (x) { return x === t })) tags.push(t)
|
||||
tagIn.value = ''
|
||||
dirty = true
|
||||
paintTags()
|
||||
}
|
||||
tagAdd.addEventListener('click', addTag)
|
||||
tagIn.addEventListener('keydown', function (e) { if (e.key === 'Enter') { e.preventDefault(); addTag() } })
|
||||
;[nameIn, groupIn, tagIn].forEach(function (i) { i.addEventListener('input', function () { dirty = true }) })
|
||||
tagWrap.appendChild(tagChips); tagWrap.appendChild(el('div', { class: 'iwb-plp-tagrow' }, tagIn, tagAdd))
|
||||
paintTags()
|
||||
left.appendChild(el('label', { class: 'iwb-plp-lrow' }, el('span', { text: '名称' }), nameIn))
|
||||
left.appendChild(el('label', { class: 'iwb-plp-lrow' }, el('span', { text: '分组' }), groupIn))
|
||||
left.appendChild(el('label', { class: 'iwb-plp-lrow' }, el('span', { text: '标签' }), tagsIn))
|
||||
left.appendChild(el('div', { class: 'iwb-plp-lrow iwb-plp-lrow-tags' }, el('span', { text: '标签' }), tagWrap))
|
||||
var textIn = el('textarea', { class: 'iwb-input iwb-plp-etext', placeholder: '提示词正文' })
|
||||
var hl = el('div', { class: 'iwb-plp-hl' })
|
||||
var textWrap = el('div', { class: 'iwb-plp-ewrap' })
|
||||
textWrap.appendChild(hl); textWrap.appendChild(textIn)
|
||||
function paintHl () {
|
||||
var v = textIn.value || ''
|
||||
hl.textContent = ''
|
||||
var re = /[{]([^{}]{1,24})[}]/g, last = 0, m
|
||||
while ((m = re.exec(v))) {
|
||||
if (m.index > last) hl.appendChild(document.createTextNode(v.slice(last, m.index)))
|
||||
hl.appendChild(el('span', { class: 'iwb-plp-hlvar', text: m[0] }))
|
||||
last = m.index + m[0].length
|
||||
}
|
||||
if (last < v.length) hl.appendChild(document.createTextNode(v.slice(last)))
|
||||
hl.appendChild(document.createTextNode('\n'))
|
||||
}
|
||||
textIn.addEventListener('scroll', function () { hl.scrollTop = textIn.scrollTop })
|
||||
textIn.value = draft.text || ''
|
||||
var varEd = makeVarsEditor(draft.text || '', draft.vars || [])
|
||||
paintHl()
|
||||
var varEd = makeVarsEditor(draft.text || '', draft.vars || [], function (nt) { textIn.value = nt; dirty = true; paintHl() })
|
||||
var syncTimer = 0
|
||||
textIn.addEventListener('input', function () {
|
||||
dirty = true
|
||||
paintHl()
|
||||
if (syncTimer) clearTimeout(syncTimer)
|
||||
syncTimer = setTimeout(function () { varEd.sync(textIn.value) }, 200)
|
||||
})
|
||||
@@ -1415,13 +1558,31 @@
|
||||
textIn.selectionEnd = s + 1 + name.length
|
||||
textIn.focus()
|
||||
dirty = true
|
||||
paintHl()
|
||||
varEd.sync(textIn.value)
|
||||
})
|
||||
var mid = el('div', { class: 'iwb-plp-emid' })
|
||||
mid.appendChild(el('div', { class: 'iwb-plp-etool' }, insVarBtn, el('span', { class: 'iwb-hint', text: '在光标处插入 {变量},并自动聚焦变量名' })))
|
||||
mid.appendChild(textIn)
|
||||
mid.appendChild(varEd.node)
|
||||
bodyEl.appendChild(left); bodyEl.appendChild(mid)
|
||||
mid.appendChild(textWrap)
|
||||
var split = el('div', { class: 'iwb-plp-esplit', title: '拖动调整变量列宽度' })
|
||||
var right = el('div', { class: 'iwb-plp-eright' })
|
||||
right.appendChild(varEd.node)
|
||||
split.addEventListener('pointerdown', function (e) {
|
||||
e.preventDefault()
|
||||
var startX = e.clientX
|
||||
var startW = right.getBoundingClientRect().width
|
||||
function mv (ev) {
|
||||
var w = Math.max(190, Math.min(460, startW + (startX - ev.clientX)))
|
||||
right.style.width = w + 'px'
|
||||
}
|
||||
function up () {
|
||||
document.removeEventListener('pointermove', mv, true)
|
||||
document.removeEventListener('pointerup', up, true)
|
||||
}
|
||||
document.addEventListener('pointermove', mv, true)
|
||||
document.addEventListener('pointerup', up, true)
|
||||
})
|
||||
bodyEl.appendChild(left); bodyEl.appendChild(mid); bodyEl.appendChild(split); bodyEl.appendChild(right)
|
||||
var dupBtn = el('button', { class: 'iwb-btn iwb-btn-sm', text: '另存副本' })
|
||||
var insBtn = el('button', { class: 'iwb-btn iwb-btn-sm', text: '插入画布' })
|
||||
footEl.appendChild(dupBtn); footEl.appendChild(el('span', { class: 'iwb-drawer-spacer' })); footEl.appendChild(insBtn)
|
||||
@@ -1430,7 +1591,7 @@
|
||||
id: draft.id,
|
||||
name: nameIn.value,
|
||||
group: groupIn.value,
|
||||
tags: String(tagsIn.value || '').split(',').map(function (s) { return s.trim() }).filter(Boolean),
|
||||
tags: tags.slice(),
|
||||
text: textIn.value,
|
||||
cover: draft.cover || '',
|
||||
vars: varEd.list().filter(function (v) { return v && v.key }),
|
||||
@@ -1452,7 +1613,7 @@
|
||||
})
|
||||
}
|
||||
saveBtn.addEventListener('click', doSave)
|
||||
cancelBtn.addEventListener('click', function () { close() })
|
||||
cancelBtn.addEventListener('click', function () { close(); if (!isNew && p) { try { openDetailModal(p) } catch (e) { /* ignore */ } } })
|
||||
dupBtn.addEventListener('click', function () {
|
||||
var c = collect()
|
||||
var copy = Object.assign({}, c, { id: uid('q'), name: (String(c.name || '提示词').trim()) + ' 副本' })
|
||||
@@ -1594,7 +1755,7 @@
|
||||
global.IWBPluginHost.register({
|
||||
id: 'promptlib',
|
||||
name: '提示词库',
|
||||
version: '1.6.18',
|
||||
version: '1.8.8',
|
||||
apiVersion: 1,
|
||||
capabilities: ['panels', 'promptlib', 'nodeTypes', 'canvas', 'canvasWrite'],
|
||||
data: { schemaVersion: 3, maxBytes: 4 * 1024 * 1024 },
|
||||
@@ -1726,7 +1887,7 @@
|
||||
defs.forEach(function (v) {
|
||||
var row = el('div', { class: 'iwb-plp-nrow' })
|
||||
row.appendChild(el('span', { class: 'iwb-plp-nk', text: v.label || v.key }))
|
||||
var inp = el('input', { class: 'iwb-input iwb-plp-nin', placeholder: v.def || ('填写 ' + (v.label || v.key)) })
|
||||
var inp = el('input', { class: 'iwb-input iwb-plp-nin', placeholder: v.desc || v.def || ('填写 ' + (v.label || v.key)) })
|
||||
inp.value = String((d.vars && d.vars[v.key]) || v.def || '')
|
||||
inp.addEventListener('input', function () { scheduleUpdate(st, d) })
|
||||
st.inputs[v.key] = inp
|
||||
@@ -1734,6 +1895,12 @@
|
||||
st.vars.appendChild(row)
|
||||
})
|
||||
if (!defs.length) st.vars.appendChild(el('div', { class: 'iwb-plp-nempty', text: '正文里没有 {变量}' }))
|
||||
try {
|
||||
var vv = {}
|
||||
Object.keys(st.inputs).forEach(function (k) { vv[k] = st.inputs[k].value })
|
||||
var clean = outputText(String(d.tpl || ''), vv)
|
||||
if (d.text !== clean && props && typeof props.onUpdate === 'function') props.onUpdate(node.id, { text: clean })
|
||||
} catch (e) { /* ignore */ }
|
||||
}
|
||||
// 缩略图:封面可能是 dataURL,也可能是插件文件引用
|
||||
var cover = d.cover
|
||||
@@ -1762,7 +1929,7 @@
|
||||
st.timer = setTimeout(function () {
|
||||
var vals = {}
|
||||
Object.keys(st.inputs).forEach(function (k) { vals[k] = st.inputs[k].value })
|
||||
var patch = { vars: vals, text: fillTpl(String(d.tpl || ''), vals) }
|
||||
var patch = { vars: vals, text: outputText(String(d.tpl || ''), vals) }
|
||||
try { st.props.onUpdate(st.node.id, patch) } catch (e) { /* ignore */ }
|
||||
}, 300)
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"id": "promptlib",
|
||||
"name": "提示词库",
|
||||
"version": "1.6.18",
|
||||
"version": "1.8.8",
|
||||
"apiVersion": 1,
|
||||
"main": "main.js",
|
||||
"style": "styles.css",
|
||||
@@ -13,7 +13,7 @@
|
||||
"提示词"
|
||||
],
|
||||
"files": {
|
||||
"main.js": "0efdfbbfe7e9318610bb94330c0a3c361a0aa38f2b3a44c243c872f0e02a09e8",
|
||||
"styles.css": "1fdad04e2ffe1c8ba2a991a88072f780b65238096f9ccd1b5adba671ff2c9cb3"
|
||||
"main.js": "91fde4bcfa888b04ee2b0e79a05d951a56247bc76ecd11b5d9500131df11d542",
|
||||
"styles.css": "70cc02f98bed580f70ef9c71009dde29e01a92684c28d69016438d49c1e0a95b"
|
||||
}
|
||||
}
|
||||
@@ -36,7 +36,7 @@
|
||||
.iwb-plp-t {
|
||||
position: absolute; left: 0; right: 0; bottom: 0; padding: 16px 7px 6px;
|
||||
background: linear-gradient(to bottom, rgba(0,0,0,0), rgba(0,0,0,.66));
|
||||
color: #fff; font-size: 10.5px; line-height: 1.35; max-height: 48%;
|
||||
color: var(--iwb-text, #fff); font-size: 10.5px; line-height: 1.35; max-height: 48%;;
|
||||
display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden;
|
||||
text-shadow: 0 1px 2px rgba(0,0,0,.35);
|
||||
}
|
||||
@@ -389,3 +389,166 @@ box-shadow: 0 24px 60px rgba(0,0,0,.32);
|
||||
.iwb-plp-node:not(.is-selected) input{pointer-events:none}
|
||||
.iwb-plp-card{user-select:none}
|
||||
body.iwb-plp-dragging, body.iwb-plp-dragging *{user-select:none!important;-webkit-user-select:none!important}
|
||||
.iwb-plp-placeghost{border-style:dashed!important;pointer-events:none}
|
||||
.iwb-plp-placehint{font-size:10.5px;color:var(--iwb-plp-accent,#5a4bd0);margin-top:2px}
|
||||
.iwb-plp-placebox{position:fixed;left:-9999px;top:0;z-index:99999;pointer-events:none;border:2px dashed var(--iwb-plp-accent,#6b4dff);border-radius:12px;background:color-mix(in srgb,var(--iwb-plp-accent,#6b4dff) 9%,transparent);display:flex;align-items:center;justify-content:center;box-shadow:0 10px 26px rgba(30,20,80,.10)}
|
||||
.iwb-plp-placebox-t{font-size:12px;color:var(--iwb-plp-accent,#5a3fd0);background:rgba(255,255,255,.82);border-radius:999px;padding:3px 10px}
|
||||
/* v1.6.23:放置指示改为灰色小方框 */
|
||||
.iwb-plp-placebox{border: 2px dashed var(--iwb-plugin-border, #9aa3ad);border-radius:10px;background:rgba(122,130,142,.10);box-shadow:none};
|
||||
.iwb-plp-placebox-t{font-size: 11px;color:var(--iwb-plugin-border, #6b7280);background:rgba(255,255,255,.75);padding:2px 8px};
|
||||
/* v1.7.0:编辑面板三栏 + 可拖宽;详情封面放大、变量高亮 */
|
||||
.iwb-plp-eleft{flex:0 0 236px;width:236px}
|
||||
.iwb-plp-emid{flex:1 1 auto;min-width:220px;display:flex;flex-direction:column;min-height:0}
|
||||
.iwb-plp-emid .iwb-plp-etext{flex:1 1 auto;min-height:0;resize:none}
|
||||
.iwb-plp-esplit{flex:0 0 10px;cursor:col-resize;display:flex;align-items:center;justify-content:center;border-radius:6px;background:var(--iwb-plugin-inset,#f3f4f7)}
|
||||
.iwb-plp-esplit:hover{background:var(--iwb-plugin-hover,#e9ecf1)}
|
||||
.iwb-plp-eright{flex:0 0 auto;width:300px;min-width:190px;max-width:460px;display:flex;flex-direction:column;min-height:0;background:var(--iwb-plugin-surface,#fafbfc);border:1px solid var(--iwb-border,#e6e8ec);border-radius:10px;padding:8px}
|
||||
.iwb-plp-vars{flex:1 1 auto;min-height:0;display:flex;flex-direction:column}
|
||||
.iwb-plp-vrows{flex:1 1 auto;min-height:0;overflow:auto}
|
||||
.iwb-plp-vitem{padding:4px 0;border-bottom:1px dashed var(--iwb-border,#eceef2)}
|
||||
.iwb-plp-vrow2{display:flex;align-items:center;gap:6px}
|
||||
.iwb-plp-vname{flex:1 1 auto;min-width:0;height:32px}
|
||||
.iwb-plp-vi{flex:0 0 auto;width:24px;height:24px;padding:0;border-radius:50%;border:1px solid var(--iwb-border,#dfe3e9);background:var(--iwb-plugin-surface, #fff);color:var(--iwb-text, #9aa1ac);font-size:11px;line-height:22px;text-align:center}
|
||||
.iwb-plp-vi.is-open{background: var(--iwb-plugin-border, #f1ecff);border-color:var(--iwb-plugin-border, #d8cbff);color:var(--iwb-plugin-border, #5a3fd0)};
|
||||
.iwb-plp-vdesc{width: 100%;height:28px;margin-top:5px;border-style:dashed;background:var(--iwb-plugin-border, #fbfcfd);font-size:11.5px;color:var(--iwb-plugin-border, #6b7280)};
|
||||
.iwb-plp-dcov{flex:0 0 auto;width:180px;height:180px;border-radius:12px;overflow:hidden}
|
||||
.iwb-plp-dvar{background: var(--iwb-plugin-border, #f1ecff);color:var(--iwb-plugin-border, #5a3fd0);border-radius:4px;padding:0 4px;font-weight:500};
|
||||
/* v1.7.1:编辑面板视觉精修——输入框比底色更亮、去多余边框、细分隔线 */
|
||||
.iwb-plp-dialog .iwb-plp-dbody{gap: 10px;padding:12px;background:var(--iwb-plugin-border, #f4f5f7)};
|
||||
.iwb-plp-dialog .iwb-plp-eleft{flex: 0 0 236px;width:236px;background:var(--iwb-plugin-border, #fff);border:1px solid var(--iwb-plugin-border, #e6e8ec);border-radius:12px;padding:12px};
|
||||
.iwb-plp-dialog .iwb-plp-emid{background: var(--iwb-plugin-border, #fff);border:1px solid var(--iwb-plugin-border, #e6e8ec);border-radius:12px;padding:10px 12px 12px};
|
||||
.iwb-plp-dialog .iwb-plp-emid .iwb-plp-etext{border: 1px solid var(--iwb-plugin-border, #eef0f3);background:var(--iwb-plugin-border, #fbfcfd);border-radius:9px;padding:10px 12px};
|
||||
.iwb-plp-dialog .iwb-plp-emid .iwb-plp-etext: focus{background:var(--iwb-plugin-border, #fff);border-color:var(--iwb-plugin-border, #cfc3ff);box-shadow:0 0 0 3px rgba(107,77,255,.08)};
|
||||
.iwb-plp-dialog .iwb-plp-esplit{flex:0 0 6px;background:transparent;border-radius:4px}
|
||||
.iwb-plp-dialog .iwb-plp-esplit: hover{background:var(--iwb-plugin-border, #e7e9ee)};
|
||||
.iwb-plp-dialog .iwb-plp-esplit: :before{content:'';display:block;width:2px;height:30px;border-radius:2px;background:var(--iwb-plugin-border, #d7dbe2)};
|
||||
.iwb-plp-dialog .iwb-plp-eright{background:transparent;border:0;padding:2px 0 0}
|
||||
.iwb-plp-dialog .iwb-plp-vitem{border:0;padding:2px 0}
|
||||
.iwb-plp-dialog .iwb-plp-vrow2{gap:6px}
|
||||
.iwb-plp-dialog .iwb-plp-vname{background: var(--iwb-plugin-border, #fbfcfd);border:1px solid var(--iwb-plugin-border, #eceef2);border-radius:8px;height:32px;padding:0 10px;font-size:12.5px;color:var(--iwb-plugin-border, #33383f)};
|
||||
.iwb-plp-dialog .iwb-plp-vname: focus{background:var(--iwb-plugin-border, #fff);border-color:var(--iwb-plugin-border, #cfc3ff);box-shadow:0 0 0 3px rgba(107,77,255,.08)};
|
||||
.iwb-plp-dialog .iwb-plp-vi{background: transparent;border:0;color:var(--iwb-plugin-border, #aab0ba);width:22px;height:22px;line-height:20px};
|
||||
.iwb-plp-dialog .iwb-plp-vi: hover{background:var(--iwb-plugin-border, #eef0f4);color:var(--iwb-plugin-border, #6b7280)};
|
||||
.iwb-plp-dialog .iwb-plp-vi.is-open{background: var(--iwb-plugin-border, #f1ecff);color:var(--iwb-plugin-border, #5a3fd0)};
|
||||
.iwb-plp-dialog .iwb-plp-vdesc{background: var(--iwb-plugin-border, #fbfcfd);border:1px dashed var(--iwb-plugin-border, #e2e6ec);border-radius:7px;height:28px;margin-top:4px};
|
||||
.iwb-plp-dialog .iwb-plp-lrow span{color: var(--iwb-plugin-border, #8a919c);font-size:11.5px};
|
||||
.iwb-plp-dialog .iwb-plp-lrow .iwb-input{background: var(--iwb-plugin-border, #fbfcfd);border:1px solid var(--iwb-plugin-border, #eceef2);border-radius:8px;height:32px};
|
||||
.iwb-plp-dialog .iwb-plp-lrow .iwb-input: focus{background:var(--iwb-plugin-border, #fff);border-color:var(--iwb-plugin-border, #cfc3ff)};
|
||||
/* v1.7.2:正文变量高亮(黑粗)+ 说明灰按钮 + 说明背景回归面板底 */
|
||||
.iwb-plp-ewrap{position: relative;flex:1 1 auto;min-height:0;display:flex;border-radius:9px;background:var(--iwb-plugin-border, #fbfcfd);border:1px solid var(--iwb-plugin-border, #eef0f3)};
|
||||
.iwb-plp-ewrap: focus-within{background:var(--iwb-plugin-border, #fff);border-color:var(--iwb-plugin-border, #cfc3ff);box-shadow:0 0 0 3px rgba(107,77,255,.08)};
|
||||
.iwb-plp-ewrap .iwb-plp-etext{flex: 1 1 auto;min-height:0;border:0;background:transparent;box-shadow:none;color:transparent;caret-color:var(--iwb-plugin-border, #1d2129);position:relative;z-index:1;resize:none};
|
||||
.iwb-plp-ewrap .iwb-plp-etext:focus{background:transparent;border:0;box-shadow:none}
|
||||
.iwb-plp-hl{position: absolute;inset:0;padding:10px 12px;overflow:hidden;white-space:pre-wrap;word-wrap:break-word;font-size:13px;line-height:1.9;color:var(--iwb-plugin-border, #5b6472);pointer-events:none;z-index:0};
|
||||
.iwb-plp-hlvar{color: var(--iwb-plugin-border, #1d2129);font-weight:600};
|
||||
.iwb-plp-dialog .iwb-plp-vi.is-open{background: var(--iwb-plugin-border, #eef0f3);color:var(--iwb-plugin-border, #5b6472)};
|
||||
.iwb-plp-dialog .iwb-plp-vdesc{background: transparent;border:1px dashed var(--iwb-plugin-border, #dfe3e9)};
|
||||
.iwb-plp-dvar{background: transparent;color:var(--iwb-plugin-border, #1d2129);font-weight:600;padding:0};
|
||||
.iwb-plp-hres{height:6px;margin:-3px 0 0;cursor:ns-resize;flex:0 0 auto;border-radius:3px}
|
||||
.iwb-plp-hres: hover{background:var(--iwb-plugin-border, #e7e9ee)};
|
||||
/* 正文可见性:textarea 透明,显示下方高亮层 */
|
||||
.iwb-plp-dialog .iwb-plp-emid .iwb-plp-ewrap{flex: 1 1 auto;min-height:0;position:relative;display:flex;background:var(--iwb-plugin-border, #fbfcfd);border:1px solid var(--iwb-plugin-border, #eef0f3);border-radius:9px};
|
||||
.iwb-plp-dialog .iwb-plp-emid .iwb-plp-ewrap .iwb-plp-etext{background:transparent!important;color:transparent!important;border:0!important;box-shadow:none!important;padding:10px 12px}
|
||||
.iwb-plp-dialog .iwb-plp-hl{padding:10px 12px;font-size:13px;line-height:1.9}
|
||||
.iwb-plp-namebox{min-height:34px;height:34px;line-height:1.45;padding:7px 10px;resize:vertical;overflow:auto;font-size:12.5px}
|
||||
.iwb-plp-insvar{color: var(--iwb-plugin-border, #1d2129)!important;background:var(--iwb-plugin-border, #fff)!important;border-color:var(--iwb-plugin-border, #e2e6ec)!important};
|
||||
.iwb-plp-insvar: hover{background:var(--iwb-plugin-border, #f4f6f9)!important};
|
||||
/* v1.7.5:编辑封面卡在框内;详情封面放大 */
|
||||
.iwb-plp-dialog .iwb-plp-ecov{width:100%;height:250px;overflow:hidden;border-radius:12px;background:var(--iwb-plugin-inset,#f3f4f7)}
|
||||
.iwb-plp-dialog .iwb-plp-ecov .iwb-plp-cover{width:100%;height:100%;object-fit:cover;object-position:center;display:block;border-radius:12px}
|
||||
.iwb-plp-dialog-detail .iwb-plp-dbody{align-items:flex-start}
|
||||
.iwb-plp-dialog .iwb-plp-dcov{width:264px;height:264px;flex:0 0 auto;overflow:hidden;border-radius:12px;background:var(--iwb-plugin-inset,#f3f4f7)}
|
||||
.iwb-plp-dialog .iwb-plp-dcov .iwb-plp-cover{width:100%;height:100%;object-fit:cover;object-position:center;display:block;border-radius:12px}
|
||||
/* v1.7.6:封面完整展示(contain),不裁剪 */
|
||||
.iwb-plp-dialog .iwb-plp-ecov .iwb-plp-cover{object-fit:contain;background:transparent}
|
||||
.iwb-plp-dialog .iwb-plp-dcov .iwb-plp-cover{object-fit:contain;background:transparent}
|
||||
.iwb-plp-dialog .iwb-plp-ecov{background:var(--iwb-plugin-inset,#f3f4f7)}
|
||||
.iwb-plp-dialog .iwb-plp-dcov{background:var(--iwb-plugin-inset,#f3f4f7)}
|
||||
/* v1.7.7:编辑区文字层与高亮层使用完全一致的字体度量,修复光标/选区错位 */
|
||||
.iwb-plp-dialog .iwb-plp-emid .iwb-plp-ewrap .iwb-plp-etext,
|
||||
.iwb-plp-dialog .iwb-plp-emid .iwb-plp-hl{
|
||||
font-family:-apple-system,BlinkMacSystemFont,'PingFang SC','Helvetica Neue',system-ui,sans-serif!important;
|
||||
font-size:13px!important;
|
||||
line-height:1.85!important;
|
||||
letter-spacing:0!important;
|
||||
padding:10px 12px!important;
|
||||
margin:0!important;
|
||||
border:0!important;
|
||||
box-sizing:border-box!important;
|
||||
white-space:pre-wrap!important;
|
||||
overflow-wrap:break-word!important;
|
||||
word-break:break-word!important;
|
||||
tab-size:4!important;
|
||||
}
|
||||
.iwb-plp-dialog .iwb-plp-emid .iwb-plp-ewrap .iwb-plp-etext{overflow-y:auto!important;scrollbar-gutter:stable}
|
||||
.iwb-plp-dialog .iwb-plp-emid .iwb-plp-hl{overflow:hidden!important}
|
||||
/* v1.7.9:详情正文独立滚动,长文不再压到底部按钮 */
|
||||
.iwb-plp-dialog-detail .iwb-plp-dbody{overflow:hidden;align-items:stretch}
|
||||
.iwb-plp-dialog-detail .iwb-plp-dright{flex:1 1 auto;min-width:0;min-height:0;display:flex;flex-direction:column;overflow:hidden}
|
||||
.iwb-plp-dialog-detail .iwb-plp-dtext{flex:1 1 auto;min-height:0;overflow:auto;padding-right:10px;margin-bottom:6px}
|
||||
/* v1.8.0:详情标题/分组/标签移到封面下方;编辑标签改为输入+加号 */
|
||||
.iwb-plp-dialog-detail .iwb-plp-dbody{align-items:flex-start}
|
||||
.iwb-plp-dleftcol{flex:0 0 264px;width:264px;display:flex;flex-direction:column;min-width:0}
|
||||
.iwb-plp-dtitle{font-size:18px;font-weight:650;line-height:1.35;margin-top:14px;color:var(--iwb-text,#1d2129)}
|
||||
.iwb-plp-dmeta{display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin-top:8px}
|
||||
.iwb-plp-dgroup{font-size: 11.5px;background:var(--iwb-plugin-border, #eef0f4);color:var(--iwb-plugin-border, #5b6472);border-radius:999px;padding:2px 9px};
|
||||
.iwb-plp-dtag{font-size: 11.5px;background:var(--iwb-plugin-border, #f4f0ff);color:var(--iwb-plugin-border, #5a3fd0);border-radius:999px;padding:2px 9px};
|
||||
.iwb-plp-dlen{font-size: 11.5px;color:var(--iwb-plugin-border, #9aa1ac)};
|
||||
.iwb-plp-tagwrap{display:flex;flex-direction:column;gap:6px;flex:1;min-width:0}
|
||||
.iwb-plp-tagchips{display:flex;flex-wrap:wrap;gap:5px}
|
||||
.iwb-plp-tagchip{display: inline-flex;align-items:center;gap:4px;font-size:11.5px;background:var(--iwb-plugin-border, #eef0f4);border-radius:999px;padding:2px 8px;color:var(--iwb-plugin-border, #3f4450)};
|
||||
.iwb-plp-tagx{cursor: pointer;color:var(--iwb-plugin-border, #9aa1ac);font-style:normal};
|
||||
.iwb-plp-tagx: hover{color:var(--iwb-plugin-border, #c0392b)};
|
||||
.iwb-plp-tagrow{display:flex;gap:6px}
|
||||
.iwb-plp-tagin{flex:1;min-width:0;height:30px}
|
||||
.iwb-plp-lrow-tags{align-items:flex-start}
|
||||
.iwb-plp-tagadd{flex:0 0 auto;width:30px;height:30px;padding:0;font-size:15px;line-height:28px}
|
||||
/* v1.8.1:详情标题/分组/标签左对齐并带标题;标签加号对齐修复 */
|
||||
.iwb-plp-dtitle{font-size:20px;font-weight:650;line-height:1.35;margin-top:16px;color:var(--iwb-text,#1d2129)}
|
||||
.iwb-plp-dmeta{display:flex;flex-direction:column;gap:7px;margin-top:12px;align-items:flex-start}
|
||||
.iwb-plp-dmrow{display:flex;align-items:center;gap:10px;width:100%}
|
||||
.iwb-plp-dmk{flex: 0 0 30px;width:30px;font-size:11.5px;color:var(--iwb-plugin-border, #9aa1ac)};
|
||||
.iwb-plp-dmv{display:flex;flex-wrap:wrap;align-items:center;gap:5px;min-width:0}
|
||||
.iwb-plp-dgroup{font-size: 12px;color:var(--iwb-plugin-border, #3f4450);background:var(--iwb-plugin-border, #f2f4f7);border-radius:6px;padding:2px 9px};
|
||||
.iwb-plp-dtag{font-size: 11.5px;color:var(--iwb-plugin-border, #5a3fd0);background:var(--iwb-plugin-border, #f4f0ff);border-radius:6px;padding:2px 9px};
|
||||
.iwb-plp-dempty{font-size: 12px;color:var(--iwb-plugin-border, #b3b9c2)};
|
||||
.iwb-plp-dlen{font-size: 12px;color:var(--iwb-plugin-border, #8a919c)};
|
||||
.iwb-plp-tagrow{display:flex;align-items:center;gap:6px}
|
||||
.iwb-plp-tagin{height:30px;border-radius:8px}
|
||||
.iwb-plp-tagadd{flex: 0 0 auto;width:30px;height:30px;padding:0;border-radius:8px;background:var(--iwb-plugin-border, #f2f4f7);border:1px solid var(--iwb-plugin-border, #e2e6ec);color:var(--iwb-plugin-border, #5b6472);font-size:16px;line-height:1;display:inline-flex;align-items:center;justify-content:center};
|
||||
.iwb-plp-tagadd: hover{background:var(--iwb-plugin-border, #e9ecf1)};
|
||||
/* v1.8.2:详情左右两栏卡片化 + 分割线 */
|
||||
.iwb-plp-dialog-detail .iwb-plp-dbody{gap: 14px;padding:16px;background:var(--iwb-plugin-border, #f4f5f7)};
|
||||
.iwb-plp-dialog-detail .iwb-plp-dleftcol{flex: 0 0 300px;width:300px;padding:12px;border:1px solid var(--iwb-plugin-border, #e8eaee);border-radius:14px;background:var(--iwb-plugin-border, #fff);align-self:flex-start};
|
||||
.iwb-plp-dialog-detail .iwb-plp-dcov{width:100%;height:270px;border-radius:10px}
|
||||
.iwb-plp-dialog-detail .iwb-plp-dtitle{font-size:20px;font-weight:650;line-height:1.35;margin-top:14px;color:var(--iwb-text,#1d2129)}
|
||||
.iwb-plp-dialog-detail .iwb-plp-dmeta{margin-top: 12px;padding-top:12px;border-top:1px solid var(--iwb-plugin-border, #eef0f3);gap:8px};
|
||||
.iwb-plp-dialog-detail .iwb-plp-dright{flex: 1 1 auto;min-width:0;min-height:0;display:flex;flex-direction:column;padding:14px 16px;border:1px solid var(--iwb-plugin-border, #e8eaee);border-radius:14px;background:var(--iwb-plugin-border, #fff);overflow:hidden};
|
||||
.iwb-plp-dsec{font-size: 11.5px;font-weight:600;color:var(--iwb-plugin-border, #8a919c);letter-spacing:.04em;padding-bottom:8px;margin-bottom:8px;border-bottom:1px solid var(--iwb-plugin-border, #eef0f3);flex:0 0 auto};
|
||||
.iwb-plp-dialog-detail .iwb-plp-dtext{flex: 1 1 auto;min-height:0;overflow:auto;padding-right:10px;font-size:13.5px;line-height:2;color:var(--iwb-plugin-border, #3a4048)};
|
||||
/* v1.8.3:详情左卡片撑到底、四边等距;正文恢复滚动不被底部遮挡 */
|
||||
.iwb-plp-dialog-detail{display:flex;flex-direction:column;overflow:hidden}
|
||||
.iwb-plp-dialog-detail .iwb-plp-dbody{display: flex;flex:1 1 auto;min-height:0;overflow:hidden;gap:14px;padding:16px;background:var(--iwb-plugin-border, #f4f5f7)};
|
||||
.iwb-plp-dialog-detail .iwb-plp-dleftcol{align-self: stretch;display:flex;flex-direction:column;overflow:auto;padding:12px;border:1px solid var(--iwb-plugin-border, #e8eaee);border-radius:14px;background:var(--iwb-plugin-border, #fff)};
|
||||
.iwb-plp-dialog-detail .iwb-plp-dright{flex: 1 1 auto;min-width:0;min-height:0;overflow:hidden;display:flex;flex-direction:column;padding:14px 16px;border:1px solid var(--iwb-plugin-border, #e8eaee);border-radius:14px;background:var(--iwb-plugin-border, #fff)};
|
||||
.iwb-plp-dialog-detail .iwb-plp-dtext{flex:1 1 auto;min-height:0;overflow-y:auto;overflow-x:hidden;scrollbar-width:thin;padding-right:8px}
|
||||
.iwb-plp-dialog-detail .iwb-plp-dfooter{flex:0 0 auto}
|
||||
/* v1.8.4:右卡片纵向拉伸填满,正文出现滚动条 */
|
||||
.iwb-plp-dialog-detail .iwb-plp-dbody{align-items:stretch!important}
|
||||
.iwb-plp-dialog-detail .iwb-plp-dright{align-self:stretch!important;height:100%;max-height:100%;overflow:hidden!important}
|
||||
.iwb-plp-dialog-detail .iwb-plp-dtext{flex:1 1 0;min-height:0;overflow-y:auto!important;overflow-x:hidden}
|
||||
/* v1.8.7:详情标题缩小;分组/标签去底色;元信息加分割线与行高 */
|
||||
.iwb-plp-dialog-detail .iwb-plp-dtitle{font-size:17px!important;font-weight:650;margin-top:12px}
|
||||
.iwb-plp-dialog-detail .iwb-plp-dmeta{margin-top: 12px;padding-top:14px;border-top:1px solid var(--iwb-plugin-border, #eef0f3);gap:10px};
|
||||
.iwb-plp-dialog-detail .iwb-plp-dmrow{gap:6px}
|
||||
.iwb-plp-dialog-detail .iwb-plp-dmk{flex: 0 0 auto;width:auto;font-size:12px;line-height:1.6;color:var(--iwb-plugin-border, #9aa1ac)};
|
||||
.iwb-plp-dialog-detail .iwb-plp-dgroup,.iwb-plp-dialog-detail .iwb-plp-dtag{background: transparent!important;padding:0!important;border-radius:0!important;font-size:12.5px;line-height:1.6;color:var(--iwb-plugin-border, #2f3540)};
|
||||
.iwb-plp-dialog-detail .iwb-plp-dtag{color: var(--iwb-plugin-border, #5a3fd0);};
|
||||
.iwb-plp-dialog-detail .iwb-plp-dlen{font-size: 12.5px;line-height:1.6;color:var(--iwb-plugin-border, #2f3540)};
|
||||
/* v1.8.8:详情标题 14px;元信息行间浅分割线;封面底色更接近白色(编辑/详情统一) */
|
||||
.iwb-plp-dialog-detail .iwb-plp-dtitle{font-size:14px!important;font-weight:650;line-height:1.5;margin-top:12px}
|
||||
.iwb-plp-dialog-detail .iwb-plp-dmeta{gap:0}
|
||||
.iwb-plp-dialog-detail .iwb-plp-dmrow{padding: 7px 0;border-bottom:1px solid var(--iwb-plugin-border, #f3f5f8)};
|
||||
.iwb-plp-dialog-detail .iwb-plp-dmrow:last-child{border-bottom:0}
|
||||
.iwb-plp-dialog .iwb-plp-dcov,.iwb-plp-dialog .iwb-plp-ecov{background: var(--iwb-plugin-border, #fcfcfd)!important};
|
||||
.iwb-plp-dialog .iwb-plp-dcov .iwb-plp-cover,.iwb-plp-dialog .iwb-plp-ecov .iwb-plp-cover{background:transparent!important}
|
||||
+2
-2
@@ -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.26.39-mwrxcd5p">
|
||||
<link rel="stylesheet" href="/assets/style.css?v=3.26.40-mws31ebx">
|
||||
<style>
|
||||
.devdoc{max-width:860px;margin:0 auto;padding:40px 0 72px;color:var(--ink,#1b1f24);font-size:15px;line-height:1.75}
|
||||
.devdoc h1{font-size:38px;line-height:1.2;margin:8px 0 18px}
|
||||
@@ -31,7 +31,7 @@
|
||||
</div>
|
||||
<div class="right">
|
||||
<a class="btn" href="/plugins/">插件市场</a>
|
||||
<a class="btn primary" href="/download/">下载 v3.26.39</a>
|
||||
<a class="btn primary" href="/download/">下载 v3.26.40</a>
|
||||
</div>
|
||||
</div></nav>
|
||||
<main>
|
||||
|
||||
@@ -55,13 +55,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.26.39 · 8.4 MB · .dmg<div class="hash">sha256 15e9c10f31caea3a…</div></div>
|
||||
<a class="btn" href="/updates/darwin-aarch64/image-workbench_3.26.39_aarch64.dmg?h=15e9c10f31ca">下载</a>
|
||||
<div class="meta">版本 3.26.40 · 8.4 MB · .dmg<div class="hash">sha256 165f48fa6c2d874f…</div></div>
|
||||
<a class="btn" href="/updates/darwin-aarch64/image-workbench_3.26.40_aarch64.dmg?h=165f48fa6c2d">下载</a>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="name">macOS · Intel<div class="hint">x86_64</div></div>
|
||||
<div class="meta">版本 3.26.39 · 8.8 MB · .dmg<div class="hash">sha256 1016831ad95f21be…</div></div>
|
||||
<a class="btn" href="/updates/darwin-x86_64/image-workbench_3.26.39_x64.dmg?h=1016831ad95f">下载</a>
|
||||
<div class="meta">版本 3.26.40 · 8.8 MB · .dmg<div class="hash">sha256 6890b428aee6233c…</div></div>
|
||||
<a class="btn" href="/updates/darwin-x86_64/image-workbench_3.26.40_x64.dmg?h=6890b428aee6">下载</a>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="name">Windows · x64<div class="hint">需要 WebView2</div></div>
|
||||
@@ -96,8 +96,12 @@
|
||||
|
||||
<h2>历史版本</h2>
|
||||
<div class="row">
|
||||
<div class="name">3.26.39<div class="hint">Intel 版:同一版本</div></div>
|
||||
<div class="meta">2026-11-22<div class="hint">macOS · Apple Silicon / macOS · Intel</div></div>
|
||||
<div class="name">3.26.40<div class="hint">Intel 版:同一版本</div></div>
|
||||
<div class="meta">2026-11-23<div class="hint">macOS · Apple Silicon / macOS · Intel</div></div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="name">3.26.39<div class="hint">v3.26.39:修正插件插入落点与封面插入(拖拽落点按节点宽高居中到鼠标、插入落到画布可视中心、封面先解析为 dataURL 再插入)</div></div>
|
||||
<div class="meta">2026-11-22<div class="hint">macOS · Apple Silicon / macOS · Intel / Windows · x64</div></div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="name">3.26.38<div class="hint">Intel 版:同一版本</div></div>
|
||||
|
||||
+8
-8
@@ -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.26.39-mwrxcd5p">
|
||||
<link rel="stylesheet" href="/assets/style.css?v=3.26.40-mws31ebx">
|
||||
</head><body>
|
||||
<nav><div class="wrap inner">
|
||||
<a class="brand" href="/"><span class="dot">IW</span>Image Workbench</a>
|
||||
@@ -15,19 +15,19 @@
|
||||
</div>
|
||||
<div class="right">
|
||||
<a class="btn" href="/plugins/">插件市场</a>
|
||||
<a class="btn primary" href="/download/">下载 v3.26.39</a>
|
||||
<a class="btn primary" href="/download/">下载 v3.26.40</a>
|
||||
</div>
|
||||
</div></nav>
|
||||
<main>
|
||||
<section class="hero hero-art">
|
||||
<div class="hero-bg"><img src="/assets/painting.jpg?v=3.26.39-mwrxcd5p" alt=""></div>
|
||||
<div class="hero-bg"><img src="/assets/painting.jpg?v=3.26.40-mws31ebx" alt=""></div>
|
||||
<div class="hero-veil"></div>
|
||||
<div class="wrap">
|
||||
<span class="kicker">v3.26.39 · macOS / Windows · 数据在本地</span>
|
||||
<span class="kicker">v3.26.40 · macOS / Windows · 数据在本地</span>
|
||||
<h1>本地优先的<br>AI 生图无限画布</h1>
|
||||
<p class="sub">用节点把「参考图 → 提示词 → 批量生成 → 图库」串成一条生产线。<br>图片、提示词、模型配置全部留在你自己的电脑里,插件按需安装。</p>
|
||||
<div class="cta">
|
||||
<a class="btn primary lg" href="/download/">下载 v3.26.39</a>
|
||||
<a class="btn primary lg" href="/download/">下载 v3.26.40</a>
|
||||
<a class="btn lg" href="/plugins/">浏览 11 个插件</a>
|
||||
</div>
|
||||
<div class="meta">支持 macOS 12+ 与 Windows 10 1803+ · 安装包约 7 MB · 无需登录</div>
|
||||
@@ -83,7 +83,7 @@
|
||||
</div>
|
||||
<div class="pcard" data-name="提示词库 promptlib 右栏提示词列表:搜索/分组/收藏/新建编辑/插入画布/复制(数据由客户端提供) 资源 提示词" data-tags="资源,提示词">
|
||||
<div class="head"><span class="av" style="background:#eef2f6">📖</span>
|
||||
<div><div class="nm">提示词库</div><div class="ver">v1.6.18 · 官方</div></div></div>
|
||||
<div><div class="nm">提示词库</div><div class="ver">v1.8.8 · 官方</div></div></div>
|
||||
<div class="desc">右栏提示词列表:搜索/分组/收藏/新建编辑/插入画布/复制(数据由客户端提供)</div>
|
||||
<div class="tags"><span class="tag">资源</span><span class="tag">提示词</span></div>
|
||||
</div>
|
||||
@@ -94,8 +94,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.26.39_aarch64.dmg?h=15e9c10f31ca"><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.26.39_x64.dmg?h=1016831ad95f"><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.26.40_aarch64.dmg?h=165f48fa6c2d"><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.26.40_x64.dmg?h=6890b428aee6"><div class="n">macOS · Intel</div><div class="s">x86_64 · 8.8 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>
|
||||
|
||||
+11
-11
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"version": 2,
|
||||
"updatedAt": "2026-11-22T14:17:37.777Z",
|
||||
"updatedAt": "2026-11-22T15:51:05.074Z",
|
||||
"plugins": [
|
||||
{
|
||||
"id": "batch-export",
|
||||
@@ -180,26 +180,26 @@
|
||||
"资源",
|
||||
"提示词"
|
||||
],
|
||||
"version": "1.6.18",
|
||||
"version": "1.8.8",
|
||||
"apiVersion": 1,
|
||||
"bundle": "plugins/promptlib-1.6.18.zip",
|
||||
"bundleSize": 122581,
|
||||
"bundleSha256": "7397f802ad45110ecdc18cefe908921a8305e46580af0cad5de379f4058817e9",
|
||||
"bundle": "plugins/promptlib-1.8.8.zip",
|
||||
"bundleSize": 146066,
|
||||
"bundleSha256": "af91d59add3df05c390c6ead566663545acaf1200461185668750422360a2f6f",
|
||||
"files": [
|
||||
{
|
||||
"path": "manifest.json",
|
||||
"sha256": "fdcee6bb4051a656186937fdd424139c282c45d4b3c8c47c0e4d0c426ec9c0f8",
|
||||
"size": 541
|
||||
"sha256": "667ddf6ddedab0ce3abbccbe3dfaa34c56bfa90179369c1c013e736ee5eb15e7",
|
||||
"size": 540
|
||||
},
|
||||
{
|
||||
"path": "main.js",
|
||||
"sha256": "0efdfbbfe7e9318610bb94330c0a3c361a0aa38f2b3a44c243c872f0e02a09e8",
|
||||
"size": 98119
|
||||
"sha256": "91fde4bcfa888b04ee2b0e79a05d951a56247bc76ecd11b5d9500131df11d542",
|
||||
"size": 106422
|
||||
},
|
||||
{
|
||||
"path": "styles.css",
|
||||
"sha256": "1fdad04e2ffe1c8ba2a991a88072f780b65238096f9ccd1b5adba671ff2c9cb3",
|
||||
"size": 23611
|
||||
"sha256": "82bdae857b0c6e66c0e1c9fa0ea47b269dcbde51cdfacd552e4b919cfa4576c7",
|
||||
"size": 38794
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
@@ -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.26.39-mwrxcd5p">
|
||||
<link rel="stylesheet" href="/assets/style.css?v=3.26.40-mws31ebx">
|
||||
</head><body>
|
||||
<nav><div class="wrap inner">
|
||||
<a class="brand" href="/"><span class="dot">IW</span>Image Workbench</a>
|
||||
@@ -14,7 +14,7 @@
|
||||
</div>
|
||||
<div class="right">
|
||||
<a class="btn" href="/plugins/">插件市场</a>
|
||||
<a class="btn primary" href="/download/">下载 v3.26.39</a>
|
||||
<a class="btn primary" href="/download/">下载 v3.26.40</a>
|
||||
</div>
|
||||
</div></nav>
|
||||
<main>
|
||||
@@ -77,7 +77,7 @@
|
||||
</div>
|
||||
<div class="pcard" data-name="提示词库 promptlib 右栏提示词列表:搜索/分组/收藏/新建编辑/插入画布/复制(数据由客户端提供) 资源 提示词" data-tags="资源,提示词">
|
||||
<div class="head"><span class="av" style="background:#eef2f6">📖</span>
|
||||
<div><div class="nm">提示词库</div><div class="ver">v1.6.18 · 官方</div></div></div>
|
||||
<div><div class="nm">提示词库</div><div class="ver">v1.8.8 · 官方</div></div></div>
|
||||
<div class="desc">右栏提示词列表:搜索/分组/收藏/新建编辑/插入画布/复制(数据由客户端提供)</div>
|
||||
<div class="tags"><span class="tag">资源</span><span class="tag">提示词</span></div>
|
||||
</div>
|
||||
|
||||
+30
-2
@@ -1,12 +1,33 @@
|
||||
{
|
||||
"app": "Image Workbench",
|
||||
"subtitle": "本地优先的 AI 生图无限画布 · 桌面版(Tauri v2)",
|
||||
"updatedAt": "2026-11-22T14:20:35.743Z",
|
||||
"updatedAt": "2026-11-22T17:00:01.778Z",
|
||||
"releases": [
|
||||
{
|
||||
"version": "3.26.40",
|
||||
"date": "2026-11-23",
|
||||
"notes": "Intel 版:同一版本",
|
||||
"platforms": {
|
||||
"darwin-aarch64": {
|
||||
"file": "updates/darwin-aarch64/image-workbench_3.26.40_aarch64.dmg",
|
||||
"size": 8790542,
|
||||
"sha256": "165f48fa6c2d874f18020b6b2e99cd3a40e0496ca3714f4d895263553896ae2b",
|
||||
"h": "165f48fa6c2d",
|
||||
"kind": "dmg"
|
||||
},
|
||||
"darwin-x86_64": {
|
||||
"file": "updates/darwin-x86_64/image-workbench_3.26.40_x64.dmg",
|
||||
"size": 9177668,
|
||||
"sha256": "6890b428aee6233c6093c091ea709468abeb0fa4b30abc3744bef45c28943a55",
|
||||
"h": "6890b428aee6",
|
||||
"kind": "dmg"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"version": "3.26.39",
|
||||
"date": "2026-11-22",
|
||||
"notes": "Intel 版:同一版本",
|
||||
"notes": "v3.26.39:修正插件插入落点与封面插入(拖拽落点按节点宽高居中到鼠标、插入落到画布可视中心、封面先解析为 dataURL 再插入)",
|
||||
"platforms": {
|
||||
"darwin-aarch64": {
|
||||
"file": "updates/darwin-aarch64/image-workbench_3.26.39_aarch64.dmg",
|
||||
@@ -21,6 +42,13 @@
|
||||
"sha256": "1016831ad95f21be55b1410c16a8bb51f29fe0799c6bd8980fadf0369424f3ff",
|
||||
"h": "1016831ad95f",
|
||||
"kind": "dmg"
|
||||
},
|
||||
"windows-x86_64": {
|
||||
"file": "updates/windows-x86_64/image-workbench_3.26.39_x64-setup.exe",
|
||||
"size": 5070508,
|
||||
"sha256": "b94166d04e5d53c3d805e6fc226a4725e1d27198d60b7947b90e4ace6a601ac1",
|
||||
"h": "b94166d04e5d",
|
||||
"kind": "exe"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
Generated
+2
-1
@@ -1983,7 +1983,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "image-workbench"
|
||||
version = "3.26.39"
|
||||
version = "3.26.40"
|
||||
dependencies = [
|
||||
"arboard",
|
||||
"base64 0.22.1",
|
||||
@@ -2002,6 +2002,7 @@ dependencies = [
|
||||
"tauri-plugin-single-instance",
|
||||
"tauri-plugin-updater",
|
||||
"url",
|
||||
"windows-sys 0.52.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "image-workbench"
|
||||
version = "3.26.39"
|
||||
version = "3.26.40"
|
||||
description = "无限画布 · 生图工作台桌面版"
|
||||
authors = ["malongan"]
|
||||
license = ""
|
||||
@@ -44,3 +44,7 @@ base64 = "0.22"
|
||||
# (Cargo.lock 里是同一个 0.6.x),这里显式依赖不会多编译一份。
|
||||
[target.'cfg(target_os = "macos")'.dependencies]
|
||||
objc2 = "0.6"
|
||||
|
||||
# Windows:直接读进程工作集(GetProcessMemoryInfo),不再启动 PowerShell 子进程
|
||||
[target.'cfg(windows)'.dependencies]
|
||||
windows-sys = { version = "0.52", features = ["Win32_Foundation", "Win32_System_ProcessStatus", "Win32_System_Threading"] }
|
||||
+7
-11
@@ -171,17 +171,13 @@ fn app_memory_mb() -> u64 {
|
||||
}
|
||||
#[cfg(windows)]
|
||||
{
|
||||
let script = format!("(Get-Process -Id {}).WorkingSet64", pid);
|
||||
let out = std::process::Command::new("powershell")
|
||||
.args(["-NoProfile", "-NonInteractive", "-Command", &script])
|
||||
.output();
|
||||
if let Ok(o) = out {
|
||||
if o.status.success() {
|
||||
let txt = String::from_utf8_lossy(&o.stdout);
|
||||
if let Ok(bytes) = txt.trim().parse::<u64>() {
|
||||
return bytes / (1024 * 1024);
|
||||
}
|
||||
}
|
||||
use windows_sys::Win32::System::ProcessStatus::{GetProcessMemoryInfo, PROCESS_MEMORY_COUNTERS};
|
||||
use windows_sys::Win32::System::Threading::GetCurrentProcess;
|
||||
let mut pmc: PROCESS_MEMORY_COUNTERS = unsafe { std::mem::zeroed() };
|
||||
pmc.cb = std::mem::size_of::<PROCESS_MEMORY_COUNTERS>() as u32;
|
||||
let ok = unsafe { GetProcessMemoryInfo(GetCurrentProcess(), &mut pmc, pmc.cb) };
|
||||
if ok != 0 {
|
||||
return (pmc.WorkingSetSize as u64) / (1024 * 1024);
|
||||
}
|
||||
0
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"$schema": "../node_modules/@tauri-apps/cli/config.schema.json",
|
||||
"productName": "image-workbench",
|
||||
"version": "3.26.39",
|
||||
"version": "3.26.40",
|
||||
"identifier": "com.malongan.imageworkbench",
|
||||
"build": {
|
||||
"frontendDist": "../dist",
|
||||
|
||||
@@ -47,6 +47,7 @@ const wait = (ms) => new Promise((r) => setTimeout(r, ms))
|
||||
onChanged: () => () => {},
|
||||
},
|
||||
canvasWrite: {
|
||||
createImageNode: (payload) => { calls.create.push({ type: 'img', payload }); return 'n-img' },
|
||||
createNode: (type, x, y, data) => { calls.create.push({ type, x, y, data }); return 'n1' },
|
||||
},
|
||||
canvas: {
|
||||
@@ -58,6 +59,10 @@ const wait = (ms) => new Promise((r) => setTimeout(r, ms))
|
||||
assert.ok(panel && typeof panel.mount === 'function', '应注册面板')
|
||||
|
||||
const host = window.document.getElementById('host')
|
||||
const plCanvas = window.document.createElement('div')
|
||||
plCanvas.className = 'iwb-canvas'
|
||||
window.document.body.appendChild(plCanvas)
|
||||
plCanvas.getBoundingClientRect = () => ({ left: 0, top: 0, right: 800, bottom: 600, width: 800, height: 600 })
|
||||
panel.mount(host) // 宿主只传一个参数
|
||||
await wait(60)
|
||||
|
||||
@@ -133,14 +138,21 @@ const wait = (ms) => new Promise((r) => setTimeout(r, ms))
|
||||
|
||||
// 插入画布按钮(+ 图标,title 含「插入到画布」)
|
||||
// 再点一次卡片 → 详情弹窗 → 底部「插入画布」
|
||||
const allChip = Array.from(host.querySelectorAll('.iwb-chip')).find((c) => c.textContent.indexOf('全部') === 0)
|
||||
if (allChip) allChip.click()
|
||||
await wait(30)
|
||||
assert.ok(cards().length > 0, '应有卡片可点')
|
||||
cards()[0].dispatchEvent(new window.MouseEvent('dblclick', { bubbles: true }))
|
||||
await wait(40)
|
||||
const dlg2 = window.document.querySelector('.iwb-plp-dialog')
|
||||
const insBtn = dlg2 ? Array.from(dlg2.querySelectorAll('.iwb-plp-dfooter button')).find((b) => b.textContent === '插入画布') : null
|
||||
assert.ok(insBtn, '卡片应有「插入到画布」按钮')
|
||||
insBtn.dispatchEvent(new window.MouseEvent('click', { bubbles: true }))
|
||||
await wait(50)
|
||||
assert.strictEqual(calls.insert.length, 1, '插入应调用 ctx.promptlib.insert')
|
||||
await wait(40)
|
||||
assert.ok(window.document.querySelector('.iwb-plp-placebox'), '插入画布应进入两步放置(出现放置框)')
|
||||
window.dispatchEvent(new window.KeyboardEvent('keydown', { key: 'Escape' }))
|
||||
await wait(20)
|
||||
assert.strictEqual(window.document.querySelector('.iwb-plp-placebox'), null, 'Esc 应取消放置')
|
||||
|
||||
// ---- v1.4.0 新增覆盖:封面渲染 / 插入封面图片 / 弹窗拖动缩放 ----
|
||||
// 1) 封面:mock coverUrl 返回一张 dataURL,卡片应出现 <img class=iwb-plp-cover>
|
||||
@@ -163,9 +175,12 @@ const wait = (ms) => new Promise((r) => setTimeout(r, ms))
|
||||
const imgBtn = dlgA && Array.from(dlgA.querySelectorAll('.iwb-plp-dfooter button')).find((b) => b.textContent === '插入图片')
|
||||
assert.ok(imgBtn, '有封面时详情应有「插入图片」按钮')
|
||||
imgBtn.dispatchEvent(new window.MouseEvent('click', { bubbles: true }))
|
||||
await wait(60)
|
||||
assert.strictEqual(inserted.length, 1, '应调用 promptlib.insertImage')
|
||||
await wait(40)
|
||||
assert.strictEqual(window.document.querySelector('.iwb-plp-dialog'), null, '插入图片后弹窗应关闭')
|
||||
assert.ok(window.document.querySelector('.iwb-plp-placebox'), '插入图片应进入两步放置')
|
||||
plCanvas.dispatchEvent(new window.MouseEvent('pointerdown', { bubbles: true, clientX: 300, clientY: 200 }))
|
||||
await wait(30)
|
||||
assert.ok(calls.create.some((c) => c.type === 'img'), '点击画布应调用 createImageNode')
|
||||
|
||||
// 3) 弹窗拖动 + 缩放:标题栏拖动改变 left,右下角拖拽改变 width(且不小于 640)
|
||||
window.document.querySelector('#host .iwb-plp-card').dispatchEvent(new window.MouseEvent('dblclick', { bubbles: true }))
|
||||
|
||||
Reference in new issue
Block a user