import { type Transformer } from '@lexical/markdown';
import type { Klass, LexicalNode } from 'lexical';
/** Options shared by the Markdown serializer helpers. */
export interface MarkdownSerializerOptions {
    /**
     * Markdown transformers to use. Defaults to the standard `@lexical/markdown`
     * `TRANSFORMERS`. Pass the same array you give `RichTextEditor`'s
     * `transformers` prop so content round-trips consistently.
     */
    transformers?: ReadonlyArray<Transformer>;
    /**
     * Extra Lexical nodes to register beyond the default OSS set, mirroring the
     * editor's `nodes` prop. Required for custom node types to serialize.
     */
    nodes?: ReadonlyArray<Klass<LexicalNode>>;
}
/**
 * Convert a Markdown string to a serialized Lexical `EditorState` JSON string
 * — the same shape `RichTextEditor`'s `defaultValue` expects. Runs headless
 * (no DOM), so it is safe in Node / SSR.
 *
 * @example
 * ```
 * const value = markdownToEditorStateJSON('# Title\n\nHello');
 * <RichTextEditor label="Notes" defaultValue={value} />
 * ```
 */
export declare function markdownToEditorStateJSON(markdown: string, options?: MarkdownSerializerOptions): string;
/**
 * Convert a serialized Lexical `EditorState` JSON string (e.g. the value
 * produced by `RichTextEditor`'s `onChange` or `defaultValue`) to a Markdown
 * string. Runs headless (no DOM), so it is safe in Node / SSR.
 *
 * @example
 * ```
 * const md = editorStateJSONToMarkdown(savedJson);
 * ```
 */
export declare function editorStateJSONToMarkdown(editorStateJSON: string, options?: MarkdownSerializerOptions): string;
//# sourceMappingURL=markdownSerializers.d.ts.map