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