pptx-react-viewer 4.14.0 → 4.16.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 +27 -0
  2. package/dist/{AiChatPanel-WQUOEVQB.mjs → AiChatPanel-5Z4BYP7S.mjs} +4 -4
  3. package/dist/AiChatPanel-5Z4BYP7S.mjs.br +0 -0
  4. package/dist/AiChatPanel-5Z4BYP7S.mjs.gz +0 -0
  5. package/dist/{AiChatPanel-PULXQTFJ.js → AiChatPanel-DHLJ6LKF.js} +28 -28
  6. package/dist/AiChatPanel-DHLJ6LKF.js.br +0 -0
  7. package/dist/AiChatPanel-DHLJ6LKF.js.gz +0 -0
  8. package/dist/{Model3DScene-6MYHPE5N.js → Model3DScene-AXT5KCUX.js} +2 -2
  9. package/dist/Model3DScene-AXT5KCUX.js.br +0 -0
  10. package/dist/Model3DScene-AXT5KCUX.js.gz +0 -0
  11. package/dist/{Model3DScene-HZG33BWN.mjs → Model3DScene-N36X5Z2Z.mjs} +1 -1
  12. package/dist/Model3DScene-N36X5Z2Z.mjs.br +0 -0
  13. package/dist/Model3DScene-N36X5Z2Z.mjs.gz +0 -0
  14. package/dist/{chunk-WSYKEPW6.mjs → chunk-BTTAYCGK.mjs} +904 -1201
  15. package/dist/chunk-BTTAYCGK.mjs.br +0 -0
  16. package/dist/chunk-BTTAYCGK.mjs.gz +0 -0
  17. package/dist/{chunk-E6VYR3GM.js → chunk-BZNYI5U6.js} +866 -820
  18. package/dist/chunk-BZNYI5U6.js.br +0 -0
  19. package/dist/chunk-BZNYI5U6.js.gz +0 -0
  20. package/dist/{chunk-55OLQ7HS.mjs → chunk-CJSIEITL.mjs} +3 -0
  21. package/dist/chunk-CJSIEITL.mjs.br +0 -0
  22. package/dist/chunk-CJSIEITL.mjs.gz +0 -0
  23. package/dist/{chunk-XWO367ZG.js → chunk-FVLBN45Z.js} +5 -5
  24. package/dist/chunk-FVLBN45Z.js.br +0 -0
  25. package/dist/chunk-FVLBN45Z.js.gz +0 -0
  26. package/dist/{chunk-AJTFPTSN.mjs → chunk-MFGRRONU.mjs} +2 -2
  27. package/dist/chunk-MFGRRONU.mjs.br +0 -0
  28. package/dist/chunk-MFGRRONU.mjs.gz +0 -0
  29. package/dist/{chunk-UWVRB4Z5.mjs → chunk-MJ6LTUJ3.mjs} +3437 -1237
  30. package/dist/chunk-MJ6LTUJ3.mjs.br +0 -0
  31. package/dist/chunk-MJ6LTUJ3.mjs.gz +0 -0
  32. package/dist/{chunk-DI4YTG3J.js → chunk-QAVJDYB2.js} +197 -197
  33. package/dist/chunk-QAVJDYB2.js.br +0 -0
  34. package/dist/chunk-QAVJDYB2.js.gz +0 -0
  35. package/dist/{chunk-EPMT65EN.mjs → chunk-QLUA63T3.mjs} +54 -9
  36. package/dist/chunk-QLUA63T3.mjs.br +0 -0
  37. package/dist/chunk-QLUA63T3.mjs.gz +0 -0
  38. package/dist/{chunk-RK5UV5HL.js → chunk-UVK2WBCU.js} +2047 -2344
  39. package/dist/chunk-UVK2WBCU.js.br +0 -0
  40. package/dist/chunk-UVK2WBCU.js.gz +0 -0
  41. package/dist/{chunk-ECKXYCP3.mjs → chunk-WRQ7K3DG.mjs} +1 -1
  42. package/dist/chunk-WRQ7K3DG.mjs.br +0 -0
  43. package/dist/chunk-WRQ7K3DG.mjs.gz +0 -0
  44. package/dist/{chunk-HIYK7HPX.js → chunk-XEYB25ZT.js} +3 -0
  45. package/dist/chunk-XEYB25ZT.js.br +0 -0
  46. package/dist/chunk-XEYB25ZT.js.gz +0 -0
  47. package/dist/{chunk-6ZR27XTL.js → chunk-XZUIS3VB.js} +3454 -1242
  48. package/dist/chunk-XZUIS3VB.js.br +0 -0
  49. package/dist/chunk-XZUIS3VB.js.gz +0 -0
  50. package/dist/i18n/de.cjs +3 -0
  51. package/dist/i18n/de.cjs.br +0 -0
  52. package/dist/i18n/de.cjs.gz +0 -0
  53. package/dist/i18n/de.mjs +3 -0
  54. package/dist/i18n/de.mjs.br +0 -0
  55. package/dist/i18n/de.mjs.gz +0 -0
  56. package/dist/i18n/es.cjs +3 -0
  57. package/dist/i18n/es.cjs.br +0 -0
  58. package/dist/i18n/es.cjs.gz +0 -0
  59. package/dist/i18n/es.mjs +3 -0
  60. package/dist/i18n/es.mjs.br +0 -0
  61. package/dist/i18n/es.mjs.gz +0 -0
  62. package/dist/i18n/fr.cjs +3 -0
  63. package/dist/i18n/fr.cjs.br +0 -0
  64. package/dist/i18n/fr.cjs.gz +0 -0
  65. package/dist/i18n/fr.mjs +3 -0
  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 +3 -0
  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 +3 -0
  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 +329 -267
  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 +643 -573
  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 +196 -136
  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 +2 -2
  105. package/dist/AiChatPanel-PULXQTFJ.js.br +0 -0
  106. package/dist/AiChatPanel-PULXQTFJ.js.gz +0 -0
  107. package/dist/AiChatPanel-WQUOEVQB.mjs.br +0 -0
  108. package/dist/AiChatPanel-WQUOEVQB.mjs.gz +0 -0
  109. package/dist/Model3DScene-6MYHPE5N.js.br +0 -0
  110. package/dist/Model3DScene-6MYHPE5N.js.gz +0 -0
  111. package/dist/Model3DScene-HZG33BWN.mjs.br +0 -0
  112. package/dist/Model3DScene-HZG33BWN.mjs.gz +0 -0
  113. package/dist/chunk-55OLQ7HS.mjs.br +0 -0
  114. package/dist/chunk-55OLQ7HS.mjs.gz +0 -0
  115. package/dist/chunk-6ZR27XTL.js.br +0 -0
  116. package/dist/chunk-6ZR27XTL.js.gz +0 -0
  117. package/dist/chunk-AJTFPTSN.mjs.br +0 -0
  118. package/dist/chunk-AJTFPTSN.mjs.gz +0 -0
  119. package/dist/chunk-DI4YTG3J.js.br +0 -0
  120. package/dist/chunk-DI4YTG3J.js.gz +0 -0
  121. package/dist/chunk-E6VYR3GM.js.br +0 -0
  122. package/dist/chunk-E6VYR3GM.js.gz +0 -0
  123. package/dist/chunk-ECKXYCP3.mjs.br +0 -0
  124. package/dist/chunk-ECKXYCP3.mjs.gz +0 -0
  125. package/dist/chunk-EPMT65EN.mjs.br +0 -0
  126. package/dist/chunk-EPMT65EN.mjs.gz +0 -0
  127. package/dist/chunk-HIYK7HPX.js.br +0 -0
  128. package/dist/chunk-HIYK7HPX.js.gz +0 -0
  129. package/dist/chunk-RK5UV5HL.js.br +0 -0
  130. package/dist/chunk-RK5UV5HL.js.gz +0 -0
  131. package/dist/chunk-UWVRB4Z5.mjs.br +0 -0
  132. package/dist/chunk-UWVRB4Z5.mjs.gz +0 -0
  133. package/dist/chunk-WSYKEPW6.mjs.br +0 -0
  134. package/dist/chunk-WSYKEPW6.mjs.gz +0 -0
  135. package/dist/chunk-XWO367ZG.js.br +0 -0
  136. package/dist/chunk-XWO367ZG.js.gz +0 -0
@@ -12611,121 +12611,6 @@ interface ShapeAdjustmentDragState {
12611
12611
  */
12612
12612
  startAdjustments?: Record<string, number>;
12613
12613
  }
12614
- /**
12615
- * A font supplied by the host application. The package never ships fonts:
12616
- * applications provide a licensed URL, data URL, or blob URL for their users.
12617
- */
12618
- interface ViewerFontSource {
12619
- family: string;
12620
- src: string;
12621
- format?: 'truetype' | 'opentype' | 'woff' | 'woff2';
12622
- weight?: string | number;
12623
- style?: 'normal' | 'italic';
12624
- }
12625
- //#endregion
12626
- //#region src/render/session-restore.d.ts
12627
- /**
12628
- * session-restore: keep the deck a host app has open across a page refresh.
12629
- *
12630
- * A host (the demo apps, or any embedder) owns the bytes it hands to the
12631
- * viewer, so a plain reload drops them and the user lands back on the file
12632
- * dropzone with their presentation gone. This store remembers the open deck in
12633
- * IndexedDB and hands it back on the next load.
12634
- *
12635
- * Scope is deliberately per-tab: the record is keyed by an id kept in
12636
- * `sessionStorage`, which survives a reload but NOT a new tab. Refreshing
12637
- * restores the deck this tab had open, while a second tab opened on the same
12638
- * origin still starts on the landing page, and two tabs holding different decks
12639
- * never steal each other's content.
12640
- *
12641
- * `restoreSessionDeck` additionally prefers a NEWER autosave snapshot for the
12642
- * same file (see `./autosave-store`), so a refresh mid-edit comes back with the
12643
- * edited deck rather than the pristine bytes that were first opened.
12644
- *
12645
- * Every operation is best-effort: a blocked IndexedDB, a partitioned
12646
- * `sessionStorage`, or an exhausted quota degrades to "no restore", never to a
12647
- * thrown error in the host.
12648
- */
12649
- /** A deck remembered for the current tab. */
12650
- interface SessionDeck {
12651
- /** File name the deck was opened under, used as the autosave key. */
12652
- fileName: string;
12653
- /** The presentation bytes. */
12654
- data: Uint8Array;
12655
- /** When these bytes were remembered (epoch ms). */
12656
- timestamp: number;
12657
- }
12658
- /**
12659
- * This tab's session id, or `null` when `sessionStorage` is unavailable (a
12660
- * sandboxed iframe, or a browser with storage disabled).
12661
- *
12662
- * @param create Mint and persist an id when the tab does not have one yet.
12663
- * Reads pass `false` so a fresh tab never claims another tab's record.
12664
- */
12665
- declare function getSessionTabId(create?: boolean): string | null;
12666
- /**
12667
- * Remember `data` as the deck this tab has open, so the next load can restore
12668
- * it. Resolves `false` when the browser refused to store it; callers treat that
12669
- * as "no restore available later", never as an error.
12670
- */
12671
- declare function rememberSessionDeck(fileName: string, data: Uint8Array): Promise<boolean>;
12672
- /** The deck remembered for this tab, or `null` when there is nothing to restore. */
12673
- declare function loadSessionDeck(): Promise<SessionDeck | null>;
12674
- /** Forget this tab's deck (the host closed it, or handed the tab to another flow). */
12675
- declare function forgetSessionDeck(): Promise<void>;
12676
- /**
12677
- * The deck to reopen on load: this tab's remembered bytes, upgraded to a newer
12678
- * autosave snapshot of the same file when the viewer wrote one after they were
12679
- * remembered. Without that upgrade a refresh mid-edit would silently roll the
12680
- * presentation back to the state it was opened in.
12681
- */
12682
- declare function restoreSessionDeck(): Promise<SessionDeck | null>;
12683
- /**
12684
- * Store PPTX content bytes so the audience tab can retrieve them.
12685
- * Called by the presenter before opening the audience window.
12686
- */
12687
- declare function storeAudienceContent(content: ArrayBuffer | Uint8Array, sessionId?: string): Promise<void>;
12688
- /**
12689
- * Load PPTX content bytes stored by the presenter tab.
12690
- * Returns `null` if nothing is stored.
12691
- */
12692
- declare function loadAudienceContent(sessionId?: string): Promise<Uint8Array | null>;
12693
- /**
12694
- * Remove stored audience content (cleanup).
12695
- */
12696
- declare function clearAudienceContent(sessionId?: string): Promise<void>;
12697
- //#endregion
12698
- //#region src/render/editor-keymap.d.ts
12699
- /** A logical editor command produced by one key press. */
12700
- 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';
12701
- //#endregion
12702
- //#region src/render/merge-shapes/merge-shapes-menu.d.ts
12703
- /** The right-click command id for each operation. */
12704
- type MergeShapesCommandId = 'merge-union' | 'merge-combine' | 'merge-fragment' | 'merge-intersect' | 'merge-subtract';
12705
- /** Every command a canvas context menu can offer, in no particular order. */
12706
- type ContextMenuCommandId = 'copy' | 'cut' | 'paste' | 'duplicate' | 'edit-text' | 'edit-points' | 'bring-forward' | 'send-backward' | 'bring-front' | 'send-back' | 'ai-ask' | 'ai-fix' | 'comment' | 'hyperlink' | 'table-insert-row-above' | 'table-insert-row-below' | 'table-delete-row' | 'table-insert-col-left' | 'table-insert-col-right' | 'table-delete-col' | 'table-merge-selected' | 'table-merge-right' | 'table-merge-down' | 'table-split' | 'group' | 'ungroup' | 'crop' | MergeShapesCommandId | 'save-as-picture' | 'edit-alt-text' | 'size-and-position' | 'format-shape' | 'delete';
12707
- //#endregion
12708
- //#region src/render/canvas-context-menu-commands.d.ts
12709
- /**
12710
- * The right-click menu for the empty slide canvas (no element under the
12711
- * cursor), as distinct from {@link ./context-menu-commands}'s per-element menu.
12712
- *
12713
- * Right-clicking empty canvas used to do nothing at all in every binding: React
12714
- * and Vue both bailed out early (`getElementIdFromEvent` returns `null`, so the
12715
- * handler just returns) rather than opening a menu, and the other three never
12716
- * wired a handler for it either. PowerPoint offers Paste, Layout, Reset,
12717
- * Format Background and view toggles (Grid and Guides, Ruler) from this menu;
12718
- * this module is the one list every binding renders instead of five omissions.
12719
- *
12720
- * @module render/canvas-context-menu-commands
12721
- */
12722
- /** Every command the empty-canvas context menu can offer, in no particular order. */
12723
- type CanvasContextMenuCommandId = 'paste' | 'layout' | 'reset-slide' | 'format-background' | 'grid-and-guides' | 'ruler';
12724
- /** In-memory clipboard payload stored when an element is copied or cut. */
12725
- interface ElementClipboardPayload {
12726
- element: PptxElement;
12727
- isTemplate: boolean;
12728
- }
12729
12614
  type BackstagePage = 'home' | 'new' | 'open' | 'info' | 'save' | 'saveAs' | 'print' | 'share' | 'export' | 'close' | 'account' | 'options';
12730
12615
  //#endregion
12731
12616
  //#region src/render/backstage-cards.d.ts
@@ -12741,21 +12626,6 @@ type BackstagePage = 'home' | 'new' | 'open' | 'info' | 'save' | 'saveAs' | 'pri
12741
12626
  * translate it once.
12742
12627
  */
12743
12628
  type BackstageCardId = 'protect' | 'inspect' | 'embedFonts' | 'signatures' | 'versionHistory' | 'saveAsPptx' | 'saveAsPpsx' | 'saveAsPptm' | 'saveAsPpt' | 'pdf' | 'png' | 'video' | 'gif' | 'json' | 'copyImage' | 'print' | 'share';
12744
- /**
12745
- * Optional hook point for hosts that want to wire a real sign-in flow into
12746
- * File > Account. Disabled by default: the Account page renders nothing
12747
- * extra unless a host explicitly opts in by passing `enabled: true`.
12748
- * See docs/guide for wiring instructions.
12749
- */
12750
- interface AccountAuthConfig {
12751
- enabled: boolean;
12752
- onSignIn: () => void;
12753
- signedInUser?: {
12754
- name: string;
12755
- email?: string;
12756
- avatarUrl?: string;
12757
- };
12758
- }
12759
12629
  //#endregion
12760
12630
  //#region src/render/toolbar-actions.d.ts
12761
12631
  /**
@@ -12790,6 +12660,39 @@ type ToolbarActionId = ToolbarButtonId | ToolbarTabId;
12790
12660
  */
12791
12661
  type RibbonContextualTabId = 'shapeFormat' | 'pictureFormat' | 'tableDesign' | 'chartDesign' | 'smartArtDesign';
12792
12662
  //#endregion
12663
+ //#region src/render/canvas-context-menu-commands.d.ts
12664
+ /**
12665
+ * The right-click menu for the empty slide canvas (no element under the
12666
+ * cursor), as distinct from {@link ./context-menu-commands}'s per-element menu.
12667
+ *
12668
+ * Right-clicking empty canvas used to do nothing at all in every binding: React
12669
+ * and Vue both bailed out early (`getElementIdFromEvent` returns `null`, so the
12670
+ * handler just returns) rather than opening a menu, and the other three never
12671
+ * wired a handler for it either. PowerPoint offers Paste, Layout, Reset,
12672
+ * Format Background and view toggles (Grid and Guides, Ruler) from this menu;
12673
+ * this module is the one list every binding renders instead of five omissions.
12674
+ *
12675
+ * @module render/canvas-context-menu-commands
12676
+ */
12677
+ /** Every command the empty-canvas context menu can offer, in no particular order. */
12678
+ type CanvasContextMenuCommandId = 'paste' | 'layout' | 'reset-slide' | 'format-background' | 'grid-and-guides' | 'ruler';
12679
+ //#endregion
12680
+ //#region src/render/merge-shapes/merge-shapes-menu.d.ts
12681
+ /** The right-click command id for each operation. */
12682
+ type MergeShapesCommandId = 'merge-union' | 'merge-combine' | 'merge-fragment' | 'merge-intersect' | 'merge-subtract';
12683
+ /** Every command a canvas context menu can offer, in no particular order. */
12684
+ type ContextMenuCommandId = 'copy' | 'cut' | 'paste' | 'duplicate' | 'edit-text' | 'edit-points' | 'bring-forward' | 'send-backward' | 'bring-front' | 'send-back' | 'ai-ask' | 'ai-fix' | 'comment' | 'hyperlink' | 'table-insert-row-above' | 'table-insert-row-below' | 'table-delete-row' | 'table-insert-col-left' | 'table-insert-col-right' | 'table-delete-col' | 'table-merge-selected' | 'table-merge-right' | 'table-merge-down' | 'table-split' | 'group' | 'ungroup' | 'crop' | MergeShapesCommandId | 'save-as-picture' | 'edit-alt-text' | 'size-and-position' | 'format-shape' | 'delete';
12685
+ /** Every command the Edit Points right-click menu can offer. */
12686
+ type EditPointsCommandId = 'add-point' | 'delete-point' | 'delete-segment' | 'open-path' | 'close-path' | 'smooth-point' | 'straight-point' | 'corner-point' | 'straight-segment' | 'curved-segment' | 'exit';
12687
+ //#endregion
12688
+ //#region src/render/edit-points/freeform-tool-geometry.d.ts
12689
+ /** The two click-to-place drawing tools. */
12690
+ type FreeformToolKind = 'freeformShape' | 'curve';
12691
+ //#endregion
12692
+ //#region src/render/editor-keymap.d.ts
12693
+ /** A logical editor command produced by one key press. */
12694
+ 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';
12695
+ //#endregion
12793
12696
  //#region src/render/options/viewer-options.d.ts
12794
12697
  /**
12795
12698
  * Full PowerPoint "File > Options" parity model.
@@ -12866,6 +12769,8 @@ interface ViewerSaveOptions {
12866
12769
  clearCacheOnClose: boolean;
12867
12770
  }
12868
12771
  interface ViewerAccessibilityOptions {
12772
+ /** Browser speech-recognition language; automatic follows the browser language. */
12773
+ subtitleLanguage?: string;
12869
12774
  showAccessibilityStatus: boolean;
12870
12775
  feedbackWithSound: boolean;
12871
12776
  soundScheme: FeedbackSoundScheme;
@@ -12948,12 +12853,6 @@ interface ViewerOptions {
12948
12853
  }
12949
12854
  type ViewerOptionsGroupId = keyof ViewerOptions;
12950
12855
  type ViewerOptionPrimitive = boolean | number | string;
12951
- /** Every command the Edit Points right-click menu can offer. */
12952
- type EditPointsCommandId = 'add-point' | 'delete-point' | 'delete-segment' | 'open-path' | 'close-path' | 'smooth-point' | 'straight-point' | 'corner-point' | 'straight-segment' | 'curved-segment' | 'exit';
12953
- //#endregion
12954
- //#region src/render/edit-points/freeform-tool-geometry.d.ts
12955
- /** The two click-to-place drawing tools. */
12956
- type FreeformToolKind = 'freeformShape' | 'curve';
12957
12856
  //#endregion
12958
12857
  //#region src/render/options/viewer-options-controls.d.ts
12959
12858
  /**
@@ -12962,6 +12861,25 @@ type FreeformToolKind = 'freeformShape' | 'curve';
12962
12861
  */
12963
12862
  type ViewerOptionsTabId = 'general' | 'proofing' | 'save' | 'language' | 'accessibility' | 'advanced' | 'ribbon' | 'quickAccess' | 'addIns' | 'trust';
12964
12863
  //#endregion
12864
+ //#region src/render/customization/host-menu-commands.d.ts
12865
+ /** Snapshot of the slide on which the host command was offered. */
12866
+ interface HostCanvasMenuContext {
12867
+ slideIndex: number;
12868
+ }
12869
+ /** Effective selection, including a single right-clicked element. */
12870
+ interface HostElementMenuContext extends HostCanvasMenuContext {
12871
+ elementIds: readonly string[];
12872
+ }
12873
+ /** Plain text labels work identically in every framework. */
12874
+ interface HostMenuCommand<C> {
12875
+ id: string;
12876
+ label: string;
12877
+ /** Default: a separate group above the built-in commands. */
12878
+ group?: 'top' | 'bottom';
12879
+ disabled?: boolean | ((context: C) => boolean);
12880
+ onSelect: (context: C) => void;
12881
+ }
12882
+ //#endregion
12965
12883
  //#region src/render/customization/ribbon-control-catalog.d.ts
12966
12884
  declare const RIBBON_CONTROL_CATALOG: {
12967
12885
  readonly home: {
@@ -13543,6 +13461,9 @@ interface BackstageCustomization {
13543
13461
  }
13544
13462
  /** Right-click menu customisation. */
13545
13463
  interface ContextMenuCustomization {
13464
+ /** Additional host commands, independent of the viewer's AI connection. */
13465
+ extraElementCommands?: readonly HostMenuCommand<HostElementMenuContext>[];
13466
+ extraCanvasCommands?: readonly HostMenuCommand<HostCanvasMenuContext>[];
13546
13467
  /** Entries to remove from the element (right-click on a shape) menu. */
13547
13468
  hiddenElementCommands?: readonly ContextMenuCommandId[];
13548
13469
  /** Entries to remove from the empty-canvas menu. */
@@ -13663,6 +13584,120 @@ interface ViewerCustomizationApi {
13663
13584
  setFeatureEnabled(feature: ViewerFeatureId, enabled: boolean): void;
13664
13585
  setDialogAvailable(dialog: ViewerDialogId, available: boolean): void;
13665
13586
  }
13587
+ /**
13588
+ * A font supplied by the host application. The package never ships fonts:
13589
+ * applications provide a licensed URL, data URL, or blob URL for their users.
13590
+ */
13591
+ interface ViewerFontSource {
13592
+ family: string;
13593
+ src: string;
13594
+ format?: 'truetype' | 'opentype' | 'woff' | 'woff2';
13595
+ weight?: string | number;
13596
+ style?: 'normal' | 'italic';
13597
+ }
13598
+ //#endregion
13599
+ //#region src/render/session-restore.d.ts
13600
+ /**
13601
+ * session-restore: keep the deck a host app has open across a page refresh.
13602
+ *
13603
+ * A host (the demo apps, or any embedder) owns the bytes it hands to the
13604
+ * viewer, so a plain reload drops them and the user lands back on the file
13605
+ * dropzone with their presentation gone. This store remembers the open deck in
13606
+ * IndexedDB and hands it back on the next load.
13607
+ *
13608
+ * Scope is deliberately per-tab: the record is keyed by an id kept in
13609
+ * `sessionStorage`, which survives a reload but NOT a new tab. Refreshing
13610
+ * restores the deck this tab had open, while a second tab opened on the same
13611
+ * origin still starts on the landing page, and two tabs holding different decks
13612
+ * never steal each other's content.
13613
+ *
13614
+ * `restoreSessionDeck` additionally prefers a NEWER autosave snapshot for the
13615
+ * same file (see `./autosave-store`), so a refresh mid-edit comes back with the
13616
+ * edited deck rather than the pristine bytes that were first opened.
13617
+ *
13618
+ * Every operation is best-effort: a blocked IndexedDB, a partitioned
13619
+ * `sessionStorage`, or an exhausted quota degrades to "no restore", never to a
13620
+ * thrown error in the host.
13621
+ */
13622
+ /** A deck remembered for the current tab. */
13623
+ interface SessionDeck {
13624
+ /** File name the deck was opened under, used as the autosave key. */
13625
+ fileName: string;
13626
+ /** The presentation bytes. */
13627
+ data: Uint8Array;
13628
+ /** When these bytes were remembered (epoch ms). */
13629
+ timestamp: number;
13630
+ }
13631
+ /**
13632
+ * This tab's session id, or `null` when `sessionStorage` is unavailable (a
13633
+ * sandboxed iframe, or a browser with storage disabled).
13634
+ *
13635
+ * @param create Mint and persist an id when the tab does not have one yet.
13636
+ * Reads pass `false` so a fresh tab never claims another tab's record.
13637
+ */
13638
+ declare function getSessionTabId(create?: boolean): string | null;
13639
+ /**
13640
+ * Remember `data` as the deck this tab has open, so the next load can restore
13641
+ * it. Resolves `false` when the browser refused to store it; callers treat that
13642
+ * as "no restore available later", never as an error.
13643
+ */
13644
+ declare function rememberSessionDeck(fileName: string, data: Uint8Array): Promise<boolean>;
13645
+ /** The deck remembered for this tab, or `null` when there is nothing to restore. */
13646
+ declare function loadSessionDeck(): Promise<SessionDeck | null>;
13647
+ /** Forget this tab's deck (the host closed it, or handed the tab to another flow). */
13648
+ declare function forgetSessionDeck(): Promise<void>;
13649
+ /**
13650
+ * The deck to reopen on load: this tab's remembered bytes, upgraded to a newer
13651
+ * autosave snapshot of the same file when the viewer wrote one after they were
13652
+ * remembered. Without that upgrade a refresh mid-edit would silently roll the
13653
+ * presentation back to the state it was opened in.
13654
+ */
13655
+ declare function restoreSessionDeck(): Promise<SessionDeck | null>;
13656
+ /**
13657
+ * Store PPTX content bytes so the audience tab can retrieve them.
13658
+ * Called by the presenter before opening the audience window.
13659
+ */
13660
+ declare function storeAudienceContent(content: ArrayBuffer | Uint8Array, sessionId?: string): Promise<void>;
13661
+ /**
13662
+ * Load PPTX content bytes stored by the presenter tab.
13663
+ * Returns `null` if nothing is stored.
13664
+ */
13665
+ declare function loadAudienceContent(sessionId?: string): Promise<Uint8Array | null>;
13666
+ /**
13667
+ * Remove stored audience content (cleanup).
13668
+ */
13669
+ declare function clearAudienceContent(sessionId?: string): Promise<void>;
13670
+ /** In-memory clipboard payload stored when an element is copied or cut. */
13671
+ interface ElementClipboardPayload {
13672
+ element: PptxElement;
13673
+ isTemplate: boolean;
13674
+ }
13675
+ interface SubtitleSettings {
13676
+ spokenLanguage: string;
13677
+ }
13678
+ interface SubtitleSettingsLabels {
13679
+ title: string;
13680
+ language: string;
13681
+ browserLanguage: string;
13682
+ description: string;
13683
+ apply: string;
13684
+ cancel: string;
13685
+ }
13686
+ /**
13687
+ * Optional hook point for hosts that want to wire a real sign-in flow into
13688
+ * File > Account. Disabled by default: the Account page renders nothing
13689
+ * extra unless a host explicitly opts in by passing `enabled: true`.
13690
+ * See docs/guide for wiring instructions.
13691
+ */
13692
+ interface AccountAuthConfig {
13693
+ enabled: boolean;
13694
+ onSignIn: () => void;
13695
+ signedInUser?: {
13696
+ name: string;
13697
+ email?: string;
13698
+ avatarUrl?: string;
13699
+ };
13700
+ }
13666
13701
  //#endregion
13667
13702
  //#region src/render/viewport-fit.d.ts
13668
13703
  /** Unscaled CSS pixels reserved on each side of the ordinary viewer viewport. */
@@ -13677,6 +13712,31 @@ interface ViewportFitOptions {
13677
13712
  /** Positive fit-factor ceiling; null allows enlargement without a ceiling. */
13678
13713
  maxFitScale?: number | null;
13679
13714
  }
13715
+ type ThemeEditorLabels = Record<string, string>;
13716
+ //#endregion
13717
+ //#region src/web-components/theme-editor.d.ts
13718
+ interface PptxUiThemeEditorElement extends HTMLElement {
13719
+ theme: PptxTheme | undefined;
13720
+ labels: ThemeEditorLabels;
13721
+ disabled: boolean;
13722
+ }
13723
+ declare global {
13724
+ interface HTMLElementTagNameMap {
13725
+ 'pptx-ui-theme-editor': PptxUiThemeEditorElement;
13726
+ }
13727
+ }
13728
+ //#endregion
13729
+ //#region src/web-components/subtitle-settings.d.ts
13730
+ interface PptxUiSubtitleSettingsElement extends HTMLElement {
13731
+ settings: SubtitleSettings;
13732
+ labels: SubtitleSettingsLabels;
13733
+ languageDisabled: boolean;
13734
+ }
13735
+ declare global {
13736
+ interface HTMLElementTagNameMap {
13737
+ 'pptx-ui-subtitle-settings': PptxUiSubtitleSettingsElement;
13738
+ }
13739
+ }
13680
13740
  //#endregion
13681
13741
  //#region src/web-components/select-value.d.ts
13682
13742
  /** Public DOM shape used by all bindings; the element is not a native select. */
@@ -1,96 +1,96 @@
1
1
  'use strict';
2
2
 
3
- var chunkRK5UV5HL_js = require('../chunk-RK5UV5HL.js');
4
- require('../chunk-XWO367ZG.js');
5
- var chunkE6VYR3GM_js = require('../chunk-E6VYR3GM.js');
6
- var chunkDI4YTG3J_js = require('../chunk-DI4YTG3J.js');
7
- var chunk6ZR27XTL_js = require('../chunk-6ZR27XTL.js');
8
- require('../chunk-HIYK7HPX.js');
3
+ var chunkUVK2WBCU_js = require('../chunk-UVK2WBCU.js');
4
+ require('../chunk-FVLBN45Z.js');
5
+ var chunkBZNYI5U6_js = require('../chunk-BZNYI5U6.js');
6
+ var chunkQAVJDYB2_js = require('../chunk-QAVJDYB2.js');
7
+ var chunkXZUIS3VB_js = require('../chunk-XZUIS3VB.js');
8
+ require('../chunk-XEYB25ZT.js');
9
9
  require('../chunk-4VNS5WPM.js');
10
10
 
11
11
 
12
12
 
13
13
  Object.defineProperty(exports, "CollaborationStatusIndicator", {
14
14
  enumerable: true,
15
- get: function () { return chunkRK5UV5HL_js.CollaborationStatusIndicator; }
15
+ get: function () { return chunkUVK2WBCU_js.CollaborationStatusIndicator; }
16
16
  });
17
17
  Object.defineProperty(exports, "PowerPointViewer", {
18
18
  enumerable: true,
19
- get: function () { return chunkRK5UV5HL_js.PowerPointViewer; }
19
+ get: function () { return chunkUVK2WBCU_js.PowerPointViewer; }
20
20
  });
21
21
  Object.defineProperty(exports, "UserAvatarBar", {
22
22
  enumerable: true,
23
- get: function () { return chunkRK5UV5HL_js.UserAvatarBar; }
23
+ get: function () { return chunkUVK2WBCU_js.UserAvatarBar; }
24
24
  });
25
25
  Object.defineProperty(exports, "CollaborationProvider", {
26
26
  enumerable: true,
27
- get: function () { return chunkE6VYR3GM_js.CollaborationProvider; }
27
+ get: function () { return chunkBZNYI5U6_js.CollaborationProvider; }
28
28
  });
29
29
  Object.defineProperty(exports, "RemoteUserCursors", {
30
30
  enumerable: true,
31
- get: function () { return chunkE6VYR3GM_js.RemoteUserCursors; }
31
+ get: function () { return chunkBZNYI5U6_js.RemoteUserCursors; }
32
32
  });
33
33
  Object.defineProperty(exports, "isAudienceTab", {
34
34
  enumerable: true,
35
- get: function () { return chunkE6VYR3GM_js.isAudienceTab; }
35
+ get: function () { return chunkBZNYI5U6_js.isAudienceTab; }
36
36
  });
37
37
  Object.defineProperty(exports, "parseAudienceNonce", {
38
38
  enumerable: true,
39
- get: function () { return chunkE6VYR3GM_js.parseAudienceNonce; }
39
+ get: function () { return chunkBZNYI5U6_js.parseAudienceNonce; }
40
40
  });
41
41
  Object.defineProperty(exports, "useCollaborativeHistory", {
42
42
  enumerable: true,
43
- get: function () { return chunkE6VYR3GM_js.useCollaborativeHistory; }
43
+ get: function () { return chunkBZNYI5U6_js.useCollaborativeHistory; }
44
44
  });
45
45
  Object.defineProperty(exports, "useCollaborativeState", {
46
46
  enumerable: true,
47
- get: function () { return chunkE6VYR3GM_js.useCollaborativeState; }
47
+ get: function () { return chunkBZNYI5U6_js.useCollaborativeState; }
48
48
  });
49
49
  Object.defineProperty(exports, "usePresenceTracking", {
50
50
  enumerable: true,
51
- get: function () { return chunkE6VYR3GM_js.usePresenceTracking; }
51
+ get: function () { return chunkBZNYI5U6_js.usePresenceTracking; }
52
52
  });
53
53
  Object.defineProperty(exports, "useThemeSwitching", {
54
54
  enumerable: true,
55
- get: function () { return chunkE6VYR3GM_js.useThemeSwitching; }
55
+ get: function () { return chunkBZNYI5U6_js.useThemeSwitching; }
56
56
  });
57
57
  Object.defineProperty(exports, "useYjsProvider", {
58
58
  enumerable: true,
59
- get: function () { return chunkE6VYR3GM_js.useYjsProvider; }
59
+ get: function () { return chunkBZNYI5U6_js.useYjsProvider; }
60
60
  });
61
61
  Object.defineProperty(exports, "getAnimationInitialStyle", {
62
62
  enumerable: true,
63
- get: function () { return chunkDI4YTG3J_js.getAnimationInitialStyle; }
63
+ get: function () { return chunkQAVJDYB2_js.getAnimationInitialStyle; }
64
64
  });
65
65
  Object.defineProperty(exports, "clearAudienceContent", {
66
66
  enumerable: true,
67
- get: function () { return chunk6ZR27XTL_js.clearAudienceContent; }
67
+ get: function () { return chunkXZUIS3VB_js.clearAudienceContent; }
68
68
  });
69
69
  Object.defineProperty(exports, "forgetSessionDeck", {
70
70
  enumerable: true,
71
- get: function () { return chunk6ZR27XTL_js.forgetSessionDeck; }
71
+ get: function () { return chunkXZUIS3VB_js.forgetSessionDeck; }
72
72
  });
73
73
  Object.defineProperty(exports, "getSessionTabId", {
74
74
  enumerable: true,
75
- get: function () { return chunk6ZR27XTL_js.getSessionTabId; }
75
+ get: function () { return chunkXZUIS3VB_js.getSessionTabId; }
76
76
  });
77
77
  Object.defineProperty(exports, "loadAudienceContent", {
78
78
  enumerable: true,
79
- get: function () { return chunk6ZR27XTL_js.loadAudienceContent; }
79
+ get: function () { return chunkXZUIS3VB_js.loadAudienceContent; }
80
80
  });
81
81
  Object.defineProperty(exports, "loadSessionDeck", {
82
82
  enumerable: true,
83
- get: function () { return chunk6ZR27XTL_js.loadSessionDeck; }
83
+ get: function () { return chunkXZUIS3VB_js.loadSessionDeck; }
84
84
  });
85
85
  Object.defineProperty(exports, "rememberSessionDeck", {
86
86
  enumerable: true,
87
- get: function () { return chunk6ZR27XTL_js.rememberSessionDeck; }
87
+ get: function () { return chunkXZUIS3VB_js.rememberSessionDeck; }
88
88
  });
89
89
  Object.defineProperty(exports, "restoreSessionDeck", {
90
90
  enumerable: true,
91
- get: function () { return chunk6ZR27XTL_js.restoreSessionDeck; }
91
+ get: function () { return chunkXZUIS3VB_js.restoreSessionDeck; }
92
92
  });
93
93
  Object.defineProperty(exports, "storeAudienceContent", {
94
94
  enumerable: true,
95
- get: function () { return chunk6ZR27XTL_js.storeAudienceContent; }
95
+ get: function () { return chunkXZUIS3VB_js.storeAudienceContent; }
96
96
  });
Binary file
Binary file
@@ -1,7 +1,7 @@
1
- export { CollaborationStatusIndicator, PowerPointViewer, UserAvatarBar } from '../chunk-WSYKEPW6.mjs';
2
- import '../chunk-ECKXYCP3.mjs';
3
- export { CollaborationProvider, RemoteUserCursors, isAudienceTab, parseAudienceNonce, useCollaborativeHistory, useCollaborativeState, usePresenceTracking, useThemeSwitching, useYjsProvider } from '../chunk-EPMT65EN.mjs';
4
- export { getAnimationInitialStyle } from '../chunk-AJTFPTSN.mjs';
5
- export { clearAudienceContent, forgetSessionDeck, getSessionTabId, loadAudienceContent, loadSessionDeck, rememberSessionDeck, restoreSessionDeck, storeAudienceContent } from '../chunk-UWVRB4Z5.mjs';
6
- import '../chunk-55OLQ7HS.mjs';
1
+ export { CollaborationStatusIndicator, PowerPointViewer, UserAvatarBar } from '../chunk-BTTAYCGK.mjs';
2
+ import '../chunk-WRQ7K3DG.mjs';
3
+ export { CollaborationProvider, RemoteUserCursors, isAudienceTab, parseAudienceNonce, useCollaborativeHistory, useCollaborativeState, usePresenceTracking, useThemeSwitching, useYjsProvider } from '../chunk-QLUA63T3.mjs';
4
+ export { getAnimationInitialStyle } from '../chunk-MFGRRONU.mjs';
5
+ export { clearAudienceContent, forgetSessionDeck, getSessionTabId, loadAudienceContent, loadSessionDeck, rememberSessionDeck, restoreSessionDeck, storeAudienceContent } from '../chunk-MJ6LTUJ3.mjs';
6
+ import '../chunk-CJSIEITL.mjs';
7
7
  import '../chunk-XGB3TDIC.mjs';
Binary file
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pptx-react-viewer",
3
- "version": "4.14.0",
3
+ "version": "4.16.0",
4
4
  "description": "pptx-viewer for React: a PowerPoint viewer and editor component to render, edit, and export PPTX slides in the browser.",
5
5
  "keywords": [
6
6
  "editor",
@@ -120,7 +120,7 @@
120
120
  "dompurify": "^3.4.15",
121
121
  "html2canvas-pro": "^2.4.2",
122
122
  "opentype.js": "^2.0.0",
123
- "pptx-viewer-mcp": "^2.5.6",
123
+ "pptx-viewer-mcp": "^2.5.7",
124
124
  "tailwind-merge": "^3.6.0"
125
125
  },
126
126
  "devDependencies": {
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file