pptx-vue-viewer 4.44.0 → 4.46.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 +33 -0
- package/README.md +2 -2
- package/dist/{AiChatPanel-BGWwcF0k.js → AiChatPanel-DFuzQuJU.js} +2 -2
- package/dist/AiChatPanel-DFuzQuJU.js.br +0 -0
- package/dist/AiChatPanel-DFuzQuJU.js.gz +0 -0
- package/dist/{AiChatPanel-6BBi_4MF.cjs → AiChatPanel-D_Q17Wtu.cjs} +1 -1
- package/dist/AiChatPanel-D_Q17Wtu.cjs.br +0 -0
- package/dist/AiChatPanel-D_Q17Wtu.cjs.gz +0 -0
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.br +0 -0
- package/dist/index.cjs.gz +0 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.js +2 -2
- package/dist/index.js.br +0 -0
- package/dist/index.js.gz +0 -0
- package/dist/internals.cjs +1 -1
- package/dist/internals.cjs.br +0 -0
- package/dist/internals.cjs.gz +0 -0
- package/dist/internals.d.ts +3 -0
- package/dist/internals.js +1 -1
- package/dist/internals.js.br +0 -0
- package/dist/internals.js.gz +0 -0
- package/dist/{useViewerSettingsDialog-C8CtLKnI.js → useViewerSettingsDialog-CJMF2f_L.js} +2575 -2544
- package/dist/useViewerSettingsDialog-CJMF2f_L.js.br +0 -0
- package/dist/useViewerSettingsDialog-CJMF2f_L.js.gz +0 -0
- package/dist/{useViewerSettingsDialog-ZrhB1hri.cjs → useViewerSettingsDialog-CWoUSatY.cjs} +142 -111
- package/dist/useViewerSettingsDialog-CWoUSatY.cjs.br +0 -0
- package/dist/{useViewerSettingsDialog-ZrhB1hri.cjs.gz → useViewerSettingsDialog-CWoUSatY.cjs.gz} +0 -0
- package/dist/viewer/index.cjs +1 -1
- package/dist/viewer/index.cjs.br +0 -0
- package/dist/viewer/index.cjs.gz +0 -0
- package/dist/viewer/index.d.ts +13 -0
- package/dist/viewer/index.js +2 -2
- package/dist/viewer/index.js.br +0 -0
- package/dist/viewer/index.js.gz +0 -0
- package/dist/{viewer-BZEPCKNP.cjs → viewer-Yk-sYgUA.cjs} +312 -306
- package/dist/viewer-Yk-sYgUA.cjs.br +0 -0
- package/dist/viewer-Yk-sYgUA.cjs.gz +0 -0
- package/dist/{viewer-BwSDTF4b.js → viewer-eKX1MZ4K.js} +6545 -6539
- package/dist/viewer-eKX1MZ4K.js.br +0 -0
- package/dist/viewer-eKX1MZ4K.js.gz +0 -0
- package/dist/{y-webrtc-ugRXIsvG.js → y-webrtc-6M09Lxxx.js} +1 -1
- package/dist/y-webrtc-6M09Lxxx.js.br +0 -0
- package/dist/y-webrtc-6M09Lxxx.js.gz +0 -0
- package/dist/{y-webrtc-C6jlHQOv.cjs → y-webrtc-Bswp1Y3G.cjs} +1 -1
- package/dist/y-webrtc-Bswp1Y3G.cjs.br +0 -0
- package/dist/y-webrtc-Bswp1Y3G.cjs.gz +0 -0
- package/package.json +3 -3
- package/dist/AiChatPanel-6BBi_4MF.cjs.br +0 -0
- package/dist/AiChatPanel-6BBi_4MF.cjs.gz +0 -0
- package/dist/AiChatPanel-BGWwcF0k.js.br +0 -0
- package/dist/AiChatPanel-BGWwcF0k.js.gz +0 -0
- package/dist/useViewerSettingsDialog-C8CtLKnI.js.br +0 -0
- package/dist/useViewerSettingsDialog-C8CtLKnI.js.gz +0 -0
- package/dist/useViewerSettingsDialog-ZrhB1hri.cjs.br +0 -0
- package/dist/viewer-BZEPCKNP.cjs.br +0 -0
- package/dist/viewer-BZEPCKNP.cjs.gz +0 -0
- package/dist/viewer-BwSDTF4b.js.br +0 -0
- package/dist/viewer-BwSDTF4b.js.gz +0 -0
- package/dist/y-webrtc-C6jlHQOv.cjs.br +0 -0
- package/dist/y-webrtc-C6jlHQOv.cjs.gz +0 -0
- package/dist/y-webrtc-ugRXIsvG.js.br +0 -0
- package/dist/y-webrtc-ugRXIsvG.js.gz +0 -0
|
Binary file
|
|
Binary file
|
|
@@ -8258,91 +8258,103 @@ function ed(e) {
|
|
|
8258
8258
|
};
|
|
8259
8259
|
}
|
|
8260
8260
|
function td(e, t) {
|
|
8261
|
-
const n = (0, d.ref)(!1), o = (0, u.createCollaborationLivePatcher)();
|
|
8262
|
-
let
|
|
8263
|
-
const
|
|
8264
|
-
getYDoc: () =>
|
|
8261
|
+
const n = (0, d.ref)(!1), o = (0, d.ref)(!1), l = (0, d.ref)(void 0), a = (0, u.createCollaborationLivePatcher)();
|
|
8262
|
+
let r = null, i = null, s = null, c = !1, p = "", m = null, v = null;
|
|
8263
|
+
const f = (0, u.createWriteBackScheduler)({
|
|
8264
|
+
getYDoc: () => r,
|
|
8265
8265
|
serialize: e.serialize,
|
|
8266
8266
|
getSourceBytes: e.getSourceBytes,
|
|
8267
8267
|
getTemplateElements: e.getTemplateElements,
|
|
8268
8268
|
mergeTemplateElements: u.buildSaveSlides,
|
|
8269
|
-
getSaveOptions: e.getSaveOptions
|
|
8270
|
-
|
|
8271
|
-
|
|
8272
|
-
|
|
8269
|
+
getSaveOptions: e.getSaveOptions,
|
|
8270
|
+
onWriteBackStatus: () => {
|
|
8271
|
+
l.value = f.getState();
|
|
8272
|
+
}
|
|
8273
|
+
}), g = (0, u.createSyncGate)(() => {
|
|
8274
|
+
o.value = !0, y();
|
|
8275
|
+
}), h = {
|
|
8276
|
+
...g,
|
|
8277
|
+
reset: () => {
|
|
8278
|
+
g.reset(), o.value = !1;
|
|
8279
|
+
}
|
|
8280
|
+
};
|
|
8281
|
+
function y() {
|
|
8282
|
+
if (!r || !i || !s || c || !h.isOpen()) return;
|
|
8273
8283
|
if (e.slidesPaused?.()) return;
|
|
8274
|
-
if ("viewer" ===
|
|
8284
|
+
if ("viewer" === s.role || s.externalSession && !s.externalSession.getSnapshot().synced) return;
|
|
8275
8285
|
const t = JSON.stringify(e.slides.value);
|
|
8276
|
-
t !==
|
|
8286
|
+
t !== p && (p = t, (0, u.reconcileSlidesInYDoc)(e.slides.value, r, i), f.schedule(s));
|
|
8277
8287
|
}
|
|
8278
|
-
function
|
|
8279
|
-
|
|
8288
|
+
function k(t) {
|
|
8289
|
+
p = JSON.stringify(t), c = !0;
|
|
8280
8290
|
try {
|
|
8281
8291
|
e.onRemoteSlides(t);
|
|
8282
8292
|
} finally {
|
|
8283
|
-
|
|
8293
|
+
c = !1;
|
|
8284
8294
|
}
|
|
8285
8295
|
}
|
|
8286
|
-
const
|
|
8296
|
+
const x = (0, d.watch)(e.slides, y, { deep: !1 }), b = e.loadVersion ? (S = {
|
|
8287
8297
|
loadVersion: e.loadVersion,
|
|
8288
|
-
getYDoc: () =>
|
|
8289
|
-
isConnected: () => !
|
|
8298
|
+
getYDoc: () => r,
|
|
8299
|
+
isConnected: () => !s?.externalSession && "connected" === t.value,
|
|
8290
8300
|
getLoadOrigin: e.getLoadOrigin,
|
|
8291
|
-
adoptDocSlides:
|
|
8292
|
-
}, (0, d.watch)(
|
|
8293
|
-
const e =
|
|
8294
|
-
if (!e || !
|
|
8301
|
+
adoptDocSlides: k
|
|
8302
|
+
}, (0, d.watch)(S.loadVersion, () => {
|
|
8303
|
+
const e = S.getYDoc();
|
|
8304
|
+
if (!e || !S.isConnected()) return;
|
|
8295
8305
|
const t = (0, u.readSlidesFromYDoc)(e);
|
|
8296
|
-
(0, u.shouldRoomSlidesReplaceLoad)(
|
|
8306
|
+
(0, u.shouldRoomSlidesReplaceLoad)(S.getLoadOrigin?.(), t.length) && S.adoptDocSlides(t);
|
|
8297
8307
|
}, { flush: "sync" })) : null;
|
|
8298
|
-
var
|
|
8299
|
-
const
|
|
8300
|
-
|
|
8308
|
+
var S;
|
|
8309
|
+
const w = e.loadVersion ? (0, d.watch)(e.loadVersion, () => {
|
|
8310
|
+
m?.handleLoad(e.getLoadOrigin?.() ?? "user");
|
|
8301
8311
|
}, { flush: "sync" }) : null;
|
|
8302
|
-
function
|
|
8303
|
-
|
|
8312
|
+
function E() {
|
|
8313
|
+
m?.(), m = null, v?.(), v = null, h.reset(), f.cancel(), l.value = void 0, a.configure(null, null), r = null, i = null, s = null, c = !1, p = "", n.value = !1;
|
|
8304
8314
|
}
|
|
8305
8315
|
return {
|
|
8306
8316
|
readOnly: n,
|
|
8307
|
-
|
|
8308
|
-
|
|
8317
|
+
synced: o,
|
|
8318
|
+
writeBackState: l,
|
|
8319
|
+
livePatcher: a,
|
|
8320
|
+
gate: h,
|
|
8309
8321
|
begin: function(e) {
|
|
8310
|
-
|
|
8311
|
-
},
|
|
8312
|
-
attach: function(e,
|
|
8313
|
-
if (
|
|
8314
|
-
const
|
|
8315
|
-
if (
|
|
8316
|
-
gate:
|
|
8317
|
-
livePatcher:
|
|
8318
|
-
factories:
|
|
8319
|
-
role:
|
|
8320
|
-
sessionIntent:
|
|
8322
|
+
s = e, n.value = "viewer" === e.role || Boolean(e.externalSession);
|
|
8323
|
+
},
|
|
8324
|
+
attach: function(e, o) {
|
|
8325
|
+
if (r = e, i = o, !s) return;
|
|
8326
|
+
const l = s;
|
|
8327
|
+
if (l.externalSession) return void (m = (0, u.observeExternalCollaborationReadiness)(l.externalSession, {
|
|
8328
|
+
gate: h,
|
|
8329
|
+
livePatcher: a,
|
|
8330
|
+
factories: i,
|
|
8331
|
+
role: l.role,
|
|
8332
|
+
sessionIntent: l.sessionIntent,
|
|
8321
8333
|
onStatus: (e) => {
|
|
8322
8334
|
t.value = e;
|
|
8323
8335
|
},
|
|
8324
8336
|
adoptSlides: (e) => {
|
|
8325
|
-
|
|
8337
|
+
k(e), f.schedule(l);
|
|
8326
8338
|
},
|
|
8327
8339
|
onReady: ({ seedEmptyRoom: e }) => {
|
|
8328
|
-
e && (
|
|
8340
|
+
e && (p = ""), y();
|
|
8329
8341
|
},
|
|
8330
|
-
onSuspend: () =>
|
|
8342
|
+
onSuspend: () => f.cancel(),
|
|
8331
8343
|
onReadOnlyChange: (e) => {
|
|
8332
8344
|
n.value = e;
|
|
8333
8345
|
}
|
|
8334
8346
|
}));
|
|
8335
|
-
|
|
8336
|
-
if (t?.origin === u.LOCAL_SYNC_ORIGIN ||
|
|
8337
|
-
const n = (0, u.readSlidesFromYDoc)(
|
|
8338
|
-
n.length && (
|
|
8347
|
+
a.configure("viewer" === l.role ? null : r, i), v = (0, u.observeYDocSlides)(r, (e, t) => {
|
|
8348
|
+
if (t?.origin === u.LOCAL_SYNC_ORIGIN || c || !r) return;
|
|
8349
|
+
const n = (0, u.readSlidesFromYDoc)(r);
|
|
8350
|
+
n.length && (k(n), f.schedule(l));
|
|
8339
8351
|
});
|
|
8340
|
-
const
|
|
8341
|
-
|
|
8352
|
+
const d = (0, u.readSlidesFromYDoc)(r);
|
|
8353
|
+
d.length && k(d);
|
|
8342
8354
|
},
|
|
8343
|
-
stop:
|
|
8355
|
+
stop: E,
|
|
8344
8356
|
dispose: () => {
|
|
8345
|
-
|
|
8357
|
+
E(), x(), b?.(), w?.();
|
|
8346
8358
|
}
|
|
8347
8359
|
};
|
|
8348
8360
|
}
|
|
@@ -8353,7 +8365,7 @@ function od(e) {
|
|
|
8353
8365
|
return t > 0 ? t : nd;
|
|
8354
8366
|
}
|
|
8355
8367
|
function ld(e) {
|
|
8356
|
-
const t = (0, d.ref)([]), n = (0, d.ref)([]), o = (0, d.ref)([]), l = (0, d.ref)(null), a = (0, d.computed)(() => t.value.find((e) => e.clientId === l.value)?.activeSlide ?? null),
|
|
8368
|
+
const t = (0, d.ref)([]), n = (0, d.ref)([]), o = (0, d.ref)([]), l = (0, d.ref)(null), a = (0, d.ref)(null), r = (0, d.computed)(() => t.value.find((e) => e.clientId === l.value)?.activeSlide ?? null), i = (0, d.computed)(() => t.value.find((e) => "owner" === e.role)?.activeSlide ?? null), s = function() {
|
|
8357
8369
|
const e = (0, u.createPresenceProjector)();
|
|
8358
8370
|
let t = [];
|
|
8359
8371
|
return {
|
|
@@ -8387,37 +8399,38 @@ function ld(e) {
|
|
|
8387
8399
|
}
|
|
8388
8400
|
};
|
|
8389
8401
|
}();
|
|
8390
|
-
let
|
|
8391
|
-
function
|
|
8392
|
-
if (!
|
|
8393
|
-
const a =
|
|
8402
|
+
let c = null, p = null, m = 0, v = null;
|
|
8403
|
+
function f() {
|
|
8404
|
+
if (!c) return;
|
|
8405
|
+
const a = s.project(c.getStates(), c.clientID ?? -1, od(e.canvasWidth), od(e.canvasHeight), m);
|
|
8394
8406
|
a.changed && (t.value = a.presences, n.value = a.remoteUsers, o.value = a.cursors, null === l.value || a.presences.some((e) => e.clientId === l.value) || (l.value = null));
|
|
8395
8407
|
}
|
|
8396
8408
|
return {
|
|
8409
|
+
localClientId: a,
|
|
8397
8410
|
remoteUsers: n,
|
|
8398
8411
|
remotePresences: t,
|
|
8399
8412
|
cursors: o,
|
|
8400
8413
|
followedClientId: l,
|
|
8401
|
-
followedSlideIndex:
|
|
8402
|
-
broadcasterSlideIndex:
|
|
8414
|
+
followedSlideIndex: r,
|
|
8415
|
+
broadcasterSlideIndex: i,
|
|
8403
8416
|
start: function(t, n) {
|
|
8404
|
-
|
|
8417
|
+
c = t, a.value = t.clientID ?? null, p = (0, u.createPresencePublisher)(t, {
|
|
8405
8418
|
userName: n.userName,
|
|
8406
8419
|
userColor: e.userColor ?? n.userColor ?? (0, u.assignUserColor)(n.userName),
|
|
8407
8420
|
userAvatar: n.userAvatar,
|
|
8408
8421
|
role: n.role
|
|
8409
|
-
}), t.on("change",
|
|
8422
|
+
}), t.on("change", f), t.on("update", f), v = setInterval(() => p?.flush(), u.PRESENCE_HEARTBEAT_MS), f();
|
|
8410
8423
|
},
|
|
8411
8424
|
stop: function() {
|
|
8412
|
-
null !==
|
|
8425
|
+
null !== v && clearInterval(v), v = null, c?.off?.("change", f), c?.off?.("update", f), p?.dispose(), p = null, c = null, m = 0, s.reset(), t.value = [], n.value = [], o.value = [], l.value = null, a.value = null;
|
|
8413
8426
|
},
|
|
8414
|
-
setCursor: (e, t) =>
|
|
8427
|
+
setCursor: (e, t) => p?.update({
|
|
8415
8428
|
cursorX: e,
|
|
8416
8429
|
cursorY: t
|
|
8417
8430
|
}),
|
|
8418
|
-
setSelection: (e) =>
|
|
8431
|
+
setSelection: (e) => p?.update({ selectedElementId: e[0] }),
|
|
8419
8432
|
setActiveSlide: (e) => {
|
|
8420
|
-
|
|
8433
|
+
m = Math.max(0, Math.floor(e)), p?.update({ activeSlideIndex: m }), f();
|
|
8421
8434
|
},
|
|
8422
8435
|
followUser: (e) => {
|
|
8423
8436
|
l.value = e;
|
|
@@ -8433,40 +8446,57 @@ function ad(e) {
|
|
|
8433
8446
|
sourceError: (0, d.toValue)(e.sourceError) ?? !1,
|
|
8434
8447
|
status: n.value,
|
|
8435
8448
|
remoteUsers: i.remoteUsers.value
|
|
8436
|
-
})), p = (0, d.computed)(() =>
|
|
8437
|
-
|
|
8438
|
-
|
|
8439
|
-
|
|
8440
|
-
|
|
8441
|
-
|
|
8442
|
-
|
|
8449
|
+
})), p = (0, d.computed)(() => (0, u.buildCollaborationState)({
|
|
8450
|
+
active: l.value,
|
|
8451
|
+
roomId: a.value?.roomId,
|
|
8452
|
+
status: n.value,
|
|
8453
|
+
synced: s.synced.value,
|
|
8454
|
+
clientId: i.localClientId.value,
|
|
8455
|
+
userName: a.value?.userName,
|
|
8456
|
+
userColor: e.userColor ?? a.value?.userColor,
|
|
8457
|
+
remoteUsers: i.remoteUsers.value,
|
|
8458
|
+
writeBack: (0, u.writeBackReport)(a.value, s.writeBackState.value)
|
|
8459
|
+
})), m = (0, d.computed)(() => i.remotePresences.value.length + (l.value ? 1 : 0));
|
|
8460
|
+
let v = null, f = null, g = null, h = null, y = null, k = null, x = 0;
|
|
8461
|
+
async function b(e) {
|
|
8462
|
+
S();
|
|
8463
|
+
const t = ++x;
|
|
8464
|
+
y = e, a.value = e, r.value = e.role, s.begin(e);
|
|
8465
|
+
let o = e;
|
|
8443
8466
|
try {
|
|
8444
|
-
(0, u.validateRoomId)(e.roomId)
|
|
8445
|
-
|
|
8446
|
-
|
|
8467
|
+
if ((0, u.validateRoomId)(e.roomId), (0, u.needsOwnedSession)(e)) {
|
|
8468
|
+
n.value = "connecting";
|
|
8469
|
+
const l = (0, u.openOwnedCollaboration)(e);
|
|
8470
|
+
k = l.release;
|
|
8471
|
+
const a = await l.ready;
|
|
8472
|
+
if (t !== x || !a) return;
|
|
8473
|
+
o = a, s.begin(o);
|
|
8474
|
+
}
|
|
8475
|
+
const a = o.externalSession, r = o.transport ?? (0, u.resolveTransportForServerUrl)(o.serverUrl);
|
|
8476
|
+
if (!a && "websocket" === r && (0, u.isMixedContentBlocked)(o.serverUrl)) throw new Error("Mixed-content connection blocked");
|
|
8447
8477
|
n.value = "connecting";
|
|
8448
|
-
const
|
|
8449
|
-
if (t !==
|
|
8450
|
-
const
|
|
8451
|
-
|
|
8452
|
-
const
|
|
8453
|
-
createMap: () => new
|
|
8454
|
-
createArray: () => new
|
|
8455
|
-
createText: () => new
|
|
8478
|
+
const c = await import("yjs");
|
|
8479
|
+
if (t !== x) return;
|
|
8480
|
+
const d = a ? null : new c.Doc(), p = a?.doc ?? d;
|
|
8481
|
+
v = d;
|
|
8482
|
+
const m = {
|
|
8483
|
+
createMap: () => new c.Map(),
|
|
8484
|
+
createArray: () => new c.Array(),
|
|
8485
|
+
createText: () => new c.Text(),
|
|
8456
8486
|
createTextPositions: (e) => (0, u.createSnapshotTextPositions)(e, {
|
|
8457
|
-
read: () =>
|
|
8458
|
-
equal:
|
|
8459
|
-
subscribeBeforeObservers: (e) => (
|
|
8487
|
+
read: () => c.snapshot(p),
|
|
8488
|
+
equal: c.equalSnapshots,
|
|
8489
|
+
subscribeBeforeObservers: (e) => (p.on("beforeObserverCalls", e), () => p.off("beforeObserverCalls", e))
|
|
8460
8490
|
})
|
|
8461
8491
|
};
|
|
8462
|
-
if (
|
|
8463
|
-
const
|
|
8464
|
-
|
|
8492
|
+
if (a) {
|
|
8493
|
+
const e = (0, u.borrowExternalCollaborationAwareness)(a.awareness);
|
|
8494
|
+
g = e.dispose, i.start(e.awareness, o), l.value = !0, s.attach(p, m);
|
|
8465
8495
|
return;
|
|
8466
8496
|
}
|
|
8467
|
-
const
|
|
8497
|
+
const y = await async function(e, t, n) {
|
|
8468
8498
|
if ("webrtc" === e) {
|
|
8469
|
-
const { WebrtcProvider: e } = await Promise.resolve().then(() => require("./y-webrtc-
|
|
8499
|
+
const { WebrtcProvider: e } = await Promise.resolve().then(() => require("./y-webrtc-Bswp1Y3G.cjs")), o = new e(t.roomId, n, {
|
|
8470
8500
|
signaling: t.signaling?.length ? t.signaling : void 0,
|
|
8471
8501
|
password: t.authToken || void 0
|
|
8472
8502
|
}), l = (0, u.createDepartureChannel)(t.roomId, o.awareness);
|
|
@@ -8498,44 +8528,45 @@ function ad(e) {
|
|
|
8498
8528
|
a.announce(), a.dispose(), (0, u.clearLocalAwareness)(l.awareness), l.disconnect(), l.destroy();
|
|
8499
8529
|
}
|
|
8500
8530
|
};
|
|
8501
|
-
}(
|
|
8502
|
-
if (t !==
|
|
8503
|
-
|
|
8504
|
-
e ? (null !==
|
|
8505
|
-
}), "webrtc" ===
|
|
8506
|
-
|
|
8531
|
+
}(r, o, d);
|
|
8532
|
+
if (t !== x) return y.destroy(), void d.destroy();
|
|
8533
|
+
f = y, i.start(y.awareness, o), s.attach(p, m), y.onSynced(() => s.gate.open()), y.syncedNow ? s.gate.open() : s.gate.arm(), y.onStatus((e) => {
|
|
8534
|
+
e ? (null !== h && clearTimeout(h), h = null, n.value = "connected") : l.value && (n.value = "disconnected", s.gate.reset(), s.gate.arm());
|
|
8535
|
+
}), "webrtc" === r || y.connectedNow ? n.value = "connected" : h = setTimeout(() => {
|
|
8536
|
+
h = null, "connected" !== n.value && (S(), n.value = "error");
|
|
8507
8537
|
}, u.CONNECTION_TIMEOUT_MS), l.value = !0;
|
|
8508
8538
|
} catch {
|
|
8509
|
-
if (t !==
|
|
8510
|
-
|
|
8539
|
+
if (t !== x) return;
|
|
8540
|
+
S(), n.value = "error";
|
|
8511
8541
|
}
|
|
8512
8542
|
}
|
|
8513
|
-
function
|
|
8514
|
-
|
|
8543
|
+
function S() {
|
|
8544
|
+
x++, s.stop(), null !== h && clearTimeout(h), h = null, i.stop(), g?.(), g = null, k?.(), k = null, f?.destroy(), v?.destroy(), f = null, v = null, n.value = "disconnected", l.value = !1, a.value = null, r.value = void 0;
|
|
8515
8545
|
}
|
|
8516
|
-
async function
|
|
8517
|
-
|
|
8546
|
+
async function w() {
|
|
8547
|
+
y && await b(y);
|
|
8518
8548
|
}
|
|
8519
8549
|
(0, d.watch)(t, (e) => {
|
|
8520
|
-
e && e !== a.value ?
|
|
8550
|
+
e && e !== a.value ? b(e) : !e && a.value && S();
|
|
8521
8551
|
}, { immediate: !0 });
|
|
8522
|
-
const
|
|
8523
|
-
leave:
|
|
8552
|
+
const E = (0, u.registerCollaborationTeardown)({
|
|
8553
|
+
leave: S,
|
|
8524
8554
|
rejoin: () => {
|
|
8525
|
-
|
|
8555
|
+
w();
|
|
8526
8556
|
},
|
|
8527
|
-
leaveOnBeforeUnload: () => !
|
|
8557
|
+
leaveOnBeforeUnload: () => !y?.externalSession
|
|
8528
8558
|
});
|
|
8529
8559
|
return (0, d.onScopeDispose)(() => {
|
|
8530
|
-
|
|
8560
|
+
E(), S(), s.dispose();
|
|
8531
8561
|
}), {
|
|
8562
|
+
state: p,
|
|
8532
8563
|
shellState: c,
|
|
8533
8564
|
activeCollaboration: a,
|
|
8534
8565
|
status: n,
|
|
8535
8566
|
connected: o,
|
|
8536
8567
|
active: l,
|
|
8537
8568
|
activeRole: r,
|
|
8538
|
-
connectedCount:
|
|
8569
|
+
connectedCount: m,
|
|
8539
8570
|
readOnly: s.readOnly,
|
|
8540
8571
|
cursors: i.cursors,
|
|
8541
8572
|
remotePresences: i.remotePresences,
|
|
@@ -8546,9 +8577,9 @@ function ad(e) {
|
|
|
8546
8577
|
setSelection: i.setSelection,
|
|
8547
8578
|
setActiveSlide: i.setActiveSlide,
|
|
8548
8579
|
followUser: i.followUser,
|
|
8549
|
-
start:
|
|
8550
|
-
stop:
|
|
8551
|
-
retry:
|
|
8580
|
+
start: b,
|
|
8581
|
+
stop: S,
|
|
8582
|
+
retry: w,
|
|
8552
8583
|
livePatcher: s.livePatcher
|
|
8553
8584
|
};
|
|
8554
8585
|
}
|
|
Binary file
|
package/dist/{useViewerSettingsDialog-ZrhB1hri.cjs.gz → useViewerSettingsDialog-CWoUSatY.cjs.gz}
RENAMED
|
Binary file
|
package/dist/viewer/index.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const e = require("../useViewerSettingsDialog-
|
|
2
|
+
const e = require("../useViewerSettingsDialog-CWoUSatY.cjs"), t = require("../viewer-Yk-sYgUA.cjs");
|
|
3
3
|
let r = require("ooxml-ui/pptx");
|
|
4
4
|
Object.defineProperty(exports, "AUDIENCE_HASH", {
|
|
5
5
|
enumerable: !0,
|
package/dist/viewer/index.cjs.br
CHANGED
|
Binary file
|
package/dist/viewer/index.cjs.gz
CHANGED
|
Binary file
|
package/dist/viewer/index.d.ts
CHANGED
|
@@ -11,6 +11,7 @@ import { CollaborationInput } from 'ooxml-ui/pptx';
|
|
|
11
11
|
import { CollaborationLivePatcher } from 'ooxml-ui/pptx';
|
|
12
12
|
import { CollaborationRole } from 'ooxml-ui/pptx';
|
|
13
13
|
import { CollaborationShellState } from 'ooxml-ui/pptx';
|
|
14
|
+
import { CollaborationState } from 'ooxml-core/collab';
|
|
14
15
|
import { collectImagePaths } from 'ooxml-ui/pptx';
|
|
15
16
|
import { collectMediaElements } from 'ooxml-ui/pptx';
|
|
16
17
|
import { ComponentOptionsMixin } from 'vue';
|
|
@@ -133,6 +134,7 @@ declare const __VLS_export: DefineComponent<PowerPointViewerProps, PowerPointVie
|
|
|
133
134
|
"selection-change": (elementIds: string[]) => any;
|
|
134
135
|
"start-collaboration": (config: CollaborationConfig) => any;
|
|
135
136
|
"stop-collaboration": () => any;
|
|
137
|
+
"collaboration-change": (state: CollaborationState) => any;
|
|
136
138
|
}, string, PublicProps, Readonly<PowerPointViewerProps> & Readonly<{
|
|
137
139
|
onError?: ((message: string) => any) | undefined;
|
|
138
140
|
onLoad?: ((detail: ViewerLoadDetail) => any) | undefined;
|
|
@@ -146,6 +148,7 @@ declare const __VLS_export: DefineComponent<PowerPointViewerProps, PowerPointVie
|
|
|
146
148
|
"onSelection-change"?: ((elementIds: string[]) => any) | undefined;
|
|
147
149
|
"onStart-collaboration"?: ((config: CollaborationConfig) => any) | undefined;
|
|
148
150
|
"onStop-collaboration"?: (() => any) | undefined;
|
|
151
|
+
"onCollaboration-change"?: ((state: CollaborationState) => any) | undefined;
|
|
149
152
|
}>, {
|
|
150
153
|
canEdit: boolean;
|
|
151
154
|
barChart3D: boolean;
|
|
@@ -909,6 +912,8 @@ export { CollaborationRole }
|
|
|
909
912
|
|
|
910
913
|
export { CollaborationShellState }
|
|
911
914
|
|
|
915
|
+
export { CollaborationState }
|
|
916
|
+
|
|
912
917
|
export declare const CollaborationStatusIndicator: typeof __VLS_export_18;
|
|
913
918
|
|
|
914
919
|
export { collectImagePaths }
|
|
@@ -1170,6 +1175,12 @@ export declare interface PowerPointViewerEmits {
|
|
|
1170
1175
|
(e: 'start-collaboration', config: CollaborationConfig): void;
|
|
1171
1176
|
/** Fired when the user stops a collaboration session from the Share dialog. */
|
|
1172
1177
|
(e: 'stop-collaboration'): void;
|
|
1178
|
+
/**
|
|
1179
|
+
* Fired with the shared `CollaborationState` when a session starts or stops (the off
|
|
1180
|
+
* state) and when its status, synced flag or people change. Viewer-owned and host-owned
|
|
1181
|
+
* (`collaboration.session`) sessions both report; unchanged states are not repeated.
|
|
1182
|
+
*/
|
|
1183
|
+
(e: 'collaboration-change', state: CollaborationState): void;
|
|
1173
1184
|
/** Fired each time a presentation finishes loading without an error. */
|
|
1174
1185
|
(e: 'load', detail: ViewerLoadDetail): void;
|
|
1175
1186
|
/** Fired once per distinct load failure, with a human-readable message. */
|
|
@@ -1874,6 +1885,8 @@ export declare interface UseCollaborationOptions {
|
|
|
1874
1885
|
export declare interface UseCollaborationResult {
|
|
1875
1886
|
/** Shared custom-shell permissions, connection status and sanitized presence. */
|
|
1876
1887
|
shellState: ComputedRef<CollaborationShellState>;
|
|
1888
|
+
/** The shared `CollaborationState` a host reads (`collaboration-change`). */
|
|
1889
|
+
state: ComputedRef<CollaborationState>;
|
|
1877
1890
|
/** The configuration attached by start() or the reactive collaboration option. */
|
|
1878
1891
|
activeCollaboration: Ref<CollaborationConfig | null>;
|
|
1879
1892
|
status: Ref< ConnectionStatus>;
|
package/dist/viewer/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { $ as a, Ar as s, Bn as r, C as e, Fr as o, Hn as n, Ir as t, Kn as l, L as i, Lr as d, M as R, Mr as S, N as m, Nr as b, P as C, Pr as w, S as u, Vn as c, X as p, Yn as v, Z as f, br as g, fr as j, j as x, jr as y, kr as I, lr as M, lt as P, pr as T, rr as A, ur as E, w as O, x as V, yr as h } from "../useViewerSettingsDialog-
|
|
2
|
-
import { C as k, S as B, _ as D, a as F, b as L, c as N, d as Z, f as q, g as H, h as K, i as W, m as X, n as Y, o as $, p as _, r as z, s as G, t as J, u as Q, v as U, w as aa, y as sa } from "../viewer-
|
|
1
|
+
import { $ as a, Ar as s, Bn as r, C as e, Fr as o, Hn as n, Ir as t, Kn as l, L as i, Lr as d, M as R, Mr as S, N as m, Nr as b, P as C, Pr as w, S as u, Vn as c, X as p, Yn as v, Z as f, br as g, fr as j, j as x, jr as y, kr as I, lr as M, lt as P, pr as T, rr as A, ur as E, w as O, x as V, yr as h } from "../useViewerSettingsDialog-CJMF2f_L.js";
|
|
2
|
+
import { C as k, S as B, _ as D, a as F, b as L, c as N, d as Z, f as q, g as H, h as K, i as W, m as X, n as Y, o as $, p as _, r as z, s as G, t as J, u as Q, v as U, w as aa, y as sa } from "../viewer-eKX1MZ4K.js";
|
|
3
3
|
export { Z as AUDIENCE_HASH, g as ChartRenderer, U as CollaborationCursors, aa as CollaborationStatusIndicator, h as ConnectorRenderer, b as DEFAULT_CANVAS_HEIGHT, w as DEFAULT_CANVAS_WIDTH, o as DEFAULT_FILL_COLOR, t as DEFAULT_STROKE_COLOR, d as DEFAULT_TEXT_COLOR, c as ElementRenderer, T as EquationRenderer, Q as FollowModeBar, j as InkRenderer, k as InlineTextEditor, E as Model3DRenderer, M as OleRenderer, N as PowerPointViewer, D as RemoteSelectionOverlay, L as RibbonToolbar, B as SelectionOverlay, sa as SlideCanvas, r as SlideStage, A as SmartArtRenderer, v as TableRenderer, l as WordArtText, n as ZoomRenderer, R as buildInitialGuides, q as clearAudienceContent, m as collectImagePaths, C as collectMediaElements, V as exportAllSlidesToSvg, u as exportAllSlidesToSvgBlobs, e as exportSlideToSvg, O as exportSlideToSvgBlob, I as getContainerStyle, s as getImageSrc, Y as getResolvedShapeClipPath, z as getResolvedShapeClipPathFor, y as getShapeFillStrokeStyle, S as getTextBlockStyle, _ as isAudienceTab, X as loadAudienceContent, J as overlayInlineTextSnapshot, K as parseAudienceNonce, H as storeAudienceContent, P as useCollaboration, W as useCollaborativeHistory, F as useCollaborativeState, a as useEditorHistory, f as useEditorOperations, p as useElementDrag, i as useInlineEditing, x as useLoadContent, $ as usePresenceTracking, G as useYjsProvider };
|
package/dist/viewer/index.js.br
CHANGED
|
Binary file
|
package/dist/viewer/index.js.gz
CHANGED
|
Binary file
|