pptx-react-viewer 3.5.4 → 3.7.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 +25 -0
- package/dist/{AiChatPanel-CCJNQGER.mjs → AiChatPanel-L5QGWVZK.mjs} +4 -4
- package/dist/AiChatPanel-L5QGWVZK.mjs.br +0 -0
- package/dist/AiChatPanel-L5QGWVZK.mjs.gz +0 -0
- package/dist/{AiChatPanel-LPZWDNVU.js → AiChatPanel-M3AHKYPS.js} +25 -25
- package/dist/AiChatPanel-M3AHKYPS.js.br +0 -0
- package/dist/AiChatPanel-M3AHKYPS.js.gz +0 -0
- package/dist/{Area3DChartScene-P6YM6ZL7.mjs → Area3DChartScene-AE2XYKDW.mjs} +1 -1
- package/dist/Area3DChartScene-AE2XYKDW.mjs.br +1 -0
- package/dist/Area3DChartScene-AE2XYKDW.mjs.gz +0 -0
- package/dist/{Area3DChartScene-LJCWBNQ3.js → Area3DChartScene-ZQLQK6L4.js} +2 -2
- package/dist/Area3DChartScene-ZQLQK6L4.js.br +0 -0
- package/dist/Area3DChartScene-ZQLQK6L4.js.gz +0 -0
- package/dist/{Bar3DChartScene-DIVOJURZ.mjs → Bar3DChartScene-FQV62XOI.mjs} +1 -1
- package/dist/Bar3DChartScene-FQV62XOI.mjs.br +2 -0
- package/dist/Bar3DChartScene-FQV62XOI.mjs.gz +0 -0
- package/dist/{Bar3DChartScene-7DNQ4X5T.js → Bar3DChartScene-TZ6ADFBS.js} +2 -2
- package/dist/Bar3DChartScene-TZ6ADFBS.js.br +0 -0
- package/dist/Bar3DChartScene-TZ6ADFBS.js.gz +0 -0
- package/dist/{Line3DChartScene-UF6DHP36.js → Line3DChartScene-5CKPAX63.js} +2 -2
- package/dist/Line3DChartScene-5CKPAX63.js.br +0 -0
- package/dist/Line3DChartScene-5CKPAX63.js.gz +0 -0
- package/dist/{Line3DChartScene-ZZVNUKIJ.mjs → Line3DChartScene-FEUY3PCE.mjs} +1 -1
- package/dist/Line3DChartScene-FEUY3PCE.mjs.br +1 -0
- package/dist/Line3DChartScene-FEUY3PCE.mjs.gz +0 -0
- package/dist/{Model3DScene-C7MZ22DH.js → Model3DScene-BLXEALM6.js} +2 -2
- package/dist/Model3DScene-BLXEALM6.js.br +0 -0
- package/dist/Model3DScene-BLXEALM6.js.gz +0 -0
- package/dist/{Model3DScene-XXMAAKBR.mjs → Model3DScene-V3DHIISV.mjs} +1 -1
- package/dist/Model3DScene-V3DHIISV.mjs.br +0 -0
- package/dist/Model3DScene-V3DHIISV.mjs.gz +0 -0
- package/dist/{PieChart3DScene-N2Y25VG5.js → PieChart3DScene-GHHT3PDV.js} +2 -2
- package/dist/PieChart3DScene-GHHT3PDV.js.br +0 -0
- package/dist/PieChart3DScene-GHHT3PDV.js.gz +0 -0
- package/dist/{PieChart3DScene-7LX3IL2Q.mjs → PieChart3DScene-VZI2VARG.mjs} +1 -1
- package/dist/{PieChart3DScene-7LX3IL2Q.mjs.br → PieChart3DScene-VZI2VARG.mjs.br} +0 -0
- package/dist/PieChart3DScene-VZI2VARG.mjs.gz +0 -0
- package/dist/PowerPointViewer-Cl6jBPNw.d.ts.map +1 -1
- package/dist/{SurfaceChart3DScene-ADA7NUIW.mjs → SurfaceChart3DScene-T36E2HBA.mjs} +1 -1
- package/dist/SurfaceChart3DScene-T36E2HBA.mjs.br +0 -0
- package/dist/SurfaceChart3DScene-T36E2HBA.mjs.gz +0 -0
- package/dist/{SurfaceChart3DScene-WXJHYOGJ.js → SurfaceChart3DScene-WWIMQ65D.js} +2 -2
- package/dist/SurfaceChart3DScene-WWIMQ65D.js.br +0 -0
- package/dist/SurfaceChart3DScene-WWIMQ65D.js.gz +0 -0
- package/dist/{chunk-UOMFINNJ.js → chunk-3EJFZ7TE.js} +33 -5
- package/dist/chunk-3EJFZ7TE.js.br +0 -0
- package/dist/chunk-3EJFZ7TE.js.gz +0 -0
- package/dist/{chunk-YQOK4E2A.js → chunk-DCNHUEWQ.js} +35917 -23497
- package/dist/chunk-DCNHUEWQ.js.br +0 -0
- package/dist/chunk-DCNHUEWQ.js.gz +0 -0
- package/dist/{chunk-JCJ3EPG6.mjs → chunk-FGTMS7LR.mjs} +14 -23
- package/dist/chunk-FGTMS7LR.mjs.br +0 -0
- package/dist/chunk-FGTMS7LR.mjs.gz +0 -0
- package/dist/{chunk-U52MKWVA.mjs → chunk-JANUSAEK.mjs} +189 -225
- package/dist/chunk-JANUSAEK.mjs.br +0 -0
- package/dist/chunk-JANUSAEK.mjs.gz +0 -0
- package/dist/{chunk-NM652EZS.mjs → chunk-NV55GU5V.mjs} +35881 -23494
- package/dist/chunk-NV55GU5V.mjs.br +0 -0
- package/dist/chunk-NV55GU5V.mjs.gz +0 -0
- package/dist/{chunk-2FMQ7M3L.js → chunk-OBE4TB76.js} +494 -575
- package/dist/chunk-OBE4TB76.js.br +0 -0
- package/dist/chunk-OBE4TB76.js.gz +0 -0
- package/dist/{chunk-EVVWCF2M.mjs → chunk-PC62KGU3.mjs} +67 -148
- package/dist/chunk-PC62KGU3.mjs.br +0 -0
- package/dist/chunk-PC62KGU3.mjs.gz +0 -0
- package/dist/{chunk-HHJZK26I.js → chunk-TUSALM3A.js} +1603 -1310
- package/dist/chunk-TUSALM3A.js.br +0 -0
- package/dist/chunk-TUSALM3A.js.gz +0 -0
- package/dist/{chunk-IWQSAKPM.mjs → chunk-TXY2E7VQ.mjs} +445 -152
- package/dist/chunk-TXY2E7VQ.mjs.br +0 -0
- package/dist/chunk-TXY2E7VQ.mjs.gz +0 -0
- package/dist/{chunk-UTMTXJGM.js → chunk-VIFDZIVX.js} +375 -412
- package/dist/chunk-VIFDZIVX.js.br +0 -0
- package/dist/chunk-VIFDZIVX.js.gz +0 -0
- package/dist/{chunk-UTIMT5CZ.js → chunk-W24OJ7H5.js} +14 -23
- package/dist/chunk-W24OJ7H5.js.br +0 -0
- package/dist/chunk-W24OJ7H5.js.gz +0 -0
- package/dist/{chunk-IVPT3U5C.mjs → chunk-WKODF5ZU.mjs} +29 -1
- package/dist/chunk-WKODF5ZU.mjs.br +0 -0
- package/dist/chunk-WKODF5ZU.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 +1012 -45
- 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 +1023 -45
- 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/{useViewerBuildingBlocks-f6oNGKMX.d.ts → useViewerBuildingBlocks-C8F_4Pzb.d.ts} +3 -1
- package/dist/useViewerBuildingBlocks-C8F_4Pzb.d.ts.map +1 -0
- package/dist/viewer/index.d.ts +933 -45
- 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-CCJNQGER.mjs.br +0 -0
- package/dist/AiChatPanel-CCJNQGER.mjs.gz +0 -0
- package/dist/AiChatPanel-LPZWDNVU.js.br +0 -0
- package/dist/AiChatPanel-LPZWDNVU.js.gz +0 -0
- package/dist/Area3DChartScene-LJCWBNQ3.js.br +0 -0
- package/dist/Area3DChartScene-LJCWBNQ3.js.gz +0 -0
- package/dist/Area3DChartScene-P6YM6ZL7.mjs.br +0 -0
- package/dist/Area3DChartScene-P6YM6ZL7.mjs.gz +0 -0
- package/dist/Bar3DChartScene-7DNQ4X5T.js.br +0 -1
- package/dist/Bar3DChartScene-7DNQ4X5T.js.gz +0 -0
- package/dist/Bar3DChartScene-DIVOJURZ.mjs.br +0 -0
- package/dist/Bar3DChartScene-DIVOJURZ.mjs.gz +0 -0
- package/dist/Line3DChartScene-UF6DHP36.js.br +0 -0
- package/dist/Line3DChartScene-UF6DHP36.js.gz +0 -0
- package/dist/Line3DChartScene-ZZVNUKIJ.mjs.br +0 -0
- package/dist/Line3DChartScene-ZZVNUKIJ.mjs.gz +0 -0
- package/dist/Model3DScene-C7MZ22DH.js.br +0 -0
- package/dist/Model3DScene-C7MZ22DH.js.gz +0 -0
- package/dist/Model3DScene-XXMAAKBR.mjs.br +0 -0
- package/dist/Model3DScene-XXMAAKBR.mjs.gz +0 -0
- package/dist/PieChart3DScene-7LX3IL2Q.mjs.gz +0 -0
- package/dist/PieChart3DScene-N2Y25VG5.js.br +0 -0
- package/dist/PieChart3DScene-N2Y25VG5.js.gz +0 -0
- package/dist/SurfaceChart3DScene-ADA7NUIW.mjs.br +0 -0
- package/dist/SurfaceChart3DScene-ADA7NUIW.mjs.gz +0 -0
- package/dist/SurfaceChart3DScene-WXJHYOGJ.js.br +0 -0
- package/dist/SurfaceChart3DScene-WXJHYOGJ.js.gz +0 -0
- package/dist/chunk-2FMQ7M3L.js.br +0 -0
- package/dist/chunk-2FMQ7M3L.js.gz +0 -0
- package/dist/chunk-EVVWCF2M.mjs.br +0 -0
- package/dist/chunk-EVVWCF2M.mjs.gz +0 -0
- package/dist/chunk-HHJZK26I.js.br +0 -0
- package/dist/chunk-HHJZK26I.js.gz +0 -0
- package/dist/chunk-IVPT3U5C.mjs.br +0 -0
- package/dist/chunk-IVPT3U5C.mjs.gz +0 -0
- package/dist/chunk-IWQSAKPM.mjs.br +0 -0
- package/dist/chunk-IWQSAKPM.mjs.gz +0 -0
- package/dist/chunk-JCJ3EPG6.mjs.br +0 -0
- package/dist/chunk-JCJ3EPG6.mjs.gz +0 -0
- package/dist/chunk-NM652EZS.mjs.br +0 -0
- package/dist/chunk-NM652EZS.mjs.gz +0 -0
- package/dist/chunk-U52MKWVA.mjs.br +0 -0
- package/dist/chunk-U52MKWVA.mjs.gz +0 -0
- package/dist/chunk-UOMFINNJ.js.br +0 -0
- package/dist/chunk-UOMFINNJ.js.gz +0 -0
- package/dist/chunk-UTIMT5CZ.js.br +0 -0
- package/dist/chunk-UTIMT5CZ.js.gz +0 -0
- package/dist/chunk-UTMTXJGM.js.br +0 -0
- package/dist/chunk-UTMTXJGM.js.gz +0 -0
- package/dist/chunk-YQOK4E2A.js.br +0 -0
- package/dist/chunk-YQOK4E2A.js.gz +0 -0
- package/dist/useViewerBuildingBlocks-f6oNGKMX.d.ts.map +0 -1
package/dist/viewer/index.d.ts
CHANGED
|
@@ -45,6 +45,12 @@ interface PptxAction {
|
|
|
45
45
|
soundRId?: string;
|
|
46
46
|
/** Resolved media target path for the optional click sound. */
|
|
47
47
|
soundPath?: string;
|
|
48
|
+
/**
|
|
49
|
+
* `CT_Hyperlink/@endSnd` (ECMA-376 20.1.2.2.23): PowerPoint's Action
|
|
50
|
+
* Settings "Stop previous sound" checkbox. Round-tripped for now (issue
|
|
51
|
+
* G14); not yet wired into playback.
|
|
52
|
+
*/
|
|
53
|
+
endSnd?: boolean;
|
|
48
54
|
}
|
|
49
55
|
//#endregion
|
|
50
56
|
//#region src/core/types/common.d.ts
|
|
@@ -67,7 +73,7 @@ interface PptxAction {
|
|
|
67
73
|
* // => "wavy" — one of: sng | dbl | heavy | dotted | dash | wavy | none | ...
|
|
68
74
|
* ```
|
|
69
75
|
*/
|
|
70
|
-
type UnderlineStyle = 'sng' | 'dbl' | 'heavy' | 'dotted' | 'dottedHeavy' | 'dash' | 'dashHeavy' | 'dashLong' | 'dashLongHeavy' | 'dotDash' | 'dotDashHeavy' | 'dotDotDash' | 'dotDotDashHeavy' | 'wavy' | 'wavyHeavy' | 'wavyDbl' | 'none';
|
|
76
|
+
type UnderlineStyle = 'sng' | 'dbl' | 'heavy' | 'dotted' | 'dottedHeavy' | 'dash' | 'dashHeavy' | 'dashLong' | 'dashLongHeavy' | 'dotDash' | 'dotDashHeavy' | 'dotDotDash' | 'dotDotDashHeavy' | 'wavy' | 'wavyHeavy' | 'wavyDbl' | 'words' | 'none';
|
|
71
77
|
/**
|
|
72
78
|
* Connector connection point reference — links a connector endpoint to a
|
|
73
79
|
* specific shape on the slide.
|
|
@@ -402,6 +408,16 @@ interface CustomGeometryRawData {
|
|
|
402
408
|
cxnLstXml?: unknown;
|
|
403
409
|
/** Raw `a:rect` XML content (text rectangle). */
|
|
404
410
|
rectXml?: unknown;
|
|
411
|
+
/**
|
|
412
|
+
* Raw `a:pathLst` XML content: every `a:path`'s formula-bearing `a:pt`
|
|
413
|
+
* x/y attributes, `a:arcTo` params, `a:close`, and per-path `@w`/`@h`/
|
|
414
|
+
* `@fill`/`@stroke`/`@extrusionOk`, preserved verbatim (not the
|
|
415
|
+
* parse-time-resolved numbers in `customGeometryPaths`). Lets a live
|
|
416
|
+
* `shapeAdjustments` drag re-evaluate the outline against the CURRENT
|
|
417
|
+
* guide values instead of the ones baked in at parse time; see
|
|
418
|
+
* `geometry/custom-geometry-live-eval.ts`.
|
|
419
|
+
*/
|
|
420
|
+
pathLstXml?: unknown;
|
|
405
421
|
}
|
|
406
422
|
/**
|
|
407
423
|
* XY-style adjustment handle (`a:ahXY`) on a custom geometry.
|
|
@@ -557,6 +573,44 @@ interface PptxCustomPathProperties {
|
|
|
557
573
|
customGeometryTextRect?: CustomGeometryTextRect;
|
|
558
574
|
}
|
|
559
575
|
//#endregion
|
|
576
|
+
//#region src/core/types/color-ref.d.ts
|
|
577
|
+
/**
|
|
578
|
+
* Theme colour references: the typed counterpart of `<a:schemeClr>`.
|
|
579
|
+
*
|
|
580
|
+
* A colour picked from the theme palette is remembered as a scheme slot plus
|
|
581
|
+
* PowerPoint's luminance variants rather than as the sRGB it currently
|
|
582
|
+
* resolves to, so a later theme change re-colours the shape (and a saved file
|
|
583
|
+
* keeps `<a:schemeClr>` instead of a canonical `<a:srgbClr>`).
|
|
584
|
+
*
|
|
585
|
+
* @module types/color-ref
|
|
586
|
+
*/
|
|
587
|
+
/**
|
|
588
|
+
* The scheme slot names `a:schemeClr/@val` accepts (ECMA-376 `ST_SchemeColorIndex`).
|
|
589
|
+
* `bg1`/`tx1`/`bg2`/`tx2` are the colour-map aliases a slide resolves through
|
|
590
|
+
* `p:clrMap`; `phClr` is the placeholder colour used inside a theme's style
|
|
591
|
+
* matrix and is never chosen from a picker.
|
|
592
|
+
*/
|
|
593
|
+
type PptxThemeColorSchemeName = 'dk1' | 'lt1' | 'dk2' | 'lt2' | 'accent1' | 'accent2' | 'accent3' | 'accent4' | 'accent5' | 'accent6' | 'hlink' | 'folHlink' | 'bg1' | 'tx1' | 'bg2' | 'tx2' | 'phClr';
|
|
594
|
+
/**
|
|
595
|
+
* A theme colour choice. Every transform is a 0..1 fraction of the OOXML
|
|
596
|
+
* percentage (`lumMod val="20000"` is `lumMod: 0.2`), matching how the parser
|
|
597
|
+
* reads them, and is applied in the order `a:schemeClr` children are written:
|
|
598
|
+
* `tint`, `shade`, `lumMod`, `lumOff`, `alpha`.
|
|
599
|
+
*/
|
|
600
|
+
interface PptxThemeColorRef {
|
|
601
|
+
scheme: PptxThemeColorSchemeName;
|
|
602
|
+
/** `a:lumMod`: multiply HSL luminance (PowerPoint's "Lighter/Darker" rows). */
|
|
603
|
+
lumMod?: number;
|
|
604
|
+
/** `a:lumOff`: add to HSL luminance after `lumMod` ("Lighter N%" rows). */
|
|
605
|
+
lumOff?: number;
|
|
606
|
+
/** `a:tint`: blend towards white. */
|
|
607
|
+
tint?: number;
|
|
608
|
+
/** `a:shade`: blend towards black. */
|
|
609
|
+
shade?: number;
|
|
610
|
+
/** `a:alpha`: opacity fraction (1 = opaque). */
|
|
611
|
+
alpha?: number;
|
|
612
|
+
}
|
|
613
|
+
//#endregion
|
|
560
614
|
//#region src/core/types/effect-dag.d.ts
|
|
561
615
|
type EffectDagBlendMode = 'darken' | 'lighten' | 'mult' | 'over' | 'screen';
|
|
562
616
|
type EffectDagContainerType = 'sib' | 'tree';
|
|
@@ -846,6 +900,15 @@ interface ShapeStyle {
|
|
|
846
900
|
* back to canonical `<a:srgbClr>`.
|
|
847
901
|
*/
|
|
848
902
|
fillColorXml?: XmlObject;
|
|
903
|
+
/**
|
|
904
|
+
* Typed theme colour reference for the fill, set when {@link fillColorXml}
|
|
905
|
+
* is a plain `a:schemeClr` (see `themeColorRefFromColorChoice`). When
|
|
906
|
+
* present it WINS on save: the writer emits `<a:schemeClr>` from this ref
|
|
907
|
+
* instead of the resolved {@link fillColor}, so the fill keeps following
|
|
908
|
+
* the theme palette after a later theme change. `undefined` means the fill
|
|
909
|
+
* is a plain hex (or a colour kind a ref cannot express).
|
|
910
|
+
*/
|
|
911
|
+
fillColorRef?: PptxThemeColorRef;
|
|
849
912
|
fillGradient?: string;
|
|
850
913
|
/** Original `gradFill` XML retained for unknown-child and extension round-tripping. */
|
|
851
914
|
fillGradientXml?: XmlObject;
|
|
@@ -880,6 +943,12 @@ interface ShapeStyle {
|
|
|
880
943
|
opacity?: number;
|
|
881
944
|
/** Raw XML colour node preserved for round-trip (e.g. a:schemeClr with transforms). */
|
|
882
945
|
originalColorXml?: XmlObject;
|
|
946
|
+
/**
|
|
947
|
+
* Typed theme colour reference for this stop, set when
|
|
948
|
+
* {@link originalColorXml} is a plain `a:schemeClr`. Wins on save, same
|
|
949
|
+
* as {@link ShapeStyle.fillColorRef}.
|
|
950
|
+
*/
|
|
951
|
+
colorRef?: PptxThemeColorRef;
|
|
883
952
|
}>;
|
|
884
953
|
fillGradientAngle?: number;
|
|
885
954
|
fillGradientType?: 'linear' | 'radial';
|
|
@@ -926,6 +995,12 @@ interface ShapeStyle {
|
|
|
926
995
|
* round-trip serialisation. See {@link fillColorXml} for the rationale.
|
|
927
996
|
*/
|
|
928
997
|
strokeColorXml?: XmlObject;
|
|
998
|
+
/**
|
|
999
|
+
* Typed theme colour reference for the outline, mirroring
|
|
1000
|
+
* {@link fillColorRef}: set when {@link strokeColorXml} is a plain
|
|
1001
|
+
* `a:schemeClr`, and wins on save.
|
|
1002
|
+
*/
|
|
1003
|
+
strokeColorRef?: PptxThemeColorRef;
|
|
929
1004
|
/**
|
|
930
1005
|
* Kind of fill painted on the outline (`a:ln` child). Distinguishes a solid
|
|
931
1006
|
* outline from a gradient/pattern/none outline so save can emit the correct
|
|
@@ -1159,6 +1234,21 @@ interface ShapeStyle {
|
|
|
1159
1234
|
dagFillOverlayColor?: string;
|
|
1160
1235
|
/** Fill overlay tint opacity (0-1), from the overlay fill colour's alpha. */
|
|
1161
1236
|
dagFillOverlayOpacity?: number;
|
|
1237
|
+
/** Fill overlay blend mode from a direct `a:effectLst/a:fillOverlay/@blend`. */
|
|
1238
|
+
shapeFillOverlayBlend?: 'over' | 'mult' | 'screen' | 'darken' | 'lighten';
|
|
1239
|
+
/**
|
|
1240
|
+
* Fill overlay tint colour (hex `#RRGGBB`) from a direct
|
|
1241
|
+
* `a:effectLst/a:fillOverlay`'s `a:solidFill`/`a:gradFill`.
|
|
1242
|
+
*/
|
|
1243
|
+
shapeFillOverlayColor?: string;
|
|
1244
|
+
/** Fill overlay tint opacity (0-1), from the overlay fill colour's alpha. */
|
|
1245
|
+
shapeFillOverlayOpacity?: number;
|
|
1246
|
+
/** Original source `a:fillOverlay` node, preserved for lossless surgical updates. */
|
|
1247
|
+
fillOverlayXml?: XmlObject;
|
|
1248
|
+
/** Resolved source fill-overlay colour used to detect colour edits. */
|
|
1249
|
+
shapeFillOverlayOriginalColor?: string;
|
|
1250
|
+
/** Source fill-overlay opacity used to detect alpha edits. */
|
|
1251
|
+
shapeFillOverlayOriginalOpacity?: number;
|
|
1162
1252
|
/** `<a:lnRef @idx>` — 1-based index into the theme's lnStyleLst. */
|
|
1163
1253
|
lnRefIdx?: number;
|
|
1164
1254
|
/** Raw XML colour child of `<a:lnRef>` (e.g. `<a:schemeClr>` with transforms). */
|
|
@@ -1414,8 +1504,25 @@ interface TextStyle {
|
|
|
1414
1504
|
* verbatim when the resolved {@link color} still matches this node.
|
|
1415
1505
|
*/
|
|
1416
1506
|
colorXml?: XmlObject;
|
|
1507
|
+
/**
|
|
1508
|
+
* Typed theme colour reference for the run's text colour, set when
|
|
1509
|
+
* {@link colorXml} is a plain `a:schemeClr` (see
|
|
1510
|
+
* `themeColorRefFromColorChoice`). When present it WINS on save: the
|
|
1511
|
+
* writer emits `<a:schemeClr>` from this ref instead of the resolved
|
|
1512
|
+
* {@link color}, so the text keeps following the theme palette after a
|
|
1513
|
+
* later theme change.
|
|
1514
|
+
*/
|
|
1515
|
+
colorRef?: PptxThemeColorRef;
|
|
1417
1516
|
align?: 'left' | 'center' | 'right' | 'justify' | 'justLow' | 'dist' | 'thaiDist';
|
|
1418
|
-
|
|
1517
|
+
/**
|
|
1518
|
+
* Vertical text-box anchor (`a:bodyPr/@anchor`, `ST_TextAnchoringType`).
|
|
1519
|
+
* `distributed`/`justified` (`dist`/`just`) stretch line spacing so the
|
|
1520
|
+
* paragraph block fills the box's full vertical extent, distinct from true
|
|
1521
|
+
* centering (`middle`/`ctr`); both approximate to a middle-anchored render
|
|
1522
|
+
* (see `text-body-layout.ts`) since CSS has no native vertical-justify
|
|
1523
|
+
* primitive, but round-trip losslessly through parse/save.
|
|
1524
|
+
*/
|
|
1525
|
+
vAlign?: 'top' | 'middle' | 'bottom' | 'distributed' | 'justified';
|
|
1419
1526
|
/** Right-to-left paragraph/run direction (`a:pPr/@rtl`, `a:rPr/@rtl`). */
|
|
1420
1527
|
rtl?: boolean;
|
|
1421
1528
|
/** Body text direction (`a:bodyPr/@vert`).
|
|
@@ -1831,6 +1938,12 @@ interface BulletInfo {
|
|
|
1831
1938
|
* identity rather than being flattened to `<a:srgbClr/>` on save.
|
|
1832
1939
|
*/
|
|
1833
1940
|
colorXml?: XmlObject;
|
|
1941
|
+
/**
|
|
1942
|
+
* Typed theme colour reference for the bullet colour, set when
|
|
1943
|
+
* {@link colorXml} is a plain `a:schemeClr`. Wins on save, same as
|
|
1944
|
+
* {@link TextStyle.colorRef}.
|
|
1945
|
+
*/
|
|
1946
|
+
colorRef?: PptxThemeColorRef;
|
|
1834
1947
|
/** True when `a:buNone` explicitly suppresses bullets. */
|
|
1835
1948
|
none?: boolean;
|
|
1836
1949
|
/** Picture bullet: relationship ID from `a:buBlip` → `a:blip[@r:embed]`. */
|
|
@@ -2236,6 +2349,50 @@ interface PptxChartAxisLabelFormatting {
|
|
|
2236
2349
|
noMultiLevelLabels?: boolean;
|
|
2237
2350
|
}
|
|
2238
2351
|
//#endregion
|
|
2352
|
+
//#region src/core/types/chart-ex.d.ts
|
|
2353
|
+
/**
|
|
2354
|
+
* Chart-formatting types that don't fit an existing, owned type module for
|
|
2355
|
+
* this wave (`types/chart.ts` is owned elsewhere; see its own module doc).
|
|
2356
|
+
* Despite the file name, `PptxChartDataPointPicture` is a CLASSIC (`c:`)
|
|
2357
|
+
* construct, not ChartEx (`cx:`) - it landed here only because it needs a
|
|
2358
|
+
* home outside `chart.ts`.
|
|
2359
|
+
*
|
|
2360
|
+
* @module pptx-types/chart-ex
|
|
2361
|
+
*/
|
|
2362
|
+
/** `c:dPt/c:pictureOptions/c:pictureFormat/@val` (ST_PictureFormat). */
|
|
2363
|
+
type PptxChartPictureFormat = 'stretch' | 'stack' | 'stackScale';
|
|
2364
|
+
/**
|
|
2365
|
+
* Per-data-point picture-fill flags (`c:dPt/c:pictureOptions`): PowerPoint's
|
|
2366
|
+
* "Picture or texture fill" with "Stack"/"Stretch" semantics on a bar/column
|
|
2367
|
+
* data point, distinct from the point's plain `c:spPr` solid/gradient fill.
|
|
2368
|
+
*
|
|
2369
|
+
* The flags parse purely (`parseChartDataPointPicture` in
|
|
2370
|
+
* `utils/chart-datapoint-serializer.ts`); {@link imageUrl} is a separate,
|
|
2371
|
+
* later addition populated by the runtime (`PptxHandlerRuntimeChartParsing.ts`)
|
|
2372
|
+
* once the sibling `c:spPr/a:blipFill/a:blip`'s `r:embed`/`r:link` is resolved
|
|
2373
|
+
* against the chart part's relationships, since that resolution needs zip/file
|
|
2374
|
+
* access the pure parser does not have.
|
|
2375
|
+
*/
|
|
2376
|
+
interface PptxChartDataPointPicture {
|
|
2377
|
+
/** Apply the picture to the front face of a 3-D bar/column (`c:applyToFront`). */
|
|
2378
|
+
applyToFront?: boolean;
|
|
2379
|
+
/** Apply the picture to the side faces of a 3-D bar/column (`c:applyToSides`). */
|
|
2380
|
+
applyToSides?: boolean;
|
|
2381
|
+
/** Apply the picture to the end face of a 3-D bar/column (`c:applyToEnd`). */
|
|
2382
|
+
applyToEnd?: boolean;
|
|
2383
|
+
/** Stretch, or stack repeated tiles at their natural size (or scaled). */
|
|
2384
|
+
pictureFormat?: PptxChartPictureFormat;
|
|
2385
|
+
/** Height, in points, of one repeated picture tile for "stack"/"stackScale" (`c:pictureStackUnit/@val`). */
|
|
2386
|
+
pictureStackUnit?: number;
|
|
2387
|
+
/**
|
|
2388
|
+
* Resolved picture source (a `data:`/`blob:` URL) for the point's sibling
|
|
2389
|
+
* `c:spPr/a:blipFill/a:blip`. Populated by the runtime after relationship
|
|
2390
|
+
* resolution (C2-G9 render half); absent until then, and absent entirely
|
|
2391
|
+
* when the point has no picture fill or the image could not be resolved.
|
|
2392
|
+
*/
|
|
2393
|
+
imageUrl?: string;
|
|
2394
|
+
}
|
|
2395
|
+
//#endregion
|
|
2239
2396
|
//#region src/core/types/chart-pivot-format.d.ts
|
|
2240
2397
|
interface PptxChartPivotFormat {
|
|
2241
2398
|
index: number;
|
|
@@ -2299,6 +2456,15 @@ interface PptxChartPageSetup {
|
|
|
2299
2456
|
horizontalDpi?: number;
|
|
2300
2457
|
verticalDpi?: number;
|
|
2301
2458
|
copies?: number;
|
|
2459
|
+
/**
|
|
2460
|
+
* Custom paper height, used when {@link paperSize} is `0`
|
|
2461
|
+
* (`c:pageSetup/@paperHeight`, ST_PositiveUniversalMeasure, e.g. `"297mm"`).
|
|
2462
|
+
* Kept as the raw measure string rather than converted, matching how the
|
|
2463
|
+
* schema stores it.
|
|
2464
|
+
*/
|
|
2465
|
+
paperHeight?: string;
|
|
2466
|
+
/** Custom paper width, used when {@link paperSize} is `0` (`@paperWidth`). */
|
|
2467
|
+
paperWidth?: string;
|
|
2302
2468
|
/** Original leaf retained for foreign attributes. */
|
|
2303
2469
|
rawXml?: unknown;
|
|
2304
2470
|
}
|
|
@@ -2330,6 +2496,98 @@ interface PptxChartProtection {
|
|
|
2330
2496
|
rawXml?: XmlObject;
|
|
2331
2497
|
}
|
|
2332
2498
|
//#endregion
|
|
2499
|
+
//#region src/core/types/chart-style-definition.d.ts
|
|
2500
|
+
/**
|
|
2501
|
+
* Typed subset of an Office 2013+ chart-style part (`ppt/charts/style#.xml`,
|
|
2502
|
+
* root element `cs:chartStyle`, relationship type
|
|
2503
|
+
* `.../2012/relationships/chartStyle`).
|
|
2504
|
+
*
|
|
2505
|
+
* PowerPoint's Design-tab "Chart Styles" gallery (1-48) writes `c:style/@val`
|
|
2506
|
+
* on the chart part itself (already modeled as `PptxChartStyle.styleId`) and,
|
|
2507
|
+
* for most styles, this SEPARATE part spelling out the per-element
|
|
2508
|
+
* `cs:lnRef`/`cs:fillRef`/`cs:effectRef`/`cs:fontRef`/`cs:defRPr` defaults a
|
|
2509
|
+
* chart element falls back to when its own XML leaves it unstyled. Without
|
|
2510
|
+
* parsing this part, styles beyond the one PowerPoint happens to have baked
|
|
2511
|
+
* inline are visually inert.
|
|
2512
|
+
*
|
|
2513
|
+
* @module pptx-types/chart-style-definition
|
|
2514
|
+
*/
|
|
2515
|
+
/**
|
|
2516
|
+
* One styled chart-element entry (`cs:title`, `cs:axisTitle`,
|
|
2517
|
+
* `cs:categoryAxis`, ...). Colours are resolved to hex at parse time (scheme
|
|
2518
|
+
* colour references via `cs:fontRef`/`cs:lnRef`/`cs:fillRef` are already
|
|
2519
|
+
* flattened against the theme, matching how classic chart colours resolve
|
|
2520
|
+
* elsewhere in this codebase). Fields are present only when the source XML
|
|
2521
|
+
* carried a value for them.
|
|
2522
|
+
*/
|
|
2523
|
+
interface PptxChartStylePartEntry {
|
|
2524
|
+
/** Text size in points, from `cs:defRPr/@sz` (hundredths of a point). */
|
|
2525
|
+
fontSize?: number;
|
|
2526
|
+
bold?: boolean;
|
|
2527
|
+
italic?: boolean;
|
|
2528
|
+
/** Resolved text colour: `cs:defRPr/a:solidFill`, or `cs:fontRef`'s scheme colour. */
|
|
2529
|
+
color?: string;
|
|
2530
|
+
/** Resolved line colour from `cs:lnRef`'s scheme colour reference. */
|
|
2531
|
+
lineColor?: string;
|
|
2532
|
+
/** Line width in points, when directly authored (rare; most styles reference a theme line style by index only). */
|
|
2533
|
+
lineWidth?: number;
|
|
2534
|
+
/** Resolved fill colour from `cs:fillRef`'s scheme colour reference. */
|
|
2535
|
+
fillColor?: string;
|
|
2536
|
+
}
|
|
2537
|
+
/**
|
|
2538
|
+
* Parsed per-element style defaults from a chart-style part. Only the
|
|
2539
|
+
* elements this viewer actually renders distinct defaults for are modeled;
|
|
2540
|
+
* elements PowerPoint's style gallery also styles (data table, trendlines,
|
|
2541
|
+
* up/down bars, ...) are out of scope until a renderer needs them.
|
|
2542
|
+
*/
|
|
2543
|
+
interface PptxChartStyleDefinition {
|
|
2544
|
+
title?: PptxChartStylePartEntry;
|
|
2545
|
+
axisTitle?: PptxChartStylePartEntry;
|
|
2546
|
+
categoryAxis?: PptxChartStylePartEntry;
|
|
2547
|
+
valueAxis?: PptxChartStylePartEntry;
|
|
2548
|
+
legend?: PptxChartStylePartEntry;
|
|
2549
|
+
dataLabel?: PptxChartStylePartEntry;
|
|
2550
|
+
dataPoint?: PptxChartStylePartEntry;
|
|
2551
|
+
dataPointLine?: PptxChartStylePartEntry;
|
|
2552
|
+
gridlineMajor?: PptxChartStylePartEntry;
|
|
2553
|
+
gridlineMinor?: PptxChartStylePartEntry;
|
|
2554
|
+
chartArea?: PptxChartStylePartEntry;
|
|
2555
|
+
plotArea?: PptxChartStylePartEntry;
|
|
2556
|
+
}
|
|
2557
|
+
//#endregion
|
|
2558
|
+
//#region src/core/types/chart-title.d.ts
|
|
2559
|
+
/**
|
|
2560
|
+
* Chart title rich-text run type, split out of `types/chart.ts` (already at
|
|
2561
|
+
* the repo's file-size limit) to keep that module from growing further.
|
|
2562
|
+
*
|
|
2563
|
+
* @module pptx-types/chart-title
|
|
2564
|
+
*/
|
|
2565
|
+
/**
|
|
2566
|
+
* One run of a chart title's rich text (`c:title/c:tx/c:rich/a:p/a:r`).
|
|
2567
|
+
*
|
|
2568
|
+
* The flat `PptxChartData.title` field only ever captured the FIRST run's
|
|
2569
|
+
* text with no per-run formatting; `titleRuns` (when present) is the
|
|
2570
|
+
* lossless, multi-run replacement parsed from the same `c:rich` body. Absent
|
|
2571
|
+
* when the title has no rich text at all (an empty/auto title, or one
|
|
2572
|
+
* authored as a linked-cell reference).
|
|
2573
|
+
*/
|
|
2574
|
+
interface PptxChartTitleRun {
|
|
2575
|
+
/** This run's text (`a:t`). */
|
|
2576
|
+
text: string;
|
|
2577
|
+
/** `a:rPr/@_b`. */
|
|
2578
|
+
bold?: boolean;
|
|
2579
|
+
/** `a:rPr/@_i`. */
|
|
2580
|
+
italic?: boolean;
|
|
2581
|
+
/**
|
|
2582
|
+
* Font size in POINTS (`a:rPr/@_sz`, hundredths of a point / 100), matching
|
|
2583
|
+
* `PptxChartLegendTextStyle.fontSize`'s convention rather than the pixel
|
|
2584
|
+
* convention `TextStyle.fontSize` uses for slide text.
|
|
2585
|
+
*/
|
|
2586
|
+
fontSize?: number;
|
|
2587
|
+
/** Resolved hex colour (e.g. `"#FF0000"`) from `a:rPr/a:solidFill`. */
|
|
2588
|
+
color?: string;
|
|
2589
|
+
}
|
|
2590
|
+
//#endregion
|
|
2333
2591
|
//#region src/core/types/chart-user-shapes.d.ts
|
|
2334
2592
|
/**
|
|
2335
2593
|
* Types for chart drawing-overlay shapes (`c:userShapes`).
|
|
@@ -2368,8 +2626,16 @@ interface PptxChartUserShapeParagraph {
|
|
|
2368
2626
|
* `absSizeAnchor` the extent is {@link ext} in EMU.
|
|
2369
2627
|
*/
|
|
2370
2628
|
interface PptxChartUserShape {
|
|
2371
|
-
/**
|
|
2372
|
-
|
|
2629
|
+
/**
|
|
2630
|
+
* Shape kind: text/preset shape, connector, picture, a group of the
|
|
2631
|
+
* above (`grpSp`, flattened: each grouped child becomes its own entry
|
|
2632
|
+
* reusing the anchor's own bounding box, an approximation since the
|
|
2633
|
+
* group's internal chOff/chExt transform is not applied), or a bare
|
|
2634
|
+
* placeholder for a `graphicFrame` anchor child (deep content such as a
|
|
2635
|
+
* nested chart or table is out of scope; it only keeps the anchor's
|
|
2636
|
+
* space accounted for instead of the whole overlay disappearing).
|
|
2637
|
+
*/
|
|
2638
|
+
kind: 'sp' | 'cxnSp' | 'pic' | 'grpSp' | 'graphicFrame';
|
|
2373
2639
|
/** Anchor kind that positioned the shape. */
|
|
2374
2640
|
anchor: 'rel' | 'abs';
|
|
2375
2641
|
/** Top-left corner as chart-relative fractions (0-1). */
|
|
@@ -2470,6 +2736,10 @@ interface PptxChartTrendline {
|
|
|
2470
2736
|
displayRSq?: boolean;
|
|
2471
2737
|
displayEq?: boolean;
|
|
2472
2738
|
color?: string;
|
|
2739
|
+
/** Trendline width in points (`c:trendline/c:spPr/a:ln/@w`, EMU / 12700). */
|
|
2740
|
+
lineWidth?: number;
|
|
2741
|
+
/** Trendline dash style (`c:trendline/c:spPr/a:ln/a:prstDash/@val`). */
|
|
2742
|
+
lineDashStyle?: string;
|
|
2473
2743
|
label?: PptxChartTrendlineLabel | null;
|
|
2474
2744
|
}
|
|
2475
2745
|
/** Typed, commonly edited properties of `c:trendlineLbl`. */
|
|
@@ -2515,6 +2785,10 @@ interface PptxChartErrBars {
|
|
|
2515
2785
|
customMinus?: number[];
|
|
2516
2786
|
noEndCap?: boolean;
|
|
2517
2787
|
color?: string;
|
|
2788
|
+
/** Error-bar line width in points (`c:errBars/c:spPr/a:ln/@w`, EMU / 12700). */
|
|
2789
|
+
width?: number;
|
|
2790
|
+
/** Error-bar line dash style (`c:errBars/c:spPr/a:ln/a:prstDash/@val`). */
|
|
2791
|
+
dashStyle?: string;
|
|
2518
2792
|
}
|
|
2519
2793
|
/**
|
|
2520
2794
|
* Visibility flags for the chart data table (axes + legend keys).
|
|
@@ -2601,6 +2875,8 @@ interface PptxChartDataPoint {
|
|
|
2601
2875
|
marker?: PptxChartMarker;
|
|
2602
2876
|
/** Render a bubble-chart point with a 3-D appearance. */
|
|
2603
2877
|
bubble3D?: boolean;
|
|
2878
|
+
/** Per-point picture-fill flags (`c:dPt/c:pictureOptions`). */
|
|
2879
|
+
picture?: PptxChartDataPointPicture;
|
|
2604
2880
|
}
|
|
2605
2881
|
/** Schema values accepted by `c:dLblPos`. */
|
|
2606
2882
|
type PptxChartDataLabelPosition = 'bestFit' | 'b' | 'ctr' | 'inBase' | 'inEnd' | 'l' | 'outEnd' | 'r' | 't';
|
|
@@ -2619,6 +2895,32 @@ interface PptxChartDataLabel {
|
|
|
2619
2895
|
text?: string;
|
|
2620
2896
|
separator?: string;
|
|
2621
2897
|
showLeaderLines?: boolean;
|
|
2898
|
+
/**
|
|
2899
|
+
* Per-label number-format override (`c:dLbl/c:numFmt/@formatCode`), taking
|
|
2900
|
+
* precedence over the chart-level {@link PptxChartDataLabelOptions.numberFormat}
|
|
2901
|
+
* and the series' own {@link PptxChartSeries.numberFormat} when set.
|
|
2902
|
+
*/
|
|
2903
|
+
numberFormat?: string;
|
|
2904
|
+
/**
|
|
2905
|
+
* Manually dragged label position (`c:dLbl/c:layout/c:manualLayout`), the
|
|
2906
|
+
* same CT_ManualLayout shape used for title/legend/plotArea. `null`
|
|
2907
|
+
* explicitly clears a drag back to the automatic position.
|
|
2908
|
+
*/
|
|
2909
|
+
layout?: PptxChartManualLayout | null;
|
|
2910
|
+
/**
|
|
2911
|
+
* This label's own font (`c:dLbl/c:txPr/a:p/a:pPr/a:defRPr`, or ChartEx
|
|
2912
|
+
* `cx:dataLabel/cx:txPr`), taking precedence over the chart/series-level
|
|
2913
|
+
* {@link PptxChartDataLabelOptions.txPr} when set. Reuses the legend
|
|
2914
|
+
* entry's flat text-style shape since both are the same
|
|
2915
|
+
* `.../a:p/a:pPr/a:defRPr` default-run-property style.
|
|
2916
|
+
*/
|
|
2917
|
+
txPr?: PptxChartLegendTextStyle;
|
|
2918
|
+
/**
|
|
2919
|
+
* This label's own shape formatting (`c:dLbl/c:spPr`): fill/line colour,
|
|
2920
|
+
* width, and dash style for the label's callout box, taking precedence
|
|
2921
|
+
* over any chart/series-level default when set.
|
|
2922
|
+
*/
|
|
2923
|
+
spPr?: PptxChartShapeProps;
|
|
2622
2924
|
}
|
|
2623
2925
|
/** Axis number format. */
|
|
2624
2926
|
interface PptxChartAxisNumFmt {
|
|
@@ -2633,6 +2935,16 @@ interface PptxChartDisplayUnitsLabel {
|
|
|
2633
2935
|
layout?: PptxChartManualLayout | null;
|
|
2634
2936
|
/** Label shape formatting. `null` removes `c:spPr`. */
|
|
2635
2937
|
spPr?: PptxChartShapeProps | null;
|
|
2938
|
+
/**
|
|
2939
|
+
* The label's own run font, when it carries a distinct `txPr` from the
|
|
2940
|
+
* axis's own (ChartEx `cx:unitsLabel/cx:txPr`; classic `c:dispUnitsLbl`
|
|
2941
|
+
* has no equivalent child, so this is only ever populated from a ChartEx
|
|
2942
|
+
* axis).
|
|
2943
|
+
*/
|
|
2944
|
+
fontFamily?: string;
|
|
2945
|
+
fontSize?: number;
|
|
2946
|
+
fontBold?: boolean;
|
|
2947
|
+
fontColor?: string;
|
|
2636
2948
|
}
|
|
2637
2949
|
/** Axis formatting for category, value, or date axes. */
|
|
2638
2950
|
interface PptxChartAxisFormatting extends PptxChartAxisLabelFormatting {
|
|
@@ -2737,8 +3049,27 @@ interface PptxChartWaterfallOptions {
|
|
|
2737
3049
|
/** Whether connector lines are visible between adjacent bars. */
|
|
2738
3050
|
connectorLines?: boolean;
|
|
2739
3051
|
}
|
|
3052
|
+
/**
|
|
3053
|
+
* A single breakpoint in a ChartEx colour-by-value scale
|
|
3054
|
+
* (`cx:valueColorPositions/cx:colorPosition`). `kind` selects which of
|
|
3055
|
+
* CT_ColorPosition's union members was authored; `value` is absent for
|
|
3056
|
+
* `min`/`max` (they are implicit endpoints) and required otherwise.
|
|
3057
|
+
*/
|
|
3058
|
+
interface PptxCxValueColorPosition {
|
|
3059
|
+
kind: 'min' | 'max' | 'number' | 'percent';
|
|
3060
|
+
value?: number;
|
|
3061
|
+
}
|
|
2740
3062
|
/** Office 2016 ChartEx geographic series dimensions and layout options. */
|
|
2741
3063
|
interface PptxChartRegionMapOptions {
|
|
3064
|
+
/**
|
|
3065
|
+
* Colour-by-value gradient stops (`cx:valueColors/cx:colors/cx:color`),
|
|
3066
|
+
* resolved to hex, 2 or 3 entries (matching PowerPoint's two- and
|
|
3067
|
+
* three-colour scale UI). Paired index-for-index with
|
|
3068
|
+
* {@link valueColorPositions} when both are present.
|
|
3069
|
+
*/
|
|
3070
|
+
valueColors?: string[];
|
|
3071
|
+
/** Gradient breakpoints for {@link valueColors} (`cx:valueColorPositions`). */
|
|
3072
|
+
valueColorPositions?: PptxCxValueColorPosition[];
|
|
2742
3073
|
/** Optional provider entity identifiers aligned with categories and values. */
|
|
2743
3074
|
entityIds?: string[];
|
|
2744
3075
|
/** Original `cx:pt/@idx` values for category points. */
|
|
@@ -2903,6 +3234,20 @@ interface PptxChartDataLabelOptions {
|
|
|
2903
3234
|
* Omit to let PowerPoint use the type default.
|
|
2904
3235
|
*/
|
|
2905
3236
|
position?: PptxChartDataLabelPosition;
|
|
3237
|
+
/**
|
|
3238
|
+
* Chart-level number-format override (`c:dLbls/c:numFmt/@formatCode`),
|
|
3239
|
+
* applied to every label of the series/chart-type unless a per-point
|
|
3240
|
+
* {@link PptxChartDataLabel.numberFormat} overrides it.
|
|
3241
|
+
*/
|
|
3242
|
+
numberFormat?: string;
|
|
3243
|
+
/**
|
|
3244
|
+
* Default font for every label at this level (`c:dLbls/c:txPr`, or
|
|
3245
|
+
* ChartEx `cx:dataLabels/cx:txPr`), overridden by a per-point
|
|
3246
|
+
* {@link PptxChartDataLabel.txPr} when set. `c:dLbls` at the chart-type
|
|
3247
|
+
* level and the series level cascade the same way the show flags do
|
|
3248
|
+
* (point > series > chart-type).
|
|
3249
|
+
*/
|
|
3250
|
+
txPr?: PptxChartLegendTextStyle;
|
|
2906
3251
|
}
|
|
2907
3252
|
/** Typed text defaults for a single chart legend entry. */
|
|
2908
3253
|
interface PptxChartLegendTextStyle {
|
|
@@ -2959,6 +3304,17 @@ interface PptxChartStyle {
|
|
|
2959
3304
|
hasDataLabels?: boolean;
|
|
2960
3305
|
/** Chart-level data-label content/position options (when `hasDataLabels`). */
|
|
2961
3306
|
dataLabels?: PptxChartDataLabelOptions;
|
|
3307
|
+
/**
|
|
3308
|
+
* Font styling for the chart's own title (`c:title/c:txPr`), edited via
|
|
3309
|
+
* `applyChartTitleStyleToXml` (chart-title-style-serializer.ts). Distinct
|
|
3310
|
+
* from an axis title's styling (`PptxChartAxisFormatting.fontFamily` etc.).
|
|
3311
|
+
*/
|
|
3312
|
+
titleFontFamily?: string;
|
|
3313
|
+
titleFontSize?: number;
|
|
3314
|
+
titleFontBold?: boolean;
|
|
3315
|
+
titleFontColor?: string;
|
|
3316
|
+
/** Title text-box fill/border (`c:title/c:spPr`). `null` removes it. */
|
|
3317
|
+
titleSpPr?: PptxChartShapeProps | null;
|
|
2962
3318
|
}
|
|
2963
3319
|
/**
|
|
2964
3320
|
* External data source reference for a chart (c:externalData).
|
|
@@ -3128,6 +3484,16 @@ interface PptxChartDateCategories {
|
|
|
3128
3484
|
*/
|
|
3129
3485
|
interface PptxChartData {
|
|
3130
3486
|
title?: string;
|
|
3487
|
+
/**
|
|
3488
|
+
* Rich-text runs of the title, parsed from `c:title/c:tx/c:rich` (issue:
|
|
3489
|
+
* chart title rich text). Lossless multi-run alternative to the flat
|
|
3490
|
+
* {@link title}: when present, the writer serialises every run's own
|
|
3491
|
+
* bold/italic/size/color; when absent, save falls back to the flat
|
|
3492
|
+
* `title` path as before. Only populated for a classic (`c:`) chart's
|
|
3493
|
+
* rich (typed) title, not a ChartEx (`cx:`) title or one authored as a
|
|
3494
|
+
* linked-cell reference.
|
|
3495
|
+
*/
|
|
3496
|
+
titleRuns?: PptxChartTitleRun[];
|
|
3131
3497
|
chartType: PptxChartType;
|
|
3132
3498
|
categories: string[];
|
|
3133
3499
|
/**
|
|
@@ -3219,8 +3585,10 @@ interface PptxChartData {
|
|
|
3219
3585
|
chartRelationshipId?: string;
|
|
3220
3586
|
/** `null` explicitly removes an existing ChartML data table. */
|
|
3221
3587
|
dataTable?: PptxChartDataTable | null;
|
|
3222
|
-
dropLines
|
|
3223
|
-
|
|
3588
|
+
/** `null` explicitly removes an existing `c:dropLines` element. */
|
|
3589
|
+
dropLines?: PptxChartLineStyle | null;
|
|
3590
|
+
/** `null` explicitly removes an existing `c:hiLowLines` element. */
|
|
3591
|
+
hiLowLines?: PptxChartLineStyle | null;
|
|
3224
3592
|
/** `null` explicitly removes an existing up/down-bars container. */
|
|
3225
3593
|
upDownBars?: PptxChartUpDownBars | null;
|
|
3226
3594
|
axes?: PptxChartAxisFormatting[];
|
|
@@ -3335,10 +3703,45 @@ interface PptxChartData {
|
|
|
3335
3703
|
pivotFormats?: PptxChartPivotFormats | null;
|
|
3336
3704
|
/**
|
|
3337
3705
|
* Color-map override (`c:clrMapOvr`) carrying 12 attributes that
|
|
3338
|
-
* remap theme colour roles for this chart only.
|
|
3339
|
-
* `attribute
|
|
3706
|
+
* remap theme colour roles for this chart only. Modeled as a flat
|
|
3707
|
+
* `attribute -> value` map (e.g. `{ bg1: 'lt1', accent1: 'accent2' }`)
|
|
3708
|
+
* so unknown/future attributes round-trip without code changes.
|
|
3709
|
+
* `null` explicitly removes an existing `c:clrMapOvr`; an empty object
|
|
3710
|
+
* is treated the same as `null` on save.
|
|
3711
|
+
*/
|
|
3712
|
+
clrMapOvr?: Record<string, string> | null;
|
|
3713
|
+
/**
|
|
3714
|
+
* Whether the chart's own cached numeric values use the 1904 date epoch
|
|
3715
|
+
* (`c:chartSpace/c:date1904/@val`). Independent of, and authoritative over,
|
|
3716
|
+
* any embedded workbook's `workbookPr/@date1904` (a chart can lack an
|
|
3717
|
+
* embedded workbook entirely, or its cache can legitimately differ from the
|
|
3718
|
+
* workbook's current setting). Absent when the source XML omits the
|
|
3719
|
+
* element, in which case the 1900 system applies (the schema default).
|
|
3340
3720
|
*/
|
|
3341
|
-
|
|
3721
|
+
date1904?: boolean;
|
|
3722
|
+
/**
|
|
3723
|
+
* PowerPoint's "Rounded corners" chart-area option
|
|
3724
|
+
* (`c:chartSpace/c:roundedCorners/@val`, default `false`). Absent when the
|
|
3725
|
+
* source XML omits the element.
|
|
3726
|
+
*/
|
|
3727
|
+
roundedCorners?: boolean;
|
|
3728
|
+
/**
|
|
3729
|
+
* 3-D chart depth/spacing along the series axis, as a percentage
|
|
3730
|
+
* (`c:gapDepth/@val`, `ST_GapAmount`, 0 through 500). Legal on
|
|
3731
|
+
* `bar3D`/`area3D`/`line3D`/`surface` chart-type containers only. Read-only
|
|
3732
|
+
* for rendering, matching {@link barGapWidth}/{@link barOverlap}: save
|
|
3733
|
+
* round-trips it via the preserved chart XML rather than a typed edit path.
|
|
3734
|
+
*/
|
|
3735
|
+
gapDepth?: number;
|
|
3736
|
+
/**
|
|
3737
|
+
* Parsed Office 2013+ chart-style part (`ppt/charts/style#.xml`,
|
|
3738
|
+
* `cs:chartStyle`), providing per-element font/line/fill defaults for
|
|
3739
|
+
* whichever built-in "Chart Styles" gallery entry ({@link PptxChartStyle.styleId})
|
|
3740
|
+
* is active. Absent when the chart has no such part (common for
|
|
3741
|
+
* automation-authored charts, where PowerPoint still implies style 2's
|
|
3742
|
+
* look via its own bundled defaults).
|
|
3743
|
+
*/
|
|
3744
|
+
chartStyleDefinition?: PptxChartStyleDefinition;
|
|
3342
3745
|
}
|
|
3343
3746
|
//#endregion
|
|
3344
3747
|
//#region src/core/types/image.d.ts
|
|
@@ -3862,6 +4265,52 @@ interface MediaCaptionTrack {
|
|
|
3862
4265
|
isDefault?: boolean;
|
|
3863
4266
|
}
|
|
3864
4267
|
//#endregion
|
|
4268
|
+
//#region src/core/types/smart-art-chrome.d.ts
|
|
4269
|
+
/**
|
|
4270
|
+
* Background / outline extracted from `dgm:bg` and `dgm:whole`.
|
|
4271
|
+
*
|
|
4272
|
+
* @example
|
|
4273
|
+
* ```ts
|
|
4274
|
+
* const chrome: PptxSmartArtChrome = {
|
|
4275
|
+
* backgroundColor: "#F0F0F0",
|
|
4276
|
+
* outlineColor: "#333333",
|
|
4277
|
+
* outlineWidth: 1,
|
|
4278
|
+
* };
|
|
4279
|
+
* // => satisfies PptxSmartArtChrome
|
|
4280
|
+
* ```
|
|
4281
|
+
*/
|
|
4282
|
+
interface PptxSmartArtChrome {
|
|
4283
|
+
/**
|
|
4284
|
+
* Background fill colour (hex). When the real `dgm:bg` fill is a gradient
|
|
4285
|
+
* or pattern (see {@link PptxSmartArtChrome.backgroundFillXml}), this is an
|
|
4286
|
+
* APPROXIMATION (the gradient's first stop, or the pattern's foreground
|
|
4287
|
+
* colour) for a consumer that only wants one display colour, not the full fill.
|
|
4288
|
+
*/
|
|
4289
|
+
backgroundColor?: string;
|
|
4290
|
+
/**
|
|
4291
|
+
* Raw `dgm:bg` fill XML, present only when the background is a gradient or
|
|
4292
|
+
* pattern fill (a solid fill is fully captured by {@link PptxSmartArtChrome.backgroundColor}
|
|
4293
|
+
* alone). Round-trip only: `smartart-save-chrome.ts` re-emits this verbatim
|
|
4294
|
+
* instead of flattening the fill to a solid colour on save.
|
|
4295
|
+
*/
|
|
4296
|
+
backgroundFillXml?: PptxSmartArtRawBackgroundFill;
|
|
4297
|
+
/** Outline stroke colour (hex). */
|
|
4298
|
+
outlineColor?: string;
|
|
4299
|
+
/** Outline stroke width in points. */
|
|
4300
|
+
outlineWidth?: number;
|
|
4301
|
+
}
|
|
4302
|
+
/**
|
|
4303
|
+
* A `dgm:bg` fill this viewer doesn't fully model as first-class chrome
|
|
4304
|
+
* (gradient or pattern), preserved verbatim for round-trip. See
|
|
4305
|
+
* {@link PptxSmartArtChrome.backgroundFillXml}.
|
|
4306
|
+
*/
|
|
4307
|
+
interface PptxSmartArtRawBackgroundFill {
|
|
4308
|
+
/** Local element name of the fill under `dgm:bg` (`gradFill` or `pattFill`). */
|
|
4309
|
+
localName: 'gradFill' | 'pattFill';
|
|
4310
|
+
/** The fill element's own attributes/children, as parsed. */
|
|
4311
|
+
xml: XmlObject;
|
|
4312
|
+
}
|
|
4313
|
+
//#endregion
|
|
3865
4314
|
//#region src/core/types/smart-art-constraint-rules.d.ts
|
|
3866
4315
|
type PptxSmartArtConstraintRelationship = 'self' | 'ch' | 'des';
|
|
3867
4316
|
type PptxSmartArtConstraintOperator = 'none' | 'equ' | 'gte' | 'lte';
|
|
@@ -3960,6 +4409,14 @@ interface PptxSmartArtLayoutNodeShape {
|
|
|
3960
4409
|
adjustments?: PptxSmartArtShapeAdjustment[];
|
|
3961
4410
|
/** `dgm:shape/@hideGeom`: the shape is present only to size text, never painted. */
|
|
3962
4411
|
hideGeometry?: boolean;
|
|
4412
|
+
/**
|
|
4413
|
+
* `dgm:shape/@lkTxEntry` (CT_Shape, boolean, default false): this node is a
|
|
4414
|
+
* decorative shape that should mirror its paired content node's text
|
|
4415
|
+
* rather than always rendering blank. See `smartart-layout-interpreter-
|
|
4416
|
+
* pyramid.ts`'s `arrangePyramid`, the interpreter's one existing
|
|
4417
|
+
* synthesized-decorative-shape call site.
|
|
4418
|
+
*/
|
|
4419
|
+
lkTxEntry?: boolean;
|
|
3963
4420
|
}
|
|
3964
4421
|
/** Identity and ordering metadata from DiagramML CT_LayoutNode. */
|
|
3965
4422
|
interface PptxSmartArtLayoutNode {
|
|
@@ -4187,6 +4644,13 @@ interface PptxSmartArtNode {
|
|
|
4187
4644
|
* generic cycled palette (see `applySmartArtRoleColors`).
|
|
4188
4645
|
*/
|
|
4189
4646
|
styleRole?: string;
|
|
4647
|
+
/**
|
|
4648
|
+
* `dgm:prSet/@coherent3DOff` (`CT_ElemPropSet`) resolved from the node's
|
|
4649
|
+
* paired presentation point: when true, this node opts out of the
|
|
4650
|
+
* diagram's overall coherent-3D scene rotation (a `dgm:scene3d`/`dgm:sp3d`
|
|
4651
|
+
* quick-style variation) applied to every other node.
|
|
4652
|
+
*/
|
|
4653
|
+
coherent3DOff?: boolean;
|
|
4190
4654
|
/**
|
|
4191
4655
|
* Per-run text + run-properties for the node's first paragraph, captured at
|
|
4192
4656
|
* parse time. When the joined run text still equals {@link text} (the node
|
|
@@ -4234,9 +4698,29 @@ interface PptxSmartArtColorListMetadata {
|
|
|
4234
4698
|
method?: PptxSmartArtColorApplicationMethod;
|
|
4235
4699
|
hueDirection?: PptxSmartArtHueDirection;
|
|
4236
4700
|
}
|
|
4701
|
+
/**
|
|
4702
|
+
* A quick-style label's `a:lnRef`/`a:fillRef`/`a:effectRef`/`a:fontRef`
|
|
4703
|
+
* (`CT_ShapeStyle`, the same complex type an ordinary shape's `p:style`
|
|
4704
|
+
* uses), resolved against the theme's `fmtScheme` at parse time instead of
|
|
4705
|
+
* the coarse subtle/moderate/intense enum ({@link PptxSmartArtQuickStyle.effectIntensity}).
|
|
4706
|
+
* Only populated when a theme format scheme was available when the quick
|
|
4707
|
+
* style was parsed. See G13 in the 2026-09 diagram audit.
|
|
4708
|
+
*/
|
|
4709
|
+
interface PptxSmartArtResolvedStyleRef {
|
|
4710
|
+
fillColor?: string;
|
|
4711
|
+
fillMode?: 'solid' | 'gradient' | 'pattern' | 'none' | 'theme';
|
|
4712
|
+
strokeColor?: string;
|
|
4713
|
+
strokeWidth?: number;
|
|
4714
|
+
/** `a:effectRef`'s theme-resolved outer shadow colour, when the style has one. */
|
|
4715
|
+
shadowColor?: string;
|
|
4716
|
+
/** `a:fontRef`'s theme-resolved typeface (`+mn-lt`/`+mj-lt` -> the theme's actual font). */
|
|
4717
|
+
fontTypeface?: string;
|
|
4718
|
+
}
|
|
4237
4719
|
/** CT_StyleLabel metadata from a quick-style definition. */
|
|
4238
4720
|
interface PptxSmartArtQuickStyleLabel {
|
|
4239
4721
|
name: string;
|
|
4722
|
+
/** Theme-resolved `dgm:style` refs for this label's role, when available. */
|
|
4723
|
+
resolvedStyle?: PptxSmartArtResolvedStyleRef;
|
|
4240
4724
|
}
|
|
4241
4725
|
/** CT_CTStyleLabel metadata from a color-transform definition. */
|
|
4242
4726
|
interface PptxSmartArtColorStyleLabel {
|
|
@@ -4499,27 +4983,6 @@ interface PptxSmartArtDrawingShape extends PptxCustomPathProperties {
|
|
|
4499
4983
|
textFrameWidth?: number;
|
|
4500
4984
|
textFrameHeight?: number;
|
|
4501
4985
|
}
|
|
4502
|
-
/**
|
|
4503
|
-
* Background / outline extracted from `dgm:bg` and `dgm:whole`.
|
|
4504
|
-
*
|
|
4505
|
-
* @example
|
|
4506
|
-
* ```ts
|
|
4507
|
-
* const chrome: PptxSmartArtChrome = {
|
|
4508
|
-
* backgroundColor: "#F0F0F0",
|
|
4509
|
-
* outlineColor: "#333333",
|
|
4510
|
-
* outlineWidth: 1,
|
|
4511
|
-
* };
|
|
4512
|
-
* // => satisfies PptxSmartArtChrome
|
|
4513
|
-
* ```
|
|
4514
|
-
*/
|
|
4515
|
-
interface PptxSmartArtChrome {
|
|
4516
|
-
/** Background fill colour (hex). */
|
|
4517
|
-
backgroundColor?: string;
|
|
4518
|
-
/** Outline stroke colour (hex). */
|
|
4519
|
-
outlineColor?: string;
|
|
4520
|
-
/** Outline stroke width in points. */
|
|
4521
|
-
outlineWidth?: number;
|
|
4522
|
-
}
|
|
4523
4986
|
/**
|
|
4524
4987
|
* Presentation layout variables from `dgm:prSet/dgm:presLayoutVars` (data model)
|
|
4525
4988
|
* or `dgm:varLst` (layout definition defaults).
|
|
@@ -4623,13 +5086,55 @@ interface PptxSmartArtData {
|
|
|
4623
5086
|
drawingDirty?: boolean;
|
|
4624
5087
|
}
|
|
4625
5088
|
//#endregion
|
|
4626
|
-
//#region src/core/types/table.d.ts
|
|
5089
|
+
//#region src/core/types/table-style-edit.d.ts
|
|
4627
5090
|
/**
|
|
4628
|
-
*
|
|
4629
|
-
*
|
|
5091
|
+
* A `a:fillRef`/`a:lnRef`/`a:effectRef`-style style-matrix reference: an
|
|
5092
|
+
* index into the theme's format scheme (`a:fmtScheme/a:fillStyleLst`, 1-based
|
|
5093
|
+
* per ECMA-376 §20.1.4.1.12) plus an optional colour transform child.
|
|
5094
|
+
*
|
|
5095
|
+
* Distinct from an already-resolved {@link ParsedTableStyleFill}: a fill ref
|
|
5096
|
+
* points AT a theme style-matrix entry rather than carrying a colour choice
|
|
5097
|
+
* directly, though the two commonly appear together (`<a:fillRef idx="2">
|
|
5098
|
+
* <a:schemeClr val="accent1"/></a:fillRef>`).
|
|
4630
5099
|
*
|
|
4631
|
-
* @
|
|
5100
|
+
* @example
|
|
5101
|
+
* ```ts
|
|
5102
|
+
* const ref: ParsedTableFillRef = { idx: 2, color: { schemeColor: 'accent1' } };
|
|
5103
|
+
* // => satisfies ParsedTableFillRef
|
|
5104
|
+
* ```
|
|
4632
5105
|
*/
|
|
5106
|
+
interface ParsedTableFillRef {
|
|
5107
|
+
/** 1-based index into the theme format scheme's fill style list. */
|
|
5108
|
+
idx: number;
|
|
5109
|
+
/** Colour transform child (`a:schemeClr`/`a:srgbClr`) applied to the referenced style. */
|
|
5110
|
+
color?: ParsedTableStyleFill;
|
|
5111
|
+
}
|
|
5112
|
+
/**
|
|
5113
|
+
* One leaf (or `effectDag`-wrapped) node of an `a:effectLst`/`a:effectDag`
|
|
5114
|
+
* effect chain, kept mostly opaque: {@link kind} names the OOXML element so a
|
|
5115
|
+
* consumer can recognise common effects (`outerShdw`, `glow`, `softEdge`,
|
|
5116
|
+
* `reflection`, `blur`, `innerShdw`, `prstShdw`, `fillOverlay`, `alphaModFix`,
|
|
5117
|
+
* `alphaInv`, `grayscl`, `biLevel`, `duotone`, `hsl`, `lum`, `tint`) without
|
|
5118
|
+
* this module re-deriving the full shape-effect taxonomy already modelled on
|
|
5119
|
+
* `ShapeStyle`; {@link xml} preserves the node verbatim for lossless re-emit.
|
|
5120
|
+
*
|
|
5121
|
+
* @example
|
|
5122
|
+
* ```ts
|
|
5123
|
+
* const effect: ParsedTableStyleEffect = {
|
|
5124
|
+
* kind: 'outerShdw',
|
|
5125
|
+
* xml: { '@_blurRad': '40000', '@_dist': '20000', '@_dir': '5400000' },
|
|
5126
|
+
* };
|
|
5127
|
+
* // => satisfies ParsedTableStyleEffect
|
|
5128
|
+
* ```
|
|
5129
|
+
*/
|
|
5130
|
+
interface ParsedTableStyleEffect {
|
|
5131
|
+
/** The OOXML element's local name, e.g. `outerShdw`, `glow`, `softEdge`. */
|
|
5132
|
+
kind: string;
|
|
5133
|
+
/** Verbatim XML node (attributes + children) for lossless round-trip. */
|
|
5134
|
+
xml: XmlObject;
|
|
5135
|
+
}
|
|
5136
|
+
//#endregion
|
|
5137
|
+
//#region src/core/types/table.d.ts
|
|
4633
5138
|
/**
|
|
4634
5139
|
* Per-cell visual style for a table cell.
|
|
4635
5140
|
*
|
|
@@ -4666,6 +5171,14 @@ interface PptxTableCellStyle {
|
|
|
4666
5171
|
* future expansion alongside the run-properties round-trip path.
|
|
4667
5172
|
*/
|
|
4668
5173
|
colorXml?: XmlObject;
|
|
5174
|
+
/**
|
|
5175
|
+
* Typed theme colour reference for the cell text colour, set when
|
|
5176
|
+
* {@link colorXml} is a plain `a:schemeClr`. Wins on save, mirroring
|
|
5177
|
+
* `TextStyle.colorRef`. Distinct from {@link ParsedTableStyleFill.schemeColor},
|
|
5178
|
+
* which describes a `ppt/tableStyles.xml` section fill rather than an
|
|
5179
|
+
* individual cell override.
|
|
5180
|
+
*/
|
|
5181
|
+
colorRef?: PptxThemeColorRef;
|
|
4669
5182
|
backgroundColor?: string;
|
|
4670
5183
|
/**
|
|
4671
5184
|
* Raw XML colour-choice node preserved from cell `a:tcPr/a:solidFill` for
|
|
@@ -4673,6 +5186,12 @@ interface PptxTableCellStyle {
|
|
|
4673
5186
|
* {@link backgroundColor} still matches the original colour.
|
|
4674
5187
|
*/
|
|
4675
5188
|
backgroundColorXml?: XmlObject;
|
|
5189
|
+
/**
|
|
5190
|
+
* Typed theme colour reference for the cell fill, set when
|
|
5191
|
+
* {@link backgroundColorXml} is a plain `a:schemeClr`. Wins on save,
|
|
5192
|
+
* mirroring `ShapeStyle.fillColorRef`.
|
|
5193
|
+
*/
|
|
5194
|
+
backgroundColorRef?: PptxThemeColorRef;
|
|
4676
5195
|
borderColor?: string;
|
|
4677
5196
|
/** Top border width in px. */
|
|
4678
5197
|
borderTopWidth?: number;
|
|
@@ -4976,6 +5495,24 @@ interface PptxTableData {
|
|
|
4976
5495
|
bandColCycle?: number;
|
|
4977
5496
|
/** Right-to-left table layout from `a:tblPr/@rtl`. */
|
|
4978
5497
|
rtl?: boolean;
|
|
5498
|
+
/**
|
|
5499
|
+
* `a:tblPr`'s OWN fill (`CT_TableProperties` §21.1.3.15's
|
|
5500
|
+
* `EG_FillProperties`), independent of any `a:tblStyleLst`-referenced style
|
|
5501
|
+
* or that style's `a:tblBg`. Applied as the lowest-priority fill layer,
|
|
5502
|
+
* beneath the table style's `wholeTbl` fill. Real PowerPoint decks route
|
|
5503
|
+
* table appearance through `tableStyleId` instead, so this mainly matters
|
|
5504
|
+
* for non-PowerPoint authoring tools (issue G6).
|
|
5505
|
+
*/
|
|
5506
|
+
tableFill?: ParsedTableStyleFill;
|
|
5507
|
+
/**
|
|
5508
|
+
* `a:tblPr`'s own `a:effectLst` (or `a:effectDag`) effect chain,
|
|
5509
|
+
* independent of the referenced table style, decomposed into a typed
|
|
5510
|
+
* sequence of {@link ParsedTableStyleEffect} nodes (issue G6). Each node
|
|
5511
|
+
* keeps its own XML verbatim for lossless round-trip; empty array is
|
|
5512
|
+
* normalised to `undefined` by the parser so `tableEffects` is only ever
|
|
5513
|
+
* present when there is at least one effect.
|
|
5514
|
+
*/
|
|
5515
|
+
tableEffects?: ParsedTableStyleEffect[];
|
|
4979
5516
|
}
|
|
4980
5517
|
/**
|
|
4981
5518
|
* A single fill reference within a table style section.
|
|
@@ -5097,7 +5634,7 @@ interface ParsedTableStyleText {
|
|
|
5097
5634
|
* A single border side within a table style's `a:tcStyle/a:tcBdr`.
|
|
5098
5635
|
*
|
|
5099
5636
|
* Corresponds to one of `a:left`, `a:right`, `a:top`, `a:bottom`,
|
|
5100
|
-
* `a:insideH`, `a:insideV`, `a:tl2br`, `a:
|
|
5637
|
+
* `a:insideH`, `a:insideV`, `a:tl2br`, `a:tr2bl` (each a
|
|
5101
5638
|
* `CT_ThemeableLineStyle` wrapping an `a:ln`).
|
|
5102
5639
|
*
|
|
5103
5640
|
* @example
|
|
@@ -5137,19 +5674,34 @@ interface ParsedTableStyleBorders {
|
|
|
5137
5674
|
insideV?: ParsedTableStyleBorder;
|
|
5138
5675
|
/** Top-left to bottom-right diagonal. */
|
|
5139
5676
|
tl2br?: ParsedTableStyleBorder;
|
|
5140
|
-
/**
|
|
5141
|
-
|
|
5677
|
+
/**
|
|
5678
|
+
* Top-right to bottom-left diagonal (`a:tr2bl`, ECMA-376's
|
|
5679
|
+
* `CT_TableCellBorderStyle` sequence: left/right/top/bottom/insideH/
|
|
5680
|
+
* insideV/tl2br/tr2bl). The field keeps its historical `bl2tr` spelling
|
|
5681
|
+
* only in the sense that it names the same geometric anti-diagonal line
|
|
5682
|
+
* (top-right-to-bottom-left and bottom-left-to-top-right describe one
|
|
5683
|
+
* undirected diagonal); the parser accepts the real `a:tr2bl` element and,
|
|
5684
|
+
* leniently, a legacy `a:bl2tr` this app previously wrote (issue G4).
|
|
5685
|
+
*/
|
|
5686
|
+
tr2bl?: ParsedTableStyleBorder;
|
|
5142
5687
|
}
|
|
5143
5688
|
/**
|
|
5144
5689
|
* Table background style (CT_TableBackgroundStyle, ECMA-376 §21.1.3.7).
|
|
5145
5690
|
*
|
|
5146
|
-
* Corresponds to the `<a:tblBg>` child of `<a:tblStyle>`.
|
|
5147
|
-
*
|
|
5148
|
-
*
|
|
5691
|
+
* Corresponds to the `<a:tblBg>` child of `<a:tblStyle>`. Captures the
|
|
5692
|
+
* resolved scheme-fill colour, an unresolved style-matrix `a:fillRef`, and a
|
|
5693
|
+
* presence flag for effects (verbatim XML for the effect list is preserved
|
|
5694
|
+
* separately by the save path).
|
|
5149
5695
|
*/
|
|
5150
5696
|
interface ParsedTableBackground {
|
|
5151
5697
|
/** Solid fill (resolved from `a:fill > a:solidFill > a:schemeClr`). */
|
|
5152
5698
|
fill?: ParsedTableStyleFill;
|
|
5699
|
+
/**
|
|
5700
|
+
* Style-matrix fill reference (`<a:fillRef idx="N">...</a:fillRef>`),
|
|
5701
|
+
* mutually exclusive with {@link fill} (`a:fill` is the choice sibling of
|
|
5702
|
+
* `a:fillRef` in `CT_TableBackgroundStyle`).
|
|
5703
|
+
*/
|
|
5704
|
+
fillRef?: ParsedTableFillRef;
|
|
5153
5705
|
/** Has an `a:effectLst` child that should be round-tripped. */
|
|
5154
5706
|
hasEffectLst?: boolean;
|
|
5155
5707
|
}
|
|
@@ -5206,6 +5758,26 @@ interface ParsedTableStyleEntry {
|
|
|
5206
5758
|
swCellText?: ParsedTableStyleText;
|
|
5207
5759
|
neCellText?: ParsedTableStyleText;
|
|
5208
5760
|
nwCellText?: ParsedTableStyleText;
|
|
5761
|
+
/**
|
|
5762
|
+
* Per-role 3D bevel + lighting from `a:tcStyle/a:cell3D` (CT_Cell3D),
|
|
5763
|
+
* distinct from the per-cell `a:tcPr/a:cell3D` {@link PptxTableCellStyle}
|
|
5764
|
+
* already supports. None of PowerPoint's 74 built-in gallery styles use
|
|
5765
|
+
* this (0 hits in the built-in catalogue), so it only matters for a
|
|
5766
|
+
* hand-authored or third-party table style.
|
|
5767
|
+
*/
|
|
5768
|
+
wholeTblCell3D?: PptxTableCell3D;
|
|
5769
|
+
firstRowCell3D?: PptxTableCell3D;
|
|
5770
|
+
lastRowCell3D?: PptxTableCell3D;
|
|
5771
|
+
firstColCell3D?: PptxTableCell3D;
|
|
5772
|
+
lastColCell3D?: PptxTableCell3D;
|
|
5773
|
+
band1HCell3D?: PptxTableCell3D;
|
|
5774
|
+
band2HCell3D?: PptxTableCell3D;
|
|
5775
|
+
band1VCell3D?: PptxTableCell3D;
|
|
5776
|
+
band2VCell3D?: PptxTableCell3D;
|
|
5777
|
+
seCellCell3D?: PptxTableCell3D;
|
|
5778
|
+
swCellCell3D?: PptxTableCell3D;
|
|
5779
|
+
neCellCell3D?: PptxTableCell3D;
|
|
5780
|
+
nwCellCell3D?: PptxTableCell3D;
|
|
5209
5781
|
}
|
|
5210
5782
|
/**
|
|
5211
5783
|
* Map of GUID → table style entry.
|
|
@@ -5228,6 +5800,38 @@ interface ParsedTableStyleEntry {
|
|
|
5228
5800
|
type ParsedTableStyleMap = Record<string, ParsedTableStyleEntry>;
|
|
5229
5801
|
//#endregion
|
|
5230
5802
|
//#region src/core/types/elements.d.ts
|
|
5803
|
+
/**
|
|
5804
|
+
* Accessibility metadata from `p:cNvPr/a:extLst`'s "Mark as decorative"
|
|
5805
|
+
* vendor extension (issue G16). PowerPoint's Alt Text pane writes
|
|
5806
|
+
* `a:ext[@uri='{C183D7F6-B498-43B3-948B-1728B52AA6E4}']/adec:decorative
|
|
5807
|
+
* val="1"` when a shape or image is marked decorative; mixed into the
|
|
5808
|
+
* element variants whose `p:cNvPr` that pane covers.
|
|
5809
|
+
*/
|
|
5810
|
+
interface PptxAccessibilityProperties {
|
|
5811
|
+
/**
|
|
5812
|
+
* Whether the element is marked decorative. When true, alt text /
|
|
5813
|
+
* aria-label / Markdown export should skip describing the element even
|
|
5814
|
+
* when {@link PptxImageProperties.altText} (or similar) is present.
|
|
5815
|
+
*/
|
|
5816
|
+
isDecorative?: boolean;
|
|
5817
|
+
}
|
|
5818
|
+
/**
|
|
5819
|
+
* `a:cNvPicPr/@preferRelativeResize` (issue G13), a picture-only non-visual
|
|
5820
|
+
* property distinct from `a:picLocks`.
|
|
5821
|
+
*/
|
|
5822
|
+
interface PptxPictureNonVisualProperties {
|
|
5823
|
+
/**
|
|
5824
|
+
* `a:cNvPicPr/@preferRelativeResize` (ST_Boolean, defaults to `true` when
|
|
5825
|
+
* absent). Controls whether a picture's crop rectangle is reinterpreted
|
|
5826
|
+
* relative to the picture's ORIGINAL dimensions or its CURRENT
|
|
5827
|
+
* (already-resized) dimensions when it is resized again after being
|
|
5828
|
+
* cropped. Parsed and round-tripped for now; not yet wired into
|
|
5829
|
+
* resize-after-crop arithmetic (this app always uses current-size
|
|
5830
|
+
* semantics, which only diverges from `preferRelativeResize="0"` on a
|
|
5831
|
+
* second resize after a crop).
|
|
5832
|
+
*/
|
|
5833
|
+
preferRelativeResize?: boolean;
|
|
5834
|
+
}
|
|
5231
5835
|
/**
|
|
5232
5836
|
* A text box — a plain rectangle containing text, typically with no
|
|
5233
5837
|
* visible fill or stroke.
|
|
@@ -5261,7 +5865,7 @@ interface TextPptxElement extends PptxElementBase, PptxTextProperties, PptxShape
|
|
|
5261
5865
|
* // => satisfies ShapePptxElement
|
|
5262
5866
|
* ```
|
|
5263
5867
|
*/
|
|
5264
|
-
interface ShapePptxElement extends PptxElementBase, PptxTextProperties, PptxShapeProperties, PptxCustomPathProperties {
|
|
5868
|
+
interface ShapePptxElement extends PptxElementBase, PptxTextProperties, PptxShapeProperties, PptxCustomPathProperties, PptxAccessibilityProperties {
|
|
5265
5869
|
type: 'shape';
|
|
5266
5870
|
}
|
|
5267
5871
|
/**
|
|
@@ -5300,7 +5904,7 @@ interface ConnectorPptxElement extends PptxElementBase, PptxTextProperties, Pptx
|
|
|
5300
5904
|
* // => satisfies ImagePptxElement
|
|
5301
5905
|
* ```
|
|
5302
5906
|
*/
|
|
5303
|
-
interface ImagePptxElement extends PptxElementBase, PptxShapeProperties, PptxCustomPathProperties, PptxImageProperties {
|
|
5907
|
+
interface ImagePptxElement extends PptxElementBase, PptxShapeProperties, PptxCustomPathProperties, PptxImageProperties, PptxAccessibilityProperties, PptxPictureNonVisualProperties {
|
|
5304
5908
|
type: 'image';
|
|
5305
5909
|
}
|
|
5306
5910
|
/**
|
|
@@ -5309,7 +5913,7 @@ interface ImagePptxElement extends PptxElementBase, PptxShapeProperties, PptxCus
|
|
|
5309
5913
|
* Functionally identical to {@link ImagePptxElement} but distinguished by
|
|
5310
5914
|
* the `type` discriminant for semantic clarity.
|
|
5311
5915
|
*/
|
|
5312
|
-
interface PicturePptxElement extends PptxElementBase, PptxShapeProperties, PptxCustomPathProperties, PptxImageProperties {
|
|
5916
|
+
interface PicturePptxElement extends PptxElementBase, PptxShapeProperties, PptxCustomPathProperties, PptxImageProperties, PptxAccessibilityProperties, PptxPictureNonVisualProperties {
|
|
5313
5917
|
type: 'picture';
|
|
5314
5918
|
}
|
|
5315
5919
|
/**
|
|
@@ -5349,6 +5953,13 @@ interface TablePptxElement extends PptxElementBase {
|
|
|
5349
5953
|
type: 'table';
|
|
5350
5954
|
/** Parsed table cell data for editing. */
|
|
5351
5955
|
tableData?: PptxTableData;
|
|
5956
|
+
/**
|
|
5957
|
+
* Accessibility description from `p:nvGraphicFramePr/p:cNvPr/@descr`, the
|
|
5958
|
+
* same non-visual-properties attribute a picture's alt text comes from.
|
|
5959
|
+
*/
|
|
5960
|
+
altText?: string;
|
|
5961
|
+
/** Accessibility title from `p:nvGraphicFramePr/p:cNvPr/@title`. */
|
|
5962
|
+
title?: string;
|
|
5352
5963
|
/**
|
|
5353
5964
|
* Unrecognised extensions captured from `a:graphicData/a:extLst` so they
|
|
5354
5965
|
* round-trip losslessly. See {@link PptxGraphicFrameExtension}.
|
|
@@ -5364,6 +5975,10 @@ interface TablePptxElement extends PptxElementBase {
|
|
|
5364
5975
|
interface ChartPptxElement extends PptxElementBase {
|
|
5365
5976
|
type: 'chart';
|
|
5366
5977
|
chartData?: PptxChartData;
|
|
5978
|
+
/** Accessibility description from `p:nvGraphicFramePr/p:cNvPr/@descr`. */
|
|
5979
|
+
altText?: string;
|
|
5980
|
+
/** Accessibility title from `p:nvGraphicFramePr/p:cNvPr/@title`. */
|
|
5981
|
+
title?: string;
|
|
5367
5982
|
/** Unrecognised graphicFrame extLst extensions, captured verbatim for round-trip. */
|
|
5368
5983
|
extensionXml?: PptxGraphicFrameExtension[];
|
|
5369
5984
|
}
|
|
@@ -5381,6 +5996,10 @@ interface ChartPptxElement extends PptxElementBase {
|
|
|
5381
5996
|
interface SmartArtPptxElement extends PptxElementBase {
|
|
5382
5997
|
type: 'smartArt';
|
|
5383
5998
|
smartArtData?: PptxSmartArtData;
|
|
5999
|
+
/** Accessibility description from `p:nvGraphicFramePr/p:cNvPr/@descr`. */
|
|
6000
|
+
altText?: string;
|
|
6001
|
+
/** Accessibility title from `p:nvGraphicFramePr/p:cNvPr/@title`. */
|
|
6002
|
+
title?: string;
|
|
5384
6003
|
/** Unrecognised graphicFrame extLst extensions, captured verbatim for round-trip. */
|
|
5385
6004
|
extensionXml?: PptxGraphicFrameExtension[];
|
|
5386
6005
|
}
|
|
@@ -5459,6 +6078,18 @@ interface OlePptxElement extends PptxElementBase {
|
|
|
5459
6078
|
* Only meaningful when {@link isLinked} is `true`. ECMA-376 §19.3.1.28.
|
|
5460
6079
|
*/
|
|
5461
6080
|
oleFollowColorScheme?: 'none' | 'full' | 'textAndBackground';
|
|
6081
|
+
/**
|
|
6082
|
+
* `p:link/@updateAutomatic` (`CT_OleObjectLink`, ECMA-376 §19.3.2.4):
|
|
6083
|
+
* whether a LINKED OLE object refreshes automatically from its source
|
|
6084
|
+
* (PowerPoint's Edit Links dialog "Automatic" vs. "Manual" radio buttons).
|
|
6085
|
+
* Only meaningful when {@link isLinked} is `true`. The schema default is
|
|
6086
|
+
* `false`; `undefined` means the source authored no explicit value.
|
|
6087
|
+
*/
|
|
6088
|
+
oleUpdateAutomatic?: boolean;
|
|
6089
|
+
/** Accessibility description from `p:nvGraphicFramePr/p:cNvPr/@descr`. */
|
|
6090
|
+
altText?: string;
|
|
6091
|
+
/** Accessibility title from `p:nvGraphicFramePr/p:cNvPr/@title`. */
|
|
6092
|
+
title?: string;
|
|
5462
6093
|
/** Unrecognised graphicFrame extLst extensions, captured verbatim for round-trip. */
|
|
5463
6094
|
extensionXml?: PptxGraphicFrameExtension[];
|
|
5464
6095
|
}
|
|
@@ -5550,6 +6181,15 @@ interface MediaPptxElement extends PptxElementBase {
|
|
|
5550
6181
|
* (`r:embed`). Defaults to embedded when undefined.
|
|
5551
6182
|
*/
|
|
5552
6183
|
isLinked?: boolean;
|
|
6184
|
+
/**
|
|
6185
|
+
* Accessibility description from `p:nvGraphicFramePr/p:cNvPr/@descr`.
|
|
6186
|
+
* Only populated for the `p:graphicFrame`-shaped (SDK-created) media
|
|
6187
|
+
* form; a `p:pic`-shaped media element's alt text is not currently
|
|
6188
|
+
* parsed (see `PptxHandlerRuntimePictureParsing.ts`).
|
|
6189
|
+
*/
|
|
6190
|
+
altText?: string;
|
|
6191
|
+
/** Accessibility title from `p:nvGraphicFramePr/p:cNvPr/@title`. Same scope note as {@link altText}. */
|
|
6192
|
+
title?: string;
|
|
5553
6193
|
/** Unrecognised graphicFrame extLst extensions, captured verbatim for round-trip. */
|
|
5554
6194
|
extensionXml?: PptxGraphicFrameExtension[];
|
|
5555
6195
|
}
|
|
@@ -6043,12 +6683,63 @@ type PptxAnimationTrigger = 'onClick' | 'onShapeClick' | 'onHover' | 'afterPrevi
|
|
|
6043
6683
|
* is preserved alongside other animations.
|
|
6044
6684
|
*/
|
|
6045
6685
|
type PptxNativeAnimationKind = 'media';
|
|
6686
|
+
/**
|
|
6687
|
+
* `p:spTgt/p:graphicEl` (CT_TLGraphicalObjectBuildElement, ECMA-376 S19.5.34):
|
|
6688
|
+
* identifies exactly which series/category/element of a chart or diagram
|
|
6689
|
+
* build a per-stage effect reveals, when a deck authors one effect per stage
|
|
6690
|
+
* instead of a single staged `p:bldGraphic` reveal.
|
|
6691
|
+
*/
|
|
6692
|
+
interface PptxAnimationGraphicElementTarget {
|
|
6693
|
+
/** Which graphic kind: `p:dgm` (diagram) or `p:chart`. */
|
|
6694
|
+
kind: 'dgm' | 'chart';
|
|
6695
|
+
/** `@_seriesIdx`, 0-based series index, when the target is series-scoped. */
|
|
6696
|
+
seriesIdx?: number;
|
|
6697
|
+
/** `@_categoryIdx`, 0-based category index, when the target is category-scoped. */
|
|
6698
|
+
categoryIdx?: number;
|
|
6699
|
+
/**
|
|
6700
|
+
* `p:dgm/@_id` (CT_TLBuildDiagram, ECMA-376 S19.5.10): the diagram DATA MODEL
|
|
6701
|
+
* point id (`dgm:pt/@modelId`) this per-stage effect reveals, when a
|
|
6702
|
+
* `p:bldDgm` build authors one effect per node instead of a single staged
|
|
6703
|
+
* reveal. `dgm`-kind targets only; a `chart`-kind target never carries this.
|
|
6704
|
+
* Matches `PptxSmartArtNode.id` (parsed from the same `@modelId`), so a
|
|
6705
|
+
* diagram renderer can reveal the exact authored node.
|
|
6706
|
+
*/
|
|
6707
|
+
id?: string;
|
|
6708
|
+
/**
|
|
6709
|
+
* `@_bldStep`: `ST_TLChartBuildStep` (`category` / `categoryEl` / `series` /
|
|
6710
|
+
* `seriesEl`) for a `chart`-kind target, or `ST_TLDiagramBuildStep`
|
|
6711
|
+
* (`sp` / `bg`) for a `dgm`-kind target.
|
|
6712
|
+
*/
|
|
6713
|
+
bldStep?: string;
|
|
6714
|
+
}
|
|
6715
|
+
/**
|
|
6716
|
+
* `p:spTgt/p:oleChartEl` (CT_TLOleChartTargetElement, ECMA-376 S19.5.44):
|
|
6717
|
+
* legacy pre-DrawingML OLE Graph chart sub-element targeting.
|
|
6718
|
+
*/
|
|
6719
|
+
interface PptxAnimationOleChartElementTarget {
|
|
6720
|
+
/** `@_type` (ST_TLOleChartSubelementType): entireChart / series / category / ... */
|
|
6721
|
+
subelementType: string;
|
|
6722
|
+
/** `@_lvl`, optional sub-element level. */
|
|
6723
|
+
level?: number;
|
|
6724
|
+
}
|
|
6046
6725
|
/** A target selected by `p:tgtEl` in the PresentationML timing model. */
|
|
6047
6726
|
type PptxAnimationTarget = {
|
|
6048
6727
|
type: 'shape';
|
|
6049
6728
|
shapeId: string;
|
|
6050
6729
|
/** Whether `p:spTgt/p:bg` limits the effect to the shape background. */
|
|
6051
6730
|
backgroundOnly?: boolean;
|
|
6731
|
+
/**
|
|
6732
|
+
* `p:spTgt/p:subSp/@_spid`: the id of a shape NESTED inside the group
|
|
6733
|
+
* named by {@link shapeId} (CT_TLSubShapeId, ECMA-376 S19.5.71).
|
|
6734
|
+
* PowerPoint authors this when a user animates one member of a group
|
|
6735
|
+
* without ungrouping it: `shapeId` stays the outer group's id for
|
|
6736
|
+
* round-trip, but this sub-shape is the real playback target.
|
|
6737
|
+
*/
|
|
6738
|
+
subShapeId?: string;
|
|
6739
|
+
/** `p:spTgt/p:graphicEl`: chart/diagram series/category/element target. */
|
|
6740
|
+
graphicElement?: PptxAnimationGraphicElementTarget;
|
|
6741
|
+
/** `p:spTgt/p:oleChartEl`: legacy OLE chart sub-element target. */
|
|
6742
|
+
oleChartElement?: PptxAnimationOleChartElementTarget;
|
|
6052
6743
|
rawXml?: XmlObject;
|
|
6053
6744
|
} | {
|
|
6054
6745
|
type: 'slide';
|
|
@@ -6428,6 +7119,74 @@ interface PptxNativeAnimation {
|
|
|
6428
7119
|
* PowerPoint that only emit the SMIL-style filter string.
|
|
6429
7120
|
*/
|
|
6430
7121
|
effectFilter?: PptxAnimationEffectFilter;
|
|
7122
|
+
/**
|
|
7123
|
+
* This effect's own `p:cTn/@_id` (a raw OOXML time-node id, not a shape
|
|
7124
|
+
* id). Lets playback resolve a `p:cond/@tn` dependency (see
|
|
7125
|
+
* {@link AnimationCondition.targetTimeNodeId}) against the SPECIFIC node
|
|
7126
|
+
* it names rather than assuming it is always the positionally-previous
|
|
7127
|
+
* effect. Absent when the node carried no `@_id`.
|
|
7128
|
+
*/
|
|
7129
|
+
nodeId?: number;
|
|
7130
|
+
/**
|
|
7131
|
+
* Interpolation mode for this effect's PRIMARY `p:anim`-family behaviour
|
|
7132
|
+
* (the same node {@link keyframes}/{@link attrName} were read from), from
|
|
7133
|
+
* `@_calcmode` (ST_TLAnimateBehaviorCalcMode, ECMA-376 S19.5.2). See
|
|
7134
|
+
* {@link PptxAttributeAnimation.calcMode} for the per-component version.
|
|
7135
|
+
*/
|
|
7136
|
+
calcMode?: 'discrete' | 'lin' | 'fmla';
|
|
7137
|
+
/**
|
|
7138
|
+
* `p:cBhvr/@_additive` (ST_TLBehaviorAdditiveType, ECMA-376 S19.5.4):
|
|
7139
|
+
* controls how this behaviour's value composites with sibling behaviours
|
|
7140
|
+
* driving the same attribute on the same target. `sum` accumulates
|
|
7141
|
+
* (e.g. a combined scale+rotate), `repl`/`base`/`none`/`mult` replace or
|
|
7142
|
+
* otherwise combine. Absent means the OOXML default (`base`).
|
|
7143
|
+
*/
|
|
7144
|
+
cBhvrAdditive?: 'base' | 'sum' | 'repl' | 'mult' | 'none';
|
|
7145
|
+
/**
|
|
7146
|
+
* `p:cBhvr/@_accumulate` (ST_TLBehaviorAccumulateType): `always` means
|
|
7147
|
+
* each `p:cTn/@repeatCount` repeat starts from the PREVIOUS repeat's end
|
|
7148
|
+
* value (e.g. a 3x Spin totals 1080deg instead of replaying 0-360 three
|
|
7149
|
+
* times); `none` (the OOXML default) resets every repeat.
|
|
7150
|
+
*/
|
|
7151
|
+
cBhvrAccumulate?: 'none' | 'always';
|
|
7152
|
+
/**
|
|
7153
|
+
* `p:cBhvr/@_xfrmType` (only meaningful on `p:animMotion`): `point`
|
|
7154
|
+
* (default) or `img`, a legacy compatibility hint. Round-tripped only.
|
|
7155
|
+
*/
|
|
7156
|
+
cBhvrXfrmType?: 'point' | 'img';
|
|
7157
|
+
/**
|
|
7158
|
+
* `p:cBhvr/@_override` (ST_TLBehaviorOverrideType): `normal` (default) or
|
|
7159
|
+
* `childStyle`, a legacy compatibility hint. Round-tripped only.
|
|
7160
|
+
*/
|
|
7161
|
+
cBhvrOverride?: 'normal' | 'childStyle';
|
|
7162
|
+
/**
|
|
7163
|
+
* `p:set` discrete attribute assignments composed alongside this effect
|
|
7164
|
+
* (ECMA-376 S19.5.79 CT_TLSetBehavior): an instantaneous (non-interpolated)
|
|
7165
|
+
* value change, as opposed to {@link attributeAnimations}'s `p:anim`
|
|
7166
|
+
* keyframe ramps. PowerPoint authors several font-style emphasis effects
|
|
7167
|
+
* this way (Bold Reveal, Underline, Bold Flash, Change Font Size), since
|
|
7168
|
+
* "on/off" or "size N" has nothing to interpolate. Not yet consulted by
|
|
7169
|
+
* shared playback (round-trip/typed-model only so far).
|
|
7170
|
+
*/
|
|
7171
|
+
setAnimations?: PptxSetAnimation[];
|
|
7172
|
+
}
|
|
7173
|
+
/**
|
|
7174
|
+
* One `p:set` discrete (non-interpolated) attribute assignment composed
|
|
7175
|
+
* alongside an authored effect. See {@link PptxNativeAnimation.setAnimations}.
|
|
7176
|
+
*
|
|
7177
|
+
* @see ECMA-376 S19.5.79 CT_TLSetBehavior
|
|
7178
|
+
*/
|
|
7179
|
+
interface PptxSetAnimation {
|
|
7180
|
+
/** Lowercased target attribute from `p:cBhvr/p:attrNameLst/p:attrName`. */
|
|
7181
|
+
attrName: string;
|
|
7182
|
+
/** Decoded value from `p:to` (same variant shape as a `p:tav/p:val`). */
|
|
7183
|
+
value: string | boolean | number;
|
|
7184
|
+
/** Discriminant indicating which `p:to` child carried the value. */
|
|
7185
|
+
valueType: 'str' | 'bool' | 'int' | 'flt' | 'clr';
|
|
7186
|
+
/** Duration from this behaviour's nested `p:cTn/@dur`. */
|
|
7187
|
+
durationMs?: number;
|
|
7188
|
+
/** Start offset from this behaviour's nested `p:stCondLst`. */
|
|
7189
|
+
delayMs?: number;
|
|
6431
7190
|
}
|
|
6432
7191
|
/**
|
|
6433
7192
|
* Parsed `p:animEffect/@filter` (+ `@transition`) descriptor. ECMA-376
|
|
@@ -6494,6 +7253,14 @@ interface PptxAttributeAnimation {
|
|
|
6494
7253
|
durationMs?: number;
|
|
6495
7254
|
/** Start offset from this behaviour's nested `p:stCondLst`. */
|
|
6496
7255
|
delayMs?: number;
|
|
7256
|
+
/**
|
|
7257
|
+
* Interpolation mode from this behaviour's own `@_calcmode`
|
|
7258
|
+
* (ST_TLAnimateBehaviorCalcMode, ECMA-376 S19.5.2): `discrete` snaps to
|
|
7259
|
+
* each `p:tav` stop with no interpolation, `lin` (the OOXML default)
|
|
7260
|
+
* interpolates linearly, `fmla` evaluates `p:tav/@fmla` (not consulted at
|
|
7261
|
+
* playback here; formulas are round-tripped only). Absent means `lin`.
|
|
7262
|
+
*/
|
|
7263
|
+
calcMode?: 'discrete' | 'lin' | 'fmla';
|
|
6497
7264
|
}
|
|
6498
7265
|
/** Signed HSL channel deltas parsed from `p:animClr/p:by/p:hsl`. */
|
|
6499
7266
|
interface PptxHslColorDelta {
|
|
@@ -6560,7 +7327,7 @@ interface PptxTextAnimationTarget {
|
|
|
6560
7327
|
* These map directly to OOXML condition event attribute values
|
|
6561
7328
|
* (ISO/IEC 29500-1 S19.5.28 CT_TLTimeCondition).
|
|
6562
7329
|
*/
|
|
6563
|
-
type AnimationConditionEvent = 'onBegin' | 'onEnd' | 'begin' | 'end' | 'onClick' | 'onMouseOver' | 'onMouseOut' | 'onNext' | 'onPrev' | 'onStopAudio';
|
|
7330
|
+
type AnimationConditionEvent = 'onBegin' | 'onEnd' | 'begin' | 'end' | 'onClick' | 'onMouseOver' | 'onMouseOut' | 'onNext' | 'onPrev' | 'onStopAudio' | 'onDblClick';
|
|
6564
7331
|
/**
|
|
6565
7332
|
* Structured representation of a single OOXML animation condition
|
|
6566
7333
|
* from `p:cond` elements inside `p:stCondLst` or `p:endCondLst`.
|
|
@@ -6687,6 +7454,16 @@ interface PptxElementAnimation {
|
|
|
6687
7454
|
* OOXML equivalent and is not required for playback.
|
|
6688
7455
|
*/
|
|
6689
7456
|
soundFileName?: string;
|
|
7457
|
+
/**
|
|
7458
|
+
* Per-build-level timing template(s) from the {@link sequence}'s own
|
|
7459
|
+
* `p:bldP/p:tmplLst` (ECMA-376 §19.5.84), carried over from the loaded
|
|
7460
|
+
* `PptxNativeAnimation.buildTemplates` this element animation was derived
|
|
7461
|
+
* from so a full timing-tree rebuild (`PptxAnimationWriteService`'s
|
|
7462
|
+
* `buildTimingXml`, when the slide had no prior `p:timing`) can re-emit
|
|
7463
|
+
* them instead of silently dropping the deck's authored per-level
|
|
7464
|
+
* defaults. Absent when {@link sequence} carries no such template.
|
|
7465
|
+
*/
|
|
7466
|
+
buildTemplates?: PptxTimingTemplate[];
|
|
6690
7467
|
}
|
|
6691
7468
|
/**
|
|
6692
7469
|
* A read-only anchor representing one of the deck's own effect groups: a
|
|
@@ -7603,6 +8380,22 @@ interface PptxActiveXControl {
|
|
|
7603
8380
|
name?: string;
|
|
7604
8381
|
/** Shape ID this control is linked to (from @spid). */
|
|
7605
8382
|
shapeId?: string;
|
|
8383
|
+
/**
|
|
8384
|
+
* `p:control/@showAsIcon` (CT_Control, ECMA-376 S19.3.1.2): whether the
|
|
8385
|
+
* control renders as its static icon rather than its live appearance.
|
|
8386
|
+
* `undefined` when the source authored no explicit value (schema default
|
|
8387
|
+
* `false`).
|
|
8388
|
+
*/
|
|
8389
|
+
showAsIcon?: boolean;
|
|
8390
|
+
/**
|
|
8391
|
+
* `p:control/@imgW` in EMU (ST_PositiveCoordinate32): the width the host
|
|
8392
|
+
* reserves for the control's icon/preview image. Distinct from
|
|
8393
|
+
* {@link width}, which is the fallback `p:pic`'s own `a:ext/@cx` in px;
|
|
8394
|
+
* `imgW`/`imgH` are direct attributes on `p:control` itself.
|
|
8395
|
+
*/
|
|
8396
|
+
imgWidthEmu?: number;
|
|
8397
|
+
/** `p:control/@imgH` in EMU (ST_PositiveCoordinate32). @see imgWidthEmu */
|
|
8398
|
+
imgHeightEmu?: number;
|
|
7606
8399
|
/** X position (px) of the control's fallback picture, if present. */
|
|
7607
8400
|
x?: number;
|
|
7608
8401
|
/** Y position (px) of the control's fallback picture, if present. */
|
|
@@ -7900,10 +8693,32 @@ interface PptxPresentationProperties {
|
|
|
7900
8693
|
printProperties?: PptxPresentationPrintProperties | null;
|
|
7901
8694
|
/** Most-recently-used colours from the presentation palette. */
|
|
7902
8695
|
mruColors?: string[];
|
|
7903
|
-
/**
|
|
8696
|
+
/**
|
|
8697
|
+
* Pen colour for presentation mode annotations (from `p:showPr/p:penClr`).
|
|
8698
|
+
* `p:penClr` is a full `EG_ColorChoice` (P1-G2): a scheme/preset/system
|
|
8699
|
+
* swatch resolves to a hex string here just like a direct `a:srgbClr`.
|
|
8700
|
+
*/
|
|
7904
8701
|
penColor?: string;
|
|
8702
|
+
/**
|
|
8703
|
+
* The resolved hex value {@link penColor} had at parse time, and the
|
|
8704
|
+
* original `p:penClr` colour-choice XML node, preserved so a save that
|
|
8705
|
+
* never touches the pen colour re-emits the original scheme/preset
|
|
8706
|
+
* reference verbatim instead of flattening it to a baked `a:srgbClr`.
|
|
8707
|
+
* Internal round-trip bookkeeping; not meant to be set by API callers.
|
|
8708
|
+
*/
|
|
8709
|
+
penColorOriginal?: string;
|
|
8710
|
+
/** @see penColorOriginal */
|
|
8711
|
+
penColorXml?: XmlObject;
|
|
7905
8712
|
/** Kiosk auto-restart interval in milliseconds (from `p:kiosk/@restart`). Only meaningful when showType is "kiosk". */
|
|
7906
8713
|
kioskRestartTime?: number;
|
|
8714
|
+
/**
|
|
8715
|
+
* `p:showPr/p:browse/@showScrollbar` (CT_ShowInfoBrowse §19.2.1.10 /
|
|
8716
|
+
* §19.3.1.43), the "Show scrollbar" checkbox in PowerPoint's Set Up Show
|
|
8717
|
+
* dialog. Only meaningful when `showType` is `"browsed"`; the schema
|
|
8718
|
+
* default is `true`. `undefined` means the source authored no explicit
|
|
8719
|
+
* value (or `showType` is not `"browsed"`).
|
|
8720
|
+
*/
|
|
8721
|
+
showScrollbar?: boolean;
|
|
7907
8722
|
}
|
|
7908
8723
|
/**
|
|
7909
8724
|
* Slide dimensions from `p:sldSz` (CT_SlideSize, ECMA-376 §19.2.1.39).
|
|
@@ -8037,6 +8852,34 @@ interface PptxPhotoAlbum {
|
|
|
8037
8852
|
layout?: string;
|
|
8038
8853
|
/** Frame style applied to each photo (e.g. "frameStyle1"). */
|
|
8039
8854
|
frame?: string;
|
|
8855
|
+
/**
|
|
8856
|
+
* `p:photoAlbum/@isPhoto` (ECMA-376 S19.2.1.27, CT_PhotoAlbum): whether
|
|
8857
|
+
* the pictures placed by the album wizard are real photographs, as
|
|
8858
|
+
* opposed to clip art or other embedded images. `undefined` when the
|
|
8859
|
+
* source authored no explicit value (schema default `false`); this is a
|
|
8860
|
+
* purely declarative wizard-provenance flag, not something this library
|
|
8861
|
+
* gates any layout/frame behaviour on.
|
|
8862
|
+
*/
|
|
8863
|
+
isPhoto?: boolean;
|
|
8864
|
+
}
|
|
8865
|
+
/**
|
|
8866
|
+
* A recognizer-owned `p:smartTags` reference from `presentation.xml`
|
|
8867
|
+
* (CT_SmartTags, ECMA-376 S19.2.1.42): a bare relationship id pointing at a
|
|
8868
|
+
* legacy Office "Smart Tags" recognizer part, distinct from the
|
|
8869
|
+
* user-authored `p:tags` construct (see {@link PptxTagCollection}).
|
|
8870
|
+
*
|
|
8871
|
+
* This library has no data model for recognizer part CONTENT (there is no
|
|
8872
|
+
* way to create, inspect, or edit one through the public API), so this type
|
|
8873
|
+
* only captures enough to preserve an authored reference losslessly: the
|
|
8874
|
+
* relationship id and, when resolvable, the target part path.
|
|
8875
|
+
*/
|
|
8876
|
+
interface PptxSmartTagsReference {
|
|
8877
|
+
/** Relationship id from `p:smartTags/@r:id`. */
|
|
8878
|
+
relId: string;
|
|
8879
|
+
/** Resolved ZIP path of the referenced recognizer part, when resolvable. */
|
|
8880
|
+
targetPath?: string;
|
|
8881
|
+
/** Raw `p:smartTags` XML retained for lossless round-trip. */
|
|
8882
|
+
rawXml?: XmlObject;
|
|
8040
8883
|
}
|
|
8041
8884
|
/**
|
|
8042
8885
|
* East Asian line-break (kinsoku) settings from `p:kinsoku` in `presentation.xml`.
|
|
@@ -8101,6 +8944,13 @@ interface PptxData {
|
|
|
8101
8944
|
themeOptions?: PptxThemeOption[];
|
|
8102
8945
|
/** Parsed table style definitions from `ppt/tableStyles.xml`. */
|
|
8103
8946
|
tableStyleMap?: ParsedTableStyleMap;
|
|
8947
|
+
/**
|
|
8948
|
+
* The current default table style GUID (`ppt/tableStyles.xml`'s
|
|
8949
|
+
* `a:tblStyleLst/@def`): the style PowerPoint applies to a newly inserted
|
|
8950
|
+
* table. Matches `PptxSaveOptions.tableStylesDefaultId` so a save call
|
|
8951
|
+
* that omits it can fall back to what was loaded.
|
|
8952
|
+
*/
|
|
8953
|
+
tableStylesDefaultId?: string;
|
|
8104
8954
|
/** Whether the presentation is password-protected. */
|
|
8105
8955
|
isPasswordProtected?: boolean;
|
|
8106
8956
|
/** Embedded font data (name + binary data URL) extracted from the presentation. */
|
|
@@ -8160,6 +9010,14 @@ interface PptxData {
|
|
|
8160
9010
|
modifyVerifier?: PptxModifyVerifier;
|
|
8161
9011
|
/** Photo album metadata from `p:photoAlbum` in `presentation.xml`. */
|
|
8162
9012
|
photoAlbum?: PptxPhotoAlbum;
|
|
9013
|
+
/**
|
|
9014
|
+
* Legacy Smart Tags recognizer reference from `p:smartTags` in
|
|
9015
|
+
* `presentation.xml`. Read-only: there is no data model for the
|
|
9016
|
+
* recognizer part's own content, so this exists to make the reference
|
|
9017
|
+
* inspectable and to prove it survives a save (the owning part and its
|
|
9018
|
+
* relationship are preserved passively, like any other unmodelled part).
|
|
9019
|
+
*/
|
|
9020
|
+
smartTags?: PptxSmartTagsReference;
|
|
8163
9021
|
/** East Asian line-break settings from `p:kinsoku` in `presentation.xml`. */
|
|
8164
9022
|
kinsoku?: PptxKinsoku;
|
|
8165
9023
|
/** Custom XML data parts from `customXml/` in the OPC package. */
|
|
@@ -8324,6 +9182,14 @@ type FillInput = {
|
|
|
8324
9182
|
type: 'solid';
|
|
8325
9183
|
color: string;
|
|
8326
9184
|
opacity?: number;
|
|
9185
|
+
/**
|
|
9186
|
+
* A theme colour to use instead of a plain hex. When set, the shape
|
|
9187
|
+
* saves as `<a:schemeClr>` (e.g. `{ scheme: 'accent1', lumMod: 0.8 }`
|
|
9188
|
+
* for "Accent 1, Lighter 80%") so it keeps following the theme after a
|
|
9189
|
+
* later theme change; `color` still supplies the immediate resolved
|
|
9190
|
+
* hex for renderers that read it directly.
|
|
9191
|
+
*/
|
|
9192
|
+
themeColorRef?: PptxThemeColorRef;
|
|
8327
9193
|
} | {
|
|
8328
9194
|
type: 'gradient';
|
|
8329
9195
|
/**
|
|
@@ -8359,6 +9225,8 @@ interface StrokeInput {
|
|
|
8359
9225
|
opacity?: number;
|
|
8360
9226
|
join?: 'round' | 'bevel' | 'miter';
|
|
8361
9227
|
cap?: 'flat' | 'rnd' | 'sq';
|
|
9228
|
+
/** A theme colour for the outline; see {@link FillInput}'s `themeColorRef`. */
|
|
9229
|
+
themeColorRef?: PptxThemeColorRef;
|
|
8362
9230
|
}
|
|
8363
9231
|
interface ShadowInput {
|
|
8364
9232
|
color?: string;
|
|
@@ -8375,6 +9243,8 @@ interface TextStyleInput {
|
|
|
8375
9243
|
underline?: boolean;
|
|
8376
9244
|
strikethrough?: boolean;
|
|
8377
9245
|
color?: string;
|
|
9246
|
+
/** A theme colour for the run; see {@link FillInput}'s `themeColorRef`. */
|
|
9247
|
+
themeColorRef?: PptxThemeColorRef;
|
|
8378
9248
|
alignment?: 'left' | 'center' | 'right' | 'justify';
|
|
8379
9249
|
verticalAlignment?: 'top' | 'middle' | 'bottom';
|
|
8380
9250
|
lineSpacing?: number;
|
|
@@ -9002,6 +9872,24 @@ interface PptxHandlerSaveOptions {
|
|
|
9002
9872
|
* part untouched.
|
|
9003
9873
|
*/
|
|
9004
9874
|
tableStyles?: ParsedTableStyleMap;
|
|
9875
|
+
/**
|
|
9876
|
+
* Set `ppt/tableStyles.xml`'s `<a:tblStyleLst @def>` to this style GUID
|
|
9877
|
+
* (normalised to uppercase-with-braces). `undefined` preserves the
|
|
9878
|
+
* existing default; there is no removal form (`@def` is required by the
|
|
9879
|
+
* schema and PowerPoint always points it at a real style). No-op when the
|
|
9880
|
+
* archive has no `ppt/tableStyles.xml`, same as {@link tableStyles}.
|
|
9881
|
+
*/
|
|
9882
|
+
tableStylesDefaultId?: string;
|
|
9883
|
+
/**
|
|
9884
|
+
* Style GUIDs to remove from `ppt/tableStyles.xml` entirely, kept as a
|
|
9885
|
+
* separate opt-in list rather than inferred from omission on
|
|
9886
|
+
* {@link tableStyles}: that map is documented as safe to pass a PARTIAL
|
|
9887
|
+
* edit (only the entries a caller actually touched), so treating every
|
|
9888
|
+
* GUID missing from it as "delete this" would silently destroy untouched
|
|
9889
|
+
* styles on an ordinary targeted edit. A GUID here that is also the
|
|
9890
|
+
* current (or newly requested) default is left in place and skipped.
|
|
9891
|
+
*/
|
|
9892
|
+
tableStylesToDelete?: string[];
|
|
9005
9893
|
/**
|
|
9006
9894
|
* Target output format.
|
|
9007
9895
|
* - `'pptx'` (default): Standard presentation.
|