import { ChartPptxElement, PptxChartData } from 'pptx-viewer-core'; import { ChartPartRef, ChartViewModel } from 'pptx-viewer-shared'; /** * View-model resolution for `chart` elements (port of the vanilla binding's * `renderChartElement`). The shared `buildChartViewModel` engine does all the * chart maths and projects the chart into pure `SvgPrimitive` descriptors; * this module only resolves the palette / aspect ratio and lays out the * legend so the `ChartView` SFC template stays declarative. */ /** Resolved chart view: a renderable view model, or a labelled placeholder. */ export type ChartView = { kind: 'chart'; vm: ChartViewModel; preserveAspectRatio: 'none' | 'xMidYMid meet'; } | { kind: 'placeholder'; label: string; }; /** * Resolve the colour palette for a chart, mirroring Vue's `resolveVuePalette`: * an explicit parsed `colorPalette` wins, otherwise the style-id palette * (which itself falls back to the default chart palette). */ export declare function resolveChartPalette(chartData: PptxChartData): string[]; /** * Build the renderable view (or placeholder) for a chart element. * * @param translate - The binding's translator, used for the placeholder * caption. It is optional so the pure unit tests can call this without an * i18n context; a viewer always passes one. */ export declare function buildChartView(element: ChartPptxElement, translate?: (key: string, params?: Record) => string): ChartView; /** One positioned legend entry (swatch + label). */ export interface ChartLegendItem { key: string; transform: string; color: string; label: string; fontSize: number; fill: string; fontWeight: 'normal' | 'bold'; fontStyle: 'normal' | 'italic'; fontFamily?: string; } /** Legend layout: a horizontal row, or a vertical stack on the side. */ export declare function buildLegendItems(vm: ChartViewModel): ChartLegendItem[]; /** * `data-chart-*` hit-testing attributes for a tagged data-mark primitive. * Inert without pointer events; emitted for parity with the other bindings so * hosts layering interaction on top can reuse the same shared hit-testing. */ export declare function partAttrs(part: ChartPartRef | undefined): Record; //# sourceMappingURL=chart-view.d.ts.map