pptx-svelte-viewer 3.7.0 → 3.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/dist/{AiChatPanel-vYzaXNFz.js → AiChatPanel-yqg_BJme.js} +1 -1
  3. package/dist/{export-xK6ID6BD.js → export-zAcr-4rr.js} +36382 -32399
  4. package/dist/i18n.js +1 -1
  5. package/dist/index.d.ts +534 -38
  6. package/dist/index.js +2 -2
  7. package/dist/pptx-svelte-viewer.css +1 -1
  8. package/dist/{translator-DWcErYB3.js → translator-Cxn32Y3A.js} +54 -27
  9. package/dist/viewer/ai/ai-bridge.d.ts +25 -1
  10. package/dist/viewer/ai/ai-bridge.d.ts.map +1 -1
  11. package/dist/viewer/collab/collaboration-deps.d.ts +8 -1
  12. package/dist/viewer/collab/collaboration-deps.d.ts.map +1 -1
  13. package/dist/viewer/collab/collaboration.svelte.d.ts.map +1 -1
  14. package/dist/viewer/components/chart-drag.svelte.d.ts.map +1 -1
  15. package/dist/viewer/editor/editor-document-lifecycle.d.ts.map +1 -1
  16. package/dist/viewer/editor/editor-document-state.d.ts +7 -2
  17. package/dist/viewer/editor/editor-document-state.d.ts.map +1 -1
  18. package/dist/viewer/editor/editor-format-mutations.d.ts +10 -6
  19. package/dist/viewer/editor/editor-format-mutations.d.ts.map +1 -1
  20. package/dist/viewer/editor/editor-state.svelte.d.ts +20 -1
  21. package/dist/viewer/editor/editor-state.svelte.d.ts.map +1 -1
  22. package/dist/viewer/index.d.ts +656 -38
  23. package/dist/viewer/index.js +1 -1
  24. package/dist/viewer/presentation/animation-playback.svelte.d.ts.map +1 -1
  25. package/dist/viewer/render/smart-art-3d-view.d.ts.map +1 -1
  26. package/dist/viewer/render/smartart-view.d.ts +9 -6
  27. package/dist/viewer/render/smartart-view.d.ts.map +1 -1
  28. package/dist/viewer/state/create-viewer-state-ai.svelte.d.ts.map +1 -1
  29. package/dist/viewer/state/create-viewer-state-collab.svelte.d.ts.map +1 -1
  30. package/dist/viewer/state/create-viewer-state.svelte.d.ts.map +1 -1
  31. package/dist/viewer/state/inspector-deck.d.ts +12 -1
  32. package/dist/viewer/state/inspector-deck.d.ts.map +1 -1
  33. package/dist/viewer/state/presentation-loader.svelte.d.ts +8 -0
  34. package/dist/viewer/state/presentation-loader.svelte.d.ts.map +1 -1
  35. package/package.json +2 -2
@@ -571,6 +571,44 @@ interface PptxCustomPathProperties {
571
571
  customGeometryTextRect?: CustomGeometryTextRect;
572
572
  }
573
573
  //#endregion
574
+ //#region src/core/types/color-ref.d.ts
575
+ /**
576
+ * Theme colour references: the typed counterpart of `<a:schemeClr>`.
577
+ *
578
+ * A colour picked from the theme palette is remembered as a scheme slot plus
579
+ * PowerPoint's luminance variants rather than as the sRGB it currently
580
+ * resolves to, so a later theme change re-colours the shape (and a saved file
581
+ * keeps `<a:schemeClr>` instead of a canonical `<a:srgbClr>`).
582
+ *
583
+ * @module types/color-ref
584
+ */
585
+ /**
586
+ * The scheme slot names `a:schemeClr/@val` accepts (ECMA-376 `ST_SchemeColorIndex`).
587
+ * `bg1`/`tx1`/`bg2`/`tx2` are the colour-map aliases a slide resolves through
588
+ * `p:clrMap`; `phClr` is the placeholder colour used inside a theme's style
589
+ * matrix and is never chosen from a picker.
590
+ */
591
+ type PptxThemeColorSchemeName = 'dk1' | 'lt1' | 'dk2' | 'lt2' | 'accent1' | 'accent2' | 'accent3' | 'accent4' | 'accent5' | 'accent6' | 'hlink' | 'folHlink' | 'bg1' | 'tx1' | 'bg2' | 'tx2' | 'phClr';
592
+ /**
593
+ * A theme colour choice. Every transform is a 0..1 fraction of the OOXML
594
+ * percentage (`lumMod val="20000"` is `lumMod: 0.2`), matching how the parser
595
+ * reads them, and is applied in the order `a:schemeClr` children are written:
596
+ * `tint`, `shade`, `lumMod`, `lumOff`, `alpha`.
597
+ */
598
+ interface PptxThemeColorRef {
599
+ scheme: PptxThemeColorSchemeName;
600
+ /** `a:lumMod`: multiply HSL luminance (PowerPoint's "Lighter/Darker" rows). */
601
+ lumMod?: number;
602
+ /** `a:lumOff`: add to HSL luminance after `lumMod` ("Lighter N%" rows). */
603
+ lumOff?: number;
604
+ /** `a:tint`: blend towards white. */
605
+ tint?: number;
606
+ /** `a:shade`: blend towards black. */
607
+ shade?: number;
608
+ /** `a:alpha`: opacity fraction (1 = opaque). */
609
+ alpha?: number;
610
+ }
611
+ //#endregion
574
612
  //#region src/core/types/effect-dag.d.ts
575
613
  type EffectDagBlendMode = 'darken' | 'lighten' | 'mult' | 'over' | 'screen';
576
614
  type EffectDagContainerType = 'sib' | 'tree';
@@ -860,6 +898,15 @@ interface ShapeStyle {
860
898
  * back to canonical `<a:srgbClr>`.
861
899
  */
862
900
  fillColorXml?: XmlObject;
901
+ /**
902
+ * Typed theme colour reference for the fill, set when {@link fillColorXml}
903
+ * is a plain `a:schemeClr` (see `themeColorRefFromColorChoice`). When
904
+ * present it WINS on save: the writer emits `<a:schemeClr>` from this ref
905
+ * instead of the resolved {@link fillColor}, so the fill keeps following
906
+ * the theme palette after a later theme change. `undefined` means the fill
907
+ * is a plain hex (or a colour kind a ref cannot express).
908
+ */
909
+ fillColorRef?: PptxThemeColorRef;
863
910
  fillGradient?: string;
864
911
  /** Original `gradFill` XML retained for unknown-child and extension round-tripping. */
865
912
  fillGradientXml?: XmlObject;
@@ -894,6 +941,12 @@ interface ShapeStyle {
894
941
  opacity?: number;
895
942
  /** Raw XML colour node preserved for round-trip (e.g. a:schemeClr with transforms). */
896
943
  originalColorXml?: XmlObject;
944
+ /**
945
+ * Typed theme colour reference for this stop, set when
946
+ * {@link originalColorXml} is a plain `a:schemeClr`. Wins on save, same
947
+ * as {@link ShapeStyle.fillColorRef}.
948
+ */
949
+ colorRef?: PptxThemeColorRef;
897
950
  }>;
898
951
  fillGradientAngle?: number;
899
952
  fillGradientType?: 'linear' | 'radial';
@@ -940,6 +993,12 @@ interface ShapeStyle {
940
993
  * round-trip serialisation. See {@link fillColorXml} for the rationale.
941
994
  */
942
995
  strokeColorXml?: XmlObject;
996
+ /**
997
+ * Typed theme colour reference for the outline, mirroring
998
+ * {@link fillColorRef}: set when {@link strokeColorXml} is a plain
999
+ * `a:schemeClr`, and wins on save.
1000
+ */
1001
+ strokeColorRef?: PptxThemeColorRef;
943
1002
  /**
944
1003
  * Kind of fill painted on the outline (`a:ln` child). Distinguishes a solid
945
1004
  * outline from a gradient/pattern/none outline so save can emit the correct
@@ -1443,6 +1502,15 @@ interface TextStyle {
1443
1502
  * verbatim when the resolved {@link color} still matches this node.
1444
1503
  */
1445
1504
  colorXml?: XmlObject;
1505
+ /**
1506
+ * Typed theme colour reference for the run's text colour, set when
1507
+ * {@link colorXml} is a plain `a:schemeClr` (see
1508
+ * `themeColorRefFromColorChoice`). When present it WINS on save: the
1509
+ * writer emits `<a:schemeClr>` from this ref instead of the resolved
1510
+ * {@link color}, so the text keeps following the theme palette after a
1511
+ * later theme change.
1512
+ */
1513
+ colorRef?: PptxThemeColorRef;
1446
1514
  align?: 'left' | 'center' | 'right' | 'justify' | 'justLow' | 'dist' | 'thaiDist';
1447
1515
  /**
1448
1516
  * Vertical text-box anchor (`a:bodyPr/@anchor`, `ST_TextAnchoringType`).
@@ -1868,6 +1936,12 @@ interface BulletInfo {
1868
1936
  * identity rather than being flattened to `<a:srgbClr/>` on save.
1869
1937
  */
1870
1938
  colorXml?: XmlObject;
1939
+ /**
1940
+ * Typed theme colour reference for the bullet colour, set when
1941
+ * {@link colorXml} is a plain `a:schemeClr`. Wins on save, same as
1942
+ * {@link TextStyle.colorRef}.
1943
+ */
1944
+ colorRef?: PptxThemeColorRef;
1871
1945
  /** True when `a:buNone` explicitly suppresses bullets. */
1872
1946
  none?: boolean;
1873
1947
  /** Picture bullet: relationship ID from `a:buBlip` → `a:blip[@r:embed]`. */
@@ -2320,7 +2394,38 @@ interface PptxChartDataPointPicture {
2320
2394
  //#region src/core/types/chart-pivot-format.d.ts
2321
2395
  interface PptxChartPivotFormat {
2322
2396
  index: number;
2397
+ /**
2398
+ * Typed projection of `spPr` (fill/stroke colour, stroke width, dash
2399
+ * style). When the parser is given a colour resolver (the normal case: the
2400
+ * runtime always supplies one), both a literal `a:srgbClr` and an
2401
+ * `a:schemeClr` theme reference (with its `lumMod`/`lumOff`/`tint`/`shade`
2402
+ * modifiers) resolve to a hex colour here, the same theme +
2403
+ * `c:clrMapOvr` chain the rest of chart parsing uses. Without a resolver
2404
+ * (e.g. a hand-built `PptxChartPivotFormat` with no theme to resolve
2405
+ * against), only the literal case resolves. Either way the authored node
2406
+ * is byte-preserved through {@link shapePropertiesXml} until this field is
2407
+ * set to something that no longer matches what re-parses off the current
2408
+ * XML; setting it then re-derives `shapePropertiesXml` on save (merged
2409
+ * onto whatever was already authored, keeping an unrelated schemeClr
2410
+ * reference alive when the colour itself is unchanged) unless
2411
+ * `shapePropertiesXml` is set explicitly, which wins.
2412
+ */
2413
+ shapeProperties?: PptxChartShapeProps;
2414
+ /**
2415
+ * Typed projection of `txPr`'s `a:p/a:pPr/a:defRPr` (size/bold/italic/
2416
+ * colour/family), the same shape a legend entry or data-table's text
2417
+ * override models. Colour resolution mirrors {@link shapeProperties}
2418
+ * (theme-resolved `schemeClr` when a colour resolver is supplied, literal
2419
+ * `srgbClr` otherwise). See {@link txPrXml} for the raw fallback.
2420
+ */
2421
+ textStyle?: PptxChartLegendTextStyle;
2422
+ /**
2423
+ * Typed projection of `marker` (symbol/size/spPr). See {@link markerXml}
2424
+ * for the raw fallback.
2425
+ */
2426
+ marker?: PptxChartMarker;
2323
2427
  shapePropertiesXml?: XmlObject | null;
2428
+ txPrXml?: XmlObject | null;
2324
2429
  markerXml?: XmlObject | null;
2325
2430
  dataLabelXml?: XmlObject | null;
2326
2431
  extensionListXml?: XmlObject | null;
@@ -2479,21 +2584,40 @@ interface PptxChartStyleDefinition {
2479
2584
  plotArea?: PptxChartStylePartEntry;
2480
2585
  }
2481
2586
  //#endregion
2482
- //#region src/core/types/chart-user-shapes.d.ts
2587
+ //#region src/core/types/chart-title.d.ts
2483
2588
  /**
2484
- * Types for chart drawing-overlay shapes (`c:userShapes`).
2589
+ * Chart title rich-text run type, split out of `types/chart.ts` (already at
2590
+ * the repo's file-size limit) to keep that module from growing further.
2485
2591
  *
2486
- * A chart's `c:userShapes` element carries an `r:id` that references a
2487
- * separate drawing part (`ppt/drawings/drawingN.xml`) whose root is a
2488
- * `c:userShapes` element populated with `cdr:relSizeAnchor` /
2489
- * `cdr:absSizeAnchor` wrappers around `sp` / `pic` / `cxnSp` shapes drawn on
2490
- * top of the chart plot. These interfaces describe the parsed, renderable
2491
- * overlay model. The raw reference is preserved separately on
2492
- * {@link PptxChartData.userShapesXml} for verbatim round-trip save; this model
2493
- * is render-only.
2592
+ * @module pptx-types/chart-title
2593
+ */
2594
+ /**
2595
+ * One run of a chart title's rich text (`c:title/c:tx/c:rich/a:p/a:r`).
2494
2596
  *
2495
- * @module pptx-types/chart-user-shapes
2597
+ * The flat `PptxChartData.title` field only ever captured the FIRST run's
2598
+ * text with no per-run formatting; `titleRuns` (when present) is the
2599
+ * lossless, multi-run replacement parsed from the same `c:rich` body. Absent
2600
+ * when the title has no rich text at all (an empty/auto title, or one
2601
+ * authored as a linked-cell reference).
2496
2602
  */
2603
+ interface PptxChartTitleRun {
2604
+ /** This run's text (`a:t`). */
2605
+ text: string;
2606
+ /** `a:rPr/@_b`. */
2607
+ bold?: boolean;
2608
+ /** `a:rPr/@_i`. */
2609
+ italic?: boolean;
2610
+ /**
2611
+ * Font size in POINTS (`a:rPr/@_sz`, hundredths of a point / 100), matching
2612
+ * `PptxChartLegendTextStyle.fontSize`'s convention rather than the pixel
2613
+ * convention `TextStyle.fontSize` uses for slide text.
2614
+ */
2615
+ fontSize?: number;
2616
+ /** Resolved hex colour (e.g. `"#FF0000"`) from `a:rPr/a:solidFill`. */
2617
+ color?: string;
2618
+ }
2619
+ //#endregion
2620
+ //#region src/core/types/chart-user-shapes.d.ts
2497
2621
  /** A single paragraph of overlay-shape text with light formatting. */
2498
2622
  interface PptxChartUserShapeParagraph {
2499
2623
  /** Joined run text of the paragraph. */
@@ -2509,6 +2633,80 @@ interface PptxChartUserShapeParagraph {
2509
2633
  /** Paragraph alignment (`a:pPr/@algn`): left / centre / right. */
2510
2634
  align?: 'l' | 'ctr' | 'r';
2511
2635
  }
2636
+ /**
2637
+ * The DrawingML 2D group transform (`a:xfrm` inside `cdr:grpSpPr`) that
2638
+ * anchors a `grpSp`'s own box ({@link off}/{@link ext}) and establishes the
2639
+ * coordinate space its children are expressed in ({@link chOff}/{@link
2640
+ * chExt}), all in EMU. A child's position within the group is mapped into
2641
+ * the group's own box via
2642
+ * `frac = (child.off - chOff) / chExt`, then applied to the enclosing
2643
+ * anchor's box; see `flattenChartUserShapes` in
2644
+ * `chart-user-shapes-parser.ts`.
2645
+ */
2646
+ interface PptxChartUserShapeGroupTransform {
2647
+ /** The group's own position in its parent's coordinate space, in EMU. */
2648
+ off: {
2649
+ x: number;
2650
+ y: number;
2651
+ };
2652
+ /** The group's own size in its parent's coordinate space, in EMU. */
2653
+ ext: {
2654
+ cx: number;
2655
+ cy: number;
2656
+ };
2657
+ /** Origin of the child coordinate space (`a:chOff`), in EMU. */
2658
+ chOff: {
2659
+ x: number;
2660
+ y: number;
2661
+ };
2662
+ /** Size of the child coordinate space (`a:chExt`), in EMU. */
2663
+ chExt: {
2664
+ cx: number;
2665
+ cy: number;
2666
+ };
2667
+ }
2668
+ /**
2669
+ * One shape grouped inside a `cdr:grpSp` (or a nested `cdr:grpSp` itself).
2670
+ * Unlike a top-level {@link PptxChartUserShape}, a group child has no
2671
+ * drawing anchor of its own: its position is expressed in its parent
2672
+ * group's child coordinate space via {@link off}/{@link ext} (EMU, read
2673
+ * from the child's own `a:xfrm`), not as a chart-relative fraction.
2674
+ */
2675
+ interface PptxChartUserShapeGroupChild {
2676
+ /** Shape kind, same vocabulary as {@link PptxChartUserShape.kind}. */
2677
+ kind: 'sp' | 'cxnSp' | 'pic' | 'grpSp' | 'graphicFrame';
2678
+ /** Position within the parent group's child coordinate space, in EMU. */
2679
+ off: {
2680
+ x: number;
2681
+ y: number;
2682
+ };
2683
+ /** Size within the parent group's child coordinate space, in EMU. */
2684
+ ext: {
2685
+ cx: number;
2686
+ cy: number;
2687
+ };
2688
+ /** Preset geometry name (`a:prstGeom/@prst`), defaulting to `"rect"`. */
2689
+ prst?: string;
2690
+ /** Resolved solid-fill hex colour, when present. */
2691
+ fill?: string;
2692
+ /** Resolved line/stroke hex colour, when present. */
2693
+ stroke?: string;
2694
+ /** Line width in points (`a:ln/@w` divided by 12700), when present. */
2695
+ strokeWidth?: number;
2696
+ /** Text paragraphs of the shape's `txBody`, when present. */
2697
+ paragraphs?: PptxChartUserShapeParagraph[];
2698
+ /**
2699
+ * Verbatim source XML of a `pic`/`graphicFrame` child, or of this node
2700
+ * itself when `kind === 'grpSp'` and the nested group is untouched since
2701
+ * parse. See {@link PptxChartUserShape.rawXml}'s doc for the same
2702
+ * contract one level up.
2703
+ */
2704
+ rawXml?: XmlObject;
2705
+ /** Present when `kind === 'grpSp'`: this nested group's own transform. */
2706
+ transform?: PptxChartUserShapeGroupTransform;
2707
+ /** Present when `kind === 'grpSp'`: this nested group's own children. */
2708
+ children?: PptxChartUserShapeGroupChild[];
2709
+ }
2512
2710
  /**
2513
2711
  * A parsed chart-overlay shape positioned by a drawing anchor.
2514
2712
  *
@@ -2519,12 +2717,13 @@ interface PptxChartUserShapeParagraph {
2519
2717
  interface PptxChartUserShape {
2520
2718
  /**
2521
2719
  * Shape kind: text/preset shape, connector, picture, a group of the
2522
- * above (`grpSp`, flattened: each grouped child becomes its own entry
2523
- * reusing the anchor's own bounding box, an approximation since the
2524
- * group's internal chOff/chExt transform is not applied), or a bare
2525
- * placeholder for a `graphicFrame` anchor child (deep content such as a
2526
- * nested chart or table is out of scope; it only keeps the anchor's
2527
- * space accounted for instead of the whole overlay disappearing).
2720
+ * above (`grpSp`, with its own {@link transform} and {@link children},
2721
+ * nested arbitrarily; use `flattenChartUserShapes` from
2722
+ * `chart-user-shapes-parser.ts` to get a flat, render-ready leaf list
2723
+ * with the group transform already applied), or a bare placeholder for
2724
+ * a `graphicFrame` anchor child (deep content such as a nested chart or
2725
+ * table is out of scope; it only keeps the anchor's space accounted for
2726
+ * instead of the whole overlay disappearing).
2528
2727
  */
2529
2728
  kind: 'sp' | 'cxnSp' | 'pic' | 'grpSp' | 'graphicFrame';
2530
2729
  /** Anchor kind that positioned the shape. */
@@ -2554,6 +2753,26 @@ interface PptxChartUserShape {
2554
2753
  strokeWidth?: number;
2555
2754
  /** Text paragraphs of the shape's `txBody`, when present. */
2556
2755
  paragraphs?: PptxChartUserShapeParagraph[];
2756
+ /**
2757
+ * Verbatim source XML of a `pic` or `graphicFrame` anchor child (the
2758
+ * `cdr:pic` / `cdr:graphicFrame` node itself, not the enclosing anchor),
2759
+ * or of the `cdr:grpSp` node itself when `kind === 'grpSp'` and the
2760
+ * group is untouched since parse (byte-identical passthrough). None of
2761
+ * these three kinds have a reconstructable typed representation that is
2762
+ * guaranteed lossless (a picture's blip reference, a nested chart/table's
2763
+ * graphic content, or a group's exact child ordering/ids), so the
2764
+ * serializer re-emits this verbatim when present instead of a lossy
2765
+ * rebuild. Editing a shape inside a group (via the SDK's path-based
2766
+ * overlay operations) clears the group's `rawXml` so the serializer
2767
+ * regenerates it from {@link transform}/{@link children} instead. Absent
2768
+ * for `sp`/`cxnSp`, which round-trip losslessly through their typed
2769
+ * fields above.
2770
+ */
2771
+ rawXml?: XmlObject;
2772
+ /** Present when `kind === 'grpSp'`: the group's own transform. */
2773
+ transform?: PptxChartUserShapeGroupTransform;
2774
+ /** Present when `kind === 'grpSp'`: the grouped children, nested arbitrarily. */
2775
+ children?: PptxChartUserShapeGroupChild[];
2557
2776
  }
2558
2777
  //#endregion
2559
2778
  //#region src/core/types/chart.d.ts
@@ -2627,6 +2846,10 @@ interface PptxChartTrendline {
2627
2846
  displayRSq?: boolean;
2628
2847
  displayEq?: boolean;
2629
2848
  color?: string;
2849
+ /** Trendline width in points (`c:trendline/c:spPr/a:ln/@w`, EMU / 12700). */
2850
+ lineWidth?: number;
2851
+ /** Trendline dash style (`c:trendline/c:spPr/a:ln/a:prstDash/@val`). */
2852
+ lineDashStyle?: string;
2630
2853
  label?: PptxChartTrendlineLabel | null;
2631
2854
  }
2632
2855
  /** Typed, commonly edited properties of `c:trendlineLbl`. */
@@ -2672,6 +2895,10 @@ interface PptxChartErrBars {
2672
2895
  customMinus?: number[];
2673
2896
  noEndCap?: boolean;
2674
2897
  color?: string;
2898
+ /** Error-bar line width in points (`c:errBars/c:spPr/a:ln/@w`, EMU / 12700). */
2899
+ width?: number;
2900
+ /** Error-bar line dash style (`c:errBars/c:spPr/a:ln/a:prstDash/@val`). */
2901
+ dashStyle?: string;
2675
2902
  }
2676
2903
  /**
2677
2904
  * Visibility flags for the chart data table (axes + legend keys).
@@ -2798,6 +3025,12 @@ interface PptxChartDataLabel {
2798
3025
  * `.../a:p/a:pPr/a:defRPr` default-run-property style.
2799
3026
  */
2800
3027
  txPr?: PptxChartLegendTextStyle;
3028
+ /**
3029
+ * This label's own shape formatting (`c:dLbl/c:spPr`): fill/line colour,
3030
+ * width, and dash style for the label's callout box, taking precedence
3031
+ * over any chart/series-level default when set.
3032
+ */
3033
+ spPr?: PptxChartShapeProps;
2801
3034
  }
2802
3035
  /** Axis number format. */
2803
3036
  interface PptxChartAxisNumFmt {
@@ -3361,6 +3594,16 @@ interface PptxChartDateCategories {
3361
3594
  */
3362
3595
  interface PptxChartData {
3363
3596
  title?: string;
3597
+ /**
3598
+ * Rich-text runs of the title, parsed from `c:title/c:tx/c:rich` (issue:
3599
+ * chart title rich text). Lossless multi-run alternative to the flat
3600
+ * {@link title}: when present, the writer serialises every run's own
3601
+ * bold/italic/size/color; when absent, save falls back to the flat
3602
+ * `title` path as before. Only populated for a classic (`c:`) chart's
3603
+ * rich (typed) title, not a ChartEx (`cx:`) title or one authored as a
3604
+ * linked-cell reference.
3605
+ */
3606
+ titleRuns?: PptxChartTitleRun[];
3364
3607
  chartType: PptxChartType;
3365
3608
  categories: string[];
3366
3609
  /**
@@ -3452,8 +3695,10 @@ interface PptxChartData {
3452
3695
  chartRelationshipId?: string;
3453
3696
  /** `null` explicitly removes an existing ChartML data table. */
3454
3697
  dataTable?: PptxChartDataTable | null;
3455
- dropLines?: PptxChartLineStyle;
3456
- hiLowLines?: PptxChartLineStyle;
3698
+ /** `null` explicitly removes an existing `c:dropLines` element. */
3699
+ dropLines?: PptxChartLineStyle | null;
3700
+ /** `null` explicitly removes an existing `c:hiLowLines` element. */
3701
+ hiLowLines?: PptxChartLineStyle | null;
3457
3702
  /** `null` explicitly removes an existing up/down-bars container. */
3458
3703
  upDownBars?: PptxChartUpDownBars | null;
3459
3704
  axes?: PptxChartAxisFormatting[];
@@ -3568,10 +3813,13 @@ interface PptxChartData {
3568
3813
  pivotFormats?: PptxChartPivotFormats | null;
3569
3814
  /**
3570
3815
  * Color-map override (`c:clrMapOvr`) carrying 12 attributes that
3571
- * remap theme colour roles for this chart only. Preserved as a flat
3572
- * `attribute → value` map for round-trip fidelity.
3816
+ * remap theme colour roles for this chart only. Modeled as a flat
3817
+ * `attribute -> value` map (e.g. `{ bg1: 'lt1', accent1: 'accent2' }`)
3818
+ * so unknown/future attributes round-trip without code changes.
3819
+ * `null` explicitly removes an existing `c:clrMapOvr`; an empty object
3820
+ * is treated the same as `null` on save.
3573
3821
  */
3574
- clrMapOvr?: Record<string, string>;
3822
+ clrMapOvr?: Record<string, string> | null;
3575
3823
  /**
3576
3824
  * Whether the chart's own cached numeric values use the 1904 date epoch
3577
3825
  * (`c:chartSpace/c:date1904/@val`). Independent of, and authoritative over,
@@ -4948,13 +5196,55 @@ interface PptxSmartArtData {
4948
5196
  drawingDirty?: boolean;
4949
5197
  }
4950
5198
  //#endregion
4951
- //#region src/core/types/table.d.ts
5199
+ //#region src/core/types/table-style-edit.d.ts
4952
5200
  /**
4953
- * Table types: cell styling, cell data, rows, table data, and the parsed
4954
- * table style map from `ppt/tableStyles.xml`.
5201
+ * A `a:fillRef`/`a:lnRef`/`a:effectRef`-style style-matrix reference: an
5202
+ * index into the theme's format scheme (`a:fmtScheme/a:fillStyleLst`, 1-based
5203
+ * per ECMA-376 §20.1.4.1.12) plus an optional colour transform child.
5204
+ *
5205
+ * Distinct from an already-resolved {@link ParsedTableStyleFill}: a fill ref
5206
+ * points AT a theme style-matrix entry rather than carrying a colour choice
5207
+ * directly, though the two commonly appear together (`<a:fillRef idx="2">
5208
+ * <a:schemeClr val="accent1"/></a:fillRef>`).
4955
5209
  *
4956
- * @module pptx-types/table
5210
+ * @example
5211
+ * ```ts
5212
+ * const ref: ParsedTableFillRef = { idx: 2, color: { schemeColor: 'accent1' } };
5213
+ * // => satisfies ParsedTableFillRef
5214
+ * ```
4957
5215
  */
5216
+ interface ParsedTableFillRef {
5217
+ /** 1-based index into the theme format scheme's fill style list. */
5218
+ idx: number;
5219
+ /** Colour transform child (`a:schemeClr`/`a:srgbClr`) applied to the referenced style. */
5220
+ color?: ParsedTableStyleFill;
5221
+ }
5222
+ /**
5223
+ * One leaf (or `effectDag`-wrapped) node of an `a:effectLst`/`a:effectDag`
5224
+ * effect chain, kept mostly opaque: {@link kind} names the OOXML element so a
5225
+ * consumer can recognise common effects (`outerShdw`, `glow`, `softEdge`,
5226
+ * `reflection`, `blur`, `innerShdw`, `prstShdw`, `fillOverlay`, `alphaModFix`,
5227
+ * `alphaInv`, `grayscl`, `biLevel`, `duotone`, `hsl`, `lum`, `tint`) without
5228
+ * this module re-deriving the full shape-effect taxonomy already modelled on
5229
+ * `ShapeStyle`; {@link xml} preserves the node verbatim for lossless re-emit.
5230
+ *
5231
+ * @example
5232
+ * ```ts
5233
+ * const effect: ParsedTableStyleEffect = {
5234
+ * kind: 'outerShdw',
5235
+ * xml: { '@_blurRad': '40000', '@_dist': '20000', '@_dir': '5400000' },
5236
+ * };
5237
+ * // => satisfies ParsedTableStyleEffect
5238
+ * ```
5239
+ */
5240
+ interface ParsedTableStyleEffect {
5241
+ /** The OOXML element's local name, e.g. `outerShdw`, `glow`, `softEdge`. */
5242
+ kind: string;
5243
+ /** Verbatim XML node (attributes + children) for lossless round-trip. */
5244
+ xml: XmlObject;
5245
+ }
5246
+ //#endregion
5247
+ //#region src/core/types/table.d.ts
4958
5248
  /**
4959
5249
  * Per-cell visual style for a table cell.
4960
5250
  *
@@ -4991,6 +5281,14 @@ interface PptxTableCellStyle {
4991
5281
  * future expansion alongside the run-properties round-trip path.
4992
5282
  */
4993
5283
  colorXml?: XmlObject;
5284
+ /**
5285
+ * Typed theme colour reference for the cell text colour, set when
5286
+ * {@link colorXml} is a plain `a:schemeClr`. Wins on save, mirroring
5287
+ * `TextStyle.colorRef`. Distinct from {@link ParsedTableStyleFill.schemeColor},
5288
+ * which describes a `ppt/tableStyles.xml` section fill rather than an
5289
+ * individual cell override.
5290
+ */
5291
+ colorRef?: PptxThemeColorRef;
4994
5292
  backgroundColor?: string;
4995
5293
  /**
4996
5294
  * Raw XML colour-choice node preserved from cell `a:tcPr/a:solidFill` for
@@ -4998,6 +5296,12 @@ interface PptxTableCellStyle {
4998
5296
  * {@link backgroundColor} still matches the original colour.
4999
5297
  */
5000
5298
  backgroundColorXml?: XmlObject;
5299
+ /**
5300
+ * Typed theme colour reference for the cell fill, set when
5301
+ * {@link backgroundColorXml} is a plain `a:schemeClr`. Wins on save,
5302
+ * mirroring `ShapeStyle.fillColorRef`.
5303
+ */
5304
+ backgroundColorRef?: PptxThemeColorRef;
5001
5305
  borderColor?: string;
5002
5306
  /** Top border width in px. */
5003
5307
  borderTopWidth?: number;
@@ -5311,12 +5615,14 @@ interface PptxTableData {
5311
5615
  */
5312
5616
  tableFill?: ParsedTableStyleFill;
5313
5617
  /**
5314
- * Whether `a:tblPr` carries its own `a:effectLst`/`a:effectDag`,
5315
- * independent of the referenced table style. Presence-only: the concrete
5316
- * effect is not yet rendered, and the raw XML round-trips separately via
5317
- * whatever preserves `a:tblPr`'s unrecognised children (issue G6).
5618
+ * `a:tblPr`'s own `a:effectLst` (or `a:effectDag`) effect chain,
5619
+ * independent of the referenced table style, decomposed into a typed
5620
+ * sequence of {@link ParsedTableStyleEffect} nodes (issue G6). Each node
5621
+ * keeps its own XML verbatim for lossless round-trip; empty array is
5622
+ * normalised to `undefined` by the parser so `tableEffects` is only ever
5623
+ * present when there is at least one effect.
5318
5624
  */
5319
- tableEffects?: boolean;
5625
+ tableEffects?: ParsedTableStyleEffect[];
5320
5626
  }
5321
5627
  /**
5322
5628
  * A single fill reference within a table style section.
@@ -5492,13 +5798,20 @@ interface ParsedTableStyleBorders {
5492
5798
  /**
5493
5799
  * Table background style (CT_TableBackgroundStyle, ECMA-376 §21.1.3.7).
5494
5800
  *
5495
- * Corresponds to the `<a:tblBg>` child of `<a:tblStyle>`. Currently
5496
- * captures only the resolved scheme-fill colour (verbatim XML for fill
5497
- * / effect references is preserved separately by the save path).
5801
+ * Corresponds to the `<a:tblBg>` child of `<a:tblStyle>`. Captures the
5802
+ * resolved scheme-fill colour, an unresolved style-matrix `a:fillRef`, and a
5803
+ * presence flag for effects (verbatim XML for the effect list is preserved
5804
+ * separately by the save path).
5498
5805
  */
5499
5806
  interface ParsedTableBackground {
5500
5807
  /** Solid fill (resolved from `a:fill > a:solidFill > a:schemeClr`). */
5501
5808
  fill?: ParsedTableStyleFill;
5809
+ /**
5810
+ * Style-matrix fill reference (`<a:fillRef idx="N">...</a:fillRef>`),
5811
+ * mutually exclusive with {@link fill} (`a:fill` is the choice sibling of
5812
+ * `a:fillRef` in `CT_TableBackgroundStyle`).
5813
+ */
5814
+ fillRef?: ParsedTableFillRef;
5502
5815
  /** Has an `a:effectLst` child that should be round-tripped. */
5503
5816
  hasEffectLst?: boolean;
5504
5817
  }
@@ -5612,6 +5925,21 @@ interface PptxAccessibilityProperties {
5612
5925
  */
5613
5926
  isDecorative?: boolean;
5614
5927
  }
5928
+ /**
5929
+ * Accessibility description/title from `p:cNvPr/@descr` / `@title` on a
5930
+ * plain shape, text box or connector (`p:sp` / `p:cxnSp`). The same pair of
5931
+ * attributes already round-trips for a graphic frame (see
5932
+ * {@link TablePptxElement.altText}) and, `descr` only, for a picture
5933
+ * ({@link PptxImageProperties.altText}); this mixin extends it to the three
5934
+ * element kinds whose PowerPoint Alt Text pane data was previously dropped
5935
+ * on load because neither field existed on the model.
5936
+ */
5937
+ interface PptxNonVisualDescription {
5938
+ /** `p:cNvPr/@descr`. */
5939
+ altText?: string;
5940
+ /** `p:cNvPr/@title`. */
5941
+ title?: string;
5942
+ }
5615
5943
  /**
5616
5944
  * `a:cNvPicPr/@preferRelativeResize` (issue G13), a picture-only non-visual
5617
5945
  * property distinct from `a:picLocks`.
@@ -5644,7 +5972,7 @@ interface PptxPictureNonVisualProperties {
5644
5972
  * // => satisfies TextPptxElement
5645
5973
  * ```
5646
5974
  */
5647
- interface TextPptxElement extends PptxElementBase, PptxTextProperties, PptxShapeProperties {
5975
+ interface TextPptxElement extends PptxElementBase, PptxTextProperties, PptxShapeProperties, PptxNonVisualDescription {
5648
5976
  type: 'text';
5649
5977
  }
5650
5978
  /**
@@ -5662,7 +5990,7 @@ interface TextPptxElement extends PptxElementBase, PptxTextProperties, PptxShape
5662
5990
  * // => satisfies ShapePptxElement
5663
5991
  * ```
5664
5992
  */
5665
- interface ShapePptxElement extends PptxElementBase, PptxTextProperties, PptxShapeProperties, PptxCustomPathProperties, PptxAccessibilityProperties {
5993
+ interface ShapePptxElement extends PptxElementBase, PptxTextProperties, PptxShapeProperties, PptxCustomPathProperties, PptxAccessibilityProperties, PptxNonVisualDescription {
5666
5994
  type: 'shape';
5667
5995
  }
5668
5996
  /**
@@ -5684,7 +6012,7 @@ interface ShapePptxElement extends PptxElementBase, PptxTextProperties, PptxShap
5684
6012
  * // => satisfies ConnectorPptxElement
5685
6013
  * ```
5686
6014
  */
5687
- interface ConnectorPptxElement extends PptxElementBase, PptxTextProperties, PptxShapeProperties {
6015
+ interface ConnectorPptxElement extends PptxElementBase, PptxTextProperties, PptxShapeProperties, PptxNonVisualDescription {
5688
6016
  type: 'connector';
5689
6017
  }
5690
6018
  /**
@@ -5750,6 +6078,13 @@ interface TablePptxElement extends PptxElementBase {
5750
6078
  type: 'table';
5751
6079
  /** Parsed table cell data for editing. */
5752
6080
  tableData?: PptxTableData;
6081
+ /**
6082
+ * Accessibility description from `p:nvGraphicFramePr/p:cNvPr/@descr`, the
6083
+ * same non-visual-properties attribute a picture's alt text comes from.
6084
+ */
6085
+ altText?: string;
6086
+ /** Accessibility title from `p:nvGraphicFramePr/p:cNvPr/@title`. */
6087
+ title?: string;
5753
6088
  /**
5754
6089
  * Unrecognised extensions captured from `a:graphicData/a:extLst` so they
5755
6090
  * round-trip losslessly. See {@link PptxGraphicFrameExtension}.
@@ -5765,6 +6100,10 @@ interface TablePptxElement extends PptxElementBase {
5765
6100
  interface ChartPptxElement extends PptxElementBase {
5766
6101
  type: 'chart';
5767
6102
  chartData?: PptxChartData;
6103
+ /** Accessibility description from `p:nvGraphicFramePr/p:cNvPr/@descr`. */
6104
+ altText?: string;
6105
+ /** Accessibility title from `p:nvGraphicFramePr/p:cNvPr/@title`. */
6106
+ title?: string;
5768
6107
  /** Unrecognised graphicFrame extLst extensions, captured verbatim for round-trip. */
5769
6108
  extensionXml?: PptxGraphicFrameExtension[];
5770
6109
  }
@@ -5782,6 +6121,10 @@ interface ChartPptxElement extends PptxElementBase {
5782
6121
  interface SmartArtPptxElement extends PptxElementBase {
5783
6122
  type: 'smartArt';
5784
6123
  smartArtData?: PptxSmartArtData;
6124
+ /** Accessibility description from `p:nvGraphicFramePr/p:cNvPr/@descr`. */
6125
+ altText?: string;
6126
+ /** Accessibility title from `p:nvGraphicFramePr/p:cNvPr/@title`. */
6127
+ title?: string;
5785
6128
  /** Unrecognised graphicFrame extLst extensions, captured verbatim for round-trip. */
5786
6129
  extensionXml?: PptxGraphicFrameExtension[];
5787
6130
  }
@@ -5868,6 +6211,10 @@ interface OlePptxElement extends PptxElementBase {
5868
6211
  * `false`; `undefined` means the source authored no explicit value.
5869
6212
  */
5870
6213
  oleUpdateAutomatic?: boolean;
6214
+ /** Accessibility description from `p:nvGraphicFramePr/p:cNvPr/@descr`. */
6215
+ altText?: string;
6216
+ /** Accessibility title from `p:nvGraphicFramePr/p:cNvPr/@title`. */
6217
+ title?: string;
5871
6218
  /** Unrecognised graphicFrame extLst extensions, captured verbatim for round-trip. */
5872
6219
  extensionXml?: PptxGraphicFrameExtension[];
5873
6220
  }
@@ -5959,6 +6306,15 @@ interface MediaPptxElement extends PptxElementBase {
5959
6306
  * (`r:embed`). Defaults to embedded when undefined.
5960
6307
  */
5961
6308
  isLinked?: boolean;
6309
+ /**
6310
+ * Accessibility description from `p:nvGraphicFramePr/p:cNvPr/@descr`.
6311
+ * Only populated for the `p:graphicFrame`-shaped (SDK-created) media
6312
+ * form; a `p:pic`-shaped media element's alt text is not currently
6313
+ * parsed (see `PptxHandlerRuntimePictureParsing.ts`).
6314
+ */
6315
+ altText?: string;
6316
+ /** Accessibility title from `p:nvGraphicFramePr/p:cNvPr/@title`. Same scope note as {@link altText}. */
6317
+ title?: string;
5962
6318
  /** Unrecognised graphicFrame extLst extensions, captured verbatim for round-trip. */
5963
6319
  extensionXml?: PptxGraphicFrameExtension[];
5964
6320
  }
@@ -6475,7 +6831,20 @@ interface PptxAnimationGraphicElementTarget {
6475
6831
  seriesIdx?: number;
6476
6832
  /** `@_categoryIdx`, 0-based category index, when the target is category-scoped. */
6477
6833
  categoryIdx?: number;
6478
- /** `@_bldStep` (ST_TLChartBuildStep): `category` / `categoryEl` / `series` / `seriesEl`. */
6834
+ /**
6835
+ * `p:dgm/@_id` (CT_TLBuildDiagram, ECMA-376 S19.5.10): the diagram DATA MODEL
6836
+ * point id (`dgm:pt/@modelId`) this per-stage effect reveals, when a
6837
+ * `p:bldDgm` build authors one effect per node instead of a single staged
6838
+ * reveal. `dgm`-kind targets only; a `chart`-kind target never carries this.
6839
+ * Matches `PptxSmartArtNode.id` (parsed from the same `@modelId`), so a
6840
+ * diagram renderer can reveal the exact authored node.
6841
+ */
6842
+ id?: string;
6843
+ /**
6844
+ * `@_bldStep`: `ST_TLChartBuildStep` (`category` / `categoryEl` / `series` /
6845
+ * `seriesEl`) for a `chart`-kind target, or `ST_TLDiagramBuildStep`
6846
+ * (`sp` / `bg`) for a `dgm`-kind target.
6847
+ */
6479
6848
  bldStep?: string;
6480
6849
  }
6481
6850
  /**
@@ -6925,6 +7294,34 @@ interface PptxNativeAnimation {
6925
7294
  * `childStyle`, a legacy compatibility hint. Round-tripped only.
6926
7295
  */
6927
7296
  cBhvrOverride?: 'normal' | 'childStyle';
7297
+ /**
7298
+ * `p:set` discrete attribute assignments composed alongside this effect
7299
+ * (ECMA-376 S19.5.79 CT_TLSetBehavior): an instantaneous (non-interpolated)
7300
+ * value change, as opposed to {@link attributeAnimations}'s `p:anim`
7301
+ * keyframe ramps. PowerPoint authors several font-style emphasis effects
7302
+ * this way (Bold Reveal, Underline, Bold Flash, Change Font Size), since
7303
+ * "on/off" or "size N" has nothing to interpolate. Not yet consulted by
7304
+ * shared playback (round-trip/typed-model only so far).
7305
+ */
7306
+ setAnimations?: PptxSetAnimation[];
7307
+ }
7308
+ /**
7309
+ * One `p:set` discrete (non-interpolated) attribute assignment composed
7310
+ * alongside an authored effect. See {@link PptxNativeAnimation.setAnimations}.
7311
+ *
7312
+ * @see ECMA-376 S19.5.79 CT_TLSetBehavior
7313
+ */
7314
+ interface PptxSetAnimation {
7315
+ /** Lowercased target attribute from `p:cBhvr/p:attrNameLst/p:attrName`. */
7316
+ attrName: string;
7317
+ /** Decoded value from `p:to` (same variant shape as a `p:tav/p:val`). */
7318
+ value: string | boolean | number;
7319
+ /** Discriminant indicating which `p:to` child carried the value. */
7320
+ valueType: 'str' | 'bool' | 'int' | 'flt' | 'clr';
7321
+ /** Duration from this behaviour's nested `p:cTn/@dur`. */
7322
+ durationMs?: number;
7323
+ /** Start offset from this behaviour's nested `p:stCondLst`. */
7324
+ delayMs?: number;
6928
7325
  }
6929
7326
  /**
6930
7327
  * Parsed `p:animEffect/@filter` (+ `@transition`) descriptor. ECMA-376
@@ -7192,6 +7589,16 @@ interface PptxElementAnimation {
7192
7589
  * OOXML equivalent and is not required for playback.
7193
7590
  */
7194
7591
  soundFileName?: string;
7592
+ /**
7593
+ * Per-build-level timing template(s) from the {@link sequence}'s own
7594
+ * `p:bldP/p:tmplLst` (ECMA-376 §19.5.84), carried over from the loaded
7595
+ * `PptxNativeAnimation.buildTemplates` this element animation was derived
7596
+ * from so a full timing-tree rebuild (`PptxAnimationWriteService`'s
7597
+ * `buildTimingXml`, when the slide had no prior `p:timing`) can re-emit
7598
+ * them instead of silently dropping the deck's authored per-level
7599
+ * defaults. Absent when {@link sequence} carries no such template.
7600
+ */
7601
+ buildTemplates?: PptxTimingTemplate[];
7195
7602
  }
7196
7603
  /**
7197
7604
  * A read-only anchor representing one of the deck's own effect groups: a
@@ -8108,6 +8515,22 @@ interface PptxActiveXControl {
8108
8515
  name?: string;
8109
8516
  /** Shape ID this control is linked to (from @spid). */
8110
8517
  shapeId?: string;
8518
+ /**
8519
+ * `p:control/@showAsIcon` (CT_Control, ECMA-376 S19.3.1.2): whether the
8520
+ * control renders as its static icon rather than its live appearance.
8521
+ * `undefined` when the source authored no explicit value (schema default
8522
+ * `false`).
8523
+ */
8524
+ showAsIcon?: boolean;
8525
+ /**
8526
+ * `p:control/@imgW` in EMU (ST_PositiveCoordinate32): the width the host
8527
+ * reserves for the control's icon/preview image. Distinct from
8528
+ * {@link width}, which is the fallback `p:pic`'s own `a:ext/@cx` in px;
8529
+ * `imgW`/`imgH` are direct attributes on `p:control` itself.
8530
+ */
8531
+ imgWidthEmu?: number;
8532
+ /** `p:control/@imgH` in EMU (ST_PositiveCoordinate32). @see imgWidthEmu */
8533
+ imgHeightEmu?: number;
8111
8534
  /** X position (px) of the control's fallback picture, if present. */
8112
8535
  x?: number;
8113
8536
  /** Y position (px) of the control's fallback picture, if present. */
@@ -8564,6 +8987,34 @@ interface PptxPhotoAlbum {
8564
8987
  layout?: string;
8565
8988
  /** Frame style applied to each photo (e.g. "frameStyle1"). */
8566
8989
  frame?: string;
8990
+ /**
8991
+ * `p:photoAlbum/@isPhoto` (ECMA-376 S19.2.1.27, CT_PhotoAlbum): whether
8992
+ * the pictures placed by the album wizard are real photographs, as
8993
+ * opposed to clip art or other embedded images. `undefined` when the
8994
+ * source authored no explicit value (schema default `false`); this is a
8995
+ * purely declarative wizard-provenance flag, not something this library
8996
+ * gates any layout/frame behaviour on.
8997
+ */
8998
+ isPhoto?: boolean;
8999
+ }
9000
+ /**
9001
+ * A recognizer-owned `p:smartTags` reference from `presentation.xml`
9002
+ * (CT_SmartTags, ECMA-376 S19.2.1.42): a bare relationship id pointing at a
9003
+ * legacy Office "Smart Tags" recognizer part, distinct from the
9004
+ * user-authored `p:tags` construct (see {@link PptxTagCollection}).
9005
+ *
9006
+ * This library has no data model for recognizer part CONTENT (there is no
9007
+ * way to create, inspect, or edit one through the public API), so this type
9008
+ * only captures enough to preserve an authored reference losslessly: the
9009
+ * relationship id and, when resolvable, the target part path.
9010
+ */
9011
+ interface PptxSmartTagsReference {
9012
+ /** Relationship id from `p:smartTags/@r:id`. */
9013
+ relId: string;
9014
+ /** Resolved ZIP path of the referenced recognizer part, when resolvable. */
9015
+ targetPath?: string;
9016
+ /** Raw `p:smartTags` XML retained for lossless round-trip. */
9017
+ rawXml?: XmlObject;
8567
9018
  }
8568
9019
  /**
8569
9020
  * East Asian line-break (kinsoku) settings from `p:kinsoku` in `presentation.xml`.
@@ -8628,6 +9079,13 @@ interface PptxData {
8628
9079
  themeOptions?: PptxThemeOption[];
8629
9080
  /** Parsed table style definitions from `ppt/tableStyles.xml`. */
8630
9081
  tableStyleMap?: ParsedTableStyleMap;
9082
+ /**
9083
+ * The current default table style GUID (`ppt/tableStyles.xml`'s
9084
+ * `a:tblStyleLst/@def`): the style PowerPoint applies to a newly inserted
9085
+ * table. Matches `PptxSaveOptions.tableStylesDefaultId` so a save call
9086
+ * that omits it can fall back to what was loaded.
9087
+ */
9088
+ tableStylesDefaultId?: string;
8631
9089
  /** Whether the presentation is password-protected. */
8632
9090
  isPasswordProtected?: boolean;
8633
9091
  /** Embedded font data (name + binary data URL) extracted from the presentation. */
@@ -8687,6 +9145,14 @@ interface PptxData {
8687
9145
  modifyVerifier?: PptxModifyVerifier;
8688
9146
  /** Photo album metadata from `p:photoAlbum` in `presentation.xml`. */
8689
9147
  photoAlbum?: PptxPhotoAlbum;
9148
+ /**
9149
+ * Legacy Smart Tags recognizer reference from `p:smartTags` in
9150
+ * `presentation.xml`. Read-only: there is no data model for the
9151
+ * recognizer part's own content, so this exists to make the reference
9152
+ * inspectable and to prove it survives a save (the owning part and its
9153
+ * relationship are preserved passively, like any other unmodelled part).
9154
+ */
9155
+ smartTags?: PptxSmartTagsReference;
8690
9156
  /** East Asian line-break settings from `p:kinsoku` in `presentation.xml`. */
8691
9157
  kinsoku?: PptxKinsoku;
8692
9158
  /** Custom XML data parts from `customXml/` in the OPC package. */
@@ -8851,6 +9317,14 @@ type FillInput = {
8851
9317
  type: 'solid';
8852
9318
  color: string;
8853
9319
  opacity?: number;
9320
+ /**
9321
+ * A theme colour to use instead of a plain hex. When set, the shape
9322
+ * saves as `<a:schemeClr>` (e.g. `{ scheme: 'accent1', lumMod: 0.8 }`
9323
+ * for "Accent 1, Lighter 80%") so it keeps following the theme after a
9324
+ * later theme change; `color` still supplies the immediate resolved
9325
+ * hex for renderers that read it directly.
9326
+ */
9327
+ themeColorRef?: PptxThemeColorRef;
8854
9328
  } | {
8855
9329
  type: 'gradient';
8856
9330
  /**
@@ -8886,6 +9360,8 @@ interface StrokeInput {
8886
9360
  opacity?: number;
8887
9361
  join?: 'round' | 'bevel' | 'miter';
8888
9362
  cap?: 'flat' | 'rnd' | 'sq';
9363
+ /** A theme colour for the outline; see {@link FillInput}'s `themeColorRef`. */
9364
+ themeColorRef?: PptxThemeColorRef;
8889
9365
  }
8890
9366
  interface ShadowInput {
8891
9367
  color?: string;
@@ -8902,6 +9378,8 @@ interface TextStyleInput {
8902
9378
  underline?: boolean;
8903
9379
  strikethrough?: boolean;
8904
9380
  color?: string;
9381
+ /** A theme colour for the run; see {@link FillInput}'s `themeColorRef`. */
9382
+ themeColorRef?: PptxThemeColorRef;
8905
9383
  alignment?: 'left' | 'center' | 'right' | 'justify';
8906
9384
  verticalAlignment?: 'top' | 'middle' | 'bottom';
8907
9385
  lineSpacing?: number;
@@ -9529,6 +10007,24 @@ interface PptxHandlerSaveOptions {
9529
10007
  * part untouched.
9530
10008
  */
9531
10009
  tableStyles?: ParsedTableStyleMap;
10010
+ /**
10011
+ * Set `ppt/tableStyles.xml`'s `<a:tblStyleLst @def>` to this style GUID
10012
+ * (normalised to uppercase-with-braces). `undefined` preserves the
10013
+ * existing default; there is no removal form (`@def` is required by the
10014
+ * schema and PowerPoint always points it at a real style). No-op when the
10015
+ * archive has no `ppt/tableStyles.xml`, same as {@link tableStyles}.
10016
+ */
10017
+ tableStylesDefaultId?: string;
10018
+ /**
10019
+ * Style GUIDs to remove from `ppt/tableStyles.xml` entirely, kept as a
10020
+ * separate opt-in list rather than inferred from omission on
10021
+ * {@link tableStyles}: that map is documented as safe to pass a PARTIAL
10022
+ * edit (only the entries a caller actually touched), so treating every
10023
+ * GUID missing from it as "delete this" would silently destroy untouched
10024
+ * styles on an ordinary targeted edit. A GUID here that is also the
10025
+ * current (or newly requested) default is left in place and skipped.
10026
+ */
10027
+ tableStylesToDelete?: string[];
9532
10028
  /**
9533
10029
  * Target output format.
9534
10030
  * - `'pptx'` (default): Standard presentation.
@@ -10525,6 +11021,23 @@ interface CollaborationConfig {
10525
11021
  //#region src/render/animation-authoring.d.ts
10526
11022
  /** One of the three animation buckets a preset can occupy on an element. */
10527
11023
  type AnimationGroup = 'entrance' | 'emphasis' | 'exit';
11024
+ //#endregion
11025
+ //#region src/render/animation-text-style-resolve.d.ts
11026
+ /**
11027
+ * Framework-neutral text-style override a font-style emphasis effect applies
11028
+ * on top of its target's own authored per-run bold/italic/underline/size/
11029
+ * colour. Every binding maps this onto its own text container so it OVERRIDES
11030
+ * the runs' inline styles (the runs carry explicit inline styles of their
11031
+ * own, so plain CSS inheritance cannot reach them).
11032
+ */
11033
+ interface TextStyleAnimationDescriptor {
11034
+ bold?: boolean;
11035
+ italic?: boolean;
11036
+ underline?: boolean;
11037
+ /** Relative multiplier against each run's own authored font size. */
11038
+ fontScale?: number;
11039
+ color?: string;
11040
+ }
10528
11041
  /**
10529
11042
  * Normalized staged-reveal mode for a chart graphic frame, derived from the
10530
11043
  * OOXML `a:bldChart/@bld` (or `p:bldOleChart/@bld`) token:
@@ -10580,6 +11093,27 @@ interface ChartRevealDescriptor {
10580
11093
  /** Individual cells revealed by a `bldStep="seriesEl"`/`"categoryEl"` effect. */
10581
11094
  points: readonly ChartRevealPoint[];
10582
11095
  }
11096
+ /**
11097
+ * Playback-time SmartArt diagram reveal state derived from AUTHORED
11098
+ * `p:graphicEl/p:dgm/@id` indices (see `diagram-reveal-descriptor`'s
11099
+ * `resolveDiagramRevealDescriptor`), rather than from click-count/time
11100
+ * progress. Present on {@link ElementAnimationState.diagramReveal} only when
11101
+ * every fired diagram-build step for the element carried `p:graphicEl` data.
11102
+ * A SmartArt renderer prefers this over the progress-based `build` /
11103
+ * {@link ElementBuildState} path when present, since it reflects the real
11104
+ * authored reveal set (correct even for a reversed-order or by-branch build),
11105
+ * and falls back to `build` when absent.
11106
+ */
11107
+ interface DiagramRevealDescriptor {
11108
+ /**
11109
+ * Whether the diagram's background/connector chrome should currently be
11110
+ * visible: `true` once any node-revealing or background-revealing
11111
+ * (`bldStep="bg"`) step has fired.
11112
+ */
11113
+ background: boolean;
11114
+ /** Data-model point ids (`PptxSmartArtNode.id`) revealed so far. */
11115
+ nodeIds: ReadonlySet<string>;
11116
+ }
10583
11117
  /**
10584
11118
  * Playback-time staged-build state surfaced on {@link ElementAnimationState}.
10585
11119
  * `progress` is the 0..1 fraction of the build revealed at the current playback
@@ -10620,6 +11154,17 @@ interface ElementAnimationState {
10620
11154
  mode: ChartBuildMode;
10621
11155
  descriptor: ChartRevealDescriptor;
10622
11156
  };
11157
+ /**
11158
+ * Authored-index SmartArt diagram reveal state (see
11159
+ * {@link DiagramRevealDescriptor}), present only when every fired
11160
+ * diagram-build step for this element carried `p:graphicEl` node-id data.
11161
+ * `diagram-build`'s `resolveRevealedSmartArtNodes` prefers this over `build`
11162
+ * when present.
11163
+ */
11164
+ diagramReveal?: {
11165
+ mode: DiagramBuildMode;
11166
+ descriptor: DiagramRevealDescriptor;
11167
+ };
10623
11168
  /**
10624
11169
  * True when an active `p:animClr` color animation targets this shape's fill.
10625
11170
  * A vector renderer should then paint the fill with `fill: inherit` so the
@@ -10633,6 +11178,18 @@ interface ElementAnimationState {
10633
11178
  * `stroke: inherit`. Absent/false means no active stroke-colour animation.
10634
11179
  */
10635
11180
  animatesStroke?: boolean;
11181
+ /**
11182
+ * Active discrete font-style / colour / size override (see
11183
+ * {@link TimelineStep.textStyle}) a font-style emphasis effect currently
11184
+ * applies to this element's text, OVERRIDING the runs' own inline
11185
+ * bold/italic/underline/size/colour. `animation-playback-engine.ts` writes
11186
+ * this on step start and again on cleanup (held in full when the effect's
11187
+ * `p:cTn/@fill` holds its end state, otherwise reverted); a text renderer
11188
+ * maps it onto its run markup via `buildTextStyleOverrideCss`
11189
+ * (`animation-text-style-css.ts`). Absent means no font-style emphasis
11190
+ * effect is currently active on this element.
11191
+ */
11192
+ textStyle?: TextStyleAnimationDescriptor;
10636
11193
  }
10637
11194
  //#endregion
10638
11195
  //#region src/render/table-merge.d.ts
@@ -11298,6 +11855,8 @@ interface MasterViewCrudAction {
11298
11855
  /** i18n key explaining why the button is disabled, set only when it is. */
11299
11856
  disabledReasonKey?: string;
11300
11857
  }
11858
+ /** The save options `PptxHandler.save` accepts (format, docProps, masters, ...). */
11859
+ type DeckSaveOptions = NonNullable<Parameters<PptxHandler['save']>[1]>;
11301
11860
  /**
11302
11861
  * Why the deck is being serialised, which is a separate question from whether
11303
11862
  * the user protected it.
@@ -11358,6 +11917,7 @@ interface DeckSaveIntent {
11358
11917
  passwordProtected?: boolean;
11359
11918
  purpose?: DeckSavePurpose;
11360
11919
  }
11920
+ type TableStyleSaveOptions = Pick<DeckSaveOptions, 'tableStyles' | 'tableStylesDefaultId' | 'tableStylesToDelete'>;
11361
11921
  //#endregion
11362
11922
  //#region src/render/viewer-preferences.d.ts
11363
11923
  /**
@@ -13379,6 +13939,14 @@ interface EditorStateDeps {
13379
13939
  * case core re-emits the load-time dimensions verbatim.
13380
13940
  */
13381
13941
  getSlideSize?: () => PptxSlideSize | undefined;
13942
+ /**
13943
+ * The `tableStyles`/`tableStylesDefaultId`/`tableStylesToDelete` save
13944
+ * options (see `pptx-viewer-shared`'s `tableStyleSaveOptions`). Table style
13945
+ * DEFINITION edits live on the loader (like slide size), not the undo
13946
+ * stack, so they reach the save through this dep the same way. Optional
13947
+ * for out-of-tree mounts and the unit tests.
13948
+ */
13949
+ getTableStyleOptions?: () => TableStyleSaveOptions;
13382
13950
  /**
13383
13951
  * Adopt a fresh handler in place of the loaded one. Master-view CRUD
13384
13952
  * (`masterCrud`) rebuilds the package through core and comes back with a
@@ -13517,6 +14085,12 @@ declare class EditorState {
13517
14085
  get customShows(): PptxCustomShow[];
13518
14086
  /** The colour picker's "Recent colours" row (`p:clrMru`), most-recent-first. */
13519
14087
  get mruColors(): string[];
14088
+ /**
14089
+ * The deck's resolved theme colour map (scheme key -> hex), for every
14090
+ * colour picker's "Theme Colors" grid (`buildThemeColorSwatchGrid`).
14091
+ * `undefined` before a theme has loaded.
14092
+ */
14093
+ get themeColorMap(): Record<string, string> | undefined;
13520
14094
  /**
13521
14095
  * Record a colour just picked in ANY colour picker (fill, line, text,
13522
14096
  * background, table cell, chart series, ...) into the recent-colours row
@@ -13544,6 +14118,11 @@ declare class EditorState {
13544
14118
  * same way the handler does.
13545
14119
  */
13546
14120
  getSlideSize(): PptxSlideSize | undefined;
14121
+ /**
14122
+ * The table style save options the next save should forward, or `{}` to
14123
+ * leave `ppt/tableStyles.xml` alone. See {@link EditorStateDeps.getTableStyleOptions}.
14124
+ */
14125
+ getTableStyleOptions(): TableStyleSaveOptions;
13547
14126
  /** Adopt a freshly loaded deck as the working document (see `loadEditorDocument`). */
13548
14127
  setSlides(...args: LoadDocumentArgs): void;
13549
14128
  /** Adopt a remote (collaboration) snapshot; see `applyRemoteEditorSlides`. */
@@ -14047,6 +14626,18 @@ interface SvelteAiBridgeDeps {
14047
14626
  getAppProperties(): PptxAppProperties | undefined;
14048
14627
  /** Custom document-property list (editor-tracked, undoable). */
14049
14628
  getCustomProperties(): PptxCustomProperty[];
14629
+ /**
14630
+ * `ppt/viewProps.xml` (grid/snap/guides toggles), loader-tracked. Included
14631
+ * so the deck tools' `getDeckData`/`applyDeckData` seam sees the same
14632
+ * fields the main Save/Export path persists (`saveEditorDocument`).
14633
+ */
14634
+ getViewProperties(): PptxViewProperties | undefined;
14635
+ /** Parsed `ppt/tableStyles.xml` map, loader-tracked. */
14636
+ getTableStyleMap(): ParsedTableStyleMap | undefined;
14637
+ /** `<a:tblStyleLst @def>` default style GUID, loader-tracked. */
14638
+ getTableStylesDefaultId(): string | undefined;
14639
+ /** `ppt/tags/*.xml` name/value metadata (editor-tracked, undoable). */
14640
+ getTagCollections(): PptxTagCollection[];
14050
14641
  /** Resize the slide canvas (loader value + editor history entry). */
14051
14642
  setCanvasSize(size: {
14052
14643
  width: number;
@@ -14061,6 +14652,18 @@ interface SvelteAiBridgeDeps {
14061
14652
  * core / app / custom together, so the bridge fans all three through here.
14062
14653
  */
14063
14654
  setDocumentProperties(core: PptxCoreProperties, app: PptxAppProperties, custom: PptxCustomProperty[]): void;
14655
+ /** Replace the view properties (grid/snap/guides toggles). Not undo-tracked, like the manual toggle. */
14656
+ setViewProperties(props: PptxViewProperties | undefined): void;
14657
+ /** Replace the table style map. Not undo-tracked, like the manual table style editor. */
14658
+ setTableStyleMap(map: ParsedTableStyleMap | undefined): void;
14659
+ /**
14660
+ * Replace the default table style GUID. No manual UI sets this in the
14661
+ * Svelte binding yet (a pre-existing gap, not introduced by this seam), so
14662
+ * this is not undo-tracked, like `setTableStyleMap`.
14663
+ */
14664
+ setTableStylesDefaultId(id: string | undefined): void;
14665
+ /** Replace the tag collections as one undoable edit. */
14666
+ setTagCollections(tags: PptxTagCollection[]): void;
14064
14667
  }
14065
14668
  /** Build the AI bridge that exposes the live Svelte viewer to the AI core. */
14066
14669
  declare function createSvelteAiBridge(deps: SvelteAiBridgeDeps): PptxAiBridge;
@@ -14161,6 +14764,14 @@ declare class PresentationLoader {
14161
14764
  presentationTheme: PptxTheme | undefined;
14162
14765
  /** Parsed presentation table-style definitions keyed by style id. */
14163
14766
  tableStyleMap: ParsedTableStyleMap | undefined;
14767
+ /** `ppt/tableStyles.xml`'s `<a:tblStyleLst @def>` default style GUID. */
14768
+ tableStylesDefaultId: string | undefined;
14769
+ /**
14770
+ * Style GUIDs deleted from `tableStyleMap` via the table style editor,
14771
+ * pending removal from `ppt/tableStyles.xml` on the next save. See
14772
+ * `tableStyleSaveOptions` / `applyTableStyleDelete` in `pptx-viewer-shared`.
14773
+ */
14774
+ tableStylesToDelete: string[];
14164
14775
  /** True while a load is in flight. */
14165
14776
  loading: boolean;
14166
14777
  /** Error message from the last failed load, or null. */
@@ -14289,6 +14900,13 @@ interface CollaborationDeps {
14289
14900
  getConfig: () => CollaborationConfig | undefined;
14290
14901
  /** Return the loaded source bytes for elected-writer (role 'owner') write-back. */
14291
14902
  getSourceBytes?: () => Uint8Array | null;
14903
+ /**
14904
+ * Session-level save options (view properties, table styles, tags, deck
14905
+ * properties, ...), built the same way as the Save/Export path
14906
+ * (`buildDeckSaveOptions`). Without this the elected-writer write-back
14907
+ * dropped every session-level edit outside `slides`.
14908
+ */
14909
+ getSaveOptions?: () => PptxHandlerSaveOptions;
14292
14910
  /** Slide canvas width/height (unscaled px), used to clamp incoming cursor coordinates. */
14293
14911
  getCanvasWidth?: () => number | undefined;
14294
14912
  getCanvasHeight?: () => number | undefined;