pptx-svelte-viewer 4.74.0 → 4.76.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +46 -0
- package/dist/{export-BSqJw7u_.js → export-B-KZgn51.js} +10107 -9918
- package/dist/i18n/de.cjs +5 -0
- package/dist/i18n/de.mjs +5 -0
- package/dist/i18n/es.cjs +5 -0
- package/dist/i18n/es.mjs +5 -0
- package/dist/i18n/fr.cjs +5 -0
- package/dist/i18n/fr.mjs +5 -0
- package/dist/i18n/zh-CN.cjs +5 -0
- package/dist/i18n/zh-CN.mjs +5 -0
- package/dist/index.d.ts +152 -5
- package/dist/index.js +630 -57
- package/dist/internals.js +1 -1
- package/dist/pptx-svelte-viewer.css +1 -1
- package/dist/transition-overlay-DXsGFRMK.js +4625 -0
- package/dist/viewer/index.d.ts +33 -2
- package/dist/viewer/index.js +24 -24
- package/dist/{y-webrtc-CJ08ZGdW.js → y-webrtc-CRVjQaCd.js} +1 -1
- package/package.json +3 -3
- package/dist/transition-overlay-SNUzj4xJ.js +0 -4550
package/dist/i18n/de.cjs
CHANGED
|
@@ -4743,6 +4743,11 @@ var translations21 = {
|
|
|
4743
4743
|
"pptx.ribbon.transitionTitle": "{{name}}-\xDCbergang",
|
|
4744
4744
|
"pptx.ribbon.collapseRibbon": "Men\xFCband reduzieren",
|
|
4745
4745
|
"pptx.ribbon.expandRibbon": "Men\xFCband erweitern",
|
|
4746
|
+
"pptx.ribbon.displayOptions": "Men\xFCband-Anzeigeoptionen",
|
|
4747
|
+
"pptx.ribbon.display.fullScreen": "Vollbildmodus",
|
|
4748
|
+
"pptx.ribbon.display.tabs": "Nur Registerkarten anzeigen",
|
|
4749
|
+
"pptx.ribbon.display.always": "Men\xFCband immer anzeigen",
|
|
4750
|
+
"pptx.ribbon.showRibbon": "Men\xFCband anzeigen",
|
|
4746
4751
|
"pptx.ribbon.open": "\xD6ffnen",
|
|
4747
4752
|
"pptx.ribbon.openAnotherPresentation": "\xD6ffnen Sie eine andere Pr\xE4sentation",
|
|
4748
4753
|
"pptx.ribbon.saveAsPptx": "Als .pptx speichern",
|
package/dist/i18n/de.mjs
CHANGED
|
@@ -4717,6 +4717,11 @@ var translations21 = {
|
|
|
4717
4717
|
"pptx.ribbon.transitionTitle": "{{name}}-\xDCbergang",
|
|
4718
4718
|
"pptx.ribbon.collapseRibbon": "Men\xFCband reduzieren",
|
|
4719
4719
|
"pptx.ribbon.expandRibbon": "Men\xFCband erweitern",
|
|
4720
|
+
"pptx.ribbon.displayOptions": "Men\xFCband-Anzeigeoptionen",
|
|
4721
|
+
"pptx.ribbon.display.fullScreen": "Vollbildmodus",
|
|
4722
|
+
"pptx.ribbon.display.tabs": "Nur Registerkarten anzeigen",
|
|
4723
|
+
"pptx.ribbon.display.always": "Men\xFCband immer anzeigen",
|
|
4724
|
+
"pptx.ribbon.showRibbon": "Men\xFCband anzeigen",
|
|
4720
4725
|
"pptx.ribbon.open": "\xD6ffnen",
|
|
4721
4726
|
"pptx.ribbon.openAnotherPresentation": "\xD6ffnen Sie eine andere Pr\xE4sentation",
|
|
4722
4727
|
"pptx.ribbon.saveAsPptx": "Als .pptx speichern",
|
package/dist/i18n/es.cjs
CHANGED
|
@@ -4743,6 +4743,11 @@ var translations21 = {
|
|
|
4743
4743
|
"pptx.ribbon.transitionTitle": "Transici\xF3n {{name}}",
|
|
4744
4744
|
"pptx.ribbon.collapseRibbon": "Contraer la cinta",
|
|
4745
4745
|
"pptx.ribbon.expandRibbon": "Expandir la cinta",
|
|
4746
|
+
"pptx.ribbon.displayOptions": "Opciones de presentaci\xF3n de la cinta",
|
|
4747
|
+
"pptx.ribbon.display.fullScreen": "Modo de pantalla completa",
|
|
4748
|
+
"pptx.ribbon.display.tabs": "Mostrar solo pesta\xF1as",
|
|
4749
|
+
"pptx.ribbon.display.always": "Mostrar siempre la cinta",
|
|
4750
|
+
"pptx.ribbon.showRibbon": "Mostrar la cinta",
|
|
4746
4751
|
"pptx.ribbon.open": "Abrir",
|
|
4747
4752
|
"pptx.ribbon.openAnotherPresentation": "Abrir otra presentaci\xF3n",
|
|
4748
4753
|
"pptx.ribbon.saveAsPptx": "Guardar como .pptx",
|
package/dist/i18n/es.mjs
CHANGED
|
@@ -4717,6 +4717,11 @@ var translations21 = {
|
|
|
4717
4717
|
"pptx.ribbon.transitionTitle": "Transici\xF3n {{name}}",
|
|
4718
4718
|
"pptx.ribbon.collapseRibbon": "Contraer la cinta",
|
|
4719
4719
|
"pptx.ribbon.expandRibbon": "Expandir la cinta",
|
|
4720
|
+
"pptx.ribbon.displayOptions": "Opciones de presentaci\xF3n de la cinta",
|
|
4721
|
+
"pptx.ribbon.display.fullScreen": "Modo de pantalla completa",
|
|
4722
|
+
"pptx.ribbon.display.tabs": "Mostrar solo pesta\xF1as",
|
|
4723
|
+
"pptx.ribbon.display.always": "Mostrar siempre la cinta",
|
|
4724
|
+
"pptx.ribbon.showRibbon": "Mostrar la cinta",
|
|
4720
4725
|
"pptx.ribbon.open": "Abrir",
|
|
4721
4726
|
"pptx.ribbon.openAnotherPresentation": "Abrir otra presentaci\xF3n",
|
|
4722
4727
|
"pptx.ribbon.saveAsPptx": "Guardar como .pptx",
|
package/dist/i18n/fr.cjs
CHANGED
|
@@ -4743,6 +4743,11 @@ var translations21 = {
|
|
|
4743
4743
|
"pptx.ribbon.transitionTitle": "Transition {{name}}",
|
|
4744
4744
|
"pptx.ribbon.collapseRibbon": "R\xE9duire le ruban",
|
|
4745
4745
|
"pptx.ribbon.expandRibbon": "D\xE9velopper le ruban",
|
|
4746
|
+
"pptx.ribbon.displayOptions": "Options d'affichage du ruban",
|
|
4747
|
+
"pptx.ribbon.display.fullScreen": "Mode Plein \xE9cran",
|
|
4748
|
+
"pptx.ribbon.display.tabs": "Afficher les onglets uniquement",
|
|
4749
|
+
"pptx.ribbon.display.always": "Toujours afficher le ruban",
|
|
4750
|
+
"pptx.ribbon.showRibbon": "Afficher le ruban",
|
|
4746
4751
|
"pptx.ribbon.open": "Ouvrir",
|
|
4747
4752
|
"pptx.ribbon.openAnotherPresentation": "Ouvrir une autre pr\xE9sentation",
|
|
4748
4753
|
"pptx.ribbon.saveAsPptx": "Enregistrer sous .pptx",
|
package/dist/i18n/fr.mjs
CHANGED
|
@@ -4717,6 +4717,11 @@ var translations21 = {
|
|
|
4717
4717
|
"pptx.ribbon.transitionTitle": "Transition {{name}}",
|
|
4718
4718
|
"pptx.ribbon.collapseRibbon": "R\xE9duire le ruban",
|
|
4719
4719
|
"pptx.ribbon.expandRibbon": "D\xE9velopper le ruban",
|
|
4720
|
+
"pptx.ribbon.displayOptions": "Options d'affichage du ruban",
|
|
4721
|
+
"pptx.ribbon.display.fullScreen": "Mode Plein \xE9cran",
|
|
4722
|
+
"pptx.ribbon.display.tabs": "Afficher les onglets uniquement",
|
|
4723
|
+
"pptx.ribbon.display.always": "Toujours afficher le ruban",
|
|
4724
|
+
"pptx.ribbon.showRibbon": "Afficher le ruban",
|
|
4720
4725
|
"pptx.ribbon.open": "Ouvrir",
|
|
4721
4726
|
"pptx.ribbon.openAnotherPresentation": "Ouvrir une autre pr\xE9sentation",
|
|
4722
4727
|
"pptx.ribbon.saveAsPptx": "Enregistrer sous .pptx",
|
package/dist/i18n/zh-CN.cjs
CHANGED
|
@@ -4758,6 +4758,11 @@ var translations27 = {
|
|
|
4758
4758
|
"pptx.ribbon.transitionTitle": "{{name}} \u5207\u6362",
|
|
4759
4759
|
"pptx.ribbon.collapseRibbon": "\u6298\u53E0\u529F\u80FD\u533A",
|
|
4760
4760
|
"pptx.ribbon.expandRibbon": "\u5C55\u5F00\u529F\u80FD\u533A",
|
|
4761
|
+
"pptx.ribbon.displayOptions": "\u529F\u80FD\u533A\u663E\u793A\u9009\u9879",
|
|
4762
|
+
"pptx.ribbon.display.fullScreen": "\u5168\u5C4F\u6A21\u5F0F",
|
|
4763
|
+
"pptx.ribbon.display.tabs": "\u4EC5\u663E\u793A\u9009\u9879\u5361",
|
|
4764
|
+
"pptx.ribbon.display.always": "\u59CB\u7EC8\u663E\u793A\u529F\u80FD\u533A",
|
|
4765
|
+
"pptx.ribbon.showRibbon": "\u663E\u793A\u529F\u80FD\u533A",
|
|
4761
4766
|
"pptx.ribbon.open": "\u6253\u5F00",
|
|
4762
4767
|
"pptx.ribbon.openAnotherPresentation": "\u6253\u5F00\u53E6\u4E00\u4E2A\u6F14\u793A\u6587\u7A3F",
|
|
4763
4768
|
"pptx.ribbon.saveAsPptx": "\u53E6\u5B58\u4E3A .pptx",
|
package/dist/i18n/zh-CN.mjs
CHANGED
|
@@ -4732,6 +4732,11 @@ var translations27 = {
|
|
|
4732
4732
|
"pptx.ribbon.transitionTitle": "{{name}} \u5207\u6362",
|
|
4733
4733
|
"pptx.ribbon.collapseRibbon": "\u6298\u53E0\u529F\u80FD\u533A",
|
|
4734
4734
|
"pptx.ribbon.expandRibbon": "\u5C55\u5F00\u529F\u80FD\u533A",
|
|
4735
|
+
"pptx.ribbon.displayOptions": "\u529F\u80FD\u533A\u663E\u793A\u9009\u9879",
|
|
4736
|
+
"pptx.ribbon.display.fullScreen": "\u5168\u5C4F\u6A21\u5F0F",
|
|
4737
|
+
"pptx.ribbon.display.tabs": "\u4EC5\u663E\u793A\u9009\u9879\u5361",
|
|
4738
|
+
"pptx.ribbon.display.always": "\u59CB\u7EC8\u663E\u793A\u529F\u80FD\u533A",
|
|
4739
|
+
"pptx.ribbon.showRibbon": "\u663E\u793A\u529F\u80FD\u533A",
|
|
4735
4740
|
"pptx.ribbon.open": "\u6253\u5F00",
|
|
4736
4741
|
"pptx.ribbon.openAnotherPresentation": "\u6253\u5F00\u53E6\u4E00\u4E2A\u6F14\u793A\u6587\u7A3F",
|
|
4737
4742
|
"pptx.ribbon.saveAsPptx": "\u53E6\u5B58\u4E3A .pptx",
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as ooxml_ui_pptx from 'ooxml-ui/pptx';
|
|
2
|
-
import { PrintSettings, CanvasSize, RasterizeElementResult, RasterizeElementTilesResult, ViewportFitOptions, ViewerFontSource, ViewerTheme, ThemeCatalogEntry, AccountAuthConfig, GoogleFontsOption, ListConversionScope, PptxLoadLimits, ToolbarActionId, RibbonAddInTab, ViewerCustomization, DocumentStorage, CloudFileProvider, ViewerAutosaveStatus, AutosaveRecord, ConnectionStatus, CollaborationInput, CollaborationConfig, CollaborationState, PowerPointViewerAPI, ViewerCustomizationApi, PptxAutosaveStatusKind, DeckSaveIntent, InlineTextDraft, AnimationGroup, AlignEdge, DistributeAxis, MergeShapeOperation, PasteSpecialFormat, CropSession, CropElementUpdate, TemplateElementMap, HistoryTheme, ElementBoxPatch, EditorHistoryController, InkStrokeView, InkPoint, MasterViewCrudAction, MasterViewCrudActionId, FreeformToolKind, EditPointsElementPatch, SlideTemplateId, SlideTemplateBuildOptions, SlidePasteRequest, RibbonTransitionDraft, CellCoord, CellRect, PendingInlineTextEdit, InlineListController, ElementClipboardPayload, TableStyleSaveOptions, FontEmbeddingDescriptor, InlineTextEditSnapshot, SnapGuideInput, CollaborationLivePatcher, InlineTextDraftSink, ResolvedKeyboardCustomization, MarqueeRect, ShapeAdjustmentHandleDescriptor, SnapLine, ResizeHandleId, ConnectorEndpointKind, CollaborationInlineEditor, FindResult, CollaborationTransport, YDocLike, YjsFactories, CollabProviderHandle, CollaborationHistoryTarget, RemoteCursor, SanitizedPresence, CollabLoadOrigin, BroadcastConfig, ElementAnimationState, AuthoredSlideRange, RunProgramNotice, ZoomNavigationTarget, PresentationSnapshot, AutosaveRecoveryPrompt, CompatibilityWarningToast, SlideSizeEmu, DeckWebfontProgress, LoadLimitTranslate, ReadOnlyRecommendation, ReadOnlyBannerPasswordError, ViewerOptions, ViewerOptionsStoreInit, ViewerPreferences, ToolbarTabId, ViewerOptionsGroupId, ViewerOptionPrimitive, ViewerOptionsConstraints, CompareResult, Guide, DeckViewPreferences, CollaborationShellState, ViewerMode, AutosaveDisabledReason, MobileSheetKey, CloudDocumentController, SaveProgressController, FieldSubstitutionContext, SlidesPaneLayoutGalleryRequest } from 'ooxml-ui/pptx';
|
|
3
|
-
export { AutosaveRecord, BACKSTAGE_CARD_IDS, BACKSTAGE_PAGE_IDS, BackstageCustomization, CANVAS_CONTEXT_MENU_COMMAND_IDS, CanvasSize, CollaborationConfig, CollaborationRole, CollaborationShellState, CollaborationState, CollaborationTransport, ConnectionStatus, ContextMenuCustomization, EDITOR_SHORTCUT_ACTION_IDS, ELEMENT_CONTEXT_MENU_COMMAND_IDS, ElementUpdate, ElementUpdateOptions, ExternalCollaborationAwareness, ExternalCollaborationSession, ExternalCollaborationSnapshot, HostCanvasMenuContext, HostElementMenuContext, HostMenuCommand, KeyboardCustomization, ListConversionScope, OPTIONS_PAGE_IDS, OPTIONS_SECTION_IDS, OPTIONS_SETTING_IDS, OptionsCustomization, OptionsPageId, OptionsSectionId, OptionsSettingId, OptionsSettingValues, PPTX_OPEN_ACCEPT, PRESENTATION_OPEN_EXTENSIONS, RIBBON_CONTROL_IDS, RIBBON_GROUP_IDS, RIBBON_TAB_IDS, RemoteCursor, ResolvedCustomization, RibbonContextualTabId, RibbonControlId, RibbonCustomization, RibbonGroupId, SanitizedPresence, SavedPresentationFormat, SessionDeck, ShortcutChord, SlidesPaneLayoutGalleryRequest, TOOLBAR_BUTTON_IDS, VIEWER_DIALOG_IDS, VIEWER_EXPORT_FORMAT_IDS, VIEWER_FEATURE_IDS, VIEWER_PANEL_IDS, ViewerCustomization, ViewerCustomizationApi, ViewerDialogId, ViewerExportFormatId, ViewerFeatureId, ViewerPanelId, ViewerTheme, ViewerThemeColors, ViewportFitOptions, ViewportFitPadding, createImageElementFromFile, defaultCssVars, defaultRadius, defaultThemeColors, deleteAutosaveSnapshot, describeCollaborationShellState, forgetSessionDeck, getAutosaveSnapshot, getSessionTabId, isLegacyBinaryPresentation, isSupportedPresentationFile, listAutosaveSnapshots, loadPresentationDeck, loadSessionDeck, parsePresentationSessionId, presentationBaseName, rememberSessionDeck, restoreSessionDeck, savedPresentationFileName, themeToCssVars, vermilionDarkColors, vermilionDarkTheme, vermilionLightColors, vermilionLightTheme, vermilionRadius } from 'ooxml-ui/pptx';
|
|
2
|
+
import { PrintSettings, CanvasSize, RasterizeElementResult, RasterizeElementTilesResult, ViewportFitOptions, ViewerFontSource, ViewerTheme, ThemeCatalogEntry, AccountAuthConfig, GoogleFontsOption, ListConversionScope, PptxLoadLimits, ToolbarActionId, RibbonAddInTab, RibbonDisplayMode, ViewerCustomization, DocumentStorage, CloudFileProvider, ViewerAutosaveStatus, AutosaveRecord, ConnectionStatus, CollaborationInput, CollaborationConfig, CollaborationState, PowerPointViewerAPI, ViewerCustomizationApi, PptxAutosaveStatusKind, DeckSaveIntent, InlineTextDraft, AnimationGroup, AlignEdge, DistributeAxis, MergeShapeOperation, PasteSpecialFormat, CropSession, CropElementUpdate, TemplateElementMap, HistoryTheme, ElementBoxPatch, EditorHistoryController, InkStrokeView, InkPoint, MasterViewCrudAction, MasterViewCrudActionId, FreeformToolKind, EditPointsElementPatch, SlideTemplateId, SlideTemplateBuildOptions, SlidePasteRequest, RibbonTransitionDraft, CellCoord, CellRect, PendingInlineTextEdit, InlineListController, ElementClipboardPayload, TableStyleSaveOptions, FontEmbeddingDescriptor, InlineTextEditSnapshot, SnapGuideInput, CollaborationLivePatcher, InlineTextDraftSink, ResolvedKeyboardCustomization, MarqueeRect, ShapeAdjustmentHandleDescriptor, SnapLine, ResizeHandleId, ConnectorEndpointKind, CollaborationInlineEditor, FindResult, CollaborationTransport, YDocLike, YjsFactories, CollabProviderHandle, CollaborationHistoryTarget, RemoteCursor, SanitizedPresence, CollabLoadOrigin, BroadcastConfig, PptxSaveSnapshot, PptxSaveAcknowledgement, ElementAnimationState, AuthoredSlideRange, RunProgramNotice, ZoomNavigationTarget, PresentationSnapshot, AutosaveRecoveryPrompt, CompatibilityWarningToast, SlideSizeEmu, DeckWebfontProgress, LoadLimitTranslate, ReadOnlyRecommendation, ReadOnlyBannerPasswordError, ViewerOptions, ViewerOptionsStoreInit, ViewerPreferences, ToolbarTabId, ViewerOptionsGroupId, ViewerOptionPrimitive, ViewerOptionsConstraints, CompareResult, Guide, DeckViewPreferences, CollaborationShellState, ViewerMode, AutosaveDisabledReason, MobileSheetKey, CloudDocumentController, SaveProgressController, FieldSubstitutionContext, SlidesPaneLayoutGalleryRequest, ViewerBuildingBlockActions, BuildingBlockToolbarGroup, BuildingBlockToolbarControlId, SlideFindHighlights, PptxBuildingBlockSession, UseViewerBuildingBlocksActionsOptions, BuildingBlockToolbarGroupId } from 'ooxml-ui/pptx';
|
|
3
|
+
export { AutosaveRecord, BACKSTAGE_CARD_IDS, BACKSTAGE_PAGE_IDS, BackstageCustomization, BuildingBlockRequest, BuildingBlockResult, CANVAS_CONTEXT_MENU_COMMAND_IDS, CanvasSize, CollaborationConfig, CollaborationRole, CollaborationShellState, CollaborationState, CollaborationTransport, ConnectionStatus, ContextMenuCustomization, EDITOR_SHORTCUT_ACTION_IDS, ELEMENT_CONTEXT_MENU_COMMAND_IDS, ElementRenderErrorContext, ElementRenderErrorHandler, ElementUpdate, ElementUpdateOptions, ExternalCollaborationAwareness, ExternalCollaborationSession, ExternalCollaborationSnapshot, HostCanvasMenuContext, HostElementMenuContext, HostMenuCommand, KeyboardCustomization, ListConversionScope, OPTIONS_PAGE_IDS, OPTIONS_SECTION_IDS, OPTIONS_SETTING_IDS, OptionsCustomization, OptionsPageId, OptionsSectionId, OptionsSettingId, OptionsSettingValues, PPTX_OPEN_ACCEPT, PRESENTATION_OPEN_EXTENSIONS, RIBBON_CONTROL_IDS, RIBBON_GROUP_IDS, RIBBON_TAB_IDS, RemoteCursor, ResolvedCustomization, RibbonContextualTabId, RibbonControlId, RibbonCustomization, RibbonGroupId, SanitizedPresence, SavedPresentationFormat, SessionDeck, ShortcutChord, SlidesPaneLayoutGalleryRequest, TOOLBAR_BUTTON_IDS, VIEWER_DIALOG_IDS, VIEWER_EXPORT_FORMAT_IDS, VIEWER_FEATURE_IDS, VIEWER_PANEL_IDS, ViewerBuildingBlockActions, ViewerCustomization, ViewerCustomizationApi, ViewerDialogId, ViewerExportFormatId, ViewerFeatureId, ViewerPanelId, ViewerTheme, ViewerThemeColors, ViewportFitOptions, ViewportFitPadding, createImageElementFromFile, defaultCssVars, defaultRadius, defaultThemeColors, deleteAutosaveSnapshot, describeCollaborationShellState, forgetSessionDeck, getAutosaveSnapshot, getSessionTabId, isLegacyBinaryPresentation, isSupportedPresentationFile, listAutosaveSnapshots, loadPresentationDeck, loadSessionDeck, parsePresentationSessionId, presentationBaseName, rememberSessionDeck, restoreSessionDeck, savedPresentationFileName, themeToCssVars, vermilionDarkColors, vermilionDarkTheme, vermilionLightColors, vermilionLightTheme, vermilionRadius } from 'ooxml-ui/pptx';
|
|
4
4
|
import { Component } from 'svelte';
|
|
5
5
|
import { PptxAiConfig, PptxAiBridge } from 'ooxml-ui/pptx/ai';
|
|
6
6
|
export { PptxAiBridge, PptxAiConfig, PptxAiConnection, PptxAiContextStrategy, PptxAiToolName, PptxAiUIMessage, PptxAiWritePolicy } from 'ooxml-ui/pptx/ai';
|
|
@@ -308,6 +308,14 @@ interface PowerPointViewerProps extends ViewportFitOptions {
|
|
|
308
308
|
* `localStorage` automatically.
|
|
309
309
|
*/
|
|
310
310
|
onThemeChange?: (themeKey: string) => void;
|
|
311
|
+
/**
|
|
312
|
+
* Reports a slide element omitted after a render or effect error, on every surface of the
|
|
313
|
+
* viewer (canvas, thumbnails, slide show, reading view, previews), with
|
|
314
|
+
* `{ elementId, elementType, slideId }`. Camel-cased like `onThemeChange` because it is the
|
|
315
|
+
* same reporter option the building blocks take. Defaults to `console.error(error, context)`,
|
|
316
|
+
* also used when this callback throws.
|
|
317
|
+
*/
|
|
318
|
+
onElementRenderError?: ooxml_ui_pptx.ElementRenderErrorHandler;
|
|
311
319
|
/**
|
|
312
320
|
* Initial File > Options > Language selection (locale code). Falls back to
|
|
313
321
|
* a value persisted in `localStorage`, then the `locale` prop. Once the
|
|
@@ -401,6 +409,13 @@ interface PowerPointViewerProps extends ViewportFitOptions {
|
|
|
401
409
|
* drawn as its items. The desktop ribbon shows them; the phone chrome does not.
|
|
402
410
|
*/
|
|
403
411
|
ribbonAddIns?: readonly RibbonAddInTab[];
|
|
412
|
+
/**
|
|
413
|
+
* Starting Ribbon Display Options mode: `always` (Always show Ribbon, the
|
|
414
|
+
* default), `tabs` (Show tabs only) or `fullScreen` (Full-screen mode).
|
|
415
|
+
* Changing it from the host applies the mode; the user's own choices are
|
|
416
|
+
* reported through `onribbondisplaychange`.
|
|
417
|
+
*/
|
|
418
|
+
ribbonDisplay?: RibbonDisplayMode;
|
|
404
419
|
/**
|
|
405
420
|
* Framework-neutral UI customisation. See docs/guide/customization.md.
|
|
406
421
|
*
|
|
@@ -532,6 +547,12 @@ interface PowerPointViewerProps extends ViewportFitOptions {
|
|
|
532
547
|
/** Fired before following a link; return false to cancel its default action. */
|
|
533
548
|
onhyperlinkclick?: ooxml_ui_pptx.HyperlinkClickHandler;
|
|
534
549
|
onzoomchange?: (zoom: number) => void;
|
|
550
|
+
/**
|
|
551
|
+
* Fired when the user picks a Ribbon Display Options mode (the menu on the
|
|
552
|
+
* tab row, Ctrl+F1, or a double click on a tab). Not fired when the host
|
|
553
|
+
* changes `ribbonDisplay`.
|
|
554
|
+
*/
|
|
555
|
+
onribbondisplaychange?: (mode: RibbonDisplayMode) => void;
|
|
535
556
|
onselectionchange?: (elementIds: string[]) => void;
|
|
536
557
|
onslidecountchange?: (count: number) => void;
|
|
537
558
|
/** Host override for the File > Open action. */
|
|
@@ -2504,7 +2525,7 @@ declare class ViewerState {
|
|
|
2504
2525
|
* `PowerPointViewer` instance API. The undo/redo/save half lives in
|
|
2505
2526
|
* `editing-api.ts` and the export half in `export/exporting-api.ts`.
|
|
2506
2527
|
*/
|
|
2507
|
-
type DeckApi = Omit<PowerPointViewerAPI, 'getContent' | 'undo' | 'redo' | 'canUndo' | 'canRedo'>;
|
|
2528
|
+
type DeckApi = Omit<PowerPointViewerAPI, 'getContent' | 'undo' | 'redo' | 'canUndo' | 'canRedo' | 'getSaveRevision' | 'getSaveSnapshot' | 'acknowledgeSave'>;
|
|
2508
2529
|
|
|
2509
2530
|
/** The imperative editing API exposed on the `PowerPointViewer` instance. */
|
|
2510
2531
|
interface EditingApi {
|
|
@@ -2519,6 +2540,12 @@ interface EditingApi {
|
|
|
2519
2540
|
downloadAs(format: PptxSaveFormat, fileName?: string): Promise<void>;
|
|
2520
2541
|
/** File > Save as `.pptx` (reported to host storage as `save`). */
|
|
2521
2542
|
downloadPptx(fileName?: string): Promise<void>;
|
|
2543
|
+
/** The revision of the document as it is now (see `createSaveRevisionController`). */
|
|
2544
|
+
getSaveRevision(): number;
|
|
2545
|
+
/** Serialise for a host that persists the deck itself; leaves the document dirty. */
|
|
2546
|
+
getSaveSnapshot(): Promise<PptxSaveSnapshot>;
|
|
2547
|
+
/** The host persisted `revision`: clean only if it is still current. */
|
|
2548
|
+
acknowledgeSave(revision: number): PptxSaveAcknowledgement;
|
|
2522
2549
|
}
|
|
2523
2550
|
|
|
2524
2551
|
/**
|
|
@@ -3720,5 +3747,125 @@ interface SlideThumbnailProps {
|
|
|
3720
3747
|
declare const SlidesPane: Component<SlidesPaneProps>;
|
|
3721
3748
|
declare const SlideThumbnail: Component<SlideThumbnailProps>;
|
|
3722
3749
|
|
|
3723
|
-
|
|
3724
|
-
|
|
3750
|
+
/** The viewer options the building blocks take (they mount no chrome of their own). */
|
|
3751
|
+
type ForwardedProps = 'fileName' | 'filePath' | 'initialSlide' | 'locale' | 'googleFonts' | 'listConversionScope' | 'allowExternalContent' | 'limits' | 'authorName' | 'collaboration' | 'fitPadding' | 'maxFitScale' | 'onElementRenderError';
|
|
3752
|
+
interface ViewerBuildingBlocksOptions extends Pick<PowerPointViewerProps, ForwardedProps>, UseViewerBuildingBlocksActionsOptions {
|
|
3753
|
+
/** The presentation bytes, or null while no file is open. */
|
|
3754
|
+
content?: Uint8Array | ArrayBuffer | null | undefined;
|
|
3755
|
+
/** Whether editing is enabled. Defaults to false (view-only). */
|
|
3756
|
+
canEdit?: boolean | undefined;
|
|
3757
|
+
/** Whether the built-in AutoRecover snapshots run. Off unless the host opts in. */
|
|
3758
|
+
autosave?: boolean | undefined;
|
|
3759
|
+
/** As React's `userName`: the author of comments (`authorName` wins when both are set). */
|
|
3760
|
+
userName?: string | undefined;
|
|
3761
|
+
/** Toolbar buttons to hide from the compact toolbar (`undo`, `redo`, `insert`, `zoom`, `navigation`). */
|
|
3762
|
+
hiddenActions?: readonly ToolbarActionId[] | undefined;
|
|
3763
|
+
onDirtyChange?: ((dirty: boolean) => void) | undefined;
|
|
3764
|
+
onSlideChange?: ((index: number) => void) | undefined;
|
|
3765
|
+
onLoad?: ((detail: ViewerLoadDetail) => void) | undefined;
|
|
3766
|
+
onError?: ((message: string) => void) | undefined;
|
|
3767
|
+
onContentChange?: ((content: Uint8Array) => void) | undefined;
|
|
3768
|
+
onSelectionChange?: ((elementIds: string[]) => void) | undefined;
|
|
3769
|
+
/**
|
|
3770
|
+
* Fired by the "Layout" entry of a slide's context menu in the slides pane, after that slide is
|
|
3771
|
+
* made active; the host owns rendering the Layout gallery.
|
|
3772
|
+
*/
|
|
3773
|
+
onOpenLayoutGallery?: ((request: SlidesPaneLayoutGalleryRequest) => void) | undefined;
|
|
3774
|
+
}
|
|
3775
|
+
/** The state a custom shell renders around the blocks (a status line, Save enablement). */
|
|
3776
|
+
interface ViewerBuildingBlocksState {
|
|
3777
|
+
/** The effective mode: `preview` while the blocks may not edit. */
|
|
3778
|
+
readonly mode: ViewerMode;
|
|
3779
|
+
readonly loading: boolean;
|
|
3780
|
+
readonly error: string | null;
|
|
3781
|
+
/** Zero-based active slide, -1 before a deck loads. */
|
|
3782
|
+
readonly slideIndex: number;
|
|
3783
|
+
readonly slideCount: number;
|
|
3784
|
+
readonly canUndo: boolean;
|
|
3785
|
+
readonly canRedo: boolean;
|
|
3786
|
+
readonly dirty: boolean;
|
|
3787
|
+
/**
|
|
3788
|
+
* Effective edit permission plus connection and presence counts, as React's `shellState`;
|
|
3789
|
+
* pass it to `describeCollaborationShellState` for a localised status line.
|
|
3790
|
+
*/
|
|
3791
|
+
readonly shellState: CollaborationShellState;
|
|
3792
|
+
/** The shared `CollaborationState` of the room the canvas is in (`COLLABORATION_OFF` when none). */
|
|
3793
|
+
readonly collaborationState: CollaborationState;
|
|
3794
|
+
}
|
|
3795
|
+
/** The DOM handles the canvas block reports back (the viewer state measures and listens through them). */
|
|
3796
|
+
interface ViewerBuildingBlocksCanvasHandles {
|
|
3797
|
+
setRoot(element: HTMLDivElement | undefined): void;
|
|
3798
|
+
setStageHolder(element: HTMLDivElement | undefined): void;
|
|
3799
|
+
setViewportSize(size: {
|
|
3800
|
+
width: number;
|
|
3801
|
+
height: number;
|
|
3802
|
+
}): void;
|
|
3803
|
+
}
|
|
3804
|
+
/**
|
|
3805
|
+
* The Svelte building blocks: create it once in the component that renders the blocks (it builds
|
|
3806
|
+
* the viewer state, which registers effects and context) and hand it to `BuildingBlocksCanvas`,
|
|
3807
|
+
* `BuildingBlocksToolbar` and `BuildingBlocksSlidesPane` as `blocks`. Every member is a live
|
|
3808
|
+
* runes-backed getter, so reading it in a template or `$derived` tracks the editor.
|
|
3809
|
+
*/
|
|
3810
|
+
interface ViewerBuildingBlocks {
|
|
3811
|
+
/** Host-owned workflows (pickers, dialogs, Find / Replace, layouts), shared by every binding. */
|
|
3812
|
+
readonly actions: ViewerBuildingBlockActions;
|
|
3813
|
+
readonly state: ViewerBuildingBlocksState;
|
|
3814
|
+
/** The compact toolbar's groups and controls (existing dictionary keys, `describeBuildingBlockToolbar`). */
|
|
3815
|
+
readonly toolbar: BuildingBlockToolbarGroup[];
|
|
3816
|
+
/** Run a compact toolbar control (what the toolbar block's buttons call). */
|
|
3817
|
+
runToolbarControl(id: BuildingBlockToolbarControlId): void;
|
|
3818
|
+
/** Props for the slides pane block (`createSlidesPaneProps` over the viewer state). */
|
|
3819
|
+
readonly slidesPaneProps: SlidesPaneProps;
|
|
3820
|
+
/** The find matches of the active slide the canvas marks in the text, by element. */
|
|
3821
|
+
readonly findHighlights: SlideFindHighlights;
|
|
3822
|
+
/** Translate a dictionary key with the blocks' locale. */
|
|
3823
|
+
t(key: string): string;
|
|
3824
|
+
/** The viewer state behind the blocks, for the imperative API (`deck`, `editingApi`, ...). */
|
|
3825
|
+
readonly viewerState: ViewerStateBag;
|
|
3826
|
+
/** The shared session, for hosts that register further action groups. */
|
|
3827
|
+
readonly session: PptxBuildingBlockSession;
|
|
3828
|
+
/** What the canvas block reports back; not for hosts. */
|
|
3829
|
+
readonly canvas: ViewerBuildingBlocksCanvasHandles;
|
|
3830
|
+
/** Tear down the viewer state; also runs when the creating component is destroyed. */
|
|
3831
|
+
destroy(): void;
|
|
3832
|
+
}
|
|
3833
|
+
|
|
3834
|
+
/**
|
|
3835
|
+
* The Svelte building blocks: the shared building-blocks session (`ooxml-ui/pptx`) over the Svelte
|
|
3836
|
+
* editor's viewer state, with `BuildingBlocksCanvas`, `BuildingBlocksToolbar` and
|
|
3837
|
+
* `BuildingBlocksSlidesPane` as the blocks. Call it once, synchronously in the script of the
|
|
3838
|
+
* component that renders them (it creates the viewer state, which registers effects and context),
|
|
3839
|
+
* with a function returning the current options so changes apply live. The blocks mount no
|
|
3840
|
+
* dialogs or pickers: toolbar controls and canvas gestures that need one raise a request
|
|
3841
|
+
* (`onRequest`, `actions.pending`) the host finishes with `actions`.
|
|
3842
|
+
*/
|
|
3843
|
+
declare function createViewerBuildingBlocks(getOptions: () => ViewerBuildingBlocksOptions): ViewerBuildingBlocks;
|
|
3844
|
+
|
|
3845
|
+
/**
|
|
3846
|
+
* Explicitly typed public exports of the building-block components, for the same reason as
|
|
3847
|
+
* `viewer/components/typed-exports.ts`: the declaration bundling cannot resolve `.svelte`
|
|
3848
|
+
* specifiers, so the published `.d.ts` goes through annotated constants.
|
|
3849
|
+
*/
|
|
3850
|
+
interface BuildingBlocksCanvasProps {
|
|
3851
|
+
blocks: ViewerBuildingBlocks;
|
|
3852
|
+
/** A viewer theme, as `PowerPointViewer`'s `theme`; unset inherits the host's tokens. */
|
|
3853
|
+
theme?: ViewerTheme | undefined;
|
|
3854
|
+
class?: string;
|
|
3855
|
+
}
|
|
3856
|
+
interface BuildingBlocksToolbarProps {
|
|
3857
|
+
blocks: ViewerBuildingBlocks;
|
|
3858
|
+
/** Show only these groups, in descriptor order. */
|
|
3859
|
+
include?: readonly BuildingBlockToolbarGroupId[] | undefined;
|
|
3860
|
+
class?: string;
|
|
3861
|
+
}
|
|
3862
|
+
interface BuildingBlocksSlidesPaneProps {
|
|
3863
|
+
blocks: ViewerBuildingBlocks;
|
|
3864
|
+
class?: string;
|
|
3865
|
+
}
|
|
3866
|
+
declare const BuildingBlocksCanvas: Component<BuildingBlocksCanvasProps>;
|
|
3867
|
+
declare const BuildingBlocksToolbar: Component<BuildingBlocksToolbarProps>;
|
|
3868
|
+
declare const BuildingBlocksSlidesPane: Component<BuildingBlocksSlidesPaneProps>;
|
|
3869
|
+
|
|
3870
|
+
export { BuildingBlocksCanvas, BuildingBlocksSlidesPane, BuildingBlocksToolbar, PowerPointViewer, SlideThumbnail, SlidesPane, createSlidesPaneProps, createViewerBuildingBlocks, exportAllSlidesToSvg, exportAllSlidesToSvgBlobs, exportSlideAsSvg, exportSlideToSvg, exportSlideToSvgBlob, registerTranslations, renderToCanvas };
|
|
3871
|
+
export type { AutosaveStatus, BuildingBlocksCanvasProps, BuildingBlocksSlidesPaneProps, BuildingBlocksToolbarProps, CreateSlidesPanePropsOptions, ExportGifOptions, ExportPdfOptions, ExportVideoOptions, PowerPointViewerApi, PowerPointViewerProps, PrintOptions, SlideThumbnailProps, SlidesPaneProps, SlidesPaneTableStyleContext, SvgExportAllOptions, SvgExportSingleSlideOptions, TranslationDictionary, Translator, ViewerBuildingBlocks, ViewerBuildingBlocksOptions, ViewerBuildingBlocksState, ViewerLoadDetail };
|