dsh-anthropic-fonts 0.1.0 → 0.2.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2025 dsh-anthropic-fonts contributors
3
+ Copyright (c) 2026 Isilsolme and contributors
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
@@ -19,3 +19,11 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
19
  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
20
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
21
  SOFTWARE.
22
+
23
+ ---
24
+
25
+ Font files notice: `fonts/AnthropicSansWebText.ttf`, `fonts/AnthropicSerifWebText.ttf`
26
+ and `fonts/AnthropicMonoVariable.ttf` are proprietary typefaces of Anthropic,
27
+ extracted from Anthropic's web products. They are included in this repository
28
+ for personal use only and are **not** covered by the MIT license above; all
29
+ rights remain with Anthropic. The npm package does not ship these files.
package/README.en.md CHANGED
@@ -1,93 +1,118 @@
1
- # dsh-anthropic-fonts
2
-
3
- Apply Anthropic's typefaces to the [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) Web UI:
4
-
5
- - **Interface** (sidebar, headings, buttons, settings): `Anthropic Sans Web Text`
6
- - **Model conversation** (Markdown body / headings / tables): `Anthropic Serif Web Text`
7
- - **Code / code blocks**: `Anthropic Mono Variable`
8
-
9
- CJK text falls back to the Source Han family (`Noto Sans SC` / `Source Han Sans SC` / `Noto Serif SC`), then to system fonts.
10
-
11
- ## Fonts
12
-
13
- The `fonts/` directory ships the three Latin fonts; install them for the best English / code rendering:
14
-
15
- | Font | File | Role |
16
- |---|---|---|
17
- | Anthropic Sans Web Text | `fonts/AnthropicSansWebText.ttf` | Interface |
18
- | Anthropic Serif Web Text | `fonts/AnthropicSerifWebText.ttf` | Conversation |
19
- | Anthropic Mono Variable | `fonts/AnthropicMonoVariable.ttf` | Code |
20
-
21
- Install: double-click each `.ttf` on Windows → **Install**; on macOS use **Font Book**.
22
-
23
- Chinese needs no extra install — it falls back to the Source Han fonts (Noto Sans/Serif SC, Source Han), then to system CJK fonts.
24
-
25
- ## Install
26
-
27
- A standard `dsh` bundle plugin — the same shape as
28
- [`dsh-whale-animation`](https://github.com/LeemanCheung/dsh-whale-animation).
29
-
30
- ### CLI (recommended)
31
-
32
- ```sh
33
- dsh plugin --profile web add "github:Isilsolme/dsh-anthropic-fonts"
34
- ```
35
-
36
- `dsh plugin add` runs `pnpm add` inside the profile and auto-appends the
37
- bundle to `dsh.profile.bundles`. Restart the web surface afterwards.
38
-
39
- ### Manual
40
-
41
- ```jsonc
42
- // ~/.dsh/profiles/web/package.json
43
- {
44
- "dependencies": {
45
- "dsh-anthropic-fonts": "link:C:/path/to/dsh-anthropic-fonts"
46
- },
47
- "dsh": {
48
- "profile": {
49
- "bundles": [
50
- "@deepseek-ai/dsh-base",
51
- "@deepseek-ai/dsh-web-app",
52
- "dsh-anthropic-fonts"
53
- ]
54
- }
55
- }
56
- }
57
- ```
58
-
59
- then:
60
-
61
- ```sh
62
- cd ~/.dsh/profiles/web && pnpm install
63
- ```
64
-
65
- ## Uninstall / toggle off
66
-
67
- ```sh
68
- dsh plugin --profile web remove dsh-anthropic-fonts
69
- ```
70
-
71
- (or remove it from `dependencies` and `bundles`, then `pnpm install`).
72
- Restart to restore the default fonts.
73
-
74
- ## How it works
75
-
76
- Overrides the DSH typography tokens: `--dsw-font-family` (UI) and the non-code
77
- `--dsw-font-markdown-*` tokens (conversation body). The injected `<style>` is
78
- owned by the client fiber and removed on uninstall.
79
-
80
- ## Structure
81
-
82
- - `lib/index.js` — host half (empty; the effect is browser-only)
83
- - `lib/client.js` — client half (injects the font CSS variable overrides)
84
- - `cordis.patch.yml` — bundle patch inserting the plugin row
85
- - `fonts/` — the two Latin font files
86
-
87
- ## Credits
88
-
89
- Font stack modeled on [`blaxisomu/typora_claude`](https://github.com/blaxisomu/typora_claude) (Anthropic Web fonts for Latin, Source Han for CJK).
90
-
91
- ## License
92
-
93
- MIT
1
+ # dsh-anthropic-fonts
2
+
3
+ Apply Anthropic's typefaces to the [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) Web UI:
4
+
5
+ - **Interface** (sidebar, headings, buttons, settings): `Anthropic Sans Web Text`
6
+ - **Model conversation** (Markdown body / headings / tables): `Anthropic Serif Web Text`
7
+ - **Code / code blocks**: `Anthropic Mono Variable`
8
+
9
+ CJK text falls back to the Source Han family (`Noto Sans SC` / `Source Han Sans SC` / `Noto Serif SC`), then to system fonts.
10
+
11
+ ## Fonts
12
+
13
+ > **Important: the plugin does not bundle fonts.** The npm package does not ship
14
+ > font files; install the fonts below manually, then refresh / restart the web
15
+ > surface for the change to take effect.
16
+
17
+ The plugin references three Anthropic Latin typefaces (install them for the best
18
+ English / code rendering):
19
+
20
+ | Font | Role | Where to get it |
21
+ |---|---|---|
22
+ | Anthropic Sans Web Text | Interface | Download from [`fonts/`](fonts/), or extract from a Claude app |
23
+ | Anthropic Serif Web Text | Conversation | Download from [`fonts/`](fonts/), or extract from a Claude app |
24
+ | Anthropic Mono Variable | Code | Download from [`fonts/`](fonts/), or extract from a Claude app |
25
+
26
+ Install: double-click each `.ttf` on Windows → **Install**; on macOS use **Font Book**. Then **refresh / restart** the web surface.
27
+
28
+ > The fonts are proprietary to Anthropic, for personal use only, and are **not**
29
+ > covered by the MIT license (see the font notice in [LICENSE](LICENSE)).
30
+
31
+ Chinese needs no extra install — it falls back to the Source Han fonts (Noto Sans/Serif SC, Source Han), then to system CJK fonts.
32
+
33
+ ## Install
34
+
35
+ A standard `dsh` bundle plugin — the same shape as
36
+ [`dsh-whale-animation`](https://github.com/LeemanCheung/dsh-whale-animation).
37
+
38
+ ### CLI (recommended)
39
+
40
+ Published on npm — install in one command:
41
+
42
+ ```sh
43
+ dsh plugin --profile web add dsh-anthropic-fonts
44
+ ```
45
+
46
+ or from GitHub:
47
+
48
+ ```sh
49
+ dsh plugin --profile web add "github:Isilsolme/dsh-anthropic-fonts"
50
+ ```
51
+
52
+ `dsh plugin add` runs `pnpm add` inside the profile and auto-appends the
53
+ bundle to `dsh.profile.bundles`. Restart the web surface afterwards.
54
+
55
+ > ⚠️ After installing the plugin you **still need to install the font files
56
+ > manually** (see "Fonts" above) — the npm package does not ship them.
57
+
58
+ ### Manual
59
+
60
+ ```jsonc
61
+ // ~/.dsh/profiles/web/package.json
62
+ {
63
+ "dependencies": {
64
+ "dsh-anthropic-fonts": "^0.2.0"
65
+ },
66
+ "dsh": {
67
+ "profile": {
68
+ "bundles": [
69
+ "@deepseek-ai/dsh-base",
70
+ "@deepseek-ai/dsh-web-app",
71
+ "dsh-anthropic-fonts"
72
+ ]
73
+ }
74
+ }
75
+ }
76
+ ```
77
+
78
+ then:
79
+
80
+ ```sh
81
+ cd ~/.dsh/profiles/web && pnpm install
82
+ ```
83
+
84
+ > For local development you can instead use
85
+ > `"dsh-anthropic-fonts": "link:C:/path/to/dsh-anthropic-fonts"` to point at a
86
+ > local checkout.
87
+
88
+ ## Uninstall / toggle off
89
+
90
+ ```sh
91
+ dsh plugin --profile web remove dsh-anthropic-fonts
92
+ ```
93
+
94
+ (or remove it from `dependencies` and `bundles`, then `pnpm install`).
95
+ Restart to restore the default fonts.
96
+
97
+ ## How it works
98
+
99
+ Overrides only the **font-family** part of the DSH typography tokens:
100
+ `--dsw-font-family` (UI) and the non-code `--dsw-font-markdown-*-font-family`
101
+ tokens (conversation body), keeping DSH's official font sizes and line heights;
102
+ code font goes through `--ds-font-family-code`. The injected `<style>` is
103
+ owned by the client fiber and removed on uninstall.
104
+
105
+ ## Structure
106
+
107
+ - `lib/index.js` — host half (empty; the effect is browser-only)
108
+ - `lib/client.js` — client half (injects the font CSS variable overrides)
109
+ - `cordis.patch.yml` — bundle patch inserting the plugin row
110
+ - `fonts/` — the three Latin font files
111
+
112
+ ## Credits
113
+
114
+ Font stack modeled on [`blaxisomu/typora_claude`](https://github.com/blaxisomu/typora_claude) (Anthropic Web fonts for Latin, Source Han for CJK).
115
+
116
+ ## License
117
+
118
+ MIT
package/README.md CHANGED
@@ -1,88 +1,104 @@
1
- # dsh-anthropic-fonts
2
-
3
- 给 [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) Web 界面换上 Anthropic 字体:
4
-
5
- - **界面**(侧栏、标题、按钮、设置):`Anthropic Sans Web Text`
6
- - **模型对话**(Markdown 正文 / 标题 / 表格):`Anthropic Serif Web Text`
7
- - **代码 / 代码块**:`Anthropic Mono Variable`
8
-
9
- 中文回退到思源字体(`Noto Sans SC` / `Source Han Sans SC` / `Noto Serif SC`),未安装时回退到系统字体(苹方 / 微软雅黑 / 宋体)。
10
-
11
- ## 字体
12
-
13
- 仓库 `fonts/` 附带三个拉丁字体,安装后英文 / 代码效果最佳:
14
-
15
- | 字体 | 文件 | 用途 |
16
- |---|---|---|
17
- | Anthropic Sans Web Text | `fonts/AnthropicSansWebText.ttf` | 界面 |
18
- | Anthropic Serif Web Text | `fonts/AnthropicSerifWebText.ttf` | 模型对话 |
19
- | Anthropic Mono Variable | `fonts/AnthropicMonoVariable.ttf` | 代码 |
20
-
21
- 安装:Windows 双击每个 `.ttf` → 点「安装」;macOS 用「字体册」导入。
22
-
23
- 中文无需额外安装:会回退到思源黑体 / 宋体(Noto Sans/Serif SC、Source Han),没有则用系统字体。
24
-
25
- ## 安装
26
-
27
- 标准的 `dsh` bundle 插件 —— 与 [`dsh-whale-animation`](https://github.com/LeemanCheung/dsh-whale-animation) 同一种形态。
28
-
29
- ### CLI(推荐)
30
-
31
- ```sh
32
- dsh plugin --profile web add "github:Isilsolme/dsh-anthropic-fonts"
33
- ```
34
-
35
- `dsh plugin add` 会在 profile 内执行 `pnpm add`,并自动把 bundle 追加到 `dsh.profile.bundles`。之后重启 web 即可生效。
36
-
37
- ### 手动安装
38
-
39
- ```jsonc
40
- // ~/.dsh/profiles/web/package.json
41
- {
42
- "dependencies": {
43
- "dsh-anthropic-fonts": "link:C:/path/to/dsh-anthropic-fonts"
44
- },
45
- "dsh": {
46
- "profile": {
47
- "bundles": [
48
- "@deepseek-ai/dsh-base",
49
- "@deepseek-ai/dsh-web-app",
50
- "dsh-anthropic-fonts"
51
- ]
52
- }
53
- }
54
- }
55
- ```
56
-
57
- 然后:
58
-
59
- ```sh
60
- cd ~/.dsh/profiles/web && pnpm install
61
- ```
62
-
63
- ## 卸载 / 关闭
64
-
65
- ```sh
66
- dsh plugin --profile web remove dsh-anthropic-fonts
67
- ```
68
-
69
- (或从 `dependencies` 和 `bundles` 里移除,再 `pnpm install`)。重启即恢复默认字体。
70
-
71
- ## 原理
72
-
73
- 覆盖 DSH 的排版 token:`--dsw-font-family`(UI 用),以及全部非代码的 `--dsw-font-markdown-*`(对话正文用)。注入的 `<style>` 归属 client fiber,卸载时一并清理。
74
-
75
- ## 结构
76
-
77
- - `lib/index.js` —— Host 半边(空;字体效果只在浏览器)
78
- - `lib/client.js` —— Client 半边(注入字体 CSS 变量覆盖)
79
- - `cordis.patch.yml` —— bundle patch,插入插件行
80
- - `fonts/` —— 三个拉丁字体文件
81
-
82
- ## 参考
83
-
84
- 字体栈参考了 [`blaxisomu/typora_claude`](https://github.com/blaxisomu/typora_claude) 的实现(拉丁用 Anthropic Web 字体、中文回退思源字体)。
85
-
86
- ## 许可
87
-
88
- MIT
1
+ # dsh-anthropic-fonts
2
+
3
+ 给 [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) Web 界面换上 Anthropic 字体:
4
+
5
+ - **界面**(侧栏、标题、按钮、设置):`Anthropic Sans Web Text`
6
+ - **模型对话**(Markdown 正文 / 标题 / 表格):`Anthropic Serif Web Text`
7
+ - **代码 / 代码块**:`Anthropic Mono Variable`
8
+
9
+ 中文回退到思源字体(`Noto Sans SC` / `Source Han Sans SC` / `Noto Serif SC`),未安装时回退到系统字体(苹方 / 微软雅黑 / 宋体)。
10
+
11
+ ## 字体
12
+
13
+ > **重要:插件不内置字体**。npm 包不随包分发字体文件;安装插件后还需手动安装字体(见下表),然后刷新 / 重启 web 才会生效。
14
+
15
+ 插件引用的三个 Anthropic 拉丁字体(建议安装,英文 / 代码效果最佳):
16
+
17
+ | 字体 | 用途 | 获取方式 |
18
+ |---|---|---|
19
+ | Anthropic Sans Web Text | 界面 | 仓库 [`fonts/`](fonts/) 下载,或从 Claude 应用提取 |
20
+ | Anthropic Serif Web Text | 模型对话 | 仓库 [`fonts/`](fonts/) 下载,或从 Claude 应用提取 |
21
+ | Anthropic Mono Variable | 代码 | 仓库 [`fonts/`](fonts/) 下载,或从 Claude 应用提取 |
22
+
23
+ 安装:Windows 双击每个 `.ttf` → 点「安装」;macOS 用「字体册」导入。安装后**刷新 / 重启 web** 生效。
24
+
25
+ > 字体版权归 Anthropic 所有,仅供个人使用,不适用 MIT 许可(详见 [LICENSE](LICENSE) 字体声明)。
26
+
27
+ 中文无需额外安装:会回退到思源黑体 / 宋体(Noto Sans/Serif SC、Source Han),没有则用系统字体。
28
+
29
+ ## 安装
30
+
31
+ 标准的 `dsh` bundle 插件 —— 与 [`dsh-whale-animation`](https://github.com/LeemanCheung/dsh-whale-animation) 同一种形态。
32
+
33
+ ### CLI(推荐)
34
+
35
+ 已发布到 npm,一条命令安装:
36
+
37
+ ```sh
38
+ dsh plugin --profile web add dsh-anthropic-fonts
39
+ ```
40
+
41
+ 也可以从 GitHub 安装:
42
+
43
+ ```sh
44
+ dsh plugin --profile web add "github:Isilsolme/dsh-anthropic-fonts"
45
+ ```
46
+
47
+ `dsh plugin add` 会在 profile 内执行 `pnpm add`,并自动把 bundle 追加到 `dsh.profile.bundles`。之后重启 web 即可生效。
48
+
49
+ > ⚠️ 安装插件后**还需手动安装字体文件**(见上方「字体」)——npm 包不随包分发字体。
50
+
51
+ ### 手动安装
52
+
53
+ ```jsonc
54
+ // ~/.dsh/profiles/web/package.json
55
+ {
56
+ "dependencies": {
57
+ "dsh-anthropic-fonts": "^0.2.0"
58
+ },
59
+ "dsh": {
60
+ "profile": {
61
+ "bundles": [
62
+ "@deepseek-ai/dsh-base",
63
+ "@deepseek-ai/dsh-web-app",
64
+ "dsh-anthropic-fonts"
65
+ ]
66
+ }
67
+ }
68
+ }
69
+ ```
70
+
71
+ 然后:
72
+
73
+ ```sh
74
+ cd ~/.dsh/profiles/web && pnpm install
75
+ ```
76
+
77
+ > 本地调试时,可用 `"dsh-anthropic-fonts": "link:C:/path/to/dsh-anthropic-fonts"` 指向本地目录。
78
+
79
+ ## 卸载 / 关闭
80
+
81
+ ```sh
82
+ dsh plugin --profile web remove dsh-anthropic-fonts
83
+ ```
84
+
85
+ (或从 `dependencies` 和 `bundles` 里移除,再 `pnpm install`)。重启即恢复默认字体。
86
+
87
+ ## 原理
88
+
89
+ 只覆盖 DSH 排版 token 的**字体族**部分:`--dsw-font-family`(UI 用)与全部非代码的 `--dsw-font-markdown-*-font-family`(对话正文用),保留 DSH 官方字号与行高;代码字体走 `--ds-font-family-code`。注入的 `<style>` 归属 client fiber,卸载时一并清理。
90
+
91
+ ## 结构
92
+
93
+ - `lib/index.js` —— Host 半边(空;字体效果只在浏览器)
94
+ - `lib/client.js` —— Client 半边(注入字体 CSS 变量覆盖)
95
+ - `cordis.patch.yml` —— bundle patch,插入插件行
96
+ - `fonts/` —— 三个拉丁字体文件
97
+
98
+ ## 参考
99
+
100
+ 字体栈参考了 [`blaxisomu/typora_claude`](https://github.com/blaxisomu/typora_claude) 的实现(拉丁用 Anthropic Web 字体、中文回退思源字体)。
101
+
102
+ ## 许可
103
+
104
+ MIT
package/cordis.patch.yml CHANGED
@@ -1,4 +1,4 @@
1
- # dsh-anthropic-fonts: Anthropic Sans (UI) / Serif (conversation) for the DSH web surface.
2
- - insert:
3
- - id: anthropic-fonts
4
- name: 'dsh-anthropic-fonts'
1
+ # dsh-anthropic-fonts: Anthropic Sans (UI) / Serif (conversation) for the DSH web surface.
2
+ - insert:
3
+ - id: anthropic-fonts
4
+ name: 'dsh-anthropic-fonts'
package/lib/client.js CHANGED
@@ -1,43 +1,44 @@
1
- window.__ModuleLoader__.load({
2
- id: "dsh-anthropic-fonts",
3
- factory: function (require) {
4
- var module = { exports: {} };
5
- var exports = module.exports;
6
-
7
- var css = "html:root{--dsw-font-family:'Anthropic Sans Web Text','Noto Sans SC','Source Han Sans SC',-apple-system,BlinkMacSystemFont,'Segoe UI','PingFang SC','Hiragino Sans GB','Microsoft YaHei','Helvetica Neue',Helvetica,Arial,sans-serif;--dsw-font-serif:'Anthropic Serif Web Text',Georgia,'Times New Roman','Noto Serif SC','Source Han Serif SC','Songti SC','SimSun',serif;--ds-font-family-code:'Anthropic Mono Variable','Source Han Sans SC',ui-monospace,'SF Mono','JetBrains Mono','Fira Code',Consolas,'Liberation Mono',Menlo,Courier,monospace}" +
8
- "html body{" +
9
- "--dsw-font-markdown-h1:700 24px/34px var(--dsw-font-serif);--dsw-font-markdown-h1-font-family:var(--dsw-font-serif);" +
10
- "--dsw-font-markdown-h2:700 22px/32px var(--dsw-font-serif);--dsw-font-markdown-h2-font-family:var(--dsw-font-serif);" +
11
- "--dsw-font-markdown-h3:700 20px/30px var(--dsw-font-serif);--dsw-font-markdown-h3-font-family:var(--dsw-font-serif);" +
12
- "--dsw-font-markdown-h4:600 16px/28px var(--dsw-font-serif);--dsw-font-markdown-h4-font-family:var(--dsw-font-serif);" +
13
- "--dsw-font-markdown-base:16px/28px var(--dsw-font-serif);--dsw-font-markdown-base-font-family:var(--dsw-font-serif);" +
14
- "--dsw-font-markdown-base-strong:600 16px/28px var(--dsw-font-serif);--dsw-font-markdown-base-strong-font-family:var(--dsw-font-serif);" +
15
- "--dsw-font-markdown-base-italic:italic 16px/28px var(--dsw-font-serif);--dsw-font-markdown-base-italic-font-family:var(--dsw-font-serif);" +
16
- "--dsw-font-markdown-base-strong-italic:italic 600 16px/28px var(--dsw-font-serif);--dsw-font-markdown-base-strong-italic-font-family:var(--dsw-font-serif);" +
17
- "--dsw-font-markdown-table:15px/25px var(--dsw-font-serif);--dsw-font-markdown-table-font-family:var(--dsw-font-serif);" +
18
- "--dsw-font-markdown-table-head:500 15px/25px var(--dsw-font-serif);--dsw-font-markdown-table-head-font-family:var(--dsw-font-serif);" +
19
- "--dsw-font-markdown-small:14px/24px var(--dsw-font-serif);--dsw-font-markdown-small-font-family:var(--dsw-font-serif);" +
20
- "--dsw-font-markdown-small-strong:600 14px/24px var(--dsw-font-serif);--dsw-font-markdown-small-strong-font-family:var(--dsw-font-serif);" +
21
- "--dsw-font-markdown-small-italic:italic 14px/24px var(--dsw-font-serif);--dsw-font-markdown-small-italic-font-family:var(--dsw-font-serif);" +
22
- "--dsw-font-markdown-small-strong-italic:italic 600 14px/24px var(--dsw-font-serif);--dsw-font-markdown-small-strong-italic-font-family:var(--dsw-font-serif);" +
23
- "}";
24
-
25
- function apply(ctx) {
26
- if (typeof document === "undefined") return;
27
- var tagId = "dsh-anthropic-fonts/fonts.css";
28
- if (document.querySelector('style[data-plugin-css=' + JSON.stringify(tagId) + ']') !== null) return;
29
- var tag = document.createElement("style");
30
- tag.dataset.plugin = "dsh-anthropic-fonts";
31
- tag.dataset.pluginCss = tagId;
32
- tag.textContent = css;
33
- document.head.appendChild(tag);
34
- ctx.effect(function () {
35
- return function () { tag.remove(); };
36
- });
37
- }
38
-
39
- exports.apply = apply;
40
- exports.inject = [];
41
- return module.exports;
42
- }
43
- });
1
+ window.__ModuleLoader__.load({
2
+ id: "dsh-anthropic-fonts",
3
+ factory: function (require) {
4
+ var module = { exports: {} };
5
+ var exports = module.exports;
6
+
7
+ // P3: 只覆盖 -font-family 系列(保留 DSH 官方字号/行高),代码字体走 --ds-font-family-code
8
+ var css = "html:root{--dsw-font-family:'Anthropic Sans Web Text','Noto Sans SC','Source Han Sans SC',-apple-system,BlinkMacSystemFont,'Segoe UI','PingFang SC','Hiragino Sans GB','Microsoft YaHei','Helvetica Neue',Helvetica,Arial,sans-serif;--dsw-font-serif:'Anthropic Serif Web Text',Georgia,'Times New Roman','Noto Serif SC','Source Han Serif SC','Songti SC','SimSun',serif;--ds-font-family-code:'Anthropic Mono Variable','Source Han Sans SC',ui-monospace,'SF Mono','JetBrains Mono','Fira Code',Consolas,'Liberation Mono',Menlo,Courier,monospace}" +
9
+ "html body{" +
10
+ "--dsw-font-markdown-h1-font-family:var(--dsw-font-serif);" +
11
+ "--dsw-font-markdown-h2-font-family:var(--dsw-font-serif);" +
12
+ "--dsw-font-markdown-h3-font-family:var(--dsw-font-serif);" +
13
+ "--dsw-font-markdown-h4-font-family:var(--dsw-font-serif);" +
14
+ "--dsw-font-markdown-base-font-family:var(--dsw-font-serif);" +
15
+ "--dsw-font-markdown-base-strong-font-family:var(--dsw-font-serif);" +
16
+ "--dsw-font-markdown-base-italic-font-family:var(--dsw-font-serif);" +
17
+ "--dsw-font-markdown-base-strong-italic-font-family:var(--dsw-font-serif);" +
18
+ "--dsw-font-markdown-table-font-family:var(--dsw-font-serif);" +
19
+ "--dsw-font-markdown-table-head-font-family:var(--dsw-font-serif);" +
20
+ "--dsw-font-markdown-small-font-family:var(--dsw-font-serif);" +
21
+ "--dsw-font-markdown-small-strong-font-family:var(--dsw-font-serif);" +
22
+ "--dsw-font-markdown-small-italic-font-family:var(--dsw-font-serif);" +
23
+ "--dsw-font-markdown-small-strong-italic-font-family:var(--dsw-font-serif);" +
24
+ "}";
25
+
26
+ function apply(ctx) {
27
+ if (typeof document === "undefined") return;
28
+ var tagId = "dsh-anthropic-fonts/fonts.css";
29
+ if (document.querySelector('style[data-plugin-css=' + JSON.stringify(tagId) + ']') !== null) return;
30
+ var tag = document.createElement("style");
31
+ tag.dataset.plugin = "dsh-anthropic-fonts";
32
+ tag.dataset.pluginCss = tagId;
33
+ tag.textContent = css;
34
+ document.head.appendChild(tag);
35
+ ctx.effect(function () {
36
+ return function () { tag.remove(); };
37
+ });
38
+ }
39
+
40
+ exports.apply = apply;
41
+ exports.inject = [];
42
+ return module.exports;
43
+ }
44
+ });
package/lib/index.js CHANGED
@@ -1,3 +1,3 @@
1
- /** Host half is intentionally empty; the font effect is browser-only. */
2
- export const name = 'dsh-anthropic-fonts'
3
- export function apply() {}
1
+ /** Host half is intentionally empty; the font effect is browser-only. */
2
+ export const name = 'dsh-anthropic-fonts'
3
+ export function apply() {}
package/package.json CHANGED
@@ -1,54 +1,53 @@
1
- {
2
- "name": "dsh-anthropic-fonts",
3
- "version": "0.1.0",
4
- "description": "Switch the DSH web interface to Anthropic Sans Web Text and model conversation to Anthropic Serif Web Text.",
5
- "license": "MIT",
6
- "repository": {
7
- "type": "git",
8
- "url": "git+https://github.com/Isilsolme/dsh-anthropic-fonts.git"
9
- },
10
- "homepage": "https://github.com/Isilsolme/dsh-anthropic-fonts#readme",
11
- "bugs": {
12
- "url": "https://github.com/Isilsolme/dsh-anthropic-fonts/issues"
13
- },
14
- "type": "module",
15
- "main": "lib/index.js",
16
- "exports": {
17
- ".": "./lib/index.js",
18
- "./client": "./lib/client.js",
19
- "./package.json": "./package.json"
20
- },
21
- "files": [
22
- "lib",
23
- "fonts",
24
- "cordis.patch.yml",
25
- "README.md",
26
- "README.en.md",
27
- "LICENSE"
28
- ],
29
- "keywords": [
30
- "dsh",
31
- "deepseek-harness",
32
- "dsh-plugin",
33
- "cordis",
34
- "web-ui",
35
- "font",
36
- "anthropic"
37
- ],
38
- "engines": {
39
- "node": ">=20"
40
- },
41
- "dsh": {
42
- "bundle": {
43
- "patch": "./cordis.patch.yml"
44
- },
45
- "client": {
46
- "inject": [],
47
- "platform": "web",
48
- "immediately": true
49
- }
50
- },
51
- "peerDependencies": {
52
- "@deepseek-ai/cordis": "^4.0.1"
53
- }
54
- }
1
+ {
2
+ "name": "dsh-anthropic-fonts",
3
+ "version": "0.2.0",
4
+ "description": "Switch the DSH web interface to Anthropic Sans Web Text and model conversation to Anthropic Serif Web Text.",
5
+ "license": "MIT",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "git+https://github.com/Isilsolme/dsh-anthropic-fonts.git"
9
+ },
10
+ "homepage": "https://github.com/Isilsolme/dsh-anthropic-fonts#readme",
11
+ "bugs": {
12
+ "url": "https://github.com/Isilsolme/dsh-anthropic-fonts/issues"
13
+ },
14
+ "type": "module",
15
+ "main": "lib/index.js",
16
+ "exports": {
17
+ ".": "./lib/index.js",
18
+ "./client": "./lib/client.js",
19
+ "./package.json": "./package.json"
20
+ },
21
+ "files": [
22
+ "lib",
23
+ "cordis.patch.yml",
24
+ "README.md",
25
+ "README.en.md",
26
+ "LICENSE"
27
+ ],
28
+ "keywords": [
29
+ "dsh",
30
+ "deepseek-harness",
31
+ "dsh-plugin",
32
+ "cordis",
33
+ "web-ui",
34
+ "font",
35
+ "anthropic"
36
+ ],
37
+ "engines": {
38
+ "node": ">=22"
39
+ },
40
+ "dsh": {
41
+ "bundle": {
42
+ "patch": "./cordis.patch.yml"
43
+ },
44
+ "client": {
45
+ "inject": [],
46
+ "platform": "web",
47
+ "immediately": true
48
+ }
49
+ },
50
+ "peerDependencies": {
51
+ "@deepseek-ai/cordis": "^4.0.1"
52
+ }
53
+ }
Binary file
Binary file
Binary file