pptx-vanilla-viewer 2.6.0 → 2.8.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.
package/dist/index.d.ts CHANGED
@@ -3,7 +3,7 @@ import "jszip";
3
3
  import { ChatTransport, LanguageModel, ToolSet, UIMessage } from "ai";
4
4
  import "pptx-viewer-mcp";
5
5
  import { Options } from "html2canvas-pro";
6
- //#region ../core/dist/text-operations-BB__gyrk.d.ts
6
+ //#region ../core/dist/text-operations-BHja_PYB.d.ts
7
7
  //#region src/core/types/actions.d.ts
8
8
  /**
9
9
  * Action types: hyperlinks, slide jumps, macros, and action buttons.
@@ -639,6 +639,44 @@ interface PptxCustomPathProperties {
639
639
  customGeometryTextRect?: CustomGeometryTextRect;
640
640
  }
641
641
  //#endregion
642
+ //#region src/core/types/color-ref.d.ts
643
+ /**
644
+ * Theme colour references: the typed counterpart of `<a:schemeClr>`.
645
+ *
646
+ * A colour picked from the theme palette is remembered as a scheme slot plus
647
+ * PowerPoint's luminance variants rather than as the sRGB it currently
648
+ * resolves to, so a later theme change re-colours the shape (and a saved file
649
+ * keeps `<a:schemeClr>` instead of a canonical `<a:srgbClr>`).
650
+ *
651
+ * @module types/color-ref
652
+ */
653
+ /**
654
+ * The scheme slot names `a:schemeClr/@val` accepts (ECMA-376 `ST_SchemeColorIndex`).
655
+ * `bg1`/`tx1`/`bg2`/`tx2` are the colour-map aliases a slide resolves through
656
+ * `p:clrMap`; `phClr` is the placeholder colour used inside a theme's style
657
+ * matrix and is never chosen from a picker.
658
+ */
659
+ type PptxThemeColorSchemeName = 'dk1' | 'lt1' | 'dk2' | 'lt2' | 'accent1' | 'accent2' | 'accent3' | 'accent4' | 'accent5' | 'accent6' | 'hlink' | 'folHlink' | 'bg1' | 'tx1' | 'bg2' | 'tx2' | 'phClr';
660
+ /**
661
+ * A theme colour choice. Every transform is a 0..1 fraction of the OOXML
662
+ * percentage (`lumMod val="20000"` is `lumMod: 0.2`), matching how the parser
663
+ * reads them, and is applied in the order `a:schemeClr` children are written:
664
+ * `tint`, `shade`, `lumMod`, `lumOff`, `alpha`.
665
+ */
666
+ interface PptxThemeColorRef {
667
+ scheme: PptxThemeColorSchemeName;
668
+ /** `a:lumMod`: multiply HSL luminance (PowerPoint's "Lighter/Darker" rows). */
669
+ lumMod?: number;
670
+ /** `a:lumOff`: add to HSL luminance after `lumMod` ("Lighter N%" rows). */
671
+ lumOff?: number;
672
+ /** `a:tint`: blend towards white. */
673
+ tint?: number;
674
+ /** `a:shade`: blend towards black. */
675
+ shade?: number;
676
+ /** `a:alpha`: opacity fraction (1 = opaque). */
677
+ alpha?: number;
678
+ }
679
+ //#endregion
642
680
  //#region src/core/types/effect-dag.d.ts
643
681
  type EffectDagBlendMode = 'darken' | 'lighten' | 'mult' | 'over' | 'screen';
644
682
  type EffectDagContainerType = 'sib' | 'tree';
@@ -928,6 +966,15 @@ interface ShapeStyle {
928
966
  * back to canonical `<a:srgbClr>`.
929
967
  */
930
968
  fillColorXml?: XmlObject;
969
+ /**
970
+ * Typed theme colour reference for the fill, set when {@link fillColorXml}
971
+ * is a plain `a:schemeClr` (see `themeColorRefFromColorChoice`). When
972
+ * present it WINS on save: the writer emits `<a:schemeClr>` from this ref
973
+ * instead of the resolved {@link fillColor}, so the fill keeps following
974
+ * the theme palette after a later theme change. `undefined` means the fill
975
+ * is a plain hex (or a colour kind a ref cannot express).
976
+ */
977
+ fillColorRef?: PptxThemeColorRef;
931
978
  fillGradient?: string;
932
979
  /** Original `gradFill` XML retained for unknown-child and extension round-tripping. */
933
980
  fillGradientXml?: XmlObject;
@@ -962,6 +1009,12 @@ interface ShapeStyle {
962
1009
  opacity?: number;
963
1010
  /** Raw XML colour node preserved for round-trip (e.g. a:schemeClr with transforms). */
964
1011
  originalColorXml?: XmlObject;
1012
+ /**
1013
+ * Typed theme colour reference for this stop, set when
1014
+ * {@link originalColorXml} is a plain `a:schemeClr`. Wins on save, same
1015
+ * as {@link ShapeStyle.fillColorRef}.
1016
+ */
1017
+ colorRef?: PptxThemeColorRef;
965
1018
  }>;
966
1019
  fillGradientAngle?: number;
967
1020
  fillGradientType?: 'linear' | 'radial';
@@ -1008,6 +1061,12 @@ interface ShapeStyle {
1008
1061
  * round-trip serialisation. See {@link fillColorXml} for the rationale.
1009
1062
  */
1010
1063
  strokeColorXml?: XmlObject;
1064
+ /**
1065
+ * Typed theme colour reference for the outline, mirroring
1066
+ * {@link fillColorRef}: set when {@link strokeColorXml} is a plain
1067
+ * `a:schemeClr`, and wins on save.
1068
+ */
1069
+ strokeColorRef?: PptxThemeColorRef;
1011
1070
  /**
1012
1071
  * Kind of fill painted on the outline (`a:ln` child). Distinguishes a solid
1013
1072
  * outline from a gradient/pattern/none outline so save can emit the correct
@@ -1511,6 +1570,15 @@ interface TextStyle {
1511
1570
  * verbatim when the resolved {@link color} still matches this node.
1512
1571
  */
1513
1572
  colorXml?: XmlObject;
1573
+ /**
1574
+ * Typed theme colour reference for the run's text colour, set when
1575
+ * {@link colorXml} is a plain `a:schemeClr` (see
1576
+ * `themeColorRefFromColorChoice`). When present it WINS on save: the
1577
+ * writer emits `<a:schemeClr>` from this ref instead of the resolved
1578
+ * {@link color}, so the text keeps following the theme palette after a
1579
+ * later theme change.
1580
+ */
1581
+ colorRef?: PptxThemeColorRef;
1514
1582
  align?: 'left' | 'center' | 'right' | 'justify' | 'justLow' | 'dist' | 'thaiDist';
1515
1583
  /**
1516
1584
  * Vertical text-box anchor (`a:bodyPr/@anchor`, `ST_TextAnchoringType`).
@@ -1936,6 +2004,12 @@ interface BulletInfo {
1936
2004
  * identity rather than being flattened to `<a:srgbClr/>` on save.
1937
2005
  */
1938
2006
  colorXml?: XmlObject;
2007
+ /**
2008
+ * Typed theme colour reference for the bullet colour, set when
2009
+ * {@link colorXml} is a plain `a:schemeClr`. Wins on save, same as
2010
+ * {@link TextStyle.colorRef}.
2011
+ */
2012
+ colorRef?: PptxThemeColorRef;
1939
2013
  /** True when `a:buNone` explicitly suppresses bullets. */
1940
2014
  none?: boolean;
1941
2015
  /** Picture bullet: relationship ID from `a:buBlip` → `a:blip[@r:embed]`. */
@@ -2388,7 +2462,38 @@ interface PptxChartDataPointPicture {
2388
2462
  //#region src/core/types/chart-pivot-format.d.ts
2389
2463
  interface PptxChartPivotFormat {
2390
2464
  index: number;
2465
+ /**
2466
+ * Typed projection of `spPr` (fill/stroke colour, stroke width, dash
2467
+ * style). When the parser is given a colour resolver (the normal case: the
2468
+ * runtime always supplies one), both a literal `a:srgbClr` and an
2469
+ * `a:schemeClr` theme reference (with its `lumMod`/`lumOff`/`tint`/`shade`
2470
+ * modifiers) resolve to a hex colour here, the same theme +
2471
+ * `c:clrMapOvr` chain the rest of chart parsing uses. Without a resolver
2472
+ * (e.g. a hand-built `PptxChartPivotFormat` with no theme to resolve
2473
+ * against), only the literal case resolves. Either way the authored node
2474
+ * is byte-preserved through {@link shapePropertiesXml} until this field is
2475
+ * set to something that no longer matches what re-parses off the current
2476
+ * XML; setting it then re-derives `shapePropertiesXml` on save (merged
2477
+ * onto whatever was already authored, keeping an unrelated schemeClr
2478
+ * reference alive when the colour itself is unchanged) unless
2479
+ * `shapePropertiesXml` is set explicitly, which wins.
2480
+ */
2481
+ shapeProperties?: PptxChartShapeProps;
2482
+ /**
2483
+ * Typed projection of `txPr`'s `a:p/a:pPr/a:defRPr` (size/bold/italic/
2484
+ * colour/family), the same shape a legend entry or data-table's text
2485
+ * override models. Colour resolution mirrors {@link shapeProperties}
2486
+ * (theme-resolved `schemeClr` when a colour resolver is supplied, literal
2487
+ * `srgbClr` otherwise). See {@link txPrXml} for the raw fallback.
2488
+ */
2489
+ textStyle?: PptxChartLegendTextStyle;
2490
+ /**
2491
+ * Typed projection of `marker` (symbol/size/spPr). See {@link markerXml}
2492
+ * for the raw fallback.
2493
+ */
2494
+ marker?: PptxChartMarker;
2391
2495
  shapePropertiesXml?: XmlObject | null;
2496
+ txPrXml?: XmlObject | null;
2392
2497
  markerXml?: XmlObject | null;
2393
2498
  dataLabelXml?: XmlObject | null;
2394
2499
  extensionListXml?: XmlObject | null;
@@ -2547,21 +2652,40 @@ interface PptxChartStyleDefinition {
2547
2652
  plotArea?: PptxChartStylePartEntry;
2548
2653
  }
2549
2654
  //#endregion
2550
- //#region src/core/types/chart-user-shapes.d.ts
2655
+ //#region src/core/types/chart-title.d.ts
2551
2656
  /**
2552
- * Types for chart drawing-overlay shapes (`c:userShapes`).
2657
+ * Chart title rich-text run type, split out of `types/chart.ts` (already at
2658
+ * the repo's file-size limit) to keep that module from growing further.
2553
2659
  *
2554
- * A chart's `c:userShapes` element carries an `r:id` that references a
2555
- * separate drawing part (`ppt/drawings/drawingN.xml`) whose root is a
2556
- * `c:userShapes` element populated with `cdr:relSizeAnchor` /
2557
- * `cdr:absSizeAnchor` wrappers around `sp` / `pic` / `cxnSp` shapes drawn on
2558
- * top of the chart plot. These interfaces describe the parsed, renderable
2559
- * overlay model. The raw reference is preserved separately on
2560
- * {@link PptxChartData.userShapesXml} for verbatim round-trip save; this model
2561
- * is render-only.
2660
+ * @module pptx-types/chart-title
2661
+ */
2662
+ /**
2663
+ * One run of a chart title's rich text (`c:title/c:tx/c:rich/a:p/a:r`).
2562
2664
  *
2563
- * @module pptx-types/chart-user-shapes
2665
+ * The flat `PptxChartData.title` field only ever captured the FIRST run's
2666
+ * text with no per-run formatting; `titleRuns` (when present) is the
2667
+ * lossless, multi-run replacement parsed from the same `c:rich` body. Absent
2668
+ * when the title has no rich text at all (an empty/auto title, or one
2669
+ * authored as a linked-cell reference).
2564
2670
  */
2671
+ interface PptxChartTitleRun {
2672
+ /** This run's text (`a:t`). */
2673
+ text: string;
2674
+ /** `a:rPr/@_b`. */
2675
+ bold?: boolean;
2676
+ /** `a:rPr/@_i`. */
2677
+ italic?: boolean;
2678
+ /**
2679
+ * Font size in POINTS (`a:rPr/@_sz`, hundredths of a point / 100), matching
2680
+ * `PptxChartLegendTextStyle.fontSize`'s convention rather than the pixel
2681
+ * convention `TextStyle.fontSize` uses for slide text.
2682
+ */
2683
+ fontSize?: number;
2684
+ /** Resolved hex colour (e.g. `"#FF0000"`) from `a:rPr/a:solidFill`. */
2685
+ color?: string;
2686
+ }
2687
+ //#endregion
2688
+ //#region src/core/types/chart-user-shapes.d.ts
2565
2689
  /** A single paragraph of overlay-shape text with light formatting. */
2566
2690
  interface PptxChartUserShapeParagraph {
2567
2691
  /** Joined run text of the paragraph. */
@@ -2577,6 +2701,80 @@ interface PptxChartUserShapeParagraph {
2577
2701
  /** Paragraph alignment (`a:pPr/@algn`): left / centre / right. */
2578
2702
  align?: 'l' | 'ctr' | 'r';
2579
2703
  }
2704
+ /**
2705
+ * The DrawingML 2D group transform (`a:xfrm` inside `cdr:grpSpPr`) that
2706
+ * anchors a `grpSp`'s own box ({@link off}/{@link ext}) and establishes the
2707
+ * coordinate space its children are expressed in ({@link chOff}/{@link
2708
+ * chExt}), all in EMU. A child's position within the group is mapped into
2709
+ * the group's own box via
2710
+ * `frac = (child.off - chOff) / chExt`, then applied to the enclosing
2711
+ * anchor's box; see `flattenChartUserShapes` in
2712
+ * `chart-user-shapes-parser.ts`.
2713
+ */
2714
+ interface PptxChartUserShapeGroupTransform {
2715
+ /** The group's own position in its parent's coordinate space, in EMU. */
2716
+ off: {
2717
+ x: number;
2718
+ y: number;
2719
+ };
2720
+ /** The group's own size in its parent's coordinate space, in EMU. */
2721
+ ext: {
2722
+ cx: number;
2723
+ cy: number;
2724
+ };
2725
+ /** Origin of the child coordinate space (`a:chOff`), in EMU. */
2726
+ chOff: {
2727
+ x: number;
2728
+ y: number;
2729
+ };
2730
+ /** Size of the child coordinate space (`a:chExt`), in EMU. */
2731
+ chExt: {
2732
+ cx: number;
2733
+ cy: number;
2734
+ };
2735
+ }
2736
+ /**
2737
+ * One shape grouped inside a `cdr:grpSp` (or a nested `cdr:grpSp` itself).
2738
+ * Unlike a top-level {@link PptxChartUserShape}, a group child has no
2739
+ * drawing anchor of its own: its position is expressed in its parent
2740
+ * group's child coordinate space via {@link off}/{@link ext} (EMU, read
2741
+ * from the child's own `a:xfrm`), not as a chart-relative fraction.
2742
+ */
2743
+ interface PptxChartUserShapeGroupChild {
2744
+ /** Shape kind, same vocabulary as {@link PptxChartUserShape.kind}. */
2745
+ kind: 'sp' | 'cxnSp' | 'pic' | 'grpSp' | 'graphicFrame';
2746
+ /** Position within the parent group's child coordinate space, in EMU. */
2747
+ off: {
2748
+ x: number;
2749
+ y: number;
2750
+ };
2751
+ /** Size within the parent group's child coordinate space, in EMU. */
2752
+ ext: {
2753
+ cx: number;
2754
+ cy: number;
2755
+ };
2756
+ /** Preset geometry name (`a:prstGeom/@prst`), defaulting to `"rect"`. */
2757
+ prst?: string;
2758
+ /** Resolved solid-fill hex colour, when present. */
2759
+ fill?: string;
2760
+ /** Resolved line/stroke hex colour, when present. */
2761
+ stroke?: string;
2762
+ /** Line width in points (`a:ln/@w` divided by 12700), when present. */
2763
+ strokeWidth?: number;
2764
+ /** Text paragraphs of the shape's `txBody`, when present. */
2765
+ paragraphs?: PptxChartUserShapeParagraph[];
2766
+ /**
2767
+ * Verbatim source XML of a `pic`/`graphicFrame` child, or of this node
2768
+ * itself when `kind === 'grpSp'` and the nested group is untouched since
2769
+ * parse. See {@link PptxChartUserShape.rawXml}'s doc for the same
2770
+ * contract one level up.
2771
+ */
2772
+ rawXml?: XmlObject;
2773
+ /** Present when `kind === 'grpSp'`: this nested group's own transform. */
2774
+ transform?: PptxChartUserShapeGroupTransform;
2775
+ /** Present when `kind === 'grpSp'`: this nested group's own children. */
2776
+ children?: PptxChartUserShapeGroupChild[];
2777
+ }
2580
2778
  /**
2581
2779
  * A parsed chart-overlay shape positioned by a drawing anchor.
2582
2780
  *
@@ -2587,12 +2785,13 @@ interface PptxChartUserShapeParagraph {
2587
2785
  interface PptxChartUserShape {
2588
2786
  /**
2589
2787
  * Shape kind: text/preset shape, connector, picture, a group of the
2590
- * above (`grpSp`, flattened: each grouped child becomes its own entry
2591
- * reusing the anchor's own bounding box, an approximation since the
2592
- * group's internal chOff/chExt transform is not applied), or a bare
2593
- * placeholder for a `graphicFrame` anchor child (deep content such as a
2594
- * nested chart or table is out of scope; it only keeps the anchor's
2595
- * space accounted for instead of the whole overlay disappearing).
2788
+ * above (`grpSp`, with its own {@link transform} and {@link children},
2789
+ * nested arbitrarily; use `flattenChartUserShapes` from
2790
+ * `chart-user-shapes-parser.ts` to get a flat, render-ready leaf list
2791
+ * with the group transform already applied), or a bare placeholder for
2792
+ * a `graphicFrame` anchor child (deep content such as a nested chart or
2793
+ * table is out of scope; it only keeps the anchor's space accounted for
2794
+ * instead of the whole overlay disappearing).
2596
2795
  */
2597
2796
  kind: 'sp' | 'cxnSp' | 'pic' | 'grpSp' | 'graphicFrame';
2598
2797
  /** Anchor kind that positioned the shape. */
@@ -2622,6 +2821,26 @@ interface PptxChartUserShape {
2622
2821
  strokeWidth?: number;
2623
2822
  /** Text paragraphs of the shape's `txBody`, when present. */
2624
2823
  paragraphs?: PptxChartUserShapeParagraph[];
2824
+ /**
2825
+ * Verbatim source XML of a `pic` or `graphicFrame` anchor child (the
2826
+ * `cdr:pic` / `cdr:graphicFrame` node itself, not the enclosing anchor),
2827
+ * or of the `cdr:grpSp` node itself when `kind === 'grpSp'` and the
2828
+ * group is untouched since parse (byte-identical passthrough). None of
2829
+ * these three kinds have a reconstructable typed representation that is
2830
+ * guaranteed lossless (a picture's blip reference, a nested chart/table's
2831
+ * graphic content, or a group's exact child ordering/ids), so the
2832
+ * serializer re-emits this verbatim when present instead of a lossy
2833
+ * rebuild. Editing a shape inside a group (via the SDK's path-based
2834
+ * overlay operations) clears the group's `rawXml` so the serializer
2835
+ * regenerates it from {@link transform}/{@link children} instead. Absent
2836
+ * for `sp`/`cxnSp`, which round-trip losslessly through their typed
2837
+ * fields above.
2838
+ */
2839
+ rawXml?: XmlObject;
2840
+ /** Present when `kind === 'grpSp'`: the group's own transform. */
2841
+ transform?: PptxChartUserShapeGroupTransform;
2842
+ /** Present when `kind === 'grpSp'`: the grouped children, nested arbitrarily. */
2843
+ children?: PptxChartUserShapeGroupChild[];
2625
2844
  }
2626
2845
  //#endregion
2627
2846
  //#region src/core/types/chart.d.ts
@@ -2695,6 +2914,10 @@ interface PptxChartTrendline {
2695
2914
  displayRSq?: boolean;
2696
2915
  displayEq?: boolean;
2697
2916
  color?: string;
2917
+ /** Trendline width in points (`c:trendline/c:spPr/a:ln/@w`, EMU / 12700). */
2918
+ lineWidth?: number;
2919
+ /** Trendline dash style (`c:trendline/c:spPr/a:ln/a:prstDash/@val`). */
2920
+ lineDashStyle?: string;
2698
2921
  label?: PptxChartTrendlineLabel | null;
2699
2922
  }
2700
2923
  /** Typed, commonly edited properties of `c:trendlineLbl`. */
@@ -2740,6 +2963,10 @@ interface PptxChartErrBars {
2740
2963
  customMinus?: number[];
2741
2964
  noEndCap?: boolean;
2742
2965
  color?: string;
2966
+ /** Error-bar line width in points (`c:errBars/c:spPr/a:ln/@w`, EMU / 12700). */
2967
+ width?: number;
2968
+ /** Error-bar line dash style (`c:errBars/c:spPr/a:ln/a:prstDash/@val`). */
2969
+ dashStyle?: string;
2743
2970
  }
2744
2971
  /**
2745
2972
  * Visibility flags for the chart data table (axes + legend keys).
@@ -2866,6 +3093,12 @@ interface PptxChartDataLabel {
2866
3093
  * `.../a:p/a:pPr/a:defRPr` default-run-property style.
2867
3094
  */
2868
3095
  txPr?: PptxChartLegendTextStyle;
3096
+ /**
3097
+ * This label's own shape formatting (`c:dLbl/c:spPr`): fill/line colour,
3098
+ * width, and dash style for the label's callout box, taking precedence
3099
+ * over any chart/series-level default when set.
3100
+ */
3101
+ spPr?: PptxChartShapeProps;
2869
3102
  }
2870
3103
  /** Axis number format. */
2871
3104
  interface PptxChartAxisNumFmt {
@@ -3429,6 +3662,16 @@ interface PptxChartDateCategories {
3429
3662
  */
3430
3663
  interface PptxChartData {
3431
3664
  title?: string;
3665
+ /**
3666
+ * Rich-text runs of the title, parsed from `c:title/c:tx/c:rich` (issue:
3667
+ * chart title rich text). Lossless multi-run alternative to the flat
3668
+ * {@link title}: when present, the writer serialises every run's own
3669
+ * bold/italic/size/color; when absent, save falls back to the flat
3670
+ * `title` path as before. Only populated for a classic (`c:`) chart's
3671
+ * rich (typed) title, not a ChartEx (`cx:`) title or one authored as a
3672
+ * linked-cell reference.
3673
+ */
3674
+ titleRuns?: PptxChartTitleRun[];
3432
3675
  chartType: PptxChartType;
3433
3676
  categories: string[];
3434
3677
  /**
@@ -3520,8 +3763,10 @@ interface PptxChartData {
3520
3763
  chartRelationshipId?: string;
3521
3764
  /** `null` explicitly removes an existing ChartML data table. */
3522
3765
  dataTable?: PptxChartDataTable | null;
3523
- dropLines?: PptxChartLineStyle;
3524
- hiLowLines?: PptxChartLineStyle;
3766
+ /** `null` explicitly removes an existing `c:dropLines` element. */
3767
+ dropLines?: PptxChartLineStyle | null;
3768
+ /** `null` explicitly removes an existing `c:hiLowLines` element. */
3769
+ hiLowLines?: PptxChartLineStyle | null;
3525
3770
  /** `null` explicitly removes an existing up/down-bars container. */
3526
3771
  upDownBars?: PptxChartUpDownBars | null;
3527
3772
  axes?: PptxChartAxisFormatting[];
@@ -3636,10 +3881,13 @@ interface PptxChartData {
3636
3881
  pivotFormats?: PptxChartPivotFormats | null;
3637
3882
  /**
3638
3883
  * Color-map override (`c:clrMapOvr`) carrying 12 attributes that
3639
- * remap theme colour roles for this chart only. Preserved as a flat
3640
- * `attribute → value` map for round-trip fidelity.
3884
+ * remap theme colour roles for this chart only. Modeled as a flat
3885
+ * `attribute -> value` map (e.g. `{ bg1: 'lt1', accent1: 'accent2' }`)
3886
+ * so unknown/future attributes round-trip without code changes.
3887
+ * `null` explicitly removes an existing `c:clrMapOvr`; an empty object
3888
+ * is treated the same as `null` on save.
3641
3889
  */
3642
- clrMapOvr?: Record<string, string>;
3890
+ clrMapOvr?: Record<string, string> | null;
3643
3891
  /**
3644
3892
  * Whether the chart's own cached numeric values use the 1904 date epoch
3645
3893
  * (`c:chartSpace/c:date1904/@val`). Independent of, and authoritative over,
@@ -5016,13 +5264,55 @@ interface PptxSmartArtData {
5016
5264
  drawingDirty?: boolean;
5017
5265
  }
5018
5266
  //#endregion
5019
- //#region src/core/types/table.d.ts
5267
+ //#region src/core/types/table-style-edit.d.ts
5020
5268
  /**
5021
- * Table types: cell styling, cell data, rows, table data, and the parsed
5022
- * table style map from `ppt/tableStyles.xml`.
5269
+ * A `a:fillRef`/`a:lnRef`/`a:effectRef`-style style-matrix reference: an
5270
+ * index into the theme's format scheme (`a:fmtScheme/a:fillStyleLst`, 1-based
5271
+ * per ECMA-376 §20.1.4.1.12) plus an optional colour transform child.
5272
+ *
5273
+ * Distinct from an already-resolved {@link ParsedTableStyleFill}: a fill ref
5274
+ * points AT a theme style-matrix entry rather than carrying a colour choice
5275
+ * directly, though the two commonly appear together (`<a:fillRef idx="2">
5276
+ * <a:schemeClr val="accent1"/></a:fillRef>`).
5023
5277
  *
5024
- * @module pptx-types/table
5278
+ * @example
5279
+ * ```ts
5280
+ * const ref: ParsedTableFillRef = { idx: 2, color: { schemeColor: 'accent1' } };
5281
+ * // => satisfies ParsedTableFillRef
5282
+ * ```
5025
5283
  */
5284
+ interface ParsedTableFillRef {
5285
+ /** 1-based index into the theme format scheme's fill style list. */
5286
+ idx: number;
5287
+ /** Colour transform child (`a:schemeClr`/`a:srgbClr`) applied to the referenced style. */
5288
+ color?: ParsedTableStyleFill;
5289
+ }
5290
+ /**
5291
+ * One leaf (or `effectDag`-wrapped) node of an `a:effectLst`/`a:effectDag`
5292
+ * effect chain, kept mostly opaque: {@link kind} names the OOXML element so a
5293
+ * consumer can recognise common effects (`outerShdw`, `glow`, `softEdge`,
5294
+ * `reflection`, `blur`, `innerShdw`, `prstShdw`, `fillOverlay`, `alphaModFix`,
5295
+ * `alphaInv`, `grayscl`, `biLevel`, `duotone`, `hsl`, `lum`, `tint`) without
5296
+ * this module re-deriving the full shape-effect taxonomy already modelled on
5297
+ * `ShapeStyle`; {@link xml} preserves the node verbatim for lossless re-emit.
5298
+ *
5299
+ * @example
5300
+ * ```ts
5301
+ * const effect: ParsedTableStyleEffect = {
5302
+ * kind: 'outerShdw',
5303
+ * xml: { '@_blurRad': '40000', '@_dist': '20000', '@_dir': '5400000' },
5304
+ * };
5305
+ * // => satisfies ParsedTableStyleEffect
5306
+ * ```
5307
+ */
5308
+ interface ParsedTableStyleEffect {
5309
+ /** The OOXML element's local name, e.g. `outerShdw`, `glow`, `softEdge`. */
5310
+ kind: string;
5311
+ /** Verbatim XML node (attributes + children) for lossless round-trip. */
5312
+ xml: XmlObject;
5313
+ }
5314
+ //#endregion
5315
+ //#region src/core/types/table.d.ts
5026
5316
  /**
5027
5317
  * Per-cell visual style for a table cell.
5028
5318
  *
@@ -5059,6 +5349,14 @@ interface PptxTableCellStyle {
5059
5349
  * future expansion alongside the run-properties round-trip path.
5060
5350
  */
5061
5351
  colorXml?: XmlObject;
5352
+ /**
5353
+ * Typed theme colour reference for the cell text colour, set when
5354
+ * {@link colorXml} is a plain `a:schemeClr`. Wins on save, mirroring
5355
+ * `TextStyle.colorRef`. Distinct from {@link ParsedTableStyleFill.schemeColor},
5356
+ * which describes a `ppt/tableStyles.xml` section fill rather than an
5357
+ * individual cell override.
5358
+ */
5359
+ colorRef?: PptxThemeColorRef;
5062
5360
  backgroundColor?: string;
5063
5361
  /**
5064
5362
  * Raw XML colour-choice node preserved from cell `a:tcPr/a:solidFill` for
@@ -5066,6 +5364,12 @@ interface PptxTableCellStyle {
5066
5364
  * {@link backgroundColor} still matches the original colour.
5067
5365
  */
5068
5366
  backgroundColorXml?: XmlObject;
5367
+ /**
5368
+ * Typed theme colour reference for the cell fill, set when
5369
+ * {@link backgroundColorXml} is a plain `a:schemeClr`. Wins on save,
5370
+ * mirroring `ShapeStyle.fillColorRef`.
5371
+ */
5372
+ backgroundColorRef?: PptxThemeColorRef;
5069
5373
  borderColor?: string;
5070
5374
  /** Top border width in px. */
5071
5375
  borderTopWidth?: number;
@@ -5379,12 +5683,14 @@ interface PptxTableData {
5379
5683
  */
5380
5684
  tableFill?: ParsedTableStyleFill;
5381
5685
  /**
5382
- * Whether `a:tblPr` carries its own `a:effectLst`/`a:effectDag`,
5383
- * independent of the referenced table style. Presence-only: the concrete
5384
- * effect is not yet rendered, and the raw XML round-trips separately via
5385
- * whatever preserves `a:tblPr`'s unrecognised children (issue G6).
5686
+ * `a:tblPr`'s own `a:effectLst` (or `a:effectDag`) effect chain,
5687
+ * independent of the referenced table style, decomposed into a typed
5688
+ * sequence of {@link ParsedTableStyleEffect} nodes (issue G6). Each node
5689
+ * keeps its own XML verbatim for lossless round-trip; empty array is
5690
+ * normalised to `undefined` by the parser so `tableEffects` is only ever
5691
+ * present when there is at least one effect.
5386
5692
  */
5387
- tableEffects?: boolean;
5693
+ tableEffects?: ParsedTableStyleEffect[];
5388
5694
  }
5389
5695
  /**
5390
5696
  * A single fill reference within a table style section.
@@ -5560,13 +5866,20 @@ interface ParsedTableStyleBorders {
5560
5866
  /**
5561
5867
  * Table background style (CT_TableBackgroundStyle, ECMA-376 §21.1.3.7).
5562
5868
  *
5563
- * Corresponds to the `<a:tblBg>` child of `<a:tblStyle>`. Currently
5564
- * captures only the resolved scheme-fill colour (verbatim XML for fill
5565
- * / effect references is preserved separately by the save path).
5869
+ * Corresponds to the `<a:tblBg>` child of `<a:tblStyle>`. Captures the
5870
+ * resolved scheme-fill colour, an unresolved style-matrix `a:fillRef`, and a
5871
+ * presence flag for effects (verbatim XML for the effect list is preserved
5872
+ * separately by the save path).
5566
5873
  */
5567
5874
  interface ParsedTableBackground {
5568
5875
  /** Solid fill (resolved from `a:fill > a:solidFill > a:schemeClr`). */
5569
5876
  fill?: ParsedTableStyleFill;
5877
+ /**
5878
+ * Style-matrix fill reference (`<a:fillRef idx="N">...</a:fillRef>`),
5879
+ * mutually exclusive with {@link fill} (`a:fill` is the choice sibling of
5880
+ * `a:fillRef` in `CT_TableBackgroundStyle`).
5881
+ */
5882
+ fillRef?: ParsedTableFillRef;
5570
5883
  /** Has an `a:effectLst` child that should be round-tripped. */
5571
5884
  hasEffectLst?: boolean;
5572
5885
  }
@@ -5680,6 +5993,21 @@ interface PptxAccessibilityProperties {
5680
5993
  */
5681
5994
  isDecorative?: boolean;
5682
5995
  }
5996
+ /**
5997
+ * Accessibility description/title from `p:cNvPr/@descr` / `@title` on a
5998
+ * plain shape, text box or connector (`p:sp` / `p:cxnSp`). The same pair of
5999
+ * attributes already round-trips for a graphic frame (see
6000
+ * {@link TablePptxElement.altText}) and, `descr` only, for a picture
6001
+ * ({@link PptxImageProperties.altText}); this mixin extends it to the three
6002
+ * element kinds whose PowerPoint Alt Text pane data was previously dropped
6003
+ * on load because neither field existed on the model.
6004
+ */
6005
+ interface PptxNonVisualDescription {
6006
+ /** `p:cNvPr/@descr`. */
6007
+ altText?: string;
6008
+ /** `p:cNvPr/@title`. */
6009
+ title?: string;
6010
+ }
5683
6011
  /**
5684
6012
  * `a:cNvPicPr/@preferRelativeResize` (issue G13), a picture-only non-visual
5685
6013
  * property distinct from `a:picLocks`.
@@ -5712,7 +6040,7 @@ interface PptxPictureNonVisualProperties {
5712
6040
  * // => satisfies TextPptxElement
5713
6041
  * ```
5714
6042
  */
5715
- interface TextPptxElement extends PptxElementBase, PptxTextProperties, PptxShapeProperties {
6043
+ interface TextPptxElement extends PptxElementBase, PptxTextProperties, PptxShapeProperties, PptxNonVisualDescription {
5716
6044
  type: 'text';
5717
6045
  }
5718
6046
  /**
@@ -5730,7 +6058,7 @@ interface TextPptxElement extends PptxElementBase, PptxTextProperties, PptxShape
5730
6058
  * // => satisfies ShapePptxElement
5731
6059
  * ```
5732
6060
  */
5733
- interface ShapePptxElement extends PptxElementBase, PptxTextProperties, PptxShapeProperties, PptxCustomPathProperties, PptxAccessibilityProperties {
6061
+ interface ShapePptxElement extends PptxElementBase, PptxTextProperties, PptxShapeProperties, PptxCustomPathProperties, PptxAccessibilityProperties, PptxNonVisualDescription {
5734
6062
  type: 'shape';
5735
6063
  }
5736
6064
  /**
@@ -5752,7 +6080,7 @@ interface ShapePptxElement extends PptxElementBase, PptxTextProperties, PptxShap
5752
6080
  * // => satisfies ConnectorPptxElement
5753
6081
  * ```
5754
6082
  */
5755
- interface ConnectorPptxElement extends PptxElementBase, PptxTextProperties, PptxShapeProperties {
6083
+ interface ConnectorPptxElement extends PptxElementBase, PptxTextProperties, PptxShapeProperties, PptxNonVisualDescription {
5756
6084
  type: 'connector';
5757
6085
  }
5758
6086
  /**
@@ -5818,6 +6146,13 @@ interface TablePptxElement extends PptxElementBase {
5818
6146
  type: 'table';
5819
6147
  /** Parsed table cell data for editing. */
5820
6148
  tableData?: PptxTableData;
6149
+ /**
6150
+ * Accessibility description from `p:nvGraphicFramePr/p:cNvPr/@descr`, the
6151
+ * same non-visual-properties attribute a picture's alt text comes from.
6152
+ */
6153
+ altText?: string;
6154
+ /** Accessibility title from `p:nvGraphicFramePr/p:cNvPr/@title`. */
6155
+ title?: string;
5821
6156
  /**
5822
6157
  * Unrecognised extensions captured from `a:graphicData/a:extLst` so they
5823
6158
  * round-trip losslessly. See {@link PptxGraphicFrameExtension}.
@@ -5833,6 +6168,10 @@ interface TablePptxElement extends PptxElementBase {
5833
6168
  interface ChartPptxElement extends PptxElementBase {
5834
6169
  type: 'chart';
5835
6170
  chartData?: PptxChartData;
6171
+ /** Accessibility description from `p:nvGraphicFramePr/p:cNvPr/@descr`. */
6172
+ altText?: string;
6173
+ /** Accessibility title from `p:nvGraphicFramePr/p:cNvPr/@title`. */
6174
+ title?: string;
5836
6175
  /** Unrecognised graphicFrame extLst extensions, captured verbatim for round-trip. */
5837
6176
  extensionXml?: PptxGraphicFrameExtension[];
5838
6177
  }
@@ -5850,6 +6189,10 @@ interface ChartPptxElement extends PptxElementBase {
5850
6189
  interface SmartArtPptxElement extends PptxElementBase {
5851
6190
  type: 'smartArt';
5852
6191
  smartArtData?: PptxSmartArtData;
6192
+ /** Accessibility description from `p:nvGraphicFramePr/p:cNvPr/@descr`. */
6193
+ altText?: string;
6194
+ /** Accessibility title from `p:nvGraphicFramePr/p:cNvPr/@title`. */
6195
+ title?: string;
5853
6196
  /** Unrecognised graphicFrame extLst extensions, captured verbatim for round-trip. */
5854
6197
  extensionXml?: PptxGraphicFrameExtension[];
5855
6198
  }
@@ -5936,6 +6279,10 @@ interface OlePptxElement extends PptxElementBase {
5936
6279
  * `false`; `undefined` means the source authored no explicit value.
5937
6280
  */
5938
6281
  oleUpdateAutomatic?: boolean;
6282
+ /** Accessibility description from `p:nvGraphicFramePr/p:cNvPr/@descr`. */
6283
+ altText?: string;
6284
+ /** Accessibility title from `p:nvGraphicFramePr/p:cNvPr/@title`. */
6285
+ title?: string;
5939
6286
  /** Unrecognised graphicFrame extLst extensions, captured verbatim for round-trip. */
5940
6287
  extensionXml?: PptxGraphicFrameExtension[];
5941
6288
  }
@@ -6027,6 +6374,15 @@ interface MediaPptxElement extends PptxElementBase {
6027
6374
  * (`r:embed`). Defaults to embedded when undefined.
6028
6375
  */
6029
6376
  isLinked?: boolean;
6377
+ /**
6378
+ * Accessibility description from `p:nvGraphicFramePr/p:cNvPr/@descr`.
6379
+ * Only populated for the `p:graphicFrame`-shaped (SDK-created) media
6380
+ * form; a `p:pic`-shaped media element's alt text is not currently
6381
+ * parsed (see `PptxHandlerRuntimePictureParsing.ts`).
6382
+ */
6383
+ altText?: string;
6384
+ /** Accessibility title from `p:nvGraphicFramePr/p:cNvPr/@title`. Same scope note as {@link altText}. */
6385
+ title?: string;
6030
6386
  /** Unrecognised graphicFrame extLst extensions, captured verbatim for round-trip. */
6031
6387
  extensionXml?: PptxGraphicFrameExtension[];
6032
6388
  }
@@ -6543,7 +6899,20 @@ interface PptxAnimationGraphicElementTarget {
6543
6899
  seriesIdx?: number;
6544
6900
  /** `@_categoryIdx`, 0-based category index, when the target is category-scoped. */
6545
6901
  categoryIdx?: number;
6546
- /** `@_bldStep` (ST_TLChartBuildStep): `category` / `categoryEl` / `series` / `seriesEl`. */
6902
+ /**
6903
+ * `p:dgm/@_id` (CT_TLBuildDiagram, ECMA-376 S19.5.10): the diagram DATA MODEL
6904
+ * point id (`dgm:pt/@modelId`) this per-stage effect reveals, when a
6905
+ * `p:bldDgm` build authors one effect per node instead of a single staged
6906
+ * reveal. `dgm`-kind targets only; a `chart`-kind target never carries this.
6907
+ * Matches `PptxSmartArtNode.id` (parsed from the same `@modelId`), so a
6908
+ * diagram renderer can reveal the exact authored node.
6909
+ */
6910
+ id?: string;
6911
+ /**
6912
+ * `@_bldStep`: `ST_TLChartBuildStep` (`category` / `categoryEl` / `series` /
6913
+ * `seriesEl`) for a `chart`-kind target, or `ST_TLDiagramBuildStep`
6914
+ * (`sp` / `bg`) for a `dgm`-kind target.
6915
+ */
6547
6916
  bldStep?: string;
6548
6917
  }
6549
6918
  /**
@@ -6993,6 +7362,34 @@ interface PptxNativeAnimation {
6993
7362
  * `childStyle`, a legacy compatibility hint. Round-tripped only.
6994
7363
  */
6995
7364
  cBhvrOverride?: 'normal' | 'childStyle';
7365
+ /**
7366
+ * `p:set` discrete attribute assignments composed alongside this effect
7367
+ * (ECMA-376 S19.5.79 CT_TLSetBehavior): an instantaneous (non-interpolated)
7368
+ * value change, as opposed to {@link attributeAnimations}'s `p:anim`
7369
+ * keyframe ramps. PowerPoint authors several font-style emphasis effects
7370
+ * this way (Bold Reveal, Underline, Bold Flash, Change Font Size), since
7371
+ * "on/off" or "size N" has nothing to interpolate. Not yet consulted by
7372
+ * shared playback (round-trip/typed-model only so far).
7373
+ */
7374
+ setAnimations?: PptxSetAnimation[];
7375
+ }
7376
+ /**
7377
+ * One `p:set` discrete (non-interpolated) attribute assignment composed
7378
+ * alongside an authored effect. See {@link PptxNativeAnimation.setAnimations}.
7379
+ *
7380
+ * @see ECMA-376 S19.5.79 CT_TLSetBehavior
7381
+ */
7382
+ interface PptxSetAnimation {
7383
+ /** Lowercased target attribute from `p:cBhvr/p:attrNameLst/p:attrName`. */
7384
+ attrName: string;
7385
+ /** Decoded value from `p:to` (same variant shape as a `p:tav/p:val`). */
7386
+ value: string | boolean | number;
7387
+ /** Discriminant indicating which `p:to` child carried the value. */
7388
+ valueType: 'str' | 'bool' | 'int' | 'flt' | 'clr';
7389
+ /** Duration from this behaviour's nested `p:cTn/@dur`. */
7390
+ durationMs?: number;
7391
+ /** Start offset from this behaviour's nested `p:stCondLst`. */
7392
+ delayMs?: number;
6996
7393
  }
6997
7394
  /**
6998
7395
  * Parsed `p:animEffect/@filter` (+ `@transition`) descriptor. ECMA-376
@@ -7260,6 +7657,16 @@ interface PptxElementAnimation {
7260
7657
  * OOXML equivalent and is not required for playback.
7261
7658
  */
7262
7659
  soundFileName?: string;
7660
+ /**
7661
+ * Per-build-level timing template(s) from the {@link sequence}'s own
7662
+ * `p:bldP/p:tmplLst` (ECMA-376 §19.5.84), carried over from the loaded
7663
+ * `PptxNativeAnimation.buildTemplates` this element animation was derived
7664
+ * from so a full timing-tree rebuild (`PptxAnimationWriteService`'s
7665
+ * `buildTimingXml`, when the slide had no prior `p:timing`) can re-emit
7666
+ * them instead of silently dropping the deck's authored per-level
7667
+ * defaults. Absent when {@link sequence} carries no such template.
7668
+ */
7669
+ buildTemplates?: PptxTimingTemplate[];
7263
7670
  }
7264
7671
  /**
7265
7672
  * A read-only anchor representing one of the deck's own effect groups: a
@@ -8176,6 +8583,22 @@ interface PptxActiveXControl {
8176
8583
  name?: string;
8177
8584
  /** Shape ID this control is linked to (from @spid). */
8178
8585
  shapeId?: string;
8586
+ /**
8587
+ * `p:control/@showAsIcon` (CT_Control, ECMA-376 S19.3.1.2): whether the
8588
+ * control renders as its static icon rather than its live appearance.
8589
+ * `undefined` when the source authored no explicit value (schema default
8590
+ * `false`).
8591
+ */
8592
+ showAsIcon?: boolean;
8593
+ /**
8594
+ * `p:control/@imgW` in EMU (ST_PositiveCoordinate32): the width the host
8595
+ * reserves for the control's icon/preview image. Distinct from
8596
+ * {@link width}, which is the fallback `p:pic`'s own `a:ext/@cx` in px;
8597
+ * `imgW`/`imgH` are direct attributes on `p:control` itself.
8598
+ */
8599
+ imgWidthEmu?: number;
8600
+ /** `p:control/@imgH` in EMU (ST_PositiveCoordinate32). @see imgWidthEmu */
8601
+ imgHeightEmu?: number;
8179
8602
  /** X position (px) of the control's fallback picture, if present. */
8180
8603
  x?: number;
8181
8604
  /** Y position (px) of the control's fallback picture, if present. */
@@ -8632,6 +9055,34 @@ interface PptxPhotoAlbum {
8632
9055
  layout?: string;
8633
9056
  /** Frame style applied to each photo (e.g. "frameStyle1"). */
8634
9057
  frame?: string;
9058
+ /**
9059
+ * `p:photoAlbum/@isPhoto` (ECMA-376 S19.2.1.27, CT_PhotoAlbum): whether
9060
+ * the pictures placed by the album wizard are real photographs, as
9061
+ * opposed to clip art or other embedded images. `undefined` when the
9062
+ * source authored no explicit value (schema default `false`); this is a
9063
+ * purely declarative wizard-provenance flag, not something this library
9064
+ * gates any layout/frame behaviour on.
9065
+ */
9066
+ isPhoto?: boolean;
9067
+ }
9068
+ /**
9069
+ * A recognizer-owned `p:smartTags` reference from `presentation.xml`
9070
+ * (CT_SmartTags, ECMA-376 S19.2.1.42): a bare relationship id pointing at a
9071
+ * legacy Office "Smart Tags" recognizer part, distinct from the
9072
+ * user-authored `p:tags` construct (see {@link PptxTagCollection}).
9073
+ *
9074
+ * This library has no data model for recognizer part CONTENT (there is no
9075
+ * way to create, inspect, or edit one through the public API), so this type
9076
+ * only captures enough to preserve an authored reference losslessly: the
9077
+ * relationship id and, when resolvable, the target part path.
9078
+ */
9079
+ interface PptxSmartTagsReference {
9080
+ /** Relationship id from `p:smartTags/@r:id`. */
9081
+ relId: string;
9082
+ /** Resolved ZIP path of the referenced recognizer part, when resolvable. */
9083
+ targetPath?: string;
9084
+ /** Raw `p:smartTags` XML retained for lossless round-trip. */
9085
+ rawXml?: XmlObject;
8635
9086
  }
8636
9087
  /**
8637
9088
  * East Asian line-break (kinsoku) settings from `p:kinsoku` in `presentation.xml`.
@@ -8696,6 +9147,13 @@ interface PptxData {
8696
9147
  themeOptions?: PptxThemeOption[];
8697
9148
  /** Parsed table style definitions from `ppt/tableStyles.xml`. */
8698
9149
  tableStyleMap?: ParsedTableStyleMap;
9150
+ /**
9151
+ * The current default table style GUID (`ppt/tableStyles.xml`'s
9152
+ * `a:tblStyleLst/@def`): the style PowerPoint applies to a newly inserted
9153
+ * table. Matches `PptxSaveOptions.tableStylesDefaultId` so a save call
9154
+ * that omits it can fall back to what was loaded.
9155
+ */
9156
+ tableStylesDefaultId?: string;
8699
9157
  /** Whether the presentation is password-protected. */
8700
9158
  isPasswordProtected?: boolean;
8701
9159
  /** Embedded font data (name + binary data URL) extracted from the presentation. */
@@ -8755,6 +9213,14 @@ interface PptxData {
8755
9213
  modifyVerifier?: PptxModifyVerifier;
8756
9214
  /** Photo album metadata from `p:photoAlbum` in `presentation.xml`. */
8757
9215
  photoAlbum?: PptxPhotoAlbum;
9216
+ /**
9217
+ * Legacy Smart Tags recognizer reference from `p:smartTags` in
9218
+ * `presentation.xml`. Read-only: there is no data model for the
9219
+ * recognizer part's own content, so this exists to make the reference
9220
+ * inspectable and to prove it survives a save (the owning part and its
9221
+ * relationship are preserved passively, like any other unmodelled part).
9222
+ */
9223
+ smartTags?: PptxSmartTagsReference;
8758
9224
  /** East Asian line-break settings from `p:kinsoku` in `presentation.xml`. */
8759
9225
  kinsoku?: PptxKinsoku;
8760
9226
  /** Custom XML data parts from `customXml/` in the OPC package. */
@@ -8883,7 +9349,7 @@ interface PptxEmbeddedFont {
8883
9349
  originalPartBytes?: Uint8Array;
8884
9350
  }
8885
9351
  //#endregion
8886
- //#region ../core/dist/index-YjWgLS6-.d.ts
9352
+ //#region ../core/dist/index-pXTg8Ws0.d.ts
8887
9353
  //#region src/core/types/theme-presets.d.ts
8888
9354
  /**
8889
9355
  * A complete theme preset that can be applied to a presentation.
@@ -8920,6 +9386,14 @@ type FillInput = {
8920
9386
  type: 'solid';
8921
9387
  color: string;
8922
9388
  opacity?: number;
9389
+ /**
9390
+ * A theme colour to use instead of a plain hex. When set, the shape
9391
+ * saves as `<a:schemeClr>` (e.g. `{ scheme: 'accent1', lumMod: 0.8 }`
9392
+ * for "Accent 1, Lighter 80%") so it keeps following the theme after a
9393
+ * later theme change; `color` still supplies the immediate resolved
9394
+ * hex for renderers that read it directly.
9395
+ */
9396
+ themeColorRef?: PptxThemeColorRef;
8923
9397
  } | {
8924
9398
  type: 'gradient';
8925
9399
  /**
@@ -8955,6 +9429,8 @@ interface StrokeInput {
8955
9429
  opacity?: number;
8956
9430
  join?: 'round' | 'bevel' | 'miter';
8957
9431
  cap?: 'flat' | 'rnd' | 'sq';
9432
+ /** A theme colour for the outline; see {@link FillInput}'s `themeColorRef`. */
9433
+ themeColorRef?: PptxThemeColorRef;
8958
9434
  }
8959
9435
  interface ShadowInput {
8960
9436
  color?: string;
@@ -8971,6 +9447,8 @@ interface TextStyleInput {
8971
9447
  underline?: boolean;
8972
9448
  strikethrough?: boolean;
8973
9449
  color?: string;
9450
+ /** A theme colour for the run; see {@link FillInput}'s `themeColorRef`. */
9451
+ themeColorRef?: PptxThemeColorRef;
8974
9452
  alignment?: 'left' | 'center' | 'right' | 'justify';
8975
9453
  verticalAlignment?: 'top' | 'middle' | 'bottom';
8976
9454
  lineSpacing?: number;
@@ -9598,6 +10076,24 @@ interface PptxHandlerSaveOptions {
9598
10076
  * part untouched.
9599
10077
  */
9600
10078
  tableStyles?: ParsedTableStyleMap;
10079
+ /**
10080
+ * Set `ppt/tableStyles.xml`'s `<a:tblStyleLst @def>` to this style GUID
10081
+ * (normalised to uppercase-with-braces). `undefined` preserves the
10082
+ * existing default; there is no removal form (`@def` is required by the
10083
+ * schema and PowerPoint always points it at a real style). No-op when the
10084
+ * archive has no `ppt/tableStyles.xml`, same as {@link tableStyles}.
10085
+ */
10086
+ tableStylesDefaultId?: string;
10087
+ /**
10088
+ * Style GUIDs to remove from `ppt/tableStyles.xml` entirely, kept as a
10089
+ * separate opt-in list rather than inferred from omission on
10090
+ * {@link tableStyles}: that map is documented as safe to pass a PARTIAL
10091
+ * edit (only the entries a caller actually touched), so treating every
10092
+ * GUID missing from it as "delete this" would silently destroy untouched
10093
+ * styles on an ordinary targeted edit. A GUID here that is also the
10094
+ * current (or newly requested) default is left in place and skipped.
10095
+ */
10096
+ tableStylesToDelete?: string[];
9601
10097
  /**
9602
10098
  * Target output format.
9603
10099
  * - `'pptx'` (default): Standard presentation.
@@ -10657,6 +11153,23 @@ interface ChartPartRef {
10657
11153
  //#region src/render/animation-authoring.d.ts
10658
11154
  /** One of the three animation buckets a preset can occupy on an element. */
10659
11155
  type AnimationGroup = 'entrance' | 'emphasis' | 'exit';
11156
+ //#endregion
11157
+ //#region src/render/animation-text-style-resolve.d.ts
11158
+ /**
11159
+ * Framework-neutral text-style override a font-style emphasis effect applies
11160
+ * on top of its target's own authored per-run bold/italic/underline/size/
11161
+ * colour. Every binding maps this onto its own text container so it OVERRIDES
11162
+ * the runs' inline styles (the runs carry explicit inline styles of their
11163
+ * own, so plain CSS inheritance cannot reach them).
11164
+ */
11165
+ interface TextStyleAnimationDescriptor {
11166
+ bold?: boolean;
11167
+ italic?: boolean;
11168
+ underline?: boolean;
11169
+ /** Relative multiplier against each run's own authored font size. */
11170
+ fontScale?: number;
11171
+ color?: string;
11172
+ }
10660
11173
  /**
10661
11174
  * Normalized staged-reveal mode for a chart graphic frame, derived from the
10662
11175
  * OOXML `a:bldChart/@bld` (or `p:bldOleChart/@bld`) token:
@@ -10712,6 +11225,27 @@ interface ChartRevealDescriptor {
10712
11225
  /** Individual cells revealed by a `bldStep="seriesEl"`/`"categoryEl"` effect. */
10713
11226
  points: readonly ChartRevealPoint[];
10714
11227
  }
11228
+ /**
11229
+ * Playback-time SmartArt diagram reveal state derived from AUTHORED
11230
+ * `p:graphicEl/p:dgm/@id` indices (see `diagram-reveal-descriptor`'s
11231
+ * `resolveDiagramRevealDescriptor`), rather than from click-count/time
11232
+ * progress. Present on {@link ElementAnimationState.diagramReveal} only when
11233
+ * every fired diagram-build step for the element carried `p:graphicEl` data.
11234
+ * A SmartArt renderer prefers this over the progress-based `build` /
11235
+ * {@link ElementBuildState} path when present, since it reflects the real
11236
+ * authored reveal set (correct even for a reversed-order or by-branch build),
11237
+ * and falls back to `build` when absent.
11238
+ */
11239
+ interface DiagramRevealDescriptor {
11240
+ /**
11241
+ * Whether the diagram's background/connector chrome should currently be
11242
+ * visible: `true` once any node-revealing or background-revealing
11243
+ * (`bldStep="bg"`) step has fired.
11244
+ */
11245
+ background: boolean;
11246
+ /** Data-model point ids (`PptxSmartArtNode.id`) revealed so far. */
11247
+ nodeIds: ReadonlySet<string>;
11248
+ }
10715
11249
  /**
10716
11250
  * Playback-time staged-build state surfaced on {@link ElementAnimationState}.
10717
11251
  * `progress` is the 0..1 fraction of the build revealed at the current playback
@@ -10752,6 +11286,17 @@ interface ElementAnimationState {
10752
11286
  mode: ChartBuildMode;
10753
11287
  descriptor: ChartRevealDescriptor;
10754
11288
  };
11289
+ /**
11290
+ * Authored-index SmartArt diagram reveal state (see
11291
+ * {@link DiagramRevealDescriptor}), present only when every fired
11292
+ * diagram-build step for this element carried `p:graphicEl` node-id data.
11293
+ * `diagram-build`'s `resolveRevealedSmartArtNodes` prefers this over `build`
11294
+ * when present.
11295
+ */
11296
+ diagramReveal?: {
11297
+ mode: DiagramBuildMode;
11298
+ descriptor: DiagramRevealDescriptor;
11299
+ };
10755
11300
  /**
10756
11301
  * True when an active `p:animClr` color animation targets this shape's fill.
10757
11302
  * A vector renderer should then paint the fill with `fill: inherit` so the
@@ -10765,6 +11310,18 @@ interface ElementAnimationState {
10765
11310
  * `stroke: inherit`. Absent/false means no active stroke-colour animation.
10766
11311
  */
10767
11312
  animatesStroke?: boolean;
11313
+ /**
11314
+ * Active discrete font-style / colour / size override (see
11315
+ * {@link TimelineStep.textStyle}) a font-style emphasis effect currently
11316
+ * applies to this element's text, OVERRIDING the runs' own inline
11317
+ * bold/italic/underline/size/colour. `animation-playback-engine.ts` writes
11318
+ * this on step start and again on cleanup (held in full when the effect's
11319
+ * `p:cTn/@fill` holds its end state, otherwise reverted); a text renderer
11320
+ * maps it onto its run markup via `buildTextStyleOverrideCss`
11321
+ * (`animation-text-style-css.ts`). Absent means no font-style emphasis
11322
+ * effect is currently active on this element.
11323
+ */
11324
+ textStyle?: TextStyleAnimationDescriptor;
10768
11325
  }
10769
11326
  //#endregion
10770
11327
  //#region src/render/element-align.d.ts
@@ -11152,6 +11709,13 @@ interface GradientStop {
11152
11709
  color: string;
11153
11710
  position: number;
11154
11711
  opacity?: number;
11712
+ /**
11713
+ * Theme colour identity for this stop, mirroring
11714
+ * `ShapeStyle.fillColorRef`. Set by a theme-swatch pick so the stop keeps
11715
+ * following the theme after a later theme change; cleared by a custom hex
11716
+ * pick, which has no theme identity.
11717
+ */
11718
+ colorRef?: PptxThemeColorRef;
11155
11719
  }
11156
11720
  /** The editable gradient state surfaced to the component. */
11157
11721
  interface GradientState {
@@ -11843,6 +12407,14 @@ interface ViewerState {
11843
12407
  tagCollections: PptxTagCollection[];
11844
12408
  /** Parsed presentation table styles keyed by style id. */
11845
12409
  tableStyleMap?: ParsedTableStyleMap;
12410
+ /** `ppt/tableStyles.xml`'s `<a:tblStyleLst @def>` default style GUID. */
12411
+ tableStylesDefaultId?: string;
12412
+ /**
12413
+ * Style GUIDs deleted from `tableStyleMap` via the table style editor,
12414
+ * pending removal from `ppt/tableStyles.xml` on the next save. See
12415
+ * `tableStyleSaveOptions` / `applyTableStyleDelete` in `pptx-viewer-shared`.
12416
+ */
12417
+ tableStylesToDelete: string[];
11846
12418
  /** Zero-based index of the visible slide. */
11847
12419
  currentSlide: number;
11848
12420
  /** Requested zoom (explicit factor or fit-to-viewport). */
@@ -12146,6 +12718,10 @@ interface DeckActions {
12146
12718
  * `scaleSlidesForSizeChange`.
12147
12719
  */
12148
12720
  applySlideSizeRescale(size: SlideSizeEmu, mode: SlideSizeRescaleMode): void;
12721
+ /** Commit a full replacement style map (section edit, create, or delete already applied). */
12722
+ updateTableStyleMap(nextMap: ParsedTableStyleMap): void;
12723
+ /** Record a styleId for save-time removal from `ppt/tableStyles.xml`. */
12724
+ deleteTableStyle(styleId: string): void;
12149
12725
  }
12150
12726
  //#endregion
12151
12727
  //#region src/viewer/editor/editor-ink-actions.d.ts
@@ -12231,6 +12807,8 @@ interface InspectorActions {
12231
12807
  setElementAction(trigger: 'click' | 'hover', action: ElementAction): void;
12232
12808
  /** Set the selection's accessibility description (inspector Alt Text field). */
12233
12809
  setAltText(text: string): void;
12810
+ /** Set the selection's accessibility title (inspector Title field). */
12811
+ setTitle(text: string): void;
12234
12812
  /** Set the selected OLE element's Object Name (`p:oleObj/@name`). */
12235
12813
  setOleName(name: string): void;
12236
12814
  setChartData(data: PptxChartData): void;
@@ -12327,7 +12905,7 @@ interface TextActions {
12327
12905
  changeFontSize(delta: number): void;
12328
12906
  setFontSize(size: number): void;
12329
12907
  setFontFamily(family: string): void;
12330
- setTextColor(color: string): void;
12908
+ setTextColor(color: string, ref?: PptxThemeColorRef): void;
12331
12909
  setHighlightColor(color: string): void;
12332
12910
  setCharacterSpacing(value: number): void;
12333
12911
  changeCase(mode: ChangeCaseMode): void;
@@ -12413,8 +12991,8 @@ interface EditActions extends TextActions, ArrangeActions, ClipboardActions, Sli
12413
12991
  masterView: MasterViewCrudActions;
12414
12992
  comments: CommentActions;
12415
12993
  toggleFormatPainter(): void;
12416
- setShapeFill(color: string): void;
12417
- setShapeStroke(color: string): void;
12994
+ setShapeFill(color: string, ref?: PptxThemeColorRef): void;
12995
+ setShapeStroke(color: string, ref?: PptxThemeColorRef): void;
12418
12996
  setShapeStrokeWidth(width: number): void;
12419
12997
  setShapeStyle(patch: Partial<ShapeStyle>): void;
12420
12998
  setShapeType(shapeType: string): void;
@@ -12507,7 +13085,11 @@ interface InspectorState {
12507
13085
  height: number;
12508
13086
  rotation: number;
12509
13087
  fillColor: string | undefined;
13088
+ /** Theme ref for `fillColor`, if any (highlights the matching theme swatch). */
13089
+ fillColorRef: PptxThemeColorRef | undefined;
12510
13090
  strokeColor: string | undefined;
13091
+ /** Theme ref for `strokeColor`, if any (highlights the matching theme swatch). */
13092
+ strokeColorRef: PptxThemeColorRef | undefined;
12511
13093
  strokeWidth: number;
12512
13094
  shapeStyle: ShapeStyle | undefined;
12513
13095
  shapeType: string | undefined;
@@ -12546,6 +13128,15 @@ interface InspectorState {
12546
13128
  actionHover?: ElementAction;
12547
13129
  /** The selected element's alt text (accessibility description), if any. */
12548
13130
  altText: string;
13131
+ /** The selected element's accessibility title (`p:cNvPr/@title`), if any. */
13132
+ title: string;
13133
+ /**
13134
+ * Whether the selection is a plain shape, text box or connector: gates the
13135
+ * Accessibility section's own alt-text/title editor (a picture's alt text
13136
+ * has its own field in the Image section; a graphic frame has no editor
13137
+ * of its own yet).
13138
+ */
13139
+ isTextShapeOrConnector: boolean;
12549
13140
  chartData?: PptxChartData;
12550
13141
  /**
12551
13142
  * The on-canvas chart part selection, scoped to the selected chart element:
@@ -12594,6 +13185,12 @@ interface InspectorState {
12594
13185
  * colours" row under the fill/stroke/text colour pickers.
12595
13186
  */
12596
13187
  recentColors: readonly string[];
13188
+ /**
13189
+ * The deck's resolved theme colour map (scheme key -> hex), feeding the
13190
+ * "Theme Colors" grid under the fill/stroke colour pickers. `undefined`
13191
+ * before a theme has loaded.
13192
+ */
13193
+ themeColorMap: Record<string, string> | undefined;
12597
13194
  }
12598
13195
  /**
12599
13196
  * Deck/slide-level state for the inspector's Elements and Comments tabs plus
@@ -12939,6 +13536,8 @@ interface RibbonSelectionState {
12939
13536
  customFontFamilies?: readonly string[];
12940
13537
  /** B6: the deck's `p:clrMru`, most-recent-first; feeds every swatch picker's row. */
12941
13538
  recentColors?: readonly string[];
13539
+ /** The deck's resolved theme colour map, feeding the font-colour "Theme Colors" grid. */
13540
+ themeColorMap?: Record<string, string>;
12942
13541
  }
12943
13542
  //#endregion
12944
13543
  //#region src/viewer/ui/mobile-action-sheets.d.ts
@@ -14332,6 +14931,13 @@ interface ChromeHost {
14332
14931
  * Documents" (0-50), read fresh whenever the Recent list loads.
14333
14932
  */
14334
14933
  getRecentPresentationsCount(): number;
14934
+ /**
14935
+ * The deck's parsed `ppt/tableStyles.xml` map, for the table properties
14936
+ * panel's "Edit style...".
14937
+ */
14938
+ getTableStyleMap(): ParsedTableStyleMap | undefined;
14939
+ /** The current theme colour map (scheme key -> hex), for resolving scheme-based table style colours. */
14940
+ getThemeColorMap(): Record<string, string> | undefined;
14335
14941
  toggleTemplateEditing(): void;
14336
14942
  toggleMasterNavigation(): void;
14337
14943
  selectElements(ids: string[]): void;
@@ -14720,6 +15326,13 @@ declare class PptxViewer extends ViewerExportHost implements PptxViewerInstance,
14720
15326
  * (same pre-construction timing note as `getQuickAccessOptions`).
14721
15327
  */
14722
15328
  getChartFollowDataPoint(): boolean;
15329
+ /**
15330
+ * The deck's parsed `ppt/tableStyles.xml` map, for the table properties
15331
+ * panel's "Edit style...".
15332
+ */
15333
+ getTableStyleMap(): ParsedTableStyleMap | undefined;
15334
+ /** The current theme colour map (scheme key -> hex), for resolving scheme-based table style colours. */
15335
+ getThemeColorMap(): Record<string, string> | undefined;
14723
15336
  /**
14724
15337
  * File > Options > Advanced > "Quickly access this number of Recent
14725
15338
  * Documents" (0-50). Defaults to the schema default before the options