import type { ObjectDirective } from 'vue'; /** * Determine whether a click occurred outside the referenced * element(s) or not. Trigger the directive's handler if so. * * Listens on the element's own document and every same-origin ancestor document up to * the top window. This covers iframe-mounted elements: clicks inside the iframe (own * doc) and clicks in the surrounding parent shell (ancestor doc) both reach the * handler. Cross-origin ancestors are skipped — accessing them would throw. */ type ClickOutsideHandler = (e: MouseEvent) => void; type ClickOutsideElement = HTMLElement & { _handler?: (e: MouseEvent) => void; _handlerDocs?: Document[]; }; declare const clickoutside: ObjectDirective; export default clickoutside;