import type { SketchData_Variant } from '@wix/ricos/schema';
import { type Rect } from './draw-rough-shapes.js';
type RedrawOptions = {
    style: SketchData_Variant | string;
    color: string;
    seed: number;
    animate: boolean;
    rects: DOMRect[];
    /**
     * The DOM element whose local coordinate system the rects should be
     * translated into. Must be a positioned ancestor of the overlay SVG
     * (typically the widget's LCA — the paragraph or block container the
     * `Decoration.node` made `position: relative`). Paths are drawn in
     * this container's CSS pixels; the SVG then tracks the container
     * under any upstream layout shift via plain CSS, no `getScreenCTM`
     * round-trip and no viewport-frame arithmetic.
     */
    container: HTMLElement;
    onRendered?: () => void;
};
export type OverlayHandle = {
    /**
     * Replace the rendered paths with ones derived from the given viewport-space
     * rects, translated into `container`'s local frame. Fire-and-forget; an
     * internal generation counter ensures only the latest call survives if two
     * redraws are pending at once.
     */
    redraw: (opts: RedrawOptions) => void;
    /** Detach the overlay SVG from the DOM. */
    remove: () => void;
};
export declare const translateRectsToContainerSpace: (container: HTMLElement, rects: DOMRect[]) => Rect[];
export declare const createOverlayHandle: (overlay: HTMLElement) => OverlayHandle;
export {};
//# sourceMappingURL=overlay-handle.d.ts.map