dsh-mpkg-wallpaper 3.15.9 → 3.16.1

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.
Files changed (2) hide show
  1. package/lib/client.js +115 -120
  2. 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
- [role="menu"], [role="listbox"], [role="dialog"], [role="tooltip"],
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
- html body [class*="_overlayLayer"], html body [class*="_overlay"], html body [class*="_modal"], html body [role="dialog"] {
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)。
@@ -18124,6 +18135,9 @@ html body [data-mpw-pop-bg] { background-color: var(--mpw-pop-surface) !importan
18124
18135
  与其"半透明却没模糊"(真机被读成"只有白色滤镜"),不如**做实在**——表面不透明度抬到 88%,
18125
18136
  并把 backdrop-filter 撤掉(白算一遍)。注意:只动我们自己的标记属性,宿主元素一个都不碰。 */
18126
18137
  html body [data-mpw-pop-trunc] { background-color: color-mix(in srgb, var(--dsw-specific-sidebar-fill) 88%, transparent) !important; backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
18138
+ /* ②(2026-10-05) 处在包装容器里的弹层:玻璃由**根级模糊层**提供(见 lib 里的 mpwPopGlassApply),
18139
+ 弹层自己保持半透明表面、不再白算一次 backdrop-filter(它那层的 root 被祖先截断,算了也看不见)。 */
18140
+ html body [data-mpw-pop-glass] { backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
18127
18141
  html body[data-ds-dark-theme] [data-mpw-pop-bg] { background-color: var(--mpw-pop-surface-dark) !important; }
18128
18142
  [role="menu"] [class*="card"],
18129
18143
  [role="tooltip"] [class*="card"] {
@@ -24813,6 +24827,9 @@ body[data-mpw-modal] [role="dialog"] {
24813
24827
  } catch { sblurObserver = null; }
24814
24828
  // 窗口尺寸变化会让"近全屏"阈值与面板 rect 都变(父对话的真机判据就带视口切换)⇒ 一并重算
24815
24829
  try { window.addEventListener("resize", recheck); } catch {}
24830
+ /* ②(2026-10-05) 根级模糊层是 fixed 定位、按弹层 rect 对齐的 ⇒ 滚动/缩放时必须重贴 */
24831
+ try { window.addEventListener("scroll", () => { try { mpwPopGlassApply() } catch (e) {} }, true); } catch {}
24832
+ try { window.addEventListener("resize", () => { try { mpwPopGlassApply() } catch (e) {} }); } catch {}
24816
24833
  check();
24817
24834
  }
24818
24835
 
@@ -24997,142 +25014,106 @@ body[data-mpw-modal] [role="dialog"] {
24997
25014
  (`[data-mpw-pop-untrunc] { backdrop-filter: none !important; }`)——只在弹层开着期间生效,
24998
25015
  弹层关闭(无已标记表面)即摘属性、撤规则元素,宿主逐字还原。代价:属性表 + 一次
24999
25016
  querySelectorAll,挂在 prun(已 rAF 合并 + mpwHeavyGate 闸门)里,不开新观察器。 */
25000
- let popUntruncStyleEl = null;
25001
- function mpwPopUntruncStyle() {
25002
- if (!popUntruncStyleEl || popUntruncStyleEl.isConnected === false) {
25003
- popUntruncStyleEl = document.createElement("style");
25004
- popUntruncStyleEl.setAttribute("data-plugin", "dsh-mpkg-wallpaper");
25005
- popUntruncStyleEl.setAttribute("data-mpw-pop-untrunc-style", "");
25006
- popUntruncStyleEl.textContent = "[data-mpw-pop-untrunc] { backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }";
25007
- (document.head || document.documentElement).appendChild(popUntruncStyleEl);
25008
- }
25009
- return popUntruncStyleEl;
25017
+ /* ②(2026-10-05 设计收口) 三类弹层,三条路(宿主元素一个都不碰):
25018
+ A. 没有模糊祖先(典型:挂在 body 下的模型/推理选择器)⇒ 我们自己的 58% 表面 + 自己的 blur;
25019
+ B. 祖先里有模糊、且那个祖先是**已知包装容器**(输入框卡片一类)⇒ 弹层打 `data-mpw-pop-glass`,
25020
+ 由 `mpwPopGlassApply()` 在**根级**垫一层对齐矩形的模糊层(backdrop root = 整页),
25021
+ 包装容器照旧保留自己的磨砂 —— 用户明确要求"弹层要模糊、输入框的模糊也不能没";
25022
+ C. 祖先里有模糊、但那不是包装容器(用户正在看的面板,例如子代理展开框)⇒ 什么都不摘,
25023
+ 给弹层打 `data-mpw-pop-trunc`(88% 实底):糊不到页面背后,就不假装是玻璃。 */
25024
+ /* ②(2026-10-05) 「根级模糊层」:给"处在包装容器里、自己的 backdrop 被截断"的弹层垫一层
25025
+ 挂在 body 下的模糊层(backdrop root = 整页),位置/圆角跟着弹层走。宿主元素一个都不碰。 */
25026
+ const popGlassLayers = new WeakMap();
25027
+ const popGlassNodes = new Set(); // 需要清理(弹层已卸载/已摘标记)时按它遍历
25028
+ function mpwPopGlassApply() {
25029
+ try {
25030
+ const blur = (() => { try { return getComputedStyle(document.body).getPropertyValue("--mpw-pop-blur").trim() || "blur(11px)" } catch (e) { return "blur(11px)" } })();
25031
+ for (const el of Array.from(document.querySelectorAll("[data-mpw-pop-glass]"))) {
25032
+ let layer = popGlassLayers.get(el) || null;
25033
+ if (!layer || !layer.isConnected) {
25034
+ layer = document.createElement("div");
25035
+ layer.setAttribute("data-plugin", "dsh-mpkg-wallpaper");
25036
+ layer.setAttribute("data-mpw-pop-glass-layer", "");
25037
+ layer.style.cssText = "position:fixed;pointer-events:none;z-index:4;border-radius:12px;";
25038
+ (document.body || document.documentElement).appendChild(layer);
25039
+ popGlassLayers.set(el, layer);
25040
+ popGlassNodes.add(el);
25041
+ }
25042
+ const r = el.getBoundingClientRect();
25043
+ let radius = "12px";
25044
+ try { const cs = getComputedStyle(el); if (cs.borderTopLeftRadius && cs.borderTopLeftRadius !== "0px") radius = cs.borderTopLeftRadius } catch (e) {}
25045
+ if (r.width < 2 || r.height < 2) { layer.style.display = "none"; continue }
25046
+ layer.style.display = "block";
25047
+ layer.style.left = Math.round(r.left) + "px";
25048
+ layer.style.top = Math.round(r.top) + "px";
25049
+ layer.style.width = Math.round(r.width) + "px";
25050
+ layer.style.height = Math.round(r.height) + "px";
25051
+ layer.style.borderRadius = radius;
25052
+ layer.style.backdropFilter = blur;
25053
+ layer.style.webkitBackdropFilter = blur;
25054
+ }
25055
+ /* ②(2026-10-05) 清理要按**层自己**的账走:弹层正常关闭时元素会被 React 从 DOM 摘掉,
25056
+ 那时 `[data-mpw-pop-bg]` 已经查不到它 —— 只按查询清理会**留层泄漏**(真机上会累积一堆
25057
+ 隐形 fixed 层)。所以:surface 已断开 / 已不是 glass / 已摘标记 ⇒ 撤层。 */
25058
+ for (const el of Array.from(popGlassNodes)) {
25059
+ const layer = popGlassLayers.get(el);
25060
+ const alive = el.isConnected !== false && el.hasAttribute && el.hasAttribute("data-mpw-pop-glass") && el.hasAttribute("data-mpw-pop-bg");
25061
+ if (alive) continue;
25062
+ if (layer && layer.parentElement) { try { layer.remove() } catch (e) {} }
25063
+ popGlassLayers.delete(el);
25064
+ popGlassNodes.delete(el);
25065
+ }
25066
+ } catch (e) {}
25010
25067
  }
25011
- function mpwPopUntruncSync() {
25068
+ /* 判据出口(tools/popover-glass-test.mjs 直接用) */
25069
+ try {
25070
+ globalThis.__mpwPopUntruncTest = {
25071
+ sync: () => mpwPopClassifySync(),
25072
+ /* 用 body 的子节点数(根级层就挂在 body 下)——比属性选择器更稳,桩/真机都对 */
25073
+ glassCount: () => Array.from(((document.body || document.documentElement).children) || []).filter((e) => e && e.hasAttribute && e.hasAttribute("data-mpw-pop-glass-layer")).length,
25074
+ truncCount: () => document.querySelectorAll("[data-mpw-pop-trunc]").length,
25075
+ };
25076
+ } catch (e) {}
25077
+
25078
+ function mpwPopClassifySync() {
25012
25079
  try {
25013
25080
  const surfaces = document.querySelectorAll("[data-mpw-pop-bg]");
25014
- const targets = new Set();
25081
+ const glasses = new Set();
25015
25082
  const truncated = new Set();
25016
- const markedNow = Array.from(document.querySelectorAll("[data-mpw-pop-untrunc]"));
25017
25083
  for (let i = 0; i < surfaces.length; i++) {
25018
25084
  const el = surfaces[i];
25019
25085
  let cs = null;
25020
25086
  try { cs = getComputedStyle(el) } catch (e) {}
25021
- /* 硬前提(与 mpwTagPopoverBg 同口径):我们真的给了模糊才值得摘祖先的截断 */
25087
+ /* 硬前提:我们自己给了模糊才有"被截断"这回事 */
25022
25088
  if (!cs || !cs.backdropFilter || String(cs.backdropFilter).indexOf("blur") < 0) continue;
25023
- /* ②(2026-10-05 抖动修复) **已经摘过、且仍在这条祖先链上**的祖先,弹层没关就一直保持:
25024
- 摘掉之后它自己就没有 blur 了,若每轮都重新"找第一个带 blur 的祖先",下一轮就找不到它
25025
- ⇒ 属性被当陈旧标记摘掉 ⇒ blur 又回来 ⇒ 摘/还原来回抖(真机现象:同一个菜单时好时坏)。 */
25026
- let kept = false;
25027
- for (const mEl of markedNow) {
25028
- if (mEl === el) continue;
25029
- let onChain = false;
25030
- /* 用 parentElement 走链(不用 contains:桩 DOM/老引擎上不一定有) */
25031
- for (let q = el.parentElement, k = 0; q && k < 40; q = q.parentElement, k++) { if (q === mEl) { onChain = true; break } }
25032
- if (onChain) { targets.add(mEl); kept = true; break }
25033
- }
25034
- if (kept) continue;
25035
- let blockedByGlass = false;
25036
- /* ②(2026-10-05 审查建议) 只在弹层**真的压在这个祖先上面**(矩形相交)时才考虑摘:
25037
- 菜单飘在屏幕另一头时摘它纯属白丢磨砂,还平白制造一次重绘。 */
25038
- const ownRect = (() => { try { return el.getBoundingClientRect() } catch (e) { return null } })();
25039
25089
  for (let p = el.parentElement, n = 0; p && p !== document.body && p !== document.documentElement && n < 12; p = p.parentElement, n++) {
25040
25090
  let acs = null;
25041
25091
  try { acs = getComputedStyle(p) } catch (e) { break }
25042
25092
  const ablur = acs && acs.backdropFilter && acs.backdropFilter !== "none" && String(acs.backdropFilter).indexOf("blur") >= 0;
25043
25093
  if (!ablur) continue;
25044
- /* ②(2026-10-05 真机回归) **祖先自己是"看得见的玻璃板"时绝不动它**:
25045
- 它是用户能看到的那层模糊(真机现场:子代理展开框/输入框卡片被我们摘掉 blur 之后
25046
- "模糊背景没有了"——正是之前夸过的那处效果)。判据 = 它有可见底色(α ≥ 0.05)。
25047
- 这种情况下改为把**弹层自己的表面做实在**(不能糊到页面背后,就别假装是玻璃)。 */
25048
- /* ②(2026-10-05 真机复核) 判据收紧到"**它自己也是我们管的弹层表面**":
25049
- 子代理展开框/后台任务面板这类"用户正在看的面板"本身就在我们的弹层表面集合里
25050
- ⇒ 摘它的 blur = 把用户看得见的那层玻璃删掉(真机回归)。
25051
- 而输入框卡片 `uV2eYG_card`(有底、有 blur,但**不是**弹层表面)只是"碰巧挡在
25052
- 弹层前面的包装" ⇒ 摘掉它的 blur 换来弹层真模糊,代价是"菜单打开期间它自己不糊"。
25053
- 真机读数支持这条:四个弹层里只有 body 下的模型选择器有模糊,另三个全被卡片截断。 */
25054
- try {
25055
- if (ownRect && ownRect.width > 0 && ownRect.height > 0) {
25056
- const pr = p.getBoundingClientRect();
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) { /* 量不到就按"压住"处理(保守:保功能) */ }
25063
- let ancestorIsSurface = false;
25064
- try { ancestorIsSurface = p.matches(MPW_POP_TAG_SEL) } catch (e) {}
25065
- if (ancestorIsSurface) { blockedByGlass = true; break }
25066
- /* ②(2026-10-05 审查后收紧) **只摘"已知包装容器"的 blur**:真机定案的截断者只有一类 ——
25067
- 输入框卡片这类"碰巧挡在弹层前面的包装"(类名含 `_card` / `composer` / `overlayAnchor`)。
25068
- 其余任何带 blur 的祖先(标题栏里的子代理展开框、后台任务面板、别的宿主面板)**一律不碰**:
25069
- 它们是用户**正在看**的玻璃,摘掉就是"效果没了"(真机已因此报过一次)。
25070
- 代价:包在未知面板里的弹层保持"半透明无模糊"——这是**保守但不会破坏用户看得见的东西**的一侧。 */
25071
- let strippableWrap = false;
25072
- try { strippableWrap = /(_card|composer|overlayAnchor|_seat|_stack)/i.test(String(p.className || "")) } catch (e) {}
25073
- if (!strippableWrap) { blockedByGlass = true; break }
25074
- targets.add(p);
25094
+ let isSurface = false;
25095
+ try { isSurface = p.matches(MPW_POP_TAG_SEL) } catch (e) {}
25096
+ if (isSurface) { truncated.add(el); break } // C:用户正在看的面板 ⇒ 一个像素都不动
25097
+ let wrap = false;
25098
+ try { wrap = /(_card|composer|overlayAnchor|_seat|_stack)/i.test(String(p.className || "")) } catch (e) {}
25099
+ if (wrap) glasses.add(el); // B:已知包装容器 ⇒ 根级模糊层
25100
+ else truncated.add(el); // 未知祖先 ⇒ 保守:实底
25075
25101
  break;
25076
25102
  }
25077
- if (blockedByGlass) truncated.add(el);
25078
- }
25079
- const stale = markedNow;
25080
- for (let i = 0; i < stale.length; i++) { const el = stale[i]; if (!targets.has(el)) { try { el.removeAttribute("data-mpw-pop-untrunc") } catch (e) {} } }
25081
- for (const el of targets) { if (!el.hasAttribute("data-mpw-pop-untrunc")) { try { el.setAttribute("data-mpw-pop-untrunc", "") } catch (e) {} } }
25082
- /* 被"有底的玻璃祖先"挡住的那批:标记在**弹层自己**身上(绝不碰宿主元素),由 CSS 给实底 */
25083
- const staleT = document.querySelectorAll("[data-mpw-pop-trunc]");
25084
- for (let i = 0; i < staleT.length; i++) { const el = staleT[i]; if (!truncated.has(el)) { try { el.removeAttribute("data-mpw-pop-trunc") } catch (e) {} } }
25085
- for (const el of truncated) { if (!el.hasAttribute("data-mpw-pop-trunc")) { try { el.setAttribute("data-mpw-pop-trunc", "") } catch (e) {} } }
25086
- if (targets.size) mpwPopUntruncStyle();
25087
- else if (popUntruncStyleEl && popUntruncStyleEl.parentElement) {
25088
- /* ②(2026-10-05 审查建议) 撤除也要**瞬时**:宿主若给这些元素写了 transition,
25089
- 直接撤规则会反向播一次"清晰→磨砂"的可感知跳变。先注入一条"禁过渡 + 保持 none",
25090
- 下一帧再真正撤掉。 */
25091
- try {
25092
- const kill = document.createElement("style");
25093
- kill.setAttribute("data-plugin", "dsh-mpkg-wallpaper");
25094
- kill.setAttribute("data-mpw-pop-untrunc-kill", "");
25095
- kill.textContent = "[data-mpw-pop-untrunc]{transition:none !important;backdrop-filter:none !important;-webkit-backdrop-filter:none !important}";
25096
- (document.head || document.documentElement).appendChild(kill);
25097
- setTimeout(() => {
25098
- try { kill.remove() } catch (e) {}
25099
- try { if (popUntruncStyleEl && popUntruncStyleEl.parentElement) popUntruncStyleEl.remove() } catch (e) {}
25100
- popUntruncStyleEl = null;
25101
- }, 0);
25102
- } catch (e) {
25103
- try { popUntruncStyleEl.remove() } catch (e2) {}
25104
- popUntruncStyleEl = null;
25105
- }
25106
25103
  }
25107
- return targets.size + truncated.size * 1000; // 千位段 = 被"有底玻璃祖先"挡住、改为实底的弹层数
25104
+ const sync = (attr, want) => {
25105
+ const stale = document.querySelectorAll("[" + attr + "]");
25106
+ for (let i = 0; i < stale.length; i++) { const el = stale[i]; if (!want.has(el)) { try { el.removeAttribute(attr) } catch (e) {} } }
25107
+ for (const el of want) { if (!el.hasAttribute(attr)) { try { el.setAttribute(attr, "") } catch (e) {} } }
25108
+ };
25109
+ sync("data-mpw-pop-glass", glasses);
25110
+ sync("data-mpw-pop-trunc", truncated);
25111
+ mpwPopGlassApply();
25112
+ return glasses.size + truncated.size;
25108
25113
  } catch (e) { return 0 }
25109
25114
  }
25110
- /* ①(P3) 判据出口(tools/popover-untrunc-test.mjs 直接调 sync 断言 打标/还原/硬前提/首截断者)。 */
25111
- try {
25112
- globalThis.__mpwPopUntruncTest = {
25113
- sync: () => mpwPopUntruncSync(),
25114
- stylePresent: () => !!(popUntruncStyleEl && popUntruncStyleEl.parentElement),
25115
- killPresent: () => !!document.querySelector("[data-mpw-pop-untrunc-kill]"),
25116
- };
25117
- } catch (e) {}
25118
-
25119
- /* ②(2026-10-05) 探针/判据出口:弹层兜底底标记与"摘截断"两件事可被**手动触发并读回**——
25120
- 真机排障要能区分"根本没跑"(调度被饿死、observer 没接上)与"跑了但条件不满足"(宿主
25121
- 自己画了不透明白底/面积超阈值…)。只读+幂等,不改变任何语义。 */
25122
- try {
25123
- globalThis.__mpwPopTagTest = {
25124
- run: () => { try { return mpwTagPopoverBg() } catch (e) { return -1 } },
25125
- untrunc: () => { try { return mpwPopUntruncSync() } catch (e) { return -1 } },
25126
- state: (sel) => {
25127
- try {
25128
- const el = document.querySelector(sel || "[data-mpw-pop-bg]");
25129
- if (!el) return null;
25130
- const cs = getComputedStyle(el);
25131
- return { cls: String(el.className).slice(0, 60), tag: el.hasAttribute("data-mpw-pop-bg"), bg: cs.backgroundColor, bf: cs.backdropFilter, display: cs.display, vis: cs.visibility };
25132
- } catch (e) { return null }
25133
- },
25134
- };
25135
- } catch (e) {}
25115
+ /* 旧名保留(多处调用/探针判据在用) */
25116
+ function mpwPopUntruncSync() { return mpwPopClassifySync() }
25136
25117
 
25137
25118
  function setupPopTagWatch() {
25138
25119
  if (popTagWatch !== null) return;
@@ -25152,6 +25133,7 @@ body[data-mpw-modal] [role="dialog"] {
25152
25133
  这里与弹层标记共用同一个 rAF 合并的入口(要素很少,代价可忽略)。 */
25153
25134
  try { mpwTagSurfaceOuter(); } catch (e) {}
25154
25135
  try { mpwSideLiftSync(); } catch (e) {}
25136
+ try { mpwPopGlassApply(); } catch (e) {}
25155
25137
  /* ①(P3) 弹层开着 ⇒ 摘截断祖先的 blur;关了 ⇒ 还原(同一入口,随突变重算) */
25156
25138
  try { mpwPopUntruncSync(); } catch (e) {}
25157
25139
  } catch (e) {}
@@ -25165,6 +25147,19 @@ body[data-mpw-modal] [role="dialog"] {
25165
25147
  catch (e) { prun(); }
25166
25148
  });
25167
25149
  popTagWatch.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ["class", "style", "data-state", "aria-expanded", "hidden"] });
25150
+ /* ②(2026-10-05) **原生 popover API**(`showPopover()`/`hidePopover()`)打开时不改任何属性、
25151
+ 也没有 childList 突变 ⇒ 上面前两条快路都收不到信号(模型/推理选择器就是这种,真机表现为
25152
+ "打开要等一会儿才有底")。`toggle` 事件在 capture 阶段能收到(它不冒泡)⇒ 当场补一次判定。 */
25153
+ try {
25154
+ document.addEventListener("toggle", (ev) => {
25155
+ try {
25156
+ const t = ev && ev.target;
25157
+ if (t && t.nodeType === 1) mpwTagOnePopover(t);
25158
+ mpwPopUntruncSync();
25159
+ mpwSideLiftSync();
25160
+ } catch (e) {}
25161
+ }, true);
25162
+ } catch (e) {}
25168
25163
  } catch { popTagWatch = null; }
25169
25164
  mpwTagPopoverBg();
25170
25165
  try { mpwPopUntruncSync(); } catch (e) {}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-mpkg-wallpaper",
3
- "version": "3.15.9",
3
+ "version": "3.16.1",
4
4
  "description": "DSH Web 壁纸引擎 Wallpaper Engine mpkg 背景插件:浏览器内直接解析 .mpkg(preview.gif 动态背景/内嵌 mp4 视频/多时段切换),整屏统一虚化/对话框/弹层/遮罩独立虚化、镜头缩放平移、时钟、冲突检测。",
5
5
  "private": false,
6
6
  "type": "module",