/** * Copyright (c) 2025 Elara AI Pty Ltd * Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details. */ import { type SheetColumnIndex, type SheetColumnMeta } from "./model.js"; import type { LocalLayer } from "./use-editing.js"; import type { SheetCellValue, SheetRowValue } from "./values.js"; /** A row as the sheet names it — a Record's title, else its first text column's text — where it holds one. */ export declare function rowNameOf(row: SheetRowValue | undefined, columns: SheetColumnIndex): string | undefined; /** The decoded rows with the local layer applied — its placements in one linear pass (#859), and a keyed source's rows in key order (#1182). */ export declare function applyLayer(source: readonly SheetRowValue[], layer: LocalLayer, keyOrder?: (a: string, b: string) => number): SheetRowValue[]; /** * What the local layer adds to a count of the source's rows, and takes off it (#1536): each new row, and each row a * draft removes — but a Save's, only over a count read at the revision it was drafted at, which holds nothing of it; * a count read since holds it already. * * @param layer - The local layer * @param savedFrom - Each entry the layer draws as a Save sent it, by the revision it was drafted at — `undefined` for one * held from no revision, which a count read at a revision holds already * @param at - The revision the count was read at; `undefined` where it is not known, which counts each * @param among - The rows a narrowing's count is of: only a removed one among them is taken off. None for the record's * @returns The rows the layer adds, and those it takes off */ export declare function layerCounts(layer: LocalLayer, savedFrom: ReadonlyMap, at: string | undefined, among?: readonly SheetRowValue[]): { added: number; removed: number; }; /** A row with one cell replaced. */ export declare function withCell(row: SheetRowValue, key: string, cell: SheetCellValue): SheetRowValue; /** A fresh row — every declared cell blank; no lines and no band (a flat row, or a line as a pseudo row). */ export declare function blankRow(id: string, columns: readonly SheetColumnMeta[]): SheetRowValue; export declare let mintCounter: number; /** A renderer-minted line key (#740) — never a source index, unique within the group. */ export declare function mintLineKey(group: SheetRowValue): string; //# sourceMappingURL=local-rows.d.ts.map