@ones-editor/editor 2.2.13-beta.5 → 2.2.14-beta.1
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 +20 -18
- 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
|
}
|
|
@@ -41359,7 +41365,7 @@ ${codeText}
|
|
|
41359
41365
|
this.menu.addListener("show", this.handleShow);
|
|
41360
41366
|
this.menu.addListener("shown", this.handleShown);
|
|
41361
41367
|
if (this.options.wait) {
|
|
41362
|
-
this.handleSearchText = debounce__default.default(
|
|
41368
|
+
this.handleSearchText = debounce__default.default((text2) => {
|
|
41363
41369
|
this.handleSearchTextPure(text2);
|
|
41364
41370
|
}, this.options.wait);
|
|
41365
41371
|
} else {
|
|
@@ -41457,14 +41463,11 @@ ${codeText}
|
|
|
41457
41463
|
}
|
|
41458
41464
|
async handleSearchTextPure(text2) {
|
|
41459
41465
|
this.currentText = text2;
|
|
41460
|
-
const key = "auto-suggest";
|
|
41461
41466
|
try {
|
|
41462
|
-
await lockers.lock(key);
|
|
41463
41467
|
this.showLoading();
|
|
41464
|
-
const searchingText = this.currentText;
|
|
41465
41468
|
const items = await this.options.queryItems(this, text2);
|
|
41466
|
-
if (this.currentText
|
|
41467
|
-
|
|
41469
|
+
if (this.currentText !== text2) {
|
|
41470
|
+
return;
|
|
41468
41471
|
}
|
|
41469
41472
|
if (items.length === 0) {
|
|
41470
41473
|
this.showNoResultMessage(text2);
|
|
@@ -41472,10 +41475,9 @@ ${codeText}
|
|
|
41472
41475
|
}
|
|
41473
41476
|
this.setItems(items);
|
|
41474
41477
|
if (this.options.highlight) {
|
|
41475
|
-
this.highlightText(
|
|
41478
|
+
this.highlightText(text2.replace(/^\s+|\s+$/g, ""), items);
|
|
41476
41479
|
}
|
|
41477
41480
|
} finally {
|
|
41478
|
-
lockers.release(key);
|
|
41479
41481
|
}
|
|
41480
41482
|
}
|
|
41481
41483
|
highlightText(search, items) {
|
|
@@ -59716,9 +59718,9 @@ $$${mathData.mathjaxText}$$
|
|
|
59716
59718
|
if (target.hasAttribute("data-editor-overflow-tooltip")) {
|
|
59717
59719
|
if (this.check(target)) {
|
|
59718
59720
|
const title = target.getAttribute("data-editor-overflow-tooltip");
|
|
59719
|
-
target.setAttribute(`data-editor-tooltip-${this.editor.clientId}`, title);
|
|
59721
|
+
target.setAttribute(`data-editor-tooltip-${this.editor.clientId}-dynamic`, title);
|
|
59720
59722
|
} else {
|
|
59721
|
-
target.removeAttribute(`data-editor-tooltip-${this.editor.clientId}`);
|
|
59723
|
+
target.removeAttribute(`data-editor-tooltip-${this.editor.clientId}-dynamic`);
|
|
59722
59724
|
}
|
|
59723
59725
|
}
|
|
59724
59726
|
});
|
|
@@ -67268,7 +67270,7 @@ ${codeText}
|
|
|
67268
67270
|
const { comment } = this;
|
|
67269
67271
|
const head = createElement("div", ["comment-item-head"], this.root);
|
|
67270
67272
|
const quote2 = createElement("span", ["item-head-quote"], head);
|
|
67271
|
-
quote2.
|
|
67273
|
+
quote2.textContent = comment.abstract;
|
|
67272
67274
|
const switchContainer = createElement("span", ["item-head-switch"], head);
|
|
67273
67275
|
const switchUp = createTextButton(switchContainer, GroupItemActions.SwitchUp, "up", switchUpIcon);
|
|
67274
67276
|
const switchDown = createTextButton(switchContainer, GroupItemActions.SwitchDown, "down", switchDownIcon);
|
|
@@ -88342,7 +88344,7 @@ ${data2.flowchartText}
|
|
|
88342
88344
|
}
|
|
88343
88345
|
}
|
|
88344
88346
|
});
|
|
88345
|
-
editor.version = "2.2.
|
|
88347
|
+
editor.version = "2.2.14-beta.1";
|
|
88346
88348
|
return editor;
|
|
88347
88349
|
}
|
|
88348
88350
|
function isDoc(doc2) {
|
|
@@ -88437,7 +88439,7 @@ ${data2.flowchartText}
|
|
|
88437
88439
|
});
|
|
88438
88440
|
editor.addCustom(DOC_RE_AUTH_KEYS, (editor2) => new DocReAuthCallbacks(editor2));
|
|
88439
88441
|
OnesEditorToolbar.register(editor);
|
|
88440
|
-
editor.version = "2.2.
|
|
88442
|
+
editor.version = "2.2.14-beta.1";
|
|
88441
88443
|
return editor;
|
|
88442
88444
|
}
|
|
88443
88445
|
async function showDocVersions(editor, options, serverUrl) {
|