/** * Scroll an item into view within its own scroll container (a menu, modal * body, or side nav list) without scrolling the document. * * `Element.scrollIntoView` scrolls every scrollable ancestor up to the * viewport, so a portaled menu would jump the whole page. In Chromium it also * moves the sequential focus starting point to the item. This scopes the * adjustment to the container and is a no-op when the container is not * scrollable. */ /** * Scroll `node` into view within its nearest scroll container matching * `containerSelector`, aligned like `Element.scrollIntoView`'s `block` option * (default `"nearest"`). Never scrolls the document. */ export function scrollIntoViewWithin( node: HTMLElement, containerSelector?: string, block?: "start" | "center" | "end" | "nearest", ): void;