/** * Height Measurement Cache * Dynamically measures and caches item heights for variable height support */ export interface HeightCacheEntry { height: number; measured: boolean; timestamp: number; } export interface HeightCacheStats { totalItems: number; measuredItems: number; estimatedItems: number; cacheSize: number; hitRate: number; } export declare class HeightMeasurementCache { private heightMap; private offsetMap; private estimatedHeight; private totalHeight; private accessCount; private hitCount; private readonly DEFAULT_TTL; constructor(estimatedHeight?: number); /** * Measure and cache height for an item */ measureHeight(index: number, element: HTMLElement): number; /** * Get height for an item (measured or estimated) */ getHeight(index: number): number; /** * Get offset (cumulative height) for an item */ getOffset(index: number): number; /** * Check if item height is measured */ isMeasured(index: number): boolean; /** * Mark item as needing remeasurement */ invalidate(index: number): void; /** * Clear specific item from cache */ clear(index: number): void; /** * Clear entire cache */ clearAll(): void; /** * Recalculate all offsets */ private recalculateOffsets; /** * Get total height of all items */ getTotalHeight(totalItems: number): number; /** * Find item index at a specific scroll position */ findIndexAtPosition(position: number, totalItems: number): number; /** * Get cache statistics */ getStats(totalItems: number): HeightCacheStats; /** * Update estimated height */ updateEstimatedHeight(height: number): void; /** * Get estimated height */ getEstimatedHeight(): number; /** * Cleanup old entries (older than TTL) */ cleanup(ttl?: number): void; /** * Get all measured heights */ getAllHeights(): Map; /** * Set heights in bulk (for initial data load) */ setHeightsBulk(heights: Map): void; } export default HeightMeasurementCache; //# sourceMappingURL=HeightMeasurementCache.d.ts.map