import { Publication, Locator } from '@readium/shared'; interface TocItem { id: string; href: string; title?: string; children?: TocItem[]; position?: number; } type TocEntryRef = Omit; interface TimelineItem { href: string; readingOrderIndex?: number; title?: string; fragments?: string[]; positionRange?: [number, number?]; progressionRange?: [number, number?]; totalProgressionRange?: [number, number?]; children?: TimelineItem[]; } interface TimelineProgression { totalItems?: number; currentIndex?: number; totalPositions?: number; currentPositions?: number[]; relativeProgression?: number; totalProgression?: number; currentChapter?: string; positionsLeft?: number; } interface UnstableTimeline { title?: string; items?: { [href: string]: TimelineItem; }; toc?: { tree?: TocItem[]; currentEntry?: TocEntryRef | null; }; currentItem?: TimelineItem | null; previousItem?: TimelineItem | null; nextItem?: TimelineItem | null; progression?: TimelineProgression; } declare let timelineInstance: UnstableTimeline | undefined; declare const useTimeline: ({ publication, currentLocation, currentPositions, positionsList, onChange }: { publication: Publication | null; currentLocation?: Locator; currentPositions?: number[]; positionsList?: Locator[]; onChange?: (timeline: UnstableTimeline) => void; }) => UnstableTimeline; export { type TimelineItem as T, type UnstableTimeline as U, type TimelineProgression as a, type TocItem as b, type TocEntryRef as c, timelineInstance as t, useTimeline as u };