pptx-vanilla-viewer 2.5.4 → 2.6.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 +12 -0
- package/dist/{ai-panel-255FXBYU.js → ai-panel-4Q5FTNOP.js} +1 -1
- package/dist/ai-panel-DV2UGCXQ.cjs +1 -0
- package/dist/chunk-3DPIOHNH.cjs +2338 -0
- package/dist/chunk-XL46R5WV.js +2338 -0
- package/dist/index.cjs +66 -66
- package/dist/index.d.ts +613 -37
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +65 -65
- package/package.json +1 -1
- package/dist/ai-panel-VKG74YAP.cjs +0 -1
- package/dist/chunk-2N4X3VII.js +0 -2304
- package/dist/chunk-V6O3UHFE.cjs +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-BB__gyrk.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.
|
|
@@ -1219,6 +1241,21 @@ interface ShapeStyle {
|
|
|
1219
1241
|
dagFillOverlayColor?: string;
|
|
1220
1242
|
/** Fill overlay tint opacity (0-1), from the overlay fill colour's alpha. */
|
|
1221
1243
|
dagFillOverlayOpacity?: number;
|
|
1244
|
+
/** Fill overlay blend mode from a direct `a:effectLst/a:fillOverlay/@blend`. */
|
|
1245
|
+
shapeFillOverlayBlend?: 'over' | 'mult' | 'screen' | 'darken' | 'lighten';
|
|
1246
|
+
/**
|
|
1247
|
+
* Fill overlay tint colour (hex `#RRGGBB`) from a direct
|
|
1248
|
+
* `a:effectLst/a:fillOverlay`'s `a:solidFill`/`a:gradFill`.
|
|
1249
|
+
*/
|
|
1250
|
+
shapeFillOverlayColor?: string;
|
|
1251
|
+
/** Fill overlay tint opacity (0-1), from the overlay fill colour's alpha. */
|
|
1252
|
+
shapeFillOverlayOpacity?: number;
|
|
1253
|
+
/** Original source `a:fillOverlay` node, preserved for lossless surgical updates. */
|
|
1254
|
+
fillOverlayXml?: XmlObject;
|
|
1255
|
+
/** Resolved source fill-overlay colour used to detect colour edits. */
|
|
1256
|
+
shapeFillOverlayOriginalColor?: string;
|
|
1257
|
+
/** Source fill-overlay opacity used to detect alpha edits. */
|
|
1258
|
+
shapeFillOverlayOriginalOpacity?: number;
|
|
1222
1259
|
/** `<a:lnRef @idx>` — 1-based index into the theme's lnStyleLst. */
|
|
1223
1260
|
lnRefIdx?: number;
|
|
1224
1261
|
/** Raw XML colour child of `<a:lnRef>` (e.g. `<a:schemeClr>` with transforms). */
|
|
@@ -1475,7 +1512,15 @@ interface TextStyle {
|
|
|
1475
1512
|
*/
|
|
1476
1513
|
colorXml?: XmlObject;
|
|
1477
1514
|
align?: 'left' | 'center' | 'right' | 'justify' | 'justLow' | 'dist' | 'thaiDist';
|
|
1478
|
-
|
|
1515
|
+
/**
|
|
1516
|
+
* Vertical text-box anchor (`a:bodyPr/@anchor`, `ST_TextAnchoringType`).
|
|
1517
|
+
* `distributed`/`justified` (`dist`/`just`) stretch line spacing so the
|
|
1518
|
+
* paragraph block fills the box's full vertical extent, distinct from true
|
|
1519
|
+
* centering (`middle`/`ctr`); both approximate to a middle-anchored render
|
|
1520
|
+
* (see `text-body-layout.ts`) since CSS has no native vertical-justify
|
|
1521
|
+
* primitive, but round-trip losslessly through parse/save.
|
|
1522
|
+
*/
|
|
1523
|
+
vAlign?: 'top' | 'middle' | 'bottom' | 'distributed' | 'justified';
|
|
1479
1524
|
/** Right-to-left paragraph/run direction (`a:pPr/@rtl`, `a:rPr/@rtl`). */
|
|
1480
1525
|
rtl?: boolean;
|
|
1481
1526
|
/** Body text direction (`a:bodyPr/@vert`).
|
|
@@ -2296,6 +2341,50 @@ interface PptxChartAxisLabelFormatting {
|
|
|
2296
2341
|
noMultiLevelLabels?: boolean;
|
|
2297
2342
|
}
|
|
2298
2343
|
//#endregion
|
|
2344
|
+
//#region src/core/types/chart-ex.d.ts
|
|
2345
|
+
/**
|
|
2346
|
+
* Chart-formatting types that don't fit an existing, owned type module for
|
|
2347
|
+
* this wave (`types/chart.ts` is owned elsewhere; see its own module doc).
|
|
2348
|
+
* Despite the file name, `PptxChartDataPointPicture` is a CLASSIC (`c:`)
|
|
2349
|
+
* construct, not ChartEx (`cx:`) - it landed here only because it needs a
|
|
2350
|
+
* home outside `chart.ts`.
|
|
2351
|
+
*
|
|
2352
|
+
* @module pptx-types/chart-ex
|
|
2353
|
+
*/
|
|
2354
|
+
/** `c:dPt/c:pictureOptions/c:pictureFormat/@val` (ST_PictureFormat). */
|
|
2355
|
+
type PptxChartPictureFormat = 'stretch' | 'stack' | 'stackScale';
|
|
2356
|
+
/**
|
|
2357
|
+
* Per-data-point picture-fill flags (`c:dPt/c:pictureOptions`): PowerPoint's
|
|
2358
|
+
* "Picture or texture fill" with "Stack"/"Stretch" semantics on a bar/column
|
|
2359
|
+
* data point, distinct from the point's plain `c:spPr` solid/gradient fill.
|
|
2360
|
+
*
|
|
2361
|
+
* The flags parse purely (`parseChartDataPointPicture` in
|
|
2362
|
+
* `utils/chart-datapoint-serializer.ts`); {@link imageUrl} is a separate,
|
|
2363
|
+
* later addition populated by the runtime (`PptxHandlerRuntimeChartParsing.ts`)
|
|
2364
|
+
* once the sibling `c:spPr/a:blipFill/a:blip`'s `r:embed`/`r:link` is resolved
|
|
2365
|
+
* against the chart part's relationships, since that resolution needs zip/file
|
|
2366
|
+
* access the pure parser does not have.
|
|
2367
|
+
*/
|
|
2368
|
+
interface PptxChartDataPointPicture {
|
|
2369
|
+
/** Apply the picture to the front face of a 3-D bar/column (`c:applyToFront`). */
|
|
2370
|
+
applyToFront?: boolean;
|
|
2371
|
+
/** Apply the picture to the side faces of a 3-D bar/column (`c:applyToSides`). */
|
|
2372
|
+
applyToSides?: boolean;
|
|
2373
|
+
/** Apply the picture to the end face of a 3-D bar/column (`c:applyToEnd`). */
|
|
2374
|
+
applyToEnd?: boolean;
|
|
2375
|
+
/** Stretch, or stack repeated tiles at their natural size (or scaled). */
|
|
2376
|
+
pictureFormat?: PptxChartPictureFormat;
|
|
2377
|
+
/** Height, in points, of one repeated picture tile for "stack"/"stackScale" (`c:pictureStackUnit/@val`). */
|
|
2378
|
+
pictureStackUnit?: number;
|
|
2379
|
+
/**
|
|
2380
|
+
* Resolved picture source (a `data:`/`blob:` URL) for the point's sibling
|
|
2381
|
+
* `c:spPr/a:blipFill/a:blip`. Populated by the runtime after relationship
|
|
2382
|
+
* resolution (C2-G9 render half); absent until then, and absent entirely
|
|
2383
|
+
* when the point has no picture fill or the image could not be resolved.
|
|
2384
|
+
*/
|
|
2385
|
+
imageUrl?: string;
|
|
2386
|
+
}
|
|
2387
|
+
//#endregion
|
|
2299
2388
|
//#region src/core/types/chart-pivot-format.d.ts
|
|
2300
2389
|
interface PptxChartPivotFormat {
|
|
2301
2390
|
index: number;
|
|
@@ -2359,6 +2448,15 @@ interface PptxChartPageSetup {
|
|
|
2359
2448
|
horizontalDpi?: number;
|
|
2360
2449
|
verticalDpi?: number;
|
|
2361
2450
|
copies?: number;
|
|
2451
|
+
/**
|
|
2452
|
+
* Custom paper height, used when {@link paperSize} is `0`
|
|
2453
|
+
* (`c:pageSetup/@paperHeight`, ST_PositiveUniversalMeasure, e.g. `"297mm"`).
|
|
2454
|
+
* Kept as the raw measure string rather than converted, matching how the
|
|
2455
|
+
* schema stores it.
|
|
2456
|
+
*/
|
|
2457
|
+
paperHeight?: string;
|
|
2458
|
+
/** Custom paper width, used when {@link paperSize} is `0` (`@paperWidth`). */
|
|
2459
|
+
paperWidth?: string;
|
|
2362
2460
|
/** Original leaf retained for foreign attributes. */
|
|
2363
2461
|
rawXml?: unknown;
|
|
2364
2462
|
}
|
|
@@ -2390,6 +2488,65 @@ interface PptxChartProtection {
|
|
|
2390
2488
|
rawXml?: XmlObject;
|
|
2391
2489
|
}
|
|
2392
2490
|
//#endregion
|
|
2491
|
+
//#region src/core/types/chart-style-definition.d.ts
|
|
2492
|
+
/**
|
|
2493
|
+
* Typed subset of an Office 2013+ chart-style part (`ppt/charts/style#.xml`,
|
|
2494
|
+
* root element `cs:chartStyle`, relationship type
|
|
2495
|
+
* `.../2012/relationships/chartStyle`).
|
|
2496
|
+
*
|
|
2497
|
+
* PowerPoint's Design-tab "Chart Styles" gallery (1-48) writes `c:style/@val`
|
|
2498
|
+
* on the chart part itself (already modeled as `PptxChartStyle.styleId`) and,
|
|
2499
|
+
* for most styles, this SEPARATE part spelling out the per-element
|
|
2500
|
+
* `cs:lnRef`/`cs:fillRef`/`cs:effectRef`/`cs:fontRef`/`cs:defRPr` defaults a
|
|
2501
|
+
* chart element falls back to when its own XML leaves it unstyled. Without
|
|
2502
|
+
* parsing this part, styles beyond the one PowerPoint happens to have baked
|
|
2503
|
+
* inline are visually inert.
|
|
2504
|
+
*
|
|
2505
|
+
* @module pptx-types/chart-style-definition
|
|
2506
|
+
*/
|
|
2507
|
+
/**
|
|
2508
|
+
* One styled chart-element entry (`cs:title`, `cs:axisTitle`,
|
|
2509
|
+
* `cs:categoryAxis`, ...). Colours are resolved to hex at parse time (scheme
|
|
2510
|
+
* colour references via `cs:fontRef`/`cs:lnRef`/`cs:fillRef` are already
|
|
2511
|
+
* flattened against the theme, matching how classic chart colours resolve
|
|
2512
|
+
* elsewhere in this codebase). Fields are present only when the source XML
|
|
2513
|
+
* carried a value for them.
|
|
2514
|
+
*/
|
|
2515
|
+
interface PptxChartStylePartEntry {
|
|
2516
|
+
/** Text size in points, from `cs:defRPr/@sz` (hundredths of a point). */
|
|
2517
|
+
fontSize?: number;
|
|
2518
|
+
bold?: boolean;
|
|
2519
|
+
italic?: boolean;
|
|
2520
|
+
/** Resolved text colour: `cs:defRPr/a:solidFill`, or `cs:fontRef`'s scheme colour. */
|
|
2521
|
+
color?: string;
|
|
2522
|
+
/** Resolved line colour from `cs:lnRef`'s scheme colour reference. */
|
|
2523
|
+
lineColor?: string;
|
|
2524
|
+
/** Line width in points, when directly authored (rare; most styles reference a theme line style by index only). */
|
|
2525
|
+
lineWidth?: number;
|
|
2526
|
+
/** Resolved fill colour from `cs:fillRef`'s scheme colour reference. */
|
|
2527
|
+
fillColor?: string;
|
|
2528
|
+
}
|
|
2529
|
+
/**
|
|
2530
|
+
* Parsed per-element style defaults from a chart-style part. Only the
|
|
2531
|
+
* elements this viewer actually renders distinct defaults for are modeled;
|
|
2532
|
+
* elements PowerPoint's style gallery also styles (data table, trendlines,
|
|
2533
|
+
* up/down bars, ...) are out of scope until a renderer needs them.
|
|
2534
|
+
*/
|
|
2535
|
+
interface PptxChartStyleDefinition {
|
|
2536
|
+
title?: PptxChartStylePartEntry;
|
|
2537
|
+
axisTitle?: PptxChartStylePartEntry;
|
|
2538
|
+
categoryAxis?: PptxChartStylePartEntry;
|
|
2539
|
+
valueAxis?: PptxChartStylePartEntry;
|
|
2540
|
+
legend?: PptxChartStylePartEntry;
|
|
2541
|
+
dataLabel?: PptxChartStylePartEntry;
|
|
2542
|
+
dataPoint?: PptxChartStylePartEntry;
|
|
2543
|
+
dataPointLine?: PptxChartStylePartEntry;
|
|
2544
|
+
gridlineMajor?: PptxChartStylePartEntry;
|
|
2545
|
+
gridlineMinor?: PptxChartStylePartEntry;
|
|
2546
|
+
chartArea?: PptxChartStylePartEntry;
|
|
2547
|
+
plotArea?: PptxChartStylePartEntry;
|
|
2548
|
+
}
|
|
2549
|
+
//#endregion
|
|
2393
2550
|
//#region src/core/types/chart-user-shapes.d.ts
|
|
2394
2551
|
/**
|
|
2395
2552
|
* Types for chart drawing-overlay shapes (`c:userShapes`).
|
|
@@ -2428,8 +2585,16 @@ interface PptxChartUserShapeParagraph {
|
|
|
2428
2585
|
* `absSizeAnchor` the extent is {@link ext} in EMU.
|
|
2429
2586
|
*/
|
|
2430
2587
|
interface PptxChartUserShape {
|
|
2431
|
-
/**
|
|
2432
|
-
|
|
2588
|
+
/**
|
|
2589
|
+
* Shape kind: text/preset shape, connector, picture, a group of the
|
|
2590
|
+
* above (`grpSp`, flattened: each grouped child becomes its own entry
|
|
2591
|
+
* reusing the anchor's own bounding box, an approximation since the
|
|
2592
|
+
* group's internal chOff/chExt transform is not applied), or a bare
|
|
2593
|
+
* placeholder for a `graphicFrame` anchor child (deep content such as a
|
|
2594
|
+
* nested chart or table is out of scope; it only keeps the anchor's
|
|
2595
|
+
* space accounted for instead of the whole overlay disappearing).
|
|
2596
|
+
*/
|
|
2597
|
+
kind: 'sp' | 'cxnSp' | 'pic' | 'grpSp' | 'graphicFrame';
|
|
2433
2598
|
/** Anchor kind that positioned the shape. */
|
|
2434
2599
|
anchor: 'rel' | 'abs';
|
|
2435
2600
|
/** Top-left corner as chart-relative fractions (0-1). */
|
|
@@ -2661,6 +2826,8 @@ interface PptxChartDataPoint {
|
|
|
2661
2826
|
marker?: PptxChartMarker;
|
|
2662
2827
|
/** Render a bubble-chart point with a 3-D appearance. */
|
|
2663
2828
|
bubble3D?: boolean;
|
|
2829
|
+
/** Per-point picture-fill flags (`c:dPt/c:pictureOptions`). */
|
|
2830
|
+
picture?: PptxChartDataPointPicture;
|
|
2664
2831
|
}
|
|
2665
2832
|
/** Schema values accepted by `c:dLblPos`. */
|
|
2666
2833
|
type PptxChartDataLabelPosition = 'bestFit' | 'b' | 'ctr' | 'inBase' | 'inEnd' | 'l' | 'outEnd' | 'r' | 't';
|
|
@@ -2679,6 +2846,26 @@ interface PptxChartDataLabel {
|
|
|
2679
2846
|
text?: string;
|
|
2680
2847
|
separator?: string;
|
|
2681
2848
|
showLeaderLines?: boolean;
|
|
2849
|
+
/**
|
|
2850
|
+
* Per-label number-format override (`c:dLbl/c:numFmt/@formatCode`), taking
|
|
2851
|
+
* precedence over the chart-level {@link PptxChartDataLabelOptions.numberFormat}
|
|
2852
|
+
* and the series' own {@link PptxChartSeries.numberFormat} when set.
|
|
2853
|
+
*/
|
|
2854
|
+
numberFormat?: string;
|
|
2855
|
+
/**
|
|
2856
|
+
* Manually dragged label position (`c:dLbl/c:layout/c:manualLayout`), the
|
|
2857
|
+
* same CT_ManualLayout shape used for title/legend/plotArea. `null`
|
|
2858
|
+
* explicitly clears a drag back to the automatic position.
|
|
2859
|
+
*/
|
|
2860
|
+
layout?: PptxChartManualLayout | null;
|
|
2861
|
+
/**
|
|
2862
|
+
* This label's own font (`c:dLbl/c:txPr/a:p/a:pPr/a:defRPr`, or ChartEx
|
|
2863
|
+
* `cx:dataLabel/cx:txPr`), taking precedence over the chart/series-level
|
|
2864
|
+
* {@link PptxChartDataLabelOptions.txPr} when set. Reuses the legend
|
|
2865
|
+
* entry's flat text-style shape since both are the same
|
|
2866
|
+
* `.../a:p/a:pPr/a:defRPr` default-run-property style.
|
|
2867
|
+
*/
|
|
2868
|
+
txPr?: PptxChartLegendTextStyle;
|
|
2682
2869
|
}
|
|
2683
2870
|
/** Axis number format. */
|
|
2684
2871
|
interface PptxChartAxisNumFmt {
|
|
@@ -2693,6 +2880,16 @@ interface PptxChartDisplayUnitsLabel {
|
|
|
2693
2880
|
layout?: PptxChartManualLayout | null;
|
|
2694
2881
|
/** Label shape formatting. `null` removes `c:spPr`. */
|
|
2695
2882
|
spPr?: PptxChartShapeProps | null;
|
|
2883
|
+
/**
|
|
2884
|
+
* The label's own run font, when it carries a distinct `txPr` from the
|
|
2885
|
+
* axis's own (ChartEx `cx:unitsLabel/cx:txPr`; classic `c:dispUnitsLbl`
|
|
2886
|
+
* has no equivalent child, so this is only ever populated from a ChartEx
|
|
2887
|
+
* axis).
|
|
2888
|
+
*/
|
|
2889
|
+
fontFamily?: string;
|
|
2890
|
+
fontSize?: number;
|
|
2891
|
+
fontBold?: boolean;
|
|
2892
|
+
fontColor?: string;
|
|
2696
2893
|
}
|
|
2697
2894
|
/** Axis formatting for category, value, or date axes. */
|
|
2698
2895
|
interface PptxChartAxisFormatting extends PptxChartAxisLabelFormatting {
|
|
@@ -2797,8 +2994,27 @@ interface PptxChartWaterfallOptions {
|
|
|
2797
2994
|
/** Whether connector lines are visible between adjacent bars. */
|
|
2798
2995
|
connectorLines?: boolean;
|
|
2799
2996
|
}
|
|
2997
|
+
/**
|
|
2998
|
+
* A single breakpoint in a ChartEx colour-by-value scale
|
|
2999
|
+
* (`cx:valueColorPositions/cx:colorPosition`). `kind` selects which of
|
|
3000
|
+
* CT_ColorPosition's union members was authored; `value` is absent for
|
|
3001
|
+
* `min`/`max` (they are implicit endpoints) and required otherwise.
|
|
3002
|
+
*/
|
|
3003
|
+
interface PptxCxValueColorPosition {
|
|
3004
|
+
kind: 'min' | 'max' | 'number' | 'percent';
|
|
3005
|
+
value?: number;
|
|
3006
|
+
}
|
|
2800
3007
|
/** Office 2016 ChartEx geographic series dimensions and layout options. */
|
|
2801
3008
|
interface PptxChartRegionMapOptions {
|
|
3009
|
+
/**
|
|
3010
|
+
* Colour-by-value gradient stops (`cx:valueColors/cx:colors/cx:color`),
|
|
3011
|
+
* resolved to hex, 2 or 3 entries (matching PowerPoint's two- and
|
|
3012
|
+
* three-colour scale UI). Paired index-for-index with
|
|
3013
|
+
* {@link valueColorPositions} when both are present.
|
|
3014
|
+
*/
|
|
3015
|
+
valueColors?: string[];
|
|
3016
|
+
/** Gradient breakpoints for {@link valueColors} (`cx:valueColorPositions`). */
|
|
3017
|
+
valueColorPositions?: PptxCxValueColorPosition[];
|
|
2802
3018
|
/** Optional provider entity identifiers aligned with categories and values. */
|
|
2803
3019
|
entityIds?: string[];
|
|
2804
3020
|
/** Original `cx:pt/@idx` values for category points. */
|
|
@@ -2963,6 +3179,20 @@ interface PptxChartDataLabelOptions {
|
|
|
2963
3179
|
* Omit to let PowerPoint use the type default.
|
|
2964
3180
|
*/
|
|
2965
3181
|
position?: PptxChartDataLabelPosition;
|
|
3182
|
+
/**
|
|
3183
|
+
* Chart-level number-format override (`c:dLbls/c:numFmt/@formatCode`),
|
|
3184
|
+
* applied to every label of the series/chart-type unless a per-point
|
|
3185
|
+
* {@link PptxChartDataLabel.numberFormat} overrides it.
|
|
3186
|
+
*/
|
|
3187
|
+
numberFormat?: string;
|
|
3188
|
+
/**
|
|
3189
|
+
* Default font for every label at this level (`c:dLbls/c:txPr`, or
|
|
3190
|
+
* ChartEx `cx:dataLabels/cx:txPr`), overridden by a per-point
|
|
3191
|
+
* {@link PptxChartDataLabel.txPr} when set. `c:dLbls` at the chart-type
|
|
3192
|
+
* level and the series level cascade the same way the show flags do
|
|
3193
|
+
* (point > series > chart-type).
|
|
3194
|
+
*/
|
|
3195
|
+
txPr?: PptxChartLegendTextStyle;
|
|
2966
3196
|
}
|
|
2967
3197
|
/** Typed text defaults for a single chart legend entry. */
|
|
2968
3198
|
interface PptxChartLegendTextStyle {
|
|
@@ -3019,6 +3249,17 @@ interface PptxChartStyle {
|
|
|
3019
3249
|
hasDataLabels?: boolean;
|
|
3020
3250
|
/** Chart-level data-label content/position options (when `hasDataLabels`). */
|
|
3021
3251
|
dataLabels?: PptxChartDataLabelOptions;
|
|
3252
|
+
/**
|
|
3253
|
+
* Font styling for the chart's own title (`c:title/c:txPr`), edited via
|
|
3254
|
+
* `applyChartTitleStyleToXml` (chart-title-style-serializer.ts). Distinct
|
|
3255
|
+
* from an axis title's styling (`PptxChartAxisFormatting.fontFamily` etc.).
|
|
3256
|
+
*/
|
|
3257
|
+
titleFontFamily?: string;
|
|
3258
|
+
titleFontSize?: number;
|
|
3259
|
+
titleFontBold?: boolean;
|
|
3260
|
+
titleFontColor?: string;
|
|
3261
|
+
/** Title text-box fill/border (`c:title/c:spPr`). `null` removes it. */
|
|
3262
|
+
titleSpPr?: PptxChartShapeProps | null;
|
|
3022
3263
|
}
|
|
3023
3264
|
/**
|
|
3024
3265
|
* External data source reference for a chart (c:externalData).
|
|
@@ -3399,6 +3640,38 @@ interface PptxChartData {
|
|
|
3399
3640
|
* `attribute → value` map for round-trip fidelity.
|
|
3400
3641
|
*/
|
|
3401
3642
|
clrMapOvr?: Record<string, string>;
|
|
3643
|
+
/**
|
|
3644
|
+
* Whether the chart's own cached numeric values use the 1904 date epoch
|
|
3645
|
+
* (`c:chartSpace/c:date1904/@val`). Independent of, and authoritative over,
|
|
3646
|
+
* any embedded workbook's `workbookPr/@date1904` (a chart can lack an
|
|
3647
|
+
* embedded workbook entirely, or its cache can legitimately differ from the
|
|
3648
|
+
* workbook's current setting). Absent when the source XML omits the
|
|
3649
|
+
* element, in which case the 1900 system applies (the schema default).
|
|
3650
|
+
*/
|
|
3651
|
+
date1904?: boolean;
|
|
3652
|
+
/**
|
|
3653
|
+
* PowerPoint's "Rounded corners" chart-area option
|
|
3654
|
+
* (`c:chartSpace/c:roundedCorners/@val`, default `false`). Absent when the
|
|
3655
|
+
* source XML omits the element.
|
|
3656
|
+
*/
|
|
3657
|
+
roundedCorners?: boolean;
|
|
3658
|
+
/**
|
|
3659
|
+
* 3-D chart depth/spacing along the series axis, as a percentage
|
|
3660
|
+
* (`c:gapDepth/@val`, `ST_GapAmount`, 0 through 500). Legal on
|
|
3661
|
+
* `bar3D`/`area3D`/`line3D`/`surface` chart-type containers only. Read-only
|
|
3662
|
+
* for rendering, matching {@link barGapWidth}/{@link barOverlap}: save
|
|
3663
|
+
* round-trips it via the preserved chart XML rather than a typed edit path.
|
|
3664
|
+
*/
|
|
3665
|
+
gapDepth?: number;
|
|
3666
|
+
/**
|
|
3667
|
+
* Parsed Office 2013+ chart-style part (`ppt/charts/style#.xml`,
|
|
3668
|
+
* `cs:chartStyle`), providing per-element font/line/fill defaults for
|
|
3669
|
+
* whichever built-in "Chart Styles" gallery entry ({@link PptxChartStyle.styleId})
|
|
3670
|
+
* is active. Absent when the chart has no such part (common for
|
|
3671
|
+
* automation-authored charts, where PowerPoint still implies style 2's
|
|
3672
|
+
* look via its own bundled defaults).
|
|
3673
|
+
*/
|
|
3674
|
+
chartStyleDefinition?: PptxChartStyleDefinition;
|
|
3402
3675
|
}
|
|
3403
3676
|
//#endregion
|
|
3404
3677
|
//#region src/core/types/image.d.ts
|
|
@@ -3922,6 +4195,52 @@ interface MediaCaptionTrack {
|
|
|
3922
4195
|
isDefault?: boolean;
|
|
3923
4196
|
}
|
|
3924
4197
|
//#endregion
|
|
4198
|
+
//#region src/core/types/smart-art-chrome.d.ts
|
|
4199
|
+
/**
|
|
4200
|
+
* Background / outline extracted from `dgm:bg` and `dgm:whole`.
|
|
4201
|
+
*
|
|
4202
|
+
* @example
|
|
4203
|
+
* ```ts
|
|
4204
|
+
* const chrome: PptxSmartArtChrome = {
|
|
4205
|
+
* backgroundColor: "#F0F0F0",
|
|
4206
|
+
* outlineColor: "#333333",
|
|
4207
|
+
* outlineWidth: 1,
|
|
4208
|
+
* };
|
|
4209
|
+
* // => satisfies PptxSmartArtChrome
|
|
4210
|
+
* ```
|
|
4211
|
+
*/
|
|
4212
|
+
interface PptxSmartArtChrome {
|
|
4213
|
+
/**
|
|
4214
|
+
* Background fill colour (hex). When the real `dgm:bg` fill is a gradient
|
|
4215
|
+
* or pattern (see {@link PptxSmartArtChrome.backgroundFillXml}), this is an
|
|
4216
|
+
* APPROXIMATION (the gradient's first stop, or the pattern's foreground
|
|
4217
|
+
* colour) for a consumer that only wants one display colour, not the full fill.
|
|
4218
|
+
*/
|
|
4219
|
+
backgroundColor?: string;
|
|
4220
|
+
/**
|
|
4221
|
+
* Raw `dgm:bg` fill XML, present only when the background is a gradient or
|
|
4222
|
+
* pattern fill (a solid fill is fully captured by {@link PptxSmartArtChrome.backgroundColor}
|
|
4223
|
+
* alone). Round-trip only: `smartart-save-chrome.ts` re-emits this verbatim
|
|
4224
|
+
* instead of flattening the fill to a solid colour on save.
|
|
4225
|
+
*/
|
|
4226
|
+
backgroundFillXml?: PptxSmartArtRawBackgroundFill;
|
|
4227
|
+
/** Outline stroke colour (hex). */
|
|
4228
|
+
outlineColor?: string;
|
|
4229
|
+
/** Outline stroke width in points. */
|
|
4230
|
+
outlineWidth?: number;
|
|
4231
|
+
}
|
|
4232
|
+
/**
|
|
4233
|
+
* A `dgm:bg` fill this viewer doesn't fully model as first-class chrome
|
|
4234
|
+
* (gradient or pattern), preserved verbatim for round-trip. See
|
|
4235
|
+
* {@link PptxSmartArtChrome.backgroundFillXml}.
|
|
4236
|
+
*/
|
|
4237
|
+
interface PptxSmartArtRawBackgroundFill {
|
|
4238
|
+
/** Local element name of the fill under `dgm:bg` (`gradFill` or `pattFill`). */
|
|
4239
|
+
localName: 'gradFill' | 'pattFill';
|
|
4240
|
+
/** The fill element's own attributes/children, as parsed. */
|
|
4241
|
+
xml: XmlObject;
|
|
4242
|
+
}
|
|
4243
|
+
//#endregion
|
|
3925
4244
|
//#region src/core/types/smart-art-constraint-rules.d.ts
|
|
3926
4245
|
type PptxSmartArtConstraintRelationship = 'self' | 'ch' | 'des';
|
|
3927
4246
|
type PptxSmartArtConstraintOperator = 'none' | 'equ' | 'gte' | 'lte';
|
|
@@ -4020,6 +4339,14 @@ interface PptxSmartArtLayoutNodeShape {
|
|
|
4020
4339
|
adjustments?: PptxSmartArtShapeAdjustment[];
|
|
4021
4340
|
/** `dgm:shape/@hideGeom`: the shape is present only to size text, never painted. */
|
|
4022
4341
|
hideGeometry?: boolean;
|
|
4342
|
+
/**
|
|
4343
|
+
* `dgm:shape/@lkTxEntry` (CT_Shape, boolean, default false): this node is a
|
|
4344
|
+
* decorative shape that should mirror its paired content node's text
|
|
4345
|
+
* rather than always rendering blank. See `smartart-layout-interpreter-
|
|
4346
|
+
* pyramid.ts`'s `arrangePyramid`, the interpreter's one existing
|
|
4347
|
+
* synthesized-decorative-shape call site.
|
|
4348
|
+
*/
|
|
4349
|
+
lkTxEntry?: boolean;
|
|
4023
4350
|
}
|
|
4024
4351
|
/** Identity and ordering metadata from DiagramML CT_LayoutNode. */
|
|
4025
4352
|
interface PptxSmartArtLayoutNode {
|
|
@@ -4247,6 +4574,13 @@ interface PptxSmartArtNode {
|
|
|
4247
4574
|
* generic cycled palette (see `applySmartArtRoleColors`).
|
|
4248
4575
|
*/
|
|
4249
4576
|
styleRole?: string;
|
|
4577
|
+
/**
|
|
4578
|
+
* `dgm:prSet/@coherent3DOff` (`CT_ElemPropSet`) resolved from the node's
|
|
4579
|
+
* paired presentation point: when true, this node opts out of the
|
|
4580
|
+
* diagram's overall coherent-3D scene rotation (a `dgm:scene3d`/`dgm:sp3d`
|
|
4581
|
+
* quick-style variation) applied to every other node.
|
|
4582
|
+
*/
|
|
4583
|
+
coherent3DOff?: boolean;
|
|
4250
4584
|
/**
|
|
4251
4585
|
* Per-run text + run-properties for the node's first paragraph, captured at
|
|
4252
4586
|
* parse time. When the joined run text still equals {@link text} (the node
|
|
@@ -4294,9 +4628,29 @@ interface PptxSmartArtColorListMetadata {
|
|
|
4294
4628
|
method?: PptxSmartArtColorApplicationMethod;
|
|
4295
4629
|
hueDirection?: PptxSmartArtHueDirection;
|
|
4296
4630
|
}
|
|
4631
|
+
/**
|
|
4632
|
+
* A quick-style label's `a:lnRef`/`a:fillRef`/`a:effectRef`/`a:fontRef`
|
|
4633
|
+
* (`CT_ShapeStyle`, the same complex type an ordinary shape's `p:style`
|
|
4634
|
+
* uses), resolved against the theme's `fmtScheme` at parse time instead of
|
|
4635
|
+
* the coarse subtle/moderate/intense enum ({@link PptxSmartArtQuickStyle.effectIntensity}).
|
|
4636
|
+
* Only populated when a theme format scheme was available when the quick
|
|
4637
|
+
* style was parsed. See G13 in the 2026-09 diagram audit.
|
|
4638
|
+
*/
|
|
4639
|
+
interface PptxSmartArtResolvedStyleRef {
|
|
4640
|
+
fillColor?: string;
|
|
4641
|
+
fillMode?: 'solid' | 'gradient' | 'pattern' | 'none' | 'theme';
|
|
4642
|
+
strokeColor?: string;
|
|
4643
|
+
strokeWidth?: number;
|
|
4644
|
+
/** `a:effectRef`'s theme-resolved outer shadow colour, when the style has one. */
|
|
4645
|
+
shadowColor?: string;
|
|
4646
|
+
/** `a:fontRef`'s theme-resolved typeface (`+mn-lt`/`+mj-lt` -> the theme's actual font). */
|
|
4647
|
+
fontTypeface?: string;
|
|
4648
|
+
}
|
|
4297
4649
|
/** CT_StyleLabel metadata from a quick-style definition. */
|
|
4298
4650
|
interface PptxSmartArtQuickStyleLabel {
|
|
4299
4651
|
name: string;
|
|
4652
|
+
/** Theme-resolved `dgm:style` refs for this label's role, when available. */
|
|
4653
|
+
resolvedStyle?: PptxSmartArtResolvedStyleRef;
|
|
4300
4654
|
}
|
|
4301
4655
|
/** CT_CTStyleLabel metadata from a color-transform definition. */
|
|
4302
4656
|
interface PptxSmartArtColorStyleLabel {
|
|
@@ -4559,27 +4913,6 @@ interface PptxSmartArtDrawingShape extends PptxCustomPathProperties {
|
|
|
4559
4913
|
textFrameWidth?: number;
|
|
4560
4914
|
textFrameHeight?: number;
|
|
4561
4915
|
}
|
|
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
4916
|
/**
|
|
4584
4917
|
* Presentation layout variables from `dgm:prSet/dgm:presLayoutVars` (data model)
|
|
4585
4918
|
* or `dgm:varLst` (layout definition defaults).
|
|
@@ -5036,6 +5369,22 @@ interface PptxTableData {
|
|
|
5036
5369
|
bandColCycle?: number;
|
|
5037
5370
|
/** Right-to-left table layout from `a:tblPr/@rtl`. */
|
|
5038
5371
|
rtl?: boolean;
|
|
5372
|
+
/**
|
|
5373
|
+
* `a:tblPr`'s OWN fill (`CT_TableProperties` §21.1.3.15's
|
|
5374
|
+
* `EG_FillProperties`), independent of any `a:tblStyleLst`-referenced style
|
|
5375
|
+
* or that style's `a:tblBg`. Applied as the lowest-priority fill layer,
|
|
5376
|
+
* beneath the table style's `wholeTbl` fill. Real PowerPoint decks route
|
|
5377
|
+
* table appearance through `tableStyleId` instead, so this mainly matters
|
|
5378
|
+
* for non-PowerPoint authoring tools (issue G6).
|
|
5379
|
+
*/
|
|
5380
|
+
tableFill?: ParsedTableStyleFill;
|
|
5381
|
+
/**
|
|
5382
|
+
* Whether `a:tblPr` carries its own `a:effectLst`/`a:effectDag`,
|
|
5383
|
+
* independent of the referenced table style. Presence-only: the concrete
|
|
5384
|
+
* effect is not yet rendered, and the raw XML round-trips separately via
|
|
5385
|
+
* whatever preserves `a:tblPr`'s unrecognised children (issue G6).
|
|
5386
|
+
*/
|
|
5387
|
+
tableEffects?: boolean;
|
|
5039
5388
|
}
|
|
5040
5389
|
/**
|
|
5041
5390
|
* A single fill reference within a table style section.
|
|
@@ -5157,7 +5506,7 @@ interface ParsedTableStyleText {
|
|
|
5157
5506
|
* A single border side within a table style's `a:tcStyle/a:tcBdr`.
|
|
5158
5507
|
*
|
|
5159
5508
|
* Corresponds to one of `a:left`, `a:right`, `a:top`, `a:bottom`,
|
|
5160
|
-
* `a:insideH`, `a:insideV`, `a:tl2br`, `a:
|
|
5509
|
+
* `a:insideH`, `a:insideV`, `a:tl2br`, `a:tr2bl` (each a
|
|
5161
5510
|
* `CT_ThemeableLineStyle` wrapping an `a:ln`).
|
|
5162
5511
|
*
|
|
5163
5512
|
* @example
|
|
@@ -5197,8 +5546,16 @@ interface ParsedTableStyleBorders {
|
|
|
5197
5546
|
insideV?: ParsedTableStyleBorder;
|
|
5198
5547
|
/** Top-left to bottom-right diagonal. */
|
|
5199
5548
|
tl2br?: ParsedTableStyleBorder;
|
|
5200
|
-
/**
|
|
5201
|
-
|
|
5549
|
+
/**
|
|
5550
|
+
* Top-right to bottom-left diagonal (`a:tr2bl`, ECMA-376's
|
|
5551
|
+
* `CT_TableCellBorderStyle` sequence: left/right/top/bottom/insideH/
|
|
5552
|
+
* insideV/tl2br/tr2bl). The field keeps its historical `bl2tr` spelling
|
|
5553
|
+
* only in the sense that it names the same geometric anti-diagonal line
|
|
5554
|
+
* (top-right-to-bottom-left and bottom-left-to-top-right describe one
|
|
5555
|
+
* undirected diagonal); the parser accepts the real `a:tr2bl` element and,
|
|
5556
|
+
* leniently, a legacy `a:bl2tr` this app previously wrote (issue G4).
|
|
5557
|
+
*/
|
|
5558
|
+
tr2bl?: ParsedTableStyleBorder;
|
|
5202
5559
|
}
|
|
5203
5560
|
/**
|
|
5204
5561
|
* Table background style (CT_TableBackgroundStyle, ECMA-376 §21.1.3.7).
|
|
@@ -5266,6 +5623,26 @@ interface ParsedTableStyleEntry {
|
|
|
5266
5623
|
swCellText?: ParsedTableStyleText;
|
|
5267
5624
|
neCellText?: ParsedTableStyleText;
|
|
5268
5625
|
nwCellText?: ParsedTableStyleText;
|
|
5626
|
+
/**
|
|
5627
|
+
* Per-role 3D bevel + lighting from `a:tcStyle/a:cell3D` (CT_Cell3D),
|
|
5628
|
+
* distinct from the per-cell `a:tcPr/a:cell3D` {@link PptxTableCellStyle}
|
|
5629
|
+
* already supports. None of PowerPoint's 74 built-in gallery styles use
|
|
5630
|
+
* this (0 hits in the built-in catalogue), so it only matters for a
|
|
5631
|
+
* hand-authored or third-party table style.
|
|
5632
|
+
*/
|
|
5633
|
+
wholeTblCell3D?: PptxTableCell3D;
|
|
5634
|
+
firstRowCell3D?: PptxTableCell3D;
|
|
5635
|
+
lastRowCell3D?: PptxTableCell3D;
|
|
5636
|
+
firstColCell3D?: PptxTableCell3D;
|
|
5637
|
+
lastColCell3D?: PptxTableCell3D;
|
|
5638
|
+
band1HCell3D?: PptxTableCell3D;
|
|
5639
|
+
band2HCell3D?: PptxTableCell3D;
|
|
5640
|
+
band1VCell3D?: PptxTableCell3D;
|
|
5641
|
+
band2VCell3D?: PptxTableCell3D;
|
|
5642
|
+
seCellCell3D?: PptxTableCell3D;
|
|
5643
|
+
swCellCell3D?: PptxTableCell3D;
|
|
5644
|
+
neCellCell3D?: PptxTableCell3D;
|
|
5645
|
+
nwCellCell3D?: PptxTableCell3D;
|
|
5269
5646
|
}
|
|
5270
5647
|
/**
|
|
5271
5648
|
* Map of GUID → table style entry.
|
|
@@ -5288,6 +5665,38 @@ interface ParsedTableStyleEntry {
|
|
|
5288
5665
|
type ParsedTableStyleMap = Record<string, ParsedTableStyleEntry>;
|
|
5289
5666
|
//#endregion
|
|
5290
5667
|
//#region src/core/types/elements.d.ts
|
|
5668
|
+
/**
|
|
5669
|
+
* Accessibility metadata from `p:cNvPr/a:extLst`'s "Mark as decorative"
|
|
5670
|
+
* vendor extension (issue G16). PowerPoint's Alt Text pane writes
|
|
5671
|
+
* `a:ext[@uri='{C183D7F6-B498-43B3-948B-1728B52AA6E4}']/adec:decorative
|
|
5672
|
+
* val="1"` when a shape or image is marked decorative; mixed into the
|
|
5673
|
+
* element variants whose `p:cNvPr` that pane covers.
|
|
5674
|
+
*/
|
|
5675
|
+
interface PptxAccessibilityProperties {
|
|
5676
|
+
/**
|
|
5677
|
+
* Whether the element is marked decorative. When true, alt text /
|
|
5678
|
+
* aria-label / Markdown export should skip describing the element even
|
|
5679
|
+
* when {@link PptxImageProperties.altText} (or similar) is present.
|
|
5680
|
+
*/
|
|
5681
|
+
isDecorative?: boolean;
|
|
5682
|
+
}
|
|
5683
|
+
/**
|
|
5684
|
+
* `a:cNvPicPr/@preferRelativeResize` (issue G13), a picture-only non-visual
|
|
5685
|
+
* property distinct from `a:picLocks`.
|
|
5686
|
+
*/
|
|
5687
|
+
interface PptxPictureNonVisualProperties {
|
|
5688
|
+
/**
|
|
5689
|
+
* `a:cNvPicPr/@preferRelativeResize` (ST_Boolean, defaults to `true` when
|
|
5690
|
+
* absent). Controls whether a picture's crop rectangle is reinterpreted
|
|
5691
|
+
* relative to the picture's ORIGINAL dimensions or its CURRENT
|
|
5692
|
+
* (already-resized) dimensions when it is resized again after being
|
|
5693
|
+
* cropped. Parsed and round-tripped for now; not yet wired into
|
|
5694
|
+
* resize-after-crop arithmetic (this app always uses current-size
|
|
5695
|
+
* semantics, which only diverges from `preferRelativeResize="0"` on a
|
|
5696
|
+
* second resize after a crop).
|
|
5697
|
+
*/
|
|
5698
|
+
preferRelativeResize?: boolean;
|
|
5699
|
+
}
|
|
5291
5700
|
/**
|
|
5292
5701
|
* A text box — a plain rectangle containing text, typically with no
|
|
5293
5702
|
* visible fill or stroke.
|
|
@@ -5321,7 +5730,7 @@ interface TextPptxElement extends PptxElementBase, PptxTextProperties, PptxShape
|
|
|
5321
5730
|
* // => satisfies ShapePptxElement
|
|
5322
5731
|
* ```
|
|
5323
5732
|
*/
|
|
5324
|
-
interface ShapePptxElement extends PptxElementBase, PptxTextProperties, PptxShapeProperties, PptxCustomPathProperties {
|
|
5733
|
+
interface ShapePptxElement extends PptxElementBase, PptxTextProperties, PptxShapeProperties, PptxCustomPathProperties, PptxAccessibilityProperties {
|
|
5325
5734
|
type: 'shape';
|
|
5326
5735
|
}
|
|
5327
5736
|
/**
|
|
@@ -5360,7 +5769,7 @@ interface ConnectorPptxElement extends PptxElementBase, PptxTextProperties, Pptx
|
|
|
5360
5769
|
* // => satisfies ImagePptxElement
|
|
5361
5770
|
* ```
|
|
5362
5771
|
*/
|
|
5363
|
-
interface ImagePptxElement extends PptxElementBase, PptxShapeProperties, PptxCustomPathProperties, PptxImageProperties {
|
|
5772
|
+
interface ImagePptxElement extends PptxElementBase, PptxShapeProperties, PptxCustomPathProperties, PptxImageProperties, PptxAccessibilityProperties, PptxPictureNonVisualProperties {
|
|
5364
5773
|
type: 'image';
|
|
5365
5774
|
}
|
|
5366
5775
|
/**
|
|
@@ -5369,7 +5778,7 @@ interface ImagePptxElement extends PptxElementBase, PptxShapeProperties, PptxCus
|
|
|
5369
5778
|
* Functionally identical to {@link ImagePptxElement} but distinguished by
|
|
5370
5779
|
* the `type` discriminant for semantic clarity.
|
|
5371
5780
|
*/
|
|
5372
|
-
interface PicturePptxElement extends PptxElementBase, PptxShapeProperties, PptxCustomPathProperties, PptxImageProperties {
|
|
5781
|
+
interface PicturePptxElement extends PptxElementBase, PptxShapeProperties, PptxCustomPathProperties, PptxImageProperties, PptxAccessibilityProperties, PptxPictureNonVisualProperties {
|
|
5373
5782
|
type: 'picture';
|
|
5374
5783
|
}
|
|
5375
5784
|
/**
|
|
@@ -5519,6 +5928,14 @@ interface OlePptxElement extends PptxElementBase {
|
|
|
5519
5928
|
* Only meaningful when {@link isLinked} is `true`. ECMA-376 §19.3.1.28.
|
|
5520
5929
|
*/
|
|
5521
5930
|
oleFollowColorScheme?: 'none' | 'full' | 'textAndBackground';
|
|
5931
|
+
/**
|
|
5932
|
+
* `p:link/@updateAutomatic` (`CT_OleObjectLink`, ECMA-376 §19.3.2.4):
|
|
5933
|
+
* whether a LINKED OLE object refreshes automatically from its source
|
|
5934
|
+
* (PowerPoint's Edit Links dialog "Automatic" vs. "Manual" radio buttons).
|
|
5935
|
+
* Only meaningful when {@link isLinked} is `true`. The schema default is
|
|
5936
|
+
* `false`; `undefined` means the source authored no explicit value.
|
|
5937
|
+
*/
|
|
5938
|
+
oleUpdateAutomatic?: boolean;
|
|
5522
5939
|
/** Unrecognised graphicFrame extLst extensions, captured verbatim for round-trip. */
|
|
5523
5940
|
extensionXml?: PptxGraphicFrameExtension[];
|
|
5524
5941
|
}
|
|
@@ -6113,12 +6530,50 @@ type PptxAnimationTrigger = 'onClick' | 'onShapeClick' | 'onHover' | 'afterPrevi
|
|
|
6113
6530
|
* is preserved alongside other animations.
|
|
6114
6531
|
*/
|
|
6115
6532
|
type PptxNativeAnimationKind = 'media';
|
|
6533
|
+
/**
|
|
6534
|
+
* `p:spTgt/p:graphicEl` (CT_TLGraphicalObjectBuildElement, ECMA-376 S19.5.34):
|
|
6535
|
+
* identifies exactly which series/category/element of a chart or diagram
|
|
6536
|
+
* build a per-stage effect reveals, when a deck authors one effect per stage
|
|
6537
|
+
* instead of a single staged `p:bldGraphic` reveal.
|
|
6538
|
+
*/
|
|
6539
|
+
interface PptxAnimationGraphicElementTarget {
|
|
6540
|
+
/** Which graphic kind: `p:dgm` (diagram) or `p:chart`. */
|
|
6541
|
+
kind: 'dgm' | 'chart';
|
|
6542
|
+
/** `@_seriesIdx`, 0-based series index, when the target is series-scoped. */
|
|
6543
|
+
seriesIdx?: number;
|
|
6544
|
+
/** `@_categoryIdx`, 0-based category index, when the target is category-scoped. */
|
|
6545
|
+
categoryIdx?: number;
|
|
6546
|
+
/** `@_bldStep` (ST_TLChartBuildStep): `category` / `categoryEl` / `series` / `seriesEl`. */
|
|
6547
|
+
bldStep?: string;
|
|
6548
|
+
}
|
|
6549
|
+
/**
|
|
6550
|
+
* `p:spTgt/p:oleChartEl` (CT_TLOleChartTargetElement, ECMA-376 S19.5.44):
|
|
6551
|
+
* legacy pre-DrawingML OLE Graph chart sub-element targeting.
|
|
6552
|
+
*/
|
|
6553
|
+
interface PptxAnimationOleChartElementTarget {
|
|
6554
|
+
/** `@_type` (ST_TLOleChartSubelementType): entireChart / series / category / ... */
|
|
6555
|
+
subelementType: string;
|
|
6556
|
+
/** `@_lvl`, optional sub-element level. */
|
|
6557
|
+
level?: number;
|
|
6558
|
+
}
|
|
6116
6559
|
/** A target selected by `p:tgtEl` in the PresentationML timing model. */
|
|
6117
6560
|
type PptxAnimationTarget = {
|
|
6118
6561
|
type: 'shape';
|
|
6119
6562
|
shapeId: string;
|
|
6120
6563
|
/** Whether `p:spTgt/p:bg` limits the effect to the shape background. */
|
|
6121
6564
|
backgroundOnly?: boolean;
|
|
6565
|
+
/**
|
|
6566
|
+
* `p:spTgt/p:subSp/@_spid`: the id of a shape NESTED inside the group
|
|
6567
|
+
* named by {@link shapeId} (CT_TLSubShapeId, ECMA-376 S19.5.71).
|
|
6568
|
+
* PowerPoint authors this when a user animates one member of a group
|
|
6569
|
+
* without ungrouping it: `shapeId` stays the outer group's id for
|
|
6570
|
+
* round-trip, but this sub-shape is the real playback target.
|
|
6571
|
+
*/
|
|
6572
|
+
subShapeId?: string;
|
|
6573
|
+
/** `p:spTgt/p:graphicEl`: chart/diagram series/category/element target. */
|
|
6574
|
+
graphicElement?: PptxAnimationGraphicElementTarget;
|
|
6575
|
+
/** `p:spTgt/p:oleChartEl`: legacy OLE chart sub-element target. */
|
|
6576
|
+
oleChartElement?: PptxAnimationOleChartElementTarget;
|
|
6122
6577
|
rawXml?: XmlObject;
|
|
6123
6578
|
} | {
|
|
6124
6579
|
type: 'slide';
|
|
@@ -6498,6 +6953,46 @@ interface PptxNativeAnimation {
|
|
|
6498
6953
|
* PowerPoint that only emit the SMIL-style filter string.
|
|
6499
6954
|
*/
|
|
6500
6955
|
effectFilter?: PptxAnimationEffectFilter;
|
|
6956
|
+
/**
|
|
6957
|
+
* This effect's own `p:cTn/@_id` (a raw OOXML time-node id, not a shape
|
|
6958
|
+
* id). Lets playback resolve a `p:cond/@tn` dependency (see
|
|
6959
|
+
* {@link AnimationCondition.targetTimeNodeId}) against the SPECIFIC node
|
|
6960
|
+
* it names rather than assuming it is always the positionally-previous
|
|
6961
|
+
* effect. Absent when the node carried no `@_id`.
|
|
6962
|
+
*/
|
|
6963
|
+
nodeId?: number;
|
|
6964
|
+
/**
|
|
6965
|
+
* Interpolation mode for this effect's PRIMARY `p:anim`-family behaviour
|
|
6966
|
+
* (the same node {@link keyframes}/{@link attrName} were read from), from
|
|
6967
|
+
* `@_calcmode` (ST_TLAnimateBehaviorCalcMode, ECMA-376 S19.5.2). See
|
|
6968
|
+
* {@link PptxAttributeAnimation.calcMode} for the per-component version.
|
|
6969
|
+
*/
|
|
6970
|
+
calcMode?: 'discrete' | 'lin' | 'fmla';
|
|
6971
|
+
/**
|
|
6972
|
+
* `p:cBhvr/@_additive` (ST_TLBehaviorAdditiveType, ECMA-376 S19.5.4):
|
|
6973
|
+
* controls how this behaviour's value composites with sibling behaviours
|
|
6974
|
+
* driving the same attribute on the same target. `sum` accumulates
|
|
6975
|
+
* (e.g. a combined scale+rotate), `repl`/`base`/`none`/`mult` replace or
|
|
6976
|
+
* otherwise combine. Absent means the OOXML default (`base`).
|
|
6977
|
+
*/
|
|
6978
|
+
cBhvrAdditive?: 'base' | 'sum' | 'repl' | 'mult' | 'none';
|
|
6979
|
+
/**
|
|
6980
|
+
* `p:cBhvr/@_accumulate` (ST_TLBehaviorAccumulateType): `always` means
|
|
6981
|
+
* each `p:cTn/@repeatCount` repeat starts from the PREVIOUS repeat's end
|
|
6982
|
+
* value (e.g. a 3x Spin totals 1080deg instead of replaying 0-360 three
|
|
6983
|
+
* times); `none` (the OOXML default) resets every repeat.
|
|
6984
|
+
*/
|
|
6985
|
+
cBhvrAccumulate?: 'none' | 'always';
|
|
6986
|
+
/**
|
|
6987
|
+
* `p:cBhvr/@_xfrmType` (only meaningful on `p:animMotion`): `point`
|
|
6988
|
+
* (default) or `img`, a legacy compatibility hint. Round-tripped only.
|
|
6989
|
+
*/
|
|
6990
|
+
cBhvrXfrmType?: 'point' | 'img';
|
|
6991
|
+
/**
|
|
6992
|
+
* `p:cBhvr/@_override` (ST_TLBehaviorOverrideType): `normal` (default) or
|
|
6993
|
+
* `childStyle`, a legacy compatibility hint. Round-tripped only.
|
|
6994
|
+
*/
|
|
6995
|
+
cBhvrOverride?: 'normal' | 'childStyle';
|
|
6501
6996
|
}
|
|
6502
6997
|
/**
|
|
6503
6998
|
* Parsed `p:animEffect/@filter` (+ `@transition`) descriptor. ECMA-376
|
|
@@ -6564,6 +7059,14 @@ interface PptxAttributeAnimation {
|
|
|
6564
7059
|
durationMs?: number;
|
|
6565
7060
|
/** Start offset from this behaviour's nested `p:stCondLst`. */
|
|
6566
7061
|
delayMs?: number;
|
|
7062
|
+
/**
|
|
7063
|
+
* Interpolation mode from this behaviour's own `@_calcmode`
|
|
7064
|
+
* (ST_TLAnimateBehaviorCalcMode, ECMA-376 S19.5.2): `discrete` snaps to
|
|
7065
|
+
* each `p:tav` stop with no interpolation, `lin` (the OOXML default)
|
|
7066
|
+
* interpolates linearly, `fmla` evaluates `p:tav/@fmla` (not consulted at
|
|
7067
|
+
* playback here; formulas are round-tripped only). Absent means `lin`.
|
|
7068
|
+
*/
|
|
7069
|
+
calcMode?: 'discrete' | 'lin' | 'fmla';
|
|
6567
7070
|
}
|
|
6568
7071
|
/** Signed HSL channel deltas parsed from `p:animClr/p:by/p:hsl`. */
|
|
6569
7072
|
interface PptxHslColorDelta {
|
|
@@ -6630,7 +7133,7 @@ interface PptxTextAnimationTarget {
|
|
|
6630
7133
|
* These map directly to OOXML condition event attribute values
|
|
6631
7134
|
* (ISO/IEC 29500-1 S19.5.28 CT_TLTimeCondition).
|
|
6632
7135
|
*/
|
|
6633
|
-
type AnimationConditionEvent = 'onBegin' | 'onEnd' | 'begin' | 'end' | 'onClick' | 'onMouseOver' | 'onMouseOut' | 'onNext' | 'onPrev' | 'onStopAudio';
|
|
7136
|
+
type AnimationConditionEvent = 'onBegin' | 'onEnd' | 'begin' | 'end' | 'onClick' | 'onMouseOver' | 'onMouseOut' | 'onNext' | 'onPrev' | 'onStopAudio' | 'onDblClick';
|
|
6634
7137
|
/**
|
|
6635
7138
|
* Structured representation of a single OOXML animation condition
|
|
6636
7139
|
* from `p:cond` elements inside `p:stCondLst` or `p:endCondLst`.
|
|
@@ -7970,10 +8473,32 @@ interface PptxPresentationProperties {
|
|
|
7970
8473
|
printProperties?: PptxPresentationPrintProperties | null;
|
|
7971
8474
|
/** Most-recently-used colours from the presentation palette. */
|
|
7972
8475
|
mruColors?: string[];
|
|
7973
|
-
/**
|
|
8476
|
+
/**
|
|
8477
|
+
* Pen colour for presentation mode annotations (from `p:showPr/p:penClr`).
|
|
8478
|
+
* `p:penClr` is a full `EG_ColorChoice` (P1-G2): a scheme/preset/system
|
|
8479
|
+
* swatch resolves to a hex string here just like a direct `a:srgbClr`.
|
|
8480
|
+
*/
|
|
7974
8481
|
penColor?: string;
|
|
8482
|
+
/**
|
|
8483
|
+
* The resolved hex value {@link penColor} had at parse time, and the
|
|
8484
|
+
* original `p:penClr` colour-choice XML node, preserved so a save that
|
|
8485
|
+
* never touches the pen colour re-emits the original scheme/preset
|
|
8486
|
+
* reference verbatim instead of flattening it to a baked `a:srgbClr`.
|
|
8487
|
+
* Internal round-trip bookkeeping; not meant to be set by API callers.
|
|
8488
|
+
*/
|
|
8489
|
+
penColorOriginal?: string;
|
|
8490
|
+
/** @see penColorOriginal */
|
|
8491
|
+
penColorXml?: XmlObject;
|
|
7975
8492
|
/** Kiosk auto-restart interval in milliseconds (from `p:kiosk/@restart`). Only meaningful when showType is "kiosk". */
|
|
7976
8493
|
kioskRestartTime?: number;
|
|
8494
|
+
/**
|
|
8495
|
+
* `p:showPr/p:browse/@showScrollbar` (CT_ShowInfoBrowse §19.2.1.10 /
|
|
8496
|
+
* §19.3.1.43), the "Show scrollbar" checkbox in PowerPoint's Set Up Show
|
|
8497
|
+
* dialog. Only meaningful when `showType` is `"browsed"`; the schema
|
|
8498
|
+
* default is `true`. `undefined` means the source authored no explicit
|
|
8499
|
+
* value (or `showType` is not `"browsed"`).
|
|
8500
|
+
*/
|
|
8501
|
+
showScrollbar?: boolean;
|
|
7977
8502
|
}
|
|
7978
8503
|
/**
|
|
7979
8504
|
* Slide dimensions from `p:sldSz` (CT_SlideSize, ECMA-376 §19.2.1.39).
|
|
@@ -8358,7 +8883,7 @@ interface PptxEmbeddedFont {
|
|
|
8358
8883
|
originalPartBytes?: Uint8Array;
|
|
8359
8884
|
}
|
|
8360
8885
|
//#endregion
|
|
8361
|
-
//#region ../core/dist/index-
|
|
8886
|
+
//#region ../core/dist/index-YjWgLS6-.d.ts
|
|
8362
8887
|
//#region src/core/types/theme-presets.d.ts
|
|
8363
8888
|
/**
|
|
8364
8889
|
* A complete theme preset that can be applied to a presentation.
|
|
@@ -10152,6 +10677,41 @@ type ChartBuildMode = 'asOne' | 'bySeries' | 'byCategory' | 'byElement';
|
|
|
10152
10677
|
* - `byLvlAtOnce` a whole level is revealed per stage (`lvlAtOnce`).
|
|
10153
10678
|
*/
|
|
10154
10679
|
type DiagramBuildMode = 'asOne' | 'byOne' | 'byLvl' | 'byLvlAtOnce';
|
|
10680
|
+
/**
|
|
10681
|
+
* One authored `p:graphicEl` reveal unit resolved onto a chart, per
|
|
10682
|
+
* `TimelineStepGraphicElement`'s "both indices set" case: a single (series,
|
|
10683
|
+
* category) cell revealed by a `bldStep="seriesEl"`/`"categoryEl"` effect.
|
|
10684
|
+
*/
|
|
10685
|
+
interface ChartRevealPoint {
|
|
10686
|
+
seriesIdx: number;
|
|
10687
|
+
categoryIdx: number;
|
|
10688
|
+
}
|
|
10689
|
+
/**
|
|
10690
|
+
* Playback-time chart reveal state derived from AUTHORED `p:graphicEl`
|
|
10691
|
+
* indices (see `chart-reveal-descriptor`'s `resolveChartRevealDescriptor`),
|
|
10692
|
+
* rather than from click-count/time progress. Present on
|
|
10693
|
+
* {@link ElementAnimationState.chartReveal} only when every fired
|
|
10694
|
+
* chart-build step for the element carried index data; a renderer prefers
|
|
10695
|
+
* this over the progress-based `build`/`ElementBuildState` path when present,
|
|
10696
|
+
* since it reflects the real authored reveal set (correct even for a
|
|
10697
|
+
* reversed-order or gapped chart build), and falls back to `build` when
|
|
10698
|
+
* absent.
|
|
10699
|
+
*/
|
|
10700
|
+
interface ChartRevealDescriptor {
|
|
10701
|
+
/**
|
|
10702
|
+
* Whether the chart's background/axes/gridlines/legend should currently be
|
|
10703
|
+
* visible: always `true` when the chart's `animateBackground` is `false`
|
|
10704
|
+
* ("shown throughout"), otherwise `true` from the first revealed stage
|
|
10705
|
+
* onward.
|
|
10706
|
+
*/
|
|
10707
|
+
background: boolean;
|
|
10708
|
+
/** Whole series revealed by a `bldStep="series"` effect. */
|
|
10709
|
+
series: ReadonlySet<number>;
|
|
10710
|
+
/** Whole categories revealed by a `bldStep="category"` effect. */
|
|
10711
|
+
categories: ReadonlySet<number>;
|
|
10712
|
+
/** Individual cells revealed by a `bldStep="seriesEl"`/`"categoryEl"` effect. */
|
|
10713
|
+
points: readonly ChartRevealPoint[];
|
|
10714
|
+
}
|
|
10155
10715
|
/**
|
|
10156
10716
|
* Playback-time staged-build state surfaced on {@link ElementAnimationState}.
|
|
10157
10717
|
* `progress` is the 0..1 fraction of the build revealed at the current playback
|
|
@@ -10182,6 +10742,16 @@ interface ElementAnimationState {
|
|
|
10182
10742
|
* whole-element entrances, so existing renderers are unaffected.
|
|
10183
10743
|
*/
|
|
10184
10744
|
build?: ElementBuildState;
|
|
10745
|
+
/**
|
|
10746
|
+
* Authored-index chart reveal state (see {@link ChartRevealDescriptor}),
|
|
10747
|
+
* present only when every fired chart-build step for this element carried
|
|
10748
|
+
* `p:graphicEl` index data. A chart renderer prefers this over `build` when
|
|
10749
|
+
* present; `chart-build`'s `resolveRevealedChartData` picks between the two.
|
|
10750
|
+
*/
|
|
10751
|
+
chartReveal?: {
|
|
10752
|
+
mode: ChartBuildMode;
|
|
10753
|
+
descriptor: ChartRevealDescriptor;
|
|
10754
|
+
};
|
|
10185
10755
|
/**
|
|
10186
10756
|
* True when an active `p:animClr` color animation targets this shape's fill.
|
|
10187
10757
|
* A vector renderer should then paint the fill with `fill: inherit` so the
|
|
@@ -11910,6 +12480,10 @@ interface AccessibilityPanel {
|
|
|
11910
12480
|
interface InspectorState {
|
|
11911
12481
|
hasSelection: boolean;
|
|
11912
12482
|
isLocked: boolean;
|
|
12483
|
+
/** `a:picLocks/@noCrop`: may the selected picture's crop be adjusted? */
|
|
12484
|
+
croppable: boolean;
|
|
12485
|
+
/** `arrowheadsChangeable` (`element-locks.ts`): may connector arrowheads change? */
|
|
12486
|
+
arrowheadsChangeable: boolean;
|
|
11913
12487
|
canShape: boolean;
|
|
11914
12488
|
canText: boolean;
|
|
11915
12489
|
isImage: boolean;
|
|
@@ -11942,7 +12516,7 @@ interface InspectorState {
|
|
|
11942
12516
|
strokeOpacity: number;
|
|
11943
12517
|
gradientEnabled: boolean;
|
|
11944
12518
|
gradient: GradientState;
|
|
11945
|
-
vAlign: 'top' | 'middle' | 'bottom';
|
|
12519
|
+
vAlign: 'top' | 'middle' | 'bottom' | 'distributed' | 'justified';
|
|
11946
12520
|
textWrap: 'square' | 'none';
|
|
11947
12521
|
autoFitMode: 'shrink' | 'normal' | 'none';
|
|
11948
12522
|
characterSpacing: number;
|
|
@@ -12341,6 +12915,8 @@ interface RibbonSelectionState {
|
|
|
12341
12915
|
hasClipboard: boolean;
|
|
12342
12916
|
slideCount: number;
|
|
12343
12917
|
selectedCount?: number;
|
|
12918
|
+
/** Whether every selected element allows `a:spLocks/@noGrp` grouping. */
|
|
12919
|
+
selectionGroupable?: boolean;
|
|
12344
12920
|
formatPainterActive?: boolean;
|
|
12345
12921
|
selectedElementId?: string;
|
|
12346
12922
|
animations?: readonly PptxElementAnimation[];
|