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