beauticode-dsh 1.0.27 → 1.0.29
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/README.zh-CN.md +6 -0
- package/atmosphere.js +7 -1
- package/client.js +2 -47
- package/package.json +1 -1
package/README.zh-CN.md
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
该 Cordis 插件向 DSH Web 和官方 Desktop 注入 beautiCode 浏览器客户端,并提供本机鉴权接口。支持图片、MP4 / MOV、播放位置、静音、摸鱼模式以及清除背景。Web 和 Desktop 使用同一组结构化页面注入;Desktop 的页面请求经原生壳转发,回执由每次 Host 启动生成的页面密钥验证。
|
|
4
4
|
|
|
5
|
+
DSH Web 和 Desktop 启动及普通点击不会自动进入全屏。需要全屏时,在「设置 → 背景 → 全屏显示」中主动开启,按 `Esc` 或点击「退出全屏」退出。
|
|
6
|
+
|
|
5
7
|
## 官方 Desktop
|
|
6
8
|
|
|
7
9
|
先启动 Desktop 一次,让它创建 `desktop` profile,然后从系统托盘明确退出(关闭窗口通常只会隐藏)。可在 Desktop 的插件页面安装 `beauticode-dsh`,或使用 **Desktop 安装的** `dsh` 命令:
|
|
@@ -62,3 +64,7 @@ npx @deepseek-ai/dsh web
|
|
|
62
64
|
4. 打开页面后在「设置」里点「背景」,或输入 `/bg <本机绝对路径>`,或直接跟 AI 说把某个视频/图片设为背景。
|
|
63
65
|
|
|
64
66
|
安全边界:DSH Web 必须绑定本机回环地址;控制端点需要随机令牌;媒体 URL 仅允许带令牌的回环 HTTP 地址;浏览器回执只接受同源请求。
|
|
67
|
+
|
|
68
|
+
## 1.0.29 背景修复
|
|
69
|
+
|
|
70
|
+
画窗现在响应背景磨砂和阴影滑块,并随 DSH 深浅色切换遮罩。背景模式保留宿主的渐隐滚动内容,修复长思考展开后的持续抖动(#86、#87)。
|
package/atmosphere.js
CHANGED
|
@@ -74,6 +74,11 @@
|
|
|
74
74
|
#beauticode-gallery-bg{position:fixed;inset:0;z-index:0;overflow:hidden;pointer-events:none;background:#0b1018}
|
|
75
75
|
#beauticode-gallery-bg img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:center center;display:block;pointer-events:none;z-index:0;image-rendering:auto;-webkit-backface-visibility:hidden}
|
|
76
76
|
#beauticode-gallery-bg canvas{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;z-index:1;mix-blend-mode:soft-light;opacity:.32}
|
|
77
|
+
/* Gallery replaces the ordinary media stage: consume the same preferences
|
|
78
|
+
here, with the dim layer above water highlights and below foreground UI (#86). */
|
|
79
|
+
html[data-bc-gallery="true"][data-bc-bg-blur="true"] #beauticode-gallery-bg img{filter:blur(var(--bc-bg-blur,0px))}
|
|
80
|
+
html[data-bc-gallery="true"][data-bc-dim-user="true"] #beauticode-gallery-bg::after{content:"";position:absolute;inset:0;z-index:2;pointer-events:none;background:rgba(0,0,0,var(--bc-dim))}
|
|
81
|
+
html[data-bc-gallery="true"][data-bc-dim-user="true"][data-bc-resolved-tone="light"] #beauticode-gallery-bg::after{background:rgba(255,255,255,var(--bc-dim))}
|
|
77
82
|
html[data-bc-gallery="true"] #beauticode-bg-stage{background:transparent!important}
|
|
78
83
|
html[data-bc-gallery="true"] #beauticode-bg-stage::after{display:none!important;background:transparent!important}
|
|
79
84
|
html[data-bc-gallery="true"],html[data-bc-gallery="true"] body{background:transparent!important}
|
|
@@ -92,7 +97,8 @@ html[data-bc-resolved-tone="light"][data-bc-gallery="true"] body{
|
|
|
92
97
|
--dsw-specific-sidebar-fill:rgba(255,255,255,.36);
|
|
93
98
|
}
|
|
94
99
|
html[data-bc-gallery="true"] #root{position:relative;z-index:1;background:transparent!important}
|
|
95
|
-
|
|
100
|
+
/* Native fade classes belong to scroll content, not decorative overlays.
|
|
101
|
+
Hiding them feeds zero geometry back into DSH's ResizeObserver loop (#87). */
|
|
96
102
|
html[data-bc-gallery="true"] #beauticode-bg-stage img,
|
|
97
103
|
html[data-bc-gallery="true"] #beauticode-bg-stage video{opacity:0!important}
|
|
98
104
|
html[data-bc-fish="true"] #root{opacity:0!important;visibility:hidden!important;pointer-events:none!important}
|
package/client.js
CHANGED
|
@@ -210,7 +210,8 @@ html[data-bc-bg-blur="true"] #beauticode-bg-stage .beauticode-media-slot video{
|
|
|
210
210
|
}
|
|
211
211
|
@media (prefers-reduced-motion:reduce){#beauticode-bg-stage .beauticode-media-slot,#beauticode-bg-stage .beauticode-media-slot img,#beauticode-bg-stage .beauticode-media-slot video{transition:none!important}}
|
|
212
212
|
html[data-bc-active="true"] #root{position:relative;z-index:1;background:transparent!important}
|
|
213
|
-
|
|
213
|
+
/* Preserve DSH's native fading scroll bodies; hiding them causes the
|
|
214
|
+
ResizeObserver to alternate content between visible and zero height (#87). */
|
|
214
215
|
html[data-bc-fish="true"] #root{opacity:0!important;visibility:hidden!important;pointer-events:none!important}
|
|
215
216
|
`;
|
|
216
217
|
document.head.append(style);
|
|
@@ -1861,50 +1862,4 @@ html[data-bc-fish="true"] #root{opacity:0!important;visibility:hidden!important;
|
|
|
1861
1862
|
}).catch(() => {});
|
|
1862
1863
|
}
|
|
1863
1864
|
}, 1_000);
|
|
1864
|
-
|
|
1865
|
-
// Fullscreen by default. A browser only grants fullscreen from inside a user
|
|
1866
|
-
// gesture, so a page cannot open in it; the closest honest reading of
|
|
1867
|
-
// "starts fullscreen" is the first click after load. Typing in the composer
|
|
1868
|
-
// must not count: DSH's main action is a keydown. Escape or the settings row
|
|
1869
|
-
// still exits. Stay armed until the request actually succeeds — a rejected
|
|
1870
|
-
// first gesture used to spend the listener and leave the page windowed.
|
|
1871
|
-
function armFullscreenDefault() {
|
|
1872
|
-
const root = document.documentElement;
|
|
1873
|
-
if (typeof root?.requestFullscreen !== "function" &&
|
|
1874
|
-
typeof root?.webkitRequestFullscreen !== "function") {
|
|
1875
|
-
return;
|
|
1876
|
-
}
|
|
1877
|
-
let spent = false;
|
|
1878
|
-
const enter = () => {
|
|
1879
|
-
if (spent) return;
|
|
1880
|
-
if (document.fullscreenElement || document.webkitFullscreenElement) {
|
|
1881
|
-
spent = true;
|
|
1882
|
-
document.removeEventListener?.("pointerdown", enter, true);
|
|
1883
|
-
return;
|
|
1884
|
-
}
|
|
1885
|
-
for (const name of ["requestFullscreen", "webkitRequestFullscreen"]) {
|
|
1886
|
-
const request = root?.[name];
|
|
1887
|
-
if (typeof request !== "function") continue;
|
|
1888
|
-
let started;
|
|
1889
|
-
try {
|
|
1890
|
-
started = request.call(root, { navigationUI: "hide" });
|
|
1891
|
-
} catch {
|
|
1892
|
-
continue;
|
|
1893
|
-
}
|
|
1894
|
-
Promise.resolve(started).then(
|
|
1895
|
-
() => {
|
|
1896
|
-
spent = true;
|
|
1897
|
-
document.removeEventListener?.("pointerdown", enter, true);
|
|
1898
|
-
},
|
|
1899
|
-
() => {
|
|
1900
|
-
/* gesture rejected — stay armed for the next click */
|
|
1901
|
-
},
|
|
1902
|
-
);
|
|
1903
|
-
return;
|
|
1904
|
-
}
|
|
1905
|
-
};
|
|
1906
|
-
document.addEventListener?.("pointerdown", enter, { capture: true });
|
|
1907
|
-
}
|
|
1908
|
-
|
|
1909
|
-
armFullscreenDefault();
|
|
1910
1865
|
})();
|