pptx-vanilla-viewer 0.7.0 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +2 -0
- package/README.md +2 -2
- package/dist/chunk-AB4ASXBV.js +361 -0
- package/dist/chunk-T4UDC7PL.cjs +361 -0
- package/dist/dist-6AOZ42CA.cjs +1 -0
- package/dist/dist-HLWFTYQH.js +1 -0
- package/dist/index.cjs +150 -338
- package/dist/index.d.ts +658 -140
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +150 -338
- package/dist/smartart-3d-2R6SFYL3.cjs +1 -0
- package/dist/smartart-3d-FTALYBDI.js +1 -0
- package/dist/styles.css +64 -0
- package/package.json +1 -1
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-
|
|
4
|
+
//#region ../core/dist/presentation-BAMjUmQZ.d.ts
|
|
5
5
|
/**
|
|
6
6
|
* Action types: hyperlinks, slide jumps, macros, and action buttons.
|
|
7
7
|
*
|
|
@@ -596,6 +596,10 @@ interface Text3DStyle {
|
|
|
596
596
|
interface Pptx3DScene {
|
|
597
597
|
/** Camera preset type, e.g. "orthographicFront", "perspectiveFront". */
|
|
598
598
|
cameraPreset?: string;
|
|
599
|
+
/** Camera field of view in 1/60000 degrees (`a:camera/@fov`). */
|
|
600
|
+
cameraFieldOfView?: number;
|
|
601
|
+
/** Camera zoom as an OOXML percentage fraction (`a:camera/@zoom`, 1 = 100%). */
|
|
602
|
+
cameraZoom?: number;
|
|
599
603
|
/** Camera rotation around X axis in 1/60000 degrees. */
|
|
600
604
|
cameraRotX?: number;
|
|
601
605
|
/** Camera rotation around Y axis in 1/60000 degrees. */
|
|
@@ -606,6 +610,12 @@ interface Pptx3DScene {
|
|
|
606
610
|
lightRigType?: string;
|
|
607
611
|
/** Light rig direction, e.g. "t", "b", "l", "r", "tl". */
|
|
608
612
|
lightRigDirection?: string;
|
|
613
|
+
/** Light-rig rotation latitude in 1/60000 degrees. */
|
|
614
|
+
lightRigRotX?: number;
|
|
615
|
+
/** Light-rig rotation longitude in 1/60000 degrees. */
|
|
616
|
+
lightRigRotY?: number;
|
|
617
|
+
/** Light-rig rotation revolution in 1/60000 degrees. */
|
|
618
|
+
lightRigRotZ?: number;
|
|
609
619
|
/** Whether a 3D backdrop plane is present (`a:backdrop`). */
|
|
610
620
|
hasBackdrop?: boolean;
|
|
611
621
|
/** Backdrop plane anchor X in EMU. */
|
|
@@ -614,6 +624,18 @@ interface Pptx3DScene {
|
|
|
614
624
|
backdropAnchorY?: number;
|
|
615
625
|
/** Backdrop plane anchor Z in EMU. */
|
|
616
626
|
backdropAnchorZ?: number;
|
|
627
|
+
/** Backdrop normal vector X component. */
|
|
628
|
+
backdropNormalX?: number;
|
|
629
|
+
/** Backdrop normal vector Y component. */
|
|
630
|
+
backdropNormalY?: number;
|
|
631
|
+
/** Backdrop normal vector Z component. */
|
|
632
|
+
backdropNormalZ?: number;
|
|
633
|
+
/** Backdrop up vector X component. */
|
|
634
|
+
backdropUpX?: number;
|
|
635
|
+
/** Backdrop up vector Y component. */
|
|
636
|
+
backdropUpY?: number;
|
|
637
|
+
/** Backdrop up vector Z component. */
|
|
638
|
+
backdropUpZ?: number;
|
|
617
639
|
}
|
|
618
640
|
/**
|
|
619
641
|
* 3D shape extrusion/bevel from `a:sp3d`.
|
|
@@ -731,9 +753,13 @@ interface ShapeStyle {
|
|
|
731
753
|
*/
|
|
732
754
|
fillColorXml?: XmlObject;
|
|
733
755
|
fillGradient?: string;
|
|
756
|
+
/** Original `gradFill` XML retained for unknown-child and extension round-tripping. */
|
|
757
|
+
fillGradientXml?: XmlObject;
|
|
734
758
|
fillMode?: 'solid' | 'gradient' | 'pattern' | 'none' | 'image' | 'theme' | 'group';
|
|
735
759
|
fillPatternPreset?: string;
|
|
736
760
|
fillPatternBackgroundColor?: string;
|
|
761
|
+
/** Original `pattFill` XML retained for unknown-child round-tripping. */
|
|
762
|
+
fillPatternXml?: XmlObject;
|
|
737
763
|
/** Raw XML node for pattern fill foreground colour (preserves color transforms). */
|
|
738
764
|
fillPatternFgClrXml?: XmlObject;
|
|
739
765
|
/** Raw XML node for pattern fill background colour (preserves color transforms). */
|
|
@@ -799,6 +825,14 @@ interface ShapeStyle {
|
|
|
799
825
|
/** Pen line alignment (`a:ln/@algn`): `ctr` (centre, default) or `in` (inside). */
|
|
800
826
|
lineAlignment?: 'ctr' | 'in';
|
|
801
827
|
shadowColor?: string;
|
|
828
|
+
/** Preserved source `a:effectLst`, including unknown effects and extensions. */
|
|
829
|
+
effectListXml?: XmlObject;
|
|
830
|
+
/** Original outer-shadow node used for lossless surgical updates. */
|
|
831
|
+
outerShadowXml?: XmlObject;
|
|
832
|
+
/** Resolved source shadow colour used to detect colour edits. */
|
|
833
|
+
outerShadowOriginalColor?: string;
|
|
834
|
+
/** Source shadow opacity used to detect alpha edits. */
|
|
835
|
+
outerShadowOriginalOpacity?: number;
|
|
802
836
|
shadowBlur?: number;
|
|
803
837
|
shadowOffsetX?: number;
|
|
804
838
|
shadowOffsetY?: number;
|
|
@@ -842,11 +876,23 @@ interface ShapeStyle {
|
|
|
842
876
|
/** Multiple shadow layers (for advanced effects). */
|
|
843
877
|
shadows?: ShadowEffect[];
|
|
844
878
|
glowColor?: string;
|
|
879
|
+
/** Original glow node used for lossless surgical updates. */
|
|
880
|
+
glowXml?: XmlObject;
|
|
881
|
+
/** Resolved source glow colour used to detect colour edits. */
|
|
882
|
+
glowOriginalColor?: string;
|
|
883
|
+
/** Source glow opacity used to detect alpha edits. */
|
|
884
|
+
glowOriginalOpacity?: number;
|
|
845
885
|
glowRadius?: number;
|
|
846
886
|
glowOpacity?: number;
|
|
847
887
|
softEdgeRadius?: number;
|
|
848
888
|
/** Inner shadow colour (`a:innerShdw`). */
|
|
849
889
|
innerShadowColor?: string;
|
|
890
|
+
/** Original inner-shadow node used for lossless surgical updates. */
|
|
891
|
+
innerShadowXml?: XmlObject;
|
|
892
|
+
/** Resolved source inner-shadow colour used to detect colour edits. */
|
|
893
|
+
innerShadowOriginalColor?: string;
|
|
894
|
+
/** Source inner-shadow opacity used to detect alpha edits. */
|
|
895
|
+
innerShadowOriginalOpacity?: number;
|
|
850
896
|
/** Inner shadow opacity (0-1). */
|
|
851
897
|
innerShadowOpacity?: number;
|
|
852
898
|
/** Inner shadow blur radius in px. */
|
|
@@ -855,8 +901,12 @@ interface ShapeStyle {
|
|
|
855
901
|
innerShadowOffsetX?: number;
|
|
856
902
|
/** Inner shadow vertical offset in px. */
|
|
857
903
|
innerShadowOffsetY?: number;
|
|
904
|
+
/** Original soft-edge node, including vendor attributes and extensions. */
|
|
905
|
+
softEdgeXml?: XmlObject;
|
|
858
906
|
/** Reflection effect — distance from shape bottom in px. */
|
|
859
907
|
reflectionBlurRadius?: number;
|
|
908
|
+
/** Original reflection node, including vendor attributes and extensions. */
|
|
909
|
+
reflectionXml?: XmlObject;
|
|
860
910
|
/** Reflection start opacity (0-1). */
|
|
861
911
|
reflectionStartOpacity?: number;
|
|
862
912
|
/** Reflection end opacity (0-1). */
|
|
@@ -1350,6 +1400,8 @@ interface TextStyle {
|
|
|
1350
1400
|
text3d?: Text3DStyle;
|
|
1351
1401
|
/** 3D scene (camera + light rig) settings on the text body (`a:bodyPr/a:scene3d`). */
|
|
1352
1402
|
textBodyScene3d?: Pptx3DScene;
|
|
1403
|
+
/** Raw `a:scene3d` subtree used to preserve extensions and unmodelled children. */
|
|
1404
|
+
textBodyScene3dXml?: XmlObject;
|
|
1353
1405
|
/**
|
|
1354
1406
|
* Raw `<a:extLst>` subtree captured from `<a:bodyPr>`. Preserved verbatim so
|
|
1355
1407
|
* authored extensions (e.g. content placeholders, custom application data)
|
|
@@ -1723,6 +1775,24 @@ interface PlaceholderTextLevelStyle {
|
|
|
1723
1775
|
spaceBefore?: number;
|
|
1724
1776
|
spaceAfter?: number;
|
|
1725
1777
|
}
|
|
1778
|
+
/** Tick-mark placement from ChartML `ST_TickMark`. */
|
|
1779
|
+
type PptxChartTickMark = 'cross' | 'in' | 'none' | 'out';
|
|
1780
|
+
/** Typed axis tick and category/date label controls. */
|
|
1781
|
+
interface PptxChartAxisLabelFormatting {
|
|
1782
|
+
/** Primary and secondary tick-mark placement. */
|
|
1783
|
+
majorTickMark?: PptxChartTickMark;
|
|
1784
|
+
minorTickMark?: PptxChartTickMark;
|
|
1785
|
+
/** Tick-label position from ChartML `ST_TickLblPos`. */
|
|
1786
|
+
tickLblPos?: 'high' | 'low' | 'nextTo' | 'none';
|
|
1787
|
+
/** Automatic category/date axis behavior (`c:auto`). */
|
|
1788
|
+
auto?: boolean;
|
|
1789
|
+
/** Category-axis label alignment (`c:lblAlgn`). */
|
|
1790
|
+
labelAlignment?: 'ctr' | 'l' | 'r';
|
|
1791
|
+
/** Category/date label distance, from 0 through 1000 percent. */
|
|
1792
|
+
labelOffset?: number;
|
|
1793
|
+
/** Suppress multi-level category labels (`c:noMultiLvlLbl`). */
|
|
1794
|
+
noMultiLevelLabels?: boolean;
|
|
1795
|
+
}
|
|
1726
1796
|
/**
|
|
1727
1797
|
* Chart types: chart categories, series data, style metadata, data tables,
|
|
1728
1798
|
* trendlines, error bars, and the composite `PptxChartData`.
|
|
@@ -1765,6 +1835,7 @@ type PptxChartTrendlineType = 'linear' | 'exponential' | 'logarithmic' | 'polyno
|
|
|
1765
1835
|
*/
|
|
1766
1836
|
interface PptxChartTrendline {
|
|
1767
1837
|
trendlineType: PptxChartTrendlineType;
|
|
1838
|
+
name?: string;
|
|
1768
1839
|
order?: number;
|
|
1769
1840
|
period?: number;
|
|
1770
1841
|
forward?: number;
|
|
@@ -1773,6 +1844,13 @@ interface PptxChartTrendline {
|
|
|
1773
1844
|
displayRSq?: boolean;
|
|
1774
1845
|
displayEq?: boolean;
|
|
1775
1846
|
color?: string;
|
|
1847
|
+
label?: PptxChartTrendlineLabel | null;
|
|
1848
|
+
}
|
|
1849
|
+
/** Typed, commonly edited properties of `c:trendlineLbl`. */
|
|
1850
|
+
interface PptxChartTrendlineLabel {
|
|
1851
|
+
layout?: PptxChartManualLayout;
|
|
1852
|
+
numberFormatCode?: string;
|
|
1853
|
+
sourceLinked?: boolean;
|
|
1776
1854
|
}
|
|
1777
1855
|
/** Error-bar direction axis. */
|
|
1778
1856
|
type PptxChartErrBarDir = 'x' | 'y';
|
|
@@ -1809,6 +1887,8 @@ interface PptxChartErrBars {
|
|
|
1809
1887
|
val?: number;
|
|
1810
1888
|
customPlus?: number[];
|
|
1811
1889
|
customMinus?: number[];
|
|
1890
|
+
noEndCap?: boolean;
|
|
1891
|
+
color?: string;
|
|
1812
1892
|
}
|
|
1813
1893
|
/**
|
|
1814
1894
|
* Visibility flags for the chart data table (axes + legend keys).
|
|
@@ -1858,6 +1938,13 @@ interface PptxChartShapeProps {
|
|
|
1858
1938
|
/** Line dash style (a:prstDash/@val), e.g. 'solid', 'dash', 'dot', 'lgDash'. */
|
|
1859
1939
|
strokeDashStyle?: string;
|
|
1860
1940
|
}
|
|
1941
|
+
/** Up/down bar formatting on line and stock charts (`c:upDownBars`). */
|
|
1942
|
+
interface PptxChartUpDownBars {
|
|
1943
|
+
/** Gap between bars as a percentage, constrained to 0 through 500. */
|
|
1944
|
+
gapWidth?: number;
|
|
1945
|
+
upBars?: PptxChartShapeProps;
|
|
1946
|
+
downBars?: PptxChartShapeProps;
|
|
1947
|
+
}
|
|
1861
1948
|
/** Marker appearance on a chart series or data point. */
|
|
1862
1949
|
interface PptxChartMarker {
|
|
1863
1950
|
symbol: PptxChartMarkerSymbol;
|
|
@@ -1872,25 +1959,40 @@ interface PptxChartDataPoint {
|
|
|
1872
1959
|
invertIfNegative?: boolean;
|
|
1873
1960
|
marker?: PptxChartMarker;
|
|
1874
1961
|
}
|
|
1962
|
+
/** Schema values accepted by `c:dLblPos`. */
|
|
1963
|
+
type PptxChartDataLabelPosition = 'bestFit' | 'b' | 'ctr' | 'inBase' | 'inEnd' | 'l' | 'outEnd' | 'r' | 't';
|
|
1875
1964
|
/** Individual data label override (c:dLbl). */
|
|
1876
1965
|
interface PptxChartDataLabel {
|
|
1877
1966
|
idx: number;
|
|
1967
|
+
/** Suppress this data point's automatically generated label. */
|
|
1968
|
+
deleted?: boolean;
|
|
1878
1969
|
showVal?: boolean;
|
|
1879
1970
|
showCatName?: boolean;
|
|
1880
1971
|
showSerName?: boolean;
|
|
1881
1972
|
showPercent?: boolean;
|
|
1882
1973
|
showLegendKey?: boolean;
|
|
1883
1974
|
showBubbleSize?: boolean;
|
|
1884
|
-
position?:
|
|
1975
|
+
position?: PptxChartDataLabelPosition;
|
|
1885
1976
|
text?: string;
|
|
1977
|
+
separator?: string;
|
|
1978
|
+
showLeaderLines?: boolean;
|
|
1886
1979
|
}
|
|
1887
1980
|
/** Axis number format. */
|
|
1888
1981
|
interface PptxChartAxisNumFmt {
|
|
1889
1982
|
formatCode: string;
|
|
1890
1983
|
sourceLinked?: boolean;
|
|
1891
1984
|
}
|
|
1985
|
+
/** Typed contents of a value-axis display-unit label (`c:dispUnitsLbl`). */
|
|
1986
|
+
interface PptxChartDisplayUnitsLabel {
|
|
1987
|
+
/** Literal label text. Omit to preserve the source text subtree. */
|
|
1988
|
+
text?: string;
|
|
1989
|
+
/** Manual label placement. `null` removes only the manual layout. */
|
|
1990
|
+
layout?: PptxChartManualLayout | null;
|
|
1991
|
+
/** Label shape formatting. `null` removes `c:spPr`. */
|
|
1992
|
+
spPr?: PptxChartShapeProps | null;
|
|
1993
|
+
}
|
|
1892
1994
|
/** Axis formatting for category, value, or date axes. */
|
|
1893
|
-
interface PptxChartAxisFormatting {
|
|
1995
|
+
interface PptxChartAxisFormatting extends PptxChartAxisLabelFormatting {
|
|
1894
1996
|
axisType: 'catAx' | 'valAx' | 'dateAx' | 'serAx';
|
|
1895
1997
|
/** Axis position: "b" (bottom), "l" (left), "r" (right), "t" (top). */
|
|
1896
1998
|
axPos?: 'b' | 'l' | 'r' | 't';
|
|
@@ -1924,8 +2026,12 @@ interface PptxChartAxisFormatting {
|
|
|
1924
2026
|
displayUnits?: 'hundreds' | 'thousands' | 'tenThousands' | 'hundredThousands' | 'millions' | 'tenMillions' | 'hundredMillions' | 'billions' | 'trillions' | 'custom';
|
|
1925
2027
|
/** Custom display unit divisor value (c:dispUnits/c:custUnit/@val). Only used when displayUnits is 'custom'. */
|
|
1926
2028
|
displayUnitsValue?: number;
|
|
1927
|
-
/**
|
|
1928
|
-
|
|
2029
|
+
/**
|
|
2030
|
+
* Display-unit label contents (`c:dispUnits/c:dispUnitsLbl`). A string is
|
|
2031
|
+
* retained as a compatibility shorthand for `{ text: string }`; `null`
|
|
2032
|
+
* explicitly removes the label.
|
|
2033
|
+
*/
|
|
2034
|
+
displayUnitsLabel?: string | PptxChartDisplayUnitsLabel | null;
|
|
1929
2035
|
/** Whether logarithmic scaling is enabled (presence of c:scaling/c:logBase). */
|
|
1930
2036
|
logScale?: boolean;
|
|
1931
2037
|
/** Logarithmic base value (c:scaling/c:logBase/@val), typically 10 or e. */
|
|
@@ -1934,8 +2040,6 @@ interface PptxChartAxisFormatting {
|
|
|
1934
2040
|
majorUnit?: number;
|
|
1935
2041
|
/** Minor-unit interval between secondary tick marks (c:minorUnit/@val). */
|
|
1936
2042
|
minorUnit?: number;
|
|
1937
|
-
/** Tick-label position (c:tickLblPos/@val): 'high', 'low', 'nextTo', or 'none'. */
|
|
1938
|
-
tickLblPos?: 'high' | 'low' | 'nextTo' | 'none';
|
|
1939
2043
|
}
|
|
1940
2044
|
/** 3D wall or floor element formatting. */
|
|
1941
2045
|
interface PptxChart3DSurface {
|
|
@@ -1994,12 +2098,32 @@ interface PptxChartDataLabelOptions {
|
|
|
1994
2098
|
showPercent?: boolean;
|
|
1995
2099
|
/** Show the legend key swatch (`c:showLegendKey`). */
|
|
1996
2100
|
showLegendKey?: boolean;
|
|
2101
|
+
/** Show bubble size (`c:showBubbleSize`). */
|
|
2102
|
+
showBubbleSize?: boolean;
|
|
2103
|
+
/** Text placed between combined label components (`c:separator`). */
|
|
2104
|
+
separator?: string;
|
|
2105
|
+
/** Show leader lines where supported (`c:showLeaderLines`). */
|
|
2106
|
+
showLeaderLines?: boolean;
|
|
1997
2107
|
/**
|
|
1998
2108
|
* Label position (`c:dLblPos`). Valid values depend on the chart type
|
|
1999
2109
|
* (`ctr`, `inEnd`, `inBase`, `outEnd`, `bestFit`, `l`, `r`, `t`, `b`).
|
|
2000
2110
|
* Omit to let PowerPoint use the type default.
|
|
2001
2111
|
*/
|
|
2002
|
-
position?:
|
|
2112
|
+
position?: PptxChartDataLabelPosition;
|
|
2113
|
+
}
|
|
2114
|
+
/** Typed text defaults for a single chart legend entry. */
|
|
2115
|
+
interface PptxChartLegendTextStyle {
|
|
2116
|
+
fontFamily?: string;
|
|
2117
|
+
fontSize?: number;
|
|
2118
|
+
bold?: boolean;
|
|
2119
|
+
italic?: boolean;
|
|
2120
|
+
color?: string;
|
|
2121
|
+
}
|
|
2122
|
+
/** Per-series legend entry override (`c:legendEntry`). */
|
|
2123
|
+
interface PptxChartLegendEntry {
|
|
2124
|
+
index: number;
|
|
2125
|
+
deleted?: boolean;
|
|
2126
|
+
textStyle?: PptxChartLegendTextStyle;
|
|
2003
2127
|
}
|
|
2004
2128
|
/**
|
|
2005
2129
|
* Style / formatting metadata for a chart.
|
|
@@ -2022,6 +2146,8 @@ interface PptxChartStyle {
|
|
|
2022
2146
|
hasLegend?: boolean;
|
|
2023
2147
|
/** Legend position (t, b, l, r, tr). */
|
|
2024
2148
|
legendPosition?: string;
|
|
2149
|
+
/** Per-series visibility and text-style overrides. */
|
|
2150
|
+
legendEntries?: PptxChartLegendEntry[];
|
|
2025
2151
|
/** Whether the chart has a title. */
|
|
2026
2152
|
hasTitle?: boolean;
|
|
2027
2153
|
/** Whether gridlines are visible. */
|
|
@@ -2082,6 +2208,14 @@ interface PptxChartOfPieOptions {
|
|
|
2082
2208
|
serLines?: boolean;
|
|
2083
2209
|
gapWidth?: number;
|
|
2084
2210
|
}
|
|
2211
|
+
/** Classic `c:bubbleChart` options from CT_BubbleChart. */
|
|
2212
|
+
interface PptxBubbleChartOptions {
|
|
2213
|
+
bubble3D?: boolean;
|
|
2214
|
+
/** Bubble diameter scale in percent, constrained to 0 through 300. */
|
|
2215
|
+
bubbleScale?: number;
|
|
2216
|
+
showNegativeBubbles?: boolean;
|
|
2217
|
+
sizeRepresents?: 'area' | 'w';
|
|
2218
|
+
}
|
|
2085
2219
|
/**
|
|
2086
2220
|
* 3D viewing parameters for a chart (`c:view3D`, ECMA-376 §21.2.2.228 /
|
|
2087
2221
|
* CT_View3D).
|
|
@@ -2122,6 +2256,27 @@ interface PptxChartChrome {
|
|
|
2122
2256
|
dispBlanksAs?: 'gap' | 'zero' | 'span';
|
|
2123
2257
|
showDLblsOverMax?: boolean;
|
|
2124
2258
|
}
|
|
2259
|
+
/** Manual chart placement from `c:layout/c:manualLayout` (CT_ManualLayout). */
|
|
2260
|
+
interface PptxChartManualLayout {
|
|
2261
|
+
layoutTarget?: 'inner' | 'outer';
|
|
2262
|
+
xMode?: 'edge' | 'factor';
|
|
2263
|
+
yMode?: 'edge' | 'factor';
|
|
2264
|
+
widthMode?: 'edge' | 'factor';
|
|
2265
|
+
heightMode?: 'edge' | 'factor';
|
|
2266
|
+
x?: number;
|
|
2267
|
+
y?: number;
|
|
2268
|
+
width?: number;
|
|
2269
|
+
height?: number;
|
|
2270
|
+
}
|
|
2271
|
+
/**
|
|
2272
|
+
* Typed manual layouts for chart regions that accept `c:layout`.
|
|
2273
|
+
* A `null` region removes its manual layout without removing extensions.
|
|
2274
|
+
*/
|
|
2275
|
+
interface PptxChartLayouts {
|
|
2276
|
+
title?: PptxChartManualLayout | null;
|
|
2277
|
+
plotArea?: PptxChartManualLayout | null;
|
|
2278
|
+
legend?: PptxChartManualLayout | null;
|
|
2279
|
+
}
|
|
2125
2280
|
/** Parsed data extracted from an embedded xlsx workbook. */
|
|
2126
2281
|
interface PptxEmbeddedWorkbookData {
|
|
2127
2282
|
/** Category labels from the first column/row. */
|
|
@@ -2163,9 +2318,12 @@ interface PptxChartData {
|
|
|
2163
2318
|
chartPartPath?: string;
|
|
2164
2319
|
/** Internal: relationship ID linking the graphic frame to the chart part. */
|
|
2165
2320
|
chartRelationshipId?: string;
|
|
2166
|
-
|
|
2321
|
+
/** `null` explicitly removes an existing ChartML data table. */
|
|
2322
|
+
dataTable?: PptxChartDataTable | null;
|
|
2167
2323
|
dropLines?: PptxChartLineStyle;
|
|
2168
2324
|
hiLowLines?: PptxChartLineStyle;
|
|
2325
|
+
/** `null` explicitly removes an existing up/down-bars container. */
|
|
2326
|
+
upDownBars?: PptxChartUpDownBars | null;
|
|
2169
2327
|
axes?: PptxChartAxisFormatting[];
|
|
2170
2328
|
floor?: PptxChart3DSurface;
|
|
2171
2329
|
sideWall?: PptxChart3DSurface;
|
|
@@ -2223,6 +2381,8 @@ interface PptxChartData {
|
|
|
2223
2381
|
* `ofPieChart` element can be re-emitted on save with full fidelity.
|
|
2224
2382
|
*/
|
|
2225
2383
|
ofPieOptions?: PptxChartOfPieOptions;
|
|
2384
|
+
/** Classic bubble-chart display options (`c:bubbleChart`). */
|
|
2385
|
+
bubbleOptions?: PptxBubbleChartOptions;
|
|
2226
2386
|
/**
|
|
2227
2387
|
* 3D viewing parameters (`c:view3D`, CT_View3D).
|
|
2228
2388
|
*
|
|
@@ -2238,6 +2398,8 @@ interface PptxChartData {
|
|
|
2238
2398
|
* source data, so absence does not produce empty `<c:…/>` placeholders.
|
|
2239
2399
|
*/
|
|
2240
2400
|
chartChrome?: PptxChartChrome;
|
|
2401
|
+
/** Editable manual placement for the title, plot area, and legend. */
|
|
2402
|
+
layouts?: PptxChartLayouts;
|
|
2241
2403
|
/**
|
|
2242
2404
|
* Raw `c:userShapes` XML subtree (a drawing tree) preserved verbatim.
|
|
2243
2405
|
*
|
|
@@ -2262,105 +2424,52 @@ interface PptxChartData {
|
|
|
2262
2424
|
*/
|
|
2263
2425
|
clrMapOvr?: Record<string, string>;
|
|
2264
2426
|
}
|
|
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
2427
|
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
2428
|
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`. */
|
|
2429
|
+
type EffectDagNode = EffectDagContainer | EffectDagBlend | EffectDagXfrm | EffectDagRelOff | EffectDagBlur | EffectDagPresetShadow | EffectDagRawLeaf;
|
|
2314
2430
|
interface EffectDagContainer {
|
|
2315
2431
|
kind: 'cont';
|
|
2316
|
-
/** `@type` — `sib` or `tree`. */
|
|
2317
2432
|
type: EffectDagContainerType;
|
|
2318
|
-
/** Optional `@name` attribute. */
|
|
2319
2433
|
name?: string;
|
|
2320
|
-
/** Ordered children. */
|
|
2321
2434
|
children: EffectDagNode[];
|
|
2322
2435
|
}
|
|
2323
|
-
/** `a:blend` — CT_BlendEffect. Always wraps a single `a:cont` child. */
|
|
2324
2436
|
interface EffectDagBlend {
|
|
2325
2437
|
kind: 'blend';
|
|
2326
|
-
/** `@blend` attribute. */
|
|
2327
2438
|
mode: EffectDagBlendMode;
|
|
2328
|
-
/** Required child `a:cont` container. */
|
|
2329
2439
|
container: EffectDagContainer;
|
|
2330
2440
|
}
|
|
2331
|
-
/** `a:xfrmEffect` — CT_TransformEffect. Affine transform with no children. */
|
|
2332
2441
|
interface EffectDagXfrm {
|
|
2333
2442
|
kind: 'xfrmEffect';
|
|
2334
|
-
/** Horizontal scale, percentage * 1000 (e.g. 100000 = 100%). */
|
|
2335
2443
|
sx?: number;
|
|
2336
|
-
/** Vertical scale, percentage * 1000. */
|
|
2337
2444
|
sy?: number;
|
|
2338
|
-
/** Horizontal skew, degrees * 60000. */
|
|
2339
2445
|
kx?: number;
|
|
2340
|
-
/** Vertical skew, degrees * 60000. */
|
|
2341
2446
|
ky?: number;
|
|
2342
|
-
/** Horizontal translation in EMU. */
|
|
2343
2447
|
tx?: number;
|
|
2344
|
-
/** Vertical translation in EMU. */
|
|
2345
2448
|
ty?: number;
|
|
2346
2449
|
}
|
|
2347
|
-
/** `a:relOff` — CT_RelativeOffsetEffect. Relative offset in 1000ths of a percent. */
|
|
2348
2450
|
interface EffectDagRelOff {
|
|
2349
2451
|
kind: 'relOff';
|
|
2350
|
-
/** Horizontal offset, percentage * 1000. */
|
|
2351
2452
|
tx?: number;
|
|
2352
|
-
/** Vertical offset, percentage * 1000. */
|
|
2353
2453
|
ty?: number;
|
|
2354
2454
|
}
|
|
2355
|
-
/**
|
|
2356
|
-
|
|
2357
|
-
|
|
2358
|
-
|
|
2455
|
+
/** Typed CT_BlurEffect with its original payload retained for lossless edits. */
|
|
2456
|
+
interface EffectDagBlur {
|
|
2457
|
+
kind: 'blur';
|
|
2458
|
+
radiusEmu?: number;
|
|
2459
|
+
grow?: boolean;
|
|
2460
|
+
xml: XmlObject;
|
|
2461
|
+
}
|
|
2462
|
+
/** Typed CT_PresetShadowEffect with colour and extension XML retained verbatim. */
|
|
2463
|
+
interface EffectDagPresetShadow {
|
|
2464
|
+
kind: 'prstShdw';
|
|
2465
|
+
preset?: `shdw${number}`;
|
|
2466
|
+
distanceEmu?: number;
|
|
2467
|
+
direction?: number;
|
|
2468
|
+
xml: XmlObject;
|
|
2469
|
+
}
|
|
2359
2470
|
interface EffectDagRawLeaf {
|
|
2360
2471
|
kind: 'raw';
|
|
2361
|
-
/** Local element name without the `a:` prefix (e.g. `outerShdw`, `glow`). */
|
|
2362
2472
|
tag: string;
|
|
2363
|
-
/** Raw XML object captured at load — preserved verbatim on save. */
|
|
2364
2473
|
xml: Record<string, unknown>;
|
|
2365
2474
|
}
|
|
2366
2475
|
/**
|
|
@@ -2588,6 +2697,11 @@ declare module './shape-style' {
|
|
|
2588
2697
|
* ```
|
|
2589
2698
|
*/
|
|
2590
2699
|
type PptxMediaType = 'video' | 'audio' | 'unknown';
|
|
2700
|
+
type PptxMediaReferenceKind = 'audioCd' | 'wavAudioFile' | 'audioFile' | 'videoFile' | 'quickTimeFile';
|
|
2701
|
+
interface PptxAudioCdPosition {
|
|
2702
|
+
track: number;
|
|
2703
|
+
time?: number;
|
|
2704
|
+
}
|
|
2591
2705
|
/**
|
|
2592
2706
|
* A named bookmark within a media clip timeline.
|
|
2593
2707
|
*
|
|
@@ -2663,6 +2777,33 @@ interface MediaCaptionTrack {
|
|
|
2663
2777
|
/** Whether this track is the default/active one. */
|
|
2664
2778
|
isDefault?: boolean;
|
|
2665
2779
|
}
|
|
2780
|
+
/** Typed, editable metadata from a DiagramML layout-definition part. */
|
|
2781
|
+
interface PptxSmartArtLocalizedText {
|
|
2782
|
+
value: string;
|
|
2783
|
+
language?: string;
|
|
2784
|
+
}
|
|
2785
|
+
interface PptxSmartArtLayoutCategory {
|
|
2786
|
+
type: string;
|
|
2787
|
+
priority: number;
|
|
2788
|
+
}
|
|
2789
|
+
/** Identity and ordering metadata from DiagramML CT_LayoutNode. */
|
|
2790
|
+
interface PptxSmartArtLayoutNode {
|
|
2791
|
+
name?: string;
|
|
2792
|
+
styleLabel?: string;
|
|
2793
|
+
childOrder?: 'b' | 't';
|
|
2794
|
+
moveWith?: string;
|
|
2795
|
+
children?: PptxSmartArtLayoutNode[];
|
|
2796
|
+
}
|
|
2797
|
+
/** Metadata and root node from DiagramML CT_DiagramDefinition. */
|
|
2798
|
+
interface PptxSmartArtLayoutDefinition {
|
|
2799
|
+
uniqueId?: string;
|
|
2800
|
+
minimumVersion?: string;
|
|
2801
|
+
defaultStyle?: string;
|
|
2802
|
+
titles?: PptxSmartArtLocalizedText[];
|
|
2803
|
+
descriptions?: PptxSmartArtLocalizedText[];
|
|
2804
|
+
categories?: PptxSmartArtLayoutCategory[];
|
|
2805
|
+
rootNode: PptxSmartArtLayoutNode;
|
|
2806
|
+
}
|
|
2666
2807
|
/**
|
|
2667
2808
|
* SmartArt node types: per-run text, per-node visual override, and the
|
|
2668
2809
|
* data-model node itself. Split out of `smart-art.ts` to keep each type file
|
|
@@ -2750,6 +2891,8 @@ interface PptxSmartArtNodeStyle {
|
|
|
2750
2891
|
interface PptxSmartArtNode {
|
|
2751
2892
|
id: string;
|
|
2752
2893
|
text: string;
|
|
2894
|
+
/** CT_Pt connection identifier, when the point references a connection. */
|
|
2895
|
+
connectionId?: string | null;
|
|
2753
2896
|
parentId?: string;
|
|
2754
2897
|
children?: PptxSmartArtNode[];
|
|
2755
2898
|
/** Node type from `@_type` attribute (e.g. "doc", "node", "asst", "pres"). */
|
|
@@ -2770,6 +2913,63 @@ interface PptxSmartArtNode {
|
|
|
2770
2913
|
*/
|
|
2771
2914
|
style?: PptxSmartArtNodeStyle;
|
|
2772
2915
|
}
|
|
2916
|
+
/** Editable metadata shared by DiagramML quick-style and color definitions. */
|
|
2917
|
+
interface PptxSmartArtDefinitionText {
|
|
2918
|
+
value: string;
|
|
2919
|
+
language?: string;
|
|
2920
|
+
}
|
|
2921
|
+
interface PptxSmartArtDefinitionCategory {
|
|
2922
|
+
type: string;
|
|
2923
|
+
priority: number;
|
|
2924
|
+
}
|
|
2925
|
+
type PptxSmartArtColorApplicationMethod = 'span' | 'cycle' | 'repeat';
|
|
2926
|
+
type PptxSmartArtHueDirection = 'cw' | 'ccw';
|
|
2927
|
+
/** CT_Colors application metadata. Color-choice children remain preserved XML. */
|
|
2928
|
+
interface PptxSmartArtColorListMetadata {
|
|
2929
|
+
method?: PptxSmartArtColorApplicationMethod;
|
|
2930
|
+
hueDirection?: PptxSmartArtHueDirection;
|
|
2931
|
+
}
|
|
2932
|
+
/** CT_StyleLabel metadata from a quick-style definition. */
|
|
2933
|
+
interface PptxSmartArtQuickStyleLabel {
|
|
2934
|
+
name: string;
|
|
2935
|
+
}
|
|
2936
|
+
/** CT_CTStyleLabel metadata from a color-transform definition. */
|
|
2937
|
+
interface PptxSmartArtColorStyleLabel {
|
|
2938
|
+
name: string;
|
|
2939
|
+
fill?: PptxSmartArtColorListMetadata;
|
|
2940
|
+
line?: PptxSmartArtColorListMetadata;
|
|
2941
|
+
effect?: PptxSmartArtColorListMetadata;
|
|
2942
|
+
textLine?: PptxSmartArtColorListMetadata;
|
|
2943
|
+
textFill?: PptxSmartArtColorListMetadata;
|
|
2944
|
+
textEffect?: PptxSmartArtColorListMetadata;
|
|
2945
|
+
}
|
|
2946
|
+
interface PptxSmartArtDefinitionMetadata {
|
|
2947
|
+
uniqueId?: string;
|
|
2948
|
+
minimumVersion?: string;
|
|
2949
|
+
titles?: PptxSmartArtDefinitionText[];
|
|
2950
|
+
descriptions?: PptxSmartArtDefinitionText[];
|
|
2951
|
+
categories?: PptxSmartArtDefinitionCategory[];
|
|
2952
|
+
}
|
|
2953
|
+
/** Typed CT_ColorTransform metadata and the resolved legacy color palette. */
|
|
2954
|
+
interface PptxSmartArtColorTransform extends PptxSmartArtDefinitionMetadata {
|
|
2955
|
+
/** Legacy resolved display name. */
|
|
2956
|
+
name?: string;
|
|
2957
|
+
/** Ordered resolved fill colors for rendering. */
|
|
2958
|
+
fillColors: string[];
|
|
2959
|
+
/** Ordered resolved line colors for rendering. */
|
|
2960
|
+
lineColors: string[];
|
|
2961
|
+
/** Ordered CT_CTStyleLabel metadata. */
|
|
2962
|
+
labels?: PptxSmartArtColorStyleLabel[];
|
|
2963
|
+
}
|
|
2964
|
+
/** Typed CT_StyleDefinition metadata and legacy rendering hint. */
|
|
2965
|
+
interface PptxSmartArtQuickStyle extends PptxSmartArtDefinitionMetadata {
|
|
2966
|
+
/** Legacy resolved display name. */
|
|
2967
|
+
name?: string;
|
|
2968
|
+
/** Legacy effect-intensity rendering hint. */
|
|
2969
|
+
effectIntensity?: string;
|
|
2970
|
+
/** Ordered CT_StyleLabel metadata. Complex style payload remains preserved XML. */
|
|
2971
|
+
labels?: PptxSmartArtQuickStyleLabel[];
|
|
2972
|
+
}
|
|
2773
2973
|
/**
|
|
2774
2974
|
* SmartArt types: layout categories, layout presets, colour schemes,
|
|
2775
2975
|
* data-model nodes/connections, drawing shapes, chrome, and the composite
|
|
@@ -2831,6 +3031,8 @@ type SmartArtStyle = 'flat' | 'moderate' | 'intense';
|
|
|
2831
3031
|
* ```
|
|
2832
3032
|
*/
|
|
2833
3033
|
interface PptxSmartArtConnection {
|
|
3034
|
+
/** Stable CT_Cxn model identifier. Required when serialized. */
|
|
3035
|
+
modelId?: string | null;
|
|
2834
3036
|
/** Model ID of the source node. */
|
|
2835
3037
|
sourceId: string;
|
|
2836
3038
|
/** Model ID of the destination node. */
|
|
@@ -2841,6 +3043,12 @@ interface PptxSmartArtConnection {
|
|
|
2841
3043
|
srcOrd?: number;
|
|
2842
3044
|
/** Destination index for ordering. */
|
|
2843
3045
|
destOrd?: number;
|
|
3046
|
+
/** Model ID of the parent transition point associated with this edge. */
|
|
3047
|
+
parentTransitionId?: string | null;
|
|
3048
|
+
/** Model ID of the sibling transition point associated with this edge. */
|
|
3049
|
+
siblingTransitionId?: string | null;
|
|
3050
|
+
/** Layout presentation identifier used by presentation connections. */
|
|
3051
|
+
presentationId?: string | null;
|
|
2844
3052
|
}
|
|
2845
3053
|
/**
|
|
2846
3054
|
* A pre-computed shape from `ppt/diagrams/drawing*.xml`.
|
|
@@ -2907,45 +3115,6 @@ interface PptxSmartArtChrome {
|
|
|
2907
3115
|
/** Outline stroke width in points. */
|
|
2908
3116
|
outlineWidth?: number;
|
|
2909
3117
|
}
|
|
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
3118
|
/**
|
|
2950
3119
|
* Complete parsed SmartArt data for a {@link SmartArtPptxElement}.
|
|
2951
3120
|
*
|
|
@@ -2985,14 +3154,28 @@ interface PptxSmartArtData {
|
|
|
2985
3154
|
colorTransform?: PptxSmartArtColorTransform;
|
|
2986
3155
|
/** Quick style from `ppt/diagrams/quickStyles*.xml`. */
|
|
2987
3156
|
quickStyle?: PptxSmartArtQuickStyle;
|
|
3157
|
+
/** Editable metadata from the related DiagramML layout definition. */
|
|
3158
|
+
layoutDefinition?: PptxSmartArtLayoutDefinition;
|
|
2988
3159
|
/** Relationship ID for the diagram data part (for round-trip save). */
|
|
2989
3160
|
dataRelId?: string;
|
|
3161
|
+
/** Relationship ID for the diagram layout part. */
|
|
3162
|
+
layoutRelId?: string;
|
|
2990
3163
|
/** Relationship ID for the drawing part. */
|
|
2991
3164
|
drawingRelId?: string;
|
|
2992
3165
|
/** Relationship ID for the colours part. */
|
|
2993
3166
|
colorsRelId?: string;
|
|
2994
3167
|
/** Relationship ID for the quick-styles part. */
|
|
2995
3168
|
styleRelId?: string;
|
|
3169
|
+
/** Internal save hint: the layout definition changed in the editor. */
|
|
3170
|
+
layoutDirty?: boolean;
|
|
3171
|
+
/** Internal save hint: typed layout-definition metadata changed. */
|
|
3172
|
+
layoutDefinitionDirty?: boolean;
|
|
3173
|
+
/** Internal save hint: quick-style definition metadata changed. */
|
|
3174
|
+
quickStyleDirty?: boolean;
|
|
3175
|
+
/** Internal save hint: color-transform definition metadata changed. */
|
|
3176
|
+
colorTransformDirty?: boolean;
|
|
3177
|
+
/** Internal save hint: cached drawing geometry or text changed in the editor. */
|
|
3178
|
+
drawingDirty?: boolean;
|
|
2996
3179
|
}
|
|
2997
3180
|
/**
|
|
2998
3181
|
* Table types: cell styling, cell data, rows, table data, and the parsed
|
|
@@ -3599,6 +3782,11 @@ interface MediaPptxElement extends PptxElementBase {
|
|
|
3599
3782
|
mediaPath?: string;
|
|
3600
3783
|
mediaData?: string;
|
|
3601
3784
|
mediaMimeType?: string;
|
|
3785
|
+
mediaReferenceKind?: PptxMediaReferenceKind;
|
|
3786
|
+
mediaReferenceName?: string;
|
|
3787
|
+
audioCdStart?: PptxAudioCdPosition;
|
|
3788
|
+
audioCdEnd?: PptxAudioCdPosition;
|
|
3789
|
+
rawMediaReferenceXml?: XmlObject;
|
|
3602
3790
|
/** Trim start in milliseconds (from p:cMediaNode p:cTn @st). */
|
|
3603
3791
|
trimStartMs?: number;
|
|
3604
3792
|
/** Trim end in milliseconds (from p:cMediaNode p:cTn @end). */
|
|
@@ -3852,6 +4040,16 @@ interface PptxHandoutMaster {
|
|
|
3852
4040
|
/** Colour map from `<p:clrMap>` (12 alias attributes). Applied at save time. */
|
|
3853
4041
|
clrMap?: Record<string, string>;
|
|
3854
4042
|
}
|
|
4043
|
+
/**
|
|
4044
|
+
* Active tab within the master view sidebar.
|
|
4045
|
+
*
|
|
4046
|
+
* @example
|
|
4047
|
+
* ```ts
|
|
4048
|
+
* const tab: MasterViewTab = "slides";
|
|
4049
|
+
* // => "slides" — one of: "slides" | "notes" | "handout"
|
|
4050
|
+
* ```
|
|
4051
|
+
*/
|
|
4052
|
+
type MasterViewTab = 'slides' | 'notes' | 'handout';
|
|
3855
4053
|
/**
|
|
3856
4054
|
* Structured slide master data.
|
|
3857
4055
|
*
|
|
@@ -4019,6 +4217,44 @@ type PptxAnimationTrigger = 'onClick' | 'onShapeClick' | 'onHover' | 'afterPrevi
|
|
|
4019
4217
|
* is preserved alongside other animations.
|
|
4020
4218
|
*/
|
|
4021
4219
|
type PptxNativeAnimationKind = 'media';
|
|
4220
|
+
/** A target selected by `p:tgtEl` in the PresentationML timing model. */
|
|
4221
|
+
type PptxAnimationTarget = {
|
|
4222
|
+
type: 'shape';
|
|
4223
|
+
shapeId: string;
|
|
4224
|
+
rawXml?: XmlObject;
|
|
4225
|
+
} | {
|
|
4226
|
+
type: 'slide';
|
|
4227
|
+
rawXml?: XmlObject;
|
|
4228
|
+
} | {
|
|
4229
|
+
type: 'sound';
|
|
4230
|
+
relationshipId: string;
|
|
4231
|
+
name?: string;
|
|
4232
|
+
rawXml?: XmlObject;
|
|
4233
|
+
} | {
|
|
4234
|
+
type: 'ink';
|
|
4235
|
+
shapeId: string;
|
|
4236
|
+
rawXml?: XmlObject;
|
|
4237
|
+
} | {
|
|
4238
|
+
type: 'unknown';
|
|
4239
|
+
rawXml: XmlObject;
|
|
4240
|
+
};
|
|
4241
|
+
/** Nested build choice carried by `p:bldGraphic`. */
|
|
4242
|
+
type PptxGraphicBuild = {
|
|
4243
|
+
mode: 'asOne';
|
|
4244
|
+
rawXml?: XmlObject;
|
|
4245
|
+
} | {
|
|
4246
|
+
mode: 'sub';
|
|
4247
|
+
kind: 'diagram';
|
|
4248
|
+
build: string;
|
|
4249
|
+
reverse: boolean;
|
|
4250
|
+
rawXml?: XmlObject;
|
|
4251
|
+
} | {
|
|
4252
|
+
mode: 'sub';
|
|
4253
|
+
kind: 'chart';
|
|
4254
|
+
build: string;
|
|
4255
|
+
animateBackground: boolean;
|
|
4256
|
+
rawXml?: XmlObject;
|
|
4257
|
+
};
|
|
4022
4258
|
/**
|
|
4023
4259
|
* Parsed native animation record from `p:timing / p:tnLst`.
|
|
4024
4260
|
*
|
|
@@ -4040,6 +4276,8 @@ type PptxNativeAnimationKind = 'media';
|
|
|
4040
4276
|
interface PptxNativeAnimation {
|
|
4041
4277
|
/** Target element/shape ID. */
|
|
4042
4278
|
targetId?: string;
|
|
4279
|
+
/** Full timing target, including sound and ink target variants. */
|
|
4280
|
+
target?: PptxAnimationTarget;
|
|
4043
4281
|
/** Trigger type. */
|
|
4044
4282
|
trigger?: PptxAnimationTrigger;
|
|
4045
4283
|
/** Shape ID that triggers this animation when clicked (interactive sequence). */
|
|
@@ -4144,6 +4382,8 @@ interface PptxNativeAnimation {
|
|
|
4144
4382
|
* that aren't OLE charts).
|
|
4145
4383
|
*/
|
|
4146
4384
|
graphicBuild?: string;
|
|
4385
|
+
/** Schema-accurate `p:bldGraphic/p:bldAsOne|p:bldSub` representation. */
|
|
4386
|
+
graphicBuildProperties?: PptxGraphicBuild;
|
|
4147
4387
|
/**
|
|
4148
4388
|
* Opaque map of `p:cTn` attributes that don't have a typed home on this
|
|
4149
4389
|
* interface but must round-trip through parse → save. Keys are stored
|
|
@@ -4260,6 +4500,8 @@ interface AnimationCondition {
|
|
|
4260
4500
|
targetShapeId?: string;
|
|
4261
4501
|
/** Whether the condition targets a slide (from `p:tgtEl/p:sldTgt`). */
|
|
4262
4502
|
targetSlide?: boolean;
|
|
4503
|
+
/** Full target choice, including `p:sndTgt` and `p:inkTgt`. */
|
|
4504
|
+
target?: PptxAnimationTarget;
|
|
4263
4505
|
}
|
|
4264
4506
|
/** Iteration configuration from `p:iterate`. */
|
|
4265
4507
|
interface PptxAnimationIterate {
|
|
@@ -4362,6 +4604,10 @@ interface PptxElementAnimation {
|
|
|
4362
4604
|
interface PptxComment {
|
|
4363
4605
|
id: string;
|
|
4364
4606
|
text: string;
|
|
4607
|
+
/** Storage vocabulary used by this comment. Omitted means legacy PresentationML. */
|
|
4608
|
+
format?: 'legacy' | 'modern';
|
|
4609
|
+
/** Stable GUID author identifier used by Office 2021 modern comments. */
|
|
4610
|
+
authorId?: string;
|
|
4365
4611
|
/** Optional parent comment id for reply threading metadata. */
|
|
4366
4612
|
parentId?: string;
|
|
4367
4613
|
author?: string;
|
|
@@ -4370,12 +4616,35 @@ interface PptxComment {
|
|
|
4370
4616
|
y?: number;
|
|
4371
4617
|
/** Whether this comment has been resolved/marked done. */
|
|
4372
4618
|
resolved?: boolean;
|
|
4619
|
+
/** Native p188 status token. */
|
|
4620
|
+
status?: 'active' | 'resolved' | 'closed';
|
|
4621
|
+
/** Modern comment classification tags and author IDs that liked the comment. */
|
|
4622
|
+
tags?: string[];
|
|
4623
|
+
likes?: string[];
|
|
4624
|
+
startDate?: string;
|
|
4625
|
+
dueDate?: string;
|
|
4626
|
+
assignedTo?: string[];
|
|
4627
|
+
/** Task completion in thousandths of a percent, from 0 through 100000. */
|
|
4628
|
+
complete?: number;
|
|
4629
|
+
priority?: number;
|
|
4630
|
+
title?: string;
|
|
4373
4631
|
/** Modern threaded comment support (p15:threadingInfo). */
|
|
4374
4632
|
threadId?: string;
|
|
4375
4633
|
/** Replies to this comment (for modern threaded comments). */
|
|
4376
4634
|
replies?: PptxComment[];
|
|
4377
4635
|
/** ID of the element this comment is associated with (if any). */
|
|
4378
4636
|
elementId?: string;
|
|
4637
|
+
/** Original `p:cm` subtree, retained for unknown child and extension preservation. */
|
|
4638
|
+
rawXml?: XmlObject;
|
|
4639
|
+
}
|
|
4640
|
+
/** Office 2021 comment author from the p188 Author part. */
|
|
4641
|
+
interface PptxModernCommentAuthor {
|
|
4642
|
+
id: string;
|
|
4643
|
+
name: string;
|
|
4644
|
+
initials?: string;
|
|
4645
|
+
userId: string;
|
|
4646
|
+
providerId: string;
|
|
4647
|
+
rawXml?: XmlObject;
|
|
4379
4648
|
}
|
|
4380
4649
|
/**
|
|
4381
4650
|
* A comment author from `ppt/commentAuthors.xml`.
|
|
@@ -4408,6 +4677,8 @@ interface PptxCommentAuthor {
|
|
|
4408
4677
|
lastIdx: number;
|
|
4409
4678
|
/** Colour index assigned to this author (`@_clrIdx`). */
|
|
4410
4679
|
clrIdx: number;
|
|
4680
|
+
/** Original `p:cmAuthor` subtree, retained for unknown attribute preservation. */
|
|
4681
|
+
rawXml?: XmlObject;
|
|
4411
4682
|
}
|
|
4412
4683
|
/**
|
|
4413
4684
|
* A compatibility warning generated during parse or save when the
|
|
@@ -4853,6 +5124,8 @@ interface PptxTheme {
|
|
|
4853
5124
|
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
5125
|
/** Split orientation from OOXML `@_orient`. */
|
|
4855
5126
|
type PptxSplitOrientation = 'horz' | 'vert';
|
|
5127
|
+
/** Schema-defined `ST_TransitionSpeed` values. */
|
|
5128
|
+
type PptxTransitionSpeed = 'slow' | 'med' | 'fast';
|
|
4856
5129
|
/**
|
|
4857
5130
|
* Slide transition configuration.
|
|
4858
5131
|
*
|
|
@@ -4869,6 +5142,8 @@ type PptxSplitOrientation = 'horz' | 'vert';
|
|
|
4869
5142
|
*/
|
|
4870
5143
|
interface PptxSlideTransition {
|
|
4871
5144
|
type: PptxTransitionType;
|
|
5145
|
+
/** Schema-defined transition speed. Defaults to `fast` when omitted. */
|
|
5146
|
+
speed?: PptxTransitionSpeed;
|
|
4872
5147
|
durationMs?: number;
|
|
4873
5148
|
direction?: string;
|
|
4874
5149
|
advanceOnClick?: boolean;
|
|
@@ -4883,6 +5158,10 @@ interface PptxSlideTransition {
|
|
|
4883
5158
|
orient?: PptxSplitOrientation;
|
|
4884
5159
|
/** Relationship ID of transition sound from `p:sndAc/p:stSnd/@r:embed` when present. */
|
|
4885
5160
|
soundRId?: string;
|
|
5161
|
+
/** Embedded WAV display name from `p:stSnd/p:snd/@name`. */
|
|
5162
|
+
soundName?: string;
|
|
5163
|
+
/** Whether the transition sound repeats until another sound starts. */
|
|
5164
|
+
soundLoop?: boolean;
|
|
4886
5165
|
/** Resolved transition sound media path within the package. */
|
|
4887
5166
|
soundPath?: string;
|
|
4888
5167
|
/** Human-readable sound file name (extracted from soundPath). */
|
|
@@ -4896,6 +5175,8 @@ interface PptxSlideTransition {
|
|
|
4896
5175
|
rawSoundAction?: XmlObject;
|
|
4897
5176
|
/** Preserved extension-list XML node from `p:extLst` within the transition for lossless round-trip. */
|
|
4898
5177
|
rawExtLst?: XmlObject;
|
|
5178
|
+
/** Original transition node, retained to preserve unknown attributes and children. */
|
|
5179
|
+
rawTransition?: XmlObject;
|
|
4899
5180
|
}
|
|
4900
5181
|
/**
|
|
4901
5182
|
* View properties types parsed from `ppt/viewProps.xml`.
|
|
@@ -5133,6 +5414,8 @@ interface PptxSlide {
|
|
|
5133
5414
|
/** Optional `<p:cSld @name>` value of the notes slide, for round-trip. */
|
|
5134
5415
|
notesCSldName?: string;
|
|
5135
5416
|
comments?: PptxComment[];
|
|
5417
|
+
/** Source package metadata for an Office 2021 p188 comment part. */
|
|
5418
|
+
modernCommentPart?: PptxModernCommentPart;
|
|
5136
5419
|
warnings?: PptxCompatibilityWarning[];
|
|
5137
5420
|
rawXml?: XmlObject;
|
|
5138
5421
|
/** Per-slide colour map override parsed from `p:clrMapOvr`. */
|
|
@@ -5151,6 +5434,24 @@ interface PptxSlide {
|
|
|
5151
5434
|
activeXControls?: PptxActiveXControl[];
|
|
5152
5435
|
/** Per-slide header/footer flags from `<p:hf>` (P-H3). */
|
|
5153
5436
|
headerFooterFlags?: PptxHeaderFooterFlags;
|
|
5437
|
+
/** Server-backed slide synchronization metadata stored in a related OPC part. */
|
|
5438
|
+
slideSynchronization?: PptxSlideSyncProperties;
|
|
5439
|
+
}
|
|
5440
|
+
interface PptxModernCommentPart {
|
|
5441
|
+
path: string;
|
|
5442
|
+
relationshipId: string;
|
|
5443
|
+
/** Original p188:cmLst root, including unknown attributes and extensions. */
|
|
5444
|
+
rawXml?: XmlObject;
|
|
5445
|
+
}
|
|
5446
|
+
/** Metadata from a `p:sldSyncPr` slide synchronization data part. */
|
|
5447
|
+
interface PptxSlideSyncProperties {
|
|
5448
|
+
serverSlideId: string;
|
|
5449
|
+
serverSlideModifiedTime: string;
|
|
5450
|
+
clientInsertedTime: string;
|
|
5451
|
+
extensionList?: XmlObject;
|
|
5452
|
+
rawXml?: XmlObject;
|
|
5453
|
+
partPath?: string;
|
|
5454
|
+
relationshipId?: string;
|
|
5154
5455
|
}
|
|
5155
5456
|
/**
|
|
5156
5457
|
* A slide layout available in the loaded presentation.
|
|
@@ -5278,6 +5579,8 @@ interface PptxCustomShow {
|
|
|
5278
5579
|
id: string;
|
|
5279
5580
|
/** Ordered list of slide relationship IDs included in this custom show. */
|
|
5280
5581
|
slideRIds: string[];
|
|
5582
|
+
/** Original `p:custShow` subtree used to preserve unmodelled attributes and extensions. */
|
|
5583
|
+
rawXml?: XmlObject;
|
|
5281
5584
|
}
|
|
5282
5585
|
/**
|
|
5283
5586
|
* An ordered section in the presentation (from `p:sectionLst` / `p14:sectionLst`).
|
|
@@ -5306,6 +5609,8 @@ interface PptxSection {
|
|
|
5306
5609
|
collapsed?: boolean;
|
|
5307
5610
|
/** Section highlight color hex (from p15:sectionPr/@clr). */
|
|
5308
5611
|
color?: string;
|
|
5612
|
+
/** Original section subtree used to preserve unmodelled attributes and extensions. */
|
|
5613
|
+
rawXml?: XmlObject;
|
|
5309
5614
|
}
|
|
5310
5615
|
/**
|
|
5311
5616
|
* Write-protection hash data parsed from `p:modifyVerifier` in `presentation.xml`.
|
|
@@ -5469,6 +5774,8 @@ interface PptxData {
|
|
|
5469
5774
|
thumbnailData?: Uint8Array;
|
|
5470
5775
|
/** Comment authors parsed from `ppt/commentAuthors.xml` for round-trip preservation. */
|
|
5471
5776
|
commentAuthors?: PptxCommentAuthor[];
|
|
5777
|
+
/** Office 2021 p188 authors from the modern Author part. */
|
|
5778
|
+
modernCommentAuthors?: PptxModernCommentAuthor[];
|
|
5472
5779
|
/**
|
|
5473
5780
|
* OOXML conformance class of the loaded file.
|
|
5474
5781
|
* - `'strict'` -- ISO/IEC 29500 Strict (uses `purl.oclc.org` namespace URIs)
|
|
@@ -7064,6 +7371,102 @@ interface CanvasSize {
|
|
|
7064
7371
|
width: number;
|
|
7065
7372
|
height: number;
|
|
7066
7373
|
}
|
|
7374
|
+
/** Viewer interaction mode: read-only, edit, presentation, or master-view. */
|
|
7375
|
+
type ViewerMode = 'preview' | 'edit' | 'present' | 'master';
|
|
7376
|
+
/**
|
|
7377
|
+
* Framework-agnostic imperative API contract for the PowerPoint viewer.
|
|
7378
|
+
*
|
|
7379
|
+
* Each binding (React `forwardRef` handle, Vue `defineExpose`, Angular public
|
|
7380
|
+
* methods) implements this interface so consumers get a consistent progressive
|
|
7381
|
+
* API regardless of framework.
|
|
7382
|
+
*/
|
|
7383
|
+
interface PowerPointViewerAPI {
|
|
7384
|
+
/** Serialise the current presentation to `.pptx` bytes. */
|
|
7385
|
+
getContent: () => Promise<Uint8Array>;
|
|
7386
|
+
/** Navigate to a specific slide by zero-based index. */
|
|
7387
|
+
goTo: (slideIndex: number) => void;
|
|
7388
|
+
/** Navigate to the previous slide. */
|
|
7389
|
+
goPrev: () => void;
|
|
7390
|
+
/** Navigate to the next slide. */
|
|
7391
|
+
goNext: () => void;
|
|
7392
|
+
/** Undo the last editing action. No-op when nothing to undo. */
|
|
7393
|
+
undo: () => void;
|
|
7394
|
+
/** Redo the last undone action. No-op when nothing to redo. */
|
|
7395
|
+
redo: () => void;
|
|
7396
|
+
/** Whether an undo action is available. */
|
|
7397
|
+
canUndo: () => boolean;
|
|
7398
|
+
/** Whether a redo action is available. */
|
|
7399
|
+
canRedo: () => boolean;
|
|
7400
|
+
/** Get the current zoom level (1 = 100%). */
|
|
7401
|
+
getZoom: () => number;
|
|
7402
|
+
/** Set the zoom level (clamped to min/max bounds). */
|
|
7403
|
+
setZoom: (level: number) => void;
|
|
7404
|
+
/** Zoom in by one step. */
|
|
7405
|
+
zoomIn: () => void;
|
|
7406
|
+
/** Zoom out by one step. */
|
|
7407
|
+
zoomOut: () => void;
|
|
7408
|
+
/** Reset zoom to 100%. */
|
|
7409
|
+
zoomReset: () => void;
|
|
7410
|
+
/** Get the current viewer mode. */
|
|
7411
|
+
getMode: () => ViewerMode;
|
|
7412
|
+
/** Switch the viewer mode (e.g. 'edit', 'preview', 'present'). */
|
|
7413
|
+
setMode: (mode: ViewerMode) => void;
|
|
7414
|
+
/** Get the zero-based active slide index. */
|
|
7415
|
+
getActiveSlideIndex: () => number;
|
|
7416
|
+
/** Set the active slide by zero-based index (alias of goTo). */
|
|
7417
|
+
setActiveSlideIndex: (index: number) => void;
|
|
7418
|
+
/** Get the total number of slides. */
|
|
7419
|
+
getSlideCount: () => number;
|
|
7420
|
+
/** Whether the document has unsaved changes. */
|
|
7421
|
+
isDirty: () => boolean;
|
|
7422
|
+
/**
|
|
7423
|
+
* Get the full slide array. Returns the actual `PptxSlide[]` from the
|
|
7424
|
+
* internal model with full type information (elements, notes, transitions,
|
|
7425
|
+
* animations, etc.). The returned reference is a snapshot; mutations are
|
|
7426
|
+
* not reflected back unless done via the manipulation methods.
|
|
7427
|
+
*/
|
|
7428
|
+
getSlides: () => readonly PptxSlide[];
|
|
7429
|
+
/** Get a single slide by zero-based index, or undefined if out of range. */
|
|
7430
|
+
getSlide: (index: number) => PptxSlide | undefined;
|
|
7431
|
+
/** Get the currently active slide. */
|
|
7432
|
+
getActiveSlide: () => PptxSlide | undefined;
|
|
7433
|
+
/** Add a blank slide after the given index (or at end if omitted). */
|
|
7434
|
+
addSlide: (afterIndex?: number) => void;
|
|
7435
|
+
/** Delete slides at the given zero-based indexes. At least one slide is kept. */
|
|
7436
|
+
deleteSlides: (indexes: number[]) => void;
|
|
7437
|
+
/** Duplicate slides at the given zero-based indexes. */
|
|
7438
|
+
duplicateSlides: (indexes: number[]) => void;
|
|
7439
|
+
/** Move a slide from one position to another. */
|
|
7440
|
+
moveSlide: (fromIndex: number, toIndex: number) => void;
|
|
7441
|
+
/** Toggle the hidden flag on slides at the given indexes. */
|
|
7442
|
+
toggleHideSlides: (indexes: number[]) => void;
|
|
7443
|
+
/**
|
|
7444
|
+
* Get the elements on a slide. Defaults to the active slide when
|
|
7445
|
+
* `slideIndex` is omitted. Returns the full `PptxElement[]` with
|
|
7446
|
+
* all type-specific properties intact.
|
|
7447
|
+
*/
|
|
7448
|
+
getElements: (slideIndex?: number) => readonly PptxElement[];
|
|
7449
|
+
/** Get a single element by ID from the active slide (or a specified slide). */
|
|
7450
|
+
getElementById: (elementId: string, slideIndex?: number) => PptxElement | undefined;
|
|
7451
|
+
/**
|
|
7452
|
+
* Update one or more properties of an element by ID on the active slide.
|
|
7453
|
+
* Accepts a `Partial<PptxElement>` patch (e.g. `{ x: 100, width: 300 }`).
|
|
7454
|
+
*/
|
|
7455
|
+
updateElement: (elementId: string, updates: Partial<PptxElement>) => void;
|
|
7456
|
+
/** Delete elements by their IDs from the active slide. */
|
|
7457
|
+
deleteElements: (elementIds: string[]) => void;
|
|
7458
|
+
/**
|
|
7459
|
+
* Duplicate an element on the active slide.
|
|
7460
|
+
* Returns the new element's ID, or undefined if the source was not found.
|
|
7461
|
+
*/
|
|
7462
|
+
duplicateElement: (elementId: string) => string | undefined;
|
|
7463
|
+
/** Get the IDs of currently selected elements. */
|
|
7464
|
+
getSelectedElementIds: () => string[];
|
|
7465
|
+
/** Programmatically select elements by their IDs. */
|
|
7466
|
+
selectElements: (ids: string[]) => void;
|
|
7467
|
+
/** Clear the current selection. */
|
|
7468
|
+
clearSelection: () => void;
|
|
7469
|
+
}
|
|
7067
7470
|
/** Collaboration role within a session. */
|
|
7068
7471
|
type CollaborationRole = 'owner' | 'collaborator' | 'viewer';
|
|
7069
7472
|
/**
|
|
@@ -7076,10 +7479,12 @@ type CollaborationRole = 'owner' | 'collaborator' | 'viewer';
|
|
|
7076
7479
|
* any signaling server, which makes this mode usable from static hosting.
|
|
7077
7480
|
*/
|
|
7078
7481
|
type CollaborationTransport = 'websocket' | 'webrtc';
|
|
7482
|
+
/** How the local user entered a collaboration session. */
|
|
7483
|
+
type CollaborationSessionIntent = 'create' | 'join';
|
|
7079
7484
|
/**
|
|
7080
7485
|
* Real-time collaboration configuration.
|
|
7081
7486
|
*
|
|
7082
|
-
* The same shape is accepted by
|
|
7487
|
+
* The same shape is accepted by every framework binding.
|
|
7083
7488
|
*/
|
|
7084
7489
|
interface CollaborationConfig {
|
|
7085
7490
|
/** Unique identifier for the collaboration room (alphanumeric, hyphens, underscores). */
|
|
@@ -7107,6 +7512,13 @@ interface CollaborationConfig {
|
|
|
7107
7512
|
authToken?: string;
|
|
7108
7513
|
/** Role in the session; defaults to `'collaborator'`. */
|
|
7109
7514
|
role?: CollaborationRole;
|
|
7515
|
+
/**
|
|
7516
|
+
* Whether this client created the room or joined an existing room. Providers
|
|
7517
|
+
* do not use this value, but hosts can use it to avoid publishing local file
|
|
7518
|
+
* bytes when handling a join request. Omitted values retain the legacy
|
|
7519
|
+
* create-session behaviour.
|
|
7520
|
+
*/
|
|
7521
|
+
sessionIntent?: CollaborationSessionIntent;
|
|
7110
7522
|
/**
|
|
7111
7523
|
* Elected-writer write-back callback (Area 3 of the C3 hardening plan).
|
|
7112
7524
|
*
|
|
@@ -7241,6 +7653,19 @@ interface SanitizedPresence {
|
|
|
7241
7653
|
selectedElementId?: string;
|
|
7242
7654
|
role?: CollaborationRole;
|
|
7243
7655
|
}
|
|
7656
|
+
/**
|
|
7657
|
+
* A font supplied by the host application. The package never ships fonts:
|
|
7658
|
+
* applications provide a licensed URL, data URL, or blob URL for their users.
|
|
7659
|
+
*/
|
|
7660
|
+
interface ViewerFontSource {
|
|
7661
|
+
family: string;
|
|
7662
|
+
src: string;
|
|
7663
|
+
format?: 'truetype' | 'opentype' | 'woff' | 'woff2';
|
|
7664
|
+
weight?: string | number;
|
|
7665
|
+
style?: 'normal' | 'italic';
|
|
7666
|
+
}
|
|
7667
|
+
declare function parsePresentationSessionId(hash: string): string | null;
|
|
7668
|
+
declare function loadPresentationDeck(sessionId: string): Promise<Uint8Array | null>;
|
|
7244
7669
|
/**
|
|
7245
7670
|
* Pure, framework-agnostic helpers for freehand ink drawing, shared by every
|
|
7246
7671
|
* binding. No framework imports, so these can be unit-tested without TestBed.
|
|
@@ -7401,6 +7826,15 @@ interface ViewerState {
|
|
|
7401
7826
|
templateElementsBySlideId: Record<string, PptxElement[]>;
|
|
7402
7827
|
/** Parsed slide masters and layouts used by the dedicated master canvas. */
|
|
7403
7828
|
slideMasters: PptxSlideMaster[];
|
|
7829
|
+
/** Parsed notes master and its portrait page size. */
|
|
7830
|
+
notesMaster?: PptxNotesMaster;
|
|
7831
|
+
notesCanvasSize?: CanvasSize;
|
|
7832
|
+
/** Parsed handout master. */
|
|
7833
|
+
handoutMaster?: PptxHandoutMaster;
|
|
7834
|
+
/** Active master-workspace tab. */
|
|
7835
|
+
masterViewTab: MasterViewTab;
|
|
7836
|
+
/** Preview layout used by the handout master workspace. */
|
|
7837
|
+
handoutSlidesPerPage: number;
|
|
7404
7838
|
/** Active master/layout canvas, or null for normal slide view. */
|
|
7405
7839
|
masterViewTarget: {
|
|
7406
7840
|
masterIndex: number;
|
|
@@ -7486,20 +7920,9 @@ interface AnimationActions {
|
|
|
7486
7920
|
* Z-order, align, flip, and group/ungroup actions for the ribbon's
|
|
7487
7921
|
* Home > Arrange group.
|
|
7488
7922
|
*
|
|
7489
|
-
*
|
|
7490
|
-
*
|
|
7491
|
-
*
|
|
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.
|
|
7923
|
+
* A single selection aligns against the slide canvas. Shift-click or marquee
|
|
7924
|
+
* multi-selection aligns against the collective bounds, enables distribution
|
|
7925
|
+
* for three or more elements, and enables grouping for two or more elements.
|
|
7503
7926
|
*/
|
|
7504
7927
|
interface ArrangeActions {
|
|
7505
7928
|
bringForward(): void;
|
|
@@ -7816,6 +8239,41 @@ interface Inspector {
|
|
|
7816
8239
|
setEditable(editable: boolean): void;
|
|
7817
8240
|
}
|
|
7818
8241
|
//#endregion
|
|
8242
|
+
//#region src/viewer/ui/master-view-sidebar.d.ts
|
|
8243
|
+
interface MasterViewSidebarOptions {
|
|
8244
|
+
tab: MasterViewTab;
|
|
8245
|
+
masters: readonly PptxSlideMaster[];
|
|
8246
|
+
active: {
|
|
8247
|
+
masterIndex: number;
|
|
8248
|
+
layoutIndex: number | null;
|
|
8249
|
+
};
|
|
8250
|
+
canvasSize: CanvasSize;
|
|
8251
|
+
notesBackground?: string;
|
|
8252
|
+
notesPlaceholders?: readonly {
|
|
8253
|
+
type: string;
|
|
8254
|
+
idx?: string;
|
|
8255
|
+
}[];
|
|
8256
|
+
notesMasterPresent: boolean;
|
|
8257
|
+
handoutBackground?: string;
|
|
8258
|
+
handoutPlaceholders?: readonly {
|
|
8259
|
+
type: string;
|
|
8260
|
+
idx?: string;
|
|
8261
|
+
}[];
|
|
8262
|
+
handoutMasterPresent: boolean;
|
|
8263
|
+
handoutSlidesPerPage: number;
|
|
8264
|
+
renderStage(slide: PptxSlide, scale: number): HTMLElement;
|
|
8265
|
+
onSelect(masterIndex: number, layoutIndex: number | null): void;
|
|
8266
|
+
onTabChange(tab: MasterViewTab): void;
|
|
8267
|
+
onCollapse(): void;
|
|
8268
|
+
onHandoutSlidesPerPageChange(count: number): void;
|
|
8269
|
+
onMasterBackgroundColorChange(color: string): void;
|
|
8270
|
+
}
|
|
8271
|
+
interface MasterViewSidebar {
|
|
8272
|
+
el: HTMLElement;
|
|
8273
|
+
render(options: MasterViewSidebarOptions): void;
|
|
8274
|
+
setVisible(visible: boolean): void;
|
|
8275
|
+
}
|
|
8276
|
+
//#endregion
|
|
7819
8277
|
//#region src/viewer/ui/ribbon/ribbon-types.d.ts
|
|
7820
8278
|
/** Draw tab state to reflect (current tool/colour/width). */
|
|
7821
8279
|
interface RibbonDrawState {
|
|
@@ -7958,6 +8416,8 @@ interface ViewerChrome {
|
|
|
7958
8416
|
inspector: Inspector | null;
|
|
7959
8417
|
/** Cross-slide accessibility checker results, opened from the View ribbon. */
|
|
7960
8418
|
accessibility: AccessibilityPanel;
|
|
8419
|
+
/** Dedicated Slide/Notes/Handout master workspace navigation. */
|
|
8420
|
+
masterSidebar: MasterViewSidebar;
|
|
7961
8421
|
thumbnails: ThumbnailRail | null;
|
|
7962
8422
|
/** Scrollable centring viewport around the stage. */
|
|
7963
8423
|
viewport: HTMLElement;
|
|
@@ -8009,6 +8469,9 @@ interface EditorController {
|
|
|
8009
8469
|
deleteSelected(): void;
|
|
8010
8470
|
duplicateSelected(): string | null;
|
|
8011
8471
|
getSelectedElementId(): string | null;
|
|
8472
|
+
selectElements(ids: string[]): void;
|
|
8473
|
+
applyElementPatch(id: string, patch: Partial<PptxElement>): void;
|
|
8474
|
+
commitSlides(slides: PptxSlide[], currentSlide?: number): void;
|
|
8012
8475
|
/** Switch the Draw ribbon tab's active tool (also clears selection when leaving `'select'`). */
|
|
8013
8476
|
setDrawTool(tool: DrawTool): void;
|
|
8014
8477
|
/** Set the pen/highlighter stroke colour used by the next committed stroke. */
|
|
@@ -8020,6 +8483,7 @@ interface EditorController {
|
|
|
8020
8483
|
/** The Find & Replace actions for the ribbon's docked panel. */
|
|
8021
8484
|
getFindReplaceActions(): FindReplaceActions;
|
|
8022
8485
|
commitNotes(notes: string, notesSegments?: TextSegment[]): void;
|
|
8486
|
+
setHandoutSlidesPerPage(count: number): void;
|
|
8023
8487
|
save(): Promise<Uint8Array>;
|
|
8024
8488
|
downloadPptx(fileName?: string): Promise<void>;
|
|
8025
8489
|
destroy(): void;
|
|
@@ -8086,6 +8550,12 @@ interface ElementRenderContext {
|
|
|
8086
8550
|
readonly document: Document;
|
|
8087
8551
|
/** The slide being rendered. */
|
|
8088
8552
|
readonly slide: PptxSlide;
|
|
8553
|
+
/** Full deck, used by Zoom elements to resolve their target preview. */
|
|
8554
|
+
readonly slides?: readonly PptxSlide[];
|
|
8555
|
+
/** Zero-based active slide index for Zoom return navigation. */
|
|
8556
|
+
readonly currentSlideIndex?: number;
|
|
8557
|
+
/** Presentation-only Zoom tile activation callback. */
|
|
8558
|
+
readonly onZoomClick?: (targetSlideIndex: number, returnSlideIndex: number) => void;
|
|
8089
8559
|
/** Full slide canvas size in CSS px (elements are positioned in this space). */
|
|
8090
8560
|
readonly canvasSize: CanvasSize;
|
|
8091
8561
|
/**
|
|
@@ -8199,6 +8669,10 @@ interface SlideStageOptions {
|
|
|
8199
8669
|
smartArt3D?: boolean;
|
|
8200
8670
|
/** True only for the live presentation stage; see `ElementRenderContext.presenting`. */
|
|
8201
8671
|
presenting?: boolean;
|
|
8672
|
+
/** Full deck and active index used by presentation Zoom elements. */
|
|
8673
|
+
slides?: readonly PptxSlide[];
|
|
8674
|
+
currentSlideIndex?: number;
|
|
8675
|
+
onZoomClick?: (targetSlideIndex: number, returnSlideIndex: number) => void;
|
|
8202
8676
|
/**
|
|
8203
8677
|
* True only for the main (interactive) canvas, never the thumbnail rail.
|
|
8204
8678
|
* Marks every rendered element (recursively, including group children) with
|
|
@@ -8226,10 +8700,9 @@ declare function renderSlideStage(options: SlideStageOptions): HTMLElement;
|
|
|
8226
8700
|
* The registry the viewer uses by default.
|
|
8227
8701
|
*
|
|
8228
8702
|
* Dedicated renderers: `text`, `shape`, `image`, `picture`, `group`,
|
|
8229
|
-
* `connector`, `table`, `chart`, `smartArt`, `media`, `ink`, `ole
|
|
8230
|
-
*
|
|
8231
|
-
* to the typed placeholder fallback
|
|
8232
|
-
* `./README.md` for the contract to add one.
|
|
8703
|
+
* `connector`, `table`, `chart`, `smartArt`, `media`, `ink`, `ole`,
|
|
8704
|
+
* `contentPart`, `zoom`, and `model3d`. Only unknown extension elements fall
|
|
8705
|
+
* through to the typed placeholder fallback.
|
|
8233
8706
|
*/
|
|
8234
8707
|
declare function createDefaultRegistry(): ElementRendererRegistry;
|
|
8235
8708
|
//#endregion
|
|
@@ -8442,6 +8915,8 @@ interface PptxViewerOptions extends PptxViewerCallbacks {
|
|
|
8442
8915
|
* `loadFile` / `loadUrl` later.
|
|
8443
8916
|
*/
|
|
8444
8917
|
source?: PptxViewerSource;
|
|
8918
|
+
/** Licensed font sources supplied by the host application. */
|
|
8919
|
+
fonts?: ViewerFontSource[];
|
|
8445
8920
|
/** Viewer chrome theme (shared `ViewerTheme`: colors, radius, CSS vars). */
|
|
8446
8921
|
theme?: ViewerTheme;
|
|
8447
8922
|
/** Display name shown in the PowerPoint-style title bar. */
|
|
@@ -8530,7 +9005,7 @@ interface PptxViewerOptions extends PptxViewerCallbacks {
|
|
|
8530
9005
|
shareDefaults?: ShareDefaults;
|
|
8531
9006
|
}
|
|
8532
9007
|
/** The viewer handle returned by `createPptxViewer`. */
|
|
8533
|
-
interface PptxViewerInstance {
|
|
9008
|
+
interface PptxViewerInstance extends PowerPointViewerAPI {
|
|
8534
9009
|
/** Load a presentation from bytes or a Blob/File (replaces the current one). */
|
|
8535
9010
|
loadFile(file: Blob | ArrayBuffer | Uint8Array): Promise<void>;
|
|
8536
9011
|
/** Fetch and load a presentation from a URL. */
|
|
@@ -8548,7 +9023,7 @@ interface PptxViewerInstance {
|
|
|
8548
9023
|
/** Effective zoom scale (1 = 100%), after fit resolution. */
|
|
8549
9024
|
getZoom(): number;
|
|
8550
9025
|
/** Set an explicit zoom scale, or `'fit'` for fit-to-viewport. */
|
|
8551
|
-
setZoom(zoom:
|
|
9026
|
+
setZoom(zoom: number): void;
|
|
8552
9027
|
zoomIn(): void;
|
|
8553
9028
|
zoomOut(): void;
|
|
8554
9029
|
zoomToFit(): void;
|
|
@@ -8677,6 +9152,7 @@ interface ChromeHost {
|
|
|
8677
9152
|
goToSlide(index: number): void;
|
|
8678
9153
|
getSlideCount(): number;
|
|
8679
9154
|
enterPresentation(): Promise<void>;
|
|
9155
|
+
openPresenterView(): void;
|
|
8680
9156
|
exitPresentation(): Promise<void>;
|
|
8681
9157
|
openBroadcast(): void;
|
|
8682
9158
|
openAccessibility(): void;
|
|
@@ -8744,6 +9220,13 @@ declare class PptxViewer extends ViewerExportHost implements PptxViewerInstance,
|
|
|
8744
9220
|
private readonly sessions;
|
|
8745
9221
|
private readonly controls;
|
|
8746
9222
|
private destroyed;
|
|
9223
|
+
private presenterChannel;
|
|
9224
|
+
private audienceWindow;
|
|
9225
|
+
private presenterSessionId;
|
|
9226
|
+
private presenterSequence;
|
|
9227
|
+
private presenterSnapshot;
|
|
9228
|
+
private disposePresenterConsole;
|
|
9229
|
+
private userFontsStyle;
|
|
8747
9230
|
constructor(container: HTMLElement, options?: PptxViewerOptions);
|
|
8748
9231
|
loadFile(file: Blob | ArrayBuffer | Uint8Array): Promise<void>;
|
|
8749
9232
|
loadUrl(url: string): Promise<void>;
|
|
@@ -8753,15 +9236,50 @@ declare class PptxViewer extends ViewerExportHost implements PptxViewerInstance,
|
|
|
8753
9236
|
getSlideCount: () => number;
|
|
8754
9237
|
getCurrentSlide: () => number;
|
|
8755
9238
|
getZoom: () => number;
|
|
8756
|
-
setZoom(zoom:
|
|
9239
|
+
setZoom(zoom: number): void;
|
|
8757
9240
|
zoomIn: () => void;
|
|
8758
9241
|
zoomOut: () => void;
|
|
8759
9242
|
zoomToFit: () => void;
|
|
9243
|
+
zoomReset: () => void;
|
|
9244
|
+
goTo: (index: number) => void;
|
|
9245
|
+
goPrev: () => void;
|
|
9246
|
+
goNext: () => void;
|
|
9247
|
+
getContent: () => Promise<Uint8Array>;
|
|
9248
|
+
getMode: () => ViewerMode;
|
|
9249
|
+
setMode: (mode: ViewerMode) => void;
|
|
9250
|
+
getActiveSlideIndex: () => number;
|
|
9251
|
+
setActiveSlideIndex: (index: number) => void;
|
|
9252
|
+
isDirty: () => boolean;
|
|
9253
|
+
getSlides: () => readonly PptxSlide[];
|
|
9254
|
+
getSlide: (index: number) => PptxSlide | undefined;
|
|
9255
|
+
getActiveSlide: () => PptxSlide | undefined;
|
|
9256
|
+
getElements: (index?: number) => readonly PptxElement[];
|
|
9257
|
+
getElementById: (id: string, index?: number) => PptxElement | undefined;
|
|
9258
|
+
updateElement: (id: string, updates: Partial<PptxElement>) => void;
|
|
9259
|
+
deleteElements: (ids: string[]) => void;
|
|
9260
|
+
duplicateElement: (id: string) => string | undefined;
|
|
9261
|
+
getSelectedElementIds: () => string[];
|
|
9262
|
+
selectElements: (ids: string[]) => void;
|
|
9263
|
+
clearSelection: () => void;
|
|
9264
|
+
addSlide: (afterIndex?: number) => void;
|
|
9265
|
+
deleteSlides: (indexes: number[]) => void;
|
|
9266
|
+
duplicateSlides: (indexes: number[]) => void;
|
|
9267
|
+
moveSlide: (fromIndex: number, toIndex: number) => void;
|
|
9268
|
+
toggleHideSlides: (indexes: number[]) => void;
|
|
9269
|
+
private renumber;
|
|
8760
9270
|
/** Expand/collapse the speaker-notes panel; persists for the instance's life. */
|
|
8761
9271
|
toggleNotes(): void;
|
|
8762
9272
|
setTheme(theme: ViewerTheme | undefined): void;
|
|
8763
9273
|
/** Run the shared WCAG checks against the live deck and show the results. */
|
|
8764
9274
|
openAccessibility(): void;
|
|
9275
|
+
/** Open a clean audience display while retaining this editor as the presenter surface. */
|
|
9276
|
+
openPresenterView(): void;
|
|
9277
|
+
private getPresenterChannel;
|
|
9278
|
+
private isAudienceWindowOpen;
|
|
9279
|
+
private syncAudience;
|
|
9280
|
+
private updatePresenterSnapshot;
|
|
9281
|
+
private connectAudienceRole;
|
|
9282
|
+
private closeAudienceWindow;
|
|
8765
9283
|
setLocale(locale: string): void;
|
|
8766
9284
|
setEditable(editable: boolean): void;
|
|
8767
9285
|
setEditTemplateMode(enabled: boolean): void;
|
|
@@ -8822,5 +9340,5 @@ type TranslationKey = keyof typeof translationsEn;
|
|
|
8822
9340
|
*/
|
|
8823
9341
|
declare function keyToLabel(key: string): string;
|
|
8824
9342
|
//#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 };
|
|
9343
|
+
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, loadPresentationDeck, parsePresentationSessionId, renderSlideStage, themeToCssVars, translationsEn, vermilionDarkTheme, vermilionLightTheme };
|
|
8826
9344
|
//# sourceMappingURL=index.d.ts.map
|