import { getContentMaxInlineSize } from "../AdaptiveGrid/chooseColumns.ts" import type { GridRowsProps } from "./virtualizedGridTypes.ts" /** The shared markup. Only the scroll observer differs between the two owners. */ export const GridRows = ({ drawnColumns, gap, getItemKey, gridElement, items, label, measureElement, renderItem, scrollMargin, totalSize, virtualRows, }: GridRowsProps) => { const firstRow = virtualRows[0] const lastRow = virtualRows[virtualRows.length - 1] // Everything scrolled past, and everything still to come. The two // numbers that stand in for the rows that do not exist. const paddingBlockStart = firstRow?.start ?? 0 const paddingBlockEnd = lastRow ? Math.max(0, totalSize - lastRow.end) : 0 return ( ) }