@ones-editor/editor 2.8.37-beta.24 → 2.8.37-beta.26
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 +13 -13
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -26343,7 +26343,7 @@ var __publicField = (obj, key, value) => {
|
|
|
26343
26343
|
}
|
|
26344
26344
|
}
|
|
26345
26345
|
function moveInputToScreenCenter(editor) {
|
|
26346
|
-
const container = editor.
|
|
26346
|
+
const container = getScrollContainer$1(editor.rootContainer);
|
|
26347
26347
|
const rect = container.getBoundingClientRect();
|
|
26348
26348
|
const scale = getElementScale(container);
|
|
26349
26349
|
const windowWidth = window.innerWidth;
|
|
@@ -55190,7 +55190,7 @@ ${codeText}
|
|
|
55190
55190
|
return ` $${math.tex}$ `;
|
|
55191
55191
|
}
|
|
55192
55192
|
if (math.src) {
|
|
55193
|
-
return `<img data-embed-type="mathjax" data-uuid="
|
|
55193
|
+
return `<img data-embed-type="mathjax" data-uuid="mathjax:${math.src}" src="${editor.doc.buildResourceUrl(math.src, { withToken: true })}" />`;
|
|
55194
55194
|
}
|
|
55195
55195
|
return `<code>$${math.tex}$</code>`;
|
|
55196
55196
|
}
|
|
@@ -55371,7 +55371,7 @@ ${codeText}
|
|
|
55371
55371
|
function convertTo$g(editor, blockData, doc2, type) {
|
|
55372
55372
|
const mathData = blockData.embedData;
|
|
55373
55373
|
if (type === "html") {
|
|
55374
|
-
return `<img data-embed-type="mathjax" data-uuid="
|
|
55374
|
+
return `<img data-embed-type="mathjax" data-uuid="mathjax:${mathData.src}" src="${editor.doc.buildResourceUrl(mathData.src, { withToken: true })}" />`;
|
|
55375
55375
|
}
|
|
55376
55376
|
if (type === "markdown") {
|
|
55377
55377
|
return `
|
|
@@ -69122,7 +69122,7 @@ ${codeText}
|
|
|
69122
69122
|
const data2 = blockData.embedData;
|
|
69123
69123
|
const images = getImages$1(data2);
|
|
69124
69124
|
if (type === "html") {
|
|
69125
|
-
return images.map((image) => `<img data-embed-type="image" data-uuid="
|
|
69125
|
+
return images.map((image) => `<img data-embed-type="image" data-uuid="image:${data2.src}" src="${editor.doc.buildResourceUrl(image.src, { withToken: true })}">`).join("");
|
|
69126
69126
|
}
|
|
69127
69127
|
if (type === "markdown") {
|
|
69128
69128
|
const markdown = images.map((image) => `})`).join("\n");
|
|
@@ -80382,7 +80382,7 @@ ${docStr}
|
|
|
80382
80382
|
const data2 = boxData;
|
|
80383
80383
|
if (type === "html") {
|
|
80384
80384
|
if (data2.src) {
|
|
80385
|
-
return `<a data-embed-type="file" data-uuid="
|
|
80385
|
+
return `<a data-embed-type="file" data-uuid="file:${data2.src}" href="${editor.doc.buildResourceUrl(data2.src, { withToken: true })}" >${data2.fileName}</a>`;
|
|
80386
80386
|
}
|
|
80387
80387
|
return `[${data2.fileName}]`;
|
|
80388
80388
|
}
|
|
@@ -80684,7 +80684,7 @@ ${docStr}
|
|
|
80684
80684
|
const data2 = embedData;
|
|
80685
80685
|
if (type === "html") {
|
|
80686
80686
|
if (data2.src) {
|
|
80687
|
-
return `<p><a data-embed-type="file" data-uuid="
|
|
80687
|
+
return `<p><a data-embed-type="file" data-uuid="file:${data2.src}" href="${editor.doc.buildResourceUrl(data2.src, { withToken: true })}" >${data2.fileName}</a></p>`;
|
|
80688
80688
|
}
|
|
80689
80689
|
return `<p>[${data2.fileName}]</p>`;
|
|
80690
80690
|
}
|
|
@@ -86208,7 +86208,7 @@ ${docStr}
|
|
|
86208
86208
|
const data2 = embedData;
|
|
86209
86209
|
if (type === "html") {
|
|
86210
86210
|
if (data2.src) {
|
|
86211
|
-
return `<img data-embed-type="mermaid" data-uuid="
|
|
86211
|
+
return `<img data-embed-type="mermaid" data-uuid="mermaid:${data2.src}" src="${editor.doc.buildResourceUrl(data2.src, { withToken: true })}" />`;
|
|
86212
86212
|
}
|
|
86213
86213
|
if (data2.mermaidText) {
|
|
86214
86214
|
return `<div class="mermaid">${data2.mermaidText}</div>`;
|
|
@@ -86374,7 +86374,7 @@ ${data2.mermaidText}
|
|
|
86374
86374
|
const data2 = embedData;
|
|
86375
86375
|
if (type === "html") {
|
|
86376
86376
|
if (data2.src) {
|
|
86377
|
-
return `<img data-embed-type="flowchart" data-uuid="
|
|
86377
|
+
return `<img data-embed-type="flowchart" data-uuid="flowchart:${data2.src}" src="${editor.doc.buildResourceUrl(data2.src, { withToken: true })}" />`;
|
|
86378
86378
|
}
|
|
86379
86379
|
if (data2.flowchartText) {
|
|
86380
86380
|
return `<div>${data2.flowchartText}</div>`;
|
|
@@ -87337,7 +87337,7 @@ ${data2.flowchartText}
|
|
|
87337
87337
|
const data2 = embedData;
|
|
87338
87338
|
if (type === "html") {
|
|
87339
87339
|
if (data2.src) {
|
|
87340
|
-
return `<img data-embed-type="drawio" data-uuid="
|
|
87340
|
+
return `<img data-embed-type="drawio" data-uuid="drawio:${data2.src}" src="${editor.doc.buildResourceUrl(data2.src, { withToken: true })}" />`;
|
|
87341
87341
|
}
|
|
87342
87342
|
if (data2.xmlSvg) {
|
|
87343
87343
|
return data2.xmlSvg;
|
|
@@ -87531,7 +87531,7 @@ ${data2.flowchartText}
|
|
|
87531
87531
|
const data2 = embedData;
|
|
87532
87532
|
if (type === "html") {
|
|
87533
87533
|
if (data2.src) {
|
|
87534
|
-
return `<img data-embed-type="plantuml" data-uuid="
|
|
87534
|
+
return `<img data-embed-type="plantuml" data-uuid="plantuml:${data2.src}" src="${editor.doc.buildResourceUrl(data2.src, { withToken: true })}" />`;
|
|
87535
87535
|
}
|
|
87536
87536
|
if (data2.plantumlText) {
|
|
87537
87537
|
return `<div>${data2.plantumlText}</div>`;
|
|
@@ -91267,7 +91267,7 @@ ${data2.plantumlText}
|
|
|
91267
91267
|
const mediaData = blockData.embedData;
|
|
91268
91268
|
const url = editor.doc.buildResourceUrl(mediaData.src, { withToken: true });
|
|
91269
91269
|
if (type === "html") {
|
|
91270
|
-
return `<${this.embedType} data-embed-type="${this.embedType}" data-uuid="${mediaData.src}" src="${url}" />`;
|
|
91270
|
+
return `<${this.embedType} data-embed-type="${this.embedType}" data-uuid="${this.embedType}:${mediaData.src}" src="${url}" />`;
|
|
91271
91271
|
}
|
|
91272
91272
|
if (type === "markdown") {
|
|
91273
91273
|
return ``;
|
|
@@ -94935,7 +94935,7 @@ ${JSON.stringify(error2, null, 2)}`);
|
|
|
94935
94935
|
}
|
|
94936
94936
|
}
|
|
94937
94937
|
});
|
|
94938
|
-
editor.version = "2.8.37-beta.
|
|
94938
|
+
editor.version = "2.8.37-beta.26";
|
|
94939
94939
|
return editor;
|
|
94940
94940
|
}
|
|
94941
94941
|
function isDoc(doc2) {
|
|
@@ -95068,7 +95068,7 @@ ${JSON.stringify(error2, null, 2)}`);
|
|
|
95068
95068
|
OnesEditorDropTarget.register(editor);
|
|
95069
95069
|
OnesEditorTocProvider.register(editor);
|
|
95070
95070
|
OnesEditorExclusiveBlock.register(editor);
|
|
95071
|
-
editor.version = "2.8.37-beta.
|
|
95071
|
+
editor.version = "2.8.37-beta.26";
|
|
95072
95072
|
return editor;
|
|
95073
95073
|
}
|
|
95074
95074
|
async function showDocVersions(editor, options, serverUrl) {
|