import { type Accessor } from "solid-js";
/** A single virtual item with its position and index. */
export interface VirtualItem {
    index: number;
    start: number;
    end: number;
    size: number;
    key: string | number;
}
/** Options for createVirtualizer. */
export interface CreateVirtualizerOptions {
    /** Total number of items. Reactive. */
    count: Accessor<number>;
    /** The scrollable container element. */
    getScrollElement: Accessor<HTMLElement | null>;
    /** Estimated size in pixels for each item. Used for initial layout. */
    estimateSize: (index: number) => number;
    /** Number of items to render outside the visible area. @default 5 */
    overscan?: number;
    /** Whether scrolling is horizontal. @default false */
    horizontal?: boolean;
    /** Custom key extractor. @default index */
    getItemKey?: (index: number) => string | number;
}
/** State returned by createVirtualizer. */
export interface VirtualizerState {
    /** Virtual items currently in the visible range (plus overscan). */
    virtualItems: Accessor<VirtualItem[]>;
    /** Total scrollable size in pixels. */
    totalSize: Accessor<number>;
    /** Imperatively scroll to an item by index. */
    scrollToIndex: (index: number, options?: {
        align?: "start" | "center" | "end";
    }) => void;
    /** Current scroll offset. */
    scrollOffset: Accessor<number>;
    /** Measure a specific item's actual size after render. */
    measureElement: (element: HTMLElement | null) => void;
}
/**
 * Virtualizes a list of items, only rendering those visible in the scroll viewport.
 * Supports fixed and variable row heights, horizontal/vertical, and overscan.
 */
export declare function createVirtualizer(options: CreateVirtualizerOptions): VirtualizerState;
//# sourceMappingURL=create-virtualizer.d.ts.map