@vamdawn/dsh-appearance-plus 0.1.0 → 0.1.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.
- package/CHANGELOG.md +14 -0
- package/CHANGELOG.zh-CN.md +28 -0
- package/README.md +26 -32
- package/README.zh-CN.md +102 -0
- package/dist/client.js +1 -1
- package/package.json +3 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,7 +1,21 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
English | [简体中文](CHANGELOG.zh-CN.md)
|
|
4
|
+
|
|
3
5
|
## [Unreleased]
|
|
4
6
|
|
|
7
|
+
## [0.1.1] - 2026-11-17
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
|
|
11
|
+
- Publish a Simplified Chinese README (`README.zh-CN.md`) next to the English one, and ship it in the package.
|
|
12
|
+
- Publish a Simplified Chinese changelog (`CHANGELOG.zh-CN.md`) next to the English one, and ship it in the package.
|
|
13
|
+
|
|
14
|
+
### Changed
|
|
15
|
+
|
|
16
|
+
- Rename the English settings page to **Appearance Plus**.
|
|
17
|
+
- Rewrite the README around install, usage, configuration, limitations, and development; the dated validation record is no longer part of it.
|
|
18
|
+
|
|
5
19
|
## [0.1.0] - 2026-10-15
|
|
6
20
|
|
|
7
21
|
### Added
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
[English](CHANGELOG.md) | 简体中文
|
|
4
|
+
|
|
5
|
+
## [Unreleased]
|
|
6
|
+
|
|
7
|
+
## [0.1.1] - 2026-11-17
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
|
|
11
|
+
- 在英文版旁发布简体中文 README(`README.zh-CN.md`),并随 npm 包发布。
|
|
12
|
+
- 在英文版旁发布简体中文变更记录(`CHANGELOG.zh-CN.md`),并随 npm 包发布。
|
|
13
|
+
|
|
14
|
+
### Changed
|
|
15
|
+
|
|
16
|
+
- 将英文设置页的名称改为 **Appearance Plus**。
|
|
17
|
+
- 围绕安装、使用、配置、限制与开发重写 README;带日期的验证记录不再包含在内。
|
|
18
|
+
|
|
19
|
+
## [0.1.0] - 2026-10-15
|
|
20
|
+
|
|
21
|
+
### Added
|
|
22
|
+
|
|
23
|
+
- 新增 `@vamdawn/dsh-appearance-plus`,在官方 Web 与 Desktop 设置面板中提供 **Appearance+** 页面。无需修改 Host 样式表即可自定义界面字体、代码字体和窗口背景。
|
|
24
|
+
- 按字体族名称搜索已安装的系统字体以及一个可选的额外目录。额外目录中的字体会通过 Host 的鉴权文件路由从其原始文件加载,字体加载失败时保留上一次可用的字体族。
|
|
25
|
+
- 通过绝对路径设置 PNG、JPEG 或 WebP 背景图片,支持 cover、contain 或平铺方式,并可调整随浅色或深色配色变化的蒙层。图片缺失、过大或格式不受支持时会显示本地化错误,并保留原有背景。
|
|
26
|
+
- 可通过 macOS 原生对话框选择背景图片或额外字体目录,也可在任何平台手动输入路径。
|
|
27
|
+
- 设置保存在 `profile` 的 `cordis.patch.yml` 中,因此设置页面与文件中的修改保持同步。禁用插件会移除它添加的所有 token 覆盖、样式和字体。
|
|
28
|
+
- 提供中英文文案、严格的 Host 与 Client 类型检查、针对构建后插件的自动化测试,以及分发内容中的 MIT 许可证声明。
|
package/README.md
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
# @vamdawn/dsh-appearance-plus
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
English | [简体中文](README.zh-CN.md)
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
[](https://www.npmjs.com/package/@vamdawn/dsh-appearance-plus)
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Customize the DeepSeek Harness interface font, code font, and window background image. The plugin adds an **Appearance Plus** page to the official settings panel and layers its changes over the active theme, so the built-in Light, Dark, and System palettes keep working.
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
Validated with DSH `0.2.0-rc.2`. It supports the Web UI on loopback pages and the Desktop application that uses it; the TUI has no settings panel. Copy ships in the official Chinese (`zh`) and English (`en`) locales.
|
|
10
|
+
|
|
11
|
+
## Install
|
|
10
12
|
|
|
11
|
-
|
|
13
|
+
### From npm
|
|
12
14
|
|
|
13
15
|
```sh
|
|
14
16
|
dsh plugin --profile desktop add @vamdawn/dsh-appearance-plus
|
|
15
17
|
```
|
|
16
18
|
|
|
17
|
-
Use `--profile web` for a Web profile. The
|
|
19
|
+
Use `--profile web` for a Web profile. The package contains compiled JavaScript and needs no consumer-side build; it targets Node.js 24 or newer and the DSH versions declared in `peerDependencies`.
|
|
18
20
|
|
|
19
21
|
### From a source checkout
|
|
20
22
|
|
|
21
|
-
Build the local checkout first. From the repository root:
|
|
22
|
-
|
|
23
23
|
```sh
|
|
24
24
|
cd plugins/dsh-appearance-plus
|
|
25
25
|
npm ci --ignore-scripts
|
|
@@ -28,13 +28,13 @@ npm run build
|
|
|
28
28
|
cd ../..
|
|
29
29
|
```
|
|
30
30
|
|
|
31
|
-
Then
|
|
31
|
+
Then install the directory into your active profile (typically `desktop` or `web`):
|
|
32
32
|
|
|
33
33
|
```sh
|
|
34
34
|
dsh plugin --profile <profile> add "$PWD/plugins/dsh-appearance-plus"
|
|
35
35
|
```
|
|
36
36
|
|
|
37
|
-
Installation links the local directory, so keep it and its `dist/` artifacts available
|
|
37
|
+
Installation links the local directory, so keep it and its `dist/` artifacts available and rebuild after changing source files. Refresh the Plugins page and confirm that `@vamdawn/dsh-appearance-plus` is enabled; restart the application if it has not loaded the plugin. If the macOS Desktop CLI is not on PATH, use:
|
|
38
38
|
|
|
39
39
|
```sh
|
|
40
40
|
"/Applications/DeepSeek Harness.app/Contents/Resources/runtime/cli/bin/dsh"
|
|
@@ -48,15 +48,15 @@ dsh plugin --profile <profile> remove @vamdawn/dsh-appearance-plus
|
|
|
48
48
|
|
|
49
49
|
## Usage
|
|
50
50
|
|
|
51
|
-
Open **Settings** at the bottom of the sidebar, then select **Appearance
|
|
51
|
+
Open **Settings** at the bottom of the sidebar, then select **Appearance Plus** in the left navigation. Changes apply immediately without reloading.
|
|
52
52
|
|
|
53
|
-
- **Interface font** and **Code font**: the field shows the selected family. Click it to list every family, type to filter by name, and select with the pointer or the arrow keys and Enter. **Default** at the top of the list returns to the host default. The chosen family goes first, followed by the host's shipped font stack as fallbacks.
|
|
54
|
-
- **Extra font folder**: one additional folder whose fonts appear in search, marked as *extra folder*. Supported files are `.ttf`, `.otf`, `.ttc`, `.woff`, and `.woff2
|
|
53
|
+
- **Interface font** and **Code font**: the field shows the selected family. Click it to list every family, type to filter by name, and select with the pointer or with the arrow keys and Enter. **Default** at the top of the list returns to the host default. The chosen family goes first, followed by the host's shipped font stack as fallbacks.
|
|
54
|
+
- **Extra font folder**: one additional folder whose fonts appear in search, marked as *extra folder*. Supported files are `.ttf`, `.otf`, `.ttc`, `.woff`, and `.woff2`, and subfolders are included. **Rescan** picks up newly installed fonts.
|
|
55
55
|
- **Background image**: an absolute path to a PNG, JPEG, or WebP file. **Fit** selects cover, contain, or tile. **Overlay opacity** (0–100, default 60) places a light or dark layer over the image to keep text readable, matching the current palette.
|
|
56
56
|
|
|
57
|
-
**Choose…** opens the native file or folder dialog on macOS
|
|
57
|
+
**Choose…** opens the native file or folder dialog on macOS; on other platforms, enter the path manually. The plugin references the original files and does not copy them.
|
|
58
58
|
|
|
59
|
-
## Configuration
|
|
59
|
+
## Configuration
|
|
60
60
|
|
|
61
61
|
Settings are stored in the profile's `cordis.patch.yml` under the plugin entry. Editing the file updates an open settings page, and changes made on the page are written back:
|
|
62
62
|
|
|
@@ -72,37 +72,31 @@ Settings are stored in the profile's `cordis.patch.yml` under the plugin entry.
|
|
|
72
72
|
overlayOpacity: 60 # integer 0-100
|
|
73
73
|
```
|
|
74
74
|
|
|
75
|
-
The Host validates every value
|
|
75
|
+
The Host validates every value: an out-of-range opacity or an unknown fit is rejected rather than applied.
|
|
76
76
|
|
|
77
|
-
##
|
|
77
|
+
## Limitations
|
|
78
78
|
|
|
79
|
-
-
|
|
79
|
+
- Extra-folder fonts and background images load through the host's authenticated `GET /api/file` route, which allows 20 MiB per file; larger files fail with a localized error. Installed system fonts load by name and are not affected.
|
|
80
80
|
- The background references the original image. Moving or deleting it shows an error on the settings page while the last working background stays in place until reload.
|
|
81
81
|
- To show the image, the plugin makes the base window surface transparent and the sidebar translucent. Panels that paint their own opaque fill keep it.
|
|
82
82
|
- Paths refer to the machine running the DSH Host. Non-loopback Web pages are not supported and may not persist settings, as with the host's language and theme preferences.
|
|
83
|
-
- The native dialog is implemented for macOS only.
|
|
83
|
+
- The native file and folder dialog is implemented for macOS only.
|
|
84
84
|
|
|
85
|
-
## Development
|
|
85
|
+
## Development
|
|
86
86
|
|
|
87
87
|
```sh
|
|
88
88
|
cd plugins/dsh-appearance-plus
|
|
89
89
|
npm ci --ignore-scripts
|
|
90
90
|
npm run typecheck
|
|
91
91
|
npm test
|
|
92
|
-
npm pack --dry-run
|
|
93
92
|
```
|
|
94
93
|
|
|
95
|
-
-
|
|
96
|
-
- `src/fonts.ts`: scans font folders and reads family, weight, and style from `name` and `OS/2` tables without loading whole files; WOFF containers are decoded with `fontkit`.
|
|
97
|
-
- `src/picker.ts`: opens the native macOS dialog through `osascript`.
|
|
98
|
-
- `src/client.tsx`: registers the settings page, loads extra-folder faces with `FontFace`, overrides the font and surface tokens through `ctx.theme.overrideTokens`, and injects the background style.
|
|
99
|
-
- `src/locales.ts` and `src/protocol.ts`: define the bilingual dictionaries and the Client-Host types.
|
|
100
|
-
- `build.mjs`: emits ESM `dist/index.js` and lazy-CJS `dist/client.js` with esbuild, keeping shared DSH and React modules external.
|
|
101
|
-
|
|
102
|
-
Tests cover family-name selection, font and collection parsing, folder scans, route input validation, schema defaults, applying and reverting fonts and backgrounds, error handling that keeps the last working values, the picker request, and unload cleanup. Development and tests require Node.js 24 or newer.
|
|
94
|
+
Tests cover family-name selection, font and collection parsing, folder scans, route input validation, schema defaults, applying and reverting fonts and backgrounds, error handling that keeps the last working values, the picker request, and unload cleanup.
|
|
103
95
|
|
|
104
|
-
|
|
96
|
+
Sources: `src/index.ts` settings schema and authenticated routes, `src/fonts.ts` folder scans and font metadata, `src/picker.ts` native dialog, `src/client.tsx` settings page and theme overrides, `src/locales.ts` the bilingual dictionaries, `build.mjs` the esbuild bundle.
|
|
105
97
|
|
|
106
|
-
##
|
|
98
|
+
## Links
|
|
107
99
|
|
|
108
|
-
|
|
100
|
+
- [CHANGELOG.md](CHANGELOG.md) — release notes.
|
|
101
|
+
- [LICENSE](LICENSE) — MIT.
|
|
102
|
+
- [Repository release rules](https://github.com/Vamdawn/ai-forge/blob/main/docs/versioning-and-release.md) — how versions, tags, and npm publication are handled.
|
package/README.zh-CN.md
ADDED
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
# @vamdawn/dsh-appearance-plus
|
|
2
|
+
|
|
3
|
+
[English](README.md) | 简体中文
|
|
4
|
+
|
|
5
|
+
[](https://www.npmjs.com/package/@vamdawn/dsh-appearance-plus)
|
|
6
|
+
|
|
7
|
+
定制 DeepSeek Harness 的界面字体、代码字体与窗口背景图片。插件在官方设置面板中新增 **外观+** 页面(英文界面显示为 **Appearance Plus**),并把改动叠加在当前主题之上,因此内置的 Light、Dark 和 System 配色仍可正常使用。
|
|
8
|
+
|
|
9
|
+
已在 DSH `0.2.0-rc.2` 上验证。它支持回环地址页面上的 Web UI,以及使用该 Web UI 的 Desktop 应用;TUI 没有设置面板。界面文案以官方中文(`zh`)和英文(`en`)两种语言提供。
|
|
10
|
+
|
|
11
|
+
## 安装
|
|
12
|
+
|
|
13
|
+
### 从 npm 安装
|
|
14
|
+
|
|
15
|
+
```sh
|
|
16
|
+
dsh plugin --profile desktop add @vamdawn/dsh-appearance-plus
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
若使用 Web 的 `profile`,请改用 `--profile web`。包内已包含编译后的 JavaScript,使用方无需构建;它面向 Node.js 24 或更高版本,以及 `peerDependencies` 中声明的 DSH 版本。
|
|
20
|
+
|
|
21
|
+
### 从源码检出安装
|
|
22
|
+
|
|
23
|
+
```sh
|
|
24
|
+
cd plugins/dsh-appearance-plus
|
|
25
|
+
npm ci --ignore-scripts
|
|
26
|
+
npm run typecheck
|
|
27
|
+
npm run build
|
|
28
|
+
cd ../..
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
然后把该目录安装到当前启用的 `profile` 中(通常是 `desktop` 或 `web`):
|
|
32
|
+
|
|
33
|
+
```sh
|
|
34
|
+
dsh plugin --profile <profile> add "$PWD/plugins/dsh-appearance-plus"
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
安装会链接本地目录,因此请保留该目录及其 `dist/` 产物,并在修改源文件后重新构建。刷新 **Plugins**(插件)页面,确认 `@vamdawn/dsh-appearance-plus` 已启用;如果应用尚未加载该插件,请重启应用。如果 macOS Desktop CLI 不在 PATH 中,请使用:
|
|
38
|
+
|
|
39
|
+
```sh
|
|
40
|
+
"/Applications/DeepSeek Harness.app/Contents/Resources/runtime/cli/bin/dsh"
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
卸载:
|
|
44
|
+
|
|
45
|
+
```sh
|
|
46
|
+
dsh plugin --profile <profile> remove @vamdawn/dsh-appearance-plus
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## 用法
|
|
50
|
+
|
|
51
|
+
在侧边栏底部打开 **Settings**(设置),然后在左侧导航中选择 **外观+**。改动立即生效,无需重新加载。
|
|
52
|
+
|
|
53
|
+
- **界面字体**和**代码字体**:字段中显示已选中的字体族。点击可列出全部字体族,输入即可按名称筛选,用鼠标或方向键加回车选择。列表顶部的**默认**可恢复 Host 默认值。所选字体族排在最前,其后是 Host 内置的字体栈作为回退。
|
|
54
|
+
- **额外字体目录**:可再添加一个目录,其中的字体会出现在搜索结果中,并标记为*额外目录*。支持的文件为 `.ttf`、`.otf`、`.ttc`、`.woff` 和 `.woff2`,子目录也会包含在内。**重新扫描**可发现新安装的字体。
|
|
55
|
+
- **背景图片**:PNG、JPEG 或 WebP 文件的绝对路径。**填充方式**可选择铺满、适应或平铺。**遮罩不透明度**(0–100,默认 60)会在图片上叠加浅色或深色遮罩,以保持文字可读,并与当前配色保持一致。
|
|
56
|
+
|
|
57
|
+
**选择…**在 macOS 上会打开系统原生文件或文件夹对话框;在其他平台上请手动输入路径。插件引用原始文件,不会复制它们。
|
|
58
|
+
|
|
59
|
+
## 配置
|
|
60
|
+
|
|
61
|
+
设置保存在 `profile` 的 `cordis.patch.yml` 中对应的插件条目下。编辑该文件会更新已打开的设置页,而设置页上的改动也会写回文件:
|
|
62
|
+
|
|
63
|
+
```yaml
|
|
64
|
+
- id: dsh-appearance-plus
|
|
65
|
+
name: "@vamdawn/dsh-appearance-plus"
|
|
66
|
+
config:
|
|
67
|
+
uiFont: LXGW WenKai # 留空则使用 Host 默认值
|
|
68
|
+
codeFont: JetBrains Mono
|
|
69
|
+
fontDir: /Users/<user>/Fonts # 可选
|
|
70
|
+
backgroundImage: /Users/<user>/Pictures/background.jpg
|
|
71
|
+
backgroundFit: cover # 取值:cover | contain | tile
|
|
72
|
+
overlayOpacity: 60 # 整数 0-100
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
Host 会校验每个值:超出范围的不透明度或未知的填充方式会被拒绝,而不会生效。
|
|
76
|
+
|
|
77
|
+
## 限制
|
|
78
|
+
|
|
79
|
+
- 额外目录中的字体与背景图片通过 Host 已鉴权的 `GET /api/file` 路由加载,单个文件上限为 20 MiB;更大的文件会失败并显示当前语言的错误提示。已安装的系统字体按名称加载,不受影响。
|
|
80
|
+
- 背景引用的是原始图片。移动或删除该图片会在设置页显示错误,而最近一次可用的背景会保持不变,直到重新加载。
|
|
81
|
+
- 为了显示图片,插件会把基础窗口表面设为透明,并把侧边栏设为半透明。自行绘制不透明填充的面板仍保持原样。
|
|
82
|
+
- 路径指向运行 DSH Host 的机器。非回环地址的 Web 页面不受支持,也可能无法持久化设置,Host 的语言和主题偏好也是如此。
|
|
83
|
+
- 系统原生文件与文件夹对话框仅针对 macOS 实现。
|
|
84
|
+
|
|
85
|
+
## 开发
|
|
86
|
+
|
|
87
|
+
```sh
|
|
88
|
+
cd plugins/dsh-appearance-plus
|
|
89
|
+
npm ci --ignore-scripts
|
|
90
|
+
npm run typecheck
|
|
91
|
+
npm test
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
测试覆盖字体族名称选择、字体与字体集合解析、目录扫描、路由输入校验、schema 默认值、字体与背景的应用与还原、保留最近一次可用值的错误处理、选择窗口请求,以及卸载清理。
|
|
95
|
+
|
|
96
|
+
源码:`src/index.ts` 设置 schema 与已鉴权路由,`src/fonts.ts` 目录扫描与字体元数据,`src/picker.ts` 系统原生对话框,`src/client.tsx` 设置页与主题覆盖,`src/locales.ts` 双语语言词条,`build.mjs` esbuild 打包。
|
|
97
|
+
|
|
98
|
+
## 链接
|
|
99
|
+
|
|
100
|
+
- [CHANGELOG.zh-CN.md](CHANGELOG.zh-CN.md) — 发布说明。
|
|
101
|
+
- [LICENSE](LICENSE) — MIT。
|
|
102
|
+
- [仓库发布规则](https://github.com/Vamdawn/ai-forge/blob/main/docs/versioning-and-release.md) — 版本、标签与 npm 发布的管理方式。
|
package/dist/client.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vamdawn/dsh-appearance-plus",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "Customize DeepSeek Harness interface fonts, code fonts, and background image",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -37,7 +37,9 @@
|
|
|
37
37
|
"dist",
|
|
38
38
|
"cordis.patch.yml",
|
|
39
39
|
"README.md",
|
|
40
|
+
"README.zh-CN.md",
|
|
40
41
|
"CHANGELOG.md",
|
|
42
|
+
"CHANGELOG.zh-CN.md",
|
|
41
43
|
"LICENSE"
|
|
42
44
|
],
|
|
43
45
|
"scripts": {
|