@ones-editor/editor 2.2.14-beta.14 → 2.2.14-beta.15
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
|
@@ -3952,6 +3952,9 @@ div.editor-root.readonly div.editor-content div[data-type=editor-container] div[
|
|
|
3952
3952
|
.editor-root .editor-content div[data-type=editor-block].comment.active::after {
|
|
3953
3953
|
display: none;
|
|
3954
3954
|
}
|
|
3955
|
+
.editor-root .editor-content div[data-type=editor-block].comment.active > div[data-type=block-content] {
|
|
3956
|
+
outline: none;
|
|
3957
|
+
}
|
|
3955
3958
|
.editor-root .editor-content div[data-type=editor-block] div[data-type=block-tools] .block-comment-button {
|
|
3956
3959
|
all: unset;
|
|
3957
3960
|
position: absolute;
|
|
@@ -7119,7 +7122,7 @@ div.editor-root.readonly div.editor-content div[data-type=editor-container] .emb
|
|
|
7119
7122
|
flex-shrink: 0;
|
|
7120
7123
|
height: 40px;
|
|
7121
7124
|
padding: 10px 20px;
|
|
7122
|
-
gap:
|
|
7125
|
+
gap: 6px;
|
|
7123
7126
|
background: var(--Background-Default-o-color-bg-weak, #f7f8fa);
|
|
7124
7127
|
border-bottom: 1px solid var(--border-color);
|
|
7125
7128
|
}
|
|
@@ -7183,6 +7186,61 @@ div.editor-root.readonly div.editor-content div[data-type=editor-container] .emb
|
|
|
7183
7186
|
margin-left: -5px;
|
|
7184
7187
|
cursor: col-resize;
|
|
7185
7188
|
}
|
|
7189
|
+
.embed-block[data-embed-type=mermaid] div[data-type=block-content] .custom-scrollbar, .embed-block[data-embed-type=mermaid] div[data-type=block-content] .embed-code-editor-container textarea,
|
|
7190
|
+
.embed-block[data-embed-type=flowchart] div[data-type=block-content] .custom-scrollbar,
|
|
7191
|
+
.embed-block[data-embed-type=flowchart] div[data-type=block-content] .embed-code-editor-container textarea,
|
|
7192
|
+
.embed-block[data-embed-type=plantuml] div[data-type=block-content] .custom-scrollbar,
|
|
7193
|
+
.embed-block[data-embed-type=plantuml] div[data-type=block-content] .embed-code-editor-container textarea {
|
|
7194
|
+
overflow: auto;
|
|
7195
|
+
scrollbar-color: transparent transparent;
|
|
7196
|
+
scrollbar-width: thin;
|
|
7197
|
+
/* Handle */
|
|
7198
|
+
/* Handle on hover */
|
|
7199
|
+
}
|
|
7200
|
+
.embed-block[data-embed-type=mermaid] div[data-type=block-content] .custom-scrollbar:hover, .embed-block[data-embed-type=mermaid] div[data-type=block-content] .embed-code-editor-container textarea:hover,
|
|
7201
|
+
.embed-block[data-embed-type=flowchart] div[data-type=block-content] .custom-scrollbar:hover,
|
|
7202
|
+
.embed-block[data-embed-type=flowchart] div[data-type=block-content] .embed-code-editor-container textarea:hover,
|
|
7203
|
+
.embed-block[data-embed-type=plantuml] div[data-type=block-content] .custom-scrollbar:hover,
|
|
7204
|
+
.embed-block[data-embed-type=plantuml] div[data-type=block-content] .embed-code-editor-container textarea:hover {
|
|
7205
|
+
scrollbar-color: var(--other-o-color-scrollbar, #bebfc2) transparent;
|
|
7206
|
+
overflow-y: scroll !important;
|
|
7207
|
+
}
|
|
7208
|
+
.embed-block[data-embed-type=mermaid] div[data-type=block-content] .custom-scrollbar:focus, .embed-block[data-embed-type=mermaid] div[data-type=block-content] .embed-code-editor-container textarea:focus,
|
|
7209
|
+
.embed-block[data-embed-type=flowchart] div[data-type=block-content] .custom-scrollbar:focus,
|
|
7210
|
+
.embed-block[data-embed-type=flowchart] div[data-type=block-content] .embed-code-editor-container textarea:focus,
|
|
7211
|
+
.embed-block[data-embed-type=plantuml] div[data-type=block-content] .custom-scrollbar:focus,
|
|
7212
|
+
.embed-block[data-embed-type=plantuml] div[data-type=block-content] .embed-code-editor-container textarea:focus {
|
|
7213
|
+
scrollbar-color: var(--other-o-color-scrollbar, #bebfc2) transparent;
|
|
7214
|
+
}
|
|
7215
|
+
.embed-block[data-embed-type=mermaid] div[data-type=block-content] .custom-scrollbar::-webkit-scrollbar-track, .embed-block[data-embed-type=mermaid] div[data-type=block-content] .embed-code-editor-container textarea::-webkit-scrollbar-track,
|
|
7216
|
+
.embed-block[data-embed-type=flowchart] div[data-type=block-content] .custom-scrollbar::-webkit-scrollbar-track,
|
|
7217
|
+
.embed-block[data-embed-type=flowchart] div[data-type=block-content] .embed-code-editor-container textarea::-webkit-scrollbar-track,
|
|
7218
|
+
.embed-block[data-embed-type=plantuml] div[data-type=block-content] .custom-scrollbar::-webkit-scrollbar-track,
|
|
7219
|
+
.embed-block[data-embed-type=plantuml] div[data-type=block-content] .embed-code-editor-container textarea::-webkit-scrollbar-track {
|
|
7220
|
+
background: transparent;
|
|
7221
|
+
}
|
|
7222
|
+
.embed-block[data-embed-type=mermaid] div[data-type=block-content] .custom-scrollbar::-webkit-scrollbar-thumb, .embed-block[data-embed-type=mermaid] div[data-type=block-content] .embed-code-editor-container textarea::-webkit-scrollbar-thumb,
|
|
7223
|
+
.embed-block[data-embed-type=flowchart] div[data-type=block-content] .custom-scrollbar::-webkit-scrollbar-thumb,
|
|
7224
|
+
.embed-block[data-embed-type=flowchart] div[data-type=block-content] .embed-code-editor-container textarea::-webkit-scrollbar-thumb,
|
|
7225
|
+
.embed-block[data-embed-type=plantuml] div[data-type=block-content] .custom-scrollbar::-webkit-scrollbar-thumb,
|
|
7226
|
+
.embed-block[data-embed-type=plantuml] div[data-type=block-content] .embed-code-editor-container textarea::-webkit-scrollbar-thumb {
|
|
7227
|
+
border-radius: 4px;
|
|
7228
|
+
background: transparent;
|
|
7229
|
+
}
|
|
7230
|
+
.embed-block[data-embed-type=mermaid] div[data-type=block-content] .custom-scrollbar::-webkit-scrollbar-thumb:hover, .embed-block[data-embed-type=mermaid] div[data-type=block-content] .embed-code-editor-container textarea::-webkit-scrollbar-thumb:hover,
|
|
7231
|
+
.embed-block[data-embed-type=flowchart] div[data-type=block-content] .custom-scrollbar::-webkit-scrollbar-thumb:hover,
|
|
7232
|
+
.embed-block[data-embed-type=flowchart] div[data-type=block-content] .embed-code-editor-container textarea::-webkit-scrollbar-thumb:hover,
|
|
7233
|
+
.embed-block[data-embed-type=plantuml] div[data-type=block-content] .custom-scrollbar::-webkit-scrollbar-thumb:hover,
|
|
7234
|
+
.embed-block[data-embed-type=plantuml] div[data-type=block-content] .embed-code-editor-container textarea::-webkit-scrollbar-thumb:hover {
|
|
7235
|
+
background: var(--other-o-color-scrollbar, #bebfc2);
|
|
7236
|
+
}
|
|
7237
|
+
.embed-block[data-embed-type=mermaid] div[data-type=block-content] .custom-scrollbar:hover::-webkit-scrollbar-thumb, .embed-block[data-embed-type=mermaid] div[data-type=block-content] .embed-code-editor-container textarea:hover::-webkit-scrollbar-thumb,
|
|
7238
|
+
.embed-block[data-embed-type=flowchart] div[data-type=block-content] .custom-scrollbar:hover::-webkit-scrollbar-thumb,
|
|
7239
|
+
.embed-block[data-embed-type=flowchart] div[data-type=block-content] .embed-code-editor-container textarea:hover::-webkit-scrollbar-thumb,
|
|
7240
|
+
.embed-block[data-embed-type=plantuml] div[data-type=block-content] .custom-scrollbar:hover::-webkit-scrollbar-thumb,
|
|
7241
|
+
.embed-block[data-embed-type=plantuml] div[data-type=block-content] .embed-code-editor-container textarea:hover::-webkit-scrollbar-thumb {
|
|
7242
|
+
background: var(--other-o-color-scrollbar, #bebfc2);
|
|
7243
|
+
}
|
|
7186
7244
|
.embed-block[data-embed-type=mermaid] div[data-type=block-content] .embed-code-editor-container,
|
|
7187
7245
|
.embed-block[data-embed-type=flowchart] div[data-type=block-content] .embed-code-editor-container,
|
|
7188
7246
|
.embed-block[data-embed-type=plantuml] div[data-type=block-content] .embed-code-editor-container {
|
|
@@ -7237,11 +7295,14 @@ div.editor-root.readonly div.editor-content div[data-type=editor-container] .emb
|
|
|
7237
7295
|
max-width: 100%;
|
|
7238
7296
|
max-height: 100%;
|
|
7239
7297
|
}
|
|
7240
|
-
div.editor-root:not(.readonly) div.editor-content div[data-type=editor-container] .embed-block[data-embed-type=mermaid]
|
|
7241
|
-
div.editor-root:not(.readonly) div.editor-content div[data-type=editor-container] .embed-block[data-embed-type=flowchart]
|
|
7242
|
-
div.editor-root:not(.readonly) div.editor-content div[data-type=editor-container] .embed-block[data-embed-type=plantuml]
|
|
7298
|
+
div.editor-root:not(.readonly) div.editor-content div[data-type=editor-container] .embed-block[data-embed-type=mermaid].no-highlighted.selected > div[data-type=block-content]::before,
|
|
7299
|
+
div.editor-root:not(.readonly) div.editor-content div[data-type=editor-container] .embed-block[data-embed-type=flowchart].no-highlighted.selected > div[data-type=block-content]::before,
|
|
7300
|
+
div.editor-root:not(.readonly) div.editor-content div[data-type=editor-container] .embed-block[data-embed-type=plantuml].no-highlighted.selected > div[data-type=block-content]::before {
|
|
7243
7301
|
background-color: transparent;
|
|
7244
7302
|
}
|
|
7303
|
+
div[data-type=editor-block].layout-block .layout-column-container > .container-blocks > .embed-block[data-embed-type=mermaid] div[data-type=block-content], div[data-type=editor-block].layout-block .layout-column-container > .container-blocks > .embed-block[data-embed-type=flowchart] div[data-type=block-content], div[data-type=editor-block].layout-block .layout-column-container > .container-blocks > .embed-block[data-embed-type=plantuml] div[data-type=block-content] {
|
|
7304
|
+
min-width: 290px;
|
|
7305
|
+
}
|
|
7245
7306
|
div.comment-editor-root [data-type=editor-container].root .embed-block[data-embed-type=mermaid],
|
|
7246
7307
|
div.comment-editor-root [data-type=editor-container].root .embed-block[data-embed-type=flowchart],
|
|
7247
7308
|
div.comment-editor-root [data-type=editor-container].root .embed-block[data-embed-type=plantuml] {
|
|
@@ -81671,6 +81732,24 @@ ${content}
|
|
|
81671
81732
|
}
|
|
81672
81733
|
}
|
|
81673
81734
|
});
|
|
81735
|
+
__publicField(this, "handleClick", (e2) => {
|
|
81736
|
+
const target = e2.target;
|
|
81737
|
+
if (target instanceof HTMLElement) {
|
|
81738
|
+
const blockElement = getParentBlock(target);
|
|
81739
|
+
assert(logger$k, blockElement, "blockElement does not exist");
|
|
81740
|
+
if (!hasClass(target, "embed-graph-header")) {
|
|
81741
|
+
addClass(blockElement, "no-highlighted");
|
|
81742
|
+
} else {
|
|
81743
|
+
removeClass(blockElement, "no-highlighted");
|
|
81744
|
+
}
|
|
81745
|
+
}
|
|
81746
|
+
});
|
|
81747
|
+
__publicField(this, "handleSelectionChanged", (editor) => {
|
|
81748
|
+
const block = editor.selection.focusedBlock;
|
|
81749
|
+
if (block !== this.block) {
|
|
81750
|
+
removeClass(this.block, "no-highlighted");
|
|
81751
|
+
}
|
|
81752
|
+
});
|
|
81674
81753
|
__publicField(this, "handleInputFocusChange", (focused, id) => {
|
|
81675
81754
|
const block = this.editor.getBlockById(id);
|
|
81676
81755
|
if (focused) {
|
|
@@ -81740,6 +81819,7 @@ ${content}
|
|
|
81740
81819
|
}));
|
|
81741
81820
|
this.editor = editor;
|
|
81742
81821
|
this.editor.addListener("readonlyChanged", this.handleReadonlyChanged);
|
|
81822
|
+
this.editor.addListener("selectionChanged", this.handleSelectionChanged);
|
|
81743
81823
|
GraphExclusiveHandler.get(editor).addListener("onExclusiveBlock", this.handleExclusiveBlock);
|
|
81744
81824
|
}
|
|
81745
81825
|
get block() {
|
|
@@ -81751,6 +81831,7 @@ ${content}
|
|
|
81751
81831
|
destroy() {
|
|
81752
81832
|
var _a, _b, _c;
|
|
81753
81833
|
this.editor.removeListener("readonlyChanged", this.handleReadonlyChanged);
|
|
81834
|
+
this.editor.removeListener("selectionChanged", this.handleSelectionChanged);
|
|
81754
81835
|
(_a = this.layout) == null ? void 0 : _a.destroy();
|
|
81755
81836
|
(_b = this.viewSelect) == null ? void 0 : _b.destroy();
|
|
81756
81837
|
(_c = this.drawHandler) == null ? void 0 : _c.destroy();
|
|
@@ -81764,7 +81845,6 @@ ${content}
|
|
|
81764
81845
|
createEmbedContent(content, blockData) {
|
|
81765
81846
|
const { code, src, height, flex = DEFAULT_FLEX, view } = this.getGraphData(blockData);
|
|
81766
81847
|
const header = createElement("div", ["embed-graph-header"], content, i18n$1.t(`graph.${this.graphType}`));
|
|
81767
|
-
bindPreventSelect(header, this.handleBlockFocus);
|
|
81768
81848
|
this.viewSelect = new ViewSelect(header);
|
|
81769
81849
|
this.viewSelect.addListener("viewChange", this.updateLayoutData);
|
|
81770
81850
|
const left = createElement("div", ["embed-graph-left"], null);
|
|
@@ -81785,6 +81865,7 @@ ${content}
|
|
|
81785
81865
|
return;
|
|
81786
81866
|
}
|
|
81787
81867
|
const blockElement = this.editor.getBlockById(blockData.id);
|
|
81868
|
+
blockElement.addEventListener("mousedown", this.handleClick, { capture: true });
|
|
81788
81869
|
EmbedBlockResizer.register(this.editor, blockElement, { maxHeight: GRAPH_MAX_HEIGHT, minHeight: GRAPH_MIN_HEIGHT });
|
|
81789
81870
|
});
|
|
81790
81871
|
}
|
|
@@ -88976,7 +89057,7 @@ ${data2.plantumlText}
|
|
|
88976
89057
|
}
|
|
88977
89058
|
}
|
|
88978
89059
|
});
|
|
88979
|
-
editor.version = "2.2.14-beta.
|
|
89060
|
+
editor.version = "2.2.14-beta.15";
|
|
88980
89061
|
return editor;
|
|
88981
89062
|
}
|
|
88982
89063
|
function isDoc(doc2) {
|
|
@@ -89077,7 +89158,7 @@ ${data2.plantumlText}
|
|
|
89077
89158
|
});
|
|
89078
89159
|
editor.addCustom(DOC_RE_AUTH_KEYS, (editor2) => new DocReAuthCallbacks(editor2));
|
|
89079
89160
|
OnesEditorToolbar.register(editor);
|
|
89080
|
-
editor.version = "2.2.14-beta.
|
|
89161
|
+
editor.version = "2.2.14-beta.15";
|
|
89081
89162
|
return editor;
|
|
89082
89163
|
}
|
|
89083
89164
|
async function showDocVersions(editor, options, serverUrl) {
|