UNPKG

@cd-z/epub-constructor

Version:

This is a react library that creates an epub structure. This library only provides the file structure. To get a valid epub file it is needed to to create files from the provided data and compress them to a epub file.

34 lines (33 loc) 1.31 kB
/** * Generates an EPUB container XML string. * * The EPUB container file is used to specify the location of the EPUB package file, * which contains the content of the EPUB book. * * @param fileName - The name of the EPUB package file without the file extension. * @returns The EPUB container XML string. */ export declare function defaultContainer(fileName: string): string; /** * Generates a default EPUB XML structure with placeholders for metadata, manifest, and spine. * * @returns {string} The default EPUB XML structure. */ export declare function defaultEpub(): string; /** * Generates the default XML structure for the table of contents (TOC) of an EPUB book. * * @param chapterLength The length of the book's chapters. * @param title The title of the book. * @param bookId The unique identifier for the book. * @param author The author of the book (optional). * @returns The XML string representing the TOC. */ export declare function defaultNcxToc(chapterLength: number, title: string, bookId: string, author?: string): string; /** * Generates an HTML table of contents (TOC) page with a customizable title. * * @param title - The title of the TOC page. * @returns The HTML string representing the TOC page. */ export declare function defaultHtmlToc(title: string): string;