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.
- package/CHANGELOG.md +44 -0
- package/README.md +34 -33
- package/dist/{AiChatPanel-P2N6X2KB.js → AiChatPanel-3C7GM6ZF.js} +28 -28
- package/dist/AiChatPanel-3C7GM6ZF.js.br +0 -0
- package/dist/AiChatPanel-3C7GM6ZF.js.gz +0 -0
- package/dist/{AiChatPanel-HXGCZPUX.mjs → AiChatPanel-L7DBCWE3.mjs} +4 -4
- package/dist/AiChatPanel-L7DBCWE3.mjs.br +0 -0
- package/dist/AiChatPanel-L7DBCWE3.mjs.gz +0 -0
- package/dist/{Model3DScene-QXMMJRV3.mjs → Model3DScene-IJ7YYTYU.mjs} +1 -1
- package/dist/Model3DScene-IJ7YYTYU.mjs.br +0 -0
- package/dist/Model3DScene-IJ7YYTYU.mjs.gz +0 -0
- package/dist/{Model3DScene-PIFMH2TU.js → Model3DScene-USKNPWWH.js} +2 -2
- package/dist/Model3DScene-USKNPWWH.js.br +0 -0
- package/dist/Model3DScene-USKNPWWH.js.gz +0 -0
- package/dist/{chunk-UMQV2432.js → chunk-3JUZOKFI.js} +1 -0
- package/dist/chunk-3JUZOKFI.js.br +0 -0
- package/dist/{chunk-UMQV2432.js.gz → chunk-3JUZOKFI.js.gz} +0 -0
- package/dist/{chunk-T35BGKZG.js → chunk-5V5SMT5A.js} +5 -5
- package/dist/chunk-5V5SMT5A.js.br +0 -0
- package/dist/chunk-5V5SMT5A.js.gz +0 -0
- package/dist/{chunk-UZFCFYK6.js → chunk-DFSWCVRW.js} +1278 -1129
- package/dist/chunk-DFSWCVRW.js.br +0 -0
- package/dist/chunk-DFSWCVRW.js.gz +0 -0
- package/dist/{chunk-LYZQLV7R.js → chunk-FZSYLXJT.js} +783 -38
- package/dist/chunk-FZSYLXJT.js.br +0 -0
- package/dist/chunk-FZSYLXJT.js.gz +0 -0
- package/dist/{chunk-Y4VRYQQS.js → chunk-IBHIXBC5.js} +865 -844
- package/dist/chunk-IBHIXBC5.js.br +0 -0
- package/dist/chunk-IBHIXBC5.js.gz +0 -0
- package/dist/{chunk-VZNIVS3X.mjs → chunk-ICEZL4TM.mjs} +755 -38
- package/dist/chunk-ICEZL4TM.mjs.br +0 -0
- package/dist/chunk-ICEZL4TM.mjs.gz +0 -0
- package/dist/{chunk-PRXJ3J5W.mjs → chunk-INX3E37P.mjs} +53 -32
- package/dist/chunk-INX3E37P.mjs.br +0 -0
- package/dist/chunk-INX3E37P.mjs.gz +0 -0
- package/dist/{chunk-ZF5S3HHW.mjs → chunk-K6QHGABT.mjs} +2 -2
- package/dist/chunk-K6QHGABT.mjs.br +0 -0
- package/dist/chunk-K6QHGABT.mjs.gz +0 -0
- package/dist/{chunk-APAVAD2A.mjs → chunk-OOO4JL2N.mjs} +1 -0
- package/dist/chunk-OOO4JL2N.mjs.br +0 -0
- package/dist/{chunk-APAVAD2A.mjs.gz → chunk-OOO4JL2N.mjs.gz} +0 -0
- package/dist/{chunk-DX2JCSQ4.mjs → chunk-VCAQSSGD.mjs} +1 -1
- package/dist/chunk-VCAQSSGD.mjs.br +0 -0
- package/dist/chunk-VCAQSSGD.mjs.gz +0 -0
- package/dist/{chunk-6FVYG27J.js → chunk-Y4QUVWZC.js} +188 -188
- package/dist/chunk-Y4QUVWZC.js.br +0 -0
- package/dist/chunk-Y4QUVWZC.js.gz +0 -0
- package/dist/{chunk-IDV2ITXM.mjs → chunk-ZAQFTO4P.mjs} +220 -71
- package/dist/chunk-ZAQFTO4P.mjs.br +0 -0
- package/dist/chunk-ZAQFTO4P.mjs.gz +0 -0
- package/dist/i18n/de.cjs +1 -0
- package/dist/i18n/de.cjs.br +0 -0
- package/dist/i18n/de.cjs.gz +0 -0
- package/dist/i18n/de.mjs +1 -0
- package/dist/i18n/de.mjs.br +0 -0
- package/dist/i18n/de.mjs.gz +0 -0
- package/dist/i18n/es.cjs +1 -0
- package/dist/i18n/es.cjs.br +0 -0
- package/dist/i18n/es.cjs.gz +0 -0
- package/dist/i18n/es.mjs +1 -0
- package/dist/i18n/es.mjs.br +0 -0
- package/dist/i18n/es.mjs.gz +0 -0
- package/dist/i18n/fr.cjs +1 -0
- package/dist/i18n/fr.cjs.br +0 -0
- package/dist/i18n/fr.cjs.gz +0 -0
- package/dist/i18n/fr.mjs +1 -0
- package/dist/i18n/fr.mjs.br +0 -0
- package/dist/i18n/fr.mjs.gz +0 -0
- package/dist/i18n/zh-CN.cjs +1 -0
- package/dist/i18n/zh-CN.cjs.br +0 -0
- package/dist/i18n/zh-CN.cjs.gz +0 -0
- package/dist/i18n/zh-CN.mjs +1 -0
- package/dist/i18n/zh-CN.mjs.br +0 -0
- package/dist/i18n/zh-CN.mjs.gz +0 -0
- package/dist/i18n.js +4 -4
- package/dist/i18n.js.br +0 -0
- package/dist/i18n.js.gz +0 -0
- package/dist/i18n.mjs +1 -1
- package/dist/i18n.mjs.br +0 -0
- package/dist/i18n.mjs.gz +0 -0
- package/dist/index.d.ts +266 -3
- package/dist/index.js +105 -49
- package/dist/index.js.br +0 -0
- package/dist/index.js.gz +0 -0
- package/dist/index.mjs +6 -6
- package/dist/index.mjs.br +0 -0
- package/dist/index.mjs.gz +0 -0
- package/dist/internals.d.ts +273 -2
- package/dist/internals.js +105 -105
- package/dist/internals.js.br +0 -0
- package/dist/internals.js.gz +0 -0
- package/dist/internals.mjs +4 -4
- package/dist/internals.mjs.br +0 -0
- package/dist/internals.mjs.gz +0 -0
- package/dist/viewer/index.d.ts +368 -1
- package/dist/viewer/index.js +27 -27
- package/dist/viewer/index.js.br +0 -0
- package/dist/viewer/index.js.gz +0 -0
- package/dist/viewer/index.mjs +6 -6
- package/dist/viewer/index.mjs.br +3 -4
- package/dist/viewer/index.mjs.gz +0 -0
- package/package.json +1 -1
- package/dist/AiChatPanel-HXGCZPUX.mjs.br +0 -0
- package/dist/AiChatPanel-HXGCZPUX.mjs.gz +0 -0
- package/dist/AiChatPanel-P2N6X2KB.js.br +0 -0
- package/dist/AiChatPanel-P2N6X2KB.js.gz +0 -0
- package/dist/Model3DScene-PIFMH2TU.js.br +0 -0
- package/dist/Model3DScene-PIFMH2TU.js.gz +0 -0
- package/dist/Model3DScene-QXMMJRV3.mjs.br +0 -0
- package/dist/Model3DScene-QXMMJRV3.mjs.gz +0 -0
- package/dist/chunk-6FVYG27J.js.br +0 -0
- package/dist/chunk-6FVYG27J.js.gz +0 -0
- package/dist/chunk-APAVAD2A.mjs.br +0 -0
- package/dist/chunk-DX2JCSQ4.mjs.br +0 -0
- package/dist/chunk-DX2JCSQ4.mjs.gz +0 -0
- package/dist/chunk-IDV2ITXM.mjs.br +0 -0
- package/dist/chunk-IDV2ITXM.mjs.gz +0 -0
- package/dist/chunk-LYZQLV7R.js.br +0 -0
- package/dist/chunk-LYZQLV7R.js.gz +0 -0
- package/dist/chunk-PRXJ3J5W.mjs.br +0 -0
- package/dist/chunk-PRXJ3J5W.mjs.gz +0 -0
- package/dist/chunk-T35BGKZG.js.br +0 -0
- package/dist/chunk-T35BGKZG.js.gz +0 -0
- package/dist/chunk-UMQV2432.js.br +0 -0
- package/dist/chunk-UZFCFYK6.js.br +0 -0
- package/dist/chunk-UZFCFYK6.js.gz +0 -0
- package/dist/chunk-VZNIVS3X.mjs.br +0 -0
- package/dist/chunk-VZNIVS3X.mjs.gz +0 -0
- package/dist/chunk-Y4VRYQQS.js.br +0 -0
- package/dist/chunk-Y4VRYQQS.js.gz +0 -0
- package/dist/chunk-ZF5S3HHW.mjs.br +0 -0
- package/dist/chunk-ZF5S3HHW.mjs.gz +0 -0
package/dist/internals.d.ts
CHANGED
|
@@ -13354,6 +13354,27 @@ interface PresentationInkStroke {
|
|
|
13354
13354
|
width: number;
|
|
13355
13355
|
points: PresentationInkPoint[];
|
|
13356
13356
|
}
|
|
13357
|
+
/** A logical editor command produced by one key press. */
|
|
13358
|
+
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';
|
|
13359
|
+
/** Every command a canvas context menu can offer, in no particular order. */
|
|
13360
|
+
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';
|
|
13361
|
+
//#endregion
|
|
13362
|
+
//#region src/render/canvas-context-menu-commands.d.ts
|
|
13363
|
+
/**
|
|
13364
|
+
* The right-click menu for the empty slide canvas (no element under the
|
|
13365
|
+
* cursor), as distinct from {@link ./context-menu-commands}'s per-element menu.
|
|
13366
|
+
*
|
|
13367
|
+
* Right-clicking empty canvas used to do nothing at all in every binding: React
|
|
13368
|
+
* and Vue both bailed out early (`getElementIdFromEvent` returns `null`, so the
|
|
13369
|
+
* handler just returns) rather than opening a menu, and the other three never
|
|
13370
|
+
* wired a handler for it either. PowerPoint offers Paste, Layout, Reset,
|
|
13371
|
+
* Format Background and view toggles (Grid and Guides, Ruler) from this menu;
|
|
13372
|
+
* this module is the one list every binding renders instead of five omissions.
|
|
13373
|
+
*
|
|
13374
|
+
* @module render/canvas-context-menu-commands
|
|
13375
|
+
*/
|
|
13376
|
+
/** Every command the empty-canvas context menu can offer, in no particular order. */
|
|
13377
|
+
type CanvasContextMenuCommandId = 'paste' | 'layout' | 'reset-slide' | 'format-background' | 'grid-and-guides' | 'ruler';
|
|
13357
13378
|
//#endregion
|
|
13358
13379
|
//#region src/render/paste-special.d.ts
|
|
13359
13380
|
/** The four paste formats PowerPoint's Paste Options / Paste Special offer. */
|
|
@@ -13487,6 +13508,21 @@ interface AutosaveRecoveryPrompt {
|
|
|
13487
13508
|
readonly restoreKey: string;
|
|
13488
13509
|
readonly discardKey: string;
|
|
13489
13510
|
}
|
|
13511
|
+
type BackstagePage = 'home' | 'new' | 'open' | 'info' | 'save' | 'saveAs' | 'print' | 'share' | 'export' | 'close' | 'account' | 'options';
|
|
13512
|
+
//#endregion
|
|
13513
|
+
//#region src/render/backstage-cards.d.ts
|
|
13514
|
+
/**
|
|
13515
|
+
* Every action card the File-tab backstage can show, keyed by the operation it
|
|
13516
|
+
* triggers rather than by its wording.
|
|
13517
|
+
*
|
|
13518
|
+
* The five bindings used to hardcode a title and a body string each, which made
|
|
13519
|
+
* the whole backstage untranslatable and let the copy drift: the same card
|
|
13520
|
+
* carried four different descriptions depending on which binding you opened it
|
|
13521
|
+
* in. Both halves now live here as a dictionary key plus an English fallback,
|
|
13522
|
+
* so a wording change lands everywhere at once and a translator only has to
|
|
13523
|
+
* translate it once.
|
|
13524
|
+
*/
|
|
13525
|
+
type BackstageCardId = 'protect' | 'inspect' | 'embedFonts' | 'signatures' | 'versionHistory' | 'saveAsPptx' | 'saveAsPpsx' | 'saveAsPptm' | 'saveAsPpt' | 'pdf' | 'png' | 'video' | 'gif' | 'json' | 'copyImage' | 'print' | 'share';
|
|
13490
13526
|
//#endregion
|
|
13491
13527
|
//#region src/render/master-view.d.ts
|
|
13492
13528
|
/** Which part the master view is currently pointed at. */
|
|
@@ -13792,6 +13828,136 @@ interface PrintSettings {
|
|
|
13792
13828
|
scaleToFit?: boolean;
|
|
13793
13829
|
}
|
|
13794
13830
|
//#endregion
|
|
13831
|
+
//#region src/render/options/viewer-options-controls.d.ts
|
|
13832
|
+
/**
|
|
13833
|
+
* Control/section/tab descriptor types for the File > Options schema, plus
|
|
13834
|
+
* the terse constructors the tab-definition modules build panes with.
|
|
13835
|
+
*/
|
|
13836
|
+
type ViewerOptionsTabId = 'general' | 'proofing' | 'save' | 'language' | 'accessibility' | 'advanced' | 'ribbon' | 'quickAccess' | 'addIns' | 'trust';
|
|
13837
|
+
//#endregion
|
|
13838
|
+
//#region src/render/customization/customization-types.d.ts
|
|
13839
|
+
/** Keys of an options group whose value is a primitive (not an array). */
|
|
13840
|
+
type PrimitiveKeys<T> = { [K in keyof T]: T[K] extends ViewerOptionPrimitive ? K : never; }[keyof T] & string;
|
|
13841
|
+
/**
|
|
13842
|
+
* One File > Options setting, addressed as `<group>.<key>`, for example
|
|
13843
|
+
* `general.userName` or `advanced.showGrid`. The union is derived from the
|
|
13844
|
+
* `ViewerOptions` model itself, so a typo is a compile error.
|
|
13845
|
+
*/
|
|
13846
|
+
type OptionsSettingId = { [G in ViewerOptionsGroupId]: `${G}.${PrimitiveKeys<ViewerOptions[G]>}`; }[ViewerOptionsGroupId];
|
|
13847
|
+
/**
|
|
13848
|
+
* A File > Options page: the ten PowerPoint categories plus `ai`, the AI
|
|
13849
|
+
* assistant page a binding adds when the host configured an assistant.
|
|
13850
|
+
*/
|
|
13851
|
+
type OptionsPageId = ViewerOptionsTabId | 'ai';
|
|
13852
|
+
/**
|
|
13853
|
+
* One section of an Options page, addressed as `<page>.<section>`, for
|
|
13854
|
+
* example `general.personalize` or `advanced.print`. The full list is
|
|
13855
|
+
* `OPTIONS_SECTION_IDS` (derived from the schema at runtime).
|
|
13856
|
+
*/
|
|
13857
|
+
type OptionsSectionId = `${ViewerOptionsTabId}.${string}`;
|
|
13858
|
+
/** Values a host forces onto settings. */
|
|
13859
|
+
type OptionsSettingValues = Partial<Record<OptionsSettingId, ViewerOptionPrimitive>>;
|
|
13860
|
+
/** Ribbon and toolbar customisation. */
|
|
13861
|
+
interface RibbonCustomization {
|
|
13862
|
+
/** Ribbon tabs to remove (the File tab included, unlike Customize Ribbon). */
|
|
13863
|
+
hiddenTabs?: readonly ToolbarTabId[];
|
|
13864
|
+
/** Top-level toolbar buttons / control clusters to remove. */
|
|
13865
|
+
hiddenButtons?: readonly ToolbarButtonId[];
|
|
13866
|
+
}
|
|
13867
|
+
/** File > Options (the Settings dialog) customisation. */
|
|
13868
|
+
interface OptionsCustomization {
|
|
13869
|
+
/** Whole pages to remove from the dialog's category rail. */
|
|
13870
|
+
hiddenPages?: readonly OptionsPageId[];
|
|
13871
|
+
/** Sections (`<page>.<section>`) to remove from their page. */
|
|
13872
|
+
hiddenSections?: readonly OptionsSectionId[];
|
|
13873
|
+
/** Individual settings (`<group>.<key>`) to remove wherever they appear. */
|
|
13874
|
+
hiddenSettings?: readonly OptionsSettingId[];
|
|
13875
|
+
/**
|
|
13876
|
+
* Settings pinned to a fixed value. The value is forced into the options
|
|
13877
|
+
* store, user edits to it are ignored, and the control renders read-only.
|
|
13878
|
+
* Add the id to `hiddenSettings` too to lock it invisibly.
|
|
13879
|
+
*/
|
|
13880
|
+
locked?: OptionsSettingValues;
|
|
13881
|
+
/**
|
|
13882
|
+
* Host defaults: the value a setting starts at when the user has not saved
|
|
13883
|
+
* a choice of their own. "Reset" returns to these, not to the built-ins.
|
|
13884
|
+
*/
|
|
13885
|
+
defaults?: OptionsSettingValues;
|
|
13886
|
+
}
|
|
13887
|
+
/** File tab (backstage) customisation. */
|
|
13888
|
+
interface BackstageCustomization {
|
|
13889
|
+
/** Navigation entries (pages) to remove from the File tab. */
|
|
13890
|
+
hiddenPages?: readonly BackstagePage[];
|
|
13891
|
+
/** Action cards to remove from the pages that show them. */
|
|
13892
|
+
hiddenCards?: readonly BackstageCardId[];
|
|
13893
|
+
}
|
|
13894
|
+
/** Right-click menu customisation. */
|
|
13895
|
+
interface ContextMenuCustomization {
|
|
13896
|
+
/** Entries to remove from the element (right-click on a shape) menu. */
|
|
13897
|
+
hiddenElementCommands?: readonly ContextMenuCommandId[];
|
|
13898
|
+
/** Entries to remove from the empty-canvas menu. */
|
|
13899
|
+
hiddenCanvasCommands?: readonly CanvasContextMenuCommandId[];
|
|
13900
|
+
/** Remove the element context menu entirely. */
|
|
13901
|
+
disableElementMenu?: boolean;
|
|
13902
|
+
/** Remove the empty-canvas context menu entirely. */
|
|
13903
|
+
disableCanvasMenu?: boolean;
|
|
13904
|
+
}
|
|
13905
|
+
/**
|
|
13906
|
+
* A shortcut chord in the form `Mod+Shift+D`: modifiers `Mod` (Ctrl on
|
|
13907
|
+
* Windows/Linux, Cmd on macOS), `Ctrl`, `Meta`, `Alt`, `Shift`, joined by `+`,
|
|
13908
|
+
* followed by a `KeyboardEvent.key` value (`D`, `Delete`, `ArrowLeft`, `F2`).
|
|
13909
|
+
*/
|
|
13910
|
+
type ShortcutChord = string;
|
|
13911
|
+
/** Editor keyboard-shortcut customisation. */
|
|
13912
|
+
interface KeyboardCustomization {
|
|
13913
|
+
/** Turn every editor shortcut off (the host owns the keyboard). */
|
|
13914
|
+
disableAll?: boolean;
|
|
13915
|
+
/** Editor commands whose shortcut is turned off. */
|
|
13916
|
+
disabled?: readonly EditorKeyActionName[];
|
|
13917
|
+
/**
|
|
13918
|
+
* Replacement chords per command. A remapped command no longer answers to
|
|
13919
|
+
* its built-in chord; it answers to the chord(s) given here instead.
|
|
13920
|
+
*/
|
|
13921
|
+
remap?: Partial<Record<EditorKeyActionName, ShortcutChord | readonly ShortcutChord[]>>;
|
|
13922
|
+
}
|
|
13923
|
+
/**
|
|
13924
|
+
* Chrome regions a host can remove. Each id maps onto one region in every
|
|
13925
|
+
* binding; see `VIEWER_PANEL_IDS` for the catalogue.
|
|
13926
|
+
*/
|
|
13927
|
+
type ViewerPanelId = 'statusBar' | 'slidesPane' | 'inspector' | 'notes' | 'quickAccessToolbar' | 'titleBar';
|
|
13928
|
+
/** Feature areas that can be switched off as a whole. */
|
|
13929
|
+
type ViewerFeatureId = 'ai' | 'collaboration' | 'comments' | 'presentMode';
|
|
13930
|
+
/** Dialogs (and the entry points that open them) a host can remove. */
|
|
13931
|
+
type ViewerDialogId = 'options' | 'share' | 'broadcast' | 'print' | 'export';
|
|
13932
|
+
/** Export formats offered by the File > Export page. */
|
|
13933
|
+
type ViewerExportFormatId = 'pdf' | 'png' | 'video' | 'gif' | 'json' | 'copyImage';
|
|
13934
|
+
/**
|
|
13935
|
+
* The whole customisation object. Every field is optional; omitted fields hide
|
|
13936
|
+
* nothing and lock nothing.
|
|
13937
|
+
*/
|
|
13938
|
+
interface ViewerCustomization {
|
|
13939
|
+
ribbon?: RibbonCustomization;
|
|
13940
|
+
options?: OptionsCustomization;
|
|
13941
|
+
backstage?: BackstageCustomization;
|
|
13942
|
+
contextMenu?: ContextMenuCustomization;
|
|
13943
|
+
keyboard?: KeyboardCustomization;
|
|
13944
|
+
/** Chrome regions to remove (`true` hides). */
|
|
13945
|
+
hiddenPanels?: readonly ViewerPanelId[];
|
|
13946
|
+
/** Feature areas to switch off (their buttons, menus, pages and panels). */
|
|
13947
|
+
disabledFeatures?: readonly ViewerFeatureId[];
|
|
13948
|
+
/** Dialogs to remove, along with every entry point that opens them. */
|
|
13949
|
+
hiddenDialogs?: readonly ViewerDialogId[];
|
|
13950
|
+
/** Export formats to remove from File > Export. */
|
|
13951
|
+
hiddenExportFormats?: readonly ViewerExportFormatId[];
|
|
13952
|
+
}
|
|
13953
|
+
//#endregion
|
|
13954
|
+
//#region src/render/options/viewer-options-constraints.d.ts
|
|
13955
|
+
/** Locks and host defaults, both keyed `<group>.<key>`. */
|
|
13956
|
+
interface ViewerOptionsConstraints {
|
|
13957
|
+
locked?: OptionsSettingValues;
|
|
13958
|
+
defaults?: OptionsSettingValues;
|
|
13959
|
+
}
|
|
13960
|
+
//#endregion
|
|
13795
13961
|
//#region src/render/options/viewer-options-store.d.ts
|
|
13796
13962
|
/**
|
|
13797
13963
|
* Framework-neutral store behind the File > Options dialog.
|
|
@@ -13835,6 +14001,96 @@ interface ViewerOptionsStore {
|
|
|
13835
14001
|
* operation costs a single render instead of one per field.
|
|
13836
14002
|
*/
|
|
13837
14003
|
batch(write: () => void): void;
|
|
14004
|
+
/**
|
|
14005
|
+
* Apply host constraints (see `ViewerOptionsConstraints`): `locked` values
|
|
14006
|
+
* are forced in and every later write to them is ignored; `defaults`
|
|
14007
|
+
* replace the built-in defaults for settings the user never saved, and
|
|
14008
|
+
* become what `reset` returns to. Replaces any previous constraints.
|
|
14009
|
+
*/
|
|
14010
|
+
setConstraints(constraints: ViewerOptionsConstraints): void;
|
|
14011
|
+
/** True when the host locked `<group>.<key>`. */
|
|
14012
|
+
isLocked(group: ViewerOptionsGroupId, key: string): boolean;
|
|
14013
|
+
}
|
|
14014
|
+
//#endregion
|
|
14015
|
+
//#region src/render/customization/customization-keymap.d.ts
|
|
14016
|
+
/** A parsed `Mod+Shift+D` chord. */
|
|
14017
|
+
interface ParsedShortcutChord {
|
|
14018
|
+
key: string;
|
|
14019
|
+
mod: boolean;
|
|
14020
|
+
ctrl: boolean;
|
|
14021
|
+
meta: boolean;
|
|
14022
|
+
alt: boolean;
|
|
14023
|
+
shift: boolean;
|
|
14024
|
+
}
|
|
14025
|
+
/** The normalised keyboard slice of a resolved customisation. */
|
|
14026
|
+
interface ResolvedKeyboardCustomization {
|
|
14027
|
+
disableAll: boolean;
|
|
14028
|
+
disabled: ReadonlySet<EditorKeyActionName>;
|
|
14029
|
+
remap: ReadonlyMap<EditorKeyActionName, readonly ParsedShortcutChord[]>;
|
|
14030
|
+
}
|
|
14031
|
+
//#endregion
|
|
14032
|
+
//#region src/render/customization/customization-resolve.d.ts
|
|
14033
|
+
/** The normalised, set-based view of a customisation. Treat as immutable. */
|
|
14034
|
+
interface ResolvedCustomization {
|
|
14035
|
+
hiddenActions: ReadonlySet<ToolbarActionId>;
|
|
14036
|
+
hiddenOptionsPages: ReadonlySet<OptionsPageId>;
|
|
14037
|
+
hiddenOptionsSections: ReadonlySet<OptionsSectionId>;
|
|
14038
|
+
hiddenSettings: ReadonlySet<OptionsSettingId>;
|
|
14039
|
+
lockedSettings: OptionsSettingValues;
|
|
14040
|
+
defaultSettings: OptionsSettingValues;
|
|
14041
|
+
hiddenBackstagePages: ReadonlySet<BackstagePage>;
|
|
14042
|
+
hiddenBackstageCards: ReadonlySet<BackstageCardId>;
|
|
14043
|
+
hiddenElementCommands: ReadonlySet<ContextMenuCommandId>;
|
|
14044
|
+
hiddenCanvasCommands: ReadonlySet<CanvasContextMenuCommandId>;
|
|
14045
|
+
elementMenuEnabled: boolean;
|
|
14046
|
+
canvasMenuEnabled: boolean;
|
|
14047
|
+
hiddenPanels: ReadonlySet<ViewerPanelId>;
|
|
14048
|
+
disabledFeatures: ReadonlySet<ViewerFeatureId>;
|
|
14049
|
+
hiddenDialogs: ReadonlySet<ViewerDialogId>;
|
|
14050
|
+
keyboard: ResolvedKeyboardCustomization;
|
|
14051
|
+
}
|
|
14052
|
+
//#endregion
|
|
14053
|
+
//#region src/render/customization/customization-controller.d.ts
|
|
14054
|
+
/** The imperative methods every binding's component handle exposes. */
|
|
14055
|
+
interface ViewerCustomizationApi {
|
|
14056
|
+
/** The current customisation object (a snapshot; do not mutate). */
|
|
14057
|
+
getCustomization(): ViewerCustomization;
|
|
14058
|
+
/** Replace the whole customisation. */
|
|
14059
|
+
setCustomization(next: ViewerCustomization): void;
|
|
14060
|
+
/** Merge a partial customisation (see `mergeCustomization`). */
|
|
14061
|
+
updateCustomization(patch: ViewerCustomization): void;
|
|
14062
|
+
/** Drop every customisation, back to the stock UI. */
|
|
14063
|
+
resetCustomization(): void;
|
|
14064
|
+
hideRibbonTab(tab: ToolbarTabId): void;
|
|
14065
|
+
showRibbonTab(tab: ToolbarTabId): void;
|
|
14066
|
+
hideToolbarButton(button: ToolbarButtonId): void;
|
|
14067
|
+
showToolbarButton(button: ToolbarButtonId): void;
|
|
14068
|
+
hideOptionsPage(page: OptionsPageId): void;
|
|
14069
|
+
showOptionsPage(page: OptionsPageId): void;
|
|
14070
|
+
hideOptionsSection(section: OptionsSectionId): void;
|
|
14071
|
+
showOptionsSection(section: OptionsSectionId): void;
|
|
14072
|
+
hideSetting(setting: OptionsSettingId): void;
|
|
14073
|
+
showSetting(setting: OptionsSettingId): void;
|
|
14074
|
+
/** Pin a setting to `value`; `hidden` also removes it from the dialog. */
|
|
14075
|
+
lockSetting(setting: OptionsSettingId, value: ViewerOptionPrimitive, hidden?: boolean): void;
|
|
14076
|
+
unlockSetting(setting: OptionsSettingId): void;
|
|
14077
|
+
/** Set (or with `undefined`, clear) the host default for a setting. */
|
|
14078
|
+
setSettingDefault(setting: OptionsSettingId, value: ViewerOptionPrimitive | undefined): void;
|
|
14079
|
+
hideBackstagePage(page: BackstagePage): void;
|
|
14080
|
+
showBackstagePage(page: BackstagePage): void;
|
|
14081
|
+
hideBackstageCard(card: BackstageCardId): void;
|
|
14082
|
+
showBackstageCard(card: BackstageCardId): void;
|
|
14083
|
+
hideContextMenuCommand(command: ContextMenuCommandId): void;
|
|
14084
|
+
showContextMenuCommand(command: ContextMenuCommandId): void;
|
|
14085
|
+
hideCanvasContextMenuCommand(command: CanvasContextMenuCommandId): void;
|
|
14086
|
+
showCanvasContextMenuCommand(command: CanvasContextMenuCommandId): void;
|
|
14087
|
+
disableShortcut(action: EditorKeyActionName): void;
|
|
14088
|
+
enableShortcut(action: EditorKeyActionName): void;
|
|
14089
|
+
/** Move a command onto new chord(s); `undefined` restores the built-in chord. */
|
|
14090
|
+
remapShortcut(action: EditorKeyActionName, chords: ShortcutChord | readonly ShortcutChord[] | undefined): void;
|
|
14091
|
+
setPanelVisible(panel: ViewerPanelId, visible: boolean): void;
|
|
14092
|
+
setFeatureEnabled(feature: ViewerFeatureId, enabled: boolean): void;
|
|
14093
|
+
setDialogAvailable(dialog: ViewerDialogId, available: boolean): void;
|
|
13838
14094
|
}
|
|
13839
14095
|
type ReadOnlyRecommendationKind = 'modifyVerifier' | 'markedFinal' | null;
|
|
13840
14096
|
interface ReadOnlyRecommendation {
|
|
@@ -14159,7 +14415,7 @@ interface AccessibilityIssue {
|
|
|
14159
14415
|
severity: 'error' | 'warning' | 'info';
|
|
14160
14416
|
message: string;
|
|
14161
14417
|
}
|
|
14162
|
-
interface PowerPointViewerHandle extends FileViewerHandle, PowerPointViewerAPI {
|
|
14418
|
+
interface PowerPointViewerHandle extends FileViewerHandle, PowerPointViewerAPI, ViewerCustomizationApi {
|
|
14163
14419
|
getContent: () => Promise<Uint8Array>;
|
|
14164
14420
|
}
|
|
14165
14421
|
|
|
@@ -14792,6 +15048,8 @@ interface UseFindReplaceInput {
|
|
|
14792
15048
|
onSetSelectedElementId: (id: string | null) => void;
|
|
14793
15049
|
onUpdateSlides: (updater: (slides: PptxSlide[]) => PptxSlide[]) => void;
|
|
14794
15050
|
onMarkDirty: () => void;
|
|
15051
|
+
/** Host keyboard customisation (disabled / remapped Find shortcuts). */
|
|
15052
|
+
keyboard?: ResolvedKeyboardCustomization;
|
|
14795
15053
|
}
|
|
14796
15054
|
interface UseFindReplaceResult {
|
|
14797
15055
|
findReplaceOpen: boolean;
|
|
@@ -14809,7 +15067,7 @@ interface UseFindReplaceResult {
|
|
|
14809
15067
|
handleReplace: () => void;
|
|
14810
15068
|
handleReplaceAll: () => void;
|
|
14811
15069
|
}
|
|
14812
|
-
declare function useFindReplace({ slides, mode, onSetActiveSlideIndex, onSetSelectedElementId, onUpdateSlides, onMarkDirty }: UseFindReplaceInput): UseFindReplaceResult;
|
|
15070
|
+
declare function useFindReplace({ slides, mode, onSetActiveSlideIndex, onSetSelectedElementId, onUpdateSlides, onMarkDirty, keyboard }: UseFindReplaceInput): UseFindReplaceResult;
|
|
14813
15071
|
//#endregion
|
|
14814
15072
|
//#region src/viewer/components/hyperlink-edit-types.d.ts
|
|
14815
15073
|
/** The type of hyperlink target. */
|
|
@@ -15814,6 +16072,8 @@ interface UseEditorOperationsInput {
|
|
|
15814
16072
|
handlerRef?: React$1.RefObject<PptxHandler | null> | React$1.MutableRefObject<PptxHandler | null>;
|
|
15815
16073
|
/** AutoCorrect transform applied to committed inline text edits. */
|
|
15816
16074
|
transformCommittedText?: (text: string) => string;
|
|
16075
|
+
/** Host keyboard customisation, forwarded to the Find shortcut. */
|
|
16076
|
+
keyboard?: ResolvedKeyboardCustomization;
|
|
15817
16077
|
}
|
|
15818
16078
|
interface EditorOperationsResult {
|
|
15819
16079
|
ops: ElementOperations;
|
|
@@ -17395,6 +17655,8 @@ interface UseKeyboardShortcutWiringInput {
|
|
|
17395
17655
|
pasteFormatToSelection: (targetIds: string[]) => void;
|
|
17396
17656
|
/** Ctrl/Cmd+Alt+V: open the Paste Special dialog. */
|
|
17397
17657
|
onPasteSpecial: () => void;
|
|
17658
|
+
/** Host UI customisation forwarded to `useKeyboardShortcuts`. */
|
|
17659
|
+
customization?: ResolvedCustomization;
|
|
17398
17660
|
}
|
|
17399
17661
|
declare function useKeyboardShortcutWiring(input: UseKeyboardShortcutWiringInput): void;
|
|
17400
17662
|
//#endregion
|
|
@@ -17474,6 +17736,10 @@ interface UseViewerIntegrationInput {
|
|
|
17474
17736
|
onZoomChange: ((zoom: number) => void) | undefined;
|
|
17475
17737
|
onSelectionChange: ((ids: string[]) => void) | undefined;
|
|
17476
17738
|
onSlideCountChange: ((count: number) => void) | undefined;
|
|
17739
|
+
/** Host UI customisation helpers, spread onto the imperative handle. */
|
|
17740
|
+
customizationApi?: ViewerCustomizationApi;
|
|
17741
|
+
/** Resolved host UI customisation, read by the keyboard shortcuts. */
|
|
17742
|
+
customization?: ResolvedCustomization;
|
|
17477
17743
|
}
|
|
17478
17744
|
interface ViewerIntegrationResult {
|
|
17479
17745
|
exportHandlers: IOHandlersResult['exportHandlers'];
|
|
@@ -17874,6 +18140,11 @@ interface UseKeyboardShortcutsInput {
|
|
|
17874
18140
|
activeTool: DrawingTool;
|
|
17875
18141
|
/** Whether at least one element is selected. */
|
|
17876
18142
|
hasSelection: boolean;
|
|
18143
|
+
/**
|
|
18144
|
+
* Host UI customisation: disabled / remapped editor shortcuts, and the
|
|
18145
|
+
* `presentMode` feature gate for F5 / Shift+F5. Omitted customises nothing.
|
|
18146
|
+
*/
|
|
18147
|
+
customization?: ResolvedCustomization;
|
|
17877
18148
|
/** The IDs of the currently selected elements (effective). */
|
|
17878
18149
|
effectiveSelectedIds: string[];
|
|
17879
18150
|
onDelete: () => void;
|