UNPKG

kdp-book-generator

Version:

Generate KDP-compliant PDFs and EPUBs from Markdown for Amazon book publishing

76 lines 1.74 kB
export interface BookConfig { title: string; author: string; format: BookFormat; margins: Margins; typography: Typography; pageNumbers: PageNumberConfig; tableOfContents: boolean; bleed: boolean; } export interface BookFormat { name: string; width: number; height: number; unit: 'in' | 'mm' | 'cm'; } export interface Margins { top: number; bottom: number; inside: number; outside: number; unit: 'in' | 'mm' | 'cm'; } export interface Typography { body: FontConfig; heading1: FontConfig; heading2: FontConfig; heading3: FontConfig; heading4: FontConfig; heading5: FontConfig; heading6: FontConfig; } export interface FontConfig { family: string; size: number; lineHeight: number; weight: 'normal' | 'bold' | '300' | '400' | '500' | '600' | '700' | '800' | '900'; style: 'normal' | 'italic'; color: string; marginTop: number; marginBottom: number; } export interface PageNumberConfig { enabled: boolean; startPage: number; format: 'decimal' | 'roman' | 'alpha'; position: 'header' | 'footer'; alignment: 'left' | 'center' | 'right'; } export interface ParsedBook { frontMatter: BookMetadata; tableOfContents: TocItem[]; chapters: Chapter[]; html: string; } export interface BookMetadata { title?: string; author?: string; description?: string; keywords?: string[]; language?: string; [key: string]: any; } export interface TocItem { title: string; level: number; anchor: string; page?: number; } export interface Chapter { title: string; content: string; level: number; anchor: string; } //# sourceMappingURL=index.d.ts.map