/** * Variable Height Manager * Manages variable height items with efficient position calculations */ import { VisibleRange } from './types'; export interface VariableHeightConfig { estimatedHeight: number; minHeight: number; maxHeight: number; bufferSize: number; } export interface ItemPosition { index: number; offset: number; height: number; } export declare class VariableHeightManager { private heightCache; private config; private totalItems; private lastMeasuredIndex; constructor(config?: Partial); /** * Set total number of items */ setTotalItems(total: number): void; /** * Measure item height from DOM element */ measureElement(index: number, element: HTMLElement | null): number; /** * Get item position (offset and height) */ getItemPosition(index: number): ItemPosition; /** * Calculate visible range for variable heights */ calculateVisibleRange(scrollTop: number, viewportHeight: number): VisibleRange; /** * Get total height of all items */ getTotalHeight(): number; /** * Scroll to specific item index */ scrollToIndex(index: number): number; /** * Get items to render for current viewport */ getItemsToRender(scrollTop: number, viewportHeight: number): { items: ItemPosition[]; totalHeight: number; }; /** * Handle height change (when item height changes dynamically) */ onHeightChange(index: number, newHeight: number): void; /** * Get cache statistics */ getCacheStats(): import("./HeightMeasurementCache").HeightCacheStats; /** * Clear cache for specific range */ clearRange(startIndex: number, endIndex: number): void; /** * Clear entire cache */ clearCache(): void; /** * Get last measured index */ getLastMeasuredIndex(): number; /** * Check if item is measured */ isItemMeasured(index: number): boolean; /** * Get measured items count */ getMeasuredCount(): number; } export default VariableHeightManager; //# sourceMappingURL=VariableHeightManager.d.ts.map