/** * ChartEx sidecar completeness check. * * Every ChartEx `xl/charts/chartExN.xml` MUST ship with a chartStyle * sidecar (`xl/charts/styleN.xml` or `xl/charts/styleExN.xml`) and a * chartColorStyle sidecar (`xl/charts/colorsN.xml` or * `xl/charts/colorsExN.xml`), linked from `chartExN.xml.rels`. Without * them Excel 2016+ discards the chartEx on load ("Removed Part: * /xl/drawings/drawingN.xml (Drawing shape)"). * * Both sidecars are STUB-REJECTED **for chartEx** — an id-only * skeleton such as `` (no child elements) * makes Excel treat the sidecar as malformed and drop the parent * chartEx + drawing. Excel authoring tools emit the FULL content: ~40 * child elements for chartStyle (axisTitle, dataPoint, dataLabel, …) * and 6 `schemeClr` entries each with 9 `variation` siblings for * chartColorStyle. * * CLASSIC charts (`xl/charts/chartN.xml`) can share the chartStyle * namespace but Excel is lenient there — classic chart style stubs * are accepted. We therefore only enforce the no-stub rule on * sidecars **referenced by a `chartExN.xml` part** via its rels. * * The precise content is too intricate to validate without baking * ~1500 lines of template XML into this module. Instead we detect the * two high-signal stub patterns: * * - chartStyle root element has zero element children (pure stub). * - chartColorStyle root element has zero element children (pure stub). * * A rich sidecar trivially has dozens of children so the zero-child * case is a strong writer-bug signature. */ import { type ValidationContext } from "./context.js"; export declare function checkChartSidecars(ctx: ValidationContext): void;