pptx-svelte-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 +61 -0
- package/README.md +30 -29
- package/dist/{AiChatPanel-BdrwlRX5.js → AiChatPanel-UtQgHZdw.js} +2 -2
- package/dist/{export-Bln1wHMQ.js → export-BmYgdMk2.js} +15029 -14018
- package/dist/i18n/de.cjs +71 -21
- package/dist/i18n/de.mjs +71 -21
- package/dist/i18n/es.cjs +71 -21
- package/dist/i18n/es.mjs +71 -21
- package/dist/i18n/fr.cjs +71 -21
- package/dist/i18n/fr.mjs +71 -21
- package/dist/i18n/zh-CN.cjs +49 -4
- package/dist/i18n/zh-CN.mjs +49 -4
- package/dist/i18n.js +1 -1
- package/dist/index.d.ts +580 -14
- package/dist/index.js +52 -38
- package/dist/internals.d.ts +123 -9
- package/dist/internals.js +23 -23
- package/dist/pptx-svelte-viewer.css +1 -1
- package/dist/{transition-overlay-BfpjfjU4.js → transition-overlay-BjAhkWT1.js} +68612 -64380
- package/dist/{translator-C-KdhJw4.js → translator-D5VddVYr.js} +45 -0
- package/dist/viewer/index.d.ts +542 -14
- package/dist/viewer/index.js +11 -11
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1484,8 +1484,16 @@ interface TextStyle {
|
|
|
1484
1484
|
textOutlineWidth?: number;
|
|
1485
1485
|
/** Text outline colour as hex string (`a:rPr > a:ln > a:solidFill`). */
|
|
1486
1486
|
textOutlineColor?: string;
|
|
1487
|
+
/** Text outline dash preset (`a:rPr > a:ln > a:prstDash/@val`), e.g. `dash`; absent for solid. */
|
|
1488
|
+
textOutlineDash?: string;
|
|
1487
1489
|
/** When true, the text body has no fill (`a:rPr > a:noFill`), producing hollow/outline-only text. */
|
|
1488
1490
|
textFillNone?: boolean;
|
|
1491
|
+
/**
|
|
1492
|
+
* When true, the run authored an EMPTY `<a:effectLst/>`: an explicit "no
|
|
1493
|
+
* effects" override that blocks an inherited shadow or glow. Kept so a
|
|
1494
|
+
* rewrite re-emits it instead of letting the inherited effect return.
|
|
1495
|
+
*/
|
|
1496
|
+
textEffectsExplicitNone?: boolean;
|
|
1489
1497
|
/** Superscript/subscript baseline shift as percentage (`a:rPr/@baseline`). Positive = super, negative = sub. */
|
|
1490
1498
|
baseline?: number;
|
|
1491
1499
|
/** Character spacing in hundredths of a point (`a:rPr/@spc`). */
|
|
@@ -1519,6 +1527,25 @@ interface TextStyle {
|
|
|
1519
1527
|
textFillPatternForeground?: string;
|
|
1520
1528
|
/** Text-level pattern background colour. */
|
|
1521
1529
|
textFillPatternBackground?: string;
|
|
1530
|
+
/**
|
|
1531
|
+
* Raw `a:rPr > a:blipFill` XML, preserved verbatim for round-trip
|
|
1532
|
+
* serialization AND as the input to the image resolution pass that fills
|
|
1533
|
+
* in {@link textFillBlipUrl} (parsing a run's fill happens synchronously,
|
|
1534
|
+
* with no zip/relationship access at that point; resolving the blip to a
|
|
1535
|
+
* displayable URL needs both, so it happens in a later async pass over
|
|
1536
|
+
* the slide's parsed elements, mirroring how a shape's OWN image fill is
|
|
1537
|
+
* resolved). A picture-filled text run (`a:rPr > a:blipFill`) was
|
|
1538
|
+
* documented as handled ("Handles gradient fills, pattern fills, and
|
|
1539
|
+
* image fills on text runs") but never actually parsed, so it silently
|
|
1540
|
+
* fell through to the run's plain `color` and rendered solid black
|
|
1541
|
+
* (COM-verified: `audit-text` slide 13's "PICTURE FILL" run shows the
|
|
1542
|
+
* fill image through the glyphs in PowerPoint).
|
|
1543
|
+
*/
|
|
1544
|
+
textFillBlipXml?: XmlObject;
|
|
1545
|
+
/** Resolved displayable URL for {@link textFillBlipXml}, or the archive-relative path when unresolved (lazy decode). */
|
|
1546
|
+
textFillBlipUrl?: string;
|
|
1547
|
+
/** Tiling mode for {@link textFillBlipUrl} (`a:blipFill/a:tile` present -> 'tile', else 'stretch'). */
|
|
1548
|
+
textFillBlipMode?: 'stretch' | 'tile';
|
|
1522
1549
|
hyperlink?: string;
|
|
1523
1550
|
/** Relationship ID for the hyperlink (`a:hlinkClick/@r:id`) — preserved for round-trip serialization. */
|
|
1524
1551
|
hyperlinkRId?: string;
|
|
@@ -1604,6 +1631,13 @@ interface TextStyle {
|
|
|
1604
1631
|
position: number;
|
|
1605
1632
|
align: 'l' | 'ctr' | 'r' | 'dec';
|
|
1606
1633
|
leader?: 'none' | 'dot' | 'hyphen' | 'underscore';
|
|
1634
|
+
/**
|
|
1635
|
+
* True when the source spelled out the schema-default `@algn="l"`, so the
|
|
1636
|
+
* writer re-emits it instead of treating it as an omitted default.
|
|
1637
|
+
*/
|
|
1638
|
+
alignAuthored?: boolean;
|
|
1639
|
+
/** True when the source spelled out the schema-default `@leader="none"`. */
|
|
1640
|
+
leaderAuthored?: boolean;
|
|
1607
1641
|
}>;
|
|
1608
1642
|
/**
|
|
1609
1643
|
* True when the paragraph's own `a:pPr` authored an EMPTY `<a:tabLst/>`
|
|
@@ -1967,6 +2001,19 @@ interface TextStyle {
|
|
|
1967
2001
|
* convention used for {@link bulletInfo} / {@link endParaRunProperties}).
|
|
1968
2002
|
*/
|
|
1969
2003
|
paragraphDefaultRunPropertiesXml?: XmlObject;
|
|
2004
|
+
/**
|
|
2005
|
+
* The bullet colour / size / typeface children (`a:buClrTx`, `a:buClr`,
|
|
2006
|
+
* `a:buSzTx`, `a:buSzPct`, `a:buSzPts`, `a:buFontTx`, `a:buFont`) a
|
|
2007
|
+
* paragraph authored in its own `<a:pPr>` WITHOUT a bullet type
|
|
2008
|
+
* (`a:buNone` / `a:buChar` / `a:buAutoNum` / `a:buBlip`), captured
|
|
2009
|
+
* verbatim in source order. Such a paragraph restyles an inherited bullet
|
|
2010
|
+
* rather than declaring one, so its {@link BulletInfo} resolves from the
|
|
2011
|
+
* cascade and is (correctly) not written back; without this capture the
|
|
2012
|
+
* paragraph's own override vanished on every rewrite.
|
|
2013
|
+
*
|
|
2014
|
+
* Only meaningful on a paragraph's own authored properties.
|
|
2015
|
+
*/
|
|
2016
|
+
paragraphBulletPropertiesXml?: XmlObject;
|
|
1970
2017
|
}
|
|
1971
2018
|
/**
|
|
1972
2019
|
* Structured bullet metadata attached to the first {@link TextSegment}
|
|
@@ -3235,6 +3282,26 @@ type PptxChartMarkerSymbol = 'circle' | 'dash' | 'diamond' | 'dot' | 'none' | 'p
|
|
|
3235
3282
|
*/
|
|
3236
3283
|
type PptxChartScatterStyle = 'none' | 'line' | 'lineMarker' | 'marker' | 'smooth' | 'smoothMarker';
|
|
3237
3284
|
/** Shape properties extracted from c:spPr for chart formatting. */
|
|
3285
|
+
/**
|
|
3286
|
+
* A render-ready gradient fill from a chart `c:spPr/a:gradFill` (chart area,
|
|
3287
|
+
* plot area or series). Positions are 0..100; a linear gradient's `angle` is
|
|
3288
|
+
* in degrees clockwise from left-to-right (`a:lin/@ang`); a radial (`a:path`)
|
|
3289
|
+
* gradient centres on `focalPoint` (0..1 fractions of the box), the middle
|
|
3290
|
+
* when absent.
|
|
3291
|
+
*/
|
|
3292
|
+
interface PptxChartGradientFill {
|
|
3293
|
+
type: 'linear' | 'radial';
|
|
3294
|
+
stops: Array<{
|
|
3295
|
+
color: string;
|
|
3296
|
+
position: number;
|
|
3297
|
+
opacity?: number;
|
|
3298
|
+
}>;
|
|
3299
|
+
angle?: number;
|
|
3300
|
+
focalPoint?: {
|
|
3301
|
+
x: number;
|
|
3302
|
+
y: number;
|
|
3303
|
+
};
|
|
3304
|
+
}
|
|
3238
3305
|
interface PptxChartShapeProps {
|
|
3239
3306
|
fillColor?: string;
|
|
3240
3307
|
strokeColor?: string;
|
|
@@ -3560,6 +3627,12 @@ interface PptxChartSeries {
|
|
|
3560
3627
|
*/
|
|
3561
3628
|
idx?: number;
|
|
3562
3629
|
values: number[];
|
|
3630
|
+
/**
|
|
3631
|
+
* Series gradient fill (`c:ser/c:spPr/a:gradFill`), painted on every mark
|
|
3632
|
+
* of the series that has no per-point override. Render-only: the series'
|
|
3633
|
+
* own `c:spPr` round-trips untouched.
|
|
3634
|
+
*/
|
|
3635
|
+
gradientFill?: PptxChartGradientFill;
|
|
3563
3636
|
/**
|
|
3564
3637
|
* Per-series x values from `c:ser/c:xVal` (scatter and bubble series only).
|
|
3565
3638
|
*
|
|
@@ -3734,6 +3807,12 @@ interface PptxChartFilteredSeries {
|
|
|
3734
3807
|
* and `c:dLblPos`.
|
|
3735
3808
|
*/
|
|
3736
3809
|
interface PptxChartDataLabelOptions {
|
|
3810
|
+
/** Label box fill/outline (`c:dLbls/c:spPr`), see `chart-data-label-box.ts`. */
|
|
3811
|
+
labelShape?: PptxChartShapeProps;
|
|
3812
|
+
/** Callout geometry of the label box (`c15:spPr/a:prstGeom/@prst`, e.g. `wedgeRectCallout`). */
|
|
3813
|
+
calloutShape?: string;
|
|
3814
|
+
/** The chart15 extension's `c15:showLeaderLines`, which wins for a moved label's leader line. */
|
|
3815
|
+
extLeaderLines?: boolean;
|
|
3737
3816
|
/** Show the numeric value (`c:showVal`). */
|
|
3738
3817
|
showValue?: boolean;
|
|
3739
3818
|
/** Show the category name (`c:showCatName`). */
|
|
@@ -3859,6 +3938,10 @@ interface PptxChartStyle {
|
|
|
3859
3938
|
chartAreaFill?: string;
|
|
3860
3939
|
/** Plot-area fill from `c:plotArea/c:spPr`. See {@link chartAreaFill}. */
|
|
3861
3940
|
plotAreaFill?: string;
|
|
3941
|
+
/** Chart-area gradient (`c:chartSpace/c:spPr/a:gradFill`); wins over {@link chartAreaFill}. */
|
|
3942
|
+
chartAreaGradient?: PptxChartGradientFill;
|
|
3943
|
+
/** Plot-area gradient (`c:plotArea/c:spPr/a:gradFill`); wins over {@link plotAreaFill}. */
|
|
3944
|
+
plotAreaGradient?: PptxChartGradientFill;
|
|
3862
3945
|
/** Whether data labels are shown. */
|
|
3863
3946
|
hasDataLabels?: boolean;
|
|
3864
3947
|
/** Chart-level data-label content/position options (when `hasDataLabels`). */
|
|
@@ -7727,7 +7810,15 @@ type PptxAnimationTimingCurve = 'ease' | 'ease-in' | 'ease-out' | 'linear';
|
|
|
7727
7810
|
/** Repeat mode for animations. */
|
|
7728
7811
|
type PptxAnimationRepeatMode = 'untilNextClick' | 'untilEndOfSlide';
|
|
7729
7812
|
/** Animation trigger type from OOXML `p:cTn`. */
|
|
7730
|
-
type PptxAnimationTrigger = 'onClick' | 'onShapeClick' | 'onHover' | 'afterPrevious' | 'withPrevious' | 'afterDelay'
|
|
7813
|
+
type PptxAnimationTrigger = 'onClick' | 'onShapeClick' | 'onHover' | 'afterPrevious' | 'withPrevious' | 'afterDelay' |
|
|
7814
|
+
/**
|
|
7815
|
+
* Starts when a media element's playback reaches a named bookmark
|
|
7816
|
+
* (PowerPoint's "Trigger > On Bookmark"). The media element is
|
|
7817
|
+
* {@link PptxElementAnimation.triggerShapeId} and the bookmark
|
|
7818
|
+
* {@link PptxElementAnimation.triggerBookmark}; saved as an interactive
|
|
7819
|
+
* sequence gated on `p:cond evt="onMediaBookmark"` with a `p14:bmkTgt`.
|
|
7820
|
+
*/
|
|
7821
|
+
'onMediaBookmark';
|
|
7731
7822
|
/**
|
|
7732
7823
|
* Native animation kind. The historic shape-targeted preset animations are
|
|
7733
7824
|
* implicitly the default kind (`undefined`). Media animations (`p:audio`,
|
|
@@ -7880,8 +7971,13 @@ interface PptxNativeAnimation {
|
|
|
7880
7971
|
target?: PptxAnimationTarget;
|
|
7881
7972
|
/** Trigger type. */
|
|
7882
7973
|
trigger?: PptxAnimationTrigger;
|
|
7883
|
-
/**
|
|
7974
|
+
/**
|
|
7975
|
+
* Shape ID that triggers this animation: the clicked shape of an
|
|
7976
|
+
* interactive sequence, or the media element of an `onMediaBookmark` one.
|
|
7977
|
+
*/
|
|
7884
7978
|
triggerShapeId?: string;
|
|
7979
|
+
/** Bookmark name an `onMediaBookmark` interactive sequence waits for. */
|
|
7980
|
+
triggerBookmark?: string;
|
|
7885
7981
|
/** Whether this effect belongs to an OOXML `interactiveSeq`. */
|
|
7886
7982
|
interactiveSequence?: boolean;
|
|
7887
7983
|
/** Whether `p:endSync/p:rtn[@val="all"]` makes that sequence replayable. */
|
|
@@ -8380,12 +8476,15 @@ interface PptxAttributeAnimation {
|
|
|
8380
8476
|
/**
|
|
8381
8477
|
* `p:anim/@_p14:bounceEnd` (Office 2010 `p14` extension attribute,
|
|
8382
8478
|
* MS-OI29500), normalized to a 0-1 fraction of this behaviour's own
|
|
8383
|
-
* duration. PowerPoint's
|
|
8384
|
-
*
|
|
8385
|
-
*
|
|
8386
|
-
*
|
|
8387
|
-
* the
|
|
8388
|
-
*
|
|
8479
|
+
* duration. PowerPoint's "Bounce End" effect option (COM:
|
|
8480
|
+
* `Effect.Timing.BounceEnd` + `BounceEndIntensity`) writes this on the
|
|
8481
|
+
* position-ramp `p:anim` node(s): the share of the duration spent
|
|
8482
|
+
* BOUNCING at the end. Measured from PowerPoint's own CreateVideo frames,
|
|
8483
|
+
* the travel completes at `1 - bounceEnd` and the rest is a damped
|
|
8484
|
+
* oscillation about the final value (see shared's `animation-bounce-end`).
|
|
8485
|
+
* Mirrored verbatim by PowerPoint onto the enclosing
|
|
8486
|
+
* `p:cTn/@_p14:presetBounceEnd`. Absent for every animation that doesn't
|
|
8487
|
+
* use this effect option (the overwhelming majority).
|
|
8389
8488
|
*/
|
|
8390
8489
|
bounceEnd?: number;
|
|
8391
8490
|
}
|
|
@@ -8563,9 +8662,24 @@ interface PptxElementAnimation {
|
|
|
8563
8662
|
durationMs?: number;
|
|
8564
8663
|
delayMs?: number;
|
|
8565
8664
|
order?: number;
|
|
8665
|
+
/**
|
|
8666
|
+
* The {@link order} the loader derived from the slide's `p:timing` tree for
|
|
8667
|
+
* an entry whose `pptx:editorMeta` record authored no `@order`. The tree
|
|
8668
|
+
* already expresses that position (and every load re-derives it), so the
|
|
8669
|
+
* writer omits `@order` while `order` still equals this value; a reorder
|
|
8670
|
+
* changes `order` and the attribute is written again. Load-time bookkeeping
|
|
8671
|
+
* only; never set it by hand.
|
|
8672
|
+
*/
|
|
8673
|
+
orderFromTimeline?: number;
|
|
8566
8674
|
trigger?: PptxAnimationTrigger;
|
|
8567
|
-
/**
|
|
8675
|
+
/**
|
|
8676
|
+
* Shape ID that triggers this animation: the shape clicked for
|
|
8677
|
+
* `onShapeClick`, or the media element whose bookmark fires it for
|
|
8678
|
+
* `onMediaBookmark`.
|
|
8679
|
+
*/
|
|
8568
8680
|
triggerShapeId?: string;
|
|
8681
|
+
/** Bookmark name (`p14:bmk/@name`) an `onMediaBookmark` trigger waits for. */
|
|
8682
|
+
triggerBookmark?: string;
|
|
8569
8683
|
timingCurve?: PptxAnimationTimingCurve;
|
|
8570
8684
|
repeatCount?: number;
|
|
8571
8685
|
repeatMode?: PptxAnimationRepeatMode;
|
|
@@ -12411,6 +12525,31 @@ declare function forgetSessionDeck(): Promise<void>;
|
|
|
12411
12525
|
declare function restoreSessionDeck(): Promise<SessionDeck | null>;
|
|
12412
12526
|
declare function parsePresentationSessionId(hash: string): string | null;
|
|
12413
12527
|
declare function loadPresentationDeck(sessionId: string): Promise<Uint8Array | null>;
|
|
12528
|
+
/** A logical editor command produced by one key press. */
|
|
12529
|
+
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';
|
|
12530
|
+
//#endregion
|
|
12531
|
+
//#region src/render/merge-shapes/merge-shapes-menu.d.ts
|
|
12532
|
+
/** The right-click command id for each operation. */
|
|
12533
|
+
type MergeShapesCommandId = 'merge-union' | 'merge-combine' | 'merge-fragment' | 'merge-intersect' | 'merge-subtract';
|
|
12534
|
+
/** Every command a canvas context menu can offer, in no particular order. */
|
|
12535
|
+
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';
|
|
12536
|
+
//#endregion
|
|
12537
|
+
//#region src/render/canvas-context-menu-commands.d.ts
|
|
12538
|
+
/**
|
|
12539
|
+
* The right-click menu for the empty slide canvas (no element under the
|
|
12540
|
+
* cursor), as distinct from {@link ./context-menu-commands}'s per-element menu.
|
|
12541
|
+
*
|
|
12542
|
+
* Right-clicking empty canvas used to do nothing at all in every binding: React
|
|
12543
|
+
* and Vue both bailed out early (`getElementIdFromEvent` returns `null`, so the
|
|
12544
|
+
* handler just returns) rather than opening a menu, and the other three never
|
|
12545
|
+
* wired a handler for it either. PowerPoint offers Paste, Layout, Reset,
|
|
12546
|
+
* Format Background and view toggles (Grid and Guides, Ruler) from this menu;
|
|
12547
|
+
* this module is the one list every binding renders instead of five omissions.
|
|
12548
|
+
*
|
|
12549
|
+
* @module render/canvas-context-menu-commands
|
|
12550
|
+
*/
|
|
12551
|
+
/** Every command the empty-canvas context menu can offer, in no particular order. */
|
|
12552
|
+
type CanvasContextMenuCommandId = 'paste' | 'layout' | 'reset-slide' | 'format-background' | 'grid-and-guides' | 'ruler';
|
|
12414
12553
|
//#endregion
|
|
12415
12554
|
//#region src/render/image-file-insertion.d.ts
|
|
12416
12555
|
/**
|
|
@@ -12445,6 +12584,21 @@ declare function listAutosaveSnapshots(): Promise<Array<{
|
|
|
12445
12584
|
}>>;
|
|
12446
12585
|
/** Delete a snapshot, rejecting when IndexedDB cannot commit the transaction. */
|
|
12447
12586
|
declare function deleteAutosaveSnapshot(filePath: string): Promise<boolean>;
|
|
12587
|
+
type BackstagePage = 'home' | 'new' | 'open' | 'info' | 'save' | 'saveAs' | 'print' | 'share' | 'export' | 'close' | 'account' | 'options';
|
|
12588
|
+
//#endregion
|
|
12589
|
+
//#region src/render/backstage-cards.d.ts
|
|
12590
|
+
/**
|
|
12591
|
+
* Every action card the File-tab backstage can show, keyed by the operation it
|
|
12592
|
+
* triggers rather than by its wording.
|
|
12593
|
+
*
|
|
12594
|
+
* The five bindings used to hardcode a title and a body string each, which made
|
|
12595
|
+
* the whole backstage untranslatable and let the copy drift: the same card
|
|
12596
|
+
* carried four different descriptions depending on which binding you opened it
|
|
12597
|
+
* in. Both halves now live here as a dictionary key plus an English fallback,
|
|
12598
|
+
* so a wording change lands everywhere at once and a translator only has to
|
|
12599
|
+
* translate it once.
|
|
12600
|
+
*/
|
|
12601
|
+
type BackstageCardId = 'protect' | 'inspect' | 'embedFonts' | 'signatures' | 'versionHistory' | 'saveAsPptx' | 'saveAsPpsx' | 'saveAsPptm' | 'saveAsPpt' | 'pdf' | 'png' | 'video' | 'gif' | 'json' | 'copyImage' | 'print' | 'share';
|
|
12448
12602
|
/**
|
|
12449
12603
|
* Optional hook point for hosts that want to wire a real sign-in flow into
|
|
12450
12604
|
* File > Account. Disabled by default: the Account page renders nothing
|
|
@@ -12482,11 +12636,170 @@ interface AccountAuthConfig {
|
|
|
12482
12636
|
* whole control cluster (zoom in/out/fit, prev/next) rather than each button
|
|
12483
12637
|
* in it, matching how hosts actually want to hide/keep them as a unit.
|
|
12484
12638
|
*/
|
|
12485
|
-
type ToolbarButtonId = 'share' | 'broadcast' | 'export' | 'undo' | 'redo' | 'record' | 'notes' | 'fullscreen' | 'zoom' | 'navigation';
|
|
12639
|
+
type ToolbarButtonId = 'share' | 'broadcast' | 'export' | 'undo' | 'redo' | 'record' | 'notes' | 'fullscreen' | 'zoom' | 'navigation' | 'mergeShapes' | 'crop';
|
|
12486
12640
|
/** 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. */
|
|
12487
12641
|
type ToolbarTabId = 'file' | 'home' | 'insert' | 'draw' | 'design' | 'transitions' | 'animations' | 'slideShow' | 'record' | 'review' | 'view' | 'help';
|
|
12488
12642
|
type ToolbarActionId = ToolbarButtonId | ToolbarTabId;
|
|
12489
12643
|
//#endregion
|
|
12644
|
+
//#region src/render/options/viewer-options.d.ts
|
|
12645
|
+
/**
|
|
12646
|
+
* Full PowerPoint "File > Options" parity model.
|
|
12647
|
+
*
|
|
12648
|
+
* Groups mirror the ten categories of PowerPoint's Options dialog. Values are
|
|
12649
|
+
* flat primitives per group so the dialog panes can be rendered generically
|
|
12650
|
+
* from `VIEWER_OPTIONS_SCHEMA` in every binding. The legacy six-toggle
|
|
12651
|
+
* `ViewerPreferences` surface stays supported via the mapping helpers below.
|
|
12652
|
+
*/
|
|
12653
|
+
type ScreenTipStyle = 'descriptions' | 'plain' | 'off';
|
|
12654
|
+
type DisplayOptimization = 'appearance' | 'compatibility';
|
|
12655
|
+
type ImageResolutionPreset = 'highFidelity' | 'ppi330' | 'ppi220' | 'ppi150' | 'ppi96';
|
|
12656
|
+
type OpenDocumentsView = 'savedView' | 'normal' | 'outline' | 'slideSorter' | 'notes';
|
|
12657
|
+
type DefaultExportFormat = 'pptx' | 'pdf' | 'png';
|
|
12658
|
+
type QuickAccessPosition = 'above' | 'below';
|
|
12659
|
+
type FeedbackSoundScheme = 'modern' | 'classic';
|
|
12660
|
+
type OptionsPrintWhat = 'slides' | 'handouts' | 'notes' | 'outline';
|
|
12661
|
+
type OptionsPrintColorMode = 'color' | 'grayscale' | 'blackAndWhite';
|
|
12662
|
+
interface ViewerGeneralOptions {
|
|
12663
|
+
displayOptimization: DisplayOptimization;
|
|
12664
|
+
showMiniToolbar: boolean;
|
|
12665
|
+
enableLivePreview: boolean;
|
|
12666
|
+
collapseRibbonAutomatically: boolean;
|
|
12667
|
+
collapseSearchByDefault: boolean;
|
|
12668
|
+
screenTipStyle: ScreenTipStyle;
|
|
12669
|
+
userName: string;
|
|
12670
|
+
userInitials: string;
|
|
12671
|
+
showStartScreen: boolean;
|
|
12672
|
+
/**
|
|
12673
|
+
* Lets the user hand a local font file to the viewer so decks authored
|
|
12674
|
+
* with a font the browser lacks render with the real face.
|
|
12675
|
+
*
|
|
12676
|
+
* Off by default. The registration reads a file the user picks and adds it
|
|
12677
|
+
* to the page's font set for the session, which is a capability a host
|
|
12678
|
+
* embedding the viewer should opt into rather than inherit.
|
|
12679
|
+
*/
|
|
12680
|
+
enableCustomFontUpload: boolean;
|
|
12681
|
+
}
|
|
12682
|
+
interface ViewerProofingOptions {
|
|
12683
|
+
autoCorrectTwoInitialCapitals: boolean;
|
|
12684
|
+
autoCorrectCapitalizeFirstLetter: boolean;
|
|
12685
|
+
autoCorrectCapitalizeDayNames: boolean;
|
|
12686
|
+
autoCorrectSmartQuotes: boolean;
|
|
12687
|
+
autoCorrectHyphensToDash: boolean;
|
|
12688
|
+
autoCorrectFractions: boolean;
|
|
12689
|
+
autoCorrectOrdinals: boolean;
|
|
12690
|
+
ignoreUppercase: boolean;
|
|
12691
|
+
ignoreWordsWithNumbers: boolean;
|
|
12692
|
+
ignoreInternetAddresses: boolean;
|
|
12693
|
+
flagRepeatedWords: boolean;
|
|
12694
|
+
checkSpellingAsYouType: boolean;
|
|
12695
|
+
hideSpellingErrors: boolean;
|
|
12696
|
+
}
|
|
12697
|
+
/**
|
|
12698
|
+
* File > Options > Save.
|
|
12699
|
+
*
|
|
12700
|
+
* Font embedding deliberately has NO entry here. It is owned by the File >
|
|
12701
|
+
* Fonts panel, whose toggle is the one the save path reads (see
|
|
12702
|
+
* `render/font-embedding`: `describeFontEmbedding` decides the toggle's start
|
|
12703
|
+
* position and whether it can do anything at all, `embeddedFontSaveOptions`
|
|
12704
|
+
* turns it into the `PptxHandler.save()` slice). This group used to carry a
|
|
12705
|
+
* second `embedFonts` boolean, plus an `embedAllFontCharacters` companion, and
|
|
12706
|
+
* neither was read by anything: the pane moved a switch that changed no saved
|
|
12707
|
+
* byte, while the panel next door moved the real one. Two switches for one
|
|
12708
|
+
* setting, one of them lying, is worse than one switch in a less
|
|
12709
|
+
* PowerPoint-shaped place.
|
|
12710
|
+
*/
|
|
12711
|
+
interface ViewerSaveOptions {
|
|
12712
|
+
autoSave: boolean;
|
|
12713
|
+
autoRecoverIntervalMinutes: number;
|
|
12714
|
+
keepLastAutoRecoveredVersion: boolean;
|
|
12715
|
+
defaultExportFormat: DefaultExportFormat;
|
|
12716
|
+
cacheRetentionDays: number;
|
|
12717
|
+
clearCacheOnClose: boolean;
|
|
12718
|
+
}
|
|
12719
|
+
interface ViewerAccessibilityOptions {
|
|
12720
|
+
showAccessibilityStatus: boolean;
|
|
12721
|
+
feedbackWithSound: boolean;
|
|
12722
|
+
soundScheme: FeedbackSoundScheme;
|
|
12723
|
+
showShortcutKeysInScreenTips: boolean;
|
|
12724
|
+
reducedMotion: boolean;
|
|
12725
|
+
}
|
|
12726
|
+
interface ViewerAdvancedOptions {
|
|
12727
|
+
autoSelectEntireWord: boolean;
|
|
12728
|
+
allowTextDragAndDrop: boolean;
|
|
12729
|
+
maximumUndoSteps: number;
|
|
12730
|
+
useSmartCutAndPaste: boolean;
|
|
12731
|
+
showPasteOptionsButton: boolean;
|
|
12732
|
+
imageDefaultResolution: ImageResolutionPreset;
|
|
12733
|
+
doNotCompressImages: boolean;
|
|
12734
|
+
chartPropertiesFollowDataPoint: boolean;
|
|
12735
|
+
recentPresentationsCount: number;
|
|
12736
|
+
showVerticalRuler: boolean;
|
|
12737
|
+
showGrid: boolean;
|
|
12738
|
+
snapToGrid: boolean;
|
|
12739
|
+
disableHardwareAcceleration: boolean;
|
|
12740
|
+
/**
|
|
12741
|
+
* Force every opt-in interactive 3D scene (SmartArt, bar/line/area/pie/
|
|
12742
|
+
* surface charts) to fall back to its flat 2D rendering, even when the
|
|
12743
|
+
* host has enabled that scene via its own `smartArt3D`/`*Chart3D` prop.
|
|
12744
|
+
* A host opting in says "this deck may want 3D"; this is the viewer
|
|
12745
|
+
* user's own override for when the WebGL scenes it renders are too much
|
|
12746
|
+
* for their machine. See `resolve3DRenderingFlags`.
|
|
12747
|
+
*/
|
|
12748
|
+
disable3DRendering: boolean;
|
|
12749
|
+
/**
|
|
12750
|
+
* `p:animEffect/@filter="pixelate"` defaults to snapping the element to
|
|
12751
|
+
* its end state (`cutIn`/`cutOut`), matching PowerPoint's own behaviour
|
|
12752
|
+
* (COM `CreateVideo` frame-diffing shows PowerPoint performs no animation
|
|
12753
|
+
* at all for this filter value). This turns on the blocky mosaic reveal
|
|
12754
|
+
* this renderer can build instead, for a viewer that would rather show
|
|
12755
|
+
* something animating than PowerPoint's own instant swap. See
|
|
12756
|
+
* `resolveFilterEffect` in `animation-filter-effects.ts` and
|
|
12757
|
+
* `docs/guide/visual-effects.md`.
|
|
12758
|
+
*/
|
|
12759
|
+
pixelateMosaicAnimation: boolean;
|
|
12760
|
+
openDocumentsView: OpenDocumentsView;
|
|
12761
|
+
slideShowShowMenuOnRightClick: boolean;
|
|
12762
|
+
slideShowShowPopupToolbar: boolean;
|
|
12763
|
+
slideShowPromptKeepInkAnnotations: boolean;
|
|
12764
|
+
slideShowEndWithBlackSlide: boolean;
|
|
12765
|
+
printInBackground: boolean;
|
|
12766
|
+
printHighQuality: boolean;
|
|
12767
|
+
printUseMostRecentSettings: boolean;
|
|
12768
|
+
printWhat: OptionsPrintWhat;
|
|
12769
|
+
printColorMode: OptionsPrintColorMode;
|
|
12770
|
+
printHiddenSlides: boolean;
|
|
12771
|
+
printScaleToFit: boolean;
|
|
12772
|
+
printFrameSlides: boolean;
|
|
12773
|
+
}
|
|
12774
|
+
interface ViewerRibbonOptions {
|
|
12775
|
+
/** Ribbon tabs unticked in Customize Ribbon. The File tab can never be hidden. */
|
|
12776
|
+
hiddenTabIds: ToolbarTabId[];
|
|
12777
|
+
}
|
|
12778
|
+
interface ViewerQuickAccessOptions {
|
|
12779
|
+
visible: boolean;
|
|
12780
|
+
position: QuickAccessPosition;
|
|
12781
|
+
showCommandLabels: boolean;
|
|
12782
|
+
/** Ordered ids from `QUICK_ACCESS_COMMAND_CATALOG`. */
|
|
12783
|
+
commandIds: string[];
|
|
12784
|
+
}
|
|
12785
|
+
interface ViewerTrustOptions {
|
|
12786
|
+
openInProtectedView: boolean;
|
|
12787
|
+
allowExternalContent: boolean;
|
|
12788
|
+
confirmExternalHyperlinks: boolean;
|
|
12789
|
+
}
|
|
12790
|
+
interface ViewerOptions {
|
|
12791
|
+
general: ViewerGeneralOptions;
|
|
12792
|
+
proofing: ViewerProofingOptions;
|
|
12793
|
+
save: ViewerSaveOptions;
|
|
12794
|
+
accessibility: ViewerAccessibilityOptions;
|
|
12795
|
+
advanced: ViewerAdvancedOptions;
|
|
12796
|
+
ribbon: ViewerRibbonOptions;
|
|
12797
|
+
quickAccess: ViewerQuickAccessOptions;
|
|
12798
|
+
trust: ViewerTrustOptions;
|
|
12799
|
+
}
|
|
12800
|
+
type ViewerOptionsGroupId = keyof ViewerOptions;
|
|
12801
|
+
type ViewerOptionPrimitive = boolean | number | string;
|
|
12802
|
+
//#endregion
|
|
12490
12803
|
//#region src/export/handout-layout.d.ts
|
|
12491
12804
|
/**
|
|
12492
12805
|
* Pure handout layout calculations, shared by every binding's print path.
|
|
@@ -12529,6 +12842,246 @@ interface PrintSettings {
|
|
|
12529
12842
|
*/
|
|
12530
12843
|
scaleToFit?: boolean;
|
|
12531
12844
|
}
|
|
12845
|
+
/** Every command the Edit Points right-click menu can offer. */
|
|
12846
|
+
type EditPointsCommandId = 'add-point' | 'delete-point' | 'delete-segment' | 'open-path' | 'close-path' | 'smooth-point' | 'straight-point' | 'corner-point' | 'straight-segment' | 'curved-segment' | 'exit';
|
|
12847
|
+
//#endregion
|
|
12848
|
+
//#region src/render/edit-points/freeform-tool-geometry.d.ts
|
|
12849
|
+
/** The two click-to-place drawing tools. */
|
|
12850
|
+
type FreeformToolKind = 'freeformShape' | 'curve';
|
|
12851
|
+
//#endregion
|
|
12852
|
+
//#region src/render/options/viewer-options-controls.d.ts
|
|
12853
|
+
/**
|
|
12854
|
+
* Control/section/tab descriptor types for the File > Options schema, plus
|
|
12855
|
+
* the terse constructors the tab-definition modules build panes with.
|
|
12856
|
+
*/
|
|
12857
|
+
type ViewerOptionsTabId = 'general' | 'proofing' | 'save' | 'language' | 'accessibility' | 'advanced' | 'ribbon' | 'quickAccess' | 'addIns' | 'trust';
|
|
12858
|
+
//#endregion
|
|
12859
|
+
//#region src/render/customization/customization-types.d.ts
|
|
12860
|
+
/** Keys of an options group whose value is a primitive (not an array). */
|
|
12861
|
+
type PrimitiveKeys<T> = { [K in keyof T]: T[K] extends ViewerOptionPrimitive ? K : never; }[keyof T] & string;
|
|
12862
|
+
/**
|
|
12863
|
+
* One File > Options setting, addressed as `<group>.<key>`, for example
|
|
12864
|
+
* `general.userName` or `advanced.showGrid`. The union is derived from the
|
|
12865
|
+
* `ViewerOptions` model itself, so a typo is a compile error.
|
|
12866
|
+
*/
|
|
12867
|
+
type OptionsSettingId = { [G in ViewerOptionsGroupId]: `${G}.${PrimitiveKeys<ViewerOptions[G]>}`; }[ViewerOptionsGroupId];
|
|
12868
|
+
/**
|
|
12869
|
+
* A File > Options page: the ten PowerPoint categories plus `ai`, the AI
|
|
12870
|
+
* assistant page a binding adds when the host configured an assistant.
|
|
12871
|
+
*/
|
|
12872
|
+
type OptionsPageId = ViewerOptionsTabId | 'ai';
|
|
12873
|
+
/**
|
|
12874
|
+
* One section of an Options page, addressed as `<page>.<section>`, for
|
|
12875
|
+
* example `general.personalize` or `advanced.print`. The full list is
|
|
12876
|
+
* `OPTIONS_SECTION_IDS` (derived from the schema at runtime).
|
|
12877
|
+
*/
|
|
12878
|
+
type OptionsSectionId = `${ViewerOptionsTabId}.${string}`;
|
|
12879
|
+
/** Values a host forces onto settings. */
|
|
12880
|
+
type OptionsSettingValues = Partial<Record<OptionsSettingId, ViewerOptionPrimitive>>;
|
|
12881
|
+
/** Ribbon and toolbar customisation. */
|
|
12882
|
+
interface RibbonCustomization {
|
|
12883
|
+
/** Ribbon tabs to remove (the File tab included, unlike Customize Ribbon). */
|
|
12884
|
+
hiddenTabs?: readonly ToolbarTabId[];
|
|
12885
|
+
/** Top-level toolbar buttons / control clusters to remove. */
|
|
12886
|
+
hiddenButtons?: readonly ToolbarButtonId[];
|
|
12887
|
+
}
|
|
12888
|
+
/** File > Options (the Settings dialog) customisation. */
|
|
12889
|
+
interface OptionsCustomization {
|
|
12890
|
+
/** Whole pages to remove from the dialog's category rail. */
|
|
12891
|
+
hiddenPages?: readonly OptionsPageId[];
|
|
12892
|
+
/** Sections (`<page>.<section>`) to remove from their page. */
|
|
12893
|
+
hiddenSections?: readonly OptionsSectionId[];
|
|
12894
|
+
/** Individual settings (`<group>.<key>`) to remove wherever they appear. */
|
|
12895
|
+
hiddenSettings?: readonly OptionsSettingId[];
|
|
12896
|
+
/**
|
|
12897
|
+
* Settings pinned to a fixed value. The value is forced into the options
|
|
12898
|
+
* store, user edits to it are ignored, and the control renders read-only.
|
|
12899
|
+
* Add the id to `hiddenSettings` too to lock it invisibly.
|
|
12900
|
+
*/
|
|
12901
|
+
locked?: OptionsSettingValues;
|
|
12902
|
+
/**
|
|
12903
|
+
* Host defaults: the value a setting starts at when the user has not saved
|
|
12904
|
+
* a choice of their own. "Reset" returns to these, not to the built-ins.
|
|
12905
|
+
*/
|
|
12906
|
+
defaults?: OptionsSettingValues;
|
|
12907
|
+
}
|
|
12908
|
+
/** File tab (backstage) customisation. */
|
|
12909
|
+
interface BackstageCustomization {
|
|
12910
|
+
/** Navigation entries (pages) to remove from the File tab. */
|
|
12911
|
+
hiddenPages?: readonly BackstagePage[];
|
|
12912
|
+
/** Action cards to remove from the pages that show them. */
|
|
12913
|
+
hiddenCards?: readonly BackstageCardId[];
|
|
12914
|
+
}
|
|
12915
|
+
/** Right-click menu customisation. */
|
|
12916
|
+
interface ContextMenuCustomization {
|
|
12917
|
+
/** Entries to remove from the element (right-click on a shape) menu. */
|
|
12918
|
+
hiddenElementCommands?: readonly ContextMenuCommandId[];
|
|
12919
|
+
/** Entries to remove from the empty-canvas menu. */
|
|
12920
|
+
hiddenCanvasCommands?: readonly CanvasContextMenuCommandId[];
|
|
12921
|
+
/**
|
|
12922
|
+
* Entries to remove from the Edit Points menu (right-click a vertex or a
|
|
12923
|
+
* segment while editing a shape's points).
|
|
12924
|
+
*/
|
|
12925
|
+
hiddenEditPointsCommands?: readonly EditPointsCommandId[];
|
|
12926
|
+
/** Remove the element context menu entirely. */
|
|
12927
|
+
disableElementMenu?: boolean;
|
|
12928
|
+
/** Remove the empty-canvas context menu entirely. */
|
|
12929
|
+
disableCanvasMenu?: boolean;
|
|
12930
|
+
}
|
|
12931
|
+
/**
|
|
12932
|
+
* A shortcut chord in the form `Mod+Shift+D`: modifiers `Mod` (Ctrl on
|
|
12933
|
+
* Windows/Linux, Cmd on macOS), `Ctrl`, `Meta`, `Alt`, `Shift`, joined by `+`,
|
|
12934
|
+
* followed by a `KeyboardEvent.key` value (`D`, `Delete`, `ArrowLeft`, `F2`).
|
|
12935
|
+
*/
|
|
12936
|
+
type ShortcutChord = string;
|
|
12937
|
+
/** Editor keyboard-shortcut customisation. */
|
|
12938
|
+
interface KeyboardCustomization {
|
|
12939
|
+
/** Turn every editor shortcut off (the host owns the keyboard). */
|
|
12940
|
+
disableAll?: boolean;
|
|
12941
|
+
/** Editor commands whose shortcut is turned off. */
|
|
12942
|
+
disabled?: readonly EditorKeyActionName[];
|
|
12943
|
+
/**
|
|
12944
|
+
* Replacement chords per command. A remapped command no longer answers to
|
|
12945
|
+
* its built-in chord; it answers to the chord(s) given here instead.
|
|
12946
|
+
*/
|
|
12947
|
+
remap?: Partial<Record<EditorKeyActionName, ShortcutChord | readonly ShortcutChord[]>>;
|
|
12948
|
+
}
|
|
12949
|
+
/**
|
|
12950
|
+
* Chrome regions a host can remove. Each id maps onto one region in every
|
|
12951
|
+
* binding; see `VIEWER_PANEL_IDS` for the catalogue.
|
|
12952
|
+
*/
|
|
12953
|
+
type ViewerPanelId = 'statusBar' | 'slidesPane' | 'inspector' | 'notes' | 'quickAccessToolbar' | 'titleBar';
|
|
12954
|
+
/** Feature areas that can be switched off as a whole. */
|
|
12955
|
+
type ViewerFeatureId = 'ai' | 'collaboration' | 'comments' | 'presentMode' | 'editPoints';
|
|
12956
|
+
/**
|
|
12957
|
+
* The click-to-place drawing tools of Insert > Shapes > Lines: Freeform:
|
|
12958
|
+
* Shape and Curve.
|
|
12959
|
+
*/
|
|
12960
|
+
type ViewerDrawingToolId = FreeformToolKind;
|
|
12961
|
+
/** Dialogs (and the entry points that open them) a host can remove. */
|
|
12962
|
+
type ViewerDialogId = 'options' | 'share' | 'broadcast' | 'print' | 'export';
|
|
12963
|
+
/** Export formats offered by the File > Export page. */
|
|
12964
|
+
type ViewerExportFormatId = 'pdf' | 'png' | 'video' | 'gif' | 'json' | 'copyImage';
|
|
12965
|
+
/**
|
|
12966
|
+
* The whole customisation object. Every field is optional; omitted fields hide
|
|
12967
|
+
* nothing and lock nothing.
|
|
12968
|
+
*/
|
|
12969
|
+
interface ViewerCustomization {
|
|
12970
|
+
ribbon?: RibbonCustomization;
|
|
12971
|
+
options?: OptionsCustomization;
|
|
12972
|
+
backstage?: BackstageCustomization;
|
|
12973
|
+
contextMenu?: ContextMenuCustomization;
|
|
12974
|
+
keyboard?: KeyboardCustomization;
|
|
12975
|
+
/** Chrome regions to remove (`true` hides). */
|
|
12976
|
+
hiddenPanels?: readonly ViewerPanelId[];
|
|
12977
|
+
/** Feature areas to switch off (their buttons, menus, pages and panels). */
|
|
12978
|
+
disabledFeatures?: readonly ViewerFeatureId[];
|
|
12979
|
+
/** Dialogs to remove, along with every entry point that opens them. */
|
|
12980
|
+
hiddenDialogs?: readonly ViewerDialogId[];
|
|
12981
|
+
/** Export formats to remove from File > Export. */
|
|
12982
|
+
hiddenExportFormats?: readonly ViewerExportFormatId[];
|
|
12983
|
+
/** Drawing tools to remove from the Insert > Shapes gallery. */
|
|
12984
|
+
hiddenDrawingTools?: readonly ViewerDrawingToolId[];
|
|
12985
|
+
}
|
|
12986
|
+
//#endregion
|
|
12987
|
+
//#region src/render/customization/customization-catalog.d.ts
|
|
12988
|
+
declare const RIBBON_TAB_IDS: readonly ToolbarTabId[];
|
|
12989
|
+
declare const TOOLBAR_BUTTON_IDS: readonly ["share", "broadcast", "export", "undo", "redo", "record", "notes", "fullscreen", "zoom", "navigation", "mergeShapes", "crop"];
|
|
12990
|
+
declare const OPTIONS_PAGE_IDS: readonly OptionsPageId[];
|
|
12991
|
+
declare const OPTIONS_SECTION_IDS: readonly OptionsSectionId[];
|
|
12992
|
+
declare const OPTIONS_SETTING_IDS: readonly OptionsSettingId[];
|
|
12993
|
+
declare const BACKSTAGE_PAGE_IDS: readonly BackstagePage[];
|
|
12994
|
+
declare const BACKSTAGE_CARD_IDS: readonly BackstageCardId[];
|
|
12995
|
+
declare const ELEMENT_CONTEXT_MENU_COMMAND_IDS: readonly ["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", "merge-union", "merge-combine", "merge-fragment", "merge-intersect", "merge-subtract", "save-as-picture", "edit-alt-text", "size-and-position", "format-shape", "delete"];
|
|
12996
|
+
declare const CANVAS_CONTEXT_MENU_COMMAND_IDS: readonly ["paste", "layout", "reset-slide", "format-background", "grid-and-guides", "ruler"];
|
|
12997
|
+
declare const EDITOR_SHORTCUT_ACTION_IDS: readonly ["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"];
|
|
12998
|
+
declare const VIEWER_PANEL_IDS: readonly ["statusBar", "slidesPane", "inspector", "notes", "quickAccessToolbar", "titleBar"];
|
|
12999
|
+
declare const VIEWER_FEATURE_IDS: readonly ["ai", "collaboration", "comments", "presentMode", "editPoints"];
|
|
13000
|
+
declare const VIEWER_DIALOG_IDS: readonly ["options", "share", "broadcast", "print", "export"];
|
|
13001
|
+
declare const VIEWER_EXPORT_FORMAT_IDS: readonly ["pdf", "png", "video", "gif", "json", "copyImage"];
|
|
13002
|
+
//#endregion
|
|
13003
|
+
//#region src/render/customization/customization-keymap.d.ts
|
|
13004
|
+
/** A parsed `Mod+Shift+D` chord. */
|
|
13005
|
+
interface ParsedShortcutChord {
|
|
13006
|
+
key: string;
|
|
13007
|
+
mod: boolean;
|
|
13008
|
+
ctrl: boolean;
|
|
13009
|
+
meta: boolean;
|
|
13010
|
+
alt: boolean;
|
|
13011
|
+
shift: boolean;
|
|
13012
|
+
}
|
|
13013
|
+
/** The normalised keyboard slice of a resolved customisation. */
|
|
13014
|
+
interface ResolvedKeyboardCustomization {
|
|
13015
|
+
disableAll: boolean;
|
|
13016
|
+
disabled: ReadonlySet<EditorKeyActionName>;
|
|
13017
|
+
remap: ReadonlyMap<EditorKeyActionName, readonly ParsedShortcutChord[]>;
|
|
13018
|
+
}
|
|
13019
|
+
//#endregion
|
|
13020
|
+
//#region src/render/customization/customization-resolve.d.ts
|
|
13021
|
+
/** The normalised, set-based view of a customisation. Treat as immutable. */
|
|
13022
|
+
interface ResolvedCustomization {
|
|
13023
|
+
hiddenActions: ReadonlySet<ToolbarActionId>;
|
|
13024
|
+
hiddenOptionsPages: ReadonlySet<OptionsPageId>;
|
|
13025
|
+
hiddenOptionsSections: ReadonlySet<OptionsSectionId>;
|
|
13026
|
+
hiddenSettings: ReadonlySet<OptionsSettingId>;
|
|
13027
|
+
lockedSettings: OptionsSettingValues;
|
|
13028
|
+
defaultSettings: OptionsSettingValues;
|
|
13029
|
+
hiddenBackstagePages: ReadonlySet<BackstagePage>;
|
|
13030
|
+
hiddenBackstageCards: ReadonlySet<BackstageCardId>;
|
|
13031
|
+
hiddenElementCommands: ReadonlySet<ContextMenuCommandId>;
|
|
13032
|
+
hiddenCanvasCommands: ReadonlySet<CanvasContextMenuCommandId>;
|
|
13033
|
+
hiddenEditPointsCommands: ReadonlySet<EditPointsCommandId>;
|
|
13034
|
+
hiddenDrawingTools: ReadonlySet<ViewerDrawingToolId>;
|
|
13035
|
+
elementMenuEnabled: boolean;
|
|
13036
|
+
canvasMenuEnabled: boolean;
|
|
13037
|
+
hiddenPanels: ReadonlySet<ViewerPanelId>;
|
|
13038
|
+
disabledFeatures: ReadonlySet<ViewerFeatureId>;
|
|
13039
|
+
hiddenDialogs: ReadonlySet<ViewerDialogId>;
|
|
13040
|
+
keyboard: ResolvedKeyboardCustomization;
|
|
13041
|
+
}
|
|
13042
|
+
//#endregion
|
|
13043
|
+
//#region src/render/customization/customization-controller.d.ts
|
|
13044
|
+
/** The imperative methods every binding's component handle exposes. */
|
|
13045
|
+
interface ViewerCustomizationApi {
|
|
13046
|
+
/** The current customisation object (a snapshot; do not mutate). */
|
|
13047
|
+
getCustomization(): ViewerCustomization;
|
|
13048
|
+
/** Replace the whole customisation. */
|
|
13049
|
+
setCustomization(next: ViewerCustomization): void;
|
|
13050
|
+
/** Merge a partial customisation (see `mergeCustomization`). */
|
|
13051
|
+
updateCustomization(patch: ViewerCustomization): void;
|
|
13052
|
+
/** Drop every customisation, back to the stock UI. */
|
|
13053
|
+
resetCustomization(): void;
|
|
13054
|
+
hideRibbonTab(tab: ToolbarTabId): void;
|
|
13055
|
+
showRibbonTab(tab: ToolbarTabId): void;
|
|
13056
|
+
hideToolbarButton(button: ToolbarButtonId): void;
|
|
13057
|
+
showToolbarButton(button: ToolbarButtonId): void;
|
|
13058
|
+
hideOptionsPage(page: OptionsPageId): void;
|
|
13059
|
+
showOptionsPage(page: OptionsPageId): void;
|
|
13060
|
+
hideOptionsSection(section: OptionsSectionId): void;
|
|
13061
|
+
showOptionsSection(section: OptionsSectionId): void;
|
|
13062
|
+
hideSetting(setting: OptionsSettingId): void;
|
|
13063
|
+
showSetting(setting: OptionsSettingId): void;
|
|
13064
|
+
/** Pin a setting to `value`; `hidden` also removes it from the dialog. */
|
|
13065
|
+
lockSetting(setting: OptionsSettingId, value: ViewerOptionPrimitive, hidden?: boolean): void;
|
|
13066
|
+
unlockSetting(setting: OptionsSettingId): void;
|
|
13067
|
+
/** Set (or with `undefined`, clear) the host default for a setting. */
|
|
13068
|
+
setSettingDefault(setting: OptionsSettingId, value: ViewerOptionPrimitive | undefined): void;
|
|
13069
|
+
hideBackstagePage(page: BackstagePage): void;
|
|
13070
|
+
showBackstagePage(page: BackstagePage): void;
|
|
13071
|
+
hideBackstageCard(card: BackstageCardId): void;
|
|
13072
|
+
showBackstageCard(card: BackstageCardId): void;
|
|
13073
|
+
hideContextMenuCommand(command: ContextMenuCommandId): void;
|
|
13074
|
+
showContextMenuCommand(command: ContextMenuCommandId): void;
|
|
13075
|
+
hideCanvasContextMenuCommand(command: CanvasContextMenuCommandId): void;
|
|
13076
|
+
showCanvasContextMenuCommand(command: CanvasContextMenuCommandId): void;
|
|
13077
|
+
disableShortcut(action: EditorKeyActionName): void;
|
|
13078
|
+
enableShortcut(action: EditorKeyActionName): void;
|
|
13079
|
+
/** Move a command onto new chord(s); `undefined` restores the built-in chord. */
|
|
13080
|
+
remapShortcut(action: EditorKeyActionName, chords: ShortcutChord | readonly ShortcutChord[] | undefined): void;
|
|
13081
|
+
setPanelVisible(panel: ViewerPanelId, visible: boolean): void;
|
|
13082
|
+
setFeatureEnabled(feature: ViewerFeatureId, enabled: boolean): void;
|
|
13083
|
+
setDialogAvailable(dialog: ViewerDialogId, available: boolean): void;
|
|
13084
|
+
}
|
|
12532
13085
|
//#endregion
|
|
12533
13086
|
//#region src/render/viewport-fit.d.ts
|
|
12534
13087
|
/** Unscaled CSS pixels reserved on each side of the ordinary viewer viewport. */
|
|
@@ -13011,6 +13564,18 @@ interface PowerPointViewerProps extends ViewportFitOptions {
|
|
|
13011
13564
|
* hidden, matching the pre-existing always-visible behaviour.
|
|
13012
13565
|
*/
|
|
13013
13566
|
hiddenActions?: ToolbarActionId[];
|
|
13567
|
+
/**
|
|
13568
|
+
* Framework-neutral UI customisation. See docs/guide/customization.md.
|
|
13569
|
+
*
|
|
13570
|
+
* Hides ribbon tabs, toolbar buttons, Options pages / sections / settings,
|
|
13571
|
+
* File tab pages and cards, context-menu entries, panels, features and
|
|
13572
|
+
* dialogs; locks settings and sets host defaults; disables or remaps editor
|
|
13573
|
+
* shortcuts. Unioned with `hiddenActions`. Passing a NEW object replaces the
|
|
13574
|
+
* whole customisation, discarding edits made through the imperative
|
|
13575
|
+
* helpers (`hideRibbonTab`, `lockSetting`, ...) on the component instance;
|
|
13576
|
+
* mutating the same object in place is not observed.
|
|
13577
|
+
*/
|
|
13578
|
+
customization?: ViewerCustomization;
|
|
13014
13579
|
/**
|
|
13015
13580
|
* Show the speaker-notes panel and its toolbar toggle. Default true. The
|
|
13016
13581
|
* panel is plain-text only and reads the active slide's notes; pass
|
|
@@ -13201,9 +13766,10 @@ interface PowerPointViewerProps extends ViewportFitOptions {
|
|
|
13201
13766
|
/**
|
|
13202
13767
|
* Imperative editing API exposed on the `<PowerPointViewer>` component
|
|
13203
13768
|
* instance (via `bind:this`). Mirrors the vanilla binding's `EditorController`
|
|
13204
|
-
* surface subset the host drives directly
|
|
13769
|
+
* surface subset the host drives directly, plus the shared UI-customisation
|
|
13770
|
+
* helpers (`ViewerCustomizationApi`: `hideRibbonTab`, `lockSetting`, ...).
|
|
13205
13771
|
*/
|
|
13206
|
-
interface PowerPointViewerApi extends PowerPointViewerAPI {
|
|
13772
|
+
interface PowerPointViewerApi extends PowerPointViewerAPI, ViewerCustomizationApi {
|
|
13207
13773
|
/** Undo the last committed edit. */
|
|
13208
13774
|
undo(): void;
|
|
13209
13775
|
/** Redo the last undone edit. */
|
|
@@ -13306,5 +13872,5 @@ declare const PowerPointViewer: Component<PowerPointViewerProps, PowerPointViewe
|
|
|
13306
13872
|
*/
|
|
13307
13873
|
type AutosaveStatus = 'idle' | 'disabled' | 'saving' | 'saved' | 'error';
|
|
13308
13874
|
|
|
13309
|
-
export { PPTX_OPEN_ACCEPT, PRESENTATION_OPEN_EXTENSIONS, PowerPointViewer, createImageElementFromFile, defaultCssVars, defaultRadius, defaultThemeColors, deleteAutosaveSnapshot, describeCollaborationShellState, exportAllSlidesToSvg, exportAllSlidesToSvgBlobs, exportSlideAsSvg, exportSlideToSvg, exportSlideToSvgBlob, forgetSessionDeck, getAutosaveSnapshot, getSessionTabId, isLegacyBinaryPresentation, isSupportedPresentationFile, listAutosaveSnapshots, loadPresentationDeck, loadSessionDeck, parsePresentationSessionId, presentationBaseName, registerTranslations, rememberSessionDeck, renderToCanvas, restoreSessionDeck, savedPresentationFileName, themeToCssVars, vermilionDarkColors, vermilionDarkTheme, vermilionLightColors, vermilionLightTheme, vermilionRadius };
|
|
13310
|
-
export type { AutosaveRecord, AutosaveStatus, CanvasSize, CollaborationConfig, CollaborationRole, CollaborationShellState, CollaborationTransport, ConnectionStatus, ElementUpdate, ElementUpdateOptions, ExportGifOptions, ExportPdfOptions, ExportVideoOptions, ExternalCollaborationAwareness, ExternalCollaborationSession, ExternalCollaborationSnapshot, PowerPointViewerApi, PowerPointViewerProps, PptxAiBridge, PptxAiConfig, PptxAiConnection, PptxAiContextStrategy, PptxAiToolName, PptxAiUIMessage, PptxAiWritePolicy, PrintOptions, RemoteCursor, SanitizedPresence, SavedPresentationFormat, SessionDeck, SvgExportAllOptions, SvgExportSingleSlideOptions, TranslationDictionary, Translator, ViewerLoadDetail, ViewerTheme, ViewerThemeColors, ViewportFitOptions, ViewportFitPadding };
|
|
13875
|
+
export { BACKSTAGE_CARD_IDS, BACKSTAGE_PAGE_IDS, CANVAS_CONTEXT_MENU_COMMAND_IDS, EDITOR_SHORTCUT_ACTION_IDS, ELEMENT_CONTEXT_MENU_COMMAND_IDS, OPTIONS_PAGE_IDS, OPTIONS_SECTION_IDS, OPTIONS_SETTING_IDS, PPTX_OPEN_ACCEPT, PRESENTATION_OPEN_EXTENSIONS, PowerPointViewer, RIBBON_TAB_IDS, TOOLBAR_BUTTON_IDS, VIEWER_DIALOG_IDS, VIEWER_EXPORT_FORMAT_IDS, VIEWER_FEATURE_IDS, VIEWER_PANEL_IDS, createImageElementFromFile, defaultCssVars, defaultRadius, defaultThemeColors, deleteAutosaveSnapshot, describeCollaborationShellState, exportAllSlidesToSvg, exportAllSlidesToSvgBlobs, exportSlideAsSvg, exportSlideToSvg, exportSlideToSvgBlob, forgetSessionDeck, getAutosaveSnapshot, getSessionTabId, isLegacyBinaryPresentation, isSupportedPresentationFile, listAutosaveSnapshots, loadPresentationDeck, loadSessionDeck, parsePresentationSessionId, presentationBaseName, registerTranslations, rememberSessionDeck, renderToCanvas, restoreSessionDeck, savedPresentationFileName, themeToCssVars, vermilionDarkColors, vermilionDarkTheme, vermilionLightColors, vermilionLightTheme, vermilionRadius };
|
|
13876
|
+
export type { AutosaveRecord, AutosaveStatus, BackstageCustomization, CanvasSize, CollaborationConfig, CollaborationRole, CollaborationShellState, CollaborationTransport, ConnectionStatus, ContextMenuCustomization, ElementUpdate, ElementUpdateOptions, ExportGifOptions, ExportPdfOptions, ExportVideoOptions, ExternalCollaborationAwareness, ExternalCollaborationSession, ExternalCollaborationSnapshot, KeyboardCustomization, OptionsCustomization, OptionsPageId, OptionsSectionId, OptionsSettingId, OptionsSettingValues, PowerPointViewerApi, PowerPointViewerProps, PptxAiBridge, PptxAiConfig, PptxAiConnection, PptxAiContextStrategy, PptxAiToolName, PptxAiUIMessage, PptxAiWritePolicy, PrintOptions, RemoteCursor, ResolvedCustomization, RibbonCustomization, SanitizedPresence, SavedPresentationFormat, SessionDeck, ShortcutChord, SvgExportAllOptions, SvgExportSingleSlideOptions, TranslationDictionary, Translator, ViewerCustomization, ViewerCustomizationApi, ViewerDialogId, ViewerExportFormatId, ViewerFeatureId, ViewerLoadDetail, ViewerPanelId, ViewerTheme, ViewerThemeColors, ViewportFitOptions, ViewportFitPadding };
|