@ones-editor/editor 3.0.12-beta.3 → 3.0.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/dist/index.js
CHANGED
|
@@ -7798,38 +7798,6 @@ div.editor-root:not(.readonly) div.editor-content div[data-type=editor-container
|
|
|
7798
7798
|
}
|
|
7799
7799
|
div.editor-root.readonly div.editor-content div[data-type=editor-container] .embed-block[data-embed-type=drawio] [data-src] {
|
|
7800
7800
|
cursor: zoom-in;
|
|
7801
|
-
}
|
|
7802
|
-
.command-item.menu-item[data-id=insert-drawio] {
|
|
7803
|
-
width: 100%;
|
|
7804
|
-
}
|
|
7805
|
-
.command-item.menu-item[data-id=insert-drawio] .uml-menu-item {
|
|
7806
|
-
color: #2d2d2e;
|
|
7807
|
-
user-select: none;
|
|
7808
|
-
transition: background 20ms ease-in 0s;
|
|
7809
|
-
width: 100%;
|
|
7810
|
-
height: 32px;
|
|
7811
|
-
padding: 6px 10px;
|
|
7812
|
-
display: flex;
|
|
7813
|
-
align-items: center;
|
|
7814
|
-
box-sizing: border-box;
|
|
7815
|
-
}
|
|
7816
|
-
.command-item.menu-item[data-id=insert-drawio] .uml-menu-item .menu-item-icon {
|
|
7817
|
-
display: flex;
|
|
7818
|
-
align-items: center;
|
|
7819
|
-
justify-content: center;
|
|
7820
|
-
height: 24px;
|
|
7821
|
-
width: 24px;
|
|
7822
|
-
margin-right: 5px;
|
|
7823
|
-
margin-top: -2px;
|
|
7824
|
-
display: flex;
|
|
7825
|
-
flex-direction: column;
|
|
7826
|
-
justify-content: center;
|
|
7827
|
-
}
|
|
7828
|
-
.command-item.menu-item[data-id=insert-drawio] .uml-menu-item .menu-item-name {
|
|
7829
|
-
white-space: nowrap;
|
|
7830
|
-
flex-grow: 1;
|
|
7831
|
-
display: flex;
|
|
7832
|
-
align-items: center;
|
|
7833
7801
|
}.embed-block[data-embed-type=mermaid],
|
|
7834
7802
|
.embed-block[data-embed-type=flowchart],
|
|
7835
7803
|
.embed-block[data-embed-type=plantuml] {
|
|
@@ -41832,9 +41800,7 @@ ${codeText}
|
|
|
41832
41800
|
}
|
|
41833
41801
|
}
|
|
41834
41802
|
if (item.element) {
|
|
41835
|
-
|
|
41836
|
-
return;
|
|
41837
|
-
}
|
|
41803
|
+
return;
|
|
41838
41804
|
}
|
|
41839
41805
|
this.emit("click", this, item, elem);
|
|
41840
41806
|
if (item.clickToClose === false) {
|
|
@@ -88619,51 +88585,30 @@ ${data2.flowchartText}
|
|
|
88619
88585
|
update(editor, embed, data2);
|
|
88620
88586
|
return true;
|
|
88621
88587
|
}
|
|
88622
|
-
function getOptions$3(
|
|
88623
|
-
|
|
88624
|
-
|
|
88625
|
-
|
|
88626
|
-
const element = suffixElem ? () => {
|
|
88627
|
-
const root2 = createElement("div", ["uml-menu-item"], null);
|
|
88628
|
-
const iconElem = createElement("div", ["menu-item-icon"], root2);
|
|
88629
|
-
iconElem.innerHTML = UmlIcon;
|
|
88630
|
-
createElement("div", ["menu-item-name"], root2, i18n$1.t("drawio.title"));
|
|
88631
|
-
root2.appendChild(suffixElem);
|
|
88632
|
-
return root2;
|
|
88633
|
-
} : void 0;
|
|
88634
|
-
const insertEmbedCommandItems = [];
|
|
88635
|
-
if (drawioOptions.visible !== false) {
|
|
88636
|
-
insertEmbedCommandItems.push({
|
|
88588
|
+
function getOptions$3() {
|
|
88589
|
+
return {
|
|
88590
|
+
name: "UML",
|
|
88591
|
+
insertEmbedCommandItems: [{
|
|
88637
88592
|
id: "insert-drawio",
|
|
88638
88593
|
name: i18n$1.t("drawio.title"),
|
|
88639
88594
|
icon: UmlIcon,
|
|
88640
88595
|
group: "common",
|
|
88641
88596
|
order: 600,
|
|
88642
|
-
subText: getShortcutById("insert-drawio")
|
|
88643
|
-
|
|
88644
|
-
|
|
88645
|
-
});
|
|
88646
|
-
}
|
|
88647
|
-
return {
|
|
88648
|
-
name: "UML",
|
|
88649
|
-
insertEmbedCommandItems,
|
|
88650
|
-
handleInsertEmptyEmbed: async (editor2, options) => {
|
|
88651
|
-
var _a2, _b;
|
|
88652
|
-
if (((_b = (_a2 = drawioOptions.callbacks) == null ? void 0 : _a2.onBeforeInsertDrawio) == null ? void 0 : _b.call(_a2, editor2)) === false) {
|
|
88653
|
-
return null;
|
|
88654
|
-
}
|
|
88597
|
+
subText: getShortcutById("insert-drawio")
|
|
88598
|
+
}],
|
|
88599
|
+
handleInsertEmptyEmbed: async (editor, options) => {
|
|
88655
88600
|
const embedData = {
|
|
88656
88601
|
src: "",
|
|
88657
88602
|
xml: "",
|
|
88658
88603
|
xmlSvg: ""
|
|
88659
88604
|
};
|
|
88660
|
-
const block =
|
|
88605
|
+
const block = editor.insertEmbed(options.containerId, options.blockIndex, "drawio", embedData);
|
|
88661
88606
|
setTimeout(() => {
|
|
88662
88607
|
const blockContent = getBlockContent(block);
|
|
88663
88608
|
const embed = blockContent.querySelector(":scope > .editor-drawio-content");
|
|
88664
88609
|
assert(logger$i, embed, "embed should not be null");
|
|
88665
|
-
const blockData =
|
|
88666
|
-
editDrawIO(
|
|
88610
|
+
const blockData = editor.getBlockData(block);
|
|
88611
|
+
editDrawIO(editor, block, embed, blockData.embedData);
|
|
88667
88612
|
}, 100);
|
|
88668
88613
|
return block;
|
|
88669
88614
|
}
|
|
@@ -96912,7 +96857,7 @@ ${JSON.stringify(error2, null, 2)}`);
|
|
|
96912
96857
|
}
|
|
96913
96858
|
}
|
|
96914
96859
|
});
|
|
96915
|
-
editor.version = "3.0.
|
|
96860
|
+
editor.version = "3.0.13";
|
|
96916
96861
|
return editor;
|
|
96917
96862
|
}
|
|
96918
96863
|
function isDoc(doc2) {
|
|
@@ -97046,7 +96991,7 @@ ${JSON.stringify(error2, null, 2)}`);
|
|
|
97046
96991
|
OnesEditorDropTarget.register(editor);
|
|
97047
96992
|
OnesEditorTocProvider.register(editor);
|
|
97048
96993
|
OnesEditorExclusiveBlock.register(editor);
|
|
97049
|
-
editor.version = "3.0.
|
|
96994
|
+
editor.version = "3.0.13";
|
|
97050
96995
|
return editor;
|
|
97051
96996
|
}
|
|
97052
96997
|
async function showDocVersions(editor, options, serverUrl) {
|