API reference
@salmonui/core/virtual
13 exported symbols: 6 functions, 5 interfaces and 2 constants. Each name links its page with the signature, docs and members.
import { … } from '@salmonui/core/virtual';Functions
computeRangeVisible range for a scroll offset and viewport extent, widened by overscan items on each side. Works for rows and columns.createColumnMetricscreateFixedRowMetricsO(1) metrics for the fixed row height fast path.createScrollMappingcreateVariableRowMetricsBuilds variable row metrics in O(n) from a height function.sameRange
Interfaces
ColumnMetricsHorizontal metrics for one column zone.RowMetricsVertical metrics of the visible row model. Offsets are in virtual px.ScrollMappingMaps between the physical scroll offset of the scroll container and the virtual offset of the row model. Below maxScrollHeight the mapping is the identity. Abo…VariableRowMetricsRow metrics with measured or per-row heights, kept in a Fenwick tree (O(log n) updates and lookups).VirtualRangeA rendered window: [start, end) is visible, [overscanStart, overscanEnd) is rendered.
Constants
DEFAULT_MAX_SCROLL_HEIGHTDefault physical cap, below every browser's element height limit.EMPTY_RANGE