hexagon-editor 0.1.7 → 0.1.9

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 (150) hide show
  1. package/README.md +381 -52
  2. package/dist/MarkdownEditor.vue.d.ts +28 -4
  3. package/dist/MarkdownEditor.vue.d.ts.map +1 -1
  4. package/dist/{MarkdownEditorLinkForm-B9dEX3WT.js → MarkdownEditorLinkForm-nx1gDLpK.js} +17 -6
  5. package/dist/background-color-DJ1tENTK.js +80 -0
  6. package/dist/{base-BPdMUtQo.js → base-BOV5nzwj.js} +1005 -728
  7. package/dist/classname.d.ts.map +1 -1
  8. package/dist/{index-D_CMntQU.js → color-DYgeN76h.js} +530 -459
  9. package/dist/components/MarkdownEditorFloatingMenus.vue.d.ts +9 -1
  10. package/dist/components/MarkdownEditorFloatingMenus.vue.d.ts.map +1 -1
  11. package/dist/components/MarkdownEditorImageActions.vue.d.ts.map +1 -1
  12. package/dist/components/MarkdownEditorToolbar.vue.d.ts +8 -2
  13. package/dist/components/MarkdownEditorToolbar.vue.d.ts.map +1 -1
  14. package/dist/components/MarkdownEditorToolbarIcon.vue.d.ts.map +1 -1
  15. package/dist/composables/useFloatingPanel.d.ts.map +1 -1
  16. package/dist/composables/useMarkdownEditorValue.d.ts.map +1 -1
  17. package/dist/configure.d.ts.map +1 -1
  18. package/dist/core/actions.d.ts.map +1 -1
  19. package/dist/core/basic-editor-atomic-source.d.ts.map +1 -1
  20. package/dist/core/basic-editor-command-helpers.d.ts +4 -1
  21. package/dist/core/basic-editor-command-helpers.d.ts.map +1 -1
  22. package/dist/core/basic-editor-markdown.d.ts.map +1 -1
  23. package/dist/core/basic-editor-renderers.d.ts.map +1 -1
  24. package/dist/core/basic-editor-runtime-plugins.d.ts.map +1 -1
  25. package/dist/core/basic-editor-selection.d.ts.map +1 -1
  26. package/dist/core/basic-editor-table-controls.d.ts.map +1 -1
  27. package/dist/core/basic-editor-types.d.ts +4 -1
  28. package/dist/core/basic-editor-types.d.ts.map +1 -1
  29. package/dist/core/basic-editor.d.ts.map +1 -1
  30. package/dist/core/content-handler.d.ts.map +1 -1
  31. package/dist/core/editor-instance.d.ts.map +1 -1
  32. package/dist/core/events.d.ts.map +1 -1
  33. package/dist/core/extension-builder.d.ts +1 -1
  34. package/dist/core/extension-builder.d.ts.map +1 -1
  35. package/dist/core/extensions-manager.d.ts.map +1 -1
  36. package/dist/core/lists.d.ts.map +1 -1
  37. package/dist/core/logger.d.ts.map +1 -1
  38. package/dist/core/markdown-parser.d.ts.map +1 -1
  39. package/dist/core/markdown.d.ts.map +1 -1
  40. package/dist/core/markup-commands.d.ts.map +1 -1
  41. package/dist/core/markup-editor.d.ts.map +1 -1
  42. package/dist/core/registries.d.ts.map +1 -1
  43. package/dist/core/schema-dynamic-modifier.d.ts.map +1 -1
  44. package/dist/core/vue-renderer.d.ts.map +1 -1
  45. package/dist/core.js +2 -2
  46. package/dist/directives.d.ts.map +1 -1
  47. package/dist/extensions/additional/folding-heading.d.ts.map +1 -1
  48. package/dist/extensions/additional/math.d.ts.map +1 -1
  49. package/dist/extensions/additional/mermaid.d.ts.map +1 -1
  50. package/dist/extensions/additional/quote-link.d.ts.map +1 -1
  51. package/dist/extensions/additional/yfm-html-block.d.ts.map +1 -1
  52. package/dist/extensions/base.d.ts.map +1 -1
  53. package/dist/extensions/behavior/clicks-on-edges.d.ts.map +1 -1
  54. package/dist/extensions/behavior/clipboard.d.ts.map +1 -1
  55. package/dist/extensions/behavior/cursor.d.ts.map +1 -1
  56. package/dist/extensions/behavior/editor-mode-keymap.d.ts.map +1 -1
  57. package/dist/extensions/behavior/history.d.ts.map +1 -1
  58. package/dist/extensions/behavior/placeholder.d.ts.map +1 -1
  59. package/dist/extensions/behavior/resizable.d.ts.map +1 -1
  60. package/dist/extensions/behavior/selection-commands.d.ts.map +1 -1
  61. package/dist/extensions/behavior/selection-context.d.ts.map +1 -1
  62. package/dist/extensions/behavior/selection.d.ts.map +1 -1
  63. package/dist/extensions/index.d.ts +1 -0
  64. package/dist/extensions/index.d.ts.map +1 -1
  65. package/dist/extensions/markdown/background-color.d.ts +16 -0
  66. package/dist/extensions/markdown/background-color.d.ts.map +1 -0
  67. package/dist/extensions/markdown/blockquote-specs.d.ts.map +1 -1
  68. package/dist/extensions/markdown/blockquote.d.ts.map +1 -1
  69. package/dist/extensions/markdown/bold-specs.d.ts.map +1 -1
  70. package/dist/extensions/markdown/bold.d.ts.map +1 -1
  71. package/dist/extensions/markdown/breaks-specs.d.ts.map +1 -1
  72. package/dist/extensions/markdown/breaks.d.ts +1 -1
  73. package/dist/extensions/markdown/breaks.d.ts.map +1 -1
  74. package/dist/extensions/markdown/code-block-specs.d.ts.map +1 -1
  75. package/dist/extensions/markdown/code-block.d.ts +1 -1
  76. package/dist/extensions/markdown/code-block.d.ts.map +1 -1
  77. package/dist/extensions/markdown/code-specs.d.ts.map +1 -1
  78. package/dist/extensions/markdown/code.d.ts.map +1 -1
  79. package/dist/extensions/markdown/color.d.ts +16 -0
  80. package/dist/extensions/markdown/color.d.ts.map +1 -0
  81. package/dist/extensions/markdown/deflist-specs.d.ts.map +1 -1
  82. package/dist/extensions/markdown/deflist.d.ts +1 -1
  83. package/dist/extensions/markdown/deflist.d.ts.map +1 -1
  84. package/dist/extensions/markdown/heading-specs.d.ts.map +1 -1
  85. package/dist/extensions/markdown/heading.d.ts +1 -1
  86. package/dist/extensions/markdown/heading.d.ts.map +1 -1
  87. package/dist/extensions/markdown/horizontal-rule-specs.d.ts.map +1 -1
  88. package/dist/extensions/markdown/horizontal-rule.d.ts.map +1 -1
  89. package/dist/extensions/markdown/html.d.ts.map +1 -1
  90. package/dist/extensions/markdown/image.d.ts +1 -1
  91. package/dist/extensions/markdown/image.d.ts.map +1 -1
  92. package/dist/extensions/markdown/italic-specs.d.ts.map +1 -1
  93. package/dist/extensions/markdown/italic.d.ts +1 -1
  94. package/dist/extensions/markdown/italic.d.ts.map +1 -1
  95. package/dist/extensions/markdown/link-specs.d.ts.map +1 -1
  96. package/dist/extensions/markdown/link.d.ts +1 -1
  97. package/dist/extensions/markdown/link.d.ts.map +1 -1
  98. package/dist/extensions/markdown/list-specs.d.ts.map +1 -1
  99. package/dist/extensions/markdown/lists.d.ts.map +1 -1
  100. package/dist/extensions/markdown/mark.d.ts.map +1 -1
  101. package/dist/extensions/markdown/strike.d.ts.map +1 -1
  102. package/dist/extensions/markdown/subscript.d.ts.map +1 -1
  103. package/dist/extensions/markdown/table-actions.d.ts.map +1 -1
  104. package/dist/extensions/markdown/table-specs.d.ts.map +1 -1
  105. package/dist/extensions/markdown/table.d.ts +2 -2
  106. package/dist/extensions/markdown/table.d.ts.map +1 -1
  107. package/dist/extensions/markdown/underline.d.ts.map +1 -1
  108. package/dist/extensions.js +121 -111
  109. package/dist/forms/MarkdownEditorForm.vue.d.ts.map +1 -1
  110. package/dist/forms/MarkdownEditorImageForm.vue.d.ts.map +1 -1
  111. package/dist/forms/MarkdownEditorLinkForm.vue.d.ts.map +1 -1
  112. package/dist/forms/MarkdownEditorTextInput.vue.d.ts.map +1 -1
  113. package/dist/forms/index.d.ts.map +1 -1
  114. package/dist/forms.js +1 -1
  115. package/dist/{full-Da8esvj2.js → full-s-sYdwp2.js} +1 -1
  116. package/dist/{full-specs-hXKoMF-0.js → full-specs-Cm3QffD5.js} +1 -1
  117. package/dist/{heading-specs-D7Bj4aIM.js → heading-specs-Dnjn5FYs.js} +136 -51
  118. package/dist/i18n/index.d.ts +17 -0
  119. package/dist/i18n/index.d.ts.map +1 -1
  120. package/dist/i18n.js +39 -5
  121. package/dist/index.css +1 -1
  122. package/dist/index.d.ts +8 -8
  123. package/dist/index.d.ts.map +1 -1
  124. package/dist/index.js +960 -802
  125. package/dist/{markup-commands-BYsx8ADT.js → markup-commands-DW5NFQUO.js} +4082 -4411
  126. package/dist/presets/commonmark-specs.d.ts.map +1 -1
  127. package/dist/presets/commonmark.d.ts.map +1 -1
  128. package/dist/presets/default.d.ts.map +1 -1
  129. package/dist/presets/full-specs.d.ts.map +1 -1
  130. package/dist/presets/full.d.ts.map +1 -1
  131. package/dist/presets/index.d.ts.map +1 -1
  132. package/dist/presets/zero.d.ts.map +1 -1
  133. package/dist/presets.js +2 -2
  134. package/dist/public-types.d.ts.map +1 -1
  135. package/dist/renderer/MarkdownRenderer.vue.d.ts.map +1 -1
  136. package/dist/renderer/index.d.ts.map +1 -1
  137. package/dist/renderer/markdown.d.ts.map +1 -1
  138. package/dist/renderer.css +1 -1
  139. package/dist/renderer.js +672 -568
  140. package/dist/specs.js +53 -14
  141. package/dist/toolbar/config.d.ts +2 -2
  142. package/dist/toolbar/config.d.ts.map +1 -1
  143. package/dist/toolbar/index.d.ts.map +1 -1
  144. package/dist/toolbar.js +21 -22
  145. package/dist/use-markdown-editor.d.ts.map +1 -1
  146. package/dist/version.d.ts +1 -1
  147. package/dist/version.d.ts.map +1 -1
  148. package/package.json +1 -2
  149. package/dist/core/basic-editor-table-popover.d.ts +0 -5
  150. package/dist/core/basic-editor-table-popover.d.ts.map +0 -1
package/dist/index.js CHANGED
@@ -1,61 +1,83 @@
1
- import { Lang as Za, configure as Xa, getConfig as Ja, subscribeConfigure as _a } from "./configure.js";
2
- import { cn as tl } from "./classname.js";
3
- import { getMarkdownEditorMessages as Ze } from "./i18n.js";
4
- import { markdownEditorMessages as ll } from "./i18n.js";
5
- import { n as Xe, v as ge, t as Je, r as _e, o as et, p as tt } from "./markup-commands-BYsx8ADT.js";
6
- import { A as ol, E as il, a as sl, b as rl, c as dl, L as ul, L as ml, M as cl, e as vl, f as gl, P as fl, g as bl, S as kl, h as wl, i as hl, j as yl, k as Cl, W as Ml, l as pl, m as xl, s as Ll, q as Bl, u as Tl } from "./markup-commands-BYsx8ADT.js";
7
- import { c4 as at, c5 as lt, c6 as nt, c7 as ot, c8 as it } from "./base-BPdMUtQo.js";
8
- import { B as Hl, g as $l, h as Sl, i as Vl, k as Al, n as Pl, C as zl, o as Fl, p as Nl, q as Rl, r as Dl, D as Il, E as ql, G as Ol, H as jl, u as Ul, v as Wl, w as Ql, x as Gl, y as Yl, z as Kl, I as Zl, A as Xl, J as Jl, L as _l, K as en, M as tn, P as an, Q as ln, R as nn, S as on, T as sn, U as rn, V as dn, X as un, Y as mn, c9 as cn, Z as vn, _ as gn, $ as fn, a0 as bn, a1 as kn, a2 as wn, a3 as hn, a4 as yn, a5 as Cn, a6 as Mn, ca as pn, cb as xn, cc as Ln, cd as Bn, c as Tn, ce as En, ac as Hn, ad as $n, af as Sn, a as Vn, b as An, ak as Pn, d as zn, e as Fn, f as Nn, an as Rn, ao as Dn, ap as In, aq as qn, ar as On, cf as jn, cg as Un, ch as Wn, ci as Qn, cj as Gn, as as Yn, at as Kn, au as Zn, av as Xn, aw as Jn, ax as _n, ay as eo, az as to, aA as ao, aB as lo, aC as no, aD as oo, aF as io, aG as so, aI as ro, aJ as uo, ck as mo, aN as co, aP as vo, aT as go, aU as fo, aV as bo, aW as ko, aX as wo, aY as ho, j as yo, l as Co, a_ as Mo, a$ as po, m as xo, b7 as Lo, b8 as Bo, bd as To, be as Eo, bh as Ho, bi as $o, bl as So, bn as Vo, bo as Ao, bp as Po, bz as zo, bA as Fo, bB as No, bC as Ro, bD as Do, s as Io, bE as qo, bF as Oo, bL as jo, t as Uo, bN as Wo, bO as Qo, bQ as Go, bR as Yo, bS as Ko, bT as Zo, bU as Xo, bV as Jo, bX as _o, bY as ei, b$ as ti, c0 as ai, c1 as li } from "./base-BPdMUtQo.js";
9
- import { defineComponent as te, openBlock as r, createElementBlock as m, ref as h, Fragment as F, createElementVNode as g, withModifiers as w, createVNode as M, toDisplayString as H, createCommentVNode as E, renderList as se, createStaticVNode as st, unref as c, renderSlot as fe, onBeforeUnmount as be, nextTick as ee, getCurrentInstance as He, computed as Te, watch as J, onMounted as rt, createBlock as _, withCtx as dt, normalizeProps as ut, guardReactiveProps as mt, Teleport as ct, normalizeClass as vt, readonly as ie } from "vue";
10
- import { _ as ae } from "./_plugin-vue_export-helper-CHgC5LLL.js";
11
- import { getToolbarConfig as gt, isToolbarItemEnabled as V, isToolbarItemActive as Y, normalizeToolbarItem as ft, isToolbarItemAvailable as bt } from "./toolbar.js";
12
- import { commonmarkToolbarConfig as oi, createToolbarConfig as ii, createToolbarGroup as si, createToolbarItem as ri, defaultToolbarConfig as di, fullToolbarConfig as ui, markdownEditorToolbarItemIds as mi, minimalToolbarConfig as ci, zeroToolbarConfig as vi } from "./toolbar.js";
13
- import { a as kt, M as wt } from "./MarkdownEditorLinkForm-B9dEX3WT.js";
14
- import { _ as fi, b as bi } from "./MarkdownEditorLinkForm-B9dEX3WT.js";
15
- import "./index-D_CMntQU.js";
16
- import { C as wi, D as hi, F as yi, Z as Ci } from "./full-Da8esvj2.js";
17
- import { C as pi, F as xi } from "./full-specs-hXKoMF-0.js";
18
- import { B as Bi, a as Ti, b as Ei, c as Hi, d as $i, C as Si, e as Vi, f as Ai, D as Pi, g as zi, h as Fi, H as Ni, i as Ri, I as Di, j as Ii, L as qi, k as Oi, T as ji, l as Ui, m as Wi, n as Qi, o as Gi, r as Yi, v as Ki, y as Zi, M as Xi, O as Ji, R as _i, S as es, W as ts, Z as as } from "./heading-specs-D7Bj4aIM.js";
19
- const ht = `<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" viewBox="0 0 16 16"><path fill="currentColor" fill-rule="evenodd" d="M2.47 4.72a.75.75 0 0 0 0 1.06l3 3a.75.75 0 0 0 1.06-1.06L4.81 6H9a3.25 3.25 0 0 1 0 6.5H8A.75.75 0 0 0 8 14h1a4.75 4.75 0 1 0 0-9.5H4.81l1.72-1.72a.75.75 0 0 0-1.06-1.06z" clip-rule="evenodd"/></svg>
20
- `, yt = `<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" viewBox="0 0 16 16"><path fill="currentColor" fill-rule="evenodd" d="M13.53 4.72a.75.75 0 0 1 0 1.06l-3 3a.75.75 0 1 1-1.06-1.06L11.19 6H7a3.25 3.25 0 0 0 0 6.5h1A.75.75 0 0 1 8 14H7a4.75 4.75 0 1 1 0-9.5h4.19L9.47 2.78a.75.75 0 0 1 1.06-1.06z" clip-rule="evenodd"/></svg>
21
- `, Ct = `<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" viewBox="0 0 16 16"><path fill="currentColor" fill-rule="evenodd" d="M4.25 2.25A.75.75 0 0 0 3.5 3v10c0 .414.336.75.75.75H9.5a3.25 3.25 0 0 0 1.477-6.146A3.25 3.25 0 0 0 8.5 2.25zm3.5 5a1.75 1.75 0 1 0 0-3.5h-2v3.5zm-2 1.5v3.5h3a1.75 1.75 0 1 0 0-3.5z" clip-rule="evenodd"/></svg>
22
- `, Mt = `<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" viewBox="0 0 16 16"><path fill="currentColor" fill-rule="evenodd" d="M2.5 5a1.25 1.25 0 1 0 0-2.5 1.25 1.25 0 0 0 0 2.5m3.25-2a.75.75 0 0 0 0 1.5h8.5a.75.75 0 0 0 0-1.5zm0 8.5a.75.75 0 0 0 0 1.5h8.5a.75.75 0 0 0 0-1.5zM5 8a.75.75 0 0 1 .75-.75h8.5a.75.75 0 0 1 0 1.5h-8.5A.75.75 0 0 1 5 8M3.75 8a1.25 1.25 0 1 1-2.5 0 1.25 1.25 0 0 1 2.5 0M2.5 13.5a1.25 1.25 0 1 0 0-2.5 1.25 1.25 0 0 0 0 2.5" clip-rule="evenodd"/></svg>
23
- `, pt = `<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" viewBox="0 0 16 16"><path fill="currentColor" fill-rule="evenodd" d="M2.97 5.47a.75.75 0 0 1 1.06 0L8 9.44l3.97-3.97a.75.75 0 1 1 1.06 1.06l-4.5 4.5a.75.75 0 0 1-1.06 0l-4.5-4.5a.75.75 0 0 1 0-1.06" clip-rule="evenodd"/></svg>
24
- `, xt = `<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" viewBox="0 0 16 16"><path fill="currentColor" fill-rule="evenodd" d="M10.218 3.216a.75.75 0 0 0-1.436-.431l-3 10a.75.75 0 0 0 1.436.43zM4.53 4.97a.75.75 0 0 1 0 1.06L2.56 8l1.97 1.97a.75.75 0 0 1-1.06 1.06l-2.5-2.5a.75.75 0 0 1 0-1.06l2.5-2.5a.75.75 0 0 1 1.06 0m6.94 6.06a.75.75 0 0 1 0-1.06L13.44 8l-1.97-1.97a.75.75 0 0 1 1.06-1.06l2.5 2.5a.75.75 0 0 1 0 1.06l-2.5 2.5a.75.75 0 0 1-1.06 0" clip-rule="evenodd"/></svg>
25
- `, Lt = `<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" viewBox="0 0 16 16"><g clip-path="url(#a)"><path fill="currentColor" fill-rule="evenodd" d="M4.312 4.29a.764.764 0 0 1 1.103-.62.75.75 0 1 0 .67-1.34 2.264 2.264 0 0 0-3.268 1.836L2.706 5.5H1.75a.75.75 0 0 0 0 1.5h.83l-.392 4.71a.764.764 0 0 1-1.103.62.75.75 0 0 0-.67 1.34 2.264 2.264 0 0 0 3.268-1.836L4.086 7H5.25a.75.75 0 1 0 0-1.5H4.21zm6.014 2.23a.75.75 0 0 0-1.152.96l.85 1.02-.85 1.02a.75.75 0 0 0 1.152.96L11 9.672l.674.808a.75.75 0 0 0 1.152-.96l-.85-1.02.85-1.02a.75.75 0 0 0-1.152-.96L11 7.328zM8.02 4.55a.75.75 0 0 1 .43.969l-.145.378a7.25 7.25 0 0 0 0 5.205l.145.378a.75.75 0 0 1-1.4.539l-.145-.378a8.75 8.75 0 0 1 0-6.282l.145-.378a.75.75 0 0 1 .97-.431m5.961 0a.75.75 0 0 1 .97.43l.145.379a8.75 8.75 0 0 1 0 6.282l-.146.378a.75.75 0 1 1-1.4-.538l.146-.379a7.25 7.25 0 0 0 0-5.205l-.146-.378a.75.75 0 0 1 .431-.97" clip-rule="evenodd"/></g><defs><clipPath id="a"><path fill="currentColor" d="M0 0h16v16H0z"/></clipPath></defs></svg>
26
- `, Bt = `<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16" class="g-icon" fill="currentColor" stroke="none" aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 16"><path fill="currentColor" fill-rule="evenodd" d="M7.199 2H8.8a.2.2 0 0 1 .2.2c0 1.808 1.958 2.939 3.524 2.034a.2.2 0 0 1 .271.073l.802 1.388a.2.2 0 0 1-.073.272c-1.566.904-1.566 3.164 0 4.069a.2.2 0 0 1 .073.271l-.802 1.388a.2.2 0 0 1-.271.073C10.958 10.863 9 11.993 9 13.8a.2.2 0 0 1-.199.2H7.2a.2.2 0 0 1-.2-.2c0-1.808-1.958-2.938-3.524-2.034a.2.2 0 0 1-.272-.073l-.8-1.388a.2.2 0 0 1 .072-.271c1.566-.905 1.566-3.165 0-4.07a.2.2 0 0 1-.073-.27l.801-1.389a.2.2 0 0 1 .272-.072C5.042 5.138 7 4.007 7 2.199c0-.11.089-.199.199-.199M5.5 2.2c0-.94.76-1.7 1.699-1.7H8.8c.94 0 1.7.76 1.7 1.7a.85.85 0 0 0 1.274.735 1.7 1.7 0 0 1 2.32.622l.802 1.388c.469.813.19 1.851-.622 2.32a.85.85 0 0 0 0 1.472 1.7 1.7 0 0 1 .622 2.32l-.802 1.388a1.7 1.7 0 0 1-2.32.622.85.85 0 0 0-1.274.735c0 .939-.76 1.7-1.699 1.7H7.2a1.7 1.7 0 0 1-1.699-1.7.85.85 0 0 0-1.274-.735 1.7 1.7 0 0 1-2.32-.622l-.802-1.388a1.7 1.7 0 0 1 .622-2.32.85.85 0 0 0 0-1.471 1.7 1.7 0 0 1-.622-2.32l.801-1.389a1.7 1.7 0 0 1 2.32-.622A.85.85 0 0 0 5.5 2.2m4 5.8a1.5 1.5 0 1 1-3 0 1.5 1.5 0 1 1 3 0M11 8a3 3 0 1 1-6 0 3 3 0 0 1 6 0" clip-rule="evenodd"></path></svg></svg>
27
- `, Tt = `<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" viewBox="0 0 16 16"><path fill="currentColor" fill-rule="evenodd" d="M1.75 8a.75.75 0 0 1 .75-.75h11a.75.75 0 0 1 0 1.5h-11A.75.75 0 0 1 1.75 8" clip-rule="evenodd"/></svg>
28
- `, Et = `<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" viewBox="0 0 16 16"><path fill="currentColor" fill-rule="evenodd" d="M11.5 3h-7A1.5 1.5 0 0 0 3 4.5v5.027l.962-.7a1.75 1.75 0 0 1 2.079.016l.928.696 2.368-2.03a1.75 1.75 0 0 1 2.325.043L13 8.787V4.5A1.5 1.5 0 0 0 11.5 3m3 7.498V4.5a3 3 0 0 0-3-3h-7a3 3 0 0 0-3 3v7a3 3 0 0 0 3 3h7a3 3 0 0 0 3-3zm-1.5.33-2.355-2.174a.25.25 0 0 0-.332-.006L7.488 11.07l-.457.392-.481-.361-1.41-1.057a.25.25 0 0 0-.296-.002L3 11.381v.119A1.5 1.5 0 0 0 4.5 13h7a1.5 1.5 0 0 0 1.5-1.5zM7.5 6a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0" clip-rule="evenodd"/></svg>
29
- `, Ht = `<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" viewBox="0 0 16 16"><path fill="currentColor" fill-rule="evenodd" d="M7.25 2a.75.75 0 0 0 0 1.5h1.317l-2.7 9H4.25a.75.75 0 1 0 0 1.5h4.5a.75.75 0 0 0 0-1.5H7.433l2.7-9h1.617a.75.75 0 0 0 0-1.5z" clip-rule="evenodd"/></svg>
30
- `, $t = `<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" viewBox="0 0 16 16"><path fill="currentColor" fill-rule="evenodd" d="M3.47 6.53a.75.75 0 0 1 1.06 1.061l-.727.727a2.743 2.743 0 0 0 3.879 3.879l.727-.727a.75.75 0 0 1 1.06 1.06l-.726.727a4.243 4.243 0 0 1-6-6zm8 1.879a.75.75 0 0 0 1.06 1.06l.727-.726a4.243 4.243 0 0 0-6-6l-.727.727a.75.75 0 0 0 1.061 1.06l.727-.727a2.743 2.743 0 0 1 3.879 3.879zm-.94-1.879a.75.75 0 1 0-1.06-1.06l-4 4a.75.75 0 1 0 1.06 1.06z" clip-rule="evenodd"/></svg>
31
- `, St = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5">
1
+ import { Lang as vl, configure as bl, getConfig as fl, subscribeConfigure as kl } from "./configure.js";
2
+ import { cn as hl } from "./classname.js";
3
+ import { getMarkdownEditorMessages as lt } from "./i18n.js";
4
+ import { markdownEditorMessages as Cl } from "./i18n.js";
5
+ import { n as ot, v as ke, t as nt, r as it, o as st, p as rt } from "./markup-commands-DW5NFQUO.js";
6
+ import { A as pl, E as xl, a as Ll, b as Bl, c as Tl, L as El, L as $l, M as Hl, e as Vl, f as Sl, P as Al, g as Pl, S as zl, h as Fl, i as Nl, j as Dl, k as Rl, W as Il, l as ql, m as Ol, s as jl, q as Ul, u as Wl } from "./markup-commands-DW5NFQUO.js";
7
+ import { c4 as dt, c5 as ut, c6 as mt, c7 as ct, c8 as gt } from "./base-BOV5nzwj.js";
8
+ import { B as Gl, g as Kl, h as Yl, i as Zl, k as Xl, n as Jl, C as _l, o as eo, p as to, q as ao, r as lo, D as oo, E as no, G as io, H as so, u as ro, v as uo, w as mo, x as co, y as go, z as vo, I as bo, A as fo, J as ko, L as wo, K as ho, M as yo, P as Co, Q as Mo, R as po, S as xo, T as Lo, U as Bo, V as To, X as Eo, Y as $o, c9 as Ho, Z as Vo, _ as So, $ as Ao, a0 as Po, a1 as zo, a2 as Fo, a3 as No, a4 as Do, a5 as Ro, a6 as Io, ca as qo, cb as Oo, cc as jo, cd as Uo, c as Wo, ce as Qo, ac as Go, ad as Ko, af as Yo, a as Zo, b as Xo, ak as Jo, d as _o, e as en, f as tn, an, ao as ln, ap as on, aq as nn, ar as sn, cf as rn, cg as dn, ch as un, ci as mn, cj as cn, as as gn, at as vn, au as bn, av as fn, aw as kn, ax as wn, ay as hn, az as yn, aA as Cn, aB as Mn, aC as pn, aD as xn, aF as Ln, aG as Bn, aI as Tn, aJ as En, ck as $n, aN as Hn, aP as Vn, aT as Sn, aU as An, aV as Pn, aW as zn, aX as Fn, aY as Nn, j as Dn, l as Rn, a_ as In, a$ as qn, m as On, b7 as jn, b8 as Un, bd as Wn, be as Qn, bh as Gn, bi as Kn, bl as Yn, bn as Zn, bo as Xn, bp as Jn, bz as _n, bA as ei, bB as ti, bC as ai, bD as li, s as oi, bE as ni, bF as ii, bL as si, t as ri, bN as di, bO as ui, bQ as mi, bR as ci, bS as gi, bT as vi, bU as bi, bV as fi, bX as ki, bY as wi, b$ as hi, c0 as yi, c1 as Ci } from "./base-BOV5nzwj.js";
9
+ import { defineComponent as ne, openBlock as i, createElementBlock as m, ref as y, Fragment as z, renderList as J, unref as d, withModifiers as h, createElementVNode as g, normalizeStyle as $e, toDisplayString as H, createCommentVNode as $, createVNode as C, createStaticVNode as vt, renderSlot as we, onBeforeUnmount as he, nextTick as oe, getCurrentInstance as Se, computed as He, watch as ae, onMounted as bt, createBlock as le, withCtx as ft, normalizeProps as kt, guardReactiveProps as wt, Teleport as ht, normalizeClass as yt, readonly as ue } from "vue";
10
+ import { d as Ct, t as Mt, e as pt } from "./background-color-DJ1tENTK.js";
11
+ import { t as xt, a as Lt, b as Bt } from "./color-DYgeN76h.js";
12
+ import { _ as ie } from "./_plugin-vue_export-helper-CHgC5LLL.js";
13
+ import { getToolbarConfig as Tt, isToolbarItemEnabled as N, isToolbarItemActive as X, normalizeToolbarItem as Et, isToolbarItemAvailable as $t } from "./toolbar.js";
14
+ import { commonmarkToolbarConfig as pi, createToolbarConfig as xi, createToolbarGroup as Li, createToolbarItem as Bi, defaultToolbarConfig as Ti, fullToolbarConfig as Ei, markdownEditorToolbarItemIds as $i, minimalToolbarConfig as Hi, zeroToolbarConfig as Vi } from "./toolbar.js";
15
+ import { a as Ht, M as Vt } from "./MarkdownEditorLinkForm-nx1gDLpK.js";
16
+ import { _ as Ai, b as Pi } from "./MarkdownEditorLinkForm-nx1gDLpK.js";
17
+ import { C as Fi, D as Ni, F as Di, Z as Ri } from "./full-s-sYdwp2.js";
18
+ import { C as qi, F as Oi } from "./full-specs-Cm3QffD5.js";
19
+ import { B as Ui, a as Wi, b as Qi, c as Gi, d as Ki, C as Yi, e as Zi, f as Xi, D as Ji, g as _i, h as es, H as ts, i as as, I as ls, j as os, L as ns, k as is, T as ss, l as rs, m as ds, n as us, o as ms, r as cs, v as gs, y as vs, M as bs, O as fs, R as ks, S as ws, W as hs, Z as ys } from "./heading-specs-Dnjn5FYs.js";
20
+ const St = `<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" viewBox="0 0 16 16"><path fill="currentColor" fill-rule="evenodd" d="M2.47 4.72a.75.75 0 0 0 0 1.06l3 3a.75.75 0 0 0 1.06-1.06L4.81 6H9a3.25 3.25 0 0 1 0 6.5H8A.75.75 0 0 0 8 14h1a4.75 4.75 0 1 0 0-9.5H4.81l1.72-1.72a.75.75 0 0 0-1.06-1.06z" clip-rule="evenodd"/></svg>
21
+ `, At = `<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" viewBox="0 0 16 16"><path fill="currentColor" fill-rule="evenodd" d="M13.53 4.72a.75.75 0 0 1 0 1.06l-3 3a.75.75 0 1 1-1.06-1.06L11.19 6H7a3.25 3.25 0 0 0 0 6.5h1A.75.75 0 0 1 8 14H7a4.75 4.75 0 1 1 0-9.5h4.19L9.47 2.78a.75.75 0 0 1 1.06-1.06z" clip-rule="evenodd"/></svg>
22
+ `, Pt = `<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" viewBox="0 0 16 16"><path fill="currentColor" fill-rule="evenodd" d="M4.25 2.25A.75.75 0 0 0 3.5 3v10c0 .414.336.75.75.75H9.5a3.25 3.25 0 0 0 1.477-6.146A3.25 3.25 0 0 0 8.5 2.25zm3.5 5a1.75 1.75 0 1 0 0-3.5h-2v3.5zm-2 1.5v3.5h3a1.75 1.75 0 1 0 0-3.5z" clip-rule="evenodd"/></svg>
23
+ `, zt = `<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" viewBox="0 0 16 16"><path fill="currentColor" fill-rule="evenodd" d="M2.5 5a1.25 1.25 0 1 0 0-2.5 1.25 1.25 0 0 0 0 2.5m3.25-2a.75.75 0 0 0 0 1.5h8.5a.75.75 0 0 0 0-1.5zm0 8.5a.75.75 0 0 0 0 1.5h8.5a.75.75 0 0 0 0-1.5zM5 8a.75.75 0 0 1 .75-.75h8.5a.75.75 0 0 1 0 1.5h-8.5A.75.75 0 0 1 5 8M3.75 8a1.25 1.25 0 1 1-2.5 0 1.25 1.25 0 0 1 2.5 0M2.5 13.5a1.25 1.25 0 1 0 0-2.5 1.25 1.25 0 0 0 0 2.5" clip-rule="evenodd"/></svg>
24
+ `, Ft = `<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" viewBox="0 0 16 16"><path fill="currentColor" fill-rule="evenodd" d="M2.97 5.47a.75.75 0 0 1 1.06 0L8 9.44l3.97-3.97a.75.75 0 1 1 1.06 1.06l-4.5 4.5a.75.75 0 0 1-1.06 0l-4.5-4.5a.75.75 0 0 1 0-1.06" clip-rule="evenodd"/></svg>
25
+ `, Nt = `<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" viewBox="0 0 16 16"><path fill="currentColor" fill-rule="evenodd" d="M10.218 3.216a.75.75 0 0 0-1.436-.431l-3 10a.75.75 0 0 0 1.436.43zM4.53 4.97a.75.75 0 0 1 0 1.06L2.56 8l1.97 1.97a.75.75 0 0 1-1.06 1.06l-2.5-2.5a.75.75 0 0 1 0-1.06l2.5-2.5a.75.75 0 0 1 1.06 0m6.94 6.06a.75.75 0 0 1 0-1.06L13.44 8l-1.97-1.97a.75.75 0 0 1 1.06-1.06l2.5 2.5a.75.75 0 0 1 0 1.06l-2.5 2.5a.75.75 0 0 1-1.06 0" clip-rule="evenodd"/></svg>
26
+ `, Dt = `<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" viewBox="0 0 16 16"><g clip-path="url(#a)"><path fill="currentColor" fill-rule="evenodd" d="M4.312 4.29a.764.764 0 0 1 1.103-.62.75.75 0 1 0 .67-1.34 2.264 2.264 0 0 0-3.268 1.836L2.706 5.5H1.75a.75.75 0 0 0 0 1.5h.83l-.392 4.71a.764.764 0 0 1-1.103.62.75.75 0 0 0-.67 1.34 2.264 2.264 0 0 0 3.268-1.836L4.086 7H5.25a.75.75 0 1 0 0-1.5H4.21zm6.014 2.23a.75.75 0 0 0-1.152.96l.85 1.02-.85 1.02a.75.75 0 0 0 1.152.96L11 9.672l.674.808a.75.75 0 0 0 1.152-.96l-.85-1.02.85-1.02a.75.75 0 0 0-1.152-.96L11 7.328zM8.02 4.55a.75.75 0 0 1 .43.969l-.145.378a7.25 7.25 0 0 0 0 5.205l.145.378a.75.75 0 0 1-1.4.539l-.145-.378a8.75 8.75 0 0 1 0-6.282l.145-.378a.75.75 0 0 1 .97-.431m5.961 0a.75.75 0 0 1 .97.43l.145.379a8.75 8.75 0 0 1 0 6.282l-.146.378a.75.75 0 1 1-1.4-.538l.146-.379a7.25 7.25 0 0 0 0-5.205l-.146-.378a.75.75 0 0 1 .431-.97" clip-rule="evenodd"/></g><defs><clipPath id="a"><path fill="currentColor" d="M0 0h16v16H0z"/></clipPath></defs></svg>
27
+ `, Rt = `<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16" class="g-icon" fill="currentColor" stroke="none" aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 16"><path fill="currentColor" fill-rule="evenodd" d="M7.199 2H8.8a.2.2 0 0 1 .2.2c0 1.808 1.958 2.939 3.524 2.034a.2.2 0 0 1 .271.073l.802 1.388a.2.2 0 0 1-.073.272c-1.566.904-1.566 3.164 0 4.069a.2.2 0 0 1 .073.271l-.802 1.388a.2.2 0 0 1-.271.073C10.958 10.863 9 11.993 9 13.8a.2.2 0 0 1-.199.2H7.2a.2.2 0 0 1-.2-.2c0-1.808-1.958-2.938-3.524-2.034a.2.2 0 0 1-.272-.073l-.8-1.388a.2.2 0 0 1 .072-.271c1.566-.905 1.566-3.165 0-4.07a.2.2 0 0 1-.073-.27l.801-1.389a.2.2 0 0 1 .272-.072C5.042 5.138 7 4.007 7 2.199c0-.11.089-.199.199-.199M5.5 2.2c0-.94.76-1.7 1.699-1.7H8.8c.94 0 1.7.76 1.7 1.7a.85.85 0 0 0 1.274.735 1.7 1.7 0 0 1 2.32.622l.802 1.388c.469.813.19 1.851-.622 2.32a.85.85 0 0 0 0 1.472 1.7 1.7 0 0 1 .622 2.32l-.802 1.388a1.7 1.7 0 0 1-2.32.622.85.85 0 0 0-1.274.735c0 .939-.76 1.7-1.699 1.7H7.2a1.7 1.7 0 0 1-1.699-1.7.85.85 0 0 0-1.274-.735 1.7 1.7 0 0 1-2.32-.622l-.802-1.388a1.7 1.7 0 0 1 .622-2.32.85.85 0 0 0 0-1.471 1.7 1.7 0 0 1-.622-2.32l.801-1.389a1.7 1.7 0 0 1 2.32-.622A.85.85 0 0 0 5.5 2.2m4 5.8a1.5 1.5 0 1 1-3 0 1.5 1.5 0 1 1 3 0M11 8a3 3 0 1 1-6 0 3 3 0 0 1 6 0" clip-rule="evenodd"></path></svg></svg>
28
+ `, It = `<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" viewBox="0 0 16 16"><path fill="currentColor" fill-rule="evenodd" d="M1.75 8a.75.75 0 0 1 .75-.75h11a.75.75 0 0 1 0 1.5h-11A.75.75 0 0 1 1.75 8" clip-rule="evenodd"/></svg>
29
+ `, qt = `<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" viewBox="0 0 16 16"><path fill="currentColor" fill-rule="evenodd" d="M11.5 3h-7A1.5 1.5 0 0 0 3 4.5v5.027l.962-.7a1.75 1.75 0 0 1 2.079.016l.928.696 2.368-2.03a1.75 1.75 0 0 1 2.325.043L13 8.787V4.5A1.5 1.5 0 0 0 11.5 3m3 7.498V4.5a3 3 0 0 0-3-3h-7a3 3 0 0 0-3 3v7a3 3 0 0 0 3 3h7a3 3 0 0 0 3-3zm-1.5.33-2.355-2.174a.25.25 0 0 0-.332-.006L7.488 11.07l-.457.392-.481-.361-1.41-1.057a.25.25 0 0 0-.296-.002L3 11.381v.119A1.5 1.5 0 0 0 4.5 13h7a1.5 1.5 0 0 0 1.5-1.5zM7.5 6a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0" clip-rule="evenodd"/></svg>
30
+ `, Ot = `<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" viewBox="0 0 16 16"><path fill="currentColor" fill-rule="evenodd" d="M7.25 2a.75.75 0 0 0 0 1.5h1.317l-2.7 9H4.25a.75.75 0 1 0 0 1.5h4.5a.75.75 0 0 0 0-1.5H7.433l2.7-9h1.617a.75.75 0 0 0 0-1.5z" clip-rule="evenodd"/></svg>
31
+ `, jt = `<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" viewBox="0 0 16 16"><path fill="currentColor" fill-rule="evenodd" d="M3.47 6.53a.75.75 0 0 1 1.06 1.061l-.727.727a2.743 2.743 0 0 0 3.879 3.879l.727-.727a.75.75 0 0 1 1.06 1.06l-.726.727a4.243 4.243 0 0 1-6-6zm8 1.879a.75.75 0 0 0 1.06 1.06l.727-.726a4.243 4.243 0 0 0-6-6l-.727.727a.75.75 0 0 0 1.061 1.06l.727-.727a2.743 2.743 0 0 1 3.879 3.879zm-.94-1.879a.75.75 0 1 0-1.06-1.06l-4 4a.75.75 0 1 0 1.06 1.06z" clip-rule="evenodd"/></svg>
32
+ `, Ut = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5">
32
33
  <rect x="1.5" y="1.5" width="4" height="3" rx=".75"/>
33
34
  <rect x="10.5" y="1.5" width="4" height="3" rx=".75"/>
34
35
  <rect x="6" y="11.5" width="4" height="3" rx=".75"/>
35
36
  <path d="M3.5 4.5v2h4.5v5M12.5 4.5v2H8"/>
36
37
  </svg>
37
- `, Vt = `<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" viewBox="0 0 16 16"><path fill="currentColor" fill-rule="evenodd" d="M3.21 2.5a.5.5 0 0 0-.796-.403l-.71.524a.5.5 0 0 0 .507.856V5a.5.5 0 0 0 1 0zm2.54.5a.75.75 0 1 0 0 1.5h8.5a.75.75 0 0 0 0-1.5zm0 8.5a.75.75 0 0 0 0 1.5h8.5a.75.75 0 0 0 0-1.5zM5 8a.75.75 0 0 1 .75-.75h8.5a.75.75 0 0 1 0 1.5h-8.5A.75.75 0 0 1 5 8m-2.596-.67c-.07.051-.087.097-.09.116a.5.5 0 0 1-.988-.149c.051-.345.26-.61.495-.779.236-.169.531-.268.83-.268.345 0 .666.109.902.343s.337.543.337.85c0 .51-.321.855-.76 1.278l-.02.018-.013.011h.493a.5.5 0 0 1 0 1H1.75a.5.5 0 0 1-.326-.879l1.022-.88c.223-.216.338-.344.398-.434.046-.069.046-.092.046-.111v-.002c0-.09-.027-.127-.041-.141-.013-.013-.062-.053-.199-.053a.44.44 0 0 0-.246.08M1.9 10.5a.5.5 0 0 0 0 1h.38l-.15.18a.5.5 0 0 0 .383.82c.259 0 .365.077.407.122.051.054.08.133.08.218a.02.02 0 0 1-.004.014.2.2 0 0 1-.057.052.7.7 0 0 1-.371.094.55.55 0 0 1-.258-.057c-.059-.032-.075-.061-.076-.064a.5.5 0 0 0-.91.416c.213.464.728.705 1.244.705.319 0 .651-.082.92-.258.275-.181.512-.487.512-.902 0-.293-.096-.634-.355-.906a1.3 1.3 0 0 0-.252-.206l.34-.407a.5.5 0 0 0-.383-.821z" clip-rule="evenodd"/></svg>
38
- `, At = `<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" viewBox="0 0 16 16"><g clip-path="url(#a)"><path fill="currentColor" fill-rule="evenodd" d="M12.411 6.33A2.75 2.75 0 0 1 14.5 9v.25A2.75 2.75 0 0 1 11.75 12h-.25a2.747 2.747 0 0 1-2.748-2.657V9.34H8.75V9q0-.197.027-.386.03-.392.09-.77a8 8 0 0 1 .559-1.918 7.2 7.2 0 0 1 2.162-2.801l.098-.076A.24.24 0 0 1 11.83 3c.186 0 .306.202.22.367a19 19 0 0 0-.22.433 18 18 0 0 0-.43.951 14 14 0 0 0-.557 1.578l.054-.013a2.8 2.8 0 0 1 .603-.066h.25q.343.001.661.08m.549-1.405A4.25 4.25 0 0 1 16 9v.25a4.25 4.25 0 0 1-4.25 4.25h-.25A4.25 4.25 0 0 1 8 11.662 4.25 4.25 0 0 1 4.5 13.5h-.25A4.25 4.25 0 0 1 0 9.336V9q0-.275.035-.543c.207-2.62 1.358-4.966 3.488-6.599A1.74 1.74 0 0 1 4.58 1.5c1.341 0 2.146 1.425 1.548 2.564-.111.211-.26.508-.418.86.788.234 1.481.69 2.005 1.297a8.76 8.76 0 0 1 3.058-4.363A1.74 1.74 0 0 1 11.83 1.5c1.341 0 2.146 1.425 1.548 2.564-.111.211-.26.508-.418.86M5.16 6.33a2.8 2.8 0 0 0-.661-.08h-.25a2.8 2.8 0 0 0-.657.079 14 14 0 0 1 .68-1.865A18 18 0 0 1 4.8 3.367.25.25 0 0 0 4.58 3a.24.24 0 0 0-.144.049 8 8 0 0 0-.93.844 7.2 7.2 0 0 0-1.39 2.172 8 8 0 0 0-.498 1.779q-.062.378-.091.77A3 3 0 0 0 1.5 9v.339h.001v.004A2.747 2.747 0 0 0 4.25 12h.251a2.75 2.75 0 0 0 2.75-2.75V9c0-1.29-.89-2.374-2.089-2.67" clip-rule="evenodd"/></g><defs><clipPath id="a"><path fill="currentColor" d="M0 0h16v16H0z"/></clipPath></defs></svg>
39
- `, Pt = `<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" viewBox="0 0 16 16"><path fill="currentColor" fill-rule="evenodd" d="M5.502 2.757C6.214 2.236 7.122 2 7.984 2c1.685 0 3.015.572 3.687 1.915a.75.75 0 1 1-1.342.67C10.001 3.93 9.331 3.5 7.984 3.5c-.611 0-1.19.17-1.597.468-.384.28-.627.678-.627 1.242 0 .403.165.758.463 1.04H4.447a2.9 2.9 0 0 1-.187-1.04c0-1.084.507-1.916 1.242-2.453m6.047 5.993h1.201a.75.75 0 0 0 0-1.5h-9.5a.75.75 0 0 0 0 1.5h5.475l.043.012h.002c1.196.323 1.98 1.005 1.98 1.988 0 .669-.289 1.063-.742 1.33-.5.296-1.222.437-2 .437-1.398 0-2.453-.472-2.796-1.504a.75.75 0 1 0-1.424.474c.657 1.969 2.602 2.53 4.22 2.53.915 0 1.94-.16 2.762-.644.869-.512 1.48-1.376 1.48-2.623 0-.822-.276-1.481-.7-2" clip-rule="evenodd"/></svg>
40
- `, zt = `<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" viewBox="0 0 16 16"><path fill="currentColor" fill-rule="evenodd" d="M9.25 3.5h-2.5v2h2.5zM4 3.5h1.25v2H2.5V5A1.5 1.5 0 0 1 4 3.5M2.5 7h2.75v2H2.5zm0 3.5v.5A1.5 1.5 0 0 0 4 12.5h1.25v-2zm4.25 0v2h2.5v-2zm4 0v2H12a1.5 1.5 0 0 0 1.5-1.5v-.5zM13.5 9h-2.75V7h2.75zM9.25 9h-2.5V7h2.5zm1.5-5.5v2h2.75V5A1.5 1.5 0 0 0 12 3.5zM4 2a3 3 0 0 0-3 3v6a3 3 0 0 0 3 3h8a3 3 0 0 0 3-3V5a3 3 0 0 0-3-3z" clip-rule="evenodd"/></svg>
41
- `, Ft = `<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" viewBox="0 0 16 16"><path fill="currentColor" fill-rule="evenodd" d="M5 2.75a.75.75 0 0 0-1.5 0V7a4.5 4.5 0 0 0 9 0V2.75a.75.75 0 0 0-1.5 0V7a3 3 0 0 1-6 0zm-.75 9.75a.75.75 0 0 0 0 1.5h7.5a.75.75 0 0 0 0-1.5z" clip-rule="evenodd"/></svg>
42
- `, Nt = ["innerHTML"], Rt = /* @__PURE__ */ te({
38
+ `, Wt = `<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" viewBox="0 0 16 16"><path fill="currentColor" fill-rule="evenodd" d="M3.21 2.5a.5.5 0 0 0-.796-.403l-.71.524a.5.5 0 0 0 .507.856V5a.5.5 0 0 0 1 0zm2.54.5a.75.75 0 1 0 0 1.5h8.5a.75.75 0 0 0 0-1.5zm0 8.5a.75.75 0 0 0 0 1.5h8.5a.75.75 0 0 0 0-1.5zM5 8a.75.75 0 0 1 .75-.75h8.5a.75.75 0 0 1 0 1.5h-8.5A.75.75 0 0 1 5 8m-2.596-.67c-.07.051-.087.097-.09.116a.5.5 0 0 1-.988-.149c.051-.345.26-.61.495-.779.236-.169.531-.268.83-.268.345 0 .666.109.902.343s.337.543.337.85c0 .51-.321.855-.76 1.278l-.02.018-.013.011h.493a.5.5 0 0 1 0 1H1.75a.5.5 0 0 1-.326-.879l1.022-.88c.223-.216.338-.344.398-.434.046-.069.046-.092.046-.111v-.002c0-.09-.027-.127-.041-.141-.013-.013-.062-.053-.199-.053a.44.44 0 0 0-.246.08M1.9 10.5a.5.5 0 0 0 0 1h.38l-.15.18a.5.5 0 0 0 .383.82c.259 0 .365.077.407.122.051.054.08.133.08.218a.02.02 0 0 1-.004.014.2.2 0 0 1-.057.052.7.7 0 0 1-.371.094.55.55 0 0 1-.258-.057c-.059-.032-.075-.061-.076-.064a.5.5 0 0 0-.91.416c.213.464.728.705 1.244.705.319 0 .651-.082.92-.258.275-.181.512-.487.512-.902 0-.293-.096-.634-.355-.906a1.3 1.3 0 0 0-.252-.206l.34-.407a.5.5 0 0 0-.383-.821z" clip-rule="evenodd"/></svg>
39
+ `, Qt = `<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" viewBox="0 0 16 16"><g clip-path="url(#a)"><path fill="currentColor" fill-rule="evenodd" d="M12.411 6.33A2.75 2.75 0 0 1 14.5 9v.25A2.75 2.75 0 0 1 11.75 12h-.25a2.747 2.747 0 0 1-2.748-2.657V9.34H8.75V9q0-.197.027-.386.03-.392.09-.77a8 8 0 0 1 .559-1.918 7.2 7.2 0 0 1 2.162-2.801l.098-.076A.24.24 0 0 1 11.83 3c.186 0 .306.202.22.367a19 19 0 0 0-.22.433 18 18 0 0 0-.43.951 14 14 0 0 0-.557 1.578l.054-.013a2.8 2.8 0 0 1 .603-.066h.25q.343.001.661.08m.549-1.405A4.25 4.25 0 0 1 16 9v.25a4.25 4.25 0 0 1-4.25 4.25h-.25A4.25 4.25 0 0 1 8 11.662 4.25 4.25 0 0 1 4.5 13.5h-.25A4.25 4.25 0 0 1 0 9.336V9q0-.275.035-.543c.207-2.62 1.358-4.966 3.488-6.599A1.74 1.74 0 0 1 4.58 1.5c1.341 0 2.146 1.425 1.548 2.564-.111.211-.26.508-.418.86.788.234 1.481.69 2.005 1.297a8.76 8.76 0 0 1 3.058-4.363A1.74 1.74 0 0 1 11.83 1.5c1.341 0 2.146 1.425 1.548 2.564-.111.211-.26.508-.418.86M5.16 6.33a2.8 2.8 0 0 0-.661-.08h-.25a2.8 2.8 0 0 0-.657.079 14 14 0 0 1 .68-1.865A18 18 0 0 1 4.8 3.367.25.25 0 0 0 4.58 3a.24.24 0 0 0-.144.049 8 8 0 0 0-.93.844 7.2 7.2 0 0 0-1.39 2.172 8 8 0 0 0-.498 1.779q-.062.378-.091.77A3 3 0 0 0 1.5 9v.339h.001v.004A2.747 2.747 0 0 0 4.25 12h.251a2.75 2.75 0 0 0 2.75-2.75V9c0-1.29-.89-2.374-2.089-2.67" clip-rule="evenodd"/></g><defs><clipPath id="a"><path fill="currentColor" d="M0 0h16v16H0z"/></clipPath></defs></svg>
40
+ `, Gt = `<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" viewBox="0 0 16 16"><path fill="currentColor" fill-rule="evenodd" d="M5.502 2.757C6.214 2.236 7.122 2 7.984 2c1.685 0 3.015.572 3.687 1.915a.75.75 0 1 1-1.342.67C10.001 3.93 9.331 3.5 7.984 3.5c-.611 0-1.19.17-1.597.468-.384.28-.627.678-.627 1.242 0 .403.165.758.463 1.04H4.447a2.9 2.9 0 0 1-.187-1.04c0-1.084.507-1.916 1.242-2.453m6.047 5.993h1.201a.75.75 0 0 0 0-1.5h-9.5a.75.75 0 0 0 0 1.5h5.475l.043.012h.002c1.196.323 1.98 1.005 1.98 1.988 0 .669-.289 1.063-.742 1.33-.5.296-1.222.437-2 .437-1.398 0-2.453-.472-2.796-1.504a.75.75 0 1 0-1.424.474c.657 1.969 2.602 2.53 4.22 2.53.915 0 1.94-.16 2.762-.644.869-.512 1.48-1.376 1.48-2.623 0-.822-.276-1.481-.7-2" clip-rule="evenodd"/></svg>
41
+ `, Kt = `<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" viewBox="0 0 16 16"><path fill="currentColor" fill-rule="evenodd" d="M9.25 3.5h-2.5v2h2.5zM4 3.5h1.25v2H2.5V5A1.5 1.5 0 0 1 4 3.5M2.5 7h2.75v2H2.5zm0 3.5v.5A1.5 1.5 0 0 0 4 12.5h1.25v-2zm4.25 0v2h2.5v-2zm4 0v2H12a1.5 1.5 0 0 0 1.5-1.5v-.5zM13.5 9h-2.75V7h2.75zM9.25 9h-2.5V7h2.5zm1.5-5.5v2h2.75V5A1.5 1.5 0 0 0 12 3.5zM4 2a3 3 0 0 0-3 3v6a3 3 0 0 0 3 3h8a3 3 0 0 0 3-3V5a3 3 0 0 0-3-3z" clip-rule="evenodd"/></svg>
42
+ `, Yt = `<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" viewBox="0 0 16 16"><path fill="currentColor" fill-rule="evenodd" d="M5 2.75a.75.75 0 0 0-1.5 0V7a4.5 4.5 0 0 0 9 0V2.75a.75.75 0 0 0-1.5 0V7a3 3 0 0 1-6 0zm-.75 9.75a.75.75 0 0 0 0 1.5h7.5a.75.75 0 0 0 0-1.5z" clip-rule="evenodd"/></svg>
43
+ `, Zt = ["innerHTML"], Xt = /* @__PURE__ */ ne({
43
44
  __name: "MarkdownEditorToolbarIcon",
44
45
  props: {
45
46
  name: {}
46
47
  },
47
48
  setup(e) {
48
- const f = { arrowLeft: ht, arrowRight: yt, bold: Ct, bulletList: Mt, chevronDown: pt, code: xt, function: Lt, gear: Bt, horizontalRule: Tt, image: Et, italic: Ht, link: $t, mermaid: St, orderedList: Vt, quote: At, strike: Pt, table: zt, underline: Ft }, y = e;
49
- return (u, b) => (r(), m("span", {
49
+ const k = {
50
+ arrowLeft: St,
51
+ arrowRight: At,
52
+ bold: Pt,
53
+ bulletList: zt,
54
+ chevronDown: Ft,
55
+ code: Nt,
56
+ function: Dt,
57
+ gear: Rt,
58
+ horizontalRule: It,
59
+ image: qt,
60
+ italic: Ot,
61
+ link: jt,
62
+ mermaid: Ut,
63
+ orderedList: Wt,
64
+ quote: Qt,
65
+ strike: Gt,
66
+ table: Kt,
67
+ underline: Yt
68
+ }, x = e;
69
+ return (c, w) => (i(), m("span", {
50
70
  class: "markdown-editor__toolbar-icon",
51
71
  "aria-hidden": "true",
52
- innerHTML: f[y.name]
53
- }, null, 8, Nt));
72
+ innerHTML: k[x.name]
73
+ }, null, 8, Zt));
54
74
  }
55
- }), p = /* @__PURE__ */ ae(Rt, [["__scopeId", "data-v-ec4329c1"]]), Dt = ["data-theme", "aria-label"], It = ["aria-checked"], qt = ["aria-checked"], Ot = ["data-theme", "aria-label"], jt = ["aria-checked", "onClick"], Ut = { class: "markdown-editor__floating-menu-icon" }, Wt = ["data-theme", "aria-label"], Qt = ["data-theme", "aria-label"], Gt = ["aria-checked"], Yt = ["aria-checked"], Kt = ["disabled"], Zt = ["disabled"], Xt = ["data-theme", "aria-label"], Jt = ["aria-checked", "onClick"], _t = /* @__PURE__ */ te({
75
+ }), p = /* @__PURE__ */ ie(Xt, [["__scopeId", "data-v-ded8a15f"]]), Jt = ["data-theme", "aria-label"], _t = ["onClick"], ea = ["data-theme", "aria-label"], ta = ["onClick"], aa = ["data-theme", "aria-label"], la = ["aria-checked"], oa = ["aria-checked"], na = ["data-theme", "aria-label"], ia = ["aria-checked", "onClick"], sa = { class: "markdown-editor__floating-menu-icon" }, ra = ["data-theme", "aria-label"], da = ["data-theme", "aria-label"], ua = ["aria-checked"], ma = ["aria-checked"], ca = ["disabled"], ga = ["disabled"], va = ["data-theme", "aria-label"], ba = ["aria-checked", "onClick"], fa = /* @__PURE__ */ ne({
56
76
  __name: "MarkdownEditorFloatingMenus",
57
77
  props: {
58
78
  codeVisible: { type: Boolean },
79
+ backgroundColorVisible: { type: Boolean },
80
+ colorVisible: { type: Boolean },
59
81
  formulaVisible: { type: Boolean },
60
82
  headingVisible: { type: Boolean },
61
83
  listVisible: { type: Boolean },
@@ -66,18 +88,76 @@ const ht = `<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill=
66
88
  theme: {},
67
89
  translate: { type: Function }
68
90
  },
69
- emits: ["code-block", "inline-code", "inline-formula", "math-block", "select-mode", "select-text-style", "bullet-list", "ordered-list", "indent-list", "outdent-list"],
70
- setup(e, { expose: f, emit: y }) {
71
- const u = y, b = h(), d = h(), s = h(), i = h(), a = h(), C = ["wysiwyg", "markup", "split"];
72
- return f({
73
- getElement(n) {
74
- return { code: b.value, formula: d.value, heading: s.value, list: i.value, mode: a.value }[n];
91
+ emits: ["code-block", "select-background-color", "select-color", "inline-code", "inline-formula", "math-block", "select-mode", "select-text-style", "bullet-list", "ordered-list", "indent-list", "outdent-list"],
92
+ setup(e, { expose: k, emit: x }) {
93
+ const c = x, w = y(), u = y(), r = y(), s = y(), a = y(), M = y(), l = y(), v = ["wysiwyg", "markup", "split"];
94
+ return k({
95
+ getElement(V) {
96
+ return {
97
+ "background-color": u.value,
98
+ code: w.value,
99
+ color: r.value,
100
+ formula: s.value,
101
+ heading: a.value,
102
+ list: M.value,
103
+ mode: l.value
104
+ }[V];
75
105
  }
76
- }), (n, l) => (r(), m(F, null, [
77
- e.codeVisible ? (r(), m("div", {
106
+ }), (V, o) => (i(), m(z, null, [
107
+ e.backgroundColorVisible ? (i(), m("div", {
78
108
  key: 0,
109
+ ref_key: "backgroundColor",
110
+ ref: u,
111
+ class: "markdown-editor__floating-menu",
112
+ "data-theme": e.theme,
113
+ role: "menu",
114
+ "aria-label": e.translate("backgroundColor")
115
+ }, [
116
+ (i(!0), m(z, null, J(d(Ct), (b) => (i(), m("button", {
117
+ key: b,
118
+ role: "menuitemradio",
119
+ type: "button",
120
+ onMousedown: o[0] || (o[0] = h(() => {
121
+ }, ["prevent"])),
122
+ onClick: (S) => c("select-background-color", b)
123
+ }, [
124
+ g("span", {
125
+ class: "markdown-editor__floating-menu-icon markdown-editor__background-color-icon",
126
+ style: $e(
127
+ b === "default" ? void 0 : { backgroundColor: `var(${d(Mt)[b]})` }
128
+ )
129
+ }, " A ", 4),
130
+ g("span", null, H(e.translate(d(pt)[b])), 1)
131
+ ], 40, _t))), 128))
132
+ ], 8, Jt)) : $("", !0),
133
+ e.colorVisible ? (i(), m("div", {
134
+ key: 1,
135
+ ref_key: "color",
136
+ ref: r,
137
+ class: "markdown-editor__floating-menu",
138
+ "data-theme": e.theme,
139
+ role: "menu",
140
+ "aria-label": e.translate("color")
141
+ }, [
142
+ (i(!0), m(z, null, J(d(xt), (b) => (i(), m("button", {
143
+ key: b,
144
+ role: "menuitemradio",
145
+ type: "button",
146
+ onMousedown: o[1] || (o[1] = h(() => {
147
+ }, ["prevent"])),
148
+ onClick: (S) => c("select-color", b)
149
+ }, [
150
+ g("span", {
151
+ class: "markdown-editor__floating-menu-icon",
152
+ style: $e(b === "default" ? void 0 : { color: `var(${d(Lt)[b]})` })
153
+ }, " A ", 4),
154
+ g("span", null, H(e.translate(d(Bt)[b])), 1)
155
+ ], 40, ta))), 128))
156
+ ], 8, ea)) : $("", !0),
157
+ e.codeVisible ? (i(), m("div", {
158
+ key: 2,
79
159
  ref_key: "code",
80
- ref: b,
160
+ ref: w,
81
161
  class: "markdown-editor__floating-menu",
82
162
  "data-theme": e.theme,
83
163
  role: "menu",
@@ -87,49 +167,49 @@ const ht = `<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill=
87
167
  "aria-checked": e.state.code,
88
168
  role: "menuitemradio",
89
169
  type: "button",
90
- onMousedown: l[0] || (l[0] = w(() => {
170
+ onMousedown: o[2] || (o[2] = h(() => {
91
171
  }, ["prevent"])),
92
- onClick: l[1] || (l[1] = (k) => u("inline-code"))
172
+ onClick: o[3] || (o[3] = (b) => c("inline-code"))
93
173
  }, [
94
- M(p, { name: "code" }),
174
+ C(p, { name: "code" }),
95
175
  g("span", null, H(e.translate("code")), 1)
96
- ], 40, It),
176
+ ], 40, la),
97
177
  g("button", {
98
178
  "aria-checked": e.state.codeBlock,
99
179
  role: "menuitemradio",
100
180
  type: "button",
101
- onMousedown: l[2] || (l[2] = w(() => {
181
+ onMousedown: o[4] || (o[4] = h(() => {
102
182
  }, ["prevent"])),
103
- onClick: l[3] || (l[3] = (k) => u("code-block"))
183
+ onClick: o[5] || (o[5] = (b) => c("code-block"))
104
184
  }, [
105
- l[16] || (l[16] = g("span", { class: "markdown-editor__floating-menu-icon" }, "{ }", -1)),
185
+ o[18] || (o[18] = g("span", { class: "markdown-editor__floating-menu-icon" }, "{ }", -1)),
106
186
  g("span", null, H(e.translate("codeBlock")), 1)
107
- ], 40, qt)
108
- ], 8, Dt)) : E("", !0),
109
- e.headingVisible ? (r(), m("div", {
110
- key: 1,
187
+ ], 40, oa)
188
+ ], 8, aa)) : $("", !0),
189
+ e.headingVisible ? (i(), m("div", {
190
+ key: 3,
111
191
  ref_key: "heading",
112
- ref: s,
192
+ ref: a,
113
193
  class: "markdown-editor__floating-menu",
114
194
  "data-theme": e.theme,
115
195
  role: "menu",
116
196
  "aria-label": e.translate("heading")
117
197
  }, [
118
- (r(), m(F, null, se(["paragraph", "1", "2", "3", "4", "5", "6"], (k) => g("button", {
119
- key: k,
120
- "aria-checked": e.textStyle === k,
198
+ (i(), m(z, null, J(["paragraph", "1", "2", "3", "4", "5", "6"], (b) => g("button", {
199
+ key: b,
200
+ "aria-checked": e.textStyle === b,
121
201
  role: "menuitemradio",
122
202
  type: "button",
123
- onClick: (I) => u("select-text-style", k)
203
+ onClick: (S) => c("select-text-style", b)
124
204
  }, [
125
- g("span", Ut, H(k === "paragraph" ? "T" : `H${k}`), 1),
126
- g("span", null, H(k === "paragraph" ? e.translate("paragraph") : `${e.translate("heading")} ${k}`), 1)
127
- ], 8, jt)), 64))
128
- ], 8, Ot)) : E("", !0),
129
- e.formulaVisible ? (r(), m("div", {
130
- key: 2,
205
+ g("span", sa, H(b === "paragraph" ? "T" : `H${b}`), 1),
206
+ g("span", null, H(b === "paragraph" ? e.translate("paragraph") : `${e.translate("heading")} ${b}`), 1)
207
+ ], 8, ia)), 64))
208
+ ], 8, na)) : $("", !0),
209
+ e.formulaVisible ? (i(), m("div", {
210
+ key: 4,
131
211
  ref_key: "formula",
132
- ref: d,
212
+ ref: s,
133
213
  class: "markdown-editor__floating-menu",
134
214
  "data-theme": e.theme,
135
215
  role: "menu",
@@ -138,28 +218,28 @@ const ht = `<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill=
138
218
  g("button", {
139
219
  role: "menuitem",
140
220
  type: "button",
141
- onMousedown: l[4] || (l[4] = w(() => {
221
+ onMousedown: o[6] || (o[6] = h(() => {
142
222
  }, ["prevent"])),
143
- onClick: l[5] || (l[5] = (k) => u("inline-formula"))
223
+ onClick: o[7] || (o[7] = (b) => c("inline-formula"))
144
224
  }, [
145
- l[17] || (l[17] = g("span", { class: "markdown-editor__floating-menu-icon" }, "ƒ", -1)),
225
+ o[19] || (o[19] = g("span", { class: "markdown-editor__floating-menu-icon" }, "ƒ", -1)),
146
226
  g("span", null, H(e.translate("formulaInline")), 1)
147
227
  ], 32),
148
228
  g("button", {
149
229
  role: "menuitem",
150
230
  type: "button",
151
- onMousedown: l[6] || (l[6] = w(() => {
231
+ onMousedown: o[8] || (o[8] = h(() => {
152
232
  }, ["prevent"])),
153
- onClick: l[7] || (l[7] = (k) => u("math-block"))
233
+ onClick: o[9] || (o[9] = (b) => c("math-block"))
154
234
  }, [
155
- l[18] || (l[18] = g("span", { class: "markdown-editor__floating-menu-icon" }, "∑", -1)),
235
+ o[20] || (o[20] = g("span", { class: "markdown-editor__floating-menu-icon" }, "∑", -1)),
156
236
  g("span", null, H(e.translate("formulaBlock")), 1)
157
237
  ], 32)
158
- ], 8, Wt)) : E("", !0),
159
- e.listVisible ? (r(), m("div", {
160
- key: 3,
238
+ ], 8, ra)) : $("", !0),
239
+ e.listVisible ? (i(), m("div", {
240
+ key: 5,
161
241
  ref_key: "list",
162
- ref: i,
242
+ ref: M,
163
243
  class: "markdown-editor__floating-menu markdown-editor__floating-menu--list",
164
244
  "data-theme": e.theme,
165
245
  role: "menu",
@@ -169,71 +249,71 @@ const ht = `<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill=
169
249
  "aria-checked": e.state.bulletList,
170
250
  role: "menuitemradio",
171
251
  type: "button",
172
- onMousedown: l[8] || (l[8] = w(() => {
252
+ onMousedown: o[10] || (o[10] = h(() => {
173
253
  }, ["prevent"])),
174
- onClick: l[9] || (l[9] = (k) => u("bullet-list"))
254
+ onClick: o[11] || (o[11] = (b) => c("bullet-list"))
175
255
  }, [
176
- M(p, { name: "bulletList" }),
256
+ C(p, { name: "bulletList" }),
177
257
  g("span", null, H(e.translate("bulletList")), 1)
178
- ], 40, Gt),
258
+ ], 40, ua),
179
259
  g("button", {
180
260
  "aria-checked": e.state.orderedList,
181
261
  role: "menuitemradio",
182
262
  type: "button",
183
- onMousedown: l[10] || (l[10] = w(() => {
263
+ onMousedown: o[12] || (o[12] = h(() => {
184
264
  }, ["prevent"])),
185
- onClick: l[11] || (l[11] = (k) => u("ordered-list"))
265
+ onClick: o[13] || (o[13] = (b) => c("ordered-list"))
186
266
  }, [
187
- M(p, { name: "orderedList" }),
267
+ C(p, { name: "orderedList" }),
188
268
  g("span", null, H(e.translate("orderedList")), 1)
189
- ], 40, Yt),
269
+ ], 40, ma),
190
270
  g("button", {
191
271
  disabled: !e.state.listIndentEnabled,
192
272
  role: "menuitem",
193
273
  type: "button",
194
- onMousedown: l[12] || (l[12] = w(() => {
274
+ onMousedown: o[14] || (o[14] = h(() => {
195
275
  }, ["prevent"])),
196
- onClick: l[13] || (l[13] = (k) => u("indent-list"))
276
+ onClick: o[15] || (o[15] = (b) => c("indent-list"))
197
277
  }, [
198
- l[19] || (l[19] = g("span", { class: "markdown-editor__floating-menu-icon" }, "→", -1)),
278
+ o[21] || (o[21] = g("span", { class: "markdown-editor__floating-menu-icon" }, "→", -1)),
199
279
  g("span", null, H(e.translate("listIndent")), 1),
200
- l[20] || (l[20] = g("kbd", null, "Tab", -1))
201
- ], 40, Kt),
280
+ o[22] || (o[22] = g("kbd", null, "Tab", -1))
281
+ ], 40, ca),
202
282
  g("button", {
203
283
  disabled: !e.state.listOutdentEnabled,
204
284
  role: "menuitem",
205
285
  type: "button",
206
- onMousedown: l[14] || (l[14] = w(() => {
286
+ onMousedown: o[16] || (o[16] = h(() => {
207
287
  }, ["prevent"])),
208
- onClick: l[15] || (l[15] = (k) => u("outdent-list"))
288
+ onClick: o[17] || (o[17] = (b) => c("outdent-list"))
209
289
  }, [
210
- l[21] || (l[21] = g("span", { class: "markdown-editor__floating-menu-icon" }, "←", -1)),
290
+ o[23] || (o[23] = g("span", { class: "markdown-editor__floating-menu-icon" }, "←", -1)),
211
291
  g("span", null, H(e.translate("listOutdent")), 1),
212
- l[22] || (l[22] = g("kbd", null, "⇧ Tab", -1))
213
- ], 40, Zt)
214
- ], 8, Qt)) : E("", !0),
215
- e.modeVisible ? (r(), m("div", {
216
- key: 4,
292
+ o[24] || (o[24] = g("kbd", null, "⇧ Tab", -1))
293
+ ], 40, ga)
294
+ ], 8, da)) : $("", !0),
295
+ e.modeVisible ? (i(), m("div", {
296
+ key: 6,
217
297
  ref_key: "modeMenu",
218
- ref: a,
298
+ ref: l,
219
299
  class: "markdown-editor__floating-menu",
220
300
  "data-theme": e.theme,
221
301
  role: "menu",
222
302
  "aria-label": e.translate("mode")
223
303
  }, [
224
- (r(), m(F, null, se(C, (k) => g("button", {
225
- key: k,
226
- "aria-checked": e.mode === k,
304
+ (i(), m(z, null, J(v, (b) => g("button", {
305
+ key: b,
306
+ "aria-checked": e.mode === b,
227
307
  role: "menuitemradio",
228
308
  type: "button",
229
- onClick: (I) => u("select-mode", k)
309
+ onClick: (S) => c("select-mode", b)
230
310
  }, [
231
- g("span", null, H(e.translate(k === "wysiwyg" ? "visual" : k)), 1)
232
- ], 8, Jt)), 64))
233
- ], 8, Xt)) : E("", !0)
311
+ g("span", null, H(e.translate(b === "wysiwyg" ? "visual" : b)), 1)
312
+ ], 8, ba)), 64))
313
+ ], 8, va)) : $("", !0)
234
314
  ], 64));
235
315
  }
236
- }), ea = /* @__PURE__ */ ae(_t, [["__scopeId", "data-v-864eac67"]]), ta = ["data-theme", "aria-label"], aa = ["aria-label", "title"], la = ["value", "aria-label"], na = /* @__PURE__ */ te({
316
+ }), ka = /* @__PURE__ */ ie(fa, [["__scopeId", "data-v-84979053"]]), wa = ["data-theme", "aria-label"], ha = ["aria-label", "title"], ya = ["value", "aria-label"], Ca = /* @__PURE__ */ ne({
237
317
  __name: "MarkdownEditorImageActions",
238
318
  props: {
239
319
  objectFit: {},
@@ -241,11 +321,11 @@ const ht = `<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill=
241
321
  translate: { type: Function }
242
322
  },
243
323
  emits: ["full-width", "object-fit"],
244
- setup(e, { expose: f, emit: y }) {
245
- const u = y, b = h();
246
- return f({ element: b }), (d, s) => (r(), m("div", {
324
+ setup(e, { expose: k, emit: x }) {
325
+ const c = x, w = y();
326
+ return k({ element: w }), (u, r) => (i(), m("div", {
247
327
  ref_key: "element",
248
- ref: b,
328
+ ref: w,
249
329
  class: "markdown-editor__image-actions",
250
330
  "data-theme": e.theme,
251
331
  role: "toolbar",
@@ -255,23 +335,25 @@ const ht = `<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill=
255
335
  type: "button",
256
336
  "aria-label": e.translate("imageWidthFull"),
257
337
  title: e.translate("imageWidthFull"),
258
- onMousedown: s[0] || (s[0] = w(() => {
338
+ onMousedown: r[0] || (r[0] = h(() => {
259
339
  }, ["prevent"])),
260
- onClick: s[1] || (s[1] = (i) => u("full-width"))
261
- }, "↔", 40, aa),
340
+ onClick: r[1] || (r[1] = (s) => c("full-width"))
341
+ }, " ↔ ", 40, ha),
262
342
  g("select", {
263
343
  value: e.objectFit ?? "contain",
264
344
  "aria-label": e.translate("imageFit"),
265
- onChange: s[2] || (s[2] = (i) => u("object-fit", i.target.value))
266
- }, [...s[3] || (s[3] = [
267
- st('<option value="contain" data-v-0158c930>Contain</option><option value="cover" data-v-0158c930>Cover</option><option value="fill" data-v-0158c930>Fill</option><option value="none" data-v-0158c930>None</option><option value="scale-down" data-v-0158c930>Scale down</option>', 5)
268
- ])], 40, la)
269
- ], 8, ta));
345
+ onChange: r[2] || (r[2] = (s) => c("object-fit", s.target.value))
346
+ }, [...r[3] || (r[3] = [
347
+ vt('<option value="contain" data-v-8660b8bb>Contain</option><option value="cover" data-v-8660b8bb>Cover</option><option value="fill" data-v-8660b8bb>Fill</option><option value="none" data-v-8660b8bb>None</option><option value="scale-down" data-v-8660b8bb>Scale down</option>', 5)
348
+ ])], 40, ya)
349
+ ], 8, wa));
270
350
  }
271
- }), oa = /* @__PURE__ */ ae(na, [["__scopeId", "data-v-0158c930"]]), ia = ["aria-label"], sa = { class: "markdown-editor__toolbar-buttons" }, ra = ["data-toolbar-group"], da = ["disabled", "aria-label", "title", "onClick"], ua = ["disabled", "aria-label", "title", "onClick"], ma = ["aria-expanded", "aria-label", "aria-pressed", "title"], ca = ["disabled", "aria-label", "aria-pressed", "title", "onClick"], va = ["disabled", "aria-label", "aria-pressed", "title", "onClick"], ga = ["disabled", "aria-label", "aria-pressed", "title", "onClick"], fa = ["disabled", "aria-label", "aria-pressed", "title", "onClick"], ba = ["disabled", "aria-label", "aria-pressed", "title", "onClick"], ka = ["aria-expanded", "aria-label", "aria-pressed", "title"], wa = ["aria-expanded", "aria-label", "aria-pressed", "title"], ha = ["disabled", "aria-label", "aria-pressed", "title", "onClick"], ya = ["aria-label", "aria-pressed", "title"], Ca = ["aria-expanded", "aria-pressed", "aria-label", "title"], Ma = ["title"], pa = ["aria-label"], xa = ["aria-expanded", "aria-label", "title"], La = ["aria-expanded", "aria-label", "aria-pressed", "title"], Ba = ["aria-label", "aria-pressed", "title", "onClick"], Ta = ["aria-label", "title"], Ea = ["aria-label", "title"], Ha = ["aria-label", "title"], $a = ["aria-expanded", "aria-label", "title"], Sa = /* @__PURE__ */ te({
351
+ }), Ma = /* @__PURE__ */ ie(Ca, [["__scopeId", "data-v-8660b8bb"]]), pa = ["aria-label"], xa = { class: "markdown-editor__toolbar-buttons" }, La = ["data-toolbar-group"], Ba = ["disabled", "aria-label", "title", "onClick"], Ta = ["disabled", "aria-label", "title", "onClick"], Ea = ["aria-expanded", "aria-label", "aria-pressed", "title"], $a = ["disabled", "aria-label", "aria-pressed", "title", "onClick"], Ha = ["disabled", "aria-label", "aria-pressed", "title", "onClick"], Va = ["disabled", "aria-label", "aria-pressed", "title", "onClick"], Sa = ["disabled", "aria-label", "aria-pressed", "title", "onClick"], Aa = ["disabled", "aria-label", "aria-pressed", "title", "onClick"], Pa = ["aria-expanded", "aria-label", "aria-pressed", "title"], za = ["aria-expanded", "aria-label", "aria-pressed", "title"], Fa = ["disabled", "aria-label", "aria-pressed", "title", "onClick"], Na = ["aria-label", "aria-pressed", "title"], Da = ["aria-expanded", "aria-pressed", "aria-label", "title"], Ra = ["aria-expanded", "aria-label", "title"], Ia = ["aria-expanded", "aria-label", "title"], qa = ["aria-expanded", "aria-label", "title"], Oa = ["aria-expanded", "aria-label", "aria-pressed", "title"], ja = ["aria-label", "aria-pressed", "title", "onClick"], Ua = ["aria-label", "title"], Wa = ["aria-label", "title"], Qa = ["aria-label", "title"], Ga = ["aria-expanded", "aria-label", "title"], Ka = /* @__PURE__ */ ne({
272
352
  __name: "MarkdownEditorToolbar",
273
353
  props: {
274
354
  commands: {},
355
+ backgroundColorMenuVisible: { type: Boolean },
356
+ colorMenuVisible: { type: Boolean },
275
357
  codeMenuVisible: { type: Boolean },
276
358
  formulaMenuVisible: { type: Boolean },
277
359
  headingMenuVisible: { type: Boolean },
@@ -287,64 +369,64 @@ const ht = `<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill=
287
369
  features: {},
288
370
  translate: { type: Function }
289
371
  },
290
- emits: ["execute", "insert-html", "toggle-formula-menu", "toggle-code-menu", "toggle-heading-menu", "toggle-image-editor", "toggle-link-editor", "toggle-list-menu", "toggle-mode-menu"],
291
- setup(e, { emit: f }) {
292
- const y = e;
293
- function u(i) {
294
- return i.map(ft).filter((a) => bt(a, y.state));
372
+ emits: ["execute", "insert-html", "toggle-formula-menu", "toggle-code-menu", "toggle-background-color-menu", "toggle-color-menu", "toggle-heading-menu", "toggle-image-editor", "toggle-link-editor", "toggle-list-menu", "toggle-mode-menu"],
373
+ setup(e, { emit: k }) {
374
+ const x = e;
375
+ function c(s) {
376
+ return s.map(Et).filter((a) => $t(a, x.state));
295
377
  }
296
- function b(i, a) {
297
- V(i, y.state) && (i.action ? i.action.run({
298
- commands: y.commands,
299
- execute: (C) => d("execute", i.id, C),
300
- state: y.state
301
- }) : d("execute", i.id, a));
378
+ function w(s, a) {
379
+ N(s, x.state) && (s.action ? s.action.run({
380
+ commands: x.commands,
381
+ execute: (M) => u("execute", s.id, M),
382
+ state: x.state
383
+ }) : u("execute", s.id, a));
302
384
  }
303
- const d = f;
304
- function s(i) {
305
- return i.currentTarget;
385
+ const u = k;
386
+ function r(s) {
387
+ return s.currentTarget;
306
388
  }
307
- return (i, a) => (r(), m("div", {
389
+ return (s, a) => (i(), m("div", {
308
390
  class: "markdown-editor__toolbar",
309
391
  "data-markdown-editor-toolbar": "",
310
392
  role: "toolbar",
311
393
  "aria-label": e.translate("toolbar")
312
394
  }, [
313
- g("div", sa, [
314
- (r(!0), m(F, null, se((e.toolbarConfig ?? c(gt)(e.toolbarPreset)).groups, (C) => (r(), m("div", {
315
- key: C.id,
395
+ g("div", xa, [
396
+ (i(!0), m(z, null, J((e.toolbarConfig ?? d(Tt)(e.toolbarPreset)).groups, (M) => (i(), m("div", {
397
+ key: M.id,
316
398
  class: "markdown-editor__toolbar-group",
317
399
  role: "group",
318
- "data-toolbar-group": C.id
400
+ "data-toolbar-group": M.id
319
401
  }, [
320
- (r(!0), m(F, null, se(u(C.items), (n) => (r(), m(F, {
321
- key: n.id
402
+ (i(!0), m(z, null, J(c(M.items), (l) => (i(), m(z, {
403
+ key: l.id
322
404
  }, [
323
- n.id === "undo" ? (r(), m("button", {
405
+ l.id === "undo" ? (i(), m("button", {
324
406
  key: 0,
325
407
  "data-toolbar-item": "undo",
326
408
  type: "button",
327
- disabled: !c(V)(n, e.state),
409
+ disabled: !d(N)(l, e.state),
328
410
  "aria-label": e.translate("undo"),
329
411
  title: e.translate("undo"),
330
- onMousedown: a[0] || (a[0] = w(() => {
412
+ onMousedown: a[0] || (a[0] = h(() => {
331
413
  }, ["prevent"])),
332
- onClick: (l) => b(n, e.commands.undo)
414
+ onClick: (v) => w(l, e.commands.undo)
333
415
  }, [
334
- M(p, { name: "arrowLeft" })
335
- ], 40, da)) : n.id === "redo" ? (r(), m("button", {
416
+ C(p, { name: "arrowLeft" })
417
+ ], 40, Ba)) : l.id === "redo" ? (i(), m("button", {
336
418
  key: 1,
337
419
  "data-toolbar-item": "redo",
338
420
  type: "button",
339
- disabled: !c(V)(n, e.state),
421
+ disabled: !d(N)(l, e.state),
340
422
  "aria-label": e.translate("redo"),
341
423
  title: e.translate("redo"),
342
- onMousedown: a[1] || (a[1] = w(() => {
424
+ onMousedown: a[1] || (a[1] = h(() => {
343
425
  }, ["prevent"])),
344
- onClick: (l) => b(n, e.commands.redo)
426
+ onClick: (v) => w(l, e.commands.redo)
345
427
  }, [
346
- M(p, { name: "arrowRight" })
347
- ], 40, ua)) : n.id === "heading" ? (r(), m("button", {
428
+ C(p, { name: "arrowRight" })
429
+ ], 40, Ta)) : l.id === "heading" ? (i(), m("button", {
348
430
  key: 2,
349
431
  class: "markdown-editor__toolbar-heading",
350
432
  "data-toolbar-item": "heading",
@@ -353,76 +435,76 @@ const ht = `<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill=
353
435
  "aria-pressed": e.state.headingLevel !== void 0,
354
436
  title: e.translate("heading"),
355
437
  type: "button",
356
- onMousedown: a[2] || (a[2] = w(() => {
438
+ onMousedown: a[2] || (a[2] = h(() => {
357
439
  }, ["prevent"])),
358
- onClick: a[3] || (a[3] = (l) => d("toggle-heading-menu", s(l)))
440
+ onClick: a[3] || (a[3] = (v) => u("toggle-heading-menu", r(v)))
359
441
  }, [
360
442
  g("span", null, H(e.textStyleLabel), 1),
361
- M(p, { name: "chevronDown" })
362
- ], 40, ma)) : n.id === "bold" ? (r(), m("button", {
443
+ C(p, { name: "chevronDown" })
444
+ ], 40, Ea)) : l.id === "bold" ? (i(), m("button", {
363
445
  key: 3,
364
446
  "data-toolbar-item": "bold",
365
- disabled: !c(V)(n, e.state),
447
+ disabled: !d(N)(l, e.state),
366
448
  "aria-label": e.translate("bold"),
367
- "aria-pressed": c(Y)(n, e.state, e.state.bold),
449
+ "aria-pressed": d(X)(l, e.state, e.state.bold),
368
450
  type: "button",
369
451
  title: e.translate("bold"),
370
- onMousedown: a[4] || (a[4] = w(() => {
452
+ onMousedown: a[4] || (a[4] = h(() => {
371
453
  }, ["prevent"])),
372
- onClick: (l) => b(n, e.commands.bold)
454
+ onClick: (v) => w(l, e.commands.bold)
373
455
  }, [
374
- M(p, { name: "bold" })
375
- ], 40, ca)) : n.id === "italic" ? (r(), m("button", {
456
+ C(p, { name: "bold" })
457
+ ], 40, $a)) : l.id === "italic" ? (i(), m("button", {
376
458
  key: 4,
377
459
  "data-toolbar-item": "italic",
378
- disabled: !c(V)(n, e.state),
460
+ disabled: !d(N)(l, e.state),
379
461
  "aria-label": e.translate("italic"),
380
- "aria-pressed": c(Y)(n, e.state, e.state.italic),
462
+ "aria-pressed": d(X)(l, e.state, e.state.italic),
381
463
  type: "button",
382
464
  title: e.translate("italic"),
383
- onMousedown: a[5] || (a[5] = w(() => {
465
+ onMousedown: a[5] || (a[5] = h(() => {
384
466
  }, ["prevent"])),
385
- onClick: (l) => b(n, e.commands.italic)
467
+ onClick: (v) => w(l, e.commands.italic)
386
468
  }, [
387
- M(p, { name: "italic" })
388
- ], 40, va)) : n.id === "underline" ? (r(), m("button", {
469
+ C(p, { name: "italic" })
470
+ ], 40, Ha)) : l.id === "underline" ? (i(), m("button", {
389
471
  key: 5,
390
472
  "data-toolbar-item": "underline",
391
- disabled: !c(V)(n, e.state),
473
+ disabled: !d(N)(l, e.state),
392
474
  "aria-label": e.translate("underline"),
393
- "aria-pressed": c(Y)(n, e.state, e.state.underline),
475
+ "aria-pressed": d(X)(l, e.state, e.state.underline),
394
476
  type: "button",
395
477
  title: e.translate("underline"),
396
- onMousedown: a[6] || (a[6] = w(() => {
478
+ onMousedown: a[6] || (a[6] = h(() => {
397
479
  }, ["prevent"])),
398
- onClick: (l) => b(n, e.commands.underline)
480
+ onClick: (v) => w(l, e.commands.underline)
399
481
  }, [
400
- M(p, { name: "underline" })
401
- ], 40, ga)) : n.id === "strike" ? (r(), m("button", {
482
+ C(p, { name: "underline" })
483
+ ], 40, Va)) : l.id === "strike" ? (i(), m("button", {
402
484
  key: 6,
403
485
  "data-toolbar-item": "strike",
404
- disabled: !c(V)(n, e.state),
486
+ disabled: !d(N)(l, e.state),
405
487
  "aria-label": e.translate("strike"),
406
- "aria-pressed": c(Y)(n, e.state, e.state.strikethrough),
488
+ "aria-pressed": d(X)(l, e.state, e.state.strikethrough),
407
489
  type: "button",
408
490
  title: e.translate("strike"),
409
- onMousedown: a[7] || (a[7] = w(() => {
491
+ onMousedown: a[7] || (a[7] = h(() => {
410
492
  }, ["prevent"])),
411
- onClick: (l) => b(n, e.commands.strikethrough)
493
+ onClick: (v) => w(l, e.commands.strikethrough)
412
494
  }, [
413
- M(p, { name: "strike" })
414
- ], 40, fa)) : n.id === "mark" ? (r(), m("button", {
495
+ C(p, { name: "strike" })
496
+ ], 40, Sa)) : l.id === "mark" ? (i(), m("button", {
415
497
  key: 7,
416
498
  "data-toolbar-item": "mark",
417
- disabled: !c(V)(n, e.state),
499
+ disabled: !d(N)(l, e.state),
418
500
  "aria-label": e.translate("mark"),
419
- "aria-pressed": c(Y)(n, e.state, e.state.mark),
501
+ "aria-pressed": d(X)(l, e.state, e.state.mark),
420
502
  type: "button",
421
503
  title: e.translate("mark"),
422
- onMousedown: a[8] || (a[8] = w(() => {
504
+ onMousedown: a[8] || (a[8] = h(() => {
423
505
  }, ["prevent"])),
424
- onClick: (l) => b(n, e.commands.mark)
425
- }, " M ", 40, ba)) : n.id === "code" ? (r(), m("button", {
506
+ onClick: (v) => w(l, e.commands.mark)
507
+ }, " M ", 40, Aa)) : l.id === "code" ? (i(), m("button", {
426
508
  key: 8,
427
509
  class: "markdown-editor__toolbar-code",
428
510
  "data-toolbar-item": "code",
@@ -431,13 +513,13 @@ const ht = `<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill=
431
513
  "aria-pressed": e.state.code || e.state.codeBlock,
432
514
  title: e.translate(e.state.codeBlock ? "codeBlock" : "code"),
433
515
  type: "button",
434
- onMousedown: a[9] || (a[9] = w(() => {
516
+ onMousedown: a[9] || (a[9] = h(() => {
435
517
  }, ["prevent"])),
436
- onClick: a[10] || (a[10] = (l) => d("toggle-code-menu", s(l)))
518
+ onClick: a[10] || (a[10] = (v) => u("toggle-code-menu", r(v)))
437
519
  }, [
438
- M(p, { name: "code" }),
439
- M(p, { name: "chevronDown" })
440
- ], 40, ka)) : n.id === "bullet-list" ? (r(), m("button", {
520
+ C(p, { name: "code" }),
521
+ C(p, { name: "chevronDown" })
522
+ ], 40, Pa)) : l.id === "bullet-list" ? (i(), m("button", {
441
523
  key: 9,
442
524
  class: "markdown-editor__toolbar-list",
443
525
  "data-toolbar-item": "list",
@@ -446,38 +528,38 @@ const ht = `<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill=
446
528
  "aria-pressed": e.state.bulletList || e.state.orderedList,
447
529
  title: e.translate(e.state.orderedList ? "orderedList" : "bulletList"),
448
530
  type: "button",
449
- onMousedown: a[11] || (a[11] = w(() => {
531
+ onMousedown: a[11] || (a[11] = h(() => {
450
532
  }, ["prevent"])),
451
- onClick: a[12] || (a[12] = (l) => d("toggle-list-menu", s(l)))
533
+ onClick: a[12] || (a[12] = (v) => u("toggle-list-menu", r(v)))
452
534
  }, [
453
- M(p, {
535
+ C(p, {
454
536
  name: e.state.orderedList ? "orderedList" : "bulletList"
455
537
  }, null, 8, ["name"]),
456
- M(p, { name: "chevronDown" })
457
- ], 40, wa)) : n.id === "ordered-list" ? (r(), m(F, { key: 10 }, [], 64)) : n.id === "quote" ? (r(), m("button", {
538
+ C(p, { name: "chevronDown" })
539
+ ], 40, za)) : l.id === "ordered-list" ? (i(), m(z, { key: 10 }, [], 64)) : l.id === "quote" ? (i(), m("button", {
458
540
  key: 11,
459
541
  "data-toolbar-item": "quote",
460
- disabled: !c(V)(n, e.state),
542
+ disabled: !d(N)(l, e.state),
461
543
  "aria-label": e.translate("quote"),
462
- "aria-pressed": c(Y)(n, e.state, e.state.quote),
544
+ "aria-pressed": d(X)(l, e.state, e.state.quote),
463
545
  type: "button",
464
546
  title: e.translate("quote"),
465
- onMousedown: a[13] || (a[13] = w(() => {
547
+ onMousedown: a[13] || (a[13] = h(() => {
466
548
  }, ["prevent"])),
467
- onClick: (l) => b(n, e.commands.quote)
549
+ onClick: (v) => w(l, e.commands.quote)
468
550
  }, [
469
- M(p, { name: "quote" })
470
- ], 40, ha)) : n.id === "fold-heading" ? (r(), m("button", {
551
+ C(p, { name: "quote" })
552
+ ], 40, Fa)) : l.id === "fold-heading" ? (i(), m("button", {
471
553
  key: 12,
472
554
  "data-toolbar-item": "fold-heading",
473
555
  "aria-label": e.translate("foldHeading"),
474
556
  "aria-pressed": e.state.headingFolded,
475
557
  type: "button",
476
558
  title: e.translate("foldHeading"),
477
- onMousedown: a[14] || (a[14] = w(() => {
559
+ onMousedown: a[14] || (a[14] = h(() => {
478
560
  }, ["prevent"])),
479
- onClick: a[15] || (a[15] = (l) => d("execute", "fold-heading", e.commands.toggleHeadingFolding))
480
- }, " ▸ ", 40, ya)) : n.id === "code-block" ? (r(), m(F, { key: 13 }, [], 64)) : n.id === "link" ? (r(), m("button", {
561
+ onClick: a[15] || (a[15] = (v) => u("execute", "fold-heading", e.commands.toggleHeadingFolding))
562
+ }, " ▸ ", 40, Na)) : l.id === "code-block" ? (i(), m(z, { key: 13 }, [], 64)) : l.id === "link" ? (i(), m("button", {
481
563
  key: 14,
482
564
  "data-toolbar-item": "link",
483
565
  "aria-expanded": e.linkEditorVisible,
@@ -485,97 +567,111 @@ const ht = `<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill=
485
567
  type: "button",
486
568
  "aria-label": e.translate("link"),
487
569
  title: e.translate("link"),
488
- onMousedown: a[16] || (a[16] = w(() => {
570
+ onMousedown: a[16] || (a[16] = h(() => {
489
571
  }, ["prevent"])),
490
- onClick: a[17] || (a[17] = (l) => d("toggle-link-editor", s(l)))
572
+ onClick: a[17] || (a[17] = (v) => u("toggle-link-editor", r(v)))
491
573
  }, [
492
- M(p, { name: "link" })
493
- ], 40, Ca)) : n.id === "color" ? (r(), m("label", {
574
+ C(p, { name: "link" })
575
+ ], 40, Da)) : l.id === "background-color" ? (i(), m("button", {
494
576
  key: 15,
495
- "data-toolbar-item": "color",
496
- class: "markdown-editor__color",
497
- title: e.translate("color")
577
+ "data-toolbar-item": "background-color",
578
+ "aria-expanded": e.backgroundColorMenuVisible,
579
+ "aria-label": e.translate("backgroundColor"),
580
+ title: e.translate("backgroundColor"),
581
+ type: "button",
582
+ onMousedown: a[18] || (a[18] = h(() => {
583
+ }, ["prevent"])),
584
+ onClick: a[19] || (a[19] = (v) => u("toggle-background-color-menu", r(v)))
498
585
  }, [
499
- g("input", {
500
- "aria-label": e.translate("color"),
501
- type: "color",
502
- value: "#202125",
503
- onInput: a[18] || (a[18] = (l) => d("execute", "color", e.commands.setColor(l.target.value)))
504
- }, null, 40, pa)
505
- ], 8, Ma)) : n.id === "image" ? (r(), m("button", {
586
+ a[35] || (a[35] = g("span", { class: "markdown-editor__background-color-trigger" }, "A", -1)),
587
+ C(p, { name: "chevronDown" })
588
+ ], 40, Ra)) : l.id === "color" ? (i(), m("button", {
506
589
  key: 16,
590
+ "data-toolbar-item": "color",
591
+ "aria-expanded": e.colorMenuVisible,
592
+ "aria-label": e.translate("color"),
593
+ title: e.translate("color"),
594
+ type: "button",
595
+ onMousedown: a[20] || (a[20] = h(() => {
596
+ }, ["prevent"])),
597
+ onClick: a[21] || (a[21] = (v) => u("toggle-color-menu", r(v)))
598
+ }, [
599
+ a[36] || (a[36] = g("span", { class: "markdown-editor__color-trigger" }, "A", -1)),
600
+ C(p, { name: "chevronDown" })
601
+ ], 40, Ia)) : l.id === "image" ? (i(), m("button", {
602
+ key: 17,
507
603
  "data-toolbar-item": "image",
508
604
  "aria-expanded": e.imageEditorVisible,
509
605
  "aria-label": e.translate("image"),
510
606
  type: "button",
511
607
  title: e.translate("image"),
512
- onMousedown: a[19] || (a[19] = w(() => {
608
+ onMousedown: a[22] || (a[22] = h(() => {
513
609
  }, ["prevent"])),
514
- onClick: a[20] || (a[20] = (l) => d("toggle-image-editor", s(l)))
610
+ onClick: a[23] || (a[23] = (v) => u("toggle-image-editor", r(v)))
515
611
  }, [
516
- M(p, { name: "image" })
517
- ], 40, xa)) : n.id === "formula" ? (r(), m("button", {
518
- key: 17,
612
+ C(p, { name: "image" })
613
+ ], 40, qa)) : l.id === "formula" ? (i(), m("button", {
614
+ key: 18,
519
615
  "data-toolbar-item": "formula",
520
616
  "aria-expanded": e.formulaMenuVisible,
521
617
  "aria-label": e.translate("formula"),
522
618
  "aria-pressed": e.state.formula,
523
619
  title: e.translate("formula"),
524
620
  type: "button",
525
- onMousedown: a[21] || (a[21] = w(() => {
621
+ onMousedown: a[24] || (a[24] = h(() => {
526
622
  }, ["prevent"])),
527
- onClick: a[22] || (a[22] = (l) => d("toggle-formula-menu", s(l)))
623
+ onClick: a[25] || (a[25] = (v) => u("toggle-formula-menu", r(v)))
528
624
  }, [
529
- M(p, { name: "function" })
530
- ], 40, La)) : n.id === "mermaid" ? (r(), m("button", {
531
- key: 18,
625
+ C(p, { name: "function" })
626
+ ], 40, Oa)) : l.id === "mermaid" ? (i(), m("button", {
627
+ key: 19,
532
628
  "data-toolbar-item": "mermaid",
533
629
  type: "button",
534
630
  "aria-label": e.translate("mermaid"),
535
631
  "aria-pressed": e.state.mermaid,
536
632
  title: e.translate("mermaid"),
537
- onMousedown: a[23] || (a[23] = w(() => {
633
+ onMousedown: a[26] || (a[26] = h(() => {
538
634
  }, ["prevent"])),
539
- onClick: (l) => b(n, e.commands.insertMermaid)
635
+ onClick: (v) => w(l, e.commands.insertMermaid)
540
636
  }, [
541
- M(p, { name: "mermaid" })
542
- ], 40, Ba)) : n.id === "html" ? (r(), m("button", {
543
- key: 19,
637
+ C(p, { name: "mermaid" })
638
+ ], 40, ja)) : l.id === "html" ? (i(), m("button", {
639
+ key: 20,
544
640
  "data-toolbar-item": "html",
545
641
  type: "button",
546
642
  "aria-label": e.translate("html"),
547
643
  title: e.translate("html"),
548
- onMousedown: a[24] || (a[24] = w(() => {
644
+ onMousedown: a[27] || (a[27] = h(() => {
549
645
  }, ["prevent"])),
550
- onClick: a[25] || (a[25] = (l) => d("insert-html"))
551
- }, " </> ", 40, Ta)) : n.id === "horizontal-rule" ? (r(), m("button", {
552
- key: 20,
646
+ onClick: a[28] || (a[28] = (v) => u("insert-html"))
647
+ }, " </> ", 40, Ua)) : l.id === "horizontal-rule" ? (i(), m("button", {
648
+ key: 21,
553
649
  "data-toolbar-item": "horizontal-rule",
554
650
  "aria-label": e.translate("horizontalRule"),
555
651
  type: "button",
556
652
  title: e.translate("horizontalRule"),
557
- onMousedown: a[26] || (a[26] = w(() => {
653
+ onMousedown: a[29] || (a[29] = h(() => {
558
654
  }, ["prevent"])),
559
- onClick: a[27] || (a[27] = (l) => d("execute", "horizontal-rule", e.commands.horizontalRule))
655
+ onClick: a[30] || (a[30] = (v) => u("execute", "horizontal-rule", e.commands.horizontalRule))
560
656
  }, [
561
- M(p, { name: "horizontalRule" })
562
- ], 40, Ea)) : n.id === "table" ? (r(), m("button", {
563
- key: 21,
657
+ C(p, { name: "horizontalRule" })
658
+ ], 40, Wa)) : l.id === "table" ? (i(), m("button", {
659
+ key: 22,
564
660
  "data-toolbar-item": "table",
565
661
  "aria-label": e.translate("table"),
566
662
  type: "button",
567
663
  title: e.translate("table"),
568
- onMousedown: a[28] || (a[28] = w(() => {
664
+ onMousedown: a[31] || (a[31] = h(() => {
569
665
  }, ["prevent"])),
570
- onClick: a[29] || (a[29] = (l) => d("execute", "table", e.commands.insertTable()))
666
+ onClick: a[32] || (a[32] = (v) => u("execute", "table", e.commands.insertTable()))
571
667
  }, [
572
- M(p, { name: "table" })
573
- ], 40, Ha)) : E("", !0)
668
+ C(p, { name: "table" })
669
+ ], 40, Qa)) : $("", !0)
574
670
  ], 64))), 128))
575
- ], 8, ra))), 128)),
576
- fe(i.$slots, "default", {
671
+ ], 8, La))), 128)),
672
+ we(s.$slots, "default", {
577
673
  commands: e.commands,
578
- execute: (C) => d("execute", void 0, C)
674
+ execute: (M) => u("execute", void 0, M)
579
675
  }, void 0, !0)
580
676
  ]),
581
677
  g("button", {
@@ -585,84 +681,88 @@ const ht = `<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill=
585
681
  "aria-expanded": e.modeMenuVisible,
586
682
  "aria-label": e.translate("mode"),
587
683
  title: e.translate("mode"),
588
- onMousedown: a[30] || (a[30] = w(() => {
684
+ onMousedown: a[33] || (a[33] = h(() => {
589
685
  }, ["prevent"])),
590
- onClick: a[31] || (a[31] = (C) => d("toggle-mode-menu", s(C)))
686
+ onClick: a[34] || (a[34] = (M) => u("toggle-mode-menu", r(M)))
591
687
  }, [
592
- M(p, { name: "gear" }),
593
- M(p, { name: "chevronDown" })
594
- ], 40, $a)
595
- ], 8, ia));
688
+ C(p, { name: "gear" }),
689
+ C(p, { name: "chevronDown" })
690
+ ], 40, Ga)
691
+ ], 8, pa));
596
692
  }
597
- }), Va = /* @__PURE__ */ ae(Sa, [["__scopeId", "data-v-ad92a547"]]), Aa = [
693
+ }), Ya = /* @__PURE__ */ ie(Ka, [["__scopeId", "data-v-411fb713"]]), Za = [
598
694
  "--markdown-background",
599
695
  "--markdown-border",
600
696
  "--markdown-focus-background",
601
697
  "--markdown-focus-text",
602
698
  "--markdown-text"
603
699
  ];
604
- function z(e, f = {}) {
605
- const y = h(!1);
606
- let u;
607
- function b() {
608
- y.value = !1, u?.(), u = void 0;
700
+ function P(e, k = {}) {
701
+ const x = y(!1);
702
+ let c;
703
+ function w() {
704
+ x.value = !1, c?.(), c = void 0;
609
705
  }
610
- async function d(i) {
611
- b(), y.value = !0, await ee();
706
+ async function u(s) {
707
+ w(), x.value = !0, await oe();
612
708
  const a = e();
613
709
  if (a === void 0) return;
614
- const C = i.closest(".markdown-editor");
615
- if (C !== null) {
616
- const l = getComputedStyle(C);
617
- for (const k of Aa)
618
- a.style.setProperty(k, l.getPropertyValue(k));
710
+ const M = s.closest(".markdown-editor");
711
+ if (M !== null) {
712
+ const v = getComputedStyle(M);
713
+ for (const V of Za)
714
+ a.style.setProperty(V, v.getPropertyValue(V));
619
715
  }
620
- u = at(i, a, async () => {
621
- const { x: l, y: k } = await lt(i, a, {
622
- middleware: [nt(6), ot({ padding: 8 }), it({ padding: 8 })],
623
- placement: f.placement ?? "bottom-start",
716
+ c = dt(s, a, async () => {
717
+ const { x: v, y: V } = await ut(s, a, {
718
+ middleware: [mt(6), ct({ padding: 8 }), gt({ padding: 8 })],
719
+ placement: k.placement ?? "bottom-start",
624
720
  strategy: "fixed"
625
721
  });
626
- Object.assign(a.style, { left: `${l}px`, position: "fixed", top: `${k}px` });
722
+ Object.assign(a.style, {
723
+ left: `${v}px`,
724
+ position: "fixed",
725
+ top: `${V}px`
726
+ });
627
727
  });
628
728
  }
629
- async function s(i) {
630
- y.value ? b() : await d(i);
729
+ async function r(s) {
730
+ x.value ? w() : await u(s);
631
731
  }
632
- return be(b), {
633
- close: b,
634
- contains: (i) => e()?.contains(i) ?? !1,
635
- open: d,
636
- toggle: s,
637
- visible: y
732
+ return he(w), {
733
+ close: w,
734
+ contains: (s) => e()?.contains(s) ?? !1,
735
+ open: u,
736
+ toggle: r,
737
+ visible: x
638
738
  };
639
739
  }
640
- function Ee(e, f) {
641
- return e.length === 0 ? f : f.length === 0 ? e : `${e}
740
+ function Ve(e, k) {
741
+ return e.length === 0 ? k : k.length === 0 ? e : `${e}
642
742
 
643
- ${f}`;
743
+ ${k}`;
644
744
  }
645
- function Pa(e) {
646
- const f = h(e.initialValue);
647
- let y = !1;
648
- function u(i, a) {
649
- y = !0, a !== "markup" && e.getMarkupHost()?.setValue(i), a !== "visual" && e.getVisualHost()?.setValue(i), y = !1;
745
+ function Xa(e) {
746
+ const k = y(e.initialValue);
747
+ let x = !1;
748
+ function c(s, a) {
749
+ x = !0, a !== "markup" && e.getMarkupHost()?.setValue(s), a !== "visual" && e.getVisualHost()?.setValue(s), x = !1;
650
750
  }
651
- function b(i) {
652
- i !== f.value && (f.value = i, u(i));
751
+ function w(s) {
752
+ s !== k.value && (k.value = s, c(s));
653
753
  }
654
- function d(i) {
655
- i !== f.value && (f.value = i, e.onChange(i), u(i));
754
+ function u(s) {
755
+ s !== k.value && (k.value = s, e.onChange(s), c(s));
656
756
  }
657
- function s(i, a) {
658
- i === f.value || y || (f.value = i, e.onChange(i), u(i, a));
757
+ function r(s, a) {
758
+ s === k.value || x || (k.value = s, e.onChange(s), c(s, a));
659
759
  }
660
- return { setExternalValue: b, setValue: d, updateFromHost: s, value: f };
760
+ return { setExternalValue: w, setValue: u, updateFromHost: r, value: k };
661
761
  }
662
- const za = ["data-locale", "data-mode", "data-theme"], Fa = {
762
+ const Ja = ["data-locale", "data-mode", "data-theme"], _a = {
663
763
  key: 0,
664
764
  class: "markdown-editor__header"
665
- }, Na = /* @__PURE__ */ te({
765
+ }, el = /* @__PURE__ */ ne({
666
766
  name: "MarkdownEditor",
667
767
  __name: "MarkdownEditor",
668
768
  props: {
@@ -679,8 +779,8 @@ const za = ["data-locale", "data-mode", "data-theme"], Fa = {
679
779
  features: { default: void 0 }
680
780
  },
681
781
  emits: ["cancel", "change", "mode-change", "update:modelValue", "update:mode", "submit"],
682
- setup(e, { expose: f, emit: y }) {
683
- const u = e, b = y, d = Xe(), s = et(), i = He()?.appContext, a = h(), C = h(), n = h(u.mode), l = h("https://"), k = h(""), I = h(""), ke = h(), A = h(""), K = h(""), q = h(!1), L = h({
782
+ setup(e, { expose: k, emit: x }) {
783
+ const c = e, w = x, u = ot(), r = st(), s = Se()?.appContext, a = y(), M = y(), l = y(c.mode), v = y("https://"), V = y(""), o = y(""), b = y(), S = y(""), _ = y(""), j = y(!1), E = y({
684
784
  bold: !1,
685
785
  bulletList: !1,
686
786
  code: !1,
@@ -703,21 +803,28 @@ const za = ["data-locale", "data-mode", "data-theme"], Fa = {
703
803
  quote: !1,
704
804
  strikethrough: !1,
705
805
  underline: !1
706
- }), re = Te(() => L.value.headingLevel?.toString() ?? "paragraph"), $e = Te(() => re.value === "paragraph" ? "H" : `H${re.value}`), we = h(), O = h(), he = h(), j = z(() => O.value?.getElement("code")), N = z(() => O.value?.getElement("formula")), U = z(() => O.value?.getElement("heading")), R = z(() => ke.value?.element), Z = z(() => he.value?.element, { placement: "top" }), $ = z(() => we.value?.element), W = z(() => O.value?.getElement("list")), Q = z(() => O.value?.getElement("mode"));
707
- let x, de = "visual", G = 0, ue = !1, B;
708
- const { setExternalValue: Se, setValue: X, updateFromHost: ye, value: D } = Pa({
709
- getMarkupHost: () => x,
710
- getVisualHost: () => B,
711
- initialValue: u.modelValue,
806
+ }), me = He(() => E.value.headingLevel?.toString() ?? "paragraph"), Ae = He(() => me.value === "paragraph" ? "H" : `H${me.value}`), ye = y(), D = y(), Ce = y(), U = P(() => D.value?.getElement("code")), W = P(() => D.value?.getElement("background-color")), Q = P(() => D.value?.getElement("color")), I = P(() => D.value?.getElement("formula")), G = P(() => D.value?.getElement("heading")), q = P(() => b.value?.element), ee = P(() => Ce.value?.element, {
807
+ placement: "top"
808
+ }), A = P(() => ye.value?.element), K = P(() => D.value?.getElement("list")), Y = P(() => D.value?.getElement("mode"));
809
+ let L, ce = "visual", Z = 0, ge = !1, T;
810
+ const {
811
+ setExternalValue: Pe,
812
+ setValue: te,
813
+ updateFromHost: Me,
814
+ value: O
815
+ } = Xa({
816
+ getMarkupHost: () => L,
817
+ getVisualHost: () => T,
818
+ initialValue: c.modelValue,
712
819
  onChange: (t) => {
713
- b("update:modelValue", t), b("change", t);
820
+ w("update:modelValue", t), w("change", t);
714
821
  }
715
822
  });
716
- function me(t) {
717
- return Ze(u.locale)[t];
823
+ function ve(t) {
824
+ return lt(c.locale)[t];
718
825
  }
719
- function le() {
720
- x?.destroy(), B?.destroy(), x = void 0, B = void 0, L.value = {
826
+ function se() {
827
+ L?.destroy(), T?.destroy(), L = void 0, T = void 0, E.value = {
721
828
  bold: !1,
722
829
  bulletList: !1,
723
830
  code: !1,
@@ -742,584 +849,635 @@ const za = ["data-locale", "data-mode", "data-theme"], Fa = {
742
849
  underline: !1
743
850
  };
744
851
  }
745
- function Ve(t) {
746
- n.value === "markup" || n.value === "split" && typeof t == "object" ? x?.moveCursor(t) : B?.moveCursor(typeof t == "object" ? "start" : t);
852
+ function ze(t) {
853
+ l.value === "markup" || l.value === "split" && typeof t == "object" ? L?.moveCursor(t) : T?.moveCursor(typeof t == "object" ? "start" : t);
747
854
  }
748
- function Ae(t) {
749
- n.value === "markup" || n.value === "split" && x?.hasFocus() ? x?.insert(t) : B?.insert(t);
855
+ function Fe(t) {
856
+ l.value === "markup" || l.value === "split" && L?.hasFocus() ? L?.insert(t) : T?.insert(t);
750
857
  }
751
- function Pe() {
752
- if (A.value.trim().length === 0)
858
+ function Ne() {
859
+ if (S.value.trim().length === 0)
753
860
  return;
754
- ue = !0;
755
- const t = K.value.trim() || A.value.trim();
756
- T() ? x?.run(s.setLink(A.value.trim(), void 0, t, q.value)) : S(void 0, d.setLink(A.value.trim(), t, t, q.value)), $.close();
861
+ ge = !0;
862
+ const t = _.value.trim() || S.value.trim();
863
+ B() ? L?.run(r.setLink(S.value.trim(), void 0, t, j.value)) : F(void 0, u.setLink(S.value.trim(), t, t, j.value)), A.close();
864
+ }
865
+ function pe() {
866
+ A.close();
867
+ }
868
+ function De() {
869
+ const t = v.value.trim();
870
+ t.length !== 0 && (B() ? L?.run(
871
+ r.insertImage(t, V.value.trim() || "Image", o.value.trim() || void 0)
872
+ ) : F(
873
+ void 0,
874
+ u.insertImage(t, V.value.trim() || "Image", o.value.trim() || void 0)
875
+ ), q.close());
757
876
  }
758
- function Ce() {
759
- $.close();
877
+ function Re() {
878
+ q.close();
760
879
  }
761
- function ze() {
762
- const t = l.value.trim();
763
- t.length !== 0 && (T() ? x?.run(s.insertImage(t, k.value.trim() || "Image", I.value.trim() || void 0)) : S(void 0, d.insertImage(t, k.value.trim() || "Image", I.value.trim() || void 0)), R.close());
880
+ function Ie(t) {
881
+ B() ? L?.run(t === "paragraph" ? r.paragraph : r.heading(Number(t))) : t === "paragraph" ? F(void 0, u.paragraph) : F(void 0, u.heading(Number(t))), G.close();
882
+ }
883
+ async function qe(t) {
884
+ B(), await G.toggle(t);
885
+ }
886
+ async function Oe(t) {
887
+ B(), await U.toggle(t);
764
888
  }
765
- function Fe() {
766
- R.close();
889
+ async function je(t) {
890
+ B() || await Q.toggle(t);
767
891
  }
768
- function Ne(t) {
769
- T() ? x?.run(t === "paragraph" ? s.paragraph : s.heading(Number(t))) : t === "paragraph" ? S(void 0, d.paragraph) : S(void 0, d.heading(Number(t))), U.close();
892
+ async function Ue(t) {
893
+ B() || await W.toggle(t);
770
894
  }
771
- async function Re(t) {
772
- T(), await U.toggle(t);
895
+ function We(t) {
896
+ W.close(), !B() && T?.run(u.setBackgroundColor(t));
773
897
  }
774
- async function De(t) {
775
- T(), await j.toggle(t);
898
+ function Qe(t) {
899
+ Q.close(), !B() && T?.run(u.setColor(t));
776
900
  }
777
- function Me(t, o) {
778
- T() ? x?.run(s[o]) : S(void 0, t), j.close();
901
+ function xe(t, n) {
902
+ B() ? L?.run(r[n]) : F(void 0, t), U.close();
779
903
  }
780
- async function Ie(t) {
781
- if (T(), $.visible.value) {
782
- $.close();
904
+ async function Ge(t) {
905
+ if (B(), A.visible.value) {
906
+ A.close();
783
907
  return;
784
908
  }
785
- A.value = L.value.linkHref ?? "", K.value = L.value.linkText ?? window.getSelection()?.toString().trim() ?? "", q.value = L.value.linkOpenInNewWindow, await $.open(t);
909
+ S.value = E.value.linkHref ?? "", _.value = E.value.linkText ?? window.getSelection()?.toString().trim() ?? "", j.value = E.value.linkOpenInNewWindow, await A.open(t);
786
910
  }
787
- async function pe(t) {
788
- const o = L.value.linkHref;
789
- if (o === void 0 && t === void 0) {
790
- Ce();
911
+ async function Le(t) {
912
+ const n = E.value.linkHref;
913
+ if (n === void 0 && t === void 0) {
914
+ pe();
791
915
  return;
792
916
  }
793
- A.value = t?.getAttribute("href") ?? o ?? "", K.value = t?.textContent ?? L.value.linkText ?? "", q.value = t?.getAttribute("target") === "_blank" || L.value.linkOpenInNewWindow;
794
- const v = window.getSelection()?.anchorNode, P = v instanceof Element ? v : v?.parentElement, ve = t ?? P?.closest("a");
795
- ve != null && await $.open(ve);
917
+ S.value = t?.getAttribute("href") ?? n ?? "", _.value = t?.textContent ?? E.value.linkText ?? "", j.value = t?.getAttribute("target") === "_blank" || E.value.linkOpenInNewWindow;
918
+ const f = window.getSelection()?.anchorNode, R = f instanceof Element ? f : f?.parentElement, fe = t ?? R?.closest("a");
919
+ fe != null && await A.open(fe);
796
920
  }
797
- function qe(t) {
798
- const o = t.target;
799
- if (!(o instanceof Element)) return;
800
- const v = o.closest(".ProseMirror img");
801
- if (v !== null) {
802
- t.preventDefault(), B?.selectElement(v), Z.open(v);
921
+ function Ke(t) {
922
+ const n = t.target;
923
+ if (!(n instanceof Element)) return;
924
+ const f = n.closest(".ProseMirror img");
925
+ if (f !== null) {
926
+ t.preventDefault(), T?.selectElement(f), ee.open(f);
803
927
  return;
804
928
  }
805
- const P = o.closest(".ProseMirror a");
806
- P !== null && (t.preventDefault(), B?.selectElement(P), pe(P));
929
+ const R = n.closest(".ProseMirror a");
930
+ R !== null && (t.preventDefault(), T?.selectElement(R), Le(R));
807
931
  }
808
- async function Oe(t) {
809
- T(), await W.toggle(t);
932
+ async function Ye(t) {
933
+ B(), await K.toggle(t);
810
934
  }
811
- function ne(t, o) {
812
- T() ? x?.run(s[o]) : S(void 0, t), W.close();
935
+ function re(t, n) {
936
+ B() ? L?.run(r[n]) : F(void 0, t), K.close();
813
937
  }
814
- async function je(t) {
815
- T(), await R.toggle(t);
938
+ async function Ze(t) {
939
+ B(), await q.toggle(t);
816
940
  }
817
- async function xe(t) {
818
- S(void 0, t), await ee();
819
- const o = C.value?.querySelector(".ProseMirror img.ProseMirror-selectednode");
820
- o != null && await Z.open(o);
941
+ async function Be(t) {
942
+ F(void 0, t), await oe();
943
+ const n = M.value?.querySelector(".ProseMirror img.ProseMirror-selectednode");
944
+ n != null && await ee.open(n);
821
945
  }
822
- async function Ue(t) {
823
- await Q.toggle(t);
946
+ async function Xe(t) {
947
+ await Y.toggle(t);
824
948
  }
825
- async function We(t) {
826
- Q.close(), await ce(t);
949
+ async function Je(t) {
950
+ Y.close(), await be(t);
827
951
  }
828
- function Qe() {
829
- T() ? x?.run(s.insertHtml) : B?.run(d.insertHtml);
952
+ function _e() {
953
+ B() ? L?.run(r.insertHtml) : T?.run(u.insertHtml);
830
954
  }
831
- async function Ge() {
832
- N.close(), !L.value.formula && (T() ? x?.run(s.insertMathBlock) : B?.run(d.insertMathBlock));
955
+ async function et() {
956
+ I.close(), !E.value.formula && (B() ? L?.run(r.insertMathBlock) : T?.run(u.insertMathBlock));
833
957
  }
834
- function Ye() {
835
- N.close(), T() ? x?.run(s.insertInlineMath) : B?.run(d.insertInlineMath);
958
+ function tt() {
959
+ I.close(), B() ? L?.run(r.insertInlineMath) : T?.run(u.insertInlineMath);
836
960
  }
837
- async function Ke(t) {
838
- T(), L.value.formula || await N.toggle(t);
961
+ async function at(t) {
962
+ B(), E.value.formula || await I.toggle(t);
839
963
  }
840
- function Le(t) {
841
- const o = t.target;
842
- if (o instanceof Node)
843
- for (const v of [U, j, N, $, W, R, Z, Q])
844
- v.contains(o) || v.close();
964
+ function Te(t) {
965
+ const n = t.target;
966
+ if (n instanceof Node)
967
+ for (const f of [
968
+ G,
969
+ U,
970
+ W,
971
+ Q,
972
+ I,
973
+ A,
974
+ K,
975
+ q,
976
+ ee,
977
+ Y
978
+ ])
979
+ f.contains(n) || f.close();
845
980
  }
846
- function Be(t) {
981
+ function Ee(t) {
847
982
  if (t.key === "Escape")
848
- for (const o of [U, j, N, $, W, R, Z, Q]) o.close();
983
+ for (const n of [
984
+ G,
985
+ U,
986
+ W,
987
+ Q,
988
+ I,
989
+ A,
990
+ K,
991
+ q,
992
+ ee,
993
+ Y
994
+ ])
995
+ n.close();
849
996
  }
850
- function oe() {
851
- n.value !== "markup" && C.value !== void 0 && (B = Je({
852
- directiveAppContext: i,
853
- directiveComponents: u.directiveComponents,
854
- features: u.features,
855
- editable: !u.readonly,
856
- initialValue: D.value,
857
- onCancel: () => (b("cancel"), !0),
997
+ function de() {
998
+ l.value !== "markup" && M.value !== void 0 && (T = nt({
999
+ directiveAppContext: s,
1000
+ directiveComponents: c.directiveComponents,
1001
+ features: c.features,
1002
+ editable: !c.readonly,
1003
+ initialValue: O.value,
1004
+ onCancel: () => (w("cancel"), !0),
858
1005
  onChange: (t) => {
859
- ye(t, "visual"), C.value !== void 0 && ge(C.value, u.locale);
1006
+ Me(t, "visual"), M.value !== void 0 && ke(M.value, c.locale);
860
1007
  },
861
1008
  onSelectionChange: (t) => {
862
- L.value = t, ue ? ue = !1 : pe();
1009
+ E.value = t, ge ? ge = !1 : Le();
863
1010
  },
864
- onSubmit: () => (b("submit"), !0),
865
- placeholder: u.placeholder,
866
- target: C.value
867
- }), ge(C.value, u.locale)), n.value !== "wysiwyg" && a.value !== void 0 && (x = _e({
868
- editable: !u.readonly,
869
- initialValue: D.value,
870
- onChange: (t) => ye(t, "markup"),
1011
+ onSubmit: () => (w("submit"), !0),
1012
+ placeholder: c.placeholder,
1013
+ target: M.value
1014
+ }), ke(M.value, c.locale)), l.value !== "wysiwyg" && a.value !== void 0 && (L = it({
1015
+ editable: !c.readonly,
1016
+ initialValue: O.value,
1017
+ onChange: (t) => Me(t, "markup"),
871
1018
  target: a.value
872
1019
  }));
873
1020
  }
874
- async function ce(t) {
875
- if (t === n.value)
1021
+ async function be(t) {
1022
+ if (t === l.value)
876
1023
  return;
877
- const o = ++G;
878
- n.value = t, b("update:mode", t), b("mode-change", t), le(), await ee(), o === G && oe();
1024
+ const n = ++Z;
1025
+ l.value = t, w("update:mode", t), w("mode-change", t), se(), await oe(), n === Z && de();
879
1026
  }
880
- function T() {
881
- return n.value === "markup" ? !0 : n.value === "wysiwyg" ? !1 : (x?.hasFocus() ? de = "markup" : B?.hasFocus() && (de = "visual"), de === "markup");
1027
+ function B() {
1028
+ return l.value === "markup" ? !0 : l.value === "wysiwyg" ? !1 : (L?.hasFocus() ? ce = "markup" : T?.hasFocus() && (ce = "visual"), ce === "markup");
882
1029
  }
883
- function S(t, o) {
884
- if (!u.readonly) {
885
- if (T() && t !== void 0) {
886
- const P = {
887
- bold: s.bold,
888
- "fold-heading": s.toggleHeadingFolding,
889
- "horizontal-rule": s.horizontalRule,
890
- italic: s.italic,
891
- mark: s.mark,
892
- mermaid: s.insertMermaid,
893
- quote: s.quote,
894
- redo: s.redo,
895
- strike: s.strikethrough,
896
- table: s.insertTable(),
897
- underline: s.underline,
898
- undo: s.undo
1030
+ function F(t, n) {
1031
+ if (!c.readonly) {
1032
+ if (B() && t !== void 0) {
1033
+ const R = {
1034
+ bold: r.bold,
1035
+ "fold-heading": r.toggleHeadingFolding,
1036
+ "horizontal-rule": r.horizontalRule,
1037
+ italic: r.italic,
1038
+ mark: r.mark,
1039
+ mermaid: r.insertMermaid,
1040
+ quote: r.quote,
1041
+ redo: r.redo,
1042
+ strike: r.strikethrough,
1043
+ table: r.insertTable(),
1044
+ underline: r.underline,
1045
+ undo: r.undo
899
1046
  }[t];
900
- P !== void 0 && x?.run(P);
1047
+ R !== void 0 && L?.run(R);
901
1048
  return;
902
1049
  }
903
- B?.run(o);
1050
+ T?.run(n);
904
1051
  }
905
1052
  }
906
- return J(
907
- () => u.modelValue,
1053
+ return ae(
1054
+ () => c.modelValue,
908
1055
  (t) => {
909
- t !== D.value && Se(t);
1056
+ t !== O.value && Pe(t);
910
1057
  }
911
- ), J(
912
- () => u.mode,
1058
+ ), ae(
1059
+ () => c.mode,
913
1060
  (t) => {
914
- ce(t);
1061
+ be(t);
915
1062
  }
916
- ), J(
917
- () => u.locale,
1063
+ ), ae(
1064
+ () => c.locale,
918
1065
  (t) => {
919
- C.value !== void 0 && ge(C.value, t);
1066
+ M.value !== void 0 && ke(M.value, t);
1067
+ }
1068
+ ), ae(
1069
+ () => c.features,
1070
+ async () => {
1071
+ const t = ++Z;
1072
+ se(), await oe(), t === Z && de();
920
1073
  }
921
- ), J(() => u.features, async () => {
922
- const t = ++G;
923
- le(), await ee(), t === G && oe();
924
- }), J(
925
- () => u.readonly,
1074
+ ), ae(
1075
+ () => c.readonly,
926
1076
  async () => {
927
- const t = ++G;
928
- le(), await ee(), t === G && oe();
1077
+ const t = ++Z;
1078
+ se(), await oe(), t === Z && de();
929
1079
  }
930
- ), rt(() => {
931
- oe(), document.addEventListener("pointerdown", Le), document.addEventListener("keydown", Be);
932
- }), be(() => {
933
- le(), document.removeEventListener("pointerdown", Le), document.removeEventListener("keydown", Be);
934
- }), f({
935
- append: (t) => X(Ee(D.value, t)),
936
- clear: () => X(""),
937
- focus: () => n.value === "markup" ? x?.focus() : B?.focus(),
938
- getMode: () => n.value,
939
- getValue: () => D.value,
940
- hasFocus: () => n.value === "markup" ? x?.hasFocus() ?? !1 : B?.hasFocus() ?? !1,
941
- insert: Ae,
942
- isEmpty: () => D.value.length === 0,
943
- moveCursor: Ve,
944
- prepend: (t) => X(Ee(t, D.value)),
945
- replace: X,
946
- setMode: ce,
947
- setValue: X
948
- }), (t, o) => (r(), m("section", {
1080
+ ), bt(() => {
1081
+ de(), document.addEventListener("pointerdown", Te), document.addEventListener("keydown", Ee);
1082
+ }), he(() => {
1083
+ se(), document.removeEventListener("pointerdown", Te), document.removeEventListener("keydown", Ee);
1084
+ }), k({
1085
+ append: (t) => te(Ve(O.value, t)),
1086
+ clear: () => te(""),
1087
+ focus: () => l.value === "markup" ? L?.focus() : T?.focus(),
1088
+ getMode: () => l.value,
1089
+ getValue: () => O.value,
1090
+ hasFocus: () => l.value === "markup" ? L?.hasFocus() ?? !1 : T?.hasFocus() ?? !1,
1091
+ insert: Fe,
1092
+ isEmpty: () => O.value.length === 0,
1093
+ moveCursor: ze,
1094
+ prepend: (t) => te(Ve(t, O.value)),
1095
+ replace: te,
1096
+ setMode: be,
1097
+ setValue: te
1098
+ }), (t, n) => (i(), m("section", {
949
1099
  class: "markdown-editor",
950
1100
  "data-locale": e.locale,
951
- "data-mode": n.value,
1101
+ "data-mode": l.value,
952
1102
  "data-theme": e.theme,
953
- onClick: qe
1103
+ onClick: Ke
954
1104
  }, [
955
- t.$slots.header ? (r(), m("header", Fa, [
956
- fe(t.$slots, "header", {}, void 0, !0)
957
- ])) : E("", !0),
958
- e.readonly ? E("", !0) : (r(), _(Va, {
1105
+ t.$slots.header ? (i(), m("header", _a, [
1106
+ we(t.$slots, "header", {}, void 0, !0)
1107
+ ])) : $("", !0),
1108
+ e.readonly ? $("", !0) : (i(), le(Ya, {
959
1109
  key: 1,
960
- commands: c(d),
961
- "code-menu-visible": c(j).visible.value,
962
- "formula-menu-visible": c(N).visible.value,
963
- "heading-menu-visible": c(U).visible.value,
964
- "image-editor-visible": c(R).visible.value,
965
- "link-editor-visible": c($).visible.value,
966
- "list-menu-visible": c(W).visible.value,
967
- mode: n.value,
968
- "mode-menu-visible": c(Q).visible.value,
969
- state: L.value,
970
- "text-style-label": $e.value,
1110
+ commands: d(u),
1111
+ "background-color-menu-visible": d(W).visible.value,
1112
+ "color-menu-visible": d(Q).visible.value,
1113
+ "code-menu-visible": d(U).visible.value,
1114
+ "formula-menu-visible": d(I).visible.value,
1115
+ "heading-menu-visible": d(G).visible.value,
1116
+ "image-editor-visible": d(q).visible.value,
1117
+ "link-editor-visible": d(A).visible.value,
1118
+ "list-menu-visible": d(K).visible.value,
1119
+ mode: l.value,
1120
+ "mode-menu-visible": d(Y).visible.value,
1121
+ state: E.value,
1122
+ "text-style-label": Ae.value,
971
1123
  "toolbar-preset": e.toolbarPreset,
972
1124
  "toolbar-config": e.toolbarConfig,
973
1125
  features: e.features,
974
- translate: me,
975
- onExecute: S,
976
- onInsertHtml: Qe,
977
- onToggleFormulaMenu: Ke,
978
- onToggleCodeMenu: De,
979
- onToggleHeadingMenu: Re,
980
- onToggleImageEditor: je,
981
- onToggleLinkEditor: Ie,
982
- onToggleListMenu: Oe,
983
- onToggleModeMenu: Ue
1126
+ translate: ve,
1127
+ onExecute: F,
1128
+ onInsertHtml: _e,
1129
+ onToggleFormulaMenu: at,
1130
+ onToggleCodeMenu: Oe,
1131
+ onToggleBackgroundColorMenu: Ue,
1132
+ onToggleColorMenu: je,
1133
+ onToggleHeadingMenu: qe,
1134
+ onToggleImageEditor: Ze,
1135
+ onToggleLinkEditor: Ge,
1136
+ onToggleListMenu: Ye,
1137
+ onToggleModeMenu: Xe
984
1138
  }, {
985
- default: dt((v) => [
986
- fe(t.$slots, "toolbar", ut(mt(v)), void 0, !0)
1139
+ default: ft((f) => [
1140
+ we(t.$slots, "toolbar", kt(wt(f)), void 0, !0)
987
1141
  ]),
988
1142
  _: 3
989
- }, 8, ["commands", "code-menu-visible", "formula-menu-visible", "heading-menu-visible", "image-editor-visible", "link-editor-visible", "list-menu-visible", "mode", "mode-menu-visible", "state", "text-style-label", "toolbar-preset", "toolbar-config", "features"])),
990
- (r(), _(ct, { to: "body" }, [
991
- M(ea, {
1143
+ }, 8, ["commands", "background-color-menu-visible", "color-menu-visible", "code-menu-visible", "formula-menu-visible", "heading-menu-visible", "image-editor-visible", "link-editor-visible", "list-menu-visible", "mode", "mode-menu-visible", "state", "text-style-label", "toolbar-preset", "toolbar-config", "features"])),
1144
+ (i(), le(ht, { to: "body" }, [
1145
+ C(ka, {
992
1146
  ref_key: "floatingMenus",
993
- ref: O,
994
- "code-visible": c(j).visible.value,
995
- "formula-visible": c(N).visible.value,
996
- "heading-visible": c(U).visible.value,
997
- "list-visible": c(W).visible.value,
998
- mode: n.value,
999
- "mode-visible": c(Q).visible.value,
1000
- state: L.value,
1001
- "text-style": re.value,
1147
+ ref: D,
1148
+ "code-visible": d(U).visible.value,
1149
+ "background-color-visible": d(W).visible.value,
1150
+ "color-visible": d(Q).visible.value,
1151
+ "formula-visible": d(I).visible.value,
1152
+ "heading-visible": d(G).visible.value,
1153
+ "list-visible": d(K).visible.value,
1154
+ mode: l.value,
1155
+ "mode-visible": d(Y).visible.value,
1156
+ state: E.value,
1157
+ "text-style": me.value,
1002
1158
  theme: e.theme,
1003
- translate: me,
1004
- onBulletList: o[0] || (o[0] = (v) => ne(c(d).bulletList, "bulletList")),
1005
- onCodeBlock: o[1] || (o[1] = (v) => Me(c(d).codeBlock, "codeBlock")),
1006
- onIndentList: o[2] || (o[2] = (v) => ne(c(d).sinkListItem, "indentList")),
1007
- onInlineCode: o[3] || (o[3] = (v) => Me(c(d).code, "code")),
1008
- onInlineFormula: Ye,
1009
- onMathBlock: Ge,
1010
- onOrderedList: o[4] || (o[4] = (v) => ne(c(d).orderedList, "orderedList")),
1011
- onOutdentList: o[5] || (o[5] = (v) => ne(c(d).liftListItem, "outdentList")),
1012
- onSelectMode: We,
1013
- onSelectTextStyle: Ne
1014
- }, null, 8, ["code-visible", "formula-visible", "heading-visible", "list-visible", "mode", "mode-visible", "state", "text-style", "theme"]),
1015
- c($).visible.value ? (r(), _(kt, {
1159
+ translate: ve,
1160
+ onBulletList: n[0] || (n[0] = (f) => re(d(u).bulletList, "bulletList")),
1161
+ onCodeBlock: n[1] || (n[1] = (f) => xe(d(u).codeBlock, "codeBlock")),
1162
+ onSelectBackgroundColor: We,
1163
+ onSelectColor: Qe,
1164
+ onIndentList: n[2] || (n[2] = (f) => re(d(u).sinkListItem, "indentList")),
1165
+ onInlineCode: n[3] || (n[3] = (f) => xe(d(u).code, "code")),
1166
+ onInlineFormula: tt,
1167
+ onMathBlock: et,
1168
+ onOrderedList: n[4] || (n[4] = (f) => re(d(u).orderedList, "orderedList")),
1169
+ onOutdentList: n[5] || (n[5] = (f) => re(d(u).liftListItem, "outdentList")),
1170
+ onSelectMode: Je,
1171
+ onSelectTextStyle: Ie
1172
+ }, null, 8, ["code-visible", "background-color-visible", "color-visible", "formula-visible", "heading-visible", "list-visible", "mode", "mode-visible", "state", "text-style", "theme"]),
1173
+ d(A).visible.value ? (i(), le(Ht, {
1016
1174
  key: 0,
1017
1175
  ref_key: "linkForm",
1018
- ref: we,
1019
- "has-current-link": L.value.linkHref !== void 0,
1176
+ ref: ye,
1177
+ "has-current-link": E.value.linkHref !== void 0,
1020
1178
  locale: e.locale,
1021
- "open-in-new-window": q.value,
1179
+ "open-in-new-window": j.value,
1022
1180
  theme: e.theme,
1023
- text: K.value,
1024
- url: A.value,
1025
- onApply: Pe,
1026
- onCancel: Ce,
1027
- onRemove: o[6] || (o[6] = (v) => S(void 0, c(d).removeLink)),
1028
- "onUpdate:text": o[7] || (o[7] = (v) => K.value = v),
1029
- "onUpdate:url": o[8] || (o[8] = (v) => A.value = v),
1030
- "onUpdate:openInNewWindow": o[9] || (o[9] = (v) => q.value = v)
1031
- }, null, 8, ["has-current-link", "locale", "open-in-new-window", "theme", "text", "url"])) : E("", !0),
1032
- c(R).visible.value ? (r(), _(wt, {
1181
+ text: _.value,
1182
+ url: S.value,
1183
+ onApply: Ne,
1184
+ onCancel: pe,
1185
+ onRemove: n[6] || (n[6] = (f) => F(void 0, d(u).removeLink)),
1186
+ "onUpdate:text": n[7] || (n[7] = (f) => _.value = f),
1187
+ "onUpdate:url": n[8] || (n[8] = (f) => S.value = f),
1188
+ "onUpdate:openInNewWindow": n[9] || (n[9] = (f) => j.value = f)
1189
+ }, null, 8, ["has-current-link", "locale", "open-in-new-window", "theme", "text", "url"])) : $("", !0),
1190
+ d(q).visible.value ? (i(), le(Vt, {
1033
1191
  key: 1,
1034
1192
  ref_key: "imageForm",
1035
- ref: ke,
1036
- alt: k.value,
1193
+ ref: b,
1194
+ alt: V.value,
1037
1195
  locale: e.locale,
1038
1196
  theme: e.theme,
1039
- title: I.value,
1197
+ title: o.value,
1040
1198
  "upload-image": e.uploadImage,
1041
- url: l.value,
1042
- onApply: ze,
1043
- onCancel: Fe,
1044
- "onUpdate:alt": o[10] || (o[10] = (v) => k.value = v),
1045
- "onUpdate:title": o[11] || (o[11] = (v) => I.value = v),
1046
- "onUpdate:url": o[12] || (o[12] = (v) => l.value = v)
1047
- }, null, 8, ["alt", "locale", "theme", "title", "upload-image", "url"])) : E("", !0),
1048
- c(Z).visible.value ? (r(), _(oa, {
1199
+ url: v.value,
1200
+ onApply: De,
1201
+ onCancel: Re,
1202
+ "onUpdate:alt": n[10] || (n[10] = (f) => V.value = f),
1203
+ "onUpdate:title": n[11] || (n[11] = (f) => o.value = f),
1204
+ "onUpdate:url": n[12] || (n[12] = (f) => v.value = f)
1205
+ }, null, 8, ["alt", "locale", "theme", "title", "upload-image", "url"])) : $("", !0),
1206
+ d(ee).visible.value ? (i(), le(Ma, {
1049
1207
  key: 2,
1050
1208
  ref_key: "imageActions",
1051
- ref: he,
1052
- "object-fit": L.value.imageObjectFit,
1209
+ ref: Ce,
1210
+ "object-fit": E.value.imageObjectFit,
1053
1211
  theme: e.theme,
1054
- translate: me,
1055
- onFullWidth: o[13] || (o[13] = (v) => xe(c(d).setImageDisplay("100%", "contain", null))),
1056
- onObjectFit: o[14] || (o[14] = (v) => xe(c(d).setImageDisplay(void 0, v)))
1057
- }, null, 8, ["object-fit", "theme"])) : E("", !0)
1212
+ translate: ve,
1213
+ onFullWidth: n[13] || (n[13] = (f) => Be(d(u).setImageDisplay("100%", "contain", null))),
1214
+ onObjectFit: n[14] || (n[14] = (f) => Be(d(u).setImageDisplay(void 0, f)))
1215
+ }, null, 8, ["object-fit", "theme"])) : $("", !0)
1058
1216
  ])),
1059
1217
  g("div", {
1060
- class: vt(["markdown-editor__hosts", { "markdown-editor__hosts--split": n.value === "split" }])
1218
+ class: yt(["markdown-editor__hosts", { "markdown-editor__hosts--split": l.value === "split" }])
1061
1219
  }, [
1062
- n.value !== "markup" ? (r(), m("div", {
1220
+ l.value !== "markup" ? (i(), m("div", {
1063
1221
  key: 0,
1064
1222
  ref_key: "visualTarget",
1065
- ref: C,
1223
+ ref: M,
1066
1224
  class: "markdown-editor__visual"
1067
- }, null, 512)) : E("", !0),
1068
- n.value !== "wysiwyg" ? (r(), m("div", {
1225
+ }, null, 512)) : $("", !0),
1226
+ l.value !== "wysiwyg" ? (i(), m("div", {
1069
1227
  key: 1,
1070
1228
  ref_key: "markupTarget",
1071
1229
  ref: a,
1072
1230
  class: "markdown-editor__markup"
1073
- }, null, 512)) : E("", !0)
1231
+ }, null, 512)) : $("", !0)
1074
1232
  ], 2)
1075
- ], 8, za));
1233
+ ], 8, Ja));
1076
1234
  }
1077
- }), Qa = /* @__PURE__ */ ae(Na, [["__scopeId", "data-v-6f49df4e"]]);
1078
- function Ga(e = {}) {
1079
- const f = tt(e), y = h(f.getValue()), u = h(f.getMode()), b = h(f.readonly), d = h(f.toolbarVisible), s = () => f.destroy();
1080
- return f.on("change", (i) => {
1081
- y.value = i;
1082
- }), f.on("modeChange", (i) => {
1083
- u.value = i;
1084
- }), f.on("changeReadonly", ({ readonly: i }) => {
1085
- b.value = i;
1086
- }), f.on("changeToolbarVisibility", ({ visible: i }) => {
1087
- d.value = i;
1088
- }), He() !== null && be(s), {
1089
- destroy: s,
1090
- editor: f,
1091
- mode: ie(u),
1092
- readonly: ie(b),
1093
- toolbarVisible: ie(d),
1094
- value: ie(y)
1235
+ }), ul = /* @__PURE__ */ ie(el, [["__scopeId", "data-v-623bd764"]]);
1236
+ function ml(e = {}) {
1237
+ const k = rt(e), x = y(k.getValue()), c = y(k.getMode()), w = y(k.readonly), u = y(k.toolbarVisible), r = () => k.destroy();
1238
+ return k.on("change", (s) => {
1239
+ x.value = s;
1240
+ }), k.on("modeChange", (s) => {
1241
+ c.value = s;
1242
+ }), k.on("changeReadonly", ({ readonly: s }) => {
1243
+ w.value = s;
1244
+ }), k.on("changeToolbarVisibility", ({ visible: s }) => {
1245
+ u.value = s;
1246
+ }), Se() !== null && he(r), {
1247
+ destroy: r,
1248
+ editor: k,
1249
+ mode: ue(c),
1250
+ readonly: ue(w),
1251
+ toolbarVisible: ue(u),
1252
+ value: ue(x)
1095
1253
  };
1096
1254
  }
1097
1255
  export {
1098
- ol as ActionsManager,
1099
- Hl as BaseInputRules,
1100
- $l as BaseKeymap,
1101
- Sl as BaseSchema,
1102
- Vl as Blockquote,
1103
- Bi as BlockquoteSpecs,
1104
- Al as Bold,
1105
- Ti as BoldAttrs,
1106
- Ei as BoldSpecs,
1107
- Hi as BreakNodeName,
1108
- Pl as Breaks,
1109
- $i as BreaksSpecs,
1110
- zl as ClicksOnEdges,
1111
- Fl as Clipboard,
1112
- Nl as Code,
1113
- Rl as CodeBlock,
1114
- Si as CodeBlockAttrs,
1115
- Vi as CodeBlockSpecs,
1116
- Ai as CodeSpecs,
1117
- wi as CommonMarkPreset,
1118
- pi as CommonMarkSpecsPreset,
1119
- Dl as Cursor,
1120
- hi as DefaultPreset,
1121
- Il as Deflist,
1122
- Pi as DeflistAttr,
1123
- zi as DeflistNode,
1124
- Fi as DeflistSpecs,
1125
- ql as EditorModeKeymap,
1126
- il as EventEmitter,
1127
- sl as ExtensionBuilder,
1128
- rl as ExtensionPriority,
1129
- dl as ExtensionsManager,
1130
- yi as FullPreset,
1131
- xi as FullSpecsPreset,
1132
- Ol as GapCursorSelection,
1133
- jl as Heading,
1134
- Ni as HeadingSpecs,
1135
- Ul as History,
1136
- Wl as HistoryAction,
1137
- Ql as HorizontalRule,
1138
- Ri as HorizontalRuleSpecs,
1139
- Gl as Html,
1140
- Yl as HtmlAttr,
1141
- Kl as HtmlNode,
1142
- Zl as Image,
1143
- Xl as ImageAttr,
1144
- Jl as Italic,
1145
- Di as ItalicAttrs,
1146
- Ii as ItalicSpecs,
1147
- Za as Lang,
1148
- _l as Link,
1149
- qi as LinkAttr,
1150
- Oi as LinkSpecs,
1151
- en as Lists,
1152
- ul as Logger,
1153
- ml as Logger2,
1154
- tn as Mark,
1155
- cl as MarkdownCodec,
1156
- Qa as MarkdownEditor,
1157
- fi as MarkdownEditorForm,
1158
- wt as MarkdownEditorImageForm,
1159
- kt as MarkdownEditorLinkForm,
1160
- bi as MarkdownEditorTextInput,
1161
- vl as MarkdownParser,
1162
- gl as MarkdownParserDynamicModifier,
1163
- an as Mermaid,
1164
- fl as ParserTokenRegistry,
1165
- bl as ParserTokensRegistry,
1166
- ln as Placeholder,
1167
- nn as QuoteLink,
1168
- on as Resizable,
1169
- kl as SafeEventEmitter,
1170
- wl as SchemaDynamicModifier,
1171
- hl as SchemaSpecRegistry,
1172
- sn as Selection,
1173
- rn as SelectionContext,
1174
- yl as SerializerTokenRegistry,
1175
- Cl as SerializerTokensRegistry,
1176
- dn as Strike,
1177
- un as Table,
1178
- ji as TableAttrs,
1179
- Ui as TableCellAlign,
1180
- Wi as TableNode,
1181
- Qi as TableSpecs,
1182
- mn as Underline,
1183
- cn as VERSION,
1184
- Ml as WysiwygContentHandler,
1185
- vn as YfmHtmlBlock,
1186
- Ci as ZeroPreset,
1187
- gn as addBreak,
1188
- fn as addEmptyDefaultTextblockToEndOfDocumentActionName,
1189
- bn as addEmptyDefaultTextblockToStartOfDocumentActionName,
1190
- kn as addHorizontalRule,
1191
- wn as addImage,
1192
- hn as addParagraphToEnd,
1193
- yn as addParagraphToStart,
1194
- Cn as addTableColumn,
1195
- Mn as addTableRow,
1196
- pn as arrowDown,
1197
- xn as arrowLeft,
1198
- Ln as arrowRight,
1199
- Bn as arrowUp,
1200
- pl as basicMarkdownCodec,
1201
- xl as basicMarkdownSchema,
1202
- Gi as blockquoteNodeName,
1203
- Yi as boldMarkName,
1204
- tl as cn,
1205
- Ki as codeBlockNodeName,
1206
- Zi as codeMarkName,
1207
- Tn as collapseListsPlugin,
1208
- oi as commonmarkToolbarConfig,
1209
- Xa as configure,
1210
- Xe as createBasicEditorCommands,
1211
- et as createBasicMarkupCommands,
1212
- En as createFakeParagraph,
1213
- Hn as createGapCursorPlugin,
1214
- $n as createHistoryActions,
1215
- Sn as createListActions,
1216
- Vn as createListsInputRules,
1217
- An as createListsKeymap,
1218
- tt as createMarkdownEditor,
1219
- Pn as createTable,
1220
- ii as createToolbarConfig,
1221
- si as createToolbarGroup,
1222
- ri as createToolbarItem,
1223
- zn as createVueContextPanelPlugin,
1224
- Fn as createVueNodeView,
1225
- Nn as createVueWidgetDecoration,
1226
- Ll as defaultMarkdownSchema,
1227
- Rn as defaultMermaidSource,
1228
- di as defaultToolbarConfig,
1229
- Dn as defaultYfmHtml,
1230
- In as deleteTable,
1231
- qn as deleteTableColumn,
1232
- On as deleteTableRow,
1233
- jn as findFakeParaPosClosestToPos,
1234
- Un as findFakeParaPosForCodeBlock,
1235
- Wn as findFakeParaPosForNodeSelection,
1236
- Qn as findFakeParaPosForTextSelection,
1237
- ui as fullToolbarConfig,
1238
- Gn as gapCursorBackspace,
1239
- Bl as getBasicWysiwygSelectionState,
1240
- Yn as getBlockquoteType,
1241
- Kn as getBoldType,
1242
- Zn as getCodeBlockType,
1243
- Xn as getCodeType,
1244
- Ja as getConfig,
1245
- Jn as getCurrentLink,
1246
- _n as getDeflistTypes,
1247
- eo as getHeadingType,
1248
- to as getHorizontalRuleType,
1249
- ao as getImageType,
1250
- lo as getItalicType,
1251
- no as getLinkType,
1252
- oo as getMarkType,
1253
- Ze as getMarkdownEditorMessages,
1254
- io as getQuoteLinkType,
1255
- so as getStrikeType,
1256
- gt as getToolbarConfig,
1257
- ro as getUnderlineType,
1258
- uo as goToTableCell,
1259
- Xi as headingLevelAttr,
1260
- Ji as headingNodeName,
1261
- mo as hierarchicalSelectAll,
1262
- _i as horizontalRuleMarkupAttr,
1263
- es as horizontalRuleNodeName,
1264
- co as imageNodeName,
1265
- vo as imageObjectFitValues,
1266
- go as insertMermaid,
1267
- fo as insertTable,
1268
- bo as insertYfmHtmlBlock,
1269
- ko as isBreakNode,
1270
- wo as isGapCursorSelection,
1271
- ho as isInsideCode,
1272
- Y as isToolbarItemActive,
1273
- bt as isToolbarItemAvailable,
1274
- V as isToolbarItemEnabled,
1275
- ts as italicMarkName,
1276
- yo as joinPrevList,
1277
- Co as liftEmptyListItem,
1278
- Mo as liftFromQuote,
1279
- as as linkMarkName,
1280
- po as markMarkName,
1281
- ll as markdownEditorMessages,
1282
- mi as markdownEditorToolbarItemIds,
1283
- xo as mergeListsPlugin,
1284
- Lo as mermaidActionName,
1285
- Bo as mermaidNodeName,
1286
- ci as minimalToolbarConfig,
1287
- _e as mountBasicMarkupEditor,
1288
- Je as mountBasicWysiwygEditor,
1289
- To as moveToNextTableRow,
1290
- Eo as newlineInCode,
1291
- ft as normalizeToolbarItem,
1292
- Ho as quoteLinkActionName,
1293
- $o as quoteLinkNodeName,
1294
- So as removeCurrentLink,
1295
- Vo as removeLink,
1296
- Tl as renderMarkdownPreview,
1297
- Ao as resetCodeBlock,
1298
- Po as resetHeading,
1299
- zo as setCodeBlock,
1300
- Fo as setCodeBlockLanguage,
1301
- No as setImageDisplay,
1302
- Ro as setLink,
1303
- Do as setTableColumnAlignment,
1304
- Io as sinkOnlySelectedListItem,
1305
- qo as splitDeflist,
1306
- Oo as strikeMarkName,
1307
- _a as subscribeConfigure,
1308
- jo as toHeading,
1309
- Uo as toList,
1310
- Wo as toggleBold,
1311
- Qo as toggleCode,
1312
- Go as toggleHighlight,
1313
- Yo as toggleItalic,
1314
- Ko as toggleLink,
1315
- Zo as toggleQuote,
1316
- Xo as toggleQuoteLink,
1317
- Jo as toggleStrike,
1318
- _o as toggleUnderline,
1319
- ei as underlineMarkName,
1320
- Ga as useMarkdownEditor,
1321
- ti as wrapToDeflist,
1322
- ai as yfmHtmlBlockActionName,
1323
- li as yfmHtmlBlockNodeName,
1324
- vi as zeroToolbarConfig
1256
+ pl as ActionsManager,
1257
+ Gl as BaseInputRules,
1258
+ Kl as BaseKeymap,
1259
+ Yl as BaseSchema,
1260
+ Zl as Blockquote,
1261
+ Ui as BlockquoteSpecs,
1262
+ Xl as Bold,
1263
+ Wi as BoldAttrs,
1264
+ Qi as BoldSpecs,
1265
+ Gi as BreakNodeName,
1266
+ Jl as Breaks,
1267
+ Ki as BreaksSpecs,
1268
+ _l as ClicksOnEdges,
1269
+ eo as Clipboard,
1270
+ to as Code,
1271
+ ao as CodeBlock,
1272
+ Yi as CodeBlockAttrs,
1273
+ Zi as CodeBlockSpecs,
1274
+ Xi as CodeSpecs,
1275
+ Fi as CommonMarkPreset,
1276
+ qi as CommonMarkSpecsPreset,
1277
+ lo as Cursor,
1278
+ Ni as DefaultPreset,
1279
+ oo as Deflist,
1280
+ Ji as DeflistAttr,
1281
+ _i as DeflistNode,
1282
+ es as DeflistSpecs,
1283
+ no as EditorModeKeymap,
1284
+ xl as EventEmitter,
1285
+ Ll as ExtensionBuilder,
1286
+ Bl as ExtensionPriority,
1287
+ Tl as ExtensionsManager,
1288
+ Di as FullPreset,
1289
+ Oi as FullSpecsPreset,
1290
+ io as GapCursorSelection,
1291
+ so as Heading,
1292
+ ts as HeadingSpecs,
1293
+ ro as History,
1294
+ uo as HistoryAction,
1295
+ mo as HorizontalRule,
1296
+ as as HorizontalRuleSpecs,
1297
+ co as Html,
1298
+ go as HtmlAttr,
1299
+ vo as HtmlNode,
1300
+ bo as Image,
1301
+ fo as ImageAttr,
1302
+ ko as Italic,
1303
+ ls as ItalicAttrs,
1304
+ os as ItalicSpecs,
1305
+ vl as Lang,
1306
+ wo as Link,
1307
+ ns as LinkAttr,
1308
+ is as LinkSpecs,
1309
+ ho as Lists,
1310
+ El as Logger,
1311
+ $l as Logger2,
1312
+ yo as Mark,
1313
+ Hl as MarkdownCodec,
1314
+ ul as MarkdownEditor,
1315
+ Ai as MarkdownEditorForm,
1316
+ Vt as MarkdownEditorImageForm,
1317
+ Ht as MarkdownEditorLinkForm,
1318
+ Pi as MarkdownEditorTextInput,
1319
+ Vl as MarkdownParser,
1320
+ Sl as MarkdownParserDynamicModifier,
1321
+ Co as Mermaid,
1322
+ Al as ParserTokenRegistry,
1323
+ Pl as ParserTokensRegistry,
1324
+ Mo as Placeholder,
1325
+ po as QuoteLink,
1326
+ xo as Resizable,
1327
+ zl as SafeEventEmitter,
1328
+ Fl as SchemaDynamicModifier,
1329
+ Nl as SchemaSpecRegistry,
1330
+ Lo as Selection,
1331
+ Bo as SelectionContext,
1332
+ Dl as SerializerTokenRegistry,
1333
+ Rl as SerializerTokensRegistry,
1334
+ To as Strike,
1335
+ Eo as Table,
1336
+ ss as TableAttrs,
1337
+ rs as TableCellAlign,
1338
+ ds as TableNode,
1339
+ us as TableSpecs,
1340
+ $o as Underline,
1341
+ Ho as VERSION,
1342
+ Il as WysiwygContentHandler,
1343
+ Vo as YfmHtmlBlock,
1344
+ Ri as ZeroPreset,
1345
+ So as addBreak,
1346
+ Ao as addEmptyDefaultTextblockToEndOfDocumentActionName,
1347
+ Po as addEmptyDefaultTextblockToStartOfDocumentActionName,
1348
+ zo as addHorizontalRule,
1349
+ Fo as addImage,
1350
+ No as addParagraphToEnd,
1351
+ Do as addParagraphToStart,
1352
+ Ro as addTableColumn,
1353
+ Io as addTableRow,
1354
+ qo as arrowDown,
1355
+ Oo as arrowLeft,
1356
+ jo as arrowRight,
1357
+ Uo as arrowUp,
1358
+ ql as basicMarkdownCodec,
1359
+ Ol as basicMarkdownSchema,
1360
+ ms as blockquoteNodeName,
1361
+ cs as boldMarkName,
1362
+ hl as cn,
1363
+ gs as codeBlockNodeName,
1364
+ vs as codeMarkName,
1365
+ Wo as collapseListsPlugin,
1366
+ pi as commonmarkToolbarConfig,
1367
+ bl as configure,
1368
+ ot as createBasicEditorCommands,
1369
+ st as createBasicMarkupCommands,
1370
+ Qo as createFakeParagraph,
1371
+ Go as createGapCursorPlugin,
1372
+ Ko as createHistoryActions,
1373
+ Yo as createListActions,
1374
+ Zo as createListsInputRules,
1375
+ Xo as createListsKeymap,
1376
+ rt as createMarkdownEditor,
1377
+ Jo as createTable,
1378
+ xi as createToolbarConfig,
1379
+ Li as createToolbarGroup,
1380
+ Bi as createToolbarItem,
1381
+ _o as createVueContextPanelPlugin,
1382
+ en as createVueNodeView,
1383
+ tn as createVueWidgetDecoration,
1384
+ jl as defaultMarkdownSchema,
1385
+ an as defaultMermaidSource,
1386
+ Ti as defaultToolbarConfig,
1387
+ ln as defaultYfmHtml,
1388
+ on as deleteTable,
1389
+ nn as deleteTableColumn,
1390
+ sn as deleteTableRow,
1391
+ rn as findFakeParaPosClosestToPos,
1392
+ dn as findFakeParaPosForCodeBlock,
1393
+ un as findFakeParaPosForNodeSelection,
1394
+ mn as findFakeParaPosForTextSelection,
1395
+ Ei as fullToolbarConfig,
1396
+ cn as gapCursorBackspace,
1397
+ Ul as getBasicWysiwygSelectionState,
1398
+ gn as getBlockquoteType,
1399
+ vn as getBoldType,
1400
+ bn as getCodeBlockType,
1401
+ fn as getCodeType,
1402
+ fl as getConfig,
1403
+ kn as getCurrentLink,
1404
+ wn as getDeflistTypes,
1405
+ hn as getHeadingType,
1406
+ yn as getHorizontalRuleType,
1407
+ Cn as getImageType,
1408
+ Mn as getItalicType,
1409
+ pn as getLinkType,
1410
+ xn as getMarkType,
1411
+ lt as getMarkdownEditorMessages,
1412
+ Ln as getQuoteLinkType,
1413
+ Bn as getStrikeType,
1414
+ Tt as getToolbarConfig,
1415
+ Tn as getUnderlineType,
1416
+ En as goToTableCell,
1417
+ bs as headingLevelAttr,
1418
+ fs as headingNodeName,
1419
+ $n as hierarchicalSelectAll,
1420
+ ks as horizontalRuleMarkupAttr,
1421
+ ws as horizontalRuleNodeName,
1422
+ Hn as imageNodeName,
1423
+ Vn as imageObjectFitValues,
1424
+ Sn as insertMermaid,
1425
+ An as insertTable,
1426
+ Pn as insertYfmHtmlBlock,
1427
+ zn as isBreakNode,
1428
+ Fn as isGapCursorSelection,
1429
+ Nn as isInsideCode,
1430
+ X as isToolbarItemActive,
1431
+ $t as isToolbarItemAvailable,
1432
+ N as isToolbarItemEnabled,
1433
+ hs as italicMarkName,
1434
+ Dn as joinPrevList,
1435
+ Rn as liftEmptyListItem,
1436
+ In as liftFromQuote,
1437
+ ys as linkMarkName,
1438
+ qn as markMarkName,
1439
+ Cl as markdownEditorMessages,
1440
+ $i as markdownEditorToolbarItemIds,
1441
+ On as mergeListsPlugin,
1442
+ jn as mermaidActionName,
1443
+ Un as mermaidNodeName,
1444
+ Hi as minimalToolbarConfig,
1445
+ it as mountBasicMarkupEditor,
1446
+ nt as mountBasicWysiwygEditor,
1447
+ Wn as moveToNextTableRow,
1448
+ Qn as newlineInCode,
1449
+ Et as normalizeToolbarItem,
1450
+ Gn as quoteLinkActionName,
1451
+ Kn as quoteLinkNodeName,
1452
+ Yn as removeCurrentLink,
1453
+ Zn as removeLink,
1454
+ Wl as renderMarkdownPreview,
1455
+ Xn as resetCodeBlock,
1456
+ Jn as resetHeading,
1457
+ _n as setCodeBlock,
1458
+ ei as setCodeBlockLanguage,
1459
+ ti as setImageDisplay,
1460
+ ai as setLink,
1461
+ li as setTableColumnAlignment,
1462
+ oi as sinkOnlySelectedListItem,
1463
+ ni as splitDeflist,
1464
+ ii as strikeMarkName,
1465
+ kl as subscribeConfigure,
1466
+ si as toHeading,
1467
+ ri as toList,
1468
+ di as toggleBold,
1469
+ ui as toggleCode,
1470
+ mi as toggleHighlight,
1471
+ ci as toggleItalic,
1472
+ gi as toggleLink,
1473
+ vi as toggleQuote,
1474
+ bi as toggleQuoteLink,
1475
+ fi as toggleStrike,
1476
+ ki as toggleUnderline,
1477
+ wi as underlineMarkName,
1478
+ ml as useMarkdownEditor,
1479
+ hi as wrapToDeflist,
1480
+ yi as yfmHtmlBlockActionName,
1481
+ Ci as yfmHtmlBlockNodeName,
1482
+ Vi as zeroToolbarConfig
1325
1483
  };