superdoc 2.18.0-next.4 → 2.18.0-next.6
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.
|
@@ -19,7 +19,7 @@ var COLLABORATION_UPGRADE_ENGINE_MINIMUM_NODE_MAJOR = 20;
|
|
|
19
19
|
var PRIVATE_ENGINE_INFO = (0, _superdoc_docx_engine_collaboration_upgrade_engine.getCollaborationUpgradeEngineInfo)();
|
|
20
20
|
var ENGINE_INFO = Object.freeze({
|
|
21
21
|
...PRIVATE_ENGINE_INFO,
|
|
22
|
-
superdocVersion: "2.18.0-next.
|
|
22
|
+
superdocVersion: "2.18.0-next.6",
|
|
23
23
|
roomSchemaVersion: Object.freeze({ ...PRIVATE_ENGINE_INFO.roomSchemaVersion }),
|
|
24
24
|
supportedBundleVersions: SUPPORTED_COLLABORATION_UPGRADE_BUNDLE_VERSIONS,
|
|
25
25
|
supportedV1ReaderContractVersions: SUPPORTED_V1_READER_CONTRACT_VERSIONS
|
|
@@ -18,7 +18,7 @@ var COLLABORATION_UPGRADE_ENGINE_MINIMUM_NODE_MAJOR = 20;
|
|
|
18
18
|
var PRIVATE_ENGINE_INFO = getCollaborationUpgradeEngineInfo$1();
|
|
19
19
|
var ENGINE_INFO = Object.freeze({
|
|
20
20
|
...PRIVATE_ENGINE_INFO,
|
|
21
|
-
superdocVersion: "2.18.0-next.
|
|
21
|
+
superdocVersion: "2.18.0-next.6",
|
|
22
22
|
roomSchemaVersion: Object.freeze({ ...PRIVATE_ENGINE_INFO.roomSchemaVersion }),
|
|
23
23
|
supportedBundleVersions: SUPPORTED_COLLABORATION_UPGRADE_BUNDLE_VERSIONS,
|
|
24
24
|
supportedV1ReaderContractVersions: SUPPORTED_V1_READER_CONTRACT_VERSIONS
|
package/dist/superdoc.cjs
CHANGED
|
@@ -316,7 +316,7 @@ var shuffleArray = (array) => {
|
|
|
316
316
|
var DEFAULT_ENDPOINT = "https://ingest.superdoc.dev/v1/collect";
|
|
317
317
|
function getSuperdocVersion() {
|
|
318
318
|
try {
|
|
319
|
-
return "2.18.0-next.
|
|
319
|
+
return "2.18.0-next.6";
|
|
320
320
|
} catch {
|
|
321
321
|
return "unknown";
|
|
322
322
|
}
|
|
@@ -45726,7 +45726,7 @@ var SuperDoc = class extends require_eventemitter3.import_eventemitter3.default
|
|
|
45726
45726
|
this.config.colors = shuffleArray(this.config.colors);
|
|
45727
45727
|
this.userColorMap = /* @__PURE__ */ new Map();
|
|
45728
45728
|
this.colorIndex = 0;
|
|
45729
|
-
this.version = "2.18.0-next.
|
|
45729
|
+
this.version = "2.18.0-next.6";
|
|
45730
45730
|
this.#log("🦋 [superdoc] Using SuperDoc version:", this.version);
|
|
45731
45731
|
this.superdocId = config.superdocId || require_uuid.v4();
|
|
45732
45732
|
this.colors = this.config.colors ?? [];
|
|
@@ -47911,21 +47911,6 @@ var SuperDoc = class extends require_eventemitter3.import_eventemitter3.default
|
|
|
47911
47911
|
}));
|
|
47912
47912
|
}
|
|
47913
47913
|
/**
|
|
47914
|
-
* Clean up collaboration resources owned only by a removed document.
|
|
47915
|
-
*
|
|
47916
|
-
* Shared instance-level providers/ydocs stay alive; `destroy()` remains the
|
|
47917
|
-
* one place that tears down shell-wide collaboration state.
|
|
47918
|
-
*/
|
|
47919
|
-
#cleanupRemovedDocumentCollaboration(removedDocument, remainingDocuments) {
|
|
47920
|
-
const removedProvider = removedDocument.provider;
|
|
47921
|
-
if (removedProvider && removedProvider !== this.provider && !remainingDocuments.some((doc) => doc.provider === removedProvider)) {
|
|
47922
|
-
removedProvider.disconnect?.();
|
|
47923
|
-
removedProvider.destroy?.();
|
|
47924
|
-
}
|
|
47925
|
-
const removedYDoc = removedDocument.ydoc;
|
|
47926
|
-
if (removedYDoc && removedYDoc !== this.ydoc && !remainingDocuments.some((doc) => doc.ydoc === removedYDoc)) removedYDoc.destroy?.();
|
|
47927
|
-
}
|
|
47928
|
-
/**
|
|
47929
47914
|
* Clean up collaboration resources (providers, ydocs, sockets)
|
|
47930
47915
|
*/
|
|
47931
47916
|
#cleanupCollaboration() {
|
|
@@ -47942,11 +47927,6 @@ var SuperDoc = class extends require_eventemitter3.import_eventemitter3.default
|
|
|
47942
47927
|
this.ydoc?.destroy();
|
|
47943
47928
|
this.provider?.disconnect?.();
|
|
47944
47929
|
this.provider?.destroy?.();
|
|
47945
|
-
cfg.documents.forEach((doc) => {
|
|
47946
|
-
doc.provider?.disconnect?.();
|
|
47947
|
-
doc.provider?.destroy?.();
|
|
47948
|
-
doc.ydoc?.destroy();
|
|
47949
|
-
});
|
|
47950
47930
|
}
|
|
47951
47931
|
/**
|
|
47952
47932
|
* Open a surface (dialog or floating) above the document content.
|
|
@@ -47980,9 +47960,7 @@ var SuperDoc = class extends require_eventemitter3.import_eventemitter3.default
|
|
|
47980
47960
|
const activeDocumentId = getActiveEditorDocumentId(activeEditor);
|
|
47981
47961
|
for (const runtime of this.#editorRuntimeRegistry.getAllByDocumentId(normalizedDocumentId)) this.#editorRuntimeRegistry.unregister(runtime.id);
|
|
47982
47962
|
if (activeDocumentId === normalizedDocumentId && activeEditor !== null) this.#clearActiveEditorProjection();
|
|
47983
|
-
|
|
47984
|
-
if (!removedDocument) return false;
|
|
47985
|
-
this.#cleanupRemovedDocumentCollaboration(removedDocument, store.documents);
|
|
47963
|
+
if (!store.removeDocument(normalizedDocumentId)) return false;
|
|
47986
47964
|
await (0, vue.nextTick)();
|
|
47987
47965
|
return true;
|
|
47988
47966
|
}
|
package/dist/superdoc.es.js
CHANGED
|
@@ -315,7 +315,7 @@ var shuffleArray = (array) => {
|
|
|
315
315
|
var DEFAULT_ENDPOINT = "https://ingest.superdoc.dev/v1/collect";
|
|
316
316
|
function getSuperdocVersion() {
|
|
317
317
|
try {
|
|
318
|
-
return "2.18.0-next.
|
|
318
|
+
return "2.18.0-next.6";
|
|
319
319
|
} catch {
|
|
320
320
|
return "unknown";
|
|
321
321
|
}
|
|
@@ -45657,7 +45657,7 @@ var SuperDoc = class extends import_eventemitter3.default {
|
|
|
45657
45657
|
this.config.colors = shuffleArray(this.config.colors);
|
|
45658
45658
|
this.userColorMap = /* @__PURE__ */ new Map();
|
|
45659
45659
|
this.colorIndex = 0;
|
|
45660
|
-
this.version = "2.18.0-next.
|
|
45660
|
+
this.version = "2.18.0-next.6";
|
|
45661
45661
|
this.#log("🦋 [superdoc] Using SuperDoc version:", this.version);
|
|
45662
45662
|
this.superdocId = config.superdocId || v4();
|
|
45663
45663
|
this.colors = this.config.colors ?? [];
|
|
@@ -47842,21 +47842,6 @@ var SuperDoc = class extends import_eventemitter3.default {
|
|
|
47842
47842
|
}));
|
|
47843
47843
|
}
|
|
47844
47844
|
/**
|
|
47845
|
-
* Clean up collaboration resources owned only by a removed document.
|
|
47846
|
-
*
|
|
47847
|
-
* Shared instance-level providers/ydocs stay alive; `destroy()` remains the
|
|
47848
|
-
* one place that tears down shell-wide collaboration state.
|
|
47849
|
-
*/
|
|
47850
|
-
#cleanupRemovedDocumentCollaboration(removedDocument, remainingDocuments) {
|
|
47851
|
-
const removedProvider = removedDocument.provider;
|
|
47852
|
-
if (removedProvider && removedProvider !== this.provider && !remainingDocuments.some((doc) => doc.provider === removedProvider)) {
|
|
47853
|
-
removedProvider.disconnect?.();
|
|
47854
|
-
removedProvider.destroy?.();
|
|
47855
|
-
}
|
|
47856
|
-
const removedYDoc = removedDocument.ydoc;
|
|
47857
|
-
if (removedYDoc && removedYDoc !== this.ydoc && !remainingDocuments.some((doc) => doc.ydoc === removedYDoc)) removedYDoc.destroy?.();
|
|
47858
|
-
}
|
|
47859
|
-
/**
|
|
47860
47845
|
* Clean up collaboration resources (providers, ydocs, sockets)
|
|
47861
47846
|
*/
|
|
47862
47847
|
#cleanupCollaboration() {
|
|
@@ -47873,11 +47858,6 @@ var SuperDoc = class extends import_eventemitter3.default {
|
|
|
47873
47858
|
this.ydoc?.destroy();
|
|
47874
47859
|
this.provider?.disconnect?.();
|
|
47875
47860
|
this.provider?.destroy?.();
|
|
47876
|
-
cfg.documents.forEach((doc) => {
|
|
47877
|
-
doc.provider?.disconnect?.();
|
|
47878
|
-
doc.provider?.destroy?.();
|
|
47879
|
-
doc.ydoc?.destroy();
|
|
47880
|
-
});
|
|
47881
47861
|
}
|
|
47882
47862
|
/**
|
|
47883
47863
|
* Open a surface (dialog or floating) above the document content.
|
|
@@ -47911,9 +47891,7 @@ var SuperDoc = class extends import_eventemitter3.default {
|
|
|
47911
47891
|
const activeDocumentId = getActiveEditorDocumentId(activeEditor);
|
|
47912
47892
|
for (const runtime of this.#editorRuntimeRegistry.getAllByDocumentId(normalizedDocumentId)) this.#editorRuntimeRegistry.unregister(runtime.id);
|
|
47913
47893
|
if (activeDocumentId === normalizedDocumentId && activeEditor !== null) this.#clearActiveEditorProjection();
|
|
47914
|
-
|
|
47915
|
-
if (!removedDocument) return false;
|
|
47916
|
-
this.#cleanupRemovedDocumentCollaboration(removedDocument, store.documents);
|
|
47894
|
+
if (!store.removeDocument(normalizedDocumentId)) return false;
|
|
47917
47895
|
await nextTick();
|
|
47918
47896
|
return true;
|
|
47919
47897
|
}
|