/**
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 *
 */
import type { DOMConversionMap, DOMExportOutput, EditorConfig, LexicalCommand, LexicalEditor, LexicalNode, LexicalUpdateJSON, NodeKey, ParagraphNode, RangeSelection, SerializedElementNode, Spread, TextFormatType } from 'lexical';
import { ReadonlySignal } from '@lexical/extension';
import { ElementNode } from 'lexical';
export type SerializedHeadingNode = Spread<{
    tag: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
}, SerializedElementNode>;
export declare const DRAG_DROP_PASTE: LexicalCommand<File[]>;
export type SerializedQuoteNode = SerializedElementNode;
/** @noInheritDoc */
export declare class QuoteNode extends ElementNode {
    static getType(): string;
    static clone(node: QuoteNode): QuoteNode;
    createDOM(config: EditorConfig): HTMLElement;
    updateDOM(prevNode: this, dom: HTMLElement): boolean;
    static importDOM(): DOMConversionMap | null;
    exportDOM(editor: LexicalEditor): DOMExportOutput;
    static importJSON(serializedNode: SerializedQuoteNode): QuoteNode;
    insertNewAfter(_: RangeSelection, restoreSelection?: boolean): ParagraphNode;
    collapseAtStart(): true;
    canMergeWhenEmpty(): true;
}
export declare function $createQuoteNode(): QuoteNode;
export declare function $isQuoteNode(node: LexicalNode | null | undefined): node is QuoteNode;
export type HeadingTagType = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
/** @noInheritDoc */
export declare class HeadingNode extends ElementNode {
    /** @internal */
    __tag: HeadingTagType;
    static getType(): string;
    static clone(node: HeadingNode): HeadingNode;
    afterCloneFrom(prevNode: this): void;
    constructor(tag?: HeadingTagType, key?: NodeKey);
    getTag(): HeadingTagType;
    setTag(tag: HeadingTagType): this;
    createDOM(config: EditorConfig): HTMLElement;
    updateDOM(prevNode: this, dom: HTMLElement, config: EditorConfig): boolean;
    static importDOM(): DOMConversionMap | null;
    exportDOM(editor: LexicalEditor): DOMExportOutput;
    static importJSON(serializedNode: SerializedHeadingNode): HeadingNode;
    updateFromJSON(serializedNode: LexicalUpdateJSON<SerializedHeadingNode>): this;
    exportJSON(): SerializedHeadingNode;
    insertNewAfter(selection?: RangeSelection, restoreSelection?: boolean): ParagraphNode | HeadingNode;
    collapseAtStart(): true;
    extractWithChild(): boolean;
}
export declare function $createHeadingNode(headingTag?: HeadingTagType): HeadingNode;
export declare function $isHeadingNode(node: LexicalNode | null | undefined): node is HeadingNode;
export { eventFiles } from '@lexical/utils';
/**
 * Trigger types that cause format escape at text node boundaries.
 * - `enter`: Escape on Enter key press
 * - `click`: Escape on mouse click
 * - `arrow`: Escape on arrow key navigation (left/right)
 * - `space`: Escape on Space key press
 * - `tab`: Escape on Tab key press
 */
export type EscapeFormatTrigger = 'enter' | 'click' | 'arrow' | 'space' | 'tab';
/**
 * Trigger flags for a single format type. Set a trigger key to `true` to
 * escape that format when the corresponding user interaction occurs.
 *
 * When `onlyAtBoundary` is `true`, the format is only escaped when the cursor
 * is at the start or end of a formatted text node with no adjacent sibling in
 * that direction. When `onlyAtBoundary` is `false` or omitted the format is
 * always escaped regardless of cursor position (matching the legacy
 * `$resetCapitalization` behavior).
 */
export type TriggerConfig = {
    [K in EscapeFormatTrigger]?: boolean;
} & {
    onlyAtBoundary?: boolean;
};
/**
 * Per-format trigger configuration. Each {@link TextFormatType} maps to its
 * own set of triggers, or `null` to explicitly disable escape for that format
 * (useful when overriding defaults via `configExtension`).
 */
export type EscapeFormatTriggerConfig = {
    [K in TextFormatType]?: TriggerConfig | null;
};
export declare function registerRichText(editor: LexicalEditor, escapeFormatTriggers?: ReadonlySignal<EscapeFormatTriggerConfig>): () => void;
export { type RichTextConfig, RichTextExtension, RichTextImportExtension, } from './LexicalRichTextExtension';
export { RichTextImportRules } from './RichTextImportExtension';
