pptx-react-viewer 3.7.0 → 3.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (160) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/dist/{AiChatPanel-L5QGWVZK.mjs → AiChatPanel-A5DCEHTO.mjs} +4 -4
  3. package/dist/AiChatPanel-A5DCEHTO.mjs.br +0 -0
  4. package/dist/AiChatPanel-A5DCEHTO.mjs.gz +0 -0
  5. package/dist/{AiChatPanel-M3AHKYPS.js → AiChatPanel-XLQM4BQJ.js} +25 -25
  6. package/dist/AiChatPanel-XLQM4BQJ.js.br +0 -0
  7. package/dist/AiChatPanel-XLQM4BQJ.js.gz +0 -0
  8. package/dist/{Area3DChartScene-AE2XYKDW.mjs → Area3DChartScene-5CMEMIBI.mjs} +1 -1
  9. package/dist/Area3DChartScene-5CMEMIBI.mjs.br +0 -0
  10. package/dist/Area3DChartScene-5CMEMIBI.mjs.gz +0 -0
  11. package/dist/{Area3DChartScene-ZQLQK6L4.js → Area3DChartScene-RZ3V3WOR.js} +2 -2
  12. package/dist/Area3DChartScene-RZ3V3WOR.js.br +0 -0
  13. package/dist/Area3DChartScene-RZ3V3WOR.js.gz +0 -0
  14. package/dist/{Bar3DChartScene-FQV62XOI.mjs → Bar3DChartScene-H3MYUJKV.mjs} +1 -1
  15. package/dist/Bar3DChartScene-H3MYUJKV.mjs.br +0 -0
  16. package/dist/Bar3DChartScene-H3MYUJKV.mjs.gz +0 -0
  17. package/dist/{Bar3DChartScene-TZ6ADFBS.js → Bar3DChartScene-KHCQ6TEC.js} +2 -2
  18. package/dist/Bar3DChartScene-KHCQ6TEC.js.br +0 -0
  19. package/dist/Bar3DChartScene-KHCQ6TEC.js.gz +0 -0
  20. package/dist/{Line3DChartScene-5CKPAX63.js → Line3DChartScene-QEACF3U3.js} +2 -2
  21. package/dist/Line3DChartScene-QEACF3U3.js.br +0 -0
  22. package/dist/Line3DChartScene-QEACF3U3.js.gz +0 -0
  23. package/dist/{Line3DChartScene-FEUY3PCE.mjs → Line3DChartScene-YFRPJHDX.mjs} +1 -1
  24. package/dist/Line3DChartScene-YFRPJHDX.mjs.br +0 -0
  25. package/dist/Line3DChartScene-YFRPJHDX.mjs.gz +0 -0
  26. package/dist/{Model3DScene-V3DHIISV.mjs → Model3DScene-O24KP723.mjs} +1 -1
  27. package/dist/Model3DScene-O24KP723.mjs.br +0 -0
  28. package/dist/Model3DScene-O24KP723.mjs.gz +0 -0
  29. package/dist/{Model3DScene-BLXEALM6.js → Model3DScene-QQWKGJ3T.js} +2 -2
  30. package/dist/{Model3DScene-BLXEALM6.js.br → Model3DScene-QQWKGJ3T.js.br} +0 -0
  31. package/dist/Model3DScene-QQWKGJ3T.js.gz +0 -0
  32. package/dist/{PieChart3DScene-VZI2VARG.mjs → PieChart3DScene-CI6CW22C.mjs} +1 -1
  33. package/dist/{PieChart3DScene-VZI2VARG.mjs.br → PieChart3DScene-CI6CW22C.mjs.br} +0 -0
  34. package/dist/PieChart3DScene-CI6CW22C.mjs.gz +0 -0
  35. package/dist/{PieChart3DScene-GHHT3PDV.js → PieChart3DScene-L3MHKQHW.js} +2 -2
  36. package/dist/{PieChart3DScene-GHHT3PDV.js.br → PieChart3DScene-L3MHKQHW.js.br} +0 -0
  37. package/dist/PieChart3DScene-L3MHKQHW.js.gz +0 -0
  38. package/dist/PowerPointViewer-Cl6jBPNw.d.ts.map +1 -1
  39. package/dist/{SurfaceChart3DScene-WWIMQ65D.js → SurfaceChart3DScene-5IER6VFW.js} +2 -2
  40. package/dist/{SurfaceChart3DScene-WWIMQ65D.js.br → SurfaceChart3DScene-5IER6VFW.js.br} +0 -0
  41. package/dist/SurfaceChart3DScene-5IER6VFW.js.gz +0 -0
  42. package/dist/{SurfaceChart3DScene-T36E2HBA.mjs → SurfaceChart3DScene-JUXRC3K2.mjs} +1 -1
  43. package/dist/SurfaceChart3DScene-JUXRC3K2.mjs.br +0 -0
  44. package/dist/SurfaceChart3DScene-JUXRC3K2.mjs.gz +0 -0
  45. package/dist/{audience-content-store-bR7Gs_1S.d.ts → audience-content-store-CB2WVM1K.d.ts} +12 -3
  46. package/dist/{audience-content-store-bR7Gs_1S.d.ts.map → audience-content-store-CB2WVM1K.d.ts.map} +1 -1
  47. package/dist/{chunk-TUSALM3A.js → chunk-4222CHFH.js} +1709 -1235
  48. package/dist/chunk-4222CHFH.js.br +0 -0
  49. package/dist/chunk-4222CHFH.js.gz +0 -0
  50. package/dist/{chunk-NV55GU5V.mjs → chunk-6IMB5DNJ.mjs} +4953 -3103
  51. package/dist/chunk-6IMB5DNJ.mjs.br +0 -0
  52. package/dist/chunk-6IMB5DNJ.mjs.gz +0 -0
  53. package/dist/{chunk-OBE4TB76.js → chunk-DE3S3UHX.js} +551 -574
  54. package/dist/chunk-DE3S3UHX.js.br +0 -0
  55. package/dist/chunk-DE3S3UHX.js.gz +0 -0
  56. package/dist/{chunk-3EJFZ7TE.js → chunk-F5NPGNMA.js} +9 -5
  57. package/dist/chunk-F5NPGNMA.js.br +0 -0
  58. package/dist/chunk-F5NPGNMA.js.gz +0 -0
  59. package/dist/{chunk-FGTMS7LR.mjs → chunk-FRZIBZTE.mjs} +55 -4
  60. package/dist/chunk-FRZIBZTE.mjs.br +0 -0
  61. package/dist/chunk-FRZIBZTE.mjs.gz +0 -0
  62. package/dist/{chunk-W24OJ7H5.js → chunk-L3ZIBQEB.js} +55 -4
  63. package/dist/chunk-L3ZIBQEB.js.br +0 -0
  64. package/dist/chunk-L3ZIBQEB.js.gz +0 -0
  65. package/dist/{chunk-TXY2E7VQ.mjs → chunk-PFPKBNNZ.mjs} +509 -35
  66. package/dist/chunk-PFPKBNNZ.mjs.br +0 -0
  67. package/dist/chunk-PFPKBNNZ.mjs.gz +0 -0
  68. package/dist/{chunk-VIFDZIVX.js → chunk-QWA5YEIZ.js} +187 -176
  69. package/dist/chunk-QWA5YEIZ.js.br +0 -0
  70. package/dist/chunk-QWA5YEIZ.js.gz +0 -0
  71. package/dist/{chunk-JANUSAEK.mjs → chunk-RHWQKZLB.mjs} +14 -3
  72. package/dist/chunk-RHWQKZLB.mjs.br +0 -0
  73. package/dist/chunk-RHWQKZLB.mjs.gz +0 -0
  74. package/dist/{chunk-WKODF5ZU.mjs → chunk-RNP5HP4L.mjs} +5 -2
  75. package/dist/chunk-RNP5HP4L.mjs.br +0 -0
  76. package/dist/chunk-RNP5HP4L.mjs.gz +0 -0
  77. package/dist/{chunk-DCNHUEWQ.js → chunk-SN5EUDIT.js} +4972 -3103
  78. package/dist/chunk-SN5EUDIT.js.br +0 -0
  79. package/dist/chunk-SN5EUDIT.js.gz +0 -0
  80. package/dist/{chunk-PC62KGU3.mjs → chunk-UPJW34YG.mjs} +124 -147
  81. package/dist/chunk-UPJW34YG.mjs.br +0 -0
  82. package/dist/chunk-UPJW34YG.mjs.gz +0 -0
  83. package/dist/i18n.js +4 -4
  84. package/dist/i18n.js.br +0 -0
  85. package/dist/i18n.js.gz +0 -0
  86. package/dist/i18n.mjs +1 -1
  87. package/dist/i18n.mjs.br +0 -0
  88. package/dist/i18n.mjs.gz +0 -0
  89. package/dist/index.d.ts +179 -23
  90. package/dist/index.js +47 -47
  91. package/dist/index.js.br +0 -0
  92. package/dist/index.js.gz +0 -0
  93. package/dist/index.mjs +6 -6
  94. package/dist/index.mjs.br +0 -0
  95. package/dist/index.mjs.gz +0 -0
  96. package/dist/internals.d.ts +352 -171
  97. package/dist/internals.d.ts.map +1 -1
  98. package/dist/internals.js +79 -79
  99. package/dist/internals.js.br +0 -0
  100. package/dist/internals.js.gz +0 -0
  101. package/dist/internals.mjs +4 -4
  102. package/dist/internals.mjs.br +0 -0
  103. package/dist/internals.mjs.gz +0 -0
  104. package/dist/types-Bzdkiakq.d.ts.map +1 -1
  105. package/dist/viewer/index.d.ts +150 -23
  106. package/dist/viewer/index.js +27 -27
  107. package/dist/viewer/index.js.br +0 -0
  108. package/dist/viewer/index.js.gz +0 -0
  109. package/dist/viewer/index.mjs +6 -6
  110. package/dist/viewer/index.mjs.br +0 -0
  111. package/dist/viewer/index.mjs.gz +0 -0
  112. package/package.json +2 -2
  113. package/dist/AiChatPanel-L5QGWVZK.mjs.br +0 -0
  114. package/dist/AiChatPanel-L5QGWVZK.mjs.gz +0 -0
  115. package/dist/AiChatPanel-M3AHKYPS.js.br +0 -0
  116. package/dist/AiChatPanel-M3AHKYPS.js.gz +0 -0
  117. package/dist/Area3DChartScene-AE2XYKDW.mjs.br +0 -1
  118. package/dist/Area3DChartScene-AE2XYKDW.mjs.gz +0 -0
  119. package/dist/Area3DChartScene-ZQLQK6L4.js.br +0 -0
  120. package/dist/Area3DChartScene-ZQLQK6L4.js.gz +0 -0
  121. package/dist/Bar3DChartScene-FQV62XOI.mjs.br +0 -2
  122. package/dist/Bar3DChartScene-FQV62XOI.mjs.gz +0 -0
  123. package/dist/Bar3DChartScene-TZ6ADFBS.js.br +0 -0
  124. package/dist/Bar3DChartScene-TZ6ADFBS.js.gz +0 -0
  125. package/dist/Line3DChartScene-5CKPAX63.js.br +0 -0
  126. package/dist/Line3DChartScene-5CKPAX63.js.gz +0 -0
  127. package/dist/Line3DChartScene-FEUY3PCE.mjs.br +0 -1
  128. package/dist/Line3DChartScene-FEUY3PCE.mjs.gz +0 -0
  129. package/dist/Model3DScene-BLXEALM6.js.gz +0 -0
  130. package/dist/Model3DScene-V3DHIISV.mjs.br +0 -0
  131. package/dist/Model3DScene-V3DHIISV.mjs.gz +0 -0
  132. package/dist/PieChart3DScene-GHHT3PDV.js.gz +0 -0
  133. package/dist/PieChart3DScene-VZI2VARG.mjs.gz +0 -0
  134. package/dist/SurfaceChart3DScene-T36E2HBA.mjs.br +0 -0
  135. package/dist/SurfaceChart3DScene-T36E2HBA.mjs.gz +0 -0
  136. package/dist/SurfaceChart3DScene-WWIMQ65D.js.gz +0 -0
  137. package/dist/chunk-3EJFZ7TE.js.br +0 -0
  138. package/dist/chunk-3EJFZ7TE.js.gz +0 -0
  139. package/dist/chunk-DCNHUEWQ.js.br +0 -0
  140. package/dist/chunk-DCNHUEWQ.js.gz +0 -0
  141. package/dist/chunk-FGTMS7LR.mjs.br +0 -0
  142. package/dist/chunk-FGTMS7LR.mjs.gz +0 -0
  143. package/dist/chunk-JANUSAEK.mjs.br +0 -0
  144. package/dist/chunk-JANUSAEK.mjs.gz +0 -0
  145. package/dist/chunk-NV55GU5V.mjs.br +0 -0
  146. package/dist/chunk-NV55GU5V.mjs.gz +0 -0
  147. package/dist/chunk-OBE4TB76.js.br +0 -0
  148. package/dist/chunk-OBE4TB76.js.gz +0 -0
  149. package/dist/chunk-PC62KGU3.mjs.br +0 -0
  150. package/dist/chunk-PC62KGU3.mjs.gz +0 -0
  151. package/dist/chunk-TUSALM3A.js.br +0 -0
  152. package/dist/chunk-TUSALM3A.js.gz +0 -0
  153. package/dist/chunk-TXY2E7VQ.mjs.br +0 -0
  154. package/dist/chunk-TXY2E7VQ.mjs.gz +0 -0
  155. package/dist/chunk-VIFDZIVX.js.br +0 -0
  156. package/dist/chunk-VIFDZIVX.js.gz +0 -0
  157. package/dist/chunk-W24OJ7H5.js.br +0 -0
  158. package/dist/chunk-W24OJ7H5.js.gz +0 -0
  159. package/dist/chunk-WKODF5ZU.mjs.br +0 -0
  160. package/dist/chunk-WKODF5ZU.mjs.gz +0 -0
@@ -2394,7 +2394,38 @@ interface PptxChartDataPointPicture {
2394
2394
  //#region src/core/types/chart-pivot-format.d.ts
2395
2395
  interface PptxChartPivotFormat {
2396
2396
  index: number;
2397
+ /**
2398
+ * Typed projection of `spPr` (fill/stroke colour, stroke width, dash
2399
+ * style). When the parser is given a colour resolver (the normal case: the
2400
+ * runtime always supplies one), both a literal `a:srgbClr` and an
2401
+ * `a:schemeClr` theme reference (with its `lumMod`/`lumOff`/`tint`/`shade`
2402
+ * modifiers) resolve to a hex colour here, the same theme +
2403
+ * `c:clrMapOvr` chain the rest of chart parsing uses. Without a resolver
2404
+ * (e.g. a hand-built `PptxChartPivotFormat` with no theme to resolve
2405
+ * against), only the literal case resolves. Either way the authored node
2406
+ * is byte-preserved through {@link shapePropertiesXml} until this field is
2407
+ * set to something that no longer matches what re-parses off the current
2408
+ * XML; setting it then re-derives `shapePropertiesXml` on save (merged
2409
+ * onto whatever was already authored, keeping an unrelated schemeClr
2410
+ * reference alive when the colour itself is unchanged) unless
2411
+ * `shapePropertiesXml` is set explicitly, which wins.
2412
+ */
2413
+ shapeProperties?: PptxChartShapeProps;
2414
+ /**
2415
+ * Typed projection of `txPr`'s `a:p/a:pPr/a:defRPr` (size/bold/italic/
2416
+ * colour/family), the same shape a legend entry or data-table's text
2417
+ * override models. Colour resolution mirrors {@link shapeProperties}
2418
+ * (theme-resolved `schemeClr` when a colour resolver is supplied, literal
2419
+ * `srgbClr` otherwise). See {@link txPrXml} for the raw fallback.
2420
+ */
2421
+ textStyle?: PptxChartLegendTextStyle;
2422
+ /**
2423
+ * Typed projection of `marker` (symbol/size/spPr). See {@link markerXml}
2424
+ * for the raw fallback.
2425
+ */
2426
+ marker?: PptxChartMarker;
2397
2427
  shapePropertiesXml?: XmlObject | null;
2428
+ txPrXml?: XmlObject | null;
2398
2429
  markerXml?: XmlObject | null;
2399
2430
  dataLabelXml?: XmlObject | null;
2400
2431
  extensionListXml?: XmlObject | null;
@@ -2587,20 +2618,6 @@ interface PptxChartTitleRun {
2587
2618
  }
2588
2619
  //#endregion
2589
2620
  //#region src/core/types/chart-user-shapes.d.ts
2590
- /**
2591
- * Types for chart drawing-overlay shapes (`c:userShapes`).
2592
- *
2593
- * A chart's `c:userShapes` element carries an `r:id` that references a
2594
- * separate drawing part (`ppt/drawings/drawingN.xml`) whose root is a
2595
- * `c:userShapes` element populated with `cdr:relSizeAnchor` /
2596
- * `cdr:absSizeAnchor` wrappers around `sp` / `pic` / `cxnSp` shapes drawn on
2597
- * top of the chart plot. These interfaces describe the parsed, renderable
2598
- * overlay model. The raw reference is preserved separately on
2599
- * {@link PptxChartData.userShapesXml} for verbatim round-trip save; this model
2600
- * is render-only.
2601
- *
2602
- * @module pptx-types/chart-user-shapes
2603
- */
2604
2621
  /** A single paragraph of overlay-shape text with light formatting. */
2605
2622
  interface PptxChartUserShapeParagraph {
2606
2623
  /** Joined run text of the paragraph. */
@@ -2616,6 +2633,80 @@ interface PptxChartUserShapeParagraph {
2616
2633
  /** Paragraph alignment (`a:pPr/@algn`): left / centre / right. */
2617
2634
  align?: 'l' | 'ctr' | 'r';
2618
2635
  }
2636
+ /**
2637
+ * The DrawingML 2D group transform (`a:xfrm` inside `cdr:grpSpPr`) that
2638
+ * anchors a `grpSp`'s own box ({@link off}/{@link ext}) and establishes the
2639
+ * coordinate space its children are expressed in ({@link chOff}/{@link
2640
+ * chExt}), all in EMU. A child's position within the group is mapped into
2641
+ * the group's own box via
2642
+ * `frac = (child.off - chOff) / chExt`, then applied to the enclosing
2643
+ * anchor's box; see `flattenChartUserShapes` in
2644
+ * `chart-user-shapes-parser.ts`.
2645
+ */
2646
+ interface PptxChartUserShapeGroupTransform {
2647
+ /** The group's own position in its parent's coordinate space, in EMU. */
2648
+ off: {
2649
+ x: number;
2650
+ y: number;
2651
+ };
2652
+ /** The group's own size in its parent's coordinate space, in EMU. */
2653
+ ext: {
2654
+ cx: number;
2655
+ cy: number;
2656
+ };
2657
+ /** Origin of the child coordinate space (`a:chOff`), in EMU. */
2658
+ chOff: {
2659
+ x: number;
2660
+ y: number;
2661
+ };
2662
+ /** Size of the child coordinate space (`a:chExt`), in EMU. */
2663
+ chExt: {
2664
+ cx: number;
2665
+ cy: number;
2666
+ };
2667
+ }
2668
+ /**
2669
+ * One shape grouped inside a `cdr:grpSp` (or a nested `cdr:grpSp` itself).
2670
+ * Unlike a top-level {@link PptxChartUserShape}, a group child has no
2671
+ * drawing anchor of its own: its position is expressed in its parent
2672
+ * group's child coordinate space via {@link off}/{@link ext} (EMU, read
2673
+ * from the child's own `a:xfrm`), not as a chart-relative fraction.
2674
+ */
2675
+ interface PptxChartUserShapeGroupChild {
2676
+ /** Shape kind, same vocabulary as {@link PptxChartUserShape.kind}. */
2677
+ kind: 'sp' | 'cxnSp' | 'pic' | 'grpSp' | 'graphicFrame';
2678
+ /** Position within the parent group's child coordinate space, in EMU. */
2679
+ off: {
2680
+ x: number;
2681
+ y: number;
2682
+ };
2683
+ /** Size within the parent group's child coordinate space, in EMU. */
2684
+ ext: {
2685
+ cx: number;
2686
+ cy: number;
2687
+ };
2688
+ /** Preset geometry name (`a:prstGeom/@prst`), defaulting to `"rect"`. */
2689
+ prst?: string;
2690
+ /** Resolved solid-fill hex colour, when present. */
2691
+ fill?: string;
2692
+ /** Resolved line/stroke hex colour, when present. */
2693
+ stroke?: string;
2694
+ /** Line width in points (`a:ln/@w` divided by 12700), when present. */
2695
+ strokeWidth?: number;
2696
+ /** Text paragraphs of the shape's `txBody`, when present. */
2697
+ paragraphs?: PptxChartUserShapeParagraph[];
2698
+ /**
2699
+ * Verbatim source XML of a `pic`/`graphicFrame` child, or of this node
2700
+ * itself when `kind === 'grpSp'` and the nested group is untouched since
2701
+ * parse. See {@link PptxChartUserShape.rawXml}'s doc for the same
2702
+ * contract one level up.
2703
+ */
2704
+ rawXml?: XmlObject;
2705
+ /** Present when `kind === 'grpSp'`: this nested group's own transform. */
2706
+ transform?: PptxChartUserShapeGroupTransform;
2707
+ /** Present when `kind === 'grpSp'`: this nested group's own children. */
2708
+ children?: PptxChartUserShapeGroupChild[];
2709
+ }
2619
2710
  /**
2620
2711
  * A parsed chart-overlay shape positioned by a drawing anchor.
2621
2712
  *
@@ -2626,12 +2717,13 @@ interface PptxChartUserShapeParagraph {
2626
2717
  interface PptxChartUserShape {
2627
2718
  /**
2628
2719
  * Shape kind: text/preset shape, connector, picture, a group of the
2629
- * above (`grpSp`, flattened: each grouped child becomes its own entry
2630
- * reusing the anchor's own bounding box, an approximation since the
2631
- * group's internal chOff/chExt transform is not applied), or a bare
2632
- * placeholder for a `graphicFrame` anchor child (deep content such as a
2633
- * nested chart or table is out of scope; it only keeps the anchor's
2634
- * space accounted for instead of the whole overlay disappearing).
2720
+ * above (`grpSp`, with its own {@link transform} and {@link children},
2721
+ * nested arbitrarily; use `flattenChartUserShapes` from
2722
+ * `chart-user-shapes-parser.ts` to get a flat, render-ready leaf list
2723
+ * with the group transform already applied), or a bare placeholder for
2724
+ * a `graphicFrame` anchor child (deep content such as a nested chart or
2725
+ * table is out of scope; it only keeps the anchor's space accounted for
2726
+ * instead of the whole overlay disappearing).
2635
2727
  */
2636
2728
  kind: 'sp' | 'cxnSp' | 'pic' | 'grpSp' | 'graphicFrame';
2637
2729
  /** Anchor kind that positioned the shape. */
@@ -2661,6 +2753,26 @@ interface PptxChartUserShape {
2661
2753
  strokeWidth?: number;
2662
2754
  /** Text paragraphs of the shape's `txBody`, when present. */
2663
2755
  paragraphs?: PptxChartUserShapeParagraph[];
2756
+ /**
2757
+ * Verbatim source XML of a `pic` or `graphicFrame` anchor child (the
2758
+ * `cdr:pic` / `cdr:graphicFrame` node itself, not the enclosing anchor),
2759
+ * or of the `cdr:grpSp` node itself when `kind === 'grpSp'` and the
2760
+ * group is untouched since parse (byte-identical passthrough). None of
2761
+ * these three kinds have a reconstructable typed representation that is
2762
+ * guaranteed lossless (a picture's blip reference, a nested chart/table's
2763
+ * graphic content, or a group's exact child ordering/ids), so the
2764
+ * serializer re-emits this verbatim when present instead of a lossy
2765
+ * rebuild. Editing a shape inside a group (via the SDK's path-based
2766
+ * overlay operations) clears the group's `rawXml` so the serializer
2767
+ * regenerates it from {@link transform}/{@link children} instead. Absent
2768
+ * for `sp`/`cxnSp`, which round-trip losslessly through their typed
2769
+ * fields above.
2770
+ */
2771
+ rawXml?: XmlObject;
2772
+ /** Present when `kind === 'grpSp'`: the group's own transform. */
2773
+ transform?: PptxChartUserShapeGroupTransform;
2774
+ /** Present when `kind === 'grpSp'`: the grouped children, nested arbitrarily. */
2775
+ children?: PptxChartUserShapeGroupChild[];
2664
2776
  }
2665
2777
  //#endregion
2666
2778
  //#region src/core/types/chart.d.ts
@@ -5813,6 +5925,21 @@ interface PptxAccessibilityProperties {
5813
5925
  */
5814
5926
  isDecorative?: boolean;
5815
5927
  }
5928
+ /**
5929
+ * Accessibility description/title from `p:cNvPr/@descr` / `@title` on a
5930
+ * plain shape, text box or connector (`p:sp` / `p:cxnSp`). The same pair of
5931
+ * attributes already round-trips for a graphic frame (see
5932
+ * {@link TablePptxElement.altText}) and, `descr` only, for a picture
5933
+ * ({@link PptxImageProperties.altText}); this mixin extends it to the three
5934
+ * element kinds whose PowerPoint Alt Text pane data was previously dropped
5935
+ * on load because neither field existed on the model.
5936
+ */
5937
+ interface PptxNonVisualDescription {
5938
+ /** `p:cNvPr/@descr`. */
5939
+ altText?: string;
5940
+ /** `p:cNvPr/@title`. */
5941
+ title?: string;
5942
+ }
5816
5943
  /**
5817
5944
  * `a:cNvPicPr/@preferRelativeResize` (issue G13), a picture-only non-visual
5818
5945
  * property distinct from `a:picLocks`.
@@ -5845,7 +5972,7 @@ interface PptxPictureNonVisualProperties {
5845
5972
  * // => satisfies TextPptxElement
5846
5973
  * ```
5847
5974
  */
5848
- interface TextPptxElement extends PptxElementBase, PptxTextProperties, PptxShapeProperties {
5975
+ interface TextPptxElement extends PptxElementBase, PptxTextProperties, PptxShapeProperties, PptxNonVisualDescription {
5849
5976
  type: 'text';
5850
5977
  }
5851
5978
  /**
@@ -5863,7 +5990,7 @@ interface TextPptxElement extends PptxElementBase, PptxTextProperties, PptxShape
5863
5990
  * // => satisfies ShapePptxElement
5864
5991
  * ```
5865
5992
  */
5866
- interface ShapePptxElement extends PptxElementBase, PptxTextProperties, PptxShapeProperties, PptxCustomPathProperties, PptxAccessibilityProperties {
5993
+ interface ShapePptxElement extends PptxElementBase, PptxTextProperties, PptxShapeProperties, PptxCustomPathProperties, PptxAccessibilityProperties, PptxNonVisualDescription {
5867
5994
  type: 'shape';
5868
5995
  }
5869
5996
  /**
@@ -5885,7 +6012,7 @@ interface ShapePptxElement extends PptxElementBase, PptxTextProperties, PptxShap
5885
6012
  * // => satisfies ConnectorPptxElement
5886
6013
  * ```
5887
6014
  */
5888
- interface ConnectorPptxElement extends PptxElementBase, PptxTextProperties, PptxShapeProperties {
6015
+ interface ConnectorPptxElement extends PptxElementBase, PptxTextProperties, PptxShapeProperties, PptxNonVisualDescription {
5889
6016
  type: 'connector';
5890
6017
  }
5891
6018
  /**
@@ -10781,6 +10908,23 @@ interface CollaborationConfig {
10781
10908
  */
10782
10909
  writeBackDebounceMs?: number;
10783
10910
  }
10911
+ //#endregion
10912
+ //#region src/render/animation-text-style-resolve.d.ts
10913
+ /**
10914
+ * Framework-neutral text-style override a font-style emphasis effect applies
10915
+ * on top of its target's own authored per-run bold/italic/underline/size/
10916
+ * colour. Every binding maps this onto its own text container so it OVERRIDES
10917
+ * the runs' inline styles (the runs carry explicit inline styles of their
10918
+ * own, so plain CSS inheritance cannot reach them).
10919
+ */
10920
+ interface TextStyleAnimationDescriptor {
10921
+ bold?: boolean;
10922
+ italic?: boolean;
10923
+ underline?: boolean;
10924
+ /** Relative multiplier against each run's own authored font size. */
10925
+ fontScale?: number;
10926
+ color?: string;
10927
+ }
10784
10928
  /**
10785
10929
  * Normalized staged-reveal mode for a chart graphic frame, derived from the
10786
10930
  * OOXML `a:bldChart/@bld` (or `p:bldOleChart/@bld`) token:
@@ -10921,6 +11065,18 @@ interface ElementAnimationState {
10921
11065
  * `stroke: inherit`. Absent/false means no active stroke-colour animation.
10922
11066
  */
10923
11067
  animatesStroke?: boolean;
11068
+ /**
11069
+ * Active discrete font-style / colour / size override (see
11070
+ * {@link TimelineStep.textStyle}) a font-style emphasis effect currently
11071
+ * applies to this element's text, OVERRIDING the runs' own inline
11072
+ * bold/italic/underline/size/colour. `animation-playback-engine.ts` writes
11073
+ * this on step start and again on cleanup (held in full when the effect's
11074
+ * `p:cTn/@fill` holds its end state, otherwise reverted); a text renderer
11075
+ * maps it onto its run markup via `buildTextStyleOverrideCss`
11076
+ * (`animation-text-style-css.ts`). Absent means no font-style emphasis
11077
+ * effect is currently active on this element.
11078
+ */
11079
+ textStyle?: TextStyleAnimationDescriptor;
10924
11080
  }
10925
11081
  //#endregion
10926
11082
  //#region src/render/motion-path-authoring.d.ts
@@ -12884,6 +13040,15 @@ interface UseYjsDocumentSyncInput {
12884
13040
  * when role === 'owner' and onWriteBack is set.
12885
13041
  */
12886
13042
  getSourceBytes?: () => Uint8Array | null;
13043
+ /**
13044
+ * Session-level save options (view properties, table styles, tags, deck
13045
+ * properties, ...), built the same way as the Save/Export path
13046
+ * (`buildDeckSaveOptions` in `pptx-viewer-shared`). Without this the
13047
+ * write-back reloaded the source bytes and called `handler.save(slides)`
13048
+ * with NO options, so an owner's write-back file dropped every
13049
+ * session-level edit that lives outside `slides`.
13050
+ */
13051
+ getSaveOptions?: () => PptxHandlerSaveOptions;
12887
13052
  /**
12888
13053
  * Monotonic counter bumped each time the content-load pipeline finishes
12889
13054
  * applying a parsed deck to viewer state. A local load that lands while the
@@ -12900,7 +13065,7 @@ interface UseYjsDocumentSyncInput {
12900
13065
  */
12901
13066
  loadOrigin?: CollabLoadOrigin;
12902
13067
  }
12903
- declare function useYjsDocumentSync({ doc, slides, templateElementsBySlideId, setSlides, isConnected, isSynced, config, getSourceBytes, loadVersion, loadOrigin }: UseYjsDocumentSyncInput): void;
13068
+ declare function useYjsDocumentSync({ doc, slides, templateElementsBySlideId, setSlides, isConnected, isSynced, config, getSourceBytes, getSaveOptions, loadVersion, loadOrigin }: UseYjsDocumentSyncInput): void;
12904
13069
  //#endregion
12905
13070
  //#region src/viewer/hooks/collaboration/useBroadcastFollower.d.ts
12906
13071
  interface UseBroadcastFollowerInput {
@@ -13602,6 +13767,16 @@ interface ViewerCoreState {
13602
13767
  /** Parsed table style definitions from `ppt/tableStyles.xml`. */
13603
13768
  tableStyleMap: ParsedTableStyleMap | undefined;
13604
13769
  setTableStyleMap: React$1.Dispatch<React$1.SetStateAction<ParsedTableStyleMap | undefined>>;
13770
+ /** `ppt/tableStyles.xml`'s `<a:tblStyleLst @def>` default style GUID. */
13771
+ tableStylesDefaultId: string | undefined;
13772
+ setTableStylesDefaultId: React$1.Dispatch<React$1.SetStateAction<string | undefined>>;
13773
+ /**
13774
+ * Style GUIDs deleted from `tableStyleMap` via the table style editor,
13775
+ * pending removal from `ppt/tableStyles.xml` on the next save. See
13776
+ * `tableStyleSaveOptions` / `applyTableStyleDelete` in `pptx-viewer-shared`.
13777
+ */
13778
+ tableStylesToDelete: string[];
13779
+ setTableStylesToDelete: React$1.Dispatch<React$1.SetStateAction<string[]>>;
13605
13780
  /** Available theme presets the user can switch between. */
13606
13781
  themeOptions: PptxThemeOption[];
13607
13782
  setThemeOptions: React$1.Dispatch<React$1.SetStateAction<PptxThemeOption[]>>;
@@ -13851,6 +14026,8 @@ interface UseLoadContentInput {
13851
14026
  setRecentColors: React.Dispatch<React.SetStateAction<string[]>>;
13852
14027
  setTheme: React.Dispatch<React.SetStateAction<PptxTheme | undefined>>;
13853
14028
  setTableStyleMap: React.Dispatch<React.SetStateAction<ParsedTableStyleMap | undefined>>;
14029
+ setTableStylesDefaultId: React.Dispatch<React.SetStateAction<string | undefined>>;
14030
+ setTableStylesToDelete: React.Dispatch<React.SetStateAction<string[]>>;
13854
14031
  setThemeOptions: React.Dispatch<React.SetStateAction<PptxThemeOption[]>>;
13855
14032
  setCustomShows: React.Dispatch<React.SetStateAction<PptxCustomShow[]>>;
13856
14033
  /**
@@ -13904,7 +14081,7 @@ interface UseLoadContentInput {
13904
14081
  interface UseLoadContentResult {
13905
14082
  handlerRef: React.MutableRefObject<PptxHandler | null>;
13906
14083
  }
13907
- declare function useLoadContent({ content, clearSelection, history, setSlides, setTemplateElementsBySlideId, mediaDataUrls, setCanvasSize, setSlideSizeEmu, setHeaderFooter, setLayoutOptions, setSlideMasters, setModernCommentAuthors, setRecentColors, setTheme, setTableStyleMap, setThemeOptions, setCustomShows, setActiveCustomShowId, setSections, setPresentationProperties, setViewProperties, setNotesMaster, setHandoutMaster, setNotesCanvasSize, setCustomProperties, setTagCollections, setCoreProperties, setAppProperties, setEmbeddedFonts, setActiveSlideIndex, setHasMacros, setHasDigitalSignatures, setDigitalSignatureCount, setGuides, setReadOnlyRecommendation, setCompatToasts, setLoading, setError, setIsDirty, setIsEncrypted, onContentApplied, allowExternalImages }: UseLoadContentInput): UseLoadContentResult;
14084
+ declare function useLoadContent({ content, clearSelection, history, setSlides, setTemplateElementsBySlideId, mediaDataUrls, setCanvasSize, setSlideSizeEmu, setHeaderFooter, setLayoutOptions, setSlideMasters, setModernCommentAuthors, setRecentColors, setTheme, setTableStyleMap, setTableStylesDefaultId, setTableStylesToDelete, setThemeOptions, setCustomShows, setActiveCustomShowId, setSections, setPresentationProperties, setViewProperties, setNotesMaster, setHandoutMaster, setNotesCanvasSize, setCustomProperties, setTagCollections, setCoreProperties, setAppProperties, setEmbeddedFonts, setActiveSlideIndex, setHasMacros, setHasDigitalSignatures, setDigitalSignatureCount, setGuides, setReadOnlyRecommendation, setCompatToasts, setLoading, setError, setIsDirty, setIsEncrypted, onContentApplied, allowExternalImages }: UseLoadContentInput): UseLoadContentResult;
13908
14085
  //#endregion
13909
14086
  //#region src/viewer/hooks/useElementOperations.d.ts
13910
14087
  /**
@@ -14315,6 +14492,105 @@ type TableOperationHandlers = TableStructHandlers & TableMergeHandlers;
14315
14492
  //#region src/viewer/hooks/useTableOperations.d.ts
14316
14493
  declare function useTableOperations(input: UseTableOperationsInput): TableOperationHandlers;
14317
14494
  //#endregion
14495
+ //#region src/viewer/hooks/useSerialize.d.ts
14496
+ interface UseSerializeInput {
14497
+ slides: PptxSlide[];
14498
+ /** Separated master/layout (template) elements, merged back at save time. */
14499
+ templateElementsBySlideId: Record<string, PptxElement[]>;
14500
+ activeSlideIndex: number;
14501
+ /** The pixel canvas the raw Slide Size W/H inputs edit. */
14502
+ canvasSize: CanvasSize;
14503
+ /**
14504
+ * The EMU `p:sldSz` the viewer is holding (seeded on load, replaced by a
14505
+ * preset/orientation pick). Passed with `canvasSize` to
14506
+ * `resolveSlideSizeSelection`, which keeps the EMU whenever the two still
14507
+ * agree so a preset survives the save, and takes the pixels when the user
14508
+ * has typed into the raw inputs.
14509
+ */
14510
+ slideSizeEmu?: SlideSizeEmu | undefined;
14511
+ guides: Array<{
14512
+ id: string;
14513
+ axis: 'h' | 'v';
14514
+ position: number;
14515
+ }>;
14516
+ headerFooter: PptxHeaderFooter;
14517
+ presentationProperties: PptxPresentationProperties;
14518
+ /**
14519
+ * `ppt/viewProps.xml` (grid/snap/guides toggles, grid spacing). Optional so
14520
+ * existing callers/tests that construct this input directly keep compiling;
14521
+ * omitting it (or passing `undefined`) reproduces the PRE-EXISTING bug this
14522
+ * field fixes: core falls back to `this.loadedViewProperties` (the file as
14523
+ * it was FIRST opened) whenever the caller does not pass `viewProperties`
14524
+ * explicitly, so every session change to the View-ribbon toggles was
14525
+ * silently dropped. `useContentLifecycle` always passes `state.viewProperties`.
14526
+ */
14527
+ viewProperties?: PptxViewProperties | undefined;
14528
+ /** Parsed `ppt/tableStyles.xml` map, edited via the table style editor. */
14529
+ tableStyleMap?: ParsedTableStyleMap | undefined;
14530
+ /** `<a:tblStyleLst @def>` default style GUID. */
14531
+ tableStylesDefaultId?: string | undefined;
14532
+ /** Style GUIDs deleted via the table style editor, pending removal on save. */
14533
+ tableStylesToDelete?: string[];
14534
+ customShows: Array<{
14535
+ id: string;
14536
+ name: string;
14537
+ slideRIds: string[];
14538
+ }>;
14539
+ sections: PptxSection[];
14540
+ coreProperties: PptxCoreProperties | undefined;
14541
+ appProperties: PptxAppProperties | undefined;
14542
+ customProperties: PptxCustomProperty[];
14543
+ tagCollections: PptxTagCollection[];
14544
+ /**
14545
+ * The slide masters and their layouts, as View > Slide Master left them.
14546
+ *
14547
+ * Required, not optional: this was the one save option React never passed,
14548
+ * and core rewrites a master or layout part only for the ones the caller
14549
+ * hands back. Every master-view edit therefore showed on screen and was
14550
+ * dropped by the save - a deleted master shape came back on reload, and a
14551
+ * master background reverted to white. The other four bindings pass it.
14552
+ * Core compares each part against the element list parsed at load and
14553
+ * rewrites only what actually changed, so passing the whole array on every
14554
+ * save costs an untouched deck nothing.
14555
+ */
14556
+ slideMasters: PptxSlideMaster[];
14557
+ notesMaster: PptxNotesMaster | undefined;
14558
+ handoutMaster: PptxHandoutMaster | undefined;
14559
+ handlerRef: React$1.RefObject<PptxHandler | null>;
14560
+ inlineEditingElementIdRef: React$1.MutableRefObject<string | null>;
14561
+ inlineEditingTextRef: React$1.MutableRefObject<string>;
14562
+ password?: string;
14563
+ /**
14564
+ * File > Fonts > "Embed fonts in the file". `false` passes
14565
+ * `embeddedFontList: null`, which strips `p:embeddedFontLst`, the `/font`
14566
+ * relationships and the `.fntdata` parts; `true` (the default) leaves core to
14567
+ * re-embed whatever the deck arrived with. Before this the toggle reached no
14568
+ * save call at all and the saved bytes were identical either way.
14569
+ */
14570
+ embedFonts?: boolean;
14571
+ /**
14572
+ * Why these bytes are being produced. Defaults to `'user-file'` (Save, Save
14573
+ * As, Export, the imperative `getContent()`), which honours `password`.
14574
+ * `'recovery-snapshot'` is for bytes the viewer reads back itself - the
14575
+ * autosave snapshot and the re-serialise-then-reload cycle - and is always
14576
+ * plaintext, because nothing on the way back in can supply the password.
14577
+ * See `deck-save-encryption` in `pptx-viewer-shared` for the full rationale
14578
+ * and the privacy tradeoff it accepts.
14579
+ */
14580
+ purpose?: DeckSavePurpose;
14581
+ }
14582
+ /**
14583
+ * Serialise the live deck. `format` is the container to write (`pptx` when
14584
+ * omitted; `ppsx`/`pptm`/... for Save As). Every save path in the binding
14585
+ * (Save, Save As, `getContent()`, autosave, the theme-apply round trip) goes
14586
+ * through this ONE function so they cannot drift: Save As used to hand-build
14587
+ * its own options object and left out `viewProperties`, the table-style map
14588
+ * and `embedFonts`, so a table style edited in the inspector reached the
14589
+ * imperative `getContent()` bytes and NOT the file the user downloaded.
14590
+ */
14591
+ type SerializeSlides = (format?: PptxSaveFormat) => Promise<Uint8Array | null>;
14592
+ declare function useSerialize(input: UseSerializeInput): SerializeSlides;
14593
+ //#endregion
14318
14594
  //#region src/viewer/hooks/export-handler-types.d.ts
14319
14595
  interface UseExportHandlersInput {
14320
14596
  slides: PptxSlide[];
@@ -14325,46 +14601,33 @@ interface UseExportHandlersInput {
14325
14601
  filePath: string | undefined;
14326
14602
  canvasStageRef: RefObject<HTMLDivElement | null>;
14327
14603
  setActiveSlideIndex: Dispatch<SetStateAction<number>>;
14328
- handlerRef: RefObject<PptxHandler | null>;
14329
- /** State from the viewer needed for save-as */
14330
- headerFooter: Record<string, unknown>;
14331
- presentationProperties: Record<string, unknown>;
14604
+ /**
14605
+ * The binding's one user-facing serialiser (`useSerialize`), which Save As
14606
+ * calls with the chosen output format. Save As no longer assembles its own
14607
+ * save options, so it cannot drift from Save again.
14608
+ */
14609
+ serializeSlides: SerializeSlides;
14610
+ /** Presentation-level state carried into the deck-JSON export document. */
14611
+ headerFooter: PptxHeaderFooter;
14612
+ presentationProperties: PptxPresentationProperties;
14332
14613
  customShows: Array<{
14333
14614
  id: string;
14334
14615
  name: string;
14335
14616
  slideRIds: string[];
14336
14617
  }>;
14337
- sections: Array<{
14338
- id: string;
14339
- name: string;
14340
- color?: string;
14341
- collapsed?: boolean;
14342
- }>;
14343
- coreProperties: Record<string, unknown> | null;
14344
- appProperties: Record<string, unknown> | null;
14345
- customProperties: Array<Record<string, unknown>>;
14346
- tagCollections: Array<Record<string, unknown>>;
14347
- /** The slide masters and their layouts; see `UseExportSaveAsInput`. */
14348
- slideMasters: PptxSlideMaster[];
14349
- notesMaster: Record<string, unknown> | undefined;
14350
- handoutMaster: Record<string, unknown> | undefined;
14351
- guides: Array<{
14352
- id: string;
14353
- axis: 'h' | 'v';
14354
- position: number;
14355
- }>;
14356
- activeSlideIndexForGuides: number;
14618
+ sections: PptxSection[];
14619
+ coreProperties: PptxCoreProperties | undefined;
14620
+ appProperties: PptxAppProperties | undefined;
14621
+ customProperties: PptxCustomProperty[];
14622
+ tagCollections: PptxTagCollection[];
14623
+ notesMaster: PptxNotesMaster | undefined;
14624
+ handoutMaster: PptxHandoutMaster | undefined;
14357
14625
  /** Live theme, carried into the deck-JSON export document. */
14358
14626
  theme: PptxTheme | undefined;
14359
14627
  /** Slide canvas size in CSS pixels, carried into the deck-JSON export. */
14360
14628
  canvasSize: CanvasSize;
14361
- /**
14362
- * The EMU `p:sldSz` the viewer holds. Save-As builds its own save options
14363
- * rather than reusing `useSerialize`, so without this a Slide Size edit
14364
- * reached Save and not Save As (or the backstage Save, which routes here).
14365
- */
14629
+ /** The EMU `p:sldSz` the viewer holds, for the deck-JSON export's slide size. */
14366
14630
  slideSizeEmu?: SlideSizeEmu | undefined;
14367
- password?: string;
14368
14631
  /**
14369
14632
  * File > Options > Advanced > "Image Size and Quality"
14370
14633
  * (`resolveImageResolutionScale`), the raster-scale multiplier for PNG/PDF
@@ -14758,89 +15021,6 @@ interface AnnotationHandlersResult {
14758
15021
  }
14759
15022
  declare function useAnnotationHandlers(input: UseAnnotationHandlersInput): AnnotationHandlersResult;
14760
15023
  //#endregion
14761
- //#region src/viewer/hooks/useSerialize.d.ts
14762
- interface UseSerializeInput {
14763
- slides: PptxSlide[];
14764
- /** Separated master/layout (template) elements, merged back at save time. */
14765
- templateElementsBySlideId: Record<string, PptxElement[]>;
14766
- activeSlideIndex: number;
14767
- /** The pixel canvas the raw Slide Size W/H inputs edit. */
14768
- canvasSize: CanvasSize;
14769
- /**
14770
- * The EMU `p:sldSz` the viewer is holding (seeded on load, replaced by a
14771
- * preset/orientation pick). Passed with `canvasSize` to
14772
- * `resolveSlideSizeSelection`, which keeps the EMU whenever the two still
14773
- * agree so a preset survives the save, and takes the pixels when the user
14774
- * has typed into the raw inputs.
14775
- */
14776
- slideSizeEmu?: SlideSizeEmu | undefined;
14777
- guides: Array<{
14778
- id: string;
14779
- axis: 'h' | 'v';
14780
- position: number;
14781
- }>;
14782
- headerFooter: PptxHeaderFooter;
14783
- presentationProperties: PptxPresentationProperties;
14784
- /**
14785
- * `ppt/viewProps.xml` (grid/snap/guides toggles, grid spacing). Optional so
14786
- * existing callers/tests that construct this input directly keep compiling;
14787
- * omitting it (or passing `undefined`) reproduces the PRE-EXISTING bug this
14788
- * field fixes: core falls back to `this.loadedViewProperties` (the file as
14789
- * it was FIRST opened) whenever the caller does not pass `viewProperties`
14790
- * explicitly, so every session change to the View-ribbon toggles was
14791
- * silently dropped. `useContentLifecycle` always passes `state.viewProperties`.
14792
- */
14793
- viewProperties?: PptxViewProperties | undefined;
14794
- customShows: Array<{
14795
- id: string;
14796
- name: string;
14797
- slideRIds: string[];
14798
- }>;
14799
- sections: PptxSection[];
14800
- coreProperties: PptxCoreProperties | undefined;
14801
- appProperties: PptxAppProperties | undefined;
14802
- customProperties: PptxCustomProperty[];
14803
- tagCollections: PptxTagCollection[];
14804
- /**
14805
- * The slide masters and their layouts, as View > Slide Master left them.
14806
- *
14807
- * Required, not optional: this was the one save option React never passed,
14808
- * and core rewrites a master or layout part only for the ones the caller
14809
- * hands back. Every master-view edit therefore showed on screen and was
14810
- * dropped by the save - a deleted master shape came back on reload, and a
14811
- * master background reverted to white. The other four bindings pass it.
14812
- * Core compares each part against the element list parsed at load and
14813
- * rewrites only what actually changed, so passing the whole array on every
14814
- * save costs an untouched deck nothing.
14815
- */
14816
- slideMasters: PptxSlideMaster[];
14817
- notesMaster: PptxNotesMaster | undefined;
14818
- handoutMaster: PptxHandoutMaster | undefined;
14819
- handlerRef: React$1.RefObject<PptxHandler | null>;
14820
- inlineEditingElementIdRef: React$1.MutableRefObject<string | null>;
14821
- inlineEditingTextRef: React$1.MutableRefObject<string>;
14822
- password?: string;
14823
- /**
14824
- * File > Fonts > "Embed fonts in the file". `false` passes
14825
- * `embeddedFontList: null`, which strips `p:embeddedFontLst`, the `/font`
14826
- * relationships and the `.fntdata` parts; `true` (the default) leaves core to
14827
- * re-embed whatever the deck arrived with. Before this the toggle reached no
14828
- * save call at all and the saved bytes were identical either way.
14829
- */
14830
- embedFonts?: boolean;
14831
- /**
14832
- * Why these bytes are being produced. Defaults to `'user-file'` (Save, Save
14833
- * As, Export, the imperative `getContent()`), which honours `password`.
14834
- * `'recovery-snapshot'` is for bytes the viewer reads back itself - the
14835
- * autosave snapshot and the re-serialise-then-reload cycle - and is always
14836
- * plaintext, because nothing on the way back in can supply the password.
14837
- * See `deck-save-encryption` in `pptx-viewer-shared` for the full rationale
14838
- * and the privacy tradeoff it accepts.
14839
- */
14840
- purpose?: DeckSavePurpose;
14841
- }
14842
- declare function useSerialize(input: UseSerializeInput): () => Promise<Uint8Array | null>;
14843
- //#endregion
14844
15024
  //#region src/viewer/hooks/useRecoveryDetection.d.ts
14845
15025
  interface UseRecoveryDetectionInput {
14846
15026
  filePath: string | undefined;
@@ -14985,7 +15165,11 @@ interface UseIOHandlersInput {
14985
15165
  canvasStageRef: React$1.RefObject<HTMLDivElement | null>;
14986
15166
  };
14987
15167
  handlerRef: React$1.RefObject<PptxHandler | null>;
14988
- serializeSlides: () => Promise<Uint8Array | null>;
15168
+ /**
15169
+ * The one user-facing serialiser (`useSerialize`). Save As passes it the
15170
+ * output format, so the downloaded file carries every save option Save does.
15171
+ */
15172
+ serializeSlides: SerializeSlides;
14989
15173
  /**
14990
15174
  * Plaintext serialisation for bytes the viewer feeds straight back into its
14991
15175
  * own loader. "Apply theme" does exactly that, and the loader has no password
@@ -14994,7 +15178,6 @@ interface UseIOHandlersInput {
14994
15178
  serializeForRecovery: () => Promise<Uint8Array | null>;
14995
15179
  setContent: React$1.Dispatch<React$1.SetStateAction<ArrayBuffer | Uint8Array | null>>;
14996
15180
  onContentChange: ((content: Uint8Array) => void) | undefined;
14997
- password?: string;
14998
15181
  /** File > Options > Advanced > "Image Size and Quality" raster-scale multiplier. */
14999
15182
  imageExportScale?: number;
15000
15183
  }
@@ -15045,8 +15228,11 @@ interface UseContentLifecycleInput {
15045
15228
  }
15046
15229
  interface ContentLifecycleResult {
15047
15230
  handlerRef: React$1.RefObject<PptxHandler | null>;
15048
- /** Serialise for the user: honours "Encrypt with Password". */
15049
- serializeSlides: () => Promise<Uint8Array | null>;
15231
+ /**
15232
+ * Serialise for the user: honours "Encrypt with Password". Takes the
15233
+ * optional output container (`ppsx`/`pptm`/...) so Save As shares it.
15234
+ */
15235
+ serializeSlides: SerializeSlides;
15050
15236
  /**
15051
15237
  * Serialise for bytes the viewer reads back itself (autosave snapshot,
15052
15238
  * re-serialise-then-reload). Always plaintext, so recovery - which has no
@@ -15443,51 +15629,46 @@ interface UseDialogCustomShowsResult {
15443
15629
  declare function useDialogCustomShows(input: UseDialogCustomShowsInput): UseDialogCustomShowsResult;
15444
15630
  //#endregion
15445
15631
  //#region src/viewer/hooks/useExportSaveAs.d.ts
15632
+ /**
15633
+ * useExportSaveAs: Save-As format handlers and the deck-JSON export.
15634
+ *
15635
+ * Save As is `useSerialize` with an output format. It used to assemble a
15636
+ * SECOND save-options object of its own, and every option added to
15637
+ * `useSerialize` afterwards (`viewProperties`, the table-style map and its
15638
+ * default id / deletions, `embedFonts`) was missing from it: a table style
15639
+ * edited in the inspector reached `getContent()` and autosave, but the file
15640
+ * the backstage Save button downloaded came back with `ppt/tableStyles.xml`
15641
+ * byte-identical to the original. The other four bindings route the format
15642
+ * through their main builder; React now does too.
15643
+ */
15446
15644
  interface UseExportSaveAsInput {
15447
15645
  slides: PptxSlide[];
15448
15646
  /** Separated master/layout (template) elements, merged back at save time. */
15449
15647
  templateElementsBySlideId: Record<string, PptxElement[]>;
15450
15648
  filePath: string | undefined;
15451
- handlerRef: RefObject<PptxHandler | null>;
15452
- headerFooter: Record<string, unknown>;
15453
- presentationProperties: Record<string, unknown>;
15649
+ /** `useSerialize`'s callback: the one place save options are assembled. */
15650
+ serializeSlides: SerializeSlides;
15651
+ /** Presentation-level state, carried into the deck-JSON export document. */
15652
+ headerFooter: PptxHeaderFooter;
15653
+ presentationProperties: PptxPresentationProperties;
15454
15654
  customShows: Array<{
15455
15655
  id: string;
15456
15656
  name: string;
15457
15657
  slideRIds: string[];
15458
15658
  }>;
15459
- sections: Array<{
15460
- id: string;
15461
- name: string;
15462
- color?: string;
15463
- collapsed?: boolean;
15464
- }>;
15465
- coreProperties: Record<string, unknown> | null;
15466
- appProperties: Record<string, unknown> | null;
15467
- customProperties: Array<Record<string, unknown>>;
15468
- tagCollections: Array<Record<string, unknown>>;
15469
- /**
15470
- * The slide masters and their layouts, as View > Slide Master left them.
15471
- * Save As builds its own options rather than reusing `useSerialize`, so it
15472
- * needs the same array: without it a master-view edit reached Save and not
15473
- * Save As. (For a long while it reached neither.)
15474
- */
15475
- slideMasters: PptxSlideMaster[];
15476
- notesMaster: Record<string, unknown> | undefined;
15477
- handoutMaster: Record<string, unknown> | undefined;
15478
- guides: Array<{
15479
- id: string;
15480
- axis: 'h' | 'v';
15481
- position: number;
15482
- }>;
15483
- activeSlideIndexForGuides: number;
15659
+ sections: PptxSection[];
15660
+ coreProperties: PptxCoreProperties | undefined;
15661
+ appProperties: PptxAppProperties | undefined;
15662
+ customProperties: PptxCustomProperty[];
15663
+ tagCollections: PptxTagCollection[];
15664
+ notesMaster: PptxNotesMaster | undefined;
15665
+ handoutMaster: PptxHandoutMaster | undefined;
15484
15666
  /** Live theme, carried into the deck-JSON export document. */
15485
15667
  theme: PptxTheme | undefined;
15486
15668
  /** Slide canvas size in CSS pixels, carried into the deck-JSON export. */
15487
15669
  canvasSize: CanvasSize;
15488
15670
  /** The EMU `p:sldSz` the viewer holds; see `UseExportHandlersInput`. */
15489
15671
  slideSizeEmu?: SlideSizeEmu | undefined;
15490
- password?: string;
15491
15672
  }
15492
15673
  interface ExportSaveAsResult {
15493
15674
  handleExportJson: () => void;