import type { DocumentMeta, Section, Tab, TabLayout, TabbedMeta } from "#types/document.types"; import type { SchemaEntity, SchemaGraph } from "#types/schema.types"; import type { HomeCardCopy } from "#types/home.types"; export type PageRender = () => Element; export interface HomeContent { readonly cards: readonly HomeCardCopy[]; readonly heading: string; readonly kind: "home"; readonly lead: string; } export interface TabbedContent { readonly kind: "tabbed"; readonly layout: TabLayout; readonly meta: TabbedMeta; readonly tabs: readonly Tab[]; } export interface DocumentContent { readonly kind: "document"; readonly meta: DocumentMeta; readonly sections: readonly Section[]; } export type PageContent = DocumentContent | HomeContent | TabbedContent; export interface PageDefinition { readonly content: PageContent; readonly description: string; readonly entities?: readonly SchemaEntity[]; readonly id: string; readonly render: PageRender; readonly title: string; } export type PageLoader = () => Promise; export interface ShareImage { readonly alt: string; readonly source: string; } export interface PageEntry { readonly accent?: string; readonly banner?: ShareImage; readonly description: string; readonly icon: string; readonly id: string; readonly listed: boolean; readonly load: PageLoader; readonly order: number; readonly title: string; } export interface PageHead { readonly banner: ShareImage; readonly description: string; readonly kind: string; readonly path: string; readonly robots: string; readonly schema: SchemaGraph; readonly title: string; } export interface SchemaSubject { readonly definition?: PageDefinition; readonly description: string; readonly path: string; readonly tab?: Tab; readonly title: string; }