import { ConvertError } from '@mdgate/core'; import { type Element } from './xml.js'; /** A ZIP-based document package (OOXML, ODF, EPUB). */ export declare class Package { private readonly zip; private readonly cache; private constructor(); static open(bytes: Uint8Array): Package; /** * Read a part's bytes. `undefined` means the part is absent; throws when * it exists but cannot be read. */ part(name: string): Uint8Array | undefined; /** True when a part exists, without reading it. */ hasPart(name: string): boolean; /** Part names present in the archive (no leading slash). */ partNames(): string[]; /** True when any entry is password-protected or uses an Apple/AES zip method. */ hasEncryptedEntries(): boolean; requiredPart(name: string): Uint8Array; /** * Absent is valid (`undefined`, silent); an unreadable part is skipped * with a log. */ optionalPart(name: string): Uint8Array | undefined; optionalXmlPart(name: string): Element | undefined; requiredXmlPart(name: string): Element; private decompress; } /** * A zip-open failure on OOXML input may actually be an OLE compound file: * an encrypted package, or a legacy binary document with the wrong extension. */ export declare function probeOle(bytes: Uint8Array): ConvertError | undefined;