import type { Cell } from '@fortune-sheet/core'; import { type XlsxRichTextRun } from './work-xlsx-rich-text-model'; export interface SpreadsheetRichTextPasteIntent { end: number; runs: readonly XlsxRichTextRun[]; start: number; text: string; } /** * Reconciles a text edit emitted by Fortune with the previous native XLSX * rich-text cell. Formula-bar edits may arrive as a plain string, while the * in-cell editor emits visible runs without A3S-only semantic color metadata. * This bounded model restores only style and metadata justified by the prior * controlled value and the exact text replacement. */ export declare function reconcileSpreadsheetRichTextCellEdit(previous: Cell | null | undefined, current: Cell, formattedPaste?: SpreadsheetRichTextPasteIntent): Cell; /** * Restores the controlled runs when an unauthenticated Fortune callback keeps * the exact visible text but drops native run metadata. Callers must reserve * this for non-structural batches without an exact cell-operation coordinate. */ export declare function restoreSpreadsheetRichTextCellRuns(previous: Cell | null | undefined, current: Cell): Cell; /** * Proves that Fortune retained the visible text of a controlled native * rich-text cell. This permits metadata-only callbacks to restore lost run * structure without guessing across a text or structural edit. */ export declare function sameSpreadsheetRichTextCellText(previous: Cell | null | undefined, current: Cell): boolean;