/** * Copyright (c) 2025 Elara AI Pty Ltd * Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details. */ /** * The clipboard matrix (B§10): copy is tab-separated — dates `d/m/yyyy`, * numbers bare with the viewer's decimal separator (`1234,5` in German, what * a spreadsheet in that language reads, #852), a link cell as TWO columns * (From, To) printed through the grammar; paste lands at the selection, each * cell parsed by its kind — a stamped or read-only column's left as it was, * and said so — a link column consuming two clipboard cells. * * @packageDocumentation */ import type { Formatters } from "@elaraai/east-ui-components"; import type { SheetColumnMeta } from "./model.js"; import type { SheetCellValue } from "./values.js"; /** * A cell's clipboard text — one column, or two for a link. * * @param cell - The cell * @param meta - Its column * @param words - The viewer's formatters (a number's decimal separator) * @returns The clipboard cells */ export declare function exportCell(cell: SheetCellValue | undefined, meta: SheetColumnMeta, words: Formatters): string[]; /** * A block of cells as tab-separated lines; `skipRow` leaves rows out (a * group's band, #740 G9). * * @param cellAt - The cell at a row and column * @param columns - The columns * @param rect - The block * @param words - The viewer's formatters (a number's decimal separator) * @param skipRow - Rows to leave out * @returns The clipboard text */ export declare function exportMatrix(cellAt: (r: number, c: number) => SheetCellValue | undefined, columns: readonly SheetColumnMeta[], rect: { r0: number; r1: number; c0: number; c1: number; }, words: Formatters, skipRow?: (r: number) => boolean): string; /** Clipboard text to a matrix of cells (a trailing newline drops). */ export declare function parseMatrix(text: string): string[][]; /** Two clipboard columns (From, To) become one link text — a lone cell is taken as typed. */ export declare function joinHalves(a: string, b: string | undefined): string; /** One pasted cell, resolved against the column it lands on. */ export interface PastedCell { /** Row offset from the paste anchor. */ dr: number; /** The column index. */ c: number; /** The text to parse. */ text: string; } /** * Lay a clipboard matrix over the columns from an anchor column: a link * column consumes two cells. A stamped or read-only column's cell is laid * too: the paste leaves it as it was, and says why (#1585). */ export declare function layoutPaste(matrix: readonly (readonly string[])[], columns: readonly SheetColumnMeta[], c0: number): { cells: PastedCell[]; width: number; }; //# sourceMappingURL=clipboard.d.ts.map