{"version":3,"file":"ng-primitives-preview-card.mjs","sources":["../../../../packages/ng-primitives/preview-card/src/config/preview-card-config.ts","../../../../packages/ng-primitives/preview-card/src/preview-card-trigger/preview-card-trigger-state.ts","../../../../packages/ng-primitives/preview-card/src/preview-card-trigger/preview-card-trigger.ts","../../../../packages/ng-primitives/preview-card/src/preview-card/preview-card-state.ts","../../../../packages/ng-primitives/preview-card/src/preview-card/preview-card.ts","../../../../packages/ng-primitives/preview-card/src/preview-card-arrow/preview-card-arrow-state.ts","../../../../packages/ng-primitives/preview-card/src/preview-card-arrow/preview-card-arrow.ts","../../../../packages/ng-primitives/preview-card/src/ng-primitives-preview-card.ts"],"sourcesContent":["import { InjectionToken, Provider, inject } from '@angular/core';\nimport { NgpFlip, NgpOffset, NgpShift } from 'ng-primitives/portal';\nimport type { NgpPreviewCardPlacement } from '../preview-card-trigger/preview-card-trigger-state';\n\nexport interface NgpPreviewCardConfig {\n  /**\n   * Define the placement of the preview card relative to the trigger.\n   * @default 'bottom'\n   */\n  placement: NgpPreviewCardPlacement;\n\n  /**\n   * Define the offset of the preview card relative to the trigger.\n   * Can be a number (applies to mainAxis) or an object with mainAxis, crossAxis, and alignmentAxis.\n   * @default 4\n   */\n  offset: NgpOffset;\n\n  /**\n   * Define the delay before the preview card is shown. This is deliberately long so\n   * that cards do not appear while the pointer travels across a page full of links.\n   * @default 600\n   */\n  showDelay: number;\n\n  /**\n   * Define the delay before the preview card is hidden.\n   * @default 300\n   */\n  hideDelay: number;\n\n  /**\n   * Define whether the preview card should flip when there is not enough space.\n   * Can be a boolean to enable/disable, or an object with padding and fallbackPlacements options.\n   * @default true\n   */\n  flip: NgpFlip;\n\n  /**\n   * Configure shift behavior to keep the preview card in view.\n   * Can be a boolean to enable/disable, or an object with padding and limiter options.\n   * @default undefined (enabled by default in overlay)\n   */\n  shift: NgpShift;\n\n  /**\n   * Define the container element or selector into which the preview card should be attached.\n   * @default 'body'\n   */\n  container: HTMLElement | string | null;\n\n  /**\n   * Defines how the preview card behaves when the window is scrolled.\n   * @default 'reposition'\n   */\n  scrollBehavior: 'reposition' | 'close';\n\n  /**\n   * Cooldown duration in milliseconds.\n   * When moving from one preview card to another within this duration,\n   * the showDelay is skipped for the new card.\n   * @default 300\n   */\n  cooldown: number;\n}\n\nexport const defaultPreviewCardConfig: NgpPreviewCardConfig = {\n  placement: 'bottom',\n  offset: 4,\n  showDelay: 600,\n  hideDelay: 300,\n  flip: true,\n  shift: undefined,\n  container: 'body',\n  scrollBehavior: 'reposition',\n  cooldown: 300,\n};\n\nexport const NgpPreviewCardConfigToken = new InjectionToken<NgpPreviewCardConfig>(\n  'NgpPreviewCardConfigToken',\n);\n\n/**\n * Provide the default PreviewCard configuration\n * @param config The PreviewCard configuration\n * @returns The provider\n */\nexport function providePreviewCardConfig(config: Partial<NgpPreviewCardConfig>): Provider[] {\n  return [\n    {\n      provide: NgpPreviewCardConfigToken,\n      useValue: { ...defaultPreviewCardConfig, ...config },\n    },\n  ];\n}\n\n/**\n * Inject the PreviewCard configuration\n * @returns The global PreviewCard configuration\n */\nexport function injectPreviewCardConfig(): NgpPreviewCardConfig {\n  return inject(NgpPreviewCardConfigToken, { optional: true }) ?? defaultPreviewCardConfig;\n}\n","import { FocusMonitor } from '@angular/cdk/a11y';\nimport { computed, inject, Injector, signal, Signal, ViewContainerRef } from '@angular/core';\nimport { createHoverBridge, injectElementRef } from 'ng-primitives/internal';\nimport {\n  createOverlay,\n  NgpFlip,\n  NgpOffset,\n  NgpOverlay,\n  NgpOverlayConfig,\n  NgpOverlayContent,\n  NgpShift,\n} from 'ng-primitives/portal';\nimport {\n  controlled,\n  createPrimitive,\n  dataBinding,\n  listener,\n  onDestroy,\n  StateInjectionOptions,\n} from 'ng-primitives/state';\nimport { safeTakeUntilDestroyed } from 'ng-primitives/utils';\n\nexport interface NgpPreviewCardTriggerState<T> {\n  /**\n   * The content rendered inside the preview card. Readonly so that the content has a\n   * single mutation path - use `setPreviewCard`.\n   */\n  readonly previewCard: Signal<NgpOverlayContent<T> | undefined>;\n  /**\n   * The container the preview card is attached to. Readonly - use `setContainer`.\n   * @default document.body\n   */\n  readonly container: Signal<HTMLElement | string | null>;\n  /** Whether the preview card is currently open. */\n  readonly open: Signal<boolean>;\n  /**\n   * Set the content rendered inside the preview card. This is how a reusable component\n   * wires its own card component into the trigger. Takes effect the next time the card\n   * is shown; it does not swap the content of a card that is already visible.\n   * @param content - The template or component to render\n   */\n  setPreviewCard: (content: NgpOverlayContent<T> | undefined) => void;\n  /**\n   * Set the container the preview card is attached to. Takes effect the next time the\n   * card is shown; it does not move a card that is already visible.\n   * @param container - The new container\n   */\n  setContainer: (container: HTMLElement | string | null) => void;\n  /** Show the preview card. */\n  show: () => void;\n  /** Hide the preview card. */\n  hide: () => void;\n  /**\n   * Called by the preview card as the pointer enters and leaves it, so the trigger can\n   * keep the card open while the pointer is inside it.\n   * @internal\n   */\n  setPointerOverCard: (isOver: boolean) => void;\n  /**\n   * Called by the preview card when focus leaves it.\n   * @internal\n   */\n  onCardFocusOut: (next: EventTarget | null) => void;\n}\n\nexport interface NgpPreviewCardTriggerProps<T> {\n  /** Access the preview card template ref. */\n  readonly previewCard?: Signal<NgpOverlayContent<T> | undefined>;\n  /**\n   * Whether the preview card is disabled. This allows the preview card to be enabled or disabled dynamically.\n   * @default false\n   */\n  readonly disabled?: Signal<boolean>;\n  /**\n   * Define the placement of the preview card relative to the trigger.\n   * @default 'bottom'\n   */\n  readonly placement?: Signal<NgpPreviewCardPlacement>;\n  /**\n   * Define the offset of the preview card relative to the trigger.\n   * Can be a number (applies to mainAxis) or an object with mainAxis, crossAxis, and alignmentAxis.\n   * @default 4\n   */\n  readonly offset?: Signal<NgpOffset>;\n  /**\n   * Define the delay before the preview card is displayed.\n   * @default 600\n   */\n  readonly showDelay?: Signal<number>;\n  /**\n   * Define the delay before the preview card is hidden.\n   * @default 300\n   */\n  readonly hideDelay?: Signal<number>;\n  /**\n   * Define whether the preview card should flip when there is not enough space.\n   * Can be a boolean to enable/disable, or an object with padding and fallbackPlacements options.\n   * @default true\n   */\n  readonly flip?: Signal<NgpFlip>;\n  /**\n   * Configure shift behavior to keep the preview card in view.\n   * Can be a boolean to enable/disable, or an object with padding and limiter options.\n   * @default undefined (enabled by default in overlay)\n   */\n  readonly shift?: Signal<NgpShift>;\n  /**\n   * Define the container in which the preview card should be attached.\n   * @default document.body\n   */\n  readonly container?: Signal<HTMLElement | string | null>;\n  /**\n   * Define an anchor element for positioning the preview card.\n   * If provided, the preview card will be positioned relative to this element instead of the trigger.\n   */\n  readonly anchor?: Signal<HTMLElement | null>;\n  /**\n   * Provide context to the preview card. This can be used to pass data to the preview card content.\n   */\n  readonly context?: Signal<T | undefined>;\n  /**\n   * Defines how the preview card behaves when the window is scrolled.\n   * @default 'reposition'\n   */\n  readonly scrollBehavior?: Signal<'reposition' | 'close'>;\n  /**\n   * Define the cooldown duration in milliseconds.\n   * When moving from one preview card to another within this duration,\n   * the showDelay is skipped for the new card.\n   * @default 300\n   */\n  readonly cooldown?: Signal<number>;\n  /** Callback fired when the open state changes. */\n  readonly onOpenChange?: (value: boolean) => void;\n}\n\nexport const [\n  NgpPreviewCardTriggerStateToken,\n  ngpPreviewCardTrigger,\n  _injectPreviewCardTriggerState,\n  providePreviewCardTriggerState,\n] = createPrimitive(\n  'NgpPreviewCardTrigger',\n  <T>({\n    previewCard: _previewCard = signal<NgpOverlayContent<T> | undefined>(undefined),\n    disabled = signal<boolean>(false),\n    placement = signal<NgpPreviewCardPlacement>('bottom'),\n    offset = signal<NgpOffset>(4),\n    showDelay = signal<number>(600),\n    hideDelay = signal<number>(300),\n    flip = signal<NgpFlip>(true),\n    shift = signal<NgpShift>(undefined),\n    container: _container,\n    anchor = signal<HTMLElement | null>(null),\n    context = signal<T | undefined>(undefined),\n    scrollBehavior = signal<'reposition' | 'close'>('reposition'),\n    cooldown = signal<number>(300),\n    onOpenChange,\n  }: NgpPreviewCardTriggerProps<T>): NgpPreviewCardTriggerState<T> => {\n    const elementRef = injectElementRef<HTMLElement>();\n    const viewContainerRef = inject(ViewContainerRef);\n    const injector = inject(Injector);\n    const focusMonitor = inject(FocusMonitor);\n\n    const previewCard = controlled(_previewCard);\n    const container = controlled(_container, 'body');\n\n    const overlay = signal<NgpOverlay<T> | null>(null);\n    const open = computed(() => overlay()?.isOpen() ?? false);\n\n    // The overlay tears itself down on the trigger's DestroyRef, and that teardown runs\n    // its close callback. Emitting `openChange` at that point is meaningless - nobody\n    // listens to a destroyed directive - and Angular warns (NG0953). This hook is\n    // registered while the state is created, whereas the overlay registers its own when\n    // it is first shown, so this one always runs first.\n    let destroyed = false;\n    onDestroy(() => {\n      destroyed = true;\n      // Unsubscribing does not remove the element from FocusMonitor's registry, so the\n      // element info and its root-node listeners have to be released explicitly.\n      focusMonitor.stopMonitoring(elementRef.nativeElement);\n    });\n\n    // Two show() calls inside the show delay both settle when that single open\n    // completes, so track what has been announced rather than what was open per call.\n    let announcedOpen = false;\n\n    const triggerHovered = signal<boolean>(false);\n    const cardHovered = signal<boolean>(false);\n\n    // Hoverable content is inherent to a preview card - the point of the pattern is\n    // to move into the card and read or click through it. The shared safe-polygon\n    // bridge keeps the card open while the pointer crosses the gap between the\n    // trigger and the card, and closes it promptly once the pointer leaves that\n    // corridor rather than lingering for the full hide delay.\n    const hoverBridge = createHoverBridge({\n      isPointerInAnchor: () => triggerHovered() || cardHovered(),\n      close: () => hide(),\n    });\n\n    // Host bindings.\n    //\n    // A preview card is deliberately invisible to assistive technology: the content\n    // carries no role and is not linked to the trigger, and the trigger gets no\n    // aria-expanded/aria-haspopup/aria-controls/aria-describedby. Announcing a rich,\n    // interactive card as a link's *description* is worse than silence, and\n    // aria-expanded would advertise a disclosure that cannot be operated by\n    // keyboard. Only data attributes are exposed, for styling.\n    dataBinding(elementRef, 'data-open', open);\n    dataBinding(elementRef, 'data-placement', placement);\n    dataBinding(elementRef, 'data-disabled', disabled);\n\n    // Event listeners\n    listener(elementRef, 'pointerenter', onPointerEnter);\n    listener(elementRef, 'pointerleave', onPointerLeave);\n    listener(elementRef, 'focusout', event => onFocusOut(event.relatedTarget));\n\n    // Focus is how a sighted keyboard user reaches a preview card - without it they\n    // get nothing at all. Only keyboard focus opens it, though: a tap on a touch\n    // device focuses the link too, and a pointer press that focuses the trigger\n    // would re-open a card the user has just dismissed. Deriving this from\n    // FocusMonitor's origin covers both without preventing default on touchstart.\n    focusMonitor\n      .monitor(elementRef.nativeElement)\n      .pipe(safeTakeUntilDestroyed())\n      .subscribe(origin => {\n        if (origin === 'keyboard') {\n          show();\n        }\n      });\n\n    /**\n     * Touch has no hover state, so a tap would otherwise reveal a card over the\n     * page the user is navigating to. Ignore touch pointers entirely.\n     */\n    function isTouch(event: PointerEvent): boolean {\n      return event.pointerType === 'touch';\n    }\n\n    function onPointerEnter(event: PointerEvent): void {\n      if (isTouch(event)) {\n        return;\n      }\n\n      triggerHovered.set(true);\n      hoverBridge.clear();\n      show();\n    }\n\n    function onPointerLeave(event: PointerEvent): void {\n      if (isTouch(event)) {\n        return;\n      }\n\n      triggerHovered.set(false);\n\n      const cardElement = overlay()?.getElements()[0];\n\n      if (!cardElement) {\n        hide();\n        return;\n      }\n\n      // Build a corridor from where the pointer left the trigger toward the card. If\n      // one can't be built (e.g. the card is not positioned yet) fall back to\n      // closing, so the card can never be stranded open.\n      const started = hoverBridge.track({\n        triggerRect: elementRef.nativeElement.getBoundingClientRect(),\n        targetRect: cardElement.getBoundingClientRect(),\n        exitPoint: { x: event.clientX, y: event.clientY },\n      });\n\n      if (!started) {\n        hide();\n        return;\n      }\n\n      overlay()?.cancelPendingClose();\n    }\n\n    /**\n     * Close when focus lands outside both the trigger and the card.\n     *\n     * The card root is out of the tab sequence but anything focusable inside it stays\n     * reachable, so tabbing into the card must not tear it out from under the user.\n     * Serves the trigger's own focusout and, forwarded by the card, focus leaving the\n     * card - which is portalled outside the trigger so its events never reach here.\n     */\n    function onFocusOut(next: EventTarget | null): void {\n      if (next instanceof Node && isInsidePreviewCard(next)) {\n        return;\n      }\n\n      hide();\n    }\n\n    /** Whether a node is the trigger, the card, or inside either of them. */\n    function isInsidePreviewCard(node: Node): boolean {\n      if (elementRef.nativeElement.contains(node)) {\n        return true;\n      }\n\n      return (\n        overlay()\n          ?.getElements()\n          .some(element => element.contains(node)) ?? false\n      );\n    }\n\n    /**\n     * Called by the preview card as the pointer enters and leaves it.\n     * @internal\n     */\n    function setPointerOverCard(isOver: boolean): void {\n      cardHovered.set(isOver);\n\n      if (isOver) {\n        // The pointer made it across, so the corridor has done its job.\n        hoverBridge.clear();\n        overlay()?.cancelPendingClose();\n        return;\n      }\n\n      if (!triggerHovered()) {\n        hide();\n      }\n    }\n\n    function show(): void {\n      if (disabled()) {\n        return;\n      }\n\n      // Create the overlay if it doesn't exist yet\n      if (!overlay()) {\n        if (!previewCard()) {\n          if (ngDevMode) {\n            console.error(\n              '[ngpPreviewCardTrigger]: Preview card must be a TemplateRef or a ComponentType.',\n            );\n          }\n\n          // Hover and keyboard focus reach show() on their own, so throwing here would\n          // fire on interaction - and from the focus subscription it would tear that\n          // subscription down, leaving the trigger permanently inert.\n          return;\n        }\n\n        createOverlayInstance();\n      }\n\n      // Only announce an open that actually happened, and only once. show() is reached\n      // from both the pointer and the focus path, so two calls can be waiting on the\n      // same scheduled open - and it may be cancelled before it ever appears.\n      overlay()\n        ?.show()\n        .then(() => {\n          if (open() && !announcedOpen) {\n            announcedOpen = true;\n            onOpenChange?.(true);\n          }\n        });\n    }\n\n    function hide(): void {\n      hoverBridge.clear();\n      overlay()?.hide();\n    }\n\n    function setContainer(newContainer: HTMLElement | string | null): void {\n      container.set(newContainer);\n    }\n\n    function setPreviewCard(content: NgpOverlayContent<T> | undefined): void {\n      previewCard.set(content);\n    }\n\n    function createOverlayInstance(): void {\n      const config: NgpOverlayConfig<T> = {\n        content: previewCard,\n        triggerElement: elementRef.nativeElement,\n        anchorElement: anchor,\n        injector,\n        context,\n        container,\n        placement,\n        offset: offset(),\n        flip: flip(),\n        shift: shift(),\n        showDelay: showDelay(),\n        hideDelay: hideDelay(),\n        closeOnEscape: true,\n        closeOnOutsideClick: true,\n        // A preview card never takes focus away from the trigger, so there is\n        // nothing to restore and no focus to trap.\n        restoreFocus: false,\n        scrollBehaviour: scrollBehavior(),\n        viewContainerRef,\n        overlayType: 'preview-card',\n        cooldown: cooldown(),\n        onClose: () => {\n          announcedOpen = false;\n\n          if (!destroyed) {\n            onOpenChange?.(false);\n          }\n        },\n      };\n\n      overlay.set(createOverlay(config));\n    }\n\n    return {\n      previewCard: previewCard.asReadonly(),\n      container: container.asReadonly(),\n      open,\n      setPreviewCard,\n      setContainer,\n      show,\n      hide,\n      setPointerOverCard,\n      onCardFocusOut: onFocusOut,\n    } satisfies NgpPreviewCardTriggerState<T>;\n  },\n);\n\nexport function injectPreviewCardTriggerState<T>(\n  options?: StateInjectionOptions,\n): Signal<NgpPreviewCardTriggerState<T>> {\n  return _injectPreviewCardTriggerState(options) as Signal<NgpPreviewCardTriggerState<T>>;\n}\n\nexport type NgpPreviewCardPlacement =\n  | 'top'\n  | 'right'\n  | 'bottom'\n  | 'left'\n  | 'top-start'\n  | 'top-end'\n  | 'right-start'\n  | 'right-end'\n  | 'bottom-start'\n  | 'bottom-end'\n  | 'left-start'\n  | 'left-end';\n","import { BooleanInput, NumberInput } from '@angular/cdk/coercion';\nimport { booleanAttribute, Directive, input, numberAttribute, output } from '@angular/core';\nimport {\n  coerceFlip,\n  coerceOffset,\n  coerceShift,\n  NgpFlip,\n  NgpFlipInput,\n  NgpOffset,\n  NgpOffsetInput,\n  NgpOverlayContent,\n  NgpShift,\n  NgpShiftInput,\n} from 'ng-primitives/portal';\nimport { injectPreviewCardConfig } from '../config/preview-card-config';\nimport {\n  NgpPreviewCardPlacement,\n  ngpPreviewCardTrigger,\n  providePreviewCardTriggerState,\n} from './preview-card-trigger-state';\n\n/**\n * Apply the `ngpPreviewCardTrigger` directive to the element that reveals the preview card.\n *\n * This should be an element that is independently useful without the card - typically a\n * link to the content the card previews - because the card itself is not exposed to\n * assistive technology.\n */\n@Directive({\n  selector: '[ngpPreviewCardTrigger]',\n  exportAs: 'ngpPreviewCardTrigger',\n  providers: [providePreviewCardTriggerState({ inherit: false })],\n})\nexport class NgpPreviewCardTrigger<T = null> {\n  /**\n   * Access the global preview card configuration.\n   */\n  private readonly config = injectPreviewCardConfig();\n\n  /**\n   * Access the preview card template ref.\n   */\n  readonly previewCard = input<NgpOverlayContent<T> | undefined>(undefined, {\n    alias: 'ngpPreviewCardTrigger',\n  });\n\n  /**\n   * Whether the preview card is disabled. This allows the preview card to be enabled or disabled dynamically.\n   * @default false\n   */\n  readonly disabled = input<boolean, BooleanInput>(false, {\n    alias: 'ngpPreviewCardTriggerDisabled',\n    transform: booleanAttribute,\n  });\n\n  /**\n   * Define the placement of the preview card relative to the trigger.\n   * @default 'bottom'\n   */\n  readonly placement = input<NgpPreviewCardPlacement>(this.config.placement, {\n    alias: 'ngpPreviewCardTriggerPlacement',\n  });\n\n  /**\n   * Define the offset of the preview card relative to the trigger.\n   * Can be a number (applies to mainAxis) or an object with mainAxis, crossAxis, and alignmentAxis.\n   * @default 4\n   */\n  readonly offset = input<NgpOffset, NgpOffsetInput>(this.config.offset, {\n    alias: 'ngpPreviewCardTriggerOffset',\n    transform: coerceOffset,\n  });\n\n  /**\n   * Define the delay before the preview card is displayed.\n   * @default 600\n   */\n  readonly showDelay = input<number, NumberInput>(this.config.showDelay, {\n    alias: 'ngpPreviewCardTriggerShowDelay',\n    transform: numberAttribute,\n  });\n\n  /**\n   * Define the delay before the preview card is hidden.\n   * @default 300\n   */\n  readonly hideDelay = input<number, NumberInput>(this.config.hideDelay, {\n    alias: 'ngpPreviewCardTriggerHideDelay',\n    transform: numberAttribute,\n  });\n\n  /**\n   * Define whether the preview card should flip when there is not enough space.\n   * Can be a boolean to enable/disable, or an object with padding and fallbackPlacements options.\n   * @default true\n   */\n  readonly flip = input<NgpFlip, NgpFlipInput>(this.config.flip, {\n    alias: 'ngpPreviewCardTriggerFlip',\n    transform: coerceFlip,\n  });\n\n  /**\n   * Configure shift behavior to keep the preview card in view.\n   * Can be a boolean to enable/disable, or an object with padding and limiter options.\n   * @default undefined (enabled by default in overlay)\n   */\n  readonly shift = input<NgpShift, NgpShiftInput>(this.config.shift, {\n    alias: 'ngpPreviewCardTriggerShift',\n    transform: coerceShift,\n  });\n\n  /**\n   * Define the container in which the preview card should be attached.\n   * @default document.body\n   */\n  readonly container = input<HTMLElement | string | null>(this.config.container, {\n    alias: 'ngpPreviewCardTriggerContainer',\n  });\n\n  /**\n   * Define an anchor element for positioning the preview card.\n   * If provided, the preview card will be positioned relative to this element instead of the trigger.\n   */\n  readonly anchor = input<HTMLElement | null>(null, {\n    alias: 'ngpPreviewCardTriggerAnchor',\n  });\n\n  /**\n   * Provide context to the preview card. This can be used to pass data to the preview card content.\n   */\n  readonly context = input<T>(undefined, {\n    alias: 'ngpPreviewCardTriggerContext',\n  });\n\n  /**\n   * Defines how the preview card behaves when the window is scrolled.\n   * @default 'reposition'\n   */\n  readonly scrollBehavior = input<'reposition' | 'close'>(this.config.scrollBehavior, {\n    alias: 'ngpPreviewCardTriggerScrollBehavior',\n  });\n\n  /**\n   * Define the cooldown duration in milliseconds.\n   * When moving from one preview card to another within this duration,\n   * the showDelay is skipped for the new card.\n   * @default 300\n   */\n  readonly cooldown = input<number, NumberInput>(this.config.cooldown, {\n    alias: 'ngpPreviewCardTriggerCooldown',\n    transform: numberAttribute,\n  });\n\n  /**\n   * Emits when the open state of the preview card changes.\n   */\n  readonly openChange = output<boolean>({\n    alias: 'ngpPreviewCardTriggerOpenChange',\n  });\n\n  protected readonly state = ngpPreviewCardTrigger({\n    previewCard: this.previewCard,\n    disabled: this.disabled,\n    placement: this.placement,\n    offset: this.offset,\n    showDelay: this.showDelay,\n    hideDelay: this.hideDelay,\n    flip: this.flip,\n    shift: this.shift,\n    container: this.container,\n    anchor: this.anchor,\n    context: this.context,\n    scrollBehavior: this.scrollBehavior,\n    cooldown: this.cooldown,\n    onOpenChange: (value: boolean) => this.openChange.emit(value),\n  });\n\n  /**\n   * Show the preview card.\n   */\n  show(): void {\n    this.state.show();\n  }\n\n  /**\n   * Hide the preview card.\n   */\n  hide(): void {\n    this.state.hide();\n  }\n}\n","import { Signal, signal } from '@angular/core';\nimport { explicitEffect, injectElementRef } from 'ng-primitives/internal';\nimport { injectOverlay } from 'ng-primitives/portal';\nimport {\n  attrBinding,\n  controlled,\n  createPrimitive,\n  dataBinding,\n  listener,\n  styleBinding,\n} from 'ng-primitives/state';\nimport { injectPreviewCardTriggerState } from '../preview-card-trigger/preview-card-trigger-state';\n\nexport interface NgpPreviewCardState {\n  /** The unique id of the preview card. */\n  readonly id: Signal<string>;\n}\n\nexport interface NgpPreviewCardProps {\n  /** The unique id of the preview card. */\n  readonly id?: Signal<string>;\n}\n\nexport const [\n  NgpPreviewCardStateToken,\n  ngpPreviewCard,\n  injectPreviewCardState,\n  providePreviewCardState,\n] = createPrimitive('NgpPreviewCard', ({ id: _id = signal<string>('') }: NgpPreviewCardProps) => {\n  const elementRef = injectElementRef<HTMLElement>();\n  const overlay = injectOverlay();\n  overlay.registerAvailableSizePrefix('--ngp-preview-card');\n  const triggerState = injectPreviewCardTriggerState();\n\n  const id = controlled(_id);\n\n  // Report hover back to the trigger so the card stays open while the pointer is\n  // inside it, and closes once the pointer leaves both the card and the trigger.\n  // Touch is ignored here for the same reason it is on the trigger.\n  listener(elementRef, 'pointerenter', (event: PointerEvent) => {\n    if (event.pointerType === 'touch') {\n      return;\n    }\n\n    triggerState().setPointerOverCard(true);\n  });\n\n  listener(elementRef, 'pointerleave', (event: PointerEvent) => {\n    if (event.pointerType === 'touch') {\n      return;\n    }\n\n    triggerState().setPointerOverCard(false);\n  });\n\n  // The card is portalled outside the trigger, so focus leaving it never reaches the\n  // trigger's own focusout listener and has to be forwarded.\n  listener(elementRef, 'focusout', (event: FocusEvent) =>\n    triggerState().onCardFocusOut(event.relatedTarget),\n  );\n\n  // Seed the id with the overlay's generated unique id so the card always has a\n  // valid id when none is provided. `controlled` returns a linkedSignal, so this is\n  // only a transient default: if a consumer binds `id`, that source change wins.\n  id.set(overlay.id());\n\n  // Host bindings.\n  //\n  // Deliberately no `role`: a preview card is not exposed to assistive technology,\n  // and neither `tooltip` (which would describe the trigger with a whole\n  // interactive card) nor `dialog` (which implies focus management we do not do)\n  // is correct. `tabindex=\"-1\"` keeps the card root itself out of the tab\n  // sequence while leaving any focusable content inside it reachable.\n  attrBinding(elementRef, 'id', id);\n  attrBinding(elementRef, 'tabindex', '-1');\n  dataBinding(elementRef, 'data-overlay', '');\n  dataBinding(elementRef, 'data-placement', () => overlay.finalPlacement()?.toString() ?? null);\n  styleBinding(elementRef, 'left.px', () => overlay.position().x ?? null);\n  styleBinding(elementRef, 'top.px', () => overlay.position().y ?? null);\n  styleBinding(elementRef, '--ngp-preview-card-trigger-width.px', () => overlay.triggerWidth());\n  styleBinding(elementRef, '--ngp-preview-card-transform-origin', () => overlay.transformOrigin());\n  styleBinding(elementRef, '--ngp-preview-card-available-width.px', () => overlay.availableWidth());\n  styleBinding(elementRef, '--ngp-preview-card-available-height.px', () =>\n    overlay.availableHeight(),\n  );\n\n  // Effects\n  explicitEffect([id], ([id]) => overlay.id.set(id));\n\n  return {\n    id,\n  } satisfies NgpPreviewCardState;\n});\n","import { Directive, input } from '@angular/core';\nimport { provideControlContainerIsolation } from 'ng-primitives/portal';\nimport { ngpPreviewCard, providePreviewCardState } from './preview-card-state';\n\n/**\n * Apply the `ngpPreviewCard` directive to an element that represents the preview card.\n * This typically would be a `div` inside an `ng-template`.\n */\n@Directive({\n  selector: '[ngpPreviewCard]',\n  exportAs: 'ngpPreviewCard',\n  providers: [providePreviewCardState(), provideControlContainerIsolation()],\n})\nexport class NgpPreviewCard {\n  /**\n   * The unique id of the preview card.\n   */\n  readonly id = input('');\n\n  protected readonly state = ngpPreviewCard({\n    id: this.id,\n  });\n}\n","import { NgpOverlayArrowProps, NgpOverlayArrowState, ngpOverlayArrow } from 'ng-primitives/portal';\nimport { createPrimitive } from 'ng-primitives/state';\n\n// Re-export types with preview-card-specific aliases\nexport { NgpOverlayArrowProps as NgpPreviewCardArrowProps };\nexport { NgpOverlayArrowState as NgpPreviewCardArrowState };\n\nexport const [\n  NgpPreviewCardArrowStateToken,\n  ngpPreviewCardArrow,\n  injectPreviewCardArrowState,\n  providePreviewCardArrowState,\n] = createPrimitive(\n  'NgpPreviewCardArrow',\n  ({ padding }: NgpOverlayArrowProps): NgpOverlayArrowState => {\n    return ngpOverlayArrow({ padding });\n  },\n);\n","import { NumberInput } from '@angular/cdk/coercion';\nimport { Directive, input, numberAttribute } from '@angular/core';\nimport { ngpPreviewCardArrow, providePreviewCardArrowState } from './preview-card-arrow-state';\n\n/**\n * Apply the `ngpPreviewCardArrow` directive to an element inside the preview card to\n * render an arrow pointing at the trigger.\n */\n@Directive({\n  selector: '[ngpPreviewCardArrow]',\n  exportAs: 'ngpPreviewCardArrow',\n  providers: [providePreviewCardArrowState()],\n})\nexport class NgpPreviewCardArrow {\n  /**\n   * Padding between the arrow and the edges of the preview card.\n   * This prevents the arrow from overflowing the rounded corners.\n   */\n  readonly padding = input<number | undefined, NumberInput>(undefined, {\n    alias: 'ngpPreviewCardArrowPadding',\n    transform: numberAttribute,\n  });\n\n  private readonly state = ngpPreviewCardArrow({ padding: this.padding });\n\n  /**\n   * Set the padding between the arrow and the edges of the preview card.\n   * @param value The padding value in pixels\n   */\n  setPadding(value: number | undefined): void {\n    this.state.setPadding(value);\n  }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAkEO,MAAM,wBAAwB,GAAyB;AAC5D,IAAA,SAAS,EAAE,QAAQ;AACnB,IAAA,MAAM,EAAE,CAAC;AACT,IAAA,SAAS,EAAE,GAAG;AACd,IAAA,SAAS,EAAE,GAAG;AACd,IAAA,IAAI,EAAE,IAAI;AACV,IAAA,KAAK,EAAE,SAAS;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