md-editor-v3 6.0.0 → 6.1.0-0
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/lib/cjs/MdEditor.cjs +4 -4
- package/lib/cjs/ModalToolbar.cjs +1 -1
- package/lib/cjs/NormalToolbar.cjs +1 -1
- package/lib/cjs/chunks/dom.cjs +1 -1
- package/lib/cjs/chunks/index.cjs +1 -1
- package/lib/cjs/chunks/index3.cjs +49 -49
- package/lib/es/MdEditor.mjs +446 -426
- package/lib/es/ModalToolbar.mjs +6 -5
- package/lib/es/NormalToolbar.mjs +2 -1
- package/lib/es/chunks/dom.mjs +132 -92
- package/lib/es/chunks/index.mjs +10 -9
- package/lib/es/chunks/index3.mjs +624 -626
- package/lib/preview.css +1 -1
- package/lib/style.css +1 -1
- package/lib/types/MdEditor/composition.d.ts +3 -3
- package/lib/types/MdEditor/layouts/Content/ContentPreview.d.ts +0 -13
- package/lib/types/MdEditor/layouts/Content/index.d.ts +0 -3
- package/lib/types/MdEditor/layouts/Content/props.d.ts +1 -13
- package/lib/types/MdEditor/type.d.ts +1 -0
- package/lib/types/MdEditor/utils/dom.d.ts +6 -0
- package/package.json +2 -2
package/lib/es/MdEditor.mjs
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { a as
|
|
1
|
+
import { a as J, D as ot } from "./chunks/index.mjs";
|
|
2
2
|
import { s as lt, a as at, M as Oe } from "./chunks/index4.mjs";
|
|
3
3
|
import { C as nt, c as rt, a as st, e as it, b as ct, u as ut, d as dt, f as mt, g as bt, h as vt, i as gt, j as ht, k as ft, M as pt } from "./chunks/index3.mjs";
|
|
4
4
|
import Tt from "./ModalToolbar.mjs";
|
|
5
5
|
import wt from "./NormalToolbar.mjs";
|
|
6
|
-
import { inject as r, watch as I,
|
|
7
|
-
import { g as
|
|
6
|
+
import { inject as r, watch as I, nextTick as ne, onMounted as W, ref as x, defineComponent as w, createVNode as l, reactive as U, toRef as ye, Fragment as Ve, computed as K, cloneVNode as ae, createApp as yt, shallowRef as Ct, onBeforeUnmount as ve } from "vue";
|
|
7
|
+
import { g as G, p as a, a as kt, M as oe, d as $t, b as xt } from "./chunks/config.mjs";
|
|
8
8
|
import { linkTo as St, throttle as It, createSmoothScroll as We, draggingScroll as Lt } from "@vavt/util";
|
|
9
9
|
import { deleteLine as Et, history as Ce, defaultKeymap as Nt, historyKeymap as At, indentWithTab as Dt, undo as Mt, redo as Rt } from "@codemirror/commands";
|
|
10
10
|
import { markdown as Ft } from "@codemirror/lang-markdown";
|
|
11
11
|
import { languages as Bt } from "@codemirror/language-data";
|
|
12
|
-
import { EditorState as
|
|
13
|
-
import { placeholder as
|
|
14
|
-
import { b, E as
|
|
12
|
+
import { EditorState as se, EditorSelection as q, Compartment as z, StateEffect as _e, StateField as ze, RangeSetBuilder as Ht } from "@codemirror/state";
|
|
13
|
+
import { placeholder as Pt, EditorView as R, showTooltip as Ot, Decoration as Vt, WidgetType as Wt, keymap as _t, drawSelection as zt } from "@codemirror/view";
|
|
14
|
+
import { b, E as j, R as f, C as Ut, U as ge, a as Ue, c as qe, O as Ke, d as qt, e as Kt, T as Gt, S as jt, G as ke } from "./chunks/event-bus.mjs";
|
|
15
15
|
import { indentUnit as Yt, syntaxHighlighting as Ge, HighlightStyle as je } from "@codemirror/language";
|
|
16
16
|
import { autocompletion as Zt } from "@codemirror/autocomplete";
|
|
17
17
|
import { a as Xt } from "./chunks/dom.mjs";
|
|
@@ -21,48 +21,39 @@ import { tags as d } from "@lezer/highlight";
|
|
|
21
21
|
import { searchKeymap as eo } from "@codemirror/search";
|
|
22
22
|
import { g as $e } from "./chunks/vue-tsx.mjs";
|
|
23
23
|
const to = (e, t, o) => {
|
|
24
|
-
const n = r("editorId");
|
|
25
|
-
let
|
|
26
|
-
},
|
|
24
|
+
const n = r("editorId"), i = r("setting");
|
|
25
|
+
let s = () => {
|
|
26
|
+
}, c = () => {
|
|
27
27
|
};
|
|
28
|
-
const
|
|
29
|
-
|
|
30
|
-
const
|
|
28
|
+
const u = () => {
|
|
29
|
+
s();
|
|
30
|
+
const m = o.value?.view.contentDOM.getRootNode(), g = m?.querySelector(
|
|
31
31
|
`#${n} .cm-scroller`
|
|
32
|
-
),
|
|
32
|
+
), v = m?.querySelector(
|
|
33
33
|
`[id="${n}-preview-wrapper"]`
|
|
34
|
-
),
|
|
34
|
+
), p = m?.querySelector(
|
|
35
35
|
`[id="${n}-html-wrapper"]`
|
|
36
36
|
);
|
|
37
|
-
(
|
|
38
|
-
|
|
39
|
-
|
|
37
|
+
(v || p) && ([c, s] = (v ? lt : at)(
|
|
38
|
+
g,
|
|
39
|
+
v || p,
|
|
40
40
|
o.value
|
|
41
|
-
), e.scrollAuto &&
|
|
41
|
+
), e.scrollAuto && c());
|
|
42
42
|
};
|
|
43
|
-
I(
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
O(e.setting, "preview"),
|
|
47
|
-
O(e.setting, "htmlPreview"),
|
|
48
|
-
O(e.setting, "fullscreen"),
|
|
49
|
-
O(e.setting, "pageFullscreen")
|
|
50
|
-
],
|
|
51
|
-
() => {
|
|
52
|
-
re(c);
|
|
53
|
-
}
|
|
54
|
-
), I(
|
|
43
|
+
I([t, i], () => {
|
|
44
|
+
ne(u);
|
|
45
|
+
}), I(
|
|
55
46
|
() => e.scrollAuto,
|
|
56
|
-
(
|
|
57
|
-
|
|
47
|
+
(m) => {
|
|
48
|
+
m ? c() : s();
|
|
58
49
|
}
|
|
59
50
|
), I(
|
|
60
|
-
() =>
|
|
61
|
-
(
|
|
62
|
-
|
|
51
|
+
() => i.value.previewOnly,
|
|
52
|
+
(m) => {
|
|
53
|
+
m ? s() : c();
|
|
63
54
|
}
|
|
64
|
-
), W(
|
|
65
|
-
},
|
|
55
|
+
), W(u);
|
|
56
|
+
}, ie = async (e, t, o) => {
|
|
66
57
|
if (/^h[1-6]$/.test(e))
|
|
67
58
|
return oo(e, t);
|
|
68
59
|
if (e === "prettier")
|
|
@@ -115,7 +106,7 @@ const to = (e, t, o) => {
|
|
|
115
106
|
return { text: "", options: {} };
|
|
116
107
|
}
|
|
117
108
|
}, oo = (e, t) => {
|
|
118
|
-
const o = e.slice(1), n = "#".repeat(Number(o)), [i, s, c] =
|
|
109
|
+
const o = e.slice(1), n = "#".repeat(Number(o)), [i, s, c] = he(t, {
|
|
119
110
|
wholeLine: !0
|
|
120
111
|
});
|
|
121
112
|
return {
|
|
@@ -123,10 +114,10 @@ const to = (e, t, o) => {
|
|
|
123
114
|
options: { deviationStart: n.length + 1, replaceStart: s, replaceEnd: c }
|
|
124
115
|
};
|
|
125
116
|
}, lo = async (e, t) => {
|
|
126
|
-
const o = window.prettier ||
|
|
127
|
-
window.prettierPlugins?.markdown ||
|
|
117
|
+
const o = window.prettier || G.editorExtensions.prettier?.prettierInstance, n = [
|
|
118
|
+
window.prettierPlugins?.markdown || G.editorExtensions.prettier?.parserMarkdownInstance
|
|
128
119
|
];
|
|
129
|
-
return !o || !n[0] ? (b.emit(t.editorId,
|
|
120
|
+
return !o || !n[0] ? (b.emit(t.editorId, j, {
|
|
130
121
|
name: "prettier",
|
|
131
122
|
message: "prettier is undefined"
|
|
132
123
|
}), {
|
|
@@ -169,17 +160,17 @@ $$
|
|
|
169
160
|
orderedList: 1,
|
|
170
161
|
task: "- [ ] "
|
|
171
162
|
}, so = (e, t) => {
|
|
172
|
-
const [o, n, i] =
|
|
163
|
+
const [o, n, i] = he(t, {
|
|
173
164
|
wholeLine: !0
|
|
174
165
|
}), s = o.split(`
|
|
175
|
-
`), c = ro[e], u = e === "orderedList" ? s.map((v,
|
|
166
|
+
`), c = ro[e], u = e === "orderedList" ? s.map((v, p) => `${c + p}. ${v}`) : s.map((v) => `${c}${v}`), m = e === "orderedList" ? "1. " : c.toString(), g = s.length === 1 ? m.length : 0;
|
|
176
167
|
return {
|
|
177
168
|
text: u.join(`
|
|
178
169
|
`),
|
|
179
170
|
options: { deviationStart: g, replaceStart: n, replaceEnd: i }
|
|
180
171
|
};
|
|
181
172
|
}, io = (e, t) => {
|
|
182
|
-
const [o, n, i] =
|
|
173
|
+
const [o, n, i] = he(t), s = e.mode || "language", c = `
|
|
183
174
|
\`\`\`${s}
|
|
184
175
|
${e.text || o || ""}
|
|
185
176
|
\`\`\`
|
|
@@ -217,7 +208,7 @@ dateFormat YYYY-MM-DD`,
|
|
|
217
208
|
CAR ||--o{ NAMED-DRIVER : allows`,
|
|
218
209
|
journey: `journey
|
|
219
210
|
title My Journey`,
|
|
220
|
-
...
|
|
211
|
+
...G.editorConfig.mermaidTemplate
|
|
221
212
|
}[e]}
|
|
222
213
|
\`\`\`
|
|
223
214
|
`,
|
|
@@ -271,7 +262,7 @@ dateFormat YYYY-MM-DD`,
|
|
|
271
262
|
deviationEnd: n.deviationEnd || 0
|
|
272
263
|
}
|
|
273
264
|
};
|
|
274
|
-
},
|
|
265
|
+
}, he = (e, t = { wholeLine: !1 }) => {
|
|
275
266
|
const o = e.view.state, n = o.selection.main;
|
|
276
267
|
if (n.empty) {
|
|
277
268
|
const i = o.doc.lineAt(n.from);
|
|
@@ -289,8 +280,8 @@ dateFormat YYYY-MM-DD`,
|
|
|
289
280
|
n.from,
|
|
290
281
|
n.to
|
|
291
282
|
];
|
|
292
|
-
},
|
|
293
|
-
const t = new
|
|
283
|
+
}, _ = (e) => {
|
|
284
|
+
const t = new z();
|
|
294
285
|
return (n) => (t.get(e.state) ? e.dispatch({ effects: t.reconfigure(n) }) : e.dispatch({
|
|
295
286
|
effects: _e.appendConfig.of(t.of(n))
|
|
296
287
|
}), !0);
|
|
@@ -379,7 +370,7 @@ class vo {
|
|
|
379
370
|
}), this.view.focus();
|
|
380
371
|
} catch (s) {
|
|
381
372
|
if (s.message === "The input text is too long")
|
|
382
|
-
b.emit(n,
|
|
373
|
+
b.emit(n, j, {
|
|
383
374
|
name: "overlength",
|
|
384
375
|
message: s.message,
|
|
385
376
|
data: t
|
|
@@ -389,7 +380,7 @@ class vo {
|
|
|
389
380
|
}
|
|
390
381
|
}
|
|
391
382
|
constructor(t) {
|
|
392
|
-
this.view = t, this.toggleTabSize =
|
|
383
|
+
this.view = t, this.toggleTabSize = _(this.view), this.togglePlaceholder = _(this.view), this.setExtensions = _(this.view), this.toggleDisabled = _(this.view), this.toggleReadOnly = _(this.view), this.toggleMaxlength = _(this.view);
|
|
393
384
|
}
|
|
394
385
|
/**
|
|
395
386
|
* 设置tabSize
|
|
@@ -398,7 +389,7 @@ class vo {
|
|
|
398
389
|
*/
|
|
399
390
|
setTabSize(t) {
|
|
400
391
|
this.toggleTabSize([
|
|
401
|
-
|
|
392
|
+
se.tabSize.of(t),
|
|
402
393
|
Yt.of(" ".repeat(t))
|
|
403
394
|
]);
|
|
404
395
|
}
|
|
@@ -408,7 +399,7 @@ class vo {
|
|
|
408
399
|
* @param t 目标内容
|
|
409
400
|
*/
|
|
410
401
|
setPlaceholder(t) {
|
|
411
|
-
this.togglePlaceholder(
|
|
402
|
+
this.togglePlaceholder(Pt(t));
|
|
412
403
|
}
|
|
413
404
|
focus(t) {
|
|
414
405
|
if (this.view.focus(), !t)
|
|
@@ -426,21 +417,21 @@ class vo {
|
|
|
426
417
|
}
|
|
427
418
|
this.view.dispatch({
|
|
428
419
|
scrollIntoView: !0,
|
|
429
|
-
selection:
|
|
430
|
-
[
|
|
420
|
+
selection: q.create(
|
|
421
|
+
[q.range(o, n), q.cursor(i)],
|
|
431
422
|
1
|
|
432
423
|
)
|
|
433
424
|
});
|
|
434
425
|
}
|
|
435
426
|
setDisabled(t) {
|
|
436
|
-
this.toggleDisabled([
|
|
427
|
+
this.toggleDisabled([R.editable.of(!t)]);
|
|
437
428
|
}
|
|
438
429
|
setReadOnly(t) {
|
|
439
|
-
this.toggleReadOnly([
|
|
430
|
+
this.toggleReadOnly([se.readOnly.of(t)]);
|
|
440
431
|
}
|
|
441
432
|
setMaxLength(t) {
|
|
442
433
|
this.maxLength = t, this.toggleMaxlength([
|
|
443
|
-
|
|
434
|
+
se.changeFilter.of((o) => o.newDoc.length <= t)
|
|
444
435
|
]);
|
|
445
436
|
}
|
|
446
437
|
}
|
|
@@ -455,17 +446,17 @@ const go = (e, t) => {
|
|
|
455
446
|
I([t], () => {
|
|
456
447
|
(!o.value || !go(o.value, t.value)) && (o.value = t.value, e());
|
|
457
448
|
});
|
|
458
|
-
},
|
|
449
|
+
}, le = (e, t, o, n, i) => (s, c, u, m) => {
|
|
459
450
|
const g = `${e}${t}${o}${n}`, v = u + c.label.length + (i === "title" ? o.length : 0);
|
|
460
451
|
s.dispatch({
|
|
461
452
|
changes: { from: u, to: m, insert: g },
|
|
462
|
-
selection:
|
|
453
|
+
selection: q.create(
|
|
463
454
|
[
|
|
464
|
-
|
|
455
|
+
q.range(
|
|
465
456
|
u + c.label.length + (i === "title" ? 1 : -t.length),
|
|
466
457
|
v
|
|
467
458
|
),
|
|
468
|
-
|
|
459
|
+
q.cursor(v)
|
|
469
460
|
],
|
|
470
461
|
1
|
|
471
462
|
)
|
|
@@ -508,7 +499,7 @@ const go = (e, t) => {
|
|
|
508
499
|
].map((i) => ({
|
|
509
500
|
label: `${i[0]}${i[1]}`,
|
|
510
501
|
type: "text",
|
|
511
|
-
apply:
|
|
502
|
+
apply: le(i[0], i[1], "", i[0] === "`" ? "`" : "\n```", "type")
|
|
512
503
|
})),
|
|
513
504
|
// 链接
|
|
514
505
|
{
|
|
@@ -533,12 +524,12 @@ const go = (e, t) => {
|
|
|
533
524
|
{
|
|
534
525
|
label: "$",
|
|
535
526
|
type: "text",
|
|
536
|
-
apply:
|
|
527
|
+
apply: le("$", "", "", "$", "type")
|
|
537
528
|
},
|
|
538
529
|
{
|
|
539
530
|
label: "$$",
|
|
540
531
|
type: "text",
|
|
541
|
-
apply:
|
|
532
|
+
apply: le("$$", "", `
|
|
542
533
|
`, `
|
|
543
534
|
$$`, "title")
|
|
544
535
|
},
|
|
@@ -563,7 +554,7 @@ $$`, "title")
|
|
|
563
554
|
].map((i) => ({
|
|
564
555
|
label: `!!! ${i}`,
|
|
565
556
|
type: "text",
|
|
566
|
-
apply:
|
|
557
|
+
apply: le("!!!", ` ${i}`, " Title", `
|
|
567
558
|
|
|
568
559
|
!!!`, "title")
|
|
569
560
|
}))
|
|
@@ -573,14 +564,14 @@ $$`, "title")
|
|
|
573
564
|
return Zt({
|
|
574
565
|
override: e ? [t, ...e] : [t]
|
|
575
566
|
});
|
|
576
|
-
}, fo = /* @__PURE__ */
|
|
567
|
+
}, fo = /* @__PURE__ */ w({
|
|
577
568
|
name: `${a}-divider`,
|
|
578
569
|
setup() {
|
|
579
570
|
return () => l("div", {
|
|
580
571
|
class: `${a}-divider`
|
|
581
572
|
}, null);
|
|
582
573
|
}
|
|
583
|
-
}), po = /* @__PURE__ */
|
|
574
|
+
}), po = /* @__PURE__ */ w({
|
|
584
575
|
name: "ToolbarBold",
|
|
585
576
|
setup() {
|
|
586
577
|
const e = r("editorId"), t = r("usedLanguageText"), o = r("disabled"), n = r("showToolbarName");
|
|
@@ -590,14 +581,15 @@ $$`, "title")
|
|
|
590
581
|
disabled: o?.value,
|
|
591
582
|
onClick: () => {
|
|
592
583
|
b.emit(e, f, "bold");
|
|
593
|
-
}
|
|
584
|
+
},
|
|
585
|
+
type: "button"
|
|
594
586
|
}, [l($, {
|
|
595
587
|
name: "bold"
|
|
596
588
|
}, null), n?.value && l("div", {
|
|
597
589
|
class: `${a}-toolbar-item-name`
|
|
598
590
|
}, [t.value.toolbarTips?.bold])]);
|
|
599
591
|
}
|
|
600
|
-
}), To = /* @__PURE__ */
|
|
592
|
+
}), To = /* @__PURE__ */ w({
|
|
601
593
|
name: "ToolbarCatalog",
|
|
602
594
|
setup() {
|
|
603
595
|
const e = r("editorId"), t = r("usedLanguageText"), o = r("disabled"), n = r("showToolbarName"), i = r("catalogVisible");
|
|
@@ -608,14 +600,15 @@ $$`, "title")
|
|
|
608
600
|
onClick: () => {
|
|
609
601
|
b.emit(e, Ut);
|
|
610
602
|
},
|
|
611
|
-
key: "bar-catalog"
|
|
603
|
+
key: "bar-catalog",
|
|
604
|
+
type: "button"
|
|
612
605
|
}, [l($, {
|
|
613
606
|
name: "catalog"
|
|
614
607
|
}, null), n?.value && l("div", {
|
|
615
608
|
class: `${a}-toolbar-item-name`
|
|
616
609
|
}, [t.value.toolbarTips?.catalog])]);
|
|
617
610
|
}
|
|
618
|
-
}), wo = /* @__PURE__ */
|
|
611
|
+
}), wo = /* @__PURE__ */ w({
|
|
619
612
|
name: "ToolbarCode",
|
|
620
613
|
setup() {
|
|
621
614
|
const e = r("editorId"), t = r("usedLanguageText"), o = r("disabled"), n = r("showToolbarName");
|
|
@@ -625,14 +618,15 @@ $$`, "title")
|
|
|
625
618
|
disabled: o?.value,
|
|
626
619
|
onClick: () => {
|
|
627
620
|
b.emit(e, f, "code");
|
|
628
|
-
}
|
|
621
|
+
},
|
|
622
|
+
type: "button"
|
|
629
623
|
}, [l($, {
|
|
630
624
|
name: "code"
|
|
631
625
|
}, null), n?.value && l("div", {
|
|
632
626
|
class: `${a}-toolbar-item-name`
|
|
633
627
|
}, [t.value.toolbarTips?.code])]);
|
|
634
628
|
}
|
|
635
|
-
}), yo = /* @__PURE__ */
|
|
629
|
+
}), yo = /* @__PURE__ */ w({
|
|
636
630
|
name: "ToolbarCodeRow",
|
|
637
631
|
setup() {
|
|
638
632
|
const e = r("editorId"), t = r("usedLanguageText"), o = r("disabled"), n = r("showToolbarName");
|
|
@@ -642,14 +636,15 @@ $$`, "title")
|
|
|
642
636
|
disabled: o?.value,
|
|
643
637
|
onClick: () => {
|
|
644
638
|
b.emit(e, f, "codeRow");
|
|
645
|
-
}
|
|
639
|
+
},
|
|
640
|
+
type: "button"
|
|
646
641
|
}, [l($, {
|
|
647
642
|
name: "code-row"
|
|
648
643
|
}, null), n?.value && l("div", {
|
|
649
644
|
class: `${a}-toolbar-item-name`
|
|
650
645
|
}, [t.value.toolbarTips?.codeRow])]);
|
|
651
646
|
}
|
|
652
|
-
}), Co = /* @__PURE__ */
|
|
647
|
+
}), Co = /* @__PURE__ */ w({
|
|
653
648
|
name: "ToolbarFullscreen",
|
|
654
649
|
setup() {
|
|
655
650
|
const e = r("usedLanguageText"), t = r("disabled"), o = r("showToolbarName"), n = r("setting"), {
|
|
@@ -661,14 +656,15 @@ $$`, "title")
|
|
|
661
656
|
disabled: t?.value,
|
|
662
657
|
onClick: () => {
|
|
663
658
|
i();
|
|
664
|
-
}
|
|
659
|
+
},
|
|
660
|
+
type: "button"
|
|
665
661
|
}, [l($, {
|
|
666
662
|
name: n.value.fullscreen ? "fullscreen-exit" : "fullscreen"
|
|
667
663
|
}, null), o?.value && l("div", {
|
|
668
664
|
class: `${a}-toolbar-item-name`
|
|
669
665
|
}, [e.value.toolbarTips?.fullscreen])]);
|
|
670
666
|
}
|
|
671
|
-
}), ko = /* @__PURE__ */
|
|
667
|
+
}), ko = /* @__PURE__ */ w({
|
|
672
668
|
name: "ToolbarGithub",
|
|
673
669
|
setup() {
|
|
674
670
|
const e = r("usedLanguageText"), t = r("disabled"), o = r("showToolbarName");
|
|
@@ -678,14 +674,15 @@ $$`, "title")
|
|
|
678
674
|
disabled: t?.value,
|
|
679
675
|
onClick: () => {
|
|
680
676
|
St("https://github.com/imzbf/md-editor-v3");
|
|
681
|
-
}
|
|
677
|
+
},
|
|
678
|
+
type: "button"
|
|
682
679
|
}, [l($, {
|
|
683
680
|
name: "github"
|
|
684
681
|
}, null), o?.value && l("div", {
|
|
685
682
|
class: `${a}-toolbar-item-name`
|
|
686
683
|
}, [e.value.toolbarTips?.github])]);
|
|
687
684
|
}
|
|
688
|
-
}), $o = /* @__PURE__ */
|
|
685
|
+
}), $o = /* @__PURE__ */ w({
|
|
689
686
|
name: "ToolbarHtmlPreview",
|
|
690
687
|
setup() {
|
|
691
688
|
const e = r("usedLanguageText"), t = r("disabled"), o = r("showToolbarName"), n = r("setting"), i = r("updateSetting");
|
|
@@ -695,14 +692,15 @@ $$`, "title")
|
|
|
695
692
|
disabled: t?.value,
|
|
696
693
|
onClick: () => {
|
|
697
694
|
i("htmlPreview");
|
|
698
|
-
}
|
|
695
|
+
},
|
|
696
|
+
type: "button"
|
|
699
697
|
}, [l($, {
|
|
700
698
|
name: "preview-html"
|
|
701
699
|
}, null), o?.value && l("div", {
|
|
702
700
|
class: `${a}-toolbar-item-name`
|
|
703
701
|
}, [e.value.toolbarTips?.htmlPreview])]);
|
|
704
702
|
}
|
|
705
|
-
}), xo = /* @__PURE__ */
|
|
703
|
+
}), xo = /* @__PURE__ */ w({
|
|
706
704
|
name: "ToolbarImage",
|
|
707
705
|
setup() {
|
|
708
706
|
const e = r("editorId"), t = r("usedLanguageText"), o = r("disabled"), n = r("showToolbarName");
|
|
@@ -712,7 +710,8 @@ $$`, "title")
|
|
|
712
710
|
disabled: o?.value,
|
|
713
711
|
onClick: () => {
|
|
714
712
|
b.emit(e, f, "image");
|
|
715
|
-
}
|
|
713
|
+
},
|
|
714
|
+
type: "button"
|
|
716
715
|
}, [l($, {
|
|
717
716
|
name: "image"
|
|
718
717
|
}, null), n?.value && l("div", {
|
|
@@ -734,13 +733,13 @@ $$`, "title")
|
|
|
734
733
|
default: () => {
|
|
735
734
|
}
|
|
736
735
|
}
|
|
737
|
-
}, Io = /* @__PURE__ */
|
|
736
|
+
}, Io = /* @__PURE__ */ w({
|
|
738
737
|
name: `${a}-modal-clip`,
|
|
739
738
|
props: So,
|
|
740
739
|
setup(e) {
|
|
741
740
|
const t = r("usedLanguageText"), o = r("editorId"), n = r("rootRef");
|
|
742
|
-
let i =
|
|
743
|
-
const s = x(), c = x(), u = x(), m =
|
|
741
|
+
let i = G.editorExtensions.cropper.instance;
|
|
742
|
+
const s = x(), c = x(), u = x(), m = U({
|
|
744
743
|
cropperInited: !1,
|
|
745
744
|
imgSelected: !1,
|
|
746
745
|
imgSrc: "",
|
|
@@ -751,24 +750,24 @@ $$`, "title")
|
|
|
751
750
|
I(() => e.visible, () => {
|
|
752
751
|
e.visible && !m.cropperInited && (i = i || window.Cropper, s.value.onchange = () => {
|
|
753
752
|
if (!i) {
|
|
754
|
-
b.emit(o,
|
|
753
|
+
b.emit(o, j, {
|
|
755
754
|
name: "Cropper",
|
|
756
755
|
message: "Cropper is undefined"
|
|
757
756
|
});
|
|
758
757
|
return;
|
|
759
758
|
}
|
|
760
|
-
const
|
|
761
|
-
if (m.imgSelected = !0,
|
|
762
|
-
const
|
|
763
|
-
|
|
764
|
-
m.imgSrc =
|
|
765
|
-
},
|
|
759
|
+
const p = s.value.files || [];
|
|
760
|
+
if (m.imgSelected = !0, p?.length > 0) {
|
|
761
|
+
const y = new FileReader();
|
|
762
|
+
y.onload = (C) => {
|
|
763
|
+
m.imgSrc = C.target.result;
|
|
764
|
+
}, y.readAsDataURL(p[0]);
|
|
766
765
|
}
|
|
767
766
|
});
|
|
768
767
|
}), I(() => [m.imgSelected], () => {
|
|
769
768
|
u.value.style = "";
|
|
770
|
-
}), I([
|
|
771
|
-
m.imgSrc &&
|
|
769
|
+
}), I([ye(() => m.isFullscreen), ye(() => m.imgSrc)], () => {
|
|
770
|
+
m.imgSrc && ne(() => {
|
|
772
771
|
g?.destroy(), u.value.style = "", c.value && (g = new i(c.value, {
|
|
773
772
|
viewMode: 2,
|
|
774
773
|
preview: n.value.getRootNode().querySelector(`.${a}-clip-preview-target`)
|
|
@@ -786,8 +785,8 @@ $$`, "title")
|
|
|
786
785
|
onClose: e.onCancel,
|
|
787
786
|
showAdjust: !0,
|
|
788
787
|
isFullscreen: m.isFullscreen,
|
|
789
|
-
onAdjust: (
|
|
790
|
-
m.isFullscreen =
|
|
788
|
+
onAdjust: (p) => {
|
|
789
|
+
m.isFullscreen = p;
|
|
791
790
|
},
|
|
792
791
|
width: "668px",
|
|
793
792
|
height: "421px"
|
|
@@ -832,8 +831,8 @@ $$`, "title")
|
|
|
832
831
|
type: "button",
|
|
833
832
|
onClick: () => {
|
|
834
833
|
if (g) {
|
|
835
|
-
const
|
|
836
|
-
b.emit(o,
|
|
834
|
+
const p = g.getCroppedCanvas();
|
|
835
|
+
b.emit(o, ge, [Qt(p.toDataURL("image/png"))], e.onOk), v();
|
|
837
836
|
}
|
|
838
837
|
}
|
|
839
838
|
}, [t.value.clipModalTips?.buttonUpload || t.value.linkModalTips?.buttonOK])]), l("input", {
|
|
@@ -863,7 +862,7 @@ $$`, "title")
|
|
|
863
862
|
default: () => {
|
|
864
863
|
}
|
|
865
864
|
}
|
|
866
|
-
}, Eo = /* @__PURE__ */
|
|
865
|
+
}, Eo = /* @__PURE__ */ w({
|
|
867
866
|
name: `${a}-modals`,
|
|
868
867
|
props: Lo,
|
|
869
868
|
setup(e) {
|
|
@@ -873,13 +872,13 @@ $$`, "title")
|
|
|
873
872
|
onCancel: e.onCancel
|
|
874
873
|
}, null);
|
|
875
874
|
}
|
|
876
|
-
}), No = /* @__PURE__ */
|
|
875
|
+
}), No = /* @__PURE__ */ w({
|
|
877
876
|
name: "ToolbarImageDropdown",
|
|
878
877
|
setup() {
|
|
879
878
|
const e = r("editorId"), t = r("usedLanguageText"), o = r("disabled"), n = r("showToolbarName"), i = `${e}-toolbar-wrapper`, s = x(!1), c = x(!1), u = x(), m = () => {
|
|
880
|
-
b.emit(e,
|
|
881
|
-
}, g = (v,
|
|
882
|
-
o?.value || b.emit(e, f, v,
|
|
879
|
+
b.emit(e, ge, Array.from(u.value.files || [])), u.value.value = "";
|
|
880
|
+
}, g = (v, p) => {
|
|
881
|
+
o?.value || b.emit(e, f, v, p);
|
|
883
882
|
};
|
|
884
883
|
return W(() => {
|
|
885
884
|
u.value.addEventListener("change", m);
|
|
@@ -898,7 +897,7 @@ $$`, "title")
|
|
|
898
897
|
style: {
|
|
899
898
|
display: "none"
|
|
900
899
|
}
|
|
901
|
-
}, null), l(
|
|
900
|
+
}, null), l(J, {
|
|
902
901
|
relative: `#${i}`,
|
|
903
902
|
visible: s.value,
|
|
904
903
|
onChange: (v) => {
|
|
@@ -937,7 +936,8 @@ $$`, "title")
|
|
|
937
936
|
default: () => [l("button", {
|
|
938
937
|
class: [`${a}-toolbar-item`, o?.value && `${a}-disabled`],
|
|
939
938
|
title: t.value.toolbarTips?.image,
|
|
940
|
-
disabled: o?.value
|
|
939
|
+
disabled: o?.value,
|
|
940
|
+
type: "button"
|
|
941
941
|
}, [l($, {
|
|
942
942
|
name: "image"
|
|
943
943
|
}, null), n?.value && l("div", {
|
|
@@ -957,7 +957,7 @@ $$`, "title")
|
|
|
957
957
|
}
|
|
958
958
|
}, null)]);
|
|
959
959
|
}
|
|
960
|
-
}), Ao = /* @__PURE__ */
|
|
960
|
+
}), Ao = /* @__PURE__ */ w({
|
|
961
961
|
name: "ToolbarItalic",
|
|
962
962
|
setup() {
|
|
963
963
|
const e = r("editorId"), t = r("usedLanguageText"), o = r("disabled"), n = r("showToolbarName");
|
|
@@ -967,20 +967,21 @@ $$`, "title")
|
|
|
967
967
|
disabled: o?.value,
|
|
968
968
|
onClick: () => {
|
|
969
969
|
b.emit(e, f, "italic");
|
|
970
|
-
}
|
|
970
|
+
},
|
|
971
|
+
type: "button"
|
|
971
972
|
}, [l($, {
|
|
972
973
|
name: "italic"
|
|
973
974
|
}, null), n?.value && l("div", {
|
|
974
975
|
class: `${a}-toolbar-item-name`
|
|
975
976
|
}, [t.value.toolbarTips?.italic])]);
|
|
976
977
|
}
|
|
977
|
-
}), Do = /* @__PURE__ */
|
|
978
|
+
}), Do = /* @__PURE__ */ w({
|
|
978
979
|
name: "ToolbarKatex",
|
|
979
980
|
setup() {
|
|
980
981
|
const e = r("editorId"), t = r("usedLanguageText"), o = r("disabled"), n = r("showToolbarName"), i = `${e}-toolbar-wrapper`, s = x(!1), c = (u) => {
|
|
981
982
|
o?.value || b.emit(e, f, u);
|
|
982
983
|
};
|
|
983
|
-
return () => l(
|
|
984
|
+
return () => l(J, {
|
|
984
985
|
relative: `#${i}`,
|
|
985
986
|
visible: s.value,
|
|
986
987
|
onChange: (u) => {
|
|
@@ -1013,7 +1014,8 @@ $$`, "title")
|
|
|
1013
1014
|
default: () => [l("button", {
|
|
1014
1015
|
class: [`${a}-toolbar-item`, o?.value && `${a}-disabled`],
|
|
1015
1016
|
title: t.value.toolbarTips?.katex,
|
|
1016
|
-
disabled: o?.value
|
|
1017
|
+
disabled: o?.value,
|
|
1018
|
+
type: "button"
|
|
1017
1019
|
}, [l($, {
|
|
1018
1020
|
name: "formula"
|
|
1019
1021
|
}, null), n?.value && l("div", {
|
|
@@ -1021,7 +1023,7 @@ $$`, "title")
|
|
|
1021
1023
|
}, [t.value.toolbarTips?.katex])])]
|
|
1022
1024
|
});
|
|
1023
1025
|
}
|
|
1024
|
-
}), Mo = /* @__PURE__ */
|
|
1026
|
+
}), Mo = /* @__PURE__ */ w({
|
|
1025
1027
|
name: "ToolbarLink",
|
|
1026
1028
|
setup() {
|
|
1027
1029
|
const e = r("editorId"), t = r("usedLanguageText"), o = r("disabled"), n = r("showToolbarName");
|
|
@@ -1031,20 +1033,21 @@ $$`, "title")
|
|
|
1031
1033
|
disabled: o?.value,
|
|
1032
1034
|
onClick: () => {
|
|
1033
1035
|
b.emit(e, f, "link");
|
|
1034
|
-
}
|
|
1036
|
+
},
|
|
1037
|
+
type: "button"
|
|
1035
1038
|
}, [l($, {
|
|
1036
1039
|
name: "link"
|
|
1037
1040
|
}, null), n?.value && l("div", {
|
|
1038
1041
|
class: `${a}-toolbar-item-name`
|
|
1039
1042
|
}, [t.value.toolbarTips?.link])]);
|
|
1040
1043
|
}
|
|
1041
|
-
}), Ro = /* @__PURE__ */
|
|
1044
|
+
}), Ro = /* @__PURE__ */ w({
|
|
1042
1045
|
name: "ToolbarMermaid",
|
|
1043
1046
|
setup() {
|
|
1044
1047
|
const e = r("editorId"), t = r("usedLanguageText"), o = r("disabled"), n = r("showToolbarName"), i = `${e}-toolbar-wrapper`, s = x(!1), c = (u) => {
|
|
1045
1048
|
o?.value || b.emit(e, f, u);
|
|
1046
1049
|
};
|
|
1047
|
-
return () => l(
|
|
1050
|
+
return () => l(J, {
|
|
1048
1051
|
relative: `#${i}`,
|
|
1049
1052
|
visible: s.value,
|
|
1050
1053
|
onChange: (u) => {
|
|
@@ -1119,7 +1122,8 @@ $$`, "title")
|
|
|
1119
1122
|
default: () => [l("button", {
|
|
1120
1123
|
class: [`${a}-toolbar-item`, o?.value && `${a}-disabled`],
|
|
1121
1124
|
title: t.value.toolbarTips?.mermaid,
|
|
1122
|
-
disabled: o?.value
|
|
1125
|
+
disabled: o?.value,
|
|
1126
|
+
type: "button"
|
|
1123
1127
|
}, [l($, {
|
|
1124
1128
|
name: "mermaid"
|
|
1125
1129
|
}, null), n?.value && l("div", {
|
|
@@ -1127,7 +1131,7 @@ $$`, "title")
|
|
|
1127
1131
|
}, [t.value.toolbarTips?.mermaid])])]
|
|
1128
1132
|
});
|
|
1129
1133
|
}
|
|
1130
|
-
}), Fo = /* @__PURE__ */
|
|
1134
|
+
}), Fo = /* @__PURE__ */ w({
|
|
1131
1135
|
name: "ToolbarNext",
|
|
1132
1136
|
setup() {
|
|
1133
1137
|
const e = r("editorId"), t = r("usedLanguageText"), o = r("disabled"), n = r("showToolbarName");
|
|
@@ -1137,14 +1141,15 @@ $$`, "title")
|
|
|
1137
1141
|
disabled: o?.value,
|
|
1138
1142
|
onClick: () => {
|
|
1139
1143
|
b.emit(e, Ue);
|
|
1140
|
-
}
|
|
1144
|
+
},
|
|
1145
|
+
type: "button"
|
|
1141
1146
|
}, [l($, {
|
|
1142
1147
|
name: "next"
|
|
1143
1148
|
}, null), n?.value && l("div", {
|
|
1144
1149
|
class: `${a}-toolbar-item-name`
|
|
1145
1150
|
}, [t.value.toolbarTips?.next])]);
|
|
1146
1151
|
}
|
|
1147
|
-
}), Bo = /* @__PURE__ */
|
|
1152
|
+
}), Bo = /* @__PURE__ */ w({
|
|
1148
1153
|
name: "ToolbarOrderedList",
|
|
1149
1154
|
setup() {
|
|
1150
1155
|
const e = r("editorId"), t = r("usedLanguageText"), o = r("disabled"), n = r("showToolbarName");
|
|
@@ -1154,14 +1159,15 @@ $$`, "title")
|
|
|
1154
1159
|
disabled: o?.value,
|
|
1155
1160
|
onClick: () => {
|
|
1156
1161
|
b.emit(e, f, "orderedList");
|
|
1157
|
-
}
|
|
1162
|
+
},
|
|
1163
|
+
type: "button"
|
|
1158
1164
|
}, [l($, {
|
|
1159
1165
|
name: "ordered-list"
|
|
1160
1166
|
}, null), n?.value && l("div", {
|
|
1161
1167
|
class: `${a}-toolbar-item-name`
|
|
1162
1168
|
}, [t.value.toolbarTips?.orderedList])]);
|
|
1163
1169
|
}
|
|
1164
|
-
}),
|
|
1170
|
+
}), Ho = /* @__PURE__ */ w({
|
|
1165
1171
|
name: "ToolbarPageFullscreen",
|
|
1166
1172
|
setup() {
|
|
1167
1173
|
const e = r("usedLanguageText"), t = r("disabled"), o = r("showToolbarName"), n = r("setting"), i = r("updateSetting");
|
|
@@ -1171,14 +1177,15 @@ $$`, "title")
|
|
|
1171
1177
|
disabled: t?.value,
|
|
1172
1178
|
onClick: () => {
|
|
1173
1179
|
i("pageFullscreen");
|
|
1174
|
-
}
|
|
1180
|
+
},
|
|
1181
|
+
type: "button"
|
|
1175
1182
|
}, [l($, {
|
|
1176
1183
|
name: n.value.pageFullscreen ? "minimize" : "maximize"
|
|
1177
1184
|
}, null), o?.value && l("div", {
|
|
1178
1185
|
class: `${a}-toolbar-item-name`
|
|
1179
1186
|
}, [e.value.toolbarTips?.pageFullscreen])]);
|
|
1180
1187
|
}
|
|
1181
|
-
}),
|
|
1188
|
+
}), Po = /* @__PURE__ */ w({
|
|
1182
1189
|
name: "ToolbarPrettier",
|
|
1183
1190
|
setup() {
|
|
1184
1191
|
const e = r("editorId"), t = r("usedLanguageText"), o = r("disabled"), n = r("showToolbarName");
|
|
@@ -1188,14 +1195,15 @@ $$`, "title")
|
|
|
1188
1195
|
disabled: o?.value,
|
|
1189
1196
|
onClick: () => {
|
|
1190
1197
|
b.emit(e, f, "prettier");
|
|
1191
|
-
}
|
|
1198
|
+
},
|
|
1199
|
+
type: "button"
|
|
1192
1200
|
}, [l($, {
|
|
1193
1201
|
name: "prettier"
|
|
1194
1202
|
}, null), n?.value && l("div", {
|
|
1195
1203
|
class: `${a}-toolbar-item-name`
|
|
1196
1204
|
}, [t.value.toolbarTips?.prettier])]);
|
|
1197
1205
|
}
|
|
1198
|
-
}), Oo = /* @__PURE__ */
|
|
1206
|
+
}), Oo = /* @__PURE__ */ w({
|
|
1199
1207
|
name: "ToolbarPreview",
|
|
1200
1208
|
setup() {
|
|
1201
1209
|
const e = r("usedLanguageText"), t = r("disabled"), o = r("showToolbarName"), n = r("setting"), i = r("updateSetting");
|
|
@@ -1205,14 +1213,15 @@ $$`, "title")
|
|
|
1205
1213
|
disabled: t?.value,
|
|
1206
1214
|
onClick: () => {
|
|
1207
1215
|
i("preview");
|
|
1208
|
-
}
|
|
1216
|
+
},
|
|
1217
|
+
type: "button"
|
|
1209
1218
|
}, [l($, {
|
|
1210
1219
|
name: "preview"
|
|
1211
1220
|
}, null), o?.value && l("div", {
|
|
1212
1221
|
class: `${a}-toolbar-item-name`
|
|
1213
1222
|
}, [e.value.toolbarTips?.preview])]);
|
|
1214
1223
|
}
|
|
1215
|
-
}), Vo = /* @__PURE__ */
|
|
1224
|
+
}), Vo = /* @__PURE__ */ w({
|
|
1216
1225
|
name: "ToolbarPreviewOnly",
|
|
1217
1226
|
setup() {
|
|
1218
1227
|
const e = r("usedLanguageText"), t = r("disabled"), o = r("showToolbarName"), n = r("setting"), i = r("updateSetting");
|
|
@@ -1222,14 +1231,15 @@ $$`, "title")
|
|
|
1222
1231
|
disabled: t?.value,
|
|
1223
1232
|
onClick: () => {
|
|
1224
1233
|
i("previewOnly");
|
|
1225
|
-
}
|
|
1234
|
+
},
|
|
1235
|
+
type: "button"
|
|
1226
1236
|
}, [l($, {
|
|
1227
1237
|
name: "preview-only"
|
|
1228
1238
|
}, null), o?.value && l("div", {
|
|
1229
1239
|
class: `${a}-toolbar-item-name`
|
|
1230
1240
|
}, [e.value.toolbarTips?.previewOnly])]);
|
|
1231
1241
|
}
|
|
1232
|
-
}), Wo = /* @__PURE__ */
|
|
1242
|
+
}), Wo = /* @__PURE__ */ w({
|
|
1233
1243
|
name: "ToolbarQuote",
|
|
1234
1244
|
setup() {
|
|
1235
1245
|
const e = r("editorId"), t = r("usedLanguageText"), o = r("disabled"), n = r("showToolbarName");
|
|
@@ -1239,14 +1249,15 @@ $$`, "title")
|
|
|
1239
1249
|
disabled: o?.value,
|
|
1240
1250
|
onClick: () => {
|
|
1241
1251
|
b.emit(e, f, "quote");
|
|
1242
|
-
}
|
|
1252
|
+
},
|
|
1253
|
+
type: "button"
|
|
1243
1254
|
}, [l($, {
|
|
1244
1255
|
name: "quote"
|
|
1245
1256
|
}, null), n?.value && l("div", {
|
|
1246
1257
|
class: `${a}-toolbar-item-name`
|
|
1247
1258
|
}, [t.value.toolbarTips?.quote])]);
|
|
1248
1259
|
}
|
|
1249
|
-
}), _o = /* @__PURE__ */
|
|
1260
|
+
}), _o = /* @__PURE__ */ w({
|
|
1250
1261
|
name: "ToolbarRevoke",
|
|
1251
1262
|
setup() {
|
|
1252
1263
|
const e = r("editorId"), t = r("usedLanguageText"), o = r("disabled"), n = r("showToolbarName");
|
|
@@ -1256,14 +1267,15 @@ $$`, "title")
|
|
|
1256
1267
|
disabled: o?.value,
|
|
1257
1268
|
onClick: () => {
|
|
1258
1269
|
b.emit(e, qe);
|
|
1259
|
-
}
|
|
1270
|
+
},
|
|
1271
|
+
type: "button"
|
|
1260
1272
|
}, [l($, {
|
|
1261
1273
|
name: "revoke"
|
|
1262
1274
|
}, null), n?.value && l("div", {
|
|
1263
1275
|
class: `${a}-toolbar-item-name`
|
|
1264
1276
|
}, [t.value.toolbarTips?.revoke])]);
|
|
1265
1277
|
}
|
|
1266
|
-
}), zo = /* @__PURE__ */
|
|
1278
|
+
}), zo = /* @__PURE__ */ w({
|
|
1267
1279
|
name: "ToolbarSave",
|
|
1268
1280
|
setup() {
|
|
1269
1281
|
const e = r("editorId"), t = r("usedLanguageText"), o = r("disabled"), n = r("showToolbarName");
|
|
@@ -1273,14 +1285,15 @@ $$`, "title")
|
|
|
1273
1285
|
disabled: o?.value,
|
|
1274
1286
|
onClick: () => {
|
|
1275
1287
|
b.emit(e, Ke);
|
|
1276
|
-
}
|
|
1288
|
+
},
|
|
1289
|
+
type: "button"
|
|
1277
1290
|
}, [l($, {
|
|
1278
1291
|
name: "save"
|
|
1279
1292
|
}, null), n?.value && l("div", {
|
|
1280
1293
|
class: `${a}-toolbar-item-name`
|
|
1281
1294
|
}, [t.value.toolbarTips?.save])]);
|
|
1282
1295
|
}
|
|
1283
|
-
}), Uo = /* @__PURE__ */
|
|
1296
|
+
}), Uo = /* @__PURE__ */ w({
|
|
1284
1297
|
name: "ToolbarStrikeThrough",
|
|
1285
1298
|
setup() {
|
|
1286
1299
|
const e = r("editorId"), t = r("usedLanguageText"), o = r("disabled"), n = r("showToolbarName");
|
|
@@ -1290,14 +1303,15 @@ $$`, "title")
|
|
|
1290
1303
|
disabled: o?.value,
|
|
1291
1304
|
onClick: () => {
|
|
1292
1305
|
b.emit(e, f, "strikeThrough");
|
|
1293
|
-
}
|
|
1306
|
+
},
|
|
1307
|
+
type: "button"
|
|
1294
1308
|
}, [l($, {
|
|
1295
1309
|
name: "strike-through"
|
|
1296
1310
|
}, null), n?.value && l("div", {
|
|
1297
1311
|
class: `${a}-toolbar-item-name`
|
|
1298
1312
|
}, [t.value.toolbarTips?.strikeThrough])]);
|
|
1299
1313
|
}
|
|
1300
|
-
}), qo = /* @__PURE__ */
|
|
1314
|
+
}), qo = /* @__PURE__ */ w({
|
|
1301
1315
|
name: "ToolbarSub",
|
|
1302
1316
|
setup() {
|
|
1303
1317
|
const e = r("editorId"), t = r("usedLanguageText"), o = r("disabled"), n = r("showToolbarName");
|
|
@@ -1307,14 +1321,15 @@ $$`, "title")
|
|
|
1307
1321
|
disabled: o?.value,
|
|
1308
1322
|
onClick: () => {
|
|
1309
1323
|
b.emit(e, f, "sub");
|
|
1310
|
-
}
|
|
1324
|
+
},
|
|
1325
|
+
type: "button"
|
|
1311
1326
|
}, [l($, {
|
|
1312
1327
|
name: "sub"
|
|
1313
1328
|
}, null), n?.value && l("div", {
|
|
1314
1329
|
class: `${a}-toolbar-item-name`
|
|
1315
1330
|
}, [t.value.toolbarTips?.sub])]);
|
|
1316
1331
|
}
|
|
1317
|
-
}), Ko = /* @__PURE__ */
|
|
1332
|
+
}), Ko = /* @__PURE__ */ w({
|
|
1318
1333
|
name: "ToolbarSup",
|
|
1319
1334
|
setup() {
|
|
1320
1335
|
const e = r("editorId"), t = r("usedLanguageText"), o = r("disabled"), n = r("showToolbarName");
|
|
@@ -1324,7 +1339,8 @@ $$`, "title")
|
|
|
1324
1339
|
disabled: o?.value,
|
|
1325
1340
|
onClick: () => {
|
|
1326
1341
|
b.emit(e, f, "sup");
|
|
1327
|
-
}
|
|
1342
|
+
},
|
|
1343
|
+
type: "button"
|
|
1328
1344
|
}, [l($, {
|
|
1329
1345
|
name: "sup"
|
|
1330
1346
|
}, null), n?.value && l("div", {
|
|
@@ -1341,14 +1357,14 @@ $$`, "title")
|
|
|
1341
1357
|
default: () => {
|
|
1342
1358
|
}
|
|
1343
1359
|
}
|
|
1344
|
-
}, jo = /* @__PURE__ */
|
|
1360
|
+
}, jo = /* @__PURE__ */ w({
|
|
1345
1361
|
name: "TableShape",
|
|
1346
1362
|
props: Go,
|
|
1347
1363
|
setup(e) {
|
|
1348
|
-
const t =
|
|
1364
|
+
const t = U({
|
|
1349
1365
|
x: -1,
|
|
1350
1366
|
y: -1
|
|
1351
|
-
}), o =
|
|
1367
|
+
}), o = K(() => JSON.stringify(e.tableShape)), n = () => {
|
|
1352
1368
|
const s = [...JSON.parse(o.value)];
|
|
1353
1369
|
return (!s[2] || s[2] < s[0]) && (s[2] = s[0]), (!s[3] || s[3] < s[3]) && (s[3] = s[1]), s;
|
|
1354
1370
|
}, i = x(n());
|
|
@@ -1375,11 +1391,11 @@ $$`, "title")
|
|
|
1375
1391
|
class: [`${a}-table-shape-col-default`, c <= t.x && m <= t.y && `${a}-table-shape-col-include`]
|
|
1376
1392
|
}, null)]))]))]);
|
|
1377
1393
|
}
|
|
1378
|
-
}), Yo = /* @__PURE__ */
|
|
1394
|
+
}), Yo = /* @__PURE__ */ w({
|
|
1379
1395
|
name: "ToolbarTable",
|
|
1380
1396
|
setup() {
|
|
1381
1397
|
const e = r("editorId"), t = r("usedLanguageText"), o = r("disabled"), n = r("showToolbarName"), i = r("tableShape"), s = `${e}-toolbar-wrapper`, c = x(!1);
|
|
1382
|
-
return () => l(
|
|
1398
|
+
return () => l(J, {
|
|
1383
1399
|
relative: `#${s}`,
|
|
1384
1400
|
visible: c.value,
|
|
1385
1401
|
onChange: (u) => {
|
|
@@ -1399,7 +1415,8 @@ $$`, "title")
|
|
|
1399
1415
|
default: () => [l("button", {
|
|
1400
1416
|
class: [`${a}-toolbar-item`, o?.value && `${a}-disabled`],
|
|
1401
1417
|
title: t.value.toolbarTips?.table,
|
|
1402
|
-
disabled: o?.value
|
|
1418
|
+
disabled: o?.value,
|
|
1419
|
+
type: "button"
|
|
1403
1420
|
}, [l($, {
|
|
1404
1421
|
name: "table"
|
|
1405
1422
|
}, null), n?.value && l("div", {
|
|
@@ -1407,7 +1424,7 @@ $$`, "title")
|
|
|
1407
1424
|
}, [t.value.toolbarTips?.table])])]
|
|
1408
1425
|
});
|
|
1409
1426
|
}
|
|
1410
|
-
}), Zo = /* @__PURE__ */
|
|
1427
|
+
}), Zo = /* @__PURE__ */ w({
|
|
1411
1428
|
name: "ToolbarTask",
|
|
1412
1429
|
setup() {
|
|
1413
1430
|
const e = r("editorId"), t = r("usedLanguageText"), o = r("disabled"), n = r("showToolbarName");
|
|
@@ -1417,20 +1434,21 @@ $$`, "title")
|
|
|
1417
1434
|
disabled: o?.value,
|
|
1418
1435
|
onClick: () => {
|
|
1419
1436
|
b.emit(e, f, "task");
|
|
1420
|
-
}
|
|
1437
|
+
},
|
|
1438
|
+
type: "button"
|
|
1421
1439
|
}, [l($, {
|
|
1422
1440
|
name: "task"
|
|
1423
1441
|
}, null), n?.value && l("div", {
|
|
1424
1442
|
class: `${a}-toolbar-item-name`
|
|
1425
1443
|
}, [t.value.toolbarTips?.task])]);
|
|
1426
1444
|
}
|
|
1427
|
-
}), Xo = /* @__PURE__ */
|
|
1445
|
+
}), Xo = /* @__PURE__ */ w({
|
|
1428
1446
|
name: "ToolbarTitle",
|
|
1429
1447
|
setup() {
|
|
1430
1448
|
const e = r("editorId"), t = r("usedLanguageText"), o = r("disabled"), n = r("showToolbarName"), i = `${e}-toolbar-wrapper`, s = x(!1), c = (u) => {
|
|
1431
1449
|
o?.value || b.emit(e, f, u);
|
|
1432
1450
|
};
|
|
1433
|
-
return () => l(
|
|
1451
|
+
return () => l(J, {
|
|
1434
1452
|
relative: `#${i}`,
|
|
1435
1453
|
visible: s.value,
|
|
1436
1454
|
onChange: (u) => {
|
|
@@ -1490,7 +1508,8 @@ $$`, "title")
|
|
|
1490
1508
|
default: () => [l("button", {
|
|
1491
1509
|
class: [`${a}-toolbar-item`, o?.value && `${a}-disabled`],
|
|
1492
1510
|
disabled: o?.value,
|
|
1493
|
-
title: t.value.toolbarTips?.title
|
|
1511
|
+
title: t.value.toolbarTips?.title,
|
|
1512
|
+
type: "button"
|
|
1494
1513
|
}, [l($, {
|
|
1495
1514
|
name: "title"
|
|
1496
1515
|
}, null), n?.value && l("div", {
|
|
@@ -1498,7 +1517,7 @@ $$`, "title")
|
|
|
1498
1517
|
}, [t.value.toolbarTips?.title])])]
|
|
1499
1518
|
});
|
|
1500
1519
|
}
|
|
1501
|
-
}), Jo = /* @__PURE__ */
|
|
1520
|
+
}), Jo = /* @__PURE__ */ w({
|
|
1502
1521
|
name: "ToolbarUnderline",
|
|
1503
1522
|
setup() {
|
|
1504
1523
|
const e = r("editorId"), t = r("usedLanguageText"), o = r("disabled"), n = r("showToolbarName");
|
|
@@ -1508,14 +1527,15 @@ $$`, "title")
|
|
|
1508
1527
|
disabled: o?.value,
|
|
1509
1528
|
onClick: () => {
|
|
1510
1529
|
b.emit(e, f, "underline");
|
|
1511
|
-
}
|
|
1530
|
+
},
|
|
1531
|
+
type: "button"
|
|
1512
1532
|
}, [l($, {
|
|
1513
1533
|
name: "underline"
|
|
1514
1534
|
}, null), n?.value && l("div", {
|
|
1515
1535
|
class: `${a}-toolbar-item-name`
|
|
1516
1536
|
}, [t.value.toolbarTips?.underline])]);
|
|
1517
1537
|
}
|
|
1518
|
-
}), Qo = /* @__PURE__ */
|
|
1538
|
+
}), Qo = /* @__PURE__ */ w({
|
|
1519
1539
|
name: "ToolbarUnorderedList",
|
|
1520
1540
|
setup() {
|
|
1521
1541
|
const e = r("editorId"), t = r("usedLanguageText"), o = r("disabled"), n = r("showToolbarName");
|
|
@@ -1525,7 +1545,8 @@ $$`, "title")
|
|
|
1525
1545
|
disabled: o?.value,
|
|
1526
1546
|
onClick: () => {
|
|
1527
1547
|
b.emit(e, f, "unorderedList");
|
|
1528
|
-
}
|
|
1548
|
+
},
|
|
1549
|
+
type: "button"
|
|
1529
1550
|
}, [l($, {
|
|
1530
1551
|
name: "unordered-list"
|
|
1531
1552
|
}, null), n?.value && l("div", {
|
|
@@ -1536,11 +1557,11 @@ $$`, "title")
|
|
|
1536
1557
|
const e = r("editorId"), t = r("setting"), o = r("updateSetting"), {
|
|
1537
1558
|
editorExtensions: n,
|
|
1538
1559
|
editorExtensionsAttrs: i
|
|
1539
|
-
} =
|
|
1560
|
+
} = G;
|
|
1540
1561
|
let s = n.screenfull.instance;
|
|
1541
1562
|
const c = x(!1), u = (v) => {
|
|
1542
1563
|
if (!s) {
|
|
1543
|
-
b.emit(e,
|
|
1564
|
+
b.emit(e, j, {
|
|
1544
1565
|
name: "fullscreen",
|
|
1545
1566
|
message: "fullscreen is undefined"
|
|
1546
1567
|
});
|
|
@@ -1574,9 +1595,9 @@ let tl = 0;
|
|
|
1574
1595
|
const Ye = () => {
|
|
1575
1596
|
const e = r("editorId"), t = r("theme"), o = r("previewTheme"), n = r("language"), i = r("disabled"), s = r("noUploadImg"), c = r("noPrettier"), u = r("codeTheme"), m = r("showToolbarName"), g = r("setting"), v = r("defToolbars");
|
|
1576
1597
|
return {
|
|
1577
|
-
barRender: (
|
|
1578
|
-
if (kt.includes(
|
|
1579
|
-
switch (
|
|
1598
|
+
barRender: (y) => {
|
|
1599
|
+
if (kt.includes(y))
|
|
1600
|
+
switch (y) {
|
|
1580
1601
|
case "-":
|
|
1581
1602
|
return l(fo, {
|
|
1582
1603
|
key: `bar-${tl++}`
|
|
@@ -1660,11 +1681,11 @@ const Ye = () => {
|
|
|
1660
1681
|
key: "bar-save"
|
|
1661
1682
|
}, null);
|
|
1662
1683
|
case "prettier":
|
|
1663
|
-
return c && l(
|
|
1684
|
+
return c && l(Po, {
|
|
1664
1685
|
key: "bar-prettier"
|
|
1665
1686
|
}, null);
|
|
1666
1687
|
case "pageFullscreen":
|
|
1667
|
-
return !g.value.fullscreen && l(
|
|
1688
|
+
return !g.value.fullscreen && l(Ho, {
|
|
1668
1689
|
key: "bar-pageFullscreen"
|
|
1669
1690
|
}, null);
|
|
1670
1691
|
case "fullscreen":
|
|
@@ -1701,14 +1722,14 @@ const Ye = () => {
|
|
|
1701
1722
|
}, null);
|
|
1702
1723
|
}
|
|
1703
1724
|
else if (v.value instanceof Array) {
|
|
1704
|
-
const
|
|
1705
|
-
return
|
|
1706
|
-
theme:
|
|
1707
|
-
previewTheme:
|
|
1708
|
-
language:
|
|
1709
|
-
codeTheme:
|
|
1710
|
-
disabled:
|
|
1711
|
-
showToolbarName:
|
|
1725
|
+
const C = v.value[y];
|
|
1726
|
+
return C ? ae(C, {
|
|
1727
|
+
theme: C.props?.theme || t.value,
|
|
1728
|
+
previewTheme: C.props?.theme || o.value,
|
|
1729
|
+
language: C.props?.theme || n.value,
|
|
1730
|
+
codeTheme: C.props?.codeTheme || u.value,
|
|
1731
|
+
disabled: C.props?.disabled || i.value,
|
|
1732
|
+
showToolbarName: C.props?.showToolbarName || m.value,
|
|
1712
1733
|
insert(L) {
|
|
1713
1734
|
b.emit(e, f, "universal", {
|
|
1714
1735
|
generate: L
|
|
@@ -1716,14 +1737,14 @@ const Ye = () => {
|
|
|
1716
1737
|
}
|
|
1717
1738
|
}) : "";
|
|
1718
1739
|
} else if (v.value?.children instanceof Array) {
|
|
1719
|
-
const
|
|
1720
|
-
return
|
|
1721
|
-
theme:
|
|
1722
|
-
previewTheme:
|
|
1723
|
-
language:
|
|
1724
|
-
codeTheme:
|
|
1725
|
-
disabled:
|
|
1726
|
-
showToolbarName:
|
|
1740
|
+
const C = v.value.children[y];
|
|
1741
|
+
return C ? ae(C, {
|
|
1742
|
+
theme: C.props?.theme || t.value,
|
|
1743
|
+
previewTheme: C.props?.theme || o.value,
|
|
1744
|
+
language: C.props?.theme || n.value,
|
|
1745
|
+
codeTheme: C.props?.codeTheme || u.value,
|
|
1746
|
+
disabled: C.props?.disabled || i.value,
|
|
1747
|
+
showToolbarName: C.props?.showToolbarName || m.value,
|
|
1727
1748
|
insert(L) {
|
|
1728
1749
|
b.emit(e, f, "universal", {
|
|
1729
1750
|
generate: L
|
|
@@ -1734,7 +1755,7 @@ const Ye = () => {
|
|
|
1734
1755
|
return "";
|
|
1735
1756
|
}
|
|
1736
1757
|
};
|
|
1737
|
-
}, ol = /* @__PURE__ */
|
|
1758
|
+
}, ol = /* @__PURE__ */ w({
|
|
1738
1759
|
name: "FloatingToolbar",
|
|
1739
1760
|
setup() {
|
|
1740
1761
|
const e = r("floatingToolbars"), {
|
|
@@ -1744,19 +1765,19 @@ const Ye = () => {
|
|
|
1744
1765
|
class: `${a}-floating-toolbar`
|
|
1745
1766
|
}, [e.value.map((o) => t(o))]);
|
|
1746
1767
|
}
|
|
1747
|
-
}),
|
|
1768
|
+
}), be = _e.define(), ll = ze.define({
|
|
1748
1769
|
create() {
|
|
1749
1770
|
return null;
|
|
1750
1771
|
},
|
|
1751
1772
|
update(e, t) {
|
|
1752
|
-
for (const o of t.effects) o.is(
|
|
1773
|
+
for (const o of t.effects) o.is(be) && (e = o.value);
|
|
1753
1774
|
return e;
|
|
1754
1775
|
},
|
|
1755
1776
|
provide: (e) => Ot.from(e)
|
|
1756
1777
|
}), al = (e) => {
|
|
1757
1778
|
const t = (n, i) => {
|
|
1758
1779
|
n.dispatch({
|
|
1759
|
-
effects:
|
|
1780
|
+
effects: be.of({
|
|
1760
1781
|
pos: i,
|
|
1761
1782
|
above: !0,
|
|
1762
1783
|
arrow: !0,
|
|
@@ -1768,22 +1789,22 @@ const Ye = () => {
|
|
|
1768
1789
|
}
|
|
1769
1790
|
})
|
|
1770
1791
|
});
|
|
1771
|
-
}, o =
|
|
1792
|
+
}, o = R.updateListener.of((n) => {
|
|
1772
1793
|
if (n.selectionSet || n.docChanged) {
|
|
1773
1794
|
const i = n.state, s = i.selection.main;
|
|
1774
1795
|
if (!s.empty)
|
|
1775
1796
|
t(n.view, s.from);
|
|
1776
1797
|
else {
|
|
1777
1798
|
const c = s.head, u = i.doc.lineAt(c);
|
|
1778
|
-
/^\s*$/.test(u.text) ? t(n.view, c) : n.view.dispatch({ effects:
|
|
1799
|
+
/^\s*$/.test(u.text) ? t(n.view, c) : n.view.dispatch({ effects: be.of(null) });
|
|
1779
1800
|
}
|
|
1780
1801
|
}
|
|
1781
1802
|
});
|
|
1782
1803
|
return [ll, o];
|
|
1783
|
-
}, nl = "#e5c07b", Ie = "var(--md-color)", rl = "#56b6c2", sl = "#fff",
|
|
1804
|
+
}, nl = "#e5c07b", Ie = "var(--md-color)", rl = "#56b6c2", sl = "#fff", Z = "#3f4a54", Le = "#2d8cf0", il = "#2d8cf0", cl = "#3f4a54", Ee = "#d19a66", ul = "#c678dd", dl = "#f6f6f6", ml = "#ceedfa33", Ne = "var(--md-bk-color)", ce = "var(--md-bk-color)", bl = "#bad5fa", Ae = "#3f4a54", vl = R.theme(
|
|
1784
1805
|
{
|
|
1785
1806
|
"&": {
|
|
1786
|
-
color:
|
|
1807
|
+
color: Z,
|
|
1787
1808
|
backgroundColor: Ne
|
|
1788
1809
|
},
|
|
1789
1810
|
".cm-content": {
|
|
@@ -1791,7 +1812,7 @@ const Ye = () => {
|
|
|
1791
1812
|
},
|
|
1792
1813
|
".cm-cursor, .cm-dropCursor": { borderLeftColor: Ae },
|
|
1793
1814
|
"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection": { backgroundColor: bl },
|
|
1794
|
-
".cm-panels": { backgroundColor: dl, color:
|
|
1815
|
+
".cm-panels": { backgroundColor: dl, color: Z },
|
|
1795
1816
|
".cm-panels.cm-panels-top": { borderBottom: "1px solid var(--md-border-color)" },
|
|
1796
1817
|
".cm-panels.cm-panels-bottom": { borderTop: "1px solid var(--md-border-color)" },
|
|
1797
1818
|
".cm-searchMatch": {
|
|
@@ -1808,7 +1829,7 @@ const Ye = () => {
|
|
|
1808
1829
|
},
|
|
1809
1830
|
".cm-gutters": {
|
|
1810
1831
|
backgroundColor: Ne,
|
|
1811
|
-
color:
|
|
1832
|
+
color: Z,
|
|
1812
1833
|
borderRight: "1px solid",
|
|
1813
1834
|
borderColor: "var(--md-border-color)"
|
|
1814
1835
|
},
|
|
@@ -1822,7 +1843,7 @@ const Ye = () => {
|
|
|
1822
1843
|
},
|
|
1823
1844
|
".cm-tooltip": {
|
|
1824
1845
|
border: "1px solid var(--md-border-color)",
|
|
1825
|
-
backgroundColor:
|
|
1846
|
+
backgroundColor: ce
|
|
1826
1847
|
},
|
|
1827
1848
|
".cm-tooltip .cm-tooltip-arrow:before": {
|
|
1828
1849
|
borderTopColor: "var(--md-border-color)",
|
|
@@ -1830,12 +1851,12 @@ const Ye = () => {
|
|
|
1830
1851
|
borderBottomColor: "var(--md-border-color)"
|
|
1831
1852
|
},
|
|
1832
1853
|
".cm-tooltip .cm-tooltip-arrow:after": {
|
|
1833
|
-
borderTopColor:
|
|
1834
|
-
borderBottomColor:
|
|
1854
|
+
borderTopColor: ce,
|
|
1855
|
+
borderBottomColor: ce
|
|
1835
1856
|
},
|
|
1836
1857
|
".cm-tooltip-autocomplete": {
|
|
1837
1858
|
"& > ul > li[aria-selected]": {
|
|
1838
|
-
color:
|
|
1859
|
+
color: Z
|
|
1839
1860
|
}
|
|
1840
1861
|
}
|
|
1841
1862
|
}
|
|
@@ -1845,7 +1866,7 @@ const Ye = () => {
|
|
|
1845
1866
|
{ tag: [d.name, d.deleted, d.character, d.propertyName, d.macroName], color: Ie },
|
|
1846
1867
|
{ tag: [d.function(d.variableName), d.labelName], color: il },
|
|
1847
1868
|
{ tag: [d.color, d.constant(d.name), d.standard(d.name)], color: Ee },
|
|
1848
|
-
{ tag: [d.definition(d.name), d.separator], color:
|
|
1869
|
+
{ tag: [d.definition(d.name), d.separator], color: Z },
|
|
1849
1870
|
{
|
|
1850
1871
|
tag: [
|
|
1851
1872
|
d.typeName,
|
|
@@ -1883,18 +1904,18 @@ const Ye = () => {
|
|
|
1883
1904
|
]), De = [
|
|
1884
1905
|
vl,
|
|
1885
1906
|
Ge(gl)
|
|
1886
|
-
], hl = "#e5c07b", Me = "var(--md-color)", fl = "#56b6c2", pl = "#ffffff",
|
|
1907
|
+
], hl = "#e5c07b", Me = "var(--md-color)", fl = "#56b6c2", pl = "#ffffff", X = "var(--md-color)", Re = "#e5c07b", Tl = "#e5c07b", wl = "var(--md-color)", Fe = "#d19a66", yl = "#c678dd", Cl = "#21252b", kl = "#2c313a", Be = "var(--md-bk-color)", ue = "var(--md-bk-color)", $l = "#ceedfa33", He = "#528bff", xl = R.theme(
|
|
1887
1908
|
{
|
|
1888
1909
|
"&": {
|
|
1889
|
-
color:
|
|
1910
|
+
color: X,
|
|
1890
1911
|
backgroundColor: Be
|
|
1891
1912
|
},
|
|
1892
1913
|
".cm-content": {
|
|
1893
|
-
caretColor:
|
|
1914
|
+
caretColor: He
|
|
1894
1915
|
},
|
|
1895
|
-
".cm-cursor, .cm-dropCursor": { borderLeftColor:
|
|
1916
|
+
".cm-cursor, .cm-dropCursor": { borderLeftColor: He },
|
|
1896
1917
|
"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection": { backgroundColor: $l },
|
|
1897
|
-
".cm-panels": { backgroundColor: Cl, color:
|
|
1918
|
+
".cm-panels": { backgroundColor: Cl, color: X },
|
|
1898
1919
|
".cm-panels.cm-panels-top": { borderBottom: "1px solid var(--md-border-color)" },
|
|
1899
1920
|
".cm-panels.cm-panels-bottom": { borderTop: "1px solid var(--md-border-color)" },
|
|
1900
1921
|
".cm-searchMatch": {
|
|
@@ -1911,7 +1932,7 @@ const Ye = () => {
|
|
|
1911
1932
|
},
|
|
1912
1933
|
".cm-gutters": {
|
|
1913
1934
|
backgroundColor: Be,
|
|
1914
|
-
color:
|
|
1935
|
+
color: X,
|
|
1915
1936
|
borderRight: "1px solid",
|
|
1916
1937
|
borderColor: "var(--md-border-color)"
|
|
1917
1938
|
},
|
|
@@ -1925,7 +1946,7 @@ const Ye = () => {
|
|
|
1925
1946
|
},
|
|
1926
1947
|
".cm-tooltip": {
|
|
1927
1948
|
border: "1px solid var(--md-border-color)",
|
|
1928
|
-
backgroundColor:
|
|
1949
|
+
backgroundColor: ue
|
|
1929
1950
|
},
|
|
1930
1951
|
".cm-tooltip .cm-tooltip-arrow:before": {
|
|
1931
1952
|
borderTopColor: "var(--md-border-color)",
|
|
@@ -1933,12 +1954,12 @@ const Ye = () => {
|
|
|
1933
1954
|
borderBottomColor: "var(--md-border-color)"
|
|
1934
1955
|
},
|
|
1935
1956
|
".cm-tooltip .cm-tooltip-arrow:after": {
|
|
1936
|
-
borderTopColor:
|
|
1937
|
-
borderBottomColor:
|
|
1957
|
+
borderTopColor: ue,
|
|
1958
|
+
borderBottomColor: ue
|
|
1938
1959
|
},
|
|
1939
1960
|
".cm-tooltip-autocomplete": {
|
|
1940
1961
|
"& > ul > li[aria-selected]": {
|
|
1941
|
-
color:
|
|
1962
|
+
color: X
|
|
1942
1963
|
}
|
|
1943
1964
|
}
|
|
1944
1965
|
},
|
|
@@ -1948,7 +1969,7 @@ const Ye = () => {
|
|
|
1948
1969
|
{ tag: [d.name, d.deleted, d.character, d.propertyName, d.macroName], color: Me },
|
|
1949
1970
|
{ tag: [d.function(d.variableName), d.labelName], color: Tl },
|
|
1950
1971
|
{ tag: [d.color, d.constant(d.name), d.standard(d.name)], color: Fe },
|
|
1951
|
-
{ tag: [d.definition(d.name), d.separator], color:
|
|
1972
|
+
{ tag: [d.definition(d.name), d.separator], color: X },
|
|
1952
1973
|
{
|
|
1953
1974
|
tag: [
|
|
1954
1975
|
d.typeName,
|
|
@@ -1983,7 +2004,7 @@ const Ye = () => {
|
|
|
1983
2004
|
{ tag: [d.atom, d.bool, d.special(d.variableName)], color: Fe },
|
|
1984
2005
|
{ tag: [d.processingInstruction, d.string, d.inserted], color: wl },
|
|
1985
2006
|
{ tag: d.invalid, color: pl }
|
|
1986
|
-
]),
|
|
2007
|
+
]), Pe = [
|
|
1987
2008
|
xl,
|
|
1988
2009
|
Ge(Sl)
|
|
1989
2010
|
], Il = (e, t) => {
|
|
@@ -2010,41 +2031,41 @@ const Ye = () => {
|
|
|
2010
2031
|
if (!s.clipboardData)
|
|
2011
2032
|
return;
|
|
2012
2033
|
if (s.clipboardData.files.length > 0) {
|
|
2013
|
-
const { files:
|
|
2034
|
+
const { files: y } = s.clipboardData;
|
|
2014
2035
|
b.emit(
|
|
2015
2036
|
o,
|
|
2016
|
-
|
|
2017
|
-
Array.from(
|
|
2037
|
+
ge,
|
|
2038
|
+
Array.from(y).filter((C) => /image\/.*/.test(C.type))
|
|
2018
2039
|
), s.preventDefault();
|
|
2019
2040
|
return;
|
|
2020
2041
|
}
|
|
2021
|
-
const c = s.clipboardData.getData("text/plain"), u = t.value?.view.state.selection.main.to || 0, m = t.value?.view.state.doc.lineAt(u).from || 0, g = t.value?.view.state.doc.sliceString(m, u) || "", v = /!\[.*\]\(\s*$/.test(g),
|
|
2042
|
+
const c = s.clipboardData.getData("text/plain"), u = t.value?.view.state.selection.main.to || 0, m = t.value?.view.state.doc.lineAt(u).from || 0, g = t.value?.view.state.doc.sliceString(m, u) || "", v = /!\[.*\]\(\s*$/.test(g), p = /!\[.*\]\((.*)\s?.*\)/.test(c);
|
|
2022
2043
|
if (v) {
|
|
2023
|
-
const
|
|
2024
|
-
n(
|
|
2044
|
+
const y = e.transformImgUrl(c);
|
|
2045
|
+
n(y), s.preventDefault();
|
|
2025
2046
|
return;
|
|
2026
|
-
} else if (
|
|
2027
|
-
const
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
).then((
|
|
2047
|
+
} else if (p) {
|
|
2048
|
+
const y = c.match(new RegExp(`(?<=!\\[.*\\]\\()([^)\\s]+)(?=\\s?["']?.*["']?\\))`, "g"));
|
|
2049
|
+
y ? Promise.all(
|
|
2050
|
+
y.map((C) => e.transformImgUrl(C))
|
|
2051
|
+
).then((C) => {
|
|
2031
2052
|
n(
|
|
2032
|
-
|
|
2053
|
+
C.reduce((T, L, O) => T.replace(y[O], L), c)
|
|
2033
2054
|
);
|
|
2034
|
-
}).catch((
|
|
2035
|
-
console.error(
|
|
2055
|
+
}).catch((C) => {
|
|
2056
|
+
console.error(C);
|
|
2036
2057
|
}) : n(c), s.preventDefault();
|
|
2037
2058
|
return;
|
|
2038
2059
|
}
|
|
2039
2060
|
if (e.autoDetectCode && s.clipboardData.types.includes("vscode-editor-data")) {
|
|
2040
|
-
const
|
|
2061
|
+
const y = JSON.parse(s.clipboardData.getData("vscode-editor-data"));
|
|
2041
2062
|
b.emit(o, f, "code", {
|
|
2042
|
-
mode:
|
|
2063
|
+
mode: y.mode,
|
|
2043
2064
|
text: s.clipboardData.getData("text/plain")
|
|
2044
2065
|
}), s.preventDefault();
|
|
2045
2066
|
return;
|
|
2046
2067
|
}
|
|
2047
|
-
e.maxlength && c.length + e.modelValue.length > e.maxlength && b.emit(o,
|
|
2068
|
+
e.maxlength && c.length + e.modelValue.length > e.maxlength && b.emit(o, j, {
|
|
2048
2069
|
name: "overlength",
|
|
2049
2070
|
message: "The input text is too long",
|
|
2050
2071
|
data: c
|
|
@@ -2065,7 +2086,7 @@ const Ye = () => {
|
|
|
2065
2086
|
{
|
|
2066
2087
|
key: "Ctrl-s",
|
|
2067
2088
|
mac: "Cmd-s",
|
|
2068
|
-
run: (
|
|
2089
|
+
run: (D) => (b.emit(e, Ke, D.state.doc.toString()), !0),
|
|
2069
2090
|
shift: () => (b.emit(e, f, "strikeThrough"), !0)
|
|
2070
2091
|
},
|
|
2071
2092
|
{
|
|
@@ -2131,8 +2152,8 @@ const Ye = () => {
|
|
|
2131
2152
|
key: "Ctrl-c",
|
|
2132
2153
|
mac: "Cmd-c",
|
|
2133
2154
|
shift: () => (b.emit(e, f, "code"), !0),
|
|
2134
|
-
any(
|
|
2135
|
-
return (
|
|
2155
|
+
any(D, k) {
|
|
2156
|
+
return (k.ctrlKey || k.metaKey) && k.altKey && k.code === "KeyC" ? (b.emit(e, f, "codeRow"), !0) : !1;
|
|
2136
2157
|
}
|
|
2137
2158
|
},
|
|
2138
2159
|
{
|
|
@@ -2146,7 +2167,7 @@ const Ye = () => {
|
|
|
2146
2167
|
shift: () => t.noPrettier ? !1 : (b.emit(e, f, "prettier"), !0)
|
|
2147
2168
|
},
|
|
2148
2169
|
{
|
|
2149
|
-
any: (
|
|
2170
|
+
any: (D, k) => (k.ctrlKey || k.metaKey) && k.altKey && k.shiftKey && k.code === "KeyT" ? (b.emit(e, f, "table"), !0) : !1
|
|
2150
2171
|
},
|
|
2151
2172
|
...eo
|
|
2152
2173
|
], El = /[a-z][a-z0-9.+-]*:\/\/[^\s<>"'`()]+(?:\([^\s<>"'`]*\)[^\s<>"'`]*)*/i, Nl = /\/\/[^\s<>"'`()]+/i, Al = /data:[a-z]+\/[a-z0-9.+-]+(?:;base64)?,[a-z0-9+/=%]+/i, Dl = /\/(?!\/)[^\s<>"'`()]+/i, Ml = new RegExp(
|
|
@@ -2169,7 +2190,7 @@ const Ye = () => {
|
|
|
2169
2190
|
}
|
|
2170
2191
|
}
|
|
2171
2192
|
}, n = (s) => {
|
|
2172
|
-
const c = new
|
|
2193
|
+
const c = new Ht();
|
|
2173
2194
|
for (let u = 1; u <= s.doc.lines; u++) {
|
|
2174
2195
|
const m = s.doc.line(u);
|
|
2175
2196
|
o(m, c);
|
|
@@ -2195,87 +2216,87 @@ const Ye = () => {
|
|
|
2195
2216
|
update(s, c) {
|
|
2196
2217
|
return c.docChanged ? n(c.state) : s;
|
|
2197
2218
|
},
|
|
2198
|
-
provide: (s) =>
|
|
2219
|
+
provide: (s) => R.decorations.from(s)
|
|
2199
2220
|
});
|
|
2200
2221
|
};
|
|
2201
|
-
|
|
2222
|
+
R.EDIT_CONTEXT = !1;
|
|
2202
2223
|
const Ze = (e) => e.extension instanceof Function ? e.extension(e.options) : e.extension, Fl = (e) => {
|
|
2203
2224
|
const t = Ze(e);
|
|
2204
2225
|
return e.compartment ? e.compartment.of(t) : t;
|
|
2205
2226
|
}, Bl = (e) => {
|
|
2206
2227
|
const t = r("tabWidth"), o = r("editorId"), n = r("theme"), i = r("previewTheme"), s = r("language"), c = r(
|
|
2207
2228
|
"usedLanguageText"
|
|
2208
|
-
), u = r("disabled"), m = r("showToolbarName"), g = r("customIcon"), v = r("noUploadImg"),
|
|
2209
|
-
noPrettier:
|
|
2210
|
-
}),
|
|
2229
|
+
), u = r("disabled"), m = r("showToolbarName"), g = r("customIcon"), v = r("noUploadImg"), p = r("tableShape"), y = r("noPrettier"), C = r("codeTheme"), T = r("setting"), L = r("updateSetting"), O = r("catalogVisible"), N = r("defToolbars"), S = r("floatingToolbars"), A = r("rootRef"), D = x(), k = Ct(), V = x(!1), Q = new z(), ee = new z(), re = new z(), fe = new z(), Xe = new z(), Je = Ll(o, {
|
|
2230
|
+
noPrettier: y
|
|
2231
|
+
}), pe = () => [
|
|
2211
2232
|
...Je,
|
|
2212
2233
|
...Nt,
|
|
2213
2234
|
...At,
|
|
2214
2235
|
Dt
|
|
2215
|
-
],
|
|
2216
|
-
paste: Il(e,
|
|
2236
|
+
], te = {
|
|
2237
|
+
paste: Il(e, k),
|
|
2217
2238
|
blur: e.onBlur,
|
|
2218
2239
|
focus: e.onFocus,
|
|
2219
2240
|
drop: e.onDrop,
|
|
2220
2241
|
compositionstart: () => {
|
|
2221
|
-
|
|
2242
|
+
V.value = !0;
|
|
2222
2243
|
},
|
|
2223
|
-
compositionend: (h,
|
|
2224
|
-
|
|
2244
|
+
compositionend: (h, E) => {
|
|
2245
|
+
V.value = !1, e.updateModelValue(E.state.doc.toString());
|
|
2225
2246
|
},
|
|
2226
2247
|
input: (h) => {
|
|
2227
2248
|
e.onInput && e.onInput(h);
|
|
2228
|
-
const { data:
|
|
2229
|
-
e.maxlength && e.modelValue.length +
|
|
2249
|
+
const { data: E } = h;
|
|
2250
|
+
e.maxlength && e.modelValue.length + E.length > e.maxlength && b.emit(o, j, {
|
|
2230
2251
|
name: "overlength",
|
|
2231
2252
|
message: "The input text is too long",
|
|
2232
|
-
data:
|
|
2253
|
+
data: E
|
|
2233
2254
|
});
|
|
2234
2255
|
}
|
|
2235
2256
|
}, Qe = al({
|
|
2236
2257
|
privide(h) {
|
|
2237
|
-
h.provide("editorId", o), h.provide("theme", n), h.provide("previewTheme", i), h.provide("language", s), h.provide("disabled", u), h.provide("noUploadImg", v), h.provide("tableShape",
|
|
2258
|
+
h.provide("editorId", o), h.provide("theme", n), h.provide("previewTheme", i), h.provide("language", s), h.provide("disabled", u), h.provide("noUploadImg", v), h.provide("tableShape", p), h.provide("noPrettier", y), h.provide("codeTheme", C), h.provide("showToolbarName", m), h.provide("setting", T), h.provide("updateSetting", L), h.provide("usedLanguageText", c), h.provide("catalogVisible", O), h.provide("defToolbars", N), h.provide("tabWidth", t), h.provide("customIcon", g), h.provide("floatingToolbars", S), h.provide("rootRef", A);
|
|
2238
2259
|
}
|
|
2239
2260
|
}), et = [
|
|
2240
2261
|
{
|
|
2241
2262
|
type: "theme",
|
|
2242
|
-
extension: (h) => h.value === "light" ? De :
|
|
2243
|
-
compartment:
|
|
2263
|
+
extension: (h) => h.value === "light" ? De : Pe,
|
|
2264
|
+
compartment: Q,
|
|
2244
2265
|
options: {
|
|
2245
2266
|
theme: n
|
|
2246
2267
|
}
|
|
2247
2268
|
},
|
|
2248
2269
|
{
|
|
2249
2270
|
type: "updateListener",
|
|
2250
|
-
extension:
|
|
2251
|
-
h.docChanged && (e.onChange(h.state.doc.toString()),
|
|
2271
|
+
extension: R.updateListener.of((h) => {
|
|
2272
|
+
h.docChanged && (e.onChange(h.state.doc.toString()), V.value || e.updateModelValue(h.state.doc.toString()));
|
|
2252
2273
|
})
|
|
2253
2274
|
},
|
|
2254
2275
|
{
|
|
2255
2276
|
type: "domEventHandlers",
|
|
2256
|
-
extension:
|
|
2257
|
-
compartment:
|
|
2277
|
+
extension: R.domEventHandlers(te),
|
|
2278
|
+
compartment: fe
|
|
2258
2279
|
},
|
|
2259
2280
|
{
|
|
2260
2281
|
type: "completions",
|
|
2261
2282
|
extension: Se(e.completions),
|
|
2262
|
-
compartment:
|
|
2283
|
+
compartment: ee
|
|
2263
2284
|
},
|
|
2264
2285
|
{
|
|
2265
2286
|
type: "history",
|
|
2266
2287
|
extension: Ce(),
|
|
2267
|
-
compartment:
|
|
2288
|
+
compartment: re
|
|
2268
2289
|
}
|
|
2269
|
-
],
|
|
2290
|
+
], Te = G.codeMirrorExtensions(
|
|
2270
2291
|
[
|
|
2271
2292
|
// 横向换行
|
|
2272
2293
|
{
|
|
2273
2294
|
type: "lineWrapping",
|
|
2274
|
-
extension:
|
|
2295
|
+
extension: R.lineWrapping
|
|
2275
2296
|
},
|
|
2276
2297
|
{
|
|
2277
2298
|
type: "keymap",
|
|
2278
|
-
extension: _t.of(
|
|
2299
|
+
extension: _t.of(pe())
|
|
2279
2300
|
},
|
|
2280
2301
|
// 解决多行placeholder时,光标异常的情况
|
|
2281
2302
|
{
|
|
@@ -2302,17 +2323,17 @@ const Ze = (e) => e.extension instanceof Function ? e.extension(e.options) : e.e
|
|
|
2302
2323
|
{
|
|
2303
2324
|
editorId: o,
|
|
2304
2325
|
theme: n.value,
|
|
2305
|
-
keyBindings:
|
|
2326
|
+
keyBindings: pe()
|
|
2306
2327
|
}
|
|
2307
|
-
), tt = () => [...et, ...
|
|
2328
|
+
), tt = () => [...et, ...Te].map(Fl);
|
|
2308
2329
|
return W(() => {
|
|
2309
|
-
const h = new
|
|
2330
|
+
const h = new R({
|
|
2310
2331
|
doc: e.modelValue,
|
|
2311
|
-
parent:
|
|
2332
|
+
parent: D.value,
|
|
2312
2333
|
extensions: tt()
|
|
2313
|
-
}),
|
|
2314
|
-
|
|
2315
|
-
|
|
2334
|
+
}), E = new vo(h);
|
|
2335
|
+
k.value = E, setTimeout(() => {
|
|
2336
|
+
E.setTabSize(t), E.setDisabled(u.value), E.setReadOnly(e.readonly), e.placeholder && E.setPlaceholder(e.placeholder), typeof e.maxlength == "number" && E.setMaxLength(e.maxlength), e.autofocus && h.focus();
|
|
2316
2337
|
}, 0), b.on(o, {
|
|
2317
2338
|
name: qe,
|
|
2318
2339
|
callback() {
|
|
@@ -2325,58 +2346,58 @@ const Ze = (e) => e.extension instanceof Function ? e.extension(e.options) : e.e
|
|
|
2325
2346
|
}
|
|
2326
2347
|
}), b.on(o, {
|
|
2327
2348
|
name: f,
|
|
2328
|
-
async callback(
|
|
2329
|
-
if (
|
|
2330
|
-
const
|
|
2331
|
-
if (
|
|
2332
|
-
|
|
2333
|
-
const { text:
|
|
2334
|
-
|
|
2335
|
-
|
|
2336
|
-
{ ...
|
|
2349
|
+
async callback(F, M = {}) {
|
|
2350
|
+
if (F === "image" && M.transform) {
|
|
2351
|
+
const B = e.transformImgUrl(M.url);
|
|
2352
|
+
if (B instanceof Promise)
|
|
2353
|
+
B.then(async (P) => {
|
|
2354
|
+
const { text: H, options: Y } = await ie(
|
|
2355
|
+
F,
|
|
2356
|
+
k.value,
|
|
2357
|
+
{ ...M, url: P }
|
|
2337
2358
|
);
|
|
2338
|
-
|
|
2339
|
-
}).catch((
|
|
2340
|
-
console.error(
|
|
2359
|
+
k.value?.replaceSelectedText(H, Y, o);
|
|
2360
|
+
}).catch((P) => {
|
|
2361
|
+
console.error(P);
|
|
2341
2362
|
});
|
|
2342
2363
|
else {
|
|
2343
|
-
const { text:
|
|
2344
|
-
...
|
|
2345
|
-
url:
|
|
2364
|
+
const { text: P, options: H } = await ie(F, k.value, {
|
|
2365
|
+
...M,
|
|
2366
|
+
url: B
|
|
2346
2367
|
});
|
|
2347
|
-
|
|
2368
|
+
k.value?.replaceSelectedText(P, H, o);
|
|
2348
2369
|
}
|
|
2349
2370
|
} else {
|
|
2350
|
-
const { text:
|
|
2351
|
-
|
|
2352
|
-
|
|
2353
|
-
|
|
2371
|
+
const { text: B, options: P } = await ie(
|
|
2372
|
+
F,
|
|
2373
|
+
k.value,
|
|
2374
|
+
M
|
|
2354
2375
|
);
|
|
2355
|
-
|
|
2376
|
+
k.value?.replaceSelectedText(B, P, o);
|
|
2356
2377
|
}
|
|
2357
2378
|
}
|
|
2358
2379
|
}), b.on(o, {
|
|
2359
2380
|
name: Kt,
|
|
2360
|
-
callback: It((
|
|
2361
|
-
const
|
|
2362
|
-
for (const
|
|
2363
|
-
const
|
|
2364
|
-
|
|
2365
|
-
|
|
2366
|
-
} :
|
|
2381
|
+
callback: It((F) => {
|
|
2382
|
+
const M = { ...te }, B = Object.keys(te);
|
|
2383
|
+
for (const P in F) {
|
|
2384
|
+
const H = P;
|
|
2385
|
+
B.includes(H) ? M[H] = (Y, we) => {
|
|
2386
|
+
F[H](Y, we), Y.defaultPrevented || te[H](Y, we);
|
|
2387
|
+
} : M[H] = F[H];
|
|
2367
2388
|
}
|
|
2368
|
-
|
|
2369
|
-
effects:
|
|
2370
|
-
|
|
2389
|
+
k.value?.view.dispatch({
|
|
2390
|
+
effects: fe.reconfigure(
|
|
2391
|
+
R.domEventHandlers(M)
|
|
2371
2392
|
)
|
|
2372
2393
|
});
|
|
2373
2394
|
})
|
|
2374
2395
|
}), b.on(o, {
|
|
2375
2396
|
name: Gt,
|
|
2376
|
-
callback: (
|
|
2377
|
-
const
|
|
2397
|
+
callback: (F, M) => {
|
|
2398
|
+
const B = h.state.doc.line(F);
|
|
2378
2399
|
h.dispatch(
|
|
2379
|
-
h.state.update({ changes: { from:
|
|
2400
|
+
h.state.update({ changes: { from: B.from, to: B.to, insert: M } })
|
|
2380
2401
|
);
|
|
2381
2402
|
}
|
|
2382
2403
|
}), b.on(o, {
|
|
@@ -2388,103 +2409,103 @@ const Ze = (e) => e.extension instanceof Function ? e.extension(e.options) : e.e
|
|
|
2388
2409
|
}), I(
|
|
2389
2410
|
n,
|
|
2390
2411
|
() => {
|
|
2391
|
-
|
|
2392
|
-
effects:
|
|
2412
|
+
k.value?.view.dispatch({
|
|
2413
|
+
effects: Q.reconfigure(n.value === "light" ? De : Pe)
|
|
2393
2414
|
});
|
|
2394
2415
|
},
|
|
2395
2416
|
{ deep: !0 }
|
|
2396
2417
|
), I(
|
|
2397
2418
|
() => e.completions,
|
|
2398
2419
|
() => {
|
|
2399
|
-
|
|
2400
|
-
effects:
|
|
2420
|
+
k.value?.view.dispatch({
|
|
2421
|
+
effects: ee.reconfigure(Se(e.completions))
|
|
2401
2422
|
});
|
|
2402
2423
|
},
|
|
2403
2424
|
{ deep: !0 }
|
|
2404
2425
|
), I(
|
|
2405
2426
|
() => e.modelValue,
|
|
2406
2427
|
() => {
|
|
2407
|
-
|
|
2428
|
+
k.value?.getValue() !== e.modelValue && k.value?.setValue(e.modelValue);
|
|
2408
2429
|
}
|
|
2409
2430
|
), I(
|
|
2410
2431
|
() => e.placeholder,
|
|
2411
2432
|
() => {
|
|
2412
|
-
|
|
2433
|
+
k.value?.setPlaceholder(e.placeholder);
|
|
2413
2434
|
}
|
|
2414
2435
|
), I([u], () => {
|
|
2415
|
-
|
|
2436
|
+
k.value?.setDisabled(u.value);
|
|
2416
2437
|
}), I(
|
|
2417
2438
|
() => e.readonly,
|
|
2418
2439
|
() => {
|
|
2419
|
-
|
|
2440
|
+
k.value?.setDisabled(e.readonly);
|
|
2420
2441
|
}
|
|
2421
2442
|
), I(
|
|
2422
2443
|
() => e.maxlength,
|
|
2423
2444
|
() => {
|
|
2424
|
-
e.maxlength &&
|
|
2445
|
+
e.maxlength && k.value?.setMaxLength(e.maxlength);
|
|
2425
2446
|
}
|
|
2426
2447
|
), ho(() => {
|
|
2427
|
-
const h =
|
|
2428
|
-
(
|
|
2448
|
+
const h = Te.find(
|
|
2449
|
+
(E) => E.type === "floatingToolbar"
|
|
2429
2450
|
);
|
|
2430
|
-
h?.compartment && (S.value.length > 0 ?
|
|
2451
|
+
h?.compartment && (S.value.length > 0 ? k.value?.view.dispatch({
|
|
2431
2452
|
effects: h.compartment.reconfigure(
|
|
2432
2453
|
Ze(h)
|
|
2433
2454
|
)
|
|
2434
|
-
}) :
|
|
2455
|
+
}) : k.value?.view.dispatch({
|
|
2435
2456
|
effects: h.compartment.reconfigure([])
|
|
2436
2457
|
}));
|
|
2437
2458
|
}, S), {
|
|
2438
|
-
inputWrapperRef:
|
|
2439
|
-
codeMirrorUt:
|
|
2459
|
+
inputWrapperRef: D,
|
|
2460
|
+
codeMirrorUt: k,
|
|
2440
2461
|
resetHistory() {
|
|
2441
|
-
|
|
2462
|
+
k.value?.view.dispatch({ effects: re.reconfigure([]) }), k.value?.view.dispatch({ effects: re.reconfigure(Ce()) });
|
|
2442
2463
|
}
|
|
2443
2464
|
};
|
|
2444
|
-
},
|
|
2445
|
-
const n =
|
|
2446
|
-
resizedWidth:
|
|
2447
|
-
}),
|
|
2448
|
-
width:
|
|
2449
|
-
}),
|
|
2450
|
-
left:
|
|
2465
|
+
}, Hl = (e, t, o) => {
|
|
2466
|
+
const n = r("setting"), i = K(() => /px$/.test(`${e.inputBoxWidth}`) ? "50%" : e.inputBoxWidth), s = U({
|
|
2467
|
+
resizedWidth: i.value
|
|
2468
|
+
}), c = U({
|
|
2469
|
+
width: i.value
|
|
2470
|
+
}), u = U({
|
|
2471
|
+
left: i.value,
|
|
2451
2472
|
display: "initial"
|
|
2452
|
-
}),
|
|
2453
|
-
const
|
|
2454
|
-
let
|
|
2455
|
-
|
|
2456
|
-
const
|
|
2457
|
-
|
|
2458
|
-
},
|
|
2459
|
-
|
|
2460
|
-
},
|
|
2461
|
-
document.removeEventListener("mousemove",
|
|
2473
|
+
}), m = (p) => {
|
|
2474
|
+
const y = t.value?.offsetWidth || 0, C = t.value?.getBoundingClientRect().x || 0;
|
|
2475
|
+
let T = p.x - C;
|
|
2476
|
+
T / y < oe ? T = y * oe : T > y - y * oe && (T = y - y * oe);
|
|
2477
|
+
const L = `${T / y * 100}%`;
|
|
2478
|
+
c.width = L, u.left = L, s.resizedWidth = L, e.oninputBoxWidthChange?.(L);
|
|
2479
|
+
}, g = (p) => {
|
|
2480
|
+
p.target === o.value && document.addEventListener("mousemove", m);
|
|
2481
|
+
}, v = () => {
|
|
2482
|
+
document.removeEventListener("mousemove", m);
|
|
2462
2483
|
};
|
|
2463
2484
|
return I([o], () => {
|
|
2464
|
-
document.removeEventListener("mousedown",
|
|
2485
|
+
document.removeEventListener("mousedown", g), document.removeEventListener("mouseup", v), document.addEventListener("mousedown", g), document.addEventListener("mouseup", v);
|
|
2465
2486
|
}), W(() => {
|
|
2466
|
-
document.addEventListener("mousedown",
|
|
2467
|
-
}),
|
|
2468
|
-
document.removeEventListener("mousedown",
|
|
2469
|
-
}), I([
|
|
2470
|
-
|
|
2487
|
+
document.addEventListener("mousedown", g), document.addEventListener("mouseup", v);
|
|
2488
|
+
}), ve(() => {
|
|
2489
|
+
document.removeEventListener("mousedown", g), document.removeEventListener("mouseup", v);
|
|
2490
|
+
}), I([i], ([p]) => {
|
|
2491
|
+
s.resizedWidth = p, c.width = p, u.left = p;
|
|
2471
2492
|
}), I(
|
|
2472
2493
|
[
|
|
2473
|
-
|
|
2474
|
-
|
|
2475
|
-
|
|
2494
|
+
() => n.value.htmlPreview,
|
|
2495
|
+
() => n.value.preview,
|
|
2496
|
+
() => n.value.previewOnly
|
|
2476
2497
|
],
|
|
2477
2498
|
() => {
|
|
2478
|
-
|
|
2499
|
+
n.value.previewOnly ? (c.width = "0%", u.display = "none") : !n.value.htmlPreview && !n.value.preview ? (c.width = "100%", u.display = "none") : (c.width = s.resizedWidth, u.display = "initial");
|
|
2479
2500
|
},
|
|
2480
2501
|
{
|
|
2481
2502
|
immediate: !0
|
|
2482
2503
|
}
|
|
2483
2504
|
), {
|
|
2484
|
-
inputWrapperStyle:
|
|
2485
|
-
resizeOperateStyle:
|
|
2505
|
+
inputWrapperStyle: c,
|
|
2506
|
+
resizeOperateStyle: u
|
|
2486
2507
|
};
|
|
2487
|
-
},
|
|
2508
|
+
}, Pl = () => {
|
|
2488
2509
|
const e = r("editorId"), t = x(!0), o = We();
|
|
2489
2510
|
return {
|
|
2490
2511
|
onCatalogActive: (c, u) => {
|
|
@@ -2499,7 +2520,7 @@ const Ze = (e) => e.extension instanceof Function ? e.extension(e.options) : e.e
|
|
|
2499
2520
|
onMouseenter: () => t.value = !1,
|
|
2500
2521
|
onMouseleave: () => t.value = !0
|
|
2501
2522
|
};
|
|
2502
|
-
},
|
|
2523
|
+
}, de = /* @__PURE__ */ w({
|
|
2503
2524
|
name: `${$t}CustomScrollbar`,
|
|
2504
2525
|
props: {
|
|
2505
2526
|
id: {
|
|
@@ -2540,42 +2561,42 @@ const Ze = (e) => e.extension instanceof Function ? e.extension(e.options) : e.e
|
|
|
2540
2561
|
}) {
|
|
2541
2562
|
const o = x(null), n = x(null), i = x(null), s = x(null);
|
|
2542
2563
|
let c = null, u = null, m = !1, g = 0, v = 0;
|
|
2543
|
-
const
|
|
2564
|
+
const p = () => {
|
|
2544
2565
|
if (!n.value || !o.value || !i.value || !s.value) return;
|
|
2545
|
-
const S = o.value.clientHeight,
|
|
2546
|
-
if (
|
|
2566
|
+
const S = o.value.clientHeight, A = n.value.scrollHeight, D = n.value.scrollTop;
|
|
2567
|
+
if (A <= S) {
|
|
2547
2568
|
i.value.style.display = "none", e.alwaysShowTrack || (s.value.style.display = "none");
|
|
2548
2569
|
return;
|
|
2549
2570
|
} else
|
|
2550
2571
|
i.value.style.display = "block", s.value.style.display = "block";
|
|
2551
|
-
const
|
|
2552
|
-
i.value.style.height = `${
|
|
2553
|
-
},
|
|
2572
|
+
const k = S / A, V = Math.max(S * k, 20), Q = S - V, ee = Math.min(D * k, Q);
|
|
2573
|
+
i.value.style.height = `${V}px`, i.value.style.top = `${ee}px`;
|
|
2574
|
+
}, y = () => p(), C = (S) => {
|
|
2554
2575
|
m = !0, g = S.clientY, v = n.value.scrollTop, document.body.style.userSelect = "none";
|
|
2555
2576
|
}, T = (S) => {
|
|
2556
2577
|
if (!m || !n.value || !o.value) return;
|
|
2557
|
-
const
|
|
2558
|
-
n.value.scrollTop = v +
|
|
2578
|
+
const A = S.clientY - g, D = n.value.scrollHeight / o.value.clientHeight;
|
|
2579
|
+
n.value.scrollTop = v + A * D;
|
|
2559
2580
|
}, L = () => {
|
|
2560
2581
|
m = !1, document.body.style.userSelect = "";
|
|
2561
|
-
},
|
|
2562
|
-
n.value && n.value.removeEventListener("scroll",
|
|
2563
|
-
},
|
|
2582
|
+
}, O = (S) => {
|
|
2583
|
+
n.value && n.value.removeEventListener("scroll", y), n.value = S, n.value ? (n.value.addEventListener("scroll", y), p()) : s.value && !e.alwaysShowTrack && (s.value.style.display = "none");
|
|
2584
|
+
}, N = () => {
|
|
2564
2585
|
if (!o.value) return;
|
|
2565
2586
|
const S = e.scrollTarget ? o.value.querySelector(e.scrollTarget) : o.value.firstElementChild;
|
|
2566
|
-
|
|
2587
|
+
O(S);
|
|
2567
2588
|
};
|
|
2568
2589
|
return W(async () => {
|
|
2569
|
-
await
|
|
2590
|
+
await ne(), N(), c = new MutationObserver(() => {
|
|
2570
2591
|
u && cancelAnimationFrame(u), u = requestAnimationFrame(() => {
|
|
2571
|
-
|
|
2592
|
+
N();
|
|
2572
2593
|
});
|
|
2573
2594
|
}), c.observe(o.value, {
|
|
2574
2595
|
childList: !0,
|
|
2575
2596
|
subtree: !0
|
|
2576
|
-
}), window.addEventListener("resize",
|
|
2577
|
-
}),
|
|
2578
|
-
c?.disconnect(), n.value && n.value.removeEventListener("scroll",
|
|
2597
|
+
}), window.addEventListener("resize", p), i.value?.addEventListener("mousedown", C), document.addEventListener("mousemove", T), document.addEventListener("mouseup", L);
|
|
2598
|
+
}), ve(() => {
|
|
2599
|
+
c?.disconnect(), n.value && n.value.removeEventListener("scroll", y), window.removeEventListener("resize", p), i.value?.removeEventListener("mousedown", C), document.removeEventListener("mousemove", T), document.removeEventListener("mouseup", L);
|
|
2579
2600
|
}), () => l("div", {
|
|
2580
2601
|
id: e.id,
|
|
2581
2602
|
class: [`${a}-custom-scrollbar`, e.class],
|
|
@@ -2590,54 +2611,54 @@ const Ze = (e) => e.extension instanceof Function ? e.extension(e.options) : e.e
|
|
|
2590
2611
|
ref: i
|
|
2591
2612
|
}, null)])]);
|
|
2592
2613
|
}
|
|
2593
|
-
}), Ol = We(), Vl = /* @__PURE__ */
|
|
2614
|
+
}), Ol = We(), Vl = /* @__PURE__ */ w({
|
|
2594
2615
|
name: "MDEditorContent",
|
|
2595
2616
|
props: rt,
|
|
2596
2617
|
setup(e, t) {
|
|
2597
|
-
const o = r("editorId"), n = r("catalogVisible"), i = r("theme"), s =
|
|
2598
|
-
inputWrapperRef:
|
|
2599
|
-
codeMirrorUt:
|
|
2600
|
-
resetHistory:
|
|
2618
|
+
const o = r("editorId"), n = r("catalogVisible"), i = r("theme"), s = r("setting"), c = x(""), u = x(), m = x(), {
|
|
2619
|
+
inputWrapperRef: g,
|
|
2620
|
+
codeMirrorUt: v,
|
|
2621
|
+
resetHistory: p
|
|
2601
2622
|
} = Bl(e), {
|
|
2602
|
-
inputWrapperStyle:
|
|
2603
|
-
resizeOperateStyle:
|
|
2604
|
-
} =
|
|
2605
|
-
to(e,
|
|
2623
|
+
inputWrapperStyle: y,
|
|
2624
|
+
resizeOperateStyle: C
|
|
2625
|
+
} = Hl(e, u, m);
|
|
2626
|
+
to(e, c, v);
|
|
2606
2627
|
const {
|
|
2607
|
-
onCatalogActive:
|
|
2608
|
-
onMouseenter:
|
|
2609
|
-
onMouseleave:
|
|
2610
|
-
} =
|
|
2628
|
+
onCatalogActive: T,
|
|
2629
|
+
onMouseenter: L,
|
|
2630
|
+
onMouseleave: O
|
|
2631
|
+
} = Pl();
|
|
2611
2632
|
return t.expose({
|
|
2612
2633
|
getSelectedText() {
|
|
2613
|
-
return
|
|
2634
|
+
return v.value?.getSelectedText();
|
|
2614
2635
|
},
|
|
2615
|
-
focus(
|
|
2616
|
-
|
|
2636
|
+
focus(N) {
|
|
2637
|
+
v.value?.focus(N);
|
|
2617
2638
|
},
|
|
2618
|
-
resetHistory:
|
|
2639
|
+
resetHistory: p,
|
|
2619
2640
|
getEditorView() {
|
|
2620
|
-
return
|
|
2641
|
+
return v.value?.view;
|
|
2621
2642
|
}
|
|
2622
2643
|
}), () => l("div", {
|
|
2623
2644
|
class: `${a}-content`
|
|
2624
2645
|
}, [l("div", {
|
|
2625
2646
|
class: `${a}-content-wrapper`,
|
|
2626
|
-
ref:
|
|
2627
|
-
}, [l(
|
|
2647
|
+
ref: u
|
|
2648
|
+
}, [l(de, {
|
|
2628
2649
|
alwaysShowTrack: !0,
|
|
2629
2650
|
scrollTarget: `#${o} .cm-scroller`,
|
|
2630
|
-
style:
|
|
2651
|
+
style: y
|
|
2631
2652
|
}, {
|
|
2632
2653
|
default: () => [l("div", {
|
|
2633
2654
|
class: `${a}-input-wrapper`,
|
|
2634
|
-
ref:
|
|
2655
|
+
ref: g
|
|
2635
2656
|
}, null)]
|
|
2636
|
-
}), (
|
|
2657
|
+
}), (s.value.htmlPreview || s.value.preview) && l("div", {
|
|
2637
2658
|
class: `${a}-resize-operate`,
|
|
2638
|
-
style:
|
|
2639
|
-
ref:
|
|
2640
|
-
}, null), l(
|
|
2659
|
+
style: C,
|
|
2660
|
+
ref: m
|
|
2661
|
+
}, null), l(de, {
|
|
2641
2662
|
style: {
|
|
2642
2663
|
flex: 1
|
|
2643
2664
|
}
|
|
@@ -2645,9 +2666,8 @@ const Ze = (e) => e.extension instanceof Function ? e.extension(e.options) : e.e
|
|
|
2645
2666
|
default: () => [l(st, {
|
|
2646
2667
|
modelValue: e.modelValue,
|
|
2647
2668
|
onChange: e.onChange,
|
|
2648
|
-
|
|
2649
|
-
|
|
2650
|
-
s.value = E, e.onHtmlChanged(E);
|
|
2669
|
+
onHtmlChanged: (N) => {
|
|
2670
|
+
c.value = N, e.onHtmlChanged(N);
|
|
2651
2671
|
},
|
|
2652
2672
|
onGetCatalog: e.onGetCatalog,
|
|
2653
2673
|
mdHeadingId: e.mdHeadingId,
|
|
@@ -2662,10 +2682,10 @@ const Ze = (e) => e.extension instanceof Function ? e.extension(e.options) : e.e
|
|
|
2662
2682
|
autoFoldThreshold: e.autoFoldThreshold,
|
|
2663
2683
|
onRemount: e.onRemount
|
|
2664
2684
|
}, null)]
|
|
2665
|
-
})]), n.value && l(
|
|
2685
|
+
})]), n.value && l(de, {
|
|
2666
2686
|
class: `${a}-catalog-${e.catalogLayout}`,
|
|
2667
|
-
onMouseenter:
|
|
2668
|
-
onMouseleave:
|
|
2687
|
+
onMouseenter: L,
|
|
2688
|
+
onMouseleave: O
|
|
2669
2689
|
}, {
|
|
2670
2690
|
default: () => [l(Oe, {
|
|
2671
2691
|
theme: i.value,
|
|
@@ -2674,23 +2694,23 @@ const Ze = (e) => e.extension instanceof Function ? e.extension(e.options) : e.e
|
|
|
2674
2694
|
mdHeadingId: e.mdHeadingId,
|
|
2675
2695
|
key: "internal-catalog",
|
|
2676
2696
|
scrollElementOffsetTop: 2,
|
|
2677
|
-
syncWith:
|
|
2678
|
-
onClick: (
|
|
2679
|
-
if (!
|
|
2680
|
-
|
|
2681
|
-
const
|
|
2682
|
-
if (
|
|
2683
|
-
const
|
|
2684
|
-
Ol(
|
|
2697
|
+
syncWith: s.value.preview ? "preview" : "editor",
|
|
2698
|
+
onClick: (N, S) => {
|
|
2699
|
+
if (!s.value.preview && S.line !== void 0) {
|
|
2700
|
+
N.preventDefault();
|
|
2701
|
+
const A = v.value?.view;
|
|
2702
|
+
if (A) {
|
|
2703
|
+
const D = A.state.doc.line(S.line + 1), k = A.lineBlockAt(D.from)?.top, V = A.scrollDOM;
|
|
2704
|
+
Ol(V, k);
|
|
2685
2705
|
}
|
|
2686
2706
|
}
|
|
2687
2707
|
},
|
|
2688
2708
|
catalogMaxDepth: e.catalogMaxDepth,
|
|
2689
|
-
onActive:
|
|
2709
|
+
onActive: T
|
|
2690
2710
|
}, null)]
|
|
2691
2711
|
})]);
|
|
2692
2712
|
}
|
|
2693
|
-
}), Wl = /* @__PURE__ */
|
|
2713
|
+
}), Wl = /* @__PURE__ */ w({
|
|
2694
2714
|
props: {
|
|
2695
2715
|
modelValue: {
|
|
2696
2716
|
type: String,
|
|
@@ -2719,7 +2739,7 @@ const Ze = (e) => e.extension instanceof Function ? e.extension(e.options) : e.e
|
|
|
2719
2739
|
type: Boolean,
|
|
2720
2740
|
default: void 0
|
|
2721
2741
|
}
|
|
2722
|
-
}, zl = /* @__PURE__ */
|
|
2742
|
+
}, zl = /* @__PURE__ */ w({
|
|
2723
2743
|
name: `${a}-checkbox`,
|
|
2724
2744
|
props: _l,
|
|
2725
2745
|
setup(e) {
|
|
@@ -2739,7 +2759,7 @@ const Ze = (e) => e.extension instanceof Function ? e.extension(e.options) : e.e
|
|
|
2739
2759
|
default: () => {
|
|
2740
2760
|
}
|
|
2741
2761
|
}
|
|
2742
|
-
}, ql = /* @__PURE__ */
|
|
2762
|
+
}, ql = /* @__PURE__ */ w({
|
|
2743
2763
|
props: Ul,
|
|
2744
2764
|
setup(e) {
|
|
2745
2765
|
const t = r("usedLanguageText"), o = r("disabled");
|
|
@@ -2779,11 +2799,11 @@ const Ze = (e) => e.extension instanceof Function ? e.extension(e.options) : e.e
|
|
|
2779
2799
|
defFooters: {
|
|
2780
2800
|
type: Object
|
|
2781
2801
|
}
|
|
2782
|
-
}, Gl = /* @__PURE__ */
|
|
2802
|
+
}, Gl = /* @__PURE__ */ w({
|
|
2783
2803
|
name: "MDEditorFooter",
|
|
2784
2804
|
props: Kl,
|
|
2785
2805
|
setup(e) {
|
|
2786
|
-
const t = r("theme"), o = r("language"), n = r("disabled"), i =
|
|
2806
|
+
const t = r("theme"), o = r("language"), n = r("disabled"), i = K(() => {
|
|
2787
2807
|
const c = e.footers.indexOf("="), u = c === -1 ? e.footers : e.footers.slice(0, c), m = c === -1 ? [] : e.footers.slice(c, Number.MAX_SAFE_INTEGER);
|
|
2788
2808
|
return [u, m];
|
|
2789
2809
|
}), s = (c) => {
|
|
@@ -2801,14 +2821,14 @@ const Ze = (e) => e.extension instanceof Function ? e.extension(e.options) : e.e
|
|
|
2801
2821
|
}
|
|
2802
2822
|
else if (e.defFooters instanceof Array) {
|
|
2803
2823
|
const u = e.defFooters[c];
|
|
2804
|
-
return u ?
|
|
2824
|
+
return u ? ae(u, {
|
|
2805
2825
|
theme: u.props?.theme || t.value,
|
|
2806
2826
|
language: u.props?.language || o.value,
|
|
2807
2827
|
disabled: u.props?.disabled || n?.value
|
|
2808
2828
|
}) : "";
|
|
2809
2829
|
} else if (e.defFooters && e.defFooters.children instanceof Array) {
|
|
2810
2830
|
const u = e.defFooters.children[c];
|
|
2811
|
-
return u ?
|
|
2831
|
+
return u ? ae(u, {
|
|
2812
2832
|
theme: u.props?.theme || t.value,
|
|
2813
2833
|
language: u.props?.language || o.value,
|
|
2814
2834
|
disabled: u.props?.disabled || n?.value
|
|
@@ -2838,18 +2858,18 @@ const Ze = (e) => e.extension instanceof Function ? e.extension(e.options) : e.e
|
|
|
2838
2858
|
type: Array,
|
|
2839
2859
|
default: () => []
|
|
2840
2860
|
}
|
|
2841
|
-
}, Yl = /* @__PURE__ */
|
|
2861
|
+
}, Yl = /* @__PURE__ */ w({
|
|
2842
2862
|
name: "MDEditorToolbar",
|
|
2843
2863
|
props: jl,
|
|
2844
2864
|
setup(e) {
|
|
2845
2865
|
const t = r("editorId"), o = r("showToolbarName"), n = `${t}-toolbar-wrapper`, i = x(), s = x(), {
|
|
2846
2866
|
barRender: c
|
|
2847
|
-
} = Ye(), u =
|
|
2848
|
-
const m = e.toolbars.filter((
|
|
2849
|
-
return [v,
|
|
2867
|
+
} = Ye(), u = K(() => {
|
|
2868
|
+
const m = e.toolbars.filter((y) => !e.toolbarsExclude.includes(y)), g = m.indexOf("="), v = g === -1 ? m : m.slice(0, g + 1), p = g === -1 ? [] : m.slice(g, Number.MAX_SAFE_INTEGER);
|
|
2869
|
+
return [v, p];
|
|
2850
2870
|
});
|
|
2851
2871
|
return I(() => e.toolbars, () => {
|
|
2852
|
-
|
|
2872
|
+
ne(() => {
|
|
2853
2873
|
i.value && Lt(i.value);
|
|
2854
2874
|
});
|
|
2855
2875
|
}, {
|
|
@@ -2870,7 +2890,7 @@ const Ze = (e) => e.extension instanceof Function ? e.extension(e.options) : e.e
|
|
|
2870
2890
|
}, [g])])])]);
|
|
2871
2891
|
};
|
|
2872
2892
|
}
|
|
2873
|
-
}),
|
|
2893
|
+
}), me = /* @__PURE__ */ w({
|
|
2874
2894
|
name: "MdEditorV3",
|
|
2875
2895
|
props: ct,
|
|
2876
2896
|
emits: it,
|
|
@@ -2879,17 +2899,17 @@ const Ze = (e) => e.extension instanceof Function ? e.extension(e.options) : e.e
|
|
|
2879
2899
|
noKatex: o,
|
|
2880
2900
|
noMermaid: n,
|
|
2881
2901
|
noHighlight: i
|
|
2882
|
-
} = e, s =
|
|
2902
|
+
} = e, s = U({
|
|
2883
2903
|
scrollAuto: e.scrollAuto
|
|
2884
|
-
}), c = x(), u = x(), m =
|
|
2904
|
+
}), c = x(), u = x(), m = K(() => $e({
|
|
2885
2905
|
props: e,
|
|
2886
2906
|
ctx: t
|
|
2887
|
-
}, "defToolbars")), g =
|
|
2907
|
+
}, "defToolbars")), g = K(() => $e({
|
|
2888
2908
|
props: e,
|
|
2889
2909
|
ctx: t
|
|
2890
|
-
}, "defFooters")), v = ut(e), [
|
|
2910
|
+
}, "defFooters")), v = ut(e), [p, y] = dt(e, t, {
|
|
2891
2911
|
editorId: v
|
|
2892
|
-
}),
|
|
2912
|
+
}), C = mt(e, {
|
|
2893
2913
|
editorId: v
|
|
2894
2914
|
});
|
|
2895
2915
|
return bt(e, t, {
|
|
@@ -2898,22 +2918,22 @@ const Ze = (e) => e.extension instanceof Function ? e.extension(e.options) : e.e
|
|
|
2898
2918
|
editorId: v
|
|
2899
2919
|
}), ht(e, t, {
|
|
2900
2920
|
editorId: v,
|
|
2901
|
-
catalogVisible:
|
|
2902
|
-
setting:
|
|
2903
|
-
updateSetting:
|
|
2921
|
+
catalogVisible: C,
|
|
2922
|
+
setting: p,
|
|
2923
|
+
updateSetting: y,
|
|
2904
2924
|
codeRef: u
|
|
2905
2925
|
}), ft(e, {
|
|
2906
2926
|
rootRef: c,
|
|
2907
2927
|
editorId: v,
|
|
2908
|
-
setting:
|
|
2909
|
-
updateSetting:
|
|
2910
|
-
catalogVisible:
|
|
2928
|
+
setting: p,
|
|
2929
|
+
updateSetting: y,
|
|
2930
|
+
catalogVisible: C,
|
|
2911
2931
|
defToolbars: m
|
|
2912
|
-
}),
|
|
2932
|
+
}), ve(() => {
|
|
2913
2933
|
b.clear(v);
|
|
2914
2934
|
}), () => l("div", {
|
|
2915
2935
|
id: v,
|
|
2916
|
-
class: [a, e.class, e.theme === "dark" && `${a}-dark`,
|
|
2936
|
+
class: [a, e.class, e.theme === "dark" && `${a}-dark`, p.fullscreen || p.pageFullscreen ? `${a}-fullscreen` : ""],
|
|
2917
2937
|
style: e.style,
|
|
2918
2938
|
ref: c
|
|
2919
2939
|
}, [e.toolbars.length > 0 && l(Yl, {
|
|
@@ -2978,13 +2998,13 @@ const Ze = (e) => e.extension instanceof Function ? e.extension(e.options) : e.e
|
|
|
2978
2998
|
modelValue: e.modelValue,
|
|
2979
2999
|
footers: e.footers,
|
|
2980
3000
|
defFooters: g.value,
|
|
2981
|
-
noScrollAuto: !
|
|
3001
|
+
noScrollAuto: !p.preview && !p.htmlPreview || p.previewOnly,
|
|
2982
3002
|
scrollAuto: s.scrollAuto,
|
|
2983
3003
|
onScrollAutoChange: (T) => s.scrollAuto = T
|
|
2984
3004
|
}, null)]);
|
|
2985
3005
|
}
|
|
2986
3006
|
});
|
|
2987
|
-
|
|
3007
|
+
me.install = (e) => (e.component(me.name, me), e.use(wt).use(ot).use(Tt).use(Oe).use(pt), e);
|
|
2988
3008
|
export {
|
|
2989
|
-
|
|
3009
|
+
me as default
|
|
2990
3010
|
};
|