@ones-editor/editor 2.2.20 → 2.2.22
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/index.js
CHANGED
|
@@ -30,8 +30,7 @@
|
|
|
30
30
|
--background-color-12: #BC9BFA;
|
|
31
31
|
--background-color-13: #BEBFC2;
|
|
32
32
|
--background-color-14: #DFE1E5;
|
|
33
|
-
--font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen, Ubuntu, Cantarell, Fira Sans, Droid Sans,
|
|
34
|
-
Helvetica Neue, sans-serif;
|
|
33
|
+
--font-family: ONESSans, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen, Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif;
|
|
35
34
|
}
|
|
36
35
|
div.editor-root {
|
|
37
36
|
--text-color: #303030;
|
|
@@ -46978,9 +46977,9 @@ ${codeText}
|
|
|
46978
46977
|
const start = createComplexBlockPosition(tableBlock, topLeft.containerId, { colIndex: from, rowIndex: 0 });
|
|
46979
46978
|
const end = createComplexBlockPosition(tableBlock, bottomRight.containerId, { colIndex: from + count - 1, rowIndex: grid.rowCount - 1 });
|
|
46980
46979
|
if (options == null ? void 0 : options.reverse) {
|
|
46981
|
-
editor.selection.setSelection(end, start);
|
|
46980
|
+
editor.selection.setSelection(end, start, { noScroll: options.noScroll });
|
|
46982
46981
|
} else {
|
|
46983
|
-
editor.selection.setSelection(start, end);
|
|
46982
|
+
editor.selection.setSelection(start, end, { noScroll: options == null ? void 0 : options.noScroll });
|
|
46984
46983
|
}
|
|
46985
46984
|
}
|
|
46986
46985
|
const logger$26 = getLogger("table-select-columns");
|
|
@@ -46994,9 +46993,9 @@ ${codeText}
|
|
|
46994
46993
|
const start = createComplexBlockPosition(tableBlock, topLeft.containerId, { rowIndex: from, colIndex: 0 });
|
|
46995
46994
|
const end = createComplexBlockPosition(tableBlock, bottomRight.containerId, { rowIndex: from + count - 1, colIndex: grid.colCount - 1 });
|
|
46996
46995
|
if (options == null ? void 0 : options.reverse) {
|
|
46997
|
-
editor.selection.setSelection(end, start);
|
|
46996
|
+
editor.selection.setSelection(end, start, { noScroll: options.noScroll });
|
|
46998
46997
|
} else {
|
|
46999
|
-
editor.selection.setSelection(start, end);
|
|
46998
|
+
editor.selection.setSelection(start, end, { noScroll: options == null ? void 0 : options.noScroll });
|
|
47000
46999
|
}
|
|
47001
47000
|
}
|
|
47002
47001
|
const style$b = "";
|
|
@@ -52582,7 +52581,7 @@ ${codeText}
|
|
|
52582
52581
|
rect = element2.getBoundingClientRect();
|
|
52583
52582
|
if (!isBlock$1(element2)) {
|
|
52584
52583
|
const childRect = element2.getBoundingClientRect();
|
|
52585
|
-
return new DOMRect(childRect.x, childRect.y, childRect.width, childRect.height);
|
|
52584
|
+
return new DOMRect(childRect.x, childRect.y + 2, childRect.width, childRect.height);
|
|
52586
52585
|
}
|
|
52587
52586
|
if (clientRects.length === 1) {
|
|
52588
52587
|
return new DOMRect(clientRects[0].x, clientRects[0].y, clientRects[0].width, clientRects[0].height);
|
|
@@ -69515,9 +69514,9 @@ ${codeText}
|
|
|
69515
69514
|
const from = Math.min(startIndex, endIndex);
|
|
69516
69515
|
const count = Math.abs(startIndex - endIndex) + 1;
|
|
69517
69516
|
if (hasClass(e2.target, "top") && direct === "top") {
|
|
69518
|
-
selectColumns(editor, block, from, count, { reverse: true });
|
|
69517
|
+
selectColumns(editor, block, from, count, { reverse: true, noScroll: true });
|
|
69519
69518
|
} else if (hasClass(e2.target, "left") && direct === "left") {
|
|
69520
|
-
selectRows(editor, block, from, count, { reverse: true });
|
|
69519
|
+
selectRows(editor, block, from, count, { reverse: true, noScroll: true });
|
|
69521
69520
|
}
|
|
69522
69521
|
}
|
|
69523
69522
|
}
|
|
@@ -69973,7 +69972,7 @@ ${codeText}
|
|
|
69973
69972
|
updateCellBarsDangerStatus(this.editor, this.activeTableBlock, false);
|
|
69974
69973
|
this.resetAsDangerMarked();
|
|
69975
69974
|
}
|
|
69976
|
-
this.editor.focus();
|
|
69975
|
+
this.editor.focus({ preventScroll: true });
|
|
69977
69976
|
});
|
|
69978
69977
|
__publicField(this, "handleSelectionChange", (bar2, id) => {
|
|
69979
69978
|
if (!bar2.isVisible) {
|
|
@@ -70030,7 +70029,7 @@ ${codeText}
|
|
|
70030
70029
|
this.manualMenu.manualShow(this.targetButton, { placement: "right-start" });
|
|
70031
70030
|
}
|
|
70032
70031
|
event.stopPropagation();
|
|
70033
|
-
editor.focus();
|
|
70032
|
+
editor.focus({ preventScroll: true });
|
|
70034
70033
|
});
|
|
70035
70034
|
this.editor = editor;
|
|
70036
70035
|
this.editor.addListener("selectionChanged", this.handleSelectionChanged);
|
|
@@ -74625,19 +74624,7 @@ ${content}
|
|
|
74625
74624
|
const containerId = getContainerId(container);
|
|
74626
74625
|
for (let i = 0; i < images.length; i++) {
|
|
74627
74626
|
const image = images[i];
|
|
74628
|
-
|
|
74629
|
-
if (block) {
|
|
74630
|
-
const commandData = {
|
|
74631
|
-
block,
|
|
74632
|
-
image
|
|
74633
|
-
};
|
|
74634
|
-
const item = {
|
|
74635
|
-
id: "replace-image",
|
|
74636
|
-
name: "Replace image",
|
|
74637
|
-
data: commandData
|
|
74638
|
-
};
|
|
74639
|
-
executeEmbedBlockCommand(editor, block, "image", item);
|
|
74640
|
-
}
|
|
74627
|
+
await insertEmptyEmbedBlock(editor, "image", containerId, insertIndex + i, { file: image });
|
|
74641
74628
|
}
|
|
74642
74629
|
}
|
|
74643
74630
|
}
|
|
@@ -88496,7 +88483,7 @@ ${data2.flowchartText}
|
|
|
88496
88483
|
}
|
|
88497
88484
|
}
|
|
88498
88485
|
});
|
|
88499
|
-
editor.version = "2.2.
|
|
88486
|
+
editor.version = "2.2.22";
|
|
88500
88487
|
return editor;
|
|
88501
88488
|
}
|
|
88502
88489
|
function isDoc(doc2) {
|
|
@@ -88591,7 +88578,7 @@ ${data2.flowchartText}
|
|
|
88591
88578
|
});
|
|
88592
88579
|
editor.addCustom(DOC_RE_AUTH_KEYS, (editor2) => new DocReAuthCallbacks(editor2));
|
|
88593
88580
|
OnesEditorToolbar.register(editor);
|
|
88594
|
-
editor.version = "2.2.
|
|
88581
|
+
editor.version = "2.2.22";
|
|
88595
88582
|
return editor;
|
|
88596
88583
|
}
|
|
88597
88584
|
async function showDocVersions(editor, options, serverUrl) {
|