import { EventEmitter } from '../../stencil-public-runtime'; import { type ChoicePopupAnchorAlignment, type ControlSize } from '../../utils'; import type { MenuAlign, MenuSide } from './menu-position'; import { type MenuItemData, type MenuReorderDetail, type MenuSection } from './menu-types'; export type MenuSelectionMode = 'none' | 'single'; export type MenuSize = ControlSize; export declare class Menu { el: HTMLElement; open: boolean; items: MenuItemData[]; /** Choice-row density. */ size: MenuSize; /** Give ordinary rows mutually-exclusive menu semantics using isSelected. */ selectionMode: MenuSelectionMode; sections: MenuSection[]; /** Preferred side; placement flips to the opposite side when that offers a better fit. */ side: MenuSide; align: MenuAlign; /** Align choice-row edges to the anchor by default; use `popup-frame` only for custom frame geometry. */ anchorAlignment: ChoicePopupAnchorAlignment; /** Gap between anchor and menu — number (px) or TokoMo length (`var(--dimension-space-050)`, etc.). */ sideOffset: number | string; /** Cross-axis offset — number (px) or TokoMo length. */ alignOffset: number | string; menuWidth: string | undefined; minWidth: string | undefined; /** External trigger element to position against. Set via JS: menuEl.anchor = buttonEl */ anchor: HTMLElement | undefined; /** ID of the external trigger element for positioning */ anchorId: string | undefined; /** Show a visible ring on the initially focused menu item. Use only when the opener was keyboard-driven. */ initialFocusVisible: boolean; /** Accessible name for the popup menu. */ menuLabel: string; private shouldRender; private closing; private pos; private focusedIndex; private positionReady; private focusRingVisible; private reorderFromFlat; private reorderInsertBefore; private reorderAnnouncement; dsClose: EventEmitter; /** Emitted after the popup's exit motion is complete and its rendered content is removed. */ dsAfterClose: EventEmitter; dsSelect: EventEmitter; /** Emitted when a generic `swatch-picker` section option is chosen. */ dsSwatchSelect: EventEmitter; /** Emitted after a pointer drop or keyboard move; Menu never mutates item order. */ dsReorder: EventEmitter; private clickOutsideHandler; private closeTimer; private positionReadyCallback; private suppressItemClick; private reorderPointer; /** * Anchored placement. The choice-cell measurement stays here on purpose: the * inner-cell align offset and the `--dimension-menu-width-xs` floor are Menu * semantics, not shared geometry. */ private readonly position; /** Last content actually painted while open; retained unchanged through exit motion. */ private lastRenderedSections; private closingSections; componentDidLoad(): void; disconnectedCallback(): void; onOpenChange(isOpen: boolean): void; onAnchorChange(): void; onPositionPropsChange(): void; private get viewportPadPx(); private get sideOffsetPx(); private get alignOffsetPx(); private get popupFallbackWidthPx(); private get popupFallbackHeightPx(); private get closeAnimationMs(); private finishClose; private captureClosingSections; private get resolvedAnchor(); private get anchorFocusTarget(); private focusAnchor; private moveFocusAfterTab; private compositeTabLeavesPopup; private get activeSections(); private get flatItems(); /** Rich preference content is a non-modal dialog, not an ARIA action menu. */ private get hasCompositeSections(); private cancelPositionRetry; private cancelLivePositionUpdate; /** Reposition after the current scroll/layout frame without hiding the open popup. */ private scheduleLivePositionUpdate; /** Retry until anchor + popup exist — do not reveal at 0,0 on a failed first pass. */ private schedulePositionUpdate; /** @returns `true` when anchor and popup were found and `pos` was updated. */ private calculatePosition; /** Focus the selected item when present, otherwise the first enabled item. */ private focusInitialItem; private setupListeners; private teardownListeners; private close; handleKeyDown(e: KeyboardEvent): void; private focusItem; private handleItemClick; private handleSwatchSelect; private handleReorderKey; private emitReorder; private flatIndexFor; private announceReorder; private onReorderPointerDown; private onReorderPointerMove; private onReorderPointerUp; private onReorderPointerCancel; private resolveReorderInsertBefore; private clearReorderPointer; render(): any; } //# sourceMappingURL=Menu.d.ts.map