import { PackagingManifestObject, PackagingMetadataObject, PackagingSpineItem, PackagingObject } from "./packaging"; import Rendition, { RenditionOptions } from "./rendition"; import Section, { SpineItem } from "./section"; import Archive from "./archive"; import Navigation from "./navigation"; import PageList, {PageListItem} from "./pagelist"; import Spine from "./spine"; import Locations from "./locations"; import Url from "./utils/url"; import Path from "./utils/path"; import Resources from "./resources"; import Container from "./container"; import Packaging from "./packaging"; import Store from "./store"; export interface BookOptions { requestMethod?: (url: string, type: string, withCredentials: object, headers: object) => Promise; requestCredentials?: object, requestHeaders?: object, encoding?: string, replacements?: string, canonical?: (path: string) => string, openAs?: string, store?: string } export default class Book { constructor(url: string, options?: BookOptions); constructor(options?: BookOptions); settings: BookOptions; opening: any; // should be core.defer opened: Promise; isOpen: boolean; loaded: { metadata: Promise, spine: Promise, manifest: Promise, cover: Promise, navigation: Promise, pageList: Promise, resources: Promise, } ready: Promise; request: Function; spine: Spine; locations: Locations; navigation: Navigation; pageList: PageList; url: Url; path: Path; archived: boolean; archive: Archive; resources: Resources; rendition: Rendition container: Container; packaging: Packaging; storage: Store; canonical(path: string): string; coverUrl(): Promise; destroy(): void; determineType(input: string): string; getRange(cfiRange: string): Promise; key(identifier?: string): string; load(path: string): Promise; loadNavigation(opf: XMLDocument): Promise; open(input: string, what?: string): Promise; open(input: ArrayBuffer, what?: string): Promise; openContainer(url: string): Promise; openEpub(data: BinaryType, encoding?: string): Promise; openManifest(url: string): Promise; openPackaging(url: string): Promise; renderTo(element: Element, options?: RenditionOptions): Rendition; renderTo(element: string, options?: RenditionOptions): Rendition; private replacements(): Promise; resolve(path: string, absolute?: boolean): string; section(target: string): Section; section(target: number): Section; setRequestCredentials(credentials: object): void; setRequestHeaders(headers: object): void; unarchive(input: BinaryType, encoding?: string): Promise; store(name: string): Store; unpack(opf: XMLDocument): Promise; // Event emitters emit(type: any, ...args: any[]): void; off(type: any, listener: any): any; on(type: any, listener: any): any; once(type: any, listener: any, ...args: any[]): any; }