From 4fd9b8f2b5a98bfcde57970b48fed2488a80f356 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Fri, 17 Sep 2021 21:53:37 +0300 Subject: add in master snapshot of epubjs --- lib/epub.js/types/section.d.ts | 64 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 lib/epub.js/types/section.d.ts (limited to 'lib/epub.js/types/section.d.ts') diff --git a/lib/epub.js/types/section.d.ts b/lib/epub.js/types/section.d.ts new file mode 100644 index 0000000..075bef5 --- /dev/null +++ b/lib/epub.js/types/section.d.ts @@ -0,0 +1,64 @@ +import { HooksObject } from "./utils/hook"; + +export interface GlobalLayout { + layout: string, + spread: string, + orientation: string +} + +export interface LayoutSettings { + layout: string, + spread: string, + orientation: string +} + +export interface SpineItem { + index: number, + cfiBase: string, + href?: string, + url?: string, + canonical?: string, + properties?: Array, + linear?: string, + next: () => SpineItem, + prev: () => SpineItem, +} + +export default class Section { + constructor(item: SpineItem, hooks: HooksObject); + + idref: string; + linear: boolean; + properties: Array; + index: number; + href: string; + url: string; + canonical: string; + next: () => SpineItem; + prev: () => SpineItem; + cfiBase: string; + + document: Document; + contents: Element; + output: string; + + hooks: HooksObject; + + load(_request?: Function): Document; + + render(_request?: Function): string; + + find(_query: string): Array; + + reconcileLayoutSettings(globalLayout: GlobalLayout): LayoutSettings; + + cfiFromRange(_range: Range): string; + + cfiFromElement(el: Element): string; + + unload(): void; + + destroy(): void; + + private base(): void; +} -- cgit v1.2.3