/** * Prevents body scrolling. Keeps track of which elements requested a lock so multiple levels of locking are possible * without premature unlocking. */ export declare function lockBodyScrolling(lockingEl: HTMLElement): void; /** * Unlocks body scrolling. Scrolling will only be unlocked once all elements that requested a lock call this method. */ export declare function unlockBodyScrolling(lockingEl: HTMLElement): void; /** * Scrolls an element into view *of its parent container*. * If the element is already in view, nothing will happen. * * Note to future me - cannot use native `scrollIntoView` * 'cos it will move the whole window * (vertically even though we only care about parent). */ export declare function scrollIntoView(element: HTMLElement, container: HTMLElement, direction?: 'horizontal' | 'vertical' | 'both', position?: 'center' | 'start'): void; /** * Attempts to find the closest scrolling parental element * @param element - the element from which to traverse up the DOM * @returns - the closest scrolling parental element */ export declare function findScrollParent(element: HTMLElement): HTMLElement; /** * Checks whether an element is currently viewable within the viewport * @param el - element to check * @param percentVisible - the percentage of the element that should be within the viewport * @returns true if the element's area percentage is visible */ export declare function isInViewport(el: Element, percentVisible?: number, axis?: 'x' | 'y' | 'both'): boolean;