import { R as RowData, f as Row, d as ColumnDef } from '../types-CwNe64f5.js'; /** * Map from `${rowIndex}:${columnId}` to the number of rows to span. * A value of 0 means "this cell is consumed by a span above — skip it." * A value >= 1 is the actual rowSpan attribute value. */ type RowSpanMap = Map; /** * Callback on a column def that returns the number of rows to span * starting from the current row. Return 1 (or undefined) for no spanning. */ type RowSpanFn = (row: Row, rows: Row[], rowIndex: number) => number | undefined; /** * Pre-process visible rows and column definitions to compute a RowSpanMap. * * For each column that defines a `rowSpan` callback, iterate through the rows * and determine how many contiguous rows should be merged. The first row in * the span gets the total count; subsequent rows get 0 (skip). * * @param rows - The visible (rendered) rows in order. * @param columnDefs - All column definitions for the table. * @returns A RowSpanMap that renderers can consult per-cell. */ declare function resolveRowSpans(rows: Row[], columnDefs: ColumnDef[]): RowSpanMap; /** * Get the rowSpan value for a specific cell. * - Returns undefined if no spanning applies (render normally). * - Returns 0 if the cell is consumed by a span above (skip rendering). * - Returns n > 1 if this cell should span n rows. */ declare function getRowSpan(map: RowSpanMap, rowIndex: number, columnId: string): number | undefined; /** * Check if a cell should be skipped because a span from above covers it. */ declare function isCellSpanned(map: RowSpanMap, rowIndex: number, columnId: string): boolean; export { type RowSpanFn, type RowSpanMap, getRowSpan, isCellSpanned, resolveRowSpans };