pptx-vanilla-viewer 2.7.0 → 2.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.
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-Duo3PfvM.d.ts
6
+ //#region ../core/dist/text-operations-BtHy_zMG.d.ts
7
7
  //#region src/core/types/actions.d.ts
8
8
  /**
9
9
  * Action types: hyperlinks, slide jumps, macros, and action buttons.
@@ -2213,6 +2213,29 @@ interface PptxElementBase {
2213
2213
  y: number;
2214
2214
  width: number;
2215
2215
  height: number;
2216
+ /**
2217
+ * The exact EMU integer `x` was parsed from (the `a:off/@_x` this
2218
+ * element's own `a:xfrm` carried on load), when the parser could resolve
2219
+ * one. `x` itself is always `Math.round(xEmu / EMU_PER_PX)` at parse
2220
+ * time, but that rounding is lossy: re-deriving EMU from `x` on save
2221
+ * (`Math.round(x * EMU_PER_PX)`) can drift from the original value by up
2222
+ * to half a pixel's worth of EMU on every load/save cycle even when
2223
+ * nothing touched this element. Kept alongside `x` (not instead of it) so
2224
+ * every consumer that only cares about on-screen position is unaffected;
2225
+ * only the save-side xfrm writer (`resolveXfrmEmu` in
2226
+ * `xfrm-emu-resolution.ts`) reads this, and only when `x` still equals
2227
+ * `Math.round(xEmu / EMU_PER_PX)` (i.e. nothing moved this element since
2228
+ * load) does it re-emit `xEmu` verbatim instead of re-quantizing `x`.
2229
+ * `undefined` for an SDK-created element or one whose transform could not
2230
+ * be resolved to a usable `a:off` on load.
2231
+ */
2232
+ xEmu?: number;
2233
+ /** The exact EMU integer `y` was parsed from (`a:off/@_y`). See {@link xEmu}. */
2234
+ yEmu?: number;
2235
+ /** The exact EMU integer `width` was parsed from (`a:ext/@_cx`). See {@link xEmu}. */
2236
+ widthEmu?: number;
2237
+ /** The exact EMU integer `height` was parsed from (`a:ext/@_cy`). See {@link xEmu}. */
2238
+ heightEmu?: number;
2216
2239
  rotation?: number;
2217
2240
  /** Skew along the X axis in degrees (parsed from `@_skewX` in 1/60000ths of a degree). */
2218
2241
  skewX?: number;
@@ -2462,7 +2485,38 @@ interface PptxChartDataPointPicture {
2462
2485
  //#region src/core/types/chart-pivot-format.d.ts
2463
2486
  interface PptxChartPivotFormat {
2464
2487
  index: number;
2488
+ /**
2489
+ * Typed projection of `spPr` (fill/stroke colour, stroke width, dash
2490
+ * style). When the parser is given a colour resolver (the normal case: the
2491
+ * runtime always supplies one), both a literal `a:srgbClr` and an
2492
+ * `a:schemeClr` theme reference (with its `lumMod`/`lumOff`/`tint`/`shade`
2493
+ * modifiers) resolve to a hex colour here, the same theme +
2494
+ * `c:clrMapOvr` chain the rest of chart parsing uses. Without a resolver
2495
+ * (e.g. a hand-built `PptxChartPivotFormat` with no theme to resolve
2496
+ * against), only the literal case resolves. Either way the authored node
2497
+ * is byte-preserved through {@link shapePropertiesXml} until this field is
2498
+ * set to something that no longer matches what re-parses off the current
2499
+ * XML; setting it then re-derives `shapePropertiesXml` on save (merged
2500
+ * onto whatever was already authored, keeping an unrelated schemeClr
2501
+ * reference alive when the colour itself is unchanged) unless
2502
+ * `shapePropertiesXml` is set explicitly, which wins.
2503
+ */
2504
+ shapeProperties?: PptxChartShapeProps;
2505
+ /**
2506
+ * Typed projection of `txPr`'s `a:p/a:pPr/a:defRPr` (size/bold/italic/
2507
+ * colour/family), the same shape a legend entry or data-table's text
2508
+ * override models. Colour resolution mirrors {@link shapeProperties}
2509
+ * (theme-resolved `schemeClr` when a colour resolver is supplied, literal
2510
+ * `srgbClr` otherwise). See {@link txPrXml} for the raw fallback.
2511
+ */
2512
+ textStyle?: PptxChartLegendTextStyle;
2513
+ /**
2514
+ * Typed projection of `marker` (symbol/size/spPr). See {@link markerXml}
2515
+ * for the raw fallback.
2516
+ */
2517
+ marker?: PptxChartMarker;
2465
2518
  shapePropertiesXml?: XmlObject | null;
2519
+ txPrXml?: XmlObject | null;
2466
2520
  markerXml?: XmlObject | null;
2467
2521
  dataLabelXml?: XmlObject | null;
2468
2522
  extensionListXml?: XmlObject | null;
@@ -2655,20 +2709,6 @@ interface PptxChartTitleRun {
2655
2709
  }
2656
2710
  //#endregion
2657
2711
  //#region src/core/types/chart-user-shapes.d.ts
2658
- /**
2659
- * Types for chart drawing-overlay shapes (`c:userShapes`).
2660
- *
2661
- * A chart's `c:userShapes` element carries an `r:id` that references a
2662
- * separate drawing part (`ppt/drawings/drawingN.xml`) whose root is a
2663
- * `c:userShapes` element populated with `cdr:relSizeAnchor` /
2664
- * `cdr:absSizeAnchor` wrappers around `sp` / `pic` / `cxnSp` shapes drawn on
2665
- * top of the chart plot. These interfaces describe the parsed, renderable
2666
- * overlay model. The raw reference is preserved separately on
2667
- * {@link PptxChartData.userShapesXml} for verbatim round-trip save; this model
2668
- * is render-only.
2669
- *
2670
- * @module pptx-types/chart-user-shapes
2671
- */
2672
2712
  /** A single paragraph of overlay-shape text with light formatting. */
2673
2713
  interface PptxChartUserShapeParagraph {
2674
2714
  /** Joined run text of the paragraph. */
@@ -2684,6 +2724,112 @@ interface PptxChartUserShapeParagraph {
2684
2724
  /** Paragraph alignment (`a:pPr/@algn`): left / centre / right. */
2685
2725
  align?: 'l' | 'ctr' | 'r';
2686
2726
  }
2727
+ /**
2728
+ * The DrawingML 2D group transform (`a:xfrm` inside `cdr:grpSpPr`) that
2729
+ * anchors a `grpSp`'s own box ({@link off}/{@link ext}) and establishes the
2730
+ * coordinate space its children are expressed in ({@link chOff}/{@link
2731
+ * chExt}), all in EMU. A child's position within the group is mapped into
2732
+ * the group's own box via
2733
+ * `frac = (child.off - chOff) / chExt`, then applied to the enclosing
2734
+ * anchor's box; see `flattenChartUserShapes` in
2735
+ * `chart-user-shapes-parser.ts`.
2736
+ */
2737
+ interface PptxChartUserShapeGroupTransform {
2738
+ /** The group's own position in its parent's coordinate space, in EMU. */
2739
+ off: {
2740
+ x: number;
2741
+ y: number;
2742
+ };
2743
+ /** The group's own size in its parent's coordinate space, in EMU. */
2744
+ ext: {
2745
+ cx: number;
2746
+ cy: number;
2747
+ };
2748
+ /** Origin of the child coordinate space (`a:chOff`), in EMU. */
2749
+ chOff: {
2750
+ x: number;
2751
+ y: number;
2752
+ };
2753
+ /** Size of the child coordinate space (`a:chExt`), in EMU. */
2754
+ chExt: {
2755
+ cx: number;
2756
+ cy: number;
2757
+ };
2758
+ /**
2759
+ * The group's own rotation in degrees (`a:xfrm/@rot`, stored in 60,000ths
2760
+ * of a degree), when present. Rotates the whole group, and everything
2761
+ * grouped inside it, as a rigid body about the CENTRE of the group's own
2762
+ * box ({@link off}/{@link ext}); see `flattenChartUserShapes` in
2763
+ * `chart-user-shapes-parser.ts` for how this composes onto each contained
2764
+ * leaf's own {@link PptxChartUserShapeGroupChild.rotation}. Verified
2765
+ * against real PowerPoint (COM): a `cdr:grpSp`'s `cdr:grpSpPr/a:xfrm` does
2766
+ * carry `rot` the same way an ordinary shape's does.
2767
+ */
2768
+ rotation?: number;
2769
+ /** The group's own horizontal flip (`a:xfrm/@flipH`), when present; composes onto children by XOR, see {@link rotation}'s doc. */
2770
+ flipH?: boolean;
2771
+ /** The group's own vertical flip (`a:xfrm/@flipV`), when present; composes onto children by XOR, see {@link rotation}'s doc. */
2772
+ flipV?: boolean;
2773
+ }
2774
+ /**
2775
+ * One shape grouped inside a `cdr:grpSp` (or a nested `cdr:grpSp` itself).
2776
+ * Unlike a top-level {@link PptxChartUserShape}, a group child has no
2777
+ * drawing anchor of its own: its position is expressed in its parent
2778
+ * group's child coordinate space via {@link off}/{@link ext} (EMU, read
2779
+ * from the child's own `a:xfrm`), not as a chart-relative fraction.
2780
+ */
2781
+ interface PptxChartUserShapeGroupChild {
2782
+ /** Shape kind, same vocabulary as {@link PptxChartUserShape.kind}. */
2783
+ kind: 'sp' | 'cxnSp' | 'pic' | 'grpSp' | 'graphicFrame';
2784
+ /** Position within the parent group's child coordinate space, in EMU. */
2785
+ off: {
2786
+ x: number;
2787
+ y: number;
2788
+ };
2789
+ /** Size within the parent group's child coordinate space, in EMU. */
2790
+ ext: {
2791
+ cx: number;
2792
+ cy: number;
2793
+ };
2794
+ /** Preset geometry name (`a:prstGeom/@prst`), defaulting to `"rect"`. */
2795
+ prst?: string;
2796
+ /** Resolved solid-fill hex colour, when present. */
2797
+ fill?: string;
2798
+ /** Resolved line/stroke hex colour, when present. */
2799
+ stroke?: string;
2800
+ /** Line width in points (`a:ln/@w` divided by 12700), when present. */
2801
+ strokeWidth?: number;
2802
+ /** Text paragraphs of the shape's `txBody`, when present. */
2803
+ paragraphs?: PptxChartUserShapeParagraph[];
2804
+ /**
2805
+ * A `pic` child's alt text (`cdr:nvPicPr/cdr:cNvPr/@descr`), when present.
2806
+ * Editable independently of {@link rawXml}'s otherwise-verbatim content:
2807
+ * the serializer patches only this attribute onto the cloned raw node.
2808
+ */
2809
+ altText?: string;
2810
+ /**
2811
+ * This child's OWN rotation in degrees (`a:xfrm/@rot`), when present.
2812
+ * Composes with every enclosing group's own
2813
+ * {@link PptxChartUserShapeGroupTransform.rotation} (added) to produce the
2814
+ * leaf's final on-screen rotation; see `flattenChartUserShapes`.
2815
+ */
2816
+ rotation?: number;
2817
+ /** This child's OWN horizontal flip (`a:xfrm/@flipH`); composes with an ancestor group's flip by XOR. */
2818
+ flipH?: boolean;
2819
+ /** This child's OWN vertical flip (`a:xfrm/@flipV`); composes with an ancestor group's flip by XOR. */
2820
+ flipV?: boolean;
2821
+ /**
2822
+ * Verbatim source XML of a `pic`/`graphicFrame` child, or of this node
2823
+ * itself when `kind === 'grpSp'` and the nested group is untouched since
2824
+ * parse. See {@link PptxChartUserShape.rawXml}'s doc for the same
2825
+ * contract one level up.
2826
+ */
2827
+ rawXml?: XmlObject;
2828
+ /** Present when `kind === 'grpSp'`: this nested group's own transform. */
2829
+ transform?: PptxChartUserShapeGroupTransform;
2830
+ /** Present when `kind === 'grpSp'`: this nested group's own children. */
2831
+ children?: PptxChartUserShapeGroupChild[];
2832
+ }
2687
2833
  /**
2688
2834
  * A parsed chart-overlay shape positioned by a drawing anchor.
2689
2835
  *
@@ -2694,12 +2840,13 @@ interface PptxChartUserShapeParagraph {
2694
2840
  interface PptxChartUserShape {
2695
2841
  /**
2696
2842
  * Shape kind: text/preset shape, connector, picture, a group of the
2697
- * above (`grpSp`, flattened: each grouped child becomes its own entry
2698
- * reusing the anchor's own bounding box, an approximation since the
2699
- * group's internal chOff/chExt transform is not applied), or a bare
2700
- * placeholder for a `graphicFrame` anchor child (deep content such as a
2701
- * nested chart or table is out of scope; it only keeps the anchor's
2702
- * space accounted for instead of the whole overlay disappearing).
2843
+ * above (`grpSp`, with its own {@link transform} and {@link children},
2844
+ * nested arbitrarily; use `flattenChartUserShapes` from
2845
+ * `chart-user-shapes-parser.ts` to get a flat, render-ready leaf list
2846
+ * with the group transform already applied), or a bare placeholder for
2847
+ * a `graphicFrame` anchor child (deep content such as a nested chart or
2848
+ * table is out of scope; it only keeps the anchor's space accounted for
2849
+ * instead of the whole overlay disappearing).
2703
2850
  */
2704
2851
  kind: 'sp' | 'cxnSp' | 'pic' | 'grpSp' | 'graphicFrame';
2705
2852
  /** Anchor kind that positioned the shape. */
@@ -2729,6 +2876,49 @@ interface PptxChartUserShape {
2729
2876
  strokeWidth?: number;
2730
2877
  /** Text paragraphs of the shape's `txBody`, when present. */
2731
2878
  paragraphs?: PptxChartUserShapeParagraph[];
2879
+ /**
2880
+ * A `pic` anchor's alt text (`cdr:nvPicPr/cdr:cNvPr/@descr`), when
2881
+ * present. Editable independently of {@link rawXml}'s otherwise-verbatim
2882
+ * content: the serializer patches only this attribute onto the cloned
2883
+ * raw node, so a picture's blip and other markup are untouched.
2884
+ */
2885
+ altText?: string;
2886
+ /**
2887
+ * This shape's OWN rotation in degrees (`a:xfrm/@rot`, on `spPr/a:xfrm`
2888
+ * for `sp`/`cxnSp`/`pic`, or directly on a top-level `graphicFrame`'s own
2889
+ * `a:xfrm`), when present. A top-level anchor's position/size is governed
2890
+ * by {@link from}/{@link to}/{@link ext}, never by this `a:xfrm`'s own
2891
+ * `off`/`ext` (see {@link rawXml}'s doc), but `rot`/`flipH`/`flipV` on that
2892
+ * same `a:xfrm` DO apply visually: verified against real PowerPoint (COM),
2893
+ * which writes e.g. `<a:xfrm rot="1800000"><a:off .../><a:ext .../></a:xfrm>`
2894
+ * on a rotated overlay shape's `spPr`, with the `off`/`ext` values
2895
+ * unrelated to the anchor's own `cdr:from`/`cdr:to`.
2896
+ */
2897
+ rotation?: number;
2898
+ /** This shape's OWN horizontal flip (`a:xfrm/@flipH`); see {@link rotation}'s doc. */
2899
+ flipH?: boolean;
2900
+ /** This shape's OWN vertical flip (`a:xfrm/@flipV`); see {@link rotation}'s doc. */
2901
+ flipV?: boolean;
2902
+ /**
2903
+ * Verbatim source XML of a `pic` or `graphicFrame` anchor child (the
2904
+ * `cdr:pic` / `cdr:graphicFrame` node itself, not the enclosing anchor),
2905
+ * or of the `cdr:grpSp` node itself when `kind === 'grpSp'` and the
2906
+ * group is untouched since parse (byte-identical passthrough). None of
2907
+ * these three kinds have a reconstructable typed representation that is
2908
+ * guaranteed lossless (a picture's blip reference, a nested chart/table's
2909
+ * graphic content, or a group's exact child ordering/ids), so the
2910
+ * serializer re-emits this verbatim when present instead of a lossy
2911
+ * rebuild. Editing a shape inside a group (via the SDK's path-based
2912
+ * overlay operations) clears the group's `rawXml` so the serializer
2913
+ * regenerates it from {@link transform}/{@link children} instead. Absent
2914
+ * for `sp`/`cxnSp`, which round-trip losslessly through their typed
2915
+ * fields above.
2916
+ */
2917
+ rawXml?: XmlObject;
2918
+ /** Present when `kind === 'grpSp'`: the group's own transform. */
2919
+ transform?: PptxChartUserShapeGroupTransform;
2920
+ /** Present when `kind === 'grpSp'`: the grouped children, nested arbitrarily. */
2921
+ children?: PptxChartUserShapeGroupChild[];
2732
2922
  }
2733
2923
  //#endregion
2734
2924
  //#region src/core/types/chart.d.ts
@@ -2738,7 +2928,7 @@ interface PptxChartUserShape {
2738
2928
  * @example
2739
2929
  * ```ts
2740
2930
  * const type: PptxChartType = "bar";
2741
- * // => "bar" one of: "bar" | "line" | "pie" | "doughnut" | "area" | "scatter" | …
2931
+ * // => "bar": one of: "bar" | "line" | "pie" | "doughnut" | "area" | "scatter" | …
2742
2932
  * ```
2743
2933
  */
2744
2934
  type PptxChartType = 'bar' | 'line' | 'pie' | 'ofPie' | 'doughnut' | 'area' | 'scatter' | 'bubble' | 'radar' | 'stock' | 'bar3D' | 'line3D' | 'pie3D' | 'area3D' | 'surface' | 'histogram' | 'waterfall' | 'funnel' | 'treemap' | 'sunburst' | 'boxWhisker' | 'regionMap' | 'combo' | 'unknown';
@@ -2773,7 +2963,7 @@ type PptxBar3DShape = 'box' | 'cone' | 'coneToMax' | 'cylinder' | 'pyramid' | 'p
2773
2963
  * @example
2774
2964
  * ```ts
2775
2965
  * const type: PptxChartTrendlineType = "linear";
2776
- * // => "linear" one of: "linear" | "exponential" | "logarithmic" | "polynomial" | "power" | "movingAvg"
2966
+ * // => "linear": one of: "linear" | "exponential" | "logarithmic" | "polynomial" | "power" | "movingAvg"
2777
2967
  * ```
2778
2968
  */
2779
2969
  type PptxChartTrendlineType = 'linear' | 'exponential' | 'logarithmic' | 'polynomial' | 'power' | 'movingAvg';
@@ -2824,7 +3014,7 @@ type PptxChartErrBarType = 'both' | 'minus' | 'plus';
2824
3014
  * @example
2825
3015
  * ```ts
2826
3016
  * const valType: PptxChartErrValType = "percentage";
2827
- * // => "percentage" one of: "cust" | "fixedVal" | "percentage" | "stdDev" | "stdErr"
3017
+ * // => "percentage": one of: "cust" | "fixedVal" | "percentage" | "stdDev" | "stdErr"
2828
3018
  * ```
2829
3019
  */
2830
3020
  type PptxChartErrValType = 'cust' | 'fixedVal' | 'percentage' | 'stdDev' | 'stdErr';
@@ -2943,6 +3133,14 @@ interface PptxChartDataPoint {
2943
3133
  bubble3D?: boolean;
2944
3134
  /** Per-point picture-fill flags (`c:dPt/c:pictureOptions`). */
2945
3135
  picture?: PptxChartDataPointPicture;
3136
+ /**
3137
+ * This point's identity GUID (`c:dPt/c:extLst/c:ext/c16:uniqueId/@val`,
3138
+ * the Office 2014+ `{C3380CC4-5D6E-409C-BE32-E72D297353CC}` chart
3139
+ * extension), read-only here: an edited point keeps its existing
3140
+ * `c:extLst` as passthrough (see `chart-datapoint-serializer.ts`), so this
3141
+ * field exists for introspection rather than round-trip.
3142
+ */
3143
+ uniqueId?: string;
2946
3144
  }
2947
3145
  /** Schema values accepted by `c:dLblPos`. */
2948
3146
  type PptxChartDataLabelPosition = 'bestFit' | 'b' | 'ctr' | 'inBase' | 'inEnd' | 'l' | 'outEnd' | 'r' | 't';
@@ -3019,7 +3217,7 @@ interface PptxChartAxisFormatting extends PptxChartAxisLabelFormatting {
3019
3217
  axPos?: 'b' | 'l' | 'r' | 't';
3020
3218
  /** Unique axis identifier (c:axId/@val) used to link series to axes. */
3021
3219
  axisId?: number;
3022
- /** Cross-axis identifier the axis this axis crosses. */
3220
+ /** Cross-axis identifier: the axis this axis crosses. */
3023
3221
  crossAxisId?: number;
3024
3222
  /** Automatic crossing mode (`c:crosses`). Mutually exclusive with `crossesAt`. */
3025
3223
  crosses?: 'autoZero' | 'min' | 'max';
@@ -3271,6 +3469,54 @@ interface PptxChartSeries {
3271
3469
  waterfallOptions?: PptxChartWaterfallOptions;
3272
3470
  regionMapOptions?: PptxChartRegionMapOptions;
3273
3471
  treemapOptions?: PptxChartTreemapOptions;
3472
+ /**
3473
+ * Series-level picture-fill flags (`c:ser/c:pictureOptions`), legal
3474
+ * wherever a per-point `c:dPt/c:pictureOptions` is (CT_BarSer): paints
3475
+ * EVERY point in the series with one picture unless a `c:dPt` overrides it
3476
+ * for that point alone. A point's own {@link PptxChartDataPoint.picture}
3477
+ * takes precedence entirely (not merged field-by-field) when it resolves
3478
+ * its own image; renderers fall back to this series-level picture only
3479
+ * when the point has none of its own.
3480
+ */
3481
+ picture?: PptxChartDataPointPicture;
3482
+ /**
3483
+ * This series' identity GUID (`c:ser/c:extLst/c:ext/c16:uniqueId/@val`,
3484
+ * the Office 2014+ `{C3380CC4-5D6E-409C-BE32-E72D297353CC}` chart
3485
+ * extension). PowerPoint uses it to track a series across edits and
3486
+ * collaborators independent of its `c:idx`/`c:order` position (the same
3487
+ * role animation targeting and CRDT reconciliation need). An edited
3488
+ * existing series keeps its own `c:extLst` as passthrough; a NEW series
3489
+ * added by cloning an existing one as a template is given a freshly
3490
+ * generated id rather than duplicating the template's (see
3491
+ * `regenerateClonedUniqueId` in `chart-series-identity.ts`), since two
3492
+ * series sharing one identity is exactly what this extension exists to
3493
+ * prevent.
3494
+ */
3495
+ uniqueId?: string;
3496
+ }
3497
+ /**
3498
+ * A series PowerPoint's "Chart Filters" feature hid from the plot while
3499
+ * keeping it in the workbook (`c:<type>Chart/c:extLst/c:ext
3500
+ * [@uri={02D57815-91ED-43cb-92C2-25804820EDAC}]/c15:filtered<Type>Series
3501
+ * /c15:ser`). Read-mostly: {@link PptxChartData.filteredSeries} exists for
3502
+ * introspection (AI tools, "unhide filtered series" UI) and round-trips as
3503
+ * passthrough through the preserved chart XML when untouched. See
3504
+ * `utils/chart-filtered-series.ts` for the parse rules and the idx-collision
3505
+ * fix this modelling enables on save.
3506
+ */
3507
+ interface PptxChartFilteredSeries {
3508
+ /** `c15:ser/c:idx/@val`, the workbook column position this series still occupies. */
3509
+ idx: number;
3510
+ /** `c15:ser/c:order/@val`, defaulting to {@link idx} when absent. */
3511
+ order: number;
3512
+ /** Series name, from the hidden series' own `c:tx` cache. */
3513
+ name?: string;
3514
+ /** Category labels, from the hidden series' own `c:cat` cache. */
3515
+ categories?: string[];
3516
+ /** Data values, from the hidden series' own `c:val` cache. */
3517
+ values?: number[];
3518
+ /** This hidden series' own identity GUID (`c16:uniqueId`), when present. */
3519
+ uniqueId?: string;
3274
3520
  }
3275
3521
  /**
3276
3522
  * Chart-level data-label options (`c:dLbls` directly under a chart-type
@@ -3294,6 +3540,19 @@ interface PptxChartDataLabelOptions {
3294
3540
  separator?: string;
3295
3541
  /** Show leader lines where supported (`c:showLeaderLines`). */
3296
3542
  showLeaderLines?: boolean;
3543
+ /**
3544
+ * Leader-line stroke styling for offset (pie/doughnut `outEnd`/`bestFit`)
3545
+ * labels. Resolved from the base `c:leaderLines/c:spPr` when present, else
3546
+ * falling back to the Office 2013+ chart15 extension's mirror
3547
+ * (`c:extLst/c:ext/c15:leaderLines/c:spPr`, uri
3548
+ * `{CE6537A1-D6FC-4f65-9D91-7224C49458BB}`), which is the one PowerPoint
3549
+ * itself treats as authoritative when both are present. Confirmed against
3550
+ * `e2e/fixtures/issue-132-gradient-fill.pptx` and
3551
+ * `e2e/fixtures/issue-132-hr-deck.pptx`, both of which write only the
3552
+ * extension form. `undefined` leaves the renderer's own default leader-line
3553
+ * stroke.
3554
+ */
3555
+ leaderLineStyle?: PptxChartShapeProps;
3297
3556
  /**
3298
3557
  * Label position (`c:dLblPos`). Valid values depend on the chart type
3299
3558
  * (`ctr`, `inEnd`, `inBase`, `outEnd`, `bestFit`, `l`, `r`, `t`, `b`).
@@ -3447,12 +3706,12 @@ interface PptxBubbleChartOptions {
3447
3706
  *
3448
3707
  * All fields are optional and round-trip verbatim.
3449
3708
  *
3450
- * - {@link rotX} X-axis rotation in degrees (-90…90).
3451
- * - {@link rotY} Y-axis rotation in degrees (0…360).
3452
- * - {@link depthPercent} chart depth as a percentage of base width.
3453
- * - {@link rAngAx} `true` if axes meet at right angles.
3454
- * - {@link perspective} perspective angle in degrees (0…240).
3455
- * - {@link hPercent} height as a percentage of chart width.
3709
+ * - {@link rotX}: X-axis rotation in degrees (-90…90).
3710
+ * - {@link rotY}: Y-axis rotation in degrees (0…360).
3711
+ * - {@link depthPercent}: chart depth as a percentage of base width.
3712
+ * - {@link rAngAx}: `true` if axes meet at right angles.
3713
+ * - {@link perspective}: perspective angle in degrees (0…240).
3714
+ * - {@link hPercent}: height as a percentage of chart width.
3456
3715
  */
3457
3716
  interface PptxChartView3D {
3458
3717
  rotX?: number;
@@ -3466,12 +3725,17 @@ interface PptxChartView3D {
3466
3725
  * Chart "chrome" flags from `c:chart` that round-trip cleanly even when
3467
3726
  * rendering ignores them.
3468
3727
  *
3469
- * - {@link autoTitleDeleted} `c:autoTitleDeleted/@val`. Suppresses the
3728
+ * - {@link autoTitleDeleted}: `c:autoTitleDeleted/@val`. Suppresses the
3470
3729
  * auto-generated title for single-series charts.
3471
- * - {@link dispBlanksAs} `c:dispBlanksAs/@val`. How blank cells
3730
+ * - {@link dispBlanksAs}: `c:dispBlanksAs/@val`. How blank cells
3472
3731
  * render: `"gap"`, `"zero"`, or `"span"`.
3473
- * - {@link showDLblsOverMax} `c:showDLblsOverMax/@val`. Keeps data
3732
+ * - {@link showDLblsOverMax}: `c:showDLblsOverMax/@val`. Keeps data
3474
3733
  * labels visible for points exceeding the value-axis maximum.
3734
+ * - {@link dispNaAsBlank}: the Office 2017+ chart extension
3735
+ * `c:extLst/c:ext/c16r3:dataDisplayOptions16/c16r3:dispNaAsBlank/@val`
3736
+ * (uri `{56B9EC1D-385E-4148-901F-78D8002777C0}`), PowerPoint's "Show #N/A
3737
+ * as an empty cell" chart option. Confirmed against real corpus markup
3738
+ * (`e2e/fixtures/chart-data-fidelity.pptx`).
3475
3739
  *
3476
3740
  * `c:plotVisOnly` lives on {@link PptxChartData.plotVisibleOnly} and is
3477
3741
  * intentionally not duplicated here.
@@ -3480,6 +3744,7 @@ interface PptxChartChrome {
3480
3744
  autoTitleDeleted?: boolean;
3481
3745
  dispBlanksAs?: 'gap' | 'zero' | 'span';
3482
3746
  showDLblsOverMax?: boolean;
3747
+ dispNaAsBlank?: boolean;
3483
3748
  }
3484
3749
  /** Manual chart placement from `c:layout/c:manualLayout` (CT_ManualLayout). */
3485
3750
  interface PptxChartManualLayout {
@@ -3575,6 +3840,13 @@ interface PptxChartData {
3575
3840
  categoryLevels?: string[][];
3576
3841
  dateCategories?: PptxChartDateCategories;
3577
3842
  series: PptxChartSeries[];
3843
+ /**
3844
+ * Series hidden from the plot by PowerPoint's "Chart Filters" feature
3845
+ * (Series tab) but still present in the workbook, aggregated across every
3846
+ * chart-type container (combo charts can carry more than one). Absent
3847
+ * when the chart has no such extension. See {@link PptxChartFilteredSeries}.
3848
+ */
3849
+ filteredSeries?: PptxChartFilteredSeries[];
3578
3850
  /** Chart style/formatting metadata. */
3579
3851
  style?: PptxChartStyle;
3580
3852
  /** Grouping mode for bar/area/line charts: 'clustered' | 'stacked' | 'percentStacked' */
@@ -3698,9 +3970,9 @@ interface PptxChartData {
3698
3970
  /**
3699
3971
  * Color cycling method from the chart color style part's `meth` attribute.
3700
3972
  *
3701
- * - `"cycle"` repeat the palette colours in order (default)
3702
- * - `"withinLinear"` gradient within each series
3703
- * - `"acrossLinear"` gradient across series
3973
+ * - `"cycle"`: repeat the palette colours in order (default)
3974
+ * - `"withinLinear"`: gradient within each series
3975
+ * - `"acrossLinear"`: gradient across series
3704
3976
  */
3705
3977
  colorMethod?: 'cycle' | 'withinLinear' | 'acrossLinear';
3706
3978
  /** Internal source color-style part path used for lossless dirty saves. */
@@ -5881,6 +6153,21 @@ interface PptxAccessibilityProperties {
5881
6153
  */
5882
6154
  isDecorative?: boolean;
5883
6155
  }
6156
+ /**
6157
+ * Accessibility description/title from `p:cNvPr/@descr` / `@title` on a
6158
+ * plain shape, text box or connector (`p:sp` / `p:cxnSp`). The same pair of
6159
+ * attributes already round-trips for a graphic frame (see
6160
+ * {@link TablePptxElement.altText}) and, `descr` only, for a picture
6161
+ * ({@link PptxImageProperties.altText}); this mixin extends it to the three
6162
+ * element kinds whose PowerPoint Alt Text pane data was previously dropped
6163
+ * on load because neither field existed on the model.
6164
+ */
6165
+ interface PptxNonVisualDescription {
6166
+ /** `p:cNvPr/@descr`. */
6167
+ altText?: string;
6168
+ /** `p:cNvPr/@title`. */
6169
+ title?: string;
6170
+ }
5884
6171
  /**
5885
6172
  * `a:cNvPicPr/@preferRelativeResize` (issue G13), a picture-only non-visual
5886
6173
  * property distinct from `a:picLocks`.
@@ -5913,7 +6200,7 @@ interface PptxPictureNonVisualProperties {
5913
6200
  * // => satisfies TextPptxElement
5914
6201
  * ```
5915
6202
  */
5916
- interface TextPptxElement extends PptxElementBase, PptxTextProperties, PptxShapeProperties {
6203
+ interface TextPptxElement extends PptxElementBase, PptxTextProperties, PptxShapeProperties, PptxNonVisualDescription {
5917
6204
  type: 'text';
5918
6205
  }
5919
6206
  /**
@@ -5931,7 +6218,7 @@ interface TextPptxElement extends PptxElementBase, PptxTextProperties, PptxShape
5931
6218
  * // => satisfies ShapePptxElement
5932
6219
  * ```
5933
6220
  */
5934
- interface ShapePptxElement extends PptxElementBase, PptxTextProperties, PptxShapeProperties, PptxCustomPathProperties, PptxAccessibilityProperties {
6221
+ interface ShapePptxElement extends PptxElementBase, PptxTextProperties, PptxShapeProperties, PptxCustomPathProperties, PptxAccessibilityProperties, PptxNonVisualDescription {
5935
6222
  type: 'shape';
5936
6223
  }
5937
6224
  /**
@@ -5953,7 +6240,7 @@ interface ShapePptxElement extends PptxElementBase, PptxTextProperties, PptxShap
5953
6240
  * // => satisfies ConnectorPptxElement
5954
6241
  * ```
5955
6242
  */
5956
- interface ConnectorPptxElement extends PptxElementBase, PptxTextProperties, PptxShapeProperties {
6243
+ interface ConnectorPptxElement extends PptxElementBase, PptxTextProperties, PptxShapeProperties, PptxNonVisualDescription {
5957
6244
  type: 'connector';
5958
6245
  }
5959
6246
  /**
@@ -6248,13 +6535,14 @@ interface MediaPptxElement extends PptxElementBase {
6248
6535
  */
6249
6536
  isLinked?: boolean;
6250
6537
  /**
6251
- * Accessibility description from `p:nvGraphicFramePr/p:cNvPr/@descr`.
6252
- * Only populated for the `p:graphicFrame`-shaped (SDK-created) media
6253
- * form; a `p:pic`-shaped media element's alt text is not currently
6254
- * parsed (see `PptxHandlerRuntimePictureParsing.ts`).
6538
+ * Accessibility description. Read from `p:nvGraphicFramePr/p:cNvPr/@descr`
6539
+ * for the `p:graphicFrame`-shaped (SDK-created) media form, or from
6540
+ * `p:nvPicPr/p:cNvPr/@descr` for the `p:pic`-shaped media form (real
6541
+ * PowerPoint's usual authoring shape for a video/audio placeholder); see
6542
+ * `PptxHandlerRuntimePictureParsing.ts`.
6255
6543
  */
6256
6544
  altText?: string;
6257
- /** Accessibility title from `p:nvGraphicFramePr/p:cNvPr/@title`. Same scope note as {@link altText}. */
6545
+ /** Accessibility title, from the same `@title` attribute on whichever `p:cNvPr` the media form uses. Same scope note as {@link altText}. */
6258
6546
  title?: string;
6259
6547
  /** Unrecognised graphicFrame extLst extensions, captured verbatim for round-trip. */
6260
6548
  extensionXml?: PptxGraphicFrameExtension[];
@@ -6281,6 +6569,46 @@ interface GroupPptxElement extends PptxElementBase {
6281
6569
  children: PptxElement[];
6282
6570
  /** Fill style extracted from the group's `p:grpSpPr`, used for `a:grpFill` inheritance. */
6283
6571
  groupFill?: ShapeStyle;
6572
+ /**
6573
+ * The SAME `p:grpSpPr` extraction as {@link groupFill}, kept whenever the
6574
+ * group carries a `p:grpSpPr` at all, regardless of whether it resolved to
6575
+ * a paintable fill.
6576
+ *
6577
+ * `groupFill` is `undefined` unless the group has a real fill, because
6578
+ * `getGroupChildParentFill`/`groupChildInheritedFill` (the `a:grpFill`
6579
+ * inheritance chain) must keep chaining through an ancestor's fill when
6580
+ * THIS group has none of its own. A group whose `p:grpSpPr` authors only
6581
+ * `a:effectLst` (shadow/glow/soft-edge/reflection, no fill) needs those
6582
+ * effects to still reach the renderer, so they are kept here under a name
6583
+ * that carries no fill-inheritance meaning. Currently only reflection is
6584
+ * read from it (`getComputedEffectStyle`); the rest of `a:effectLst` on a
6585
+ * group remains unsupported.
6586
+ */
6587
+ groupEffectStyle?: ShapeStyle;
6588
+ /**
6589
+ * Exact EMU the group's own `a:chOff`/`a:chExt` (the coordinate space its
6590
+ * CHILDREN are authored in) were parsed from, alongside {@link
6591
+ * PptxElementBase.xEmu} etc for the group's own placement in its PARENT's
6592
+ * space. `undefined` when the source carried no usable `a:chOff`/`a:chExt`
6593
+ * (an SDK-created group, or one whose `a:xfrm` had no child-space data).
6594
+ *
6595
+ * Used by `group-xfrm-preservation.ts`'s `hasCapturedChildSpace` to decide
6596
+ * whether this group's original `a:chOff`/`a:chExt` can be re-emitted
6597
+ * verbatim (always true once captured, regardless of whether anything in
6598
+ * the subtree has moved or resized - only its DIRECT children's
6599
+ * `a:off`/`a:ext` are recomputed, via `invertChildIntoGroupSpace`, when
6600
+ * something changed), instead of the normalized `chOff 0,0` / `chExt ==
6601
+ * ext` space the writer falls back to when this is `undefined` (or
6602
+ * degenerate). See `group-shape-geometry.ts`'s module doc for why a group
6603
+ * needs two coordinate systems at all.
6604
+ */
6605
+ chOffXEmu?: number;
6606
+ /** See {@link chOffXEmu}. */
6607
+ chOffYEmu?: number;
6608
+ /** See {@link chOffXEmu}. */
6609
+ chExtWidthEmu?: number;
6610
+ /** See {@link chOffXEmu}. */
6611
+ chExtHeightEmu?: number;
6284
6612
  }
6285
6613
  /**
6286
6614
  * A freehand ink / drawing stroke captured with a stylus or mouse.
@@ -6309,6 +6637,24 @@ interface InkPptxElement extends PptxElementBase {
6309
6637
  * variable-width strokes that reflect stylus/pen pressure.
6310
6638
  */
6311
6639
  inkPointPressures?: number[][];
6640
+ /**
6641
+ * Per-path arrays of per-point pen-tilt lean direction (degrees, straight
6642
+ * from `PointerEvent.tiltX` on supporting hardware).
6643
+ *
6644
+ * Each entry corresponds to the path at the same index in `inkPaths`, and
6645
+ * is paired positionally with {@link inkPointTiltY}. Present only when at
6646
+ * least one point in the stroke reported a genuinely non-zero tilt: a
6647
+ * device that never reports tilt (a mouse, or a stylus with no tilt
6648
+ * sensor) leaves both arrays absent, the same way `inkPointPressures` is
6649
+ * omitted when pressure never varies. When present, the renderer converts
6650
+ * the raw `(tiltX, tiltY)` vector into a lean angle + magnitude (see
6651
+ * `pptx-viewer-shared`'s `tiltChannelsFromVectors`) and widens the stroke
6652
+ * perpendicular to the lean direction, approximating a chisel-tip
6653
+ * calligraphy nib.
6654
+ */
6655
+ inkPointTiltX?: number[][];
6656
+ /** Per-path, per-point pen-tilt lean direction (degrees), paired with {@link inkPointTiltX}. */
6657
+ inkPointTiltY?: number[][];
6312
6658
  /** Unrecognised graphicFrame extLst extensions, captured verbatim for round-trip. */
6313
6659
  extensionXml?: PptxGraphicFrameExtension[];
6314
6660
  }
@@ -6342,6 +6688,20 @@ interface ContentPartInkStroke {
6342
6688
  * {@link tiltAngles}.
6343
6689
  */
6344
6690
  tiltMagnitudes?: number[];
6691
+ /**
6692
+ * Which InkML channel pair {@link tiltAngles}/{@link tiltMagnitudes} were
6693
+ * decoded from: `'azimuthAltitude'` when the source declared `AZIMUTH`
6694
+ * (optionally paired with `ALTITUDE`); omitted (implying `OTx`/`OTy`, i.e.
6695
+ * `'vector'`) otherwise, including for tilt this library itself captured
6696
+ * from the Draw tool's `PointerEvent.tiltX`/`tiltY`.
6697
+ *
6698
+ * A save that has to rewrite this content part's InkML (see
6699
+ * `inkml-content-part-writer.ts`) uses this to re-declare the SAME channel
6700
+ * pair the file already used, rather than always converting to `OTx`/`OTy`;
6701
+ * the rendered lean is identical either way; only the written channel
6702
+ * NAMES differ.
6703
+ */
6704
+ tiltEncoding?: 'vector' | 'azimuthAltitude';
6345
6705
  }
6346
6706
  /**
6347
6707
  * A content-part element wrapped in `mc:AlternateContent`.
@@ -7176,17 +7536,28 @@ interface PptxNativeAnimation {
7176
7536
  */
7177
7537
  afterEffect?: boolean;
7178
7538
  /**
7179
- * "After animation" end-state behaviour carried over from the matching
7180
- * {@link PptxElementAnimation.afterAnimation} entry for this effect's
7181
- * element. Not populated by the native-timing parser itself (there is no
7182
- * single `p:cTn` attribute for it): `applyAfterAnimationFromEditorList` in
7183
- * `pptx-viewer-shared` merges it in from the editor's per-element
7184
- * animation list before playback, since that is the model the animation
7185
- * panel writes `afterAnimation` into.
7539
+ * "After animation" end-state behaviour: dim-to-colour, hide-after-
7540
+ * animation, or hide-on-next-click. Populated directly by the
7541
+ * native-timing parser (`native-animation-after-effect.ts`) when the
7542
+ * effect's `p:cTn/p:subTnLst` carries PowerPoint's genuine after-effect
7543
+ * shape, so a real-world deck's build shows up here even with no
7544
+ * `pptx:editorMeta`. `applyAfterAnimationFromEditorList` in
7545
+ * `pptx-viewer-shared` overrides this from the matching
7546
+ * {@link PptxElementAnimation.afterAnimation} entry when the editor's
7547
+ * per-element animation list has one (the model the animation panel
7548
+ * writes `afterAnimation` into), so an edit through our own UI always wins.
7186
7549
  */
7187
7550
  afterAnimationAction?: PptxAfterAnimationAction;
7188
- /** Dim-to color hex, present when {@link afterAnimationAction} is `dimToColor`. */
7551
+ /** Dim-to color hex, present when {@link afterAnimationAction} is `dimToColor` AND the dim target is an already-resolved `a:srgbClr`. */
7189
7552
  afterAnimationColor?: string;
7553
+ /**
7554
+ * The typed theme reference when a `dimToColor` target is an `a:schemeClr`
7555
+ * (e.g. `accent2`) instead of `a:srgbClr`: this parse layer has no theme to
7556
+ * resolve it to sRGB with (see {@link afterAnimationColor}'s doc), so a
7557
+ * playback consumer resolves this against the deck's theme colour map.
7558
+ * Mutually exclusive with {@link afterAnimationColor} being set.
7559
+ */
7560
+ afterAnimationColorRef?: PptxThemeColorRef;
7190
7561
  /**
7191
7562
  * Parsed `p:animEffect` filter descriptor. `presetId`/`presetClass` remain
7192
7563
  * the primary effect selector (see `resolveEffect` in `pptx-viewer-shared`);
@@ -7318,13 +7689,46 @@ interface PptxAnimationKeyframe {
7318
7689
  * fidelity; consumers may use it to drive computed animation values.
7319
7690
  */
7320
7691
  fmla?: string;
7692
+ /**
7693
+ * The typed theme reference when a `p:val/p:clrVal` stop is an
7694
+ * `a:schemeClr` (e.g. `accent1`), including any `tint`/`shade`/`lumMod`/
7695
+ * `lumOff`/`alpha` children. {@link value} keeps the bare scheme name for
7696
+ * round-trip; a playback consumer needs this ref (resolved against the
7697
+ * deck's theme colour map) to turn the stop into a real CSS colour, which
7698
+ * the bare name alone cannot do. Absent for an `a:srgbClr` stop, whose
7699
+ * {@link value} is already a resolved `#rrggbb` hex string.
7700
+ */
7701
+ colorRef?: PptxThemeColorRef;
7321
7702
  }
7322
7703
  /** One generic `p:anim` behaviour inside a composed PowerPoint effect. */
7323
7704
  interface PptxAttributeAnimation {
7324
7705
  /** Lowercased target attribute from `p:attrNameLst`. */
7325
7706
  attrName: string;
7326
- /** Authored value stops from this behaviour's `p:tavLst`. */
7707
+ /**
7708
+ * Authored value stops from this behaviour's `p:tavLst`. Empty when the
7709
+ * behaviour instead uses the simpler `from`/`to`/`by` attribute form (see
7710
+ * below); at least one of `keyframes`, `from`/`to`, or `by` is present.
7711
+ */
7327
7712
  keyframes: PptxAnimationKeyframe[];
7713
+ /**
7714
+ * `p:anim/@_from` (a formula string, ECMA-376 S19.5.4 CT_TLAnimateBehavior):
7715
+ * the absolute starting value, used instead of `p:tavLst` when the
7716
+ * behaviour only has two endpoints. PowerPoint writes this form for some
7717
+ * built-in presets (e.g. "Grow And Turn"'s `ppt_x` fly-in): a bare
7718
+ * `p:anim from="..." to="..."` with no `p:tavLst` child at all. See
7719
+ * `animation-ppt-formula-ground-truth.md` in `pptx-viewer-shared` for the
7720
+ * real-PowerPoint sample this was found in.
7721
+ */
7722
+ from?: string;
7723
+ /** `p:anim/@_to`: the absolute ending value. See {@link from}. */
7724
+ to?: string;
7725
+ /**
7726
+ * `p:anim/@_by`: a DELTA formula added to wherever the attribute already
7727
+ * stands (as opposed to `from`/`to`'s absolute values), typically paired
7728
+ * with `p:cBhvr/@_additive="sum"` so it composites with a sibling
7729
+ * behaviour driving the same attribute instead of replacing it.
7730
+ */
7731
+ by?: string;
7328
7732
  /** Duration from this behaviour's nested `p:cTn/@dur`. */
7329
7733
  durationMs?: number;
7330
7734
  /** Start offset from this behaviour's nested `p:stCondLst`. */
@@ -7333,8 +7737,11 @@ interface PptxAttributeAnimation {
7333
7737
  * Interpolation mode from this behaviour's own `@_calcmode`
7334
7738
  * (ST_TLAnimateBehaviorCalcMode, ECMA-376 S19.5.2): `discrete` snaps to
7335
7739
  * each `p:tav` stop with no interpolation, `lin` (the OOXML default)
7336
- * interpolates linearly, `fmla` evaluates `p:tav/@fmla` (not consulted at
7337
- * playback here; formulas are round-tripped only). Absent means `lin`.
7740
+ * interpolates linearly. `fmla` as the WHOLE behaviour's calc mode has
7741
+ * never been observed in a real PowerPoint file and is not consulted at
7742
+ * playback; what PowerPoint actually writes is `calcmode="lin"` with a
7743
+ * per-stop `p:tav/@fmla` (see {@link PptxAnimationKeyframe.fmla}), which
7744
+ * IS consulted regardless of this field's value. Absent means `lin`.
7338
7745
  */
7339
7746
  calcMode?: 'discrete' | 'lin' | 'fmla';
7340
7747
  }
@@ -7360,16 +7767,31 @@ interface PptxColorAnimation {
7360
7767
  * companion to `@dir` for HSL colour-space animations.
7361
7768
  */
7362
7769
  path?: string;
7363
- /** Starting color as hex string. */
7770
+ /** Starting color as hex string, or the bare scheme name (e.g. `accent1`) for a theme colour; see {@link fromColorRef}. */
7364
7771
  fromColor?: string;
7365
- /** Ending color as hex string. */
7772
+ /** Ending color as hex string, or the bare scheme name; see {@link toColorRef}. */
7366
7773
  toColor?: string;
7367
7774
  /**
7368
- * Color delta (for "by" animations) as hex string. For HSL colour-space
7369
- * animations this retains the historical byte-packed compatibility value;
7370
- * consumers should prefer {@link hslDelta}, which preserves signed values.
7775
+ * Color delta (for "by" animations) as hex string, or the bare scheme name;
7776
+ * see {@link byColorRef}. For HSL colour-space animations this retains the
7777
+ * historical byte-packed compatibility value; consumers should prefer
7778
+ * {@link hslDelta}, which preserves signed values.
7371
7779
  */
7372
7780
  byColor?: string;
7781
+ /**
7782
+ * The typed theme reference when {@link fromColor} is an `a:schemeClr`
7783
+ * (including `tint`/`shade`/`lumMod`/`lumOff`/`alpha`), so playback can
7784
+ * resolve it against the deck's theme colour map. Absent when `fromColor`
7785
+ * is already a resolved `#rrggbb` hex (an `a:srgbClr` stop).
7786
+ */
7787
+ fromColorRef?: PptxThemeColorRef;
7788
+ /** The typed theme reference for {@link toColor}; see {@link fromColorRef}. */
7789
+ toColorRef?: PptxThemeColorRef;
7790
+ /**
7791
+ * The typed theme reference for {@link byColor} (RGB colour space only; an
7792
+ * HSL `by` is a signed delta, never a theme colour). See {@link fromColorRef}.
7793
+ */
7794
+ byColorRef?: PptxThemeColorRef;
7373
7795
  /**
7374
7796
  * Typed HSL delta from `p:by/p:hsl`. This preserves signed values and their
7375
7797
  * OOXML units without forcing them through the legacy byte-packed `byColor`
@@ -8582,13 +9004,13 @@ interface PptxSlide {
8582
9004
  backgroundPattern?: PptxSlideBackgroundPattern;
8583
9005
  /**
8584
9006
  * `<p:bgPr/@shadeToTitle>`: boolean flag instructing the renderer to
8585
- * shade the background gradient toward the title placeholder's text
8586
- * colour. Parsed and round-tripped here on the core model; the actual
8587
- * visual effect is applied by `pptx-viewer-shared`'s
9007
+ * anchor the background gradient on the title placeholder as a
9008
+ * rectangular path gradient (COM-measured against real PowerPoint;
9009
+ * it does NOT recolour toward the title's text colour, despite the
9010
+ * attribute's name). Parsed and round-tripped here on the core model;
9011
+ * the actual visual effect is applied by `pptx-viewer-shared`'s
8588
9012
  * `getSlideBackgroundStyle` (see `render/background-shade-to-title.ts`),
8589
- * consumed by all five bindings, not by core itself. That module's
8590
- * docstring explains the approximation: no published ECMA-376 or
8591
- * MS-ODRAWXML text documents the exact legacy blend. Legacy PowerPoint
9013
+ * consumed by all five bindings, not by core itself. Legacy PowerPoint
8592
9014
  * 97-2003 hint, not observed in any real-world corpus file this project
8593
9015
  * has collected and not settable from any modern PowerPoint UI; see
8594
9016
  * `docs/guide/limitations.md`.
@@ -9222,7 +9644,7 @@ interface PptxEmbeddedFont {
9222
9644
  originalPartBytes?: Uint8Array;
9223
9645
  }
9224
9646
  //#endregion
9225
- //#region ../core/dist/index-Coh2DmEv.d.ts
9647
+ //#region ../core/dist/index-0zviqnUe.d.ts
9226
9648
  //#region src/core/types/theme-presets.d.ts
9227
9649
  /**
9228
9650
  * A complete theme preset that can be applied to a presentation.
@@ -10835,6 +11257,24 @@ interface ThemeCatalogEntry {
10835
11257
  theme: ViewerTheme | undefined;
10836
11258
  }
10837
11259
  //#endregion
11260
+ //#region ../shared/dist/smartart-3d-types-5jml-0QC.d.ts
11261
+ //#region src/render/animation-text-style-resolve.d.ts
11262
+ /**
11263
+ * Framework-neutral text-style override a font-style emphasis effect applies
11264
+ * on top of its target's own authored per-run bold/italic/underline/size/
11265
+ * colour. Every binding maps this onto its own text container so it OVERRIDES
11266
+ * the runs' inline styles (the runs carry explicit inline styles of their
11267
+ * own, so plain CSS inheritance cannot reach them).
11268
+ */
11269
+ interface TextStyleAnimationDescriptor {
11270
+ bold?: boolean;
11271
+ italic?: boolean;
11272
+ underline?: boolean;
11273
+ /** Relative multiplier against each run's own authored font size. */
11274
+ fontScale?: number;
11275
+ color?: string;
11276
+ }
11277
+ //#endregion
10838
11278
  //#region ../shared/dist/index.d.ts
10839
11279
  //#region src/types.d.ts
10840
11280
  /** Canvas dimensions in pixels. */
@@ -11026,6 +11466,16 @@ interface ChartPartRef {
11026
11466
  //#region src/render/animation-authoring.d.ts
11027
11467
  /** One of the three animation buckets a preset can occupy on an element. */
11028
11468
  type AnimationGroup = 'entrance' | 'emphasis' | 'exit';
11469
+ //#endregion
11470
+ //#region src/render/animation-timeline-build-descriptors.d.ts
11471
+ /**
11472
+ * `animation-timeline-build-descriptors` - staged-build (`p:bldChart` /
11473
+ * `p:bldDgm`) reveal descriptor types, split out of `animation-timeline-types`
11474
+ * to keep that module under the file-size limit. Re-exported from
11475
+ * `animation-timeline-types` so existing imports are unaffected.
11476
+ *
11477
+ * @module render/animation-timeline-build-descriptors
11478
+ */
11029
11479
  /**
11030
11480
  * Normalized staged-reveal mode for a chart graphic frame, derived from the
11031
11481
  * OOXML `a:bldChart/@bld` (or `p:bldOleChart/@bld`) token:
@@ -11059,12 +11509,12 @@ interface ChartRevealPoint {
11059
11509
  * Playback-time chart reveal state derived from AUTHORED `p:graphicEl`
11060
11510
  * indices (see `chart-reveal-descriptor`'s `resolveChartRevealDescriptor`),
11061
11511
  * rather than from click-count/time progress. Present on
11062
- * {@link ElementAnimationState.chartReveal} only when every fired
11063
- * chart-build step for the element carried index data; a renderer prefers
11064
- * this over the progress-based `build`/`ElementBuildState` path when present,
11065
- * since it reflects the real authored reveal set (correct even for a
11066
- * reversed-order or gapped chart build), and falls back to `build` when
11067
- * absent.
11512
+ * {@link import('./animation-timeline-group').ElementAnimationState.chartReveal}
11513
+ * only when every fired chart-build step for the element carried index data;
11514
+ * a renderer prefers this over the progress-based `build`/`ElementBuildState`
11515
+ * path when present, since it reflects the real authored reveal set (correct
11516
+ * even for a reversed-order or gapped chart build), and falls back to `build`
11517
+ * when absent.
11068
11518
  */
11069
11519
  interface ChartRevealDescriptor {
11070
11520
  /**
@@ -11085,12 +11535,13 @@ interface ChartRevealDescriptor {
11085
11535
  * Playback-time SmartArt diagram reveal state derived from AUTHORED
11086
11536
  * `p:graphicEl/p:dgm/@id` indices (see `diagram-reveal-descriptor`'s
11087
11537
  * `resolveDiagramRevealDescriptor`), rather than from click-count/time
11088
- * progress. Present on {@link ElementAnimationState.diagramReveal} only when
11089
- * every fired diagram-build step for the element carried `p:graphicEl` data.
11090
- * A SmartArt renderer prefers this over the progress-based `build` /
11091
- * {@link ElementBuildState} path when present, since it reflects the real
11092
- * authored reveal set (correct even for a reversed-order or by-branch build),
11093
- * and falls back to `build` when absent.
11538
+ * progress. Present on
11539
+ * {@link import('./animation-timeline-group').ElementAnimationState.diagramReveal}
11540
+ * only when every fired diagram-build step for the element carried
11541
+ * `p:graphicEl` data. A SmartArt renderer prefers this over the
11542
+ * progress-based `build` / {@link ElementBuildState} path when present, since
11543
+ * it reflects the real authored reveal set (correct even for a
11544
+ * reversed-order or by-branch build), and falls back to `build` when absent.
11094
11545
  */
11095
11546
  interface DiagramRevealDescriptor {
11096
11547
  /**
@@ -11103,9 +11554,11 @@ interface DiagramRevealDescriptor {
11103
11554
  nodeIds: ReadonlySet<string>;
11104
11555
  }
11105
11556
  /**
11106
- * Playback-time staged-build state surfaced on {@link ElementAnimationState}.
11107
- * `progress` is the 0..1 fraction of the build revealed at the current playback
11108
- * time; a consumer maps it to its own item COUNT (see `revealedStageCount`).
11557
+ * Playback-time staged-build state surfaced on
11558
+ * {@link import('./animation-timeline-group').ElementAnimationState}.
11559
+ * `progress` is the 0..1 fraction of the build revealed at the current
11560
+ * playback time; a consumer maps it to its own item COUNT (see
11561
+ * `revealedStageCount`).
11109
11562
  */
11110
11563
  type ElementBuildState = {
11111
11564
  kind: 'chart';
@@ -11166,6 +11619,18 @@ interface ElementAnimationState {
11166
11619
  * `stroke: inherit`. Absent/false means no active stroke-colour animation.
11167
11620
  */
11168
11621
  animatesStroke?: boolean;
11622
+ /**
11623
+ * Active discrete font-style / colour / size override (see
11624
+ * {@link import('./animation-timeline-step').TimelineStep.textStyle}) a
11625
+ * font-style emphasis effect currently applies to this element's text,
11626
+ * OVERRIDING the runs' own inline bold/italic/underline/size/colour.
11627
+ * `animation-playback-engine.ts` writes this on step start and again on
11628
+ * cleanup (held in full when the effect's `p:cTn/@fill` holds its end
11629
+ * state, otherwise reverted); a text renderer maps it onto its run markup
11630
+ * via `buildTextStyleOverrideCss` (`animation-text-style-css.ts`). Absent
11631
+ * means no font-style emphasis effect is currently active on this element.
11632
+ */
11633
+ textStyle?: TextStyleAnimationDescriptor;
11169
11634
  }
11170
11635
  //#endregion
11171
11636
  //#region src/render/element-align.d.ts
@@ -11526,6 +11991,17 @@ interface InkPoint {
11526
11991
  * data".
11527
11992
  */
11528
11993
  pressure?: number;
11994
+ /**
11995
+ * Pen-tilt lean, in degrees, from `PointerEvent.tiltX`/`tiltY` on
11996
+ * supporting hardware (a mouse, or a stylus with no tilt sensor, reports a
11997
+ * constant 0). Optional and always captured as a pair: a binding that has
11998
+ * not wired tilt capture simply omits both, and {@link strokeToInkElement}
11999
+ * treats a constant `(0, 0)` reading the same way it treats a constant
12000
+ * pressure, i.e. as "no real tilt data" rather than authoring a channel
12001
+ * for it.
12002
+ */
12003
+ tiltX?: number;
12004
+ tiltY?: number;
11529
12005
  }
11530
12006
  /** Options for {@link strokeToInkElement}. */
11531
12007
  interface StrokeToInkElementOpts {
@@ -11725,7 +12201,25 @@ interface ReadOnlyRecommendation {
11725
12201
  readonly messageKey: string;
11726
12202
  /** Whether a binding's "read-only" toggle should default to on. */
11727
12203
  readonly defaultReadOnly: boolean;
12204
+ /**
12205
+ * Whether lifting this recommendation requires a correct password, rather
12206
+ * than a plain "Edit anyway". True only for a `modifyVerifier` that carries
12207
+ * a hash this viewer can actually check (`hashData` + `saltData` +
12208
+ * `algorithmName`, see `checkModifyPassword`). "Mark as Final" is purely
12209
+ * advisory and never requires one, and a `modifyVerifier` missing pieces of
12210
+ * its hash cannot be verified either way, so both fall back to the plain
12211
+ * "Edit anyway" a binding already had.
12212
+ */
12213
+ readonly requiresPassword: boolean;
11728
12214
  }
12215
+ //#endregion
12216
+ //#region src/render/modify-password-check.d.ts
12217
+ type ModifyPasswordCheckResult = {
12218
+ readonly ok: true;
12219
+ } | {
12220
+ readonly ok: false;
12221
+ readonly reason: 'wrong-password' | 'unsupported-algorithm';
12222
+ };
11729
12223
  interface CompatibilityWarningToast {
11730
12224
  /** Stable per-code id, since toasts are deduped by code (see module docs). */
11731
12225
  readonly id: string;
@@ -12127,6 +12621,10 @@ declare function renderSlideStage(options: SlideStageOptions): HTMLElement;
12127
12621
  declare function createDefaultRegistry(): ElementRendererRegistry;
12128
12622
  //#endregion
12129
12623
  //#region src/viewer/state/viewer-state.d.ts
12624
+ /** Why the last password attempt failed; see `checkModifyPassword` (`pptx-viewer-shared`). */
12625
+ type ModifyPasswordErrorReason$1 = Extract<ModifyPasswordCheckResult, {
12626
+ ok: false;
12627
+ }>['reason'];
12130
12628
  /** `zoom` is either an explicit scale factor (1 = 100%) or fit-to-viewport. */
12131
12629
  type ZoomLevel = number | 'fit';
12132
12630
  /**
@@ -12251,6 +12749,14 @@ interface ViewerState {
12251
12749
  tagCollections: PptxTagCollection[];
12252
12750
  /** Parsed presentation table styles keyed by style id. */
12253
12751
  tableStyleMap?: ParsedTableStyleMap;
12752
+ /** `ppt/tableStyles.xml`'s `<a:tblStyleLst @def>` default style GUID. */
12753
+ tableStylesDefaultId?: string;
12754
+ /**
12755
+ * Style GUIDs deleted from `tableStyleMap` via the table style editor,
12756
+ * pending removal from `ppt/tableStyles.xml` on the next save. See
12757
+ * `tableStyleSaveOptions` / `applyTableStyleDelete` in `pptx-viewer-shared`.
12758
+ */
12759
+ tableStylesToDelete: string[];
12254
12760
  /** Zero-based index of the visible slide. */
12255
12761
  currentSlide: number;
12256
12762
  /** Requested zoom (explicit factor or fit-to-viewport). */
@@ -12366,6 +12872,22 @@ interface ViewerState {
12366
12872
  * keeps the lock, only "Edit anyway" lifts it too.
12367
12873
  */
12368
12874
  readOnlyBannerDismissed: boolean;
12875
+ /**
12876
+ * The loaded deck's raw `p:modifyVerifier`, kept alongside
12877
+ * {@link readOnlyRecommendation} so `submitReadOnlyPassword` can check a
12878
+ * candidate password against it (`checkModifyPassword`, `pptx-viewer-shared`).
12879
+ */
12880
+ modifyVerifier?: PptxModifyVerifier;
12881
+ /**
12882
+ * Whether the read-only recommendation banner's inline password prompt is
12883
+ * open (replaces "Edit anyway"/"Dismiss" while true). Only reachable when
12884
+ * `readOnlyRecommendation.requiresPassword` is set.
12885
+ */
12886
+ readOnlyPasswordPromptOpen: boolean;
12887
+ /** Reason the last password attempt failed, or null before any attempt / after success. */
12888
+ readOnlyPasswordError: ModifyPasswordErrorReason$1 | null;
12889
+ /** True while a submitted password is being checked; disables the form. */
12890
+ readOnlyCheckingPassword: boolean;
12369
12891
  /**
12370
12892
  * Compatibility-warning toasts for the current load (deck-level
12371
12893
  * `data.warnings` concatenated with every slide's own `warnings`, deduped
@@ -12554,6 +13076,10 @@ interface DeckActions {
12554
13076
  * `scaleSlidesForSizeChange`.
12555
13077
  */
12556
13078
  applySlideSizeRescale(size: SlideSizeEmu, mode: SlideSizeRescaleMode): void;
13079
+ /** Commit a full replacement style map (section edit, create, or delete already applied). */
13080
+ updateTableStyleMap(nextMap: ParsedTableStyleMap): void;
13081
+ /** Record a styleId for save-time removal from `ppt/tableStyles.xml`. */
13082
+ deleteTableStyle(styleId: string): void;
12557
13083
  }
12558
13084
  //#endregion
12559
13085
  //#region src/viewer/editor/editor-ink-actions.d.ts
@@ -12639,6 +13165,8 @@ interface InspectorActions {
12639
13165
  setElementAction(trigger: 'click' | 'hover', action: ElementAction): void;
12640
13166
  /** Set the selection's accessibility description (inspector Alt Text field). */
12641
13167
  setAltText(text: string): void;
13168
+ /** Set the selection's accessibility title (inspector Title field). */
13169
+ setTitle(text: string): void;
12642
13170
  /** Set the selected OLE element's Object Name (`p:oleObj/@name`). */
12643
13171
  setOleName(name: string): void;
12644
13172
  setChartData(data: PptxChartData): void;
@@ -12958,6 +13486,16 @@ interface InspectorState {
12958
13486
  actionHover?: ElementAction;
12959
13487
  /** The selected element's alt text (accessibility description), if any. */
12960
13488
  altText: string;
13489
+ /** The selected element's accessibility title (`p:cNvPr/@title`), if any. */
13490
+ title: string;
13491
+ /**
13492
+ * Whether the Accessibility section's own alt-text/title editor should
13493
+ * show for the current selection: true for a plain shape, text box,
13494
+ * connector, and every graphic-frame kind (table/chart/smartArt/media/ole).
13495
+ * A picture's alt text has its own field in the Image section instead.
13496
+ * See shared's `shouldShowAccessibilitySection`.
13497
+ */
13498
+ showAccessibilitySection: boolean;
12961
13499
  chartData?: PptxChartData;
12962
13500
  /**
12963
13501
  * The on-canvas chart part selection, scoped to the selected chart element:
@@ -13446,6 +13984,10 @@ interface PresentationTouchControls {
13446
13984
  update(current: number, total: number): void;
13447
13985
  }
13448
13986
  //#endregion
13987
+ //#region src/viewer/ui/read-only-banner.d.ts
13988
+ /** Why the last password attempt failed; see `checkModifyPassword` (`pptx-viewer-shared`). */
13989
+ type ModifyPasswordErrorReason = 'wrong-password' | 'unsupported-algorithm';
13990
+ //#endregion
13449
13991
  //#region src/viewer/ui/ribbon/tabs/view-tab.d.ts
13450
13992
  /** The View > Show toggles, as the viewer state currently holds them. */
13451
13993
  interface ViewToggleState {
@@ -13631,7 +14173,11 @@ interface ViewerChrome {
13631
14173
  /** Show/hide the Protected View "Enable Editing" banner. */
13632
14174
  setProtectedView(active: boolean): void;
13633
14175
  /** Show/hide + populate the read-only recommendation banner. */
13634
- setReadOnlyRecommendation(recommendation: ReadOnlyRecommendation | null, dismissed: boolean): void;
14176
+ setReadOnlyRecommendation(recommendation: ReadOnlyRecommendation | null, dismissed: boolean, passwordState: {
14177
+ promptOpen: boolean;
14178
+ error: ModifyPasswordErrorReason | null;
14179
+ checking: boolean;
14180
+ }): void;
13635
14181
  /** Replace the compatibility-warning toast stack. */
13636
14182
  setCompatToasts(toasts: readonly CompatibilityWarningToast[]): void;
13637
14183
  }
@@ -13726,6 +14272,18 @@ interface SyncStageParams {
13726
14272
  * already complete.
13727
14273
  */
13728
14274
  seedCompleted?: boolean;
14275
+ /**
14276
+ * The slide canvas size (px), in the same unit the elements' own
14277
+ * `x`/`y`/`width`/`height` are authored in. Lets `PresentationAnimationController
14278
+ * .fromSlide` resolve a `p:anim` formula that needs the animated shape's real
14279
+ * box (e.g. Grow And Turn's `-#ppt_w/2` fly-in) instead of falling back.
14280
+ */
14281
+ canvasSize?: {
14282
+ width: number;
14283
+ height: number;
14284
+ };
14285
+ /** The deck's resolved theme colour map, for a scheme-colour (`a:schemeClr`) animation stop. */
14286
+ themeColorMap?: Readonly<Record<string, string>>;
13729
14287
  }
13730
14288
  /**
13731
14289
  * The presentation-mode playback state machine for the vanilla binding, driven
@@ -14675,6 +15233,10 @@ interface ChromeHost {
14675
15233
  editAnywayFromReadOnlyRecommendation(): void;
14676
15234
  /** The read-only recommendation banner's plain close button. */
14677
15235
  dismissReadOnlyBanner(): void;
15236
+ /** The read-only recommendation banner's password form submit. */
15237
+ submitReadOnlyPassword(password: string): void;
15238
+ /** The read-only recommendation banner's password form "Cancel". */
15239
+ cancelReadOnlyPasswordPrompt(): void;
14678
15240
  /** One compatibility toast's own dismiss button. */
14679
15241
  dismissCompatToast(id: string): void;
14680
15242
  /** The compatibility toast stack's "Dismiss all" button. */
@@ -14752,6 +15314,13 @@ interface ChromeHost {
14752
15314
  * Documents" (0-50), read fresh whenever the Recent list loads.
14753
15315
  */
14754
15316
  getRecentPresentationsCount(): number;
15317
+ /**
15318
+ * The deck's parsed `ppt/tableStyles.xml` map, for the table properties
15319
+ * panel's "Edit style...".
15320
+ */
15321
+ getTableStyleMap(): ParsedTableStyleMap | undefined;
15322
+ /** The current theme colour map (scheme key -> hex), for resolving scheme-based table style colours. */
15323
+ getThemeColorMap(): Record<string, string> | undefined;
14755
15324
  toggleTemplateEditing(): void;
14756
15325
  toggleMasterNavigation(): void;
14757
15326
  selectElements(ids: string[]): void;
@@ -15082,10 +15651,25 @@ declare class PptxViewer extends ViewerExportHost implements PptxViewerInstance,
15082
15651
  * The read-only recommendation banner's "Edit anyway" button
15083
15652
  * (`p:modifyVerifier` / "Mark as Final"): lifts the lock and hides the
15084
15653
  * banner, unlike plain dismiss which only hides it.
15654
+ *
15655
+ * When the recommendation's `requiresPassword` is set (a `modifyVerifier`
15656
+ * with a hash this viewer can check), this opens the inline password
15657
+ * prompt instead of unlocking immediately: PowerPoint's own "read-only
15658
+ * recommended" prompt keeps the deck locked until the correct password is
15659
+ * entered, and a wrong one leaves it locked.
15085
15660
  */
15086
15661
  editAnywayFromReadOnlyRecommendation(): void;
15087
15662
  /** The read-only recommendation banner's plain close button: hides the banner, keeps the lock. */
15088
15663
  dismissReadOnlyBanner(): void;
15664
+ /** The read-only recommendation banner's password form "Cancel": closes the prompt without unlocking. */
15665
+ cancelReadOnlyPasswordPrompt(): void;
15666
+ /**
15667
+ * Check `password` against the deck's `modifyVerifier`
15668
+ * (`checkModifyPassword`, `pptx-viewer-shared`); unlocks and closes the
15669
+ * prompt on a match, otherwise leaves the deck locked and reports why.
15670
+ */
15671
+ submitReadOnlyPassword(password: string): void;
15672
+ private checkReadOnlyPassword;
15089
15673
  /** One compatibility toast's own dismiss button. */
15090
15674
  dismissCompatToast(id: string): void;
15091
15675
  /** The compatibility toast stack's "Dismiss all" button. */
@@ -15140,6 +15724,13 @@ declare class PptxViewer extends ViewerExportHost implements PptxViewerInstance,
15140
15724
  * (same pre-construction timing note as `getQuickAccessOptions`).
15141
15725
  */
15142
15726
  getChartFollowDataPoint(): boolean;
15727
+ /**
15728
+ * The deck's parsed `ppt/tableStyles.xml` map, for the table properties
15729
+ * panel's "Edit style...".
15730
+ */
15731
+ getTableStyleMap(): ParsedTableStyleMap | undefined;
15732
+ /** The current theme colour map (scheme key -> hex), for resolving scheme-based table style colours. */
15733
+ getThemeColorMap(): Record<string, string> | undefined;
15143
15734
  /**
15144
15735
  * File > Options > Advanced > "Quickly access this number of Recent
15145
15736
  * Documents" (0-50). Defaults to the schema default before the options