/** * rehype plugin: wrap each prose text node in a * `` carrying its source character offsets * (into the markdown string that was parsed). This lets a DOM text selection * be mapped back to an exact source range for precise ("text") deletion. * * Notes: * - Code (`
` / ``) subtrees are skipped — their rendered text omits
 *   the surrounding fences/backticks, so offset math would be misleading.
 * - Pure-whitespace and position-less text nodes (e.g. the synthetic newlines
 *   between block elements) are left untouched.
 * - The offsets are relative to the exact string handed to the parser, so this
 *   must not be combined with content transforms that shift offsets (e.g.
 *   search-match highlighting). Callers gate on that.
 */
interface HastText {
    type: 'text';
    value: string;
    position?: {
        start?: {
            offset?: number;
        };
        end?: {
            offset?: number;
        };
    };
}
interface HastElement {
    type: 'element';
    tagName: string;
    properties?: Record;
    children?: HastNode[];
    position?: unknown;
}
interface HastRoot {
    type: 'root';
    children?: HastNode[];
}
type HastNode = HastText | HastElement | HastRoot | {
    type: string;
    children?: HastNode[];
};
export declare function rehypeSourcePositions(): (tree: HastRoot) => void;
export {};
//# sourceMappingURL=rehypeSourcePositions.d.ts.map