import { UseElementBoundingReturn } from '@vueuse/core'; import { ComputedRef, CSSProperties } from 'vue'; import { HorizontalDirection } from '../common/window'; /** * Simplifies correctly and responsively positioning (dropdown/right-click/etc) menus so that they open * to the correct direction, can change directions if there's not enough space or even go full screen * if there's no space in either direction. * * Also supports updating vertical position, incase the menu would clip w/ the bottom of the screen */ export declare const useBodyMountedMenuPositioning: (params: { /** * The direction the open should preferably open in, assuming it has the space to do so */ menuOpenDirection?: ComputedRef; /** * useElementBounding() of the button that opens the menu */ buttonBoundingBox: UseElementBoundingReturn; /** * Set the target menu width. If not available, will try a very basic positioning method * that just uses the button width. */ menuWidth: ComputedRef; /** * Optionally also control target menu height. */ menuHeight?: ComputedRef; }) => { menuStyle: ComputedRef; };