import { type ContextMenuGroup, type ContextMenuIntent } from "./context-menu-model.js"; /** * The menu itself: a positioned list of buttons over whatever was right-clicked. * * It decides nothing. `contextMenuFor` has already said which groups exist, in * which order, and which one removes authored text; this draws that and reports * the intent that was chosen. The one thing it computes is where to sit, and * that is `placeMenu`, which is pure and tested — the measurement it needs * (`getBoundingClientRect`) is the only reason any of this is in an effect. * * Buttons in lists, not an ARIA `menu`, for the same reason the rail is not an * ARIA `tree`: a real menu widget owes the reviewer roving focus and typeahead, * and this repo has no DOM test environment to hold that behaviour honest. * What it does owe — Escape closes, a click outside closes, focus lands inside * so a keyboard can reach the items — is small enough to be right by reading. */ export interface ContextMenuProps { readonly groups: readonly ContextMenuGroup[]; readonly x: number; readonly y: number; readonly onChoose: (intent: ContextMenuIntent) => void; readonly onDismiss: () => void; } export declare function ContextMenu({ groups, x, y, onChoose, onDismiss, }: ContextMenuProps): import("react").JSX.Element | null;