| 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 | */ |
| 7 | import type { FolioKind } from "@g1t/contracts"; |
| 8 | |
| 9 | import { doc } from "./doc/index.ts"; |
| 10 | import type { KindModel } from "./types.ts"; |
| 11 | |
| 12 | export const KINDS: Partial<Record<FolioKind, KindModel>> = { |
| 13 | doc, |
| 14 | }; |
| 15 | |
| 16 | /** The kind's model, or null when it isn't built yet. */ |
| 17 | export function kindModel(kind: string | null | undefined): KindModel | null { |
| 18 | return (KINDS as Record<string, KindModel | undefined>)[String(kind ?? "")] ?? null; |
| 19 | } |