import type { LexicalEditor, DOMExportOutputMap, DOMConversionMap } from 'lexical'; /** * Merge a CSS property into an existing CSS text string. * Replaces the property if it already exists, appends it otherwise. * If value is empty, removes the property. */ export declare function mergeElementStyle(cssText: string, prop: string, value: string): string; /** * Extract a single CSS property value from a CSS text string. */ export declare function getElementStyleProperty(cssText: string, prop: string): string; /** * Plugin that synchronizes ElementNode.__style to the DOM. * * Lexical's reconciler does not apply ElementNode.__style to the DOM * automatically. This plugin bridges that gap by listening for updates * and syncing background-color from node state to the DOM element. */ export declare function registerElementStylePlugin(editor: LexicalEditor): () => void; /** * Build an html.export Map that overrides exportDOM for block element nodes * to include __style (background-color) in the serialized HTML. */ export declare function buildElementStyleExportMap(): DOMExportOutputMap; /** * Build an html.import DOMConversionMap that preserves background-color * from imported HTML elements onto the Lexical node style. */ export declare function buildElementStyleImportMap(): DOMConversionMap; /** * Default set of CSS properties to preserve on inline text nodes during * HTML import. Matches the properties the toolbar applies via * `$patchStyleText()`. */ export declare const DEFAULT_INLINE_STYLE_PROPERTIES: readonly string[]; /** * Build a DOMConversionMap that preserves inline CSS styles from inline * HTML elements onto Lexical TextNode.__style. * * Also replicates Lexical's default format toggling (bold from * font-weight, italic from font-style, etc.) since our priority-1 * handler replaces the default priority-0 handler. * * @param properties - CSS properties to preserve. Defaults to * {@link DEFAULT_INLINE_STYLE_PROPERTIES}. */ export declare function buildInlineStyleImportMap(properties?: readonly string[]): DOMConversionMap; /** * Build a combined DOMConversionMap that preserves styles for both * block-level elements (text-align, background-color on p/h1-h6) * and inline elements (color, font-size, font-family, background-color * on span/em/strong/etc.). * * @param inlineProperties - CSS properties to preserve on inline text * nodes. Defaults to {@link DEFAULT_INLINE_STYLE_PROPERTIES}. */ export declare function buildStyleImportMap(inlineProperties?: readonly string[]): DOMConversionMap;