@ones-editor/editor 3.0.17-beta.5 → 3.0.18-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/dist/index.js
CHANGED
|
@@ -83243,6 +83243,9 @@ ${docStr}
|
|
|
83243
83243
|
const blocks = this.docObject.blocks[containerId];
|
|
83244
83244
|
const blockData = blocks[updateIndex];
|
|
83245
83245
|
assert(logger$C, !blockData.deleted, `block has already deleted: ${containerId}/${blockIndex}`);
|
|
83246
|
+
if (!Array.isArray(blockData.text)) {
|
|
83247
|
+
blockData.text = [];
|
|
83248
|
+
}
|
|
83246
83249
|
const text2 = blockData.text;
|
|
83247
83250
|
assert(logger$C, text2, `no text for block: ${JSON.stringify(blockData)}`);
|
|
83248
83251
|
const newText = updateBlockText(text2, actions2, user);
|
|
@@ -86745,7 +86748,7 @@ ${docStr}
|
|
|
86745
86748
|
},
|
|
86746
86749
|
convertTo: convertTo$6
|
|
86747
86750
|
};
|
|
86748
|
-
const MERMAID_SCRIPTS = "https://cdn.jsdelivr.net/npm/mermaid@
|
|
86751
|
+
const MERMAID_SCRIPTS = "https://cdn.jsdelivr.net/npm/mermaid@11.15.0/dist/mermaid.min.js";
|
|
86749
86752
|
const FLOWCHART_SCRIPTS = ["//cdnjs.cloudflare.com/ajax/libs/raphael/2.3.0/raphael.min.js", "//cdnjs.cloudflare.com/ajax/libs/flowchart/1.15.0/flowchart.min.js"];
|
|
86750
86753
|
const PLANTUML_PRE = "https://www.plantuml.com/plantuml/svg";
|
|
86751
86754
|
const GRAPH_MIN_HEIGHT = 150;
|
|
@@ -87462,22 +87465,17 @@ ${docStr}
|
|
|
87462
87465
|
const mermaid = window.mermaid;
|
|
87463
87466
|
assert(logger$l, mermaid, "Resource load failed: Mermaid javaScript resource injection failed");
|
|
87464
87467
|
const id = genId();
|
|
87465
|
-
|
|
87466
|
-
|
|
87467
|
-
|
|
87468
|
-
|
|
87469
|
-
|
|
87470
|
-
|
|
87471
|
-
|
|
87472
|
-
|
|
87473
|
-
|
|
87474
|
-
|
|
87475
|
-
|
|
87476
|
-
el == null ? void 0 : el.remove();
|
|
87477
|
-
reject(err);
|
|
87478
|
-
}
|
|
87479
|
-
});
|
|
87480
|
-
const svgCode = await promise;
|
|
87468
|
+
let svgCode = "";
|
|
87469
|
+
try {
|
|
87470
|
+
const result = await mermaid.render(id, code);
|
|
87471
|
+
svgCode = typeof result === "string" ? result : result.svg;
|
|
87472
|
+
} catch (err) {
|
|
87473
|
+
err.message = err.str || err.message;
|
|
87474
|
+
const delId = `d${id}`;
|
|
87475
|
+
const el = document.getElementById(delId);
|
|
87476
|
+
el == null ? void 0 : el.remove();
|
|
87477
|
+
throw err;
|
|
87478
|
+
}
|
|
87481
87479
|
const domParser = new DOMParser();
|
|
87482
87480
|
const xml = domParser.parseFromString(svgCode, "image/svg+xml");
|
|
87483
87481
|
const xmlSvg = xml.firstChild;
|
|
@@ -97337,7 +97335,7 @@ ${JSON.stringify(error2, null, 2)}`);
|
|
|
97337
97335
|
}
|
|
97338
97336
|
}
|
|
97339
97337
|
});
|
|
97340
|
-
editor.version = "3.0.
|
|
97338
|
+
editor.version = "3.0.18-beta.1";
|
|
97341
97339
|
return editor;
|
|
97342
97340
|
}
|
|
97343
97341
|
function isDoc(doc2) {
|
|
@@ -97471,7 +97469,7 @@ ${JSON.stringify(error2, null, 2)}`);
|
|
|
97471
97469
|
OnesEditorDropTarget.register(editor);
|
|
97472
97470
|
OnesEditorTocProvider.register(editor);
|
|
97473
97471
|
OnesEditorExclusiveBlock.register(editor);
|
|
97474
|
-
editor.version = "3.0.
|
|
97472
|
+
editor.version = "3.0.18-beta.1";
|
|
97475
97473
|
return editor;
|
|
97476
97474
|
}
|
|
97477
97475
|
async function showDocVersions(editor, options, serverUrl) {
|
|
@@ -97606,7 +97604,7 @@ ${JSON.stringify(error2, null, 2)}`);
|
|
|
97606
97604
|
}
|
|
97607
97605
|
}
|
|
97608
97606
|
});
|
|
97609
|
-
editor.version = "3.0.
|
|
97607
|
+
editor.version = "3.0.18-beta.1";
|
|
97610
97608
|
return editor;
|
|
97611
97609
|
}
|
|
97612
97610
|
const emojis$1 = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ones-editor/editor",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.18-beta.1",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"types": "./dist/index.d.ts",
|
|
6
6
|
"dependencies": {
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"marked-extended-latex": "^1.1.0",
|
|
49
49
|
"markmap-common": "0.15.3",
|
|
50
50
|
"markmap-view": "0.15.4",
|
|
51
|
-
"mermaid": "
|
|
51
|
+
"mermaid": "11.15.0",
|
|
52
52
|
"mime-db": "^1.52.0",
|
|
53
53
|
"nanoid": "^3.2.0",
|
|
54
54
|
"ot-json1": "^1.0.2",
|