@scribdown/ui-handdrawn 0.3.0 → 0.3.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scribdown/ui-handdrawn",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "description": "Scribdown 手绘风格视觉组件:设计 Token、样式与 SVG 资产。",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -27,6 +27,10 @@
27
27
  "typescript": "^5.8.3",
28
28
  "vitest": "^3.2.4"
29
29
  },
30
+ "dependencies": {
31
+ "@fontsource-variable/noto-serif-sc": "5.3.0",
32
+ "lxgw-wenkai-screen-webfont": "1.7.0"
33
+ },
30
34
  "scripts": {
31
35
  "test": "vitest run --passWithNoTests",
32
36
  "lint": "eslint .",
@@ -0,0 +1,3 @@
1
+ /* 字体资产统一由共享 UI 包装配,所有宿主均使用本地 WOFF2,不依赖系统已安装字体。 */
2
+ @import "@fontsource-variable/noto-serif-sc/wght.css";
3
+ @import "lxgw-wenkai-screen-webfont/lxgwwenkaiscreen.css";
@@ -39,8 +39,7 @@
39
39
  left: 0;
40
40
  min-width: 26px;
41
41
  color: var(--scribdown-color-warning);
42
- font-family: "Caveat", "Comic Sans MS", "Bradley Hand", "Segoe Print", "LXGW WenKai",
43
- var(--scribdown-font-heading);
42
+ font-family: var(--scribdown-font-heading);
44
43
  font-size: 22px;
45
44
  font-style: normal;
46
45
  font-weight: 700;
@@ -68,7 +68,8 @@
68
68
  32px 29px,
69
69
  auto;
70
70
  overflow: auto;
71
- overscroll-behavior: contain;
71
+ /* 图表无可滚动空间或已经到达边界时,继续把滚轮交给外层正文滚动容器。 */
72
+ overscroll-behavior: auto;
72
73
  scrollbar-gutter: stable both-edges;
73
74
  }
74
75
 
@@ -120,8 +120,9 @@
120
120
 
121
121
  /* ─── 与主题无关的 Token ──────────────────────────────────────────── */
122
122
  :root {
123
- --scribdown-font-body: "Source Serif 4", "Noto Serif SC", serif;
124
- --scribdown-font-heading: "Caveat", "LXGW WenKai", "Noto Serif SC", serif;
123
+ /* 字体由 styles.css 本地加载;同一字体覆盖中英文,避免逐字符回退造成视觉基线错位。 */
124
+ --scribdown-font-body: "Noto Serif SC Variable", "Songti SC", serif;
125
+ --scribdown-font-heading: "LXGW WenKai Screen", "Kaiti SC", serif;
125
126
  --scribdown-font-code: "JetBrains Mono", "Fira Code", monospace;
126
127
 
127
128
  /* 四角独立写法,呼应手绘感 */
package/src/styles.css CHANGED
@@ -7,6 +7,9 @@
7
7
  * 调整顺序或新增模块时,仅需修改本文件。
8
8
  */
9
9
 
10
+ /* 0. 字体资产:随宿主本地打包,保证浏览器插件、文档站与 VS Code Webview 字形一致。 */
11
+ @import "./styles/fonts.css";
12
+
10
13
  /* 1. 设计 token:浅色 + 暗色主题变量 */
11
14
  @import "./styles/tokens.css";
12
15