@arbidocs/blocks 0.4.155 → 0.4.157
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/{ConnectedNativeDocxComparison-OLWRQSRS.js → ConnectedNativeDocxComparison-2PLOOXSH.js} +6 -6
- package/dist/{ConnectedNativeDocxComparison-OLWRQSRS.js.map → ConnectedNativeDocxComparison-2PLOOXSH.js.map} +1 -1
- package/dist/{ConnectedNativeDocxComparison-YORMOPPN.cjs → ConnectedNativeDocxComparison-S25BPUH5.cjs} +7 -7
- package/dist/{ConnectedNativeDocxComparison-YORMOPPN.cjs.map → ConnectedNativeDocxComparison-S25BPUH5.cjs.map} +1 -1
- package/dist/{ConnectedNativeDocxEditor-34EBIIFS.js → ConnectedNativeDocxEditor-JJAGMHZC.js} +4 -4
- package/dist/{ConnectedNativeDocxEditor-34EBIIFS.js.map → ConnectedNativeDocxEditor-JJAGMHZC.js.map} +1 -1
- package/dist/{ConnectedNativeDocxEditor-EHTWGGX3.cjs → ConnectedNativeDocxEditor-YA4HWLY4.cjs} +6 -6
- package/dist/{ConnectedNativeDocxEditor-EHTWGGX3.cjs.map → ConnectedNativeDocxEditor-YA4HWLY4.cjs.map} +1 -1
- package/dist/{ConnectedStreamedWordArtifact-5DK6QGYN.cjs → ConnectedStreamedWordArtifact-EXYZAU4Y.cjs} +7 -7
- package/dist/ConnectedStreamedWordArtifact-EXYZAU4Y.cjs.map +1 -0
- package/dist/{ConnectedStreamedWordArtifact-GLIDLSAS.js → ConnectedStreamedWordArtifact-YAAXY5KY.js} +6 -6
- package/dist/{ConnectedStreamedWordArtifact-GLIDLSAS.js.map → ConnectedStreamedWordArtifact-YAAXY5KY.js.map} +1 -1
- package/dist/{NativeDocxEditor-XT5ZLFGU.js → NativeDocxEditor-JBQMH3MP.js} +3 -3
- package/dist/{NativeDocxEditor-XT5ZLFGU.js.map → NativeDocxEditor-JBQMH3MP.js.map} +1 -1
- package/dist/{NativeDocxEditor-5VBNM5I7.cjs → NativeDocxEditor-M3I776GD.cjs} +7 -7
- package/dist/{NativeDocxEditor-5VBNM5I7.cjs.map → NativeDocxEditor-M3I776GD.cjs.map} +1 -1
- package/dist/{chunk-MF5KQ4PS.js → chunk-2CWM2CFZ.js} +4 -4
- package/dist/{chunk-MF5KQ4PS.js.map → chunk-2CWM2CFZ.js.map} +1 -1
- package/dist/{chunk-6HMCF4AJ.js → chunk-5ZIYPZYE.js} +1033 -5
- package/dist/chunk-5ZIYPZYE.js.map +1 -0
- package/dist/{chunk-KHXEIEXN.js → chunk-7IRSCMNK.js} +3 -3
- package/dist/{chunk-KHXEIEXN.js.map → chunk-7IRSCMNK.js.map} +1 -1
- package/dist/{chunk-TZOQKV64.js → chunk-EWCJXUBP.js} +3 -3
- package/dist/{chunk-TZOQKV64.js.map → chunk-EWCJXUBP.js.map} +1 -1
- package/dist/{chunk-CU6LDQ57.js → chunk-F3EZDBDJ.js} +4 -4
- package/dist/{chunk-CU6LDQ57.js.map → chunk-F3EZDBDJ.js.map} +1 -1
- package/dist/{chunk-W7CWGURO.js → chunk-FTZ45WHY.js} +6 -685
- package/dist/chunk-FTZ45WHY.js.map +1 -0
- package/dist/{chunk-CQCNU5KT.cjs → chunk-IJEISII2.cjs} +6 -6
- package/dist/{chunk-CQCNU5KT.cjs.map → chunk-IJEISII2.cjs.map} +1 -1
- package/dist/{chunk-NPR5BGFF.cjs → chunk-JSQEAPTC.cjs} +26 -14
- package/dist/chunk-JSQEAPTC.cjs.map +1 -0
- package/dist/{chunk-MUDEL7UL.cjs → chunk-NPLGB4LI.cjs} +4 -703
- package/dist/chunk-NPLGB4LI.cjs.map +1 -0
- package/dist/{chunk-265GOG4W.js → chunk-ONTUMV74.js} +26 -14
- package/dist/chunk-ONTUMV74.js.map +1 -0
- package/dist/chunk-OTU5KGQ6.cjs +18 -0
- package/dist/{chunk-HUATKA3M.cjs.map → chunk-OTU5KGQ6.cjs.map} +1 -1
- package/dist/{chunk-GO3BN76C.js → chunk-PGOSIJ2I.js} +3 -3
- package/dist/{chunk-GO3BN76C.js.map → chunk-PGOSIJ2I.js.map} +1 -1
- package/dist/{chunk-WV4TD2HZ.cjs → chunk-QJFJ5JBF.cjs} +1055 -2
- package/dist/chunk-QJFJ5JBF.cjs.map +1 -0
- package/dist/chunk-S74QMZVZ.cjs +18 -0
- package/dist/{chunk-C3SMTA3C.cjs.map → chunk-S74QMZVZ.cjs.map} +1 -1
- package/dist/{chunk-KUT2Y7JF.cjs → chunk-TQIY2SVY.cjs} +5 -5
- package/dist/{chunk-KUT2Y7JF.cjs.map → chunk-TQIY2SVY.cjs.map} +1 -1
- package/dist/{chunk-757OYF6G.cjs → chunk-VY4UFXTM.cjs} +4 -4
- package/dist/{chunk-757OYF6G.cjs.map → chunk-VY4UFXTM.cjs.map} +1 -1
- package/dist/connect/docx.cjs +10 -10
- package/dist/connect/docx.js +6 -6
- package/dist/connect/index.cjs +626 -66
- package/dist/connect/index.cjs.map +1 -1
- package/dist/connect/index.js +564 -9
- package/dist/connect/index.js.map +1 -1
- package/dist/connect/viewer.cjs +43 -43
- package/dist/connect/viewer.js +5 -5
- package/dist/connection/files/index.d.ts +5 -0
- package/dist/connection/files/support.d.ts +2 -0
- package/dist/connection/files/upload/AddFromAccountsButton.d.ts +16 -0
- package/dist/connection/files/upload/ConnectedUpload.d.ts +36 -0
- package/dist/connection/files/upload/ConnectedUploadDropzone.d.ts +36 -0
- package/dist/connection/files/upload/EmptyWorkspaceUpload.d.ts +13 -0
- package/dist/connection/files/upload/useAddFromUrls.d.ts +13 -0
- package/dist/docx/index.cjs +47 -47
- package/dist/docx/index.js +3 -3
- package/dist/files/PrivacyExplainerModal.d.ts +8 -0
- package/dist/files/ShareToggle.d.ts +8 -0
- package/dist/files/UrlInputDialog.d.ts +24 -0
- package/dist/files/index.cjs +298 -278
- package/dist/files/index.d.ts +4 -0
- package/dist/files/index.js +2 -2
- package/dist/files/media-preview.d.ts +24 -0
- package/node_modules/@arbidocs/coedit/dist/hocuspocus.cjs +96 -29
- package/node_modules/@arbidocs/coedit/dist/hocuspocus.cjs.map +1 -1
- package/node_modules/@arbidocs/coedit/dist/hocuspocus.d.cts +1 -1
- package/node_modules/@arbidocs/coedit/dist/hocuspocus.d.ts +1 -1
- package/node_modules/@arbidocs/coedit/dist/hocuspocus.js +98 -31
- package/node_modules/@arbidocs/coedit/dist/hocuspocus.js.map +1 -1
- package/node_modules/@arbidocs/coedit/dist/index.cjs +96 -29
- package/node_modules/@arbidocs/coedit/dist/index.cjs.map +1 -1
- package/node_modules/@arbidocs/coedit/dist/index.d.cts +1 -1
- package/node_modules/@arbidocs/coedit/dist/index.d.ts +1 -1
- package/node_modules/@arbidocs/coedit/dist/index.js +98 -31
- package/node_modules/@arbidocs/coedit/dist/index.js.map +1 -1
- package/node_modules/@arbidocs/coedit/dist/server.cjs +98 -33
- package/node_modules/@arbidocs/coedit/dist/server.cjs.map +1 -1
- package/node_modules/@arbidocs/coedit/dist/server.d.cts +1 -1
- package/node_modules/@arbidocs/coedit/dist/server.d.ts +1 -1
- package/node_modules/@arbidocs/coedit/dist/server.js +99 -34
- package/node_modules/@arbidocs/coedit/dist/server.js.map +1 -1
- package/node_modules/@arbidocs/coedit/dist/{session-Cf9iu1Vt.d.cts → session-WGvWs6yO.d.cts} +22 -4
- package/node_modules/@arbidocs/coedit/dist/{session-Cf9iu1Vt.d.ts → session-WGvWs6yO.d.ts} +22 -4
- package/node_modules/@arbidocs/coedit/package.json +1 -1
- package/package.json +5 -5
- package/dist/ConnectedStreamedWordArtifact-5DK6QGYN.cjs.map +0 -1
- package/dist/chunk-265GOG4W.js.map +0 -1
- package/dist/chunk-6HMCF4AJ.js.map +0 -1
- package/dist/chunk-C3SMTA3C.cjs +0 -18
- package/dist/chunk-HUATKA3M.cjs +0 -18
- package/dist/chunk-MUDEL7UL.cjs.map +0 -1
- package/dist/chunk-NPR5BGFF.cjs.map +0 -1
- package/dist/chunk-W7CWGURO.js.map +0 -1
- package/dist/chunk-WV4TD2HZ.cjs.map +0 -1
|
@@ -1276,7 +1276,6 @@ function applyJournal(doc, registry, journal, origin, context) {
|
|
|
1276
1276
|
|
|
1277
1277
|
// src/sync.ts
|
|
1278
1278
|
var LOCAL_ORIGIN = /* @__PURE__ */ Symbol("arbi-coedit/local");
|
|
1279
|
-
var DEFAULT_REMOTE_DELAY_MS = 40;
|
|
1280
1279
|
var MirrorSync = class {
|
|
1281
1280
|
doc;
|
|
1282
1281
|
registry = new NodeRegistry();
|
|
@@ -1285,14 +1284,11 @@ var MirrorSync = class {
|
|
|
1285
1284
|
actorId;
|
|
1286
1285
|
onFailure;
|
|
1287
1286
|
onLocalJournal;
|
|
1287
|
+
aroundRemote;
|
|
1288
1288
|
disposers = [];
|
|
1289
|
-
remoteDelayMs;
|
|
1290
1289
|
operation = 0;
|
|
1291
1290
|
applyingRemote = false;
|
|
1292
1291
|
failed = false;
|
|
1293
|
-
remoteDirty = false;
|
|
1294
|
-
remoteOrigin;
|
|
1295
|
-
remoteTimer;
|
|
1296
1292
|
/** Parts whose node ids must be re-registered before the next local journal; true means all. */
|
|
1297
1293
|
staleParts = null;
|
|
1298
1294
|
constructor(options) {
|
|
@@ -1301,7 +1297,7 @@ var MirrorSync = class {
|
|
|
1301
1297
|
this.actorId = options.actorId;
|
|
1302
1298
|
this.onFailure = options.onFailure;
|
|
1303
1299
|
this.onLocalJournal = options.onLocalJournal;
|
|
1304
|
-
this.
|
|
1300
|
+
this.aroundRemote = options.aroundRemote;
|
|
1305
1301
|
registerMirror(this.doc, this.registry);
|
|
1306
1302
|
this.cache = new MaterializeCache(this.doc);
|
|
1307
1303
|
this.disposers.push(() => this.cache.destroy());
|
|
@@ -1322,16 +1318,10 @@ var MirrorSync = class {
|
|
|
1322
1318
|
const onAfterTransaction = (transaction) => {
|
|
1323
1319
|
if (transaction.origin === LOCAL_ORIGIN || this.failed) return;
|
|
1324
1320
|
if (transaction.changed.size === 0 && transaction.changedParentTypes.size === 0) return;
|
|
1325
|
-
this.
|
|
1326
|
-
this.remoteOrigin = transaction.origin;
|
|
1327
|
-
if (this.remoteDelayMs <= 0) this.flushRemote();
|
|
1328
|
-
else if (this.remoteTimer === void 0) {
|
|
1329
|
-
this.remoteTimer = setTimeout(() => this.flushRemote(), this.remoteDelayMs);
|
|
1330
|
-
}
|
|
1321
|
+
this.publishRemote(transaction.origin);
|
|
1331
1322
|
};
|
|
1332
1323
|
this.doc.on("afterTransaction", onAfterTransaction);
|
|
1333
1324
|
this.disposers.push(() => this.doc.off("afterTransaction", onAfterTransaction));
|
|
1334
|
-
this.disposers.push(() => clearTimeout(this.remoteTimer));
|
|
1335
1325
|
}
|
|
1336
1326
|
get hasFailed() {
|
|
1337
1327
|
return this.failed;
|
|
@@ -1340,17 +1330,8 @@ var MirrorSync = class {
|
|
|
1340
1330
|
beforeRemote() {
|
|
1341
1331
|
this.port.flushPendingJournals();
|
|
1342
1332
|
}
|
|
1343
|
-
/** Publish any waiting remote change now. Call before a local operation runs. */
|
|
1344
|
-
flushRemote() {
|
|
1345
|
-
clearTimeout(this.remoteTimer);
|
|
1346
|
-
this.remoteTimer = void 0;
|
|
1347
|
-
if (!this.remoteDirty || this.failed) return;
|
|
1348
|
-
this.remoteDirty = false;
|
|
1349
|
-
this.publishRemote(this.remoteOrigin);
|
|
1350
|
-
}
|
|
1351
1333
|
/** Make the local tree equal to the room: used when the editor opened an older snapshot of it. */
|
|
1352
1334
|
adopt() {
|
|
1353
|
-
this.remoteDirty = false;
|
|
1354
1335
|
this.publishRemote(void 0);
|
|
1355
1336
|
}
|
|
1356
1337
|
/** Re-register node ids for parts a remote publication replaced; deferred until a local edit needs them. */
|
|
@@ -1360,23 +1341,29 @@ var MirrorSync = class {
|
|
|
1360
1341
|
this.staleParts = null;
|
|
1361
1342
|
}
|
|
1362
1343
|
publishRemote(origin) {
|
|
1344
|
+
if (this.failed) return;
|
|
1345
|
+
const published = this.aroundRemote?.();
|
|
1363
1346
|
this.applyingRemote = true;
|
|
1364
1347
|
const changed = this.cache.take();
|
|
1348
|
+
let ok = false;
|
|
1365
1349
|
try {
|
|
1366
1350
|
const result = this.port.applyRemotePackage(materialize(this.doc, this.cache, changed), {
|
|
1367
|
-
origin:
|
|
1351
|
+
// The editor's own origin for a peer's change: it carries the local caret only across those.
|
|
1352
|
+
origin: store.ORIGIN_IDS.mutationRemote,
|
|
1368
1353
|
actorId: typeof origin === "string" ? origin : this.actorId,
|
|
1369
1354
|
operationId: `${this.actorId}:remote:${this.operation++}`
|
|
1370
1355
|
});
|
|
1371
1356
|
if (!result.ok) throw new JournalError(result.reason);
|
|
1372
1357
|
if (changed === null || this.staleParts === true) this.staleParts = true;
|
|
1373
1358
|
else this.staleParts = /* @__PURE__ */ new Set([...this.staleParts ?? [], ...changed]);
|
|
1359
|
+
ok = true;
|
|
1374
1360
|
} catch (error) {
|
|
1375
1361
|
this.cache.restore(changed);
|
|
1376
1362
|
this.fail(error instanceof MaterializeError ? "materialize" : "apply", error);
|
|
1377
1363
|
} finally {
|
|
1378
1364
|
this.applyingRemote = false;
|
|
1379
1365
|
}
|
|
1366
|
+
if (ok) published?.();
|
|
1380
1367
|
}
|
|
1381
1368
|
fail(code, error) {
|
|
1382
1369
|
if (this.failed) return;
|
|
@@ -1430,7 +1417,6 @@ var DocxCollaborationSession = class {
|
|
|
1430
1417
|
doc;
|
|
1431
1418
|
awareness;
|
|
1432
1419
|
offlineEditing;
|
|
1433
|
-
remoteDelayMs;
|
|
1434
1420
|
tracker = collaboration.createCollaborationStatusTracker("initializing");
|
|
1435
1421
|
statusListeners = /* @__PURE__ */ new Set();
|
|
1436
1422
|
participantListeners = /* @__PURE__ */ new Set();
|
|
@@ -1443,6 +1429,10 @@ var DocxCollaborationSession = class {
|
|
|
1443
1429
|
selectionsCache = [];
|
|
1444
1430
|
selectionsKey = "[]";
|
|
1445
1431
|
baselineVector;
|
|
1432
|
+
/** The selection the editor last published, carried across the remote changes since. */
|
|
1433
|
+
carried = null;
|
|
1434
|
+
selectionMove = null;
|
|
1435
|
+
inputFlush = null;
|
|
1446
1436
|
disposers = [];
|
|
1447
1437
|
constructor(options) {
|
|
1448
1438
|
this.documentId = options.documentId;
|
|
@@ -1451,7 +1441,6 @@ var DocxCollaborationSession = class {
|
|
|
1451
1441
|
this.doc = options.doc;
|
|
1452
1442
|
this.awareness = options.awareness;
|
|
1453
1443
|
this.offlineEditing = options.offlineEditing ?? false;
|
|
1454
|
-
this.remoteDelayMs = options.remoteDelayMs;
|
|
1455
1444
|
this.undoManager = new Y3__namespace.UndoManager(
|
|
1456
1445
|
[
|
|
1457
1446
|
this.doc.getMap("parts"),
|
|
@@ -1513,7 +1502,6 @@ var DocxCollaborationSession = class {
|
|
|
1513
1502
|
return this.port !== void 0;
|
|
1514
1503
|
}
|
|
1515
1504
|
gateOperations() {
|
|
1516
|
-
this.sync?.flushRemote();
|
|
1517
1505
|
switch (this.status()) {
|
|
1518
1506
|
case "ready":
|
|
1519
1507
|
return this.port ? null : "collaboration-session-not-attached";
|
|
@@ -1542,7 +1530,7 @@ var DocxCollaborationSession = class {
|
|
|
1542
1530
|
doc: this.doc,
|
|
1543
1531
|
port,
|
|
1544
1532
|
actorId: this.identity.actorId,
|
|
1545
|
-
|
|
1533
|
+
aroundRemote: () => this.carrySelection(),
|
|
1546
1534
|
onFailure: (code, detail) => {
|
|
1547
1535
|
this.markFailed(code === "journal" ? "local-mirror-failed" : "remote-apply-failed", detail);
|
|
1548
1536
|
},
|
|
@@ -1566,8 +1554,21 @@ var DocxCollaborationSession = class {
|
|
|
1566
1554
|
}
|
|
1567
1555
|
/** Transport hook: call before integrating inbound Yjs data so queued local edits are mirrored first. */
|
|
1568
1556
|
beforeRemote() {
|
|
1557
|
+
this.inputFlush?.();
|
|
1569
1558
|
this.sync?.beforeRemote();
|
|
1570
1559
|
}
|
|
1560
|
+
/**
|
|
1561
|
+
* Bind the editor's pending-input flush (`PaginatedSurface.flushPendingInput`). The session writes
|
|
1562
|
+
* below the editor's input buffer, so it lands queued typing before a remote change and lays the
|
|
1563
|
+
* change out right after it: the editor carries its caret at that layout, and a keystroke before
|
|
1564
|
+
* it would otherwise use the caret from before the change. Returns the unbind function.
|
|
1565
|
+
*/
|
|
1566
|
+
bindEditorInput(flush) {
|
|
1567
|
+
this.inputFlush = flush;
|
|
1568
|
+
return () => {
|
|
1569
|
+
if (this.inputFlush === flush) this.inputFlush = null;
|
|
1570
|
+
};
|
|
1571
|
+
}
|
|
1571
1572
|
// ── Undo ─────────────────────────────────────────────────────────────────
|
|
1572
1573
|
canUndo() {
|
|
1573
1574
|
return this.undoManager.undoStack.length > 0;
|
|
@@ -1580,7 +1581,6 @@ var DocxCollaborationSession = class {
|
|
|
1580
1581
|
if (this.gateOperations() !== null || !this.canUndo()) return false;
|
|
1581
1582
|
this.undoManager.stopCapturing();
|
|
1582
1583
|
this.undoManager.undo();
|
|
1583
|
-
this.sync?.flushRemote();
|
|
1584
1584
|
return true;
|
|
1585
1585
|
}
|
|
1586
1586
|
redo() {
|
|
@@ -1588,13 +1588,79 @@ var DocxCollaborationSession = class {
|
|
|
1588
1588
|
if (this.gateOperations() !== null || !this.canRedo()) return false;
|
|
1589
1589
|
this.undoManager.stopCapturing();
|
|
1590
1590
|
this.undoManager.redo();
|
|
1591
|
-
this.sync?.flushRemote();
|
|
1592
1591
|
return true;
|
|
1593
1592
|
}
|
|
1594
1593
|
// ── Presence ─────────────────────────────────────────────────────────────
|
|
1595
1594
|
setLocalSelection(selection) {
|
|
1595
|
+
this.carried = selection && selection.kind !== "cells" ? { from: null, selection } : null;
|
|
1596
|
+
this.selectionMove = null;
|
|
1596
1597
|
this.awareness.setLocalStateField("selection", selection);
|
|
1597
1598
|
}
|
|
1599
|
+
/** Where the last remote change carried the local selection; see `carrySelection`. */
|
|
1600
|
+
remoteSelectionMove() {
|
|
1601
|
+
return this.selectionMove;
|
|
1602
|
+
}
|
|
1603
|
+
/**
|
|
1604
|
+
* Called before a remote change reaches the port: notes the selection's paragraphs and their text,
|
|
1605
|
+
* and returns what carries it across the change once the port holds the new tree. The editor
|
|
1606
|
+
* takes the carried selection when a local edit was coalesced with the remote change, where it
|
|
1607
|
+
* cannot map its caret by the text alone. Several remote changes before the editor publishes its
|
|
1608
|
+
* selection again chain, all from the selection it published.
|
|
1609
|
+
*/
|
|
1610
|
+
carrySelection() {
|
|
1611
|
+
const port = this.port;
|
|
1612
|
+
const carried = this.carried;
|
|
1613
|
+
const settle = () => this.inputFlush?.();
|
|
1614
|
+
if (!port || !carried) return settle;
|
|
1615
|
+
const before = (address) => {
|
|
1616
|
+
const paragraph = port.paragraphByStableId(address.paragraphId);
|
|
1617
|
+
if (!paragraph) return null;
|
|
1618
|
+
const offset = Math.min(address.offset, paragraph.text.length);
|
|
1619
|
+
return { nodeId: paragraph.nodeId, text: paragraph.text, offset };
|
|
1620
|
+
};
|
|
1621
|
+
const anchor = before(carried.selection.anchor);
|
|
1622
|
+
const head = before(carried.selection.head);
|
|
1623
|
+
if (!anchor || !head) {
|
|
1624
|
+
this.carried = null;
|
|
1625
|
+
this.selectionMove = null;
|
|
1626
|
+
return settle;
|
|
1627
|
+
}
|
|
1628
|
+
const from = carried.from ?? {
|
|
1629
|
+
anchor: { nodeId: anchor.nodeId, offset: anchor.offset },
|
|
1630
|
+
head: { nodeId: head.nodeId, offset: head.offset }
|
|
1631
|
+
};
|
|
1632
|
+
return () => {
|
|
1633
|
+
const after = (address, was) => {
|
|
1634
|
+
const paragraph = port.paragraphByStableId(address.paragraphId);
|
|
1635
|
+
if (!paragraph) return null;
|
|
1636
|
+
const offset = replication.mapOffsetAcrossText(was.offset, was.text, paragraph.text);
|
|
1637
|
+
return { paragraphId: address.paragraphId, nodeId: paragraph.nodeId, offset };
|
|
1638
|
+
};
|
|
1639
|
+
const nextAnchor = after(carried.selection.anchor, anchor);
|
|
1640
|
+
const nextHead = after(carried.selection.head, head);
|
|
1641
|
+
if (!nextAnchor || !nextHead) {
|
|
1642
|
+
this.carried = null;
|
|
1643
|
+
this.selectionMove = null;
|
|
1644
|
+
} else {
|
|
1645
|
+
this.carried = {
|
|
1646
|
+
from,
|
|
1647
|
+
selection: {
|
|
1648
|
+
...carried.selection,
|
|
1649
|
+
anchor: { paragraphId: nextAnchor.paragraphId, offset: nextAnchor.offset },
|
|
1650
|
+
head: { paragraphId: nextHead.paragraphId, offset: nextHead.offset }
|
|
1651
|
+
}
|
|
1652
|
+
};
|
|
1653
|
+
this.selectionMove = {
|
|
1654
|
+
from,
|
|
1655
|
+
to: {
|
|
1656
|
+
anchor: { nodeId: nextAnchor.nodeId, offset: nextAnchor.offset },
|
|
1657
|
+
head: { nodeId: nextHead.nodeId, offset: nextHead.offset }
|
|
1658
|
+
}
|
|
1659
|
+
};
|
|
1660
|
+
}
|
|
1661
|
+
settle();
|
|
1662
|
+
};
|
|
1663
|
+
}
|
|
1598
1664
|
participants() {
|
|
1599
1665
|
return this.participantsCache;
|
|
1600
1666
|
}
|
|
@@ -1666,6 +1732,7 @@ var DocxCollaborationSession = class {
|
|
|
1666
1732
|
this.sync?.destroy();
|
|
1667
1733
|
this.sync = void 0;
|
|
1668
1734
|
this.port = void 0;
|
|
1735
|
+
this.inputFlush = null;
|
|
1669
1736
|
this.undoManager.destroy();
|
|
1670
1737
|
this.awareness.setLocalState(null);
|
|
1671
1738
|
for (const dispose of this.disposers.splice(0)) dispose();
|