/// import type { DOMConversionMap, DOMExportOutput, EditorConfig, LexicalEditor, LexicalNode, NodeKey, SerializedEditor, SerializedLexicalNode, Spread } from "lexical"; import { DecoratorNode } from "lexical"; export interface ImagePayload { altText: string; caption?: LexicalEditor; height?: number; key?: NodeKey; maxWidth?: number; showCaption?: boolean; src: string; width?: number; captionsEnabled?: boolean; figureLabel?: string; id?: string; } export declare function findImageNodes(nodes: LexicalNode[]): ImageNode[]; export type SerializedImageNode = Spread<{ altText: string; caption: SerializedEditor; height?: number; maxWidth?: number; showCaption: boolean; src: string; id?: string; width?: number; }, SerializedLexicalNode>; export declare class ImageNode extends DecoratorNode { __src: string; __altText: string; __width: "inherit" | number; __height: "inherit" | number; __maxWidth?: number; __id?: string | undefined; __showCaption: boolean; __caption: LexicalEditor; __captionsEnabled: boolean; static getType(): string; getId(): string | undefined; static clone(node: ImageNode): ImageNode; static importJSON(serializedNode: SerializedImageNode): ImageNode; exportDOM(): DOMExportOutput; static importDOM(): DOMConversionMap | null; constructor(src: string, altText: string, maxWidth?: number, width?: "inherit" | number, height?: "inherit" | number, showCaption?: boolean, caption?: LexicalEditor, captionsEnabled?: boolean, key?: NodeKey, id?: string); exportJSON(): SerializedImageNode; setWidthAndHeight(width: "inherit" | number, height: "inherit" | number): void; setShowCaption(showCaption: boolean): void; createDOM(config: EditorConfig): HTMLElement; updateDOM(): false; getSrc(): string; setSrc(src: string): void; getAltText(): string; decorate(): JSX.Element; } export declare function $createImageNode({ altText, height, maxWidth, captionsEnabled, src, width, showCaption, caption, key, id }: ImagePayload): ImageNode; export declare function $isImageNode(node: LexicalNode | null | undefined): node is ImageNode;