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