pptx-react-viewer 4.74.0 → 4.76.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 (126) hide show
  1. package/CHANGELOG.md +50 -0
  2. package/README.md +1 -1
  3. package/dist/{AiChatPanel-PLQ3NBTK.js → AiChatPanel-4V7QB5Z3.js} +19 -19
  4. package/dist/AiChatPanel-4V7QB5Z3.js.br +0 -0
  5. package/dist/AiChatPanel-4V7QB5Z3.js.gz +0 -0
  6. package/dist/{AiChatPanel-E7CJSTW7.mjs → AiChatPanel-6ML3VLIX.mjs} +1 -1
  7. package/dist/AiChatPanel-6ML3VLIX.mjs.br +0 -0
  8. package/dist/AiChatPanel-6ML3VLIX.mjs.gz +0 -0
  9. package/dist/ai.js +2 -2
  10. package/dist/ai.js.br +0 -0
  11. package/dist/ai.js.gz +0 -0
  12. package/dist/ai.mjs +1 -1
  13. package/dist/ai.mjs.br +0 -0
  14. package/dist/ai.mjs.gz +0 -0
  15. package/dist/{chunk-P2COO2QO.js → chunk-6GFSF2ML.js} +65 -13
  16. package/dist/chunk-6GFSF2ML.js.br +0 -0
  17. package/dist/chunk-6GFSF2ML.js.gz +0 -0
  18. package/dist/chunk-FFTZYNL4.mjs +2 -0
  19. package/dist/chunk-FFTZYNL4.mjs.br +6 -0
  20. package/dist/chunk-FFTZYNL4.mjs.gz +0 -0
  21. package/dist/chunk-LWGPHJHC.js +151 -0
  22. package/dist/chunk-LWGPHJHC.js.br +0 -0
  23. package/dist/chunk-LWGPHJHC.js.gz +0 -0
  24. package/dist/{chunk-LVEFHZ76.js → chunk-MU3BIZ2U.js} +1 -1
  25. package/dist/chunk-MU3BIZ2U.js.br +0 -0
  26. package/dist/chunk-MU3BIZ2U.js.gz +0 -0
  27. package/dist/{chunk-FBSPQYRE.mjs → chunk-N3YK2BCA.mjs} +61 -14
  28. package/dist/chunk-N3YK2BCA.mjs.br +0 -0
  29. package/dist/chunk-N3YK2BCA.mjs.gz +0 -0
  30. package/dist/{chunk-SQ7OASDY.mjs → chunk-OC4RP2CB.mjs} +590 -392
  31. package/dist/chunk-OC4RP2CB.mjs.br +0 -0
  32. package/dist/chunk-OC4RP2CB.mjs.gz +0 -0
  33. package/dist/chunk-P2IEKYVG.js +29 -0
  34. package/dist/chunk-P2IEKYVG.js.br +0 -0
  35. package/dist/chunk-P2IEKYVG.js.gz +0 -0
  36. package/dist/{chunk-CRC3V4UG.mjs → chunk-PPOGAZ53.mjs} +646 -263
  37. package/dist/chunk-PPOGAZ53.mjs.br +0 -0
  38. package/dist/chunk-PPOGAZ53.mjs.gz +0 -0
  39. package/dist/{chunk-JZE6BORE.mjs → chunk-RMEWSJZU.mjs} +1 -1
  40. package/dist/chunk-RMEWSJZU.mjs.br +0 -0
  41. package/dist/chunk-RMEWSJZU.mjs.gz +0 -0
  42. package/dist/{chunk-XG4WSJ4O.js → chunk-SEIVQGH5.js} +1632 -1240
  43. package/dist/chunk-SEIVQGH5.js.br +0 -0
  44. package/dist/chunk-SEIVQGH5.js.gz +0 -0
  45. package/dist/{chunk-D4WC35PL.js → chunk-XTYBIJ2S.js} +1136 -939
  46. package/dist/chunk-XTYBIJ2S.js.br +0 -0
  47. package/dist/chunk-XTYBIJ2S.js.gz +0 -0
  48. package/dist/chunk-Y53EC3JU.mjs +27 -0
  49. package/dist/chunk-Y53EC3JU.mjs.br +0 -0
  50. package/dist/chunk-Y53EC3JU.mjs.gz +0 -0
  51. package/dist/i18n/de.cjs +5 -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 +5 -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 +5 -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 +5 -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 +5 -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 +5 -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 +5 -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 +5 -0
  73. package/dist/i18n/zh-CN.mjs.br +0 -0
  74. package/dist/i18n/zh-CN.mjs.gz +0 -0
  75. package/dist/index.d.ts +76 -26
  76. package/dist/index.js +126 -126
  77. package/dist/index.js.br +0 -0
  78. package/dist/index.js.gz +0 -0
  79. package/dist/index.mjs +6 -6
  80. package/dist/index.mjs.br +0 -0
  81. package/dist/index.mjs.gz +0 -0
  82. package/dist/internals.d.ts +52 -24
  83. package/dist/internals.js +82 -81
  84. package/dist/internals.js.br +0 -0
  85. package/dist/internals.js.gz +0 -0
  86. package/dist/internals.mjs +3 -2
  87. package/dist/internals.mjs.br +0 -0
  88. package/dist/internals.mjs.gz +0 -0
  89. package/dist/no-i18next.d.ts +1343 -0
  90. package/dist/no-i18next.js +251 -0
  91. package/dist/no-i18next.js.br +0 -0
  92. package/dist/no-i18next.js.gz +0 -0
  93. package/dist/no-i18next.mjs +6 -0
  94. package/dist/no-i18next.mjs.br +0 -0
  95. package/dist/no-i18next.mjs.gz +0 -0
  96. package/dist/pptx-viewer.css +1 -1
  97. package/dist/pptx-viewer.css.br +0 -0
  98. package/dist/pptx-viewer.css.gz +0 -0
  99. package/dist/viewer/index.d.ts +37 -18
  100. package/dist/viewer/index.js +25 -24
  101. package/dist/viewer/index.js.br +0 -0
  102. package/dist/viewer/index.js.gz +0 -0
  103. package/dist/viewer/index.mjs +5 -4
  104. package/dist/viewer/index.mjs.br +0 -0
  105. package/dist/viewer/index.mjs.gz +0 -0
  106. package/package.json +9 -4
  107. package/dist/AiChatPanel-E7CJSTW7.mjs.br +0 -0
  108. package/dist/AiChatPanel-E7CJSTW7.mjs.gz +0 -0
  109. package/dist/AiChatPanel-PLQ3NBTK.js.br +0 -0
  110. package/dist/AiChatPanel-PLQ3NBTK.js.gz +0 -0
  111. package/dist/chunk-CRC3V4UG.mjs.br +0 -0
  112. package/dist/chunk-CRC3V4UG.mjs.gz +0 -0
  113. package/dist/chunk-D4WC35PL.js.br +0 -0
  114. package/dist/chunk-D4WC35PL.js.gz +0 -0
  115. package/dist/chunk-FBSPQYRE.mjs.br +0 -0
  116. package/dist/chunk-FBSPQYRE.mjs.gz +0 -0
  117. package/dist/chunk-JZE6BORE.mjs.br +0 -0
  118. package/dist/chunk-JZE6BORE.mjs.gz +0 -0
  119. package/dist/chunk-LVEFHZ76.js.br +0 -0
  120. package/dist/chunk-LVEFHZ76.js.gz +0 -0
  121. package/dist/chunk-P2COO2QO.js.br +0 -0
  122. package/dist/chunk-P2COO2QO.js.gz +0 -0
  123. package/dist/chunk-SQ7OASDY.mjs.br +0 -0
  124. package/dist/chunk-SQ7OASDY.mjs.gz +0 -0
  125. package/dist/chunk-XG4WSJ4O.js.br +0 -0
  126. package/dist/chunk-XG4WSJ4O.js.gz +0 -0
Binary file
Binary file
@@ -0,0 +1,27 @@
1
+ import { registerHostI18next } from './chunk-N3YK2BCA.mjs';
2
+ import { useTranslation } from 'react-i18next';
3
+
4
+ function isEmptyPlainObject(value) {
5
+ if (typeof value !== "object" || value === null) {
6
+ return false;
7
+ }
8
+ const prototype = Object.getPrototypeOf(value);
9
+ const plain = prototype === null || Object.getPrototypeOf(prototype) === null;
10
+ return plain && Object.keys(value).length === 0;
11
+ }
12
+ function isMissingInstance(result) {
13
+ return result.ready === false && isEmptyPlainObject(result.i18n);
14
+ }
15
+ var NO_FIELDS = {};
16
+ function useHostI18next() {
17
+ const result = useTranslation();
18
+ if (isMissingInstance(result)) {
19
+ return null;
20
+ }
21
+ const { t, i18n } = result;
22
+ return {
23
+ t,
24
+ i18n: typeof i18n === "object" && i18n !== null ? i18n : NO_FIELDS
25
+ };
26
+ }
27
+ registerHostI18next(useHostI18next);
Binary file
Binary file
package/dist/i18n/de.cjs CHANGED
@@ -4743,6 +4743,11 @@ var translations21 = {
4743
4743
  "pptx.ribbon.transitionTitle": "{{name}}-\xDCbergang",
4744
4744
  "pptx.ribbon.collapseRibbon": "Men\xFCband reduzieren",
4745
4745
  "pptx.ribbon.expandRibbon": "Men\xFCband erweitern",
4746
+ "pptx.ribbon.displayOptions": "Men\xFCband-Anzeigeoptionen",
4747
+ "pptx.ribbon.display.fullScreen": "Vollbildmodus",
4748
+ "pptx.ribbon.display.tabs": "Nur Registerkarten anzeigen",
4749
+ "pptx.ribbon.display.always": "Men\xFCband immer anzeigen",
4750
+ "pptx.ribbon.showRibbon": "Men\xFCband anzeigen",
4746
4751
  "pptx.ribbon.open": "\xD6ffnen",
4747
4752
  "pptx.ribbon.openAnotherPresentation": "\xD6ffnen Sie eine andere Pr\xE4sentation",
4748
4753
  "pptx.ribbon.saveAsPptx": "Als .pptx speichern",
Binary file
Binary file
package/dist/i18n/de.mjs CHANGED
@@ -4717,6 +4717,11 @@ var translations21 = {
4717
4717
  "pptx.ribbon.transitionTitle": "{{name}}-\xDCbergang",
4718
4718
  "pptx.ribbon.collapseRibbon": "Men\xFCband reduzieren",
4719
4719
  "pptx.ribbon.expandRibbon": "Men\xFCband erweitern",
4720
+ "pptx.ribbon.displayOptions": "Men\xFCband-Anzeigeoptionen",
4721
+ "pptx.ribbon.display.fullScreen": "Vollbildmodus",
4722
+ "pptx.ribbon.display.tabs": "Nur Registerkarten anzeigen",
4723
+ "pptx.ribbon.display.always": "Men\xFCband immer anzeigen",
4724
+ "pptx.ribbon.showRibbon": "Men\xFCband anzeigen",
4720
4725
  "pptx.ribbon.open": "\xD6ffnen",
4721
4726
  "pptx.ribbon.openAnotherPresentation": "\xD6ffnen Sie eine andere Pr\xE4sentation",
4722
4727
  "pptx.ribbon.saveAsPptx": "Als .pptx speichern",
Binary file
Binary file
package/dist/i18n/es.cjs CHANGED
@@ -4743,6 +4743,11 @@ var translations21 = {
4743
4743
  "pptx.ribbon.transitionTitle": "Transici\xF3n {{name}}",
4744
4744
  "pptx.ribbon.collapseRibbon": "Contraer la cinta",
4745
4745
  "pptx.ribbon.expandRibbon": "Expandir la cinta",
4746
+ "pptx.ribbon.displayOptions": "Opciones de presentaci\xF3n de la cinta",
4747
+ "pptx.ribbon.display.fullScreen": "Modo de pantalla completa",
4748
+ "pptx.ribbon.display.tabs": "Mostrar solo pesta\xF1as",
4749
+ "pptx.ribbon.display.always": "Mostrar siempre la cinta",
4750
+ "pptx.ribbon.showRibbon": "Mostrar la cinta",
4746
4751
  "pptx.ribbon.open": "Abrir",
4747
4752
  "pptx.ribbon.openAnotherPresentation": "Abrir otra presentaci\xF3n",
4748
4753
  "pptx.ribbon.saveAsPptx": "Guardar como .pptx",
Binary file
Binary file
package/dist/i18n/es.mjs CHANGED
@@ -4717,6 +4717,11 @@ var translations21 = {
4717
4717
  "pptx.ribbon.transitionTitle": "Transici\xF3n {{name}}",
4718
4718
  "pptx.ribbon.collapseRibbon": "Contraer la cinta",
4719
4719
  "pptx.ribbon.expandRibbon": "Expandir la cinta",
4720
+ "pptx.ribbon.displayOptions": "Opciones de presentaci\xF3n de la cinta",
4721
+ "pptx.ribbon.display.fullScreen": "Modo de pantalla completa",
4722
+ "pptx.ribbon.display.tabs": "Mostrar solo pesta\xF1as",
4723
+ "pptx.ribbon.display.always": "Mostrar siempre la cinta",
4724
+ "pptx.ribbon.showRibbon": "Mostrar la cinta",
4720
4725
  "pptx.ribbon.open": "Abrir",
4721
4726
  "pptx.ribbon.openAnotherPresentation": "Abrir otra presentaci\xF3n",
4722
4727
  "pptx.ribbon.saveAsPptx": "Guardar como .pptx",
Binary file
Binary file
package/dist/i18n/fr.cjs CHANGED
@@ -4743,6 +4743,11 @@ var translations21 = {
4743
4743
  "pptx.ribbon.transitionTitle": "Transition {{name}}",
4744
4744
  "pptx.ribbon.collapseRibbon": "R\xE9duire le ruban",
4745
4745
  "pptx.ribbon.expandRibbon": "D\xE9velopper le ruban",
4746
+ "pptx.ribbon.displayOptions": "Options d'affichage du ruban",
4747
+ "pptx.ribbon.display.fullScreen": "Mode Plein \xE9cran",
4748
+ "pptx.ribbon.display.tabs": "Afficher les onglets uniquement",
4749
+ "pptx.ribbon.display.always": "Toujours afficher le ruban",
4750
+ "pptx.ribbon.showRibbon": "Afficher le ruban",
4746
4751
  "pptx.ribbon.open": "Ouvrir",
4747
4752
  "pptx.ribbon.openAnotherPresentation": "Ouvrir une autre pr\xE9sentation",
4748
4753
  "pptx.ribbon.saveAsPptx": "Enregistrer sous .pptx",
Binary file
Binary file
package/dist/i18n/fr.mjs CHANGED
@@ -4717,6 +4717,11 @@ var translations21 = {
4717
4717
  "pptx.ribbon.transitionTitle": "Transition {{name}}",
4718
4718
  "pptx.ribbon.collapseRibbon": "R\xE9duire le ruban",
4719
4719
  "pptx.ribbon.expandRibbon": "D\xE9velopper le ruban",
4720
+ "pptx.ribbon.displayOptions": "Options d'affichage du ruban",
4721
+ "pptx.ribbon.display.fullScreen": "Mode Plein \xE9cran",
4722
+ "pptx.ribbon.display.tabs": "Afficher les onglets uniquement",
4723
+ "pptx.ribbon.display.always": "Toujours afficher le ruban",
4724
+ "pptx.ribbon.showRibbon": "Afficher le ruban",
4720
4725
  "pptx.ribbon.open": "Ouvrir",
4721
4726
  "pptx.ribbon.openAnotherPresentation": "Ouvrir une autre pr\xE9sentation",
4722
4727
  "pptx.ribbon.saveAsPptx": "Enregistrer sous .pptx",
Binary file
Binary file
@@ -4758,6 +4758,11 @@ var translations27 = {
4758
4758
  "pptx.ribbon.transitionTitle": "{{name}} \u5207\u6362",
4759
4759
  "pptx.ribbon.collapseRibbon": "\u6298\u53E0\u529F\u80FD\u533A",
4760
4760
  "pptx.ribbon.expandRibbon": "\u5C55\u5F00\u529F\u80FD\u533A",
4761
+ "pptx.ribbon.displayOptions": "\u529F\u80FD\u533A\u663E\u793A\u9009\u9879",
4762
+ "pptx.ribbon.display.fullScreen": "\u5168\u5C4F\u6A21\u5F0F",
4763
+ "pptx.ribbon.display.tabs": "\u4EC5\u663E\u793A\u9009\u9879\u5361",
4764
+ "pptx.ribbon.display.always": "\u59CB\u7EC8\u663E\u793A\u529F\u80FD\u533A",
4765
+ "pptx.ribbon.showRibbon": "\u663E\u793A\u529F\u80FD\u533A",
4761
4766
  "pptx.ribbon.open": "\u6253\u5F00",
4762
4767
  "pptx.ribbon.openAnotherPresentation": "\u6253\u5F00\u53E6\u4E00\u4E2A\u6F14\u793A\u6587\u7A3F",
4763
4768
  "pptx.ribbon.saveAsPptx": "\u53E6\u5B58\u4E3A .pptx",
Binary file
Binary file
@@ -4732,6 +4732,11 @@ var translations27 = {
4732
4732
  "pptx.ribbon.transitionTitle": "{{name}} \u5207\u6362",
4733
4733
  "pptx.ribbon.collapseRibbon": "\u6298\u53E0\u529F\u80FD\u533A",
4734
4734
  "pptx.ribbon.expandRibbon": "\u5C55\u5F00\u529F\u80FD\u533A",
4735
+ "pptx.ribbon.displayOptions": "\u529F\u80FD\u533A\u663E\u793A\u9009\u9879",
4736
+ "pptx.ribbon.display.fullScreen": "\u5168\u5C4F\u6A21\u5F0F",
4737
+ "pptx.ribbon.display.tabs": "\u4EC5\u663E\u793A\u9009\u9879\u5361",
4738
+ "pptx.ribbon.display.always": "\u59CB\u7EC8\u663E\u793A\u529F\u80FD\u533A",
4739
+ "pptx.ribbon.showRibbon": "\u663E\u793A\u529F\u80FD\u533A",
4735
4740
  "pptx.ribbon.open": "\u6253\u5F00",
4736
4741
  "pptx.ribbon.openAnotherPresentation": "\u6253\u5F00\u53E6\u4E00\u4E2A\u6F14\u793A\u6587\u7A3F",
4737
4742
  "pptx.ribbon.saveAsPptx": "\u53E6\u5B58\u4E3A .pptx",
Binary file
Binary file
package/dist/index.d.ts CHANGED
@@ -1,9 +1,9 @@
1
+ import * as ooxml_ui_pptx from 'ooxml-ui/pptx';
2
+ import { CollaborationRole, CollaborationConfig, ViewportFitOptions, ViewerFontSource, CanvasSize, DocumentStorage, CloudFileProvider, ViewerAutosaveStatus, AutosaveRecord, ConnectionStatus, ViewerTheme, ThemeCatalogEntry, AccountAuthConfig, CollaborationInput, GoogleFontsOption, ListConversionScope, ToolbarActionId, RibbonAddInTab, ViewerCustomization, PptxLoadLimits, PowerPointViewerAPI, ViewerCustomizationApi, CollaborationLivePatcher, InlineListReadResult, EditorImagePasteOptions, ViewerMode, RulerUnit, ElementAnimationState, ShapeAdjustmentHandleDescriptor, InlineTextEditSnapshot, ZoomNavigationTarget, FieldSubstitutionContext, EditPointsCommandId, EditPointsElementPatch, FreeformToolKind, RibbonDisplayController, ElementClipboardPayload, AnimationApplyGroup, InsertChartKind, ChangeCaseMode, SlideTemplateId, ReviewCommentsHost, UseViewerBuildingBlocksActionsOptions, SlidesPaneLayoutGalleryRequest, CollaborationShellState, PptxAutosaveStatus, ViewerBuildingBlockActions } from 'ooxml-ui/pptx';
3
+ export { AVATAR_COLOR_SWATCHES, AccountAuthConfig, BACKSTAGE_CARD_IDS, BACKSTAGE_PAGE_IDS, BackstageCustomization, BuildingBlockActionId, BuildingBlockActionState, BuildingBlockFailureCode, BuildingBlockFindReplace, BuildingBlockLayoutActions, BuildingBlockRequest, BuildingBlockResult, CANVAS_CONTEXT_MENU_COMMAND_IDS, CollaborationConfig, CollaborationShellState, ContextMenuCustomization, DEFAULT_VIEWER_PROFILE, DocumentPropertiesActions, DocumentPropertiesPatch, EDITOR_SHORTCUT_ACTION_IDS, ELEMENT_CONTEXT_MENU_COMMAND_IDS, ElementUpdate, ElementUpdateOptions, ExternalCollaborationAwareness, ExternalCollaborationSession, ExternalCollaborationSnapshot, FontEmbeddingActions, HostCanvasMenuContext, HostElementMenuContext, HostFileLimits, HostMenuCommand, HostSignatureInfo, KeyboardCustomization, ListConversionScope, LocalStorageUsageSummary, OPTIONS_PAGE_IDS, OPTIONS_SECTION_IDS, OPTIONS_SETTING_IDS, OptionsCustomization, OptionsPageId, OptionsSectionId, OptionsSettingId, OptionsSettingValues, PPTX_OPEN_ACCEPT, PRESENTATION_OPEN_EXTENSIONS, PasswordProtectionActions, PowerPointViewerAPI, RIBBON_TAB_IDS, ResolvedCustomization, RibbonCustomization, SLIDE_TEMPLATES, SavedPresentationFormat, ShortcutChord, SignatureActions, SlideTemplateId, SlideTemplateSpec, SlidesPaneLayoutGalleryRequest, StoredViewerPrefs, THEME_CATALOG, TOOLBAR_BUTTON_IDS, ThemeCatalogEntry, ToolbarActionId, ToolbarButtonId, ToolbarTabId, VIEWER_DIALOG_IDS, VIEWER_EXPORT_FORMAT_IDS, VIEWER_FEATURE_IDS, VIEWER_PANEL_IDS, VIEWER_PREFS_STORAGE_KEY, ViewerBuildingBlockActions, ViewerCustomization, ViewerCustomizationApi, ViewerDialogId, ViewerExportFormatId, ViewerFeatureId, ViewerMode, ViewerPanelId, ViewerProfile, ViewerTheme, ViewerThemeColors, ViewportFitOptions, ViewportFitPadding, buildSlideTemplateContent, buildSlideTemplateSlide, clearAllLocalViewerData, clearStoredViewerPrefs, createImageElementFromFile, defaultCssVars, defaultRadius, defaultThemeColors, describeCollaborationShellState, getLocalStorageUsageSummary, isLegacyBinaryPresentation, isSupportedPresentationFile, presentationBaseName, readStoredViewerPrefs, resolveProfileInitial, resolveThemeCatalogEntry, saveViewerProfile, savedPresentationFileName, themeToCssVars, vermilionDarkColors, vermilionDarkTheme, vermilionLightColors, vermilionLightTheme, vermilionRadius, writeStoredViewerPrefs } from 'ooxml-ui/pptx';
1
4
  import * as React$1 from 'react';
2
5
  import React$1__default, { ReactNode, ReactElement } from 'react';
3
- import * as ooxml_ui_pptx from 'ooxml-ui/pptx';
4
- import { CollaborationRole, CollaborationConfig, ViewportFitOptions, ViewerFontSource, CanvasSize, DocumentStorage, CloudFileProvider, ViewerAutosaveStatus, AutosaveRecord, ConnectionStatus, ViewerTheme, ThemeCatalogEntry, AccountAuthConfig, CollaborationInput, GoogleFontsOption, ListConversionScope, ToolbarActionId, RibbonAddInTab, ViewerCustomization, PptxLoadLimits, PowerPointViewerAPI, ViewerCustomizationApi, CollaborationLivePatcher, InlineListReadResult, EditorImagePasteOptions, ViewerMode, RulerUnit, ElementAnimationState, ShapeAdjustmentHandleDescriptor, InlineTextEditSnapshot, ZoomNavigationTarget, FieldSubstitutionContext, EditPointsCommandId, EditPointsElementPatch, FreeformToolKind, ElementClipboardPayload, AnimationApplyGroup, InsertChartKind, ChangeCaseMode, SlideTemplateId, ReviewCommentsHost, SlidesPaneLayoutGalleryRequest, CollaborationShellState, PptxAutosaveStatus } from 'ooxml-ui/pptx';
5
- export { AVATAR_COLOR_SWATCHES, AccountAuthConfig, BACKSTAGE_CARD_IDS, BACKSTAGE_PAGE_IDS, BackstageCustomization, CANVAS_CONTEXT_MENU_COMMAND_IDS, CollaborationConfig, CollaborationShellState, ContextMenuCustomization, DEFAULT_VIEWER_PROFILE, EDITOR_SHORTCUT_ACTION_IDS, ELEMENT_CONTEXT_MENU_COMMAND_IDS, ElementUpdate, ElementUpdateOptions, ExternalCollaborationAwareness, ExternalCollaborationSession, ExternalCollaborationSnapshot, HostCanvasMenuContext, HostElementMenuContext, HostMenuCommand, KeyboardCustomization, ListConversionScope, LocalStorageUsageSummary, OPTIONS_PAGE_IDS, OPTIONS_SECTION_IDS, OPTIONS_SETTING_IDS, OptionsCustomization, OptionsPageId, OptionsSectionId, OptionsSettingId, OptionsSettingValues, PPTX_OPEN_ACCEPT, PRESENTATION_OPEN_EXTENSIONS, PowerPointViewerAPI, RIBBON_TAB_IDS, ResolvedCustomization, RibbonCustomization, SLIDE_TEMPLATES, SavedPresentationFormat, ShortcutChord, SlideTemplateId, SlideTemplateSpec, SlidesPaneLayoutGalleryRequest, StoredViewerPrefs, THEME_CATALOG, TOOLBAR_BUTTON_IDS, ThemeCatalogEntry, ToolbarActionId, ToolbarButtonId, ToolbarTabId, VIEWER_DIALOG_IDS, VIEWER_EXPORT_FORMAT_IDS, VIEWER_FEATURE_IDS, VIEWER_PANEL_IDS, VIEWER_PREFS_STORAGE_KEY, ViewerCustomization, ViewerCustomizationApi, ViewerDialogId, ViewerExportFormatId, ViewerFeatureId, ViewerMode, ViewerPanelId, ViewerProfile, ViewerTheme, ViewerThemeColors, ViewportFitOptions, ViewportFitPadding, buildSlideTemplateContent, buildSlideTemplateSlide, clearAllLocalViewerData, clearStoredViewerPrefs, createImageElementFromFile, defaultCssVars, defaultRadius, defaultThemeColors, describeCollaborationShellState, getLocalStorageUsageSummary, isLegacyBinaryPresentation, isSupportedPresentationFile, presentationBaseName, readStoredViewerPrefs, resolveProfileInitial, resolveThemeCatalogEntry, saveViewerProfile, savedPresentationFileName, themeToCssVars, vermilionDarkColors, vermilionDarkTheme, vermilionLightColors, vermilionLightTheme, vermilionRadius, writeStoredViewerPrefs } from 'ooxml-ui/pptx';
6
- import { PptxCoreProperties, PptxAnimationPreset, PptxNativeAnimation, PptxSlide, PptxElement, TextStyle, InkPptxElement, ShapePptxElement, PptxAction, PptxComment, PptxElementAnimation, ConnectorPptxElement, ParsedTableStyleMap, PptxTheme, ShapeStyle, PptxLayoutOption, PptxLayoutPreview, PptxCustomShow, PptxSlideTransition, PptxPresentationProperties } from 'ooxml-core/pptx';
6
+ import { PptxCoreProperties, PptxAnimationPreset, PptxNativeAnimation, PptxElement, PptxSlide, TextStyle, InkPptxElement, ShapePptxElement, PptxAction, PptxComment, PptxElementAnimation, ConnectorPptxElement, ParsedTableStyleMap, PptxTheme, ShapeStyle, PptxLayoutOption, PptxLayoutPreview, PptxCustomShow, PptxSlideTransition, PptxPresentationProperties } from 'ooxml-core/pptx';
7
7
  import { CollaborationWriteBackState, CollaborationState } from 'ooxml-core/collab';
8
8
  export { CollaborationState } from 'ooxml-core/collab';
9
9
  import { PptxAiConfig } from 'ooxml-ui/pptx/ai';
@@ -15,6 +15,18 @@ export { LOCALE_CATALOG, LocaleCatalogEntry } from 'ooxml-ui/pptx/i18n';
15
15
  import { Doc } from 'yjs';
16
16
  import { Options } from 'html2canvas-pro';
17
17
 
18
+ /** What the viewer passes `translate`: exactly the params of the call. */
19
+ interface PptxTranslateParams {
20
+ readonly defaultValue?: string;
21
+ readonly count?: number;
22
+ readonly [name: string]: unknown;
23
+ }
24
+ /**
25
+ * A host translator for {@link PptxI18nProvider}: the text for a viewer key (`pptx.*`) in the
26
+ * host's active language. Return the key itself, an empty string, `null` or `undefined` for "no
27
+ * translation": the viewer then shows its built-in English text.
28
+ */
29
+ type PptxTranslate = (key: string, params?: PptxTranslateParams) => string | null | undefined;
18
30
  /**
19
31
  * Union of all shape preset types that the viewer can insert or render.
20
32
  * Maps to OOXML `a:prstGeom` preset values (e.g. "rect", "ellipse").
@@ -182,6 +194,19 @@ interface PowerPointViewerProps extends ViewportFitOptions {
182
194
  onModeChange?: (mode: ooxml_ui_pptx.ViewerMode) => void;
183
195
  /** Callback when the zoom level changes. */
184
196
  onZoomChange?: (zoom: number) => void;
197
+ /**
198
+ * Ribbon Display Options, the starting mode: `always` docks the tabs and commands above the
199
+ * slide (the default), `tabs` shows only the tab row (a chosen tab lays its commands over the
200
+ * slide until a press elsewhere or Escape), `fullScreen` hides the title bar and the ribbon
201
+ * until the strip at the top is pressed. Changing it later applies the mode without calling
202
+ * `onRibbonDisplayChange`.
203
+ */
204
+ ribbonDisplay?: ooxml_ui_pptx.RibbonDisplayMode;
205
+ /**
206
+ * Called when the user picks a Ribbon Display Option (the menu, Ctrl+F1, a double click on a
207
+ * tab). Not called when the host changes `ribbonDisplay`.
208
+ */
209
+ onRibbonDisplayChange?: (mode: ooxml_ui_pptx.RibbonDisplayMode) => void;
185
210
  /** Callback when element selection changes. */
186
211
  onSelectionChange?: (elementIds: string[]) => void;
187
212
  /** Callback when the total slide count changes (slide added/deleted). */
@@ -319,19 +344,25 @@ interface PowerPointViewerProps extends ViewportFitOptions {
319
344
  /**
320
345
  * Initial locale code for File > Options > Language. Falls back to a persisted `localStorage`
321
346
  * choice, then `'en'`. Ignored inside a `PptxI18nProvider`, whose `locale` is the language.
347
+ * Without a provider it applies only while the viewer reads a configured react-i18next
348
+ * instance; with neither (for example `pptx-react-viewer/no-i18next` on its own) the viewer
349
+ * shows its built-in English text and ignores it.
322
350
  */
323
351
  defaultLocale?: string;
324
352
  /**
325
- * Locale choices offered by File > Options > Language. Defaults to the codes registered on the
326
- * host's `react-i18next` instance. Inside a `PptxI18nProvider` there is no default: pass two or
327
- * more, together with `onLocaleChange`, to show the Language category.
353
+ * Locale choices offered by File > Options > Language. Without a provider they default to the
354
+ * codes registered on the host's `react-i18next` instance, and have no effect when the viewer
355
+ * reads no configured instance (see `defaultLocale`). Inside a `PptxI18nProvider` there is no
356
+ * default: pass two or more, together with `onLocaleChange`, to show the Language category.
328
357
  */
329
358
  availableLocales?: LocaleCatalogEntry[];
330
359
  /**
331
360
  * Called when the user picks a language from File > Options > Language. When provided, the
332
361
  * host owns applying and persisting the choice; otherwise the viewer applies and persists it
333
362
  * itself. Inside a `PptxI18nProvider` the host always owns the language: without this callback
334
- * the Language category is left out.
363
+ * the Language category is left out. Without a provider, when the viewer reads no configured
364
+ * react-i18next instance (see `defaultLocale`), the Language category is left out and this is
365
+ * never called.
335
366
  */
336
367
  onLocaleChange?: (code: string) => void;
337
368
  /**
@@ -607,18 +638,6 @@ declare function getAnimationInitialStyle(preset: PptxAnimationPreset | undefine
607
638
  * access (e.g. serialising the current content for saving).
608
639
  */
609
640
  declare const PowerPointViewer: React$1.ForwardRefExoticComponent<PowerPointViewerProps & React$1.RefAttributes<PowerPointViewerHandle>>;
610
- /** What the viewer passes `translate`: exactly the params of the call. */
611
- interface PptxTranslateParams {
612
- readonly defaultValue?: string;
613
- readonly count?: number;
614
- readonly [name: string]: unknown;
615
- }
616
- /**
617
- * A host translator for {@link PptxI18nProvider}: the text for a viewer key (`pptx.*`) in the
618
- * host's active language. Return the key itself, an empty string, `null` or `undefined` for "no
619
- * translation": the viewer then shows its built-in English text.
620
- */
621
- type PptxTranslate = (key: string, params?: PptxTranslateParams) => string | null | undefined;
622
641
  interface PptxI18nProviderProps {
623
642
  /**
624
643
  * Translates a viewer key; see {@link PptxTranslate}. Keep it referentially stable (a
@@ -656,6 +675,11 @@ interface ToolbarProps {
656
675
  isProtectedView?: boolean;
657
676
  /** Drops the Protected View override for this session. Only offered when `isProtectedView` is true. */
658
677
  onEnableEditing?: () => void;
678
+ /**
679
+ * The viewer's Ribbon Display Options controller. Optional: a ribbon rendered on its own
680
+ * stays in the default "always" mode.
681
+ */
682
+ ribbonDisplay?: RibbonDisplayController;
659
683
  isNarrowViewport: boolean;
660
684
  isSidebarCollapsed: boolean;
661
685
  isInspectorPaneOpen: boolean;
@@ -927,6 +951,13 @@ interface TableStyleContext {
927
951
  tableStyleMap?: ParsedTableStyleMap;
928
952
  theme?: PptxTheme;
929
953
  }
954
+ /** Identifies the element omitted after a React client render or lifecycle error. */
955
+ interface ElementRenderErrorContext {
956
+ elementId: string;
957
+ elementType: PptxElement['type'];
958
+ slideId?: string;
959
+ }
960
+ type ElementRenderErrorHandler = (error: Error, context: ElementRenderErrorContext) => void;
930
961
  /** Wiring for Edit Points and the Freeform: Shape / Curve tools. */
931
962
  interface OutlineAuthoringProps {
932
963
  /** The shape in Edit Points mode, or null. */
@@ -951,6 +982,8 @@ interface ZoomViewport {
951
982
  editorScale: number;
952
983
  }
953
984
  interface SlideCanvasProps {
985
+ /** Reports an element omitted after a React render/lifecycle error; defaults to console.error. */
986
+ onElementRenderError?: ElementRenderErrorHandler;
954
987
  /** The viewer-owned live channel; absent for static/custom non-collaborative canvases. */
955
988
  livePatcher?: CollaborationLivePatcher;
956
989
  registerInlineEditReader?: (elementId: string, read: () => InlineListReadResult) => () => void;
@@ -1091,6 +1124,8 @@ interface SlideCanvasProps {
1091
1124
  outlineAuthoring?: OutlineAuthoringProps;
1092
1125
  }
1093
1126
  interface SlidesPaneSidebarProps {
1127
+ /** Reports an element omitted from a thumbnail; defaults to console.error. */
1128
+ onElementRenderError?: ElementRenderErrorHandler;
1094
1129
  slides: PptxSlide[];
1095
1130
  templateElementsBySlideId: Record<string, PptxElement[]>;
1096
1131
  activeSlideIndex: number;
@@ -1133,7 +1168,9 @@ interface SlidesPaneSidebarProps {
1133
1168
  }
1134
1169
  /** The one autosave status every binding renders (`PptxAutosaveStatus` in `ooxml-ui/pptx`). */
1135
1170
  type AutosaveStatus = PptxAutosaveStatus;
1136
- interface UseViewerBuildingBlocksInput extends ViewportFitOptions {
1171
+ interface UseViewerBuildingBlocksInput extends ViewportFitOptions, UseViewerBuildingBlocksActionsOptions {
1172
+ /** Reports an element omitted after a React render/lifecycle error; defaults to console.error. */
1173
+ onElementRenderError?: ElementRenderErrorHandler;
1137
1174
  /** Optional collaboration, including a host-owned document and presence session. */
1138
1175
  collaboration?: CollaborationInput;
1139
1176
  /** PPTX content as ArrayBuffer/Uint8Array, or null/undefined while no file is loaded. */
@@ -1220,7 +1257,11 @@ interface ViewerBuildingBlocksResult {
1220
1257
  * Its open state is the toolbar's sidebar toggle.
1221
1258
  */
1222
1259
  slidesPaneProps: SlidesPaneSidebarProps;
1223
- /** Current viewer mode (edit, view, present, master). */
1260
+ /**
1261
+ * The effective mode, as every binding's building blocks report it: `preview` while the blocks
1262
+ * may not edit (no `canEdit`, a collaboration viewer role), otherwise the viewer's mode (`edit`,
1263
+ * `present`, `master`). `toolbarProps.mode` and `canvasProps.mode` keep the viewer's own mode.
1264
+ */
1224
1265
  mode: ViewerMode;
1225
1266
  /** True while the initial parse of `content` is in progress. */
1226
1267
  loading: boolean;
@@ -1228,18 +1269,26 @@ interface ViewerBuildingBlocksResult {
1228
1269
  error: string | null;
1229
1270
  /** Current autosave-to-localStorage recovery status. */
1230
1271
  autosaveStatus: AutosaveStatus;
1272
+ /**
1273
+ * Operations and state for finishing picker, dialog and layout workflows from host-rendered
1274
+ * controls: image / media insertion, hyperlink, SmartArt and equation editing, Find / Replace
1275
+ * and layout apply / reset, plus which actions can run now. See `docs/react/hooks.md`.
1276
+ */
1277
+ actions: ViewerBuildingBlockActions;
1231
1278
  }
1232
1279
  declare function useViewerBuildingBlocks(input: UseViewerBuildingBlocksInput): ViewerBuildingBlocksResult;
1233
1280
 
1234
1281
  declare function Toolbar(p: ToolbarProps): React$1__default.ReactElement;
1235
1282
  declare function SlideCanvas(props: SlideCanvasProps): React$1.JSX.Element;
1236
- declare function SlidesPaneSidebar({ slides, templateElementsBySlideId, activeSlideIndex, canvasSize, sectionGroups, isOpen, canEdit, onSelectSlide, onSlideContextMenu, onMoveSlide, onAddSlide, onAddSlideAfter, onDuplicateSlides, onDeleteSlides, onHideSlides, onOpenLayoutForSlide, onCollapse: _onCollapse, onAddSection, onRenameSection, onDeleteSection, onMoveSectionUp, onMoveSectionDown, onToggleSectionCollapse, rehearsalTimings, panelWidth, fieldContext, tableStyleContext }: SlidesPaneSidebarProps): React$1__default.ReactElement | null;
1283
+ declare function SlidesPaneSidebar(props: SlidesPaneSidebarProps): React$1__default.ReactElement;
1237
1284
  /**
1238
1285
  * A static, scaled-down drawing of one slide, as the slides pane shows it. It renders from the
1239
1286
  * slide model, so it follows unsaved edits. Feed it from `slidesPaneProps`:
1240
1287
  * `templateElementsBySlideId[slide.id]`, `canvasSize`, `fieldContext` and `tableStyleContext`.
1241
1288
  */
1242
1289
  interface SlideThumbnailProps {
1290
+ /** Reports an element omitted from this preview; defaults to console.error. */
1291
+ onElementRenderError?: ElementRenderErrorHandler;
1243
1292
  /** The slide to draw. A different slide object (every edit makes one) redraws it. */
1244
1293
  slide: PptxSlide;
1245
1294
  /** The slide's inherited layout and master elements, drawn beneath its own. */
@@ -1255,7 +1304,7 @@ interface SlideThumbnailProps {
1255
1304
  /** Theme + table style map for resolving table band/header colours. */
1256
1305
  tableStyleContext?: TableStyleContext;
1257
1306
  }
1258
- declare function SlideThumbnailImpl({ slide, templateElements, canvasSize, previewWidth, fieldContext, tableStyleContext }: SlideThumbnailProps): React$1__default.ReactElement;
1307
+ declare function SlideThumbnailImpl({ slide, templateElements, canvasSize, previewWidth, fieldContext, tableStyleContext, onElementRenderError }: SlideThumbnailProps): React$1__default.ReactElement;
1259
1308
  declare const SlideThumbnail: React$1__default.MemoExoticComponent<typeof SlideThumbnailImpl>;
1260
1309
  interface SlideTemplateGalleryDialogProps {
1261
1310
  isOpen: boolean;
@@ -1266,11 +1315,12 @@ interface SlideTemplateGalleryDialogProps {
1266
1315
  }
1267
1316
  declare function SlideTemplateGalleryDialog({ isOpen, onClose, onInsert, scheme }: SlideTemplateGalleryDialogProps): React$1__default.ReactElement | null;
1268
1317
  interface SlideTemplatePreviewProps {
1318
+ onElementRenderError?: ElementRenderErrorHandler;
1269
1319
  templateId: SlideTemplateId;
1270
1320
  /** Optional deck scheme so the preview shows the deck's theme colours. */
1271
1321
  scheme?: Record<string, string>;
1272
1322
  }
1273
- declare function SlideTemplatePreview({ templateId, scheme }: SlideTemplatePreviewProps): React$1__default.ReactElement;
1323
+ declare function SlideTemplatePreview({ templateId, scheme, onElementRenderError }: SlideTemplatePreviewProps): React$1__default.ReactElement;
1274
1324
  /**
1275
1325
  * A drop-in replacement for `html2canvas(element, options)` that first
1276
1326
  * resolves any oklch / oklab / lch / lab / color() values in the cloned
@@ -1290,4 +1340,4 @@ declare function SlideTemplatePreview({ templateId, scheme }: SlideTemplatePrevi
1290
1340
  declare function renderToCanvas(element: HTMLElement, options?: Partial<Options>): Promise<HTMLCanvasElement>;
1291
1341
 
1292
1342
  export { PowerPointViewer, PptxI18nProvider, SlideCanvas, SlideTemplateGalleryDialog, SlideTemplatePreview, SlideThumbnail, SlidesPaneSidebar as SlidesPane, Toolbar, ViewerThemeProvider, getAnimationInitialStyle, renderToCanvas, useViewerBuildingBlocks, useViewerTheme };
1293
- export type { CollaborationContextValue, PowerPointViewerHandle, PowerPointViewerProps, PptxI18nProviderProps, PptxTranslate, PptxTranslateParams, SlideCanvasProps, SlideTemplateGalleryDialogProps, SlideTemplatePreviewProps, SlideThumbnailProps, SlidesPaneSidebarProps as SlidesPaneProps, ToolbarProps, UseViewerBuildingBlocksInput, ViewerBuildingBlocksResult, ViewerLoadDetail };
1343
+ export type { CollaborationContextValue, ElementRenderErrorContext, ElementRenderErrorHandler, PowerPointViewerHandle, PowerPointViewerProps, PptxI18nProviderProps, PptxTranslate, PptxTranslateParams, SlideCanvasProps, SlideTemplateGalleryDialogProps, SlideTemplatePreviewProps, SlideThumbnailProps, SlidesPaneSidebarProps as SlidesPaneProps, ToolbarProps, UseViewerBuildingBlocksInput, ViewerBuildingBlocksResult, ViewerLoadDetail };