import * as React from 'react'; import type { AgPart } from '../types.js'; /** A citable source; `snippet` (optional) is the quoted passage shown in the preview. */ export type AgCitationSource = Extract & { snippet?: string | undefined; }; export interface CitationProps { /** Id of the message that cites the source. */ messageId: string; /** The cited source. */ source: AgCitationSource; /** Citation number shown in the marker and announced as "Source {index}". */ index: number; /** Initial open state of the preview card (uncontrolled). Default false. */ defaultOpen?: boolean | undefined; /** Class name merged onto the root element. */ className?: string | undefined; } /** Hover-open delay (ms) — REQ-SURF-125. */ export declare const CITATION_PREVIEW_DELAY = 300; /** * REQ-SURF-125: `[n]` anchor to #ag-src-{messageId}-{sourceId}, named * "Source {index}: {title}". A Base UI PreviewCard (title, snippet, hostname) * opens after a 300 ms hover and on focus, is portalled into * `usePortalContainer('overlay')`, uses the shared CMP positioner config * (`defaultPositionerProps`: 8 px offset, 8 px collision padding, flip → shift), carries no * popup role (no dialog/tooltip), and closes on blur and on Escape. Escape * follows the repo's Base-UI-overlay rule (src/components/overlays/_shared/ * useOverlayLayer.ts): the open card is registered with the LayerStack via * `useLayer({ kind: 'preview-card' })` so the stack orders it and layers below * never see that Escape, while Base UI's dismiss performs the single close * (reason 'escape-key'); there is no local keydown listener. * Activation (touch, Enter, click — including below 480 px and at coarse * pointers) opens the in-message SourceList and moves focus to the item. */ export declare function Citation({ messageId, source, index, defaultOpen, className }: CitationProps): React.JSX.Element; //# sourceMappingURL=Citation.d.ts.map