import type { ChartSpace } from '../chart/chart'; import type { CxChartSpace } from '../chart/cx/chartex'; import type { DrawingAnchor } from './anchor'; import type { ShapeProperties } from './dml/shape-properties'; import type { XlsxImage } from './image'; /** Reference to a chart part — the chart's drawing-rels rId resolves to xl/charts/chartN.xml. */ export interface ChartReference { /** Drawing-rels rId pointing at the chart part. Populated on read; the writer assigns its own. */ rId?: string; /** * Legacy ECMA-376 chart payload (`c:chartSpace`). Stage-1 supports BarChart * end-to-end; other chart kinds populate this field as their parsers / * writers land. */ space?: ChartSpace; /** * Excel-2016 chartex payload (`cx:chartSpace`). Mutually exclusive with * {@link space} for any given drawing item; the parser sniffs the root * element and populates whichever is appropriate. */ cxSpace?: CxChartSpace; /** * `true` when the resolved chart part is a chartex (`cx:`) chart. Set by the * package writer so the drawing emitter knows to use the chartex * `` instead of the legacy chart URI — Excel rejects the * workbook when the URI doesn't match the chart's actual root namespace. */ isCx?: boolean; } /** Reference to an embedded picture inside a worksheet drawing. */ export interface PictureReference { /** Drawing-rels rId pointing at the embedded image. Populated on read; the writer assigns its own. */ rId?: string; /** Resolved image bytes + metadata. Populated on read; the writer reads it back. */ image?: XlsxImage; /** Picture display name (``). */ name?: string; /** Optional alt-text description. */ descr?: string; /** Hidden flag (`