pptx-svelte-viewer 4.43.0 → 4.45.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.
@@ -1,8 +1,8 @@
1
1
  import * as svelte from 'svelte';
2
2
  import { Component } from 'svelte';
3
3
  import * as ooxml_ui_pptx from 'ooxml-ui/pptx';
4
- import { PrintSettings, CanvasSize, RasterizeElementResult, RasterizeElementTilesResult, ViewportFitOptions, ViewerFontSource, ViewerTheme, ThemeCatalogEntry, AccountAuthConfig, ToolbarActionId, RibbonAddInTab, ViewerCustomization, CollaborationConfig, PowerPointViewerAPI, ViewerCustomizationApi, RemoteCursor, SanitizedPresence, DeckSaveIntent, AnimationGroup, AlignEdge, DistributeAxis, MergeShapeOperation, PasteSpecialFormat, CropSession, CropElementUpdate, TemplateElementMap, ElementBoxPatch, InkStrokeView, InkPoint, MasterViewCrudAction, MasterViewCrudActionId, FreeformToolKind, EditPointsElementPatch, SlideTemplateId, SlideTemplateBuildOptions, SlidePasteRequest, RibbonTransitionDraft, CellCoord, CellRect, PendingInlineTextEdit, InlineListController, ElementClipboardPayload, TableStyleSaveOptions, FontEmbeddingDescriptor, InlineTextEditSnapshot, SnapGuideInput, CollaborationLivePatcher, ResolvedKeyboardCustomization, MarqueeRect, ShapeAdjustmentHandleDescriptor, SnapLine, ResizeHandleId, ConnectorEndpointKind, CollaborationInlineEditor, FindResult, ViewerPreferences, ViewportFitPadding, SlideSizeEmu, CollabLoadOrigin, AwarenessLike, CollaborationTransport, YDocLike, YjsFactories, ConnectionStatus, BroadcastConfig, ElementAnimationState, AuthoredSlideRange, RunProgramNotice, ZoomNavigationTarget, PresentationSnapshot, AutosaveRecoveryPrompt, CompatibilityWarningToast, ReadOnlyRecommendation, ModifyPasswordCheckResult, ViewerOptions, ViewerOptionsStoreInit, ToolbarTabId, ViewerOptionsGroupId, ViewerOptionPrimitive, ViewerOptionsConstraints, CompareResult, Guide, DeckViewPreferences, ResolvedCustomization, ViewerMode, CollaborationShellState, AutosaveDisabledReason, MobileSheetKey, FieldSubstitutionContext } from 'ooxml-ui/pptx';
5
- export { CanvasSize, CollaborationShellState, ConnectionStatus, ExternalCollaborationAwareness, ExternalCollaborationSession, ExternalCollaborationSnapshot, InlineListController, InlineListReadResult, InlineTextEditSnapshot, RemoteCursor, SanitizedPresence, ViewerTheme, zoomInPercent, zoomOutPercent } from 'ooxml-ui/pptx';
4
+ import { PrintSettings, CanvasSize, RasterizeElementResult, RasterizeElementTilesResult, ViewportFitOptions, ViewerFontSource, ViewerTheme, ThemeCatalogEntry, AccountAuthConfig, ToolbarActionId, RibbonAddInTab, ViewerCustomization, CollaborationInput, CollaborationConfig, CollaborationState, PowerPointViewerAPI, ViewerCustomizationApi, RemoteCursor, SanitizedPresence, DeckSaveIntent, AnimationGroup, AlignEdge, DistributeAxis, MergeShapeOperation, PasteSpecialFormat, CropSession, CropElementUpdate, TemplateElementMap, ElementBoxPatch, InkStrokeView, InkPoint, MasterViewCrudAction, MasterViewCrudActionId, FreeformToolKind, EditPointsElementPatch, SlideTemplateId, SlideTemplateBuildOptions, SlidePasteRequest, RibbonTransitionDraft, CellCoord, CellRect, PendingInlineTextEdit, InlineListController, ElementClipboardPayload, TableStyleSaveOptions, FontEmbeddingDescriptor, InlineTextEditSnapshot, SnapGuideInput, CollaborationLivePatcher, ResolvedKeyboardCustomization, MarqueeRect, ShapeAdjustmentHandleDescriptor, SnapLine, ResizeHandleId, ConnectorEndpointKind, CollaborationInlineEditor, FindResult, ViewerPreferences, ViewportFitPadding, SlideSizeEmu, CollabLoadOrigin, AwarenessLike, CollaborationTransport, YDocLike, YjsFactories, ConnectionStatus, BroadcastConfig, ElementAnimationState, AuthoredSlideRange, RunProgramNotice, ZoomNavigationTarget, PresentationSnapshot, AutosaveRecoveryPrompt, CompatibilityWarningToast, ReadOnlyRecommendation, ModifyPasswordCheckResult, ViewerOptions, ViewerOptionsStoreInit, ToolbarTabId, ViewerOptionsGroupId, ViewerOptionPrimitive, ViewerOptionsConstraints, CompareResult, Guide, DeckViewPreferences, ResolvedCustomization, ViewerMode, CollaborationShellState, AutosaveDisabledReason, MobileSheetKey, FieldSubstitutionContext } from 'ooxml-ui/pptx';
5
+ export { CanvasSize, CollaborationShellState, CollaborationState, ConnectionStatus, ExternalCollaborationAwareness, ExternalCollaborationSession, ExternalCollaborationSnapshot, InlineListController, InlineListReadResult, InlineTextEditSnapshot, RemoteCursor, SanitizedPresence, ViewerTheme, zoomInPercent, zoomOutPercent } from 'ooxml-ui/pptx';
6
6
  import { PptxAiConfig, PptxAiNotifyLevel, PptxAiBridge, PptxAiFocusedTarget, AiChangeBatch, AiCanvasHighlight, ToolCanvasTarget } from 'ooxml-ui/pptx/ai';
7
7
  export { PptxAiBridge, PptxAiConfig, PptxAiConnection, PptxAiContextStrategy, PptxAiToolName, PptxAiUIMessage, PptxAiWritePolicy } from 'ooxml-ui/pptx/ai';
8
8
  import { LocaleCatalogEntry } from 'ooxml-ui/pptx/i18n';
@@ -509,11 +509,17 @@ interface PowerPointViewerProps extends ViewportFitOptions {
509
509
  * Share/Broadcast toolbar buttons; see `collab/collaboration.svelte.ts` and
510
510
  * `collab/components/`.
511
511
  */
512
- collaboration?: CollaborationConfig;
512
+ collaboration?: CollaborationInput;
513
513
  /** Fired when a collaboration session starts (with the resolved config). */
514
514
  onstartcollaboration?: (config: CollaborationConfig) => void;
515
515
  /** Fired when a collaboration session stops. */
516
516
  onstopcollaboration?: () => void;
517
+ /**
518
+ * Fired with the shared `CollaborationState` when a session starts or stops (the off
519
+ * state) and when its status, synced flag or people change. Viewer-owned and host-owned
520
+ * (`collaboration.session`) sessions both report; unchanged states are not repeated.
521
+ */
522
+ oncollaborationchange?: (state: CollaborationState) => void;
517
523
  /**
518
524
  * Prefilled values for the built-in Share dialog's form (room id, display
519
525
  * name, server URL). The Broadcast dialog reuses `serverUrl` from this same
@@ -2808,6 +2814,8 @@ declare class CollaborationController {
2808
2814
  /** The config the active session was started with (null when stopped); the
2809
2815
  * Share dialog's active view reads the local user's name/colour from this. */
2810
2816
  get activeCollaboration(): CollaborationConfig | null;
2817
+ /** The shared `CollaborationState` a host reads (`oncollaborationchange`), reactive. */
2818
+ get state(): CollaborationState;
2811
2819
  /** Total connected participants (self + remote peers), reactive. */
2812
2820
  get connectedCount(): number;
2813
2821
  /** Publish a cursor move (slide-space px); no-op when no session is active. */
@@ -3694,6 +3702,7 @@ declare class ViewerParityUiState {
3694
3702
  interface CreateViewerStateOptions {
3695
3703
  inspectorInitiallyOpen?: boolean | undefined;
3696
3704
  getSource: () => Uint8Array | ArrayBuffer | null | undefined;
3705
+ /** Already normalised by `resolveCollaborationConfig` (see `toViewerStateOptions`). */
3697
3706
  collaboration?: CollaborationConfig;
3698
3707
  shareDefaults?: ShareDefaultsInput;
3699
3708
  /**
@@ -3746,6 +3755,7 @@ interface CreateViewerStateOptions {
3746
3755
  /** Fired when the host toggles AutoSave (title bar / Settings dialog). */
3747
3756
  onautosavetoggle?: (enabled: boolean) => void;
3748
3757
  onstartcollaboration?: (config: CollaborationConfig) => void;
3758
+ oncollaborationchange?: (state: CollaborationState) => void;
3749
3759
  onstopcollaboration?: () => void;
3750
3760
  /**
3751
3761
  * Host override for File > Open > "Browse this device". Without it
@@ -1,5 +1,5 @@
1
- import "../transition-overlay-BI1-U7Cb.js";
2
- import { S as e, _ as a, a as S, b as o, c as v, d as n, f as d, g as r, h as b, i as p, l as c, m, n as g, o as x, p as w, r as C, s as T, t as $, u as y, v as s, x as t } from "../export-BJhXz3cF.js";
1
+ import "../transition-overlay-Ca1_ksUi.js";
2
+ import { S as e, _ as a, a as S, b as o, c as v, d as n, f as d, g as r, h as b, i as p, l as c, m, n as g, o as x, p as w, r as C, s as T, t as $, u as y, v as s, x as t } from "../export-CCi1DSpY.js";
3
3
  var P = e, V = t, u = s, A = a, R = r, f = o;
4
4
  export {
5
5
  A as CollaborationCursors,
@@ -1,4 +1,4 @@
1
- import { M as Fe, N as pr, j as gr } from "./transition-overlay-BI1-U7Cb.js";
1
+ import { M as Fe, N as pr, j as gr } from "./transition-overlay-Ca1_ksUi.js";
2
2
  import { $ as yr, A as br, B as Ct, D as mr, E as ut, F as _r, G as Ye, H as vr, I as Mt, J as je, K as wr, L as lt, M as se, O as Er, P as ae, R as ce, S as Cr, T as Rr, U as Rt, V as Sr, W as St, X as Tr, Y as ht, Z as Ar, _ as kr, a as Or, at as xr, b as Ge, c as Nr, d as Lr, et as Mr, f as Dr, g as Ir, i as Tt, it as Pr, j as it, k as Dt, l as jr, m as Ur, n as Br, nt as ft, o as It, ot as Fr, p as $r, q as Pt, r as $e, rt as jt, s as qr, st, t as Wr, tt as dt, u as Hr, v as Vr, w as Ut, x as Yr, y as Gr, z as Le } from "./awareness-BwmJcSKy.js";
3
3
  import "yjs";
4
4
  var zr = 1200, Kr = 2500, qe = 3e4, ot = (r) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pptx-svelte-viewer",
3
- "version": "4.43.0",
3
+ "version": "4.45.0",
4
4
  "description": "pptx-viewer for Svelte 5: a PowerPoint viewer and editor component to render, edit, present, and export PPTX slides in the browser.",
5
5
  "keywords": [
6
6
  "office",
@@ -116,8 +116,8 @@
116
116
  "html2canvas-pro": "^2.5.2",
117
117
  "jspdf": "^4.2.1",
118
118
  "jszip": "^3.10.2",
119
- "ooxml-core": "^1.20.0",
120
- "ooxml-ui": "^1.19.0",
119
+ "ooxml-core": "^1.22.0",
120
+ "ooxml-ui": "^1.21.0",
121
121
  "opentype.js": "^2.0.0"
122
122
  },
123
123
  "devDependencies": {