@bytechain.cn/colamd-themes 0.5.9 → 0.6.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.
Files changed (69) hide show
  1. package/README.md +85 -19
  2. package/dist/cli.js +70 -6
  3. package/dist/cli.js.map +1 -1
  4. package/dist/compat.d.ts +23 -3
  5. package/dist/compat.js +71 -12
  6. package/dist/compat.js.map +1 -1
  7. package/dist/dsh-plugin.js +1 -1
  8. package/dist/generator.d.ts +1 -1
  9. package/dist/generator.js +5 -2
  10. package/dist/generator.js.map +1 -1
  11. package/dist/models.d.ts +7 -1
  12. package/dist/models.js +1 -1
  13. package/dist/models.js.map +1 -1
  14. package/dist/renderer.d.ts +1 -1
  15. package/dist/renderer.js +21 -3
  16. package/dist/renderer.js.map +1 -1
  17. package/dist/slides-markdown.d.ts +45 -0
  18. package/dist/slides-markdown.js +515 -0
  19. package/dist/slides-markdown.js.map +1 -0
  20. package/dist/slides.d.ts +36 -0
  21. package/dist/slides.js +149 -0
  22. package/dist/slides.js.map +1 -0
  23. package/dist/templates/theme-template.hbs +11 -0
  24. package/dist/validators.d.ts +2 -2
  25. package/dist/validators.js +71 -4
  26. package/dist/validators.js.map +1 -1
  27. package/package.json +3 -2
  28. package/skills/build-skills.sh +224 -217
  29. package/skills/colamd-themes/SKILL.md +178 -6
  30. package/themes/8-bit-orbit.css +817 -0
  31. package/themes/README.md +69 -0
  32. package/themes/biennale-yellow.css +577 -0
  33. package/themes/block-frame.css +774 -0
  34. package/themes/blue-professional.css +741 -0
  35. package/themes/bold-poster.css +794 -0
  36. package/themes/broadside.css +837 -0
  37. package/themes/capsule.css +767 -0
  38. package/themes/cartesian.css +584 -0
  39. package/themes/cobalt-grid.css +632 -0
  40. package/themes/coral.css +699 -0
  41. package/themes/creative-mode.css +642 -0
  42. package/themes/daisy-days.css +1052 -0
  43. package/themes/editorial-forest.css +796 -0
  44. package/themes/editorial-tri-tone.css +811 -0
  45. package/themes/emerald-editorial.css +683 -0
  46. package/themes/grove.css +623 -0
  47. package/themes/indigo-deck.css +336 -0
  48. package/themes/indigo-porcelain-light.css +335 -0
  49. package/themes/long-table.css +782 -0
  50. package/themes/mat.css +848 -0
  51. package/themes/monochrome.css +782 -0
  52. package/themes/neo-grid-bold.css +838 -0
  53. package/themes/peoples-platform.css +843 -0
  54. package/themes/pin-and-paper.css +700 -0
  55. package/themes/pink-script-dark.css +648 -0
  56. package/themes/pink-script.css +290 -0
  57. package/themes/playful.css +774 -0
  58. package/themes/raw-grid.css +814 -0
  59. package/themes/retro-windows.css +767 -0
  60. package/themes/retro-zine.css +814 -0
  61. package/themes/sakura-chroma.css +775 -0
  62. package/themes/scatterbrain.css +726 -0
  63. package/themes/signal.css +872 -0
  64. package/themes/soft-editorial.css +788 -0
  65. package/themes/stencil-tablet.css +922 -0
  66. package/themes/studio.css +767 -0
  67. package/themes/swiss-lemon-dark.css +529 -0
  68. package/themes/swiss-lemon-light.css +375 -0
  69. package/themes/vellum.css +723 -0
@@ -0,0 +1,290 @@
1
+ /*
2
+ * ColaMD Theme: pink-script
3
+ * Black canvas, hot pink accent, pearl-cream paper, DM Serif Display headlines: late-night editorial luxury.
4
+ * Generated by colamd-themes (local-html: D:\workspace\git\beautiful-html-templates\templates\pink-script\template.html)
5
+ *
6
+ * 契约:ColaMD Extend 2.7(CodeMirror 6 编辑器 + Pele 图表引擎)
7
+ *
8
+ * 两条硬规矩:
9
+ * 1. 变量一律写在 :root。没写的活变量继承 Light 主题默认值;写在别的选择器里
10
+ * 编辑器继承不到。
11
+ * 2. 编辑器里没有 <h1>/<blockquote> 这种元素:标题是「一行」带一个类,引用与
12
+ * 代码块是每一行一个 div,加粗是一个 span。所以选择器只认 .cm-md-* 钩子,
13
+ * 并且引用/代码块**不能加纵向 padding**——那会按行累加。
14
+ *
15
+ * ═══════════════════════════════════════════════════════════
16
+ * SECTION 1 — Design Tokens
17
+ * 改 11 个种子色 + 3 组字体即可换一套主题
18
+ * ═══════════════════════════════════════════════════════════ */
19
+
20
+ :root {
21
+
22
+ /* ── 1.1 Seed Palette ──
23
+ 本工具的再生成与校验读这一层;编辑器不消费。 */
24
+ --seed-accent: #ff66a8;
25
+ --seed-accent-light: #ff66a8;
26
+ --seed-accent-dark: #ff66a8;
27
+ --seed-surface: #f5edf1;
28
+ --seed-panel: #e4dde1;
29
+ --seed-panel-alt: #d1cace;
30
+ --seed-ink: #060507;
31
+ --seed-ink-muted: #645c6b;
32
+ --seed-ink-dim: #645c6b;
33
+ --seed-border: #ada7ab;
34
+ --seed-border-strong: #ada7ab;
35
+
36
+ /* ── 1.2 Semantic Colors(活变量)── */
37
+ --bg-color: var(--seed-surface);
38
+ --text-color: var(--seed-ink);
39
+ --text-secondary: var(--seed-ink-muted);
40
+ --text-muted: var(--seed-ink-dim);
41
+ --border-color: var(--seed-border);
42
+ --link-color: var(--seed-accent);
43
+
44
+ --code-bg: var(--seed-panel);
45
+ --code-block-bg: var(--seed-panel-alt);
46
+ --code-block-text: #060507;
47
+
48
+ --blockquote-border: var(--seed-accent);
49
+ --blockquote-bg: var(--seed-panel);
50
+ --table-header-bg: var(--seed-panel);
51
+
52
+ --selection-bg: rgba(255, 102, 168, 0.18);
53
+ --highlight-bg: rgba(255, 102, 168, 0.18);
54
+
55
+ /* ── 1.3 Typography & Metrics(活变量)── */
56
+ --font-body: "Inter", "Noto Sans SC", sans-serif;
57
+ --font-mono: "JetBrains Mono", "Noto Sans Mono CJK SC", monospace;
58
+ --editor-font-size: 22px;
59
+ --editor-column-width: 820px;
60
+
61
+ /* ── 1.4 Pele Diagram(9 个变量,全部可省略)──
62
+ 图直接画在代码块底色上,所以底色与字色都从 --code-block-* 推导。 */
63
+ --pele-bg: var(--code-block-bg);
64
+ --pele-fg: var(--code-block-text);
65
+ --pele-muted: color-mix(in srgb, var(--code-block-text) 70%, var(--code-block-bg));
66
+ --pele-line: var(--code-block-text);
67
+ --pele-surface: color-mix(in srgb, var(--code-block-text) 18%, var(--code-block-bg));
68
+ --pele-surface-alt: color-mix(in srgb, var(--code-block-text) 28%, var(--code-block-bg));
69
+ --pele-border: color-mix(in srgb, var(--code-block-text) 45%, var(--code-block-bg));
70
+ --pele-accent: var(--link-color);
71
+ --pele-radius: 6px;
72
+ }
73
+
74
+ /* ── 1.5 PPT / Slides(ColaMD 2.7.13 幻灯片版式令牌,预设:serif)──
75
+ 本主题在应用内加载于 slides.css 之后,:root 同权重后到先赢;只换标题/等宽
76
+ 字体、字重与 preset 气质,版式字号阶梯沿用上游默认。仅在有幻灯片系统的
77
+ 平台(≥2.7.13)生效,其余平台惰性。 */
78
+ :root {
79
+ --slide-mono: "JetBrains Mono", "Noto Sans Mono CJK SC", monospace;
80
+ --slide-title-font: "DM Serif Display", "Noto Serif SC", serif;
81
+ --slide-title-size: 2.25em;
82
+ --slide-title-weight: 700;
83
+ --slide-subhead-weight: 600;
84
+ --slide-title-tracking: -0.015em;
85
+ --slide-title-line-height: 1.12;
86
+ --slide-cover-title-size: 4.60em;
87
+ --slide-cover-title-line-height: 1.05;
88
+ --slide-cover-title-tracking: -0.015em;
89
+ --slide-section-title-size: 3.77em;
90
+ --slide-closing-title-size: 4.23em;
91
+ --slide-lead-size: 1.29em;
92
+ --slide-kicker-size: clamp(10px, 0.64vw, 13px);
93
+ --slide-kicker-tracking: 0.16em;
94
+ --slide-kicker-transform: uppercase;
95
+ --slide-chrome-opacity: 0.45;
96
+ --slide-chrome-transform: uppercase;
97
+ --slide-kpi-number-size: 4.2em;
98
+ --slide-quote-size: 2.1em;
99
+ --slide-page-pad-x: 6.5vw;
100
+ --slide-page-top-pad: 15vh;
101
+ --slide-page-top-pad-print: 13vh;
102
+ --slide-cover-lead-inline: auto;
103
+ }
104
+
105
+ /* ═══════════════════════════════════════════════════════════
106
+ SECTION 2 — Editor DOM(#editor .cm-content + .cm-md-*)
107
+ ═══════════════════════════════════════════════════════════ */
108
+
109
+ #editor .cm-content {
110
+ font-family: var(--font-body);
111
+ line-height: 1.45;
112
+ }
113
+
114
+ /* ── 2.1 Headings ── */
115
+ #editor .cm-content .cm-md-atxheading1,
116
+ #editor .cm-content .cm-md-atxheading2,
117
+ #editor .cm-content .cm-md-atxheading3,
118
+ #editor .cm-content .cm-md-atxheading4,
119
+ #editor .cm-content .cm-md-atxheading5,
120
+ #editor .cm-content .cm-md-atxheading6 {
121
+ font-family: "DM Serif Display", "Noto Serif SC", serif;
122
+ color: var(--text-color);
123
+ font-weight: 700;
124
+ line-height: 1.35;
125
+ }
126
+
127
+ #editor .cm-content .cm-md-atxheading1 {
128
+ font-size: 3.6363636363636362em;
129
+ padding-bottom: 0.3em;
130
+ border-bottom: 1px solid var(--border-color);
131
+ }
132
+ #editor .cm-content .cm-md-atxheading2 {
133
+ font-size: 1.125em;
134
+ padding-bottom: 0.25em;
135
+ border-bottom: 1px solid var(--border-color);
136
+ }
137
+ #editor .cm-content .cm-md-atxheading3 { font-size: 1.7272727272727273em; }
138
+ #editor .cm-content .cm-md-atxheading4 { font-size: 1.1em; }
139
+ #editor .cm-content .cm-md-atxheading5 { font-size: 1em; }
140
+ #editor .cm-content .cm-md-atxheading6 { font-size: 0.95em; }
141
+
142
+ /* ── 2.2 Inline ── */
143
+ #editor .cm-content .cm-md-strong { color: var(--link-color); font-weight: 700; }
144
+ #editor .cm-content .cm-md-em { font-style: italic; }
145
+ #editor .cm-content .cm-md-strike { text-decoration: line-through; }
146
+ #editor .cm-content .cm-md-highlight { background: var(--highlight-bg); }
147
+ #editor .cm-content .cm-md-link { color: var(--link-color); }
148
+ #editor .cm-content .cm-md-url { color: var(--text-muted); }
149
+
150
+ #editor .cm-content .cm-md-inlinecode {
151
+ font-family: var(--font-mono);
152
+ background: var(--code-bg);
153
+ color: var(--text-color);
154
+ border-radius: 3px;
155
+ }
156
+
157
+ #editor .cm-content .cm-md-marker,
158
+ #editor .cm-content .cm-md-quotemark,
159
+ #editor .cm-content .cm-md-listmark {
160
+ color: var(--text-muted);
161
+ }
162
+
163
+ /* ── 2.3 Blockquote / Code Block(每行一个 div,禁用纵向 padding)──
164
+ 引用底色由编辑器按 --blockquote-bg 画在选区下方,这里不要写 background,
165
+ 否则引用里的代码行会盖住代码块底色。 */
166
+ #editor .cm-content .cm-md-blockquote {
167
+ color: var(--text-secondary);
168
+ border-left: 3px solid var(--blockquote-border);
169
+ padding-left: 16px;
170
+ padding-right: 16px;
171
+ }
172
+
173
+ #editor .cm-content .cm-md-codeblock {
174
+ background: var(--code-block-bg);
175
+ color: var(--code-block-text);
176
+ padding-left: 16px;
177
+ padding-right: 16px;
178
+ }
179
+ #editor .cm-content .cm-md-codeblock-first {
180
+ border-top-left-radius: 6px;
181
+ border-top-right-radius: 6px;
182
+ }
183
+ #editor .cm-content .cm-md-codeblock-last {
184
+ border-bottom-left-radius: 6px;
185
+ border-bottom-right-radius: 6px;
186
+ }
187
+
188
+ /* ── 2.4 Table / Rule ── */
189
+ #editor .cm-content .cm-md-table-widget th,
190
+ #editor .cm-content .cm-md-table-widget td {
191
+ border-color: var(--border-color);
192
+ }
193
+ #editor .cm-content .cm-md-table-widget th {
194
+ background: var(--table-header-bg);
195
+ color: var(--text-color);
196
+ font-weight: 700;
197
+ border-bottom: 2px solid var(--link-color);
198
+ }
199
+ #editor .cm-content .cm-md-hr { border-top-color: var(--border-color); }
200
+
201
+ /* ── 2.5 中文首行缩进 ──
202
+ CM6 里一行就是一个 div:段落缩进落在 .cm-line 上,标题/引用/代码/列表行归零。 */
203
+ #editor .cm-content .cm-line { text-indent: 2em; }
204
+
205
+ #editor .cm-content .cm-md-atxheading1,
206
+ #editor .cm-content .cm-md-atxheading2,
207
+ #editor .cm-content .cm-md-atxheading3,
208
+ #editor .cm-content .cm-md-atxheading4,
209
+ #editor .cm-content .cm-md-atxheading5,
210
+ #editor .cm-content .cm-md-atxheading6,
211
+ #editor .cm-content .cm-md-blockquote,
212
+ #editor .cm-content .cm-md-codeblock,
213
+ #editor .cm-content .cm-md-hr,
214
+ #editor .cm-content .cm-md-mermaid,
215
+ #editor .cm-content .cm-md-li-0,
216
+ #editor .cm-content .cm-md-li-1,
217
+ #editor .cm-content .cm-md-li-2,
218
+ #editor .cm-content .cm-md-li-3,
219
+ #editor .cm-content .cm-md-li-4,
220
+ #editor .cm-content .cm-md-li-5,
221
+ #editor .cm-content .cm-md-li-6 {
222
+ text-indent: 0;
223
+ }
224
+
225
+ /* ═══════════════════════════════════════════════════════════
226
+ SECTION 3 — Exported HTML(.colamd-document,语义标签)
227
+ HTML/PDF 导出不走编辑器 DOM;这段让导出件沿用同一套配色。
228
+ ═══════════════════════════════════════════════════════════ */
229
+
230
+ .colamd-document {
231
+ font-family: var(--font-body);
232
+ font-size: 22px;
233
+ line-height: 1.45;
234
+ }
235
+
236
+ .colamd-document h1,
237
+ .colamd-document h2,
238
+ .colamd-document h3,
239
+ .colamd-document h4,
240
+ .colamd-document h5,
241
+ .colamd-document h6 {
242
+ font-family: "DM Serif Display", "Noto Serif SC", serif;
243
+ color: var(--text-color);
244
+ line-height: 1.35;
245
+ }
246
+
247
+ .colamd-document strong { color: var(--link-color); }
248
+ .colamd-document code {
249
+ background: var(--code-bg);
250
+ color: var(--text-color);
251
+ font-family: var(--font-mono);
252
+ }
253
+ /* Pele SVG 不自绘背景,编辑器里浮在代码块行上;导出后无类名 div 托底,需补回 */
254
+ .colamd-document svg.pele { background: var(--pele-bg); border-radius: var(--pele-radius); }
255
+ .colamd-document pre { background: var(--code-block-bg); }
256
+ .colamd-document pre code { color: var(--code-block-text); }
257
+ .colamd-document blockquote {
258
+ background: var(--blockquote-bg);
259
+ color: var(--text-secondary);
260
+ border-left-color: var(--blockquote-border);
261
+ }
262
+ .colamd-document mark { background: var(--highlight-bg); }
263
+ .colamd-document th {
264
+ background: var(--table-header-bg);
265
+ border-bottom: 2px solid var(--link-color);
266
+ }
267
+ .colamd-document hr { border-top-color: var(--border-color); }
268
+
269
+ .colamd-document p { text-indent: 2em; }
270
+ .colamd-document li p,
271
+ .colamd-document td p,
272
+ .colamd-document th p,
273
+ .colamd-document blockquote p {
274
+ text-indent: 0;
275
+ }
276
+
277
+ /* ═══════════════════════════════════════════════════════════
278
+ SECTION 4 — Print
279
+ 应用直接对当前窗口 printToPDF,屏幕规则原样生效;这里只补保真。
280
+ ═══════════════════════════════════════════════════════════ */
281
+
282
+ @media print {
283
+ html,
284
+ body {
285
+ background: var(--bg-color);
286
+ color: var(--text-color);
287
+ -webkit-print-color-adjust: exact;
288
+ print-color-adjust: exact;
289
+ }
290
+ }