/**
 * This component, whenever its content updates, traverses the DOM to find
 * semantic words and send the corresponding DOMRanges to the caller via a
 * callback.
 *
 * A "word" here is a sequence of non-whitespace text characters, uninterrupted
 * by the start/end of a non-inline element. That is, a word can span across
 * text nodes and inline tags like <b>, but cannot span across block
 * paragraphs.
 *
 * The words yielded by WordIndexer are sorted in document order, which makes
 * them amenable to binary search - see `findBoundaryWordIndex` in ranges.js.
 */
import * as React from "react";
import type { DOMRange } from "./types";
type Props = {
    children?: React.ReactElement<any>;
    onWordsUpdate: (wordRanges: ReadonlyArray<DOMRange>) => unknown;
};
declare class WordIndexer extends React.PureComponent<Props> {
    _container: HTMLElement | null | undefined;
    componentDidMount(): void;
    componentDidUpdate(): void;
    _sendWordsUpdate(): void;
    _getWordRanges(): ReadonlyArray<DOMRange>;
    render(): React.ReactNode;
}
export default WordIndexer;
