@klarkxy/dsh-font 0.1.0-rc.2 → 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/README.md +19 -31
- package/docs/README.zh-CN.md +18 -30
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -1,46 +1,34 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Font
|
|
2
2
|
|
|
3
3
|
<!-- release-state-note -->
|
|
4
|
-
The [repository registry](../../README.md#plugin-lifecycle) tracks Draft → Testing → Published, moving forward only. Fixes, testing and version updates keep published packages Published; each update still passes release checks. First publication explicitly selects Testing packages and records Published only after npm archive verification. See the [release guide](../../RELEASING.md).
|
|
5
4
|
|
|
6
|
-
|
|
5
|
+
[简体中文](docs/README.zh-CN.md)
|
|
7
6
|
|
|
8
|
-
|
|
7
|
+
Change the interface font, code font, and conversation font size of the DeepSeek Harness Web GUI.
|
|
9
8
|
|
|
10
|
-
##
|
|
11
|
-
|
|
12
|
-
The plugin adds a settings panel to its bundle page in the Plugins view:
|
|
13
|
-
|
|
14
|
-
- **Interface font** — the typeface of all interface text. Pick a preset (Microsoft YaHei, PingFang SC, SimSun, KaiTi, Source Han Sans/Serif), pick an actually-installed family via **Load system fonts**, or enter any CSS `font-family` stack. Empty restores the host default.
|
|
15
|
-
- **Code font** — the monospace typeface of code blocks, inline code and terminals. Presets include Cascadia, JetBrains Mono, Fira Code, Consolas, Sarasa Mono and Maple Mono; system fonts and custom stacks are accepted too.
|
|
16
|
-
- **Conversation font size** — 10–22 px, driven through the official `ctx.theme.setFontSize()` entry. It stays in sync with the native stepper in Settings → General and persists through the host settings scope.
|
|
17
|
-
|
|
18
|
-
*Load system fonts* uses the Local Font Access API (`window.queryLocalFonts()`): Chromium-only and gated behind a browser permission prompt. Every click re-enumerates — after the first read the button relabels to *Reload system fonts*, so fonts installed later appear on the next click. Each entry commits the exact family name CSS needs, while the label leads with the name the UI locale recognizes — a converted font shows as `华康少女文字W5(P)(DFPShaoNvW5-GB)` in Chinese and `DFPShaoNvW5-GB(华康少女文字W5(P))` in English. Where the API is unavailable or denied (Firefox, Safari, Electron policy), the panel simply keeps the preset + manual-input flow. No font files are bundled — every choice is rendered with fonts already installed on the machine, falling back through the stack when a family is missing.
|
|
19
|
-
|
|
20
|
-
Changes apply immediately through owned inline overrides on `<html>` for the host's `:root` font tokens (`--dsw-font-family`, `--ds-font-family-code`). Derived Markdown, brand, and terminal fonts follow them. Choosing *Default* or unloading restores prior inline values without removing another owner's later updates.
|
|
9
|
+
## Install
|
|
21
10
|
|
|
22
|
-
|
|
11
|
+
```sh
|
|
12
|
+
dsh plugin --profile web add @klarkxy/dsh-font
|
|
13
|
+
```
|
|
23
14
|
|
|
24
|
-
|
|
15
|
+
Replace `web` with your profile name, then restart the profile or reload the page.
|
|
25
16
|
|
|
26
|
-
|
|
17
|
+
## Use
|
|
27
18
|
|
|
28
|
-
|
|
19
|
+
Open **Plugins → Font**:
|
|
29
20
|
|
|
30
|
-
|
|
21
|
+
- **Interface font** and **Code font**: pick a preset, type any font name, or click **Load system fonts** to choose from fonts installed on this computer.
|
|
22
|
+
- **Conversation font size**: 10–22 px, kept in sync with **Settings → General**.
|
|
31
23
|
|
|
32
|
-
|
|
33
|
-
dsh plugin --profile web add @klarkxy/dsh-font@next
|
|
34
|
-
```
|
|
24
|
+
Changes apply immediately. Choose **Default** to go back to the DSH font.
|
|
35
25
|
|
|
36
|
-
|
|
26
|
+
## Limits
|
|
37
27
|
|
|
38
|
-
|
|
28
|
+
- **Load system fonts** works only in Chromium-based browsers and asks for permission.
|
|
29
|
+
- Font choices are saved in the current browser; set them again in another browser or address. The font size is saved by DSH.
|
|
30
|
+
- No fonts are bundled; the chosen font must be installed on the computer.
|
|
39
31
|
|
|
40
|
-
|
|
41
|
-
pnpm --filter @klarkxy/dsh-font build # tsdown + client wrapper
|
|
42
|
-
pnpm --filter @klarkxy/dsh-font typecheck
|
|
43
|
-
pnpm --filter @klarkxy/dsh-font test
|
|
44
|
-
```
|
|
32
|
+
## License
|
|
45
33
|
|
|
46
|
-
|
|
34
|
+
[SATA License 2.1](LICENSE)
|
package/docs/README.zh-CN.md
CHANGED
|
@@ -1,46 +1,34 @@
|
|
|
1
|
-
#
|
|
1
|
+
# 字体
|
|
2
2
|
|
|
3
3
|
<!-- release-state-note -->
|
|
4
|
-
插件生命周期见[仓库状态清单](../../../README.zh-CN.md#插件生命周期):草稿 → 测试中 → 已发布,只向前推进。已发布插件的修复、测试和升版保持已发布;每次更新仍须通过发布检查。首次发布须明确选择测试中的包,并在 npm 归档验证成功后登记。详见[发布规则](../../../RELEASING.zh-CN.md)。
|
|
5
|
-
|
|
6
|
-
字体:在一个设置面板里自定义 DeepSeek Harness Web GUI 的**界面字体**、**代码字体**和**会话字号**。
|
|
7
4
|
|
|
8
5
|
[English](../README.md)
|
|
9
6
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
插件在「插件」页自己的 Bundle 详情页里提供设置面板:
|
|
13
|
-
|
|
14
|
-
- **界面字体** —— 整个界面文字的字体。可选预设(微软雅黑、苹方、宋体、楷体、思源黑体/宋体),也可以点「读取系统字体」从本机已装字体里挑,或输入任意 CSS `font-family` 字体栈。留空恢复宿主默认。
|
|
15
|
-
- **代码字体** —— 代码块、行内代码与终端的等宽字体。预设含 Cascadia、JetBrains Mono、Fira Code、Consolas、更纱黑体、Maple Mono,同样支持系统字体与自定义。
|
|
16
|
-
- **会话字号** —— 10–22 px,走官方 `ctx.theme.setFontSize()` 入口,与「设置 → 通用」里的字号步进器实时同步,并由宿主设置域持久化。
|
|
7
|
+
自定义 DeepSeek Harness Web GUI 的界面字体、代码字体和会话字号。
|
|
17
8
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
改动立即生效:字体覆盖写入 `<html>` 上的宿主 `:root` 字体 token(`--dsw-font-family`、`--ds-font-family-code`),Markdown、品牌和终端的派生字体随之更新。选择「默认」或卸载插件时,恢复原来的内联值,并保留其他写入者后来的修改。
|
|
9
|
+
## 安装
|
|
21
10
|
|
|
22
|
-
|
|
11
|
+
```sh
|
|
12
|
+
dsh plugin --profile web add @klarkxy/dsh-font
|
|
13
|
+
```
|
|
23
14
|
|
|
24
|
-
|
|
15
|
+
把 `web` 换成你的 profile 名,安装后重启 profile 或刷新页面。
|
|
25
16
|
|
|
26
|
-
|
|
17
|
+
## 使用
|
|
27
18
|
|
|
28
|
-
|
|
19
|
+
打开「插件 → 字体」:
|
|
29
20
|
|
|
30
|
-
|
|
21
|
+
- **界面字体**和**代码字体**:选预设、手动输入字体名,或点「读取系统字体」从本机已装字体中选择。
|
|
22
|
+
- **会话字号**:10–22 px,与「设置 → 通用」中的字号同步。
|
|
31
23
|
|
|
32
|
-
|
|
33
|
-
dsh plugin --profile web add @klarkxy/dsh-font@next
|
|
34
|
-
```
|
|
24
|
+
改动立即生效。选择「默认」即可恢复 DSH 原字体。
|
|
35
25
|
|
|
36
|
-
|
|
26
|
+
## 限制
|
|
37
27
|
|
|
38
|
-
|
|
28
|
+
- 「读取系统字体」只在 Chromium 系浏览器可用,首次使用需要授权。
|
|
29
|
+
- 字体选择保存在当前浏览器,换浏览器或访问地址后需重新设置;字号由 DSH 保存。
|
|
30
|
+
- 插件不附带字体文件,所选字体必须已安装在本机。
|
|
39
31
|
|
|
40
|
-
|
|
41
|
-
pnpm --filter @klarkxy/dsh-font build # tsdown + client wrapper
|
|
42
|
-
pnpm --filter @klarkxy/dsh-font typecheck
|
|
43
|
-
pnpm --filter @klarkxy/dsh-font test
|
|
44
|
-
```
|
|
32
|
+
## 许可证
|
|
45
33
|
|
|
46
|
-
|
|
34
|
+
[SATA License 2.1](../LICENSE)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@klarkxy/dsh-font",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "Font: customize the interface font, code font, and conversation font size of the DeepSeek Harness Web GUI.",
|
|
5
5
|
"icon": "./icon.svg",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE",
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"test": "vitest run --root ../.. --config vitest.editor-plugins.config.ts --maxWorkers=2 plugins/dsh-font/src"
|
|
58
58
|
},
|
|
59
59
|
"dependencies": {
|
|
60
|
-
"@klarkxy/dsh-plugin-kit": "0.3.
|
|
60
|
+
"@klarkxy/dsh-plugin-kit": "0.3.2"
|
|
61
61
|
},
|
|
62
62
|
"peerDependencies": {
|
|
63
63
|
"@deepseek-ai/cordis": ">=4.0.4"
|
|
@@ -97,6 +97,6 @@
|
|
|
97
97
|
},
|
|
98
98
|
"homepage": "https://klarkxy.github.io/dsh-plugins/plugins/font/",
|
|
99
99
|
"dshRelease": {
|
|
100
|
-
"contentHash": "
|
|
100
|
+
"contentHash": "a234269ae4dfcbf8c1136ebb571912683af3e258489f654db141e6604fe02a3e"
|
|
101
101
|
}
|
|
102
102
|
}
|