pptx-svelte-viewer 0.8.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.
Files changed (76) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist/dist-JuzVOe21.js +58408 -0
  3. package/dist/export-DCrIiPyO.js +36824 -0
  4. package/dist/index.d.ts +1976 -161
  5. package/dist/index.d.ts.map +1 -1
  6. package/dist/index.js +21 -16
  7. package/dist/viewer/compare/compare-controller.svelte.d.ts +15 -0
  8. package/dist/viewer/compare/compare-controller.svelte.d.ts.map +1 -0
  9. package/dist/viewer/components/inspector/media-preview.d.ts +3 -0
  10. package/dist/viewer/components/inspector/media-preview.d.ts.map +1 -0
  11. package/dist/viewer/components/inspector/table-structure.d.ts +6 -0
  12. package/dist/viewer/components/inspector/table-structure.d.ts.map +1 -0
  13. package/dist/viewer/components/props.d.ts +12 -1
  14. package/dist/viewer/components/props.d.ts.map +1 -1
  15. package/dist/viewer/components/ribbon/animations/animation-preview-player.d.ts +3 -0
  16. package/dist/viewer/components/ribbon/animations/animation-preview-player.d.ts.map +1 -0
  17. package/dist/viewer/components/ribbon/animations/animation-timeline-editing.d.ts +3 -0
  18. package/dist/viewer/components/ribbon/animations/animation-timeline-editing.d.ts.map +1 -0
  19. package/dist/viewer/components/ribbon/ribbon-types.d.ts +32 -1
  20. package/dist/viewer/components/ribbon/ribbon-types.d.ts.map +1 -1
  21. package/dist/viewer/editor/editing-api.d.ts +4 -1
  22. package/dist/viewer/editor/editing-api.d.ts.map +1 -1
  23. package/dist/viewer/editor/editor-controller-deps.d.ts +16 -0
  24. package/dist/viewer/editor/editor-controller-deps.d.ts.map +1 -0
  25. package/dist/viewer/editor/editor-controller.svelte.d.ts +2 -9
  26. package/dist/viewer/editor/editor-controller.svelte.d.ts.map +1 -1
  27. package/dist/viewer/editor/editor-document-state.d.ts +9 -2
  28. package/dist/viewer/editor/editor-document-state.d.ts.map +1 -1
  29. package/dist/viewer/editor/editor-gestures.d.ts +7 -0
  30. package/dist/viewer/editor/editor-gestures.d.ts.map +1 -1
  31. package/dist/viewer/editor/editor-presentation-metadata.svelte.d.ts +20 -0
  32. package/dist/viewer/editor/editor-presentation-metadata.svelte.d.ts.map +1 -0
  33. package/dist/viewer/editor/editor-section-controller.d.ts +17 -0
  34. package/dist/viewer/editor/editor-section-controller.d.ts.map +1 -0
  35. package/dist/viewer/editor/editor-state.svelte.d.ts +15 -3
  36. package/dist/viewer/editor/editor-state.svelte.d.ts.map +1 -1
  37. package/dist/viewer/export/export-controller.svelte.d.ts +2 -0
  38. package/dist/viewer/export/export-controller.svelte.d.ts.map +1 -1
  39. package/dist/viewer/export/export-print.d.ts +6 -3
  40. package/dist/viewer/export/export-print.d.ts.map +1 -1
  41. package/dist/viewer/export/export-svg.d.ts +14 -0
  42. package/dist/viewer/export/export-svg.d.ts.map +1 -0
  43. package/dist/viewer/export/export-ui.svelte.d.ts +4 -1
  44. package/dist/viewer/export/export-ui.svelte.d.ts.map +1 -1
  45. package/dist/viewer/export/exporting-api.d.ts +1 -0
  46. package/dist/viewer/export/exporting-api.d.ts.map +1 -1
  47. package/dist/viewer/export/index.d.ts +3 -0
  48. package/dist/viewer/export/index.d.ts.map +1 -1
  49. package/dist/viewer/export/package-sharing.d.ts +3 -0
  50. package/dist/viewer/export/package-sharing.d.ts.map +1 -0
  51. package/dist/viewer/index.d.ts +649 -111
  52. package/dist/viewer/index.d.ts.map +1 -1
  53. package/dist/viewer/index.js +14 -9
  54. package/dist/viewer/presentation/animation-playback.svelte.d.ts +2 -0
  55. package/dist/viewer/presentation/animation-playback.svelte.d.ts.map +1 -1
  56. package/dist/viewer/presentation/presentation-annotations.svelte.d.ts +28 -0
  57. package/dist/viewer/presentation/presentation-annotations.svelte.d.ts.map +1 -0
  58. package/dist/viewer/presentation/presentation-controller.svelte.d.ts +2 -0
  59. package/dist/viewer/presentation/presentation-controller.svelte.d.ts.map +1 -1
  60. package/dist/viewer/presentation/rehearse-state.svelte.d.ts +20 -0
  61. package/dist/viewer/presentation/rehearse-state.svelte.d.ts.map +1 -0
  62. package/dist/viewer/render/smartart-view.d.ts +2 -0
  63. package/dist/viewer/render/smartart-view.d.ts.map +1 -1
  64. package/dist/viewer/render/zoom-view.d.ts +1 -1
  65. package/dist/viewer/render/zoom-view.d.ts.map +1 -1
  66. package/dist/viewer/state/autosave.svelte.d.ts +2 -1
  67. package/dist/viewer/state/autosave.svelte.d.ts.map +1 -1
  68. package/dist/viewer/state/presentation-loader.svelte.d.ts +15 -1
  69. package/dist/viewer/state/presentation-loader.svelte.d.ts.map +1 -1
  70. package/dist/viewer/state/viewer-effects.svelte.d.ts.map +1 -1
  71. package/dist/viewer/state/viewer-parity-ui.svelte.d.ts +32 -0
  72. package/dist/viewer/state/viewer-parity-ui.svelte.d.ts.map +1 -0
  73. package/dist/viewer/types.d.ts +6 -1
  74. package/dist/viewer/types.d.ts.map +1 -1
  75. package/package.json +2 -1
  76. package/dist/component-rAnX8oL7.js +0 -79747
@@ -1,84 +1,5 @@
1
1
  import { Component } from 'svelte';
2
2
 
3
- /**
4
- * Theme configuration types for the PowerPoint viewer.
5
- *
6
- * All color values accept any valid CSS color string:
7
- * hex (`#6366f1`), rgb (`rgb(99 102 241)`), hsl (`hsl(239 84% 67%)`),
8
- * oklch (`oklch(0.585 0.233 277)`), named colors, etc.
9
- *
10
- * Framework-agnostic — shared by the React, Vue, and Angular bindings.
11
- */
12
- /**
13
- * Semantic color tokens for the viewer UI.
14
- *
15
- * These map to CSS custom properties (`--pptx-<token>`) and drive all
16
- * UI component colors. The naming follows the shadcn/ui convention so
17
- * that Tailwind + shadcn users get a familiar experience.
18
- */
19
- interface ViewerThemeColors {
20
- /** Page / root background */
21
- background: string;
22
- /** Default text color */
23
- foreground: string;
24
- /** Card / panel surface */
25
- card: string;
26
- /** Text on card surfaces */
27
- cardForeground: string;
28
- /** Popover / dropdown surface */
29
- popover: string;
30
- /** Text inside popovers */
31
- popoverForeground: string;
32
- /** Primary action color (buttons, active indicators) */
33
- primary: string;
34
- /** Text on primary-colored backgrounds */
35
- primaryForeground: string;
36
- /** Secondary / subdued action color */
37
- secondary: string;
38
- /** Text on secondary backgrounds */
39
- secondaryForeground: string;
40
- /** Muted / disabled surface */
41
- muted: string;
42
- /** Text on muted surfaces (also used for secondary text) */
43
- mutedForeground: string;
44
- /** Accent / hover-highlight surface */
45
- accent: string;
46
- /** Text on accent surfaces */
47
- accentForeground: string;
48
- /** Destructive / danger action color */
49
- destructive: string;
50
- /** Text on destructive backgrounds */
51
- destructiveForeground: string;
52
- /** Default border color */
53
- border: string;
54
- /** Input field border color */
55
- input: string;
56
- /** Focus ring color */
57
- ring: string;
58
- }
59
- /**
60
- * Full viewer theme configuration.
61
- *
62
- * Every property is optional — unset values fall back to the built-in
63
- * dark theme defaults.
64
- */
65
- interface ViewerTheme {
66
- /** Semantic UI colors. Each key maps to a `--pptx-<key>` CSS custom property. */
67
- colors?: Partial<ViewerThemeColors>;
68
- /** Base border-radius value (e.g. `"0.5rem"`, `"8px"`). */
69
- radius?: string;
70
- /**
71
- * Escape hatch: arbitrary CSS custom properties to set on the viewer
72
- * root element. Keys should include the `--` prefix.
73
- *
74
- * @example
75
- * ```ts
76
- * { "--my-custom-shadow": "0 4px 12px rgba(0,0,0,0.5)" }
77
- * ```
78
- */
79
- cssVars?: Record<string, string>;
80
- }
81
-
82
3
  /**
83
4
  * Action types: hyperlinks, slide jumps, macros, and action buttons.
84
5
  *
@@ -436,6 +357,8 @@ interface CustomGeometryPath {
436
357
  * and the text rectangle are not lost when a custGeom is edited and saved.
437
358
  */
438
359
  interface CustomGeometryRawData {
360
+ /** Raw `a:avLst` XML content (adjustment value list). */
361
+ avLstXml?: unknown;
439
362
  /** Raw `a:gdLst` XML content (guide list). */
440
363
  gdLstXml?: unknown;
441
364
  /** Raw `a:ahLst` XML content (adjustment handles). */
@@ -576,7 +499,7 @@ interface PptxCustomPathProperties {
576
499
  pathHeight?: number;
577
500
  /** Structured custom geometry paths for editing (maps to a:custGeom/a:pathLst). */
578
501
  customGeometryPaths?: CustomGeometryPath[];
579
- /** Raw a:gdLst/a:ahLst/a:cxnLst/a:rect XML preserved for round-trip serialization. */
502
+ /** Raw adjustment/guide/handle/connection/text-rectangle XML preserved for serialization. */
580
503
  customGeometryRawData?: CustomGeometryRawData;
581
504
  /**
582
505
  * Typed XY adjustment handles parsed from `a:custGeom/a:ahLst/a:ahXY`.
@@ -787,6 +710,12 @@ type PptxTextWarpPreset = 'textNoShape' | 'textPlain' | 'textStop' | 'textTriang
787
710
  * @module pptx-types/shape-style
788
711
  */
789
712
 
713
+ interface PptxCustomDashSegment {
714
+ /** Dash length as a non-negative percentage in thousandths of one percent. */
715
+ dash: number;
716
+ /** Space length as a non-negative percentage in thousandths of one percent. */
717
+ space: number;
718
+ }
790
719
  /**
791
720
  * Comprehensive visual style for a shape, connector, or image element.
792
721
  *
@@ -1019,11 +948,12 @@ interface ShapeStyle {
1019
948
  connectorStartConnection?: ConnectorConnectionPoint;
1020
949
  /** Connection point for the end of a connector. */
1021
950
  connectorEndConnection?: ConnectorConnectionPoint;
1022
- /** Custom dash segments array (`a:custDash/a:ds`). Each entry has dash length and space length in EMU. */
1023
- customDashSegments?: Array<{
1024
- dash: number;
1025
- space: number;
1026
- }>;
951
+ /** Custom dash pattern, measured relative to line width in thousandths of one percent. */
952
+ customDashSegments?: PptxCustomDashSegment[];
953
+ /** Original `a:ds` payloads retained by index for lossless edits. */
954
+ customDashSegmentXml?: XmlObject[];
955
+ /** Original `a:custDash` payload retained for lossless edits. */
956
+ customDashXml?: XmlObject;
1027
957
  /** 3D scene/camera settings from `a:scene3d`. */
1028
958
  scene3d?: Pptx3DScene;
1029
959
  /** 3D shape extrusion/bevel from `a:sp3d`. */
@@ -1135,6 +1065,8 @@ interface ShapeStyle {
1135
1065
  * ```
1136
1066
  */
1137
1067
  interface TextStyle {
1068
+ /** Original `a:rPr` XML retained by projections that share the shape-text model. */
1069
+ runPropertiesXml?: XmlObject;
1138
1070
  fontFamily?: string;
1139
1071
  fontSize?: number;
1140
1072
  /** When true, renderer should shrink text to fit the shape bounds. */
@@ -1877,10 +1809,104 @@ interface PptxChartAxisLabelFormatting {
1877
1809
  labelAlignment?: 'ctr' | 'l' | 'r';
1878
1810
  /** Category/date label distance, from 0 through 1000 percent. */
1879
1811
  labelOffset?: number;
1812
+ /** Number of category/date labels between rendered labels. */
1813
+ tickLabelSkip?: number;
1814
+ /** Number of category/date tick positions between major tick marks. */
1815
+ tickMarkSkip?: number;
1880
1816
  /** Suppress multi-level category labels (`c:noMultiLvlLbl`). */
1881
1817
  noMultiLevelLabels?: boolean;
1882
1818
  }
1883
1819
 
1820
+ interface PptxChartPivotFormat {
1821
+ index: number;
1822
+ shapePropertiesXml?: XmlObject | null;
1823
+ markerXml?: XmlObject | null;
1824
+ dataLabelXml?: XmlObject | null;
1825
+ extensionListXml?: XmlObject | null;
1826
+ rawXml?: XmlObject;
1827
+ }
1828
+ /** Editable classic ChartML `c:pivotFmts` collection. */
1829
+ interface PptxChartPivotFormats {
1830
+ formats: PptxChartPivotFormat[];
1831
+ rawXml?: XmlObject;
1832
+ }
1833
+
1834
+ /** Editable classic ChartML `c:pivotSource` metadata. */
1835
+ interface PptxChartPivotSource {
1836
+ /** Pivot table reference stored as `c:name` text. */
1837
+ name: string;
1838
+ /** Required unsigned format identifier stored in `c:fmtId/@val`. */
1839
+ formatId: number;
1840
+ /** Internal source subtree used to preserve extensions and foreign markup. */
1841
+ rawXml?: XmlObject;
1842
+ }
1843
+
1844
+ /** Headers and footers used when a classic ChartML chart is printed. */
1845
+ interface PptxChartPrintHeaderFooter {
1846
+ oddHeader?: string;
1847
+ oddFooter?: string;
1848
+ evenHeader?: string;
1849
+ evenFooter?: string;
1850
+ firstHeader?: string;
1851
+ firstFooter?: string;
1852
+ alignWithMargins?: boolean;
1853
+ differentOddEven?: boolean;
1854
+ differentFirst?: boolean;
1855
+ /** Original subtree retained for foreign attributes and extension children. */
1856
+ rawXml?: unknown;
1857
+ }
1858
+ /** Required page margins from ChartML `c:pageMargins`, measured in inches. */
1859
+ interface PptxChartPageMargins {
1860
+ left: number;
1861
+ right: number;
1862
+ top: number;
1863
+ bottom: number;
1864
+ header: number;
1865
+ footer: number;
1866
+ /** Original leaf retained for foreign attributes. */
1867
+ rawXml?: unknown;
1868
+ }
1869
+ /** Printer page configuration from ChartML `c:pageSetup`. */
1870
+ interface PptxChartPageSetup {
1871
+ paperSize?: number;
1872
+ firstPageNumber?: number;
1873
+ orientation?: 'default' | 'portrait' | 'landscape';
1874
+ blackAndWhite?: boolean;
1875
+ draft?: boolean;
1876
+ useFirstPageNumber?: boolean;
1877
+ horizontalDpi?: number;
1878
+ verticalDpi?: number;
1879
+ copies?: number;
1880
+ /** Original leaf retained for foreign attributes. */
1881
+ rawXml?: unknown;
1882
+ }
1883
+ /** Editable `c:printSettings` content from a classic ChartML chart space. */
1884
+ interface PptxChartPrintSettings {
1885
+ headerFooter?: PptxChartPrintHeaderFooter | null;
1886
+ pageMargins?: PptxChartPageMargins | null;
1887
+ pageSetup?: PptxChartPageSetup | null;
1888
+ /** `null` removes the legacy header/footer drawing relationship element. */
1889
+ legacyDrawingHeaderFooterRelationshipId?: string | null;
1890
+ /** Original subtree retained for unknown and extension content. */
1891
+ rawXml?: unknown;
1892
+ }
1893
+
1894
+ /** Editable classic ChartML `c:protection` settings. */
1895
+ interface PptxChartProtection {
1896
+ /** Prevent editing the chart object. */
1897
+ chartObject?: boolean | null;
1898
+ /** Prevent editing the chart data. */
1899
+ data?: boolean | null;
1900
+ /** Prevent editing chart formatting. */
1901
+ formatting?: boolean | null;
1902
+ /** Prevent selecting chart elements. */
1903
+ selection?: boolean | null;
1904
+ /** Prevent chart user-interface operations. */
1905
+ userInterface?: boolean | null;
1906
+ /** Internal source subtree used to preserve foreign markup during edits. */
1907
+ rawXml?: XmlObject;
1908
+ }
1909
+
1884
1910
  /**
1885
1911
  * Chart types: chart categories, series data, style metadata, data tables,
1886
1912
  * trendlines, error bars, and the composite `PptxChartData`.
@@ -2037,6 +2063,7 @@ interface PptxChartUpDownBars {
2037
2063
  /** Marker appearance on a chart series or data point. */
2038
2064
  interface PptxChartMarker {
2039
2065
  symbol: PptxChartMarkerSymbol;
2066
+ /** Marker size in points, constrained by ST_MarkerSize to 2 through 72. */
2040
2067
  size?: number;
2041
2068
  spPr?: PptxChartShapeProps;
2042
2069
  }
@@ -2047,6 +2074,8 @@ interface PptxChartDataPoint {
2047
2074
  explosion?: number;
2048
2075
  invertIfNegative?: boolean;
2049
2076
  marker?: PptxChartMarker;
2077
+ /** Render a bubble-chart point with a 3-D appearance. */
2078
+ bubble3D?: boolean;
2050
2079
  }
2051
2080
  /** Schema values accepted by `c:dLblPos`. */
2052
2081
  type PptxChartDataLabelPosition = 'bestFit' | 'b' | 'ctr' | 'inBase' | 'inEnd' | 'l' | 'outEnd' | 'r' | 't';
@@ -2089,6 +2118,12 @@ interface PptxChartAxisFormatting extends PptxChartAxisLabelFormatting {
2089
2118
  axisId?: number;
2090
2119
  /** Cross-axis identifier — the axis this axis crosses. */
2091
2120
  crossAxisId?: number;
2121
+ /** Automatic crossing mode (`c:crosses`). Mutually exclusive with `crossesAt`. */
2122
+ crosses?: 'autoZero' | 'min' | 'max';
2123
+ /** Explicit crossing value (`c:crossesAt`). Units depend on the axis type. */
2124
+ crossesAt?: number;
2125
+ /** Whether a value axis crosses between or at category tick marks. */
2126
+ crossBetween?: 'between' | 'midCat';
2092
2127
  numFmt?: PptxChartAxisNumFmt;
2093
2128
  titleText?: string;
2094
2129
  spPr?: PptxChartShapeProps;
@@ -2106,6 +2141,8 @@ interface PptxChartAxisFormatting extends PptxChartAxisLabelFormatting {
2106
2141
  min?: number;
2107
2142
  /** Maximum axis value override (c:max/@val). */
2108
2143
  max?: number;
2144
+ /** Axis value direction (`c:scaling/c:orientation/@val`). */
2145
+ orientation?: 'minMax' | 'maxMin';
2109
2146
  /** Whether the axis is deleted/hidden (c:delete/@val). */
2110
2147
  deleted?: boolean;
2111
2148
  /**
@@ -2129,12 +2166,69 @@ interface PptxChartAxisFormatting extends PptxChartAxisLabelFormatting {
2129
2166
  majorUnit?: number;
2130
2167
  /** Minor-unit interval between secondary tick marks (c:minorUnit/@val). */
2131
2168
  minorUnit?: number;
2169
+ /** Calendar unit used to interpret date-axis serial values. */
2170
+ baseTimeUnit?: 'days' | 'months' | 'years';
2171
+ majorTimeUnit?: 'days' | 'months' | 'years';
2172
+ minorTimeUnit?: 'days' | 'months' | 'years';
2132
2173
  }
2133
2174
  /** 3D wall or floor element formatting. */
2134
2175
  interface PptxChart3DSurface {
2135
2176
  thickness?: number;
2136
2177
  spPr?: PptxChartShapeProps;
2137
2178
  }
2179
+ /** Office 2016 ChartEx box-and-whisker series layout options. */
2180
+ interface PptxChartBoxWhiskerOptions {
2181
+ quartileMethod?: 'inclusive' | 'exclusive';
2182
+ showMeanLine?: boolean;
2183
+ showMeanMarker?: boolean;
2184
+ /** Show non-outlier (inner) data points. */
2185
+ showInnerPoints?: boolean;
2186
+ showOutlierPoints?: boolean;
2187
+ }
2188
+ /** Office 2016 ChartEx histogram and Pareto series layout options. */
2189
+ interface PptxChartHistogramOptions {
2190
+ /** Maps to `clusteredColumn` for histogram columns or `paretoLine`. */
2191
+ layout?: 'histogram' | 'pareto';
2192
+ /** Exactly one of binSize and binCount is emitted by the ChartEx writer. */
2193
+ binSize?: number;
2194
+ binCount?: number;
2195
+ intervalClosed?: 'l' | 'r';
2196
+ underflow?: number | 'auto';
2197
+ overflow?: number | 'auto';
2198
+ }
2199
+ /** Office 2016 ChartEx waterfall series layout options. */
2200
+ interface PptxChartWaterfallOptions {
2201
+ /** Zero-based data point indexes rendered as absolute subtotal or total bars. */
2202
+ subtotalIndices?: number[];
2203
+ /** Whether connector lines are visible between adjacent bars. */
2204
+ connectorLines?: boolean;
2205
+ }
2206
+ /** Office 2016 ChartEx geographic series dimensions and layout options. */
2207
+ interface PptxChartRegionMapOptions {
2208
+ /** Optional provider entity identifiers aligned with categories and values. */
2209
+ entityIds?: string[];
2210
+ /** Original `cx:pt/@idx` values for category points. */
2211
+ categorySourceIndices?: number[];
2212
+ /** Original `cx:pt/@idx` values for colour-value points. */
2213
+ valueSourceIndices?: number[];
2214
+ /** Original `cx:pt/@idx` values for entity-ID points. */
2215
+ entityIdSourceIndices?: number[];
2216
+ regionLabelLayout?: 'none' | 'bestFitOnly' | 'showAll';
2217
+ projectionType?: 'mercator' | 'miller' | 'robinson' | 'albers';
2218
+ viewedRegionType?: 'dataOnly' | 'postalCode' | 'county' | 'state' | 'countryRegion' | 'countryRegionList' | 'world';
2219
+ cultureLanguage?: string;
2220
+ /** ISO-3166-1 alpha-2 region code. */
2221
+ cultureRegion?: string;
2222
+ attribution?: string;
2223
+ /** Opaque authored provider cache under `cx:geography/cx:geoCache`. */
2224
+ geographyCache?: XmlObject;
2225
+ }
2226
+ /** Layout for parent category labels in a hierarchical ChartEx treemap. */
2227
+ type PptxChartParentLabelLayout = 'none' | 'banner' | 'overlapping';
2228
+ /** Per-series layout options for an Office 2016+ ChartEx treemap. */
2229
+ interface PptxChartTreemapOptions {
2230
+ parentLabelLayout?: PptxChartParentLabelLayout;
2231
+ }
2138
2232
  /**
2139
2233
  * A single data series within a chart.
2140
2234
  *
@@ -2170,6 +2264,11 @@ interface PptxChartSeries {
2170
2264
  * series.
2171
2265
  */
2172
2266
  seriesChartType?: PptxChartType;
2267
+ boxWhiskerOptions?: PptxChartBoxWhiskerOptions;
2268
+ histogramOptions?: PptxChartHistogramOptions;
2269
+ waterfallOptions?: PptxChartWaterfallOptions;
2270
+ regionMapOptions?: PptxChartRegionMapOptions;
2271
+ treemapOptions?: PptxChartTreemapOptions;
2173
2272
  }
2174
2273
  /**
2175
2274
  * Chart-level data-label options (`c:dLbls` directly under a chart-type
@@ -2375,6 +2474,16 @@ interface PptxEmbeddedWorkbookData {
2375
2474
  name: string;
2376
2475
  values: number[];
2377
2476
  }>;
2477
+ /** Whether the workbook uses the 1904 date system. */
2478
+ date1904?: boolean;
2479
+ }
2480
+ /** Raw numeric category cache used by a classic ChartML date axis. */
2481
+ interface PptxChartDateCategories {
2482
+ values: number[];
2483
+ /** False/default uses Excel's 1900 date system; true uses the 1904 system. */
2484
+ date1904?: boolean;
2485
+ /** Number format copied from the numeric category cache. */
2486
+ formatCode?: string;
2378
2487
  }
2379
2488
  /**
2380
2489
  * Complete parsed chart data for a {@link ChartPptxElement}.
@@ -2398,6 +2507,13 @@ interface PptxChartData {
2398
2507
  title?: string;
2399
2508
  chartType: PptxChartType;
2400
2509
  categories: string[];
2510
+ /**
2511
+ * Hierarchical category levels in source XML order for ChartEx hierarchy charts.
2512
+ * Level 0 contains the leaf labels and remains mirrored by {@link categories}
2513
+ * for consumers that only understand a flat category axis.
2514
+ */
2515
+ categoryLevels?: string[][];
2516
+ dateCategories?: PptxChartDateCategories;
2401
2517
  series: PptxChartSeries[];
2402
2518
  /** Chart style/formatting metadata. */
2403
2519
  style?: PptxChartStyle;
@@ -2434,12 +2550,7 @@ interface PptxChartData {
2434
2550
  * The chart still renders using its cached series data; this field
2435
2551
  * is metadata about the data origin, preserved for round-trip fidelity.
2436
2552
  */
2437
- pivotSource?: {
2438
- /** Pivot table reference name, e.g. "[workbook.xlsx]Sheet1!PivotTable1". */
2439
- name: string;
2440
- /** Format identifier from c:fmtId/@val. */
2441
- formatId?: number;
2442
- };
2553
+ pivotSource?: PptxChartPivotSource | null;
2443
2554
  /**
2444
2555
  * Whether only visible cells are plotted (c:plotVisOnly).
2445
2556
  * When `true` (the default), hidden cells are excluded from the chart.
@@ -2462,6 +2573,12 @@ interface PptxChartData {
2462
2573
  * - `"acrossLinear"` — gradient across series
2463
2574
  */
2464
2575
  colorMethod?: 'cycle' | 'withinLinear' | 'acrossLinear';
2576
+ /** Internal source color-style part path used for lossless dirty saves. */
2577
+ colorStylePartPath?: string;
2578
+ /** Internal parsed palette snapshot used to detect actual edits. */
2579
+ colorStyleOriginalPalette?: string[];
2580
+ /** Internal parsed method snapshot used to detect actual edits. */
2581
+ colorStyleOriginalMethod?: 'cycle' | 'withinLinear' | 'acrossLinear';
2465
2582
  /**
2466
2583
  * Pie-of-pie / Bar-of-pie options (`c:ofPieChart`, CT_OfPieChart).
2467
2584
  *
@@ -2487,6 +2604,10 @@ interface PptxChartData {
2487
2604
  * source data, so absence does not produce empty `<c:…/>` placeholders.
2488
2605
  */
2489
2606
  chartChrome?: PptxChartChrome;
2607
+ /** `c:chartSpace/c:printSettings`; `null` removes the container on save. */
2608
+ printSettings?: PptxChartPrintSettings | null;
2609
+ /** `c:chartSpace/c:protection`; `null` removes the container on save. */
2610
+ protection?: PptxChartProtection | null;
2490
2611
  /** Editable manual placement for the title, plot area, and legend. */
2491
2612
  layouts?: PptxChartLayouts;
2492
2613
  /**
@@ -2505,7 +2626,8 @@ interface PptxChartData {
2505
2626
  * for charts whose data originates from a PivotTable. Preserved
2506
2627
  * verbatim for round-trip fidelity.
2507
2628
  */
2508
- pivotFmtsXml?: unknown;
2629
+ /** Typed pivot-chart format persistence; `null` removes `c:pivotFmts`. */
2630
+ pivotFormats?: PptxChartPivotFormats | null;
2509
2631
  /**
2510
2632
  * Color-map override (`c:clrMapOvr`) carrying 12 attributes that
2511
2633
  * remap theme colour roles for this chart only. Preserved as a flat
@@ -2516,7 +2638,7 @@ interface PptxChartData {
2516
2638
 
2517
2639
  type EffectDagBlendMode = 'darken' | 'lighten' | 'mult' | 'over' | 'screen';
2518
2640
  type EffectDagContainerType = 'sib' | 'tree';
2519
- type EffectDagNode = EffectDagContainer | EffectDagBlend | EffectDagXfrm | EffectDagRelOff | EffectDagBlur | EffectDagPresetShadow | EffectDagRawLeaf;
2641
+ type EffectDagNode = EffectDagContainer | EffectDagBlend | EffectDagXfrm | EffectDagRelOff | EffectDagBlur | EffectDagAlphaOutset | EffectDagPresetShadow | EffectDagRawLeaf;
2520
2642
  interface EffectDagContainer {
2521
2643
  kind: 'cont';
2522
2644
  type: EffectDagContainerType;
@@ -2549,6 +2671,12 @@ interface EffectDagBlur {
2549
2671
  grow?: boolean;
2550
2672
  xml: XmlObject;
2551
2673
  }
2674
+ /** Typed CT_AlphaOutsetEffect with original XML retained for lossless edits. */
2675
+ interface EffectDagAlphaOutset {
2676
+ kind: 'alphaOutset';
2677
+ radiusEmu?: number;
2678
+ xml: XmlObject;
2679
+ }
2552
2680
  /** Typed CT_PresetShadowEffect with colour and extension XML retained verbatim. */
2553
2681
  interface EffectDagPresetShadow {
2554
2682
  kind: 'prstShdw';
@@ -2588,6 +2716,8 @@ interface PptxImageEffects {
2588
2716
  duotone?: {
2589
2717
  color1: string;
2590
2718
  color2: string;
2719
+ /** Original effect XML, retained while the resolved colours are unchanged. */
2720
+ rawXml?: XmlObject;
2591
2721
  };
2592
2722
  /** Grayscale flag. */
2593
2723
  grayscale?: boolean;
@@ -2602,8 +2732,10 @@ interface PptxImageEffects {
2602
2732
  artisticEffect?: string;
2603
2733
  /** Artistic effect radius/amount. */
2604
2734
  artisticRadius?: number;
2605
- /** Alpha modulation fixed overall opacity (0-100, where 100 = fully opaque). */
2735
+ /** Alpha modulation fixed: non-negative percentage (100 means unchanged opacity). */
2606
2736
  alphaModFix?: number;
2737
+ /** Original alpha modulation fixed node, including foreign attributes. */
2738
+ alphaModFixRawXml?: XmlObject;
2607
2739
  /** Bi-level threshold — converts to 1-bit black/white (0-100). */
2608
2740
  biLevel?: number;
2609
2741
  /** Colour change — swap one colour range for another (used for transparency keying). */
@@ -2612,7 +2744,13 @@ interface PptxImageEffects {
2612
2744
  clrTo: string;
2613
2745
  /** Whether the target colour is fully transparent (alpha = 0). */
2614
2746
  clrToTransparent?: boolean;
2747
+ /** Original effect XML, including colour transforms and extensions. */
2748
+ rawXml?: XmlObject;
2615
2749
  };
2750
+ /** Original grayscale node, including extension or foreign attributes. */
2751
+ grayscaleRawXml?: XmlObject;
2752
+ /** Original bi-level node, including extension or foreign attributes. */
2753
+ biLevelRawXml?: XmlObject;
2616
2754
  /**
2617
2755
  * Alpha inverse effect (`a:alphaInv`). Inverts the alpha channel; an optional
2618
2756
  * colour child shifts the inversion baseline.
@@ -2620,11 +2758,17 @@ interface PptxImageEffects {
2620
2758
  alphaInv?: {
2621
2759
  /** Optional baseline colour (hex). */
2622
2760
  color?: string;
2761
+ /** Original effect XML, including colour transforms and foreign attributes. */
2762
+ rawXml?: XmlObject;
2623
2763
  };
2624
2764
  /** Alpha ceiling (`a:alphaCeiling`) — clamps any non-zero alpha to fully opaque. Boolean flag. */
2625
2765
  alphaCeiling?: boolean;
2766
+ /** Original alpha ceiling node, including foreign attributes. */
2767
+ alphaCeilingRawXml?: XmlObject;
2626
2768
  /** Alpha floor (`a:alphaFloor`) — clamps any non-fully-opaque alpha to fully transparent. Boolean flag. */
2627
2769
  alphaFloor?: boolean;
2770
+ /** Original alpha floor node, including foreign attributes. */
2771
+ alphaFloorRawXml?: XmlObject;
2628
2772
  /**
2629
2773
  * Alpha modulate (`a:alphaMod`). The schema requires a single `cont` (effect
2630
2774
  * container) child; we preserve the inner XML opaquely for round-trip.
@@ -2632,11 +2776,17 @@ interface PptxImageEffects {
2632
2776
  alphaMod?: {
2633
2777
  /** Raw opaque XML for the `a:cont` child to preserve on save. */
2634
2778
  contRawXml?: Record<string, unknown>;
2779
+ /** Original effect XML, including foreign attributes. */
2780
+ rawXml?: XmlObject;
2635
2781
  };
2636
2782
  /** Alpha replace (`a:alphaRepl`) — replaces alpha with the given fixed-percent value (0..100). */
2637
2783
  alphaRepl?: number;
2784
+ /** Original alpha replace node, including foreign attributes. */
2785
+ alphaReplRawXml?: XmlObject;
2638
2786
  /** Alpha bi-level (`a:alphaBiLevel`) — threshold (0..100) above which alpha becomes fully opaque. */
2639
2787
  alphaBiLevel?: number;
2788
+ /** Original alpha bi-level node, including foreign attributes. */
2789
+ alphaBiLevelRawXml?: XmlObject;
2640
2790
  /**
2641
2791
  * Colour replace (`a:clrRepl`) — replaces all colour information in an image
2642
2792
  * with the given solid colour. Stores the raw colour child to preserve scheme
@@ -2779,6 +2929,7 @@ declare module "./index" {
2779
2929
  *
2780
2930
  * @module pptx-types/media
2781
2931
  */
2932
+
2782
2933
  /**
2783
2934
  * Discriminator for embedded media element types.
2784
2935
  *
@@ -2793,6 +2944,8 @@ type PptxMediaReferenceKind = 'audioCd' | 'wavAudioFile' | 'audioFile' | 'videoF
2793
2944
  interface PptxAudioCdPosition {
2794
2945
  track: number;
2795
2946
  time?: number;
2947
+ /** Original `st` or `end` node, retained for lossless edits. */
2948
+ rawXml?: XmlObject;
2796
2949
  }
2797
2950
  /**
2798
2951
  * A named bookmark within a media clip timeline.
@@ -2870,7 +3023,39 @@ interface MediaCaptionTrack {
2870
3023
  isDefault?: boolean;
2871
3024
  }
2872
3025
 
3026
+ type PptxSmartArtConstraintRelationship = 'self' | 'ch' | 'des';
3027
+ type PptxSmartArtConstraintOperator = 'none' | 'equ' | 'gte' | 'lte';
3028
+ type PptxSmartArtConstraintPointType = 'all' | 'doc' | 'node' | 'norm' | 'nonNorm' | 'asst' | 'nonAsst' | 'parTrans' | 'pres' | 'sibTrans';
3029
+ interface PptxSmartArtConstraintTarget {
3030
+ for?: PptxSmartArtConstraintRelationship;
3031
+ forName?: string;
3032
+ pointType?: PptxSmartArtConstraintPointType;
3033
+ }
3034
+ /** Editable DiagramML CT_Constraint. */
3035
+ interface PptxSmartArtConstraint extends PptxSmartArtConstraintTarget {
3036
+ type: string;
3037
+ referenceType?: string;
3038
+ referenceFor?: PptxSmartArtConstraintRelationship;
3039
+ referenceForName?: string;
3040
+ referencePointType?: PptxSmartArtConstraintPointType;
3041
+ operator?: PptxSmartArtConstraintOperator;
3042
+ value?: number;
3043
+ factor?: number;
3044
+ /** Original constraint retained for foreign attributes and extension content. */
3045
+ rawXml?: XmlObject;
3046
+ }
3047
+ /** Editable DiagramML CT_NumericRule. */
3048
+ interface PptxSmartArtNumericRule extends PptxSmartArtConstraintTarget {
3049
+ type: string;
3050
+ value?: number;
3051
+ factor?: number;
3052
+ max?: number;
3053
+ /** Original rule retained for foreign attributes and extension content. */
3054
+ rawXml?: XmlObject;
3055
+ }
3056
+
2873
3057
  /** Typed, editable metadata from a DiagramML layout-definition part. */
3058
+
2874
3059
  interface PptxSmartArtLocalizedText {
2875
3060
  value: string;
2876
3061
  language?: string;
@@ -2879,12 +3064,56 @@ interface PptxSmartArtLayoutCategory {
2879
3064
  type: string;
2880
3065
  priority: number;
2881
3066
  }
3067
+ interface PptxSmartArtAlgorithmParameter {
3068
+ type: string;
3069
+ value?: string;
3070
+ }
3071
+ /** Typed DiagramML CT_Algorithm data attached to a layout node. */
3072
+ interface PptxSmartArtLayoutAlgorithm {
3073
+ type: string;
3074
+ revision?: number;
3075
+ parameters?: PptxSmartArtAlgorithmParameter[];
3076
+ }
3077
+ interface PptxSmartArtIteratorAttributes {
3078
+ name?: string;
3079
+ reference?: string;
3080
+ axis?: string[];
3081
+ pointTypes?: string[];
3082
+ hideLastTransition?: boolean[];
3083
+ start?: number[];
3084
+ count?: number[];
3085
+ step?: number[];
3086
+ }
3087
+ interface PptxSmartArtForEach extends PptxSmartArtIteratorAttributes {
3088
+ rawXml?: XmlObject;
3089
+ }
3090
+ interface PptxSmartArtWhen extends PptxSmartArtIteratorAttributes {
3091
+ function: string;
3092
+ argument?: string;
3093
+ operator: string;
3094
+ value: string;
3095
+ rawXml?: XmlObject;
3096
+ }
3097
+ interface PptxSmartArtChoose {
3098
+ name?: string;
3099
+ when: PptxSmartArtWhen[];
3100
+ otherwise?: {
3101
+ name?: string;
3102
+ rawXml?: XmlObject;
3103
+ } | null;
3104
+ rawXml?: XmlObject;
3105
+ }
2882
3106
  /** Identity and ordering metadata from DiagramML CT_LayoutNode. */
2883
3107
  interface PptxSmartArtLayoutNode {
2884
3108
  name?: string;
2885
3109
  styleLabel?: string;
2886
3110
  childOrder?: 'b' | 't';
2887
3111
  moveWith?: string;
3112
+ algorithm?: PptxSmartArtLayoutAlgorithm;
3113
+ forEach?: PptxSmartArtForEach[];
3114
+ choose?: PptxSmartArtChoose[];
3115
+ constraints?: PptxSmartArtConstraint[];
3116
+ rules?: PptxSmartArtNumericRule[];
2888
3117
  children?: PptxSmartArtLayoutNode[];
2889
3118
  }
2890
3119
  /** Metadata and root node from DiagramML CT_DiagramDefinition. */
@@ -2896,6 +3125,8 @@ interface PptxSmartArtLayoutDefinition {
2896
3125
  descriptions?: PptxSmartArtLocalizedText[];
2897
3126
  categories?: PptxSmartArtLayoutCategory[];
2898
3127
  rootNode: PptxSmartArtLayoutNode;
3128
+ /** Original definition retained for constraint evaluation and foreign rules. */
3129
+ rawXml?: XmlObject;
2899
3130
  }
2900
3131
 
2901
3132
  /**
@@ -2907,6 +3138,7 @@ interface PptxSmartArtLayoutDefinition {
2907
3138
  *
2908
3139
  * @module pptx-types/smart-art-node
2909
3140
  */
3141
+
2910
3142
  /**
2911
3143
  * A single run of text inside a SmartArt node, capturing the run text and the
2912
3144
  * raw `a:rPr` run-properties object verbatim so per-run formatting (bold,
@@ -2930,6 +3162,54 @@ interface PptxSmartArtTextRun {
2930
3162
  * round-trip. Untyped XML, hence the loose record shape.
2931
3163
  */
2932
3164
  rPr?: Record<string, unknown>;
3165
+ /** Resolved standard shape-text style derived from {@link rPr}. */
3166
+ style?: TextStyle;
3167
+ /** Raw run XML used to retain unmodelled extension children on save. */
3168
+ rawXml?: Record<string, unknown>;
3169
+ /** Original direct-child order, including unmodelled extension children. */
3170
+ childOrder?: string[];
3171
+ }
3172
+ /** An ordered item within a SmartArt text paragraph. */
3173
+ type PptxSmartArtTextParagraphItem = {
3174
+ kind: 'run';
3175
+ run: PptxSmartArtTextRun;
3176
+ } | {
3177
+ kind: 'break';
3178
+ rPr?: Record<string, unknown>;
3179
+ style?: TextStyle;
3180
+ rawXml?: Record<string, unknown>;
3181
+ childOrder?: string[];
3182
+ } | {
3183
+ kind: 'field';
3184
+ id?: string;
3185
+ fieldType?: string;
3186
+ text: string;
3187
+ rPr?: Record<string, unknown>;
3188
+ style?: TextStyle;
3189
+ pPr?: Record<string, unknown>;
3190
+ rawXml?: Record<string, unknown>;
3191
+ childOrder?: string[];
3192
+ } | {
3193
+ kind: 'tab';
3194
+ rawXml?: Record<string, unknown>;
3195
+ childOrder?: string[];
3196
+ } | {
3197
+ kind: 'raw';
3198
+ name: string;
3199
+ value: unknown;
3200
+ };
3201
+ /** A complete `a:p` paragraph in a SmartArt data-model text body. */
3202
+ interface PptxSmartArtTextParagraph {
3203
+ /** Paragraph properties (`a:pPr`) preserved verbatim. */
3204
+ pPr?: Record<string, unknown>;
3205
+ /** Text children in source order. */
3206
+ items: PptxSmartArtTextParagraphItem[];
3207
+ /** End-paragraph run properties (`a:endParaRPr`) preserved verbatim. */
3208
+ endParaRPr?: Record<string, unknown>;
3209
+ /** Resolved style for the paragraph terminator. */
3210
+ endParaStyle?: TextStyle;
3211
+ /** Raw paragraph XML used to retain unmodelled extension children on save. */
3212
+ rawXml?: Record<string, unknown>;
2933
3213
  }
2934
3214
  /**
2935
3215
  * Per-node visual override for a SmartArt node.
@@ -2999,6 +3279,11 @@ interface PptxSmartArtNode {
2999
3279
  * is not flattened. When {@link text} diverges, the runs are ignored.
3000
3280
  */
3001
3281
  runs?: PptxSmartArtTextRun[];
3282
+ /**
3283
+ * Complete typed paragraph model. Unlike {@link runs}, this retains every
3284
+ * paragraph and the ordered run, field, break, and tab children within it.
3285
+ */
3286
+ paragraphs?: PptxSmartArtTextParagraph[];
3002
3287
  /**
3003
3288
  * Optional per-node visual override (fill / line / font colour, bold /
3004
3289
  * italic). Read at parse time from the point's `spPr` / first-run `rPr`, set
@@ -3162,7 +3447,7 @@ interface PptxSmartArtConnection {
3162
3447
  * // => satisfies PptxSmartArtDrawingShape
3163
3448
  * ```
3164
3449
  */
3165
- interface PptxSmartArtDrawingShape {
3450
+ interface PptxSmartArtDrawingShape extends PptxCustomPathProperties {
3166
3451
  /** Shape ID within the drawing. */
3167
3452
  id: string;
3168
3453
  /** Preset geometry type (e.g. "roundRect", "ellipse"). */
@@ -3186,6 +3471,8 @@ interface PptxSmartArtDrawingShape {
3186
3471
  strokeWidth?: number;
3187
3472
  /** Text content of the shape. */
3188
3473
  text?: string;
3474
+ /** Standard rich-text segments projected from the associated SmartArt node. */
3475
+ textSegments?: TextSegment[];
3189
3476
  /** Font size in points. */
3190
3477
  fontSize?: number;
3191
3478
  /** Font colour (hex). */
@@ -3883,6 +4170,8 @@ interface MediaPptxElement extends PptxElementBase {
3883
4170
  mediaMimeType?: string;
3884
4171
  mediaReferenceKind?: PptxMediaReferenceKind;
3885
4172
  mediaReferenceName?: string;
4173
+ /** Explicit DrawingML `audioFile/@contentType` value when present. */
4174
+ mediaReferenceContentType?: string;
3886
4175
  audioCdStart?: PptxAudioCdPosition;
3887
4176
  audioCdEnd?: PptxAudioCdPosition;
3888
4177
  rawMediaReferenceXml?: XmlObject;
@@ -4006,6 +4295,10 @@ interface ContentPartPptxElement extends PptxElementBase {
4006
4295
  type: 'contentPart';
4007
4296
  /** Ink strokes contained in this content part. */
4008
4297
  inkStrokes?: ContentPartInkStroke[];
4298
+ /** Package path of the related InkML part. */
4299
+ inkPartPath?: string;
4300
+ /** Parsed InkML root retained for unknown-node preservation on dirty save. */
4301
+ inkPartRawXml?: XmlObject;
4009
4302
  }
4010
4303
  /**
4011
4304
  * A Slide Zoom or Section Zoom element (PowerPoint Zoom Object).
@@ -4026,12 +4319,32 @@ interface ContentPartPptxElement extends PptxElementBase {
4026
4319
  */
4027
4320
  interface ZoomPptxElement extends PptxElementBase, PptxImageProperties {
4028
4321
  type: 'zoom';
4029
- /** Type of zoom: slide-level or section-level. */
4030
- zoomType: 'slide' | 'section';
4322
+ /** Type of zoom: slide-level, section-level, or a multi-section summary. */
4323
+ zoomType: 'slide' | 'section' | 'summary';
4031
4324
  /** Zero-based index of the target slide. */
4032
4325
  targetSlideIndex: number;
4033
4326
  /** Section ID for section zoom. */
4034
4327
  targetSectionId?: string;
4328
+ /** Ordered section tiles in a Summary Zoom container. */
4329
+ summaryTargets?: SummaryZoomTarget[];
4330
+ /** Layout mode authored on the Summary Zoom container. */
4331
+ summaryLayout?: 'grid' | 'fixed';
4332
+ }
4333
+ /** A single section tile within a PowerPoint Summary Zoom container. */
4334
+ interface SummaryZoomTarget extends PptxImageProperties {
4335
+ sectionId: string;
4336
+ targetSlideIndex: number;
4337
+ x: number;
4338
+ y: number;
4339
+ width: number;
4340
+ height: number;
4341
+ title?: string;
4342
+ description?: string;
4343
+ offsetFactorX?: number;
4344
+ offsetFactorY?: number;
4345
+ scaleFactorX?: number;
4346
+ scaleFactorY?: number;
4347
+ rawXml?: XmlObject;
4035
4348
  }
4036
4349
  /**
4037
4350
  * A 3D model object embedded via `p16:model3D` inside an
@@ -4673,6 +4986,33 @@ interface PptxElementAnimation {
4673
4986
  stopSound?: boolean;
4674
4987
  }
4675
4988
 
4989
+ interface PptxEmbeddedFontDataId {
4990
+ /** Required relationship identifier from `r:id`. */
4991
+ relationshipId?: string | null;
4992
+ /** Original leaf retained for unknown attribute preservation. */
4993
+ rawXml?: XmlObject;
4994
+ }
4995
+ interface PptxEmbeddedFontDescriptor {
4996
+ typeface?: string | null;
4997
+ panose?: string | null;
4998
+ pitchFamily?: string | null;
4999
+ charset?: string | null;
5000
+ rawXml?: XmlObject;
5001
+ }
5002
+ interface PptxEmbeddedFontListEntry {
5003
+ font: PptxEmbeddedFontDescriptor;
5004
+ regular?: PptxEmbeddedFontDataId | null;
5005
+ bold?: PptxEmbeddedFontDataId | null;
5006
+ italic?: PptxEmbeddedFontDataId | null;
5007
+ boldItalic?: PptxEmbeddedFontDataId | null;
5008
+ rawXml?: XmlObject;
5009
+ }
5010
+ interface PptxEmbeddedFontList {
5011
+ fonts: PptxEmbeddedFontListEntry[];
5012
+ /** Original list retained for unknown attribute and child preservation. */
5013
+ rawXml?: XmlObject;
5014
+ }
5015
+
4676
5016
  /**
4677
5017
  * Metadata types: slide comments, compatibility warnings, tags,
4678
5018
  * custom properties, core/app document properties.
@@ -4828,9 +5168,17 @@ interface PptxTag {
4828
5168
  */
4829
5169
  interface PptxTagCollection {
4830
5170
  /** File path within the PPTX archive. */
4831
- path: string;
5171
+ path?: string;
5172
+ /** Package owner of the tags relationship. New collections default to presentation. */
5173
+ owner?: 'presentation' | 'slide' | 'part';
5174
+ /** Source OPC part that owns the relationship, e.g. ppt/slides/slide1.xml. */
5175
+ sourcePartPath?: string;
5176
+ /** Durable relationship identifier from the owning part. */
5177
+ relationshipId?: string;
4832
5178
  /** Tags in this collection. */
4833
5179
  tags: PptxTag[];
5180
+ /** Parsed tag-list XML retained for unknown-node preservation. */
5181
+ rawXml?: XmlObject;
4834
5182
  }
4835
5183
  /**
4836
5184
  * A custom document property from `docProps/custom.xml`.
@@ -4935,6 +5283,19 @@ interface PptxAppProperties {
4935
5283
  /** Hyperlink base URL. */
4936
5284
  hyperlinkBase?: string;
4937
5285
  }
5286
+
5287
+ type PptxPrintOutput = 'slides' | 'handouts1' | 'handouts2' | 'handouts3' | 'handouts4' | 'handouts6' | 'handouts9' | 'notes' | 'outline';
5288
+ type PptxPrintColorMode = 'bw' | 'gray' | 'clr';
5289
+ /** PresentationML `CT_PrintProperties` (`p:prnPr`). */
5290
+ interface PptxPresentationPrintProperties {
5291
+ printWhat?: PptxPrintOutput | null;
5292
+ colorMode?: PptxPrintColorMode | null;
5293
+ hiddenSlides?: boolean | null;
5294
+ scaleToFitPaper?: boolean | null;
5295
+ frameSlides?: boolean | null;
5296
+ /** Original subtree retained for unknown attributes and `p:extLst`. */
5297
+ rawXml?: XmlObject;
5298
+ }
4938
5299
  /**
4939
5300
  * Resolved hex values for the 12 theme colour slots.
4940
5301
  *
@@ -5293,6 +5654,11 @@ interface PptxViewScale {
5293
5654
  n: number;
5294
5655
  /** Denominator of the scale percentage (e.g. 100 for 100%). */
5295
5656
  d: number;
5657
+ /** Optional independent vertical scale. When absent, the X scale is used. */
5658
+ sy?: {
5659
+ n: number;
5660
+ d: number;
5661
+ };
5296
5662
  }
5297
5663
  /**
5298
5664
  * Origin point for a view (x, y in twips or EMU).
@@ -5301,6 +5667,16 @@ interface PptxViewOrigin {
5301
5667
  x: number;
5302
5668
  y: number;
5303
5669
  }
5670
+ /** A horizontal or vertical drawing guide in slide coordinates. */
5671
+ interface PptxViewGuide {
5672
+ orientation?: 'horz' | 'vert';
5673
+ position?: number;
5674
+ }
5675
+ /** Positive grid spacing from `p:gridSpacing`. */
5676
+ interface PptxGridSpacing {
5677
+ cx: number;
5678
+ cy: number;
5679
+ }
5304
5680
  /**
5305
5681
  * Restored region dimensions for normal view splitter.
5306
5682
  * Represents `p:restoredLeft` or `p:restoredTop`.
@@ -5342,6 +5718,10 @@ interface PptxCommonSlideViewProperties {
5342
5718
  snapToObjects?: boolean;
5343
5719
  /** Whether drawing guides are shown. */
5344
5720
  showGuides?: boolean;
5721
+ /** Whether the application may vary the scale automatically. */
5722
+ variableScale?: boolean;
5723
+ /** Drawing guides shown in this slide view. */
5724
+ guides?: PptxViewGuide[];
5345
5725
  /** View origin (scroll position). */
5346
5726
  origin?: PptxViewOrigin;
5347
5727
  /** View scale. */
@@ -5369,6 +5749,8 @@ interface PptxViewProperties {
5369
5749
  };
5370
5750
  /** Notes view properties. */
5371
5751
  notesViewPr?: PptxCommonSlideViewProperties;
5752
+ /** Grid spacing in positive DrawingML coordinates. */
5753
+ gridSpacing?: PptxGridSpacing;
5372
5754
  /** Raw XML preserved for lossless round-trip of unparsed attributes. */
5373
5755
  rawXml?: Record<string, unknown>;
5374
5756
  }
@@ -5383,12 +5765,16 @@ interface PptxViewProperties {
5383
5765
  * @see ECMA-376 Part 1, §19.2.1.3 (custDataLst), §19.3.1.6 (custData)
5384
5766
  */
5385
5767
  interface PptxCustomerData {
5386
- /** Resolved part path inside the package (e.g. `ppt/customerData/item1.xml`). */
5387
- id: string;
5768
+ /** Resolved part path inside the package (e.g. `customXml/item1.xml`). */
5769
+ id?: string;
5388
5770
  /** Relationship ID referencing the custom data part. */
5389
- relId: string;
5771
+ relId?: string;
5390
5772
  /** Raw string content of the custom data part (if resolvable). */
5391
5773
  data?: string;
5774
+ /** OPC content type for the custom data part. */
5775
+ contentType?: string;
5776
+ /** Raw `p:custData` XML retained for unknown-node preservation. */
5777
+ rawXml?: XmlObject;
5392
5778
  }
5393
5779
  /**
5394
5780
  * An ActiveX control reference from `p:controls / p:control`.
@@ -5637,11 +6023,13 @@ interface PptxPresentationProperties {
5637
6023
  showSlidesTo?: number;
5638
6024
  /** Whether to show subtitles/captions during presentation mode. */
5639
6025
  showSubtitles?: boolean;
5640
- /** Print settings: slides per page. */
6026
+ /** Typed `p:prnPr` settings. Set to null during save to remove the element. */
6027
+ printProperties?: PptxPresentationPrintProperties | null;
6028
+ /** @deprecated Use `printProperties.printWhat`; retained as a handout compatibility alias. */
5641
6029
  printSlidesPerPage?: number;
5642
- /** Print settings: frame slides. */
6030
+ /** @deprecated Use `printProperties.frameSlides`. */
5643
6031
  printFrameSlides?: boolean;
5644
- /** Print settings: colour mode (from `p:prnPr/@clrMode`). */
6032
+ /** @deprecated Use `printProperties.colorMode`. */
5645
6033
  printColorMode?: 'clr' | 'gray' | 'bw';
5646
6034
  /** Most-recently-used colours from the presentation palette. */
5647
6035
  mruColors?: string[];
@@ -5778,11 +6166,13 @@ interface PptxPhotoAlbum {
5778
6166
  */
5779
6167
  interface PptxKinsoku {
5780
6168
  /** Language code (e.g. "ja-JP", "zh-CN"). */
5781
- lang?: string;
6169
+ lang?: string | null;
5782
6170
  /** Characters that cannot begin a line. */
5783
6171
  invalStChars?: string;
5784
6172
  /** Characters that cannot end a line. */
5785
6173
  invalEndChars?: string;
6174
+ /** Original leaf retained for unknown attribute preservation. */
6175
+ rawXml?: XmlObject;
5786
6176
  }
5787
6177
  /**
5788
6178
  * Root data structure returned by {@link PptxHandlerCore.load}.
@@ -5833,6 +6223,8 @@ interface PptxData {
5833
6223
  isPasswordProtected?: boolean;
5834
6224
  /** Embedded font data (name + binary data URL) extracted from the presentation. */
5835
6225
  embeddedFonts?: PptxEmbeddedFont[];
6226
+ /** Typed `p:embeddedFontLst` package metadata, including unresolved variants. */
6227
+ embeddedFontList?: PptxEmbeddedFontList;
5836
6228
  /** Most-recently-used colour list from presentation properties. */
5837
6229
  mruColors?: string[];
5838
6230
  /** Parsed notes master data if present in the PPTX. */
@@ -5991,6 +6383,30 @@ interface PptxEmbeddedFont {
5991
6383
  originalPartBytes?: Uint8Array;
5992
6384
  }
5993
6385
 
6386
+ /**
6387
+ * Headless SVG exporter — converts parsed {@link PptxSlide} data to
6388
+ * SVG XML strings without requiring a browser DOM.
6389
+ *
6390
+ * All output is generated via string concatenation so the exporter
6391
+ * works in any JavaScript runtime (Node, Bun, Deno, Workers, etc.).
6392
+ *
6393
+ * @module converter/SvgExporter
6394
+ */
6395
+
6396
+ /**
6397
+ * Options controlling SVG export behaviour.
6398
+ */
6399
+ interface SvgExportOptions {
6400
+ /** Include hidden slides when exporting all. Default `false`. */
6401
+ includeHidden?: boolean;
6402
+ /** Slide indices to export (0-based). If omitted, all slides are exported. */
6403
+ slideIndices?: number[];
6404
+ /** Default font family when the element does not specify one. */
6405
+ defaultFontFamily?: string;
6406
+ /** Default font size in points when the element does not specify one. */
6407
+ defaultFontSize?: number;
6408
+ }
6409
+
5994
6410
  /**
5995
6411
  * Built-in theme presets modelled after common PowerPoint themes.
5996
6412
  *
@@ -6167,10 +6583,17 @@ interface ChartSeriesInput {
6167
6583
  name: string;
6168
6584
  values: number[];
6169
6585
  color?: string;
6586
+ boxWhiskerOptions?: PptxChartBoxWhiskerOptions;
6587
+ histogramOptions?: PptxChartHistogramOptions;
6588
+ waterfallOptions?: PptxChartWaterfallOptions;
6589
+ regionMapOptions?: PptxChartRegionMapOptions;
6590
+ treemapOptions?: PptxChartTreemapOptions;
6170
6591
  }
6171
6592
  interface ChartInput {
6172
6593
  series: ChartSeriesInput[];
6173
6594
  categories: string[];
6595
+ /** ChartEx hierarchy levels in leaf-to-root XML order. */
6596
+ categoryLevels?: string[][];
6174
6597
  title?: string;
6175
6598
  hasLegend?: boolean;
6176
6599
  legendPosition?: 't' | 'b' | 'l' | 'r' | 'tr';
@@ -6684,10 +7107,12 @@ interface PptxHandlerSaveOptions {
6684
7107
  slideLayouts?: PptxSlideLayout[];
6685
7108
  /** Updated tag collections to save back to ppt/tags/tag*.xml. */
6686
7109
  tags?: PptxTagCollection[];
7110
+ /** Presentation-level customer data references to author or update. */
7111
+ customerData?: PptxCustomerData[];
6687
7112
  /** Photo album metadata to save back to `p:photoAlbum`. */
6688
7113
  photoAlbum?: PptxPhotoAlbum;
6689
7114
  /** East Asian line-break settings to save back to `p:kinsoku`. */
6690
- kinsoku?: PptxKinsoku;
7115
+ kinsoku?: PptxKinsoku | null;
6691
7116
  /** Write-protection verifier. Set to `null` to remove, `undefined` to preserve existing. */
6692
7117
  modifyVerifier?: PptxModifyVerifier | null;
6693
7118
  /** View properties to save back to ppt/viewProps.xml. */
@@ -6719,6 +7144,8 @@ interface PptxHandlerSaveOptions {
6719
7144
  * preserved (i.e. the default is lossless round-trip).
6720
7145
  */
6721
7146
  embeddedFonts?: PptxEmbeddedFont[];
7147
+ /** Typed embedded-font list metadata. Set to null to remove fonts and relationships. */
7148
+ embeddedFontList?: PptxEmbeddedFontList | null;
6722
7149
  /**
6723
7150
  * OOXML conformance class for the saved output.
6724
7151
  * - `'preserve'` (default): use the same conformance as the loaded file.
@@ -7342,6 +7769,85 @@ declare class PptxHandler extends PptxHandlerCore {
7342
7769
  static create(options?: PresentationOptions): Promise<PresentationBuilderResult>;
7343
7770
  }
7344
7771
 
7772
+ /**
7773
+ * Theme configuration types for the PowerPoint viewer.
7774
+ *
7775
+ * All color values accept any valid CSS color string:
7776
+ * hex (`#6366f1`), rgb (`rgb(99 102 241)`), hsl (`hsl(239 84% 67%)`),
7777
+ * oklch (`oklch(0.585 0.233 277)`), named colors, etc.
7778
+ *
7779
+ * Framework-agnostic — shared by the React, Vue, and Angular bindings.
7780
+ */
7781
+ /**
7782
+ * Semantic color tokens for the viewer UI.
7783
+ *
7784
+ * These map to CSS custom properties (`--pptx-<token>`) and drive all
7785
+ * UI component colors. The naming follows the shadcn/ui convention so
7786
+ * that Tailwind + shadcn users get a familiar experience.
7787
+ */
7788
+ interface ViewerThemeColors {
7789
+ /** Page / root background */
7790
+ background: string;
7791
+ /** Default text color */
7792
+ foreground: string;
7793
+ /** Card / panel surface */
7794
+ card: string;
7795
+ /** Text on card surfaces */
7796
+ cardForeground: string;
7797
+ /** Popover / dropdown surface */
7798
+ popover: string;
7799
+ /** Text inside popovers */
7800
+ popoverForeground: string;
7801
+ /** Primary action color (buttons, active indicators) */
7802
+ primary: string;
7803
+ /** Text on primary-colored backgrounds */
7804
+ primaryForeground: string;
7805
+ /** Secondary / subdued action color */
7806
+ secondary: string;
7807
+ /** Text on secondary backgrounds */
7808
+ secondaryForeground: string;
7809
+ /** Muted / disabled surface */
7810
+ muted: string;
7811
+ /** Text on muted surfaces (also used for secondary text) */
7812
+ mutedForeground: string;
7813
+ /** Accent / hover-highlight surface */
7814
+ accent: string;
7815
+ /** Text on accent surfaces */
7816
+ accentForeground: string;
7817
+ /** Destructive / danger action color */
7818
+ destructive: string;
7819
+ /** Text on destructive backgrounds */
7820
+ destructiveForeground: string;
7821
+ /** Default border color */
7822
+ border: string;
7823
+ /** Input field border color */
7824
+ input: string;
7825
+ /** Focus ring color */
7826
+ ring: string;
7827
+ }
7828
+ /**
7829
+ * Full viewer theme configuration.
7830
+ *
7831
+ * Every property is optional — unset values fall back to the built-in
7832
+ * dark theme defaults.
7833
+ */
7834
+ interface ViewerTheme {
7835
+ /** Semantic UI colors. Each key maps to a `--pptx-<key>` CSS custom property. */
7836
+ colors?: Partial<ViewerThemeColors>;
7837
+ /** Base border-radius value (e.g. `"0.5rem"`, `"8px"`). */
7838
+ radius?: string;
7839
+ /**
7840
+ * Escape hatch: arbitrary CSS custom properties to set on the viewer
7841
+ * root element. Keys should include the `--` prefix.
7842
+ *
7843
+ * @example
7844
+ * ```ts
7845
+ * { "--my-custom-shadow": "0 4px 12px rgba(0,0,0,0.5)" }
7846
+ * ```
7847
+ */
7848
+ cssVars?: Record<string, string>;
7849
+ }
7850
+
7345
7851
  /**
7346
7852
  * Framework-agnostic public types shared by the viewer bindings.
7347
7853
  *
@@ -7611,8 +8117,9 @@ interface ExportGifOptions {
7611
8117
  * settings, `computeSlideIndices` / `computeColorFilter` resolve the range and
7612
8118
  * colour mode, the `build*Html` helpers produce the escaped body markup, and
7613
8119
  * `buildPrintHtmlDocument` sanitises + assembles the final document. This
7614
- * module (the Svelte counterpart of Vue's `usePrint`) only rasterises the
7615
- * selected slides and opens the print surface.
8120
+ * module (the Svelte counterpart of Vue's `usePrint`) exports direct slide
8121
+ * pages as vector SVG, rasterises notes/handout thumbnails, and opens the
8122
+ * print surface.
7616
8123
  *
7617
8124
  * **Print surface / popup-blocker caveats:** the default opener renders the
7618
8125
  * document into a hidden same-origin `<iframe srcdoc>` and calls
@@ -7666,6 +8173,19 @@ interface ExportPdfOptions {
7666
8173
  signal?: AbortSignal;
7667
8174
  }
7668
8175
 
8176
+ type SvgExportSingleSlideOptions = SvgExportOptions;
8177
+ type SvgExportAllOptions = SvgExportOptions;
8178
+ /** Export one parsed slide as self-contained SVG markup. */
8179
+ declare function exportSlideToSvg(slide: PptxSlide, width: number, height: number, options?: SvgExportSingleSlideOptions): string;
8180
+ /** Export one parsed slide as an SVG Blob. */
8181
+ declare function exportSlideToSvgBlob(slide: PptxSlide, width: number, height: number, options?: SvgExportSingleSlideOptions): Blob;
8182
+ /** Export one parsed slide as an SVG download. */
8183
+ declare function exportSlideAsSvg(slide: PptxSlide, slideIndex: number, width: number, height: number, options?: SvgExportSingleSlideOptions): void;
8184
+ /** Export the selected presentation slides as SVG strings. */
8185
+ declare function exportAllSlidesToSvg(data: PptxData, options?: SvgExportAllOptions): string[];
8186
+ /** Export the selected presentation slides as SVG Blobs. */
8187
+ declare function exportAllSlidesToSvgBlobs(data: PptxData, options?: SvgExportAllOptions): Blob[];
8188
+
7669
8189
  /** Payload for the `onload` callback. */
7670
8190
  interface ViewerLoadDetail {
7671
8191
  /** Number of slides in the loaded presentation. */
@@ -7813,7 +8333,9 @@ interface PowerPointViewerApi extends PowerPointViewerAPI {
7813
8333
  /** The selected top-level element id, or null. */
7814
8334
  getSelectedElementId(): string | null;
7815
8335
  /** Serialize the edited slides to `.pptx` bytes via the core handler. */
7816
- save(): Promise<Uint8Array>;
8336
+ save(format?: PptxSaveFormat): Promise<Uint8Array>;
8337
+ downloadAs(format: PptxSaveFormat, fileName?: string): Promise<void>;
8338
+ packageForSharing(fileName?: string): Promise<void>;
7817
8339
  /** Save + trigger a browser download of the `.pptx` (default name). */
7818
8340
  downloadPptx(fileName?: string): Promise<void>;
7819
8341
  /**
@@ -7822,6 +8344,8 @@ interface PowerPointViewerApi extends PowerPointViewerAPI {
7822
8344
  * (dynamically imported), so the first call pays a one-time load cost.
7823
8345
  */
7824
8346
  exportSlidePng(index?: number): Promise<void>;
8347
+ /** Copy a slide to the system clipboard as a PNG image. */
8348
+ copySlideAsImage(index?: number): Promise<void>;
7825
8349
  /**
7826
8350
  * Export every slide as a multi-page PDF download (one slide per page).
7827
8351
  * `jspdf` is dynamically imported on first use.
@@ -7904,6 +8428,19 @@ declare class PresentationLoader {
7904
8428
  slideMasters: PptxSlideMaster[];
7905
8429
  notesMaster: PptxNotesMaster | undefined;
7906
8430
  handoutMaster: PptxHandoutMaster | undefined;
8431
+ sections: PptxSection[];
8432
+ headerFooter: PptxHeaderFooter;
8433
+ presentationProperties: PptxPresentationProperties;
8434
+ customShows: PptxCustomShow[];
8435
+ coreProperties: PptxCoreProperties | undefined;
8436
+ appProperties: PptxAppProperties | undefined;
8437
+ customProperties: PptxCustomProperty[];
8438
+ embeddedFonts: PptxEmbeddedFont[];
8439
+ hasDigitalSignatures: boolean;
8440
+ digitalSignatureCount: number;
8441
+ isPasswordProtected: boolean;
8442
+ /** Whether the loaded package contains a VBA project. */
8443
+ hasMacros: boolean;
7907
8444
  notesCanvasSize: CanvasSize | undefined;
7908
8445
  /** Slide canvas size in pixels. */
7909
8446
  canvasSize: CanvasSize;
@@ -7911,6 +8448,7 @@ declare class PresentationLoader {
7911
8448
  mediaDataUrls: Map<string, string>;
7912
8449
  /** Presentation theme colours used to resolve scheme-based table styles. */
7913
8450
  colorScheme: PptxThemeColorScheme | undefined;
8451
+ presentationTheme: PptxTheme | undefined;
7914
8452
  /** Parsed presentation table-style definitions keyed by style id. */
7915
8453
  tableStyleMap: ParsedTableStyleMap | undefined;
7916
8454
  /** True while a load is in flight. */
@@ -7965,5 +8503,5 @@ declare class ViewerState {
7965
8503
  handleNavigationKey(key: string): boolean;
7966
8504
  }
7967
8505
 
7968
- export { PowerPointViewer, PresentationLoader, ViewerState, clampSlideIndex, fitScale, resolveNavigationKey, zoomInPercent, zoomOutPercent };
7969
- export type { CanvasSize, ExportGifOptions, ExportPdfOptions, ExportVideoOptions, NavigationAction, PowerPointViewerApi, PowerPointViewerProps, PrintOptions, ViewerLoadDetail, ViewerTheme };
8506
+ export { PowerPointViewer, PresentationLoader, ViewerState, clampSlideIndex, exportAllSlidesToSvg, exportAllSlidesToSvgBlobs, exportSlideAsSvg, exportSlideToSvg, exportSlideToSvgBlob, fitScale, resolveNavigationKey, zoomInPercent, zoomOutPercent };
8507
+ export type { CanvasSize, ExportGifOptions, ExportPdfOptions, ExportVideoOptions, NavigationAction, PowerPointViewerApi, PowerPointViewerProps, PrintOptions, SvgExportAllOptions, SvgExportSingleSlideOptions, ViewerLoadDetail, ViewerTheme };