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/internals.d.ts
CHANGED
|
@@ -1483,8 +1483,16 @@ interface TextStyle {
|
|
|
1483
1483
|
textOutlineWidth?: number;
|
|
1484
1484
|
/** Text outline colour as hex string (`a:rPr > a:ln > a:solidFill`). */
|
|
1485
1485
|
textOutlineColor?: string;
|
|
1486
|
+
/** Text outline dash preset (`a:rPr > a:ln > a:prstDash/@val`), e.g. `dash`; absent for solid. */
|
|
1487
|
+
textOutlineDash?: string;
|
|
1486
1488
|
/** When true, the text body has no fill (`a:rPr > a:noFill`), producing hollow/outline-only text. */
|
|
1487
1489
|
textFillNone?: boolean;
|
|
1490
|
+
/**
|
|
1491
|
+
* When true, the run authored an EMPTY `<a:effectLst/>`: an explicit "no
|
|
1492
|
+
* effects" override that blocks an inherited shadow or glow. Kept so a
|
|
1493
|
+
* rewrite re-emits it instead of letting the inherited effect return.
|
|
1494
|
+
*/
|
|
1495
|
+
textEffectsExplicitNone?: boolean;
|
|
1488
1496
|
/** Superscript/subscript baseline shift as percentage (`a:rPr/@baseline`). Positive = super, negative = sub. */
|
|
1489
1497
|
baseline?: number;
|
|
1490
1498
|
/** Character spacing in hundredths of a point (`a:rPr/@spc`). */
|
|
@@ -1518,6 +1526,25 @@ interface TextStyle {
|
|
|
1518
1526
|
textFillPatternForeground?: string;
|
|
1519
1527
|
/** Text-level pattern background colour. */
|
|
1520
1528
|
textFillPatternBackground?: string;
|
|
1529
|
+
/**
|
|
1530
|
+
* Raw `a:rPr > a:blipFill` XML, preserved verbatim for round-trip
|
|
1531
|
+
* serialization AND as the input to the image resolution pass that fills
|
|
1532
|
+
* in {@link textFillBlipUrl} (parsing a run's fill happens synchronously,
|
|
1533
|
+
* with no zip/relationship access at that point; resolving the blip to a
|
|
1534
|
+
* displayable URL needs both, so it happens in a later async pass over
|
|
1535
|
+
* the slide's parsed elements, mirroring how a shape's OWN image fill is
|
|
1536
|
+
* resolved). A picture-filled text run (`a:rPr > a:blipFill`) was
|
|
1537
|
+
* documented as handled ("Handles gradient fills, pattern fills, and
|
|
1538
|
+
* image fills on text runs") but never actually parsed, so it silently
|
|
1539
|
+
* fell through to the run's plain `color` and rendered solid black
|
|
1540
|
+
* (COM-verified: `audit-text` slide 13's "PICTURE FILL" run shows the
|
|
1541
|
+
* fill image through the glyphs in PowerPoint).
|
|
1542
|
+
*/
|
|
1543
|
+
textFillBlipXml?: XmlObject;
|
|
1544
|
+
/** Resolved displayable URL for {@link textFillBlipXml}, or the archive-relative path when unresolved (lazy decode). */
|
|
1545
|
+
textFillBlipUrl?: string;
|
|
1546
|
+
/** Tiling mode for {@link textFillBlipUrl} (`a:blipFill/a:tile` present -> 'tile', else 'stretch'). */
|
|
1547
|
+
textFillBlipMode?: 'stretch' | 'tile';
|
|
1521
1548
|
hyperlink?: string;
|
|
1522
1549
|
/** Relationship ID for the hyperlink (`a:hlinkClick/@r:id`) — preserved for round-trip serialization. */
|
|
1523
1550
|
hyperlinkRId?: string;
|
|
@@ -1603,6 +1630,13 @@ interface TextStyle {
|
|
|
1603
1630
|
position: number;
|
|
1604
1631
|
align: 'l' | 'ctr' | 'r' | 'dec';
|
|
1605
1632
|
leader?: 'none' | 'dot' | 'hyphen' | 'underscore';
|
|
1633
|
+
/**
|
|
1634
|
+
* True when the source spelled out the schema-default `@algn="l"`, so the
|
|
1635
|
+
* writer re-emits it instead of treating it as an omitted default.
|
|
1636
|
+
*/
|
|
1637
|
+
alignAuthored?: boolean;
|
|
1638
|
+
/** True when the source spelled out the schema-default `@leader="none"`. */
|
|
1639
|
+
leaderAuthored?: boolean;
|
|
1606
1640
|
}>;
|
|
1607
1641
|
/**
|
|
1608
1642
|
* True when the paragraph's own `a:pPr` authored an EMPTY `<a:tabLst/>`
|
|
@@ -1966,6 +2000,19 @@ interface TextStyle {
|
|
|
1966
2000
|
* convention used for {@link bulletInfo} / {@link endParaRunProperties}).
|
|
1967
2001
|
*/
|
|
1968
2002
|
paragraphDefaultRunPropertiesXml?: XmlObject;
|
|
2003
|
+
/**
|
|
2004
|
+
* The bullet colour / size / typeface children (`a:buClrTx`, `a:buClr`,
|
|
2005
|
+
* `a:buSzTx`, `a:buSzPct`, `a:buSzPts`, `a:buFontTx`, `a:buFont`) a
|
|
2006
|
+
* paragraph authored in its own `<a:pPr>` WITHOUT a bullet type
|
|
2007
|
+
* (`a:buNone` / `a:buChar` / `a:buAutoNum` / `a:buBlip`), captured
|
|
2008
|
+
* verbatim in source order. Such a paragraph restyles an inherited bullet
|
|
2009
|
+
* rather than declaring one, so its {@link BulletInfo} resolves from the
|
|
2010
|
+
* cascade and is (correctly) not written back; without this capture the
|
|
2011
|
+
* paragraph's own override vanished on every rewrite.
|
|
2012
|
+
*
|
|
2013
|
+
* Only meaningful on a paragraph's own authored properties.
|
|
2014
|
+
*/
|
|
2015
|
+
paragraphBulletPropertiesXml?: XmlObject;
|
|
1969
2016
|
}
|
|
1970
2017
|
/**
|
|
1971
2018
|
* Structured bullet metadata attached to the first {@link TextSegment}
|
|
@@ -3234,6 +3281,26 @@ type PptxChartMarkerSymbol = 'circle' | 'dash' | 'diamond' | 'dot' | 'none' | 'p
|
|
|
3234
3281
|
*/
|
|
3235
3282
|
type PptxChartScatterStyle = 'none' | 'line' | 'lineMarker' | 'marker' | 'smooth' | 'smoothMarker';
|
|
3236
3283
|
/** Shape properties extracted from c:spPr for chart formatting. */
|
|
3284
|
+
/**
|
|
3285
|
+
* A render-ready gradient fill from a chart `c:spPr/a:gradFill` (chart area,
|
|
3286
|
+
* plot area or series). Positions are 0..100; a linear gradient's `angle` is
|
|
3287
|
+
* in degrees clockwise from left-to-right (`a:lin/@ang`); a radial (`a:path`)
|
|
3288
|
+
* gradient centres on `focalPoint` (0..1 fractions of the box), the middle
|
|
3289
|
+
* when absent.
|
|
3290
|
+
*/
|
|
3291
|
+
interface PptxChartGradientFill {
|
|
3292
|
+
type: 'linear' | 'radial';
|
|
3293
|
+
stops: Array<{
|
|
3294
|
+
color: string;
|
|
3295
|
+
position: number;
|
|
3296
|
+
opacity?: number;
|
|
3297
|
+
}>;
|
|
3298
|
+
angle?: number;
|
|
3299
|
+
focalPoint?: {
|
|
3300
|
+
x: number;
|
|
3301
|
+
y: number;
|
|
3302
|
+
};
|
|
3303
|
+
}
|
|
3237
3304
|
interface PptxChartShapeProps {
|
|
3238
3305
|
fillColor?: string;
|
|
3239
3306
|
strokeColor?: string;
|
|
@@ -3559,6 +3626,12 @@ interface PptxChartSeries {
|
|
|
3559
3626
|
*/
|
|
3560
3627
|
idx?: number;
|
|
3561
3628
|
values: number[];
|
|
3629
|
+
/**
|
|
3630
|
+
* Series gradient fill (`c:ser/c:spPr/a:gradFill`), painted on every mark
|
|
3631
|
+
* of the series that has no per-point override. Render-only: the series'
|
|
3632
|
+
* own `c:spPr` round-trips untouched.
|
|
3633
|
+
*/
|
|
3634
|
+
gradientFill?: PptxChartGradientFill;
|
|
3562
3635
|
/**
|
|
3563
3636
|
* Per-series x values from `c:ser/c:xVal` (scatter and bubble series only).
|
|
3564
3637
|
*
|
|
@@ -3733,6 +3806,12 @@ interface PptxChartFilteredSeries {
|
|
|
3733
3806
|
* and `c:dLblPos`.
|
|
3734
3807
|
*/
|
|
3735
3808
|
interface PptxChartDataLabelOptions {
|
|
3809
|
+
/** Label box fill/outline (`c:dLbls/c:spPr`), see `chart-data-label-box.ts`. */
|
|
3810
|
+
labelShape?: PptxChartShapeProps;
|
|
3811
|
+
/** Callout geometry of the label box (`c15:spPr/a:prstGeom/@prst`, e.g. `wedgeRectCallout`). */
|
|
3812
|
+
calloutShape?: string;
|
|
3813
|
+
/** The chart15 extension's `c15:showLeaderLines`, which wins for a moved label's leader line. */
|
|
3814
|
+
extLeaderLines?: boolean;
|
|
3736
3815
|
/** Show the numeric value (`c:showVal`). */
|
|
3737
3816
|
showValue?: boolean;
|
|
3738
3817
|
/** Show the category name (`c:showCatName`). */
|
|
@@ -3858,6 +3937,10 @@ interface PptxChartStyle {
|
|
|
3858
3937
|
chartAreaFill?: string;
|
|
3859
3938
|
/** Plot-area fill from `c:plotArea/c:spPr`. See {@link chartAreaFill}. */
|
|
3860
3939
|
plotAreaFill?: string;
|
|
3940
|
+
/** Chart-area gradient (`c:chartSpace/c:spPr/a:gradFill`); wins over {@link chartAreaFill}. */
|
|
3941
|
+
chartAreaGradient?: PptxChartGradientFill;
|
|
3942
|
+
/** Plot-area gradient (`c:plotArea/c:spPr/a:gradFill`); wins over {@link plotAreaFill}. */
|
|
3943
|
+
plotAreaGradient?: PptxChartGradientFill;
|
|
3861
3944
|
/** Whether data labels are shown. */
|
|
3862
3945
|
hasDataLabels?: boolean;
|
|
3863
3946
|
/** Chart-level data-label content/position options (when `hasDataLabels`). */
|
|
@@ -7736,7 +7819,15 @@ type PptxAnimationTimingCurve = 'ease' | 'ease-in' | 'ease-out' | 'linear';
|
|
|
7736
7819
|
/** Repeat mode for animations. */
|
|
7737
7820
|
type PptxAnimationRepeatMode = 'untilNextClick' | 'untilEndOfSlide';
|
|
7738
7821
|
/** Animation trigger type from OOXML `p:cTn`. */
|
|
7739
|
-
type PptxAnimationTrigger = 'onClick' | 'onShapeClick' | 'onHover' | 'afterPrevious' | 'withPrevious' | 'afterDelay'
|
|
7822
|
+
type PptxAnimationTrigger = 'onClick' | 'onShapeClick' | 'onHover' | 'afterPrevious' | 'withPrevious' | 'afterDelay' |
|
|
7823
|
+
/**
|
|
7824
|
+
* Starts when a media element's playback reaches a named bookmark
|
|
7825
|
+
* (PowerPoint's "Trigger > On Bookmark"). The media element is
|
|
7826
|
+
* {@link PptxElementAnimation.triggerShapeId} and the bookmark
|
|
7827
|
+
* {@link PptxElementAnimation.triggerBookmark}; saved as an interactive
|
|
7828
|
+
* sequence gated on `p:cond evt="onMediaBookmark"` with a `p14:bmkTgt`.
|
|
7829
|
+
*/
|
|
7830
|
+
'onMediaBookmark';
|
|
7740
7831
|
/**
|
|
7741
7832
|
* Native animation kind. The historic shape-targeted preset animations are
|
|
7742
7833
|
* implicitly the default kind (`undefined`). Media animations (`p:audio`,
|
|
@@ -7889,8 +7980,13 @@ interface PptxNativeAnimation {
|
|
|
7889
7980
|
target?: PptxAnimationTarget;
|
|
7890
7981
|
/** Trigger type. */
|
|
7891
7982
|
trigger?: PptxAnimationTrigger;
|
|
7892
|
-
/**
|
|
7983
|
+
/**
|
|
7984
|
+
* Shape ID that triggers this animation: the clicked shape of an
|
|
7985
|
+
* interactive sequence, or the media element of an `onMediaBookmark` one.
|
|
7986
|
+
*/
|
|
7893
7987
|
triggerShapeId?: string;
|
|
7988
|
+
/** Bookmark name an `onMediaBookmark` interactive sequence waits for. */
|
|
7989
|
+
triggerBookmark?: string;
|
|
7894
7990
|
/** Whether this effect belongs to an OOXML `interactiveSeq`. */
|
|
7895
7991
|
interactiveSequence?: boolean;
|
|
7896
7992
|
/** Whether `p:endSync/p:rtn[@val="all"]` makes that sequence replayable. */
|
|
@@ -8389,12 +8485,15 @@ interface PptxAttributeAnimation {
|
|
|
8389
8485
|
/**
|
|
8390
8486
|
* `p:anim/@_p14:bounceEnd` (Office 2010 `p14` extension attribute,
|
|
8391
8487
|
* MS-OI29500), normalized to a 0-1 fraction of this behaviour's own
|
|
8392
|
-
* duration. PowerPoint's
|
|
8393
|
-
*
|
|
8394
|
-
*
|
|
8395
|
-
*
|
|
8396
|
-
* the
|
|
8397
|
-
*
|
|
8488
|
+
* duration. PowerPoint's "Bounce End" effect option (COM:
|
|
8489
|
+
* `Effect.Timing.BounceEnd` + `BounceEndIntensity`) writes this on the
|
|
8490
|
+
* position-ramp `p:anim` node(s): the share of the duration spent
|
|
8491
|
+
* BOUNCING at the end. Measured from PowerPoint's own CreateVideo frames,
|
|
8492
|
+
* the travel completes at `1 - bounceEnd` and the rest is a damped
|
|
8493
|
+
* oscillation about the final value (see shared's `animation-bounce-end`).
|
|
8494
|
+
* Mirrored verbatim by PowerPoint onto the enclosing
|
|
8495
|
+
* `p:cTn/@_p14:presetBounceEnd`. Absent for every animation that doesn't
|
|
8496
|
+
* use this effect option (the overwhelming majority).
|
|
8398
8497
|
*/
|
|
8399
8498
|
bounceEnd?: number;
|
|
8400
8499
|
}
|
|
@@ -8572,9 +8671,24 @@ interface PptxElementAnimation {
|
|
|
8572
8671
|
durationMs?: number;
|
|
8573
8672
|
delayMs?: number;
|
|
8574
8673
|
order?: number;
|
|
8674
|
+
/**
|
|
8675
|
+
* The {@link order} the loader derived from the slide's `p:timing` tree for
|
|
8676
|
+
* an entry whose `pptx:editorMeta` record authored no `@order`. The tree
|
|
8677
|
+
* already expresses that position (and every load re-derives it), so the
|
|
8678
|
+
* writer omits `@order` while `order` still equals this value; a reorder
|
|
8679
|
+
* changes `order` and the attribute is written again. Load-time bookkeeping
|
|
8680
|
+
* only; never set it by hand.
|
|
8681
|
+
*/
|
|
8682
|
+
orderFromTimeline?: number;
|
|
8575
8683
|
trigger?: PptxAnimationTrigger;
|
|
8576
|
-
/**
|
|
8684
|
+
/**
|
|
8685
|
+
* Shape ID that triggers this animation: the shape clicked for
|
|
8686
|
+
* `onShapeClick`, or the media element whose bookmark fires it for
|
|
8687
|
+
* `onMediaBookmark`.
|
|
8688
|
+
*/
|
|
8577
8689
|
triggerShapeId?: string;
|
|
8690
|
+
/** Bookmark name (`p14:bmk/@name`) an `onMediaBookmark` trigger waits for. */
|
|
8691
|
+
triggerBookmark?: string;
|
|
8578
8692
|
timingCurve?: PptxAnimationTimingCurve;
|
|
8579
8693
|
repeatCount?: number;
|
|
8580
8694
|
repeatMode?: PptxAnimationRepeatMode;
|
|
@@ -13354,6 +13468,31 @@ interface PresentationInkStroke {
|
|
|
13354
13468
|
width: number;
|
|
13355
13469
|
points: PresentationInkPoint[];
|
|
13356
13470
|
}
|
|
13471
|
+
/** A logical editor command produced by one key press. */
|
|
13472
|
+
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';
|
|
13473
|
+
//#endregion
|
|
13474
|
+
//#region src/render/merge-shapes/merge-shapes-menu.d.ts
|
|
13475
|
+
/** The right-click command id for each operation. */
|
|
13476
|
+
type MergeShapesCommandId = 'merge-union' | 'merge-combine' | 'merge-fragment' | 'merge-intersect' | 'merge-subtract';
|
|
13477
|
+
/** Every command a canvas context menu can offer, in no particular order. */
|
|
13478
|
+
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';
|
|
13479
|
+
//#endregion
|
|
13480
|
+
//#region src/render/canvas-context-menu-commands.d.ts
|
|
13481
|
+
/**
|
|
13482
|
+
* The right-click menu for the empty slide canvas (no element under the
|
|
13483
|
+
* cursor), as distinct from {@link ./context-menu-commands}'s per-element menu.
|
|
13484
|
+
*
|
|
13485
|
+
* Right-clicking empty canvas used to do nothing at all in every binding: React
|
|
13486
|
+
* and Vue both bailed out early (`getElementIdFromEvent` returns `null`, so the
|
|
13487
|
+
* handler just returns) rather than opening a menu, and the other three never
|
|
13488
|
+
* wired a handler for it either. PowerPoint offers Paste, Layout, Reset,
|
|
13489
|
+
* Format Background and view toggles (Grid and Guides, Ruler) from this menu;
|
|
13490
|
+
* this module is the one list every binding renders instead of five omissions.
|
|
13491
|
+
*
|
|
13492
|
+
* @module render/canvas-context-menu-commands
|
|
13493
|
+
*/
|
|
13494
|
+
/** Every command the empty-canvas context menu can offer, in no particular order. */
|
|
13495
|
+
type CanvasContextMenuCommandId = 'paste' | 'layout' | 'reset-slide' | 'format-background' | 'grid-and-guides' | 'ruler';
|
|
13357
13496
|
//#endregion
|
|
13358
13497
|
//#region src/render/paste-special.d.ts
|
|
13359
13498
|
/** The four paste formats PowerPoint's Paste Options / Paste Special offer. */
|
|
@@ -13487,6 +13626,21 @@ interface AutosaveRecoveryPrompt {
|
|
|
13487
13626
|
readonly restoreKey: string;
|
|
13488
13627
|
readonly discardKey: string;
|
|
13489
13628
|
}
|
|
13629
|
+
type BackstagePage = 'home' | 'new' | 'open' | 'info' | 'save' | 'saveAs' | 'print' | 'share' | 'export' | 'close' | 'account' | 'options';
|
|
13630
|
+
//#endregion
|
|
13631
|
+
//#region src/render/backstage-cards.d.ts
|
|
13632
|
+
/**
|
|
13633
|
+
* Every action card the File-tab backstage can show, keyed by the operation it
|
|
13634
|
+
* triggers rather than by its wording.
|
|
13635
|
+
*
|
|
13636
|
+
* The five bindings used to hardcode a title and a body string each, which made
|
|
13637
|
+
* the whole backstage untranslatable and let the copy drift: the same card
|
|
13638
|
+
* carried four different descriptions depending on which binding you opened it
|
|
13639
|
+
* in. Both halves now live here as a dictionary key plus an English fallback,
|
|
13640
|
+
* so a wording change lands everywhere at once and a translator only has to
|
|
13641
|
+
* translate it once.
|
|
13642
|
+
*/
|
|
13643
|
+
type BackstageCardId = 'protect' | 'inspect' | 'embedFonts' | 'signatures' | 'versionHistory' | 'saveAsPptx' | 'saveAsPpsx' | 'saveAsPptm' | 'saveAsPpt' | 'pdf' | 'png' | 'video' | 'gif' | 'json' | 'copyImage' | 'print' | 'share';
|
|
13490
13644
|
//#endregion
|
|
13491
13645
|
//#region src/render/master-view.d.ts
|
|
13492
13646
|
/** Which part the master view is currently pointed at. */
|
|
@@ -13585,7 +13739,7 @@ interface AuthoredSlideRange {
|
|
|
13585
13739
|
* whole control cluster (zoom in/out/fit, prev/next) rather than each button
|
|
13586
13740
|
* in it, matching how hosts actually want to hide/keep them as a unit.
|
|
13587
13741
|
*/
|
|
13588
|
-
type ToolbarButtonId = 'share' | 'broadcast' | 'export' | 'undo' | 'redo' | 'record' | 'notes' | 'fullscreen' | 'zoom' | 'navigation';
|
|
13742
|
+
type ToolbarButtonId = 'share' | 'broadcast' | 'export' | 'undo' | 'redo' | 'record' | 'notes' | 'fullscreen' | 'zoom' | 'navigation' | 'mergeShapes' | 'crop';
|
|
13589
13743
|
/** 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. */
|
|
13590
13744
|
type ToolbarTabId = 'file' | 'home' | 'insert' | 'draw' | 'design' | 'transitions' | 'animations' | 'slideShow' | 'record' | 'review' | 'view' | 'help';
|
|
13591
13745
|
type ToolbarActionId = ToolbarButtonId | ToolbarTabId;
|
|
@@ -13791,6 +13945,154 @@ interface PrintSettings {
|
|
|
13791
13945
|
*/
|
|
13792
13946
|
scaleToFit?: boolean;
|
|
13793
13947
|
}
|
|
13948
|
+
/** Every command the Edit Points right-click menu can offer. */
|
|
13949
|
+
type EditPointsCommandId = 'add-point' | 'delete-point' | 'delete-segment' | 'open-path' | 'close-path' | 'smooth-point' | 'straight-point' | 'corner-point' | 'straight-segment' | 'curved-segment' | 'exit';
|
|
13950
|
+
//#endregion
|
|
13951
|
+
//#region src/render/edit-points/freeform-tool-geometry.d.ts
|
|
13952
|
+
/** The two click-to-place drawing tools. */
|
|
13953
|
+
type FreeformToolKind = 'freeformShape' | 'curve';
|
|
13954
|
+
//#endregion
|
|
13955
|
+
//#region src/render/options/viewer-options-controls.d.ts
|
|
13956
|
+
/**
|
|
13957
|
+
* Control/section/tab descriptor types for the File > Options schema, plus
|
|
13958
|
+
* the terse constructors the tab-definition modules build panes with.
|
|
13959
|
+
*/
|
|
13960
|
+
type ViewerOptionsTabId = 'general' | 'proofing' | 'save' | 'language' | 'accessibility' | 'advanced' | 'ribbon' | 'quickAccess' | 'addIns' | 'trust';
|
|
13961
|
+
//#endregion
|
|
13962
|
+
//#region src/render/customization/customization-types.d.ts
|
|
13963
|
+
/** Keys of an options group whose value is a primitive (not an array). */
|
|
13964
|
+
type PrimitiveKeys<T> = { [K in keyof T]: T[K] extends ViewerOptionPrimitive ? K : never; }[keyof T] & string;
|
|
13965
|
+
/**
|
|
13966
|
+
* One File > Options setting, addressed as `<group>.<key>`, for example
|
|
13967
|
+
* `general.userName` or `advanced.showGrid`. The union is derived from the
|
|
13968
|
+
* `ViewerOptions` model itself, so a typo is a compile error.
|
|
13969
|
+
*/
|
|
13970
|
+
type OptionsSettingId = { [G in ViewerOptionsGroupId]: `${G}.${PrimitiveKeys<ViewerOptions[G]>}`; }[ViewerOptionsGroupId];
|
|
13971
|
+
/**
|
|
13972
|
+
* A File > Options page: the ten PowerPoint categories plus `ai`, the AI
|
|
13973
|
+
* assistant page a binding adds when the host configured an assistant.
|
|
13974
|
+
*/
|
|
13975
|
+
type OptionsPageId = ViewerOptionsTabId | 'ai';
|
|
13976
|
+
/**
|
|
13977
|
+
* One section of an Options page, addressed as `<page>.<section>`, for
|
|
13978
|
+
* example `general.personalize` or `advanced.print`. The full list is
|
|
13979
|
+
* `OPTIONS_SECTION_IDS` (derived from the schema at runtime).
|
|
13980
|
+
*/
|
|
13981
|
+
type OptionsSectionId = `${ViewerOptionsTabId}.${string}`;
|
|
13982
|
+
/** Values a host forces onto settings. */
|
|
13983
|
+
type OptionsSettingValues = Partial<Record<OptionsSettingId, ViewerOptionPrimitive>>;
|
|
13984
|
+
/** Ribbon and toolbar customisation. */
|
|
13985
|
+
interface RibbonCustomization {
|
|
13986
|
+
/** Ribbon tabs to remove (the File tab included, unlike Customize Ribbon). */
|
|
13987
|
+
hiddenTabs?: readonly ToolbarTabId[];
|
|
13988
|
+
/** Top-level toolbar buttons / control clusters to remove. */
|
|
13989
|
+
hiddenButtons?: readonly ToolbarButtonId[];
|
|
13990
|
+
}
|
|
13991
|
+
/** File > Options (the Settings dialog) customisation. */
|
|
13992
|
+
interface OptionsCustomization {
|
|
13993
|
+
/** Whole pages to remove from the dialog's category rail. */
|
|
13994
|
+
hiddenPages?: readonly OptionsPageId[];
|
|
13995
|
+
/** Sections (`<page>.<section>`) to remove from their page. */
|
|
13996
|
+
hiddenSections?: readonly OptionsSectionId[];
|
|
13997
|
+
/** Individual settings (`<group>.<key>`) to remove wherever they appear. */
|
|
13998
|
+
hiddenSettings?: readonly OptionsSettingId[];
|
|
13999
|
+
/**
|
|
14000
|
+
* Settings pinned to a fixed value. The value is forced into the options
|
|
14001
|
+
* store, user edits to it are ignored, and the control renders read-only.
|
|
14002
|
+
* Add the id to `hiddenSettings` too to lock it invisibly.
|
|
14003
|
+
*/
|
|
14004
|
+
locked?: OptionsSettingValues;
|
|
14005
|
+
/**
|
|
14006
|
+
* Host defaults: the value a setting starts at when the user has not saved
|
|
14007
|
+
* a choice of their own. "Reset" returns to these, not to the built-ins.
|
|
14008
|
+
*/
|
|
14009
|
+
defaults?: OptionsSettingValues;
|
|
14010
|
+
}
|
|
14011
|
+
/** File tab (backstage) customisation. */
|
|
14012
|
+
interface BackstageCustomization {
|
|
14013
|
+
/** Navigation entries (pages) to remove from the File tab. */
|
|
14014
|
+
hiddenPages?: readonly BackstagePage[];
|
|
14015
|
+
/** Action cards to remove from the pages that show them. */
|
|
14016
|
+
hiddenCards?: readonly BackstageCardId[];
|
|
14017
|
+
}
|
|
14018
|
+
/** Right-click menu customisation. */
|
|
14019
|
+
interface ContextMenuCustomization {
|
|
14020
|
+
/** Entries to remove from the element (right-click on a shape) menu. */
|
|
14021
|
+
hiddenElementCommands?: readonly ContextMenuCommandId[];
|
|
14022
|
+
/** Entries to remove from the empty-canvas menu. */
|
|
14023
|
+
hiddenCanvasCommands?: readonly CanvasContextMenuCommandId[];
|
|
14024
|
+
/**
|
|
14025
|
+
* Entries to remove from the Edit Points menu (right-click a vertex or a
|
|
14026
|
+
* segment while editing a shape's points).
|
|
14027
|
+
*/
|
|
14028
|
+
hiddenEditPointsCommands?: readonly EditPointsCommandId[];
|
|
14029
|
+
/** Remove the element context menu entirely. */
|
|
14030
|
+
disableElementMenu?: boolean;
|
|
14031
|
+
/** Remove the empty-canvas context menu entirely. */
|
|
14032
|
+
disableCanvasMenu?: boolean;
|
|
14033
|
+
}
|
|
14034
|
+
/**
|
|
14035
|
+
* A shortcut chord in the form `Mod+Shift+D`: modifiers `Mod` (Ctrl on
|
|
14036
|
+
* Windows/Linux, Cmd on macOS), `Ctrl`, `Meta`, `Alt`, `Shift`, joined by `+`,
|
|
14037
|
+
* followed by a `KeyboardEvent.key` value (`D`, `Delete`, `ArrowLeft`, `F2`).
|
|
14038
|
+
*/
|
|
14039
|
+
type ShortcutChord = string;
|
|
14040
|
+
/** Editor keyboard-shortcut customisation. */
|
|
14041
|
+
interface KeyboardCustomization {
|
|
14042
|
+
/** Turn every editor shortcut off (the host owns the keyboard). */
|
|
14043
|
+
disableAll?: boolean;
|
|
14044
|
+
/** Editor commands whose shortcut is turned off. */
|
|
14045
|
+
disabled?: readonly EditorKeyActionName[];
|
|
14046
|
+
/**
|
|
14047
|
+
* Replacement chords per command. A remapped command no longer answers to
|
|
14048
|
+
* its built-in chord; it answers to the chord(s) given here instead.
|
|
14049
|
+
*/
|
|
14050
|
+
remap?: Partial<Record<EditorKeyActionName, ShortcutChord | readonly ShortcutChord[]>>;
|
|
14051
|
+
}
|
|
14052
|
+
/**
|
|
14053
|
+
* Chrome regions a host can remove. Each id maps onto one region in every
|
|
14054
|
+
* binding; see `VIEWER_PANEL_IDS` for the catalogue.
|
|
14055
|
+
*/
|
|
14056
|
+
type ViewerPanelId = 'statusBar' | 'slidesPane' | 'inspector' | 'notes' | 'quickAccessToolbar' | 'titleBar';
|
|
14057
|
+
/** Feature areas that can be switched off as a whole. */
|
|
14058
|
+
type ViewerFeatureId = 'ai' | 'collaboration' | 'comments' | 'presentMode' | 'editPoints';
|
|
14059
|
+
/**
|
|
14060
|
+
* The click-to-place drawing tools of Insert > Shapes > Lines: Freeform:
|
|
14061
|
+
* Shape and Curve.
|
|
14062
|
+
*/
|
|
14063
|
+
type ViewerDrawingToolId = FreeformToolKind;
|
|
14064
|
+
/** Dialogs (and the entry points that open them) a host can remove. */
|
|
14065
|
+
type ViewerDialogId = 'options' | 'share' | 'broadcast' | 'print' | 'export';
|
|
14066
|
+
/** Export formats offered by the File > Export page. */
|
|
14067
|
+
type ViewerExportFormatId = 'pdf' | 'png' | 'video' | 'gif' | 'json' | 'copyImage';
|
|
14068
|
+
/**
|
|
14069
|
+
* The whole customisation object. Every field is optional; omitted fields hide
|
|
14070
|
+
* nothing and lock nothing.
|
|
14071
|
+
*/
|
|
14072
|
+
interface ViewerCustomization {
|
|
14073
|
+
ribbon?: RibbonCustomization;
|
|
14074
|
+
options?: OptionsCustomization;
|
|
14075
|
+
backstage?: BackstageCustomization;
|
|
14076
|
+
contextMenu?: ContextMenuCustomization;
|
|
14077
|
+
keyboard?: KeyboardCustomization;
|
|
14078
|
+
/** Chrome regions to remove (`true` hides). */
|
|
14079
|
+
hiddenPanels?: readonly ViewerPanelId[];
|
|
14080
|
+
/** Feature areas to switch off (their buttons, menus, pages and panels). */
|
|
14081
|
+
disabledFeatures?: readonly ViewerFeatureId[];
|
|
14082
|
+
/** Dialogs to remove, along with every entry point that opens them. */
|
|
14083
|
+
hiddenDialogs?: readonly ViewerDialogId[];
|
|
14084
|
+
/** Export formats to remove from File > Export. */
|
|
14085
|
+
hiddenExportFormats?: readonly ViewerExportFormatId[];
|
|
14086
|
+
/** Drawing tools to remove from the Insert > Shapes gallery. */
|
|
14087
|
+
hiddenDrawingTools?: readonly ViewerDrawingToolId[];
|
|
14088
|
+
}
|
|
14089
|
+
//#endregion
|
|
14090
|
+
//#region src/render/options/viewer-options-constraints.d.ts
|
|
14091
|
+
/** Locks and host defaults, both keyed `<group>.<key>`. */
|
|
14092
|
+
interface ViewerOptionsConstraints {
|
|
14093
|
+
locked?: OptionsSettingValues;
|
|
14094
|
+
defaults?: OptionsSettingValues;
|
|
14095
|
+
}
|
|
13794
14096
|
//#endregion
|
|
13795
14097
|
//#region src/render/options/viewer-options-store.d.ts
|
|
13796
14098
|
/**
|
|
@@ -13835,6 +14137,98 @@ interface ViewerOptionsStore {
|
|
|
13835
14137
|
* operation costs a single render instead of one per field.
|
|
13836
14138
|
*/
|
|
13837
14139
|
batch(write: () => void): void;
|
|
14140
|
+
/**
|
|
14141
|
+
* Apply host constraints (see `ViewerOptionsConstraints`): `locked` values
|
|
14142
|
+
* are forced in and every later write to them is ignored; `defaults`
|
|
14143
|
+
* replace the built-in defaults for settings the user never saved, and
|
|
14144
|
+
* become what `reset` returns to. Replaces any previous constraints.
|
|
14145
|
+
*/
|
|
14146
|
+
setConstraints(constraints: ViewerOptionsConstraints): void;
|
|
14147
|
+
/** True when the host locked `<group>.<key>`. */
|
|
14148
|
+
isLocked(group: ViewerOptionsGroupId, key: string): boolean;
|
|
14149
|
+
}
|
|
14150
|
+
//#endregion
|
|
14151
|
+
//#region src/render/customization/customization-keymap.d.ts
|
|
14152
|
+
/** A parsed `Mod+Shift+D` chord. */
|
|
14153
|
+
interface ParsedShortcutChord {
|
|
14154
|
+
key: string;
|
|
14155
|
+
mod: boolean;
|
|
14156
|
+
ctrl: boolean;
|
|
14157
|
+
meta: boolean;
|
|
14158
|
+
alt: boolean;
|
|
14159
|
+
shift: boolean;
|
|
14160
|
+
}
|
|
14161
|
+
/** The normalised keyboard slice of a resolved customisation. */
|
|
14162
|
+
interface ResolvedKeyboardCustomization {
|
|
14163
|
+
disableAll: boolean;
|
|
14164
|
+
disabled: ReadonlySet<EditorKeyActionName>;
|
|
14165
|
+
remap: ReadonlyMap<EditorKeyActionName, readonly ParsedShortcutChord[]>;
|
|
14166
|
+
}
|
|
14167
|
+
//#endregion
|
|
14168
|
+
//#region src/render/customization/customization-resolve.d.ts
|
|
14169
|
+
/** The normalised, set-based view of a customisation. Treat as immutable. */
|
|
14170
|
+
interface ResolvedCustomization {
|
|
14171
|
+
hiddenActions: ReadonlySet<ToolbarActionId>;
|
|
14172
|
+
hiddenOptionsPages: ReadonlySet<OptionsPageId>;
|
|
14173
|
+
hiddenOptionsSections: ReadonlySet<OptionsSectionId>;
|
|
14174
|
+
hiddenSettings: ReadonlySet<OptionsSettingId>;
|
|
14175
|
+
lockedSettings: OptionsSettingValues;
|
|
14176
|
+
defaultSettings: OptionsSettingValues;
|
|
14177
|
+
hiddenBackstagePages: ReadonlySet<BackstagePage>;
|
|
14178
|
+
hiddenBackstageCards: ReadonlySet<BackstageCardId>;
|
|
14179
|
+
hiddenElementCommands: ReadonlySet<ContextMenuCommandId>;
|
|
14180
|
+
hiddenCanvasCommands: ReadonlySet<CanvasContextMenuCommandId>;
|
|
14181
|
+
hiddenEditPointsCommands: ReadonlySet<EditPointsCommandId>;
|
|
14182
|
+
hiddenDrawingTools: ReadonlySet<ViewerDrawingToolId>;
|
|
14183
|
+
elementMenuEnabled: boolean;
|
|
14184
|
+
canvasMenuEnabled: boolean;
|
|
14185
|
+
hiddenPanels: ReadonlySet<ViewerPanelId>;
|
|
14186
|
+
disabledFeatures: ReadonlySet<ViewerFeatureId>;
|
|
14187
|
+
hiddenDialogs: ReadonlySet<ViewerDialogId>;
|
|
14188
|
+
keyboard: ResolvedKeyboardCustomization;
|
|
14189
|
+
}
|
|
14190
|
+
//#endregion
|
|
14191
|
+
//#region src/render/customization/customization-controller.d.ts
|
|
14192
|
+
/** The imperative methods every binding's component handle exposes. */
|
|
14193
|
+
interface ViewerCustomizationApi {
|
|
14194
|
+
/** The current customisation object (a snapshot; do not mutate). */
|
|
14195
|
+
getCustomization(): ViewerCustomization;
|
|
14196
|
+
/** Replace the whole customisation. */
|
|
14197
|
+
setCustomization(next: ViewerCustomization): void;
|
|
14198
|
+
/** Merge a partial customisation (see `mergeCustomization`). */
|
|
14199
|
+
updateCustomization(patch: ViewerCustomization): void;
|
|
14200
|
+
/** Drop every customisation, back to the stock UI. */
|
|
14201
|
+
resetCustomization(): void;
|
|
14202
|
+
hideRibbonTab(tab: ToolbarTabId): void;
|
|
14203
|
+
showRibbonTab(tab: ToolbarTabId): void;
|
|
14204
|
+
hideToolbarButton(button: ToolbarButtonId): void;
|
|
14205
|
+
showToolbarButton(button: ToolbarButtonId): void;
|
|
14206
|
+
hideOptionsPage(page: OptionsPageId): void;
|
|
14207
|
+
showOptionsPage(page: OptionsPageId): void;
|
|
14208
|
+
hideOptionsSection(section: OptionsSectionId): void;
|
|
14209
|
+
showOptionsSection(section: OptionsSectionId): void;
|
|
14210
|
+
hideSetting(setting: OptionsSettingId): void;
|
|
14211
|
+
showSetting(setting: OptionsSettingId): void;
|
|
14212
|
+
/** Pin a setting to `value`; `hidden` also removes it from the dialog. */
|
|
14213
|
+
lockSetting(setting: OptionsSettingId, value: ViewerOptionPrimitive, hidden?: boolean): void;
|
|
14214
|
+
unlockSetting(setting: OptionsSettingId): void;
|
|
14215
|
+
/** Set (or with `undefined`, clear) the host default for a setting. */
|
|
14216
|
+
setSettingDefault(setting: OptionsSettingId, value: ViewerOptionPrimitive | undefined): void;
|
|
14217
|
+
hideBackstagePage(page: BackstagePage): void;
|
|
14218
|
+
showBackstagePage(page: BackstagePage): void;
|
|
14219
|
+
hideBackstageCard(card: BackstageCardId): void;
|
|
14220
|
+
showBackstageCard(card: BackstageCardId): void;
|
|
14221
|
+
hideContextMenuCommand(command: ContextMenuCommandId): void;
|
|
14222
|
+
showContextMenuCommand(command: ContextMenuCommandId): void;
|
|
14223
|
+
hideCanvasContextMenuCommand(command: CanvasContextMenuCommandId): void;
|
|
14224
|
+
showCanvasContextMenuCommand(command: CanvasContextMenuCommandId): void;
|
|
14225
|
+
disableShortcut(action: EditorKeyActionName): void;
|
|
14226
|
+
enableShortcut(action: EditorKeyActionName): void;
|
|
14227
|
+
/** Move a command onto new chord(s); `undefined` restores the built-in chord. */
|
|
14228
|
+
remapShortcut(action: EditorKeyActionName, chords: ShortcutChord | readonly ShortcutChord[] | undefined): void;
|
|
14229
|
+
setPanelVisible(panel: ViewerPanelId, visible: boolean): void;
|
|
14230
|
+
setFeatureEnabled(feature: ViewerFeatureId, enabled: boolean): void;
|
|
14231
|
+
setDialogAvailable(dialog: ViewerDialogId, available: boolean): void;
|
|
13838
14232
|
}
|
|
13839
14233
|
type ReadOnlyRecommendationKind = 'modifyVerifier' | 'markedFinal' | null;
|
|
13840
14234
|
interface ReadOnlyRecommendation {
|
|
@@ -13910,6 +14304,33 @@ interface ViewportFitOptions {
|
|
|
13910
14304
|
/** Positive fit-factor ceiling; null allows enlargement without a ceiling. */
|
|
13911
14305
|
maxFitScale?: number | null;
|
|
13912
14306
|
}
|
|
14307
|
+
/** The element fields an Edit Points commit writes. */
|
|
14308
|
+
type EditPointsElementPatch = Pick<ShapePptxElement, 'x' | 'y' | 'width' | 'height' | 'shapeType' | 'shapeAdjustments' | 'pathData' | 'pathWidth' | 'pathHeight' | 'customGeometryPaths' | 'customGeometryRawData' | 'customGeometryAdjustHandlesXY' | 'customGeometryAdjustHandlesPolar' | 'customGeometryConnectionSites' | 'customGeometryTextRect'>;
|
|
14309
|
+
//#endregion
|
|
14310
|
+
//#region src/render/picture-crop/crop-geometry.d.ts
|
|
14311
|
+
/** An axis-aligned rectangle in slide pixels. */
|
|
14312
|
+
interface CropRect {
|
|
14313
|
+
x: number;
|
|
14314
|
+
y: number;
|
|
14315
|
+
width: number;
|
|
14316
|
+
height: number;
|
|
14317
|
+
}
|
|
14318
|
+
/** The four `a:srcRect` insets as fractions of the image (negative pads). */
|
|
14319
|
+
interface CropInsets {
|
|
14320
|
+
cropLeft: number;
|
|
14321
|
+
cropTop: number;
|
|
14322
|
+
cropRight: number;
|
|
14323
|
+
cropBottom: number;
|
|
14324
|
+
}
|
|
14325
|
+
/** What a crop edit writes back onto the picture element. */
|
|
14326
|
+
type CropElementUpdate = CropInsets & CropRect;
|
|
14327
|
+
/** The snapshot a crop session restores on cancel. */
|
|
14328
|
+
interface CropSession {
|
|
14329
|
+
elementId: string;
|
|
14330
|
+
original: CropElementUpdate;
|
|
14331
|
+
/** Insets the picture did not carry at all (no `a:srcRect` opinion). */
|
|
14332
|
+
absentInsets: readonly (keyof CropInsets)[];
|
|
14333
|
+
}
|
|
13913
14334
|
//#endregion
|
|
13914
14335
|
//#region src/web-components/select-value.d.ts
|
|
13915
14336
|
/** Public DOM shape used by all bindings; the element is not a native select. */
|
|
@@ -14103,7 +14524,7 @@ interface CanvasContextMenuState {
|
|
|
14103
14524
|
y: number;
|
|
14104
14525
|
}
|
|
14105
14526
|
/** Identifies an action triggered from the element right-click context menu. */
|
|
14106
|
-
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';
|
|
14527
|
+
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';
|
|
14107
14528
|
/**
|
|
14108
14529
|
* State of an active marquee (rubber-band) selection rectangle.
|
|
14109
14530
|
* Created when the user clicks and drags on the canvas background,
|
|
@@ -14159,7 +14580,7 @@ interface AccessibilityIssue {
|
|
|
14159
14580
|
severity: 'error' | 'warning' | 'info';
|
|
14160
14581
|
message: string;
|
|
14161
14582
|
}
|
|
14162
|
-
interface PowerPointViewerHandle extends FileViewerHandle, PowerPointViewerAPI {
|
|
14583
|
+
interface PowerPointViewerHandle extends FileViewerHandle, PowerPointViewerAPI, ViewerCustomizationApi {
|
|
14163
14584
|
getContent: () => Promise<Uint8Array>;
|
|
14164
14585
|
}
|
|
14165
14586
|
|
|
@@ -14192,6 +14613,8 @@ interface ToolbarProps {
|
|
|
14192
14613
|
tableEditorState?: TableCellEditorState | null;
|
|
14193
14614
|
editTemplateMode: boolean;
|
|
14194
14615
|
newShapeType: SupportedShapeType;
|
|
14616
|
+
/** The armed Freeform: Shape / Curve tool, or null. */
|
|
14617
|
+
activeFreeformTool?: FreeformToolKind | null;
|
|
14195
14618
|
activeTool: DrawingTool;
|
|
14196
14619
|
drawingColor: string;
|
|
14197
14620
|
drawingWidth: number;
|
|
@@ -14225,6 +14648,8 @@ interface ToolbarProps {
|
|
|
14225
14648
|
onRedo: () => void;
|
|
14226
14649
|
onToggleFindReplace: () => void;
|
|
14227
14650
|
onSetNewShapeType: (type: SupportedShapeType) => void;
|
|
14651
|
+
/** Arm (or, with null, disarm) a Freeform: Shape / Curve tool. */
|
|
14652
|
+
onArmFreeformTool?: (tool: FreeformToolKind | null) => void;
|
|
14228
14653
|
onAddTextBox: () => void;
|
|
14229
14654
|
onAddShape: () => void;
|
|
14230
14655
|
onAddTable: () => void;
|
|
@@ -14725,6 +15150,8 @@ interface UseElementManipulationInput {
|
|
|
14725
15150
|
* production, only in tests that do not exercise "Edit Text".
|
|
14726
15151
|
*/
|
|
14727
15152
|
onEditText?: (elementId: string) => void;
|
|
15153
|
+
/** Enter Edit Points mode on `elementId` (context menu "Edit Points"). */
|
|
15154
|
+
onEditPoints?: (elementId: string) => void;
|
|
14728
15155
|
/**
|
|
14729
15156
|
* Rasterise `elementId`'s own DOM node and download it as PNG ("Save as
|
|
14730
15157
|
* Picture"). Lives outside this hook because it needs the binding's
|
|
@@ -14792,6 +15219,8 @@ interface UseFindReplaceInput {
|
|
|
14792
15219
|
onSetSelectedElementId: (id: string | null) => void;
|
|
14793
15220
|
onUpdateSlides: (updater: (slides: PptxSlide[]) => PptxSlide[]) => void;
|
|
14794
15221
|
onMarkDirty: () => void;
|
|
15222
|
+
/** Host keyboard customisation (disabled / remapped Find shortcuts). */
|
|
15223
|
+
keyboard?: ResolvedKeyboardCustomization;
|
|
14795
15224
|
}
|
|
14796
15225
|
interface UseFindReplaceResult {
|
|
14797
15226
|
findReplaceOpen: boolean;
|
|
@@ -14809,7 +15238,7 @@ interface UseFindReplaceResult {
|
|
|
14809
15238
|
handleReplace: () => void;
|
|
14810
15239
|
handleReplaceAll: () => void;
|
|
14811
15240
|
}
|
|
14812
|
-
declare function useFindReplace({ slides, mode, onSetActiveSlideIndex, onSetSelectedElementId, onUpdateSlides, onMarkDirty }: UseFindReplaceInput): UseFindReplaceResult;
|
|
15241
|
+
declare function useFindReplace({ slides, mode, onSetActiveSlideIndex, onSetSelectedElementId, onUpdateSlides, onMarkDirty, keyboard }: UseFindReplaceInput): UseFindReplaceResult;
|
|
14813
15242
|
//#endregion
|
|
14814
15243
|
//#region src/viewer/components/hyperlink-edit-types.d.ts
|
|
14815
15244
|
/** The type of hyperlink target. */
|
|
@@ -15411,6 +15840,31 @@ interface ViewerDialogsResult {
|
|
|
15411
15840
|
//#region src/viewer/hooks/useViewerDialogs.d.ts
|
|
15412
15841
|
declare function useViewerDialogs(input: UseViewerDialogsInput): ViewerDialogsResult;
|
|
15413
15842
|
//#endregion
|
|
15843
|
+
//#region src/viewer/hooks/useCropSessionState.d.ts
|
|
15844
|
+
interface CropSessionState {
|
|
15845
|
+
/** The open crop session, or null outside crop mode. */
|
|
15846
|
+
cropSession: CropSession | null;
|
|
15847
|
+
/** Mirror of `cropSession`, readable synchronously by the history gate. */
|
|
15848
|
+
cropSessionRef: React.MutableRefObject<CropSession | null>;
|
|
15849
|
+
/** Open or close the session; keeps the ref and the state in step. */
|
|
15850
|
+
setCropSession: (session: CropSession | null) => void;
|
|
15851
|
+
}
|
|
15852
|
+
//#endregion
|
|
15853
|
+
//#region src/viewer/hooks/useEditPointsState.d.ts
|
|
15854
|
+
/**
|
|
15855
|
+
* Viewer state for the two outline-authoring modes: Edit Points on one shape,
|
|
15856
|
+
* and the armed Freeform: Shape / Curve drawing tool. At most one is active;
|
|
15857
|
+
* arming a tool ends Edit Points and starting Edit Points disarms the tool.
|
|
15858
|
+
*/
|
|
15859
|
+
interface EditPointsModeState {
|
|
15860
|
+
/** The shape in Edit Points mode, or null. */
|
|
15861
|
+
editPointsElementId: string | null;
|
|
15862
|
+
setEditPointsElementId: (id: string | null) => void;
|
|
15863
|
+
/** The armed click-to-place drawing tool, or null. */
|
|
15864
|
+
activeFreeformTool: FreeformToolKind | null;
|
|
15865
|
+
setActiveFreeformTool: (tool: FreeformToolKind | null) => void;
|
|
15866
|
+
}
|
|
15867
|
+
//#endregion
|
|
15414
15868
|
//#region src/viewer/hooks/viewer-core-state-types.d.ts
|
|
15415
15869
|
/**
|
|
15416
15870
|
* Input parameters for the {@link useViewerCoreState} hook.
|
|
@@ -15429,7 +15883,7 @@ interface UseViewerCoreStateInput {
|
|
|
15429
15883
|
* that comprises the core viewer state. It is merged with {@link ViewerUIState}
|
|
15430
15884
|
* inside {@link useViewerState} to produce the unified {@link ViewerState}.
|
|
15431
15885
|
*/
|
|
15432
|
-
interface ViewerCoreState extends InlineEditingState {
|
|
15886
|
+
interface ViewerCoreState extends InlineEditingState, EditPointsModeState {
|
|
15433
15887
|
/** Ref to the outermost container `<div>` wrapping the viewer. */
|
|
15434
15888
|
containerRef: React$1.RefObject<HTMLDivElement | null>;
|
|
15435
15889
|
/** Hidden `<input type="file">` used to trigger image file selection. */
|
|
@@ -15776,7 +16230,7 @@ interface UseViewerStateInput {
|
|
|
15776
16230
|
* The unified viewer state: intersection of core state (slides, elements,
|
|
15777
16231
|
* refs, presentation metadata) and UI state (panel toggles, tools, grid/snap).
|
|
15778
16232
|
*/
|
|
15779
|
-
type ViewerState = ViewerCoreState & ViewerUIState;
|
|
16233
|
+
type ViewerState = ViewerCoreState & ViewerUIState & CropSessionState;
|
|
15780
16234
|
/**
|
|
15781
16235
|
* Composes core and UI state into a single unified state object.
|
|
15782
16236
|
*
|
|
@@ -15814,6 +16268,8 @@ interface UseEditorOperationsInput {
|
|
|
15814
16268
|
handlerRef?: React$1.RefObject<PptxHandler | null> | React$1.MutableRefObject<PptxHandler | null>;
|
|
15815
16269
|
/** AutoCorrect transform applied to committed inline text edits. */
|
|
15816
16270
|
transformCommittedText?: (text: string) => string;
|
|
16271
|
+
/** Host keyboard customisation, forwarded to the Find shortcut. */
|
|
16272
|
+
keyboard?: ResolvedKeyboardCustomization;
|
|
15817
16273
|
}
|
|
15818
16274
|
interface EditorOperationsResult {
|
|
15819
16275
|
ops: ElementOperations;
|
|
@@ -15864,6 +16320,23 @@ interface TableStyleContext {
|
|
|
15864
16320
|
theme?: PptxTheme;
|
|
15865
16321
|
}
|
|
15866
16322
|
//#endregion
|
|
16323
|
+
//#region src/viewer/components/canvas/OutlineAuthoringLayer.d.ts
|
|
16324
|
+
/** Wiring for Edit Points and the Freeform: Shape / Curve tools. */
|
|
16325
|
+
interface OutlineAuthoringProps {
|
|
16326
|
+
/** The shape in Edit Points mode, or null. */
|
|
16327
|
+
editPointsElementId: string | null;
|
|
16328
|
+
/** Edit Points menu commands the host hid. */
|
|
16329
|
+
hiddenEditPointsCommands?: ReadonlySet<EditPointsCommandId>;
|
|
16330
|
+
/** Apply one Edit Points edit (one undo step). */
|
|
16331
|
+
onCommitEditPoints: (elementId: string, patch: EditPointsElementPatch) => void;
|
|
16332
|
+
onExitEditPoints: () => void;
|
|
16333
|
+
/** The armed drawing tool, or null. */
|
|
16334
|
+
freeformTool: FreeformToolKind | null;
|
|
16335
|
+
/** Insert a drawn freeform (the tool then disarms). */
|
|
16336
|
+
onFreeformCommit: (element: ShapePptxElement) => void;
|
|
16337
|
+
onFreeformCancel: () => void;
|
|
16338
|
+
}
|
|
16339
|
+
//#endregion
|
|
15867
16340
|
//#region src/viewer/components/canvas/canvas-types.d.ts
|
|
15868
16341
|
interface ZoomViewport {
|
|
15869
16342
|
canvasViewportRef: React$1.RefObject<HTMLDivElement | null>;
|
|
@@ -16011,6 +16484,7 @@ interface SlideCanvasProps {
|
|
|
16011
16484
|
* changes tween while the AI assistant is working (see AiFocusHighlightOverlay).
|
|
16012
16485
|
*/
|
|
16013
16486
|
aiActive?: boolean;
|
|
16487
|
+
outlineAuthoring?: OutlineAuthoringProps;
|
|
16014
16488
|
}
|
|
16015
16489
|
//#endregion
|
|
16016
16490
|
//#region src/viewer/hooks/useAutosave.d.ts
|
|
@@ -17395,6 +17869,8 @@ interface UseKeyboardShortcutWiringInput {
|
|
|
17395
17869
|
pasteFormatToSelection: (targetIds: string[]) => void;
|
|
17396
17870
|
/** Ctrl/Cmd+Alt+V: open the Paste Special dialog. */
|
|
17397
17871
|
onPasteSpecial: () => void;
|
|
17872
|
+
/** Host UI customisation forwarded to `useKeyboardShortcuts`. */
|
|
17873
|
+
customization?: ResolvedCustomization;
|
|
17398
17874
|
}
|
|
17399
17875
|
declare function useKeyboardShortcutWiring(input: UseKeyboardShortcutWiringInput): void;
|
|
17400
17876
|
//#endregion
|
|
@@ -17474,6 +17950,10 @@ interface UseViewerIntegrationInput {
|
|
|
17474
17950
|
onZoomChange: ((zoom: number) => void) | undefined;
|
|
17475
17951
|
onSelectionChange: ((ids: string[]) => void) | undefined;
|
|
17476
17952
|
onSlideCountChange: ((count: number) => void) | undefined;
|
|
17953
|
+
/** Host UI customisation helpers, spread onto the imperative handle. */
|
|
17954
|
+
customizationApi?: ViewerCustomizationApi;
|
|
17955
|
+
/** Resolved host UI customisation, read by the keyboard shortcuts. */
|
|
17956
|
+
customization?: ResolvedCustomization;
|
|
17477
17957
|
}
|
|
17478
17958
|
interface ViewerIntegrationResult {
|
|
17479
17959
|
exportHandlers: IOHandlersResult['exportHandlers'];
|
|
@@ -17874,6 +18354,11 @@ interface UseKeyboardShortcutsInput {
|
|
|
17874
18354
|
activeTool: DrawingTool;
|
|
17875
18355
|
/** Whether at least one element is selected. */
|
|
17876
18356
|
hasSelection: boolean;
|
|
18357
|
+
/**
|
|
18358
|
+
* Host UI customisation: disabled / remapped editor shortcuts, and the
|
|
18359
|
+
* `presentMode` feature gate for F5 / Shift+F5. Omitted customises nothing.
|
|
18360
|
+
*/
|
|
18361
|
+
customization?: ResolvedCustomization;
|
|
17877
18362
|
/** The IDs of the currently selected elements (effective). */
|
|
17878
18363
|
effectiveSelectedIds: string[];
|
|
17879
18364
|
onDelete: () => void;
|
|
@@ -17946,6 +18431,7 @@ declare function useKeyboardShortcuts(input: UseKeyboardShortcutsInput): void;
|
|
|
17946
18431
|
interface MergeShapesHandlerInput {
|
|
17947
18432
|
activeSlide: PptxSlide | undefined;
|
|
17948
18433
|
activeSlideIndex: number;
|
|
18434
|
+
/** The selection in SELECTION order: the first entry's formatting survives. */
|
|
17949
18435
|
selectedElements: PptxElement[];
|
|
17950
18436
|
effectiveSelectedIds: string[];
|
|
17951
18437
|
setSelectedElementIds: React.Dispatch<React.SetStateAction<string[]>>;
|