md-editor-v3 4.21.0 → 4.21.2
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/lib/cjs/MdEditor.cjs +73 -27
- package/lib/cjs/chunks/config.cjs +178 -186
- package/lib/cjs/chunks/dom.cjs +64 -52
- package/lib/cjs/chunks/index.cjs +85 -49
- package/lib/cjs/chunks/index3.cjs +11 -11
- package/lib/es/MdEditor.mjs +73 -27
- package/lib/es/chunks/config.mjs +178 -186
- package/lib/es/chunks/dom.mjs +64 -52
- package/lib/es/chunks/index.mjs +85 -49
- package/lib/es/chunks/index3.mjs +11 -11
- package/lib/types/MdEditor/config.d.ts +7 -7
- package/lib/umd/index.js +85 -51
- package/package.json +1 -9
package/lib/cjs/chunks/dom.cjs
CHANGED
|
@@ -78,62 +78,74 @@ const zoomMermaid = /* @__PURE__ */ (() => {
|
|
|
78
78
|
const updateTransform = () => {
|
|
79
79
|
content.style.transform = `translate(${posX}px, ${posY}px) scale(${scale})`;
|
|
80
80
|
};
|
|
81
|
-
container.addEventListener(
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
81
|
+
container.addEventListener(
|
|
82
|
+
"touchstart",
|
|
83
|
+
(event) => {
|
|
84
|
+
if (event.touches.length === 1) {
|
|
85
|
+
isDragging = true;
|
|
86
|
+
startX = event.touches[0].clientX - posX;
|
|
87
|
+
startY = event.touches[0].clientY - posY;
|
|
88
|
+
} else if (event.touches.length === 2) {
|
|
89
|
+
initialDistance = Math.hypot(
|
|
90
|
+
event.touches[0].clientX - event.touches[1].clientX,
|
|
91
|
+
event.touches[0].clientY - event.touches[1].clientY
|
|
92
|
+
);
|
|
93
|
+
initialScale = scale;
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
{ passive: false }
|
|
97
|
+
);
|
|
98
|
+
container.addEventListener(
|
|
99
|
+
"touchmove",
|
|
100
|
+
(event) => {
|
|
101
|
+
event.preventDefault();
|
|
102
|
+
if (isDragging && event.touches.length === 1) {
|
|
103
|
+
posX = event.touches[0].clientX - startX;
|
|
104
|
+
posY = event.touches[0].clientY - startY;
|
|
105
|
+
updateTransform();
|
|
106
|
+
} else if (event.touches.length === 2) {
|
|
107
|
+
const newDistance = Math.hypot(
|
|
108
|
+
event.touches[0].clientX - event.touches[1].clientX,
|
|
109
|
+
event.touches[0].clientY - event.touches[1].clientY
|
|
110
|
+
);
|
|
111
|
+
const scaleChange = newDistance / initialDistance;
|
|
112
|
+
const previousScale = scale;
|
|
113
|
+
scale = initialScale * (1 + (scaleChange - 1));
|
|
114
|
+
const centerX = (event.touches[0].clientX + event.touches[1].clientX) / 2;
|
|
115
|
+
const centerY = (event.touches[0].clientY + event.touches[1].clientY) / 2;
|
|
116
|
+
const rect = content.getBoundingClientRect();
|
|
117
|
+
const relativeX = (centerX - rect.left) / previousScale;
|
|
118
|
+
const relativeY = (centerY - rect.top) / previousScale;
|
|
119
|
+
posX -= relativeX * (scale - previousScale);
|
|
120
|
+
posY -= relativeY * (scale - previousScale);
|
|
121
|
+
updateTransform();
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
{ passive: false }
|
|
125
|
+
);
|
|
126
|
+
container.addEventListener("touchend", () => {
|
|
127
|
+
isDragging = false;
|
|
93
128
|
});
|
|
94
|
-
container.addEventListener(
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
updateTransform();
|
|
100
|
-
} else if (event.touches.length === 2) {
|
|
101
|
-
const newDistance = Math.hypot(
|
|
102
|
-
event.touches[0].clientX - event.touches[1].clientX,
|
|
103
|
-
event.touches[0].clientY - event.touches[1].clientY
|
|
104
|
-
);
|
|
105
|
-
const scaleChange = newDistance / initialDistance;
|
|
129
|
+
container.addEventListener(
|
|
130
|
+
"wheel",
|
|
131
|
+
(event) => {
|
|
132
|
+
event.preventDefault();
|
|
133
|
+
const scaleAmount = 0.02;
|
|
106
134
|
const previousScale = scale;
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
135
|
+
if (event.deltaY < 0) {
|
|
136
|
+
scale += scaleAmount;
|
|
137
|
+
} else {
|
|
138
|
+
scale = Math.max(0.1, scale - scaleAmount);
|
|
139
|
+
}
|
|
110
140
|
const rect = content.getBoundingClientRect();
|
|
111
|
-
const
|
|
112
|
-
const
|
|
113
|
-
posX -=
|
|
114
|
-
posY -=
|
|
141
|
+
const mouseX = event.clientX - rect.left;
|
|
142
|
+
const mouseY = event.clientY - rect.top;
|
|
143
|
+
posX -= mouseX / previousScale * (scale - previousScale);
|
|
144
|
+
posY -= mouseY / previousScale * (scale - previousScale);
|
|
115
145
|
updateTransform();
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
isDragging = false;
|
|
120
|
-
});
|
|
121
|
-
container.addEventListener("wheel", (event) => {
|
|
122
|
-
event.preventDefault();
|
|
123
|
-
const scaleAmount = 0.02;
|
|
124
|
-
const previousScale = scale;
|
|
125
|
-
if (event.deltaY < 0) {
|
|
126
|
-
scale += scaleAmount;
|
|
127
|
-
} else {
|
|
128
|
-
scale = Math.max(0.1, scale - scaleAmount);
|
|
129
|
-
}
|
|
130
|
-
const rect = content.getBoundingClientRect();
|
|
131
|
-
const mouseX = event.clientX - rect.left;
|
|
132
|
-
const mouseY = event.clientY - rect.top;
|
|
133
|
-
posX -= mouseX / previousScale * (scale - previousScale);
|
|
134
|
-
posY -= mouseY / previousScale * (scale - previousScale);
|
|
135
|
-
updateTransform();
|
|
136
|
-
});
|
|
146
|
+
},
|
|
147
|
+
{ passive: false }
|
|
148
|
+
);
|
|
137
149
|
container.addEventListener("mousedown", (event) => {
|
|
138
150
|
isDragging = true;
|
|
139
151
|
startX = event.clientX - posX;
|
package/lib/cjs/chunks/index.cjs
CHANGED
|
@@ -131,7 +131,7 @@ const useHighlight = (props) => {
|
|
|
131
131
|
vue.watch(
|
|
132
132
|
() => highlight.value.css,
|
|
133
133
|
() => {
|
|
134
|
-
if (props.noHighlight ||
|
|
134
|
+
if (props.noHighlight || config.configOption.editorExtensions.highlight.instance) {
|
|
135
135
|
return;
|
|
136
136
|
}
|
|
137
137
|
dom.updateHandler("link", {
|
|
@@ -230,31 +230,33 @@ const useMermaid = (props) => {
|
|
|
230
230
|
await Promise.allSettled(
|
|
231
231
|
Array.from(mermaidSourceEles).map((ele) => {
|
|
232
232
|
const handler = async (item) => {
|
|
233
|
+
var _a;
|
|
233
234
|
let mermaidHtml = mermaidCache.get(item.innerText);
|
|
234
235
|
if (!mermaidHtml) {
|
|
235
236
|
const idRand = util$2.randomId();
|
|
236
|
-
|
|
237
|
-
let svg = "";
|
|
237
|
+
let result = { svg: "" };
|
|
238
238
|
try {
|
|
239
|
-
|
|
240
|
-
|
|
239
|
+
result = await mermaidRef.value.render(
|
|
240
|
+
idRand,
|
|
241
|
+
item.innerText,
|
|
242
|
+
svgContainingElement
|
|
243
|
+
);
|
|
244
|
+
mermaidHtml = await props.sanitizeMermaid(result.svg);
|
|
245
|
+
const p = document.createElement("p");
|
|
246
|
+
p.className = `${config.prefix}-mermaid`;
|
|
247
|
+
p.setAttribute("data-processed", "");
|
|
248
|
+
p.innerHTML = mermaidHtml;
|
|
249
|
+
(_a = p.children[0]) == null ? void 0 : _a.removeAttribute("height");
|
|
250
|
+
mermaidCache.set(item.innerText, p.innerHTML);
|
|
251
|
+
if (item.dataset.line !== void 0) {
|
|
252
|
+
p.dataset.line = item.dataset.line;
|
|
253
|
+
}
|
|
254
|
+
item.replaceWith(p);
|
|
255
|
+
} catch {
|
|
256
|
+
}
|
|
257
|
+
if (--count === 0) {
|
|
258
|
+
svgContainingElement.remove();
|
|
241
259
|
}
|
|
242
|
-
mermaidHtml = await props.sanitizeMermaid(
|
|
243
|
-
typeof svg === "string" ? svg : svg.svg
|
|
244
|
-
);
|
|
245
|
-
}
|
|
246
|
-
const p = document.createElement("p");
|
|
247
|
-
p.className = `${config.prefix}-mermaid`;
|
|
248
|
-
p.setAttribute("data-processed", "");
|
|
249
|
-
p.innerHTML = mermaidHtml;
|
|
250
|
-
p.children[0].removeAttribute("height");
|
|
251
|
-
mermaidCache.set(item.innerText, p.innerHTML);
|
|
252
|
-
if (item.dataset.line !== void 0) {
|
|
253
|
-
p.dataset.line = item.dataset.line;
|
|
254
|
-
}
|
|
255
|
-
item.replaceWith(p);
|
|
256
|
-
if (--count === 0) {
|
|
257
|
-
svgContainingElement.remove();
|
|
258
260
|
}
|
|
259
261
|
};
|
|
260
262
|
return handler(ele);
|
|
@@ -657,15 +659,19 @@ const codetabs = (md, _opts) => {
|
|
|
657
659
|
};
|
|
658
660
|
tokens[idx].info = tokens[idx].info.replace(mandatoryRe, "");
|
|
659
661
|
const codeRendered = defaultRender(tokens, idx, options, env, slf);
|
|
660
|
-
return
|
|
661
|
-
<${
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
<
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
662
|
+
return `
|
|
663
|
+
<${tagContainer2} ${slf.renderAttrs(tmpToken2)}>
|
|
664
|
+
<${tagHeader2} class="${config.prefix}-code-head">
|
|
665
|
+
<div class="${config.prefix}-code-flag"><span></span><span></span><span></span></div>
|
|
666
|
+
<div class="${config.prefix}-code-action">
|
|
667
|
+
<span class="${config.prefix}-code-lang">${tokens[idx].info.trim()}</span>
|
|
668
|
+
<span class="${config.prefix}-copy-button" data-tips="${codeCodeText}"${isIcon ? " data-is-icon=true" : ""}>${copyBtnHtml}</span>
|
|
669
|
+
${tagContainer2 === "details" ? collapseTips : ""}
|
|
670
|
+
</div>
|
|
671
|
+
</${tagHeader2}>
|
|
672
|
+
${codeRendered}
|
|
673
|
+
</${tagContainer2}>
|
|
674
|
+
`;
|
|
669
675
|
}
|
|
670
676
|
let token, group, tab, checked, labels = "", pres = "", langs = "";
|
|
671
677
|
const { open, tagContainer, tagHeader } = getTagType(tokens[idx]);
|
|
@@ -684,26 +690,56 @@ const codetabs = (md, _opts) => {
|
|
|
684
690
|
token.hidden = true;
|
|
685
691
|
const className = `${config.prefix}-codetab-${_opts.editorId}-${idx}-${i - idx}`;
|
|
686
692
|
checked = i - idx > 0 ? "" : "checked";
|
|
687
|
-
labels +=
|
|
688
|
-
|
|
689
|
-
<
|
|
693
|
+
labels += `
|
|
694
|
+
<li>
|
|
695
|
+
<input
|
|
696
|
+
type="radio"
|
|
697
|
+
id="label-${config.prefix}-codetab-label-1-${_opts.editorId}-${idx}-${i - idx}"
|
|
698
|
+
name="${config.prefix}-codetab-label-${_opts.editorId}-${idx}"
|
|
699
|
+
class="${className}"
|
|
700
|
+
${checked}
|
|
701
|
+
>
|
|
702
|
+
<label
|
|
703
|
+
for="label-${config.prefix}-codetab-label-1-${_opts.editorId}-${idx}-${i - idx}"
|
|
704
|
+
onclick="this.getRootNode().querySelectorAll('.${className}').forEach(e => e.click())"
|
|
705
|
+
>
|
|
706
|
+
${tab || getLangName(token)}
|
|
707
|
+
</label>
|
|
690
708
|
</li>`;
|
|
691
|
-
pres +=
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
<
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
709
|
+
pres += `
|
|
710
|
+
<div role="tabpanel">
|
|
711
|
+
<input
|
|
712
|
+
type="radio"
|
|
713
|
+
name="${config.prefix}-codetab-pre-${_opts.editorId}-${idx}"
|
|
714
|
+
class="${className}"
|
|
715
|
+
${checked}
|
|
716
|
+
role="presentation">
|
|
717
|
+
${defaultRender(tokens, i, options, env, slf)}
|
|
718
|
+
</div>`;
|
|
719
|
+
langs += `
|
|
720
|
+
<input
|
|
721
|
+
type="radio"
|
|
722
|
+
name="${config.prefix}-codetab-lang-${_opts.editorId}-${idx}"
|
|
723
|
+
class="${className}"
|
|
724
|
+
${checked}
|
|
725
|
+
role="presentation">
|
|
726
|
+
<span class=${config.prefix}-code-lang role="note">${getLangName(token)}</span>`;
|
|
727
|
+
}
|
|
728
|
+
return `
|
|
729
|
+
<${tagContainer} ${slf.renderAttrs(tmpToken)}>
|
|
730
|
+
<${tagHeader} class="${config.prefix}-code-head">
|
|
731
|
+
<div class="${config.prefix}-code-flag">
|
|
732
|
+
<ul class="${config.prefix}-codetab-label" role="tablist">${labels}</ul>
|
|
733
|
+
</div>
|
|
734
|
+
<div class="${config.prefix}-code-action">
|
|
735
|
+
<span class="${config.prefix}-codetab-lang">${langs}</span>
|
|
736
|
+
<span class="${config.prefix}-copy-button" data-tips="${codeCodeText}"${isIcon ? " data-is-icon=true" : ""}>${copyBtnHtml}</span>
|
|
737
|
+
${tagContainer === "details" ? collapseTips : ""}
|
|
738
|
+
</div>
|
|
739
|
+
</${tagHeader}>
|
|
740
|
+
${pres}
|
|
741
|
+
</${tagContainer}>
|
|
742
|
+
`;
|
|
707
743
|
};
|
|
708
744
|
md.renderer.rules.fence = fenceGroup;
|
|
709
745
|
md.renderer.rules.code_block = fenceGroup;
|
|
@@ -510,6 +510,15 @@ const MdCatalog = /* @__PURE__ */ vue.defineComponent({
|
|
|
510
510
|
const scrollHandler = () => {
|
|
511
511
|
findActiveHeading(state.list);
|
|
512
512
|
};
|
|
513
|
+
const catalogChangedHandler = (_list) => {
|
|
514
|
+
var _a, _b;
|
|
515
|
+
const scrollElement = getScrollElement();
|
|
516
|
+
scrollElementRef.value = scrollElement;
|
|
517
|
+
scrollContainerRef.value = scrollElement === document.documentElement ? document : scrollElement;
|
|
518
|
+
(_a = scrollContainerRef.value) == null ? void 0 : _a.removeEventListener("scroll", scrollHandler);
|
|
519
|
+
findActiveHeading(_list);
|
|
520
|
+
(_b = scrollContainerRef.value) == null ? void 0 : _b.addEventListener("scroll", scrollHandler);
|
|
521
|
+
};
|
|
513
522
|
vue.watch(() => activeItem.value, (nVal) => {
|
|
514
523
|
const activeHeading = nVal ? {
|
|
515
524
|
...nVal
|
|
@@ -522,24 +531,15 @@ const MdCatalog = /* @__PURE__ */ vue.defineComponent({
|
|
|
522
531
|
});
|
|
523
532
|
vue.onMounted(() => {
|
|
524
533
|
rootNodeRef.value = catalogRef.value.getRootNode();
|
|
525
|
-
let scrollElement = getScrollElement();
|
|
526
|
-
scrollElementRef.value = scrollElement;
|
|
527
534
|
eventName.bus.on(editorId, {
|
|
528
535
|
name: eventName.CATALOG_CHANGED,
|
|
529
|
-
callback:
|
|
530
|
-
var _a, _b;
|
|
531
|
-
scrollElement = getScrollElement();
|
|
532
|
-
scrollElementRef.value = scrollElement;
|
|
533
|
-
scrollContainerRef.value = scrollElement === document.documentElement ? document : scrollElement;
|
|
534
|
-
(_a = scrollContainerRef.value) == null ? void 0 : _a.removeEventListener("scroll", scrollHandler);
|
|
535
|
-
findActiveHeading(_list);
|
|
536
|
-
(_b = scrollContainerRef.value) == null ? void 0 : _b.addEventListener("scroll", scrollHandler);
|
|
537
|
-
}
|
|
536
|
+
callback: catalogChangedHandler
|
|
538
537
|
});
|
|
539
538
|
eventName.bus.emit(editorId, eventName.PUSH_CATALOG);
|
|
540
539
|
});
|
|
541
540
|
vue.onBeforeUnmount(() => {
|
|
542
541
|
var _a;
|
|
542
|
+
eventName.bus.remove(editorId, eventName.CATALOG_CHANGED, catalogChangedHandler);
|
|
543
543
|
(_a = scrollContainerRef.value) == null ? void 0 : _a.removeEventListener("scroll", scrollHandler);
|
|
544
544
|
});
|
|
545
545
|
return () => vue.createVNode("div", {
|
package/lib/es/MdEditor.mjs
CHANGED
|
@@ -419,7 +419,7 @@ const ClipModal = /* @__PURE__ */ defineComponent({
|
|
|
419
419
|
"height": "421px"
|
|
420
420
|
}, {
|
|
421
421
|
default: () => {
|
|
422
|
-
var _a2, _b;
|
|
422
|
+
var _a2, _b, _c;
|
|
423
423
|
return [createVNode("div", {
|
|
424
424
|
"class": `${prefix}-form-item ${prefix}-clip`
|
|
425
425
|
}, [createVNode("div", {
|
|
@@ -442,7 +442,10 @@ const ClipModal = /* @__PURE__ */ defineComponent({
|
|
|
442
442
|
"class": `${prefix}-clip-upload`,
|
|
443
443
|
"onClick": () => {
|
|
444
444
|
uploadRef.value.click();
|
|
445
|
-
}
|
|
445
|
+
},
|
|
446
|
+
"role": "button",
|
|
447
|
+
"tabindex": "0",
|
|
448
|
+
"aria-label": (_a2 = ult.value.imgTitleItem) == null ? void 0 : _a2.upload
|
|
446
449
|
}, [createVNode(Icon, {
|
|
447
450
|
"name": "upload"
|
|
448
451
|
}, null)])]), createVNode("div", {
|
|
@@ -462,14 +465,15 @@ const ClipModal = /* @__PURE__ */ defineComponent({
|
|
|
462
465
|
reset();
|
|
463
466
|
}
|
|
464
467
|
}
|
|
465
|
-
}, [((
|
|
468
|
+
}, [((_b = ult.value.clipModalTips) == null ? void 0 : _b.buttonUpload) || ((_c = ult.value.linkModalTips) == null ? void 0 : _c.buttonOK)])]), createVNode("input", {
|
|
466
469
|
"ref": uploadRef,
|
|
467
470
|
"accept": "image/*",
|
|
468
471
|
"type": "file",
|
|
469
472
|
"multiple": false,
|
|
470
473
|
"style": {
|
|
471
474
|
display: "none"
|
|
472
|
-
}
|
|
475
|
+
},
|
|
476
|
+
"aria-hidden": "true"
|
|
473
477
|
}, null)];
|
|
474
478
|
}
|
|
475
479
|
});
|
|
@@ -643,37 +647,50 @@ const ToolBar = /* @__PURE__ */ defineComponent({
|
|
|
643
647
|
"class": `${prefix}-menu`,
|
|
644
648
|
"onClick": () => {
|
|
645
649
|
visible.title = false;
|
|
646
|
-
}
|
|
650
|
+
},
|
|
651
|
+
"role": "menu"
|
|
647
652
|
}, [createVNode("li", {
|
|
648
653
|
"class": `${prefix}-menu-item ${prefix}-menu-item-title`,
|
|
649
654
|
"onClick": () => {
|
|
650
655
|
emitHandler("h1");
|
|
651
|
-
}
|
|
656
|
+
},
|
|
657
|
+
"role": "menuitem",
|
|
658
|
+
"tabindex": "0"
|
|
652
659
|
}, [(_i = ult.value.titleItem) == null ? void 0 : _i.h1]), createVNode("li", {
|
|
653
660
|
"class": `${prefix}-menu-item ${prefix}-menu-item-title`,
|
|
654
661
|
"onClick": () => {
|
|
655
662
|
emitHandler("h2");
|
|
656
|
-
}
|
|
663
|
+
},
|
|
664
|
+
"role": "menuitem",
|
|
665
|
+
"tabindex": "0"
|
|
657
666
|
}, [(_j = ult.value.titleItem) == null ? void 0 : _j.h2]), createVNode("li", {
|
|
658
667
|
"class": `${prefix}-menu-item ${prefix}-menu-item-title`,
|
|
659
668
|
"onClick": () => {
|
|
660
669
|
emitHandler("h3");
|
|
661
|
-
}
|
|
670
|
+
},
|
|
671
|
+
"role": "menuitem",
|
|
672
|
+
"tabindex": "0"
|
|
662
673
|
}, [(_k = ult.value.titleItem) == null ? void 0 : _k.h3]), createVNode("li", {
|
|
663
674
|
"class": `${prefix}-menu-item ${prefix}-menu-item-title`,
|
|
664
675
|
"onClick": () => {
|
|
665
676
|
emitHandler("h4");
|
|
666
|
-
}
|
|
677
|
+
},
|
|
678
|
+
"role": "menuitem",
|
|
679
|
+
"tabindex": "0"
|
|
667
680
|
}, [(_l = ult.value.titleItem) == null ? void 0 : _l.h4]), createVNode("li", {
|
|
668
681
|
"class": `${prefix}-menu-item ${prefix}-menu-item-title`,
|
|
669
682
|
"onClick": () => {
|
|
670
683
|
emitHandler("h5");
|
|
671
|
-
}
|
|
684
|
+
},
|
|
685
|
+
"role": "menuitem",
|
|
686
|
+
"tabindex": "0"
|
|
672
687
|
}, [(_m = ult.value.titleItem) == null ? void 0 : _m.h5]), createVNode("li", {
|
|
673
688
|
"class": `${prefix}-menu-item ${prefix}-menu-item-title`,
|
|
674
689
|
"onClick": () => {
|
|
675
690
|
emitHandler("h6");
|
|
676
|
-
}
|
|
691
|
+
},
|
|
692
|
+
"role": "menuitem",
|
|
693
|
+
"tabindex": "0"
|
|
677
694
|
}, [(_n = ult.value.titleItem) == null ? void 0 : _n.h6])])
|
|
678
695
|
}, {
|
|
679
696
|
default: () => {
|
|
@@ -829,23 +846,30 @@ const ToolBar = /* @__PURE__ */ defineComponent({
|
|
|
829
846
|
"class": `${prefix}-menu`,
|
|
830
847
|
"onClick": () => {
|
|
831
848
|
visible.title = false;
|
|
832
|
-
}
|
|
849
|
+
},
|
|
850
|
+
"role": "menu"
|
|
833
851
|
}, [createVNode("li", {
|
|
834
852
|
"class": `${prefix}-menu-item ${prefix}-menu-item-image`,
|
|
835
853
|
"onClick": () => {
|
|
836
854
|
modalData.type = "image";
|
|
837
855
|
modalData.linkVisible = true;
|
|
838
|
-
}
|
|
856
|
+
},
|
|
857
|
+
"role": "menuitem",
|
|
858
|
+
"tabindex": "0"
|
|
839
859
|
}, [(_I = ult.value.imgTitleItem) == null ? void 0 : _I.link]), createVNode("li", {
|
|
840
860
|
"class": `${prefix}-menu-item ${prefix}-menu-item-image`,
|
|
841
861
|
"onClick": () => {
|
|
842
862
|
uploadRef.value.click();
|
|
843
|
-
}
|
|
863
|
+
},
|
|
864
|
+
"role": "menuitem",
|
|
865
|
+
"tabindex": "0"
|
|
844
866
|
}, [(_J = ult.value.imgTitleItem) == null ? void 0 : _J.upload]), createVNode("li", {
|
|
845
867
|
"class": `${prefix}-menu-item ${prefix}-menu-item-image`,
|
|
846
868
|
"onClick": () => {
|
|
847
869
|
modalData.clipVisible = true;
|
|
848
|
-
}
|
|
870
|
+
},
|
|
871
|
+
"role": "menuitem",
|
|
872
|
+
"tabindex": "0"
|
|
849
873
|
}, [(_K = ult.value.imgTitleItem) == null ? void 0 : _K.clip2upload])])
|
|
850
874
|
}, {
|
|
851
875
|
default: () => {
|
|
@@ -1044,47 +1068,64 @@ const ToolBar = /* @__PURE__ */ defineComponent({
|
|
|
1044
1068
|
"class": `${prefix}-menu`,
|
|
1045
1069
|
"onClick": () => {
|
|
1046
1070
|
visible.mermaid = false;
|
|
1047
|
-
}
|
|
1071
|
+
},
|
|
1072
|
+
"role": "menu"
|
|
1048
1073
|
}, [createVNode("li", {
|
|
1049
1074
|
"class": `${prefix}-menu-item ${prefix}-menu-item-mermaid`,
|
|
1050
1075
|
"onClick": () => {
|
|
1051
1076
|
emitHandler("flow");
|
|
1052
|
-
}
|
|
1077
|
+
},
|
|
1078
|
+
"role": "menuitem",
|
|
1079
|
+
"tabindex": "0"
|
|
1053
1080
|
}, [(_fa = ult.value.mermaid) == null ? void 0 : _fa.flow]), createVNode("li", {
|
|
1054
1081
|
"class": `${prefix}-menu-item ${prefix}-menu-item-mermaid`,
|
|
1055
1082
|
"onClick": () => {
|
|
1056
1083
|
emitHandler("sequence");
|
|
1057
|
-
}
|
|
1084
|
+
},
|
|
1085
|
+
"role": "menuitem",
|
|
1086
|
+
"tabindex": "0"
|
|
1058
1087
|
}, [(_ga = ult.value.mermaid) == null ? void 0 : _ga.sequence]), createVNode("li", {
|
|
1059
1088
|
"class": `${prefix}-menu-item ${prefix}-menu-item-mermaid`,
|
|
1060
1089
|
"onClick": () => {
|
|
1061
1090
|
emitHandler("gantt");
|
|
1062
|
-
}
|
|
1091
|
+
},
|
|
1092
|
+
"role": "menuitem",
|
|
1093
|
+
"tabindex": "0"
|
|
1063
1094
|
}, [(_ha = ult.value.mermaid) == null ? void 0 : _ha.gantt]), createVNode("li", {
|
|
1064
1095
|
"class": `${prefix}-menu-item ${prefix}-menu-item-mermaid`,
|
|
1065
1096
|
"onClick": () => {
|
|
1066
1097
|
emitHandler("class");
|
|
1067
|
-
}
|
|
1098
|
+
},
|
|
1099
|
+
"role": "menuitem",
|
|
1100
|
+
"tabindex": "0"
|
|
1068
1101
|
}, [(_ia = ult.value.mermaid) == null ? void 0 : _ia.class]), createVNode("li", {
|
|
1069
1102
|
"class": `${prefix}-menu-item ${prefix}-menu-item-mermaid`,
|
|
1070
1103
|
"onClick": () => {
|
|
1071
1104
|
emitHandler("state");
|
|
1072
|
-
}
|
|
1105
|
+
},
|
|
1106
|
+
"role": "menuitem",
|
|
1107
|
+
"tabindex": "0"
|
|
1073
1108
|
}, [(_ja = ult.value.mermaid) == null ? void 0 : _ja.state]), createVNode("li", {
|
|
1074
1109
|
"class": `${prefix}-menu-item ${prefix}-menu-item-mermaid`,
|
|
1075
1110
|
"onClick": () => {
|
|
1076
1111
|
emitHandler("pie");
|
|
1077
|
-
}
|
|
1112
|
+
},
|
|
1113
|
+
"role": "menuitem",
|
|
1114
|
+
"tabindex": "0"
|
|
1078
1115
|
}, [(_ka = ult.value.mermaid) == null ? void 0 : _ka.pie]), createVNode("li", {
|
|
1079
1116
|
"class": `${prefix}-menu-item ${prefix}-menu-item-mermaid`,
|
|
1080
1117
|
"onClick": () => {
|
|
1081
1118
|
emitHandler("relationship");
|
|
1082
|
-
}
|
|
1119
|
+
},
|
|
1120
|
+
"role": "menuitem",
|
|
1121
|
+
"tabindex": "0"
|
|
1083
1122
|
}, [(_la = ult.value.mermaid) == null ? void 0 : _la.relationship]), createVNode("li", {
|
|
1084
1123
|
"class": `${prefix}-menu-item ${prefix}-menu-item-mermaid`,
|
|
1085
1124
|
"onClick": () => {
|
|
1086
1125
|
emitHandler("journey");
|
|
1087
|
-
}
|
|
1126
|
+
},
|
|
1127
|
+
"role": "menuitem",
|
|
1128
|
+
"tabindex": "0"
|
|
1088
1129
|
}, [(_ma = ult.value.mermaid) == null ? void 0 : _ma.journey])]),
|
|
1089
1130
|
"key": "bar-mermaid"
|
|
1090
1131
|
}, {
|
|
@@ -1112,17 +1153,22 @@ const ToolBar = /* @__PURE__ */ defineComponent({
|
|
|
1112
1153
|
"class": `${prefix}-menu`,
|
|
1113
1154
|
"onClick": () => {
|
|
1114
1155
|
visible.katex = false;
|
|
1115
|
-
}
|
|
1156
|
+
},
|
|
1157
|
+
"role": "menu"
|
|
1116
1158
|
}, [createVNode("li", {
|
|
1117
1159
|
"class": `${prefix}-menu-item ${prefix}-menu-item-katex`,
|
|
1118
1160
|
"onClick": () => {
|
|
1119
1161
|
emitHandler("katexInline");
|
|
1120
|
-
}
|
|
1162
|
+
},
|
|
1163
|
+
"role": "menuitem",
|
|
1164
|
+
"tabindex": "0"
|
|
1121
1165
|
}, [(_na = ult.value.katex) == null ? void 0 : _na.inline]), createVNode("li", {
|
|
1122
1166
|
"class": `${prefix}-menu-item ${prefix}-menu-item-katex`,
|
|
1123
1167
|
"onClick": () => {
|
|
1124
1168
|
emitHandler("katexBlock");
|
|
1125
|
-
}
|
|
1169
|
+
},
|
|
1170
|
+
"role": "menuitem",
|
|
1171
|
+
"tabindex": "0"
|
|
1126
1172
|
}, [(_oa = ult.value.katex) == null ? void 0 : _oa.block])]),
|
|
1127
1173
|
"key": "bar-katex"
|
|
1128
1174
|
}, {
|