hexagon-editor 0.1.1 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,61 +1,62 @@
1
- import { Lang as Ua, configure as Wa, getConfig as Qa, subscribeConfigure as Ga } from "./configure.js";
2
- import { cn as Za } from "./classname.js";
3
- import { getMarkdownEditorMessages as Ge } from "./i18n.js";
4
- import { markdownEditorMessages as Xa } from "./i18n.js";
5
- import { n as Ye, u as ce, r as Ze, q as Ke, o as Xe } from "./schema-dynamic-modifier-Dhf0m6tE.js";
6
- import { A as _a, E as el, a as tl, b as al, c as ll, L as nl, L as ol, M as il, e as sl, f as rl, P as dl, g as ul, S as ml, h as cl, i as gl, j as vl, k as fl, W as bl, l as kl, m as wl, s as hl, p as yl, t as Ml } from "./schema-dynamic-modifier-Dhf0m6tE.js";
7
- import { c4 as Je, c5 as _e, c6 as et, c7 as tt, c8 as at } from "./base-Bnv2-Te4.js";
8
- import { B as pl, g as xl, h as Ll, i as Tl, k as Bl, n as El, C as Hl, o as $l, p as Vl, q as Sl, r as Al, D as Pl, E as zl, G as Fl, H as Nl, u as Rl, v as Dl, w as Il, x as Ol, y as ql, z as jl, I as Ul, A as Wl, J as Ql, L as Gl, K as Yl, M as Zl, P as Kl, Q as Xl, R as Jl, S as _l, T as en, U as tn, V as an, X as ln, Y as nn, c9 as on, Z as sn, _ as rn, $ as dn, a0 as un, a1 as mn, a2 as cn, a3 as gn, a4 as vn, a5 as fn, a6 as bn, ca as kn, cb as wn, cc as hn, cd as yn, c as Mn, ce as Cn, ac as pn, ad as xn, af as Ln, a as Tn, b as Bn, ak as En, d as Hn, e as $n, f as Vn, an as Sn, ao as An, ap as Pn, aq as zn, ar as Fn, cf as Nn, cg as Rn, ch as Dn, ci as In, cj as On, as as qn, at as jn, au as Un, av as Wn, aw as Qn, ax as Gn, ay as Yn, az as Zn, aA as Kn, aB as Xn, aC as Jn, aD as _n, aF as eo, aG as to, aI as ao, aJ as lo, ck as no, aN as oo, aP as io, aT as so, aU as ro, aV as uo, aW as mo, aX as co, aY as go, j as vo, l as fo, a_ as bo, a$ as ko, m as wo, b7 as ho, b8 as yo, bd as Mo, be as Co, bh as po, bi as xo, bl as Lo, bn as To, bo as Bo, bp as Eo, bz as Ho, bA as $o, bB as Vo, bC as So, bD as Ao, s as Po, bE as zo, bF as Fo, bL as No, t as Ro, bN as Do, bO as Io, bQ as Oo, bR as qo, bS as jo, bT as Uo, bU as Wo, bV as Qo, bX as Go, bY as Yo, b$ as Zo, c0 as Ko, c1 as Xo } from "./base-Bnv2-Te4.js";
9
- import { c as _o, g as ei } from "./optional-renderers-BalvqqvY.js";
10
- import { defineComponent as K, openBlock as s, createElementBlock as u, ref as y, Fragment as A, createElementVNode as v, withModifiers as w, createVNode as C, toDisplayString as B, createCommentVNode as T, renderList as ne, createStaticVNode as lt, unref as m, renderSlot as ge, onBeforeUnmount as ve, nextTick as le, getCurrentInstance as Te, computed as xe, watch as te, onMounted as nt, createBlock as Z, withCtx as ot, normalizeProps as it, guardReactiveProps as st, Teleport as rt, normalizeClass as dt, readonly as ae } from "vue";
11
- import { c as X, a as ut, M as mt } from "./MarkdownEditorLinkForm-mq-BVYM_.js";
12
- import { _ as ai, b as li } from "./MarkdownEditorLinkForm-mq-BVYM_.js";
13
- import { getToolbarConfig as ct, isToolbarItemEnabled as V, isToolbarItemActive as j, normalizeToolbarItem as gt, isToolbarItemAvailable as vt } from "./toolbar.js";
14
- 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 gi } from "./toolbar.js";
1
+ import { Lang as Za, configure as Ka, getConfig as Xa, subscribeConfigure as Ja } from "./configure.js";
2
+ import { cn as el } from "./classname.js";
3
+ import { getMarkdownEditorMessages as Ke } from "./i18n.js";
4
+ import { markdownEditorMessages as al } 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-BckOOKIe.js";
6
+ import { A as nl, E as ol, a as il, b as sl, c as rl, L as dl, L as ul, M as ml, e as cl, f as vl, P as gl, g as fl, S as bl, h as kl, i as wl, j as hl, k as yl, W as Ml, l as Cl, m as pl, s as xl, q as Ll, u as Bl } from "./markup-commands-BckOOKIe.js";
7
+ import { c4 as at, c5 as lt, c6 as nt, c7 as ot, c8 as it } from "./base-Bnv2-Te4.js";
8
+ import { B as El, g as Hl, h as $l, i as Vl, k as Sl, n as Al, C as Pl, o as zl, p as Fl, q as Nl, r as Rl, D as Dl, E as Il, G as ql, H as Ol, u as jl, v as Ul, w as Wl, x as Ql, y as Gl, z as Yl, I as Zl, A as Kl, J as Xl, L as Jl, K as _l, M as en, P as tn, Q as an, R as ln, S as nn, T as on, U as sn, V as rn, X as dn, Y as un, c9 as mn, Z as cn, _ as vn, $ as gn, a0 as fn, a1 as bn, a2 as kn, a3 as wn, a4 as hn, a5 as yn, a6 as Mn, ca as Cn, cb as pn, cc as xn, cd as Ln, c as Bn, ce as Tn, ac as En, ad as Hn, af as $n, a as Vn, b as Sn, ak as An, d as Pn, e as zn, f as Fn, an as Nn, ao as Rn, ap as Dn, aq as In, ar as qn, cf as On, cg as jn, ch as Un, ci as Wn, cj as Qn, as as Gn, at as Yn, au as Zn, av as Kn, aw as Xn, ax as Jn, ay as _n, az as eo, aA as to, aB as ao, aC as lo, aD as no, aF as oo, aG as io, aI as so, aJ as ro, ck as uo, aN as mo, aP as co, aT as vo, aU as go, aV as fo, aW as bo, aX as ko, aY as wo, j as ho, l as yo, a_ as Mo, a$ as Co, m as po, b7 as xo, b8 as Lo, bd as Bo, be as To, bh as Eo, bi as Ho, bl as $o, bn as Vo, bo as So, bp as Ao, bz as Po, bA as zo, bB as Fo, bC as No, bD as Ro, s as Do, bE as Io, bF as qo, bL as Oo, t as jo, bN as Uo, bO as Wo, bQ as Qo, bR as Go, bS as Yo, bT as Zo, bU as Ko, bV as Xo, bX as Jo, bY as _o, b$ as ei, c0 as ti, c1 as ai } from "./base-Bnv2-Te4.js";
9
+ import { c as ni, g as oi } from "./optional-renderers-BalvqqvY.js";
10
+ import { defineComponent as J, openBlock as r, createElementBlock as m, ref as h, Fragment as F, createElementVNode as f, withModifiers as w, createVNode as C, toDisplayString as H, createCommentVNode as E, renderList as oe, createStaticVNode as st, unref as c, renderSlot as fe, onBeforeUnmount as be, nextTick as ne, getCurrentInstance as He, computed as Te, watch as ae, onMounted as rt, createBlock as X, withCtx as dt, normalizeProps as ut, guardReactiveProps as mt, Teleport as ct, normalizeClass as vt, readonly as le } from "vue";
11
+ import { _ } from "./_plugin-vue_export-helper-CHgC5LLL.js";
12
+ import { getToolbarConfig as gt, isToolbarItemEnabled as S, isToolbarItemActive as G, normalizeToolbarItem as ft, isToolbarItemAvailable as bt } from "./toolbar.js";
13
+ import { commonmarkToolbarConfig as si, createToolbarConfig as ri, createToolbarGroup as di, createToolbarItem as ui, defaultToolbarConfig as mi, fullToolbarConfig as ci, markdownEditorToolbarItemIds as vi, minimalToolbarConfig as gi, zeroToolbarConfig as fi } from "./toolbar.js";
14
+ import { a as kt, M as wt } from "./MarkdownEditorLinkForm-C7CGgA83.js";
15
+ import { _ as ki, b as wi } from "./MarkdownEditorLinkForm-C7CGgA83.js";
15
16
  import "./katex-ByXcxnHy.js";
16
- import { C as fi, D as bi, F as ki, Z as wi } from "./full-C-o2lPBX.js";
17
- import { C as yi, F as Mi } from "./full-specs-Cl-ODShc.js";
18
- import { B as pi, a as xi, b as Li, c as Ti, d as Bi, C as Ei, e as Hi, f as $i, D as Vi, g as Si, h as Ai, H as Pi, i as zi, I as Fi, j as Ni, L as Ri, k as Di, T as Ii, l as Oi, m as qi, n as ji, o as Ui, r as Wi, v as Qi, y as Gi, M as Yi, O as Zi, R as Ki, S as Xi, W as Ji, Z as _i } from "./heading-specs-D7Bj4aIM.js";
19
- import './index.css';const 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.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
- `, bt = `<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
- `, 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="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
- `, 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="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
- `, 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.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
- `, 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="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
- `, Mt = `<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
- `, Ct = `<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">
17
+ import { C as yi, D as Mi, F as Ci, Z as pi } from "./full-C-o2lPBX.js";
18
+ import { C as Li, F as Bi } from "./full-specs-Cl-ODShc.js";
19
+ import { B as Ei, a as Hi, b as $i, c as Vi, d as Si, C as Ai, e as Pi, f as zi, D as Fi, g as Ni, h as Ri, H as Di, i as Ii, I as qi, j as Oi, L as ji, k as Ui, T as Wi, l as Qi, m as Gi, n as Yi, o as Zi, r as Ki, v as Xi, y as Ji, M as _i, O as es, R as ts, S as as, W as ls, Z as ns } from "./heading-specs-D7Bj4aIM.js";
20
+ import './index.css';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>
21
+ `, 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>
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="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
+ `, 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="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
+ `, 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>
25
+ `, 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>
26
+ `, 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>
27
+ `, Bt = `<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">
27
28
  <circle cx="8" cy="8" r="2.25"/>
28
29
  <path d="M6.7 1.5h2.6l.4 1.6c.3.1.6.3.9.5l1.6-.5 1.3 2.2-1.2 1.1v1.2l1.2 1.1-1.3 2.2-1.6-.5-.9.5-.4 1.6H6.7l-.4-1.6-.9-.5-1.6.5-1.3-2.2 1.2-1.1V6.4L2.5 5.3l1.3-2.2 1.6.5.9-.5.4-1.6Z"/>
29
30
  </svg>
30
- `, 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="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>
31
- `, 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="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>
32
- `, Lt = `<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>
33
- `, 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="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>
34
- `, Bt = `<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">
31
+ `, 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>
32
+ `, 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>
33
+ `, 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>
34
+ `, $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>
35
+ `, Vt = `<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">
35
36
  <rect x="1.5" y="1.5" width="4" height="3" rx=".75"/>
36
37
  <rect x="10.5" y="1.5" width="4" height="3" rx=".75"/>
37
38
  <rect x="6" y="11.5" width="4" height="3" rx=".75"/>
38
39
  <path d="M3.5 4.5v2h4.5v5M12.5 4.5v2H8"/>
39
40
  </svg>
40
- `, 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="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>
41
- `, Ht = `<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>
42
- `, $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="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>
43
- `, 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="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>
44
- `, 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="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>
45
- `, At = ["innerHTML"], Pt = /* @__PURE__ */ K({
41
+ `, 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="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>
42
+ `, 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>
43
+ `, 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>
44
+ `, 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>
45
+ `, 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>
46
+ `, Nt = ["innerHTML"], Rt = /* @__PURE__ */ J({
46
47
  __name: "MarkdownEditorToolbarIcon",
47
48
  props: {
48
49
  name: {}
49
50
  },
50
51
  setup(e) {
51
- const c = { arrowLeft: ft, arrowRight: bt, bold: kt, bulletList: wt, chevronDown: ht, code: yt, function: Mt, gear: Ct, horizontalRule: pt, image: xt, italic: Lt, link: Tt, mermaid: Bt, orderedList: Et, quote: Ht, strike: $t, table: Vt, underline: St }, M = e;
52
- return (d, f) => (s(), u("span", {
52
+ const g = { arrowLeft: ht, arrowRight: yt, bold: Mt, bulletList: Ct, chevronDown: pt, code: xt, function: Lt, gear: Bt, horizontalRule: Tt, image: Et, italic: Ht, link: $t, mermaid: Vt, orderedList: St, quote: At, strike: Pt, table: zt, underline: Ft }, y = e;
53
+ return (u, b) => (r(), m("span", {
53
54
  class: "markdown-editor__toolbar-icon",
54
55
  "aria-hidden": "true",
55
- innerHTML: c[M.name]
56
- }, null, 8, At));
56
+ innerHTML: g[y.name]
57
+ }, null, 8, Nt));
57
58
  }
58
- }), p = /* @__PURE__ */ X(Pt, [["__scopeId", "data-v-ec4329c1"]]), zt = ["data-theme", "aria-label"], Ft = ["aria-checked"], Nt = ["aria-checked"], Rt = ["data-theme", "aria-label"], Dt = ["aria-checked", "onClick"], It = { class: "markdown-editor__floating-menu-icon" }, Ot = ["data-theme", "aria-label"], qt = ["data-theme", "aria-label"], jt = ["aria-checked"], Ut = ["aria-checked"], Wt = ["disabled"], Qt = ["disabled"], Gt = ["data-theme", "aria-label"], Yt = ["aria-checked", "onClick"], Zt = /* @__PURE__ */ K({
59
+ }), p = /* @__PURE__ */ _(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"], Zt = ["disabled"], Kt = ["disabled"], Xt = ["data-theme", "aria-label"], Jt = ["aria-checked", "onClick"], _t = /* @__PURE__ */ J({
59
60
  __name: "MarkdownEditorFloatingMenus",
60
61
  props: {
61
62
  codeVisible: { type: Boolean },
@@ -70,173 +71,173 @@ import './index.css';const ft = `<svg xmlns="http://www.w3.org/2000/svg" width="
70
71
  translate: { type: Function }
71
72
  },
72
73
  emits: ["code-block", "inline-code", "inline-formula", "math-block", "select-mode", "select-text-style", "bullet-list", "ordered-list", "indent-list", "outdent-list"],
73
- setup(e, { expose: c, emit: M }) {
74
- const d = M, f = y(), r = y(), h = y(), o = y(), t = y(), b = ["wysiwyg", "markup", "split"];
75
- return c({
74
+ setup(e, { expose: g, emit: y }) {
75
+ const u = y, b = h(), d = h(), s = h(), i = h(), a = h(), M = ["wysiwyg", "markup", "split"];
76
+ return g({
76
77
  getElement(n) {
77
- return { code: f.value, formula: r.value, heading: h.value, list: o.value, mode: t.value }[n];
78
+ return { code: b.value, formula: d.value, heading: s.value, list: i.value, mode: a.value }[n];
78
79
  }
79
- }), (n, l) => (s(), u(A, null, [
80
- e.codeVisible ? (s(), u("div", {
80
+ }), (n, l) => (r(), m(F, null, [
81
+ e.codeVisible ? (r(), m("div", {
81
82
  key: 0,
82
83
  ref_key: "code",
83
- ref: f,
84
+ ref: b,
84
85
  class: "markdown-editor__floating-menu",
85
86
  "data-theme": e.theme,
86
87
  role: "menu",
87
88
  "aria-label": e.translate("code")
88
89
  }, [
89
- v("button", {
90
+ f("button", {
90
91
  "aria-checked": e.state.code,
91
92
  role: "menuitemradio",
92
93
  type: "button",
93
94
  onMousedown: l[0] || (l[0] = w(() => {
94
95
  }, ["prevent"])),
95
- onClick: l[1] || (l[1] = (k) => d("inline-code"))
96
+ onClick: l[1] || (l[1] = (k) => u("inline-code"))
96
97
  }, [
97
98
  C(p, { name: "code" }),
98
- v("span", null, B(e.translate("code")), 1)
99
- ], 40, Ft),
100
- v("button", {
99
+ f("span", null, H(e.translate("code")), 1)
100
+ ], 40, It),
101
+ f("button", {
101
102
  "aria-checked": e.state.codeBlock,
102
103
  role: "menuitemradio",
103
104
  type: "button",
104
105
  onMousedown: l[2] || (l[2] = w(() => {
105
106
  }, ["prevent"])),
106
- onClick: l[3] || (l[3] = (k) => d("code-block"))
107
+ onClick: l[3] || (l[3] = (k) => u("code-block"))
107
108
  }, [
108
- l[16] || (l[16] = v("span", { class: "markdown-editor__floating-menu-icon" }, "{ }", -1)),
109
- v("span", null, B(e.translate("codeBlock")), 1)
110
- ], 40, Nt)
111
- ], 8, zt)) : T("", !0),
112
- e.headingVisible ? (s(), u("div", {
109
+ l[16] || (l[16] = f("span", { class: "markdown-editor__floating-menu-icon" }, "{ }", -1)),
110
+ f("span", null, H(e.translate("codeBlock")), 1)
111
+ ], 40, qt)
112
+ ], 8, Dt)) : E("", !0),
113
+ e.headingVisible ? (r(), m("div", {
113
114
  key: 1,
114
115
  ref_key: "heading",
115
- ref: h,
116
+ ref: s,
116
117
  class: "markdown-editor__floating-menu",
117
118
  "data-theme": e.theme,
118
119
  role: "menu",
119
120
  "aria-label": e.translate("heading")
120
121
  }, [
121
- (s(), u(A, null, ne(["paragraph", "1", "2", "3", "4", "5", "6"], (k) => v("button", {
122
+ (r(), m(F, null, oe(["paragraph", "1", "2", "3", "4", "5", "6"], (k) => f("button", {
122
123
  key: k,
123
124
  "aria-checked": e.textStyle === k,
124
125
  role: "menuitemradio",
125
126
  type: "button",
126
- onClick: (J) => d("select-text-style", k)
127
+ onClick: (I) => u("select-text-style", k)
127
128
  }, [
128
- v("span", It, B(k === "paragraph" ? "T" : `H${k}`), 1),
129
- v("span", null, B(k === "paragraph" ? e.translate("paragraph") : `${e.translate("heading")} ${k}`), 1)
130
- ], 8, Dt)), 64))
131
- ], 8, Rt)) : T("", !0),
132
- e.formulaVisible ? (s(), u("div", {
129
+ f("span", Ut, H(k === "paragraph" ? "T" : `H${k}`), 1),
130
+ f("span", null, H(k === "paragraph" ? e.translate("paragraph") : `${e.translate("heading")} ${k}`), 1)
131
+ ], 8, jt)), 64))
132
+ ], 8, Ot)) : E("", !0),
133
+ e.formulaVisible ? (r(), m("div", {
133
134
  key: 2,
134
135
  ref_key: "formula",
135
- ref: r,
136
+ ref: d,
136
137
  class: "markdown-editor__floating-menu",
137
138
  "data-theme": e.theme,
138
139
  role: "menu",
139
140
  "aria-label": e.translate("formulaInsert")
140
141
  }, [
141
- v("button", {
142
+ f("button", {
142
143
  role: "menuitem",
143
144
  type: "button",
144
145
  onMousedown: l[4] || (l[4] = w(() => {
145
146
  }, ["prevent"])),
146
- onClick: l[5] || (l[5] = (k) => d("inline-formula"))
147
+ onClick: l[5] || (l[5] = (k) => u("inline-formula"))
147
148
  }, [
148
- l[17] || (l[17] = v("span", { class: "markdown-editor__floating-menu-icon" }, "ƒ", -1)),
149
- v("span", null, B(e.translate("formulaInline")), 1)
149
+ l[17] || (l[17] = f("span", { class: "markdown-editor__floating-menu-icon" }, "ƒ", -1)),
150
+ f("span", null, H(e.translate("formulaInline")), 1)
150
151
  ], 32),
151
- v("button", {
152
+ f("button", {
152
153
  role: "menuitem",
153
154
  type: "button",
154
155
  onMousedown: l[6] || (l[6] = w(() => {
155
156
  }, ["prevent"])),
156
- onClick: l[7] || (l[7] = (k) => d("math-block"))
157
+ onClick: l[7] || (l[7] = (k) => u("math-block"))
157
158
  }, [
158
- l[18] || (l[18] = v("span", { class: "markdown-editor__floating-menu-icon" }, "∑", -1)),
159
- v("span", null, B(e.translate("formulaBlock")), 1)
159
+ l[18] || (l[18] = f("span", { class: "markdown-editor__floating-menu-icon" }, "∑", -1)),
160
+ f("span", null, H(e.translate("formulaBlock")), 1)
160
161
  ], 32)
161
- ], 8, Ot)) : T("", !0),
162
- e.listVisible ? (s(), u("div", {
162
+ ], 8, Wt)) : E("", !0),
163
+ e.listVisible ? (r(), m("div", {
163
164
  key: 3,
164
165
  ref_key: "list",
165
- ref: o,
166
+ ref: i,
166
167
  class: "markdown-editor__floating-menu markdown-editor__floating-menu--list",
167
168
  "data-theme": e.theme,
168
169
  role: "menu",
169
170
  "aria-label": e.translate("bulletList")
170
171
  }, [
171
- v("button", {
172
+ f("button", {
172
173
  "aria-checked": e.state.bulletList,
173
174
  role: "menuitemradio",
174
175
  type: "button",
175
176
  onMousedown: l[8] || (l[8] = w(() => {
176
177
  }, ["prevent"])),
177
- onClick: l[9] || (l[9] = (k) => d("bullet-list"))
178
+ onClick: l[9] || (l[9] = (k) => u("bullet-list"))
178
179
  }, [
179
180
  C(p, { name: "bulletList" }),
180
- v("span", null, B(e.translate("bulletList")), 1)
181
- ], 40, jt),
182
- v("button", {
181
+ f("span", null, H(e.translate("bulletList")), 1)
182
+ ], 40, Gt),
183
+ f("button", {
183
184
  "aria-checked": e.state.orderedList,
184
185
  role: "menuitemradio",
185
186
  type: "button",
186
187
  onMousedown: l[10] || (l[10] = w(() => {
187
188
  }, ["prevent"])),
188
- onClick: l[11] || (l[11] = (k) => d("ordered-list"))
189
+ onClick: l[11] || (l[11] = (k) => u("ordered-list"))
189
190
  }, [
190
191
  C(p, { name: "orderedList" }),
191
- v("span", null, B(e.translate("orderedList")), 1)
192
- ], 40, Ut),
193
- v("button", {
192
+ f("span", null, H(e.translate("orderedList")), 1)
193
+ ], 40, Yt),
194
+ f("button", {
194
195
  disabled: !e.state.listIndentEnabled,
195
196
  role: "menuitem",
196
197
  type: "button",
197
198
  onMousedown: l[12] || (l[12] = w(() => {
198
199
  }, ["prevent"])),
199
- onClick: l[13] || (l[13] = (k) => d("indent-list"))
200
+ onClick: l[13] || (l[13] = (k) => u("indent-list"))
200
201
  }, [
201
- l[19] || (l[19] = v("span", { class: "markdown-editor__floating-menu-icon" }, "→", -1)),
202
- v("span", null, B(e.translate("listIndent")), 1),
203
- l[20] || (l[20] = v("kbd", null, "Tab", -1))
204
- ], 40, Wt),
205
- v("button", {
202
+ l[19] || (l[19] = f("span", { class: "markdown-editor__floating-menu-icon" }, "→", -1)),
203
+ f("span", null, H(e.translate("listIndent")), 1),
204
+ l[20] || (l[20] = f("kbd", null, "Tab", -1))
205
+ ], 40, Zt),
206
+ f("button", {
206
207
  disabled: !e.state.listOutdentEnabled,
207
208
  role: "menuitem",
208
209
  type: "button",
209
210
  onMousedown: l[14] || (l[14] = w(() => {
210
211
  }, ["prevent"])),
211
- onClick: l[15] || (l[15] = (k) => d("outdent-list"))
212
+ onClick: l[15] || (l[15] = (k) => u("outdent-list"))
212
213
  }, [
213
- l[21] || (l[21] = v("span", { class: "markdown-editor__floating-menu-icon" }, "←", -1)),
214
- v("span", null, B(e.translate("listOutdent")), 1),
215
- l[22] || (l[22] = v("kbd", null, "⇧ Tab", -1))
216
- ], 40, Qt)
217
- ], 8, qt)) : T("", !0),
218
- e.modeVisible ? (s(), u("div", {
214
+ l[21] || (l[21] = f("span", { class: "markdown-editor__floating-menu-icon" }, "←", -1)),
215
+ f("span", null, H(e.translate("listOutdent")), 1),
216
+ l[22] || (l[22] = f("kbd", null, "⇧ Tab", -1))
217
+ ], 40, Kt)
218
+ ], 8, Qt)) : E("", !0),
219
+ e.modeVisible ? (r(), m("div", {
219
220
  key: 4,
220
221
  ref_key: "modeMenu",
221
- ref: t,
222
+ ref: a,
222
223
  class: "markdown-editor__floating-menu",
223
224
  "data-theme": e.theme,
224
225
  role: "menu",
225
226
  "aria-label": e.translate("mode")
226
227
  }, [
227
- (s(), u(A, null, ne(b, (k) => v("button", {
228
+ (r(), m(F, null, oe(M, (k) => f("button", {
228
229
  key: k,
229
230
  "aria-checked": e.mode === k,
230
231
  role: "menuitemradio",
231
232
  type: "button",
232
- onClick: (J) => d("select-mode", k)
233
+ onClick: (I) => u("select-mode", k)
233
234
  }, [
234
- v("span", null, B(e.translate(k === "wysiwyg" ? "visual" : k)), 1)
235
- ], 8, Yt)), 64))
236
- ], 8, Gt)) : T("", !0)
235
+ f("span", null, H(e.translate(k === "wysiwyg" ? "visual" : k)), 1)
236
+ ], 8, Jt)), 64))
237
+ ], 8, Xt)) : E("", !0)
237
238
  ], 64));
238
239
  }
239
- }), Kt = /* @__PURE__ */ X(Zt, [["__scopeId", "data-v-864eac67"]]), Xt = ["data-theme", "aria-label"], Jt = ["aria-label", "title"], _t = ["value", "aria-label"], ea = /* @__PURE__ */ K({
240
+ }), ea = /* @__PURE__ */ _(_t, [["__scopeId", "data-v-864eac67"]]), ta = ["data-theme", "aria-label"], aa = ["aria-label", "title"], la = ["value", "aria-label"], na = /* @__PURE__ */ J({
240
241
  __name: "MarkdownEditorImageActions",
241
242
  props: {
242
243
  objectFit: {},
@@ -244,34 +245,34 @@ import './index.css';const ft = `<svg xmlns="http://www.w3.org/2000/svg" width="
244
245
  translate: { type: Function }
245
246
  },
246
247
  emits: ["full-width", "object-fit"],
247
- setup(e, { expose: c, emit: M }) {
248
- const d = M, f = y();
249
- return c({ element: f }), (r, h) => (s(), u("div", {
248
+ setup(e, { expose: g, emit: y }) {
249
+ const u = y, b = h();
250
+ return g({ element: b }), (d, s) => (r(), m("div", {
250
251
  ref_key: "element",
251
- ref: f,
252
+ ref: b,
252
253
  class: "markdown-editor__image-actions",
253
254
  "data-theme": e.theme,
254
255
  role: "toolbar",
255
256
  "aria-label": e.translate("image")
256
257
  }, [
257
- v("button", {
258
+ f("button", {
258
259
  type: "button",
259
260
  "aria-label": e.translate("imageWidthFull"),
260
261
  title: e.translate("imageWidthFull"),
261
- onMousedown: h[0] || (h[0] = w(() => {
262
+ onMousedown: s[0] || (s[0] = w(() => {
262
263
  }, ["prevent"])),
263
- onClick: h[1] || (h[1] = (o) => d("full-width"))
264
- }, "↔", 40, Jt),
265
- v("select", {
264
+ onClick: s[1] || (s[1] = (i) => u("full-width"))
265
+ }, "↔", 40, aa),
266
+ f("select", {
266
267
  value: e.objectFit ?? "contain",
267
268
  "aria-label": e.translate("imageFit"),
268
- onChange: h[2] || (h[2] = (o) => d("object-fit", o.target.value))
269
- }, [...h[3] || (h[3] = [
270
- lt('<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)
271
- ])], 40, _t)
272
- ], 8, Xt));
269
+ onChange: s[2] || (s[2] = (i) => u("object-fit", i.target.value))
270
+ }, [...s[3] || (s[3] = [
271
+ 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)
272
+ ])], 40, la)
273
+ ], 8, ta));
273
274
  }
274
- }), ta = /* @__PURE__ */ X(ea, [["__scopeId", "data-v-0158c930"]]), aa = ["aria-label"], la = ["data-toolbar-group"], na = ["disabled", "aria-label", "title", "onClick"], oa = ["disabled", "aria-label", "title", "onClick"], ia = ["aria-expanded", "aria-label", "aria-pressed", "title"], sa = ["disabled", "aria-label", "aria-pressed", "title", "onClick"], ra = ["disabled", "aria-label", "aria-pressed", "title", "onClick"], da = ["disabled", "aria-label", "aria-pressed", "title", "onClick"], ua = ["disabled", "aria-label", "aria-pressed", "title", "onClick"], ma = ["disabled", "aria-label", "aria-pressed", "title", "onClick"], ca = ["aria-expanded", "aria-label", "aria-pressed", "title"], ga = ["aria-expanded", "aria-label", "aria-pressed", "title"], va = ["disabled", "aria-label", "aria-pressed", "title", "onClick"], fa = ["aria-label", "aria-pressed", "title"], ba = ["aria-expanded", "aria-pressed", "aria-label", "title"], ka = ["title"], wa = ["aria-label"], ha = ["aria-expanded", "aria-label", "title"], ya = ["aria-expanded", "aria-label", "aria-pressed", "title"], Ma = ["aria-label", "aria-pressed", "title", "onClick"], Ca = ["aria-label", "title"], pa = ["aria-label", "title"], xa = ["aria-label", "title"], La = ["aria-expanded", "aria-label", "title"], Ta = /* @__PURE__ */ K({
275
+ }), oa = /* @__PURE__ */ _(na, [["__scopeId", "data-v-0158c930"]]), ia = ["aria-label"], sa = ["data-toolbar-group"], ra = ["disabled", "aria-label", "title", "onClick"], da = ["disabled", "aria-label", "title", "onClick"], ua = ["aria-expanded", "aria-label", "aria-pressed", "title"], ma = ["disabled", "aria-label", "aria-pressed", "title", "onClick"], 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 = ["aria-expanded", "aria-label", "aria-pressed", "title"], ka = ["aria-expanded", "aria-label", "aria-pressed", "title"], wa = ["disabled", "aria-label", "aria-pressed", "title", "onClick"], ha = ["aria-label", "aria-pressed", "title"], ya = ["aria-expanded", "aria-pressed", "aria-label", "title"], Ma = ["title"], Ca = ["aria-label"], pa = ["aria-expanded", "aria-label", "title"], xa = ["aria-expanded", "aria-label", "aria-pressed", "title"], La = ["aria-label", "aria-pressed", "title", "onClick"], Ba = ["aria-label", "title"], Ta = ["aria-label", "title"], Ea = ["aria-label", "title"], Ha = ["aria-expanded", "aria-label", "title"], $a = /* @__PURE__ */ J({
275
276
  __name: "MarkdownEditorToolbar",
276
277
  props: {
277
278
  commands: {},
@@ -290,58 +291,62 @@ import './index.css';const ft = `<svg xmlns="http://www.w3.org/2000/svg" width="
290
291
  translate: { type: Function }
291
292
  },
292
293
  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"],
293
- setup(e, { emit: c }) {
294
- const M = e;
295
- function d(o) {
296
- return o.map(gt).filter((t) => vt(t, M.state));
294
+ setup(e, { emit: g }) {
295
+ const y = e;
296
+ function u(i) {
297
+ return i.map(ft).filter((a) => bt(a, y.state));
297
298
  }
298
- function f(o, t) {
299
- V(o, M.state) && (o.action ? o.action.run({ commands: M.commands, execute: (b) => r("execute", b), state: M.state }) : r("execute", t));
299
+ function b(i, a) {
300
+ S(i, y.state) && (i.action ? i.action.run({
301
+ commands: y.commands,
302
+ execute: (M) => d("execute", i.id, M),
303
+ state: y.state
304
+ }) : d("execute", i.id, a));
300
305
  }
301
- const r = c;
302
- function h(o) {
303
- return o.currentTarget;
306
+ const d = g;
307
+ function s(i) {
308
+ return i.currentTarget;
304
309
  }
305
- return (o, t) => (s(), u("div", {
310
+ return (i, a) => (r(), m("div", {
306
311
  class: "markdown-editor__toolbar",
307
312
  "data-markdown-editor-toolbar": "",
308
313
  role: "toolbar",
309
314
  "aria-label": e.translate("toolbar")
310
315
  }, [
311
- (s(!0), u(A, null, ne((e.toolbarConfig ?? m(ct)(e.toolbarPreset)).groups, (b) => (s(), u("div", {
312
- key: b.id,
316
+ (r(!0), m(F, null, oe((e.toolbarConfig ?? c(gt)(e.toolbarPreset)).groups, (M) => (r(), m("div", {
317
+ key: M.id,
313
318
  class: "markdown-editor__toolbar-group",
314
319
  role: "group",
315
- "data-toolbar-group": b.id
320
+ "data-toolbar-group": M.id
316
321
  }, [
317
- (s(!0), u(A, null, ne(d(b.items), (n) => (s(), u(A, {
322
+ (r(!0), m(F, null, oe(u(M.items), (n) => (r(), m(F, {
318
323
  key: n.id
319
324
  }, [
320
- n.id === "undo" ? (s(), u("button", {
325
+ n.id === "undo" ? (r(), m("button", {
321
326
  key: 0,
322
327
  "data-toolbar-item": "undo",
323
328
  type: "button",
324
- disabled: !m(V)(n, e.state),
329
+ disabled: !c(S)(n, e.state),
325
330
  "aria-label": e.translate("undo"),
326
331
  title: e.translate("undo"),
327
- onMousedown: t[0] || (t[0] = w(() => {
332
+ onMousedown: a[0] || (a[0] = w(() => {
328
333
  }, ["prevent"])),
329
- onClick: (l) => f(n, e.commands.undo)
334
+ onClick: (l) => b(n, e.commands.undo)
330
335
  }, [
331
336
  C(p, { name: "arrowLeft" })
332
- ], 40, na)) : n.id === "redo" ? (s(), u("button", {
337
+ ], 40, ra)) : n.id === "redo" ? (r(), m("button", {
333
338
  key: 1,
334
339
  "data-toolbar-item": "redo",
335
340
  type: "button",
336
- disabled: !m(V)(n, e.state),
341
+ disabled: !c(S)(n, e.state),
337
342
  "aria-label": e.translate("redo"),
338
343
  title: e.translate("redo"),
339
- onMousedown: t[1] || (t[1] = w(() => {
344
+ onMousedown: a[1] || (a[1] = w(() => {
340
345
  }, ["prevent"])),
341
- onClick: (l) => f(n, e.commands.redo)
346
+ onClick: (l) => b(n, e.commands.redo)
342
347
  }, [
343
348
  C(p, { name: "arrowRight" })
344
- ], 40, oa)) : n.id === "heading" ? (s(), u("button", {
349
+ ], 40, da)) : n.id === "heading" ? (r(), m("button", {
345
350
  key: 2,
346
351
  class: "markdown-editor__toolbar-heading",
347
352
  "data-toolbar-item": "heading",
@@ -350,76 +355,76 @@ import './index.css';const ft = `<svg xmlns="http://www.w3.org/2000/svg" width="
350
355
  "aria-pressed": e.state.headingLevel !== void 0,
351
356
  title: e.translate("heading"),
352
357
  type: "button",
353
- onMousedown: t[2] || (t[2] = w(() => {
358
+ onMousedown: a[2] || (a[2] = w(() => {
354
359
  }, ["prevent"])),
355
- onClick: t[3] || (t[3] = (l) => r("toggle-heading-menu", h(l)))
360
+ onClick: a[3] || (a[3] = (l) => d("toggle-heading-menu", s(l)))
356
361
  }, [
357
- v("span", null, B(e.textStyleLabel), 1),
362
+ f("span", null, H(e.textStyleLabel), 1),
358
363
  C(p, { name: "chevronDown" })
359
- ], 40, ia)) : n.id === "bold" ? (s(), u("button", {
364
+ ], 40, ua)) : n.id === "bold" ? (r(), m("button", {
360
365
  key: 3,
361
366
  "data-toolbar-item": "bold",
362
- disabled: !m(V)(n, e.state),
367
+ disabled: !c(S)(n, e.state),
363
368
  "aria-label": e.translate("bold"),
364
- "aria-pressed": m(j)(n, e.state, e.state.bold),
369
+ "aria-pressed": c(G)(n, e.state, e.state.bold),
365
370
  type: "button",
366
371
  title: e.translate("bold"),
367
- onMousedown: t[4] || (t[4] = w(() => {
372
+ onMousedown: a[4] || (a[4] = w(() => {
368
373
  }, ["prevent"])),
369
- onClick: (l) => f(n, e.commands.bold)
374
+ onClick: (l) => b(n, e.commands.bold)
370
375
  }, [
371
376
  C(p, { name: "bold" })
372
- ], 40, sa)) : n.id === "italic" ? (s(), u("button", {
377
+ ], 40, ma)) : n.id === "italic" ? (r(), m("button", {
373
378
  key: 4,
374
379
  "data-toolbar-item": "italic",
375
- disabled: !m(V)(n, e.state),
380
+ disabled: !c(S)(n, e.state),
376
381
  "aria-label": e.translate("italic"),
377
- "aria-pressed": m(j)(n, e.state, e.state.italic),
382
+ "aria-pressed": c(G)(n, e.state, e.state.italic),
378
383
  type: "button",
379
384
  title: e.translate("italic"),
380
- onMousedown: t[5] || (t[5] = w(() => {
385
+ onMousedown: a[5] || (a[5] = w(() => {
381
386
  }, ["prevent"])),
382
- onClick: (l) => f(n, e.commands.italic)
387
+ onClick: (l) => b(n, e.commands.italic)
383
388
  }, [
384
389
  C(p, { name: "italic" })
385
- ], 40, ra)) : n.id === "underline" ? (s(), u("button", {
390
+ ], 40, ca)) : n.id === "underline" ? (r(), m("button", {
386
391
  key: 5,
387
392
  "data-toolbar-item": "underline",
388
- disabled: !m(V)(n, e.state),
393
+ disabled: !c(S)(n, e.state),
389
394
  "aria-label": e.translate("underline"),
390
- "aria-pressed": m(j)(n, e.state, e.state.underline),
395
+ "aria-pressed": c(G)(n, e.state, e.state.underline),
391
396
  type: "button",
392
397
  title: e.translate("underline"),
393
- onMousedown: t[6] || (t[6] = w(() => {
398
+ onMousedown: a[6] || (a[6] = w(() => {
394
399
  }, ["prevent"])),
395
- onClick: (l) => f(n, e.commands.underline)
400
+ onClick: (l) => b(n, e.commands.underline)
396
401
  }, [
397
402
  C(p, { name: "underline" })
398
- ], 40, da)) : n.id === "strike" ? (s(), u("button", {
403
+ ], 40, va)) : n.id === "strike" ? (r(), m("button", {
399
404
  key: 6,
400
405
  "data-toolbar-item": "strike",
401
- disabled: !m(V)(n, e.state),
406
+ disabled: !c(S)(n, e.state),
402
407
  "aria-label": e.translate("strike"),
403
- "aria-pressed": m(j)(n, e.state, e.state.strikethrough),
408
+ "aria-pressed": c(G)(n, e.state, e.state.strikethrough),
404
409
  type: "button",
405
410
  title: e.translate("strike"),
406
- onMousedown: t[7] || (t[7] = w(() => {
411
+ onMousedown: a[7] || (a[7] = w(() => {
407
412
  }, ["prevent"])),
408
- onClick: (l) => f(n, e.commands.strikethrough)
413
+ onClick: (l) => b(n, e.commands.strikethrough)
409
414
  }, [
410
415
  C(p, { name: "strike" })
411
- ], 40, ua)) : n.id === "mark" ? (s(), u("button", {
416
+ ], 40, ga)) : n.id === "mark" ? (r(), m("button", {
412
417
  key: 7,
413
418
  "data-toolbar-item": "mark",
414
- disabled: !m(V)(n, e.state),
419
+ disabled: !c(S)(n, e.state),
415
420
  "aria-label": e.translate("mark"),
416
- "aria-pressed": m(j)(n, e.state, e.state.mark),
421
+ "aria-pressed": c(G)(n, e.state, e.state.mark),
417
422
  type: "button",
418
423
  title: e.translate("mark"),
419
- onMousedown: t[8] || (t[8] = w(() => {
424
+ onMousedown: a[8] || (a[8] = w(() => {
420
425
  }, ["prevent"])),
421
- onClick: (l) => f(n, e.commands.mark)
422
- }, "M", 40, ma)) : n.id === "code" ? (s(), u("button", {
426
+ onClick: (l) => b(n, e.commands.mark)
427
+ }, " M ", 40, fa)) : n.id === "code" ? (r(), m("button", {
423
428
  key: 8,
424
429
  class: "markdown-editor__toolbar-code",
425
430
  "data-toolbar-item": "code",
@@ -428,13 +433,13 @@ import './index.css';const ft = `<svg xmlns="http://www.w3.org/2000/svg" width="
428
433
  "aria-pressed": e.state.code || e.state.codeBlock,
429
434
  title: e.translate(e.state.codeBlock ? "codeBlock" : "code"),
430
435
  type: "button",
431
- onMousedown: t[9] || (t[9] = w(() => {
436
+ onMousedown: a[9] || (a[9] = w(() => {
432
437
  }, ["prevent"])),
433
- onClick: t[10] || (t[10] = (l) => r("toggle-code-menu", h(l)))
438
+ onClick: a[10] || (a[10] = (l) => d("toggle-code-menu", s(l)))
434
439
  }, [
435
440
  C(p, { name: "code" }),
436
441
  C(p, { name: "chevronDown" })
437
- ], 40, ca)) : n.id === "bullet-list" ? (s(), u("button", {
442
+ ], 40, ba)) : n.id === "bullet-list" ? (r(), m("button", {
438
443
  key: 9,
439
444
  class: "markdown-editor__toolbar-list",
440
445
  "data-toolbar-item": "list",
@@ -443,38 +448,38 @@ import './index.css';const ft = `<svg xmlns="http://www.w3.org/2000/svg" width="
443
448
  "aria-pressed": e.state.bulletList || e.state.orderedList,
444
449
  title: e.translate(e.state.orderedList ? "orderedList" : "bulletList"),
445
450
  type: "button",
446
- onMousedown: t[11] || (t[11] = w(() => {
451
+ onMousedown: a[11] || (a[11] = w(() => {
447
452
  }, ["prevent"])),
448
- onClick: t[12] || (t[12] = (l) => r("toggle-list-menu", h(l)))
453
+ onClick: a[12] || (a[12] = (l) => d("toggle-list-menu", s(l)))
449
454
  }, [
450
455
  C(p, {
451
456
  name: e.state.orderedList ? "orderedList" : "bulletList"
452
457
  }, null, 8, ["name"]),
453
458
  C(p, { name: "chevronDown" })
454
- ], 40, ga)) : n.id === "ordered-list" ? (s(), u(A, { key: 10 }, [], 64)) : n.id === "quote" ? (s(), u("button", {
459
+ ], 40, ka)) : n.id === "ordered-list" ? (r(), m(F, { key: 10 }, [], 64)) : n.id === "quote" ? (r(), m("button", {
455
460
  key: 11,
456
461
  "data-toolbar-item": "quote",
457
- disabled: !m(V)(n, e.state),
462
+ disabled: !c(S)(n, e.state),
458
463
  "aria-label": e.translate("quote"),
459
- "aria-pressed": m(j)(n, e.state, e.state.quote),
464
+ "aria-pressed": c(G)(n, e.state, e.state.quote),
460
465
  type: "button",
461
466
  title: e.translate("quote"),
462
- onMousedown: t[13] || (t[13] = w(() => {
467
+ onMousedown: a[13] || (a[13] = w(() => {
463
468
  }, ["prevent"])),
464
- onClick: (l) => f(n, e.commands.quote)
469
+ onClick: (l) => b(n, e.commands.quote)
465
470
  }, [
466
471
  C(p, { name: "quote" })
467
- ], 40, va)) : n.id === "fold-heading" ? (s(), u("button", {
472
+ ], 40, wa)) : n.id === "fold-heading" ? (r(), m("button", {
468
473
  key: 12,
469
474
  "data-toolbar-item": "fold-heading",
470
475
  "aria-label": e.translate("foldHeading"),
471
476
  "aria-pressed": e.state.headingFolded,
472
477
  type: "button",
473
478
  title: e.translate("foldHeading"),
474
- onMousedown: t[14] || (t[14] = w(() => {
479
+ onMousedown: a[14] || (a[14] = w(() => {
475
480
  }, ["prevent"])),
476
- onClick: t[15] || (t[15] = (l) => r("execute", e.commands.toggleHeadingFolding))
477
- }, "▸", 40, fa)) : n.id === "code-block" ? (s(), u(A, { key: 13 }, [], 64)) : n.id === "link" ? (s(), u("button", {
481
+ onClick: a[15] || (a[15] = (l) => d("execute", "fold-heading", e.commands.toggleHeadingFolding))
482
+ }, " ▸ ", 40, ha)) : n.id === "code-block" ? (r(), m(F, { key: 13 }, [], 64)) : n.id === "link" ? (r(), m("button", {
478
483
  key: 14,
479
484
  "data-toolbar-item": "link",
480
485
  "aria-expanded": e.linkEditorVisible,
@@ -482,36 +487,36 @@ import './index.css';const ft = `<svg xmlns="http://www.w3.org/2000/svg" width="
482
487
  type: "button",
483
488
  "aria-label": e.translate("link"),
484
489
  title: e.translate("link"),
485
- onMousedown: t[16] || (t[16] = w(() => {
490
+ onMousedown: a[16] || (a[16] = w(() => {
486
491
  }, ["prevent"])),
487
- onClick: t[17] || (t[17] = (l) => r("toggle-link-editor", h(l)))
492
+ onClick: a[17] || (a[17] = (l) => d("toggle-link-editor", s(l)))
488
493
  }, [
489
494
  C(p, { name: "link" })
490
- ], 40, ba)) : n.id === "color" ? (s(), u("label", {
495
+ ], 40, ya)) : n.id === "color" ? (r(), m("label", {
491
496
  key: 15,
492
497
  "data-toolbar-item": "color",
493
498
  class: "markdown-editor__color",
494
499
  title: e.translate("color")
495
500
  }, [
496
- v("input", {
501
+ f("input", {
497
502
  "aria-label": e.translate("color"),
498
503
  type: "color",
499
504
  value: "#202125",
500
- onInput: t[18] || (t[18] = (l) => r("execute", e.commands.setColor(l.target.value)))
501
- }, null, 40, wa)
502
- ], 8, ka)) : n.id === "image" ? (s(), u("button", {
505
+ onInput: a[18] || (a[18] = (l) => d("execute", "color", e.commands.setColor(l.target.value)))
506
+ }, null, 40, Ca)
507
+ ], 8, Ma)) : n.id === "image" ? (r(), m("button", {
503
508
  key: 16,
504
509
  "data-toolbar-item": "image",
505
510
  "aria-expanded": e.imageEditorVisible,
506
511
  "aria-label": e.translate("image"),
507
512
  type: "button",
508
513
  title: e.translate("image"),
509
- onMousedown: t[19] || (t[19] = w(() => {
514
+ onMousedown: a[19] || (a[19] = w(() => {
510
515
  }, ["prevent"])),
511
- onClick: t[20] || (t[20] = (l) => r("toggle-image-editor", h(l)))
516
+ onClick: a[20] || (a[20] = (l) => d("toggle-image-editor", s(l)))
512
517
  }, [
513
518
  C(p, { name: "image" })
514
- ], 40, ha)) : n.id === "formula" ? (s(), u("button", {
519
+ ], 40, pa)) : n.id === "formula" ? (r(), m("button", {
515
520
  key: 17,
516
521
  "data-toolbar-item": "formula",
517
522
  "aria-expanded": e.formulaMenuVisible,
@@ -519,146 +524,146 @@ import './index.css';const ft = `<svg xmlns="http://www.w3.org/2000/svg" width="
519
524
  "aria-pressed": e.state.formula,
520
525
  title: e.translate("formula"),
521
526
  type: "button",
522
- onMousedown: t[21] || (t[21] = w(() => {
527
+ onMousedown: a[21] || (a[21] = w(() => {
523
528
  }, ["prevent"])),
524
- onClick: t[22] || (t[22] = (l) => r("toggle-formula-menu", h(l)))
529
+ onClick: a[22] || (a[22] = (l) => d("toggle-formula-menu", s(l)))
525
530
  }, [
526
531
  C(p, { name: "function" })
527
- ], 40, ya)) : n.id === "mermaid" ? (s(), u("button", {
532
+ ], 40, xa)) : n.id === "mermaid" ? (r(), m("button", {
528
533
  key: 18,
529
534
  "data-toolbar-item": "mermaid",
530
535
  type: "button",
531
536
  "aria-label": e.translate("mermaid"),
532
537
  "aria-pressed": e.state.mermaid,
533
538
  title: e.translate("mermaid"),
534
- onMousedown: t[23] || (t[23] = w(() => {
539
+ onMousedown: a[23] || (a[23] = w(() => {
535
540
  }, ["prevent"])),
536
- onClick: (l) => f(n, e.commands.insertMermaid)
541
+ onClick: (l) => b(n, e.commands.insertMermaid)
537
542
  }, [
538
543
  C(p, { name: "mermaid" })
539
- ], 40, Ma)) : n.id === "html" ? (s(), u("button", {
544
+ ], 40, La)) : n.id === "html" ? (r(), m("button", {
540
545
  key: 19,
541
546
  "data-toolbar-item": "html",
542
547
  type: "button",
543
548
  "aria-label": e.translate("html"),
544
549
  title: e.translate("html"),
545
- onMousedown: t[24] || (t[24] = w(() => {
550
+ onMousedown: a[24] || (a[24] = w(() => {
546
551
  }, ["prevent"])),
547
- onClick: t[25] || (t[25] = (l) => r("insert-html"))
548
- }, "</>", 40, Ca)) : n.id === "horizontal-rule" ? (s(), u("button", {
552
+ onClick: a[25] || (a[25] = (l) => d("insert-html"))
553
+ }, " </> ", 40, Ba)) : n.id === "horizontal-rule" ? (r(), m("button", {
549
554
  key: 20,
550
555
  "data-toolbar-item": "horizontal-rule",
551
556
  "aria-label": e.translate("horizontalRule"),
552
557
  type: "button",
553
558
  title: e.translate("horizontalRule"),
554
- onMousedown: t[26] || (t[26] = w(() => {
559
+ onMousedown: a[26] || (a[26] = w(() => {
555
560
  }, ["prevent"])),
556
- onClick: t[27] || (t[27] = (l) => r("execute", e.commands.horizontalRule))
561
+ onClick: a[27] || (a[27] = (l) => d("execute", "horizontal-rule", e.commands.horizontalRule))
557
562
  }, [
558
563
  C(p, { name: "horizontalRule" })
559
- ], 40, pa)) : n.id === "table" ? (s(), u("button", {
564
+ ], 40, Ta)) : n.id === "table" ? (r(), m("button", {
560
565
  key: 21,
561
566
  "data-toolbar-item": "table",
562
567
  "aria-label": e.translate("table"),
563
568
  type: "button",
564
569
  title: e.translate("table"),
565
- onMousedown: t[28] || (t[28] = w(() => {
570
+ onMousedown: a[28] || (a[28] = w(() => {
566
571
  }, ["prevent"])),
567
- onClick: t[29] || (t[29] = (l) => r("execute", e.commands.insertTable()))
572
+ onClick: a[29] || (a[29] = (l) => d("execute", "table", e.commands.insertTable()))
568
573
  }, [
569
574
  C(p, { name: "table" })
570
- ], 40, xa)) : T("", !0)
575
+ ], 40, Ea)) : E("", !0)
571
576
  ], 64))), 128))
572
- ], 8, la))), 128)),
573
- v("button", {
577
+ ], 8, sa))), 128)),
578
+ f("button", {
574
579
  class: "markdown-editor__toolbar-mode",
575
580
  "data-toolbar-item": "mode",
576
581
  type: "button",
577
582
  "aria-expanded": e.modeMenuVisible,
578
583
  "aria-label": e.translate("mode"),
579
584
  title: e.translate("mode"),
580
- onMousedown: t[30] || (t[30] = w(() => {
585
+ onMousedown: a[30] || (a[30] = w(() => {
581
586
  }, ["prevent"])),
582
- onClick: t[31] || (t[31] = (b) => r("toggle-mode-menu", h(b)))
587
+ onClick: a[31] || (a[31] = (M) => d("toggle-mode-menu", s(M)))
583
588
  }, [
584
589
  C(p, { name: "gear" }),
585
590
  C(p, { name: "chevronDown" })
586
- ], 40, La),
587
- ge(o.$slots, "default", {
591
+ ], 40, Ha),
592
+ fe(i.$slots, "default", {
588
593
  commands: e.commands,
589
- execute: (b) => r("execute", b)
594
+ execute: (M) => d("execute", void 0, M)
590
595
  }, void 0, !0)
591
- ], 8, aa));
596
+ ], 8, ia));
592
597
  }
593
- }), Ba = /* @__PURE__ */ X(Ta, [["__scopeId", "data-v-d653c970"]]), Ea = [
598
+ }), Va = /* @__PURE__ */ _($a, [["__scopeId", "data-v-322b6a9c"]]), Sa = [
594
599
  "--markdown-background",
595
600
  "--markdown-border",
596
601
  "--markdown-focus-background",
597
602
  "--markdown-focus-text",
598
603
  "--markdown-text"
599
604
  ];
600
- function S(e, c = {}) {
601
- const M = y(!1);
602
- let d;
603
- function f() {
604
- M.value = !1, d?.(), d = void 0;
605
+ function z(e, g = {}) {
606
+ const y = h(!1);
607
+ let u;
608
+ function b() {
609
+ y.value = !1, u?.(), u = void 0;
605
610
  }
606
- async function r(o) {
607
- f(), M.value = !0, await le();
608
- const t = e();
609
- if (t === void 0) return;
610
- const b = o.closest(".markdown-editor");
611
- if (b !== null) {
612
- const l = getComputedStyle(b);
613
- for (const k of Ea)
614
- t.style.setProperty(k, l.getPropertyValue(k));
611
+ async function d(i) {
612
+ b(), y.value = !0, await ne();
613
+ const a = e();
614
+ if (a === void 0) return;
615
+ const M = i.closest(".markdown-editor");
616
+ if (M !== null) {
617
+ const l = getComputedStyle(M);
618
+ for (const k of Sa)
619
+ a.style.setProperty(k, l.getPropertyValue(k));
615
620
  }
616
- d = Je(o, t, async () => {
617
- const { x: l, y: k } = await _e(o, t, {
618
- middleware: [et(6), tt({ padding: 8 }), at({ padding: 8 })],
619
- placement: c.placement ?? "bottom-start",
621
+ u = at(i, a, async () => {
622
+ const { x: l, y: k } = await lt(i, a, {
623
+ middleware: [nt(6), ot({ padding: 8 }), it({ padding: 8 })],
624
+ placement: g.placement ?? "bottom-start",
620
625
  strategy: "fixed"
621
626
  });
622
- Object.assign(t.style, { left: `${l}px`, position: "fixed", top: `${k}px` });
627
+ Object.assign(a.style, { left: `${l}px`, position: "fixed", top: `${k}px` });
623
628
  });
624
629
  }
625
- async function h(o) {
626
- M.value ? f() : await r(o);
630
+ async function s(i) {
631
+ y.value ? b() : await d(i);
627
632
  }
628
- return ve(f), {
629
- close: f,
630
- contains: (o) => e()?.contains(o) ?? !1,
631
- open: r,
632
- toggle: h,
633
- visible: M
633
+ return be(b), {
634
+ close: b,
635
+ contains: (i) => e()?.contains(i) ?? !1,
636
+ open: d,
637
+ toggle: s,
638
+ visible: y
634
639
  };
635
640
  }
636
- function Le(e, c) {
637
- return e.length === 0 ? c : c.length === 0 ? e : `${e}
641
+ function Ee(e, g) {
642
+ return e.length === 0 ? g : g.length === 0 ? e : `${e}
638
643
 
639
- ${c}`;
644
+ ${g}`;
640
645
  }
641
- function Ha(e) {
642
- const c = y(e.initialValue);
643
- let M = !1;
644
- function d(o, t) {
645
- M = !0, t !== "markup" && e.getMarkupHost()?.setValue(o), t !== "visual" && e.getVisualHost()?.setValue(o), M = !1;
646
+ function Aa(e) {
647
+ const g = h(e.initialValue);
648
+ let y = !1;
649
+ function u(i, a) {
650
+ y = !0, a !== "markup" && e.getMarkupHost()?.setValue(i), a !== "visual" && e.getVisualHost()?.setValue(i), y = !1;
646
651
  }
647
- function f(o) {
648
- o !== c.value && (c.value = o, d(o));
652
+ function b(i) {
653
+ i !== g.value && (g.value = i, u(i));
649
654
  }
650
- function r(o) {
651
- o !== c.value && (c.value = o, e.onChange(o), d(o));
655
+ function d(i) {
656
+ i !== g.value && (g.value = i, e.onChange(i), u(i));
652
657
  }
653
- function h(o, t) {
654
- o === c.value || M || (c.value = o, e.onChange(o), d(o, t));
658
+ function s(i, a) {
659
+ i === g.value || y || (g.value = i, e.onChange(i), u(i, a));
655
660
  }
656
- return { setExternalValue: f, setValue: r, updateFromHost: h, value: c };
661
+ return { setExternalValue: b, setValue: d, updateFromHost: s, value: g };
657
662
  }
658
- const $a = ["data-locale", "data-mode", "data-theme"], Va = {
663
+ const Pa = ["data-locale", "data-mode", "data-theme"], za = {
659
664
  key: 0,
660
665
  class: "markdown-editor__header"
661
- }, Sa = /* @__PURE__ */ K({
666
+ }, Fa = /* @__PURE__ */ J({
662
667
  name: "MarkdownEditor",
663
668
  __name: "MarkdownEditor",
664
669
  props: {
@@ -674,8 +679,8 @@ const $a = ["data-locale", "data-mode", "data-theme"], Va = {
674
679
  theme: { default: "auto" }
675
680
  },
676
681
  emits: ["cancel", "change", "mode-change", "update:modelValue", "update:mode", "submit"],
677
- setup(e, { expose: c, emit: M }) {
678
- const d = e, f = M, r = Ye(), h = Te()?.appContext, o = y(), t = y(), b = y(d.mode), n = y("https://"), l = y(""), k = y(""), J = y(), P = y(""), U = y(""), W = y(!1), x = y({
682
+ setup(e, { expose: g, emit: y }) {
683
+ const u = e, b = y, d = Xe(), s = et(), i = He()?.appContext, a = h(), M = h(), n = h(u.mode), l = h("https://"), k = h(""), I = h(""), ke = h(), A = h(""), Y = h(""), q = h(!1), L = h({
679
684
  bold: !1,
680
685
  bulletList: !1,
681
686
  code: !1,
@@ -698,21 +703,21 @@ const $a = ["data-locale", "data-mode", "data-theme"], Va = {
698
703
  quote: !1,
699
704
  strikethrough: !1,
700
705
  underline: !1
701
- }), oe = xe(() => x.value.headingLevel?.toString() ?? "paragraph"), Be = xe(() => oe.value === "paragraph" ? "H" : `H${oe.value}`), fe = y(), R = y(), be = y(), D = S(() => R.value?.getElement("code")), z = S(() => R.value?.getElement("formula")), I = S(() => R.value?.getElement("heading")), F = S(() => J.value?.element), Q = S(() => be.value?.element, { placement: "top" }), E = S(() => fe.value?.element), O = S(() => R.value?.getElement("list")), q = S(() => R.value?.getElement("mode"));
702
- let H, _ = 0, ie = !1, L;
703
- const { setExternalValue: Ee, setValue: G, updateFromHost: ke, value: N } = Ha({
704
- getMarkupHost: () => H,
705
- getVisualHost: () => L,
706
- initialValue: d.modelValue,
707
- onChange: (a) => {
708
- f("update:modelValue", a), f("change", a);
706
+ }), ie = Te(() => L.value.headingLevel?.toString() ?? "paragraph"), $e = Te(() => ie.value === "paragraph" ? "H" : `H${ie.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, se = "visual", ee = 0, re = !1, B;
708
+ const { setExternalValue: Ve, setValue: K, updateFromHost: ye, value: D } = Aa({
709
+ getMarkupHost: () => x,
710
+ getVisualHost: () => B,
711
+ initialValue: u.modelValue,
712
+ onChange: (t) => {
713
+ b("update:modelValue", t), b("change", t);
709
714
  }
710
715
  });
711
- function se(a) {
712
- return Ge(d.locale)[a];
716
+ function de(t) {
717
+ return Ke(u.locale)[t];
713
718
  }
714
- function re() {
715
- H?.destroy(), L?.destroy(), H = void 0, L = void 0, x.value = {
719
+ function ue() {
720
+ x?.destroy(), B?.destroy(), x = void 0, B = void 0, L.value = {
716
721
  bold: !1,
717
722
  bulletList: !1,
718
723
  code: !1,
@@ -737,557 +742,581 @@ const $a = ["data-locale", "data-mode", "data-theme"], Va = {
737
742
  underline: !1
738
743
  };
739
744
  }
740
- function He(a) {
741
- b.value === "markup" || b.value === "split" && typeof a == "object" ? H?.moveCursor(a) : L?.moveCursor(typeof a == "object" ? "start" : a);
745
+ function Se(t) {
746
+ n.value === "markup" || n.value === "split" && typeof t == "object" ? x?.moveCursor(t) : B?.moveCursor(typeof t == "object" ? "start" : t);
742
747
  }
743
- function $e(a) {
744
- b.value === "markup" || b.value === "split" && H?.hasFocus() ? H?.insert(a) : L?.insert(a);
748
+ function Ae(t) {
749
+ n.value === "markup" || n.value === "split" && x?.hasFocus() ? x?.insert(t) : B?.insert(t);
745
750
  }
746
- function Ve() {
747
- if (P.value.trim().length === 0)
751
+ function Pe() {
752
+ if (A.value.trim().length === 0)
748
753
  return;
749
- ie = !0;
750
- const a = U.value.trim() || P.value.trim();
751
- $(r.setLink(P.value.trim(), a, a, W.value)), E.close();
754
+ re = !0;
755
+ const t = Y.value.trim() || A.value.trim();
756
+ T() ? x?.run(s.setLink(A.value.trim(), void 0, t, q.value)) : V(void 0, d.setLink(A.value.trim(), t, t, q.value)), $.close();
752
757
  }
753
- function we() {
754
- E.close();
758
+ function Me() {
759
+ $.close();
755
760
  }
756
- function Se() {
757
- const a = n.value.trim();
758
- a.length !== 0 && ($(r.insertImage(a, l.value.trim() || "Image", k.value.trim() || void 0)), F.close());
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)) : V(void 0, d.insertImage(t, k.value.trim() || "Image", I.value.trim() || void 0)), R.close());
759
764
  }
760
- function Ae() {
761
- F.close();
765
+ function Fe() {
766
+ R.close();
762
767
  }
763
- function Pe(a) {
764
- $(a === "paragraph" ? r.paragraph : r.heading(Number(a))), I.close();
768
+ function Ne(t) {
769
+ T() ? x?.run(t === "paragraph" ? s.paragraph : s.heading(Number(t))) : t === "paragraph" ? V(void 0, d.paragraph) : V(void 0, d.heading(Number(t))), U.close();
765
770
  }
766
- async function ze(a) {
767
- await I.toggle(a);
771
+ async function Re(t) {
772
+ T(), await U.toggle(t);
768
773
  }
769
- async function Fe(a) {
770
- await D.toggle(a);
774
+ async function De(t) {
775
+ T(), await j.toggle(t);
771
776
  }
772
- function he(a) {
773
- $(a), D.close();
777
+ function Ce(t, o) {
778
+ T() ? x?.run(s[o]) : V(void 0, t), j.close();
774
779
  }
775
- async function Ne(a) {
776
- if (E.visible.value) {
777
- E.close();
780
+ async function Ie(t) {
781
+ if (T(), $.visible.value) {
782
+ $.close();
778
783
  return;
779
784
  }
780
- P.value = x.value.linkHref ?? "", U.value = x.value.linkText ?? window.getSelection()?.toString().trim() ?? "", W.value = x.value.linkOpenInNewWindow, await E.open(a);
785
+ A.value = L.value.linkHref ?? "", Y.value = L.value.linkText ?? window.getSelection()?.toString().trim() ?? "", q.value = L.value.linkOpenInNewWindow, await $.open(t);
781
786
  }
782
- async function ye(a) {
783
- const i = x.value.linkHref;
784
- if (i === void 0 && a === void 0) {
785
- we();
787
+ async function pe(t) {
788
+ const o = L.value.linkHref;
789
+ if (o === void 0 && t === void 0) {
790
+ Me();
786
791
  return;
787
792
  }
788
- P.value = a?.getAttribute("href") ?? i ?? "", U.value = a?.textContent ?? x.value.linkText ?? "", W.value = a?.getAttribute("target") === "_blank" || x.value.linkOpenInNewWindow;
789
- const g = window.getSelection()?.anchorNode, Y = g instanceof Element ? g : g?.parentElement, me = a ?? Y?.closest("a");
790
- me != null && await E.open(me);
793
+ A.value = t?.getAttribute("href") ?? o ?? "", Y.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);
791
796
  }
792
- function Re(a) {
793
- const i = a.target;
794
- if (!(i instanceof Element)) return;
795
- const g = i.closest(".ProseMirror img");
796
- if (g !== null) {
797
- a.preventDefault(), L?.selectElement(g), Q.open(g);
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);
798
803
  return;
799
804
  }
800
- const Y = i.closest(".ProseMirror a");
801
- Y !== null && (a.preventDefault(), L?.selectElement(Y), ye(Y));
805
+ const P = o.closest(".ProseMirror a");
806
+ P !== null && (t.preventDefault(), B?.selectElement(P), pe(P));
802
807
  }
803
- async function De(a) {
804
- await O.toggle(a);
808
+ async function Oe(t) {
809
+ T(), await W.toggle(t);
805
810
  }
806
- function ee(a) {
807
- $(a), O.close();
811
+ function te(t, o) {
812
+ T() ? x?.run(s[o]) : V(void 0, t), W.close();
808
813
  }
809
- async function Ie(a) {
810
- await F.toggle(a);
814
+ async function je(t) {
815
+ T(), await R.toggle(t);
811
816
  }
812
- async function Me(a) {
813
- $(a), await le();
814
- const i = t.value?.querySelector(".ProseMirror img.ProseMirror-selectednode");
815
- i != null && await Q.open(i);
817
+ async function xe(t) {
818
+ V(void 0, t), await ne();
819
+ const o = M.value?.querySelector(".ProseMirror img.ProseMirror-selectednode");
820
+ o != null && await Z.open(o);
816
821
  }
817
- async function Oe(a) {
818
- await q.toggle(a);
822
+ async function Ue(t) {
823
+ await Q.toggle(t);
819
824
  }
820
- async function qe(a) {
821
- q.close(), await ue(a);
825
+ async function We(t) {
826
+ Q.close(), await ce(t);
822
827
  }
823
- function je() {
824
- L?.run(r.insertHtml);
828
+ function Qe() {
829
+ T() ? x?.run(s.insertHtml) : B?.run(d.insertHtml);
825
830
  }
826
- async function Ue() {
827
- z.close(), !x.value.formula && L?.run(r.insertMathBlock);
831
+ async function Ge() {
832
+ N.close(), !L.value.formula && (T() ? x?.run(s.insertMathBlock) : B?.run(d.insertMathBlock));
828
833
  }
829
- function We() {
830
- z.close(), L?.run(r.insertInlineMath);
834
+ function Ye() {
835
+ N.close(), T() ? x?.run(s.insertInlineMath) : B?.run(d.insertInlineMath);
831
836
  }
832
- async function Qe(a) {
833
- x.value.formula || await z.toggle(a);
837
+ async function Ze(t) {
838
+ T(), L.value.formula || await N.toggle(t);
834
839
  }
835
- function Ce(a) {
836
- const i = a.target;
837
- if (i instanceof Node)
838
- for (const g of [I, D, z, E, O, F, Q, q])
839
- g.contains(i) || g.close();
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();
840
845
  }
841
- function pe(a) {
842
- if (a.key === "Escape")
843
- for (const i of [I, D, z, E, O, F, Q, q]) i.close();
846
+ function Be(t) {
847
+ if (t.key === "Escape")
848
+ for (const o of [U, j, N, $, W, R, Z, Q]) o.close();
844
849
  }
845
- function de() {
846
- b.value !== "markup" && t.value !== void 0 && (L = Ze({
847
- directiveAppContext: h,
848
- directiveComponents: d.directiveComponents,
849
- editable: !d.readonly,
850
- initialValue: N.value,
851
- onCancel: () => (f("cancel"), !0),
852
- onChange: (a) => {
853
- ke(a, "visual"), t.value !== void 0 && ce(t.value, d.locale);
850
+ function me() {
851
+ n.value !== "markup" && M.value !== void 0 && (B = Je({
852
+ directiveAppContext: i,
853
+ directiveComponents: u.directiveComponents,
854
+ editable: !u.readonly,
855
+ initialValue: D.value,
856
+ onCancel: () => (b("cancel"), !0),
857
+ onChange: (t) => {
858
+ ye(t, "visual"), M.value !== void 0 && ge(M.value, u.locale);
854
859
  },
855
- onSelectionChange: (a) => {
856
- x.value = a, ie ? ie = !1 : ye();
860
+ onSelectionChange: (t) => {
861
+ L.value = t, re ? re = !1 : pe();
857
862
  },
858
- onSubmit: () => (f("submit"), !0),
859
- placeholder: d.placeholder,
860
- target: t.value
861
- }), ce(t.value, d.locale)), b.value !== "wysiwyg" && o.value !== void 0 && (H = Ke({
862
- editable: !d.readonly,
863
- initialValue: N.value,
864
- onChange: (a) => ke(a, "markup"),
865
- target: o.value
863
+ onSubmit: () => (b("submit"), !0),
864
+ placeholder: u.placeholder,
865
+ target: M.value
866
+ }), ge(M.value, u.locale)), n.value !== "wysiwyg" && a.value !== void 0 && (x = _e({
867
+ editable: !u.readonly,
868
+ initialValue: D.value,
869
+ onChange: (t) => ye(t, "markup"),
870
+ target: a.value
866
871
  }));
867
872
  }
868
- async function ue(a) {
869
- if (a === b.value)
873
+ async function ce(t) {
874
+ if (t === n.value)
870
875
  return;
871
- const i = ++_;
872
- b.value = a, f("update:mode", a), f("mode-change", a), re(), await le(), i === _ && de();
876
+ const o = ++ee;
877
+ n.value = t, b("update:mode", t), b("mode-change", t), ue(), await ne(), o === ee && me();
873
878
  }
874
- function $(a) {
875
- d.readonly || L?.run(a);
879
+ function T() {
880
+ return n.value === "markup" ? !0 : n.value === "wysiwyg" ? !1 : (x?.hasFocus() ? se = "markup" : B?.hasFocus() && (se = "visual"), se === "markup");
881
+ }
882
+ function V(t, o) {
883
+ if (!u.readonly) {
884
+ if (T() && t !== void 0) {
885
+ const P = {
886
+ bold: s.bold,
887
+ "fold-heading": s.toggleHeadingFolding,
888
+ "horizontal-rule": s.horizontalRule,
889
+ italic: s.italic,
890
+ mark: s.mark,
891
+ mermaid: s.insertMermaid,
892
+ quote: s.quote,
893
+ redo: s.redo,
894
+ strike: s.strikethrough,
895
+ table: s.insertTable(),
896
+ underline: s.underline,
897
+ undo: s.undo
898
+ }[t];
899
+ P !== void 0 && x?.run(P);
900
+ return;
901
+ }
902
+ B?.run(o);
903
+ }
876
904
  }
877
- return te(
878
- () => d.modelValue,
879
- (a) => {
880
- a !== N.value && Ee(a);
905
+ return ae(
906
+ () => u.modelValue,
907
+ (t) => {
908
+ t !== D.value && Ve(t);
881
909
  }
882
- ), te(
883
- () => d.mode,
884
- (a) => {
885
- ue(a);
910
+ ), ae(
911
+ () => u.mode,
912
+ (t) => {
913
+ ce(t);
886
914
  }
887
- ), te(
888
- () => d.locale,
889
- (a) => {
890
- t.value !== void 0 && ce(t.value, a);
915
+ ), ae(
916
+ () => u.locale,
917
+ (t) => {
918
+ M.value !== void 0 && ge(M.value, t);
891
919
  }
892
- ), te(
893
- () => d.readonly,
920
+ ), ae(
921
+ () => u.readonly,
894
922
  async () => {
895
- const a = ++_;
896
- re(), await le(), a === _ && de();
923
+ const t = ++ee;
924
+ ue(), await ne(), t === ee && me();
897
925
  }
898
- ), nt(() => {
899
- de(), document.addEventListener("pointerdown", Ce), document.addEventListener("keydown", pe);
900
- }), ve(() => {
901
- re(), document.removeEventListener("pointerdown", Ce), document.removeEventListener("keydown", pe);
902
- }), c({
903
- append: (a) => G(Le(N.value, a)),
904
- clear: () => G(""),
905
- focus: () => b.value === "markup" ? H?.focus() : L?.focus(),
906
- getMode: () => b.value,
907
- getValue: () => N.value,
908
- hasFocus: () => b.value === "markup" ? H?.hasFocus() ?? !1 : L?.hasFocus() ?? !1,
909
- insert: $e,
910
- isEmpty: () => N.value.length === 0,
911
- moveCursor: He,
912
- prepend: (a) => G(Le(a, N.value)),
913
- replace: G,
914
- setMode: ue,
915
- setValue: G
916
- }), (a, i) => (s(), u("section", {
926
+ ), rt(() => {
927
+ me(), document.addEventListener("pointerdown", Le), document.addEventListener("keydown", Be);
928
+ }), be(() => {
929
+ ue(), document.removeEventListener("pointerdown", Le), document.removeEventListener("keydown", Be);
930
+ }), g({
931
+ append: (t) => K(Ee(D.value, t)),
932
+ clear: () => K(""),
933
+ focus: () => n.value === "markup" ? x?.focus() : B?.focus(),
934
+ getMode: () => n.value,
935
+ getValue: () => D.value,
936
+ hasFocus: () => n.value === "markup" ? x?.hasFocus() ?? !1 : B?.hasFocus() ?? !1,
937
+ insert: Ae,
938
+ isEmpty: () => D.value.length === 0,
939
+ moveCursor: Se,
940
+ prepend: (t) => K(Ee(t, D.value)),
941
+ replace: K,
942
+ setMode: ce,
943
+ setValue: K
944
+ }), (t, o) => (r(), m("section", {
917
945
  class: "markdown-editor",
918
946
  "data-locale": e.locale,
919
- "data-mode": b.value,
947
+ "data-mode": n.value,
920
948
  "data-theme": e.theme,
921
- onClick: Re
949
+ onClick: qe
922
950
  }, [
923
- a.$slots.header ? (s(), u("header", Va, [
924
- ge(a.$slots, "header", {}, void 0, !0)
925
- ])) : T("", !0),
926
- e.readonly ? T("", !0) : (s(), Z(Ba, {
951
+ t.$slots.header ? (r(), m("header", za, [
952
+ fe(t.$slots, "header", {}, void 0, !0)
953
+ ])) : E("", !0),
954
+ e.readonly ? E("", !0) : (r(), X(Va, {
927
955
  key: 1,
928
- commands: m(r),
929
- "code-menu-visible": m(D).visible.value,
930
- "formula-menu-visible": m(z).visible.value,
931
- "heading-menu-visible": m(I).visible.value,
932
- "image-editor-visible": m(F).visible.value,
933
- "link-editor-visible": m(E).visible.value,
934
- "list-menu-visible": m(O).visible.value,
935
- mode: b.value,
936
- "mode-menu-visible": m(q).visible.value,
937
- state: x.value,
938
- "text-style-label": Be.value,
956
+ commands: c(d),
957
+ "code-menu-visible": c(j).visible.value,
958
+ "formula-menu-visible": c(N).visible.value,
959
+ "heading-menu-visible": c(U).visible.value,
960
+ "image-editor-visible": c(R).visible.value,
961
+ "link-editor-visible": c($).visible.value,
962
+ "list-menu-visible": c(W).visible.value,
963
+ mode: n.value,
964
+ "mode-menu-visible": c(Q).visible.value,
965
+ state: L.value,
966
+ "text-style-label": $e.value,
939
967
  "toolbar-preset": e.toolbarPreset,
940
968
  "toolbar-config": e.toolbarConfig,
941
- translate: se,
942
- onExecute: $,
943
- onInsertHtml: je,
944
- onToggleFormulaMenu: Qe,
945
- onToggleCodeMenu: Fe,
946
- onToggleHeadingMenu: ze,
947
- onToggleImageEditor: Ie,
948
- onToggleLinkEditor: Ne,
949
- onToggleListMenu: De,
950
- onToggleModeMenu: Oe
969
+ translate: de,
970
+ onExecute: V,
971
+ onInsertHtml: Qe,
972
+ onToggleFormulaMenu: Ze,
973
+ onToggleCodeMenu: De,
974
+ onToggleHeadingMenu: Re,
975
+ onToggleImageEditor: je,
976
+ onToggleLinkEditor: Ie,
977
+ onToggleListMenu: Oe,
978
+ onToggleModeMenu: Ue
951
979
  }, {
952
- default: ot((g) => [
953
- ge(a.$slots, "toolbar", it(st(g)), void 0, !0)
980
+ default: dt((v) => [
981
+ fe(t.$slots, "toolbar", ut(mt(v)), void 0, !0)
954
982
  ]),
955
983
  _: 3
956
984
  }, 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"])),
957
- (s(), Z(rt, { to: "body" }, [
958
- C(Kt, {
985
+ (r(), X(ct, { to: "body" }, [
986
+ C(ea, {
959
987
  ref_key: "floatingMenus",
960
- ref: R,
961
- "code-visible": m(D).visible.value,
962
- "formula-visible": m(z).visible.value,
963
- "heading-visible": m(I).visible.value,
964
- "list-visible": m(O).visible.value,
965
- mode: b.value,
966
- "mode-visible": m(q).visible.value,
967
- state: x.value,
968
- "text-style": oe.value,
988
+ ref: O,
989
+ "code-visible": c(j).visible.value,
990
+ "formula-visible": c(N).visible.value,
991
+ "heading-visible": c(U).visible.value,
992
+ "list-visible": c(W).visible.value,
993
+ mode: n.value,
994
+ "mode-visible": c(Q).visible.value,
995
+ state: L.value,
996
+ "text-style": ie.value,
969
997
  theme: e.theme,
970
- translate: se,
971
- onBulletList: i[0] || (i[0] = (g) => ee(m(r).bulletList)),
972
- onCodeBlock: i[1] || (i[1] = (g) => he(m(r).codeBlock)),
973
- onIndentList: i[2] || (i[2] = (g) => ee(m(r).sinkListItem)),
974
- onInlineCode: i[3] || (i[3] = (g) => he(m(r).code)),
975
- onInlineFormula: We,
976
- onMathBlock: Ue,
977
- onOrderedList: i[4] || (i[4] = (g) => ee(m(r).orderedList)),
978
- onOutdentList: i[5] || (i[5] = (g) => ee(m(r).liftListItem)),
979
- onSelectMode: qe,
980
- onSelectTextStyle: Pe
998
+ translate: de,
999
+ onBulletList: o[0] || (o[0] = (v) => te(c(d).bulletList, "bulletList")),
1000
+ onCodeBlock: o[1] || (o[1] = (v) => Ce(c(d).codeBlock, "codeBlock")),
1001
+ onIndentList: o[2] || (o[2] = (v) => te(c(d).sinkListItem, "indentList")),
1002
+ onInlineCode: o[3] || (o[3] = (v) => Ce(c(d).code, "code")),
1003
+ onInlineFormula: Ye,
1004
+ onMathBlock: Ge,
1005
+ onOrderedList: o[4] || (o[4] = (v) => te(c(d).orderedList, "orderedList")),
1006
+ onOutdentList: o[5] || (o[5] = (v) => te(c(d).liftListItem, "outdentList")),
1007
+ onSelectMode: We,
1008
+ onSelectTextStyle: Ne
981
1009
  }, null, 8, ["code-visible", "formula-visible", "heading-visible", "list-visible", "mode", "mode-visible", "state", "text-style", "theme"]),
982
- m(E).visible.value ? (s(), Z(ut, {
1010
+ c($).visible.value ? (r(), X(kt, {
983
1011
  key: 0,
984
1012
  ref_key: "linkForm",
985
- ref: fe,
986
- "has-current-link": x.value.linkHref !== void 0,
1013
+ ref: we,
1014
+ "has-current-link": L.value.linkHref !== void 0,
987
1015
  locale: e.locale,
988
- "open-in-new-window": W.value,
1016
+ "open-in-new-window": q.value,
989
1017
  theme: e.theme,
990
- text: U.value,
991
- url: P.value,
992
- onApply: Ve,
993
- onCancel: we,
994
- onRemove: i[6] || (i[6] = (g) => $(m(r).removeLink)),
995
- "onUpdate:text": i[7] || (i[7] = (g) => U.value = g),
996
- "onUpdate:url": i[8] || (i[8] = (g) => P.value = g),
997
- "onUpdate:openInNewWindow": i[9] || (i[9] = (g) => W.value = g)
998
- }, null, 8, ["has-current-link", "locale", "open-in-new-window", "theme", "text", "url"])) : T("", !0),
999
- m(F).visible.value ? (s(), Z(mt, {
1018
+ text: Y.value,
1019
+ url: A.value,
1020
+ onApply: Pe,
1021
+ onCancel: Me,
1022
+ onRemove: o[6] || (o[6] = (v) => V(void 0, c(d).removeLink)),
1023
+ "onUpdate:text": o[7] || (o[7] = (v) => Y.value = v),
1024
+ "onUpdate:url": o[8] || (o[8] = (v) => A.value = v),
1025
+ "onUpdate:openInNewWindow": o[9] || (o[9] = (v) => q.value = v)
1026
+ }, null, 8, ["has-current-link", "locale", "open-in-new-window", "theme", "text", "url"])) : E("", !0),
1027
+ c(R).visible.value ? (r(), X(wt, {
1000
1028
  key: 1,
1001
1029
  ref_key: "imageForm",
1002
- ref: J,
1003
- alt: l.value,
1030
+ ref: ke,
1031
+ alt: k.value,
1004
1032
  locale: e.locale,
1005
1033
  theme: e.theme,
1006
- title: k.value,
1034
+ title: I.value,
1007
1035
  "upload-image": e.uploadImage,
1008
- url: n.value,
1009
- onApply: Se,
1010
- onCancel: Ae,
1011
- "onUpdate:alt": i[10] || (i[10] = (g) => l.value = g),
1012
- "onUpdate:title": i[11] || (i[11] = (g) => k.value = g),
1013
- "onUpdate:url": i[12] || (i[12] = (g) => n.value = g)
1014
- }, null, 8, ["alt", "locale", "theme", "title", "upload-image", "url"])) : T("", !0),
1015
- m(Q).visible.value ? (s(), Z(ta, {
1036
+ url: l.value,
1037
+ onApply: ze,
1038
+ onCancel: Fe,
1039
+ "onUpdate:alt": o[10] || (o[10] = (v) => k.value = v),
1040
+ "onUpdate:title": o[11] || (o[11] = (v) => I.value = v),
1041
+ "onUpdate:url": o[12] || (o[12] = (v) => l.value = v)
1042
+ }, null, 8, ["alt", "locale", "theme", "title", "upload-image", "url"])) : E("", !0),
1043
+ c(Z).visible.value ? (r(), X(oa, {
1016
1044
  key: 2,
1017
1045
  ref_key: "imageActions",
1018
- ref: be,
1019
- "object-fit": x.value.imageObjectFit,
1046
+ ref: he,
1047
+ "object-fit": L.value.imageObjectFit,
1020
1048
  theme: e.theme,
1021
- translate: se,
1022
- onFullWidth: i[13] || (i[13] = (g) => Me(m(r).setImageDisplay("100%", "contain", null))),
1023
- onObjectFit: i[14] || (i[14] = (g) => Me(m(r).setImageDisplay(void 0, g)))
1024
- }, null, 8, ["object-fit", "theme"])) : T("", !0)
1049
+ translate: de,
1050
+ onFullWidth: o[13] || (o[13] = (v) => xe(c(d).setImageDisplay("100%", "contain", null))),
1051
+ onObjectFit: o[14] || (o[14] = (v) => xe(c(d).setImageDisplay(void 0, v)))
1052
+ }, null, 8, ["object-fit", "theme"])) : E("", !0)
1025
1053
  ])),
1026
- v("div", {
1027
- class: dt(["markdown-editor__hosts", { "markdown-editor__hosts--split": b.value === "split" }])
1054
+ f("div", {
1055
+ class: vt(["markdown-editor__hosts", { "markdown-editor__hosts--split": n.value === "split" }])
1028
1056
  }, [
1029
- b.value !== "markup" ? (s(), u("div", {
1057
+ n.value !== "markup" ? (r(), m("div", {
1030
1058
  key: 0,
1031
1059
  ref_key: "visualTarget",
1032
- ref: t,
1060
+ ref: M,
1033
1061
  class: "markdown-editor__visual"
1034
- }, null, 512)) : T("", !0),
1035
- b.value !== "wysiwyg" ? (s(), u("div", {
1062
+ }, null, 512)) : E("", !0),
1063
+ n.value !== "wysiwyg" ? (r(), m("div", {
1036
1064
  key: 1,
1037
1065
  ref_key: "markupTarget",
1038
- ref: o,
1066
+ ref: a,
1039
1067
  class: "markdown-editor__markup"
1040
- }, null, 512)) : T("", !0)
1068
+ }, null, 512)) : E("", !0)
1041
1069
  ], 2)
1042
- ], 8, $a));
1070
+ ], 8, Pa));
1043
1071
  }
1044
- }), Ia = /* @__PURE__ */ X(Sa, [["__scopeId", "data-v-cf11416f"]]);
1045
- function Oa(e = {}) {
1046
- const c = Xe(e), M = y(c.getValue()), d = y(c.getMode()), f = y(c.readonly), r = y(c.toolbarVisible), h = () => c.destroy();
1047
- return c.on("change", (o) => {
1048
- M.value = o;
1049
- }), c.on("modeChange", (o) => {
1050
- d.value = o;
1051
- }), c.on("changeReadonly", ({ readonly: o }) => {
1052
- f.value = o;
1053
- }), c.on("changeToolbarVisibility", ({ visible: o }) => {
1054
- r.value = o;
1055
- }), Te() !== null && ve(h), {
1056
- destroy: h,
1057
- editor: c,
1058
- mode: ae(d),
1059
- readonly: ae(f),
1060
- toolbarVisible: ae(r),
1061
- value: ae(M)
1072
+ }), Wa = /* @__PURE__ */ _(Fa, [["__scopeId", "data-v-44b8d7ae"]]);
1073
+ function Qa(e = {}) {
1074
+ const g = tt(e), y = h(g.getValue()), u = h(g.getMode()), b = h(g.readonly), d = h(g.toolbarVisible), s = () => g.destroy();
1075
+ return g.on("change", (i) => {
1076
+ y.value = i;
1077
+ }), g.on("modeChange", (i) => {
1078
+ u.value = i;
1079
+ }), g.on("changeReadonly", ({ readonly: i }) => {
1080
+ b.value = i;
1081
+ }), g.on("changeToolbarVisibility", ({ visible: i }) => {
1082
+ d.value = i;
1083
+ }), He() !== null && be(s), {
1084
+ destroy: s,
1085
+ editor: g,
1086
+ mode: le(u),
1087
+ readonly: le(b),
1088
+ toolbarVisible: le(d),
1089
+ value: le(y)
1062
1090
  };
1063
1091
  }
1064
1092
  export {
1065
- _a as ActionsManager,
1066
- pl as BaseInputRules,
1067
- xl as BaseKeymap,
1068
- Ll as BaseSchema,
1069
- Tl as Blockquote,
1070
- pi as BlockquoteSpecs,
1071
- Bl as Bold,
1072
- xi as BoldAttrs,
1073
- Li as BoldSpecs,
1074
- Ti as BreakNodeName,
1075
- El as Breaks,
1076
- Bi as BreaksSpecs,
1077
- Hl as ClicksOnEdges,
1078
- $l as Clipboard,
1079
- Vl as Code,
1080
- Sl as CodeBlock,
1081
- Ei as CodeBlockAttrs,
1082
- Hi as CodeBlockSpecs,
1083
- $i as CodeSpecs,
1084
- fi as CommonMarkPreset,
1085
- yi as CommonMarkSpecsPreset,
1086
- Al as Cursor,
1087
- bi as DefaultPreset,
1088
- Pl as Deflist,
1089
- Vi as DeflistAttr,
1090
- Si as DeflistNode,
1091
- Ai as DeflistSpecs,
1092
- zl as EditorModeKeymap,
1093
- el as EventEmitter,
1094
- tl as ExtensionBuilder,
1095
- al as ExtensionPriority,
1096
- ll as ExtensionsManager,
1097
- ki as FullPreset,
1098
- Mi as FullSpecsPreset,
1099
- Fl as GapCursorSelection,
1100
- Nl as Heading,
1101
- Pi as HeadingSpecs,
1102
- Rl as History,
1103
- Dl as HistoryAction,
1104
- Il as HorizontalRule,
1105
- zi as HorizontalRuleSpecs,
1106
- Ol as Html,
1107
- ql as HtmlAttr,
1108
- jl as HtmlNode,
1109
- Ul as Image,
1110
- Wl as ImageAttr,
1111
- Ql as Italic,
1112
- Fi as ItalicAttrs,
1113
- Ni as ItalicSpecs,
1114
- Ua as Lang,
1115
- Gl as Link,
1116
- Ri as LinkAttr,
1117
- Di as LinkSpecs,
1118
- Yl as Lists,
1119
- nl as Logger,
1120
- ol as Logger2,
1121
- Zl as Mark,
1122
- il as MarkdownCodec,
1123
- Ia as MarkdownEditor,
1124
- ai as MarkdownEditorForm,
1125
- mt as MarkdownEditorImageForm,
1126
- ut as MarkdownEditorLinkForm,
1127
- li as MarkdownEditorTextInput,
1128
- sl as MarkdownParser,
1129
- rl as MarkdownParserDynamicModifier,
1130
- Kl as Mermaid,
1131
- dl as ParserTokenRegistry,
1132
- ul as ParserTokensRegistry,
1133
- Xl as Placeholder,
1134
- Jl as QuoteLink,
1135
- _l as Resizable,
1136
- ml as SafeEventEmitter,
1137
- cl as SchemaDynamicModifier,
1138
- gl as SchemaSpecRegistry,
1139
- en as Selection,
1140
- tn as SelectionContext,
1141
- vl as SerializerTokenRegistry,
1142
- fl as SerializerTokensRegistry,
1143
- an as Strike,
1144
- ln as Table,
1145
- Ii as TableAttrs,
1146
- Oi as TableCellAlign,
1147
- qi as TableNode,
1148
- ji as TableSpecs,
1149
- nn as Underline,
1150
- on as VERSION,
1151
- bl as WysiwygContentHandler,
1152
- sn as YfmHtmlBlock,
1153
- wi as ZeroPreset,
1154
- rn as addBreak,
1155
- dn as addEmptyDefaultTextblockToEndOfDocumentActionName,
1156
- un as addEmptyDefaultTextblockToStartOfDocumentActionName,
1157
- mn as addHorizontalRule,
1158
- cn as addImage,
1159
- gn as addParagraphToEnd,
1160
- vn as addParagraphToStart,
1161
- fn as addTableColumn,
1162
- bn as addTableRow,
1163
- kn as arrowDown,
1164
- wn as arrowLeft,
1165
- hn as arrowRight,
1166
- yn as arrowUp,
1167
- kl as basicMarkdownCodec,
1168
- wl as basicMarkdownSchema,
1169
- Ui as blockquoteNodeName,
1170
- Wi as boldMarkName,
1171
- Za as cn,
1172
- Qi as codeBlockNodeName,
1173
- Gi as codeMarkName,
1174
- Mn as collapseListsPlugin,
1175
- oi as commonmarkToolbarConfig,
1176
- Wa as configure,
1177
- _o as configureAdvancedMarkdownRenderers,
1178
- Ye as createBasicEditorCommands,
1179
- Cn as createFakeParagraph,
1180
- pn as createGapCursorPlugin,
1181
- xn as createHistoryActions,
1182
- Ln as createListActions,
1183
- Tn as createListsInputRules,
1184
- Bn as createListsKeymap,
1185
- Xe as createMarkdownEditor,
1186
- En as createTable,
1187
- ii as createToolbarConfig,
1188
- si as createToolbarGroup,
1189
- ri as createToolbarItem,
1190
- Hn as createVueContextPanelPlugin,
1191
- $n as createVueNodeView,
1192
- Vn as createVueWidgetDecoration,
1193
- hl as defaultMarkdownSchema,
1194
- Sn as defaultMermaidSource,
1195
- di as defaultToolbarConfig,
1196
- An as defaultYfmHtml,
1197
- Pn as deleteTable,
1198
- zn as deleteTableColumn,
1199
- Fn as deleteTableRow,
1200
- Nn as findFakeParaPosClosestToPos,
1201
- Rn as findFakeParaPosForCodeBlock,
1202
- Dn as findFakeParaPosForNodeSelection,
1203
- In as findFakeParaPosForTextSelection,
1204
- ui as fullToolbarConfig,
1205
- On as gapCursorBackspace,
1206
- ei as getAdvancedMarkdownRenderers,
1207
- yl as getBasicWysiwygSelectionState,
1208
- qn as getBlockquoteType,
1209
- jn as getBoldType,
1210
- Un as getCodeBlockType,
1211
- Wn as getCodeType,
1212
- Qa as getConfig,
1213
- Qn as getCurrentLink,
1214
- Gn as getDeflistTypes,
1215
- Yn as getHeadingType,
1216
- Zn as getHorizontalRuleType,
1217
- Kn as getImageType,
1218
- Xn as getItalicType,
1219
- Jn as getLinkType,
1220
- _n as getMarkType,
1221
- Ge as getMarkdownEditorMessages,
1222
- eo as getQuoteLinkType,
1223
- to as getStrikeType,
1224
- ct as getToolbarConfig,
1225
- ao as getUnderlineType,
1226
- lo as goToTableCell,
1227
- Yi as headingLevelAttr,
1228
- Zi as headingNodeName,
1229
- no as hierarchicalSelectAll,
1230
- Ki as horizontalRuleMarkupAttr,
1231
- Xi as horizontalRuleNodeName,
1232
- oo as imageNodeName,
1233
- io as imageObjectFitValues,
1234
- so as insertMermaid,
1235
- ro as insertTable,
1236
- uo as insertYfmHtmlBlock,
1237
- mo as isBreakNode,
1238
- co as isGapCursorSelection,
1239
- go as isInsideCode,
1240
- j as isToolbarItemActive,
1241
- vt as isToolbarItemAvailable,
1242
- V as isToolbarItemEnabled,
1243
- Ji as italicMarkName,
1244
- vo as joinPrevList,
1245
- fo as liftEmptyListItem,
1246
- bo as liftFromQuote,
1247
- _i as linkMarkName,
1248
- ko as markMarkName,
1249
- Xa as markdownEditorMessages,
1250
- mi as markdownEditorToolbarItemIds,
1251
- wo as mergeListsPlugin,
1252
- ho as mermaidActionName,
1253
- yo as mermaidNodeName,
1254
- ci as minimalToolbarConfig,
1255
- Ke as mountBasicMarkupEditor,
1256
- Ze as mountBasicWysiwygEditor,
1257
- Mo as moveToNextTableRow,
1258
- Co as newlineInCode,
1259
- gt as normalizeToolbarItem,
1260
- po as quoteLinkActionName,
1261
- xo as quoteLinkNodeName,
1262
- Lo as removeCurrentLink,
1263
- To as removeLink,
1264
- Ml as renderMarkdownPreview,
1265
- Bo as resetCodeBlock,
1266
- Eo as resetHeading,
1267
- Ho as setCodeBlock,
1268
- $o as setCodeBlockLanguage,
1269
- Vo as setImageDisplay,
1270
- So as setLink,
1271
- Ao as setTableColumnAlignment,
1272
- Po as sinkOnlySelectedListItem,
1273
- zo as splitDeflist,
1274
- Fo as strikeMarkName,
1275
- Ga as subscribeConfigure,
1276
- No as toHeading,
1277
- Ro as toList,
1278
- Do as toggleBold,
1279
- Io as toggleCode,
1280
- Oo as toggleHighlight,
1281
- qo as toggleItalic,
1282
- jo as toggleLink,
1283
- Uo as toggleQuote,
1284
- Wo as toggleQuoteLink,
1285
- Qo as toggleStrike,
1286
- Go as toggleUnderline,
1287
- Yo as underlineMarkName,
1288
- Oa as useMarkdownEditor,
1289
- Zo as wrapToDeflist,
1290
- Ko as yfmHtmlBlockActionName,
1291
- Xo as yfmHtmlBlockNodeName,
1292
- gi as zeroToolbarConfig
1093
+ nl as ActionsManager,
1094
+ El as BaseInputRules,
1095
+ Hl as BaseKeymap,
1096
+ $l as BaseSchema,
1097
+ Vl as Blockquote,
1098
+ Ei as BlockquoteSpecs,
1099
+ Sl as Bold,
1100
+ Hi as BoldAttrs,
1101
+ $i as BoldSpecs,
1102
+ Vi as BreakNodeName,
1103
+ Al as Breaks,
1104
+ Si as BreaksSpecs,
1105
+ Pl as ClicksOnEdges,
1106
+ zl as Clipboard,
1107
+ Fl as Code,
1108
+ Nl as CodeBlock,
1109
+ Ai as CodeBlockAttrs,
1110
+ Pi as CodeBlockSpecs,
1111
+ zi as CodeSpecs,
1112
+ yi as CommonMarkPreset,
1113
+ Li as CommonMarkSpecsPreset,
1114
+ Rl as Cursor,
1115
+ Mi as DefaultPreset,
1116
+ Dl as Deflist,
1117
+ Fi as DeflistAttr,
1118
+ Ni as DeflistNode,
1119
+ Ri as DeflistSpecs,
1120
+ Il as EditorModeKeymap,
1121
+ ol as EventEmitter,
1122
+ il as ExtensionBuilder,
1123
+ sl as ExtensionPriority,
1124
+ rl as ExtensionsManager,
1125
+ Ci as FullPreset,
1126
+ Bi as FullSpecsPreset,
1127
+ ql as GapCursorSelection,
1128
+ Ol as Heading,
1129
+ Di as HeadingSpecs,
1130
+ jl as History,
1131
+ Ul as HistoryAction,
1132
+ Wl as HorizontalRule,
1133
+ Ii as HorizontalRuleSpecs,
1134
+ Ql as Html,
1135
+ Gl as HtmlAttr,
1136
+ Yl as HtmlNode,
1137
+ Zl as Image,
1138
+ Kl as ImageAttr,
1139
+ Xl as Italic,
1140
+ qi as ItalicAttrs,
1141
+ Oi as ItalicSpecs,
1142
+ Za as Lang,
1143
+ Jl as Link,
1144
+ ji as LinkAttr,
1145
+ Ui as LinkSpecs,
1146
+ _l as Lists,
1147
+ dl as Logger,
1148
+ ul as Logger2,
1149
+ en as Mark,
1150
+ ml as MarkdownCodec,
1151
+ Wa as MarkdownEditor,
1152
+ ki as MarkdownEditorForm,
1153
+ wt as MarkdownEditorImageForm,
1154
+ kt as MarkdownEditorLinkForm,
1155
+ wi as MarkdownEditorTextInput,
1156
+ cl as MarkdownParser,
1157
+ vl as MarkdownParserDynamicModifier,
1158
+ tn as Mermaid,
1159
+ gl as ParserTokenRegistry,
1160
+ fl as ParserTokensRegistry,
1161
+ an as Placeholder,
1162
+ ln as QuoteLink,
1163
+ nn as Resizable,
1164
+ bl as SafeEventEmitter,
1165
+ kl as SchemaDynamicModifier,
1166
+ wl as SchemaSpecRegistry,
1167
+ on as Selection,
1168
+ sn as SelectionContext,
1169
+ hl as SerializerTokenRegistry,
1170
+ yl as SerializerTokensRegistry,
1171
+ rn as Strike,
1172
+ dn as Table,
1173
+ Wi as TableAttrs,
1174
+ Qi as TableCellAlign,
1175
+ Gi as TableNode,
1176
+ Yi as TableSpecs,
1177
+ un as Underline,
1178
+ mn as VERSION,
1179
+ Ml as WysiwygContentHandler,
1180
+ cn as YfmHtmlBlock,
1181
+ pi as ZeroPreset,
1182
+ vn as addBreak,
1183
+ gn as addEmptyDefaultTextblockToEndOfDocumentActionName,
1184
+ fn as addEmptyDefaultTextblockToStartOfDocumentActionName,
1185
+ bn as addHorizontalRule,
1186
+ kn as addImage,
1187
+ wn as addParagraphToEnd,
1188
+ hn as addParagraphToStart,
1189
+ yn as addTableColumn,
1190
+ Mn as addTableRow,
1191
+ Cn as arrowDown,
1192
+ pn as arrowLeft,
1193
+ xn as arrowRight,
1194
+ Ln as arrowUp,
1195
+ Cl as basicMarkdownCodec,
1196
+ pl as basicMarkdownSchema,
1197
+ Zi as blockquoteNodeName,
1198
+ Ki as boldMarkName,
1199
+ el as cn,
1200
+ Xi as codeBlockNodeName,
1201
+ Ji as codeMarkName,
1202
+ Bn as collapseListsPlugin,
1203
+ si as commonmarkToolbarConfig,
1204
+ Ka as configure,
1205
+ ni as configureAdvancedMarkdownRenderers,
1206
+ Xe as createBasicEditorCommands,
1207
+ et as createBasicMarkupCommands,
1208
+ Tn as createFakeParagraph,
1209
+ En as createGapCursorPlugin,
1210
+ Hn as createHistoryActions,
1211
+ $n as createListActions,
1212
+ Vn as createListsInputRules,
1213
+ Sn as createListsKeymap,
1214
+ tt as createMarkdownEditor,
1215
+ An as createTable,
1216
+ ri as createToolbarConfig,
1217
+ di as createToolbarGroup,
1218
+ ui as createToolbarItem,
1219
+ Pn as createVueContextPanelPlugin,
1220
+ zn as createVueNodeView,
1221
+ Fn as createVueWidgetDecoration,
1222
+ xl as defaultMarkdownSchema,
1223
+ Nn as defaultMermaidSource,
1224
+ mi as defaultToolbarConfig,
1225
+ Rn as defaultYfmHtml,
1226
+ Dn as deleteTable,
1227
+ In as deleteTableColumn,
1228
+ qn as deleteTableRow,
1229
+ On as findFakeParaPosClosestToPos,
1230
+ jn as findFakeParaPosForCodeBlock,
1231
+ Un as findFakeParaPosForNodeSelection,
1232
+ Wn as findFakeParaPosForTextSelection,
1233
+ ci as fullToolbarConfig,
1234
+ Qn as gapCursorBackspace,
1235
+ oi as getAdvancedMarkdownRenderers,
1236
+ Ll as getBasicWysiwygSelectionState,
1237
+ Gn as getBlockquoteType,
1238
+ Yn as getBoldType,
1239
+ Zn as getCodeBlockType,
1240
+ Kn as getCodeType,
1241
+ Xa as getConfig,
1242
+ Xn as getCurrentLink,
1243
+ Jn as getDeflistTypes,
1244
+ _n as getHeadingType,
1245
+ eo as getHorizontalRuleType,
1246
+ to as getImageType,
1247
+ ao as getItalicType,
1248
+ lo as getLinkType,
1249
+ no as getMarkType,
1250
+ Ke as getMarkdownEditorMessages,
1251
+ oo as getQuoteLinkType,
1252
+ io as getStrikeType,
1253
+ gt as getToolbarConfig,
1254
+ so as getUnderlineType,
1255
+ ro as goToTableCell,
1256
+ _i as headingLevelAttr,
1257
+ es as headingNodeName,
1258
+ uo as hierarchicalSelectAll,
1259
+ ts as horizontalRuleMarkupAttr,
1260
+ as as horizontalRuleNodeName,
1261
+ mo as imageNodeName,
1262
+ co as imageObjectFitValues,
1263
+ vo as insertMermaid,
1264
+ go as insertTable,
1265
+ fo as insertYfmHtmlBlock,
1266
+ bo as isBreakNode,
1267
+ ko as isGapCursorSelection,
1268
+ wo as isInsideCode,
1269
+ G as isToolbarItemActive,
1270
+ bt as isToolbarItemAvailable,
1271
+ S as isToolbarItemEnabled,
1272
+ ls as italicMarkName,
1273
+ ho as joinPrevList,
1274
+ yo as liftEmptyListItem,
1275
+ Mo as liftFromQuote,
1276
+ ns as linkMarkName,
1277
+ Co as markMarkName,
1278
+ al as markdownEditorMessages,
1279
+ vi as markdownEditorToolbarItemIds,
1280
+ po as mergeListsPlugin,
1281
+ xo as mermaidActionName,
1282
+ Lo as mermaidNodeName,
1283
+ gi as minimalToolbarConfig,
1284
+ _e as mountBasicMarkupEditor,
1285
+ Je as mountBasicWysiwygEditor,
1286
+ Bo as moveToNextTableRow,
1287
+ To as newlineInCode,
1288
+ ft as normalizeToolbarItem,
1289
+ Eo as quoteLinkActionName,
1290
+ Ho as quoteLinkNodeName,
1291
+ $o as removeCurrentLink,
1292
+ Vo as removeLink,
1293
+ Bl as renderMarkdownPreview,
1294
+ So as resetCodeBlock,
1295
+ Ao as resetHeading,
1296
+ Po as setCodeBlock,
1297
+ zo as setCodeBlockLanguage,
1298
+ Fo as setImageDisplay,
1299
+ No as setLink,
1300
+ Ro as setTableColumnAlignment,
1301
+ Do as sinkOnlySelectedListItem,
1302
+ Io as splitDeflist,
1303
+ qo as strikeMarkName,
1304
+ Ja as subscribeConfigure,
1305
+ Oo as toHeading,
1306
+ jo as toList,
1307
+ Uo as toggleBold,
1308
+ Wo as toggleCode,
1309
+ Qo as toggleHighlight,
1310
+ Go as toggleItalic,
1311
+ Yo as toggleLink,
1312
+ Zo as toggleQuote,
1313
+ Ko as toggleQuoteLink,
1314
+ Xo as toggleStrike,
1315
+ Jo as toggleUnderline,
1316
+ _o as underlineMarkName,
1317
+ Qa as useMarkdownEditor,
1318
+ ei as wrapToDeflist,
1319
+ ti as yfmHtmlBlockActionName,
1320
+ ai as yfmHtmlBlockNodeName,
1321
+ fi as zeroToolbarConfig
1293
1322
  };