import type { DynamicContext, NormalisedChartCaptionOptions, NormalisedTextOrSegments } from 'ag-charts-core'; import type { AgCaptionType } from 'ag-charts-types'; import type { ChartRegistry } from '../module/moduleContext'; import { RotatableText } from '../scene/shape/text'; import type { CaptionLike } from './captionLike'; type CaptionNodeDatum = { visible: boolean; text: NormalisedTextOrSegments | undefined; textBaseline: string; x: number; y: number; rotationCenterX: number; rotationCenterY: number; rotation: number; }; /** Build the font spec (FontOptions shape) consumed by text measurers from a caption's options. */ export declare function captionFont(opts: NormalisedChartCaptionOptions): { fontSize: number; fontStyle: import("ag-charts-types").FontStyle | undefined; fontWeight: import("ag-charts-types").FontWeight | undefined; fontFamily: string; }; /** * Chart-level caption (title/subtitle/footnote). Reads its option subtree from * `ctx.chartState.getValue('options', key)` and applies values to its scene node * during layout. Mirrors the Legend/Zoom pattern. * * For axis/series titles (which use `Caption`), the BaseProperties-based * `Caption` class continues to be used. */ export declare class ChartCaption implements CaptionLike { private readonly ctx; private readonly key; static readonly className = "ChartCaption"; readonly id: string; readonly node: RotatableText; get opts(): NormalisedChartCaptionOptions; get enabled(): boolean; get text(): NormalisedTextOrSegments | undefined; get padding(): number; /** Per-side padding reserved by the background box; zeros when no box is active. */ get boxPadding(): Required; /** Per-side padding that insets the caption text and shrinks its layout footprint, whether or not a box is drawn. */ get contentPadding(): Required; private truncated; private proxyText?; private proxyTextListeners?; private lastProxyTextContent?; private lastProxyBBox?; constructor(ctx: DynamicContext, key: AgCaptionType); /** * Apply the current options subtree to the scene node. Called from * `ChartCaptions.positionCaptions` before each layout so visible/text/font * properties land before render. */ applyToNode(): void; registerInteraction(moduleCtx: DynamicContext, where: 'beforebegin' | 'afterend'): () => void; computeTextWrap(containerWidth: number, containerHeight: number): void; private updateA11yText; private getEffectiveTooltipVisible; private getTooltipContent; private showTooltip; private eventToCanvas; private handleMouseMove; private handleFocus; private handleTooltipHide; private handleContextMenu; /** * A caption is a click target only while a listener is registered for it, so that with none the * interaction falls through exactly as it did before (AG-17638). */ private hasClickListener; /** * Fires the caption's own `listeners` callbacks and their chart-level `captionClick` / * `captionDoubleClick` counterparts. Mirrors the caption context-menu dispatch above, reporting * the same `captionType` discriminator. */ private handleClick; destroy(): void; private destroyProxyText; } export {};