import { Section, TOCItem } from '../core/types'; /** * Tracks overall reading progress based on section byte sizes. */ export declare class SectionProgress { private sizes; private sizePerLoc; private sizeTotal; private sectionFractions; private cumulativeSizes; constructor(sections: readonly Section[], sizePerLoc?: number); private calcCumulativeSizes; private calcSectionFractions; /** * Get progress info given section index and fraction within section. */ getProgress(index: number, fractionInSection: number): { fraction: number; section: { current: number; total: number; }; location: { current: number; total: number; }; remaining: { section: number; total: number; }; }; /** * Get section index and fraction from total fraction (inverse of getProgress). */ getSection(fraction: number): [index: number, fractionInSection: number]; /** * Get section boundary fractions (for progress bar tick marks). */ getFractions(): number[]; } /** * Tracks which TOC item corresponds to the current reading position. */ export declare class TOCProgress { private ids; private map; private getFragment?; init(options: { toc: readonly TOCItem[]; sectionIds: readonly (string | number)[]; splitHref: (href: string) => [id: string | number, fragment: string | null] | undefined; getFragment: (doc: Document, id: string | number) => Element | null; }): Promise; /** * Get the current TOC item for a given section index and visible range. */ getProgress(index: number, range?: Range): TOCItem | null | undefined; } //# sourceMappingURL=progress.d.ts.map