pptx-react-viewer 3.7.0 → 3.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +21 -0
- package/dist/{AiChatPanel-M3AHKYPS.js → AiChatPanel-3A42W7RW.js} +25 -25
- package/dist/AiChatPanel-3A42W7RW.js.br +0 -0
- package/dist/AiChatPanel-3A42W7RW.js.gz +0 -0
- package/dist/{AiChatPanel-L5QGWVZK.mjs → AiChatPanel-II6VOOAL.mjs} +4 -4
- package/dist/AiChatPanel-II6VOOAL.mjs.br +0 -0
- package/dist/AiChatPanel-II6VOOAL.mjs.gz +0 -0
- package/dist/{Area3DChartScene-AE2XYKDW.mjs → Area3DChartScene-JM3CQ3WQ.mjs} +21 -4
- package/dist/Area3DChartScene-JM3CQ3WQ.mjs.br +0 -0
- package/dist/Area3DChartScene-JM3CQ3WQ.mjs.gz +0 -0
- package/dist/{Area3DChartScene-ZQLQK6L4.js → Area3DChartScene-XJK4ZA4R.js} +21 -4
- package/dist/Area3DChartScene-XJK4ZA4R.js.br +0 -0
- package/dist/Area3DChartScene-XJK4ZA4R.js.gz +0 -0
- package/dist/{Bar3DChartScene-TZ6ADFBS.js → Bar3DChartScene-RGRZY5P6.js} +21 -4
- package/dist/Bar3DChartScene-RGRZY5P6.js.br +0 -0
- package/dist/Bar3DChartScene-RGRZY5P6.js.gz +0 -0
- package/dist/{Bar3DChartScene-FQV62XOI.mjs → Bar3DChartScene-VNFWI2QG.mjs} +21 -4
- package/dist/Bar3DChartScene-VNFWI2QG.mjs.br +0 -0
- package/dist/Bar3DChartScene-VNFWI2QG.mjs.gz +0 -0
- package/dist/{Line3DChartScene-FEUY3PCE.mjs → Line3DChartScene-GXOWGIFJ.mjs} +21 -4
- package/dist/Line3DChartScene-GXOWGIFJ.mjs.br +0 -0
- package/dist/Line3DChartScene-GXOWGIFJ.mjs.gz +0 -0
- package/dist/{Line3DChartScene-5CKPAX63.js → Line3DChartScene-MEY42DBF.js} +21 -4
- package/dist/Line3DChartScene-MEY42DBF.js.br +0 -0
- package/dist/Line3DChartScene-MEY42DBF.js.gz +0 -0
- package/dist/{Model3DScene-BLXEALM6.js → Model3DScene-MWXTGHDM.js} +2 -2
- package/dist/Model3DScene-MWXTGHDM.js.br +0 -0
- package/dist/Model3DScene-MWXTGHDM.js.gz +0 -0
- package/dist/{Model3DScene-V3DHIISV.mjs → Model3DScene-WJ3MMIZH.mjs} +1 -1
- package/dist/Model3DScene-WJ3MMIZH.mjs.br +0 -0
- package/dist/Model3DScene-WJ3MMIZH.mjs.gz +0 -0
- package/dist/{PieChart3DScene-GHHT3PDV.js → PieChart3DScene-FJJGOQIS.js} +15 -4
- package/dist/PieChart3DScene-FJJGOQIS.js.br +0 -0
- package/dist/PieChart3DScene-FJJGOQIS.js.gz +0 -0
- package/dist/{PieChart3DScene-VZI2VARG.mjs → PieChart3DScene-WXJEDYMK.mjs} +15 -4
- package/dist/PieChart3DScene-WXJEDYMK.mjs.br +0 -0
- package/dist/PieChart3DScene-WXJEDYMK.mjs.gz +0 -0
- package/dist/PowerPointViewer-Cl6jBPNw.d.ts.map +1 -1
- package/dist/{SmartArt3DScene-ZO3KFDI2.js → SmartArt3DScene-BK7QN3WT.js} +85 -23
- package/dist/SmartArt3DScene-BK7QN3WT.js.br +0 -0
- package/dist/SmartArt3DScene-BK7QN3WT.js.gz +0 -0
- package/dist/{SmartArt3DScene-XCFVGCXE.mjs → SmartArt3DScene-ODKCGJBO.mjs} +85 -23
- package/dist/SmartArt3DScene-ODKCGJBO.mjs.br +0 -0
- package/dist/SmartArt3DScene-ODKCGJBO.mjs.gz +0 -0
- package/dist/{SurfaceChart3DScene-T36E2HBA.mjs → SurfaceChart3DScene-IKPE2SVE.mjs} +19 -4
- package/dist/SurfaceChart3DScene-IKPE2SVE.mjs.br +0 -0
- package/dist/SurfaceChart3DScene-IKPE2SVE.mjs.gz +0 -0
- package/dist/{SurfaceChart3DScene-WWIMQ65D.js → SurfaceChart3DScene-VDK3F224.js} +19 -4
- package/dist/SurfaceChart3DScene-VDK3F224.js.br +0 -0
- package/dist/SurfaceChart3DScene-VDK3F224.js.gz +0 -0
- package/dist/{audience-content-store-bR7Gs_1S.d.ts → audience-content-store-CB2WVM1K.d.ts} +12 -3
- package/dist/{audience-content-store-bR7Gs_1S.d.ts.map → audience-content-store-CB2WVM1K.d.ts.map} +1 -1
- package/dist/{chunk-TUSALM3A.js → chunk-3NIJ5HIZ.js} +3650 -2503
- package/dist/chunk-3NIJ5HIZ.js.br +0 -0
- package/dist/chunk-3NIJ5HIZ.js.gz +0 -0
- package/dist/{chunk-WKODF5ZU.mjs → chunk-3Y63XPIN.mjs} +5 -2
- package/dist/chunk-3Y63XPIN.mjs.br +0 -0
- package/dist/chunk-3Y63XPIN.mjs.gz +0 -0
- package/dist/{chunk-OBE4TB76.js → chunk-5CPGDXD6.js} +632 -579
- package/dist/chunk-5CPGDXD6.js.br +0 -0
- package/dist/chunk-5CPGDXD6.js.gz +0 -0
- package/dist/{chunk-TXY2E7VQ.mjs → chunk-76Z3X6JX.mjs} +1684 -537
- package/dist/chunk-76Z3X6JX.mjs.br +0 -0
- package/dist/chunk-76Z3X6JX.mjs.gz +0 -0
- package/dist/chunk-DNR6CH6I.js +30 -0
- package/dist/chunk-DNR6CH6I.js.br +0 -0
- package/dist/chunk-DNR6CH6I.js.gz +0 -0
- package/dist/{chunk-DCNHUEWQ.js → chunk-G3JPCRKN.js} +18490 -10327
- package/dist/chunk-G3JPCRKN.js.br +0 -0
- package/dist/chunk-G3JPCRKN.js.gz +0 -0
- package/dist/{chunk-FGTMS7LR.mjs → chunk-JBSAKP4Z.mjs} +70 -4
- package/dist/chunk-JBSAKP4Z.mjs.br +0 -0
- package/dist/chunk-JBSAKP4Z.mjs.gz +0 -0
- package/dist/{chunk-3EJFZ7TE.js → chunk-K6Q6KLA6.js} +9 -5
- package/dist/chunk-K6Q6KLA6.js.br +0 -0
- package/dist/chunk-K6Q6KLA6.js.gz +0 -0
- package/dist/{chunk-VIFDZIVX.js → chunk-LBJAVP3H.js} +206 -179
- package/dist/chunk-LBJAVP3H.js.br +0 -0
- package/dist/chunk-LBJAVP3H.js.gz +0 -0
- package/dist/{chunk-JANUSAEK.mjs → chunk-NTWFXLZX.mjs} +35 -8
- package/dist/chunk-NTWFXLZX.mjs.br +0 -0
- package/dist/chunk-NTWFXLZX.mjs.gz +0 -0
- package/dist/{chunk-PC62KGU3.mjs → chunk-PCCM7NVY.mjs} +206 -153
- package/dist/chunk-PCCM7NVY.mjs.br +0 -0
- package/dist/chunk-PCCM7NVY.mjs.gz +0 -0
- package/dist/chunk-T6GFCLSM.mjs +27 -0
- package/dist/chunk-T6GFCLSM.mjs.br +4 -0
- package/dist/chunk-T6GFCLSM.mjs.gz +0 -0
- package/dist/{chunk-W24OJ7H5.js → chunk-TEVGDXVW.js} +70 -4
- package/dist/chunk-TEVGDXVW.js.br +0 -0
- package/dist/chunk-TEVGDXVW.js.gz +0 -0
- package/dist/{chunk-NV55GU5V.mjs → chunk-VQX7G75Z.mjs} +18447 -10316
- package/dist/chunk-VQX7G75Z.mjs.br +0 -0
- package/dist/chunk-VQX7G75Z.mjs.gz +0 -0
- package/dist/i18n.js +4 -4
- package/dist/i18n.js.br +0 -0
- package/dist/i18n.js.gz +0 -0
- package/dist/i18n.mjs +1 -1
- package/dist/i18n.mjs.br +0 -0
- package/dist/i18n.mjs.gz +0 -0
- package/dist/index.d.ts +545 -81
- package/dist/index.js +47 -47
- package/dist/index.js.br +0 -0
- package/dist/index.js.gz +0 -0
- package/dist/index.mjs +6 -6
- package/dist/index.mjs.br +0 -0
- package/dist/index.mjs.gz +0 -0
- package/dist/internals.d.ts +774 -229
- package/dist/internals.d.ts.map +1 -1
- package/dist/internals.js +79 -79
- package/dist/internals.js.br +0 -0
- package/dist/internals.js.gz +0 -0
- package/dist/internals.mjs +4 -4
- package/dist/internals.mjs.br +0 -0
- package/dist/internals.mjs.gz +0 -0
- package/dist/pptx-viewer.css +1 -1
- package/dist/pptx-viewer.css.br +0 -0
- package/dist/pptx-viewer.css.gz +0 -0
- package/dist/types-Bzdkiakq.d.ts.map +1 -1
- package/dist/viewer/index.d.ts +488 -66
- package/dist/viewer/index.js +27 -27
- package/dist/viewer/index.js.br +0 -0
- package/dist/viewer/index.js.gz +0 -0
- package/dist/viewer/index.mjs +6 -6
- package/dist/viewer/index.mjs.br +0 -0
- package/dist/viewer/index.mjs.gz +0 -0
- package/package.json +2 -2
- package/dist/AiChatPanel-L5QGWVZK.mjs.br +0 -0
- package/dist/AiChatPanel-L5QGWVZK.mjs.gz +0 -0
- package/dist/AiChatPanel-M3AHKYPS.js.br +0 -0
- package/dist/AiChatPanel-M3AHKYPS.js.gz +0 -0
- package/dist/Area3DChartScene-AE2XYKDW.mjs.br +0 -1
- package/dist/Area3DChartScene-AE2XYKDW.mjs.gz +0 -0
- package/dist/Area3DChartScene-ZQLQK6L4.js.br +0 -0
- package/dist/Area3DChartScene-ZQLQK6L4.js.gz +0 -0
- package/dist/Bar3DChartScene-FQV62XOI.mjs.br +0 -2
- package/dist/Bar3DChartScene-FQV62XOI.mjs.gz +0 -0
- package/dist/Bar3DChartScene-TZ6ADFBS.js.br +0 -0
- package/dist/Bar3DChartScene-TZ6ADFBS.js.gz +0 -0
- package/dist/Line3DChartScene-5CKPAX63.js.br +0 -0
- package/dist/Line3DChartScene-5CKPAX63.js.gz +0 -0
- package/dist/Line3DChartScene-FEUY3PCE.mjs.br +0 -1
- package/dist/Line3DChartScene-FEUY3PCE.mjs.gz +0 -0
- package/dist/Model3DScene-BLXEALM6.js.br +0 -0
- package/dist/Model3DScene-BLXEALM6.js.gz +0 -0
- package/dist/Model3DScene-V3DHIISV.mjs.br +0 -0
- package/dist/Model3DScene-V3DHIISV.mjs.gz +0 -0
- package/dist/PieChart3DScene-GHHT3PDV.js.br +0 -0
- package/dist/PieChart3DScene-GHHT3PDV.js.gz +0 -0
- package/dist/PieChart3DScene-VZI2VARG.mjs.br +0 -0
- package/dist/PieChart3DScene-VZI2VARG.mjs.gz +0 -0
- package/dist/SmartArt3DScene-XCFVGCXE.mjs.br +0 -0
- package/dist/SmartArt3DScene-XCFVGCXE.mjs.gz +0 -0
- package/dist/SmartArt3DScene-ZO3KFDI2.js.br +0 -0
- package/dist/SmartArt3DScene-ZO3KFDI2.js.gz +0 -0
- package/dist/SurfaceChart3DScene-T36E2HBA.mjs.br +0 -0
- package/dist/SurfaceChart3DScene-T36E2HBA.mjs.gz +0 -0
- package/dist/SurfaceChart3DScene-WWIMQ65D.js.br +0 -0
- package/dist/SurfaceChart3DScene-WWIMQ65D.js.gz +0 -0
- package/dist/chunk-3EJFZ7TE.js.br +0 -0
- package/dist/chunk-3EJFZ7TE.js.gz +0 -0
- package/dist/chunk-DCNHUEWQ.js.br +0 -0
- package/dist/chunk-DCNHUEWQ.js.gz +0 -0
- package/dist/chunk-FGTMS7LR.mjs.br +0 -0
- package/dist/chunk-FGTMS7LR.mjs.gz +0 -0
- package/dist/chunk-JANUSAEK.mjs.br +0 -0
- package/dist/chunk-JANUSAEK.mjs.gz +0 -0
- package/dist/chunk-NV55GU5V.mjs.br +0 -0
- package/dist/chunk-NV55GU5V.mjs.gz +0 -0
- package/dist/chunk-OBE4TB76.js.br +0 -0
- package/dist/chunk-OBE4TB76.js.gz +0 -0
- package/dist/chunk-PC62KGU3.mjs.br +0 -0
- package/dist/chunk-PC62KGU3.mjs.gz +0 -0
- package/dist/chunk-TUSALM3A.js.br +0 -0
- package/dist/chunk-TUSALM3A.js.gz +0 -0
- package/dist/chunk-TXY2E7VQ.mjs.br +0 -0
- package/dist/chunk-TXY2E7VQ.mjs.gz +0 -0
- package/dist/chunk-VIFDZIVX.js.br +0 -0
- package/dist/chunk-VIFDZIVX.js.gz +0 -0
- package/dist/chunk-W24OJ7H5.js.br +0 -0
- package/dist/chunk-W24OJ7H5.js.gz +0 -0
- package/dist/chunk-WKODF5ZU.mjs.br +0 -0
- package/dist/chunk-WKODF5ZU.mjs.gz +0 -0
package/dist/internals.d.ts
CHANGED
|
@@ -2145,6 +2145,29 @@ interface PptxElementBase {
|
|
|
2145
2145
|
y: number;
|
|
2146
2146
|
width: number;
|
|
2147
2147
|
height: number;
|
|
2148
|
+
/**
|
|
2149
|
+
* The exact EMU integer `x` was parsed from (the `a:off/@_x` this
|
|
2150
|
+
* element's own `a:xfrm` carried on load), when the parser could resolve
|
|
2151
|
+
* one. `x` itself is always `Math.round(xEmu / EMU_PER_PX)` at parse
|
|
2152
|
+
* time, but that rounding is lossy: re-deriving EMU from `x` on save
|
|
2153
|
+
* (`Math.round(x * EMU_PER_PX)`) can drift from the original value by up
|
|
2154
|
+
* to half a pixel's worth of EMU on every load/save cycle even when
|
|
2155
|
+
* nothing touched this element. Kept alongside `x` (not instead of it) so
|
|
2156
|
+
* every consumer that only cares about on-screen position is unaffected;
|
|
2157
|
+
* only the save-side xfrm writer (`resolveXfrmEmu` in
|
|
2158
|
+
* `xfrm-emu-resolution.ts`) reads this, and only when `x` still equals
|
|
2159
|
+
* `Math.round(xEmu / EMU_PER_PX)` (i.e. nothing moved this element since
|
|
2160
|
+
* load) does it re-emit `xEmu` verbatim instead of re-quantizing `x`.
|
|
2161
|
+
* `undefined` for an SDK-created element or one whose transform could not
|
|
2162
|
+
* be resolved to a usable `a:off` on load.
|
|
2163
|
+
*/
|
|
2164
|
+
xEmu?: number;
|
|
2165
|
+
/** The exact EMU integer `y` was parsed from (`a:off/@_y`). See {@link xEmu}. */
|
|
2166
|
+
yEmu?: number;
|
|
2167
|
+
/** The exact EMU integer `width` was parsed from (`a:ext/@_cx`). See {@link xEmu}. */
|
|
2168
|
+
widthEmu?: number;
|
|
2169
|
+
/** The exact EMU integer `height` was parsed from (`a:ext/@_cy`). See {@link xEmu}. */
|
|
2170
|
+
heightEmu?: number;
|
|
2148
2171
|
rotation?: number;
|
|
2149
2172
|
/** Skew along the X axis in degrees (parsed from `@_skewX` in 1/60000ths of a degree). */
|
|
2150
2173
|
skewX?: number;
|
|
@@ -2394,7 +2417,38 @@ interface PptxChartDataPointPicture {
|
|
|
2394
2417
|
//#region src/core/types/chart-pivot-format.d.ts
|
|
2395
2418
|
interface PptxChartPivotFormat {
|
|
2396
2419
|
index: number;
|
|
2420
|
+
/**
|
|
2421
|
+
* Typed projection of `spPr` (fill/stroke colour, stroke width, dash
|
|
2422
|
+
* style). When the parser is given a colour resolver (the normal case: the
|
|
2423
|
+
* runtime always supplies one), both a literal `a:srgbClr` and an
|
|
2424
|
+
* `a:schemeClr` theme reference (with its `lumMod`/`lumOff`/`tint`/`shade`
|
|
2425
|
+
* modifiers) resolve to a hex colour here, the same theme +
|
|
2426
|
+
* `c:clrMapOvr` chain the rest of chart parsing uses. Without a resolver
|
|
2427
|
+
* (e.g. a hand-built `PptxChartPivotFormat` with no theme to resolve
|
|
2428
|
+
* against), only the literal case resolves. Either way the authored node
|
|
2429
|
+
* is byte-preserved through {@link shapePropertiesXml} until this field is
|
|
2430
|
+
* set to something that no longer matches what re-parses off the current
|
|
2431
|
+
* XML; setting it then re-derives `shapePropertiesXml` on save (merged
|
|
2432
|
+
* onto whatever was already authored, keeping an unrelated schemeClr
|
|
2433
|
+
* reference alive when the colour itself is unchanged) unless
|
|
2434
|
+
* `shapePropertiesXml` is set explicitly, which wins.
|
|
2435
|
+
*/
|
|
2436
|
+
shapeProperties?: PptxChartShapeProps;
|
|
2437
|
+
/**
|
|
2438
|
+
* Typed projection of `txPr`'s `a:p/a:pPr/a:defRPr` (size/bold/italic/
|
|
2439
|
+
* colour/family), the same shape a legend entry or data-table's text
|
|
2440
|
+
* override models. Colour resolution mirrors {@link shapeProperties}
|
|
2441
|
+
* (theme-resolved `schemeClr` when a colour resolver is supplied, literal
|
|
2442
|
+
* `srgbClr` otherwise). See {@link txPrXml} for the raw fallback.
|
|
2443
|
+
*/
|
|
2444
|
+
textStyle?: PptxChartLegendTextStyle;
|
|
2445
|
+
/**
|
|
2446
|
+
* Typed projection of `marker` (symbol/size/spPr). See {@link markerXml}
|
|
2447
|
+
* for the raw fallback.
|
|
2448
|
+
*/
|
|
2449
|
+
marker?: PptxChartMarker;
|
|
2397
2450
|
shapePropertiesXml?: XmlObject | null;
|
|
2451
|
+
txPrXml?: XmlObject | null;
|
|
2398
2452
|
markerXml?: XmlObject | null;
|
|
2399
2453
|
dataLabelXml?: XmlObject | null;
|
|
2400
2454
|
extensionListXml?: XmlObject | null;
|
|
@@ -2587,20 +2641,6 @@ interface PptxChartTitleRun {
|
|
|
2587
2641
|
}
|
|
2588
2642
|
//#endregion
|
|
2589
2643
|
//#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
2644
|
/** A single paragraph of overlay-shape text with light formatting. */
|
|
2605
2645
|
interface PptxChartUserShapeParagraph {
|
|
2606
2646
|
/** Joined run text of the paragraph. */
|
|
@@ -2616,6 +2656,112 @@ interface PptxChartUserShapeParagraph {
|
|
|
2616
2656
|
/** Paragraph alignment (`a:pPr/@algn`): left / centre / right. */
|
|
2617
2657
|
align?: 'l' | 'ctr' | 'r';
|
|
2618
2658
|
}
|
|
2659
|
+
/**
|
|
2660
|
+
* The DrawingML 2D group transform (`a:xfrm` inside `cdr:grpSpPr`) that
|
|
2661
|
+
* anchors a `grpSp`'s own box ({@link off}/{@link ext}) and establishes the
|
|
2662
|
+
* coordinate space its children are expressed in ({@link chOff}/{@link
|
|
2663
|
+
* chExt}), all in EMU. A child's position within the group is mapped into
|
|
2664
|
+
* the group's own box via
|
|
2665
|
+
* `frac = (child.off - chOff) / chExt`, then applied to the enclosing
|
|
2666
|
+
* anchor's box; see `flattenChartUserShapes` in
|
|
2667
|
+
* `chart-user-shapes-parser.ts`.
|
|
2668
|
+
*/
|
|
2669
|
+
interface PptxChartUserShapeGroupTransform {
|
|
2670
|
+
/** The group's own position in its parent's coordinate space, in EMU. */
|
|
2671
|
+
off: {
|
|
2672
|
+
x: number;
|
|
2673
|
+
y: number;
|
|
2674
|
+
};
|
|
2675
|
+
/** The group's own size in its parent's coordinate space, in EMU. */
|
|
2676
|
+
ext: {
|
|
2677
|
+
cx: number;
|
|
2678
|
+
cy: number;
|
|
2679
|
+
};
|
|
2680
|
+
/** Origin of the child coordinate space (`a:chOff`), in EMU. */
|
|
2681
|
+
chOff: {
|
|
2682
|
+
x: number;
|
|
2683
|
+
y: number;
|
|
2684
|
+
};
|
|
2685
|
+
/** Size of the child coordinate space (`a:chExt`), in EMU. */
|
|
2686
|
+
chExt: {
|
|
2687
|
+
cx: number;
|
|
2688
|
+
cy: number;
|
|
2689
|
+
};
|
|
2690
|
+
/**
|
|
2691
|
+
* The group's own rotation in degrees (`a:xfrm/@rot`, stored in 60,000ths
|
|
2692
|
+
* of a degree), when present. Rotates the whole group, and everything
|
|
2693
|
+
* grouped inside it, as a rigid body about the CENTRE of the group's own
|
|
2694
|
+
* box ({@link off}/{@link ext}); see `flattenChartUserShapes` in
|
|
2695
|
+
* `chart-user-shapes-parser.ts` for how this composes onto each contained
|
|
2696
|
+
* leaf's own {@link PptxChartUserShapeGroupChild.rotation}. Verified
|
|
2697
|
+
* against real PowerPoint (COM): a `cdr:grpSp`'s `cdr:grpSpPr/a:xfrm` does
|
|
2698
|
+
* carry `rot` the same way an ordinary shape's does.
|
|
2699
|
+
*/
|
|
2700
|
+
rotation?: number;
|
|
2701
|
+
/** The group's own horizontal flip (`a:xfrm/@flipH`), when present; composes onto children by XOR, see {@link rotation}'s doc. */
|
|
2702
|
+
flipH?: boolean;
|
|
2703
|
+
/** The group's own vertical flip (`a:xfrm/@flipV`), when present; composes onto children by XOR, see {@link rotation}'s doc. */
|
|
2704
|
+
flipV?: boolean;
|
|
2705
|
+
}
|
|
2706
|
+
/**
|
|
2707
|
+
* One shape grouped inside a `cdr:grpSp` (or a nested `cdr:grpSp` itself).
|
|
2708
|
+
* Unlike a top-level {@link PptxChartUserShape}, a group child has no
|
|
2709
|
+
* drawing anchor of its own: its position is expressed in its parent
|
|
2710
|
+
* group's child coordinate space via {@link off}/{@link ext} (EMU, read
|
|
2711
|
+
* from the child's own `a:xfrm`), not as a chart-relative fraction.
|
|
2712
|
+
*/
|
|
2713
|
+
interface PptxChartUserShapeGroupChild {
|
|
2714
|
+
/** Shape kind, same vocabulary as {@link PptxChartUserShape.kind}. */
|
|
2715
|
+
kind: 'sp' | 'cxnSp' | 'pic' | 'grpSp' | 'graphicFrame';
|
|
2716
|
+
/** Position within the parent group's child coordinate space, in EMU. */
|
|
2717
|
+
off: {
|
|
2718
|
+
x: number;
|
|
2719
|
+
y: number;
|
|
2720
|
+
};
|
|
2721
|
+
/** Size within the parent group's child coordinate space, in EMU. */
|
|
2722
|
+
ext: {
|
|
2723
|
+
cx: number;
|
|
2724
|
+
cy: number;
|
|
2725
|
+
};
|
|
2726
|
+
/** Preset geometry name (`a:prstGeom/@prst`), defaulting to `"rect"`. */
|
|
2727
|
+
prst?: string;
|
|
2728
|
+
/** Resolved solid-fill hex colour, when present. */
|
|
2729
|
+
fill?: string;
|
|
2730
|
+
/** Resolved line/stroke hex colour, when present. */
|
|
2731
|
+
stroke?: string;
|
|
2732
|
+
/** Line width in points (`a:ln/@w` divided by 12700), when present. */
|
|
2733
|
+
strokeWidth?: number;
|
|
2734
|
+
/** Text paragraphs of the shape's `txBody`, when present. */
|
|
2735
|
+
paragraphs?: PptxChartUserShapeParagraph[];
|
|
2736
|
+
/**
|
|
2737
|
+
* A `pic` child's alt text (`cdr:nvPicPr/cdr:cNvPr/@descr`), when present.
|
|
2738
|
+
* Editable independently of {@link rawXml}'s otherwise-verbatim content:
|
|
2739
|
+
* the serializer patches only this attribute onto the cloned raw node.
|
|
2740
|
+
*/
|
|
2741
|
+
altText?: string;
|
|
2742
|
+
/**
|
|
2743
|
+
* This child's OWN rotation in degrees (`a:xfrm/@rot`), when present.
|
|
2744
|
+
* Composes with every enclosing group's own
|
|
2745
|
+
* {@link PptxChartUserShapeGroupTransform.rotation} (added) to produce the
|
|
2746
|
+
* leaf's final on-screen rotation; see `flattenChartUserShapes`.
|
|
2747
|
+
*/
|
|
2748
|
+
rotation?: number;
|
|
2749
|
+
/** This child's OWN horizontal flip (`a:xfrm/@flipH`); composes with an ancestor group's flip by XOR. */
|
|
2750
|
+
flipH?: boolean;
|
|
2751
|
+
/** This child's OWN vertical flip (`a:xfrm/@flipV`); composes with an ancestor group's flip by XOR. */
|
|
2752
|
+
flipV?: boolean;
|
|
2753
|
+
/**
|
|
2754
|
+
* Verbatim source XML of a `pic`/`graphicFrame` child, or of this node
|
|
2755
|
+
* itself when `kind === 'grpSp'` and the nested group is untouched since
|
|
2756
|
+
* parse. See {@link PptxChartUserShape.rawXml}'s doc for the same
|
|
2757
|
+
* contract one level up.
|
|
2758
|
+
*/
|
|
2759
|
+
rawXml?: XmlObject;
|
|
2760
|
+
/** Present when `kind === 'grpSp'`: this nested group's own transform. */
|
|
2761
|
+
transform?: PptxChartUserShapeGroupTransform;
|
|
2762
|
+
/** Present when `kind === 'grpSp'`: this nested group's own children. */
|
|
2763
|
+
children?: PptxChartUserShapeGroupChild[];
|
|
2764
|
+
}
|
|
2619
2765
|
/**
|
|
2620
2766
|
* A parsed chart-overlay shape positioned by a drawing anchor.
|
|
2621
2767
|
*
|
|
@@ -2626,12 +2772,13 @@ interface PptxChartUserShapeParagraph {
|
|
|
2626
2772
|
interface PptxChartUserShape {
|
|
2627
2773
|
/**
|
|
2628
2774
|
* Shape kind: text/preset shape, connector, picture, a group of the
|
|
2629
|
-
* above (`grpSp`,
|
|
2630
|
-
*
|
|
2631
|
-
*
|
|
2632
|
-
*
|
|
2633
|
-
*
|
|
2634
|
-
*
|
|
2775
|
+
* above (`grpSp`, with its own {@link transform} and {@link children},
|
|
2776
|
+
* nested arbitrarily; use `flattenChartUserShapes` from
|
|
2777
|
+
* `chart-user-shapes-parser.ts` to get a flat, render-ready leaf list
|
|
2778
|
+
* with the group transform already applied), or a bare placeholder for
|
|
2779
|
+
* a `graphicFrame` anchor child (deep content such as a nested chart or
|
|
2780
|
+
* table is out of scope; it only keeps the anchor's space accounted for
|
|
2781
|
+
* instead of the whole overlay disappearing).
|
|
2635
2782
|
*/
|
|
2636
2783
|
kind: 'sp' | 'cxnSp' | 'pic' | 'grpSp' | 'graphicFrame';
|
|
2637
2784
|
/** Anchor kind that positioned the shape. */
|
|
@@ -2661,6 +2808,49 @@ interface PptxChartUserShape {
|
|
|
2661
2808
|
strokeWidth?: number;
|
|
2662
2809
|
/** Text paragraphs of the shape's `txBody`, when present. */
|
|
2663
2810
|
paragraphs?: PptxChartUserShapeParagraph[];
|
|
2811
|
+
/**
|
|
2812
|
+
* A `pic` anchor's alt text (`cdr:nvPicPr/cdr:cNvPr/@descr`), when
|
|
2813
|
+
* present. Editable independently of {@link rawXml}'s otherwise-verbatim
|
|
2814
|
+
* content: the serializer patches only this attribute onto the cloned
|
|
2815
|
+
* raw node, so a picture's blip and other markup are untouched.
|
|
2816
|
+
*/
|
|
2817
|
+
altText?: string;
|
|
2818
|
+
/**
|
|
2819
|
+
* This shape's OWN rotation in degrees (`a:xfrm/@rot`, on `spPr/a:xfrm`
|
|
2820
|
+
* for `sp`/`cxnSp`/`pic`, or directly on a top-level `graphicFrame`'s own
|
|
2821
|
+
* `a:xfrm`), when present. A top-level anchor's position/size is governed
|
|
2822
|
+
* by {@link from}/{@link to}/{@link ext}, never by this `a:xfrm`'s own
|
|
2823
|
+
* `off`/`ext` (see {@link rawXml}'s doc), but `rot`/`flipH`/`flipV` on that
|
|
2824
|
+
* same `a:xfrm` DO apply visually: verified against real PowerPoint (COM),
|
|
2825
|
+
* which writes e.g. `<a:xfrm rot="1800000"><a:off .../><a:ext .../></a:xfrm>`
|
|
2826
|
+
* on a rotated overlay shape's `spPr`, with the `off`/`ext` values
|
|
2827
|
+
* unrelated to the anchor's own `cdr:from`/`cdr:to`.
|
|
2828
|
+
*/
|
|
2829
|
+
rotation?: number;
|
|
2830
|
+
/** This shape's OWN horizontal flip (`a:xfrm/@flipH`); see {@link rotation}'s doc. */
|
|
2831
|
+
flipH?: boolean;
|
|
2832
|
+
/** This shape's OWN vertical flip (`a:xfrm/@flipV`); see {@link rotation}'s doc. */
|
|
2833
|
+
flipV?: boolean;
|
|
2834
|
+
/**
|
|
2835
|
+
* Verbatim source XML of a `pic` or `graphicFrame` anchor child (the
|
|
2836
|
+
* `cdr:pic` / `cdr:graphicFrame` node itself, not the enclosing anchor),
|
|
2837
|
+
* or of the `cdr:grpSp` node itself when `kind === 'grpSp'` and the
|
|
2838
|
+
* group is untouched since parse (byte-identical passthrough). None of
|
|
2839
|
+
* these three kinds have a reconstructable typed representation that is
|
|
2840
|
+
* guaranteed lossless (a picture's blip reference, a nested chart/table's
|
|
2841
|
+
* graphic content, or a group's exact child ordering/ids), so the
|
|
2842
|
+
* serializer re-emits this verbatim when present instead of a lossy
|
|
2843
|
+
* rebuild. Editing a shape inside a group (via the SDK's path-based
|
|
2844
|
+
* overlay operations) clears the group's `rawXml` so the serializer
|
|
2845
|
+
* regenerates it from {@link transform}/{@link children} instead. Absent
|
|
2846
|
+
* for `sp`/`cxnSp`, which round-trip losslessly through their typed
|
|
2847
|
+
* fields above.
|
|
2848
|
+
*/
|
|
2849
|
+
rawXml?: XmlObject;
|
|
2850
|
+
/** Present when `kind === 'grpSp'`: the group's own transform. */
|
|
2851
|
+
transform?: PptxChartUserShapeGroupTransform;
|
|
2852
|
+
/** Present when `kind === 'grpSp'`: the grouped children, nested arbitrarily. */
|
|
2853
|
+
children?: PptxChartUserShapeGroupChild[];
|
|
2664
2854
|
}
|
|
2665
2855
|
//#endregion
|
|
2666
2856
|
//#region src/core/types/chart.d.ts
|
|
@@ -2670,7 +2860,7 @@ interface PptxChartUserShape {
|
|
|
2670
2860
|
* @example
|
|
2671
2861
|
* ```ts
|
|
2672
2862
|
* const type: PptxChartType = "bar";
|
|
2673
|
-
* // => "bar"
|
|
2863
|
+
* // => "bar": one of: "bar" | "line" | "pie" | "doughnut" | "area" | "scatter" | …
|
|
2674
2864
|
* ```
|
|
2675
2865
|
*/
|
|
2676
2866
|
type PptxChartType = 'bar' | 'line' | 'pie' | 'ofPie' | 'doughnut' | 'area' | 'scatter' | 'bubble' | 'radar' | 'stock' | 'bar3D' | 'line3D' | 'pie3D' | 'area3D' | 'surface' | 'histogram' | 'waterfall' | 'funnel' | 'treemap' | 'sunburst' | 'boxWhisker' | 'regionMap' | 'combo' | 'unknown';
|
|
@@ -2705,7 +2895,7 @@ type PptxBar3DShape = 'box' | 'cone' | 'coneToMax' | 'cylinder' | 'pyramid' | 'p
|
|
|
2705
2895
|
* @example
|
|
2706
2896
|
* ```ts
|
|
2707
2897
|
* const type: PptxChartTrendlineType = "linear";
|
|
2708
|
-
* // => "linear"
|
|
2898
|
+
* // => "linear": one of: "linear" | "exponential" | "logarithmic" | "polynomial" | "power" | "movingAvg"
|
|
2709
2899
|
* ```
|
|
2710
2900
|
*/
|
|
2711
2901
|
type PptxChartTrendlineType = 'linear' | 'exponential' | 'logarithmic' | 'polynomial' | 'power' | 'movingAvg';
|
|
@@ -2756,7 +2946,7 @@ type PptxChartErrBarType = 'both' | 'minus' | 'plus';
|
|
|
2756
2946
|
* @example
|
|
2757
2947
|
* ```ts
|
|
2758
2948
|
* const valType: PptxChartErrValType = "percentage";
|
|
2759
|
-
* // => "percentage"
|
|
2949
|
+
* // => "percentage": one of: "cust" | "fixedVal" | "percentage" | "stdDev" | "stdErr"
|
|
2760
2950
|
* ```
|
|
2761
2951
|
*/
|
|
2762
2952
|
type PptxChartErrValType = 'cust' | 'fixedVal' | 'percentage' | 'stdDev' | 'stdErr';
|
|
@@ -2875,6 +3065,14 @@ interface PptxChartDataPoint {
|
|
|
2875
3065
|
bubble3D?: boolean;
|
|
2876
3066
|
/** Per-point picture-fill flags (`c:dPt/c:pictureOptions`). */
|
|
2877
3067
|
picture?: PptxChartDataPointPicture;
|
|
3068
|
+
/**
|
|
3069
|
+
* This point's identity GUID (`c:dPt/c:extLst/c:ext/c16:uniqueId/@val`,
|
|
3070
|
+
* the Office 2014+ `{C3380CC4-5D6E-409C-BE32-E72D297353CC}` chart
|
|
3071
|
+
* extension), read-only here: an edited point keeps its existing
|
|
3072
|
+
* `c:extLst` as passthrough (see `chart-datapoint-serializer.ts`), so this
|
|
3073
|
+
* field exists for introspection rather than round-trip.
|
|
3074
|
+
*/
|
|
3075
|
+
uniqueId?: string;
|
|
2878
3076
|
}
|
|
2879
3077
|
/** Schema values accepted by `c:dLblPos`. */
|
|
2880
3078
|
type PptxChartDataLabelPosition = 'bestFit' | 'b' | 'ctr' | 'inBase' | 'inEnd' | 'l' | 'outEnd' | 'r' | 't';
|
|
@@ -2951,7 +3149,7 @@ interface PptxChartAxisFormatting extends PptxChartAxisLabelFormatting {
|
|
|
2951
3149
|
axPos?: 'b' | 'l' | 'r' | 't';
|
|
2952
3150
|
/** Unique axis identifier (c:axId/@val) used to link series to axes. */
|
|
2953
3151
|
axisId?: number;
|
|
2954
|
-
/** Cross-axis identifier
|
|
3152
|
+
/** Cross-axis identifier: the axis this axis crosses. */
|
|
2955
3153
|
crossAxisId?: number;
|
|
2956
3154
|
/** Automatic crossing mode (`c:crosses`). Mutually exclusive with `crossesAt`. */
|
|
2957
3155
|
crosses?: 'autoZero' | 'min' | 'max';
|
|
@@ -3203,6 +3401,54 @@ interface PptxChartSeries {
|
|
|
3203
3401
|
waterfallOptions?: PptxChartWaterfallOptions;
|
|
3204
3402
|
regionMapOptions?: PptxChartRegionMapOptions;
|
|
3205
3403
|
treemapOptions?: PptxChartTreemapOptions;
|
|
3404
|
+
/**
|
|
3405
|
+
* Series-level picture-fill flags (`c:ser/c:pictureOptions`), legal
|
|
3406
|
+
* wherever a per-point `c:dPt/c:pictureOptions` is (CT_BarSer): paints
|
|
3407
|
+
* EVERY point in the series with one picture unless a `c:dPt` overrides it
|
|
3408
|
+
* for that point alone. A point's own {@link PptxChartDataPoint.picture}
|
|
3409
|
+
* takes precedence entirely (not merged field-by-field) when it resolves
|
|
3410
|
+
* its own image; renderers fall back to this series-level picture only
|
|
3411
|
+
* when the point has none of its own.
|
|
3412
|
+
*/
|
|
3413
|
+
picture?: PptxChartDataPointPicture;
|
|
3414
|
+
/**
|
|
3415
|
+
* This series' identity GUID (`c:ser/c:extLst/c:ext/c16:uniqueId/@val`,
|
|
3416
|
+
* the Office 2014+ `{C3380CC4-5D6E-409C-BE32-E72D297353CC}` chart
|
|
3417
|
+
* extension). PowerPoint uses it to track a series across edits and
|
|
3418
|
+
* collaborators independent of its `c:idx`/`c:order` position (the same
|
|
3419
|
+
* role animation targeting and CRDT reconciliation need). An edited
|
|
3420
|
+
* existing series keeps its own `c:extLst` as passthrough; a NEW series
|
|
3421
|
+
* added by cloning an existing one as a template is given a freshly
|
|
3422
|
+
* generated id rather than duplicating the template's (see
|
|
3423
|
+
* `regenerateClonedUniqueId` in `chart-series-identity.ts`), since two
|
|
3424
|
+
* series sharing one identity is exactly what this extension exists to
|
|
3425
|
+
* prevent.
|
|
3426
|
+
*/
|
|
3427
|
+
uniqueId?: string;
|
|
3428
|
+
}
|
|
3429
|
+
/**
|
|
3430
|
+
* A series PowerPoint's "Chart Filters" feature hid from the plot while
|
|
3431
|
+
* keeping it in the workbook (`c:<type>Chart/c:extLst/c:ext
|
|
3432
|
+
* [@uri={02D57815-91ED-43cb-92C2-25804820EDAC}]/c15:filtered<Type>Series
|
|
3433
|
+
* /c15:ser`). Read-mostly: {@link PptxChartData.filteredSeries} exists for
|
|
3434
|
+
* introspection (AI tools, "unhide filtered series" UI) and round-trips as
|
|
3435
|
+
* passthrough through the preserved chart XML when untouched. See
|
|
3436
|
+
* `utils/chart-filtered-series.ts` for the parse rules and the idx-collision
|
|
3437
|
+
* fix this modelling enables on save.
|
|
3438
|
+
*/
|
|
3439
|
+
interface PptxChartFilteredSeries {
|
|
3440
|
+
/** `c15:ser/c:idx/@val`, the workbook column position this series still occupies. */
|
|
3441
|
+
idx: number;
|
|
3442
|
+
/** `c15:ser/c:order/@val`, defaulting to {@link idx} when absent. */
|
|
3443
|
+
order: number;
|
|
3444
|
+
/** Series name, from the hidden series' own `c:tx` cache. */
|
|
3445
|
+
name?: string;
|
|
3446
|
+
/** Category labels, from the hidden series' own `c:cat` cache. */
|
|
3447
|
+
categories?: string[];
|
|
3448
|
+
/** Data values, from the hidden series' own `c:val` cache. */
|
|
3449
|
+
values?: number[];
|
|
3450
|
+
/** This hidden series' own identity GUID (`c16:uniqueId`), when present. */
|
|
3451
|
+
uniqueId?: string;
|
|
3206
3452
|
}
|
|
3207
3453
|
/**
|
|
3208
3454
|
* Chart-level data-label options (`c:dLbls` directly under a chart-type
|
|
@@ -3226,6 +3472,19 @@ interface PptxChartDataLabelOptions {
|
|
|
3226
3472
|
separator?: string;
|
|
3227
3473
|
/** Show leader lines where supported (`c:showLeaderLines`). */
|
|
3228
3474
|
showLeaderLines?: boolean;
|
|
3475
|
+
/**
|
|
3476
|
+
* Leader-line stroke styling for offset (pie/doughnut `outEnd`/`bestFit`)
|
|
3477
|
+
* labels. Resolved from the base `c:leaderLines/c:spPr` when present, else
|
|
3478
|
+
* falling back to the Office 2013+ chart15 extension's mirror
|
|
3479
|
+
* (`c:extLst/c:ext/c15:leaderLines/c:spPr`, uri
|
|
3480
|
+
* `{CE6537A1-D6FC-4f65-9D91-7224C49458BB}`), which is the one PowerPoint
|
|
3481
|
+
* itself treats as authoritative when both are present. Confirmed against
|
|
3482
|
+
* `e2e/fixtures/issue-132-gradient-fill.pptx` and
|
|
3483
|
+
* `e2e/fixtures/issue-132-hr-deck.pptx`, both of which write only the
|
|
3484
|
+
* extension form. `undefined` leaves the renderer's own default leader-line
|
|
3485
|
+
* stroke.
|
|
3486
|
+
*/
|
|
3487
|
+
leaderLineStyle?: PptxChartShapeProps;
|
|
3229
3488
|
/**
|
|
3230
3489
|
* Label position (`c:dLblPos`). Valid values depend on the chart type
|
|
3231
3490
|
* (`ctr`, `inEnd`, `inBase`, `outEnd`, `bestFit`, `l`, `r`, `t`, `b`).
|
|
@@ -3379,12 +3638,12 @@ interface PptxBubbleChartOptions {
|
|
|
3379
3638
|
*
|
|
3380
3639
|
* All fields are optional and round-trip verbatim.
|
|
3381
3640
|
*
|
|
3382
|
-
* - {@link rotX}
|
|
3383
|
-
* - {@link rotY}
|
|
3384
|
-
* - {@link depthPercent}
|
|
3385
|
-
* - {@link rAngAx}
|
|
3386
|
-
* - {@link perspective}
|
|
3387
|
-
* - {@link hPercent}
|
|
3641
|
+
* - {@link rotX}: X-axis rotation in degrees (-90…90).
|
|
3642
|
+
* - {@link rotY}: Y-axis rotation in degrees (0…360).
|
|
3643
|
+
* - {@link depthPercent}: chart depth as a percentage of base width.
|
|
3644
|
+
* - {@link rAngAx}: `true` if axes meet at right angles.
|
|
3645
|
+
* - {@link perspective}: perspective angle in degrees (0…240).
|
|
3646
|
+
* - {@link hPercent}: height as a percentage of chart width.
|
|
3388
3647
|
*/
|
|
3389
3648
|
interface PptxChartView3D {
|
|
3390
3649
|
rotX?: number;
|
|
@@ -3398,12 +3657,17 @@ interface PptxChartView3D {
|
|
|
3398
3657
|
* Chart "chrome" flags from `c:chart` that round-trip cleanly even when
|
|
3399
3658
|
* rendering ignores them.
|
|
3400
3659
|
*
|
|
3401
|
-
* - {@link autoTitleDeleted}
|
|
3660
|
+
* - {@link autoTitleDeleted}: `c:autoTitleDeleted/@val`. Suppresses the
|
|
3402
3661
|
* auto-generated title for single-series charts.
|
|
3403
|
-
* - {@link dispBlanksAs}
|
|
3662
|
+
* - {@link dispBlanksAs}: `c:dispBlanksAs/@val`. How blank cells
|
|
3404
3663
|
* render: `"gap"`, `"zero"`, or `"span"`.
|
|
3405
|
-
* - {@link showDLblsOverMax}
|
|
3664
|
+
* - {@link showDLblsOverMax}: `c:showDLblsOverMax/@val`. Keeps data
|
|
3406
3665
|
* labels visible for points exceeding the value-axis maximum.
|
|
3666
|
+
* - {@link dispNaAsBlank}: the Office 2017+ chart extension
|
|
3667
|
+
* `c:extLst/c:ext/c16r3:dataDisplayOptions16/c16r3:dispNaAsBlank/@val`
|
|
3668
|
+
* (uri `{56B9EC1D-385E-4148-901F-78D8002777C0}`), PowerPoint's "Show #N/A
|
|
3669
|
+
* as an empty cell" chart option. Confirmed against real corpus markup
|
|
3670
|
+
* (`e2e/fixtures/chart-data-fidelity.pptx`).
|
|
3407
3671
|
*
|
|
3408
3672
|
* `c:plotVisOnly` lives on {@link PptxChartData.plotVisibleOnly} and is
|
|
3409
3673
|
* intentionally not duplicated here.
|
|
@@ -3412,6 +3676,7 @@ interface PptxChartChrome {
|
|
|
3412
3676
|
autoTitleDeleted?: boolean;
|
|
3413
3677
|
dispBlanksAs?: 'gap' | 'zero' | 'span';
|
|
3414
3678
|
showDLblsOverMax?: boolean;
|
|
3679
|
+
dispNaAsBlank?: boolean;
|
|
3415
3680
|
}
|
|
3416
3681
|
/** Manual chart placement from `c:layout/c:manualLayout` (CT_ManualLayout). */
|
|
3417
3682
|
interface PptxChartManualLayout {
|
|
@@ -3507,6 +3772,13 @@ interface PptxChartData {
|
|
|
3507
3772
|
categoryLevels?: string[][];
|
|
3508
3773
|
dateCategories?: PptxChartDateCategories;
|
|
3509
3774
|
series: PptxChartSeries[];
|
|
3775
|
+
/**
|
|
3776
|
+
* Series hidden from the plot by PowerPoint's "Chart Filters" feature
|
|
3777
|
+
* (Series tab) but still present in the workbook, aggregated across every
|
|
3778
|
+
* chart-type container (combo charts can carry more than one). Absent
|
|
3779
|
+
* when the chart has no such extension. See {@link PptxChartFilteredSeries}.
|
|
3780
|
+
*/
|
|
3781
|
+
filteredSeries?: PptxChartFilteredSeries[];
|
|
3510
3782
|
/** Chart style/formatting metadata. */
|
|
3511
3783
|
style?: PptxChartStyle;
|
|
3512
3784
|
/** Grouping mode for bar/area/line charts: 'clustered' | 'stacked' | 'percentStacked' */
|
|
@@ -3630,9 +3902,9 @@ interface PptxChartData {
|
|
|
3630
3902
|
/**
|
|
3631
3903
|
* Color cycling method from the chart color style part's `meth` attribute.
|
|
3632
3904
|
*
|
|
3633
|
-
* - `"cycle"
|
|
3634
|
-
* - `"withinLinear"
|
|
3635
|
-
* - `"acrossLinear"
|
|
3905
|
+
* - `"cycle"`: repeat the palette colours in order (default)
|
|
3906
|
+
* - `"withinLinear"`: gradient within each series
|
|
3907
|
+
* - `"acrossLinear"`: gradient across series
|
|
3636
3908
|
*/
|
|
3637
3909
|
colorMethod?: 'cycle' | 'withinLinear' | 'acrossLinear';
|
|
3638
3910
|
/** Internal source color-style part path used for lossless dirty saves. */
|
|
@@ -5813,6 +6085,21 @@ interface PptxAccessibilityProperties {
|
|
|
5813
6085
|
*/
|
|
5814
6086
|
isDecorative?: boolean;
|
|
5815
6087
|
}
|
|
6088
|
+
/**
|
|
6089
|
+
* Accessibility description/title from `p:cNvPr/@descr` / `@title` on a
|
|
6090
|
+
* plain shape, text box or connector (`p:sp` / `p:cxnSp`). The same pair of
|
|
6091
|
+
* attributes already round-trips for a graphic frame (see
|
|
6092
|
+
* {@link TablePptxElement.altText}) and, `descr` only, for a picture
|
|
6093
|
+
* ({@link PptxImageProperties.altText}); this mixin extends it to the three
|
|
6094
|
+
* element kinds whose PowerPoint Alt Text pane data was previously dropped
|
|
6095
|
+
* on load because neither field existed on the model.
|
|
6096
|
+
*/
|
|
6097
|
+
interface PptxNonVisualDescription {
|
|
6098
|
+
/** `p:cNvPr/@descr`. */
|
|
6099
|
+
altText?: string;
|
|
6100
|
+
/** `p:cNvPr/@title`. */
|
|
6101
|
+
title?: string;
|
|
6102
|
+
}
|
|
5816
6103
|
/**
|
|
5817
6104
|
* `a:cNvPicPr/@preferRelativeResize` (issue G13), a picture-only non-visual
|
|
5818
6105
|
* property distinct from `a:picLocks`.
|
|
@@ -5845,7 +6132,7 @@ interface PptxPictureNonVisualProperties {
|
|
|
5845
6132
|
* // => satisfies TextPptxElement
|
|
5846
6133
|
* ```
|
|
5847
6134
|
*/
|
|
5848
|
-
interface TextPptxElement extends PptxElementBase, PptxTextProperties, PptxShapeProperties {
|
|
6135
|
+
interface TextPptxElement extends PptxElementBase, PptxTextProperties, PptxShapeProperties, PptxNonVisualDescription {
|
|
5849
6136
|
type: 'text';
|
|
5850
6137
|
}
|
|
5851
6138
|
/**
|
|
@@ -5863,7 +6150,7 @@ interface TextPptxElement extends PptxElementBase, PptxTextProperties, PptxShape
|
|
|
5863
6150
|
* // => satisfies ShapePptxElement
|
|
5864
6151
|
* ```
|
|
5865
6152
|
*/
|
|
5866
|
-
interface ShapePptxElement extends PptxElementBase, PptxTextProperties, PptxShapeProperties, PptxCustomPathProperties, PptxAccessibilityProperties {
|
|
6153
|
+
interface ShapePptxElement extends PptxElementBase, PptxTextProperties, PptxShapeProperties, PptxCustomPathProperties, PptxAccessibilityProperties, PptxNonVisualDescription {
|
|
5867
6154
|
type: 'shape';
|
|
5868
6155
|
}
|
|
5869
6156
|
/**
|
|
@@ -5885,7 +6172,7 @@ interface ShapePptxElement extends PptxElementBase, PptxTextProperties, PptxShap
|
|
|
5885
6172
|
* // => satisfies ConnectorPptxElement
|
|
5886
6173
|
* ```
|
|
5887
6174
|
*/
|
|
5888
|
-
interface ConnectorPptxElement extends PptxElementBase, PptxTextProperties, PptxShapeProperties {
|
|
6175
|
+
interface ConnectorPptxElement extends PptxElementBase, PptxTextProperties, PptxShapeProperties, PptxNonVisualDescription {
|
|
5889
6176
|
type: 'connector';
|
|
5890
6177
|
}
|
|
5891
6178
|
/**
|
|
@@ -6180,13 +6467,14 @@ interface MediaPptxElement extends PptxElementBase {
|
|
|
6180
6467
|
*/
|
|
6181
6468
|
isLinked?: boolean;
|
|
6182
6469
|
/**
|
|
6183
|
-
* Accessibility description from `p:nvGraphicFramePr/p:cNvPr/@descr
|
|
6184
|
-
*
|
|
6185
|
-
*
|
|
6186
|
-
*
|
|
6470
|
+
* Accessibility description. Read from `p:nvGraphicFramePr/p:cNvPr/@descr`
|
|
6471
|
+
* for the `p:graphicFrame`-shaped (SDK-created) media form, or from
|
|
6472
|
+
* `p:nvPicPr/p:cNvPr/@descr` for the `p:pic`-shaped media form (real
|
|
6473
|
+
* PowerPoint's usual authoring shape for a video/audio placeholder); see
|
|
6474
|
+
* `PptxHandlerRuntimePictureParsing.ts`.
|
|
6187
6475
|
*/
|
|
6188
6476
|
altText?: string;
|
|
6189
|
-
/** Accessibility title from `p:
|
|
6477
|
+
/** Accessibility title, from the same `@title` attribute on whichever `p:cNvPr` the media form uses. Same scope note as {@link altText}. */
|
|
6190
6478
|
title?: string;
|
|
6191
6479
|
/** Unrecognised graphicFrame extLst extensions, captured verbatim for round-trip. */
|
|
6192
6480
|
extensionXml?: PptxGraphicFrameExtension[];
|
|
@@ -6213,6 +6501,46 @@ interface GroupPptxElement extends PptxElementBase {
|
|
|
6213
6501
|
children: PptxElement[];
|
|
6214
6502
|
/** Fill style extracted from the group's `p:grpSpPr`, used for `a:grpFill` inheritance. */
|
|
6215
6503
|
groupFill?: ShapeStyle;
|
|
6504
|
+
/**
|
|
6505
|
+
* The SAME `p:grpSpPr` extraction as {@link groupFill}, kept whenever the
|
|
6506
|
+
* group carries a `p:grpSpPr` at all, regardless of whether it resolved to
|
|
6507
|
+
* a paintable fill.
|
|
6508
|
+
*
|
|
6509
|
+
* `groupFill` is `undefined` unless the group has a real fill, because
|
|
6510
|
+
* `getGroupChildParentFill`/`groupChildInheritedFill` (the `a:grpFill`
|
|
6511
|
+
* inheritance chain) must keep chaining through an ancestor's fill when
|
|
6512
|
+
* THIS group has none of its own. A group whose `p:grpSpPr` authors only
|
|
6513
|
+
* `a:effectLst` (shadow/glow/soft-edge/reflection, no fill) needs those
|
|
6514
|
+
* effects to still reach the renderer, so they are kept here under a name
|
|
6515
|
+
* that carries no fill-inheritance meaning. Currently only reflection is
|
|
6516
|
+
* read from it (`getComputedEffectStyle`); the rest of `a:effectLst` on a
|
|
6517
|
+
* group remains unsupported.
|
|
6518
|
+
*/
|
|
6519
|
+
groupEffectStyle?: ShapeStyle;
|
|
6520
|
+
/**
|
|
6521
|
+
* Exact EMU the group's own `a:chOff`/`a:chExt` (the coordinate space its
|
|
6522
|
+
* CHILDREN are authored in) were parsed from, alongside {@link
|
|
6523
|
+
* PptxElementBase.xEmu} etc for the group's own placement in its PARENT's
|
|
6524
|
+
* space. `undefined` when the source carried no usable `a:chOff`/`a:chExt`
|
|
6525
|
+
* (an SDK-created group, or one whose `a:xfrm` had no child-space data).
|
|
6526
|
+
*
|
|
6527
|
+
* Used by `group-xfrm-preservation.ts`'s `hasCapturedChildSpace` to decide
|
|
6528
|
+
* whether this group's original `a:chOff`/`a:chExt` can be re-emitted
|
|
6529
|
+
* verbatim (always true once captured, regardless of whether anything in
|
|
6530
|
+
* the subtree has moved or resized - only its DIRECT children's
|
|
6531
|
+
* `a:off`/`a:ext` are recomputed, via `invertChildIntoGroupSpace`, when
|
|
6532
|
+
* something changed), instead of the normalized `chOff 0,0` / `chExt ==
|
|
6533
|
+
* ext` space the writer falls back to when this is `undefined` (or
|
|
6534
|
+
* degenerate). See `group-shape-geometry.ts`'s module doc for why a group
|
|
6535
|
+
* needs two coordinate systems at all.
|
|
6536
|
+
*/
|
|
6537
|
+
chOffXEmu?: number;
|
|
6538
|
+
/** See {@link chOffXEmu}. */
|
|
6539
|
+
chOffYEmu?: number;
|
|
6540
|
+
/** See {@link chOffXEmu}. */
|
|
6541
|
+
chExtWidthEmu?: number;
|
|
6542
|
+
/** See {@link chOffXEmu}. */
|
|
6543
|
+
chExtHeightEmu?: number;
|
|
6216
6544
|
}
|
|
6217
6545
|
/**
|
|
6218
6546
|
* A freehand ink / drawing stroke captured with a stylus or mouse.
|
|
@@ -6241,6 +6569,24 @@ interface InkPptxElement extends PptxElementBase {
|
|
|
6241
6569
|
* variable-width strokes that reflect stylus/pen pressure.
|
|
6242
6570
|
*/
|
|
6243
6571
|
inkPointPressures?: number[][];
|
|
6572
|
+
/**
|
|
6573
|
+
* Per-path arrays of per-point pen-tilt lean direction (degrees, straight
|
|
6574
|
+
* from `PointerEvent.tiltX` on supporting hardware).
|
|
6575
|
+
*
|
|
6576
|
+
* Each entry corresponds to the path at the same index in `inkPaths`, and
|
|
6577
|
+
* is paired positionally with {@link inkPointTiltY}. Present only when at
|
|
6578
|
+
* least one point in the stroke reported a genuinely non-zero tilt: a
|
|
6579
|
+
* device that never reports tilt (a mouse, or a stylus with no tilt
|
|
6580
|
+
* sensor) leaves both arrays absent, the same way `inkPointPressures` is
|
|
6581
|
+
* omitted when pressure never varies. When present, the renderer converts
|
|
6582
|
+
* the raw `(tiltX, tiltY)` vector into a lean angle + magnitude (see
|
|
6583
|
+
* `pptx-viewer-shared`'s `tiltChannelsFromVectors`) and widens the stroke
|
|
6584
|
+
* perpendicular to the lean direction, approximating a chisel-tip
|
|
6585
|
+
* calligraphy nib.
|
|
6586
|
+
*/
|
|
6587
|
+
inkPointTiltX?: number[][];
|
|
6588
|
+
/** Per-path, per-point pen-tilt lean direction (degrees), paired with {@link inkPointTiltX}. */
|
|
6589
|
+
inkPointTiltY?: number[][];
|
|
6244
6590
|
/** Unrecognised graphicFrame extLst extensions, captured verbatim for round-trip. */
|
|
6245
6591
|
extensionXml?: PptxGraphicFrameExtension[];
|
|
6246
6592
|
}
|
|
@@ -6274,6 +6620,20 @@ interface ContentPartInkStroke {
|
|
|
6274
6620
|
* {@link tiltAngles}.
|
|
6275
6621
|
*/
|
|
6276
6622
|
tiltMagnitudes?: number[];
|
|
6623
|
+
/**
|
|
6624
|
+
* Which InkML channel pair {@link tiltAngles}/{@link tiltMagnitudes} were
|
|
6625
|
+
* decoded from: `'azimuthAltitude'` when the source declared `AZIMUTH`
|
|
6626
|
+
* (optionally paired with `ALTITUDE`); omitted (implying `OTx`/`OTy`, i.e.
|
|
6627
|
+
* `'vector'`) otherwise, including for tilt this library itself captured
|
|
6628
|
+
* from the Draw tool's `PointerEvent.tiltX`/`tiltY`.
|
|
6629
|
+
*
|
|
6630
|
+
* A save that has to rewrite this content part's InkML (see
|
|
6631
|
+
* `inkml-content-part-writer.ts`) uses this to re-declare the SAME channel
|
|
6632
|
+
* pair the file already used, rather than always converting to `OTx`/`OTy`;
|
|
6633
|
+
* the rendered lean is identical either way; only the written channel
|
|
6634
|
+
* NAMES differ.
|
|
6635
|
+
*/
|
|
6636
|
+
tiltEncoding?: 'vector' | 'azimuthAltitude';
|
|
6277
6637
|
}
|
|
6278
6638
|
/**
|
|
6279
6639
|
* A content-part element wrapped in `mc:AlternateContent`.
|
|
@@ -7108,17 +7468,28 @@ interface PptxNativeAnimation {
|
|
|
7108
7468
|
*/
|
|
7109
7469
|
afterEffect?: boolean;
|
|
7110
7470
|
/**
|
|
7111
|
-
* "After animation" end-state behaviour
|
|
7112
|
-
*
|
|
7113
|
-
*
|
|
7114
|
-
*
|
|
7115
|
-
*
|
|
7116
|
-
*
|
|
7117
|
-
*
|
|
7471
|
+
* "After animation" end-state behaviour: dim-to-colour, hide-after-
|
|
7472
|
+
* animation, or hide-on-next-click. Populated directly by the
|
|
7473
|
+
* native-timing parser (`native-animation-after-effect.ts`) when the
|
|
7474
|
+
* effect's `p:cTn/p:subTnLst` carries PowerPoint's genuine after-effect
|
|
7475
|
+
* shape, so a real-world deck's build shows up here even with no
|
|
7476
|
+
* `pptx:editorMeta`. `applyAfterAnimationFromEditorList` in
|
|
7477
|
+
* `pptx-viewer-shared` overrides this from the matching
|
|
7478
|
+
* {@link PptxElementAnimation.afterAnimation} entry when the editor's
|
|
7479
|
+
* per-element animation list has one (the model the animation panel
|
|
7480
|
+
* writes `afterAnimation` into), so an edit through our own UI always wins.
|
|
7118
7481
|
*/
|
|
7119
7482
|
afterAnimationAction?: PptxAfterAnimationAction;
|
|
7120
|
-
/** Dim-to color hex, present when {@link afterAnimationAction} is `dimToColor`. */
|
|
7483
|
+
/** Dim-to color hex, present when {@link afterAnimationAction} is `dimToColor` AND the dim target is an already-resolved `a:srgbClr`. */
|
|
7121
7484
|
afterAnimationColor?: string;
|
|
7485
|
+
/**
|
|
7486
|
+
* The typed theme reference when a `dimToColor` target is an `a:schemeClr`
|
|
7487
|
+
* (e.g. `accent2`) instead of `a:srgbClr`: this parse layer has no theme to
|
|
7488
|
+
* resolve it to sRGB with (see {@link afterAnimationColor}'s doc), so a
|
|
7489
|
+
* playback consumer resolves this against the deck's theme colour map.
|
|
7490
|
+
* Mutually exclusive with {@link afterAnimationColor} being set.
|
|
7491
|
+
*/
|
|
7492
|
+
afterAnimationColorRef?: PptxThemeColorRef;
|
|
7122
7493
|
/**
|
|
7123
7494
|
* Parsed `p:animEffect` filter descriptor. `presetId`/`presetClass` remain
|
|
7124
7495
|
* the primary effect selector (see `resolveEffect` in `pptx-viewer-shared`);
|
|
@@ -7250,13 +7621,46 @@ interface PptxAnimationKeyframe {
|
|
|
7250
7621
|
* fidelity; consumers may use it to drive computed animation values.
|
|
7251
7622
|
*/
|
|
7252
7623
|
fmla?: string;
|
|
7624
|
+
/**
|
|
7625
|
+
* The typed theme reference when a `p:val/p:clrVal` stop is an
|
|
7626
|
+
* `a:schemeClr` (e.g. `accent1`), including any `tint`/`shade`/`lumMod`/
|
|
7627
|
+
* `lumOff`/`alpha` children. {@link value} keeps the bare scheme name for
|
|
7628
|
+
* round-trip; a playback consumer needs this ref (resolved against the
|
|
7629
|
+
* deck's theme colour map) to turn the stop into a real CSS colour, which
|
|
7630
|
+
* the bare name alone cannot do. Absent for an `a:srgbClr` stop, whose
|
|
7631
|
+
* {@link value} is already a resolved `#rrggbb` hex string.
|
|
7632
|
+
*/
|
|
7633
|
+
colorRef?: PptxThemeColorRef;
|
|
7253
7634
|
}
|
|
7254
7635
|
/** One generic `p:anim` behaviour inside a composed PowerPoint effect. */
|
|
7255
7636
|
interface PptxAttributeAnimation {
|
|
7256
7637
|
/** Lowercased target attribute from `p:attrNameLst`. */
|
|
7257
7638
|
attrName: string;
|
|
7258
|
-
/**
|
|
7639
|
+
/**
|
|
7640
|
+
* Authored value stops from this behaviour's `p:tavLst`. Empty when the
|
|
7641
|
+
* behaviour instead uses the simpler `from`/`to`/`by` attribute form (see
|
|
7642
|
+
* below); at least one of `keyframes`, `from`/`to`, or `by` is present.
|
|
7643
|
+
*/
|
|
7259
7644
|
keyframes: PptxAnimationKeyframe[];
|
|
7645
|
+
/**
|
|
7646
|
+
* `p:anim/@_from` (a formula string, ECMA-376 S19.5.4 CT_TLAnimateBehavior):
|
|
7647
|
+
* the absolute starting value, used instead of `p:tavLst` when the
|
|
7648
|
+
* behaviour only has two endpoints. PowerPoint writes this form for some
|
|
7649
|
+
* built-in presets (e.g. "Grow And Turn"'s `ppt_x` fly-in): a bare
|
|
7650
|
+
* `p:anim from="..." to="..."` with no `p:tavLst` child at all. See
|
|
7651
|
+
* `animation-ppt-formula-ground-truth.md` in `pptx-viewer-shared` for the
|
|
7652
|
+
* real-PowerPoint sample this was found in.
|
|
7653
|
+
*/
|
|
7654
|
+
from?: string;
|
|
7655
|
+
/** `p:anim/@_to`: the absolute ending value. See {@link from}. */
|
|
7656
|
+
to?: string;
|
|
7657
|
+
/**
|
|
7658
|
+
* `p:anim/@_by`: a DELTA formula added to wherever the attribute already
|
|
7659
|
+
* stands (as opposed to `from`/`to`'s absolute values), typically paired
|
|
7660
|
+
* with `p:cBhvr/@_additive="sum"` so it composites with a sibling
|
|
7661
|
+
* behaviour driving the same attribute instead of replacing it.
|
|
7662
|
+
*/
|
|
7663
|
+
by?: string;
|
|
7260
7664
|
/** Duration from this behaviour's nested `p:cTn/@dur`. */
|
|
7261
7665
|
durationMs?: number;
|
|
7262
7666
|
/** Start offset from this behaviour's nested `p:stCondLst`. */
|
|
@@ -7265,8 +7669,11 @@ interface PptxAttributeAnimation {
|
|
|
7265
7669
|
* Interpolation mode from this behaviour's own `@_calcmode`
|
|
7266
7670
|
* (ST_TLAnimateBehaviorCalcMode, ECMA-376 S19.5.2): `discrete` snaps to
|
|
7267
7671
|
* each `p:tav` stop with no interpolation, `lin` (the OOXML default)
|
|
7268
|
-
* interpolates linearly
|
|
7269
|
-
*
|
|
7672
|
+
* interpolates linearly. `fmla` as the WHOLE behaviour's calc mode has
|
|
7673
|
+
* never been observed in a real PowerPoint file and is not consulted at
|
|
7674
|
+
* playback; what PowerPoint actually writes is `calcmode="lin"` with a
|
|
7675
|
+
* per-stop `p:tav/@fmla` (see {@link PptxAnimationKeyframe.fmla}), which
|
|
7676
|
+
* IS consulted regardless of this field's value. Absent means `lin`.
|
|
7270
7677
|
*/
|
|
7271
7678
|
calcMode?: 'discrete' | 'lin' | 'fmla';
|
|
7272
7679
|
}
|
|
@@ -7292,16 +7699,31 @@ interface PptxColorAnimation {
|
|
|
7292
7699
|
* companion to `@dir` for HSL colour-space animations.
|
|
7293
7700
|
*/
|
|
7294
7701
|
path?: string;
|
|
7295
|
-
/** Starting color as hex string. */
|
|
7702
|
+
/** Starting color as hex string, or the bare scheme name (e.g. `accent1`) for a theme colour; see {@link fromColorRef}. */
|
|
7296
7703
|
fromColor?: string;
|
|
7297
|
-
/** Ending color as hex string. */
|
|
7704
|
+
/** Ending color as hex string, or the bare scheme name; see {@link toColorRef}. */
|
|
7298
7705
|
toColor?: string;
|
|
7299
7706
|
/**
|
|
7300
|
-
* Color delta (for "by" animations) as hex string
|
|
7301
|
-
*
|
|
7302
|
-
*
|
|
7707
|
+
* Color delta (for "by" animations) as hex string, or the bare scheme name;
|
|
7708
|
+
* see {@link byColorRef}. For HSL colour-space animations this retains the
|
|
7709
|
+
* historical byte-packed compatibility value; consumers should prefer
|
|
7710
|
+
* {@link hslDelta}, which preserves signed values.
|
|
7303
7711
|
*/
|
|
7304
7712
|
byColor?: string;
|
|
7713
|
+
/**
|
|
7714
|
+
* The typed theme reference when {@link fromColor} is an `a:schemeClr`
|
|
7715
|
+
* (including `tint`/`shade`/`lumMod`/`lumOff`/`alpha`), so playback can
|
|
7716
|
+
* resolve it against the deck's theme colour map. Absent when `fromColor`
|
|
7717
|
+
* is already a resolved `#rrggbb` hex (an `a:srgbClr` stop).
|
|
7718
|
+
*/
|
|
7719
|
+
fromColorRef?: PptxThemeColorRef;
|
|
7720
|
+
/** The typed theme reference for {@link toColor}; see {@link fromColorRef}. */
|
|
7721
|
+
toColorRef?: PptxThemeColorRef;
|
|
7722
|
+
/**
|
|
7723
|
+
* The typed theme reference for {@link byColor} (RGB colour space only; an
|
|
7724
|
+
* HSL `by` is a signed delta, never a theme colour). See {@link fromColorRef}.
|
|
7725
|
+
*/
|
|
7726
|
+
byColorRef?: PptxThemeColorRef;
|
|
7305
7727
|
/**
|
|
7306
7728
|
* Typed HSL delta from `p:by/p:hsl`. This preserves signed values and their
|
|
7307
7729
|
* OOXML units without forcing them through the legacy byte-packed `byColor`
|
|
@@ -8514,13 +8936,13 @@ interface PptxSlide {
|
|
|
8514
8936
|
backgroundPattern?: PptxSlideBackgroundPattern;
|
|
8515
8937
|
/**
|
|
8516
8938
|
* `<p:bgPr/@shadeToTitle>`: boolean flag instructing the renderer to
|
|
8517
|
-
*
|
|
8518
|
-
*
|
|
8519
|
-
*
|
|
8939
|
+
* anchor the background gradient on the title placeholder as a
|
|
8940
|
+
* rectangular path gradient (COM-measured against real PowerPoint;
|
|
8941
|
+
* it does NOT recolour toward the title's text colour, despite the
|
|
8942
|
+
* attribute's name). Parsed and round-tripped here on the core model;
|
|
8943
|
+
* the actual visual effect is applied by `pptx-viewer-shared`'s
|
|
8520
8944
|
* `getSlideBackgroundStyle` (see `render/background-shade-to-title.ts`),
|
|
8521
|
-
* consumed by all five bindings, not by core itself.
|
|
8522
|
-
* docstring explains the approximation: no published ECMA-376 or
|
|
8523
|
-
* MS-ODRAWXML text documents the exact legacy blend. Legacy PowerPoint
|
|
8945
|
+
* consumed by all five bindings, not by core itself. Legacy PowerPoint
|
|
8524
8946
|
* 97-2003 hint, not observed in any real-world corpus file this project
|
|
8525
8947
|
* has collected and not settable from any modern PowerPoint UI; see
|
|
8526
8948
|
* `docs/guide/limitations.md`.
|
|
@@ -10616,6 +11038,23 @@ declare class PptxHandler extends PptxHandlerCore {
|
|
|
10616
11038
|
/** Supported merge shape operations (matching PowerPoint's Merge Shapes menu). */
|
|
10617
11039
|
type MergeShapeOperation = 'union' | 'intersect' | 'subtract' | 'fragment' | 'combine';
|
|
10618
11040
|
|
|
11041
|
+
//#region src/render/animation-text-style-resolve.d.ts
|
|
11042
|
+
/**
|
|
11043
|
+
* Framework-neutral text-style override a font-style emphasis effect applies
|
|
11044
|
+
* on top of its target's own authored per-run bold/italic/underline/size/
|
|
11045
|
+
* colour. Every binding maps this onto its own text container so it OVERRIDES
|
|
11046
|
+
* the runs' inline styles (the runs carry explicit inline styles of their
|
|
11047
|
+
* own, so plain CSS inheritance cannot reach them).
|
|
11048
|
+
*/
|
|
11049
|
+
interface TextStyleAnimationDescriptor {
|
|
11050
|
+
bold?: boolean;
|
|
11051
|
+
italic?: boolean;
|
|
11052
|
+
underline?: boolean;
|
|
11053
|
+
/** Relative multiplier against each run's own authored font size. */
|
|
11054
|
+
fontScale?: number;
|
|
11055
|
+
color?: string;
|
|
11056
|
+
}
|
|
11057
|
+
|
|
10619
11058
|
/** Viewer interaction mode: read-only, edit, presentation, or master-view. */
|
|
10620
11059
|
type ViewerMode = 'preview' | 'edit' | 'present' | 'master';
|
|
10621
11060
|
/**
|
|
@@ -10781,6 +11220,16 @@ interface CollaborationConfig {
|
|
|
10781
11220
|
*/
|
|
10782
11221
|
writeBackDebounceMs?: number;
|
|
10783
11222
|
}
|
|
11223
|
+
//#endregion
|
|
11224
|
+
//#region src/render/animation-timeline-build-descriptors.d.ts
|
|
11225
|
+
/**
|
|
11226
|
+
* `animation-timeline-build-descriptors` - staged-build (`p:bldChart` /
|
|
11227
|
+
* `p:bldDgm`) reveal descriptor types, split out of `animation-timeline-types`
|
|
11228
|
+
* to keep that module under the file-size limit. Re-exported from
|
|
11229
|
+
* `animation-timeline-types` so existing imports are unaffected.
|
|
11230
|
+
*
|
|
11231
|
+
* @module render/animation-timeline-build-descriptors
|
|
11232
|
+
*/
|
|
10784
11233
|
/**
|
|
10785
11234
|
* Normalized staged-reveal mode for a chart graphic frame, derived from the
|
|
10786
11235
|
* OOXML `a:bldChart/@bld` (or `p:bldOleChart/@bld`) token:
|
|
@@ -10814,12 +11263,12 @@ interface ChartRevealPoint {
|
|
|
10814
11263
|
* Playback-time chart reveal state derived from AUTHORED `p:graphicEl`
|
|
10815
11264
|
* indices (see `chart-reveal-descriptor`'s `resolveChartRevealDescriptor`),
|
|
10816
11265
|
* rather than from click-count/time progress. Present on
|
|
10817
|
-
* {@link ElementAnimationState.chartReveal}
|
|
10818
|
-
* chart-build step for the element carried index data;
|
|
10819
|
-
* this over the progress-based `build`/`ElementBuildState`
|
|
10820
|
-
* since it reflects the real authored reveal set (correct
|
|
10821
|
-
* reversed-order or gapped chart build), and falls back to `build`
|
|
10822
|
-
* absent.
|
|
11266
|
+
* {@link import('./animation-timeline-group').ElementAnimationState.chartReveal}
|
|
11267
|
+
* only when every fired chart-build step for the element carried index data;
|
|
11268
|
+
* a renderer prefers this over the progress-based `build`/`ElementBuildState`
|
|
11269
|
+
* path when present, since it reflects the real authored reveal set (correct
|
|
11270
|
+
* even for a reversed-order or gapped chart build), and falls back to `build`
|
|
11271
|
+
* when absent.
|
|
10823
11272
|
*/
|
|
10824
11273
|
interface ChartRevealDescriptor {
|
|
10825
11274
|
/**
|
|
@@ -10840,12 +11289,13 @@ interface ChartRevealDescriptor {
|
|
|
10840
11289
|
* Playback-time SmartArt diagram reveal state derived from AUTHORED
|
|
10841
11290
|
* `p:graphicEl/p:dgm/@id` indices (see `diagram-reveal-descriptor`'s
|
|
10842
11291
|
* `resolveDiagramRevealDescriptor`), rather than from click-count/time
|
|
10843
|
-
* progress. Present on
|
|
10844
|
-
*
|
|
10845
|
-
*
|
|
10846
|
-
*
|
|
10847
|
-
*
|
|
10848
|
-
*
|
|
11292
|
+
* progress. Present on
|
|
11293
|
+
* {@link import('./animation-timeline-group').ElementAnimationState.diagramReveal}
|
|
11294
|
+
* only when every fired diagram-build step for the element carried
|
|
11295
|
+
* `p:graphicEl` data. A SmartArt renderer prefers this over the
|
|
11296
|
+
* progress-based `build` / {@link ElementBuildState} path when present, since
|
|
11297
|
+
* it reflects the real authored reveal set (correct even for a
|
|
11298
|
+
* reversed-order or by-branch build), and falls back to `build` when absent.
|
|
10849
11299
|
*/
|
|
10850
11300
|
interface DiagramRevealDescriptor {
|
|
10851
11301
|
/**
|
|
@@ -10858,9 +11308,11 @@ interface DiagramRevealDescriptor {
|
|
|
10858
11308
|
nodeIds: ReadonlySet<string>;
|
|
10859
11309
|
}
|
|
10860
11310
|
/**
|
|
10861
|
-
* Playback-time staged-build state surfaced on
|
|
10862
|
-
*
|
|
10863
|
-
*
|
|
11311
|
+
* Playback-time staged-build state surfaced on
|
|
11312
|
+
* {@link import('./animation-timeline-group').ElementAnimationState}.
|
|
11313
|
+
* `progress` is the 0..1 fraction of the build revealed at the current
|
|
11314
|
+
* playback time; a consumer maps it to its own item COUNT (see
|
|
11315
|
+
* `revealedStageCount`).
|
|
10864
11316
|
*/
|
|
10865
11317
|
type ElementBuildState = {
|
|
10866
11318
|
kind: 'chart';
|
|
@@ -10921,6 +11373,18 @@ interface ElementAnimationState {
|
|
|
10921
11373
|
* `stroke: inherit`. Absent/false means no active stroke-colour animation.
|
|
10922
11374
|
*/
|
|
10923
11375
|
animatesStroke?: boolean;
|
|
11376
|
+
/**
|
|
11377
|
+
* Active discrete font-style / colour / size override (see
|
|
11378
|
+
* {@link import('./animation-timeline-step').TimelineStep.textStyle}) a
|
|
11379
|
+
* font-style emphasis effect currently applies to this element's text,
|
|
11380
|
+
* OVERRIDING the runs' own inline bold/italic/underline/size/colour.
|
|
11381
|
+
* `animation-playback-engine.ts` writes this on step start and again on
|
|
11382
|
+
* cleanup (held in full when the effect's `p:cTn/@fill` holds its end
|
|
11383
|
+
* state, otherwise reverted); a text renderer maps it onto its run markup
|
|
11384
|
+
* via `buildTextStyleOverrideCss` (`animation-text-style-css.ts`). Absent
|
|
11385
|
+
* means no font-style emphasis effect is currently active on this element.
|
|
11386
|
+
*/
|
|
11387
|
+
textStyle?: TextStyleAnimationDescriptor;
|
|
10924
11388
|
}
|
|
10925
11389
|
//#endregion
|
|
10926
11390
|
//#region src/render/motion-path-authoring.d.ts
|
|
@@ -11836,6 +12300,16 @@ interface ReadOnlyRecommendation {
|
|
|
11836
12300
|
readonly messageKey: string;
|
|
11837
12301
|
/** Whether a binding's "read-only" toggle should default to on. */
|
|
11838
12302
|
readonly defaultReadOnly: boolean;
|
|
12303
|
+
/**
|
|
12304
|
+
* Whether lifting this recommendation requires a correct password, rather
|
|
12305
|
+
* than a plain "Edit anyway". True only for a `modifyVerifier` that carries
|
|
12306
|
+
* a hash this viewer can actually check (`hashData` + `saltData` +
|
|
12307
|
+
* `algorithmName`, see `checkModifyPassword`). "Mark as Final" is purely
|
|
12308
|
+
* advisory and never requires one, and a `modifyVerifier` missing pieces of
|
|
12309
|
+
* its hash cannot be verified either way, so both fall back to the plain
|
|
12310
|
+
* "Edit anyway" a binding already had.
|
|
12311
|
+
*/
|
|
12312
|
+
readonly requiresPassword: boolean;
|
|
11839
12313
|
}
|
|
11840
12314
|
interface CompatibilityWarningToast {
|
|
11841
12315
|
/** Stable per-code id, since toasts are deduped by code (see module docs). */
|
|
@@ -12884,6 +13358,15 @@ interface UseYjsDocumentSyncInput {
|
|
|
12884
13358
|
* when role === 'owner' and onWriteBack is set.
|
|
12885
13359
|
*/
|
|
12886
13360
|
getSourceBytes?: () => Uint8Array | null;
|
|
13361
|
+
/**
|
|
13362
|
+
* Session-level save options (view properties, table styles, tags, deck
|
|
13363
|
+
* properties, ...), built the same way as the Save/Export path
|
|
13364
|
+
* (`buildDeckSaveOptions` in `pptx-viewer-shared`). Without this the
|
|
13365
|
+
* write-back reloaded the source bytes and called `handler.save(slides)`
|
|
13366
|
+
* with NO options, so an owner's write-back file dropped every
|
|
13367
|
+
* session-level edit that lives outside `slides`.
|
|
13368
|
+
*/
|
|
13369
|
+
getSaveOptions?: () => PptxHandlerSaveOptions;
|
|
12887
13370
|
/**
|
|
12888
13371
|
* Monotonic counter bumped each time the content-load pipeline finishes
|
|
12889
13372
|
* applying a parsed deck to viewer state. A local load that lands while the
|
|
@@ -12900,7 +13383,7 @@ interface UseYjsDocumentSyncInput {
|
|
|
12900
13383
|
*/
|
|
12901
13384
|
loadOrigin?: CollabLoadOrigin;
|
|
12902
13385
|
}
|
|
12903
|
-
declare function useYjsDocumentSync({ doc, slides, templateElementsBySlideId, setSlides, isConnected, isSynced, config, getSourceBytes, loadVersion, loadOrigin }: UseYjsDocumentSyncInput): void;
|
|
13386
|
+
declare function useYjsDocumentSync({ doc, slides, templateElementsBySlideId, setSlides, isConnected, isSynced, config, getSourceBytes, getSaveOptions, loadVersion, loadOrigin }: UseYjsDocumentSyncInput): void;
|
|
12904
13387
|
//#endregion
|
|
12905
13388
|
//#region src/viewer/hooks/collaboration/useBroadcastFollower.d.ts
|
|
12906
13389
|
interface UseBroadcastFollowerInput {
|
|
@@ -13107,6 +13590,18 @@ interface UsePresentationModeInput {
|
|
|
13107
13590
|
*/
|
|
13108
13591
|
templateElementsBySlideId?: Record<string, PptxElement[]>;
|
|
13109
13592
|
visibleSlideIndexes: number[];
|
|
13593
|
+
/**
|
|
13594
|
+
* The slide canvas size (px), in the same unit the elements' own
|
|
13595
|
+
* `x`/`y`/`width`/`height` are authored in. Threaded to `useAnimationPlayback`
|
|
13596
|
+
* so a `p:anim` formula that needs the animated shape's real box (e.g. Grow
|
|
13597
|
+
* And Turn's `-#ppt_w/2` fly-in) can be resolved instead of falling back.
|
|
13598
|
+
*/
|
|
13599
|
+
canvasSize?: {
|
|
13600
|
+
width: number;
|
|
13601
|
+
height: number;
|
|
13602
|
+
};
|
|
13603
|
+
/** The deck's resolved theme colour map, for a scheme-colour (`a:schemeClr`) animation stop. */
|
|
13604
|
+
themeColorMap?: Readonly<Record<string, string>>;
|
|
13110
13605
|
activeSlideIndex: number;
|
|
13111
13606
|
containerRef: React.RefObject<HTMLElement | null>;
|
|
13112
13607
|
/** Raw PPTX bytes: forwarded to audience window for content sharing. */
|
|
@@ -13602,6 +14097,16 @@ interface ViewerCoreState {
|
|
|
13602
14097
|
/** Parsed table style definitions from `ppt/tableStyles.xml`. */
|
|
13603
14098
|
tableStyleMap: ParsedTableStyleMap | undefined;
|
|
13604
14099
|
setTableStyleMap: React$1.Dispatch<React$1.SetStateAction<ParsedTableStyleMap | undefined>>;
|
|
14100
|
+
/** `ppt/tableStyles.xml`'s `<a:tblStyleLst @def>` default style GUID. */
|
|
14101
|
+
tableStylesDefaultId: string | undefined;
|
|
14102
|
+
setTableStylesDefaultId: React$1.Dispatch<React$1.SetStateAction<string | undefined>>;
|
|
14103
|
+
/**
|
|
14104
|
+
* Style GUIDs deleted from `tableStyleMap` via the table style editor,
|
|
14105
|
+
* pending removal from `ppt/tableStyles.xml` on the next save. See
|
|
14106
|
+
* `tableStyleSaveOptions` / `applyTableStyleDelete` in `pptx-viewer-shared`.
|
|
14107
|
+
*/
|
|
14108
|
+
tableStylesToDelete: string[];
|
|
14109
|
+
setTableStylesToDelete: React$1.Dispatch<React$1.SetStateAction<string[]>>;
|
|
13605
14110
|
/** Available theme presets the user can switch between. */
|
|
13606
14111
|
themeOptions: PptxThemeOption[];
|
|
13607
14112
|
setThemeOptions: React$1.Dispatch<React$1.SetStateAction<PptxThemeOption[]>>;
|
|
@@ -13851,6 +14356,8 @@ interface UseLoadContentInput {
|
|
|
13851
14356
|
setRecentColors: React.Dispatch<React.SetStateAction<string[]>>;
|
|
13852
14357
|
setTheme: React.Dispatch<React.SetStateAction<PptxTheme | undefined>>;
|
|
13853
14358
|
setTableStyleMap: React.Dispatch<React.SetStateAction<ParsedTableStyleMap | undefined>>;
|
|
14359
|
+
setTableStylesDefaultId: React.Dispatch<React.SetStateAction<string | undefined>>;
|
|
14360
|
+
setTableStylesToDelete: React.Dispatch<React.SetStateAction<string[]>>;
|
|
13854
14361
|
setThemeOptions: React.Dispatch<React.SetStateAction<PptxThemeOption[]>>;
|
|
13855
14362
|
setCustomShows: React.Dispatch<React.SetStateAction<PptxCustomShow[]>>;
|
|
13856
14363
|
/**
|
|
@@ -13881,6 +14388,12 @@ interface UseLoadContentInput {
|
|
|
13881
14388
|
}>>>;
|
|
13882
14389
|
/** Whether the loaded deck recommends opening read-only (`p:modifyVerifier` / "Mark as Final"). */
|
|
13883
14390
|
setReadOnlyRecommendation: React.Dispatch<React.SetStateAction<ReadOnlyRecommendation>>;
|
|
14391
|
+
/**
|
|
14392
|
+
* The deck's raw `p:modifyVerifier`, kept alongside the recommendation
|
|
14393
|
+
* above so the read-only banner's password prompt can check a candidate
|
|
14394
|
+
* password against it (`checkModifyPassword`, `pptx-viewer-shared`).
|
|
14395
|
+
*/
|
|
14396
|
+
setModifyVerifier: React.Dispatch<React.SetStateAction<PptxModifyVerifier | undefined>>;
|
|
13884
14397
|
/** Deck + slide compatibility-warning toast stack for this load. */
|
|
13885
14398
|
setCompatToasts: React.Dispatch<React.SetStateAction<CompatibilityWarningToast[]>>;
|
|
13886
14399
|
setLoading: React.Dispatch<React.SetStateAction<boolean>>;
|
|
@@ -13904,7 +14417,7 @@ interface UseLoadContentInput {
|
|
|
13904
14417
|
interface UseLoadContentResult {
|
|
13905
14418
|
handlerRef: React.MutableRefObject<PptxHandler | null>;
|
|
13906
14419
|
}
|
|
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;
|
|
14420
|
+
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, setModifyVerifier, setCompatToasts, setLoading, setError, setIsDirty, setIsEncrypted, onContentApplied, allowExternalImages }: UseLoadContentInput): UseLoadContentResult;
|
|
13908
14421
|
//#endregion
|
|
13909
14422
|
//#region src/viewer/hooks/useElementOperations.d.ts
|
|
13910
14423
|
/**
|
|
@@ -14315,6 +14828,105 @@ type TableOperationHandlers = TableStructHandlers & TableMergeHandlers;
|
|
|
14315
14828
|
//#region src/viewer/hooks/useTableOperations.d.ts
|
|
14316
14829
|
declare function useTableOperations(input: UseTableOperationsInput): TableOperationHandlers;
|
|
14317
14830
|
//#endregion
|
|
14831
|
+
//#region src/viewer/hooks/useSerialize.d.ts
|
|
14832
|
+
interface UseSerializeInput {
|
|
14833
|
+
slides: PptxSlide[];
|
|
14834
|
+
/** Separated master/layout (template) elements, merged back at save time. */
|
|
14835
|
+
templateElementsBySlideId: Record<string, PptxElement[]>;
|
|
14836
|
+
activeSlideIndex: number;
|
|
14837
|
+
/** The pixel canvas the raw Slide Size W/H inputs edit. */
|
|
14838
|
+
canvasSize: CanvasSize;
|
|
14839
|
+
/**
|
|
14840
|
+
* The EMU `p:sldSz` the viewer is holding (seeded on load, replaced by a
|
|
14841
|
+
* preset/orientation pick). Passed with `canvasSize` to
|
|
14842
|
+
* `resolveSlideSizeSelection`, which keeps the EMU whenever the two still
|
|
14843
|
+
* agree so a preset survives the save, and takes the pixels when the user
|
|
14844
|
+
* has typed into the raw inputs.
|
|
14845
|
+
*/
|
|
14846
|
+
slideSizeEmu?: SlideSizeEmu | undefined;
|
|
14847
|
+
guides: Array<{
|
|
14848
|
+
id: string;
|
|
14849
|
+
axis: 'h' | 'v';
|
|
14850
|
+
position: number;
|
|
14851
|
+
}>;
|
|
14852
|
+
headerFooter: PptxHeaderFooter;
|
|
14853
|
+
presentationProperties: PptxPresentationProperties;
|
|
14854
|
+
/**
|
|
14855
|
+
* `ppt/viewProps.xml` (grid/snap/guides toggles, grid spacing). Optional so
|
|
14856
|
+
* existing callers/tests that construct this input directly keep compiling;
|
|
14857
|
+
* omitting it (or passing `undefined`) reproduces the PRE-EXISTING bug this
|
|
14858
|
+
* field fixes: core falls back to `this.loadedViewProperties` (the file as
|
|
14859
|
+
* it was FIRST opened) whenever the caller does not pass `viewProperties`
|
|
14860
|
+
* explicitly, so every session change to the View-ribbon toggles was
|
|
14861
|
+
* silently dropped. `useContentLifecycle` always passes `state.viewProperties`.
|
|
14862
|
+
*/
|
|
14863
|
+
viewProperties?: PptxViewProperties | undefined;
|
|
14864
|
+
/** Parsed `ppt/tableStyles.xml` map, edited via the table style editor. */
|
|
14865
|
+
tableStyleMap?: ParsedTableStyleMap | undefined;
|
|
14866
|
+
/** `<a:tblStyleLst @def>` default style GUID. */
|
|
14867
|
+
tableStylesDefaultId?: string | undefined;
|
|
14868
|
+
/** Style GUIDs deleted via the table style editor, pending removal on save. */
|
|
14869
|
+
tableStylesToDelete?: string[];
|
|
14870
|
+
customShows: Array<{
|
|
14871
|
+
id: string;
|
|
14872
|
+
name: string;
|
|
14873
|
+
slideRIds: string[];
|
|
14874
|
+
}>;
|
|
14875
|
+
sections: PptxSection[];
|
|
14876
|
+
coreProperties: PptxCoreProperties | undefined;
|
|
14877
|
+
appProperties: PptxAppProperties | undefined;
|
|
14878
|
+
customProperties: PptxCustomProperty[];
|
|
14879
|
+
tagCollections: PptxTagCollection[];
|
|
14880
|
+
/**
|
|
14881
|
+
* The slide masters and their layouts, as View > Slide Master left them.
|
|
14882
|
+
*
|
|
14883
|
+
* Required, not optional: this was the one save option React never passed,
|
|
14884
|
+
* and core rewrites a master or layout part only for the ones the caller
|
|
14885
|
+
* hands back. Every master-view edit therefore showed on screen and was
|
|
14886
|
+
* dropped by the save - a deleted master shape came back on reload, and a
|
|
14887
|
+
* master background reverted to white. The other four bindings pass it.
|
|
14888
|
+
* Core compares each part against the element list parsed at load and
|
|
14889
|
+
* rewrites only what actually changed, so passing the whole array on every
|
|
14890
|
+
* save costs an untouched deck nothing.
|
|
14891
|
+
*/
|
|
14892
|
+
slideMasters: PptxSlideMaster[];
|
|
14893
|
+
notesMaster: PptxNotesMaster | undefined;
|
|
14894
|
+
handoutMaster: PptxHandoutMaster | undefined;
|
|
14895
|
+
handlerRef: React$1.RefObject<PptxHandler | null>;
|
|
14896
|
+
inlineEditingElementIdRef: React$1.MutableRefObject<string | null>;
|
|
14897
|
+
inlineEditingTextRef: React$1.MutableRefObject<string>;
|
|
14898
|
+
password?: string;
|
|
14899
|
+
/**
|
|
14900
|
+
* File > Fonts > "Embed fonts in the file". `false` passes
|
|
14901
|
+
* `embeddedFontList: null`, which strips `p:embeddedFontLst`, the `/font`
|
|
14902
|
+
* relationships and the `.fntdata` parts; `true` (the default) leaves core to
|
|
14903
|
+
* re-embed whatever the deck arrived with. Before this the toggle reached no
|
|
14904
|
+
* save call at all and the saved bytes were identical either way.
|
|
14905
|
+
*/
|
|
14906
|
+
embedFonts?: boolean;
|
|
14907
|
+
/**
|
|
14908
|
+
* Why these bytes are being produced. Defaults to `'user-file'` (Save, Save
|
|
14909
|
+
* As, Export, the imperative `getContent()`), which honours `password`.
|
|
14910
|
+
* `'recovery-snapshot'` is for bytes the viewer reads back itself - the
|
|
14911
|
+
* autosave snapshot and the re-serialise-then-reload cycle - and is always
|
|
14912
|
+
* plaintext, because nothing on the way back in can supply the password.
|
|
14913
|
+
* See `deck-save-encryption` in `pptx-viewer-shared` for the full rationale
|
|
14914
|
+
* and the privacy tradeoff it accepts.
|
|
14915
|
+
*/
|
|
14916
|
+
purpose?: DeckSavePurpose;
|
|
14917
|
+
}
|
|
14918
|
+
/**
|
|
14919
|
+
* Serialise the live deck. `format` is the container to write (`pptx` when
|
|
14920
|
+
* omitted; `ppsx`/`pptm`/... for Save As). Every save path in the binding
|
|
14921
|
+
* (Save, Save As, `getContent()`, autosave, the theme-apply round trip) goes
|
|
14922
|
+
* through this ONE function so they cannot drift: Save As used to hand-build
|
|
14923
|
+
* its own options object and left out `viewProperties`, the table-style map
|
|
14924
|
+
* and `embedFonts`, so a table style edited in the inspector reached the
|
|
14925
|
+
* imperative `getContent()` bytes and NOT the file the user downloaded.
|
|
14926
|
+
*/
|
|
14927
|
+
type SerializeSlides = (format?: PptxSaveFormat) => Promise<Uint8Array | null>;
|
|
14928
|
+
declare function useSerialize(input: UseSerializeInput): SerializeSlides;
|
|
14929
|
+
//#endregion
|
|
14318
14930
|
//#region src/viewer/hooks/export-handler-types.d.ts
|
|
14319
14931
|
interface UseExportHandlersInput {
|
|
14320
14932
|
slides: PptxSlide[];
|
|
@@ -14325,46 +14937,33 @@ interface UseExportHandlersInput {
|
|
|
14325
14937
|
filePath: string | undefined;
|
|
14326
14938
|
canvasStageRef: RefObject<HTMLDivElement | null>;
|
|
14327
14939
|
setActiveSlideIndex: Dispatch<SetStateAction<number>>;
|
|
14328
|
-
|
|
14329
|
-
|
|
14330
|
-
|
|
14331
|
-
|
|
14940
|
+
/**
|
|
14941
|
+
* The binding's one user-facing serialiser (`useSerialize`), which Save As
|
|
14942
|
+
* calls with the chosen output format. Save As no longer assembles its own
|
|
14943
|
+
* save options, so it cannot drift from Save again.
|
|
14944
|
+
*/
|
|
14945
|
+
serializeSlides: SerializeSlides;
|
|
14946
|
+
/** Presentation-level state carried into the deck-JSON export document. */
|
|
14947
|
+
headerFooter: PptxHeaderFooter;
|
|
14948
|
+
presentationProperties: PptxPresentationProperties;
|
|
14332
14949
|
customShows: Array<{
|
|
14333
14950
|
id: string;
|
|
14334
14951
|
name: string;
|
|
14335
14952
|
slideRIds: string[];
|
|
14336
14953
|
}>;
|
|
14337
|
-
sections:
|
|
14338
|
-
|
|
14339
|
-
|
|
14340
|
-
|
|
14341
|
-
|
|
14342
|
-
|
|
14343
|
-
|
|
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;
|
|
14954
|
+
sections: PptxSection[];
|
|
14955
|
+
coreProperties: PptxCoreProperties | undefined;
|
|
14956
|
+
appProperties: PptxAppProperties | undefined;
|
|
14957
|
+
customProperties: PptxCustomProperty[];
|
|
14958
|
+
tagCollections: PptxTagCollection[];
|
|
14959
|
+
notesMaster: PptxNotesMaster | undefined;
|
|
14960
|
+
handoutMaster: PptxHandoutMaster | undefined;
|
|
14357
14961
|
/** Live theme, carried into the deck-JSON export document. */
|
|
14358
14962
|
theme: PptxTheme | undefined;
|
|
14359
14963
|
/** Slide canvas size in CSS pixels, carried into the deck-JSON export. */
|
|
14360
14964
|
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
|
-
*/
|
|
14965
|
+
/** The EMU `p:sldSz` the viewer holds, for the deck-JSON export's slide size. */
|
|
14366
14966
|
slideSizeEmu?: SlideSizeEmu | undefined;
|
|
14367
|
-
password?: string;
|
|
14368
14967
|
/**
|
|
14369
14968
|
* File > Options > Advanced > "Image Size and Quality"
|
|
14370
14969
|
* (`resolveImageResolutionScale`), the raster-scale multiplier for PNG/PDF
|
|
@@ -14758,89 +15357,6 @@ interface AnnotationHandlersResult {
|
|
|
14758
15357
|
}
|
|
14759
15358
|
declare function useAnnotationHandlers(input: UseAnnotationHandlersInput): AnnotationHandlersResult;
|
|
14760
15359
|
//#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
15360
|
//#region src/viewer/hooks/useRecoveryDetection.d.ts
|
|
14845
15361
|
interface UseRecoveryDetectionInput {
|
|
14846
15362
|
filePath: string | undefined;
|
|
@@ -14875,6 +15391,18 @@ interface UsePresentationSetupInput {
|
|
|
14875
15391
|
/** Master/layout shapes painted beneath each slide, by slide id (see `usePresentationMode`). */
|
|
14876
15392
|
templateElementsBySlideId?: Record<string, PptxElement[]>;
|
|
14877
15393
|
visibleSlideIndexes: number[];
|
|
15394
|
+
/**
|
|
15395
|
+
* The slide canvas size (px), in the same unit the elements' own
|
|
15396
|
+
* `x`/`y`/`width`/`height` are authored in. Threaded to `useAnimationPlayback`
|
|
15397
|
+
* so a `p:anim` formula that needs the animated shape's real box (e.g. Grow
|
|
15398
|
+
* And Turn's `-#ppt_w/2` fly-in) can be resolved instead of falling back.
|
|
15399
|
+
*/
|
|
15400
|
+
canvasSize?: {
|
|
15401
|
+
width: number;
|
|
15402
|
+
height: number;
|
|
15403
|
+
};
|
|
15404
|
+
/** The deck's resolved theme colour map, for a scheme-colour (`a:schemeClr`) animation stop. */
|
|
15405
|
+
themeColorMap?: Readonly<Record<string, string>>;
|
|
14878
15406
|
activeSlideIndex: number;
|
|
14879
15407
|
containerRef: React.RefObject<HTMLElement | null>;
|
|
14880
15408
|
/** Raw PPTX bytes: forwarded to audience window for content sharing. */
|
|
@@ -14985,7 +15513,11 @@ interface UseIOHandlersInput {
|
|
|
14985
15513
|
canvasStageRef: React$1.RefObject<HTMLDivElement | null>;
|
|
14986
15514
|
};
|
|
14987
15515
|
handlerRef: React$1.RefObject<PptxHandler | null>;
|
|
14988
|
-
|
|
15516
|
+
/**
|
|
15517
|
+
* The one user-facing serialiser (`useSerialize`). Save As passes it the
|
|
15518
|
+
* output format, so the downloaded file carries every save option Save does.
|
|
15519
|
+
*/
|
|
15520
|
+
serializeSlides: SerializeSlides;
|
|
14989
15521
|
/**
|
|
14990
15522
|
* Plaintext serialisation for bytes the viewer feeds straight back into its
|
|
14991
15523
|
* own loader. "Apply theme" does exactly that, and the loader has no password
|
|
@@ -14994,7 +15526,6 @@ interface UseIOHandlersInput {
|
|
|
14994
15526
|
serializeForRecovery: () => Promise<Uint8Array | null>;
|
|
14995
15527
|
setContent: React$1.Dispatch<React$1.SetStateAction<ArrayBuffer | Uint8Array | null>>;
|
|
14996
15528
|
onContentChange: ((content: Uint8Array) => void) | undefined;
|
|
14997
|
-
password?: string;
|
|
14998
15529
|
/** File > Options > Advanced > "Image Size and Quality" raster-scale multiplier. */
|
|
14999
15530
|
imageExportScale?: number;
|
|
15000
15531
|
}
|
|
@@ -15040,13 +15571,18 @@ interface UseContentLifecycleInput {
|
|
|
15040
15571
|
allowExternalImages?: boolean;
|
|
15041
15572
|
/** Forwarded to {@link useLoadContent}: see `useReadOnlyRecommendationState`. */
|
|
15042
15573
|
setReadOnlyRecommendation: React$1.Dispatch<React$1.SetStateAction<ReadOnlyRecommendation>>;
|
|
15574
|
+
/** Forwarded to {@link useLoadContent}: see `useReadOnlyRecommendationState`. */
|
|
15575
|
+
setModifyVerifier: React$1.Dispatch<React$1.SetStateAction<PptxModifyVerifier | undefined>>;
|
|
15043
15576
|
/** Forwarded to {@link useLoadContent}: see `useCompatibilityToastsState`. */
|
|
15044
15577
|
setCompatToasts: React$1.Dispatch<React$1.SetStateAction<CompatibilityWarningToast[]>>;
|
|
15045
15578
|
}
|
|
15046
15579
|
interface ContentLifecycleResult {
|
|
15047
15580
|
handlerRef: React$1.RefObject<PptxHandler | null>;
|
|
15048
|
-
/**
|
|
15049
|
-
|
|
15581
|
+
/**
|
|
15582
|
+
* Serialise for the user: honours "Encrypt with Password". Takes the
|
|
15583
|
+
* optional output container (`ppsx`/`pptm`/...) so Save As shares it.
|
|
15584
|
+
*/
|
|
15585
|
+
serializeSlides: SerializeSlides;
|
|
15050
15586
|
/**
|
|
15051
15587
|
* Serialise for bytes the viewer reads back itself (autosave snapshot,
|
|
15052
15588
|
* re-serialise-then-reload). Always plaintext, so recovery - which has no
|
|
@@ -15117,6 +15653,8 @@ interface UseViewerIntegrationInput {
|
|
|
15117
15653
|
allowExternalImages?: boolean;
|
|
15118
15654
|
/** Forwarded to `useContentLifecycle` -> `useLoadContent`: see `useReadOnlyRecommendationState`. */
|
|
15119
15655
|
setReadOnlyRecommendation: Dispatch<SetStateAction<ReadOnlyRecommendation>>;
|
|
15656
|
+
/** Forwarded to `useContentLifecycle` -> `useLoadContent`: see `useReadOnlyRecommendationState`. */
|
|
15657
|
+
setModifyVerifier: Dispatch<SetStateAction<PptxModifyVerifier | undefined>>;
|
|
15120
15658
|
/** Forwarded to `useContentLifecycle` -> `useLoadContent`: see `useCompatibilityToastsState`. */
|
|
15121
15659
|
setCompatToasts: Dispatch<SetStateAction<CompatibilityWarningToast[]>>;
|
|
15122
15660
|
canEdit: boolean;
|
|
@@ -15443,51 +15981,46 @@ interface UseDialogCustomShowsResult {
|
|
|
15443
15981
|
declare function useDialogCustomShows(input: UseDialogCustomShowsInput): UseDialogCustomShowsResult;
|
|
15444
15982
|
//#endregion
|
|
15445
15983
|
//#region src/viewer/hooks/useExportSaveAs.d.ts
|
|
15984
|
+
/**
|
|
15985
|
+
* useExportSaveAs: Save-As format handlers and the deck-JSON export.
|
|
15986
|
+
*
|
|
15987
|
+
* Save As is `useSerialize` with an output format. It used to assemble a
|
|
15988
|
+
* SECOND save-options object of its own, and every option added to
|
|
15989
|
+
* `useSerialize` afterwards (`viewProperties`, the table-style map and its
|
|
15990
|
+
* default id / deletions, `embedFonts`) was missing from it: a table style
|
|
15991
|
+
* edited in the inspector reached `getContent()` and autosave, but the file
|
|
15992
|
+
* the backstage Save button downloaded came back with `ppt/tableStyles.xml`
|
|
15993
|
+
* byte-identical to the original. The other four bindings route the format
|
|
15994
|
+
* through their main builder; React now does too.
|
|
15995
|
+
*/
|
|
15446
15996
|
interface UseExportSaveAsInput {
|
|
15447
15997
|
slides: PptxSlide[];
|
|
15448
15998
|
/** Separated master/layout (template) elements, merged back at save time. */
|
|
15449
15999
|
templateElementsBySlideId: Record<string, PptxElement[]>;
|
|
15450
16000
|
filePath: string | undefined;
|
|
15451
|
-
|
|
15452
|
-
|
|
15453
|
-
|
|
16001
|
+
/** `useSerialize`'s callback: the one place save options are assembled. */
|
|
16002
|
+
serializeSlides: SerializeSlides;
|
|
16003
|
+
/** Presentation-level state, carried into the deck-JSON export document. */
|
|
16004
|
+
headerFooter: PptxHeaderFooter;
|
|
16005
|
+
presentationProperties: PptxPresentationProperties;
|
|
15454
16006
|
customShows: Array<{
|
|
15455
16007
|
id: string;
|
|
15456
16008
|
name: string;
|
|
15457
16009
|
slideRIds: string[];
|
|
15458
16010
|
}>;
|
|
15459
|
-
sections:
|
|
15460
|
-
|
|
15461
|
-
|
|
15462
|
-
|
|
15463
|
-
|
|
15464
|
-
|
|
15465
|
-
|
|
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;
|
|
16011
|
+
sections: PptxSection[];
|
|
16012
|
+
coreProperties: PptxCoreProperties | undefined;
|
|
16013
|
+
appProperties: PptxAppProperties | undefined;
|
|
16014
|
+
customProperties: PptxCustomProperty[];
|
|
16015
|
+
tagCollections: PptxTagCollection[];
|
|
16016
|
+
notesMaster: PptxNotesMaster | undefined;
|
|
16017
|
+
handoutMaster: PptxHandoutMaster | undefined;
|
|
15484
16018
|
/** Live theme, carried into the deck-JSON export document. */
|
|
15485
16019
|
theme: PptxTheme | undefined;
|
|
15486
16020
|
/** Slide canvas size in CSS pixels, carried into the deck-JSON export. */
|
|
15487
16021
|
canvasSize: CanvasSize;
|
|
15488
16022
|
/** The EMU `p:sldSz` the viewer holds; see `UseExportHandlersInput`. */
|
|
15489
16023
|
slideSizeEmu?: SlideSizeEmu | undefined;
|
|
15490
|
-
password?: string;
|
|
15491
16024
|
}
|
|
15492
16025
|
interface ExportSaveAsResult {
|
|
15493
16026
|
handleExportJson: () => void;
|
|
@@ -15622,6 +16155,18 @@ interface UseAnimationPlaybackInput {
|
|
|
15622
16155
|
onPlayActionSound?: (soundPath: string) => void;
|
|
15623
16156
|
/** When false, all animations are skipped (elements shown immediately). */
|
|
15624
16157
|
showWithAnimation?: boolean;
|
|
16158
|
+
/**
|
|
16159
|
+
* The slide canvas size (px), in the same unit the elements' own
|
|
16160
|
+
* `x`/`y`/`width`/`height` are authored in. Lets `PresentationAnimationController
|
|
16161
|
+
* .fromSlide` resolve a `p:anim` formula that needs the animated shape's real
|
|
16162
|
+
* box (e.g. Grow And Turn's `-#ppt_w/2` fly-in) instead of falling back.
|
|
16163
|
+
*/
|
|
16164
|
+
canvasSize?: {
|
|
16165
|
+
width: number;
|
|
16166
|
+
height: number;
|
|
16167
|
+
};
|
|
16168
|
+
/** The deck's resolved theme colour map, for a scheme-colour (`a:schemeClr`) animation stop. */
|
|
16169
|
+
themeColorMap?: Readonly<Record<string, string>>;
|
|
15625
16170
|
}
|
|
15626
16171
|
/** How a slide's animation timeline should be seeded when it becomes active. */
|
|
15627
16172
|
interface SeedSlideAnimationOptions {
|