pptx-react-viewer 4.4.0 → 4.6.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 (136) hide show
  1. package/CHANGELOG.md +81 -0
  2. package/README.md +34 -33
  3. package/dist/{AiChatPanel-UFMSTNCB.js → AiChatPanel-3C7GM6ZF.js} +28 -28
  4. package/dist/AiChatPanel-3C7GM6ZF.js.br +0 -0
  5. package/dist/AiChatPanel-3C7GM6ZF.js.gz +0 -0
  6. package/dist/{AiChatPanel-QJHUDIWT.mjs → AiChatPanel-L7DBCWE3.mjs} +4 -4
  7. package/dist/AiChatPanel-L7DBCWE3.mjs.br +0 -0
  8. package/dist/AiChatPanel-L7DBCWE3.mjs.gz +0 -0
  9. package/dist/{Model3DScene-3GOC5HUS.mjs → Model3DScene-IJ7YYTYU.mjs} +1 -1
  10. package/dist/Model3DScene-IJ7YYTYU.mjs.br +0 -0
  11. package/dist/Model3DScene-IJ7YYTYU.mjs.gz +0 -0
  12. package/dist/{Model3DScene-KXNJBAQD.js → Model3DScene-USKNPWWH.js} +2 -2
  13. package/dist/{Model3DScene-KXNJBAQD.js.br → Model3DScene-USKNPWWH.js.br} +0 -0
  14. package/dist/Model3DScene-USKNPWWH.js.gz +0 -0
  15. package/dist/{chunk-I4D6JQOI.js → chunk-3JUZOKFI.js} +13 -0
  16. package/dist/chunk-3JUZOKFI.js.br +0 -0
  17. package/dist/chunk-3JUZOKFI.js.gz +0 -0
  18. package/dist/{chunk-CSY422LU.js → chunk-5V5SMT5A.js} +5 -5
  19. package/dist/chunk-5V5SMT5A.js.br +0 -0
  20. package/dist/chunk-5V5SMT5A.js.gz +0 -0
  21. package/dist/{chunk-AI6K5EAE.js → chunk-DFSWCVRW.js} +1677 -1207
  22. package/dist/chunk-DFSWCVRW.js.br +0 -0
  23. package/dist/chunk-DFSWCVRW.js.gz +0 -0
  24. package/dist/{chunk-7WWINBGF.js → chunk-FZSYLXJT.js} +3293 -1568
  25. package/dist/chunk-FZSYLXJT.js.br +0 -0
  26. package/dist/chunk-FZSYLXJT.js.gz +0 -0
  27. package/dist/{chunk-YJKR7Z3X.js → chunk-IBHIXBC5.js} +885 -845
  28. package/dist/chunk-IBHIXBC5.js.br +0 -0
  29. package/dist/chunk-IBHIXBC5.js.gz +0 -0
  30. package/dist/{chunk-D3TZOCQP.mjs → chunk-ICEZL4TM.mjs} +3260 -1568
  31. package/dist/chunk-ICEZL4TM.mjs.br +0 -0
  32. package/dist/chunk-ICEZL4TM.mjs.gz +0 -0
  33. package/dist/{chunk-WCHKDZP6.mjs → chunk-INX3E37P.mjs} +73 -33
  34. package/dist/chunk-INX3E37P.mjs.br +0 -0
  35. package/dist/chunk-INX3E37P.mjs.gz +0 -0
  36. package/dist/{chunk-WNFHFFYE.mjs → chunk-K6QHGABT.mjs} +17 -7
  37. package/dist/chunk-K6QHGABT.mjs.br +0 -0
  38. package/dist/chunk-K6QHGABT.mjs.gz +0 -0
  39. package/dist/{chunk-JQXN6PO7.mjs → chunk-OOO4JL2N.mjs} +13 -0
  40. package/dist/chunk-OOO4JL2N.mjs.br +0 -0
  41. package/dist/chunk-OOO4JL2N.mjs.gz +0 -0
  42. package/dist/{chunk-XMKLY2SE.mjs → chunk-VCAQSSGD.mjs} +1 -1
  43. package/dist/chunk-VCAQSSGD.mjs.br +0 -0
  44. package/dist/chunk-VCAQSSGD.mjs.gz +0 -0
  45. package/dist/{chunk-OWTHF5N4.js → chunk-Y4QUVWZC.js} +201 -191
  46. package/dist/chunk-Y4QUVWZC.js.br +0 -0
  47. package/dist/chunk-Y4QUVWZC.js.gz +0 -0
  48. package/dist/{chunk-LUHUYBGW.mjs → chunk-ZAQFTO4P.mjs} +623 -153
  49. package/dist/chunk-ZAQFTO4P.mjs.br +0 -0
  50. package/dist/chunk-ZAQFTO4P.mjs.gz +0 -0
  51. package/dist/i18n/de.cjs +11 -0
  52. package/dist/i18n/de.cjs.br +0 -0
  53. package/dist/i18n/de.cjs.gz +0 -0
  54. package/dist/i18n/de.mjs +11 -0
  55. package/dist/i18n/de.mjs.br +0 -0
  56. package/dist/i18n/de.mjs.gz +0 -0
  57. package/dist/i18n/es.cjs +11 -0
  58. package/dist/i18n/es.cjs.br +0 -0
  59. package/dist/i18n/es.cjs.gz +0 -0
  60. package/dist/i18n/es.mjs +11 -0
  61. package/dist/i18n/es.mjs.br +0 -0
  62. package/dist/i18n/es.mjs.gz +0 -0
  63. package/dist/i18n/fr.cjs +11 -0
  64. package/dist/i18n/fr.cjs.br +0 -0
  65. package/dist/i18n/fr.cjs.gz +0 -0
  66. package/dist/i18n/fr.mjs +11 -0
  67. package/dist/i18n/fr.mjs.br +0 -0
  68. package/dist/i18n/fr.mjs.gz +0 -0
  69. package/dist/i18n/zh-CN.cjs +11 -0
  70. package/dist/i18n/zh-CN.cjs.br +0 -0
  71. package/dist/i18n/zh-CN.cjs.gz +0 -0
  72. package/dist/i18n/zh-CN.mjs +11 -0
  73. package/dist/i18n/zh-CN.mjs.br +0 -0
  74. package/dist/i18n/zh-CN.mjs.gz +0 -0
  75. package/dist/i18n.js +4 -4
  76. package/dist/i18n.js.br +0 -0
  77. package/dist/i18n.js.gz +0 -0
  78. package/dist/i18n.mjs +1 -1
  79. package/dist/i18n.mjs.br +0 -0
  80. package/dist/i18n.mjs.gz +0 -0
  81. package/dist/index.d.ts +311 -4
  82. package/dist/index.js +105 -49
  83. package/dist/index.js.br +0 -0
  84. package/dist/index.js.gz +0 -0
  85. package/dist/index.mjs +6 -6
  86. package/dist/index.mjs.br +0 -0
  87. package/dist/index.mjs.gz +0 -0
  88. package/dist/internals.d.ts +328 -3
  89. package/dist/internals.js +105 -105
  90. package/dist/internals.js.br +0 -0
  91. package/dist/internals.js.gz +0 -0
  92. package/dist/internals.mjs +4 -4
  93. package/dist/internals.mjs.br +0 -0
  94. package/dist/internals.mjs.gz +0 -0
  95. package/dist/pptx-viewer.css +1 -1
  96. package/dist/pptx-viewer.css.br +0 -0
  97. package/dist/pptx-viewer.css.gz +0 -0
  98. package/dist/viewer/index.d.ts +416 -2
  99. package/dist/viewer/index.js +27 -27
  100. package/dist/viewer/index.js.br +0 -0
  101. package/dist/viewer/index.js.gz +0 -0
  102. package/dist/viewer/index.mjs +6 -6
  103. package/dist/viewer/index.mjs.br +0 -0
  104. package/dist/viewer/index.mjs.gz +0 -0
  105. package/package.json +1 -1
  106. package/dist/AiChatPanel-QJHUDIWT.mjs.br +0 -0
  107. package/dist/AiChatPanel-QJHUDIWT.mjs.gz +0 -0
  108. package/dist/AiChatPanel-UFMSTNCB.js.br +0 -0
  109. package/dist/AiChatPanel-UFMSTNCB.js.gz +0 -0
  110. package/dist/Model3DScene-3GOC5HUS.mjs.br +0 -0
  111. package/dist/Model3DScene-3GOC5HUS.mjs.gz +0 -0
  112. package/dist/Model3DScene-KXNJBAQD.js.gz +0 -0
  113. package/dist/chunk-7WWINBGF.js.br +0 -0
  114. package/dist/chunk-7WWINBGF.js.gz +0 -0
  115. package/dist/chunk-AI6K5EAE.js.br +0 -0
  116. package/dist/chunk-AI6K5EAE.js.gz +0 -0
  117. package/dist/chunk-CSY422LU.js.br +0 -0
  118. package/dist/chunk-CSY422LU.js.gz +0 -0
  119. package/dist/chunk-D3TZOCQP.mjs.br +0 -0
  120. package/dist/chunk-D3TZOCQP.mjs.gz +0 -0
  121. package/dist/chunk-I4D6JQOI.js.br +0 -0
  122. package/dist/chunk-I4D6JQOI.js.gz +0 -0
  123. package/dist/chunk-JQXN6PO7.mjs.br +0 -0
  124. package/dist/chunk-JQXN6PO7.mjs.gz +0 -0
  125. package/dist/chunk-LUHUYBGW.mjs.br +0 -0
  126. package/dist/chunk-LUHUYBGW.mjs.gz +0 -0
  127. package/dist/chunk-OWTHF5N4.js.br +0 -0
  128. package/dist/chunk-OWTHF5N4.js.gz +0 -0
  129. package/dist/chunk-WCHKDZP6.mjs.br +0 -0
  130. package/dist/chunk-WCHKDZP6.mjs.gz +0 -0
  131. package/dist/chunk-WNFHFFYE.mjs.br +0 -0
  132. package/dist/chunk-WNFHFFYE.mjs.gz +0 -0
  133. package/dist/chunk-XMKLY2SE.mjs.br +0 -0
  134. package/dist/chunk-XMKLY2SE.mjs.gz +0 -0
  135. package/dist/chunk-YJKR7Z3X.js.br +0 -0
  136. package/dist/chunk-YJKR7Z3X.js.gz +0 -0
package/dist/index.d.ts CHANGED
@@ -1825,6 +1825,15 @@ interface TextStyle {
1825
1825
  textInnerShadowOffsetX?: number;
1826
1826
  /** Text inner shadow vertical offset in px. */
1827
1827
  textInnerShadowOffsetY?: number;
1828
+ /**
1829
+ * Original inner-shadow colour-choice XML (`a:innerShdw`'s
1830
+ * `a:prstClr`/`a:schemeClr`/`a:srgbClr`/… child), preserved verbatim so an
1831
+ * authored preset or theme colour round-trips instead of always being
1832
+ * re-serialized as a resolved `a:srgbClr`. Mirrors {@link textGlowColorXml}.
1833
+ */
1834
+ textInnerShadowColorXml?: XmlObject;
1835
+ /** Theme colour slot the inner shadow colour resolved from, when it is `a:schemeClr`. */
1836
+ textInnerShadowColorRef?: PptxThemeColorRef;
1828
1837
  /** Preset shadow type from `a:prstShdw/@prst` (e.g. "shdw1"..."shdw20"). */
1829
1838
  textPresetShadowName?: string;
1830
1839
  /** Preset shadow colour as hex string. */
@@ -1837,6 +1846,18 @@ interface TextStyle {
1837
1846
  textPresetShadowDirection?: number;
1838
1847
  /** Text blur effect radius in px (`a:blur`). */
1839
1848
  textBlurRadius?: number;
1849
+ /**
1850
+ * Text soft-edge radius in px (`a:softEdge/@rad`).
1851
+ *
1852
+ * Feathers the glyph's own edges (a uniform blur of the alpha silhouette,
1853
+ * the same effect a shape's `a:softEdge` gives its fill), unrelated to
1854
+ * `a:blur` (which blurs the whole run, colour included) or a shadow. Never
1855
+ * parsed before this field existed, so `a:softEdge` on a run was silently
1856
+ * dropped: PowerPoint fades the glyphs to near-transparent at their
1857
+ * outline (COM-verified, `audit-text` slide 14's "SOFTEDGE" run), while
1858
+ * the viewer painted them fully crisp.
1859
+ */
1860
+ textSoftEdgeRadius?: number;
1840
1861
  /**
1841
1862
  * Raw `a:effectDag` XML node from `a:rPr`, preserved verbatim for
1842
1863
  * round-trip serialisation. Mirrors the shape-level
@@ -3469,6 +3490,15 @@ interface PptxChartHistogramOptions {
3469
3490
  intervalClosed?: 'l' | 'r';
3470
3491
  underflow?: number | 'auto';
3471
3492
  overflow?: number | 'auto';
3493
+ /**
3494
+ * `c:layoutPr/cx:aggregation` was authored instead of `cx:binning`: the
3495
+ * raw rows are CATEGORICAL (a Pareto chart's `clusteredColumn` series
3496
+ * counting occurrences of each authored category, COM-verified against
3497
+ * charts-com.pptx slide 31 / chartEx6.xml), not a numeric range to bin.
3498
+ * Mutually exclusive with `binSize`/`binCount`/`intervalClosed`, which
3499
+ * only apply to a true numeric-value histogram.
3500
+ */
3501
+ aggregateByCategory?: boolean;
3472
3502
  }
3473
3503
  /** Office 2016 ChartEx waterfall series layout options. */
3474
3504
  interface PptxChartWaterfallOptions {
@@ -4133,6 +4163,18 @@ interface PptxChartData {
4133
4163
  * the source" and callers should treat it as `true`. Surface only.
4134
4164
  */
4135
4165
  wireframe?: boolean;
4166
+ /**
4167
+ * Whether the surface chart is the 2-D "top view" projection
4168
+ * (`c:surfaceChart`, PowerPoint's "Contour" / "Wireframe Contour" types)
4169
+ * rather than the 3-D isometric one (`c:surface3DChart`, "3-D Surface" /
4170
+ * "3-D Surface (Wireframe)"). Both element names map to chart type
4171
+ * `"surface"`; this bit is the only thing that tells the renderer which
4172
+ * of the two projections PowerPoint actually drew, since a top-view
4173
+ * surface has no Z-axis at all (only category and series axes) while the
4174
+ * 3-D one draws all three. Surface only; `undefined` for every other
4175
+ * chart type.
4176
+ */
4177
+ surfaceTopView?: boolean;
4136
4178
  /**
4137
4179
  * Scatter presentation mode (`c:scatterChart/c:scatterStyle/@val`).
4138
4180
  *
@@ -12232,7 +12274,7 @@ interface ReflectionWrapperStyle {
12232
12274
  top: string;
12233
12275
  width: string;
12234
12276
  height: string;
12235
- /** Mirror (`scaleY(-1)`) composed with `@sx`/`@sy`/`@kx`/`@ky`/`@rot`. */
12277
+ /** `scale(@sx, @sy)` (the sign of `@sy` IS the mirror) composed with `@kx`/`@ky`/`@rot`. */
12236
12278
  transform: string;
12237
12279
  /** Anchor point for the transform above, from `@algn` (default `center top`). */
12238
12280
  transformOrigin: string;
@@ -13151,6 +13193,27 @@ declare function presentationBaseName(sourceName: string | null | undefined, fal
13151
13193
  * bytes either way.
13152
13194
  */
13153
13195
  declare function savedPresentationFileName(sourceName: string | null | undefined, format?: SavedPresentationFormat): string;
13196
+ /** A logical editor command produced by one key press. */
13197
+ 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';
13198
+ /** Every command a canvas context menu can offer, in no particular order. */
13199
+ type ContextMenuCommandId = 'copy' | 'cut' | 'paste' | 'duplicate' | 'edit-text' | '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' | 'save-as-picture' | 'edit-alt-text' | 'size-and-position' | 'format-shape' | 'delete';
13200
+ //#endregion
13201
+ //#region src/render/canvas-context-menu-commands.d.ts
13202
+ /**
13203
+ * The right-click menu for the empty slide canvas (no element under the
13204
+ * cursor), as distinct from {@link ./context-menu-commands}'s per-element menu.
13205
+ *
13206
+ * Right-clicking empty canvas used to do nothing at all in every binding: React
13207
+ * and Vue both bailed out early (`getElementIdFromEvent` returns `null`, so the
13208
+ * handler just returns) rather than opening a menu, and the other three never
13209
+ * wired a handler for it either. PowerPoint offers Paste, Layout, Reset,
13210
+ * Format Background and view toggles (Grid and Guides, Ruler) from this menu;
13211
+ * this module is the one list every binding renders instead of five omissions.
13212
+ *
13213
+ * @module render/canvas-context-menu-commands
13214
+ */
13215
+ /** Every command the empty-canvas context menu can offer, in no particular order. */
13216
+ type CanvasContextMenuCommandId = 'paste' | 'layout' | 'reset-slide' | 'format-background' | 'grid-and-guides' | 'ruler';
13154
13217
  //#endregion
13155
13218
  //#region src/render/insert-chart.d.ts
13156
13219
  /**
@@ -13216,6 +13279,21 @@ interface ZoomNavigationTarget {
13216
13279
  returnToParent: boolean;
13217
13280
  transitionDurationMs?: number;
13218
13281
  }
13282
+ type BackstagePage = 'home' | 'new' | 'open' | 'info' | 'save' | 'saveAs' | 'print' | 'share' | 'export' | 'close' | 'account' | 'options';
13283
+ //#endregion
13284
+ //#region src/render/backstage-cards.d.ts
13285
+ /**
13286
+ * Every action card the File-tab backstage can show, keyed by the operation it
13287
+ * triggers rather than by its wording.
13288
+ *
13289
+ * The five bindings used to hardcode a title and a body string each, which made
13290
+ * the whole backstage untranslatable and let the copy drift: the same card
13291
+ * carried four different descriptions depending on which binding you opened it
13292
+ * in. Both halves now live here as a dictionary key plus an English fallback,
13293
+ * so a wording change lands everywhere at once and a translator only has to
13294
+ * translate it once.
13295
+ */
13296
+ type BackstageCardId = 'protect' | 'inspect' | 'embedFonts' | 'signatures' | 'versionHistory' | 'saveAsPptx' | 'saveAsPpsx' | 'saveAsPptm' | 'saveAsPpt' | 'pdf' | 'png' | 'video' | 'gif' | 'json' | 'copyImage' | 'print' | 'share';
13219
13297
  //#endregion
13220
13298
  //#region src/render/account.d.ts
13221
13299
  /** Local-only display profile shown in File > Account. Never sent anywhere; purely cosmetic. */
@@ -13446,6 +13524,7 @@ interface ViewerOptions {
13446
13524
  trust: ViewerTrustOptions;
13447
13525
  }
13448
13526
  type ViewerOptionsGroupId = keyof ViewerOptions;
13527
+ type ViewerOptionPrimitive = boolean | number | string;
13449
13528
  type StoredViewerOptions = { [G in ViewerOptionsGroupId]?: Partial<ViewerOptions[G]>; };
13450
13529
  //#endregion
13451
13530
  //#region src/render/viewer-prefs-storage.d.ts
@@ -13477,6 +13556,226 @@ declare function writeStoredViewerPrefs(patch: Partial<StoredViewerPrefs>): void
13477
13556
  /** Remove all persisted viewer preferences. Silently no-ops when storage is unavailable. */
13478
13557
  declare function clearStoredViewerPrefs(): void;
13479
13558
  //#endregion
13559
+ //#region src/render/options/viewer-options-controls.d.ts
13560
+ /**
13561
+ * Control/section/tab descriptor types for the File > Options schema, plus
13562
+ * the terse constructors the tab-definition modules build panes with.
13563
+ */
13564
+ type ViewerOptionsTabId = 'general' | 'proofing' | 'save' | 'language' | 'accessibility' | 'advanced' | 'ribbon' | 'quickAccess' | 'addIns' | 'trust';
13565
+ //#endregion
13566
+ //#region src/render/customization/customization-types.d.ts
13567
+ /** Keys of an options group whose value is a primitive (not an array). */
13568
+ type PrimitiveKeys<T> = { [K in keyof T]: T[K] extends ViewerOptionPrimitive ? K : never; }[keyof T] & string;
13569
+ /**
13570
+ * One File > Options setting, addressed as `<group>.<key>`, for example
13571
+ * `general.userName` or `advanced.showGrid`. The union is derived from the
13572
+ * `ViewerOptions` model itself, so a typo is a compile error.
13573
+ */
13574
+ type OptionsSettingId = { [G in ViewerOptionsGroupId]: `${G}.${PrimitiveKeys<ViewerOptions[G]>}`; }[ViewerOptionsGroupId];
13575
+ /**
13576
+ * A File > Options page: the ten PowerPoint categories plus `ai`, the AI
13577
+ * assistant page a binding adds when the host configured an assistant.
13578
+ */
13579
+ type OptionsPageId = ViewerOptionsTabId | 'ai';
13580
+ /**
13581
+ * One section of an Options page, addressed as `<page>.<section>`, for
13582
+ * example `general.personalize` or `advanced.print`. The full list is
13583
+ * `OPTIONS_SECTION_IDS` (derived from the schema at runtime).
13584
+ */
13585
+ type OptionsSectionId = `${ViewerOptionsTabId}.${string}`;
13586
+ /** Values a host forces onto settings. */
13587
+ type OptionsSettingValues = Partial<Record<OptionsSettingId, ViewerOptionPrimitive>>;
13588
+ /** Ribbon and toolbar customisation. */
13589
+ interface RibbonCustomization {
13590
+ /** Ribbon tabs to remove (the File tab included, unlike Customize Ribbon). */
13591
+ hiddenTabs?: readonly ToolbarTabId[];
13592
+ /** Top-level toolbar buttons / control clusters to remove. */
13593
+ hiddenButtons?: readonly ToolbarButtonId[];
13594
+ }
13595
+ /** File > Options (the Settings dialog) customisation. */
13596
+ interface OptionsCustomization {
13597
+ /** Whole pages to remove from the dialog's category rail. */
13598
+ hiddenPages?: readonly OptionsPageId[];
13599
+ /** Sections (`<page>.<section>`) to remove from their page. */
13600
+ hiddenSections?: readonly OptionsSectionId[];
13601
+ /** Individual settings (`<group>.<key>`) to remove wherever they appear. */
13602
+ hiddenSettings?: readonly OptionsSettingId[];
13603
+ /**
13604
+ * Settings pinned to a fixed value. The value is forced into the options
13605
+ * store, user edits to it are ignored, and the control renders read-only.
13606
+ * Add the id to `hiddenSettings` too to lock it invisibly.
13607
+ */
13608
+ locked?: OptionsSettingValues;
13609
+ /**
13610
+ * Host defaults: the value a setting starts at when the user has not saved
13611
+ * a choice of their own. "Reset" returns to these, not to the built-ins.
13612
+ */
13613
+ defaults?: OptionsSettingValues;
13614
+ }
13615
+ /** File tab (backstage) customisation. */
13616
+ interface BackstageCustomization {
13617
+ /** Navigation entries (pages) to remove from the File tab. */
13618
+ hiddenPages?: readonly BackstagePage[];
13619
+ /** Action cards to remove from the pages that show them. */
13620
+ hiddenCards?: readonly BackstageCardId[];
13621
+ }
13622
+ /** Right-click menu customisation. */
13623
+ interface ContextMenuCustomization {
13624
+ /** Entries to remove from the element (right-click on a shape) menu. */
13625
+ hiddenElementCommands?: readonly ContextMenuCommandId[];
13626
+ /** Entries to remove from the empty-canvas menu. */
13627
+ hiddenCanvasCommands?: readonly CanvasContextMenuCommandId[];
13628
+ /** Remove the element context menu entirely. */
13629
+ disableElementMenu?: boolean;
13630
+ /** Remove the empty-canvas context menu entirely. */
13631
+ disableCanvasMenu?: boolean;
13632
+ }
13633
+ /**
13634
+ * A shortcut chord in the form `Mod+Shift+D`: modifiers `Mod` (Ctrl on
13635
+ * Windows/Linux, Cmd on macOS), `Ctrl`, `Meta`, `Alt`, `Shift`, joined by `+`,
13636
+ * followed by a `KeyboardEvent.key` value (`D`, `Delete`, `ArrowLeft`, `F2`).
13637
+ */
13638
+ type ShortcutChord = string;
13639
+ /** Editor keyboard-shortcut customisation. */
13640
+ interface KeyboardCustomization {
13641
+ /** Turn every editor shortcut off (the host owns the keyboard). */
13642
+ disableAll?: boolean;
13643
+ /** Editor commands whose shortcut is turned off. */
13644
+ disabled?: readonly EditorKeyActionName[];
13645
+ /**
13646
+ * Replacement chords per command. A remapped command no longer answers to
13647
+ * its built-in chord; it answers to the chord(s) given here instead.
13648
+ */
13649
+ remap?: Partial<Record<EditorKeyActionName, ShortcutChord | readonly ShortcutChord[]>>;
13650
+ }
13651
+ /**
13652
+ * Chrome regions a host can remove. Each id maps onto one region in every
13653
+ * binding; see `VIEWER_PANEL_IDS` for the catalogue.
13654
+ */
13655
+ type ViewerPanelId = 'statusBar' | 'slidesPane' | 'inspector' | 'notes' | 'quickAccessToolbar' | 'titleBar';
13656
+ /** Feature areas that can be switched off as a whole. */
13657
+ type ViewerFeatureId = 'ai' | 'collaboration' | 'comments' | 'presentMode';
13658
+ /** Dialogs (and the entry points that open them) a host can remove. */
13659
+ type ViewerDialogId = 'options' | 'share' | 'broadcast' | 'print' | 'export';
13660
+ /** Export formats offered by the File > Export page. */
13661
+ type ViewerExportFormatId = 'pdf' | 'png' | 'video' | 'gif' | 'json' | 'copyImage';
13662
+ /**
13663
+ * The whole customisation object. Every field is optional; omitted fields hide
13664
+ * nothing and lock nothing.
13665
+ */
13666
+ interface ViewerCustomization {
13667
+ ribbon?: RibbonCustomization;
13668
+ options?: OptionsCustomization;
13669
+ backstage?: BackstageCustomization;
13670
+ contextMenu?: ContextMenuCustomization;
13671
+ keyboard?: KeyboardCustomization;
13672
+ /** Chrome regions to remove (`true` hides). */
13673
+ hiddenPanels?: readonly ViewerPanelId[];
13674
+ /** Feature areas to switch off (their buttons, menus, pages and panels). */
13675
+ disabledFeatures?: readonly ViewerFeatureId[];
13676
+ /** Dialogs to remove, along with every entry point that opens them. */
13677
+ hiddenDialogs?: readonly ViewerDialogId[];
13678
+ /** Export formats to remove from File > Export. */
13679
+ hiddenExportFormats?: readonly ViewerExportFormatId[];
13680
+ }
13681
+ //#endregion
13682
+ //#region src/render/customization/customization-catalog.d.ts
13683
+ declare const RIBBON_TAB_IDS: readonly ToolbarTabId[];
13684
+ declare const TOOLBAR_BUTTON_IDS: readonly ["share", "broadcast", "export", "undo", "redo", "record", "notes", "fullscreen", "zoom", "navigation"];
13685
+ declare const OPTIONS_PAGE_IDS: readonly OptionsPageId[];
13686
+ declare const OPTIONS_SECTION_IDS: readonly OptionsSectionId[];
13687
+ declare const OPTIONS_SETTING_IDS: readonly OptionsSettingId[];
13688
+ declare const BACKSTAGE_PAGE_IDS: readonly BackstagePage[];
13689
+ declare const BACKSTAGE_CARD_IDS: readonly BackstageCardId[];
13690
+ declare const ELEMENT_CONTEXT_MENU_COMMAND_IDS: readonly ["copy", "cut", "paste", "duplicate", "edit-text", "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", "save-as-picture", "edit-alt-text", "size-and-position", "format-shape", "delete"];
13691
+ declare const CANVAS_CONTEXT_MENU_COMMAND_IDS: readonly ["paste", "layout", "reset-slide", "format-background", "grid-and-guides", "ruler"];
13692
+ 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"];
13693
+ declare const VIEWER_PANEL_IDS: readonly ["statusBar", "slidesPane", "inspector", "notes", "quickAccessToolbar", "titleBar"];
13694
+ declare const VIEWER_FEATURE_IDS: readonly ["ai", "collaboration", "comments", "presentMode"];
13695
+ declare const VIEWER_DIALOG_IDS: readonly ["options", "share", "broadcast", "print", "export"];
13696
+ declare const VIEWER_EXPORT_FORMAT_IDS: readonly ["pdf", "png", "video", "gif", "json", "copyImage"];
13697
+ //#endregion
13698
+ //#region src/render/customization/customization-keymap.d.ts
13699
+ /** A parsed `Mod+Shift+D` chord. */
13700
+ interface ParsedShortcutChord {
13701
+ key: string;
13702
+ mod: boolean;
13703
+ ctrl: boolean;
13704
+ meta: boolean;
13705
+ alt: boolean;
13706
+ shift: boolean;
13707
+ }
13708
+ /** The normalised keyboard slice of a resolved customisation. */
13709
+ interface ResolvedKeyboardCustomization {
13710
+ disableAll: boolean;
13711
+ disabled: ReadonlySet<EditorKeyActionName>;
13712
+ remap: ReadonlyMap<EditorKeyActionName, readonly ParsedShortcutChord[]>;
13713
+ }
13714
+ //#endregion
13715
+ //#region src/render/customization/customization-resolve.d.ts
13716
+ /** The normalised, set-based view of a customisation. Treat as immutable. */
13717
+ interface ResolvedCustomization {
13718
+ hiddenActions: ReadonlySet<ToolbarActionId>;
13719
+ hiddenOptionsPages: ReadonlySet<OptionsPageId>;
13720
+ hiddenOptionsSections: ReadonlySet<OptionsSectionId>;
13721
+ hiddenSettings: ReadonlySet<OptionsSettingId>;
13722
+ lockedSettings: OptionsSettingValues;
13723
+ defaultSettings: OptionsSettingValues;
13724
+ hiddenBackstagePages: ReadonlySet<BackstagePage>;
13725
+ hiddenBackstageCards: ReadonlySet<BackstageCardId>;
13726
+ hiddenElementCommands: ReadonlySet<ContextMenuCommandId>;
13727
+ hiddenCanvasCommands: ReadonlySet<CanvasContextMenuCommandId>;
13728
+ elementMenuEnabled: boolean;
13729
+ canvasMenuEnabled: boolean;
13730
+ hiddenPanels: ReadonlySet<ViewerPanelId>;
13731
+ disabledFeatures: ReadonlySet<ViewerFeatureId>;
13732
+ hiddenDialogs: ReadonlySet<ViewerDialogId>;
13733
+ keyboard: ResolvedKeyboardCustomization;
13734
+ }
13735
+ //#endregion
13736
+ //#region src/render/customization/customization-controller.d.ts
13737
+ /** The imperative methods every binding's component handle exposes. */
13738
+ interface ViewerCustomizationApi {
13739
+ /** The current customisation object (a snapshot; do not mutate). */
13740
+ getCustomization(): ViewerCustomization;
13741
+ /** Replace the whole customisation. */
13742
+ setCustomization(next: ViewerCustomization): void;
13743
+ /** Merge a partial customisation (see `mergeCustomization`). */
13744
+ updateCustomization(patch: ViewerCustomization): void;
13745
+ /** Drop every customisation, back to the stock UI. */
13746
+ resetCustomization(): void;
13747
+ hideRibbonTab(tab: ToolbarTabId): void;
13748
+ showRibbonTab(tab: ToolbarTabId): void;
13749
+ hideToolbarButton(button: ToolbarButtonId): void;
13750
+ showToolbarButton(button: ToolbarButtonId): void;
13751
+ hideOptionsPage(page: OptionsPageId): void;
13752
+ showOptionsPage(page: OptionsPageId): void;
13753
+ hideOptionsSection(section: OptionsSectionId): void;
13754
+ showOptionsSection(section: OptionsSectionId): void;
13755
+ hideSetting(setting: OptionsSettingId): void;
13756
+ showSetting(setting: OptionsSettingId): void;
13757
+ /** Pin a setting to `value`; `hidden` also removes it from the dialog. */
13758
+ lockSetting(setting: OptionsSettingId, value: ViewerOptionPrimitive, hidden?: boolean): void;
13759
+ unlockSetting(setting: OptionsSettingId): void;
13760
+ /** Set (or with `undefined`, clear) the host default for a setting. */
13761
+ setSettingDefault(setting: OptionsSettingId, value: ViewerOptionPrimitive | undefined): void;
13762
+ hideBackstagePage(page: BackstagePage): void;
13763
+ showBackstagePage(page: BackstagePage): void;
13764
+ hideBackstageCard(card: BackstageCardId): void;
13765
+ showBackstageCard(card: BackstageCardId): void;
13766
+ hideContextMenuCommand(command: ContextMenuCommandId): void;
13767
+ showContextMenuCommand(command: ContextMenuCommandId): void;
13768
+ hideCanvasContextMenuCommand(command: CanvasContextMenuCommandId): void;
13769
+ showCanvasContextMenuCommand(command: CanvasContextMenuCommandId): void;
13770
+ disableShortcut(action: EditorKeyActionName): void;
13771
+ enableShortcut(action: EditorKeyActionName): void;
13772
+ /** Move a command onto new chord(s); `undefined` restores the built-in chord. */
13773
+ remapShortcut(action: EditorKeyActionName, chords: ShortcutChord | readonly ShortcutChord[] | undefined): void;
13774
+ setPanelVisible(panel: ViewerPanelId, visible: boolean): void;
13775
+ setFeatureEnabled(feature: ViewerFeatureId, enabled: boolean): void;
13776
+ setDialogAvailable(dialog: ViewerDialogId, available: boolean): void;
13777
+ }
13778
+ //#endregion
13480
13779
  //#region src/render/viewport-fit.d.ts
13481
13780
  /** Unscaled CSS pixels reserved on each side of the ordinary viewer viewport. */
13482
13781
  type ViewportFitPadding = number | {
@@ -14132,8 +14431,14 @@ interface PowerPointViewerProps extends ViewportFitOptions {
14132
14431
  * @see {@link PptxAiConfig}
14133
14432
  */
14134
14433
  ai?: PptxAiConfig;
14434
+ /**
14435
+ * Framework-neutral UI customisation. See docs/guide/customization.md.
14436
+ * Unioned with `hiddenActions`. A new object replaces the whole
14437
+ * customisation, including edits made through the handle helpers.
14438
+ */
14439
+ customization?: ViewerCustomization;
14135
14440
  }
14136
- interface PowerPointViewerHandle extends FileViewerHandle, PowerPointViewerAPI {
14441
+ interface PowerPointViewerHandle extends FileViewerHandle, PowerPointViewerAPI, ViewerCustomizationApi {
14137
14442
  getContent: () => Promise<Uint8Array>;
14138
14443
  }
14139
14444
 
@@ -14480,6 +14785,8 @@ interface SlideCanvasProps {
14480
14785
  onContextMenu: (elementId: string, e: React$1__default.MouseEvent) => void;
14481
14786
  /** Called when the user presses mouse down on empty canvas space. */
14482
14787
  onCanvasMouseDown?: (e: React$1__default.MouseEvent) => void;
14788
+ /** Right-click on empty canvas (no element hit); opens the canvas context menu. */
14789
+ onCanvasContextMenu?: (e: React$1__default.MouseEvent) => void;
14483
14790
  onResizePointerDown: (elementId: string, e: React$1__default.MouseEvent, handle: string) => void;
14484
14791
  onAdjustmentPointerDown: (elementId: string, e: React$1__default.MouseEvent, descriptor: ShapeAdjustmentHandleDescriptor) => void;
14485
14792
  /** Commit a new rotation (degrees) when the on-canvas rotate handle is dragged. */
@@ -14694,5 +15001,5 @@ declare function SlideTemplatePreview({ templateId, scheme }: SlideTemplatePrevi
14694
15001
  */
14695
15002
  declare function renderToCanvas(element: HTMLElement, options?: Partial<Options>): Promise<HTMLCanvasElement>;
14696
15003
 
14697
- export { AVATAR_COLOR_SWATCHES, DEFAULT_VIEWER_PROFILE, LOCALE_CATALOG, PPTX_OPEN_ACCEPT, PRESENTATION_OPEN_EXTENSIONS, PowerPointViewer, SLIDE_TEMPLATES, SlideCanvas, SlideTemplateGalleryDialog, SlideTemplatePreview, THEME_CATALOG, Toolbar, VIEWER_PREFS_STORAGE_KEY, ViewerThemeProvider, buildSlideTemplateContent, buildSlideTemplateSlide, clearAllLocalViewerData, clearStoredViewerPrefs, createImageElementFromFile, defaultCssVars, defaultRadius, defaultThemeColors, describeCollaborationShellState, getAnimationInitialStyle, getLocalStorageUsageSummary, isLegacyBinaryPresentation, isSupportedPresentationFile, presentationBaseName, readStoredViewerPrefs, renderToCanvas, resolveProfileInitial, resolveThemeCatalogEntry, saveViewerProfile, savedPresentationFileName, themeToCssVars, useViewerBuildingBlocks, useViewerTheme, vermilionDarkColors, vermilionDarkTheme, vermilionLightColors, vermilionLightTheme, vermilionRadius, writeStoredViewerPrefs };
14698
- export type { AccountAuthConfig, CollaborationConfig, CollaborationContextValue, CollaborationShellState, ElementUpdate, ElementUpdateOptions, ExternalCollaborationAwareness, ExternalCollaborationSession, ExternalCollaborationSnapshot, LocalStorageUsageSummary, LocaleCatalogEntry, PowerPointViewerAPI, PowerPointViewerHandle, PowerPointViewerProps, PptxAiBridge, PptxAiConfig, PptxAiConnection, PptxAiContextStrategy, PptxAiToolName, PptxAiWritePolicy, SavedPresentationFormat, SlideCanvasProps, SlideTemplateGalleryDialogProps, SlideTemplateId, SlideTemplatePreviewProps, SlideTemplateSpec, StoredViewerPrefs, ThemeCatalogEntry, ToolbarActionId, ToolbarButtonId, ToolbarProps, ToolbarTabId, UseViewerBuildingBlocksInput, ViewerBuildingBlocksResult, ViewerMode, ViewerProfile, ViewerTheme, ViewerThemeColors, ViewportFitOptions, ViewportFitPadding };
15004
+ export { AVATAR_COLOR_SWATCHES, BACKSTAGE_CARD_IDS, BACKSTAGE_PAGE_IDS, CANVAS_CONTEXT_MENU_COMMAND_IDS, DEFAULT_VIEWER_PROFILE, EDITOR_SHORTCUT_ACTION_IDS, ELEMENT_CONTEXT_MENU_COMMAND_IDS, LOCALE_CATALOG, OPTIONS_PAGE_IDS, OPTIONS_SECTION_IDS, OPTIONS_SETTING_IDS, PPTX_OPEN_ACCEPT, PRESENTATION_OPEN_EXTENSIONS, PowerPointViewer, RIBBON_TAB_IDS, SLIDE_TEMPLATES, SlideCanvas, SlideTemplateGalleryDialog, SlideTemplatePreview, THEME_CATALOG, TOOLBAR_BUTTON_IDS, Toolbar, VIEWER_DIALOG_IDS, VIEWER_EXPORT_FORMAT_IDS, VIEWER_FEATURE_IDS, VIEWER_PANEL_IDS, VIEWER_PREFS_STORAGE_KEY, ViewerThemeProvider, buildSlideTemplateContent, buildSlideTemplateSlide, clearAllLocalViewerData, clearStoredViewerPrefs, createImageElementFromFile, defaultCssVars, defaultRadius, defaultThemeColors, describeCollaborationShellState, getAnimationInitialStyle, getLocalStorageUsageSummary, isLegacyBinaryPresentation, isSupportedPresentationFile, presentationBaseName, readStoredViewerPrefs, renderToCanvas, resolveProfileInitial, resolveThemeCatalogEntry, saveViewerProfile, savedPresentationFileName, themeToCssVars, useViewerBuildingBlocks, useViewerTheme, vermilionDarkColors, vermilionDarkTheme, vermilionLightColors, vermilionLightTheme, vermilionRadius, writeStoredViewerPrefs };
15005
+ export type { AccountAuthConfig, BackstageCustomization, CollaborationConfig, CollaborationContextValue, CollaborationShellState, ContextMenuCustomization, ElementUpdate, ElementUpdateOptions, ExternalCollaborationAwareness, ExternalCollaborationSession, ExternalCollaborationSnapshot, KeyboardCustomization, LocalStorageUsageSummary, LocaleCatalogEntry, OptionsCustomization, OptionsPageId, OptionsSectionId, OptionsSettingId, OptionsSettingValues, PowerPointViewerAPI, PowerPointViewerHandle, PowerPointViewerProps, PptxAiBridge, PptxAiConfig, PptxAiConnection, PptxAiContextStrategy, PptxAiToolName, PptxAiWritePolicy, ResolvedCustomization, RibbonCustomization, SavedPresentationFormat, ShortcutChord, SlideCanvasProps, SlideTemplateGalleryDialogProps, SlideTemplateId, SlideTemplatePreviewProps, SlideTemplateSpec, StoredViewerPrefs, ThemeCatalogEntry, ToolbarActionId, ToolbarButtonId, ToolbarProps, ToolbarTabId, UseViewerBuildingBlocksInput, ViewerBuildingBlocksResult, ViewerCustomization, ViewerCustomizationApi, ViewerDialogId, ViewerExportFormatId, ViewerFeatureId, ViewerMode, ViewerPanelId, ViewerProfile, ViewerTheme, ViewerThemeColors, ViewportFitOptions, ViewportFitPadding };