/** * Result of title extraction, including how the title was determined */ export interface TitleExtractionResult { title: string; source: 'metadata' | 'content' | 'filename'; } /** `2024-annual-report.pdf` -> `2024 annual report`. */ export declare function fileNameToTitle(fileName: string): string; /** Priority: YAML frontmatter title -> first `#` H1 -> file name. */ export declare function extractMarkdownTitle(text: string, fileName: string): TitleExtractionResult; /** Priority: a first line followed by a blank line -> file name. */ export declare function extractTxtTitle(text: string, fileName: string): TitleExtractionResult; /** Priority: Readability title -> file name. */ export declare function extractHtmlTitle(readabilityTitle: string, fileName: string): TitleExtractionResult; /** * Priority: PDF metadata `/Title` -> page-1 chunk 0 -> file name. * * A metadata title that looks like a file path (contains `/` or `\`) is * rejected, since some producers write the source path there. */ export declare function extractPdfTitle(metadataTitle: string | undefined, firstPageChunkText: string | undefined, fileName: string, firstPageFontHint?: { text: string; fontSize: number; }): TitleExtractionResult; /** Priority: DOCX core title -> first non-empty `