pptx-vanilla-viewer 0.7.0 → 0.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
@@ -1,7 +1,7 @@
1
1
  import "fast-xml-parser";
2
2
  import "jszip";
3
3
  import "html2canvas-pro";
4
- //#region ../core/dist/presentation-BfnrtJV1.d.ts
4
+ //#region ../core/dist/presentation-BLbjWKxK.d.ts
5
5
  /**
6
6
  * Action types: hyperlinks, slide jumps, macros, and action buttons.
7
7
  *
@@ -43,6 +43,48 @@ interface PptxAction {
43
43
  /** Resolved media target path for the optional click sound. */
44
44
  soundPath?: string;
45
45
  }
46
+ /**
47
+ * High-level action type for the action settings UI.
48
+ * Maps to OOXML `ppaction://` verbs + external URLs.
49
+ *
50
+ * @example
51
+ * ```ts
52
+ * const type: ElementActionType = "slide";
53
+ * // => "slide" — one of: "none" | "url" | "slide" | "firstSlide" | "lastSlide" | "prevSlide" | "nextSlide" | "endShow"
54
+ * ```
55
+ */
56
+ type ElementActionType = 'none' | 'url' | 'slide' | 'firstSlide' | 'lastSlide' | 'prevSlide' | 'nextSlide' | 'endShow';
57
+ /**
58
+ * User-facing action configuration stored on an element.
59
+ * This is a convenience wrapper around the lower-level `PptxAction` that maps
60
+ * to/from OOXML hyperlink/action attributes.
61
+ *
62
+ * @example
63
+ * ```ts
64
+ * const action: ElementAction = {
65
+ * trigger: "click",
66
+ * type: "url",
67
+ * url: "https://example.com",
68
+ * };
69
+ *
70
+ * const jumpToSlide: ElementAction = {
71
+ * trigger: "click",
72
+ * type: "slide",
73
+ * slideIndex: 5,
74
+ * };
75
+ * // => satisfies ElementAction
76
+ * ```
77
+ */
78
+ interface ElementAction {
79
+ /** When the action fires. */
80
+ trigger: 'click' | 'hover';
81
+ /** What kind of action to perform. */
82
+ type: ElementActionType;
83
+ /** External URL (for 'url' type). */
84
+ url?: string;
85
+ /** Zero-based slide index (for 'slide' type). */
86
+ slideIndex?: number;
87
+ }
46
88
  /**
47
89
  * Shared value types used across the entire PPTX editor type system.
48
90
  *
@@ -357,6 +399,8 @@ interface CustomGeometryPath {
357
399
  * and the text rectangle are not lost when a custGeom is edited and saved.
358
400
  */
359
401
  interface CustomGeometryRawData {
402
+ /** Raw `a:avLst` XML content (adjustment value list). */
403
+ avLstXml?: unknown;
360
404
  /** Raw `a:gdLst` XML content (guide list). */
361
405
  gdLstXml?: unknown;
362
406
  /** Raw `a:ahLst` XML content (adjustment handles). */
@@ -497,7 +541,7 @@ interface PptxCustomPathProperties {
497
541
  pathHeight?: number;
498
542
  /** Structured custom geometry paths for editing (maps to a:custGeom/a:pathLst). */
499
543
  customGeometryPaths?: CustomGeometryPath[];
500
- /** Raw a:gdLst/a:ahLst/a:cxnLst/a:rect XML preserved for round-trip serialization. */
544
+ /** Raw adjustment/guide/handle/connection/text-rectangle XML preserved for serialization. */
501
545
  customGeometryRawData?: CustomGeometryRawData;
502
546
  /**
503
547
  * Typed XY adjustment handles parsed from `a:custGeom/a:ahLst/a:ahXY`.
@@ -596,6 +640,10 @@ interface Text3DStyle {
596
640
  interface Pptx3DScene {
597
641
  /** Camera preset type, e.g. "orthographicFront", "perspectiveFront". */
598
642
  cameraPreset?: string;
643
+ /** Camera field of view in 1/60000 degrees (`a:camera/@fov`). */
644
+ cameraFieldOfView?: number;
645
+ /** Camera zoom as an OOXML percentage fraction (`a:camera/@zoom`, 1 = 100%). */
646
+ cameraZoom?: number;
599
647
  /** Camera rotation around X axis in 1/60000 degrees. */
600
648
  cameraRotX?: number;
601
649
  /** Camera rotation around Y axis in 1/60000 degrees. */
@@ -606,6 +654,12 @@ interface Pptx3DScene {
606
654
  lightRigType?: string;
607
655
  /** Light rig direction, e.g. "t", "b", "l", "r", "tl". */
608
656
  lightRigDirection?: string;
657
+ /** Light-rig rotation latitude in 1/60000 degrees. */
658
+ lightRigRotX?: number;
659
+ /** Light-rig rotation longitude in 1/60000 degrees. */
660
+ lightRigRotY?: number;
661
+ /** Light-rig rotation revolution in 1/60000 degrees. */
662
+ lightRigRotZ?: number;
609
663
  /** Whether a 3D backdrop plane is present (`a:backdrop`). */
610
664
  hasBackdrop?: boolean;
611
665
  /** Backdrop plane anchor X in EMU. */
@@ -614,6 +668,18 @@ interface Pptx3DScene {
614
668
  backdropAnchorY?: number;
615
669
  /** Backdrop plane anchor Z in EMU. */
616
670
  backdropAnchorZ?: number;
671
+ /** Backdrop normal vector X component. */
672
+ backdropNormalX?: number;
673
+ /** Backdrop normal vector Y component. */
674
+ backdropNormalY?: number;
675
+ /** Backdrop normal vector Z component. */
676
+ backdropNormalZ?: number;
677
+ /** Backdrop up vector X component. */
678
+ backdropUpX?: number;
679
+ /** Backdrop up vector Y component. */
680
+ backdropUpY?: number;
681
+ /** Backdrop up vector Z component. */
682
+ backdropUpZ?: number;
617
683
  }
618
684
  /**
619
685
  * 3D shape extrusion/bevel from `a:sp3d`.
@@ -683,6 +749,12 @@ type PptxTextWarpPreset = 'textNoShape' | 'textPlain' | 'textStop' | 'textTriang
683
749
  *
684
750
  * @module pptx-types/shape-style
685
751
  */
752
+ interface PptxCustomDashSegment {
753
+ /** Dash length as a non-negative percentage in thousandths of one percent. */
754
+ dash: number;
755
+ /** Space length as a non-negative percentage in thousandths of one percent. */
756
+ space: number;
757
+ }
686
758
  /**
687
759
  * Comprehensive visual style for a shape, connector, or image element.
688
760
  *
@@ -731,9 +803,13 @@ interface ShapeStyle {
731
803
  */
732
804
  fillColorXml?: XmlObject;
733
805
  fillGradient?: string;
806
+ /** Original `gradFill` XML retained for unknown-child and extension round-tripping. */
807
+ fillGradientXml?: XmlObject;
734
808
  fillMode?: 'solid' | 'gradient' | 'pattern' | 'none' | 'image' | 'theme' | 'group';
735
809
  fillPatternPreset?: string;
736
810
  fillPatternBackgroundColor?: string;
811
+ /** Original `pattFill` XML retained for unknown-child round-tripping. */
812
+ fillPatternXml?: XmlObject;
737
813
  /** Raw XML node for pattern fill foreground colour (preserves color transforms). */
738
814
  fillPatternFgClrXml?: XmlObject;
739
815
  /** Raw XML node for pattern fill background colour (preserves color transforms). */
@@ -799,6 +875,14 @@ interface ShapeStyle {
799
875
  /** Pen line alignment (`a:ln/@algn`): `ctr` (centre, default) or `in` (inside). */
800
876
  lineAlignment?: 'ctr' | 'in';
801
877
  shadowColor?: string;
878
+ /** Preserved source `a:effectLst`, including unknown effects and extensions. */
879
+ effectListXml?: XmlObject;
880
+ /** Original outer-shadow node used for lossless surgical updates. */
881
+ outerShadowXml?: XmlObject;
882
+ /** Resolved source shadow colour used to detect colour edits. */
883
+ outerShadowOriginalColor?: string;
884
+ /** Source shadow opacity used to detect alpha edits. */
885
+ outerShadowOriginalOpacity?: number;
802
886
  shadowBlur?: number;
803
887
  shadowOffsetX?: number;
804
888
  shadowOffsetY?: number;
@@ -842,11 +926,23 @@ interface ShapeStyle {
842
926
  /** Multiple shadow layers (for advanced effects). */
843
927
  shadows?: ShadowEffect[];
844
928
  glowColor?: string;
929
+ /** Original glow node used for lossless surgical updates. */
930
+ glowXml?: XmlObject;
931
+ /** Resolved source glow colour used to detect colour edits. */
932
+ glowOriginalColor?: string;
933
+ /** Source glow opacity used to detect alpha edits. */
934
+ glowOriginalOpacity?: number;
845
935
  glowRadius?: number;
846
936
  glowOpacity?: number;
847
937
  softEdgeRadius?: number;
848
938
  /** Inner shadow colour (`a:innerShdw`). */
849
939
  innerShadowColor?: string;
940
+ /** Original inner-shadow node used for lossless surgical updates. */
941
+ innerShadowXml?: XmlObject;
942
+ /** Resolved source inner-shadow colour used to detect colour edits. */
943
+ innerShadowOriginalColor?: string;
944
+ /** Source inner-shadow opacity used to detect alpha edits. */
945
+ innerShadowOriginalOpacity?: number;
850
946
  /** Inner shadow opacity (0-1). */
851
947
  innerShadowOpacity?: number;
852
948
  /** Inner shadow blur radius in px. */
@@ -855,8 +951,12 @@ interface ShapeStyle {
855
951
  innerShadowOffsetX?: number;
856
952
  /** Inner shadow vertical offset in px. */
857
953
  innerShadowOffsetY?: number;
954
+ /** Original soft-edge node, including vendor attributes and extensions. */
955
+ softEdgeXml?: XmlObject;
858
956
  /** Reflection effect — distance from shape bottom in px. */
859
957
  reflectionBlurRadius?: number;
958
+ /** Original reflection node, including vendor attributes and extensions. */
959
+ reflectionXml?: XmlObject;
860
960
  /** Reflection start opacity (0-1). */
861
961
  reflectionStartOpacity?: number;
862
962
  /** Reflection end opacity (0-1). */
@@ -887,11 +987,12 @@ interface ShapeStyle {
887
987
  connectorStartConnection?: ConnectorConnectionPoint;
888
988
  /** Connection point for the end of a connector. */
889
989
  connectorEndConnection?: ConnectorConnectionPoint;
890
- /** Custom dash segments array (`a:custDash/a:ds`). Each entry has dash length and space length in EMU. */
891
- customDashSegments?: Array<{
892
- dash: number;
893
- space: number;
894
- }>;
990
+ /** Custom dash pattern, measured relative to line width in thousandths of one percent. */
991
+ customDashSegments?: PptxCustomDashSegment[];
992
+ /** Original `a:ds` payloads retained by index for lossless edits. */
993
+ customDashSegmentXml?: XmlObject[];
994
+ /** Original `a:custDash` payload retained for lossless edits. */
995
+ customDashXml?: XmlObject;
895
996
  /** 3D scene/camera settings from `a:scene3d`. */
896
997
  scene3d?: Pptx3DScene;
897
998
  /** 3D shape extrusion/bevel from `a:sp3d`. */
@@ -1001,6 +1102,8 @@ interface ShapeStyle {
1001
1102
  * ```
1002
1103
  */
1003
1104
  interface TextStyle {
1105
+ /** Original `a:rPr` XML retained by projections that share the shape-text model. */
1106
+ runPropertiesXml?: XmlObject;
1004
1107
  fontFamily?: string;
1005
1108
  fontSize?: number;
1006
1109
  /** When true, renderer should shrink text to fit the shape bounds. */
@@ -1350,6 +1453,8 @@ interface TextStyle {
1350
1453
  text3d?: Text3DStyle;
1351
1454
  /** 3D scene (camera + light rig) settings on the text body (`a:bodyPr/a:scene3d`). */
1352
1455
  textBodyScene3d?: Pptx3DScene;
1456
+ /** Raw `a:scene3d` subtree used to preserve extensions and unmodelled children. */
1457
+ textBodyScene3dXml?: XmlObject;
1353
1458
  /**
1354
1459
  * Raw `<a:extLst>` subtree captured from `<a:bodyPr>`. Preserved verbatim so
1355
1460
  * authored extensions (e.g. content placeholders, custom application data)
@@ -1723,6 +1828,114 @@ interface PlaceholderTextLevelStyle {
1723
1828
  spaceBefore?: number;
1724
1829
  spaceAfter?: number;
1725
1830
  }
1831
+ /** Tick-mark placement from ChartML `ST_TickMark`. */
1832
+ type PptxChartTickMark = 'cross' | 'in' | 'none' | 'out';
1833
+ /** Typed axis tick and category/date label controls. */
1834
+ interface PptxChartAxisLabelFormatting {
1835
+ /** Primary and secondary tick-mark placement. */
1836
+ majorTickMark?: PptxChartTickMark;
1837
+ minorTickMark?: PptxChartTickMark;
1838
+ /** Tick-label position from ChartML `ST_TickLblPos`. */
1839
+ tickLblPos?: 'high' | 'low' | 'nextTo' | 'none';
1840
+ /** Automatic category/date axis behavior (`c:auto`). */
1841
+ auto?: boolean;
1842
+ /** Category-axis label alignment (`c:lblAlgn`). */
1843
+ labelAlignment?: 'ctr' | 'l' | 'r';
1844
+ /** Category/date label distance, from 0 through 1000 percent. */
1845
+ labelOffset?: number;
1846
+ /** Number of category/date labels between rendered labels. */
1847
+ tickLabelSkip?: number;
1848
+ /** Number of category/date tick positions between major tick marks. */
1849
+ tickMarkSkip?: number;
1850
+ /** Suppress multi-level category labels (`c:noMultiLvlLbl`). */
1851
+ noMultiLevelLabels?: boolean;
1852
+ }
1853
+ interface PptxChartPivotFormat {
1854
+ index: number;
1855
+ shapePropertiesXml?: XmlObject | null;
1856
+ markerXml?: XmlObject | null;
1857
+ dataLabelXml?: XmlObject | null;
1858
+ extensionListXml?: XmlObject | null;
1859
+ rawXml?: XmlObject;
1860
+ }
1861
+ /** Editable classic ChartML `c:pivotFmts` collection. */
1862
+ interface PptxChartPivotFormats {
1863
+ formats: PptxChartPivotFormat[];
1864
+ rawXml?: XmlObject;
1865
+ }
1866
+ /** Editable classic ChartML `c:pivotSource` metadata. */
1867
+ interface PptxChartPivotSource {
1868
+ /** Pivot table reference stored as `c:name` text. */
1869
+ name: string;
1870
+ /** Required unsigned format identifier stored in `c:fmtId/@val`. */
1871
+ formatId: number;
1872
+ /** Internal source subtree used to preserve extensions and foreign markup. */
1873
+ rawXml?: XmlObject;
1874
+ }
1875
+ /** Headers and footers used when a classic ChartML chart is printed. */
1876
+ interface PptxChartPrintHeaderFooter {
1877
+ oddHeader?: string;
1878
+ oddFooter?: string;
1879
+ evenHeader?: string;
1880
+ evenFooter?: string;
1881
+ firstHeader?: string;
1882
+ firstFooter?: string;
1883
+ alignWithMargins?: boolean;
1884
+ differentOddEven?: boolean;
1885
+ differentFirst?: boolean;
1886
+ /** Original subtree retained for foreign attributes and extension children. */
1887
+ rawXml?: unknown;
1888
+ }
1889
+ /** Required page margins from ChartML `c:pageMargins`, measured in inches. */
1890
+ interface PptxChartPageMargins {
1891
+ left: number;
1892
+ right: number;
1893
+ top: number;
1894
+ bottom: number;
1895
+ header: number;
1896
+ footer: number;
1897
+ /** Original leaf retained for foreign attributes. */
1898
+ rawXml?: unknown;
1899
+ }
1900
+ /** Printer page configuration from ChartML `c:pageSetup`. */
1901
+ interface PptxChartPageSetup {
1902
+ paperSize?: number;
1903
+ firstPageNumber?: number;
1904
+ orientation?: 'default' | 'portrait' | 'landscape';
1905
+ blackAndWhite?: boolean;
1906
+ draft?: boolean;
1907
+ useFirstPageNumber?: boolean;
1908
+ horizontalDpi?: number;
1909
+ verticalDpi?: number;
1910
+ copies?: number;
1911
+ /** Original leaf retained for foreign attributes. */
1912
+ rawXml?: unknown;
1913
+ }
1914
+ /** Editable `c:printSettings` content from a classic ChartML chart space. */
1915
+ interface PptxChartPrintSettings {
1916
+ headerFooter?: PptxChartPrintHeaderFooter | null;
1917
+ pageMargins?: PptxChartPageMargins | null;
1918
+ pageSetup?: PptxChartPageSetup | null;
1919
+ /** `null` removes the legacy header/footer drawing relationship element. */
1920
+ legacyDrawingHeaderFooterRelationshipId?: string | null;
1921
+ /** Original subtree retained for unknown and extension content. */
1922
+ rawXml?: unknown;
1923
+ }
1924
+ /** Editable classic ChartML `c:protection` settings. */
1925
+ interface PptxChartProtection {
1926
+ /** Prevent editing the chart object. */
1927
+ chartObject?: boolean | null;
1928
+ /** Prevent editing the chart data. */
1929
+ data?: boolean | null;
1930
+ /** Prevent editing chart formatting. */
1931
+ formatting?: boolean | null;
1932
+ /** Prevent selecting chart elements. */
1933
+ selection?: boolean | null;
1934
+ /** Prevent chart user-interface operations. */
1935
+ userInterface?: boolean | null;
1936
+ /** Internal source subtree used to preserve foreign markup during edits. */
1937
+ rawXml?: XmlObject;
1938
+ }
1726
1939
  /**
1727
1940
  * Chart types: chart categories, series data, style metadata, data tables,
1728
1941
  * trendlines, error bars, and the composite `PptxChartData`.
@@ -1765,6 +1978,7 @@ type PptxChartTrendlineType = 'linear' | 'exponential' | 'logarithmic' | 'polyno
1765
1978
  */
1766
1979
  interface PptxChartTrendline {
1767
1980
  trendlineType: PptxChartTrendlineType;
1981
+ name?: string;
1768
1982
  order?: number;
1769
1983
  period?: number;
1770
1984
  forward?: number;
@@ -1773,6 +1987,13 @@ interface PptxChartTrendline {
1773
1987
  displayRSq?: boolean;
1774
1988
  displayEq?: boolean;
1775
1989
  color?: string;
1990
+ label?: PptxChartTrendlineLabel | null;
1991
+ }
1992
+ /** Typed, commonly edited properties of `c:trendlineLbl`. */
1993
+ interface PptxChartTrendlineLabel {
1994
+ layout?: PptxChartManualLayout;
1995
+ numberFormatCode?: string;
1996
+ sourceLinked?: boolean;
1776
1997
  }
1777
1998
  /** Error-bar direction axis. */
1778
1999
  type PptxChartErrBarDir = 'x' | 'y';
@@ -1809,6 +2030,8 @@ interface PptxChartErrBars {
1809
2030
  val?: number;
1810
2031
  customPlus?: number[];
1811
2032
  customMinus?: number[];
2033
+ noEndCap?: boolean;
2034
+ color?: string;
1812
2035
  }
1813
2036
  /**
1814
2037
  * Visibility flags for the chart data table (axes + legend keys).
@@ -1858,9 +2081,17 @@ interface PptxChartShapeProps {
1858
2081
  /** Line dash style (a:prstDash/@val), e.g. 'solid', 'dash', 'dot', 'lgDash'. */
1859
2082
  strokeDashStyle?: string;
1860
2083
  }
2084
+ /** Up/down bar formatting on line and stock charts (`c:upDownBars`). */
2085
+ interface PptxChartUpDownBars {
2086
+ /** Gap between bars as a percentage, constrained to 0 through 500. */
2087
+ gapWidth?: number;
2088
+ upBars?: PptxChartShapeProps;
2089
+ downBars?: PptxChartShapeProps;
2090
+ }
1861
2091
  /** Marker appearance on a chart series or data point. */
1862
2092
  interface PptxChartMarker {
1863
2093
  symbol: PptxChartMarkerSymbol;
2094
+ /** Marker size in points, constrained by ST_MarkerSize to 2 through 72. */
1864
2095
  size?: number;
1865
2096
  spPr?: PptxChartShapeProps;
1866
2097
  }
@@ -1871,26 +2102,43 @@ interface PptxChartDataPoint {
1871
2102
  explosion?: number;
1872
2103
  invertIfNegative?: boolean;
1873
2104
  marker?: PptxChartMarker;
2105
+ /** Render a bubble-chart point with a 3-D appearance. */
2106
+ bubble3D?: boolean;
1874
2107
  }
2108
+ /** Schema values accepted by `c:dLblPos`. */
2109
+ type PptxChartDataLabelPosition = 'bestFit' | 'b' | 'ctr' | 'inBase' | 'inEnd' | 'l' | 'outEnd' | 'r' | 't';
1875
2110
  /** Individual data label override (c:dLbl). */
1876
2111
  interface PptxChartDataLabel {
1877
2112
  idx: number;
2113
+ /** Suppress this data point's automatically generated label. */
2114
+ deleted?: boolean;
1878
2115
  showVal?: boolean;
1879
2116
  showCatName?: boolean;
1880
2117
  showSerName?: boolean;
1881
2118
  showPercent?: boolean;
1882
2119
  showLegendKey?: boolean;
1883
2120
  showBubbleSize?: boolean;
1884
- position?: string;
2121
+ position?: PptxChartDataLabelPosition;
1885
2122
  text?: string;
2123
+ separator?: string;
2124
+ showLeaderLines?: boolean;
1886
2125
  }
1887
2126
  /** Axis number format. */
1888
2127
  interface PptxChartAxisNumFmt {
1889
2128
  formatCode: string;
1890
2129
  sourceLinked?: boolean;
1891
2130
  }
2131
+ /** Typed contents of a value-axis display-unit label (`c:dispUnitsLbl`). */
2132
+ interface PptxChartDisplayUnitsLabel {
2133
+ /** Literal label text. Omit to preserve the source text subtree. */
2134
+ text?: string;
2135
+ /** Manual label placement. `null` removes only the manual layout. */
2136
+ layout?: PptxChartManualLayout | null;
2137
+ /** Label shape formatting. `null` removes `c:spPr`. */
2138
+ spPr?: PptxChartShapeProps | null;
2139
+ }
1892
2140
  /** Axis formatting for category, value, or date axes. */
1893
- interface PptxChartAxisFormatting {
2141
+ interface PptxChartAxisFormatting extends PptxChartAxisLabelFormatting {
1894
2142
  axisType: 'catAx' | 'valAx' | 'dateAx' | 'serAx';
1895
2143
  /** Axis position: "b" (bottom), "l" (left), "r" (right), "t" (top). */
1896
2144
  axPos?: 'b' | 'l' | 'r' | 't';
@@ -1898,6 +2146,12 @@ interface PptxChartAxisFormatting {
1898
2146
  axisId?: number;
1899
2147
  /** Cross-axis identifier — the axis this axis crosses. */
1900
2148
  crossAxisId?: number;
2149
+ /** Automatic crossing mode (`c:crosses`). Mutually exclusive with `crossesAt`. */
2150
+ crosses?: 'autoZero' | 'min' | 'max';
2151
+ /** Explicit crossing value (`c:crossesAt`). Units depend on the axis type. */
2152
+ crossesAt?: number;
2153
+ /** Whether a value axis crosses between or at category tick marks. */
2154
+ crossBetween?: 'between' | 'midCat';
1901
2155
  numFmt?: PptxChartAxisNumFmt;
1902
2156
  titleText?: string;
1903
2157
  spPr?: PptxChartShapeProps;
@@ -1915,6 +2169,8 @@ interface PptxChartAxisFormatting {
1915
2169
  min?: number;
1916
2170
  /** Maximum axis value override (c:max/@val). */
1917
2171
  max?: number;
2172
+ /** Axis value direction (`c:scaling/c:orientation/@val`). */
2173
+ orientation?: 'minMax' | 'maxMin';
1918
2174
  /** Whether the axis is deleted/hidden (c:delete/@val). */
1919
2175
  deleted?: boolean;
1920
2176
  /**
@@ -1924,8 +2180,12 @@ interface PptxChartAxisFormatting {
1924
2180
  displayUnits?: 'hundreds' | 'thousands' | 'tenThousands' | 'hundredThousands' | 'millions' | 'tenMillions' | 'hundredMillions' | 'billions' | 'trillions' | 'custom';
1925
2181
  /** Custom display unit divisor value (c:dispUnits/c:custUnit/@val). Only used when displayUnits is 'custom'. */
1926
2182
  displayUnitsValue?: number;
1927
- /** Display units label text (c:dispUnits/c:dispUnitsLbl). Overrides the built-in default label when present. */
1928
- displayUnitsLabel?: string;
2183
+ /**
2184
+ * Display-unit label contents (`c:dispUnits/c:dispUnitsLbl`). A string is
2185
+ * retained as a compatibility shorthand for `{ text: string }`; `null`
2186
+ * explicitly removes the label.
2187
+ */
2188
+ displayUnitsLabel?: string | PptxChartDisplayUnitsLabel | null;
1929
2189
  /** Whether logarithmic scaling is enabled (presence of c:scaling/c:logBase). */
1930
2190
  logScale?: boolean;
1931
2191
  /** Logarithmic base value (c:scaling/c:logBase/@val), typically 10 or e. */
@@ -1934,14 +2194,69 @@ interface PptxChartAxisFormatting {
1934
2194
  majorUnit?: number;
1935
2195
  /** Minor-unit interval between secondary tick marks (c:minorUnit/@val). */
1936
2196
  minorUnit?: number;
1937
- /** Tick-label position (c:tickLblPos/@val): 'high', 'low', 'nextTo', or 'none'. */
1938
- tickLblPos?: 'high' | 'low' | 'nextTo' | 'none';
2197
+ /** Calendar unit used to interpret date-axis serial values. */
2198
+ baseTimeUnit?: 'days' | 'months' | 'years';
2199
+ majorTimeUnit?: 'days' | 'months' | 'years';
2200
+ minorTimeUnit?: 'days' | 'months' | 'years';
1939
2201
  }
1940
2202
  /** 3D wall or floor element formatting. */
1941
2203
  interface PptxChart3DSurface {
1942
2204
  thickness?: number;
1943
2205
  spPr?: PptxChartShapeProps;
1944
2206
  }
2207
+ /** Office 2016 ChartEx box-and-whisker series layout options. */
2208
+ interface PptxChartBoxWhiskerOptions {
2209
+ quartileMethod?: 'inclusive' | 'exclusive';
2210
+ showMeanLine?: boolean;
2211
+ showMeanMarker?: boolean;
2212
+ /** Show non-outlier (inner) data points. */
2213
+ showInnerPoints?: boolean;
2214
+ showOutlierPoints?: boolean;
2215
+ }
2216
+ /** Office 2016 ChartEx histogram and Pareto series layout options. */
2217
+ interface PptxChartHistogramOptions {
2218
+ /** Maps to `clusteredColumn` for histogram columns or `paretoLine`. */
2219
+ layout?: 'histogram' | 'pareto';
2220
+ /** Exactly one of binSize and binCount is emitted by the ChartEx writer. */
2221
+ binSize?: number;
2222
+ binCount?: number;
2223
+ intervalClosed?: 'l' | 'r';
2224
+ underflow?: number | 'auto';
2225
+ overflow?: number | 'auto';
2226
+ }
2227
+ /** Office 2016 ChartEx waterfall series layout options. */
2228
+ interface PptxChartWaterfallOptions {
2229
+ /** Zero-based data point indexes rendered as absolute subtotal or total bars. */
2230
+ subtotalIndices?: number[];
2231
+ /** Whether connector lines are visible between adjacent bars. */
2232
+ connectorLines?: boolean;
2233
+ }
2234
+ /** Office 2016 ChartEx geographic series dimensions and layout options. */
2235
+ interface PptxChartRegionMapOptions {
2236
+ /** Optional provider entity identifiers aligned with categories and values. */
2237
+ entityIds?: string[];
2238
+ /** Original `cx:pt/@idx` values for category points. */
2239
+ categorySourceIndices?: number[];
2240
+ /** Original `cx:pt/@idx` values for colour-value points. */
2241
+ valueSourceIndices?: number[];
2242
+ /** Original `cx:pt/@idx` values for entity-ID points. */
2243
+ entityIdSourceIndices?: number[];
2244
+ regionLabelLayout?: 'none' | 'bestFitOnly' | 'showAll';
2245
+ projectionType?: 'mercator' | 'miller' | 'robinson' | 'albers';
2246
+ viewedRegionType?: 'dataOnly' | 'postalCode' | 'county' | 'state' | 'countryRegion' | 'countryRegionList' | 'world';
2247
+ cultureLanguage?: string;
2248
+ /** ISO-3166-1 alpha-2 region code. */
2249
+ cultureRegion?: string;
2250
+ attribution?: string;
2251
+ /** Opaque authored provider cache under `cx:geography/cx:geoCache`. */
2252
+ geographyCache?: XmlObject;
2253
+ }
2254
+ /** Layout for parent category labels in a hierarchical ChartEx treemap. */
2255
+ type PptxChartParentLabelLayout = 'none' | 'banner' | 'overlapping';
2256
+ /** Per-series layout options for an Office 2016+ ChartEx treemap. */
2257
+ interface PptxChartTreemapOptions {
2258
+ parentLabelLayout?: PptxChartParentLabelLayout;
2259
+ }
1945
2260
  /**
1946
2261
  * A single data series within a chart.
1947
2262
  *
@@ -1977,6 +2292,11 @@ interface PptxChartSeries {
1977
2292
  * series.
1978
2293
  */
1979
2294
  seriesChartType?: PptxChartType;
2295
+ boxWhiskerOptions?: PptxChartBoxWhiskerOptions;
2296
+ histogramOptions?: PptxChartHistogramOptions;
2297
+ waterfallOptions?: PptxChartWaterfallOptions;
2298
+ regionMapOptions?: PptxChartRegionMapOptions;
2299
+ treemapOptions?: PptxChartTreemapOptions;
1980
2300
  }
1981
2301
  /**
1982
2302
  * Chart-level data-label options (`c:dLbls` directly under a chart-type
@@ -1994,12 +2314,32 @@ interface PptxChartDataLabelOptions {
1994
2314
  showPercent?: boolean;
1995
2315
  /** Show the legend key swatch (`c:showLegendKey`). */
1996
2316
  showLegendKey?: boolean;
2317
+ /** Show bubble size (`c:showBubbleSize`). */
2318
+ showBubbleSize?: boolean;
2319
+ /** Text placed between combined label components (`c:separator`). */
2320
+ separator?: string;
2321
+ /** Show leader lines where supported (`c:showLeaderLines`). */
2322
+ showLeaderLines?: boolean;
1997
2323
  /**
1998
2324
  * Label position (`c:dLblPos`). Valid values depend on the chart type
1999
2325
  * (`ctr`, `inEnd`, `inBase`, `outEnd`, `bestFit`, `l`, `r`, `t`, `b`).
2000
2326
  * Omit to let PowerPoint use the type default.
2001
2327
  */
2002
- position?: 'ctr' | 'inEnd' | 'inBase' | 'outEnd' | 'bestFit' | 'l' | 'r' | 't' | 'b';
2328
+ position?: PptxChartDataLabelPosition;
2329
+ }
2330
+ /** Typed text defaults for a single chart legend entry. */
2331
+ interface PptxChartLegendTextStyle {
2332
+ fontFamily?: string;
2333
+ fontSize?: number;
2334
+ bold?: boolean;
2335
+ italic?: boolean;
2336
+ color?: string;
2337
+ }
2338
+ /** Per-series legend entry override (`c:legendEntry`). */
2339
+ interface PptxChartLegendEntry {
2340
+ index: number;
2341
+ deleted?: boolean;
2342
+ textStyle?: PptxChartLegendTextStyle;
2003
2343
  }
2004
2344
  /**
2005
2345
  * Style / formatting metadata for a chart.
@@ -2022,6 +2362,8 @@ interface PptxChartStyle {
2022
2362
  hasLegend?: boolean;
2023
2363
  /** Legend position (t, b, l, r, tr). */
2024
2364
  legendPosition?: string;
2365
+ /** Per-series visibility and text-style overrides. */
2366
+ legendEntries?: PptxChartLegendEntry[];
2025
2367
  /** Whether the chart has a title. */
2026
2368
  hasTitle?: boolean;
2027
2369
  /** Whether gridlines are visible. */
@@ -2082,6 +2424,14 @@ interface PptxChartOfPieOptions {
2082
2424
  serLines?: boolean;
2083
2425
  gapWidth?: number;
2084
2426
  }
2427
+ /** Classic `c:bubbleChart` options from CT_BubbleChart. */
2428
+ interface PptxBubbleChartOptions {
2429
+ bubble3D?: boolean;
2430
+ /** Bubble diameter scale in percent, constrained to 0 through 300. */
2431
+ bubbleScale?: number;
2432
+ showNegativeBubbles?: boolean;
2433
+ sizeRepresents?: 'area' | 'w';
2434
+ }
2085
2435
  /**
2086
2436
  * 3D viewing parameters for a chart (`c:view3D`, ECMA-376 §21.2.2.228 /
2087
2437
  * CT_View3D).
@@ -2122,6 +2472,27 @@ interface PptxChartChrome {
2122
2472
  dispBlanksAs?: 'gap' | 'zero' | 'span';
2123
2473
  showDLblsOverMax?: boolean;
2124
2474
  }
2475
+ /** Manual chart placement from `c:layout/c:manualLayout` (CT_ManualLayout). */
2476
+ interface PptxChartManualLayout {
2477
+ layoutTarget?: 'inner' | 'outer';
2478
+ xMode?: 'edge' | 'factor';
2479
+ yMode?: 'edge' | 'factor';
2480
+ widthMode?: 'edge' | 'factor';
2481
+ heightMode?: 'edge' | 'factor';
2482
+ x?: number;
2483
+ y?: number;
2484
+ width?: number;
2485
+ height?: number;
2486
+ }
2487
+ /**
2488
+ * Typed manual layouts for chart regions that accept `c:layout`.
2489
+ * A `null` region removes its manual layout without removing extensions.
2490
+ */
2491
+ interface PptxChartLayouts {
2492
+ title?: PptxChartManualLayout | null;
2493
+ plotArea?: PptxChartManualLayout | null;
2494
+ legend?: PptxChartManualLayout | null;
2495
+ }
2125
2496
  /** Parsed data extracted from an embedded xlsx workbook. */
2126
2497
  interface PptxEmbeddedWorkbookData {
2127
2498
  /** Category labels from the first column/row. */
@@ -2131,6 +2502,16 @@ interface PptxEmbeddedWorkbookData {
2131
2502
  name: string;
2132
2503
  values: number[];
2133
2504
  }>;
2505
+ /** Whether the workbook uses the 1904 date system. */
2506
+ date1904?: boolean;
2507
+ }
2508
+ /** Raw numeric category cache used by a classic ChartML date axis. */
2509
+ interface PptxChartDateCategories {
2510
+ values: number[];
2511
+ /** False/default uses Excel's 1900 date system; true uses the 1904 system. */
2512
+ date1904?: boolean;
2513
+ /** Number format copied from the numeric category cache. */
2514
+ formatCode?: string;
2134
2515
  }
2135
2516
  /**
2136
2517
  * Complete parsed chart data for a {@link ChartPptxElement}.
@@ -2154,6 +2535,13 @@ interface PptxChartData {
2154
2535
  title?: string;
2155
2536
  chartType: PptxChartType;
2156
2537
  categories: string[];
2538
+ /**
2539
+ * Hierarchical category levels in source XML order for ChartEx hierarchy charts.
2540
+ * Level 0 contains the leaf labels and remains mirrored by {@link categories}
2541
+ * for consumers that only understand a flat category axis.
2542
+ */
2543
+ categoryLevels?: string[][];
2544
+ dateCategories?: PptxChartDateCategories;
2157
2545
  series: PptxChartSeries[];
2158
2546
  /** Chart style/formatting metadata. */
2159
2547
  style?: PptxChartStyle;
@@ -2163,9 +2551,12 @@ interface PptxChartData {
2163
2551
  chartPartPath?: string;
2164
2552
  /** Internal: relationship ID linking the graphic frame to the chart part. */
2165
2553
  chartRelationshipId?: string;
2166
- dataTable?: PptxChartDataTable;
2554
+ /** `null` explicitly removes an existing ChartML data table. */
2555
+ dataTable?: PptxChartDataTable | null;
2167
2556
  dropLines?: PptxChartLineStyle;
2168
2557
  hiLowLines?: PptxChartLineStyle;
2558
+ /** `null` explicitly removes an existing up/down-bars container. */
2559
+ upDownBars?: PptxChartUpDownBars | null;
2169
2560
  axes?: PptxChartAxisFormatting[];
2170
2561
  floor?: PptxChart3DSurface;
2171
2562
  sideWall?: PptxChart3DSurface;
@@ -2187,12 +2578,7 @@ interface PptxChartData {
2187
2578
  * The chart still renders using its cached series data; this field
2188
2579
  * is metadata about the data origin, preserved for round-trip fidelity.
2189
2580
  */
2190
- pivotSource?: {
2191
- /** Pivot table reference name, e.g. "[workbook.xlsx]Sheet1!PivotTable1". */
2192
- name: string;
2193
- /** Format identifier from c:fmtId/@val. */
2194
- formatId?: number;
2195
- };
2581
+ pivotSource?: PptxChartPivotSource | null;
2196
2582
  /**
2197
2583
  * Whether only visible cells are plotted (c:plotVisOnly).
2198
2584
  * When `true` (the default), hidden cells are excluded from the chart.
@@ -2215,6 +2601,12 @@ interface PptxChartData {
2215
2601
  * - `"acrossLinear"` — gradient across series
2216
2602
  */
2217
2603
  colorMethod?: 'cycle' | 'withinLinear' | 'acrossLinear';
2604
+ /** Internal source color-style part path used for lossless dirty saves. */
2605
+ colorStylePartPath?: string;
2606
+ /** Internal parsed palette snapshot used to detect actual edits. */
2607
+ colorStyleOriginalPalette?: string[];
2608
+ /** Internal parsed method snapshot used to detect actual edits. */
2609
+ colorStyleOriginalMethod?: 'cycle' | 'withinLinear' | 'acrossLinear';
2218
2610
  /**
2219
2611
  * Pie-of-pie / Bar-of-pie options (`c:ofPieChart`, CT_OfPieChart).
2220
2612
  *
@@ -2223,6 +2615,8 @@ interface PptxChartData {
2223
2615
  * `ofPieChart` element can be re-emitted on save with full fidelity.
2224
2616
  */
2225
2617
  ofPieOptions?: PptxChartOfPieOptions;
2618
+ /** Classic bubble-chart display options (`c:bubbleChart`). */
2619
+ bubbleOptions?: PptxBubbleChartOptions;
2226
2620
  /**
2227
2621
  * 3D viewing parameters (`c:view3D`, CT_View3D).
2228
2622
  *
@@ -2238,6 +2632,12 @@ interface PptxChartData {
2238
2632
  * source data, so absence does not produce empty `<c:…/>` placeholders.
2239
2633
  */
2240
2634
  chartChrome?: PptxChartChrome;
2635
+ /** `c:chartSpace/c:printSettings`; `null` removes the container on save. */
2636
+ printSettings?: PptxChartPrintSettings | null;
2637
+ /** `c:chartSpace/c:protection`; `null` removes the container on save. */
2638
+ protection?: PptxChartProtection | null;
2639
+ /** Editable manual placement for the title, plot area, and legend. */
2640
+ layouts?: PptxChartLayouts;
2241
2641
  /**
2242
2642
  * Raw `c:userShapes` XML subtree (a drawing tree) preserved verbatim.
2243
2643
  *
@@ -2254,7 +2654,8 @@ interface PptxChartData {
2254
2654
  * for charts whose data originates from a PivotTable. Preserved
2255
2655
  * verbatim for round-trip fidelity.
2256
2656
  */
2257
- pivotFmtsXml?: unknown;
2657
+ /** Typed pivot-chart format persistence; `null` removes `c:pivotFmts`. */
2658
+ pivotFormats?: PptxChartPivotFormats | null;
2258
2659
  /**
2259
2660
  * Color-map override (`c:clrMapOvr`) carrying 12 attributes that
2260
2661
  * remap theme colour roles for this chart only. Preserved as a flat
@@ -2262,105 +2663,58 @@ interface PptxChartData {
2262
2663
  */
2263
2664
  clrMapOvr?: Record<string, string>;
2264
2665
  }
2265
- /**
2266
- * Image types: effects, crop shapes, and properties shared by image/picture
2267
- * elements.
2268
- *
2269
- * @module pptx-types/image
2270
- */
2271
- /**
2272
- * Blend mode for `a:blend` container nodes inside an `a:effectDag` (CT_BlendEffect).
2273
- *
2274
- * Per ECMA-376 §20.1.8.10, valid values are: `darken`, `lighten`, `mult`,
2275
- * `over`, `screen`.
2276
- */
2277
2666
  type EffectDagBlendMode = 'darken' | 'lighten' | 'mult' | 'over' | 'screen';
2278
- /**
2279
- * Container node kind inside an `a:effectDag` (CT_EffectContainer @type).
2280
- *
2281
- * Per ECMA-376 §20.1.8.20, `sib` (sibling) draws each child independently
2282
- * over the same source; `tree` (tree) chains effects so each sees the output
2283
- * of its siblings.
2284
- */
2285
2667
  type EffectDagContainerType = 'sib' | 'tree';
2286
- /**
2287
- * Typed model of the directed-acyclic effect graph stored in `a:effectDag`.
2288
- *
2289
- * The four "structural" container/transform nodes are typed; any other inner
2290
- * effect (e.g. `a:outerShdw`, `a:glow`, `a:alphaInv`) is preserved verbatim
2291
- * as a raw XML object via the {@link EffectDagRawLeaf} variant so we never
2292
- * have to recurse into the full effect taxonomy.
2293
- *
2294
- * @example
2295
- * ```ts
2296
- * // <a:effectDag>
2297
- * // <a:cont type="sib">
2298
- * // <a:blend blend="mult"><a:cont type="tree" /></a:blend>
2299
- * // </a:cont>
2300
- * // </a:effectDag>
2301
- * const dag: EffectDagContainer = {
2302
- * kind: "cont",
2303
- * type: "sib",
2304
- * children: [{
2305
- * kind: "blend",
2306
- * mode: "mult",
2307
- * container: { kind: "cont", type: "tree", children: [] },
2308
- * }],
2309
- * };
2310
- * ```
2311
- */
2312
- type EffectDagNode = EffectDagContainer | EffectDagBlend | EffectDagXfrm | EffectDagRelOff | EffectDagRawLeaf;
2313
- /** `a:cont` — CT_EffectContainer. Recursive; mirrors the top-level `effectDag`. */
2668
+ type EffectDagNode = EffectDagContainer | EffectDagBlend | EffectDagXfrm | EffectDagRelOff | EffectDagBlur | EffectDagAlphaOutset | EffectDagPresetShadow | EffectDagRawLeaf;
2314
2669
  interface EffectDagContainer {
2315
2670
  kind: 'cont';
2316
- /** `@type` — `sib` or `tree`. */
2317
2671
  type: EffectDagContainerType;
2318
- /** Optional `@name` attribute. */
2319
2672
  name?: string;
2320
- /** Ordered children. */
2321
2673
  children: EffectDagNode[];
2322
2674
  }
2323
- /** `a:blend` — CT_BlendEffect. Always wraps a single `a:cont` child. */
2324
2675
  interface EffectDagBlend {
2325
2676
  kind: 'blend';
2326
- /** `@blend` attribute. */
2327
2677
  mode: EffectDagBlendMode;
2328
- /** Required child `a:cont` container. */
2329
2678
  container: EffectDagContainer;
2330
2679
  }
2331
- /** `a:xfrmEffect` — CT_TransformEffect. Affine transform with no children. */
2332
2680
  interface EffectDagXfrm {
2333
2681
  kind: 'xfrmEffect';
2334
- /** Horizontal scale, percentage * 1000 (e.g. 100000 = 100%). */
2335
2682
  sx?: number;
2336
- /** Vertical scale, percentage * 1000. */
2337
2683
  sy?: number;
2338
- /** Horizontal skew, degrees * 60000. */
2339
2684
  kx?: number;
2340
- /** Vertical skew, degrees * 60000. */
2341
2685
  ky?: number;
2342
- /** Horizontal translation in EMU. */
2343
2686
  tx?: number;
2344
- /** Vertical translation in EMU. */
2345
2687
  ty?: number;
2346
2688
  }
2347
- /** `a:relOff` — CT_RelativeOffsetEffect. Relative offset in 1000ths of a percent. */
2348
2689
  interface EffectDagRelOff {
2349
2690
  kind: 'relOff';
2350
- /** Horizontal offset, percentage * 1000. */
2351
2691
  tx?: number;
2352
- /** Vertical offset, percentage * 1000. */
2353
2692
  ty?: number;
2354
2693
  }
2355
- /**
2356
- * Catch-all leaf preserving any non-container effect (e.g. `a:outerShdw`,
2357
- * `a:glow`, `a:alphaInv`) as raw XML. Re-emitted verbatim on save.
2358
- */
2694
+ /** Typed CT_BlurEffect with its original payload retained for lossless edits. */
2695
+ interface EffectDagBlur {
2696
+ kind: 'blur';
2697
+ radiusEmu?: number;
2698
+ grow?: boolean;
2699
+ xml: XmlObject;
2700
+ }
2701
+ /** Typed CT_AlphaOutsetEffect with original XML retained for lossless edits. */
2702
+ interface EffectDagAlphaOutset {
2703
+ kind: 'alphaOutset';
2704
+ radiusEmu?: number;
2705
+ xml: XmlObject;
2706
+ }
2707
+ /** Typed CT_PresetShadowEffect with colour and extension XML retained verbatim. */
2708
+ interface EffectDagPresetShadow {
2709
+ kind: 'prstShdw';
2710
+ preset?: `shdw${number}`;
2711
+ distanceEmu?: number;
2712
+ direction?: number;
2713
+ xml: XmlObject;
2714
+ }
2359
2715
  interface EffectDagRawLeaf {
2360
2716
  kind: 'raw';
2361
- /** Local element name without the `a:` prefix (e.g. `outerShdw`, `glow`). */
2362
2717
  tag: string;
2363
- /** Raw XML object captured at load — preserved verbatim on save. */
2364
2718
  xml: Record<string, unknown>;
2365
2719
  }
2366
2720
  /**
@@ -2388,6 +2742,8 @@ interface PptxImageEffects {
2388
2742
  duotone?: {
2389
2743
  color1: string;
2390
2744
  color2: string;
2745
+ /** Original effect XML, retained while the resolved colours are unchanged. */
2746
+ rawXml?: XmlObject;
2391
2747
  };
2392
2748
  /** Grayscale flag. */
2393
2749
  grayscale?: boolean;
@@ -2402,8 +2758,10 @@ interface PptxImageEffects {
2402
2758
  artisticEffect?: string;
2403
2759
  /** Artistic effect radius/amount. */
2404
2760
  artisticRadius?: number;
2405
- /** Alpha modulation fixed overall opacity (0-100, where 100 = fully opaque). */
2761
+ /** Alpha modulation fixed: non-negative percentage (100 means unchanged opacity). */
2406
2762
  alphaModFix?: number;
2763
+ /** Original alpha modulation fixed node, including foreign attributes. */
2764
+ alphaModFixRawXml?: XmlObject;
2407
2765
  /** Bi-level threshold — converts to 1-bit black/white (0-100). */
2408
2766
  biLevel?: number;
2409
2767
  /** Colour change — swap one colour range for another (used for transparency keying). */
@@ -2412,7 +2770,13 @@ interface PptxImageEffects {
2412
2770
  clrTo: string;
2413
2771
  /** Whether the target colour is fully transparent (alpha = 0). */
2414
2772
  clrToTransparent?: boolean;
2773
+ /** Original effect XML, including colour transforms and extensions. */
2774
+ rawXml?: XmlObject;
2415
2775
  };
2776
+ /** Original grayscale node, including extension or foreign attributes. */
2777
+ grayscaleRawXml?: XmlObject;
2778
+ /** Original bi-level node, including extension or foreign attributes. */
2779
+ biLevelRawXml?: XmlObject;
2416
2780
  /**
2417
2781
  * Alpha inverse effect (`a:alphaInv`). Inverts the alpha channel; an optional
2418
2782
  * colour child shifts the inversion baseline.
@@ -2420,11 +2784,17 @@ interface PptxImageEffects {
2420
2784
  alphaInv?: {
2421
2785
  /** Optional baseline colour (hex). */
2422
2786
  color?: string;
2787
+ /** Original effect XML, including colour transforms and foreign attributes. */
2788
+ rawXml?: XmlObject;
2423
2789
  };
2424
2790
  /** Alpha ceiling (`a:alphaCeiling`) — clamps any non-zero alpha to fully opaque. Boolean flag. */
2425
2791
  alphaCeiling?: boolean;
2792
+ /** Original alpha ceiling node, including foreign attributes. */
2793
+ alphaCeilingRawXml?: XmlObject;
2426
2794
  /** Alpha floor (`a:alphaFloor`) — clamps any non-fully-opaque alpha to fully transparent. Boolean flag. */
2427
2795
  alphaFloor?: boolean;
2796
+ /** Original alpha floor node, including foreign attributes. */
2797
+ alphaFloorRawXml?: XmlObject;
2428
2798
  /**
2429
2799
  * Alpha modulate (`a:alphaMod`). The schema requires a single `cont` (effect
2430
2800
  * container) child; we preserve the inner XML opaquely for round-trip.
@@ -2432,11 +2802,17 @@ interface PptxImageEffects {
2432
2802
  alphaMod?: {
2433
2803
  /** Raw opaque XML for the `a:cont` child to preserve on save. */
2434
2804
  contRawXml?: Record<string, unknown>;
2805
+ /** Original effect XML, including foreign attributes. */
2806
+ rawXml?: XmlObject;
2435
2807
  };
2436
2808
  /** Alpha replace (`a:alphaRepl`) — replaces alpha with the given fixed-percent value (0..100). */
2437
2809
  alphaRepl?: number;
2810
+ /** Original alpha replace node, including foreign attributes. */
2811
+ alphaReplRawXml?: XmlObject;
2438
2812
  /** Alpha bi-level (`a:alphaBiLevel`) — threshold (0..100) above which alpha becomes fully opaque. */
2439
2813
  alphaBiLevel?: number;
2814
+ /** Original alpha bi-level node, including foreign attributes. */
2815
+ alphaBiLevelRawXml?: XmlObject;
2440
2816
  /**
2441
2817
  * Colour replace (`a:clrRepl`) — replaces all colour information in an image
2442
2818
  * with the given solid colour. Stores the raw colour child to preserve scheme
@@ -2588,6 +2964,13 @@ declare module './shape-style' {
2588
2964
  * ```
2589
2965
  */
2590
2966
  type PptxMediaType = 'video' | 'audio' | 'unknown';
2967
+ type PptxMediaReferenceKind = 'audioCd' | 'wavAudioFile' | 'audioFile' | 'videoFile' | 'quickTimeFile';
2968
+ interface PptxAudioCdPosition {
2969
+ track: number;
2970
+ time?: number;
2971
+ /** Original `st` or `end` node, retained for lossless edits. */
2972
+ rawXml?: XmlObject;
2973
+ }
2591
2974
  /**
2592
2975
  * A named bookmark within a media clip timeline.
2593
2976
  *
@@ -2663,6 +3046,109 @@ interface MediaCaptionTrack {
2663
3046
  /** Whether this track is the default/active one. */
2664
3047
  isDefault?: boolean;
2665
3048
  }
3049
+ type PptxSmartArtConstraintRelationship = 'self' | 'ch' | 'des';
3050
+ type PptxSmartArtConstraintOperator = 'none' | 'equ' | 'gte' | 'lte';
3051
+ type PptxSmartArtConstraintPointType = 'all' | 'doc' | 'node' | 'norm' | 'nonNorm' | 'asst' | 'nonAsst' | 'parTrans' | 'pres' | 'sibTrans';
3052
+ interface PptxSmartArtConstraintTarget {
3053
+ for?: PptxSmartArtConstraintRelationship;
3054
+ forName?: string;
3055
+ pointType?: PptxSmartArtConstraintPointType;
3056
+ }
3057
+ /** Editable DiagramML CT_Constraint. */
3058
+ interface PptxSmartArtConstraint extends PptxSmartArtConstraintTarget {
3059
+ type: string;
3060
+ referenceType?: string;
3061
+ referenceFor?: PptxSmartArtConstraintRelationship;
3062
+ referenceForName?: string;
3063
+ referencePointType?: PptxSmartArtConstraintPointType;
3064
+ operator?: PptxSmartArtConstraintOperator;
3065
+ value?: number;
3066
+ factor?: number;
3067
+ /** Original constraint retained for foreign attributes and extension content. */
3068
+ rawXml?: XmlObject;
3069
+ }
3070
+ /** Editable DiagramML CT_NumericRule. */
3071
+ interface PptxSmartArtNumericRule extends PptxSmartArtConstraintTarget {
3072
+ type: string;
3073
+ value?: number;
3074
+ factor?: number;
3075
+ max?: number;
3076
+ /** Original rule retained for foreign attributes and extension content. */
3077
+ rawXml?: XmlObject;
3078
+ }
3079
+ /** Typed, editable metadata from a DiagramML layout-definition part. */
3080
+ interface PptxSmartArtLocalizedText {
3081
+ value: string;
3082
+ language?: string;
3083
+ }
3084
+ interface PptxSmartArtLayoutCategory {
3085
+ type: string;
3086
+ priority: number;
3087
+ }
3088
+ interface PptxSmartArtAlgorithmParameter {
3089
+ type: string;
3090
+ value?: string;
3091
+ }
3092
+ /** Typed DiagramML CT_Algorithm data attached to a layout node. */
3093
+ interface PptxSmartArtLayoutAlgorithm {
3094
+ type: string;
3095
+ revision?: number;
3096
+ parameters?: PptxSmartArtAlgorithmParameter[];
3097
+ }
3098
+ interface PptxSmartArtIteratorAttributes {
3099
+ name?: string;
3100
+ reference?: string;
3101
+ axis?: string[];
3102
+ pointTypes?: string[];
3103
+ hideLastTransition?: boolean[];
3104
+ start?: number[];
3105
+ count?: number[];
3106
+ step?: number[];
3107
+ }
3108
+ interface PptxSmartArtForEach extends PptxSmartArtIteratorAttributes {
3109
+ rawXml?: XmlObject;
3110
+ }
3111
+ interface PptxSmartArtWhen extends PptxSmartArtIteratorAttributes {
3112
+ function: string;
3113
+ argument?: string;
3114
+ operator: string;
3115
+ value: string;
3116
+ rawXml?: XmlObject;
3117
+ }
3118
+ interface PptxSmartArtChoose {
3119
+ name?: string;
3120
+ when: PptxSmartArtWhen[];
3121
+ otherwise?: {
3122
+ name?: string;
3123
+ rawXml?: XmlObject;
3124
+ } | null;
3125
+ rawXml?: XmlObject;
3126
+ }
3127
+ /** Identity and ordering metadata from DiagramML CT_LayoutNode. */
3128
+ interface PptxSmartArtLayoutNode {
3129
+ name?: string;
3130
+ styleLabel?: string;
3131
+ childOrder?: 'b' | 't';
3132
+ moveWith?: string;
3133
+ algorithm?: PptxSmartArtLayoutAlgorithm;
3134
+ forEach?: PptxSmartArtForEach[];
3135
+ choose?: PptxSmartArtChoose[];
3136
+ constraints?: PptxSmartArtConstraint[];
3137
+ rules?: PptxSmartArtNumericRule[];
3138
+ children?: PptxSmartArtLayoutNode[];
3139
+ }
3140
+ /** Metadata and root node from DiagramML CT_DiagramDefinition. */
3141
+ interface PptxSmartArtLayoutDefinition {
3142
+ uniqueId?: string;
3143
+ minimumVersion?: string;
3144
+ defaultStyle?: string;
3145
+ titles?: PptxSmartArtLocalizedText[];
3146
+ descriptions?: PptxSmartArtLocalizedText[];
3147
+ categories?: PptxSmartArtLayoutCategory[];
3148
+ rootNode: PptxSmartArtLayoutNode;
3149
+ /** Original definition retained for constraint evaluation and foreign rules. */
3150
+ rawXml?: XmlObject;
3151
+ }
2666
3152
  /**
2667
3153
  * SmartArt node types: per-run text, per-node visual override, and the
2668
3154
  * data-model node itself. Split out of `smart-art.ts` to keep each type file
@@ -2695,6 +3181,54 @@ interface PptxSmartArtTextRun {
2695
3181
  * round-trip. Untyped XML, hence the loose record shape.
2696
3182
  */
2697
3183
  rPr?: Record<string, unknown>;
3184
+ /** Resolved standard shape-text style derived from {@link rPr}. */
3185
+ style?: TextStyle;
3186
+ /** Raw run XML used to retain unmodelled extension children on save. */
3187
+ rawXml?: Record<string, unknown>;
3188
+ /** Original direct-child order, including unmodelled extension children. */
3189
+ childOrder?: string[];
3190
+ }
3191
+ /** An ordered item within a SmartArt text paragraph. */
3192
+ type PptxSmartArtTextParagraphItem = {
3193
+ kind: 'run';
3194
+ run: PptxSmartArtTextRun;
3195
+ } | {
3196
+ kind: 'break';
3197
+ rPr?: Record<string, unknown>;
3198
+ style?: TextStyle;
3199
+ rawXml?: Record<string, unknown>;
3200
+ childOrder?: string[];
3201
+ } | {
3202
+ kind: 'field';
3203
+ id?: string;
3204
+ fieldType?: string;
3205
+ text: string;
3206
+ rPr?: Record<string, unknown>;
3207
+ style?: TextStyle;
3208
+ pPr?: Record<string, unknown>;
3209
+ rawXml?: Record<string, unknown>;
3210
+ childOrder?: string[];
3211
+ } | {
3212
+ kind: 'tab';
3213
+ rawXml?: Record<string, unknown>;
3214
+ childOrder?: string[];
3215
+ } | {
3216
+ kind: 'raw';
3217
+ name: string;
3218
+ value: unknown;
3219
+ };
3220
+ /** A complete `a:p` paragraph in a SmartArt data-model text body. */
3221
+ interface PptxSmartArtTextParagraph {
3222
+ /** Paragraph properties (`a:pPr`) preserved verbatim. */
3223
+ pPr?: Record<string, unknown>;
3224
+ /** Text children in source order. */
3225
+ items: PptxSmartArtTextParagraphItem[];
3226
+ /** End-paragraph run properties (`a:endParaRPr`) preserved verbatim. */
3227
+ endParaRPr?: Record<string, unknown>;
3228
+ /** Resolved style for the paragraph terminator. */
3229
+ endParaStyle?: TextStyle;
3230
+ /** Raw paragraph XML used to retain unmodelled extension children on save. */
3231
+ rawXml?: Record<string, unknown>;
2698
3232
  }
2699
3233
  /**
2700
3234
  * Per-node visual override for a SmartArt node.
@@ -2750,6 +3284,8 @@ interface PptxSmartArtNodeStyle {
2750
3284
  interface PptxSmartArtNode {
2751
3285
  id: string;
2752
3286
  text: string;
3287
+ /** CT_Pt connection identifier, when the point references a connection. */
3288
+ connectionId?: string | null;
2753
3289
  parentId?: string;
2754
3290
  children?: PptxSmartArtNode[];
2755
3291
  /** Node type from `@_type` attribute (e.g. "doc", "node", "asst", "pres"). */
@@ -2762,6 +3298,11 @@ interface PptxSmartArtNode {
2762
3298
  * is not flattened. When {@link text} diverges, the runs are ignored.
2763
3299
  */
2764
3300
  runs?: PptxSmartArtTextRun[];
3301
+ /**
3302
+ * Complete typed paragraph model. Unlike {@link runs}, this retains every
3303
+ * paragraph and the ordered run, field, break, and tab children within it.
3304
+ */
3305
+ paragraphs?: PptxSmartArtTextParagraph[];
2765
3306
  /**
2766
3307
  * Optional per-node visual override (fill / line / font colour, bold /
2767
3308
  * italic). Read at parse time from the point's `spPr` / first-run `rPr`, set
@@ -2770,6 +3311,63 @@ interface PptxSmartArtNode {
2770
3311
  */
2771
3312
  style?: PptxSmartArtNodeStyle;
2772
3313
  }
3314
+ /** Editable metadata shared by DiagramML quick-style and color definitions. */
3315
+ interface PptxSmartArtDefinitionText {
3316
+ value: string;
3317
+ language?: string;
3318
+ }
3319
+ interface PptxSmartArtDefinitionCategory {
3320
+ type: string;
3321
+ priority: number;
3322
+ }
3323
+ type PptxSmartArtColorApplicationMethod = 'span' | 'cycle' | 'repeat';
3324
+ type PptxSmartArtHueDirection = 'cw' | 'ccw';
3325
+ /** CT_Colors application metadata. Color-choice children remain preserved XML. */
3326
+ interface PptxSmartArtColorListMetadata {
3327
+ method?: PptxSmartArtColorApplicationMethod;
3328
+ hueDirection?: PptxSmartArtHueDirection;
3329
+ }
3330
+ /** CT_StyleLabel metadata from a quick-style definition. */
3331
+ interface PptxSmartArtQuickStyleLabel {
3332
+ name: string;
3333
+ }
3334
+ /** CT_CTStyleLabel metadata from a color-transform definition. */
3335
+ interface PptxSmartArtColorStyleLabel {
3336
+ name: string;
3337
+ fill?: PptxSmartArtColorListMetadata;
3338
+ line?: PptxSmartArtColorListMetadata;
3339
+ effect?: PptxSmartArtColorListMetadata;
3340
+ textLine?: PptxSmartArtColorListMetadata;
3341
+ textFill?: PptxSmartArtColorListMetadata;
3342
+ textEffect?: PptxSmartArtColorListMetadata;
3343
+ }
3344
+ interface PptxSmartArtDefinitionMetadata {
3345
+ uniqueId?: string;
3346
+ minimumVersion?: string;
3347
+ titles?: PptxSmartArtDefinitionText[];
3348
+ descriptions?: PptxSmartArtDefinitionText[];
3349
+ categories?: PptxSmartArtDefinitionCategory[];
3350
+ }
3351
+ /** Typed CT_ColorTransform metadata and the resolved legacy color palette. */
3352
+ interface PptxSmartArtColorTransform extends PptxSmartArtDefinitionMetadata {
3353
+ /** Legacy resolved display name. */
3354
+ name?: string;
3355
+ /** Ordered resolved fill colors for rendering. */
3356
+ fillColors: string[];
3357
+ /** Ordered resolved line colors for rendering. */
3358
+ lineColors: string[];
3359
+ /** Ordered CT_CTStyleLabel metadata. */
3360
+ labels?: PptxSmartArtColorStyleLabel[];
3361
+ }
3362
+ /** Typed CT_StyleDefinition metadata and legacy rendering hint. */
3363
+ interface PptxSmartArtQuickStyle extends PptxSmartArtDefinitionMetadata {
3364
+ /** Legacy resolved display name. */
3365
+ name?: string;
3366
+ /** Legacy effect-intensity rendering hint. */
3367
+ effectIntensity?: string;
3368
+ /** Ordered CT_StyleLabel metadata. Complex style payload remains preserved XML. */
3369
+ labels?: PptxSmartArtQuickStyleLabel[];
3370
+ }
2773
3371
  /**
2774
3372
  * SmartArt types: layout categories, layout presets, colour schemes,
2775
3373
  * data-model nodes/connections, drawing shapes, chrome, and the composite
@@ -2831,6 +3429,8 @@ type SmartArtStyle = 'flat' | 'moderate' | 'intense';
2831
3429
  * ```
2832
3430
  */
2833
3431
  interface PptxSmartArtConnection {
3432
+ /** Stable CT_Cxn model identifier. Required when serialized. */
3433
+ modelId?: string | null;
2834
3434
  /** Model ID of the source node. */
2835
3435
  sourceId: string;
2836
3436
  /** Model ID of the destination node. */
@@ -2841,6 +3441,12 @@ interface PptxSmartArtConnection {
2841
3441
  srcOrd?: number;
2842
3442
  /** Destination index for ordering. */
2843
3443
  destOrd?: number;
3444
+ /** Model ID of the parent transition point associated with this edge. */
3445
+ parentTransitionId?: string | null;
3446
+ /** Model ID of the sibling transition point associated with this edge. */
3447
+ siblingTransitionId?: string | null;
3448
+ /** Layout presentation identifier used by presentation connections. */
3449
+ presentationId?: string | null;
2844
3450
  }
2845
3451
  /**
2846
3452
  * A pre-computed shape from `ppt/diagrams/drawing*.xml`.
@@ -2857,7 +3463,7 @@ interface PptxSmartArtConnection {
2857
3463
  * // => satisfies PptxSmartArtDrawingShape
2858
3464
  * ```
2859
3465
  */
2860
- interface PptxSmartArtDrawingShape {
3466
+ interface PptxSmartArtDrawingShape extends PptxCustomPathProperties {
2861
3467
  /** Shape ID within the drawing. */
2862
3468
  id: string;
2863
3469
  /** Preset geometry type (e.g. "roundRect", "ellipse"). */
@@ -2881,6 +3487,8 @@ interface PptxSmartArtDrawingShape {
2881
3487
  strokeWidth?: number;
2882
3488
  /** Text content of the shape. */
2883
3489
  text?: string;
3490
+ /** Standard rich-text segments projected from the associated SmartArt node. */
3491
+ textSegments?: TextSegment[];
2884
3492
  /** Font size in points. */
2885
3493
  fontSize?: number;
2886
3494
  /** Font colour (hex). */
@@ -2907,45 +3515,6 @@ interface PptxSmartArtChrome {
2907
3515
  /** Outline stroke width in points. */
2908
3516
  outlineWidth?: number;
2909
3517
  }
2910
- /**
2911
- * Colour transform entry from `ppt/diagrams/colors*.xml`.
2912
- *
2913
- * @example
2914
- * ```ts
2915
- * const transform: PptxSmartArtColorTransform = {
2916
- * name: "Colorful - Accent Colors",
2917
- * fillColors: ["#4F81BD", "#C0504D", "#9BBB59"],
2918
- * lineColors: ["#385D8A", "#8C3836", "#71893F"],
2919
- * };
2920
- * // => satisfies PptxSmartArtColorTransform
2921
- * ```
2922
- */
2923
- interface PptxSmartArtColorTransform {
2924
- /** Colour scheme name / title. */
2925
- name?: string;
2926
- /** Ordered list of fill colours (hex) for each node. */
2927
- fillColors: string[];
2928
- /** Ordered list of line colours (hex). */
2929
- lineColors: string[];
2930
- }
2931
- /**
2932
- * Style entry from `ppt/diagrams/quickStyles*.xml`.
2933
- *
2934
- * @example
2935
- * ```ts
2936
- * const qs: PptxSmartArtQuickStyle = {
2937
- * name: "Moderate Effect",
2938
- * effectIntensity: "moderate",
2939
- * };
2940
- * // => satisfies PptxSmartArtQuickStyle
2941
- * ```
2942
- */
2943
- interface PptxSmartArtQuickStyle {
2944
- /** Style name / title. */
2945
- name?: string;
2946
- /** Effect intensity identifier (e.g. "subtle", "moderate", "intense"). */
2947
- effectIntensity?: string;
2948
- }
2949
3518
  /**
2950
3519
  * Complete parsed SmartArt data for a {@link SmartArtPptxElement}.
2951
3520
  *
@@ -2985,14 +3554,28 @@ interface PptxSmartArtData {
2985
3554
  colorTransform?: PptxSmartArtColorTransform;
2986
3555
  /** Quick style from `ppt/diagrams/quickStyles*.xml`. */
2987
3556
  quickStyle?: PptxSmartArtQuickStyle;
3557
+ /** Editable metadata from the related DiagramML layout definition. */
3558
+ layoutDefinition?: PptxSmartArtLayoutDefinition;
2988
3559
  /** Relationship ID for the diagram data part (for round-trip save). */
2989
3560
  dataRelId?: string;
3561
+ /** Relationship ID for the diagram layout part. */
3562
+ layoutRelId?: string;
2990
3563
  /** Relationship ID for the drawing part. */
2991
3564
  drawingRelId?: string;
2992
3565
  /** Relationship ID for the colours part. */
2993
3566
  colorsRelId?: string;
2994
3567
  /** Relationship ID for the quick-styles part. */
2995
3568
  styleRelId?: string;
3569
+ /** Internal save hint: the layout definition changed in the editor. */
3570
+ layoutDirty?: boolean;
3571
+ /** Internal save hint: typed layout-definition metadata changed. */
3572
+ layoutDefinitionDirty?: boolean;
3573
+ /** Internal save hint: quick-style definition metadata changed. */
3574
+ quickStyleDirty?: boolean;
3575
+ /** Internal save hint: color-transform definition metadata changed. */
3576
+ colorTransformDirty?: boolean;
3577
+ /** Internal save hint: cached drawing geometry or text changed in the editor. */
3578
+ drawingDirty?: boolean;
2996
3579
  }
2997
3580
  /**
2998
3581
  * Table types: cell styling, cell data, rows, table data, and the parsed
@@ -3599,6 +4182,13 @@ interface MediaPptxElement extends PptxElementBase {
3599
4182
  mediaPath?: string;
3600
4183
  mediaData?: string;
3601
4184
  mediaMimeType?: string;
4185
+ mediaReferenceKind?: PptxMediaReferenceKind;
4186
+ mediaReferenceName?: string;
4187
+ /** Explicit DrawingML `audioFile/@contentType` value when present. */
4188
+ mediaReferenceContentType?: string;
4189
+ audioCdStart?: PptxAudioCdPosition;
4190
+ audioCdEnd?: PptxAudioCdPosition;
4191
+ rawMediaReferenceXml?: XmlObject;
3602
4192
  /** Trim start in milliseconds (from p:cMediaNode p:cTn @st). */
3603
4193
  trimStartMs?: number;
3604
4194
  /** Trim end in milliseconds (from p:cMediaNode p:cTn @end). */
@@ -3719,6 +4309,10 @@ interface ContentPartPptxElement extends PptxElementBase {
3719
4309
  type: 'contentPart';
3720
4310
  /** Ink strokes contained in this content part. */
3721
4311
  inkStrokes?: ContentPartInkStroke[];
4312
+ /** Package path of the related InkML part. */
4313
+ inkPartPath?: string;
4314
+ /** Parsed InkML root retained for unknown-node preservation on dirty save. */
4315
+ inkPartRawXml?: XmlObject;
3722
4316
  }
3723
4317
  /**
3724
4318
  * A Slide Zoom or Section Zoom element (PowerPoint Zoom Object).
@@ -3739,12 +4333,32 @@ interface ContentPartPptxElement extends PptxElementBase {
3739
4333
  */
3740
4334
  interface ZoomPptxElement extends PptxElementBase, PptxImageProperties {
3741
4335
  type: 'zoom';
3742
- /** Type of zoom: slide-level or section-level. */
3743
- zoomType: 'slide' | 'section';
4336
+ /** Type of zoom: slide-level, section-level, or a multi-section summary. */
4337
+ zoomType: 'slide' | 'section' | 'summary';
3744
4338
  /** Zero-based index of the target slide. */
3745
4339
  targetSlideIndex: number;
3746
4340
  /** Section ID for section zoom. */
3747
4341
  targetSectionId?: string;
4342
+ /** Ordered section tiles in a Summary Zoom container. */
4343
+ summaryTargets?: SummaryZoomTarget[];
4344
+ /** Layout mode authored on the Summary Zoom container. */
4345
+ summaryLayout?: 'grid' | 'fixed';
4346
+ }
4347
+ /** A single section tile within a PowerPoint Summary Zoom container. */
4348
+ interface SummaryZoomTarget extends PptxImageProperties {
4349
+ sectionId: string;
4350
+ targetSlideIndex: number;
4351
+ x: number;
4352
+ y: number;
4353
+ width: number;
4354
+ height: number;
4355
+ title?: string;
4356
+ description?: string;
4357
+ offsetFactorX?: number;
4358
+ offsetFactorY?: number;
4359
+ scaleFactorX?: number;
4360
+ scaleFactorY?: number;
4361
+ rawXml?: XmlObject;
3748
4362
  }
3749
4363
  /**
3750
4364
  * A 3D model object embedded via `p16:model3D` inside an
@@ -3852,6 +4466,16 @@ interface PptxHandoutMaster {
3852
4466
  /** Colour map from `<p:clrMap>` (12 alias attributes). Applied at save time. */
3853
4467
  clrMap?: Record<string, string>;
3854
4468
  }
4469
+ /**
4470
+ * Active tab within the master view sidebar.
4471
+ *
4472
+ * @example
4473
+ * ```ts
4474
+ * const tab: MasterViewTab = "slides";
4475
+ * // => "slides" — one of: "slides" | "notes" | "handout"
4476
+ * ```
4477
+ */
4478
+ type MasterViewTab = 'slides' | 'notes' | 'handout';
3855
4479
  /**
3856
4480
  * Structured slide master data.
3857
4481
  *
@@ -4019,6 +4643,44 @@ type PptxAnimationTrigger = 'onClick' | 'onShapeClick' | 'onHover' | 'afterPrevi
4019
4643
  * is preserved alongside other animations.
4020
4644
  */
4021
4645
  type PptxNativeAnimationKind = 'media';
4646
+ /** A target selected by `p:tgtEl` in the PresentationML timing model. */
4647
+ type PptxAnimationTarget = {
4648
+ type: 'shape';
4649
+ shapeId: string;
4650
+ rawXml?: XmlObject;
4651
+ } | {
4652
+ type: 'slide';
4653
+ rawXml?: XmlObject;
4654
+ } | {
4655
+ type: 'sound';
4656
+ relationshipId: string;
4657
+ name?: string;
4658
+ rawXml?: XmlObject;
4659
+ } | {
4660
+ type: 'ink';
4661
+ shapeId: string;
4662
+ rawXml?: XmlObject;
4663
+ } | {
4664
+ type: 'unknown';
4665
+ rawXml: XmlObject;
4666
+ };
4667
+ /** Nested build choice carried by `p:bldGraphic`. */
4668
+ type PptxGraphicBuild = {
4669
+ mode: 'asOne';
4670
+ rawXml?: XmlObject;
4671
+ } | {
4672
+ mode: 'sub';
4673
+ kind: 'diagram';
4674
+ build: string;
4675
+ reverse: boolean;
4676
+ rawXml?: XmlObject;
4677
+ } | {
4678
+ mode: 'sub';
4679
+ kind: 'chart';
4680
+ build: string;
4681
+ animateBackground: boolean;
4682
+ rawXml?: XmlObject;
4683
+ };
4022
4684
  /**
4023
4685
  * Parsed native animation record from `p:timing / p:tnLst`.
4024
4686
  *
@@ -4040,6 +4702,8 @@ type PptxNativeAnimationKind = 'media';
4040
4702
  interface PptxNativeAnimation {
4041
4703
  /** Target element/shape ID. */
4042
4704
  targetId?: string;
4705
+ /** Full timing target, including sound and ink target variants. */
4706
+ target?: PptxAnimationTarget;
4043
4707
  /** Trigger type. */
4044
4708
  trigger?: PptxAnimationTrigger;
4045
4709
  /** Shape ID that triggers this animation when clicked (interactive sequence). */
@@ -4144,6 +4808,8 @@ interface PptxNativeAnimation {
4144
4808
  * that aren't OLE charts).
4145
4809
  */
4146
4810
  graphicBuild?: string;
4811
+ /** Schema-accurate `p:bldGraphic/p:bldAsOne|p:bldSub` representation. */
4812
+ graphicBuildProperties?: PptxGraphicBuild;
4147
4813
  /**
4148
4814
  * Opaque map of `p:cTn` attributes that don't have a typed home on this
4149
4815
  * interface but must round-trip through parse → save. Keys are stored
@@ -4260,6 +4926,8 @@ interface AnimationCondition {
4260
4926
  targetShapeId?: string;
4261
4927
  /** Whether the condition targets a slide (from `p:tgtEl/p:sldTgt`). */
4262
4928
  targetSlide?: boolean;
4929
+ /** Full target choice, including `p:sndTgt` and `p:inkTgt`. */
4930
+ target?: PptxAnimationTarget;
4263
4931
  }
4264
4932
  /** Iteration configuration from `p:iterate`. */
4265
4933
  interface PptxAnimationIterate {
@@ -4337,6 +5005,32 @@ interface PptxElementAnimation {
4337
5005
  /** Whether to stop any currently playing sound (`p:endSnd`). */
4338
5006
  stopSound?: boolean;
4339
5007
  }
5008
+ interface PptxEmbeddedFontDataId {
5009
+ /** Required relationship identifier from `r:id`. */
5010
+ relationshipId?: string | null;
5011
+ /** Original leaf retained for unknown attribute preservation. */
5012
+ rawXml?: XmlObject;
5013
+ }
5014
+ interface PptxEmbeddedFontDescriptor {
5015
+ typeface?: string | null;
5016
+ panose?: string | null;
5017
+ pitchFamily?: string | null;
5018
+ charset?: string | null;
5019
+ rawXml?: XmlObject;
5020
+ }
5021
+ interface PptxEmbeddedFontListEntry {
5022
+ font: PptxEmbeddedFontDescriptor;
5023
+ regular?: PptxEmbeddedFontDataId | null;
5024
+ bold?: PptxEmbeddedFontDataId | null;
5025
+ italic?: PptxEmbeddedFontDataId | null;
5026
+ boldItalic?: PptxEmbeddedFontDataId | null;
5027
+ rawXml?: XmlObject;
5028
+ }
5029
+ interface PptxEmbeddedFontList {
5030
+ fonts: PptxEmbeddedFontListEntry[];
5031
+ /** Original list retained for unknown attribute and child preservation. */
5032
+ rawXml?: XmlObject;
5033
+ }
4340
5034
  /**
4341
5035
  * Metadata types: slide comments, compatibility warnings, tags,
4342
5036
  * custom properties, core/app document properties.
@@ -4362,6 +5056,10 @@ interface PptxElementAnimation {
4362
5056
  interface PptxComment {
4363
5057
  id: string;
4364
5058
  text: string;
5059
+ /** Storage vocabulary used by this comment. Omitted means legacy PresentationML. */
5060
+ format?: 'legacy' | 'modern';
5061
+ /** Stable GUID author identifier used by Office 2021 modern comments. */
5062
+ authorId?: string;
4365
5063
  /** Optional parent comment id for reply threading metadata. */
4366
5064
  parentId?: string;
4367
5065
  author?: string;
@@ -4370,12 +5068,35 @@ interface PptxComment {
4370
5068
  y?: number;
4371
5069
  /** Whether this comment has been resolved/marked done. */
4372
5070
  resolved?: boolean;
5071
+ /** Native p188 status token. */
5072
+ status?: 'active' | 'resolved' | 'closed';
5073
+ /** Modern comment classification tags and author IDs that liked the comment. */
5074
+ tags?: string[];
5075
+ likes?: string[];
5076
+ startDate?: string;
5077
+ dueDate?: string;
5078
+ assignedTo?: string[];
5079
+ /** Task completion in thousandths of a percent, from 0 through 100000. */
5080
+ complete?: number;
5081
+ priority?: number;
5082
+ title?: string;
4373
5083
  /** Modern threaded comment support (p15:threadingInfo). */
4374
5084
  threadId?: string;
4375
5085
  /** Replies to this comment (for modern threaded comments). */
4376
5086
  replies?: PptxComment[];
4377
5087
  /** ID of the element this comment is associated with (if any). */
4378
5088
  elementId?: string;
5089
+ /** Original `p:cm` subtree, retained for unknown child and extension preservation. */
5090
+ rawXml?: XmlObject;
5091
+ }
5092
+ /** Office 2021 comment author from the p188 Author part. */
5093
+ interface PptxModernCommentAuthor {
5094
+ id: string;
5095
+ name: string;
5096
+ initials?: string;
5097
+ userId: string;
5098
+ providerId: string;
5099
+ rawXml?: XmlObject;
4379
5100
  }
4380
5101
  /**
4381
5102
  * A comment author from `ppt/commentAuthors.xml`.
@@ -4408,6 +5129,8 @@ interface PptxCommentAuthor {
4408
5129
  lastIdx: number;
4409
5130
  /** Colour index assigned to this author (`@_clrIdx`). */
4410
5131
  clrIdx: number;
5132
+ /** Original `p:cmAuthor` subtree, retained for unknown attribute preservation. */
5133
+ rawXml?: XmlObject;
4411
5134
  }
4412
5135
  /**
4413
5136
  * A compatibility warning generated during parse or save when the
@@ -4462,9 +5185,17 @@ interface PptxTag {
4462
5185
  */
4463
5186
  interface PptxTagCollection {
4464
5187
  /** File path within the PPTX archive. */
4465
- path: string;
5188
+ path?: string;
5189
+ /** Package owner of the tags relationship. New collections default to presentation. */
5190
+ owner?: 'presentation' | 'slide' | 'part';
5191
+ /** Source OPC part that owns the relationship, e.g. ppt/slides/slide1.xml. */
5192
+ sourcePartPath?: string;
5193
+ /** Durable relationship identifier from the owning part. */
5194
+ relationshipId?: string;
4466
5195
  /** Tags in this collection. */
4467
5196
  tags: PptxTag[];
5197
+ /** Parsed tag-list XML retained for unknown-node preservation. */
5198
+ rawXml?: XmlObject;
4468
5199
  }
4469
5200
  /**
4470
5201
  * A custom document property from `docProps/custom.xml`.
@@ -4569,6 +5300,18 @@ interface PptxAppProperties {
4569
5300
  /** Hyperlink base URL. */
4570
5301
  hyperlinkBase?: string;
4571
5302
  }
5303
+ type PptxPrintOutput = 'slides' | 'handouts1' | 'handouts2' | 'handouts3' | 'handouts4' | 'handouts6' | 'handouts9' | 'notes' | 'outline';
5304
+ type PptxPrintColorMode = 'bw' | 'gray' | 'clr';
5305
+ /** PresentationML `CT_PrintProperties` (`p:prnPr`). */
5306
+ interface PptxPresentationPrintProperties {
5307
+ printWhat?: PptxPrintOutput | null;
5308
+ colorMode?: PptxPrintColorMode | null;
5309
+ hiddenSlides?: boolean | null;
5310
+ scaleToFitPaper?: boolean | null;
5311
+ frameSlides?: boolean | null;
5312
+ /** Original subtree retained for unknown attributes and `p:extLst`. */
5313
+ rawXml?: XmlObject;
5314
+ }
4572
5315
  /**
4573
5316
  * Resolved hex values for the 12 theme colour slots.
4574
5317
  *
@@ -4853,6 +5596,8 @@ interface PptxTheme {
4853
5596
  type PptxTransitionType = 'none' | 'cut' | 'fade' | 'push' | 'wipe' | 'split' | 'randomBar' | 'blinds' | 'checker' | 'circle' | 'comb' | 'cover' | 'diamond' | 'dissolve' | 'plus' | 'pull' | 'random' | 'strips' | 'uncover' | 'wedge' | 'wheel' | 'zoom' | 'newsflash' | 'morph' | 'conveyor' | 'doors' | 'ferris' | 'flash' | 'flythrough' | 'gallery' | 'glitter' | 'honeycomb' | 'pan' | 'prism' | 'reveal' | 'ripple' | 'shred' | 'switch' | 'vortex' | 'warp' | 'wheelReverse' | 'window' | 'cube' | 'flip' | 'rotate' | 'orbit';
4854
5597
  /** Split orientation from OOXML `@_orient`. */
4855
5598
  type PptxSplitOrientation = 'horz' | 'vert';
5599
+ /** Schema-defined `ST_TransitionSpeed` values. */
5600
+ type PptxTransitionSpeed = 'slow' | 'med' | 'fast';
4856
5601
  /**
4857
5602
  * Slide transition configuration.
4858
5603
  *
@@ -4869,6 +5614,8 @@ type PptxSplitOrientation = 'horz' | 'vert';
4869
5614
  */
4870
5615
  interface PptxSlideTransition {
4871
5616
  type: PptxTransitionType;
5617
+ /** Schema-defined transition speed. Defaults to `fast` when omitted. */
5618
+ speed?: PptxTransitionSpeed;
4872
5619
  durationMs?: number;
4873
5620
  direction?: string;
4874
5621
  advanceOnClick?: boolean;
@@ -4883,6 +5630,10 @@ interface PptxSlideTransition {
4883
5630
  orient?: PptxSplitOrientation;
4884
5631
  /** Relationship ID of transition sound from `p:sndAc/p:stSnd/@r:embed` when present. */
4885
5632
  soundRId?: string;
5633
+ /** Embedded WAV display name from `p:stSnd/p:snd/@name`. */
5634
+ soundName?: string;
5635
+ /** Whether the transition sound repeats until another sound starts. */
5636
+ soundLoop?: boolean;
4886
5637
  /** Resolved transition sound media path within the package. */
4887
5638
  soundPath?: string;
4888
5639
  /** Human-readable sound file name (extracted from soundPath). */
@@ -4896,6 +5647,8 @@ interface PptxSlideTransition {
4896
5647
  rawSoundAction?: XmlObject;
4897
5648
  /** Preserved extension-list XML node from `p:extLst` within the transition for lossless round-trip. */
4898
5649
  rawExtLst?: XmlObject;
5650
+ /** Original transition node, retained to preserve unknown attributes and children. */
5651
+ rawTransition?: XmlObject;
4899
5652
  }
4900
5653
  /**
4901
5654
  * View properties types parsed from `ppt/viewProps.xml`.
@@ -4914,6 +5667,11 @@ interface PptxViewScale {
4914
5667
  n: number;
4915
5668
  /** Denominator of the scale percentage (e.g. 100 for 100%). */
4916
5669
  d: number;
5670
+ /** Optional independent vertical scale. When absent, the X scale is used. */
5671
+ sy?: {
5672
+ n: number;
5673
+ d: number;
5674
+ };
4917
5675
  }
4918
5676
  /**
4919
5677
  * Origin point for a view (x, y in twips or EMU).
@@ -4922,6 +5680,16 @@ interface PptxViewOrigin {
4922
5680
  x: number;
4923
5681
  y: number;
4924
5682
  }
5683
+ /** A horizontal or vertical drawing guide in slide coordinates. */
5684
+ interface PptxViewGuide {
5685
+ orientation?: 'horz' | 'vert';
5686
+ position?: number;
5687
+ }
5688
+ /** Positive grid spacing from `p:gridSpacing`. */
5689
+ interface PptxGridSpacing {
5690
+ cx: number;
5691
+ cy: number;
5692
+ }
4925
5693
  /**
4926
5694
  * Restored region dimensions for normal view splitter.
4927
5695
  * Represents `p:restoredLeft` or `p:restoredTop`.
@@ -4963,6 +5731,10 @@ interface PptxCommonSlideViewProperties {
4963
5731
  snapToObjects?: boolean;
4964
5732
  /** Whether drawing guides are shown. */
4965
5733
  showGuides?: boolean;
5734
+ /** Whether the application may vary the scale automatically. */
5735
+ variableScale?: boolean;
5736
+ /** Drawing guides shown in this slide view. */
5737
+ guides?: PptxViewGuide[];
4966
5738
  /** View origin (scroll position). */
4967
5739
  origin?: PptxViewOrigin;
4968
5740
  /** View scale. */
@@ -4990,6 +5762,8 @@ interface PptxViewProperties {
4990
5762
  };
4991
5763
  /** Notes view properties. */
4992
5764
  notesViewPr?: PptxCommonSlideViewProperties;
5765
+ /** Grid spacing in positive DrawingML coordinates. */
5766
+ gridSpacing?: PptxGridSpacing;
4993
5767
  /** Raw XML preserved for lossless round-trip of unparsed attributes. */
4994
5768
  rawXml?: Record<string, unknown>;
4995
5769
  }
@@ -5003,12 +5777,16 @@ interface PptxViewProperties {
5003
5777
  * @see ECMA-376 Part 1, §19.2.1.3 (custDataLst), §19.3.1.6 (custData)
5004
5778
  */
5005
5779
  interface PptxCustomerData {
5006
- /** Resolved part path inside the package (e.g. `ppt/customerData/item1.xml`). */
5007
- id: string;
5780
+ /** Resolved part path inside the package (e.g. `customXml/item1.xml`). */
5781
+ id?: string;
5008
5782
  /** Relationship ID referencing the custom data part. */
5009
- relId: string;
5783
+ relId?: string;
5010
5784
  /** Raw string content of the custom data part (if resolvable). */
5011
5785
  data?: string;
5786
+ /** OPC content type for the custom data part. */
5787
+ contentType?: string;
5788
+ /** Raw `p:custData` XML retained for unknown-node preservation. */
5789
+ rawXml?: XmlObject;
5012
5790
  }
5013
5791
  /**
5014
5792
  * An ActiveX control reference from `p:controls / p:control`.
@@ -5133,6 +5911,8 @@ interface PptxSlide {
5133
5911
  /** Optional `<p:cSld @name>` value of the notes slide, for round-trip. */
5134
5912
  notesCSldName?: string;
5135
5913
  comments?: PptxComment[];
5914
+ /** Source package metadata for an Office 2021 p188 comment part. */
5915
+ modernCommentPart?: PptxModernCommentPart;
5136
5916
  warnings?: PptxCompatibilityWarning[];
5137
5917
  rawXml?: XmlObject;
5138
5918
  /** Per-slide colour map override parsed from `p:clrMapOvr`. */
@@ -5151,6 +5931,24 @@ interface PptxSlide {
5151
5931
  activeXControls?: PptxActiveXControl[];
5152
5932
  /** Per-slide header/footer flags from `<p:hf>` (P-H3). */
5153
5933
  headerFooterFlags?: PptxHeaderFooterFlags;
5934
+ /** Server-backed slide synchronization metadata stored in a related OPC part. */
5935
+ slideSynchronization?: PptxSlideSyncProperties;
5936
+ }
5937
+ interface PptxModernCommentPart {
5938
+ path: string;
5939
+ relationshipId: string;
5940
+ /** Original p188:cmLst root, including unknown attributes and extensions. */
5941
+ rawXml?: XmlObject;
5942
+ }
5943
+ /** Metadata from a `p:sldSyncPr` slide synchronization data part. */
5944
+ interface PptxSlideSyncProperties {
5945
+ serverSlideId: string;
5946
+ serverSlideModifiedTime: string;
5947
+ clientInsertedTime: string;
5948
+ extensionList?: XmlObject;
5949
+ rawXml?: XmlObject;
5950
+ partPath?: string;
5951
+ relationshipId?: string;
5154
5952
  }
5155
5953
  /**
5156
5954
  * A slide layout available in the loaded presentation.
@@ -5237,11 +6035,13 @@ interface PptxPresentationProperties {
5237
6035
  showSlidesTo?: number;
5238
6036
  /** Whether to show subtitles/captions during presentation mode. */
5239
6037
  showSubtitles?: boolean;
5240
- /** Print settings: slides per page. */
6038
+ /** Typed `p:prnPr` settings. Set to null during save to remove the element. */
6039
+ printProperties?: PptxPresentationPrintProperties | null;
6040
+ /** @deprecated Use `printProperties.printWhat`; retained as a handout compatibility alias. */
5241
6041
  printSlidesPerPage?: number;
5242
- /** Print settings: frame slides. */
6042
+ /** @deprecated Use `printProperties.frameSlides`. */
5243
6043
  printFrameSlides?: boolean;
5244
- /** Print settings: colour mode (from `p:prnPr/@clrMode`). */
6044
+ /** @deprecated Use `printProperties.colorMode`. */
5245
6045
  printColorMode?: 'clr' | 'gray' | 'bw';
5246
6046
  /** Most-recently-used colours from the presentation palette. */
5247
6047
  mruColors?: string[];
@@ -5278,6 +6078,8 @@ interface PptxCustomShow {
5278
6078
  id: string;
5279
6079
  /** Ordered list of slide relationship IDs included in this custom show. */
5280
6080
  slideRIds: string[];
6081
+ /** Original `p:custShow` subtree used to preserve unmodelled attributes and extensions. */
6082
+ rawXml?: XmlObject;
5281
6083
  }
5282
6084
  /**
5283
6085
  * An ordered section in the presentation (from `p:sectionLst` / `p14:sectionLst`).
@@ -5306,6 +6108,8 @@ interface PptxSection {
5306
6108
  collapsed?: boolean;
5307
6109
  /** Section highlight color hex (from p15:sectionPr/@clr). */
5308
6110
  color?: string;
6111
+ /** Original section subtree used to preserve unmodelled attributes and extensions. */
6112
+ rawXml?: XmlObject;
5309
6113
  }
5310
6114
  /**
5311
6115
  * Write-protection hash data parsed from `p:modifyVerifier` in `presentation.xml`.
@@ -5374,11 +6178,13 @@ interface PptxPhotoAlbum {
5374
6178
  */
5375
6179
  interface PptxKinsoku {
5376
6180
  /** Language code (e.g. "ja-JP", "zh-CN"). */
5377
- lang?: string;
6181
+ lang?: string | null;
5378
6182
  /** Characters that cannot begin a line. */
5379
6183
  invalStChars?: string;
5380
6184
  /** Characters that cannot end a line. */
5381
6185
  invalEndChars?: string;
6186
+ /** Original leaf retained for unknown attribute preservation. */
6187
+ rawXml?: XmlObject;
5382
6188
  }
5383
6189
  /**
5384
6190
  * Root data structure returned by {@link PptxHandlerCore.load}.
@@ -5429,6 +6235,8 @@ interface PptxData {
5429
6235
  isPasswordProtected?: boolean;
5430
6236
  /** Embedded font data (name + binary data URL) extracted from the presentation. */
5431
6237
  embeddedFonts?: PptxEmbeddedFont[];
6238
+ /** Typed `p:embeddedFontLst` package metadata, including unresolved variants. */
6239
+ embeddedFontList?: PptxEmbeddedFontList;
5432
6240
  /** Most-recently-used colour list from presentation properties. */
5433
6241
  mruColors?: string[];
5434
6242
  /** Parsed notes master data if present in the PPTX. */
@@ -5469,6 +6277,8 @@ interface PptxData {
5469
6277
  thumbnailData?: Uint8Array;
5470
6278
  /** Comment authors parsed from `ppt/commentAuthors.xml` for round-trip preservation. */
5471
6279
  commentAuthors?: PptxCommentAuthor[];
6280
+ /** Office 2021 p188 authors from the modern Author part. */
6281
+ modernCommentAuthors?: PptxModernCommentAuthor[];
5472
6282
  /**
5473
6283
  * OOXML conformance class of the loaded file.
5474
6284
  * - `'strict'` -- ISO/IEC 29500 Strict (uses `purl.oclc.org` namespace URIs)
@@ -5585,6 +6395,30 @@ interface PptxEmbeddedFont {
5585
6395
  originalPartBytes?: Uint8Array;
5586
6396
  }
5587
6397
  //#endregion
6398
+ //#region ../core/dist/SvgExporter-CxE3LpEi.d.ts
6399
+ /**
6400
+ * Headless SVG exporter — converts parsed {@link PptxSlide} data to
6401
+ * SVG XML strings without requiring a browser DOM.
6402
+ *
6403
+ * All output is generated via string concatenation so the exporter
6404
+ * works in any JavaScript runtime (Node, Bun, Deno, Workers, etc.).
6405
+ *
6406
+ * @module converter/SvgExporter
6407
+ */
6408
+ /**
6409
+ * Options controlling SVG export behaviour.
6410
+ */
6411
+ interface SvgExportOptions {
6412
+ /** Include hidden slides when exporting all. Default `false`. */
6413
+ includeHidden?: boolean;
6414
+ /** Slide indices to export (0-based). If omitted, all slides are exported. */
6415
+ slideIndices?: number[];
6416
+ /** Default font family when the element does not specify one. */
6417
+ defaultFontFamily?: string;
6418
+ /** Default font size in points when the element does not specify one. */
6419
+ defaultFontSize?: number;
6420
+ }
6421
+ //#endregion
5588
6422
  //#region ../core/dist/index.d.ts
5589
6423
  /**
5590
6424
  * Built-in theme presets modelled after common PowerPoint themes.
@@ -5758,10 +6592,17 @@ interface ChartSeriesInput {
5758
6592
  name: string;
5759
6593
  values: number[];
5760
6594
  color?: string;
6595
+ boxWhiskerOptions?: PptxChartBoxWhiskerOptions;
6596
+ histogramOptions?: PptxChartHistogramOptions;
6597
+ waterfallOptions?: PptxChartWaterfallOptions;
6598
+ regionMapOptions?: PptxChartRegionMapOptions;
6599
+ treemapOptions?: PptxChartTreemapOptions;
5761
6600
  }
5762
6601
  interface ChartInput {
5763
6602
  series: ChartSeriesInput[];
5764
6603
  categories: string[];
6604
+ /** ChartEx hierarchy levels in leaf-to-root XML order. */
6605
+ categoryLevels?: string[][];
5765
6606
  title?: string;
5766
6607
  hasLegend?: boolean;
5767
6608
  legendPosition?: 't' | 'b' | 'l' | 'r' | 'tr';
@@ -6267,10 +7108,12 @@ interface PptxHandlerSaveOptions {
6267
7108
  slideLayouts?: PptxSlideLayout[];
6268
7109
  /** Updated tag collections to save back to ppt/tags/tag*.xml. */
6269
7110
  tags?: PptxTagCollection[];
7111
+ /** Presentation-level customer data references to author or update. */
7112
+ customerData?: PptxCustomerData[];
6270
7113
  /** Photo album metadata to save back to `p:photoAlbum`. */
6271
7114
  photoAlbum?: PptxPhotoAlbum;
6272
7115
  /** East Asian line-break settings to save back to `p:kinsoku`. */
6273
- kinsoku?: PptxKinsoku;
7116
+ kinsoku?: PptxKinsoku | null;
6274
7117
  /** Write-protection verifier. Set to `null` to remove, `undefined` to preserve existing. */
6275
7118
  modifyVerifier?: PptxModifyVerifier | null;
6276
7119
  /** View properties to save back to ppt/viewProps.xml. */
@@ -6302,6 +7145,8 @@ interface PptxHandlerSaveOptions {
6302
7145
  * preserved (i.e. the default is lossless round-trip).
6303
7146
  */
6304
7147
  embeddedFonts?: PptxEmbeddedFont[];
7148
+ /** Typed embedded-font list metadata. Set to null to remove fonts and relationships. */
7149
+ embeddedFontList?: PptxEmbeddedFontList | null;
6305
7150
  /**
6306
7151
  * OOXML conformance class for the saved output.
6307
7152
  * - `'preserve'` (default): use the same conformance as the loaded file.
@@ -7064,6 +7909,102 @@ interface CanvasSize {
7064
7909
  width: number;
7065
7910
  height: number;
7066
7911
  }
7912
+ /** Viewer interaction mode: read-only, edit, presentation, or master-view. */
7913
+ type ViewerMode = 'preview' | 'edit' | 'present' | 'master';
7914
+ /**
7915
+ * Framework-agnostic imperative API contract for the PowerPoint viewer.
7916
+ *
7917
+ * Each binding (React `forwardRef` handle, Vue `defineExpose`, Angular public
7918
+ * methods) implements this interface so consumers get a consistent progressive
7919
+ * API regardless of framework.
7920
+ */
7921
+ interface PowerPointViewerAPI {
7922
+ /** Serialise the current presentation to `.pptx` bytes. */
7923
+ getContent: () => Promise<Uint8Array>;
7924
+ /** Navigate to a specific slide by zero-based index. */
7925
+ goTo: (slideIndex: number) => void;
7926
+ /** Navigate to the previous slide. */
7927
+ goPrev: () => void;
7928
+ /** Navigate to the next slide. */
7929
+ goNext: () => void;
7930
+ /** Undo the last editing action. No-op when nothing to undo. */
7931
+ undo: () => void;
7932
+ /** Redo the last undone action. No-op when nothing to redo. */
7933
+ redo: () => void;
7934
+ /** Whether an undo action is available. */
7935
+ canUndo: () => boolean;
7936
+ /** Whether a redo action is available. */
7937
+ canRedo: () => boolean;
7938
+ /** Get the current zoom level (1 = 100%). */
7939
+ getZoom: () => number;
7940
+ /** Set the zoom level (clamped to min/max bounds). */
7941
+ setZoom: (level: number) => void;
7942
+ /** Zoom in by one step. */
7943
+ zoomIn: () => void;
7944
+ /** Zoom out by one step. */
7945
+ zoomOut: () => void;
7946
+ /** Reset zoom to 100%. */
7947
+ zoomReset: () => void;
7948
+ /** Get the current viewer mode. */
7949
+ getMode: () => ViewerMode;
7950
+ /** Switch the viewer mode (e.g. 'edit', 'preview', 'present'). */
7951
+ setMode: (mode: ViewerMode) => void;
7952
+ /** Get the zero-based active slide index. */
7953
+ getActiveSlideIndex: () => number;
7954
+ /** Set the active slide by zero-based index (alias of goTo). */
7955
+ setActiveSlideIndex: (index: number) => void;
7956
+ /** Get the total number of slides. */
7957
+ getSlideCount: () => number;
7958
+ /** Whether the document has unsaved changes. */
7959
+ isDirty: () => boolean;
7960
+ /**
7961
+ * Get the full slide array. Returns the actual `PptxSlide[]` from the
7962
+ * internal model with full type information (elements, notes, transitions,
7963
+ * animations, etc.). The returned reference is a snapshot; mutations are
7964
+ * not reflected back unless done via the manipulation methods.
7965
+ */
7966
+ getSlides: () => readonly PptxSlide[];
7967
+ /** Get a single slide by zero-based index, or undefined if out of range. */
7968
+ getSlide: (index: number) => PptxSlide | undefined;
7969
+ /** Get the currently active slide. */
7970
+ getActiveSlide: () => PptxSlide | undefined;
7971
+ /** Add a blank slide after the given index (or at end if omitted). */
7972
+ addSlide: (afterIndex?: number) => void;
7973
+ /** Delete slides at the given zero-based indexes. At least one slide is kept. */
7974
+ deleteSlides: (indexes: number[]) => void;
7975
+ /** Duplicate slides at the given zero-based indexes. */
7976
+ duplicateSlides: (indexes: number[]) => void;
7977
+ /** Move a slide from one position to another. */
7978
+ moveSlide: (fromIndex: number, toIndex: number) => void;
7979
+ /** Toggle the hidden flag on slides at the given indexes. */
7980
+ toggleHideSlides: (indexes: number[]) => void;
7981
+ /**
7982
+ * Get the elements on a slide. Defaults to the active slide when
7983
+ * `slideIndex` is omitted. Returns the full `PptxElement[]` with
7984
+ * all type-specific properties intact.
7985
+ */
7986
+ getElements: (slideIndex?: number) => readonly PptxElement[];
7987
+ /** Get a single element by ID from the active slide (or a specified slide). */
7988
+ getElementById: (elementId: string, slideIndex?: number) => PptxElement | undefined;
7989
+ /**
7990
+ * Update one or more properties of an element by ID on the active slide.
7991
+ * Accepts a `Partial<PptxElement>` patch (e.g. `{ x: 100, width: 300 }`).
7992
+ */
7993
+ updateElement: (elementId: string, updates: Partial<PptxElement>) => void;
7994
+ /** Delete elements by their IDs from the active slide. */
7995
+ deleteElements: (elementIds: string[]) => void;
7996
+ /**
7997
+ * Duplicate an element on the active slide.
7998
+ * Returns the new element's ID, or undefined if the source was not found.
7999
+ */
8000
+ duplicateElement: (elementId: string) => string | undefined;
8001
+ /** Get the IDs of currently selected elements. */
8002
+ getSelectedElementIds: () => string[];
8003
+ /** Programmatically select elements by their IDs. */
8004
+ selectElements: (ids: string[]) => void;
8005
+ /** Clear the current selection. */
8006
+ clearSelection: () => void;
8007
+ }
7067
8008
  /** Collaboration role within a session. */
7068
8009
  type CollaborationRole = 'owner' | 'collaborator' | 'viewer';
7069
8010
  /**
@@ -7076,10 +8017,12 @@ type CollaborationRole = 'owner' | 'collaborator' | 'viewer';
7076
8017
  * any signaling server, which makes this mode usable from static hosting.
7077
8018
  */
7078
8019
  type CollaborationTransport = 'websocket' | 'webrtc';
8020
+ /** How the local user entered a collaboration session. */
8021
+ type CollaborationSessionIntent = 'create' | 'join';
7079
8022
  /**
7080
8023
  * Real-time collaboration configuration.
7081
8024
  *
7082
- * The same shape is accepted by the React, Vue, and Angular bindings.
8025
+ * The same shape is accepted by every framework binding.
7083
8026
  */
7084
8027
  interface CollaborationConfig {
7085
8028
  /** Unique identifier for the collaboration room (alphanumeric, hyphens, underscores). */
@@ -7107,6 +8050,13 @@ interface CollaborationConfig {
7107
8050
  authToken?: string;
7108
8051
  /** Role in the session; defaults to `'collaborator'`. */
7109
8052
  role?: CollaborationRole;
8053
+ /**
8054
+ * Whether this client created the room or joined an existing room. Providers
8055
+ * do not use this value, but hosts can use it to avoid publishing local file
8056
+ * bytes when handling a join request. Omitted values retain the legacy
8057
+ * create-session behaviour.
8058
+ */
8059
+ sessionIntent?: CollaborationSessionIntent;
7110
8060
  /**
7111
8061
  * Elected-writer write-back callback (Area 3 of the C3 hardening plan).
7112
8062
  *
@@ -7178,6 +8128,53 @@ type AnimationGroup = 'entrance' | 'emphasis' | 'exit';
7178
8128
  */
7179
8129
  /** Edge / centre that {@link alignElements} can snap a selection to. */
7180
8130
  type AlignEdge = 'left' | 'centerH' | 'right' | 'top' | 'middle' | 'bottom';
8131
+ /**
8132
+ * Text-field placeholder substitution, shared by every binding's text
8133
+ * renderer.
8134
+ *
8135
+ * Pure string logic: resolves OOXML field runs (slide number, date/time,
8136
+ * header/footer, document properties, slide title) into their display text.
8137
+ * Extracted from the React `viewer/utils/text-field-substitution` module so
8138
+ * every binding substitutes identically.
8139
+ */
8140
+ /** Context for substituting field placeholders (slide number, date/time, header/footer, etc.). */
8141
+ interface FieldSubstitutionContext {
8142
+ slideNumber?: number;
8143
+ dateTimeText?: string;
8144
+ /** OOXML date-format pattern from header/footer settings (e.g. "M/d/yyyy"). */
8145
+ dateFormat?: string;
8146
+ /** Footer text from PptxHeaderFooter settings. */
8147
+ footerText?: string;
8148
+ /** Header text from PptxHeaderFooter settings. */
8149
+ headerText?: string;
8150
+ /** Custom document properties for `docproperty` field substitution (keyed by property name). */
8151
+ customProperties?: ReadonlyArray<{
8152
+ name: string;
8153
+ value: string;
8154
+ }>;
8155
+ /** Locale string for date/time formatting (e.g. "en-US"). Falls back to browser default. */
8156
+ locale?: string;
8157
+ /** Title text extracted from the first title placeholder on the slide. */
8158
+ slideTitle?: string;
8159
+ }
8160
+ /**
8161
+ * Changes to apply to textStyle from the advanced panel.
8162
+ * Every key maps 1-to-1 to TextStyle fields.
8163
+ */
8164
+ type TextAdvancedChanges = Partial<Pick<TextStyle, 'characterSpacing' | 'lineSpacing' | 'lineSpacingExactPt' | 'paragraphSpacingBefore' | 'paragraphSpacingAfter' | 'align' | 'vAlign' | 'paragraphIndent' | 'paragraphMarginLeft' | 'textDirection' | 'rtl'>>;
8165
+ /**
8166
+ * Utilities for reading and restoring text selections within the inline text
8167
+ * editor contentEditable, and for applying style updates to a subset of text
8168
+ * segments based on the current selection. Framework-agnostic (uses DOM globals
8169
+ * only; no framework imports).
8170
+ */
8171
+ /** Describes which segments (and offsets within them) are selected. */
8172
+ interface InlineTextSelection {
8173
+ startSegIdx: number;
8174
+ startOffset: number;
8175
+ endSegIdx: number;
8176
+ endOffset: number;
8177
+ }
7181
8178
  /**
7182
8179
  * "Change Case" text mutation (PowerPoint's Aa dropdown: Sentence case, lower,
7183
8180
  * UPPER, Capitalize Each Word, tOGGLE cASE). Unlike `textCaps` (a purely
@@ -7241,6 +8238,33 @@ interface SanitizedPresence {
7241
8238
  selectedElementId?: string;
7242
8239
  role?: CollaborationRole;
7243
8240
  }
8241
+ /**
8242
+ * A font supplied by the host application. The package never ships fonts:
8243
+ * applications provide a licensed URL, data URL, or blob URL for their users.
8244
+ */
8245
+ interface ViewerFontSource {
8246
+ family: string;
8247
+ src: string;
8248
+ format?: 'truetype' | 'opentype' | 'woff' | 'woff2';
8249
+ weight?: string | number;
8250
+ style?: 'normal' | 'italic';
8251
+ }
8252
+ declare function parsePresentationSessionId(hash: string): string | null;
8253
+ declare function loadPresentationDeck(sessionId: string): Promise<Uint8Array | null>;
8254
+ /**
8255
+ * alignment-guides.ts: pure helpers for the View > H/V Guides feature
8256
+ * (draggable alignment guides), shared across bindings. Framework-free so it
8257
+ * unit-tests in isolation.
8258
+ *
8259
+ * Distinct from `snap-guides.ts`, which computes snap geometry while dragging;
8260
+ * this module owns the persistent guide list CRUD (`Guide` carries an `id`).
8261
+ */
8262
+ /** A single alignment guide, positioned in authored slide pixels. */
8263
+ interface Guide {
8264
+ id: string;
8265
+ axis: 'h' | 'v';
8266
+ position: number;
8267
+ }
7244
8268
  /**
7245
8269
  * Pure, framework-agnostic helpers for freehand ink drawing, shared by every
7246
8270
  * binding. No framework imports, so these can be unit-tested without TestBed.
@@ -7397,10 +8421,33 @@ type DrawTool = 'select' | 'pen' | 'highlighter' | 'eraser';
7397
8421
  interface ViewerState {
7398
8422
  /** Parsed slides (image/media URLs already patched in by the load pipeline). */
7399
8423
  slides: PptxSlide[];
8424
+ /** Presentation sections used to group slides in the thumbnail rail. */
8425
+ sections: PptxSection[];
8426
+ presentationProperties: PptxPresentationProperties;
8427
+ headerFooter: PptxHeaderFooter;
8428
+ coreProperties?: PptxCoreProperties;
8429
+ appProperties?: PptxAppProperties;
8430
+ customProperties: PptxCustomProperty[];
8431
+ customShows: PptxCustomShow[];
8432
+ embeddedFonts: PptxEmbeddedFont[];
8433
+ hasDigitalSignatures: boolean;
8434
+ digitalSignatureCount: number;
8435
+ isPasswordProtected: boolean;
7400
8436
  /** Inherited layout/master elements, separated so interaction can be gated. */
7401
8437
  templateElementsBySlideId: Record<string, PptxElement[]>;
7402
8438
  /** Parsed slide masters and layouts used by the dedicated master canvas. */
7403
8439
  slideMasters: PptxSlideMaster[];
8440
+ /** Parsed notes master and its portrait page size. */
8441
+ notesMaster?: PptxNotesMaster;
8442
+ notesCanvasSize?: CanvasSize;
8443
+ /** Parsed handout master. */
8444
+ handoutMaster?: PptxHandoutMaster;
8445
+ /** Whether the loaded package contains a VBA project. */
8446
+ hasMacros: boolean;
8447
+ /** Active master-workspace tab. */
8448
+ masterViewTab: MasterViewTab;
8449
+ /** Preview layout used by the handout master workspace. */
8450
+ handoutSlidesPerPage: number;
7404
8451
  /** Active master/layout canvas, or null for normal slide view. */
7405
8452
  masterViewTarget: {
7406
8453
  masterIndex: number;
@@ -7430,6 +8477,18 @@ interface ViewerState {
7430
8477
  selectedElementId: string | null;
7431
8478
  /** All selected top-level element ids; the primary selection is listed last. */
7432
8479
  selectedElementIds: string[];
8480
+ /** Active table cell for cell-scoped inspector formatting. */
8481
+ selectedTableCell: {
8482
+ row: number;
8483
+ column: number;
8484
+ } | null;
8485
+ /** Shift-select range of active table cells, including the anchor. */
8486
+ selectedTableCells: Array<{
8487
+ row: number;
8488
+ column: number;
8489
+ }>;
8490
+ /** Active rich-text range captured from the inline editor. */
8491
+ selectedTextRange: InlineTextSelection | null;
7433
8492
  /** Source element id while the one-shot Format Painter is armed. */
7434
8493
  formatPainterSourceId: string | null;
7435
8494
  /** When true, selection and element mutations target inherited template elements. */
@@ -7460,6 +8519,13 @@ interface ViewerState {
7460
8519
  drawColor: string;
7461
8520
  /** Stroke width (px) for the pen/highlighter tools. */
7462
8521
  drawWidth: number;
8522
+ showGrid: boolean;
8523
+ showRulers: boolean;
8524
+ snapToGrid: boolean;
8525
+ snapToShape: boolean;
8526
+ guides: Guide[];
8527
+ eyedropperActive: boolean;
8528
+ spellCheckEnabled: boolean;
7463
8529
  }
7464
8530
  //#endregion
7465
8531
  //#region src/viewer/editor/editor-animation-actions.d.ts
@@ -7479,6 +8545,19 @@ interface ViewerState {
7479
8545
  interface AnimationActions {
7480
8546
  addAnimation(group: AnimationGroup, preset: PptxAnimationPreset): void;
7481
8547
  removeAnimation(): void;
8548
+ setAnimationTiming(elementId: string, patch: {
8549
+ durationMs?: number;
8550
+ delayMs?: number;
8551
+ trigger?: PptxAnimationTrigger;
8552
+ direction?: PptxAnimationDirection;
8553
+ sequence?: PptxAnimationSequence;
8554
+ timingCurve?: PptxAnimationTimingCurve;
8555
+ repeatCount?: number;
8556
+ repeatMode?: PptxAnimationRepeatMode | 'none';
8557
+ triggerShapeId?: string;
8558
+ }): void;
8559
+ reorderAnimation(elementId: string, direction: 'up' | 'down'): void;
8560
+ moveAnimation(elementId: string, index: number): void;
7482
8561
  }
7483
8562
  //#endregion
7484
8563
  //#region src/viewer/editor/editor-arrange-actions.d.ts
@@ -7486,20 +8565,9 @@ interface AnimationActions {
7486
8565
  * Z-order, align, flip, and group/ungroup actions for the ribbon's
7487
8566
  * Home > Arrange group.
7488
8567
  *
7489
- * Align/distribute: the vanilla editor's selection model is single-element
7490
- * only (see `state/viewer-state.ts`), so `alignElements` reaches the
7491
- * single-selection "align to slide" mode ({@link alignToCanvas}), matching
7492
- * PowerPoint's own behaviour when nothing else is selected. Multi-selection
7493
- * "align to selection bounding box" / distribute (needing >= 2 / >= 3
7494
- * elements, see `editor-arrange-mutations.ts`) is unreachable until a
7495
- * multi-select model lands; `canDistribute` is therefore always `false` today
7496
- * (see `editing-chrome-sync.ts`), a documented limitation rather than a bug.
7497
- *
7498
- * Group: needs >= 2 selected elements to be meaningful, so it too is
7499
- * unreachable under single selection; `groupSelected` is a deliberate no-op
7500
- * kept only so the ribbon button (permanently disabled, with an explanatory
7501
- * title) has something to call. Ungroup works today: it applies to whichever
7502
- * single `group` element is selected.
8568
+ * A single selection aligns against the slide canvas. Shift-click or marquee
8569
+ * multi-selection aligns against the collective bounds, enables distribution
8570
+ * for three or more elements, and enables grouping for two or more elements.
7503
8571
  */
7504
8572
  interface ArrangeActions {
7505
8573
  bringForward(): void;
@@ -7589,6 +8657,13 @@ interface InkActions {
7589
8657
  /** The element kinds the Insert ribbon tab can create directly. */
7590
8658
  type InsertKind = 'text' | 'table' | 'shape';
7591
8659
  //#endregion
8660
+ //#region src/viewer/editor/table-editor-mutations.d.ts
8661
+ interface TableCellPosition {
8662
+ row: number;
8663
+ column: number;
8664
+ }
8665
+ type TableStructureAction = 'insertRowAbove' | 'insertRowBelow' | 'deleteRow' | 'insertColumnLeft' | 'insertColumnRight' | 'deleteColumn';
8666
+ //#endregion
7592
8667
  //#region src/viewer/editor/editor-inspector-actions.d.ts
7593
8668
  /**
7594
8669
  * Element-type-aware inspector actions: text vertical-align/wrap/autofit,
@@ -7597,14 +8672,14 @@ type InsertKind = 'text' | 'table' | 'shape';
7597
8672
  * thin `applyToSelected` wrapper around pure builders from `pptx-viewer-shared`
7598
8673
  * (or the local `patchShapeStyle`), mirroring `editor-text-actions.ts`.
7599
8674
  *
7600
- * These extend the base position/size/rotation + flat fill/stroke inspector
7601
- * that `editor-edit-ops.ts` already exposes; see `ui/inspector/` for the
7602
- * per-element-type panels that call these.
8675
+ * The corresponding panels live under `ui/inspector/`.
7603
8676
  */
7604
8677
  interface InspectorActions {
7605
8678
  setTextVerticalAlign(vAlign: NonNullable<TextStyle['vAlign']>): void;
7606
8679
  setTextWrap(wrap: NonNullable<TextStyle['textWrap']>): void;
7607
8680
  setAutoFitMode(mode: NonNullable<TextStyle['autoFitMode']>): void;
8681
+ setTextAdvanced(patch: TextAdvancedChanges): void;
8682
+ setTextStyle(patch: Partial<TextStyle>, selection?: InlineTextSelection | null): void;
7608
8683
  setFillOpacity(opacity: number): void;
7609
8684
  setStrokeOpacity(opacity: number): void;
7610
8685
  setGradientFill(state: GradientState): void;
@@ -7615,14 +8690,39 @@ interface InspectorActions {
7615
8690
  setImageContrast(value: number): void;
7616
8691
  setImageSaturation(value: number): void;
7617
8692
  setImageCrop(edge: 'left' | 'top' | 'right' | 'bottom', value: number): void;
8693
+ setImageEffects(patch: Partial<PptxImageEffects>): void;
8694
+ setElementAction(trigger: 'click' | 'hover', action: ElementAction): void;
8695
+ setChartData(data: PptxChartData): void;
8696
+ setMediaProperties(patch: Partial<MediaPptxElement>): void;
7618
8697
  setTableHeaderRow(enabled: boolean): void;
7619
8698
  setTableBandedRows(enabled: boolean): void;
7620
8699
  setTableCellPadding(padding: number): void;
8700
+ setTableOptions(patch: Partial<PptxTableData>, cellStyle?: Partial<PptxTableCellStyle>): void;
8701
+ setTableCellStyle(row: number, column: number, patch: Partial<PptxTableCellStyle>): void;
8702
+ setTableCellStyles(cells: TableCellPosition[], patch: Partial<PptxTableCellStyle>): void;
8703
+ mutateTableStructure(cell: TableCellPosition, action: TableStructureAction): void;
8704
+ setTableColumnWidth(column: number, percent: number): void;
8705
+ setTableRowHeight(row: number, height: number): void;
8706
+ mergeTableCells(cells: TableCellPosition[]): void;
8707
+ splitTableCell(cell: TableCellPosition): void;
7621
8708
  setSmartArtNodeText(nodeId: string, text: string): void;
8709
+ setSmartArtNodeStyle(nodeId: string, patch: Partial<PptxSmartArtNodeStyle>): void;
8710
+ mutateSmartArtNode(nodeId: string, action: 'add' | 'addChild' | 'remove' | 'promote' | 'demote'): void;
7622
8711
  setSmartArtLayout(layout: SmartArtLayoutType): void;
7623
8712
  setSmartArtColorScheme(scheme: SmartArtColorScheme): void;
7624
8713
  }
7625
8714
  //#endregion
8715
+ //#region src/viewer/editor/editor-section-actions.d.ts
8716
+ /** History-aware slide section actions exposed to the rail and Home ribbon. */
8717
+ interface SectionActions {
8718
+ addSection(name: string, afterSlideIndex?: number): string | null;
8719
+ renameSection(sectionId: string, name: string): void;
8720
+ deleteSection(sectionId: string): void;
8721
+ moveSection(sectionId: string, direction: 'up' | 'down'): void;
8722
+ moveSlidesToSection(slideIndexes: number[], targetSectionId: string): void;
8723
+ toggleSection(sectionId: string): void;
8724
+ }
8725
+ //#endregion
7626
8726
  //#region src/viewer/editor/editor-slide-actions.d.ts
7627
8727
  /**
7628
8728
  * New/duplicate/delete-slide actions for the ribbon's Home > Slides group,
@@ -7704,11 +8804,15 @@ interface GeometryPatch {
7704
8804
  * -> commit) via the shared {@link EditorOps}.
7705
8805
  */
7706
8806
  interface EditActions extends TextActions, ArrangeActions, ClipboardActions, SlideActions, SlideBackgroundActions, TransitionActions, AnimationActions, InspectorActions, InkActions {
8807
+ /** Slide section CRUD and ordering actions. */
8808
+ sections: SectionActions;
7707
8809
  comments: CommentActions;
7708
8810
  toggleFormatPainter(): void;
7709
8811
  setShapeFill(color: string): void;
7710
8812
  setShapeStroke(color: string): void;
7711
8813
  setShapeStrokeWidth(width: number): void;
8814
+ setShapeStyle(patch: Partial<ShapeStyle>): void;
8815
+ setShapeType(shapeType: string): void;
7712
8816
  /** Commit an inspector geometry edit (X/Y/W/H/rotation). */
7713
8817
  setGeometry(patch: GeometryPatch): void;
7714
8818
  insert(kind: InsertKind, shapeType?: ShapePresetType): void;
@@ -7722,6 +8826,12 @@ interface EditActions extends TextActions, ArrangeActions, ClipboardActions, Sli
7722
8826
  insertField(fieldType: string, value?: string): void;
7723
8827
  duplicateSelected(): void;
7724
8828
  deleteSelected(): void;
8829
+ toggleViewOption(option: 'showGrid' | 'showRulers' | 'snapToGrid' | 'snapToShape'): void;
8830
+ addGuide(axis: Guide['axis']): void;
8831
+ activateEyedropper(): void;
8832
+ toggleSpellCheck(): void;
8833
+ replaceSelectedImage(): Promise<void>;
8834
+ resetSelectedImage(): void;
7725
8835
  }
7726
8836
  //#endregion
7727
8837
  //#region src/viewer/editor/editor-find-replace-actions.d.ts
@@ -7781,6 +8891,8 @@ interface InspectorState {
7781
8891
  canShape: boolean;
7782
8892
  canText: boolean;
7783
8893
  isImage: boolean;
8894
+ isChart: boolean;
8895
+ isMedia: boolean;
7784
8896
  isTable: boolean;
7785
8897
  isSmartArt: boolean;
7786
8898
  smartArtData: PptxSmartArtData | undefined;
@@ -7792,6 +8904,9 @@ interface InspectorState {
7792
8904
  fillColor: string | undefined;
7793
8905
  strokeColor: string | undefined;
7794
8906
  strokeWidth: number;
8907
+ shapeStyle: ShapeStyle | undefined;
8908
+ shapeType: string | undefined;
8909
+ isConnector: boolean;
7795
8910
  fillOpacity: number;
7796
8911
  strokeOpacity: number;
7797
8912
  gradientEnabled: boolean;
@@ -7799,16 +8914,61 @@ interface InspectorState {
7799
8914
  vAlign: 'top' | 'middle' | 'bottom';
7800
8915
  textWrap: 'square' | 'none';
7801
8916
  autoFitMode: 'shrink' | 'normal' | 'none';
8917
+ characterSpacing: number;
8918
+ lineSpacing: number;
8919
+ lineSpacingExactPt: number | null;
8920
+ paragraphSpacingBefore: number;
8921
+ paragraphSpacingAfter: number;
8922
+ paragraphIndent: number;
8923
+ paragraphMarginLeft: number;
8924
+ textDirection: 'horizontal' | 'vertical' | 'vertical270' | 'eaVert' | 'wordArtVert' | 'wordArtVertRtl' | 'mongolianVert';
8925
+ textRtl: boolean;
8926
+ textStyle: TextStyle | undefined;
8927
+ selectedTextRange: InlineTextSelection | null;
7802
8928
  imageBrightness: number;
7803
8929
  imageContrast: number;
7804
8930
  imageSaturation: number;
8931
+ imageArtisticEffect: string;
8932
+ imageTransparency: number;
8933
+ imageBiLevel: number;
8934
+ imageDuotone1: string;
8935
+ imageDuotone2: string;
8936
+ imageColorWash?: {
8937
+ color: string;
8938
+ opacity: number;
8939
+ };
8940
+ actionClick?: ElementAction;
8941
+ actionHover?: ElementAction;
8942
+ chartData?: PptxChartData;
8943
+ media?: MediaPptxElement;
8944
+ mediaPreviewUrl?: string;
8945
+ mediaPosterUrl?: string;
7805
8946
  cropLeft: number;
7806
8947
  cropTop: number;
7807
8948
  cropRight: number;
7808
8949
  cropBottom: number;
7809
8950
  tableHeaderRow: boolean;
7810
8951
  tableBandedRows: boolean;
8952
+ tableBandedColumns: boolean;
8953
+ tableLastRow: boolean;
8954
+ tableFirstCol: boolean;
8955
+ tableLastCol: boolean;
8956
+ tableRtl: boolean;
8957
+ tableStyleId: string;
8958
+ tableCellBackground: string;
8959
+ tableCellBorder: string;
7811
8960
  tableCellPadding: number;
8961
+ selectedTableCell: {
8962
+ row: number;
8963
+ column: number;
8964
+ } | null;
8965
+ selectedTableCells: Array<{
8966
+ row: number;
8967
+ column: number;
8968
+ }>;
8969
+ tableCellStyle: PptxTableCellStyle | undefined;
8970
+ tableColumnWidths: number[];
8971
+ tableRowHeights: number[];
7812
8972
  }
7813
8973
  interface Inspector {
7814
8974
  el: HTMLElement;
@@ -7816,6 +8976,41 @@ interface Inspector {
7816
8976
  setEditable(editable: boolean): void;
7817
8977
  }
7818
8978
  //#endregion
8979
+ //#region src/viewer/ui/master-view-sidebar.d.ts
8980
+ interface MasterViewSidebarOptions {
8981
+ tab: MasterViewTab;
8982
+ masters: readonly PptxSlideMaster[];
8983
+ active: {
8984
+ masterIndex: number;
8985
+ layoutIndex: number | null;
8986
+ };
8987
+ canvasSize: CanvasSize;
8988
+ notesBackground?: string;
8989
+ notesPlaceholders?: readonly {
8990
+ type: string;
8991
+ idx?: string;
8992
+ }[];
8993
+ notesMasterPresent: boolean;
8994
+ handoutBackground?: string;
8995
+ handoutPlaceholders?: readonly {
8996
+ type: string;
8997
+ idx?: string;
8998
+ }[];
8999
+ handoutMasterPresent: boolean;
9000
+ handoutSlidesPerPage: number;
9001
+ renderStage(slide: PptxSlide, scale: number): HTMLElement;
9002
+ onSelect(masterIndex: number, layoutIndex: number | null): void;
9003
+ onTabChange(tab: MasterViewTab): void;
9004
+ onCollapse(): void;
9005
+ onHandoutSlidesPerPageChange(count: number): void;
9006
+ onMasterBackgroundColorChange(color: string): void;
9007
+ }
9008
+ interface MasterViewSidebar {
9009
+ el: HTMLElement;
9010
+ render(options: MasterViewSidebarOptions): void;
9011
+ setVisible(visible: boolean): void;
9012
+ }
9013
+ //#endregion
7819
9014
  //#region src/viewer/ui/ribbon/ribbon-types.d.ts
7820
9015
  /** Draw tab state to reflect (current tool/colour/width). */
7821
9016
  interface RibbonDrawState {
@@ -7841,6 +9036,8 @@ interface RibbonSelectionState {
7841
9036
  slideCount: number;
7842
9037
  selectedCount?: number;
7843
9038
  formatPainterActive?: boolean;
9039
+ selectedElementId?: string;
9040
+ animations?: readonly PptxElementAnimation[];
7844
9041
  }
7845
9042
  //#endregion
7846
9043
  //#region src/viewer/ui/mobile-action-sheets.d.ts
@@ -7898,6 +9095,8 @@ interface Ribbon {
7898
9095
  /** Reflect the current Draw tab tool/colour/width (store-driven). */
7899
9096
  setDrawState(state: RibbonDrawState): void;
7900
9097
  setTemplateEditing(active: boolean): void;
9098
+ setHasMacros(hasMacros: boolean): void;
9099
+ setSubtitlesVisible(visible: boolean): void;
7901
9100
  openEquationEditor(id: string, omml: Record<string, unknown>): void;
7902
9101
  }
7903
9102
  //#endregion
@@ -7915,11 +9114,19 @@ interface StatusBar {
7915
9114
  setDirty(dirty: boolean): void;
7916
9115
  }
7917
9116
  //#endregion
9117
+ //#region src/viewer/ui/thumbnail-sections.d.ts
9118
+ interface ThumbnailSectionActions {
9119
+ toggle(sectionId: string): void;
9120
+ rename(sectionId: string, name: string): void;
9121
+ delete(sectionId: string): void;
9122
+ move(sectionId: string, direction: 'up' | 'down'): void;
9123
+ }
9124
+ //#endregion
7918
9125
  //#region src/viewer/ui/thumbnails.d.ts
7919
9126
  interface ThumbnailRail {
7920
9127
  el: HTMLElement;
7921
9128
  /** Rebuild the rail for a new slide list (uses `renderStage` per slide). */
7922
- render(slides: PptxSlide[], canvasSize: CanvasSize, renderStage: (slide: PptxSlide, scale: number) => HTMLElement): void;
9129
+ render(slides: PptxSlide[], canvasSize: CanvasSize, renderStage: (slide: PptxSlide, scale: number) => HTMLElement, sections?: readonly PptxSection[], sectionActions?: ThumbnailSectionActions): void;
7923
9130
  /** Highlight the active slide and scroll it into view. */
7924
9131
  setActive(index: number): void;
7925
9132
  /** Show or hide the rail. */
@@ -7958,6 +9165,8 @@ interface ViewerChrome {
7958
9165
  inspector: Inspector | null;
7959
9166
  /** Cross-slide accessibility checker results, opened from the View ribbon. */
7960
9167
  accessibility: AccessibilityPanel;
9168
+ /** Dedicated Slide/Notes/Handout master workspace navigation. */
9169
+ masterSidebar: MasterViewSidebar;
7961
9170
  thumbnails: ThumbnailRail | null;
7962
9171
  /** Scrollable centring viewport around the stage. */
7963
9172
  viewport: HTMLElement;
@@ -8009,6 +9218,9 @@ interface EditorController {
8009
9218
  deleteSelected(): void;
8010
9219
  duplicateSelected(): string | null;
8011
9220
  getSelectedElementId(): string | null;
9221
+ selectElements(ids: string[]): void;
9222
+ applyElementPatch(id: string, patch: Partial<PptxElement>): void;
9223
+ commitSlides(slides: PptxSlide[], currentSlide?: number): void;
8012
9224
  /** Switch the Draw ribbon tab's active tool (also clears selection when leaving `'select'`). */
8013
9225
  setDrawTool(tool: DrawTool): void;
8014
9226
  /** Set the pen/highlighter stroke colour used by the next committed stroke. */
@@ -8020,7 +9232,14 @@ interface EditorController {
8020
9232
  /** The Find & Replace actions for the ribbon's docked panel. */
8021
9233
  getFindReplaceActions(): FindReplaceActions;
8022
9234
  commitNotes(notes: string, notesSegments?: TextSegment[]): void;
8023
- save(): Promise<Uint8Array>;
9235
+ setHandoutSlidesPerPage(count: number): void;
9236
+ updateDocumentProperties(core: PptxCoreProperties, app: PptxAppProperties, custom: PptxCustomProperty[]): void;
9237
+ updatePresentationProperties(value: PptxPresentationProperties): void;
9238
+ updateHeaderFooter(value: PptxHeaderFooter): void;
9239
+ updateCustomShows(value: PptxCustomShow[]): void;
9240
+ save(format?: PptxSaveFormat): Promise<Uint8Array>;
9241
+ downloadAs(format: PptxSaveFormat, fileName?: string): Promise<void>;
9242
+ packageForSharing(fileName?: string): Promise<void>;
8024
9243
  downloadPptx(fileName?: string): Promise<void>;
8025
9244
  destroy(): void;
8026
9245
  }
@@ -8039,6 +9258,8 @@ interface SyncStageParams {
8039
9258
  slideIndex: number;
8040
9259
  /** True only when the live (fullscreen) presentation stage is active. */
8041
9260
  presenting: boolean;
9261
+ /** Presentation-level switch parsed from `p:showPr`. */
9262
+ showWithAnimation?: boolean;
8042
9263
  }
8043
9264
  /**
8044
9265
  * The presentation-mode playback state machine for the vanilla binding.
@@ -8086,6 +9307,12 @@ interface ElementRenderContext {
8086
9307
  readonly document: Document;
8087
9308
  /** The slide being rendered. */
8088
9309
  readonly slide: PptxSlide;
9310
+ /** Full deck, used by Zoom elements to resolve their target preview. */
9311
+ readonly slides?: readonly PptxSlide[];
9312
+ /** Zero-based active slide index for Zoom return navigation. */
9313
+ readonly currentSlideIndex?: number;
9314
+ /** Presentation-only Zoom tile activation callback. */
9315
+ readonly onZoomClick?: (targetSlideIndex: number, returnSlideIndex: number) => void;
8089
9316
  /** Full slide canvas size in CSS px (elements are positioned in this space). */
8090
9317
  readonly canvasSize: CanvasSize;
8091
9318
  /**
@@ -8100,6 +9327,7 @@ interface ElementRenderContext {
8100
9327
  readonly colorScheme?: PptxThemeColorScheme;
8101
9328
  /** Parsed `ppt/tableStyles.xml` definitions used by table band/header styling. */
8102
9329
  readonly tableStyleMap?: ParsedTableStyleMap;
9330
+ readonly fieldContext?: FieldSubstitutionContext;
8103
9331
  /** Shared-dictionary translator (`pptx.*` keys). */
8104
9332
  readonly t: Translator;
8105
9333
  /**
@@ -8114,6 +9342,8 @@ interface ElementRenderContext {
8114
9342
  * slideshow behaviour. `false` for the editor canvas and thumbnail rail.
8115
9343
  */
8116
9344
  readonly presenting: boolean;
9345
+ readonly onSmartArtNodeTextChange?: (element: PptxElement, nodeId: string, text: string) => void;
9346
+ readonly onSmartArtNodeFillChange?: (element: PptxElement, nodeId: string, fill: string) => void;
8117
9347
  /** The registry in effect, for renderers that need to inspect it. */
8118
9348
  readonly registry: ElementRendererRegistry;
8119
9349
  /**
@@ -8191,6 +9421,7 @@ interface SlideStageOptions {
8191
9421
  colorScheme?: PptxThemeColorScheme;
8192
9422
  /** Optional parsed table-style definitions for theme-aware table rendering. */
8193
9423
  tableStyleMap?: ParsedTableStyleMap;
9424
+ fieldContext?: FieldSubstitutionContext;
8194
9425
  registry: ElementRendererRegistry;
8195
9426
  t: Translator;
8196
9427
  /** Scale applied via CSS transform (default 1). */
@@ -8199,6 +9430,12 @@ interface SlideStageOptions {
8199
9430
  smartArt3D?: boolean;
8200
9431
  /** True only for the live presentation stage; see `ElementRenderContext.presenting`. */
8201
9432
  presenting?: boolean;
9433
+ /** Full deck and active index used by presentation Zoom elements. */
9434
+ slides?: readonly PptxSlide[];
9435
+ currentSlideIndex?: number;
9436
+ onZoomClick?: (targetSlideIndex: number, returnSlideIndex: number) => void;
9437
+ onSmartArtNodeTextChange?: (element: PptxElement, nodeId: string, text: string) => void;
9438
+ onSmartArtNodeFillChange?: (element: PptxElement, nodeId: string, fill: string) => void;
8202
9439
  /**
8203
9440
  * True only for the main (interactive) canvas, never the thumbnail rail.
8204
9441
  * Marks every rendered element (recursively, including group children) with
@@ -8226,10 +9463,9 @@ declare function renderSlideStage(options: SlideStageOptions): HTMLElement;
8226
9463
  * The registry the viewer uses by default.
8227
9464
  *
8228
9465
  * Dedicated renderers: `text`, `shape`, `image`, `picture`, `group`,
8229
- * `connector`, `table`, `chart`, `smartArt`, `media`, `ink`, `ole`. The
8230
- * remaining types (`contentPart`, `zoom`, `model3d`, `unknown`) fall through
8231
- * to the typed placeholder fallback until their renderers land; see
8232
- * `./README.md` for the contract to add one.
9466
+ * `connector`, `table`, `chart`, `smartArt`, `media`, `ink`, `ole`,
9467
+ * `contentPart`, `zoom`, and `model3d`. Only unknown extension elements fall
9468
+ * through to the typed placeholder fallback.
8233
9469
  */
8234
9470
  declare function createDefaultRegistry(): ElementRendererRegistry;
8235
9471
  //#endregion
@@ -8395,6 +9631,12 @@ interface ExportPdfOptions {
8395
9631
  signal?: AbortSignal;
8396
9632
  }
8397
9633
  //#endregion
9634
+ //#region src/viewer/export/export-svg.d.ts
9635
+ /** Export one parsed slide as resolution-independent SVG markup. */
9636
+ declare function exportSlideToSvg(slide: PptxSlide, width: number, height: number, options?: SvgExportOptions): string;
9637
+ /** Export the selected slides in a parsed presentation as SVG markup. */
9638
+ declare function exportAllSlidesToSvg(data: PptxData, options?: SvgExportOptions): string[];
9639
+ //#endregion
8398
9640
  //#region src/viewer/load/source.d.ts
8399
9641
  /**
8400
9642
  * Content sources accepted by the vanilla viewer: raw bytes, a Blob/File, or
@@ -8442,6 +9684,8 @@ interface PptxViewerOptions extends PptxViewerCallbacks {
8442
9684
  * `loadFile` / `loadUrl` later.
8443
9685
  */
8444
9686
  source?: PptxViewerSource;
9687
+ /** Licensed font sources supplied by the host application. */
9688
+ fonts?: ViewerFontSource[];
8445
9689
  /** Viewer chrome theme (shared `ViewerTheme`: colors, radius, CSS vars). */
8446
9690
  theme?: ViewerTheme;
8447
9691
  /** Display name shown in the PowerPoint-style title bar. */
@@ -8530,7 +9774,7 @@ interface PptxViewerOptions extends PptxViewerCallbacks {
8530
9774
  shareDefaults?: ShareDefaults;
8531
9775
  }
8532
9776
  /** The viewer handle returned by `createPptxViewer`. */
8533
- interface PptxViewerInstance {
9777
+ interface PptxViewerInstance extends PowerPointViewerAPI {
8534
9778
  /** Load a presentation from bytes or a Blob/File (replaces the current one). */
8535
9779
  loadFile(file: Blob | ArrayBuffer | Uint8Array): Promise<void>;
8536
9780
  /** Fetch and load a presentation from a URL. */
@@ -8548,7 +9792,7 @@ interface PptxViewerInstance {
8548
9792
  /** Effective zoom scale (1 = 100%), after fit resolution. */
8549
9793
  getZoom(): number;
8550
9794
  /** Set an explicit zoom scale, or `'fit'` for fit-to-viewport. */
8551
- setZoom(zoom: ZoomLevel): void;
9795
+ setZoom(zoom: number): void;
8552
9796
  zoomIn(): void;
8553
9797
  zoomOut(): void;
8554
9798
  zoomToFit(): void;
@@ -8571,7 +9815,11 @@ interface PptxViewerInstance {
8571
9815
  canUndo(): boolean;
8572
9816
  canRedo(): boolean;
8573
9817
  /** Serialise the (edited) presentation to `.pptx` bytes and clear dirty. */
8574
- save(): Promise<Uint8Array>;
9818
+ save(format?: PptxSaveFormat): Promise<Uint8Array>;
9819
+ /** Save and download a presentation in a supported OpenXML format. */
9820
+ downloadAs(format: PptxSaveFormat, fileName?: string): Promise<void>;
9821
+ /** Bundle the current presentation and usage notes in a shareable ZIP. */
9822
+ packageForSharing(fileName?: string): Promise<void>;
8575
9823
  /** `save()` + trigger a browser download (default `presentation.pptx`). */
8576
9824
  downloadPptx(fileName?: string): Promise<void>;
8577
9825
  /** Delete the selected element (no-op without a selection). */
@@ -8584,6 +9832,8 @@ interface PptxViewerInstance {
8584
9832
  * (dynamically imported), so the first call pays a one-time load cost.
8585
9833
  */
8586
9834
  exportSlidePng(index?: number): Promise<void>;
9835
+ /** Copy a slide to the system clipboard as a PNG image. */
9836
+ copySlideAsImage(index?: number): Promise<void>;
8587
9837
  /**
8588
9838
  * Export every slide as a multi-page PDF download (one slide per page).
8589
9839
  * `jspdf` is dynamically imported on first use.
@@ -8673,21 +9923,47 @@ interface ChromeHost {
8673
9923
  redo(): void;
8674
9924
  toggleAutosave(): boolean;
8675
9925
  downloadPptx(): Promise<void>;
9926
+ downloadAs(format: PptxSaveFormat): Promise<void>;
9927
+ packageForSharing(): Promise<void>;
8676
9928
  toggleNotes(): void;
8677
9929
  goToSlide(index: number): void;
8678
9930
  getSlideCount(): number;
8679
9931
  enterPresentation(): Promise<void>;
9932
+ openPresenterView(): void;
8680
9933
  exitPresentation(): Promise<void>;
8681
9934
  openBroadcast(): void;
9935
+ openShare(): void;
8682
9936
  openAccessibility(): void;
9937
+ openSettings(tab?: 'general' | 'shortcuts'): void;
9938
+ openHeaderFooter(): void;
9939
+ openCompare(): void;
9940
+ openSetUpSlideShow(): void;
9941
+ startRehearsal(): void;
9942
+ toggleSubtitles(): void;
9943
+ openSelectionPane(): void;
9944
+ openSlideSorter(): void;
9945
+ openComments(): void;
9946
+ openHyperlink(): void;
9947
+ openCustomShows(): void;
9948
+ openDocumentProperties(): void;
9949
+ openFontEmbedding(): void;
9950
+ openDigitalSignatures(): void;
9951
+ openPasswordProtection(): void;
9952
+ openVersionHistory(): void;
8683
9953
  toggleTemplateEditing(): void;
8684
9954
  toggleMasterNavigation(): void;
8685
9955
  exportSlidePng(): Promise<void>;
9956
+ copySlideAsImage(): Promise<void>;
8686
9957
  exportPdf(): Promise<void>;
8687
9958
  exportGif(): Promise<void>;
8688
9959
  exportVideo(): Promise<void>;
8689
9960
  print(): Promise<boolean>;
9961
+ openPrintDialog(): void;
9962
+ openFile(): void;
9963
+ openRecentFile(key: string): void;
9964
+ createPresentation(templateId: string): void;
8690
9965
  setTheme(theme: ViewerTheme | undefined): void;
9966
+ applyPresentationTheme(presetId: string): void;
8691
9967
  }
8692
9968
  //#endregion
8693
9969
  //#region src/viewer/export-lifecycle.d.ts
@@ -8695,6 +9971,8 @@ interface ChromeHost {
8695
9971
  interface ViewerExportApi {
8696
9972
  /** Export a single slide as a PNG download. Defaults to the current slide. */
8697
9973
  exportSlidePng(index?: number): Promise<void>;
9974
+ /** Copy a slide to the system clipboard as a PNG image. */
9975
+ copySlideAsImage(index?: number): Promise<void>;
8698
9976
  /** Export every slide as a multi-page PDF download (one slide per page). */
8699
9977
  exportPdf(options?: ExportPdfOptions): Promise<void>;
8700
9978
  /** Export every slide as an animated GIF download (one frame per slide). */
@@ -8717,6 +9995,7 @@ interface ExportLifecycle extends ViewerExportApi {
8717
9995
  declare abstract class ViewerExportHost implements ViewerExportApi {
8718
9996
  protected abstract readonly exporter: ExportLifecycle;
8719
9997
  exportSlidePng(index?: number): Promise<void>;
9998
+ copySlideAsImage(index?: number): Promise<void>;
8720
9999
  exportPdf(options?: ExportPdfOptions): Promise<void>;
8721
10000
  exportGif(options?: ExportGifOptions): Promise<void>;
8722
10001
  exportVideo(options?: ExportVideoOptions): Promise<void>;
@@ -8744,8 +10023,23 @@ declare class PptxViewer extends ViewerExportHost implements PptxViewerInstance,
8744
10023
  private readonly sessions;
8745
10024
  private readonly controls;
8746
10025
  private destroyed;
10026
+ private presenterChannel;
10027
+ private audienceWindow;
10028
+ private presenterSessionId;
10029
+ private presenterSequence;
10030
+ private presenterSnapshot;
10031
+ private disposePresenterConsole;
10032
+ private userFontsStyle;
10033
+ private embedFontsEnabled;
10034
+ private signatureWarningAcknowledged;
10035
+ private detachSignatureWarning;
10036
+ private annotations;
10037
+ private parityWorkflows;
8747
10038
  constructor(container: HTMLElement, options?: PptxViewerOptions);
8748
10039
  loadFile(file: Blob | ArrayBuffer | Uint8Array): Promise<void>;
10040
+ openFile(): void;
10041
+ openRecentFile(key: string): void;
10042
+ createPresentation(templateId: string): void;
8749
10043
  loadUrl(url: string): Promise<void>;
8750
10044
  next: () => void;
8751
10045
  prev: () => void;
@@ -8753,15 +10047,69 @@ declare class PptxViewer extends ViewerExportHost implements PptxViewerInstance,
8753
10047
  getSlideCount: () => number;
8754
10048
  getCurrentSlide: () => number;
8755
10049
  getZoom: () => number;
8756
- setZoom(zoom: ZoomLevel): void;
10050
+ setZoom(zoom: number): void;
8757
10051
  zoomIn: () => void;
8758
10052
  zoomOut: () => void;
8759
10053
  zoomToFit: () => void;
10054
+ zoomReset: () => void;
10055
+ goTo: (index: number) => void;
10056
+ goPrev: () => void;
10057
+ goNext: () => void;
10058
+ getContent: () => Promise<Uint8Array>;
10059
+ getMode: () => ViewerMode;
10060
+ setMode: (mode: ViewerMode) => void;
10061
+ getActiveSlideIndex: () => number;
10062
+ setActiveSlideIndex: (index: number) => void;
10063
+ isDirty: () => boolean;
10064
+ getSlides: () => readonly PptxSlide[];
10065
+ getSlide: (index: number) => PptxSlide | undefined;
10066
+ getActiveSlide: () => PptxSlide | undefined;
10067
+ getElements: (index?: number) => readonly PptxElement[];
10068
+ getElementById: (id: string, index?: number) => PptxElement | undefined;
10069
+ updateElement: (id: string, updates: Partial<PptxElement>) => void;
10070
+ deleteElements: (ids: string[]) => void;
10071
+ duplicateElement: (id: string) => string | undefined;
10072
+ getSelectedElementIds: () => string[];
10073
+ selectElements: (ids: string[]) => void;
10074
+ clearSelection: () => void;
10075
+ addSlide: (afterIndex?: number) => void;
10076
+ deleteSlides: (indexes: number[]) => void;
10077
+ duplicateSlides: (indexes: number[]) => void;
10078
+ moveSlide: (fromIndex: number, toIndex: number) => void;
10079
+ toggleHideSlides: (indexes: number[]) => void;
10080
+ private renumber;
8760
10081
  /** Expand/collapse the speaker-notes panel; persists for the instance's life. */
8761
10082
  toggleNotes(): void;
8762
10083
  setTheme(theme: ViewerTheme | undefined): void;
10084
+ applyPresentationTheme(presetId: string): void;
8763
10085
  /** Run the shared WCAG checks against the live deck and show the results. */
8764
10086
  openAccessibility(): void;
10087
+ openSettings(tab?: 'general' | 'shortcuts'): void;
10088
+ openSetUpSlideShow(): void;
10089
+ toggleSubtitles(): void;
10090
+ openHeaderFooter(): void;
10091
+ openCompare(): void;
10092
+ openPrintDialog(): void;
10093
+ startRehearsal(): void;
10094
+ openSelectionPane(): void;
10095
+ openSlideSorter(): void;
10096
+ openComments(): void;
10097
+ openHyperlink(): void;
10098
+ openCustomShows(): void;
10099
+ /** Open the document metadata editor backed by the current loaded deck. */
10100
+ openDocumentProperties(): void;
10101
+ openFontEmbedding(): void;
10102
+ openDigitalSignatures(): void;
10103
+ openPasswordProtection(): void;
10104
+ openVersionHistory(): void;
10105
+ /** Open a clean audience display while retaining this editor as the presenter surface. */
10106
+ openPresenterView(): void;
10107
+ private getPresenterChannel;
10108
+ private isAudienceWindowOpen;
10109
+ private syncAudience;
10110
+ private updatePresenterSnapshot;
10111
+ private connectAudienceRole;
10112
+ private closeAudienceWindow;
8765
10113
  setLocale(locale: string): void;
8766
10114
  setEditable(editable: boolean): void;
8767
10115
  setEditTemplateMode(enabled: boolean): void;
@@ -8772,8 +10120,10 @@ declare class PptxViewer extends ViewerExportHost implements PptxViewerInstance,
8772
10120
  toggleAutosave(): boolean;
8773
10121
  canUndo: () => boolean;
8774
10122
  canRedo: () => boolean;
8775
- save(): Promise<Uint8Array>;
10123
+ save(format?: PptxSaveFormat): Promise<Uint8Array>;
10124
+ downloadAs(format: PptxSaveFormat, fileName?: string): Promise<void>;
8776
10125
  downloadPptx(fileName?: string): Promise<void>;
10126
+ packageForSharing(fileName?: string): Promise<void>;
8777
10127
  deleteSelected: () => void;
8778
10128
  getSelectedElementId: () => string | null;
8779
10129
  enterPresentation(): Promise<void>;
@@ -8787,6 +10137,7 @@ declare class PptxViewer extends ViewerExportHost implements PptxViewerInstance,
8787
10137
  setAutosaveEnabled(enabled: boolean): void;
8788
10138
  isAutosaveEnabled: () => boolean;
8789
10139
  openBroadcast(): void;
10140
+ openShare(): void;
8790
10141
  destroy(): void;
8791
10142
  private remountChrome;
8792
10143
  }
@@ -8822,5 +10173,5 @@ type TranslationKey = keyof typeof translationsEn;
8822
10173
  */
8823
10174
  declare function keyToLabel(key: string): string;
8824
10175
  //#endregion
8825
- export { type AutosaveRecord, type AutosaveStatus, type CollaborationConfig, type CollaborationRole, type CollaborationTransport, type ConnectionStatus, type CssStyleMap, type ElementRenderContext, type ElementRenderer, type ElementRendererRegistry, type ExportGifOptions, type ExportPdfOptions, type ExportProgress, type ExportVideoOptions, type OpenPrintWindow, type PptxElement, type PptxElementType, type PptxHandler, type PptxSlide, PptxViewer, type PptxViewerCallbacks, type PptxViewerInstance, type PptxViewerOptions, type PptxViewerSource, type PrintOptions, type SlideStageOptions, type TranslationKey, type TranslationMessages, type Translator, type ViewerState, type ViewerTheme, type ViewerThemeColors, type ZoomLevel, applyStyleMap, createDefaultRegistry, createEl, createElementRendererRegistry, createPptxViewer, createSvgEl, createTranslator, defaultCssVars, defaultRadius, defaultThemeColors, getViewerCss, keyToLabel, renderSlideStage, themeToCssVars, translationsEn, vermilionDarkTheme, vermilionLightTheme };
10176
+ export { type AutosaveRecord, type AutosaveStatus, type CollaborationConfig, type CollaborationRole, type CollaborationTransport, type ConnectionStatus, type CssStyleMap, type ElementRenderContext, type ElementRenderer, type ElementRendererRegistry, type ExportGifOptions, type ExportPdfOptions, type ExportProgress, type ExportVideoOptions, type OpenPrintWindow, type PptxElement, type PptxElementType, type PptxHandler, type PptxSlide, PptxViewer, type PptxViewerCallbacks, type PptxViewerInstance, type PptxViewerOptions, type PptxViewerSource, type PrintOptions, type SlideStageOptions, type SvgExportOptions, type TranslationKey, type TranslationMessages, type Translator, type ViewerState, type ViewerTheme, type ViewerThemeColors, type ZoomLevel, applyStyleMap, createDefaultRegistry, createEl, createElementRendererRegistry, createPptxViewer, createSvgEl, createTranslator, defaultCssVars, defaultRadius, defaultThemeColors, exportAllSlidesToSvg, exportSlideToSvg, getViewerCss, keyToLabel, loadPresentationDeck, parsePresentationSessionId, renderSlideStage, themeToCssVars, translationsEn, vermilionDarkTheme, vermilionLightTheme };
8826
10177
  //# sourceMappingURL=index.d.ts.map