pptx-react-viewer 4.14.0 → 4.15.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 (111) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/dist/{AiChatPanel-WQUOEVQB.mjs → AiChatPanel-7OVUGUKW.mjs} +4 -4
  3. package/dist/AiChatPanel-7OVUGUKW.mjs.br +0 -0
  4. package/dist/AiChatPanel-7OVUGUKW.mjs.gz +0 -0
  5. package/dist/{AiChatPanel-PULXQTFJ.js → AiChatPanel-CDQWJTWL.js} +28 -28
  6. package/dist/AiChatPanel-CDQWJTWL.js.br +0 -0
  7. package/dist/AiChatPanel-CDQWJTWL.js.gz +0 -0
  8. package/dist/{Model3DScene-HZG33BWN.mjs → Model3DScene-A3CPMFAO.mjs} +1 -1
  9. package/dist/Model3DScene-A3CPMFAO.mjs.br +0 -0
  10. package/dist/Model3DScene-A3CPMFAO.mjs.gz +0 -0
  11. package/dist/{Model3DScene-6MYHPE5N.js → Model3DScene-OLGB7Z7Q.js} +2 -2
  12. package/dist/Model3DScene-OLGB7Z7Q.js.br +0 -0
  13. package/dist/Model3DScene-OLGB7Z7Q.js.gz +0 -0
  14. package/dist/{chunk-6ZR27XTL.js → chunk-2CSRCH4H.js} +2321 -1211
  15. package/dist/chunk-2CSRCH4H.js.br +0 -0
  16. package/dist/chunk-2CSRCH4H.js.gz +0 -0
  17. package/dist/{chunk-RK5UV5HL.js → chunk-6ZPXMS64.js} +1517 -1526
  18. package/dist/chunk-6ZPXMS64.js.br +0 -0
  19. package/dist/chunk-6ZPXMS64.js.gz +0 -0
  20. package/dist/{chunk-ECKXYCP3.mjs → chunk-AHJ4ND7Q.mjs} +1 -1
  21. package/dist/chunk-AHJ4ND7Q.mjs.br +0 -0
  22. package/dist/chunk-AHJ4ND7Q.mjs.gz +0 -0
  23. package/dist/{chunk-UWVRB4Z5.mjs → chunk-AIWEM7VE.mjs} +2312 -1210
  24. package/dist/chunk-AIWEM7VE.mjs.br +0 -0
  25. package/dist/chunk-AIWEM7VE.mjs.gz +0 -0
  26. package/dist/{chunk-55OLQ7HS.mjs → chunk-CJSIEITL.mjs} +3 -0
  27. package/dist/chunk-CJSIEITL.mjs.br +0 -0
  28. package/dist/chunk-CJSIEITL.mjs.gz +0 -0
  29. package/dist/{chunk-DI4YTG3J.js → chunk-CNXVOFUW.js} +197 -197
  30. package/dist/chunk-CNXVOFUW.js.br +0 -0
  31. package/dist/{chunk-DI4YTG3J.js.gz → chunk-CNXVOFUW.js.gz} +0 -0
  32. package/dist/{chunk-EPMT65EN.mjs → chunk-DNWIW75I.mjs} +6 -5
  33. package/dist/chunk-DNWIW75I.mjs.br +0 -0
  34. package/dist/chunk-DNWIW75I.mjs.gz +0 -0
  35. package/dist/{chunk-E6VYR3GM.js → chunk-HGO243GV.js} +818 -816
  36. package/dist/chunk-HGO243GV.js.br +0 -0
  37. package/dist/chunk-HGO243GV.js.gz +0 -0
  38. package/dist/{chunk-AJTFPTSN.mjs → chunk-Q5VQ53R3.mjs} +2 -2
  39. package/dist/chunk-Q5VQ53R3.mjs.br +0 -0
  40. package/dist/chunk-Q5VQ53R3.mjs.gz +0 -0
  41. package/dist/{chunk-WSYKEPW6.mjs → chunk-RQCAXUVQ.mjs} +342 -351
  42. package/dist/chunk-RQCAXUVQ.mjs.br +0 -0
  43. package/dist/chunk-RQCAXUVQ.mjs.gz +0 -0
  44. package/dist/{chunk-XWO367ZG.js → chunk-UP6PJEHM.js} +5 -5
  45. package/dist/chunk-UP6PJEHM.js.br +0 -0
  46. package/dist/chunk-UP6PJEHM.js.gz +0 -0
  47. package/dist/{chunk-HIYK7HPX.js → chunk-XEYB25ZT.js} +3 -0
  48. package/dist/chunk-XEYB25ZT.js.br +0 -0
  49. package/dist/chunk-XEYB25ZT.js.gz +0 -0
  50. package/dist/i18n.js +4 -4
  51. package/dist/i18n.js.br +0 -0
  52. package/dist/i18n.js.gz +0 -0
  53. package/dist/i18n.mjs +1 -1
  54. package/dist/i18n.mjs.br +0 -0
  55. package/dist/i18n.mjs.gz +0 -0
  56. package/dist/index.d.ts +293 -268
  57. package/dist/index.js +63 -63
  58. package/dist/index.js.br +0 -0
  59. package/dist/index.js.gz +0 -0
  60. package/dist/index.mjs +6 -6
  61. package/dist/index.mjs.br +0 -0
  62. package/dist/index.mjs.gz +0 -0
  63. package/dist/internals.d.ts +600 -575
  64. package/dist/internals.js +105 -105
  65. package/dist/internals.js.br +0 -0
  66. package/dist/internals.js.gz +0 -0
  67. package/dist/internals.mjs +4 -4
  68. package/dist/internals.mjs.br +0 -0
  69. package/dist/internals.mjs.gz +0 -0
  70. package/dist/pptx-viewer.css +1 -1
  71. package/dist/pptx-viewer.css.br +0 -0
  72. package/dist/pptx-viewer.css.gz +0 -0
  73. package/dist/viewer/index.d.ts +161 -136
  74. package/dist/viewer/index.js +27 -27
  75. package/dist/viewer/index.js.br +0 -0
  76. package/dist/viewer/index.js.gz +0 -0
  77. package/dist/viewer/index.mjs +6 -6
  78. package/dist/viewer/index.mjs.br +0 -0
  79. package/dist/viewer/index.mjs.gz +0 -0
  80. package/package.json +1 -1
  81. package/dist/AiChatPanel-PULXQTFJ.js.br +0 -0
  82. package/dist/AiChatPanel-PULXQTFJ.js.gz +0 -0
  83. package/dist/AiChatPanel-WQUOEVQB.mjs.br +0 -0
  84. package/dist/AiChatPanel-WQUOEVQB.mjs.gz +0 -0
  85. package/dist/Model3DScene-6MYHPE5N.js.br +0 -0
  86. package/dist/Model3DScene-6MYHPE5N.js.gz +0 -0
  87. package/dist/Model3DScene-HZG33BWN.mjs.br +0 -0
  88. package/dist/Model3DScene-HZG33BWN.mjs.gz +0 -0
  89. package/dist/chunk-55OLQ7HS.mjs.br +0 -0
  90. package/dist/chunk-55OLQ7HS.mjs.gz +0 -0
  91. package/dist/chunk-6ZR27XTL.js.br +0 -0
  92. package/dist/chunk-6ZR27XTL.js.gz +0 -0
  93. package/dist/chunk-AJTFPTSN.mjs.br +0 -0
  94. package/dist/chunk-AJTFPTSN.mjs.gz +0 -0
  95. package/dist/chunk-DI4YTG3J.js.br +0 -0
  96. package/dist/chunk-E6VYR3GM.js.br +0 -0
  97. package/dist/chunk-E6VYR3GM.js.gz +0 -0
  98. package/dist/chunk-ECKXYCP3.mjs.br +0 -0
  99. package/dist/chunk-ECKXYCP3.mjs.gz +0 -0
  100. package/dist/chunk-EPMT65EN.mjs.br +0 -0
  101. package/dist/chunk-EPMT65EN.mjs.gz +0 -0
  102. package/dist/chunk-HIYK7HPX.js.br +0 -0
  103. package/dist/chunk-HIYK7HPX.js.gz +0 -0
  104. package/dist/chunk-RK5UV5HL.js.br +0 -0
  105. package/dist/chunk-RK5UV5HL.js.gz +0 -0
  106. package/dist/chunk-UWVRB4Z5.mjs.br +0 -0
  107. package/dist/chunk-UWVRB4Z5.mjs.gz +0 -0
  108. package/dist/chunk-WSYKEPW6.mjs.br +0 -0
  109. package/dist/chunk-WSYKEPW6.mjs.gz +0 -0
  110. package/dist/chunk-XWO367ZG.js.br +0 -0
  111. 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
  /**
@@ -13663,6 +13562,120 @@ interface ViewerCustomizationApi {
13663
13562
  setFeatureEnabled(feature: ViewerFeatureId, enabled: boolean): void;
13664
13563
  setDialogAvailable(dialog: ViewerDialogId, available: boolean): void;
13665
13564
  }
13565
+ /**
13566
+ * A font supplied by the host application. The package never ships fonts:
13567
+ * applications provide a licensed URL, data URL, or blob URL for their users.
13568
+ */
13569
+ interface ViewerFontSource {
13570
+ family: string;
13571
+ src: string;
13572
+ format?: 'truetype' | 'opentype' | 'woff' | 'woff2';
13573
+ weight?: string | number;
13574
+ style?: 'normal' | 'italic';
13575
+ }
13576
+ //#endregion
13577
+ //#region src/render/session-restore.d.ts
13578
+ /**
13579
+ * session-restore: keep the deck a host app has open across a page refresh.
13580
+ *
13581
+ * A host (the demo apps, or any embedder) owns the bytes it hands to the
13582
+ * viewer, so a plain reload drops them and the user lands back on the file
13583
+ * dropzone with their presentation gone. This store remembers the open deck in
13584
+ * IndexedDB and hands it back on the next load.
13585
+ *
13586
+ * Scope is deliberately per-tab: the record is keyed by an id kept in
13587
+ * `sessionStorage`, which survives a reload but NOT a new tab. Refreshing
13588
+ * restores the deck this tab had open, while a second tab opened on the same
13589
+ * origin still starts on the landing page, and two tabs holding different decks
13590
+ * never steal each other's content.
13591
+ *
13592
+ * `restoreSessionDeck` additionally prefers a NEWER autosave snapshot for the
13593
+ * same file (see `./autosave-store`), so a refresh mid-edit comes back with the
13594
+ * edited deck rather than the pristine bytes that were first opened.
13595
+ *
13596
+ * Every operation is best-effort: a blocked IndexedDB, a partitioned
13597
+ * `sessionStorage`, or an exhausted quota degrades to "no restore", never to a
13598
+ * thrown error in the host.
13599
+ */
13600
+ /** A deck remembered for the current tab. */
13601
+ interface SessionDeck {
13602
+ /** File name the deck was opened under, used as the autosave key. */
13603
+ fileName: string;
13604
+ /** The presentation bytes. */
13605
+ data: Uint8Array;
13606
+ /** When these bytes were remembered (epoch ms). */
13607
+ timestamp: number;
13608
+ }
13609
+ /**
13610
+ * This tab's session id, or `null` when `sessionStorage` is unavailable (a
13611
+ * sandboxed iframe, or a browser with storage disabled).
13612
+ *
13613
+ * @param create Mint and persist an id when the tab does not have one yet.
13614
+ * Reads pass `false` so a fresh tab never claims another tab's record.
13615
+ */
13616
+ declare function getSessionTabId(create?: boolean): string | null;
13617
+ /**
13618
+ * Remember `data` as the deck this tab has open, so the next load can restore
13619
+ * it. Resolves `false` when the browser refused to store it; callers treat that
13620
+ * as "no restore available later", never as an error.
13621
+ */
13622
+ declare function rememberSessionDeck(fileName: string, data: Uint8Array): Promise<boolean>;
13623
+ /** The deck remembered for this tab, or `null` when there is nothing to restore. */
13624
+ declare function loadSessionDeck(): Promise<SessionDeck | null>;
13625
+ /** Forget this tab's deck (the host closed it, or handed the tab to another flow). */
13626
+ declare function forgetSessionDeck(): Promise<void>;
13627
+ /**
13628
+ * The deck to reopen on load: this tab's remembered bytes, upgraded to a newer
13629
+ * autosave snapshot of the same file when the viewer wrote one after they were
13630
+ * remembered. Without that upgrade a refresh mid-edit would silently roll the
13631
+ * presentation back to the state it was opened in.
13632
+ */
13633
+ declare function restoreSessionDeck(): Promise<SessionDeck | null>;
13634
+ /**
13635
+ * Store PPTX content bytes so the audience tab can retrieve them.
13636
+ * Called by the presenter before opening the audience window.
13637
+ */
13638
+ declare function storeAudienceContent(content: ArrayBuffer | Uint8Array, sessionId?: string): Promise<void>;
13639
+ /**
13640
+ * Load PPTX content bytes stored by the presenter tab.
13641
+ * Returns `null` if nothing is stored.
13642
+ */
13643
+ declare function loadAudienceContent(sessionId?: string): Promise<Uint8Array | null>;
13644
+ /**
13645
+ * Remove stored audience content (cleanup).
13646
+ */
13647
+ declare function clearAudienceContent(sessionId?: string): Promise<void>;
13648
+ /** In-memory clipboard payload stored when an element is copied or cut. */
13649
+ interface ElementClipboardPayload {
13650
+ element: PptxElement;
13651
+ isTemplate: boolean;
13652
+ }
13653
+ interface SubtitleSettings {
13654
+ spokenLanguage: string;
13655
+ }
13656
+ interface SubtitleSettingsLabels {
13657
+ title: string;
13658
+ language: string;
13659
+ browserLanguage: string;
13660
+ description: string;
13661
+ apply: string;
13662
+ cancel: string;
13663
+ }
13664
+ /**
13665
+ * Optional hook point for hosts that want to wire a real sign-in flow into
13666
+ * File > Account. Disabled by default: the Account page renders nothing
13667
+ * extra unless a host explicitly opts in by passing `enabled: true`.
13668
+ * See docs/guide for wiring instructions.
13669
+ */
13670
+ interface AccountAuthConfig {
13671
+ enabled: boolean;
13672
+ onSignIn: () => void;
13673
+ signedInUser?: {
13674
+ name: string;
13675
+ email?: string;
13676
+ avatarUrl?: string;
13677
+ };
13678
+ }
13666
13679
  //#endregion
13667
13680
  //#region src/render/viewport-fit.d.ts
13668
13681
  /** Unscaled CSS pixels reserved on each side of the ordinary viewer viewport. */
@@ -13678,6 +13691,18 @@ interface ViewportFitOptions {
13678
13691
  maxFitScale?: number | null;
13679
13692
  }
13680
13693
  //#endregion
13694
+ //#region src/web-components/subtitle-settings.d.ts
13695
+ interface PptxUiSubtitleSettingsElement extends HTMLElement {
13696
+ settings: SubtitleSettings;
13697
+ labels: SubtitleSettingsLabels;
13698
+ languageDisabled: boolean;
13699
+ }
13700
+ declare global {
13701
+ interface HTMLElementTagNameMap {
13702
+ 'pptx-ui-subtitle-settings': PptxUiSubtitleSettingsElement;
13703
+ }
13704
+ }
13705
+ //#endregion
13681
13706
  //#region src/web-components/select-value.d.ts
13682
13707
  /** Public DOM shape used by all bindings; the element is not a native select. */
13683
13708
  interface PptxUiSelectElement extends HTMLElement {
@@ -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 chunk6ZPXMS64_js = require('../chunk-6ZPXMS64.js');
4
+ require('../chunk-UP6PJEHM.js');
5
+ var chunkHGO243GV_js = require('../chunk-HGO243GV.js');
6
+ var chunkCNXVOFUW_js = require('../chunk-CNXVOFUW.js');
7
+ var chunk2CSRCH4H_js = require('../chunk-2CSRCH4H.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 chunk6ZPXMS64_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 chunk6ZPXMS64_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 chunk6ZPXMS64_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 chunkHGO243GV_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 chunkHGO243GV_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 chunkHGO243GV_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 chunkHGO243GV_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 chunkHGO243GV_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 chunkHGO243GV_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 chunkHGO243GV_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 chunkHGO243GV_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 chunkHGO243GV_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 chunkCNXVOFUW_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 chunk2CSRCH4H_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 chunk2CSRCH4H_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 chunk2CSRCH4H_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 chunk2CSRCH4H_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 chunk2CSRCH4H_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 chunk2CSRCH4H_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 chunk2CSRCH4H_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 chunk2CSRCH4H_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-RQCAXUVQ.mjs';
2
+ import '../chunk-AHJ4ND7Q.mjs';
3
+ export { CollaborationProvider, RemoteUserCursors, isAudienceTab, parseAudienceNonce, useCollaborativeHistory, useCollaborativeState, usePresenceTracking, useThemeSwitching, useYjsProvider } from '../chunk-DNWIW75I.mjs';
4
+ export { getAnimationInitialStyle } from '../chunk-Q5VQ53R3.mjs';
5
+ export { clearAudienceContent, forgetSessionDeck, getSessionTabId, loadAudienceContent, loadSessionDeck, rememberSessionDeck, restoreSessionDeck, storeAudienceContent } from '../chunk-AIWEM7VE.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.15.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",
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