@ones-editor/editor 2.9.8-beta.19 → 2.9.8-beta.20
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/@ones-editor/core/src/core/doc/doc.d.ts +1 -0
- package/@ones-editor/core/src/core/editor-doc/editor-doc.d.ts +1 -0
- package/@ones-editor/core/src/local-doc/index.d.ts +1 -0
- package/@ones-editor/sharedb-doc/src/doc/sharedb-doc.d.ts +2 -0
- package/@ones-editor/tsconfig.tsbuildinfo +1 -1
- package/@ones-editor/versions/src/history-doc/history-doc.d.ts +1 -0
- package/dist/index.js +23 -2
- package/package.json +1 -1
|
@@ -7,6 +7,7 @@ export default class HistoryDoc extends EventCallbacks<OnesEditorDocCallbacks> i
|
|
|
7
7
|
beginBatchUpdate(): number;
|
|
8
8
|
endBatchUpdate(): number;
|
|
9
9
|
toJSON(): DocObject;
|
|
10
|
+
applyingOps(): boolean;
|
|
10
11
|
getContainerBlocks(containerId: string): DocBlock[];
|
|
11
12
|
findContainerBlocks(containerId: string): DocBlock[];
|
|
12
13
|
getBlockData(containerId: string, blockIndex: number): DocBlock;
|
package/dist/index.js
CHANGED
|
@@ -30586,6 +30586,10 @@ ${codeText}
|
|
|
30586
30586
|
endBatchUpdate() {
|
|
30587
30587
|
return this.externalDoc.endBatchUpdate();
|
|
30588
30588
|
}
|
|
30589
|
+
applyingOps() {
|
|
30590
|
+
var _a, _b;
|
|
30591
|
+
return ((_b = (_a = this.externalDoc).applyingOps) == null ? void 0 : _b.call(_a)) || false;
|
|
30592
|
+
}
|
|
30589
30593
|
registerLocalEvents(events2) {
|
|
30590
30594
|
this.localEvents.push(events2);
|
|
30591
30595
|
}
|
|
@@ -32503,6 +32507,9 @@ ${codeText}
|
|
|
32503
32507
|
rawData() {
|
|
32504
32508
|
return this.doc;
|
|
32505
32509
|
}
|
|
32510
|
+
applyingOps() {
|
|
32511
|
+
return false;
|
|
32512
|
+
}
|
|
32506
32513
|
getContainerBlocks(containerId) {
|
|
32507
32514
|
const blocks = this.doc.blocks[containerId];
|
|
32508
32515
|
return blocks;
|
|
@@ -39485,6 +39492,7 @@ ${codeText}
|
|
|
39485
39492
|
__publicField(this, "disableLogout");
|
|
39486
39493
|
__publicField(this, "destroyed", false);
|
|
39487
39494
|
__publicField(this, "editStatus");
|
|
39495
|
+
__publicField(this, "_applyingOps", false);
|
|
39488
39496
|
__publicField(this, "handleNothingPending", () => {
|
|
39489
39497
|
this.setStatus("clean");
|
|
39490
39498
|
});
|
|
@@ -39669,11 +39677,14 @@ ${codeText}
|
|
|
39669
39677
|
return;
|
|
39670
39678
|
}
|
|
39671
39679
|
try {
|
|
39680
|
+
this._applyingOps = true;
|
|
39672
39681
|
const local = !!source;
|
|
39673
39682
|
parseOps(ops, this, local);
|
|
39674
39683
|
} catch (err) {
|
|
39675
39684
|
logger$2T.error(err);
|
|
39676
39685
|
throw err;
|
|
39686
|
+
} finally {
|
|
39687
|
+
this._applyingOps = false;
|
|
39677
39688
|
}
|
|
39678
39689
|
});
|
|
39679
39690
|
this.options = options;
|
|
@@ -39698,6 +39709,9 @@ ${codeText}
|
|
|
39698
39709
|
}
|
|
39699
39710
|
return this.batching;
|
|
39700
39711
|
}
|
|
39712
|
+
applyingOps() {
|
|
39713
|
+
return this._applyingOps;
|
|
39714
|
+
}
|
|
39701
39715
|
static async load(options) {
|
|
39702
39716
|
try {
|
|
39703
39717
|
const client = new ShareDBClient(options.auth, options.serverUrl, options.renewTokenFunc);
|
|
@@ -53147,7 +53161,11 @@ ${codeText}
|
|
|
53147
53161
|
handleDrop: handleListDrop,
|
|
53148
53162
|
notify,
|
|
53149
53163
|
handleDeleteBlock: (editor, block) => {
|
|
53164
|
+
var _a, _b;
|
|
53150
53165
|
if (isListBlock(block)) {
|
|
53166
|
+
if ((_b = (_a = editor.doc).applyingOps) == null ? void 0 : _b.call(_a)) {
|
|
53167
|
+
return;
|
|
53168
|
+
}
|
|
53151
53169
|
const fixStart = new FixStartByWillDeletedList(editor, block);
|
|
53152
53170
|
setTimeout(() => {
|
|
53153
53171
|
fixStart.fix();
|
|
@@ -81870,6 +81888,9 @@ ${docStr}
|
|
|
81870
81888
|
toJSON() {
|
|
81871
81889
|
return cloneDeep__default.default(this.docObject);
|
|
81872
81890
|
}
|
|
81891
|
+
applyingOps() {
|
|
81892
|
+
return false;
|
|
81893
|
+
}
|
|
81873
81894
|
getContainerBlocks(containerId) {
|
|
81874
81895
|
const blocks = this.docObject.blocks[containerId];
|
|
81875
81896
|
return blocks;
|
|
@@ -95344,7 +95365,7 @@ ${JSON.stringify(error2, null, 2)}`);
|
|
|
95344
95365
|
}
|
|
95345
95366
|
}
|
|
95346
95367
|
});
|
|
95347
|
-
editor.version = "2.9.8-beta.
|
|
95368
|
+
editor.version = "2.9.8-beta.20";
|
|
95348
95369
|
return editor;
|
|
95349
95370
|
}
|
|
95350
95371
|
function isDoc(doc2) {
|
|
@@ -95476,7 +95497,7 @@ ${JSON.stringify(error2, null, 2)}`);
|
|
|
95476
95497
|
OnesEditorDropTarget.register(editor);
|
|
95477
95498
|
OnesEditorTocProvider.register(editor);
|
|
95478
95499
|
OnesEditorExclusiveBlock.register(editor);
|
|
95479
|
-
editor.version = "2.9.8-beta.
|
|
95500
|
+
editor.version = "2.9.8-beta.20";
|
|
95480
95501
|
return editor;
|
|
95481
95502
|
}
|
|
95482
95503
|
async function showDocVersions(editor, options, serverUrl) {
|