dsh-liquid-glass 0.1.0 → 0.3.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/README.md +52 -7
- package/README.zh.md +50 -7
- package/lib/client.js +884 -398
- package/package.json +11 -9
package/README.md
CHANGED
|
@@ -2,9 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
English | [中文](README.zh.md)
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
[](https://www.npmjs.com/package/dsh-liquid-glass)
|
|
6
|
+
[](LICENSE)
|
|
7
|
+
[](https://github.com/deepseek-ai/deepseek-harness)
|
|
6
8
|
|
|
7
|
-
|
|
9
|
+
**Theme backgrounds for [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness)** — translucent surfaces with image or local video backgrounds.
|
|
10
|
+
|
|
11
|
+
Translucent theme surfaces and scoped frosted menus over your own background image, with material presets, tint, wallpaper controls, and system accessibility response. Current version: **0.3.0**. A community plugin that reuses the host’s official controls where available.
|
|
8
12
|
|
|
9
13
|
## Install
|
|
10
14
|
|
|
@@ -12,13 +16,54 @@ Translucency built for DeepSeek Harness: the page base, cards, panels and chat b
|
|
|
12
16
|
dsh plugin --profile web add dsh-liquid-glass
|
|
13
17
|
```
|
|
14
18
|
|
|
15
|
-
|
|
19
|
+
Run the command in a terminal. In the app’s Add plugin field, enter only `dsh-liquid-glass`.
|
|
20
|
+
|
|
21
|
+
Open **Settings → General → Theme background**, immediately below Appearance. Expand the official chevron for basic options; advanced options remain collapsed. The switch controls glass and image/video backgrounds together, retaining preferences when disabled. Restart the host after upgrading. Enter `dsh-liquid-glass@0.3.0` in the app’s plugin field, not the full terminal command.
|
|
22
|
+
|
|
23
|
+
## Screenshots
|
|
24
|
+
|
|
25
|
+
Captured from the actual package in official DSH 0.2.2-rc.2 Web, using original local demonstration media. The light settings view uses 3% transparency; the dark background view uses the Clear preset.
|
|
26
|
+
|
|
27
|
+

|
|
28
|
+
|
|
29
|
+

|
|
30
|
+
|
|
31
|
+

|
|
32
|
+
|
|
33
|
+

|
|
16
34
|
|
|
17
35
|
## What you get
|
|
18
36
|
|
|
19
|
-
- **
|
|
20
|
-
- **
|
|
21
|
-
- **
|
|
37
|
+
- **Host controls**: reuse Switch, Button, Input, Checkbox, Menu, Modal and chevron icons. No public settings-row or slider component exists; a small layout adapter handles these without private CSS classes.
|
|
38
|
+
- **Local video backgrounds**: select MP4/WebM up to 100 MiB, with a browser-supported codec. Validated files preview immediately and are saved locally only after Save; playback loops muted; pause, resume and removal are available. Hidden pages and reduced-motion preferences pause playback. No video URLs, audio or playlists.
|
|
39
|
+
- **Visual cards**: three material previews and one permanent image/video uploader, with click or drag-and-drop selection. Replace and red remove controls sit over the thumbnail; no separate filename or media-description row.
|
|
40
|
+
- **Background drafts**: add, replace or remove to preview immediately; Save commits the selection. Closing settings, switching menus or collapsing the section prompts Save and leave, Discard changes or Keep editing. Discard restores the saved background.
|
|
41
|
+
- **Compact defaults**: presets, transparency and background selection; tint, frost, fit and reading protection live under Advanced. Reset preserves the background and master switch.
|
|
42
|
+
|
|
43
|
+
- **Theme surface transparency** through the official ThemeRuntime tokens, with a 3%–95% transparency slider.
|
|
44
|
+
- **Regular, Clear, and Frost presets**, plus cool white, warm gray, and ink tints. Manual transparency fine-tunes the selected preset.
|
|
45
|
+
- **Scoped menu frost** with an independent switch, a settings-card rim color, and a material preview with an inset highlight. Host filter placement stays unchanged.
|
|
46
|
+
- **Wallpaper controls**: cover/contain/fill, nine positions, brightness 20%–200%, and manual dim 0%–60%. With reading protection enabled, videos and bright local or same-origin images receive at least 35% dim; cross-origin links use manual dim only. Large static uploads are compressed; GIF data is preserved.
|
|
47
|
+
- **System accessibility response**: reduced transparency or increased contrast selects effective Frost material and limits transparency to 50%, without overwriting saved preferences.
|
|
48
|
+
- **Keyboard toggle**: Ctrl/Cmd+Shift+G through the host shortcut service. Change or remove “Toggle Liquid Glass” in the host Keyboard shortcuts settings. Linux Web starts unbound; conflicting defaults fall back to an unbound command.
|
|
49
|
+
|
|
50
|
+
Independent user/assistant opacity floors and general host-panel blur/highlights are not implemented: verified official extension hooks are missing. See [local API evidence and validation limits](docs/v0.2.0-local-evidence.md). See [theme background validation](docs/theme-background-validation.md) for this change.
|
|
51
|
+
|
|
52
|
+
## Privacy and compatibility
|
|
53
|
+
|
|
54
|
+
The host has no public settings leave-guard API. Unsaved-change protection uses a small adapter for the 0.2.2-rc.2 settings structure and needs regression checks after host updates.
|
|
55
|
+
|
|
56
|
+
- Preferences and images use origin-local `localStorage`; video Blobs use IndexedDB. Media is not shared across browsers or origins, and clearing site data deletes saved videos; the plugin has no server component and sends no telemetry.
|
|
57
|
+
- The UI integrates through DeepSeek Harness's public client runtime, locale, slot, theme, and shortcut APIs. Shortcut bindings use host-managed device-local storage (localStorage on Web; keybindings.json on Desktop).
|
|
58
|
+
- Light and dark color schemes are supported. A DSH restart is required once after installation so the client bundle can be loaded.
|
|
59
|
+
|
|
60
|
+
## Verify from source
|
|
61
|
+
|
|
62
|
+
The smoke test runs the published client bundle inside a mocked DSH browser runtime and exercises registration, lifecycle, settings, persistence, wallpaper controls and slider bounds:
|
|
63
|
+
|
|
64
|
+
```sh
|
|
65
|
+
node test/smoke.test.mjs
|
|
66
|
+
```
|
|
22
67
|
|
|
23
68
|
## Uninstall
|
|
24
69
|
|
|
@@ -26,7 +71,7 @@ Open **Settings → General** — a **Liquid Glass** row appears. It is ON by de
|
|
|
26
71
|
dsh plugin --profile web remove dsh-liquid-glass
|
|
27
72
|
```
|
|
28
73
|
|
|
29
|
-
|
|
74
|
+
Remove the background in settings before uninstalling if desired. Uninstalling does not automatically clear localStorage or IndexedDB; saved videos still consume local storage. Do not erase all host site data just to clean this plugin.
|
|
30
75
|
|
|
31
76
|
## License
|
|
32
77
|
|
package/README.zh.md
CHANGED
|
@@ -2,9 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
[English](README.md) | 中文
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
[](https://www.npmjs.com/package/dsh-liquid-glass)
|
|
6
|
+
[](LICENSE)
|
|
7
|
+
[](https://github.com/deepseek-ai/deepseek-harness)
|
|
6
8
|
|
|
7
|
-
|
|
9
|
+
**[DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) 的主题背景插件**:调整界面通透效果,设置图片或视频背景。
|
|
10
|
+
|
|
11
|
+
通过官方主题接口提供表面透明化、弹出菜单模糊、自定义壁纸、质感预设、色调和系统无障碍响应。当前版本 **0.3.0**。社区插件,界面尽量复用宿主提供的官方组件。
|
|
8
12
|
|
|
9
13
|
## 安装
|
|
10
14
|
|
|
@@ -12,13 +16,52 @@
|
|
|
12
16
|
dsh plugin --profile web add dsh-liquid-glass
|
|
13
17
|
```
|
|
14
18
|
|
|
15
|
-
|
|
19
|
+
终端中运行上面的命令;如果使用应用的「添加插件」输入框,只填 `dsh-liquid-glass`。
|
|
20
|
+
|
|
21
|
+
入口为 **设置 → 通用 → 外观下方的「主题背景」**,默认折叠。点击官方箭头展开基础选项;高级选项再次折叠。开关同时控制透明效果和图片/视频背景,关闭不丢失偏好。升级后重启宿主。应用内安装框填写 `dsh-liquid-glass@0.3.0`,不要粘贴完整终端命令。
|
|
22
|
+
|
|
23
|
+
## 截图
|
|
24
|
+
|
|
25
|
+
实际安装包在官方 DSH 0.2.2-rc.2 Web 宿主中的截图;背景为本地原创演示素材。浅色设置截图使用 3% 透明度,深色背景截图使用“清透”预设。
|
|
26
|
+
|
|
27
|
+

|
|
28
|
+
|
|
29
|
+

|
|
30
|
+
|
|
31
|
+

|
|
32
|
+
|
|
33
|
+

|
|
16
34
|
|
|
17
35
|
## 功能
|
|
18
36
|
|
|
19
|
-
-
|
|
20
|
-
-
|
|
21
|
-
-
|
|
37
|
+
- **统一的设置控件**:复用宿主 Switch、Button、Input、Checkbox、Menu、Modal 和折叠图标。宿主没有公开设置行或滑块组件,相关布局仅作小范围适配,不导入内部样式类。
|
|
38
|
+
- **本地视频背景**:选择 MP4/WebM(不超过 100 MiB,需浏览器支持对应编码)验证后立即预览,点击“保存”后写入本地;静音循环,可暂停/播放、移除。页面不可见或系统启用“减少动态效果”时自动暂停。暂不支持视频 URL、声音、播放列表。
|
|
39
|
+
- **卡片式选择**:三张质感预览卡片;图片和视频共用常驻上传卡片,支持点击或拖放。更换和红色移除按钮位于缩略图浮层内,不再额外显示文件名或媒体描述。
|
|
40
|
+
- **背景草稿**:添加、更换和移除立即预览,点击“保存”才持久化。关闭设置、切换菜单或收起主题背景时,有未保存更改会弹出“保存并离开/放弃更改/继续编辑”;放弃会恢复已保存背景。
|
|
41
|
+
- **精简默认界面**:仅展开预设、透明度和背景选择;色调、弹出菜单模糊、背景适配与阅读保护放在高级设置。恢复效果默认值保留背景和总开关。
|
|
42
|
+
|
|
43
|
+
- **主题表面透明化**:经官方 ThemeRuntime token 覆盖层生效,透明度主滑块范围为 3%–95%。
|
|
44
|
+
- **标准、清透、磨砂三档预设**,另有冷白、暖灰、墨色;可用透明度滑块微调。
|
|
45
|
+
- **弹出菜单模糊**:可独立关闭;设置卡片使用官方描边色,插件预览面板带内侧高光。宿主原有滤镜作用位置不变。
|
|
46
|
+
- **壁纸控制**:铺满/完整显示/拉伸、九个位置、20%–200% 亮度、0%–60% 手动暗化。启用阅读保护时,视频和明亮的本地或同源图片至少暗化 35%;跨域链接只使用手动暗化。静态大图自动压缩,GIF 保留原始数据。
|
|
47
|
+
- **系统无障碍响应**:减透明或增强对比度启用时,临时使用磨砂质感并将透明度限制为最高 50%,不覆盖用户保存的偏好。
|
|
48
|
+
- **快捷键切换**:经宿主快捷键服务注册 Ctrl/Cmd+Shift+G,在宿主「键盘快捷键」设置中可更改或移除「切换液态玻璃」。Linux 网页端默认不绑定;默认组合冲突时退为未绑定命令。
|
|
49
|
+
|
|
50
|
+
人/助手独立消息不透明度下限,以及任意宿主面板的磨砂/内侧高光,因缺少已核实的官方扩展接口而未实现。参见[本地 API 证据与验证限制](docs/v0.2.0-local-evidence.md)。本次验证记录见 [主题背景验证](docs/theme-background-validation.md)。
|
|
51
|
+
|
|
52
|
+
## 隐私与兼容性
|
|
53
|
+
|
|
54
|
+
- 偏好和图片保存在当前站点的 `localStorage`,视频 Blob 保存在 IndexedDB 中;不同浏览器或站点不共享,清除站点数据会删除保存的视频;插件没有服务端组件,也不发送遥测数据。
|
|
55
|
+
- 主要通过 DeepSeek Harness 的公开客户端运行时、语言、插槽、主题和快捷键 API 集成。宿主暂未公开设置离开拦截接口,未保存提示使用面向 0.2.2-rc.2 设置结构的小范围适配,宿主升级后需回归验证。快捷键绑定由宿主管理,网页端用 localStorage,桌面端用设备本地 keybindings.json。
|
|
56
|
+
- 支持亮色和暗色方案。安装后需要重启一次 DSH,以便加载客户端 bundle。
|
|
57
|
+
|
|
58
|
+
## 从源码验证
|
|
59
|
+
|
|
60
|
+
冒烟测试会在模拟的 DSH 浏览器运行时中执行实际发布的客户端 bundle,覆盖注册、生命周期、设置、持久化、壁纸控制和滑块边界:
|
|
61
|
+
|
|
62
|
+
```sh
|
|
63
|
+
node test/smoke.test.mjs
|
|
64
|
+
```
|
|
22
65
|
|
|
23
66
|
## 卸载
|
|
24
67
|
|
|
@@ -26,7 +69,7 @@ dsh plugin --profile web add dsh-liquid-glass
|
|
|
26
69
|
dsh plugin --profile web remove dsh-liquid-glass
|
|
27
70
|
```
|
|
28
71
|
|
|
29
|
-
|
|
72
|
+
卸载前可在设置中移除背景。卸载插件不会自动清理站点的 localStorage 或 IndexedDB;保留的视频仍占用本地存储。不要为了清理本插件而删除宿主的全部站点数据。
|
|
30
73
|
|
|
31
74
|
## 许可证
|
|
32
75
|
|