/** * Helper class for positioning the menu and submenus in the correct place relative to the * cursor position (DOM element or mouse coordinates). * * @private * @class Positioner */ export declare class Positioner { #private; /** * Initializes the positioner with a flag indicating whether the menu should be kept within the viewport boundaries. */ constructor(keepInViewport: boolean); /** * Sets offset position for specified directions (`above`, `below`, `left` or `right`). * * @param {'above' | 'below' | 'left' | 'right'} direction A direction name. * @param {number} [offset=0] Offset value. * @returns {Positioner} */ setOffset(direction: string, offset?: number): this; /** * Sets the menu element to work with. The element can be owned by the main menu or the submenu. * * @param {HTMLElement} container The menu container element. * @returns {Positioner} */ setElement(container: HTMLElement): this; /** * Sets the parent menu element to work with. * * @param {HTMLElement} container The parent menu container element. * @returns {Positioner} */ setParentElement(container: HTMLElement): this; /** * Updates the menu position. * * @param {object|MouseEvent} coords The literal object with `top`, `left`, `width` and `height` props or a * mouse event object. */ updatePosition(coords: Event | DOMRect | Record): void; /** * Updates the menu horizontal position. */ updateHorizontalPosition(): void; /** * Sets the menu position above the cursor object. */ setPositionAboveCursor(): void; /** * Sets the menu position below the cursor object. */ setPositionBelowCursor(): void; /** * Sets the menu position on the right of the cursor object. */ setPositionOnRightOfCursor(): void; /** * Sets the menu position on the left of the cursor object. */ setPositionOnLeftOfCursor(): void; }