/** * Copyright (c) Microsoft. All rights reserved. */ import React from 'react'; import { LabelerVirtualizationStore } from '../stores/LabelerVirtualizationStore'; import { AnnotationDomData } from '../types/labelerTypes'; /** * Tracks scrolling and annotation changes in the labeler to calculate * the start and end line indices of the lines to virtual render in the * labeler viewport. Updates the `LabelerVirtualizationStore` with the * new line indices whenever a change requiring re-evaluation occurs. It * also accounts for the annotations visible in the viewport to expand the * virtual rendering line indices to ensure annotations visible in the * viewport are rendered correctly. * * Learn more about this hook in `virtualization.md`. * * @param containerRef The labeler container. * @param isLabelerMounted Whether the labeler was fully mounted or not. * @param annotationDomData The current annotations added to the labeler. * @param virtualizationStore A store that keeps virtualization state. * @param isVirtualizationEnabled Whether the labeler is in virtual * rendering mode or not. */ export declare const useVirtualizer: ({ containerRef, isLabelerMounted, annotationDomData, virtualizationStore, isVirtualizationEnabled }: { isLabelerMounted: boolean; isVirtualizationEnabled: boolean; annotationDomData: AnnotationDomData[]; virtualizationStore: LabelerVirtualizationStore; containerRef: React.MutableRefObject; }) => void;