import type { DOMConversionMap, DOMExportOutput, LexicalNode, NodeKey, SerializedLexicalNode, Spread } from 'lexical'; import { DecoratorNode } from 'lexical'; import { type JSX } from 'react'; export interface MermaidPayload { code: string; theme?: string; mode?: string; key?: NodeKey; } export type SerializedMermaidNode = Spread<{ code: string; theme?: string; mode?: string; type: 'mermaid'; version: 1; }, SerializedLexicalNode>; export declare class MermaidNode extends DecoratorNode { __code: string; __theme?: string; __mode?: string; static getType(): string; static clone(node: MermaidNode): MermaidNode; static importJSON(serializedNode: SerializedMermaidNode): MermaidNode; exportJSON(): SerializedMermaidNode; static importDOM(): DOMConversionMap | null; exportDOM(): DOMExportOutput; constructor(code: string, theme?: string, mode?: string, key?: NodeKey); getCode(): string; setCode(code: string): void; getTheme(): string | undefined; setTheme(theme: string): void; getMode(): string | undefined; setMode(mode: string): void; createDOM(): HTMLElement; updateDOM(): false; decorate(): JSX.Element; } export declare function $createMermaidNode({ code, theme, mode, key }: MermaidPayload): MermaidNode; export declare function $isMermaidNode(node: LexicalNode | null | undefined): node is MermaidNode;