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.

13 lines (12 loc) 573 B
import { File, EpubSettings } from '../types'; export default class EpubFile { epubSettings: EpubSettings; constructor(epubSettings: EpubSettings); /** * Constructs the EPUB file based on the provided settings. * @param localOnProgress Optional callback function to track the progress of EPUB construction. * @returns An array of File objects representing the files in the EPUB. * @throws Error if the EPUB file needs at least one chapter. */ constructEpub(localOnProgress?: (progress: number) => Promise<void>): Promise<File[]>; }