UNPKG

@readium/shared

Version:

Shared models to be used across other Readium projects and implementations in Typescript

46 lines (45 loc) 1.62 kB
import { DomRange } from './DomRange'; declare module '../Locator' { interface LocatorLocations { /** * A CSS Selector. */ getCssSelector(): string | undefined; /** * [partialCfi] is an expression conforming to the "right-hand" side of the EPUB CFI syntax, that is * to say: without the EPUB-specific OPF spine item reference that precedes the first ! exclamation * mark (which denotes the "step indirection" into a publication document). Note that the wrapping * epubcfi(***) syntax is not used for the [partialCfi] string, i.e. the "fragment" part of the CFI * grammar is ignored. */ getPartialCfi(): string | undefined; /** * An HTML DOM range. */ getDomRange(): DomRange | undefined; /** * All named parameters found in the fragments, such as `p=5`. */ fragmentParameters(): Map<string, string>; /** * HTML ID fragment identifier. */ htmlId(): string | undefined; /** * Page fragment identifier, used for example in PDF. */ page(): number | undefined; /** * Temporal Dimension media fragment, used for example in audiobooks. * * https://www.w3.org/TR/media-frags/ */ time(): number | undefined; /** * Spatial Dimension media fragment, used for example in audiobooks. * * https://www.w3.org/TR/media-frags/ */ space(): [number, number, number, number] | undefined; } }