@ones-editor/editor 2.1.1-beta.82 → 2.1.1-beta.84
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 +68 -16
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1594,6 +1594,7 @@ div.tippy-box[data-theme=menu] .tippy-content .editor-command-bar.menu .menu-ite
|
|
|
1594
1594
|
line-height: 1.4;
|
|
1595
1595
|
color: #000;
|
|
1596
1596
|
width: 100%;
|
|
1597
|
+
resize: none;
|
|
1597
1598
|
}
|
|
1598
1599
|
.editor-input-wrap .editor-input-container .editor-input:hover {
|
|
1599
1600
|
border-color: #0064ff;
|
|
@@ -1608,9 +1609,6 @@ div.tippy-box[data-theme=menu] .tippy-content .editor-command-bar.menu .menu-ite
|
|
|
1608
1609
|
.editor-input-wrap .editor-input-container .editor-input.has-prefix {
|
|
1609
1610
|
padding-left: 30px;
|
|
1610
1611
|
}
|
|
1611
|
-
.editor-input-wrap .editor-input-container textarea {
|
|
1612
|
-
resize: none;
|
|
1613
|
-
}
|
|
1614
1612
|
.editor-input-wrap .editor-input-container .editor-input-addon, .editor-input-wrap .editor-input-container .editor-input-prefix, .editor-input-wrap .editor-input-container .editor-input-suffix {
|
|
1615
1613
|
height: 100%;
|
|
1616
1614
|
position: absolute;
|
|
@@ -2619,14 +2617,40 @@ div.editor-root:not(.readonly) div.editor-content div[data-type=editor-container
|
|
|
2619
2617
|
[data-command-bar-id=mobile-bottom-menu] .link-popup .editor-command-bar .command-item[data-id=link-popup] .link-form-content .editor-input-wrap {
|
|
2620
2618
|
padding: 0px 15px;
|
|
2621
2619
|
}
|
|
2620
|
+
[data-command-bar-id=mobile-bottom-menu] .link-popup .editor-command-bar .command-item[data-id=link-popup] .link-form-content .editor-input-wrap.error .editor-input-container.textarea {
|
|
2621
|
+
border: 1px solid #e82100;
|
|
2622
|
+
}
|
|
2622
2623
|
[data-command-bar-id=mobile-bottom-menu] .link-popup .editor-command-bar .command-item[data-id=link-popup] .link-form-content .editor-input-wrap .editor-input-container {
|
|
2623
2624
|
padding: 0;
|
|
2624
2625
|
}
|
|
2625
2626
|
[data-command-bar-id=mobile-bottom-menu] .link-popup .editor-command-bar .command-item[data-id=link-popup] .link-form-content .editor-input-wrap .editor-input-container .editor-input {
|
|
2626
2627
|
line-height: 1.4;
|
|
2627
|
-
|
|
2628
|
-
height: 44px;
|
|
2628
|
+
height: 100%;
|
|
2629
2629
|
white-space: nowrap;
|
|
2630
|
+
}
|
|
2631
|
+
[data-command-bar-id=mobile-bottom-menu] .link-popup .editor-command-bar .command-item[data-id=link-popup] .link-form-content .editor-input-wrap .editor-input-container.textarea {
|
|
2632
|
+
padding: 0px 10px;
|
|
2633
|
+
border: 1px solid #c7c7c7;
|
|
2634
|
+
height: 44px;
|
|
2635
|
+
}
|
|
2636
|
+
[data-command-bar-id=mobile-bottom-menu] .link-popup .editor-command-bar .command-item[data-id=link-popup] .link-form-content .editor-input-wrap .editor-input-container.textarea:hover {
|
|
2637
|
+
border-color: #0064ff;
|
|
2638
|
+
}
|
|
2639
|
+
[data-command-bar-id=mobile-bottom-menu] .link-popup .editor-command-bar .command-item[data-id=link-popup] .link-form-content .editor-input-wrap .editor-input-container.textarea.focus {
|
|
2640
|
+
border-color: #0064ff;
|
|
2641
|
+
box-shadow: 0px 0px 0px 2px rgba(51, 143, 229, 0.2);
|
|
2642
|
+
}
|
|
2643
|
+
[data-command-bar-id=mobile-bottom-menu] .link-popup .editor-command-bar .command-item[data-id=link-popup] .link-form-content .editor-input-wrap .editor-input-container.textarea .editor-input {
|
|
2644
|
+
border: none;
|
|
2645
|
+
padding: 11px 0px;
|
|
2646
|
+
width: calc(100% - 20px);
|
|
2647
|
+
}
|
|
2648
|
+
[data-command-bar-id=mobile-bottom-menu] .link-popup .editor-command-bar .command-item[data-id=link-popup] .link-form-content .editor-input-wrap .editor-input-container.textarea .editor-input:hover {
|
|
2649
|
+
border: none;
|
|
2650
|
+
}
|
|
2651
|
+
[data-command-bar-id=mobile-bottom-menu] .link-popup .editor-command-bar .command-item[data-id=link-popup] .link-form-content .editor-input-wrap .editor-input-container.textarea .editor-input:focus {
|
|
2652
|
+
border: none;
|
|
2653
|
+
box-shadow: none;
|
|
2630
2654
|
}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content] > span.math-box {
|
|
2631
2655
|
display: inline-flex;
|
|
2632
2656
|
vertical-align: middle;
|
|
@@ -40376,7 +40400,7 @@ ${codeText}
|
|
|
40376
40400
|
if (this.popper) {
|
|
40377
40401
|
this.popper.setAttribute("data-command-bar-id", "mobile-bottom-menu");
|
|
40378
40402
|
}
|
|
40379
|
-
},
|
|
40403
|
+
}, 600);
|
|
40380
40404
|
});
|
|
40381
40405
|
}
|
|
40382
40406
|
close(reason) {
|
|
@@ -41014,6 +41038,11 @@ ${codeText}
|
|
|
41014
41038
|
});
|
|
41015
41039
|
__publicField(this, "handleKeyDown", (e2, composing) => {
|
|
41016
41040
|
var _a, _b;
|
|
41041
|
+
if (this.options.mode === "textarea") {
|
|
41042
|
+
if (e2.code === "Enter") {
|
|
41043
|
+
e2.preventDefault();
|
|
41044
|
+
}
|
|
41045
|
+
}
|
|
41017
41046
|
(_b = (_a = this.options).onKeyDown) == null ? void 0 : _b.call(_a, e2, composing);
|
|
41018
41047
|
});
|
|
41019
41048
|
__publicField(this, "showSuffix", () => {
|
|
@@ -41035,6 +41064,12 @@ ${codeText}
|
|
|
41035
41064
|
});
|
|
41036
41065
|
__publicField(this, "handleInput", (e2) => {
|
|
41037
41066
|
var _a, _b;
|
|
41067
|
+
if (this.options.mode === "textarea") {
|
|
41068
|
+
const input2 = e2.target;
|
|
41069
|
+
if (input2.value.includes("\n")) {
|
|
41070
|
+
input2.value = input2.value.replace(/\n/g, "");
|
|
41071
|
+
}
|
|
41072
|
+
}
|
|
41038
41073
|
(_b = (_a = this.options).onChange) == null ? void 0 : _b.call(_a, e2);
|
|
41039
41074
|
removeClass(this.container, "error");
|
|
41040
41075
|
if (this.options.maxLength) {
|
|
@@ -41095,7 +41130,14 @@ ${codeText}
|
|
|
41095
41130
|
const inputContainer = createElement("div", ["editor-input-container"], container);
|
|
41096
41131
|
let input2;
|
|
41097
41132
|
if ((options == null ? void 0 : options.mode) === "textarea") {
|
|
41133
|
+
addClass(inputContainer, "textarea");
|
|
41098
41134
|
input2 = createElement("textarea", ["editor-input"], null);
|
|
41135
|
+
input2.onfocus = () => {
|
|
41136
|
+
addClass(inputContainer, "focus");
|
|
41137
|
+
};
|
|
41138
|
+
input2.onblur = () => {
|
|
41139
|
+
removeClass(inputContainer, "focus");
|
|
41140
|
+
};
|
|
41099
41141
|
} else {
|
|
41100
41142
|
input2 = createElement("input", ["editor-input"], null);
|
|
41101
41143
|
}
|
|
@@ -79760,6 +79802,9 @@ ${content}
|
|
|
79760
79802
|
return groupEachCommand(commands);
|
|
79761
79803
|
});
|
|
79762
79804
|
__publicField(this, "showToolbar", () => {
|
|
79805
|
+
if (this.editor.readonly) {
|
|
79806
|
+
return;
|
|
79807
|
+
}
|
|
79763
79808
|
tippy$1.hideAll();
|
|
79764
79809
|
const commands = this.getCommands();
|
|
79765
79810
|
this.toolbar.updateItems(commands);
|
|
@@ -84741,6 +84786,9 @@ ${data2.flowchartText}
|
|
|
84741
84786
|
this.block = block;
|
|
84742
84787
|
}
|
|
84743
84788
|
get commands() {
|
|
84789
|
+
if (clientType.isMobile) {
|
|
84790
|
+
return [];
|
|
84791
|
+
}
|
|
84744
84792
|
if (this.isHoveringImageEmpty()) {
|
|
84745
84793
|
return [];
|
|
84746
84794
|
}
|
|
@@ -84783,7 +84831,9 @@ ${data2.flowchartText}
|
|
|
84783
84831
|
video.controls = true;
|
|
84784
84832
|
video.src = url;
|
|
84785
84833
|
video.addEventListener("canplay", () => {
|
|
84786
|
-
|
|
84834
|
+
if (!clientType.isMobile) {
|
|
84835
|
+
editor.addCustom("video-resizer", () => new VideoResizer(editor));
|
|
84836
|
+
}
|
|
84787
84837
|
this.getMedia(editor, blockData.id).removeListener("mediaError", this.handleMediaError);
|
|
84788
84838
|
this.getMedia(editor, blockData.id).addListener("mediaError", this.handleMediaError);
|
|
84789
84839
|
this.getMedia(editor, blockData.id).removeFullScreen();
|
|
@@ -84825,9 +84875,11 @@ ${data2.flowchartText}
|
|
|
84825
84875
|
};
|
|
84826
84876
|
}
|
|
84827
84877
|
handleMediaError(editor, type, blockId) {
|
|
84828
|
-
|
|
84829
|
-
|
|
84830
|
-
|
|
84878
|
+
if (!clientType.isMobile) {
|
|
84879
|
+
const videoResizer = editor.addCustom("video-resizer", () => new VideoResizer(editor));
|
|
84880
|
+
const block = editor.getBlockById(blockId);
|
|
84881
|
+
videoResizer.disableBlockResize(block);
|
|
84882
|
+
}
|
|
84831
84883
|
}
|
|
84832
84884
|
updateMediaElement(editor, mediaElement, blockData, url) {
|
|
84833
84885
|
const video = mediaElement.querySelector(":scope .video-container > video");
|
|
@@ -84841,12 +84893,12 @@ ${data2.flowchartText}
|
|
|
84841
84893
|
video.style.width = "";
|
|
84842
84894
|
}
|
|
84843
84895
|
const block = editor.getBlockById(blockData.id);
|
|
84844
|
-
|
|
84845
|
-
|
|
84896
|
+
if (!clientType.isMobile) {
|
|
84897
|
+
setTimeout(() => {
|
|
84846
84898
|
const videoResizer = editor.addCustom("video-resizer", () => new VideoResizer(editor));
|
|
84847
84899
|
videoResizer.updateResizer(block);
|
|
84848
|
-
}
|
|
84849
|
-
}
|
|
84900
|
+
});
|
|
84901
|
+
}
|
|
84850
84902
|
return video;
|
|
84851
84903
|
}
|
|
84852
84904
|
}
|
|
@@ -86778,7 +86830,7 @@ ${data2.flowchartText}
|
|
|
86778
86830
|
}
|
|
86779
86831
|
}
|
|
86780
86832
|
});
|
|
86781
|
-
editor.version = "2.1.1-beta.
|
|
86833
|
+
editor.version = "2.1.1-beta.84";
|
|
86782
86834
|
if (Logger$2.level === LogLevel.DEBUG) {
|
|
86783
86835
|
window.setReauthFail = (fail) => {
|
|
86784
86836
|
window.isReauthError = fail;
|
|
@@ -86879,7 +86931,7 @@ ${data2.flowchartText}
|
|
|
86879
86931
|
});
|
|
86880
86932
|
editor.addCustom(DOC_RE_AUTH_KEYS, (editor2) => new DocReAuthCallbacks(editor2));
|
|
86881
86933
|
OnesEditorToolbar.register(editor);
|
|
86882
|
-
editor.version = "2.1.1-beta.
|
|
86934
|
+
editor.version = "2.1.1-beta.84";
|
|
86883
86935
|
return editor;
|
|
86884
86936
|
}
|
|
86885
86937
|
async function showDocVersions(editor, options, serverUrl) {
|