H5: banner-aligned themes, diagnostic and VCS tokens

Both themes follow the README banner without taking it over: calm,
near-neutral surfaces (cream-tinted light, faintly plum-tinted dark),
the raspberry only as the accent, retuned syntax colours and the
terminal on the editor surface. Approved by the owner from before/after
screenshots.

New tokens `--lt-diag-error|warning|info|hint` (lint underlines, gutter,
tooltips, Problems icons) and `--lt-vcs-added|modified|deleted|untracked|
ignored|conflicted` (for M4.4), listed in `theme::DIAGNOSTIC_TOKENS` and
`theme::VCS_TOKENS`. Completion kind icons take the syntax colour of
their kind. The contrast test checks every new colour (4.5:1 text,
3:1 icons) in both themes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
danny 2026-10-25 13:50:38 +01:00
parent e73bdbbbbc
commit 9801a346b6
13 changed files with 345 additions and 175 deletions

View file

@ -77,8 +77,8 @@ describe("applyTheme", () => {
expect(root.dataset.theme).toBe("lutra-light");
applyTheme(byId("lutra-dark"));
expect(root.style.getPropertyValue("--lt-bg")).toBe("#1f1d1b");
expect(root.style.getPropertyValue("--lt-editor-selection-bg")).toBe("#513f2c");
expect(root.style.getPropertyValue("--lt-bg")).toBe("#1e1b1e");
expect(root.style.getPropertyValue("--lt-editor-selection-bg")).toBe("#4c2d3d");
expect(root.style.colorScheme).toBe("dark");
});
});
@ -121,7 +121,7 @@ describe("startTheme", () => {
media.change(true);
await flushPromises();
expect(root.dataset.theme).toBe("lutra-dark");
expect(root.style.getPropertyValue("--lt-bg")).toBe("#1f1d1b");
expect(root.style.getPropertyValue("--lt-bg")).toBe("#1e1b1e");
stop();
expect(media.handlers.size).toBe(0);
@ -135,7 +135,7 @@ describe("startTheme", () => {
expect(emit).toBeDefined();
emit?.({ payload: { kind: "themeChanged", ...byId("lutra-light") } });
expect(root.dataset.theme).toBe("lutra-light");
expect(root.style.getPropertyValue("--lt-notice-bg")).toBe("#e9dfd4");
expect(root.style.getPropertyValue("--lt-notice-bg")).toBe("#eedcdc");
emit?.({ payload: { kind: "treeChanged", dir: "" } });
expect(root.dataset.theme).toBe("lutra-light");
stop();