import { Injectable } from '../Readium/Injectable';
import { Locator } from '../Readium/Locator';
import { WebpubManifest, ColorMode, FontFamily } from '../types';
import { ReadiumLink } from '../WebpubManifestTypes/ReadiumLink';
import { ActiveState } from './types';
/**
 * Constants
 */
export declare const FONT_SIZE_STEP = 4;
/**
 * If we provide injectables that are not found, the app won't load at all.
 * Therefore we will not provide any default injectables.
 * @todo - this is not true in our custom renderer. We should provide default injectables.
 */
export declare const defaultInjectables: Injectable[];
export declare const defaultInjectablesFixed: Injectable[];
/**
 * Creates an element for an injectable so it can be injected into the iframe.
 */
export declare function makeInjectableElement(document: Document, injectable: Injectable): HTMLElement | undefined;
/**
 * gets the index of the current location href
 */
export declare function getCurrentIndex(manifest: WebpubManifest, state: ActiveState, baseUrl: string): number;
/**
 * Find a link in the reading order from a passed in href.
 */
export declare function getFromReadingOrder(href: string, manifest: WebpubManifest, baseUrl: string): {
    link: ReadiumLink;
    index: number;
} | undefined;
/**
 * Check if two hrefs share the same pathname. They can be absolute
 * or relative. This will ignore hash and query params.
 */
export declare function isSameResource(href1: string, href2: string, baseUrl: string): boolean;
/**
 * Converts a ReadiumLink to a Locator
 */
export declare function linkToLocator(link: ReadiumLink, baseUrl: string, locations?: Locator['locations']): Locator;
declare type CalculatedPosition = {
    isHorizontalPaginated: boolean;
    containerSize: number;
    containerWidth: number;
    containerHeight: number;
    pageSize: number;
    resourceSize: number;
    scrollPosition: number;
    totalPages: number;
    progression: number;
    currentPage: number;
    currentPageFloor: number;
    isAtEnd: boolean;
    isAtStart: boolean;
};
/**
 * Calculate current position information
 */
export declare function calcPosition(iframe: HTMLIFrameElement, isScrolling: boolean): CalculatedPosition;
/**
 * Gets scroll position of an element
 */
export declare function getScrollPosition(element: HTMLElement | undefined | null): {
    x: number;
    y: number;
};
/**
 * Fetches a resource as text
 */
export declare function fetchAsTxt(url: string): Promise<string>;
/**
 * Inject some raw JS into the iframe document
 */
export declare function injectJS(document: Document): void;
export declare function getMaybeIframeHtml(iframe: HTMLIFrameElement): HTMLElement | undefined;
/**
 * Get the HTML element of the iframe
 */
export declare function getIframeHTML(iframe: HTMLIFrameElement): HTMLElement;
/**
 * Sets a CSS var on the html element in the iframe. Used to set
 * ReadiumCSS settings like scrolling and color mode and font
 * size.
 */
export declare function setCSSProperty(html: HTMLElement, name: string, val: string): void;
/**
 * Translates the readium scroll css var into a boolean
 */
export declare function getPagination(isPaginated: boolean): 'readium-scroll-on' | 'readium-scroll-off';
/**
 * Translates the internal color mode value into a Readium
 * color mode value.
 */
export declare function getColorModeValue(mode: ColorMode): 'readium-default-on' | 'readium-night-on' | 'readium-sepia-on';
/**
 * Translates the readium color mode value into an internal
 * color mode value
 */
export declare function getColorMode(d2Mode: string): ColorMode;
/**
 * Gets the Readium font-override setting based on the given font family.
 */
export declare function getFontOverride(fontFamily: FontFamily): 'readium-font-off' | 'readium-font-on';
/**
 * Translates the internal font family to a readium css font family value.
 */
export declare const familyToReadiumFamily: Record<FontFamily, string>;
/**
 * Translates a readium css font family to an internal font family.
 */
export declare const r2FamilyToFamily: Record<string, FontFamily | undefined>;
export {};
