From 99649b0ecdcc312cce6afa0b476bc2ab3d5c8e13 Mon Sep 17 00:00:00 2001 From: qiqi Date: Sun, 22 Nov 2026 20:22:25 +0800 Subject: [PATCH] =?UTF-8?q?fix(promptlib):=201.6.10=20=E6=82=AC=E5=81=9C?= =?UTF-8?q?=E7=BC=A9=E6=94=BE=E6=94=B9=E5=86=85=E5=B1=82=E8=83=8C=E6=99=AF?= =?UTF-8?q?=E5=B1=82=20+=20=E5=B0=81=E9=9D=A2=E4=B8=8D=E6=8B=A6=E6=88=AA?= =?UTF-8?q?=E6=8C=87=E9=92=88=EF=BC=88=E4=BF=AE=E9=97=AA=E7=83=81=E4=B8=8E?= =?UTF-8?q?=E5=B0=81=E9=9D=A2=E5=8D=A1=E9=9A=BE=E7=82=B9=E9=80=89=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- promptlib/package.json | 2 +- promptlib/src/index.js | 8 +++++--- promptlib/styles.css | 10 ++++++++++ 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/promptlib/package.json b/promptlib/package.json index e518059..14fdc90 100644 --- a/promptlib/package.json +++ b/promptlib/package.json @@ -1,7 +1,7 @@ { "name": "@iwb-plugin/promptlib", "private": true, - "version": "1.6.9", + "version": "1.6.10", "description": "提示词库:右栏提示词列表(搜索/分组/收藏/新建编辑/插入画布/复制/删除),数据由宿主 promptlib 能力提供", "ibwPlugin": { "id": "promptlib", diff --git a/promptlib/src/index.js b/promptlib/src/index.js index 0462d47..dab0ed7 100644 --- a/promptlib/src/index.js +++ b/promptlib/src/index.js @@ -1468,8 +1468,10 @@ var starred = (p.group || '') === '收藏' var coverUrl = coverOf(p) var card = el('div', { class: 'iwb-plp-card' + (p.cover ? ' has-cover' : ' no-cover'), draggable: 'true', title: '单击查看详情 · 拖到画布插入 · 右键移动到分组' }) - card.style.background = coverUrl ? 'var(--iwb-plugin-inset)' : gradOf(p) - if (coverUrl) card.appendChild(el('img', { class: 'iwb-plp-cover', src: coverUrl, alt: '', draggable: 'false' })) + var bg = el('div', { class: 'iwb-plp-bg' }) + bg.style.background = coverUrl ? 'var(--iwb-plugin-inset)' : gradOf(p) + if (coverUrl) bg.appendChild(el('img', { class: 'iwb-plp-cover', src: coverUrl, alt: '', draggable: 'false' })) + card.appendChild(bg) card.appendChild(el('div', { class: 'iwb-plp-t', text: p.name || '未命名' })) card.addEventListener('pointerdown', function (e) { if (e.button !== 0) return @@ -1533,7 +1535,7 @@ global.IWBPluginHost.register({ id: 'promptlib', name: '提示词库', - version: '1.6.9', + version: '1.6.10', apiVersion: 1, capabilities: ['panels', 'promptlib', 'nodeTypes', 'canvasWrite'], data: { schemaVersion: 3, maxBytes: 4 * 1024 * 1024 }, diff --git a/promptlib/styles.css b/promptlib/styles.css index 59d221c..d198a99 100644 --- a/promptlib/styles.css +++ b/promptlib/styles.css @@ -369,3 +369,13 @@ box-shadow: 0 24px 60px rgba(0,0,0,.32); .iwb-plp-ghosttxt{min-width:0;display:flex;flex-direction:column;gap:2px} .iwb-plp-ghostname{font-weight:600;color:var(--iwb-text,#1c2333);overflow:hidden;text-overflow:ellipsis;white-space:nowrap} .iwb-plp-ghosthint{font-size:10.5px;color:var(--iwb-plp-accent,#5a4bd0)} + +/* v1.6.10:悬停放大改为「内层背景层缩放」——卡片命中区域不变,渐变卡不再闪烁 */ +.iwb-plp-bg{position:absolute;inset:0;overflow:hidden;border-radius:inherit;transition:transform .16s ease;will-change:transform;backface-visibility:hidden} +.iwb-plp-card:hover .iwb-plp-bg{transform:scale(1.045)} +.iwb-plp-card:hover{border-color:var(--iwb-border2,#b9bfca);box-shadow:0 8px 22px rgba(0,0,0,.14)} +/* 取消卡片本体的缩放/层级切换(闪烁与边缘点击丢失的来源) */ +.iwb-plp-card{transform:none} +.iwb-plp-card:hover{transform:none;z-index:auto} +.iwb-plp-card.is-dragging{opacity:.55} +.iwb-plp-bg,.iwb-plp-cover{pointer-events:none}