pptx-vue-viewer 3.20.1 → 3.21.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.
Files changed (65) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/dist/{AiChatPanel-CFSAlqJI.cjs → AiChatPanel-C3SFixYS.cjs} +1 -1
  3. package/dist/AiChatPanel-C3SFixYS.cjs.br +0 -0
  4. package/dist/AiChatPanel-C3SFixYS.cjs.gz +0 -0
  5. package/dist/{AiChatPanel-D6WRGBq-.js → AiChatPanel-YRXQsZFL.js} +2 -2
  6. package/dist/AiChatPanel-YRXQsZFL.js.br +0 -0
  7. package/dist/AiChatPanel-YRXQsZFL.js.gz +0 -0
  8. package/dist/gif-encoder-B-tt5tMj.js +2 -0
  9. package/dist/gif-encoder-B-tt5tMj.js.br +3 -0
  10. package/dist/gif-encoder-B-tt5tMj.js.gz +0 -0
  11. package/dist/gif-encoder-BsQ4Gn3G.cjs +2 -0
  12. package/dist/gif-encoder-BsQ4Gn3G.cjs.br +0 -0
  13. package/dist/gif-encoder-BsQ4Gn3G.cjs.gz +0 -0
  14. package/dist/index.cjs +1 -1
  15. package/dist/index.cjs.br +0 -0
  16. package/dist/index.cjs.gz +0 -0
  17. package/dist/index.d.ts +60 -2
  18. package/dist/index.js +2 -2
  19. package/dist/index.js.br +0 -0
  20. package/dist/index.js.gz +0 -0
  21. package/dist/internals.cjs +1 -1
  22. package/dist/internals.cjs.br +0 -0
  23. package/dist/internals.cjs.gz +0 -0
  24. package/dist/internals.d.ts +60 -2
  25. package/dist/internals.js +1 -1
  26. package/dist/internals.js.br +0 -0
  27. package/dist/internals.js.gz +0 -0
  28. package/dist/{useViewerSettingsDialog-uvVI276F.cjs → useViewerSettingsDialog-0H_Y-M2X.cjs} +5811 -5625
  29. package/dist/useViewerSettingsDialog-0H_Y-M2X.cjs.br +0 -0
  30. package/dist/useViewerSettingsDialog-0H_Y-M2X.cjs.gz +0 -0
  31. package/dist/{useViewerSettingsDialog-B6nsrIpR.js → useViewerSettingsDialog-DC5oTNB9.js} +5056 -4870
  32. package/dist/useViewerSettingsDialog-DC5oTNB9.js.br +0 -0
  33. package/dist/useViewerSettingsDialog-DC5oTNB9.js.gz +0 -0
  34. package/dist/viewer/index.cjs +1 -1
  35. package/dist/viewer/index.cjs.br +0 -0
  36. package/dist/viewer/index.cjs.gz +0 -0
  37. package/dist/viewer/index.d.ts +60 -2
  38. package/dist/viewer/index.js +2 -2
  39. package/dist/viewer/index.js.br +0 -0
  40. package/dist/viewer/index.js.gz +0 -0
  41. package/dist/{viewer-m9_VJVCG.js → viewer-DD0gCFhg.js} +858 -851
  42. package/dist/viewer-DD0gCFhg.js.br +0 -0
  43. package/dist/viewer-DD0gCFhg.js.gz +0 -0
  44. package/dist/{viewer-0NOwrXnK.cjs → viewer-DfAhm6nQ.cjs} +858 -851
  45. package/dist/viewer-DfAhm6nQ.cjs.br +0 -0
  46. package/dist/viewer-DfAhm6nQ.cjs.gz +0 -0
  47. package/package.json +7 -4
  48. package/dist/AiChatPanel-CFSAlqJI.cjs.br +0 -0
  49. package/dist/AiChatPanel-CFSAlqJI.cjs.gz +0 -0
  50. package/dist/AiChatPanel-D6WRGBq-.js.br +0 -0
  51. package/dist/AiChatPanel-D6WRGBq-.js.gz +0 -0
  52. package/dist/gif-encoder-BB_m43UG.js +0 -2
  53. package/dist/gif-encoder-BB_m43UG.js.br +0 -0
  54. package/dist/gif-encoder-BB_m43UG.js.gz +0 -0
  55. package/dist/gif-encoder-CQcFGuOE.cjs +0 -2
  56. package/dist/gif-encoder-CQcFGuOE.cjs.br +0 -0
  57. package/dist/gif-encoder-CQcFGuOE.cjs.gz +0 -0
  58. package/dist/useViewerSettingsDialog-B6nsrIpR.js.br +0 -0
  59. package/dist/useViewerSettingsDialog-B6nsrIpR.js.gz +0 -0
  60. package/dist/useViewerSettingsDialog-uvVI276F.cjs.br +0 -0
  61. package/dist/useViewerSettingsDialog-uvVI276F.cjs.gz +0 -0
  62. package/dist/viewer-0NOwrXnK.cjs.br +0 -0
  63. package/dist/viewer-0NOwrXnK.cjs.gz +0 -0
  64. package/dist/viewer-m9_VJVCG.js.br +0 -0
  65. package/dist/viewer-m9_VJVCG.js.gz +0 -0
package/CHANGELOG.md CHANGED
@@ -7,6 +7,23 @@ A release listed with no entries carried no Conventional Commit in this package'
7
7
  scope: scripts/release-plan.mjs re-releases a package whenever any of its files
8
8
  change, not only on conventional ones.
9
9
 
10
+ ## [3.20.1](https://github.com/ChristopherVR/pptx-viewer/releases/tag/pptx-vue-viewer@3.20.1) - 2026-09-17
11
+
12
+ ### Bug Fixes
13
+
14
+ - **i18n:** Translate recording and editor control labels (by @yunfeizhu) ([7be4498](https://github.com/ChristopherVR/pptx-viewer/commit/7be44985707067b5e11fcac257e52186d7159349))
15
+ - **core:** Embed real images in CLI export-md/export-svg output (by @ChristopherVR) ([6617c92](https://github.com/ChristopherVR/pptx-viewer/commit/6617c92a2ee2ea673c35e4a58cc60dc7cc32def5))
16
+ - **shared:** Keep chart axis interval count off a manual plot layout (by @ChristopherVR) ([d39b2b0](https://github.com/ChristopherVR/pptx-viewer/commit/d39b2b06925c8bd02e64b39c8b5b1a4476537010))
17
+
18
+ ### Testing
19
+
20
+ - **i18n:** Cover translated editor controls across bindings (by @yunfeizhu) ([fe99e2b](https://github.com/ChristopherVR/pptx-viewer/commit/fe99e2b866a66bd3874707ae506416fd03bf8f1e))
21
+ - **core:** Remove duplicate chart-stacked-line-markers manifest entry (by @ChristopherVR) ([5c60b11](https://github.com/ChristopherVR/pptx-viewer/commit/5c60b1170223c3c74bd5815e8ebad28a233656a4))
22
+
23
+ ### Styling
24
+
25
+ - **vue:** Satisfy oxlint brace requirement on an unbraced if-return (by @ChristopherVR) ([63d54c4](https://github.com/ChristopherVR/pptx-viewer/commit/63d54c418ec269a33d97b4e2229a62bb4281268b))
26
+
10
27
  ## [3.20.0](https://github.com/ChristopherVR/pptx-viewer/releases/tag/pptx-vue-viewer@3.20.0) - 2026-09-17
11
28
 
12
29
  ### Features
@@ -1,4 +1,4 @@
1
- const e = require("./useViewerSettingsDialog-uvVI276F.cjs"), t = require("./viewer-0NOwrXnK.cjs");
1
+ const e = require("./useViewerSettingsDialog-0H_Y-M2X.cjs"), t = require("./viewer-DfAhm6nQ.cjs");
2
2
  let r = require("vue"), a = require("lucide-vue-next"), n = require("ai");
3
3
  var o = /* @__PURE__ */ new Set([
4
4
  "input-available",
Binary file
Binary file
@@ -1,5 +1,5 @@
1
- import { Zn as e } from "./useViewerSettingsDialog-B6nsrIpR.js";
2
- import { S as t, T as a, _ as s, b as r, d as l, f as o, g as n, h as i, m as p, o as d, p as c, u, v as m, x, y as g } from "./viewer-m9_VJVCG.js";
1
+ import { Zn as e } from "./useViewerSettingsDialog-DC5oTNB9.js";
2
+ import { S as t, T as a, _ as s, b as r, d as l, f as o, g as n, h as i, m as p, o as d, p as c, u, v as m, x, y as g } from "./viewer-DD0gCFhg.js";
3
3
  import { Fragment as f, Suspense as b, computed as v, createBlock as h, createCommentVNode as y, createElementBlock as k, createElementVNode as w, createTextVNode as C, createVNode as P, defineComponent as S, nextTick as T, normalizeClass as I, normalizeStyle as j, onBeforeUnmount as _, onMounted as A, openBlock as E, ref as M, renderList as F, resolveDynamicComponent as B, shallowRef as D, toDisplayString as N, unref as L, vModelText as R, watch as H, withAsyncContext as W, withCtx as z, withDirectives as V } from "vue";
4
4
  import { Bot as K, ChartColumn as O, Check as U, Crosshair as Z, Eye as $, Film as q, GitMerge as G, History as J, LayoutTemplate as Q, LoaderCircle as X, MessageSquare as Y, MessageSquarePlus as ee, Move as te, Navigation as ae, Palette as se, Pin as re, PinOff as le, Plus as oe, Search as ne, Send as ie, Shapes as pe, Sparkles as de, Square as ce, StickyNote as ue, Table as me, Trash2 as xe, TriangleAlert as ge, Type as fe, User as be, Wrench as ve, X as he } from "lucide-vue-next";
5
5
  import { getToolOrDynamicToolName as ye, isDynamicToolUIPart as ke, isToolUIPart as we } from "ai";
Binary file
Binary file
@@ -0,0 +1,2 @@
1
+ import { bc as e } from "./useViewerSettingsDialog-DC5oTNB9.js";
2
+ export { e as encodeGif };
@@ -0,0 +1,3 @@
1
+ �-�import { bc as e } from "./useViewerSettingsDialog-DC5oTNB9.js";
2
+ export { e as encodeGif };
3
+ 
Binary file
@@ -0,0 +1,2 @@
1
+ const e = require("./useViewerSettingsDialog-0H_Y-M2X.cjs");
2
+ exports.encodeGif = e.encodeGif;
Binary file
Binary file
package/dist/index.cjs CHANGED
@@ -1,3 +1,3 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const e = require("./useViewerSettingsDialog-uvVI276F.cjs"), o = require("./viewer-0NOwrXnK.cjs");
2
+ const e = require("./useViewerSettingsDialog-0H_Y-M2X.cjs"), o = require("./viewer-DfAhm6nQ.cjs");
3
3
  exports.AUDIENCE_HASH = e.AUDIENCE_HASH, exports.CollaborationCursors = o.CollaborationCursors_default, exports.CollaborationStatusIndicator = o.CollaborationStatusIndicator_default, exports.ElementRenderer = e.ElementRenderer_default, exports.FollowModeBar = o.FollowModeBar_default, exports.PPTX_OPEN_ACCEPT = e.PPTX_OPEN_ACCEPT, exports.PRESENTATION_OPEN_EXTENSIONS = e.PRESENTATION_OPEN_EXTENSIONS, exports.PowerPointViewer = o.PowerPointViewer_default, exports.RemoteSelectionOverlay = o.RemoteSelectionOverlay_default, exports.RibbonToolbar = o.RibbonToolbar_default, exports.SlideCanvas = o.SlideCanvas_default, exports.SlideStage = e.SlideStage_default, exports.clearAudienceContent = e.clearAudienceContent, exports.cn = o.cn, exports.createImageElementFromFile = e.createImageElementFromFile, exports.defaultCssVars = e.defaultCssVars, exports.defaultRadius = e.defaultRadius, exports.defaultThemeColors = e.defaultThemeColors, exports.exportAllSlidesToSvg = e.exportAllSlidesToSvg, exports.exportAllSlidesToSvgBlobs = e.exportAllSlidesToSvgBlobs, exports.exportSlideToSvg = e.exportSlideToSvg, exports.exportSlideToSvgBlob = e.exportSlideToSvgBlob, exports.forgetSessionDeck = e.forgetSessionDeck, exports.getSessionTabId = e.getSessionTabId, exports.isAudienceTab = e.isAudienceTab, exports.isLegacyBinaryPresentation = e.isLegacyBinaryPresentation, exports.isSupportedPresentationFile = e.isSupportedPresentationFile, exports.loadAudienceContent = e.loadAudienceContent, exports.loadSessionDeck = e.loadSessionDeck, exports.parseAudienceNonce = e.parseAudienceNonce, exports.parsePresentationSessionId = e.parsePresentationSessionId, exports.presentationBaseName = e.presentationBaseName, exports.provideViewerTheme = o.provideViewerTheme, exports.rememberSessionDeck = e.rememberSessionDeck, exports.renderToCanvas = e.renderToCanvas, exports.restoreSessionDeck = e.restoreSessionDeck, exports.savedPresentationFileName = e.savedPresentationFileName, exports.storeAudienceContent = e.storeAudienceContent, exports.themeToCssVars = e.themeToCssVars, exports.useCollaboration = e.useCollaboration, exports.useCollaborativeHistory = o.useCollaborativeHistory, exports.useCollaborativeState = o.useCollaborativeState, exports.usePresenceTracking = o.usePresenceTracking, exports.useThemeStyle = o.useThemeStyle, exports.useViewerTheme = o.useViewerTheme, exports.useYjsProvider = o.useYjsProvider, exports.vermilionDarkColors = e.vermilionDarkColors, exports.vermilionDarkTheme = e.vermilionDarkTheme, exports.vermilionLightColors = e.vermilionLightColors, exports.vermilionLightTheme = e.vermilionLightTheme, exports.vermilionRadius = e.vermilionRadius;
package/dist/index.cjs.br CHANGED
Binary file
package/dist/index.cjs.gz CHANGED
Binary file
package/dist/index.d.ts CHANGED
@@ -5,6 +5,7 @@ import { ComponentProvideOptions } from 'vue';
5
5
  import { ComputedRef } from 'vue';
6
6
  import { CSSProperties } from 'vue';
7
7
  import { DefineComponent } from 'vue';
8
+ import { Doc } from 'yjs';
8
9
  import { LanguageModel } from 'ai';
9
10
  import { MaybeRefOrGetter } from 'vue';
10
11
  import { Options } from 'html2canvas-pro';
@@ -498,6 +499,18 @@ declare interface AnimationInput {
498
499
  /** URL hash that marks the current tab as the audience display. */
499
500
  export declare const AUDIENCE_HASH = "#pptx-audience";
500
501
 
502
+ /**
503
+ * Structural interface for the lazily-imported Yjs awareness surface. Every
504
+ * binding's live `y-protocols/awareness` `Awareness` instance satisfies this.
505
+ */
506
+ declare interface AwarenessLike {
507
+ clientID?: number;
508
+ setLocalStateField: (field: string, value: unknown) => void;
509
+ getStates: () => Map<number, Record<string, unknown>>;
510
+ on: (event: string, cb: () => void) => void;
511
+ off?: (event: string, cb: () => void) => void;
512
+ }
513
+
501
514
  declare type BackgroundInput = {
502
515
  type: 'solid';
503
516
  color: string;
@@ -738,11 +751,18 @@ export declare interface CollaborationConfig {
738
751
  roomId: string;
739
752
  /**
740
753
  * WebSocket server URL for the Yjs provider (e.g. "wss://collab.example.com").
741
- * Ignored (may be empty) when `transport` is `'webrtc'`.
754
+ * Ignored (may be empty) for `externalSession` or when `transport` is `'webrtc'`.
742
755
  */
743
756
  serverUrl: string;
744
757
  /** Transport to use. Defaults to `'websocket'`. */
745
758
  transport?: CollaborationTransport;
759
+ /**
760
+ * Use the host's document, awareness and transport instead of creating a
761
+ * provider. Transport, serverUrl, signaling and authToken are ignored. The
762
+ * viewer only detaches its listeners and presence on stop; it never destroys
763
+ * these resources. Keep this object stable and report readiness via subscribe.
764
+ */
765
+ externalSession?: ExternalCollaborationSession;
746
766
  /**
747
767
  * WebRTC signaling server URLs (only used when `transport` is `'webrtc'`).
748
768
  * Defaults to y-webrtc's built-in public signaling list. Same-browser tabs
@@ -788,7 +808,9 @@ export declare const CollaborationCursors: typeof __VLS_export_6;
788
808
 
789
809
  declare interface CollaborationLivePatcher {
790
810
  /** Attach a live doc (or `null` to go dormant). Pending patches are dropped. */
791
- configure: (doc: YDocLike | null, factories: YjsFactories | null) => void;
811
+ configure: (doc: YDocLike | null, factories: YjsFactories | null,
812
+ /** Publish synchronously when the host may revoke write readiness at any time. */
813
+ immediate?: boolean) => void;
792
814
  /** True when a doc + factories are attached, i.e. patches will be written. */
793
815
  isActive: () => boolean;
794
816
  /** Queue interim geometry for an element. */
@@ -1296,6 +1318,40 @@ export declare function exportSlideToSvg(slide: PptxSlide, width: number, height
1296
1318
  /** Export one parsed slide as an SVG Blob. */
1297
1319
  export declare function exportSlideToSvgBlob(slide: PptxSlide, width: number, height: number, options?: SvgExportSingleSlideOptions): Blob;
1298
1320
 
1321
+ /** The public y-protocols Awareness surface needed by a borrowed session. */
1322
+ export declare interface ExternalCollaborationAwareness extends AwarenessLike {
1323
+ clientID: number;
1324
+ getLocalState: () => Record<string, unknown> | null;
1325
+ setLocalState: (state: Record<string, unknown> | null) => void;
1326
+ off: (event: string, callback: () => void) => void;
1327
+ }
1328
+
1329
+ /**
1330
+ * Host-owned Yjs resources. The host creates, connects and destroys them.
1331
+ * Keep this object and its resources stable for a session; report connection
1332
+ * changes through subscribe instead of replacing the collaboration config.
1333
+ */
1334
+ export declare interface ExternalCollaborationSession {
1335
+ readonly doc: Doc;
1336
+ /** Awareness must belong to doc. One viewer publishes slide presence at a time. */
1337
+ readonly awareness: ExternalCollaborationAwareness;
1338
+ getSnapshot: () => ExternalCollaborationSnapshot;
1339
+ /** Subscribe to status or synced changes; return an unsubscribe function. */
1340
+ subscribe: (listener: () => void) => () => void;
1341
+ }
1342
+
1343
+ /** Connection state reported by the host, independent of the viewer lifetime. */
1344
+ export declare interface ExternalCollaborationSnapshot {
1345
+ status: ConnectionStatus;
1346
+ /**
1347
+ * The host has loaded the authoritative document and permits local edits.
1348
+ * Keep true while offline to allow ordinary Yjs offline edits, or set false
1349
+ * to suspend writes until a fresh sync. The viewer never infers this from
1350
+ * `status` and never opens it after a timeout.
1351
+ */
1352
+ synced: boolean;
1353
+ }
1354
+
1299
1355
  declare type FillInput = {
1300
1356
  type: 'solid';
1301
1357
  color: string;
@@ -13476,6 +13532,8 @@ export declare interface UseCollaborationResult {
13476
13532
  remotePresences: Ref<RemotePresence[]>;
13477
13533
  connectedCount: ComputedRef<number>;
13478
13534
  active: Ref<boolean>;
13535
+ /** Blocks edits only while a session is read-only or awaiting host sync. */
13536
+ readOnly: Ref<boolean>;
13479
13537
  /** The local user's role in the active session (undefined when stopped). */
13480
13538
  activeRole: Ref<CollaborationRole | undefined>;
13481
13539
  followedClientId: Ref<number | null>;
package/dist/index.js CHANGED
@@ -1,3 +1,3 @@
1
- import { $s as a, Bl as s, Bu as e, C as o, Cp as r, Dp as l, Ep as i, H as t, Mc as n, Ql as p, S as w, Tp as d, Ul as u, Vs as C, Xs as S, Xt as b, Yt as m, Zf as c, Zl as f, Zs as v, _f as g, as as B, bi as D, cp as E, df as R, it as T, kl as V, nr as Z, qu as j, ul as k, vd as x, w as M, wi as O, wp as P, x as X, zu as q } from "./useViewerSettingsDialog-B6nsrIpR.js";
2
- import { C as y, D as z, E as F, O as H, T as I, a as Q, c as U, i as Y, k as $, l as _, n as h, r as A, s as G, t as J, w as K } from "./viewer-m9_VJVCG.js";
1
+ import { $s as a, Bl as s, Bu as e, C as o, Cp as r, Dp as l, Ep as i, H as t, Mc as n, Ql as p, S as w, Tp as d, Ul as u, Vs as C, Xs as S, Xt as b, Yt as m, Zf as c, Zl as f, Zs as v, _f as g, as as B, bi as D, cp as E, df as R, it as T, kl as V, nr as Z, qu as j, ul as k, vd as x, w as M, wi as O, wp as P, x as X, zu as q } from "./useViewerSettingsDialog-DC5oTNB9.js";
2
+ import { C as y, D as z, E as F, O as H, T as I, a as Q, c as U, i as Y, k as $, l as _, n as h, r as A, s as G, t as J, w as K } from "./viewer-DD0gCFhg.js";
3
3
  export { Z as AUDIENCE_HASH, _ as CollaborationCursors, F as CollaborationStatusIndicator, b as ElementRenderer, G as FollowModeBar, D as PPTX_OPEN_ACCEPT, O as PRESENTATION_OPEN_EXTENSIONS, Q as PowerPointViewer, U as RemoteSelectionOverlay, K as RibbonToolbar, y as SlideCanvas, m as SlideStage, B as clearAudienceContent, I as cn, C as createImageElementFromFile, S as defaultCssVars, v as defaultRadius, a as defaultThemeColors, X as exportAllSlidesToSvg, w as exportAllSlidesToSvgBlobs, o as exportSlideToSvg, M as exportSlideToSvgBlob, n as forgetSessionDeck, k as getSessionTabId, V as isAudienceTab, s as isLegacyBinaryPresentation, u as isSupportedPresentationFile, f as loadAudienceContent, p as loadSessionDeck, q as parseAudienceNonce, e as parsePresentationSessionId, j as presentationBaseName, z as provideViewerTheme, x as rememberSessionDeck, t as renderToCanvas, R as restoreSessionDeck, g as savedPresentationFileName, c as storeAudienceContent, E as themeToCssVars, T as useCollaboration, J as useCollaborativeHistory, h as useCollaborativeState, A as usePresenceTracking, H as useThemeStyle, $ as useViewerTheme, Y as useYjsProvider, r as vermilionDarkColors, P as vermilionDarkTheme, d as vermilionLightColors, i as vermilionLightTheme, l as vermilionRadius };
package/dist/index.js.br CHANGED
Binary file
package/dist/index.js.gz CHANGED
Binary file
@@ -1,3 +1,3 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const e = require("./useViewerSettingsDialog-uvVI276F.cjs");
2
+ const e = require("./useViewerSettingsDialog-0H_Y-M2X.cjs");
3
3
  exports.CINEMATIC_TRANSITION_KEYFRAMES = e.CINEMATIC_TRANSITION_KEYFRAMES, exports.DEFAULT_MAX_VERSIONS = e.DEFAULT_MAX_VERSIONS, exports.DEFAULT_MORPH_DURATION_MS = e.DEFAULT_MORPH_DURATION_MS, exports.DEFAULT_TRANSITION_DURATION_MS = e.DEFAULT_TRANSITION_DURATION_MS, exports.EASE = e.EASE, exports.ERASER_RADIUS = e.ERASER_RADIUS, exports.FragmentedTransitionLayer = e.FragmentedTransitionLayer_default, exports.HIGHLIGHTER_OPACITY = e.HIGHLIGHTER_OPACITY, exports.HIGHLIGHTER_WIDTH = e.HIGHLIGHTER_WIDTH, exports.INSTANT = e.INSTANT, exports.MOBILE_BREAKPOINT = e.MOBILE_BREAKPOINT, exports.MOBILE_LANDSCAPE_MAX_HEIGHT = e.MOBILE_LANDSCAPE_MAX_HEIGHT, exports.MorphExtraLayers = e.MorphExtraLayers_default, exports.NUDGE_LARGE = e.NUDGE_LARGE, exports.NUDGE_SMALL = e.NUDGE_SMALL, exports.P14_TRANSITION_KEYFRAMES = e.P14_TRANSITION_KEYFRAMES, exports.P14_TRANSITION_KEYFRAMES_2 = e.P14_TRANSITION_KEYFRAMES_2, exports.P14_TRANSITION_KEYFRAMES_ALL = e.P14_TRANSITION_KEYFRAMES_ALL, exports.PEN_WIDTH = e.PEN_WIDTH, exports.PresentationTransitionOverlay = e.PresentationTransitionOverlay_default, exports.RANDOM_ELIGIBLE_TYPES = e.RANDOM_ELIGIBLE_TYPES, exports.RIBBON_ALIGN = e.RIBBON_ALIGN, exports.SHORTCUT_CATALOG = e.SHORTCUT_CATALOG, exports.SHORTCUT_GROUP_LABEL_KEYS = e.SHORTCUT_GROUP_LABEL_KEYS, exports.SLIDE_TRANSITION_KEYFRAMES = e.SLIDE_TRANSITION_KEYFRAMES, exports.SLIDE_TRANSITION_KEYFRAMES_CSS = e.SLIDE_TRANSITION_KEYFRAMES_CSS, exports.SMARTART_COLOR_SCHEMES = e.SMARTART_COLOR_SCHEMES, exports.SMARTART_STYLE_OPTIONS = e.SMARTART_STYLE_OPTIONS, exports.SmartArt3DKey = e.SmartArt3DKey, exports.TABLET_BREAKPOINT = e.TABLET_BREAKPOINT, exports.TRANSITION_SPEED_DURATION_MS = e.TRANSITION_SPEED_DURATION_MS, exports.TableSelectionKey = e.TableSelectionKey, exports.WHEEL_SPOKE_COUNTS = e.WHEEL_SPOKE_COUNTS, exports.buildClickGroups = e.buildClickGroups, exports.computeCellSelection = e.computeCellSelection, exports.computeDocumentStatistics = e.computeDocumentStatistics, exports.computeElapsed = e.computeElapsed, exports.countWords = e.countWords, exports.createStroke = e.createStroke, exports.eraseStrokesAtPoint = e.eraseStrokesAtPoint, exports.formatRehearseMs = e.formatRehearseMs, exports.generateCommentId = e.generateCommentId, exports.getCinematicTransitionAnimations = e.getCinematicTransitionAnimations, exports.getP14TransitionAnimations = e.getP14TransitionAnimations, exports.getSlideTransitionAnimations = e.getSlideTransitionAnimations, exports.groupShortcutCatalog = e.groupShortcutCatalog, exports.injectTableSelection = e.injectTableSelection, exports.inlineEditorRect = e.inlineEditorRect, exports.isMobileViewport = e.isMobileViewport, exports.nodeIdsInRenderOrder = e.nodeIdsInRenderOrder, exports.parseSignaturesFromBuffer = e.parseSignaturesFromBuffer, exports.provideTableSelection = e.provideTableSelection, exports.resolveDirection = e.resolveDirection, exports.resolveDirection8 = e.resolveDirection8, exports.resolveOrientation = e.resolveOrientation, exports.resolveShortcutAction = e.resolveShortcutAction, exports.resolveSlideTransition = e.resolveSlideTransition, exports.resolveTransitionDurationMs = e.resolveTransitionDurationMs, exports.resolveWheelSpokeCount = e.resolveWheelSpokeCount, exports.smartArtLayoutLabel = e.smartArtLayoutLabel, exports.textNodeIdsInRenderOrder = e.textNodeIdsInRenderOrder, exports.toShapePreset = e.toShapePreset, exports.useAccessibility = e.useAccessibility, exports.useAlignGroup = e.useAlignGroup, exports.useAnimationPlayback = e.useAnimationPlayback, exports.useAutosave = e.useAutosave, exports.useChartEditing = e.useChartEditing, exports.useCollaboration = e.useCollaboration, exports.useCollaborationWiring = e.useCollaborationWiring, exports.useColorChangeImage = e.useColorChangeImage, exports.useComments = e.useComments, exports.useCommentsWiring = e.useCommentsWiring, exports.useContextMenu = e.useContextMenu, exports.useCustomShows = e.useCustomShows, exports.useCustomShowsWiring = e.useCustomShowsWiring, exports.useDebouncedCallback = e.useDebouncedCallback, exports.useDocumentPropertiesDialog = e.useDocumentPropertiesDialog, exports.useDocumentStatistics = e.useDocumentStatistics, exports.useEditorHistory = e.useEditorHistory, exports.useEditorKeyboard = e.useEditorKeyboard, exports.useEditorOperations = e.useEditorOperations, exports.useElementDrag = e.useElementDrag, exports.useElementInsertion = e.useElementInsertion, exports.useEmbeddedFonts = e.useEmbeddedFonts, exports.useExport = e.useExport, exports.useExportProgress = e.useExportProgress, exports.useExportWiring = e.useExportWiring, exports.useFindReplace = e.useFindReplace, exports.useFontEmbedding = e.useFontEmbedding, exports.useFormatPainter = e.useFormatPainter, exports.useHeaderFooterDialog = e.useHeaderFooterDialog, exports.useInkDrawing = e.useInkDrawing, exports.useInlineEditing = e.useInlineEditing, exports.useInsertElementDialogs = e.useInsertElementDialogs, exports.useIsMobile = e.useIsMobile, exports.useKeyboardInsets = e.useKeyboardInsets, exports.useKeyboardShortcuts = e.useKeyboardShortcuts, exports.useLoadContent = e.useLoadContent, exports.useMasterViewState = e.useMasterViewState, exports.useMediaExport = e.useMediaExport, exports.useMobileChrome = e.useMobileChrome, exports.useModel3dScene = e.useModel3dScene, exports.useMorphTransitionOverlay = e.useMorphTransitionOverlay, exports.useMultiSelectOps = e.useMultiSelectOps, exports.usePasswordProtection = e.usePasswordProtection, exports.usePresentationAnnotations = e.usePresentationAnnotations, exports.usePresentationModeWiring = e.usePresentationModeWiring, exports.usePrint = e.usePrint, exports.useRehearseTimings = e.useRehearseTimings, exports.useRibbonActions = e.useRibbonActions, exports.useRibbonProps = e.useRibbonProps, exports.useRibbonUiState = e.useRibbonUiState, exports.useSectionOperations = e.useSectionOperations, exports.useSelectionPaneWiring = e.useSelectionPaneWiring, exports.useSheetDismissDrag = e.useSheetDismissDrag, exports.useSignatureWorkflow = e.useSignatureWorkflow, exports.useSignatures = e.useSignatures, exports.useSlideMutations = e.useSlideMutations, exports.useSlideOperations = e.useSlideOperations, exports.useSlideShowSettings = e.useSlideShowSettings, exports.useSlideTemplateInsertion = e.useSlideTemplateInsertion, exports.useSmartArt3D = e.useSmartArt3D, exports.useSmartArtEditing = e.useSmartArtEditing, exports.useSmartArtFocus = e.useSmartArtFocus, exports.useSmartArtHoverRect = e.useSmartArtHoverRect, exports.useSmartArtInlineEditState = e.useSmartArtInlineEditState, exports.useSmartArtNodeEditContext = e.useSmartArtNodeEditContext, exports.useTableCellEditingContext = e.useTableCellEditingContext, exports.useTableCellSelection = e.useTableCellSelection, exports.useThemeEditing = e.useThemeEditing, exports.useToolbarAutoHide = e.useToolbarAutoHide, exports.useToolbarVisibility = e.useToolbarVisibility, exports.useTouchGestures = e.useTouchGestures, exports.useVersionHistory = e.useVersionHistory, exports.useVersionHistoryWiring = e.useVersionHistoryWiring, exports.useViewerSettingsDialog = e.useViewerSettingsDialog;
Binary file
Binary file
@@ -3,6 +3,7 @@ import { ComponentProvideOptions } from 'vue';
3
3
  import { ComputedRef } from 'vue';
4
4
  import { CSSProperties as CSSProperties_2 } from 'vue';
5
5
  import { DefineComponent } from 'vue';
6
+ import { Doc } from 'yjs';
6
7
  import { InjectionKey } from 'vue';
7
8
  import { MaybeRefOrGetter } from 'vue';
8
9
  import { PublicProps } from 'vue';
@@ -321,6 +322,18 @@ export declare interface AutosaveTimerApi {
321
322
  clearTimer: (id: number) => void;
322
323
  }
323
324
 
325
+ /**
326
+ * Structural interface for the lazily-imported Yjs awareness surface. Every
327
+ * binding's live `y-protocols/awareness` `Awareness` instance satisfies this.
328
+ */
329
+ declare interface AwarenessLike {
330
+ clientID?: number;
331
+ setLocalStateField: (field: string, value: unknown) => void;
332
+ getStates: () => Map<number, Record<string, unknown>>;
333
+ on: (event: string, cb: () => void) => void;
334
+ off?: (event: string, cb: () => void) => void;
335
+ }
336
+
324
337
  declare type BackgroundInput = {
325
338
  type: 'solid';
326
339
  color: string;
@@ -709,11 +722,18 @@ declare interface CollaborationConfig {
709
722
  roomId: string;
710
723
  /**
711
724
  * WebSocket server URL for the Yjs provider (e.g. "wss://collab.example.com").
712
- * Ignored (may be empty) when `transport` is `'webrtc'`.
725
+ * Ignored (may be empty) for `externalSession` or when `transport` is `'webrtc'`.
713
726
  */
714
727
  serverUrl: string;
715
728
  /** Transport to use. Defaults to `'websocket'`. */
716
729
  transport?: CollaborationTransport;
730
+ /**
731
+ * Use the host's document, awareness and transport instead of creating a
732
+ * provider. Transport, serverUrl, signaling and authToken are ignored. The
733
+ * viewer only detaches its listeners and presence on stop; it never destroys
734
+ * these resources. Keep this object stable and report readiness via subscribe.
735
+ */
736
+ externalSession?: ExternalCollaborationSession;
717
737
  /**
718
738
  * WebRTC signaling server URLs (only used when `transport` is `'webrtc'`).
719
739
  * Defaults to y-webrtc's built-in public signaling list. Same-browser tabs
@@ -757,7 +777,9 @@ declare interface CollaborationConfig {
757
777
 
758
778
  declare interface CollaborationLivePatcher {
759
779
  /** Attach a live doc (or `null` to go dormant). Pending patches are dropped. */
760
- configure: (doc: YDocLike | null, factories: YjsFactories | null) => void;
780
+ configure: (doc: YDocLike | null, factories: YjsFactories | null,
781
+ /** Publish synchronously when the host may revoke write readiness at any time. */
782
+ immediate?: boolean) => void;
761
783
  /** True when a doc + factories are attached, i.e. patches will be written. */
762
784
  isActive: () => boolean;
763
785
  /** Queue interim geometry for an element. */
@@ -1656,6 +1678,40 @@ export declare interface ExportPdfOptions {
1656
1678
  /** Per-slide progress callback: `(currentSlideIndex, totalSlides)`. */
1657
1679
  export declare type ExportProgress = (current: number, total: number) => void;
1658
1680
 
1681
+ /** The public y-protocols Awareness surface needed by a borrowed session. */
1682
+ declare interface ExternalCollaborationAwareness extends AwarenessLike {
1683
+ clientID: number;
1684
+ getLocalState: () => Record<string, unknown> | null;
1685
+ setLocalState: (state: Record<string, unknown> | null) => void;
1686
+ off: (event: string, callback: () => void) => void;
1687
+ }
1688
+
1689
+ /**
1690
+ * Host-owned Yjs resources. The host creates, connects and destroys them.
1691
+ * Keep this object and its resources stable for a session; report connection
1692
+ * changes through subscribe instead of replacing the collaboration config.
1693
+ */
1694
+ declare interface ExternalCollaborationSession {
1695
+ readonly doc: Doc;
1696
+ /** Awareness must belong to doc. One viewer publishes slide presence at a time. */
1697
+ readonly awareness: ExternalCollaborationAwareness;
1698
+ getSnapshot: () => ExternalCollaborationSnapshot;
1699
+ /** Subscribe to status or synced changes; return an unsubscribe function. */
1700
+ subscribe: (listener: () => void) => () => void;
1701
+ }
1702
+
1703
+ /** Connection state reported by the host, independent of the viewer lifetime. */
1704
+ declare interface ExternalCollaborationSnapshot {
1705
+ status: ConnectionStatus;
1706
+ /**
1707
+ * The host has loaded the authoritative document and permits local edits.
1708
+ * Keep true while offline to allow ordinary Yjs offline edits, or set false
1709
+ * to suspend writes until a fresh sync. The viewer never infers this from
1710
+ * `status` and never opens it after a timeout.
1711
+ */
1712
+ synced: boolean;
1713
+ }
1714
+
1659
1715
  declare type FeedbackSoundScheme = 'modern' | 'classic';
1660
1716
 
1661
1717
  declare type FillInput = {
@@ -14758,6 +14814,8 @@ export declare interface UseCollaborationResult {
14758
14814
  remotePresences: Ref<RemotePresence[]>;
14759
14815
  connectedCount: ComputedRef<number>;
14760
14816
  active: Ref<boolean>;
14817
+ /** Blocks edits only while a session is read-only or awaiting host sync. */
14818
+ readOnly: Ref<boolean>;
14761
14819
  /** The local user's role in the active session (undefined when stopped). */
14762
14820
  activeRole: Ref<CollaborationRole | undefined>;
14763
14821
  followedClientId: Ref<number | null>;
package/dist/internals.js CHANGED
@@ -1,2 +1,2 @@
1
- import { $ as a, $d as s, A as t, B as n, Bt as i, Cs as r, Ct as e, D as o, E as l, F as d, Fi as g, Fn as p, Ft as y, G as c, Hc as f, Ht as m, I as h, In as F, Is as L, It as T, J as u, Jd as w, Ji as x, K as I, Kc as V, L as j, Ld as v, Lt as J, M, Mt as P, N as R, Nt as _, O as b, P as k, Pt as q, Q as z, R as B, Rd as C, Rt as D, St as E, T as H, Tn as K, Tt as N, U as O, Ut as S, V as U, Vl as W, Vt as X, W as Y, Wt as $, X as A, Xn as G, Y as Q, Yi as Z, Z as aa, _ as sa, _i as ta, _t as na, a as ia, ai as ra, at as ea, b as oa, bt as la, c as da, ci as ga, cn as pa, ct as ya, d as ca, do as fa, dt as ma, ei as ha, et as Fa, f as La, fn as Ta, ft as ua, g as wa, gi as xa, gn as Ia, gt as Va, h as ja, hi as va, hn as Ja, ht as Ma, i as Pa, if as Ra, it as _a, j as ba, jt as ka, k as qa, kr as za, l as Ba, li as Ca, ln as Da, lr as Ea, lt as Ha, m as Ka, mn as Na, mt as Oa, n as Sa, na as Ua, nt as Wa, o as Xa, oi as Ya, on as $a, ot as Aa, p as Ga, pl as Qa, pn as Za, pt as as, q as ss, qt as ts, r as ns, rl as is, rt as rs, s as es, sf as os, sn as ls, st as ds, t as gs, tt as ps, u as ys, un as cs, ut as fs, v as ms, vt as hs, wa as Fs, wr as Ls, wt as Ts, xr as us, xt as ws, y as xs, ya as Is, yn as Vs, yt as js, z as vs, zt as Js } from "./useViewerSettingsDialog-B6nsrIpR.js";
1
+ import { $ as a, $d as s, A as t, B as n, Bt as i, Cs as r, Ct as e, D as o, E as l, F as d, Fi as g, Fn as p, Ft as y, G as c, Hc as f, Ht as m, I as h, In as F, Is as L, It as T, J as u, Jd as w, Ji as x, K as I, Kc as V, L as j, Ld as v, Lt as J, M, Mt as P, N as R, Nt as _, O as b, P as k, Pt as q, Q as z, R as B, Rd as C, Rt as D, St as E, T as H, Tn as K, Tt as N, U as O, Ut as S, V as U, Vl as W, Vt as X, W as Y, Wt as $, X as A, Xn as G, Y as Q, Yi as Z, Z as aa, _ as sa, _i as ta, _t as na, a as ia, ai as ra, at as ea, b as oa, bt as la, c as da, ci as ga, cn as pa, ct as ya, d as ca, do as fa, dt as ma, ei as ha, et as Fa, f as La, fn as Ta, ft as ua, g as wa, gi as xa, gn as Ia, gt as Va, h as ja, hi as va, hn as Ja, ht as Ma, i as Pa, if as Ra, it as _a, j as ba, jt as ka, k as qa, kr as za, l as Ba, li as Ca, ln as Da, lr as Ea, lt as Ha, m as Ka, mn as Na, mt as Oa, n as Sa, na as Ua, nt as Wa, o as Xa, oi as Ya, on as $a, ot as Aa, p as Ga, pl as Qa, pn as Za, pt as as, q as ss, qt as ts, r as ns, rl as is, rt as rs, s as es, sf as os, sn as ls, st as ds, t as gs, tt as ps, u as ys, un as cs, ut as fs, v as ms, vt as hs, wa as Fs, wr as Ls, wt as Ts, xr as us, xt as ws, y as xs, ya as Is, yn as Vs, yt as js, z as vs, zt as Js } from "./useViewerSettingsDialog-DC5oTNB9.js";
2
2
  export { Ea as CINEMATIC_TRANSITION_KEYFRAMES, Pa as DEFAULT_MAX_VERSIONS, us as DEFAULT_MORPH_DURATION_MS, Ls as DEFAULT_TRANSITION_DURATION_MS, za as EASE, hs as ERASER_RADIUS, Oa as FragmentedTransitionLayer, js as HIGHLIGHTER_OPACITY, la as HIGHLIGHTER_WIDTH, ha as INSTANT, ra as MOBILE_BREAKPOINT, Ya as MOBILE_LANDSCAPE_MAX_HEIGHT, as as MorphExtraLayers, ga as NUDGE_LARGE, Ca as NUDGE_SMALL, va as P14_TRANSITION_KEYFRAMES, xa as P14_TRANSITION_KEYFRAMES_2, ta as P14_TRANSITION_KEYFRAMES_ALL, ws as PEN_WIDTH, ua as PresentationTransitionOverlay, g as RANDOM_ELIGIBLE_TYPES, sa as RIBBON_ALIGN, D as SHORTCUT_CATALOG, Js as SHORTCUT_GROUP_LABEL_KEYS, x as SLIDE_TRANSITION_KEYFRAMES, Z as SLIDE_TRANSITION_KEYFRAMES_CSS, P as SMARTART_COLOR_SCHEMES, _ as SMARTART_STYLE_OPTIONS, p as SmartArt3DKey, Ua as TABLET_BREAKPOINT, Is as TRANSITION_SPEED_DURATION_MS, $a as TableSelectionKey, Fs as WHEEL_SPOKE_COUNTS, fa as buildClickGroups, ls as computeCellSelection, r as computeDocumentStatistics, Ha as computeElapsed, L as countWords, E as createStroke, e as eraseStrokesAtPoint, fs as formatRehearseMs, f as generateCommentId, V as getCinematicTransitionAnimations, is as getP14TransitionAnimations, Qa as getSlideTransitionAnimations, i as groupShortcutCatalog, pa as injectTableSelection, Za as inlineEditorRect, W as isMobileViewport, Na as nodeIdsInRenderOrder, t as parseSignaturesFromBuffer, Da as provideTableSelection, v as resolveDirection, C as resolveDirection8, w as resolveOrientation, X as resolveShortcutAction, s as resolveSlideTransition, Ra as resolveTransitionDurationMs, os as resolveWheelSpokeCount, q as smartArtLayoutLabel, Ja as textNodeIdsInRenderOrder, ms as toShapePreset, ds as useAccessibility, Aa as useAlignGroup, N as useAnimationPlayback, ea as useAutosave, J as useChartEditing, _a as useCollaboration, rs as useCollaborationWiring, K as useColorChangeImage, Wa as useComments, ps as useCommentsWiring, Fa as useContextMenu, a as useCustomShows, z as useCustomShowsWiring, T as useDebouncedCallback, aa as useDocumentPropertiesDialog, S as useDocumentStatistics, A as useEditorHistory, Q as useEditorKeyboard, u as useEditorOperations, ss as useElementDrag, I as useElementInsertion, c as useEmbeddedFonts, Y as useExport, O as useExportProgress, n as useExportWiring, vs as useFindReplace, B as useFontEmbedding, j as useFormatPainter, h as useHeaderFooterDialog, d as useInkDrawing, k as useInlineEditing, R as useInsertElementDialogs, $ as useIsMobile, M as useKeyboardInsets, m as useKeyboardShortcuts, ba as useLoadContent, qa as useMasterViewState, U as useMediaExport, b as useMobileChrome, Vs as useModel3dScene, Ma as useMorphTransitionOverlay, o as useMultiSelectOps, l as usePasswordProtection, Ts as usePresentationAnnotations, H as usePresentationModeWiring, oa as usePrint, ma as useRehearseTimings, xs as useRibbonActions, Sa as useRibbonProps, wa as useRibbonUiState, ja as useSectionOperations, Ka as useSelectionPaneWiring, G as useSheetDismissDrag, Ga as useSignatureWorkflow, ya as useSignatures, La as useSlideMutations, ca as useSlideOperations, ys as useSlideShowSettings, Ba as useSlideTemplateInsertion, F as useSmartArt3D, ka as useSmartArtEditing, y as useSmartArtFocus, Ta as useSmartArtHoverRect, Ia as useSmartArtInlineEditState, da as useSmartArtNodeEditContext, es as useTableCellEditingContext, cs as useTableCellSelection, Xa as useThemeEditing, na as useToolbarAutoHide, ts as useToolbarVisibility, Va as useTouchGestures, ia as useVersionHistory, ns as useVersionHistoryWiring, gs as useViewerSettingsDialog };
Binary file
Binary file