/** * The `highcharts` component: a chart drawn by an export server. * * Nothing here renders a document. A chart has no OOXML form of its own — it * becomes a PNG and then an `image` — so what lives here is the request the * export server needs, the theme palette that goes into it, and the image props * the result desugars to. */ import { ThemeConfig } from '../styles'; import type { HighchartsProps } from '@json-to-office/shared-docx'; import type { GenerationWarning } from '@json-to-office/shared'; import { type ChartRenderCache, type HighchartsServiceConfig, type RasterizeFontFace } from '@json-to-office/shared'; export type { HighchartsProps } from '@json-to-office/shared-docx'; /** * Chart generation result */ export interface ChartGenerationResult { base64DataUri: string; width: number; height: number; } /** * Per-document memo of chart renders. A report that repeats a figure — the * same series in a summary and again in its section — pays for it once. */ export type ChartCache = ChartRenderCache; /** * The export server this chart will actually be posted to. * * Exported because the concurrency gate is keyed by it: `desugarExternals` * has to know which server a chart is bound for before it lets the request * through, and resolving that in two places is how the two would drift. */ export declare function effectiveChartServerUrl(props: HighchartsProps, servicesConfig: HighchartsServiceConfig | undefined): string; /** * Generate chart using Highcharts Export Server */ /** * Refuse a public export server unless the caller opted in, and say so when * it did: where the request goes is part of the document's confidentiality. */ export declare function assertExportServerAllowed(serverUrl: string, servicesConfig: HighchartsServiceConfig | undefined, warnings: GenerationWarning[] | undefined): void; /** * Map a chart's props to the `image` props it desugars to. * * Shared by the render-time component and the DocxIR desugaring pass so the two * cannot drift on the one decision that is not obvious: an explicit `width` or * `height` on the component replaces the chart's own canvas size outright, * rather than merging with it — stating one and inheriting the other would * distort the chart. */ export declare function renderChartToImageProps(props: HighchartsProps, theme: ThemeConfig, servicesConfig?: HighchartsServiceConfig, chartFonts?: readonly RasterizeFontFace[], warnings?: GenerationWarning[], cache?: ChartCache): Promise>; //# sourceMappingURL=highcharts.d.ts.map