md-editor-v3 6.3.0 → 6.3.2-0

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.
Files changed (125) hide show
  1. package/lib/cjs/MdEditor.cjs +1 -1
  2. package/lib/es/MdEditor.mjs +454 -424
  3. package/lib/types/index.d.ts +3341 -8
  4. package/package.json +2 -1
  5. package/lib/types/DropdownToolbar/DropdownToolbar.d.ts +0 -137
  6. package/lib/types/DropdownToolbar/index.d.ts +0 -6
  7. package/lib/types/MdCatalog/CatalogLink.d.ts +0 -53
  8. package/lib/types/MdCatalog/MdCatalog.d.ts +0 -186
  9. package/lib/types/MdCatalog/index.d.ts +0 -6
  10. package/lib/types/MdEditor/Editor.d.ts +0 -590
  11. package/lib/types/MdEditor/components/Checkbox/index.d.ts +0 -33
  12. package/lib/types/MdEditor/components/CustomScrollbar/index.d.ts +0 -72
  13. package/lib/types/MdEditor/components/Divider/index.d.ts +0 -2
  14. package/lib/types/MdEditor/components/Dropdown/index.d.ts +0 -55
  15. package/lib/types/MdEditor/components/Icon/Github.d.ts +0 -2
  16. package/lib/types/MdEditor/components/Icon/Icon.d.ts +0 -18
  17. package/lib/types/MdEditor/components/Icon/Str.d.ts +0 -3
  18. package/lib/types/MdEditor/components/Icon/index.d.ts +0 -16
  19. package/lib/types/MdEditor/components/Modal/Modal.d.ts +0 -108
  20. package/lib/types/MdEditor/components/Modal/index.d.ts +0 -6
  21. package/lib/types/MdEditor/composition.d.ts +0 -92
  22. package/lib/types/MdEditor/config.d.ts +0 -33
  23. package/lib/types/MdEditor/index.d.ts +0 -6
  24. package/lib/types/MdEditor/layouts/Content/ContentPreview.d.ts +0 -153
  25. package/lib/types/MdEditor/layouts/Content/UpdateOnDemand.d.ts +0 -28
  26. package/lib/types/MdEditor/layouts/Content/codemirror/autocompletion.d.ts +0 -2
  27. package/lib/types/MdEditor/layouts/Content/codemirror/commands.d.ts +0 -4
  28. package/lib/types/MdEditor/layouts/Content/codemirror/floatingToolbar.d.ts +0 -6
  29. package/lib/types/MdEditor/layouts/Content/codemirror/index.d.ts +0 -53
  30. package/lib/types/MdEditor/layouts/Content/codemirror/textShortener.d.ts +0 -20
  31. package/lib/types/MdEditor/layouts/Content/codemirror/themeLight.d.ts +0 -26
  32. package/lib/types/MdEditor/layouts/Content/codemirror/themeOneDark.d.ts +0 -26
  33. package/lib/types/MdEditor/layouts/Content/composition/index.d.ts +0 -10
  34. package/lib/types/MdEditor/layouts/Content/composition/useAttach.d.ts +0 -9
  35. package/lib/types/MdEditor/layouts/Content/composition/useAutoScroll.d.ts +0 -5
  36. package/lib/types/MdEditor/layouts/Content/composition/useCodeMirror.d.ts +0 -15
  37. package/lib/types/MdEditor/layouts/Content/composition/useCopyCode.d.ts +0 -4
  38. package/lib/types/MdEditor/layouts/Content/composition/useEcharts.d.ts +0 -10
  39. package/lib/types/MdEditor/layouts/Content/composition/useFollowCatalog.d.ts +0 -5
  40. package/lib/types/MdEditor/layouts/Content/composition/useHighlight.d.ts +0 -8
  41. package/lib/types/MdEditor/layouts/Content/composition/useKatex.d.ts +0 -8
  42. package/lib/types/MdEditor/layouts/Content/composition/useMarkdownIt.d.ts +0 -6
  43. package/lib/types/MdEditor/layouts/Content/composition/useMermaid.d.ts +0 -10
  44. package/lib/types/MdEditor/layouts/Content/composition/usePasteUpload.d.ts +0 -8
  45. package/lib/types/MdEditor/layouts/Content/composition/useRemount.d.ts +0 -3
  46. package/lib/types/MdEditor/layouts/Content/composition/useResize.d.ts +0 -12
  47. package/lib/types/MdEditor/layouts/Content/composition/useTaskState.d.ts +0 -3
  48. package/lib/types/MdEditor/layouts/Content/composition/useToolbarEffect.d.ts +0 -3
  49. package/lib/types/MdEditor/layouts/Content/composition/userZoom.d.ts +0 -10
  50. package/lib/types/MdEditor/layouts/Content/index.d.ts +0 -93
  51. package/lib/types/MdEditor/layouts/Content/markdownIt/admonition/index.d.ts +0 -11
  52. package/lib/types/MdEditor/layouts/Content/markdownIt/code/index.d.ts +0 -23
  53. package/lib/types/MdEditor/layouts/Content/markdownIt/echarts/index.d.ts +0 -7
  54. package/lib/types/MdEditor/layouts/Content/markdownIt/heading/index.d.ts +0 -9
  55. package/lib/types/MdEditor/layouts/Content/markdownIt/katex/index.d.ts +0 -20
  56. package/lib/types/MdEditor/layouts/Content/markdownIt/mermaid/index.d.ts +0 -7
  57. package/lib/types/MdEditor/layouts/Content/markdownIt/task/index.d.ts +0 -15
  58. package/lib/types/MdEditor/layouts/Content/markdownIt/xss/index.d.ts +0 -13
  59. package/lib/types/MdEditor/layouts/Content/props.d.ts +0 -204
  60. package/lib/types/MdEditor/layouts/Content/type.d.ts +0 -19
  61. package/lib/types/MdEditor/layouts/FloatingToolbar/index.d.ts +0 -2
  62. package/lib/types/MdEditor/layouts/Footer/MarkdownTotal.d.ts +0 -15
  63. package/lib/types/MdEditor/layouts/Footer/ScrollAuto.d.ts +0 -21
  64. package/lib/types/MdEditor/layouts/Footer/index.d.ts +0 -52
  65. package/lib/types/MdEditor/layouts/Modals/Clip.d.ts +0 -33
  66. package/lib/types/MdEditor/layouts/Modals/index.d.ts +0 -33
  67. package/lib/types/MdEditor/layouts/Toolbar/TableShape.d.ts +0 -28
  68. package/lib/types/MdEditor/layouts/Toolbar/composition.d.ts +0 -7
  69. package/lib/types/MdEditor/layouts/Toolbar/index.d.ts +0 -23
  70. package/lib/types/MdEditor/layouts/Toolbar/props.d.ts +0 -14
  71. package/lib/types/MdEditor/layouts/Toolbar/tools/Bold.d.ts +0 -2
  72. package/lib/types/MdEditor/layouts/Toolbar/tools/Catalog.d.ts +0 -2
  73. package/lib/types/MdEditor/layouts/Toolbar/tools/Code.d.ts +0 -2
  74. package/lib/types/MdEditor/layouts/Toolbar/tools/CodeRow.d.ts +0 -2
  75. package/lib/types/MdEditor/layouts/Toolbar/tools/Fullscreen.d.ts +0 -2
  76. package/lib/types/MdEditor/layouts/Toolbar/tools/Github.d.ts +0 -2
  77. package/lib/types/MdEditor/layouts/Toolbar/tools/HtmlPreview.d.ts +0 -2
  78. package/lib/types/MdEditor/layouts/Toolbar/tools/Image.d.ts +0 -2
  79. package/lib/types/MdEditor/layouts/Toolbar/tools/ImageDropdown.d.ts +0 -2
  80. package/lib/types/MdEditor/layouts/Toolbar/tools/Italic.d.ts +0 -2
  81. package/lib/types/MdEditor/layouts/Toolbar/tools/Katex.d.ts +0 -2
  82. package/lib/types/MdEditor/layouts/Toolbar/tools/Link.d.ts +0 -2
  83. package/lib/types/MdEditor/layouts/Toolbar/tools/Mermaid.d.ts +0 -2
  84. package/lib/types/MdEditor/layouts/Toolbar/tools/Next.d.ts +0 -2
  85. package/lib/types/MdEditor/layouts/Toolbar/tools/OrderedList.d.ts +0 -2
  86. package/lib/types/MdEditor/layouts/Toolbar/tools/PageFullscreen.d.ts +0 -2
  87. package/lib/types/MdEditor/layouts/Toolbar/tools/Prettier.d.ts +0 -2
  88. package/lib/types/MdEditor/layouts/Toolbar/tools/Preview.d.ts +0 -2
  89. package/lib/types/MdEditor/layouts/Toolbar/tools/PreviewOnly.d.ts +0 -2
  90. package/lib/types/MdEditor/layouts/Toolbar/tools/Quote.d.ts +0 -2
  91. package/lib/types/MdEditor/layouts/Toolbar/tools/Revoke.d.ts +0 -2
  92. package/lib/types/MdEditor/layouts/Toolbar/tools/Save.d.ts +0 -2
  93. package/lib/types/MdEditor/layouts/Toolbar/tools/StrikeThrough.d.ts +0 -2
  94. package/lib/types/MdEditor/layouts/Toolbar/tools/Sub.d.ts +0 -2
  95. package/lib/types/MdEditor/layouts/Toolbar/tools/Sup.d.ts +0 -2
  96. package/lib/types/MdEditor/layouts/Toolbar/tools/Table.d.ts +0 -2
  97. package/lib/types/MdEditor/layouts/Toolbar/tools/Task.d.ts +0 -2
  98. package/lib/types/MdEditor/layouts/Toolbar/tools/Title.d.ts +0 -2
  99. package/lib/types/MdEditor/layouts/Toolbar/tools/Underline.d.ts +0 -2
  100. package/lib/types/MdEditor/layouts/Toolbar/tools/UnorderedList.d.ts +0 -2
  101. package/lib/types/MdEditor/props.d.ts +0 -784
  102. package/lib/types/MdEditor/static/env.d.ts +0 -1
  103. package/lib/types/MdEditor/static/event-name.d.ts +0 -23
  104. package/lib/types/MdEditor/static/index.d.ts +0 -14
  105. package/lib/types/MdEditor/type.d.ts +0 -534
  106. package/lib/types/MdEditor/utils/cache.d.ts +0 -2
  107. package/lib/types/MdEditor/utils/content-help.d.ts +0 -44
  108. package/lib/types/MdEditor/utils/dom.d.ts +0 -43
  109. package/lib/types/MdEditor/utils/event-bus.d.ts +0 -17
  110. package/lib/types/MdEditor/utils/index.d.ts +0 -38
  111. package/lib/types/MdEditor/utils/md-it.d.ts +0 -2
  112. package/lib/types/MdEditor/utils/scroll-auto.d.ts +0 -19
  113. package/lib/types/MdEditor/utils/vue-tsx.d.ts +0 -18
  114. package/lib/types/MdPreview/MdPreview.d.ts +0 -516
  115. package/lib/types/MdPreview/composition/useExpose.d.ts +0 -5
  116. package/lib/types/MdPreview/index.d.ts +0 -6
  117. package/lib/types/ModalToolbar/ModalToolbar.d.ts +0 -216
  118. package/lib/types/ModalToolbar/index.d.ts +0 -6
  119. package/lib/types/NormalFooterToolbar/NormalFooterToolbar.d.ts +0 -51
  120. package/lib/types/NormalFooterToolbar/index.d.ts +0 -6
  121. package/lib/types/NormalToolbar/NormalToolbar.d.ts +0 -117
  122. package/lib/types/NormalToolbar/index.d.ts +0 -6
  123. package/lib/types/config.d.ts +0 -3
  124. package/lib/types/preview.d.ts +0 -6
  125. package/lib/types/util.d.ts +0 -5
@@ -1,10 +1,10 @@
1
- import { a as te, D as lt } from "./chunks/index.mjs";
2
- import { s as at, a as nt, M as We } from "./chunks/index4.mjs";
1
+ import { a as te, D as at } from "./chunks/index.mjs";
2
+ import { s as lt, a as nt, M as We } from "./chunks/index4.mjs";
3
3
  import { C as rt, c as st, a as it, e as ct, b as ut, u as dt, d as mt, f as bt, g as vt, h as gt, i as ht, j as ft, k as pt, M as Tt } from "./chunks/index3.mjs";
4
4
  import wt from "./ModalToolbar.mjs";
5
5
  import yt from "./NormalToolbar.mjs";
6
- import { inject as r, watch as N, nextTick as ie, onMounted as K, ref as I, defineComponent as C, createVNode as l, reactive as Y, toRef as ke, computed as P, Fragment as _e, cloneVNode as ne, createApp as Ct, shallowRef as kt, onBeforeUnmount as he } from "vue";
7
- import { g as Z, p as a, a as $t, M as le, d as xt, b as St } from "./chunks/config.mjs";
6
+ import { inject as r, watch as N, nextTick as ie, onMounted as K, ref as I, defineComponent as C, createVNode as a, reactive as Y, toRef as ke, computed as P, Fragment as _e, cloneVNode as ne, createApp as Ct, shallowRef as kt, onBeforeUnmount as he } from "vue";
7
+ import { g as Z, p as l, a as $t, M as ae, d as xt, b as St } from "./chunks/config.mjs";
8
8
  import { linkTo as It, throttle as Et, createSmoothScroll as ze, draggingScroll as Lt } from "@vavt/util";
9
9
  import { deleteLine as Nt, history as $e, defaultKeymap as At, historyKeymap as Dt, indentWithTab as Rt, undo as Mt, redo as Ft } from "@codemirror/commands";
10
10
  import { markdown as Bt } from "@codemirror/lang-markdown";
@@ -34,7 +34,7 @@ const oo = (e, t, o) => {
34
34
  ), f = u?.querySelector(
35
35
  `[id="${n}-html-wrapper"]`
36
36
  );
37
- (m || f) && ([c, s] = (m ? at : nt)(
37
+ (m || f) && ([c, s] = (m ? lt : nt)(
38
38
  v,
39
39
  m || f,
40
40
  o.value
@@ -55,9 +55,9 @@ const oo = (e, t, o) => {
55
55
  ), K(d);
56
56
  }, ue = async (e, t, o) => {
57
57
  if (/^h[1-6]$/.test(e))
58
- return lo(e, t);
58
+ return ao(e, t);
59
59
  if (e === "prettier")
60
- return await ao(t, o);
60
+ return await lo(t, o);
61
61
  switch (e) {
62
62
  case "bold":
63
63
  case "underline":
@@ -105,7 +105,7 @@ const oo = (e, t, o) => {
105
105
  default:
106
106
  return { text: "", options: {} };
107
107
  }
108
- }, lo = (e, t) => {
108
+ }, ao = (e, t) => {
109
109
  const o = e.slice(1), n = "#".repeat(Number(o)), [i, s, c] = pe(t, {
110
110
  wholeLine: !0
111
111
  });
@@ -113,7 +113,7 @@ const oo = (e, t, o) => {
113
113
  text: `${n} ${i}`,
114
114
  options: { deviationStart: n.length + 1, replaceStart: s, replaceEnd: c }
115
115
  };
116
- }, ao = async (e, t) => {
116
+ }, lo = async (e, t) => {
117
117
  const o = window.prettier || Z.editorExtensions.prettier?.prettierInstance, n = [
118
118
  window.prettierPlugins?.markdown || Z.editorExtensions.prettier?.parserMarkdownInstance
119
119
  ];
@@ -446,7 +446,7 @@ const ho = (e, t) => {
446
446
  N([t], () => {
447
447
  (!o.value || !ho(o.value, t.value)) && (o.value = t.value, e());
448
448
  });
449
- }, ae = (e, t, o, n, i) => (s, c, d, u) => {
449
+ }, le = (e, t, o, n, i) => (s, c, d, u) => {
450
450
  const v = `${e}${t}${o}${n}`, m = d + c.label.length + (i === "title" ? o.length : 0);
451
451
  s.dispatch({
452
452
  changes: { from: d, to: u, insert: v },
@@ -499,7 +499,7 @@ const ho = (e, t) => {
499
499
  ].map((i) => ({
500
500
  label: `${i[0]}${i[1]}`,
501
501
  type: "text",
502
- apply: ae(i[0], i[1], "", i[0] === "`" ? "`" : "\n```", "type")
502
+ apply: le(i[0], i[1], "", i[0] === "`" ? "`" : "\n```", "type")
503
503
  })),
504
504
  // 链接
505
505
  {
@@ -524,12 +524,12 @@ const ho = (e, t) => {
524
524
  {
525
525
  label: "$",
526
526
  type: "text",
527
- apply: ae("$", "", "", "$", "type")
527
+ apply: le("$", "", "", "$", "type")
528
528
  },
529
529
  {
530
530
  label: "$$",
531
531
  type: "text",
532
- apply: ae("$$", "", `
532
+ apply: le("$$", "", `
533
533
  `, `
534
534
  $$`, "title")
535
535
  },
@@ -554,7 +554,7 @@ $$`, "title")
554
554
  ].map((i) => ({
555
555
  label: `!!! ${i}`,
556
556
  type: "text",
557
- apply: ae("!!!", ` ${i}`, " Title", `
557
+ apply: le("!!!", ` ${i}`, " Title", `
558
558
 
559
559
  !!!`, "title")
560
560
  }))
@@ -565,83 +565,87 @@ $$`, "title")
565
565
  override: e ? [t, ...e] : [t]
566
566
  });
567
567
  }, po = /* @__PURE__ */ C({
568
- name: `${a}-divider`,
568
+ name: `${l}-divider`,
569
569
  setup() {
570
- return () => l("div", {
571
- class: `${a}-divider`
570
+ return () => a("div", {
571
+ class: `${l}-divider`
572
572
  }, null);
573
573
  }
574
574
  }), To = /* @__PURE__ */ C({
575
575
  name: "ToolbarBold",
576
576
  setup() {
577
577
  const e = r("editorId"), t = r("usedLanguageText"), o = r("disabled"), n = r("showToolbarName");
578
- return () => l("button", {
579
- class: [`${a}-toolbar-item`, o?.value && `${a}-disabled`],
578
+ return () => a("button", {
579
+ class: [`${l}-toolbar-item`, o?.value && `${l}-disabled`],
580
580
  title: t.value.toolbarTips?.bold,
581
+ "aria-label": t.value.toolbarTips?.bold,
581
582
  disabled: o?.value,
582
583
  onClick: () => {
583
584
  h.emit(e, y, "bold");
584
585
  },
585
586
  type: "button"
586
- }, [l(x, {
587
+ }, [a(x, {
587
588
  name: "bold"
588
- }, null), n?.value && l("div", {
589
- class: `${a}-toolbar-item-name`
589
+ }, null), n?.value && a("div", {
590
+ class: `${l}-toolbar-item-name`
590
591
  }, [t.value.toolbarTips?.bold])]);
591
592
  }
592
593
  }), wo = /* @__PURE__ */ C({
593
594
  name: "ToolbarCatalog",
594
595
  setup() {
595
596
  const e = r("editorId"), t = r("usedLanguageText"), o = r("disabled"), n = r("showToolbarName"), i = r("catalogVisible");
596
- return () => l("button", {
597
- class: [`${a}-toolbar-item`, i.value && `${a}-toolbar-active`, o?.value && `${a}-disabled`],
597
+ return () => a("button", {
598
+ class: [`${l}-toolbar-item`, i.value && `${l}-toolbar-active`, o?.value && `${l}-disabled`],
598
599
  title: t.value.toolbarTips?.catalog,
600
+ "aria-label": t.value.toolbarTips?.catalog,
599
601
  disabled: o?.value,
600
602
  onClick: () => {
601
603
  h.emit(e, Ut);
602
604
  },
603
605
  key: "bar-catalog",
604
606
  type: "button"
605
- }, [l(x, {
607
+ }, [a(x, {
606
608
  name: "catalog"
607
- }, null), n?.value && l("div", {
608
- class: `${a}-toolbar-item-name`
609
+ }, null), n?.value && a("div", {
610
+ class: `${l}-toolbar-item-name`
609
611
  }, [t.value.toolbarTips?.catalog])]);
610
612
  }
611
613
  }), yo = /* @__PURE__ */ C({
612
614
  name: "ToolbarCode",
613
615
  setup() {
614
616
  const e = r("editorId"), t = r("usedLanguageText"), o = r("disabled"), n = r("showToolbarName");
615
- return () => l("button", {
616
- class: [`${a}-toolbar-item`, o?.value && `${a}-disabled`],
617
+ return () => a("button", {
618
+ class: [`${l}-toolbar-item`, o?.value && `${l}-disabled`],
617
619
  title: t.value.toolbarTips?.code,
620
+ "aria-label": t.value.toolbarTips?.code,
618
621
  disabled: o?.value,
619
622
  onClick: () => {
620
623
  h.emit(e, y, "code");
621
624
  },
622
625
  type: "button"
623
- }, [l(x, {
626
+ }, [a(x, {
624
627
  name: "code"
625
- }, null), n?.value && l("div", {
626
- class: `${a}-toolbar-item-name`
628
+ }, null), n?.value && a("div", {
629
+ class: `${l}-toolbar-item-name`
627
630
  }, [t.value.toolbarTips?.code])]);
628
631
  }
629
632
  }), Co = /* @__PURE__ */ C({
630
633
  name: "ToolbarCodeRow",
631
634
  setup() {
632
635
  const e = r("editorId"), t = r("usedLanguageText"), o = r("disabled"), n = r("showToolbarName");
633
- return () => l("button", {
634
- class: [`${a}-toolbar-item`, o?.value && `${a}-disabled`],
636
+ return () => a("button", {
637
+ class: [`${l}-toolbar-item`, o?.value && `${l}-disabled`],
635
638
  title: t.value.toolbarTips?.codeRow,
639
+ "aria-label": t.value.toolbarTips?.codeRow,
636
640
  disabled: o?.value,
637
641
  onClick: () => {
638
642
  h.emit(e, y, "codeRow");
639
643
  },
640
644
  type: "button"
641
- }, [l(x, {
645
+ }, [a(x, {
642
646
  name: "code-row"
643
- }, null), n?.value && l("div", {
644
- class: `${a}-toolbar-item-name`
647
+ }, null), n?.value && a("div", {
648
+ class: `${l}-toolbar-item-name`
645
649
  }, [t.value.toolbarTips?.codeRow])]);
646
650
  }
647
651
  }), ko = /* @__PURE__ */ C({
@@ -649,73 +653,77 @@ $$`, "title")
649
653
  setup() {
650
654
  const e = r("usedLanguageText"), t = r("disabled"), o = r("showToolbarName"), n = r("setting"), {
651
655
  fullscreenHandler: i
652
- } = tl();
653
- return () => l("button", {
654
- class: [`${a}-toolbar-item`, n.value.fullscreen && `${a}-toolbar-active`, t?.value && `${a}-disabled`],
656
+ } = ta();
657
+ return () => a("button", {
658
+ class: [`${l}-toolbar-item`, n.value.fullscreen && `${l}-toolbar-active`, t?.value && `${l}-disabled`],
655
659
  title: e.value.toolbarTips?.fullscreen,
660
+ "aria-label": e.value.toolbarTips?.fullscreen,
656
661
  disabled: t?.value,
657
662
  onClick: () => {
658
663
  i();
659
664
  },
660
665
  type: "button"
661
- }, [l(x, {
666
+ }, [a(x, {
662
667
  name: n.value.fullscreen ? "fullscreen-exit" : "fullscreen"
663
- }, null), o?.value && l("div", {
664
- class: `${a}-toolbar-item-name`
668
+ }, null), o?.value && a("div", {
669
+ class: `${l}-toolbar-item-name`
665
670
  }, [e.value.toolbarTips?.fullscreen])]);
666
671
  }
667
672
  }), $o = /* @__PURE__ */ C({
668
673
  name: "ToolbarGithub",
669
674
  setup() {
670
675
  const e = r("usedLanguageText"), t = r("disabled"), o = r("showToolbarName");
671
- return () => l("button", {
672
- class: [`${a}-toolbar-item`, t?.value && `${a}-disabled`],
676
+ return () => a("button", {
677
+ class: [`${l}-toolbar-item`, t?.value && `${l}-disabled`],
673
678
  title: e.value.toolbarTips?.github,
679
+ "aria-label": e.value.toolbarTips?.github,
674
680
  disabled: t?.value,
675
681
  onClick: () => {
676
682
  It("https://github.com/imzbf/md-editor-v3");
677
683
  },
678
684
  type: "button"
679
- }, [l(x, {
685
+ }, [a(x, {
680
686
  name: "github"
681
- }, null), o?.value && l("div", {
682
- class: `${a}-toolbar-item-name`
687
+ }, null), o?.value && a("div", {
688
+ class: `${l}-toolbar-item-name`
683
689
  }, [e.value.toolbarTips?.github])]);
684
690
  }
685
691
  }), xo = /* @__PURE__ */ C({
686
692
  name: "ToolbarHtmlPreview",
687
693
  setup() {
688
694
  const e = r("usedLanguageText"), t = r("disabled"), o = r("showToolbarName"), n = r("setting"), i = r("updateSetting");
689
- return () => l("button", {
690
- class: [`${a}-toolbar-item`, n.value.htmlPreview && `${a}-toolbar-active`, t?.value && `${a}-disabled`],
695
+ return () => a("button", {
696
+ class: [`${l}-toolbar-item`, n.value.htmlPreview && `${l}-toolbar-active`, t?.value && `${l}-disabled`],
691
697
  title: e.value.toolbarTips?.htmlPreview,
698
+ "aria-label": e.value.toolbarTips?.htmlPreview,
692
699
  disabled: t?.value,
693
700
  onClick: () => {
694
701
  i("htmlPreview");
695
702
  },
696
703
  type: "button"
697
- }, [l(x, {
704
+ }, [a(x, {
698
705
  name: "preview-html"
699
- }, null), o?.value && l("div", {
700
- class: `${a}-toolbar-item-name`
706
+ }, null), o?.value && a("div", {
707
+ class: `${l}-toolbar-item-name`
701
708
  }, [e.value.toolbarTips?.htmlPreview])]);
702
709
  }
703
710
  }), So = /* @__PURE__ */ C({
704
711
  name: "ToolbarImage",
705
712
  setup() {
706
713
  const e = r("editorId"), t = r("usedLanguageText"), o = r("disabled"), n = r("showToolbarName");
707
- return () => l("button", {
708
- class: [`${a}-toolbar-item`, o?.value && `${a}-disabled`],
714
+ return () => a("button", {
715
+ class: [`${l}-toolbar-item`, o?.value && `${l}-disabled`],
709
716
  title: t.value.toolbarTips?.image,
717
+ "aria-label": t.value.toolbarTips?.image,
710
718
  disabled: o?.value,
711
719
  onClick: () => {
712
720
  h.emit(e, y, "image");
713
721
  },
714
722
  type: "button"
715
- }, [l(x, {
723
+ }, [a(x, {
716
724
  name: "image"
717
- }, null), n?.value && l("div", {
718
- class: `${a}-toolbar-item-name`
725
+ }, null), n?.value && a("div", {
726
+ class: `${l}-toolbar-item-name`
719
727
  }, [t.value.toolbarTips?.image])]);
720
728
  }
721
729
  }), Io = {
@@ -734,7 +742,7 @@ $$`, "title")
734
742
  }
735
743
  }
736
744
  }, Eo = /* @__PURE__ */ C({
737
- name: `${a}-modal-clip`,
745
+ name: `${l}-modal-clip`,
738
746
  props: Io,
739
747
  setup(e) {
740
748
  const t = r("usedLanguageText"), o = r("editorId"), n = r("rootRef");
@@ -770,7 +778,7 @@ $$`, "title")
770
778
  u.imgSrc && ie(() => {
771
779
  v?.destroy(), d.value.style = "", c.value && (v = new i(c.value, {
772
780
  viewMode: 2,
773
- preview: n.value.getRootNode().querySelector(`.${a}-clip-preview-target`)
781
+ preview: n.value.getRootNode().querySelector(`.${l}-clip-preview-target`)
774
782
  // aspectRatio: 16 / 9,
775
783
  }));
776
784
  });
@@ -780,8 +788,8 @@ $$`, "title")
780
788
  }, f = (g) => {
781
789
  u.isFullscreen = g;
782
790
  };
783
- return () => l(Qt, {
784
- class: `${a}-modal-clip`,
791
+ return () => a(Qt, {
792
+ class: `${l}-modal-clip`,
785
793
  title: t.value.clipModalTips?.title,
786
794
  visible: e.visible,
787
795
  onClose: e.onCancel,
@@ -791,43 +799,43 @@ $$`, "title")
791
799
  width: "668px",
792
800
  height: "421px"
793
801
  }, {
794
- default: () => [l("div", {
795
- class: `${a}-form-item ${a}-clip`
796
- }, [l("div", {
797
- class: `${a}-clip-main`
798
- }, [u.imgSelected ? l("div", {
799
- class: `${a}-clip-cropper`
800
- }, [l("img", {
802
+ default: () => [a("div", {
803
+ class: `${l}-form-item ${l}-clip`
804
+ }, [a("div", {
805
+ class: `${l}-clip-main`
806
+ }, [u.imgSelected ? a("div", {
807
+ class: `${l}-clip-cropper`
808
+ }, [a("img", {
801
809
  src: u.imgSrc,
802
810
  ref: c,
803
811
  style: {
804
812
  display: "none"
805
813
  },
806
814
  alt: ""
807
- }, null), l("div", {
808
- class: `${a}-clip-delete`,
815
+ }, null), a("div", {
816
+ class: `${l}-clip-delete`,
809
817
  onClick: m
810
- }, [l(x, {
818
+ }, [a(x, {
811
819
  name: "delete"
812
- }, null)])]) : l("div", {
813
- class: `${a}-clip-upload`,
820
+ }, null)])]) : a("div", {
821
+ class: `${l}-clip-upload`,
814
822
  onClick: () => {
815
823
  s.value.click();
816
824
  },
817
825
  role: "button",
818
826
  tabindex: "0",
819
827
  "aria-label": t.value.imgTitleItem?.upload
820
- }, [l(x, {
828
+ }, [a(x, {
821
829
  name: "upload"
822
- }, null)])]), l("div", {
823
- class: `${a}-clip-preview`
824
- }, [l("div", {
825
- class: `${a}-clip-preview-target`,
830
+ }, null)])]), a("div", {
831
+ class: `${l}-clip-preview`
832
+ }, [a("div", {
833
+ class: `${l}-clip-preview-target`,
826
834
  ref: d
827
- }, null)])]), l("div", {
828
- class: `${a}-form-item`
829
- }, [l("button", {
830
- class: `${a}-btn`,
835
+ }, null)])]), a("div", {
836
+ class: `${l}-form-item`
837
+ }, [a("button", {
838
+ class: `${l}-btn`,
831
839
  type: "button",
832
840
  onClick: () => {
833
841
  if (v) {
@@ -835,7 +843,7 @@ $$`, "title")
835
843
  h.emit(o, fe, [eo(g.toDataURL("image/png"))], e.onOk), m();
836
844
  }
837
845
  }
838
- }, [t.value.clipModalTips?.buttonUpload || t.value.linkModalTips?.buttonOK])]), l("input", {
846
+ }, [t.value.clipModalTips?.buttonUpload || t.value.linkModalTips?.buttonOK])]), a("input", {
839
847
  ref: s,
840
848
  accept: "image/*",
841
849
  type: "file",
@@ -863,10 +871,10 @@ $$`, "title")
863
871
  }
864
872
  }
865
873
  }, No = /* @__PURE__ */ C({
866
- name: `${a}-modals`,
874
+ name: `${l}-modals`,
867
875
  props: Lo,
868
876
  setup(e) {
869
- return () => l(Eo, {
877
+ return () => a(Eo, {
870
878
  visible: e.clipVisible,
871
879
  onOk: e.onOk,
872
880
  onCancel: e.onCancel
@@ -893,41 +901,41 @@ $$`, "title")
893
901
  url: k.url,
894
902
  transform: !0
895
903
  }), c.value = !1;
896
- }, p = P(() => l("ul", {
897
- class: `${a}-menu`,
904
+ }, p = P(() => a("ul", {
905
+ class: `${l}-menu`,
898
906
  onClick: () => {
899
907
  s.value = !1;
900
908
  },
901
909
  role: "menu"
902
- }, [l("li", {
903
- class: `${a}-menu-item ${a}-menu-item-image`,
910
+ }, [a("li", {
911
+ class: `${l}-menu-item ${l}-menu-item-image`,
904
912
  onClick: () => {
905
913
  v("image");
906
914
  },
907
915
  role: "menuitem",
908
916
  tabindex: "0"
909
- }, [t.value.imgTitleItem?.link]), l("li", {
910
- class: `${a}-menu-item ${a}-menu-item-image`,
917
+ }, [t.value.imgTitleItem?.link]), a("li", {
918
+ class: `${l}-menu-item ${l}-menu-item-image`,
911
919
  onClick: () => {
912
920
  d.value.click();
913
921
  },
914
922
  role: "menuitem",
915
923
  tabindex: "0"
916
- }, [t.value.imgTitleItem?.upload]), l("li", {
917
- class: `${a}-menu-item ${a}-menu-item-image`,
924
+ }, [t.value.imgTitleItem?.upload]), a("li", {
925
+ class: `${l}-menu-item ${l}-menu-item-image`,
918
926
  onClick: () => {
919
927
  c.value = !0;
920
928
  },
921
929
  role: "menuitem",
922
930
  tabindex: "0"
923
931
  }, [t.value.imgTitleItem?.clip2upload])]));
924
- return () => l(_e, null, [l("label", {
932
+ return () => a(_e, null, [a("label", {
925
933
  for: `${i}_label`,
926
934
  style: {
927
935
  display: "none"
928
936
  },
929
937
  "aria-label": t.value.imgTitleItem?.upload
930
- }, null), l("input", {
938
+ }, null), a("input", {
931
939
  id: `${i}_label`,
932
940
  ref: d,
933
941
  accept: "image/*",
@@ -936,24 +944,25 @@ $$`, "title")
936
944
  style: {
937
945
  display: "none"
938
946
  }
939
- }, null), l(te, {
947
+ }, null), a(te, {
940
948
  relative: `#${i}`,
941
949
  visible: s.value,
942
950
  onChange: m,
943
951
  disabled: o?.value,
944
952
  overlay: p.value
945
953
  }, {
946
- default: () => [l("button", {
947
- class: [`${a}-toolbar-item`, o?.value && `${a}-disabled`],
954
+ default: () => [a("button", {
955
+ class: [`${l}-toolbar-item`, o?.value && `${l}-disabled`],
948
956
  title: t.value.toolbarTips?.image,
957
+ "aria-label": t.value.toolbarTips?.image,
949
958
  disabled: o?.value,
950
959
  type: "button"
951
- }, [l(x, {
960
+ }, [a(x, {
952
961
  name: "image"
953
- }, null), n?.value && l("div", {
954
- class: `${a}-toolbar-item-name`
962
+ }, null), n?.value && a("div", {
963
+ class: `${l}-toolbar-item-name`
955
964
  }, [t.value.toolbarTips?.image])])]
956
- }), l(No, {
965
+ }), a(No, {
957
966
  clipVisible: c.value,
958
967
  onCancel: f,
959
968
  onOk: g
@@ -963,18 +972,19 @@ $$`, "title")
963
972
  name: "ToolbarItalic",
964
973
  setup() {
965
974
  const e = r("editorId"), t = r("usedLanguageText"), o = r("disabled"), n = r("showToolbarName");
966
- return () => l("button", {
967
- class: [`${a}-toolbar-item`, o?.value && `${a}-disabled`],
975
+ return () => a("button", {
976
+ class: [`${l}-toolbar-item`, o?.value && `${l}-disabled`],
968
977
  title: t.value.toolbarTips?.italic,
978
+ "aria-label": t.value.toolbarTips?.italic,
969
979
  disabled: o?.value,
970
980
  onClick: () => {
971
981
  h.emit(e, y, "italic");
972
982
  },
973
983
  type: "button"
974
- }, [l(x, {
984
+ }, [a(x, {
975
985
  name: "italic"
976
- }, null), n?.value && l("div", {
977
- class: `${a}-toolbar-item-name`
986
+ }, null), n?.value && a("div", {
987
+ class: `${l}-toolbar-item-name`
978
988
  }, [t.value.toolbarTips?.italic])]);
979
989
  }
980
990
  }), Ro = /* @__PURE__ */ C({
@@ -984,28 +994,28 @@ $$`, "title")
984
994
  o?.value || h.emit(e, y, v);
985
995
  }, d = (v) => {
986
996
  s.value = v;
987
- }, u = P(() => l("ul", {
988
- class: `${a}-menu`,
997
+ }, u = P(() => a("ul", {
998
+ class: `${l}-menu`,
989
999
  onClick: () => {
990
1000
  s.value = !1;
991
1001
  },
992
1002
  role: "menu"
993
- }, [l("li", {
994
- class: `${a}-menu-item ${a}-menu-item-katex`,
1003
+ }, [a("li", {
1004
+ class: `${l}-menu-item ${l}-menu-item-katex`,
995
1005
  onClick: () => {
996
1006
  c("katexInline");
997
1007
  },
998
1008
  role: "menuitem",
999
1009
  tabindex: "0"
1000
- }, [t.value.katex?.inline]), l("li", {
1001
- class: `${a}-menu-item ${a}-menu-item-katex`,
1010
+ }, [t.value.katex?.inline]), a("li", {
1011
+ class: `${l}-menu-item ${l}-menu-item-katex`,
1002
1012
  onClick: () => {
1003
1013
  c("katexBlock");
1004
1014
  },
1005
1015
  role: "menuitem",
1006
1016
  tabindex: "0"
1007
1017
  }, [t.value.katex?.block])]));
1008
- return () => l(te, {
1018
+ return () => a(te, {
1009
1019
  relative: `#${i}`,
1010
1020
  visible: s.value,
1011
1021
  onChange: d,
@@ -1013,15 +1023,16 @@ $$`, "title")
1013
1023
  overlay: u.value,
1014
1024
  key: "bar-katex"
1015
1025
  }, {
1016
- default: () => [l("button", {
1017
- class: [`${a}-toolbar-item`, o?.value && `${a}-disabled`],
1026
+ default: () => [a("button", {
1027
+ class: [`${l}-toolbar-item`, o?.value && `${l}-disabled`],
1018
1028
  title: t.value.toolbarTips?.katex,
1029
+ "aria-label": t.value.toolbarTips?.katex,
1019
1030
  disabled: o?.value,
1020
1031
  type: "button"
1021
- }, [l(x, {
1032
+ }, [a(x, {
1022
1033
  name: "formula"
1023
- }, null), n?.value && l("div", {
1024
- class: `${a}-toolbar-item-name`
1034
+ }, null), n?.value && a("div", {
1035
+ class: `${l}-toolbar-item-name`
1025
1036
  }, [t.value.toolbarTips?.katex])])]
1026
1037
  });
1027
1038
  }
@@ -1029,18 +1040,19 @@ $$`, "title")
1029
1040
  name: "ToolbarLink",
1030
1041
  setup() {
1031
1042
  const e = r("editorId"), t = r("usedLanguageText"), o = r("disabled"), n = r("showToolbarName");
1032
- return () => l("button", {
1033
- class: [`${a}-toolbar-item`, o?.value && `${a}-disabled`],
1043
+ return () => a("button", {
1044
+ class: [`${l}-toolbar-item`, o?.value && `${l}-disabled`],
1034
1045
  title: t.value.toolbarTips?.link,
1046
+ "aria-label": t.value.toolbarTips?.link,
1035
1047
  disabled: o?.value,
1036
1048
  onClick: () => {
1037
1049
  h.emit(e, y, "link");
1038
1050
  },
1039
1051
  type: "button"
1040
- }, [l(x, {
1052
+ }, [a(x, {
1041
1053
  name: "link"
1042
- }, null), n?.value && l("div", {
1043
- class: `${a}-toolbar-item-name`
1054
+ }, null), n?.value && a("div", {
1055
+ class: `${l}-toolbar-item-name`
1044
1056
  }, [t.value.toolbarTips?.link])]);
1045
1057
  }
1046
1058
  }), Fo = /* @__PURE__ */ C({
@@ -1050,70 +1062,70 @@ $$`, "title")
1050
1062
  o?.value || h.emit(e, y, v);
1051
1063
  }, d = (v) => {
1052
1064
  s.value = v;
1053
- }, u = P(() => l("ul", {
1054
- class: `${a}-menu`,
1065
+ }, u = P(() => a("ul", {
1066
+ class: `${l}-menu`,
1055
1067
  onClick: () => {
1056
1068
  s.value = !1;
1057
1069
  },
1058
1070
  role: "menu"
1059
- }, [l("li", {
1060
- class: `${a}-menu-item ${a}-menu-item-mermaid`,
1071
+ }, [a("li", {
1072
+ class: `${l}-menu-item ${l}-menu-item-mermaid`,
1061
1073
  onClick: () => {
1062
1074
  c("flow");
1063
1075
  },
1064
1076
  role: "menuitem",
1065
1077
  tabindex: "0"
1066
- }, [t.value.mermaid?.flow]), l("li", {
1067
- class: `${a}-menu-item ${a}-menu-item-mermaid`,
1078
+ }, [t.value.mermaid?.flow]), a("li", {
1079
+ class: `${l}-menu-item ${l}-menu-item-mermaid`,
1068
1080
  onClick: () => {
1069
1081
  c("sequence");
1070
1082
  },
1071
1083
  role: "menuitem",
1072
1084
  tabindex: "0"
1073
- }, [t.value.mermaid?.sequence]), l("li", {
1074
- class: `${a}-menu-item ${a}-menu-item-mermaid`,
1085
+ }, [t.value.mermaid?.sequence]), a("li", {
1086
+ class: `${l}-menu-item ${l}-menu-item-mermaid`,
1075
1087
  onClick: () => {
1076
1088
  c("gantt");
1077
1089
  },
1078
1090
  role: "menuitem",
1079
1091
  tabindex: "0"
1080
- }, [t.value.mermaid?.gantt]), l("li", {
1081
- class: `${a}-menu-item ${a}-menu-item-mermaid`,
1092
+ }, [t.value.mermaid?.gantt]), a("li", {
1093
+ class: `${l}-menu-item ${l}-menu-item-mermaid`,
1082
1094
  onClick: () => {
1083
1095
  c("class");
1084
1096
  },
1085
1097
  role: "menuitem",
1086
1098
  tabindex: "0"
1087
- }, [t.value.mermaid?.class]), l("li", {
1088
- class: `${a}-menu-item ${a}-menu-item-mermaid`,
1099
+ }, [t.value.mermaid?.class]), a("li", {
1100
+ class: `${l}-menu-item ${l}-menu-item-mermaid`,
1089
1101
  onClick: () => {
1090
1102
  c("state");
1091
1103
  },
1092
1104
  role: "menuitem",
1093
1105
  tabindex: "0"
1094
- }, [t.value.mermaid?.state]), l("li", {
1095
- class: `${a}-menu-item ${a}-menu-item-mermaid`,
1106
+ }, [t.value.mermaid?.state]), a("li", {
1107
+ class: `${l}-menu-item ${l}-menu-item-mermaid`,
1096
1108
  onClick: () => {
1097
1109
  c("pie");
1098
1110
  },
1099
1111
  role: "menuitem",
1100
1112
  tabindex: "0"
1101
- }, [t.value.mermaid?.pie]), l("li", {
1102
- class: `${a}-menu-item ${a}-menu-item-mermaid`,
1113
+ }, [t.value.mermaid?.pie]), a("li", {
1114
+ class: `${l}-menu-item ${l}-menu-item-mermaid`,
1103
1115
  onClick: () => {
1104
1116
  c("relationship");
1105
1117
  },
1106
1118
  role: "menuitem",
1107
1119
  tabindex: "0"
1108
- }, [t.value.mermaid?.relationship]), l("li", {
1109
- class: `${a}-menu-item ${a}-menu-item-mermaid`,
1120
+ }, [t.value.mermaid?.relationship]), a("li", {
1121
+ class: `${l}-menu-item ${l}-menu-item-mermaid`,
1110
1122
  onClick: () => {
1111
1123
  c("journey");
1112
1124
  },
1113
1125
  role: "menuitem",
1114
1126
  tabindex: "0"
1115
1127
  }, [t.value.mermaid?.journey])]));
1116
- return () => l(te, {
1128
+ return () => a(te, {
1117
1129
  relative: `#${i}`,
1118
1130
  visible: s.value,
1119
1131
  onChange: d,
@@ -1121,15 +1133,16 @@ $$`, "title")
1121
1133
  overlay: u.value,
1122
1134
  key: "bar-mermaid"
1123
1135
  }, {
1124
- default: () => [l("button", {
1125
- class: [`${a}-toolbar-item`, o?.value && `${a}-disabled`],
1136
+ default: () => [a("button", {
1137
+ class: [`${l}-toolbar-item`, o?.value && `${l}-disabled`],
1126
1138
  title: t.value.toolbarTips?.mermaid,
1139
+ "aria-label": t.value.toolbarTips?.mermaid,
1127
1140
  disabled: o?.value,
1128
1141
  type: "button"
1129
- }, [l(x, {
1142
+ }, [a(x, {
1130
1143
  name: "mermaid"
1131
- }, null), n?.value && l("div", {
1132
- class: `${a}-toolbar-item-name`
1144
+ }, null), n?.value && a("div", {
1145
+ class: `${l}-toolbar-item-name`
1133
1146
  }, [t.value.toolbarTips?.mermaid])])]
1134
1147
  });
1135
1148
  }
@@ -1137,216 +1150,228 @@ $$`, "title")
1137
1150
  name: "ToolbarNext",
1138
1151
  setup() {
1139
1152
  const e = r("editorId"), t = r("usedLanguageText"), o = r("disabled"), n = r("showToolbarName");
1140
- return () => l("button", {
1141
- class: [`${a}-toolbar-item`, o?.value && `${a}-disabled`],
1153
+ return () => a("button", {
1154
+ class: [`${l}-toolbar-item`, o?.value && `${l}-disabled`],
1142
1155
  title: t.value.toolbarTips?.next,
1156
+ "aria-label": t.value.toolbarTips?.next,
1143
1157
  disabled: o?.value,
1144
1158
  onClick: () => {
1145
1159
  h.emit(e, Ue);
1146
1160
  },
1147
1161
  type: "button"
1148
- }, [l(x, {
1162
+ }, [a(x, {
1149
1163
  name: "next"
1150
- }, null), n?.value && l("div", {
1151
- class: `${a}-toolbar-item-name`
1164
+ }, null), n?.value && a("div", {
1165
+ class: `${l}-toolbar-item-name`
1152
1166
  }, [t.value.toolbarTips?.next])]);
1153
1167
  }
1154
1168
  }), Po = /* @__PURE__ */ C({
1155
1169
  name: "ToolbarOrderedList",
1156
1170
  setup() {
1157
1171
  const e = r("editorId"), t = r("usedLanguageText"), o = r("disabled"), n = r("showToolbarName");
1158
- return () => l("button", {
1159
- class: [`${a}-toolbar-item`, o?.value && `${a}-disabled`],
1172
+ return () => a("button", {
1173
+ class: [`${l}-toolbar-item`, o?.value && `${l}-disabled`],
1160
1174
  title: t.value.toolbarTips?.orderedList,
1175
+ "aria-label": t.value.toolbarTips?.orderedList,
1161
1176
  disabled: o?.value,
1162
1177
  onClick: () => {
1163
1178
  h.emit(e, y, "orderedList");
1164
1179
  },
1165
1180
  type: "button"
1166
- }, [l(x, {
1181
+ }, [a(x, {
1167
1182
  name: "ordered-list"
1168
- }, null), n?.value && l("div", {
1169
- class: `${a}-toolbar-item-name`
1183
+ }, null), n?.value && a("div", {
1184
+ class: `${l}-toolbar-item-name`
1170
1185
  }, [t.value.toolbarTips?.orderedList])]);
1171
1186
  }
1172
1187
  }), Ho = /* @__PURE__ */ C({
1173
1188
  name: "ToolbarPageFullscreen",
1174
1189
  setup() {
1175
1190
  const e = r("usedLanguageText"), t = r("disabled"), o = r("showToolbarName"), n = r("setting"), i = r("updateSetting");
1176
- return () => l("button", {
1177
- class: [`${a}-toolbar-item`, n.value.pageFullscreen && `${a}-toolbar-active`, t?.value && `${a}-disabled`],
1191
+ return () => a("button", {
1192
+ class: [`${l}-toolbar-item`, n.value.pageFullscreen && `${l}-toolbar-active`, t?.value && `${l}-disabled`],
1178
1193
  title: e.value.toolbarTips?.pageFullscreen,
1194
+ "aria-label": e.value.toolbarTips?.pageFullscreen,
1179
1195
  disabled: t?.value,
1180
1196
  onClick: () => {
1181
1197
  i("pageFullscreen");
1182
1198
  },
1183
1199
  type: "button"
1184
- }, [l(x, {
1200
+ }, [a(x, {
1185
1201
  name: n.value.pageFullscreen ? "minimize" : "maximize"
1186
- }, null), o?.value && l("div", {
1187
- class: `${a}-toolbar-item-name`
1202
+ }, null), o?.value && a("div", {
1203
+ class: `${l}-toolbar-item-name`
1188
1204
  }, [e.value.toolbarTips?.pageFullscreen])]);
1189
1205
  }
1190
1206
  }), Oo = /* @__PURE__ */ C({
1191
1207
  name: "ToolbarPrettier",
1192
1208
  setup() {
1193
1209
  const e = r("editorId"), t = r("usedLanguageText"), o = r("disabled"), n = r("showToolbarName");
1194
- return () => l("button", {
1195
- class: [`${a}-toolbar-item`, o?.value && `${a}-disabled`],
1210
+ return () => a("button", {
1211
+ class: [`${l}-toolbar-item`, o?.value && `${l}-disabled`],
1196
1212
  title: t.value.toolbarTips?.prettier,
1213
+ "aria-label": t.value.toolbarTips?.prettier,
1197
1214
  disabled: o?.value,
1198
1215
  onClick: () => {
1199
1216
  h.emit(e, y, "prettier");
1200
1217
  },
1201
1218
  type: "button"
1202
- }, [l(x, {
1219
+ }, [a(x, {
1203
1220
  name: "prettier"
1204
- }, null), n?.value && l("div", {
1205
- class: `${a}-toolbar-item-name`
1221
+ }, null), n?.value && a("div", {
1222
+ class: `${l}-toolbar-item-name`
1206
1223
  }, [t.value.toolbarTips?.prettier])]);
1207
1224
  }
1208
1225
  }), Vo = /* @__PURE__ */ C({
1209
1226
  name: "ToolbarPreview",
1210
1227
  setup() {
1211
1228
  const e = r("usedLanguageText"), t = r("disabled"), o = r("showToolbarName"), n = r("setting"), i = r("updateSetting");
1212
- return () => l("button", {
1213
- class: [`${a}-toolbar-item`, n.value.preview && `${a}-toolbar-active`, t?.value && `${a}-disabled`],
1229
+ return () => a("button", {
1230
+ class: [`${l}-toolbar-item`, n.value.preview && `${l}-toolbar-active`, t?.value && `${l}-disabled`],
1214
1231
  title: e.value.toolbarTips?.preview,
1232
+ "aria-label": e.value.toolbarTips?.preview,
1215
1233
  disabled: t?.value,
1216
1234
  onClick: () => {
1217
1235
  i("preview");
1218
1236
  },
1219
1237
  type: "button"
1220
- }, [l(x, {
1238
+ }, [a(x, {
1221
1239
  name: "preview"
1222
- }, null), o?.value && l("div", {
1223
- class: `${a}-toolbar-item-name`
1240
+ }, null), o?.value && a("div", {
1241
+ class: `${l}-toolbar-item-name`
1224
1242
  }, [e.value.toolbarTips?.preview])]);
1225
1243
  }
1226
1244
  }), Wo = /* @__PURE__ */ C({
1227
1245
  name: "ToolbarPreviewOnly",
1228
1246
  setup() {
1229
1247
  const e = r("usedLanguageText"), t = r("disabled"), o = r("showToolbarName"), n = r("setting"), i = r("updateSetting");
1230
- return () => l("button", {
1231
- class: [`${a}-toolbar-item`, n.value.previewOnly && `${a}-toolbar-active`, t?.value && `${a}-disabled`],
1248
+ return () => a("button", {
1249
+ class: [`${l}-toolbar-item`, n.value.previewOnly && `${l}-toolbar-active`, t?.value && `${l}-disabled`],
1232
1250
  title: e.value.toolbarTips?.previewOnly,
1251
+ "aria-label": e.value.toolbarTips?.previewOnly,
1233
1252
  disabled: t?.value,
1234
1253
  onClick: () => {
1235
1254
  i("previewOnly");
1236
1255
  },
1237
1256
  type: "button"
1238
- }, [l(x, {
1257
+ }, [a(x, {
1239
1258
  name: "preview-only"
1240
- }, null), o?.value && l("div", {
1241
- class: `${a}-toolbar-item-name`
1259
+ }, null), o?.value && a("div", {
1260
+ class: `${l}-toolbar-item-name`
1242
1261
  }, [e.value.toolbarTips?.previewOnly])]);
1243
1262
  }
1244
1263
  }), _o = /* @__PURE__ */ C({
1245
1264
  name: "ToolbarQuote",
1246
1265
  setup() {
1247
1266
  const e = r("editorId"), t = r("usedLanguageText"), o = r("disabled"), n = r("showToolbarName");
1248
- return () => l("button", {
1249
- class: [`${a}-toolbar-item`, o?.value && `${a}-disabled`],
1267
+ return () => a("button", {
1268
+ class: [`${l}-toolbar-item`, o?.value && `${l}-disabled`],
1250
1269
  title: t.value.toolbarTips?.quote,
1270
+ "aria-label": t.value.toolbarTips?.quote,
1251
1271
  disabled: o?.value,
1252
1272
  onClick: () => {
1253
1273
  h.emit(e, y, "quote");
1254
1274
  },
1255
1275
  type: "button"
1256
- }, [l(x, {
1276
+ }, [a(x, {
1257
1277
  name: "quote"
1258
- }, null), n?.value && l("div", {
1259
- class: `${a}-toolbar-item-name`
1278
+ }, null), n?.value && a("div", {
1279
+ class: `${l}-toolbar-item-name`
1260
1280
  }, [t.value.toolbarTips?.quote])]);
1261
1281
  }
1262
1282
  }), zo = /* @__PURE__ */ C({
1263
1283
  name: "ToolbarRevoke",
1264
1284
  setup() {
1265
1285
  const e = r("editorId"), t = r("usedLanguageText"), o = r("disabled"), n = r("showToolbarName");
1266
- return () => l("button", {
1267
- class: [`${a}-toolbar-item`, o?.value && `${a}-disabled`],
1286
+ return () => a("button", {
1287
+ class: [`${l}-toolbar-item`, o?.value && `${l}-disabled`],
1268
1288
  title: t.value.toolbarTips?.revoke,
1289
+ "aria-label": t.value.toolbarTips?.revoke,
1269
1290
  disabled: o?.value,
1270
1291
  onClick: () => {
1271
1292
  h.emit(e, Ke);
1272
1293
  },
1273
1294
  type: "button"
1274
- }, [l(x, {
1295
+ }, [a(x, {
1275
1296
  name: "revoke"
1276
- }, null), n?.value && l("div", {
1277
- class: `${a}-toolbar-item-name`
1297
+ }, null), n?.value && a("div", {
1298
+ class: `${l}-toolbar-item-name`
1278
1299
  }, [t.value.toolbarTips?.revoke])]);
1279
1300
  }
1280
1301
  }), qo = /* @__PURE__ */ C({
1281
1302
  name: "ToolbarSave",
1282
1303
  setup() {
1283
1304
  const e = r("editorId"), t = r("usedLanguageText"), o = r("disabled"), n = r("showToolbarName");
1284
- return () => l("button", {
1285
- class: [`${a}-toolbar-item`, o?.value && `${a}-disabled`],
1305
+ return () => a("button", {
1306
+ class: [`${l}-toolbar-item`, o?.value && `${l}-disabled`],
1286
1307
  title: t.value.toolbarTips?.save,
1308
+ "aria-label": t.value.toolbarTips?.save,
1287
1309
  disabled: o?.value,
1288
1310
  onClick: () => {
1289
1311
  h.emit(e, Ge);
1290
1312
  },
1291
1313
  type: "button"
1292
- }, [l(x, {
1314
+ }, [a(x, {
1293
1315
  name: "save"
1294
- }, null), n?.value && l("div", {
1295
- class: `${a}-toolbar-item-name`
1316
+ }, null), n?.value && a("div", {
1317
+ class: `${l}-toolbar-item-name`
1296
1318
  }, [t.value.toolbarTips?.save])]);
1297
1319
  }
1298
1320
  }), Uo = /* @__PURE__ */ C({
1299
1321
  name: "ToolbarStrikeThrough",
1300
1322
  setup() {
1301
1323
  const e = r("editorId"), t = r("usedLanguageText"), o = r("disabled"), n = r("showToolbarName");
1302
- return () => l("button", {
1303
- class: [`${a}-toolbar-item`, o?.value && `${a}-disabled`],
1324
+ return () => a("button", {
1325
+ class: [`${l}-toolbar-item`, o?.value && `${l}-disabled`],
1304
1326
  title: t.value.toolbarTips?.strikeThrough,
1327
+ "aria-label": t.value.toolbarTips?.strikeThrough,
1305
1328
  disabled: o?.value,
1306
1329
  onClick: () => {
1307
1330
  h.emit(e, y, "strikeThrough");
1308
1331
  },
1309
1332
  type: "button"
1310
- }, [l(x, {
1333
+ }, [a(x, {
1311
1334
  name: "strike-through"
1312
- }, null), n?.value && l("div", {
1313
- class: `${a}-toolbar-item-name`
1335
+ }, null), n?.value && a("div", {
1336
+ class: `${l}-toolbar-item-name`
1314
1337
  }, [t.value.toolbarTips?.strikeThrough])]);
1315
1338
  }
1316
1339
  }), Ko = /* @__PURE__ */ C({
1317
1340
  name: "ToolbarSub",
1318
1341
  setup() {
1319
1342
  const e = r("editorId"), t = r("usedLanguageText"), o = r("disabled"), n = r("showToolbarName");
1320
- return () => l("button", {
1321
- class: [`${a}-toolbar-item`, o?.value && `${a}-disabled`],
1343
+ return () => a("button", {
1344
+ class: [`${l}-toolbar-item`, o?.value && `${l}-disabled`],
1322
1345
  title: t.value.toolbarTips?.sub,
1346
+ "aria-label": t.value.toolbarTips?.sub,
1323
1347
  disabled: o?.value,
1324
1348
  onClick: () => {
1325
1349
  h.emit(e, y, "sub");
1326
1350
  },
1327
1351
  type: "button"
1328
- }, [l(x, {
1352
+ }, [a(x, {
1329
1353
  name: "sub"
1330
- }, null), n?.value && l("div", {
1331
- class: `${a}-toolbar-item-name`
1354
+ }, null), n?.value && a("div", {
1355
+ class: `${l}-toolbar-item-name`
1332
1356
  }, [t.value.toolbarTips?.sub])]);
1333
1357
  }
1334
1358
  }), Go = /* @__PURE__ */ C({
1335
1359
  name: "ToolbarSup",
1336
1360
  setup() {
1337
1361
  const e = r("editorId"), t = r("usedLanguageText"), o = r("disabled"), n = r("showToolbarName");
1338
- return () => l("button", {
1339
- class: [`${a}-toolbar-item`, o?.value && `${a}-disabled`],
1362
+ return () => a("button", {
1363
+ class: [`${l}-toolbar-item`, o?.value && `${l}-disabled`],
1340
1364
  title: t.value.toolbarTips?.sup,
1365
+ "aria-label": t.value.toolbarTips?.sup,
1341
1366
  disabled: o?.value,
1342
1367
  onClick: () => {
1343
1368
  h.emit(e, y, "sup");
1344
1369
  },
1345
1370
  type: "button"
1346
- }, [l(x, {
1371
+ }, [a(x, {
1347
1372
  name: "sup"
1348
- }, null), n?.value && l("div", {
1349
- class: `${a}-toolbar-item-name`
1373
+ }, null), n?.value && a("div", {
1374
+ class: `${l}-toolbar-item-name`
1350
1375
  }, [t.value.toolbarTips?.sup])]);
1351
1376
  }
1352
1377
  }), jo = {
@@ -1372,16 +1397,16 @@ $$`, "title")
1372
1397
  }, i = I(n());
1373
1398
  return N([o], () => {
1374
1399
  i.value = n();
1375
- }), () => l("div", {
1376
- class: `${a}-table-shape`,
1400
+ }), () => a("div", {
1401
+ class: `${l}-table-shape`,
1377
1402
  onMouseleave: () => {
1378
1403
  i.value = n(), t.x = -1, t.y = -1;
1379
1404
  }
1380
- }, [new Array(i.value[1]).fill("").map((s, c) => l("div", {
1381
- class: `${a}-table-shape-row`,
1405
+ }, [new Array(i.value[1]).fill("").map((s, c) => a("div", {
1406
+ class: `${l}-table-shape-row`,
1382
1407
  key: `table-shape-row-${c}`
1383
- }, [new Array(i.value[0]).fill("").map((d, u) => l("div", {
1384
- class: `${a}-table-shape-col`,
1408
+ }, [new Array(i.value[0]).fill("").map((d, u) => a("div", {
1409
+ class: `${l}-table-shape-col`,
1385
1410
  key: `table-shape-col-${u}`,
1386
1411
  onMouseenter: () => {
1387
1412
  t.x = c, t.y = u, u + 1 === i.value[0] && u + 1 < i.value[2] ? i.value[0]++ : u + 2 < i.value[0] && i.value[0] > e.tableShape[0] && i.value[0]--, c + 1 === i.value[1] && c + 1 < i.value[3] ? i.value[1]++ : c + 2 < i.value[1] && i.value[1] > e.tableShape[1] && i.value[1]--;
@@ -1389,8 +1414,8 @@ $$`, "title")
1389
1414
  onClick: () => {
1390
1415
  e.onSelected(t);
1391
1416
  }
1392
- }, [l("div", {
1393
- class: [`${a}-table-shape-col-default`, c <= t.x && u <= t.y && `${a}-table-shape-col-include`]
1417
+ }, [a("div", {
1418
+ class: [`${l}-table-shape-col-default`, c <= t.x && u <= t.y && `${l}-table-shape-col-include`]
1394
1419
  }, null)]))]))]);
1395
1420
  }
1396
1421
  }), Zo = /* @__PURE__ */ C({
@@ -1402,11 +1427,11 @@ $$`, "title")
1402
1427
  o?.value || h.emit(e, y, "table", {
1403
1428
  selectedShape: m
1404
1429
  });
1405
- }, v = P(() => l(Yo, {
1430
+ }, v = P(() => a(Yo, {
1406
1431
  tableShape: i.value,
1407
1432
  onSelected: u
1408
1433
  }, null));
1409
- return () => l(te, {
1434
+ return () => a(te, {
1410
1435
  relative: `#${s}`,
1411
1436
  visible: c.value,
1412
1437
  onChange: d,
@@ -1414,15 +1439,16 @@ $$`, "title")
1414
1439
  key: "bar-table",
1415
1440
  overlay: v.value
1416
1441
  }, {
1417
- default: () => [l("button", {
1418
- class: [`${a}-toolbar-item`, o?.value && `${a}-disabled`],
1442
+ default: () => [a("button", {
1443
+ class: [`${l}-toolbar-item`, o?.value && `${l}-disabled`],
1419
1444
  title: t.value.toolbarTips?.table,
1445
+ "aria-label": t.value.toolbarTips?.table,
1420
1446
  disabled: o?.value,
1421
1447
  type: "button"
1422
- }, [l(x, {
1448
+ }, [a(x, {
1423
1449
  name: "table"
1424
- }, null), n?.value && l("div", {
1425
- class: `${a}-toolbar-item-name`
1450
+ }, null), n?.value && a("div", {
1451
+ class: `${l}-toolbar-item-name`
1426
1452
  }, [t.value.toolbarTips?.table])])]
1427
1453
  });
1428
1454
  }
@@ -1430,18 +1456,19 @@ $$`, "title")
1430
1456
  name: "ToolbarTask",
1431
1457
  setup() {
1432
1458
  const e = r("editorId"), t = r("usedLanguageText"), o = r("disabled"), n = r("showToolbarName");
1433
- return () => l("button", {
1434
- class: [`${a}-toolbar-item`, o?.value && `${a}-disabled`],
1459
+ return () => a("button", {
1460
+ class: [`${l}-toolbar-item`, o?.value && `${l}-disabled`],
1435
1461
  title: t.value.toolbarTips?.task,
1462
+ "aria-label": t.value.toolbarTips?.task,
1436
1463
  disabled: o?.value,
1437
1464
  onClick: () => {
1438
1465
  h.emit(e, y, "task");
1439
1466
  },
1440
1467
  type: "button"
1441
- }, [l(x, {
1468
+ }, [a(x, {
1442
1469
  name: "task"
1443
- }, null), n?.value && l("div", {
1444
- class: `${a}-toolbar-item-name`
1470
+ }, null), n?.value && a("div", {
1471
+ class: `${l}-toolbar-item-name`
1445
1472
  }, [t.value.toolbarTips?.task])]);
1446
1473
  }
1447
1474
  }), Jo = /* @__PURE__ */ C({
@@ -1451,71 +1478,72 @@ $$`, "title")
1451
1478
  o?.value || h.emit(e, y, v);
1452
1479
  }, d = (v) => {
1453
1480
  s.value = v;
1454
- }, u = P(() => l("ul", {
1455
- class: `${a}-menu`,
1481
+ }, u = P(() => a("ul", {
1482
+ class: `${l}-menu`,
1456
1483
  onClick: () => {
1457
1484
  s.value = !1;
1458
1485
  },
1459
1486
  role: "menu"
1460
- }, [l("li", {
1461
- class: `${a}-menu-item ${a}-menu-item-title`,
1487
+ }, [a("li", {
1488
+ class: `${l}-menu-item ${l}-menu-item-title`,
1462
1489
  onClick: () => {
1463
1490
  c("h1");
1464
1491
  },
1465
1492
  role: "menuitem",
1466
1493
  tabindex: "0"
1467
- }, [t.value.titleItem?.h1]), l("li", {
1468
- class: `${a}-menu-item ${a}-menu-item-title`,
1494
+ }, [t.value.titleItem?.h1]), a("li", {
1495
+ class: `${l}-menu-item ${l}-menu-item-title`,
1469
1496
  onClick: () => {
1470
1497
  c("h2");
1471
1498
  },
1472
1499
  role: "menuitem",
1473
1500
  tabindex: "0"
1474
- }, [t.value.titleItem?.h2]), l("li", {
1475
- class: `${a}-menu-item ${a}-menu-item-title`,
1501
+ }, [t.value.titleItem?.h2]), a("li", {
1502
+ class: `${l}-menu-item ${l}-menu-item-title`,
1476
1503
  onClick: () => {
1477
1504
  c("h3");
1478
1505
  },
1479
1506
  role: "menuitem",
1480
1507
  tabindex: "0"
1481
- }, [t.value.titleItem?.h3]), l("li", {
1482
- class: `${a}-menu-item ${a}-menu-item-title`,
1508
+ }, [t.value.titleItem?.h3]), a("li", {
1509
+ class: `${l}-menu-item ${l}-menu-item-title`,
1483
1510
  onClick: () => {
1484
1511
  c("h4");
1485
1512
  },
1486
1513
  role: "menuitem",
1487
1514
  tabindex: "0"
1488
- }, [t.value.titleItem?.h4]), l("li", {
1489
- class: `${a}-menu-item ${a}-menu-item-title`,
1515
+ }, [t.value.titleItem?.h4]), a("li", {
1516
+ class: `${l}-menu-item ${l}-menu-item-title`,
1490
1517
  onClick: () => {
1491
1518
  c("h5");
1492
1519
  },
1493
1520
  role: "menuitem",
1494
1521
  tabindex: "0"
1495
- }, [t.value.titleItem?.h5]), l("li", {
1496
- class: `${a}-menu-item ${a}-menu-item-title`,
1522
+ }, [t.value.titleItem?.h5]), a("li", {
1523
+ class: `${l}-menu-item ${l}-menu-item-title`,
1497
1524
  onClick: () => {
1498
1525
  c("h6");
1499
1526
  },
1500
1527
  role: "menuitem",
1501
1528
  tabindex: "0"
1502
1529
  }, [t.value.titleItem?.h6])]));
1503
- return () => l(te, {
1530
+ return () => a(te, {
1504
1531
  relative: `#${i}`,
1505
1532
  visible: s.value,
1506
1533
  onChange: d,
1507
1534
  disabled: o?.value,
1508
1535
  overlay: u.value
1509
1536
  }, {
1510
- default: () => [l("button", {
1511
- class: [`${a}-toolbar-item`, o?.value && `${a}-disabled`],
1537
+ default: () => [a("button", {
1538
+ class: [`${l}-toolbar-item`, o?.value && `${l}-disabled`],
1512
1539
  disabled: o?.value,
1513
1540
  title: t.value.toolbarTips?.title,
1541
+ "aria-label": t.value.toolbarTips?.title,
1514
1542
  type: "button"
1515
- }, [l(x, {
1543
+ }, [a(x, {
1516
1544
  name: "title"
1517
- }, null), n?.value && l("div", {
1518
- class: `${a}-toolbar-item-name`
1545
+ }, null), n?.value && a("div", {
1546
+ class: `${l}-toolbar-item-name`
1519
1547
  }, [t.value.toolbarTips?.title])])]
1520
1548
  });
1521
1549
  }
@@ -1523,39 +1551,41 @@ $$`, "title")
1523
1551
  name: "ToolbarUnderline",
1524
1552
  setup() {
1525
1553
  const e = r("editorId"), t = r("usedLanguageText"), o = r("disabled"), n = r("showToolbarName");
1526
- return () => l("button", {
1527
- class: [`${a}-toolbar-item`, o?.value && `${a}-disabled`],
1554
+ return () => a("button", {
1555
+ class: [`${l}-toolbar-item`, o?.value && `${l}-disabled`],
1528
1556
  title: t.value.toolbarTips?.underline,
1557
+ "aria-label": t.value.toolbarTips?.underline,
1529
1558
  disabled: o?.value,
1530
1559
  onClick: () => {
1531
1560
  h.emit(e, y, "underline");
1532
1561
  },
1533
1562
  type: "button"
1534
- }, [l(x, {
1563
+ }, [a(x, {
1535
1564
  name: "underline"
1536
- }, null), n?.value && l("div", {
1537
- class: `${a}-toolbar-item-name`
1565
+ }, null), n?.value && a("div", {
1566
+ class: `${l}-toolbar-item-name`
1538
1567
  }, [t.value.toolbarTips?.underline])]);
1539
1568
  }
1540
- }), el = /* @__PURE__ */ C({
1569
+ }), ea = /* @__PURE__ */ C({
1541
1570
  name: "ToolbarUnorderedList",
1542
1571
  setup() {
1543
1572
  const e = r("editorId"), t = r("usedLanguageText"), o = r("disabled"), n = r("showToolbarName");
1544
- return () => l("button", {
1545
- class: [`${a}-toolbar-item`, o?.value && `${a}-disabled`],
1573
+ return () => a("button", {
1574
+ class: [`${l}-toolbar-item`, o?.value && `${l}-disabled`],
1546
1575
  title: t.value.toolbarTips?.unorderedList,
1576
+ "aria-label": t.value.toolbarTips?.unorderedList,
1547
1577
  disabled: o?.value,
1548
1578
  onClick: () => {
1549
1579
  h.emit(e, y, "unorderedList");
1550
1580
  },
1551
1581
  type: "button"
1552
- }, [l(x, {
1582
+ }, [a(x, {
1553
1583
  name: "unordered-list"
1554
- }, null), n?.value && l("div", {
1555
- class: `${a}-toolbar-item-name`
1584
+ }, null), n?.value && a("div", {
1585
+ class: `${l}-toolbar-item-name`
1556
1586
  }, [t.value.toolbarTips?.unorderedList])]);
1557
1587
  }
1558
- }), tl = () => {
1588
+ }), ta = () => {
1559
1589
  const e = r("editorId"), t = r("setting"), o = r("updateSetting"), {
1560
1590
  editorExtensions: n,
1561
1591
  editorExtensionsAttrs: i
@@ -1593,7 +1623,7 @@ $$`, "title")
1593
1623
  fullscreenHandler: d
1594
1624
  };
1595
1625
  };
1596
- let ol = 0;
1626
+ let oa = 0;
1597
1627
  const Ze = () => {
1598
1628
  const e = r("editorId"), t = r("theme"), o = r("previewTheme"), n = r("language"), i = r("disabled"), s = r("noUploadImg"), c = r("noPrettier"), d = r("codeTheme"), u = r("showToolbarName"), v = r("setting"), m = r("defToolbars");
1599
1629
  return {
@@ -1601,125 +1631,125 @@ const Ze = () => {
1601
1631
  if ($t.includes(g))
1602
1632
  switch (g) {
1603
1633
  case "-":
1604
- return l(po, {
1605
- key: `bar-${ol++}`
1634
+ return a(po, {
1635
+ key: `bar-${oa++}`
1606
1636
  }, null);
1607
1637
  case "bold":
1608
- return l(To, {
1638
+ return a(To, {
1609
1639
  key: "bar-bold"
1610
1640
  }, null);
1611
1641
  case "underline":
1612
- return l(Qo, {
1642
+ return a(Qo, {
1613
1643
  key: "bar-unorderline"
1614
1644
  }, null);
1615
1645
  case "italic":
1616
- return l(Do, {
1646
+ return a(Do, {
1617
1647
  key: "bar-italic"
1618
1648
  }, null);
1619
1649
  case "strikeThrough":
1620
- return l(Uo, {
1650
+ return a(Uo, {
1621
1651
  key: "bar-strikeThrough"
1622
1652
  }, null);
1623
1653
  case "title":
1624
- return l(Jo, {
1654
+ return a(Jo, {
1625
1655
  key: "bar-title"
1626
1656
  }, null);
1627
1657
  case "sub":
1628
- return l(Ko, {
1658
+ return a(Ko, {
1629
1659
  key: "bar-sub"
1630
1660
  }, null);
1631
1661
  case "sup":
1632
- return l(Go, {
1662
+ return a(Go, {
1633
1663
  key: "bar-sup"
1634
1664
  }, null);
1635
1665
  case "quote":
1636
- return l(_o, {
1666
+ return a(_o, {
1637
1667
  key: "bar-quote"
1638
1668
  }, null);
1639
1669
  case "unorderedList":
1640
- return l(el, {
1670
+ return a(ea, {
1641
1671
  key: "bar-unorderedList"
1642
1672
  }, null);
1643
1673
  case "orderedList":
1644
- return l(Po, {
1674
+ return a(Po, {
1645
1675
  key: "bar-orderedList"
1646
1676
  }, null);
1647
1677
  case "task":
1648
- return l(Xo, {
1678
+ return a(Xo, {
1649
1679
  key: "bar-task"
1650
1680
  }, null);
1651
1681
  case "codeRow":
1652
- return l(Co, {
1682
+ return a(Co, {
1653
1683
  key: "bar-codeRow"
1654
1684
  }, null);
1655
1685
  case "code":
1656
- return l(yo, {
1686
+ return a(yo, {
1657
1687
  key: "bar-code"
1658
1688
  }, null);
1659
1689
  case "link":
1660
- return l(Mo, {
1690
+ return a(Mo, {
1661
1691
  key: "bar-link"
1662
1692
  }, null);
1663
1693
  case "image":
1664
- return s ? l(So, {
1694
+ return s ? a(So, {
1665
1695
  key: "bar-image"
1666
- }, null) : l(Ao, {
1696
+ }, null) : a(Ao, {
1667
1697
  key: "bar-imageDropdown"
1668
1698
  }, null);
1669
1699
  case "table":
1670
- return l(Zo, {
1700
+ return a(Zo, {
1671
1701
  key: "bar-table"
1672
1702
  }, null);
1673
1703
  case "revoke":
1674
- return l(zo, {
1704
+ return a(zo, {
1675
1705
  key: "bar-revoke"
1676
1706
  }, null);
1677
1707
  case "next":
1678
- return l(Bo, {
1708
+ return a(Bo, {
1679
1709
  key: "bar-next"
1680
1710
  }, null);
1681
1711
  case "save":
1682
- return l(qo, {
1712
+ return a(qo, {
1683
1713
  key: "bar-save"
1684
1714
  }, null);
1685
1715
  case "prettier":
1686
- return !c && l(Oo, {
1716
+ return !c && a(Oo, {
1687
1717
  key: "bar-prettier"
1688
1718
  }, null);
1689
1719
  case "pageFullscreen":
1690
- return !v.value.fullscreen && l(Ho, {
1720
+ return !v.value.fullscreen && a(Ho, {
1691
1721
  key: "bar-pageFullscreen"
1692
1722
  }, null);
1693
1723
  case "fullscreen":
1694
- return l(ko, {
1724
+ return a(ko, {
1695
1725
  key: "bar-fullscreen"
1696
1726
  }, null);
1697
1727
  case "catalog":
1698
- return l(wo, {
1728
+ return a(wo, {
1699
1729
  key: "bar-catalog"
1700
1730
  }, null);
1701
1731
  case "preview":
1702
- return l(Vo, {
1732
+ return a(Vo, {
1703
1733
  key: "bar-preview"
1704
1734
  }, null);
1705
1735
  case "previewOnly":
1706
- return l(Wo, {
1736
+ return a(Wo, {
1707
1737
  key: "bar-previewOnly"
1708
1738
  }, null);
1709
1739
  case "htmlPreview":
1710
- return l(xo, {
1740
+ return a(xo, {
1711
1741
  key: "bar-htmlPreview"
1712
1742
  }, null);
1713
1743
  case "github":
1714
- return l($o, {
1744
+ return a($o, {
1715
1745
  key: "bar-github"
1716
1746
  }, null);
1717
1747
  case "mermaid":
1718
- return l(Fo, {
1748
+ return a(Fo, {
1719
1749
  key: "bar-mermaid"
1720
1750
  }, null);
1721
1751
  case "katex":
1722
- return l(Ro, {
1752
+ return a(Ro, {
1723
1753
  key: "bar-katex"
1724
1754
  }, null);
1725
1755
  }
@@ -1757,17 +1787,17 @@ const Ze = () => {
1757
1787
  return "";
1758
1788
  }
1759
1789
  };
1760
- }, ll = /* @__PURE__ */ C({
1790
+ }, aa = /* @__PURE__ */ C({
1761
1791
  name: "FloatingToolbar",
1762
1792
  setup() {
1763
1793
  const e = r("floatingToolbars"), {
1764
1794
  barRender: t
1765
1795
  } = Ze();
1766
- return () => l("div", {
1767
- class: `${a}-floating-toolbar`
1796
+ return () => a("div", {
1797
+ class: `${l}-floating-toolbar`
1768
1798
  }, [e.value.map((o) => t(o))]);
1769
1799
  }
1770
- }), ge = re.define(), al = qe.define({
1800
+ }), ge = re.define(), la = qe.define({
1771
1801
  create() {
1772
1802
  return null;
1773
1803
  },
@@ -1776,7 +1806,7 @@ const Ze = () => {
1776
1806
  return e;
1777
1807
  },
1778
1808
  provide: (e) => Vt.from(e)
1779
- }), nl = (e) => {
1809
+ }), na = (e) => {
1780
1810
  let t = null;
1781
1811
  const o = (s, c) => {
1782
1812
  t && t.kind === c.kind && t.pos === c.pos || (t = c, s.dispatch({
@@ -1785,13 +1815,13 @@ const Ze = () => {
1785
1815
  above: !0,
1786
1816
  arrow: !0,
1787
1817
  create: () => {
1788
- const d = document.createElement("div"), u = `${a}-floating-toolbar-container`;
1818
+ const d = document.createElement("div"), u = `${l}-floating-toolbar-container`;
1789
1819
  d.classList.add(u), d.dataset.state = "hidden", requestAnimationFrame(() => {
1790
1820
  d.dataset.state = "visible";
1791
1821
  });
1792
1822
  const v = document.createElement("div");
1793
1823
  d.appendChild(v);
1794
- const m = Ct(ll);
1824
+ const m = Ct(aa);
1795
1825
  return e.privide(m), m.mount(d), { dom: d, destroy: () => m.unmount() };
1796
1826
  }
1797
1827
  })
@@ -1809,8 +1839,8 @@ const Ze = () => {
1809
1839
  }
1810
1840
  }
1811
1841
  });
1812
- return [al, i];
1813
- }, rl = "#e5c07b", Le = "var(--md-color)", sl = "#56b6c2", il = "#fff", Q = "#3f4a54", Ne = "#2d8cf0", cl = "#2d8cf0", ul = "#3f4a54", Ae = "#d19a66", dl = "#c678dd", ml = "#f6f6f6", bl = "#ceedfa33", De = "var(--md-bk-color)", de = "var(--md-bk-color)", vl = "#bad5fa", Re = "#3f4a54", gl = B.theme(
1842
+ return [la, i];
1843
+ }, ra = "#e5c07b", Le = "var(--md-color)", sa = "#56b6c2", ia = "#fff", Q = "#3f4a54", Ne = "#2d8cf0", ca = "#2d8cf0", ua = "#3f4a54", Ae = "#d19a66", da = "#c678dd", ma = "#f6f6f6", ba = "#ceedfa33", De = "var(--md-bk-color)", de = "var(--md-bk-color)", va = "#bad5fa", Re = "#3f4a54", ga = B.theme(
1814
1844
  {
1815
1845
  "&": {
1816
1846
  color: Q,
@@ -1820,8 +1850,8 @@ const Ze = () => {
1820
1850
  caretColor: Re
1821
1851
  },
1822
1852
  ".cm-cursor, .cm-dropCursor": { borderLeftColor: Re },
1823
- "&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection": { backgroundColor: vl },
1824
- ".cm-panels": { backgroundColor: ml, color: Q },
1853
+ "&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection": { backgroundColor: va },
1854
+ ".cm-panels": { backgroundColor: ma, color: Q },
1825
1855
  ".cm-panels.cm-panels-top": { borderBottom: "1px solid var(--md-border-color)" },
1826
1856
  ".cm-panels.cm-panels-bottom": { borderTop: "1px solid var(--md-border-color)" },
1827
1857
  ".cm-searchMatch": {
@@ -1843,7 +1873,7 @@ const Ze = () => {
1843
1873
  borderColor: "var(--md-border-color)"
1844
1874
  },
1845
1875
  ".cm-activeLineGutter": {
1846
- backgroundColor: bl
1876
+ backgroundColor: ba
1847
1877
  },
1848
1878
  ".cm-foldPlaceholder": {
1849
1879
  backgroundColor: "transparent",
@@ -1870,10 +1900,10 @@ const Ze = () => {
1870
1900
  }
1871
1901
  }
1872
1902
  // { dark: true }
1873
- ), hl = Ye.define([
1874
- { tag: b.keyword, color: dl },
1903
+ ), ha = Ye.define([
1904
+ { tag: b.keyword, color: da },
1875
1905
  { tag: [b.name, b.deleted, b.character, b.propertyName, b.macroName], color: Le },
1876
- { tag: [b.function(b.variableName), b.labelName], color: cl },
1906
+ { tag: [b.function(b.variableName), b.labelName], color: ca },
1877
1907
  { tag: [b.color, b.constant(b.name), b.standard(b.name)], color: Ae },
1878
1908
  { tag: [b.definition(b.name), b.separator], color: Q },
1879
1909
  {
@@ -1887,7 +1917,7 @@ const Ze = () => {
1887
1917
  b.self,
1888
1918
  b.namespace
1889
1919
  ],
1890
- color: rl
1920
+ color: ra
1891
1921
  },
1892
1922
  {
1893
1923
  tag: [
@@ -1899,7 +1929,7 @@ const Ze = () => {
1899
1929
  b.link,
1900
1930
  b.special(b.string)
1901
1931
  ],
1902
- color: sl
1932
+ color: sa
1903
1933
  },
1904
1934
  { tag: [b.meta, b.comment], color: Ne },
1905
1935
  { tag: b.strong, fontWeight: "bold" },
@@ -1908,12 +1938,12 @@ const Ze = () => {
1908
1938
  { tag: b.link, color: Ne, textDecoration: "underline" },
1909
1939
  { tag: b.heading, fontWeight: "bold", color: Le },
1910
1940
  { tag: [b.atom, b.bool, b.special(b.variableName)], color: Ae },
1911
- { tag: [b.processingInstruction, b.string, b.inserted], color: ul },
1912
- { tag: b.invalid, color: il }
1941
+ { tag: [b.processingInstruction, b.string, b.inserted], color: ua },
1942
+ { tag: b.invalid, color: ia }
1913
1943
  ]), Me = [
1914
- gl,
1915
- je(hl)
1916
- ], fl = "#e5c07b", Fe = "var(--md-color)", pl = "#56b6c2", Tl = "#ffffff", ee = "var(--md-color)", Be = "#e5c07b", wl = "#e5c07b", yl = "var(--md-color)", Pe = "#d19a66", Cl = "#c678dd", kl = "#21252b", $l = "#2c313a", He = "var(--md-bk-color)", me = "var(--md-bk-color)", xl = "#ceedfa33", Oe = "#528bff", Sl = B.theme(
1944
+ ga,
1945
+ je(ha)
1946
+ ], fa = "#e5c07b", Fe = "var(--md-color)", pa = "#56b6c2", Ta = "#ffffff", ee = "var(--md-color)", Be = "#e5c07b", wa = "#e5c07b", ya = "var(--md-color)", Pe = "#d19a66", Ca = "#c678dd", ka = "#21252b", $a = "#2c313a", He = "var(--md-bk-color)", me = "var(--md-bk-color)", xa = "#ceedfa33", Oe = "#528bff", Sa = B.theme(
1917
1947
  {
1918
1948
  "&": {
1919
1949
  color: ee,
@@ -1923,8 +1953,8 @@ const Ze = () => {
1923
1953
  caretColor: Oe
1924
1954
  },
1925
1955
  ".cm-cursor, .cm-dropCursor": { borderLeftColor: Oe },
1926
- "&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection": { backgroundColor: xl },
1927
- ".cm-panels": { backgroundColor: kl, color: ee },
1956
+ "&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection": { backgroundColor: xa },
1957
+ ".cm-panels": { backgroundColor: ka, color: ee },
1928
1958
  ".cm-panels.cm-panels-top": { borderBottom: "1px solid var(--md-border-color)" },
1929
1959
  ".cm-panels.cm-panels-bottom": { borderTop: "1px solid var(--md-border-color)" },
1930
1960
  ".cm-searchMatch": {
@@ -1946,7 +1976,7 @@ const Ze = () => {
1946
1976
  borderColor: "var(--md-border-color)"
1947
1977
  },
1948
1978
  ".cm-activeLineGutter": {
1949
- backgroundColor: $l
1979
+ backgroundColor: $a
1950
1980
  },
1951
1981
  ".cm-foldPlaceholder": {
1952
1982
  backgroundColor: "transparent",
@@ -1973,10 +2003,10 @@ const Ze = () => {
1973
2003
  }
1974
2004
  },
1975
2005
  { dark: !0 }
1976
- ), Il = Ye.define([
1977
- { tag: b.keyword, color: Cl },
2006
+ ), Ia = Ye.define([
2007
+ { tag: b.keyword, color: Ca },
1978
2008
  { tag: [b.name, b.deleted, b.character, b.propertyName, b.macroName], color: Fe },
1979
- { tag: [b.function(b.variableName), b.labelName], color: wl },
2009
+ { tag: [b.function(b.variableName), b.labelName], color: wa },
1980
2010
  { tag: [b.color, b.constant(b.name), b.standard(b.name)], color: Pe },
1981
2011
  { tag: [b.definition(b.name), b.separator], color: ee },
1982
2012
  {
@@ -1990,7 +2020,7 @@ const Ze = () => {
1990
2020
  b.self,
1991
2021
  b.namespace
1992
2022
  ],
1993
- color: fl
2023
+ color: fa
1994
2024
  },
1995
2025
  {
1996
2026
  tag: [
@@ -2002,7 +2032,7 @@ const Ze = () => {
2002
2032
  b.link,
2003
2033
  b.special(b.string)
2004
2034
  ],
2005
- color: pl
2035
+ color: pa
2006
2036
  },
2007
2037
  { tag: [b.meta, b.comment], color: Be },
2008
2038
  { tag: b.strong, fontWeight: "bold" },
@@ -2011,12 +2041,12 @@ const Ze = () => {
2011
2041
  { tag: b.link, color: Be, textDecoration: "underline" },
2012
2042
  { tag: b.heading, fontWeight: "bold", color: Fe },
2013
2043
  { tag: [b.atom, b.bool, b.special(b.variableName)], color: Pe },
2014
- { tag: [b.processingInstruction, b.string, b.inserted], color: yl },
2015
- { tag: b.invalid, color: Tl }
2044
+ { tag: [b.processingInstruction, b.string, b.inserted], color: ya },
2045
+ { tag: b.invalid, color: Ta }
2016
2046
  ]), Ve = [
2017
- Sl,
2018
- je(Il)
2019
- ], El = (e, t) => {
2047
+ Sa,
2048
+ je(Ia)
2049
+ ], Ea = (e, t) => {
2020
2050
  const o = r("editorId"), n = (s) => {
2021
2051
  s instanceof Promise ? s.then((c) => {
2022
2052
  h.emit(o, y, "universal", {
@@ -2080,7 +2110,7 @@ const Ze = () => {
2080
2110
  data: c
2081
2111
  });
2082
2112
  };
2083
- }, Ll = (e, t) => [
2113
+ }, La = (e, t) => [
2084
2114
  {
2085
2115
  key: "Ctrl-b",
2086
2116
  mac: "Cmd-b",
@@ -2179,22 +2209,22 @@ const Ze = () => {
2179
2209
  any: (L, T) => (T.ctrlKey || T.metaKey) && T.altKey && T.shiftKey && T.code === "KeyT" ? (h.emit(e, y, "table"), !0) : !1
2180
2210
  },
2181
2211
  ...to
2182
- ], Nl = /[a-z][a-z0-9.+-]*:\/\/[^\s<>"'`()]+(?:\([^\s<>"'`]*\)[^\s<>"'`]*)*/i, Al = /\/\/[^\s<>"'`()]+/i, Dl = /data:[a-z]+\/[a-z0-9.+-]+(?:;base64)?,[a-z0-9+/=%]+/i, Rl = /\/(?!\/)[^\s<>"'`()]+/i, se = new RegExp(
2183
- `(${Nl.source}|${Al.source}|${Dl.source}|${Rl.source})`,
2212
+ ], Na = /[a-z][a-z0-9.+-]*:\/\/[^\s<>"'`()]+(?:\([^\s<>"'`]*\)[^\s<>"'`]*)*/i, Aa = /\/\/[^\s<>"'`()]+/i, Da = /data:[a-z]+\/[a-z0-9.+-]+(?:;base64)?,[a-z0-9+/=%]+/i, Ra = /\/(?!\/)[^\s<>"'`()]+/i, se = new RegExp(
2213
+ `(${Na.source}|${Aa.source}|${Da.source}|${Ra.source})`,
2184
2214
  "gi"
2185
- ), Ml = /[a-z0-9.+-]/i, Fl = (e) => {
2215
+ ), Ma = /[a-z0-9.+-]/i, Fa = (e) => {
2186
2216
  const t = [];
2187
2217
  se.lastIndex = 0;
2188
2218
  let o;
2189
2219
  for (; o = se.exec(e); ) {
2190
2220
  const n = o.index ?? 0, i = n > 0 ? e[n - 1] : "";
2191
- if (i && Ml.test(i) || i === "<" && e[n] === "/")
2221
+ if (i && Ma.test(i) || i === "<" && e[n] === "/")
2192
2222
  continue;
2193
2223
  const c = n + o[0].length;
2194
2224
  t.push([n, c]);
2195
2225
  }
2196
2226
  return t;
2197
- }, Bl = (e, t, o) => e.some((n) => n.from === t && n.to === o), Pl = (e) => {
2227
+ }, Ba = (e, t, o) => e.some((n) => n.from === t && n.to === o), Pa = (e) => {
2198
2228
  const t = e.shortenText || (() => "..."), o = re.define(), n = re.define(), i = (u, v) => {
2199
2229
  const m = new Ht(), f = [];
2200
2230
  for (let g = 1; g <= u.doc.lines; g++) {
@@ -2207,7 +2237,7 @@ const Ze = () => {
2207
2237
  lineFrom: p.from,
2208
2238
  lineTo: p.to,
2209
2239
  defaultTextRegex: se
2210
- }) ?? Fl(k);
2240
+ }) ?? Fa(k);
2211
2241
  for (const M of E) {
2212
2242
  if (!M) continue;
2213
2243
  const [A, S] = M;
@@ -2217,7 +2247,7 @@ const Ze = () => {
2217
2247
  if (!D || D.length <= e.maxLength)
2218
2248
  continue;
2219
2249
  const L = p.from + A, T = p.from + S;
2220
- if (Bl(v, L, T)) {
2250
+ if (Ba(v, L, T)) {
2221
2251
  f.push({ from: L, to: T });
2222
2252
  continue;
2223
2253
  }
@@ -2294,13 +2324,13 @@ const Ze = () => {
2294
2324
  return [c, d];
2295
2325
  };
2296
2326
  B.EDIT_CONTEXT = !1;
2297
- const Xe = (e) => e.extension instanceof Function ? e.extension(e.options) : e.extension, Hl = (e) => {
2327
+ const Xe = (e) => e.extension instanceof Function ? e.extension(e.options) : e.extension, Ha = (e) => {
2298
2328
  const t = Xe(e);
2299
2329
  return e.compartment ? e.compartment.of(t) : t;
2300
- }, Ol = (e) => {
2330
+ }, Oa = (e) => {
2301
2331
  const t = r("tabWidth"), o = r("editorId"), n = r("theme"), i = r("previewTheme"), s = r("language"), c = r(
2302
2332
  "usedLanguageText"
2303
- ), d = r("disabled"), u = r("showToolbarName"), v = r("customIcon"), m = r("noUploadImg"), f = r("tableShape"), g = r("noPrettier"), p = r("codeTheme"), k = r("setting"), E = r("updateSetting"), M = r("catalogVisible"), A = r("defToolbars"), S = r("floatingToolbars"), D = r("rootRef"), L = I(), T = kt(), R = I(!1), z = new j(), q = new j(), $ = new j(), Te = new j(), Je = new j(), Qe = Ll(o, {
2333
+ ), d = r("disabled"), u = r("showToolbarName"), v = r("customIcon"), m = r("noUploadImg"), f = r("tableShape"), g = r("noPrettier"), p = r("codeTheme"), k = r("setting"), E = r("updateSetting"), M = r("catalogVisible"), A = r("defToolbars"), S = r("floatingToolbars"), D = r("rootRef"), L = I(), T = kt(), R = I(!1), z = new j(), q = new j(), $ = new j(), Te = new j(), Je = new j(), Qe = La(o, {
2304
2334
  noPrettier: g
2305
2335
  }), we = () => [
2306
2336
  ...Qe,
@@ -2308,7 +2338,7 @@ const Xe = (e) => e.extension instanceof Function ? e.extension(e.options) : e.e
2308
2338
  ...Dt,
2309
2339
  Rt
2310
2340
  ], oe = {
2311
- paste: El(e, T),
2341
+ paste: Ea(e, T),
2312
2342
  blur: e.onBlur,
2313
2343
  focus: e.onFocus,
2314
2344
  drop: e.onDrop,
@@ -2327,7 +2357,7 @@ const Xe = (e) => e.extension instanceof Function ? e.extension(e.options) : e.e
2327
2357
  data: F
2328
2358
  });
2329
2359
  }
2330
- }, et = nl({
2360
+ }, et = na({
2331
2361
  privide(w) {
2332
2362
  w.provide("editorId", o), w.provide("theme", n), w.provide("previewTheme", i), w.provide("language", s), w.provide("disabled", d), w.provide("noUploadImg", m), w.provide("tableShape", f), w.provide("noPrettier", g), w.provide("codeTheme", p), w.provide("showToolbarName", u), w.provide("setting", k), w.provide("updateSetting", E), w.provide("usedLanguageText", c), w.provide("catalogVisible", M), w.provide("defToolbars", A), w.provide("tabWidth", t), w.provide("customIcon", v), w.provide("floatingToolbars", S), w.provide("rootRef", D);
2333
2363
  }
@@ -2383,7 +2413,7 @@ const Xe = (e) => e.extension instanceof Function ? e.extension(e.options) : e.e
2383
2413
  },
2384
2414
  {
2385
2415
  type: "linkShortener",
2386
- extension: (w) => Pl(w),
2416
+ extension: (w) => Pa(w),
2387
2417
  options: {
2388
2418
  maxLength: 30
2389
2419
  }
@@ -2399,7 +2429,7 @@ const Xe = (e) => e.extension instanceof Function ? e.extension(e.options) : e.e
2399
2429
  theme: n.value,
2400
2430
  keyBindings: we()
2401
2431
  }
2402
- ), ot = () => [...tt, ...ye].map(Hl);
2432
+ ), ot = () => [...tt, ...ye].map(Ha);
2403
2433
  return K(() => {
2404
2434
  const w = new B({
2405
2435
  doc: e.modelValue,
@@ -2536,7 +2566,7 @@ const Xe = (e) => e.extension instanceof Function ? e.extension(e.options) : e.e
2536
2566
  T.value?.view.dispatch({ effects: $.reconfigure([]) }), T.value?.view.dispatch({ effects: $.reconfigure($e()) });
2537
2567
  }
2538
2568
  };
2539
- }, Vl = (e, t, o) => {
2569
+ }, Va = (e, t, o) => {
2540
2570
  const n = r("setting"), i = P(() => /px$/.test(`${e.inputBoxWidth}`) ? "50%" : e.inputBoxWidth), s = Y({
2541
2571
  resizedWidth: i.value
2542
2572
  }), c = Y({
@@ -2547,7 +2577,7 @@ const Xe = (e) => e.extension instanceof Function ? e.extension(e.options) : e.e
2547
2577
  }), u = (f) => {
2548
2578
  const g = t.value?.offsetWidth || 0, p = t.value?.getBoundingClientRect().x || 0;
2549
2579
  let k = f.x - p;
2550
- k / g < le ? k = g * le : k > g - g * le && (k = g - g * le);
2580
+ k / g < ae ? k = g * ae : k > g - g * ae && (k = g - g * ae);
2551
2581
  const E = `${k / g * 100}%`;
2552
2582
  c.width = E, d.insetInlineStart = E, s.resizedWidth = E, e.oninputBoxWidthChange?.(E);
2553
2583
  }, v = (f) => {
@@ -2579,12 +2609,12 @@ const Xe = (e) => e.extension instanceof Function ? e.extension(e.options) : e.e
2579
2609
  inputWrapperStyle: c,
2580
2610
  resizeOperateStyle: d
2581
2611
  };
2582
- }, Wl = () => {
2612
+ }, Wa = () => {
2583
2613
  const e = r("editorId"), t = I(!0), o = ze();
2584
2614
  return {
2585
2615
  onCatalogActive: (c, d) => {
2586
2616
  const u = document.querySelector(
2587
- `#${e} .${a}-catalog-editor`
2617
+ `#${e} .${l}-catalog-editor`
2588
2618
  );
2589
2619
  if (!d || !t.value || !u)
2590
2620
  return;
@@ -2671,23 +2701,23 @@ const Xe = (e) => e.extension instanceof Function ? e.extension(e.options) : e.e
2671
2701
  }), window.addEventListener("resize", f), i.value?.addEventListener("mousedown", p), document.addEventListener("mousemove", k), document.addEventListener("mouseup", E);
2672
2702
  }), he(() => {
2673
2703
  c?.disconnect(), n.value && n.value.removeEventListener("scroll", g), window.removeEventListener("resize", f), i.value?.removeEventListener("mousedown", p), document.removeEventListener("mousemove", k), document.removeEventListener("mouseup", E);
2674
- }), () => l("div", {
2704
+ }), () => a("div", {
2675
2705
  id: e.id,
2676
- class: [`${a}-custom-scrollbar`, e.class],
2706
+ class: [`${l}-custom-scrollbar`, e.class],
2677
2707
  ref: o,
2678
2708
  onMouseenter: e.onMouseenter,
2679
2709
  onMouseleave: e.onMouseleave
2680
- }, [t.default?.(), l("div", {
2681
- class: `${a}-custom-scrollbar__track`,
2710
+ }, [t.default?.(), a("div", {
2711
+ class: `${l}-custom-scrollbar__track`,
2682
2712
  ref: s
2683
- }, [l("div", {
2684
- class: `${a}-custom-scrollbar__thumb`,
2713
+ }, [a("div", {
2714
+ class: `${l}-custom-scrollbar__thumb`,
2685
2715
  ref: i
2686
2716
  }, null)])]);
2687
2717
  }
2688
- }), _l = ze(), zl = {
2718
+ }), _a = ze(), za = {
2689
2719
  flex: 1
2690
- }, ql = /* @__PURE__ */ C({
2720
+ }, qa = /* @__PURE__ */ C({
2691
2721
  name: "MDEditorContent",
2692
2722
  props: st,
2693
2723
  setup(e, t) {
@@ -2695,22 +2725,22 @@ const Xe = (e) => e.extension instanceof Function ? e.extension(e.options) : e.e
2695
2725
  inputWrapperRef: v,
2696
2726
  codeMirrorUt: m,
2697
2727
  resetHistory: f
2698
- } = Ol(e), {
2728
+ } = Oa(e), {
2699
2729
  inputWrapperStyle: g,
2700
2730
  resizeOperateStyle: p
2701
- } = Vl(e, d, u);
2731
+ } = Va(e, d, u);
2702
2732
  oo(e, c, m);
2703
2733
  const {
2704
2734
  onCatalogActive: k,
2705
2735
  onMouseenter: E,
2706
2736
  onMouseleave: M
2707
- } = Wl(), A = (L, T) => {
2737
+ } = Wa(), A = (L, T) => {
2708
2738
  if (!s.value.preview && T.line !== void 0) {
2709
2739
  L.preventDefault();
2710
2740
  const R = m.value?.view;
2711
2741
  if (R) {
2712
2742
  const z = R.state.doc.line(T.line + 1), q = R.lineBlockAt(z.from)?.top, $ = R.scrollDOM;
2713
- _l($, q);
2743
+ _a($, q);
2714
2744
  }
2715
2745
  }
2716
2746
  }, S = P(() => s.value.preview ? "preview" : "editor"), D = (L) => {
@@ -2727,28 +2757,28 @@ const Xe = (e) => e.extension instanceof Function ? e.extension(e.options) : e.e
2727
2757
  getEditorView() {
2728
2758
  return m.value?.view;
2729
2759
  }
2730
- }), () => l("div", {
2731
- class: `${a}-content`
2732
- }, [l("div", {
2733
- class: `${a}-content-wrapper`,
2760
+ }), () => a("div", {
2761
+ class: `${l}-content`
2762
+ }, [a("div", {
2763
+ class: `${l}-content-wrapper`,
2734
2764
  ref: d
2735
- }, [l(be, {
2765
+ }, [a(be, {
2736
2766
  alwaysShowTrack: !0,
2737
2767
  scrollTarget: `#${o} .cm-scroller`,
2738
2768
  style: g
2739
2769
  }, {
2740
- default: () => [l("div", {
2741
- class: `${a}-input-wrapper`,
2770
+ default: () => [a("div", {
2771
+ class: `${l}-input-wrapper`,
2742
2772
  ref: v
2743
2773
  }, null)]
2744
- }), (s.value.htmlPreview || s.value.preview) && l("div", {
2745
- class: `${a}-resize-operate`,
2774
+ }), (s.value.htmlPreview || s.value.preview) && a("div", {
2775
+ class: `${l}-resize-operate`,
2746
2776
  style: p,
2747
2777
  ref: u
2748
- }, null), l(be, {
2749
- style: zl
2778
+ }, null), a(be, {
2779
+ style: za
2750
2780
  }, {
2751
- default: () => [l(it, {
2781
+ default: () => [a(it, {
2752
2782
  modelValue: e.modelValue,
2753
2783
  onChange: e.onChange,
2754
2784
  onHtmlChanged: D,
@@ -2767,14 +2797,14 @@ const Xe = (e) => e.extension instanceof Function ? e.extension(e.options) : e.e
2767
2797
  previewComponent: e.previewComponent,
2768
2798
  noEcharts: e.noEcharts
2769
2799
  }, null)]
2770
- })]), n.value && l(be, {
2771
- class: `${a}-catalog-${e.catalogLayout}`,
2800
+ })]), n.value && a(be, {
2801
+ class: `${l}-catalog-${e.catalogLayout}`,
2772
2802
  onMouseenter: E,
2773
2803
  onMouseleave: M
2774
2804
  }, {
2775
- default: () => [l(We, {
2805
+ default: () => [a(We, {
2776
2806
  theme: i.value,
2777
- class: `${a}-catalog-editor`,
2807
+ class: `${l}-catalog-editor`,
2778
2808
  editorId: o,
2779
2809
  mdHeadingId: e.mdHeadingId,
2780
2810
  key: "internal-catalog",
@@ -2786,7 +2816,7 @@ const Xe = (e) => e.extension instanceof Function ? e.extension(e.options) : e.e
2786
2816
  }, null)]
2787
2817
  })]);
2788
2818
  }
2789
- }), Ul = /* @__PURE__ */ C({
2819
+ }), Ua = /* @__PURE__ */ C({
2790
2820
  props: {
2791
2821
  modelValue: {
2792
2822
  type: String,
@@ -2795,13 +2825,13 @@ const Xe = (e) => e.extension instanceof Function ? e.extension(e.options) : e.e
2795
2825
  },
2796
2826
  setup(e) {
2797
2827
  const t = r("usedLanguageText");
2798
- return () => l("div", {
2799
- class: `${a}-footer-item`
2800
- }, [l("label", {
2801
- class: `${a}-footer-label`
2802
- }, [`${t.value.footer?.markdownTotal}:`]), l("span", null, [e.modelValue?.length || 0])]);
2828
+ return () => a("div", {
2829
+ class: `${l}-footer-item`
2830
+ }, [a("label", {
2831
+ class: `${l}-footer-label`
2832
+ }, [`${t.value.footer?.markdownTotal}:`]), a("span", null, [e.modelValue?.length || 0])]);
2803
2833
  }
2804
- }), Kl = {
2834
+ }), Ka = {
2805
2835
  checked: {
2806
2836
  type: Boolean,
2807
2837
  default: !1
@@ -2815,18 +2845,18 @@ const Xe = (e) => e.extension instanceof Function ? e.extension(e.options) : e.e
2815
2845
  type: Boolean,
2816
2846
  default: void 0
2817
2847
  }
2818
- }, Gl = /* @__PURE__ */ C({
2819
- name: `${a}-checkbox`,
2820
- props: Kl,
2848
+ }, Ga = /* @__PURE__ */ C({
2849
+ name: `${l}-checkbox`,
2850
+ props: Ka,
2821
2851
  setup(e) {
2822
- return () => l("div", {
2823
- class: [`${a}-checkbox`, e.checked && `${a}-checkbox-checked`, e.disabled && `${a}-disabled`],
2852
+ return () => a("div", {
2853
+ class: [`${l}-checkbox`, e.checked && `${l}-checkbox-checked`, e.disabled && `${l}-disabled`],
2824
2854
  onClick: () => {
2825
2855
  e.disabled || e.onChange(!e.checked);
2826
2856
  }
2827
2857
  }, null);
2828
2858
  }
2829
- }), jl = {
2859
+ }), ja = {
2830
2860
  scrollAuto: {
2831
2861
  type: Boolean
2832
2862
  },
@@ -2835,24 +2865,24 @@ const Xe = (e) => e.extension instanceof Function ? e.extension(e.options) : e.e
2835
2865
  default: () => {
2836
2866
  }
2837
2867
  }
2838
- }, Yl = /* @__PURE__ */ C({
2839
- props: jl,
2868
+ }, Ya = /* @__PURE__ */ C({
2869
+ props: ja,
2840
2870
  setup(e) {
2841
2871
  const t = r("usedLanguageText"), o = r("disabled");
2842
- return () => l("div", {
2843
- class: [`${a}-footer-item`, o?.value && `${a}-disabled`]
2844
- }, [l("label", {
2845
- class: `${a}-footer-label`,
2872
+ return () => a("div", {
2873
+ class: [`${l}-footer-item`, o?.value && `${l}-disabled`]
2874
+ }, [a("label", {
2875
+ class: `${l}-footer-label`,
2846
2876
  onClick: () => {
2847
2877
  o?.value || e.onScrollAutoChange(!e.scrollAuto);
2848
2878
  }
2849
- }, [t?.value.footer?.scrollAuto]), l(Gl, {
2879
+ }, [t?.value.footer?.scrollAuto]), a(Ga, {
2850
2880
  checked: e.scrollAuto,
2851
2881
  onChange: e.onScrollAutoChange,
2852
2882
  disabled: o?.value
2853
2883
  }, null)]);
2854
2884
  }
2855
- }), Zl = {
2885
+ }), Za = {
2856
2886
  modelValue: {
2857
2887
  type: String,
2858
2888
  default: ""
@@ -2875,9 +2905,9 @@ const Xe = (e) => e.extension instanceof Function ? e.extension(e.options) : e.e
2875
2905
  defFooters: {
2876
2906
  type: Object
2877
2907
  }
2878
- }, Xl = /* @__PURE__ */ C({
2908
+ }, Xa = /* @__PURE__ */ C({
2879
2909
  name: "MDEditorFooter",
2880
- props: Zl,
2910
+ props: Za,
2881
2911
  setup(e) {
2882
2912
  const t = r("theme"), o = r("language"), n = r("disabled"), i = P(() => {
2883
2913
  const c = e.footers.indexOf("="), d = c === -1 ? e.footers : e.footers.slice(0, c), u = c === -1 ? [] : e.footers.slice(c, Number.MAX_SAFE_INTEGER);
@@ -2886,11 +2916,11 @@ const Xe = (e) => e.extension instanceof Function ? e.extension(e.options) : e.e
2886
2916
  if (St.includes(c))
2887
2917
  switch (c) {
2888
2918
  case "markdownTotal":
2889
- return l(Ul, {
2919
+ return a(Ua, {
2890
2920
  modelValue: e.modelValue
2891
2921
  }, null);
2892
2922
  case "scrollSwitch":
2893
- return !e.noScrollAuto && l(Yl, {
2923
+ return !e.noScrollAuto && a(Ya, {
2894
2924
  scrollAuto: e.scrollAuto,
2895
2925
  onScrollAutoChange: e.onScrollAutoChange
2896
2926
  }, null);
@@ -2914,16 +2944,16 @@ const Xe = (e) => e.extension instanceof Function ? e.extension(e.options) : e.e
2914
2944
  };
2915
2945
  return () => {
2916
2946
  const c = i.value[0].map((u) => s(u)), d = i.value[1].map((u) => s(u));
2917
- return l("div", {
2918
- class: `${a}-footer`
2919
- }, [l("div", {
2920
- class: `${a}-footer-left`
2921
- }, [c]), l("div", {
2922
- class: `${a}-footer-right`
2947
+ return a("div", {
2948
+ class: `${l}-footer`
2949
+ }, [a("div", {
2950
+ class: `${l}-footer-left`
2951
+ }, [c]), a("div", {
2952
+ class: `${l}-footer-right`
2923
2953
  }, [d])]);
2924
2954
  };
2925
2955
  }
2926
- }), Jl = {
2956
+ }), Ja = {
2927
2957
  // 工具栏选择显示
2928
2958
  toolbars: {
2929
2959
  type: Array,
@@ -2934,9 +2964,9 @@ const Xe = (e) => e.extension instanceof Function ? e.extension(e.options) : e.e
2934
2964
  type: Array,
2935
2965
  default: () => []
2936
2966
  }
2937
- }, Ql = /* @__PURE__ */ C({
2967
+ }, Qa = /* @__PURE__ */ C({
2938
2968
  name: "MDEditorToolbar",
2939
- props: Jl,
2969
+ props: Ja,
2940
2970
  setup(e) {
2941
2971
  const t = r("editorId"), o = r("showToolbarName"), n = `${t}-toolbar-wrapper`, i = I(), s = I(), {
2942
2972
  barRender: c
@@ -2952,17 +2982,17 @@ const Xe = (e) => e.extension instanceof Function ? e.extension(e.options) : e.e
2952
2982
  immediate: !0
2953
2983
  }), () => {
2954
2984
  const u = d.value[0].map((m) => c(m)), v = d.value[1].map((m) => c(m));
2955
- return l(_e, null, [e.toolbars.length > 0 && l("div", {
2956
- class: `${a}-toolbar-wrapper`,
2985
+ return a(_e, null, [e.toolbars.length > 0 && a("div", {
2986
+ class: `${l}-toolbar-wrapper`,
2957
2987
  ref: i,
2958
2988
  id: n
2959
- }, [l("div", {
2960
- class: [`${a}-toolbar`, o.value && `${a}-stn`]
2961
- }, [l("div", {
2962
- class: `${a}-toolbar-left`,
2989
+ }, [a("div", {
2990
+ class: [`${l}-toolbar`, o.value && `${l}-stn`]
2991
+ }, [a("div", {
2992
+ class: `${l}-toolbar-left`,
2963
2993
  ref: s
2964
- }, [u]), l("div", {
2965
- class: `${a}-toolbar-right`
2994
+ }, [u]), a("div", {
2995
+ class: `${l}-toolbar-right`
2966
2996
  }, [v])])])]);
2967
2997
  };
2968
2998
  }
@@ -3031,15 +3061,15 @@ const Xe = (e) => e.extension instanceof Function ? e.extension(e.options) : e.e
3031
3061
  }, q = ($) => {
3032
3062
  s.scrollAuto = $;
3033
3063
  };
3034
- return () => l("div", {
3064
+ return () => a("div", {
3035
3065
  id: m,
3036
- class: [a, e.class, e.theme === "dark" && `${a}-dark`, f.fullscreen || f.pageFullscreen ? `${a}-fullscreen` : ""],
3066
+ class: [l, e.class, e.theme === "dark" && `${l}-dark`, f.fullscreen || f.pageFullscreen ? `${l}-fullscreen` : ""],
3037
3067
  style: e.style,
3038
3068
  ref: c
3039
- }, [e.toolbars.length > 0 && l(Ql, {
3069
+ }, [e.toolbars.length > 0 && a(Qa, {
3040
3070
  toolbars: e.toolbars,
3041
3071
  toolbarsExclude: e.toolbarsExclude
3042
- }, null), l(ql, {
3072
+ }, null), a(qa, {
3043
3073
  ref: d,
3044
3074
  modelValue: e.modelValue,
3045
3075
  mdHeadingId: e.mdHeadingId,
@@ -3075,7 +3105,7 @@ const Xe = (e) => e.extension instanceof Function ? e.extension(e.options) : e.e
3075
3105
  catalogMaxDepth: e.catalogMaxDepth,
3076
3106
  noEcharts: e.noEcharts,
3077
3107
  previewComponent: e.previewComponent
3078
- }, null), e.footers.length > 0 && l(Xl, {
3108
+ }, null), e.footers.length > 0 && a(Xa, {
3079
3109
  modelValue: e.modelValue,
3080
3110
  footers: e.footers,
3081
3111
  defFooters: v.value,
@@ -3085,7 +3115,7 @@ const Xe = (e) => e.extension instanceof Function ? e.extension(e.options) : e.e
3085
3115
  }, null)]);
3086
3116
  }
3087
3117
  });
3088
- ve.install = (e) => (e.component(ve.name, ve), e.use(yt).use(lt).use(wt).use(We).use(Tt), e);
3118
+ ve.install = (e) => (e.component(ve.name, ve), e.use(yt).use(at).use(wt).use(We).use(Tt), e);
3089
3119
  export {
3090
3120
  ve as default
3091
3121
  };