pptx-react-viewer 3.6.0 → 3.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +32 -0
- package/dist/{AiChatPanel-WRQGJJVD.mjs → AiChatPanel-A5DCEHTO.mjs} +4 -4
- package/dist/AiChatPanel-A5DCEHTO.mjs.br +0 -0
- package/dist/AiChatPanel-A5DCEHTO.mjs.gz +0 -0
- package/dist/{AiChatPanel-LEOEDIW2.js → AiChatPanel-XLQM4BQJ.js} +25 -25
- package/dist/AiChatPanel-XLQM4BQJ.js.br +0 -0
- package/dist/AiChatPanel-XLQM4BQJ.js.gz +0 -0
- package/dist/{Area3DChartScene-SJC2ZB6R.mjs → Area3DChartScene-5CMEMIBI.mjs} +1 -1
- package/dist/Area3DChartScene-5CMEMIBI.mjs.br +0 -0
- package/dist/Area3DChartScene-5CMEMIBI.mjs.gz +0 -0
- package/dist/{Area3DChartScene-3TJ2GTGI.js → Area3DChartScene-RZ3V3WOR.js} +2 -2
- package/dist/Area3DChartScene-RZ3V3WOR.js.br +0 -0
- package/dist/Area3DChartScene-RZ3V3WOR.js.gz +0 -0
- package/dist/{Bar3DChartScene-SPER4LQA.mjs → Bar3DChartScene-H3MYUJKV.mjs} +1 -1
- package/dist/Bar3DChartScene-H3MYUJKV.mjs.br +0 -0
- package/dist/Bar3DChartScene-H3MYUJKV.mjs.gz +0 -0
- package/dist/{Bar3DChartScene-2ZGOMOZO.js → Bar3DChartScene-KHCQ6TEC.js} +2 -2
- package/dist/Bar3DChartScene-KHCQ6TEC.js.br +0 -0
- package/dist/Bar3DChartScene-KHCQ6TEC.js.gz +0 -0
- package/dist/{Line3DChartScene-42FYFGLU.js → Line3DChartScene-QEACF3U3.js} +2 -2
- package/dist/Line3DChartScene-QEACF3U3.js.br +0 -0
- package/dist/Line3DChartScene-QEACF3U3.js.gz +0 -0
- package/dist/{Line3DChartScene-FH3YHPXE.mjs → Line3DChartScene-YFRPJHDX.mjs} +1 -1
- package/dist/Line3DChartScene-YFRPJHDX.mjs.br +0 -0
- package/dist/Line3DChartScene-YFRPJHDX.mjs.gz +0 -0
- package/dist/{Model3DScene-2BCR2YYD.mjs → Model3DScene-O24KP723.mjs} +1 -1
- package/dist/Model3DScene-O24KP723.mjs.br +0 -0
- package/dist/Model3DScene-O24KP723.mjs.gz +0 -0
- package/dist/{Model3DScene-EIU2GVUZ.js → Model3DScene-QQWKGJ3T.js} +2 -2
- package/dist/Model3DScene-QQWKGJ3T.js.br +0 -0
- package/dist/Model3DScene-QQWKGJ3T.js.gz +0 -0
- package/dist/{PieChart3DScene-QFQUJFDP.mjs → PieChart3DScene-CI6CW22C.mjs} +1 -1
- package/dist/PieChart3DScene-CI6CW22C.mjs.br +0 -0
- package/dist/PieChart3DScene-CI6CW22C.mjs.gz +0 -0
- package/dist/{PieChart3DScene-VQOHZPHI.js → PieChart3DScene-L3MHKQHW.js} +2 -2
- package/dist/PieChart3DScene-L3MHKQHW.js.br +0 -0
- package/dist/PieChart3DScene-L3MHKQHW.js.gz +0 -0
- package/dist/PowerPointViewer-Cl6jBPNw.d.ts.map +1 -1
- package/dist/{SurfaceChart3DScene-FTVXZN6O.js → SurfaceChart3DScene-5IER6VFW.js} +2 -2
- package/dist/SurfaceChart3DScene-5IER6VFW.js.br +0 -0
- package/dist/SurfaceChart3DScene-5IER6VFW.js.gz +0 -0
- package/dist/{SurfaceChart3DScene-CGXMRBCL.mjs → SurfaceChart3DScene-JUXRC3K2.mjs} +1 -1
- package/dist/SurfaceChart3DScene-JUXRC3K2.mjs.br +0 -0
- package/dist/SurfaceChart3DScene-JUXRC3K2.mjs.gz +0 -0
- package/dist/{audience-content-store-bR7Gs_1S.d.ts → audience-content-store-CB2WVM1K.d.ts} +12 -3
- package/dist/{audience-content-store-bR7Gs_1S.d.ts.map → audience-content-store-CB2WVM1K.d.ts.map} +1 -1
- package/dist/{chunk-NFOOONND.js → chunk-4222CHFH.js} +1944 -1299
- package/dist/chunk-4222CHFH.js.br +0 -0
- package/dist/chunk-4222CHFH.js.gz +0 -0
- package/dist/{chunk-ZUSYUWOV.mjs → chunk-6IMB5DNJ.mjs} +8927 -4870
- package/dist/chunk-6IMB5DNJ.mjs.br +0 -0
- package/dist/chunk-6IMB5DNJ.mjs.gz +0 -0
- package/dist/{chunk-ZHSBMG37.js → chunk-DE3S3UHX.js} +557 -682
- package/dist/chunk-DE3S3UHX.js.br +0 -0
- package/dist/chunk-DE3S3UHX.js.gz +0 -0
- package/dist/{chunk-ZWPHUPL4.js → chunk-F5NPGNMA.js} +9 -5
- package/dist/chunk-F5NPGNMA.js.br +0 -0
- package/dist/chunk-F5NPGNMA.js.gz +0 -0
- package/dist/{chunk-TGCSZXOG.mjs → chunk-FRZIBZTE.mjs} +57 -27
- package/dist/chunk-FRZIBZTE.mjs.br +0 -0
- package/dist/chunk-FRZIBZTE.mjs.gz +0 -0
- package/dist/{chunk-MZI4DG3S.js → chunk-L3ZIBQEB.js} +57 -27
- package/dist/chunk-L3ZIBQEB.js.br +0 -0
- package/dist/chunk-L3ZIBQEB.js.gz +0 -0
- package/dist/{chunk-FG5VQFWP.mjs → chunk-PFPKBNNZ.mjs} +761 -116
- package/dist/chunk-PFPKBNNZ.mjs.br +0 -0
- package/dist/chunk-PFPKBNNZ.mjs.gz +0 -0
- package/dist/{chunk-7VPDHSWF.js → chunk-QWA5YEIZ.js} +234 -241
- package/dist/chunk-QWA5YEIZ.js.br +0 -0
- package/dist/chunk-QWA5YEIZ.js.gz +0 -0
- package/dist/{chunk-WX7AFFBZ.mjs → chunk-RHWQKZLB.mjs} +63 -69
- package/dist/chunk-RHWQKZLB.mjs.br +0 -0
- package/dist/chunk-RHWQKZLB.mjs.gz +0 -0
- package/dist/{chunk-T3V5FBXJ.mjs → chunk-RNP5HP4L.mjs} +5 -2
- package/dist/chunk-RNP5HP4L.mjs.br +0 -0
- package/dist/chunk-RNP5HP4L.mjs.gz +0 -0
- package/dist/{chunk-AL2KLPOJ.js → chunk-SN5EUDIT.js} +8959 -4873
- package/dist/chunk-SN5EUDIT.js.br +0 -0
- package/dist/chunk-SN5EUDIT.js.gz +0 -0
- package/dist/{chunk-VYNICQ4O.mjs → chunk-UPJW34YG.mjs} +133 -258
- package/dist/chunk-UPJW34YG.mjs.br +0 -0
- package/dist/chunk-UPJW34YG.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 +595 -38
- 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 +768 -186
- 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/types-Bzdkiakq.d.ts.map +1 -1
- package/dist/viewer/index.d.ts +534 -38
- 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-LEOEDIW2.js.br +0 -0
- package/dist/AiChatPanel-LEOEDIW2.js.gz +0 -0
- package/dist/AiChatPanel-WRQGJJVD.mjs.br +0 -0
- package/dist/AiChatPanel-WRQGJJVD.mjs.gz +0 -0
- package/dist/Area3DChartScene-3TJ2GTGI.js.br +0 -0
- package/dist/Area3DChartScene-3TJ2GTGI.js.gz +0 -0
- package/dist/Area3DChartScene-SJC2ZB6R.mjs.br +0 -2
- package/dist/Area3DChartScene-SJC2ZB6R.mjs.gz +0 -0
- package/dist/Bar3DChartScene-2ZGOMOZO.js.br +0 -0
- package/dist/Bar3DChartScene-2ZGOMOZO.js.gz +0 -0
- package/dist/Bar3DChartScene-SPER4LQA.mjs.br +0 -0
- package/dist/Bar3DChartScene-SPER4LQA.mjs.gz +0 -0
- package/dist/Line3DChartScene-42FYFGLU.js.br +0 -0
- package/dist/Line3DChartScene-42FYFGLU.js.gz +0 -0
- package/dist/Line3DChartScene-FH3YHPXE.mjs.br +0 -2
- package/dist/Line3DChartScene-FH3YHPXE.mjs.gz +0 -0
- package/dist/Model3DScene-2BCR2YYD.mjs.br +0 -0
- package/dist/Model3DScene-2BCR2YYD.mjs.gz +0 -0
- package/dist/Model3DScene-EIU2GVUZ.js.br +0 -0
- package/dist/Model3DScene-EIU2GVUZ.js.gz +0 -0
- package/dist/PieChart3DScene-QFQUJFDP.mjs.br +0 -0
- package/dist/PieChart3DScene-QFQUJFDP.mjs.gz +0 -0
- package/dist/PieChart3DScene-VQOHZPHI.js.br +0 -0
- package/dist/PieChart3DScene-VQOHZPHI.js.gz +0 -0
- package/dist/SurfaceChart3DScene-CGXMRBCL.mjs.br +0 -0
- package/dist/SurfaceChart3DScene-CGXMRBCL.mjs.gz +0 -0
- package/dist/SurfaceChart3DScene-FTVXZN6O.js.br +0 -0
- package/dist/SurfaceChart3DScene-FTVXZN6O.js.gz +0 -0
- package/dist/chunk-7VPDHSWF.js.br +0 -0
- package/dist/chunk-7VPDHSWF.js.gz +0 -0
- package/dist/chunk-AL2KLPOJ.js.br +0 -0
- package/dist/chunk-AL2KLPOJ.js.gz +0 -0
- package/dist/chunk-FG5VQFWP.mjs.br +0 -0
- package/dist/chunk-FG5VQFWP.mjs.gz +0 -0
- package/dist/chunk-MZI4DG3S.js.br +0 -0
- package/dist/chunk-MZI4DG3S.js.gz +0 -0
- package/dist/chunk-NFOOONND.js.br +0 -0
- package/dist/chunk-NFOOONND.js.gz +0 -0
- package/dist/chunk-T3V5FBXJ.mjs.br +0 -0
- package/dist/chunk-T3V5FBXJ.mjs.gz +0 -0
- package/dist/chunk-TGCSZXOG.mjs.br +0 -0
- package/dist/chunk-TGCSZXOG.mjs.gz +0 -0
- package/dist/chunk-VYNICQ4O.mjs.br +0 -0
- package/dist/chunk-VYNICQ4O.mjs.gz +0 -0
- package/dist/chunk-WX7AFFBZ.mjs.br +0 -0
- package/dist/chunk-WX7AFFBZ.mjs.gz +0 -0
- package/dist/chunk-ZHSBMG37.js.br +0 -0
- package/dist/chunk-ZHSBMG37.js.gz +0 -0
- package/dist/chunk-ZUSYUWOV.mjs.br +0 -0
- package/dist/chunk-ZUSYUWOV.mjs.gz +0 -0
- package/dist/chunk-ZWPHUPL4.js.br +0 -0
- package/dist/chunk-ZWPHUPL4.js.gz +0 -0
package/dist/internals.d.ts
CHANGED
|
@@ -571,6 +571,44 @@ interface PptxCustomPathProperties {
|
|
|
571
571
|
customGeometryTextRect?: CustomGeometryTextRect;
|
|
572
572
|
}
|
|
573
573
|
//#endregion
|
|
574
|
+
//#region src/core/types/color-ref.d.ts
|
|
575
|
+
/**
|
|
576
|
+
* Theme colour references: the typed counterpart of `<a:schemeClr>`.
|
|
577
|
+
*
|
|
578
|
+
* A colour picked from the theme palette is remembered as a scheme slot plus
|
|
579
|
+
* PowerPoint's luminance variants rather than as the sRGB it currently
|
|
580
|
+
* resolves to, so a later theme change re-colours the shape (and a saved file
|
|
581
|
+
* keeps `<a:schemeClr>` instead of a canonical `<a:srgbClr>`).
|
|
582
|
+
*
|
|
583
|
+
* @module types/color-ref
|
|
584
|
+
*/
|
|
585
|
+
/**
|
|
586
|
+
* The scheme slot names `a:schemeClr/@val` accepts (ECMA-376 `ST_SchemeColorIndex`).
|
|
587
|
+
* `bg1`/`tx1`/`bg2`/`tx2` are the colour-map aliases a slide resolves through
|
|
588
|
+
* `p:clrMap`; `phClr` is the placeholder colour used inside a theme's style
|
|
589
|
+
* matrix and is never chosen from a picker.
|
|
590
|
+
*/
|
|
591
|
+
type PptxThemeColorSchemeName = 'dk1' | 'lt1' | 'dk2' | 'lt2' | 'accent1' | 'accent2' | 'accent3' | 'accent4' | 'accent5' | 'accent6' | 'hlink' | 'folHlink' | 'bg1' | 'tx1' | 'bg2' | 'tx2' | 'phClr';
|
|
592
|
+
/**
|
|
593
|
+
* A theme colour choice. Every transform is a 0..1 fraction of the OOXML
|
|
594
|
+
* percentage (`lumMod val="20000"` is `lumMod: 0.2`), matching how the parser
|
|
595
|
+
* reads them, and is applied in the order `a:schemeClr` children are written:
|
|
596
|
+
* `tint`, `shade`, `lumMod`, `lumOff`, `alpha`.
|
|
597
|
+
*/
|
|
598
|
+
interface PptxThemeColorRef {
|
|
599
|
+
scheme: PptxThemeColorSchemeName;
|
|
600
|
+
/** `a:lumMod`: multiply HSL luminance (PowerPoint's "Lighter/Darker" rows). */
|
|
601
|
+
lumMod?: number;
|
|
602
|
+
/** `a:lumOff`: add to HSL luminance after `lumMod` ("Lighter N%" rows). */
|
|
603
|
+
lumOff?: number;
|
|
604
|
+
/** `a:tint`: blend towards white. */
|
|
605
|
+
tint?: number;
|
|
606
|
+
/** `a:shade`: blend towards black. */
|
|
607
|
+
shade?: number;
|
|
608
|
+
/** `a:alpha`: opacity fraction (1 = opaque). */
|
|
609
|
+
alpha?: number;
|
|
610
|
+
}
|
|
611
|
+
//#endregion
|
|
574
612
|
//#region src/core/types/effect-dag.d.ts
|
|
575
613
|
type EffectDagBlendMode = 'darken' | 'lighten' | 'mult' | 'over' | 'screen';
|
|
576
614
|
type EffectDagContainerType = 'sib' | 'tree';
|
|
@@ -860,6 +898,15 @@ interface ShapeStyle {
|
|
|
860
898
|
* back to canonical `<a:srgbClr>`.
|
|
861
899
|
*/
|
|
862
900
|
fillColorXml?: XmlObject;
|
|
901
|
+
/**
|
|
902
|
+
* Typed theme colour reference for the fill, set when {@link fillColorXml}
|
|
903
|
+
* is a plain `a:schemeClr` (see `themeColorRefFromColorChoice`). When
|
|
904
|
+
* present it WINS on save: the writer emits `<a:schemeClr>` from this ref
|
|
905
|
+
* instead of the resolved {@link fillColor}, so the fill keeps following
|
|
906
|
+
* the theme palette after a later theme change. `undefined` means the fill
|
|
907
|
+
* is a plain hex (or a colour kind a ref cannot express).
|
|
908
|
+
*/
|
|
909
|
+
fillColorRef?: PptxThemeColorRef;
|
|
863
910
|
fillGradient?: string;
|
|
864
911
|
/** Original `gradFill` XML retained for unknown-child and extension round-tripping. */
|
|
865
912
|
fillGradientXml?: XmlObject;
|
|
@@ -894,6 +941,12 @@ interface ShapeStyle {
|
|
|
894
941
|
opacity?: number;
|
|
895
942
|
/** Raw XML colour node preserved for round-trip (e.g. a:schemeClr with transforms). */
|
|
896
943
|
originalColorXml?: XmlObject;
|
|
944
|
+
/**
|
|
945
|
+
* Typed theme colour reference for this stop, set when
|
|
946
|
+
* {@link originalColorXml} is a plain `a:schemeClr`. Wins on save, same
|
|
947
|
+
* as {@link ShapeStyle.fillColorRef}.
|
|
948
|
+
*/
|
|
949
|
+
colorRef?: PptxThemeColorRef;
|
|
897
950
|
}>;
|
|
898
951
|
fillGradientAngle?: number;
|
|
899
952
|
fillGradientType?: 'linear' | 'radial';
|
|
@@ -940,6 +993,12 @@ interface ShapeStyle {
|
|
|
940
993
|
* round-trip serialisation. See {@link fillColorXml} for the rationale.
|
|
941
994
|
*/
|
|
942
995
|
strokeColorXml?: XmlObject;
|
|
996
|
+
/**
|
|
997
|
+
* Typed theme colour reference for the outline, mirroring
|
|
998
|
+
* {@link fillColorRef}: set when {@link strokeColorXml} is a plain
|
|
999
|
+
* `a:schemeClr`, and wins on save.
|
|
1000
|
+
*/
|
|
1001
|
+
strokeColorRef?: PptxThemeColorRef;
|
|
943
1002
|
/**
|
|
944
1003
|
* Kind of fill painted on the outline (`a:ln` child). Distinguishes a solid
|
|
945
1004
|
* outline from a gradient/pattern/none outline so save can emit the correct
|
|
@@ -1443,6 +1502,15 @@ interface TextStyle {
|
|
|
1443
1502
|
* verbatim when the resolved {@link color} still matches this node.
|
|
1444
1503
|
*/
|
|
1445
1504
|
colorXml?: XmlObject;
|
|
1505
|
+
/**
|
|
1506
|
+
* Typed theme colour reference for the run's text colour, set when
|
|
1507
|
+
* {@link colorXml} is a plain `a:schemeClr` (see
|
|
1508
|
+
* `themeColorRefFromColorChoice`). When present it WINS on save: the
|
|
1509
|
+
* writer emits `<a:schemeClr>` from this ref instead of the resolved
|
|
1510
|
+
* {@link color}, so the text keeps following the theme palette after a
|
|
1511
|
+
* later theme change.
|
|
1512
|
+
*/
|
|
1513
|
+
colorRef?: PptxThemeColorRef;
|
|
1446
1514
|
align?: 'left' | 'center' | 'right' | 'justify' | 'justLow' | 'dist' | 'thaiDist';
|
|
1447
1515
|
/**
|
|
1448
1516
|
* Vertical text-box anchor (`a:bodyPr/@anchor`, `ST_TextAnchoringType`).
|
|
@@ -1868,6 +1936,12 @@ interface BulletInfo {
|
|
|
1868
1936
|
* identity rather than being flattened to `<a:srgbClr/>` on save.
|
|
1869
1937
|
*/
|
|
1870
1938
|
colorXml?: XmlObject;
|
|
1939
|
+
/**
|
|
1940
|
+
* Typed theme colour reference for the bullet colour, set when
|
|
1941
|
+
* {@link colorXml} is a plain `a:schemeClr`. Wins on save, same as
|
|
1942
|
+
* {@link TextStyle.colorRef}.
|
|
1943
|
+
*/
|
|
1944
|
+
colorRef?: PptxThemeColorRef;
|
|
1871
1945
|
/** True when `a:buNone` explicitly suppresses bullets. */
|
|
1872
1946
|
none?: boolean;
|
|
1873
1947
|
/** Picture bullet: relationship ID from `a:buBlip` → `a:blip[@r:embed]`. */
|
|
@@ -2320,7 +2394,38 @@ interface PptxChartDataPointPicture {
|
|
|
2320
2394
|
//#region src/core/types/chart-pivot-format.d.ts
|
|
2321
2395
|
interface PptxChartPivotFormat {
|
|
2322
2396
|
index: number;
|
|
2397
|
+
/**
|
|
2398
|
+
* Typed projection of `spPr` (fill/stroke colour, stroke width, dash
|
|
2399
|
+
* style). When the parser is given a colour resolver (the normal case: the
|
|
2400
|
+
* runtime always supplies one), both a literal `a:srgbClr` and an
|
|
2401
|
+
* `a:schemeClr` theme reference (with its `lumMod`/`lumOff`/`tint`/`shade`
|
|
2402
|
+
* modifiers) resolve to a hex colour here, the same theme +
|
|
2403
|
+
* `c:clrMapOvr` chain the rest of chart parsing uses. Without a resolver
|
|
2404
|
+
* (e.g. a hand-built `PptxChartPivotFormat` with no theme to resolve
|
|
2405
|
+
* against), only the literal case resolves. Either way the authored node
|
|
2406
|
+
* is byte-preserved through {@link shapePropertiesXml} until this field is
|
|
2407
|
+
* set to something that no longer matches what re-parses off the current
|
|
2408
|
+
* XML; setting it then re-derives `shapePropertiesXml` on save (merged
|
|
2409
|
+
* onto whatever was already authored, keeping an unrelated schemeClr
|
|
2410
|
+
* reference alive when the colour itself is unchanged) unless
|
|
2411
|
+
* `shapePropertiesXml` is set explicitly, which wins.
|
|
2412
|
+
*/
|
|
2413
|
+
shapeProperties?: PptxChartShapeProps;
|
|
2414
|
+
/**
|
|
2415
|
+
* Typed projection of `txPr`'s `a:p/a:pPr/a:defRPr` (size/bold/italic/
|
|
2416
|
+
* colour/family), the same shape a legend entry or data-table's text
|
|
2417
|
+
* override models. Colour resolution mirrors {@link shapeProperties}
|
|
2418
|
+
* (theme-resolved `schemeClr` when a colour resolver is supplied, literal
|
|
2419
|
+
* `srgbClr` otherwise). See {@link txPrXml} for the raw fallback.
|
|
2420
|
+
*/
|
|
2421
|
+
textStyle?: PptxChartLegendTextStyle;
|
|
2422
|
+
/**
|
|
2423
|
+
* Typed projection of `marker` (symbol/size/spPr). See {@link markerXml}
|
|
2424
|
+
* for the raw fallback.
|
|
2425
|
+
*/
|
|
2426
|
+
marker?: PptxChartMarker;
|
|
2323
2427
|
shapePropertiesXml?: XmlObject | null;
|
|
2428
|
+
txPrXml?: XmlObject | null;
|
|
2324
2429
|
markerXml?: XmlObject | null;
|
|
2325
2430
|
dataLabelXml?: XmlObject | null;
|
|
2326
2431
|
extensionListXml?: XmlObject | null;
|
|
@@ -2479,21 +2584,40 @@ interface PptxChartStyleDefinition {
|
|
|
2479
2584
|
plotArea?: PptxChartStylePartEntry;
|
|
2480
2585
|
}
|
|
2481
2586
|
//#endregion
|
|
2482
|
-
//#region src/core/types/chart-
|
|
2587
|
+
//#region src/core/types/chart-title.d.ts
|
|
2483
2588
|
/**
|
|
2484
|
-
*
|
|
2589
|
+
* Chart title rich-text run type, split out of `types/chart.ts` (already at
|
|
2590
|
+
* the repo's file-size limit) to keep that module from growing further.
|
|
2485
2591
|
*
|
|
2486
|
-
*
|
|
2487
|
-
|
|
2488
|
-
|
|
2489
|
-
*
|
|
2490
|
-
* top of the chart plot. These interfaces describe the parsed, renderable
|
|
2491
|
-
* overlay model. The raw reference is preserved separately on
|
|
2492
|
-
* {@link PptxChartData.userShapesXml} for verbatim round-trip save; this model
|
|
2493
|
-
* is render-only.
|
|
2592
|
+
* @module pptx-types/chart-title
|
|
2593
|
+
*/
|
|
2594
|
+
/**
|
|
2595
|
+
* One run of a chart title's rich text (`c:title/c:tx/c:rich/a:p/a:r`).
|
|
2494
2596
|
*
|
|
2495
|
-
*
|
|
2597
|
+
* The flat `PptxChartData.title` field only ever captured the FIRST run's
|
|
2598
|
+
* text with no per-run formatting; `titleRuns` (when present) is the
|
|
2599
|
+
* lossless, multi-run replacement parsed from the same `c:rich` body. Absent
|
|
2600
|
+
* when the title has no rich text at all (an empty/auto title, or one
|
|
2601
|
+
* authored as a linked-cell reference).
|
|
2496
2602
|
*/
|
|
2603
|
+
interface PptxChartTitleRun {
|
|
2604
|
+
/** This run's text (`a:t`). */
|
|
2605
|
+
text: string;
|
|
2606
|
+
/** `a:rPr/@_b`. */
|
|
2607
|
+
bold?: boolean;
|
|
2608
|
+
/** `a:rPr/@_i`. */
|
|
2609
|
+
italic?: boolean;
|
|
2610
|
+
/**
|
|
2611
|
+
* Font size in POINTS (`a:rPr/@_sz`, hundredths of a point / 100), matching
|
|
2612
|
+
* `PptxChartLegendTextStyle.fontSize`'s convention rather than the pixel
|
|
2613
|
+
* convention `TextStyle.fontSize` uses for slide text.
|
|
2614
|
+
*/
|
|
2615
|
+
fontSize?: number;
|
|
2616
|
+
/** Resolved hex colour (e.g. `"#FF0000"`) from `a:rPr/a:solidFill`. */
|
|
2617
|
+
color?: string;
|
|
2618
|
+
}
|
|
2619
|
+
//#endregion
|
|
2620
|
+
//#region src/core/types/chart-user-shapes.d.ts
|
|
2497
2621
|
/** A single paragraph of overlay-shape text with light formatting. */
|
|
2498
2622
|
interface PptxChartUserShapeParagraph {
|
|
2499
2623
|
/** Joined run text of the paragraph. */
|
|
@@ -2509,6 +2633,80 @@ interface PptxChartUserShapeParagraph {
|
|
|
2509
2633
|
/** Paragraph alignment (`a:pPr/@algn`): left / centre / right. */
|
|
2510
2634
|
align?: 'l' | 'ctr' | 'r';
|
|
2511
2635
|
}
|
|
2636
|
+
/**
|
|
2637
|
+
* The DrawingML 2D group transform (`a:xfrm` inside `cdr:grpSpPr`) that
|
|
2638
|
+
* anchors a `grpSp`'s own box ({@link off}/{@link ext}) and establishes the
|
|
2639
|
+
* coordinate space its children are expressed in ({@link chOff}/{@link
|
|
2640
|
+
* chExt}), all in EMU. A child's position within the group is mapped into
|
|
2641
|
+
* the group's own box via
|
|
2642
|
+
* `frac = (child.off - chOff) / chExt`, then applied to the enclosing
|
|
2643
|
+
* anchor's box; see `flattenChartUserShapes` in
|
|
2644
|
+
* `chart-user-shapes-parser.ts`.
|
|
2645
|
+
*/
|
|
2646
|
+
interface PptxChartUserShapeGroupTransform {
|
|
2647
|
+
/** The group's own position in its parent's coordinate space, in EMU. */
|
|
2648
|
+
off: {
|
|
2649
|
+
x: number;
|
|
2650
|
+
y: number;
|
|
2651
|
+
};
|
|
2652
|
+
/** The group's own size in its parent's coordinate space, in EMU. */
|
|
2653
|
+
ext: {
|
|
2654
|
+
cx: number;
|
|
2655
|
+
cy: number;
|
|
2656
|
+
};
|
|
2657
|
+
/** Origin of the child coordinate space (`a:chOff`), in EMU. */
|
|
2658
|
+
chOff: {
|
|
2659
|
+
x: number;
|
|
2660
|
+
y: number;
|
|
2661
|
+
};
|
|
2662
|
+
/** Size of the child coordinate space (`a:chExt`), in EMU. */
|
|
2663
|
+
chExt: {
|
|
2664
|
+
cx: number;
|
|
2665
|
+
cy: number;
|
|
2666
|
+
};
|
|
2667
|
+
}
|
|
2668
|
+
/**
|
|
2669
|
+
* One shape grouped inside a `cdr:grpSp` (or a nested `cdr:grpSp` itself).
|
|
2670
|
+
* Unlike a top-level {@link PptxChartUserShape}, a group child has no
|
|
2671
|
+
* drawing anchor of its own: its position is expressed in its parent
|
|
2672
|
+
* group's child coordinate space via {@link off}/{@link ext} (EMU, read
|
|
2673
|
+
* from the child's own `a:xfrm`), not as a chart-relative fraction.
|
|
2674
|
+
*/
|
|
2675
|
+
interface PptxChartUserShapeGroupChild {
|
|
2676
|
+
/** Shape kind, same vocabulary as {@link PptxChartUserShape.kind}. */
|
|
2677
|
+
kind: 'sp' | 'cxnSp' | 'pic' | 'grpSp' | 'graphicFrame';
|
|
2678
|
+
/** Position within the parent group's child coordinate space, in EMU. */
|
|
2679
|
+
off: {
|
|
2680
|
+
x: number;
|
|
2681
|
+
y: number;
|
|
2682
|
+
};
|
|
2683
|
+
/** Size within the parent group's child coordinate space, in EMU. */
|
|
2684
|
+
ext: {
|
|
2685
|
+
cx: number;
|
|
2686
|
+
cy: number;
|
|
2687
|
+
};
|
|
2688
|
+
/** Preset geometry name (`a:prstGeom/@prst`), defaulting to `"rect"`. */
|
|
2689
|
+
prst?: string;
|
|
2690
|
+
/** Resolved solid-fill hex colour, when present. */
|
|
2691
|
+
fill?: string;
|
|
2692
|
+
/** Resolved line/stroke hex colour, when present. */
|
|
2693
|
+
stroke?: string;
|
|
2694
|
+
/** Line width in points (`a:ln/@w` divided by 12700), when present. */
|
|
2695
|
+
strokeWidth?: number;
|
|
2696
|
+
/** Text paragraphs of the shape's `txBody`, when present. */
|
|
2697
|
+
paragraphs?: PptxChartUserShapeParagraph[];
|
|
2698
|
+
/**
|
|
2699
|
+
* Verbatim source XML of a `pic`/`graphicFrame` child, or of this node
|
|
2700
|
+
* itself when `kind === 'grpSp'` and the nested group is untouched since
|
|
2701
|
+
* parse. See {@link PptxChartUserShape.rawXml}'s doc for the same
|
|
2702
|
+
* contract one level up.
|
|
2703
|
+
*/
|
|
2704
|
+
rawXml?: XmlObject;
|
|
2705
|
+
/** Present when `kind === 'grpSp'`: this nested group's own transform. */
|
|
2706
|
+
transform?: PptxChartUserShapeGroupTransform;
|
|
2707
|
+
/** Present when `kind === 'grpSp'`: this nested group's own children. */
|
|
2708
|
+
children?: PptxChartUserShapeGroupChild[];
|
|
2709
|
+
}
|
|
2512
2710
|
/**
|
|
2513
2711
|
* A parsed chart-overlay shape positioned by a drawing anchor.
|
|
2514
2712
|
*
|
|
@@ -2519,12 +2717,13 @@ interface PptxChartUserShapeParagraph {
|
|
|
2519
2717
|
interface PptxChartUserShape {
|
|
2520
2718
|
/**
|
|
2521
2719
|
* Shape kind: text/preset shape, connector, picture, a group of the
|
|
2522
|
-
* above (`grpSp`,
|
|
2523
|
-
*
|
|
2524
|
-
*
|
|
2525
|
-
*
|
|
2526
|
-
*
|
|
2527
|
-
*
|
|
2720
|
+
* above (`grpSp`, with its own {@link transform} and {@link children},
|
|
2721
|
+
* nested arbitrarily; use `flattenChartUserShapes` from
|
|
2722
|
+
* `chart-user-shapes-parser.ts` to get a flat, render-ready leaf list
|
|
2723
|
+
* with the group transform already applied), or a bare placeholder for
|
|
2724
|
+
* a `graphicFrame` anchor child (deep content such as a nested chart or
|
|
2725
|
+
* table is out of scope; it only keeps the anchor's space accounted for
|
|
2726
|
+
* instead of the whole overlay disappearing).
|
|
2528
2727
|
*/
|
|
2529
2728
|
kind: 'sp' | 'cxnSp' | 'pic' | 'grpSp' | 'graphicFrame';
|
|
2530
2729
|
/** Anchor kind that positioned the shape. */
|
|
@@ -2554,6 +2753,26 @@ interface PptxChartUserShape {
|
|
|
2554
2753
|
strokeWidth?: number;
|
|
2555
2754
|
/** Text paragraphs of the shape's `txBody`, when present. */
|
|
2556
2755
|
paragraphs?: PptxChartUserShapeParagraph[];
|
|
2756
|
+
/**
|
|
2757
|
+
* Verbatim source XML of a `pic` or `graphicFrame` anchor child (the
|
|
2758
|
+
* `cdr:pic` / `cdr:graphicFrame` node itself, not the enclosing anchor),
|
|
2759
|
+
* or of the `cdr:grpSp` node itself when `kind === 'grpSp'` and the
|
|
2760
|
+
* group is untouched since parse (byte-identical passthrough). None of
|
|
2761
|
+
* these three kinds have a reconstructable typed representation that is
|
|
2762
|
+
* guaranteed lossless (a picture's blip reference, a nested chart/table's
|
|
2763
|
+
* graphic content, or a group's exact child ordering/ids), so the
|
|
2764
|
+
* serializer re-emits this verbatim when present instead of a lossy
|
|
2765
|
+
* rebuild. Editing a shape inside a group (via the SDK's path-based
|
|
2766
|
+
* overlay operations) clears the group's `rawXml` so the serializer
|
|
2767
|
+
* regenerates it from {@link transform}/{@link children} instead. Absent
|
|
2768
|
+
* for `sp`/`cxnSp`, which round-trip losslessly through their typed
|
|
2769
|
+
* fields above.
|
|
2770
|
+
*/
|
|
2771
|
+
rawXml?: XmlObject;
|
|
2772
|
+
/** Present when `kind === 'grpSp'`: the group's own transform. */
|
|
2773
|
+
transform?: PptxChartUserShapeGroupTransform;
|
|
2774
|
+
/** Present when `kind === 'grpSp'`: the grouped children, nested arbitrarily. */
|
|
2775
|
+
children?: PptxChartUserShapeGroupChild[];
|
|
2557
2776
|
}
|
|
2558
2777
|
//#endregion
|
|
2559
2778
|
//#region src/core/types/chart.d.ts
|
|
@@ -2627,6 +2846,10 @@ interface PptxChartTrendline {
|
|
|
2627
2846
|
displayRSq?: boolean;
|
|
2628
2847
|
displayEq?: boolean;
|
|
2629
2848
|
color?: string;
|
|
2849
|
+
/** Trendline width in points (`c:trendline/c:spPr/a:ln/@w`, EMU / 12700). */
|
|
2850
|
+
lineWidth?: number;
|
|
2851
|
+
/** Trendline dash style (`c:trendline/c:spPr/a:ln/a:prstDash/@val`). */
|
|
2852
|
+
lineDashStyle?: string;
|
|
2630
2853
|
label?: PptxChartTrendlineLabel | null;
|
|
2631
2854
|
}
|
|
2632
2855
|
/** Typed, commonly edited properties of `c:trendlineLbl`. */
|
|
@@ -2672,6 +2895,10 @@ interface PptxChartErrBars {
|
|
|
2672
2895
|
customMinus?: number[];
|
|
2673
2896
|
noEndCap?: boolean;
|
|
2674
2897
|
color?: string;
|
|
2898
|
+
/** Error-bar line width in points (`c:errBars/c:spPr/a:ln/@w`, EMU / 12700). */
|
|
2899
|
+
width?: number;
|
|
2900
|
+
/** Error-bar line dash style (`c:errBars/c:spPr/a:ln/a:prstDash/@val`). */
|
|
2901
|
+
dashStyle?: string;
|
|
2675
2902
|
}
|
|
2676
2903
|
/**
|
|
2677
2904
|
* Visibility flags for the chart data table (axes + legend keys).
|
|
@@ -2798,6 +3025,12 @@ interface PptxChartDataLabel {
|
|
|
2798
3025
|
* `.../a:p/a:pPr/a:defRPr` default-run-property style.
|
|
2799
3026
|
*/
|
|
2800
3027
|
txPr?: PptxChartLegendTextStyle;
|
|
3028
|
+
/**
|
|
3029
|
+
* This label's own shape formatting (`c:dLbl/c:spPr`): fill/line colour,
|
|
3030
|
+
* width, and dash style for the label's callout box, taking precedence
|
|
3031
|
+
* over any chart/series-level default when set.
|
|
3032
|
+
*/
|
|
3033
|
+
spPr?: PptxChartShapeProps;
|
|
2801
3034
|
}
|
|
2802
3035
|
/** Axis number format. */
|
|
2803
3036
|
interface PptxChartAxisNumFmt {
|
|
@@ -3361,6 +3594,16 @@ interface PptxChartDateCategories {
|
|
|
3361
3594
|
*/
|
|
3362
3595
|
interface PptxChartData {
|
|
3363
3596
|
title?: string;
|
|
3597
|
+
/**
|
|
3598
|
+
* Rich-text runs of the title, parsed from `c:title/c:tx/c:rich` (issue:
|
|
3599
|
+
* chart title rich text). Lossless multi-run alternative to the flat
|
|
3600
|
+
* {@link title}: when present, the writer serialises every run's own
|
|
3601
|
+
* bold/italic/size/color; when absent, save falls back to the flat
|
|
3602
|
+
* `title` path as before. Only populated for a classic (`c:`) chart's
|
|
3603
|
+
* rich (typed) title, not a ChartEx (`cx:`) title or one authored as a
|
|
3604
|
+
* linked-cell reference.
|
|
3605
|
+
*/
|
|
3606
|
+
titleRuns?: PptxChartTitleRun[];
|
|
3364
3607
|
chartType: PptxChartType;
|
|
3365
3608
|
categories: string[];
|
|
3366
3609
|
/**
|
|
@@ -3452,8 +3695,10 @@ interface PptxChartData {
|
|
|
3452
3695
|
chartRelationshipId?: string;
|
|
3453
3696
|
/** `null` explicitly removes an existing ChartML data table. */
|
|
3454
3697
|
dataTable?: PptxChartDataTable | null;
|
|
3455
|
-
dropLines
|
|
3456
|
-
|
|
3698
|
+
/** `null` explicitly removes an existing `c:dropLines` element. */
|
|
3699
|
+
dropLines?: PptxChartLineStyle | null;
|
|
3700
|
+
/** `null` explicitly removes an existing `c:hiLowLines` element. */
|
|
3701
|
+
hiLowLines?: PptxChartLineStyle | null;
|
|
3457
3702
|
/** `null` explicitly removes an existing up/down-bars container. */
|
|
3458
3703
|
upDownBars?: PptxChartUpDownBars | null;
|
|
3459
3704
|
axes?: PptxChartAxisFormatting[];
|
|
@@ -3568,10 +3813,13 @@ interface PptxChartData {
|
|
|
3568
3813
|
pivotFormats?: PptxChartPivotFormats | null;
|
|
3569
3814
|
/**
|
|
3570
3815
|
* Color-map override (`c:clrMapOvr`) carrying 12 attributes that
|
|
3571
|
-
* remap theme colour roles for this chart only.
|
|
3572
|
-
* `attribute
|
|
3816
|
+
* remap theme colour roles for this chart only. Modeled as a flat
|
|
3817
|
+
* `attribute -> value` map (e.g. `{ bg1: 'lt1', accent1: 'accent2' }`)
|
|
3818
|
+
* so unknown/future attributes round-trip without code changes.
|
|
3819
|
+
* `null` explicitly removes an existing `c:clrMapOvr`; an empty object
|
|
3820
|
+
* is treated the same as `null` on save.
|
|
3573
3821
|
*/
|
|
3574
|
-
clrMapOvr?: Record<string, string
|
|
3822
|
+
clrMapOvr?: Record<string, string> | null;
|
|
3575
3823
|
/**
|
|
3576
3824
|
* Whether the chart's own cached numeric values use the 1904 date epoch
|
|
3577
3825
|
* (`c:chartSpace/c:date1904/@val`). Independent of, and authoritative over,
|
|
@@ -4948,13 +5196,55 @@ interface PptxSmartArtData {
|
|
|
4948
5196
|
drawingDirty?: boolean;
|
|
4949
5197
|
}
|
|
4950
5198
|
//#endregion
|
|
4951
|
-
//#region src/core/types/table.d.ts
|
|
5199
|
+
//#region src/core/types/table-style-edit.d.ts
|
|
4952
5200
|
/**
|
|
4953
|
-
*
|
|
4954
|
-
*
|
|
5201
|
+
* A `a:fillRef`/`a:lnRef`/`a:effectRef`-style style-matrix reference: an
|
|
5202
|
+
* index into the theme's format scheme (`a:fmtScheme/a:fillStyleLst`, 1-based
|
|
5203
|
+
* per ECMA-376 §20.1.4.1.12) plus an optional colour transform child.
|
|
5204
|
+
*
|
|
5205
|
+
* Distinct from an already-resolved {@link ParsedTableStyleFill}: a fill ref
|
|
5206
|
+
* points AT a theme style-matrix entry rather than carrying a colour choice
|
|
5207
|
+
* directly, though the two commonly appear together (`<a:fillRef idx="2">
|
|
5208
|
+
* <a:schemeClr val="accent1"/></a:fillRef>`).
|
|
4955
5209
|
*
|
|
4956
|
-
* @
|
|
5210
|
+
* @example
|
|
5211
|
+
* ```ts
|
|
5212
|
+
* const ref: ParsedTableFillRef = { idx: 2, color: { schemeColor: 'accent1' } };
|
|
5213
|
+
* // => satisfies ParsedTableFillRef
|
|
5214
|
+
* ```
|
|
4957
5215
|
*/
|
|
5216
|
+
interface ParsedTableFillRef {
|
|
5217
|
+
/** 1-based index into the theme format scheme's fill style list. */
|
|
5218
|
+
idx: number;
|
|
5219
|
+
/** Colour transform child (`a:schemeClr`/`a:srgbClr`) applied to the referenced style. */
|
|
5220
|
+
color?: ParsedTableStyleFill;
|
|
5221
|
+
}
|
|
5222
|
+
/**
|
|
5223
|
+
* One leaf (or `effectDag`-wrapped) node of an `a:effectLst`/`a:effectDag`
|
|
5224
|
+
* effect chain, kept mostly opaque: {@link kind} names the OOXML element so a
|
|
5225
|
+
* consumer can recognise common effects (`outerShdw`, `glow`, `softEdge`,
|
|
5226
|
+
* `reflection`, `blur`, `innerShdw`, `prstShdw`, `fillOverlay`, `alphaModFix`,
|
|
5227
|
+
* `alphaInv`, `grayscl`, `biLevel`, `duotone`, `hsl`, `lum`, `tint`) without
|
|
5228
|
+
* this module re-deriving the full shape-effect taxonomy already modelled on
|
|
5229
|
+
* `ShapeStyle`; {@link xml} preserves the node verbatim for lossless re-emit.
|
|
5230
|
+
*
|
|
5231
|
+
* @example
|
|
5232
|
+
* ```ts
|
|
5233
|
+
* const effect: ParsedTableStyleEffect = {
|
|
5234
|
+
* kind: 'outerShdw',
|
|
5235
|
+
* xml: { '@_blurRad': '40000', '@_dist': '20000', '@_dir': '5400000' },
|
|
5236
|
+
* };
|
|
5237
|
+
* // => satisfies ParsedTableStyleEffect
|
|
5238
|
+
* ```
|
|
5239
|
+
*/
|
|
5240
|
+
interface ParsedTableStyleEffect {
|
|
5241
|
+
/** The OOXML element's local name, e.g. `outerShdw`, `glow`, `softEdge`. */
|
|
5242
|
+
kind: string;
|
|
5243
|
+
/** Verbatim XML node (attributes + children) for lossless round-trip. */
|
|
5244
|
+
xml: XmlObject;
|
|
5245
|
+
}
|
|
5246
|
+
//#endregion
|
|
5247
|
+
//#region src/core/types/table.d.ts
|
|
4958
5248
|
/**
|
|
4959
5249
|
* Per-cell visual style for a table cell.
|
|
4960
5250
|
*
|
|
@@ -4991,6 +5281,14 @@ interface PptxTableCellStyle {
|
|
|
4991
5281
|
* future expansion alongside the run-properties round-trip path.
|
|
4992
5282
|
*/
|
|
4993
5283
|
colorXml?: XmlObject;
|
|
5284
|
+
/**
|
|
5285
|
+
* Typed theme colour reference for the cell text colour, set when
|
|
5286
|
+
* {@link colorXml} is a plain `a:schemeClr`. Wins on save, mirroring
|
|
5287
|
+
* `TextStyle.colorRef`. Distinct from {@link ParsedTableStyleFill.schemeColor},
|
|
5288
|
+
* which describes a `ppt/tableStyles.xml` section fill rather than an
|
|
5289
|
+
* individual cell override.
|
|
5290
|
+
*/
|
|
5291
|
+
colorRef?: PptxThemeColorRef;
|
|
4994
5292
|
backgroundColor?: string;
|
|
4995
5293
|
/**
|
|
4996
5294
|
* Raw XML colour-choice node preserved from cell `a:tcPr/a:solidFill` for
|
|
@@ -4998,6 +5296,12 @@ interface PptxTableCellStyle {
|
|
|
4998
5296
|
* {@link backgroundColor} still matches the original colour.
|
|
4999
5297
|
*/
|
|
5000
5298
|
backgroundColorXml?: XmlObject;
|
|
5299
|
+
/**
|
|
5300
|
+
* Typed theme colour reference for the cell fill, set when
|
|
5301
|
+
* {@link backgroundColorXml} is a plain `a:schemeClr`. Wins on save,
|
|
5302
|
+
* mirroring `ShapeStyle.fillColorRef`.
|
|
5303
|
+
*/
|
|
5304
|
+
backgroundColorRef?: PptxThemeColorRef;
|
|
5001
5305
|
borderColor?: string;
|
|
5002
5306
|
/** Top border width in px. */
|
|
5003
5307
|
borderTopWidth?: number;
|
|
@@ -5311,12 +5615,14 @@ interface PptxTableData {
|
|
|
5311
5615
|
*/
|
|
5312
5616
|
tableFill?: ParsedTableStyleFill;
|
|
5313
5617
|
/**
|
|
5314
|
-
*
|
|
5315
|
-
* independent of the referenced table style
|
|
5316
|
-
*
|
|
5317
|
-
*
|
|
5618
|
+
* `a:tblPr`'s own `a:effectLst` (or `a:effectDag`) effect chain,
|
|
5619
|
+
* independent of the referenced table style, decomposed into a typed
|
|
5620
|
+
* sequence of {@link ParsedTableStyleEffect} nodes (issue G6). Each node
|
|
5621
|
+
* keeps its own XML verbatim for lossless round-trip; empty array is
|
|
5622
|
+
* normalised to `undefined` by the parser so `tableEffects` is only ever
|
|
5623
|
+
* present when there is at least one effect.
|
|
5318
5624
|
*/
|
|
5319
|
-
tableEffects?:
|
|
5625
|
+
tableEffects?: ParsedTableStyleEffect[];
|
|
5320
5626
|
}
|
|
5321
5627
|
/**
|
|
5322
5628
|
* A single fill reference within a table style section.
|
|
@@ -5492,13 +5798,20 @@ interface ParsedTableStyleBorders {
|
|
|
5492
5798
|
/**
|
|
5493
5799
|
* Table background style (CT_TableBackgroundStyle, ECMA-376 §21.1.3.7).
|
|
5494
5800
|
*
|
|
5495
|
-
* Corresponds to the `<a:tblBg>` child of `<a:tblStyle>`.
|
|
5496
|
-
*
|
|
5497
|
-
*
|
|
5801
|
+
* Corresponds to the `<a:tblBg>` child of `<a:tblStyle>`. Captures the
|
|
5802
|
+
* resolved scheme-fill colour, an unresolved style-matrix `a:fillRef`, and a
|
|
5803
|
+
* presence flag for effects (verbatim XML for the effect list is preserved
|
|
5804
|
+
* separately by the save path).
|
|
5498
5805
|
*/
|
|
5499
5806
|
interface ParsedTableBackground {
|
|
5500
5807
|
/** Solid fill (resolved from `a:fill > a:solidFill > a:schemeClr`). */
|
|
5501
5808
|
fill?: ParsedTableStyleFill;
|
|
5809
|
+
/**
|
|
5810
|
+
* Style-matrix fill reference (`<a:fillRef idx="N">...</a:fillRef>`),
|
|
5811
|
+
* mutually exclusive with {@link fill} (`a:fill` is the choice sibling of
|
|
5812
|
+
* `a:fillRef` in `CT_TableBackgroundStyle`).
|
|
5813
|
+
*/
|
|
5814
|
+
fillRef?: ParsedTableFillRef;
|
|
5502
5815
|
/** Has an `a:effectLst` child that should be round-tripped. */
|
|
5503
5816
|
hasEffectLst?: boolean;
|
|
5504
5817
|
}
|
|
@@ -5612,6 +5925,21 @@ interface PptxAccessibilityProperties {
|
|
|
5612
5925
|
*/
|
|
5613
5926
|
isDecorative?: boolean;
|
|
5614
5927
|
}
|
|
5928
|
+
/**
|
|
5929
|
+
* Accessibility description/title from `p:cNvPr/@descr` / `@title` on a
|
|
5930
|
+
* plain shape, text box or connector (`p:sp` / `p:cxnSp`). The same pair of
|
|
5931
|
+
* attributes already round-trips for a graphic frame (see
|
|
5932
|
+
* {@link TablePptxElement.altText}) and, `descr` only, for a picture
|
|
5933
|
+
* ({@link PptxImageProperties.altText}); this mixin extends it to the three
|
|
5934
|
+
* element kinds whose PowerPoint Alt Text pane data was previously dropped
|
|
5935
|
+
* on load because neither field existed on the model.
|
|
5936
|
+
*/
|
|
5937
|
+
interface PptxNonVisualDescription {
|
|
5938
|
+
/** `p:cNvPr/@descr`. */
|
|
5939
|
+
altText?: string;
|
|
5940
|
+
/** `p:cNvPr/@title`. */
|
|
5941
|
+
title?: string;
|
|
5942
|
+
}
|
|
5615
5943
|
/**
|
|
5616
5944
|
* `a:cNvPicPr/@preferRelativeResize` (issue G13), a picture-only non-visual
|
|
5617
5945
|
* property distinct from `a:picLocks`.
|
|
@@ -5644,7 +5972,7 @@ interface PptxPictureNonVisualProperties {
|
|
|
5644
5972
|
* // => satisfies TextPptxElement
|
|
5645
5973
|
* ```
|
|
5646
5974
|
*/
|
|
5647
|
-
interface TextPptxElement extends PptxElementBase, PptxTextProperties, PptxShapeProperties {
|
|
5975
|
+
interface TextPptxElement extends PptxElementBase, PptxTextProperties, PptxShapeProperties, PptxNonVisualDescription {
|
|
5648
5976
|
type: 'text';
|
|
5649
5977
|
}
|
|
5650
5978
|
/**
|
|
@@ -5662,7 +5990,7 @@ interface TextPptxElement extends PptxElementBase, PptxTextProperties, PptxShape
|
|
|
5662
5990
|
* // => satisfies ShapePptxElement
|
|
5663
5991
|
* ```
|
|
5664
5992
|
*/
|
|
5665
|
-
interface ShapePptxElement extends PptxElementBase, PptxTextProperties, PptxShapeProperties, PptxCustomPathProperties, PptxAccessibilityProperties {
|
|
5993
|
+
interface ShapePptxElement extends PptxElementBase, PptxTextProperties, PptxShapeProperties, PptxCustomPathProperties, PptxAccessibilityProperties, PptxNonVisualDescription {
|
|
5666
5994
|
type: 'shape';
|
|
5667
5995
|
}
|
|
5668
5996
|
/**
|
|
@@ -5684,7 +6012,7 @@ interface ShapePptxElement extends PptxElementBase, PptxTextProperties, PptxShap
|
|
|
5684
6012
|
* // => satisfies ConnectorPptxElement
|
|
5685
6013
|
* ```
|
|
5686
6014
|
*/
|
|
5687
|
-
interface ConnectorPptxElement extends PptxElementBase, PptxTextProperties, PptxShapeProperties {
|
|
6015
|
+
interface ConnectorPptxElement extends PptxElementBase, PptxTextProperties, PptxShapeProperties, PptxNonVisualDescription {
|
|
5688
6016
|
type: 'connector';
|
|
5689
6017
|
}
|
|
5690
6018
|
/**
|
|
@@ -5750,6 +6078,13 @@ interface TablePptxElement extends PptxElementBase {
|
|
|
5750
6078
|
type: 'table';
|
|
5751
6079
|
/** Parsed table cell data for editing. */
|
|
5752
6080
|
tableData?: PptxTableData;
|
|
6081
|
+
/**
|
|
6082
|
+
* Accessibility description from `p:nvGraphicFramePr/p:cNvPr/@descr`, the
|
|
6083
|
+
* same non-visual-properties attribute a picture's alt text comes from.
|
|
6084
|
+
*/
|
|
6085
|
+
altText?: string;
|
|
6086
|
+
/** Accessibility title from `p:nvGraphicFramePr/p:cNvPr/@title`. */
|
|
6087
|
+
title?: string;
|
|
5753
6088
|
/**
|
|
5754
6089
|
* Unrecognised extensions captured from `a:graphicData/a:extLst` so they
|
|
5755
6090
|
* round-trip losslessly. See {@link PptxGraphicFrameExtension}.
|
|
@@ -5765,6 +6100,10 @@ interface TablePptxElement extends PptxElementBase {
|
|
|
5765
6100
|
interface ChartPptxElement extends PptxElementBase {
|
|
5766
6101
|
type: 'chart';
|
|
5767
6102
|
chartData?: PptxChartData;
|
|
6103
|
+
/** Accessibility description from `p:nvGraphicFramePr/p:cNvPr/@descr`. */
|
|
6104
|
+
altText?: string;
|
|
6105
|
+
/** Accessibility title from `p:nvGraphicFramePr/p:cNvPr/@title`. */
|
|
6106
|
+
title?: string;
|
|
5768
6107
|
/** Unrecognised graphicFrame extLst extensions, captured verbatim for round-trip. */
|
|
5769
6108
|
extensionXml?: PptxGraphicFrameExtension[];
|
|
5770
6109
|
}
|
|
@@ -5782,6 +6121,10 @@ interface ChartPptxElement extends PptxElementBase {
|
|
|
5782
6121
|
interface SmartArtPptxElement extends PptxElementBase {
|
|
5783
6122
|
type: 'smartArt';
|
|
5784
6123
|
smartArtData?: PptxSmartArtData;
|
|
6124
|
+
/** Accessibility description from `p:nvGraphicFramePr/p:cNvPr/@descr`. */
|
|
6125
|
+
altText?: string;
|
|
6126
|
+
/** Accessibility title from `p:nvGraphicFramePr/p:cNvPr/@title`. */
|
|
6127
|
+
title?: string;
|
|
5785
6128
|
/** Unrecognised graphicFrame extLst extensions, captured verbatim for round-trip. */
|
|
5786
6129
|
extensionXml?: PptxGraphicFrameExtension[];
|
|
5787
6130
|
}
|
|
@@ -5868,6 +6211,10 @@ interface OlePptxElement extends PptxElementBase {
|
|
|
5868
6211
|
* `false`; `undefined` means the source authored no explicit value.
|
|
5869
6212
|
*/
|
|
5870
6213
|
oleUpdateAutomatic?: boolean;
|
|
6214
|
+
/** Accessibility description from `p:nvGraphicFramePr/p:cNvPr/@descr`. */
|
|
6215
|
+
altText?: string;
|
|
6216
|
+
/** Accessibility title from `p:nvGraphicFramePr/p:cNvPr/@title`. */
|
|
6217
|
+
title?: string;
|
|
5871
6218
|
/** Unrecognised graphicFrame extLst extensions, captured verbatim for round-trip. */
|
|
5872
6219
|
extensionXml?: PptxGraphicFrameExtension[];
|
|
5873
6220
|
}
|
|
@@ -5959,6 +6306,15 @@ interface MediaPptxElement extends PptxElementBase {
|
|
|
5959
6306
|
* (`r:embed`). Defaults to embedded when undefined.
|
|
5960
6307
|
*/
|
|
5961
6308
|
isLinked?: boolean;
|
|
6309
|
+
/**
|
|
6310
|
+
* Accessibility description from `p:nvGraphicFramePr/p:cNvPr/@descr`.
|
|
6311
|
+
* Only populated for the `p:graphicFrame`-shaped (SDK-created) media
|
|
6312
|
+
* form; a `p:pic`-shaped media element's alt text is not currently
|
|
6313
|
+
* parsed (see `PptxHandlerRuntimePictureParsing.ts`).
|
|
6314
|
+
*/
|
|
6315
|
+
altText?: string;
|
|
6316
|
+
/** Accessibility title from `p:nvGraphicFramePr/p:cNvPr/@title`. Same scope note as {@link altText}. */
|
|
6317
|
+
title?: string;
|
|
5962
6318
|
/** Unrecognised graphicFrame extLst extensions, captured verbatim for round-trip. */
|
|
5963
6319
|
extensionXml?: PptxGraphicFrameExtension[];
|
|
5964
6320
|
}
|
|
@@ -6475,7 +6831,20 @@ interface PptxAnimationGraphicElementTarget {
|
|
|
6475
6831
|
seriesIdx?: number;
|
|
6476
6832
|
/** `@_categoryIdx`, 0-based category index, when the target is category-scoped. */
|
|
6477
6833
|
categoryIdx?: number;
|
|
6478
|
-
/**
|
|
6834
|
+
/**
|
|
6835
|
+
* `p:dgm/@_id` (CT_TLBuildDiagram, ECMA-376 S19.5.10): the diagram DATA MODEL
|
|
6836
|
+
* point id (`dgm:pt/@modelId`) this per-stage effect reveals, when a
|
|
6837
|
+
* `p:bldDgm` build authors one effect per node instead of a single staged
|
|
6838
|
+
* reveal. `dgm`-kind targets only; a `chart`-kind target never carries this.
|
|
6839
|
+
* Matches `PptxSmartArtNode.id` (parsed from the same `@modelId`), so a
|
|
6840
|
+
* diagram renderer can reveal the exact authored node.
|
|
6841
|
+
*/
|
|
6842
|
+
id?: string;
|
|
6843
|
+
/**
|
|
6844
|
+
* `@_bldStep`: `ST_TLChartBuildStep` (`category` / `categoryEl` / `series` /
|
|
6845
|
+
* `seriesEl`) for a `chart`-kind target, or `ST_TLDiagramBuildStep`
|
|
6846
|
+
* (`sp` / `bg`) for a `dgm`-kind target.
|
|
6847
|
+
*/
|
|
6479
6848
|
bldStep?: string;
|
|
6480
6849
|
}
|
|
6481
6850
|
/**
|
|
@@ -6925,6 +7294,34 @@ interface PptxNativeAnimation {
|
|
|
6925
7294
|
* `childStyle`, a legacy compatibility hint. Round-tripped only.
|
|
6926
7295
|
*/
|
|
6927
7296
|
cBhvrOverride?: 'normal' | 'childStyle';
|
|
7297
|
+
/**
|
|
7298
|
+
* `p:set` discrete attribute assignments composed alongside this effect
|
|
7299
|
+
* (ECMA-376 S19.5.79 CT_TLSetBehavior): an instantaneous (non-interpolated)
|
|
7300
|
+
* value change, as opposed to {@link attributeAnimations}'s `p:anim`
|
|
7301
|
+
* keyframe ramps. PowerPoint authors several font-style emphasis effects
|
|
7302
|
+
* this way (Bold Reveal, Underline, Bold Flash, Change Font Size), since
|
|
7303
|
+
* "on/off" or "size N" has nothing to interpolate. Not yet consulted by
|
|
7304
|
+
* shared playback (round-trip/typed-model only so far).
|
|
7305
|
+
*/
|
|
7306
|
+
setAnimations?: PptxSetAnimation[];
|
|
7307
|
+
}
|
|
7308
|
+
/**
|
|
7309
|
+
* One `p:set` discrete (non-interpolated) attribute assignment composed
|
|
7310
|
+
* alongside an authored effect. See {@link PptxNativeAnimation.setAnimations}.
|
|
7311
|
+
*
|
|
7312
|
+
* @see ECMA-376 S19.5.79 CT_TLSetBehavior
|
|
7313
|
+
*/
|
|
7314
|
+
interface PptxSetAnimation {
|
|
7315
|
+
/** Lowercased target attribute from `p:cBhvr/p:attrNameLst/p:attrName`. */
|
|
7316
|
+
attrName: string;
|
|
7317
|
+
/** Decoded value from `p:to` (same variant shape as a `p:tav/p:val`). */
|
|
7318
|
+
value: string | boolean | number;
|
|
7319
|
+
/** Discriminant indicating which `p:to` child carried the value. */
|
|
7320
|
+
valueType: 'str' | 'bool' | 'int' | 'flt' | 'clr';
|
|
7321
|
+
/** Duration from this behaviour's nested `p:cTn/@dur`. */
|
|
7322
|
+
durationMs?: number;
|
|
7323
|
+
/** Start offset from this behaviour's nested `p:stCondLst`. */
|
|
7324
|
+
delayMs?: number;
|
|
6928
7325
|
}
|
|
6929
7326
|
/**
|
|
6930
7327
|
* Parsed `p:animEffect/@filter` (+ `@transition`) descriptor. ECMA-376
|
|
@@ -7192,6 +7589,16 @@ interface PptxElementAnimation {
|
|
|
7192
7589
|
* OOXML equivalent and is not required for playback.
|
|
7193
7590
|
*/
|
|
7194
7591
|
soundFileName?: string;
|
|
7592
|
+
/**
|
|
7593
|
+
* Per-build-level timing template(s) from the {@link sequence}'s own
|
|
7594
|
+
* `p:bldP/p:tmplLst` (ECMA-376 §19.5.84), carried over from the loaded
|
|
7595
|
+
* `PptxNativeAnimation.buildTemplates` this element animation was derived
|
|
7596
|
+
* from so a full timing-tree rebuild (`PptxAnimationWriteService`'s
|
|
7597
|
+
* `buildTimingXml`, when the slide had no prior `p:timing`) can re-emit
|
|
7598
|
+
* them instead of silently dropping the deck's authored per-level
|
|
7599
|
+
* defaults. Absent when {@link sequence} carries no such template.
|
|
7600
|
+
*/
|
|
7601
|
+
buildTemplates?: PptxTimingTemplate[];
|
|
7195
7602
|
}
|
|
7196
7603
|
/**
|
|
7197
7604
|
* A read-only anchor representing one of the deck's own effect groups: a
|
|
@@ -8108,6 +8515,22 @@ interface PptxActiveXControl {
|
|
|
8108
8515
|
name?: string;
|
|
8109
8516
|
/** Shape ID this control is linked to (from @spid). */
|
|
8110
8517
|
shapeId?: string;
|
|
8518
|
+
/**
|
|
8519
|
+
* `p:control/@showAsIcon` (CT_Control, ECMA-376 S19.3.1.2): whether the
|
|
8520
|
+
* control renders as its static icon rather than its live appearance.
|
|
8521
|
+
* `undefined` when the source authored no explicit value (schema default
|
|
8522
|
+
* `false`).
|
|
8523
|
+
*/
|
|
8524
|
+
showAsIcon?: boolean;
|
|
8525
|
+
/**
|
|
8526
|
+
* `p:control/@imgW` in EMU (ST_PositiveCoordinate32): the width the host
|
|
8527
|
+
* reserves for the control's icon/preview image. Distinct from
|
|
8528
|
+
* {@link width}, which is the fallback `p:pic`'s own `a:ext/@cx` in px;
|
|
8529
|
+
* `imgW`/`imgH` are direct attributes on `p:control` itself.
|
|
8530
|
+
*/
|
|
8531
|
+
imgWidthEmu?: number;
|
|
8532
|
+
/** `p:control/@imgH` in EMU (ST_PositiveCoordinate32). @see imgWidthEmu */
|
|
8533
|
+
imgHeightEmu?: number;
|
|
8111
8534
|
/** X position (px) of the control's fallback picture, if present. */
|
|
8112
8535
|
x?: number;
|
|
8113
8536
|
/** Y position (px) of the control's fallback picture, if present. */
|
|
@@ -8564,6 +8987,34 @@ interface PptxPhotoAlbum {
|
|
|
8564
8987
|
layout?: string;
|
|
8565
8988
|
/** Frame style applied to each photo (e.g. "frameStyle1"). */
|
|
8566
8989
|
frame?: string;
|
|
8990
|
+
/**
|
|
8991
|
+
* `p:photoAlbum/@isPhoto` (ECMA-376 S19.2.1.27, CT_PhotoAlbum): whether
|
|
8992
|
+
* the pictures placed by the album wizard are real photographs, as
|
|
8993
|
+
* opposed to clip art or other embedded images. `undefined` when the
|
|
8994
|
+
* source authored no explicit value (schema default `false`); this is a
|
|
8995
|
+
* purely declarative wizard-provenance flag, not something this library
|
|
8996
|
+
* gates any layout/frame behaviour on.
|
|
8997
|
+
*/
|
|
8998
|
+
isPhoto?: boolean;
|
|
8999
|
+
}
|
|
9000
|
+
/**
|
|
9001
|
+
* A recognizer-owned `p:smartTags` reference from `presentation.xml`
|
|
9002
|
+
* (CT_SmartTags, ECMA-376 S19.2.1.42): a bare relationship id pointing at a
|
|
9003
|
+
* legacy Office "Smart Tags" recognizer part, distinct from the
|
|
9004
|
+
* user-authored `p:tags` construct (see {@link PptxTagCollection}).
|
|
9005
|
+
*
|
|
9006
|
+
* This library has no data model for recognizer part CONTENT (there is no
|
|
9007
|
+
* way to create, inspect, or edit one through the public API), so this type
|
|
9008
|
+
* only captures enough to preserve an authored reference losslessly: the
|
|
9009
|
+
* relationship id and, when resolvable, the target part path.
|
|
9010
|
+
*/
|
|
9011
|
+
interface PptxSmartTagsReference {
|
|
9012
|
+
/** Relationship id from `p:smartTags/@r:id`. */
|
|
9013
|
+
relId: string;
|
|
9014
|
+
/** Resolved ZIP path of the referenced recognizer part, when resolvable. */
|
|
9015
|
+
targetPath?: string;
|
|
9016
|
+
/** Raw `p:smartTags` XML retained for lossless round-trip. */
|
|
9017
|
+
rawXml?: XmlObject;
|
|
8567
9018
|
}
|
|
8568
9019
|
/**
|
|
8569
9020
|
* East Asian line-break (kinsoku) settings from `p:kinsoku` in `presentation.xml`.
|
|
@@ -8628,6 +9079,13 @@ interface PptxData {
|
|
|
8628
9079
|
themeOptions?: PptxThemeOption[];
|
|
8629
9080
|
/** Parsed table style definitions from `ppt/tableStyles.xml`. */
|
|
8630
9081
|
tableStyleMap?: ParsedTableStyleMap;
|
|
9082
|
+
/**
|
|
9083
|
+
* The current default table style GUID (`ppt/tableStyles.xml`'s
|
|
9084
|
+
* `a:tblStyleLst/@def`): the style PowerPoint applies to a newly inserted
|
|
9085
|
+
* table. Matches `PptxSaveOptions.tableStylesDefaultId` so a save call
|
|
9086
|
+
* that omits it can fall back to what was loaded.
|
|
9087
|
+
*/
|
|
9088
|
+
tableStylesDefaultId?: string;
|
|
8631
9089
|
/** Whether the presentation is password-protected. */
|
|
8632
9090
|
isPasswordProtected?: boolean;
|
|
8633
9091
|
/** Embedded font data (name + binary data URL) extracted from the presentation. */
|
|
@@ -8687,6 +9145,14 @@ interface PptxData {
|
|
|
8687
9145
|
modifyVerifier?: PptxModifyVerifier;
|
|
8688
9146
|
/** Photo album metadata from `p:photoAlbum` in `presentation.xml`. */
|
|
8689
9147
|
photoAlbum?: PptxPhotoAlbum;
|
|
9148
|
+
/**
|
|
9149
|
+
* Legacy Smart Tags recognizer reference from `p:smartTags` in
|
|
9150
|
+
* `presentation.xml`. Read-only: there is no data model for the
|
|
9151
|
+
* recognizer part's own content, so this exists to make the reference
|
|
9152
|
+
* inspectable and to prove it survives a save (the owning part and its
|
|
9153
|
+
* relationship are preserved passively, like any other unmodelled part).
|
|
9154
|
+
*/
|
|
9155
|
+
smartTags?: PptxSmartTagsReference;
|
|
8690
9156
|
/** East Asian line-break settings from `p:kinsoku` in `presentation.xml`. */
|
|
8691
9157
|
kinsoku?: PptxKinsoku;
|
|
8692
9158
|
/** Custom XML data parts from `customXml/` in the OPC package. */
|
|
@@ -8851,6 +9317,14 @@ type FillInput = {
|
|
|
8851
9317
|
type: 'solid';
|
|
8852
9318
|
color: string;
|
|
8853
9319
|
opacity?: number;
|
|
9320
|
+
/**
|
|
9321
|
+
* A theme colour to use instead of a plain hex. When set, the shape
|
|
9322
|
+
* saves as `<a:schemeClr>` (e.g. `{ scheme: 'accent1', lumMod: 0.8 }`
|
|
9323
|
+
* for "Accent 1, Lighter 80%") so it keeps following the theme after a
|
|
9324
|
+
* later theme change; `color` still supplies the immediate resolved
|
|
9325
|
+
* hex for renderers that read it directly.
|
|
9326
|
+
*/
|
|
9327
|
+
themeColorRef?: PptxThemeColorRef;
|
|
8854
9328
|
} | {
|
|
8855
9329
|
type: 'gradient';
|
|
8856
9330
|
/**
|
|
@@ -8886,6 +9360,8 @@ interface StrokeInput {
|
|
|
8886
9360
|
opacity?: number;
|
|
8887
9361
|
join?: 'round' | 'bevel' | 'miter';
|
|
8888
9362
|
cap?: 'flat' | 'rnd' | 'sq';
|
|
9363
|
+
/** A theme colour for the outline; see {@link FillInput}'s `themeColorRef`. */
|
|
9364
|
+
themeColorRef?: PptxThemeColorRef;
|
|
8889
9365
|
}
|
|
8890
9366
|
interface ShadowInput {
|
|
8891
9367
|
color?: string;
|
|
@@ -8902,6 +9378,8 @@ interface TextStyleInput {
|
|
|
8902
9378
|
underline?: boolean;
|
|
8903
9379
|
strikethrough?: boolean;
|
|
8904
9380
|
color?: string;
|
|
9381
|
+
/** A theme colour for the run; see {@link FillInput}'s `themeColorRef`. */
|
|
9382
|
+
themeColorRef?: PptxThemeColorRef;
|
|
8905
9383
|
alignment?: 'left' | 'center' | 'right' | 'justify';
|
|
8906
9384
|
verticalAlignment?: 'top' | 'middle' | 'bottom';
|
|
8907
9385
|
lineSpacing?: number;
|
|
@@ -9529,6 +10007,24 @@ interface PptxHandlerSaveOptions {
|
|
|
9529
10007
|
* part untouched.
|
|
9530
10008
|
*/
|
|
9531
10009
|
tableStyles?: ParsedTableStyleMap;
|
|
10010
|
+
/**
|
|
10011
|
+
* Set `ppt/tableStyles.xml`'s `<a:tblStyleLst @def>` to this style GUID
|
|
10012
|
+
* (normalised to uppercase-with-braces). `undefined` preserves the
|
|
10013
|
+
* existing default; there is no removal form (`@def` is required by the
|
|
10014
|
+
* schema and PowerPoint always points it at a real style). No-op when the
|
|
10015
|
+
* archive has no `ppt/tableStyles.xml`, same as {@link tableStyles}.
|
|
10016
|
+
*/
|
|
10017
|
+
tableStylesDefaultId?: string;
|
|
10018
|
+
/**
|
|
10019
|
+
* Style GUIDs to remove from `ppt/tableStyles.xml` entirely, kept as a
|
|
10020
|
+
* separate opt-in list rather than inferred from omission on
|
|
10021
|
+
* {@link tableStyles}: that map is documented as safe to pass a PARTIAL
|
|
10022
|
+
* edit (only the entries a caller actually touched), so treating every
|
|
10023
|
+
* GUID missing from it as "delete this" would silently destroy untouched
|
|
10024
|
+
* styles on an ordinary targeted edit. A GUID here that is also the
|
|
10025
|
+
* current (or newly requested) default is left in place and skipped.
|
|
10026
|
+
*/
|
|
10027
|
+
tableStylesToDelete?: string[];
|
|
9532
10028
|
/**
|
|
9533
10029
|
* Target output format.
|
|
9534
10030
|
* - `'pptx'` (default): Standard presentation.
|
|
@@ -10412,6 +10908,23 @@ interface CollaborationConfig {
|
|
|
10412
10908
|
*/
|
|
10413
10909
|
writeBackDebounceMs?: number;
|
|
10414
10910
|
}
|
|
10911
|
+
//#endregion
|
|
10912
|
+
//#region src/render/animation-text-style-resolve.d.ts
|
|
10913
|
+
/**
|
|
10914
|
+
* Framework-neutral text-style override a font-style emphasis effect applies
|
|
10915
|
+
* on top of its target's own authored per-run bold/italic/underline/size/
|
|
10916
|
+
* colour. Every binding maps this onto its own text container so it OVERRIDES
|
|
10917
|
+
* the runs' inline styles (the runs carry explicit inline styles of their
|
|
10918
|
+
* own, so plain CSS inheritance cannot reach them).
|
|
10919
|
+
*/
|
|
10920
|
+
interface TextStyleAnimationDescriptor {
|
|
10921
|
+
bold?: boolean;
|
|
10922
|
+
italic?: boolean;
|
|
10923
|
+
underline?: boolean;
|
|
10924
|
+
/** Relative multiplier against each run's own authored font size. */
|
|
10925
|
+
fontScale?: number;
|
|
10926
|
+
color?: string;
|
|
10927
|
+
}
|
|
10415
10928
|
/**
|
|
10416
10929
|
* Normalized staged-reveal mode for a chart graphic frame, derived from the
|
|
10417
10930
|
* OOXML `a:bldChart/@bld` (or `p:bldOleChart/@bld`) token:
|
|
@@ -10467,6 +10980,27 @@ interface ChartRevealDescriptor {
|
|
|
10467
10980
|
/** Individual cells revealed by a `bldStep="seriesEl"`/`"categoryEl"` effect. */
|
|
10468
10981
|
points: readonly ChartRevealPoint[];
|
|
10469
10982
|
}
|
|
10983
|
+
/**
|
|
10984
|
+
* Playback-time SmartArt diagram reveal state derived from AUTHORED
|
|
10985
|
+
* `p:graphicEl/p:dgm/@id` indices (see `diagram-reveal-descriptor`'s
|
|
10986
|
+
* `resolveDiagramRevealDescriptor`), rather than from click-count/time
|
|
10987
|
+
* progress. Present on {@link ElementAnimationState.diagramReveal} only when
|
|
10988
|
+
* every fired diagram-build step for the element carried `p:graphicEl` data.
|
|
10989
|
+
* A SmartArt renderer prefers this over the progress-based `build` /
|
|
10990
|
+
* {@link ElementBuildState} path when present, since it reflects the real
|
|
10991
|
+
* authored reveal set (correct even for a reversed-order or by-branch build),
|
|
10992
|
+
* and falls back to `build` when absent.
|
|
10993
|
+
*/
|
|
10994
|
+
interface DiagramRevealDescriptor {
|
|
10995
|
+
/**
|
|
10996
|
+
* Whether the diagram's background/connector chrome should currently be
|
|
10997
|
+
* visible: `true` once any node-revealing or background-revealing
|
|
10998
|
+
* (`bldStep="bg"`) step has fired.
|
|
10999
|
+
*/
|
|
11000
|
+
background: boolean;
|
|
11001
|
+
/** Data-model point ids (`PptxSmartArtNode.id`) revealed so far. */
|
|
11002
|
+
nodeIds: ReadonlySet<string>;
|
|
11003
|
+
}
|
|
10470
11004
|
/**
|
|
10471
11005
|
* Playback-time staged-build state surfaced on {@link ElementAnimationState}.
|
|
10472
11006
|
* `progress` is the 0..1 fraction of the build revealed at the current playback
|
|
@@ -10507,6 +11041,17 @@ interface ElementAnimationState {
|
|
|
10507
11041
|
mode: ChartBuildMode;
|
|
10508
11042
|
descriptor: ChartRevealDescriptor;
|
|
10509
11043
|
};
|
|
11044
|
+
/**
|
|
11045
|
+
* Authored-index SmartArt diagram reveal state (see
|
|
11046
|
+
* {@link DiagramRevealDescriptor}), present only when every fired
|
|
11047
|
+
* diagram-build step for this element carried `p:graphicEl` node-id data.
|
|
11048
|
+
* `diagram-build`'s `resolveRevealedSmartArtNodes` prefers this over `build`
|
|
11049
|
+
* when present.
|
|
11050
|
+
*/
|
|
11051
|
+
diagramReveal?: {
|
|
11052
|
+
mode: DiagramBuildMode;
|
|
11053
|
+
descriptor: DiagramRevealDescriptor;
|
|
11054
|
+
};
|
|
10510
11055
|
/**
|
|
10511
11056
|
* True when an active `p:animClr` color animation targets this shape's fill.
|
|
10512
11057
|
* A vector renderer should then paint the fill with `fill: inherit` so the
|
|
@@ -10520,6 +11065,18 @@ interface ElementAnimationState {
|
|
|
10520
11065
|
* `stroke: inherit`. Absent/false means no active stroke-colour animation.
|
|
10521
11066
|
*/
|
|
10522
11067
|
animatesStroke?: boolean;
|
|
11068
|
+
/**
|
|
11069
|
+
* Active discrete font-style / colour / size override (see
|
|
11070
|
+
* {@link TimelineStep.textStyle}) a font-style emphasis effect currently
|
|
11071
|
+
* applies to this element's text, OVERRIDING the runs' own inline
|
|
11072
|
+
* bold/italic/underline/size/colour. `animation-playback-engine.ts` writes
|
|
11073
|
+
* this on step start and again on cleanup (held in full when the effect's
|
|
11074
|
+
* `p:cTn/@fill` holds its end state, otherwise reverted); a text renderer
|
|
11075
|
+
* maps it onto its run markup via `buildTextStyleOverrideCss`
|
|
11076
|
+
* (`animation-text-style-css.ts`). Absent means no font-style emphasis
|
|
11077
|
+
* effect is currently active on this element.
|
|
11078
|
+
*/
|
|
11079
|
+
textStyle?: TextStyleAnimationDescriptor;
|
|
10523
11080
|
}
|
|
10524
11081
|
//#endregion
|
|
10525
11082
|
//#region src/render/motion-path-authoring.d.ts
|
|
@@ -12483,6 +13040,15 @@ interface UseYjsDocumentSyncInput {
|
|
|
12483
13040
|
* when role === 'owner' and onWriteBack is set.
|
|
12484
13041
|
*/
|
|
12485
13042
|
getSourceBytes?: () => Uint8Array | null;
|
|
13043
|
+
/**
|
|
13044
|
+
* Session-level save options (view properties, table styles, tags, deck
|
|
13045
|
+
* properties, ...), built the same way as the Save/Export path
|
|
13046
|
+
* (`buildDeckSaveOptions` in `pptx-viewer-shared`). Without this the
|
|
13047
|
+
* write-back reloaded the source bytes and called `handler.save(slides)`
|
|
13048
|
+
* with NO options, so an owner's write-back file dropped every
|
|
13049
|
+
* session-level edit that lives outside `slides`.
|
|
13050
|
+
*/
|
|
13051
|
+
getSaveOptions?: () => PptxHandlerSaveOptions;
|
|
12486
13052
|
/**
|
|
12487
13053
|
* Monotonic counter bumped each time the content-load pipeline finishes
|
|
12488
13054
|
* applying a parsed deck to viewer state. A local load that lands while the
|
|
@@ -12499,7 +13065,7 @@ interface UseYjsDocumentSyncInput {
|
|
|
12499
13065
|
*/
|
|
12500
13066
|
loadOrigin?: CollabLoadOrigin;
|
|
12501
13067
|
}
|
|
12502
|
-
declare function useYjsDocumentSync({ doc, slides, templateElementsBySlideId, setSlides, isConnected, isSynced, config, getSourceBytes, loadVersion, loadOrigin }: UseYjsDocumentSyncInput): void;
|
|
13068
|
+
declare function useYjsDocumentSync({ doc, slides, templateElementsBySlideId, setSlides, isConnected, isSynced, config, getSourceBytes, getSaveOptions, loadVersion, loadOrigin }: UseYjsDocumentSyncInput): void;
|
|
12503
13069
|
//#endregion
|
|
12504
13070
|
//#region src/viewer/hooks/collaboration/useBroadcastFollower.d.ts
|
|
12505
13071
|
interface UseBroadcastFollowerInput {
|
|
@@ -13201,6 +13767,16 @@ interface ViewerCoreState {
|
|
|
13201
13767
|
/** Parsed table style definitions from `ppt/tableStyles.xml`. */
|
|
13202
13768
|
tableStyleMap: ParsedTableStyleMap | undefined;
|
|
13203
13769
|
setTableStyleMap: React$1.Dispatch<React$1.SetStateAction<ParsedTableStyleMap | undefined>>;
|
|
13770
|
+
/** `ppt/tableStyles.xml`'s `<a:tblStyleLst @def>` default style GUID. */
|
|
13771
|
+
tableStylesDefaultId: string | undefined;
|
|
13772
|
+
setTableStylesDefaultId: React$1.Dispatch<React$1.SetStateAction<string | undefined>>;
|
|
13773
|
+
/**
|
|
13774
|
+
* Style GUIDs deleted from `tableStyleMap` via the table style editor,
|
|
13775
|
+
* pending removal from `ppt/tableStyles.xml` on the next save. See
|
|
13776
|
+
* `tableStyleSaveOptions` / `applyTableStyleDelete` in `pptx-viewer-shared`.
|
|
13777
|
+
*/
|
|
13778
|
+
tableStylesToDelete: string[];
|
|
13779
|
+
setTableStylesToDelete: React$1.Dispatch<React$1.SetStateAction<string[]>>;
|
|
13204
13780
|
/** Available theme presets the user can switch between. */
|
|
13205
13781
|
themeOptions: PptxThemeOption[];
|
|
13206
13782
|
setThemeOptions: React$1.Dispatch<React$1.SetStateAction<PptxThemeOption[]>>;
|
|
@@ -13450,6 +14026,8 @@ interface UseLoadContentInput {
|
|
|
13450
14026
|
setRecentColors: React.Dispatch<React.SetStateAction<string[]>>;
|
|
13451
14027
|
setTheme: React.Dispatch<React.SetStateAction<PptxTheme | undefined>>;
|
|
13452
14028
|
setTableStyleMap: React.Dispatch<React.SetStateAction<ParsedTableStyleMap | undefined>>;
|
|
14029
|
+
setTableStylesDefaultId: React.Dispatch<React.SetStateAction<string | undefined>>;
|
|
14030
|
+
setTableStylesToDelete: React.Dispatch<React.SetStateAction<string[]>>;
|
|
13453
14031
|
setThemeOptions: React.Dispatch<React.SetStateAction<PptxThemeOption[]>>;
|
|
13454
14032
|
setCustomShows: React.Dispatch<React.SetStateAction<PptxCustomShow[]>>;
|
|
13455
14033
|
/**
|
|
@@ -13503,7 +14081,7 @@ interface UseLoadContentInput {
|
|
|
13503
14081
|
interface UseLoadContentResult {
|
|
13504
14082
|
handlerRef: React.MutableRefObject<PptxHandler | null>;
|
|
13505
14083
|
}
|
|
13506
|
-
declare function useLoadContent({ content, clearSelection, history, setSlides, setTemplateElementsBySlideId, mediaDataUrls, setCanvasSize, setSlideSizeEmu, setHeaderFooter, setLayoutOptions, setSlideMasters, setModernCommentAuthors, setRecentColors, setTheme, setTableStyleMap, setThemeOptions, setCustomShows, setActiveCustomShowId, setSections, setPresentationProperties, setViewProperties, setNotesMaster, setHandoutMaster, setNotesCanvasSize, setCustomProperties, setTagCollections, setCoreProperties, setAppProperties, setEmbeddedFonts, setActiveSlideIndex, setHasMacros, setHasDigitalSignatures, setDigitalSignatureCount, setGuides, setReadOnlyRecommendation, setCompatToasts, setLoading, setError, setIsDirty, setIsEncrypted, onContentApplied, allowExternalImages }: UseLoadContentInput): UseLoadContentResult;
|
|
14084
|
+
declare function useLoadContent({ content, clearSelection, history, setSlides, setTemplateElementsBySlideId, mediaDataUrls, setCanvasSize, setSlideSizeEmu, setHeaderFooter, setLayoutOptions, setSlideMasters, setModernCommentAuthors, setRecentColors, setTheme, setTableStyleMap, setTableStylesDefaultId, setTableStylesToDelete, setThemeOptions, setCustomShows, setActiveCustomShowId, setSections, setPresentationProperties, setViewProperties, setNotesMaster, setHandoutMaster, setNotesCanvasSize, setCustomProperties, setTagCollections, setCoreProperties, setAppProperties, setEmbeddedFonts, setActiveSlideIndex, setHasMacros, setHasDigitalSignatures, setDigitalSignatureCount, setGuides, setReadOnlyRecommendation, setCompatToasts, setLoading, setError, setIsDirty, setIsEncrypted, onContentApplied, allowExternalImages }: UseLoadContentInput): UseLoadContentResult;
|
|
13507
14085
|
//#endregion
|
|
13508
14086
|
//#region src/viewer/hooks/useElementOperations.d.ts
|
|
13509
14087
|
/**
|
|
@@ -13914,6 +14492,105 @@ type TableOperationHandlers = TableStructHandlers & TableMergeHandlers;
|
|
|
13914
14492
|
//#region src/viewer/hooks/useTableOperations.d.ts
|
|
13915
14493
|
declare function useTableOperations(input: UseTableOperationsInput): TableOperationHandlers;
|
|
13916
14494
|
//#endregion
|
|
14495
|
+
//#region src/viewer/hooks/useSerialize.d.ts
|
|
14496
|
+
interface UseSerializeInput {
|
|
14497
|
+
slides: PptxSlide[];
|
|
14498
|
+
/** Separated master/layout (template) elements, merged back at save time. */
|
|
14499
|
+
templateElementsBySlideId: Record<string, PptxElement[]>;
|
|
14500
|
+
activeSlideIndex: number;
|
|
14501
|
+
/** The pixel canvas the raw Slide Size W/H inputs edit. */
|
|
14502
|
+
canvasSize: CanvasSize;
|
|
14503
|
+
/**
|
|
14504
|
+
* The EMU `p:sldSz` the viewer is holding (seeded on load, replaced by a
|
|
14505
|
+
* preset/orientation pick). Passed with `canvasSize` to
|
|
14506
|
+
* `resolveSlideSizeSelection`, which keeps the EMU whenever the two still
|
|
14507
|
+
* agree so a preset survives the save, and takes the pixels when the user
|
|
14508
|
+
* has typed into the raw inputs.
|
|
14509
|
+
*/
|
|
14510
|
+
slideSizeEmu?: SlideSizeEmu | undefined;
|
|
14511
|
+
guides: Array<{
|
|
14512
|
+
id: string;
|
|
14513
|
+
axis: 'h' | 'v';
|
|
14514
|
+
position: number;
|
|
14515
|
+
}>;
|
|
14516
|
+
headerFooter: PptxHeaderFooter;
|
|
14517
|
+
presentationProperties: PptxPresentationProperties;
|
|
14518
|
+
/**
|
|
14519
|
+
* `ppt/viewProps.xml` (grid/snap/guides toggles, grid spacing). Optional so
|
|
14520
|
+
* existing callers/tests that construct this input directly keep compiling;
|
|
14521
|
+
* omitting it (or passing `undefined`) reproduces the PRE-EXISTING bug this
|
|
14522
|
+
* field fixes: core falls back to `this.loadedViewProperties` (the file as
|
|
14523
|
+
* it was FIRST opened) whenever the caller does not pass `viewProperties`
|
|
14524
|
+
* explicitly, so every session change to the View-ribbon toggles was
|
|
14525
|
+
* silently dropped. `useContentLifecycle` always passes `state.viewProperties`.
|
|
14526
|
+
*/
|
|
14527
|
+
viewProperties?: PptxViewProperties | undefined;
|
|
14528
|
+
/** Parsed `ppt/tableStyles.xml` map, edited via the table style editor. */
|
|
14529
|
+
tableStyleMap?: ParsedTableStyleMap | undefined;
|
|
14530
|
+
/** `<a:tblStyleLst @def>` default style GUID. */
|
|
14531
|
+
tableStylesDefaultId?: string | undefined;
|
|
14532
|
+
/** Style GUIDs deleted via the table style editor, pending removal on save. */
|
|
14533
|
+
tableStylesToDelete?: string[];
|
|
14534
|
+
customShows: Array<{
|
|
14535
|
+
id: string;
|
|
14536
|
+
name: string;
|
|
14537
|
+
slideRIds: string[];
|
|
14538
|
+
}>;
|
|
14539
|
+
sections: PptxSection[];
|
|
14540
|
+
coreProperties: PptxCoreProperties | undefined;
|
|
14541
|
+
appProperties: PptxAppProperties | undefined;
|
|
14542
|
+
customProperties: PptxCustomProperty[];
|
|
14543
|
+
tagCollections: PptxTagCollection[];
|
|
14544
|
+
/**
|
|
14545
|
+
* The slide masters and their layouts, as View > Slide Master left them.
|
|
14546
|
+
*
|
|
14547
|
+
* Required, not optional: this was the one save option React never passed,
|
|
14548
|
+
* and core rewrites a master or layout part only for the ones the caller
|
|
14549
|
+
* hands back. Every master-view edit therefore showed on screen and was
|
|
14550
|
+
* dropped by the save - a deleted master shape came back on reload, and a
|
|
14551
|
+
* master background reverted to white. The other four bindings pass it.
|
|
14552
|
+
* Core compares each part against the element list parsed at load and
|
|
14553
|
+
* rewrites only what actually changed, so passing the whole array on every
|
|
14554
|
+
* save costs an untouched deck nothing.
|
|
14555
|
+
*/
|
|
14556
|
+
slideMasters: PptxSlideMaster[];
|
|
14557
|
+
notesMaster: PptxNotesMaster | undefined;
|
|
14558
|
+
handoutMaster: PptxHandoutMaster | undefined;
|
|
14559
|
+
handlerRef: React$1.RefObject<PptxHandler | null>;
|
|
14560
|
+
inlineEditingElementIdRef: React$1.MutableRefObject<string | null>;
|
|
14561
|
+
inlineEditingTextRef: React$1.MutableRefObject<string>;
|
|
14562
|
+
password?: string;
|
|
14563
|
+
/**
|
|
14564
|
+
* File > Fonts > "Embed fonts in the file". `false` passes
|
|
14565
|
+
* `embeddedFontList: null`, which strips `p:embeddedFontLst`, the `/font`
|
|
14566
|
+
* relationships and the `.fntdata` parts; `true` (the default) leaves core to
|
|
14567
|
+
* re-embed whatever the deck arrived with. Before this the toggle reached no
|
|
14568
|
+
* save call at all and the saved bytes were identical either way.
|
|
14569
|
+
*/
|
|
14570
|
+
embedFonts?: boolean;
|
|
14571
|
+
/**
|
|
14572
|
+
* Why these bytes are being produced. Defaults to `'user-file'` (Save, Save
|
|
14573
|
+
* As, Export, the imperative `getContent()`), which honours `password`.
|
|
14574
|
+
* `'recovery-snapshot'` is for bytes the viewer reads back itself - the
|
|
14575
|
+
* autosave snapshot and the re-serialise-then-reload cycle - and is always
|
|
14576
|
+
* plaintext, because nothing on the way back in can supply the password.
|
|
14577
|
+
* See `deck-save-encryption` in `pptx-viewer-shared` for the full rationale
|
|
14578
|
+
* and the privacy tradeoff it accepts.
|
|
14579
|
+
*/
|
|
14580
|
+
purpose?: DeckSavePurpose;
|
|
14581
|
+
}
|
|
14582
|
+
/**
|
|
14583
|
+
* Serialise the live deck. `format` is the container to write (`pptx` when
|
|
14584
|
+
* omitted; `ppsx`/`pptm`/... for Save As). Every save path in the binding
|
|
14585
|
+
* (Save, Save As, `getContent()`, autosave, the theme-apply round trip) goes
|
|
14586
|
+
* through this ONE function so they cannot drift: Save As used to hand-build
|
|
14587
|
+
* its own options object and left out `viewProperties`, the table-style map
|
|
14588
|
+
* and `embedFonts`, so a table style edited in the inspector reached the
|
|
14589
|
+
* imperative `getContent()` bytes and NOT the file the user downloaded.
|
|
14590
|
+
*/
|
|
14591
|
+
type SerializeSlides = (format?: PptxSaveFormat) => Promise<Uint8Array | null>;
|
|
14592
|
+
declare function useSerialize(input: UseSerializeInput): SerializeSlides;
|
|
14593
|
+
//#endregion
|
|
13917
14594
|
//#region src/viewer/hooks/export-handler-types.d.ts
|
|
13918
14595
|
interface UseExportHandlersInput {
|
|
13919
14596
|
slides: PptxSlide[];
|
|
@@ -13924,46 +14601,33 @@ interface UseExportHandlersInput {
|
|
|
13924
14601
|
filePath: string | undefined;
|
|
13925
14602
|
canvasStageRef: RefObject<HTMLDivElement | null>;
|
|
13926
14603
|
setActiveSlideIndex: Dispatch<SetStateAction<number>>;
|
|
13927
|
-
|
|
13928
|
-
|
|
13929
|
-
|
|
13930
|
-
|
|
14604
|
+
/**
|
|
14605
|
+
* The binding's one user-facing serialiser (`useSerialize`), which Save As
|
|
14606
|
+
* calls with the chosen output format. Save As no longer assembles its own
|
|
14607
|
+
* save options, so it cannot drift from Save again.
|
|
14608
|
+
*/
|
|
14609
|
+
serializeSlides: SerializeSlides;
|
|
14610
|
+
/** Presentation-level state carried into the deck-JSON export document. */
|
|
14611
|
+
headerFooter: PptxHeaderFooter;
|
|
14612
|
+
presentationProperties: PptxPresentationProperties;
|
|
13931
14613
|
customShows: Array<{
|
|
13932
14614
|
id: string;
|
|
13933
14615
|
name: string;
|
|
13934
14616
|
slideRIds: string[];
|
|
13935
14617
|
}>;
|
|
13936
|
-
sections:
|
|
13937
|
-
|
|
13938
|
-
|
|
13939
|
-
|
|
13940
|
-
|
|
13941
|
-
|
|
13942
|
-
|
|
13943
|
-
appProperties: Record<string, unknown> | null;
|
|
13944
|
-
customProperties: Array<Record<string, unknown>>;
|
|
13945
|
-
tagCollections: Array<Record<string, unknown>>;
|
|
13946
|
-
/** The slide masters and their layouts; see `UseExportSaveAsInput`. */
|
|
13947
|
-
slideMasters: PptxSlideMaster[];
|
|
13948
|
-
notesMaster: Record<string, unknown> | undefined;
|
|
13949
|
-
handoutMaster: Record<string, unknown> | undefined;
|
|
13950
|
-
guides: Array<{
|
|
13951
|
-
id: string;
|
|
13952
|
-
axis: 'h' | 'v';
|
|
13953
|
-
position: number;
|
|
13954
|
-
}>;
|
|
13955
|
-
activeSlideIndexForGuides: number;
|
|
14618
|
+
sections: PptxSection[];
|
|
14619
|
+
coreProperties: PptxCoreProperties | undefined;
|
|
14620
|
+
appProperties: PptxAppProperties | undefined;
|
|
14621
|
+
customProperties: PptxCustomProperty[];
|
|
14622
|
+
tagCollections: PptxTagCollection[];
|
|
14623
|
+
notesMaster: PptxNotesMaster | undefined;
|
|
14624
|
+
handoutMaster: PptxHandoutMaster | undefined;
|
|
13956
14625
|
/** Live theme, carried into the deck-JSON export document. */
|
|
13957
14626
|
theme: PptxTheme | undefined;
|
|
13958
14627
|
/** Slide canvas size in CSS pixels, carried into the deck-JSON export. */
|
|
13959
14628
|
canvasSize: CanvasSize;
|
|
13960
|
-
/**
|
|
13961
|
-
* The EMU `p:sldSz` the viewer holds. Save-As builds its own save options
|
|
13962
|
-
* rather than reusing `useSerialize`, so without this a Slide Size edit
|
|
13963
|
-
* reached Save and not Save As (or the backstage Save, which routes here).
|
|
13964
|
-
*/
|
|
14629
|
+
/** The EMU `p:sldSz` the viewer holds, for the deck-JSON export's slide size. */
|
|
13965
14630
|
slideSizeEmu?: SlideSizeEmu | undefined;
|
|
13966
|
-
password?: string;
|
|
13967
14631
|
/**
|
|
13968
14632
|
* File > Options > Advanced > "Image Size and Quality"
|
|
13969
14633
|
* (`resolveImageResolutionScale`), the raster-scale multiplier for PNG/PDF
|
|
@@ -14357,89 +15021,6 @@ interface AnnotationHandlersResult {
|
|
|
14357
15021
|
}
|
|
14358
15022
|
declare function useAnnotationHandlers(input: UseAnnotationHandlersInput): AnnotationHandlersResult;
|
|
14359
15023
|
//#endregion
|
|
14360
|
-
//#region src/viewer/hooks/useSerialize.d.ts
|
|
14361
|
-
interface UseSerializeInput {
|
|
14362
|
-
slides: PptxSlide[];
|
|
14363
|
-
/** Separated master/layout (template) elements, merged back at save time. */
|
|
14364
|
-
templateElementsBySlideId: Record<string, PptxElement[]>;
|
|
14365
|
-
activeSlideIndex: number;
|
|
14366
|
-
/** The pixel canvas the raw Slide Size W/H inputs edit. */
|
|
14367
|
-
canvasSize: CanvasSize;
|
|
14368
|
-
/**
|
|
14369
|
-
* The EMU `p:sldSz` the viewer is holding (seeded on load, replaced by a
|
|
14370
|
-
* preset/orientation pick). Passed with `canvasSize` to
|
|
14371
|
-
* `resolveSlideSizeSelection`, which keeps the EMU whenever the two still
|
|
14372
|
-
* agree so a preset survives the save, and takes the pixels when the user
|
|
14373
|
-
* has typed into the raw inputs.
|
|
14374
|
-
*/
|
|
14375
|
-
slideSizeEmu?: SlideSizeEmu | undefined;
|
|
14376
|
-
guides: Array<{
|
|
14377
|
-
id: string;
|
|
14378
|
-
axis: 'h' | 'v';
|
|
14379
|
-
position: number;
|
|
14380
|
-
}>;
|
|
14381
|
-
headerFooter: PptxHeaderFooter;
|
|
14382
|
-
presentationProperties: PptxPresentationProperties;
|
|
14383
|
-
/**
|
|
14384
|
-
* `ppt/viewProps.xml` (grid/snap/guides toggles, grid spacing). Optional so
|
|
14385
|
-
* existing callers/tests that construct this input directly keep compiling;
|
|
14386
|
-
* omitting it (or passing `undefined`) reproduces the PRE-EXISTING bug this
|
|
14387
|
-
* field fixes: core falls back to `this.loadedViewProperties` (the file as
|
|
14388
|
-
* it was FIRST opened) whenever the caller does not pass `viewProperties`
|
|
14389
|
-
* explicitly, so every session change to the View-ribbon toggles was
|
|
14390
|
-
* silently dropped. `useContentLifecycle` always passes `state.viewProperties`.
|
|
14391
|
-
*/
|
|
14392
|
-
viewProperties?: PptxViewProperties | undefined;
|
|
14393
|
-
customShows: Array<{
|
|
14394
|
-
id: string;
|
|
14395
|
-
name: string;
|
|
14396
|
-
slideRIds: string[];
|
|
14397
|
-
}>;
|
|
14398
|
-
sections: PptxSection[];
|
|
14399
|
-
coreProperties: PptxCoreProperties | undefined;
|
|
14400
|
-
appProperties: PptxAppProperties | undefined;
|
|
14401
|
-
customProperties: PptxCustomProperty[];
|
|
14402
|
-
tagCollections: PptxTagCollection[];
|
|
14403
|
-
/**
|
|
14404
|
-
* The slide masters and their layouts, as View > Slide Master left them.
|
|
14405
|
-
*
|
|
14406
|
-
* Required, not optional: this was the one save option React never passed,
|
|
14407
|
-
* and core rewrites a master or layout part only for the ones the caller
|
|
14408
|
-
* hands back. Every master-view edit therefore showed on screen and was
|
|
14409
|
-
* dropped by the save - a deleted master shape came back on reload, and a
|
|
14410
|
-
* master background reverted to white. The other four bindings pass it.
|
|
14411
|
-
* Core compares each part against the element list parsed at load and
|
|
14412
|
-
* rewrites only what actually changed, so passing the whole array on every
|
|
14413
|
-
* save costs an untouched deck nothing.
|
|
14414
|
-
*/
|
|
14415
|
-
slideMasters: PptxSlideMaster[];
|
|
14416
|
-
notesMaster: PptxNotesMaster | undefined;
|
|
14417
|
-
handoutMaster: PptxHandoutMaster | undefined;
|
|
14418
|
-
handlerRef: React$1.RefObject<PptxHandler | null>;
|
|
14419
|
-
inlineEditingElementIdRef: React$1.MutableRefObject<string | null>;
|
|
14420
|
-
inlineEditingTextRef: React$1.MutableRefObject<string>;
|
|
14421
|
-
password?: string;
|
|
14422
|
-
/**
|
|
14423
|
-
* File > Fonts > "Embed fonts in the file". `false` passes
|
|
14424
|
-
* `embeddedFontList: null`, which strips `p:embeddedFontLst`, the `/font`
|
|
14425
|
-
* relationships and the `.fntdata` parts; `true` (the default) leaves core to
|
|
14426
|
-
* re-embed whatever the deck arrived with. Before this the toggle reached no
|
|
14427
|
-
* save call at all and the saved bytes were identical either way.
|
|
14428
|
-
*/
|
|
14429
|
-
embedFonts?: boolean;
|
|
14430
|
-
/**
|
|
14431
|
-
* Why these bytes are being produced. Defaults to `'user-file'` (Save, Save
|
|
14432
|
-
* As, Export, the imperative `getContent()`), which honours `password`.
|
|
14433
|
-
* `'recovery-snapshot'` is for bytes the viewer reads back itself - the
|
|
14434
|
-
* autosave snapshot and the re-serialise-then-reload cycle - and is always
|
|
14435
|
-
* plaintext, because nothing on the way back in can supply the password.
|
|
14436
|
-
* See `deck-save-encryption` in `pptx-viewer-shared` for the full rationale
|
|
14437
|
-
* and the privacy tradeoff it accepts.
|
|
14438
|
-
*/
|
|
14439
|
-
purpose?: DeckSavePurpose;
|
|
14440
|
-
}
|
|
14441
|
-
declare function useSerialize(input: UseSerializeInput): () => Promise<Uint8Array | null>;
|
|
14442
|
-
//#endregion
|
|
14443
15024
|
//#region src/viewer/hooks/useRecoveryDetection.d.ts
|
|
14444
15025
|
interface UseRecoveryDetectionInput {
|
|
14445
15026
|
filePath: string | undefined;
|
|
@@ -14584,7 +15165,11 @@ interface UseIOHandlersInput {
|
|
|
14584
15165
|
canvasStageRef: React$1.RefObject<HTMLDivElement | null>;
|
|
14585
15166
|
};
|
|
14586
15167
|
handlerRef: React$1.RefObject<PptxHandler | null>;
|
|
14587
|
-
|
|
15168
|
+
/**
|
|
15169
|
+
* The one user-facing serialiser (`useSerialize`). Save As passes it the
|
|
15170
|
+
* output format, so the downloaded file carries every save option Save does.
|
|
15171
|
+
*/
|
|
15172
|
+
serializeSlides: SerializeSlides;
|
|
14588
15173
|
/**
|
|
14589
15174
|
* Plaintext serialisation for bytes the viewer feeds straight back into its
|
|
14590
15175
|
* own loader. "Apply theme" does exactly that, and the loader has no password
|
|
@@ -14593,7 +15178,6 @@ interface UseIOHandlersInput {
|
|
|
14593
15178
|
serializeForRecovery: () => Promise<Uint8Array | null>;
|
|
14594
15179
|
setContent: React$1.Dispatch<React$1.SetStateAction<ArrayBuffer | Uint8Array | null>>;
|
|
14595
15180
|
onContentChange: ((content: Uint8Array) => void) | undefined;
|
|
14596
|
-
password?: string;
|
|
14597
15181
|
/** File > Options > Advanced > "Image Size and Quality" raster-scale multiplier. */
|
|
14598
15182
|
imageExportScale?: number;
|
|
14599
15183
|
}
|
|
@@ -14644,8 +15228,11 @@ interface UseContentLifecycleInput {
|
|
|
14644
15228
|
}
|
|
14645
15229
|
interface ContentLifecycleResult {
|
|
14646
15230
|
handlerRef: React$1.RefObject<PptxHandler | null>;
|
|
14647
|
-
/**
|
|
14648
|
-
|
|
15231
|
+
/**
|
|
15232
|
+
* Serialise for the user: honours "Encrypt with Password". Takes the
|
|
15233
|
+
* optional output container (`ppsx`/`pptm`/...) so Save As shares it.
|
|
15234
|
+
*/
|
|
15235
|
+
serializeSlides: SerializeSlides;
|
|
14649
15236
|
/**
|
|
14650
15237
|
* Serialise for bytes the viewer reads back itself (autosave snapshot,
|
|
14651
15238
|
* re-serialise-then-reload). Always plaintext, so recovery - which has no
|
|
@@ -15042,51 +15629,46 @@ interface UseDialogCustomShowsResult {
|
|
|
15042
15629
|
declare function useDialogCustomShows(input: UseDialogCustomShowsInput): UseDialogCustomShowsResult;
|
|
15043
15630
|
//#endregion
|
|
15044
15631
|
//#region src/viewer/hooks/useExportSaveAs.d.ts
|
|
15632
|
+
/**
|
|
15633
|
+
* useExportSaveAs: Save-As format handlers and the deck-JSON export.
|
|
15634
|
+
*
|
|
15635
|
+
* Save As is `useSerialize` with an output format. It used to assemble a
|
|
15636
|
+
* SECOND save-options object of its own, and every option added to
|
|
15637
|
+
* `useSerialize` afterwards (`viewProperties`, the table-style map and its
|
|
15638
|
+
* default id / deletions, `embedFonts`) was missing from it: a table style
|
|
15639
|
+
* edited in the inspector reached `getContent()` and autosave, but the file
|
|
15640
|
+
* the backstage Save button downloaded came back with `ppt/tableStyles.xml`
|
|
15641
|
+
* byte-identical to the original. The other four bindings route the format
|
|
15642
|
+
* through their main builder; React now does too.
|
|
15643
|
+
*/
|
|
15045
15644
|
interface UseExportSaveAsInput {
|
|
15046
15645
|
slides: PptxSlide[];
|
|
15047
15646
|
/** Separated master/layout (template) elements, merged back at save time. */
|
|
15048
15647
|
templateElementsBySlideId: Record<string, PptxElement[]>;
|
|
15049
15648
|
filePath: string | undefined;
|
|
15050
|
-
|
|
15051
|
-
|
|
15052
|
-
|
|
15649
|
+
/** `useSerialize`'s callback: the one place save options are assembled. */
|
|
15650
|
+
serializeSlides: SerializeSlides;
|
|
15651
|
+
/** Presentation-level state, carried into the deck-JSON export document. */
|
|
15652
|
+
headerFooter: PptxHeaderFooter;
|
|
15653
|
+
presentationProperties: PptxPresentationProperties;
|
|
15053
15654
|
customShows: Array<{
|
|
15054
15655
|
id: string;
|
|
15055
15656
|
name: string;
|
|
15056
15657
|
slideRIds: string[];
|
|
15057
15658
|
}>;
|
|
15058
|
-
sections:
|
|
15059
|
-
|
|
15060
|
-
|
|
15061
|
-
|
|
15062
|
-
|
|
15063
|
-
|
|
15064
|
-
|
|
15065
|
-
appProperties: Record<string, unknown> | null;
|
|
15066
|
-
customProperties: Array<Record<string, unknown>>;
|
|
15067
|
-
tagCollections: Array<Record<string, unknown>>;
|
|
15068
|
-
/**
|
|
15069
|
-
* The slide masters and their layouts, as View > Slide Master left them.
|
|
15070
|
-
* Save As builds its own options rather than reusing `useSerialize`, so it
|
|
15071
|
-
* needs the same array: without it a master-view edit reached Save and not
|
|
15072
|
-
* Save As. (For a long while it reached neither.)
|
|
15073
|
-
*/
|
|
15074
|
-
slideMasters: PptxSlideMaster[];
|
|
15075
|
-
notesMaster: Record<string, unknown> | undefined;
|
|
15076
|
-
handoutMaster: Record<string, unknown> | undefined;
|
|
15077
|
-
guides: Array<{
|
|
15078
|
-
id: string;
|
|
15079
|
-
axis: 'h' | 'v';
|
|
15080
|
-
position: number;
|
|
15081
|
-
}>;
|
|
15082
|
-
activeSlideIndexForGuides: number;
|
|
15659
|
+
sections: PptxSection[];
|
|
15660
|
+
coreProperties: PptxCoreProperties | undefined;
|
|
15661
|
+
appProperties: PptxAppProperties | undefined;
|
|
15662
|
+
customProperties: PptxCustomProperty[];
|
|
15663
|
+
tagCollections: PptxTagCollection[];
|
|
15664
|
+
notesMaster: PptxNotesMaster | undefined;
|
|
15665
|
+
handoutMaster: PptxHandoutMaster | undefined;
|
|
15083
15666
|
/** Live theme, carried into the deck-JSON export document. */
|
|
15084
15667
|
theme: PptxTheme | undefined;
|
|
15085
15668
|
/** Slide canvas size in CSS pixels, carried into the deck-JSON export. */
|
|
15086
15669
|
canvasSize: CanvasSize;
|
|
15087
15670
|
/** The EMU `p:sldSz` the viewer holds; see `UseExportHandlersInput`. */
|
|
15088
15671
|
slideSizeEmu?: SlideSizeEmu | undefined;
|
|
15089
|
-
password?: string;
|
|
15090
15672
|
}
|
|
15091
15673
|
interface ExportSaveAsResult {
|
|
15092
15674
|
handleExportJson: () => void;
|