import { EditorState } from 'prosemirror-state';
import { DomPositionIndex } from './DomPositionIndex.js';
/**
 * Bridges ProseMirror plugin decorations onto DomPainter-rendered elements.
 *
 * The layout engine renders into its own DOM tree, so PM decorations (which
 * target the hidden contenteditable) are invisible to the user. This bridge
 * reads inline decoration `class` and `data-*` attributes from eligible
 * external plugins and mirrors them onto the painted elements, with a full
 * add/update/remove reconciliation lifecycle.
 *
 * ## Ownership boundary
 * The bridge tracks exactly which classes and data-attributes it has applied
 * via a WeakMap keyed by DOM element. It never touches classes or attributes
 * owned by the painter or other systems.
 *
 * ## Merge semantics
 * - **Classes**: union of all classes from all overlapping decorations.
 * - **`data-*` attributes**: later plugin in `state.plugins` order wins for
 *   the same key on the same element.
 * - **`style`**: parsed into individual CSS properties and applied via
 *   `el.style.setProperty()` so painter-owned properties are never clobbered.
 *   Later plugin wins per CSS property name.
 */
export declare class DecorationBridge {
    #private;
    /**
     * Runs a full reconciliation pass: reads decoration state from eligible PM
     * plugins, maps them to painted DOM via the position index, and diffs
     * against previously applied state.
     *
     * @returns `true` if any DOM mutations were made, `false` if skipped.
     */
    sync(state: EditorState, domIndex: DomPositionIndex): boolean;
    /**
     * Checks whether any eligible plugin's DecorationSet has changed since the
     * last sync. Use this as a cheap gate before calling `sync()`.
     *
     * @returns `true` if at least one DecorationSet reference changed.
     */
    hasChanges(state: EditorState): boolean;
    /**
     * Removes all bridge-owned classes and data-attributes from the DOM.
     * Called during teardown.
     */
    destroy(): void;
}
//# sourceMappingURL=DecorationBridge.d.ts.map