import { default as Vector2 } from '../geometry/Vector2'; import { SourceToTargetsArrayType } from './ArcherContainer.types'; export type ElementRects = Record; export type ArcherMeasurements = { parentCoordinates: Vector2 | null; rects: ElementRects; }; /** * Measures the parent and every registered element after layout, storing the * result in state. Keeping the measurements in state (rather than reading the * DOM during render) makes the render pure, so it follows the Rules of React * and can be optimized by the React Compiler. * * Returns the latest measurements and a `refreshScreen` callback that forces a * re-measure (used by the resize listener, the element observer and the public * imperative handle). */ export declare function useArcherMeasurements(parentRef: React.RefObject, refs: Record, sourceToTargetsMap: Record): { measurements: ArcherMeasurements; refreshScreen: () => void; }; /** Observe registered elements for size changes and refresh on any change. */ export declare const useObserveElements: (refs: Record, refreshScreen: () => void) => void; /** Subscribe/unsubscribe to the resize window event */ export declare function useResizeListener(refreshScreen: () => void): void;