/** * @fileoverview Type definitions for the md-to-pdf converter * @module types */ /** * Available syntax highlighting themes */ export type HighlightTheme = 'github-light' | 'github-dark'; /** * Frontmatter metadata extracted from Markdown files */ export interface FrontMatter { /** Document title */ title?: string; /** Document author */ author?: string; /** Document creation/modification date */ date?: string; /** Document description/subtitle */ description?: string; /** Custom CSS file path */ css?: string; /** Whether to generate table of contents */ toc?: boolean; /** Syntax highlighting theme override */ theme?: HighlightTheme; /** Any additional custom metadata */ [key: string]: unknown; } /** * Parsed Markdown document with frontmatter and content */ export interface ParsedDocument { /** Extracted frontmatter metadata */ frontMatter: FrontMatter; /** Markdown content without frontmatter */ content: string; /** Original file path */ filePath: string; } /** * Table of contents entry */ export interface TocEntry { /** Heading level (1-6) */ level: number; /** Heading text */ text: string; /** Anchor link ID */ id: string; } /** * Configuration options for PDF generation */ export interface PdfOptions { /** Output file path */ outputPath?: string; /** Page format (e.g., 'A4', 'Letter') */ format?: 'A4' | 'Letter' | 'Legal' | 'Tabloid'; /** Page margins */ margin?: { top?: string; right?: string; bottom?: string; left?: string; }; /** Whether to include header */ header?: boolean; /** Whether to include footer with page numbers */ footer?: boolean; /** Whether to generate table of contents */ toc?: boolean; /** Syntax highlighting theme */ theme?: HighlightTheme; /** Custom CSS string or file path */ customCss?: string; } /** * CLI command options */ export interface CliOptions { /** Output path (file or directory) */ output?: string; /** Syntax highlighting theme */ theme?: HighlightTheme; /** Generate table of contents */ toc?: boolean; /** Include header */ header?: boolean; /** Include footer with page numbers */ footer?: boolean; /** Page format */ format?: 'A4' | 'Letter' | 'Legal' | 'Tabloid'; /** Custom CSS file path */ css?: string; /** Watch mode for live updates */ watch?: boolean; /** Configuration file path */ config?: string; } /** * Configuration file structure */ export interface ConfigFile { /** Default PDF options */ defaults?: Partial; /** Custom CSS to inject */ customCss?: string; /** Custom header template */ headerTemplate?: string; /** Custom footer template */ footerTemplate?: string; } /** * Conversion result */ export interface ConversionResult { /** Source file path */ source: string; /** Output PDF path */ output: string; /** Whether conversion was successful */ success: boolean; /** Error message if conversion failed */ error?: string; /** Conversion duration in milliseconds */ duration: number; } //# sourceMappingURL=index.d.ts.map