dsh-mpkg-wallpaper 3.15.9 → 3.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/client.js +30 -15
- package/package.json +1 -1
package/lib/client.js
CHANGED
|
@@ -17740,7 +17740,12 @@ html body [class*="sidebarCol"]:not([data-sidebar-right-panel]) { z-index: 1 !im
|
|
|
17740
17740
|
被别的 z=2000 层盖住。⇒ 左栏子树里出现**可见的**宿主弹层/对话框时给左栏打抬升标记;
|
|
17741
17741
|
弹层关掉即摘(收纳态"左栏盖右栏"的老问题不受影响)。 */
|
|
17742
17742
|
html body [data-mpw-side-lift] { z-index: 2500 !important; }
|
|
17743
|
-
|
|
17743
|
+
/* ②(2026-10-05 真机定案续) 把 role=dialog 从这里拿掉:宿主的"设置"面板自己就带
|
|
17744
|
+
role=dialog aria-modal(真机读数 VOzbGW_panel),把它钉到 3000 之后,宿主自己的对话框
|
|
17745
|
+
(挂在 z-index:1000 的 portal root 里)永远追不上 ⇒ "设置里点查看,弹窗被压在设置底下、点不到"。
|
|
17746
|
+
这里只保留**小浮层**(菜单/列表/提示/下拉)——它们需要压过面板才点得到;
|
|
17747
|
+
面板/对话框的层级一律交还宿主自己的次序。我们自己的弹窗(.mpw_dialog)由上面的规则单独抬。 */
|
|
17748
|
+
[role="menu"], [role="listbox"], [role="tooltip"],
|
|
17744
17749
|
[class*="_popover"], [class*="_dropdown"], [class*="_selectMenu"], [class*="_menu_"],
|
|
17745
17750
|
[data-radix-popper-content-wrapper], [data-dsh-popover] {
|
|
17746
17751
|
z-index: 3000 !important;
|
|
@@ -17791,8 +17796,14 @@ html body:has([class*="_overlayLayer"]) [class*="_floatHeader_"],
|
|
|
17791
17796
|
html body:has([class*="_overlay"]) [class*="_floatHeader_"] {
|
|
17792
17797
|
z-index: auto !important;
|
|
17793
17798
|
}
|
|
17794
|
-
/*
|
|
17795
|
-
|
|
17799
|
+
/* 设置/弹层本身的层级:**只抬我们自己的弹窗,不重钉宿主自己的 overlay**。
|
|
17800
|
+
②(2026-10-05 真机定案:"设置 → Agent 预设 → 查看,弹窗被压在设置底下;把壁纸/插件关掉就正常了")
|
|
17801
|
+
根因就是这一条:旧写法把宿主的设置弹层(VOzbGW_overlay)一起钉成 z-index:2000,而宿主自己的
|
|
17802
|
+
对话框挂在 portal root(position:fixed, z-index:1000)里 —— 层叠上下文一盖,里面的 dialog
|
|
17803
|
+
再高也只能到 1000 ⇒ 永远被设置弹层压住、点不到(真机打印的祖先链:dialog → _root_w1urq_2
|
|
17804
|
+
[z=1000] → BODY)。插件一关就没这条规则 ⇒ 宿主的自然次序恢复 ⇒ 弹窗正常在上面。
|
|
17805
|
+
⇒ 这里只保留我们自己的面板/弹窗类,宿主的 _overlay / _overlayLayer 一律交还宿主自己的层级。 */
|
|
17806
|
+
html body [class*="_modal"], html body .mpw_dialog {
|
|
17796
17807
|
z-index: 2000 !important;
|
|
17797
17808
|
}
|
|
17798
17809
|
/* 设置/对话弹层本身不做玻璃(避免 backdrop-filter 变成下拉的 containing block)。
|
|
@@ -25033,9 +25044,6 @@ body[data-mpw-modal] [role="dialog"] {
|
|
|
25033
25044
|
}
|
|
25034
25045
|
if (kept) continue;
|
|
25035
25046
|
let blockedByGlass = false;
|
|
25036
|
-
/* ②(2026-10-05 审查建议) 只在弹层**真的压在这个祖先上面**(矩形相交)时才考虑摘:
|
|
25037
|
-
菜单飘在屏幕另一头时摘它纯属白丢磨砂,还平白制造一次重绘。 */
|
|
25038
|
-
const ownRect = (() => { try { return el.getBoundingClientRect() } catch (e) { return null } })();
|
|
25039
25047
|
for (let p = el.parentElement, n = 0; p && p !== document.body && p !== document.documentElement && n < 12; p = p.parentElement, n++) {
|
|
25040
25048
|
let acs = null;
|
|
25041
25049
|
try { acs = getComputedStyle(p) } catch (e) { break }
|
|
@@ -25051,15 +25059,9 @@ body[data-mpw-modal] [role="dialog"] {
|
|
|
25051
25059
|
而输入框卡片 `uV2eYG_card`(有底、有 blur,但**不是**弹层表面)只是"碰巧挡在
|
|
25052
25060
|
弹层前面的包装" ⇒ 摘掉它的 blur 换来弹层真模糊,代价是"菜单打开期间它自己不糊"。
|
|
25053
25061
|
真机读数支持这条:四个弹层里只有 body 下的模型选择器有模糊,另三个全被卡片截断。 */
|
|
25054
|
-
|
|
25055
|
-
|
|
25056
|
-
|
|
25057
|
-
const overlap = pr.width > 0 && pr.height > 0
|
|
25058
|
-
&& ownRect.left < pr.right && ownRect.right > pr.left
|
|
25059
|
-
&& ownRect.top < pr.bottom && ownRect.bottom > pr.top;
|
|
25060
|
-
if (!overlap) continue; // 没压住它 ⇒ 不动它的 blur
|
|
25061
|
-
}
|
|
25062
|
-
} catch (e) { /* 量不到就按"压住"处理(保守:保功能) */ }
|
|
25062
|
+
/* ②(2026-10-05 复核) **不做几何相交判定**:backdrop root 的截断是 DOM/层叠性质,
|
|
25063
|
+
与两者矩形是否重叠无关 —— 祖先的模糊区不覆盖弹层时,弹层的 backdrop 是**空的**,
|
|
25064
|
+
照样"只有半透明没有模糊"(真机就是这么报的)。⇒ 只要是已知包装容器就摘。 */
|
|
25063
25065
|
let ancestorIsSurface = false;
|
|
25064
25066
|
try { ancestorIsSurface = p.matches(MPW_POP_TAG_SEL) } catch (e) {}
|
|
25065
25067
|
if (ancestorIsSurface) { blockedByGlass = true; break }
|
|
@@ -25165,6 +25167,19 @@ body[data-mpw-modal] [role="dialog"] {
|
|
|
25165
25167
|
catch (e) { prun(); }
|
|
25166
25168
|
});
|
|
25167
25169
|
popTagWatch.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ["class", "style", "data-state", "aria-expanded", "hidden"] });
|
|
25170
|
+
/* ②(2026-10-05) **原生 popover API**(`showPopover()`/`hidePopover()`)打开时不改任何属性、
|
|
25171
|
+
也没有 childList 突变 ⇒ 上面前两条快路都收不到信号(模型/推理选择器就是这种,真机表现为
|
|
25172
|
+
"打开要等一会儿才有底")。`toggle` 事件在 capture 阶段能收到(它不冒泡)⇒ 当场补一次判定。 */
|
|
25173
|
+
try {
|
|
25174
|
+
document.addEventListener("toggle", (ev) => {
|
|
25175
|
+
try {
|
|
25176
|
+
const t = ev && ev.target;
|
|
25177
|
+
if (t && t.nodeType === 1) mpwTagOnePopover(t);
|
|
25178
|
+
mpwPopUntruncSync();
|
|
25179
|
+
mpwSideLiftSync();
|
|
25180
|
+
} catch (e) {}
|
|
25181
|
+
}, true);
|
|
25182
|
+
} catch (e) {}
|
|
25168
25183
|
} catch { popTagWatch = null; }
|
|
25169
25184
|
mpwTagPopoverBg();
|
|
25170
25185
|
try { mpwPopUntruncSync(); } catch (e) {}
|
package/package.json
CHANGED