pptx-vanilla-viewer 2.8.0 → 2.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +16 -0
- package/dist/ai-panel-U2V4GM4N.js +1 -0
- package/dist/ai-panel-VIHUYJOM.cjs +1 -0
- package/dist/chunk-3FYW54YJ.js +2573 -0
- package/dist/chunk-YK5XWN7E.cjs +2573 -0
- package/dist/index.cjs +154 -89
- package/dist/index.d.ts +758 -139
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +154 -89
- package/dist/smartart-3d-4XR267AX.cjs +1 -0
- package/dist/smartart-3d-5ELDYNIY.js +1 -0
- package/dist/styles.css +65 -0
- package/package.json +10 -10
- package/dist/ai-panel-3UMJXBHI.js +0 -1
- package/dist/ai-panel-L2XPCCAI.cjs +0 -1
- package/dist/chunk-6WO6TQ6F.js +0 -2541
- package/dist/chunk-AD4J3U5O.cjs +0 -2541
- package/dist/smartart-3d-KGBJA3DV.js +0 -1
- package/dist/smartart-3d-OMEUBRBB.cjs +0 -1
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-RYdDEI5D.d.ts
|
|
7
7
|
//#region src/core/types/actions.d.ts
|
|
8
8
|
/**
|
|
9
9
|
* Action types: hyperlinks, slide jumps, macros, and action buttons.
|
|
@@ -2213,6 +2213,29 @@ interface PptxElementBase {
|
|
|
2213
2213
|
y: number;
|
|
2214
2214
|
width: number;
|
|
2215
2215
|
height: number;
|
|
2216
|
+
/**
|
|
2217
|
+
* The exact EMU integer `x` was parsed from (the `a:off/@_x` this
|
|
2218
|
+
* element's own `a:xfrm` carried on load), when the parser could resolve
|
|
2219
|
+
* one. `x` itself is always `Math.round(xEmu / EMU_PER_PX)` at parse
|
|
2220
|
+
* time, but that rounding is lossy: re-deriving EMU from `x` on save
|
|
2221
|
+
* (`Math.round(x * EMU_PER_PX)`) can drift from the original value by up
|
|
2222
|
+
* to half a pixel's worth of EMU on every load/save cycle even when
|
|
2223
|
+
* nothing touched this element. Kept alongside `x` (not instead of it) so
|
|
2224
|
+
* every consumer that only cares about on-screen position is unaffected;
|
|
2225
|
+
* only the save-side xfrm writer (`resolveXfrmEmu` in
|
|
2226
|
+
* `xfrm-emu-resolution.ts`) reads this, and only when `x` still equals
|
|
2227
|
+
* `Math.round(xEmu / EMU_PER_PX)` (i.e. nothing moved this element since
|
|
2228
|
+
* load) does it re-emit `xEmu` verbatim instead of re-quantizing `x`.
|
|
2229
|
+
* `undefined` for an SDK-created element or one whose transform could not
|
|
2230
|
+
* be resolved to a usable `a:off` on load.
|
|
2231
|
+
*/
|
|
2232
|
+
xEmu?: number;
|
|
2233
|
+
/** The exact EMU integer `y` was parsed from (`a:off/@_y`). See {@link xEmu}. */
|
|
2234
|
+
yEmu?: number;
|
|
2235
|
+
/** The exact EMU integer `width` was parsed from (`a:ext/@_cx`). See {@link xEmu}. */
|
|
2236
|
+
widthEmu?: number;
|
|
2237
|
+
/** The exact EMU integer `height` was parsed from (`a:ext/@_cy`). See {@link xEmu}. */
|
|
2238
|
+
heightEmu?: number;
|
|
2216
2239
|
rotation?: number;
|
|
2217
2240
|
/** Skew along the X axis in degrees (parsed from `@_skewX` in 1/60000ths of a degree). */
|
|
2218
2241
|
skewX?: number;
|
|
@@ -2732,6 +2755,21 @@ interface PptxChartUserShapeGroupTransform {
|
|
|
2732
2755
|
cx: number;
|
|
2733
2756
|
cy: number;
|
|
2734
2757
|
};
|
|
2758
|
+
/**
|
|
2759
|
+
* The group's own rotation in degrees (`a:xfrm/@rot`, stored in 60,000ths
|
|
2760
|
+
* of a degree), when present. Rotates the whole group, and everything
|
|
2761
|
+
* grouped inside it, as a rigid body about the CENTRE of the group's own
|
|
2762
|
+
* box ({@link off}/{@link ext}); see `flattenChartUserShapes` in
|
|
2763
|
+
* `chart-user-shapes-parser.ts` for how this composes onto each contained
|
|
2764
|
+
* leaf's own {@link PptxChartUserShapeGroupChild.rotation}. Verified
|
|
2765
|
+
* against real PowerPoint (COM): a `cdr:grpSp`'s `cdr:grpSpPr/a:xfrm` does
|
|
2766
|
+
* carry `rot` the same way an ordinary shape's does.
|
|
2767
|
+
*/
|
|
2768
|
+
rotation?: number;
|
|
2769
|
+
/** The group's own horizontal flip (`a:xfrm/@flipH`), when present; composes onto children by XOR, see {@link rotation}'s doc. */
|
|
2770
|
+
flipH?: boolean;
|
|
2771
|
+
/** The group's own vertical flip (`a:xfrm/@flipV`), when present; composes onto children by XOR, see {@link rotation}'s doc. */
|
|
2772
|
+
flipV?: boolean;
|
|
2735
2773
|
}
|
|
2736
2774
|
/**
|
|
2737
2775
|
* One shape grouped inside a `cdr:grpSp` (or a nested `cdr:grpSp` itself).
|
|
@@ -2763,6 +2801,23 @@ interface PptxChartUserShapeGroupChild {
|
|
|
2763
2801
|
strokeWidth?: number;
|
|
2764
2802
|
/** Text paragraphs of the shape's `txBody`, when present. */
|
|
2765
2803
|
paragraphs?: PptxChartUserShapeParagraph[];
|
|
2804
|
+
/**
|
|
2805
|
+
* A `pic` child's alt text (`cdr:nvPicPr/cdr:cNvPr/@descr`), when present.
|
|
2806
|
+
* Editable independently of {@link rawXml}'s otherwise-verbatim content:
|
|
2807
|
+
* the serializer patches only this attribute onto the cloned raw node.
|
|
2808
|
+
*/
|
|
2809
|
+
altText?: string;
|
|
2810
|
+
/**
|
|
2811
|
+
* This child's OWN rotation in degrees (`a:xfrm/@rot`), when present.
|
|
2812
|
+
* Composes with every enclosing group's own
|
|
2813
|
+
* {@link PptxChartUserShapeGroupTransform.rotation} (added) to produce the
|
|
2814
|
+
* leaf's final on-screen rotation; see `flattenChartUserShapes`.
|
|
2815
|
+
*/
|
|
2816
|
+
rotation?: number;
|
|
2817
|
+
/** This child's OWN horizontal flip (`a:xfrm/@flipH`); composes with an ancestor group's flip by XOR. */
|
|
2818
|
+
flipH?: boolean;
|
|
2819
|
+
/** This child's OWN vertical flip (`a:xfrm/@flipV`); composes with an ancestor group's flip by XOR. */
|
|
2820
|
+
flipV?: boolean;
|
|
2766
2821
|
/**
|
|
2767
2822
|
* Verbatim source XML of a `pic`/`graphicFrame` child, or of this node
|
|
2768
2823
|
* itself when `kind === 'grpSp'` and the nested group is untouched since
|
|
@@ -2821,6 +2876,29 @@ interface PptxChartUserShape {
|
|
|
2821
2876
|
strokeWidth?: number;
|
|
2822
2877
|
/** Text paragraphs of the shape's `txBody`, when present. */
|
|
2823
2878
|
paragraphs?: PptxChartUserShapeParagraph[];
|
|
2879
|
+
/**
|
|
2880
|
+
* A `pic` anchor's alt text (`cdr:nvPicPr/cdr:cNvPr/@descr`), when
|
|
2881
|
+
* present. Editable independently of {@link rawXml}'s otherwise-verbatim
|
|
2882
|
+
* content: the serializer patches only this attribute onto the cloned
|
|
2883
|
+
* raw node, so a picture's blip and other markup are untouched.
|
|
2884
|
+
*/
|
|
2885
|
+
altText?: string;
|
|
2886
|
+
/**
|
|
2887
|
+
* This shape's OWN rotation in degrees (`a:xfrm/@rot`, on `spPr/a:xfrm`
|
|
2888
|
+
* for `sp`/`cxnSp`/`pic`, or directly on a top-level `graphicFrame`'s own
|
|
2889
|
+
* `a:xfrm`), when present. A top-level anchor's position/size is governed
|
|
2890
|
+
* by {@link from}/{@link to}/{@link ext}, never by this `a:xfrm`'s own
|
|
2891
|
+
* `off`/`ext` (see {@link rawXml}'s doc), but `rot`/`flipH`/`flipV` on that
|
|
2892
|
+
* same `a:xfrm` DO apply visually: verified against real PowerPoint (COM),
|
|
2893
|
+
* which writes e.g. `<a:xfrm rot="1800000"><a:off .../><a:ext .../></a:xfrm>`
|
|
2894
|
+
* on a rotated overlay shape's `spPr`, with the `off`/`ext` values
|
|
2895
|
+
* unrelated to the anchor's own `cdr:from`/`cdr:to`.
|
|
2896
|
+
*/
|
|
2897
|
+
rotation?: number;
|
|
2898
|
+
/** This shape's OWN horizontal flip (`a:xfrm/@flipH`); see {@link rotation}'s doc. */
|
|
2899
|
+
flipH?: boolean;
|
|
2900
|
+
/** This shape's OWN vertical flip (`a:xfrm/@flipV`); see {@link rotation}'s doc. */
|
|
2901
|
+
flipV?: boolean;
|
|
2824
2902
|
/**
|
|
2825
2903
|
* Verbatim source XML of a `pic` or `graphicFrame` anchor child (the
|
|
2826
2904
|
* `cdr:pic` / `cdr:graphicFrame` node itself, not the enclosing anchor),
|
|
@@ -2850,7 +2928,7 @@ interface PptxChartUserShape {
|
|
|
2850
2928
|
* @example
|
|
2851
2929
|
* ```ts
|
|
2852
2930
|
* const type: PptxChartType = "bar";
|
|
2853
|
-
* // => "bar"
|
|
2931
|
+
* // => "bar": one of: "bar" | "line" | "pie" | "doughnut" | "area" | "scatter" | …
|
|
2854
2932
|
* ```
|
|
2855
2933
|
*/
|
|
2856
2934
|
type PptxChartType = 'bar' | 'line' | 'pie' | 'ofPie' | 'doughnut' | 'area' | 'scatter' | 'bubble' | 'radar' | 'stock' | 'bar3D' | 'line3D' | 'pie3D' | 'area3D' | 'surface' | 'histogram' | 'waterfall' | 'funnel' | 'treemap' | 'sunburst' | 'boxWhisker' | 'regionMap' | 'combo' | 'unknown';
|
|
@@ -2885,7 +2963,7 @@ type PptxBar3DShape = 'box' | 'cone' | 'coneToMax' | 'cylinder' | 'pyramid' | 'p
|
|
|
2885
2963
|
* @example
|
|
2886
2964
|
* ```ts
|
|
2887
2965
|
* const type: PptxChartTrendlineType = "linear";
|
|
2888
|
-
* // => "linear"
|
|
2966
|
+
* // => "linear": one of: "linear" | "exponential" | "logarithmic" | "polynomial" | "power" | "movingAvg"
|
|
2889
2967
|
* ```
|
|
2890
2968
|
*/
|
|
2891
2969
|
type PptxChartTrendlineType = 'linear' | 'exponential' | 'logarithmic' | 'polynomial' | 'power' | 'movingAvg';
|
|
@@ -2936,7 +3014,7 @@ type PptxChartErrBarType = 'both' | 'minus' | 'plus';
|
|
|
2936
3014
|
* @example
|
|
2937
3015
|
* ```ts
|
|
2938
3016
|
* const valType: PptxChartErrValType = "percentage";
|
|
2939
|
-
* // => "percentage"
|
|
3017
|
+
* // => "percentage": one of: "cust" | "fixedVal" | "percentage" | "stdDev" | "stdErr"
|
|
2940
3018
|
* ```
|
|
2941
3019
|
*/
|
|
2942
3020
|
type PptxChartErrValType = 'cust' | 'fixedVal' | 'percentage' | 'stdDev' | 'stdErr';
|
|
@@ -3055,9 +3133,29 @@ interface PptxChartDataPoint {
|
|
|
3055
3133
|
bubble3D?: boolean;
|
|
3056
3134
|
/** Per-point picture-fill flags (`c:dPt/c:pictureOptions`). */
|
|
3057
3135
|
picture?: PptxChartDataPointPicture;
|
|
3136
|
+
/**
|
|
3137
|
+
* This point's identity GUID (`c:dPt/c:extLst/c:ext/c16:uniqueId/@val`,
|
|
3138
|
+
* the Office 2014+ `{C3380CC4-5D6E-409C-BE32-E72D297353CC}` chart
|
|
3139
|
+
* extension), read-only here: an edited point keeps its existing
|
|
3140
|
+
* `c:extLst` as passthrough (see `chart-datapoint-serializer.ts`), so this
|
|
3141
|
+
* field exists for introspection rather than round-trip.
|
|
3142
|
+
*/
|
|
3143
|
+
uniqueId?: string;
|
|
3058
3144
|
}
|
|
3059
3145
|
/** Schema values accepted by `c:dLblPos`. */
|
|
3060
3146
|
type PptxChartDataLabelPosition = 'bestFit' | 'b' | 'ctr' | 'inBase' | 'inEnd' | 'l' | 'outEnd' | 'r' | 't';
|
|
3147
|
+
/**
|
|
3148
|
+
* `c15:dlblRangeCache`/`c15:datalabelsRange` (CT_SeriesDataLabelsRange):
|
|
3149
|
+
* PowerPoint 2013+'s "Value From Cells" custom label source, one cell range
|
|
3150
|
+
* supplying every label in a group (chart-type or series `c:dLbls`), with a
|
|
3151
|
+
* cache aligned to point order. See `utils/chart-data-labels-range.ts`.
|
|
3152
|
+
*/
|
|
3153
|
+
interface PptxChartDataLabelsRange {
|
|
3154
|
+
/** `c15:f`: the cell range formula (e.g. `Sheet1!$D$2:$D$5`). */
|
|
3155
|
+
formula: string;
|
|
3156
|
+
/** `c15:dlblRangeCache`: cached label text, index-aligned with data points. */
|
|
3157
|
+
cache: string[];
|
|
3158
|
+
}
|
|
3061
3159
|
/** Individual data label override (c:dLbl). */
|
|
3062
3160
|
interface PptxChartDataLabel {
|
|
3063
3161
|
idx: number;
|
|
@@ -3099,6 +3197,14 @@ interface PptxChartDataLabel {
|
|
|
3099
3197
|
* over any chart/series-level default when set.
|
|
3100
3198
|
*/
|
|
3101
3199
|
spPr?: PptxChartShapeProps;
|
|
3200
|
+
/**
|
|
3201
|
+
* `c15:xForSave`: this override exists only so its properties survive a
|
|
3202
|
+
* save/reload round trip; PowerPoint merges it back onto the series'
|
|
3203
|
+
* default label on load. Round-tripped as-is (an edited chart keeps an
|
|
3204
|
+
* existing point's whole `extLst`, this flag included); introspection
|
|
3205
|
+
* only otherwise. See `utils/chart-data-labels-range.ts`.
|
|
3206
|
+
*/
|
|
3207
|
+
savedForCompatibilityOnly?: boolean;
|
|
3102
3208
|
}
|
|
3103
3209
|
/** Axis number format. */
|
|
3104
3210
|
interface PptxChartAxisNumFmt {
|
|
@@ -3131,7 +3237,7 @@ interface PptxChartAxisFormatting extends PptxChartAxisLabelFormatting {
|
|
|
3131
3237
|
axPos?: 'b' | 'l' | 'r' | 't';
|
|
3132
3238
|
/** Unique axis identifier (c:axId/@val) used to link series to axes. */
|
|
3133
3239
|
axisId?: number;
|
|
3134
|
-
/** Cross-axis identifier
|
|
3240
|
+
/** Cross-axis identifier: the axis this axis crosses. */
|
|
3135
3241
|
crossAxisId?: number;
|
|
3136
3242
|
/** Automatic crossing mode (`c:crosses`). Mutually exclusive with `crossesAt`. */
|
|
3137
3243
|
crosses?: 'autoZero' | 'min' | 'max';
|
|
@@ -3383,6 +3489,54 @@ interface PptxChartSeries {
|
|
|
3383
3489
|
waterfallOptions?: PptxChartWaterfallOptions;
|
|
3384
3490
|
regionMapOptions?: PptxChartRegionMapOptions;
|
|
3385
3491
|
treemapOptions?: PptxChartTreemapOptions;
|
|
3492
|
+
/**
|
|
3493
|
+
* Series-level picture-fill flags (`c:ser/c:pictureOptions`), legal
|
|
3494
|
+
* wherever a per-point `c:dPt/c:pictureOptions` is (CT_BarSer): paints
|
|
3495
|
+
* EVERY point in the series with one picture unless a `c:dPt` overrides it
|
|
3496
|
+
* for that point alone. A point's own {@link PptxChartDataPoint.picture}
|
|
3497
|
+
* takes precedence entirely (not merged field-by-field) when it resolves
|
|
3498
|
+
* its own image; renderers fall back to this series-level picture only
|
|
3499
|
+
* when the point has none of its own.
|
|
3500
|
+
*/
|
|
3501
|
+
picture?: PptxChartDataPointPicture;
|
|
3502
|
+
/**
|
|
3503
|
+
* This series' identity GUID (`c:ser/c:extLst/c:ext/c16:uniqueId/@val`,
|
|
3504
|
+
* the Office 2014+ `{C3380CC4-5D6E-409C-BE32-E72D297353CC}` chart
|
|
3505
|
+
* extension). PowerPoint uses it to track a series across edits and
|
|
3506
|
+
* collaborators independent of its `c:idx`/`c:order` position (the same
|
|
3507
|
+
* role animation targeting and CRDT reconciliation need). An edited
|
|
3508
|
+
* existing series keeps its own `c:extLst` as passthrough; a NEW series
|
|
3509
|
+
* added by cloning an existing one as a template is given a freshly
|
|
3510
|
+
* generated id rather than duplicating the template's (see
|
|
3511
|
+
* `regenerateClonedUniqueId` in `chart-series-identity.ts`), since two
|
|
3512
|
+
* series sharing one identity is exactly what this extension exists to
|
|
3513
|
+
* prevent.
|
|
3514
|
+
*/
|
|
3515
|
+
uniqueId?: string;
|
|
3516
|
+
}
|
|
3517
|
+
/**
|
|
3518
|
+
* A series PowerPoint's "Chart Filters" feature hid from the plot while
|
|
3519
|
+
* keeping it in the workbook (`c:<type>Chart/c:extLst/c:ext
|
|
3520
|
+
* [@uri={02D57815-91ED-43cb-92C2-25804820EDAC}]/c15:filtered<Type>Series
|
|
3521
|
+
* /c15:ser`). Read-mostly: {@link PptxChartData.filteredSeries} exists for
|
|
3522
|
+
* introspection (AI tools, "unhide filtered series" UI) and round-trips as
|
|
3523
|
+
* passthrough through the preserved chart XML when untouched. See
|
|
3524
|
+
* `utils/chart-filtered-series.ts` for the parse rules and the idx-collision
|
|
3525
|
+
* fix this modelling enables on save.
|
|
3526
|
+
*/
|
|
3527
|
+
interface PptxChartFilteredSeries {
|
|
3528
|
+
/** `c15:ser/c:idx/@val`, the workbook column position this series still occupies. */
|
|
3529
|
+
idx: number;
|
|
3530
|
+
/** `c15:ser/c:order/@val`, defaulting to {@link idx} when absent. */
|
|
3531
|
+
order: number;
|
|
3532
|
+
/** Series name, from the hidden series' own `c:tx` cache. */
|
|
3533
|
+
name?: string;
|
|
3534
|
+
/** Category labels, from the hidden series' own `c:cat` cache. */
|
|
3535
|
+
categories?: string[];
|
|
3536
|
+
/** Data values, from the hidden series' own `c:val` cache. */
|
|
3537
|
+
values?: number[];
|
|
3538
|
+
/** This hidden series' own identity GUID (`c16:uniqueId`), when present. */
|
|
3539
|
+
uniqueId?: string;
|
|
3386
3540
|
}
|
|
3387
3541
|
/**
|
|
3388
3542
|
* Chart-level data-label options (`c:dLbls` directly under a chart-type
|
|
@@ -3406,6 +3560,19 @@ interface PptxChartDataLabelOptions {
|
|
|
3406
3560
|
separator?: string;
|
|
3407
3561
|
/** Show leader lines where supported (`c:showLeaderLines`). */
|
|
3408
3562
|
showLeaderLines?: boolean;
|
|
3563
|
+
/**
|
|
3564
|
+
* Leader-line stroke styling for offset (pie/doughnut `outEnd`/`bestFit`)
|
|
3565
|
+
* labels. Resolved from the base `c:leaderLines/c:spPr` when present, else
|
|
3566
|
+
* falling back to the Office 2013+ chart15 extension's mirror
|
|
3567
|
+
* (`c:extLst/c:ext/c15:leaderLines/c:spPr`, uri
|
|
3568
|
+
* `{CE6537A1-D6FC-4f65-9D91-7224C49458BB}`), which is the one PowerPoint
|
|
3569
|
+
* itself treats as authoritative when both are present. Confirmed against
|
|
3570
|
+
* `e2e/fixtures/issue-132-gradient-fill.pptx` and
|
|
3571
|
+
* `e2e/fixtures/issue-132-hr-deck.pptx`, both of which write only the
|
|
3572
|
+
* extension form. `undefined` leaves the renderer's own default leader-line
|
|
3573
|
+
* stroke.
|
|
3574
|
+
*/
|
|
3575
|
+
leaderLineStyle?: PptxChartShapeProps;
|
|
3409
3576
|
/**
|
|
3410
3577
|
* Label position (`c:dLblPos`). Valid values depend on the chart type
|
|
3411
3578
|
* (`ctr`, `inEnd`, `inBase`, `outEnd`, `bestFit`, `l`, `r`, `t`, `b`).
|
|
@@ -3426,6 +3593,22 @@ interface PptxChartDataLabelOptions {
|
|
|
3426
3593
|
* (point > series > chart-type).
|
|
3427
3594
|
*/
|
|
3428
3595
|
txPr?: PptxChartLegendTextStyle;
|
|
3596
|
+
/**
|
|
3597
|
+
* PowerPoint 2013+ "Value From Cells", series-wide form
|
|
3598
|
+
* (`c15:datalabelsRange`, chart15 uri `{CE6537A1-...}`): one cell range
|
|
3599
|
+
* supplies every label in this group, aligned by point index. A
|
|
3600
|
+
* SERIES-WIDE alternative to the per-point `c15:dlblFieldTable` mechanism
|
|
3601
|
+
* (already resolved into {@link PptxChartDataLabel.text} at parse time).
|
|
3602
|
+
* See `utils/chart-data-labels-range.ts`.
|
|
3603
|
+
*/
|
|
3604
|
+
dataLabelsRange?: PptxChartDataLabelsRange;
|
|
3605
|
+
/**
|
|
3606
|
+
* `c15:showDataLabelsRange` at the SAME level as {@link dataLabelsRange}:
|
|
3607
|
+
* whether every label in this group resolves through the range's cache.
|
|
3608
|
+
* Distinct from the per-point {@link PptxChartDataLabel} flag of the same
|
|
3609
|
+
* XML name. Only meaningful when {@link dataLabelsRange} is set.
|
|
3610
|
+
*/
|
|
3611
|
+
showDataLabelsRange?: boolean;
|
|
3429
3612
|
}
|
|
3430
3613
|
/** Typed text defaults for a single chart legend entry. */
|
|
3431
3614
|
interface PptxChartLegendTextStyle {
|
|
@@ -3559,12 +3742,12 @@ interface PptxBubbleChartOptions {
|
|
|
3559
3742
|
*
|
|
3560
3743
|
* All fields are optional and round-trip verbatim.
|
|
3561
3744
|
*
|
|
3562
|
-
* - {@link rotX}
|
|
3563
|
-
* - {@link rotY}
|
|
3564
|
-
* - {@link depthPercent}
|
|
3565
|
-
* - {@link rAngAx}
|
|
3566
|
-
* - {@link perspective}
|
|
3567
|
-
* - {@link hPercent}
|
|
3745
|
+
* - {@link rotX}: X-axis rotation in degrees (-90…90).
|
|
3746
|
+
* - {@link rotY}: Y-axis rotation in degrees (0…360).
|
|
3747
|
+
* - {@link depthPercent}: chart depth as a percentage of base width.
|
|
3748
|
+
* - {@link rAngAx}: `true` if axes meet at right angles.
|
|
3749
|
+
* - {@link perspective}: perspective angle in degrees (0…240).
|
|
3750
|
+
* - {@link hPercent}: height as a percentage of chart width.
|
|
3568
3751
|
*/
|
|
3569
3752
|
interface PptxChartView3D {
|
|
3570
3753
|
rotX?: number;
|
|
@@ -3578,12 +3761,17 @@ interface PptxChartView3D {
|
|
|
3578
3761
|
* Chart "chrome" flags from `c:chart` that round-trip cleanly even when
|
|
3579
3762
|
* rendering ignores them.
|
|
3580
3763
|
*
|
|
3581
|
-
* - {@link autoTitleDeleted}
|
|
3764
|
+
* - {@link autoTitleDeleted}: `c:autoTitleDeleted/@val`. Suppresses the
|
|
3582
3765
|
* auto-generated title for single-series charts.
|
|
3583
|
-
* - {@link dispBlanksAs}
|
|
3766
|
+
* - {@link dispBlanksAs}: `c:dispBlanksAs/@val`. How blank cells
|
|
3584
3767
|
* render: `"gap"`, `"zero"`, or `"span"`.
|
|
3585
|
-
* - {@link showDLblsOverMax}
|
|
3768
|
+
* - {@link showDLblsOverMax}: `c:showDLblsOverMax/@val`. Keeps data
|
|
3586
3769
|
* labels visible for points exceeding the value-axis maximum.
|
|
3770
|
+
* - {@link dispNaAsBlank}: the Office 2017+ chart extension
|
|
3771
|
+
* `c:extLst/c:ext/c16r3:dataDisplayOptions16/c16r3:dispNaAsBlank/@val`
|
|
3772
|
+
* (uri `{56B9EC1D-385E-4148-901F-78D8002777C0}`), PowerPoint's "Show #N/A
|
|
3773
|
+
* as an empty cell" chart option. Confirmed against real corpus markup
|
|
3774
|
+
* (`e2e/fixtures/chart-data-fidelity.pptx`).
|
|
3587
3775
|
*
|
|
3588
3776
|
* `c:plotVisOnly` lives on {@link PptxChartData.plotVisibleOnly} and is
|
|
3589
3777
|
* intentionally not duplicated here.
|
|
@@ -3592,6 +3780,7 @@ interface PptxChartChrome {
|
|
|
3592
3780
|
autoTitleDeleted?: boolean;
|
|
3593
3781
|
dispBlanksAs?: 'gap' | 'zero' | 'span';
|
|
3594
3782
|
showDLblsOverMax?: boolean;
|
|
3783
|
+
dispNaAsBlank?: boolean;
|
|
3595
3784
|
}
|
|
3596
3785
|
/** Manual chart placement from `c:layout/c:manualLayout` (CT_ManualLayout). */
|
|
3597
3786
|
interface PptxChartManualLayout {
|
|
@@ -3687,6 +3876,26 @@ interface PptxChartData {
|
|
|
3687
3876
|
categoryLevels?: string[][];
|
|
3688
3877
|
dateCategories?: PptxChartDateCategories;
|
|
3689
3878
|
series: PptxChartSeries[];
|
|
3879
|
+
/**
|
|
3880
|
+
* Series hidden from the plot by PowerPoint's "Chart Filters" feature
|
|
3881
|
+
* (Series tab) but still present in the workbook, aggregated across every
|
|
3882
|
+
* chart-type container (combo charts can carry more than one). Absent
|
|
3883
|
+
* when the chart has no such extension. See {@link PptxChartFilteredSeries}.
|
|
3884
|
+
*/
|
|
3885
|
+
filteredSeries?: PptxChartFilteredSeries[];
|
|
3886
|
+
/**
|
|
3887
|
+
* `c15:filteredSeriesTitle`: the auto-generated series title text (e.g.
|
|
3888
|
+
* "Series 3") PowerPoint preserved when the chart filter hid the series
|
|
3889
|
+
* whose data would otherwise have supplied it. See
|
|
3890
|
+
* `utils/chart-ext-titles.ts`. Read-mostly like {@link filteredSeries}.
|
|
3891
|
+
*/
|
|
3892
|
+
filteredSeriesTitle?: string;
|
|
3893
|
+
/**
|
|
3894
|
+
* `c15:filteredCategoryTitle`: the auto-numbered category labels ("1",
|
|
3895
|
+
* "2", "3", ...) PowerPoint preserved when the chart filter hid the
|
|
3896
|
+
* category axis source entirely. See `utils/chart-ext-titles.ts`.
|
|
3897
|
+
*/
|
|
3898
|
+
filteredCategoryTitle?: string[];
|
|
3690
3899
|
/** Chart style/formatting metadata. */
|
|
3691
3900
|
style?: PptxChartStyle;
|
|
3692
3901
|
/** Grouping mode for bar/area/line charts: 'clustered' | 'stacked' | 'percentStacked' */
|
|
@@ -3810,9 +4019,9 @@ interface PptxChartData {
|
|
|
3810
4019
|
/**
|
|
3811
4020
|
* Color cycling method from the chart color style part's `meth` attribute.
|
|
3812
4021
|
*
|
|
3813
|
-
* - `"cycle"
|
|
3814
|
-
* - `"withinLinear"
|
|
3815
|
-
* - `"acrossLinear"
|
|
4022
|
+
* - `"cycle"`: repeat the palette colours in order (default)
|
|
4023
|
+
* - `"withinLinear"`: gradient within each series
|
|
4024
|
+
* - `"acrossLinear"`: gradient across series
|
|
3816
4025
|
*/
|
|
3817
4026
|
colorMethod?: 'cycle' | 'withinLinear' | 'acrossLinear';
|
|
3818
4027
|
/** Internal source color-style part path used for lossless dirty saves. */
|
|
@@ -4609,7 +4818,95 @@ interface PptxSmartArtLayoutNode {
|
|
|
4609
4818
|
rules?: PptxSmartArtNumericRule[];
|
|
4610
4819
|
/** `dgm:shape`: this node's own preset geometry override, when present. */
|
|
4611
4820
|
shape?: PptxSmartArtLayoutNodeShape;
|
|
4821
|
+
/**
|
|
4822
|
+
* `dgm:presOf` (CT_PresentationOf, same iterator shape as `dgm:forEach`):
|
|
4823
|
+
* which data-model point(s) this node's OWN text/geometry binds to -
|
|
4824
|
+
* `axis: ['self']` the point currently being iterated, `['des']` all of
|
|
4825
|
+
* its descendants, `['ch']` its direct children, and so on. Absent or
|
|
4826
|
+
* empty `axis` (including a bare `<dgm:presOf/>`) means the node carries
|
|
4827
|
+
* no text of its own (a pure positioning/decoration wrapper - `composite`,
|
|
4828
|
+
* `sp` spacer, connector cap). See `smartart-layout-interpreter-item-
|
|
4829
|
+
* roles.ts`, the one consumer: it is what lets the interpreter tell a
|
|
4830
|
+
* text-bearing per-item role (a list layout's `childText`, a card
|
|
4831
|
+
* layout's `roleText`/`bodyText`) apart from a same-generation sibling
|
|
4832
|
+
* that positions or decorates instead.
|
|
4833
|
+
*/
|
|
4834
|
+
presentationOf?: PptxSmartArtIteratorAttributes;
|
|
4835
|
+
/**
|
|
4836
|
+
* EVERY `dgm:constr` reachable from this node, including ones declared
|
|
4837
|
+
* inside a `dgm:choose`/`dgm:if`/`dgm:else` that wraps THIS layoutNode's
|
|
4838
|
+
* `constrLst` (a genuinely conditional constraint set, e.g. one branch
|
|
4839
|
+
* per data-point count - `gear`'s composite positions its `gear1`/
|
|
4840
|
+
* `gear2`/`gear3` slots this way, so its plain, direct-child-only
|
|
4841
|
+
* `constraints` above is empty for it). Stops at a nested `dgm:layoutNode`
|
|
4842
|
+
* boundary: that child's own conditional constrLst becomes ITS
|
|
4843
|
+
* `allConstraints`, not folded into the parent's. Read-only /
|
|
4844
|
+
* interpretation-only - `constraints` above (this node's own DIRECT
|
|
4845
|
+
* constrLst) remains the one `applySmartArtLayoutDefinition` round-trips,
|
|
4846
|
+
* so editing an unrelated property can never collapse a genuinely
|
|
4847
|
+
* conditional constrLst into a single branch. `undefined` when this node
|
|
4848
|
+
* declares no constrLst at all, in or out of a choose (the common case);
|
|
4849
|
+
* otherwise a superset of `constraints` (every branch, blindly unioned -
|
|
4850
|
+
* this interpreter does not evaluate `dgm:choose` conditions when
|
|
4851
|
+
* indexing constraints, matching the same "flatten both branches"
|
|
4852
|
+
* convention `nestedLayoutNodes` already uses for `children`). See
|
|
4853
|
+
* `smartart-constraint-solver.ts`'s `buildConstraintIndex`, the only
|
|
4854
|
+
* consumer.
|
|
4855
|
+
*/
|
|
4856
|
+
allConstraints?: PptxSmartArtConstraint[];
|
|
4612
4857
|
children?: PptxSmartArtLayoutNode[];
|
|
4858
|
+
/**
|
|
4859
|
+
* The iterator attributes of the ENCLOSING `dgm:forEach` this node was
|
|
4860
|
+
* found through, when `nestedLayoutNodes` (`smartart-layout-definition
|
|
4861
|
+
* .ts`) reached it by walking one - as opposed to being a direct child of
|
|
4862
|
+
* its parent layoutNode, or reached only through a `dgm:choose` wrapper
|
|
4863
|
+
* (a condition, not an iteration, leaves this `undefined`).
|
|
4864
|
+
*
|
|
4865
|
+
* `forEach` above records a node's OWN direct `dgm:forEach` children
|
|
4866
|
+
* (which wrap ITS descendants); this is the opposite direction - the
|
|
4867
|
+
* forEach that wraps the node ITSELF, one level up. A layoutNode can sit
|
|
4868
|
+
* inside more than one enclosing forEach only via nesting, so this is
|
|
4869
|
+
* always the SINGLE nearest one, not a list.
|
|
4870
|
+
*
|
|
4871
|
+
* This is what tells a genuinely repeated per-child template
|
|
4872
|
+
* (`axis="ch"`, `ptType` absent or `"node"`) apart from a once-only or
|
|
4873
|
+
* transition-only sibling that merely happens to sit inside SOME
|
|
4874
|
+
* `dgm:forEach` (a `ptType="parTrans"`/`"sibTrans"` connector, or
|
|
4875
|
+
* `axis="followSib" cnt="1"`) - both can be direct siblings under the
|
|
4876
|
+
* SAME parent layoutNode (`lProcess1`'s `vertFlow` has one forEach for
|
|
4877
|
+
* its `parTrans` connector and a SEPARATE one, `axis="ch"`, for its
|
|
4878
|
+
* repeated `child` items; `vertFlow.forEach` bundles both, but only
|
|
4879
|
+
* `child.forEachOrigin` says which ONE produced it). See
|
|
4880
|
+
* `smartart-layout-interpreter-item-roles-recursive.ts`, the one
|
|
4881
|
+
* consumer. Read-only / interpretation-only, like `allConstraints`:
|
|
4882
|
+
* never round-tripped by `applySmartArtLayoutDefinition`.
|
|
4883
|
+
*/
|
|
4884
|
+
forEachOrigin?: PptxSmartArtIteratorAttributes;
|
|
4885
|
+
/**
|
|
4886
|
+
* The condition of the NEAREST enclosing `dgm:if` this node was found
|
|
4887
|
+
* through, when `nestedLayoutNodes` (`smartart-layout-definition.ts`)
|
|
4888
|
+
* reached it via a `dgm:choose`'s `if` branch (as opposed to a direct
|
|
4889
|
+
* child, a `dgm:else` branch - always `undefined` here, see below - or a
|
|
4890
|
+
* `dgm:forEach`, which sets {@link forEachOrigin} instead). Lets a
|
|
4891
|
+
* caller that already has the data-model node list decide whether this
|
|
4892
|
+
* node's OWN branch is genuinely live for a specific point, instead of
|
|
4893
|
+
* treating every choose-flattened branch as unconditionally present
|
|
4894
|
+
* (`nestedLayoutNodes`' pre-existing "flatten every branch" convention,
|
|
4895
|
+
* still the default when this is absent or a caller does not evaluate
|
|
4896
|
+
* it) - e.g. `cycle-matrix--fallback-n2.pptx`'s `child1group`..
|
|
4897
|
+
* `child4group`, each gated on a DIFFERENT top-level point existing and
|
|
4898
|
+
* having its own child (`axis="ch ch" st="N 1" cnt="1 0" func="cnt"
|
|
4899
|
+
* op="gte" val="1"`).
|
|
4900
|
+
*
|
|
4901
|
+
* Deliberately `undefined` for a `dgm:else` branch: ECMA-376 defines it
|
|
4902
|
+
* as "none of the sibling ifs matched", which would need the FULL
|
|
4903
|
+
* sibling list's conditions negated and ANDed together, not a single
|
|
4904
|
+
* condition - no gallery fixture measured needs an else branch's own
|
|
4905
|
+
* guard yet, so it is left unconditional (rendered by default, matching
|
|
4906
|
+
* the pre-existing flatten-everything behaviour) rather than guessed at.
|
|
4907
|
+
* Evaluate with `smartart-layout-interpreter-when.ts`'s `evaluateWhen`.
|
|
4908
|
+
*/
|
|
4909
|
+
chooseGuard?: PptxSmartArtWhen;
|
|
4613
4910
|
}
|
|
4614
4911
|
/** Metadata and root node from DiagramML CT_DiagramDefinition. */
|
|
4615
4912
|
interface PptxSmartArtLayoutDefinition {
|
|
@@ -5242,6 +5539,14 @@ interface PptxSmartArtData {
|
|
|
5242
5539
|
* Consulted by the fallback layout engine for direction/org-chart hints.
|
|
5243
5540
|
*/
|
|
5244
5541
|
presLayoutVars?: PptxSmartArtPresLayoutVars;
|
|
5542
|
+
/**
|
|
5543
|
+
* The deck's own theme minor-Latin font (`a:fontScheme/a:minorFont/a:latin/
|
|
5544
|
+
* @typeface`): what SmartArt text actually renders in when no per-run
|
|
5545
|
+
* `a:latin` override is present (the common case - see
|
|
5546
|
+
* `smartart-layout-item-font-size.ts`'s font-fit, the one consumer).
|
|
5547
|
+
* Undefined when the theme carries no font scheme at all.
|
|
5548
|
+
*/
|
|
5549
|
+
themeMinorFont?: string;
|
|
5245
5550
|
/** Relationship ID for the diagram data part (for round-trip save). */
|
|
5246
5551
|
dataRelId?: string;
|
|
5247
5552
|
/** Relationship ID for the diagram layout part. */
|
|
@@ -6201,7 +6506,7 @@ interface SmartArtPptxElement extends PptxElementBase {
|
|
|
6201
6506
|
*
|
|
6202
6507
|
* Used to show type-specific icons and previews in the editor.
|
|
6203
6508
|
*/
|
|
6204
|
-
type OleObjectType = 'excel' | 'word' | 'pdf' | 'visio' | 'mathtype' | 'package' | 'unknown';
|
|
6509
|
+
type OleObjectType = 'excel' | 'word' | 'powerpoint' | 'pdf' | 'visio' | 'mathtype' | 'package' | 'unknown';
|
|
6205
6510
|
/**
|
|
6206
6511
|
* An OLE (Object Linking and Embedding) object.
|
|
6207
6512
|
*
|
|
@@ -6279,6 +6584,15 @@ interface OlePptxElement extends PptxElementBase {
|
|
|
6279
6584
|
* `false`; `undefined` means the source authored no explicit value.
|
|
6280
6585
|
*/
|
|
6281
6586
|
oleUpdateAutomatic?: boolean;
|
|
6587
|
+
/**
|
|
6588
|
+
* Set by the in-viewer OLE content editors (`ole-edit-api.ts`) whenever
|
|
6589
|
+
* `oleEmbeddedData` and/or `previewImageData` have been changed in memory
|
|
6590
|
+
* and still need to be written back into the saved package. Never
|
|
6591
|
+
* authored from a parsed file; purely an in-memory save signal, mirroring
|
|
6592
|
+
* `PptxSlide.isDirty`. The save writer clears it once the pending write
|
|
6593
|
+
* has been queued.
|
|
6594
|
+
*/
|
|
6595
|
+
oleContentDirty?: boolean;
|
|
6282
6596
|
/** Accessibility description from `p:nvGraphicFramePr/p:cNvPr/@descr`. */
|
|
6283
6597
|
altText?: string;
|
|
6284
6598
|
/** Accessibility title from `p:nvGraphicFramePr/p:cNvPr/@title`. */
|
|
@@ -6375,13 +6689,14 @@ interface MediaPptxElement extends PptxElementBase {
|
|
|
6375
6689
|
*/
|
|
6376
6690
|
isLinked?: boolean;
|
|
6377
6691
|
/**
|
|
6378
|
-
* Accessibility description from `p:nvGraphicFramePr/p:cNvPr/@descr
|
|
6379
|
-
*
|
|
6380
|
-
*
|
|
6381
|
-
*
|
|
6692
|
+
* Accessibility description. Read from `p:nvGraphicFramePr/p:cNvPr/@descr`
|
|
6693
|
+
* for the `p:graphicFrame`-shaped (SDK-created) media form, or from
|
|
6694
|
+
* `p:nvPicPr/p:cNvPr/@descr` for the `p:pic`-shaped media form (real
|
|
6695
|
+
* PowerPoint's usual authoring shape for a video/audio placeholder); see
|
|
6696
|
+
* `PptxHandlerRuntimePictureParsing.ts`.
|
|
6382
6697
|
*/
|
|
6383
6698
|
altText?: string;
|
|
6384
|
-
/** Accessibility title from `p:
|
|
6699
|
+
/** Accessibility title, from the same `@title` attribute on whichever `p:cNvPr` the media form uses. Same scope note as {@link altText}. */
|
|
6385
6700
|
title?: string;
|
|
6386
6701
|
/** Unrecognised graphicFrame extLst extensions, captured verbatim for round-trip. */
|
|
6387
6702
|
extensionXml?: PptxGraphicFrameExtension[];
|
|
@@ -6408,6 +6723,46 @@ interface GroupPptxElement extends PptxElementBase {
|
|
|
6408
6723
|
children: PptxElement[];
|
|
6409
6724
|
/** Fill style extracted from the group's `p:grpSpPr`, used for `a:grpFill` inheritance. */
|
|
6410
6725
|
groupFill?: ShapeStyle;
|
|
6726
|
+
/**
|
|
6727
|
+
* The SAME `p:grpSpPr` extraction as {@link groupFill}, kept whenever the
|
|
6728
|
+
* group carries a `p:grpSpPr` at all, regardless of whether it resolved to
|
|
6729
|
+
* a paintable fill.
|
|
6730
|
+
*
|
|
6731
|
+
* `groupFill` is `undefined` unless the group has a real fill, because
|
|
6732
|
+
* `getGroupChildParentFill`/`groupChildInheritedFill` (the `a:grpFill`
|
|
6733
|
+
* inheritance chain) must keep chaining through an ancestor's fill when
|
|
6734
|
+
* THIS group has none of its own. A group whose `p:grpSpPr` authors only
|
|
6735
|
+
* `a:effectLst` (shadow/glow/soft-edge/reflection, no fill) needs those
|
|
6736
|
+
* effects to still reach the renderer, so they are kept here under a name
|
|
6737
|
+
* that carries no fill-inheritance meaning. Currently only reflection is
|
|
6738
|
+
* read from it (`getComputedEffectStyle`); the rest of `a:effectLst` on a
|
|
6739
|
+
* group remains unsupported.
|
|
6740
|
+
*/
|
|
6741
|
+
groupEffectStyle?: ShapeStyle;
|
|
6742
|
+
/**
|
|
6743
|
+
* Exact EMU the group's own `a:chOff`/`a:chExt` (the coordinate space its
|
|
6744
|
+
* CHILDREN are authored in) were parsed from, alongside {@link
|
|
6745
|
+
* PptxElementBase.xEmu} etc for the group's own placement in its PARENT's
|
|
6746
|
+
* space. `undefined` when the source carried no usable `a:chOff`/`a:chExt`
|
|
6747
|
+
* (an SDK-created group, or one whose `a:xfrm` had no child-space data).
|
|
6748
|
+
*
|
|
6749
|
+
* Used by `group-xfrm-preservation.ts`'s `hasCapturedChildSpace` to decide
|
|
6750
|
+
* whether this group's original `a:chOff`/`a:chExt` can be re-emitted
|
|
6751
|
+
* verbatim (always true once captured, regardless of whether anything in
|
|
6752
|
+
* the subtree has moved or resized - only its DIRECT children's
|
|
6753
|
+
* `a:off`/`a:ext` are recomputed, via `invertChildIntoGroupSpace`, when
|
|
6754
|
+
* something changed), instead of the normalized `chOff 0,0` / `chExt ==
|
|
6755
|
+
* ext` space the writer falls back to when this is `undefined` (or
|
|
6756
|
+
* degenerate). See `group-shape-geometry.ts`'s module doc for why a group
|
|
6757
|
+
* needs two coordinate systems at all.
|
|
6758
|
+
*/
|
|
6759
|
+
chOffXEmu?: number;
|
|
6760
|
+
/** See {@link chOffXEmu}. */
|
|
6761
|
+
chOffYEmu?: number;
|
|
6762
|
+
/** See {@link chOffXEmu}. */
|
|
6763
|
+
chExtWidthEmu?: number;
|
|
6764
|
+
/** See {@link chOffXEmu}. */
|
|
6765
|
+
chExtHeightEmu?: number;
|
|
6411
6766
|
}
|
|
6412
6767
|
/**
|
|
6413
6768
|
* A freehand ink / drawing stroke captured with a stylus or mouse.
|
|
@@ -6436,6 +6791,24 @@ interface InkPptxElement extends PptxElementBase {
|
|
|
6436
6791
|
* variable-width strokes that reflect stylus/pen pressure.
|
|
6437
6792
|
*/
|
|
6438
6793
|
inkPointPressures?: number[][];
|
|
6794
|
+
/**
|
|
6795
|
+
* Per-path arrays of per-point pen-tilt lean direction (degrees, straight
|
|
6796
|
+
* from `PointerEvent.tiltX` on supporting hardware).
|
|
6797
|
+
*
|
|
6798
|
+
* Each entry corresponds to the path at the same index in `inkPaths`, and
|
|
6799
|
+
* is paired positionally with {@link inkPointTiltY}. Present only when at
|
|
6800
|
+
* least one point in the stroke reported a genuinely non-zero tilt: a
|
|
6801
|
+
* device that never reports tilt (a mouse, or a stylus with no tilt
|
|
6802
|
+
* sensor) leaves both arrays absent, the same way `inkPointPressures` is
|
|
6803
|
+
* omitted when pressure never varies. When present, the renderer converts
|
|
6804
|
+
* the raw `(tiltX, tiltY)` vector into a lean angle + magnitude (see
|
|
6805
|
+
* `pptx-viewer-shared`'s `tiltChannelsFromVectors`) and widens the stroke
|
|
6806
|
+
* perpendicular to the lean direction, approximating a chisel-tip
|
|
6807
|
+
* calligraphy nib.
|
|
6808
|
+
*/
|
|
6809
|
+
inkPointTiltX?: number[][];
|
|
6810
|
+
/** Per-path, per-point pen-tilt lean direction (degrees), paired with {@link inkPointTiltX}. */
|
|
6811
|
+
inkPointTiltY?: number[][];
|
|
6439
6812
|
/** Unrecognised graphicFrame extLst extensions, captured verbatim for round-trip. */
|
|
6440
6813
|
extensionXml?: PptxGraphicFrameExtension[];
|
|
6441
6814
|
}
|
|
@@ -6469,6 +6842,20 @@ interface ContentPartInkStroke {
|
|
|
6469
6842
|
* {@link tiltAngles}.
|
|
6470
6843
|
*/
|
|
6471
6844
|
tiltMagnitudes?: number[];
|
|
6845
|
+
/**
|
|
6846
|
+
* Which InkML channel pair {@link tiltAngles}/{@link tiltMagnitudes} were
|
|
6847
|
+
* decoded from: `'azimuthAltitude'` when the source declared `AZIMUTH`
|
|
6848
|
+
* (optionally paired with `ALTITUDE`); omitted (implying `OTx`/`OTy`, i.e.
|
|
6849
|
+
* `'vector'`) otherwise, including for tilt this library itself captured
|
|
6850
|
+
* from the Draw tool's `PointerEvent.tiltX`/`tiltY`.
|
|
6851
|
+
*
|
|
6852
|
+
* A save that has to rewrite this content part's InkML (see
|
|
6853
|
+
* `inkml-content-part-writer.ts`) uses this to re-declare the SAME channel
|
|
6854
|
+
* pair the file already used, rather than always converting to `OTx`/`OTy`;
|
|
6855
|
+
* the rendered lean is identical either way; only the written channel
|
|
6856
|
+
* NAMES differ.
|
|
6857
|
+
*/
|
|
6858
|
+
tiltEncoding?: 'vector' | 'azimuthAltitude';
|
|
6472
6859
|
}
|
|
6473
6860
|
/**
|
|
6474
6861
|
* A content-part element wrapped in `mc:AlternateContent`.
|
|
@@ -7135,10 +7522,27 @@ interface PptxNativeAnimation {
|
|
|
7135
7522
|
buildLevel?: number;
|
|
7136
7523
|
/** Group ID linking a `p:bldP` entry to its timing animation node. */
|
|
7137
7524
|
groupId?: string;
|
|
7138
|
-
/**
|
|
7525
|
+
/**
|
|
7526
|
+
* Sound relationship ID to play when animation triggers. Modern PowerPoint
|
|
7527
|
+
* (COM-verified against 2016) writes this as a `p:audio/p:cMediaNode`
|
|
7528
|
+
* sibling of the effect's own `p:childTnLst`, targeting `p:sndTgt` rather
|
|
7529
|
+
* than a shape; the legacy `p:stSnd` form (directly on `p:cTn`) is still
|
|
7530
|
+
* accepted on load for round-trip of older-authored decks, but PowerPoint
|
|
7531
|
+
* itself no longer writes it and does not recognise it back
|
|
7532
|
+
* (`Effect.EffectInformation.SoundEffect` reads empty against it).
|
|
7533
|
+
*/
|
|
7139
7534
|
soundRId?: string;
|
|
7140
7535
|
/** Resolved sound file path from relationship. */
|
|
7141
7536
|
soundPath?: string;
|
|
7537
|
+
/**
|
|
7538
|
+
* The embedded sound's `@_name` (from `p:snd`/`p:sndTgt`). For one of
|
|
7539
|
+
* PowerPoint's 19 built-in stock sounds this is the exact upper-case file
|
|
7540
|
+
* name PowerPoint itself writes (e.g. `"CHIMES.WAV"`); see
|
|
7541
|
+
* `pptx-viewer-shared`'s `effect-sound-catalogue.ts`, which matches this
|
|
7542
|
+
* value back to a gallery entry. Absent for a custom sound with no name,
|
|
7543
|
+
* or when unresolved.
|
|
7544
|
+
*/
|
|
7545
|
+
soundName?: string;
|
|
7142
7546
|
/** Whether to stop any currently playing sound (`p:endSnd`). */
|
|
7143
7547
|
stopSound?: boolean;
|
|
7144
7548
|
/**
|
|
@@ -7303,17 +7707,28 @@ interface PptxNativeAnimation {
|
|
|
7303
7707
|
*/
|
|
7304
7708
|
afterEffect?: boolean;
|
|
7305
7709
|
/**
|
|
7306
|
-
* "After animation" end-state behaviour
|
|
7307
|
-
*
|
|
7308
|
-
*
|
|
7309
|
-
*
|
|
7310
|
-
*
|
|
7311
|
-
*
|
|
7312
|
-
*
|
|
7710
|
+
* "After animation" end-state behaviour: dim-to-colour, hide-after-
|
|
7711
|
+
* animation, or hide-on-next-click. Populated directly by the
|
|
7712
|
+
* native-timing parser (`native-animation-after-effect.ts`) when the
|
|
7713
|
+
* effect's `p:cTn/p:subTnLst` carries PowerPoint's genuine after-effect
|
|
7714
|
+
* shape, so a real-world deck's build shows up here even with no
|
|
7715
|
+
* `pptx:editorMeta`. `applyAfterAnimationFromEditorList` in
|
|
7716
|
+
* `pptx-viewer-shared` overrides this from the matching
|
|
7717
|
+
* {@link PptxElementAnimation.afterAnimation} entry when the editor's
|
|
7718
|
+
* per-element animation list has one (the model the animation panel
|
|
7719
|
+
* writes `afterAnimation` into), so an edit through our own UI always wins.
|
|
7313
7720
|
*/
|
|
7314
7721
|
afterAnimationAction?: PptxAfterAnimationAction;
|
|
7315
|
-
/** Dim-to color hex, present when {@link afterAnimationAction} is `dimToColor`. */
|
|
7722
|
+
/** Dim-to color hex, present when {@link afterAnimationAction} is `dimToColor` AND the dim target is an already-resolved `a:srgbClr`. */
|
|
7316
7723
|
afterAnimationColor?: string;
|
|
7724
|
+
/**
|
|
7725
|
+
* The typed theme reference when a `dimToColor` target is an `a:schemeClr`
|
|
7726
|
+
* (e.g. `accent2`) instead of `a:srgbClr`: this parse layer has no theme to
|
|
7727
|
+
* resolve it to sRGB with (see {@link afterAnimationColor}'s doc), so a
|
|
7728
|
+
* playback consumer resolves this against the deck's theme colour map.
|
|
7729
|
+
* Mutually exclusive with {@link afterAnimationColor} being set.
|
|
7730
|
+
*/
|
|
7731
|
+
afterAnimationColorRef?: PptxThemeColorRef;
|
|
7317
7732
|
/**
|
|
7318
7733
|
* Parsed `p:animEffect` filter descriptor. `presetId`/`presetClass` remain
|
|
7319
7734
|
* the primary effect selector (see `resolveEffect` in `pptx-viewer-shared`);
|
|
@@ -7445,13 +7860,46 @@ interface PptxAnimationKeyframe {
|
|
|
7445
7860
|
* fidelity; consumers may use it to drive computed animation values.
|
|
7446
7861
|
*/
|
|
7447
7862
|
fmla?: string;
|
|
7863
|
+
/**
|
|
7864
|
+
* The typed theme reference when a `p:val/p:clrVal` stop is an
|
|
7865
|
+
* `a:schemeClr` (e.g. `accent1`), including any `tint`/`shade`/`lumMod`/
|
|
7866
|
+
* `lumOff`/`alpha` children. {@link value} keeps the bare scheme name for
|
|
7867
|
+
* round-trip; a playback consumer needs this ref (resolved against the
|
|
7868
|
+
* deck's theme colour map) to turn the stop into a real CSS colour, which
|
|
7869
|
+
* the bare name alone cannot do. Absent for an `a:srgbClr` stop, whose
|
|
7870
|
+
* {@link value} is already a resolved `#rrggbb` hex string.
|
|
7871
|
+
*/
|
|
7872
|
+
colorRef?: PptxThemeColorRef;
|
|
7448
7873
|
}
|
|
7449
7874
|
/** One generic `p:anim` behaviour inside a composed PowerPoint effect. */
|
|
7450
7875
|
interface PptxAttributeAnimation {
|
|
7451
7876
|
/** Lowercased target attribute from `p:attrNameLst`. */
|
|
7452
7877
|
attrName: string;
|
|
7453
|
-
/**
|
|
7878
|
+
/**
|
|
7879
|
+
* Authored value stops from this behaviour's `p:tavLst`. Empty when the
|
|
7880
|
+
* behaviour instead uses the simpler `from`/`to`/`by` attribute form (see
|
|
7881
|
+
* below); at least one of `keyframes`, `from`/`to`, or `by` is present.
|
|
7882
|
+
*/
|
|
7454
7883
|
keyframes: PptxAnimationKeyframe[];
|
|
7884
|
+
/**
|
|
7885
|
+
* `p:anim/@_from` (a formula string, ECMA-376 S19.5.4 CT_TLAnimateBehavior):
|
|
7886
|
+
* the absolute starting value, used instead of `p:tavLst` when the
|
|
7887
|
+
* behaviour only has two endpoints. PowerPoint writes this form for some
|
|
7888
|
+
* built-in presets (e.g. "Grow And Turn"'s `ppt_x` fly-in): a bare
|
|
7889
|
+
* `p:anim from="..." to="..."` with no `p:tavLst` child at all. See
|
|
7890
|
+
* `animation-ppt-formula-ground-truth.md` in `pptx-viewer-shared` for the
|
|
7891
|
+
* real-PowerPoint sample this was found in.
|
|
7892
|
+
*/
|
|
7893
|
+
from?: string;
|
|
7894
|
+
/** `p:anim/@_to`: the absolute ending value. See {@link from}. */
|
|
7895
|
+
to?: string;
|
|
7896
|
+
/**
|
|
7897
|
+
* `p:anim/@_by`: a DELTA formula added to wherever the attribute already
|
|
7898
|
+
* stands (as opposed to `from`/`to`'s absolute values), typically paired
|
|
7899
|
+
* with `p:cBhvr/@_additive="sum"` so it composites with a sibling
|
|
7900
|
+
* behaviour driving the same attribute instead of replacing it.
|
|
7901
|
+
*/
|
|
7902
|
+
by?: string;
|
|
7455
7903
|
/** Duration from this behaviour's nested `p:cTn/@dur`. */
|
|
7456
7904
|
durationMs?: number;
|
|
7457
7905
|
/** Start offset from this behaviour's nested `p:stCondLst`. */
|
|
@@ -7460,8 +7908,11 @@ interface PptxAttributeAnimation {
|
|
|
7460
7908
|
* Interpolation mode from this behaviour's own `@_calcmode`
|
|
7461
7909
|
* (ST_TLAnimateBehaviorCalcMode, ECMA-376 S19.5.2): `discrete` snaps to
|
|
7462
7910
|
* each `p:tav` stop with no interpolation, `lin` (the OOXML default)
|
|
7463
|
-
* interpolates linearly
|
|
7464
|
-
*
|
|
7911
|
+
* interpolates linearly. `fmla` as the WHOLE behaviour's calc mode has
|
|
7912
|
+
* never been observed in a real PowerPoint file and is not consulted at
|
|
7913
|
+
* playback; what PowerPoint actually writes is `calcmode="lin"` with a
|
|
7914
|
+
* per-stop `p:tav/@fmla` (see {@link PptxAnimationKeyframe.fmla}), which
|
|
7915
|
+
* IS consulted regardless of this field's value. Absent means `lin`.
|
|
7465
7916
|
*/
|
|
7466
7917
|
calcMode?: 'discrete' | 'lin' | 'fmla';
|
|
7467
7918
|
}
|
|
@@ -7487,16 +7938,31 @@ interface PptxColorAnimation {
|
|
|
7487
7938
|
* companion to `@dir` for HSL colour-space animations.
|
|
7488
7939
|
*/
|
|
7489
7940
|
path?: string;
|
|
7490
|
-
/** Starting color as hex string. */
|
|
7941
|
+
/** Starting color as hex string, or the bare scheme name (e.g. `accent1`) for a theme colour; see {@link fromColorRef}. */
|
|
7491
7942
|
fromColor?: string;
|
|
7492
|
-
/** Ending color as hex string. */
|
|
7943
|
+
/** Ending color as hex string, or the bare scheme name; see {@link toColorRef}. */
|
|
7493
7944
|
toColor?: string;
|
|
7494
7945
|
/**
|
|
7495
|
-
* Color delta (for "by" animations) as hex string
|
|
7496
|
-
*
|
|
7497
|
-
*
|
|
7946
|
+
* Color delta (for "by" animations) as hex string, or the bare scheme name;
|
|
7947
|
+
* see {@link byColorRef}. For HSL colour-space animations this retains the
|
|
7948
|
+
* historical byte-packed compatibility value; consumers should prefer
|
|
7949
|
+
* {@link hslDelta}, which preserves signed values.
|
|
7498
7950
|
*/
|
|
7499
7951
|
byColor?: string;
|
|
7952
|
+
/**
|
|
7953
|
+
* The typed theme reference when {@link fromColor} is an `a:schemeClr`
|
|
7954
|
+
* (including `tint`/`shade`/`lumMod`/`lumOff`/`alpha`), so playback can
|
|
7955
|
+
* resolve it against the deck's theme colour map. Absent when `fromColor`
|
|
7956
|
+
* is already a resolved `#rrggbb` hex (an `a:srgbClr` stop).
|
|
7957
|
+
*/
|
|
7958
|
+
fromColorRef?: PptxThemeColorRef;
|
|
7959
|
+
/** The typed theme reference for {@link toColor}; see {@link fromColorRef}. */
|
|
7960
|
+
toColorRef?: PptxThemeColorRef;
|
|
7961
|
+
/**
|
|
7962
|
+
* The typed theme reference for {@link byColor} (RGB colour space only; an
|
|
7963
|
+
* HSL `by` is a signed delta, never a theme colour). See {@link fromColorRef}.
|
|
7964
|
+
*/
|
|
7965
|
+
byColorRef?: PptxThemeColorRef;
|
|
7500
7966
|
/**
|
|
7501
7967
|
* Typed HSL delta from `p:by/p:hsl`. This preserves signed values and their
|
|
7502
7968
|
* OOXML units without forcing them through the legacy byte-packed `byColor`
|
|
@@ -7636,10 +8102,24 @@ interface PptxElementAnimation {
|
|
|
7636
8102
|
motionPathRotationCenterX?: number;
|
|
7637
8103
|
/** Motion-path rotation centre Y in slide percentage units (`p:rCtr/@y`). */
|
|
7638
8104
|
motionPathRotationCenterY?: number;
|
|
7639
|
-
/**
|
|
8105
|
+
/**
|
|
8106
|
+
* Sound relationship ID to play when animation triggers. Written on save
|
|
8107
|
+
* as a `p:audio/p:cMediaNode` sibling of the effect's own `p:childTnLst`
|
|
8108
|
+
* (see `PptxNativeAnimation.soundRId` for the COM-verified detail).
|
|
8109
|
+
*/
|
|
7640
8110
|
soundRId?: string;
|
|
7641
8111
|
/** Resolved sound file path from relationship. */
|
|
7642
8112
|
soundPath?: string;
|
|
8113
|
+
/**
|
|
8114
|
+
* The `@_name` to write on the embedded sound (`p:sndTgt`). For a stock
|
|
8115
|
+
* gallery pick this is the exact PowerPoint file name (e.g.
|
|
8116
|
+
* `"CHIMES.WAV"`), which is what makes PowerPoint itself recognise the
|
|
8117
|
+
* sound as that built-in entry when it reopens the saved deck (there is no
|
|
8118
|
+
* separate "built-in" flag anywhere in the schema). Set by
|
|
8119
|
+
* `pptx-viewer-shared`'s `setEffectSound` when the pick carries a
|
|
8120
|
+
* `soundName`; absent for a custom file with no meaningful name.
|
|
8121
|
+
*/
|
|
8122
|
+
soundName?: string;
|
|
7643
8123
|
/** Whether to stop any currently playing sound (`p:endSnd`). */
|
|
7644
8124
|
stopSound?: boolean;
|
|
7645
8125
|
/**
|
|
@@ -7654,7 +8134,9 @@ interface PptxElementAnimation {
|
|
|
7654
8134
|
/**
|
|
7655
8135
|
* Display name for the chosen sound (e.g. the uploaded file's name),
|
|
7656
8136
|
* shown by the authoring UI's sound picker. Purely cosmetic; has no
|
|
7657
|
-
* OOXML equivalent and is not required for playback.
|
|
8137
|
+
* OOXML equivalent and is not required for playback. For a stock gallery
|
|
8138
|
+
* pick, the UI derives its label from {@link soundName} via the catalogue
|
|
8139
|
+
* instead of this field.
|
|
7658
8140
|
*/
|
|
7659
8141
|
soundFileName?: string;
|
|
7660
8142
|
/**
|
|
@@ -8709,13 +9191,13 @@ interface PptxSlide {
|
|
|
8709
9191
|
backgroundPattern?: PptxSlideBackgroundPattern;
|
|
8710
9192
|
/**
|
|
8711
9193
|
* `<p:bgPr/@shadeToTitle>`: boolean flag instructing the renderer to
|
|
8712
|
-
*
|
|
8713
|
-
*
|
|
8714
|
-
*
|
|
9194
|
+
* anchor the background gradient on the title placeholder as a
|
|
9195
|
+
* rectangular path gradient (COM-measured against real PowerPoint;
|
|
9196
|
+
* it does NOT recolour toward the title's text colour, despite the
|
|
9197
|
+
* attribute's name). Parsed and round-tripped here on the core model;
|
|
9198
|
+
* the actual visual effect is applied by `pptx-viewer-shared`'s
|
|
8715
9199
|
* `getSlideBackgroundStyle` (see `render/background-shade-to-title.ts`),
|
|
8716
|
-
* consumed by all five bindings, not by core itself.
|
|
8717
|
-
* docstring explains the approximation: no published ECMA-376 or
|
|
8718
|
-
* MS-ODRAWXML text documents the exact legacy blend. Legacy PowerPoint
|
|
9200
|
+
* consumed by all five bindings, not by core itself. Legacy PowerPoint
|
|
8719
9201
|
* 97-2003 hint, not observed in any real-world corpus file this project
|
|
8720
9202
|
* has collected and not settable from any modern PowerPoint UI; see
|
|
8721
9203
|
* `docs/guide/limitations.md`.
|
|
@@ -9349,7 +9831,7 @@ interface PptxEmbeddedFont {
|
|
|
9349
9831
|
originalPartBytes?: Uint8Array;
|
|
9350
9832
|
}
|
|
9351
9833
|
//#endregion
|
|
9352
|
-
//#region ../core/dist/index-
|
|
9834
|
+
//#region ../core/dist/index-D5JK1ibj.d.ts
|
|
9353
9835
|
//#region src/core/types/theme-presets.d.ts
|
|
9354
9836
|
/**
|
|
9355
9837
|
* A complete theme preset that can be applied to a presentation.
|
|
@@ -10003,7 +10485,7 @@ interface PptxHandlerLoadOptions {
|
|
|
10003
10485
|
allowExternalImages?: boolean;
|
|
10004
10486
|
}
|
|
10005
10487
|
/** Output format for the save pipeline. */
|
|
10006
|
-
type PptxSaveFormat = 'pptx' | 'ppsx' | 'pptm';
|
|
10488
|
+
type PptxSaveFormat = 'pptx' | 'ppsx' | 'pptm' | 'ppt';
|
|
10007
10489
|
interface PptxHandlerSaveOptions {
|
|
10008
10490
|
headerFooter?: PptxHeaderFooter;
|
|
10009
10491
|
presentationProperties?: PptxPresentationProperties;
|
|
@@ -10099,8 +10581,23 @@ interface PptxHandlerSaveOptions {
|
|
|
10099
10581
|
* - `'pptx'` (default): Standard presentation.
|
|
10100
10582
|
* - `'ppsx'`: Slide-show file (opens in presentation mode).
|
|
10101
10583
|
* - `'pptm'`: Macro-enabled presentation (requires VBA data).
|
|
10584
|
+
* - `'ppt'`: Legacy binary PowerPoint 97-2003 presentation. Bypasses the
|
|
10585
|
+
* OOXML ZIP pipeline entirely; see `PptxHandlerRuntimeSaveLegacyPpt`.
|
|
10586
|
+
* Elements with no binary equivalent (charts, SmartArt, media, OLE, ink,
|
|
10587
|
+
* 3D models) are degraded to a rasterised preview picture or a labelled
|
|
10588
|
+
* placeholder, each reported via a `scope: 'save'`-adjacent
|
|
10589
|
+
* `PptxCompatibilityWarning`.
|
|
10102
10590
|
*/
|
|
10103
10591
|
outputFormat?: PptxSaveFormat;
|
|
10592
|
+
/**
|
|
10593
|
+
* Password for RC4 CryptoAPI encryption of a `'ppt'`-format save. Ignored
|
|
10594
|
+
* for every other {@link outputFormat}; encrypting a `.pptx`/`.ppsx`/`.pptm`
|
|
10595
|
+
* save uses {@link IPptxHandlerRuntime.saveEncrypted}'s separate AES/Agile
|
|
10596
|
+
* OLE2 wrapping instead, since the legacy binary format's own encryption
|
|
10597
|
+
* scheme is embedded directly in the `.ppt` stream rather than wrapping an
|
|
10598
|
+
* already-produced package.
|
|
10599
|
+
*/
|
|
10600
|
+
pptPassword?: string;
|
|
10104
10601
|
/**
|
|
10105
10602
|
* Embedded fonts to write back (or add) to the saved PPTX.
|
|
10106
10603
|
*
|
|
@@ -10962,6 +11459,24 @@ interface ThemeCatalogEntry {
|
|
|
10962
11459
|
theme: ViewerTheme | undefined;
|
|
10963
11460
|
}
|
|
10964
11461
|
//#endregion
|
|
11462
|
+
//#region ../shared/dist/smartart-3d-types-5jml-0QC.d.ts
|
|
11463
|
+
//#region src/render/animation-text-style-resolve.d.ts
|
|
11464
|
+
/**
|
|
11465
|
+
* Framework-neutral text-style override a font-style emphasis effect applies
|
|
11466
|
+
* on top of its target's own authored per-run bold/italic/underline/size/
|
|
11467
|
+
* colour. Every binding maps this onto its own text container so it OVERRIDES
|
|
11468
|
+
* the runs' inline styles (the runs carry explicit inline styles of their
|
|
11469
|
+
* own, so plain CSS inheritance cannot reach them).
|
|
11470
|
+
*/
|
|
11471
|
+
interface TextStyleAnimationDescriptor {
|
|
11472
|
+
bold?: boolean;
|
|
11473
|
+
italic?: boolean;
|
|
11474
|
+
underline?: boolean;
|
|
11475
|
+
/** Relative multiplier against each run's own authored font size. */
|
|
11476
|
+
fontScale?: number;
|
|
11477
|
+
color?: string;
|
|
11478
|
+
}
|
|
11479
|
+
//#endregion
|
|
10965
11480
|
//#region ../shared/dist/index.d.ts
|
|
10966
11481
|
//#region src/types.d.ts
|
|
10967
11482
|
/** Canvas dimensions in pixels. */
|
|
@@ -11154,22 +11669,15 @@ interface ChartPartRef {
|
|
|
11154
11669
|
/** One of the three animation buckets a preset can occupy on an element. */
|
|
11155
11670
|
type AnimationGroup = 'entrance' | 'emphasis' | 'exit';
|
|
11156
11671
|
//#endregion
|
|
11157
|
-
//#region src/render/animation-
|
|
11672
|
+
//#region src/render/animation-timeline-build-descriptors.d.ts
|
|
11158
11673
|
/**
|
|
11159
|
-
*
|
|
11160
|
-
*
|
|
11161
|
-
*
|
|
11162
|
-
*
|
|
11163
|
-
*
|
|
11674
|
+
* `animation-timeline-build-descriptors` - staged-build (`p:bldChart` /
|
|
11675
|
+
* `p:bldDgm`) reveal descriptor types, split out of `animation-timeline-types`
|
|
11676
|
+
* to keep that module under the file-size limit. Re-exported from
|
|
11677
|
+
* `animation-timeline-types` so existing imports are unaffected.
|
|
11678
|
+
*
|
|
11679
|
+
* @module render/animation-timeline-build-descriptors
|
|
11164
11680
|
*/
|
|
11165
|
-
interface TextStyleAnimationDescriptor {
|
|
11166
|
-
bold?: boolean;
|
|
11167
|
-
italic?: boolean;
|
|
11168
|
-
underline?: boolean;
|
|
11169
|
-
/** Relative multiplier against each run's own authored font size. */
|
|
11170
|
-
fontScale?: number;
|
|
11171
|
-
color?: string;
|
|
11172
|
-
}
|
|
11173
11681
|
/**
|
|
11174
11682
|
* Normalized staged-reveal mode for a chart graphic frame, derived from the
|
|
11175
11683
|
* OOXML `a:bldChart/@bld` (or `p:bldOleChart/@bld`) token:
|
|
@@ -11203,12 +11711,12 @@ interface ChartRevealPoint {
|
|
|
11203
11711
|
* Playback-time chart reveal state derived from AUTHORED `p:graphicEl`
|
|
11204
11712
|
* indices (see `chart-reveal-descriptor`'s `resolveChartRevealDescriptor`),
|
|
11205
11713
|
* rather than from click-count/time progress. Present on
|
|
11206
|
-
* {@link ElementAnimationState.chartReveal}
|
|
11207
|
-
* chart-build step for the element carried index data;
|
|
11208
|
-
* this over the progress-based `build`/`ElementBuildState`
|
|
11209
|
-
* since it reflects the real authored reveal set (correct
|
|
11210
|
-
* reversed-order or gapped chart build), and falls back to `build`
|
|
11211
|
-
* absent.
|
|
11714
|
+
* {@link import('./animation-timeline-group').ElementAnimationState.chartReveal}
|
|
11715
|
+
* only when every fired chart-build step for the element carried index data;
|
|
11716
|
+
* a renderer prefers this over the progress-based `build`/`ElementBuildState`
|
|
11717
|
+
* path when present, since it reflects the real authored reveal set (correct
|
|
11718
|
+
* even for a reversed-order or gapped chart build), and falls back to `build`
|
|
11719
|
+
* when absent.
|
|
11212
11720
|
*/
|
|
11213
11721
|
interface ChartRevealDescriptor {
|
|
11214
11722
|
/**
|
|
@@ -11229,12 +11737,13 @@ interface ChartRevealDescriptor {
|
|
|
11229
11737
|
* Playback-time SmartArt diagram reveal state derived from AUTHORED
|
|
11230
11738
|
* `p:graphicEl/p:dgm/@id` indices (see `diagram-reveal-descriptor`'s
|
|
11231
11739
|
* `resolveDiagramRevealDescriptor`), rather than from click-count/time
|
|
11232
|
-
* progress. Present on
|
|
11233
|
-
*
|
|
11234
|
-
*
|
|
11235
|
-
*
|
|
11236
|
-
*
|
|
11237
|
-
*
|
|
11740
|
+
* progress. Present on
|
|
11741
|
+
* {@link import('./animation-timeline-group').ElementAnimationState.diagramReveal}
|
|
11742
|
+
* only when every fired diagram-build step for the element carried
|
|
11743
|
+
* `p:graphicEl` data. A SmartArt renderer prefers this over the
|
|
11744
|
+
* progress-based `build` / {@link ElementBuildState} path when present, since
|
|
11745
|
+
* it reflects the real authored reveal set (correct even for a
|
|
11746
|
+
* reversed-order or by-branch build), and falls back to `build` when absent.
|
|
11238
11747
|
*/
|
|
11239
11748
|
interface DiagramRevealDescriptor {
|
|
11240
11749
|
/**
|
|
@@ -11247,9 +11756,11 @@ interface DiagramRevealDescriptor {
|
|
|
11247
11756
|
nodeIds: ReadonlySet<string>;
|
|
11248
11757
|
}
|
|
11249
11758
|
/**
|
|
11250
|
-
* Playback-time staged-build state surfaced on
|
|
11251
|
-
*
|
|
11252
|
-
*
|
|
11759
|
+
* Playback-time staged-build state surfaced on
|
|
11760
|
+
* {@link import('./animation-timeline-group').ElementAnimationState}.
|
|
11761
|
+
* `progress` is the 0..1 fraction of the build revealed at the current
|
|
11762
|
+
* playback time; a consumer maps it to its own item COUNT (see
|
|
11763
|
+
* `revealedStageCount`).
|
|
11253
11764
|
*/
|
|
11254
11765
|
type ElementBuildState = {
|
|
11255
11766
|
kind: 'chart';
|
|
@@ -11312,14 +11823,14 @@ interface ElementAnimationState {
|
|
|
11312
11823
|
animatesStroke?: boolean;
|
|
11313
11824
|
/**
|
|
11314
11825
|
* Active discrete font-style / colour / size override (see
|
|
11315
|
-
* {@link TimelineStep.textStyle}) a
|
|
11316
|
-
* applies to this element's text,
|
|
11317
|
-
* bold/italic/underline/size/colour.
|
|
11318
|
-
* this on step start and again on
|
|
11319
|
-
* `p:cTn/@fill` holds its end
|
|
11320
|
-
* maps it onto its run markup
|
|
11321
|
-
* (`animation-text-style-css.ts`). Absent
|
|
11322
|
-
* effect is currently active on this element.
|
|
11826
|
+
* {@link import('./animation-timeline-step').TimelineStep.textStyle}) a
|
|
11827
|
+
* font-style emphasis effect currently applies to this element's text,
|
|
11828
|
+
* OVERRIDING the runs' own inline bold/italic/underline/size/colour.
|
|
11829
|
+
* `animation-playback-engine.ts` writes this on step start and again on
|
|
11830
|
+
* cleanup (held in full when the effect's `p:cTn/@fill` holds its end
|
|
11831
|
+
* state, otherwise reverted); a text renderer maps it onto its run markup
|
|
11832
|
+
* via `buildTextStyleOverrideCss` (`animation-text-style-css.ts`). Absent
|
|
11833
|
+
* means no font-style emphasis effect is currently active on this element.
|
|
11323
11834
|
*/
|
|
11324
11835
|
textStyle?: TextStyleAnimationDescriptor;
|
|
11325
11836
|
}
|
|
@@ -11486,16 +11997,17 @@ interface SlideSizeEmu {
|
|
|
11486
11997
|
* working loader unreachable in practice. Whenever the loader learns a format,
|
|
11487
11998
|
* exactly one list has to change.
|
|
11488
11999
|
*
|
|
11489
|
-
* ## Read many, write
|
|
12000
|
+
* ## Read many, write several
|
|
11490
12001
|
*
|
|
11491
12002
|
* Input is a superset of output. We READ `.pptx`, `.ppsx`, `.pptm`, `.potx`,
|
|
11492
|
-
* legacy binary `.ppt` and portable `pptx-viewer-json`; we WRITE
|
|
11493
|
-
*
|
|
11494
|
-
*
|
|
11495
|
-
*
|
|
11496
|
-
* rather than keeping
|
|
11497
|
-
* `report.
|
|
11498
|
-
* the kind of
|
|
12003
|
+
* legacy binary `.ppt` and portable `pptx-viewer-json`; we WRITE the OpenXML
|
|
12004
|
+
* family plus legacy binary `.ppt` (via `packages/core/src/core/ppt/writer/`,
|
|
12005
|
+
* a real MS-PPT/OLE2 encoder, not a stub). `savedPresentationFileName`
|
|
12006
|
+
* REPLACES the source extension with the extension of the format actually
|
|
12007
|
+
* being written rather than keeping the source's: a deck opened as
|
|
12008
|
+
* `report.pptx` and saved back as `.ppt` (or vice versa) must have its name
|
|
12009
|
+
* agree with its bytes, which is the kind of mismatch PowerPoint itself
|
|
12010
|
+
* refuses to open.
|
|
11499
12011
|
*
|
|
11500
12012
|
* This module deliberately imports nothing, so any layer (render, export, a
|
|
11501
12013
|
* binding, a host app) can depend on it without risking an import cycle.
|
|
@@ -11510,9 +12022,9 @@ interface SlideSizeEmu {
|
|
|
11510
12022
|
* suite, which asserts a `.ppt` loads to the same model as the `.pptx` it was
|
|
11511
12023
|
* exported from.
|
|
11512
12024
|
*/
|
|
11513
|
-
declare const PRESENTATION_OPEN_EXTENSIONS: readonly ['.pptx', '.ppsx', '.pptm', '.potx', '.ppt', '.json'];
|
|
12025
|
+
export declare const PRESENTATION_OPEN_EXTENSIONS: readonly ['.pptx', '.ppsx', '.pptm', '.potx', '.ppt', '.json'];
|
|
11514
12026
|
/** Comma-separated `accept` attribute for a presentation file input. */
|
|
11515
|
-
declare const PPTX_OPEN_ACCEPT: string;
|
|
12027
|
+
export declare const PPTX_OPEN_ACCEPT: string;
|
|
11516
12028
|
/**
|
|
11517
12029
|
* True when a picked / dropped file's name looks like something the loader can
|
|
11518
12030
|
* open. Use this instead of a hand-rolled `endsWith` chain: a drop handler that
|
|
@@ -11523,27 +12035,32 @@ declare const PPTX_OPEN_ACCEPT: string;
|
|
|
11523
12035
|
* `PptxHandler.load()`; this is only the cheap pre-filter a drop target needs
|
|
11524
12036
|
* before it hands bytes to the loader.
|
|
11525
12037
|
*/
|
|
11526
|
-
declare function isSupportedPresentationFile(name: string | null | undefined): boolean;
|
|
11527
|
-
/**
|
|
11528
|
-
|
|
11529
|
-
|
|
11530
|
-
|
|
12038
|
+
export declare function isSupportedPresentationFile(name: string | null | undefined): boolean;
|
|
12039
|
+
/**
|
|
12040
|
+
* True for the binary PowerPoint 97-2003 family. `.ppt` itself is now also a
|
|
12041
|
+
* SAVE target (see {@link SavedPresentationFormat}); `.pps`/`.pot` (97-2003
|
|
12042
|
+
* show/template) remain read-only siblings sharing the same record format.
|
|
12043
|
+
*/
|
|
12044
|
+
export declare function isLegacyBinaryPresentation(name: string | null | undefined): boolean;
|
|
12045
|
+
/** The formats the save path can produce. */
|
|
12046
|
+
type SavedPresentationFormat = 'pptx' | 'ppsx' | 'pptm' | 'ppt';
|
|
11531
12047
|
/**
|
|
11532
12048
|
* The stem of a presentation file name: directories and any loadable extension
|
|
11533
12049
|
* removed. `C:\decks\report.ppt` becomes `report`; a name with no recognised
|
|
11534
12050
|
* extension is kept whole, so `Untitled Presentation` survives intact rather
|
|
11535
12051
|
* than losing everything after its last dot.
|
|
11536
12052
|
*/
|
|
11537
|
-
declare function presentationBaseName(sourceName: string | null | undefined, fallback?: string): string;
|
|
12053
|
+
export declare function presentationBaseName(sourceName: string | null | undefined, fallback?: string): string;
|
|
11538
12054
|
/**
|
|
11539
12055
|
* The name a saved copy should be offered under: the source stem plus the
|
|
11540
12056
|
* extension of the format actually being written.
|
|
11541
12057
|
*
|
|
11542
|
-
* This is what turns `report.ppt` into `report.pptx` on Save As
|
|
11543
|
-
*
|
|
11544
|
-
* the
|
|
12058
|
+
* This is what turns `report.ppt` into `report.pptx` on a regular Save As,
|
|
12059
|
+
* and `report.pptx` into `report.ppt` when the user explicitly picks the
|
|
12060
|
+
* PowerPoint 97-2003 format. Keeping the source extension would mislabel the
|
|
12061
|
+
* bytes either way.
|
|
11545
12062
|
*/
|
|
11546
|
-
declare function savedPresentationFileName(sourceName: string | null | undefined, format?: SavedPresentationFormat): string;
|
|
12063
|
+
export declare function savedPresentationFileName(sourceName: string | null | undefined, format?: SavedPresentationFormat): string;
|
|
11547
12064
|
//#endregion
|
|
11548
12065
|
//#region src/render/session-restore.d.ts
|
|
11549
12066
|
/**
|
|
@@ -11584,24 +12101,24 @@ interface SessionDeck {
|
|
|
11584
12101
|
* @param create Mint and persist an id when the tab does not have one yet.
|
|
11585
12102
|
* Reads pass `false` so a fresh tab never claims another tab's record.
|
|
11586
12103
|
*/
|
|
11587
|
-
declare function getSessionTabId(create?: boolean): string | null;
|
|
12104
|
+
export declare function getSessionTabId(create?: boolean): string | null;
|
|
11588
12105
|
/**
|
|
11589
12106
|
* Remember `data` as the deck this tab has open, so the next load can restore
|
|
11590
12107
|
* it. Resolves `false` when the browser refused to store it; callers treat that
|
|
11591
12108
|
* as "no restore available later", never as an error.
|
|
11592
12109
|
*/
|
|
11593
|
-
declare function rememberSessionDeck(fileName: string, data: Uint8Array): Promise<boolean>;
|
|
12110
|
+
export declare function rememberSessionDeck(fileName: string, data: Uint8Array): Promise<boolean>;
|
|
11594
12111
|
/** The deck remembered for this tab, or `null` when there is nothing to restore. */
|
|
11595
|
-
declare function loadSessionDeck(): Promise<SessionDeck | null>;
|
|
12112
|
+
export declare function loadSessionDeck(): Promise<SessionDeck | null>;
|
|
11596
12113
|
/** Forget this tab's deck (the host closed it, or handed the tab to another flow). */
|
|
11597
|
-
declare function forgetSessionDeck(): Promise<void>;
|
|
12114
|
+
export declare function forgetSessionDeck(): Promise<void>;
|
|
11598
12115
|
/**
|
|
11599
12116
|
* The deck to reopen on load: this tab's remembered bytes, upgraded to a newer
|
|
11600
12117
|
* autosave snapshot of the same file when the viewer wrote one after they were
|
|
11601
12118
|
* remembered. Without that upgrade a refresh mid-edit would silently roll the
|
|
11602
12119
|
* presentation back to the state it was opened in.
|
|
11603
12120
|
*/
|
|
11604
|
-
declare function restoreSessionDeck(): Promise<SessionDeck | null>;
|
|
12121
|
+
export declare function restoreSessionDeck(): Promise<SessionDeck | null>;
|
|
11605
12122
|
/** Optional seed values for the share start form. */
|
|
11606
12123
|
interface ShareDefaults {
|
|
11607
12124
|
roomId?: string;
|
|
@@ -11653,8 +12170,8 @@ interface PresentationInkStroke {
|
|
|
11653
12170
|
width: number;
|
|
11654
12171
|
points: PresentationInkPoint[];
|
|
11655
12172
|
}
|
|
11656
|
-
declare function parsePresentationSessionId(hash: string): string | null;
|
|
11657
|
-
declare function loadPresentationDeck(sessionId: string): Promise<Uint8Array | null>;
|
|
12173
|
+
export declare function parsePresentationSessionId(hash: string): string | null;
|
|
12174
|
+
export declare function loadPresentationDeck(sessionId: string): Promise<Uint8Array | null>;
|
|
11658
12175
|
//#endregion
|
|
11659
12176
|
//#region src/render/presentation-blackboard.d.ts
|
|
11660
12177
|
/** Blackout state, as carried by {@link PresentationSnapshot}. */
|
|
@@ -11682,6 +12199,17 @@ interface InkPoint {
|
|
|
11682
12199
|
* data".
|
|
11683
12200
|
*/
|
|
11684
12201
|
pressure?: number;
|
|
12202
|
+
/**
|
|
12203
|
+
* Pen-tilt lean, in degrees, from `PointerEvent.tiltX`/`tiltY` on
|
|
12204
|
+
* supporting hardware (a mouse, or a stylus with no tilt sensor, reports a
|
|
12205
|
+
* constant 0). Optional and always captured as a pair: a binding that has
|
|
12206
|
+
* not wired tilt capture simply omits both, and {@link strokeToInkElement}
|
|
12207
|
+
* treats a constant `(0, 0)` reading the same way it treats a constant
|
|
12208
|
+
* pressure, i.e. as "no real tilt data" rather than authoring a channel
|
|
12209
|
+
* for it.
|
|
12210
|
+
*/
|
|
12211
|
+
tiltX?: number;
|
|
12212
|
+
tiltY?: number;
|
|
11685
12213
|
}
|
|
11686
12214
|
/** Options for {@link strokeToInkElement}. */
|
|
11687
12215
|
interface StrokeToInkElementOpts {
|
|
@@ -11881,7 +12409,27 @@ interface ReadOnlyRecommendation {
|
|
|
11881
12409
|
readonly messageKey: string;
|
|
11882
12410
|
/** Whether a binding's "read-only" toggle should default to on. */
|
|
11883
12411
|
readonly defaultReadOnly: boolean;
|
|
12412
|
+
/**
|
|
12413
|
+
* Whether lifting this recommendation requires a correct password, rather
|
|
12414
|
+
* than a plain "Edit anyway". True only for a `modifyVerifier` that carries
|
|
12415
|
+
* a hash this viewer can actually check (`hashData` plus a resolvable
|
|
12416
|
+
* algorithm, see `checkModifyPassword`; `saltData` is optional and NOT
|
|
12417
|
+
* required, a missing salt is still checkable). "Mark as Final" is purely
|
|
12418
|
+
* advisory and never requires one, and a `modifyVerifier` with no hash at
|
|
12419
|
+
* all, or naming an algorithm this viewer does not implement, cannot be
|
|
12420
|
+
* verified either way, so both fall back to the plain "Edit anyway" a
|
|
12421
|
+
* binding already had.
|
|
12422
|
+
*/
|
|
12423
|
+
readonly requiresPassword: boolean;
|
|
11884
12424
|
}
|
|
12425
|
+
//#endregion
|
|
12426
|
+
//#region src/render/modify-password-check.d.ts
|
|
12427
|
+
type ModifyPasswordCheckResult = {
|
|
12428
|
+
readonly ok: true;
|
|
12429
|
+
} | {
|
|
12430
|
+
readonly ok: false;
|
|
12431
|
+
readonly reason: 'wrong-password' | 'unsupported-algorithm';
|
|
12432
|
+
};
|
|
11885
12433
|
interface CompatibilityWarningToast {
|
|
11886
12434
|
/** Stable per-code id, since toasts are deduped by code (see module docs). */
|
|
11887
12435
|
readonly id: string;
|
|
@@ -11914,7 +12462,7 @@ type TranslationMessages = Record<string, Record<string, string>>;
|
|
|
11914
12462
|
* Build a {@link Translator} for a locale. `messages[locale]` (when provided)
|
|
11915
12463
|
* wins over the built-in English dictionary; English is always the fallback.
|
|
11916
12464
|
*/
|
|
11917
|
-
declare function createTranslator(locale?: string, messages?: TranslationMessages): Translator;
|
|
12465
|
+
export declare function createTranslator(locale?: string, messages?: TranslationMessages): Translator;
|
|
11918
12466
|
//#endregion
|
|
11919
12467
|
//#region src/viewer/state/store.d.ts
|
|
11920
12468
|
/**
|
|
@@ -11935,7 +12483,7 @@ interface Store<T extends object> {
|
|
|
11935
12483
|
/** Subscribe to state changes; returns an unsubscribe function. */
|
|
11936
12484
|
subscribe(listener: StoreListener<T>): () => void;
|
|
11937
12485
|
}
|
|
11938
|
-
declare function createStore<T extends object>(initial: T): Store<T>;
|
|
12486
|
+
export declare function createStore<T extends object>(initial: T): Store<T>;
|
|
11939
12487
|
//#endregion
|
|
11940
12488
|
//#region src/viewer/render/types.d.ts
|
|
11941
12489
|
/** Discriminant values of the {@link PptxElement} union (`'text'`, `'chart'`, ...). */
|
|
@@ -12156,7 +12704,7 @@ interface ElementRendererRegistry {
|
|
|
12156
12704
|
* `./elements`) installs the built-in renderers plus the typed placeholder
|
|
12157
12705
|
* fallback.
|
|
12158
12706
|
*/
|
|
12159
|
-
declare function createElementRendererRegistry(): ElementRendererRegistry;
|
|
12707
|
+
export declare function createElementRendererRegistry(): ElementRendererRegistry;
|
|
12160
12708
|
//#endregion
|
|
12161
12709
|
//#region src/viewer/render/dom.d.ts
|
|
12162
12710
|
/**
|
|
@@ -12164,11 +12712,11 @@ declare function createElementRendererRegistry(): ElementRendererRegistry;
|
|
|
12164
12712
|
* of camelCase (`backgroundColor`) and kebab-case (`background-color`) keys;
|
|
12165
12713
|
* both are normalised to `style.setProperty` calls.
|
|
12166
12714
|
*/
|
|
12167
|
-
declare function applyStyleMap(el: HTMLElement | SVGElement, style: CssStyleMap): void;
|
|
12715
|
+
export declare function applyStyleMap(el: HTMLElement | SVGElement, style: CssStyleMap): void;
|
|
12168
12716
|
/** Create an element with an optional class and style map. */
|
|
12169
|
-
declare function createEl<K extends keyof HTMLElementTagNameMap>(doc: Document, tag: K, className?: string, style?: CssStyleMap): HTMLElementTagNameMap[K];
|
|
12717
|
+
export declare function createEl<K extends keyof HTMLElementTagNameMap>(doc: Document, tag: K, className?: string, style?: CssStyleMap): HTMLElementTagNameMap[K];
|
|
12170
12718
|
/** Create a namespaced SVG element with optional attributes. */
|
|
12171
|
-
declare function createSvgEl<K extends keyof SVGElementTagNameMap>(doc: Document, tag: K, attrs?: Record<string, string | number | undefined>): SVGElementTagNameMap[K];
|
|
12719
|
+
export declare function createSvgEl<K extends keyof SVGElementTagNameMap>(doc: Document, tag: K, attrs?: Record<string, string | number | undefined>): SVGElementTagNameMap[K];
|
|
12172
12720
|
//#endregion
|
|
12173
12721
|
//#region src/viewer/render/slide-stage.d.ts
|
|
12174
12722
|
interface SlideStageOptions {
|
|
@@ -12269,7 +12817,7 @@ interface SlideStageOptions {
|
|
|
12269
12817
|
* unscaled canvas size, so the caller should wrap it in a box sized to
|
|
12270
12818
|
* `canvasSize * scale` (the viewer's stage host and thumbnails both do).
|
|
12271
12819
|
*/
|
|
12272
|
-
declare function renderSlideStage(options: SlideStageOptions): HTMLElement;
|
|
12820
|
+
export declare function renderSlideStage(options: SlideStageOptions): HTMLElement;
|
|
12273
12821
|
//#endregion
|
|
12274
12822
|
//#region src/viewer/render/elements/index.d.ts
|
|
12275
12823
|
/**
|
|
@@ -12280,9 +12828,13 @@ declare function renderSlideStage(options: SlideStageOptions): HTMLElement;
|
|
|
12280
12828
|
* `contentPart`, `zoom`, and `model3d`. Only unknown extension elements fall
|
|
12281
12829
|
* through to the typed placeholder fallback.
|
|
12282
12830
|
*/
|
|
12283
|
-
declare function createDefaultRegistry(): ElementRendererRegistry;
|
|
12831
|
+
export declare function createDefaultRegistry(): ElementRendererRegistry;
|
|
12284
12832
|
//#endregion
|
|
12285
12833
|
//#region src/viewer/state/viewer-state.d.ts
|
|
12834
|
+
/** Why the last password attempt failed; see `checkModifyPassword` (`pptx-viewer-shared`). */
|
|
12835
|
+
type ModifyPasswordErrorReason$1 = Extract<ModifyPasswordCheckResult, {
|
|
12836
|
+
ok: false;
|
|
12837
|
+
}>['reason'];
|
|
12286
12838
|
/** `zoom` is either an explicit scale factor (1 = 100%) or fit-to-viewport. */
|
|
12287
12839
|
type ZoomLevel = number | 'fit';
|
|
12288
12840
|
/**
|
|
@@ -12530,6 +13082,22 @@ interface ViewerState {
|
|
|
12530
13082
|
* keeps the lock, only "Edit anyway" lifts it too.
|
|
12531
13083
|
*/
|
|
12532
13084
|
readOnlyBannerDismissed: boolean;
|
|
13085
|
+
/**
|
|
13086
|
+
* The loaded deck's raw `p:modifyVerifier`, kept alongside
|
|
13087
|
+
* {@link readOnlyRecommendation} so `submitReadOnlyPassword` can check a
|
|
13088
|
+
* candidate password against it (`checkModifyPassword`, `pptx-viewer-shared`).
|
|
13089
|
+
*/
|
|
13090
|
+
modifyVerifier?: PptxModifyVerifier;
|
|
13091
|
+
/**
|
|
13092
|
+
* Whether the read-only recommendation banner's inline password prompt is
|
|
13093
|
+
* open (replaces "Edit anyway"/"Dismiss" while true). Only reachable when
|
|
13094
|
+
* `readOnlyRecommendation.requiresPassword` is set.
|
|
13095
|
+
*/
|
|
13096
|
+
readOnlyPasswordPromptOpen: boolean;
|
|
13097
|
+
/** Reason the last password attempt failed, or null before any attempt / after success. */
|
|
13098
|
+
readOnlyPasswordError: ModifyPasswordErrorReason$1 | null;
|
|
13099
|
+
/** True while a submitted password is being checked; disables the form. */
|
|
13100
|
+
readOnlyCheckingPassword: boolean;
|
|
12533
13101
|
/**
|
|
12534
13102
|
* Compatibility-warning toasts for the current load (deck-level
|
|
12535
13103
|
* `data.warnings` concatenated with every slide's own `warnings`, deduped
|
|
@@ -12539,7 +13107,7 @@ interface ViewerState {
|
|
|
12539
13107
|
*/
|
|
12540
13108
|
compatToasts: CompatibilityWarningToast[];
|
|
12541
13109
|
}
|
|
12542
|
-
declare function createInitialViewerState(): ViewerState;
|
|
13110
|
+
export declare function createInitialViewerState(): ViewerState;
|
|
12543
13111
|
//#endregion
|
|
12544
13112
|
//#region src/viewer/editor/editor-animation-actions.d.ts
|
|
12545
13113
|
/**
|
|
@@ -12598,6 +13166,8 @@ interface AnimationActions {
|
|
|
12598
13166
|
dataUrl: string;
|
|
12599
13167
|
fileName?: string;
|
|
12600
13168
|
} | undefined): void;
|
|
13169
|
+
/** Stage one of PowerPoint's 19 built-in stock sounds by catalogue id. */
|
|
13170
|
+
setAnimationStockSound(elementId: string, catalogueId: string): void;
|
|
12601
13171
|
reorderAnimation(elementId: string, direction: 'up' | 'down'): void;
|
|
12602
13172
|
moveAnimation(elementId: string, index: number): void;
|
|
12603
13173
|
}
|
|
@@ -12811,6 +13381,8 @@ interface InspectorActions {
|
|
|
12811
13381
|
setTitle(text: string): void;
|
|
12812
13382
|
/** Set the selected OLE element's Object Name (`p:oleObj/@name`). */
|
|
12813
13383
|
setOleName(name: string): void;
|
|
13384
|
+
/** Patch an in-place OLE content edit (see `InspectorHandlers.setOleContent`). */
|
|
13385
|
+
setOleContent(patch: Partial<OlePptxElement>): void;
|
|
12814
13386
|
setChartData(data: PptxChartData): void;
|
|
12815
13387
|
setMediaProperties(patch: Partial<MediaPptxElement>): void;
|
|
12816
13388
|
setTableHeaderRow(enabled: boolean): void;
|
|
@@ -13079,6 +13651,12 @@ interface InspectorState {
|
|
|
13079
13651
|
oleIsLinked: boolean;
|
|
13080
13652
|
/** The OLE object's author-assigned name (`p:oleObj/@name`), if any. */
|
|
13081
13653
|
oleName: string | undefined;
|
|
13654
|
+
/**
|
|
13655
|
+
* The full selected OLE element, feeding the "Edit content" dialog (which
|
|
13656
|
+
* needs `oleEmbeddedData`/`oleFileExtension`/`oleShowAsIcon` etc., not just
|
|
13657
|
+
* the flattened fields above). `undefined` when the selection isn't OLE.
|
|
13658
|
+
*/
|
|
13659
|
+
oleElement: OlePptxElement | undefined;
|
|
13082
13660
|
x: number;
|
|
13083
13661
|
y: number;
|
|
13084
13662
|
width: number;
|
|
@@ -13131,12 +13709,13 @@ interface InspectorState {
|
|
|
13131
13709
|
/** The selected element's accessibility title (`p:cNvPr/@title`), if any. */
|
|
13132
13710
|
title: string;
|
|
13133
13711
|
/**
|
|
13134
|
-
* Whether the
|
|
13135
|
-
*
|
|
13136
|
-
*
|
|
13137
|
-
*
|
|
13712
|
+
* Whether the Accessibility section's own alt-text/title editor should
|
|
13713
|
+
* show for the current selection: true for a plain shape, text box,
|
|
13714
|
+
* connector, and every graphic-frame kind (table/chart/smartArt/media/ole).
|
|
13715
|
+
* A picture's alt text has its own field in the Image section instead.
|
|
13716
|
+
* See shared's `shouldShowAccessibilitySection`.
|
|
13138
13717
|
*/
|
|
13139
|
-
|
|
13718
|
+
showAccessibilitySection: boolean;
|
|
13140
13719
|
chartData?: PptxChartData;
|
|
13141
13720
|
/**
|
|
13142
13721
|
* The on-canvas chart part selection, scoped to the selected chart element:
|
|
@@ -13366,6 +13945,7 @@ interface RibbonFileHandlers {
|
|
|
13366
13945
|
save(): void;
|
|
13367
13946
|
saveAsPpsx(): void;
|
|
13368
13947
|
saveAsPptm(): void;
|
|
13948
|
+
saveAsPpt(): void;
|
|
13369
13949
|
exportPng(): void;
|
|
13370
13950
|
copySlideAsImage(): void;
|
|
13371
13951
|
exportPdf(): void;
|
|
@@ -13625,6 +14205,10 @@ interface PresentationTouchControls {
|
|
|
13625
14205
|
update(current: number, total: number): void;
|
|
13626
14206
|
}
|
|
13627
14207
|
//#endregion
|
|
14208
|
+
//#region src/viewer/ui/read-only-banner.d.ts
|
|
14209
|
+
/** Why the last password attempt failed; see `checkModifyPassword` (`pptx-viewer-shared`). */
|
|
14210
|
+
type ModifyPasswordErrorReason = 'wrong-password' | 'unsupported-algorithm';
|
|
14211
|
+
//#endregion
|
|
13628
14212
|
//#region src/viewer/ui/ribbon/tabs/view-tab.d.ts
|
|
13629
14213
|
/** The View > Show toggles, as the viewer state currently holds them. */
|
|
13630
14214
|
interface ViewToggleState {
|
|
@@ -13683,7 +14267,7 @@ interface Ribbon {
|
|
|
13683
14267
|
* never called, and a hidden button/cluster inside a tab is never built by
|
|
13684
14268
|
* that tab's own module (see `ribbon-types.ts` handlers vs. this file).
|
|
13685
14269
|
*/
|
|
13686
|
-
declare function createRibbon(doc: Document, t: Translator, handlers: RibbonHandlers, hiddenActions?: readonly ToolbarActionId[], accountAuth?: AccountAuthConfig): Ribbon;
|
|
14270
|
+
export declare function createRibbon(doc: Document, t: Translator, handlers: RibbonHandlers, hiddenActions?: readonly ToolbarActionId[], accountAuth?: AccountAuthConfig): Ribbon;
|
|
13687
14271
|
//#endregion
|
|
13688
14272
|
//#region src/viewer/ui/shortcut-panel.d.ts
|
|
13689
14273
|
interface ShortcutPanel {
|
|
@@ -13810,7 +14394,11 @@ interface ViewerChrome {
|
|
|
13810
14394
|
/** Show/hide the Protected View "Enable Editing" banner. */
|
|
13811
14395
|
setProtectedView(active: boolean): void;
|
|
13812
14396
|
/** Show/hide + populate the read-only recommendation banner. */
|
|
13813
|
-
setReadOnlyRecommendation(recommendation: ReadOnlyRecommendation | null, dismissed: boolean
|
|
14397
|
+
setReadOnlyRecommendation(recommendation: ReadOnlyRecommendation | null, dismissed: boolean, passwordState: {
|
|
14398
|
+
promptOpen: boolean;
|
|
14399
|
+
error: ModifyPasswordErrorReason | null;
|
|
14400
|
+
checking: boolean;
|
|
14401
|
+
}): void;
|
|
13814
14402
|
/** Replace the compatibility-warning toast stack. */
|
|
13815
14403
|
setCompatToasts(toasts: readonly CompatibilityWarningToast[]): void;
|
|
13816
14404
|
}
|
|
@@ -13905,6 +14493,18 @@ interface SyncStageParams {
|
|
|
13905
14493
|
* already complete.
|
|
13906
14494
|
*/
|
|
13907
14495
|
seedCompleted?: boolean;
|
|
14496
|
+
/**
|
|
14497
|
+
* The slide canvas size (px), in the same unit the elements' own
|
|
14498
|
+
* `x`/`y`/`width`/`height` are authored in. Lets `PresentationAnimationController
|
|
14499
|
+
* .fromSlide` resolve a `p:anim` formula that needs the animated shape's real
|
|
14500
|
+
* box (e.g. Grow And Turn's `-#ppt_w/2` fly-in) instead of falling back.
|
|
14501
|
+
*/
|
|
14502
|
+
canvasSize?: {
|
|
14503
|
+
width: number;
|
|
14504
|
+
height: number;
|
|
14505
|
+
};
|
|
14506
|
+
/** The deck's resolved theme colour map, for a scheme-colour (`a:schemeClr`) animation stop. */
|
|
14507
|
+
themeColorMap?: Readonly<Record<string, string>>;
|
|
13908
14508
|
}
|
|
13909
14509
|
/**
|
|
13910
14510
|
* The presentation-mode playback state machine for the vanilla binding, driven
|
|
@@ -14210,7 +14810,7 @@ interface PptxAiBridge {
|
|
|
14210
14810
|
* module is that dictionary for the demos, shared so all three stay in sync
|
|
14211
14811
|
* instead of drifting into three separate copies.
|
|
14212
14812
|
*/
|
|
14213
|
-
declare const translationsEn: Record<string, string>;
|
|
14813
|
+
export declare const translationsEn: Record<string, string>;
|
|
14214
14814
|
/**
|
|
14215
14815
|
* Every key in the English dictionary. A new locale dictionary typed as
|
|
14216
14816
|
* `Record<TranslationKey, string>` gets a compile error for any key it's
|
|
@@ -14223,7 +14823,7 @@ type TranslationKey = keyof typeof translationsEn;
|
|
|
14223
14823
|
* explicit dictionary entry exists yet. Takes the last segment and converts
|
|
14224
14824
|
* camelCase to Title Case, e.g. "pptx.slideSorter.zoomIn" -> "Zoom In".
|
|
14225
14825
|
*/
|
|
14226
|
-
declare function keyToLabel(key: string): string;
|
|
14826
|
+
export declare function keyToLabel(key: string): string;
|
|
14227
14827
|
//#endregion
|
|
14228
14828
|
//#region src/i18n/locale-catalog.d.ts
|
|
14229
14829
|
/** One selectable entry in the viewer chrome's built-in language picker (File > Options > Language). */
|
|
@@ -14386,9 +14986,9 @@ interface ExportPdfOptions {
|
|
|
14386
14986
|
//#endregion
|
|
14387
14987
|
//#region src/viewer/export/export-svg.d.ts
|
|
14388
14988
|
/** Export one parsed slide as resolution-independent SVG markup. */
|
|
14389
|
-
declare function exportSlideToSvg(slide: PptxSlide, width: number, height: number, options?: SvgExportOptions): string;
|
|
14989
|
+
export declare function exportSlideToSvg(slide: PptxSlide, width: number, height: number, options?: SvgExportOptions): string;
|
|
14390
14990
|
/** Export the selected slides in a parsed presentation as SVG markup. */
|
|
14391
|
-
declare function exportAllSlidesToSvg(data: PptxData, options?: SvgExportOptions): string[];
|
|
14991
|
+
export declare function exportAllSlidesToSvg(data: PptxData, options?: SvgExportOptions): string[];
|
|
14392
14992
|
//#endregion
|
|
14393
14993
|
//#region src/viewer/export/render-to-canvas.d.ts
|
|
14394
14994
|
/**
|
|
@@ -14402,7 +15002,7 @@ declare function exportAllSlidesToSvg(data: PptxData, options?: SvgExportOptions
|
|
|
14402
15002
|
* per-binding. `html2canvas-pro` is imported dynamically so it stays out of
|
|
14403
15003
|
* the main bundle until export is actually used.
|
|
14404
15004
|
*/
|
|
14405
|
-
declare function renderToCanvas(element: HTMLElement, options?: Partial<Options>): Promise<HTMLCanvasElement>;
|
|
15005
|
+
export declare function renderToCanvas(element: HTMLElement, options?: Partial<Options>): Promise<HTMLCanvasElement>;
|
|
14406
15006
|
//#endregion
|
|
14407
15007
|
//#region src/viewer/load/source.d.ts
|
|
14408
15008
|
/**
|
|
@@ -14854,6 +15454,10 @@ interface ChromeHost {
|
|
|
14854
15454
|
editAnywayFromReadOnlyRecommendation(): void;
|
|
14855
15455
|
/** The read-only recommendation banner's plain close button. */
|
|
14856
15456
|
dismissReadOnlyBanner(): void;
|
|
15457
|
+
/** The read-only recommendation banner's password form submit. */
|
|
15458
|
+
submitReadOnlyPassword(password: string): void;
|
|
15459
|
+
/** The read-only recommendation banner's password form "Cancel". */
|
|
15460
|
+
cancelReadOnlyPasswordPrompt(): void;
|
|
14857
15461
|
/** One compatibility toast's own dismiss button. */
|
|
14858
15462
|
dismissCompatToast(id: string): void;
|
|
14859
15463
|
/** The compatibility toast stack's "Dismiss all" button. */
|
|
@@ -15001,7 +15605,7 @@ declare abstract class ViewerExportHost implements ViewerExportApi {
|
|
|
15001
15605
|
* builds chrome inside `container`, loads `options.source` when given, and
|
|
15002
15606
|
* re-renders through a tiny reactive store.
|
|
15003
15607
|
*/
|
|
15004
|
-
declare class PptxViewer extends ViewerExportHost implements PptxViewerInstance, ChromeHost {
|
|
15608
|
+
export declare class PptxViewer extends ViewerExportHost implements PptxViewerInstance, ChromeHost {
|
|
15005
15609
|
readonly container: HTMLElement;
|
|
15006
15610
|
readonly doc: Document;
|
|
15007
15611
|
readonly options: PptxViewerOptions;
|
|
@@ -15268,10 +15872,25 @@ declare class PptxViewer extends ViewerExportHost implements PptxViewerInstance,
|
|
|
15268
15872
|
* The read-only recommendation banner's "Edit anyway" button
|
|
15269
15873
|
* (`p:modifyVerifier` / "Mark as Final"): lifts the lock and hides the
|
|
15270
15874
|
* banner, unlike plain dismiss which only hides it.
|
|
15875
|
+
*
|
|
15876
|
+
* When the recommendation's `requiresPassword` is set (a `modifyVerifier`
|
|
15877
|
+
* with a hash this viewer can check), this opens the inline password
|
|
15878
|
+
* prompt instead of unlocking immediately: PowerPoint's own "read-only
|
|
15879
|
+
* recommended" prompt keeps the deck locked until the correct password is
|
|
15880
|
+
* entered, and a wrong one leaves it locked.
|
|
15271
15881
|
*/
|
|
15272
15882
|
editAnywayFromReadOnlyRecommendation(): void;
|
|
15273
15883
|
/** The read-only recommendation banner's plain close button: hides the banner, keeps the lock. */
|
|
15274
15884
|
dismissReadOnlyBanner(): void;
|
|
15885
|
+
/** The read-only recommendation banner's password form "Cancel": closes the prompt without unlocking. */
|
|
15886
|
+
cancelReadOnlyPasswordPrompt(): void;
|
|
15887
|
+
/**
|
|
15888
|
+
* Check `password` against the deck's `modifyVerifier`
|
|
15889
|
+
* (`checkModifyPassword`, `pptx-viewer-shared`); unlocks and closes the
|
|
15890
|
+
* prompt on a match, otherwise leaves the deck locked and reports why.
|
|
15891
|
+
*/
|
|
15892
|
+
submitReadOnlyPassword(password: string): void;
|
|
15893
|
+
private checkReadOnlyPassword;
|
|
15275
15894
|
/** One compatibility toast's own dismiss button. */
|
|
15276
15895
|
dismissCompatToast(id: string): void;
|
|
15277
15896
|
/** The compatibility toast stack's "Dismiss all" button. */
|
|
@@ -15382,11 +16001,11 @@ declare class PptxViewer extends ViewerExportHost implements PptxViewerInstance,
|
|
|
15382
16001
|
private remountChrome;
|
|
15383
16002
|
}
|
|
15384
16003
|
/** Create a PowerPoint viewer inside `container` (see {@link PptxViewerOptions}). */
|
|
15385
|
-
declare function createPptxViewer(container: HTMLElement, options?: PptxViewerOptions): PptxViewerInstance;
|
|
16004
|
+
export declare function createPptxViewer(container: HTMLElement, options?: PptxViewerOptions): PptxViewerInstance;
|
|
15386
16005
|
//#endregion
|
|
15387
16006
|
//#region src/viewer/styles/inject.d.ts
|
|
15388
16007
|
/** The complete viewer stylesheet text (for hosts that self-manage CSS). */
|
|
15389
|
-
declare function getViewerCss(): string;
|
|
16008
|
+
export declare function getViewerCss(): string;
|
|
15390
16009
|
//#endregion
|
|
15391
|
-
export { type AccountAuthConfig, type AutosaveRecord, type AutosaveStatus, type CollaborationConfig, type CollaborationRole, type CollaborationTransport, type ConnectionStatus, type CssStyleMap, type EditActions, type ElementRenderContext, type ElementRenderer, type ElementRendererRegistry, type ExportGifOptions, type ExportPdfOptions, type ExportProgress, type ExportVideoOptions, type FindReplaceActions, type OpenPrintWindow,
|
|
16010
|
+
export { type AccountAuthConfig, type AutosaveRecord, type AutosaveStatus, type CollaborationConfig, type CollaborationRole, type CollaborationTransport, type ConnectionStatus, type CssStyleMap, type EditActions, type ElementRenderContext, type ElementRenderer, type ElementRendererRegistry, type ExportGifOptions, type ExportPdfOptions, type ExportProgress, type ExportVideoOptions, type FindReplaceActions, type OpenPrintWindow, type PptxAiBridge, type PptxAiConfig, type PptxAiConnection, type PptxAiContextStrategy, type PptxAiToolName, type PptxAiWritePolicy, type PptxElement, type PptxElementType, type PptxHandler, type PptxSlide, type PptxViewerCallbacks, type PptxViewerInstance, type PptxViewerOptions, type PptxViewerSource, type PrintOptions, type Ribbon, type RibbonDesignHandlers, type RibbonDrawHandlers, type RibbonDrawState, type RibbonEditState, type RibbonFileHandlers, type RibbonHandlers, type RibbonInsertHandlers, type RibbonNavHandlers, type RibbonNavState, type RibbonPrimaryHandlers, type RibbonSelectionState, type RibbonSlideShowHandlers, type RibbonTabId, type SavedPresentationFormat, type SessionDeck, type SlideStageOptions, type Store, type SvgExportOptions, type ToolbarActionId, type TranslationKey, type TranslationMessages, type Translator, type ViewerState, type ViewerTheme, type ViewerThemeColors, type ZoomLevel, defaultCssVars, defaultRadius, defaultThemeColors, themeToCssVars, vermilionDarkTheme, vermilionLightTheme };
|
|
15392
16011
|
//# sourceMappingURL=index.d.ts.map
|