import { NodePart, TemplateResult } from 'lit-html';
import { Layout } from './uni-virtualizer/lib/layouts/Layout.js';
declare const LitScroller_base: {
new (config: {
part: NodePart;
renderItem: (item: Item_1, index?: number) => TemplateResult;
useShadowDOM?: boolean;
scrollTarget?: Element | Window;
layout?: Layout;
}): {
[x: string]: any;
_pool: NodePart[];
_renderItem: (item: Item_1, index?: number) => TemplateResult;
_hostPart: NodePart;
createElement(): NodePart;
updateElement(part: NodePart, item: any, idx: number): void;
recycleElement(part: NodePart): void;
readonly _kids: Node[];
_node(part: NodePart): Node;
_nextSibling(part: NodePart): Node;
_insertBefore(part: NodePart, referenceNode: Node): void;
_hideChild(part: NodePart): void;
_showChild(part: NodePart): void;
_measureChild(part: NodePart): any;
};
[x: string]: any;
};
export declare class LitScroller- extends LitScroller_base
- {
}
/**
* Configuration options for the scroll directive.
*/
interface ScrollConfig
- {
/**
* A function that returns a lit-html TemplateResult. It will be used
* to generate the DOM for each item in the virtual list.
*/
renderItem?: (item: Item, index?: number) => TemplateResult;
layout?: Layout;
/**
* An element that receives scroll events for the virtual scroller.
*/
scrollTarget?: Element | Window;
/**
* Whether to build the virtual scroller within a shadow DOM.
*/
useShadowDOM?: boolean;
/**
* The list of items to display via the renderItem function.
*/
items?: Array
- ;
/**
* Limit for the number of items to display. Defaults to the length of the
* items array.
*/
totalItems?: number;
/**
* Index and position of the item to scroll to.
*/
scrollToIndex?: {
index: number;
position?: string;
};
}
/**
* A lit-html directive that turns its parent node into a virtual scroller.
*
* See ScrollConfig interface for configuration options.
*/
export declare const scroll: (config: ScrollConfig) => (part: NodePart) => Promise;
export {};
//# sourceMappingURL=scroll.d.ts.map