import { ReactNode } from "react"; import { SerializedLexicalNode } from "lexical"; type LexicalDiffRowKind = 'delete' | 'equal' | 'insert' | 'modify'; interface LexicalDiffCell { baseBlockType: string | null; block: SerializedLexicalNode | null; blockType: string | null; } interface LexicalDiffRow { kind: LexicalDiffRowKind; newCell: LexicalDiffCell | null; oldCell: LexicalDiffCell | null; } interface LexicalDiffBlockRenderContext { baseBlockType: string | null; blockType: string | null; newBaseBlockType: string | null; newBlockType: string | null; oldBaseBlockType: string | null; oldBlockType: string | null; renderDefaultNew: () => ReactNode; renderDefaultOld: () => ReactNode; row: LexicalDiffRow; } type LexicalDiffBlockRenderer = (context: LexicalDiffBlockRenderContext) => { new?: ReactNode; old?: ReactNode; } | null; export { LexicalDiffBlockRenderContext, LexicalDiffBlockRenderer, LexicalDiffCell, LexicalDiffRow, LexicalDiffRowKind };