import { type ReactNode } from "react"; import { type ThemeKeys } from "../../theme"; /** * Lazily renders a child the first time it intersects with the viewport. * Works with any vertical scrolling ancestor (direct or not). * Note: For now, it's probably safer not to nest LazyRender components. */ export interface LazyRenderProps { /** * The children to display when LazyRender intersects with the viewport. */ children: ReactNode; /** * A rough estimate of the children's height so that not too many or too few LazyRender components are visible at once. * Getting this right is not critical. * A heightEstimate of 0 means nothing will lazily render as everything is immediately visible. * On the other hand, a huge heightEstimate means it will be hard to see and load the content after the first item. * @default 200 */ heightEstimate?: number; /** * Whether to keep the children loaded forever after they were shown the first time. * Otherwise, will keep mounting/unmounting the children as they appear on screen. * @default false */ keepLoaded?: boolean; /** * Whether to immediately load when the user is about to initiate a native page text search. */ loadWhenSearching?: boolean; gap?: ThemeKeys<"space">; } export declare function LazyRender(props: LazyRenderProps): JSX.Element;