import { NodePart, TemplateResult } from 'lit-html';
import { Layout } from './uni-virtualizer/lib/layouts/Layout.js';
/**
* Mixin for VirtualRepeater and VirtualScroller. This mixin overrides the generic
* methods in those classes to provide lit-specific implementations of element
* creation and manipulation.
*
* This mixin implements child recycling, so children can be reused after removal
* from the DOM.
*/
export declare const LitMixin: (Superclass: any) => {
new - (config: {
part: NodePart;
renderItem: (item: Item, index?: number) => TemplateResult;
useShadowDOM?: boolean;
scrollTarget?: Element | Window;
layout?: Layout;
}): {
[x: string]: any;
/**
* NodeParts that are available for reuse.
*/
_pool: NodePart[];
/**
* Method for generating each item's DOM.
*/
_renderItem: (item: Item, index?: number) => TemplateResult;
/**
* The host of the directive that constructs the scroller. Children are
* rendered into this part.
*/
_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;
};
declare const LitRepeater_base: {
new (config: {
part: NodePart;
renderItem: (item: Item_1, index?: number) => TemplateResult;
useShadowDOM?: boolean;
scrollTarget?: Element | Window;
layout?: Layout;
}): {
[x: string]: any;
/**
* NodeParts that are available for reuse.
*/
_pool: NodePart[];
/**
* Method for generating each item's DOM.
*/
_renderItem: (item: Item_1, index?: number) => TemplateResult;
/**
* The host of the directive that constructs the scroller. Children are
* rendered into this part.
*/
_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 LitRepeater
- extends LitRepeater_base
- {
}
interface RepeatConfig
- {
renderItem: (item: Item, index?: number) => TemplateResult;
part: NodePart;
first?: number;
num?: number;
totalItems?: number;
}
export declare const repeat: (config: RepeatConfig) => (part: NodePart) => Promise;
export {};
//# sourceMappingURL=repeat.d.ts.map