pptx-react-viewer 2.17.0 → 2.18.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 (133) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/README.md +14 -14
  3. package/dist/{AiChatPanel-RZ4A7P4H.mjs → AiChatPanel-SSSBERWJ.mjs} +4 -4
  4. package/dist/AiChatPanel-SSSBERWJ.mjs.br +0 -0
  5. package/dist/AiChatPanel-SSSBERWJ.mjs.gz +0 -0
  6. package/dist/{AiChatPanel-HCHCVQN2.js → AiChatPanel-UN5DHPZY.js} +24 -24
  7. package/dist/AiChatPanel-UN5DHPZY.js.br +0 -0
  8. package/dist/AiChatPanel-UN5DHPZY.js.gz +0 -0
  9. package/dist/{Model3DScene-LK7LSQNH.js → Model3DScene-4RPYKC2I.js} +2 -2
  10. package/dist/Model3DScene-4RPYKC2I.js.br +0 -0
  11. package/dist/Model3DScene-4RPYKC2I.js.gz +0 -0
  12. package/dist/{Model3DScene-I7FR74AD.mjs → Model3DScene-LYEESYAI.mjs} +1 -1
  13. package/dist/Model3DScene-LYEESYAI.mjs.br +0 -0
  14. package/dist/Model3DScene-LYEESYAI.mjs.gz +0 -0
  15. package/dist/{PowerPointViewer-Du7u4INi.d.ts → PowerPointViewer-Cf4YHjdF.d.ts} +2 -2
  16. package/dist/{PowerPointViewer-Du7u4INi.d.ts.map → PowerPointViewer-Cf4YHjdF.d.ts.map} +1 -1
  17. package/dist/{SurfaceChart3DScene-ODQY77SZ.js → SurfaceChart3DScene-ACPKCWLJ.js} +2 -2
  18. package/dist/SurfaceChart3DScene-ACPKCWLJ.js.br +0 -0
  19. package/dist/SurfaceChart3DScene-ACPKCWLJ.js.gz +0 -0
  20. package/dist/{SurfaceChart3DScene-DEQP5O3U.mjs → SurfaceChart3DScene-JR62SOYO.mjs} +1 -1
  21. package/dist/{SurfaceChart3DScene-DEQP5O3U.mjs.br → SurfaceChart3DScene-JR62SOYO.mjs.br} +0 -0
  22. package/dist/SurfaceChart3DScene-JR62SOYO.mjs.gz +0 -0
  23. package/dist/{audience-content-store-BvqKy7Hf.d.ts → audience-content-store-CyS0oP6t.d.ts} +2 -2
  24. package/dist/{audience-content-store-BvqKy7Hf.d.ts.map → audience-content-store-CyS0oP6t.d.ts.map} +1 -1
  25. package/dist/{chunk-5BXATG54.js → chunk-4LWGAVAP.js} +239 -293
  26. package/dist/chunk-4LWGAVAP.js.br +0 -0
  27. package/dist/chunk-4LWGAVAP.js.gz +0 -0
  28. package/dist/{chunk-FXJOTEPO.mjs → chunk-7XF6S4AM.mjs} +1 -1
  29. package/dist/chunk-7XF6S4AM.mjs.br +0 -0
  30. package/dist/chunk-7XF6S4AM.mjs.gz +0 -0
  31. package/dist/{chunk-TCGXGD6E.js → chunk-ASKYZ5ZY.js} +544 -426
  32. package/dist/chunk-ASKYZ5ZY.js.br +0 -0
  33. package/dist/chunk-ASKYZ5ZY.js.gz +0 -0
  34. package/dist/{chunk-MQHC5TXI.mjs → chunk-BZOL6FXF.mjs} +25 -80
  35. package/dist/chunk-BZOL6FXF.mjs.br +0 -0
  36. package/dist/chunk-BZOL6FXF.mjs.gz +0 -0
  37. package/dist/{chunk-K2QU73KB.mjs → chunk-GODW6RNR.mjs} +9801 -6455
  38. package/dist/chunk-GODW6RNR.mjs.br +0 -0
  39. package/dist/chunk-GODW6RNR.mjs.gz +0 -0
  40. package/dist/{chunk-NQJPPIVH.js → chunk-ICZDMFF2.js} +1444 -1131
  41. package/dist/chunk-ICZDMFF2.js.br +0 -0
  42. package/dist/chunk-ICZDMFF2.js.gz +0 -0
  43. package/dist/{chunk-ATOUVRRQ.js → chunk-MAVLV56S.js} +3 -3
  44. package/dist/chunk-MAVLV56S.js.br +0 -0
  45. package/dist/chunk-MAVLV56S.js.gz +0 -0
  46. package/dist/{chunk-422DF424.mjs → chunk-O7FTUUXP.mjs} +464 -151
  47. package/dist/chunk-O7FTUUXP.mjs.br +0 -0
  48. package/dist/chunk-O7FTUUXP.mjs.gz +0 -0
  49. package/dist/{chunk-ZA5JONCW.mjs → chunk-QUB5OSKY.mjs} +193 -75
  50. package/dist/chunk-QUB5OSKY.mjs.br +0 -0
  51. package/dist/chunk-QUB5OSKY.mjs.gz +0 -0
  52. package/dist/{chunk-AONFHTTJ.js → chunk-RTUGI4HQ.js} +27 -4
  53. package/dist/chunk-RTUGI4HQ.js.br +0 -0
  54. package/dist/chunk-RTUGI4HQ.js.gz +0 -0
  55. package/dist/{chunk-S64T7C4V.mjs → chunk-SNL6LBRX.mjs} +27 -4
  56. package/dist/chunk-SNL6LBRX.mjs.br +0 -0
  57. package/dist/{chunk-S64T7C4V.mjs.gz → chunk-SNL6LBRX.mjs.gz} +0 -0
  58. package/dist/{chunk-7JPLVECA.js → chunk-WVDM36ZM.js} +9838 -6458
  59. package/dist/chunk-WVDM36ZM.js.br +0 -0
  60. package/dist/chunk-WVDM36ZM.js.gz +0 -0
  61. package/dist/i18n.js +4 -4
  62. package/dist/i18n.js.br +0 -0
  63. package/dist/i18n.js.gz +0 -0
  64. package/dist/i18n.mjs +1 -1
  65. package/dist/i18n.mjs.br +0 -0
  66. package/dist/i18n.mjs.gz +0 -0
  67. package/dist/index.d.ts +497 -16
  68. package/dist/index.d.ts.map +1 -1
  69. package/dist/index.js +65 -41
  70. package/dist/index.js.br +0 -0
  71. package/dist/index.js.gz +0 -0
  72. package/dist/index.mjs +6 -6
  73. package/dist/index.mjs.br +0 -0
  74. package/dist/index.mjs.gz +0 -0
  75. package/dist/internals.d.ts +543 -32
  76. package/dist/internals.d.ts.map +1 -1
  77. package/dist/internals.js +79 -79
  78. package/dist/internals.js.br +0 -0
  79. package/dist/internals.js.gz +0 -0
  80. package/dist/internals.mjs +4 -4
  81. package/dist/internals.mjs.br +0 -0
  82. package/dist/internals.mjs.gz +0 -0
  83. package/dist/pptx-viewer.css +1 -1
  84. package/dist/pptx-viewer.css.br +0 -0
  85. package/dist/pptx-viewer.css.gz +0 -0
  86. package/dist/{types-DU35aAJK.d.ts → types-C_CTI-QE.d.ts} +3 -31
  87. package/dist/types-C_CTI-QE.d.ts.map +1 -0
  88. package/dist/{useViewerBuildingBlocks-C9-prKYB.d.ts → useViewerBuildingBlocks-DItilDbP.d.ts} +16 -3
  89. package/dist/useViewerBuildingBlocks-DItilDbP.d.ts.map +1 -0
  90. package/dist/viewer/index.d.ts +427 -39
  91. package/dist/viewer/index.js +27 -27
  92. package/dist/viewer/index.js.br +0 -0
  93. package/dist/viewer/index.js.gz +0 -0
  94. package/dist/viewer/index.mjs +6 -6
  95. package/dist/viewer/index.mjs.br +0 -0
  96. package/dist/viewer/index.mjs.gz +0 -0
  97. package/package.json +2 -2
  98. package/dist/AiChatPanel-HCHCVQN2.js.br +0 -0
  99. package/dist/AiChatPanel-HCHCVQN2.js.gz +0 -0
  100. package/dist/AiChatPanel-RZ4A7P4H.mjs.br +0 -0
  101. package/dist/AiChatPanel-RZ4A7P4H.mjs.gz +0 -0
  102. package/dist/Model3DScene-I7FR74AD.mjs.br +0 -0
  103. package/dist/Model3DScene-I7FR74AD.mjs.gz +0 -0
  104. package/dist/Model3DScene-LK7LSQNH.js.br +0 -0
  105. package/dist/Model3DScene-LK7LSQNH.js.gz +0 -0
  106. package/dist/SurfaceChart3DScene-DEQP5O3U.mjs.gz +0 -0
  107. package/dist/SurfaceChart3DScene-ODQY77SZ.js.br +0 -0
  108. package/dist/SurfaceChart3DScene-ODQY77SZ.js.gz +0 -0
  109. package/dist/chunk-422DF424.mjs.br +0 -0
  110. package/dist/chunk-422DF424.mjs.gz +0 -0
  111. package/dist/chunk-5BXATG54.js.br +0 -0
  112. package/dist/chunk-5BXATG54.js.gz +0 -0
  113. package/dist/chunk-7JPLVECA.js.br +0 -0
  114. package/dist/chunk-7JPLVECA.js.gz +0 -0
  115. package/dist/chunk-AONFHTTJ.js.br +0 -0
  116. package/dist/chunk-AONFHTTJ.js.gz +0 -0
  117. package/dist/chunk-ATOUVRRQ.js.br +0 -0
  118. package/dist/chunk-ATOUVRRQ.js.gz +0 -0
  119. package/dist/chunk-FXJOTEPO.mjs.br +0 -0
  120. package/dist/chunk-FXJOTEPO.mjs.gz +0 -0
  121. package/dist/chunk-K2QU73KB.mjs.br +0 -0
  122. package/dist/chunk-K2QU73KB.mjs.gz +0 -0
  123. package/dist/chunk-MQHC5TXI.mjs.br +0 -0
  124. package/dist/chunk-MQHC5TXI.mjs.gz +0 -0
  125. package/dist/chunk-NQJPPIVH.js.br +0 -0
  126. package/dist/chunk-NQJPPIVH.js.gz +0 -0
  127. package/dist/chunk-S64T7C4V.mjs.br +0 -0
  128. package/dist/chunk-TCGXGD6E.js.br +0 -0
  129. package/dist/chunk-TCGXGD6E.js.gz +0 -0
  130. package/dist/chunk-ZA5JONCW.mjs.br +0 -0
  131. package/dist/chunk-ZA5JONCW.mjs.gz +0 -0
  132. package/dist/types-DU35aAJK.d.ts.map +0 -1
  133. package/dist/useViewerBuildingBlocks-C9-prKYB.d.ts.map +0 -1
@@ -1145,6 +1145,22 @@ interface ShapeStyle {
1145
1145
  fontRefIdx?: string;
1146
1146
  /** Raw XML colour child of `<a:fontRef>`. */
1147
1147
  fontRefColorXml?: XmlObject;
1148
+ /**
1149
+ * The fill `<a:fillRef>` resolved to, recorded ONLY when the shape's own
1150
+ * `spPr` authored no fill at all, so the reference is what paints it.
1151
+ *
1152
+ * Its absence therefore means "the fill is the shape's own", and its
1153
+ * presence plus an unchanged flat fill means "still purely inherited": see
1154
+ * `authored-shape-style.ts`, the shape-scope twin of `TextStyle`'s
1155
+ * `inheritedRunStyle`.
1156
+ */
1157
+ inheritedFillStyle?: ShapeStyle;
1158
+ /**
1159
+ * The outline `<a:lnRef>` resolved to, recorded before `spPr/a:ln` was
1160
+ * layered on top. A property that still equals this baseline was never
1161
+ * authored on the shape and must not be written back as if it were.
1162
+ */
1163
+ inheritedLineStyle?: ShapeStyle;
1148
1164
  }
1149
1165
  //#endregion
1150
1166
  //#region src/core/types/text.d.ts
@@ -1185,6 +1201,60 @@ interface ShapeStyle {
1185
1201
  interface TextStyle {
1186
1202
  /** Original `a:rPr` XML retained by projections that share the shape-text model. */
1187
1203
  runPropertiesXml?: XmlObject;
1204
+ /**
1205
+ * The properties this run's OWN `a:rPr` authored, and nothing else.
1206
+ *
1207
+ * A run style is assembled as
1208
+ * `{...inheritedRunStyle, ...authoredRunStyle}`, so the flat style is a
1209
+ * fully RESOLVED view: it cannot say whether `fontSize: 60` came from the
1210
+ * run, from the shape's `a:lstStyle`, from the layout placeholder, from the
1211
+ * master `p:txStyles` or from the theme. Omission is meaningful in OOXML
1212
+ * (§21.1.2.3), so a writer that re-emits the resolved view converts every
1213
+ * inherited value into an authored one and the deck stops being
1214
+ * theme-driven after one save.
1215
+ *
1216
+ * This is the run-scope twin of {@link TextSegment.paragraphProperties},
1217
+ * which is parsed strictly from the paragraph's own `a:pPr` for the same
1218
+ * reason. Present only for runs that came from a parsed deck; absent for
1219
+ * SDK-built text, where the flat style IS the only description and must be
1220
+ * written out in full.
1221
+ */
1222
+ authoredRunStyle?: TextStyle;
1223
+ /**
1224
+ * The resolved inheritance baseline {@link authoredRunStyle} was layered
1225
+ * on top of (shape `a:lstStyle` -> placeholder -> layout -> master
1226
+ * `p:txStyles` -> theme -> `p:defaultTextStyle`).
1227
+ *
1228
+ * Kept alongside the authored half because the two answer different
1229
+ * questions. The authored half says "the source pinned this"; the baseline
1230
+ * says "this value is what inheritance already produces", which is how an
1231
+ * EDIT is told apart from an inherited value: an editor mutates the flat
1232
+ * style without knowing about either field, so a property that now differs
1233
+ * from the baseline was either authored or edited and must be written,
1234
+ * while one that still matches can be left to inherit.
1235
+ *
1236
+ * Holds a reference to the per-paragraph baseline object rather than a
1237
+ * copy, so carrying it costs one pointer per run.
1238
+ */
1239
+ inheritedRunStyle?: TextStyle;
1240
+ /**
1241
+ * Snapshot of the ELEMENT-scope paragraph geometry (alignment, margins,
1242
+ * indent, line and paragraph spacing, tab stops, rtl, line-break flags) as
1243
+ * the load pipeline resolved it.
1244
+ *
1245
+ * Present only on an `element.textStyle` that came from a parsed deck, and
1246
+ * populated only with the geometry keys. It exists so the save path can
1247
+ * answer one question it otherwise cannot: has the user CHANGED the body's
1248
+ * alignment or indent, or is the value simply what the shape's
1249
+ * `a:lstStyle`, its layout placeholder and the master already produce?
1250
+ * Element-level text panels (`textAdvancedPatch`, `alignPatch` and friends
1251
+ * in `pptx-viewer-shared`) write `element.textStyle` and never touch
1252
+ * `segment.paragraphProperties`, so a diff against this snapshot is the
1253
+ * only way to tell an edit from an inheritance artefact.
1254
+ *
1255
+ * @see element-paragraph-geometry.ts
1256
+ */
1257
+ resolvedParagraphGeometry?: TextStyle;
1188
1258
  fontFamily?: string;
1189
1259
  fontSize?: number;
1190
1260
  /** When true, renderer should shrink text to fit the shape bounds. */
@@ -1849,6 +1919,15 @@ interface PptxElementBase {
1849
1919
  shapeId?: string;
1850
1920
  /** Element name from `cNvPr/@name`. Used for morph transition matching via the `!!` naming convention. */
1851
1921
  name?: string;
1922
+ /**
1923
+ * `p:nvSpPr/p:nvPr/p:ph/@type` (lower-cased) when the shape is a placeholder:
1924
+ * `title`, `ctrtitle`, `body`, `subtitle`, `ftr`, `dt`, `sldnum`, ...
1925
+ *
1926
+ * Captured on load so consumers can tell a footer placeholder from a text box
1927
+ * without re-walking `rawXml`. Absent on non-placeholder shapes and on
1928
+ * SDK-created elements.
1929
+ */
1930
+ placeholderType?: string;
1852
1931
  x: number;
1853
1932
  y: number;
1854
1933
  width: number;
@@ -1909,6 +1988,19 @@ interface PptxTextProperties {
1909
1988
  }>;
1910
1989
  /** Placeholder prompt text inherited from layout/master (e.g. "Click to add title"). Shown as a greyed-out hint when the shape has no user-entered text. */
1911
1990
  promptText?: string;
1991
+ /**
1992
+ * The string {@link text} was INHERITED from, when this is a header / footer /
1993
+ * date / slide-number placeholder whose own body the file leaves empty.
1994
+ *
1995
+ * PowerPoint keeps the footer string on the slide master and writes each
1996
+ * slide's copy of the `ftr` placeholder empty, so the empty body means
1997
+ * "render the master's footer here". Rendering needs the resolved string, but
1998
+ * SAVING it into the slide would pin that slide to today's master text and
1999
+ * silently detach it from the Header & Footer dialog. The save writer
2000
+ * therefore leaves the authored empty body alone while `text` still equals
2001
+ * this value, and writes a genuine per-slide override once it does not.
2002
+ */
2003
+ inheritedPlaceholderText?: string;
1912
2004
  /** Linked text box chain ID from `a:bodyPr > a:linkedTxbx/@id` or `a:txbx > a:linkedTxbx/@id`. Text overflows from one linked frame to the next. */
1913
2005
  linkedTxbxId?: number;
1914
2006
  /** Sequence number within a linked text box chain (0-based). */
@@ -2319,6 +2411,12 @@ interface PptxChartLineStyle {
2319
2411
  }
2320
2412
  /** Marker symbol types for line/scatter chart data points. */
2321
2413
  type PptxChartMarkerSymbol = 'circle' | 'dash' | 'diamond' | 'dot' | 'none' | 'picture' | 'plus' | 'square' | 'star' | 'triangle' | 'x' | 'auto';
2414
+ /**
2415
+ * `ST_ScatterStyle` (ECMA-376 §21.2.3.40): how a scatter chart joins its points.
2416
+ * `line`/`lineMarker` connect them with straight segments, `smooth`/
2417
+ * `smoothMarker` with a bezier, `marker`/`none` not at all.
2418
+ */
2419
+ type PptxChartScatterStyle = 'none' | 'line' | 'lineMarker' | 'marker' | 'smooth' | 'smoothMarker';
2322
2420
  /** Shape properties extracted from c:spPr for chart formatting. */
2323
2421
  interface PptxChartShapeProps {
2324
2422
  fillColor?: string;
@@ -2520,6 +2618,42 @@ interface PptxChartTreemapOptions {
2520
2618
  interface PptxChartSeries {
2521
2619
  name: string;
2522
2620
  values: number[];
2621
+ /**
2622
+ * Per-series x values from `c:ser/c:xVal` (scatter and bubble series only).
2623
+ *
2624
+ * Every `CT_ScatterSer` / `CT_BubbleSer` carries its OWN `c:xVal`, so two
2625
+ * series in one scatter chart routinely plot against different x ranges (the
2626
+ * normal case for measurement data). Reading the x values off the first
2627
+ * series and reusing them everywhere plotted every series against series 1's
2628
+ * x axis. Absent for category-axis chart kinds, where
2629
+ * {@link PptxChartData.categories} is the x axis.
2630
+ */
2631
+ xValues?: number[];
2632
+ /**
2633
+ * Per-series bubble sizes from `c:ser/c:bubbleSize` (bubble series only),
2634
+ * aligned index-for-index with {@link values}.
2635
+ *
2636
+ * `CT_BubbleSer` carries x, y AND size, so a one-series bubble chart is fully
2637
+ * specified. Absent when the source omits `c:bubbleSize`.
2638
+ */
2639
+ bubbleSizes?: number[];
2640
+ /**
2641
+ * Series-level data-label content flags from `c:ser/c:dLbls`.
2642
+ *
2643
+ * PowerPoint writes the flags a user picks in "Format Data Labels" onto the
2644
+ * SERIES, and leaves the chart-type-level `c:dLbls` all-zero, so reading only
2645
+ * the chart-level group reports "show nothing" for a chart that visibly shows
2646
+ * percentages. These override {@link PptxChartStyle.dataLabels}.
2647
+ */
2648
+ dataLabelOptions?: PptxChartDataLabelOptions;
2649
+ /**
2650
+ * Whether the series line is explicitly suppressed
2651
+ * (`c:ser/c:spPr/a:ln/a:noFill`). Line-drawn kinds (line, scatter, radar)
2652
+ * use this to decide whether to draw a connecting line at all; a marker-only
2653
+ * scatter is authored as `scatterStyle="lineMarker"` PLUS this flag, never by
2654
+ * changing the scatter style.
2655
+ */
2656
+ lineNoFill?: boolean;
2523
2657
  /**
2524
2658
  * Blank-value mask aligned index-for-index with {@link values}: `true` marks
2525
2659
  * a category whose numeric cache point (`c:numCache/c:pt`) was absent or
@@ -2863,6 +2997,17 @@ interface PptxChartData {
2863
2997
  * default), so only horizontal bar charts need to carry the field.
2864
2998
  */
2865
2999
  barDirection?: PptxChartBarDirection;
3000
+ /**
3001
+ * Scatter presentation mode (`c:scatterChart/c:scatterStyle/@val`).
3002
+ *
3003
+ * `lineMarker` (PowerPoint's own default for every scatter it writes) and
3004
+ * `smoothMarker` draw a connecting line; `marker` and `none` do not. Whether
3005
+ * the MARKERS appear is decided separately by `c:marker/c:symbol`, and
3006
+ * whether the LINE appears is further gated by
3007
+ * {@link PptxChartSeries.lineNoFill} - PowerPoint expresses "markers only" as
3008
+ * `lineMarker` plus an `a:ln/a:noFill`, not as `marker`.
3009
+ */
3010
+ scatterStyle?: PptxChartScatterStyle;
2866
3011
  /**
2867
3012
  * Bar/column gap between category clusters as a percentage of bar width
2868
3013
  * (`c:gapWidth/@val`, 0 through 500). Absent uses the renderer default.
@@ -3016,6 +3161,53 @@ interface PptxChartData {
3016
3161
  * // => { brightness: 20, contrast: -10, grayscale: true } satisfies PptxImageEffects
3017
3162
  * ```
3018
3163
  */
3164
+ /**
3165
+ * One `a14:foregroundMark` / `a14:backgroundMark` polyline hint recorded while
3166
+ * the user painted over the picture in PowerPoint's "Remove Background" mode.
3167
+ * Coordinates are 0..1 fractions of the image.
3168
+ */
3169
+ interface PptxBackgroundRemovalMark {
3170
+ x1: number;
3171
+ y1: number;
3172
+ x2: number;
3173
+ y2: number;
3174
+ }
3175
+ /**
3176
+ * PowerPoint "Remove Background" state (`a14:backgroundRemoval`).
3177
+ *
3178
+ * The four edges are the RETAINED rectangle as 0..1 fractions of the image
3179
+ * (OOXML stores them as per-100000 relative units), and the mark lists are the
3180
+ * segmentation hints the user painted.
3181
+ *
3182
+ * **This is edit-time metadata, not a render instruction.** PowerPoint bakes the
3183
+ * removal into the bitmap referenced by the main `a:blip/@r:embed` and keeps the
3184
+ * pristine original in `a14:imgLayer/@r:embed`. Verified against PowerPoint COM:
3185
+ * a slide exported with and without this element is byte-identical. A renderer
3186
+ * that clips to the retained rectangle would clip an image whose background has
3187
+ * already been removed.
3188
+ *
3189
+ * @example
3190
+ * ```ts
3191
+ * const removal: PptxBackgroundRemoval = { top: 0.12, bottom: 0.88, left: 0.07, right: 0.93 };
3192
+ * // => retains the middle of the image; the marks list stays empty
3193
+ * ```
3194
+ */
3195
+ interface PptxBackgroundRemoval {
3196
+ /** Top edge of the retained rectangle (0..1 fraction of the image height). */
3197
+ top: number;
3198
+ /** Bottom edge of the retained rectangle (0..1 fraction of the image height). */
3199
+ bottom: number;
3200
+ /** Left edge of the retained rectangle (0..1 fraction of the image width). */
3201
+ left: number;
3202
+ /** Right edge of the retained rectangle (0..1 fraction of the image width). */
3203
+ right: number;
3204
+ /** Strokes marking regions the user forced to be foreground. */
3205
+ foregroundMarks?: PptxBackgroundRemovalMark[];
3206
+ /** Strokes marking regions the user forced to be background. */
3207
+ backgroundMarks?: PptxBackgroundRemovalMark[];
3208
+ /** Original effect XML, retained for lossless re-emission. */
3209
+ rawXml?: XmlObject;
3210
+ }
3019
3211
  interface PptxImageEffects {
3020
3212
  /** Brightness adjustment (-100 to 100). */
3021
3213
  brightness?: number;
@@ -3039,8 +3231,38 @@ interface PptxImageEffects {
3039
3231
  };
3040
3232
  /** Artistic effect name (blur, pencilGrayscale, paintStrokes, etc.). */
3041
3233
  artisticEffect?: string;
3042
- /** Artistic effect radius/amount. */
3234
+ /** Artistic effect radius/amount, normalised to 0..100. */
3043
3235
  artisticRadius?: number;
3236
+ /**
3237
+ * Every numeric attribute of the source `a14:artistic*` element, raw and
3238
+ * un-normalised (`trans`, `pencilSize`, `crackSpacing`, …). The attribute set
3239
+ * differs per effect, so this is the lossless companion to the single
3240
+ * {@link PptxImageEffects.artisticRadius} number.
3241
+ */
3242
+ artisticParams?: Record<string, number>;
3243
+ /**
3244
+ * Name of the artistic effect ALREADY baked into the image data, which a
3245
+ * renderer must not apply a second time. Set from the `a14` blip extension,
3246
+ * which PowerPoint writes alongside a pre-rendered bitmap (see
3247
+ * {@link PptxBackgroundRemoval}), and normally equal to
3248
+ * {@link PptxImageEffects.artisticEffect}.
3249
+ *
3250
+ * It records the NAME rather than a boolean so that picking a different
3251
+ * effect in this library's inspector (which patches `artisticEffect` alone)
3252
+ * still renders: the two names then differ.
3253
+ */
3254
+ artisticPrerenderedEffect?: string;
3255
+ /**
3256
+ * PowerPoint "Remove Background" state (`a14:backgroundRemoval`). Edit-time
3257
+ * metadata: the removal is already baked into the image data.
3258
+ */
3259
+ backgroundRemoval?: PptxBackgroundRemoval;
3260
+ /**
3261
+ * `a14:imgLayer/@r:embed` — relationship id of the PRISTINE original image
3262
+ * the baked effects were derived from (PowerPoint stores it as an HD Photo
3263
+ * `.wdp` part, which browsers cannot decode).
3264
+ */
3265
+ originalImageRelId?: string;
3044
3266
  /** Alpha modulation fixed: non-negative percentage (100 means unchanged opacity). */
3045
3267
  alphaModFix?: number;
3046
3268
  /** Original alpha modulation fixed node, including foreign attributes. */
@@ -4952,7 +5174,7 @@ interface UnknownPptxElement extends PptxElementBase {
4952
5174
  /**
4953
5175
  * A single element on a PPTX slide.
4954
5176
  *
4955
- * This is a **discriminated union** narrow on `element.type` to access
5177
+ * This is a **discriminated union**: narrow on `element.type` to access
4956
5178
  * variant-specific properties like `imageData` (image/picture), `pathData`
4957
5179
  * (shape), or `textSegments` (text/shape).
4958
5180
  */
@@ -5695,6 +5917,54 @@ interface PptxEmbeddedFontList {
5695
5917
  rawXml?: XmlObject;
5696
5918
  }
5697
5919
  //#endregion
5920
+ //#region src/core/types/comment-mentions.d.ts
5921
+ /**
5922
+ * A single `@`-mention inside a modern comment body.
5923
+ *
5924
+ * Offsets index into the comment's FLATTENED plain text: every `a:t` value
5925
+ * below `p188:txBody` concatenated, with paragraphs joined by `\n`. That is the
5926
+ * same string `PptxComment.text` carries, so an edit to `text` invalidates
5927
+ * every offset after the edit point and the serializer re-bases them.
5928
+ *
5929
+ * The markup Office uses for a mention is `CT_Mention` (documented for the
5930
+ * SpreadsheetML `2018/threadedcomments` part): `mentionpersonId`, `mentionId`,
5931
+ * `startIndex` and `length`. The PowerPoint `2018/8/main` schema does not
5932
+ * publish a mention element at all, so `rawXml` is retained and re-emitted
5933
+ * attribute-for-attribute: a producer that spells the attributes differently
5934
+ * still round-trips.
5935
+ *
5936
+ * @example
5937
+ * ```ts
5938
+ * const mention: PptxCommentMention = {
5939
+ * personId: "{2CB2E9D0-D392-EB21-5D46-FBA34C1295E6}",
5940
+ * authorName: "Bob Example",
5941
+ * startIndex: 3,
5942
+ * length: 11,
5943
+ * };
5944
+ * // => "Hi Bob Example can you check this".slice(3, 14) === "Bob Example"
5945
+ * ```
5946
+ */
5947
+ interface PptxCommentMention {
5948
+ /** `mentionId`: GUID identifying this mention instance. */
5949
+ id?: string;
5950
+ /** `mentionpersonId`: the `p188:author` id of the mentioned person. */
5951
+ personId: string;
5952
+ /** Display name resolved from the author list at parse time, when known. */
5953
+ authorName?: string;
5954
+ /** Character offset of the mentioned span in the flattened plain text. */
5955
+ startIndex: number;
5956
+ /** Character length of the mentioned span. */
5957
+ length: number;
5958
+ /**
5959
+ * `uri` of the `p188:ext` this mention list was read from. Undefined means
5960
+ * the list is a direct child of `p188:cm`, which is where it is written for
5961
+ * newly authored mentions.
5962
+ */
5963
+ containerUri?: string;
5964
+ /** Original `p188:mention` node, retained for unknown-attribute preservation. */
5965
+ rawXml?: XmlObject;
5966
+ }
5967
+ //#endregion
5698
5968
  //#region src/core/types/metadata.d.ts
5699
5969
  /**
5700
5970
  * A slide comment — may be a legacy positional comment or a modern
@@ -5741,6 +6011,8 @@ interface PptxComment {
5741
6011
  title?: string;
5742
6012
  /** Modern threaded comment support (p15:threadingInfo). */
5743
6013
  threadId?: string;
6014
+ /** `@`-mentions, indexed into `text` (see {@link PptxCommentMention}). */
6015
+ mentions?: PptxCommentMention[];
5744
6016
  /** Replies to this comment (for modern threaded comments). */
5745
6017
  replies?: PptxComment[];
5746
6018
  /** ID of the element this comment is associated with (if any). */
@@ -6260,7 +6532,7 @@ interface PptxTheme {
6260
6532
  * // => "morph" — one of 40+ transition effects
6261
6533
  * ```
6262
6534
  */
6263
- 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' | 'fallOver' | 'drape' | 'curtains' | 'wind' | 'prestige' | 'fracture' | 'crush' | 'peelOff' | 'pageCurlDouble' | 'pageCurlSingle' | 'airplane' | 'origami';
6535
+ 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' | 'box' | 'orbit' | 'fallOver' | 'drape' | 'curtains' | 'wind' | 'prestige' | 'fracture' | 'crush' | 'peelOff' | 'pageCurlDouble' | 'pageCurlSingle' | 'airplane' | 'origami';
6264
6536
  /** Split orientation from OOXML `@_orient`. */
6265
6537
  type PptxSplitOrientation = 'horz' | 'vert';
6266
6538
  /** Schema-defined `ST_TransitionSpeed` values. */
@@ -6555,6 +6827,18 @@ interface PptxSlideBackgroundPattern {
6555
6827
  interface PptxSlide {
6556
6828
  id: string;
6557
6829
  rId: string;
6830
+ /**
6831
+ * `p:sldIdLst/p:sldId/@id` (ST_SlideId, 256..2147483647): the numeric key
6832
+ * that sections (`p14:sldIdLst/p14:sldId/@id`) and section/summary zooms
6833
+ * name slides by.
6834
+ *
6835
+ * It lives in `presentation.xml`, NOT in the slide part, so it cannot be
6836
+ * recovered from `rawXml`. Without it on the model, code that writes a
6837
+ * section's membership has nothing correct to write and falls back to the
6838
+ * slide NUMBER, which is 1-based and therefore never matches a real deck's
6839
+ * ids: the section reloads with no slides in it.
6840
+ */
6841
+ slideId?: string;
6558
6842
  sourceSlideId?: string;
6559
6843
  /** Optional author-supplied slide name (set via `SlideBuilder.setName`). */
6560
6844
  name?: string;
@@ -6757,6 +7041,26 @@ interface PptxPresentationProperties {
6757
7041
  /** Kiosk auto-restart interval in milliseconds (from `p:kiosk/@restart`). Only meaningful when showType is "kiosk". */
6758
7042
  kioskRestartTime?: number;
6759
7043
  }
7044
+ /**
7045
+ * Slide dimensions from `p:sldSz` (CT_SlideSize, ECMA-376 §19.2.1.39).
7046
+ *
7047
+ * @example
7048
+ * ```ts
7049
+ * const size: PptxSlideSize = { widthEmu: 9144000, heightEmu: 6858000, type: 'screen4x3' };
7050
+ * // => satisfies PptxSlideSize
7051
+ * ```
7052
+ */
7053
+ interface PptxSlideSize {
7054
+ /** `@cx` in EMU. Omitted or non-positive values leave the loaded width alone. */
7055
+ widthEmu?: number;
7056
+ /** `@cy` in EMU. Omitted or non-positive values leave the loaded height alone. */
7057
+ heightEmu?: number;
7058
+ /**
7059
+ * `@type` (ST_SlideSizeType). The schema default is `custom`, which is
7060
+ * why PowerPoint omits the attribute for a non-preset size.
7061
+ */
7062
+ type?: string;
7063
+ }
6760
7064
  /**
6761
7065
  * A named custom slide show (`p:custShowLst / p:custShow`).
6762
7066
  *
@@ -7771,6 +8075,19 @@ interface PptxHandlerSaveOptions {
7771
8075
  customerData?: PptxCustomerData[];
7772
8076
  /** Photo album metadata to save back to `p:photoAlbum`. */
7773
8077
  photoAlbum?: PptxPhotoAlbum;
8078
+ /**
8079
+ * Slide dimensions to write back to `p:sldSz`.
8080
+ *
8081
+ * Omitting the option preserves the load-time dimensions verbatim, which
8082
+ * is why an edit made through a viewer's Slide Size control has to reach
8083
+ * the save call: nothing else in the pipeline can observe it.
8084
+ *
8085
+ * PowerPoint derives `Presentation.PageSetup.SlideSize` from `@cx`/`@cy`
8086
+ * alone (verified by COM: an A4-typed `p:sldSz` carrying 4:3 dimensions
8087
+ * still reports `ppSlideSizeCustom`), so `type` is written for fidelity
8088
+ * but the dimensions are what actually decide the reported preset.
8089
+ */
8090
+ slideSize?: PptxSlideSize;
7774
8091
  /** East Asian line-break settings to save back to `p:kinsoku`. */
7775
8092
  kinsoku?: PptxKinsoku | null;
7776
8093
  /** Write-protection verifier. Set to `null` to remove, `undefined` to preserve existing. */
@@ -8362,24 +8679,38 @@ declare class PptxHandlerCore {
8362
8679
  name?: string;
8363
8680
  }>>;
8364
8681
  /**
8365
- * Export selected slides as individual PPTX files.
8682
+ * Export selected slides to a vector or raster format, keyed by slide index.
8683
+ *
8684
+ * **This does not produce PPTX files.** The previous version of this comment
8685
+ * said each entry was "a standalone PPTX with only that slide", named the
8686
+ * option `slideIndexes` (the real field is `slideIndices`), and wrote the
8687
+ * bytes to `slide_N.pptx`. None of that was ever true: the runtime has
8688
+ * always taken a `format` of `svg` / `png` / `pdf`. Per-slide PPTX
8689
+ * extraction is a different operation and is not implemented here.
8366
8690
  *
8367
- * Each entry in the returned map is keyed by slide index and contains a
8368
- * standalone `Uint8Array` PPTX with only that slide.
8691
+ * Only `svg` works without a host-supplied backend, and it works fully:
8692
+ * the headless {@link SvgExporter} renders it with no DOM. `png` and `pdf`
8693
+ * THROW, because this package carries no rasteriser; use a viewer binding's
8694
+ * browser export pipeline, or override `exportSlides` on the runtime with
8695
+ * your own backend.
8369
8696
  *
8370
8697
  * @param slides - Full slide array.
8371
- * @param options - Export options (slide indexes, format, etc.).
8372
- * @returns A `Map<slideIndex, Uint8Array>` of exported files.
8698
+ * @param options - Export options (`format`, `slideIndices`, `width`, ...).
8699
+ * @returns A `Map<slideIndex, Uint8Array>` of exported files. Hidden slides
8700
+ * are omitted unless `options.includeHidden` is set, so the map can be
8701
+ * smaller than `options.slideIndices`.
8702
+ * @throws {Error} when `options.format` is `png` or `pdf`.
8373
8703
  *
8374
8704
  * @example
8375
8705
  * ```ts
8376
8706
  * const exports = await handler.exportSlides(data.slides, {
8377
- * slideIndexes: [0, 2],
8707
+ * format: 'svg',
8708
+ * slideIndices: [0, 2],
8378
8709
  * });
8379
8710
  * for (const [idx, bytes] of exports) {
8380
- * await fs.writeFile(`slide_${idx}.pptx`, Buffer.from(bytes));
8711
+ * await fs.writeFile(`slide_${idx}.svg`, Buffer.from(bytes));
8381
8712
  * }
8382
- * // => Map<number, Uint8Array> one standalone .pptx per exported slide
8713
+ * // => Map<number, Uint8Array>: one SVG document per exported slide
8383
8714
  * ```
8384
8715
  */
8385
8716
  exportSlides(slides: PptxSlide[], options: PptxExportOptions): Promise<Map<number, Uint8Array>>;
@@ -8829,6 +9160,91 @@ interface MorphTransitionPlan {
8829
9160
  //#region src/render/text-case-transform.d.ts
8830
9161
  type ChangeCaseMode = 'sentence' | 'lower' | 'upper' | 'capitalize' | 'toggle';
8831
9162
  //#endregion
9163
+ //#region src/render/shape-adjustment-model.d.ts
9164
+ /**
9165
+ * `shape-adjustment-model`: the vocabulary the adjust-handle modules share.
9166
+ *
9167
+ * The `a:ahLst` work is split three ways for the repo's file-size budget:
9168
+ * `shape-adjustment-probe` measures the geometry, `shape-adjustment-handles`
9169
+ * derives the handles from those measurements, and `shape-adjustment-solver`
9170
+ * turns a pointer position back into guide values. All three need these types
9171
+ * and the one rule that operates purely on them, so they live here and the
9172
+ * dependency graph stays a DAG rather than a cycle.
9173
+ *
9174
+ * @module render/shape-adjustment-model
9175
+ */
9176
+ /**
9177
+ * How a pointer position becomes a guide value, captured once when the gesture
9178
+ * starts so `pointermove` stays pure arithmetic.
9179
+ */
9180
+ interface ShapeAdjustmentSolver {
9181
+ /** `linear`: the handle slides. `angular`: it swings about {@link centerX}. */
9182
+ kind: 'linear' | 'angular';
9183
+ /** Handle position in element-local px at {@link startValue}. */
9184
+ anchorX: number;
9185
+ anchorY: number;
9186
+ /** Element-local px the handle travels per ONE unit of guide value. */
9187
+ dirX: number;
9188
+ dirY: number;
9189
+ /** Pivot for an angular handle (the shape centre). */
9190
+ centerX: number;
9191
+ centerY: number;
9192
+ /** The guide value the anchor was measured at. */
9193
+ startValue: number;
9194
+ /** Guide-space bounds, taken from the preset's own `pin` clamp. */
9195
+ min: number;
9196
+ max: number;
9197
+ }
9198
+ /** One guide a handle drives. */
9199
+ interface AdjustmentAxisSolver {
9200
+ key: string;
9201
+ solver: ShapeAdjustmentSolver;
9202
+ }
9203
+ /** Descriptor for one draggable adjustment handle (the amber diamond). */
9204
+ interface ShapeAdjustmentHandleDescriptor {
9205
+ /** The `a:avLst` guide name this handle writes (`adj`, `adj1`, ...). */
9206
+ key: string;
9207
+ /** Handle x offset in element-local px (origin = element top-left). */
9208
+ left: number;
9209
+ /** Handle y offset in element-local px. */
9210
+ top: number;
9211
+ /**
9212
+ * Current adjustment value in GUIDE units, not a 0-1 fraction. Most presets
9213
+ * range 0..50000 or 0..100000 and the angular ones run to 21,600,000.
9214
+ */
9215
+ value: number;
9216
+ cursor: string;
9217
+ /**
9218
+ * How this handle's drag resolves, measured off the preset geometry: one
9219
+ * entry per `a:avLst` guide it drives (callouts drive two). Absent only for
9220
+ * a caller that built a descriptor by hand.
9221
+ */
9222
+ solvers?: AdjustmentAxisSolver[];
9223
+ }
9224
+ /** Live drag state captured when an adjustment gesture starts. */
9225
+ interface ShapeAdjustmentDragState {
9226
+ elementId: string;
9227
+ key: string;
9228
+ shapeType: string;
9229
+ startClientX: number;
9230
+ startClientY: number;
9231
+ startAdjustment: number;
9232
+ startWidth: number;
9233
+ startHeight: number;
9234
+ moved: boolean;
9235
+ /** Copied from the descriptor the gesture started on. */
9236
+ solvers?: AdjustmentAxisSolver[];
9237
+ /**
9238
+ * The element's whole `a:avLst` map at gesture start.
9239
+ *
9240
+ * A binding writes `shapeAdjustments` as one object, so a drag that sent
9241
+ * only the guide it changed would DELETE every other authored adjustment on
9242
+ * a multi-adjust preset (a `quadArrow` would lose two of its three the first
9243
+ * time one was touched).
9244
+ */
9245
+ startAdjustments?: Record<string, number>;
9246
+ }
9247
+ //#endregion
8832
9248
  //#region src/render/collaboration-text-codec.d.ts
8833
9249
  /**
8834
9250
  * collaboration-text-codec.ts: TextSegment[] <-> Y.Text delta codec used by the
@@ -8947,6 +9363,12 @@ interface CompareResult {
8947
9363
  changedCount: number;
8948
9364
  unchangedCount: number;
8949
9365
  }
9366
+ interface SlideSizeEmu {
9367
+ widthEmu: number;
9368
+ heightEmu: number;
9369
+ /** ST_SlideSizeType token, or `''` for a size with no preset. */
9370
+ type: string;
9371
+ }
8950
9372
  //#endregion
8951
9373
  //#region src/render/mobile-viewport.d.ts
8952
9374
  /**
@@ -9217,13 +9639,25 @@ interface ViewerProofingOptions {
9217
9639
  checkSpellingAsYouType: boolean;
9218
9640
  hideSpellingErrors: boolean;
9219
9641
  }
9642
+ /**
9643
+ * File > Options > Save.
9644
+ *
9645
+ * Font embedding deliberately has NO entry here. It is owned by the File >
9646
+ * Fonts panel, whose toggle is the one the save path reads (see
9647
+ * `render/font-embedding`: `describeFontEmbedding` decides the toggle's start
9648
+ * position and whether it can do anything at all, `embeddedFontSaveOptions`
9649
+ * turns it into the `PptxHandler.save()` slice). This group used to carry a
9650
+ * second `embedFonts` boolean, plus an `embedAllFontCharacters` companion, and
9651
+ * neither was read by anything: the pane moved a switch that changed no saved
9652
+ * byte, while the panel next door moved the real one. Two switches for one
9653
+ * setting, one of them lying, is worse than one switch in a less
9654
+ * PowerPoint-shaped place.
9655
+ */
9220
9656
  interface ViewerSaveOptions {
9221
9657
  autoSave: boolean;
9222
9658
  autoRecoverIntervalMinutes: number;
9223
9659
  keepLastAutoRecoveredVersion: boolean;
9224
9660
  defaultExportFormat: DefaultExportFormat;
9225
- embedFonts: boolean;
9226
- embedAllFontCharacters: boolean;
9227
9661
  cacheRetentionDays: number;
9228
9662
  clearCacheOnClose: boolean;
9229
9663
  }
@@ -9442,22 +9876,6 @@ interface ResizeState {
9442
9876
  lastWidth: number;
9443
9877
  lastHeight: number;
9444
9878
  }
9445
- /**
9446
- * Tracks the state of an ongoing shape adjustment handle drag.
9447
- * Used when the user drags the yellow diamond handle to alter
9448
- * shape-specific parameters (e.g. corner radius on a rounded rectangle).
9449
- */
9450
- interface ShapeAdjustmentDragState {
9451
- elementId: string;
9452
- key: string;
9453
- shapeType: string;
9454
- startClientX: number;
9455
- startClientY: number;
9456
- startAdjustment: number;
9457
- startWidth: number;
9458
- startHeight: number;
9459
- moved: boolean;
9460
- }
9461
9879
  /**
9462
9880
  * A snapshot of editor state captured for undo/redo history.
9463
9881
  * Contains the full slide deck state at a point in time so that
@@ -9760,6 +10178,8 @@ interface ToolbarProps {
9760
10178
  onToggleVersionHistory?: () => void;
9761
10179
  onOpenPasswordProtection?: () => void;
9762
10180
  onOpenDocumentProperties?: () => void;
10181
+ /** Design > Slide Size: reveal the inspector card that owns the slide size. */
10182
+ onOpenSlideSize?: () => void;
9763
10183
  onOpenFontEmbedding?: () => void;
9764
10184
  onOpenDigitalSignatures?: () => void;
9765
10185
  onEnterMasterView: () => void;
@@ -9885,7 +10305,7 @@ interface SlideCanvasProps {
9885
10305
  /** Called when the user presses mouse down on empty canvas space. */
9886
10306
  onCanvasMouseDown?: (e: React$1.MouseEvent) => void;
9887
10307
  onResizePointerDown: (elementId: string, e: React$1.MouseEvent, handle: string) => void;
9888
- onAdjustmentPointerDown: (elementId: string, e: React$1.MouseEvent) => void;
10308
+ onAdjustmentPointerDown: (elementId: string, e: React$1.MouseEvent, descriptor: ShapeAdjustmentHandleDescriptor) => void;
9889
10309
  /** Commit a new rotation (degrees) when the on-canvas rotate handle is dragged. */
9890
10310
  onRotate?: (elementId: string, rotationDeg: number) => void;
9891
10311
  onInlineEditChange: (text: string) => void;
@@ -10004,6 +10424,17 @@ interface UseAutosaveInput {
10004
10424
  intervalSeconds?: number;
10005
10425
  /** Whether autosave is enabled. */
10006
10426
  enabled?: boolean;
10427
+ /**
10428
+ * The values a snapshot is built from, read fresh on each tick.
10429
+ *
10430
+ * `isDirty` stays true from the first edit until the user performs a real
10431
+ * save, so on its own it makes the timer re-serialize and rewrite an
10432
+ * identical deck every N seconds forever. Vue, Svelte and Vanilla never had
10433
+ * that problem because they debounce on the slides array being reassigned;
10434
+ * this is the same trigger, and `shouldWriteAutosaveSnapshot` writes
10435
+ * whenever it is unsure. Omit it and every tick writes, as before.
10436
+ */
10437
+ getChangeSources?: () => readonly unknown[];
10007
10438
  }
10008
10439
  interface UseAutosaveResult {
10009
10440
  /** Current autosave status for display in the StatusBar. */
@@ -10575,6 +11006,8 @@ interface UsePresentationModeInput {
10575
11006
  onToggleToolbar?: () => void;
10576
11007
  /** Open the All Slides navigator (Ctrl+S). */
10577
11008
  onShowAllSlides?: () => void;
11009
+ /** Show or hide live captions (PowerPoint's bare J). */
11010
+ onToggleSubtitles?: () => void;
10578
11011
  /** Called to persist rehearsal timings into slide transitions. */
10579
11012
  onSaveRehearsalTimings?: (timings: Record<number, number>) => void;
10580
11013
  /** Whether to loop continuously (kiosk or explicit loop setting). */
@@ -10951,6 +11384,15 @@ interface ViewerCoreState {
10951
11384
  /** Width and height of the slide canvas in CSS pixels. */
10952
11385
  canvasSize: CanvasSize;
10953
11386
  setCanvasSize: React$1.Dispatch<React$1.SetStateAction<CanvasSize>>;
11387
+ /**
11388
+ * `p:sldSz` in EMU, seeded from the loaded deck and updated by Design >
11389
+ * Slide Size. It is what a save persists: the pixel `canvasSize` above
11390
+ * cannot round-trip a preset (Ledger's 12179300 EMU is 1278.5px, and the
11391
+ * integer pixel it rounds to costs the deck its `ppSlideSizeLedgerPaper`
11392
+ * identity). `undefined` until a deck loads or the user picks a preset.
11393
+ */
11394
+ slideSizeEmu: SlideSizeEmu | undefined;
11395
+ setSlideSizeEmu: React$1.Dispatch<React$1.SetStateAction<SlideSizeEmu | undefined>>;
10954
11396
  /** Zero-based index of the currently active (visible) slide. */
10955
11397
  activeSlideIndex: number;
10956
11398
  setActiveSlideIndex: React$1.Dispatch<React$1.SetStateAction<number>>;
@@ -11230,6 +11672,8 @@ interface UseLoadContentInput {
11230
11672
  setTemplateElementsBySlideId: React.Dispatch<React.SetStateAction<Record<string, PptxElement[]>>>;
11231
11673
  mediaDataUrls: Map<string, string>;
11232
11674
  setCanvasSize: React.Dispatch<React.SetStateAction<CanvasSize>>;
11675
+ /** Seeds the EMU `p:sldSz` that a save persists (see `ViewerCoreState.slideSizeEmu`). */
11676
+ setSlideSizeEmu: React.Dispatch<React.SetStateAction<SlideSizeEmu | undefined>>;
11233
11677
  setHeaderFooter: React.Dispatch<React.SetStateAction<PptxHeaderFooter>>;
11234
11678
  setLayoutOptions: React.Dispatch<React.SetStateAction<Array<{
11235
11679
  path: string;
@@ -11240,6 +11684,12 @@ interface UseLoadContentInput {
11240
11684
  setTableStyleMap: React.Dispatch<React.SetStateAction<ParsedTableStyleMap | undefined>>;
11241
11685
  setThemeOptions: React.Dispatch<React.SetStateAction<PptxThemeOption[]>>;
11242
11686
  setCustomShows: React.Dispatch<React.SetStateAction<PptxCustomShow[]>>;
11687
+ /**
11688
+ * Seeds the running show from `p:showPr/p:custShow/@id`, so a deck authored
11689
+ * to open into a custom show plays that subset instead of the whole deck.
11690
+ * A later manual pick still wins: this only fires on load.
11691
+ */
11692
+ setActiveCustomShowId: React.Dispatch<React.SetStateAction<string | null>>;
11243
11693
  setSections: React.Dispatch<React.SetStateAction<PptxSection[]>>;
11244
11694
  setPresentationProperties: React.Dispatch<React.SetStateAction<PptxPresentationProperties>>;
11245
11695
  setNotesMaster: React.Dispatch<React.SetStateAction<PptxNotesMaster | undefined>>;
@@ -11273,7 +11723,7 @@ interface UseLoadContentInput {
11273
11723
  interface UseLoadContentResult {
11274
11724
  handlerRef: React.MutableRefObject<PptxHandler | null>;
11275
11725
  }
11276
- declare function useLoadContent({ content, clearSelection, history, setSlides, setTemplateElementsBySlideId, mediaDataUrls, setCanvasSize, setHeaderFooter, setLayoutOptions, setSlideMasters, setTheme, setTableStyleMap, setThemeOptions, setCustomShows, setSections, setPresentationProperties, setNotesMaster, setHandoutMaster, setNotesCanvasSize, setCustomProperties, setTagCollections, setCoreProperties, setAppProperties, setEmbeddedFonts, setActiveSlideIndex, setHasMacros, setHasDigitalSignatures, setDigitalSignatureCount, setGuides, setLoading, setError, setIsDirty, setIsEncrypted, onContentApplied }: UseLoadContentInput): UseLoadContentResult;
11726
+ declare function useLoadContent({ content, clearSelection, history, setSlides, setTemplateElementsBySlideId, mediaDataUrls, setCanvasSize, setSlideSizeEmu, setHeaderFooter, setLayoutOptions, setSlideMasters, setTheme, setTableStyleMap, setThemeOptions, setCustomShows, setActiveCustomShowId, setSections, setPresentationProperties, setNotesMaster, setHandoutMaster, setNotesCanvasSize, setCustomProperties, setTagCollections, setCoreProperties, setAppProperties, setEmbeddedFonts, setActiveSlideIndex, setHasMacros, setHasDigitalSignatures, setDigitalSignatureCount, setGuides, setLoading, setError, setIsDirty, setIsEncrypted, onContentApplied }: UseLoadContentInput): UseLoadContentResult;
11277
11727
  //#endregion
11278
11728
  //#region src/viewer/hooks/useElementOperations.d.ts
11279
11729
  /**
@@ -11354,6 +11804,12 @@ interface SectionOperations {
11354
11804
  moveSectionUp: (sectionId: string) => void;
11355
11805
  moveSectionDown: (sectionId: string) => void;
11356
11806
  moveSlidesToSection: (slideIndexes: number[], targetSectionId: string) => void;
11807
+ /**
11808
+ * Flip `section.collapsed`, the `p14:section/@collapsed` flag core already
11809
+ * round-trips. React alone kept collapse in component-local state, so the
11810
+ * one binding that could not persist a collapsed section was this one.
11811
+ */
11812
+ toggleSectionCollapse: (sectionId: string) => void;
11357
11813
  }
11358
11814
  declare function useSectionOperations(input: UseSectionOperationsInput): SectionOperations;
11359
11815
  //#endregion
@@ -11424,7 +11880,7 @@ interface CanvasInteractionHandlers {
11424
11880
  handleElementContextMenu: (elementId: string, e: React.MouseEvent) => void;
11425
11881
  handleCanvasMouseDown: (e: React.MouseEvent) => void;
11426
11882
  handleResizePointerDown: (elementId: string, e: React.MouseEvent, handle: string) => void;
11427
- handleAdjustmentPointerDown: (elementId: string, e: React.MouseEvent) => void;
11883
+ handleAdjustmentPointerDown: (elementId: string, e: React.MouseEvent, descriptor: ShapeAdjustmentHandleDescriptor) => void;
11428
11884
  /** Commit a new rotation (degrees) for an element from the on-canvas rotate handle. */
11429
11885
  handleRotate: (elementId: string, rotationDeg: number) => void;
11430
11886
  /** Commit an inline (on-canvas) SmartArt node edit through the element-update path. */
@@ -11688,6 +12144,8 @@ interface UseExportHandlersInput {
11688
12144
  appProperties: Record<string, unknown> | null;
11689
12145
  customProperties: Array<Record<string, unknown>>;
11690
12146
  tagCollections: Array<Record<string, unknown>>;
12147
+ /** The slide masters and their layouts; see `UseExportSaveAsInput`. */
12148
+ slideMasters: PptxSlideMaster[];
11691
12149
  notesMaster: Record<string, unknown> | undefined;
11692
12150
  handoutMaster: Record<string, unknown> | undefined;
11693
12151
  guides: Array<{
@@ -11700,6 +12158,12 @@ interface UseExportHandlersInput {
11700
12158
  theme: PptxTheme | undefined;
11701
12159
  /** Slide canvas size in CSS pixels, carried into the deck-JSON export. */
11702
12160
  canvasSize: CanvasSize;
12161
+ /**
12162
+ * The EMU `p:sldSz` the viewer holds. Save-As builds its own save options
12163
+ * rather than reusing `useSerialize`, so without this a Slide Size edit
12164
+ * reached Save and not Save As (or the backstage Save, which routes here).
12165
+ */
12166
+ slideSizeEmu?: SlideSizeEmu | undefined;
11703
12167
  password?: string;
11704
12168
  }
11705
12169
  interface ExportHandlersResult {
@@ -12075,6 +12539,16 @@ interface UseSerializeInput {
12075
12539
  /** Separated master/layout (template) elements, merged back at save time. */
12076
12540
  templateElementsBySlideId: Record<string, PptxElement[]>;
12077
12541
  activeSlideIndex: number;
12542
+ /** The pixel canvas the raw Slide Size W/H inputs edit. */
12543
+ canvasSize: CanvasSize;
12544
+ /**
12545
+ * The EMU `p:sldSz` the viewer is holding (seeded on load, replaced by a
12546
+ * preset/orientation pick). Passed with `canvasSize` to
12547
+ * `resolveSlideSizeSelection`, which keeps the EMU whenever the two still
12548
+ * agree so a preset survives the save, and takes the pixels when the user
12549
+ * has typed into the raw inputs.
12550
+ */
12551
+ slideSizeEmu?: SlideSizeEmu | undefined;
12078
12552
  guides: Array<{
12079
12553
  id: string;
12080
12554
  axis: 'h' | 'v';
@@ -12092,6 +12566,19 @@ interface UseSerializeInput {
12092
12566
  appProperties: PptxAppProperties | undefined;
12093
12567
  customProperties: PptxCustomProperty[];
12094
12568
  tagCollections: PptxTagCollection[];
12569
+ /**
12570
+ * The slide masters and their layouts, as View > Slide Master left them.
12571
+ *
12572
+ * Required, not optional: this was the one save option React never passed,
12573
+ * and core rewrites a master or layout part only for the ones the caller
12574
+ * hands back. Every master-view edit therefore showed on screen and was
12575
+ * dropped by the save - a deleted master shape came back on reload, and a
12576
+ * master background reverted to white. The other four bindings pass it.
12577
+ * Core compares each part against the element list parsed at load and
12578
+ * rewrites only what actually changed, so passing the whole array on every
12579
+ * save costs an untouched deck nothing.
12580
+ */
12581
+ slideMasters: PptxSlideMaster[];
12095
12582
  notesMaster: PptxNotesMaster | undefined;
12096
12583
  handoutMaster: PptxHandoutMaster | undefined;
12097
12584
  handlerRef: React$1.RefObject<PptxHandler | null>;
@@ -12158,6 +12645,12 @@ interface UsePresentationSetupInput {
12158
12645
  promptKeepInkAnnotations?: boolean;
12159
12646
  /** Options > Advanced > "Show popup toolbar" (default true). */
12160
12647
  popupToolbarEnabled?: boolean;
12648
+ /**
12649
+ * Show or hide live captions. PowerPoint toggles them on a bare `J` during a
12650
+ * show, and the shared slide-show keymap resolves that key for every binding;
12651
+ * without this callback the key is mapped and then lands nowhere.
12652
+ */
12653
+ onToggleSubtitles?: () => void;
12161
12654
  }
12162
12655
  interface PresentationSetupResult {
12163
12656
  presentation: UsePresentationModeResult;
@@ -12643,6 +13136,13 @@ interface UseExportSaveAsInput {
12643
13136
  appProperties: Record<string, unknown> | null;
12644
13137
  customProperties: Array<Record<string, unknown>>;
12645
13138
  tagCollections: Array<Record<string, unknown>>;
13139
+ /**
13140
+ * The slide masters and their layouts, as View > Slide Master left them.
13141
+ * Save As builds its own options rather than reusing `useSerialize`, so it
13142
+ * needs the same array: without it a master-view edit reached Save and not
13143
+ * Save As. (For a long while it reached neither.)
13144
+ */
13145
+ slideMasters: PptxSlideMaster[];
12646
13146
  notesMaster: Record<string, unknown> | undefined;
12647
13147
  handoutMaster: Record<string, unknown> | undefined;
12648
13148
  guides: Array<{
@@ -12655,6 +13155,8 @@ interface UseExportSaveAsInput {
12655
13155
  theme: PptxTheme | undefined;
12656
13156
  /** Slide canvas size in CSS pixels, carried into the deck-JSON export. */
12657
13157
  canvasSize: CanvasSize;
13158
+ /** The EMU `p:sldSz` the viewer holds; see `UseExportHandlersInput`. */
13159
+ slideSizeEmu?: SlideSizeEmu | undefined;
12658
13160
  modalControls: ExportModalControls;
12659
13161
  password?: string;
12660
13162
  }
@@ -12722,6 +13224,13 @@ interface UseKeyboardShortcutsInput {
12722
13224
  onUngroup?: () => void;
12723
13225
  /** Show or hide the keyboard-shortcut reference ("?"). */
12724
13226
  onToggleShortcuts?: () => void;
13227
+ /**
13228
+ * Open or close the find bar (Ctrl/Cmd+F). Left unwired by the default
13229
+ * shell, where `useFindReplace` owns the find state and resolves the same
13230
+ * chord against the same shared keymap; the case exists so the switch stays
13231
+ * exhaustive and so a host driving this hook directly can handle it.
13232
+ */
13233
+ onFind?: () => void;
12725
13234
  /** Navigate to previous visible slide (edit mode, no selection). */
12726
13235
  onPrevSlide?: () => void;
12727
13236
  /** Navigate to next visible slide (edit mode, no selection). */
@@ -12880,6 +13389,8 @@ interface UsePresentationKeyboardInput {
12880
13389
  onToggleToolbar?: () => void;
12881
13390
  /** Open the All Slides navigator (Ctrl+S). */
12882
13391
  onShowAllSlides?: () => void;
13392
+ /** Show or hide live captions (J). */
13393
+ onToggleSubtitles?: () => void;
12883
13394
  onToggleBlackScreen?: () => void;
12884
13395
  onToggleWhiteScreen?: () => void;
12885
13396
  rehearsing: boolean;