fix(promptlib): 1.6.10 悬停缩放改内层背景层 + 封面不拦截指针(修闪烁与封面卡难点选)
This commit is contained in:
1 parent
675ccf5016
commit
99649b0ecd
3 files changed
+16
-4
No files matched your search
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@iwb-plugin/promptlib",
|
||||
"private": true,
|
||||
"version": "1.6.9",
|
||||
"version": "1.6.10",
|
||||
"description": "提示词库:右栏提示词列表(搜索/分组/收藏/新建编辑/插入画布/复制/删除),数据由宿主 promptlib 能力提供",
|
||||
"ibwPlugin": {
|
||||
"id": "promptlib",
|
||||
|
||||
@@ -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 },
|
||||
|
||||
@@ -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}
|
||||
Reference in new issue
Block a user