md-editor-v3 4.4.0 → 4.5.0-beta.1
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 +129 -109
- package/lib/cjs/MdCatalog.cjs +1 -1
- package/lib/cjs/MdEditor.cjs +19 -19
- package/lib/cjs/MdModal.cjs +1 -1
- package/lib/cjs/MdPreview.cjs +1 -1
- package/lib/cjs/ModalToolbar.cjs +1 -1
- package/lib/cjs/chunks/config.cjs +1 -1
- package/lib/cjs/chunks/index.cjs +6 -6
- package/lib/cjs/chunks/index3.cjs +1 -2
- package/lib/cjs/chunks/index4.cjs +2 -0
- package/lib/cjs/index.cjs +1 -1
- package/lib/es/MdCatalog.mjs +1 -1
- package/lib/es/MdEditor.mjs +1005 -1093
- package/lib/es/MdModal.mjs +6 -139
- package/lib/es/MdPreview.mjs +1 -1
- package/lib/es/ModalToolbar.mjs +1 -1
- package/lib/es/chunks/config.mjs +25 -26
- package/lib/es/chunks/index.mjs +230 -204
- package/lib/es/chunks/index3.mjs +163 -61
- package/lib/es/chunks/index4.mjs +69 -0
- package/lib/es/index.mjs +18 -17
- package/lib/preview.css +1 -1
- package/lib/style.css +1 -1
- package/lib/types/MdEditor/Editor.d.ts +10 -1
- package/lib/types/MdEditor/components/Icon/Icon.d.ts +16 -0
- package/lib/types/MdEditor/components/Icon/Str.d.ts +3 -0
- package/lib/types/MdEditor/components/Icon/index.d.ts +16 -0
- package/lib/types/MdEditor/config.d.ts +2 -1
- package/lib/types/MdEditor/index.d.ts +23 -4
- package/lib/types/MdEditor/props.d.ts +15 -1
- package/lib/types/MdEditor/type.d.ts +37 -8
- package/lib/types/MdPreview/MdPreview.d.ts +9 -0
- package/lib/types/MdPreview/index.d.ts +20 -1
- package/lib/umd/index.js +44 -44
- package/package.json +2 -2
package/lib/es/MdEditor.mjs
CHANGED
|
@@ -1,40 +1,41 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { defineComponent as
|
|
5
|
-
import { p as
|
|
6
|
-
import { draggingScroll as Et, linkTo as
|
|
7
|
-
import { a as
|
|
8
|
-
import { b
|
|
9
|
-
import { C as
|
|
10
|
-
import { a as
|
|
11
|
-
import
|
|
12
|
-
import { minimalSetup as
|
|
13
|
-
import { EditorView as
|
|
14
|
-
import { languages as
|
|
15
|
-
import { markdown as
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
1
|
+
var xt = Object.defineProperty;
|
|
2
|
+
var St = (e, o, l) => o in e ? xt(e, o, { enumerable: !0, configurable: !0, writable: !0, value: l }) : e[o] = l;
|
|
3
|
+
var U = (e, o, l) => (St(e, typeof o != "symbol" ? o + "" : o, l), l);
|
|
4
|
+
import { defineComponent as R, createVNode as t, inject as L, ref as K, onMounted as Y, reactive as Q, computed as ke, watch as B, nextTick as me, Fragment as pt, cloneVNode as nt, toRef as ne, shallowRef as At, onBeforeUnmount as Mt } from "vue";
|
|
5
|
+
import { p as n, a as X, s as It, b as Lt, d as Dt } from "./chunks/config.mjs";
|
|
6
|
+
import { draggingScroll as Et, linkTo as Ht, debounce as Nt, throttle as Vt, smoothScroll as rt } from "@vavt/util";
|
|
7
|
+
import { a as ae, D as Ot } from "./chunks/index2.mjs";
|
|
8
|
+
import { b, a as Bt } from "./chunks/index4.mjs";
|
|
9
|
+
import { C as Ft, a as Rt, O as Ct, T as Pt, c as qt, b as Ut, e as Gt, d as Kt, u as _t, f as jt, g as Wt, h as zt, i as Zt, j as Xt, k as Yt, M as Jt } from "./chunks/index.mjs";
|
|
10
|
+
import { a as Qt } from "./chunks/dom.mjs";
|
|
11
|
+
import { M as $t, I as C } from "./chunks/index3.mjs";
|
|
12
|
+
import { minimalSetup as el, EditorView as ue } from "codemirror";
|
|
13
|
+
import { EditorView as pe, placeholder as tl, keymap as ll } from "@codemirror/view";
|
|
14
|
+
import { languages as ol } from "@codemirror/language-data";
|
|
15
|
+
import { markdown as al } from "@codemirror/lang-markdown";
|
|
16
|
+
import { htmlCompletionSource as nl, html as rl } from "@codemirror/lang-html";
|
|
17
|
+
import { deleteLine as il, indentWithTab as sl, undo as cl, redo as ul } from "@codemirror/commands";
|
|
18
|
+
import { HighlightStyle as yt, syntaxHighlighting as Tt, indentUnit as dl } from "@codemirror/language";
|
|
18
19
|
import { tags as s } from "@lezer/highlight";
|
|
19
|
-
import { EditorSelection as
|
|
20
|
-
import { autocompletion as
|
|
21
|
-
import
|
|
22
|
-
import { g as
|
|
23
|
-
import
|
|
24
|
-
import
|
|
20
|
+
import { EditorSelection as G, EditorState as fe, Compartment as ml, StateEffect as gl } from "@codemirror/state";
|
|
21
|
+
import { autocompletion as fl } from "@codemirror/autocomplete";
|
|
22
|
+
import wt from "./MdCatalog.mjs";
|
|
23
|
+
import { g as it } from "./chunks/vue-tsx.mjs";
|
|
24
|
+
import bl from "./NormalToolbar.mjs";
|
|
25
|
+
import hl from "./ModalToolbar.mjs";
|
|
25
26
|
import "medium-zoom";
|
|
26
27
|
import "copy-to-clipboard";
|
|
27
28
|
import "markdown-it";
|
|
28
29
|
import "markdown-it-image-figures";
|
|
29
30
|
import "markdown-it-task-lists";
|
|
30
31
|
import "lru-cache";
|
|
31
|
-
const
|
|
32
|
+
const vl = /* @__PURE__ */ R({
|
|
32
33
|
setup() {
|
|
33
34
|
return () => t("div", {
|
|
34
|
-
class: `${
|
|
35
|
+
class: `${n}-divider`
|
|
35
36
|
}, null);
|
|
36
37
|
}
|
|
37
|
-
}),
|
|
38
|
+
}), kl = {
|
|
38
39
|
noPrettier: {
|
|
39
40
|
type: Boolean
|
|
40
41
|
},
|
|
@@ -83,38 +84,38 @@ const hl = /* @__PURE__ */ B({
|
|
|
83
84
|
showToolbarName: {
|
|
84
85
|
type: Boolean
|
|
85
86
|
}
|
|
86
|
-
},
|
|
87
|
-
var c, g, m,
|
|
88
|
-
const
|
|
89
|
-
let l = (g = (c =
|
|
90
|
-
const
|
|
87
|
+
}, pl = (e) => {
|
|
88
|
+
var c, g, m, h;
|
|
89
|
+
const o = L("editorId");
|
|
90
|
+
let l = (g = (c = X.editorExtensions) == null ? void 0 : c.screenfull) == null ? void 0 : g.instance;
|
|
91
|
+
const a = (h = (m = X.editorExtensions) == null ? void 0 : m.screenfull) == null ? void 0 : h.js, r = K(!1), i = ($) => {
|
|
91
92
|
if (!l) {
|
|
92
|
-
|
|
93
|
+
b.emit(o, "errorCatcher", {
|
|
93
94
|
name: "fullscreen",
|
|
94
95
|
message: "fullscreen is undefined"
|
|
95
96
|
});
|
|
96
97
|
return;
|
|
97
98
|
}
|
|
98
|
-
l.isEnabled ? (
|
|
99
|
-
},
|
|
99
|
+
l.isEnabled ? (r.value = !0, ($ === void 0 ? !l.isFullscreen : $) ? l.request() : l.exit()) : console.error("browser does not support screenfull!");
|
|
100
|
+
}, d = () => {
|
|
100
101
|
l && l.isEnabled && l.on("change", () => {
|
|
101
|
-
(
|
|
102
|
+
(r.value || e.setting.fullscreen) && (r.value = !1, e.updateSetting("fullscreen"));
|
|
102
103
|
});
|
|
103
|
-
},
|
|
104
|
-
l = window.screenfull,
|
|
104
|
+
}, u = () => {
|
|
105
|
+
l = window.screenfull, d();
|
|
105
106
|
};
|
|
106
|
-
return
|
|
107
|
-
if (
|
|
107
|
+
return Y(() => {
|
|
108
|
+
if (d(), !l) {
|
|
108
109
|
const $ = document.createElement("script");
|
|
109
|
-
$.src =
|
|
110
|
+
$.src = a || It, $.onload = u, $.id = `${n}-screenfull`, Qt($, "screenfull");
|
|
110
111
|
}
|
|
111
|
-
}),
|
|
112
|
-
|
|
113
|
-
name:
|
|
112
|
+
}), Y(() => {
|
|
113
|
+
b.on(o, {
|
|
114
|
+
name: Ft,
|
|
114
115
|
callback: i
|
|
115
116
|
});
|
|
116
117
|
}), { fullscreenHandler: i };
|
|
117
|
-
},
|
|
118
|
+
}, Cl = {
|
|
118
119
|
tableShape: {
|
|
119
120
|
type: Array,
|
|
120
121
|
default: () => [6, 4]
|
|
@@ -124,36 +125,36 @@ const hl = /* @__PURE__ */ B({
|
|
|
124
125
|
default: () => {
|
|
125
126
|
}
|
|
126
127
|
}
|
|
127
|
-
},
|
|
128
|
+
}, $l = /* @__PURE__ */ R({
|
|
128
129
|
name: "TableShape",
|
|
129
|
-
props:
|
|
130
|
+
props: Cl,
|
|
130
131
|
setup(e) {
|
|
131
|
-
const
|
|
132
|
+
const o = Q({
|
|
132
133
|
x: -1,
|
|
133
134
|
y: -1
|
|
134
135
|
});
|
|
135
136
|
return () => t("div", {
|
|
136
|
-
class: `${
|
|
137
|
+
class: `${n}-table-shape`,
|
|
137
138
|
onMouseleave: () => {
|
|
138
|
-
|
|
139
|
+
o.x = -1, o.y = -1;
|
|
139
140
|
}
|
|
140
|
-
}, [new Array(e.tableShape[1]).fill("").map((l,
|
|
141
|
-
class: `${
|
|
142
|
-
key: `table-shape-row-${
|
|
143
|
-
}, [new Array(e.tableShape[0]).fill("").map((
|
|
144
|
-
class: `${
|
|
141
|
+
}, [new Array(e.tableShape[1]).fill("").map((l, a) => t("div", {
|
|
142
|
+
class: `${n}-table-shape-row`,
|
|
143
|
+
key: `table-shape-row-${a}`
|
|
144
|
+
}, [new Array(e.tableShape[0]).fill("").map((r, i) => t("div", {
|
|
145
|
+
class: `${n}-table-shape-col`,
|
|
145
146
|
key: `table-shape-col-${i}`,
|
|
146
147
|
onMouseenter: () => {
|
|
147
|
-
|
|
148
|
+
o.x = a, o.y = i;
|
|
148
149
|
},
|
|
149
150
|
onClick: () => {
|
|
150
|
-
e.onSelected(
|
|
151
|
+
e.onSelected(o);
|
|
151
152
|
}
|
|
152
153
|
}, [t("div", {
|
|
153
|
-
class: [`${
|
|
154
|
+
class: [`${n}-table-shape-col-default`, a <= o.x && i <= o.y && `${n}-table-shape-col-include`]
|
|
154
155
|
}, null)]))]))]);
|
|
155
156
|
}
|
|
156
|
-
}),
|
|
157
|
+
}), yl = $l, Tl = {
|
|
157
158
|
type: {
|
|
158
159
|
type: String,
|
|
159
160
|
default: "link"
|
|
@@ -172,77 +173,77 @@ const hl = /* @__PURE__ */ B({
|
|
|
172
173
|
default: () => {
|
|
173
174
|
}
|
|
174
175
|
}
|
|
175
|
-
},
|
|
176
|
-
props:
|
|
176
|
+
}, wl = /* @__PURE__ */ R({
|
|
177
|
+
props: Tl,
|
|
177
178
|
setup(e) {
|
|
178
|
-
const
|
|
179
|
-
var i,
|
|
179
|
+
const o = L("usedLanguageText"), l = L("editorId"), a = ke(() => {
|
|
180
|
+
var i, d;
|
|
180
181
|
switch (e.type) {
|
|
181
182
|
case "link":
|
|
182
|
-
return (i =
|
|
183
|
+
return (i = o.value.linkModalTips) == null ? void 0 : i.linkTitle;
|
|
183
184
|
case "image":
|
|
184
|
-
return (
|
|
185
|
+
return (d = o.value.linkModalTips) == null ? void 0 : d.imageTitle;
|
|
185
186
|
default:
|
|
186
187
|
return "";
|
|
187
188
|
}
|
|
188
|
-
}),
|
|
189
|
+
}), r = Q({
|
|
189
190
|
desc: "",
|
|
190
191
|
url: ""
|
|
191
192
|
});
|
|
192
|
-
return
|
|
193
|
+
return B(() => e.visible, (i) => {
|
|
193
194
|
i || setTimeout(() => {
|
|
194
|
-
|
|
195
|
+
r.desc = "", r.url = "";
|
|
195
196
|
}, 200);
|
|
196
|
-
}), () => t(
|
|
197
|
-
title:
|
|
197
|
+
}), () => t($t, {
|
|
198
|
+
title: a.value,
|
|
198
199
|
visible: e.visible,
|
|
199
200
|
onClose: e.onCancel
|
|
200
201
|
}, {
|
|
201
202
|
default: () => {
|
|
202
|
-
var i,
|
|
203
|
+
var i, d, u, c, g;
|
|
203
204
|
return [t("div", {
|
|
204
|
-
class: `${
|
|
205
|
+
class: `${n}-form-item`
|
|
205
206
|
}, [t("label", {
|
|
206
|
-
class: `${
|
|
207
|
+
class: `${n}-label`,
|
|
207
208
|
for: `link-desc-${l}`
|
|
208
|
-
}, [(i =
|
|
209
|
-
placeholder: (
|
|
210
|
-
class: `${
|
|
209
|
+
}, [(i = o.value.linkModalTips) == null ? void 0 : i.descLabel]), t("input", {
|
|
210
|
+
placeholder: (d = o.value.linkModalTips) == null ? void 0 : d.descLabelPlaceHolder,
|
|
211
|
+
class: `${n}-input`,
|
|
211
212
|
id: `link-desc-${l}`,
|
|
212
213
|
type: "text",
|
|
213
|
-
value:
|
|
214
|
+
value: r.desc,
|
|
214
215
|
onChange: (m) => {
|
|
215
|
-
|
|
216
|
+
r.desc = m.target.value;
|
|
216
217
|
},
|
|
217
218
|
autocomplete: "off"
|
|
218
219
|
}, null)]), t("div", {
|
|
219
|
-
class: `${
|
|
220
|
+
class: `${n}-form-item`
|
|
220
221
|
}, [t("label", {
|
|
221
|
-
class: `${
|
|
222
|
+
class: `${n}-label`,
|
|
222
223
|
for: `link-url-${l}`
|
|
223
|
-
}, [(
|
|
224
|
-
placeholder: (c =
|
|
225
|
-
class: `${
|
|
224
|
+
}, [(u = o.value.linkModalTips) == null ? void 0 : u.urlLabel]), t("input", {
|
|
225
|
+
placeholder: (c = o.value.linkModalTips) == null ? void 0 : c.urlLabelPlaceHolder,
|
|
226
|
+
class: `${n}-input`,
|
|
226
227
|
id: `link-url-${l}`,
|
|
227
228
|
type: "text",
|
|
228
|
-
value:
|
|
229
|
+
value: r.url,
|
|
229
230
|
onChange: (m) => {
|
|
230
|
-
|
|
231
|
+
r.url = m.target.value;
|
|
231
232
|
},
|
|
232
233
|
autocomplete: "off"
|
|
233
234
|
}, null)]), t("div", {
|
|
234
|
-
class: `${
|
|
235
|
+
class: `${n}-form-item`
|
|
235
236
|
}, [t("button", {
|
|
236
|
-
class: [`${
|
|
237
|
+
class: [`${n}-btn`, `${n}-btn-row`],
|
|
237
238
|
type: "button",
|
|
238
239
|
onClick: () => {
|
|
239
|
-
e.onOk(
|
|
240
|
+
e.onOk(r), r.desc = "", r.url = "";
|
|
240
241
|
}
|
|
241
|
-
}, [(g =
|
|
242
|
+
}, [(g = o.value.linkModalTips) == null ? void 0 : g.buttonOK])])];
|
|
242
243
|
}
|
|
243
244
|
});
|
|
244
245
|
}
|
|
245
|
-
}),
|
|
246
|
+
}), xl = {
|
|
246
247
|
visible: {
|
|
247
248
|
type: Boolean,
|
|
248
249
|
default: !1
|
|
@@ -257,13 +258,13 @@ const hl = /* @__PURE__ */ B({
|
|
|
257
258
|
default: () => {
|
|
258
259
|
}
|
|
259
260
|
}
|
|
260
|
-
},
|
|
261
|
-
props:
|
|
261
|
+
}, Sl = /* @__PURE__ */ R({
|
|
262
|
+
props: xl,
|
|
262
263
|
setup(e) {
|
|
263
|
-
var m,
|
|
264
|
-
const
|
|
265
|
-
let
|
|
266
|
-
const
|
|
264
|
+
var m, h, $;
|
|
265
|
+
const o = L("usedLanguageText"), l = L("editorId");
|
|
266
|
+
let a = ($ = (h = (m = X) == null ? void 0 : m.editorExtensions) == null ? void 0 : h.cropper) == null ? void 0 : $.instance;
|
|
267
|
+
const r = K(), i = K(), d = K(), u = Q({
|
|
267
268
|
cropperInited: !1,
|
|
268
269
|
imgSelected: !1,
|
|
269
270
|
imgSrc: "",
|
|
@@ -271,109 +272,103 @@ const hl = /* @__PURE__ */ B({
|
|
|
271
272
|
isFullscreen: !1
|
|
272
273
|
});
|
|
273
274
|
let c = null;
|
|
274
|
-
|
|
275
|
-
e.visible && !
|
|
276
|
-
if (!
|
|
277
|
-
|
|
275
|
+
B(() => e.visible, () => {
|
|
276
|
+
e.visible && !u.cropperInited && (a = a || window.Cropper, r.value.onchange = () => {
|
|
277
|
+
if (!a) {
|
|
278
|
+
b.emit(l, "errorCatcher", {
|
|
278
279
|
name: "Cropper",
|
|
279
280
|
message: "Cropper is undefined"
|
|
280
281
|
});
|
|
281
282
|
return;
|
|
282
283
|
}
|
|
283
|
-
const T =
|
|
284
|
-
if (
|
|
284
|
+
const T = r.value.files || [];
|
|
285
|
+
if (u.imgSelected = !0, (T == null ? void 0 : T.length) > 0) {
|
|
285
286
|
const v = new FileReader();
|
|
286
|
-
v.onload = (
|
|
287
|
-
|
|
288
|
-
c = new
|
|
287
|
+
v.onload = (f) => {
|
|
288
|
+
u.imgSrc = f.target.result, me(() => {
|
|
289
|
+
c = new a(i.value, {
|
|
289
290
|
viewMode: 2,
|
|
290
|
-
preview: `.${
|
|
291
|
+
preview: `.${n}-clip-preview-target`
|
|
291
292
|
// aspectRatio: 16 / 9,
|
|
292
293
|
});
|
|
293
294
|
});
|
|
294
295
|
}, v.readAsDataURL(T[0]);
|
|
295
296
|
}
|
|
296
297
|
});
|
|
297
|
-
}),
|
|
298
|
-
|
|
299
|
-
}),
|
|
300
|
-
|
|
301
|
-
c == null || c.destroy(),
|
|
298
|
+
}), B(() => [u.imgSelected], () => {
|
|
299
|
+
d.value.style = "";
|
|
300
|
+
}), B(() => u.isFullscreen, () => {
|
|
301
|
+
me(() => {
|
|
302
|
+
c == null || c.destroy(), d.value.style = "", i.value && (c = new a(i.value, {
|
|
302
303
|
viewMode: 2,
|
|
303
|
-
preview: `.${
|
|
304
|
+
preview: `.${n}-clip-preview-target`
|
|
304
305
|
// aspectRatio: 16 / 9,
|
|
305
306
|
}));
|
|
306
307
|
});
|
|
307
308
|
});
|
|
308
309
|
const g = () => {
|
|
309
|
-
c.clear(), c.destroy(), c = null,
|
|
310
|
+
c.clear(), c.destroy(), c = null, r.value.value = "", u.imgSelected = !1;
|
|
310
311
|
};
|
|
311
312
|
return () => {
|
|
312
313
|
var T;
|
|
313
|
-
return t(
|
|
314
|
-
class: `${
|
|
315
|
-
title: (T =
|
|
314
|
+
return t($t, {
|
|
315
|
+
class: `${n}-modal-clip`,
|
|
316
|
+
title: (T = o.value.clipModalTips) == null ? void 0 : T.title,
|
|
316
317
|
visible: e.visible,
|
|
317
318
|
onClose: e.onCancel,
|
|
318
319
|
showAdjust: !0,
|
|
319
|
-
isFullscreen:
|
|
320
|
+
isFullscreen: u.isFullscreen,
|
|
320
321
|
onAdjust: (v) => {
|
|
321
|
-
|
|
322
|
+
u.isFullscreen = v;
|
|
322
323
|
},
|
|
323
324
|
width: "668px",
|
|
324
325
|
height: "421px"
|
|
325
326
|
}, {
|
|
326
327
|
default: () => {
|
|
327
|
-
var v,
|
|
328
|
+
var v, f;
|
|
328
329
|
return [t("div", {
|
|
329
|
-
class: `${
|
|
330
|
+
class: `${n}-form-item ${n}-clip`
|
|
330
331
|
}, [t("div", {
|
|
331
|
-
class: `${
|
|
332
|
-
}, [
|
|
333
|
-
class: `${
|
|
332
|
+
class: `${n}-clip-main`
|
|
333
|
+
}, [u.imgSelected ? t("div", {
|
|
334
|
+
class: `${n}-clip-cropper`
|
|
334
335
|
}, [t("img", {
|
|
335
|
-
src:
|
|
336
|
+
src: u.imgSrc,
|
|
336
337
|
ref: i,
|
|
337
338
|
style: {
|
|
338
339
|
display: "none"
|
|
339
340
|
},
|
|
340
341
|
alt: ""
|
|
341
342
|
}, null), t("div", {
|
|
342
|
-
class: `${
|
|
343
|
+
class: `${n}-clip-delete`,
|
|
343
344
|
onClick: g
|
|
344
|
-
}, [t(
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
"xlink:href": "#md-editor-icon-delete"
|
|
349
|
-
}, null)])])]) : t("div", {
|
|
350
|
-
class: `${o}-clip-upload`,
|
|
345
|
+
}, [t(C, {
|
|
346
|
+
name: "delete"
|
|
347
|
+
}, null)])]) : t("div", {
|
|
348
|
+
class: `${n}-clip-upload`,
|
|
351
349
|
onClick: () => {
|
|
352
|
-
|
|
350
|
+
r.value.click();
|
|
353
351
|
}
|
|
354
|
-
}, [t(
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
"xlink:href": "#md-editor-icon-upload"
|
|
359
|
-
}, null)])])]), t("div", {
|
|
360
|
-
class: `${o}-clip-preview`
|
|
352
|
+
}, [t(C, {
|
|
353
|
+
name: "upload"
|
|
354
|
+
}, null)])]), t("div", {
|
|
355
|
+
class: `${n}-clip-preview`
|
|
361
356
|
}, [t("div", {
|
|
362
|
-
class: `${
|
|
363
|
-
ref:
|
|
357
|
+
class: `${n}-clip-preview-target`,
|
|
358
|
+
ref: d
|
|
364
359
|
}, null)])]), t("div", {
|
|
365
|
-
class: `${
|
|
360
|
+
class: `${n}-form-item`
|
|
366
361
|
}, [t("button", {
|
|
367
|
-
class: `${
|
|
362
|
+
class: `${n}-btn`,
|
|
368
363
|
type: "button",
|
|
369
364
|
onClick: () => {
|
|
370
365
|
if (c) {
|
|
371
366
|
const k = c.getCroppedCanvas();
|
|
372
|
-
|
|
367
|
+
b.emit(l, "uploadImage", [Bt(k.toDataURL("image/png"))], e.onOk), g();
|
|
373
368
|
}
|
|
374
369
|
}
|
|
375
|
-
}, [((v =
|
|
376
|
-
ref:
|
|
370
|
+
}, [((v = o.value.clipModalTips) == null ? void 0 : v.buttonUpload) || ((f = o.value.linkModalTips) == null ? void 0 : f.buttonOK)])]), t("input", {
|
|
371
|
+
ref: r,
|
|
377
372
|
accept: "image/*",
|
|
378
373
|
type: "file",
|
|
379
374
|
multiple: !1,
|
|
@@ -385,7 +380,7 @@ const hl = /* @__PURE__ */ B({
|
|
|
385
380
|
});
|
|
386
381
|
};
|
|
387
382
|
}
|
|
388
|
-
}),
|
|
383
|
+
}), Al = {
|
|
389
384
|
type: {
|
|
390
385
|
type: String,
|
|
391
386
|
default: "link"
|
|
@@ -408,27 +403,27 @@ const hl = /* @__PURE__ */ B({
|
|
|
408
403
|
default: () => {
|
|
409
404
|
}
|
|
410
405
|
}
|
|
411
|
-
},
|
|
412
|
-
props:
|
|
406
|
+
}, Ml = /* @__PURE__ */ R({
|
|
407
|
+
props: Al,
|
|
413
408
|
setup(e) {
|
|
414
|
-
return () => t(
|
|
409
|
+
return () => t(pt, null, [t(wl, {
|
|
415
410
|
type: e.type,
|
|
416
411
|
visible: e.linkVisible,
|
|
417
412
|
onOk: e.onOk,
|
|
418
413
|
onCancel: e.onCancel
|
|
419
|
-
}, null), t(
|
|
414
|
+
}, null), t(Sl, {
|
|
420
415
|
visible: e.clipVisible,
|
|
421
416
|
onOk: e.onOk,
|
|
422
417
|
onCancel: e.onCancel
|
|
423
418
|
}, null)]);
|
|
424
419
|
}
|
|
425
|
-
}),
|
|
420
|
+
}), Il = /* @__PURE__ */ R({
|
|
426
421
|
name: "MDEditorToolbar",
|
|
427
|
-
props:
|
|
422
|
+
props: kl,
|
|
428
423
|
setup(e) {
|
|
429
|
-
const
|
|
430
|
-
fullscreenHandler:
|
|
431
|
-
} =
|
|
424
|
+
const o = L("editorId"), l = L("usedLanguageText"), {
|
|
425
|
+
fullscreenHandler: a
|
|
426
|
+
} = pl(e), r = `${o}-toolbar-wrapper`, i = K(), d = Q({
|
|
432
427
|
title: !1,
|
|
433
428
|
catalog: !1,
|
|
434
429
|
// 图片上传下拉
|
|
@@ -438,688 +433,601 @@ const hl = /* @__PURE__ */ B({
|
|
|
438
433
|
// mermaid
|
|
439
434
|
mermaid: !1,
|
|
440
435
|
katex: !1
|
|
441
|
-
}),
|
|
442
|
-
|
|
443
|
-
}, c =
|
|
436
|
+
}), u = (v, f) => {
|
|
437
|
+
b.emit(o, "replace", v, f);
|
|
438
|
+
}, c = Q({
|
|
444
439
|
type: "link",
|
|
445
440
|
linkVisible: !1,
|
|
446
441
|
clipVisible: !1
|
|
447
|
-
}), g =
|
|
448
|
-
|
|
449
|
-
|
|
442
|
+
}), g = K();
|
|
443
|
+
Y(() => {
|
|
444
|
+
b.on(o, {
|
|
450
445
|
name: "openModals",
|
|
451
446
|
callback(v) {
|
|
452
447
|
c.type = v, c.linkVisible = !0;
|
|
453
448
|
}
|
|
454
449
|
});
|
|
455
450
|
});
|
|
456
|
-
const m =
|
|
457
|
-
const v = e.toolbars.filter((w) => !e.toolbarsExclude.includes(w)),
|
|
451
|
+
const m = ke(() => {
|
|
452
|
+
const v = e.toolbars.filter((w) => !e.toolbarsExclude.includes(w)), f = v.indexOf("="), k = f === -1 ? v : v.slice(0, f + 1), y = f === -1 ? [] : v.slice(f, Number.MAX_SAFE_INTEGER);
|
|
458
453
|
return [k, y];
|
|
459
|
-
}),
|
|
460
|
-
|
|
454
|
+
}), h = K(), $ = () => {
|
|
455
|
+
b.emit(o, "uploadImage", Array.from(h.value.files || [])), h.value.value = "";
|
|
461
456
|
};
|
|
462
|
-
|
|
463
|
-
|
|
457
|
+
Y(() => {
|
|
458
|
+
h.value.addEventListener("change", $);
|
|
464
459
|
});
|
|
465
460
|
const T = (v) => {
|
|
466
|
-
var
|
|
467
|
-
if (
|
|
461
|
+
var f, k, y, w, x, H, M, ee, S, A, q, P, N, D, E, V, _, j, se, te, Z, W, le, z, O, F, oe, ce, Ce, $e, ye, Te, we, xe, Se, Ae, Me, Ie, Le, De, Ee, He, Ne, Ve, Oe, Be, Fe, Re, Pe, qe, Ue, Ge, Ke, _e, je, We, ze, Ze, Xe, Ye, Je, Qe, et, tt, lt, ot, at;
|
|
462
|
+
if (Lt.includes(v))
|
|
468
463
|
switch (v) {
|
|
469
464
|
case "-":
|
|
470
|
-
return t(
|
|
465
|
+
return t(vl, null, null);
|
|
471
466
|
case "bold":
|
|
472
467
|
return t("div", {
|
|
473
|
-
class: `${
|
|
474
|
-
title: (
|
|
468
|
+
class: `${n}-toolbar-item`,
|
|
469
|
+
title: (f = l.value.toolbarTips) == null ? void 0 : f.bold,
|
|
475
470
|
onClick: () => {
|
|
476
|
-
|
|
471
|
+
u("bold");
|
|
477
472
|
}
|
|
478
|
-
}, [t(
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
"xlink:href": "#md-editor-icon-bold"
|
|
483
|
-
}, null)]), e.showToolbarName && t("div", {
|
|
484
|
-
class: `${o}-toolbar-item-name`
|
|
473
|
+
}, [t(C, {
|
|
474
|
+
name: "bold"
|
|
475
|
+
}, null), e.showToolbarName && t("div", {
|
|
476
|
+
class: `${n}-toolbar-item-name`
|
|
485
477
|
}, [(k = l.value.toolbarTips) == null ? void 0 : k.bold])]);
|
|
486
478
|
case "underline":
|
|
487
479
|
return t("div", {
|
|
488
|
-
class: `${
|
|
480
|
+
class: `${n}-toolbar-item`,
|
|
489
481
|
title: (y = l.value.toolbarTips) == null ? void 0 : y.underline,
|
|
490
482
|
onClick: () => {
|
|
491
|
-
|
|
483
|
+
u("underline");
|
|
492
484
|
}
|
|
493
|
-
}, [t(
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
"xlink:href": "#md-editor-icon-underline"
|
|
498
|
-
}, null)]), e.showToolbarName && t("div", {
|
|
499
|
-
class: `${o}-toolbar-item-name`
|
|
485
|
+
}, [t(C, {
|
|
486
|
+
name: "underline"
|
|
487
|
+
}, null), e.showToolbarName && t("div", {
|
|
488
|
+
class: `${n}-toolbar-item-name`
|
|
500
489
|
}, [(w = l.value.toolbarTips) == null ? void 0 : w.underline])]);
|
|
501
490
|
case "italic":
|
|
502
491
|
return t("div", {
|
|
503
|
-
class: `${
|
|
492
|
+
class: `${n}-toolbar-item`,
|
|
504
493
|
title: (x = l.value.toolbarTips) == null ? void 0 : x.italic,
|
|
505
494
|
onClick: () => {
|
|
506
|
-
|
|
495
|
+
u("italic");
|
|
507
496
|
}
|
|
508
|
-
}, [t(
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
}, null)]), e.showToolbarName && t("div", {
|
|
514
|
-
class: `${o}-toolbar-item-name`
|
|
515
|
-
}, [(I = l.value.toolbarTips) == null ? void 0 : I.italic])]);
|
|
497
|
+
}, [t(C, {
|
|
498
|
+
name: "italic"
|
|
499
|
+
}, null), e.showToolbarName && t("div", {
|
|
500
|
+
class: `${n}-toolbar-item-name`
|
|
501
|
+
}, [(H = l.value.toolbarTips) == null ? void 0 : H.italic])]);
|
|
516
502
|
case "strikeThrough":
|
|
517
503
|
return t("div", {
|
|
518
|
-
class: `${
|
|
519
|
-
title: (
|
|
504
|
+
class: `${n}-toolbar-item`,
|
|
505
|
+
title: (M = l.value.toolbarTips) == null ? void 0 : M.strikeThrough,
|
|
520
506
|
onClick: () => {
|
|
521
|
-
|
|
507
|
+
u("strikeThrough");
|
|
522
508
|
}
|
|
523
|
-
}, [t(
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
}, null)]), e.showToolbarName && t("div", {
|
|
529
|
-
class: `${o}-toolbar-item-name`
|
|
530
|
-
}, [(M = l.value.toolbarTips) == null ? void 0 : M.strikeThrough])]);
|
|
509
|
+
}, [t(C, {
|
|
510
|
+
name: "strike-through"
|
|
511
|
+
}, null), e.showToolbarName && t("div", {
|
|
512
|
+
class: `${n}-toolbar-item-name`
|
|
513
|
+
}, [(ee = l.value.toolbarTips) == null ? void 0 : ee.strikeThrough])]);
|
|
531
514
|
case "title":
|
|
532
|
-
return t(
|
|
533
|
-
relative: `#${
|
|
534
|
-
visible:
|
|
535
|
-
onChange: (
|
|
536
|
-
|
|
515
|
+
return t(ae, {
|
|
516
|
+
relative: `#${r}`,
|
|
517
|
+
visible: d.title,
|
|
518
|
+
onChange: (p) => {
|
|
519
|
+
d.title = p;
|
|
537
520
|
},
|
|
538
521
|
overlay: t("ul", {
|
|
539
|
-
class: `${
|
|
522
|
+
class: `${n}-menu`,
|
|
540
523
|
onClick: () => {
|
|
541
|
-
|
|
524
|
+
d.title = !1;
|
|
542
525
|
}
|
|
543
526
|
}, [t("li", {
|
|
544
|
-
class: `${
|
|
527
|
+
class: `${n}-menu-item`,
|
|
545
528
|
onClick: () => {
|
|
546
|
-
|
|
529
|
+
u("h1");
|
|
547
530
|
}
|
|
548
|
-
}, [(
|
|
549
|
-
class: `${
|
|
531
|
+
}, [(S = l.value.titleItem) == null ? void 0 : S.h1]), t("li", {
|
|
532
|
+
class: `${n}-menu-item`,
|
|
550
533
|
onClick: () => {
|
|
551
|
-
|
|
534
|
+
u("h2");
|
|
552
535
|
}
|
|
553
|
-
}, [(
|
|
554
|
-
class: `${
|
|
536
|
+
}, [(A = l.value.titleItem) == null ? void 0 : A.h2]), t("li", {
|
|
537
|
+
class: `${n}-menu-item`,
|
|
555
538
|
onClick: () => {
|
|
556
|
-
|
|
539
|
+
u("h3");
|
|
557
540
|
}
|
|
558
|
-
}, [(
|
|
559
|
-
class: `${
|
|
541
|
+
}, [(q = l.value.titleItem) == null ? void 0 : q.h3]), t("li", {
|
|
542
|
+
class: `${n}-menu-item`,
|
|
560
543
|
onClick: () => {
|
|
561
|
-
|
|
544
|
+
u("h4");
|
|
562
545
|
}
|
|
563
|
-
}, [(
|
|
564
|
-
class: `${
|
|
546
|
+
}, [(P = l.value.titleItem) == null ? void 0 : P.h4]), t("li", {
|
|
547
|
+
class: `${n}-menu-item`,
|
|
565
548
|
onClick: () => {
|
|
566
|
-
|
|
549
|
+
u("h5");
|
|
567
550
|
}
|
|
568
|
-
}, [(
|
|
569
|
-
class: `${
|
|
551
|
+
}, [(N = l.value.titleItem) == null ? void 0 : N.h5]), t("li", {
|
|
552
|
+
class: `${n}-menu-item`,
|
|
570
553
|
onClick: () => {
|
|
571
|
-
|
|
554
|
+
u("h6");
|
|
572
555
|
}
|
|
573
556
|
}, [(D = l.value.titleItem) == null ? void 0 : D.h6])])
|
|
574
557
|
}, {
|
|
575
558
|
default: () => {
|
|
576
|
-
var
|
|
559
|
+
var p, I;
|
|
577
560
|
return [t("div", {
|
|
578
|
-
class: `${
|
|
579
|
-
title: (
|
|
580
|
-
}, [t(
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
}, null)]), e.showToolbarName && t("div", {
|
|
586
|
-
class: `${o}-toolbar-item-name`
|
|
587
|
-
}, [(S = l.value.toolbarTips) == null ? void 0 : S.title])])];
|
|
561
|
+
class: `${n}-toolbar-item`,
|
|
562
|
+
title: (p = l.value.toolbarTips) == null ? void 0 : p.title
|
|
563
|
+
}, [t(C, {
|
|
564
|
+
name: "title"
|
|
565
|
+
}, null), e.showToolbarName && t("div", {
|
|
566
|
+
class: `${n}-toolbar-item-name`
|
|
567
|
+
}, [(I = l.value.toolbarTips) == null ? void 0 : I.title])])];
|
|
588
568
|
}
|
|
589
569
|
});
|
|
590
570
|
case "sub":
|
|
591
571
|
return t("div", {
|
|
592
|
-
class: `${
|
|
593
|
-
title: (
|
|
572
|
+
class: `${n}-toolbar-item`,
|
|
573
|
+
title: (E = l.value.toolbarTips) == null ? void 0 : E.sub,
|
|
594
574
|
onClick: () => {
|
|
595
|
-
|
|
575
|
+
u("sub");
|
|
596
576
|
}
|
|
597
|
-
}, [t(
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
}, null)]), e.showToolbarName && t("div", {
|
|
603
|
-
class: `${o}-toolbar-item-name`
|
|
604
|
-
}, [(G = l.value.toolbarTips) == null ? void 0 : G.sub])]);
|
|
577
|
+
}, [t(C, {
|
|
578
|
+
name: "sub"
|
|
579
|
+
}, null), e.showToolbarName && t("div", {
|
|
580
|
+
class: `${n}-toolbar-item-name`
|
|
581
|
+
}, [(V = l.value.toolbarTips) == null ? void 0 : V.sub])]);
|
|
605
582
|
case "sup":
|
|
606
583
|
return t("div", {
|
|
607
|
-
class: `${
|
|
608
|
-
title: (
|
|
584
|
+
class: `${n}-toolbar-item`,
|
|
585
|
+
title: (_ = l.value.toolbarTips) == null ? void 0 : _.sup,
|
|
609
586
|
onClick: () => {
|
|
610
|
-
|
|
587
|
+
u("sup");
|
|
611
588
|
}
|
|
612
|
-
}, [t(
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
}, null)]), e.showToolbarName && t("div", {
|
|
618
|
-
class: `${o}-toolbar-item-name`
|
|
619
|
-
}, [(J = l.value.toolbarTips) == null ? void 0 : J.sup])]);
|
|
589
|
+
}, [t(C, {
|
|
590
|
+
name: "sup"
|
|
591
|
+
}, null), e.showToolbarName && t("div", {
|
|
592
|
+
class: `${n}-toolbar-item-name`
|
|
593
|
+
}, [(j = l.value.toolbarTips) == null ? void 0 : j.sup])]);
|
|
620
594
|
case "quote":
|
|
621
595
|
return t("div", {
|
|
622
|
-
class: `${
|
|
623
|
-
title: (
|
|
596
|
+
class: `${n}-toolbar-item`,
|
|
597
|
+
title: (se = l.value.toolbarTips) == null ? void 0 : se.quote,
|
|
624
598
|
onClick: () => {
|
|
625
|
-
|
|
599
|
+
u("quote");
|
|
626
600
|
}
|
|
627
|
-
}, [t(
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
}, null)]), e.showToolbarName && t("div", {
|
|
633
|
-
class: `${o}-toolbar-item-name`
|
|
634
|
-
}, [(K = l.value.toolbarTips) == null ? void 0 : K.quote])]);
|
|
601
|
+
}, [t(C, {
|
|
602
|
+
name: "quote"
|
|
603
|
+
}, null), e.showToolbarName && t("div", {
|
|
604
|
+
class: `${n}-toolbar-item-name`
|
|
605
|
+
}, [(te = l.value.toolbarTips) == null ? void 0 : te.quote])]);
|
|
635
606
|
case "unorderedList":
|
|
636
607
|
return t("div", {
|
|
637
|
-
class: `${
|
|
638
|
-
title: (
|
|
608
|
+
class: `${n}-toolbar-item`,
|
|
609
|
+
title: (Z = l.value.toolbarTips) == null ? void 0 : Z.unorderedList,
|
|
639
610
|
onClick: () => {
|
|
640
|
-
|
|
611
|
+
u("unorderedList");
|
|
641
612
|
}
|
|
642
|
-
}, [t(
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
"xlink:href": "#md-editor-icon-unordered-list"
|
|
647
|
-
}, null)]), e.showToolbarName && t("div", {
|
|
648
|
-
class: `${o}-toolbar-item-name`
|
|
613
|
+
}, [t(C, {
|
|
614
|
+
name: "unordered-list"
|
|
615
|
+
}, null), e.showToolbarName && t("div", {
|
|
616
|
+
class: `${n}-toolbar-item-name`
|
|
649
617
|
}, [(W = l.value.toolbarTips) == null ? void 0 : W.unorderedList])]);
|
|
650
618
|
case "orderedList":
|
|
651
619
|
return t("div", {
|
|
652
|
-
class: `${
|
|
653
|
-
title: (
|
|
620
|
+
class: `${n}-toolbar-item`,
|
|
621
|
+
title: (le = l.value.toolbarTips) == null ? void 0 : le.orderedList,
|
|
654
622
|
onClick: () => {
|
|
655
|
-
|
|
623
|
+
u("orderedList");
|
|
656
624
|
}
|
|
657
|
-
}, [t(
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
}, null)]), e.showToolbarName && t("div", {
|
|
663
|
-
class: `${o}-toolbar-item-name`
|
|
664
|
-
}, [(F = l.value.toolbarTips) == null ? void 0 : F.orderedList])]);
|
|
625
|
+
}, [t(C, {
|
|
626
|
+
name: "ordered-list"
|
|
627
|
+
}, null), e.showToolbarName && t("div", {
|
|
628
|
+
class: `${n}-toolbar-item-name`
|
|
629
|
+
}, [(z = l.value.toolbarTips) == null ? void 0 : z.orderedList])]);
|
|
665
630
|
case "task":
|
|
666
631
|
return t("div", {
|
|
667
|
-
class: `${
|
|
668
|
-
title: (
|
|
632
|
+
class: `${n}-toolbar-item`,
|
|
633
|
+
title: (O = l.value.toolbarTips) == null ? void 0 : O.task,
|
|
669
634
|
onClick: () => {
|
|
670
|
-
|
|
635
|
+
u("task");
|
|
671
636
|
}
|
|
672
|
-
}, [t(
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
}, null)]), e.showToolbarName && t("div", {
|
|
678
|
-
class: `${o}-toolbar-item-name`
|
|
679
|
-
}, [(ne = l.value.toolbarTips) == null ? void 0 : ne.task])]);
|
|
637
|
+
}, [t(C, {
|
|
638
|
+
name: "task"
|
|
639
|
+
}, null), e.showToolbarName && t("div", {
|
|
640
|
+
class: `${n}-toolbar-item-name`
|
|
641
|
+
}, [(F = l.value.toolbarTips) == null ? void 0 : F.task])]);
|
|
680
642
|
case "codeRow":
|
|
681
643
|
return t("div", {
|
|
682
|
-
class: `${
|
|
683
|
-
title: (
|
|
644
|
+
class: `${n}-toolbar-item`,
|
|
645
|
+
title: (oe = l.value.toolbarTips) == null ? void 0 : oe.codeRow,
|
|
684
646
|
onClick: () => {
|
|
685
|
-
|
|
647
|
+
u("codeRow");
|
|
686
648
|
}
|
|
687
|
-
}, [t(
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
}, null)]), e.showToolbarName && t("div", {
|
|
693
|
-
class: `${o}-toolbar-item-name`
|
|
694
|
-
}, [(ke = l.value.toolbarTips) == null ? void 0 : ke.codeRow])]);
|
|
649
|
+
}, [t(C, {
|
|
650
|
+
name: "code-row"
|
|
651
|
+
}, null), e.showToolbarName && t("div", {
|
|
652
|
+
class: `${n}-toolbar-item-name`
|
|
653
|
+
}, [(ce = l.value.toolbarTips) == null ? void 0 : ce.codeRow])]);
|
|
695
654
|
case "code":
|
|
696
655
|
return t("div", {
|
|
697
|
-
class: `${
|
|
656
|
+
class: `${n}-toolbar-item`,
|
|
698
657
|
title: (Ce = l.value.toolbarTips) == null ? void 0 : Ce.code,
|
|
699
658
|
onClick: () => {
|
|
700
|
-
|
|
659
|
+
u("code");
|
|
701
660
|
}
|
|
702
|
-
}, [t(
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
}, null)]), e.showToolbarName && t("div", {
|
|
708
|
-
class: `${o}-toolbar-item-name`
|
|
709
|
-
}, [(pe = l.value.toolbarTips) == null ? void 0 : pe.code])]);
|
|
661
|
+
}, [t(C, {
|
|
662
|
+
name: "code"
|
|
663
|
+
}, null), e.showToolbarName && t("div", {
|
|
664
|
+
class: `${n}-toolbar-item-name`
|
|
665
|
+
}, [($e = l.value.toolbarTips) == null ? void 0 : $e.code])]);
|
|
710
666
|
case "link":
|
|
711
667
|
return t("div", {
|
|
712
|
-
class: `${
|
|
713
|
-
title: (
|
|
668
|
+
class: `${n}-toolbar-item`,
|
|
669
|
+
title: (ye = l.value.toolbarTips) == null ? void 0 : ye.link,
|
|
714
670
|
onClick: () => {
|
|
715
671
|
c.type = "link", c.linkVisible = !0;
|
|
716
672
|
}
|
|
717
|
-
}, [t(
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
}, null)]), e.showToolbarName && t("div", {
|
|
723
|
-
class: `${o}-toolbar-item-name`
|
|
724
|
-
}, [(ye = l.value.toolbarTips) == null ? void 0 : ye.link])]);
|
|
673
|
+
}, [t(C, {
|
|
674
|
+
name: "link"
|
|
675
|
+
}, null), e.showToolbarName && t("div", {
|
|
676
|
+
class: `${n}-toolbar-item-name`
|
|
677
|
+
}, [(Te = l.value.toolbarTips) == null ? void 0 : Te.link])]);
|
|
725
678
|
case "image":
|
|
726
679
|
return e.noUploadImg ? t("div", {
|
|
727
|
-
class: `${
|
|
728
|
-
title: (
|
|
680
|
+
class: `${n}-toolbar-item`,
|
|
681
|
+
title: (we = l.value.toolbarTips) == null ? void 0 : we.image,
|
|
729
682
|
onClick: () => {
|
|
730
683
|
c.type = "image", c.linkVisible = !0;
|
|
731
684
|
}
|
|
732
|
-
}, [t(
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
visible: u.image,
|
|
742
|
-
onChange: (C) => {
|
|
743
|
-
u.image = C;
|
|
685
|
+
}, [t(C, {
|
|
686
|
+
name: "image"
|
|
687
|
+
}, null), e.showToolbarName && t("div", {
|
|
688
|
+
class: `${n}-toolbar-item-name`
|
|
689
|
+
}, [(xe = l.value.toolbarTips) == null ? void 0 : xe.image])]) : t(ae, {
|
|
690
|
+
relative: `#${r}`,
|
|
691
|
+
visible: d.image,
|
|
692
|
+
onChange: (p) => {
|
|
693
|
+
d.image = p;
|
|
744
694
|
},
|
|
745
695
|
overlay: t("ul", {
|
|
746
|
-
class: `${
|
|
696
|
+
class: `${n}-menu`,
|
|
747
697
|
onClick: () => {
|
|
748
|
-
|
|
698
|
+
d.title = !1;
|
|
749
699
|
}
|
|
750
700
|
}, [t("li", {
|
|
751
|
-
class: `${
|
|
701
|
+
class: `${n}-menu-item`,
|
|
752
702
|
onClick: () => {
|
|
753
703
|
c.type = "image", c.linkVisible = !0;
|
|
754
704
|
}
|
|
755
|
-
}, [(
|
|
756
|
-
class: `${
|
|
705
|
+
}, [(Se = l.value.imgTitleItem) == null ? void 0 : Se.link]), t("li", {
|
|
706
|
+
class: `${n}-menu-item`,
|
|
757
707
|
onClick: () => {
|
|
758
|
-
|
|
708
|
+
h.value.click();
|
|
759
709
|
}
|
|
760
|
-
}, [(
|
|
761
|
-
class: `${
|
|
710
|
+
}, [(Ae = l.value.imgTitleItem) == null ? void 0 : Ae.upload]), t("li", {
|
|
711
|
+
class: `${n}-menu-item`,
|
|
762
712
|
onClick: () => {
|
|
763
713
|
c.clipVisible = !0;
|
|
764
714
|
}
|
|
765
|
-
}, [(
|
|
715
|
+
}, [(Me = l.value.imgTitleItem) == null ? void 0 : Me.clip2upload])])
|
|
766
716
|
}, {
|
|
767
717
|
default: () => {
|
|
768
|
-
var
|
|
718
|
+
var p, I;
|
|
769
719
|
return [t("div", {
|
|
770
|
-
class: `${
|
|
771
|
-
title: (
|
|
772
|
-
}, [t(
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
}, null)]), e.showToolbarName && t("div", {
|
|
778
|
-
class: `${o}-toolbar-item-name`
|
|
779
|
-
}, [(S = l.value.toolbarTips) == null ? void 0 : S.image])])];
|
|
720
|
+
class: `${n}-toolbar-item`,
|
|
721
|
+
title: (p = l.value.toolbarTips) == null ? void 0 : p.image
|
|
722
|
+
}, [t(C, {
|
|
723
|
+
name: "image"
|
|
724
|
+
}, null), e.showToolbarName && t("div", {
|
|
725
|
+
class: `${n}-toolbar-item-name`
|
|
726
|
+
}, [(I = l.value.toolbarTips) == null ? void 0 : I.image])])];
|
|
780
727
|
}
|
|
781
728
|
});
|
|
782
729
|
case "table":
|
|
783
|
-
return t(
|
|
784
|
-
relative: `#${
|
|
785
|
-
visible:
|
|
786
|
-
onChange: (
|
|
787
|
-
|
|
730
|
+
return t(ae, {
|
|
731
|
+
relative: `#${r}`,
|
|
732
|
+
visible: d.table,
|
|
733
|
+
onChange: (p) => {
|
|
734
|
+
d.table = p;
|
|
788
735
|
},
|
|
789
736
|
key: "bar-table",
|
|
790
|
-
overlay: t(
|
|
737
|
+
overlay: t(yl, {
|
|
791
738
|
tableShape: e.tableShape,
|
|
792
|
-
onSelected: (
|
|
793
|
-
|
|
794
|
-
selectedShape:
|
|
739
|
+
onSelected: (p) => {
|
|
740
|
+
u("table", {
|
|
741
|
+
selectedShape: p
|
|
795
742
|
});
|
|
796
743
|
}
|
|
797
744
|
}, null)
|
|
798
745
|
}, {
|
|
799
746
|
default: () => {
|
|
800
|
-
var
|
|
747
|
+
var p, I;
|
|
801
748
|
return [t("div", {
|
|
802
|
-
class: `${
|
|
803
|
-
title: (
|
|
804
|
-
}, [t(
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
}, null)]), e.showToolbarName && t("div", {
|
|
810
|
-
class: `${o}-toolbar-item-name`
|
|
811
|
-
}, [(S = l.value.toolbarTips) == null ? void 0 : S.table])])];
|
|
749
|
+
class: `${n}-toolbar-item`,
|
|
750
|
+
title: (p = l.value.toolbarTips) == null ? void 0 : p.table
|
|
751
|
+
}, [t(C, {
|
|
752
|
+
name: "table"
|
|
753
|
+
}, null), e.showToolbarName && t("div", {
|
|
754
|
+
class: `${n}-toolbar-item-name`
|
|
755
|
+
}, [(I = l.value.toolbarTips) == null ? void 0 : I.table])])];
|
|
812
756
|
}
|
|
813
757
|
});
|
|
814
758
|
case "revoke":
|
|
815
759
|
return t("div", {
|
|
816
|
-
class: `${
|
|
817
|
-
title: (
|
|
760
|
+
class: `${n}-toolbar-item`,
|
|
761
|
+
title: (Ie = l.value.toolbarTips) == null ? void 0 : Ie.revoke,
|
|
818
762
|
onClick: () => {
|
|
819
|
-
|
|
763
|
+
b.emit(o, "ctrlZ");
|
|
820
764
|
}
|
|
821
|
-
}, [t(
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
}, null)]), e.showToolbarName && t("div", {
|
|
827
|
-
class: `${o}-toolbar-item-name`
|
|
828
|
-
}, [(Ie = l.value.toolbarTips) == null ? void 0 : Ie.revoke])]);
|
|
765
|
+
}, [t(C, {
|
|
766
|
+
name: "revoke"
|
|
767
|
+
}, null), e.showToolbarName && t("div", {
|
|
768
|
+
class: `${n}-toolbar-item-name`
|
|
769
|
+
}, [(Le = l.value.toolbarTips) == null ? void 0 : Le.revoke])]);
|
|
829
770
|
case "next":
|
|
830
771
|
return t("div", {
|
|
831
|
-
class: `${
|
|
832
|
-
title: (
|
|
772
|
+
class: `${n}-toolbar-item`,
|
|
773
|
+
title: (De = l.value.toolbarTips) == null ? void 0 : De.next,
|
|
833
774
|
onClick: () => {
|
|
834
|
-
|
|
775
|
+
b.emit(o, "ctrlShiftZ");
|
|
835
776
|
}
|
|
836
|
-
}, [t(
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
"xlink:href": "#md-editor-icon-next"
|
|
841
|
-
}, null)]), e.showToolbarName && t("div", {
|
|
842
|
-
class: `${o}-toolbar-item-name`
|
|
777
|
+
}, [t(C, {
|
|
778
|
+
name: "next"
|
|
779
|
+
}, null), e.showToolbarName && t("div", {
|
|
780
|
+
class: `${n}-toolbar-item-name`
|
|
843
781
|
}, [(Ee = l.value.toolbarTips) == null ? void 0 : Ee.next])]);
|
|
844
782
|
case "save":
|
|
845
783
|
return t("div", {
|
|
846
|
-
class: `${
|
|
847
|
-
title: (
|
|
784
|
+
class: `${n}-toolbar-item`,
|
|
785
|
+
title: (He = l.value.toolbarTips) == null ? void 0 : He.save,
|
|
848
786
|
onClick: () => {
|
|
849
|
-
|
|
787
|
+
b.emit(o, Ct);
|
|
850
788
|
}
|
|
851
|
-
}, [t(
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
"xlink:href": "#md-editor-icon-baocun"
|
|
856
|
-
}, null)]), e.showToolbarName && t("div", {
|
|
857
|
-
class: `${o}-toolbar-item-name`
|
|
789
|
+
}, [t(C, {
|
|
790
|
+
name: "baocun"
|
|
791
|
+
}, null), e.showToolbarName && t("div", {
|
|
792
|
+
class: `${n}-toolbar-item-name`
|
|
858
793
|
}, [(Ne = l.value.toolbarTips) == null ? void 0 : Ne.save])]);
|
|
859
794
|
case "prettier":
|
|
860
795
|
return e.noPrettier ? "" : t("div", {
|
|
861
|
-
class: `${
|
|
862
|
-
title: (
|
|
796
|
+
class: `${n}-toolbar-item`,
|
|
797
|
+
title: (Ve = l.value.toolbarTips) == null ? void 0 : Ve.prettier,
|
|
863
798
|
onClick: () => {
|
|
864
|
-
|
|
799
|
+
u("prettier");
|
|
865
800
|
}
|
|
866
|
-
}, [t(
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
}, null)]), e.showToolbarName && t("div", {
|
|
872
|
-
class: `${o}-toolbar-item-name`
|
|
873
|
-
}, [(Ve = l.value.toolbarTips) == null ? void 0 : Ve.prettier])]);
|
|
801
|
+
}, [t(C, {
|
|
802
|
+
name: "prettier"
|
|
803
|
+
}, null), e.showToolbarName && t("div", {
|
|
804
|
+
class: `${n}-toolbar-item-name`
|
|
805
|
+
}, [(Oe = l.value.toolbarTips) == null ? void 0 : Oe.prettier])]);
|
|
874
806
|
case "pageFullscreen":
|
|
875
807
|
return !e.setting.fullscreen && t("div", {
|
|
876
|
-
class: `${
|
|
877
|
-
title: (
|
|
808
|
+
class: `${n}-toolbar-item`,
|
|
809
|
+
title: (Be = l.value.toolbarTips) == null ? void 0 : Be.pageFullscreen,
|
|
878
810
|
onClick: () => {
|
|
879
811
|
e.updateSetting("pageFullscreen");
|
|
880
812
|
}
|
|
881
|
-
}, [t(
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
}, null)]), e.showToolbarName && t("div", {
|
|
887
|
-
class: `${o}-toolbar-item-name`
|
|
888
|
-
}, [(Be = l.value.toolbarTips) == null ? void 0 : Be.pageFullscreen])]);
|
|
813
|
+
}, [t(C, {
|
|
814
|
+
name: e.setting.pageFullscreen ? "suoxiao" : "fangda"
|
|
815
|
+
}, null), e.showToolbarName && t("div", {
|
|
816
|
+
class: `${n}-toolbar-item-name`
|
|
817
|
+
}, [(Fe = l.value.toolbarTips) == null ? void 0 : Fe.pageFullscreen])]);
|
|
889
818
|
case "fullscreen":
|
|
890
819
|
return t("div", {
|
|
891
|
-
class: `${
|
|
892
|
-
title: (
|
|
820
|
+
class: `${n}-toolbar-item`,
|
|
821
|
+
title: (Re = l.value.toolbarTips) == null ? void 0 : Re.fullscreen,
|
|
893
822
|
onClick: () => {
|
|
894
|
-
|
|
823
|
+
a();
|
|
895
824
|
}
|
|
896
|
-
}, [t(
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
}, null)]), e.showToolbarName && t("div", {
|
|
902
|
-
class: `${o}-toolbar-item-name`
|
|
903
|
-
}, [(Re = l.value.toolbarTips) == null ? void 0 : Re.fullscreen])]);
|
|
825
|
+
}, [t(C, {
|
|
826
|
+
name: e.setting.fullscreen ? "fullscreen-exit" : "fullscreen"
|
|
827
|
+
}, null), e.showToolbarName && t("div", {
|
|
828
|
+
class: `${n}-toolbar-item-name`
|
|
829
|
+
}, [(Pe = l.value.toolbarTips) == null ? void 0 : Pe.fullscreen])]);
|
|
904
830
|
case "preview":
|
|
905
831
|
return t("div", {
|
|
906
|
-
class: `${
|
|
907
|
-
title: (
|
|
832
|
+
class: `${n}-toolbar-item`,
|
|
833
|
+
title: (qe = l.value.toolbarTips) == null ? void 0 : qe.preview,
|
|
908
834
|
onClick: () => {
|
|
909
835
|
e.updateSetting("preview");
|
|
910
836
|
}
|
|
911
|
-
}, [t(
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
}, null)]), e.showToolbarName && t("div", {
|
|
917
|
-
class: `${o}-toolbar-item-name`
|
|
918
|
-
}, [(qe = l.value.toolbarTips) == null ? void 0 : qe.preview])]);
|
|
837
|
+
}, [t(C, {
|
|
838
|
+
name: "preview"
|
|
839
|
+
}, null), e.showToolbarName && t("div", {
|
|
840
|
+
class: `${n}-toolbar-item-name`
|
|
841
|
+
}, [(Ue = l.value.toolbarTips) == null ? void 0 : Ue.preview])]);
|
|
919
842
|
case "htmlPreview":
|
|
920
843
|
return t("div", {
|
|
921
|
-
class: `${
|
|
922
|
-
title: (
|
|
844
|
+
class: `${n}-toolbar-item`,
|
|
845
|
+
title: (Ge = l.value.toolbarTips) == null ? void 0 : Ge.htmlPreview,
|
|
923
846
|
onClick: () => {
|
|
924
847
|
e.updateSetting("htmlPreview");
|
|
925
848
|
}
|
|
926
|
-
}, [t(
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
}, null)]), e.showToolbarName && t("div", {
|
|
932
|
-
class: `${o}-toolbar-item-name`
|
|
933
|
-
}, [(Ge = l.value.toolbarTips) == null ? void 0 : Ge.htmlPreview])]);
|
|
849
|
+
}, [t(C, {
|
|
850
|
+
name: "coding"
|
|
851
|
+
}, null), e.showToolbarName && t("div", {
|
|
852
|
+
class: `${n}-toolbar-item-name`
|
|
853
|
+
}, [(Ke = l.value.toolbarTips) == null ? void 0 : Ke.htmlPreview])]);
|
|
934
854
|
case "catalog":
|
|
935
855
|
return t("div", {
|
|
936
|
-
class: `${
|
|
937
|
-
title: (
|
|
856
|
+
class: `${n}-toolbar-item`,
|
|
857
|
+
title: (_e = l.value.toolbarTips) == null ? void 0 : _e.catalog,
|
|
938
858
|
onClick: () => {
|
|
939
|
-
|
|
859
|
+
b.emit(o, Rt);
|
|
940
860
|
},
|
|
941
861
|
key: "bar-catalog"
|
|
942
|
-
}, [t(
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
}, null)]), e.showToolbarName && t("div", {
|
|
948
|
-
class: `${o}-toolbar-item-name`
|
|
949
|
-
}, [(_e = l.value.toolbarTips) == null ? void 0 : _e.catalog])]);
|
|
862
|
+
}, [t(C, {
|
|
863
|
+
name: "catalog"
|
|
864
|
+
}, null), e.showToolbarName && t("div", {
|
|
865
|
+
class: `${n}-toolbar-item-name`
|
|
866
|
+
}, [(je = l.value.toolbarTips) == null ? void 0 : je.catalog])]);
|
|
950
867
|
case "github":
|
|
951
868
|
return t("div", {
|
|
952
|
-
class: `${
|
|
953
|
-
title: (
|
|
954
|
-
onClick: () =>
|
|
955
|
-
}, [t(
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
}, null)]), e.showToolbarName && t("div", {
|
|
961
|
-
class: `${o}-toolbar-item-name`
|
|
962
|
-
}, [(We = l.value.toolbarTips) == null ? void 0 : We.github])]);
|
|
869
|
+
class: `${n}-toolbar-item`,
|
|
870
|
+
title: (We = l.value.toolbarTips) == null ? void 0 : We.github,
|
|
871
|
+
onClick: () => Ht("https://github.com/imzbf/md-editor-v3")
|
|
872
|
+
}, [t(C, {
|
|
873
|
+
name: "github"
|
|
874
|
+
}, null), e.showToolbarName && t("div", {
|
|
875
|
+
class: `${n}-toolbar-item-name`
|
|
876
|
+
}, [(ze = l.value.toolbarTips) == null ? void 0 : ze.github])]);
|
|
963
877
|
case "mermaid":
|
|
964
|
-
return t(
|
|
965
|
-
relative: `#${
|
|
966
|
-
visible:
|
|
967
|
-
onChange: (
|
|
968
|
-
|
|
878
|
+
return t(ae, {
|
|
879
|
+
relative: `#${r}`,
|
|
880
|
+
visible: d.mermaid,
|
|
881
|
+
onChange: (p) => {
|
|
882
|
+
d.mermaid = p;
|
|
969
883
|
},
|
|
970
884
|
overlay: t("ul", {
|
|
971
|
-
class: `${
|
|
885
|
+
class: `${n}-menu`,
|
|
972
886
|
onClick: () => {
|
|
973
|
-
|
|
887
|
+
d.mermaid = !1;
|
|
974
888
|
}
|
|
975
889
|
}, [t("li", {
|
|
976
|
-
class: `${
|
|
890
|
+
class: `${n}-menu-item`,
|
|
977
891
|
onClick: () => {
|
|
978
|
-
|
|
892
|
+
u("flow");
|
|
979
893
|
}
|
|
980
|
-
}, [(
|
|
981
|
-
class: `${
|
|
894
|
+
}, [(Ze = l.value.mermaid) == null ? void 0 : Ze.flow]), t("li", {
|
|
895
|
+
class: `${n}-menu-item`,
|
|
982
896
|
onClick: () => {
|
|
983
|
-
|
|
897
|
+
u("sequence");
|
|
984
898
|
}
|
|
985
|
-
}, [(
|
|
986
|
-
class: `${
|
|
899
|
+
}, [(Xe = l.value.mermaid) == null ? void 0 : Xe.sequence]), t("li", {
|
|
900
|
+
class: `${n}-menu-item`,
|
|
987
901
|
onClick: () => {
|
|
988
|
-
|
|
902
|
+
u("gantt");
|
|
989
903
|
}
|
|
990
|
-
}, [(
|
|
991
|
-
class: `${
|
|
904
|
+
}, [(Ye = l.value.mermaid) == null ? void 0 : Ye.gantt]), t("li", {
|
|
905
|
+
class: `${n}-menu-item`,
|
|
992
906
|
onClick: () => {
|
|
993
|
-
|
|
907
|
+
u("class");
|
|
994
908
|
}
|
|
995
|
-
}, [(
|
|
996
|
-
class: `${
|
|
909
|
+
}, [(Je = l.value.mermaid) == null ? void 0 : Je.class]), t("li", {
|
|
910
|
+
class: `${n}-menu-item`,
|
|
997
911
|
onClick: () => {
|
|
998
|
-
|
|
912
|
+
u("state");
|
|
999
913
|
}
|
|
1000
|
-
}, [(
|
|
1001
|
-
class: `${
|
|
914
|
+
}, [(Qe = l.value.mermaid) == null ? void 0 : Qe.state]), t("li", {
|
|
915
|
+
class: `${n}-menu-item`,
|
|
1002
916
|
onClick: () => {
|
|
1003
|
-
|
|
917
|
+
u("pie");
|
|
1004
918
|
}
|
|
1005
|
-
}, [(
|
|
1006
|
-
class: `${
|
|
919
|
+
}, [(et = l.value.mermaid) == null ? void 0 : et.pie]), t("li", {
|
|
920
|
+
class: `${n}-menu-item`,
|
|
1007
921
|
onClick: () => {
|
|
1008
|
-
|
|
922
|
+
u("relationship");
|
|
1009
923
|
}
|
|
1010
|
-
}, [(
|
|
1011
|
-
class: `${
|
|
924
|
+
}, [(tt = l.value.mermaid) == null ? void 0 : tt.relationship]), t("li", {
|
|
925
|
+
class: `${n}-menu-item`,
|
|
1012
926
|
onClick: () => {
|
|
1013
|
-
|
|
927
|
+
u("journey");
|
|
1014
928
|
}
|
|
1015
|
-
}, [(
|
|
929
|
+
}, [(lt = l.value.mermaid) == null ? void 0 : lt.journey])]),
|
|
1016
930
|
key: "bar-mermaid"
|
|
1017
931
|
}, {
|
|
1018
932
|
default: () => {
|
|
1019
|
-
var
|
|
933
|
+
var p, I;
|
|
1020
934
|
return [t("div", {
|
|
1021
|
-
class: `${
|
|
1022
|
-
title: (
|
|
1023
|
-
}, [t(
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
}, null)]), e.showToolbarName && t("div", {
|
|
1029
|
-
class: `${o}-toolbar-item-name`
|
|
1030
|
-
}, [(S = l.value.toolbarTips) == null ? void 0 : S.mermaid])])];
|
|
935
|
+
class: `${n}-toolbar-item`,
|
|
936
|
+
title: (p = l.value.toolbarTips) == null ? void 0 : p.mermaid
|
|
937
|
+
}, [t(C, {
|
|
938
|
+
name: "mermaid"
|
|
939
|
+
}, null), e.showToolbarName && t("div", {
|
|
940
|
+
class: `${n}-toolbar-item-name`
|
|
941
|
+
}, [(I = l.value.toolbarTips) == null ? void 0 : I.mermaid])])];
|
|
1031
942
|
}
|
|
1032
943
|
});
|
|
1033
944
|
case "katex":
|
|
1034
|
-
return t(
|
|
1035
|
-
relative: `#${
|
|
1036
|
-
visible:
|
|
1037
|
-
onChange: (
|
|
1038
|
-
|
|
945
|
+
return t(ae, {
|
|
946
|
+
relative: `#${r}`,
|
|
947
|
+
visible: d.katex,
|
|
948
|
+
onChange: (p) => {
|
|
949
|
+
d.katex = p;
|
|
1039
950
|
},
|
|
1040
951
|
overlay: t("ul", {
|
|
1041
|
-
class: `${
|
|
952
|
+
class: `${n}-menu`,
|
|
1042
953
|
onClick: () => {
|
|
1043
|
-
|
|
954
|
+
d.katex = !1;
|
|
1044
955
|
}
|
|
1045
956
|
}, [t("li", {
|
|
1046
|
-
class: `${
|
|
957
|
+
class: `${n}-menu-item`,
|
|
1047
958
|
onClick: () => {
|
|
1048
|
-
|
|
959
|
+
u("katexInline");
|
|
1049
960
|
}
|
|
1050
|
-
}, [(
|
|
1051
|
-
class: `${
|
|
961
|
+
}, [(ot = l.value.katex) == null ? void 0 : ot.inline]), t("li", {
|
|
962
|
+
class: `${n}-menu-item`,
|
|
1052
963
|
onClick: () => {
|
|
1053
|
-
|
|
964
|
+
u("katexBlock");
|
|
1054
965
|
}
|
|
1055
|
-
}, [(
|
|
966
|
+
}, [(at = l.value.katex) == null ? void 0 : at.block])]),
|
|
1056
967
|
key: "bar-katex"
|
|
1057
968
|
}, {
|
|
1058
969
|
default: () => {
|
|
1059
|
-
var
|
|
970
|
+
var p, I;
|
|
1060
971
|
return [t("div", {
|
|
1061
|
-
class: `${
|
|
1062
|
-
title: (
|
|
1063
|
-
}, [t(
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
}, null)]), e.showToolbarName && t("div", {
|
|
1069
|
-
class: `${o}-toolbar-item-name`
|
|
1070
|
-
}, [(S = l.value.toolbarTips) == null ? void 0 : S.katex])])];
|
|
972
|
+
class: `${n}-toolbar-item`,
|
|
973
|
+
title: (p = l.value.toolbarTips) == null ? void 0 : p.katex
|
|
974
|
+
}, [t(C, {
|
|
975
|
+
name: "formula"
|
|
976
|
+
}, null), e.showToolbarName && t("div", {
|
|
977
|
+
class: `${n}-toolbar-item-name`
|
|
978
|
+
}, [(I = l.value.toolbarTips) == null ? void 0 : I.katex])])];
|
|
1071
979
|
}
|
|
1072
980
|
});
|
|
1073
981
|
}
|
|
1074
982
|
else if (e.defToolbars instanceof Array) {
|
|
1075
|
-
const
|
|
1076
|
-
return
|
|
1077
|
-
insert(
|
|
1078
|
-
|
|
1079
|
-
generate:
|
|
983
|
+
const p = e.defToolbars[v];
|
|
984
|
+
return p ? nt(p, {
|
|
985
|
+
insert(ge) {
|
|
986
|
+
b.emit(o, "replace", "universal", {
|
|
987
|
+
generate: ge
|
|
1080
988
|
});
|
|
1081
989
|
}
|
|
1082
990
|
}) : "";
|
|
1083
991
|
} else if (e.defToolbars && e.defToolbars.children instanceof Array) {
|
|
1084
|
-
const
|
|
1085
|
-
return
|
|
1086
|
-
insert(
|
|
1087
|
-
|
|
1088
|
-
generate:
|
|
992
|
+
const p = e.defToolbars.children[v];
|
|
993
|
+
return p ? nt(p, {
|
|
994
|
+
insert(ge) {
|
|
995
|
+
b.emit(o, "replace", "universal", {
|
|
996
|
+
generate: ge
|
|
1089
997
|
});
|
|
1090
998
|
}
|
|
1091
999
|
}) : "";
|
|
1092
1000
|
} else
|
|
1093
1001
|
return "";
|
|
1094
1002
|
};
|
|
1095
|
-
return
|
|
1096
|
-
|
|
1003
|
+
return B(() => e.toolbars, () => {
|
|
1004
|
+
me(() => {
|
|
1097
1005
|
i.value && Et(i.value);
|
|
1098
1006
|
});
|
|
1099
1007
|
}, {
|
|
1100
1008
|
immediate: !0
|
|
1101
1009
|
}), () => {
|
|
1102
|
-
const v = m.value[0].map((k) => T(k)),
|
|
1103
|
-
return t(
|
|
1104
|
-
class: `${
|
|
1010
|
+
const v = m.value[0].map((k) => T(k)), f = m.value[1].map((k) => T(k));
|
|
1011
|
+
return t(pt, null, [e.toolbars.length > 0 && t("div", {
|
|
1012
|
+
class: `${n}-toolbar-wrapper`,
|
|
1105
1013
|
ref: i,
|
|
1106
|
-
id:
|
|
1014
|
+
id: r
|
|
1107
1015
|
}, [t("div", {
|
|
1108
|
-
class: [`${
|
|
1016
|
+
class: [`${n}-toolbar`, e.showToolbarName && `${n}-stn`]
|
|
1109
1017
|
}, [t("div", {
|
|
1110
|
-
class: `${
|
|
1018
|
+
class: `${n}-toolbar-left`,
|
|
1111
1019
|
ref: g
|
|
1112
1020
|
}, [v]), t("div", {
|
|
1113
|
-
class: `${
|
|
1114
|
-
}, [
|
|
1115
|
-
ref:
|
|
1021
|
+
class: `${n}-toolbar-right`
|
|
1022
|
+
}, [f])])]), t("input", {
|
|
1023
|
+
ref: h,
|
|
1116
1024
|
accept: "image/*",
|
|
1117
1025
|
type: "file",
|
|
1118
1026
|
multiple: !0,
|
|
1119
1027
|
style: {
|
|
1120
1028
|
display: "none"
|
|
1121
1029
|
}
|
|
1122
|
-
}, null), t(
|
|
1030
|
+
}, null), t(Ml, {
|
|
1123
1031
|
linkVisible: c.linkVisible,
|
|
1124
1032
|
clipVisible: c.clipVisible,
|
|
1125
1033
|
type: c.type,
|
|
@@ -1127,7 +1035,7 @@ const hl = /* @__PURE__ */ B({
|
|
|
1127
1035
|
c.linkVisible = !1, c.clipVisible = !1;
|
|
1128
1036
|
},
|
|
1129
1037
|
onOk: (k) => {
|
|
1130
|
-
k &&
|
|
1038
|
+
k && u(c.type, {
|
|
1131
1039
|
desc: k.desc,
|
|
1132
1040
|
url: k.url
|
|
1133
1041
|
}), c.linkVisible = !1, c.clipVisible = !1;
|
|
@@ -1135,16 +1043,16 @@ const hl = /* @__PURE__ */ B({
|
|
|
1135
1043
|
}, null)]);
|
|
1136
1044
|
};
|
|
1137
1045
|
}
|
|
1138
|
-
}),
|
|
1046
|
+
}), Ll = (e, o) => {
|
|
1139
1047
|
const l = Nt(() => {
|
|
1140
|
-
e.removeEventListener("scroll",
|
|
1141
|
-
}, 50),
|
|
1142
|
-
const i = e.clientHeight,
|
|
1143
|
-
|
|
1048
|
+
e.removeEventListener("scroll", a), e.addEventListener("scroll", a), o.removeEventListener("scroll", a), o.addEventListener("scroll", a);
|
|
1049
|
+
}, 50), a = (r) => {
|
|
1050
|
+
const i = e.clientHeight, d = o.clientHeight, u = e.scrollHeight, c = o.scrollHeight, g = (u - i) / (c - d);
|
|
1051
|
+
r.target === e ? (o.removeEventListener("scroll", a), o.scrollTo({
|
|
1144
1052
|
top: e.scrollTop / g
|
|
1145
1053
|
// behavior: 'smooth'
|
|
1146
|
-
}), l()) : (e.removeEventListener("scroll",
|
|
1147
|
-
top:
|
|
1054
|
+
}), l()) : (e.removeEventListener("scroll", a), e.scrollTo({
|
|
1055
|
+
top: o.scrollTop * g
|
|
1148
1056
|
// behavior: 'smooth'
|
|
1149
1057
|
}), l());
|
|
1150
1058
|
};
|
|
@@ -1155,269 +1063,272 @@ const hl = /* @__PURE__ */ B({
|
|
|
1155
1063
|
});
|
|
1156
1064
|
},
|
|
1157
1065
|
() => {
|
|
1158
|
-
e.removeEventListener("scroll",
|
|
1066
|
+
e.removeEventListener("scroll", a), o.removeEventListener("scroll", a);
|
|
1159
1067
|
}
|
|
1160
1068
|
];
|
|
1161
|
-
},
|
|
1162
|
-
const { view:
|
|
1163
|
-
let
|
|
1164
|
-
const
|
|
1165
|
-
|
|
1166
|
-
const
|
|
1167
|
-
(
|
|
1168
|
-
), { lines: $ } =
|
|
1169
|
-
let T = 1, v =
|
|
1170
|
-
for (let
|
|
1171
|
-
|
|
1069
|
+
}, Dl = (e, o, l) => {
|
|
1070
|
+
const { view: a } = l, r = (h) => a.lineBlockAt(a.state.doc.line(h).from).top, i = (h) => a.lineBlockAt(a.state.doc.line(h).from).height;
|
|
1071
|
+
let d = [];
|
|
1072
|
+
const u = () => {
|
|
1073
|
+
d = [];
|
|
1074
|
+
const h = Array.from(o.querySelectorAll("[data-line]")).map(
|
|
1075
|
+
(f) => Number(f.dataset.line) + 1
|
|
1076
|
+
), { lines: $ } = a.state.doc;
|
|
1077
|
+
let T = 1, v = h.shift() ?? $;
|
|
1078
|
+
for (let f = 1; f <= $; f++)
|
|
1079
|
+
f === v && (T = f, v = h.shift() || $ + 1), d.push({
|
|
1172
1080
|
start: T,
|
|
1173
1081
|
end: v - 1
|
|
1174
1082
|
});
|
|
1175
1083
|
};
|
|
1176
1084
|
let c = 0, g = 0;
|
|
1177
|
-
const m =
|
|
1178
|
-
var
|
|
1179
|
-
if (!((
|
|
1085
|
+
const m = Vt((h) => {
|
|
1086
|
+
var k, y, w, x, H, M, ee;
|
|
1087
|
+
if (!((k = o.firstElementChild) != null && k.firstElementChild))
|
|
1180
1088
|
return;
|
|
1181
|
-
const $ =
|
|
1182
|
-
if (
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1089
|
+
const $ = a.lineBlockAtHeight(a.scrollDOM.scrollTop), { number: T } = a.state.doc.lineAt($.from);
|
|
1090
|
+
if (T > d.length || a.state.doc.lines < d[d.length - 1].end)
|
|
1091
|
+
return;
|
|
1092
|
+
let v = +getComputedStyle(o).paddingTop.replace("px", "");
|
|
1093
|
+
const f = +getComputedStyle(o).paddingBottom.replace("px", "");
|
|
1094
|
+
if (h.target === e) {
|
|
1095
|
+
if (g !== 0)
|
|
1096
|
+
return;
|
|
1097
|
+
c++;
|
|
1098
|
+
const S = d[T - 1];
|
|
1099
|
+
let A = r(S.end) + i(S.end), q = 0;
|
|
1100
|
+
const P = r(S.start), N = o.querySelector(`[data-line="${S.start - 1}"]`) || ((y = o.firstElementChild) == null ? void 0 : y.firstElementChild), D = o.querySelector(`[data-line="${S.end}"]`) || ((w = o.lastElementChild) == null ? void 0 : w.lastElementChild);
|
|
1101
|
+
let E = 0, V = 0;
|
|
1102
|
+
P === 0 ? N === D ? (v = 0, A = a.contentDOM.offsetHeight - a.scrollDOM.offsetHeight, q = a.scrollDOM.scrollTop / A, E = D.offsetTop + D.offsetHeight - o.clientHeight) : (q = a.scrollDOM.scrollTop / A, E = D.offsetTop) : A > a.scrollDOM.scrollHeight - a.scrollDOM.clientHeight ? (q = (a.scrollDOM.scrollTop - P) / (a.scrollDOM.scrollHeight - a.scrollDOM.clientHeight - P), V = N.offsetTop, E = o.scrollHeight - o.clientHeight - V + 10) : (q = (a.scrollDOM.scrollTop - P) / (A - P), V = N.offsetTop, E = D.offsetTop - V);
|
|
1103
|
+
const _ = V - v + E * q;
|
|
1104
|
+
rt(o, _, () => {
|
|
1105
|
+
c--;
|
|
1106
|
+
});
|
|
1107
|
+
} else {
|
|
1108
|
+
if (c !== 0)
|
|
1109
|
+
return;
|
|
1110
|
+
g++;
|
|
1111
|
+
const S = Array.from(
|
|
1112
|
+
o.querySelectorAll("[data-line]")
|
|
1113
|
+
), A = o.scrollTop, q = o.scrollHeight;
|
|
1114
|
+
let P = S.length === 0 ? 1 : Math.ceil(
|
|
1115
|
+
Number(S[S.length - 1].dataset.line) * (A / q)
|
|
1116
|
+
), N = (x = o.firstElementChild) == null ? void 0 : x.firstElementChild;
|
|
1117
|
+
for (let O = P; O >= 0; O--) {
|
|
1118
|
+
const F = o.querySelector(`[data-line="${O}"]`);
|
|
1119
|
+
if (F && F.offsetTop <= A) {
|
|
1120
|
+
N = F, P = O;
|
|
1121
|
+
break;
|
|
1212
1122
|
}
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
}
|
|
1229
|
-
E = p[N - 1];
|
|
1230
|
-
continue;
|
|
1231
|
-
}
|
|
1232
|
-
const ne = F.offsetTop;
|
|
1233
|
-
if (ee <= M && ne > M) {
|
|
1234
|
-
O = E, V = F;
|
|
1123
|
+
}
|
|
1124
|
+
let D = (H = o.firstElementChild) == null ? void 0 : H.firstElementChild, E = (M = o.firstElementChild) == null ? void 0 : M.lastElementChild;
|
|
1125
|
+
for (; S.length > 0; ) {
|
|
1126
|
+
const O = S.indexOf(N);
|
|
1127
|
+
if (O + 1 >= S.length)
|
|
1128
|
+
break;
|
|
1129
|
+
const F = S[O + 1];
|
|
1130
|
+
if (O === -1) {
|
|
1131
|
+
E = F;
|
|
1132
|
+
break;
|
|
1133
|
+
}
|
|
1134
|
+
const oe = N.offsetTop;
|
|
1135
|
+
if (oe > A) {
|
|
1136
|
+
if (O === 0) {
|
|
1137
|
+
D = N, E = F;
|
|
1235
1138
|
break;
|
|
1236
1139
|
}
|
|
1237
|
-
|
|
1140
|
+
N = S[O - 1];
|
|
1141
|
+
continue;
|
|
1238
1142
|
}
|
|
1239
|
-
const
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
O === ((I = a.firstElementChild) == null ? void 0 : I.firstElementChild) ? (G = Math.max(M / _, 0), W = K + Q - j) : K > r.scrollDOM.scrollHeight - r.scrollDOM.clientHeight ? (G = Math.max(
|
|
1246
|
-
(M - D) / (a.scrollHeight - D - a.clientHeight),
|
|
1247
|
-
0
|
|
1248
|
-
), K = n(r.state.doc.lines) + i(r.state.doc.lines), W = 8 + K - j - e.clientHeight) : (G = Math.max(
|
|
1249
|
-
(M - D) / (_ - D),
|
|
1250
|
-
0
|
|
1251
|
-
), W = K + Q - j), rt(e, j + W * G, () => {
|
|
1252
|
-
g--;
|
|
1253
|
-
});
|
|
1143
|
+
const ce = F.offsetTop;
|
|
1144
|
+
if (oe <= A && ce > A) {
|
|
1145
|
+
D = N, E = F;
|
|
1146
|
+
break;
|
|
1147
|
+
}
|
|
1148
|
+
N = F;
|
|
1254
1149
|
}
|
|
1150
|
+
const V = D.offsetTop;
|
|
1151
|
+
let _ = E.offsetTop, j = 0;
|
|
1152
|
+
const { start: se, end: te } = d[Number(D.dataset.line || 0)], Z = r(se);
|
|
1153
|
+
let W = r(te);
|
|
1154
|
+
const le = i(te);
|
|
1155
|
+
let z = 0;
|
|
1156
|
+
D === ((ee = o.firstElementChild) == null ? void 0 : ee.firstElementChild) ? (D === E ? (_ = E.offsetHeight - o.offsetHeight + v + f, z = a.contentDOM.offsetHeight - a.scrollDOM.offsetHeight) : z = W + le - Z, j = Math.max(A / _, 0)) : W > a.scrollDOM.scrollHeight - a.scrollDOM.clientHeight ? (j = Math.max(
|
|
1157
|
+
(A - V) / (o.scrollHeight - V - o.clientHeight),
|
|
1158
|
+
0
|
|
1159
|
+
), W = r(a.state.doc.lines) + i(a.state.doc.lines), z = 8 + W - Z - e.clientHeight) : (j = Math.max(
|
|
1160
|
+
(A - V) / (_ - V),
|
|
1161
|
+
0
|
|
1162
|
+
), z = W + le - Z), rt(e, Z + z * j, () => {
|
|
1163
|
+
g--;
|
|
1164
|
+
});
|
|
1165
|
+
}
|
|
1255
1166
|
}, 10);
|
|
1256
1167
|
return [
|
|
1257
1168
|
() => {
|
|
1258
|
-
|
|
1169
|
+
u(), e.addEventListener("scroll", m), o.addEventListener("scroll", m), e.dispatchEvent(new Event("scroll"));
|
|
1259
1170
|
},
|
|
1260
1171
|
() => {
|
|
1261
|
-
|
|
1172
|
+
d = [], e.removeEventListener("scroll", m), o.removeEventListener("scroll", m);
|
|
1262
1173
|
}
|
|
1263
1174
|
];
|
|
1264
|
-
},
|
|
1265
|
-
const
|
|
1266
|
-
let
|
|
1175
|
+
}, El = (e, o, l) => {
|
|
1176
|
+
const a = L("editorId");
|
|
1177
|
+
let r = () => {
|
|
1267
1178
|
}, i = () => {
|
|
1268
1179
|
};
|
|
1269
|
-
const
|
|
1270
|
-
|
|
1271
|
-
const
|
|
1272
|
-
`[id="${
|
|
1180
|
+
const d = () => {
|
|
1181
|
+
r();
|
|
1182
|
+
const u = document.querySelector(".cm-scroller"), c = document.querySelector(
|
|
1183
|
+
`[id="${a}-preview-wrapper"][data-show="true"]`
|
|
1273
1184
|
), g = document.querySelector(
|
|
1274
|
-
`[id="${
|
|
1185
|
+
`[id="${a}-html-wrapper"][data-show="true"]`
|
|
1275
1186
|
);
|
|
1276
|
-
(c || g) && ([i,
|
|
1277
|
-
|
|
1187
|
+
(c || g) && ([i, r] = (c ? Dl : Ll)(
|
|
1188
|
+
u,
|
|
1278
1189
|
c || g,
|
|
1279
1190
|
l.value
|
|
1280
1191
|
)), e.scrollAuto && i();
|
|
1281
1192
|
};
|
|
1282
|
-
|
|
1193
|
+
B(
|
|
1283
1194
|
[
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1195
|
+
o,
|
|
1196
|
+
ne(e.setting, "preview"),
|
|
1197
|
+
ne(e.setting, "htmlPreview"),
|
|
1198
|
+
ne(e.setting, "fullscreen"),
|
|
1199
|
+
ne(e.setting, "pageFullscreen")
|
|
1289
1200
|
],
|
|
1290
1201
|
() => {
|
|
1291
|
-
|
|
1202
|
+
me(d);
|
|
1292
1203
|
}
|
|
1293
|
-
),
|
|
1204
|
+
), B(
|
|
1294
1205
|
() => e.scrollAuto,
|
|
1295
|
-
(
|
|
1296
|
-
|
|
1206
|
+
(u) => {
|
|
1207
|
+
u ? i() : r();
|
|
1297
1208
|
}
|
|
1298
|
-
),
|
|
1299
|
-
},
|
|
1300
|
-
var m,
|
|
1301
|
-
let
|
|
1302
|
-
const c =
|
|
1209
|
+
), Y(d);
|
|
1210
|
+
}, Hl = El, Nl = (e, o, l) => {
|
|
1211
|
+
var m, h, $, T, v, f;
|
|
1212
|
+
let a = "", r = 0, i = 0, d = !0, u = !1;
|
|
1213
|
+
const c = o.getSelectedText(), g = (m = X.editorConfig) == null ? void 0 : m.mermaidTemplate;
|
|
1303
1214
|
if (/^h[1-6]{1}$/.test(e)) {
|
|
1304
1215
|
const k = e.replace(/^h(\d)/, (y, w) => new Array(Number(w)).fill("#", 0, w).join(""));
|
|
1305
|
-
|
|
1216
|
+
a = `${k} ${c}`, r = k.length + 1;
|
|
1306
1217
|
} else if (e === "prettier") {
|
|
1307
|
-
const k = window.prettier || (($ = (
|
|
1308
|
-
((T = window.prettierPlugins) == null ? void 0 : T.markdown) || ((
|
|
1218
|
+
const k = window.prettier || (($ = (h = X.editorExtensions) == null ? void 0 : h.prettier) == null ? void 0 : $.prettierInstance), y = [
|
|
1219
|
+
((T = window.prettierPlugins) == null ? void 0 : T.markdown) || ((f = (v = X.editorExtensions) == null ? void 0 : v.prettier) == null ? void 0 : f.parserMarkdownInstance)
|
|
1309
1220
|
];
|
|
1310
|
-
!k || y[0] === void 0 ? (
|
|
1221
|
+
!k || y[0] === void 0 ? (b.emit(l.editorId, "errorCatcher", {
|
|
1311
1222
|
name: "prettier",
|
|
1312
1223
|
message: "prettier is undefined"
|
|
1313
|
-
}),
|
|
1224
|
+
}), a = o.getValue()) : a = k.format(o.getValue(), {
|
|
1314
1225
|
parser: "markdown",
|
|
1315
1226
|
plugins: y
|
|
1316
|
-
}),
|
|
1227
|
+
}), d = !1, u = !0;
|
|
1317
1228
|
} else
|
|
1318
1229
|
switch (e) {
|
|
1319
1230
|
case "bold": {
|
|
1320
|
-
|
|
1231
|
+
a = `**${c}**`, r = 2, i = -2;
|
|
1321
1232
|
break;
|
|
1322
1233
|
}
|
|
1323
1234
|
case "underline": {
|
|
1324
|
-
|
|
1235
|
+
a = `<u>${c}</u>`, r = 3, i = -4;
|
|
1325
1236
|
break;
|
|
1326
1237
|
}
|
|
1327
1238
|
case "italic": {
|
|
1328
|
-
|
|
1239
|
+
a = `*${c}*`, r = 1, i = -1;
|
|
1329
1240
|
break;
|
|
1330
1241
|
}
|
|
1331
1242
|
case "strikeThrough": {
|
|
1332
|
-
|
|
1243
|
+
a = `~~${c}~~`, r = 2, i = -2;
|
|
1333
1244
|
break;
|
|
1334
1245
|
}
|
|
1335
1246
|
case "sub": {
|
|
1336
|
-
|
|
1247
|
+
a = `<sub>${c}</sub>`, r = 5, i = -6;
|
|
1337
1248
|
break;
|
|
1338
1249
|
}
|
|
1339
1250
|
case "sup": {
|
|
1340
|
-
|
|
1251
|
+
a = `<sup>${c}</sup>`, r = 5, i = -6;
|
|
1341
1252
|
break;
|
|
1342
1253
|
}
|
|
1343
1254
|
case "codeRow": {
|
|
1344
|
-
|
|
1255
|
+
a = "`" + c + "`", r = 1, i = -1;
|
|
1345
1256
|
break;
|
|
1346
1257
|
}
|
|
1347
1258
|
case "quote": {
|
|
1348
|
-
|
|
1259
|
+
a = `> ${c}`, r = 2;
|
|
1349
1260
|
break;
|
|
1350
1261
|
}
|
|
1351
1262
|
case "orderedList": {
|
|
1352
|
-
|
|
1263
|
+
a = `1. ${c}`, r = 3;
|
|
1353
1264
|
break;
|
|
1354
1265
|
}
|
|
1355
1266
|
case "unorderedList": {
|
|
1356
|
-
|
|
1267
|
+
a = `- ${c}`, r = 2;
|
|
1357
1268
|
break;
|
|
1358
1269
|
}
|
|
1359
1270
|
case "task": {
|
|
1360
|
-
|
|
1271
|
+
a = `- [ ] ${c}`, r = 6;
|
|
1361
1272
|
break;
|
|
1362
1273
|
}
|
|
1363
1274
|
case "code": {
|
|
1364
1275
|
const k = l.text || c || "", y = l.mode || "language";
|
|
1365
|
-
|
|
1276
|
+
a = `\`\`\`${y}
|
|
1366
1277
|
${k}
|
|
1367
1278
|
\`\`\`
|
|
1368
|
-
`,
|
|
1279
|
+
`, r = 3, i = 3 + y.length - a.length;
|
|
1369
1280
|
break;
|
|
1370
1281
|
}
|
|
1371
1282
|
case "table": {
|
|
1372
|
-
|
|
1283
|
+
a = "|";
|
|
1373
1284
|
const { selectedShape: k = { x: 1, y: 1 } } = l, { x: y, y: w } = k;
|
|
1374
1285
|
for (let x = 0; x <= w; x++)
|
|
1375
|
-
|
|
1376
|
-
|
|
1286
|
+
a += " col |";
|
|
1287
|
+
a += `
|
|
1377
1288
|
|`;
|
|
1378
1289
|
for (let x = 0; x <= w; x++)
|
|
1379
|
-
|
|
1290
|
+
a += " - |";
|
|
1380
1291
|
for (let x = 0; x <= y; x++) {
|
|
1381
|
-
|
|
1292
|
+
a += `
|
|
1382
1293
|
|`;
|
|
1383
|
-
for (let
|
|
1384
|
-
|
|
1294
|
+
for (let H = 0; H <= w; H++)
|
|
1295
|
+
a += " content |";
|
|
1385
1296
|
}
|
|
1386
|
-
|
|
1297
|
+
r = 2, i = 5 - a.length;
|
|
1387
1298
|
break;
|
|
1388
1299
|
}
|
|
1389
1300
|
case "link": {
|
|
1390
1301
|
const { desc: k, url: y } = l;
|
|
1391
|
-
|
|
1302
|
+
a = `[${k}](${y})`, d = !1;
|
|
1392
1303
|
break;
|
|
1393
1304
|
}
|
|
1394
1305
|
case "image": {
|
|
1395
1306
|
const { desc: k, url: y, urls: w } = l;
|
|
1396
|
-
w instanceof Array ?
|
|
1397
|
-
`, "") :
|
|
1398
|
-
`,
|
|
1307
|
+
w instanceof Array ? a = w.reduce((x, H) => x + `
|
|
1308
|
+
`, "") : a = `
|
|
1309
|
+
`, d = !1;
|
|
1399
1310
|
break;
|
|
1400
1311
|
}
|
|
1401
1312
|
case "flow": {
|
|
1402
|
-
|
|
1313
|
+
a = `\`\`\`mermaid
|
|
1403
1314
|
${(g == null ? void 0 : g.flow) || `flowchart TD
|
|
1404
1315
|
Start --> Stop`}
|
|
1405
1316
|
\`\`\`
|
|
1406
|
-
`,
|
|
1317
|
+
`, r = 3, i = 10 - a.length;
|
|
1407
1318
|
break;
|
|
1408
1319
|
}
|
|
1409
1320
|
case "sequence": {
|
|
1410
|
-
|
|
1321
|
+
a = `\`\`\`mermaid
|
|
1411
1322
|
${(g == null ? void 0 : g.sequence) || `sequenceDiagram
|
|
1412
1323
|
A->>B: hello!
|
|
1413
1324
|
B-->>A: hi!
|
|
1414
1325
|
A-)B: bye!`}
|
|
1415
1326
|
\`\`\`
|
|
1416
|
-
`,
|
|
1327
|
+
`, r = 3, i = 10 - a.length;
|
|
1417
1328
|
break;
|
|
1418
1329
|
}
|
|
1419
1330
|
case "gantt": {
|
|
1420
|
-
|
|
1331
|
+
a = `\`\`\`mermaid
|
|
1421
1332
|
${(g == null ? void 0 : g.gantt) || `gantt
|
|
1422
1333
|
title A Gantt Diagram
|
|
1423
1334
|
dateFormat YYYY-MM-DD
|
|
@@ -1425,47 +1336,47 @@ section Section
|
|
|
1425
1336
|
A task :a1, 2014-01-01, 30d
|
|
1426
1337
|
Another task :after a1, 20d`}
|
|
1427
1338
|
\`\`\`
|
|
1428
|
-
`,
|
|
1339
|
+
`, r = 3, i = 10 - a.length;
|
|
1429
1340
|
break;
|
|
1430
1341
|
}
|
|
1431
1342
|
case "class": {
|
|
1432
|
-
|
|
1343
|
+
a = `\`\`\`mermaid
|
|
1433
1344
|
${(g == null ? void 0 : g.class) || `classDiagram
|
|
1434
1345
|
class Animal
|
|
1435
1346
|
Vehicle <|-- Car`}
|
|
1436
1347
|
\`\`\`
|
|
1437
|
-
`,
|
|
1348
|
+
`, r = 3, i = 10 - a.length;
|
|
1438
1349
|
break;
|
|
1439
1350
|
}
|
|
1440
1351
|
case "state": {
|
|
1441
|
-
|
|
1352
|
+
a = `\`\`\`mermaid
|
|
1442
1353
|
${(g == null ? void 0 : g.state) || `stateDiagram-v2
|
|
1443
1354
|
s1 --> s2`}
|
|
1444
1355
|
\`\`\`
|
|
1445
|
-
`,
|
|
1356
|
+
`, r = 3, i = 10 - a.length;
|
|
1446
1357
|
break;
|
|
1447
1358
|
}
|
|
1448
1359
|
case "pie": {
|
|
1449
|
-
|
|
1360
|
+
a = `\`\`\`mermaid
|
|
1450
1361
|
${(g == null ? void 0 : g.pie) || `pie title Pets adopted by volunteers
|
|
1451
1362
|
"Dogs" : 386
|
|
1452
1363
|
"Cats" : 85
|
|
1453
1364
|
"Rats" : 15`}
|
|
1454
1365
|
\`\`\`
|
|
1455
|
-
`,
|
|
1366
|
+
`, r = 3, i = 10 - a.length;
|
|
1456
1367
|
break;
|
|
1457
1368
|
}
|
|
1458
1369
|
case "relationship": {
|
|
1459
|
-
|
|
1370
|
+
a = `\`\`\`mermaid
|
|
1460
1371
|
${(g == null ? void 0 : g.relationship) || `erDiagram
|
|
1461
1372
|
CAR ||--o{ NAMED-DRIVER : allows
|
|
1462
1373
|
PERSON ||--o{ NAMED-DRIVER : is`}
|
|
1463
1374
|
\`\`\`
|
|
1464
|
-
`,
|
|
1375
|
+
`, r = 3, i = 10 - a.length;
|
|
1465
1376
|
break;
|
|
1466
1377
|
}
|
|
1467
1378
|
case "journey": {
|
|
1468
|
-
|
|
1379
|
+
a = `\`\`\`mermaid
|
|
1469
1380
|
${(g == null ? void 0 : g.journey) || `journey
|
|
1470
1381
|
title My working day
|
|
1471
1382
|
section Go to work
|
|
@@ -1476,50 +1387,50 @@ ${(g == null ? void 0 : g.journey) || `journey
|
|
|
1476
1387
|
Go downstairs: 5: Me
|
|
1477
1388
|
Sit down: 5: Me`}
|
|
1478
1389
|
\`\`\`
|
|
1479
|
-
`,
|
|
1390
|
+
`, r = 3, i = 10 - a.length;
|
|
1480
1391
|
break;
|
|
1481
1392
|
}
|
|
1482
1393
|
case "katexInline": {
|
|
1483
|
-
|
|
1394
|
+
a = "$$", r = 1, i = -1;
|
|
1484
1395
|
break;
|
|
1485
1396
|
}
|
|
1486
1397
|
case "katexBlock": {
|
|
1487
|
-
|
|
1398
|
+
a = `$$
|
|
1488
1399
|
|
|
1489
1400
|
$$
|
|
1490
|
-
`,
|
|
1401
|
+
`, r = 3, i = -4;
|
|
1491
1402
|
break;
|
|
1492
1403
|
}
|
|
1493
1404
|
case "universal": {
|
|
1494
1405
|
const { generate: k } = l, y = k(c);
|
|
1495
|
-
|
|
1406
|
+
a = y.targetValue, d = y.select, r = y.deviationStart, i = y.deviationEnd;
|
|
1496
1407
|
}
|
|
1497
1408
|
}
|
|
1498
1409
|
return {
|
|
1499
|
-
text:
|
|
1410
|
+
text: a,
|
|
1500
1411
|
options: {
|
|
1501
1412
|
// 是否选中
|
|
1502
|
-
select:
|
|
1413
|
+
select: d,
|
|
1503
1414
|
// 选中时,开始位置的偏移量
|
|
1504
|
-
deviationStart:
|
|
1415
|
+
deviationStart: r,
|
|
1505
1416
|
// 结束的偏移量
|
|
1506
1417
|
deviationEnd: i,
|
|
1507
1418
|
// 是否整个替换
|
|
1508
|
-
replaceAll:
|
|
1419
|
+
replaceAll: u
|
|
1509
1420
|
}
|
|
1510
1421
|
};
|
|
1511
|
-
},
|
|
1422
|
+
}, Vl = "#e5c07b", st = "var(--md-color)", Ol = "#56b6c2", Bl = "#ffffff", re = "var(--md-color)", ct = "#e5c07b", Fl = "#e5c07b", Rl = "var(--md-color)", ut = "#d19a66", Pl = "#c678dd", ql = "#21252b", Ul = "#2c313a", dt = "var(--md-bk-color)", be = "var(--md-bk-color)", Gl = "#ceedfa33", mt = "#528bff", Kl = pe.theme(
|
|
1512
1423
|
{
|
|
1513
1424
|
"&": {
|
|
1514
|
-
color:
|
|
1425
|
+
color: re,
|
|
1515
1426
|
backgroundColor: dt
|
|
1516
1427
|
},
|
|
1517
1428
|
".cm-content": {
|
|
1518
|
-
caretColor:
|
|
1429
|
+
caretColor: mt
|
|
1519
1430
|
},
|
|
1520
|
-
".cm-cursor, .cm-dropCursor": { borderLeftColor:
|
|
1521
|
-
"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection": { backgroundColor:
|
|
1522
|
-
".cm-panels": { backgroundColor:
|
|
1431
|
+
".cm-cursor, .cm-dropCursor": { borderLeftColor: mt },
|
|
1432
|
+
"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection": { backgroundColor: Gl },
|
|
1433
|
+
".cm-panels": { backgroundColor: ql, color: re },
|
|
1523
1434
|
".cm-panels.cm-panels-top": { borderBottom: "2px solid black" },
|
|
1524
1435
|
".cm-panels.cm-panels-bottom": { borderTop: "2px solid black" },
|
|
1525
1436
|
".cm-searchMatch": {
|
|
@@ -1536,12 +1447,12 @@ $$
|
|
|
1536
1447
|
},
|
|
1537
1448
|
".cm-gutters": {
|
|
1538
1449
|
backgroundColor: dt,
|
|
1539
|
-
color:
|
|
1450
|
+
color: re,
|
|
1540
1451
|
borderRight: "1px solid",
|
|
1541
1452
|
borderColor: "var(--md-border-color)"
|
|
1542
1453
|
},
|
|
1543
1454
|
".cm-activeLineGutter": {
|
|
1544
|
-
backgroundColor:
|
|
1455
|
+
backgroundColor: Ul
|
|
1545
1456
|
},
|
|
1546
1457
|
".cm-foldPlaceholder": {
|
|
1547
1458
|
backgroundColor: "transparent",
|
|
@@ -1550,29 +1461,29 @@ $$
|
|
|
1550
1461
|
},
|
|
1551
1462
|
".cm-tooltip": {
|
|
1552
1463
|
border: "1px solid var(--md-border-color)",
|
|
1553
|
-
backgroundColor:
|
|
1464
|
+
backgroundColor: be
|
|
1554
1465
|
},
|
|
1555
1466
|
".cm-tooltip .cm-tooltip-arrow:before": {
|
|
1556
1467
|
borderTopColor: "transparent",
|
|
1557
1468
|
borderBottomColor: "transparent"
|
|
1558
1469
|
},
|
|
1559
1470
|
".cm-tooltip .cm-tooltip-arrow:after": {
|
|
1560
|
-
borderTopColor:
|
|
1561
|
-
borderBottomColor:
|
|
1471
|
+
borderTopColor: be,
|
|
1472
|
+
borderBottomColor: be
|
|
1562
1473
|
},
|
|
1563
1474
|
".cm-tooltip-autocomplete": {
|
|
1564
1475
|
"& > ul > li[aria-selected]": {
|
|
1565
|
-
color:
|
|
1476
|
+
color: re
|
|
1566
1477
|
}
|
|
1567
1478
|
}
|
|
1568
1479
|
},
|
|
1569
1480
|
{ dark: !0 }
|
|
1570
|
-
),
|
|
1571
|
-
{ tag: s.keyword, color:
|
|
1572
|
-
{ tag: [s.name, s.deleted, s.character, s.propertyName, s.macroName], color:
|
|
1573
|
-
{ tag: [s.function(s.variableName), s.labelName], color:
|
|
1574
|
-
{ tag: [s.color, s.constant(s.name), s.standard(s.name)], color:
|
|
1575
|
-
{ tag: [s.definition(s.name), s.separator], color:
|
|
1481
|
+
), _l = yt.define([
|
|
1482
|
+
{ tag: s.keyword, color: Pl },
|
|
1483
|
+
{ tag: [s.name, s.deleted, s.character, s.propertyName, s.macroName], color: st },
|
|
1484
|
+
{ tag: [s.function(s.variableName), s.labelName], color: Fl },
|
|
1485
|
+
{ tag: [s.color, s.constant(s.name), s.standard(s.name)], color: ut },
|
|
1486
|
+
{ tag: [s.definition(s.name), s.separator], color: re },
|
|
1576
1487
|
{
|
|
1577
1488
|
tag: [
|
|
1578
1489
|
s.typeName,
|
|
@@ -1584,7 +1495,7 @@ $$
|
|
|
1584
1495
|
s.self,
|
|
1585
1496
|
s.namespace
|
|
1586
1497
|
],
|
|
1587
|
-
color:
|
|
1498
|
+
color: Vl
|
|
1588
1499
|
},
|
|
1589
1500
|
{
|
|
1590
1501
|
tag: [
|
|
@@ -1596,32 +1507,32 @@ $$
|
|
|
1596
1507
|
s.link,
|
|
1597
1508
|
s.special(s.string)
|
|
1598
1509
|
],
|
|
1599
|
-
color:
|
|
1510
|
+
color: Ol
|
|
1600
1511
|
},
|
|
1601
|
-
{ tag: [s.meta, s.comment], color:
|
|
1512
|
+
{ tag: [s.meta, s.comment], color: ct },
|
|
1602
1513
|
{ tag: s.strong, fontWeight: "bold" },
|
|
1603
1514
|
{ tag: s.emphasis, fontStyle: "italic" },
|
|
1604
1515
|
{ tag: s.strikethrough, textDecoration: "line-through" },
|
|
1605
|
-
{ tag: s.link, color:
|
|
1606
|
-
{ tag: s.heading, fontWeight: "bold", color:
|
|
1607
|
-
{ tag: [s.atom, s.bool, s.special(s.variableName)], color:
|
|
1608
|
-
{ tag: [s.processingInstruction, s.string, s.inserted], color:
|
|
1609
|
-
{ tag: s.invalid, color:
|
|
1610
|
-
]),
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
],
|
|
1516
|
+
{ tag: s.link, color: ct, textDecoration: "underline" },
|
|
1517
|
+
{ tag: s.heading, fontWeight: "bold", color: st },
|
|
1518
|
+
{ tag: [s.atom, s.bool, s.special(s.variableName)], color: ut },
|
|
1519
|
+
{ tag: [s.processingInstruction, s.string, s.inserted], color: Rl },
|
|
1520
|
+
{ tag: s.invalid, color: Bl }
|
|
1521
|
+
]), jl = [
|
|
1522
|
+
Kl,
|
|
1523
|
+
Tt(_l)
|
|
1524
|
+
], Wl = "#e5c07b", gt = "#3f4a54", zl = "#56b6c2", Zl = "#fff", ie = "#3f4a54", ft = "#2d8cf0", Xl = "#2d8cf0", Yl = "#3f4a54", bt = "#d19a66", Jl = "#c678dd", Ql = "#21252b", eo = "#ceedfa33", ht = "var(--md-bk-color)", he = "var(--md-bk-color)", to = "#bad5fa", vt = "#3f4a54", lo = pe.theme(
|
|
1614
1525
|
{
|
|
1615
1526
|
"&": {
|
|
1616
|
-
color:
|
|
1617
|
-
backgroundColor:
|
|
1527
|
+
color: ie,
|
|
1528
|
+
backgroundColor: ht
|
|
1618
1529
|
},
|
|
1619
1530
|
".cm-content": {
|
|
1620
|
-
caretColor:
|
|
1531
|
+
caretColor: vt
|
|
1621
1532
|
},
|
|
1622
|
-
".cm-cursor, .cm-dropCursor": { borderLeftColor:
|
|
1623
|
-
"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection": { backgroundColor:
|
|
1624
|
-
".cm-panels": { backgroundColor:
|
|
1533
|
+
".cm-cursor, .cm-dropCursor": { borderLeftColor: vt },
|
|
1534
|
+
"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection": { backgroundColor: to },
|
|
1535
|
+
".cm-panels": { backgroundColor: Ql, color: ie },
|
|
1625
1536
|
".cm-panels.cm-panels-top": { borderBottom: "2px solid black" },
|
|
1626
1537
|
".cm-panels.cm-panels-bottom": { borderTop: "2px solid black" },
|
|
1627
1538
|
".cm-searchMatch": {
|
|
@@ -1637,13 +1548,13 @@ $$
|
|
|
1637
1548
|
backgroundColor: "#bad0f847"
|
|
1638
1549
|
},
|
|
1639
1550
|
".cm-gutters": {
|
|
1640
|
-
backgroundColor:
|
|
1641
|
-
color:
|
|
1551
|
+
backgroundColor: ht,
|
|
1552
|
+
color: ie,
|
|
1642
1553
|
borderRight: "1px solid",
|
|
1643
1554
|
borderColor: "var(--md-border-color)"
|
|
1644
1555
|
},
|
|
1645
1556
|
".cm-activeLineGutter": {
|
|
1646
|
-
backgroundColor:
|
|
1557
|
+
backgroundColor: eo
|
|
1647
1558
|
},
|
|
1648
1559
|
".cm-foldPlaceholder": {
|
|
1649
1560
|
backgroundColor: "transparent",
|
|
@@ -1652,29 +1563,29 @@ $$
|
|
|
1652
1563
|
},
|
|
1653
1564
|
".cm-tooltip": {
|
|
1654
1565
|
border: "1px solid var(--md-border-color)",
|
|
1655
|
-
backgroundColor:
|
|
1566
|
+
backgroundColor: he
|
|
1656
1567
|
},
|
|
1657
1568
|
".cm-tooltip .cm-tooltip-arrow:before": {
|
|
1658
1569
|
borderTopColor: "transparent",
|
|
1659
1570
|
borderBottomColor: "transparent"
|
|
1660
1571
|
},
|
|
1661
1572
|
".cm-tooltip .cm-tooltip-arrow:after": {
|
|
1662
|
-
borderTopColor:
|
|
1663
|
-
borderBottomColor:
|
|
1573
|
+
borderTopColor: he,
|
|
1574
|
+
borderBottomColor: he
|
|
1664
1575
|
},
|
|
1665
1576
|
".cm-tooltip-autocomplete": {
|
|
1666
1577
|
"& > ul > li[aria-selected]": {
|
|
1667
|
-
color:
|
|
1578
|
+
color: ie
|
|
1668
1579
|
}
|
|
1669
1580
|
}
|
|
1670
1581
|
}
|
|
1671
1582
|
// { dark: true }
|
|
1672
|
-
),
|
|
1673
|
-
{ tag: s.keyword, color:
|
|
1674
|
-
{ tag: [s.name, s.deleted, s.character, s.propertyName, s.macroName], color:
|
|
1675
|
-
{ tag: [s.function(s.variableName), s.labelName], color:
|
|
1676
|
-
{ tag: [s.color, s.constant(s.name), s.standard(s.name)], color:
|
|
1677
|
-
{ tag: [s.definition(s.name), s.separator], color:
|
|
1583
|
+
), oo = yt.define([
|
|
1584
|
+
{ tag: s.keyword, color: Jl },
|
|
1585
|
+
{ tag: [s.name, s.deleted, s.character, s.propertyName, s.macroName], color: gt },
|
|
1586
|
+
{ tag: [s.function(s.variableName), s.labelName], color: Xl },
|
|
1587
|
+
{ tag: [s.color, s.constant(s.name), s.standard(s.name)], color: bt },
|
|
1588
|
+
{ tag: [s.definition(s.name), s.separator], color: ie },
|
|
1678
1589
|
{
|
|
1679
1590
|
tag: [
|
|
1680
1591
|
s.typeName,
|
|
@@ -1686,7 +1597,7 @@ $$
|
|
|
1686
1597
|
s.self,
|
|
1687
1598
|
s.namespace
|
|
1688
1599
|
],
|
|
1689
|
-
color:
|
|
1600
|
+
color: Wl
|
|
1690
1601
|
},
|
|
1691
1602
|
{
|
|
1692
1603
|
tag: [
|
|
@@ -1698,63 +1609,63 @@ $$
|
|
|
1698
1609
|
s.link,
|
|
1699
1610
|
s.special(s.string)
|
|
1700
1611
|
],
|
|
1701
|
-
color:
|
|
1612
|
+
color: zl
|
|
1702
1613
|
},
|
|
1703
|
-
{ tag: [s.meta, s.comment], color:
|
|
1614
|
+
{ tag: [s.meta, s.comment], color: ft },
|
|
1704
1615
|
{ tag: s.strong, fontWeight: "bold" },
|
|
1705
1616
|
{ tag: s.emphasis, fontStyle: "italic" },
|
|
1706
1617
|
{ tag: s.strikethrough, textDecoration: "line-through" },
|
|
1707
|
-
{ tag: s.link, color:
|
|
1708
|
-
{ tag: s.heading, fontWeight: "bold", color:
|
|
1709
|
-
{ tag: [s.atom, s.bool, s.special(s.variableName)], color:
|
|
1710
|
-
{ tag: [s.processingInstruction, s.string, s.inserted], color:
|
|
1711
|
-
{ tag: s.invalid, color:
|
|
1712
|
-
]),
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
],
|
|
1716
|
-
const g = `${e}${
|
|
1717
|
-
i.dispatch(i.state.replaceSelection(`${g}${l}${
|
|
1718
|
-
const m =
|
|
1618
|
+
{ tag: s.link, color: ft, textDecoration: "underline" },
|
|
1619
|
+
{ tag: s.heading, fontWeight: "bold", color: gt },
|
|
1620
|
+
{ tag: [s.atom, s.bool, s.special(s.variableName)], color: bt },
|
|
1621
|
+
{ tag: [s.processingInstruction, s.string, s.inserted], color: Yl },
|
|
1622
|
+
{ tag: s.invalid, color: Zl }
|
|
1623
|
+
]), ao = [
|
|
1624
|
+
lo,
|
|
1625
|
+
Tt(oo)
|
|
1626
|
+
], de = (e, o, l, a, r) => (i, d, u, c) => {
|
|
1627
|
+
const g = `${e}${o}`.slice(c - u);
|
|
1628
|
+
i.dispatch(i.state.replaceSelection(`${g}${l}${a}`));
|
|
1629
|
+
const m = u + d.label.length + (r === "title" ? l.length : 0);
|
|
1719
1630
|
i.dispatch({
|
|
1720
|
-
selection:
|
|
1631
|
+
selection: G.create(
|
|
1721
1632
|
[
|
|
1722
|
-
|
|
1723
|
-
|
|
1633
|
+
G.range(
|
|
1634
|
+
u + d.label.length + (r === "title" ? 1 : -o.length),
|
|
1724
1635
|
m
|
|
1725
1636
|
),
|
|
1726
|
-
|
|
1637
|
+
G.cursor(m)
|
|
1727
1638
|
],
|
|
1728
1639
|
1
|
|
1729
1640
|
)
|
|
1730
1641
|
}), i.focus();
|
|
1731
|
-
},
|
|
1732
|
-
const i = e.slice(
|
|
1733
|
-
|
|
1734
|
-
},
|
|
1735
|
-
const
|
|
1736
|
-
const
|
|
1642
|
+
}, kt = (e) => (o, l, a, r) => {
|
|
1643
|
+
const i = e.slice(r - a);
|
|
1644
|
+
o.dispatch(o.state.replaceSelection(`${i} `));
|
|
1645
|
+
}, no = (e) => {
|
|
1646
|
+
const o = (l) => {
|
|
1647
|
+
const a = l.matchBefore(
|
|
1737
1648
|
/^#+|^-\s*\[*\s*\]*|`+|\[|!\[*|^\|\s?\|?|^\$\$?|!+\s*\w*/
|
|
1738
1649
|
);
|
|
1739
|
-
return
|
|
1740
|
-
from:
|
|
1650
|
+
return a === null || a.from == a.to && l.explicit ? null : {
|
|
1651
|
+
from: a.from,
|
|
1741
1652
|
options: [
|
|
1742
1653
|
// 标题
|
|
1743
|
-
...["h1", "h2", "h3", "h4", "h5", "h6"].map((
|
|
1744
|
-
const
|
|
1654
|
+
...["h1", "h2", "h3", "h4", "h5", "h6"].map((r, i) => {
|
|
1655
|
+
const d = new Array(i + 1).fill("#").join("");
|
|
1745
1656
|
return {
|
|
1746
|
-
label:
|
|
1657
|
+
label: d,
|
|
1747
1658
|
type: "text",
|
|
1748
|
-
apply:
|
|
1659
|
+
apply: kt(d)
|
|
1749
1660
|
};
|
|
1750
1661
|
}),
|
|
1751
1662
|
// 任务列表
|
|
1752
|
-
...["unchecked", "checked"].map((
|
|
1753
|
-
const i =
|
|
1663
|
+
...["unchecked", "checked"].map((r) => {
|
|
1664
|
+
const i = r === "checked" ? "- [x]" : "- [ ]";
|
|
1754
1665
|
return {
|
|
1755
1666
|
label: i,
|
|
1756
1667
|
type: "text",
|
|
1757
|
-
apply:
|
|
1668
|
+
apply: kt(i)
|
|
1758
1669
|
};
|
|
1759
1670
|
}),
|
|
1760
1671
|
// 代码
|
|
@@ -1762,10 +1673,10 @@ $$
|
|
|
1762
1673
|
["`", ""],
|
|
1763
1674
|
["```", "language"],
|
|
1764
1675
|
["```mermaid\n", ""]
|
|
1765
|
-
].map((
|
|
1766
|
-
label: `${
|
|
1676
|
+
].map((r) => ({
|
|
1677
|
+
label: `${r[0]}${r[1]}`,
|
|
1767
1678
|
type: "text",
|
|
1768
|
-
apply:
|
|
1679
|
+
apply: de(r[0], r[1], "", r[0] === "`" ? "`" : "\n```", "type")
|
|
1769
1680
|
})),
|
|
1770
1681
|
// 链接
|
|
1771
1682
|
{
|
|
@@ -1790,12 +1701,12 @@ $$
|
|
|
1790
1701
|
{
|
|
1791
1702
|
label: "$",
|
|
1792
1703
|
type: "text",
|
|
1793
|
-
apply:
|
|
1704
|
+
apply: de("$", "", "", "$", "type")
|
|
1794
1705
|
},
|
|
1795
1706
|
{
|
|
1796
1707
|
label: "$$",
|
|
1797
1708
|
type: "text",
|
|
1798
|
-
apply:
|
|
1709
|
+
apply: de("$$", "", `
|
|
1799
1710
|
`, `
|
|
1800
1711
|
$$`, "title")
|
|
1801
1712
|
},
|
|
@@ -1817,40 +1728,40 @@ $$`, "title")
|
|
|
1817
1728
|
"caution",
|
|
1818
1729
|
"error",
|
|
1819
1730
|
"attention"
|
|
1820
|
-
].map((
|
|
1821
|
-
label: `!!! ${
|
|
1731
|
+
].map((r) => ({
|
|
1732
|
+
label: `!!! ${r}`,
|
|
1822
1733
|
type: "text",
|
|
1823
|
-
apply:
|
|
1734
|
+
apply: de("!!!", ` ${r}`, " Title", `
|
|
1824
1735
|
|
|
1825
1736
|
!!!`, "title")
|
|
1826
1737
|
}))
|
|
1827
1738
|
]
|
|
1828
1739
|
};
|
|
1829
1740
|
};
|
|
1830
|
-
return
|
|
1831
|
-
override: e ? [
|
|
1741
|
+
return fl({
|
|
1742
|
+
override: e ? [o, nl, ...e] : [o]
|
|
1832
1743
|
});
|
|
1833
|
-
},
|
|
1834
|
-
const
|
|
1835
|
-
return (
|
|
1836
|
-
effects:
|
|
1744
|
+
}, ro = no, J = (e) => {
|
|
1745
|
+
const o = new ml();
|
|
1746
|
+
return (a) => (o.get(e.state) ? e.dispatch({ effects: o.reconfigure(a) }) : e.dispatch({
|
|
1747
|
+
effects: gl.appendConfig.of(o.of(a))
|
|
1837
1748
|
}), !0);
|
|
1838
1749
|
};
|
|
1839
|
-
class
|
|
1840
|
-
constructor(
|
|
1841
|
-
|
|
1842
|
-
|
|
1750
|
+
class io {
|
|
1751
|
+
constructor(o) {
|
|
1752
|
+
U(this, "view");
|
|
1753
|
+
U(this, "maxLength", Number.MAX_SAFE_INTEGER);
|
|
1843
1754
|
// 切换tabSize的执行方法。切换时,Compartment实例需要相同
|
|
1844
|
-
|
|
1845
|
-
|
|
1755
|
+
U(this, "toggleTabSize");
|
|
1756
|
+
U(this, "togglePlaceholder");
|
|
1846
1757
|
/**
|
|
1847
1758
|
* 设置全部的扩展
|
|
1848
1759
|
*/
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
this.view =
|
|
1760
|
+
U(this, "setExtensions");
|
|
1761
|
+
U(this, "toggleDisabled");
|
|
1762
|
+
U(this, "toggleReadOnly");
|
|
1763
|
+
U(this, "toggleMaxlength");
|
|
1764
|
+
this.view = o, this.toggleTabSize = J(this.view), this.togglePlaceholder = J(this.view), this.setExtensions = J(this.view), this.toggleDisabled = J(this.view), this.toggleReadOnly = J(this.view), this.toggleMaxlength = J(this.view);
|
|
1854
1765
|
}
|
|
1855
1766
|
getValue() {
|
|
1856
1767
|
return this.view.state.doc.toString();
|
|
@@ -1862,12 +1773,12 @@ class ao {
|
|
|
1862
1773
|
* @param from 插入开始位置
|
|
1863
1774
|
* @param to 插入结束位置
|
|
1864
1775
|
*/
|
|
1865
|
-
setValue(
|
|
1776
|
+
setValue(o, l = 0, a = this.view.state.doc.length) {
|
|
1866
1777
|
this.view.dispatch({
|
|
1867
1778
|
changes: {
|
|
1868
1779
|
from: l,
|
|
1869
|
-
to:
|
|
1870
|
-
insert:
|
|
1780
|
+
to: a,
|
|
1781
|
+
insert: o
|
|
1871
1782
|
}
|
|
1872
1783
|
});
|
|
1873
1784
|
}
|
|
@@ -1875,8 +1786,8 @@ class ao {
|
|
|
1875
1786
|
* 获取选中的文本
|
|
1876
1787
|
*/
|
|
1877
1788
|
getSelectedText() {
|
|
1878
|
-
const { from:
|
|
1879
|
-
return this.view.state.sliceDoc(
|
|
1789
|
+
const { from: o, to: l } = this.view.state.selection.main;
|
|
1790
|
+
return this.view.state.sliceDoc(o, l);
|
|
1880
1791
|
}
|
|
1881
1792
|
/**
|
|
1882
1793
|
* 使用新的内容替换选中的内容
|
|
@@ -1884,7 +1795,7 @@ class ao {
|
|
|
1884
1795
|
* @param text 待替换内容
|
|
1885
1796
|
* @param options 替换后是否选中
|
|
1886
1797
|
*/
|
|
1887
|
-
replaceSelectedText(
|
|
1798
|
+
replaceSelectedText(o, l = {
|
|
1888
1799
|
// 是否选中
|
|
1889
1800
|
select: !0,
|
|
1890
1801
|
// 选中时,开始位置的偏移量
|
|
@@ -1893,38 +1804,38 @@ class ao {
|
|
|
1893
1804
|
deviationEnd: 0,
|
|
1894
1805
|
// 直接替换所有文本
|
|
1895
1806
|
replaceAll: !1
|
|
1896
|
-
},
|
|
1807
|
+
}, a) {
|
|
1897
1808
|
try {
|
|
1898
1809
|
if (l.replaceAll) {
|
|
1899
|
-
if (this.setValue(
|
|
1810
|
+
if (this.setValue(o), o.length > this.maxLength)
|
|
1900
1811
|
throw new Error("The input text is too long");
|
|
1901
1812
|
return;
|
|
1902
1813
|
}
|
|
1903
|
-
if (this.view.state.doc.length - this.getSelectedText().length +
|
|
1814
|
+
if (this.view.state.doc.length - this.getSelectedText().length + o.length > this.maxLength)
|
|
1904
1815
|
throw new Error("The input text is too long");
|
|
1905
|
-
const { from:
|
|
1906
|
-
if (this.view.dispatch(this.view.state.replaceSelection(
|
|
1907
|
-
const i =
|
|
1816
|
+
const { from: r } = this.view.state.selection.main;
|
|
1817
|
+
if (this.view.dispatch(this.view.state.replaceSelection(o)), l.select) {
|
|
1818
|
+
const i = r + o.length + l.deviationEnd;
|
|
1908
1819
|
this.view.dispatch({
|
|
1909
|
-
selection:
|
|
1820
|
+
selection: G.create(
|
|
1910
1821
|
[
|
|
1911
|
-
|
|
1912
|
-
|
|
1822
|
+
G.range(r + l.deviationStart, i),
|
|
1823
|
+
G.cursor(i)
|
|
1913
1824
|
],
|
|
1914
1825
|
1
|
|
1915
1826
|
)
|
|
1916
1827
|
});
|
|
1917
1828
|
}
|
|
1918
1829
|
this.view.focus();
|
|
1919
|
-
} catch (
|
|
1920
|
-
if (
|
|
1921
|
-
|
|
1830
|
+
} catch (r) {
|
|
1831
|
+
if (r.message === "The input text is too long")
|
|
1832
|
+
b.emit(a, "errorCatcher", {
|
|
1922
1833
|
name: "overlength",
|
|
1923
|
-
message:
|
|
1924
|
-
data:
|
|
1834
|
+
message: r.message,
|
|
1835
|
+
data: o
|
|
1925
1836
|
});
|
|
1926
1837
|
else
|
|
1927
|
-
throw
|
|
1838
|
+
throw r;
|
|
1928
1839
|
}
|
|
1929
1840
|
}
|
|
1930
1841
|
/**
|
|
@@ -1932,10 +1843,10 @@ class ao {
|
|
|
1932
1843
|
*
|
|
1933
1844
|
* @param tabSize 需要切换的大小
|
|
1934
1845
|
*/
|
|
1935
|
-
setTabSize(
|
|
1846
|
+
setTabSize(o) {
|
|
1936
1847
|
this.toggleTabSize([
|
|
1937
|
-
|
|
1938
|
-
|
|
1848
|
+
fe.tabSize.of(o),
|
|
1849
|
+
dl.of(" ".repeat(o))
|
|
1939
1850
|
]);
|
|
1940
1851
|
}
|
|
1941
1852
|
/**
|
|
@@ -1943,240 +1854,241 @@ class ao {
|
|
|
1943
1854
|
*
|
|
1944
1855
|
* @param t 目标内容
|
|
1945
1856
|
*/
|
|
1946
|
-
setPlaceholder(
|
|
1947
|
-
this.togglePlaceholder(
|
|
1857
|
+
setPlaceholder(o) {
|
|
1858
|
+
this.togglePlaceholder(tl(o));
|
|
1948
1859
|
}
|
|
1949
|
-
focus(
|
|
1950
|
-
if (this.view.focus(), !
|
|
1860
|
+
focus(o) {
|
|
1861
|
+
if (this.view.focus(), !o)
|
|
1951
1862
|
return;
|
|
1952
|
-
let l = 0,
|
|
1953
|
-
switch (
|
|
1863
|
+
let l = 0, a = 0, r = 0;
|
|
1864
|
+
switch (o) {
|
|
1954
1865
|
case "start":
|
|
1955
1866
|
break;
|
|
1956
1867
|
case "end": {
|
|
1957
|
-
l =
|
|
1868
|
+
l = a = r = this.getValue().length;
|
|
1958
1869
|
break;
|
|
1959
1870
|
}
|
|
1960
1871
|
default:
|
|
1961
|
-
l =
|
|
1872
|
+
l = o.rangeAnchor || o.cursorPos, a = o.rangeHead || o.cursorPos, r = o.cursorPos;
|
|
1962
1873
|
}
|
|
1963
1874
|
this.view.dispatch({
|
|
1964
1875
|
scrollIntoView: !0,
|
|
1965
|
-
selection:
|
|
1966
|
-
[
|
|
1876
|
+
selection: G.create(
|
|
1877
|
+
[G.range(l, a), G.cursor(r)],
|
|
1967
1878
|
1
|
|
1968
1879
|
)
|
|
1969
1880
|
});
|
|
1970
1881
|
}
|
|
1971
|
-
setDisabled(
|
|
1972
|
-
this.toggleDisabled([
|
|
1882
|
+
setDisabled(o) {
|
|
1883
|
+
this.toggleDisabled([pe.editable.of(!o)]);
|
|
1973
1884
|
}
|
|
1974
|
-
setReadOnly(
|
|
1975
|
-
this.toggleReadOnly([
|
|
1885
|
+
setReadOnly(o) {
|
|
1886
|
+
this.toggleReadOnly([fe.readOnly.of(o)]);
|
|
1976
1887
|
}
|
|
1977
|
-
setMaxLength(
|
|
1978
|
-
this.maxLength =
|
|
1979
|
-
|
|
1888
|
+
setMaxLength(o) {
|
|
1889
|
+
this.maxLength = o, this.toggleMaxlength([
|
|
1890
|
+
fe.changeFilter.of((l) => l.newDoc.length <= o)
|
|
1980
1891
|
]);
|
|
1981
1892
|
}
|
|
1982
1893
|
}
|
|
1983
|
-
const
|
|
1984
|
-
const
|
|
1985
|
-
return (
|
|
1986
|
-
if (!
|
|
1894
|
+
const so = (e) => {
|
|
1895
|
+
const o = L("editorId");
|
|
1896
|
+
return (a) => {
|
|
1897
|
+
if (!a.clipboardData)
|
|
1987
1898
|
return;
|
|
1988
|
-
if (
|
|
1989
|
-
const { files: i } =
|
|
1990
|
-
|
|
1991
|
-
|
|
1899
|
+
if (a.clipboardData.files.length > 0) {
|
|
1900
|
+
const { files: i } = a.clipboardData;
|
|
1901
|
+
b.emit(
|
|
1902
|
+
o,
|
|
1992
1903
|
"uploadImage",
|
|
1993
|
-
Array.from(i).filter((
|
|
1994
|
-
),
|
|
1904
|
+
Array.from(i).filter((d) => /image\/.*/.test(d.type))
|
|
1905
|
+
), a.preventDefault();
|
|
1995
1906
|
return;
|
|
1996
1907
|
}
|
|
1997
|
-
if (e.autoDetectCode &&
|
|
1998
|
-
const i = JSON.parse(
|
|
1999
|
-
|
|
1908
|
+
if (e.autoDetectCode && a.clipboardData.types.includes("vscode-editor-data")) {
|
|
1909
|
+
const i = JSON.parse(a.clipboardData.getData("vscode-editor-data"));
|
|
1910
|
+
b.emit(o, "replace", "code", {
|
|
2000
1911
|
mode: i.mode,
|
|
2001
|
-
text:
|
|
2002
|
-
}),
|
|
1912
|
+
text: a.clipboardData.getData("text/plain")
|
|
1913
|
+
}), a.preventDefault();
|
|
2003
1914
|
return;
|
|
2004
1915
|
}
|
|
2005
|
-
const
|
|
2006
|
-
e.maxlength &&
|
|
1916
|
+
const r = a.clipboardData.getData("text/plain");
|
|
1917
|
+
e.maxlength && r.length + e.modelValue.length > e.maxlength && b.emit(o, "errorCatcher", {
|
|
2007
1918
|
name: "overlength",
|
|
2008
1919
|
message: "The input text is too long",
|
|
2009
|
-
data:
|
|
1920
|
+
data: r
|
|
2010
1921
|
});
|
|
2011
1922
|
};
|
|
2012
|
-
},
|
|
2013
|
-
const
|
|
2014
|
-
|
|
2015
|
-
|
|
2016
|
-
name:
|
|
1923
|
+
}, co = so, uo = (e) => {
|
|
1924
|
+
const o = L("editorId");
|
|
1925
|
+
Y(() => {
|
|
1926
|
+
b.on(o, {
|
|
1927
|
+
name: Pt,
|
|
2017
1928
|
callback(l) {
|
|
2018
|
-
var
|
|
2019
|
-
(
|
|
1929
|
+
var a;
|
|
1930
|
+
(a = e.value) == null || a.focus(l);
|
|
2020
1931
|
}
|
|
2021
1932
|
});
|
|
2022
1933
|
});
|
|
2023
|
-
},
|
|
1934
|
+
}, mo = uo, go = (e, o) => [
|
|
2024
1935
|
{
|
|
2025
1936
|
key: "Ctrl-b",
|
|
2026
1937
|
mac: "Cmd-b",
|
|
2027
|
-
run: () => (
|
|
1938
|
+
run: () => (b.emit(e, "replace", "bold"), !0)
|
|
2028
1939
|
},
|
|
2029
1940
|
{
|
|
2030
1941
|
key: "Ctrl-d",
|
|
2031
1942
|
mac: "Cmd-d",
|
|
2032
|
-
run:
|
|
1943
|
+
run: il,
|
|
2033
1944
|
preventDefault: !0
|
|
2034
1945
|
},
|
|
2035
1946
|
{
|
|
2036
1947
|
key: "Ctrl-s",
|
|
2037
1948
|
mac: "Cmd-s",
|
|
2038
|
-
run: (
|
|
2039
|
-
shift: () => (
|
|
1949
|
+
run: (H) => (b.emit(e, Ct, H.state.doc.toString()), !0),
|
|
1950
|
+
shift: () => (b.emit(e, "replace", "strikeThrough"), !0)
|
|
2040
1951
|
},
|
|
2041
1952
|
{
|
|
2042
1953
|
key: "Ctrl-u",
|
|
2043
1954
|
mac: "Cmd-u",
|
|
2044
|
-
run: () => (
|
|
2045
|
-
shift: () => (
|
|
1955
|
+
run: () => (b.emit(e, "replace", "underline"), !0),
|
|
1956
|
+
shift: () => (b.emit(e, "replace", "unorderedList"), !0)
|
|
2046
1957
|
},
|
|
2047
1958
|
{
|
|
2048
1959
|
key: "Ctrl-i",
|
|
2049
1960
|
mac: "Cmd-i",
|
|
2050
|
-
run: () => (
|
|
2051
|
-
shift: () => (
|
|
1961
|
+
run: () => (b.emit(e, "replace", "italic"), !0),
|
|
1962
|
+
shift: () => (b.emit(e, "openModals", "image"), !0)
|
|
2052
1963
|
},
|
|
2053
1964
|
{
|
|
2054
1965
|
key: "Ctrl-1",
|
|
2055
1966
|
mac: "Cmd-1",
|
|
2056
|
-
run: () => (
|
|
1967
|
+
run: () => (b.emit(e, "replace", "h1"), !0)
|
|
2057
1968
|
},
|
|
2058
1969
|
{
|
|
2059
1970
|
key: "Ctrl-2",
|
|
2060
1971
|
mac: "Cmd-2",
|
|
2061
|
-
run: () => (
|
|
1972
|
+
run: () => (b.emit(e, "replace", "h2"), !0)
|
|
2062
1973
|
},
|
|
2063
1974
|
{
|
|
2064
1975
|
key: "Ctrl-3",
|
|
2065
1976
|
mac: "Cmd-3",
|
|
2066
|
-
run: () => (
|
|
1977
|
+
run: () => (b.emit(e, "replace", "h3"), !0)
|
|
2067
1978
|
},
|
|
2068
1979
|
{
|
|
2069
1980
|
key: "Ctrl-4",
|
|
2070
1981
|
mac: "Cmd-4",
|
|
2071
|
-
run: () => (
|
|
1982
|
+
run: () => (b.emit(e, "replace", "h4"), !0)
|
|
2072
1983
|
},
|
|
2073
1984
|
{
|
|
2074
1985
|
key: "Ctrl-5",
|
|
2075
1986
|
mac: "Cmd-5",
|
|
2076
|
-
run: () => (
|
|
1987
|
+
run: () => (b.emit(e, "replace", "h5"), !0)
|
|
2077
1988
|
},
|
|
2078
1989
|
{
|
|
2079
1990
|
key: "Ctrl-6",
|
|
2080
1991
|
mac: "Cmd-6",
|
|
2081
|
-
run: () => (
|
|
1992
|
+
run: () => (b.emit(e, "replace", "h6"), !0)
|
|
2082
1993
|
},
|
|
2083
1994
|
{
|
|
2084
1995
|
key: "Ctrl-ArrowUp",
|
|
2085
1996
|
mac: "Cmd-ArrowUp",
|
|
2086
|
-
run: () => (
|
|
1997
|
+
run: () => (b.emit(e, "replace", "sup"), !0)
|
|
2087
1998
|
},
|
|
2088
1999
|
{
|
|
2089
2000
|
key: "Ctrl-ArrowDown",
|
|
2090
2001
|
mac: "Cmd-ArrowDown",
|
|
2091
|
-
run: () => (
|
|
2002
|
+
run: () => (b.emit(e, "replace", "sub"), !0)
|
|
2092
2003
|
},
|
|
2093
2004
|
{
|
|
2094
2005
|
key: "Ctrl-o",
|
|
2095
2006
|
mac: "Cmd-o",
|
|
2096
|
-
run: () => (
|
|
2007
|
+
run: () => (b.emit(e, "replace", "orderedList"), !0)
|
|
2097
2008
|
},
|
|
2098
2009
|
{
|
|
2099
2010
|
key: "Ctrl-c",
|
|
2100
2011
|
mac: "Cmd-c",
|
|
2101
|
-
shift: () => (
|
|
2102
|
-
any(
|
|
2103
|
-
return (
|
|
2012
|
+
shift: () => (b.emit(e, "replace", "code"), !0),
|
|
2013
|
+
any(H, M) {
|
|
2014
|
+
return (M.ctrlKey || M.metaKey) && M.altKey && M.code === "KeyC" ? (b.emit(e, "replace", "codeRow"), !0) : !1;
|
|
2104
2015
|
}
|
|
2105
2016
|
},
|
|
2106
2017
|
{
|
|
2107
2018
|
key: "Ctrl-l",
|
|
2108
2019
|
mac: "Cmd-l",
|
|
2109
|
-
run: () => (
|
|
2020
|
+
run: () => (b.emit(e, "openModals", "link"), !0)
|
|
2110
2021
|
},
|
|
2111
2022
|
{
|
|
2112
2023
|
key: "Ctrl-f",
|
|
2113
2024
|
mac: "Cmd-f",
|
|
2114
|
-
shift: () =>
|
|
2025
|
+
shift: () => o.noPrettier ? !1 : (b.emit(e, "replace", "prettier"), !0)
|
|
2115
2026
|
},
|
|
2116
2027
|
{
|
|
2117
|
-
any: (
|
|
2028
|
+
any: (H, M) => (M.ctrlKey || M.metaKey) && M.altKey && M.shiftKey && M.code === "KeyT" ? (b.emit(e, "replace", "table"), !0) : !1
|
|
2118
2029
|
}
|
|
2119
|
-
],
|
|
2120
|
-
const
|
|
2121
|
-
|
|
2122
|
-
|
|
2123
|
-
|
|
2030
|
+
], fo = go, bo = (e) => {
|
|
2031
|
+
const o = L("tabWidth"), l = L("editorId"), a = L("theme"), r = K(), i = At(), d = fo(l, e), u = co(e), c = [
|
|
2032
|
+
ll.of([...d, sl]),
|
|
2033
|
+
el,
|
|
2034
|
+
rl(),
|
|
2035
|
+
al({ codeLanguages: ol }),
|
|
2124
2036
|
// 横向换行
|
|
2125
|
-
|
|
2126
|
-
|
|
2037
|
+
ue.lineWrapping,
|
|
2038
|
+
ue.updateListener.of((m) => {
|
|
2127
2039
|
m.docChanged && e.onChange(m.state.doc.toString());
|
|
2128
2040
|
}),
|
|
2129
|
-
|
|
2130
|
-
paste:
|
|
2041
|
+
ue.domEventHandlers({
|
|
2042
|
+
paste: u,
|
|
2131
2043
|
blur: e.onBlur,
|
|
2132
2044
|
focus: e.onFocus,
|
|
2133
2045
|
input: (m) => {
|
|
2134
2046
|
e.onInput && e.onInput(m);
|
|
2135
|
-
const { data:
|
|
2136
|
-
e.maxlength && e.modelValue.length +
|
|
2047
|
+
const { data: h } = m;
|
|
2048
|
+
e.maxlength && e.modelValue.length + h.length > e.maxlength && b.emit(l, "errorCatcher", {
|
|
2137
2049
|
name: "overlength",
|
|
2138
2050
|
message: "The input text is too long",
|
|
2139
|
-
data:
|
|
2051
|
+
data: h
|
|
2140
2052
|
});
|
|
2141
2053
|
}
|
|
2142
2054
|
})
|
|
2143
2055
|
], g = () => {
|
|
2144
2056
|
const m = [
|
|
2145
2057
|
...c,
|
|
2146
|
-
|
|
2147
|
-
|
|
2058
|
+
a.value === "light" ? ao : jl,
|
|
2059
|
+
ro(e.completions)
|
|
2148
2060
|
];
|
|
2149
|
-
return
|
|
2150
|
-
...
|
|
2061
|
+
return X.codeMirrorExtensions(a.value, m, [
|
|
2062
|
+
...d
|
|
2151
2063
|
]);
|
|
2152
2064
|
};
|
|
2153
|
-
return
|
|
2154
|
-
const m = new
|
|
2065
|
+
return Y(() => {
|
|
2066
|
+
const m = new ue({
|
|
2155
2067
|
doc: e.modelValue,
|
|
2156
|
-
parent:
|
|
2157
|
-
}),
|
|
2158
|
-
i.value =
|
|
2159
|
-
|
|
2160
|
-
}, 0),
|
|
2068
|
+
parent: r.value
|
|
2069
|
+
}), h = new io(m);
|
|
2070
|
+
i.value = h, setTimeout(() => {
|
|
2071
|
+
h.setTabSize(o), h.setDisabled(e.disabled), h.setReadOnly(e.readonly), h.setExtensions(g()), e.placeholder && h.setPlaceholder(e.placeholder), typeof e.maxlength == "number" && h.setMaxLength(e.maxlength), e.autofocus && m.focus();
|
|
2072
|
+
}, 0), b.on(l, {
|
|
2161
2073
|
name: "ctrlZ",
|
|
2162
2074
|
callback() {
|
|
2163
|
-
|
|
2075
|
+
cl(m);
|
|
2164
2076
|
}
|
|
2165
|
-
}),
|
|
2077
|
+
}), b.on(l, {
|
|
2166
2078
|
name: "ctrlShiftZ",
|
|
2167
2079
|
callback() {
|
|
2168
|
-
|
|
2080
|
+
ul(m);
|
|
2169
2081
|
}
|
|
2170
|
-
}),
|
|
2082
|
+
}), b.on(l, {
|
|
2171
2083
|
name: "replace",
|
|
2172
2084
|
callback($, T = {}) {
|
|
2173
2085
|
var k;
|
|
2174
|
-
const { text: v, options:
|
|
2175
|
-
(k = i.value) == null || k.replaceSelectedText(v,
|
|
2086
|
+
const { text: v, options: f } = Nl($, i.value, T);
|
|
2087
|
+
(k = i.value) == null || k.replaceSelectedText(v, f, l);
|
|
2176
2088
|
}
|
|
2177
2089
|
});
|
|
2178
|
-
}),
|
|
2179
|
-
[
|
|
2090
|
+
}), B(
|
|
2091
|
+
[a, ne(e, "completions")],
|
|
2180
2092
|
() => {
|
|
2181
2093
|
var m;
|
|
2182
2094
|
(m = i.value) == null || m.setExtensions(g());
|
|
@@ -2184,54 +2096,54 @@ const ro = (e) => {
|
|
|
2184
2096
|
{
|
|
2185
2097
|
deep: !0
|
|
2186
2098
|
}
|
|
2187
|
-
),
|
|
2099
|
+
), B(
|
|
2188
2100
|
() => e.modelValue,
|
|
2189
2101
|
() => {
|
|
2190
|
-
var m,
|
|
2191
|
-
((m = i.value) == null ? void 0 : m.getValue()) !== e.modelValue && ((
|
|
2102
|
+
var m, h;
|
|
2103
|
+
((m = i.value) == null ? void 0 : m.getValue()) !== e.modelValue && ((h = i.value) == null || h.setValue(e.modelValue));
|
|
2192
2104
|
}
|
|
2193
|
-
),
|
|
2105
|
+
), B(
|
|
2194
2106
|
() => e.placeholder,
|
|
2195
2107
|
() => {
|
|
2196
2108
|
var m;
|
|
2197
2109
|
(m = i.value) == null || m.setPlaceholder(e.placeholder);
|
|
2198
2110
|
}
|
|
2199
|
-
),
|
|
2111
|
+
), B(
|
|
2200
2112
|
() => e.disabled,
|
|
2201
2113
|
() => {
|
|
2202
2114
|
var m;
|
|
2203
2115
|
(m = i.value) == null || m.setDisabled(e.disabled);
|
|
2204
2116
|
}
|
|
2205
|
-
),
|
|
2117
|
+
), B(
|
|
2206
2118
|
() => e.readonly,
|
|
2207
2119
|
() => {
|
|
2208
2120
|
var m;
|
|
2209
2121
|
(m = i.value) == null || m.setDisabled(e.readonly);
|
|
2210
2122
|
}
|
|
2211
|
-
),
|
|
2123
|
+
), B(
|
|
2212
2124
|
() => e.maxlength,
|
|
2213
2125
|
() => {
|
|
2214
2126
|
var m;
|
|
2215
2127
|
e.maxlength && ((m = i.value) == null || m.setMaxLength(e.maxlength));
|
|
2216
2128
|
}
|
|
2217
|
-
),
|
|
2218
|
-
inputWrapperRef:
|
|
2129
|
+
), mo(i), {
|
|
2130
|
+
inputWrapperRef: r,
|
|
2219
2131
|
codeMirrorUt: i
|
|
2220
2132
|
};
|
|
2221
|
-
},
|
|
2133
|
+
}, ho = bo, vo = /* @__PURE__ */ R({
|
|
2222
2134
|
name: "MDEditorContent",
|
|
2223
|
-
props:
|
|
2135
|
+
props: qt,
|
|
2224
2136
|
setup(e) {
|
|
2225
|
-
const
|
|
2226
|
-
inputWrapperRef:
|
|
2227
|
-
codeMirrorUt:
|
|
2228
|
-
} =
|
|
2229
|
-
return
|
|
2230
|
-
class: `${
|
|
2137
|
+
const o = L("editorId"), l = K(""), {
|
|
2138
|
+
inputWrapperRef: a,
|
|
2139
|
+
codeMirrorUt: r
|
|
2140
|
+
} = ho(e);
|
|
2141
|
+
return Hl(e, l, r), () => t("div", {
|
|
2142
|
+
class: `${n}-content`
|
|
2231
2143
|
}, [t("div", {
|
|
2232
|
-
class: `${
|
|
2233
|
-
ref:
|
|
2234
|
-
}, null), t(
|
|
2144
|
+
class: `${n}-input-wrapper`,
|
|
2145
|
+
ref: a
|
|
2146
|
+
}, null), t(Ut, {
|
|
2235
2147
|
modelValue: e.modelValue,
|
|
2236
2148
|
setting: e.setting,
|
|
2237
2149
|
onHtmlChanged: (i) => {
|
|
@@ -2245,15 +2157,15 @@ const ro = (e) => {
|
|
|
2245
2157
|
formatCopiedText: e.formatCopiedText,
|
|
2246
2158
|
noHighlight: e.noHighlight,
|
|
2247
2159
|
noImgZoomIn: e.noImgZoomIn
|
|
2248
|
-
}, null), e.catalogVisible && t(
|
|
2160
|
+
}, null), e.catalogVisible && t(wt, {
|
|
2249
2161
|
theme: e.theme,
|
|
2250
|
-
class: `${
|
|
2251
|
-
editorId:
|
|
2162
|
+
class: `${n}-catalog-editor`,
|
|
2163
|
+
editorId: o,
|
|
2252
2164
|
mdHeadingId: e.mdHeadingId,
|
|
2253
2165
|
key: "internal-catalog"
|
|
2254
2166
|
}, null)]);
|
|
2255
2167
|
}
|
|
2256
|
-
}),
|
|
2168
|
+
}), ko = /* @__PURE__ */ R({
|
|
2257
2169
|
props: {
|
|
2258
2170
|
modelValue: {
|
|
2259
2171
|
type: String,
|
|
@@ -2261,17 +2173,17 @@ const ro = (e) => {
|
|
|
2261
2173
|
}
|
|
2262
2174
|
},
|
|
2263
2175
|
setup(e) {
|
|
2264
|
-
const
|
|
2176
|
+
const o = L("usedLanguageText");
|
|
2265
2177
|
return () => {
|
|
2266
|
-
var l,
|
|
2178
|
+
var l, a;
|
|
2267
2179
|
return t("div", {
|
|
2268
|
-
class: `${
|
|
2180
|
+
class: `${n}-footer-item`
|
|
2269
2181
|
}, [t("label", {
|
|
2270
|
-
class: `${
|
|
2271
|
-
}, [`${(l =
|
|
2182
|
+
class: `${n}-footer-label`
|
|
2183
|
+
}, [`${(l = o.value.footer) == null ? void 0 : l.markdownTotal}:`]), t("span", null, [((a = e.modelValue) == null ? void 0 : a.length) || 0])]);
|
|
2272
2184
|
};
|
|
2273
2185
|
}
|
|
2274
|
-
}),
|
|
2186
|
+
}), po = {
|
|
2275
2187
|
checked: {
|
|
2276
2188
|
type: Boolean,
|
|
2277
2189
|
default: !1
|
|
@@ -2281,17 +2193,17 @@ const ro = (e) => {
|
|
|
2281
2193
|
default: () => {
|
|
2282
2194
|
}
|
|
2283
2195
|
}
|
|
2284
|
-
},
|
|
2285
|
-
props:
|
|
2196
|
+
}, Co = /* @__PURE__ */ R({
|
|
2197
|
+
props: po,
|
|
2286
2198
|
setup(e) {
|
|
2287
2199
|
return () => t("div", {
|
|
2288
|
-
class: [`${
|
|
2200
|
+
class: [`${n}-checkbox`, e.checked && `${n}-checkbox-checked`],
|
|
2289
2201
|
onClick: () => {
|
|
2290
2202
|
e.onChange(!e.checked);
|
|
2291
2203
|
}
|
|
2292
2204
|
}, null);
|
|
2293
2205
|
}
|
|
2294
|
-
}),
|
|
2206
|
+
}), $o = {
|
|
2295
2207
|
scrollAuto: {
|
|
2296
2208
|
type: Boolean
|
|
2297
2209
|
},
|
|
@@ -2300,26 +2212,26 @@ const ro = (e) => {
|
|
|
2300
2212
|
default: () => {
|
|
2301
2213
|
}
|
|
2302
2214
|
}
|
|
2303
|
-
},
|
|
2304
|
-
props:
|
|
2215
|
+
}, yo = /* @__PURE__ */ R({
|
|
2216
|
+
props: $o,
|
|
2305
2217
|
setup(e) {
|
|
2306
|
-
const
|
|
2218
|
+
const o = L("usedLanguageText");
|
|
2307
2219
|
return () => {
|
|
2308
2220
|
var l;
|
|
2309
2221
|
return t("div", {
|
|
2310
|
-
class: `${
|
|
2222
|
+
class: `${n}-footer-item`
|
|
2311
2223
|
}, [t("label", {
|
|
2312
|
-
class: `${
|
|
2224
|
+
class: `${n}-footer-label`,
|
|
2313
2225
|
onClick: () => {
|
|
2314
2226
|
e.onScrollAutoChange(!e.scrollAuto);
|
|
2315
2227
|
}
|
|
2316
|
-
}, [(l =
|
|
2228
|
+
}, [(l = o.value.footer) == null ? void 0 : l.scrollAuto]), t(Co, {
|
|
2317
2229
|
checked: e.scrollAuto,
|
|
2318
2230
|
onChange: e.onScrollAutoChange
|
|
2319
2231
|
}, null)]);
|
|
2320
2232
|
};
|
|
2321
2233
|
}
|
|
2322
|
-
}),
|
|
2234
|
+
}), To = {
|
|
2323
2235
|
modelValue: {
|
|
2324
2236
|
type: String,
|
|
2325
2237
|
default: ""
|
|
@@ -2339,73 +2251,73 @@ const ro = (e) => {
|
|
|
2339
2251
|
defFooters: {
|
|
2340
2252
|
type: Object
|
|
2341
2253
|
}
|
|
2342
|
-
},
|
|
2254
|
+
}, wo = /* @__PURE__ */ R({
|
|
2343
2255
|
name: "MDEditorFooter",
|
|
2344
|
-
props:
|
|
2256
|
+
props: To,
|
|
2345
2257
|
setup(e) {
|
|
2346
|
-
const
|
|
2347
|
-
const
|
|
2348
|
-
return [
|
|
2349
|
-
}), l = (
|
|
2350
|
-
if (
|
|
2351
|
-
switch (
|
|
2258
|
+
const o = ke(() => {
|
|
2259
|
+
const a = e.footers.indexOf("="), r = a === -1 ? e.footers : e.footers.slice(0, a), i = a === -1 ? [] : e.footers.slice(a, Number.MAX_SAFE_INTEGER);
|
|
2260
|
+
return [r, i];
|
|
2261
|
+
}), l = (a) => {
|
|
2262
|
+
if (Dt.includes(a))
|
|
2263
|
+
switch (a) {
|
|
2352
2264
|
case "markdownTotal":
|
|
2353
|
-
return t(
|
|
2265
|
+
return t(ko, {
|
|
2354
2266
|
modelValue: e.modelValue
|
|
2355
2267
|
}, null);
|
|
2356
2268
|
case "scrollSwitch":
|
|
2357
|
-
return t(
|
|
2269
|
+
return t(yo, {
|
|
2358
2270
|
scrollAuto: e.scrollAuto,
|
|
2359
2271
|
onScrollAutoChange: e.onScrollAutoChange
|
|
2360
2272
|
}, null);
|
|
2361
2273
|
}
|
|
2362
2274
|
else
|
|
2363
|
-
return e.defFooters instanceof Array ? e.defFooters[
|
|
2275
|
+
return e.defFooters instanceof Array ? e.defFooters[a] || "" : e.defFooters && e.defFooters.children instanceof Array && e.defFooters.children[a] || "";
|
|
2364
2276
|
};
|
|
2365
2277
|
return () => {
|
|
2366
|
-
const
|
|
2278
|
+
const a = o.value[0].map((i) => l(i)), r = o.value[1].map((i) => l(i));
|
|
2367
2279
|
return t("div", {
|
|
2368
|
-
class: `${
|
|
2280
|
+
class: `${n}-footer`
|
|
2369
2281
|
}, [t("div", {
|
|
2370
|
-
class: `${
|
|
2371
|
-
}, [
|
|
2372
|
-
class: `${
|
|
2373
|
-
}, [
|
|
2282
|
+
class: `${n}-footer-left`
|
|
2283
|
+
}, [a]), t("div", {
|
|
2284
|
+
class: `${n}-footer-right`
|
|
2285
|
+
}, [r])]);
|
|
2374
2286
|
};
|
|
2375
2287
|
}
|
|
2376
|
-
}),
|
|
2288
|
+
}), xo = /* @__PURE__ */ R({
|
|
2377
2289
|
name: "MdEditorV3",
|
|
2378
|
-
props:
|
|
2379
|
-
emits:
|
|
2380
|
-
setup(e,
|
|
2290
|
+
props: Gt,
|
|
2291
|
+
emits: Kt,
|
|
2292
|
+
setup(e, o) {
|
|
2381
2293
|
const {
|
|
2382
2294
|
editorId: l,
|
|
2383
|
-
noKatex:
|
|
2384
|
-
noMermaid:
|
|
2295
|
+
noKatex: a,
|
|
2296
|
+
noMermaid: r,
|
|
2385
2297
|
noPrettier: i,
|
|
2386
|
-
noUploadImg:
|
|
2387
|
-
noHighlight:
|
|
2388
|
-
} = e, c =
|
|
2298
|
+
noUploadImg: d,
|
|
2299
|
+
noHighlight: u
|
|
2300
|
+
} = e, c = Q({
|
|
2389
2301
|
scrollAuto: e.scrollAuto
|
|
2390
2302
|
});
|
|
2391
|
-
|
|
2392
|
-
const [g, m] =
|
|
2393
|
-
return
|
|
2394
|
-
|
|
2395
|
-
}),
|
|
2303
|
+
_t(e, o), jt(e), Wt(e), zt(e, o);
|
|
2304
|
+
const [g, m] = Zt(e, o), h = Xt(e);
|
|
2305
|
+
return Mt(() => {
|
|
2306
|
+
b.clear(l);
|
|
2307
|
+
}), Yt(e, o, h, g, m), () => {
|
|
2396
2308
|
var v;
|
|
2397
|
-
const $ =
|
|
2309
|
+
const $ = it({
|
|
2398
2310
|
props: e,
|
|
2399
|
-
ctx:
|
|
2400
|
-
}, "defToolbars"), T =
|
|
2311
|
+
ctx: o
|
|
2312
|
+
}, "defToolbars"), T = it({
|
|
2401
2313
|
props: e,
|
|
2402
|
-
ctx:
|
|
2314
|
+
ctx: o
|
|
2403
2315
|
}, "defFooters");
|
|
2404
2316
|
return t("div", {
|
|
2405
2317
|
id: l,
|
|
2406
|
-
class: [
|
|
2318
|
+
class: [n, e.class, e.theme === "dark" && `${n}-dark`, g.fullscreen || g.pageFullscreen ? `${n}-fullscreen` : ""],
|
|
2407
2319
|
style: e.style
|
|
2408
|
-
}, [t(
|
|
2320
|
+
}, [t(Il, {
|
|
2409
2321
|
noPrettier: i,
|
|
2410
2322
|
toolbars: e.toolbars,
|
|
2411
2323
|
toolbarsExclude: e.toolbarsExclude,
|
|
@@ -2413,17 +2325,17 @@ const ro = (e) => {
|
|
|
2413
2325
|
updateSetting: m,
|
|
2414
2326
|
tableShape: e.tableShape,
|
|
2415
2327
|
defToolbars: $,
|
|
2416
|
-
noUploadImg:
|
|
2328
|
+
noUploadImg: d,
|
|
2417
2329
|
showToolbarName: e.showToolbarName
|
|
2418
|
-
}, null), t(
|
|
2330
|
+
}, null), t(vo, {
|
|
2419
2331
|
modelValue: e.modelValue,
|
|
2420
2332
|
setting: g,
|
|
2421
2333
|
mdHeadingId: e.mdHeadingId,
|
|
2422
|
-
noMermaid:
|
|
2334
|
+
noMermaid: r,
|
|
2423
2335
|
noPrettier: i,
|
|
2424
2336
|
sanitize: e.sanitize,
|
|
2425
2337
|
placeholder: e.placeholder,
|
|
2426
|
-
noKatex:
|
|
2338
|
+
noKatex: a,
|
|
2427
2339
|
scrollAuto: c.scrollAuto,
|
|
2428
2340
|
formatCopiedText: e.formatCopiedText,
|
|
2429
2341
|
autofocus: e.autoFocus,
|
|
@@ -2431,40 +2343,40 @@ const ro = (e) => {
|
|
|
2431
2343
|
readonly: e.readOnly,
|
|
2432
2344
|
maxlength: e.maxLength,
|
|
2433
2345
|
autoDetectCode: e.autoDetectCode,
|
|
2434
|
-
noHighlight:
|
|
2435
|
-
onChange: (
|
|
2436
|
-
e.onChange ? e.onChange(
|
|
2346
|
+
noHighlight: u,
|
|
2347
|
+
onChange: (f) => {
|
|
2348
|
+
e.onChange ? e.onChange(f) : (o.emit("update:modelValue", f), o.emit("onChange", f));
|
|
2437
2349
|
},
|
|
2438
|
-
onHtmlChanged: (
|
|
2439
|
-
e.onHtmlChanged ? e.onHtmlChanged(
|
|
2350
|
+
onHtmlChanged: (f) => {
|
|
2351
|
+
e.onHtmlChanged ? e.onHtmlChanged(f) : o.emit("onHtmlChanged", f);
|
|
2440
2352
|
},
|
|
2441
|
-
onGetCatalog: (
|
|
2442
|
-
e.onGetCatalog ? e.onGetCatalog(
|
|
2353
|
+
onGetCatalog: (f) => {
|
|
2354
|
+
e.onGetCatalog ? e.onGetCatalog(f) : o.emit("onGetCatalog", f);
|
|
2443
2355
|
},
|
|
2444
|
-
onBlur: (
|
|
2445
|
-
e.onBlur ? e.onBlur(
|
|
2356
|
+
onBlur: (f) => {
|
|
2357
|
+
e.onBlur ? e.onBlur(f) : o.emit("onBlur", f);
|
|
2446
2358
|
},
|
|
2447
|
-
onFocus: (
|
|
2448
|
-
e.onFocus ? e.onFocus(
|
|
2359
|
+
onFocus: (f) => {
|
|
2360
|
+
e.onFocus ? e.onFocus(f) : o.emit("onFocus", f);
|
|
2449
2361
|
},
|
|
2450
|
-
onInput: (
|
|
2451
|
-
e.onInput ? e.onInput(
|
|
2362
|
+
onInput: (f) => {
|
|
2363
|
+
e.onInput ? e.onInput(f) : o.emit("onInput", f);
|
|
2452
2364
|
},
|
|
2453
2365
|
completions: e.completions,
|
|
2454
|
-
catalogVisible:
|
|
2366
|
+
catalogVisible: h.value,
|
|
2455
2367
|
theme: e.theme,
|
|
2456
2368
|
noImgZoomIn: e.noImgZoomIn
|
|
2457
|
-
}, null), ((v = e.footers) == null ? void 0 : v.length) > 0 && t(
|
|
2369
|
+
}, null), ((v = e.footers) == null ? void 0 : v.length) > 0 && t(wo, {
|
|
2458
2370
|
modelValue: e.modelValue,
|
|
2459
2371
|
footers: e.footers,
|
|
2460
2372
|
defFooters: T,
|
|
2461
2373
|
scrollAuto: c.scrollAuto,
|
|
2462
|
-
onScrollAutoChange: (
|
|
2374
|
+
onScrollAutoChange: (f) => c.scrollAuto = f
|
|
2463
2375
|
}, null)]);
|
|
2464
2376
|
};
|
|
2465
2377
|
}
|
|
2466
|
-
}),
|
|
2467
|
-
|
|
2378
|
+
}), ve = xo;
|
|
2379
|
+
ve.install = (e) => (e.component(ve.name, ve), e.use(bl).use(Ot).use(hl).use(wt).use(Jt), e);
|
|
2468
2380
|
export {
|
|
2469
|
-
|
|
2381
|
+
ve as default
|
|
2470
2382
|
};
|