perf: v3.26.152 简化卡片 hover 效果 + 可见空闲回收

This commit is contained in:
qiqi committed 2026-12-01 01:51:10 +08:00
1 parent 359ad97329
commit 9ef5218856
12 files changed
+43 -29

No files matched your search

+2 -2
View File
@@ -1,7 +1,7 @@
{
"id": "album",
"name": "相册",
"version": "1.2.4",
"version": "1.2.5",
"apiVersion": 1,
"main": "main.js",
"style": "styles.css",
@@ -15,6 +15,6 @@
],
"files": {
"main.js": "79ac746f0065103a32b083e2d79f16fb09fcf9032709952ba256887db1bedb4a",
"styles.css": "40623c831620d0082dde956300461b29b9256aab98da86c7ab5e3495214f8d49"
"styles.css": "63f70828151481ee96fd102e3c18baecbf51999d8fd96044aabbefdd5c2d2225"
}
}
+2 -2
View File
@@ -29,12 +29,12 @@
竖图撑到 167px,和 capacityOf() 按方形算的容量是两套账(最后一行常被裁一半)。
aspect-ratio 让每一格高 = 宽,容量因此可精确预测,宫格也终于整齐。
padding:0 必须显式写:<button> 的 UA 默认内边距会把图顶出边框。 */
.iwb-album-cell { position: relative; aspect-ratio: 1 / 1; padding: 0; border-radius: var(--iwb-radius-chip); overflow: hidden; background: color-mix(in srgb, var(--iwb-border) 55%, transparent); border: 1px solid var(--iwb-border); cursor: grab; transition: transform var(--iwb-motion-hover, .15s) var(--iwb-ease-hover, ease-out), box-shadow var(--iwb-motion-hover, .15s) var(--iwb-ease-hover, ease-out); }
.iwb-album-cell { position: relative; aspect-ratio: 1 / 1; padding: 0; border-radius: var(--iwb-radius-chip); overflow: hidden; background: color-mix(in srgb, var(--iwb-border) 55%, transparent); border: 1px solid var(--iwb-border); cursor: grab; transition: border-color var(--iwb-motion-hover, .15s) var(--iwb-ease-hover, ease-out); }
/* 1.1.4(用户:1.06 太不明显):放大到 1.08 + 更深的投影 + 2px 品牌描边。
网格内**不做位移**(translateY 会让相邻格的 hover 判定抖动);描边用 outline 而不是加粗 border,
避免图片内容被 1px 的 border 变化挤动。z-index 走宿主层级 token(插件禁止裸值),
且被 .iwb-album-grid 的 overflow:hidden 限制在节点内。 */
.iwb-album-cell:hover { transform: scale(1.08); outline: 2px solid var(--iwb-hover-border, var(--iwb-brand)); outline-offset: -2px; box-shadow: 0 10px 26px rgba(0, 0, 0, .42), 0 2px 6px rgba(0, 0, 0, .28); z-index: var(--iwb-z-ctx, 90); }
.iwb-album-cell:hover { outline: 2px solid var(--iwb-hover-border, var(--iwb-brand)); outline-offset: -2px; border-color: var(--iwb-hover-border, var(--iwb-brand)); z-index: var(--iwb-z-ctx, 90); }
@media (prefers-reduced-motion: reduce) { .iwb-album-cell { transition: none; } .iwb-album-cell:hover { transform: none; } }
.iwb-album-cell img { width: 100%; height: 100%; object-fit: cover; display: block; -webkit-user-drag: none; }
/* v1.2.0:来源徽标 + 文件夹模式说明/路径 */
+2 -2
View File
@@ -1,7 +1,7 @@
{
"id": "gallery",
"name": "图库",
"version": "1.9.8",
"version": "1.9.9",
"apiVersion": 1,
"main": "main.js",
"style": "styles.css",
@@ -14,6 +14,6 @@
],
"files": {
"main.js": "8586409417599dec4b0f229e88eaf937f991f1942db49df97ce9a27e16a35d9f",
"styles.css": "c7db0f9d78b98c1b5bb9782c45dfc2274673c1c7d34fdf676aae41680866eb3d"
"styles.css": "07ca657d2e5f5d9406e6c7f7306906e34f2ee10a2fa4c2165358451f5461c6a4"
}
}
+2 -5
View File
@@ -69,16 +69,13 @@
.iwb-history-embedded .iwb-history-item img {
width: 100%; height: auto; display: block; object-fit: contain; margin: 0 auto;
border-radius: 6px; border: 1px solid var(--iwb-border); background: var(--iwb-layer2); cursor: pointer;
transition: transform var(--iwb-motion-hover, .15s) var(--iwb-ease-hover, ease-out),
border-color var(--iwb-motion-hover, .15s) var(--iwb-ease-hover, ease-out),
box-shadow var(--iwb-motion-hover, .15s) var(--iwb-ease-hover, ease-out);
/* 2026-12-01:卡片不再做 hover 放大/投影;只保留描边反馈,减少悬停时的合成/raster 成本。 */
transition: border-color var(--iwb-motion-hover, .15s) var(--iwb-ease-hover, ease-out);
}
/* v1.7.3:卡片悬停上浮 + 阴影 + 品牌描边(与输出节点共用宿主 L2 token)。
用 item:hover 而不是 img:hover:指针移到下载浮层按钮上时卡片仍保持浮起,不抖。 */
.iwb-history-embedded .iwb-history-item:hover img {
transform: translateY(var(--iwb-hover-lift, -2px)) scale(var(--iwb-hover-scale, 1.02));
border-color: var(--iwb-hover-border, var(--iwb-brand));
box-shadow: var(--iwb-hover-shadow, 0 5px 16px rgba(0, 0, 0, .22));
}
/* v1.9.4:卡片按宽高比占位后,占位层要铺满卡片 —— 否则缩略图出现时仍会有一次高度跳变(滚动时表现为闪动) */
.iwb-history-embedded .iwb-history-item .iwb-history-missing { position: absolute; inset: 0; min-height: 0; }
+6 -6
View File
@@ -4,10 +4,10 @@
"dir": "album",
"main": "main.js",
"style": "styles.css",
"version": "1.2.4",
"version": "1.2.5",
"files": {
"main.js": "79ac746f0065103a32b083e2d79f16fb09fcf9032709952ba256887db1bedb4a",
"styles.css": "40623c831620d0082dde956300461b29b9256aab98da86c7ab5e3495214f8d49"
"styles.css": "63f70828151481ee96fd102e3c18baecbf51999d8fd96044aabbefdd5c2d2225"
}
},
{
@@ -33,10 +33,10 @@
"dir": "gallery",
"main": "main.js",
"style": "styles.css",
"version": "1.9.8",
"version": "1.9.9",
"files": {
"main.js": "8586409417599dec4b0f229e88eaf937f991f1942db49df97ce9a27e16a35d9f",
"styles.css": "c7db0f9d78b98c1b5bb9782c45dfc2274673c1c7d34fdf676aae41680866eb3d"
"styles.css": "07ca657d2e5f5d9406e6c7f7306906e34f2ee10a2fa4c2165358451f5461c6a4"
}
},
{
@@ -55,10 +55,10 @@
"dir": "promptlib",
"main": "main.js",
"style": "styles.css",
"version": "1.14.10",
"version": "1.14.11",
"files": {
"main.js": "a05ce22ad8ab2e079e313dd31d8fe34f2e2e07e017bfb782afcd08047e0b485b",
"styles.css": "86f73b4d1c7b827f97ec1135c9130c7da6898537b2ed2ab815e282618232f56b"
"styles.css": "182783b15335895b5a40822bf137a7b4872ca0c6ee72434bfa61a97b37453a07"
}
},
{
+2 -2
View File
@@ -1,7 +1,7 @@
{
"id": "promptlib",
"name": "提示词库",
"version": "1.14.10",
"version": "1.14.11",
"apiVersion": 1,
"main": "main.js",
"style": "styles.css",
@@ -14,6 +14,6 @@
],
"files": {
"main.js": "a05ce22ad8ab2e079e313dd31d8fe34f2e2e07e017bfb782afcd08047e0b485b",
"styles.css": "86f73b4d1c7b827f97ec1135c9130c7da6898537b2ed2ab815e282618232f56b"
"styles.css": "182783b15335895b5a40822bf137a7b4872ca0c6ee72434bfa61a97b37453a07"
}
}
+3 -3
View File
@@ -379,7 +379,7 @@ box-shadow: 0 24px 60px rgba(0,0,0,.32);
/* v1.6.8:卡片悬停放大 + 按下/拖拽反馈 */
.iwb-plp-card{transition:transform .14s ease, box-shadow .14s ease, border-color .14s ease, opacity .14s ease}
.iwb-plp-card:hover{transform:scale(1.03);box-shadow:0 8px 22px rgba(0,0,0,.14);z-index:2}
.iwb-plp-card:hover{border-color:var(--iwb-border2,#b9bfca)}
.iwb-plp-card.is-pressed{border-color:var(--iwb-plp-accent,#7c4dff);box-shadow:0 0 0 2px color-mix(in srgb,var(--iwb-plp-accent,#7c4dff) 22%,transparent)}
.iwb-plp-card.is-dragging{opacity:.55;transform:scale(.98)}
@@ -391,9 +391,9 @@ box-shadow: 0 24px 60px rgba(0,0,0,.32);
.iwb-plp-ghosthint{font-size: 11px;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-bg{position:absolute;inset:0;overflow:hidden;border-radius:inherit;transition:transform .16s ease;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:hover{border-color:var(--iwb-border2,#b9bfca)}
/* 取消卡片本体的缩放/层级切换(闪烁与边缘点击丢失的来源) */
.iwb-plp-card{transform:none}
.iwb-plp-card:hover{transform:none;z-index:auto}