pptx-vanilla-viewer 2.8.0 → 2.9.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 +8 -0
- package/dist/ai-panel-OJWWPQW3.cjs +1 -0
- package/dist/ai-panel-P3F5MPDN.js +1 -0
- package/dist/chunk-H54T5LVL.js +2579 -0
- package/dist/chunk-O224FLRL.cjs +2579 -0
- package/dist/index.cjs +121 -68
- package/dist/index.d.ts +486 -88
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +120 -67
- package/dist/smartart-3d-4XR267AX.cjs +1 -0
- package/dist/smartart-3d-5ELDYNIY.js +1 -0
- package/dist/styles.css +53 -0
- package/package.json +2 -2
- 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-BtHy_zMG.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,6 +3133,14 @@ 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';
|
|
@@ -3131,7 +3217,7 @@ interface PptxChartAxisFormatting extends PptxChartAxisLabelFormatting {
|
|
|
3131
3217
|
axPos?: 'b' | 'l' | 'r' | 't';
|
|
3132
3218
|
/** Unique axis identifier (c:axId/@val) used to link series to axes. */
|
|
3133
3219
|
axisId?: number;
|
|
3134
|
-
/** Cross-axis identifier
|
|
3220
|
+
/** Cross-axis identifier: the axis this axis crosses. */
|
|
3135
3221
|
crossAxisId?: number;
|
|
3136
3222
|
/** Automatic crossing mode (`c:crosses`). Mutually exclusive with `crossesAt`. */
|
|
3137
3223
|
crosses?: 'autoZero' | 'min' | 'max';
|
|
@@ -3383,6 +3469,54 @@ interface PptxChartSeries {
|
|
|
3383
3469
|
waterfallOptions?: PptxChartWaterfallOptions;
|
|
3384
3470
|
regionMapOptions?: PptxChartRegionMapOptions;
|
|
3385
3471
|
treemapOptions?: PptxChartTreemapOptions;
|
|
3472
|
+
/**
|
|
3473
|
+
* Series-level picture-fill flags (`c:ser/c:pictureOptions`), legal
|
|
3474
|
+
* wherever a per-point `c:dPt/c:pictureOptions` is (CT_BarSer): paints
|
|
3475
|
+
* EVERY point in the series with one picture unless a `c:dPt` overrides it
|
|
3476
|
+
* for that point alone. A point's own {@link PptxChartDataPoint.picture}
|
|
3477
|
+
* takes precedence entirely (not merged field-by-field) when it resolves
|
|
3478
|
+
* its own image; renderers fall back to this series-level picture only
|
|
3479
|
+
* when the point has none of its own.
|
|
3480
|
+
*/
|
|
3481
|
+
picture?: PptxChartDataPointPicture;
|
|
3482
|
+
/**
|
|
3483
|
+
* This series' identity GUID (`c:ser/c:extLst/c:ext/c16:uniqueId/@val`,
|
|
3484
|
+
* the Office 2014+ `{C3380CC4-5D6E-409C-BE32-E72D297353CC}` chart
|
|
3485
|
+
* extension). PowerPoint uses it to track a series across edits and
|
|
3486
|
+
* collaborators independent of its `c:idx`/`c:order` position (the same
|
|
3487
|
+
* role animation targeting and CRDT reconciliation need). An edited
|
|
3488
|
+
* existing series keeps its own `c:extLst` as passthrough; a NEW series
|
|
3489
|
+
* added by cloning an existing one as a template is given a freshly
|
|
3490
|
+
* generated id rather than duplicating the template's (see
|
|
3491
|
+
* `regenerateClonedUniqueId` in `chart-series-identity.ts`), since two
|
|
3492
|
+
* series sharing one identity is exactly what this extension exists to
|
|
3493
|
+
* prevent.
|
|
3494
|
+
*/
|
|
3495
|
+
uniqueId?: string;
|
|
3496
|
+
}
|
|
3497
|
+
/**
|
|
3498
|
+
* A series PowerPoint's "Chart Filters" feature hid from the plot while
|
|
3499
|
+
* keeping it in the workbook (`c:<type>Chart/c:extLst/c:ext
|
|
3500
|
+
* [@uri={02D57815-91ED-43cb-92C2-25804820EDAC}]/c15:filtered<Type>Series
|
|
3501
|
+
* /c15:ser`). Read-mostly: {@link PptxChartData.filteredSeries} exists for
|
|
3502
|
+
* introspection (AI tools, "unhide filtered series" UI) and round-trips as
|
|
3503
|
+
* passthrough through the preserved chart XML when untouched. See
|
|
3504
|
+
* `utils/chart-filtered-series.ts` for the parse rules and the idx-collision
|
|
3505
|
+
* fix this modelling enables on save.
|
|
3506
|
+
*/
|
|
3507
|
+
interface PptxChartFilteredSeries {
|
|
3508
|
+
/** `c15:ser/c:idx/@val`, the workbook column position this series still occupies. */
|
|
3509
|
+
idx: number;
|
|
3510
|
+
/** `c15:ser/c:order/@val`, defaulting to {@link idx} when absent. */
|
|
3511
|
+
order: number;
|
|
3512
|
+
/** Series name, from the hidden series' own `c:tx` cache. */
|
|
3513
|
+
name?: string;
|
|
3514
|
+
/** Category labels, from the hidden series' own `c:cat` cache. */
|
|
3515
|
+
categories?: string[];
|
|
3516
|
+
/** Data values, from the hidden series' own `c:val` cache. */
|
|
3517
|
+
values?: number[];
|
|
3518
|
+
/** This hidden series' own identity GUID (`c16:uniqueId`), when present. */
|
|
3519
|
+
uniqueId?: string;
|
|
3386
3520
|
}
|
|
3387
3521
|
/**
|
|
3388
3522
|
* Chart-level data-label options (`c:dLbls` directly under a chart-type
|
|
@@ -3406,6 +3540,19 @@ interface PptxChartDataLabelOptions {
|
|
|
3406
3540
|
separator?: string;
|
|
3407
3541
|
/** Show leader lines where supported (`c:showLeaderLines`). */
|
|
3408
3542
|
showLeaderLines?: boolean;
|
|
3543
|
+
/**
|
|
3544
|
+
* Leader-line stroke styling for offset (pie/doughnut `outEnd`/`bestFit`)
|
|
3545
|
+
* labels. Resolved from the base `c:leaderLines/c:spPr` when present, else
|
|
3546
|
+
* falling back to the Office 2013+ chart15 extension's mirror
|
|
3547
|
+
* (`c:extLst/c:ext/c15:leaderLines/c:spPr`, uri
|
|
3548
|
+
* `{CE6537A1-D6FC-4f65-9D91-7224C49458BB}`), which is the one PowerPoint
|
|
3549
|
+
* itself treats as authoritative when both are present. Confirmed against
|
|
3550
|
+
* `e2e/fixtures/issue-132-gradient-fill.pptx` and
|
|
3551
|
+
* `e2e/fixtures/issue-132-hr-deck.pptx`, both of which write only the
|
|
3552
|
+
* extension form. `undefined` leaves the renderer's own default leader-line
|
|
3553
|
+
* stroke.
|
|
3554
|
+
*/
|
|
3555
|
+
leaderLineStyle?: PptxChartShapeProps;
|
|
3409
3556
|
/**
|
|
3410
3557
|
* Label position (`c:dLblPos`). Valid values depend on the chart type
|
|
3411
3558
|
* (`ctr`, `inEnd`, `inBase`, `outEnd`, `bestFit`, `l`, `r`, `t`, `b`).
|
|
@@ -3559,12 +3706,12 @@ interface PptxBubbleChartOptions {
|
|
|
3559
3706
|
*
|
|
3560
3707
|
* All fields are optional and round-trip verbatim.
|
|
3561
3708
|
*
|
|
3562
|
-
* - {@link rotX}
|
|
3563
|
-
* - {@link rotY}
|
|
3564
|
-
* - {@link depthPercent}
|
|
3565
|
-
* - {@link rAngAx}
|
|
3566
|
-
* - {@link perspective}
|
|
3567
|
-
* - {@link hPercent}
|
|
3709
|
+
* - {@link rotX}: X-axis rotation in degrees (-90…90).
|
|
3710
|
+
* - {@link rotY}: Y-axis rotation in degrees (0…360).
|
|
3711
|
+
* - {@link depthPercent}: chart depth as a percentage of base width.
|
|
3712
|
+
* - {@link rAngAx}: `true` if axes meet at right angles.
|
|
3713
|
+
* - {@link perspective}: perspective angle in degrees (0…240).
|
|
3714
|
+
* - {@link hPercent}: height as a percentage of chart width.
|
|
3568
3715
|
*/
|
|
3569
3716
|
interface PptxChartView3D {
|
|
3570
3717
|
rotX?: number;
|
|
@@ -3578,12 +3725,17 @@ interface PptxChartView3D {
|
|
|
3578
3725
|
* Chart "chrome" flags from `c:chart` that round-trip cleanly even when
|
|
3579
3726
|
* rendering ignores them.
|
|
3580
3727
|
*
|
|
3581
|
-
* - {@link autoTitleDeleted}
|
|
3728
|
+
* - {@link autoTitleDeleted}: `c:autoTitleDeleted/@val`. Suppresses the
|
|
3582
3729
|
* auto-generated title for single-series charts.
|
|
3583
|
-
* - {@link dispBlanksAs}
|
|
3730
|
+
* - {@link dispBlanksAs}: `c:dispBlanksAs/@val`. How blank cells
|
|
3584
3731
|
* render: `"gap"`, `"zero"`, or `"span"`.
|
|
3585
|
-
* - {@link showDLblsOverMax}
|
|
3732
|
+
* - {@link showDLblsOverMax}: `c:showDLblsOverMax/@val`. Keeps data
|
|
3586
3733
|
* labels visible for points exceeding the value-axis maximum.
|
|
3734
|
+
* - {@link dispNaAsBlank}: the Office 2017+ chart extension
|
|
3735
|
+
* `c:extLst/c:ext/c16r3:dataDisplayOptions16/c16r3:dispNaAsBlank/@val`
|
|
3736
|
+
* (uri `{56B9EC1D-385E-4148-901F-78D8002777C0}`), PowerPoint's "Show #N/A
|
|
3737
|
+
* as an empty cell" chart option. Confirmed against real corpus markup
|
|
3738
|
+
* (`e2e/fixtures/chart-data-fidelity.pptx`).
|
|
3587
3739
|
*
|
|
3588
3740
|
* `c:plotVisOnly` lives on {@link PptxChartData.plotVisibleOnly} and is
|
|
3589
3741
|
* intentionally not duplicated here.
|
|
@@ -3592,6 +3744,7 @@ interface PptxChartChrome {
|
|
|
3592
3744
|
autoTitleDeleted?: boolean;
|
|
3593
3745
|
dispBlanksAs?: 'gap' | 'zero' | 'span';
|
|
3594
3746
|
showDLblsOverMax?: boolean;
|
|
3747
|
+
dispNaAsBlank?: boolean;
|
|
3595
3748
|
}
|
|
3596
3749
|
/** Manual chart placement from `c:layout/c:manualLayout` (CT_ManualLayout). */
|
|
3597
3750
|
interface PptxChartManualLayout {
|
|
@@ -3687,6 +3840,13 @@ interface PptxChartData {
|
|
|
3687
3840
|
categoryLevels?: string[][];
|
|
3688
3841
|
dateCategories?: PptxChartDateCategories;
|
|
3689
3842
|
series: PptxChartSeries[];
|
|
3843
|
+
/**
|
|
3844
|
+
* Series hidden from the plot by PowerPoint's "Chart Filters" feature
|
|
3845
|
+
* (Series tab) but still present in the workbook, aggregated across every
|
|
3846
|
+
* chart-type container (combo charts can carry more than one). Absent
|
|
3847
|
+
* when the chart has no such extension. See {@link PptxChartFilteredSeries}.
|
|
3848
|
+
*/
|
|
3849
|
+
filteredSeries?: PptxChartFilteredSeries[];
|
|
3690
3850
|
/** Chart style/formatting metadata. */
|
|
3691
3851
|
style?: PptxChartStyle;
|
|
3692
3852
|
/** Grouping mode for bar/area/line charts: 'clustered' | 'stacked' | 'percentStacked' */
|
|
@@ -3810,9 +3970,9 @@ interface PptxChartData {
|
|
|
3810
3970
|
/**
|
|
3811
3971
|
* Color cycling method from the chart color style part's `meth` attribute.
|
|
3812
3972
|
*
|
|
3813
|
-
* - `"cycle"
|
|
3814
|
-
* - `"withinLinear"
|
|
3815
|
-
* - `"acrossLinear"
|
|
3973
|
+
* - `"cycle"`: repeat the palette colours in order (default)
|
|
3974
|
+
* - `"withinLinear"`: gradient within each series
|
|
3975
|
+
* - `"acrossLinear"`: gradient across series
|
|
3816
3976
|
*/
|
|
3817
3977
|
colorMethod?: 'cycle' | 'withinLinear' | 'acrossLinear';
|
|
3818
3978
|
/** Internal source color-style part path used for lossless dirty saves. */
|
|
@@ -6375,13 +6535,14 @@ interface MediaPptxElement extends PptxElementBase {
|
|
|
6375
6535
|
*/
|
|
6376
6536
|
isLinked?: boolean;
|
|
6377
6537
|
/**
|
|
6378
|
-
* Accessibility description from `p:nvGraphicFramePr/p:cNvPr/@descr
|
|
6379
|
-
*
|
|
6380
|
-
*
|
|
6381
|
-
*
|
|
6538
|
+
* Accessibility description. Read from `p:nvGraphicFramePr/p:cNvPr/@descr`
|
|
6539
|
+
* for the `p:graphicFrame`-shaped (SDK-created) media form, or from
|
|
6540
|
+
* `p:nvPicPr/p:cNvPr/@descr` for the `p:pic`-shaped media form (real
|
|
6541
|
+
* PowerPoint's usual authoring shape for a video/audio placeholder); see
|
|
6542
|
+
* `PptxHandlerRuntimePictureParsing.ts`.
|
|
6382
6543
|
*/
|
|
6383
6544
|
altText?: string;
|
|
6384
|
-
/** Accessibility title from `p:
|
|
6545
|
+
/** Accessibility title, from the same `@title` attribute on whichever `p:cNvPr` the media form uses. Same scope note as {@link altText}. */
|
|
6385
6546
|
title?: string;
|
|
6386
6547
|
/** Unrecognised graphicFrame extLst extensions, captured verbatim for round-trip. */
|
|
6387
6548
|
extensionXml?: PptxGraphicFrameExtension[];
|
|
@@ -6408,6 +6569,46 @@ interface GroupPptxElement extends PptxElementBase {
|
|
|
6408
6569
|
children: PptxElement[];
|
|
6409
6570
|
/** Fill style extracted from the group's `p:grpSpPr`, used for `a:grpFill` inheritance. */
|
|
6410
6571
|
groupFill?: ShapeStyle;
|
|
6572
|
+
/**
|
|
6573
|
+
* The SAME `p:grpSpPr` extraction as {@link groupFill}, kept whenever the
|
|
6574
|
+
* group carries a `p:grpSpPr` at all, regardless of whether it resolved to
|
|
6575
|
+
* a paintable fill.
|
|
6576
|
+
*
|
|
6577
|
+
* `groupFill` is `undefined` unless the group has a real fill, because
|
|
6578
|
+
* `getGroupChildParentFill`/`groupChildInheritedFill` (the `a:grpFill`
|
|
6579
|
+
* inheritance chain) must keep chaining through an ancestor's fill when
|
|
6580
|
+
* THIS group has none of its own. A group whose `p:grpSpPr` authors only
|
|
6581
|
+
* `a:effectLst` (shadow/glow/soft-edge/reflection, no fill) needs those
|
|
6582
|
+
* effects to still reach the renderer, so they are kept here under a name
|
|
6583
|
+
* that carries no fill-inheritance meaning. Currently only reflection is
|
|
6584
|
+
* read from it (`getComputedEffectStyle`); the rest of `a:effectLst` on a
|
|
6585
|
+
* group remains unsupported.
|
|
6586
|
+
*/
|
|
6587
|
+
groupEffectStyle?: ShapeStyle;
|
|
6588
|
+
/**
|
|
6589
|
+
* Exact EMU the group's own `a:chOff`/`a:chExt` (the coordinate space its
|
|
6590
|
+
* CHILDREN are authored in) were parsed from, alongside {@link
|
|
6591
|
+
* PptxElementBase.xEmu} etc for the group's own placement in its PARENT's
|
|
6592
|
+
* space. `undefined` when the source carried no usable `a:chOff`/`a:chExt`
|
|
6593
|
+
* (an SDK-created group, or one whose `a:xfrm` had no child-space data).
|
|
6594
|
+
*
|
|
6595
|
+
* Used by `group-xfrm-preservation.ts`'s `hasCapturedChildSpace` to decide
|
|
6596
|
+
* whether this group's original `a:chOff`/`a:chExt` can be re-emitted
|
|
6597
|
+
* verbatim (always true once captured, regardless of whether anything in
|
|
6598
|
+
* the subtree has moved or resized - only its DIRECT children's
|
|
6599
|
+
* `a:off`/`a:ext` are recomputed, via `invertChildIntoGroupSpace`, when
|
|
6600
|
+
* something changed), instead of the normalized `chOff 0,0` / `chExt ==
|
|
6601
|
+
* ext` space the writer falls back to when this is `undefined` (or
|
|
6602
|
+
* degenerate). See `group-shape-geometry.ts`'s module doc for why a group
|
|
6603
|
+
* needs two coordinate systems at all.
|
|
6604
|
+
*/
|
|
6605
|
+
chOffXEmu?: number;
|
|
6606
|
+
/** See {@link chOffXEmu}. */
|
|
6607
|
+
chOffYEmu?: number;
|
|
6608
|
+
/** See {@link chOffXEmu}. */
|
|
6609
|
+
chExtWidthEmu?: number;
|
|
6610
|
+
/** See {@link chOffXEmu}. */
|
|
6611
|
+
chExtHeightEmu?: number;
|
|
6411
6612
|
}
|
|
6412
6613
|
/**
|
|
6413
6614
|
* A freehand ink / drawing stroke captured with a stylus or mouse.
|
|
@@ -6436,6 +6637,24 @@ interface InkPptxElement extends PptxElementBase {
|
|
|
6436
6637
|
* variable-width strokes that reflect stylus/pen pressure.
|
|
6437
6638
|
*/
|
|
6438
6639
|
inkPointPressures?: number[][];
|
|
6640
|
+
/**
|
|
6641
|
+
* Per-path arrays of per-point pen-tilt lean direction (degrees, straight
|
|
6642
|
+
* from `PointerEvent.tiltX` on supporting hardware).
|
|
6643
|
+
*
|
|
6644
|
+
* Each entry corresponds to the path at the same index in `inkPaths`, and
|
|
6645
|
+
* is paired positionally with {@link inkPointTiltY}. Present only when at
|
|
6646
|
+
* least one point in the stroke reported a genuinely non-zero tilt: a
|
|
6647
|
+
* device that never reports tilt (a mouse, or a stylus with no tilt
|
|
6648
|
+
* sensor) leaves both arrays absent, the same way `inkPointPressures` is
|
|
6649
|
+
* omitted when pressure never varies. When present, the renderer converts
|
|
6650
|
+
* the raw `(tiltX, tiltY)` vector into a lean angle + magnitude (see
|
|
6651
|
+
* `pptx-viewer-shared`'s `tiltChannelsFromVectors`) and widens the stroke
|
|
6652
|
+
* perpendicular to the lean direction, approximating a chisel-tip
|
|
6653
|
+
* calligraphy nib.
|
|
6654
|
+
*/
|
|
6655
|
+
inkPointTiltX?: number[][];
|
|
6656
|
+
/** Per-path, per-point pen-tilt lean direction (degrees), paired with {@link inkPointTiltX}. */
|
|
6657
|
+
inkPointTiltY?: number[][];
|
|
6439
6658
|
/** Unrecognised graphicFrame extLst extensions, captured verbatim for round-trip. */
|
|
6440
6659
|
extensionXml?: PptxGraphicFrameExtension[];
|
|
6441
6660
|
}
|
|
@@ -6469,6 +6688,20 @@ interface ContentPartInkStroke {
|
|
|
6469
6688
|
* {@link tiltAngles}.
|
|
6470
6689
|
*/
|
|
6471
6690
|
tiltMagnitudes?: number[];
|
|
6691
|
+
/**
|
|
6692
|
+
* Which InkML channel pair {@link tiltAngles}/{@link tiltMagnitudes} were
|
|
6693
|
+
* decoded from: `'azimuthAltitude'` when the source declared `AZIMUTH`
|
|
6694
|
+
* (optionally paired with `ALTITUDE`); omitted (implying `OTx`/`OTy`, i.e.
|
|
6695
|
+
* `'vector'`) otherwise, including for tilt this library itself captured
|
|
6696
|
+
* from the Draw tool's `PointerEvent.tiltX`/`tiltY`.
|
|
6697
|
+
*
|
|
6698
|
+
* A save that has to rewrite this content part's InkML (see
|
|
6699
|
+
* `inkml-content-part-writer.ts`) uses this to re-declare the SAME channel
|
|
6700
|
+
* pair the file already used, rather than always converting to `OTx`/`OTy`;
|
|
6701
|
+
* the rendered lean is identical either way; only the written channel
|
|
6702
|
+
* NAMES differ.
|
|
6703
|
+
*/
|
|
6704
|
+
tiltEncoding?: 'vector' | 'azimuthAltitude';
|
|
6472
6705
|
}
|
|
6473
6706
|
/**
|
|
6474
6707
|
* A content-part element wrapped in `mc:AlternateContent`.
|
|
@@ -7303,17 +7536,28 @@ interface PptxNativeAnimation {
|
|
|
7303
7536
|
*/
|
|
7304
7537
|
afterEffect?: boolean;
|
|
7305
7538
|
/**
|
|
7306
|
-
* "After animation" end-state behaviour
|
|
7307
|
-
*
|
|
7308
|
-
*
|
|
7309
|
-
*
|
|
7310
|
-
*
|
|
7311
|
-
*
|
|
7312
|
-
*
|
|
7539
|
+
* "After animation" end-state behaviour: dim-to-colour, hide-after-
|
|
7540
|
+
* animation, or hide-on-next-click. Populated directly by the
|
|
7541
|
+
* native-timing parser (`native-animation-after-effect.ts`) when the
|
|
7542
|
+
* effect's `p:cTn/p:subTnLst` carries PowerPoint's genuine after-effect
|
|
7543
|
+
* shape, so a real-world deck's build shows up here even with no
|
|
7544
|
+
* `pptx:editorMeta`. `applyAfterAnimationFromEditorList` in
|
|
7545
|
+
* `pptx-viewer-shared` overrides this from the matching
|
|
7546
|
+
* {@link PptxElementAnimation.afterAnimation} entry when the editor's
|
|
7547
|
+
* per-element animation list has one (the model the animation panel
|
|
7548
|
+
* writes `afterAnimation` into), so an edit through our own UI always wins.
|
|
7313
7549
|
*/
|
|
7314
7550
|
afterAnimationAction?: PptxAfterAnimationAction;
|
|
7315
|
-
/** Dim-to color hex, present when {@link afterAnimationAction} is `dimToColor`. */
|
|
7551
|
+
/** Dim-to color hex, present when {@link afterAnimationAction} is `dimToColor` AND the dim target is an already-resolved `a:srgbClr`. */
|
|
7316
7552
|
afterAnimationColor?: string;
|
|
7553
|
+
/**
|
|
7554
|
+
* The typed theme reference when a `dimToColor` target is an `a:schemeClr`
|
|
7555
|
+
* (e.g. `accent2`) instead of `a:srgbClr`: this parse layer has no theme to
|
|
7556
|
+
* resolve it to sRGB with (see {@link afterAnimationColor}'s doc), so a
|
|
7557
|
+
* playback consumer resolves this against the deck's theme colour map.
|
|
7558
|
+
* Mutually exclusive with {@link afterAnimationColor} being set.
|
|
7559
|
+
*/
|
|
7560
|
+
afterAnimationColorRef?: PptxThemeColorRef;
|
|
7317
7561
|
/**
|
|
7318
7562
|
* Parsed `p:animEffect` filter descriptor. `presetId`/`presetClass` remain
|
|
7319
7563
|
* the primary effect selector (see `resolveEffect` in `pptx-viewer-shared`);
|
|
@@ -7445,13 +7689,46 @@ interface PptxAnimationKeyframe {
|
|
|
7445
7689
|
* fidelity; consumers may use it to drive computed animation values.
|
|
7446
7690
|
*/
|
|
7447
7691
|
fmla?: string;
|
|
7692
|
+
/**
|
|
7693
|
+
* The typed theme reference when a `p:val/p:clrVal` stop is an
|
|
7694
|
+
* `a:schemeClr` (e.g. `accent1`), including any `tint`/`shade`/`lumMod`/
|
|
7695
|
+
* `lumOff`/`alpha` children. {@link value} keeps the bare scheme name for
|
|
7696
|
+
* round-trip; a playback consumer needs this ref (resolved against the
|
|
7697
|
+
* deck's theme colour map) to turn the stop into a real CSS colour, which
|
|
7698
|
+
* the bare name alone cannot do. Absent for an `a:srgbClr` stop, whose
|
|
7699
|
+
* {@link value} is already a resolved `#rrggbb` hex string.
|
|
7700
|
+
*/
|
|
7701
|
+
colorRef?: PptxThemeColorRef;
|
|
7448
7702
|
}
|
|
7449
7703
|
/** One generic `p:anim` behaviour inside a composed PowerPoint effect. */
|
|
7450
7704
|
interface PptxAttributeAnimation {
|
|
7451
7705
|
/** Lowercased target attribute from `p:attrNameLst`. */
|
|
7452
7706
|
attrName: string;
|
|
7453
|
-
/**
|
|
7707
|
+
/**
|
|
7708
|
+
* Authored value stops from this behaviour's `p:tavLst`. Empty when the
|
|
7709
|
+
* behaviour instead uses the simpler `from`/`to`/`by` attribute form (see
|
|
7710
|
+
* below); at least one of `keyframes`, `from`/`to`, or `by` is present.
|
|
7711
|
+
*/
|
|
7454
7712
|
keyframes: PptxAnimationKeyframe[];
|
|
7713
|
+
/**
|
|
7714
|
+
* `p:anim/@_from` (a formula string, ECMA-376 S19.5.4 CT_TLAnimateBehavior):
|
|
7715
|
+
* the absolute starting value, used instead of `p:tavLst` when the
|
|
7716
|
+
* behaviour only has two endpoints. PowerPoint writes this form for some
|
|
7717
|
+
* built-in presets (e.g. "Grow And Turn"'s `ppt_x` fly-in): a bare
|
|
7718
|
+
* `p:anim from="..." to="..."` with no `p:tavLst` child at all. See
|
|
7719
|
+
* `animation-ppt-formula-ground-truth.md` in `pptx-viewer-shared` for the
|
|
7720
|
+
* real-PowerPoint sample this was found in.
|
|
7721
|
+
*/
|
|
7722
|
+
from?: string;
|
|
7723
|
+
/** `p:anim/@_to`: the absolute ending value. See {@link from}. */
|
|
7724
|
+
to?: string;
|
|
7725
|
+
/**
|
|
7726
|
+
* `p:anim/@_by`: a DELTA formula added to wherever the attribute already
|
|
7727
|
+
* stands (as opposed to `from`/`to`'s absolute values), typically paired
|
|
7728
|
+
* with `p:cBhvr/@_additive="sum"` so it composites with a sibling
|
|
7729
|
+
* behaviour driving the same attribute instead of replacing it.
|
|
7730
|
+
*/
|
|
7731
|
+
by?: string;
|
|
7455
7732
|
/** Duration from this behaviour's nested `p:cTn/@dur`. */
|
|
7456
7733
|
durationMs?: number;
|
|
7457
7734
|
/** Start offset from this behaviour's nested `p:stCondLst`. */
|
|
@@ -7460,8 +7737,11 @@ interface PptxAttributeAnimation {
|
|
|
7460
7737
|
* Interpolation mode from this behaviour's own `@_calcmode`
|
|
7461
7738
|
* (ST_TLAnimateBehaviorCalcMode, ECMA-376 S19.5.2): `discrete` snaps to
|
|
7462
7739
|
* each `p:tav` stop with no interpolation, `lin` (the OOXML default)
|
|
7463
|
-
* interpolates linearly
|
|
7464
|
-
*
|
|
7740
|
+
* interpolates linearly. `fmla` as the WHOLE behaviour's calc mode has
|
|
7741
|
+
* never been observed in a real PowerPoint file and is not consulted at
|
|
7742
|
+
* playback; what PowerPoint actually writes is `calcmode="lin"` with a
|
|
7743
|
+
* per-stop `p:tav/@fmla` (see {@link PptxAnimationKeyframe.fmla}), which
|
|
7744
|
+
* IS consulted regardless of this field's value. Absent means `lin`.
|
|
7465
7745
|
*/
|
|
7466
7746
|
calcMode?: 'discrete' | 'lin' | 'fmla';
|
|
7467
7747
|
}
|
|
@@ -7487,16 +7767,31 @@ interface PptxColorAnimation {
|
|
|
7487
7767
|
* companion to `@dir` for HSL colour-space animations.
|
|
7488
7768
|
*/
|
|
7489
7769
|
path?: string;
|
|
7490
|
-
/** Starting color as hex string. */
|
|
7770
|
+
/** Starting color as hex string, or the bare scheme name (e.g. `accent1`) for a theme colour; see {@link fromColorRef}. */
|
|
7491
7771
|
fromColor?: string;
|
|
7492
|
-
/** Ending color as hex string. */
|
|
7772
|
+
/** Ending color as hex string, or the bare scheme name; see {@link toColorRef}. */
|
|
7493
7773
|
toColor?: string;
|
|
7494
7774
|
/**
|
|
7495
|
-
* Color delta (for "by" animations) as hex string
|
|
7496
|
-
*
|
|
7497
|
-
*
|
|
7775
|
+
* Color delta (for "by" animations) as hex string, or the bare scheme name;
|
|
7776
|
+
* see {@link byColorRef}. For HSL colour-space animations this retains the
|
|
7777
|
+
* historical byte-packed compatibility value; consumers should prefer
|
|
7778
|
+
* {@link hslDelta}, which preserves signed values.
|
|
7498
7779
|
*/
|
|
7499
7780
|
byColor?: string;
|
|
7781
|
+
/**
|
|
7782
|
+
* The typed theme reference when {@link fromColor} is an `a:schemeClr`
|
|
7783
|
+
* (including `tint`/`shade`/`lumMod`/`lumOff`/`alpha`), so playback can
|
|
7784
|
+
* resolve it against the deck's theme colour map. Absent when `fromColor`
|
|
7785
|
+
* is already a resolved `#rrggbb` hex (an `a:srgbClr` stop).
|
|
7786
|
+
*/
|
|
7787
|
+
fromColorRef?: PptxThemeColorRef;
|
|
7788
|
+
/** The typed theme reference for {@link toColor}; see {@link fromColorRef}. */
|
|
7789
|
+
toColorRef?: PptxThemeColorRef;
|
|
7790
|
+
/**
|
|
7791
|
+
* The typed theme reference for {@link byColor} (RGB colour space only; an
|
|
7792
|
+
* HSL `by` is a signed delta, never a theme colour). See {@link fromColorRef}.
|
|
7793
|
+
*/
|
|
7794
|
+
byColorRef?: PptxThemeColorRef;
|
|
7500
7795
|
/**
|
|
7501
7796
|
* Typed HSL delta from `p:by/p:hsl`. This preserves signed values and their
|
|
7502
7797
|
* OOXML units without forcing them through the legacy byte-packed `byColor`
|
|
@@ -8709,13 +9004,13 @@ interface PptxSlide {
|
|
|
8709
9004
|
backgroundPattern?: PptxSlideBackgroundPattern;
|
|
8710
9005
|
/**
|
|
8711
9006
|
* `<p:bgPr/@shadeToTitle>`: boolean flag instructing the renderer to
|
|
8712
|
-
*
|
|
8713
|
-
*
|
|
8714
|
-
*
|
|
9007
|
+
* anchor the background gradient on the title placeholder as a
|
|
9008
|
+
* rectangular path gradient (COM-measured against real PowerPoint;
|
|
9009
|
+
* it does NOT recolour toward the title's text colour, despite the
|
|
9010
|
+
* attribute's name). Parsed and round-tripped here on the core model;
|
|
9011
|
+
* the actual visual effect is applied by `pptx-viewer-shared`'s
|
|
8715
9012
|
* `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
|
|
9013
|
+
* consumed by all five bindings, not by core itself. Legacy PowerPoint
|
|
8719
9014
|
* 97-2003 hint, not observed in any real-world corpus file this project
|
|
8720
9015
|
* has collected and not settable from any modern PowerPoint UI; see
|
|
8721
9016
|
* `docs/guide/limitations.md`.
|
|
@@ -9349,7 +9644,7 @@ interface PptxEmbeddedFont {
|
|
|
9349
9644
|
originalPartBytes?: Uint8Array;
|
|
9350
9645
|
}
|
|
9351
9646
|
//#endregion
|
|
9352
|
-
//#region ../core/dist/index-
|
|
9647
|
+
//#region ../core/dist/index-0zviqnUe.d.ts
|
|
9353
9648
|
//#region src/core/types/theme-presets.d.ts
|
|
9354
9649
|
/**
|
|
9355
9650
|
* A complete theme preset that can be applied to a presentation.
|
|
@@ -10962,6 +11257,24 @@ interface ThemeCatalogEntry {
|
|
|
10962
11257
|
theme: ViewerTheme | undefined;
|
|
10963
11258
|
}
|
|
10964
11259
|
//#endregion
|
|
11260
|
+
//#region ../shared/dist/smartart-3d-types-5jml-0QC.d.ts
|
|
11261
|
+
//#region src/render/animation-text-style-resolve.d.ts
|
|
11262
|
+
/**
|
|
11263
|
+
* Framework-neutral text-style override a font-style emphasis effect applies
|
|
11264
|
+
* on top of its target's own authored per-run bold/italic/underline/size/
|
|
11265
|
+
* colour. Every binding maps this onto its own text container so it OVERRIDES
|
|
11266
|
+
* the runs' inline styles (the runs carry explicit inline styles of their
|
|
11267
|
+
* own, so plain CSS inheritance cannot reach them).
|
|
11268
|
+
*/
|
|
11269
|
+
interface TextStyleAnimationDescriptor {
|
|
11270
|
+
bold?: boolean;
|
|
11271
|
+
italic?: boolean;
|
|
11272
|
+
underline?: boolean;
|
|
11273
|
+
/** Relative multiplier against each run's own authored font size. */
|
|
11274
|
+
fontScale?: number;
|
|
11275
|
+
color?: string;
|
|
11276
|
+
}
|
|
11277
|
+
//#endregion
|
|
10965
11278
|
//#region ../shared/dist/index.d.ts
|
|
10966
11279
|
//#region src/types.d.ts
|
|
10967
11280
|
/** Canvas dimensions in pixels. */
|
|
@@ -11154,22 +11467,15 @@ interface ChartPartRef {
|
|
|
11154
11467
|
/** One of the three animation buckets a preset can occupy on an element. */
|
|
11155
11468
|
type AnimationGroup = 'entrance' | 'emphasis' | 'exit';
|
|
11156
11469
|
//#endregion
|
|
11157
|
-
//#region src/render/animation-
|
|
11470
|
+
//#region src/render/animation-timeline-build-descriptors.d.ts
|
|
11158
11471
|
/**
|
|
11159
|
-
*
|
|
11160
|
-
*
|
|
11161
|
-
*
|
|
11162
|
-
*
|
|
11163
|
-
*
|
|
11472
|
+
* `animation-timeline-build-descriptors` - staged-build (`p:bldChart` /
|
|
11473
|
+
* `p:bldDgm`) reveal descriptor types, split out of `animation-timeline-types`
|
|
11474
|
+
* to keep that module under the file-size limit. Re-exported from
|
|
11475
|
+
* `animation-timeline-types` so existing imports are unaffected.
|
|
11476
|
+
*
|
|
11477
|
+
* @module render/animation-timeline-build-descriptors
|
|
11164
11478
|
*/
|
|
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
11479
|
/**
|
|
11174
11480
|
* Normalized staged-reveal mode for a chart graphic frame, derived from the
|
|
11175
11481
|
* OOXML `a:bldChart/@bld` (or `p:bldOleChart/@bld`) token:
|
|
@@ -11203,12 +11509,12 @@ interface ChartRevealPoint {
|
|
|
11203
11509
|
* Playback-time chart reveal state derived from AUTHORED `p:graphicEl`
|
|
11204
11510
|
* indices (see `chart-reveal-descriptor`'s `resolveChartRevealDescriptor`),
|
|
11205
11511
|
* 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.
|
|
11512
|
+
* {@link import('./animation-timeline-group').ElementAnimationState.chartReveal}
|
|
11513
|
+
* only when every fired chart-build step for the element carried index data;
|
|
11514
|
+
* a renderer prefers this over the progress-based `build`/`ElementBuildState`
|
|
11515
|
+
* path when present, since it reflects the real authored reveal set (correct
|
|
11516
|
+
* even for a reversed-order or gapped chart build), and falls back to `build`
|
|
11517
|
+
* when absent.
|
|
11212
11518
|
*/
|
|
11213
11519
|
interface ChartRevealDescriptor {
|
|
11214
11520
|
/**
|
|
@@ -11229,12 +11535,13 @@ interface ChartRevealDescriptor {
|
|
|
11229
11535
|
* Playback-time SmartArt diagram reveal state derived from AUTHORED
|
|
11230
11536
|
* `p:graphicEl/p:dgm/@id` indices (see `diagram-reveal-descriptor`'s
|
|
11231
11537
|
* `resolveDiagramRevealDescriptor`), rather than from click-count/time
|
|
11232
|
-
* progress. Present on
|
|
11233
|
-
*
|
|
11234
|
-
*
|
|
11235
|
-
*
|
|
11236
|
-
*
|
|
11237
|
-
*
|
|
11538
|
+
* progress. Present on
|
|
11539
|
+
* {@link import('./animation-timeline-group').ElementAnimationState.diagramReveal}
|
|
11540
|
+
* only when every fired diagram-build step for the element carried
|
|
11541
|
+
* `p:graphicEl` data. A SmartArt renderer prefers this over the
|
|
11542
|
+
* progress-based `build` / {@link ElementBuildState} path when present, since
|
|
11543
|
+
* it reflects the real authored reveal set (correct even for a
|
|
11544
|
+
* reversed-order or by-branch build), and falls back to `build` when absent.
|
|
11238
11545
|
*/
|
|
11239
11546
|
interface DiagramRevealDescriptor {
|
|
11240
11547
|
/**
|
|
@@ -11247,9 +11554,11 @@ interface DiagramRevealDescriptor {
|
|
|
11247
11554
|
nodeIds: ReadonlySet<string>;
|
|
11248
11555
|
}
|
|
11249
11556
|
/**
|
|
11250
|
-
* Playback-time staged-build state surfaced on
|
|
11251
|
-
*
|
|
11252
|
-
*
|
|
11557
|
+
* Playback-time staged-build state surfaced on
|
|
11558
|
+
* {@link import('./animation-timeline-group').ElementAnimationState}.
|
|
11559
|
+
* `progress` is the 0..1 fraction of the build revealed at the current
|
|
11560
|
+
* playback time; a consumer maps it to its own item COUNT (see
|
|
11561
|
+
* `revealedStageCount`).
|
|
11253
11562
|
*/
|
|
11254
11563
|
type ElementBuildState = {
|
|
11255
11564
|
kind: 'chart';
|
|
@@ -11312,14 +11621,14 @@ interface ElementAnimationState {
|
|
|
11312
11621
|
animatesStroke?: boolean;
|
|
11313
11622
|
/**
|
|
11314
11623
|
* 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.
|
|
11624
|
+
* {@link import('./animation-timeline-step').TimelineStep.textStyle}) a
|
|
11625
|
+
* font-style emphasis effect currently applies to this element's text,
|
|
11626
|
+
* OVERRIDING the runs' own inline bold/italic/underline/size/colour.
|
|
11627
|
+
* `animation-playback-engine.ts` writes this on step start and again on
|
|
11628
|
+
* cleanup (held in full when the effect's `p:cTn/@fill` holds its end
|
|
11629
|
+
* state, otherwise reverted); a text renderer maps it onto its run markup
|
|
11630
|
+
* via `buildTextStyleOverrideCss` (`animation-text-style-css.ts`). Absent
|
|
11631
|
+
* means no font-style emphasis effect is currently active on this element.
|
|
11323
11632
|
*/
|
|
11324
11633
|
textStyle?: TextStyleAnimationDescriptor;
|
|
11325
11634
|
}
|
|
@@ -11682,6 +11991,17 @@ interface InkPoint {
|
|
|
11682
11991
|
* data".
|
|
11683
11992
|
*/
|
|
11684
11993
|
pressure?: number;
|
|
11994
|
+
/**
|
|
11995
|
+
* Pen-tilt lean, in degrees, from `PointerEvent.tiltX`/`tiltY` on
|
|
11996
|
+
* supporting hardware (a mouse, or a stylus with no tilt sensor, reports a
|
|
11997
|
+
* constant 0). Optional and always captured as a pair: a binding that has
|
|
11998
|
+
* not wired tilt capture simply omits both, and {@link strokeToInkElement}
|
|
11999
|
+
* treats a constant `(0, 0)` reading the same way it treats a constant
|
|
12000
|
+
* pressure, i.e. as "no real tilt data" rather than authoring a channel
|
|
12001
|
+
* for it.
|
|
12002
|
+
*/
|
|
12003
|
+
tiltX?: number;
|
|
12004
|
+
tiltY?: number;
|
|
11685
12005
|
}
|
|
11686
12006
|
/** Options for {@link strokeToInkElement}. */
|
|
11687
12007
|
interface StrokeToInkElementOpts {
|
|
@@ -11881,7 +12201,25 @@ interface ReadOnlyRecommendation {
|
|
|
11881
12201
|
readonly messageKey: string;
|
|
11882
12202
|
/** Whether a binding's "read-only" toggle should default to on. */
|
|
11883
12203
|
readonly defaultReadOnly: boolean;
|
|
12204
|
+
/**
|
|
12205
|
+
* Whether lifting this recommendation requires a correct password, rather
|
|
12206
|
+
* than a plain "Edit anyway". True only for a `modifyVerifier` that carries
|
|
12207
|
+
* a hash this viewer can actually check (`hashData` + `saltData` +
|
|
12208
|
+
* `algorithmName`, see `checkModifyPassword`). "Mark as Final" is purely
|
|
12209
|
+
* advisory and never requires one, and a `modifyVerifier` missing pieces of
|
|
12210
|
+
* its hash cannot be verified either way, so both fall back to the plain
|
|
12211
|
+
* "Edit anyway" a binding already had.
|
|
12212
|
+
*/
|
|
12213
|
+
readonly requiresPassword: boolean;
|
|
11884
12214
|
}
|
|
12215
|
+
//#endregion
|
|
12216
|
+
//#region src/render/modify-password-check.d.ts
|
|
12217
|
+
type ModifyPasswordCheckResult = {
|
|
12218
|
+
readonly ok: true;
|
|
12219
|
+
} | {
|
|
12220
|
+
readonly ok: false;
|
|
12221
|
+
readonly reason: 'wrong-password' | 'unsupported-algorithm';
|
|
12222
|
+
};
|
|
11885
12223
|
interface CompatibilityWarningToast {
|
|
11886
12224
|
/** Stable per-code id, since toasts are deduped by code (see module docs). */
|
|
11887
12225
|
readonly id: string;
|
|
@@ -12283,6 +12621,10 @@ declare function renderSlideStage(options: SlideStageOptions): HTMLElement;
|
|
|
12283
12621
|
declare function createDefaultRegistry(): ElementRendererRegistry;
|
|
12284
12622
|
//#endregion
|
|
12285
12623
|
//#region src/viewer/state/viewer-state.d.ts
|
|
12624
|
+
/** Why the last password attempt failed; see `checkModifyPassword` (`pptx-viewer-shared`). */
|
|
12625
|
+
type ModifyPasswordErrorReason$1 = Extract<ModifyPasswordCheckResult, {
|
|
12626
|
+
ok: false;
|
|
12627
|
+
}>['reason'];
|
|
12286
12628
|
/** `zoom` is either an explicit scale factor (1 = 100%) or fit-to-viewport. */
|
|
12287
12629
|
type ZoomLevel = number | 'fit';
|
|
12288
12630
|
/**
|
|
@@ -12530,6 +12872,22 @@ interface ViewerState {
|
|
|
12530
12872
|
* keeps the lock, only "Edit anyway" lifts it too.
|
|
12531
12873
|
*/
|
|
12532
12874
|
readOnlyBannerDismissed: boolean;
|
|
12875
|
+
/**
|
|
12876
|
+
* The loaded deck's raw `p:modifyVerifier`, kept alongside
|
|
12877
|
+
* {@link readOnlyRecommendation} so `submitReadOnlyPassword` can check a
|
|
12878
|
+
* candidate password against it (`checkModifyPassword`, `pptx-viewer-shared`).
|
|
12879
|
+
*/
|
|
12880
|
+
modifyVerifier?: PptxModifyVerifier;
|
|
12881
|
+
/**
|
|
12882
|
+
* Whether the read-only recommendation banner's inline password prompt is
|
|
12883
|
+
* open (replaces "Edit anyway"/"Dismiss" while true). Only reachable when
|
|
12884
|
+
* `readOnlyRecommendation.requiresPassword` is set.
|
|
12885
|
+
*/
|
|
12886
|
+
readOnlyPasswordPromptOpen: boolean;
|
|
12887
|
+
/** Reason the last password attempt failed, or null before any attempt / after success. */
|
|
12888
|
+
readOnlyPasswordError: ModifyPasswordErrorReason$1 | null;
|
|
12889
|
+
/** True while a submitted password is being checked; disables the form. */
|
|
12890
|
+
readOnlyCheckingPassword: boolean;
|
|
12533
12891
|
/**
|
|
12534
12892
|
* Compatibility-warning toasts for the current load (deck-level
|
|
12535
12893
|
* `data.warnings` concatenated with every slide's own `warnings`, deduped
|
|
@@ -13131,12 +13489,13 @@ interface InspectorState {
|
|
|
13131
13489
|
/** The selected element's accessibility title (`p:cNvPr/@title`), if any. */
|
|
13132
13490
|
title: string;
|
|
13133
13491
|
/**
|
|
13134
|
-
* Whether the
|
|
13135
|
-
*
|
|
13136
|
-
*
|
|
13137
|
-
*
|
|
13492
|
+
* Whether the Accessibility section's own alt-text/title editor should
|
|
13493
|
+
* show for the current selection: true for a plain shape, text box,
|
|
13494
|
+
* connector, and every graphic-frame kind (table/chart/smartArt/media/ole).
|
|
13495
|
+
* A picture's alt text has its own field in the Image section instead.
|
|
13496
|
+
* See shared's `shouldShowAccessibilitySection`.
|
|
13138
13497
|
*/
|
|
13139
|
-
|
|
13498
|
+
showAccessibilitySection: boolean;
|
|
13140
13499
|
chartData?: PptxChartData;
|
|
13141
13500
|
/**
|
|
13142
13501
|
* The on-canvas chart part selection, scoped to the selected chart element:
|
|
@@ -13625,6 +13984,10 @@ interface PresentationTouchControls {
|
|
|
13625
13984
|
update(current: number, total: number): void;
|
|
13626
13985
|
}
|
|
13627
13986
|
//#endregion
|
|
13987
|
+
//#region src/viewer/ui/read-only-banner.d.ts
|
|
13988
|
+
/** Why the last password attempt failed; see `checkModifyPassword` (`pptx-viewer-shared`). */
|
|
13989
|
+
type ModifyPasswordErrorReason = 'wrong-password' | 'unsupported-algorithm';
|
|
13990
|
+
//#endregion
|
|
13628
13991
|
//#region src/viewer/ui/ribbon/tabs/view-tab.d.ts
|
|
13629
13992
|
/** The View > Show toggles, as the viewer state currently holds them. */
|
|
13630
13993
|
interface ViewToggleState {
|
|
@@ -13810,7 +14173,11 @@ interface ViewerChrome {
|
|
|
13810
14173
|
/** Show/hide the Protected View "Enable Editing" banner. */
|
|
13811
14174
|
setProtectedView(active: boolean): void;
|
|
13812
14175
|
/** Show/hide + populate the read-only recommendation banner. */
|
|
13813
|
-
setReadOnlyRecommendation(recommendation: ReadOnlyRecommendation | null, dismissed: boolean
|
|
14176
|
+
setReadOnlyRecommendation(recommendation: ReadOnlyRecommendation | null, dismissed: boolean, passwordState: {
|
|
14177
|
+
promptOpen: boolean;
|
|
14178
|
+
error: ModifyPasswordErrorReason | null;
|
|
14179
|
+
checking: boolean;
|
|
14180
|
+
}): void;
|
|
13814
14181
|
/** Replace the compatibility-warning toast stack. */
|
|
13815
14182
|
setCompatToasts(toasts: readonly CompatibilityWarningToast[]): void;
|
|
13816
14183
|
}
|
|
@@ -13905,6 +14272,18 @@ interface SyncStageParams {
|
|
|
13905
14272
|
* already complete.
|
|
13906
14273
|
*/
|
|
13907
14274
|
seedCompleted?: boolean;
|
|
14275
|
+
/**
|
|
14276
|
+
* The slide canvas size (px), in the same unit the elements' own
|
|
14277
|
+
* `x`/`y`/`width`/`height` are authored in. Lets `PresentationAnimationController
|
|
14278
|
+
* .fromSlide` resolve a `p:anim` formula that needs the animated shape's real
|
|
14279
|
+
* box (e.g. Grow And Turn's `-#ppt_w/2` fly-in) instead of falling back.
|
|
14280
|
+
*/
|
|
14281
|
+
canvasSize?: {
|
|
14282
|
+
width: number;
|
|
14283
|
+
height: number;
|
|
14284
|
+
};
|
|
14285
|
+
/** The deck's resolved theme colour map, for a scheme-colour (`a:schemeClr`) animation stop. */
|
|
14286
|
+
themeColorMap?: Readonly<Record<string, string>>;
|
|
13908
14287
|
}
|
|
13909
14288
|
/**
|
|
13910
14289
|
* The presentation-mode playback state machine for the vanilla binding, driven
|
|
@@ -14854,6 +15233,10 @@ interface ChromeHost {
|
|
|
14854
15233
|
editAnywayFromReadOnlyRecommendation(): void;
|
|
14855
15234
|
/** The read-only recommendation banner's plain close button. */
|
|
14856
15235
|
dismissReadOnlyBanner(): void;
|
|
15236
|
+
/** The read-only recommendation banner's password form submit. */
|
|
15237
|
+
submitReadOnlyPassword(password: string): void;
|
|
15238
|
+
/** The read-only recommendation banner's password form "Cancel". */
|
|
15239
|
+
cancelReadOnlyPasswordPrompt(): void;
|
|
14857
15240
|
/** One compatibility toast's own dismiss button. */
|
|
14858
15241
|
dismissCompatToast(id: string): void;
|
|
14859
15242
|
/** The compatibility toast stack's "Dismiss all" button. */
|
|
@@ -15268,10 +15651,25 @@ declare class PptxViewer extends ViewerExportHost implements PptxViewerInstance,
|
|
|
15268
15651
|
* The read-only recommendation banner's "Edit anyway" button
|
|
15269
15652
|
* (`p:modifyVerifier` / "Mark as Final"): lifts the lock and hides the
|
|
15270
15653
|
* banner, unlike plain dismiss which only hides it.
|
|
15654
|
+
*
|
|
15655
|
+
* When the recommendation's `requiresPassword` is set (a `modifyVerifier`
|
|
15656
|
+
* with a hash this viewer can check), this opens the inline password
|
|
15657
|
+
* prompt instead of unlocking immediately: PowerPoint's own "read-only
|
|
15658
|
+
* recommended" prompt keeps the deck locked until the correct password is
|
|
15659
|
+
* entered, and a wrong one leaves it locked.
|
|
15271
15660
|
*/
|
|
15272
15661
|
editAnywayFromReadOnlyRecommendation(): void;
|
|
15273
15662
|
/** The read-only recommendation banner's plain close button: hides the banner, keeps the lock. */
|
|
15274
15663
|
dismissReadOnlyBanner(): void;
|
|
15664
|
+
/** The read-only recommendation banner's password form "Cancel": closes the prompt without unlocking. */
|
|
15665
|
+
cancelReadOnlyPasswordPrompt(): void;
|
|
15666
|
+
/**
|
|
15667
|
+
* Check `password` against the deck's `modifyVerifier`
|
|
15668
|
+
* (`checkModifyPassword`, `pptx-viewer-shared`); unlocks and closes the
|
|
15669
|
+
* prompt on a match, otherwise leaves the deck locked and reports why.
|
|
15670
|
+
*/
|
|
15671
|
+
submitReadOnlyPassword(password: string): void;
|
|
15672
|
+
private checkReadOnlyPassword;
|
|
15275
15673
|
/** One compatibility toast's own dismiss button. */
|
|
15276
15674
|
dismissCompatToast(id: string): void;
|
|
15277
15675
|
/** The compatibility toast stack's "Dismiss all" button. */
|