dsh-mpkg-wallpaper 3.15.3 → 3.15.4
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 +51 -18
- package/package.json +1 -1
package/lib/client.js
CHANGED
|
@@ -7667,7 +7667,9 @@ function mpwThumbFail(el, why) {
|
|
|
7667
7667
|
el.style.cssText = "position:absolute;inset:0;z-index:0;pointer-events:none;border-radius:inherit;";
|
|
7668
7668
|
hdr.insertBefore(el, hdr.firstChild);
|
|
7669
7669
|
}
|
|
7670
|
-
|
|
7670
|
+
/* ②(2026-10-04) 与侧栏同一条纪律:chrome 表面只做**模糊**,不再叠 saturate(140%)。
|
|
7671
|
+
壁纸层自己已经带了 contrast(1.06) saturate(1.12),再乘 1.4 就是"标题栏比屏幕别处更粉"。 */
|
|
7672
|
+
const bf = blurPx > 0 ? ("blur(" + blurPx + "px)") : "none";
|
|
7671
7673
|
el.style.backdropFilter = bf;
|
|
7672
7674
|
el.style.webkitBackdropFilter = bf;
|
|
7673
7675
|
// header 需要定位上下文;已有就不覆盖(不改变宿主布局)
|
|
@@ -7775,6 +7777,11 @@ function mpwThumbFail(el, why) {
|
|
|
7775
7777
|
透明度 100% 时还留一层模糊(用户 ④⑤⑦)。现在:**透明度 = 0(完全不透明)⇒ 什么都不注入**
|
|
7776
7778
|
(层移除 + 属性撤掉,宿主自己的样子);否则底色/半径都走表面模型。 */
|
|
7777
7779
|
if (planHdr.header.opacityPct >= 100) { cleanup("透明度=0(完全不透明)⇒ 标题栏交还宿主,不注入磨砂层"); return; }
|
|
7780
|
+
/* ②(2026-10-04 与侧栏同一条铁律) 表面**不透明度 ≤ 0**(界面透明度 100%)且不是用户
|
|
7781
|
+
单独配置的档(`indep`)⇒ 我们一个像素都不画,标题栏也**不许留 backdrop-filter**:
|
|
7782
|
+
否则那块壁纸被糊成平均色(用户真机读到的"一层粉色滤镜")。他自己开过标题栏磨砂
|
|
7783
|
+
闸门(indep)时照旧注入 —— 那是他点名要的。 */
|
|
7784
|
+
if (!planHdr.header.indep && planHdr.header.opacityPct <= 0) { cleanup("透明度=100%(无雾层)⇒ 标题栏交还宿主,不注入磨砂层(我们一个像素都不画时不留滤镜)"); return; }
|
|
7778
7785
|
const px = !wanted ? 0
|
|
7779
7786
|
: (un ? Math.max(0, Math.round(planHdr.header.blur || 0))
|
|
7780
7787
|
: (own ? pxFloor(ownAmt, 8)
|
|
@@ -16536,6 +16543,15 @@ module.exports = {
|
|
|
16536
16543
|
uAlpha = 生效**不透明度** = 100 - 「界面透明度」(0 = 不透明、100 = 全透明)。
|
|
16537
16544
|
与模糊彻底解耦:模糊 0 时也照样按透明度透出(背后壁纸是清晰的)。 */
|
|
16538
16545
|
const surfacePlan = mpwSurfacePlan(section);
|
|
16546
|
+
/* ②(2026-10-04 用户真机:"整屏虚化程度调大 ⇒ 左/右侧边栏被叠上一层粉色滤镜;
|
|
16547
|
+
调到 0 就是完全透明的状态")**铁律:我们一个像素都不画时,也不给宿主叠 backdrop-filter。**
|
|
16548
|
+
`backdrop-filter` 不是"我们的表面",而是对宿主内容施加的滤镜 —— 完全没有雾层时它只剩失真:
|
|
16549
|
+
真机档(界面透明度 100% + chatFollow 关 + 整屏虚化 40)下侧栏只剩 blur(40px)+(旧)
|
|
16550
|
+
saturate(140%),那块壁纸被糊成一片平均色(他的壁纸在那里正是粉的)⇒ 读成"被注入粉色滤镜"。
|
|
16551
|
+
判定 = 表面不透明度 ≤ 0 **且** 该项不是用户单独配置的(`indep`:他自己开过那条磨砂闸门
|
|
16552
|
+
⇒ 那是点名要的效果,照给)。 */
|
|
16553
|
+
const leftNoFog = surfacePlan.left.opacityPct <= 0 && !surfacePlan.left.indep;
|
|
16554
|
+
const rightNoFog = surfacePlan.right.opacityPct <= 0 && !surfacePlan.right.indep;
|
|
16539
16555
|
/* ①(2026-10-02 用户拍板 + 真机读数) **透明度 = 0(完全不透明)⇒ 该表面完全不覆盖宿主**:
|
|
16540
16556
|
不写背景色、不写 backdrop-filter、也不透明化宿主的 sidebar-fill token —— 就是"没装插件"的样子。
|
|
16541
16557
|
为什么必须"不写"而不是"写一个 100% 的宿主色":真机读数证实宿主在**打开设置面板**时会把左栏
|
|
@@ -17085,8 +17101,8 @@ html body:not([data-mpw-hdr-blur-element]):not([data-mpw-hdr-frost-el]) .wSkVaW_
|
|
|
17085
17101
|
z-index: -1 !important;
|
|
17086
17102
|
pointer-events: none !important;
|
|
17087
17103
|
border-radius: inherit !important;
|
|
17088
|
-
-webkit-backdrop-filter: blur(var(--mpw-hdr-blur, 24px))
|
|
17089
|
-
backdrop-filter: blur(var(--mpw-hdr-blur, 24px))
|
|
17104
|
+
-webkit-backdrop-filter: blur(var(--mpw-hdr-blur, 24px)) !important;
|
|
17105
|
+
backdrop-filter: blur(var(--mpw-hdr-blur, 24px)) !important;
|
|
17090
17106
|
}
|
|
17091
17107
|
`;
|
|
17092
17108
|
// ①(修正) 标题栏内部白框:unify(透明标题栏)时 session logo 按钮 /
|
|
@@ -17376,8 +17392,8 @@ html body[data-sidebar-right-float-host],
|
|
|
17376
17392
|
html body[data-mpw-rs],
|
|
17377
17393
|
html body[data-dockkit-strip],
|
|
17378
17394
|
html body[data-dockkit-float] {
|
|
17379
|
-
-webkit-backdrop-filter: blur(${rsAmount}px)
|
|
17380
|
-
backdrop-filter: blur(${rsAmount}px)
|
|
17395
|
+
-webkit-backdrop-filter: ${Math.max(0, Number(rsAmount) || 0) > 0 ? `blur(${rsAmount}px)` : "none"};
|
|
17396
|
+
backdrop-filter: ${Math.max(0, Number(rsAmount) || 0) > 0 ? `blur(${rsAmount}px)` : "none"};
|
|
17381
17397
|
background-color: ${rsBg} !important;
|
|
17382
17398
|
}
|
|
17383
17399
|
/* ④(2026-09-11 一行修复) 原为 body:not([data-mpw-rsblur]) 兜底——body 从未设置该属性 → 恒真
|
|
@@ -17399,6 +17415,9 @@ body[data-mpw-rsblur="off"] [data-dockkit-strip], body[data-mpw-rsblur="off"] [d
|
|
|
17399
17415
|
// 它们的 containing block → 面板定位错乱、z-index 失效。展开面板出现时
|
|
17400
17416
|
// JS 打 data-mpw-header-blur-off 摘除(见 setupHeaderBlurWatch)。
|
|
17401
17417
|
// 弹窗打开时 body[data-mpw-sblur-off] 同样摘除(复用侧边栏磨砂机制)。
|
|
17418
|
+
// ②(2026-10-04) 半径也走同一个门:透明 100%(无雾)时这块写 none(= 一个滤镜都不给宿主)。
|
|
17419
|
+
const unifyChromePx = leftNoFog ? 0 : unifyAmount;
|
|
17420
|
+
const unifyChromeCss = unifyChromePx > 0 ? `blur(${unifyChromePx}px)` : "none";
|
|
17402
17421
|
if (unifyAmount > 0 && bdSupported && !chromeInert) { // ③(2026-09-11 一行修复) 去掉 unifyTint/chatFollow 前置条件——默认 chatFollow=true 会让该块永不输出,导致栏/标题栏磨砂在有壁纸时也缺失(用户实测)
|
|
17403
17422
|
css += `
|
|
17404
17423
|
/* ── 统一虚化 + 聊天区不跟随:侧边栏/标题栏背后叠加整屏虚化度(标题栏展开面板
|
|
@@ -17417,8 +17436,8 @@ body[data-mpw-rsblur="off"] [data-dockkit-strip], body[data-mpw-rsblur="off"] [d
|
|
|
17417
17436
|
(见上方 QsffPG_root 规则,z-index:500)→ 浮层在 header 的层叠上下文内部也能压过标题文字。
|
|
17418
17437
|
?hdrblur=pseudo 可切到"仅伪元素"方案(对照排障用)。 */
|
|
17419
17438
|
html body[data-mpw-hdr-blur-element]:not([data-mpw-sblur-off]) .wSkVaW_header {
|
|
17420
|
-
-webkit-backdrop-filter:
|
|
17421
|
-
backdrop-filter:
|
|
17439
|
+
-webkit-backdrop-filter: ${unifyChromeCss} !important;
|
|
17440
|
+
backdrop-filter: ${unifyChromeCss} !important;
|
|
17422
17441
|
}
|
|
17423
17442
|
/* ⑥(2026-09-20) :not([data-mpw-holds-layer]):**该节点是弹层的祖先时绝不给 backdrop-filter**
|
|
17424
17443
|
—— 真机实测这条规则一旦落在 pI_x6G_sidebarCol 上(设置 overlay 的后代祖先链里有它),
|
|
@@ -17426,8 +17445,8 @@ html body[data-mpw-hdr-blur-element]:not([data-mpw-sblur-off]) .wSkVaW_header {
|
|
|
17426
17445
|
按**结构**维护(不依赖 :has()、不依赖弹层可见性/动画进度)。 */
|
|
17427
17446
|
html body:not([data-mpw-sblur-off]).pI_x6G_sidebarCol:not([data-mpw-holds-layer]),
|
|
17428
17447
|
html body:not([data-mpw-sblur-off])[class*="sidebarCol"]:not([data-sidebar-right-panel]):not([data-mpw-holds-layer]) {
|
|
17429
|
-
backdrop-filter:
|
|
17430
|
-
-webkit-backdrop-filter:
|
|
17448
|
+
backdrop-filter: ${unifyChromeCss} !important;
|
|
17449
|
+
-webkit-backdrop-filter: ${unifyChromeCss} !important;
|
|
17431
17450
|
}
|
|
17432
17451
|
html body:has([class*="_overlay"]), html body:has([class*="_modal"]), html body:has([class*="_portal"]) {
|
|
17433
17452
|
--mpw-overlay-open: 1;
|
|
@@ -17464,10 +17483,22 @@ html body:has([class*="_modal"]) [data-mpw-rs] {
|
|
|
17464
17483
|
· 基色 = 宿主的侧栏填充色(不再是我们的纯白 —— 白底/暗色错色都是那条引起的);
|
|
17465
17484
|
· 不透明度 = 100 - 界面透明度(0 = 不透明、100 = 全透明);
|
|
17466
17485
|
· 半径 = 该项独立档用自己那条,否则用统一虚化的(plan 里已算好)。 */
|
|
17467
|
-
|
|
17468
|
-
|
|
17486
|
+
/* ②(2026-10-04 用户真机:"整屏虚化程度调大时左/右侧边栏被叠上一层**粉色滤镜**;
|
|
17487
|
+
调到 0 时就是完全透明的状态")
|
|
17488
|
+
铁律:**我们一个像素都不画(表面不透明度 = 0)时,也不许给宿主叠 backdrop-filter**。
|
|
17489
|
+
为什么:`backdrop-filter` 不是"我们的表面",而是对**宿主内容**施加的滤镜 ——
|
|
17490
|
+
完全没有雾层时它只剩下失真。用户真机档(界面透明度 100% + chatFollow 关 +
|
|
17491
|
+
整屏虚化 40)下,侧栏只剩 `blur(40px) saturate(140%)`:那块壁纸被糊成一片平均色
|
|
17492
|
+
(他的壁纸在那里是粉的)⇒ 读成"被注入一层粉色滤镜"。透明 100% 时他明确要的是
|
|
17493
|
+
"看到壁纸本身",所以:**跟随档下透明 100% ⇒ 半径归 0(写 none)**;
|
|
17494
|
+
用户显式开过该项自己的磨砂(`indep`)时照旧给 —— 那是他点名要的效果。
|
|
17495
|
+
同时把 chrome 表面上的 `saturate(140%)` 一并去掉:壁纸层自己已经带了
|
|
17496
|
+
`contrast(1.06) saturate(1.12)`,再叠 1.4 倍饱和 = 侧栏比屏幕别处**明显更粉**。 */
|
|
17497
|
+
const chromeBlur = leftNoFog ? 0 : Math.max(0, Math.round(surfacePlan.left.blur || 0));
|
|
17498
|
+
const chromeBlurCss = chromeBlur > 0 ? `blur(${chromeBlur}px)` : "none";
|
|
17469
17499
|
const chromeAlpha = Math.max(0, Math.min(1, surfacePlan.left.opacityPct / 100));
|
|
17470
|
-
const rsAmt2 = Math.max(0, Math.round(surfacePlan.right.blur || 0));
|
|
17500
|
+
const rsAmt2 = rightNoFog ? 0 : Math.max(0, Math.round(surfacePlan.right.blur || 0));
|
|
17501
|
+
const rsBlurCss = rsAmt2 > 0 ? `blur(${rsAmt2}px)` : "none";
|
|
17471
17502
|
const rsAlpha2 = Math.max(0, Math.min(1, surfacePlan.right.opacityPct / 100));
|
|
17472
17503
|
/* ①(2026-09-18 §5 第1项) 这几枚原来是这里自建的一个 :root 块 —— 现在统一登记进
|
|
17473
17504
|
SSOT(emitSurfaceTokens 输出的那个 :root),值逐字不变;原来是"本块自己的
|
|
@@ -17491,12 +17522,14 @@ html body:has([class*="_modal"]) [data-mpw-rs] {
|
|
|
17491
17522
|
所以"统一虚化程度/透明度都拉到 0"时右栏/dock 也是干净的透出,不留采样色。 */
|
|
17492
17523
|
const fogCss = mpwFogModel(section);
|
|
17493
17524
|
const unifyTakeover = unifyFollowNow && hasImage && !rightInert;
|
|
17494
|
-
const unifyBlurCss = fogCss.amountPx > 0 ? `blur(${fogCss.amountPx}px)
|
|
17525
|
+
const unifyBlurCss = (!rightNoFog && fogCss.amountPx > 0) ? `blur(${fogCss.amountPx}px)` : "none";
|
|
17495
17526
|
/* ⚠️ 三枚 token **只在接管时**输出:不接管时产物里连变量名都不该出现
|
|
17496
17527
|
(tools/fog-model-test 的 B3/E3 判据:不跟随时 `--mpw-unify-*` 必须为 0 处),
|
|
17497
17528
|
否则"有一枚没人用的 token"会被当成"接管逻辑还在"。 */
|
|
17498
17529
|
if (unifyTakeover) {
|
|
17499
|
-
|
|
17530
|
+
/* ②(2026-10-04) 半径同样走"无雾 ⇒ 0"的生效值(与 unifyBlurCss 同源):
|
|
17531
|
+
否则诊断/探针会读到"接管档 40px"而 CSS 实际写 none,两处口径不一致。 */
|
|
17532
|
+
tok("--mpw-unify-blur", (rightNoFog ? 0 : Math.max(0, Math.round(surfacePlan.right.blur || 0))) + "px");
|
|
17500
17533
|
tok("--mpw-unify-surface", mpwSurfaceColor(surfacePlan.right.base, surfacePlan.right.opacityPct / 100));
|
|
17501
17534
|
tok("--mpw-unify-surface-dark", mpwSurfaceColor(surfacePlan.right.base, surfacePlan.right.opacityPct / 100));
|
|
17502
17535
|
}
|
|
@@ -17540,8 +17573,8 @@ ${rightInert ? "" : `html body[data-mpw-rsblur="on"] [data-sidebar-right-panel],
|
|
|
17540
17573
|
html body[data-mpw-rsblur="on"] [data-dockkit-pane],
|
|
17541
17574
|
html body[data-mpw-rsblur="on"] [data-dockkit-strip],
|
|
17542
17575
|
html body[data-mpw-rsblur="on"] [data-dockkit-surface] {
|
|
17543
|
-
-webkit-backdrop-filter:
|
|
17544
|
-
backdrop-filter:
|
|
17576
|
+
-webkit-backdrop-filter: ${rsBlurCss} !important;
|
|
17577
|
+
backdrop-filter: ${rsBlurCss} !important;
|
|
17545
17578
|
background-color: var(--mpw-surface-rs-dock) !important;
|
|
17546
17579
|
}`}
|
|
17547
17580
|
/* 抑制:弹窗/设置面板打开时(backdrop-filter 会成为 fixed 弹窗的 containing block → 必须摘除) */
|
|
@@ -17784,8 +17817,8 @@ html body [data-rightbar-fullscreen] [data-sidebar-right-panel],
|
|
|
17784
17817
|
html body .pI_x6G_frame[data-rightbar-fullscreen] [class*="P3OORG_panel"],
|
|
17785
17818
|
html body [data-rightbar-fullscreen] [class*="P3OORG_panel"] {
|
|
17786
17819
|
z-index: 40 !important;
|
|
17787
|
-
-webkit-backdrop-filter:
|
|
17788
|
-
backdrop-filter:
|
|
17820
|
+
-webkit-backdrop-filter: ${rsBlurCss} !important;
|
|
17821
|
+
backdrop-filter: ${rsBlurCss} !important;
|
|
17789
17822
|
background-color: var(--mpw-surface-rs-full) !important;
|
|
17790
17823
|
}
|
|
17791
17824
|
/* 全屏时把聊天输入框区域压到右栏之下(即便它有自己的 stacking context 也不会盖住卡片圆角) */
|
package/package.json
CHANGED