release: v3.26.39(插入落点居中/封面插入/拖拽禁选)+ promptlib 1.6.18

This commit is contained in:
qiqi committed 2026-11-22 22:15:16 +08:00
1 parent 9739764d2f
commit 5e2f9dd876
9 files changed
+27 -22

No files matched your search

+6
View File
@@ -14,6 +14,12 @@
> 3. 核验正式地址版本 → 之后才移动 `stable` / `stable-verified-<日期>` 标签、更新本 CHANGELOG、写 GitHub Release(`gh release create`)。
> 测试发现问题 → 改 → 再 `deploy:test`,正式环境不受影响。回滚点 `git reset --hard stable`。
## v3.26.39(2026-11-22)修正插件插入落点与封面插入
- promptlib 1.6.18:拖拽落点按节点宽高居中到鼠标;详情「插入模板节点/插入画布/插入图片」落到画布可视中心;拖拽期间禁用文本选择。
- 宿主:新增 CanvasGeometry.promptCenterSpot,提示词/封面插入不再被左侧面板遮挡。
- 修复详情「插入图片」:封面文件先解析为 dataURL 再插入。
## v3.26.38(2026-11-22)插件节点交互修复 + 标注覆盖保留原图
### 提示词库(promptlib 1.6.16)
+2 -13
View File
@@ -5637,17 +5637,6 @@ const tbCenterSeed = (type, refs) => {
return orig ? { data: String(dataUrl), url: '', orig } : { data: String(dataUrl), url: '' }
}
// 插件「插入画布」落到可视区域中心:findSpot 会把节点丢到左上角(常被左侧面板遮住)。
function promptCenterSpot(bridge, w, h) {
try {
const c = document.querySelector('.iwb-canvas')
if (!c || !bridge || typeof bridge.screenToWorld !== 'function') return null
const r = c.getBoundingClientRect()
const p = bridge.screenToWorld(r.left + r.width / 2, r.top + r.height / 2)
return p ? { x: p.x - (w || 0) / 2, y: p.y - (h || 0) / 2 } : null
} catch (e) { return null }
}
function Workbench() {
// runtime-workbench-logic 模块的 app.js 模块级依赖:渲染前注入一次(常量/纯函数,无陈旧值风险)
if (IWWorkbenchLogic && !IWWorkbenchLogic.__iwbInjected) {
@@ -8227,7 +8216,7 @@ const tbCenterSeed = (type, refs) => {
},
insert: (text, name) => {
const id = uid('n')
const spot = promptCenterSpot(wPluginCanvasBridge, 280, 120) || findSpot('prompt')
const spot = CanvasGeometry.promptCenterSpot(wPluginCanvasBridge, 280, 120) || findSpot('prompt')
commitCanvas(refs.nodes.concat([{ id, type: 'prompt', x: spot.x, y: spot.y, data: { text: text || '', title: name || '' } }]), undefined, undefined)
setSel([id])
setNotice({ type: 'ok', text: '已插入提示词:' + (name || '') })
@@ -8237,7 +8226,7 @@ const tbCenterSeed = (type, refs) => {
insertImage: (cover, name) => wPromptInsertImage({
insertRefNode: (data, nm, w) => {
const id = uid('n')
const spot = promptCenterSpot(wPluginCanvasBridge, w || 280, 180) || findSpot('ref')
const spot = CanvasGeometry.promptCenterSpot(wPluginCanvasBridge, w || 280, 180) || findSpot('ref')
commitCanvas(refs.nodes.concat([{ id, type: 'ref', x: spot.x, y: spot.y, w: w || 280, data: { data: data, name: nm } }]), undefined, undefined)
setSel([id])
setNotice({ type: 'ok', text: '已插入封面图片' })
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "image-workbench-web",
"private": true,
"version": "3.26.38",
"version": "3.26.39",
"description": "Browser-based node canvas image workbench",
"scripts": {
"build": "node scripts/build.js && node scripts/copy-plugins.js",
+2 -2
View File
@@ -44,9 +44,9 @@
"dir": "promptlib",
"main": "main.js",
"style": "styles.css",
"version": "1.6.17",
"version": "1.6.18",
"files": {
"main.js": "029d6adb976c5e41428ffbb3b5e8f3698dde2532597fcc55cc75e774b25b284e",
"main.js": "0efdfbbfe7e9318610bb94330c0a3c361a0aa38f2b3a44c243c872f0e02a09e8",
"styles.css": "1fdad04e2ffe1c8ba2a991a88072f780b65238096f9ccd1b5adba671ff2c9cb3"
}
},
+1 -1
View File
@@ -1594,7 +1594,7 @@
global.IWBPluginHost.register({
id: 'promptlib',
name: '提示词库',
version: '1.6.17',
version: '1.6.18',
apiVersion: 1,
capabilities: ['panels', 'promptlib', 'nodeTypes', 'canvas', 'canvasWrite'],
data: { schemaVersion: 3, maxBytes: 4 * 1024 * 1024 },
+2 -2
View File
@@ -1,7 +1,7 @@
{
"id": "promptlib",
"name": "提示词库",
"version": "1.6.17",
"version": "1.6.18",
"apiVersion": 1,
"main": "main.js",
"style": "styles.css",
@@ -13,7 +13,7 @@
"提示词"
],
"files": {
"main.js": "029d6adb976c5e41428ffbb3b5e8f3698dde2532597fcc55cc75e774b25b284e",
"main.js": "0efdfbbfe7e9318610bb94330c0a3c361a0aa38f2b3a44c243c872f0e02a09e8",
"styles.css": "1fdad04e2ffe1c8ba2a991a88072f780b65238096f9ccd1b5adba671ff2c9cb3"
}
}
+1 -1
View File
@@ -1,6 +1,6 @@
[package]
name = "image-workbench"
version = "3.26.38"
version = "3.26.39"
description = "无限画布 · 生图工作台桌面版"
authors = ["malongan"]
license = ""
+1 -1
View File
@@ -1,7 +1,7 @@
{
"$schema": "../node_modules/@tauri-apps/cli/config.schema.json",
"productName": "image-workbench",
"version": "3.26.38",
"version": "3.26.39",
"identifier": "com.malongan.imageworkbench",
"build": {
"frontendDist": "../dist",
+11 -1
View File
@@ -349,5 +349,15 @@
return { x: Math.round(x), y: Math.round(y) }
}
global.IWBCanvasGeometry = Object.freeze({ connectReasonOf, distToSeg, wantsDefaultSpot, parseWorldTransform, clientToWorld, snapToFreeSpot, placeBeside, pruneMeasured, seedFromTopLeft, clampIntoBounds, lodLowOf, lodModeOf, zoomStep, LOD_NODE_PX, LOD_PLAIN_SCALE, ZOOM_STEP, ZOOM_MIN, ZOOM_MAX, create })
// 插件「插入画布」落到可视区域中心(findSpot 会把节点丢左上角,常被左侧面板遮住)。
const promptCenterSpot = (bridge, w, h) => {
try {
const c = typeof document !== 'undefined' ? document.querySelector('.iwb-canvas') : null
if (!c || !bridge || typeof bridge.screenToWorld !== 'function') return null
const r = c.getBoundingClientRect()
const p = bridge.screenToWorld(r.left + r.width / 2, r.top + r.height / 2)
return p ? { x: p.x - (w || 0) / 2, y: p.y - (h || 0) / 2 } : null
} catch (e) { return null }
}
global.IWBCanvasGeometry = Object.freeze({ connectReasonOf, distToSeg, wantsDefaultSpot, promptCenterSpot, parseWorldTransform, clientToWorld, snapToFreeSpot, placeBeside, pruneMeasured, seedFromTopLeft, clampIntoBounds, lodLowOf, lodModeOf, zoomStep, LOD_NODE_PX, LOD_PLAIN_SCALE, ZOOM_STEP, ZOOM_MIN, ZOOM_MAX, create })
})(typeof window !== 'undefined' ? window : globalThis)