/** Whether el shows. A host can keep a view mounted while another page shows, * hidden with `display: none` or `visibility: hidden`, and keys pressed on * that page are the page's. A browser without checkVisibility (Safari before * 17.4) counts it as shown, as it did before the check. */ export declare function onScreen(el: Element | null): boolean; /** Listens on target for the key presses `wants` picks that began while el * showed. A capture listener on window reads that before any other handler * runs, since one that closes a layer on another page can show the view again * before a bubbling listener reads it. Returns the cleanup. */ export declare function listenWhileShown(target: EventTarget, el: () => Element | null, wants: (e: KeyboardEvent) => boolean, onKey: (e: KeyboardEvent) => void): () => void;