@ones-editor/editor 2.1.1-beta.4 → 2.1.1-beta.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.
- package/@ones-editor/tsconfig.tsbuildinfo +1 -1
- package/dist/index.js +18 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2289,6 +2289,10 @@ div.editor-root:not(.readonly) div.editor-content div[data-type=editor-container
|
|
|
2289
2289
|
vertical-align: middle;
|
|
2290
2290
|
padding: 2px 0;
|
|
2291
2291
|
max-width: 100%;
|
|
2292
|
+
cursor: pointer;
|
|
2293
|
+
}
|
|
2294
|
+
div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content] > span.math-box:hover {
|
|
2295
|
+
background-color: rgba(0, 36, 90, 0.0392156863);
|
|
2292
2296
|
}
|
|
2293
2297
|
div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content] > span.math-box > span[data-type=box-content] {
|
|
2294
2298
|
width: 100%;
|
|
@@ -2316,6 +2320,9 @@ div.editor-root div.editor-content div[data-type=editor-container] .embed-block[
|
|
|
2316
2320
|
outline: none;
|
|
2317
2321
|
width: 400px;
|
|
2318
2322
|
height: 128px;
|
|
2323
|
+
}
|
|
2324
|
+
div.editor-root.readonly div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content] > span.math-box {
|
|
2325
|
+
cursor: default;
|
|
2319
2326
|
}div.editor-root div.editor-content div[data-type=editor-block],
|
|
2320
2327
|
.status-box-editor-popup {
|
|
2321
2328
|
--orange: #F59300;
|
|
@@ -13225,6 +13232,13 @@ var __publicField = (obj, key, value) => {
|
|
|
13225
13232
|
}
|
|
13226
13233
|
const ranges = getChildrenInRange(editor, block, from, to);
|
|
13227
13234
|
const childRanges = ranges.map((r) => createChildRange(r.child, r.startChildOffset, r.endChildOffset));
|
|
13235
|
+
if (childRanges.length === 1) {
|
|
13236
|
+
const range = childRanges[0];
|
|
13237
|
+
if (range.startContainer === range.endContainer && range.startContainer instanceof Element && isTextBlockContentBoxChild(range.startContainer)) {
|
|
13238
|
+
const rects2 = Array.from(range.startContainer.getClientRects());
|
|
13239
|
+
return filterContainerClientRects(rects2);
|
|
13240
|
+
}
|
|
13241
|
+
}
|
|
13228
13242
|
const rects = [];
|
|
13229
13243
|
childRanges.forEach((r) => {
|
|
13230
13244
|
const childRects = filterContainerClientRects(Array.from(r.getClientRects()));
|
|
@@ -56326,7 +56340,7 @@ $$${mathData.mathjaxText}$$
|
|
|
56326
56340
|
}
|
|
56327
56341
|
showTextToolbar(reason) {
|
|
56328
56342
|
var _a, _b;
|
|
56329
|
-
|
|
56343
|
+
let commands = [];
|
|
56330
56344
|
const range = this.editor.selection.range;
|
|
56331
56345
|
this.providers.forEach((provider) => {
|
|
56332
56346
|
if (provider.getTextCommands) {
|
|
@@ -56367,6 +56381,7 @@ $$${mathData.mathjaxText}$$
|
|
|
56367
56381
|
this.toolbar.close("selectionChange");
|
|
56368
56382
|
return;
|
|
56369
56383
|
}
|
|
56384
|
+
commands = this.groupCommands(commands);
|
|
56370
56385
|
this.toolbar.updateItems(commands);
|
|
56371
56386
|
const lastBlock2 = selectedBlocks[selectedBlocks.length - 1];
|
|
56372
56387
|
const reverseToolbar = !this.editor.selection.range.isReverse() && lastBlock2 !== firstBlock;
|
|
@@ -83166,7 +83181,7 @@ ${data2.flowchartText}
|
|
|
83166
83181
|
}
|
|
83167
83182
|
}
|
|
83168
83183
|
});
|
|
83169
|
-
editor.version = "2.1.1-beta.
|
|
83184
|
+
editor.version = "2.1.1-beta.6";
|
|
83170
83185
|
if (Logger$2.level === LogLevel.DEBUG) {
|
|
83171
83186
|
window.setReauthFail = (fail) => {
|
|
83172
83187
|
window.isReauthError = fail;
|
|
@@ -83261,7 +83276,7 @@ ${data2.flowchartText}
|
|
|
83261
83276
|
if (!clientType.isMobile) {
|
|
83262
83277
|
OnesEditorToolbar.register(editor);
|
|
83263
83278
|
}
|
|
83264
|
-
editor.version = "2.1.1-beta.
|
|
83279
|
+
editor.version = "2.1.1-beta.6";
|
|
83265
83280
|
return editor;
|
|
83266
83281
|
}
|
|
83267
83282
|
async function showDocVersions(editor, options, serverUrl) {
|