import type { Cell } from '@fortune-sheet/core'; import type { WorkSpreadsheetContent } from '../work-types'; export type SpreadsheetRichTextFormatAttribute = 'bl' | 'cl' | 'fc' | 'ff' | 'fs' | 'it' | 'un'; export type SpreadsheetRichTextToggleAttribute = 'bl' | 'cl' | 'it' | 'un'; export interface SpreadsheetTextSelection { end: number; start: number; } export interface SpreadsheetRichTextSelectionFormatRequest { attribute: SpreadsheetRichTextFormatAttribute; column: number; row: number; selection: SpreadsheetTextSelection; sheetId: string; /** * A cell reconstructed from the live editor before focus moves into a * ribbon popover. It is intentionally internal and still passes through all * text, run-count, coordinate, and formatting bounds below. */ sourceCell?: Cell; value: unknown; } export declare function canApplySpreadsheetRichTextSelectionFormat(content: WorkSpreadsheetContent, request: SpreadsheetRichTextSelectionFormatRequest): boolean; export declare function applySpreadsheetRichTextSelectionFormat(content: WorkSpreadsheetContent, request: SpreadsheetRichTextSelectionFormatRequest): WorkSpreadsheetContent | null; export declare function formatSpreadsheetRichTextSelection(cell: Cell, selection: SpreadsheetTextSelection, attribute: SpreadsheetRichTextFormatAttribute, value: unknown): Cell | null; export declare function spreadsheetRichTextSelectionToggleValue(cell: Cell, selection: SpreadsheetTextSelection, attribute: SpreadsheetRichTextToggleAttribute): 0 | 1 | null;