pptx-react-viewer 4.5.0 → 4.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (132) hide show
  1. package/CHANGELOG.md +44 -0
  2. package/README.md +34 -33
  3. package/dist/{AiChatPanel-P2N6X2KB.js → AiChatPanel-3C7GM6ZF.js} +28 -28
  4. package/dist/AiChatPanel-3C7GM6ZF.js.br +0 -0
  5. package/dist/AiChatPanel-3C7GM6ZF.js.gz +0 -0
  6. package/dist/{AiChatPanel-HXGCZPUX.mjs → AiChatPanel-L7DBCWE3.mjs} +4 -4
  7. package/dist/AiChatPanel-L7DBCWE3.mjs.br +0 -0
  8. package/dist/AiChatPanel-L7DBCWE3.mjs.gz +0 -0
  9. package/dist/{Model3DScene-QXMMJRV3.mjs → Model3DScene-IJ7YYTYU.mjs} +1 -1
  10. package/dist/Model3DScene-IJ7YYTYU.mjs.br +0 -0
  11. package/dist/Model3DScene-IJ7YYTYU.mjs.gz +0 -0
  12. package/dist/{Model3DScene-PIFMH2TU.js → Model3DScene-USKNPWWH.js} +2 -2
  13. package/dist/Model3DScene-USKNPWWH.js.br +0 -0
  14. package/dist/Model3DScene-USKNPWWH.js.gz +0 -0
  15. package/dist/{chunk-UMQV2432.js → chunk-3JUZOKFI.js} +1 -0
  16. package/dist/chunk-3JUZOKFI.js.br +0 -0
  17. package/dist/{chunk-UMQV2432.js.gz → chunk-3JUZOKFI.js.gz} +0 -0
  18. package/dist/{chunk-T35BGKZG.js → chunk-5V5SMT5A.js} +5 -5
  19. package/dist/chunk-5V5SMT5A.js.br +0 -0
  20. package/dist/chunk-5V5SMT5A.js.gz +0 -0
  21. package/dist/{chunk-UZFCFYK6.js → chunk-DFSWCVRW.js} +1278 -1129
  22. package/dist/chunk-DFSWCVRW.js.br +0 -0
  23. package/dist/chunk-DFSWCVRW.js.gz +0 -0
  24. package/dist/{chunk-LYZQLV7R.js → chunk-FZSYLXJT.js} +783 -38
  25. package/dist/chunk-FZSYLXJT.js.br +0 -0
  26. package/dist/chunk-FZSYLXJT.js.gz +0 -0
  27. package/dist/{chunk-Y4VRYQQS.js → chunk-IBHIXBC5.js} +865 -844
  28. package/dist/chunk-IBHIXBC5.js.br +0 -0
  29. package/dist/chunk-IBHIXBC5.js.gz +0 -0
  30. package/dist/{chunk-VZNIVS3X.mjs → chunk-ICEZL4TM.mjs} +755 -38
  31. package/dist/chunk-ICEZL4TM.mjs.br +0 -0
  32. package/dist/chunk-ICEZL4TM.mjs.gz +0 -0
  33. package/dist/{chunk-PRXJ3J5W.mjs → chunk-INX3E37P.mjs} +53 -32
  34. package/dist/chunk-INX3E37P.mjs.br +0 -0
  35. package/dist/chunk-INX3E37P.mjs.gz +0 -0
  36. package/dist/{chunk-ZF5S3HHW.mjs → chunk-K6QHGABT.mjs} +2 -2
  37. package/dist/chunk-K6QHGABT.mjs.br +0 -0
  38. package/dist/chunk-K6QHGABT.mjs.gz +0 -0
  39. package/dist/{chunk-APAVAD2A.mjs → chunk-OOO4JL2N.mjs} +1 -0
  40. package/dist/chunk-OOO4JL2N.mjs.br +0 -0
  41. package/dist/{chunk-APAVAD2A.mjs.gz → chunk-OOO4JL2N.mjs.gz} +0 -0
  42. package/dist/{chunk-DX2JCSQ4.mjs → chunk-VCAQSSGD.mjs} +1 -1
  43. package/dist/chunk-VCAQSSGD.mjs.br +0 -0
  44. package/dist/chunk-VCAQSSGD.mjs.gz +0 -0
  45. package/dist/{chunk-6FVYG27J.js → chunk-Y4QUVWZC.js} +188 -188
  46. package/dist/chunk-Y4QUVWZC.js.br +0 -0
  47. package/dist/chunk-Y4QUVWZC.js.gz +0 -0
  48. package/dist/{chunk-IDV2ITXM.mjs → chunk-ZAQFTO4P.mjs} +220 -71
  49. package/dist/chunk-ZAQFTO4P.mjs.br +0 -0
  50. package/dist/chunk-ZAQFTO4P.mjs.gz +0 -0
  51. package/dist/i18n/de.cjs +1 -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 +1 -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 +1 -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 +1 -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 +1 -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 +1 -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 +1 -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 +1 -0
  73. package/dist/i18n/zh-CN.mjs.br +0 -0
  74. package/dist/i18n/zh-CN.mjs.gz +0 -0
  75. package/dist/i18n.js +4 -4
  76. package/dist/i18n.js.br +0 -0
  77. package/dist/i18n.js.gz +0 -0
  78. package/dist/i18n.mjs +1 -1
  79. package/dist/i18n.mjs.br +0 -0
  80. package/dist/i18n.mjs.gz +0 -0
  81. package/dist/index.d.ts +266 -3
  82. package/dist/index.js +105 -49
  83. package/dist/index.js.br +0 -0
  84. package/dist/index.js.gz +0 -0
  85. package/dist/index.mjs +6 -6
  86. package/dist/index.mjs.br +0 -0
  87. package/dist/index.mjs.gz +0 -0
  88. package/dist/internals.d.ts +273 -2
  89. package/dist/internals.js +105 -105
  90. package/dist/internals.js.br +0 -0
  91. package/dist/internals.js.gz +0 -0
  92. package/dist/internals.mjs +4 -4
  93. package/dist/internals.mjs.br +0 -0
  94. package/dist/internals.mjs.gz +0 -0
  95. package/dist/viewer/index.d.ts +368 -1
  96. package/dist/viewer/index.js +27 -27
  97. package/dist/viewer/index.js.br +0 -0
  98. package/dist/viewer/index.js.gz +0 -0
  99. package/dist/viewer/index.mjs +6 -6
  100. package/dist/viewer/index.mjs.br +3 -4
  101. package/dist/viewer/index.mjs.gz +0 -0
  102. package/package.json +1 -1
  103. package/dist/AiChatPanel-HXGCZPUX.mjs.br +0 -0
  104. package/dist/AiChatPanel-HXGCZPUX.mjs.gz +0 -0
  105. package/dist/AiChatPanel-P2N6X2KB.js.br +0 -0
  106. package/dist/AiChatPanel-P2N6X2KB.js.gz +0 -0
  107. package/dist/Model3DScene-PIFMH2TU.js.br +0 -0
  108. package/dist/Model3DScene-PIFMH2TU.js.gz +0 -0
  109. package/dist/Model3DScene-QXMMJRV3.mjs.br +0 -0
  110. package/dist/Model3DScene-QXMMJRV3.mjs.gz +0 -0
  111. package/dist/chunk-6FVYG27J.js.br +0 -0
  112. package/dist/chunk-6FVYG27J.js.gz +0 -0
  113. package/dist/chunk-APAVAD2A.mjs.br +0 -0
  114. package/dist/chunk-DX2JCSQ4.mjs.br +0 -0
  115. package/dist/chunk-DX2JCSQ4.mjs.gz +0 -0
  116. package/dist/chunk-IDV2ITXM.mjs.br +0 -0
  117. package/dist/chunk-IDV2ITXM.mjs.gz +0 -0
  118. package/dist/chunk-LYZQLV7R.js.br +0 -0
  119. package/dist/chunk-LYZQLV7R.js.gz +0 -0
  120. package/dist/chunk-PRXJ3J5W.mjs.br +0 -0
  121. package/dist/chunk-PRXJ3J5W.mjs.gz +0 -0
  122. package/dist/chunk-T35BGKZG.js.br +0 -0
  123. package/dist/chunk-T35BGKZG.js.gz +0 -0
  124. package/dist/chunk-UMQV2432.js.br +0 -0
  125. package/dist/chunk-UZFCFYK6.js.br +0 -0
  126. package/dist/chunk-UZFCFYK6.js.gz +0 -0
  127. package/dist/chunk-VZNIVS3X.mjs.br +0 -0
  128. package/dist/chunk-VZNIVS3X.mjs.gz +0 -0
  129. package/dist/chunk-Y4VRYQQS.js.br +0 -0
  130. package/dist/chunk-Y4VRYQQS.js.gz +0 -0
  131. package/dist/chunk-ZF5S3HHW.mjs.br +0 -0
  132. package/dist/chunk-ZF5S3HHW.mjs.gz +0 -0
@@ -12313,11 +12313,47 @@ declare function loadAudienceContent(sessionId?: string): Promise<Uint8Array | n
12313
12313
  * Remove stored audience content (cleanup).
12314
12314
  */
12315
12315
  declare function clearAudienceContent(sessionId?: string): Promise<void>;
12316
+ /** A logical editor command produced by one key press. */
12317
+ 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';
12318
+ /** Every command a canvas context menu can offer, in no particular order. */
12319
+ type ContextMenuCommandId = 'copy' | 'cut' | 'paste' | 'duplicate' | 'edit-text' | 'bring-forward' | 'send-backward' | 'bring-front' | 'send-back' | 'ai-ask' | 'ai-fix' | 'comment' | 'hyperlink' | 'table-insert-row-above' | 'table-insert-row-below' | 'table-delete-row' | 'table-insert-col-left' | 'table-insert-col-right' | 'table-delete-col' | 'table-merge-selected' | 'table-merge-right' | 'table-merge-down' | 'table-split' | 'group' | 'ungroup' | 'save-as-picture' | 'edit-alt-text' | 'size-and-position' | 'format-shape' | 'delete';
12320
+ //#endregion
12321
+ //#region src/render/canvas-context-menu-commands.d.ts
12322
+ /**
12323
+ * The right-click menu for the empty slide canvas (no element under the
12324
+ * cursor), as distinct from {@link ./context-menu-commands}'s per-element menu.
12325
+ *
12326
+ * Right-clicking empty canvas used to do nothing at all in every binding: React
12327
+ * and Vue both bailed out early (`getElementIdFromEvent` returns `null`, so the
12328
+ * handler just returns) rather than opening a menu, and the other three never
12329
+ * wired a handler for it either. PowerPoint offers Paste, Layout, Reset,
12330
+ * Format Background and view toggles (Grid and Guides, Ruler) from this menu;
12331
+ * this module is the one list every binding renders instead of five omissions.
12332
+ *
12333
+ * @module render/canvas-context-menu-commands
12334
+ */
12335
+ /** Every command the empty-canvas context menu can offer, in no particular order. */
12336
+ type CanvasContextMenuCommandId = 'paste' | 'layout' | 'reset-slide' | 'format-background' | 'grid-and-guides' | 'ruler';
12316
12337
  /** In-memory clipboard payload stored when an element is copied or cut. */
12317
12338
  interface ElementClipboardPayload {
12318
12339
  element: PptxElement;
12319
12340
  isTemplate: boolean;
12320
12341
  }
12342
+ type BackstagePage = 'home' | 'new' | 'open' | 'info' | 'save' | 'saveAs' | 'print' | 'share' | 'export' | 'close' | 'account' | 'options';
12343
+ //#endregion
12344
+ //#region src/render/backstage-cards.d.ts
12345
+ /**
12346
+ * Every action card the File-tab backstage can show, keyed by the operation it
12347
+ * triggers rather than by its wording.
12348
+ *
12349
+ * The five bindings used to hardcode a title and a body string each, which made
12350
+ * the whole backstage untranslatable and let the copy drift: the same card
12351
+ * carried four different descriptions depending on which binding you opened it
12352
+ * in. Both halves now live here as a dictionary key plus an English fallback,
12353
+ * so a wording change lands everywhere at once and a translator only has to
12354
+ * translate it once.
12355
+ */
12356
+ type BackstageCardId = 'protect' | 'inspect' | 'embedFonts' | 'signatures' | 'versionHistory' | 'saveAsPptx' | 'saveAsPpsx' | 'saveAsPptm' | 'saveAsPpt' | 'pdf' | 'png' | 'video' | 'gif' | 'json' | 'copyImage' | 'print' | 'share';
12321
12357
  /**
12322
12358
  * Optional hook point for hosts that want to wire a real sign-in flow into
12323
12359
  * File > Account. Disabled by default: the Account page renders nothing
@@ -12360,6 +12396,331 @@ type ToolbarButtonId = 'share' | 'broadcast' | 'export' | 'undo' | 'redo' | 'rec
12360
12396
  type ToolbarTabId = 'file' | 'home' | 'insert' | 'draw' | 'design' | 'transitions' | 'animations' | 'slideShow' | 'record' | 'review' | 'view' | 'help';
12361
12397
  type ToolbarActionId = ToolbarButtonId | ToolbarTabId;
12362
12398
  //#endregion
12399
+ //#region src/render/options/viewer-options.d.ts
12400
+ /**
12401
+ * Full PowerPoint "File > Options" parity model.
12402
+ *
12403
+ * Groups mirror the ten categories of PowerPoint's Options dialog. Values are
12404
+ * flat primitives per group so the dialog panes can be rendered generically
12405
+ * from `VIEWER_OPTIONS_SCHEMA` in every binding. The legacy six-toggle
12406
+ * `ViewerPreferences` surface stays supported via the mapping helpers below.
12407
+ */
12408
+ type ScreenTipStyle = 'descriptions' | 'plain' | 'off';
12409
+ type DisplayOptimization = 'appearance' | 'compatibility';
12410
+ type ImageResolutionPreset = 'highFidelity' | 'ppi330' | 'ppi220' | 'ppi150' | 'ppi96';
12411
+ type OpenDocumentsView = 'savedView' | 'normal' | 'outline' | 'slideSorter' | 'notes';
12412
+ type DefaultExportFormat = 'pptx' | 'pdf' | 'png';
12413
+ type QuickAccessPosition = 'above' | 'below';
12414
+ type FeedbackSoundScheme = 'modern' | 'classic';
12415
+ type OptionsPrintWhat = 'slides' | 'handouts' | 'notes' | 'outline';
12416
+ type OptionsPrintColorMode = 'color' | 'grayscale' | 'blackAndWhite';
12417
+ interface ViewerGeneralOptions {
12418
+ displayOptimization: DisplayOptimization;
12419
+ showMiniToolbar: boolean;
12420
+ enableLivePreview: boolean;
12421
+ collapseRibbonAutomatically: boolean;
12422
+ collapseSearchByDefault: boolean;
12423
+ screenTipStyle: ScreenTipStyle;
12424
+ userName: string;
12425
+ userInitials: string;
12426
+ showStartScreen: boolean;
12427
+ /**
12428
+ * Lets the user hand a local font file to the viewer so decks authored
12429
+ * with a font the browser lacks render with the real face.
12430
+ *
12431
+ * Off by default. The registration reads a file the user picks and adds it
12432
+ * to the page's font set for the session, which is a capability a host
12433
+ * embedding the viewer should opt into rather than inherit.
12434
+ */
12435
+ enableCustomFontUpload: boolean;
12436
+ }
12437
+ interface ViewerProofingOptions {
12438
+ autoCorrectTwoInitialCapitals: boolean;
12439
+ autoCorrectCapitalizeFirstLetter: boolean;
12440
+ autoCorrectCapitalizeDayNames: boolean;
12441
+ autoCorrectSmartQuotes: boolean;
12442
+ autoCorrectHyphensToDash: boolean;
12443
+ autoCorrectFractions: boolean;
12444
+ autoCorrectOrdinals: boolean;
12445
+ ignoreUppercase: boolean;
12446
+ ignoreWordsWithNumbers: boolean;
12447
+ ignoreInternetAddresses: boolean;
12448
+ flagRepeatedWords: boolean;
12449
+ checkSpellingAsYouType: boolean;
12450
+ hideSpellingErrors: boolean;
12451
+ }
12452
+ /**
12453
+ * File > Options > Save.
12454
+ *
12455
+ * Font embedding deliberately has NO entry here. It is owned by the File >
12456
+ * Fonts panel, whose toggle is the one the save path reads (see
12457
+ * `render/font-embedding`: `describeFontEmbedding` decides the toggle's start
12458
+ * position and whether it can do anything at all, `embeddedFontSaveOptions`
12459
+ * turns it into the `PptxHandler.save()` slice). This group used to carry a
12460
+ * second `embedFonts` boolean, plus an `embedAllFontCharacters` companion, and
12461
+ * neither was read by anything: the pane moved a switch that changed no saved
12462
+ * byte, while the panel next door moved the real one. Two switches for one
12463
+ * setting, one of them lying, is worse than one switch in a less
12464
+ * PowerPoint-shaped place.
12465
+ */
12466
+ interface ViewerSaveOptions {
12467
+ autoSave: boolean;
12468
+ autoRecoverIntervalMinutes: number;
12469
+ keepLastAutoRecoveredVersion: boolean;
12470
+ defaultExportFormat: DefaultExportFormat;
12471
+ cacheRetentionDays: number;
12472
+ clearCacheOnClose: boolean;
12473
+ }
12474
+ interface ViewerAccessibilityOptions {
12475
+ showAccessibilityStatus: boolean;
12476
+ feedbackWithSound: boolean;
12477
+ soundScheme: FeedbackSoundScheme;
12478
+ showShortcutKeysInScreenTips: boolean;
12479
+ reducedMotion: boolean;
12480
+ }
12481
+ interface ViewerAdvancedOptions {
12482
+ autoSelectEntireWord: boolean;
12483
+ allowTextDragAndDrop: boolean;
12484
+ maximumUndoSteps: number;
12485
+ useSmartCutAndPaste: boolean;
12486
+ showPasteOptionsButton: boolean;
12487
+ imageDefaultResolution: ImageResolutionPreset;
12488
+ doNotCompressImages: boolean;
12489
+ chartPropertiesFollowDataPoint: boolean;
12490
+ recentPresentationsCount: number;
12491
+ showVerticalRuler: boolean;
12492
+ showGrid: boolean;
12493
+ snapToGrid: boolean;
12494
+ disableHardwareAcceleration: boolean;
12495
+ /**
12496
+ * Force every opt-in interactive 3D scene (SmartArt, bar/line/area/pie/
12497
+ * surface charts) to fall back to its flat 2D rendering, even when the
12498
+ * host has enabled that scene via its own `smartArt3D`/`*Chart3D` prop.
12499
+ * A host opting in says "this deck may want 3D"; this is the viewer
12500
+ * user's own override for when the WebGL scenes it renders are too much
12501
+ * for their machine. See `resolve3DRenderingFlags`.
12502
+ */
12503
+ disable3DRendering: boolean;
12504
+ /**
12505
+ * `p:animEffect/@filter="pixelate"` defaults to snapping the element to
12506
+ * its end state (`cutIn`/`cutOut`), matching PowerPoint's own behaviour
12507
+ * (COM `CreateVideo` frame-diffing shows PowerPoint performs no animation
12508
+ * at all for this filter value). This turns on the blocky mosaic reveal
12509
+ * this renderer can build instead, for a viewer that would rather show
12510
+ * something animating than PowerPoint's own instant swap. See
12511
+ * `resolveFilterEffect` in `animation-filter-effects.ts` and
12512
+ * `docs/guide/visual-effects.md`.
12513
+ */
12514
+ pixelateMosaicAnimation: boolean;
12515
+ openDocumentsView: OpenDocumentsView;
12516
+ slideShowShowMenuOnRightClick: boolean;
12517
+ slideShowShowPopupToolbar: boolean;
12518
+ slideShowPromptKeepInkAnnotations: boolean;
12519
+ slideShowEndWithBlackSlide: boolean;
12520
+ printInBackground: boolean;
12521
+ printHighQuality: boolean;
12522
+ printUseMostRecentSettings: boolean;
12523
+ printWhat: OptionsPrintWhat;
12524
+ printColorMode: OptionsPrintColorMode;
12525
+ printHiddenSlides: boolean;
12526
+ printScaleToFit: boolean;
12527
+ printFrameSlides: boolean;
12528
+ }
12529
+ interface ViewerRibbonOptions {
12530
+ /** Ribbon tabs unticked in Customize Ribbon. The File tab can never be hidden. */
12531
+ hiddenTabIds: ToolbarTabId[];
12532
+ }
12533
+ interface ViewerQuickAccessOptions {
12534
+ visible: boolean;
12535
+ position: QuickAccessPosition;
12536
+ showCommandLabels: boolean;
12537
+ /** Ordered ids from `QUICK_ACCESS_COMMAND_CATALOG`. */
12538
+ commandIds: string[];
12539
+ }
12540
+ interface ViewerTrustOptions {
12541
+ openInProtectedView: boolean;
12542
+ allowExternalContent: boolean;
12543
+ confirmExternalHyperlinks: boolean;
12544
+ }
12545
+ interface ViewerOptions {
12546
+ general: ViewerGeneralOptions;
12547
+ proofing: ViewerProofingOptions;
12548
+ save: ViewerSaveOptions;
12549
+ accessibility: ViewerAccessibilityOptions;
12550
+ advanced: ViewerAdvancedOptions;
12551
+ ribbon: ViewerRibbonOptions;
12552
+ quickAccess: ViewerQuickAccessOptions;
12553
+ trust: ViewerTrustOptions;
12554
+ }
12555
+ type ViewerOptionsGroupId = keyof ViewerOptions;
12556
+ type ViewerOptionPrimitive = boolean | number | string;
12557
+ //#endregion
12558
+ //#region src/render/options/viewer-options-controls.d.ts
12559
+ /**
12560
+ * Control/section/tab descriptor types for the File > Options schema, plus
12561
+ * the terse constructors the tab-definition modules build panes with.
12562
+ */
12563
+ type ViewerOptionsTabId = 'general' | 'proofing' | 'save' | 'language' | 'accessibility' | 'advanced' | 'ribbon' | 'quickAccess' | 'addIns' | 'trust';
12564
+ //#endregion
12565
+ //#region src/render/customization/customization-types.d.ts
12566
+ /** Keys of an options group whose value is a primitive (not an array). */
12567
+ type PrimitiveKeys<T> = { [K in keyof T]: T[K] extends ViewerOptionPrimitive ? K : never; }[keyof T] & string;
12568
+ /**
12569
+ * One File > Options setting, addressed as `<group>.<key>`, for example
12570
+ * `general.userName` or `advanced.showGrid`. The union is derived from the
12571
+ * `ViewerOptions` model itself, so a typo is a compile error.
12572
+ */
12573
+ type OptionsSettingId = { [G in ViewerOptionsGroupId]: `${G}.${PrimitiveKeys<ViewerOptions[G]>}`; }[ViewerOptionsGroupId];
12574
+ /**
12575
+ * A File > Options page: the ten PowerPoint categories plus `ai`, the AI
12576
+ * assistant page a binding adds when the host configured an assistant.
12577
+ */
12578
+ type OptionsPageId = ViewerOptionsTabId | 'ai';
12579
+ /**
12580
+ * One section of an Options page, addressed as `<page>.<section>`, for
12581
+ * example `general.personalize` or `advanced.print`. The full list is
12582
+ * `OPTIONS_SECTION_IDS` (derived from the schema at runtime).
12583
+ */
12584
+ type OptionsSectionId = `${ViewerOptionsTabId}.${string}`;
12585
+ /** Values a host forces onto settings. */
12586
+ type OptionsSettingValues = Partial<Record<OptionsSettingId, ViewerOptionPrimitive>>;
12587
+ /** Ribbon and toolbar customisation. */
12588
+ interface RibbonCustomization {
12589
+ /** Ribbon tabs to remove (the File tab included, unlike Customize Ribbon). */
12590
+ hiddenTabs?: readonly ToolbarTabId[];
12591
+ /** Top-level toolbar buttons / control clusters to remove. */
12592
+ hiddenButtons?: readonly ToolbarButtonId[];
12593
+ }
12594
+ /** File > Options (the Settings dialog) customisation. */
12595
+ interface OptionsCustomization {
12596
+ /** Whole pages to remove from the dialog's category rail. */
12597
+ hiddenPages?: readonly OptionsPageId[];
12598
+ /** Sections (`<page>.<section>`) to remove from their page. */
12599
+ hiddenSections?: readonly OptionsSectionId[];
12600
+ /** Individual settings (`<group>.<key>`) to remove wherever they appear. */
12601
+ hiddenSettings?: readonly OptionsSettingId[];
12602
+ /**
12603
+ * Settings pinned to a fixed value. The value is forced into the options
12604
+ * store, user edits to it are ignored, and the control renders read-only.
12605
+ * Add the id to `hiddenSettings` too to lock it invisibly.
12606
+ */
12607
+ locked?: OptionsSettingValues;
12608
+ /**
12609
+ * Host defaults: the value a setting starts at when the user has not saved
12610
+ * a choice of their own. "Reset" returns to these, not to the built-ins.
12611
+ */
12612
+ defaults?: OptionsSettingValues;
12613
+ }
12614
+ /** File tab (backstage) customisation. */
12615
+ interface BackstageCustomization {
12616
+ /** Navigation entries (pages) to remove from the File tab. */
12617
+ hiddenPages?: readonly BackstagePage[];
12618
+ /** Action cards to remove from the pages that show them. */
12619
+ hiddenCards?: readonly BackstageCardId[];
12620
+ }
12621
+ /** Right-click menu customisation. */
12622
+ interface ContextMenuCustomization {
12623
+ /** Entries to remove from the element (right-click on a shape) menu. */
12624
+ hiddenElementCommands?: readonly ContextMenuCommandId[];
12625
+ /** Entries to remove from the empty-canvas menu. */
12626
+ hiddenCanvasCommands?: readonly CanvasContextMenuCommandId[];
12627
+ /** Remove the element context menu entirely. */
12628
+ disableElementMenu?: boolean;
12629
+ /** Remove the empty-canvas context menu entirely. */
12630
+ disableCanvasMenu?: boolean;
12631
+ }
12632
+ /**
12633
+ * A shortcut chord in the form `Mod+Shift+D`: modifiers `Mod` (Ctrl on
12634
+ * Windows/Linux, Cmd on macOS), `Ctrl`, `Meta`, `Alt`, `Shift`, joined by `+`,
12635
+ * followed by a `KeyboardEvent.key` value (`D`, `Delete`, `ArrowLeft`, `F2`).
12636
+ */
12637
+ type ShortcutChord = string;
12638
+ /** Editor keyboard-shortcut customisation. */
12639
+ interface KeyboardCustomization {
12640
+ /** Turn every editor shortcut off (the host owns the keyboard). */
12641
+ disableAll?: boolean;
12642
+ /** Editor commands whose shortcut is turned off. */
12643
+ disabled?: readonly EditorKeyActionName[];
12644
+ /**
12645
+ * Replacement chords per command. A remapped command no longer answers to
12646
+ * its built-in chord; it answers to the chord(s) given here instead.
12647
+ */
12648
+ remap?: Partial<Record<EditorKeyActionName, ShortcutChord | readonly ShortcutChord[]>>;
12649
+ }
12650
+ /**
12651
+ * Chrome regions a host can remove. Each id maps onto one region in every
12652
+ * binding; see `VIEWER_PANEL_IDS` for the catalogue.
12653
+ */
12654
+ type ViewerPanelId = 'statusBar' | 'slidesPane' | 'inspector' | 'notes' | 'quickAccessToolbar' | 'titleBar';
12655
+ /** Feature areas that can be switched off as a whole. */
12656
+ type ViewerFeatureId = 'ai' | 'collaboration' | 'comments' | 'presentMode';
12657
+ /** Dialogs (and the entry points that open them) a host can remove. */
12658
+ type ViewerDialogId = 'options' | 'share' | 'broadcast' | 'print' | 'export';
12659
+ /** Export formats offered by the File > Export page. */
12660
+ type ViewerExportFormatId = 'pdf' | 'png' | 'video' | 'gif' | 'json' | 'copyImage';
12661
+ /**
12662
+ * The whole customisation object. Every field is optional; omitted fields hide
12663
+ * nothing and lock nothing.
12664
+ */
12665
+ interface ViewerCustomization {
12666
+ ribbon?: RibbonCustomization;
12667
+ options?: OptionsCustomization;
12668
+ backstage?: BackstageCustomization;
12669
+ contextMenu?: ContextMenuCustomization;
12670
+ keyboard?: KeyboardCustomization;
12671
+ /** Chrome regions to remove (`true` hides). */
12672
+ hiddenPanels?: readonly ViewerPanelId[];
12673
+ /** Feature areas to switch off (their buttons, menus, pages and panels). */
12674
+ disabledFeatures?: readonly ViewerFeatureId[];
12675
+ /** Dialogs to remove, along with every entry point that opens them. */
12676
+ hiddenDialogs?: readonly ViewerDialogId[];
12677
+ /** Export formats to remove from File > Export. */
12678
+ hiddenExportFormats?: readonly ViewerExportFormatId[];
12679
+ }
12680
+ //#endregion
12681
+ //#region src/render/customization/customization-controller.d.ts
12682
+ /** The imperative methods every binding's component handle exposes. */
12683
+ interface ViewerCustomizationApi {
12684
+ /** The current customisation object (a snapshot; do not mutate). */
12685
+ getCustomization(): ViewerCustomization;
12686
+ /** Replace the whole customisation. */
12687
+ setCustomization(next: ViewerCustomization): void;
12688
+ /** Merge a partial customisation (see `mergeCustomization`). */
12689
+ updateCustomization(patch: ViewerCustomization): void;
12690
+ /** Drop every customisation, back to the stock UI. */
12691
+ resetCustomization(): void;
12692
+ hideRibbonTab(tab: ToolbarTabId): void;
12693
+ showRibbonTab(tab: ToolbarTabId): void;
12694
+ hideToolbarButton(button: ToolbarButtonId): void;
12695
+ showToolbarButton(button: ToolbarButtonId): void;
12696
+ hideOptionsPage(page: OptionsPageId): void;
12697
+ showOptionsPage(page: OptionsPageId): void;
12698
+ hideOptionsSection(section: OptionsSectionId): void;
12699
+ showOptionsSection(section: OptionsSectionId): void;
12700
+ hideSetting(setting: OptionsSettingId): void;
12701
+ showSetting(setting: OptionsSettingId): void;
12702
+ /** Pin a setting to `value`; `hidden` also removes it from the dialog. */
12703
+ lockSetting(setting: OptionsSettingId, value: ViewerOptionPrimitive, hidden?: boolean): void;
12704
+ unlockSetting(setting: OptionsSettingId): void;
12705
+ /** Set (or with `undefined`, clear) the host default for a setting. */
12706
+ setSettingDefault(setting: OptionsSettingId, value: ViewerOptionPrimitive | undefined): void;
12707
+ hideBackstagePage(page: BackstagePage): void;
12708
+ showBackstagePage(page: BackstagePage): void;
12709
+ hideBackstageCard(card: BackstageCardId): void;
12710
+ showBackstageCard(card: BackstageCardId): void;
12711
+ hideContextMenuCommand(command: ContextMenuCommandId): void;
12712
+ showContextMenuCommand(command: ContextMenuCommandId): void;
12713
+ hideCanvasContextMenuCommand(command: CanvasContextMenuCommandId): void;
12714
+ showCanvasContextMenuCommand(command: CanvasContextMenuCommandId): void;
12715
+ disableShortcut(action: EditorKeyActionName): void;
12716
+ enableShortcut(action: EditorKeyActionName): void;
12717
+ /** Move a command onto new chord(s); `undefined` restores the built-in chord. */
12718
+ remapShortcut(action: EditorKeyActionName, chords: ShortcutChord | readonly ShortcutChord[] | undefined): void;
12719
+ setPanelVisible(panel: ViewerPanelId, visible: boolean): void;
12720
+ setFeatureEnabled(feature: ViewerFeatureId, enabled: boolean): void;
12721
+ setDialogAvailable(dialog: ViewerDialogId, available: boolean): void;
12722
+ }
12723
+ //#endregion
12363
12724
  //#region src/render/viewport-fit.d.ts
12364
12725
  /** Unscaled CSS pixels reserved on each side of the ordinary viewer viewport. */
12365
12726
  type ViewportFitPadding = number | {
@@ -13206,8 +13567,14 @@ interface PowerPointViewerProps extends ViewportFitOptions {
13206
13567
  * @see {@link PptxAiConfig}
13207
13568
  */
13208
13569
  ai?: PptxAiConfig;
13570
+ /**
13571
+ * Framework-neutral UI customisation. See docs/guide/customization.md.
13572
+ * Unioned with `hiddenActions`. A new object replaces the whole
13573
+ * customisation, including edits made through the handle helpers.
13574
+ */
13575
+ customization?: ViewerCustomization;
13209
13576
  }
13210
- interface PowerPointViewerHandle extends FileViewerHandle, PowerPointViewerAPI {
13577
+ interface PowerPointViewerHandle extends FileViewerHandle, PowerPointViewerAPI, ViewerCustomizationApi {
13211
13578
  getContent: () => Promise<Uint8Array>;
13212
13579
  }
13213
13580
 
@@ -1,96 +1,96 @@
1
1
  'use strict';
2
2
 
3
- var chunkUZFCFYK6_js = require('../chunk-UZFCFYK6.js');
4
- require('../chunk-T35BGKZG.js');
5
- var chunkY4VRYQQS_js = require('../chunk-Y4VRYQQS.js');
6
- var chunk6FVYG27J_js = require('../chunk-6FVYG27J.js');
7
- var chunkLYZQLV7R_js = require('../chunk-LYZQLV7R.js');
8
- require('../chunk-UMQV2432.js');
3
+ var chunkDFSWCVRW_js = require('../chunk-DFSWCVRW.js');
4
+ require('../chunk-5V5SMT5A.js');
5
+ var chunkIBHIXBC5_js = require('../chunk-IBHIXBC5.js');
6
+ var chunkY4QUVWZC_js = require('../chunk-Y4QUVWZC.js');
7
+ var chunkFZSYLXJT_js = require('../chunk-FZSYLXJT.js');
8
+ require('../chunk-3JUZOKFI.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 chunkUZFCFYK6_js.CollaborationStatusIndicator; }
15
+ get: function () { return chunkDFSWCVRW_js.CollaborationStatusIndicator; }
16
16
  });
17
17
  Object.defineProperty(exports, "PowerPointViewer", {
18
18
  enumerable: true,
19
- get: function () { return chunkUZFCFYK6_js.PowerPointViewer; }
19
+ get: function () { return chunkDFSWCVRW_js.PowerPointViewer; }
20
20
  });
21
21
  Object.defineProperty(exports, "UserAvatarBar", {
22
22
  enumerable: true,
23
- get: function () { return chunkUZFCFYK6_js.UserAvatarBar; }
23
+ get: function () { return chunkDFSWCVRW_js.UserAvatarBar; }
24
24
  });
25
25
  Object.defineProperty(exports, "CollaborationProvider", {
26
26
  enumerable: true,
27
- get: function () { return chunkY4VRYQQS_js.CollaborationProvider; }
27
+ get: function () { return chunkIBHIXBC5_js.CollaborationProvider; }
28
28
  });
29
29
  Object.defineProperty(exports, "RemoteUserCursors", {
30
30
  enumerable: true,
31
- get: function () { return chunkY4VRYQQS_js.RemoteUserCursors; }
31
+ get: function () { return chunkIBHIXBC5_js.RemoteUserCursors; }
32
32
  });
33
33
  Object.defineProperty(exports, "isAudienceTab", {
34
34
  enumerable: true,
35
- get: function () { return chunkY4VRYQQS_js.isAudienceTab; }
35
+ get: function () { return chunkIBHIXBC5_js.isAudienceTab; }
36
36
  });
37
37
  Object.defineProperty(exports, "parseAudienceNonce", {
38
38
  enumerable: true,
39
- get: function () { return chunkY4VRYQQS_js.parseAudienceNonce; }
39
+ get: function () { return chunkIBHIXBC5_js.parseAudienceNonce; }
40
40
  });
41
41
  Object.defineProperty(exports, "useCollaborativeHistory", {
42
42
  enumerable: true,
43
- get: function () { return chunkY4VRYQQS_js.useCollaborativeHistory; }
43
+ get: function () { return chunkIBHIXBC5_js.useCollaborativeHistory; }
44
44
  });
45
45
  Object.defineProperty(exports, "useCollaborativeState", {
46
46
  enumerable: true,
47
- get: function () { return chunkY4VRYQQS_js.useCollaborativeState; }
47
+ get: function () { return chunkIBHIXBC5_js.useCollaborativeState; }
48
48
  });
49
49
  Object.defineProperty(exports, "usePresenceTracking", {
50
50
  enumerable: true,
51
- get: function () { return chunkY4VRYQQS_js.usePresenceTracking; }
51
+ get: function () { return chunkIBHIXBC5_js.usePresenceTracking; }
52
52
  });
53
53
  Object.defineProperty(exports, "useThemeSwitching", {
54
54
  enumerable: true,
55
- get: function () { return chunkY4VRYQQS_js.useThemeSwitching; }
55
+ get: function () { return chunkIBHIXBC5_js.useThemeSwitching; }
56
56
  });
57
57
  Object.defineProperty(exports, "useYjsProvider", {
58
58
  enumerable: true,
59
- get: function () { return chunkY4VRYQQS_js.useYjsProvider; }
59
+ get: function () { return chunkIBHIXBC5_js.useYjsProvider; }
60
60
  });
61
61
  Object.defineProperty(exports, "getAnimationInitialStyle", {
62
62
  enumerable: true,
63
- get: function () { return chunk6FVYG27J_js.getAnimationInitialStyle; }
63
+ get: function () { return chunkY4QUVWZC_js.getAnimationInitialStyle; }
64
64
  });
65
65
  Object.defineProperty(exports, "clearAudienceContent", {
66
66
  enumerable: true,
67
- get: function () { return chunkLYZQLV7R_js.clearAudienceContent; }
67
+ get: function () { return chunkFZSYLXJT_js.clearAudienceContent; }
68
68
  });
69
69
  Object.defineProperty(exports, "forgetSessionDeck", {
70
70
  enumerable: true,
71
- get: function () { return chunkLYZQLV7R_js.forgetSessionDeck; }
71
+ get: function () { return chunkFZSYLXJT_js.forgetSessionDeck; }
72
72
  });
73
73
  Object.defineProperty(exports, "getSessionTabId", {
74
74
  enumerable: true,
75
- get: function () { return chunkLYZQLV7R_js.getSessionTabId; }
75
+ get: function () { return chunkFZSYLXJT_js.getSessionTabId; }
76
76
  });
77
77
  Object.defineProperty(exports, "loadAudienceContent", {
78
78
  enumerable: true,
79
- get: function () { return chunkLYZQLV7R_js.loadAudienceContent; }
79
+ get: function () { return chunkFZSYLXJT_js.loadAudienceContent; }
80
80
  });
81
81
  Object.defineProperty(exports, "loadSessionDeck", {
82
82
  enumerable: true,
83
- get: function () { return chunkLYZQLV7R_js.loadSessionDeck; }
83
+ get: function () { return chunkFZSYLXJT_js.loadSessionDeck; }
84
84
  });
85
85
  Object.defineProperty(exports, "rememberSessionDeck", {
86
86
  enumerable: true,
87
- get: function () { return chunkLYZQLV7R_js.rememberSessionDeck; }
87
+ get: function () { return chunkFZSYLXJT_js.rememberSessionDeck; }
88
88
  });
89
89
  Object.defineProperty(exports, "restoreSessionDeck", {
90
90
  enumerable: true,
91
- get: function () { return chunkLYZQLV7R_js.restoreSessionDeck; }
91
+ get: function () { return chunkFZSYLXJT_js.restoreSessionDeck; }
92
92
  });
93
93
  Object.defineProperty(exports, "storeAudienceContent", {
94
94
  enumerable: true,
95
- get: function () { return chunkLYZQLV7R_js.storeAudienceContent; }
95
+ get: function () { return chunkFZSYLXJT_js.storeAudienceContent; }
96
96
  });
Binary file
Binary file
@@ -1,7 +1,7 @@
1
- export { CollaborationStatusIndicator, PowerPointViewer, UserAvatarBar } from '../chunk-IDV2ITXM.mjs';
2
- import '../chunk-DX2JCSQ4.mjs';
3
- export { CollaborationProvider, RemoteUserCursors, isAudienceTab, parseAudienceNonce, useCollaborativeHistory, useCollaborativeState, usePresenceTracking, useThemeSwitching, useYjsProvider } from '../chunk-PRXJ3J5W.mjs';
4
- export { getAnimationInitialStyle } from '../chunk-ZF5S3HHW.mjs';
5
- export { clearAudienceContent, forgetSessionDeck, getSessionTabId, loadAudienceContent, loadSessionDeck, rememberSessionDeck, restoreSessionDeck, storeAudienceContent } from '../chunk-VZNIVS3X.mjs';
6
- import '../chunk-APAVAD2A.mjs';
1
+ export { CollaborationStatusIndicator, PowerPointViewer, UserAvatarBar } from '../chunk-ZAQFTO4P.mjs';
2
+ import '../chunk-VCAQSSGD.mjs';
3
+ export { CollaborationProvider, RemoteUserCursors, isAudienceTab, parseAudienceNonce, useCollaborativeHistory, useCollaborativeState, usePresenceTracking, useThemeSwitching, useYjsProvider } from '../chunk-INX3E37P.mjs';
4
+ export { getAnimationInitialStyle } from '../chunk-K6QHGABT.mjs';
5
+ export { clearAudienceContent, forgetSessionDeck, getSessionTabId, loadAudienceContent, loadSessionDeck, rememberSessionDeck, restoreSessionDeck, storeAudienceContent } from '../chunk-ICEZL4TM.mjs';
6
+ import '../chunk-OOO4JL2N.mjs';
7
7
  import '../chunk-XGB3TDIC.mjs';
@@ -1,4 +1,3 @@
1
- �@��w����f�k���6�V8���?��S9��uQ����+\���&8ۖQ �v�r�h'qb�wІd��5��l;g F��H��?LXQG�8�?��ax�?�jbLiaja�xA45�SJ�ٰ9*�F�[1:��0\qN]X��7Kh���Ry������#��f���\<$�
2
- / �"$%!�x�oM�/]?�i�M�;횛[��2�Z�
3
- �������EN�
4
- �b[�"�>�m-�7�v�#��bN���T��P�
1
+ ����8�� ݣ�u��vT��7Ra�m��6��^�a���x$�m[D챷�-��@���ɰ߽�ȶ�ƣ�����!��x���0Q��^���?D�T��[��c# ��|s���a'P�r����`��1
2
+ ~�.W���*k;ܑEI�T����Ǩ��V�J]�+;��BE~a%J'��:�9��vPq:'1ɚ�x��>�'dp3�]1�LYɐr���XH|�5g��F]hc������[��B-���TB�9ΨL
3
+ _�z��o<|7���@e*\��*
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pptx-react-viewer",
3
- "version": "4.5.0",
3
+ "version": "4.6.0",
4
4
  "description": "React PowerPoint viewer and editor component: 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