Skip to content
19 linesCodeBlameRaw
1/**
2 * The kinds the room knows, one line each (docs/ARTIFACTS_MODE.md,
3 * section 3). A kind without a line here can't be made yet: the service
4 * says it is coming. Append only; never reformat (parallel phases each
5 * add their line).
6 */
7import type { FolioKind } from "@g1t/contracts";
8
9import { doc } from "./doc/index.ts";
10import type { KindModel } from "./types.ts";
11
12export const KINDS: Partial<Record<FolioKind, KindModel>> = {
13 doc,
14};
15
16/** The kind's model, or null when it isn't built yet. */
17export function kindModel(kind: string | null | undefined): KindModel | null {
18 return (KINDS as Record<string, KindModel | undefined>)[String(kind ?? "")] ?? null;
19}