declare function validateDocItem(item: any): item is DocItem; declare function validateIndexFile(data: any): data is IndexFile; export { validateDocItem, validateIndexFile }; export type DocItemType = "section" | "page"; export interface DocItem { name: string; type: DocItemType; label: string; collapsed?: boolean; url?: string; } export interface IndexFile { items: DocItem[]; } export interface NavigationItem extends DocItem { path?: string; items?: NavigationItem[]; parent?: NavigationItem | undefined; } export type ContentMode = 'all' | 'index-only'; export interface BuildOptions { appOutput?: string; websiteOutput?: string; staticOutput?: string; includeContent?: boolean; autoDiscover?: boolean; /** * Choose which markdown files to bundle: * - `'all'` (default): include every markdown file under the content directory. * - `'index-only'`: bundle only the files referenced in the generated navigation tree (aka `.index.json` entries). */ contentMode?: ContentMode; /** * Optional link checking during build (off by default). * * - `true` enables checks with defaults (warnings only) * - object form lets you tune behavior */ linkCheck?: boolean | LinkCheckBuildOptions; } export interface BuildResult { navigation: NavigationItem[]; content?: Record | undefined; pages?: Array<{ path: string; content: string; html: string; }> | undefined; linkCheck?: LinkCheckResult | undefined; } export interface ContentProcessor { process(content: string): string; } export type LinkIssueReason = 'missing file' | 'unsupported protocol'; export type LinkWarningReason = 'not in navigation'; export interface LinkIssue { file: string; target: string; reason: LinkIssueReason; } export interface LinkWarning { file: string; target: string; resolvedFile: string; reason: LinkWarningReason; } export interface LinkCheckResult { filesChecked: number; issues: LinkIssue[]; warnings: LinkWarning[]; } export interface LinkCheckBuildOptions { /** * Warn if a link resolves to a markdown file inside the docs root, * but that file is not present in the generated navigation tree. */ warnOnUnindexed?: boolean; /** * When true, `buildPages()` throws if any issues are found. * When false/undefined, issues are reported in `BuildResult.linkCheck` only. */ failOnBroken?: boolean; }