pptx-vanilla-viewer 2.5.5 → 2.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 +21 -0
- package/dist/ai-panel-AUEUQB4P.cjs +1 -0
- package/dist/{ai-panel-YY6YHKZ7.js → ai-panel-AUKGON6W.js} +1 -1
- package/dist/chunk-GH6VDNPP.js +2466 -0
- package/dist/chunk-HTQCNJMD.cjs +2466 -0
- package/dist/index.cjs +96 -89
- package/dist/index.d.ts +1048 -52
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +96 -89
- package/dist/styles.css +7 -0
- package/package.json +2 -2
- package/dist/ai-panel-ATH6XY6L.cjs +0 -1
- package/dist/chunk-3YE6EQJE.cjs +0 -2304
- package/dist/chunk-ABYL3YBM.js +0 -2304
package/dist/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import "jszip";
|
|
|
3
3
|
import { ChatTransport, LanguageModel, ToolSet, UIMessage } from "ai";
|
|
4
4
|
import "pptx-viewer-mcp";
|
|
5
5
|
import { Options } from "html2canvas-pro";
|
|
6
|
-
//#region ../core/dist/text-operations-
|
|
6
|
+
//#region ../core/dist/text-operations-Duo3PfvM.d.ts
|
|
7
7
|
//#region src/core/types/actions.d.ts
|
|
8
8
|
/**
|
|
9
9
|
* Action types: hyperlinks, slide jumps, macros, and action buttons.
|
|
@@ -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
|
/**
|
|
50
56
|
* High-level action type for the action settings UI.
|
|
@@ -68,7 +74,13 @@ type ElementActionType = 'none' | 'url' | 'slide' | 'firstSlide' | 'lastSlide' |
|
|
|
68
74
|
/** `ppaction://media` - play (or toggle) the element's own embedded media. */
|
|
69
75
|
'playMedia' |
|
|
70
76
|
/** `ppaction://ole?verb=N` - run a numbered OLE verb on an embedded object. */
|
|
71
|
-
'oleVerb'
|
|
77
|
+
'oleVerb' |
|
|
78
|
+
/**
|
|
79
|
+
* `ppaction://program` - PowerPoint's "Run program:" action; the program
|
|
80
|
+
* path resolves via the hyperlink's `r:id` relationship, the same shape
|
|
81
|
+
* as `hlinkfile` (issue G15).
|
|
82
|
+
*/
|
|
83
|
+
'runProgram';
|
|
72
84
|
/**
|
|
73
85
|
* User-facing action configuration stored on an element.
|
|
74
86
|
* This is a convenience wrapper around the lower-level `PptxAction` that maps
|
|
@@ -127,7 +139,7 @@ interface ElementAction {
|
|
|
127
139
|
* // => "wavy" — one of: sng | dbl | heavy | dotted | dash | wavy | none | ...
|
|
128
140
|
* ```
|
|
129
141
|
*/
|
|
130
|
-
type UnderlineStyle = 'sng' | 'dbl' | 'heavy' | 'dotted' | 'dottedHeavy' | 'dash' | 'dashHeavy' | 'dashLong' | 'dashLongHeavy' | 'dotDash' | 'dotDashHeavy' | 'dotDotDash' | 'dotDotDashHeavy' | 'wavy' | 'wavyHeavy' | 'wavyDbl' | 'none';
|
|
142
|
+
type UnderlineStyle = 'sng' | 'dbl' | 'heavy' | 'dotted' | 'dottedHeavy' | 'dash' | 'dashHeavy' | 'dashLong' | 'dashLongHeavy' | 'dotDash' | 'dotDashHeavy' | 'dotDotDash' | 'dotDotDashHeavy' | 'wavy' | 'wavyHeavy' | 'wavyDbl' | 'words' | 'none';
|
|
131
143
|
/**
|
|
132
144
|
* Connector connection point reference — links a connector endpoint to a
|
|
133
145
|
* specific shape on the slide.
|
|
@@ -462,6 +474,16 @@ interface CustomGeometryRawData {
|
|
|
462
474
|
cxnLstXml?: unknown;
|
|
463
475
|
/** Raw `a:rect` XML content (text rectangle). */
|
|
464
476
|
rectXml?: unknown;
|
|
477
|
+
/**
|
|
478
|
+
* Raw `a:pathLst` XML content: every `a:path`'s formula-bearing `a:pt`
|
|
479
|
+
* x/y attributes, `a:arcTo` params, `a:close`, and per-path `@w`/`@h`/
|
|
480
|
+
* `@fill`/`@stroke`/`@extrusionOk`, preserved verbatim (not the
|
|
481
|
+
* parse-time-resolved numbers in `customGeometryPaths`). Lets a live
|
|
482
|
+
* `shapeAdjustments` drag re-evaluate the outline against the CURRENT
|
|
483
|
+
* guide values instead of the ones baked in at parse time; see
|
|
484
|
+
* `geometry/custom-geometry-live-eval.ts`.
|
|
485
|
+
*/
|
|
486
|
+
pathLstXml?: unknown;
|
|
465
487
|
}
|
|
466
488
|
/**
|
|
467
489
|
* XY-style adjustment handle (`a:ahXY`) on a custom geometry.
|
|
@@ -617,6 +639,44 @@ interface PptxCustomPathProperties {
|
|
|
617
639
|
customGeometryTextRect?: CustomGeometryTextRect;
|
|
618
640
|
}
|
|
619
641
|
//#endregion
|
|
642
|
+
//#region src/core/types/color-ref.d.ts
|
|
643
|
+
/**
|
|
644
|
+
* Theme colour references: the typed counterpart of `<a:schemeClr>`.
|
|
645
|
+
*
|
|
646
|
+
* A colour picked from the theme palette is remembered as a scheme slot plus
|
|
647
|
+
* PowerPoint's luminance variants rather than as the sRGB it currently
|
|
648
|
+
* resolves to, so a later theme change re-colours the shape (and a saved file
|
|
649
|
+
* keeps `<a:schemeClr>` instead of a canonical `<a:srgbClr>`).
|
|
650
|
+
*
|
|
651
|
+
* @module types/color-ref
|
|
652
|
+
*/
|
|
653
|
+
/**
|
|
654
|
+
* The scheme slot names `a:schemeClr/@val` accepts (ECMA-376 `ST_SchemeColorIndex`).
|
|
655
|
+
* `bg1`/`tx1`/`bg2`/`tx2` are the colour-map aliases a slide resolves through
|
|
656
|
+
* `p:clrMap`; `phClr` is the placeholder colour used inside a theme's style
|
|
657
|
+
* matrix and is never chosen from a picker.
|
|
658
|
+
*/
|
|
659
|
+
type PptxThemeColorSchemeName = 'dk1' | 'lt1' | 'dk2' | 'lt2' | 'accent1' | 'accent2' | 'accent3' | 'accent4' | 'accent5' | 'accent6' | 'hlink' | 'folHlink' | 'bg1' | 'tx1' | 'bg2' | 'tx2' | 'phClr';
|
|
660
|
+
/**
|
|
661
|
+
* A theme colour choice. Every transform is a 0..1 fraction of the OOXML
|
|
662
|
+
* percentage (`lumMod val="20000"` is `lumMod: 0.2`), matching how the parser
|
|
663
|
+
* reads them, and is applied in the order `a:schemeClr` children are written:
|
|
664
|
+
* `tint`, `shade`, `lumMod`, `lumOff`, `alpha`.
|
|
665
|
+
*/
|
|
666
|
+
interface PptxThemeColorRef {
|
|
667
|
+
scheme: PptxThemeColorSchemeName;
|
|
668
|
+
/** `a:lumMod`: multiply HSL luminance (PowerPoint's "Lighter/Darker" rows). */
|
|
669
|
+
lumMod?: number;
|
|
670
|
+
/** `a:lumOff`: add to HSL luminance after `lumMod` ("Lighter N%" rows). */
|
|
671
|
+
lumOff?: number;
|
|
672
|
+
/** `a:tint`: blend towards white. */
|
|
673
|
+
tint?: number;
|
|
674
|
+
/** `a:shade`: blend towards black. */
|
|
675
|
+
shade?: number;
|
|
676
|
+
/** `a:alpha`: opacity fraction (1 = opaque). */
|
|
677
|
+
alpha?: number;
|
|
678
|
+
}
|
|
679
|
+
//#endregion
|
|
620
680
|
//#region src/core/types/effect-dag.d.ts
|
|
621
681
|
type EffectDagBlendMode = 'darken' | 'lighten' | 'mult' | 'over' | 'screen';
|
|
622
682
|
type EffectDagContainerType = 'sib' | 'tree';
|
|
@@ -906,6 +966,15 @@ interface ShapeStyle {
|
|
|
906
966
|
* back to canonical `<a:srgbClr>`.
|
|
907
967
|
*/
|
|
908
968
|
fillColorXml?: XmlObject;
|
|
969
|
+
/**
|
|
970
|
+
* Typed theme colour reference for the fill, set when {@link fillColorXml}
|
|
971
|
+
* is a plain `a:schemeClr` (see `themeColorRefFromColorChoice`). When
|
|
972
|
+
* present it WINS on save: the writer emits `<a:schemeClr>` from this ref
|
|
973
|
+
* instead of the resolved {@link fillColor}, so the fill keeps following
|
|
974
|
+
* the theme palette after a later theme change. `undefined` means the fill
|
|
975
|
+
* is a plain hex (or a colour kind a ref cannot express).
|
|
976
|
+
*/
|
|
977
|
+
fillColorRef?: PptxThemeColorRef;
|
|
909
978
|
fillGradient?: string;
|
|
910
979
|
/** Original `gradFill` XML retained for unknown-child and extension round-tripping. */
|
|
911
980
|
fillGradientXml?: XmlObject;
|
|
@@ -940,6 +1009,12 @@ interface ShapeStyle {
|
|
|
940
1009
|
opacity?: number;
|
|
941
1010
|
/** Raw XML colour node preserved for round-trip (e.g. a:schemeClr with transforms). */
|
|
942
1011
|
originalColorXml?: XmlObject;
|
|
1012
|
+
/**
|
|
1013
|
+
* Typed theme colour reference for this stop, set when
|
|
1014
|
+
* {@link originalColorXml} is a plain `a:schemeClr`. Wins on save, same
|
|
1015
|
+
* as {@link ShapeStyle.fillColorRef}.
|
|
1016
|
+
*/
|
|
1017
|
+
colorRef?: PptxThemeColorRef;
|
|
943
1018
|
}>;
|
|
944
1019
|
fillGradientAngle?: number;
|
|
945
1020
|
fillGradientType?: 'linear' | 'radial';
|
|
@@ -986,6 +1061,12 @@ interface ShapeStyle {
|
|
|
986
1061
|
* round-trip serialisation. See {@link fillColorXml} for the rationale.
|
|
987
1062
|
*/
|
|
988
1063
|
strokeColorXml?: XmlObject;
|
|
1064
|
+
/**
|
|
1065
|
+
* Typed theme colour reference for the outline, mirroring
|
|
1066
|
+
* {@link fillColorRef}: set when {@link strokeColorXml} is a plain
|
|
1067
|
+
* `a:schemeClr`, and wins on save.
|
|
1068
|
+
*/
|
|
1069
|
+
strokeColorRef?: PptxThemeColorRef;
|
|
989
1070
|
/**
|
|
990
1071
|
* Kind of fill painted on the outline (`a:ln` child). Distinguishes a solid
|
|
991
1072
|
* outline from a gradient/pattern/none outline so save can emit the correct
|
|
@@ -1219,6 +1300,21 @@ interface ShapeStyle {
|
|
|
1219
1300
|
dagFillOverlayColor?: string;
|
|
1220
1301
|
/** Fill overlay tint opacity (0-1), from the overlay fill colour's alpha. */
|
|
1221
1302
|
dagFillOverlayOpacity?: number;
|
|
1303
|
+
/** Fill overlay blend mode from a direct `a:effectLst/a:fillOverlay/@blend`. */
|
|
1304
|
+
shapeFillOverlayBlend?: 'over' | 'mult' | 'screen' | 'darken' | 'lighten';
|
|
1305
|
+
/**
|
|
1306
|
+
* Fill overlay tint colour (hex `#RRGGBB`) from a direct
|
|
1307
|
+
* `a:effectLst/a:fillOverlay`'s `a:solidFill`/`a:gradFill`.
|
|
1308
|
+
*/
|
|
1309
|
+
shapeFillOverlayColor?: string;
|
|
1310
|
+
/** Fill overlay tint opacity (0-1), from the overlay fill colour's alpha. */
|
|
1311
|
+
shapeFillOverlayOpacity?: number;
|
|
1312
|
+
/** Original source `a:fillOverlay` node, preserved for lossless surgical updates. */
|
|
1313
|
+
fillOverlayXml?: XmlObject;
|
|
1314
|
+
/** Resolved source fill-overlay colour used to detect colour edits. */
|
|
1315
|
+
shapeFillOverlayOriginalColor?: string;
|
|
1316
|
+
/** Source fill-overlay opacity used to detect alpha edits. */
|
|
1317
|
+
shapeFillOverlayOriginalOpacity?: number;
|
|
1222
1318
|
/** `<a:lnRef @idx>` — 1-based index into the theme's lnStyleLst. */
|
|
1223
1319
|
lnRefIdx?: number;
|
|
1224
1320
|
/** Raw XML colour child of `<a:lnRef>` (e.g. `<a:schemeClr>` with transforms). */
|
|
@@ -1474,8 +1570,25 @@ interface TextStyle {
|
|
|
1474
1570
|
* verbatim when the resolved {@link color} still matches this node.
|
|
1475
1571
|
*/
|
|
1476
1572
|
colorXml?: XmlObject;
|
|
1573
|
+
/**
|
|
1574
|
+
* Typed theme colour reference for the run's text colour, set when
|
|
1575
|
+
* {@link colorXml} is a plain `a:schemeClr` (see
|
|
1576
|
+
* `themeColorRefFromColorChoice`). When present it WINS on save: the
|
|
1577
|
+
* writer emits `<a:schemeClr>` from this ref instead of the resolved
|
|
1578
|
+
* {@link color}, so the text keeps following the theme palette after a
|
|
1579
|
+
* later theme change.
|
|
1580
|
+
*/
|
|
1581
|
+
colorRef?: PptxThemeColorRef;
|
|
1477
1582
|
align?: 'left' | 'center' | 'right' | 'justify' | 'justLow' | 'dist' | 'thaiDist';
|
|
1478
|
-
|
|
1583
|
+
/**
|
|
1584
|
+
* Vertical text-box anchor (`a:bodyPr/@anchor`, `ST_TextAnchoringType`).
|
|
1585
|
+
* `distributed`/`justified` (`dist`/`just`) stretch line spacing so the
|
|
1586
|
+
* paragraph block fills the box's full vertical extent, distinct from true
|
|
1587
|
+
* centering (`middle`/`ctr`); both approximate to a middle-anchored render
|
|
1588
|
+
* (see `text-body-layout.ts`) since CSS has no native vertical-justify
|
|
1589
|
+
* primitive, but round-trip losslessly through parse/save.
|
|
1590
|
+
*/
|
|
1591
|
+
vAlign?: 'top' | 'middle' | 'bottom' | 'distributed' | 'justified';
|
|
1479
1592
|
/** Right-to-left paragraph/run direction (`a:pPr/@rtl`, `a:rPr/@rtl`). */
|
|
1480
1593
|
rtl?: boolean;
|
|
1481
1594
|
/** Body text direction (`a:bodyPr/@vert`).
|
|
@@ -1891,6 +2004,12 @@ interface BulletInfo {
|
|
|
1891
2004
|
* identity rather than being flattened to `<a:srgbClr/>` on save.
|
|
1892
2005
|
*/
|
|
1893
2006
|
colorXml?: XmlObject;
|
|
2007
|
+
/**
|
|
2008
|
+
* Typed theme colour reference for the bullet colour, set when
|
|
2009
|
+
* {@link colorXml} is a plain `a:schemeClr`. Wins on save, same as
|
|
2010
|
+
* {@link TextStyle.colorRef}.
|
|
2011
|
+
*/
|
|
2012
|
+
colorRef?: PptxThemeColorRef;
|
|
1894
2013
|
/** True when `a:buNone` explicitly suppresses bullets. */
|
|
1895
2014
|
none?: boolean;
|
|
1896
2015
|
/** Picture bullet: relationship ID from `a:buBlip` → `a:blip[@r:embed]`. */
|
|
@@ -2296,6 +2415,50 @@ interface PptxChartAxisLabelFormatting {
|
|
|
2296
2415
|
noMultiLevelLabels?: boolean;
|
|
2297
2416
|
}
|
|
2298
2417
|
//#endregion
|
|
2418
|
+
//#region src/core/types/chart-ex.d.ts
|
|
2419
|
+
/**
|
|
2420
|
+
* Chart-formatting types that don't fit an existing, owned type module for
|
|
2421
|
+
* this wave (`types/chart.ts` is owned elsewhere; see its own module doc).
|
|
2422
|
+
* Despite the file name, `PptxChartDataPointPicture` is a CLASSIC (`c:`)
|
|
2423
|
+
* construct, not ChartEx (`cx:`) - it landed here only because it needs a
|
|
2424
|
+
* home outside `chart.ts`.
|
|
2425
|
+
*
|
|
2426
|
+
* @module pptx-types/chart-ex
|
|
2427
|
+
*/
|
|
2428
|
+
/** `c:dPt/c:pictureOptions/c:pictureFormat/@val` (ST_PictureFormat). */
|
|
2429
|
+
type PptxChartPictureFormat = 'stretch' | 'stack' | 'stackScale';
|
|
2430
|
+
/**
|
|
2431
|
+
* Per-data-point picture-fill flags (`c:dPt/c:pictureOptions`): PowerPoint's
|
|
2432
|
+
* "Picture or texture fill" with "Stack"/"Stretch" semantics on a bar/column
|
|
2433
|
+
* data point, distinct from the point's plain `c:spPr` solid/gradient fill.
|
|
2434
|
+
*
|
|
2435
|
+
* The flags parse purely (`parseChartDataPointPicture` in
|
|
2436
|
+
* `utils/chart-datapoint-serializer.ts`); {@link imageUrl} is a separate,
|
|
2437
|
+
* later addition populated by the runtime (`PptxHandlerRuntimeChartParsing.ts`)
|
|
2438
|
+
* once the sibling `c:spPr/a:blipFill/a:blip`'s `r:embed`/`r:link` is resolved
|
|
2439
|
+
* against the chart part's relationships, since that resolution needs zip/file
|
|
2440
|
+
* access the pure parser does not have.
|
|
2441
|
+
*/
|
|
2442
|
+
interface PptxChartDataPointPicture {
|
|
2443
|
+
/** Apply the picture to the front face of a 3-D bar/column (`c:applyToFront`). */
|
|
2444
|
+
applyToFront?: boolean;
|
|
2445
|
+
/** Apply the picture to the side faces of a 3-D bar/column (`c:applyToSides`). */
|
|
2446
|
+
applyToSides?: boolean;
|
|
2447
|
+
/** Apply the picture to the end face of a 3-D bar/column (`c:applyToEnd`). */
|
|
2448
|
+
applyToEnd?: boolean;
|
|
2449
|
+
/** Stretch, or stack repeated tiles at their natural size (or scaled). */
|
|
2450
|
+
pictureFormat?: PptxChartPictureFormat;
|
|
2451
|
+
/** Height, in points, of one repeated picture tile for "stack"/"stackScale" (`c:pictureStackUnit/@val`). */
|
|
2452
|
+
pictureStackUnit?: number;
|
|
2453
|
+
/**
|
|
2454
|
+
* Resolved picture source (a `data:`/`blob:` URL) for the point's sibling
|
|
2455
|
+
* `c:spPr/a:blipFill/a:blip`. Populated by the runtime after relationship
|
|
2456
|
+
* resolution (C2-G9 render half); absent until then, and absent entirely
|
|
2457
|
+
* when the point has no picture fill or the image could not be resolved.
|
|
2458
|
+
*/
|
|
2459
|
+
imageUrl?: string;
|
|
2460
|
+
}
|
|
2461
|
+
//#endregion
|
|
2299
2462
|
//#region src/core/types/chart-pivot-format.d.ts
|
|
2300
2463
|
interface PptxChartPivotFormat {
|
|
2301
2464
|
index: number;
|
|
@@ -2359,6 +2522,15 @@ interface PptxChartPageSetup {
|
|
|
2359
2522
|
horizontalDpi?: number;
|
|
2360
2523
|
verticalDpi?: number;
|
|
2361
2524
|
copies?: number;
|
|
2525
|
+
/**
|
|
2526
|
+
* Custom paper height, used when {@link paperSize} is `0`
|
|
2527
|
+
* (`c:pageSetup/@paperHeight`, ST_PositiveUniversalMeasure, e.g. `"297mm"`).
|
|
2528
|
+
* Kept as the raw measure string rather than converted, matching how the
|
|
2529
|
+
* schema stores it.
|
|
2530
|
+
*/
|
|
2531
|
+
paperHeight?: string;
|
|
2532
|
+
/** Custom paper width, used when {@link paperSize} is `0` (`@paperWidth`). */
|
|
2533
|
+
paperWidth?: string;
|
|
2362
2534
|
/** Original leaf retained for foreign attributes. */
|
|
2363
2535
|
rawXml?: unknown;
|
|
2364
2536
|
}
|
|
@@ -2390,6 +2562,98 @@ interface PptxChartProtection {
|
|
|
2390
2562
|
rawXml?: XmlObject;
|
|
2391
2563
|
}
|
|
2392
2564
|
//#endregion
|
|
2565
|
+
//#region src/core/types/chart-style-definition.d.ts
|
|
2566
|
+
/**
|
|
2567
|
+
* Typed subset of an Office 2013+ chart-style part (`ppt/charts/style#.xml`,
|
|
2568
|
+
* root element `cs:chartStyle`, relationship type
|
|
2569
|
+
* `.../2012/relationships/chartStyle`).
|
|
2570
|
+
*
|
|
2571
|
+
* PowerPoint's Design-tab "Chart Styles" gallery (1-48) writes `c:style/@val`
|
|
2572
|
+
* on the chart part itself (already modeled as `PptxChartStyle.styleId`) and,
|
|
2573
|
+
* for most styles, this SEPARATE part spelling out the per-element
|
|
2574
|
+
* `cs:lnRef`/`cs:fillRef`/`cs:effectRef`/`cs:fontRef`/`cs:defRPr` defaults a
|
|
2575
|
+
* chart element falls back to when its own XML leaves it unstyled. Without
|
|
2576
|
+
* parsing this part, styles beyond the one PowerPoint happens to have baked
|
|
2577
|
+
* inline are visually inert.
|
|
2578
|
+
*
|
|
2579
|
+
* @module pptx-types/chart-style-definition
|
|
2580
|
+
*/
|
|
2581
|
+
/**
|
|
2582
|
+
* One styled chart-element entry (`cs:title`, `cs:axisTitle`,
|
|
2583
|
+
* `cs:categoryAxis`, ...). Colours are resolved to hex at parse time (scheme
|
|
2584
|
+
* colour references via `cs:fontRef`/`cs:lnRef`/`cs:fillRef` are already
|
|
2585
|
+
* flattened against the theme, matching how classic chart colours resolve
|
|
2586
|
+
* elsewhere in this codebase). Fields are present only when the source XML
|
|
2587
|
+
* carried a value for them.
|
|
2588
|
+
*/
|
|
2589
|
+
interface PptxChartStylePartEntry {
|
|
2590
|
+
/** Text size in points, from `cs:defRPr/@sz` (hundredths of a point). */
|
|
2591
|
+
fontSize?: number;
|
|
2592
|
+
bold?: boolean;
|
|
2593
|
+
italic?: boolean;
|
|
2594
|
+
/** Resolved text colour: `cs:defRPr/a:solidFill`, or `cs:fontRef`'s scheme colour. */
|
|
2595
|
+
color?: string;
|
|
2596
|
+
/** Resolved line colour from `cs:lnRef`'s scheme colour reference. */
|
|
2597
|
+
lineColor?: string;
|
|
2598
|
+
/** Line width in points, when directly authored (rare; most styles reference a theme line style by index only). */
|
|
2599
|
+
lineWidth?: number;
|
|
2600
|
+
/** Resolved fill colour from `cs:fillRef`'s scheme colour reference. */
|
|
2601
|
+
fillColor?: string;
|
|
2602
|
+
}
|
|
2603
|
+
/**
|
|
2604
|
+
* Parsed per-element style defaults from a chart-style part. Only the
|
|
2605
|
+
* elements this viewer actually renders distinct defaults for are modeled;
|
|
2606
|
+
* elements PowerPoint's style gallery also styles (data table, trendlines,
|
|
2607
|
+
* up/down bars, ...) are out of scope until a renderer needs them.
|
|
2608
|
+
*/
|
|
2609
|
+
interface PptxChartStyleDefinition {
|
|
2610
|
+
title?: PptxChartStylePartEntry;
|
|
2611
|
+
axisTitle?: PptxChartStylePartEntry;
|
|
2612
|
+
categoryAxis?: PptxChartStylePartEntry;
|
|
2613
|
+
valueAxis?: PptxChartStylePartEntry;
|
|
2614
|
+
legend?: PptxChartStylePartEntry;
|
|
2615
|
+
dataLabel?: PptxChartStylePartEntry;
|
|
2616
|
+
dataPoint?: PptxChartStylePartEntry;
|
|
2617
|
+
dataPointLine?: PptxChartStylePartEntry;
|
|
2618
|
+
gridlineMajor?: PptxChartStylePartEntry;
|
|
2619
|
+
gridlineMinor?: PptxChartStylePartEntry;
|
|
2620
|
+
chartArea?: PptxChartStylePartEntry;
|
|
2621
|
+
plotArea?: PptxChartStylePartEntry;
|
|
2622
|
+
}
|
|
2623
|
+
//#endregion
|
|
2624
|
+
//#region src/core/types/chart-title.d.ts
|
|
2625
|
+
/**
|
|
2626
|
+
* Chart title rich-text run type, split out of `types/chart.ts` (already at
|
|
2627
|
+
* the repo's file-size limit) to keep that module from growing further.
|
|
2628
|
+
*
|
|
2629
|
+
* @module pptx-types/chart-title
|
|
2630
|
+
*/
|
|
2631
|
+
/**
|
|
2632
|
+
* One run of a chart title's rich text (`c:title/c:tx/c:rich/a:p/a:r`).
|
|
2633
|
+
*
|
|
2634
|
+
* The flat `PptxChartData.title` field only ever captured the FIRST run's
|
|
2635
|
+
* text with no per-run formatting; `titleRuns` (when present) is the
|
|
2636
|
+
* lossless, multi-run replacement parsed from the same `c:rich` body. Absent
|
|
2637
|
+
* when the title has no rich text at all (an empty/auto title, or one
|
|
2638
|
+
* authored as a linked-cell reference).
|
|
2639
|
+
*/
|
|
2640
|
+
interface PptxChartTitleRun {
|
|
2641
|
+
/** This run's text (`a:t`). */
|
|
2642
|
+
text: string;
|
|
2643
|
+
/** `a:rPr/@_b`. */
|
|
2644
|
+
bold?: boolean;
|
|
2645
|
+
/** `a:rPr/@_i`. */
|
|
2646
|
+
italic?: boolean;
|
|
2647
|
+
/**
|
|
2648
|
+
* Font size in POINTS (`a:rPr/@_sz`, hundredths of a point / 100), matching
|
|
2649
|
+
* `PptxChartLegendTextStyle.fontSize`'s convention rather than the pixel
|
|
2650
|
+
* convention `TextStyle.fontSize` uses for slide text.
|
|
2651
|
+
*/
|
|
2652
|
+
fontSize?: number;
|
|
2653
|
+
/** Resolved hex colour (e.g. `"#FF0000"`) from `a:rPr/a:solidFill`. */
|
|
2654
|
+
color?: string;
|
|
2655
|
+
}
|
|
2656
|
+
//#endregion
|
|
2393
2657
|
//#region src/core/types/chart-user-shapes.d.ts
|
|
2394
2658
|
/**
|
|
2395
2659
|
* Types for chart drawing-overlay shapes (`c:userShapes`).
|
|
@@ -2428,8 +2692,16 @@ interface PptxChartUserShapeParagraph {
|
|
|
2428
2692
|
* `absSizeAnchor` the extent is {@link ext} in EMU.
|
|
2429
2693
|
*/
|
|
2430
2694
|
interface PptxChartUserShape {
|
|
2431
|
-
/**
|
|
2432
|
-
|
|
2695
|
+
/**
|
|
2696
|
+
* Shape kind: text/preset shape, connector, picture, a group of the
|
|
2697
|
+
* above (`grpSp`, flattened: each grouped child becomes its own entry
|
|
2698
|
+
* reusing the anchor's own bounding box, an approximation since the
|
|
2699
|
+
* group's internal chOff/chExt transform is not applied), or a bare
|
|
2700
|
+
* placeholder for a `graphicFrame` anchor child (deep content such as a
|
|
2701
|
+
* nested chart or table is out of scope; it only keeps the anchor's
|
|
2702
|
+
* space accounted for instead of the whole overlay disappearing).
|
|
2703
|
+
*/
|
|
2704
|
+
kind: 'sp' | 'cxnSp' | 'pic' | 'grpSp' | 'graphicFrame';
|
|
2433
2705
|
/** Anchor kind that positioned the shape. */
|
|
2434
2706
|
anchor: 'rel' | 'abs';
|
|
2435
2707
|
/** Top-left corner as chart-relative fractions (0-1). */
|
|
@@ -2530,6 +2802,10 @@ interface PptxChartTrendline {
|
|
|
2530
2802
|
displayRSq?: boolean;
|
|
2531
2803
|
displayEq?: boolean;
|
|
2532
2804
|
color?: string;
|
|
2805
|
+
/** Trendline width in points (`c:trendline/c:spPr/a:ln/@w`, EMU / 12700). */
|
|
2806
|
+
lineWidth?: number;
|
|
2807
|
+
/** Trendline dash style (`c:trendline/c:spPr/a:ln/a:prstDash/@val`). */
|
|
2808
|
+
lineDashStyle?: string;
|
|
2533
2809
|
label?: PptxChartTrendlineLabel | null;
|
|
2534
2810
|
}
|
|
2535
2811
|
/** Typed, commonly edited properties of `c:trendlineLbl`. */
|
|
@@ -2575,6 +2851,10 @@ interface PptxChartErrBars {
|
|
|
2575
2851
|
customMinus?: number[];
|
|
2576
2852
|
noEndCap?: boolean;
|
|
2577
2853
|
color?: string;
|
|
2854
|
+
/** Error-bar line width in points (`c:errBars/c:spPr/a:ln/@w`, EMU / 12700). */
|
|
2855
|
+
width?: number;
|
|
2856
|
+
/** Error-bar line dash style (`c:errBars/c:spPr/a:ln/a:prstDash/@val`). */
|
|
2857
|
+
dashStyle?: string;
|
|
2578
2858
|
}
|
|
2579
2859
|
/**
|
|
2580
2860
|
* Visibility flags for the chart data table (axes + legend keys).
|
|
@@ -2661,6 +2941,8 @@ interface PptxChartDataPoint {
|
|
|
2661
2941
|
marker?: PptxChartMarker;
|
|
2662
2942
|
/** Render a bubble-chart point with a 3-D appearance. */
|
|
2663
2943
|
bubble3D?: boolean;
|
|
2944
|
+
/** Per-point picture-fill flags (`c:dPt/c:pictureOptions`). */
|
|
2945
|
+
picture?: PptxChartDataPointPicture;
|
|
2664
2946
|
}
|
|
2665
2947
|
/** Schema values accepted by `c:dLblPos`. */
|
|
2666
2948
|
type PptxChartDataLabelPosition = 'bestFit' | 'b' | 'ctr' | 'inBase' | 'inEnd' | 'l' | 'outEnd' | 'r' | 't';
|
|
@@ -2679,6 +2961,32 @@ interface PptxChartDataLabel {
|
|
|
2679
2961
|
text?: string;
|
|
2680
2962
|
separator?: string;
|
|
2681
2963
|
showLeaderLines?: boolean;
|
|
2964
|
+
/**
|
|
2965
|
+
* Per-label number-format override (`c:dLbl/c:numFmt/@formatCode`), taking
|
|
2966
|
+
* precedence over the chart-level {@link PptxChartDataLabelOptions.numberFormat}
|
|
2967
|
+
* and the series' own {@link PptxChartSeries.numberFormat} when set.
|
|
2968
|
+
*/
|
|
2969
|
+
numberFormat?: string;
|
|
2970
|
+
/**
|
|
2971
|
+
* Manually dragged label position (`c:dLbl/c:layout/c:manualLayout`), the
|
|
2972
|
+
* same CT_ManualLayout shape used for title/legend/plotArea. `null`
|
|
2973
|
+
* explicitly clears a drag back to the automatic position.
|
|
2974
|
+
*/
|
|
2975
|
+
layout?: PptxChartManualLayout | null;
|
|
2976
|
+
/**
|
|
2977
|
+
* This label's own font (`c:dLbl/c:txPr/a:p/a:pPr/a:defRPr`, or ChartEx
|
|
2978
|
+
* `cx:dataLabel/cx:txPr`), taking precedence over the chart/series-level
|
|
2979
|
+
* {@link PptxChartDataLabelOptions.txPr} when set. Reuses the legend
|
|
2980
|
+
* entry's flat text-style shape since both are the same
|
|
2981
|
+
* `.../a:p/a:pPr/a:defRPr` default-run-property style.
|
|
2982
|
+
*/
|
|
2983
|
+
txPr?: PptxChartLegendTextStyle;
|
|
2984
|
+
/**
|
|
2985
|
+
* This label's own shape formatting (`c:dLbl/c:spPr`): fill/line colour,
|
|
2986
|
+
* width, and dash style for the label's callout box, taking precedence
|
|
2987
|
+
* over any chart/series-level default when set.
|
|
2988
|
+
*/
|
|
2989
|
+
spPr?: PptxChartShapeProps;
|
|
2682
2990
|
}
|
|
2683
2991
|
/** Axis number format. */
|
|
2684
2992
|
interface PptxChartAxisNumFmt {
|
|
@@ -2693,6 +3001,16 @@ interface PptxChartDisplayUnitsLabel {
|
|
|
2693
3001
|
layout?: PptxChartManualLayout | null;
|
|
2694
3002
|
/** Label shape formatting. `null` removes `c:spPr`. */
|
|
2695
3003
|
spPr?: PptxChartShapeProps | null;
|
|
3004
|
+
/**
|
|
3005
|
+
* The label's own run font, when it carries a distinct `txPr` from the
|
|
3006
|
+
* axis's own (ChartEx `cx:unitsLabel/cx:txPr`; classic `c:dispUnitsLbl`
|
|
3007
|
+
* has no equivalent child, so this is only ever populated from a ChartEx
|
|
3008
|
+
* axis).
|
|
3009
|
+
*/
|
|
3010
|
+
fontFamily?: string;
|
|
3011
|
+
fontSize?: number;
|
|
3012
|
+
fontBold?: boolean;
|
|
3013
|
+
fontColor?: string;
|
|
2696
3014
|
}
|
|
2697
3015
|
/** Axis formatting for category, value, or date axes. */
|
|
2698
3016
|
interface PptxChartAxisFormatting extends PptxChartAxisLabelFormatting {
|
|
@@ -2797,8 +3115,27 @@ interface PptxChartWaterfallOptions {
|
|
|
2797
3115
|
/** Whether connector lines are visible between adjacent bars. */
|
|
2798
3116
|
connectorLines?: boolean;
|
|
2799
3117
|
}
|
|
3118
|
+
/**
|
|
3119
|
+
* A single breakpoint in a ChartEx colour-by-value scale
|
|
3120
|
+
* (`cx:valueColorPositions/cx:colorPosition`). `kind` selects which of
|
|
3121
|
+
* CT_ColorPosition's union members was authored; `value` is absent for
|
|
3122
|
+
* `min`/`max` (they are implicit endpoints) and required otherwise.
|
|
3123
|
+
*/
|
|
3124
|
+
interface PptxCxValueColorPosition {
|
|
3125
|
+
kind: 'min' | 'max' | 'number' | 'percent';
|
|
3126
|
+
value?: number;
|
|
3127
|
+
}
|
|
2800
3128
|
/** Office 2016 ChartEx geographic series dimensions and layout options. */
|
|
2801
3129
|
interface PptxChartRegionMapOptions {
|
|
3130
|
+
/**
|
|
3131
|
+
* Colour-by-value gradient stops (`cx:valueColors/cx:colors/cx:color`),
|
|
3132
|
+
* resolved to hex, 2 or 3 entries (matching PowerPoint's two- and
|
|
3133
|
+
* three-colour scale UI). Paired index-for-index with
|
|
3134
|
+
* {@link valueColorPositions} when both are present.
|
|
3135
|
+
*/
|
|
3136
|
+
valueColors?: string[];
|
|
3137
|
+
/** Gradient breakpoints for {@link valueColors} (`cx:valueColorPositions`). */
|
|
3138
|
+
valueColorPositions?: PptxCxValueColorPosition[];
|
|
2802
3139
|
/** Optional provider entity identifiers aligned with categories and values. */
|
|
2803
3140
|
entityIds?: string[];
|
|
2804
3141
|
/** Original `cx:pt/@idx` values for category points. */
|
|
@@ -2963,6 +3300,20 @@ interface PptxChartDataLabelOptions {
|
|
|
2963
3300
|
* Omit to let PowerPoint use the type default.
|
|
2964
3301
|
*/
|
|
2965
3302
|
position?: PptxChartDataLabelPosition;
|
|
3303
|
+
/**
|
|
3304
|
+
* Chart-level number-format override (`c:dLbls/c:numFmt/@formatCode`),
|
|
3305
|
+
* applied to every label of the series/chart-type unless a per-point
|
|
3306
|
+
* {@link PptxChartDataLabel.numberFormat} overrides it.
|
|
3307
|
+
*/
|
|
3308
|
+
numberFormat?: string;
|
|
3309
|
+
/**
|
|
3310
|
+
* Default font for every label at this level (`c:dLbls/c:txPr`, or
|
|
3311
|
+
* ChartEx `cx:dataLabels/cx:txPr`), overridden by a per-point
|
|
3312
|
+
* {@link PptxChartDataLabel.txPr} when set. `c:dLbls` at the chart-type
|
|
3313
|
+
* level and the series level cascade the same way the show flags do
|
|
3314
|
+
* (point > series > chart-type).
|
|
3315
|
+
*/
|
|
3316
|
+
txPr?: PptxChartLegendTextStyle;
|
|
2966
3317
|
}
|
|
2967
3318
|
/** Typed text defaults for a single chart legend entry. */
|
|
2968
3319
|
interface PptxChartLegendTextStyle {
|
|
@@ -3019,6 +3370,17 @@ interface PptxChartStyle {
|
|
|
3019
3370
|
hasDataLabels?: boolean;
|
|
3020
3371
|
/** Chart-level data-label content/position options (when `hasDataLabels`). */
|
|
3021
3372
|
dataLabels?: PptxChartDataLabelOptions;
|
|
3373
|
+
/**
|
|
3374
|
+
* Font styling for the chart's own title (`c:title/c:txPr`), edited via
|
|
3375
|
+
* `applyChartTitleStyleToXml` (chart-title-style-serializer.ts). Distinct
|
|
3376
|
+
* from an axis title's styling (`PptxChartAxisFormatting.fontFamily` etc.).
|
|
3377
|
+
*/
|
|
3378
|
+
titleFontFamily?: string;
|
|
3379
|
+
titleFontSize?: number;
|
|
3380
|
+
titleFontBold?: boolean;
|
|
3381
|
+
titleFontColor?: string;
|
|
3382
|
+
/** Title text-box fill/border (`c:title/c:spPr`). `null` removes it. */
|
|
3383
|
+
titleSpPr?: PptxChartShapeProps | null;
|
|
3022
3384
|
}
|
|
3023
3385
|
/**
|
|
3024
3386
|
* External data source reference for a chart (c:externalData).
|
|
@@ -3188,6 +3550,16 @@ interface PptxChartDateCategories {
|
|
|
3188
3550
|
*/
|
|
3189
3551
|
interface PptxChartData {
|
|
3190
3552
|
title?: string;
|
|
3553
|
+
/**
|
|
3554
|
+
* Rich-text runs of the title, parsed from `c:title/c:tx/c:rich` (issue:
|
|
3555
|
+
* chart title rich text). Lossless multi-run alternative to the flat
|
|
3556
|
+
* {@link title}: when present, the writer serialises every run's own
|
|
3557
|
+
* bold/italic/size/color; when absent, save falls back to the flat
|
|
3558
|
+
* `title` path as before. Only populated for a classic (`c:`) chart's
|
|
3559
|
+
* rich (typed) title, not a ChartEx (`cx:`) title or one authored as a
|
|
3560
|
+
* linked-cell reference.
|
|
3561
|
+
*/
|
|
3562
|
+
titleRuns?: PptxChartTitleRun[];
|
|
3191
3563
|
chartType: PptxChartType;
|
|
3192
3564
|
categories: string[];
|
|
3193
3565
|
/**
|
|
@@ -3279,8 +3651,10 @@ interface PptxChartData {
|
|
|
3279
3651
|
chartRelationshipId?: string;
|
|
3280
3652
|
/** `null` explicitly removes an existing ChartML data table. */
|
|
3281
3653
|
dataTable?: PptxChartDataTable | null;
|
|
3282
|
-
dropLines
|
|
3283
|
-
|
|
3654
|
+
/** `null` explicitly removes an existing `c:dropLines` element. */
|
|
3655
|
+
dropLines?: PptxChartLineStyle | null;
|
|
3656
|
+
/** `null` explicitly removes an existing `c:hiLowLines` element. */
|
|
3657
|
+
hiLowLines?: PptxChartLineStyle | null;
|
|
3284
3658
|
/** `null` explicitly removes an existing up/down-bars container. */
|
|
3285
3659
|
upDownBars?: PptxChartUpDownBars | null;
|
|
3286
3660
|
axes?: PptxChartAxisFormatting[];
|
|
@@ -3395,10 +3769,45 @@ interface PptxChartData {
|
|
|
3395
3769
|
pivotFormats?: PptxChartPivotFormats | null;
|
|
3396
3770
|
/**
|
|
3397
3771
|
* Color-map override (`c:clrMapOvr`) carrying 12 attributes that
|
|
3398
|
-
* remap theme colour roles for this chart only.
|
|
3399
|
-
* `attribute
|
|
3772
|
+
* remap theme colour roles for this chart only. Modeled as a flat
|
|
3773
|
+
* `attribute -> value` map (e.g. `{ bg1: 'lt1', accent1: 'accent2' }`)
|
|
3774
|
+
* so unknown/future attributes round-trip without code changes.
|
|
3775
|
+
* `null` explicitly removes an existing `c:clrMapOvr`; an empty object
|
|
3776
|
+
* is treated the same as `null` on save.
|
|
3400
3777
|
*/
|
|
3401
|
-
clrMapOvr?: Record<string, string
|
|
3778
|
+
clrMapOvr?: Record<string, string> | null;
|
|
3779
|
+
/**
|
|
3780
|
+
* Whether the chart's own cached numeric values use the 1904 date epoch
|
|
3781
|
+
* (`c:chartSpace/c:date1904/@val`). Independent of, and authoritative over,
|
|
3782
|
+
* any embedded workbook's `workbookPr/@date1904` (a chart can lack an
|
|
3783
|
+
* embedded workbook entirely, or its cache can legitimately differ from the
|
|
3784
|
+
* workbook's current setting). Absent when the source XML omits the
|
|
3785
|
+
* element, in which case the 1900 system applies (the schema default).
|
|
3786
|
+
*/
|
|
3787
|
+
date1904?: boolean;
|
|
3788
|
+
/**
|
|
3789
|
+
* PowerPoint's "Rounded corners" chart-area option
|
|
3790
|
+
* (`c:chartSpace/c:roundedCorners/@val`, default `false`). Absent when the
|
|
3791
|
+
* source XML omits the element.
|
|
3792
|
+
*/
|
|
3793
|
+
roundedCorners?: boolean;
|
|
3794
|
+
/**
|
|
3795
|
+
* 3-D chart depth/spacing along the series axis, as a percentage
|
|
3796
|
+
* (`c:gapDepth/@val`, `ST_GapAmount`, 0 through 500). Legal on
|
|
3797
|
+
* `bar3D`/`area3D`/`line3D`/`surface` chart-type containers only. Read-only
|
|
3798
|
+
* for rendering, matching {@link barGapWidth}/{@link barOverlap}: save
|
|
3799
|
+
* round-trips it via the preserved chart XML rather than a typed edit path.
|
|
3800
|
+
*/
|
|
3801
|
+
gapDepth?: number;
|
|
3802
|
+
/**
|
|
3803
|
+
* Parsed Office 2013+ chart-style part (`ppt/charts/style#.xml`,
|
|
3804
|
+
* `cs:chartStyle`), providing per-element font/line/fill defaults for
|
|
3805
|
+
* whichever built-in "Chart Styles" gallery entry ({@link PptxChartStyle.styleId})
|
|
3806
|
+
* is active. Absent when the chart has no such part (common for
|
|
3807
|
+
* automation-authored charts, where PowerPoint still implies style 2's
|
|
3808
|
+
* look via its own bundled defaults).
|
|
3809
|
+
*/
|
|
3810
|
+
chartStyleDefinition?: PptxChartStyleDefinition;
|
|
3402
3811
|
}
|
|
3403
3812
|
//#endregion
|
|
3404
3813
|
//#region src/core/types/image.d.ts
|
|
@@ -3922,6 +4331,52 @@ interface MediaCaptionTrack {
|
|
|
3922
4331
|
isDefault?: boolean;
|
|
3923
4332
|
}
|
|
3924
4333
|
//#endregion
|
|
4334
|
+
//#region src/core/types/smart-art-chrome.d.ts
|
|
4335
|
+
/**
|
|
4336
|
+
* Background / outline extracted from `dgm:bg` and `dgm:whole`.
|
|
4337
|
+
*
|
|
4338
|
+
* @example
|
|
4339
|
+
* ```ts
|
|
4340
|
+
* const chrome: PptxSmartArtChrome = {
|
|
4341
|
+
* backgroundColor: "#F0F0F0",
|
|
4342
|
+
* outlineColor: "#333333",
|
|
4343
|
+
* outlineWidth: 1,
|
|
4344
|
+
* };
|
|
4345
|
+
* // => satisfies PptxSmartArtChrome
|
|
4346
|
+
* ```
|
|
4347
|
+
*/
|
|
4348
|
+
interface PptxSmartArtChrome {
|
|
4349
|
+
/**
|
|
4350
|
+
* Background fill colour (hex). When the real `dgm:bg` fill is a gradient
|
|
4351
|
+
* or pattern (see {@link PptxSmartArtChrome.backgroundFillXml}), this is an
|
|
4352
|
+
* APPROXIMATION (the gradient's first stop, or the pattern's foreground
|
|
4353
|
+
* colour) for a consumer that only wants one display colour, not the full fill.
|
|
4354
|
+
*/
|
|
4355
|
+
backgroundColor?: string;
|
|
4356
|
+
/**
|
|
4357
|
+
* Raw `dgm:bg` fill XML, present only when the background is a gradient or
|
|
4358
|
+
* pattern fill (a solid fill is fully captured by {@link PptxSmartArtChrome.backgroundColor}
|
|
4359
|
+
* alone). Round-trip only: `smartart-save-chrome.ts` re-emits this verbatim
|
|
4360
|
+
* instead of flattening the fill to a solid colour on save.
|
|
4361
|
+
*/
|
|
4362
|
+
backgroundFillXml?: PptxSmartArtRawBackgroundFill;
|
|
4363
|
+
/** Outline stroke colour (hex). */
|
|
4364
|
+
outlineColor?: string;
|
|
4365
|
+
/** Outline stroke width in points. */
|
|
4366
|
+
outlineWidth?: number;
|
|
4367
|
+
}
|
|
4368
|
+
/**
|
|
4369
|
+
* A `dgm:bg` fill this viewer doesn't fully model as first-class chrome
|
|
4370
|
+
* (gradient or pattern), preserved verbatim for round-trip. See
|
|
4371
|
+
* {@link PptxSmartArtChrome.backgroundFillXml}.
|
|
4372
|
+
*/
|
|
4373
|
+
interface PptxSmartArtRawBackgroundFill {
|
|
4374
|
+
/** Local element name of the fill under `dgm:bg` (`gradFill` or `pattFill`). */
|
|
4375
|
+
localName: 'gradFill' | 'pattFill';
|
|
4376
|
+
/** The fill element's own attributes/children, as parsed. */
|
|
4377
|
+
xml: XmlObject;
|
|
4378
|
+
}
|
|
4379
|
+
//#endregion
|
|
3925
4380
|
//#region src/core/types/smart-art-constraint-rules.d.ts
|
|
3926
4381
|
type PptxSmartArtConstraintRelationship = 'self' | 'ch' | 'des';
|
|
3927
4382
|
type PptxSmartArtConstraintOperator = 'none' | 'equ' | 'gte' | 'lte';
|
|
@@ -4020,6 +4475,14 @@ interface PptxSmartArtLayoutNodeShape {
|
|
|
4020
4475
|
adjustments?: PptxSmartArtShapeAdjustment[];
|
|
4021
4476
|
/** `dgm:shape/@hideGeom`: the shape is present only to size text, never painted. */
|
|
4022
4477
|
hideGeometry?: boolean;
|
|
4478
|
+
/**
|
|
4479
|
+
* `dgm:shape/@lkTxEntry` (CT_Shape, boolean, default false): this node is a
|
|
4480
|
+
* decorative shape that should mirror its paired content node's text
|
|
4481
|
+
* rather than always rendering blank. See `smartart-layout-interpreter-
|
|
4482
|
+
* pyramid.ts`'s `arrangePyramid`, the interpreter's one existing
|
|
4483
|
+
* synthesized-decorative-shape call site.
|
|
4484
|
+
*/
|
|
4485
|
+
lkTxEntry?: boolean;
|
|
4023
4486
|
}
|
|
4024
4487
|
/** Identity and ordering metadata from DiagramML CT_LayoutNode. */
|
|
4025
4488
|
interface PptxSmartArtLayoutNode {
|
|
@@ -4247,6 +4710,13 @@ interface PptxSmartArtNode {
|
|
|
4247
4710
|
* generic cycled palette (see `applySmartArtRoleColors`).
|
|
4248
4711
|
*/
|
|
4249
4712
|
styleRole?: string;
|
|
4713
|
+
/**
|
|
4714
|
+
* `dgm:prSet/@coherent3DOff` (`CT_ElemPropSet`) resolved from the node's
|
|
4715
|
+
* paired presentation point: when true, this node opts out of the
|
|
4716
|
+
* diagram's overall coherent-3D scene rotation (a `dgm:scene3d`/`dgm:sp3d`
|
|
4717
|
+
* quick-style variation) applied to every other node.
|
|
4718
|
+
*/
|
|
4719
|
+
coherent3DOff?: boolean;
|
|
4250
4720
|
/**
|
|
4251
4721
|
* Per-run text + run-properties for the node's first paragraph, captured at
|
|
4252
4722
|
* parse time. When the joined run text still equals {@link text} (the node
|
|
@@ -4294,9 +4764,29 @@ interface PptxSmartArtColorListMetadata {
|
|
|
4294
4764
|
method?: PptxSmartArtColorApplicationMethod;
|
|
4295
4765
|
hueDirection?: PptxSmartArtHueDirection;
|
|
4296
4766
|
}
|
|
4767
|
+
/**
|
|
4768
|
+
* A quick-style label's `a:lnRef`/`a:fillRef`/`a:effectRef`/`a:fontRef`
|
|
4769
|
+
* (`CT_ShapeStyle`, the same complex type an ordinary shape's `p:style`
|
|
4770
|
+
* uses), resolved against the theme's `fmtScheme` at parse time instead of
|
|
4771
|
+
* the coarse subtle/moderate/intense enum ({@link PptxSmartArtQuickStyle.effectIntensity}).
|
|
4772
|
+
* Only populated when a theme format scheme was available when the quick
|
|
4773
|
+
* style was parsed. See G13 in the 2026-09 diagram audit.
|
|
4774
|
+
*/
|
|
4775
|
+
interface PptxSmartArtResolvedStyleRef {
|
|
4776
|
+
fillColor?: string;
|
|
4777
|
+
fillMode?: 'solid' | 'gradient' | 'pattern' | 'none' | 'theme';
|
|
4778
|
+
strokeColor?: string;
|
|
4779
|
+
strokeWidth?: number;
|
|
4780
|
+
/** `a:effectRef`'s theme-resolved outer shadow colour, when the style has one. */
|
|
4781
|
+
shadowColor?: string;
|
|
4782
|
+
/** `a:fontRef`'s theme-resolved typeface (`+mn-lt`/`+mj-lt` -> the theme's actual font). */
|
|
4783
|
+
fontTypeface?: string;
|
|
4784
|
+
}
|
|
4297
4785
|
/** CT_StyleLabel metadata from a quick-style definition. */
|
|
4298
4786
|
interface PptxSmartArtQuickStyleLabel {
|
|
4299
4787
|
name: string;
|
|
4788
|
+
/** Theme-resolved `dgm:style` refs for this label's role, when available. */
|
|
4789
|
+
resolvedStyle?: PptxSmartArtResolvedStyleRef;
|
|
4300
4790
|
}
|
|
4301
4791
|
/** CT_CTStyleLabel metadata from a color-transform definition. */
|
|
4302
4792
|
interface PptxSmartArtColorStyleLabel {
|
|
@@ -4559,27 +5049,6 @@ interface PptxSmartArtDrawingShape extends PptxCustomPathProperties {
|
|
|
4559
5049
|
textFrameWidth?: number;
|
|
4560
5050
|
textFrameHeight?: number;
|
|
4561
5051
|
}
|
|
4562
|
-
/**
|
|
4563
|
-
* Background / outline extracted from `dgm:bg` and `dgm:whole`.
|
|
4564
|
-
*
|
|
4565
|
-
* @example
|
|
4566
|
-
* ```ts
|
|
4567
|
-
* const chrome: PptxSmartArtChrome = {
|
|
4568
|
-
* backgroundColor: "#F0F0F0",
|
|
4569
|
-
* outlineColor: "#333333",
|
|
4570
|
-
* outlineWidth: 1,
|
|
4571
|
-
* };
|
|
4572
|
-
* // => satisfies PptxSmartArtChrome
|
|
4573
|
-
* ```
|
|
4574
|
-
*/
|
|
4575
|
-
interface PptxSmartArtChrome {
|
|
4576
|
-
/** Background fill colour (hex). */
|
|
4577
|
-
backgroundColor?: string;
|
|
4578
|
-
/** Outline stroke colour (hex). */
|
|
4579
|
-
outlineColor?: string;
|
|
4580
|
-
/** Outline stroke width in points. */
|
|
4581
|
-
outlineWidth?: number;
|
|
4582
|
-
}
|
|
4583
5052
|
/**
|
|
4584
5053
|
* Presentation layout variables from `dgm:prSet/dgm:presLayoutVars` (data model)
|
|
4585
5054
|
* or `dgm:varLst` (layout definition defaults).
|
|
@@ -4683,13 +5152,55 @@ interface PptxSmartArtData {
|
|
|
4683
5152
|
drawingDirty?: boolean;
|
|
4684
5153
|
}
|
|
4685
5154
|
//#endregion
|
|
4686
|
-
//#region src/core/types/table.d.ts
|
|
5155
|
+
//#region src/core/types/table-style-edit.d.ts
|
|
5156
|
+
/**
|
|
5157
|
+
* A `a:fillRef`/`a:lnRef`/`a:effectRef`-style style-matrix reference: an
|
|
5158
|
+
* index into the theme's format scheme (`a:fmtScheme/a:fillStyleLst`, 1-based
|
|
5159
|
+
* per ECMA-376 §20.1.4.1.12) plus an optional colour transform child.
|
|
5160
|
+
*
|
|
5161
|
+
* Distinct from an already-resolved {@link ParsedTableStyleFill}: a fill ref
|
|
5162
|
+
* points AT a theme style-matrix entry rather than carrying a colour choice
|
|
5163
|
+
* directly, though the two commonly appear together (`<a:fillRef idx="2">
|
|
5164
|
+
* <a:schemeClr val="accent1"/></a:fillRef>`).
|
|
5165
|
+
*
|
|
5166
|
+
* @example
|
|
5167
|
+
* ```ts
|
|
5168
|
+
* const ref: ParsedTableFillRef = { idx: 2, color: { schemeColor: 'accent1' } };
|
|
5169
|
+
* // => satisfies ParsedTableFillRef
|
|
5170
|
+
* ```
|
|
5171
|
+
*/
|
|
5172
|
+
interface ParsedTableFillRef {
|
|
5173
|
+
/** 1-based index into the theme format scheme's fill style list. */
|
|
5174
|
+
idx: number;
|
|
5175
|
+
/** Colour transform child (`a:schemeClr`/`a:srgbClr`) applied to the referenced style. */
|
|
5176
|
+
color?: ParsedTableStyleFill;
|
|
5177
|
+
}
|
|
4687
5178
|
/**
|
|
4688
|
-
*
|
|
4689
|
-
*
|
|
5179
|
+
* One leaf (or `effectDag`-wrapped) node of an `a:effectLst`/`a:effectDag`
|
|
5180
|
+
* effect chain, kept mostly opaque: {@link kind} names the OOXML element so a
|
|
5181
|
+
* consumer can recognise common effects (`outerShdw`, `glow`, `softEdge`,
|
|
5182
|
+
* `reflection`, `blur`, `innerShdw`, `prstShdw`, `fillOverlay`, `alphaModFix`,
|
|
5183
|
+
* `alphaInv`, `grayscl`, `biLevel`, `duotone`, `hsl`, `lum`, `tint`) without
|
|
5184
|
+
* this module re-deriving the full shape-effect taxonomy already modelled on
|
|
5185
|
+
* `ShapeStyle`; {@link xml} preserves the node verbatim for lossless re-emit.
|
|
4690
5186
|
*
|
|
4691
|
-
* @
|
|
5187
|
+
* @example
|
|
5188
|
+
* ```ts
|
|
5189
|
+
* const effect: ParsedTableStyleEffect = {
|
|
5190
|
+
* kind: 'outerShdw',
|
|
5191
|
+
* xml: { '@_blurRad': '40000', '@_dist': '20000', '@_dir': '5400000' },
|
|
5192
|
+
* };
|
|
5193
|
+
* // => satisfies ParsedTableStyleEffect
|
|
5194
|
+
* ```
|
|
4692
5195
|
*/
|
|
5196
|
+
interface ParsedTableStyleEffect {
|
|
5197
|
+
/** The OOXML element's local name, e.g. `outerShdw`, `glow`, `softEdge`. */
|
|
5198
|
+
kind: string;
|
|
5199
|
+
/** Verbatim XML node (attributes + children) for lossless round-trip. */
|
|
5200
|
+
xml: XmlObject;
|
|
5201
|
+
}
|
|
5202
|
+
//#endregion
|
|
5203
|
+
//#region src/core/types/table.d.ts
|
|
4693
5204
|
/**
|
|
4694
5205
|
* Per-cell visual style for a table cell.
|
|
4695
5206
|
*
|
|
@@ -4726,6 +5237,14 @@ interface PptxTableCellStyle {
|
|
|
4726
5237
|
* future expansion alongside the run-properties round-trip path.
|
|
4727
5238
|
*/
|
|
4728
5239
|
colorXml?: XmlObject;
|
|
5240
|
+
/**
|
|
5241
|
+
* Typed theme colour reference for the cell text colour, set when
|
|
5242
|
+
* {@link colorXml} is a plain `a:schemeClr`. Wins on save, mirroring
|
|
5243
|
+
* `TextStyle.colorRef`. Distinct from {@link ParsedTableStyleFill.schemeColor},
|
|
5244
|
+
* which describes a `ppt/tableStyles.xml` section fill rather than an
|
|
5245
|
+
* individual cell override.
|
|
5246
|
+
*/
|
|
5247
|
+
colorRef?: PptxThemeColorRef;
|
|
4729
5248
|
backgroundColor?: string;
|
|
4730
5249
|
/**
|
|
4731
5250
|
* Raw XML colour-choice node preserved from cell `a:tcPr/a:solidFill` for
|
|
@@ -4733,6 +5252,12 @@ interface PptxTableCellStyle {
|
|
|
4733
5252
|
* {@link backgroundColor} still matches the original colour.
|
|
4734
5253
|
*/
|
|
4735
5254
|
backgroundColorXml?: XmlObject;
|
|
5255
|
+
/**
|
|
5256
|
+
* Typed theme colour reference for the cell fill, set when
|
|
5257
|
+
* {@link backgroundColorXml} is a plain `a:schemeClr`. Wins on save,
|
|
5258
|
+
* mirroring `ShapeStyle.fillColorRef`.
|
|
5259
|
+
*/
|
|
5260
|
+
backgroundColorRef?: PptxThemeColorRef;
|
|
4736
5261
|
borderColor?: string;
|
|
4737
5262
|
/** Top border width in px. */
|
|
4738
5263
|
borderTopWidth?: number;
|
|
@@ -5036,6 +5561,24 @@ interface PptxTableData {
|
|
|
5036
5561
|
bandColCycle?: number;
|
|
5037
5562
|
/** Right-to-left table layout from `a:tblPr/@rtl`. */
|
|
5038
5563
|
rtl?: boolean;
|
|
5564
|
+
/**
|
|
5565
|
+
* `a:tblPr`'s OWN fill (`CT_TableProperties` §21.1.3.15's
|
|
5566
|
+
* `EG_FillProperties`), independent of any `a:tblStyleLst`-referenced style
|
|
5567
|
+
* or that style's `a:tblBg`. Applied as the lowest-priority fill layer,
|
|
5568
|
+
* beneath the table style's `wholeTbl` fill. Real PowerPoint decks route
|
|
5569
|
+
* table appearance through `tableStyleId` instead, so this mainly matters
|
|
5570
|
+
* for non-PowerPoint authoring tools (issue G6).
|
|
5571
|
+
*/
|
|
5572
|
+
tableFill?: ParsedTableStyleFill;
|
|
5573
|
+
/**
|
|
5574
|
+
* `a:tblPr`'s own `a:effectLst` (or `a:effectDag`) effect chain,
|
|
5575
|
+
* independent of the referenced table style, decomposed into a typed
|
|
5576
|
+
* sequence of {@link ParsedTableStyleEffect} nodes (issue G6). Each node
|
|
5577
|
+
* keeps its own XML verbatim for lossless round-trip; empty array is
|
|
5578
|
+
* normalised to `undefined` by the parser so `tableEffects` is only ever
|
|
5579
|
+
* present when there is at least one effect.
|
|
5580
|
+
*/
|
|
5581
|
+
tableEffects?: ParsedTableStyleEffect[];
|
|
5039
5582
|
}
|
|
5040
5583
|
/**
|
|
5041
5584
|
* A single fill reference within a table style section.
|
|
@@ -5157,7 +5700,7 @@ interface ParsedTableStyleText {
|
|
|
5157
5700
|
* A single border side within a table style's `a:tcStyle/a:tcBdr`.
|
|
5158
5701
|
*
|
|
5159
5702
|
* Corresponds to one of `a:left`, `a:right`, `a:top`, `a:bottom`,
|
|
5160
|
-
* `a:insideH`, `a:insideV`, `a:tl2br`, `a:
|
|
5703
|
+
* `a:insideH`, `a:insideV`, `a:tl2br`, `a:tr2bl` (each a
|
|
5161
5704
|
* `CT_ThemeableLineStyle` wrapping an `a:ln`).
|
|
5162
5705
|
*
|
|
5163
5706
|
* @example
|
|
@@ -5197,19 +5740,34 @@ interface ParsedTableStyleBorders {
|
|
|
5197
5740
|
insideV?: ParsedTableStyleBorder;
|
|
5198
5741
|
/** Top-left to bottom-right diagonal. */
|
|
5199
5742
|
tl2br?: ParsedTableStyleBorder;
|
|
5200
|
-
/**
|
|
5201
|
-
|
|
5743
|
+
/**
|
|
5744
|
+
* Top-right to bottom-left diagonal (`a:tr2bl`, ECMA-376's
|
|
5745
|
+
* `CT_TableCellBorderStyle` sequence: left/right/top/bottom/insideH/
|
|
5746
|
+
* insideV/tl2br/tr2bl). The field keeps its historical `bl2tr` spelling
|
|
5747
|
+
* only in the sense that it names the same geometric anti-diagonal line
|
|
5748
|
+
* (top-right-to-bottom-left and bottom-left-to-top-right describe one
|
|
5749
|
+
* undirected diagonal); the parser accepts the real `a:tr2bl` element and,
|
|
5750
|
+
* leniently, a legacy `a:bl2tr` this app previously wrote (issue G4).
|
|
5751
|
+
*/
|
|
5752
|
+
tr2bl?: ParsedTableStyleBorder;
|
|
5202
5753
|
}
|
|
5203
5754
|
/**
|
|
5204
5755
|
* Table background style (CT_TableBackgroundStyle, ECMA-376 §21.1.3.7).
|
|
5205
5756
|
*
|
|
5206
|
-
* Corresponds to the `<a:tblBg>` child of `<a:tblStyle>`.
|
|
5207
|
-
*
|
|
5208
|
-
*
|
|
5757
|
+
* Corresponds to the `<a:tblBg>` child of `<a:tblStyle>`. Captures the
|
|
5758
|
+
* resolved scheme-fill colour, an unresolved style-matrix `a:fillRef`, and a
|
|
5759
|
+
* presence flag for effects (verbatim XML for the effect list is preserved
|
|
5760
|
+
* separately by the save path).
|
|
5209
5761
|
*/
|
|
5210
5762
|
interface ParsedTableBackground {
|
|
5211
5763
|
/** Solid fill (resolved from `a:fill > a:solidFill > a:schemeClr`). */
|
|
5212
5764
|
fill?: ParsedTableStyleFill;
|
|
5765
|
+
/**
|
|
5766
|
+
* Style-matrix fill reference (`<a:fillRef idx="N">...</a:fillRef>`),
|
|
5767
|
+
* mutually exclusive with {@link fill} (`a:fill` is the choice sibling of
|
|
5768
|
+
* `a:fillRef` in `CT_TableBackgroundStyle`).
|
|
5769
|
+
*/
|
|
5770
|
+
fillRef?: ParsedTableFillRef;
|
|
5213
5771
|
/** Has an `a:effectLst` child that should be round-tripped. */
|
|
5214
5772
|
hasEffectLst?: boolean;
|
|
5215
5773
|
}
|
|
@@ -5266,6 +5824,26 @@ interface ParsedTableStyleEntry {
|
|
|
5266
5824
|
swCellText?: ParsedTableStyleText;
|
|
5267
5825
|
neCellText?: ParsedTableStyleText;
|
|
5268
5826
|
nwCellText?: ParsedTableStyleText;
|
|
5827
|
+
/**
|
|
5828
|
+
* Per-role 3D bevel + lighting from `a:tcStyle/a:cell3D` (CT_Cell3D),
|
|
5829
|
+
* distinct from the per-cell `a:tcPr/a:cell3D` {@link PptxTableCellStyle}
|
|
5830
|
+
* already supports. None of PowerPoint's 74 built-in gallery styles use
|
|
5831
|
+
* this (0 hits in the built-in catalogue), so it only matters for a
|
|
5832
|
+
* hand-authored or third-party table style.
|
|
5833
|
+
*/
|
|
5834
|
+
wholeTblCell3D?: PptxTableCell3D;
|
|
5835
|
+
firstRowCell3D?: PptxTableCell3D;
|
|
5836
|
+
lastRowCell3D?: PptxTableCell3D;
|
|
5837
|
+
firstColCell3D?: PptxTableCell3D;
|
|
5838
|
+
lastColCell3D?: PptxTableCell3D;
|
|
5839
|
+
band1HCell3D?: PptxTableCell3D;
|
|
5840
|
+
band2HCell3D?: PptxTableCell3D;
|
|
5841
|
+
band1VCell3D?: PptxTableCell3D;
|
|
5842
|
+
band2VCell3D?: PptxTableCell3D;
|
|
5843
|
+
seCellCell3D?: PptxTableCell3D;
|
|
5844
|
+
swCellCell3D?: PptxTableCell3D;
|
|
5845
|
+
neCellCell3D?: PptxTableCell3D;
|
|
5846
|
+
nwCellCell3D?: PptxTableCell3D;
|
|
5269
5847
|
}
|
|
5270
5848
|
/**
|
|
5271
5849
|
* Map of GUID → table style entry.
|
|
@@ -5288,6 +5866,38 @@ interface ParsedTableStyleEntry {
|
|
|
5288
5866
|
type ParsedTableStyleMap = Record<string, ParsedTableStyleEntry>;
|
|
5289
5867
|
//#endregion
|
|
5290
5868
|
//#region src/core/types/elements.d.ts
|
|
5869
|
+
/**
|
|
5870
|
+
* Accessibility metadata from `p:cNvPr/a:extLst`'s "Mark as decorative"
|
|
5871
|
+
* vendor extension (issue G16). PowerPoint's Alt Text pane writes
|
|
5872
|
+
* `a:ext[@uri='{C183D7F6-B498-43B3-948B-1728B52AA6E4}']/adec:decorative
|
|
5873
|
+
* val="1"` when a shape or image is marked decorative; mixed into the
|
|
5874
|
+
* element variants whose `p:cNvPr` that pane covers.
|
|
5875
|
+
*/
|
|
5876
|
+
interface PptxAccessibilityProperties {
|
|
5877
|
+
/**
|
|
5878
|
+
* Whether the element is marked decorative. When true, alt text /
|
|
5879
|
+
* aria-label / Markdown export should skip describing the element even
|
|
5880
|
+
* when {@link PptxImageProperties.altText} (or similar) is present.
|
|
5881
|
+
*/
|
|
5882
|
+
isDecorative?: boolean;
|
|
5883
|
+
}
|
|
5884
|
+
/**
|
|
5885
|
+
* `a:cNvPicPr/@preferRelativeResize` (issue G13), a picture-only non-visual
|
|
5886
|
+
* property distinct from `a:picLocks`.
|
|
5887
|
+
*/
|
|
5888
|
+
interface PptxPictureNonVisualProperties {
|
|
5889
|
+
/**
|
|
5890
|
+
* `a:cNvPicPr/@preferRelativeResize` (ST_Boolean, defaults to `true` when
|
|
5891
|
+
* absent). Controls whether a picture's crop rectangle is reinterpreted
|
|
5892
|
+
* relative to the picture's ORIGINAL dimensions or its CURRENT
|
|
5893
|
+
* (already-resized) dimensions when it is resized again after being
|
|
5894
|
+
* cropped. Parsed and round-tripped for now; not yet wired into
|
|
5895
|
+
* resize-after-crop arithmetic (this app always uses current-size
|
|
5896
|
+
* semantics, which only diverges from `preferRelativeResize="0"` on a
|
|
5897
|
+
* second resize after a crop).
|
|
5898
|
+
*/
|
|
5899
|
+
preferRelativeResize?: boolean;
|
|
5900
|
+
}
|
|
5291
5901
|
/**
|
|
5292
5902
|
* A text box — a plain rectangle containing text, typically with no
|
|
5293
5903
|
* visible fill or stroke.
|
|
@@ -5321,7 +5931,7 @@ interface TextPptxElement extends PptxElementBase, PptxTextProperties, PptxShape
|
|
|
5321
5931
|
* // => satisfies ShapePptxElement
|
|
5322
5932
|
* ```
|
|
5323
5933
|
*/
|
|
5324
|
-
interface ShapePptxElement extends PptxElementBase, PptxTextProperties, PptxShapeProperties, PptxCustomPathProperties {
|
|
5934
|
+
interface ShapePptxElement extends PptxElementBase, PptxTextProperties, PptxShapeProperties, PptxCustomPathProperties, PptxAccessibilityProperties {
|
|
5325
5935
|
type: 'shape';
|
|
5326
5936
|
}
|
|
5327
5937
|
/**
|
|
@@ -5360,7 +5970,7 @@ interface ConnectorPptxElement extends PptxElementBase, PptxTextProperties, Pptx
|
|
|
5360
5970
|
* // => satisfies ImagePptxElement
|
|
5361
5971
|
* ```
|
|
5362
5972
|
*/
|
|
5363
|
-
interface ImagePptxElement extends PptxElementBase, PptxShapeProperties, PptxCustomPathProperties, PptxImageProperties {
|
|
5973
|
+
interface ImagePptxElement extends PptxElementBase, PptxShapeProperties, PptxCustomPathProperties, PptxImageProperties, PptxAccessibilityProperties, PptxPictureNonVisualProperties {
|
|
5364
5974
|
type: 'image';
|
|
5365
5975
|
}
|
|
5366
5976
|
/**
|
|
@@ -5369,7 +5979,7 @@ interface ImagePptxElement extends PptxElementBase, PptxShapeProperties, PptxCus
|
|
|
5369
5979
|
* Functionally identical to {@link ImagePptxElement} but distinguished by
|
|
5370
5980
|
* the `type` discriminant for semantic clarity.
|
|
5371
5981
|
*/
|
|
5372
|
-
interface PicturePptxElement extends PptxElementBase, PptxShapeProperties, PptxCustomPathProperties, PptxImageProperties {
|
|
5982
|
+
interface PicturePptxElement extends PptxElementBase, PptxShapeProperties, PptxCustomPathProperties, PptxImageProperties, PptxAccessibilityProperties, PptxPictureNonVisualProperties {
|
|
5373
5983
|
type: 'picture';
|
|
5374
5984
|
}
|
|
5375
5985
|
/**
|
|
@@ -5409,6 +6019,13 @@ interface TablePptxElement extends PptxElementBase {
|
|
|
5409
6019
|
type: 'table';
|
|
5410
6020
|
/** Parsed table cell data for editing. */
|
|
5411
6021
|
tableData?: PptxTableData;
|
|
6022
|
+
/**
|
|
6023
|
+
* Accessibility description from `p:nvGraphicFramePr/p:cNvPr/@descr`, the
|
|
6024
|
+
* same non-visual-properties attribute a picture's alt text comes from.
|
|
6025
|
+
*/
|
|
6026
|
+
altText?: string;
|
|
6027
|
+
/** Accessibility title from `p:nvGraphicFramePr/p:cNvPr/@title`. */
|
|
6028
|
+
title?: string;
|
|
5412
6029
|
/**
|
|
5413
6030
|
* Unrecognised extensions captured from `a:graphicData/a:extLst` so they
|
|
5414
6031
|
* round-trip losslessly. See {@link PptxGraphicFrameExtension}.
|
|
@@ -5424,6 +6041,10 @@ interface TablePptxElement extends PptxElementBase {
|
|
|
5424
6041
|
interface ChartPptxElement extends PptxElementBase {
|
|
5425
6042
|
type: 'chart';
|
|
5426
6043
|
chartData?: PptxChartData;
|
|
6044
|
+
/** Accessibility description from `p:nvGraphicFramePr/p:cNvPr/@descr`. */
|
|
6045
|
+
altText?: string;
|
|
6046
|
+
/** Accessibility title from `p:nvGraphicFramePr/p:cNvPr/@title`. */
|
|
6047
|
+
title?: string;
|
|
5427
6048
|
/** Unrecognised graphicFrame extLst extensions, captured verbatim for round-trip. */
|
|
5428
6049
|
extensionXml?: PptxGraphicFrameExtension[];
|
|
5429
6050
|
}
|
|
@@ -5441,6 +6062,10 @@ interface ChartPptxElement extends PptxElementBase {
|
|
|
5441
6062
|
interface SmartArtPptxElement extends PptxElementBase {
|
|
5442
6063
|
type: 'smartArt';
|
|
5443
6064
|
smartArtData?: PptxSmartArtData;
|
|
6065
|
+
/** Accessibility description from `p:nvGraphicFramePr/p:cNvPr/@descr`. */
|
|
6066
|
+
altText?: string;
|
|
6067
|
+
/** Accessibility title from `p:nvGraphicFramePr/p:cNvPr/@title`. */
|
|
6068
|
+
title?: string;
|
|
5444
6069
|
/** Unrecognised graphicFrame extLst extensions, captured verbatim for round-trip. */
|
|
5445
6070
|
extensionXml?: PptxGraphicFrameExtension[];
|
|
5446
6071
|
}
|
|
@@ -5519,6 +6144,18 @@ interface OlePptxElement extends PptxElementBase {
|
|
|
5519
6144
|
* Only meaningful when {@link isLinked} is `true`. ECMA-376 §19.3.1.28.
|
|
5520
6145
|
*/
|
|
5521
6146
|
oleFollowColorScheme?: 'none' | 'full' | 'textAndBackground';
|
|
6147
|
+
/**
|
|
6148
|
+
* `p:link/@updateAutomatic` (`CT_OleObjectLink`, ECMA-376 §19.3.2.4):
|
|
6149
|
+
* whether a LINKED OLE object refreshes automatically from its source
|
|
6150
|
+
* (PowerPoint's Edit Links dialog "Automatic" vs. "Manual" radio buttons).
|
|
6151
|
+
* Only meaningful when {@link isLinked} is `true`. The schema default is
|
|
6152
|
+
* `false`; `undefined` means the source authored no explicit value.
|
|
6153
|
+
*/
|
|
6154
|
+
oleUpdateAutomatic?: boolean;
|
|
6155
|
+
/** Accessibility description from `p:nvGraphicFramePr/p:cNvPr/@descr`. */
|
|
6156
|
+
altText?: string;
|
|
6157
|
+
/** Accessibility title from `p:nvGraphicFramePr/p:cNvPr/@title`. */
|
|
6158
|
+
title?: string;
|
|
5522
6159
|
/** Unrecognised graphicFrame extLst extensions, captured verbatim for round-trip. */
|
|
5523
6160
|
extensionXml?: PptxGraphicFrameExtension[];
|
|
5524
6161
|
}
|
|
@@ -5610,6 +6247,15 @@ interface MediaPptxElement extends PptxElementBase {
|
|
|
5610
6247
|
* (`r:embed`). Defaults to embedded when undefined.
|
|
5611
6248
|
*/
|
|
5612
6249
|
isLinked?: boolean;
|
|
6250
|
+
/**
|
|
6251
|
+
* Accessibility description from `p:nvGraphicFramePr/p:cNvPr/@descr`.
|
|
6252
|
+
* Only populated for the `p:graphicFrame`-shaped (SDK-created) media
|
|
6253
|
+
* form; a `p:pic`-shaped media element's alt text is not currently
|
|
6254
|
+
* parsed (see `PptxHandlerRuntimePictureParsing.ts`).
|
|
6255
|
+
*/
|
|
6256
|
+
altText?: string;
|
|
6257
|
+
/** Accessibility title from `p:nvGraphicFramePr/p:cNvPr/@title`. Same scope note as {@link altText}. */
|
|
6258
|
+
title?: string;
|
|
5613
6259
|
/** Unrecognised graphicFrame extLst extensions, captured verbatim for round-trip. */
|
|
5614
6260
|
extensionXml?: PptxGraphicFrameExtension[];
|
|
5615
6261
|
}
|
|
@@ -6113,12 +6759,63 @@ type PptxAnimationTrigger = 'onClick' | 'onShapeClick' | 'onHover' | 'afterPrevi
|
|
|
6113
6759
|
* is preserved alongside other animations.
|
|
6114
6760
|
*/
|
|
6115
6761
|
type PptxNativeAnimationKind = 'media';
|
|
6762
|
+
/**
|
|
6763
|
+
* `p:spTgt/p:graphicEl` (CT_TLGraphicalObjectBuildElement, ECMA-376 S19.5.34):
|
|
6764
|
+
* identifies exactly which series/category/element of a chart or diagram
|
|
6765
|
+
* build a per-stage effect reveals, when a deck authors one effect per stage
|
|
6766
|
+
* instead of a single staged `p:bldGraphic` reveal.
|
|
6767
|
+
*/
|
|
6768
|
+
interface PptxAnimationGraphicElementTarget {
|
|
6769
|
+
/** Which graphic kind: `p:dgm` (diagram) or `p:chart`. */
|
|
6770
|
+
kind: 'dgm' | 'chart';
|
|
6771
|
+
/** `@_seriesIdx`, 0-based series index, when the target is series-scoped. */
|
|
6772
|
+
seriesIdx?: number;
|
|
6773
|
+
/** `@_categoryIdx`, 0-based category index, when the target is category-scoped. */
|
|
6774
|
+
categoryIdx?: number;
|
|
6775
|
+
/**
|
|
6776
|
+
* `p:dgm/@_id` (CT_TLBuildDiagram, ECMA-376 S19.5.10): the diagram DATA MODEL
|
|
6777
|
+
* point id (`dgm:pt/@modelId`) this per-stage effect reveals, when a
|
|
6778
|
+
* `p:bldDgm` build authors one effect per node instead of a single staged
|
|
6779
|
+
* reveal. `dgm`-kind targets only; a `chart`-kind target never carries this.
|
|
6780
|
+
* Matches `PptxSmartArtNode.id` (parsed from the same `@modelId`), so a
|
|
6781
|
+
* diagram renderer can reveal the exact authored node.
|
|
6782
|
+
*/
|
|
6783
|
+
id?: string;
|
|
6784
|
+
/**
|
|
6785
|
+
* `@_bldStep`: `ST_TLChartBuildStep` (`category` / `categoryEl` / `series` /
|
|
6786
|
+
* `seriesEl`) for a `chart`-kind target, or `ST_TLDiagramBuildStep`
|
|
6787
|
+
* (`sp` / `bg`) for a `dgm`-kind target.
|
|
6788
|
+
*/
|
|
6789
|
+
bldStep?: string;
|
|
6790
|
+
}
|
|
6791
|
+
/**
|
|
6792
|
+
* `p:spTgt/p:oleChartEl` (CT_TLOleChartTargetElement, ECMA-376 S19.5.44):
|
|
6793
|
+
* legacy pre-DrawingML OLE Graph chart sub-element targeting.
|
|
6794
|
+
*/
|
|
6795
|
+
interface PptxAnimationOleChartElementTarget {
|
|
6796
|
+
/** `@_type` (ST_TLOleChartSubelementType): entireChart / series / category / ... */
|
|
6797
|
+
subelementType: string;
|
|
6798
|
+
/** `@_lvl`, optional sub-element level. */
|
|
6799
|
+
level?: number;
|
|
6800
|
+
}
|
|
6116
6801
|
/** A target selected by `p:tgtEl` in the PresentationML timing model. */
|
|
6117
6802
|
type PptxAnimationTarget = {
|
|
6118
6803
|
type: 'shape';
|
|
6119
6804
|
shapeId: string;
|
|
6120
6805
|
/** Whether `p:spTgt/p:bg` limits the effect to the shape background. */
|
|
6121
6806
|
backgroundOnly?: boolean;
|
|
6807
|
+
/**
|
|
6808
|
+
* `p:spTgt/p:subSp/@_spid`: the id of a shape NESTED inside the group
|
|
6809
|
+
* named by {@link shapeId} (CT_TLSubShapeId, ECMA-376 S19.5.71).
|
|
6810
|
+
* PowerPoint authors this when a user animates one member of a group
|
|
6811
|
+
* without ungrouping it: `shapeId` stays the outer group's id for
|
|
6812
|
+
* round-trip, but this sub-shape is the real playback target.
|
|
6813
|
+
*/
|
|
6814
|
+
subShapeId?: string;
|
|
6815
|
+
/** `p:spTgt/p:graphicEl`: chart/diagram series/category/element target. */
|
|
6816
|
+
graphicElement?: PptxAnimationGraphicElementTarget;
|
|
6817
|
+
/** `p:spTgt/p:oleChartEl`: legacy OLE chart sub-element target. */
|
|
6818
|
+
oleChartElement?: PptxAnimationOleChartElementTarget;
|
|
6122
6819
|
rawXml?: XmlObject;
|
|
6123
6820
|
} | {
|
|
6124
6821
|
type: 'slide';
|
|
@@ -6498,6 +7195,74 @@ interface PptxNativeAnimation {
|
|
|
6498
7195
|
* PowerPoint that only emit the SMIL-style filter string.
|
|
6499
7196
|
*/
|
|
6500
7197
|
effectFilter?: PptxAnimationEffectFilter;
|
|
7198
|
+
/**
|
|
7199
|
+
* This effect's own `p:cTn/@_id` (a raw OOXML time-node id, not a shape
|
|
7200
|
+
* id). Lets playback resolve a `p:cond/@tn` dependency (see
|
|
7201
|
+
* {@link AnimationCondition.targetTimeNodeId}) against the SPECIFIC node
|
|
7202
|
+
* it names rather than assuming it is always the positionally-previous
|
|
7203
|
+
* effect. Absent when the node carried no `@_id`.
|
|
7204
|
+
*/
|
|
7205
|
+
nodeId?: number;
|
|
7206
|
+
/**
|
|
7207
|
+
* Interpolation mode for this effect's PRIMARY `p:anim`-family behaviour
|
|
7208
|
+
* (the same node {@link keyframes}/{@link attrName} were read from), from
|
|
7209
|
+
* `@_calcmode` (ST_TLAnimateBehaviorCalcMode, ECMA-376 S19.5.2). See
|
|
7210
|
+
* {@link PptxAttributeAnimation.calcMode} for the per-component version.
|
|
7211
|
+
*/
|
|
7212
|
+
calcMode?: 'discrete' | 'lin' | 'fmla';
|
|
7213
|
+
/**
|
|
7214
|
+
* `p:cBhvr/@_additive` (ST_TLBehaviorAdditiveType, ECMA-376 S19.5.4):
|
|
7215
|
+
* controls how this behaviour's value composites with sibling behaviours
|
|
7216
|
+
* driving the same attribute on the same target. `sum` accumulates
|
|
7217
|
+
* (e.g. a combined scale+rotate), `repl`/`base`/`none`/`mult` replace or
|
|
7218
|
+
* otherwise combine. Absent means the OOXML default (`base`).
|
|
7219
|
+
*/
|
|
7220
|
+
cBhvrAdditive?: 'base' | 'sum' | 'repl' | 'mult' | 'none';
|
|
7221
|
+
/**
|
|
7222
|
+
* `p:cBhvr/@_accumulate` (ST_TLBehaviorAccumulateType): `always` means
|
|
7223
|
+
* each `p:cTn/@repeatCount` repeat starts from the PREVIOUS repeat's end
|
|
7224
|
+
* value (e.g. a 3x Spin totals 1080deg instead of replaying 0-360 three
|
|
7225
|
+
* times); `none` (the OOXML default) resets every repeat.
|
|
7226
|
+
*/
|
|
7227
|
+
cBhvrAccumulate?: 'none' | 'always';
|
|
7228
|
+
/**
|
|
7229
|
+
* `p:cBhvr/@_xfrmType` (only meaningful on `p:animMotion`): `point`
|
|
7230
|
+
* (default) or `img`, a legacy compatibility hint. Round-tripped only.
|
|
7231
|
+
*/
|
|
7232
|
+
cBhvrXfrmType?: 'point' | 'img';
|
|
7233
|
+
/**
|
|
7234
|
+
* `p:cBhvr/@_override` (ST_TLBehaviorOverrideType): `normal` (default) or
|
|
7235
|
+
* `childStyle`, a legacy compatibility hint. Round-tripped only.
|
|
7236
|
+
*/
|
|
7237
|
+
cBhvrOverride?: 'normal' | 'childStyle';
|
|
7238
|
+
/**
|
|
7239
|
+
* `p:set` discrete attribute assignments composed alongside this effect
|
|
7240
|
+
* (ECMA-376 S19.5.79 CT_TLSetBehavior): an instantaneous (non-interpolated)
|
|
7241
|
+
* value change, as opposed to {@link attributeAnimations}'s `p:anim`
|
|
7242
|
+
* keyframe ramps. PowerPoint authors several font-style emphasis effects
|
|
7243
|
+
* this way (Bold Reveal, Underline, Bold Flash, Change Font Size), since
|
|
7244
|
+
* "on/off" or "size N" has nothing to interpolate. Not yet consulted by
|
|
7245
|
+
* shared playback (round-trip/typed-model only so far).
|
|
7246
|
+
*/
|
|
7247
|
+
setAnimations?: PptxSetAnimation[];
|
|
7248
|
+
}
|
|
7249
|
+
/**
|
|
7250
|
+
* One `p:set` discrete (non-interpolated) attribute assignment composed
|
|
7251
|
+
* alongside an authored effect. See {@link PptxNativeAnimation.setAnimations}.
|
|
7252
|
+
*
|
|
7253
|
+
* @see ECMA-376 S19.5.79 CT_TLSetBehavior
|
|
7254
|
+
*/
|
|
7255
|
+
interface PptxSetAnimation {
|
|
7256
|
+
/** Lowercased target attribute from `p:cBhvr/p:attrNameLst/p:attrName`. */
|
|
7257
|
+
attrName: string;
|
|
7258
|
+
/** Decoded value from `p:to` (same variant shape as a `p:tav/p:val`). */
|
|
7259
|
+
value: string | boolean | number;
|
|
7260
|
+
/** Discriminant indicating which `p:to` child carried the value. */
|
|
7261
|
+
valueType: 'str' | 'bool' | 'int' | 'flt' | 'clr';
|
|
7262
|
+
/** Duration from this behaviour's nested `p:cTn/@dur`. */
|
|
7263
|
+
durationMs?: number;
|
|
7264
|
+
/** Start offset from this behaviour's nested `p:stCondLst`. */
|
|
7265
|
+
delayMs?: number;
|
|
6501
7266
|
}
|
|
6502
7267
|
/**
|
|
6503
7268
|
* Parsed `p:animEffect/@filter` (+ `@transition`) descriptor. ECMA-376
|
|
@@ -6564,6 +7329,14 @@ interface PptxAttributeAnimation {
|
|
|
6564
7329
|
durationMs?: number;
|
|
6565
7330
|
/** Start offset from this behaviour's nested `p:stCondLst`. */
|
|
6566
7331
|
delayMs?: number;
|
|
7332
|
+
/**
|
|
7333
|
+
* Interpolation mode from this behaviour's own `@_calcmode`
|
|
7334
|
+
* (ST_TLAnimateBehaviorCalcMode, ECMA-376 S19.5.2): `discrete` snaps to
|
|
7335
|
+
* each `p:tav` stop with no interpolation, `lin` (the OOXML default)
|
|
7336
|
+
* interpolates linearly, `fmla` evaluates `p:tav/@fmla` (not consulted at
|
|
7337
|
+
* playback here; formulas are round-tripped only). Absent means `lin`.
|
|
7338
|
+
*/
|
|
7339
|
+
calcMode?: 'discrete' | 'lin' | 'fmla';
|
|
6567
7340
|
}
|
|
6568
7341
|
/** Signed HSL channel deltas parsed from `p:animClr/p:by/p:hsl`. */
|
|
6569
7342
|
interface PptxHslColorDelta {
|
|
@@ -6630,7 +7403,7 @@ interface PptxTextAnimationTarget {
|
|
|
6630
7403
|
* These map directly to OOXML condition event attribute values
|
|
6631
7404
|
* (ISO/IEC 29500-1 S19.5.28 CT_TLTimeCondition).
|
|
6632
7405
|
*/
|
|
6633
|
-
type AnimationConditionEvent = 'onBegin' | 'onEnd' | 'begin' | 'end' | 'onClick' | 'onMouseOver' | 'onMouseOut' | 'onNext' | 'onPrev' | 'onStopAudio';
|
|
7406
|
+
type AnimationConditionEvent = 'onBegin' | 'onEnd' | 'begin' | 'end' | 'onClick' | 'onMouseOver' | 'onMouseOut' | 'onNext' | 'onPrev' | 'onStopAudio' | 'onDblClick';
|
|
6634
7407
|
/**
|
|
6635
7408
|
* Structured representation of a single OOXML animation condition
|
|
6636
7409
|
* from `p:cond` elements inside `p:stCondLst` or `p:endCondLst`.
|
|
@@ -6757,6 +7530,16 @@ interface PptxElementAnimation {
|
|
|
6757
7530
|
* OOXML equivalent and is not required for playback.
|
|
6758
7531
|
*/
|
|
6759
7532
|
soundFileName?: string;
|
|
7533
|
+
/**
|
|
7534
|
+
* Per-build-level timing template(s) from the {@link sequence}'s own
|
|
7535
|
+
* `p:bldP/p:tmplLst` (ECMA-376 §19.5.84), carried over from the loaded
|
|
7536
|
+
* `PptxNativeAnimation.buildTemplates` this element animation was derived
|
|
7537
|
+
* from so a full timing-tree rebuild (`PptxAnimationWriteService`'s
|
|
7538
|
+
* `buildTimingXml`, when the slide had no prior `p:timing`) can re-emit
|
|
7539
|
+
* them instead of silently dropping the deck's authored per-level
|
|
7540
|
+
* defaults. Absent when {@link sequence} carries no such template.
|
|
7541
|
+
*/
|
|
7542
|
+
buildTemplates?: PptxTimingTemplate[];
|
|
6760
7543
|
}
|
|
6761
7544
|
/**
|
|
6762
7545
|
* A read-only anchor representing one of the deck's own effect groups: a
|
|
@@ -7673,6 +8456,22 @@ interface PptxActiveXControl {
|
|
|
7673
8456
|
name?: string;
|
|
7674
8457
|
/** Shape ID this control is linked to (from @spid). */
|
|
7675
8458
|
shapeId?: string;
|
|
8459
|
+
/**
|
|
8460
|
+
* `p:control/@showAsIcon` (CT_Control, ECMA-376 S19.3.1.2): whether the
|
|
8461
|
+
* control renders as its static icon rather than its live appearance.
|
|
8462
|
+
* `undefined` when the source authored no explicit value (schema default
|
|
8463
|
+
* `false`).
|
|
8464
|
+
*/
|
|
8465
|
+
showAsIcon?: boolean;
|
|
8466
|
+
/**
|
|
8467
|
+
* `p:control/@imgW` in EMU (ST_PositiveCoordinate32): the width the host
|
|
8468
|
+
* reserves for the control's icon/preview image. Distinct from
|
|
8469
|
+
* {@link width}, which is the fallback `p:pic`'s own `a:ext/@cx` in px;
|
|
8470
|
+
* `imgW`/`imgH` are direct attributes on `p:control` itself.
|
|
8471
|
+
*/
|
|
8472
|
+
imgWidthEmu?: number;
|
|
8473
|
+
/** `p:control/@imgH` in EMU (ST_PositiveCoordinate32). @see imgWidthEmu */
|
|
8474
|
+
imgHeightEmu?: number;
|
|
7676
8475
|
/** X position (px) of the control's fallback picture, if present. */
|
|
7677
8476
|
x?: number;
|
|
7678
8477
|
/** Y position (px) of the control's fallback picture, if present. */
|
|
@@ -7970,10 +8769,32 @@ interface PptxPresentationProperties {
|
|
|
7970
8769
|
printProperties?: PptxPresentationPrintProperties | null;
|
|
7971
8770
|
/** Most-recently-used colours from the presentation palette. */
|
|
7972
8771
|
mruColors?: string[];
|
|
7973
|
-
/**
|
|
8772
|
+
/**
|
|
8773
|
+
* Pen colour for presentation mode annotations (from `p:showPr/p:penClr`).
|
|
8774
|
+
* `p:penClr` is a full `EG_ColorChoice` (P1-G2): a scheme/preset/system
|
|
8775
|
+
* swatch resolves to a hex string here just like a direct `a:srgbClr`.
|
|
8776
|
+
*/
|
|
7974
8777
|
penColor?: string;
|
|
8778
|
+
/**
|
|
8779
|
+
* The resolved hex value {@link penColor} had at parse time, and the
|
|
8780
|
+
* original `p:penClr` colour-choice XML node, preserved so a save that
|
|
8781
|
+
* never touches the pen colour re-emits the original scheme/preset
|
|
8782
|
+
* reference verbatim instead of flattening it to a baked `a:srgbClr`.
|
|
8783
|
+
* Internal round-trip bookkeeping; not meant to be set by API callers.
|
|
8784
|
+
*/
|
|
8785
|
+
penColorOriginal?: string;
|
|
8786
|
+
/** @see penColorOriginal */
|
|
8787
|
+
penColorXml?: XmlObject;
|
|
7975
8788
|
/** Kiosk auto-restart interval in milliseconds (from `p:kiosk/@restart`). Only meaningful when showType is "kiosk". */
|
|
7976
8789
|
kioskRestartTime?: number;
|
|
8790
|
+
/**
|
|
8791
|
+
* `p:showPr/p:browse/@showScrollbar` (CT_ShowInfoBrowse §19.2.1.10 /
|
|
8792
|
+
* §19.3.1.43), the "Show scrollbar" checkbox in PowerPoint's Set Up Show
|
|
8793
|
+
* dialog. Only meaningful when `showType` is `"browsed"`; the schema
|
|
8794
|
+
* default is `true`. `undefined` means the source authored no explicit
|
|
8795
|
+
* value (or `showType` is not `"browsed"`).
|
|
8796
|
+
*/
|
|
8797
|
+
showScrollbar?: boolean;
|
|
7977
8798
|
}
|
|
7978
8799
|
/**
|
|
7979
8800
|
* Slide dimensions from `p:sldSz` (CT_SlideSize, ECMA-376 §19.2.1.39).
|
|
@@ -8107,6 +8928,34 @@ interface PptxPhotoAlbum {
|
|
|
8107
8928
|
layout?: string;
|
|
8108
8929
|
/** Frame style applied to each photo (e.g. "frameStyle1"). */
|
|
8109
8930
|
frame?: string;
|
|
8931
|
+
/**
|
|
8932
|
+
* `p:photoAlbum/@isPhoto` (ECMA-376 S19.2.1.27, CT_PhotoAlbum): whether
|
|
8933
|
+
* the pictures placed by the album wizard are real photographs, as
|
|
8934
|
+
* opposed to clip art or other embedded images. `undefined` when the
|
|
8935
|
+
* source authored no explicit value (schema default `false`); this is a
|
|
8936
|
+
* purely declarative wizard-provenance flag, not something this library
|
|
8937
|
+
* gates any layout/frame behaviour on.
|
|
8938
|
+
*/
|
|
8939
|
+
isPhoto?: boolean;
|
|
8940
|
+
}
|
|
8941
|
+
/**
|
|
8942
|
+
* A recognizer-owned `p:smartTags` reference from `presentation.xml`
|
|
8943
|
+
* (CT_SmartTags, ECMA-376 S19.2.1.42): a bare relationship id pointing at a
|
|
8944
|
+
* legacy Office "Smart Tags" recognizer part, distinct from the
|
|
8945
|
+
* user-authored `p:tags` construct (see {@link PptxTagCollection}).
|
|
8946
|
+
*
|
|
8947
|
+
* This library has no data model for recognizer part CONTENT (there is no
|
|
8948
|
+
* way to create, inspect, or edit one through the public API), so this type
|
|
8949
|
+
* only captures enough to preserve an authored reference losslessly: the
|
|
8950
|
+
* relationship id and, when resolvable, the target part path.
|
|
8951
|
+
*/
|
|
8952
|
+
interface PptxSmartTagsReference {
|
|
8953
|
+
/** Relationship id from `p:smartTags/@r:id`. */
|
|
8954
|
+
relId: string;
|
|
8955
|
+
/** Resolved ZIP path of the referenced recognizer part, when resolvable. */
|
|
8956
|
+
targetPath?: string;
|
|
8957
|
+
/** Raw `p:smartTags` XML retained for lossless round-trip. */
|
|
8958
|
+
rawXml?: XmlObject;
|
|
8110
8959
|
}
|
|
8111
8960
|
/**
|
|
8112
8961
|
* East Asian line-break (kinsoku) settings from `p:kinsoku` in `presentation.xml`.
|
|
@@ -8171,6 +9020,13 @@ interface PptxData {
|
|
|
8171
9020
|
themeOptions?: PptxThemeOption[];
|
|
8172
9021
|
/** Parsed table style definitions from `ppt/tableStyles.xml`. */
|
|
8173
9022
|
tableStyleMap?: ParsedTableStyleMap;
|
|
9023
|
+
/**
|
|
9024
|
+
* The current default table style GUID (`ppt/tableStyles.xml`'s
|
|
9025
|
+
* `a:tblStyleLst/@def`): the style PowerPoint applies to a newly inserted
|
|
9026
|
+
* table. Matches `PptxSaveOptions.tableStylesDefaultId` so a save call
|
|
9027
|
+
* that omits it can fall back to what was loaded.
|
|
9028
|
+
*/
|
|
9029
|
+
tableStylesDefaultId?: string;
|
|
8174
9030
|
/** Whether the presentation is password-protected. */
|
|
8175
9031
|
isPasswordProtected?: boolean;
|
|
8176
9032
|
/** Embedded font data (name + binary data URL) extracted from the presentation. */
|
|
@@ -8230,6 +9086,14 @@ interface PptxData {
|
|
|
8230
9086
|
modifyVerifier?: PptxModifyVerifier;
|
|
8231
9087
|
/** Photo album metadata from `p:photoAlbum` in `presentation.xml`. */
|
|
8232
9088
|
photoAlbum?: PptxPhotoAlbum;
|
|
9089
|
+
/**
|
|
9090
|
+
* Legacy Smart Tags recognizer reference from `p:smartTags` in
|
|
9091
|
+
* `presentation.xml`. Read-only: there is no data model for the
|
|
9092
|
+
* recognizer part's own content, so this exists to make the reference
|
|
9093
|
+
* inspectable and to prove it survives a save (the owning part and its
|
|
9094
|
+
* relationship are preserved passively, like any other unmodelled part).
|
|
9095
|
+
*/
|
|
9096
|
+
smartTags?: PptxSmartTagsReference;
|
|
8233
9097
|
/** East Asian line-break settings from `p:kinsoku` in `presentation.xml`. */
|
|
8234
9098
|
kinsoku?: PptxKinsoku;
|
|
8235
9099
|
/** Custom XML data parts from `customXml/` in the OPC package. */
|
|
@@ -8358,7 +9222,7 @@ interface PptxEmbeddedFont {
|
|
|
8358
9222
|
originalPartBytes?: Uint8Array;
|
|
8359
9223
|
}
|
|
8360
9224
|
//#endregion
|
|
8361
|
-
//#region ../core/dist/index-
|
|
9225
|
+
//#region ../core/dist/index-Coh2DmEv.d.ts
|
|
8362
9226
|
//#region src/core/types/theme-presets.d.ts
|
|
8363
9227
|
/**
|
|
8364
9228
|
* A complete theme preset that can be applied to a presentation.
|
|
@@ -8395,6 +9259,14 @@ type FillInput = {
|
|
|
8395
9259
|
type: 'solid';
|
|
8396
9260
|
color: string;
|
|
8397
9261
|
opacity?: number;
|
|
9262
|
+
/**
|
|
9263
|
+
* A theme colour to use instead of a plain hex. When set, the shape
|
|
9264
|
+
* saves as `<a:schemeClr>` (e.g. `{ scheme: 'accent1', lumMod: 0.8 }`
|
|
9265
|
+
* for "Accent 1, Lighter 80%") so it keeps following the theme after a
|
|
9266
|
+
* later theme change; `color` still supplies the immediate resolved
|
|
9267
|
+
* hex for renderers that read it directly.
|
|
9268
|
+
*/
|
|
9269
|
+
themeColorRef?: PptxThemeColorRef;
|
|
8398
9270
|
} | {
|
|
8399
9271
|
type: 'gradient';
|
|
8400
9272
|
/**
|
|
@@ -8430,6 +9302,8 @@ interface StrokeInput {
|
|
|
8430
9302
|
opacity?: number;
|
|
8431
9303
|
join?: 'round' | 'bevel' | 'miter';
|
|
8432
9304
|
cap?: 'flat' | 'rnd' | 'sq';
|
|
9305
|
+
/** A theme colour for the outline; see {@link FillInput}'s `themeColorRef`. */
|
|
9306
|
+
themeColorRef?: PptxThemeColorRef;
|
|
8433
9307
|
}
|
|
8434
9308
|
interface ShadowInput {
|
|
8435
9309
|
color?: string;
|
|
@@ -8446,6 +9320,8 @@ interface TextStyleInput {
|
|
|
8446
9320
|
underline?: boolean;
|
|
8447
9321
|
strikethrough?: boolean;
|
|
8448
9322
|
color?: string;
|
|
9323
|
+
/** A theme colour for the run; see {@link FillInput}'s `themeColorRef`. */
|
|
9324
|
+
themeColorRef?: PptxThemeColorRef;
|
|
8449
9325
|
alignment?: 'left' | 'center' | 'right' | 'justify';
|
|
8450
9326
|
verticalAlignment?: 'top' | 'middle' | 'bottom';
|
|
8451
9327
|
lineSpacing?: number;
|
|
@@ -9073,6 +9949,24 @@ interface PptxHandlerSaveOptions {
|
|
|
9073
9949
|
* part untouched.
|
|
9074
9950
|
*/
|
|
9075
9951
|
tableStyles?: ParsedTableStyleMap;
|
|
9952
|
+
/**
|
|
9953
|
+
* Set `ppt/tableStyles.xml`'s `<a:tblStyleLst @def>` to this style GUID
|
|
9954
|
+
* (normalised to uppercase-with-braces). `undefined` preserves the
|
|
9955
|
+
* existing default; there is no removal form (`@def` is required by the
|
|
9956
|
+
* schema and PowerPoint always points it at a real style). No-op when the
|
|
9957
|
+
* archive has no `ppt/tableStyles.xml`, same as {@link tableStyles}.
|
|
9958
|
+
*/
|
|
9959
|
+
tableStylesDefaultId?: string;
|
|
9960
|
+
/**
|
|
9961
|
+
* Style GUIDs to remove from `ppt/tableStyles.xml` entirely, kept as a
|
|
9962
|
+
* separate opt-in list rather than inferred from omission on
|
|
9963
|
+
* {@link tableStyles}: that map is documented as safe to pass a PARTIAL
|
|
9964
|
+
* edit (only the entries a caller actually touched), so treating every
|
|
9965
|
+
* GUID missing from it as "delete this" would silently destroy untouched
|
|
9966
|
+
* styles on an ordinary targeted edit. A GUID here that is also the
|
|
9967
|
+
* current (or newly requested) default is left in place and skipped.
|
|
9968
|
+
*/
|
|
9969
|
+
tableStylesToDelete?: string[];
|
|
9076
9970
|
/**
|
|
9077
9971
|
* Target output format.
|
|
9078
9972
|
* - `'pptx'` (default): Standard presentation.
|
|
@@ -10152,6 +11046,62 @@ type ChartBuildMode = 'asOne' | 'bySeries' | 'byCategory' | 'byElement';
|
|
|
10152
11046
|
* - `byLvlAtOnce` a whole level is revealed per stage (`lvlAtOnce`).
|
|
10153
11047
|
*/
|
|
10154
11048
|
type DiagramBuildMode = 'asOne' | 'byOne' | 'byLvl' | 'byLvlAtOnce';
|
|
11049
|
+
/**
|
|
11050
|
+
* One authored `p:graphicEl` reveal unit resolved onto a chart, per
|
|
11051
|
+
* `TimelineStepGraphicElement`'s "both indices set" case: a single (series,
|
|
11052
|
+
* category) cell revealed by a `bldStep="seriesEl"`/`"categoryEl"` effect.
|
|
11053
|
+
*/
|
|
11054
|
+
interface ChartRevealPoint {
|
|
11055
|
+
seriesIdx: number;
|
|
11056
|
+
categoryIdx: number;
|
|
11057
|
+
}
|
|
11058
|
+
/**
|
|
11059
|
+
* Playback-time chart reveal state derived from AUTHORED `p:graphicEl`
|
|
11060
|
+
* indices (see `chart-reveal-descriptor`'s `resolveChartRevealDescriptor`),
|
|
11061
|
+
* rather than from click-count/time progress. Present on
|
|
11062
|
+
* {@link ElementAnimationState.chartReveal} only when every fired
|
|
11063
|
+
* chart-build step for the element carried index data; a renderer prefers
|
|
11064
|
+
* this over the progress-based `build`/`ElementBuildState` path when present,
|
|
11065
|
+
* since it reflects the real authored reveal set (correct even for a
|
|
11066
|
+
* reversed-order or gapped chart build), and falls back to `build` when
|
|
11067
|
+
* absent.
|
|
11068
|
+
*/
|
|
11069
|
+
interface ChartRevealDescriptor {
|
|
11070
|
+
/**
|
|
11071
|
+
* Whether the chart's background/axes/gridlines/legend should currently be
|
|
11072
|
+
* visible: always `true` when the chart's `animateBackground` is `false`
|
|
11073
|
+
* ("shown throughout"), otherwise `true` from the first revealed stage
|
|
11074
|
+
* onward.
|
|
11075
|
+
*/
|
|
11076
|
+
background: boolean;
|
|
11077
|
+
/** Whole series revealed by a `bldStep="series"` effect. */
|
|
11078
|
+
series: ReadonlySet<number>;
|
|
11079
|
+
/** Whole categories revealed by a `bldStep="category"` effect. */
|
|
11080
|
+
categories: ReadonlySet<number>;
|
|
11081
|
+
/** Individual cells revealed by a `bldStep="seriesEl"`/`"categoryEl"` effect. */
|
|
11082
|
+
points: readonly ChartRevealPoint[];
|
|
11083
|
+
}
|
|
11084
|
+
/**
|
|
11085
|
+
* Playback-time SmartArt diagram reveal state derived from AUTHORED
|
|
11086
|
+
* `p:graphicEl/p:dgm/@id` indices (see `diagram-reveal-descriptor`'s
|
|
11087
|
+
* `resolveDiagramRevealDescriptor`), rather than from click-count/time
|
|
11088
|
+
* progress. Present on {@link ElementAnimationState.diagramReveal} only when
|
|
11089
|
+
* every fired diagram-build step for the element carried `p:graphicEl` data.
|
|
11090
|
+
* A SmartArt renderer prefers this over the progress-based `build` /
|
|
11091
|
+
* {@link ElementBuildState} path when present, since it reflects the real
|
|
11092
|
+
* authored reveal set (correct even for a reversed-order or by-branch build),
|
|
11093
|
+
* and falls back to `build` when absent.
|
|
11094
|
+
*/
|
|
11095
|
+
interface DiagramRevealDescriptor {
|
|
11096
|
+
/**
|
|
11097
|
+
* Whether the diagram's background/connector chrome should currently be
|
|
11098
|
+
* visible: `true` once any node-revealing or background-revealing
|
|
11099
|
+
* (`bldStep="bg"`) step has fired.
|
|
11100
|
+
*/
|
|
11101
|
+
background: boolean;
|
|
11102
|
+
/** Data-model point ids (`PptxSmartArtNode.id`) revealed so far. */
|
|
11103
|
+
nodeIds: ReadonlySet<string>;
|
|
11104
|
+
}
|
|
10155
11105
|
/**
|
|
10156
11106
|
* Playback-time staged-build state surfaced on {@link ElementAnimationState}.
|
|
10157
11107
|
* `progress` is the 0..1 fraction of the build revealed at the current playback
|
|
@@ -10182,6 +11132,27 @@ interface ElementAnimationState {
|
|
|
10182
11132
|
* whole-element entrances, so existing renderers are unaffected.
|
|
10183
11133
|
*/
|
|
10184
11134
|
build?: ElementBuildState;
|
|
11135
|
+
/**
|
|
11136
|
+
* Authored-index chart reveal state (see {@link ChartRevealDescriptor}),
|
|
11137
|
+
* present only when every fired chart-build step for this element carried
|
|
11138
|
+
* `p:graphicEl` index data. A chart renderer prefers this over `build` when
|
|
11139
|
+
* present; `chart-build`'s `resolveRevealedChartData` picks between the two.
|
|
11140
|
+
*/
|
|
11141
|
+
chartReveal?: {
|
|
11142
|
+
mode: ChartBuildMode;
|
|
11143
|
+
descriptor: ChartRevealDescriptor;
|
|
11144
|
+
};
|
|
11145
|
+
/**
|
|
11146
|
+
* Authored-index SmartArt diagram reveal state (see
|
|
11147
|
+
* {@link DiagramRevealDescriptor}), present only when every fired
|
|
11148
|
+
* diagram-build step for this element carried `p:graphicEl` node-id data.
|
|
11149
|
+
* `diagram-build`'s `resolveRevealedSmartArtNodes` prefers this over `build`
|
|
11150
|
+
* when present.
|
|
11151
|
+
*/
|
|
11152
|
+
diagramReveal?: {
|
|
11153
|
+
mode: DiagramBuildMode;
|
|
11154
|
+
descriptor: DiagramRevealDescriptor;
|
|
11155
|
+
};
|
|
10185
11156
|
/**
|
|
10186
11157
|
* True when an active `p:animClr` color animation targets this shape's fill.
|
|
10187
11158
|
* A vector renderer should then paint the fill with `fill: inherit` so the
|
|
@@ -10582,6 +11553,13 @@ interface GradientStop {
|
|
|
10582
11553
|
color: string;
|
|
10583
11554
|
position: number;
|
|
10584
11555
|
opacity?: number;
|
|
11556
|
+
/**
|
|
11557
|
+
* Theme colour identity for this stop, mirroring
|
|
11558
|
+
* `ShapeStyle.fillColorRef`. Set by a theme-swatch pick so the stop keeps
|
|
11559
|
+
* following the theme after a later theme change; cleared by a custom hex
|
|
11560
|
+
* pick, which has no theme identity.
|
|
11561
|
+
*/
|
|
11562
|
+
colorRef?: PptxThemeColorRef;
|
|
10585
11563
|
}
|
|
10586
11564
|
/** The editable gradient state surfaced to the component. */
|
|
10587
11565
|
interface GradientState {
|
|
@@ -11757,7 +12735,7 @@ interface TextActions {
|
|
|
11757
12735
|
changeFontSize(delta: number): void;
|
|
11758
12736
|
setFontSize(size: number): void;
|
|
11759
12737
|
setFontFamily(family: string): void;
|
|
11760
|
-
setTextColor(color: string): void;
|
|
12738
|
+
setTextColor(color: string, ref?: PptxThemeColorRef): void;
|
|
11761
12739
|
setHighlightColor(color: string): void;
|
|
11762
12740
|
setCharacterSpacing(value: number): void;
|
|
11763
12741
|
changeCase(mode: ChangeCaseMode): void;
|
|
@@ -11843,8 +12821,8 @@ interface EditActions extends TextActions, ArrangeActions, ClipboardActions, Sli
|
|
|
11843
12821
|
masterView: MasterViewCrudActions;
|
|
11844
12822
|
comments: CommentActions;
|
|
11845
12823
|
toggleFormatPainter(): void;
|
|
11846
|
-
setShapeFill(color: string): void;
|
|
11847
|
-
setShapeStroke(color: string): void;
|
|
12824
|
+
setShapeFill(color: string, ref?: PptxThemeColorRef): void;
|
|
12825
|
+
setShapeStroke(color: string, ref?: PptxThemeColorRef): void;
|
|
11848
12826
|
setShapeStrokeWidth(width: number): void;
|
|
11849
12827
|
setShapeStyle(patch: Partial<ShapeStyle>): void;
|
|
11850
12828
|
setShapeType(shapeType: string): void;
|
|
@@ -11910,6 +12888,10 @@ interface AccessibilityPanel {
|
|
|
11910
12888
|
interface InspectorState {
|
|
11911
12889
|
hasSelection: boolean;
|
|
11912
12890
|
isLocked: boolean;
|
|
12891
|
+
/** `a:picLocks/@noCrop`: may the selected picture's crop be adjusted? */
|
|
12892
|
+
croppable: boolean;
|
|
12893
|
+
/** `arrowheadsChangeable` (`element-locks.ts`): may connector arrowheads change? */
|
|
12894
|
+
arrowheadsChangeable: boolean;
|
|
11913
12895
|
canShape: boolean;
|
|
11914
12896
|
canText: boolean;
|
|
11915
12897
|
isImage: boolean;
|
|
@@ -11933,7 +12915,11 @@ interface InspectorState {
|
|
|
11933
12915
|
height: number;
|
|
11934
12916
|
rotation: number;
|
|
11935
12917
|
fillColor: string | undefined;
|
|
12918
|
+
/** Theme ref for `fillColor`, if any (highlights the matching theme swatch). */
|
|
12919
|
+
fillColorRef: PptxThemeColorRef | undefined;
|
|
11936
12920
|
strokeColor: string | undefined;
|
|
12921
|
+
/** Theme ref for `strokeColor`, if any (highlights the matching theme swatch). */
|
|
12922
|
+
strokeColorRef: PptxThemeColorRef | undefined;
|
|
11937
12923
|
strokeWidth: number;
|
|
11938
12924
|
shapeStyle: ShapeStyle | undefined;
|
|
11939
12925
|
shapeType: string | undefined;
|
|
@@ -11942,7 +12928,7 @@ interface InspectorState {
|
|
|
11942
12928
|
strokeOpacity: number;
|
|
11943
12929
|
gradientEnabled: boolean;
|
|
11944
12930
|
gradient: GradientState;
|
|
11945
|
-
vAlign: 'top' | 'middle' | 'bottom';
|
|
12931
|
+
vAlign: 'top' | 'middle' | 'bottom' | 'distributed' | 'justified';
|
|
11946
12932
|
textWrap: 'square' | 'none';
|
|
11947
12933
|
autoFitMode: 'shrink' | 'normal' | 'none';
|
|
11948
12934
|
characterSpacing: number;
|
|
@@ -12020,6 +13006,12 @@ interface InspectorState {
|
|
|
12020
13006
|
* colours" row under the fill/stroke/text colour pickers.
|
|
12021
13007
|
*/
|
|
12022
13008
|
recentColors: readonly string[];
|
|
13009
|
+
/**
|
|
13010
|
+
* The deck's resolved theme colour map (scheme key -> hex), feeding the
|
|
13011
|
+
* "Theme Colors" grid under the fill/stroke colour pickers. `undefined`
|
|
13012
|
+
* before a theme has loaded.
|
|
13013
|
+
*/
|
|
13014
|
+
themeColorMap: Record<string, string> | undefined;
|
|
12023
13015
|
}
|
|
12024
13016
|
/**
|
|
12025
13017
|
* Deck/slide-level state for the inspector's Elements and Comments tabs plus
|
|
@@ -12341,6 +13333,8 @@ interface RibbonSelectionState {
|
|
|
12341
13333
|
hasClipboard: boolean;
|
|
12342
13334
|
slideCount: number;
|
|
12343
13335
|
selectedCount?: number;
|
|
13336
|
+
/** Whether every selected element allows `a:spLocks/@noGrp` grouping. */
|
|
13337
|
+
selectionGroupable?: boolean;
|
|
12344
13338
|
formatPainterActive?: boolean;
|
|
12345
13339
|
selectedElementId?: string;
|
|
12346
13340
|
animations?: readonly PptxElementAnimation[];
|
|
@@ -12363,6 +13357,8 @@ interface RibbonSelectionState {
|
|
|
12363
13357
|
customFontFamilies?: readonly string[];
|
|
12364
13358
|
/** B6: the deck's `p:clrMru`, most-recent-first; feeds every swatch picker's row. */
|
|
12365
13359
|
recentColors?: readonly string[];
|
|
13360
|
+
/** The deck's resolved theme colour map, feeding the font-colour "Theme Colors" grid. */
|
|
13361
|
+
themeColorMap?: Record<string, string>;
|
|
12366
13362
|
}
|
|
12367
13363
|
//#endregion
|
|
12368
13364
|
//#region src/viewer/ui/mobile-action-sheets.d.ts
|