pptx-react-viewer 3.8.0 → 3.10.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 +16 -0
- package/dist/{AiChatPanel-A5DCEHTO.mjs → AiChatPanel-BQSUE2OO.mjs} +4 -4
- package/dist/AiChatPanel-BQSUE2OO.mjs.br +0 -0
- package/dist/AiChatPanel-BQSUE2OO.mjs.gz +0 -0
- package/dist/{AiChatPanel-XLQM4BQJ.js → AiChatPanel-NSVSBJC7.js} +25 -25
- package/dist/AiChatPanel-NSVSBJC7.js.br +0 -0
- package/dist/AiChatPanel-NSVSBJC7.js.gz +0 -0
- package/dist/{Area3DChartScene-5CMEMIBI.mjs → Area3DChartScene-2FQHPGNE.mjs} +21 -4
- package/dist/Area3DChartScene-2FQHPGNE.mjs.br +0 -0
- package/dist/Area3DChartScene-2FQHPGNE.mjs.gz +0 -0
- package/dist/{Area3DChartScene-RZ3V3WOR.js → Area3DChartScene-V3W2V7N5.js} +21 -4
- package/dist/Area3DChartScene-V3W2V7N5.js.br +0 -0
- package/dist/Area3DChartScene-V3W2V7N5.js.gz +0 -0
- package/dist/{Bar3DChartScene-KHCQ6TEC.js → Bar3DChartScene-55XMAUC7.js} +21 -4
- package/dist/Bar3DChartScene-55XMAUC7.js.br +0 -0
- package/dist/Bar3DChartScene-55XMAUC7.js.gz +0 -0
- package/dist/{Bar3DChartScene-H3MYUJKV.mjs → Bar3DChartScene-PSJEVANA.mjs} +21 -4
- package/dist/Bar3DChartScene-PSJEVANA.mjs.br +0 -0
- package/dist/Bar3DChartScene-PSJEVANA.mjs.gz +0 -0
- package/dist/{Line3DChartScene-QEACF3U3.js → Line3DChartScene-5KACYRSQ.js} +21 -4
- package/dist/Line3DChartScene-5KACYRSQ.js.br +0 -0
- package/dist/Line3DChartScene-5KACYRSQ.js.gz +0 -0
- package/dist/{Line3DChartScene-YFRPJHDX.mjs → Line3DChartScene-BUVNUFNO.mjs} +21 -4
- package/dist/Line3DChartScene-BUVNUFNO.mjs.br +0 -0
- package/dist/Line3DChartScene-BUVNUFNO.mjs.gz +0 -0
- package/dist/{Model3DScene-QQWKGJ3T.js → Model3DScene-6U6TN36M.js} +2 -2
- package/dist/Model3DScene-6U6TN36M.js.br +0 -0
- package/dist/Model3DScene-6U6TN36M.js.gz +0 -0
- package/dist/{Model3DScene-O24KP723.mjs → Model3DScene-REKMR2L6.mjs} +1 -1
- package/dist/{Model3DScene-O24KP723.mjs.br → Model3DScene-REKMR2L6.mjs.br} +0 -0
- package/dist/Model3DScene-REKMR2L6.mjs.gz +0 -0
- package/dist/{PieChart3DScene-CI6CW22C.mjs → PieChart3DScene-4L2VVIUJ.mjs} +15 -4
- package/dist/PieChart3DScene-4L2VVIUJ.mjs.br +0 -0
- package/dist/PieChart3DScene-4L2VVIUJ.mjs.gz +0 -0
- package/dist/{PieChart3DScene-L3MHKQHW.js → PieChart3DScene-MV3JF7EM.js} +15 -4
- package/dist/PieChart3DScene-MV3JF7EM.js.br +0 -0
- package/dist/PieChart3DScene-MV3JF7EM.js.gz +0 -0
- 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-JUXRC3K2.mjs → SurfaceChart3DScene-ARE7OBFI.mjs} +19 -4
- package/dist/SurfaceChart3DScene-ARE7OBFI.mjs.br +0 -0
- package/dist/SurfaceChart3DScene-ARE7OBFI.mjs.gz +0 -0
- package/dist/{SurfaceChart3DScene-5IER6VFW.js → SurfaceChart3DScene-SFIOK3G3.js} +19 -4
- package/dist/SurfaceChart3DScene-SFIOK3G3.js.br +0 -0
- package/dist/SurfaceChart3DScene-SFIOK3G3.js.gz +0 -0
- package/dist/{chunk-SN5EUDIT.js → chunk-2Q2NFPXA.js} +81834 -57577
- package/dist/chunk-2Q2NFPXA.js.br +0 -0
- package/dist/chunk-2Q2NFPXA.js.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-4222CHFH.js → chunk-DZ3HWACD.js} +3763 -2551
- package/dist/chunk-DZ3HWACD.js.br +0 -0
- package/dist/chunk-DZ3HWACD.js.gz +0 -0
- package/dist/{chunk-DE3S3UHX.js → chunk-FHOUTYMB.js} +536 -448
- package/dist/chunk-FHOUTYMB.js.br +0 -0
- package/dist/chunk-FHOUTYMB.js.gz +0 -0
- package/dist/{chunk-UPJW34YG.mjs → chunk-HJZA3O3S.mjs} +103 -16
- package/dist/chunk-HJZA3O3S.mjs.br +0 -0
- package/dist/chunk-HJZA3O3S.mjs.gz +0 -0
- package/dist/{chunk-F5NPGNMA.js → chunk-HYUPPQJW.js} +6168 -1929
- package/dist/chunk-HYUPPQJW.js.br +0 -0
- package/dist/chunk-HYUPPQJW.js.gz +0 -0
- package/dist/{chunk-PFPKBNNZ.mjs → chunk-KWHURCVT.mjs} +1771 -559
- package/dist/chunk-KWHURCVT.mjs.br +0 -0
- package/dist/chunk-KWHURCVT.mjs.gz +0 -0
- package/dist/{chunk-RHWQKZLB.mjs → chunk-M6GIPAY4.mjs} +23 -7
- package/dist/chunk-M6GIPAY4.mjs.br +0 -0
- package/dist/chunk-M6GIPAY4.mjs.gz +0 -0
- package/dist/{chunk-RNP5HP4L.mjs → chunk-T4ZRSRQZ.mjs} +6164 -1925
- package/dist/chunk-T4ZRSRQZ.mjs.br +0 -0
- package/dist/chunk-T4ZRSRQZ.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-FRZIBZTE.mjs → chunk-TAGG5YNA.mjs} +76 -1
- package/dist/chunk-TAGG5YNA.mjs.br +0 -0
- package/dist/chunk-TAGG5YNA.mjs.gz +0 -0
- package/dist/{chunk-6IMB5DNJ.mjs → chunk-UKPGYJ7G.mjs} +90204 -65968
- package/dist/chunk-UKPGYJ7G.mjs.br +0 -0
- package/dist/chunk-UKPGYJ7G.mjs.gz +0 -0
- package/dist/{chunk-QWA5YEIZ.js → chunk-XW46A7DN.js} +194 -178
- package/dist/chunk-XW46A7DN.js.br +0 -0
- package/dist/chunk-XW46A7DN.js.gz +0 -0
- package/dist/{chunk-L3ZIBQEB.js → chunk-Y6GG2OOW.js} +76 -1
- package/dist/chunk-Y6GG2OOW.js.br +0 -0
- package/dist/chunk-Y6GG2OOW.js.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-CGKutKk1.d.ts.map +1 -1
- package/dist/index.d.ts +616 -99
- package/dist/index.d.ts.map +1 -1
- 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 +657 -86
- 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/{useViewerBuildingBlocks-C8F_4Pzb.d.ts → useViewerBuildingBlocks-FbK-4ORi.d.ts} +2 -1
- package/dist/useViewerBuildingBlocks-FbK-4ORi.d.ts.map +1 -0
- package/dist/viewer/index.d.ts +545 -48
- package/dist/viewer/index.d.ts.map +1 -1
- 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 +9 -9
- package/dist/AiChatPanel-A5DCEHTO.mjs.br +0 -0
- package/dist/AiChatPanel-A5DCEHTO.mjs.gz +0 -0
- package/dist/AiChatPanel-XLQM4BQJ.js.br +0 -0
- package/dist/AiChatPanel-XLQM4BQJ.js.gz +0 -0
- package/dist/Area3DChartScene-5CMEMIBI.mjs.br +0 -0
- package/dist/Area3DChartScene-5CMEMIBI.mjs.gz +0 -0
- package/dist/Area3DChartScene-RZ3V3WOR.js.br +0 -0
- package/dist/Area3DChartScene-RZ3V3WOR.js.gz +0 -0
- package/dist/Bar3DChartScene-H3MYUJKV.mjs.br +0 -0
- package/dist/Bar3DChartScene-H3MYUJKV.mjs.gz +0 -0
- package/dist/Bar3DChartScene-KHCQ6TEC.js.br +0 -0
- package/dist/Bar3DChartScene-KHCQ6TEC.js.gz +0 -0
- package/dist/Line3DChartScene-QEACF3U3.js.br +0 -0
- package/dist/Line3DChartScene-QEACF3U3.js.gz +0 -0
- package/dist/Line3DChartScene-YFRPJHDX.mjs.br +0 -0
- package/dist/Line3DChartScene-YFRPJHDX.mjs.gz +0 -0
- package/dist/Model3DScene-O24KP723.mjs.gz +0 -0
- package/dist/Model3DScene-QQWKGJ3T.js.br +0 -0
- package/dist/Model3DScene-QQWKGJ3T.js.gz +0 -0
- package/dist/PieChart3DScene-CI6CW22C.mjs.br +0 -0
- package/dist/PieChart3DScene-CI6CW22C.mjs.gz +0 -0
- package/dist/PieChart3DScene-L3MHKQHW.js.br +0 -0
- package/dist/PieChart3DScene-L3MHKQHW.js.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-5IER6VFW.js.br +0 -0
- package/dist/SurfaceChart3DScene-5IER6VFW.js.gz +0 -0
- package/dist/SurfaceChart3DScene-JUXRC3K2.mjs.br +0 -0
- package/dist/SurfaceChart3DScene-JUXRC3K2.mjs.gz +0 -0
- package/dist/chunk-4222CHFH.js.br +0 -0
- package/dist/chunk-4222CHFH.js.gz +0 -0
- package/dist/chunk-6IMB5DNJ.mjs.br +0 -0
- package/dist/chunk-6IMB5DNJ.mjs.gz +0 -0
- package/dist/chunk-DE3S3UHX.js.br +0 -0
- package/dist/chunk-DE3S3UHX.js.gz +0 -0
- package/dist/chunk-F5NPGNMA.js.br +0 -0
- package/dist/chunk-F5NPGNMA.js.gz +0 -0
- package/dist/chunk-FRZIBZTE.mjs.br +0 -0
- package/dist/chunk-FRZIBZTE.mjs.gz +0 -0
- package/dist/chunk-L3ZIBQEB.js.br +0 -0
- package/dist/chunk-L3ZIBQEB.js.gz +0 -0
- package/dist/chunk-PFPKBNNZ.mjs.br +0 -0
- package/dist/chunk-PFPKBNNZ.mjs.gz +0 -0
- package/dist/chunk-QWA5YEIZ.js.br +0 -0
- package/dist/chunk-QWA5YEIZ.js.gz +0 -0
- package/dist/chunk-RHWQKZLB.mjs.br +0 -0
- package/dist/chunk-RHWQKZLB.mjs.gz +0 -0
- package/dist/chunk-RNP5HP4L.mjs.br +0 -0
- package/dist/chunk-RNP5HP4L.mjs.gz +0 -0
- package/dist/chunk-SN5EUDIT.js.br +0 -0
- package/dist/chunk-SN5EUDIT.js.gz +0 -0
- package/dist/chunk-UPJW34YG.mjs.br +0 -0
- package/dist/chunk-UPJW34YG.mjs.gz +0 -0
- package/dist/useViewerBuildingBlocks-C8F_4Pzb.d.ts.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -2165,6 +2165,29 @@ interface PptxElementBase {
|
|
|
2165
2165
|
y: number;
|
|
2166
2166
|
width: number;
|
|
2167
2167
|
height: number;
|
|
2168
|
+
/**
|
|
2169
|
+
* The exact EMU integer `x` was parsed from (the `a:off/@_x` this
|
|
2170
|
+
* element's own `a:xfrm` carried on load), when the parser could resolve
|
|
2171
|
+
* one. `x` itself is always `Math.round(xEmu / EMU_PER_PX)` at parse
|
|
2172
|
+
* time, but that rounding is lossy: re-deriving EMU from `x` on save
|
|
2173
|
+
* (`Math.round(x * EMU_PER_PX)`) can drift from the original value by up
|
|
2174
|
+
* to half a pixel's worth of EMU on every load/save cycle even when
|
|
2175
|
+
* nothing touched this element. Kept alongside `x` (not instead of it) so
|
|
2176
|
+
* every consumer that only cares about on-screen position is unaffected;
|
|
2177
|
+
* only the save-side xfrm writer (`resolveXfrmEmu` in
|
|
2178
|
+
* `xfrm-emu-resolution.ts`) reads this, and only when `x` still equals
|
|
2179
|
+
* `Math.round(xEmu / EMU_PER_PX)` (i.e. nothing moved this element since
|
|
2180
|
+
* load) does it re-emit `xEmu` verbatim instead of re-quantizing `x`.
|
|
2181
|
+
* `undefined` for an SDK-created element or one whose transform could not
|
|
2182
|
+
* be resolved to a usable `a:off` on load.
|
|
2183
|
+
*/
|
|
2184
|
+
xEmu?: number;
|
|
2185
|
+
/** The exact EMU integer `y` was parsed from (`a:off/@_y`). See {@link xEmu}. */
|
|
2186
|
+
yEmu?: number;
|
|
2187
|
+
/** The exact EMU integer `width` was parsed from (`a:ext/@_cx`). See {@link xEmu}. */
|
|
2188
|
+
widthEmu?: number;
|
|
2189
|
+
/** The exact EMU integer `height` was parsed from (`a:ext/@_cy`). See {@link xEmu}. */
|
|
2190
|
+
heightEmu?: number;
|
|
2168
2191
|
rotation?: number;
|
|
2169
2192
|
/** Skew along the X axis in degrees (parsed from `@_skewX` in 1/60000ths of a degree). */
|
|
2170
2193
|
skewX?: number;
|
|
@@ -2684,6 +2707,21 @@ interface PptxChartUserShapeGroupTransform {
|
|
|
2684
2707
|
cx: number;
|
|
2685
2708
|
cy: number;
|
|
2686
2709
|
};
|
|
2710
|
+
/**
|
|
2711
|
+
* The group's own rotation in degrees (`a:xfrm/@rot`, stored in 60,000ths
|
|
2712
|
+
* of a degree), when present. Rotates the whole group, and everything
|
|
2713
|
+
* grouped inside it, as a rigid body about the CENTRE of the group's own
|
|
2714
|
+
* box ({@link off}/{@link ext}); see `flattenChartUserShapes` in
|
|
2715
|
+
* `chart-user-shapes-parser.ts` for how this composes onto each contained
|
|
2716
|
+
* leaf's own {@link PptxChartUserShapeGroupChild.rotation}. Verified
|
|
2717
|
+
* against real PowerPoint (COM): a `cdr:grpSp`'s `cdr:grpSpPr/a:xfrm` does
|
|
2718
|
+
* carry `rot` the same way an ordinary shape's does.
|
|
2719
|
+
*/
|
|
2720
|
+
rotation?: number;
|
|
2721
|
+
/** The group's own horizontal flip (`a:xfrm/@flipH`), when present; composes onto children by XOR, see {@link rotation}'s doc. */
|
|
2722
|
+
flipH?: boolean;
|
|
2723
|
+
/** The group's own vertical flip (`a:xfrm/@flipV`), when present; composes onto children by XOR, see {@link rotation}'s doc. */
|
|
2724
|
+
flipV?: boolean;
|
|
2687
2725
|
}
|
|
2688
2726
|
/**
|
|
2689
2727
|
* One shape grouped inside a `cdr:grpSp` (or a nested `cdr:grpSp` itself).
|
|
@@ -2715,6 +2753,23 @@ interface PptxChartUserShapeGroupChild {
|
|
|
2715
2753
|
strokeWidth?: number;
|
|
2716
2754
|
/** Text paragraphs of the shape's `txBody`, when present. */
|
|
2717
2755
|
paragraphs?: PptxChartUserShapeParagraph[];
|
|
2756
|
+
/**
|
|
2757
|
+
* A `pic` child's alt text (`cdr:nvPicPr/cdr:cNvPr/@descr`), when present.
|
|
2758
|
+
* Editable independently of {@link rawXml}'s otherwise-verbatim content:
|
|
2759
|
+
* the serializer patches only this attribute onto the cloned raw node.
|
|
2760
|
+
*/
|
|
2761
|
+
altText?: string;
|
|
2762
|
+
/**
|
|
2763
|
+
* This child's OWN rotation in degrees (`a:xfrm/@rot`), when present.
|
|
2764
|
+
* Composes with every enclosing group's own
|
|
2765
|
+
* {@link PptxChartUserShapeGroupTransform.rotation} (added) to produce the
|
|
2766
|
+
* leaf's final on-screen rotation; see `flattenChartUserShapes`.
|
|
2767
|
+
*/
|
|
2768
|
+
rotation?: number;
|
|
2769
|
+
/** This child's OWN horizontal flip (`a:xfrm/@flipH`); composes with an ancestor group's flip by XOR. */
|
|
2770
|
+
flipH?: boolean;
|
|
2771
|
+
/** This child's OWN vertical flip (`a:xfrm/@flipV`); composes with an ancestor group's flip by XOR. */
|
|
2772
|
+
flipV?: boolean;
|
|
2718
2773
|
/**
|
|
2719
2774
|
* Verbatim source XML of a `pic`/`graphicFrame` child, or of this node
|
|
2720
2775
|
* itself when `kind === 'grpSp'` and the nested group is untouched since
|
|
@@ -2773,6 +2828,29 @@ interface PptxChartUserShape {
|
|
|
2773
2828
|
strokeWidth?: number;
|
|
2774
2829
|
/** Text paragraphs of the shape's `txBody`, when present. */
|
|
2775
2830
|
paragraphs?: PptxChartUserShapeParagraph[];
|
|
2831
|
+
/**
|
|
2832
|
+
* A `pic` anchor's alt text (`cdr:nvPicPr/cdr:cNvPr/@descr`), when
|
|
2833
|
+
* present. Editable independently of {@link rawXml}'s otherwise-verbatim
|
|
2834
|
+
* content: the serializer patches only this attribute onto the cloned
|
|
2835
|
+
* raw node, so a picture's blip and other markup are untouched.
|
|
2836
|
+
*/
|
|
2837
|
+
altText?: string;
|
|
2838
|
+
/**
|
|
2839
|
+
* This shape's OWN rotation in degrees (`a:xfrm/@rot`, on `spPr/a:xfrm`
|
|
2840
|
+
* for `sp`/`cxnSp`/`pic`, or directly on a top-level `graphicFrame`'s own
|
|
2841
|
+
* `a:xfrm`), when present. A top-level anchor's position/size is governed
|
|
2842
|
+
* by {@link from}/{@link to}/{@link ext}, never by this `a:xfrm`'s own
|
|
2843
|
+
* `off`/`ext` (see {@link rawXml}'s doc), but `rot`/`flipH`/`flipV` on that
|
|
2844
|
+
* same `a:xfrm` DO apply visually: verified against real PowerPoint (COM),
|
|
2845
|
+
* which writes e.g. `<a:xfrm rot="1800000"><a:off .../><a:ext .../></a:xfrm>`
|
|
2846
|
+
* on a rotated overlay shape's `spPr`, with the `off`/`ext` values
|
|
2847
|
+
* unrelated to the anchor's own `cdr:from`/`cdr:to`.
|
|
2848
|
+
*/
|
|
2849
|
+
rotation?: number;
|
|
2850
|
+
/** This shape's OWN horizontal flip (`a:xfrm/@flipH`); see {@link rotation}'s doc. */
|
|
2851
|
+
flipH?: boolean;
|
|
2852
|
+
/** This shape's OWN vertical flip (`a:xfrm/@flipV`); see {@link rotation}'s doc. */
|
|
2853
|
+
flipV?: boolean;
|
|
2776
2854
|
/**
|
|
2777
2855
|
* Verbatim source XML of a `pic` or `graphicFrame` anchor child (the
|
|
2778
2856
|
* `cdr:pic` / `cdr:graphicFrame` node itself, not the enclosing anchor),
|
|
@@ -2802,7 +2880,7 @@ interface PptxChartUserShape {
|
|
|
2802
2880
|
* @example
|
|
2803
2881
|
* ```ts
|
|
2804
2882
|
* const type: PptxChartType = "bar";
|
|
2805
|
-
* // => "bar"
|
|
2883
|
+
* // => "bar": one of: "bar" | "line" | "pie" | "doughnut" | "area" | "scatter" | …
|
|
2806
2884
|
* ```
|
|
2807
2885
|
*/
|
|
2808
2886
|
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';
|
|
@@ -2837,7 +2915,7 @@ type PptxBar3DShape = 'box' | 'cone' | 'coneToMax' | 'cylinder' | 'pyramid' | 'p
|
|
|
2837
2915
|
* @example
|
|
2838
2916
|
* ```ts
|
|
2839
2917
|
* const type: PptxChartTrendlineType = "linear";
|
|
2840
|
-
* // => "linear"
|
|
2918
|
+
* // => "linear": one of: "linear" | "exponential" | "logarithmic" | "polynomial" | "power" | "movingAvg"
|
|
2841
2919
|
* ```
|
|
2842
2920
|
*/
|
|
2843
2921
|
type PptxChartTrendlineType = 'linear' | 'exponential' | 'logarithmic' | 'polynomial' | 'power' | 'movingAvg';
|
|
@@ -2888,7 +2966,7 @@ type PptxChartErrBarType = 'both' | 'minus' | 'plus';
|
|
|
2888
2966
|
* @example
|
|
2889
2967
|
* ```ts
|
|
2890
2968
|
* const valType: PptxChartErrValType = "percentage";
|
|
2891
|
-
* // => "percentage"
|
|
2969
|
+
* // => "percentage": one of: "cust" | "fixedVal" | "percentage" | "stdDev" | "stdErr"
|
|
2892
2970
|
* ```
|
|
2893
2971
|
*/
|
|
2894
2972
|
type PptxChartErrValType = 'cust' | 'fixedVal' | 'percentage' | 'stdDev' | 'stdErr';
|
|
@@ -3007,9 +3085,29 @@ interface PptxChartDataPoint {
|
|
|
3007
3085
|
bubble3D?: boolean;
|
|
3008
3086
|
/** Per-point picture-fill flags (`c:dPt/c:pictureOptions`). */
|
|
3009
3087
|
picture?: PptxChartDataPointPicture;
|
|
3088
|
+
/**
|
|
3089
|
+
* This point's identity GUID (`c:dPt/c:extLst/c:ext/c16:uniqueId/@val`,
|
|
3090
|
+
* the Office 2014+ `{C3380CC4-5D6E-409C-BE32-E72D297353CC}` chart
|
|
3091
|
+
* extension), read-only here: an edited point keeps its existing
|
|
3092
|
+
* `c:extLst` as passthrough (see `chart-datapoint-serializer.ts`), so this
|
|
3093
|
+
* field exists for introspection rather than round-trip.
|
|
3094
|
+
*/
|
|
3095
|
+
uniqueId?: string;
|
|
3010
3096
|
}
|
|
3011
3097
|
/** Schema values accepted by `c:dLblPos`. */
|
|
3012
3098
|
type PptxChartDataLabelPosition = 'bestFit' | 'b' | 'ctr' | 'inBase' | 'inEnd' | 'l' | 'outEnd' | 'r' | 't';
|
|
3099
|
+
/**
|
|
3100
|
+
* `c15:dlblRangeCache`/`c15:datalabelsRange` (CT_SeriesDataLabelsRange):
|
|
3101
|
+
* PowerPoint 2013+'s "Value From Cells" custom label source, one cell range
|
|
3102
|
+
* supplying every label in a group (chart-type or series `c:dLbls`), with a
|
|
3103
|
+
* cache aligned to point order. See `utils/chart-data-labels-range.ts`.
|
|
3104
|
+
*/
|
|
3105
|
+
interface PptxChartDataLabelsRange {
|
|
3106
|
+
/** `c15:f`: the cell range formula (e.g. `Sheet1!$D$2:$D$5`). */
|
|
3107
|
+
formula: string;
|
|
3108
|
+
/** `c15:dlblRangeCache`: cached label text, index-aligned with data points. */
|
|
3109
|
+
cache: string[];
|
|
3110
|
+
}
|
|
3013
3111
|
/** Individual data label override (c:dLbl). */
|
|
3014
3112
|
interface PptxChartDataLabel {
|
|
3015
3113
|
idx: number;
|
|
@@ -3051,6 +3149,14 @@ interface PptxChartDataLabel {
|
|
|
3051
3149
|
* over any chart/series-level default when set.
|
|
3052
3150
|
*/
|
|
3053
3151
|
spPr?: PptxChartShapeProps;
|
|
3152
|
+
/**
|
|
3153
|
+
* `c15:xForSave`: this override exists only so its properties survive a
|
|
3154
|
+
* save/reload round trip; PowerPoint merges it back onto the series'
|
|
3155
|
+
* default label on load. Round-tripped as-is (an edited chart keeps an
|
|
3156
|
+
* existing point's whole `extLst`, this flag included); introspection
|
|
3157
|
+
* only otherwise. See `utils/chart-data-labels-range.ts`.
|
|
3158
|
+
*/
|
|
3159
|
+
savedForCompatibilityOnly?: boolean;
|
|
3054
3160
|
}
|
|
3055
3161
|
/** Axis number format. */
|
|
3056
3162
|
interface PptxChartAxisNumFmt {
|
|
@@ -3083,7 +3189,7 @@ interface PptxChartAxisFormatting extends PptxChartAxisLabelFormatting {
|
|
|
3083
3189
|
axPos?: 'b' | 'l' | 'r' | 't';
|
|
3084
3190
|
/** Unique axis identifier (c:axId/@val) used to link series to axes. */
|
|
3085
3191
|
axisId?: number;
|
|
3086
|
-
/** Cross-axis identifier
|
|
3192
|
+
/** Cross-axis identifier: the axis this axis crosses. */
|
|
3087
3193
|
crossAxisId?: number;
|
|
3088
3194
|
/** Automatic crossing mode (`c:crosses`). Mutually exclusive with `crossesAt`. */
|
|
3089
3195
|
crosses?: 'autoZero' | 'min' | 'max';
|
|
@@ -3335,6 +3441,54 @@ interface PptxChartSeries {
|
|
|
3335
3441
|
waterfallOptions?: PptxChartWaterfallOptions;
|
|
3336
3442
|
regionMapOptions?: PptxChartRegionMapOptions;
|
|
3337
3443
|
treemapOptions?: PptxChartTreemapOptions;
|
|
3444
|
+
/**
|
|
3445
|
+
* Series-level picture-fill flags (`c:ser/c:pictureOptions`), legal
|
|
3446
|
+
* wherever a per-point `c:dPt/c:pictureOptions` is (CT_BarSer): paints
|
|
3447
|
+
* EVERY point in the series with one picture unless a `c:dPt` overrides it
|
|
3448
|
+
* for that point alone. A point's own {@link PptxChartDataPoint.picture}
|
|
3449
|
+
* takes precedence entirely (not merged field-by-field) when it resolves
|
|
3450
|
+
* its own image; renderers fall back to this series-level picture only
|
|
3451
|
+
* when the point has none of its own.
|
|
3452
|
+
*/
|
|
3453
|
+
picture?: PptxChartDataPointPicture;
|
|
3454
|
+
/**
|
|
3455
|
+
* This series' identity GUID (`c:ser/c:extLst/c:ext/c16:uniqueId/@val`,
|
|
3456
|
+
* the Office 2014+ `{C3380CC4-5D6E-409C-BE32-E72D297353CC}` chart
|
|
3457
|
+
* extension). PowerPoint uses it to track a series across edits and
|
|
3458
|
+
* collaborators independent of its `c:idx`/`c:order` position (the same
|
|
3459
|
+
* role animation targeting and CRDT reconciliation need). An edited
|
|
3460
|
+
* existing series keeps its own `c:extLst` as passthrough; a NEW series
|
|
3461
|
+
* added by cloning an existing one as a template is given a freshly
|
|
3462
|
+
* generated id rather than duplicating the template's (see
|
|
3463
|
+
* `regenerateClonedUniqueId` in `chart-series-identity.ts`), since two
|
|
3464
|
+
* series sharing one identity is exactly what this extension exists to
|
|
3465
|
+
* prevent.
|
|
3466
|
+
*/
|
|
3467
|
+
uniqueId?: string;
|
|
3468
|
+
}
|
|
3469
|
+
/**
|
|
3470
|
+
* A series PowerPoint's "Chart Filters" feature hid from the plot while
|
|
3471
|
+
* keeping it in the workbook (`c:<type>Chart/c:extLst/c:ext
|
|
3472
|
+
* [@uri={02D57815-91ED-43cb-92C2-25804820EDAC}]/c15:filtered<Type>Series
|
|
3473
|
+
* /c15:ser`). Read-mostly: {@link PptxChartData.filteredSeries} exists for
|
|
3474
|
+
* introspection (AI tools, "unhide filtered series" UI) and round-trips as
|
|
3475
|
+
* passthrough through the preserved chart XML when untouched. See
|
|
3476
|
+
* `utils/chart-filtered-series.ts` for the parse rules and the idx-collision
|
|
3477
|
+
* fix this modelling enables on save.
|
|
3478
|
+
*/
|
|
3479
|
+
interface PptxChartFilteredSeries {
|
|
3480
|
+
/** `c15:ser/c:idx/@val`, the workbook column position this series still occupies. */
|
|
3481
|
+
idx: number;
|
|
3482
|
+
/** `c15:ser/c:order/@val`, defaulting to {@link idx} when absent. */
|
|
3483
|
+
order: number;
|
|
3484
|
+
/** Series name, from the hidden series' own `c:tx` cache. */
|
|
3485
|
+
name?: string;
|
|
3486
|
+
/** Category labels, from the hidden series' own `c:cat` cache. */
|
|
3487
|
+
categories?: string[];
|
|
3488
|
+
/** Data values, from the hidden series' own `c:val` cache. */
|
|
3489
|
+
values?: number[];
|
|
3490
|
+
/** This hidden series' own identity GUID (`c16:uniqueId`), when present. */
|
|
3491
|
+
uniqueId?: string;
|
|
3338
3492
|
}
|
|
3339
3493
|
/**
|
|
3340
3494
|
* Chart-level data-label options (`c:dLbls` directly under a chart-type
|
|
@@ -3358,6 +3512,19 @@ interface PptxChartDataLabelOptions {
|
|
|
3358
3512
|
separator?: string;
|
|
3359
3513
|
/** Show leader lines where supported (`c:showLeaderLines`). */
|
|
3360
3514
|
showLeaderLines?: boolean;
|
|
3515
|
+
/**
|
|
3516
|
+
* Leader-line stroke styling for offset (pie/doughnut `outEnd`/`bestFit`)
|
|
3517
|
+
* labels. Resolved from the base `c:leaderLines/c:spPr` when present, else
|
|
3518
|
+
* falling back to the Office 2013+ chart15 extension's mirror
|
|
3519
|
+
* (`c:extLst/c:ext/c15:leaderLines/c:spPr`, uri
|
|
3520
|
+
* `{CE6537A1-D6FC-4f65-9D91-7224C49458BB}`), which is the one PowerPoint
|
|
3521
|
+
* itself treats as authoritative when both are present. Confirmed against
|
|
3522
|
+
* `e2e/fixtures/issue-132-gradient-fill.pptx` and
|
|
3523
|
+
* `e2e/fixtures/issue-132-hr-deck.pptx`, both of which write only the
|
|
3524
|
+
* extension form. `undefined` leaves the renderer's own default leader-line
|
|
3525
|
+
* stroke.
|
|
3526
|
+
*/
|
|
3527
|
+
leaderLineStyle?: PptxChartShapeProps;
|
|
3361
3528
|
/**
|
|
3362
3529
|
* Label position (`c:dLblPos`). Valid values depend on the chart type
|
|
3363
3530
|
* (`ctr`, `inEnd`, `inBase`, `outEnd`, `bestFit`, `l`, `r`, `t`, `b`).
|
|
@@ -3378,6 +3545,22 @@ interface PptxChartDataLabelOptions {
|
|
|
3378
3545
|
* (point > series > chart-type).
|
|
3379
3546
|
*/
|
|
3380
3547
|
txPr?: PptxChartLegendTextStyle;
|
|
3548
|
+
/**
|
|
3549
|
+
* PowerPoint 2013+ "Value From Cells", series-wide form
|
|
3550
|
+
* (`c15:datalabelsRange`, chart15 uri `{CE6537A1-...}`): one cell range
|
|
3551
|
+
* supplies every label in this group, aligned by point index. A
|
|
3552
|
+
* SERIES-WIDE alternative to the per-point `c15:dlblFieldTable` mechanism
|
|
3553
|
+
* (already resolved into {@link PptxChartDataLabel.text} at parse time).
|
|
3554
|
+
* See `utils/chart-data-labels-range.ts`.
|
|
3555
|
+
*/
|
|
3556
|
+
dataLabelsRange?: PptxChartDataLabelsRange;
|
|
3557
|
+
/**
|
|
3558
|
+
* `c15:showDataLabelsRange` at the SAME level as {@link dataLabelsRange}:
|
|
3559
|
+
* whether every label in this group resolves through the range's cache.
|
|
3560
|
+
* Distinct from the per-point {@link PptxChartDataLabel} flag of the same
|
|
3561
|
+
* XML name. Only meaningful when {@link dataLabelsRange} is set.
|
|
3562
|
+
*/
|
|
3563
|
+
showDataLabelsRange?: boolean;
|
|
3381
3564
|
}
|
|
3382
3565
|
/** Typed text defaults for a single chart legend entry. */
|
|
3383
3566
|
interface PptxChartLegendTextStyle {
|
|
@@ -3511,12 +3694,12 @@ interface PptxBubbleChartOptions {
|
|
|
3511
3694
|
*
|
|
3512
3695
|
* All fields are optional and round-trip verbatim.
|
|
3513
3696
|
*
|
|
3514
|
-
* - {@link rotX}
|
|
3515
|
-
* - {@link rotY}
|
|
3516
|
-
* - {@link depthPercent}
|
|
3517
|
-
* - {@link rAngAx}
|
|
3518
|
-
* - {@link perspective}
|
|
3519
|
-
* - {@link hPercent}
|
|
3697
|
+
* - {@link rotX}: X-axis rotation in degrees (-90…90).
|
|
3698
|
+
* - {@link rotY}: Y-axis rotation in degrees (0…360).
|
|
3699
|
+
* - {@link depthPercent}: chart depth as a percentage of base width.
|
|
3700
|
+
* - {@link rAngAx}: `true` if axes meet at right angles.
|
|
3701
|
+
* - {@link perspective}: perspective angle in degrees (0…240).
|
|
3702
|
+
* - {@link hPercent}: height as a percentage of chart width.
|
|
3520
3703
|
*/
|
|
3521
3704
|
interface PptxChartView3D {
|
|
3522
3705
|
rotX?: number;
|
|
@@ -3530,12 +3713,17 @@ interface PptxChartView3D {
|
|
|
3530
3713
|
* Chart "chrome" flags from `c:chart` that round-trip cleanly even when
|
|
3531
3714
|
* rendering ignores them.
|
|
3532
3715
|
*
|
|
3533
|
-
* - {@link autoTitleDeleted}
|
|
3716
|
+
* - {@link autoTitleDeleted}: `c:autoTitleDeleted/@val`. Suppresses the
|
|
3534
3717
|
* auto-generated title for single-series charts.
|
|
3535
|
-
* - {@link dispBlanksAs}
|
|
3718
|
+
* - {@link dispBlanksAs}: `c:dispBlanksAs/@val`. How blank cells
|
|
3536
3719
|
* render: `"gap"`, `"zero"`, or `"span"`.
|
|
3537
|
-
* - {@link showDLblsOverMax}
|
|
3720
|
+
* - {@link showDLblsOverMax}: `c:showDLblsOverMax/@val`. Keeps data
|
|
3538
3721
|
* labels visible for points exceeding the value-axis maximum.
|
|
3722
|
+
* - {@link dispNaAsBlank}: the Office 2017+ chart extension
|
|
3723
|
+
* `c:extLst/c:ext/c16r3:dataDisplayOptions16/c16r3:dispNaAsBlank/@val`
|
|
3724
|
+
* (uri `{56B9EC1D-385E-4148-901F-78D8002777C0}`), PowerPoint's "Show #N/A
|
|
3725
|
+
* as an empty cell" chart option. Confirmed against real corpus markup
|
|
3726
|
+
* (`e2e/fixtures/chart-data-fidelity.pptx`).
|
|
3539
3727
|
*
|
|
3540
3728
|
* `c:plotVisOnly` lives on {@link PptxChartData.plotVisibleOnly} and is
|
|
3541
3729
|
* intentionally not duplicated here.
|
|
@@ -3544,6 +3732,7 @@ interface PptxChartChrome {
|
|
|
3544
3732
|
autoTitleDeleted?: boolean;
|
|
3545
3733
|
dispBlanksAs?: 'gap' | 'zero' | 'span';
|
|
3546
3734
|
showDLblsOverMax?: boolean;
|
|
3735
|
+
dispNaAsBlank?: boolean;
|
|
3547
3736
|
}
|
|
3548
3737
|
/** Manual chart placement from `c:layout/c:manualLayout` (CT_ManualLayout). */
|
|
3549
3738
|
interface PptxChartManualLayout {
|
|
@@ -3639,6 +3828,26 @@ interface PptxChartData {
|
|
|
3639
3828
|
categoryLevels?: string[][];
|
|
3640
3829
|
dateCategories?: PptxChartDateCategories;
|
|
3641
3830
|
series: PptxChartSeries[];
|
|
3831
|
+
/**
|
|
3832
|
+
* Series hidden from the plot by PowerPoint's "Chart Filters" feature
|
|
3833
|
+
* (Series tab) but still present in the workbook, aggregated across every
|
|
3834
|
+
* chart-type container (combo charts can carry more than one). Absent
|
|
3835
|
+
* when the chart has no such extension. See {@link PptxChartFilteredSeries}.
|
|
3836
|
+
*/
|
|
3837
|
+
filteredSeries?: PptxChartFilteredSeries[];
|
|
3838
|
+
/**
|
|
3839
|
+
* `c15:filteredSeriesTitle`: the auto-generated series title text (e.g.
|
|
3840
|
+
* "Series 3") PowerPoint preserved when the chart filter hid the series
|
|
3841
|
+
* whose data would otherwise have supplied it. See
|
|
3842
|
+
* `utils/chart-ext-titles.ts`. Read-mostly like {@link filteredSeries}.
|
|
3843
|
+
*/
|
|
3844
|
+
filteredSeriesTitle?: string;
|
|
3845
|
+
/**
|
|
3846
|
+
* `c15:filteredCategoryTitle`: the auto-numbered category labels ("1",
|
|
3847
|
+
* "2", "3", ...) PowerPoint preserved when the chart filter hid the
|
|
3848
|
+
* category axis source entirely. See `utils/chart-ext-titles.ts`.
|
|
3849
|
+
*/
|
|
3850
|
+
filteredCategoryTitle?: string[];
|
|
3642
3851
|
/** Chart style/formatting metadata. */
|
|
3643
3852
|
style?: PptxChartStyle;
|
|
3644
3853
|
/** Grouping mode for bar/area/line charts: 'clustered' | 'stacked' | 'percentStacked' */
|
|
@@ -3762,9 +3971,9 @@ interface PptxChartData {
|
|
|
3762
3971
|
/**
|
|
3763
3972
|
* Color cycling method from the chart color style part's `meth` attribute.
|
|
3764
3973
|
*
|
|
3765
|
-
* - `"cycle"
|
|
3766
|
-
* - `"withinLinear"
|
|
3767
|
-
* - `"acrossLinear"
|
|
3974
|
+
* - `"cycle"`: repeat the palette colours in order (default)
|
|
3975
|
+
* - `"withinLinear"`: gradient within each series
|
|
3976
|
+
* - `"acrossLinear"`: gradient across series
|
|
3768
3977
|
*/
|
|
3769
3978
|
colorMethod?: 'cycle' | 'withinLinear' | 'acrossLinear';
|
|
3770
3979
|
/** Internal source color-style part path used for lossless dirty saves. */
|
|
@@ -4561,7 +4770,95 @@ interface PptxSmartArtLayoutNode {
|
|
|
4561
4770
|
rules?: PptxSmartArtNumericRule[];
|
|
4562
4771
|
/** `dgm:shape`: this node's own preset geometry override, when present. */
|
|
4563
4772
|
shape?: PptxSmartArtLayoutNodeShape;
|
|
4773
|
+
/**
|
|
4774
|
+
* `dgm:presOf` (CT_PresentationOf, same iterator shape as `dgm:forEach`):
|
|
4775
|
+
* which data-model point(s) this node's OWN text/geometry binds to -
|
|
4776
|
+
* `axis: ['self']` the point currently being iterated, `['des']` all of
|
|
4777
|
+
* its descendants, `['ch']` its direct children, and so on. Absent or
|
|
4778
|
+
* empty `axis` (including a bare `<dgm:presOf/>`) means the node carries
|
|
4779
|
+
* no text of its own (a pure positioning/decoration wrapper - `composite`,
|
|
4780
|
+
* `sp` spacer, connector cap). See `smartart-layout-interpreter-item-
|
|
4781
|
+
* roles.ts`, the one consumer: it is what lets the interpreter tell a
|
|
4782
|
+
* text-bearing per-item role (a list layout's `childText`, a card
|
|
4783
|
+
* layout's `roleText`/`bodyText`) apart from a same-generation sibling
|
|
4784
|
+
* that positions or decorates instead.
|
|
4785
|
+
*/
|
|
4786
|
+
presentationOf?: PptxSmartArtIteratorAttributes;
|
|
4787
|
+
/**
|
|
4788
|
+
* EVERY `dgm:constr` reachable from this node, including ones declared
|
|
4789
|
+
* inside a `dgm:choose`/`dgm:if`/`dgm:else` that wraps THIS layoutNode's
|
|
4790
|
+
* `constrLst` (a genuinely conditional constraint set, e.g. one branch
|
|
4791
|
+
* per data-point count - `gear`'s composite positions its `gear1`/
|
|
4792
|
+
* `gear2`/`gear3` slots this way, so its plain, direct-child-only
|
|
4793
|
+
* `constraints` above is empty for it). Stops at a nested `dgm:layoutNode`
|
|
4794
|
+
* boundary: that child's own conditional constrLst becomes ITS
|
|
4795
|
+
* `allConstraints`, not folded into the parent's. Read-only /
|
|
4796
|
+
* interpretation-only - `constraints` above (this node's own DIRECT
|
|
4797
|
+
* constrLst) remains the one `applySmartArtLayoutDefinition` round-trips,
|
|
4798
|
+
* so editing an unrelated property can never collapse a genuinely
|
|
4799
|
+
* conditional constrLst into a single branch. `undefined` when this node
|
|
4800
|
+
* declares no constrLst at all, in or out of a choose (the common case);
|
|
4801
|
+
* otherwise a superset of `constraints` (every branch, blindly unioned -
|
|
4802
|
+
* this interpreter does not evaluate `dgm:choose` conditions when
|
|
4803
|
+
* indexing constraints, matching the same "flatten both branches"
|
|
4804
|
+
* convention `nestedLayoutNodes` already uses for `children`). See
|
|
4805
|
+
* `smartart-constraint-solver.ts`'s `buildConstraintIndex`, the only
|
|
4806
|
+
* consumer.
|
|
4807
|
+
*/
|
|
4808
|
+
allConstraints?: PptxSmartArtConstraint[];
|
|
4564
4809
|
children?: PptxSmartArtLayoutNode[];
|
|
4810
|
+
/**
|
|
4811
|
+
* The iterator attributes of the ENCLOSING `dgm:forEach` this node was
|
|
4812
|
+
* found through, when `nestedLayoutNodes` (`smartart-layout-definition
|
|
4813
|
+
* .ts`) reached it by walking one - as opposed to being a direct child of
|
|
4814
|
+
* its parent layoutNode, or reached only through a `dgm:choose` wrapper
|
|
4815
|
+
* (a condition, not an iteration, leaves this `undefined`).
|
|
4816
|
+
*
|
|
4817
|
+
* `forEach` above records a node's OWN direct `dgm:forEach` children
|
|
4818
|
+
* (which wrap ITS descendants); this is the opposite direction - the
|
|
4819
|
+
* forEach that wraps the node ITSELF, one level up. A layoutNode can sit
|
|
4820
|
+
* inside more than one enclosing forEach only via nesting, so this is
|
|
4821
|
+
* always the SINGLE nearest one, not a list.
|
|
4822
|
+
*
|
|
4823
|
+
* This is what tells a genuinely repeated per-child template
|
|
4824
|
+
* (`axis="ch"`, `ptType` absent or `"node"`) apart from a once-only or
|
|
4825
|
+
* transition-only sibling that merely happens to sit inside SOME
|
|
4826
|
+
* `dgm:forEach` (a `ptType="parTrans"`/`"sibTrans"` connector, or
|
|
4827
|
+
* `axis="followSib" cnt="1"`) - both can be direct siblings under the
|
|
4828
|
+
* SAME parent layoutNode (`lProcess1`'s `vertFlow` has one forEach for
|
|
4829
|
+
* its `parTrans` connector and a SEPARATE one, `axis="ch"`, for its
|
|
4830
|
+
* repeated `child` items; `vertFlow.forEach` bundles both, but only
|
|
4831
|
+
* `child.forEachOrigin` says which ONE produced it). See
|
|
4832
|
+
* `smartart-layout-interpreter-item-roles-recursive.ts`, the one
|
|
4833
|
+
* consumer. Read-only / interpretation-only, like `allConstraints`:
|
|
4834
|
+
* never round-tripped by `applySmartArtLayoutDefinition`.
|
|
4835
|
+
*/
|
|
4836
|
+
forEachOrigin?: PptxSmartArtIteratorAttributes;
|
|
4837
|
+
/**
|
|
4838
|
+
* The condition of the NEAREST enclosing `dgm:if` this node was found
|
|
4839
|
+
* through, when `nestedLayoutNodes` (`smartart-layout-definition.ts`)
|
|
4840
|
+
* reached it via a `dgm:choose`'s `if` branch (as opposed to a direct
|
|
4841
|
+
* child, a `dgm:else` branch - always `undefined` here, see below - or a
|
|
4842
|
+
* `dgm:forEach`, which sets {@link forEachOrigin} instead). Lets a
|
|
4843
|
+
* caller that already has the data-model node list decide whether this
|
|
4844
|
+
* node's OWN branch is genuinely live for a specific point, instead of
|
|
4845
|
+
* treating every choose-flattened branch as unconditionally present
|
|
4846
|
+
* (`nestedLayoutNodes`' pre-existing "flatten every branch" convention,
|
|
4847
|
+
* still the default when this is absent or a caller does not evaluate
|
|
4848
|
+
* it) - e.g. `cycle-matrix--fallback-n2.pptx`'s `child1group`..
|
|
4849
|
+
* `child4group`, each gated on a DIFFERENT top-level point existing and
|
|
4850
|
+
* having its own child (`axis="ch ch" st="N 1" cnt="1 0" func="cnt"
|
|
4851
|
+
* op="gte" val="1"`).
|
|
4852
|
+
*
|
|
4853
|
+
* Deliberately `undefined` for a `dgm:else` branch: ECMA-376 defines it
|
|
4854
|
+
* as "none of the sibling ifs matched", which would need the FULL
|
|
4855
|
+
* sibling list's conditions negated and ANDed together, not a single
|
|
4856
|
+
* condition - no gallery fixture measured needs an else branch's own
|
|
4857
|
+
* guard yet, so it is left unconditional (rendered by default, matching
|
|
4858
|
+
* the pre-existing flatten-everything behaviour) rather than guessed at.
|
|
4859
|
+
* Evaluate with `smartart-layout-interpreter-when.ts`'s `evaluateWhen`.
|
|
4860
|
+
*/
|
|
4861
|
+
chooseGuard?: PptxSmartArtWhen;
|
|
4565
4862
|
}
|
|
4566
4863
|
/** Metadata and root node from DiagramML CT_DiagramDefinition. */
|
|
4567
4864
|
interface PptxSmartArtLayoutDefinition {
|
|
@@ -5194,6 +5491,14 @@ interface PptxSmartArtData {
|
|
|
5194
5491
|
* Consulted by the fallback layout engine for direction/org-chart hints.
|
|
5195
5492
|
*/
|
|
5196
5493
|
presLayoutVars?: PptxSmartArtPresLayoutVars;
|
|
5494
|
+
/**
|
|
5495
|
+
* The deck's own theme minor-Latin font (`a:fontScheme/a:minorFont/a:latin/
|
|
5496
|
+
* @typeface`): what SmartArt text actually renders in when no per-run
|
|
5497
|
+
* `a:latin` override is present (the common case - see
|
|
5498
|
+
* `smartart-layout-item-font-size.ts`'s font-fit, the one consumer).
|
|
5499
|
+
* Undefined when the theme carries no font scheme at all.
|
|
5500
|
+
*/
|
|
5501
|
+
themeMinorFont?: string;
|
|
5197
5502
|
/** Relationship ID for the diagram data part (for round-trip save). */
|
|
5198
5503
|
dataRelId?: string;
|
|
5199
5504
|
/** Relationship ID for the diagram layout part. */
|
|
@@ -6153,7 +6458,7 @@ interface SmartArtPptxElement extends PptxElementBase {
|
|
|
6153
6458
|
*
|
|
6154
6459
|
* Used to show type-specific icons and previews in the editor.
|
|
6155
6460
|
*/
|
|
6156
|
-
type OleObjectType = 'excel' | 'word' | 'pdf' | 'visio' | 'mathtype' | 'package' | 'unknown';
|
|
6461
|
+
type OleObjectType = 'excel' | 'word' | 'powerpoint' | 'pdf' | 'visio' | 'mathtype' | 'package' | 'unknown';
|
|
6157
6462
|
/**
|
|
6158
6463
|
* An OLE (Object Linking and Embedding) object.
|
|
6159
6464
|
*
|
|
@@ -6231,6 +6536,15 @@ interface OlePptxElement extends PptxElementBase {
|
|
|
6231
6536
|
* `false`; `undefined` means the source authored no explicit value.
|
|
6232
6537
|
*/
|
|
6233
6538
|
oleUpdateAutomatic?: boolean;
|
|
6539
|
+
/**
|
|
6540
|
+
* Set by the in-viewer OLE content editors (`ole-edit-api.ts`) whenever
|
|
6541
|
+
* `oleEmbeddedData` and/or `previewImageData` have been changed in memory
|
|
6542
|
+
* and still need to be written back into the saved package. Never
|
|
6543
|
+
* authored from a parsed file; purely an in-memory save signal, mirroring
|
|
6544
|
+
* `PptxSlide.isDirty`. The save writer clears it once the pending write
|
|
6545
|
+
* has been queued.
|
|
6546
|
+
*/
|
|
6547
|
+
oleContentDirty?: boolean;
|
|
6234
6548
|
/** Accessibility description from `p:nvGraphicFramePr/p:cNvPr/@descr`. */
|
|
6235
6549
|
altText?: string;
|
|
6236
6550
|
/** Accessibility title from `p:nvGraphicFramePr/p:cNvPr/@title`. */
|
|
@@ -6327,13 +6641,14 @@ interface MediaPptxElement extends PptxElementBase {
|
|
|
6327
6641
|
*/
|
|
6328
6642
|
isLinked?: boolean;
|
|
6329
6643
|
/**
|
|
6330
|
-
* Accessibility description from `p:nvGraphicFramePr/p:cNvPr/@descr
|
|
6331
|
-
*
|
|
6332
|
-
*
|
|
6333
|
-
*
|
|
6644
|
+
* Accessibility description. Read from `p:nvGraphicFramePr/p:cNvPr/@descr`
|
|
6645
|
+
* for the `p:graphicFrame`-shaped (SDK-created) media form, or from
|
|
6646
|
+
* `p:nvPicPr/p:cNvPr/@descr` for the `p:pic`-shaped media form (real
|
|
6647
|
+
* PowerPoint's usual authoring shape for a video/audio placeholder); see
|
|
6648
|
+
* `PptxHandlerRuntimePictureParsing.ts`.
|
|
6334
6649
|
*/
|
|
6335
6650
|
altText?: string;
|
|
6336
|
-
/** Accessibility title from `p:
|
|
6651
|
+
/** Accessibility title, from the same `@title` attribute on whichever `p:cNvPr` the media form uses. Same scope note as {@link altText}. */
|
|
6337
6652
|
title?: string;
|
|
6338
6653
|
/** Unrecognised graphicFrame extLst extensions, captured verbatim for round-trip. */
|
|
6339
6654
|
extensionXml?: PptxGraphicFrameExtension[];
|
|
@@ -6360,6 +6675,46 @@ interface GroupPptxElement extends PptxElementBase {
|
|
|
6360
6675
|
children: PptxElement[];
|
|
6361
6676
|
/** Fill style extracted from the group's `p:grpSpPr`, used for `a:grpFill` inheritance. */
|
|
6362
6677
|
groupFill?: ShapeStyle;
|
|
6678
|
+
/**
|
|
6679
|
+
* The SAME `p:grpSpPr` extraction as {@link groupFill}, kept whenever the
|
|
6680
|
+
* group carries a `p:grpSpPr` at all, regardless of whether it resolved to
|
|
6681
|
+
* a paintable fill.
|
|
6682
|
+
*
|
|
6683
|
+
* `groupFill` is `undefined` unless the group has a real fill, because
|
|
6684
|
+
* `getGroupChildParentFill`/`groupChildInheritedFill` (the `a:grpFill`
|
|
6685
|
+
* inheritance chain) must keep chaining through an ancestor's fill when
|
|
6686
|
+
* THIS group has none of its own. A group whose `p:grpSpPr` authors only
|
|
6687
|
+
* `a:effectLst` (shadow/glow/soft-edge/reflection, no fill) needs those
|
|
6688
|
+
* effects to still reach the renderer, so they are kept here under a name
|
|
6689
|
+
* that carries no fill-inheritance meaning. Currently only reflection is
|
|
6690
|
+
* read from it (`getComputedEffectStyle`); the rest of `a:effectLst` on a
|
|
6691
|
+
* group remains unsupported.
|
|
6692
|
+
*/
|
|
6693
|
+
groupEffectStyle?: ShapeStyle;
|
|
6694
|
+
/**
|
|
6695
|
+
* Exact EMU the group's own `a:chOff`/`a:chExt` (the coordinate space its
|
|
6696
|
+
* CHILDREN are authored in) were parsed from, alongside {@link
|
|
6697
|
+
* PptxElementBase.xEmu} etc for the group's own placement in its PARENT's
|
|
6698
|
+
* space. `undefined` when the source carried no usable `a:chOff`/`a:chExt`
|
|
6699
|
+
* (an SDK-created group, or one whose `a:xfrm` had no child-space data).
|
|
6700
|
+
*
|
|
6701
|
+
* Used by `group-xfrm-preservation.ts`'s `hasCapturedChildSpace` to decide
|
|
6702
|
+
* whether this group's original `a:chOff`/`a:chExt` can be re-emitted
|
|
6703
|
+
* verbatim (always true once captured, regardless of whether anything in
|
|
6704
|
+
* the subtree has moved or resized - only its DIRECT children's
|
|
6705
|
+
* `a:off`/`a:ext` are recomputed, via `invertChildIntoGroupSpace`, when
|
|
6706
|
+
* something changed), instead of the normalized `chOff 0,0` / `chExt ==
|
|
6707
|
+
* ext` space the writer falls back to when this is `undefined` (or
|
|
6708
|
+
* degenerate). See `group-shape-geometry.ts`'s module doc for why a group
|
|
6709
|
+
* needs two coordinate systems at all.
|
|
6710
|
+
*/
|
|
6711
|
+
chOffXEmu?: number;
|
|
6712
|
+
/** See {@link chOffXEmu}. */
|
|
6713
|
+
chOffYEmu?: number;
|
|
6714
|
+
/** See {@link chOffXEmu}. */
|
|
6715
|
+
chExtWidthEmu?: number;
|
|
6716
|
+
/** See {@link chOffXEmu}. */
|
|
6717
|
+
chExtHeightEmu?: number;
|
|
6363
6718
|
}
|
|
6364
6719
|
/**
|
|
6365
6720
|
* A freehand ink / drawing stroke captured with a stylus or mouse.
|
|
@@ -6388,6 +6743,24 @@ interface InkPptxElement extends PptxElementBase {
|
|
|
6388
6743
|
* variable-width strokes that reflect stylus/pen pressure.
|
|
6389
6744
|
*/
|
|
6390
6745
|
inkPointPressures?: number[][];
|
|
6746
|
+
/**
|
|
6747
|
+
* Per-path arrays of per-point pen-tilt lean direction (degrees, straight
|
|
6748
|
+
* from `PointerEvent.tiltX` on supporting hardware).
|
|
6749
|
+
*
|
|
6750
|
+
* Each entry corresponds to the path at the same index in `inkPaths`, and
|
|
6751
|
+
* is paired positionally with {@link inkPointTiltY}. Present only when at
|
|
6752
|
+
* least one point in the stroke reported a genuinely non-zero tilt: a
|
|
6753
|
+
* device that never reports tilt (a mouse, or a stylus with no tilt
|
|
6754
|
+
* sensor) leaves both arrays absent, the same way `inkPointPressures` is
|
|
6755
|
+
* omitted when pressure never varies. When present, the renderer converts
|
|
6756
|
+
* the raw `(tiltX, tiltY)` vector into a lean angle + magnitude (see
|
|
6757
|
+
* `pptx-viewer-shared`'s `tiltChannelsFromVectors`) and widens the stroke
|
|
6758
|
+
* perpendicular to the lean direction, approximating a chisel-tip
|
|
6759
|
+
* calligraphy nib.
|
|
6760
|
+
*/
|
|
6761
|
+
inkPointTiltX?: number[][];
|
|
6762
|
+
/** Per-path, per-point pen-tilt lean direction (degrees), paired with {@link inkPointTiltX}. */
|
|
6763
|
+
inkPointTiltY?: number[][];
|
|
6391
6764
|
/** Unrecognised graphicFrame extLst extensions, captured verbatim for round-trip. */
|
|
6392
6765
|
extensionXml?: PptxGraphicFrameExtension[];
|
|
6393
6766
|
}
|
|
@@ -6421,6 +6794,20 @@ interface ContentPartInkStroke {
|
|
|
6421
6794
|
* {@link tiltAngles}.
|
|
6422
6795
|
*/
|
|
6423
6796
|
tiltMagnitudes?: number[];
|
|
6797
|
+
/**
|
|
6798
|
+
* Which InkML channel pair {@link tiltAngles}/{@link tiltMagnitudes} were
|
|
6799
|
+
* decoded from: `'azimuthAltitude'` when the source declared `AZIMUTH`
|
|
6800
|
+
* (optionally paired with `ALTITUDE`); omitted (implying `OTx`/`OTy`, i.e.
|
|
6801
|
+
* `'vector'`) otherwise, including for tilt this library itself captured
|
|
6802
|
+
* from the Draw tool's `PointerEvent.tiltX`/`tiltY`.
|
|
6803
|
+
*
|
|
6804
|
+
* A save that has to rewrite this content part's InkML (see
|
|
6805
|
+
* `inkml-content-part-writer.ts`) uses this to re-declare the SAME channel
|
|
6806
|
+
* pair the file already used, rather than always converting to `OTx`/`OTy`;
|
|
6807
|
+
* the rendered lean is identical either way; only the written channel
|
|
6808
|
+
* NAMES differ.
|
|
6809
|
+
*/
|
|
6810
|
+
tiltEncoding?: 'vector' | 'azimuthAltitude';
|
|
6424
6811
|
}
|
|
6425
6812
|
/**
|
|
6426
6813
|
* A content-part element wrapped in `mc:AlternateContent`.
|
|
@@ -7077,10 +7464,27 @@ interface PptxNativeAnimation {
|
|
|
7077
7464
|
buildLevel?: number;
|
|
7078
7465
|
/** Group ID linking a `p:bldP` entry to its timing animation node. */
|
|
7079
7466
|
groupId?: string;
|
|
7080
|
-
/**
|
|
7467
|
+
/**
|
|
7468
|
+
* Sound relationship ID to play when animation triggers. Modern PowerPoint
|
|
7469
|
+
* (COM-verified against 2016) writes this as a `p:audio/p:cMediaNode`
|
|
7470
|
+
* sibling of the effect's own `p:childTnLst`, targeting `p:sndTgt` rather
|
|
7471
|
+
* than a shape; the legacy `p:stSnd` form (directly on `p:cTn`) is still
|
|
7472
|
+
* accepted on load for round-trip of older-authored decks, but PowerPoint
|
|
7473
|
+
* itself no longer writes it and does not recognise it back
|
|
7474
|
+
* (`Effect.EffectInformation.SoundEffect` reads empty against it).
|
|
7475
|
+
*/
|
|
7081
7476
|
soundRId?: string;
|
|
7082
7477
|
/** Resolved sound file path from relationship. */
|
|
7083
7478
|
soundPath?: string;
|
|
7479
|
+
/**
|
|
7480
|
+
* The embedded sound's `@_name` (from `p:snd`/`p:sndTgt`). For one of
|
|
7481
|
+
* PowerPoint's 19 built-in stock sounds this is the exact upper-case file
|
|
7482
|
+
* name PowerPoint itself writes (e.g. `"CHIMES.WAV"`); see
|
|
7483
|
+
* `pptx-viewer-shared`'s `effect-sound-catalogue.ts`, which matches this
|
|
7484
|
+
* value back to a gallery entry. Absent for a custom sound with no name,
|
|
7485
|
+
* or when unresolved.
|
|
7486
|
+
*/
|
|
7487
|
+
soundName?: string;
|
|
7084
7488
|
/** Whether to stop any currently playing sound (`p:endSnd`). */
|
|
7085
7489
|
stopSound?: boolean;
|
|
7086
7490
|
/**
|
|
@@ -7245,17 +7649,28 @@ interface PptxNativeAnimation {
|
|
|
7245
7649
|
*/
|
|
7246
7650
|
afterEffect?: boolean;
|
|
7247
7651
|
/**
|
|
7248
|
-
* "After animation" end-state behaviour
|
|
7249
|
-
*
|
|
7250
|
-
*
|
|
7251
|
-
*
|
|
7252
|
-
*
|
|
7253
|
-
*
|
|
7254
|
-
*
|
|
7652
|
+
* "After animation" end-state behaviour: dim-to-colour, hide-after-
|
|
7653
|
+
* animation, or hide-on-next-click. Populated directly by the
|
|
7654
|
+
* native-timing parser (`native-animation-after-effect.ts`) when the
|
|
7655
|
+
* effect's `p:cTn/p:subTnLst` carries PowerPoint's genuine after-effect
|
|
7656
|
+
* shape, so a real-world deck's build shows up here even with no
|
|
7657
|
+
* `pptx:editorMeta`. `applyAfterAnimationFromEditorList` in
|
|
7658
|
+
* `pptx-viewer-shared` overrides this from the matching
|
|
7659
|
+
* {@link PptxElementAnimation.afterAnimation} entry when the editor's
|
|
7660
|
+
* per-element animation list has one (the model the animation panel
|
|
7661
|
+
* writes `afterAnimation` into), so an edit through our own UI always wins.
|
|
7255
7662
|
*/
|
|
7256
7663
|
afterAnimationAction?: PptxAfterAnimationAction;
|
|
7257
|
-
/** Dim-to color hex, present when {@link afterAnimationAction} is `dimToColor`. */
|
|
7664
|
+
/** Dim-to color hex, present when {@link afterAnimationAction} is `dimToColor` AND the dim target is an already-resolved `a:srgbClr`. */
|
|
7258
7665
|
afterAnimationColor?: string;
|
|
7666
|
+
/**
|
|
7667
|
+
* The typed theme reference when a `dimToColor` target is an `a:schemeClr`
|
|
7668
|
+
* (e.g. `accent2`) instead of `a:srgbClr`: this parse layer has no theme to
|
|
7669
|
+
* resolve it to sRGB with (see {@link afterAnimationColor}'s doc), so a
|
|
7670
|
+
* playback consumer resolves this against the deck's theme colour map.
|
|
7671
|
+
* Mutually exclusive with {@link afterAnimationColor} being set.
|
|
7672
|
+
*/
|
|
7673
|
+
afterAnimationColorRef?: PptxThemeColorRef;
|
|
7259
7674
|
/**
|
|
7260
7675
|
* Parsed `p:animEffect` filter descriptor. `presetId`/`presetClass` remain
|
|
7261
7676
|
* the primary effect selector (see `resolveEffect` in `pptx-viewer-shared`);
|
|
@@ -7387,13 +7802,46 @@ interface PptxAnimationKeyframe {
|
|
|
7387
7802
|
* fidelity; consumers may use it to drive computed animation values.
|
|
7388
7803
|
*/
|
|
7389
7804
|
fmla?: string;
|
|
7805
|
+
/**
|
|
7806
|
+
* The typed theme reference when a `p:val/p:clrVal` stop is an
|
|
7807
|
+
* `a:schemeClr` (e.g. `accent1`), including any `tint`/`shade`/`lumMod`/
|
|
7808
|
+
* `lumOff`/`alpha` children. {@link value} keeps the bare scheme name for
|
|
7809
|
+
* round-trip; a playback consumer needs this ref (resolved against the
|
|
7810
|
+
* deck's theme colour map) to turn the stop into a real CSS colour, which
|
|
7811
|
+
* the bare name alone cannot do. Absent for an `a:srgbClr` stop, whose
|
|
7812
|
+
* {@link value} is already a resolved `#rrggbb` hex string.
|
|
7813
|
+
*/
|
|
7814
|
+
colorRef?: PptxThemeColorRef;
|
|
7390
7815
|
}
|
|
7391
7816
|
/** One generic `p:anim` behaviour inside a composed PowerPoint effect. */
|
|
7392
7817
|
interface PptxAttributeAnimation {
|
|
7393
7818
|
/** Lowercased target attribute from `p:attrNameLst`. */
|
|
7394
7819
|
attrName: string;
|
|
7395
|
-
/**
|
|
7820
|
+
/**
|
|
7821
|
+
* Authored value stops from this behaviour's `p:tavLst`. Empty when the
|
|
7822
|
+
* behaviour instead uses the simpler `from`/`to`/`by` attribute form (see
|
|
7823
|
+
* below); at least one of `keyframes`, `from`/`to`, or `by` is present.
|
|
7824
|
+
*/
|
|
7396
7825
|
keyframes: PptxAnimationKeyframe[];
|
|
7826
|
+
/**
|
|
7827
|
+
* `p:anim/@_from` (a formula string, ECMA-376 S19.5.4 CT_TLAnimateBehavior):
|
|
7828
|
+
* the absolute starting value, used instead of `p:tavLst` when the
|
|
7829
|
+
* behaviour only has two endpoints. PowerPoint writes this form for some
|
|
7830
|
+
* built-in presets (e.g. "Grow And Turn"'s `ppt_x` fly-in): a bare
|
|
7831
|
+
* `p:anim from="..." to="..."` with no `p:tavLst` child at all. See
|
|
7832
|
+
* `animation-ppt-formula-ground-truth.md` in `pptx-viewer-shared` for the
|
|
7833
|
+
* real-PowerPoint sample this was found in.
|
|
7834
|
+
*/
|
|
7835
|
+
from?: string;
|
|
7836
|
+
/** `p:anim/@_to`: the absolute ending value. See {@link from}. */
|
|
7837
|
+
to?: string;
|
|
7838
|
+
/**
|
|
7839
|
+
* `p:anim/@_by`: a DELTA formula added to wherever the attribute already
|
|
7840
|
+
* stands (as opposed to `from`/`to`'s absolute values), typically paired
|
|
7841
|
+
* with `p:cBhvr/@_additive="sum"` so it composites with a sibling
|
|
7842
|
+
* behaviour driving the same attribute instead of replacing it.
|
|
7843
|
+
*/
|
|
7844
|
+
by?: string;
|
|
7397
7845
|
/** Duration from this behaviour's nested `p:cTn/@dur`. */
|
|
7398
7846
|
durationMs?: number;
|
|
7399
7847
|
/** Start offset from this behaviour's nested `p:stCondLst`. */
|
|
@@ -7402,8 +7850,11 @@ interface PptxAttributeAnimation {
|
|
|
7402
7850
|
* Interpolation mode from this behaviour's own `@_calcmode`
|
|
7403
7851
|
* (ST_TLAnimateBehaviorCalcMode, ECMA-376 S19.5.2): `discrete` snaps to
|
|
7404
7852
|
* each `p:tav` stop with no interpolation, `lin` (the OOXML default)
|
|
7405
|
-
* interpolates linearly
|
|
7406
|
-
*
|
|
7853
|
+
* interpolates linearly. `fmla` as the WHOLE behaviour's calc mode has
|
|
7854
|
+
* never been observed in a real PowerPoint file and is not consulted at
|
|
7855
|
+
* playback; what PowerPoint actually writes is `calcmode="lin"` with a
|
|
7856
|
+
* per-stop `p:tav/@fmla` (see {@link PptxAnimationKeyframe.fmla}), which
|
|
7857
|
+
* IS consulted regardless of this field's value. Absent means `lin`.
|
|
7407
7858
|
*/
|
|
7408
7859
|
calcMode?: 'discrete' | 'lin' | 'fmla';
|
|
7409
7860
|
}
|
|
@@ -7429,16 +7880,31 @@ interface PptxColorAnimation {
|
|
|
7429
7880
|
* companion to `@dir` for HSL colour-space animations.
|
|
7430
7881
|
*/
|
|
7431
7882
|
path?: string;
|
|
7432
|
-
/** Starting color as hex string. */
|
|
7883
|
+
/** Starting color as hex string, or the bare scheme name (e.g. `accent1`) for a theme colour; see {@link fromColorRef}. */
|
|
7433
7884
|
fromColor?: string;
|
|
7434
|
-
/** Ending color as hex string. */
|
|
7885
|
+
/** Ending color as hex string, or the bare scheme name; see {@link toColorRef}. */
|
|
7435
7886
|
toColor?: string;
|
|
7436
7887
|
/**
|
|
7437
|
-
* Color delta (for "by" animations) as hex string
|
|
7438
|
-
*
|
|
7439
|
-
*
|
|
7888
|
+
* Color delta (for "by" animations) as hex string, or the bare scheme name;
|
|
7889
|
+
* see {@link byColorRef}. For HSL colour-space animations this retains the
|
|
7890
|
+
* historical byte-packed compatibility value; consumers should prefer
|
|
7891
|
+
* {@link hslDelta}, which preserves signed values.
|
|
7440
7892
|
*/
|
|
7441
7893
|
byColor?: string;
|
|
7894
|
+
/**
|
|
7895
|
+
* The typed theme reference when {@link fromColor} is an `a:schemeClr`
|
|
7896
|
+
* (including `tint`/`shade`/`lumMod`/`lumOff`/`alpha`), so playback can
|
|
7897
|
+
* resolve it against the deck's theme colour map. Absent when `fromColor`
|
|
7898
|
+
* is already a resolved `#rrggbb` hex (an `a:srgbClr` stop).
|
|
7899
|
+
*/
|
|
7900
|
+
fromColorRef?: PptxThemeColorRef;
|
|
7901
|
+
/** The typed theme reference for {@link toColor}; see {@link fromColorRef}. */
|
|
7902
|
+
toColorRef?: PptxThemeColorRef;
|
|
7903
|
+
/**
|
|
7904
|
+
* The typed theme reference for {@link byColor} (RGB colour space only; an
|
|
7905
|
+
* HSL `by` is a signed delta, never a theme colour). See {@link fromColorRef}.
|
|
7906
|
+
*/
|
|
7907
|
+
byColorRef?: PptxThemeColorRef;
|
|
7442
7908
|
/**
|
|
7443
7909
|
* Typed HSL delta from `p:by/p:hsl`. This preserves signed values and their
|
|
7444
7910
|
* OOXML units without forcing them through the legacy byte-packed `byColor`
|
|
@@ -7578,10 +8044,24 @@ interface PptxElementAnimation {
|
|
|
7578
8044
|
motionPathRotationCenterX?: number;
|
|
7579
8045
|
/** Motion-path rotation centre Y in slide percentage units (`p:rCtr/@y`). */
|
|
7580
8046
|
motionPathRotationCenterY?: number;
|
|
7581
|
-
/**
|
|
8047
|
+
/**
|
|
8048
|
+
* Sound relationship ID to play when animation triggers. Written on save
|
|
8049
|
+
* as a `p:audio/p:cMediaNode` sibling of the effect's own `p:childTnLst`
|
|
8050
|
+
* (see `PptxNativeAnimation.soundRId` for the COM-verified detail).
|
|
8051
|
+
*/
|
|
7582
8052
|
soundRId?: string;
|
|
7583
8053
|
/** Resolved sound file path from relationship. */
|
|
7584
8054
|
soundPath?: string;
|
|
8055
|
+
/**
|
|
8056
|
+
* The `@_name` to write on the embedded sound (`p:sndTgt`). For a stock
|
|
8057
|
+
* gallery pick this is the exact PowerPoint file name (e.g.
|
|
8058
|
+
* `"CHIMES.WAV"`), which is what makes PowerPoint itself recognise the
|
|
8059
|
+
* sound as that built-in entry when it reopens the saved deck (there is no
|
|
8060
|
+
* separate "built-in" flag anywhere in the schema). Set by
|
|
8061
|
+
* `pptx-viewer-shared`'s `setEffectSound` when the pick carries a
|
|
8062
|
+
* `soundName`; absent for a custom file with no meaningful name.
|
|
8063
|
+
*/
|
|
8064
|
+
soundName?: string;
|
|
7585
8065
|
/** Whether to stop any currently playing sound (`p:endSnd`). */
|
|
7586
8066
|
stopSound?: boolean;
|
|
7587
8067
|
/**
|
|
@@ -7596,7 +8076,9 @@ interface PptxElementAnimation {
|
|
|
7596
8076
|
/**
|
|
7597
8077
|
* Display name for the chosen sound (e.g. the uploaded file's name),
|
|
7598
8078
|
* shown by the authoring UI's sound picker. Purely cosmetic; has no
|
|
7599
|
-
* OOXML equivalent and is not required for playback.
|
|
8079
|
+
* OOXML equivalent and is not required for playback. For a stock gallery
|
|
8080
|
+
* pick, the UI derives its label from {@link soundName} via the catalogue
|
|
8081
|
+
* instead of this field.
|
|
7600
8082
|
*/
|
|
7601
8083
|
soundFileName?: string;
|
|
7602
8084
|
/**
|
|
@@ -8651,13 +9133,13 @@ interface PptxSlide {
|
|
|
8651
9133
|
backgroundPattern?: PptxSlideBackgroundPattern;
|
|
8652
9134
|
/**
|
|
8653
9135
|
* `<p:bgPr/@shadeToTitle>`: boolean flag instructing the renderer to
|
|
8654
|
-
*
|
|
8655
|
-
*
|
|
8656
|
-
*
|
|
9136
|
+
* anchor the background gradient on the title placeholder as a
|
|
9137
|
+
* rectangular path gradient (COM-measured against real PowerPoint;
|
|
9138
|
+
* it does NOT recolour toward the title's text colour, despite the
|
|
9139
|
+
* attribute's name). Parsed and round-tripped here on the core model;
|
|
9140
|
+
* the actual visual effect is applied by `pptx-viewer-shared`'s
|
|
8657
9141
|
* `getSlideBackgroundStyle` (see `render/background-shade-to-title.ts`),
|
|
8658
|
-
* consumed by all five bindings, not by core itself.
|
|
8659
|
-
* docstring explains the approximation: no published ECMA-376 or
|
|
8660
|
-
* MS-ODRAWXML text documents the exact legacy blend. Legacy PowerPoint
|
|
9142
|
+
* consumed by all five bindings, not by core itself. Legacy PowerPoint
|
|
8661
9143
|
* 97-2003 hint, not observed in any real-world corpus file this project
|
|
8662
9144
|
* has collected and not settable from any modern PowerPoint UI; see
|
|
8663
9145
|
* `docs/guide/limitations.md`.
|
|
@@ -9944,7 +10426,7 @@ interface PptxHandlerLoadOptions {
|
|
|
9944
10426
|
allowExternalImages?: boolean;
|
|
9945
10427
|
}
|
|
9946
10428
|
/** Output format for the save pipeline. */
|
|
9947
|
-
type PptxSaveFormat = 'pptx' | 'ppsx' | 'pptm';
|
|
10429
|
+
type PptxSaveFormat = 'pptx' | 'ppsx' | 'pptm' | 'ppt';
|
|
9948
10430
|
interface PptxHandlerSaveOptions {
|
|
9949
10431
|
headerFooter?: PptxHeaderFooter;
|
|
9950
10432
|
presentationProperties?: PptxPresentationProperties;
|
|
@@ -10040,8 +10522,23 @@ interface PptxHandlerSaveOptions {
|
|
|
10040
10522
|
* - `'pptx'` (default): Standard presentation.
|
|
10041
10523
|
* - `'ppsx'`: Slide-show file (opens in presentation mode).
|
|
10042
10524
|
* - `'pptm'`: Macro-enabled presentation (requires VBA data).
|
|
10525
|
+
* - `'ppt'`: Legacy binary PowerPoint 97-2003 presentation. Bypasses the
|
|
10526
|
+
* OOXML ZIP pipeline entirely; see `PptxHandlerRuntimeSaveLegacyPpt`.
|
|
10527
|
+
* Elements with no binary equivalent (charts, SmartArt, media, OLE, ink,
|
|
10528
|
+
* 3D models) are degraded to a rasterised preview picture or a labelled
|
|
10529
|
+
* placeholder, each reported via a `scope: 'save'`-adjacent
|
|
10530
|
+
* `PptxCompatibilityWarning`.
|
|
10043
10531
|
*/
|
|
10044
10532
|
outputFormat?: PptxSaveFormat;
|
|
10533
|
+
/**
|
|
10534
|
+
* Password for RC4 CryptoAPI encryption of a `'ppt'`-format save. Ignored
|
|
10535
|
+
* for every other {@link outputFormat}; encrypting a `.pptx`/`.ppsx`/`.pptm`
|
|
10536
|
+
* save uses {@link IPptxHandlerRuntime.saveEncrypted}'s separate AES/Agile
|
|
10537
|
+
* OLE2 wrapping instead, since the legacy binary format's own encryption
|
|
10538
|
+
* scheme is embedded directly in the `.ppt` stream rather than wrapping an
|
|
10539
|
+
* already-produced package.
|
|
10540
|
+
*/
|
|
10541
|
+
pptPassword?: string;
|
|
10045
10542
|
/**
|
|
10046
10543
|
* Embedded fonts to write back (or add) to the saved PPTX.
|
|
10047
10544
|
*
|
|
@@ -10899,6 +11396,23 @@ declare const THEME_CATALOG: readonly ThemeCatalogEntry[];
|
|
|
10899
11396
|
/** Look up a catalog entry by key, falling back to `undefined` (the built-in default) if not found. */
|
|
10900
11397
|
declare function resolveThemeCatalogEntry(key: string | undefined, catalog?: readonly ThemeCatalogEntry[]): ViewerTheme | undefined;
|
|
10901
11398
|
|
|
11399
|
+
//#region src/render/animation-text-style-resolve.d.ts
|
|
11400
|
+
/**
|
|
11401
|
+
* Framework-neutral text-style override a font-style emphasis effect applies
|
|
11402
|
+
* on top of its target's own authored per-run bold/italic/underline/size/
|
|
11403
|
+
* colour. Every binding maps this onto its own text container so it OVERRIDES
|
|
11404
|
+
* the runs' inline styles (the runs carry explicit inline styles of their
|
|
11405
|
+
* own, so plain CSS inheritance cannot reach them).
|
|
11406
|
+
*/
|
|
11407
|
+
interface TextStyleAnimationDescriptor {
|
|
11408
|
+
bold?: boolean;
|
|
11409
|
+
italic?: boolean;
|
|
11410
|
+
underline?: boolean;
|
|
11411
|
+
/** Relative multiplier against each run's own authored font size. */
|
|
11412
|
+
fontScale?: number;
|
|
11413
|
+
color?: string;
|
|
11414
|
+
}
|
|
11415
|
+
|
|
10902
11416
|
/** Viewer interaction mode: read-only, edit, presentation, or master-view. */
|
|
10903
11417
|
type ViewerMode = 'preview' | 'edit' | 'present' | 'master';
|
|
10904
11418
|
/**
|
|
@@ -11065,22 +11579,15 @@ interface CollaborationConfig {
|
|
|
11065
11579
|
writeBackDebounceMs?: number;
|
|
11066
11580
|
}
|
|
11067
11581
|
//#endregion
|
|
11068
|
-
//#region src/render/animation-
|
|
11582
|
+
//#region src/render/animation-timeline-build-descriptors.d.ts
|
|
11069
11583
|
/**
|
|
11070
|
-
*
|
|
11071
|
-
*
|
|
11072
|
-
*
|
|
11073
|
-
*
|
|
11074
|
-
*
|
|
11584
|
+
* `animation-timeline-build-descriptors` - staged-build (`p:bldChart` /
|
|
11585
|
+
* `p:bldDgm`) reveal descriptor types, split out of `animation-timeline-types`
|
|
11586
|
+
* to keep that module under the file-size limit. Re-exported from
|
|
11587
|
+
* `animation-timeline-types` so existing imports are unaffected.
|
|
11588
|
+
*
|
|
11589
|
+
* @module render/animation-timeline-build-descriptors
|
|
11075
11590
|
*/
|
|
11076
|
-
interface TextStyleAnimationDescriptor {
|
|
11077
|
-
bold?: boolean;
|
|
11078
|
-
italic?: boolean;
|
|
11079
|
-
underline?: boolean;
|
|
11080
|
-
/** Relative multiplier against each run's own authored font size. */
|
|
11081
|
-
fontScale?: number;
|
|
11082
|
-
color?: string;
|
|
11083
|
-
}
|
|
11084
11591
|
/**
|
|
11085
11592
|
* Normalized staged-reveal mode for a chart graphic frame, derived from the
|
|
11086
11593
|
* OOXML `a:bldChart/@bld` (or `p:bldOleChart/@bld`) token:
|
|
@@ -11114,12 +11621,12 @@ interface ChartRevealPoint {
|
|
|
11114
11621
|
* Playback-time chart reveal state derived from AUTHORED `p:graphicEl`
|
|
11115
11622
|
* indices (see `chart-reveal-descriptor`'s `resolveChartRevealDescriptor`),
|
|
11116
11623
|
* rather than from click-count/time progress. Present on
|
|
11117
|
-
* {@link ElementAnimationState.chartReveal}
|
|
11118
|
-
* chart-build step for the element carried index data;
|
|
11119
|
-
* this over the progress-based `build`/`ElementBuildState`
|
|
11120
|
-
* since it reflects the real authored reveal set (correct
|
|
11121
|
-
* reversed-order or gapped chart build), and falls back to `build`
|
|
11122
|
-
* absent.
|
|
11624
|
+
* {@link import('./animation-timeline-group').ElementAnimationState.chartReveal}
|
|
11625
|
+
* only when every fired chart-build step for the element carried index data;
|
|
11626
|
+
* a renderer prefers this over the progress-based `build`/`ElementBuildState`
|
|
11627
|
+
* path when present, since it reflects the real authored reveal set (correct
|
|
11628
|
+
* even for a reversed-order or gapped chart build), and falls back to `build`
|
|
11629
|
+
* when absent.
|
|
11123
11630
|
*/
|
|
11124
11631
|
interface ChartRevealDescriptor {
|
|
11125
11632
|
/**
|
|
@@ -11140,12 +11647,13 @@ interface ChartRevealDescriptor {
|
|
|
11140
11647
|
* Playback-time SmartArt diagram reveal state derived from AUTHORED
|
|
11141
11648
|
* `p:graphicEl/p:dgm/@id` indices (see `diagram-reveal-descriptor`'s
|
|
11142
11649
|
* `resolveDiagramRevealDescriptor`), rather than from click-count/time
|
|
11143
|
-
* progress. Present on
|
|
11144
|
-
*
|
|
11145
|
-
*
|
|
11146
|
-
*
|
|
11147
|
-
*
|
|
11148
|
-
*
|
|
11650
|
+
* progress. Present on
|
|
11651
|
+
* {@link import('./animation-timeline-group').ElementAnimationState.diagramReveal}
|
|
11652
|
+
* only when every fired diagram-build step for the element carried
|
|
11653
|
+
* `p:graphicEl` data. A SmartArt renderer prefers this over the
|
|
11654
|
+
* progress-based `build` / {@link ElementBuildState} path when present, since
|
|
11655
|
+
* it reflects the real authored reveal set (correct even for a
|
|
11656
|
+
* reversed-order or by-branch build), and falls back to `build` when absent.
|
|
11149
11657
|
*/
|
|
11150
11658
|
interface DiagramRevealDescriptor {
|
|
11151
11659
|
/**
|
|
@@ -11158,9 +11666,11 @@ interface DiagramRevealDescriptor {
|
|
|
11158
11666
|
nodeIds: ReadonlySet<string>;
|
|
11159
11667
|
}
|
|
11160
11668
|
/**
|
|
11161
|
-
* Playback-time staged-build state surfaced on
|
|
11162
|
-
*
|
|
11163
|
-
*
|
|
11669
|
+
* Playback-time staged-build state surfaced on
|
|
11670
|
+
* {@link import('./animation-timeline-group').ElementAnimationState}.
|
|
11671
|
+
* `progress` is the 0..1 fraction of the build revealed at the current
|
|
11672
|
+
* playback time; a consumer maps it to its own item COUNT (see
|
|
11673
|
+
* `revealedStageCount`).
|
|
11164
11674
|
*/
|
|
11165
11675
|
type ElementBuildState = {
|
|
11166
11676
|
kind: 'chart';
|
|
@@ -11223,14 +11733,14 @@ interface ElementAnimationState {
|
|
|
11223
11733
|
animatesStroke?: boolean;
|
|
11224
11734
|
/**
|
|
11225
11735
|
* Active discrete font-style / colour / size override (see
|
|
11226
|
-
* {@link TimelineStep.textStyle}) a
|
|
11227
|
-
* applies to this element's text,
|
|
11228
|
-
* bold/italic/underline/size/colour.
|
|
11229
|
-
* this on step start and again on
|
|
11230
|
-
* `p:cTn/@fill` holds its end
|
|
11231
|
-
* maps it onto its run markup
|
|
11232
|
-
* (`animation-text-style-css.ts`). Absent
|
|
11233
|
-
* effect is currently active on this element.
|
|
11736
|
+
* {@link import('./animation-timeline-step').TimelineStep.textStyle}) a
|
|
11737
|
+
* font-style emphasis effect currently applies to this element's text,
|
|
11738
|
+
* OVERRIDING the runs' own inline bold/italic/underline/size/colour.
|
|
11739
|
+
* `animation-playback-engine.ts` writes this on step start and again on
|
|
11740
|
+
* cleanup (held in full when the effect's `p:cTn/@fill` holds its end
|
|
11741
|
+
* state, otherwise reverted); a text renderer maps it onto its run markup
|
|
11742
|
+
* via `buildTextStyleOverrideCss` (`animation-text-style-css.ts`). Absent
|
|
11743
|
+
* means no font-style emphasis effect is currently active on this element.
|
|
11234
11744
|
*/
|
|
11235
11745
|
textStyle?: TextStyleAnimationDescriptor;
|
|
11236
11746
|
}
|
|
@@ -11429,16 +11939,17 @@ interface ViewerFontSource {
|
|
|
11429
11939
|
* working loader unreachable in practice. Whenever the loader learns a format,
|
|
11430
11940
|
* exactly one list has to change.
|
|
11431
11941
|
*
|
|
11432
|
-
* ## Read many, write
|
|
11942
|
+
* ## Read many, write several
|
|
11433
11943
|
*
|
|
11434
11944
|
* Input is a superset of output. We READ `.pptx`, `.ppsx`, `.pptm`, `.potx`,
|
|
11435
|
-
* legacy binary `.ppt` and portable `pptx-viewer-json`; we WRITE
|
|
11436
|
-
*
|
|
11437
|
-
*
|
|
11438
|
-
*
|
|
11439
|
-
* rather than keeping
|
|
11440
|
-
* `report.
|
|
11441
|
-
* the kind of
|
|
11945
|
+
* legacy binary `.ppt` and portable `pptx-viewer-json`; we WRITE the OpenXML
|
|
11946
|
+
* family plus legacy binary `.ppt` (via `packages/core/src/core/ppt/writer/`,
|
|
11947
|
+
* a real MS-PPT/OLE2 encoder, not a stub). `savedPresentationFileName`
|
|
11948
|
+
* REPLACES the source extension with the extension of the format actually
|
|
11949
|
+
* being written rather than keeping the source's: a deck opened as
|
|
11950
|
+
* `report.pptx` and saved back as `.ppt` (or vice versa) must have its name
|
|
11951
|
+
* agree with its bytes, which is the kind of mismatch PowerPoint itself
|
|
11952
|
+
* refuses to open.
|
|
11442
11953
|
*
|
|
11443
11954
|
* This module deliberately imports nothing, so any layer (render, export, a
|
|
11444
11955
|
* binding, a host app) can depend on it without risking an import cycle.
|
|
@@ -11467,10 +11978,14 @@ declare const PPTX_OPEN_ACCEPT: string;
|
|
|
11467
11978
|
* before it hands bytes to the loader.
|
|
11468
11979
|
*/
|
|
11469
11980
|
declare function isSupportedPresentationFile(name: string | null | undefined): boolean;
|
|
11470
|
-
/**
|
|
11981
|
+
/**
|
|
11982
|
+
* True for the binary PowerPoint 97-2003 family. `.ppt` itself is now also a
|
|
11983
|
+
* SAVE target (see {@link SavedPresentationFormat}); `.pps`/`.pot` (97-2003
|
|
11984
|
+
* show/template) remain read-only siblings sharing the same record format.
|
|
11985
|
+
*/
|
|
11471
11986
|
declare function isLegacyBinaryPresentation(name: string | null | undefined): boolean;
|
|
11472
|
-
/** The formats the save path can produce.
|
|
11473
|
-
type SavedPresentationFormat = 'pptx' | 'ppsx' | 'pptm';
|
|
11987
|
+
/** The formats the save path can produce. */
|
|
11988
|
+
type SavedPresentationFormat = 'pptx' | 'ppsx' | 'pptm' | 'ppt';
|
|
11474
11989
|
/**
|
|
11475
11990
|
* The stem of a presentation file name: directories and any loadable extension
|
|
11476
11991
|
* removed. `C:\decks\report.ppt` becomes `report`; a name with no recognised
|
|
@@ -11482,9 +11997,10 @@ declare function presentationBaseName(sourceName: string | null | undefined, fal
|
|
|
11482
11997
|
* The name a saved copy should be offered under: the source stem plus the
|
|
11483
11998
|
* extension of the format actually being written.
|
|
11484
11999
|
*
|
|
11485
|
-
* This is what turns `report.ppt` into `report.pptx` on Save As
|
|
11486
|
-
*
|
|
11487
|
-
* the
|
|
12000
|
+
* This is what turns `report.ppt` into `report.pptx` on a regular Save As,
|
|
12001
|
+
* and `report.pptx` into `report.ppt` when the user explicitly picks the
|
|
12002
|
+
* PowerPoint 97-2003 format. Keeping the source extension would mislabel the
|
|
12003
|
+
* bytes either way.
|
|
11488
12004
|
*/
|
|
11489
12005
|
declare function savedPresentationFileName(sourceName: string | null | undefined, format?: SavedPresentationFormat): string;
|
|
11490
12006
|
//#endregion
|
|
@@ -12476,6 +12992,7 @@ interface ToolbarProps {
|
|
|
12476
12992
|
onSaveAsPptx: () => void;
|
|
12477
12993
|
onSaveAsPpsx: () => void;
|
|
12478
12994
|
onSaveAsPptm: () => void;
|
|
12995
|
+
onSaveAsPpt: () => void;
|
|
12479
12996
|
hasMacros: boolean;
|
|
12480
12997
|
onCopySlideAsImage: () => void;
|
|
12481
12998
|
onPrint: () => void;
|