dsh-prism-plugin 0.0.0-stage → 3.0.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/LICENSE +21 -0
- package/README.i18n.yaml +6 -0
- package/README.md +119 -2
- package/README.zh.md +120 -0
- package/assets/icon-180.png +0 -0
- package/cordis.patch.yml +9 -0
- package/lib/client.js +4191 -0
- package/lib/index.js +11 -0
- package/lib/invariant.js +19 -0
- package/lib/types/client/PrismAppearancePanel.d.ts +50 -0
- package/lib/types/client/color.d.ts +24 -0
- package/lib/types/client/controls.d.ts +105 -0
- package/lib/types/client/fonts.d.ts +27 -0
- package/lib/types/client/index.d.ts +12 -0
- package/lib/types/client/locales.d.ts +251 -0
- package/lib/types/client/prism-settings.d.ts +251 -0
- package/lib/types/client/settings-store.d.ts +31 -0
- package/lib/types/client/spring.d.ts +56 -0
- package/lib/types/client/theme-io.d.ts +33 -0
- package/lib/types/client/theme-layer.d.ts +185 -0
- package/lib/types/client/tokens.d.ts +16 -0
- package/lib/types/client/video-store.d.ts +49 -0
- package/lib/types/client/wallpaper.d.ts +112 -0
- package/lib/types/index.d.ts +10 -0
- package/lib/types/invariant.d.ts +16 -0
- package/package.json +111 -4
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 DeepSeek
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.i18n.yaml
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
# Bilingual-pair consistency record (docs/i18n/README.md): the git blob hash of each
|
|
2
|
+
# side as of the last confirmed-consistent state. Both languages carry equal authority;
|
|
3
|
+
# after editing either side, bring the other along and re-record with:
|
|
4
|
+
# pnpm run verify-translation-pairing --write packages/client/ui-prism/README.md
|
|
5
|
+
README.md: bb872188f9c40a837f46f465be3796cabd40da4e
|
|
6
|
+
README.zh.md: b7b3862b6fe25dce802597a4960864bea0ae0bad
|
package/README.md
CHANGED
|
@@ -1,3 +1,120 @@
|
|
|
1
|
-
#
|
|
1
|
+
# DSH Background — Custom Background Images & Glassmorphism
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
**DSH Background** lets you upload your own photos or animated GIFs as the [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) Web GUI background, choose which of them join the carousel, reorder them by dragging, then tune glassmorphism, opacity, typography, colors, and motion. Version 2.0.10 is tested against DSH `0.2.2-rc.3`, retains compatibility with `0.2.2-rc.1+`, and ships prebuilt in `lib/`; installing the plugin does not require a build step.
|
|
4
|
+
|
|
5
|
+
## Screenshots
|
|
6
|
+
|
|
7
|
+
| Dark workspace · photo wallpaper | Dark workspace · water wallpaper |
|
|
8
|
+
|---|---|
|
|
9
|
+
|  |  |
|
|
10
|
+
|
|
11
|
+
| Light workspace · sky wallpaper | Background studio |
|
|
12
|
+
|---|---|
|
|
13
|
+
|  |  |
|
|
14
|
+
|
|
15
|
+
| Themes and presets | Materials and zone opacity |
|
|
16
|
+
|---|---|
|
|
17
|
+
|  |  |
|
|
18
|
+
|
|
19
|
+
| Typography |
|
|
20
|
+
|---|
|
|
21
|
+
|  |
|
|
22
|
+
|
|
23
|
+
## Features at a glance
|
|
24
|
+
|
|
25
|
+
| Feature | 功能 |
|
|
26
|
+
|---|---|
|
|
27
|
+
| Upload your own photos or GIFs, one or many at a time | 上传自己的照片或 GIF 动图,支持一次多选 |
|
|
28
|
+
| Photo, GIF, and MP4/WebM backdrops stored in IndexedDB so clips never eat the settings quota | 照片、GIF 与 MP4/WebM 视频背景;视频存 IndexedDB,不占设置配额 |
|
|
29
|
+
| Separate light and dark playlists that follow the appearance mode | 亮色与暗色各一套背景列表,跟随明暗模式切换 |
|
|
30
|
+
| Per-image carousel selection: the corner badge decides which images rotate | 每张图独立参与轮播,右下角角标决定是否轮播 |
|
|
31
|
+
| Unselected images recede behind blur and frost, and sharpen when picked again | 未选中的图变模糊起雾,重新选中即恢复清晰 |
|
|
32
|
+
| Drag thumbnails to change the carousel order | 拖动缩略图即可调整轮播顺序 |
|
|
33
|
+
| Fixed or timed playback with an adjustable interval | 固定单张或定时轮播,间隔可调 |
|
|
34
|
+
| Clear, frosted, and velvet materials with separate blur and frost controls | 清透 / 磨砂 / 毛绒三档材质,模糊与磨砂强度分别可调 |
|
|
35
|
+
| Six independent zone opacities: base, sidebar, cards, inputs, overlays, bubbles | 六个区域独立透明度:主背景、侧边栏、卡片、输入框、弹层、气泡 |
|
|
36
|
+
| Accent, backdrop, and separate light/dark text colours | 强调色、底色,以及亮色 / 暗色文字各自独立 |
|
|
37
|
+
| Font family and scale applied to the whole workspace | 字体族与字号,作用于整个工作区 |
|
|
38
|
+
| Six presets plus portable custom themes exchanged as versioned JSON | 六套预设,外加可迁移的自定义主题(带版本号的 JSON) |
|
|
39
|
+
| Animated aurora, spring-damped transitions, and reduced-motion support | 流光极光、弹性过渡,并跟随系统「减弱动效」 |
|
|
40
|
+
| Master switch, `localStorage` persistence, and cross-tab sync | 总开关、`localStorage` 持久化、跨标签页同步 |
|
|
41
|
+
|
|
42
|
+
## Install
|
|
43
|
+
|
|
44
|
+
Requires DeepSeek Harness `0.2.2-rc.1` or later in the `0.2.x` series.
|
|
45
|
+
|
|
46
|
+
### Desktop app
|
|
47
|
+
|
|
48
|
+
Open **Settings → Plugins → Add plugin** and enter:
|
|
49
|
+
|
|
50
|
+
```text
|
|
51
|
+
github:mantonlove/dsh-prism-plugin
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
For local development, use `link:/absolute/path/to/dsh-prism-plugin` instead. Linked builds can be hot-applied; refresh the Web GUI if necessary.
|
|
55
|
+
|
|
56
|
+
### npm
|
|
57
|
+
|
|
58
|
+
```sh
|
|
59
|
+
dsh plugin --profile web add dsh-prism-plugin
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Or install straight from the repository:
|
|
63
|
+
|
|
64
|
+
```sh
|
|
65
|
+
dsh plugin --profile web add github:mantonlove/dsh-prism-plugin
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
Restart `dsh web` and refresh the page. Open **设置 → 通用设置 → 外观 → DSH Background** to use the theme studio. The master switch is built into the DSH Background panel.
|
|
69
|
+
|
|
70
|
+
Uninstall:
|
|
71
|
+
|
|
72
|
+
```sh
|
|
73
|
+
dsh plugin --profile web remove dsh-prism-plugin
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
> **Upgrading from v2?** v3 renamed the package to `dsh-prism-plugin`. Remove the old entry first — both versions register the same `ui-prism` layer, so leaving both installed loads the theme twice:
|
|
77
|
+
>
|
|
78
|
+
> ```sh
|
|
79
|
+
> dsh plugin --profile web remove @deepseek-ai/dsh-client-ui-prism
|
|
80
|
+
> ```
|
|
81
|
+
|
|
82
|
+
## What’s new in v3
|
|
83
|
+
|
|
84
|
+
- **npm distribution:** published as `dsh-prism-plugin`, so installs resolve through the npm registry and download counts become visible in plugin markets.
|
|
85
|
+
- **Package rename:** the old `@deepseek-ai/dsh-client-ui-prism` name is retired; the `ui-prism` layer id and the `dsh.ui-prism.settings.v1` storage key are unchanged, so saved themes, wallpapers, and preferences carry over.
|
|
86
|
+
|
|
87
|
+
## What’s new in v2
|
|
88
|
+
|
|
89
|
+
- **DSH 0.2.2-rc.3 compatibility:** supports the new sidebar-glass and card token family and opens the workspace columns to the backdrop, while retaining the rc.1/rc.2 token names.
|
|
90
|
+
- **Six visual presets:** Night, Aurora, Crystal, Dune, Rose, and Forest apply a complete, coordinated appearance recipe.
|
|
91
|
+
- **Portable custom themes:** save up to 24 named looks, apply or delete them, and exchange versioned JSON theme files. Import validates every value before applying it; duplicate names receive numeric suffixes instead of overwriting an existing look.
|
|
92
|
+
- **Task-oriented studio:** Themes, Glass, Backdrop, and Type tabs replace the old accordion and the retired `settings.plugin.item` master card.
|
|
93
|
+
- **Clearer controls:** accessible switches and buttons, selected/focus/disabled states, keyboard-operated sliders, double-click slider reset, and section-level zone reset.
|
|
94
|
+
- **Live miniature preview:** inspect the active palette and material before changing the main interface.
|
|
95
|
+
- **Reworked preset and material pickers:** presets are two-column rows whose colour chip carries the backdrop, accent, and a diagonal light trace; materials reuse the same trace in sharp, diffused, and softened treatments so clear, frosted, and velvet can be compared side by side before choosing.
|
|
96
|
+
|
|
97
|
+
## Theme features
|
|
98
|
+
|
|
99
|
+
- Clear, frosted, and velvet materials; blur and global frost; six independent zone opacities for the base, sidebar, cards, inputs, overlays, and bubbles.
|
|
100
|
+
- Hex and color-picker controls for the accent, backdrop, and light/dark text colors.
|
|
101
|
+
- **Custom backgrounds, still or moving:** upload several photos, animated GIFs, or MP4/WebM clips at once into separate light/dark playlists (clips are stored in IndexedDB, play muted on a loop, and pause when the window loses focus); switch between fixed and automatic playback. The checkbox in each thumbnail's bottom-right corner decides whether that image joins the carousel (unchecked ones blur behind a frosted veil), and dragging the top-left grip changes the playback order.
|
|
102
|
+
- Spring-damped adjustments, font scale and family, and animated aurora.
|
|
103
|
+
- A master switch that restores the stock interface, persistent `localStorage` settings, cross-tab synchronization, and reduced-motion support.
|
|
104
|
+
- Theme exports contain appearance settings only. Wallpaper images, wallpaper playlists, and the master-switch state are never included.
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
## Development
|
|
108
|
+
|
|
109
|
+
Requires Node.js 22+ and pnpm 11.
|
|
110
|
+
|
|
111
|
+
```sh
|
|
112
|
+
pnpm install
|
|
113
|
+
pnpm typecheck
|
|
114
|
+
pnpm test
|
|
115
|
+
pnpm bundle
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
`pnpm bundle` builds the host modules, browser bundle, CSS modules, and declarations into `lib/`. The DSH client packages and React remain external and are supplied by the host Web GUI. Prebuilt release files are committed so source installs work without developer tooling.
|
|
119
|
+
|
|
120
|
+
[简体中文](README.zh.md) · [License](LICENSE)
|
package/README.zh.md
ADDED
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
# DSH Background — 自定义背景图与毛玻璃主题
|
|
2
|
+
|
|
3
|
+
**DSH Background** 可以把你自己的照片或 GIF 动图上传为 [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) Web GUI 的背景,自己挑哪几张参与轮播、拖动调整顺序,并自由调整毛玻璃、透明度、字体、颜色与动效。v2.0.10 已在 DSH `0.2.2-rc.3` 上完成适配验证,同时保留对 `0.2.2-rc.1+` 的兼容性;仓库自带 `lib/` 预构建产物,安装插件无需执行构建。
|
|
4
|
+
|
|
5
|
+
## 效果展示
|
|
6
|
+
|
|
7
|
+
| 深色工作区 · 照片壁纸 | 深色工作区 · 水纹壁纸 |
|
|
8
|
+
|---|---|
|
|
9
|
+
|  |  |
|
|
10
|
+
|
|
11
|
+
| 亮色工作区 · 蓝天壁纸 | 背景设置 |
|
|
12
|
+
|---|---|
|
|
13
|
+
|  |  |
|
|
14
|
+
|
|
15
|
+
| 主题与预设 | 材质与区域透明度 |
|
|
16
|
+
|---|---|
|
|
17
|
+
|  |  |
|
|
18
|
+
|
|
19
|
+
| 文字 |
|
|
20
|
+
|---|
|
|
21
|
+
|  |
|
|
22
|
+
|
|
23
|
+
## 功能一览
|
|
24
|
+
|
|
25
|
+
| 功能 | Feature |
|
|
26
|
+
|---|---|
|
|
27
|
+
| 上传自己的照片或 GIF 动图,支持一次多选 | Upload your own photos or GIFs, one or many at a time |
|
|
28
|
+
| 照片、GIF 与 MP4/WebM 视频背景;视频存 IndexedDB,不占设置配额 | Photo, GIF, and MP4/WebM backdrops stored in IndexedDB so clips never eat the settings quota |
|
|
29
|
+
| 亮色与暗色各一套背景列表,跟随明暗模式切换 | Separate light and dark playlists that follow the appearance mode |
|
|
30
|
+
| 每张图独立参与轮播,右下角角标决定是否轮播 | Per-image carousel selection: the corner badge decides which images rotate |
|
|
31
|
+
| 未选中的图变模糊起雾,重新选中即恢复清晰 | Unselected images recede behind blur and frost, and sharpen when picked again |
|
|
32
|
+
| 拖动缩略图即可调整轮播顺序 | Drag thumbnails to change the carousel order |
|
|
33
|
+
| 固定单张或定时轮播,间隔可调 | Fixed or timed playback with an adjustable interval |
|
|
34
|
+
| 清透 / 磨砂 / 毛绒三档材质,模糊与磨砂强度分别可调 | Clear, frosted, and velvet materials with separate blur and frost controls |
|
|
35
|
+
| 六个区域独立透明度:主背景、侧边栏、卡片、输入框、弹层、气泡 | Six independent zone opacities: base, sidebar, cards, inputs, overlays, bubbles |
|
|
36
|
+
| 强调色、底色,以及亮色 / 暗色文字各自独立 | Accent, backdrop, and separate light/dark text colours |
|
|
37
|
+
| 字体族与字号,作用于整个工作区 | Font family and scale applied to the whole workspace |
|
|
38
|
+
| 六套预设,外加可迁移的自定义主题(带版本号的 JSON) | Six presets plus portable custom themes exchanged as versioned JSON |
|
|
39
|
+
| 流光极光、弹性过渡,并跟随系统「减弱动效」 | Animated aurora, spring-damped transitions, and reduced-motion support |
|
|
40
|
+
| 总开关、`localStorage` 持久化、跨标签页同步 | Master switch, `localStorage` persistence, and cross-tab sync |
|
|
41
|
+
|
|
42
|
+
## 安装
|
|
43
|
+
|
|
44
|
+
需要 DeepSeek Harness `0.2.2-rc.1` 或更高的 `0.2.x` 版本。
|
|
45
|
+
|
|
46
|
+
### 桌面 App
|
|
47
|
+
|
|
48
|
+
打开 **设置 → 插件 → 添加插件**,输入:
|
|
49
|
+
|
|
50
|
+
```text
|
|
51
|
+
github:mantonlove/dsh-prism-plugin
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
本地开发可改用 `link:/绝对路径/dsh-prism-plugin`。链接安装支持热更新;如未自动生效,刷新 Web GUI 即可。
|
|
55
|
+
|
|
56
|
+
### npm
|
|
57
|
+
|
|
58
|
+
```sh
|
|
59
|
+
dsh plugin --profile web add dsh-prism-plugin
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
也可以直接从仓库安装:
|
|
63
|
+
|
|
64
|
+
```sh
|
|
65
|
+
dsh plugin --profile web add github:mantonlove/dsh-prism-plugin
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
重启 `dsh web` 并刷新页面,然后打开 **设置 → 通用设置 → 外观 → DSH Background**。主题总开关已经并入 DSH Background 面板。
|
|
69
|
+
|
|
70
|
+
卸载:
|
|
71
|
+
|
|
72
|
+
```sh
|
|
73
|
+
dsh plugin --profile web remove dsh-prism-plugin
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
> **从 v2 升级?** v3 把包名改成了 `dsh-prism-plugin`。请先卸掉旧条目——两版注册的是同一个 `ui-prism` 层,同时装会加载两遍:
|
|
77
|
+
>
|
|
78
|
+
> ```sh
|
|
79
|
+
> dsh plugin --profile web remove @deepseek-ai/dsh-client-ui-prism
|
|
80
|
+
> ```
|
|
81
|
+
|
|
82
|
+
## v3 新特性
|
|
83
|
+
|
|
84
|
+
- **npm 分发**:以 `dsh-prism-plugin` 发布到 npm,安装走官方源,插件市场能看到下载量。
|
|
85
|
+
- **包名迁移**:旧的 `@deepseek-ai/dsh-client-ui-prism` 停用;`ui-prism` 层 id 与 `dsh.ui-prism.settings.v1` 存储键保持不变,原有主题、壁纸与偏好都会沿用。
|
|
86
|
+
|
|
87
|
+
## v2 新特性
|
|
88
|
+
|
|
89
|
+
- **DSH 0.2.2-rc.3 适配**:支持新版侧栏毛玻璃与卡片令牌,并让工作区背景保持透明,同时保留 rc.1 / rc.2 的旧令牌兼容。
|
|
90
|
+
- **六套可视化预设**:夜色、极光、水晶、沙丘、玫瑰、森林,一键应用完整协调的外观方案。
|
|
91
|
+
- **可迁移自定义主题**:最多保存 24 套命名方案,可随时应用、删除,或通过带版本号的 JSON 文件导入导出;导入前会逐项校验,重名时自动添加数字后缀,不覆盖已有方案。
|
|
92
|
+
- **面向任务的工作台**:主题、玻璃、背景、字体四个标签页取代旧折叠面板,并迁移掉已被 DSH 删除的 `settings.plugin.item` 总开关卡片。
|
|
93
|
+
- **更清晰的控件**:无障碍开关与按钮、选中/焦点/禁用状态、键盘滑轨、双击滑轨复位,以及六区透明度一键重置。
|
|
94
|
+
- **实时微缩预览**:修改主界面前,先确认当前配色与材质效果。
|
|
95
|
+
- **重新设计的预设与材质面板**:预设改成两列条目,左侧色标同时呈现底色、强调色与斜向光纹;材质沿用同一束光纹,用清晰、扩散、柔化三档处理区分清透、磨砂、毛绒,便于并排比较后再选择。
|
|
96
|
+
|
|
97
|
+
## 主题功能
|
|
98
|
+
|
|
99
|
+
- 清透、磨砂、毛绒三种材质;模糊与全局磨砂感;主背景、侧边栏、卡片、输入框、菜单弹层、聊天气泡六区独立透明度。
|
|
100
|
+
- 主题色、背景色、明暗文字颜色均支持色号输入与取色器。
|
|
101
|
+
- **自定义背景(静态或动态)**:上传照片、GIF 动图或 MP4/WebM 视频(支持一次选多个),明暗模式分别管理列表;视频存 IndexedDB,静音循环播放,窗口失焦自动暂停;固定显示与自动轮播可切换。每张缩略图右下角的勾选框决定它是否参与轮播(未勾选的图片会变模糊、蒙上磨砂层),拖动缩略图左上角的手柄即可调整轮播先后顺序。
|
|
102
|
+
- 弹簧阻尼调节、文字大小与字体、动态极光。
|
|
103
|
+
- 总开关一键还原原生界面;设置通过 `localStorage` 持久化并跨标签页同步;支持减少动态效果。
|
|
104
|
+
- 主题导出只包含外观参数,不包含壁纸图片、壁纸播放列表或总开关状态。
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
## 开发
|
|
108
|
+
|
|
109
|
+
需要 Node.js 22+ 与 pnpm 11。
|
|
110
|
+
|
|
111
|
+
```sh
|
|
112
|
+
pnpm install
|
|
113
|
+
pnpm typecheck
|
|
114
|
+
pnpm test
|
|
115
|
+
pnpm bundle
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
`pnpm bundle` 会构建宿主模块、浏览器 bundle、CSS Modules 与类型声明到 `lib/`。DSH 客户端包与 React 保持 external,由宿主 Web GUI 提供。仓库提交预构建发行文件,因此从源码安装不依赖开发工具链。
|
|
119
|
+
|
|
120
|
+
[English](README.md) · [许可证](LICENSE)
|
|
Binary file
|
package/cordis.patch.yml
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# npm/github distribution patch layer: registers the Prism client plugin
|
|
2
|
+
# into the profile's browser roster. Installing with
|
|
3
|
+
# dsh plugin --profile web add github:mantonlove/dsh-prism-plugin
|
|
4
|
+
# pulls this patch into the profile's layer stack, and the row below makes
|
|
5
|
+
# the web UI load the plugin's bundled client (the package's `dsh.client`
|
|
6
|
+
# declaration marks it as a browser-roster entry).
|
|
7
|
+
- insert:
|
|
8
|
+
- id: ui-prism
|
|
9
|
+
name: 'dsh-prism-plugin'
|