thurview 0.19.0 → 0.21.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/README.md +3 -5
- package/dist/cli.js +149 -42
- package/dist/cli.js.map +1 -1
- package/dist/diff.js +3 -3
- package/dist/diff.js.map +1 -1
- package/dist/document/compile.js +1 -1
- package/dist/document/compile.js.map +1 -1
- package/dist/export.js +10 -25
- package/dist/export.js.map +1 -1
- package/dist/forge/github.js +41 -0
- package/dist/forge/github.js.map +1 -1
- package/dist/forge/gitlab.js +84 -23
- package/dist/forge/gitlab.js.map +1 -1
- package/dist/forge/types.js +4 -0
- package/dist/forge/types.js.map +1 -1
- package/dist/git.js +0 -9
- package/dist/git.js.map +1 -1
- package/dist/highlight-theme.js +37 -14
- package/dist/highlight-theme.js.map +1 -1
- package/dist/highlight.js +3 -15
- package/dist/highlight.js.map +1 -1
- package/dist/pr-review/categories.js +51 -0
- package/dist/pr-review/categories.js.map +1 -0
- package/dist/pr-review/follow.js +208 -0
- package/dist/pr-review/follow.js.map +1 -0
- package/dist/pr-review/format.js +227 -0
- package/dist/pr-review/format.js.map +1 -0
- package/dist/server/server.js +32 -47
- package/dist/server/server.js.map +1 -1
- package/dist/ui/app.css +65 -30
- package/dist/ui/app.js +15 -16
- package/dist/ui/app.js.map +2 -2
- package/dist/ui/index.html +21 -0
- package/package.json +1 -1
- package/skills/thurview/SKILL.md +10 -20
- package/skills/thurview/references/document-authoring.md +1 -2
- package/skills/thurview/references/lifecycle.md +0 -1
- package/skills/thurview-design/SKILL.md +4 -7
- package/skills/thurview-explain/SKILL.md +6 -7
- package/skills/thurview-pr-review/SKILL.md +181 -0
- package/skills/thurview-pr-review/references/forges.md +47 -0
- package/dist/theme.js +0 -290
- package/dist/theme.js.map +0 -1
- package/skills/thurview/references/theme.md +0 -89
package/dist/theme.js
DELETED
|
@@ -1,290 +0,0 @@
|
|
|
1
|
-
import { createHash } from "node:crypto";
|
|
2
|
-
import { parse as parseYaml } from "yaml";
|
|
3
|
-
import { z } from "zod";
|
|
4
|
-
const color = z.string().min(1).max(64);
|
|
5
|
-
export const ThemeSchema = z
|
|
6
|
-
.object({
|
|
7
|
-
name: z.string().min(1),
|
|
8
|
-
/** where the tokens came from: files inspected in the project, or "default" */
|
|
9
|
-
source: z.string().optional(),
|
|
10
|
-
mode: z.enum(["dark", "light"]).default("dark"),
|
|
11
|
-
colors: z
|
|
12
|
-
.object({
|
|
13
|
-
bg: color.optional(),
|
|
14
|
-
bg2: color.optional(),
|
|
15
|
-
bg3: color.optional(),
|
|
16
|
-
code: color.optional(),
|
|
17
|
-
fg: color.optional(),
|
|
18
|
-
fg2: color.optional(),
|
|
19
|
-
muted: color.optional(),
|
|
20
|
-
line: color.optional(),
|
|
21
|
-
accent: color.optional(),
|
|
22
|
-
link: color.optional(),
|
|
23
|
-
ok: color.optional(),
|
|
24
|
-
warn: color.optional(),
|
|
25
|
-
del: color.optional(),
|
|
26
|
-
add: color.optional(),
|
|
27
|
-
remove: color.optional(),
|
|
28
|
-
select: color.optional(),
|
|
29
|
-
})
|
|
30
|
-
.strict()
|
|
31
|
-
.prefault({}),
|
|
32
|
-
fonts: z
|
|
33
|
-
.object({
|
|
34
|
-
display: z.string().optional(),
|
|
35
|
-
body: z.string().optional(),
|
|
36
|
-
mono: z.string().optional(),
|
|
37
|
-
/** external stylesheets, e.g. Google Fonts css2 urls */
|
|
38
|
-
stylesheets: z.array(z.string().url()).default([]),
|
|
39
|
-
/** font files inside the reviewed repository at the head commit */
|
|
40
|
-
files: z
|
|
41
|
-
.array(z
|
|
42
|
-
.object({
|
|
43
|
-
family: z.string().min(1),
|
|
44
|
-
path: z.string().min(1),
|
|
45
|
-
weight: z.string().optional(),
|
|
46
|
-
style: z.string().optional(),
|
|
47
|
-
})
|
|
48
|
-
.strict())
|
|
49
|
-
.default([]),
|
|
50
|
-
})
|
|
51
|
-
.strict()
|
|
52
|
-
.prefault({}),
|
|
53
|
-
shape: z
|
|
54
|
-
.object({
|
|
55
|
-
radius: z.string().optional(),
|
|
56
|
-
bevel: z.boolean().optional(),
|
|
57
|
-
glow: z.boolean().optional(),
|
|
58
|
-
scanlines: z.boolean().optional(),
|
|
59
|
-
/** text-transform for display headings, e.g. none or uppercase */
|
|
60
|
-
headingTransform: z.string().optional(),
|
|
61
|
-
})
|
|
62
|
-
.strict()
|
|
63
|
-
.prefault({}),
|
|
64
|
-
code: z
|
|
65
|
-
.object({
|
|
66
|
-
keyword: color.optional(),
|
|
67
|
-
string: color.optional(),
|
|
68
|
-
function: color.optional(),
|
|
69
|
-
type: color.optional(),
|
|
70
|
-
variable: color.optional(),
|
|
71
|
-
number: color.optional(),
|
|
72
|
-
comment: color.optional(),
|
|
73
|
-
punctuation: color.optional(),
|
|
74
|
-
operator: color.optional(),
|
|
75
|
-
tag: color.optional(),
|
|
76
|
-
fg: color.optional(),
|
|
77
|
-
})
|
|
78
|
-
.strict()
|
|
79
|
-
.prefault({}),
|
|
80
|
-
/** extra rules appended verbatim */
|
|
81
|
-
css: z.string().optional(),
|
|
82
|
-
})
|
|
83
|
-
.strict();
|
|
84
|
-
export function parseTheme(yaml) {
|
|
85
|
-
const diagnostics = [];
|
|
86
|
-
let raw;
|
|
87
|
-
try {
|
|
88
|
-
raw = parseYaml(yaml);
|
|
89
|
-
}
|
|
90
|
-
catch (e) {
|
|
91
|
-
diagnostics.push({
|
|
92
|
-
level: "error",
|
|
93
|
-
file: "theme.yaml",
|
|
94
|
-
message: `YAML: ${e.message}`,
|
|
95
|
-
});
|
|
96
|
-
return { theme: null, diagnostics };
|
|
97
|
-
}
|
|
98
|
-
if (raw === null || raw === undefined)
|
|
99
|
-
return { theme: null, diagnostics };
|
|
100
|
-
const r = ThemeSchema.safeParse(raw);
|
|
101
|
-
if (!r.success) {
|
|
102
|
-
for (const i of r.error.issues)
|
|
103
|
-
diagnostics.push({
|
|
104
|
-
level: "error",
|
|
105
|
-
file: "theme.yaml",
|
|
106
|
-
message: `${i.path.join(".") || "root"}: ${i.message}`,
|
|
107
|
-
});
|
|
108
|
-
return { theme: null, diagnostics };
|
|
109
|
-
}
|
|
110
|
-
return { theme: r.data, diagnostics };
|
|
111
|
-
}
|
|
112
|
-
const DEFAULT_CODE = {
|
|
113
|
-
fg: "#e6e8eb",
|
|
114
|
-
keyword: "#ff7b72",
|
|
115
|
-
string: "#a5d6ff",
|
|
116
|
-
function: "#d2a8ff",
|
|
117
|
-
type: "#ffa657",
|
|
118
|
-
variable: "#79c0ff",
|
|
119
|
-
number: "#79c0ff",
|
|
120
|
-
comment: "#8b949e",
|
|
121
|
-
punctuation: "#8b949e",
|
|
122
|
-
operator: "#ff7b72",
|
|
123
|
-
tag: "#7ee787",
|
|
124
|
-
};
|
|
125
|
-
const DEFAULT_CODE_BG = "#0b0d10";
|
|
126
|
-
export function shikiTheme(name, code, mode, bg = DEFAULT_CODE_BG) {
|
|
127
|
-
const c = { ...DEFAULT_CODE, ...code };
|
|
128
|
-
return {
|
|
129
|
-
name,
|
|
130
|
-
type: mode,
|
|
131
|
-
colors: { "editor.background": bg, "editor.foreground": c.fg },
|
|
132
|
-
tokenColors: [
|
|
133
|
-
{
|
|
134
|
-
scope: ["comment", "punctuation.definition.comment", "string.comment"],
|
|
135
|
-
settings: { foreground: c.comment, fontStyle: "italic" },
|
|
136
|
-
},
|
|
137
|
-
{
|
|
138
|
-
scope: ["punctuation", "meta.brace", "punctuation.separator", "punctuation.terminator"],
|
|
139
|
-
settings: { foreground: c.punctuation },
|
|
140
|
-
},
|
|
141
|
-
{
|
|
142
|
-
scope: [
|
|
143
|
-
"keyword",
|
|
144
|
-
"storage",
|
|
145
|
-
"storage.type",
|
|
146
|
-
"storage.modifier",
|
|
147
|
-
"keyword.control",
|
|
148
|
-
"constant.language",
|
|
149
|
-
"variable.language",
|
|
150
|
-
],
|
|
151
|
-
settings: { foreground: c.keyword },
|
|
152
|
-
},
|
|
153
|
-
{
|
|
154
|
-
scope: ["keyword.operator", "keyword.operator.assignment", "keyword.operator.arrow"],
|
|
155
|
-
settings: { foreground: c.operator },
|
|
156
|
-
},
|
|
157
|
-
{
|
|
158
|
-
scope: [
|
|
159
|
-
"string",
|
|
160
|
-
"string.quoted",
|
|
161
|
-
"string.template",
|
|
162
|
-
"punctuation.definition.string",
|
|
163
|
-
"markup.inserted",
|
|
164
|
-
],
|
|
165
|
-
settings: { foreground: c.string },
|
|
166
|
-
},
|
|
167
|
-
{
|
|
168
|
-
scope: [
|
|
169
|
-
"entity.name.function",
|
|
170
|
-
"support.function",
|
|
171
|
-
"meta.function-call entity.name.function",
|
|
172
|
-
],
|
|
173
|
-
settings: { foreground: c.function },
|
|
174
|
-
},
|
|
175
|
-
{
|
|
176
|
-
scope: [
|
|
177
|
-
"entity.name.type",
|
|
178
|
-
"entity.name.class",
|
|
179
|
-
"support.class",
|
|
180
|
-
"support.type",
|
|
181
|
-
"entity.other.inherited-class",
|
|
182
|
-
"entity.name.namespace",
|
|
183
|
-
],
|
|
184
|
-
settings: { foreground: c.type },
|
|
185
|
-
},
|
|
186
|
-
{
|
|
187
|
-
scope: [
|
|
188
|
-
"constant.numeric",
|
|
189
|
-
"constant.character",
|
|
190
|
-
"constant.other",
|
|
191
|
-
"constant.language.boolean",
|
|
192
|
-
],
|
|
193
|
-
settings: { foreground: c.number },
|
|
194
|
-
},
|
|
195
|
-
{
|
|
196
|
-
scope: [
|
|
197
|
-
"entity.name.tag",
|
|
198
|
-
"support.type.property-name",
|
|
199
|
-
"meta.object-literal.key",
|
|
200
|
-
"entity.other.attribute-name",
|
|
201
|
-
"meta.property-name",
|
|
202
|
-
],
|
|
203
|
-
settings: { foreground: c.tag },
|
|
204
|
-
},
|
|
205
|
-
{
|
|
206
|
-
scope: [
|
|
207
|
-
"variable",
|
|
208
|
-
"variable.parameter",
|
|
209
|
-
"variable.other",
|
|
210
|
-
"meta.definition.variable",
|
|
211
|
-
"entity.name.variable",
|
|
212
|
-
],
|
|
213
|
-
settings: { foreground: c.variable },
|
|
214
|
-
},
|
|
215
|
-
{ scope: ["markup.deleted"], settings: { foreground: c.operator } },
|
|
216
|
-
{
|
|
217
|
-
scope: ["markup.heading", "entity.name.section"],
|
|
218
|
-
settings: { foreground: c.tag, fontStyle: "bold" },
|
|
219
|
-
},
|
|
220
|
-
{ scope: ["markup.bold"], settings: { fontStyle: "bold" } },
|
|
221
|
-
{ scope: ["markup.italic"], settings: { fontStyle: "italic" } },
|
|
222
|
-
],
|
|
223
|
-
};
|
|
224
|
-
}
|
|
225
|
-
/** Build the stylesheet and highlighter theme for a review. `blobUrl` maps a repo path to a served url. */
|
|
226
|
-
export function compileTheme(theme, blobUrl) {
|
|
227
|
-
const hash = createHash("sha1").update(JSON.stringify(theme)).digest("hex").slice(0, 8);
|
|
228
|
-
const name = `theme-${hash}`;
|
|
229
|
-
const v = [];
|
|
230
|
-
const c = theme.colors;
|
|
231
|
-
const map = {
|
|
232
|
-
"--bg": c.bg,
|
|
233
|
-
"--bg2": c.bg2,
|
|
234
|
-
"--bg3": c.bg3,
|
|
235
|
-
"--bg-code": c.code,
|
|
236
|
-
"--fg": c.fg,
|
|
237
|
-
"--fg2": c.fg2,
|
|
238
|
-
"--muted": c.muted,
|
|
239
|
-
"--line": c.line,
|
|
240
|
-
"--line2": c.line,
|
|
241
|
-
"--accent": c.accent,
|
|
242
|
-
"--link": c.link,
|
|
243
|
-
"--ok": c.ok,
|
|
244
|
-
"--warn": c.warn,
|
|
245
|
-
"--del": c.del,
|
|
246
|
-
"--font-display": theme.fonts.display,
|
|
247
|
-
"--font-body": theme.fonts.body,
|
|
248
|
-
"--font-mono": theme.fonts.mono,
|
|
249
|
-
"--radius": theme.shape.radius,
|
|
250
|
-
"--heading-transform": theme.shape.headingTransform,
|
|
251
|
-
};
|
|
252
|
-
for (const [k, val] of Object.entries(map))
|
|
253
|
-
if (val)
|
|
254
|
-
v.push(`${k}: ${val};`);
|
|
255
|
-
if (c.add)
|
|
256
|
-
v.push(`--add-bg: ${c.add};`);
|
|
257
|
-
if (c.remove)
|
|
258
|
-
v.push(`--del-bg: ${c.remove};`);
|
|
259
|
-
if (c.select)
|
|
260
|
-
v.push(`--sel: ${c.select};`);
|
|
261
|
-
if (c.accent)
|
|
262
|
-
v.push(`--accent-bg: color-mix(in srgb, ${c.accent} 16%, transparent);`);
|
|
263
|
-
if (theme.mode === "light")
|
|
264
|
-
v.push("color-scheme: light; --shadow: 0 1px 2px rgb(0 0 0 / 0.08); --shadow-lg: 0 12px 32px rgb(0 0 0 / 0.14);");
|
|
265
|
-
// retro options, each off in the default skin
|
|
266
|
-
if (theme.shape.glow)
|
|
267
|
-
v.push("--glow: 0 0 5px color-mix(in srgb, var(--accent) 70%, transparent), 0 0 12px color-mix(in srgb, var(--accent) 40%, transparent);");
|
|
268
|
-
if (theme.shape.bevel)
|
|
269
|
-
v.push("--shadow: 0 0 0 1px rgb(0 0 0 / 0.6), inset 1px 1px 0 0 rgb(255 255 255 / 0.14), inset -1px -1px 0 0 rgb(0 0 0 / 0.6);");
|
|
270
|
-
const out = [];
|
|
271
|
-
for (const s of theme.fonts.stylesheets)
|
|
272
|
-
out.push(`@import url("${s}");`);
|
|
273
|
-
for (const f of theme.fonts.files) {
|
|
274
|
-
const ext = f.path.split(".").pop()?.toLowerCase() ?? "";
|
|
275
|
-
const fmt = ext === "woff2" ? "woff2" : ext === "woff" ? "woff" : ext === "otf" ? "opentype" : "truetype";
|
|
276
|
-
out.push(`@font-face { font-family: "${f.family}"; src: url("${blobUrl(f.path)}") format("${fmt}"); font-weight: ${f.weight ?? "400"}; font-style: ${f.style ?? "normal"}; font-display: swap; }`);
|
|
277
|
-
}
|
|
278
|
-
out.push(`:root { ${v.join(" ")} }`);
|
|
279
|
-
if (theme.shape.scanlines)
|
|
280
|
-
out.push("body::after { content: ''; position: fixed; inset: 0; z-index: 9999; pointer-events: none; background: repeating-linear-gradient(to bottom, transparent 0, transparent 2px, rgb(0 0 0 / 0.1) 2px, rgb(0 0 0 / 0.1) 3px); mix-blend-mode: multiply; }");
|
|
281
|
-
if (theme.css)
|
|
282
|
-
out.push(theme.css);
|
|
283
|
-
return {
|
|
284
|
-
name: theme.name,
|
|
285
|
-
...(theme.source ? { source: theme.source } : {}),
|
|
286
|
-
css: out.join("\n"),
|
|
287
|
-
shiki: shikiTheme(name, theme.code, theme.mode, c.code ?? (theme.mode === "light" ? "#ffffff" : DEFAULT_CODE_BG)),
|
|
288
|
-
};
|
|
289
|
-
}
|
|
290
|
-
//# sourceMappingURL=theme.js.map
|
package/dist/theme.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"theme.js","sourceRoot":"","sources":["../src/theme.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,KAAK,IAAI,SAAS,EAAE,MAAM,MAAM,CAAC;AAC1C,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,MAAM,KAAK,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;AAExC,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC;KACzB,MAAM,CAAC;IACN,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACvB,+EAA+E;IAC/E,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC7B,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC;IAC/C,MAAM,EAAE,CAAC;SACN,MAAM,CAAC;QACN,EAAE,EAAE,KAAK,CAAC,QAAQ,EAAE;QACpB,GAAG,EAAE,KAAK,CAAC,QAAQ,EAAE;QACrB,GAAG,EAAE,KAAK,CAAC,QAAQ,EAAE;QACrB,IAAI,EAAE,KAAK,CAAC,QAAQ,EAAE;QAC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,IAAI,IAAI,CAAC,KAAK,CAAC,IAAI,KAAK,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,eAAe,CAAC,CACjE;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
# Theme
|
|
2
|
-
|
|
3
|
-
A review looks like the project it reviews. `theme.yaml` in the review
|
|
4
|
-
directory carries the tokens; `publish` validates it and seals it with the
|
|
5
|
-
revision. An empty or absent file gives the default skin.
|
|
6
|
-
|
|
7
|
-
## Decide the look, in this order
|
|
8
|
-
|
|
9
|
-
Move to the next step only when the current one yields nothing.
|
|
10
|
-
|
|
11
|
-
1. The user asked for a specific look or named a design system: use that.
|
|
12
|
-
2. Inspect the reviewed project at the head commit and match its own design
|
|
13
|
-
system: a Tailwind or theme config, CSS custom properties or design
|
|
14
|
-
tokens, a component library theme, brand assets, an existing styled page
|
|
15
|
-
or website directory, font files it ships. Read the real values; do not
|
|
16
|
-
guess. Record what you read in `source`.
|
|
17
|
-
3. Nothing found: keep the default skin. Do not invent a palette.
|
|
18
|
-
|
|
19
|
-
State which of the three you used when you hand over the review.
|
|
20
|
-
|
|
21
|
-
## theme.yaml
|
|
22
|
-
|
|
23
|
-
```yaml
|
|
24
|
-
name: acme-web # shown in the review menu
|
|
25
|
-
source: tailwind.config.ts, src/styles/tokens.css
|
|
26
|
-
mode: light # dark (default) or light
|
|
27
|
-
|
|
28
|
-
colors: # any CSS color; every key optional
|
|
29
|
-
bg: "#ffffff" # page
|
|
30
|
-
bg2: "#f6f7f9" # panels, bars
|
|
31
|
-
bg3: "#eef0f3" # hover
|
|
32
|
-
code: "#f8fafc" # code surfaces
|
|
33
|
-
fg: "#111827" # text
|
|
34
|
-
fg2: "#4b5563" # secondary text
|
|
35
|
-
muted: "#9ca3af"
|
|
36
|
-
line: "#e5e7eb" # borders
|
|
37
|
-
accent: "#2563eb" # headings, primary actions, status
|
|
38
|
-
link: "#2563eb" # links and anchor links
|
|
39
|
-
ok: "#16a34a"
|
|
40
|
-
warn: "#d97706"
|
|
41
|
-
del: "#dc2626"
|
|
42
|
-
add: "rgb(22 163 74 / .12)" # added-line background
|
|
43
|
-
remove: "rgb(220 38 38 / .12)" # deleted-line background
|
|
44
|
-
select: "rgb(217 119 6 / .18)" # highlighted-line background
|
|
45
|
-
|
|
46
|
-
fonts:
|
|
47
|
-
display: "Inter, sans-serif" # brand, buttons, document headings
|
|
48
|
-
body: "Inter, sans-serif"
|
|
49
|
-
mono: "'JetBrains Mono', monospace"
|
|
50
|
-
stylesheets: # external font css, loaded by the page
|
|
51
|
-
- https://fonts.googleapis.com/css2?family=Inter:wght@400;700&display=swap
|
|
52
|
-
files: # font files the project ships, read at head
|
|
53
|
-
- { family: Acme Sans, path: web/public/fonts/acme-sans.woff2, weight: "400 700" }
|
|
54
|
-
|
|
55
|
-
shape:
|
|
56
|
-
radius: 8px # 6px in the default skin
|
|
57
|
-
headingTransform: none # none in the default skin
|
|
58
|
-
bevel: true # retro extras, all off unless set: pixel
|
|
59
|
-
glow: true # bevels on panels, neon glow on headings
|
|
60
|
-
scanlines: true # and tabs, a CRT overlay
|
|
61
|
-
|
|
62
|
-
code: # syntax palette; any key optional
|
|
63
|
-
keyword: "#7c3aed"
|
|
64
|
-
string: "#15803d"
|
|
65
|
-
function: "#b45309"
|
|
66
|
-
type: "#b45309"
|
|
67
|
-
variable: "#0369a1"
|
|
68
|
-
number: "#b45309"
|
|
69
|
-
comment: "#9ca3af"
|
|
70
|
-
punctuation: "#6b7280"
|
|
71
|
-
operator: "#374151"
|
|
72
|
-
tag: "#be185d"
|
|
73
|
-
fg: "#111827"
|
|
74
|
-
|
|
75
|
-
css: | # optional extra rules, appended last
|
|
76
|
-
.doc h1 { letter-spacing: 0; }
|
|
77
|
-
```
|
|
78
|
-
|
|
79
|
-
Rules:
|
|
80
|
-
|
|
81
|
-
- Keep contrast readable: body text against `bg`, code against `code`.
|
|
82
|
-
- A light project gets `mode: light` and light backgrounds; the default skin
|
|
83
|
-
is dark and neutral, with one blue accent.
|
|
84
|
-
- `fonts.files` paths must exist at the pinned head commit; `publish`
|
|
85
|
-
rejects a missing one. Font stylesheets are fetched by the reader's
|
|
86
|
-
browser.
|
|
87
|
-
- Map the project's semantic roles, not its whole palette: primary to
|
|
88
|
-
`accent` and `link`, success/warning/danger to `ok`/`warn`/`del`.
|
|
89
|
-
- Unknown keys fail validation.
|