@ones-editor/editor 2.2.13-beta.4 → 2.2.13
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/blocks/text-blocks/base/text-range.d.ts +1 -1
- package/@ones-editor/core/src/core/selection/range-from-point.d.ts +1 -1
- package/@ones-editor/core/src/core/types.d.ts +1 -1
- package/@ones-editor/tsconfig.tsbuildinfo +1 -1
- package/dist/index.js +16 -12
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -5173,6 +5173,7 @@ div.editor-root:not(.mobile) div.editor-content div[data-type=editor-container]
|
|
|
5173
5173
|
background-color: var(--op-selected-color);
|
|
5174
5174
|
border-radius: 3px;
|
|
5175
5175
|
pointer-events: none;
|
|
5176
|
+
z-index: 1;
|
|
5176
5177
|
}
|
|
5177
5178
|
.editor-root.history .table-block.history-inserted-block table .child {
|
|
5178
5179
|
pointer-events: none;
|
|
@@ -13083,7 +13084,7 @@ var __publicField = (obj, key, value) => {
|
|
|
13083
13084
|
return createEditorSelectionRange(editor, { anchor: anchor2, focus });
|
|
13084
13085
|
}
|
|
13085
13086
|
const logger$49 = getLogger("range-from-point");
|
|
13086
|
-
function getBlockRangeFromPoint(editor, pointX, pointY) {
|
|
13087
|
+
function getBlockRangeFromPoint(editor, pointX, pointY, dragging) {
|
|
13087
13088
|
const yOffsets = [0, -12, 12];
|
|
13088
13089
|
let x = pointX;
|
|
13089
13090
|
const y = pointY;
|
|
@@ -13131,7 +13132,7 @@ var __publicField = (obj, key, value) => {
|
|
|
13131
13132
|
if (!editor.contains(block)) {
|
|
13132
13133
|
continue;
|
|
13133
13134
|
}
|
|
13134
|
-
const range = getBlockClass(editor, block).getRangeFromPoint(editor, block, x, y + yOffsets[i]);
|
|
13135
|
+
const range = getBlockClass(editor, block).getRangeFromPoint(editor, block, x, y + yOffsets[i], dragging);
|
|
13135
13136
|
if (range) {
|
|
13136
13137
|
return range;
|
|
13137
13138
|
}
|
|
@@ -23727,7 +23728,7 @@ var __publicField = (obj, key, value) => {
|
|
|
23727
23728
|
});
|
|
23728
23729
|
return ret;
|
|
23729
23730
|
}
|
|
23730
|
-
function getTextBlockRangeFromPoint(editor, block, xOrign, yOrign) {
|
|
23731
|
+
function getTextBlockRangeFromPoint(editor, block, xOrign, yOrign, dragging) {
|
|
23731
23732
|
const elem = getElementFromPoint(xOrign, yOrign);
|
|
23732
23733
|
if (!elem)
|
|
23733
23734
|
return null;
|
|
@@ -23782,7 +23783,12 @@ var __publicField = (obj, key, value) => {
|
|
|
23782
23783
|
offset = start;
|
|
23783
23784
|
length = 0;
|
|
23784
23785
|
} else if (isTextBlockContentBoxChild(child)) {
|
|
23785
|
-
|
|
23786
|
+
const blockRect2 = child.getBoundingClientRect();
|
|
23787
|
+
if (!dragging) {
|
|
23788
|
+
offset = start + (blockRect2.x + 10 > x ? 0 : 1);
|
|
23789
|
+
} else {
|
|
23790
|
+
offset = start + (blockRect2.x + blockRect2.width / 2 > x ? 0 : 1);
|
|
23791
|
+
}
|
|
23786
23792
|
length = 0;
|
|
23787
23793
|
} else {
|
|
23788
23794
|
assert(logger$3W, child.firstChild instanceof Text, "child is not text");
|
|
@@ -28074,7 +28080,7 @@ var __publicField = (obj, key, value) => {
|
|
|
28074
28080
|
if (Math.abs(this.mouseDownEvent.x - event.x) < 3 && Math.abs(this.mouseDownEvent.y - event.y) < 3) {
|
|
28075
28081
|
return;
|
|
28076
28082
|
}
|
|
28077
|
-
const range = getBlockRangeFromPoint(this.editor, event.x, event.y);
|
|
28083
|
+
const range = getBlockRangeFromPoint(this.editor, event.x, event.y, true);
|
|
28078
28084
|
if (!range) {
|
|
28079
28085
|
return;
|
|
28080
28086
|
}
|
|
@@ -59716,9 +59722,9 @@ $$${mathData.mathjaxText}$$
|
|
|
59716
59722
|
if (target.hasAttribute("data-editor-overflow-tooltip")) {
|
|
59717
59723
|
if (this.check(target)) {
|
|
59718
59724
|
const title = target.getAttribute("data-editor-overflow-tooltip");
|
|
59719
|
-
target.setAttribute(`data-editor-tooltip-${this.editor.clientId}`, title);
|
|
59725
|
+
target.setAttribute(`data-editor-tooltip-${this.editor.clientId}-dynamic`, title);
|
|
59720
59726
|
} else {
|
|
59721
|
-
target.removeAttribute(`data-editor-tooltip-${this.editor.clientId}`);
|
|
59727
|
+
target.removeAttribute(`data-editor-tooltip-${this.editor.clientId}-dynamic`);
|
|
59722
59728
|
}
|
|
59723
59729
|
}
|
|
59724
59730
|
});
|
|
@@ -86481,7 +86487,6 @@ ${data2.flowchartText}
|
|
|
86481
86487
|
childDoc.uploadResource = doc2.uploadResource.bind(doc2);
|
|
86482
86488
|
childDoc.buildResourceUrl = doc2.buildResourceUrl.bind(doc2);
|
|
86483
86489
|
const commentOptions = parentEditor.getComponentOptions("comment");
|
|
86484
|
-
const customOptions = parentEditor.getComponentOptions("custom");
|
|
86485
86490
|
const options = {
|
|
86486
86491
|
image: {
|
|
86487
86492
|
defaultAlign: "left"
|
|
@@ -86491,8 +86496,7 @@ ${data2.flowchartText}
|
|
|
86491
86496
|
hideCellMenu: true,
|
|
86492
86497
|
hideToolbar: true
|
|
86493
86498
|
},
|
|
86494
|
-
...commentOptions == null ? void 0 : commentOptions.componentsOptions
|
|
86495
|
-
...customOptions == null ? void 0 : customOptions.componentsOptions
|
|
86499
|
+
...commentOptions == null ? void 0 : commentOptions.componentsOptions
|
|
86496
86500
|
};
|
|
86497
86501
|
const blocks = [];
|
|
86498
86502
|
parentEditor.editorBlocks.forEach((block) => {
|
|
@@ -88344,7 +88348,7 @@ ${data2.flowchartText}
|
|
|
88344
88348
|
}
|
|
88345
88349
|
}
|
|
88346
88350
|
});
|
|
88347
|
-
editor.version = "2.2.13
|
|
88351
|
+
editor.version = "2.2.13";
|
|
88348
88352
|
return editor;
|
|
88349
88353
|
}
|
|
88350
88354
|
function isDoc(doc2) {
|
|
@@ -88439,7 +88443,7 @@ ${data2.flowchartText}
|
|
|
88439
88443
|
});
|
|
88440
88444
|
editor.addCustom(DOC_RE_AUTH_KEYS, (editor2) => new DocReAuthCallbacks(editor2));
|
|
88441
88445
|
OnesEditorToolbar.register(editor);
|
|
88442
|
-
editor.version = "2.2.13
|
|
88446
|
+
editor.version = "2.2.13";
|
|
88443
88447
|
return editor;
|
|
88444
88448
|
}
|
|
88445
88449
|
async function showDocVersions(editor, options, serverUrl) {
|