Marble uses a flat-to-gradient band in place of the marble photo and bundles Lustria (OFL). Both logo slots are opt-in. Quirk 13 documents a fontkit glyph-cache issue that the tests work around with warm-up renders; the engine fix follows separately.
41 lines
1.5 KiB
TypeScript
41 lines
1.5 KiB
TypeScript
import type { TemplateDefinition } from "./contract";
|
|
import { classic } from "./classic";
|
|
import { linea } from "./neutral/linea";
|
|
import { crimsonGrid } from "./ledger/crimson";
|
|
import { tangerineLedger } from "./ledger/tangerine";
|
|
import { slateBand } from "./band/slate";
|
|
import { tealSwoosh } from "./band/teal";
|
|
import { citrusSplit } from "./northline/citrus";
|
|
import { purplePop } from "./northline/purple";
|
|
import { cobaltStripe } from "./cobalt/cobalt";
|
|
import { highlighter } from "./highlighter/highlighter";
|
|
import { marble } from "./marble/marble";
|
|
import { monolith } from "./monolith/monolith";
|
|
import { monogram } from "./neutral/monogram";
|
|
import { serenity } from "./neutral/serenity";
|
|
|
|
/** Picker order: Classic first, Linea (the vendor's original format) second. */
|
|
export const TEMPLATES: Record<string, TemplateDefinition> = {
|
|
classic,
|
|
linea,
|
|
monogram,
|
|
serenity,
|
|
"crimson-grid": crimsonGrid,
|
|
"tangerine-ledger": tangerineLedger,
|
|
"slate-band": slateBand,
|
|
"teal-swoosh": tealSwoosh,
|
|
"purple-pop": purplePop,
|
|
"citrus-split": citrusSplit,
|
|
monolith,
|
|
"cobalt-stripe": cobaltStripe,
|
|
marble,
|
|
highlighter,
|
|
};
|
|
|
|
export const DEFAULT_TEMPLATE_ID = "classic";
|
|
|
|
/** The template for an id; an unknown id (a template removed later, a corrupt pref) falls back to Classic. */
|
|
export function getTemplate(id: string | undefined): TemplateDefinition {
|
|
return (id !== undefined && Object.hasOwn(TEMPLATES, id) ? TEMPLATES[id] : undefined) ?? TEMPLATES[DEFAULT_TEMPLATE_ID];
|
|
}
|