pptx-svelte-viewer 4.75.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/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, 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';
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
@@ -3740,7 +3748,7 @@ declare const SlidesPane: Component<SlidesPaneProps>;
3740
3748
  declare const SlideThumbnail: Component<SlideThumbnailProps>;
3741
3749
 
3742
3750
  /** 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';
3751
+ type ForwardedProps = 'fileName' | 'filePath' | 'initialSlide' | 'locale' | 'googleFonts' | 'listConversionScope' | 'allowExternalContent' | 'limits' | 'authorName' | 'collaboration' | 'fitPadding' | 'maxFitScale' | 'onElementRenderError';
3744
3752
  interface ViewerBuildingBlocksOptions extends Pick<PowerPointViewerProps, ForwardedProps>, UseViewerBuildingBlocksActionsOptions {
3745
3753
  /** The presentation bytes, or null while no file is open. */
3746
3754
  content?: Uint8Array | ArrayBuffer | null | undefined;
@@ -3776,6 +3784,13 @@ interface ViewerBuildingBlocksState {
3776
3784
  readonly canUndo: boolean;
3777
3785
  readonly canRedo: boolean;
3778
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;
3779
3794
  }
3780
3795
  /** The DOM handles the canvas block reports back (the viewer state measures and listens through them). */
3781
3796
  interface ViewerBuildingBlocksCanvasHandles {
@@ -3802,8 +3817,8 @@ interface ViewerBuildingBlocks {
3802
3817
  runToolbarControl(id: BuildingBlockToolbarControlId): void;
3803
3818
  /** Props for the slides pane block (`createSlidesPaneProps` over the viewer state). */
3804
3819
  readonly slidesPaneProps: SlidesPaneProps;
3805
- /** The elements of the active slide holding find matches, for the canvas outline. */
3806
- readonly findHighlights: readonly FindHighlightTarget[];
3820
+ /** The find matches of the active slide the canvas marks in the text, by element. */
3821
+ readonly findHighlights: SlideFindHighlights;
3807
3822
  /** Translate a dictionary key with the blocks' locale. */
3808
3823
  t(key: string): string;
3809
3824
  /** The viewer state behind the blocks, for the imperative API (`deck`, `editingApi`, ...). */