import { Buffer } from 'node:buffer'; import { Section } from '../parseSection'; import { ParserOptions } from './options'; import { Structure } from '../xml'; export declare const defaultOptions: ParserOptions; export declare class Epub { private options; private zip; structure: Structure; sections: Section[]; constructor(fileContent: Buffer, options: ParserOptions); getFile(filePath: string): { asText: () => string; asNodeBuffer: () => Buffer; }; /** * Resolves and parses sections of an EPUB document. * * @param {string} [id] - Optional specific section ID to resolve. If not provided, resolves all sections. * @returns {Section[]} An array of parsed document sections. * ```example * Section { * id: "chapter_104", * htmlString: "...", * htmlObjects: [ * { * tag: "p", * content: "...", * attributes: { * class: "paragraph" * } * } * ] * ... * }[] * ``` * @private */ private _resolveSections; getSection(id: string): Section | null; } export default function parse(pathOrFileContent: string | Buffer, options?: ParserOptions): Epub;