{"version":3,"file":"forty-cdk-context-menu.mjs","sources":["../../../projects/forty-cdk/context-menu/src/context-menu-context.ts","../../../projects/forty-cdk/context-menu/src/context-menu-defaults.ts","../../../projects/forty-cdk/context-menu/src/context-menu.ts","../../../projects/forty-cdk/context-menu/src/context-menu-trigger.ts","../../../projects/forty-cdk/context-menu/src/forty-cdk-context-menu.ts"],"sourcesContent":["import { computed, inject, InjectionToken, type Signal } from '@angular/core';\n\nimport { unresolvedRootError } from 'forty-cdk/core';\nimport { type MenuActivationModality } from 'forty-cdk/core-overlay';\n\n/**\n * Coordination contract `[forContextMenuTrigger]` resolves from its enclosing\n * `[forContextMenu]` root. It exposes exactly the slice of the root the\n * trigger consumes: open / disabled state, trigger registration (for\n * return-focus on close), the pointer / keyboard virtual-anchor setters, and\n * the open entry point.\n *\n * `ForContextMenu` provides it via `useExisting`, so a subclassed root (the\n * standard design-system wrapping pattern) only has to re-provide tokens —\n * `FOR_MENU_CONTEXT` for items / content and `FOR_CONTEXT_MENU_CONTEXT` for\n * the trigger — never a concrete-class alias.\n */\nexport interface ForContextMenuContext {\n  /**\n   * Whether the menu is currently shown. Read-only at the contract level —\n   * the root backs it with its own `model<boolean>` and writes through its\n   * `openMenu` / `closeMenu` plumbing; the trigger only ever reads.\n   */\n  readonly open: Signal<boolean>;\n\n  /**\n   * When `true`, trigger activations are no-ops and the `contextmenu` event\n   * falls through to the native browser menu.\n   */\n  readonly disabled: Signal<boolean>;\n\n  /**\n   * Id mirrored to the trigger's host `[id]`, adopting a consumer-set static\n   * `id` when present. It is **not** used as the menu's\n   * `aria-labelledby` target — the trigger is the whole right-click region, so\n   * naming the menu after it would announce the region's entire text; name the\n   * menu with `ariaLabel` instead. The id stays exposed as a stable hook for\n   * the consumer's own references and test selectors.\n   */\n  readonly triggerId: Signal<string>;\n\n  /** Registers the trigger element so it receives return-focus on close. */\n  registerTrigger(el: HTMLElement): void;\n\n  /** Unregisters a previously registered trigger element. */\n  unregisterTrigger(el: HTMLElement): void;\n\n  /** Updates the virtual anchor to a 0×0 rect at (`x`, `y`) in viewport coordinates. */\n  setVirtualAnchor(x: number, y: number): void;\n\n  /**\n   * Updates the virtual anchor to a by-value snapshot of `rect`. Used by the\n   * keyboard activators (`Shift+F10`, the `ContextMenu` key) so the menu\n   * floats off the focused element instead of the pointer position.\n   */\n  setVirtualAnchorFromRect(rect: DOMRect): void;\n\n  /**\n   * Opens the menu and sends focus to its first or last enabled item\n   * (default `'first'`). Honours `disabled`. `modality` (default\n   * `'keyboard'`) records how the open was activated: a `'pointer'` open\n   * (right-click / long-press) keeps the programmatic initial focus from\n   * reflecting `data-highlighted`, while a `'keyboard'` open (`Shift+F10`,\n   * the `ContextMenu` key) highlights the focused item.\n   */\n  openMenu(initialFocus?: 'first' | 'last', modality?: MenuActivationModality): void;\n}\n\n/**\n * Token under which `[forContextMenu]` exposes the {@link ForContextMenuContext}\n * surface to its `[forContextMenuTrigger]`. Subclassed roots re-provide it with\n * `{ provide: FOR_CONTEXT_MENU_CONTEXT, useExisting: MySubclass }`.\n */\nexport const FOR_CONTEXT_MENU_CONTEXT = new InjectionToken<ForContextMenuContext>(\n  'FOR_CONTEXT_MENU_CONTEXT',\n);\n\n/**\n * Resolves the trigger's root context: the explicit reference when the\n * `[forContextMenuTrigger]` input carries one, the injected\n * `FOR_CONTEXT_MENU_CONTEXT` otherwise. The orphan error only fires when\n * neither resolves, on first read of the returned signal. Must be called in\n * an injection context.\n */\nexport function injectContextMenuContext(\n  explicitRoot: Signal<ForContextMenuContext | ''>,\n): Signal<ForContextMenuContext> {\n  const injected = inject(FOR_CONTEXT_MENU_CONTEXT, { optional: true });\n  return computed(() => {\n    const explicit = explicitRoot();\n    if (explicit !== '') {\n      return explicit;\n    }\n    if (injected) {\n      return injected;\n    }\n    throw unresolvedRootError({\n      code: 'FORCDK-CONTEXT-MENU-001',\n      trigger: '[forContextMenuTrigger]',\n      root: '[forContextMenu]',\n      token: 'FOR_CONTEXT_MENU_CONTEXT',\n      exportAs: 'forContextMenu',\n    });\n  });\n}\n","import { type Provider } from '@angular/core';\n\nimport { createDefaults } from 'forty-cdk/core';\nimport {\n  type AnchoredPositioningSeedDefaults,\n  type FloatingAlign,\n  type FloatingFallbackAxisSideDirection,\n  type FloatingSide,\n} from 'forty-cdk/core-overlay';\n\n/**\n * Defaults inherited by descendant context menus in the surrounding\n * injector scope. Configure with `provideForContextMenuDefaults` either\n * at the application root or in any component's `providers` array; partial\n * overrides merge with the parent scope.\n */\nexport interface ForContextMenuDefaults extends AnchoredPositioningSeedDefaults {\n  /**\n   * Side the menu is anchored to, relative to the virtual anchor at the\n   * pointer, for context menus that don't override `side` locally. Library\n   * fallback `'bottom'`.\n   */\n  side: FloatingSide;\n  /**\n   * Alignment along the chosen `side` for context menus that don't override\n   * `align` locally. Library fallback `'start'`.\n   */\n  align: FloatingAlign;\n  /**\n   * Distance (px) between the virtual anchor (pointer position) and the\n   * floating content along the resolved `side` axis. Defaults to `0`\n   * since context menus open at the cursor.\n   */\n  sideOffset: number;\n  /**\n   * Padding (px) added to the viewport edges for collision-aware\n   * positioning. Higher values keep the floating content further from\n   * the edge when `flip` / `shift` runs.\n   */\n  collisionPadding: number;\n  /**\n   * Direction `flip` falls back to on the perpendicular axis when both sides\n   * of the preferred axis overflow. `'none'` (default) keeps only the opposite\n   * same-axis placement; `'start'` / `'end'` let a menu clipped on a narrow\n   * viewport drop to a perpendicular side. Only consulted when\n   * `avoidCollisions` is on.\n   */\n  fallbackAxisSideDirection: FloatingFallbackAxisSideDirection;\n}\n\n/**\n * Library fallback for context menu defaults, read at the root injector when no\n * consumer has called `provideForContextMenuDefaults`. Exported for the shared defaults\n * contract spec; not re-exported from the primitive's public entry.\n */\nexport const FOR_CONTEXT_MENU_FALLBACK_DEFAULTS: ForContextMenuDefaults = {\n  side: 'bottom',\n  align: 'start',\n  sideOffset: 0,\n  collisionPadding: 8,\n  fallbackAxisSideDirection: 'none',\n};\n\nconst { token, provideDefaults } = createDefaults<ForContextMenuDefaults>(\n  'FOR_CONTEXT_MENU_DEFAULTS',\n  FOR_CONTEXT_MENU_FALLBACK_DEFAULTS,\n);\n\n/** Token holding the resolved context-menu defaults for the current scope. */\nexport const FOR_CONTEXT_MENU_DEFAULTS = token;\n\n/**\n * Configures forty-cdk context-menu defaults for this injector scope.\n * Partial overrides inherit unspecified keys from the parent scope (or\n * library defaults at the root).\n */\nexport function provideForContextMenuDefaults(\n  defaults: Partial<ForContextMenuDefaults> = {},\n): Provider[] {\n  return provideDefaults(defaults);\n}\n","import { booleanAttribute, Directive, inject, input, model, output, signal } from '@angular/core';\n\nimport {\n  type WritingDirection,\n  injectTextDirection,\n  type VetoableEvent,\n  type VetoableNativeEvent,\n} from 'forty-cdk/core';\nimport {\n  type AnchoredPositioningOverride,\n  type FloatingFallbackAxisSideDirection,\n  createMenuOverlay,\n  MenuOverlayHost,\n  FOR_MENU_CONTEXT,\n  type ForMenuContext,\n} from 'forty-cdk/core-overlay';\nimport { FOR_CONTEXT_MENU_CONTEXT, type ForContextMenuContext } from './context-menu-context';\nimport { FOR_CONTEXT_MENU_DEFAULTS } from './context-menu-defaults';\n\n/**\n * Headless implementation of a right-click / `Shift+F10` menu (variant of\n * the [WAI-ARIA Menu pattern](https://www.w3.org/WAI/ARIA/apg/patterns/menubar/)).\n * Apply on a wrapper that contains a `[forContextMenuTrigger]` and an\n * `@if`-mounted `[forMenuContent]`.\n *\n * The menu is positioned at the pointer location at the time of the\n * `contextmenu` event — implemented via floating-ui's virtual element so\n * placement / flip / shift middleware still apply normally. Selecting an\n * item, Escape, or any outside interaction closes.\n *\n * ```html\n * <div forContextMenu [(open)]=\"open\">\n *   <div forContextMenuTrigger class=\"region\">Right-click here</div>\n *   @if (open()) {\n *     <div forMenuContent>…</div>\n *   }\n * </div>\n * ```\n *\n * Most of the directive's body (id generation, item collection, typeahead,\n * navigate / focus helpers, escape / outside-click veto plumbing) is owned\n * by the shared `_internal/menu-overlay` helper. The directive contributes\n * the inputs / outputs / model that make up the public surface, the\n * pointer-driven `VirtualElement` anchor (`setVirtualAnchor` /\n * `setVirtualAnchorFromRect`), and the contextmenu-specific dismissible\n * semantics (no exemption — a left-click on the right-click region while\n * the menu is open should close it).\n */\n@Directive({\n  selector: '[forContextMenu]',\n  exportAs: 'forContextMenu',\n  host: {\n    '[attr.data-state]': 'open() ? \"open\" : \"closed\"',\n    '[attr.data-disabled]': 'disabled() ? \"\" : null',\n    '[attr.dir]': 'dir()',\n  },\n  providers: [\n    { provide: FOR_MENU_CONTEXT, useExisting: ForContextMenu },\n    { provide: FOR_CONTEXT_MENU_CONTEXT, useExisting: ForContextMenu },\n  ],\n})\nexport class ForContextMenu\n  extends MenuOverlayHost\n  implements ForMenuContext, ForContextMenuContext\n{\n  protected readonly positioningDefaults = inject(FOR_CONTEXT_MENU_DEFAULTS);\n\n  /**\n   * Two-way bindable. Whether the menu is currently shown. The `model()` change emitter fires only\n   * when the primitive itself opens or closes the menu, never on consumer writes through\n   * `[(open)]`.\n   */\n  readonly open = model<boolean>(false);\n\n  /**\n   * Direction `flip` falls back to on the perpendicular axis when both sides of\n   * the preferred axis overflow. `'none'` (default) keeps only the opposite\n   * same-axis placement; `'start'` / `'end'` let the menu drop to a\n   * perpendicular side on a narrow viewport. Only consulted when\n   * `avoidCollisions` is on. The default is read from\n   * `provideForContextMenuDefaults` for the surrounding scope, since dropping to\n   * a perpendicular side is a design-system-wide viewport-degradation policy\n   * rather than a per-menu one.\n   */\n  readonly fallbackAxisSideDirection = input<FloatingFallbackAxisSideDirection>(\n    this.positioningDefaults.fallbackAxisSideDirection,\n  );\n\n  /**\n   * When `true` (default), arrow-key navigation wraps from the last enabled\n   * item back to the first (and vice versa). When `false`, navigation stops\n   * at the ends.\n   */\n  readonly loop = input(true, { transform: booleanAttribute });\n\n  /**\n   * Writing direction. Drives ArrowLeft / ArrowRight semantics on submenu\n   * triggers and items underneath this menu (in RTL, ArrowLeft opens a submenu\n   * and ArrowRight closes it back). When unset (default `null`), the inherited\n   * ambient direction is resolved from the nearest ancestor carrying a `dir`\n   * attribute (or `<html dir>`), defaulting to `'ltr'`. An explicit `[dir]`\n   * always wins, the resolved value is reflected to the host `dir` attribute,\n   * and it is inherited by descendant submenus.\n   */\n  readonly _dirInput = input<WritingDirection | null>(null, { alias: 'dir' });\n  readonly dir = injectTextDirection(this._dirInput);\n\n  /**\n   * When true, the contextmenu event is allowed to fall through to the\n   * native browser menu. Useful for letting the OS-provided context menu\n   * appear on certain regions while keeping the directive mounted.\n   */\n  readonly disabled = input(false, { transform: booleanAttribute });\n\n  /** When true (default), Escape, pointer-down outside, and focus outside close the menu. */\n  readonly dismissible = input(true, { transform: booleanAttribute });\n\n  /** When true (default), focus returns to the right-click target on close. */\n  readonly returnFocus = input(true, { transform: booleanAttribute });\n\n  /**\n   * Accessible name reflected as `aria-label` on `[forMenuContent]`. This is\n   * the only name hook the root exposes for a context menu: the right-click\n   * region is never used as an `aria-labelledby` target, so with no\n   * `ariaLabel` (and no consumer-set static `aria-labelledby` on the content)\n   * the surface exposes no accessible name at all.\n   */\n  readonly ariaLabel = input<string | null>(null);\n\n  /**\n   * Fires when Escape is pressed while the menu is open, just before it\n   * closes. Call `preventDefault()` on the emitted veto to keep the menu\n   * open and suppress the Escape-driven close.\n   */\n  readonly escapeKeyDown = output<VetoableNativeEvent<KeyboardEvent>>();\n\n  /**\n   * Fires on a pointer-down outside the menu, just before it closes. Call\n   * `preventDefault()` on the veto to keep the menu open.\n   */\n  readonly pointerDownOutside = output<VetoableNativeEvent<PointerEvent>>();\n\n  /**\n   * Fires when focus moves outside the menu, just before it closes. Call\n   * `preventDefault()` on the veto to keep the menu open.\n   */\n  readonly focusOutside = output<VetoableNativeEvent<FocusEvent>>();\n\n  /**\n   * Composite outside-interaction channel: fires for either a\n   * pointer-down-outside or a focus-outside, just before the menu closes.\n   * Call `preventDefault()` on the veto to keep the menu open regardless of\n   * which interaction triggered it.\n   */\n  readonly interactOutside = output<VetoableNativeEvent<PointerEvent | FocusEvent>>();\n\n  /**\n   * Fires just before the menu sends focus to its first / last enabled\n   * item on mount. Call `preventDefault()` on the emitted veto to skip\n   * the imperative focus move.\n   */\n  readonly autoFocusOnOpen = output<VetoableEvent>();\n\n  /**\n   * Fires just before focus returns to the trigger on unmount. Call\n   * `preventDefault()` on the veto to suppress the return-focus.\n   */\n  readonly autoFocusOnClose = output<VetoableEvent>();\n\n  protected readonly _overlay = createMenuOverlay('for-context-menu', {\n    open: this.open,\n    disabled: this.disabled,\n    dismissible: this.dismissible,\n    loop: this.loop,\n    escapeKeyDown: this.escapeKeyDown,\n    pointerDownOutside: this.pointerDownOutside,\n    focusOutside: this.focusOutside,\n    interactOutside: this.interactOutside,\n    autoFocusOnOpen: this.autoFocusOnOpen,\n    autoFocusOnClose: this.autoFocusOnClose,\n  });\n\n  /**\n   * Virtual-anchor only: a context menu with no recorded pointer / rect position\n   * stays unanchored rather than falling back to its whole right-click region.\n   */\n  readonly anchor = this._overlay.openerVirtualAnchor;\n\n  /**\n   * The region's own `[menuPositioning]` override, resolved by the base ahead\n   * of this root's `[side]` / `[align]` / `[sideOffset]` / `[alignOffset]`. It\n   * runs through the opener registry so a trigger carries the same override\n   * here as it does under a shared `[forMenu]` root; with no override the four\n   * values are this root's inputs verbatim.\n   */\n  protected override positioningOverride(): AnchoredPositioningOverride | null {\n    return this._overlay.openerPositioning();\n  }\n\n  /**\n   * ContextMenu exempts nothing — a left-click on the right-click region\n   * while the menu is open should close it like any other outside click. The\n   * right-click region registers without asking for an exemption, so the shared\n   * opener registry resolves this to an empty list rather than a second source.\n   */\n  readonly dismissibleExemptions = this._overlay.openerExemptions;\n\n  /**\n   * The right-click region is not a labelling element, so `[forMenuContent]`\n   * emits no `aria-labelledby` fallback for this flavor — pointing the menu's\n   * name at the region would announce its entire text. Name the menu with\n   * `[ariaLabel]` instead.\n   *\n   * Constant: this root's only opener flavour is the region, so unlike\n   * `[forMenu]` it has nothing to resolve per opener.\n   */\n  readonly triggerLabelsMenu = signal(false).asReadonly();\n\n  /** Top-level: no parent menu. */\n  readonly parentMenu = null;\n\n  /**\n   * Updates the virtual anchor to a 0×0 rect at (`x`, `y`) in viewport\n   * coordinates. Widens the shared base's protected pass-through to the public\n   * `ForContextMenuContext` member `[forContextMenuTrigger]` calls.\n   */\n  override setVirtualAnchor(x: number, y: number): void {\n    super.setVirtualAnchor(x, y);\n  }\n\n  /**\n   * Updates the virtual anchor to a snapshot of `rect`. Used by the keyboard\n   * activators (`Shift+F10`, `ContextMenu` key) so the menu floats off the\n   * focused element instead of the pointer position. The rect is captured\n   * by value, so subsequent layout changes don't shift the anchor.\n   */\n  override setVirtualAnchorFromRect(rect: DOMRect): void {\n    super.setVirtualAnchorFromRect(rect);\n  }\n}\n","import {\n  booleanAttribute,\n  computed,\n  DestroyRef,\n  Directive,\n  DOCUMENT,\n  effect,\n  ElementRef,\n  inject,\n  input,\n} from '@angular/core';\n\nimport { hostId } from 'forty-cdk/core';\nimport {\n  asMenuOpenerRegistration,\n  createDebouncedAction,\n  type DebouncedAction,\n  type MenuOpenerPositioning,\n} from 'forty-cdk/core-overlay';\nimport { type ForContextMenuContext, injectContextMenuContext } from './context-menu-context';\n\nconst LONG_PRESS_DELAY_MS = 500;\nconst LONG_PRESS_MOVE_TOLERANCE_PX = 10;\n\n/**\n * Region that opens its parent `[forContextMenu]` on the `contextmenu` event\n * (right-click / long-press on touch) and on the keyboard equivalents\n * `Shift+F10` and the dedicated `ContextMenu` key. Pointer activations are\n * anchored at the cursor; keyboard activations are anchored at the bounding\n * rect of the focused element, so screen-reader / keyboard-only users get\n * the menu next to whatever they're working on. The native context menu is\n * suppressed via `event.preventDefault()`.\n *\n * A pointer activation skips `data-highlighted` on the initially focused item;\n * a keyboard activation highlights it.\n *\n * On touch the directive runs its own long-press timer: a `touch` `pointerdown`\n * held for ~500ms — without lifting or moving past a small tolerance — opens\n * the menu at the touch point, anchored like a right-click. Where the browser\n * synthesizes `contextmenu` for a long-press the two paths are mutually\n * exclusive, so the menu opens exactly once. Suppress the native iOS callout\n * and text selection on the trigger with CSS\n * (`-webkit-touch-callout: none; user-select: none;`) — otherwise the OS\n * gesture fires `pointercancel` and cancels the press.\n *\n * Apply on any element. A default `tabindex=\"-1\"` is host-bound so the trigger\n * can receive programmatic focus and return-focus works on close; set your own\n * `tabindex` (e.g. `tabindex=\"0\"` to put it in the Tab order) and it wins. The\n * keyboard activators need the trigger — or something inside it — focusable.\n *\n * The root is normally resolved via DI from the enclosing `[forContextMenu]`.\n * When the trigger is declared inside an `ng-template` stamped into the root\n * (e.g. via `ngTemplateOutlet`), DI resolves at the template's declaration\n * site and misses the root — pass it explicitly through the selector input,\n * `routerLink`-style: `[forContextMenuTrigger]=\"root\"` with\n * `#root=\"forContextMenu\"`.\n *\n * The host carries a generated `id`, adopting a consumer-set static one. No\n * ARIA wiring consumes it — the menu is named with `ariaLabel`, not\n * `aria-labelledby` — so it serves as a stable consumer and test hook.\n *\n * Disabling merges the trigger's own `disabled` input with the root's. When\n * disabled, only `data-disabled` is reflected: the trigger is a generic region\n * with no interactive ARIA role, so it emits neither the native `disabled`\n * attribute nor `aria-disabled`, and the native browser menu shows through.\n */\n@Directive({\n  selector: '[forContextMenuTrigger]',\n  exportAs: 'forContextMenuTrigger',\n  host: {\n    tabindex: '-1',\n    '[id]': 'id()',\n    '[attr.data-state]': 'ctx().open() ? \"open\" : \"closed\"',\n    '[attr.data-disabled]': 'effectiveDisabled() ? \"\" : null',\n    '(pointerdown)': 'onPointerDown($event)',\n    '(pointermove)': 'onPointerMove($event)',\n    '(pointerup)': 'onPointerRelease()',\n    '(pointercancel)': 'onPointerRelease()',\n    '(contextmenu)': 'onContextMenu($event)',\n    '(keydown)': 'onKeyDown($event)',\n  },\n})\nexport class ForContextMenuTrigger {\n  readonly #host = inject<ElementRef<HTMLElement>>(ElementRef);\n  readonly #document = inject(DOCUMENT);\n  #pointerActivation = false;\n  #longPressOpened = false;\n  #pressX = 0;\n  #pressY = 0;\n  readonly #longPress: DebouncedAction = createDebouncedAction(() => this.#onLongPress());\n\n  /**\n   * The region's own aria-wiring id, adopting a consumer-set static `id`. It is\n   * per-opener rather than per-root so a menu shared by several openers\n   * (`[forMenu]`) never emits the same `id` twice. The region is not a labelling\n   * control, so the trigger registers as one that must not name the surface — a\n   * menu it opened emits no `aria-labelledby` even when a sibling button opener\n   * would have.\n   */\n  readonly id = hostId('for-context-menu-trigger');\n\n  /**\n   * Optional explicit reference to the `[forContextMenu]` root, named after\n   * the selector `routerLink`-style. The bare valueless attribute keeps\n   * resolving the enclosing root via DI; pass the root explicitly\n   * (`[forContextMenuTrigger]=\"root\"`, with `#root=\"forContextMenu\"`) when\n   * the trigger is declared in an `ng-template` stamped inside the root —\n   * DI resolves at the template's declaration site, so the enclosing root\n   * is invisible there. The empty string (what the valueless attribute\n   * yields) is treated as unset.\n   */\n  readonly forContextMenuTrigger = input<ForContextMenuContext | ''>('');\n\n  protected readonly ctx = injectContextMenuContext(this.forContextMenuTrigger);\n\n  readonly #openerRegistration = computed(() => asMenuOpenerRegistration(this.ctx()));\n\n  /** Disables this trigger only, in addition to the root's `disabled`. */\n  readonly disabled = input(false, { transform: booleanAttribute });\n\n  /**\n   * Placement override for the opens this region drives, falling back to the\n   * root's inputs for every key it leaves out. Only the four placement values\n   * are overridable (`side`, `align`, `sideOffset`, `alignOffset`); the rest of\n   * the positioning surface is collision policy the root owns.\n   *\n   * It exists for a menu shared by heterogeneous openers, where one root cannot\n   * pick offsets that suit them all — a pointer-anchored region wants to sit\n   * flush at the cursor, where a sibling button opener wants a few pixels of\n   * clearance:\n   *\n   * ```html\n   * <td [forContextMenuTrigger]=\"row\" [menuPositioning]=\"{ sideOffset: 0 }\">…</td>\n   * ```\n   *\n   * It resolves identically under a `[forContextMenu]` root, where it is simply\n   * a per-trigger spelling of the root's own inputs.\n   */\n  readonly menuPositioning = input<MenuOpenerPositioning | null>(null);\n\n  /** Whether the trigger is disabled — its own `disabled` input OR the root's. */\n  readonly effectiveDisabled = computed(() => this.disabled() || this.ctx().disabled());\n\n  constructor() {\n    const el = this.#host.nativeElement;\n    // Registration is an imperative call into the resolved root's registry,\n    // not state derivation — the effect only re-registers the element when\n    // the resolved root changes (explicit reference swapped at runtime).\n    effect((onCleanup) => {\n      const ctx = this.ctx();\n      const openers = this.#openerRegistration();\n      if (openers === null) {\n        ctx.registerTrigger(el);\n        onCleanup(() => ctx.unregisterTrigger(el));\n        return;\n      }\n      openers.registerOpener(el, {\n        id: this.id,\n        labelsMenu: false,\n        positioning: this.menuPositioning,\n      });\n      onCleanup(() => openers.unregisterOpener(el));\n    });\n    inject(DestroyRef).onDestroy(() => this.#longPress.cancel());\n  }\n\n  protected onPointerDown(event: PointerEvent): void {\n    this.#pointerActivation = true;\n    this.#longPressOpened = false;\n    this.#longPress.cancel();\n    if (event.pointerType !== 'touch' || this.effectiveDisabled()) {\n      return;\n    }\n    this.#pressX = event.clientX;\n    this.#pressY = event.clientY;\n    this.#longPress.schedule(LONG_PRESS_DELAY_MS);\n  }\n\n  protected onPointerMove(event: PointerEvent): void {\n    if (!this.#longPress.isPending()) {\n      return;\n    }\n    const dx = event.clientX - this.#pressX;\n    const dy = event.clientY - this.#pressY;\n    if (dx * dx + dy * dy > LONG_PRESS_MOVE_TOLERANCE_PX * LONG_PRESS_MOVE_TOLERANCE_PX) {\n      this.#longPress.cancel();\n    }\n  }\n\n  protected onPointerRelease(): void {\n    this.#longPress.cancel();\n  }\n\n  protected onContextMenu(event: MouseEvent): void {\n    this.#longPress.cancel();\n    const longPressOpened = this.#longPressOpened;\n    this.#longPressOpened = false;\n    const pointerActivation = this.#pointerActivation;\n    this.#pointerActivation = false;\n    if (this.effectiveDisabled()) {\n      // Let the native browser menu show.\n      return;\n    }\n    event.preventDefault();\n    if (longPressOpened) {\n      return;\n    }\n    if (pointerActivation) {\n      this.#activate();\n      this.ctx().setVirtualAnchor(event.clientX, event.clientY);\n      this.ctx().openMenu('first', 'pointer');\n      return;\n    }\n    if (this.ctx().open()) {\n      return;\n    }\n    this.#openFromFocusedRect();\n  }\n\n  protected onKeyDown(event: KeyboardEvent): void {\n    this.#pointerActivation = false;\n    if (this.effectiveDisabled()) {\n      return;\n    }\n    const isShiftF10 = event.key === 'F10' && event.shiftKey;\n    const isContextMenuKey = event.key === 'ContextMenu';\n    if (!isShiftF10 && !isContextMenuKey) {\n      return;\n    }\n    // Stop the browser from opening its own context menu on top of ours.\n    event.preventDefault();\n    this.#openFromFocusedRect();\n  }\n\n  #onLongPress(): void {\n    if (this.effectiveDisabled() || this.ctx().open()) {\n      return;\n    }\n    this.#longPressOpened = true;\n    this.#activate();\n    this.ctx().setVirtualAnchor(this.#pressX, this.#pressY);\n    this.ctx().openMenu('first', 'pointer');\n  }\n\n  #openFromFocusedRect(): void {\n    const trigger = this.#host.nativeElement;\n    const focused = this.#document.activeElement as HTMLElement | null;\n    // Anchor at the focused element when it lives inside the trigger; fall\n    // back to the trigger itself otherwise (e.g. focus is on the trigger).\n    const anchorEl = focused && trigger.contains(focused) ? focused : trigger;\n    this.#activate();\n    this.ctx().setVirtualAnchorFromRect(anchorEl.getBoundingClientRect());\n    this.ctx().openMenu('first');\n  }\n\n  #activate(): void {\n    this.#openerRegistration()?.activateOpener(this.#host.nativeElement);\n  }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;AAoEA;;;;AAIG;MACU,wBAAwB,GAAG,IAAI,cAAc,CACxD,0BAA0B;AAG5B;;;;;;AAMG;AACG,SAAU,wBAAwB,CACtC,YAAgD,EAAA;AAEhD,IAAA,MAAM,QAAQ,GAAG,MAAM,CAAC,wBAAwB,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IACrE,OAAO,QAAQ,CAAC,MAAK;AACnB,QAAA,MAAM,QAAQ,GAAG,YAAY,EAAE;AAC/B,QAAA,IAAI,QAAQ,KAAK,EAAE,EAAE;AACnB,YAAA,OAAO,QAAQ;QACjB;QACA,IAAI,QAAQ,EAAE;A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