From 79d631ce86dedb67a86c6fa64f9110857e1b02ba Mon Sep 17 00:00:00 2001 From: qiqi Date: Sun, 22 Nov 2026 23:10:53 +0800 Subject: [PATCH] =?UTF-8?q?fix(promptlib):=201.7.3=20=E6=AD=A3=E6=96=87?= =?UTF-8?q?=E9=AB=98=E4=BA=AE=E5=B1=82=E5=8F=AF=E8=A7=81=E6=80=A7=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=20+=20=E6=A0=87=E9=A2=98=E6=A0=8F=E4=B8=8B=E6=B2=BF?= =?UTF-8?q?=E5=8F=AF=E6=8B=96=E9=AB=98=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- promptlib/package.json | 2 +- promptlib/src/index.js | 15 +++++++++++++-- promptlib/styles.css | 6 ++++++ 3 files changed, 20 insertions(+), 3 deletions(-) diff --git a/promptlib/package.json b/promptlib/package.json index c86cde9..5af613e 100644 --- a/promptlib/package.json +++ b/promptlib/package.json @@ -1,7 +1,7 @@ { "name": "@iwb-plugin/promptlib", "private": true, - "version": "1.7.2", + "version": "1.7.3", "description": "提示词库:右栏提示词列表(搜索/分组/收藏/新建编辑/插入画布/复制/删除),数据由宿主 promptlib 能力提供", "ibwPlugin": { "id": "promptlib", diff --git a/promptlib/src/index.js b/promptlib/src/index.js index 61f2f10..9f7f1b9 100644 --- a/promptlib/src/index.js +++ b/promptlib/src/index.js @@ -919,7 +919,18 @@ var bodyEl = el('div', { class: 'iwb-plp-dbody' }) var footEl = el('div', { class: 'iwb-plp-dfooter' }) var grip2 = el('div', { class: 'iwb-plp-resize', title: '拖动调整大小' }) - card.appendChild(head); card.appendChild(bodyEl); card.appendChild(footEl); card.appendChild(grip2) + var hres = el('div', { class: 'iwb-plp-hres', title: '拖动调整弹窗高度' }) + hres.addEventListener('pointerdown', function (e) { + e.preventDefault(); e.stopPropagation() + var sy = e.clientY, oh = live.h + function mv (ev) { + live.h = Math.max(420, Math.min((global.innerHeight || 900) - 40, oh + ev.clientY - sy)) + apply() + } + function up () { global.removeEventListener('pointermove', mv); global.removeEventListener('pointerup', up); saveDlg(key, live) } + global.addEventListener('pointermove', mv); global.addEventListener('pointerup', up) + }) + card.appendChild(head); card.appendChild(hres); card.appendChild(bodyEl); card.appendChild(footEl); card.appendChild(grip2) mask.appendChild(card) document.body.appendChild(mask) var live = { x: box.x, y: box.y, w: box.w, h: box.h } @@ -1702,7 +1713,7 @@ global.IWBPluginHost.register({ id: 'promptlib', name: '提示词库', - version: '1.7.2', + version: '1.7.3', apiVersion: 1, capabilities: ['panels', 'promptlib', 'nodeTypes', 'canvas', 'canvasWrite'], data: { schemaVersion: 3, maxBytes: 4 * 1024 * 1024 }, diff --git a/promptlib/styles.css b/promptlib/styles.css index 9970a6d..0b77275 100644 --- a/promptlib/styles.css +++ b/promptlib/styles.css @@ -444,3 +444,9 @@ body.iwb-plp-dragging, body.iwb-plp-dragging *{user-select:none!important;-webki .iwb-plp-dialog .iwb-plp-vi.is-open{background:#eef0f3;color:#5b6472} .iwb-plp-dialog .iwb-plp-vdesc{background:transparent;border:1px dashed #dfe3e9} .iwb-plp-dvar{background:transparent;color:#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:#e7e9ee} +/* 正文可见性:textarea 透明,显示下方高亮层 */ +.iwb-plp-dialog .iwb-plp-emid .iwb-plp-ewrap{flex:1 1 auto;min-height:0;position:relative;display:flex;background:#fbfcfd;border:1px solid #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}