vscode-colaview 0.3.2 → 0.4.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/.vscode/settings.json +1 -1
- package/CHANGELOG.md +30 -0
- package/README.md +311 -279
- package/README_CN.md +311 -279
- package/RELEASE_NOTES.md +56 -0
- package/esbuild.js +2 -0
- package/package.json +58 -19
- package/package.nls.json +14 -0
- package/package.nls.zh-cn.json +14 -0
- package/src/commands/commands.ts +48 -0
- package/src/docx/docx-builder.ts +241 -0
- package/src/export/docx-exporter.ts +961 -961
- package/src/export/html-exporter.ts +8 -2
- package/src/export/pdf-exporter.ts +65 -0
- package/src/export/pptx-exporter.ts +63 -0
- package/src/export/render-export-images.ts +386 -372
- package/src/export/theme-style.ts +195 -155
- package/src/pptx/pptx-builder.ts +249 -0
- package/src/pptx/zip.ts +158 -0
- package/src/present/presenter.ts +64 -0
- package/src/preview/preview-manager.ts +783 -541
- package/src/preview/webview/app.ts +588 -366
- package/src/preview/webview/index.html +167 -134
- package/src/slides/deck.ts +397 -0
- package/src/slides/markdown.ts +393 -0
- package/src/slides/render.ts +484 -0
- package/src/slides/slides.css +1082 -0
- package/src/themes/built-in/bear.css +89 -38
- package/src/themes/built-in/dark.css +87 -20
- package/src/themes/built-in/dracula.css +93 -38
- package/src/themes/built-in/elegant.css +109 -52
- package/src/themes/built-in/gruvbox.css +97 -42
- package/src/themes/built-in/light.css +80 -20
- package/src/themes/built-in/midnight.css +93 -31
- package/src/themes/built-in/nord.css +93 -38
- package/src/themes/built-in/notion.css +98 -48
- package/src/themes/built-in/sepia.css +99 -47
- package/src/themes/built-in/solarized-dark.css +94 -35
- package/src/themes/built-in/writer.css +99 -44
- package/src/themes/theme-manager.ts +207 -180
- package/src/types/colamd-renderer.d.ts +47 -47
- package/patches/@bytechain.cn+colamd+2.7.11.patch +0 -22
|
@@ -1,42 +1,97 @@
|
|
|
1
|
-
/* ===== ColaMD Theme: 暖木 Gruvbox =====
|
|
2
|
-
Warm walnut dark, cream text, orange ember accents.
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
#
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
1
|
+
/* ===== ColaMD Theme: 暖木 Gruvbox =====
|
|
2
|
+
Warm walnut dark, cream text, orange ember accents.
|
|
3
|
+
|
|
4
|
+
契约:ColaMD 2.8(与 ColaMD-themes / DSH 插件同一套令牌)。
|
|
5
|
+
变量写在 :root;编辑器元素规则针对 #editor .cm-content + .cm-md-*。
|
|
6
|
+
基础版式(行高、字距、列宽、标题度量)由 WebView 的 DSH 对齐层
|
|
7
|
+
按 BASE_CSS 令牌兜底,这里只保留主题个性。 */
|
|
8
|
+
|
|
9
|
+
/* ── 0. Webfont 镜像:主题栈引用的 Google Fonts(latin 子集,OFL)。
|
|
10
|
+
与 ColaMD-themes 2.8 契约一致:编辑器与 DSH 插件两侧同字体;
|
|
11
|
+
离线/断网自动回落主题字体栈;CJK 由系统字体承担,不镜像。 */
|
|
12
|
+
@font-face {
|
|
13
|
+
font-family: "JetBrains Mono"; font-style: normal; font-weight: 100 900; font-display: swap;
|
|
14
|
+
src: url("https://fonts.gstatic.com/s/jetbrainsmono/v24/tDbV2o-flEEny0FZhsfKu5WU4xD7OwE.woff2") format("woff2");
|
|
15
|
+
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
|
16
|
+
}
|
|
17
|
+
@font-face {
|
|
18
|
+
font-family: "Fira Code"; font-style: normal; font-weight: 100 900; font-display: swap;
|
|
19
|
+
src: url("https://fonts.gstatic.com/s/firacode/v27/uU9NCBsR6Z2vfE9aq3bh3dSD.woff2") format("woff2");
|
|
20
|
+
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
:root {
|
|
24
|
+
/* ── 1.1 Seed Palette ── */
|
|
25
|
+
--seed-accent: #fe8019;
|
|
26
|
+
--seed-accent-light: color-mix(in srgb, #fe8019 15%, transparent);
|
|
27
|
+
--seed-accent-dark: color-mix(in srgb, #fe8019 85%, #000);
|
|
28
|
+
--seed-surface: #282828;
|
|
29
|
+
--seed-panel: #3c3836;
|
|
30
|
+
--seed-panel-alt: #1d2021;
|
|
31
|
+
--seed-ink: #ebdbb2;
|
|
32
|
+
--seed-ink-muted: #c5b5a5;
|
|
33
|
+
--seed-ink-dim: #928374;
|
|
34
|
+
--seed-border: #373432;
|
|
35
|
+
--seed-border-strong: #fe8019;
|
|
36
|
+
|
|
37
|
+
/* ── 1.2 Semantic Colors(活变量) ── */
|
|
38
|
+
--bg-color: #282828;
|
|
39
|
+
--text-color: #ebdbb2;
|
|
40
|
+
--text-secondary: #c5b5a5;
|
|
41
|
+
--text-muted: #928374;
|
|
42
|
+
--border-color: #373432;
|
|
43
|
+
--link-color: #83a598;
|
|
44
|
+
--code-bg: rgba(235, 219, 178, 0.1);
|
|
45
|
+
--code-block-bg: #1d2021;
|
|
46
|
+
--blockquote-border: #fe8019;
|
|
47
|
+
--table-header-bg: #3c3836;
|
|
48
|
+
--selection-bg: rgba(254, 128, 25, 0.2);
|
|
49
|
+
--highlight-bg: rgba(250, 189, 47, 0.22);
|
|
50
|
+
|
|
51
|
+
/* ── 1.3 Typography & Metrics(活变量,与 DSH 插件 BASE_CSS 同一消费方) ── */
|
|
52
|
+
--font-body: -apple-system, "Segoe UI", "Noto Sans SC", "PingFang SC", sans-serif;
|
|
53
|
+
--font-mono: "JetBrains Mono", "Fira Code", "SF Mono", Menlo, Consolas, monospace;
|
|
54
|
+
--editor-font-size: 16px;
|
|
55
|
+
--editor-column-width: 820px;
|
|
56
|
+
--page-bg: #282828;
|
|
57
|
+
--seed-emphasis: #fe8019;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/* ═══════════════════════════════════════════════════════════
|
|
61
|
+
SECTION 2 — 编辑器 DOM(#editor .cm-content + .cm-md-*)
|
|
62
|
+
═══════════════════════════════════════════════════════════ */
|
|
63
|
+
|
|
64
|
+
#editor .cm-content .cm-md-atxheading1,
|
|
65
|
+
#editor .cm-content .cm-md-atxheading2,
|
|
66
|
+
#editor .cm-content .cm-md-atxheading3 {
|
|
67
|
+
color: #fbf1c7;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
#editor .cm-content .cm-md-inlinecode {
|
|
71
|
+
color: #b8bb26;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
#editor .cm-content .cm-md-hr {
|
|
75
|
+
border-top-color: #504945;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/* ═══════════════════════════════════════════════════════════
|
|
79
|
+
SECTION 3 — 导出 HTML(.colamd-document,只补配色与字体)
|
|
80
|
+
结构(页边距、标题层级、列表缩进)由导出外壳提供。
|
|
81
|
+
═══════════════════════════════════════════════════════════ */
|
|
82
|
+
|
|
83
|
+
.colamd-document {
|
|
84
|
+
font-family: var(--font-body);
|
|
85
|
+
font-size: var(--editor-font-size);
|
|
86
|
+
line-height: 1.78;
|
|
87
|
+
background: var(--bg-color);
|
|
88
|
+
color: var(--text-color);
|
|
89
|
+
}
|
|
90
|
+
.colamd-document strong {
|
|
91
|
+
color: var(--seed-emphasis);
|
|
92
|
+
}
|
|
93
|
+
.colamd-document code {
|
|
94
|
+
background: var(--code-bg);
|
|
95
|
+
color: #b8bb26;
|
|
96
|
+
font-family: var(--font-mono);
|
|
97
|
+
}
|
|
@@ -1,20 +1,80 @@
|
|
|
1
|
-
/* ===== ColaMD Theme: 浅色 Light =====
|
|
2
|
-
GitHub-inspired clean white. The default look.
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
1
|
+
/* ===== ColaMD Theme: 浅色 Light =====
|
|
2
|
+
GitHub-inspired clean white. The default look.
|
|
3
|
+
|
|
4
|
+
契约:ColaMD 2.8(与 ColaMD-themes / DSH 插件同一套令牌)。
|
|
5
|
+
变量写在 :root;编辑器元素规则针对 #editor .cm-content + .cm-md-*。
|
|
6
|
+
基础版式(行高、字距、列宽、标题度量)由 WebView 的 DSH 对齐层
|
|
7
|
+
按 BASE_CSS 令牌兜底,这里只保留主题个性。 */
|
|
8
|
+
|
|
9
|
+
/* ── 0. Webfont 镜像:主题栈引用的 Google Fonts(latin 子集,OFL)。
|
|
10
|
+
与 ColaMD-themes 2.8 契约一致:编辑器与 DSH 插件两侧同字体;
|
|
11
|
+
离线/断网自动回落主题字体栈;CJK 由系统字体承担,不镜像。 */
|
|
12
|
+
@font-face {
|
|
13
|
+
font-family: "JetBrains Mono"; font-style: normal; font-weight: 100 900; font-display: swap;
|
|
14
|
+
src: url("https://fonts.gstatic.com/s/jetbrainsmono/v24/tDbV2o-flEEny0FZhsfKu5WU4xD7OwE.woff2") format("woff2");
|
|
15
|
+
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
|
16
|
+
}
|
|
17
|
+
@font-face {
|
|
18
|
+
font-family: "Fira Code"; font-style: normal; font-weight: 100 900; font-display: swap;
|
|
19
|
+
src: url("https://fonts.gstatic.com/s/firacode/v27/uU9NCBsR6Z2vfE9aq3bh3dSD.woff2") format("woff2");
|
|
20
|
+
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
:root {
|
|
24
|
+
/* ── 1.1 Seed Palette ── */
|
|
25
|
+
--seed-accent: #0969da;
|
|
26
|
+
--seed-accent-light: color-mix(in srgb, #0969da 15%, transparent);
|
|
27
|
+
--seed-accent-dark: color-mix(in srgb, #0969da 85%, #000);
|
|
28
|
+
--seed-surface: #ffffff;
|
|
29
|
+
--seed-panel: #f6f8fa;
|
|
30
|
+
--seed-panel-alt: #f6f8fa;
|
|
31
|
+
--seed-ink: #24292f;
|
|
32
|
+
--seed-ink-muted: #656d76;
|
|
33
|
+
--seed-ink-dim: #656d76;
|
|
34
|
+
--seed-border: #dce1e6;
|
|
35
|
+
--seed-border-strong: #0969da;
|
|
36
|
+
|
|
37
|
+
/* ── 1.2 Semantic Colors(活变量) ── */
|
|
38
|
+
--bg-color: #ffffff;
|
|
39
|
+
--text-color: #24292f;
|
|
40
|
+
--text-secondary: #656d76;
|
|
41
|
+
--text-muted: #656d76;
|
|
42
|
+
--border-color: #dce1e6;
|
|
43
|
+
--link-color: #0969da;
|
|
44
|
+
--code-bg: rgba(175, 184, 193, 0.2);
|
|
45
|
+
--code-block-bg: #f6f8fa;
|
|
46
|
+
--blockquote-border: #d0d7de;
|
|
47
|
+
--table-header-bg: #f6f8fa;
|
|
48
|
+
--selection-bg: rgba(9, 105, 218, 0.15);
|
|
49
|
+
--highlight-bg: #fff3bf;
|
|
50
|
+
|
|
51
|
+
/* ── 1.3 Typography & Metrics(活变量,与 DSH 插件 BASE_CSS 同一消费方) ── */
|
|
52
|
+
--font-body: -apple-system, "Segoe UI", "Noto Sans SC", "PingFang SC", sans-serif;
|
|
53
|
+
--font-mono: "JetBrains Mono", "Fira Code", "SF Mono", Menlo, Consolas, monospace;
|
|
54
|
+
--editor-font-size: 16px;
|
|
55
|
+
--editor-column-width: 820px;
|
|
56
|
+
--page-bg: #ffffff;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/* ═══════════════════════════════════════════════════════════
|
|
60
|
+
SECTION 2 — 编辑器 DOM(#editor .cm-content + .cm-md-*)
|
|
61
|
+
═══════════════════════════════════════════════════════════ */
|
|
62
|
+
|
|
63
|
+
/* 本主题无额外编辑器规则,全部交给基础版式与令牌。 */
|
|
64
|
+
|
|
65
|
+
/* ═══════════════════════════════════════════════════════════
|
|
66
|
+
SECTION 3 — 导出 HTML(.colamd-document,只补配色与字体)
|
|
67
|
+
结构(页边距、标题层级、列表缩进)由导出外壳提供。
|
|
68
|
+
═══════════════════════════════════════════════════════════ */
|
|
69
|
+
|
|
70
|
+
.colamd-document {
|
|
71
|
+
font-family: var(--font-body);
|
|
72
|
+
font-size: var(--editor-font-size);
|
|
73
|
+
line-height: 1.78;
|
|
74
|
+
background: var(--bg-color);
|
|
75
|
+
color: var(--text-color);
|
|
76
|
+
}
|
|
77
|
+
.colamd-document code {
|
|
78
|
+
background: var(--code-bg);
|
|
79
|
+
font-family: var(--font-mono);
|
|
80
|
+
}
|
|
@@ -1,31 +1,93 @@
|
|
|
1
|
-
/* ===== ColaMD Theme: 午夜 Midnight =====
|
|
2
|
-
Pure OLED black, Apple-style blue links, maximum contrast.
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
#
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
1
|
+
/* ===== ColaMD Theme: 午夜 Midnight =====
|
|
2
|
+
Pure OLED black, Apple-style blue links, maximum contrast.
|
|
3
|
+
|
|
4
|
+
契约:ColaMD 2.8(与 ColaMD-themes / DSH 插件同一套令牌)。
|
|
5
|
+
变量写在 :root;编辑器元素规则针对 #editor .cm-content + .cm-md-*。
|
|
6
|
+
基础版式(行高、字距、列宽、标题度量)由 WebView 的 DSH 对齐层
|
|
7
|
+
按 BASE_CSS 令牌兜底,这里只保留主题个性。 */
|
|
8
|
+
|
|
9
|
+
/* ── 0. Webfont 镜像:主题栈引用的 Google Fonts(latin 子集,OFL)。
|
|
10
|
+
与 ColaMD-themes 2.8 契约一致:编辑器与 DSH 插件两侧同字体;
|
|
11
|
+
离线/断网自动回落主题字体栈;CJK 由系统字体承担,不镜像。 */
|
|
12
|
+
@font-face {
|
|
13
|
+
font-family: "JetBrains Mono"; font-style: normal; font-weight: 100 900; font-display: swap;
|
|
14
|
+
src: url("https://fonts.gstatic.com/s/jetbrainsmono/v24/tDbV2o-flEEny0FZhsfKu5WU4xD7OwE.woff2") format("woff2");
|
|
15
|
+
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
|
16
|
+
}
|
|
17
|
+
@font-face {
|
|
18
|
+
font-family: "Fira Code"; font-style: normal; font-weight: 100 900; font-display: swap;
|
|
19
|
+
src: url("https://fonts.gstatic.com/s/firacode/v27/uU9NCBsR6Z2vfE9aq3bh3dSD.woff2") format("woff2");
|
|
20
|
+
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
:root {
|
|
24
|
+
/* ── 1.1 Seed Palette ── */
|
|
25
|
+
--seed-accent: #0a84ff;
|
|
26
|
+
--seed-accent-light: color-mix(in srgb, #0a84ff 15%, transparent);
|
|
27
|
+
--seed-accent-dark: color-mix(in srgb, #0a84ff 85%, #000);
|
|
28
|
+
--seed-surface: #000000;
|
|
29
|
+
--seed-panel: #111111;
|
|
30
|
+
--seed-panel-alt: #111111;
|
|
31
|
+
--seed-ink: #d6d6d6;
|
|
32
|
+
--seed-ink-muted: #b1b1b1;
|
|
33
|
+
--seed-ink-dim: #7a7a7a;
|
|
34
|
+
--seed-border: #1c1c1c;
|
|
35
|
+
--seed-border-strong: #0a84ff;
|
|
36
|
+
|
|
37
|
+
/* ── 1.2 Semantic Colors(活变量) ── */
|
|
38
|
+
--bg-color: #000000;
|
|
39
|
+
--text-color: #d6d6d6;
|
|
40
|
+
--text-secondary: #b1b1b1;
|
|
41
|
+
--text-muted: #7a7a7a;
|
|
42
|
+
--border-color: #1c1c1c;
|
|
43
|
+
--link-color: #0a84ff;
|
|
44
|
+
--code-bg: rgba(255, 255, 255, 0.08);
|
|
45
|
+
--code-block-bg: #111111;
|
|
46
|
+
--blockquote-border: #3a3a3a;
|
|
47
|
+
--table-header-bg: #111111;
|
|
48
|
+
--selection-bg: rgba(10, 132, 255, 0.28);
|
|
49
|
+
--highlight-bg: rgba(255, 214, 10, 0.25);
|
|
50
|
+
|
|
51
|
+
/* ── 1.3 Typography & Metrics(活变量,与 DSH 插件 BASE_CSS 同一消费方) ── */
|
|
52
|
+
--font-body: -apple-system, "Segoe UI", "Noto Sans SC", "PingFang SC", sans-serif;
|
|
53
|
+
--font-mono: "JetBrains Mono", "Fira Code", "SF Mono", Menlo, Consolas, monospace;
|
|
54
|
+
--editor-font-size: 16px;
|
|
55
|
+
--editor-column-width: 820px;
|
|
56
|
+
--page-bg: #000000;
|
|
57
|
+
--seed-emphasis: #e8e8e8;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/* ═══════════════════════════════════════════════════════════
|
|
61
|
+
SECTION 2 — 编辑器 DOM(#editor .cm-content + .cm-md-*)
|
|
62
|
+
═══════════════════════════════════════════════════════════ */
|
|
63
|
+
|
|
64
|
+
#editor .cm-content .cm-md-atxheading1,
|
|
65
|
+
#editor .cm-content .cm-md-atxheading2,
|
|
66
|
+
#editor .cm-content .cm-md-atxheading3 {
|
|
67
|
+
color: #f5f5f5;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
#editor .cm-content .cm-md-inlinecode {
|
|
71
|
+
color: #e5786d;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/* ═══════════════════════════════════════════════════════════
|
|
75
|
+
SECTION 3 — 导出 HTML(.colamd-document,只补配色与字体)
|
|
76
|
+
结构(页边距、标题层级、列表缩进)由导出外壳提供。
|
|
77
|
+
═══════════════════════════════════════════════════════════ */
|
|
78
|
+
|
|
79
|
+
.colamd-document {
|
|
80
|
+
font-family: var(--font-body);
|
|
81
|
+
font-size: var(--editor-font-size);
|
|
82
|
+
line-height: 1.78;
|
|
83
|
+
background: var(--bg-color);
|
|
84
|
+
color: var(--text-color);
|
|
85
|
+
}
|
|
86
|
+
.colamd-document strong {
|
|
87
|
+
color: var(--seed-emphasis);
|
|
88
|
+
}
|
|
89
|
+
.colamd-document code {
|
|
90
|
+
background: var(--code-bg);
|
|
91
|
+
color: #e5786d;
|
|
92
|
+
font-family: var(--font-mono);
|
|
93
|
+
}
|
|
@@ -1,38 +1,93 @@
|
|
|
1
|
-
/* ===== ColaMD Theme: 极地 Nord =====
|
|
2
|
-
Arctic night: cool blue-grays, frost-cyan links.
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
#
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
1
|
+
/* ===== ColaMD Theme: 极地 Nord =====
|
|
2
|
+
Arctic night: cool blue-grays, frost-cyan links.
|
|
3
|
+
|
|
4
|
+
契约:ColaMD 2.8(与 ColaMD-themes / DSH 插件同一套令牌)。
|
|
5
|
+
变量写在 :root;编辑器元素规则针对 #editor .cm-content + .cm-md-*。
|
|
6
|
+
基础版式(行高、字距、列宽、标题度量)由 WebView 的 DSH 对齐层
|
|
7
|
+
按 BASE_CSS 令牌兜底,这里只保留主题个性。 */
|
|
8
|
+
|
|
9
|
+
/* ── 0. Webfont 镜像:主题栈引用的 Google Fonts(latin 子集,OFL)。
|
|
10
|
+
与 ColaMD-themes 2.8 契约一致:编辑器与 DSH 插件两侧同字体;
|
|
11
|
+
离线/断网自动回落主题字体栈;CJK 由系统字体承担,不镜像。 */
|
|
12
|
+
@font-face {
|
|
13
|
+
font-family: "JetBrains Mono"; font-style: normal; font-weight: 100 900; font-display: swap;
|
|
14
|
+
src: url("https://fonts.gstatic.com/s/jetbrainsmono/v24/tDbV2o-flEEny0FZhsfKu5WU4xD7OwE.woff2") format("woff2");
|
|
15
|
+
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
|
16
|
+
}
|
|
17
|
+
@font-face {
|
|
18
|
+
font-family: "Fira Code"; font-style: normal; font-weight: 100 900; font-display: swap;
|
|
19
|
+
src: url("https://fonts.gstatic.com/s/firacode/v27/uU9NCBsR6Z2vfE9aq3bh3dSD.woff2") format("woff2");
|
|
20
|
+
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
:root {
|
|
24
|
+
/* ── 1.1 Seed Palette ── */
|
|
25
|
+
--seed-accent: #88c0d0;
|
|
26
|
+
--seed-accent-light: color-mix(in srgb, #88c0d0 15%, transparent);
|
|
27
|
+
--seed-accent-dark: color-mix(in srgb, #88c0d0 85%, #000);
|
|
28
|
+
--seed-surface: #2e3440;
|
|
29
|
+
--seed-panel: #3b4252;
|
|
30
|
+
--seed-panel-alt: #262c37;
|
|
31
|
+
--seed-ink: #d8dee9;
|
|
32
|
+
--seed-ink-muted: #aebdd4;
|
|
33
|
+
--seed-ink-dim: #7d8ba1;
|
|
34
|
+
--seed-border: #383e4e;
|
|
35
|
+
--seed-border-strong: #88c0d0;
|
|
36
|
+
|
|
37
|
+
/* ── 1.2 Semantic Colors(活变量) ── */
|
|
38
|
+
--bg-color: #2e3440;
|
|
39
|
+
--text-color: #d8dee9;
|
|
40
|
+
--text-secondary: #aebdd4;
|
|
41
|
+
--text-muted: #7d8ba1;
|
|
42
|
+
--border-color: #383e4e;
|
|
43
|
+
--link-color: #88c0d0;
|
|
44
|
+
--code-bg: rgba(136, 192, 208, 0.12);
|
|
45
|
+
--code-block-bg: #262c37;
|
|
46
|
+
--blockquote-border: #81a1c1;
|
|
47
|
+
--table-header-bg: #3b4252;
|
|
48
|
+
--selection-bg: rgba(136, 192, 208, 0.2);
|
|
49
|
+
--highlight-bg: rgba(235, 203, 139, 0.25);
|
|
50
|
+
|
|
51
|
+
/* ── 1.3 Typography & Metrics(活变量,与 DSH 插件 BASE_CSS 同一消费方) ── */
|
|
52
|
+
--font-body: -apple-system, "Segoe UI", "Noto Sans SC", "PingFang SC", sans-serif;
|
|
53
|
+
--font-mono: "JetBrains Mono", "Fira Code", "SF Mono", Menlo, Consolas, monospace;
|
|
54
|
+
--editor-font-size: 16px;
|
|
55
|
+
--editor-column-width: 820px;
|
|
56
|
+
--page-bg: #2e3440;
|
|
57
|
+
--seed-emphasis: #8fbcbb;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/* ═══════════════════════════════════════════════════════════
|
|
61
|
+
SECTION 2 — 编辑器 DOM(#editor .cm-content + .cm-md-*)
|
|
62
|
+
═══════════════════════════════════════════════════════════ */
|
|
63
|
+
|
|
64
|
+
#editor .cm-content .cm-md-atxheading1,
|
|
65
|
+
#editor .cm-content .cm-md-atxheading2,
|
|
66
|
+
#editor .cm-content .cm-md-atxheading3 {
|
|
67
|
+
color: #eceff4;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
#editor .cm-content .cm-md-inlinecode {
|
|
71
|
+
color: #88c0d0;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/* ═══════════════════════════════════════════════════════════
|
|
75
|
+
SECTION 3 — 导出 HTML(.colamd-document,只补配色与字体)
|
|
76
|
+
结构(页边距、标题层级、列表缩进)由导出外壳提供。
|
|
77
|
+
═══════════════════════════════════════════════════════════ */
|
|
78
|
+
|
|
79
|
+
.colamd-document {
|
|
80
|
+
font-family: var(--font-body);
|
|
81
|
+
font-size: var(--editor-font-size);
|
|
82
|
+
line-height: 1.78;
|
|
83
|
+
background: var(--bg-color);
|
|
84
|
+
color: var(--text-color);
|
|
85
|
+
}
|
|
86
|
+
.colamd-document strong {
|
|
87
|
+
color: var(--seed-emphasis);
|
|
88
|
+
}
|
|
89
|
+
.colamd-document code {
|
|
90
|
+
background: var(--code-bg);
|
|
91
|
+
color: #88c0d0;
|
|
92
|
+
font-family: var(--font-mono);
|
|
93
|
+
}
|
|
@@ -1,48 +1,98 @@
|
|
|
1
|
-
/* ===== ColaMD Theme: 简白 Notion =====
|
|
2
|
-
Clean minimal workspace, warm off-black text on white.
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
border
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
border
|
|
47
|
-
|
|
48
|
-
|
|
1
|
+
/* ===== ColaMD Theme: 简白 Notion =====
|
|
2
|
+
Clean minimal workspace, warm off-black text on white.
|
|
3
|
+
|
|
4
|
+
契约:ColaMD 2.8(与 ColaMD-themes / DSH 插件同一套令牌)。
|
|
5
|
+
变量写在 :root;编辑器元素规则针对 #editor .cm-content + .cm-md-*。
|
|
6
|
+
基础版式(行高、字距、列宽、标题度量)由 WebView 的 DSH 对齐层
|
|
7
|
+
按 BASE_CSS 令牌兜底,这里只保留主题个性。 */
|
|
8
|
+
|
|
9
|
+
/* ── 0. Webfont 镜像:主题栈引用的 Google Fonts(latin 子集,OFL)。
|
|
10
|
+
与 ColaMD-themes 2.8 契约一致:编辑器与 DSH 插件两侧同字体;
|
|
11
|
+
离线/断网自动回落主题字体栈;CJK 由系统字体承担,不镜像。 */
|
|
12
|
+
@font-face {
|
|
13
|
+
font-family: "JetBrains Mono"; font-style: normal; font-weight: 100 900; font-display: swap;
|
|
14
|
+
src: url("https://fonts.gstatic.com/s/jetbrainsmono/v24/tDbV2o-flEEny0FZhsfKu5WU4xD7OwE.woff2") format("woff2");
|
|
15
|
+
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
|
16
|
+
}
|
|
17
|
+
@font-face {
|
|
18
|
+
font-family: "Fira Code"; font-style: normal; font-weight: 100 900; font-display: swap;
|
|
19
|
+
src: url("https://fonts.gstatic.com/s/firacode/v27/uU9NCBsR6Z2vfE9aq3bh3dSD.woff2") format("woff2");
|
|
20
|
+
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
:root {
|
|
24
|
+
/* ── 1.1 Seed Palette ── */
|
|
25
|
+
--seed-accent: #37352f;
|
|
26
|
+
--seed-accent-light: color-mix(in srgb, #37352f 15%, transparent);
|
|
27
|
+
--seed-accent-dark: color-mix(in srgb, #37352f 85%, #000);
|
|
28
|
+
--seed-surface: #ffffff;
|
|
29
|
+
--seed-panel: #f7f6f3;
|
|
30
|
+
--seed-panel-alt: #f7f6f3;
|
|
31
|
+
--seed-ink: #37352f;
|
|
32
|
+
--seed-ink-muted: #777674;
|
|
33
|
+
--seed-ink-dim: #9b9a97;
|
|
34
|
+
--seed-border: #eeeeed;
|
|
35
|
+
--seed-border-strong: #37352f;
|
|
36
|
+
|
|
37
|
+
/* ── 1.2 Semantic Colors(活变量) ── */
|
|
38
|
+
--bg-color: #ffffff;
|
|
39
|
+
--text-color: #37352f;
|
|
40
|
+
--text-secondary: #777674;
|
|
41
|
+
--text-muted: #9b9a97;
|
|
42
|
+
--border-color: #eeeeed;
|
|
43
|
+
--link-color: #37352f;
|
|
44
|
+
--code-bg: #f7f6f3;
|
|
45
|
+
--code-block-bg: #f7f6f3;
|
|
46
|
+
--blockquote-border: #37352f;
|
|
47
|
+
--table-header-bg: #f7f6f3;
|
|
48
|
+
--selection-bg: rgba(35, 131, 226, 0.14);
|
|
49
|
+
--highlight-bg: #fdecc8;
|
|
50
|
+
|
|
51
|
+
/* ── 1.3 Typography & Metrics(活变量,与 DSH 插件 BASE_CSS 同一消费方) ── */
|
|
52
|
+
--font-body: -apple-system, "Segoe UI", "Noto Sans SC", "PingFang SC", sans-serif;
|
|
53
|
+
--font-mono: "JetBrains Mono", "Fira Code", "SF Mono", Menlo, Consolas, monospace;
|
|
54
|
+
--editor-font-size: 16px;
|
|
55
|
+
--editor-column-width: 820px;
|
|
56
|
+
--page-bg: #ffffff;
|
|
57
|
+
--seed-emphasis: #37352f;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/* ═══════════════════════════════════════════════════════════
|
|
61
|
+
SECTION 2 — 编辑器 DOM(#editor .cm-content + .cm-md-*)
|
|
62
|
+
═══════════════════════════════════════════════════════════ */
|
|
63
|
+
|
|
64
|
+
#editor .cm-content .cm-md-inlinecode {
|
|
65
|
+
color: #eb5757;
|
|
66
|
+
background: #f7f6f3;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
#editor .cm-content .cm-md-table-widget th,
|
|
70
|
+
#editor .cm-content .cm-md-table-widget td {
|
|
71
|
+
border-left: none;
|
|
72
|
+
border-right: none;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
#editor .cm-content .cm-md-url {
|
|
76
|
+
color: #9b9a97;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/* ═══════════════════════════════════════════════════════════
|
|
80
|
+
SECTION 3 — 导出 HTML(.colamd-document,只补配色与字体)
|
|
81
|
+
结构(页边距、标题层级、列表缩进)由导出外壳提供。
|
|
82
|
+
═══════════════════════════════════════════════════════════ */
|
|
83
|
+
|
|
84
|
+
.colamd-document {
|
|
85
|
+
font-family: var(--font-body);
|
|
86
|
+
font-size: var(--editor-font-size);
|
|
87
|
+
line-height: 1.78;
|
|
88
|
+
background: var(--bg-color);
|
|
89
|
+
color: var(--text-color);
|
|
90
|
+
}
|
|
91
|
+
.colamd-document strong {
|
|
92
|
+
color: var(--seed-emphasis);
|
|
93
|
+
}
|
|
94
|
+
.colamd-document code {
|
|
95
|
+
background: var(--code-bg);
|
|
96
|
+
color: #eb5757;
|
|
97
|
+
font-family: var(--font-mono);
|
|
98
|
+
}
|