import type { MenuEntry } from './MenuEntries.js'; /** * Which of the page header's actions have moved into its "…" menu, and what * each would be as a row of that menu. The actions render in the page's tree * and the bar measures them in its own, so they meet here: each action * registers its menu row and hides while it has moved, and the bar decides * which move and lists them. */ export declare class HeaderActionsFit { private entries; private overflow; private covers; private cover; private coverers; private version; private listeners; subscribe: (listener: () => void) => (() => void); /** Changes whenever the menu would: what moved, or a moved action's row. */ getVersion: () => number; register(id: string, entry: MenuEntry): void; unregister(id: string): void; isOverflowed(id: string): boolean; /** The moved actions' rows, in the bar's order. */ menu(): MenuEntry[]; setOverflow(ids: readonly string[]): void; /** Whether an open search would take the whole bar: its field, opened in place, wouldn't fit * beside the trail even with every action in the "…" menu. The bar measures it. */ searchCovers(): boolean; setSearchCovers(covers: boolean): void; /** Where a search that takes the bar renders its field: a layer over the bar's row. */ coverNode(): HTMLElement | null; setCoverNode(node: HTMLElement | null): void; /** Whether a search has the bar now, so the bar hides and disables what it covers. */ isCovered(): boolean; setCovering(id: string, covering: boolean): void; private changed; } /** Set around the header's `actions`, so the actions there can move into its * menu; title actions sit beside the title and never do. */ export declare const HeaderActionsFitContext: import("react").Context; export declare const ACTION_GAP = 4; export declare const MENU_BUTTON_WIDTH = 24; /** * The trailing actions to move into the "…" menu so the rest fit in `room` * pixels, last first, or none when everything fits. `shown` is the actions' * width as they are now, with `moved` already in the menu, so what they would * take with nothing moved is worked out from it and each action's width. */ export declare function overflowingActions(items: readonly { id: string; width: number; }[], shown: number, moved: readonly string[], room: number): string[];