pptx-svelte-viewer 4.74.0 → 4.75.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/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",
@@ -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",
@@ -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, FindHighlightTarget, 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, 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';
@@ -401,6 +401,13 @@ interface PowerPointViewerProps extends ViewportFitOptions {
401
401
  * drawn as its items. The desktop ribbon shows them; the phone chrome does not.
402
402
  */
403
403
  ribbonAddIns?: readonly RibbonAddInTab[];
404
+ /**
405
+ * Starting Ribbon Display Options mode: `always` (Always show Ribbon, the
406
+ * default), `tabs` (Show tabs only) or `fullScreen` (Full-screen mode).
407
+ * Changing it from the host applies the mode; the user's own choices are
408
+ * reported through `onribbondisplaychange`.
409
+ */
410
+ ribbonDisplay?: RibbonDisplayMode;
404
411
  /**
405
412
  * Framework-neutral UI customisation. See docs/guide/customization.md.
406
413
  *
@@ -532,6 +539,12 @@ interface PowerPointViewerProps extends ViewportFitOptions {
532
539
  /** Fired before following a link; return false to cancel its default action. */
533
540
  onhyperlinkclick?: ooxml_ui_pptx.HyperlinkClickHandler;
534
541
  onzoomchange?: (zoom: number) => void;
542
+ /**
543
+ * Fired when the user picks a Ribbon Display Options mode (the menu on the
544
+ * tab row, Ctrl+F1, or a double click on a tab). Not fired when the host
545
+ * changes `ribbonDisplay`.
546
+ */
547
+ onribbondisplaychange?: (mode: RibbonDisplayMode) => void;
535
548
  onselectionchange?: (elementIds: string[]) => void;
536
549
  onslidecountchange?: (count: number) => void;
537
550
  /** Host override for the File > Open action. */
@@ -2504,7 +2517,7 @@ declare class ViewerState {
2504
2517
  * `PowerPointViewer` instance API. The undo/redo/save half lives in
2505
2518
  * `editing-api.ts` and the export half in `export/exporting-api.ts`.
2506
2519
  */
2507
- type DeckApi = Omit<PowerPointViewerAPI, 'getContent' | 'undo' | 'redo' | 'canUndo' | 'canRedo'>;
2520
+ type DeckApi = Omit<PowerPointViewerAPI, 'getContent' | 'undo' | 'redo' | 'canUndo' | 'canRedo' | 'getSaveRevision' | 'getSaveSnapshot' | 'acknowledgeSave'>;
2508
2521
 
2509
2522
  /** The imperative editing API exposed on the `PowerPointViewer` instance. */
2510
2523
  interface EditingApi {
@@ -2519,6 +2532,12 @@ interface EditingApi {
2519
2532
  downloadAs(format: PptxSaveFormat, fileName?: string): Promise<void>;
2520
2533
  /** File > Save as `.pptx` (reported to host storage as `save`). */
2521
2534
  downloadPptx(fileName?: string): Promise<void>;
2535
+ /** The revision of the document as it is now (see `createSaveRevisionController`). */
2536
+ getSaveRevision(): number;
2537
+ /** Serialise for a host that persists the deck itself; leaves the document dirty. */
2538
+ getSaveSnapshot(): Promise<PptxSaveSnapshot>;
2539
+ /** The host persisted `revision`: clean only if it is still current. */
2540
+ acknowledgeSave(revision: number): PptxSaveAcknowledgement;
2522
2541
  }
2523
2542
 
2524
2543
  /**
@@ -3720,5 +3739,118 @@ interface SlideThumbnailProps {
3720
3739
  declare const SlidesPane: Component<SlidesPaneProps>;
3721
3740
  declare const SlideThumbnail: Component<SlideThumbnailProps>;
3722
3741
 
3723
- export { PowerPointViewer, SlideThumbnail, SlidesPane, createSlidesPaneProps, exportAllSlidesToSvg, exportAllSlidesToSvgBlobs, exportSlideAsSvg, exportSlideToSvg, exportSlideToSvgBlob, registerTranslations, renderToCanvas };
3724
- export type { AutosaveStatus, CreateSlidesPanePropsOptions, ExportGifOptions, ExportPdfOptions, ExportVideoOptions, PowerPointViewerApi, PowerPointViewerProps, PrintOptions, SlideThumbnailProps, SlidesPaneProps, SlidesPaneTableStyleContext, SvgExportAllOptions, SvgExportSingleSlideOptions, TranslationDictionary, Translator, ViewerLoadDetail };
3742
+ /** The viewer options the building blocks take (they mount no chrome of their own). */
3743
+ type ForwardedProps = 'fileName' | 'filePath' | 'initialSlide' | 'locale' | 'googleFonts' | 'listConversionScope' | 'allowExternalContent' | 'limits' | 'authorName' | 'collaboration' | 'fitPadding' | 'maxFitScale';
3744
+ interface ViewerBuildingBlocksOptions extends Pick<PowerPointViewerProps, ForwardedProps>, UseViewerBuildingBlocksActionsOptions {
3745
+ /** The presentation bytes, or null while no file is open. */
3746
+ content?: Uint8Array | ArrayBuffer | null | undefined;
3747
+ /** Whether editing is enabled. Defaults to false (view-only). */
3748
+ canEdit?: boolean | undefined;
3749
+ /** Whether the built-in AutoRecover snapshots run. Off unless the host opts in. */
3750
+ autosave?: boolean | undefined;
3751
+ /** As React's `userName`: the author of comments (`authorName` wins when both are set). */
3752
+ userName?: string | undefined;
3753
+ /** Toolbar buttons to hide from the compact toolbar (`undo`, `redo`, `insert`, `zoom`, `navigation`). */
3754
+ hiddenActions?: readonly ToolbarActionId[] | undefined;
3755
+ onDirtyChange?: ((dirty: boolean) => void) | undefined;
3756
+ onSlideChange?: ((index: number) => void) | undefined;
3757
+ onLoad?: ((detail: ViewerLoadDetail) => void) | undefined;
3758
+ onError?: ((message: string) => void) | undefined;
3759
+ onContentChange?: ((content: Uint8Array) => void) | undefined;
3760
+ onSelectionChange?: ((elementIds: string[]) => void) | undefined;
3761
+ /**
3762
+ * Fired by the "Layout" entry of a slide's context menu in the slides pane, after that slide is
3763
+ * made active; the host owns rendering the Layout gallery.
3764
+ */
3765
+ onOpenLayoutGallery?: ((request: SlidesPaneLayoutGalleryRequest) => void) | undefined;
3766
+ }
3767
+ /** The state a custom shell renders around the blocks (a status line, Save enablement). */
3768
+ interface ViewerBuildingBlocksState {
3769
+ /** The effective mode: `preview` while the blocks may not edit. */
3770
+ readonly mode: ViewerMode;
3771
+ readonly loading: boolean;
3772
+ readonly error: string | null;
3773
+ /** Zero-based active slide, -1 before a deck loads. */
3774
+ readonly slideIndex: number;
3775
+ readonly slideCount: number;
3776
+ readonly canUndo: boolean;
3777
+ readonly canRedo: boolean;
3778
+ readonly dirty: boolean;
3779
+ }
3780
+ /** The DOM handles the canvas block reports back (the viewer state measures and listens through them). */
3781
+ interface ViewerBuildingBlocksCanvasHandles {
3782
+ setRoot(element: HTMLDivElement | undefined): void;
3783
+ setStageHolder(element: HTMLDivElement | undefined): void;
3784
+ setViewportSize(size: {
3785
+ width: number;
3786
+ height: number;
3787
+ }): void;
3788
+ }
3789
+ /**
3790
+ * The Svelte building blocks: create it once in the component that renders the blocks (it builds
3791
+ * the viewer state, which registers effects and context) and hand it to `BuildingBlocksCanvas`,
3792
+ * `BuildingBlocksToolbar` and `BuildingBlocksSlidesPane` as `blocks`. Every member is a live
3793
+ * runes-backed getter, so reading it in a template or `$derived` tracks the editor.
3794
+ */
3795
+ interface ViewerBuildingBlocks {
3796
+ /** Host-owned workflows (pickers, dialogs, Find / Replace, layouts), shared by every binding. */
3797
+ readonly actions: ViewerBuildingBlockActions;
3798
+ readonly state: ViewerBuildingBlocksState;
3799
+ /** The compact toolbar's groups and controls (existing dictionary keys, `describeBuildingBlockToolbar`). */
3800
+ readonly toolbar: BuildingBlockToolbarGroup[];
3801
+ /** Run a compact toolbar control (what the toolbar block's buttons call). */
3802
+ runToolbarControl(id: BuildingBlockToolbarControlId): void;
3803
+ /** Props for the slides pane block (`createSlidesPaneProps` over the viewer state). */
3804
+ readonly slidesPaneProps: SlidesPaneProps;
3805
+ /** The elements of the active slide holding find matches, for the canvas outline. */
3806
+ readonly findHighlights: readonly FindHighlightTarget[];
3807
+ /** Translate a dictionary key with the blocks' locale. */
3808
+ t(key: string): string;
3809
+ /** The viewer state behind the blocks, for the imperative API (`deck`, `editingApi`, ...). */
3810
+ readonly viewerState: ViewerStateBag;
3811
+ /** The shared session, for hosts that register further action groups. */
3812
+ readonly session: PptxBuildingBlockSession;
3813
+ /** What the canvas block reports back; not for hosts. */
3814
+ readonly canvas: ViewerBuildingBlocksCanvasHandles;
3815
+ /** Tear down the viewer state; also runs when the creating component is destroyed. */
3816
+ destroy(): void;
3817
+ }
3818
+
3819
+ /**
3820
+ * The Svelte building blocks: the shared building-blocks session (`ooxml-ui/pptx`) over the Svelte
3821
+ * editor's viewer state, with `BuildingBlocksCanvas`, `BuildingBlocksToolbar` and
3822
+ * `BuildingBlocksSlidesPane` as the blocks. Call it once, synchronously in the script of the
3823
+ * component that renders them (it creates the viewer state, which registers effects and context),
3824
+ * with a function returning the current options so changes apply live. The blocks mount no
3825
+ * dialogs or pickers: toolbar controls and canvas gestures that need one raise a request
3826
+ * (`onRequest`, `actions.pending`) the host finishes with `actions`.
3827
+ */
3828
+ declare function createViewerBuildingBlocks(getOptions: () => ViewerBuildingBlocksOptions): ViewerBuildingBlocks;
3829
+
3830
+ /**
3831
+ * Explicitly typed public exports of the building-block components, for the same reason as
3832
+ * `viewer/components/typed-exports.ts`: the declaration bundling cannot resolve `.svelte`
3833
+ * specifiers, so the published `.d.ts` goes through annotated constants.
3834
+ */
3835
+ interface BuildingBlocksCanvasProps {
3836
+ blocks: ViewerBuildingBlocks;
3837
+ /** A viewer theme, as `PowerPointViewer`'s `theme`; unset inherits the host's tokens. */
3838
+ theme?: ViewerTheme | undefined;
3839
+ class?: string;
3840
+ }
3841
+ interface BuildingBlocksToolbarProps {
3842
+ blocks: ViewerBuildingBlocks;
3843
+ /** Show only these groups, in descriptor order. */
3844
+ include?: readonly BuildingBlockToolbarGroupId[] | undefined;
3845
+ class?: string;
3846
+ }
3847
+ interface BuildingBlocksSlidesPaneProps {
3848
+ blocks: ViewerBuildingBlocks;
3849
+ class?: string;
3850
+ }
3851
+ declare const BuildingBlocksCanvas: Component<BuildingBlocksCanvasProps>;
3852
+ declare const BuildingBlocksToolbar: Component<BuildingBlocksToolbarProps>;
3853
+ declare const BuildingBlocksSlidesPane: Component<BuildingBlocksSlidesPaneProps>;
3854
+
3855
+ export { BuildingBlocksCanvas, BuildingBlocksSlidesPane, BuildingBlocksToolbar, PowerPointViewer, SlideThumbnail, SlidesPane, createSlidesPaneProps, createViewerBuildingBlocks, exportAllSlidesToSvg, exportAllSlidesToSvgBlobs, exportSlideAsSvg, exportSlideToSvg, exportSlideToSvgBlob, registerTranslations, renderToCanvas };
3856
+ export type { AutosaveStatus, BuildingBlocksCanvasProps, BuildingBlocksSlidesPaneProps, BuildingBlocksToolbarProps, CreateSlidesPanePropsOptions, ExportGifOptions, ExportPdfOptions, ExportVideoOptions, PowerPointViewerApi, PowerPointViewerProps, PrintOptions, SlideThumbnailProps, SlidesPaneProps, SlidesPaneTableStyleContext, SvgExportAllOptions, SvgExportSingleSlideOptions, TranslationDictionary, Translator, ViewerBuildingBlocks, ViewerBuildingBlocksOptions, ViewerBuildingBlocksState, ViewerLoadDetail };