import type { SpreadsheetClipboardData, SpreadsheetClipboardSource, CellRange } from '@pixerate/editor/spreadsheet'; /** The parts of the reactive spreadsheet the clipboard handlers need. */ export interface SpreadsheetClipboardTarget { readonly editingCell: unknown; readonly selectedRange: CellRange | null; copyToClipboardData(range?: CellRange | null): SpreadsheetClipboardData; pasteClipboardData(source: SpreadsheetClipboardSource): boolean; exportToTsv(range?: CellRange | null): string; } /** * Copy and paste for the grid. Copy writes TSV, an HTML table and the * lossless `application/x.pixerate.spreadsheet+json` format; paste prefers * that format, then HTML, then TSV. * * The listeners are on `document`: with no text selection the browser fires * `copy`/`paste` at ``, not at the focused grid. Text inputs inside the * grid keep native copy/paste. Call `destroy()` to remove the listeners. */ export declare function attachSpreadsheetClipboard(getGrid: () => HTMLElement | null, sheet: SpreadsheetClipboardTarget, isReadOnly: () => boolean): { /** * Call on Mod+C (without preventing default). The browser normally * follows with a `copy` event; where it doesn't (no selection in some * browsers), the selection is written as plain TSV instead. */ copyShortcutFallback(): void; destroy(): void; };