/** * The palettes this frontend ships, and the shape a theme is authored in. * * A theme is nine colours, not forty-six. Writing one role at a time would make * every palette a place for two roles to drift apart by accident — the four * meanings that used to share yellow got there exactly that way — so a theme * declares a SWATCH and {@link fromSwatch} assigns every role from it. Adding a * role therefore updates every shipped theme at once, and cannot leave one of * them with a hole. * * `default` is not built that way. It is assembled in `../theme.ts`, because it * has to emit the bytes this project emitted before palettes existed and its * per-role argument order is transcribed from the call sites rather than chosen. * * No user-authored themes yet. `Role` is the contract a theme is written * against, and publishing it before real palettes have exercised it would freeze * a vocabulary nothing has tested — the mistake the roadmap already warns about * for `TuiSlots`. * @module dshline/themes/builtin */ import type { Palette, RoleColor } from '@dshline/renderer'; /** * The nine colours a theme is written in. * * Every role maps onto one of these, so two roles differ in appearance only * where a theme actually meant them to. */ export interface Swatch { /** Ordinary content the theme wants read: headings, names, section titles. */ readonly text: RoleColor; /** Identifiers and interactive state: paths, code, links, the selected row. */ readonly accent: RoleColor; /** The glyph that says which KIND of tool ran. */ readonly tool: RoleColor; /** Something finished, arrived, or was added. */ readonly good: RoleColor; /** Something failed, or was removed. */ readonly bad: RoleColor; /** Something is in flight, overridden, or worth a second look. */ readonly warn: RoleColor; /** Structure the eye skips: borders, gutter marks, rules, bullets. */ readonly chrome: RoleColor; /** Asides nobody reads twice: hints, elisions, line numbers, URLs. */ readonly muted: RoleColor; /** Real content, de-emphasized: summaries, quotes, reasoning. */ readonly subdued: RoleColor; } /** * Every shipped palette, in the order `/theme` offers them. * * `default` leads because it is what a reader already has, and the rest are * ordered shallowest first so the two that work on any terminal are seen before * the three that need one able to show them. */ export declare const THEMES: readonly Palette[]; /** The palette used when nothing has been chosen, and when a name is unknown. */ export declare const FALLBACK_THEME: Palette; /** * Find a shipped palette by identifier. * @param id - the identifier a reader typed or a picker returned. * @returns the palette, or undefined when no shipped theme has that id. */ export declare function findTheme(id: string): Palette | undefined; //# sourceMappingURL=builtin.d.ts.map