diff --git a/image-annotate/README.md b/image-annotate/README.md index cf59a72..f58c3de 100644 --- a/image-annotate/README.md +++ b/image-annotate/README.md @@ -16,7 +16,8 @@ > 这类问题**只有带 CSP 的真站能测出来**(无 CSP 的 mock 页永远绿)。真实站点用例见 `image-annotate/tools/e2e-site.mjs`。 ## 入口 -- **节点漂浮菜单**「标注 / 修图」(`ref` / `out` / `gen` / `layer` 节点) +- **节点漂浮菜单**「标注 / 修图」(**仅 `ref` 图片输入节点**) + - `out` / `gen` / `layer` 是产图节点:一个节点可能有多张结果或多个图层,`getNodeImage` 只能取 `result[0]`,在漂浮菜单放「编辑图片」会被误读成「编辑结果图」。要处理产出的图,先「复制 / 插入为参考图节点」。 - 右键菜单「插件命令 → 标注 / 修图:选中节点」 导出后由编辑器自己 `close()`: diff --git a/image-annotate/package.json b/image-annotate/package.json index b29e44c..ee8a59c 100644 --- a/image-annotate/package.json +++ b/image-annotate/package.json @@ -1,7 +1,7 @@ { "name": "@iwb-plugin/image-annotate", "private": true, - "version": "1.0.1", + "version": "1.0.2", "description": "IWB 插件:图片标注 / 修图(编辑器移植自 iwb-plaus 扩展,纯 Canvas 2D)", "ibwPlugin": { "id": "image-annotate", diff --git a/image-annotate/plugin/glue.js b/image-annotate/plugin/glue.js index b908011..6912762 100644 --- a/image-annotate/plugin/glue.js +++ b/image-annotate/plugin/glue.js @@ -94,10 +94,12 @@ export function createGlue(ctx, css) { }) } - // 图片承载类型:ref / out(参考实现同款)+ gen / layer(宿主 isImageProducer 认定的产图类型)。 + // 只在图片输入节点(ref)暴露:out/gen/layer 是产图节点,一个节点可能有多张结果或多个图层, + // getNodeImage 只能取 result[0],在漂浮菜单里放"编辑图片"会被误读成"编辑结果图"。 + // 产图节点要处理图片,先「复制 / 插入为参考图节点」。 function appliesTo(node) { if (!node) return false - return node.type === 'ref' || node.type === 'out' || node.type === 'gen' || node.type === 'layer' + return node.type === 'ref' } ctx.nodeActions.register({ diff --git a/image-annotate/src/index.js b/image-annotate/src/index.js index e9b07e1..df848eb 100644 --- a/image-annotate/src/index.js +++ b/image-annotate/src/index.js @@ -9,7 +9,7 @@ var __IWB_ANNOTATE_MANIFEST__ = { id: 'image-annotate', name: '标注 / 修图', - version: '1.0.1', + version: '1.0.2', apiVersion: 1, capabilities: ['commands', 'nodeActions', 'canvas', 'canvasWrite'], } @@ -4575,7 +4575,7 @@ var __IWB_ANNOTATE_MANIFEST__ = { } function appliesTo(node) { if (!node) return false; - return node.type === "ref" || node.type === "out" || node.type === "gen" || node.type === "layer"; + return node.type === "ref"; } ctx.nodeActions.register({ id: "annotate-node", diff --git a/white-bg-800/README.md b/white-bg-800/README.md index c7e9662..2d2b84d 100644 --- a/white-bg-800/README.md +++ b/white-bg-800/README.md @@ -14,7 +14,7 @@ - 上游的批量处理 / 下载 / 剪贴板等能力不在本插件范围。 ## 入口 -- **节点漂浮菜单**「白底图」(`ref` / `out` / `gen` 节点) +- **节点漂浮菜单**「白底图」(**仅 `ref` 图片输入节点**;产图节点先「复制 / 插入为参考图节点」) - 右键菜单「插件命令 → 白底图:选中节点」 ## 设置 diff --git a/white-bg-800/package.json b/white-bg-800/package.json index b77f304..9c8c48e 100644 --- a/white-bg-800/package.json +++ b/white-bg-800/package.json @@ -1,7 +1,7 @@ { "name": "@iwb-plugin/white-bg-800", "private": true, - "version": "1.0.0", + "version": "1.0.1", "description": "白底图:把节点图等比缩放居中合成到正方形画布(白底/透明底),输出 _x.png", "ibwPlugin": { "id": "white-bg-800", "entry": "src/index.js", "apiVersion": 1 } } diff --git a/white-bg-800/src/index.js b/white-bg-800/src/index.js index 560bd50..1823187 100644 --- a/white-bg-800/src/index.js +++ b/white-bg-800/src/index.js @@ -34,7 +34,7 @@ global.IWBPluginHost.register({ id: 'white-bg-800', name: '白底图', - version: '1.0.0', + version: '1.0.1', apiVersion: 1, capabilities: ['commands', 'canvas', 'canvasWrite', 'nodeActions'], settings: { @@ -114,7 +114,7 @@ id: 'white-bg-node', title: '白底图', icon: 'fit', - appliesTo: function (node) { return Boolean(node) && (node.type === 'ref' || node.type === 'out' || node.type === 'gen') }, + appliesTo: function (node) { return Boolean(node) && node.type === 'ref' }, run: function (node) { return runOne(node.id, node.name) }, }) diff --git a/xianyi-cutout/README.md b/xianyi-cutout/README.md index 694cb2b..cf0a100 100644 --- a/xianyi-cutout/README.md +++ b/xianyi-cutout/README.md @@ -11,7 +11,7 @@ Content-Type: application/octet-stream # 原始图片字节;无 token、无 JS 比原扩展多做的:**补齐了超时**(`AbortController` + 可配 `timeoutMs`,原版没有任何超时)。 ## 入口 -- **节点漂浮菜单**「抠图」(选中 ref / out 节点时出现) +- **节点漂浮菜单**「抠图」(**仅 ref 图片输入节点**时出现;产图节点先「复制 / 插入为参考图节点」) - 右键菜单「插件命令 → 抠图:选中节点」 ## 设置 diff --git a/xianyi-cutout/package.json b/xianyi-cutout/package.json index 7529686..2b35ce1 100644 --- a/xianyi-cutout/package.json +++ b/xianyi-cutout/package.json @@ -1,7 +1,7 @@ { "name": "@iwb-plugin/xianyi-cutout", "private": true, - "version": "1.0.1", + "version": "1.0.2", "description": "鲜艺抠图:调用本机 30092 的 /rmbg 把节点图抠成透明底", "ibwPlugin": { "id": "xianyi-cutout", "entry": "src/index.js", "apiVersion": 1 } } diff --git a/xianyi-cutout/src/index.js b/xianyi-cutout/src/index.js index 8e78e3e..d4b6baf 100644 --- a/xianyi-cutout/src/index.js +++ b/xianyi-cutout/src/index.js @@ -37,7 +37,7 @@ global.IWBPluginHost.register({ id: 'xianyi-cutout', name: '鲜艺抠图', - version: '1.0.1', + version: '1.0.2', apiVersion: 1, capabilities: ['commands', 'canvas', 'canvasWrite', 'nodeActions'], settings: { @@ -98,7 +98,7 @@ id: 'cutout-node', title: '抠图', icon: 'ref', - appliesTo: function (node) { return Boolean(node) && (node.type === 'ref' || node.type === 'out') }, + appliesTo: function (node) { return Boolean(node) && node.type === 'ref' }, run: function (node) { return cutoutOne(node.id) }, })