pptx-react-viewer 4.8.0 → 4.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (135) hide show
  1. package/CHANGELOG.md +139 -0
  2. package/dist/{AiChatPanel-4LMJIJUU.js → AiChatPanel-RBQFM6JK.js} +28 -28
  3. package/dist/AiChatPanel-RBQFM6JK.js.br +0 -0
  4. package/dist/AiChatPanel-RBQFM6JK.js.gz +0 -0
  5. package/dist/{AiChatPanel-XWYLYN26.mjs → AiChatPanel-SIEMT43N.mjs} +4 -4
  6. package/dist/AiChatPanel-SIEMT43N.mjs.br +0 -0
  7. package/dist/AiChatPanel-SIEMT43N.mjs.gz +0 -0
  8. package/dist/{Model3DScene-N6IZ7Q57.mjs → Model3DScene-HZ7SOUFQ.mjs} +1 -1
  9. package/dist/{Model3DScene-N6IZ7Q57.mjs.br → Model3DScene-HZ7SOUFQ.mjs.br} +0 -0
  10. package/dist/Model3DScene-HZ7SOUFQ.mjs.gz +0 -0
  11. package/dist/{Model3DScene-YAPQ5BCI.js → Model3DScene-ITAVIIVY.js} +2 -2
  12. package/dist/Model3DScene-ITAVIIVY.js.br +0 -0
  13. package/dist/Model3DScene-ITAVIIVY.js.gz +0 -0
  14. package/dist/{chunk-KHEJXP4I.mjs → chunk-3UZYGG6W.mjs} +2547 -1856
  15. package/dist/chunk-3UZYGG6W.mjs.br +0 -0
  16. package/dist/chunk-3UZYGG6W.mjs.gz +0 -0
  17. package/dist/{chunk-SOMUGI3Y.mjs → chunk-A5A6B2PA.mjs} +18 -14
  18. package/dist/chunk-A5A6B2PA.mjs.br +0 -0
  19. package/dist/chunk-A5A6B2PA.mjs.gz +0 -0
  20. package/dist/{chunk-YF2BQIW3.js → chunk-E5565MDK.js} +11989 -4273
  21. package/dist/chunk-E5565MDK.js.br +0 -0
  22. package/dist/chunk-E5565MDK.js.gz +0 -0
  23. package/dist/{chunk-YPDPSXPK.mjs → chunk-HDH4KFDK.mjs} +259 -0
  24. package/dist/chunk-HDH4KFDK.mjs.br +0 -0
  25. package/dist/chunk-HDH4KFDK.mjs.gz +0 -0
  26. package/dist/{chunk-LTBTG2QB.js → chunk-KPKO2ELT.js} +259 -0
  27. package/dist/chunk-KPKO2ELT.js.br +0 -0
  28. package/dist/chunk-KPKO2ELT.js.gz +0 -0
  29. package/dist/{chunk-SSXGPYBF.mjs → chunk-LMJU46E5.mjs} +34 -16
  30. package/dist/chunk-LMJU46E5.mjs.br +0 -0
  31. package/dist/chunk-LMJU46E5.mjs.gz +0 -0
  32. package/dist/{chunk-SAYZSUNQ.js → chunk-NTMJSTXL.js} +221 -203
  33. package/dist/chunk-NTMJSTXL.js.br +0 -0
  34. package/dist/chunk-NTMJSTXL.js.gz +0 -0
  35. package/dist/{chunk-UTP22QYH.js → chunk-PPDIZ3XP.js} +5 -5
  36. package/dist/chunk-PPDIZ3XP.js.br +0 -0
  37. package/dist/chunk-PPDIZ3XP.js.gz +0 -0
  38. package/dist/{chunk-Q4XJSJYI.mjs → chunk-WM33FDLD.mjs} +1 -1
  39. package/dist/chunk-WM33FDLD.mjs.br +0 -0
  40. package/dist/chunk-WM33FDLD.mjs.gz +0 -0
  41. package/dist/{chunk-NPZOVIHG.mjs → chunk-ZBFDEYLQ.mjs} +11968 -4273
  42. package/dist/chunk-ZBFDEYLQ.mjs.br +0 -0
  43. package/dist/chunk-ZBFDEYLQ.mjs.gz +0 -0
  44. package/dist/{chunk-NV2H57Q4.js → chunk-ZEQVK2FT.js} +4565 -3874
  45. package/dist/chunk-ZEQVK2FT.js.br +0 -0
  46. package/dist/chunk-ZEQVK2FT.js.gz +0 -0
  47. package/dist/{chunk-Q7NWWIPQ.js → chunk-ZI57KREY.js} +830 -826
  48. package/dist/chunk-ZI57KREY.js.br +0 -0
  49. package/dist/chunk-ZI57KREY.js.gz +0 -0
  50. package/dist/i18n/de.cjs +276 -9
  51. package/dist/i18n/de.cjs.br +0 -0
  52. package/dist/i18n/de.cjs.gz +0 -0
  53. package/dist/i18n/de.mjs +276 -9
  54. package/dist/i18n/de.mjs.br +0 -0
  55. package/dist/i18n/de.mjs.gz +0 -0
  56. package/dist/i18n/es.cjs +276 -9
  57. package/dist/i18n/es.cjs.br +0 -0
  58. package/dist/i18n/es.cjs.gz +0 -0
  59. package/dist/i18n/es.mjs +276 -9
  60. package/dist/i18n/es.mjs.br +0 -0
  61. package/dist/i18n/es.mjs.gz +0 -0
  62. package/dist/i18n/fr.cjs +276 -9
  63. package/dist/i18n/fr.cjs.br +0 -0
  64. package/dist/i18n/fr.cjs.gz +0 -0
  65. package/dist/i18n/fr.mjs +276 -9
  66. package/dist/i18n/fr.mjs.br +0 -0
  67. package/dist/i18n/fr.mjs.gz +0 -0
  68. package/dist/i18n/zh-CN.cjs +279 -12
  69. package/dist/i18n/zh-CN.cjs.br +0 -0
  70. package/dist/i18n/zh-CN.cjs.gz +0 -0
  71. package/dist/i18n/zh-CN.mjs +279 -12
  72. package/dist/i18n/zh-CN.mjs.br +0 -0
  73. package/dist/i18n/zh-CN.mjs.gz +0 -0
  74. package/dist/i18n.js +4 -4
  75. package/dist/i18n.js.br +0 -0
  76. package/dist/i18n.js.gz +0 -0
  77. package/dist/i18n.mjs +1 -1
  78. package/dist/i18n.mjs.br +0 -0
  79. package/dist/i18n.mjs.gz +0 -0
  80. package/dist/index.d.ts +683 -23
  81. package/dist/index.js +63 -63
  82. package/dist/index.js.br +0 -0
  83. package/dist/index.js.gz +0 -0
  84. package/dist/index.mjs +6 -6
  85. package/dist/index.mjs.br +0 -0
  86. package/dist/index.mjs.gz +0 -0
  87. package/dist/internals.d.ts +677 -14
  88. package/dist/internals.js +105 -105
  89. package/dist/internals.js.br +0 -0
  90. package/dist/internals.js.gz +0 -0
  91. package/dist/internals.mjs +4 -4
  92. package/dist/internals.mjs.br +0 -0
  93. package/dist/internals.mjs.gz +0 -0
  94. package/dist/pptx-viewer.css +1 -1
  95. package/dist/pptx-viewer.css.br +0 -0
  96. package/dist/pptx-viewer.css.gz +0 -0
  97. package/dist/viewer/index.d.ts +677 -23
  98. package/dist/viewer/index.js +27 -27
  99. package/dist/viewer/index.js.br +0 -0
  100. package/dist/viewer/index.js.gz +0 -0
  101. package/dist/viewer/index.mjs +6 -6
  102. package/dist/viewer/index.mjs.br +0 -0
  103. package/dist/viewer/index.mjs.gz +0 -0
  104. package/package.json +4 -3
  105. package/dist/AiChatPanel-4LMJIJUU.js.br +0 -0
  106. package/dist/AiChatPanel-4LMJIJUU.js.gz +0 -0
  107. package/dist/AiChatPanel-XWYLYN26.mjs.br +0 -0
  108. package/dist/AiChatPanel-XWYLYN26.mjs.gz +0 -0
  109. package/dist/Model3DScene-N6IZ7Q57.mjs.gz +0 -0
  110. package/dist/Model3DScene-YAPQ5BCI.js.br +0 -0
  111. package/dist/Model3DScene-YAPQ5BCI.js.gz +0 -0
  112. package/dist/chunk-KHEJXP4I.mjs.br +0 -0
  113. package/dist/chunk-KHEJXP4I.mjs.gz +0 -0
  114. package/dist/chunk-LTBTG2QB.js.br +0 -0
  115. package/dist/chunk-LTBTG2QB.js.gz +0 -0
  116. package/dist/chunk-NPZOVIHG.mjs.br +0 -0
  117. package/dist/chunk-NPZOVIHG.mjs.gz +0 -0
  118. package/dist/chunk-NV2H57Q4.js.br +0 -0
  119. package/dist/chunk-NV2H57Q4.js.gz +0 -0
  120. package/dist/chunk-Q4XJSJYI.mjs.br +0 -0
  121. package/dist/chunk-Q4XJSJYI.mjs.gz +0 -0
  122. package/dist/chunk-Q7NWWIPQ.js.br +0 -0
  123. package/dist/chunk-Q7NWWIPQ.js.gz +0 -0
  124. package/dist/chunk-SAYZSUNQ.js.br +0 -0
  125. package/dist/chunk-SAYZSUNQ.js.gz +0 -0
  126. package/dist/chunk-SOMUGI3Y.mjs.br +0 -0
  127. package/dist/chunk-SOMUGI3Y.mjs.gz +0 -0
  128. package/dist/chunk-SSXGPYBF.mjs.br +0 -0
  129. package/dist/chunk-SSXGPYBF.mjs.gz +0 -0
  130. package/dist/chunk-UTP22QYH.js.br +0 -0
  131. package/dist/chunk-UTP22QYH.js.gz +0 -0
  132. package/dist/chunk-YF2BQIW3.js.br +0 -0
  133. package/dist/chunk-YF2BQIW3.js.gz +0 -0
  134. package/dist/chunk-YPDPSXPK.mjs.br +0 -0
  135. package/dist/chunk-YPDPSXPK.mjs.gz +0 -0
@@ -1950,6 +1950,16 @@ interface TextStyle {
1950
1950
  textReflectionEndOpacity?: number;
1951
1951
  /** Text reflection offset distance in px. */
1952
1952
  textReflectionOffset?: number;
1953
+ /**
1954
+ * Text reflection end position (`@endPos`) as a 0-1 fraction of the text
1955
+ * height the fade reaches. Mirrors `ShapeStyle.reflectionEndPosition`.
1956
+ */
1957
+ textReflectionEndPosition?: number;
1958
+ /**
1959
+ * Text reflection offset direction (`@dir`) in degrees. Mirrors
1960
+ * `ShapeStyle.reflectionDirection`.
1961
+ */
1962
+ textReflectionDirection?: number;
1953
1963
  /**
1954
1964
  * Text reflection fade direction (`a:rPr/a:effectLst/a:reflection/@fadeDir`)
1955
1965
  * in degrees. Mirrors `ShapeStyle.reflectionFadeDirection`.
@@ -2268,6 +2278,21 @@ interface TextSegment {
2268
2278
  * populated; unrelated fields fall back to the shape-level style.
2269
2279
  */
2270
2280
  paragraphProperties?: TextStyle;
2281
+ /**
2282
+ * The paragraph this segment starts authored an EMPTY `<a:pPr/>`. Only
2283
+ * meaningful on the first segment of a paragraph. The writer re-emits the
2284
+ * empty element when it has no paragraph property of its own to write, so
2285
+ * a rewritten slide keeps the markup PowerPoint wrote.
2286
+ */
2287
+ emptyParagraphPropertiesAuthored?: boolean;
2288
+ /**
2289
+ * The paragraph this segment starts has no run content and authored no
2290
+ * `a:endParaRPr` (a bare `<a:p/>`, possibly with an `a:pPr`). Only
2291
+ * meaningful on the first segment of a paragraph. It stops the writer
2292
+ * inventing an empty run or an `<a:endParaRPr lang="en-US"/>` stub for a
2293
+ * paragraph that still has no content when saved.
2294
+ */
2295
+ bareParagraph?: boolean;
2271
2296
  /**
2272
2297
  * Phonetic annotation text from `a:ruby > a:rt` (e.g. furigana, pinyin).
2273
2298
  * When present, the renderer should wrap the base text with an HTML `<ruby>` tag.
@@ -5757,10 +5782,17 @@ interface PptxSmartArtColorTransform extends PptxSmartArtDefinitionMetadata {
5757
5782
  * palette (see `PptxSmartArtNode.styleRole` and `applySmartArtRoleColors`)
5758
5783
  * instead of a generic cycled colour.
5759
5784
  */
5760
- roleColors?: Record<string, {
5761
- fill: string[];
5762
- line: string[];
5763
- }>;
5785
+ roleColors?: Record<string, SmartArtRoleColorList>;
5786
+ }
5787
+ /** One colour-transform `styleLbl`'s resolved colour lists. */
5788
+ interface SmartArtRoleColorList {
5789
+ fill: string[];
5790
+ line: string[];
5791
+ /**
5792
+ * `txFillClrLst`, when the label declares one (`revTx` -> `tx1`). A text
5793
+ * node's colour comes from here; see `smartart-merged-text-label`.
5794
+ */
5795
+ textFill?: string[];
5764
5796
  }
5765
5797
  /** Typed CT_StyleDefinition metadata and legacy rendering hint. */
5766
5798
  interface PptxSmartArtQuickStyle extends PptxSmartArtDefinitionMetadata {
@@ -6010,6 +6042,13 @@ interface PptxSmartArtDrawingShape extends PptxCustomPathProperties {
6010
6042
  * shape body.
6011
6043
  */
6012
6044
  text3d?: Text3DStyle;
6045
+ /**
6046
+ * The presentation style label (`presStyleLbl`: `node1`, `revTx`,
6047
+ * `sibTrans2D1`, ...) of the layout node a REGENERATED shape was laid out
6048
+ * from, when the layout engine reports it. Picks the quick-style label
6049
+ * whose 3D the shape takes; `undefined` on cached (parsed) shapes.
6050
+ */
6051
+ styleLabel?: string;
6013
6052
  }
6014
6053
  /**
6015
6054
  * Presentation layout variables from `dgm:prSet/dgm:presLayoutVars` (data model)
@@ -7872,6 +7911,84 @@ interface PptxThemeOption {
7872
7911
  name?: string;
7873
7912
  }
7874
7913
  //#endregion
7914
+ //#region src/core/types/animation-behavior.d.ts
7915
+ /** Timing of one behaviour, from its own `p:cBhvr/p:cTn`. */
7916
+ interface PptxAnimationBehaviorTiming {
7917
+ /** `p:cTn/@dur` in ms; absent when `indefinite` or unset. */
7918
+ durationMs?: number;
7919
+ /** Start offset in ms from `p:stCondLst/p:cond/@delay`, relative to the effect start. */
7920
+ delayMs?: number;
7921
+ /** `p:cTn/@accel` as a 0..1 fraction of the behaviour's duration. */
7922
+ accel?: number;
7923
+ /** `p:cTn/@decel` as a 0..1 fraction of the behaviour's duration. */
7924
+ decel?: number;
7925
+ /** `p:cTn/@autoRev`: play forward, then backward, doubling the active time. */
7926
+ autoReverse?: boolean;
7927
+ /** `p:cTn/@repeatCount` in plain iterations (OOXML stores thousandths). */
7928
+ repeatCount?: number;
7929
+ /** `p:cTn/@tmFilter`: the raw `"t,v; t,v; ..."` time remapping list. */
7930
+ tmFilter?: string;
7931
+ }
7932
+ interface BehaviorBase {
7933
+ /** Lower-cased `p:attrNameLst` entries, in document order. */
7934
+ attrNames: string[];
7935
+ /** `p:cBhvr/@additive` (`base`, `sum`, `repl`, `mult`, `none`). */
7936
+ additive?: string;
7937
+ timing: PptxAnimationBehaviorTiming;
7938
+ }
7939
+ /** `p:set`: a discrete value held from the behaviour's start. */
7940
+ interface PptxSetBehavior extends BehaviorBase {
7941
+ kind: 'set';
7942
+ value: string | number | boolean;
7943
+ }
7944
+ /** `p:anim`: a `p:tavLst` ramp or a `from`/`to`/`by` formula ramp. */
7945
+ interface PptxAnimBehavior extends BehaviorBase {
7946
+ kind: 'anim';
7947
+ calcMode?: 'discrete' | 'lin' | 'fmla';
7948
+ valueType?: string;
7949
+ from?: string;
7950
+ to?: string;
7951
+ by?: string;
7952
+ keyframes: PptxAnimationKeyframe[];
7953
+ }
7954
+ /** `p:animEffect`: a filter transition (`fade`, `wipe(down)`...). */
7955
+ interface PptxAnimEffectBehavior extends BehaviorBase {
7956
+ kind: 'animEffect';
7957
+ filter?: string;
7958
+ transition?: 'in' | 'out' | 'none';
7959
+ }
7960
+ /** A `p:animScale` factor pair (1 = unscaled) or a `p:animMotion` offset (slide fractions). */
7961
+ interface PptxBehaviorPoint {
7962
+ x: number;
7963
+ y: number;
7964
+ }
7965
+ /** `p:animScale`: scale factors as fractions (OOXML stores percent*1000, so `100000` = 1). */
7966
+ interface PptxAnimScaleBehavior extends BehaviorBase {
7967
+ kind: 'animScale';
7968
+ from?: PptxBehaviorPoint;
7969
+ to?: PptxBehaviorPoint;
7970
+ by?: PptxBehaviorPoint;
7971
+ zoomContents?: boolean;
7972
+ }
7973
+ /** `p:animRot`: rotation in degrees (OOXML stores 60000ths). */
7974
+ interface PptxAnimRotBehavior extends BehaviorBase {
7975
+ kind: 'animRot';
7976
+ from?: number;
7977
+ to?: number;
7978
+ by?: number;
7979
+ }
7980
+ /** `p:animMotion`: a path (slide fractions) or a `from`/`to`/`by` offset. */
7981
+ interface PptxAnimMotionBehavior extends BehaviorBase {
7982
+ kind: 'animMotion';
7983
+ path?: string;
7984
+ origin?: string;
7985
+ from?: PptxBehaviorPoint;
7986
+ to?: PptxBehaviorPoint;
7987
+ by?: PptxBehaviorPoint;
7988
+ }
7989
+ /** One behaviour child of an effect, tagged by its OOXML element. */
7990
+ type PptxAnimationBehavior = PptxSetBehavior | PptxAnimBehavior | PptxAnimEffectBehavior | PptxAnimScaleBehavior | PptxAnimRotBehavior | PptxAnimMotionBehavior;
7991
+ //#endregion
7875
7992
  //#region src/core/types/animation.d.ts
7876
7993
  /**
7877
7994
  * Built-in animation preset names used for entrance, exit, and emphasis effects.
@@ -8423,6 +8540,14 @@ interface PptxNativeAnimation {
8423
8540
  * shared playback (round-trip/typed-model only so far).
8424
8541
  */
8425
8542
  setAnimations?: PptxSetAnimation[];
8543
+ /**
8544
+ * Every behaviour child of this effect (`p:set`, `p:anim`, `p:animEffect`,
8545
+ * `p:animScale`, `p:animRot`, `p:animMotion`) with its own timing, as
8546
+ * authored. The single-valued fields above flatten a composed preset;
8547
+ * this keeps the whole tree so playback can follow what PowerPoint wrote
8548
+ * (see `animation-behavior-player` in `pptx-viewer-shared`).
8549
+ */
8550
+ behaviors?: PptxAnimationBehavior[];
8426
8551
  }
8427
8552
  /**
8428
8553
  * One `p:set` discrete (non-interpolated) attribute assignment composed
@@ -13564,6 +13689,8 @@ interface PresentationInkStroke {
13564
13689
  width: number;
13565
13690
  points: PresentationInkPoint[];
13566
13691
  }
13692
+ //#endregion
13693
+ //#region src/render/editor-keymap.d.ts
13567
13694
  /** A logical editor command produced by one key press. */
13568
13695
  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';
13569
13696
  //#endregion
@@ -13839,6 +13966,13 @@ type ToolbarButtonId = 'share' | 'broadcast' | 'export' | 'undo' | 'redo' | 'rec
13839
13966
  /** 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. */
13840
13967
  type ToolbarTabId = 'file' | 'home' | 'insert' | 'draw' | 'design' | 'transitions' | 'animations' | 'slideShow' | 'record' | 'review' | 'view' | 'help';
13841
13968
  type ToolbarActionId = ToolbarButtonId | ToolbarTabId;
13969
+ /**
13970
+ * PowerPoint's contextual tabs: they join the tab row only while the
13971
+ * selection is of their kind (see `contextualTabsForElement` in
13972
+ * `ribbon-galleries/`). Kept apart from `ToolbarTabId` because they are not
13973
+ * part of the fixed tab order every binding renders.
13974
+ */
13975
+ type RibbonContextualTabId = 'shapeFormat' | 'pictureFormat' | 'tableDesign' | 'chartDesign' | 'smartArtDesign';
13842
13976
  //#endregion
13843
13977
  //#region src/render/options/viewer-options.d.ts
13844
13978
  /**
@@ -14055,6 +14189,511 @@ type FreeformToolKind = 'freeformShape' | 'curve';
14055
14189
  */
14056
14190
  type ViewerOptionsTabId = 'general' | 'proofing' | 'save' | 'language' | 'accessibility' | 'advanced' | 'ribbon' | 'quickAccess' | 'addIns' | 'trust';
14057
14191
  //#endregion
14192
+ //#region src/render/customization/ribbon-control-catalog.d.ts
14193
+ declare const RIBBON_CONTROL_CATALOG: {
14194
+ readonly home: {
14195
+ readonly clipboard: {
14196
+ readonly label: 'Clipboard';
14197
+ readonly controls: {
14198
+ readonly paste: 'Paste';
14199
+ readonly cut: 'Cut';
14200
+ readonly copy: 'Copy';
14201
+ readonly formatPainter: 'Format Painter';
14202
+ };
14203
+ };
14204
+ readonly slides: {
14205
+ readonly label: 'Slides';
14206
+ readonly controls: {
14207
+ readonly newSlide: 'New Slide';
14208
+ readonly layout: 'Layout';
14209
+ readonly reset: 'Reset';
14210
+ readonly section: 'Section';
14211
+ readonly slideTemplates: 'Slide templates';
14212
+ };
14213
+ };
14214
+ readonly font: {
14215
+ readonly label: 'Font';
14216
+ readonly controls: {
14217
+ readonly fontFamily: 'Font';
14218
+ readonly fontSize: 'Font Size';
14219
+ readonly increaseFontSize: 'Increase Font Size';
14220
+ readonly decreaseFontSize: 'Decrease Font Size';
14221
+ readonly clearFormatting: 'Clear All Formatting';
14222
+ readonly bold: 'Bold';
14223
+ readonly italic: 'Italic';
14224
+ readonly underline: 'Underline';
14225
+ readonly strikethrough: 'Strikethrough';
14226
+ readonly shadow: 'Text Shadow';
14227
+ readonly characterSpacing: 'Character Spacing';
14228
+ readonly changeCase: 'Change Case';
14229
+ readonly fontColor: 'Font Color';
14230
+ readonly highlightColor: 'Text Highlight Color';
14231
+ readonly superscript: 'Superscript';
14232
+ readonly subscript: 'Subscript';
14233
+ };
14234
+ };
14235
+ readonly paragraph: {
14236
+ readonly label: 'Paragraph';
14237
+ readonly controls: {
14238
+ readonly bullets: 'Bullets (toggle and gallery)';
14239
+ readonly numbering: 'Numbering (toggle and gallery)';
14240
+ readonly decreaseIndent: 'Decrease List Level';
14241
+ readonly increaseIndent: 'Increase List Level';
14242
+ readonly lineSpacing: 'Line Spacing';
14243
+ readonly alignLeft: 'Align Left';
14244
+ readonly alignCenter: 'Center';
14245
+ readonly alignRight: 'Align Right';
14246
+ readonly justify: 'Justify';
14247
+ readonly columns: 'Columns';
14248
+ readonly textDirection: 'Text Direction';
14249
+ readonly alignText: 'Align Text';
14250
+ };
14251
+ };
14252
+ readonly drawing: {
14253
+ readonly label: 'Drawing';
14254
+ readonly controls: {
14255
+ readonly shapes: 'Shapes';
14256
+ readonly arrange: 'Arrange';
14257
+ readonly quickStyles: 'Quick Styles (Shape Styles gallery)';
14258
+ readonly shapeFill: 'Shape Fill';
14259
+ readonly shapeOutline: 'Shape Outline';
14260
+ readonly shapeEffects: 'Shape Effects gallery';
14261
+ };
14262
+ };
14263
+ readonly arrange: {
14264
+ readonly label: 'Arrange';
14265
+ readonly controls: {
14266
+ readonly bringForward: 'Bring Forward';
14267
+ readonly sendBackward: 'Send Backward';
14268
+ readonly bringToFront: 'Bring to Front';
14269
+ readonly sendToBack: 'Send to Back';
14270
+ readonly flipHorizontal: 'Flip Horizontal';
14271
+ readonly flipVertical: 'Flip Vertical';
14272
+ readonly duplicate: 'Duplicate';
14273
+ readonly delete: 'Delete';
14274
+ readonly group: 'Group';
14275
+ readonly ungroup: 'Ungroup';
14276
+ readonly align: 'Align';
14277
+ readonly mergeShapes: 'Merge Shapes';
14278
+ readonly crop: 'Crop';
14279
+ readonly outlineWidth: 'Outline width';
14280
+ };
14281
+ };
14282
+ readonly editing: {
14283
+ readonly label: 'Editing';
14284
+ readonly controls: {
14285
+ readonly find: 'Find';
14286
+ readonly replace: 'Replace';
14287
+ readonly select: 'Select';
14288
+ };
14289
+ };
14290
+ };
14291
+ readonly insert: {
14292
+ readonly slides: {
14293
+ readonly label: 'Slides';
14294
+ readonly controls: {
14295
+ readonly newSlide: 'New Slide';
14296
+ };
14297
+ };
14298
+ readonly tables: {
14299
+ readonly label: 'Tables';
14300
+ readonly controls: {
14301
+ readonly table: 'Table';
14302
+ };
14303
+ };
14304
+ readonly images: {
14305
+ readonly label: 'Images';
14306
+ readonly controls: {
14307
+ readonly pictures: 'Pictures';
14308
+ };
14309
+ };
14310
+ readonly illustrations: {
14311
+ readonly label: 'Illustrations';
14312
+ readonly controls: {
14313
+ readonly shapes: 'Shapes';
14314
+ readonly smartArt: 'SmartArt';
14315
+ readonly chart: 'Chart';
14316
+ };
14317
+ };
14318
+ readonly links: {
14319
+ readonly label: 'Links';
14320
+ readonly controls: {
14321
+ readonly link: 'Link';
14322
+ readonly action: 'Action button';
14323
+ };
14324
+ };
14325
+ readonly comments: {
14326
+ readonly label: 'Comments';
14327
+ readonly controls: {
14328
+ readonly comment: 'Comment';
14329
+ };
14330
+ };
14331
+ readonly text: {
14332
+ readonly label: 'Text';
14333
+ readonly controls: {
14334
+ readonly textBox: 'Text Box';
14335
+ readonly field: 'Header, date, slide number field';
14336
+ };
14337
+ };
14338
+ readonly symbols: {
14339
+ readonly label: 'Symbols';
14340
+ readonly controls: {
14341
+ readonly equation: 'Equation';
14342
+ readonly symbol: 'Symbol';
14343
+ };
14344
+ };
14345
+ readonly media: {
14346
+ readonly label: 'Media';
14347
+ readonly controls: {
14348
+ readonly media: 'Video / Audio';
14349
+ };
14350
+ };
14351
+ };
14352
+ readonly draw: {
14353
+ readonly tools: {
14354
+ readonly label: 'Drawing Tools';
14355
+ readonly controls: {
14356
+ readonly select: 'Select';
14357
+ readonly pen: 'Pen';
14358
+ readonly highlighter: 'Highlighter';
14359
+ readonly eraser: 'Eraser';
14360
+ readonly penColor: 'Pen colour';
14361
+ readonly penWidth: 'Pen width';
14362
+ };
14363
+ };
14364
+ readonly convert: {
14365
+ readonly label: 'Convert';
14366
+ readonly controls: {
14367
+ readonly inkToShape: 'Ink to Shape';
14368
+ };
14369
+ };
14370
+ };
14371
+ readonly design: {
14372
+ readonly themes: {
14373
+ readonly label: 'Themes';
14374
+ readonly controls: {
14375
+ readonly browseThemes: 'Themes gallery';
14376
+ readonly editTheme: 'Edit theme';
14377
+ };
14378
+ };
14379
+ readonly variants: {
14380
+ readonly label: 'Variants';
14381
+ readonly controls: {
14382
+ readonly colors: 'Variants: Colors gallery';
14383
+ readonly fonts: 'Variants: Fonts gallery';
14384
+ };
14385
+ };
14386
+ readonly customize: {
14387
+ readonly label: 'Customize';
14388
+ readonly controls: {
14389
+ readonly slideSize: 'Slide Size';
14390
+ readonly formatBackground: 'Format Background';
14391
+ };
14392
+ };
14393
+ };
14394
+ readonly transitions: {
14395
+ readonly preview: {
14396
+ readonly label: 'Preview';
14397
+ readonly controls: {
14398
+ readonly preview: 'Preview';
14399
+ };
14400
+ };
14401
+ readonly transitionToThisSlide: {
14402
+ readonly label: 'Transition to This Slide';
14403
+ readonly controls: {
14404
+ readonly gallery: 'Transition gallery';
14405
+ readonly effectOptions: 'Effect Options';
14406
+ };
14407
+ };
14408
+ readonly timing: {
14409
+ readonly label: 'Timing';
14410
+ readonly controls: {
14411
+ readonly sound: 'Sound';
14412
+ readonly duration: 'Duration';
14413
+ readonly applyToAll: 'Apply To All';
14414
+ readonly advanceOnClick: 'On Mouse Click';
14415
+ readonly advanceAfter: 'After';
14416
+ };
14417
+ };
14418
+ };
14419
+ readonly animations: {
14420
+ readonly preview: {
14421
+ readonly label: 'Preview';
14422
+ readonly controls: {
14423
+ readonly preview: 'Preview';
14424
+ };
14425
+ };
14426
+ readonly animation: {
14427
+ readonly label: 'Animation';
14428
+ readonly controls: {
14429
+ readonly gallery: 'Animation gallery';
14430
+ readonly effectOptions: 'Effect Options';
14431
+ };
14432
+ };
14433
+ readonly motionPath: {
14434
+ readonly label: 'Motion Paths';
14435
+ readonly controls: {
14436
+ readonly gallery: 'Motion path gallery';
14437
+ };
14438
+ };
14439
+ readonly advancedAnimation: {
14440
+ readonly label: 'Advanced Animation';
14441
+ readonly controls: {
14442
+ readonly addAnimation: 'Add Animation';
14443
+ readonly animationPane: 'Animation Pane';
14444
+ readonly trigger: 'Trigger';
14445
+ readonly animationPainter: 'Animation Painter';
14446
+ readonly remove: 'Remove animation';
14447
+ };
14448
+ };
14449
+ readonly timing: {
14450
+ readonly label: 'Timing';
14451
+ readonly controls: {
14452
+ readonly start: 'Start';
14453
+ readonly duration: 'Duration';
14454
+ readonly delay: 'Delay';
14455
+ readonly reorder: 'Reorder';
14456
+ };
14457
+ };
14458
+ };
14459
+ readonly slideShow: {
14460
+ readonly startSlideShow: {
14461
+ readonly label: 'Start Slide Show';
14462
+ readonly controls: {
14463
+ readonly fromBeginning: 'From Beginning';
14464
+ readonly fromCurrent: 'From Current Slide';
14465
+ readonly customShow: 'Custom Slide Show';
14466
+ };
14467
+ };
14468
+ readonly present: {
14469
+ readonly label: 'Present';
14470
+ readonly controls: {
14471
+ readonly presenterView: 'Presenter View';
14472
+ readonly broadcast: 'Present Online';
14473
+ };
14474
+ };
14475
+ readonly setUp: {
14476
+ readonly label: 'Set Up';
14477
+ readonly controls: {
14478
+ readonly setUpSlideShow: 'Set Up Slide Show';
14479
+ readonly hideSlide: 'Hide Slide';
14480
+ readonly rehearseTimings: 'Rehearse Timings';
14481
+ readonly record: 'Record';
14482
+ readonly rehearseWithCoach: 'Rehearse with Coach';
14483
+ };
14484
+ };
14485
+ readonly captions: {
14486
+ readonly label: 'Captions & Subtitles';
14487
+ readonly controls: {
14488
+ readonly subtitles: 'Always Use Subtitles';
14489
+ readonly subtitleSettings: 'Subtitle Settings';
14490
+ };
14491
+ };
14492
+ };
14493
+ readonly record: {
14494
+ readonly camera: {
14495
+ readonly label: 'Camera';
14496
+ readonly controls: {
14497
+ readonly cameo: 'Cameo';
14498
+ };
14499
+ };
14500
+ readonly record: {
14501
+ readonly label: 'Record';
14502
+ readonly controls: {
14503
+ readonly fromBeginning: 'From Beginning';
14504
+ readonly fromCurrent: 'From Current Slide';
14505
+ };
14506
+ };
14507
+ readonly manage: {
14508
+ readonly label: 'Manage';
14509
+ readonly controls: {
14510
+ readonly clear: 'Clear';
14511
+ readonly reset: 'Reset to Cameo';
14512
+ };
14513
+ };
14514
+ readonly help: {
14515
+ readonly label: 'Help';
14516
+ readonly controls: {
14517
+ readonly learnMore: 'Learn more';
14518
+ };
14519
+ };
14520
+ };
14521
+ readonly review: {
14522
+ readonly proofing: {
14523
+ readonly label: 'Proofing';
14524
+ readonly controls: {
14525
+ readonly spelling: 'Spelling';
14526
+ readonly thesaurus: 'Thesaurus';
14527
+ };
14528
+ };
14529
+ readonly accessibility: {
14530
+ readonly label: 'Accessibility';
14531
+ readonly controls: {
14532
+ readonly check: 'Check Accessibility';
14533
+ };
14534
+ };
14535
+ readonly language: {
14536
+ readonly label: 'Language';
14537
+ readonly controls: {
14538
+ readonly translate: 'Translate';
14539
+ };
14540
+ };
14541
+ readonly comments: {
14542
+ readonly label: 'Comments';
14543
+ readonly controls: {
14544
+ readonly newComment: 'New Comment';
14545
+ readonly delete: 'Delete';
14546
+ readonly previous: 'Previous';
14547
+ readonly next: 'Next';
14548
+ readonly showComments: 'Show Comments';
14549
+ };
14550
+ };
14551
+ readonly compare: {
14552
+ readonly label: 'Compare';
14553
+ readonly controls: {
14554
+ readonly compare: 'Compare';
14555
+ readonly markAllRead: 'Mark all read';
14556
+ };
14557
+ };
14558
+ readonly protect: {
14559
+ readonly label: 'Protect';
14560
+ readonly controls: {
14561
+ readonly readOnly: 'Read-only';
14562
+ readonly restrictPermission: 'Restrict Permission';
14563
+ };
14564
+ };
14565
+ readonly ink: {
14566
+ readonly label: 'Ink';
14567
+ readonly controls: {
14568
+ readonly hideInk: 'Hide Ink';
14569
+ };
14570
+ };
14571
+ };
14572
+ readonly view: {
14573
+ readonly presentationViews: {
14574
+ readonly label: 'Presentation Views';
14575
+ readonly controls: {
14576
+ readonly normal: 'Normal';
14577
+ readonly outline: 'Outline View';
14578
+ readonly slideSorter: 'Slide Sorter';
14579
+ readonly notesPage: 'Notes Page';
14580
+ readonly readingView: 'Reading View';
14581
+ };
14582
+ };
14583
+ readonly masterViews: {
14584
+ readonly label: 'Master Views';
14585
+ readonly controls: {
14586
+ readonly slideMaster: 'Slide Master';
14587
+ readonly handoutMaster: 'Handout Master';
14588
+ readonly notesMaster: 'Notes Master';
14589
+ };
14590
+ };
14591
+ readonly show: {
14592
+ readonly label: 'Show';
14593
+ readonly controls: {
14594
+ readonly ruler: 'Ruler';
14595
+ readonly gridlines: 'Gridlines';
14596
+ readonly guides: 'Guides';
14597
+ readonly snapToGrid: 'Snap to Grid';
14598
+ readonly snapToShape: 'Snap to Shape';
14599
+ readonly addGuide: 'Add horizontal / vertical guide';
14600
+ readonly selectionPane: 'Selection Pane';
14601
+ readonly eyedropper: 'Eyedropper';
14602
+ readonly notes: 'Notes';
14603
+ };
14604
+ };
14605
+ readonly zoom: {
14606
+ readonly label: 'Zoom';
14607
+ readonly controls: {
14608
+ readonly zoom: 'Zoom';
14609
+ readonly fitToWindow: 'Fit to Window';
14610
+ };
14611
+ };
14612
+ readonly window: {
14613
+ readonly label: 'Window';
14614
+ readonly controls: {
14615
+ readonly templateEditing: 'Edit template elements';
14616
+ readonly macros: 'Macros';
14617
+ };
14618
+ };
14619
+ };
14620
+ readonly help: {
14621
+ readonly help: {
14622
+ readonly label: 'Help';
14623
+ readonly controls: {
14624
+ readonly options: 'Options';
14625
+ readonly keyboardShortcuts: 'Keyboard shortcuts';
14626
+ readonly accessibility: 'Accessibility checker';
14627
+ };
14628
+ };
14629
+ };
14630
+ readonly shapeFormat: {
14631
+ readonly shapeStyles: {
14632
+ readonly label: 'Shape Styles';
14633
+ readonly controls: {
14634
+ readonly gallery: 'Shape Styles gallery';
14635
+ readonly shapeEffects: 'Shape Effects gallery';
14636
+ };
14637
+ };
14638
+ readonly wordArtStyles: {
14639
+ readonly label: 'WordArt Styles';
14640
+ readonly controls: {
14641
+ readonly gallery: 'WordArt Styles gallery';
14642
+ };
14643
+ };
14644
+ };
14645
+ readonly pictureFormat: {
14646
+ readonly pictureStyles: {
14647
+ readonly label: 'Picture Styles';
14648
+ readonly controls: {
14649
+ readonly gallery: 'Picture Styles gallery';
14650
+ readonly pictureEffects: 'Picture Effects gallery';
14651
+ };
14652
+ };
14653
+ };
14654
+ readonly tableDesign: {
14655
+ readonly tableStyles: {
14656
+ readonly label: 'Table Styles';
14657
+ readonly controls: {
14658
+ readonly gallery: 'Table Styles gallery';
14659
+ };
14660
+ };
14661
+ };
14662
+ readonly chartDesign: {
14663
+ readonly chartLayouts: {
14664
+ readonly label: 'Chart Layouts';
14665
+ readonly controls: {
14666
+ readonly quickLayout: 'Quick Layout gallery';
14667
+ };
14668
+ };
14669
+ readonly chartStyles: {
14670
+ readonly label: 'Chart Styles';
14671
+ readonly controls: {
14672
+ readonly changeColors: 'Change Colors gallery';
14673
+ readonly gallery: 'Chart Styles gallery';
14674
+ };
14675
+ };
14676
+ };
14677
+ readonly smartArtDesign: {
14678
+ readonly smartArtStyles: {
14679
+ readonly label: 'SmartArt Styles';
14680
+ readonly controls: {
14681
+ readonly changeColors: 'Change Colors gallery';
14682
+ readonly gallery: 'SmartArt Styles gallery';
14683
+ };
14684
+ };
14685
+ };
14686
+ };
14687
+ //#endregion
14688
+ //#region src/render/customization/ribbon-control-ids.d.ts
14689
+ type Catalog = typeof RIBBON_CONTROL_CATALOG;
14690
+ /** `<tab>.<group>`, for example `home.font`. */
14691
+ type RibbonGroupId = { [T in keyof Catalog]: { [G in keyof Catalog[T]]: `${T & string}.${G & string}`; }[keyof Catalog[T]]; }[keyof Catalog];
14692
+ /** `<tab>.<group>.<control>`, for example `home.font.bold`. */
14693
+ type RibbonControlId = { [T in keyof Catalog]: { [G in keyof Catalog[T]]: Catalog[T][G] extends {
14694
+ controls: infer C;
14695
+ } ? `${T & string}.${G & string}.${keyof C & string}` : never; }[keyof Catalog[T]]; }[keyof Catalog];
14696
+ //#endregion
14058
14697
  //#region src/render/customization/customization-types.d.ts
14059
14698
  /** Keys of an options group whose value is a primitive (not an array). */
14060
14699
  type PrimitiveKeys<T> = { [K in keyof T]: T[K] extends ViewerOptionPrimitive ? K : never; }[keyof T] & string;
@@ -14079,10 +14718,20 @@ type OptionsSectionId = `${ViewerOptionsTabId}.${string}`;
14079
14718
  type OptionsSettingValues = Partial<Record<OptionsSettingId, ViewerOptionPrimitive>>;
14080
14719
  /** Ribbon and toolbar customisation. */
14081
14720
  interface RibbonCustomization {
14082
- /** Ribbon tabs to remove (the File tab included, unlike Customize Ribbon). */
14083
- hiddenTabs?: readonly ToolbarTabId[];
14084
- /** Top-level toolbar buttons / control clusters to remove. */
14085
- hiddenButtons?: readonly ToolbarButtonId[];
14721
+ /**
14722
+ * Ribbon tabs to remove (the File tab included, unlike Customize Ribbon),
14723
+ * and contextual tabs (`shapeFormat`, `pictureFormat`, ...) that should
14724
+ * never appear.
14725
+ */
14726
+ hiddenTabs?: readonly (ToolbarTabId | RibbonContextualTabId)[];
14727
+ /** Groups inside a tab to remove, as `<tab>.<group>` (`home.font`). */
14728
+ hiddenGroups?: readonly RibbonGroupId[];
14729
+ /**
14730
+ * Controls to remove: a top-level toolbar button / control cluster
14731
+ * (`share`, `zoom`, ...) or any ribbon control as
14732
+ * `<tab>.<group>.<control>` (`home.font.bold`).
14733
+ */
14734
+ hiddenButtons?: readonly (ToolbarButtonId | RibbonControlId)[];
14086
14735
  }
14087
14736
  /** File > Options (the Settings dialog) customisation. */
14088
14737
  interface OptionsCustomization {
@@ -14265,6 +14914,12 @@ interface ResolvedKeyboardCustomization {
14265
14914
  /** The normalised, set-based view of a customisation. Treat as immutable. */
14266
14915
  interface ResolvedCustomization {
14267
14916
  hiddenActions: ReadonlySet<ToolbarActionId>;
14917
+ /** Contextual tabs (`shapeFormat`, ...) the host never wants shown. */
14918
+ hiddenContextualTabs: ReadonlySet<RibbonContextualTabId>;
14919
+ /** Catalogued ribbon groups to hide (`ribbon.hiddenGroups`). */
14920
+ hiddenRibbonGroups: ReadonlySet<RibbonGroupId>;
14921
+ /** Catalogued ribbon controls to hide (the `<tab>.<group>.<control>` part of `ribbon.hiddenButtons`). */
14922
+ hiddenRibbonControls: ReadonlySet<RibbonControlId>;
14268
14923
  hiddenOptionsPages: ReadonlySet<OptionsPageId>;
14269
14924
  hiddenOptionsSections: ReadonlySet<OptionsSectionId>;
14270
14925
  hiddenSettings: ReadonlySet<OptionsSettingId>;
@@ -14295,10 +14950,18 @@ interface ViewerCustomizationApi {
14295
14950
  updateCustomization(patch: ViewerCustomization): void;
14296
14951
  /** Drop every customisation, back to the stock UI. */
14297
14952
  resetCustomization(): void;
14298
- hideRibbonTab(tab: ToolbarTabId): void;
14299
- showRibbonTab(tab: ToolbarTabId): void;
14300
- hideToolbarButton(button: ToolbarButtonId): void;
14301
- showToolbarButton(button: ToolbarButtonId): void;
14953
+ /** Hide a fixed tab, or stop a contextual tab (`shapeFormat`, ...) from appearing. */
14954
+ hideRibbonTab(tab: ToolbarTabId | RibbonContextualTabId): void;
14955
+ showRibbonTab(tab: ToolbarTabId | RibbonContextualTabId): void;
14956
+ /** Hide a group inside a tab (`home.font`). */
14957
+ hideRibbonGroup(group: RibbonGroupId): void;
14958
+ showRibbonGroup(group: RibbonGroupId): void;
14959
+ /** Hide a top-level toolbar button or any ribbon control (`home.font.bold`). */
14960
+ hideToolbarButton(button: ToolbarButtonId | RibbonControlId): void;
14961
+ showToolbarButton(button: ToolbarButtonId | RibbonControlId): void;
14962
+ /** Alias of `hideToolbarButton` for a ribbon control id. */
14963
+ hideRibbonControl(control: RibbonControlId): void;
14964
+ showRibbonControl(control: RibbonControlId): void;
14302
14965
  hideOptionsPage(page: OptionsPageId): void;
14303
14966
  showOptionsPage(page: OptionsPageId): void;
14304
14967
  hideOptionsSection(section: OptionsSectionId): void;
@@ -18221,8 +18884,8 @@ interface VirtualizedSlidesOptions {
18221
18884
  overscan?: number;
18222
18885
  }
18223
18886
  interface VirtualizedSlidesResult extends VirtualizedRange {
18224
- /** Ref to attach to the scroll container element. */
18225
- scrollContainerRef: React.RefObject<HTMLDivElement | null>;
18887
+ /** Callback ref for the scroll container; re-wires scroll tracking whenever it mounts. */
18888
+ scrollContainerRef: (el: HTMLDivElement | null) => void;
18226
18889
  /** Call this to scroll a specific index into view. */
18227
18890
  scrollToIndex: (index: number, behavior?: ScrollBehavior) => void;
18228
18891
  }