import type { CodeNode } from '../../el'; /** 可从 Slate 子节点或 `value` 取正文的元素(code / mermaid / katex / think 等) */ export type SlatePlainTextSource = { children?: unknown; value?: unknown; } | null | undefined; /** * 从 Slate 元素读取正文:优先 `Node.string`(与子节点同步),再回退到 string `value`。 * 用于流式 updateNodeList 只更新 text leaf、未同步 `value` 的场景。 * * 不使用 `Element.isElement`:Vitest 中对 `slate` 的部分 mock 常缺少 `Element`,会导致用例报错。 */ export declare function getSlateElementPlainText(element: SlatePlainTextSource): string; /** * 从 `CodeNode` 取正文。 * void 块级 code 以 `value` 为权威来源;流式场景可能仅更新 children 且比 value 更长,此时优先 children。 */ export declare function getCodeBlockPlainText(element: CodeNode | undefined | null): string;