import { Series } from '../../../Series'; import { Scale } from '../../../../scales'; import { ChartTheme } from '../../../../theme'; import { AxisOptions, Bounds, PlotArea } from '../../../../types'; import { ChartTitleOptions } from '../../../layout/types'; import { LayoutOptions } from '../../../layout'; import { BusinessDayMapping } from '../../../time/TimeScale'; import { SVGExportPluginContext } from './plugins/types'; export interface SVGExportOptions { xAxis?: AxisOptions; yAxis?: AxisOptions; primaryYAxisId?: string; /** Include plugin overlays (annotations, regression, etc.) */ includeOverlays?: boolean; /** Include legend in SVG */ includeLegend?: boolean; /** Include annotation plugin content */ includeAnnotations?: boolean; /** Include crosshair at capture position */ includeCursor?: boolean; /** Include selection rectangle */ includeSelection?: boolean; /** Export state at specific timestamp (replay) */ at?: number; /** Optional watermark text (snapshot / export) */ watermarkText?: string; /** Embed web fonts in defs (P2) */ embedFonts?: boolean; /** Accessible label for root SVG */ ariaLabel?: string; /** 3D export mode — deferred */ svgExport3DMode?: "raster" | "project"; /** Legacy raster fallback during development */ svgExportMode?: "vector" | "legacy-raster"; } export interface YAxisLayoutEntry { id: string; scale: Scale; options?: AxisOptions; position: "left" | "right"; offset: number; } export interface CursorSnapshot { x: number; y: number; } export interface SelectionSnapshot { x: number; y: number; width: number; height: number; } export interface PriceAlertSnapshot { price: number; direction?: string; } export interface SVGExportContext { series: Series[]; viewBounds: Bounds; plotArea: PlotArea; xScale: Scale; yAxes: Map; yAxisLayouts: YAxisLayoutEntry[]; theme: ChartTheme; width: number; height: number; xAxisOptions?: AxisOptions; yAxisOptionsMap: Map; primaryYAxisId?: string; titleOptions?: ChartTitleOptions; layout: LayoutOptions; businessDayMapping?: BusinessDayMapping | null; showLegend: boolean; legendSeries: Series[]; cursor?: CursorSnapshot | null; selection?: SelectionSnapshot | null; alerts?: PriceAlertSnapshot[]; options: SVGExportOptions; pluginContexts: SVGExportPluginContext[]; pluginManager?: { get: (name: string) => import('../../../../plugins/types').ChartPlugin | undefined; notifyExportSVG?: (ctx: SVGExportPluginContext) => void; }; } export interface SVGExportInput { series: Series[]; viewBounds: Bounds; plotArea: PlotArea; xScale: Scale; yAxes: Map; theme: ChartTheme; width: number; height: number; options?: SVGExportOptions; xAxisOptions?: AxisOptions; yAxisOptionsMap?: Map; primaryYAxisId?: string; titleOptions?: ChartTitleOptions; layout?: LayoutOptions; businessDayMapping?: BusinessDayMapping | null; showLegend?: boolean; cursor?: CursorSnapshot | null; selection?: SelectionSnapshot | null; alerts?: PriceAlertSnapshot[]; pluginContexts?: SVGExportPluginContext[]; pluginManager?: SVGExportContext["pluginManager"]; } /** Build Y-axis layout entries with left/right offsets matching OverlayRenderer. */ export declare function buildYAxisLayouts(_plotArea: PlotArea, yAxes: Map, yAxisOptionsMap: Map, primaryYAxisId?: string): YAxisLayoutEntry[]; export declare function buildSVGExportContext(input: SVGExportInput): SVGExportContext; /** Capture layout snapshot from a live ChartImpl instance. */ export declare function captureLayoutSnapshot(chart: { getAllSeries: () => Series[]; viewBounds: Bounds; getPlotArea: () => PlotArea; xScale: Scale; yScales: Map; theme: ChartTheme; container: HTMLElement; xAxisOptions: AxisOptions; yAxisOptionsMap: Map; primaryYAxisId: string; getLayout?: () => LayoutOptions; getBusinessDayMapping?: () => BusinessDayMapping | null; showLegend?: boolean; getCursorPosition?: () => { x: number; y: number; } | null; selectionRect?: { x: number; y: number; width: number; height: number; } | null; getAlerts?: () => Array<{ price: number; direction?: string; }>; getHoveredSeriesId?: () => string | null; pluginManager?: { get: (name: string) => unknown; notifyExportSVG?: (ctx: SVGExportPluginContext) => void; }; titleOptions?: ChartTitleOptions; }, exportOptions?: SVGExportOptions): SVGExportContext;