pptx-react-viewer 4.5.0 → 4.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +62 -0
- package/README.md +34 -33
- package/dist/{AiChatPanel-P2N6X2KB.js → AiChatPanel-3YILWCBX.js} +28 -28
- package/dist/AiChatPanel-3YILWCBX.js.br +0 -0
- package/dist/AiChatPanel-3YILWCBX.js.gz +0 -0
- package/dist/{AiChatPanel-HXGCZPUX.mjs → AiChatPanel-X2MVL5UP.mjs} +4 -4
- package/dist/AiChatPanel-X2MVL5UP.mjs.br +0 -0
- package/dist/AiChatPanel-X2MVL5UP.mjs.gz +0 -0
- package/dist/{Model3DScene-PIFMH2TU.js → Model3DScene-G7P6ZAIO.js} +2 -2
- package/dist/Model3DScene-G7P6ZAIO.js.br +0 -0
- package/dist/Model3DScene-G7P6ZAIO.js.gz +0 -0
- package/dist/{Model3DScene-QXMMJRV3.mjs → Model3DScene-QFWI5CEE.mjs} +1 -1
- package/dist/Model3DScene-QFWI5CEE.mjs.br +0 -0
- package/dist/Model3DScene-QFWI5CEE.mjs.gz +0 -0
- package/dist/{chunk-T35BGKZG.js → chunk-2BM4GBFZ.js} +5 -5
- package/dist/chunk-2BM4GBFZ.js.br +0 -0
- package/dist/chunk-2BM4GBFZ.js.gz +0 -0
- package/dist/{chunk-ZF5S3HHW.mjs → chunk-5J6NW3YS.mjs} +55 -28
- package/dist/chunk-5J6NW3YS.mjs.br +0 -0
- package/dist/chunk-5J6NW3YS.mjs.gz +0 -0
- package/dist/{chunk-LYZQLV7R.js → chunk-AQIXKTAT.js} +13881 -8722
- package/dist/chunk-AQIXKTAT.js.br +0 -0
- package/dist/chunk-AQIXKTAT.js.gz +0 -0
- package/dist/{chunk-DX2JCSQ4.mjs → chunk-E5OIDWHO.mjs} +1 -1
- package/dist/chunk-E5OIDWHO.mjs.br +0 -0
- package/dist/chunk-E5OIDWHO.mjs.gz +0 -0
- package/dist/{chunk-6FVYG27J.js → chunk-FYAOOACZ.js} +241 -214
- package/dist/chunk-FYAOOACZ.js.br +0 -0
- package/dist/chunk-FYAOOACZ.js.gz +0 -0
- package/dist/{chunk-PRXJ3J5W.mjs → chunk-OECUSL2B.mjs} +129 -311
- package/dist/chunk-OECUSL2B.mjs.br +0 -0
- package/dist/chunk-OECUSL2B.mjs.gz +0 -0
- package/dist/{chunk-VZNIVS3X.mjs → chunk-QLDHUKH2.mjs} +13808 -8718
- package/dist/chunk-QLDHUKH2.mjs.br +0 -0
- package/dist/chunk-QLDHUKH2.mjs.gz +0 -0
- package/dist/{chunk-Y4VRYQQS.js → chunk-SR7ETIBF.js} +931 -1112
- package/dist/chunk-SR7ETIBF.js.br +0 -0
- package/dist/chunk-SR7ETIBF.js.gz +0 -0
- package/dist/{chunk-IDV2ITXM.mjs → chunk-UBYFLXAU.mjs} +1383 -208
- package/dist/chunk-UBYFLXAU.mjs.br +0 -0
- package/dist/chunk-UBYFLXAU.mjs.gz +0 -0
- package/dist/{chunk-UMQV2432.js → chunk-UIAU3NR2.js} +45 -0
- package/dist/chunk-UIAU3NR2.js.br +0 -0
- package/dist/chunk-UIAU3NR2.js.gz +0 -0
- package/dist/{chunk-UZFCFYK6.js → chunk-VF4RA27Q.js} +3245 -2070
- package/dist/chunk-VF4RA27Q.js.br +0 -0
- package/dist/chunk-VF4RA27Q.js.gz +0 -0
- package/dist/{chunk-APAVAD2A.mjs → chunk-WIEBQGQI.mjs} +45 -0
- package/dist/chunk-WIEBQGQI.mjs.br +0 -0
- package/dist/chunk-WIEBQGQI.mjs.gz +0 -0
- package/dist/i18n/de.cjs +71 -21
- package/dist/i18n/de.cjs.br +0 -0
- package/dist/i18n/de.cjs.gz +0 -0
- package/dist/i18n/de.mjs +71 -21
- package/dist/i18n/de.mjs.br +0 -0
- package/dist/i18n/de.mjs.gz +0 -0
- package/dist/i18n/es.cjs +71 -21
- package/dist/i18n/es.cjs.br +0 -0
- package/dist/i18n/es.cjs.gz +0 -0
- package/dist/i18n/es.mjs +71 -21
- package/dist/i18n/es.mjs.br +0 -0
- package/dist/i18n/es.mjs.gz +0 -0
- package/dist/i18n/fr.cjs +71 -21
- package/dist/i18n/fr.cjs.br +0 -0
- package/dist/i18n/fr.cjs.gz +0 -0
- package/dist/i18n/fr.mjs +71 -21
- package/dist/i18n/fr.mjs.br +0 -0
- package/dist/i18n/fr.mjs.gz +0 -0
- package/dist/i18n/zh-CN.cjs +49 -4
- package/dist/i18n/zh-CN.cjs.br +0 -0
- package/dist/i18n/zh-CN.cjs.gz +0 -0
- package/dist/i18n/zh-CN.mjs +49 -4
- package/dist/i18n/zh-CN.mjs.br +0 -0
- package/dist/i18n/zh-CN.mjs.gz +0 -0
- package/dist/i18n.js +4 -4
- package/dist/i18n.js.br +0 -0
- package/dist/i18n.js.gz +0 -0
- package/dist/i18n.mjs +1 -1
- package/dist/i18n.mjs.br +0 -0
- package/dist/i18n.mjs.gz +0 -0
- package/dist/index.d.ts +438 -13
- package/dist/index.js +105 -49
- package/dist/index.js.br +0 -0
- package/dist/index.js.gz +0 -0
- package/dist/index.mjs +6 -6
- package/dist/index.mjs.br +0 -0
- package/dist/index.mjs.gz +0 -0
- package/dist/internals.d.ts +501 -15
- package/dist/internals.js +105 -105
- package/dist/internals.js.br +0 -0
- package/dist/internals.js.gz +0 -0
- package/dist/internals.mjs +4 -4
- package/dist/internals.mjs.br +0 -0
- package/dist/internals.mjs.gz +0 -0
- package/dist/pptx-viewer.css +1 -1
- package/dist/pptx-viewer.css.br +0 -0
- package/dist/pptx-viewer.css.gz +0 -0
- package/dist/viewer/index.d.ts +515 -12
- package/dist/viewer/index.js +27 -27
- package/dist/viewer/index.js.br +0 -0
- package/dist/viewer/index.js.gz +0 -0
- package/dist/viewer/index.mjs +6 -6
- package/dist/viewer/index.mjs.br +3 -4
- package/dist/viewer/index.mjs.gz +0 -0
- package/package.json +1 -1
- package/dist/AiChatPanel-HXGCZPUX.mjs.br +0 -0
- package/dist/AiChatPanel-HXGCZPUX.mjs.gz +0 -0
- package/dist/AiChatPanel-P2N6X2KB.js.br +0 -0
- package/dist/AiChatPanel-P2N6X2KB.js.gz +0 -0
- package/dist/Model3DScene-PIFMH2TU.js.br +0 -0
- package/dist/Model3DScene-PIFMH2TU.js.gz +0 -0
- package/dist/Model3DScene-QXMMJRV3.mjs.br +0 -0
- package/dist/Model3DScene-QXMMJRV3.mjs.gz +0 -0
- package/dist/chunk-6FVYG27J.js.br +0 -0
- package/dist/chunk-6FVYG27J.js.gz +0 -0
- package/dist/chunk-APAVAD2A.mjs.br +0 -0
- package/dist/chunk-APAVAD2A.mjs.gz +0 -0
- package/dist/chunk-DX2JCSQ4.mjs.br +0 -0
- package/dist/chunk-DX2JCSQ4.mjs.gz +0 -0
- package/dist/chunk-IDV2ITXM.mjs.br +0 -0
- package/dist/chunk-IDV2ITXM.mjs.gz +0 -0
- package/dist/chunk-LYZQLV7R.js.br +0 -0
- package/dist/chunk-LYZQLV7R.js.gz +0 -0
- package/dist/chunk-PRXJ3J5W.mjs.br +0 -0
- package/dist/chunk-PRXJ3J5W.mjs.gz +0 -0
- package/dist/chunk-T35BGKZG.js.br +0 -0
- package/dist/chunk-T35BGKZG.js.gz +0 -0
- package/dist/chunk-UMQV2432.js.br +0 -0
- package/dist/chunk-UMQV2432.js.gz +0 -0
- package/dist/chunk-UZFCFYK6.js.br +0 -0
- package/dist/chunk-UZFCFYK6.js.gz +0 -0
- package/dist/chunk-VZNIVS3X.mjs.br +0 -0
- package/dist/chunk-VZNIVS3X.mjs.gz +0 -0
- package/dist/chunk-Y4VRYQQS.js.br +0 -0
- package/dist/chunk-Y4VRYQQS.js.gz +0 -0
- package/dist/chunk-ZF5S3HHW.mjs.br +0 -0
- package/dist/chunk-ZF5S3HHW.mjs.gz +0 -0
package/dist/viewer/index.d.ts
CHANGED
|
@@ -1485,8 +1485,16 @@ interface TextStyle {
|
|
|
1485
1485
|
textOutlineWidth?: number;
|
|
1486
1486
|
/** Text outline colour as hex string (`a:rPr > a:ln > a:solidFill`). */
|
|
1487
1487
|
textOutlineColor?: string;
|
|
1488
|
+
/** Text outline dash preset (`a:rPr > a:ln > a:prstDash/@val`), e.g. `dash`; absent for solid. */
|
|
1489
|
+
textOutlineDash?: string;
|
|
1488
1490
|
/** When true, the text body has no fill (`a:rPr > a:noFill`), producing hollow/outline-only text. */
|
|
1489
1491
|
textFillNone?: boolean;
|
|
1492
|
+
/**
|
|
1493
|
+
* When true, the run authored an EMPTY `<a:effectLst/>`: an explicit "no
|
|
1494
|
+
* effects" override that blocks an inherited shadow or glow. Kept so a
|
|
1495
|
+
* rewrite re-emits it instead of letting the inherited effect return.
|
|
1496
|
+
*/
|
|
1497
|
+
textEffectsExplicitNone?: boolean;
|
|
1490
1498
|
/** Superscript/subscript baseline shift as percentage (`a:rPr/@baseline`). Positive = super, negative = sub. */
|
|
1491
1499
|
baseline?: number;
|
|
1492
1500
|
/** Character spacing in hundredths of a point (`a:rPr/@spc`). */
|
|
@@ -1520,6 +1528,25 @@ interface TextStyle {
|
|
|
1520
1528
|
textFillPatternForeground?: string;
|
|
1521
1529
|
/** Text-level pattern background colour. */
|
|
1522
1530
|
textFillPatternBackground?: string;
|
|
1531
|
+
/**
|
|
1532
|
+
* Raw `a:rPr > a:blipFill` XML, preserved verbatim for round-trip
|
|
1533
|
+
* serialization AND as the input to the image resolution pass that fills
|
|
1534
|
+
* in {@link textFillBlipUrl} (parsing a run's fill happens synchronously,
|
|
1535
|
+
* with no zip/relationship access at that point; resolving the blip to a
|
|
1536
|
+
* displayable URL needs both, so it happens in a later async pass over
|
|
1537
|
+
* the slide's parsed elements, mirroring how a shape's OWN image fill is
|
|
1538
|
+
* resolved). A picture-filled text run (`a:rPr > a:blipFill`) was
|
|
1539
|
+
* documented as handled ("Handles gradient fills, pattern fills, and
|
|
1540
|
+
* image fills on text runs") but never actually parsed, so it silently
|
|
1541
|
+
* fell through to the run's plain `color` and rendered solid black
|
|
1542
|
+
* (COM-verified: `audit-text` slide 13's "PICTURE FILL" run shows the
|
|
1543
|
+
* fill image through the glyphs in PowerPoint).
|
|
1544
|
+
*/
|
|
1545
|
+
textFillBlipXml?: XmlObject;
|
|
1546
|
+
/** Resolved displayable URL for {@link textFillBlipXml}, or the archive-relative path when unresolved (lazy decode). */
|
|
1547
|
+
textFillBlipUrl?: string;
|
|
1548
|
+
/** Tiling mode for {@link textFillBlipUrl} (`a:blipFill/a:tile` present -> 'tile', else 'stretch'). */
|
|
1549
|
+
textFillBlipMode?: 'stretch' | 'tile';
|
|
1523
1550
|
hyperlink?: string;
|
|
1524
1551
|
/** Relationship ID for the hyperlink (`a:hlinkClick/@r:id`) — preserved for round-trip serialization. */
|
|
1525
1552
|
hyperlinkRId?: string;
|
|
@@ -1605,6 +1632,13 @@ interface TextStyle {
|
|
|
1605
1632
|
position: number;
|
|
1606
1633
|
align: 'l' | 'ctr' | 'r' | 'dec';
|
|
1607
1634
|
leader?: 'none' | 'dot' | 'hyphen' | 'underscore';
|
|
1635
|
+
/**
|
|
1636
|
+
* True when the source spelled out the schema-default `@algn="l"`, so the
|
|
1637
|
+
* writer re-emits it instead of treating it as an omitted default.
|
|
1638
|
+
*/
|
|
1639
|
+
alignAuthored?: boolean;
|
|
1640
|
+
/** True when the source spelled out the schema-default `@leader="none"`. */
|
|
1641
|
+
leaderAuthored?: boolean;
|
|
1608
1642
|
}>;
|
|
1609
1643
|
/**
|
|
1610
1644
|
* True when the paragraph's own `a:pPr` authored an EMPTY `<a:tabLst/>`
|
|
@@ -1968,6 +2002,19 @@ interface TextStyle {
|
|
|
1968
2002
|
* convention used for {@link bulletInfo} / {@link endParaRunProperties}).
|
|
1969
2003
|
*/
|
|
1970
2004
|
paragraphDefaultRunPropertiesXml?: XmlObject;
|
|
2005
|
+
/**
|
|
2006
|
+
* The bullet colour / size / typeface children (`a:buClrTx`, `a:buClr`,
|
|
2007
|
+
* `a:buSzTx`, `a:buSzPct`, `a:buSzPts`, `a:buFontTx`, `a:buFont`) a
|
|
2008
|
+
* paragraph authored in its own `<a:pPr>` WITHOUT a bullet type
|
|
2009
|
+
* (`a:buNone` / `a:buChar` / `a:buAutoNum` / `a:buBlip`), captured
|
|
2010
|
+
* verbatim in source order. Such a paragraph restyles an inherited bullet
|
|
2011
|
+
* rather than declaring one, so its {@link BulletInfo} resolves from the
|
|
2012
|
+
* cascade and is (correctly) not written back; without this capture the
|
|
2013
|
+
* paragraph's own override vanished on every rewrite.
|
|
2014
|
+
*
|
|
2015
|
+
* Only meaningful on a paragraph's own authored properties.
|
|
2016
|
+
*/
|
|
2017
|
+
paragraphBulletPropertiesXml?: XmlObject;
|
|
1971
2018
|
}
|
|
1972
2019
|
/**
|
|
1973
2020
|
* Structured bullet metadata attached to the first {@link TextSegment}
|
|
@@ -3236,6 +3283,26 @@ type PptxChartMarkerSymbol = 'circle' | 'dash' | 'diamond' | 'dot' | 'none' | 'p
|
|
|
3236
3283
|
*/
|
|
3237
3284
|
type PptxChartScatterStyle = 'none' | 'line' | 'lineMarker' | 'marker' | 'smooth' | 'smoothMarker';
|
|
3238
3285
|
/** Shape properties extracted from c:spPr for chart formatting. */
|
|
3286
|
+
/**
|
|
3287
|
+
* A render-ready gradient fill from a chart `c:spPr/a:gradFill` (chart area,
|
|
3288
|
+
* plot area or series). Positions are 0..100; a linear gradient's `angle` is
|
|
3289
|
+
* in degrees clockwise from left-to-right (`a:lin/@ang`); a radial (`a:path`)
|
|
3290
|
+
* gradient centres on `focalPoint` (0..1 fractions of the box), the middle
|
|
3291
|
+
* when absent.
|
|
3292
|
+
*/
|
|
3293
|
+
interface PptxChartGradientFill {
|
|
3294
|
+
type: 'linear' | 'radial';
|
|
3295
|
+
stops: Array<{
|
|
3296
|
+
color: string;
|
|
3297
|
+
position: number;
|
|
3298
|
+
opacity?: number;
|
|
3299
|
+
}>;
|
|
3300
|
+
angle?: number;
|
|
3301
|
+
focalPoint?: {
|
|
3302
|
+
x: number;
|
|
3303
|
+
y: number;
|
|
3304
|
+
};
|
|
3305
|
+
}
|
|
3239
3306
|
interface PptxChartShapeProps {
|
|
3240
3307
|
fillColor?: string;
|
|
3241
3308
|
strokeColor?: string;
|
|
@@ -3561,6 +3628,12 @@ interface PptxChartSeries {
|
|
|
3561
3628
|
*/
|
|
3562
3629
|
idx?: number;
|
|
3563
3630
|
values: number[];
|
|
3631
|
+
/**
|
|
3632
|
+
* Series gradient fill (`c:ser/c:spPr/a:gradFill`), painted on every mark
|
|
3633
|
+
* of the series that has no per-point override. Render-only: the series'
|
|
3634
|
+
* own `c:spPr` round-trips untouched.
|
|
3635
|
+
*/
|
|
3636
|
+
gradientFill?: PptxChartGradientFill;
|
|
3564
3637
|
/**
|
|
3565
3638
|
* Per-series x values from `c:ser/c:xVal` (scatter and bubble series only).
|
|
3566
3639
|
*
|
|
@@ -3735,6 +3808,12 @@ interface PptxChartFilteredSeries {
|
|
|
3735
3808
|
* and `c:dLblPos`.
|
|
3736
3809
|
*/
|
|
3737
3810
|
interface PptxChartDataLabelOptions {
|
|
3811
|
+
/** Label box fill/outline (`c:dLbls/c:spPr`), see `chart-data-label-box.ts`. */
|
|
3812
|
+
labelShape?: PptxChartShapeProps;
|
|
3813
|
+
/** Callout geometry of the label box (`c15:spPr/a:prstGeom/@prst`, e.g. `wedgeRectCallout`). */
|
|
3814
|
+
calloutShape?: string;
|
|
3815
|
+
/** The chart15 extension's `c15:showLeaderLines`, which wins for a moved label's leader line. */
|
|
3816
|
+
extLeaderLines?: boolean;
|
|
3738
3817
|
/** Show the numeric value (`c:showVal`). */
|
|
3739
3818
|
showValue?: boolean;
|
|
3740
3819
|
/** Show the category name (`c:showCatName`). */
|
|
@@ -3860,6 +3939,10 @@ interface PptxChartStyle {
|
|
|
3860
3939
|
chartAreaFill?: string;
|
|
3861
3940
|
/** Plot-area fill from `c:plotArea/c:spPr`. See {@link chartAreaFill}. */
|
|
3862
3941
|
plotAreaFill?: string;
|
|
3942
|
+
/** Chart-area gradient (`c:chartSpace/c:spPr/a:gradFill`); wins over {@link chartAreaFill}. */
|
|
3943
|
+
chartAreaGradient?: PptxChartGradientFill;
|
|
3944
|
+
/** Plot-area gradient (`c:plotArea/c:spPr/a:gradFill`); wins over {@link plotAreaFill}. */
|
|
3945
|
+
plotAreaGradient?: PptxChartGradientFill;
|
|
3863
3946
|
/** Whether data labels are shown. */
|
|
3864
3947
|
hasDataLabels?: boolean;
|
|
3865
3948
|
/** Chart-level data-label content/position options (when `hasDataLabels`). */
|
|
@@ -7728,7 +7811,15 @@ type PptxAnimationTimingCurve = 'ease' | 'ease-in' | 'ease-out' | 'linear';
|
|
|
7728
7811
|
/** Repeat mode for animations. */
|
|
7729
7812
|
type PptxAnimationRepeatMode = 'untilNextClick' | 'untilEndOfSlide';
|
|
7730
7813
|
/** Animation trigger type from OOXML `p:cTn`. */
|
|
7731
|
-
type PptxAnimationTrigger = 'onClick' | 'onShapeClick' | 'onHover' | 'afterPrevious' | 'withPrevious' | 'afterDelay'
|
|
7814
|
+
type PptxAnimationTrigger = 'onClick' | 'onShapeClick' | 'onHover' | 'afterPrevious' | 'withPrevious' | 'afterDelay' |
|
|
7815
|
+
/**
|
|
7816
|
+
* Starts when a media element's playback reaches a named bookmark
|
|
7817
|
+
* (PowerPoint's "Trigger > On Bookmark"). The media element is
|
|
7818
|
+
* {@link PptxElementAnimation.triggerShapeId} and the bookmark
|
|
7819
|
+
* {@link PptxElementAnimation.triggerBookmark}; saved as an interactive
|
|
7820
|
+
* sequence gated on `p:cond evt="onMediaBookmark"` with a `p14:bmkTgt`.
|
|
7821
|
+
*/
|
|
7822
|
+
'onMediaBookmark';
|
|
7732
7823
|
/**
|
|
7733
7824
|
* Native animation kind. The historic shape-targeted preset animations are
|
|
7734
7825
|
* implicitly the default kind (`undefined`). Media animations (`p:audio`,
|
|
@@ -7881,8 +7972,13 @@ interface PptxNativeAnimation {
|
|
|
7881
7972
|
target?: PptxAnimationTarget;
|
|
7882
7973
|
/** Trigger type. */
|
|
7883
7974
|
trigger?: PptxAnimationTrigger;
|
|
7884
|
-
/**
|
|
7975
|
+
/**
|
|
7976
|
+
* Shape ID that triggers this animation: the clicked shape of an
|
|
7977
|
+
* interactive sequence, or the media element of an `onMediaBookmark` one.
|
|
7978
|
+
*/
|
|
7885
7979
|
triggerShapeId?: string;
|
|
7980
|
+
/** Bookmark name an `onMediaBookmark` interactive sequence waits for. */
|
|
7981
|
+
triggerBookmark?: string;
|
|
7886
7982
|
/** Whether this effect belongs to an OOXML `interactiveSeq`. */
|
|
7887
7983
|
interactiveSequence?: boolean;
|
|
7888
7984
|
/** Whether `p:endSync/p:rtn[@val="all"]` makes that sequence replayable. */
|
|
@@ -8381,12 +8477,15 @@ interface PptxAttributeAnimation {
|
|
|
8381
8477
|
/**
|
|
8382
8478
|
* `p:anim/@_p14:bounceEnd` (Office 2010 `p14` extension attribute,
|
|
8383
8479
|
* MS-OI29500), normalized to a 0-1 fraction of this behaviour's own
|
|
8384
|
-
* duration. PowerPoint's
|
|
8385
|
-
*
|
|
8386
|
-
*
|
|
8387
|
-
*
|
|
8388
|
-
* the
|
|
8389
|
-
*
|
|
8480
|
+
* duration. PowerPoint's "Bounce End" effect option (COM:
|
|
8481
|
+
* `Effect.Timing.BounceEnd` + `BounceEndIntensity`) writes this on the
|
|
8482
|
+
* position-ramp `p:anim` node(s): the share of the duration spent
|
|
8483
|
+
* BOUNCING at the end. Measured from PowerPoint's own CreateVideo frames,
|
|
8484
|
+
* the travel completes at `1 - bounceEnd` and the rest is a damped
|
|
8485
|
+
* oscillation about the final value (see shared's `animation-bounce-end`).
|
|
8486
|
+
* Mirrored verbatim by PowerPoint onto the enclosing
|
|
8487
|
+
* `p:cTn/@_p14:presetBounceEnd`. Absent for every animation that doesn't
|
|
8488
|
+
* use this effect option (the overwhelming majority).
|
|
8390
8489
|
*/
|
|
8391
8490
|
bounceEnd?: number;
|
|
8392
8491
|
}
|
|
@@ -8564,9 +8663,24 @@ interface PptxElementAnimation {
|
|
|
8564
8663
|
durationMs?: number;
|
|
8565
8664
|
delayMs?: number;
|
|
8566
8665
|
order?: number;
|
|
8666
|
+
/**
|
|
8667
|
+
* The {@link order} the loader derived from the slide's `p:timing` tree for
|
|
8668
|
+
* an entry whose `pptx:editorMeta` record authored no `@order`. The tree
|
|
8669
|
+
* already expresses that position (and every load re-derives it), so the
|
|
8670
|
+
* writer omits `@order` while `order` still equals this value; a reorder
|
|
8671
|
+
* changes `order` and the attribute is written again. Load-time bookkeeping
|
|
8672
|
+
* only; never set it by hand.
|
|
8673
|
+
*/
|
|
8674
|
+
orderFromTimeline?: number;
|
|
8567
8675
|
trigger?: PptxAnimationTrigger;
|
|
8568
|
-
/**
|
|
8676
|
+
/**
|
|
8677
|
+
* Shape ID that triggers this animation: the shape clicked for
|
|
8678
|
+
* `onShapeClick`, or the media element whose bookmark fires it for
|
|
8679
|
+
* `onMediaBookmark`.
|
|
8680
|
+
*/
|
|
8569
8681
|
triggerShapeId?: string;
|
|
8682
|
+
/** Bookmark name (`p14:bmk/@name`) an `onMediaBookmark` trigger waits for. */
|
|
8683
|
+
triggerBookmark?: string;
|
|
8570
8684
|
timingCurve?: PptxAnimationTimingCurve;
|
|
8571
8685
|
repeatCount?: number;
|
|
8572
8686
|
repeatMode?: PptxAnimationRepeatMode;
|
|
@@ -12313,11 +12427,51 @@ declare function loadAudienceContent(sessionId?: string): Promise<Uint8Array | n
|
|
|
12313
12427
|
* Remove stored audience content (cleanup).
|
|
12314
12428
|
*/
|
|
12315
12429
|
declare function clearAudienceContent(sessionId?: string): Promise<void>;
|
|
12430
|
+
/** A logical editor command produced by one key press. */
|
|
12431
|
+
type EditorKeyActionName = 'undo' | 'redo' | 'copy' | 'cut' | 'paste' | 'duplicate' | 'delete' | 'selectAll' | 'group' | 'ungroup' | 'nudge' | 'prevSlide' | 'nextSlide' | 'escape' | 'find' | 'findReplace' | 'toggleShortcuts' | 'alignLeft' | 'alignCenter' | 'alignRight' | 'alignJustify' | 'increaseFontSize' | 'decreaseFontSize' | 'copyFormat' | 'pasteFormat' | 'newSlide' | 'hyperlink' | 'clearFormatting' | 'cycleSelectionNext' | 'cycleSelectionPrev' | 'pasteSpecial';
|
|
12432
|
+
//#endregion
|
|
12433
|
+
//#region src/render/merge-shapes/merge-shapes-menu.d.ts
|
|
12434
|
+
/** The right-click command id for each operation. */
|
|
12435
|
+
type MergeShapesCommandId = 'merge-union' | 'merge-combine' | 'merge-fragment' | 'merge-intersect' | 'merge-subtract';
|
|
12436
|
+
/** Every command a canvas context menu can offer, in no particular order. */
|
|
12437
|
+
type ContextMenuCommandId = 'copy' | 'cut' | 'paste' | 'duplicate' | 'edit-text' | 'edit-points' | 'bring-forward' | 'send-backward' | 'bring-front' | 'send-back' | 'ai-ask' | 'ai-fix' | 'comment' | 'hyperlink' | 'table-insert-row-above' | 'table-insert-row-below' | 'table-delete-row' | 'table-insert-col-left' | 'table-insert-col-right' | 'table-delete-col' | 'table-merge-selected' | 'table-merge-right' | 'table-merge-down' | 'table-split' | 'group' | 'ungroup' | 'crop' | MergeShapesCommandId | 'save-as-picture' | 'edit-alt-text' | 'size-and-position' | 'format-shape' | 'delete';
|
|
12438
|
+
//#endregion
|
|
12439
|
+
//#region src/render/canvas-context-menu-commands.d.ts
|
|
12440
|
+
/**
|
|
12441
|
+
* The right-click menu for the empty slide canvas (no element under the
|
|
12442
|
+
* cursor), as distinct from {@link ./context-menu-commands}'s per-element menu.
|
|
12443
|
+
*
|
|
12444
|
+
* Right-clicking empty canvas used to do nothing at all in every binding: React
|
|
12445
|
+
* and Vue both bailed out early (`getElementIdFromEvent` returns `null`, so the
|
|
12446
|
+
* handler just returns) rather than opening a menu, and the other three never
|
|
12447
|
+
* wired a handler for it either. PowerPoint offers Paste, Layout, Reset,
|
|
12448
|
+
* Format Background and view toggles (Grid and Guides, Ruler) from this menu;
|
|
12449
|
+
* this module is the one list every binding renders instead of five omissions.
|
|
12450
|
+
*
|
|
12451
|
+
* @module render/canvas-context-menu-commands
|
|
12452
|
+
*/
|
|
12453
|
+
/** Every command the empty-canvas context menu can offer, in no particular order. */
|
|
12454
|
+
type CanvasContextMenuCommandId = 'paste' | 'layout' | 'reset-slide' | 'format-background' | 'grid-and-guides' | 'ruler';
|
|
12316
12455
|
/** In-memory clipboard payload stored when an element is copied or cut. */
|
|
12317
12456
|
interface ElementClipboardPayload {
|
|
12318
12457
|
element: PptxElement;
|
|
12319
12458
|
isTemplate: boolean;
|
|
12320
12459
|
}
|
|
12460
|
+
type BackstagePage = 'home' | 'new' | 'open' | 'info' | 'save' | 'saveAs' | 'print' | 'share' | 'export' | 'close' | 'account' | 'options';
|
|
12461
|
+
//#endregion
|
|
12462
|
+
//#region src/render/backstage-cards.d.ts
|
|
12463
|
+
/**
|
|
12464
|
+
* Every action card the File-tab backstage can show, keyed by the operation it
|
|
12465
|
+
* triggers rather than by its wording.
|
|
12466
|
+
*
|
|
12467
|
+
* The five bindings used to hardcode a title and a body string each, which made
|
|
12468
|
+
* the whole backstage untranslatable and let the copy drift: the same card
|
|
12469
|
+
* carried four different descriptions depending on which binding you opened it
|
|
12470
|
+
* in. Both halves now live here as a dictionary key plus an English fallback,
|
|
12471
|
+
* so a wording change lands everywhere at once and a translator only has to
|
|
12472
|
+
* translate it once.
|
|
12473
|
+
*/
|
|
12474
|
+
type BackstageCardId = 'protect' | 'inspect' | 'embedFonts' | 'signatures' | 'versionHistory' | 'saveAsPptx' | 'saveAsPpsx' | 'saveAsPptm' | 'saveAsPpt' | 'pdf' | 'png' | 'video' | 'gif' | 'json' | 'copyImage' | 'print' | 'share';
|
|
12321
12475
|
/**
|
|
12322
12476
|
* Optional hook point for hosts that want to wire a real sign-in flow into
|
|
12323
12477
|
* File > Account. Disabled by default: the Account page renders nothing
|
|
@@ -12355,11 +12509,354 @@ interface AccountAuthConfig {
|
|
|
12355
12509
|
* whole control cluster (zoom in/out/fit, prev/next) rather than each button
|
|
12356
12510
|
* in it, matching how hosts actually want to hide/keep them as a unit.
|
|
12357
12511
|
*/
|
|
12358
|
-
type ToolbarButtonId = 'share' | 'broadcast' | 'export' | 'undo' | 'redo' | 'record' | 'notes' | 'fullscreen' | 'zoom' | 'navigation';
|
|
12512
|
+
type ToolbarButtonId = 'share' | 'broadcast' | 'export' | 'undo' | 'redo' | 'record' | 'notes' | 'fullscreen' | 'zoom' | 'navigation' | 'mergeShapes' | 'crop';
|
|
12359
12513
|
/** A top-level ribbon tab. `record` intentionally shares its id with the quick-access Record button above: both surface the same recording feature, so hiding one hides the other. */
|
|
12360
12514
|
type ToolbarTabId = 'file' | 'home' | 'insert' | 'draw' | 'design' | 'transitions' | 'animations' | 'slideShow' | 'record' | 'review' | 'view' | 'help';
|
|
12361
12515
|
type ToolbarActionId = ToolbarButtonId | ToolbarTabId;
|
|
12362
12516
|
//#endregion
|
|
12517
|
+
//#region src/render/options/viewer-options.d.ts
|
|
12518
|
+
/**
|
|
12519
|
+
* Full PowerPoint "File > Options" parity model.
|
|
12520
|
+
*
|
|
12521
|
+
* Groups mirror the ten categories of PowerPoint's Options dialog. Values are
|
|
12522
|
+
* flat primitives per group so the dialog panes can be rendered generically
|
|
12523
|
+
* from `VIEWER_OPTIONS_SCHEMA` in every binding. The legacy six-toggle
|
|
12524
|
+
* `ViewerPreferences` surface stays supported via the mapping helpers below.
|
|
12525
|
+
*/
|
|
12526
|
+
type ScreenTipStyle = 'descriptions' | 'plain' | 'off';
|
|
12527
|
+
type DisplayOptimization = 'appearance' | 'compatibility';
|
|
12528
|
+
type ImageResolutionPreset = 'highFidelity' | 'ppi330' | 'ppi220' | 'ppi150' | 'ppi96';
|
|
12529
|
+
type OpenDocumentsView = 'savedView' | 'normal' | 'outline' | 'slideSorter' | 'notes';
|
|
12530
|
+
type DefaultExportFormat = 'pptx' | 'pdf' | 'png';
|
|
12531
|
+
type QuickAccessPosition = 'above' | 'below';
|
|
12532
|
+
type FeedbackSoundScheme = 'modern' | 'classic';
|
|
12533
|
+
type OptionsPrintWhat = 'slides' | 'handouts' | 'notes' | 'outline';
|
|
12534
|
+
type OptionsPrintColorMode = 'color' | 'grayscale' | 'blackAndWhite';
|
|
12535
|
+
interface ViewerGeneralOptions {
|
|
12536
|
+
displayOptimization: DisplayOptimization;
|
|
12537
|
+
showMiniToolbar: boolean;
|
|
12538
|
+
enableLivePreview: boolean;
|
|
12539
|
+
collapseRibbonAutomatically: boolean;
|
|
12540
|
+
collapseSearchByDefault: boolean;
|
|
12541
|
+
screenTipStyle: ScreenTipStyle;
|
|
12542
|
+
userName: string;
|
|
12543
|
+
userInitials: string;
|
|
12544
|
+
showStartScreen: boolean;
|
|
12545
|
+
/**
|
|
12546
|
+
* Lets the user hand a local font file to the viewer so decks authored
|
|
12547
|
+
* with a font the browser lacks render with the real face.
|
|
12548
|
+
*
|
|
12549
|
+
* Off by default. The registration reads a file the user picks and adds it
|
|
12550
|
+
* to the page's font set for the session, which is a capability a host
|
|
12551
|
+
* embedding the viewer should opt into rather than inherit.
|
|
12552
|
+
*/
|
|
12553
|
+
enableCustomFontUpload: boolean;
|
|
12554
|
+
}
|
|
12555
|
+
interface ViewerProofingOptions {
|
|
12556
|
+
autoCorrectTwoInitialCapitals: boolean;
|
|
12557
|
+
autoCorrectCapitalizeFirstLetter: boolean;
|
|
12558
|
+
autoCorrectCapitalizeDayNames: boolean;
|
|
12559
|
+
autoCorrectSmartQuotes: boolean;
|
|
12560
|
+
autoCorrectHyphensToDash: boolean;
|
|
12561
|
+
autoCorrectFractions: boolean;
|
|
12562
|
+
autoCorrectOrdinals: boolean;
|
|
12563
|
+
ignoreUppercase: boolean;
|
|
12564
|
+
ignoreWordsWithNumbers: boolean;
|
|
12565
|
+
ignoreInternetAddresses: boolean;
|
|
12566
|
+
flagRepeatedWords: boolean;
|
|
12567
|
+
checkSpellingAsYouType: boolean;
|
|
12568
|
+
hideSpellingErrors: boolean;
|
|
12569
|
+
}
|
|
12570
|
+
/**
|
|
12571
|
+
* File > Options > Save.
|
|
12572
|
+
*
|
|
12573
|
+
* Font embedding deliberately has NO entry here. It is owned by the File >
|
|
12574
|
+
* Fonts panel, whose toggle is the one the save path reads (see
|
|
12575
|
+
* `render/font-embedding`: `describeFontEmbedding` decides the toggle's start
|
|
12576
|
+
* position and whether it can do anything at all, `embeddedFontSaveOptions`
|
|
12577
|
+
* turns it into the `PptxHandler.save()` slice). This group used to carry a
|
|
12578
|
+
* second `embedFonts` boolean, plus an `embedAllFontCharacters` companion, and
|
|
12579
|
+
* neither was read by anything: the pane moved a switch that changed no saved
|
|
12580
|
+
* byte, while the panel next door moved the real one. Two switches for one
|
|
12581
|
+
* setting, one of them lying, is worse than one switch in a less
|
|
12582
|
+
* PowerPoint-shaped place.
|
|
12583
|
+
*/
|
|
12584
|
+
interface ViewerSaveOptions {
|
|
12585
|
+
autoSave: boolean;
|
|
12586
|
+
autoRecoverIntervalMinutes: number;
|
|
12587
|
+
keepLastAutoRecoveredVersion: boolean;
|
|
12588
|
+
defaultExportFormat: DefaultExportFormat;
|
|
12589
|
+
cacheRetentionDays: number;
|
|
12590
|
+
clearCacheOnClose: boolean;
|
|
12591
|
+
}
|
|
12592
|
+
interface ViewerAccessibilityOptions {
|
|
12593
|
+
showAccessibilityStatus: boolean;
|
|
12594
|
+
feedbackWithSound: boolean;
|
|
12595
|
+
soundScheme: FeedbackSoundScheme;
|
|
12596
|
+
showShortcutKeysInScreenTips: boolean;
|
|
12597
|
+
reducedMotion: boolean;
|
|
12598
|
+
}
|
|
12599
|
+
interface ViewerAdvancedOptions {
|
|
12600
|
+
autoSelectEntireWord: boolean;
|
|
12601
|
+
allowTextDragAndDrop: boolean;
|
|
12602
|
+
maximumUndoSteps: number;
|
|
12603
|
+
useSmartCutAndPaste: boolean;
|
|
12604
|
+
showPasteOptionsButton: boolean;
|
|
12605
|
+
imageDefaultResolution: ImageResolutionPreset;
|
|
12606
|
+
doNotCompressImages: boolean;
|
|
12607
|
+
chartPropertiesFollowDataPoint: boolean;
|
|
12608
|
+
recentPresentationsCount: number;
|
|
12609
|
+
showVerticalRuler: boolean;
|
|
12610
|
+
showGrid: boolean;
|
|
12611
|
+
snapToGrid: boolean;
|
|
12612
|
+
disableHardwareAcceleration: boolean;
|
|
12613
|
+
/**
|
|
12614
|
+
* Force every opt-in interactive 3D scene (SmartArt, bar/line/area/pie/
|
|
12615
|
+
* surface charts) to fall back to its flat 2D rendering, even when the
|
|
12616
|
+
* host has enabled that scene via its own `smartArt3D`/`*Chart3D` prop.
|
|
12617
|
+
* A host opting in says "this deck may want 3D"; this is the viewer
|
|
12618
|
+
* user's own override for when the WebGL scenes it renders are too much
|
|
12619
|
+
* for their machine. See `resolve3DRenderingFlags`.
|
|
12620
|
+
*/
|
|
12621
|
+
disable3DRendering: boolean;
|
|
12622
|
+
/**
|
|
12623
|
+
* `p:animEffect/@filter="pixelate"` defaults to snapping the element to
|
|
12624
|
+
* its end state (`cutIn`/`cutOut`), matching PowerPoint's own behaviour
|
|
12625
|
+
* (COM `CreateVideo` frame-diffing shows PowerPoint performs no animation
|
|
12626
|
+
* at all for this filter value). This turns on the blocky mosaic reveal
|
|
12627
|
+
* this renderer can build instead, for a viewer that would rather show
|
|
12628
|
+
* something animating than PowerPoint's own instant swap. See
|
|
12629
|
+
* `resolveFilterEffect` in `animation-filter-effects.ts` and
|
|
12630
|
+
* `docs/guide/visual-effects.md`.
|
|
12631
|
+
*/
|
|
12632
|
+
pixelateMosaicAnimation: boolean;
|
|
12633
|
+
openDocumentsView: OpenDocumentsView;
|
|
12634
|
+
slideShowShowMenuOnRightClick: boolean;
|
|
12635
|
+
slideShowShowPopupToolbar: boolean;
|
|
12636
|
+
slideShowPromptKeepInkAnnotations: boolean;
|
|
12637
|
+
slideShowEndWithBlackSlide: boolean;
|
|
12638
|
+
printInBackground: boolean;
|
|
12639
|
+
printHighQuality: boolean;
|
|
12640
|
+
printUseMostRecentSettings: boolean;
|
|
12641
|
+
printWhat: OptionsPrintWhat;
|
|
12642
|
+
printColorMode: OptionsPrintColorMode;
|
|
12643
|
+
printHiddenSlides: boolean;
|
|
12644
|
+
printScaleToFit: boolean;
|
|
12645
|
+
printFrameSlides: boolean;
|
|
12646
|
+
}
|
|
12647
|
+
interface ViewerRibbonOptions {
|
|
12648
|
+
/** Ribbon tabs unticked in Customize Ribbon. The File tab can never be hidden. */
|
|
12649
|
+
hiddenTabIds: ToolbarTabId[];
|
|
12650
|
+
}
|
|
12651
|
+
interface ViewerQuickAccessOptions {
|
|
12652
|
+
visible: boolean;
|
|
12653
|
+
position: QuickAccessPosition;
|
|
12654
|
+
showCommandLabels: boolean;
|
|
12655
|
+
/** Ordered ids from `QUICK_ACCESS_COMMAND_CATALOG`. */
|
|
12656
|
+
commandIds: string[];
|
|
12657
|
+
}
|
|
12658
|
+
interface ViewerTrustOptions {
|
|
12659
|
+
openInProtectedView: boolean;
|
|
12660
|
+
allowExternalContent: boolean;
|
|
12661
|
+
confirmExternalHyperlinks: boolean;
|
|
12662
|
+
}
|
|
12663
|
+
interface ViewerOptions {
|
|
12664
|
+
general: ViewerGeneralOptions;
|
|
12665
|
+
proofing: ViewerProofingOptions;
|
|
12666
|
+
save: ViewerSaveOptions;
|
|
12667
|
+
accessibility: ViewerAccessibilityOptions;
|
|
12668
|
+
advanced: ViewerAdvancedOptions;
|
|
12669
|
+
ribbon: ViewerRibbonOptions;
|
|
12670
|
+
quickAccess: ViewerQuickAccessOptions;
|
|
12671
|
+
trust: ViewerTrustOptions;
|
|
12672
|
+
}
|
|
12673
|
+
type ViewerOptionsGroupId = keyof ViewerOptions;
|
|
12674
|
+
type ViewerOptionPrimitive = boolean | number | string;
|
|
12675
|
+
/** Every command the Edit Points right-click menu can offer. */
|
|
12676
|
+
type EditPointsCommandId = 'add-point' | 'delete-point' | 'delete-segment' | 'open-path' | 'close-path' | 'smooth-point' | 'straight-point' | 'corner-point' | 'straight-segment' | 'curved-segment' | 'exit';
|
|
12677
|
+
//#endregion
|
|
12678
|
+
//#region src/render/edit-points/freeform-tool-geometry.d.ts
|
|
12679
|
+
/** The two click-to-place drawing tools. */
|
|
12680
|
+
type FreeformToolKind = 'freeformShape' | 'curve';
|
|
12681
|
+
//#endregion
|
|
12682
|
+
//#region src/render/options/viewer-options-controls.d.ts
|
|
12683
|
+
/**
|
|
12684
|
+
* Control/section/tab descriptor types for the File > Options schema, plus
|
|
12685
|
+
* the terse constructors the tab-definition modules build panes with.
|
|
12686
|
+
*/
|
|
12687
|
+
type ViewerOptionsTabId = 'general' | 'proofing' | 'save' | 'language' | 'accessibility' | 'advanced' | 'ribbon' | 'quickAccess' | 'addIns' | 'trust';
|
|
12688
|
+
//#endregion
|
|
12689
|
+
//#region src/render/customization/customization-types.d.ts
|
|
12690
|
+
/** Keys of an options group whose value is a primitive (not an array). */
|
|
12691
|
+
type PrimitiveKeys<T> = { [K in keyof T]: T[K] extends ViewerOptionPrimitive ? K : never; }[keyof T] & string;
|
|
12692
|
+
/**
|
|
12693
|
+
* One File > Options setting, addressed as `<group>.<key>`, for example
|
|
12694
|
+
* `general.userName` or `advanced.showGrid`. The union is derived from the
|
|
12695
|
+
* `ViewerOptions` model itself, so a typo is a compile error.
|
|
12696
|
+
*/
|
|
12697
|
+
type OptionsSettingId = { [G in ViewerOptionsGroupId]: `${G}.${PrimitiveKeys<ViewerOptions[G]>}`; }[ViewerOptionsGroupId];
|
|
12698
|
+
/**
|
|
12699
|
+
* A File > Options page: the ten PowerPoint categories plus `ai`, the AI
|
|
12700
|
+
* assistant page a binding adds when the host configured an assistant.
|
|
12701
|
+
*/
|
|
12702
|
+
type OptionsPageId = ViewerOptionsTabId | 'ai';
|
|
12703
|
+
/**
|
|
12704
|
+
* One section of an Options page, addressed as `<page>.<section>`, for
|
|
12705
|
+
* example `general.personalize` or `advanced.print`. The full list is
|
|
12706
|
+
* `OPTIONS_SECTION_IDS` (derived from the schema at runtime).
|
|
12707
|
+
*/
|
|
12708
|
+
type OptionsSectionId = `${ViewerOptionsTabId}.${string}`;
|
|
12709
|
+
/** Values a host forces onto settings. */
|
|
12710
|
+
type OptionsSettingValues = Partial<Record<OptionsSettingId, ViewerOptionPrimitive>>;
|
|
12711
|
+
/** Ribbon and toolbar customisation. */
|
|
12712
|
+
interface RibbonCustomization {
|
|
12713
|
+
/** Ribbon tabs to remove (the File tab included, unlike Customize Ribbon). */
|
|
12714
|
+
hiddenTabs?: readonly ToolbarTabId[];
|
|
12715
|
+
/** Top-level toolbar buttons / control clusters to remove. */
|
|
12716
|
+
hiddenButtons?: readonly ToolbarButtonId[];
|
|
12717
|
+
}
|
|
12718
|
+
/** File > Options (the Settings dialog) customisation. */
|
|
12719
|
+
interface OptionsCustomization {
|
|
12720
|
+
/** Whole pages to remove from the dialog's category rail. */
|
|
12721
|
+
hiddenPages?: readonly OptionsPageId[];
|
|
12722
|
+
/** Sections (`<page>.<section>`) to remove from their page. */
|
|
12723
|
+
hiddenSections?: readonly OptionsSectionId[];
|
|
12724
|
+
/** Individual settings (`<group>.<key>`) to remove wherever they appear. */
|
|
12725
|
+
hiddenSettings?: readonly OptionsSettingId[];
|
|
12726
|
+
/**
|
|
12727
|
+
* Settings pinned to a fixed value. The value is forced into the options
|
|
12728
|
+
* store, user edits to it are ignored, and the control renders read-only.
|
|
12729
|
+
* Add the id to `hiddenSettings` too to lock it invisibly.
|
|
12730
|
+
*/
|
|
12731
|
+
locked?: OptionsSettingValues;
|
|
12732
|
+
/**
|
|
12733
|
+
* Host defaults: the value a setting starts at when the user has not saved
|
|
12734
|
+
* a choice of their own. "Reset" returns to these, not to the built-ins.
|
|
12735
|
+
*/
|
|
12736
|
+
defaults?: OptionsSettingValues;
|
|
12737
|
+
}
|
|
12738
|
+
/** File tab (backstage) customisation. */
|
|
12739
|
+
interface BackstageCustomization {
|
|
12740
|
+
/** Navigation entries (pages) to remove from the File tab. */
|
|
12741
|
+
hiddenPages?: readonly BackstagePage[];
|
|
12742
|
+
/** Action cards to remove from the pages that show them. */
|
|
12743
|
+
hiddenCards?: readonly BackstageCardId[];
|
|
12744
|
+
}
|
|
12745
|
+
/** Right-click menu customisation. */
|
|
12746
|
+
interface ContextMenuCustomization {
|
|
12747
|
+
/** Entries to remove from the element (right-click on a shape) menu. */
|
|
12748
|
+
hiddenElementCommands?: readonly ContextMenuCommandId[];
|
|
12749
|
+
/** Entries to remove from the empty-canvas menu. */
|
|
12750
|
+
hiddenCanvasCommands?: readonly CanvasContextMenuCommandId[];
|
|
12751
|
+
/**
|
|
12752
|
+
* Entries to remove from the Edit Points menu (right-click a vertex or a
|
|
12753
|
+
* segment while editing a shape's points).
|
|
12754
|
+
*/
|
|
12755
|
+
hiddenEditPointsCommands?: readonly EditPointsCommandId[];
|
|
12756
|
+
/** Remove the element context menu entirely. */
|
|
12757
|
+
disableElementMenu?: boolean;
|
|
12758
|
+
/** Remove the empty-canvas context menu entirely. */
|
|
12759
|
+
disableCanvasMenu?: boolean;
|
|
12760
|
+
}
|
|
12761
|
+
/**
|
|
12762
|
+
* A shortcut chord in the form `Mod+Shift+D`: modifiers `Mod` (Ctrl on
|
|
12763
|
+
* Windows/Linux, Cmd on macOS), `Ctrl`, `Meta`, `Alt`, `Shift`, joined by `+`,
|
|
12764
|
+
* followed by a `KeyboardEvent.key` value (`D`, `Delete`, `ArrowLeft`, `F2`).
|
|
12765
|
+
*/
|
|
12766
|
+
type ShortcutChord = string;
|
|
12767
|
+
/** Editor keyboard-shortcut customisation. */
|
|
12768
|
+
interface KeyboardCustomization {
|
|
12769
|
+
/** Turn every editor shortcut off (the host owns the keyboard). */
|
|
12770
|
+
disableAll?: boolean;
|
|
12771
|
+
/** Editor commands whose shortcut is turned off. */
|
|
12772
|
+
disabled?: readonly EditorKeyActionName[];
|
|
12773
|
+
/**
|
|
12774
|
+
* Replacement chords per command. A remapped command no longer answers to
|
|
12775
|
+
* its built-in chord; it answers to the chord(s) given here instead.
|
|
12776
|
+
*/
|
|
12777
|
+
remap?: Partial<Record<EditorKeyActionName, ShortcutChord | readonly ShortcutChord[]>>;
|
|
12778
|
+
}
|
|
12779
|
+
/**
|
|
12780
|
+
* Chrome regions a host can remove. Each id maps onto one region in every
|
|
12781
|
+
* binding; see `VIEWER_PANEL_IDS` for the catalogue.
|
|
12782
|
+
*/
|
|
12783
|
+
type ViewerPanelId = 'statusBar' | 'slidesPane' | 'inspector' | 'notes' | 'quickAccessToolbar' | 'titleBar';
|
|
12784
|
+
/** Feature areas that can be switched off as a whole. */
|
|
12785
|
+
type ViewerFeatureId = 'ai' | 'collaboration' | 'comments' | 'presentMode' | 'editPoints';
|
|
12786
|
+
/**
|
|
12787
|
+
* The click-to-place drawing tools of Insert > Shapes > Lines: Freeform:
|
|
12788
|
+
* Shape and Curve.
|
|
12789
|
+
*/
|
|
12790
|
+
type ViewerDrawingToolId = FreeformToolKind;
|
|
12791
|
+
/** Dialogs (and the entry points that open them) a host can remove. */
|
|
12792
|
+
type ViewerDialogId = 'options' | 'share' | 'broadcast' | 'print' | 'export';
|
|
12793
|
+
/** Export formats offered by the File > Export page. */
|
|
12794
|
+
type ViewerExportFormatId = 'pdf' | 'png' | 'video' | 'gif' | 'json' | 'copyImage';
|
|
12795
|
+
/**
|
|
12796
|
+
* The whole customisation object. Every field is optional; omitted fields hide
|
|
12797
|
+
* nothing and lock nothing.
|
|
12798
|
+
*/
|
|
12799
|
+
interface ViewerCustomization {
|
|
12800
|
+
ribbon?: RibbonCustomization;
|
|
12801
|
+
options?: OptionsCustomization;
|
|
12802
|
+
backstage?: BackstageCustomization;
|
|
12803
|
+
contextMenu?: ContextMenuCustomization;
|
|
12804
|
+
keyboard?: KeyboardCustomization;
|
|
12805
|
+
/** Chrome regions to remove (`true` hides). */
|
|
12806
|
+
hiddenPanels?: readonly ViewerPanelId[];
|
|
12807
|
+
/** Feature areas to switch off (their buttons, menus, pages and panels). */
|
|
12808
|
+
disabledFeatures?: readonly ViewerFeatureId[];
|
|
12809
|
+
/** Dialogs to remove, along with every entry point that opens them. */
|
|
12810
|
+
hiddenDialogs?: readonly ViewerDialogId[];
|
|
12811
|
+
/** Export formats to remove from File > Export. */
|
|
12812
|
+
hiddenExportFormats?: readonly ViewerExportFormatId[];
|
|
12813
|
+
/** Drawing tools to remove from the Insert > Shapes gallery. */
|
|
12814
|
+
hiddenDrawingTools?: readonly ViewerDrawingToolId[];
|
|
12815
|
+
}
|
|
12816
|
+
//#endregion
|
|
12817
|
+
//#region src/render/customization/customization-controller.d.ts
|
|
12818
|
+
/** The imperative methods every binding's component handle exposes. */
|
|
12819
|
+
interface ViewerCustomizationApi {
|
|
12820
|
+
/** The current customisation object (a snapshot; do not mutate). */
|
|
12821
|
+
getCustomization(): ViewerCustomization;
|
|
12822
|
+
/** Replace the whole customisation. */
|
|
12823
|
+
setCustomization(next: ViewerCustomization): void;
|
|
12824
|
+
/** Merge a partial customisation (see `mergeCustomization`). */
|
|
12825
|
+
updateCustomization(patch: ViewerCustomization): void;
|
|
12826
|
+
/** Drop every customisation, back to the stock UI. */
|
|
12827
|
+
resetCustomization(): void;
|
|
12828
|
+
hideRibbonTab(tab: ToolbarTabId): void;
|
|
12829
|
+
showRibbonTab(tab: ToolbarTabId): void;
|
|
12830
|
+
hideToolbarButton(button: ToolbarButtonId): void;
|
|
12831
|
+
showToolbarButton(button: ToolbarButtonId): void;
|
|
12832
|
+
hideOptionsPage(page: OptionsPageId): void;
|
|
12833
|
+
showOptionsPage(page: OptionsPageId): void;
|
|
12834
|
+
hideOptionsSection(section: OptionsSectionId): void;
|
|
12835
|
+
showOptionsSection(section: OptionsSectionId): void;
|
|
12836
|
+
hideSetting(setting: OptionsSettingId): void;
|
|
12837
|
+
showSetting(setting: OptionsSettingId): void;
|
|
12838
|
+
/** Pin a setting to `value`; `hidden` also removes it from the dialog. */
|
|
12839
|
+
lockSetting(setting: OptionsSettingId, value: ViewerOptionPrimitive, hidden?: boolean): void;
|
|
12840
|
+
unlockSetting(setting: OptionsSettingId): void;
|
|
12841
|
+
/** Set (or with `undefined`, clear) the host default for a setting. */
|
|
12842
|
+
setSettingDefault(setting: OptionsSettingId, value: ViewerOptionPrimitive | undefined): void;
|
|
12843
|
+
hideBackstagePage(page: BackstagePage): void;
|
|
12844
|
+
showBackstagePage(page: BackstagePage): void;
|
|
12845
|
+
hideBackstageCard(card: BackstageCardId): void;
|
|
12846
|
+
showBackstageCard(card: BackstageCardId): void;
|
|
12847
|
+
hideContextMenuCommand(command: ContextMenuCommandId): void;
|
|
12848
|
+
showContextMenuCommand(command: ContextMenuCommandId): void;
|
|
12849
|
+
hideCanvasContextMenuCommand(command: CanvasContextMenuCommandId): void;
|
|
12850
|
+
showCanvasContextMenuCommand(command: CanvasContextMenuCommandId): void;
|
|
12851
|
+
disableShortcut(action: EditorKeyActionName): void;
|
|
12852
|
+
enableShortcut(action: EditorKeyActionName): void;
|
|
12853
|
+
/** Move a command onto new chord(s); `undefined` restores the built-in chord. */
|
|
12854
|
+
remapShortcut(action: EditorKeyActionName, chords: ShortcutChord | readonly ShortcutChord[] | undefined): void;
|
|
12855
|
+
setPanelVisible(panel: ViewerPanelId, visible: boolean): void;
|
|
12856
|
+
setFeatureEnabled(feature: ViewerFeatureId, enabled: boolean): void;
|
|
12857
|
+
setDialogAvailable(dialog: ViewerDialogId, available: boolean): void;
|
|
12858
|
+
}
|
|
12859
|
+
//#endregion
|
|
12363
12860
|
//#region src/render/viewport-fit.d.ts
|
|
12364
12861
|
/** Unscaled CSS pixels reserved on each side of the ordinary viewer viewport. */
|
|
12365
12862
|
type ViewportFitPadding = number | {
|
|
@@ -12824,7 +13321,7 @@ interface CanvasContextMenuState {
|
|
|
12824
13321
|
y: number;
|
|
12825
13322
|
}
|
|
12826
13323
|
/** Identifies an action triggered from the element right-click context menu. */
|
|
12827
|
-
type ElementContextMenuAction = 'copy' | 'cut' | 'paste' | 'duplicate' | 'delete' | 'bring-forward' | 'send-backward' | 'bring-front' | 'send-back' | 'bringForward' | 'sendBackward' | 'bringToFront' | 'sendToBack' | 'comment' | 'addComment' | 'group' | 'ungroup' | 'editPoints' | 'editHyperlink' | 'edit-text' | 'save-as-picture' | 'edit-alt-text' | 'size-and-position' | 'format-shape';
|
|
13324
|
+
type ElementContextMenuAction = 'copy' | 'cut' | 'paste' | 'duplicate' | 'delete' | 'bring-forward' | 'send-backward' | 'bring-front' | 'send-back' | 'bringForward' | 'sendBackward' | 'bringToFront' | 'sendToBack' | 'comment' | 'addComment' | 'group' | 'ungroup' | 'editPoints' | 'edit-points' | 'editHyperlink' | 'edit-text' | 'save-as-picture' | 'edit-alt-text' | 'size-and-position' | 'format-shape';
|
|
12828
13325
|
/**
|
|
12829
13326
|
* State of an active marquee (rubber-band) selection rectangle.
|
|
12830
13327
|
* Created when the user clicks and drags on the canvas background,
|
|
@@ -13206,8 +13703,14 @@ interface PowerPointViewerProps extends ViewportFitOptions {
|
|
|
13206
13703
|
* @see {@link PptxAiConfig}
|
|
13207
13704
|
*/
|
|
13208
13705
|
ai?: PptxAiConfig;
|
|
13706
|
+
/**
|
|
13707
|
+
* Framework-neutral UI customisation. See docs/guide/customization.md.
|
|
13708
|
+
* Unioned with `hiddenActions`. A new object replaces the whole
|
|
13709
|
+
* customisation, including edits made through the handle helpers.
|
|
13710
|
+
*/
|
|
13711
|
+
customization?: ViewerCustomization;
|
|
13209
13712
|
}
|
|
13210
|
-
interface PowerPointViewerHandle extends FileViewerHandle, PowerPointViewerAPI {
|
|
13713
|
+
interface PowerPointViewerHandle extends FileViewerHandle, PowerPointViewerAPI, ViewerCustomizationApi {
|
|
13211
13714
|
getContent: () => Promise<Uint8Array>;
|
|
13212
13715
|
}
|
|
13213
13716
|
|