smart-editor-v3 1.6.0 → 1.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/smart-editor-package.js +939 -960
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
var Ko = Object.defineProperty;
|
|
2
|
-
var
|
|
3
|
-
var Lt = (r, e, n) =>
|
|
2
|
+
var Yo = (r, e, n) => e in r ? Ko(r, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : r[e] = n;
|
|
3
|
+
var Lt = (r, e, n) => Yo(r, typeof e != "symbol" ? e + "" : e, n);
|
|
4
4
|
import "./style.css";
|
|
5
|
-
import { NTooltip as Ut, NButton as Se, NPopover as
|
|
5
|
+
import { NTooltip as Ut, NButton as Se, NPopover as Zo, NDrawerContent as Xo, NDrawer as Qo, NInput as Bn, NCheckbox as er, NCard as tr, NDropdown as st, NSelect as Ln, NColorPicker as Nn, NBackTop as nr, NModal as or, NFormItem as rr, NInputNumber as Rn, useMessage as lr, zhCN as En, enUS as In, dateZhCN as Fn, dateEnUS as Hn, darkTheme as zn, NMessageProvider as sr, NConfigProvider as On } from "naive-ui";
|
|
6
6
|
import { createI18n as ir } from "vue-i18n";
|
|
7
|
-
import { useStorage as en, createGlobalState as ar, useTimeAgo as ur, useFullscreen as Pn, useOnline as cr, useWindowSize as Jt, onClickOutside as $t, useClipboard as dr, useElementBounding as pr, useThrottleFn as Wn, useDebounceFn as mr, useResizeObserver as fr, useFileDialog as qt, useDark as
|
|
8
|
-
import { ref as B, watch as
|
|
7
|
+
import { useStorage as en, createGlobalState as ar, useTimeAgo as ur, useFullscreen as Pn, useOnline as cr, useWindowSize as Jt, onClickOutside as $t, useClipboard as dr, useElementBounding as pr, useThrottleFn as Wn, useDebounceFn as mr, useResizeObserver as fr, useFileDialog as qt, useDark as Vn, useTimestamp as hr, createInjectionState as br } from "@vueuse/core";
|
|
8
|
+
import { ref as B, watch as pe, openBlock as m, createElementBlock as $, Fragment as J, renderList as ge, unref as i, createElementVNode as g, toDisplayString as N, normalizeClass as K, createBlock as _, resolveDynamicComponent as oe, withCtx as A, createTextVNode as te, renderSlot as de, computed as W, onMounted as Fe, inject as vr, createVNode as v, createCommentVNode as F, normalizeStyle as le, isRef as Ge, h as _e, onUnmounted as gr, onBeforeUnmount as Ze, useAttrs as jt, mergeProps as ve, withDirectives as ot, vShow as kt, nextTick as _r, onBeforeMount as Dn, provide as tn, mergeModels as nn, useModel as yr } from "vue";
|
|
9
9
|
import kr from "dexie";
|
|
10
10
|
import Ct from "hotkeys-js";
|
|
11
|
-
import { Extension as $e, findParentNode as it, Node as
|
|
11
|
+
import { Extension as $e, findParentNode as it, Node as Z, mergeAttributes as Y, findChildren as gt, defaultBlockAt as Un, isActive as Cr, Mark as wr, nodeInputRule as xr, findParentNodeClosestToPos as Ar, callOrReturn as Tr, getExtensionField as Sr } from "@tiptap/core";
|
|
12
12
|
import { Plugin as He, PluginKey as Je, Selection as Jn, TextSelection as Gt } from "@tiptap/pm/state";
|
|
13
13
|
import { DecorationSet as Oe, Decoration as wt } from "@tiptap/pm/view";
|
|
14
14
|
import { UseDraggable as $r, vElementHover as Mr } from "@vueuse/components";
|
|
@@ -18,9 +18,9 @@ import Lr from "@tiptap/extension-blockquote";
|
|
|
18
18
|
import Nr from "@tiptap/extension-character-count";
|
|
19
19
|
import Kn from "@tiptap/extension-color";
|
|
20
20
|
import Rr from "@tiptap/extension-dropcursor";
|
|
21
|
-
import
|
|
22
|
-
import
|
|
23
|
-
import
|
|
21
|
+
import Yn from "@tiptap/extension-focus";
|
|
22
|
+
import Zn from "@tiptap/extension-font-family";
|
|
23
|
+
import Xn from "@tiptap/extension-highlight";
|
|
24
24
|
import Er from "@tiptap/extension-horizontal-rule";
|
|
25
25
|
import Ir from "@tiptap/extension-link";
|
|
26
26
|
import Fr from "@tiptap/extension-list-keymap";
|
|
@@ -39,8 +39,8 @@ import ao from "katex";
|
|
|
39
39
|
import zr from "@tiptap/extension-bullet-list";
|
|
40
40
|
import { createEditor as Or } from "prism-code-editor";
|
|
41
41
|
import { defaultCommands as Pr, editHistory as Wr } from "prism-code-editor/commands";
|
|
42
|
-
import { cursorPosition as
|
|
43
|
-
import { indentGuides as
|
|
42
|
+
import { cursorPosition as Vr } from "prism-code-editor/cursor";
|
|
43
|
+
import { indentGuides as Dr } from "prism-code-editor/guides";
|
|
44
44
|
import { highlightBracketPairs as Ur } from "prism-code-editor/highlight-brackets";
|
|
45
45
|
import { matchBrackets as Jr } from "prism-code-editor/match-brackets";
|
|
46
46
|
import { matchTags as qr } from "prism-code-editor/match-tags";
|
|
@@ -88,8 +88,8 @@ import { Slice as et, Fragment as ze } from "@tiptap/pm/model";
|
|
|
88
88
|
import { Image as jr } from "@tiptap/extension-image";
|
|
89
89
|
import { ListItem as Gr } from "@tiptap/extension-list-item";
|
|
90
90
|
import Kr from "@tiptap/extension-ordered-list";
|
|
91
|
-
import { throttle as
|
|
92
|
-
import { CellSelection as uo, addColumnBefore as
|
|
91
|
+
import { throttle as Yr } from "lodash-es";
|
|
92
|
+
import { CellSelection as uo, addColumnBefore as Zr, addColumnAfter as Xr, deleteColumn as Qr, addRowBefore as el, addRowAfter as tl, deleteRow as nl, deleteTable as ol, mergeCells as rn, splitCell as ln, toggleHeader as sn, toggleHeaderCell as rl, setCellAttr as ll, goToNextCell as an, fixTables as sl, columnResizing as il, tableEditing as al } from "@tiptap/pm/tables";
|
|
93
93
|
import ul from "@tiptap/extension-table-cell";
|
|
94
94
|
import co from "dayjs";
|
|
95
95
|
import po from "js-md5";
|
|
@@ -595,7 +595,7 @@ const cl = {
|
|
|
595
595
|
hardBreak: "换行符",
|
|
596
596
|
fill: "填空",
|
|
597
597
|
hr: {
|
|
598
|
-
text: "
|
|
598
|
+
text: "分割线",
|
|
599
599
|
title: "分割线类型",
|
|
600
600
|
color: "分割线颜色",
|
|
601
601
|
signle: "细线",
|
|
@@ -944,7 +944,8 @@ const cl = {
|
|
|
944
944
|
{ label: "Arial", value: "Arial" },
|
|
945
945
|
{ label: "Tahoma", value: "Tahoma" },
|
|
946
946
|
{ label: "Verdana", value: "Verdana" },
|
|
947
|
-
{ label: "Times New Roman", value: "Times New Roman" }
|
|
947
|
+
{ label: "Times New Roman", value: "Times New Roman" },
|
|
948
|
+
{ label: "MS Mincho", value: "MS Mincho" }
|
|
948
949
|
],
|
|
949
950
|
colors: [
|
|
950
951
|
"#FFF",
|
|
@@ -1191,38 +1192,38 @@ const M = ar(() => {
|
|
|
1191
1192
|
marks: []
|
|
1192
1193
|
}), a = ({
|
|
1193
1194
|
enabled: T,
|
|
1194
|
-
once:
|
|
1195
|
-
marks:
|
|
1195
|
+
once: w,
|
|
1196
|
+
marks: y
|
|
1196
1197
|
}) => {
|
|
1197
|
-
s.value.enabled = T, s.value.once =
|
|
1198
|
+
s.value.enabled = T, s.value.once = w, s.value.marks = y;
|
|
1198
1199
|
}, u = B([]), d = `#smart-editor-${Te(4)}`, p = B(!1), f = B(!1), b = B(!1), h = (T) => {
|
|
1199
1200
|
e.value = T;
|
|
1200
|
-
},
|
|
1201
|
-
const
|
|
1201
|
+
}, k = B(!1), C = (T) => {
|
|
1202
|
+
const w = Object.keys(T).includes("value") ? T.value : T;
|
|
1202
1203
|
t.value = {
|
|
1203
1204
|
...t.value,
|
|
1204
|
-
...Object.keys(
|
|
1205
|
+
...Object.keys(w).reduce((L, R) => (w[R] !== void 0 && (L[R] = w[R]), L), {})
|
|
1205
1206
|
};
|
|
1206
|
-
const
|
|
1207
|
-
return
|
|
1208
|
-
},
|
|
1207
|
+
const y = Pe("locale");
|
|
1208
|
+
return y.value || (y.value = t.value.locale), t.value;
|
|
1209
|
+
}, x = () => {
|
|
1209
1210
|
e.value = void 0, f.value = !1, u.value = [], n.value = !0, l.value = null;
|
|
1210
1211
|
};
|
|
1211
|
-
return
|
|
1212
|
+
return pe(
|
|
1212
1213
|
() => {
|
|
1213
1214
|
var T;
|
|
1214
1215
|
return (T = t.value.document) == null ? void 0 : T.readOnly;
|
|
1215
1216
|
},
|
|
1216
1217
|
(T) => {
|
|
1217
|
-
var
|
|
1218
|
-
(
|
|
1218
|
+
var w;
|
|
1219
|
+
(w = e.value) == null || w.setEditable(!T), r.value = Te();
|
|
1219
1220
|
}
|
|
1220
|
-
),
|
|
1221
|
+
), pe(
|
|
1221
1222
|
() => t.value.page,
|
|
1222
1223
|
({
|
|
1223
1224
|
defaultBackground: T,
|
|
1224
|
-
defaultMargin:
|
|
1225
|
-
defaultOrientation:
|
|
1225
|
+
defaultMargin: w,
|
|
1226
|
+
defaultOrientation: y,
|
|
1226
1227
|
watermark: L
|
|
1227
1228
|
}) => {
|
|
1228
1229
|
var R;
|
|
@@ -1230,9 +1231,9 @@ const M = ar(() => {
|
|
|
1230
1231
|
size: (R = t.value.dicts) == null ? void 0 : R.pageSizes.find(
|
|
1231
1232
|
(I) => I.default
|
|
1232
1233
|
),
|
|
1233
|
-
margin:
|
|
1234
|
+
margin: w,
|
|
1234
1235
|
background: T,
|
|
1235
|
-
orientation:
|
|
1236
|
+
orientation: y,
|
|
1236
1237
|
watermark: L,
|
|
1237
1238
|
header: !0,
|
|
1238
1239
|
footer: !0,
|
|
@@ -1263,9 +1264,9 @@ const M = ar(() => {
|
|
|
1263
1264
|
searchReplace: f,
|
|
1264
1265
|
options: t,
|
|
1265
1266
|
container: d,
|
|
1266
|
-
setOptions:
|
|
1267
|
-
resetStore:
|
|
1268
|
-
toolbarHover:
|
|
1267
|
+
setOptions: C,
|
|
1268
|
+
resetStore: x,
|
|
1269
|
+
toolbarHover: k
|
|
1269
1270
|
};
|
|
1270
1271
|
}), { options: ml } = M(), fl = ir({
|
|
1271
1272
|
legacy: !1,
|
|
@@ -1276,7 +1277,7 @@ const M = ar(() => {
|
|
|
1276
1277
|
zh_CN: dl
|
|
1277
1278
|
}
|
|
1278
1279
|
}), { global: Kt } = fl, { t: c } = Kt, ho = () => Kt;
|
|
1279
|
-
function
|
|
1280
|
+
function Ye(r) {
|
|
1280
1281
|
if (typeof r == "string")
|
|
1281
1282
|
return r;
|
|
1282
1283
|
if (typeof r == "object")
|
|
@@ -1403,18 +1404,18 @@ const H = (r, e) => {
|
|
|
1403
1404
|
label: c("base.strike"),
|
|
1404
1405
|
keys: ["~~", "TEXT", "~~"]
|
|
1405
1406
|
},
|
|
1406
|
-
{
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
},
|
|
1412
|
-
{
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
},
|
|
1407
|
+
// {
|
|
1408
|
+
// icon: 'sub',
|
|
1409
|
+
// tag: 'sub',
|
|
1410
|
+
// label: t('base.subscript'),
|
|
1411
|
+
// keys: ['~', 'TEXT', '~'],
|
|
1412
|
+
// },
|
|
1413
|
+
// {
|
|
1414
|
+
// icon: 'super',
|
|
1415
|
+
// tag: 'sup',
|
|
1416
|
+
// label: t('base.superscript'),
|
|
1417
|
+
// keys: ['^', 'TEXT', '^'],
|
|
1418
|
+
// },
|
|
1418
1419
|
{
|
|
1419
1420
|
icon: "bullet",
|
|
1420
1421
|
label: `· ${c("list.bullet.text")}`,
|
|
@@ -1488,7 +1489,7 @@ const H = (r, e) => {
|
|
|
1488
1489
|
], 64))), 128))
|
|
1489
1490
|
]));
|
|
1490
1491
|
}
|
|
1491
|
-
}, Cl = /* @__PURE__ */ H(kl, [["__scopeId", "data-v-
|
|
1492
|
+
}, Cl = /* @__PURE__ */ H(kl, [["__scopeId", "data-v-67cb4f13"]]), wl = {
|
|
1492
1493
|
class: "p-x-8 p-y-4",
|
|
1493
1494
|
style: { fontSize: "12px" }
|
|
1494
1495
|
}, xl = {
|
|
@@ -1509,7 +1510,7 @@ const H = (r, e) => {
|
|
|
1509
1510
|
"show-arrow": !1
|
|
1510
1511
|
}, {
|
|
1511
1512
|
trigger: A(() => [
|
|
1512
|
-
|
|
1513
|
+
de(n.$slots, "default")
|
|
1513
1514
|
]),
|
|
1514
1515
|
default: A(() => [
|
|
1515
1516
|
g("span", wl, N(r.content), 1)
|
|
@@ -1547,38 +1548,38 @@ const Be = {
|
|
|
1547
1548
|
}, Al = { class: "smart-status-bar" }, Tl = { class: "smart-status-bar-left" }, Sl = { key: 0 }, $l = { class: "smart-word-count" }, Ml = { class: "smart-word-count-detail" }, Bl = { class: "smart-word-count-title" }, Ll = { key: 0 }, Nl = { class: "smart-status" }, Rl = { class: "smart-status-saved button-text" }, El = ["textContent"], Il = ["textContent"], Fl = { class: "smart-document-status-container smart-status" }, Hl = ["textContent"], zl = ["textContent"], Ol = { class: "smart-document-button-container" }, Pl = { class: "smart-shortcuts-drawer-header" }, Wl = {
|
|
1548
1549
|
__name: "index",
|
|
1549
1550
|
setup(r) {
|
|
1550
|
-
const { container: e, options: n, page: o, editor: t, savedAt: l } = M(), s = B(!1), a = B(!1), u =
|
|
1551
|
+
const { container: e, options: n, page: o, editor: t, savedAt: l } = M(), s = B(!1), a = B(!1), u = W(() => {
|
|
1551
1552
|
if (t.value) {
|
|
1552
|
-
const { selection:
|
|
1553
|
+
const { selection: y } = t.value.state;
|
|
1553
1554
|
return t.value.state.doc.textBetween(
|
|
1554
|
-
|
|
1555
|
-
|
|
1555
|
+
y.from,
|
|
1556
|
+
y.to,
|
|
1556
1557
|
""
|
|
1557
1558
|
).length;
|
|
1558
1559
|
}
|
|
1559
1560
|
return 0;
|
|
1560
1561
|
}), d = B(null);
|
|
1561
1562
|
function p() {
|
|
1562
|
-
var
|
|
1563
|
-
o.value.showToc = !o.value.showToc, (
|
|
1563
|
+
var y;
|
|
1564
|
+
o.value.showToc = !o.value.showToc, (y = t.value) == null || y.chain().focus().run();
|
|
1564
1565
|
}
|
|
1565
1566
|
function f() {
|
|
1566
|
-
var
|
|
1567
|
-
o.value.showTool = !o.value.showTool, (
|
|
1567
|
+
var y;
|
|
1568
|
+
o.value.showTool = !o.value.showTool, (y = t.value) == null || y.chain().focus().run();
|
|
1568
1569
|
}
|
|
1569
1570
|
Fe(() => {
|
|
1570
1571
|
d.value = Pn(document.querySelector(e)), At("f11, command+f11", d.value.toggle);
|
|
1571
1572
|
});
|
|
1572
|
-
const b = B(!1), h = cr(),
|
|
1573
|
-
function
|
|
1574
|
-
|
|
1573
|
+
const b = B(!1), h = cr(), k = vr("saveContent");
|
|
1574
|
+
function C() {
|
|
1575
|
+
k(), b.value = !1;
|
|
1575
1576
|
}
|
|
1576
|
-
function
|
|
1577
|
-
Mt.content.get(n.value.editorKey).then((
|
|
1577
|
+
function x() {
|
|
1578
|
+
Mt.content.get(n.value.editorKey).then((y) => {
|
|
1578
1579
|
var L;
|
|
1579
|
-
|
|
1580
|
-
}).catch((
|
|
1581
|
-
Be.message.error(
|
|
1580
|
+
y ? (L = t.value) == null || L.chain().setContent(y.content, !0).focus().run() : Be.message.error(c("save.cache.error.message"));
|
|
1581
|
+
}).catch((y) => {
|
|
1582
|
+
Be.message.error(y.message);
|
|
1582
1583
|
}).finally(() => {
|
|
1583
1584
|
b.value = !1;
|
|
1584
1585
|
});
|
|
@@ -1586,17 +1587,17 @@ const Be = {
|
|
|
1586
1587
|
function T() {
|
|
1587
1588
|
window.open(n.value.feedbackUrl, "_blank");
|
|
1588
1589
|
}
|
|
1589
|
-
function
|
|
1590
|
+
function w() {
|
|
1590
1591
|
window.open(n.value.companyUrl, "_blank");
|
|
1591
1592
|
}
|
|
1592
|
-
return (
|
|
1593
|
+
return (y, L) => {
|
|
1593
1594
|
var j;
|
|
1594
|
-
const R = Se, I = xl, U =
|
|
1595
|
+
const R = Se, I = xl, U = Zo, O = Cl, S = Xo, D = Qo;
|
|
1595
1596
|
return m(), $(J, null, [
|
|
1596
1597
|
g("div", Al, [
|
|
1597
1598
|
g("div", Tl, [
|
|
1598
1599
|
v(I, {
|
|
1599
|
-
content: i(o).showToc ? ("t" in
|
|
1600
|
+
content: i(o).showToc ? ("t" in y ? y.t : i(c))("toc.hide") : ("t" in y ? y.t : i(c))("toc.show")
|
|
1600
1601
|
}, {
|
|
1601
1602
|
default: A(() => [
|
|
1602
1603
|
v(R, {
|
|
@@ -1614,7 +1615,7 @@ const Be = {
|
|
|
1614
1615
|
_: 1
|
|
1615
1616
|
}, 8, ["content"]),
|
|
1616
1617
|
v(I, {
|
|
1617
|
-
content: i(o).showTool ? ("t" in
|
|
1618
|
+
content: i(o).showTool ? ("t" in y ? y.t : i(c))("tool.hide") : ("t" in y ? y.t : i(c))("tool.show")
|
|
1618
1619
|
}, {
|
|
1619
1620
|
default: A(() => [
|
|
1620
1621
|
v(R, {
|
|
@@ -1632,7 +1633,7 @@ const Be = {
|
|
|
1632
1633
|
_: 1
|
|
1633
1634
|
}, 8, ["content"]),
|
|
1634
1635
|
v(I, {
|
|
1635
|
-
content: ("t" in
|
|
1636
|
+
content: ("t" in y ? y.t : i(c))("shortcut.title")
|
|
1636
1637
|
}, {
|
|
1637
1638
|
default: A(() => [
|
|
1638
1639
|
v(R, {
|
|
@@ -1650,7 +1651,7 @@ const Be = {
|
|
|
1650
1651
|
_: 1
|
|
1651
1652
|
}, 8, ["content"]),
|
|
1652
1653
|
v(I, {
|
|
1653
|
-
content: `${(j = i(d)) != null && j.isFullscreen ? ("t" in
|
|
1654
|
+
content: `${(j = i(d)) != null && j.isFullscreen ? ("t" in y ? y.t : i(c))("fullscreen.disable") : ("t" in y ? y.t : i(c))("fullscreen.title")} (F11 / ⌘+F11)`
|
|
1654
1655
|
}, {
|
|
1655
1656
|
default: A(() => {
|
|
1656
1657
|
var q;
|
|
@@ -1676,14 +1677,14 @@ const Be = {
|
|
|
1676
1677
|
_: 1
|
|
1677
1678
|
}, 8, ["content"]),
|
|
1678
1679
|
v(I, {
|
|
1679
|
-
content: ("t" in
|
|
1680
|
+
content: ("t" in y ? y.t : i(c))("poweredBy")
|
|
1680
1681
|
}, {
|
|
1681
1682
|
default: A(() => [
|
|
1682
1683
|
v(R, {
|
|
1683
1684
|
class: "smart-status-bar-button",
|
|
1684
1685
|
quaternary: "",
|
|
1685
1686
|
size: "tiny",
|
|
1686
|
-
onClick:
|
|
1687
|
+
onClick: w
|
|
1687
1688
|
}, {
|
|
1688
1689
|
default: A(() => L[7] || (L[7] = [
|
|
1689
1690
|
g("i", { class: "i-sed:powered-by" }, null, -1)
|
|
@@ -1694,7 +1695,7 @@ const Be = {
|
|
|
1694
1695
|
_: 1
|
|
1695
1696
|
}, 8, ["content"]),
|
|
1696
1697
|
v(I, {
|
|
1697
|
-
content: ("t" in
|
|
1698
|
+
content: ("t" in y ? y.t : i(c))("feedback")
|
|
1698
1699
|
}, {
|
|
1699
1700
|
default: A(() => [
|
|
1700
1701
|
v(R, {
|
|
@@ -1728,7 +1729,7 @@ const Be = {
|
|
|
1728
1729
|
default: A(() => [
|
|
1729
1730
|
i(u) > 0 ? (m(), $("span", Sl, N(i(u)) + "/ ", 1)) : F("", !0),
|
|
1730
1731
|
g("span", $l, N(i(t).storage.characterCount.characters()), 1),
|
|
1731
|
-
te(" " + N(("t" in
|
|
1732
|
+
te(" " + N(("t" in y ? y.t : i(c))("wordCount.characters")) + " ", 1),
|
|
1732
1733
|
g("i", {
|
|
1733
1734
|
class: "i-sed:arrow-down",
|
|
1734
1735
|
style: le({ marginLeft: "2px", transform: `rotate(${i(a) ? "180deg" : 0})` })
|
|
@@ -1741,18 +1742,18 @@ const Be = {
|
|
|
1741
1742
|
var q, Q;
|
|
1742
1743
|
return [
|
|
1743
1744
|
g("div", Ml, [
|
|
1744
|
-
g("div", Bl, N(("t" in
|
|
1745
|
+
g("div", Bl, N(("t" in y ? y.t : i(c))("wordCount.title")), 1),
|
|
1745
1746
|
g("ul", null, [
|
|
1746
1747
|
g("li", null, [
|
|
1747
|
-
te(N(("t" in
|
|
1748
|
+
te(N(("t" in y ? y.t : i(c))("wordCount.input")) + " ", 1),
|
|
1748
1749
|
g("span", null, N(i(t).storage.characterCount.characters()), 1)
|
|
1749
1750
|
]),
|
|
1750
1751
|
g("li", null, [
|
|
1751
|
-
te(N(("t" in
|
|
1752
|
+
te(N(("t" in y ? y.t : i(c))("wordCount.selection")) + " ", 1),
|
|
1752
1753
|
g("span", null, N(i(u)), 1)
|
|
1753
1754
|
]),
|
|
1754
1755
|
((q = i(n).document) == null ? void 0 : q.characterLimit) ?? !1 ? (m(), $("li", Ll, [
|
|
1755
|
-
te(N(("t" in
|
|
1756
|
+
te(N(("t" in y ? y.t : i(c))("wordCount.limit")) + " ", 1),
|
|
1756
1757
|
g("span", null, N(((Q = i(n).document) == null ? void 0 : Q.characterLimit) ?? 0), 1)
|
|
1757
1758
|
])) : F("", !0)
|
|
1758
1759
|
])
|
|
@@ -1784,11 +1785,11 @@ const Be = {
|
|
|
1784
1785
|
g("span", Rl, [
|
|
1785
1786
|
i(l) ? (m(), $("span", {
|
|
1786
1787
|
key: 0,
|
|
1787
|
-
textContent: N(("t" in
|
|
1788
|
+
textContent: N(("t" in y ? y.t : i(c))("save.savedAtText", { time: i(un)(i(l)) }))
|
|
1788
1789
|
}, null, 8, El)) : (m(), $("span", {
|
|
1789
1790
|
key: 1,
|
|
1790
1791
|
class: "unsaved",
|
|
1791
|
-
textContent: N(("t" in
|
|
1792
|
+
textContent: N(("t" in y ? y.t : i(c))("save.unsaved"))
|
|
1792
1793
|
}, null, 8, Il))
|
|
1793
1794
|
])
|
|
1794
1795
|
])
|
|
@@ -1798,34 +1799,34 @@ const Be = {
|
|
|
1798
1799
|
]),
|
|
1799
1800
|
default: A(() => [
|
|
1800
1801
|
g("div", Fl, [
|
|
1801
|
-
g("div", null, N(("t" in
|
|
1802
|
+
g("div", null, N(("t" in y ? y.t : i(c))("save.network")) + " " + N(i(h) ? ("t" in y ? y.t : i(c))("save.online") : ("t" in y ? y.t : i(c))("save.offline")), 1),
|
|
1802
1803
|
g("div", null, [
|
|
1803
|
-
te(N(("t" in
|
|
1804
|
+
te(N(("t" in y ? y.t : i(c))("save.savedAt")) + " ", 1),
|
|
1804
1805
|
i(l) ? (m(), $("span", {
|
|
1805
1806
|
key: 0,
|
|
1806
|
-
textContent: N(("t" in
|
|
1807
|
+
textContent: N(("t" in y ? y.t : i(c))("save.savedAtText", { time: i(un)(i(l)) }))
|
|
1807
1808
|
}, null, 8, Hl)) : (m(), $("span", {
|
|
1808
1809
|
key: 1,
|
|
1809
|
-
textContent: N(("t" in
|
|
1810
|
+
textContent: N(("t" in y ? y.t : i(c))("save.unsaved"))
|
|
1810
1811
|
}, null, 8, zl))
|
|
1811
1812
|
]),
|
|
1812
1813
|
g("div", Ol, [
|
|
1813
1814
|
v(R, {
|
|
1814
1815
|
size: "tiny",
|
|
1815
1816
|
type: "primary",
|
|
1816
|
-
onClick:
|
|
1817
|
+
onClick: C
|
|
1817
1818
|
}, {
|
|
1818
1819
|
default: A(() => [
|
|
1819
|
-
te(N(("t" in
|
|
1820
|
+
te(N(("t" in y ? y.t : i(c))("save.text")), 1)
|
|
1820
1821
|
]),
|
|
1821
1822
|
_: 1
|
|
1822
1823
|
}),
|
|
1823
1824
|
v(R, {
|
|
1824
1825
|
size: "tiny",
|
|
1825
|
-
onClick:
|
|
1826
|
+
onClick: x
|
|
1826
1827
|
}, {
|
|
1827
1828
|
default: A(() => [
|
|
1828
|
-
te(N(("t" in
|
|
1829
|
+
te(N(("t" in y ? y.t : i(c))("save.cache.text")), 1)
|
|
1829
1830
|
]),
|
|
1830
1831
|
_: 1
|
|
1831
1832
|
})
|
|
@@ -1836,7 +1837,7 @@ const Be = {
|
|
|
1836
1837
|
}, 8, ["show", "to"])
|
|
1837
1838
|
])
|
|
1838
1839
|
]),
|
|
1839
|
-
v(
|
|
1840
|
+
v(D, {
|
|
1840
1841
|
show: i(s),
|
|
1841
1842
|
"onUpdate:show": L[3] || (L[3] = (q) => Ge(s) ? s.value = q : null),
|
|
1842
1843
|
width: 320,
|
|
@@ -1849,7 +1850,7 @@ const Be = {
|
|
|
1849
1850
|
header: A(() => [
|
|
1850
1851
|
g("div", Pl, [
|
|
1851
1852
|
L[10] || (L[10] = g("i", { class: "smart-icon i-sed:shortcut" }, null, -1)),
|
|
1852
|
-
te(" " + N(("t" in
|
|
1853
|
+
te(" " + N(("t" in y ? y.t : i(c))("shortcut.title")), 1)
|
|
1853
1854
|
])
|
|
1854
1855
|
]),
|
|
1855
1856
|
default: A(() => [
|
|
@@ -1863,7 +1864,7 @@ const Be = {
|
|
|
1863
1864
|
], 64);
|
|
1864
1865
|
};
|
|
1865
1866
|
}
|
|
1866
|
-
},
|
|
1867
|
+
}, Vl = /* @__PURE__ */ H(Wl, [["__scopeId", "data-v-a66f175f"]]), bo = ["table", "orderedList", "bulletList"], Dl = $e.create({
|
|
1867
1868
|
name: "selection",
|
|
1868
1869
|
addProseMirrorPlugins() {
|
|
1869
1870
|
const { editor: r } = this;
|
|
@@ -1938,23 +1939,23 @@ const Ul = { class: "smart-search-replace-container" }, Jl = { class: "smart-sea
|
|
|
1938
1939
|
At("ctrl+f, command+f", () => {
|
|
1939
1940
|
n.value = !0;
|
|
1940
1941
|
});
|
|
1941
|
-
const p =
|
|
1942
|
+
const p = W(
|
|
1942
1943
|
() => {
|
|
1943
|
-
var
|
|
1944
|
-
return ((
|
|
1944
|
+
var w, y;
|
|
1945
|
+
return ((y = (w = e.value) == null ? void 0 : w.storage.searchAndReplace) == null ? void 0 : y.results.length) || 0;
|
|
1945
1946
|
}
|
|
1946
1947
|
);
|
|
1947
1948
|
function f() {
|
|
1948
|
-
var
|
|
1949
|
-
a.value = "", u.value = "", (
|
|
1949
|
+
var w;
|
|
1950
|
+
a.value = "", u.value = "", (w = e.value) == null || w.commands.resetIndex();
|
|
1950
1951
|
}
|
|
1951
|
-
function b(
|
|
1952
|
-
e.value && (
|
|
1952
|
+
function b(w = !1) {
|
|
1953
|
+
e.value && (w && e.value.commands.resetIndex(), e.value.commands.setSearchTerm(a.value), e.value.commands.setReplaceTerm(u.value), e.value.commands.setCaseSensitive(d.value));
|
|
1953
1954
|
}
|
|
1954
1955
|
function h() {
|
|
1955
1956
|
if (!e.value)
|
|
1956
1957
|
return;
|
|
1957
|
-
const { results:
|
|
1958
|
+
const { results: w, resultIndex: y } = e.value.storage.searchAndReplace, L = w[y];
|
|
1958
1959
|
if (!L)
|
|
1959
1960
|
return;
|
|
1960
1961
|
e.value.commands.setTextSelection(L);
|
|
@@ -1963,43 +1964,43 @@ const Ul = { class: "smart-search-replace-container" }, Jl = { class: "smart-sea
|
|
|
1963
1964
|
);
|
|
1964
1965
|
R.scrollIntoView({ behavior: "smooth", block: "center" });
|
|
1965
1966
|
}
|
|
1966
|
-
|
|
1967
|
+
pe(
|
|
1967
1968
|
() => a.value.trim(),
|
|
1968
|
-
(
|
|
1969
|
-
|
|
1969
|
+
(w, y) => {
|
|
1970
|
+
w || f(), w !== y && b(!0);
|
|
1970
1971
|
}
|
|
1971
|
-
),
|
|
1972
|
+
), pe(
|
|
1972
1973
|
() => u.value.trim(),
|
|
1973
|
-
(
|
|
1974
|
-
),
|
|
1974
|
+
(w, y) => w === y ? null : b()
|
|
1975
|
+
), pe(
|
|
1975
1976
|
() => d.value,
|
|
1976
1977
|
// 修复:使用 getter 函数监听 caseSensitive 的值
|
|
1977
|
-
(
|
|
1978
|
-
|
|
1978
|
+
(w, y) => {
|
|
1979
|
+
w !== y && b(!0);
|
|
1979
1980
|
}
|
|
1980
1981
|
);
|
|
1981
|
-
function
|
|
1982
|
-
var
|
|
1983
|
-
(
|
|
1982
|
+
function k() {
|
|
1983
|
+
var w;
|
|
1984
|
+
(w = e.value) == null || w.commands.nextSearchResult(), h();
|
|
1984
1985
|
}
|
|
1985
|
-
function
|
|
1986
|
-
var
|
|
1987
|
-
(
|
|
1986
|
+
function C() {
|
|
1987
|
+
var w;
|
|
1988
|
+
(w = e.value) == null || w.commands.previousSearchResult(), h();
|
|
1988
1989
|
}
|
|
1989
|
-
function
|
|
1990
|
-
var
|
|
1991
|
-
(
|
|
1990
|
+
function x() {
|
|
1991
|
+
var w;
|
|
1992
|
+
(w = e.value) == null || w.commands.replace(), h();
|
|
1992
1993
|
}
|
|
1993
1994
|
const T = () => {
|
|
1994
|
-
var
|
|
1995
|
-
return (
|
|
1995
|
+
var w;
|
|
1996
|
+
return (w = e.value) == null ? void 0 : w.commands.replaceAll();
|
|
1996
1997
|
};
|
|
1997
|
-
return
|
|
1998
|
+
return pe(
|
|
1998
1999
|
() => n.value,
|
|
1999
|
-
(
|
|
2000
|
-
a.value =
|
|
2000
|
+
(w) => {
|
|
2001
|
+
a.value = w ? at(e.value) : "";
|
|
2001
2002
|
}
|
|
2002
|
-
), (
|
|
2003
|
+
), (w, y) => {
|
|
2003
2004
|
const L = Bn, R = Se, I = er, U = tr;
|
|
2004
2005
|
return i(n) ? (m(), _(i($r), {
|
|
2005
2006
|
key: 0,
|
|
@@ -2012,28 +2013,28 @@ const Ul = { class: "smart-search-replace-container" }, Jl = { class: "smart-sea
|
|
|
2012
2013
|
v(U, {
|
|
2013
2014
|
closable: "",
|
|
2014
2015
|
style: { width: "420px", "box-shadow": "0 1px 2px -2px rgba(0, 0, 0, .08), 0 3px 6px 0 rgba(0, 0, 0, .06), 0 5px 12px 4px rgba(0, 0, 0, .04)" },
|
|
2015
|
-
onClose:
|
|
2016
|
+
onClose: y[3] || (y[3] = (O) => n.value = !1)
|
|
2016
2017
|
}, {
|
|
2017
2018
|
header: A(() => [
|
|
2018
2019
|
g("div", {
|
|
2019
2020
|
ref_key: "handle",
|
|
2020
2021
|
ref: t,
|
|
2021
2022
|
style: { cursor: "move", display: "flex", "align-items": "center" }
|
|
2022
|
-
}, N(("t" in
|
|
2023
|
+
}, N(("t" in w ? w.t : i(c))("search.title")), 513)
|
|
2023
2024
|
]),
|
|
2024
2025
|
default: A(() => [
|
|
2025
2026
|
g("div", Ul, [
|
|
2026
2027
|
g("div", Jl, [
|
|
2027
2028
|
v(L, {
|
|
2028
2029
|
value: i(a),
|
|
2029
|
-
"onUpdate:value":
|
|
2030
|
-
placeholder: ("t" in
|
|
2030
|
+
"onUpdate:value": y[0] || (y[0] = (O) => Ge(a) ? a.value = O : null),
|
|
2031
|
+
placeholder: ("t" in w ? w.t : i(c))("search.searchText"),
|
|
2031
2032
|
clearable: ""
|
|
2032
2033
|
}, {
|
|
2033
2034
|
suffix: A(() => {
|
|
2034
|
-
var O, S,
|
|
2035
|
+
var O, S, D;
|
|
2035
2036
|
return [
|
|
2036
|
-
te(N(i(a) !== "" && i(p) !== 0 ? ((
|
|
2037
|
+
te(N(i(a) !== "" && i(p) !== 0 ? ((D = (S = (O = i(e)) == null ? void 0 : O.storage) == null ? void 0 : S.searchAndReplace) == null ? void 0 : D.resultIndex) + 1 : 0) + " / " + N(i(p)), 1)
|
|
2037
2038
|
];
|
|
2038
2039
|
}),
|
|
2039
2040
|
_: 1
|
|
@@ -2041,9 +2042,9 @@ const Ul = { class: "smart-search-replace-container" }, Jl = { class: "smart-sea
|
|
|
2041
2042
|
v(R, {
|
|
2042
2043
|
disabled: i(p) === 0,
|
|
2043
2044
|
quaternary: "",
|
|
2044
|
-
onClick:
|
|
2045
|
+
onClick: k
|
|
2045
2046
|
}, {
|
|
2046
|
-
default: A(() =>
|
|
2047
|
+
default: A(() => y[4] || (y[4] = [
|
|
2047
2048
|
g("i", { class: "i-sed:arrow-down" }, null, -1)
|
|
2048
2049
|
])),
|
|
2049
2050
|
_: 1
|
|
@@ -2051,9 +2052,9 @@ const Ul = { class: "smart-search-replace-container" }, Jl = { class: "smart-sea
|
|
|
2051
2052
|
v(R, {
|
|
2052
2053
|
disabled: i(p) === 0,
|
|
2053
2054
|
quaternary: "",
|
|
2054
|
-
onClick:
|
|
2055
|
+
onClick: C
|
|
2055
2056
|
}, {
|
|
2056
|
-
default: A(() =>
|
|
2057
|
+
default: A(() => y[5] || (y[5] = [
|
|
2057
2058
|
g("i", {
|
|
2058
2059
|
class: "i-sed:arrow-down",
|
|
2059
2060
|
style: { transform: "rotate(180deg)" }
|
|
@@ -2065,18 +2066,18 @@ const Ul = { class: "smart-search-replace-container" }, Jl = { class: "smart-sea
|
|
|
2065
2066
|
g("div", ql, [
|
|
2066
2067
|
v(L, {
|
|
2067
2068
|
value: i(u),
|
|
2068
|
-
"onUpdate:value":
|
|
2069
|
-
placeholder: ("t" in
|
|
2069
|
+
"onUpdate:value": y[1] || (y[1] = (O) => Ge(u) ? u.value = O : null),
|
|
2070
|
+
placeholder: ("t" in w ? w.t : i(c))("search.replaceText"),
|
|
2070
2071
|
clearable: ""
|
|
2071
2072
|
}, null, 8, ["value", "placeholder"])
|
|
2072
2073
|
]),
|
|
2073
2074
|
g("div", jl, [
|
|
2074
2075
|
v(I, {
|
|
2075
2076
|
checked: i(d),
|
|
2076
|
-
"onUpdate:checked":
|
|
2077
|
+
"onUpdate:checked": y[2] || (y[2] = (O) => Ge(d) ? d.value = O : null)
|
|
2077
2078
|
}, {
|
|
2078
2079
|
default: A(() => [
|
|
2079
|
-
te(N(("t" in
|
|
2080
|
+
te(N(("t" in w ? w.t : i(c))("search.caseSensitive")), 1)
|
|
2080
2081
|
]),
|
|
2081
2082
|
_: 1
|
|
2082
2083
|
}, 8, ["checked"])
|
|
@@ -2085,10 +2086,10 @@ const Ul = { class: "smart-search-replace-container" }, Jl = { class: "smart-sea
|
|
|
2085
2086
|
v(R, {
|
|
2086
2087
|
disabled: i(p) === 0,
|
|
2087
2088
|
quaternary: "",
|
|
2088
|
-
onClick:
|
|
2089
|
+
onClick: x
|
|
2089
2090
|
}, {
|
|
2090
2091
|
default: A(() => [
|
|
2091
|
-
te(N(("t" in
|
|
2092
|
+
te(N(("t" in w ? w.t : i(c))("search.replace")), 1)
|
|
2092
2093
|
]),
|
|
2093
2094
|
_: 1
|
|
2094
2095
|
}, 8, ["disabled"]),
|
|
@@ -2098,17 +2099,17 @@ const Ul = { class: "smart-search-replace-container" }, Jl = { class: "smart-sea
|
|
|
2098
2099
|
onClick: T
|
|
2099
2100
|
}, {
|
|
2100
2101
|
default: A(() => [
|
|
2101
|
-
te(N(("t" in
|
|
2102
|
+
te(N(("t" in w ? w.t : i(c))("search.replaceAll")), 1)
|
|
2102
2103
|
]),
|
|
2103
2104
|
_: 1
|
|
2104
2105
|
}, 8, ["disabled"]),
|
|
2105
2106
|
v(R, {
|
|
2106
2107
|
disabled: i(p) === 0,
|
|
2107
2108
|
type: "primary",
|
|
2108
|
-
onClick:
|
|
2109
|
+
onClick: k
|
|
2109
2110
|
}, {
|
|
2110
2111
|
default: A(() => [
|
|
2111
|
-
te(N(("t" in
|
|
2112
|
+
te(N(("t" in w ? w.t : i(c))("search.search")), 1)
|
|
2112
2113
|
]),
|
|
2113
2114
|
_: 1
|
|
2114
2115
|
}, 8, ["disabled"])
|
|
@@ -2122,14 +2123,14 @@ const Ul = { class: "smart-search-replace-container" }, Jl = { class: "smart-sea
|
|
|
2122
2123
|
}, 8, ["container-element", "handle"])) : F("", !0);
|
|
2123
2124
|
};
|
|
2124
2125
|
}
|
|
2125
|
-
},
|
|
2126
|
+
}, Yl = /* @__PURE__ */ H(Kl, [["__scopeId", "data-v-362bc17d"]]), Zl = {
|
|
2126
2127
|
__name: "common",
|
|
2127
2128
|
setup(r) {
|
|
2128
2129
|
const { container: e, editor: n, blockMenu: o } = M(), t = B(!1);
|
|
2129
2130
|
function l(u) {
|
|
2130
2131
|
return () => _e("i", { class: `${u}`, style: "font-size: 16px;" });
|
|
2131
2132
|
}
|
|
2132
|
-
const s =
|
|
2133
|
+
const s = W(() => [
|
|
2133
2134
|
{
|
|
2134
2135
|
label: c("blockMenu.clearFormat"),
|
|
2135
2136
|
key: "clearFormat",
|
|
@@ -2141,8 +2142,8 @@ const Ul = { class: "smart-search-replace-container" }, Jl = { class: "smart-sea
|
|
|
2141
2142
|
const u = n.value ? Ie(n.value) : null, d = () => {
|
|
2142
2143
|
var h;
|
|
2143
2144
|
let b = 0;
|
|
2144
|
-
return (h = n.value) == null || h.state.doc.descendants((
|
|
2145
|
-
|
|
2145
|
+
return (h = n.value) == null || h.state.doc.descendants((k, C) => {
|
|
2146
|
+
k === u && (b = C + k.nodeSize);
|
|
2146
2147
|
}), b;
|
|
2147
2148
|
};
|
|
2148
2149
|
(f = n.value) == null || f.chain().focus(d() - 1).run();
|
|
@@ -2159,8 +2160,8 @@ const Ul = { class: "smart-search-replace-container" }, Jl = { class: "smart-sea
|
|
|
2159
2160
|
const u = n.value ? Ie(n.value) : null, d = () => {
|
|
2160
2161
|
var h;
|
|
2161
2162
|
let b = 0;
|
|
2162
|
-
return (h = n.value) == null || h.state.doc.descendants((
|
|
2163
|
-
|
|
2163
|
+
return (h = n.value) == null || h.state.doc.descendants((k, C) => {
|
|
2164
|
+
k === u && (b = C + k.nodeSize);
|
|
2164
2165
|
}), b;
|
|
2165
2166
|
}, p = u == null ? void 0 : u.type.create(
|
|
2166
2167
|
{
|
|
@@ -2246,30 +2247,30 @@ const Ul = { class: "smart-search-replace-container" }, Jl = { class: "smart-sea
|
|
|
2246
2247
|
}, 8, ["to", "options"]);
|
|
2247
2248
|
};
|
|
2248
2249
|
}
|
|
2249
|
-
},
|
|
2250
|
+
}, Xl = /* @__PURE__ */ H(Zl, [["__scopeId", "data-v-60ea9768"]]), Ql = {
|
|
2250
2251
|
__name: "node",
|
|
2251
2252
|
setup(r) {
|
|
2252
2253
|
const { container: e, editor: n, blockMenu: o, options: t, assistantBox: l } = M(), s = B(!1), a = B(!1), u = B(""), d = B("");
|
|
2253
|
-
function p(
|
|
2254
|
-
return () => _e("i", { class: `${
|
|
2254
|
+
function p(C) {
|
|
2255
|
+
return () => _e("i", { class: `${C}`, style: "font-size: 16px;" });
|
|
2255
2256
|
}
|
|
2256
|
-
function f(
|
|
2257
|
+
function f(C) {
|
|
2257
2258
|
try {
|
|
2258
|
-
t.value.render[u.value].insertAction(n.value,
|
|
2259
|
+
t.value.render[u.value].insertAction(n.value, C.data);
|
|
2259
2260
|
} catch {
|
|
2260
2261
|
throw new Error("插入失败,请配置插入方法");
|
|
2261
2262
|
} finally {
|
|
2262
2263
|
a.value = !1;
|
|
2263
2264
|
}
|
|
2264
2265
|
}
|
|
2265
|
-
const b =
|
|
2266
|
-
var
|
|
2266
|
+
const b = W(() => {
|
|
2267
|
+
var C, x, T, w, y, L, R, I, U, O, S, D, j, q, Q, G, ue, ee, he, Ce, Le, We, Ne;
|
|
2267
2268
|
return [
|
|
2268
2269
|
{
|
|
2269
2270
|
label: c("assistant.text"),
|
|
2270
2271
|
key: "assistant",
|
|
2271
2272
|
icon: p("i-sed:assistant"),
|
|
2272
|
-
show: !!((
|
|
2273
|
+
show: !!((x = (C = t.value) == null ? void 0 : C.assistant) != null && x.enabled && ((T = n.value) != null && T.isActive("paragraph") || (w = n.value) != null && w.isActive("heading")) && ((I = (R = (L = (y = n.value) == null ? void 0 : y.state) == null ? void 0 : L.selection) == null ? void 0 : R.$from) != null && I.nodeAfter)),
|
|
2273
2274
|
props: {
|
|
2274
2275
|
onClick: () => {
|
|
2275
2276
|
h();
|
|
@@ -2279,7 +2280,7 @@ const Ul = { class: "smart-search-replace-container" }, Jl = { class: "smart-sea
|
|
|
2279
2280
|
{
|
|
2280
2281
|
type: "divider",
|
|
2281
2282
|
key: "d1",
|
|
2282
|
-
show: !!((O = (U = t.value) == null ? void 0 : U.assistant) != null && O.enabled && ((S = n.value) != null && S.isActive("paragraph") || (
|
|
2283
|
+
show: !!((O = (U = t.value) == null ? void 0 : U.assistant) != null && O.enabled && ((S = n.value) != null && S.isActive("paragraph") || (D = n.value) != null && D.isActive("heading")) && ((G = (Q = (q = (j = n.value) == null ? void 0 : j.state) == null ? void 0 : q.selection) == null ? void 0 : Q.$from) != null && G.nodeAfter))
|
|
2283
2284
|
},
|
|
2284
2285
|
{
|
|
2285
2286
|
key: "insert",
|
|
@@ -2303,8 +2304,8 @@ const Ul = { class: "smart-search-replace-container" }, Jl = { class: "smart-sea
|
|
|
2303
2304
|
icon: p("i-sed:split-block"),
|
|
2304
2305
|
props: {
|
|
2305
2306
|
onClick: () => {
|
|
2306
|
-
var P,
|
|
2307
|
-
(P = n.value) == null || P.chain().focus().enter().run(), (
|
|
2307
|
+
var P, X;
|
|
2308
|
+
(P = n.value) == null || P.chain().focus().enter().run(), (X = n.value) == null || X.chain().focus().setHorizontalRule().run();
|
|
2308
2309
|
}
|
|
2309
2310
|
}
|
|
2310
2311
|
},
|
|
@@ -2377,8 +2378,8 @@ const Ul = { class: "smart-search-replace-container" }, Jl = { class: "smart-sea
|
|
|
2377
2378
|
icon: p("i-sed:code-block"),
|
|
2378
2379
|
props: {
|
|
2379
2380
|
onClick: () => {
|
|
2380
|
-
var P,
|
|
2381
|
-
(P = n.value) == null || P.chain().focus().setCodeBlock().run(), (
|
|
2381
|
+
var P, X;
|
|
2382
|
+
(P = n.value) == null || P.chain().focus().setCodeBlock().run(), (X = n.value) == null || X.chain().focus().enter().run();
|
|
2382
2383
|
}
|
|
2383
2384
|
}
|
|
2384
2385
|
},
|
|
@@ -2506,8 +2507,8 @@ const Ul = { class: "smart-search-replace-container" }, Jl = { class: "smart-sea
|
|
|
2506
2507
|
disabled: (ue = n.value) == null ? void 0 : ue.isActive("paragraph"),
|
|
2507
2508
|
props: {
|
|
2508
2509
|
onClick: () => {
|
|
2509
|
-
var P,
|
|
2510
|
-
(P = n.value) == null || P.chain().focus().run(), (
|
|
2510
|
+
var P, X;
|
|
2511
|
+
(P = n.value) == null || P.chain().focus().run(), (X = n.value) == null || X.chain().focus().setParagraph().run();
|
|
2511
2512
|
}
|
|
2512
2513
|
}
|
|
2513
2514
|
},
|
|
@@ -2523,8 +2524,8 @@ const Ul = { class: "smart-search-replace-container" }, Jl = { class: "smart-sea
|
|
|
2523
2524
|
disabled: (ee = n.value) == null ? void 0 : ee.isActive("heading", { level: 1 }),
|
|
2524
2525
|
props: {
|
|
2525
2526
|
onClick: () => {
|
|
2526
|
-
var P,
|
|
2527
|
-
(P = n.value) != null && P.isActive("heading", { level: 1 }) || ((
|
|
2527
|
+
var P, X, ce;
|
|
2528
|
+
(P = n.value) != null && P.isActive("heading", { level: 1 }) || ((X = n.value) == null || X.chain().focus().run(), (ce = n.value) == null || ce.chain().focus().toggleHeading({ level: 1 }).run());
|
|
2528
2529
|
}
|
|
2529
2530
|
}
|
|
2530
2531
|
},
|
|
@@ -2535,8 +2536,8 @@ const Ul = { class: "smart-search-replace-container" }, Jl = { class: "smart-sea
|
|
|
2535
2536
|
disabled: (he = n.value) == null ? void 0 : he.isActive("heading", { level: 2 }),
|
|
2536
2537
|
props: {
|
|
2537
2538
|
onClick: () => {
|
|
2538
|
-
var P,
|
|
2539
|
-
(P = n.value) != null && P.isActive("heading", { level: 2 }) || ((
|
|
2539
|
+
var P, X, ce;
|
|
2540
|
+
(P = n.value) != null && P.isActive("heading", { level: 2 }) || ((X = n.value) == null || X.chain().focus().run(), (ce = n.value) == null || ce.chain().focus().toggleHeading({ level: 2 }).run());
|
|
2540
2541
|
}
|
|
2541
2542
|
}
|
|
2542
2543
|
},
|
|
@@ -2547,8 +2548,8 @@ const Ul = { class: "smart-search-replace-container" }, Jl = { class: "smart-sea
|
|
|
2547
2548
|
disabled: (Ce = n.value) == null ? void 0 : Ce.isActive("heading", { level: 3 }),
|
|
2548
2549
|
props: {
|
|
2549
2550
|
onClick: () => {
|
|
2550
|
-
var P,
|
|
2551
|
-
(P = n.value) != null && P.isActive("heading", { level: 3 }) || ((
|
|
2551
|
+
var P, X, ce;
|
|
2552
|
+
(P = n.value) != null && P.isActive("heading", { level: 3 }) || ((X = n.value) == null || X.chain().focus().run(), (ce = n.value) == null || ce.chain().focus().toggleHeading({ level: 3 }).run());
|
|
2552
2553
|
}
|
|
2553
2554
|
}
|
|
2554
2555
|
},
|
|
@@ -2559,8 +2560,8 @@ const Ul = { class: "smart-search-replace-container" }, Jl = { class: "smart-sea
|
|
|
2559
2560
|
disabled: (Le = n.value) == null ? void 0 : Le.isActive("heading", { level: 4 }),
|
|
2560
2561
|
props: {
|
|
2561
2562
|
onClick: () => {
|
|
2562
|
-
var P,
|
|
2563
|
-
(P = n.value) != null && P.isActive("heading", { level: 4 }) || ((
|
|
2563
|
+
var P, X, ce;
|
|
2564
|
+
(P = n.value) != null && P.isActive("heading", { level: 4 }) || ((X = n.value) == null || X.chain().focus().run(), (ce = n.value) == null || ce.chain().focus().toggleHeading({ level: 4 }).run());
|
|
2564
2565
|
}
|
|
2565
2566
|
}
|
|
2566
2567
|
},
|
|
@@ -2571,8 +2572,8 @@ const Ul = { class: "smart-search-replace-container" }, Jl = { class: "smart-sea
|
|
|
2571
2572
|
disabled: (We = n.value) == null ? void 0 : We.isActive("heading", { level: 5 }),
|
|
2572
2573
|
props: {
|
|
2573
2574
|
onClick: () => {
|
|
2574
|
-
var P,
|
|
2575
|
-
(P = n.value) != null && P.isActive("heading", { level: 5 }) || ((
|
|
2575
|
+
var P, X, ce;
|
|
2576
|
+
(P = n.value) != null && P.isActive("heading", { level: 5 }) || ((X = n.value) == null || X.chain().focus().run(), (ce = n.value) == null || ce.chain().focus().toggleHeading({ level: 5 }).run());
|
|
2576
2577
|
}
|
|
2577
2578
|
}
|
|
2578
2579
|
},
|
|
@@ -2583,8 +2584,8 @@ const Ul = { class: "smart-search-replace-container" }, Jl = { class: "smart-sea
|
|
|
2583
2584
|
disabled: (Ne = n.value) == null ? void 0 : Ne.isActive("heading", { level: 6 }),
|
|
2584
2585
|
props: {
|
|
2585
2586
|
onClick: () => {
|
|
2586
|
-
var P,
|
|
2587
|
-
(P = n.value) != null && P.isActive("heading", { level: 6 }) || ((
|
|
2587
|
+
var P, X, ce;
|
|
2588
|
+
(P = n.value) != null && P.isActive("heading", { level: 6 }) || ((X = n.value) == null || X.chain().focus().run(), (ce = n.value) == null || ce.chain().focus().toggleHeading({ level: 6 }).run());
|
|
2588
2589
|
}
|
|
2589
2590
|
}
|
|
2590
2591
|
}
|
|
@@ -2637,24 +2638,24 @@ const Ul = { class: "smart-search-replace-container" }, Jl = { class: "smart-sea
|
|
|
2637
2638
|
];
|
|
2638
2639
|
});
|
|
2639
2640
|
function h() {
|
|
2640
|
-
var T,
|
|
2641
|
-
l.value = !0, (T = n.value) == null || T.commands.selectParentNode(), (
|
|
2642
|
-
const { from:
|
|
2643
|
-
(L = n.value) == null || L.commands.setTextSelection({ from:
|
|
2641
|
+
var T, w, y, L;
|
|
2642
|
+
l.value = !0, (T = n.value) == null || T.commands.selectParentNode(), (w = n.value) == null || w.commands.focus();
|
|
2643
|
+
const { from: C, to: x } = ((y = n.value) == null ? void 0 : y.state.selection) ?? {};
|
|
2644
|
+
(L = n.value) == null || L.commands.setTextSelection({ from: C ?? 0, to: x ?? 0 });
|
|
2644
2645
|
}
|
|
2645
|
-
async function C
|
|
2646
|
-
n.value.commands.focus(), o.value =
|
|
2646
|
+
async function k(C) {
|
|
2647
|
+
n.value.commands.focus(), o.value = C, s.value = C;
|
|
2647
2648
|
}
|
|
2648
|
-
return (
|
|
2649
|
-
var
|
|
2650
|
-
const T = Se,
|
|
2649
|
+
return (C, x) => {
|
|
2650
|
+
var y;
|
|
2651
|
+
const T = Se, w = st;
|
|
2651
2652
|
return m(), $(J, null, [
|
|
2652
|
-
v(
|
|
2653
|
+
v(w, {
|
|
2653
2654
|
to: `${i(e)} .smart-page-container`,
|
|
2654
2655
|
placement: "bottom-end",
|
|
2655
2656
|
options: i(b),
|
|
2656
2657
|
trigger: "click",
|
|
2657
|
-
"onUpdate:show":
|
|
2658
|
+
"onUpdate:show": k
|
|
2658
2659
|
}, {
|
|
2659
2660
|
default: A(() => {
|
|
2660
2661
|
var L, R;
|
|
@@ -2665,7 +2666,7 @@ const Ul = { class: "smart-search-replace-container" }, Jl = { class: "smart-sea
|
|
|
2665
2666
|
size: "small",
|
|
2666
2667
|
disabled: ((R = i(n)) == null ? void 0 : R.isEditable) === !1
|
|
2667
2668
|
}, {
|
|
2668
|
-
default: A(() =>
|
|
2669
|
+
default: A(() => x[1] || (x[1] = [
|
|
2669
2670
|
g("div", { class: "smart-button-content" }, [
|
|
2670
2671
|
g("i", { class: "i-sed:block-add" })
|
|
2671
2672
|
], -1)
|
|
@@ -2676,11 +2677,11 @@ const Ul = { class: "smart-search-replace-container" }, Jl = { class: "smart-sea
|
|
|
2676
2677
|
}),
|
|
2677
2678
|
_: 1
|
|
2678
2679
|
}, 8, ["to", "options"]),
|
|
2679
|
-
i(a) ? (m(), _(oe((
|
|
2680
|
+
i(a) ? (m(), _(oe((y = i(t).render[i(u)]) == null ? void 0 : y.insert()), {
|
|
2680
2681
|
key: 0,
|
|
2681
2682
|
visible: i(a),
|
|
2682
2683
|
header: i(d),
|
|
2683
|
-
onClose:
|
|
2684
|
+
onClose: x[0] || (x[0] = (L) => a.value = !1),
|
|
2684
2685
|
onSuccess: f
|
|
2685
2686
|
}, null, 40, ["visible", "header"])) : F("", !0)
|
|
2686
2687
|
], 64);
|
|
@@ -2712,7 +2713,7 @@ const ns = {
|
|
|
2712
2713
|
var a, u;
|
|
2713
2714
|
e && ((a = e.value) == null || a.off("selectionUpdate", s), (u = e.value) == null || u.off("focus", s));
|
|
2714
2715
|
}), (a, u) => {
|
|
2715
|
-
const d = es, p =
|
|
2716
|
+
const d = es, p = Xl;
|
|
2716
2717
|
return i(o) ? (m(), $("div", {
|
|
2717
2718
|
key: 0,
|
|
2718
2719
|
class: "smart-block-menu-hander",
|
|
@@ -2746,7 +2747,7 @@ const ns = {
|
|
|
2746
2747
|
const { options: e, editor: n, assistantBox: o } = M(), t = B(!1), l = B(""), s = B(!1), a = B(30), u = B(0), d = B(0), p = B({
|
|
2747
2748
|
content: "",
|
|
2748
2749
|
error: !1
|
|
2749
|
-
}), f = B(null), b = B(null), h = B(null),
|
|
2750
|
+
}), f = B(null), b = B(null), h = B(null), k = W(() => [
|
|
2750
2751
|
{
|
|
2751
2752
|
category: "continue_write",
|
|
2752
2753
|
iconSvg: "assistant-keep-write",
|
|
@@ -2793,14 +2794,14 @@ const ns = {
|
|
|
2793
2794
|
title: c("assistant.menu.audit")
|
|
2794
2795
|
}
|
|
2795
2796
|
]);
|
|
2796
|
-
function
|
|
2797
|
-
d.value < l.value.length ? (p.value.content += l.value.charAt(d.value), d.value++, setTimeout(
|
|
2797
|
+
function C() {
|
|
2798
|
+
d.value < l.value.length ? (p.value.content += l.value.charAt(d.value), d.value++, setTimeout(C, a.value)) : s.value = !1;
|
|
2798
2799
|
}
|
|
2799
|
-
function
|
|
2800
|
-
u.value < l.value.length && !s.value && (s.value = !0,
|
|
2800
|
+
function x() {
|
|
2801
|
+
u.value < l.value.length && !s.value && (s.value = !0, C());
|
|
2801
2802
|
}
|
|
2802
|
-
|
|
2803
|
-
|
|
2803
|
+
pe(l, () => {
|
|
2804
|
+
x();
|
|
2804
2805
|
});
|
|
2805
2806
|
async function T(I) {
|
|
2806
2807
|
if (I && (b.value = I), !b.value)
|
|
@@ -2811,21 +2812,21 @@ const ns = {
|
|
|
2811
2812
|
};
|
|
2812
2813
|
const { aiTalk: U, handleError: O, handleMessage: S } = e.value.assistant;
|
|
2813
2814
|
h.value = new AbortController();
|
|
2814
|
-
const { signal:
|
|
2815
|
+
const { signal: D } = h.value;
|
|
2815
2816
|
t.value = !0;
|
|
2816
2817
|
try {
|
|
2817
2818
|
const j = await U({
|
|
2818
2819
|
msg: at(n.value),
|
|
2819
2820
|
category: b.value.category,
|
|
2820
|
-
signal:
|
|
2821
|
+
signal: D
|
|
2821
2822
|
});
|
|
2822
2823
|
if (!j.ok) {
|
|
2823
|
-
O(new Error("请求失败")),
|
|
2824
|
+
O(new Error("请求失败")), w();
|
|
2824
2825
|
return;
|
|
2825
2826
|
}
|
|
2826
2827
|
const q = j.body.getReader();
|
|
2827
2828
|
if (!q) {
|
|
2828
|
-
O(new Error("内容错误")),
|
|
2829
|
+
O(new Error("内容错误")), w();
|
|
2829
2830
|
return;
|
|
2830
2831
|
}
|
|
2831
2832
|
const Q = new TextDecoder();
|
|
@@ -2847,14 +2848,14 @@ const ns = {
|
|
|
2847
2848
|
}
|
|
2848
2849
|
}
|
|
2849
2850
|
} catch (j) {
|
|
2850
|
-
j.name === "AbortError" && (t.value = !1), O(new Error("请求错误")),
|
|
2851
|
+
j.name === "AbortError" && (t.value = !1), O(new Error("请求错误")), w();
|
|
2851
2852
|
}
|
|
2852
2853
|
}
|
|
2853
|
-
function
|
|
2854
|
+
function w() {
|
|
2854
2855
|
var I;
|
|
2855
2856
|
o.value = !1, (I = n.value) == null || I.commands.focus();
|
|
2856
2857
|
}
|
|
2857
|
-
function
|
|
2858
|
+
function y() {
|
|
2858
2859
|
h.value && h.value.abort();
|
|
2859
2860
|
}
|
|
2860
2861
|
function L() {
|
|
@@ -2867,7 +2868,7 @@ const ns = {
|
|
|
2867
2868
|
const { from: I, to: U } = (O = n.value) == null ? void 0 : O.state.selection;
|
|
2868
2869
|
(S = n.value) == null || S.chain().focus().insertContentAt({ from: I, to: U }, p.value.content).run();
|
|
2869
2870
|
}
|
|
2870
|
-
return
|
|
2871
|
+
return Ze(() => {
|
|
2871
2872
|
h.value && h.value.abort();
|
|
2872
2873
|
}), (I, U) => (m(), $("div", os, [
|
|
2873
2874
|
g("div", rs, [
|
|
@@ -2877,7 +2878,7 @@ const ns = {
|
|
|
2877
2878
|
g("div", null, N(i(c)("assistant.loading")), 1),
|
|
2878
2879
|
g("div", {
|
|
2879
2880
|
class: "stop",
|
|
2880
|
-
onClick:
|
|
2881
|
+
onClick: y
|
|
2881
2882
|
}, [
|
|
2882
2883
|
U[1] || (U[1] = g("i", { class: "i-sed:assistant-stop text-[#497fed]" }, null, -1)),
|
|
2883
2884
|
g("span", is, N(i(c)("assistant.stop")), 1),
|
|
@@ -2901,7 +2902,7 @@ const ns = {
|
|
|
2901
2902
|
}, N(i(c)("assistant.rewrite")), 1),
|
|
2902
2903
|
g("button", {
|
|
2903
2904
|
class: "operation_button",
|
|
2904
|
-
onClick:
|
|
2905
|
+
onClick: w
|
|
2905
2906
|
}, N(i(c)("assistant.close")), 1)
|
|
2906
2907
|
])),
|
|
2907
2908
|
g("div", {
|
|
@@ -2914,10 +2915,10 @@ const ns = {
|
|
|
2914
2915
|
])) : F("", !0)
|
|
2915
2916
|
]),
|
|
2916
2917
|
i(p).content === "" ? (m(), $("div", ps, [
|
|
2917
|
-
(m(!0), $(J, null, ge(i(
|
|
2918
|
+
(m(!0), $(J, null, ge(i(k), (O, S) => (m(), $("div", {
|
|
2918
2919
|
key: S,
|
|
2919
2920
|
class: "prompt_item",
|
|
2920
|
-
onClick: (
|
|
2921
|
+
onClick: (D) => T(O)
|
|
2921
2922
|
}, [
|
|
2922
2923
|
g("div", fs, [
|
|
2923
2924
|
g("i", {
|
|
@@ -3015,25 +3016,25 @@ const ns = {
|
|
|
3015
3016
|
emits: ["toggle-popup"],
|
|
3016
3017
|
setup(r, { emit: e }) {
|
|
3017
3018
|
const n = r, o = e, t = jt(), { container: l, editor: s } = M();
|
|
3018
|
-
function a(...
|
|
3019
|
-
t.onMenuClickThrough ? t.onMenuClickThrough(...
|
|
3019
|
+
function a(...C) {
|
|
3020
|
+
t.onMenuClickThrough ? t.onMenuClickThrough(...C) : t.onMenuClick && t.onMenuClick(...C);
|
|
3020
3021
|
}
|
|
3021
3022
|
const u = B(!1), d = B(!1);
|
|
3022
|
-
function p(
|
|
3023
|
-
d.value =
|
|
3023
|
+
function p(C) {
|
|
3024
|
+
d.value = C;
|
|
3024
3025
|
}
|
|
3025
3026
|
function f() {
|
|
3026
3027
|
return n.tooltip === !1 ? "" : n.huge && n.tooltip ? `${n.tooltip}${n.shortcut ? ` (${we(n.shortcut)})` : ""}` : n.text ? `${n.tooltip ? n.tooltip : n.text}${n.shortcut ? ` (${we(n.shortcut)})` : ""}` : "";
|
|
3027
3028
|
}
|
|
3028
|
-
|
|
3029
|
+
pe(
|
|
3029
3030
|
() => n.popupVisible,
|
|
3030
|
-
(
|
|
3031
|
-
d.value =
|
|
3031
|
+
(C) => {
|
|
3032
|
+
d.value = C;
|
|
3032
3033
|
}
|
|
3033
3034
|
);
|
|
3034
3035
|
const b = B(null), h = B(null);
|
|
3035
|
-
function C
|
|
3036
|
-
o("toggle-popup",
|
|
3036
|
+
function k(C) {
|
|
3037
|
+
o("toggle-popup", C);
|
|
3037
3038
|
}
|
|
3038
3039
|
return $t(
|
|
3039
3040
|
h,
|
|
@@ -3043,8 +3044,8 @@ const ns = {
|
|
|
3043
3044
|
{
|
|
3044
3045
|
ignore: [b, ".smart-popup"]
|
|
3045
3046
|
}
|
|
3046
|
-
), (
|
|
3047
|
-
const T = Se,
|
|
3047
|
+
), (C, x) => {
|
|
3048
|
+
const T = Se, w = st, y = Ln, L = Ut;
|
|
3048
3049
|
return m(), _(L, {
|
|
3049
3050
|
show: i(u) && !i(d) && r.showTooltip,
|
|
3050
3051
|
placement: "bottom",
|
|
@@ -3056,9 +3057,9 @@ const ns = {
|
|
|
3056
3057
|
return [
|
|
3057
3058
|
g("div", {
|
|
3058
3059
|
class: "smart-menu-button-wrap",
|
|
3059
|
-
onClick:
|
|
3060
|
-
onMouseover:
|
|
3061
|
-
onMouseleave:
|
|
3060
|
+
onClick: x[2] || (x[2] = (S) => u.value = !1),
|
|
3061
|
+
onMouseover: x[3] || (x[3] = (S) => u.value = !0),
|
|
3062
|
+
onMouseleave: x[4] || (x[4] = (S) => u.value = !1)
|
|
3062
3063
|
}, [
|
|
3063
3064
|
r.menuType === "button" ? (m(), _(T, ve({
|
|
3064
3065
|
key: 0,
|
|
@@ -3072,7 +3073,7 @@ const ns = {
|
|
|
3072
3073
|
}, i(t), { onClick: a }), {
|
|
3073
3074
|
default: A(() => [
|
|
3074
3075
|
g("div", gs, [
|
|
3075
|
-
|
|
3076
|
+
de(C.$slots, "default", {}, void 0, !0),
|
|
3076
3077
|
r.ico ? (m(), $("i", {
|
|
3077
3078
|
key: 0,
|
|
3078
3079
|
class: K(`${r.ico}`)
|
|
@@ -3082,7 +3083,7 @@ const ns = {
|
|
|
3082
3083
|
])
|
|
3083
3084
|
]),
|
|
3084
3085
|
_: 3
|
|
3085
|
-
}, 16, ["class", "disabled"])) : r.menuType === "dropdown" ? (m(), _(
|
|
3086
|
+
}, 16, ["class", "disabled"])) : r.menuType === "dropdown" ? (m(), _(w, ve({ key: 1 }, i(t), {
|
|
3086
3087
|
trigger: "click",
|
|
3087
3088
|
options: r.selectOptions,
|
|
3088
3089
|
to: i(l),
|
|
@@ -3103,7 +3104,7 @@ const ns = {
|
|
|
3103
3104
|
}, i(t)), {
|
|
3104
3105
|
default: A(() => [
|
|
3105
3106
|
g("div", ks, [
|
|
3106
|
-
|
|
3107
|
+
de(C.$slots, "default", {}, void 0, !0),
|
|
3107
3108
|
r.ico ? (m(), $("i", {
|
|
3108
3109
|
key: 0,
|
|
3109
3110
|
class: K(`${r.ico}`)
|
|
@@ -3111,7 +3112,7 @@ const ns = {
|
|
|
3111
3112
|
g("p", Cs, N(r.text), 1),
|
|
3112
3113
|
r.shortcutText ? (m(), $("kbd", ws, N(i(we)(r.shortcutText)), 1)) : F("", !0)
|
|
3113
3114
|
]),
|
|
3114
|
-
|
|
3115
|
+
x[5] || (x[5] = g("span", { class: "smart-button-icon-arrow" }, [
|
|
3115
3116
|
g("i", { class: "i-sed:arrow-down" })
|
|
3116
3117
|
], -1))
|
|
3117
3118
|
]),
|
|
@@ -3120,7 +3121,7 @@ const ns = {
|
|
|
3120
3121
|
];
|
|
3121
3122
|
}),
|
|
3122
3123
|
_: 3
|
|
3123
|
-
}, 16, ["options", "to", "onSelect"])) : r.menuType === "select" ? (m(), _(
|
|
3124
|
+
}, 16, ["options", "to", "onSelect"])) : r.menuType === "select" ? (m(), _(y, ve({
|
|
3124
3125
|
key: 2,
|
|
3125
3126
|
size: "tiny",
|
|
3126
3127
|
placement: "bottom-left",
|
|
@@ -3133,7 +3134,7 @@ const ns = {
|
|
|
3133
3134
|
"onUpdate:value": a
|
|
3134
3135
|
}), {
|
|
3135
3136
|
default: A(() => [
|
|
3136
|
-
|
|
3137
|
+
de(C.$slots, "default", {}, void 0, !0)
|
|
3137
3138
|
]),
|
|
3138
3139
|
_: 3
|
|
3139
3140
|
}, 16, ["value", "options", "disabled", "to"])) : r.menuType === "popup" ? (m(), $(J, { key: 3 }, [
|
|
@@ -3152,7 +3153,7 @@ const ns = {
|
|
|
3152
3153
|
class: "smart-button-content",
|
|
3153
3154
|
onClick: a
|
|
3154
3155
|
}, [
|
|
3155
|
-
|
|
3156
|
+
de(C.$slots, "default", {}, void 0, !0),
|
|
3156
3157
|
r.ico ? (m(), $("i", {
|
|
3157
3158
|
key: 0,
|
|
3158
3159
|
class: K(`${r.ico}`)
|
|
@@ -3172,8 +3173,8 @@ const ns = {
|
|
|
3172
3173
|
ref_key: "popupHandleRef",
|
|
3173
3174
|
ref: b,
|
|
3174
3175
|
class: "smart-button-icon-arrow smart-button-handle",
|
|
3175
|
-
onClick:
|
|
3176
|
-
},
|
|
3176
|
+
onClick: x[0] || (x[0] = (S) => k(!r.popupVisible))
|
|
3177
|
+
}, x[6] || (x[6] = [
|
|
3177
3178
|
g("i", { class: "i-sed:arrow-down" }, null, -1)
|
|
3178
3179
|
]), 512)
|
|
3179
3180
|
]),
|
|
@@ -3183,7 +3184,7 @@ const ns = {
|
|
|
3183
3184
|
ref: h,
|
|
3184
3185
|
class: "smart-popup-content p-x-8 p-y-4"
|
|
3185
3186
|
}, [
|
|
3186
|
-
|
|
3187
|
+
de(C.$slots, "content", {}, void 0, !0)
|
|
3187
3188
|
], 512)
|
|
3188
3189
|
]),
|
|
3189
3190
|
_: 3
|
|
@@ -3199,7 +3200,7 @@ const ns = {
|
|
|
3199
3200
|
trigger: "click"
|
|
3200
3201
|
}, {
|
|
3201
3202
|
trigger: A(() => {
|
|
3202
|
-
var S,
|
|
3203
|
+
var S, D;
|
|
3203
3204
|
return [
|
|
3204
3205
|
v(T, ve({
|
|
3205
3206
|
ref_key: "popupHandleRef",
|
|
@@ -3210,13 +3211,13 @@ const ns = {
|
|
|
3210
3211
|
}],
|
|
3211
3212
|
quaternary: "",
|
|
3212
3213
|
size: "small",
|
|
3213
|
-
disabled: r.disabled || ((
|
|
3214
|
+
disabled: r.disabled || ((D = i(s)) == null ? void 0 : D.isEditable) === !1
|
|
3214
3215
|
}, i(t), {
|
|
3215
|
-
onClick:
|
|
3216
|
+
onClick: x[1] || (x[1] = (j) => k(!r.popupVisible))
|
|
3216
3217
|
}), {
|
|
3217
3218
|
default: A(() => [
|
|
3218
3219
|
g("div", Ts, [
|
|
3219
|
-
|
|
3220
|
+
de(C.$slots, "default", {}, void 0, !0),
|
|
3220
3221
|
r.ico ? (m(), $("i", {
|
|
3221
3222
|
key: 0,
|
|
3222
3223
|
class: K(`${r.ico}`)
|
|
@@ -3224,7 +3225,7 @@ const ns = {
|
|
|
3224
3225
|
g("p", Ss, N(r.text), 1),
|
|
3225
3226
|
r.shortcutText ? (m(), $("kbd", $s, N(i(we)(r.shortcutText)), 1)) : F("", !0)
|
|
3226
3227
|
]),
|
|
3227
|
-
|
|
3228
|
+
x[7] || (x[7] = g("span", { class: "smart-button-icon-arrow" }, [
|
|
3228
3229
|
g("i", { class: "i-sed:arrow-down" })
|
|
3229
3230
|
], -1))
|
|
3230
3231
|
]),
|
|
@@ -3238,7 +3239,7 @@ const ns = {
|
|
|
3238
3239
|
ref: h,
|
|
3239
3240
|
class: "smart-popup-content p-x-8 p-y-4"
|
|
3240
3241
|
}, [
|
|
3241
|
-
|
|
3242
|
+
de(C.$slots, "content", {}, void 0, !0)
|
|
3242
3243
|
], 512)
|
|
3243
3244
|
]),
|
|
3244
3245
|
_: 3
|
|
@@ -3273,8 +3274,8 @@ const Ls = ["id"], Ns = { class: "smart-color-picker-default-button" }, Rs = { c
|
|
|
3273
3274
|
setup(r, { emit: e }) {
|
|
3274
3275
|
const n = r, o = e, { popupVisible: t } = ye(), { options: l } = M(), s = Pe("recent"), a = ["#B12318", "#EB3323", "#F6C143", "#FFFE55", "#A0CD63", "#4FAD5B", "#4CAFEA", "#2D70BA", "#06215C", "#68389B"], u = B(n.defaultColor), d = `#color-picker-${Te(4)}`;
|
|
3275
3276
|
function p(h) {
|
|
3276
|
-
t.value = !0, s.value.colors.forEach((
|
|
3277
|
-
|
|
3277
|
+
t.value = !0, s.value.colors.forEach((k, C) => {
|
|
3278
|
+
k === h && s.value.colors.splice(C, 1);
|
|
3278
3279
|
}), s.value.colors.unshift(h), s.value.colors.length > 10 && s.value.colors.splice(10, 1), o("change", h), o("update:visible");
|
|
3279
3280
|
}
|
|
3280
3281
|
function f(h) {
|
|
@@ -3283,18 +3284,18 @@ const Ls = ["id"], Ns = { class: "smart-color-picker-default-button" }, Rs = { c
|
|
|
3283
3284
|
function b() {
|
|
3284
3285
|
return _e("div", { class: "smart-color-picker-render" }, "更多颜色");
|
|
3285
3286
|
}
|
|
3286
|
-
return (h,
|
|
3287
|
+
return (h, k) => {
|
|
3287
3288
|
var T;
|
|
3288
|
-
const
|
|
3289
|
+
const C = Se, x = Nn;
|
|
3289
3290
|
return m(), $("div", {
|
|
3290
3291
|
id: d.substr(1),
|
|
3291
3292
|
class: "smart-color-picker-container"
|
|
3292
3293
|
}, [
|
|
3293
3294
|
g("div", Ns, [
|
|
3294
|
-
v(
|
|
3295
|
+
v(C, {
|
|
3295
3296
|
size: "small",
|
|
3296
3297
|
block: "",
|
|
3297
|
-
onClick:
|
|
3298
|
+
onClick: k[0] || (k[0] = (w) => f(i(u)))
|
|
3298
3299
|
}, {
|
|
3299
3300
|
default: A(() => [
|
|
3300
3301
|
te(N(("t" in h ? h.t : i(c))("colorPicker.default")), 1)
|
|
@@ -3303,11 +3304,11 @@ const Ls = ["id"], Ns = { class: "smart-color-picker-default-button" }, Rs = { c
|
|
|
3303
3304
|
})
|
|
3304
3305
|
]),
|
|
3305
3306
|
g("div", Rs, [
|
|
3306
|
-
(m(!0), $(J, null, ge((T = i(l).dicts) == null ? void 0 : T.colors, (
|
|
3307
|
-
key:
|
|
3307
|
+
(m(!0), $(J, null, ge((T = i(l).dicts) == null ? void 0 : T.colors, (w, y) => (m(), $("div", {
|
|
3308
|
+
key: y,
|
|
3308
3309
|
class: "smart-color-picker-item",
|
|
3309
|
-
style: le({ backgroundColor:
|
|
3310
|
-
onClick: (L) => f(
|
|
3310
|
+
style: le({ backgroundColor: w }),
|
|
3311
|
+
onClick: (L) => f(w)
|
|
3311
3312
|
}, null, 12, Es))), 128))
|
|
3312
3313
|
]),
|
|
3313
3314
|
g("div", {
|
|
@@ -3315,11 +3316,11 @@ const Ls = ["id"], Ns = { class: "smart-color-picker-default-button" }, Rs = { c
|
|
|
3315
3316
|
textContent: N(("t" in h ? h.t : i(c))("colorPicker.standard"))
|
|
3316
3317
|
}, null, 8, Is),
|
|
3317
3318
|
g("div", Fs, [
|
|
3318
|
-
(m(), $(J, null, ge(a, (
|
|
3319
|
-
key:
|
|
3319
|
+
(m(), $(J, null, ge(a, (w, y) => g("div", {
|
|
3320
|
+
key: y,
|
|
3320
3321
|
class: "smart-color-picker-item",
|
|
3321
|
-
style: le({ backgroundColor:
|
|
3322
|
-
onClick: (L) => f(
|
|
3322
|
+
style: le({ backgroundColor: w }),
|
|
3323
|
+
onClick: (L) => f(w)
|
|
3323
3324
|
}, null, 12, Hs)), 64))
|
|
3324
3325
|
]),
|
|
3325
3326
|
i(s).colors.length > 0 ? (m(), $(J, { key: 0 }, [
|
|
@@ -3328,16 +3329,16 @@ const Ls = ["id"], Ns = { class: "smart-color-picker-default-button" }, Rs = { c
|
|
|
3328
3329
|
textContent: N(("t" in h ? h.t : i(c))("colorPicker.recent"))
|
|
3329
3330
|
}, null, 8, zs),
|
|
3330
3331
|
g("div", Os, [
|
|
3331
|
-
(m(!0), $(J, null, ge(i(s).colors, (
|
|
3332
|
-
key:
|
|
3332
|
+
(m(!0), $(J, null, ge(i(s).colors, (w, y) => (m(), $("div", {
|
|
3333
|
+
key: y,
|
|
3333
3334
|
class: "smart-color-picker-item",
|
|
3334
|
-
style: le({ backgroundColor:
|
|
3335
|
-
onClick: (L) => f(
|
|
3335
|
+
style: le({ backgroundColor: w }),
|
|
3336
|
+
onClick: (L) => f(w)
|
|
3336
3337
|
}, null, 12, Ps))), 128))
|
|
3337
3338
|
])
|
|
3338
3339
|
], 64)) : F("", !0),
|
|
3339
|
-
|
|
3340
|
-
v(
|
|
3340
|
+
k[1] || (k[1] = g("div", { class: "smart-color-picker-divider" }, null, -1)),
|
|
3341
|
+
v(x, {
|
|
3341
3342
|
to: d,
|
|
3342
3343
|
placement: "right",
|
|
3343
3344
|
"render-label": b,
|
|
@@ -3346,7 +3347,7 @@ const Ls = ["id"], Ns = { class: "smart-color-picker-default-button" }, Rs = { c
|
|
|
3346
3347
|
], 8, Ls);
|
|
3347
3348
|
};
|
|
3348
3349
|
}
|
|
3349
|
-
}, ut = /* @__PURE__ */ H(Ws, [["__scopeId", "data-v-06db8e81"]]),
|
|
3350
|
+
}, ut = /* @__PURE__ */ H(Ws, [["__scopeId", "data-v-06db8e81"]]), Vs = {
|
|
3350
3351
|
__name: "background-color",
|
|
3351
3352
|
props: {
|
|
3352
3353
|
text: {
|
|
@@ -3403,7 +3404,7 @@ const Ls = ["id"], Ns = { class: "smart-color-picker-default-button" }, Rs = { c
|
|
|
3403
3404
|
}, 8, ["text", "popup-visible", "onTogglePopup"]);
|
|
3404
3405
|
};
|
|
3405
3406
|
}
|
|
3406
|
-
}, vo = /* @__PURE__ */ H(
|
|
3407
|
+
}, vo = /* @__PURE__ */ H(Vs, [["__scopeId", "data-v-5e0cc688"]]), Ds = {
|
|
3407
3408
|
__name: "color",
|
|
3408
3409
|
props: {
|
|
3409
3410
|
text: {
|
|
@@ -3460,7 +3461,7 @@ const Ls = ["id"], Ns = { class: "smart-color-picker-default-button" }, Rs = { c
|
|
|
3460
3461
|
}, 8, ["text", "popup-visible", "onTogglePopup"]);
|
|
3461
3462
|
};
|
|
3462
3463
|
}
|
|
3463
|
-
}, go = /* @__PURE__ */ H(
|
|
3464
|
+
}, go = /* @__PURE__ */ H(Ds, [["__scopeId", "data-v-de44b29f"]]), _o = {
|
|
3464
3465
|
__name: "strike",
|
|
3465
3466
|
setup(r) {
|
|
3466
3467
|
const { editor: e } = M();
|
|
@@ -3660,7 +3661,7 @@ const Ls = ["id"], Ns = { class: "smart-color-picker-default-button" }, Rs = { c
|
|
|
3660
3661
|
}, null, 8, ["text", "menu-active"]);
|
|
3661
3662
|
};
|
|
3662
3663
|
}
|
|
3663
|
-
},
|
|
3664
|
+
}, Ys = {
|
|
3664
3665
|
__name: "line-numbers",
|
|
3665
3666
|
setup(r) {
|
|
3666
3667
|
const { editor: e } = M();
|
|
@@ -3682,7 +3683,7 @@ const Ls = ["id"], Ns = { class: "smart-color-picker-default-button" }, Rs = { c
|
|
|
3682
3683
|
}, null, 8, ["text", "menu-active"]);
|
|
3683
3684
|
};
|
|
3684
3685
|
}
|
|
3685
|
-
},
|
|
3686
|
+
}, Zs = {
|
|
3686
3687
|
__name: "themes",
|
|
3687
3688
|
setup(r) {
|
|
3688
3689
|
const { editor: e } = M(), n = [
|
|
@@ -3707,7 +3708,7 @@ const Ls = ["id"], Ns = { class: "smart-color-picker-default-button" }, Rs = { c
|
|
|
3707
3708
|
}, null, 8, ["text", "select-value"]);
|
|
3708
3709
|
};
|
|
3709
3710
|
}
|
|
3710
|
-
},
|
|
3711
|
+
}, Xs = {
|
|
3711
3712
|
__name: "languages",
|
|
3712
3713
|
setup(r) {
|
|
3713
3714
|
const { editor: e } = M(), n = Object.keys(Br).map((t) => ({ label: t, value: t }));
|
|
@@ -3733,7 +3734,7 @@ const Ls = ["id"], Ns = { class: "smart-color-picker-default-button" }, Rs = { c
|
|
|
3733
3734
|
}, Qs = {
|
|
3734
3735
|
__name: "cell-border",
|
|
3735
3736
|
setup(r) {
|
|
3736
|
-
const { editor: e } = M(), n =
|
|
3737
|
+
const { editor: e } = M(), n = W(() => [
|
|
3737
3738
|
{
|
|
3738
3739
|
label: c("table.border.cellLeft"),
|
|
3739
3740
|
key: "cellLeft",
|
|
@@ -4361,7 +4362,7 @@ const Ls = ["id"], Ns = { class: "smart-color-picker-default-button" }, Rs = { c
|
|
|
4361
4362
|
}, ni = /* @__PURE__ */ H(ti, [["__scopeId", "data-v-ce6b29b9"]]), oi = {
|
|
4362
4363
|
__name: "merge-split",
|
|
4363
4364
|
setup(r) {
|
|
4364
|
-
const { editor: e } = M(), n =
|
|
4365
|
+
const { editor: e } = M(), n = W(() => e.value ? e.value.can().mergeCells() ? "i-sed:table-merge" : "i-sed:table-split" : "i-sed:table-merge");
|
|
4365
4366
|
function o() {
|
|
4366
4367
|
var t;
|
|
4367
4368
|
(t = e.value) == null || t.chain().focus().mergeOrSplit().run();
|
|
@@ -4557,7 +4558,7 @@ const Ls = ["id"], Ns = { class: "smart-color-picker-default-button" }, Rs = { c
|
|
|
4557
4558
|
}, mi = { class: "smart-text-align-group" }, fi = {
|
|
4558
4559
|
__name: "vertical-dropdown",
|
|
4559
4560
|
setup(r) {
|
|
4560
|
-
const { popupVisible: e, togglePopup: n } = ye(), { editor: o } = M(), t =
|
|
4561
|
+
const { popupVisible: e, togglePopup: n } = ye(), { editor: o } = M(), t = W(() => {
|
|
4561
4562
|
var s;
|
|
4562
4563
|
if (!o.value)
|
|
4563
4564
|
return "top";
|
|
@@ -4634,7 +4635,7 @@ const Ls = ["id"], Ns = { class: "smart-color-picker-default-button" }, Rs = { c
|
|
|
4634
4635
|
}, vi = {
|
|
4635
4636
|
__name: "border",
|
|
4636
4637
|
setup(r) {
|
|
4637
|
-
const { editor: e } = M(), n =
|
|
4638
|
+
const { editor: e } = M(), n = W(() => {
|
|
4638
4639
|
var l;
|
|
4639
4640
|
if (!e.value)
|
|
4640
4641
|
return "i-sed:table-border";
|
|
@@ -4746,7 +4747,7 @@ const Ls = ["id"], Ns = { class: "smart-color-picker-default-button" }, Rs = { c
|
|
|
4746
4747
|
}, Ci = { class: "smart-text-align-group" }, wi = {
|
|
4747
4748
|
__name: "float-dropdown",
|
|
4748
4749
|
setup(r) {
|
|
4749
|
-
const { popupVisible: e, togglePopup: n } = ye(), { editor: o } = M(), t =
|
|
4750
|
+
const { popupVisible: e, togglePopup: n } = ye(), { editor: o } = M(), t = W(() => {
|
|
4750
4751
|
var a;
|
|
4751
4752
|
if (!o.value)
|
|
4752
4753
|
return "no";
|
|
@@ -4833,9 +4834,9 @@ const Ls = ["id"], Ns = { class: "smart-color-picker-default-button" }, Rs = { c
|
|
|
4833
4834
|
setup(r) {
|
|
4834
4835
|
const { options: e, editor: n } = M();
|
|
4835
4836
|
return (o, t) => {
|
|
4836
|
-
var Ne, P,
|
|
4837
|
-
const l = Ai, s = xi, a = wi, u = gi, d = vi, p = bi, f = hi, b = fi, h = ui,
|
|
4838
|
-
return (Ne = i(n)) != null && Ne.isActive("map") || (P = i(n)) != null && P.getAttributes("bubble").bubble || (
|
|
4837
|
+
var Ne, P, X, ce, ct, dt, pt, mt, Xe, Qe, Qt;
|
|
4838
|
+
const l = Ai, s = xi, a = wi, u = gi, d = vi, p = bi, f = hi, b = fi, h = ui, k = ai, C = ii, x = si, T = li, w = ri, y = oi, L = ni, R = ei, I = Qs, U = Xs, O = Zs, S = Ys, D = Ks, j = Gs, q = js, Q = qs, G = Us, ue = Co, ee = ko, he = yo, Ce = _o, Le = go, We = vo;
|
|
4839
|
+
return (Ne = i(n)) != null && Ne.isActive("map") || (P = i(n)) != null && P.getAttributes("bubble").bubble || (X = i(n)) != null && X.isActive("pagination") || (ce = i(n)) != null && ce.isActive("horizontalRule") || (ct = i(n)) != null && ct.getAttributes("image").error ? (m(), $(J, { key: 0 }, [], 64)) : (dt = i(n)) != null && dt.isActive("image") && !((pt = i(n)) != null && pt.getAttributes("image").error) ? (m(), $(J, { key: 1 }, [
|
|
4839
4840
|
v(l),
|
|
4840
4841
|
v(s),
|
|
4841
4842
|
v(a)
|
|
@@ -4848,22 +4849,22 @@ const Ls = ["id"], Ns = { class: "smart-color-picker-default-button" }, Rs = { c
|
|
|
4848
4849
|
v(b),
|
|
4849
4850
|
t[1] || (t[1] = g("div", { class: "smart-bubble-menu-divider" }, null, -1)),
|
|
4850
4851
|
v(h),
|
|
4852
|
+
v(k),
|
|
4851
4853
|
v(C),
|
|
4852
|
-
v(y),
|
|
4853
|
-
v(w),
|
|
4854
|
-
v(T),
|
|
4855
4854
|
v(x),
|
|
4856
|
-
v(
|
|
4855
|
+
v(T),
|
|
4856
|
+
v(w),
|
|
4857
|
+
v(y),
|
|
4857
4858
|
t[2] || (t[2] = g("div", { class: "smart-bubble-menu-divider" }, null, -1)),
|
|
4858
4859
|
v(L),
|
|
4859
4860
|
v(R),
|
|
4860
4861
|
v(I)
|
|
4861
|
-
], 64)) : (
|
|
4862
|
+
], 64)) : (Xe = i(n)) != null && Xe.isActive("codeBlock") ? (m(), $(J, { key: 3 }, [
|
|
4862
4863
|
v(U),
|
|
4863
4864
|
v(O),
|
|
4864
4865
|
t[3] || (t[3] = g("div", { class: "smart-bubble-menu-divider" }, null, -1)),
|
|
4865
4866
|
v(S),
|
|
4866
|
-
v(
|
|
4867
|
+
v(D),
|
|
4867
4868
|
t[4] || (t[4] = g("div", { class: "smart-bubble-menu-divider" }, null, -1)),
|
|
4868
4869
|
v(j),
|
|
4869
4870
|
v(q)
|
|
@@ -4902,7 +4903,7 @@ const Ls = ["id"], Ns = { class: "smart-color-picker-default-button" }, Rs = { c
|
|
|
4902
4903
|
s.value = null;
|
|
4903
4904
|
}
|
|
4904
4905
|
});
|
|
4905
|
-
return
|
|
4906
|
+
return pe(
|
|
4906
4907
|
() => [l.value],
|
|
4907
4908
|
(u) => {
|
|
4908
4909
|
var d;
|
|
@@ -4918,10 +4919,10 @@ const Ls = ["id"], Ns = { class: "smart-color-picker-default-button" }, Rs = { c
|
|
|
4918
4919
|
"tippy-options": i(a)
|
|
4919
4920
|
}, {
|
|
4920
4921
|
default: A(() => {
|
|
4921
|
-
var b, h,
|
|
4922
|
+
var b, h, k, C;
|
|
4922
4923
|
return [
|
|
4923
4924
|
(h = (b = i(e)) == null ? void 0 : b.document) != null && h.enableBubbleMenu && !i(l) ? (m(), _(p, { key: 0 })) : F("", !0),
|
|
4924
|
-
(
|
|
4925
|
+
(C = (k = i(e)) == null ? void 0 : k.assistant) != null && C.enabled && i(l) ? (m(), _(f, { key: 1 })) : F("", !0)
|
|
4925
4926
|
];
|
|
4926
4927
|
}),
|
|
4927
4928
|
_: 1
|
|
@@ -4931,23 +4932,23 @@ const Ls = ["id"], Ns = { class: "smart-color-picker-default-button" }, Rs = { c
|
|
|
4931
4932
|
};
|
|
4932
4933
|
}
|
|
4933
4934
|
}, _t = (r, e) => e.view.domAtPos(r).node.offsetParent !== null, dn = (r, e) => {
|
|
4934
|
-
const { state: n, view: o, extensionManager: t } = r, { schema: l, selection: s } = n, { empty: a, $anchor: u } = s, d = !!t.extensions.find((
|
|
4935
|
+
const { state: n, view: o, extensionManager: t } = r, { schema: l, selection: s } = n, { empty: a, $anchor: u } = s, d = !!t.extensions.find((x) => x.name === "gapCursor");
|
|
4935
4936
|
if (!a || u.parent.type !== l.nodes.detailsSummary || !d || e === "right" && u.parentOffset !== u.parent.nodeSize - 2) return !1;
|
|
4936
|
-
const p = it((
|
|
4937
|
+
const p = it((x) => x.type === l.nodes.details)(s);
|
|
4937
4938
|
if (!p) return !1;
|
|
4938
|
-
const f = gt(p.node, (
|
|
4939
|
+
const f = gt(p.node, (x) => x.type === l.nodes.detailsContent);
|
|
4939
4940
|
if (!f.length || _t(p.start + f[0].pos + 1, r)) return !1;
|
|
4940
4941
|
const b = n.doc.resolve(p.pos + p.node.nodeSize), h = on.findFrom(b, 1, !1);
|
|
4941
4942
|
if (!h) return !1;
|
|
4942
|
-
const { tr:
|
|
4943
|
-
return
|
|
4944
|
-
}, Mi =
|
|
4943
|
+
const { tr: k } = n, C = new on(h);
|
|
4944
|
+
return k.setSelection(C), k.scrollIntoView(), o.dispatch(k), !0;
|
|
4945
|
+
}, Mi = Z.create({ name: "details", content: "detailsSummary detailsContent", group: "block", defining: !0, isolating: !0, allowGapCursor: !1, addOptions: () => ({ persist: !1, openClassName: "is-open", HTMLAttributes: {} }), addAttributes() {
|
|
4945
4946
|
return this.options.persist ? { open: { default: !1, parseHTML: (r) => r.hasAttribute("open"), renderHTML: ({ open: r }) => r ? { open: "" } : {} } } : [];
|
|
4946
4947
|
}, parseHTML: () => [{ tag: "details" }], renderHTML({ HTMLAttributes: r }) {
|
|
4947
|
-
return ["details",
|
|
4948
|
+
return ["details", Y(this.options.HTMLAttributes, r), 0];
|
|
4948
4949
|
}, addNodeView() {
|
|
4949
4950
|
return ({ editor: r, getPos: e, node: n, HTMLAttributes: o }) => {
|
|
4950
|
-
const t = document.createElement("div"), l =
|
|
4951
|
+
const t = document.createElement("div"), l = Y(this.options.HTMLAttributes, o, { "data-type": this.name });
|
|
4951
4952
|
Object.entries(l).forEach(([d, p]) => t.setAttribute(d, p));
|
|
4952
4953
|
const s = document.createElement("button");
|
|
4953
4954
|
s.type = "button", t.append(s);
|
|
@@ -4987,12 +4988,12 @@ const Ls = ["id"], Ns = { class: "smart-color-picker-default-button" }, Rs = { c
|
|
|
4987
4988
|
const d = ((n = u.toJSON()) === null || n === void 0 ? void 0 : n.content) || [];
|
|
4988
4989
|
return e().insertContentAt({ from: a.start, to: a.end }, { type: this.name, content: [{ type: "detailsSummary" }, { type: "detailsContent", content: d }] }).setTextSelection(a.start + 2).run();
|
|
4989
4990
|
}, unsetDetails: () => ({ state: r, chain: e }) => {
|
|
4990
|
-
const { selection: n, schema: o } = r, t = it((
|
|
4991
|
+
const { selection: n, schema: o } = r, t = it((C) => C.type === this.type)(n);
|
|
4991
4992
|
if (!t) return !1;
|
|
4992
|
-
const l = gt(t.node, (
|
|
4993
|
+
const l = gt(t.node, (C) => C.type === o.nodes.detailsSummary), s = gt(t.node, (C) => C.type === o.nodes.detailsContent);
|
|
4993
4994
|
if (!l.length || !s.length) return !1;
|
|
4994
|
-
const a = l[0], u = s[0], d = t.pos, p = r.doc.resolve(d), f = { from: d, to: d + t.node.nodeSize }, b = u.node.content.toJSON() || [], h = p.parent.type.contentMatch.defaultType,
|
|
4995
|
-
return e().insertContentAt(f,
|
|
4995
|
+
const a = l[0], u = s[0], d = t.pos, p = r.doc.resolve(d), f = { from: d, to: d + t.node.nodeSize }, b = u.node.content.toJSON() || [], h = p.parent.type.contentMatch.defaultType, k = [h == null ? void 0 : h.create(null, a.node.content).toJSON(), ...b];
|
|
4996
|
+
return e().insertContentAt(f, k).setTextSelection(d + 1).run();
|
|
4996
4997
|
} };
|
|
4997
4998
|
}, addKeyboardShortcuts() {
|
|
4998
4999
|
return { Backspace: () => {
|
|
@@ -5010,8 +5011,8 @@ const Ls = ["id"], Ns = { class: "smart-color-picker-default-button" }, Rs = { c
|
|
|
5010
5011
|
if (!d || !a.canReplaceWith(u, u, d)) return !1;
|
|
5011
5012
|
const p = d.createAndFill();
|
|
5012
5013
|
if (!p) return !1;
|
|
5013
|
-
const f = s ? l.after() + 1 : l.after(-1), b = e.tr.replaceWith(f, f, p), h = b.doc.resolve(f),
|
|
5014
|
-
return b.setSelection(
|
|
5014
|
+
const f = s ? l.after() + 1 : l.after(-1), b = e.tr.replaceWith(f, f, p), h = b.doc.resolve(f), k = Jn.near(h, 1);
|
|
5015
|
+
return b.setSelection(k), b.scrollIntoView(), n.dispatch(b), !0;
|
|
5015
5016
|
}, ArrowRight: ({ editor: r }) => dn(r, "right"), ArrowDown: ({ editor: r }) => dn(r, "down") };
|
|
5016
5017
|
}, addProseMirrorPlugins() {
|
|
5017
5018
|
return [new He({ key: new Je("detailsSelection"), appendTransaction: (r, e, n) => {
|
|
@@ -5019,10 +5020,10 @@ const Ls = ["id"], Ns = { class: "smart-color-picker-default-button" }, Rs = { c
|
|
|
5019
5020
|
if (!r.some((b) => b.selectionSet) || !e.selection.empty || !n.selection.empty || !Cr(n, t.name)) return;
|
|
5020
5021
|
const { $from: s } = n.selection;
|
|
5021
5022
|
if (_t(s.pos, o)) return;
|
|
5022
|
-
const a = ((b, h,
|
|
5023
|
-
for (let
|
|
5024
|
-
const
|
|
5025
|
-
if (T &&
|
|
5023
|
+
const a = ((b, h, k) => {
|
|
5024
|
+
for (let C = b.depth; C > 0; C -= 1) {
|
|
5025
|
+
const x = b.node(C), T = h(x), w = _t(b.start(C), k);
|
|
5026
|
+
if (T && w) return { pos: C > 0 ? b.before(C) : 0, start: b.start(C), depth: C, node: x };
|
|
5026
5027
|
}
|
|
5027
5028
|
})(s, (b) => b.type === t, o);
|
|
5028
5029
|
if (!a) return;
|
|
@@ -5031,8 +5032,8 @@ const Ls = ["id"], Ns = { class: "smart-color-picker-default-button" }, Rs = { c
|
|
|
5031
5032
|
const d = u[0], p = (e.selection.from < n.selection.from ? "forward" : "backward") == "forward" ? a.start + d.pos : a.pos + d.pos + d.node.nodeSize, f = Gt.create(n.doc, p);
|
|
5032
5033
|
return n.tr.setSelection(f);
|
|
5033
5034
|
} })];
|
|
5034
|
-
} }), Bi =
|
|
5035
|
-
return ["summary",
|
|
5035
|
+
} }), Bi = Z.create({ name: "detailsSummary", content: "text*", defining: !0, selectable: !1, isolating: !0, addOptions: () => ({ HTMLAttributes: {} }), parseHTML: () => [{ tag: "summary" }], renderHTML({ HTMLAttributes: r }) {
|
|
5036
|
+
return ["summary", Y(this.options.HTMLAttributes, r), 0];
|
|
5036
5037
|
} }), Li = (r) => {
|
|
5037
5038
|
const { regex: e, katexOptions: n = {}, editor: o, shouldRender: t } = r;
|
|
5038
5039
|
return new He({ key: new Je("mathematics"), state: { init: () => Oe.empty, apply(l, s, a, u) {
|
|
@@ -5040,12 +5041,12 @@ const Ls = ["id"], Ns = { class: "smart-color-picker-default-button" }, Rs = { c
|
|
|
5040
5041
|
return u.doc.descendants((f, b) => {
|
|
5041
5042
|
const h = t(u, b, f);
|
|
5042
5043
|
if (f.isText && f.text && h) {
|
|
5043
|
-
let
|
|
5044
|
-
for (;
|
|
5045
|
-
const
|
|
5044
|
+
let k;
|
|
5045
|
+
for (; k = e.exec(f.text); ) {
|
|
5046
|
+
const C = b + k.index, x = C + k[0].length, T = k.slice(1).find(Boolean);
|
|
5046
5047
|
if (T) {
|
|
5047
|
-
const
|
|
5048
|
-
R && o.isEditable || p.push(wt.widget(
|
|
5048
|
+
const w = d.$from.pos - d.$to.pos, y = d.$anchor.pos >= C && d.$anchor.pos <= x, L = d.$from.pos >= C && d.$to.pos <= x, R = w === 0 && y || L;
|
|
5049
|
+
R && o.isEditable || p.push(wt.widget(C, () => {
|
|
5049
5050
|
const I = document.createElement("span");
|
|
5050
5051
|
I.classList.add("Tiptap-mathematics-render"), o.isEditable && I.classList.add("Tiptap-mathematics-render--editable");
|
|
5051
5052
|
try {
|
|
@@ -5054,7 +5055,7 @@ const Ls = ["id"], Ns = { class: "smart-color-picker-default-button" }, Rs = { c
|
|
|
5054
5055
|
I.innerHTML = T;
|
|
5055
5056
|
}
|
|
5056
5057
|
return I;
|
|
5057
|
-
})), p.push(wt.inline(
|
|
5058
|
+
})), p.push(wt.inline(C, x, { class: R && o.isEditable ? "Tiptap-mathematics-editor" : "Tiptap-mathematics-editor Tiptap-mathematics-editor--hidden", style: R && o.isEditable ? void 0 : "display: inline-block; height: 0; opacity: 0; overflow: hidden; position: absolute; width: 0;" }));
|
|
5058
5059
|
}
|
|
5059
5060
|
}
|
|
5060
5061
|
}
|
|
@@ -5199,7 +5200,7 @@ const Hi = ({ getId: r, anchorTypes: e = ["heading"] }) => new He({ key: new Je(
|
|
|
5199
5200
|
_: 1
|
|
5200
5201
|
}));
|
|
5201
5202
|
}
|
|
5202
|
-
}, Wi = /* @__PURE__ */ H(Pi, [["__scopeId", "data-v-589f28b1"]]),
|
|
5203
|
+
}, Wi = /* @__PURE__ */ H(Pi, [["__scopeId", "data-v-589f28b1"]]), Vi = Z.create({
|
|
5203
5204
|
name: "attachment",
|
|
5204
5205
|
group: "inline",
|
|
5205
5206
|
inline: !0,
|
|
@@ -5225,7 +5226,7 @@ const Hi = ({ getId: r, anchorTypes: e = ["heading"] }) => new He({ key: new Je(
|
|
|
5225
5226
|
];
|
|
5226
5227
|
},
|
|
5227
5228
|
renderHTML({ HTMLAttributes: r }) {
|
|
5228
|
-
return ["attachment",
|
|
5229
|
+
return ["attachment", Y(r)];
|
|
5229
5230
|
},
|
|
5230
5231
|
addCommands() {
|
|
5231
5232
|
return {
|
|
@@ -5238,7 +5239,7 @@ const Hi = ({ getId: r, anchorTypes: e = ["heading"] }) => new He({ key: new Je(
|
|
|
5238
5239
|
addNodeView() {
|
|
5239
5240
|
return ae(Wi);
|
|
5240
5241
|
}
|
|
5241
|
-
}),
|
|
5242
|
+
}), Di = {
|
|
5242
5243
|
__name: "audio-view",
|
|
5243
5244
|
props: se,
|
|
5244
5245
|
setup(r) {
|
|
@@ -5255,7 +5256,7 @@ const Hi = ({ getId: r, anchorTypes: e = ["heading"] }) => new He({ key: new Je(
|
|
|
5255
5256
|
_: 1
|
|
5256
5257
|
}));
|
|
5257
5258
|
}
|
|
5258
|
-
}, Ui = /* @__PURE__ */ H(
|
|
5259
|
+
}, Ui = /* @__PURE__ */ H(Di, [["__scopeId", "data-v-79d61048"]]), Ji = Z.create({
|
|
5259
5260
|
name: "audio",
|
|
5260
5261
|
group: "block",
|
|
5261
5262
|
atom: !0,
|
|
@@ -5286,7 +5287,7 @@ const Hi = ({ getId: r, anchorTypes: e = ["heading"] }) => new He({ key: new Je(
|
|
|
5286
5287
|
];
|
|
5287
5288
|
},
|
|
5288
5289
|
renderHTML({ HTMLAttributes: r }) {
|
|
5289
|
-
return ["audio",
|
|
5290
|
+
return ["audio", Y(r)];
|
|
5290
5291
|
},
|
|
5291
5292
|
addCommands() {
|
|
5292
5293
|
return {
|
|
@@ -5318,8 +5319,8 @@ const Hi = ({ getId: r, anchorTypes: e = ["heading"] }) => new He({ key: new Je(
|
|
|
5318
5319
|
});
|
|
5319
5320
|
function u() {
|
|
5320
5321
|
if (t.value = !t.value, t.value) {
|
|
5321
|
-
const { top: d, right: p, bottom: f, left: b, width: h, height:
|
|
5322
|
-
l.value = b.value >
|
|
5322
|
+
const { top: d, right: p, bottom: f, left: b, width: h, height: k } = pr(o), { width: C, height: x } = Jt();
|
|
5323
|
+
l.value = b.value > C.value / 2, s.value = d.value < x.value / 2, a.value = {}, l.value ? a.value.right = `${C.value - p.value - h.value}px` : a.value.left = `${b.value - h.value}px`, s.value ? a.value.top = `${d.value + h.value + 10}px` : a.value.bottom = `${x.value - f.value + k.value + 10}px`;
|
|
5323
5324
|
}
|
|
5324
5325
|
}
|
|
5325
5326
|
return (d, p) => (m(), _(i(ie), {
|
|
@@ -5363,7 +5364,7 @@ const Hi = ({ getId: r, anchorTypes: e = ["heading"] }) => new He({ key: new Je(
|
|
|
5363
5364
|
_: 1
|
|
5364
5365
|
}, 512));
|
|
5365
5366
|
}
|
|
5366
|
-
}, Gi = /* @__PURE__ */ H(ji, [["__scopeId", "data-v-64ceb567"]]), Ki =
|
|
5367
|
+
}, Gi = /* @__PURE__ */ H(ji, [["__scopeId", "data-v-64ceb567"]]), Ki = Z.create({
|
|
5367
5368
|
name: "bubble",
|
|
5368
5369
|
inline: !0,
|
|
5369
5370
|
group: "inline",
|
|
@@ -5409,7 +5410,7 @@ const Hi = ({ getId: r, anchorTypes: e = ["heading"] }) => new He({ key: new Je(
|
|
|
5409
5410
|
}
|
|
5410
5411
|
};
|
|
5411
5412
|
}
|
|
5412
|
-
}),
|
|
5413
|
+
}), Yi = zr.extend({
|
|
5413
5414
|
addAttributes() {
|
|
5414
5415
|
var r;
|
|
5415
5416
|
return {
|
|
@@ -5423,7 +5424,7 @@ const Hi = ({ getId: r, anchorTypes: e = ["heading"] }) => new He({ key: new Je(
|
|
|
5423
5424
|
}
|
|
5424
5425
|
};
|
|
5425
5426
|
}
|
|
5426
|
-
}),
|
|
5427
|
+
}), Zi = {
|
|
5427
5428
|
__name: "calculator-view",
|
|
5428
5429
|
props: se,
|
|
5429
5430
|
setup(r) {
|
|
@@ -5437,7 +5438,7 @@ const Hi = ({ getId: r, anchorTypes: e = ["heading"] }) => new He({ key: new Je(
|
|
|
5437
5438
|
_: 1
|
|
5438
5439
|
}));
|
|
5439
5440
|
}
|
|
5440
|
-
},
|
|
5441
|
+
}, Xi = /* @__PURE__ */ H(Zi, [["__scopeId", "data-v-df4b872f"]]), Qi = Z.create({
|
|
5441
5442
|
name: "calculator",
|
|
5442
5443
|
group: "block",
|
|
5443
5444
|
atom: !0,
|
|
@@ -5459,7 +5460,7 @@ const Hi = ({ getId: r, anchorTypes: e = ["heading"] }) => new He({ key: new Je(
|
|
|
5459
5460
|
];
|
|
5460
5461
|
},
|
|
5461
5462
|
renderHTML({ HTMLAttributes: r }) {
|
|
5462
|
-
return ["calculator",
|
|
5463
|
+
return ["calculator", Y(r)];
|
|
5463
5464
|
},
|
|
5464
5465
|
addCommands() {
|
|
5465
5466
|
return {
|
|
@@ -5470,7 +5471,7 @@ const Hi = ({ getId: r, anchorTypes: e = ["heading"] }) => new He({ key: new Je(
|
|
|
5470
5471
|
};
|
|
5471
5472
|
},
|
|
5472
5473
|
addNodeView() {
|
|
5473
|
-
return ae(
|
|
5474
|
+
return ae(Xi);
|
|
5474
5475
|
}
|
|
5475
5476
|
}), ea = {
|
|
5476
5477
|
__name: "catalog-view",
|
|
@@ -5486,7 +5487,7 @@ const Hi = ({ getId: r, anchorTypes: e = ["heading"] }) => new He({ key: new Je(
|
|
|
5486
5487
|
_: 1
|
|
5487
5488
|
}));
|
|
5488
5489
|
}
|
|
5489
|
-
}, ta = /* @__PURE__ */ H(ea, [["__scopeId", "data-v-1d4c29ac"]]), na =
|
|
5490
|
+
}, ta = /* @__PURE__ */ H(ea, [["__scopeId", "data-v-1d4c29ac"]]), na = Z.create({
|
|
5490
5491
|
name: "catalog",
|
|
5491
5492
|
group: "inline",
|
|
5492
5493
|
inline: !0,
|
|
@@ -5509,7 +5510,7 @@ const Hi = ({ getId: r, anchorTypes: e = ["heading"] }) => new He({ key: new Je(
|
|
|
5509
5510
|
];
|
|
5510
5511
|
},
|
|
5511
5512
|
renderHTML({ HTMLAttributes: r }) {
|
|
5512
|
-
return ["catalog",
|
|
5513
|
+
return ["catalog", Y(r)];
|
|
5513
5514
|
},
|
|
5514
5515
|
addCommands() {
|
|
5515
5516
|
return {
|
|
@@ -5583,16 +5584,16 @@ const Hi = ({ getId: r, anchorTypes: e = ["heading"] }) => new He({ key: new Je(
|
|
|
5583
5584
|
}), o.value.addExtensions(
|
|
5584
5585
|
Jr(),
|
|
5585
5586
|
qr(),
|
|
5586
|
-
Vr(),
|
|
5587
|
-
Ur(),
|
|
5588
5587
|
Dr(),
|
|
5588
|
+
Ur(),
|
|
5589
|
+
Vr(),
|
|
5589
5590
|
Pr(),
|
|
5590
5591
|
Wr()
|
|
5591
5592
|
);
|
|
5592
|
-
}),
|
|
5593
|
+
}), Ze(() => {
|
|
5593
5594
|
var d;
|
|
5594
5595
|
(d = o.value) == null || d.remove();
|
|
5595
|
-
}),
|
|
5596
|
+
}), pe(
|
|
5596
5597
|
() => {
|
|
5597
5598
|
var d;
|
|
5598
5599
|
return (d = e.value.document) == null ? void 0 : d.readOnly;
|
|
@@ -5603,7 +5604,7 @@ const Hi = ({ getId: r, anchorTypes: e = ["heading"] }) => new He({ key: new Je(
|
|
|
5603
5604
|
readOnly: d
|
|
5604
5605
|
});
|
|
5605
5606
|
}
|
|
5606
|
-
),
|
|
5607
|
+
), pe(
|
|
5607
5608
|
() => [r.node.attrs.language, r.node.attrs.lineNumbers, r.node.attrs.wordWrap],
|
|
5608
5609
|
() => {
|
|
5609
5610
|
var d;
|
|
@@ -5662,7 +5663,7 @@ const Hi = ({ getId: r, anchorTypes: e = ["heading"] }) => new He({ key: new Je(
|
|
|
5662
5663
|
_: 1
|
|
5663
5664
|
}, 8, ["class"]));
|
|
5664
5665
|
}
|
|
5665
|
-
}, aa = /* @__PURE__ */ H(ia, [["__scopeId", "data-v-909f4666"]]), ua =
|
|
5666
|
+
}, aa = /* @__PURE__ */ H(ia, [["__scopeId", "data-v-909f4666"]]), ua = Z.create({
|
|
5666
5667
|
name: "codeBlock",
|
|
5667
5668
|
group: "block",
|
|
5668
5669
|
content: "text*",
|
|
@@ -5693,7 +5694,7 @@ const Hi = ({ getId: r, anchorTypes: e = ["heading"] }) => new He({ key: new Je(
|
|
|
5693
5694
|
return [{ tag: "pre" }];
|
|
5694
5695
|
},
|
|
5695
5696
|
renderHTML({ HTMLAttributes: r }) {
|
|
5696
|
-
return ["pre",
|
|
5697
|
+
return ["pre", Y(this.options.HTMLAttributes, r)];
|
|
5697
5698
|
},
|
|
5698
5699
|
addNodeView() {
|
|
5699
5700
|
return ae(aa);
|
|
@@ -5725,7 +5726,7 @@ const Hi = ({ getId: r, anchorTypes: e = ["heading"] }) => new He({ key: new Je(
|
|
|
5725
5726
|
_: 1
|
|
5726
5727
|
}));
|
|
5727
5728
|
}
|
|
5728
|
-
}, da = /* @__PURE__ */ H(ca, [["__scopeId", "data-v-ad2a6a54"]]), pa =
|
|
5729
|
+
}, da = /* @__PURE__ */ H(ca, [["__scopeId", "data-v-ad2a6a54"]]), pa = Z.create({
|
|
5729
5730
|
name: "codeOnline",
|
|
5730
5731
|
group: "block",
|
|
5731
5732
|
atom: !0,
|
|
@@ -5747,7 +5748,7 @@ const Hi = ({ getId: r, anchorTypes: e = ["heading"] }) => new He({ key: new Je(
|
|
|
5747
5748
|
];
|
|
5748
5749
|
},
|
|
5749
5750
|
renderHTML({ HTMLAttributes: r }) {
|
|
5750
|
-
return ["codeOnline",
|
|
5751
|
+
return ["codeOnline", Y(r)];
|
|
5751
5752
|
},
|
|
5752
5753
|
addCommands() {
|
|
5753
5754
|
return {
|
|
@@ -5760,14 +5761,14 @@ const Hi = ({ getId: r, anchorTypes: e = ["heading"] }) => new He({ key: new Je(
|
|
|
5760
5761
|
addNodeView() {
|
|
5761
5762
|
return ae(da);
|
|
5762
5763
|
}
|
|
5763
|
-
}), tt =
|
|
5764
|
+
}), tt = Z.create({
|
|
5764
5765
|
name: "column",
|
|
5765
5766
|
group: "column",
|
|
5766
5767
|
content: "(paragraph|block)*",
|
|
5767
5768
|
isolating: !0,
|
|
5768
5769
|
selectable: !1,
|
|
5769
5770
|
renderHTML({ HTMLAttributes: r }) {
|
|
5770
|
-
return ["div",
|
|
5771
|
+
return ["div", Y(r, { class: "column" }), 0];
|
|
5771
5772
|
}
|
|
5772
5773
|
});
|
|
5773
5774
|
function Ao(r, e, n) {
|
|
@@ -6264,8 +6265,8 @@ class xe {
|
|
|
6264
6265
|
let b = d ? e == u ? -1 : e == f ? 1 : n : n, h = u + t + (b < 0 ? 0 : p);
|
|
6265
6266
|
if (o)
|
|
6266
6267
|
return h;
|
|
6267
|
-
let
|
|
6268
|
-
return (n < 0 ? e != u : e != f) && (
|
|
6268
|
+
let k = e == (n < 0 ? u : f) ? null : fa(a / 3, e - u), C = e == u ? No : e == f ? Lo : yt;
|
|
6269
|
+
return (n < 0 ? e != u : e != f) && (C |= Ro), new vn(h, C, k);
|
|
6269
6270
|
}
|
|
6270
6271
|
t += p - d;
|
|
6271
6272
|
}
|
|
@@ -6397,15 +6398,15 @@ class me {
|
|
|
6397
6398
|
}
|
|
6398
6399
|
}
|
|
6399
6400
|
}
|
|
6400
|
-
function
|
|
6401
|
+
function Yt(r, e, n) {
|
|
6401
6402
|
let o = [];
|
|
6402
6403
|
for (let t = 0; t < r.childCount; t++) {
|
|
6403
6404
|
let l = r.child(t);
|
|
6404
|
-
l.content.size && (l = l.copy(
|
|
6405
|
+
l.content.size && (l = l.copy(Yt(l.content, e, l))), l.isInline && (l = e(l, n, t)), o.push(l);
|
|
6405
6406
|
}
|
|
6406
6407
|
return re.fromArray(o);
|
|
6407
6408
|
}
|
|
6408
|
-
class
|
|
6409
|
+
class Ve extends ke {
|
|
6409
6410
|
/**
|
|
6410
6411
|
Create a mark step.
|
|
6411
6412
|
*/
|
|
@@ -6413,18 +6414,18 @@ class De extends ke {
|
|
|
6413
6414
|
super(), this.from = e, this.to = n, this.mark = o;
|
|
6414
6415
|
}
|
|
6415
6416
|
apply(e) {
|
|
6416
|
-
let n = e.slice(this.from, this.to), o = e.resolve(this.from), t = o.node(o.sharedDepth(this.to)), l = new ne(
|
|
6417
|
+
let n = e.slice(this.from, this.to), o = e.resolve(this.from), t = o.node(o.sharedDepth(this.to)), l = new ne(Yt(n.content, (s, a) => !s.isAtom || !a.type.allowsMarkType(this.mark.type) ? s : s.mark(this.mark.addToSet(s.marks)), t), n.openStart, n.openEnd);
|
|
6417
6418
|
return me.fromReplace(e, this.from, this.to, l);
|
|
6418
6419
|
}
|
|
6419
6420
|
invert() {
|
|
6420
|
-
return new
|
|
6421
|
+
return new De(this.from, this.to, this.mark);
|
|
6421
6422
|
}
|
|
6422
6423
|
map(e) {
|
|
6423
6424
|
let n = e.mapResult(this.from, 1), o = e.mapResult(this.to, -1);
|
|
6424
|
-
return n.deleted && o.deleted || n.pos >= o.pos ? null : new
|
|
6425
|
+
return n.deleted && o.deleted || n.pos >= o.pos ? null : new Ve(n.pos, o.pos, this.mark);
|
|
6425
6426
|
}
|
|
6426
6427
|
merge(e) {
|
|
6427
|
-
return e instanceof
|
|
6428
|
+
return e instanceof Ve && e.mark.eq(this.mark) && this.from <= e.to && this.to >= e.from ? new Ve(Math.min(this.from, e.from), Math.max(this.to, e.to), this.mark) : null;
|
|
6428
6429
|
}
|
|
6429
6430
|
toJSON() {
|
|
6430
6431
|
return {
|
|
@@ -6440,11 +6441,11 @@ class De extends ke {
|
|
|
6440
6441
|
static fromJSON(e, n) {
|
|
6441
6442
|
if (typeof n.from != "number" || typeof n.to != "number")
|
|
6442
6443
|
throw new RangeError("Invalid input for AddMarkStep.fromJSON");
|
|
6443
|
-
return new
|
|
6444
|
+
return new Ve(n.from, n.to, e.markFromJSON(n.mark));
|
|
6444
6445
|
}
|
|
6445
6446
|
}
|
|
6446
|
-
ke.jsonID("addMark",
|
|
6447
|
-
class
|
|
6447
|
+
ke.jsonID("addMark", Ve);
|
|
6448
|
+
class De extends ke {
|
|
6448
6449
|
/**
|
|
6449
6450
|
Create a mark-removing step.
|
|
6450
6451
|
*/
|
|
@@ -6452,18 +6453,18 @@ class Ve extends ke {
|
|
|
6452
6453
|
super(), this.from = e, this.to = n, this.mark = o;
|
|
6453
6454
|
}
|
|
6454
6455
|
apply(e) {
|
|
6455
|
-
let n = e.slice(this.from, this.to), o = new ne(
|
|
6456
|
+
let n = e.slice(this.from, this.to), o = new ne(Yt(n.content, (t) => t.mark(this.mark.removeFromSet(t.marks)), e), n.openStart, n.openEnd);
|
|
6456
6457
|
return me.fromReplace(e, this.from, this.to, o);
|
|
6457
6458
|
}
|
|
6458
6459
|
invert() {
|
|
6459
|
-
return new
|
|
6460
|
+
return new Ve(this.from, this.to, this.mark);
|
|
6460
6461
|
}
|
|
6461
6462
|
map(e) {
|
|
6462
6463
|
let n = e.mapResult(this.from, 1), o = e.mapResult(this.to, -1);
|
|
6463
|
-
return n.deleted && o.deleted || n.pos >= o.pos ? null : new
|
|
6464
|
+
return n.deleted && o.deleted || n.pos >= o.pos ? null : new De(n.pos, o.pos, this.mark);
|
|
6464
6465
|
}
|
|
6465
6466
|
merge(e) {
|
|
6466
|
-
return e instanceof
|
|
6467
|
+
return e instanceof De && e.mark.eq(this.mark) && this.from <= e.to && this.to >= e.from ? new De(Math.min(this.from, e.from), Math.max(this.to, e.to), this.mark) : null;
|
|
6467
6468
|
}
|
|
6468
6469
|
toJSON() {
|
|
6469
6470
|
return {
|
|
@@ -6479,10 +6480,10 @@ class Ve extends ke {
|
|
|
6479
6480
|
static fromJSON(e, n) {
|
|
6480
6481
|
if (typeof n.from != "number" || typeof n.to != "number")
|
|
6481
6482
|
throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");
|
|
6482
|
-
return new
|
|
6483
|
+
return new De(n.from, n.to, e.markFromJSON(n.mark));
|
|
6483
6484
|
}
|
|
6484
6485
|
}
|
|
6485
|
-
ke.jsonID("removeMark",
|
|
6486
|
+
ke.jsonID("removeMark", De);
|
|
6486
6487
|
class Ue extends ke {
|
|
6487
6488
|
/**
|
|
6488
6489
|
Create a node mark step.
|
|
@@ -7051,7 +7052,7 @@ class Ae extends fe {
|
|
|
7051
7052
|
return { type: "node", anchor: this.anchor };
|
|
7052
7053
|
}
|
|
7053
7054
|
getBookmark() {
|
|
7054
|
-
return new
|
|
7055
|
+
return new Zt(this.anchor);
|
|
7055
7056
|
}
|
|
7056
7057
|
/**
|
|
7057
7058
|
@internal
|
|
@@ -7077,13 +7078,13 @@ class Ae extends fe {
|
|
|
7077
7078
|
}
|
|
7078
7079
|
Ae.prototype.visible = !1;
|
|
7079
7080
|
fe.jsonID("node", Ae);
|
|
7080
|
-
class
|
|
7081
|
+
class Zt {
|
|
7081
7082
|
constructor(e) {
|
|
7082
7083
|
this.anchor = e;
|
|
7083
7084
|
}
|
|
7084
7085
|
map(e) {
|
|
7085
7086
|
let { deleted: n, pos: o } = e.mapResult(this.anchor);
|
|
7086
|
-
return n ? new Bt(o, o) : new
|
|
7087
|
+
return n ? new Bt(o, o) : new Zt(o);
|
|
7087
7088
|
}
|
|
7088
7089
|
resolve(e) {
|
|
7089
7090
|
let n = e.resolve(this.anchor), o = n.nodeAfter;
|
|
@@ -7200,23 +7201,23 @@ new bt("doc", {
|
|
|
7200
7201
|
}
|
|
7201
7202
|
});
|
|
7202
7203
|
const va = (r, e) => Array.from({ length: r }, (n, o) => e(o));
|
|
7203
|
-
function
|
|
7204
|
+
function Xt({ type: r, content: e }) {
|
|
7204
7205
|
return e ? { type: r, content: e } : { type: r };
|
|
7205
7206
|
}
|
|
7206
7207
|
function ga({ content: r }) {
|
|
7207
|
-
return
|
|
7208
|
+
return Xt({ type: "paragraph", content: r });
|
|
7208
7209
|
}
|
|
7209
7210
|
function Io({ content: r }) {
|
|
7210
|
-
return
|
|
7211
|
+
return Xt({ type: "column", content: r });
|
|
7211
7212
|
}
|
|
7212
7213
|
function Cn({ content: r }) {
|
|
7213
|
-
return
|
|
7214
|
+
return Xt({ type: "columnBlock", content: r });
|
|
7214
7215
|
}
|
|
7215
7216
|
function wn(r) {
|
|
7216
7217
|
const e = [ga({})];
|
|
7217
7218
|
return va(r, () => Io({ content: e }));
|
|
7218
7219
|
}
|
|
7219
|
-
function
|
|
7220
|
+
function Vt(r, e) {
|
|
7220
7221
|
for (let n = r.depth; n > 0; n--) {
|
|
7221
7222
|
const o = r.node(n), t = n > 0 ? r.before(n) : 0, l = r.start(n);
|
|
7222
7223
|
if (e({ node: o, pos: t, start: l }))
|
|
@@ -7257,9 +7258,9 @@ class St extends fe {
|
|
|
7257
7258
|
}
|
|
7258
7259
|
expandSelection(n) {
|
|
7259
7260
|
var a;
|
|
7260
|
-
const o = ({ pos: u, node: d }) => d.type.name === tt.name ? !0 : n.resolve(u).depth <= 0, { pos: t } =
|
|
7261
|
+
const o = ({ pos: u, node: d }) => d.type.name === tt.name ? !0 : n.resolve(u).depth <= 0, { pos: t } = Vt(this.$from, o);
|
|
7261
7262
|
this._$from = n.resolve(t);
|
|
7262
|
-
const { pos: l, node: s } =
|
|
7263
|
+
const { pos: l, node: s } = Vt(
|
|
7263
7264
|
this.$to,
|
|
7264
7265
|
o
|
|
7265
7266
|
);
|
|
@@ -7273,7 +7274,7 @@ class St extends fe {
|
|
|
7273
7274
|
return this.content().content.firstChild;
|
|
7274
7275
|
}
|
|
7275
7276
|
}
|
|
7276
|
-
const Fo =
|
|
7277
|
+
const Fo = Z.create({
|
|
7277
7278
|
name: "columnBlock",
|
|
7278
7279
|
group: "block",
|
|
7279
7280
|
content: "column{2,}",
|
|
@@ -7293,7 +7294,7 @@ const Fo = Y.create({
|
|
|
7293
7294
|
};
|
|
7294
7295
|
},
|
|
7295
7296
|
renderHTML({ HTMLAttributes: r }) {
|
|
7296
|
-
return ["column-block",
|
|
7297
|
+
return ["column-block", Y(r, {
|
|
7297
7298
|
class: "column-block",
|
|
7298
7299
|
"data-type": "columnBlock"
|
|
7299
7300
|
}), 0];
|
|
@@ -7304,7 +7305,7 @@ const Fo = Y.create({
|
|
|
7304
7305
|
try {
|
|
7305
7306
|
if (!t)
|
|
7306
7307
|
return;
|
|
7307
|
-
const l = o.selection.$from, a =
|
|
7308
|
+
const l = o.selection.$from, a = Vt(
|
|
7308
7309
|
l,
|
|
7309
7310
|
({ node: f }) => !this.options.nestedColumns && f.type === this.type ? !0 : f.type === this.type
|
|
7310
7311
|
);
|
|
@@ -7336,21 +7337,21 @@ const Fo = Y.create({
|
|
|
7336
7337
|
}
|
|
7337
7338
|
let b;
|
|
7338
7339
|
if (t) {
|
|
7339
|
-
const
|
|
7340
|
+
const x = d.content().toJSON(), T = Io(x), w = wn(o - 1);
|
|
7340
7341
|
b = Cn({
|
|
7341
|
-
content: [T, ...
|
|
7342
|
+
content: [T, ...w]
|
|
7342
7343
|
});
|
|
7343
7344
|
} else {
|
|
7344
|
-
const
|
|
7345
|
+
const x = wn(o);
|
|
7345
7346
|
b = Cn({
|
|
7346
|
-
content:
|
|
7347
|
+
content: x
|
|
7347
7348
|
});
|
|
7348
7349
|
}
|
|
7349
7350
|
const h = a.type.schema.nodeFromJSON(b);
|
|
7350
7351
|
if (h === null)
|
|
7351
7352
|
return;
|
|
7352
|
-
const
|
|
7353
|
-
return ((
|
|
7353
|
+
const k = d.$anchor.parent.type;
|
|
7354
|
+
return ((x) => !(!x.contentMatch.matchType(this.type) || !this.options.nestedColumns && x.name === tt.name))(k) ? (l = l.setSelection(d), l = l.replaceSelectionWith(h, !1), s(l)) : void 0;
|
|
7354
7355
|
} catch (a) {
|
|
7355
7356
|
console.error(a);
|
|
7356
7357
|
}
|
|
@@ -7406,8 +7407,8 @@ const Fo = Y.create({
|
|
|
7406
7407
|
addOptions() {
|
|
7407
7408
|
return {
|
|
7408
7409
|
checkInfo: () => {
|
|
7409
|
-
const r = new URL(window.location.href);
|
|
7410
|
-
return new URLSearchParams(
|
|
7410
|
+
const r = new URL(window.location.href), e = r.hash.startsWith("#") ? r.hash.slice(3) : r.hash;
|
|
7411
|
+
return new URLSearchParams(e).get("cid") || "";
|
|
7411
7412
|
},
|
|
7412
7413
|
filterNode: ["paper", "inlineRead", "read", "recorder", "speech"],
|
|
7413
7414
|
cidNode: [
|
|
@@ -7504,13 +7505,13 @@ const Fo = Y.create({
|
|
|
7504
7505
|
})
|
|
7505
7506
|
];
|
|
7506
7507
|
}
|
|
7507
|
-
}), ya =
|
|
7508
|
+
}), ya = Z.create({ name: "detailsContent", content: "block+", defining: !0, selectable: !1, addOptions: () => ({ HTMLAttributes: {} }), parseHTML() {
|
|
7508
7509
|
return [{ tag: `div[data-type="${this.name}"]` }];
|
|
7509
7510
|
}, renderHTML({ HTMLAttributes: r }) {
|
|
7510
|
-
return ["div",
|
|
7511
|
+
return ["div", Y(this.options.HTMLAttributes, r, { "data-type": this.name }), 0];
|
|
7511
7512
|
}, addNodeView() {
|
|
7512
7513
|
return ({ HTMLAttributes: r }) => {
|
|
7513
|
-
const e = document.createElement("div"), n =
|
|
7514
|
+
const e = document.createElement("div"), n = Y(this.options.HTMLAttributes, r, { "data-type": this.name, hidden: "hidden" });
|
|
7514
7515
|
return Object.entries(n).forEach(([o, t]) => e.setAttribute(o, t)), e.addEventListener("toggleDetailsContent", () => {
|
|
7515
7516
|
e.toggleAttribute("hidden");
|
|
7516
7517
|
}), { dom: e, contentDOM: e, ignoreMutation: (o) => o.type !== "selection" && (!e.contains(o.target) || e === o.target), update: (o) => o.type === this.type };
|
|
@@ -7523,20 +7524,20 @@ const Fo = Y.create({
|
|
|
7523
7524
|
if (u !== a + 1) return !1;
|
|
7524
7525
|
const d = s.node.type.contentMatch.defaultType, p = d == null ? void 0 : d.createAndFill();
|
|
7525
7526
|
if (!p) return !1;
|
|
7526
|
-
const f = e.doc.resolve(s.pos + 1), b = u - 1, h = s.node.child(b),
|
|
7527
|
+
const f = e.doc.resolve(s.pos + 1), b = u - 1, h = s.node.child(b), k = f.posAtIndex(b, s.depth);
|
|
7527
7528
|
if (!h.eq(p)) return !1;
|
|
7528
|
-
const
|
|
7529
|
-
if (!
|
|
7530
|
-
const
|
|
7531
|
-
if (!T || !
|
|
7532
|
-
const
|
|
7533
|
-
if (!
|
|
7534
|
-
const { tr:
|
|
7535
|
-
|
|
7536
|
-
const R =
|
|
7537
|
-
|
|
7538
|
-
const U =
|
|
7539
|
-
return
|
|
7529
|
+
const C = t.node(-3);
|
|
7530
|
+
if (!C) return !1;
|
|
7531
|
+
const x = t.indexAfter(-3), T = Un(C.contentMatchAt(x));
|
|
7532
|
+
if (!T || !C.canReplaceWith(x, x, T)) return !1;
|
|
7533
|
+
const w = T.createAndFill();
|
|
7534
|
+
if (!w) return !1;
|
|
7535
|
+
const { tr: y } = e, L = t.after(-2);
|
|
7536
|
+
y.replaceWith(L, L, w);
|
|
7537
|
+
const R = y.doc.resolve(L), I = Jn.near(R, 1);
|
|
7538
|
+
y.setSelection(I);
|
|
7539
|
+
const U = k, O = k + h.nodeSize;
|
|
7540
|
+
return y.delete(U, O), y.scrollIntoView(), n.dispatch(y), !0;
|
|
7540
7541
|
} };
|
|
7541
7542
|
} }), ka = ya.extend({
|
|
7542
7543
|
addProseMirrorPlugins() {
|
|
@@ -7572,7 +7573,7 @@ const Fo = Y.create({
|
|
|
7572
7573
|
_: 1
|
|
7573
7574
|
}));
|
|
7574
7575
|
}
|
|
7575
|
-
}, { options: wa } = M(), xa =
|
|
7576
|
+
}, { options: wa } = M(), xa = Z.create({
|
|
7576
7577
|
name: "embedVideo",
|
|
7577
7578
|
group: "block",
|
|
7578
7579
|
atom: !0,
|
|
@@ -7600,7 +7601,7 @@ const Fo = Y.create({
|
|
|
7600
7601
|
];
|
|
7601
7602
|
},
|
|
7602
7603
|
renderHTML({ HTMLAttributes: r }) {
|
|
7603
|
-
return ["video",
|
|
7604
|
+
return ["video", Y(r)];
|
|
7604
7605
|
},
|
|
7605
7606
|
addNodeView() {
|
|
7606
7607
|
return wa.value.render.embedVideo.view ? ae(Ca) : ({ node: r }) => {
|
|
@@ -7632,7 +7633,7 @@ const Fo = Y.create({
|
|
|
7632
7633
|
_: 1
|
|
7633
7634
|
}));
|
|
7634
7635
|
}
|
|
7635
|
-
}, Ta = /* @__PURE__ */ H(Aa, [["__scopeId", "data-v-40e74acc"]]), Sa =
|
|
7636
|
+
}, Ta = /* @__PURE__ */ H(Aa, [["__scopeId", "data-v-40e74acc"]]), Sa = Z.create({
|
|
7636
7637
|
name: "file",
|
|
7637
7638
|
group: "block",
|
|
7638
7639
|
atom: !0,
|
|
@@ -7657,6 +7658,10 @@ const Fo = Y.create({
|
|
|
7657
7658
|
isExpand: {
|
|
7658
7659
|
default: 0
|
|
7659
7660
|
},
|
|
7661
|
+
// 0: 禁止下载 1:允许下载
|
|
7662
|
+
isDownload: {
|
|
7663
|
+
default: 1
|
|
7664
|
+
},
|
|
7660
7665
|
cid: {
|
|
7661
7666
|
default: null
|
|
7662
7667
|
}
|
|
@@ -7670,7 +7675,7 @@ const Fo = Y.create({
|
|
|
7670
7675
|
];
|
|
7671
7676
|
},
|
|
7672
7677
|
renderHTML({ HTMLAttributes: r }) {
|
|
7673
|
-
return ["file",
|
|
7678
|
+
return ["file", Y(r)];
|
|
7674
7679
|
},
|
|
7675
7680
|
addCommands() {
|
|
7676
7681
|
return {
|
|
@@ -7697,7 +7702,7 @@ const Fo = Y.create({
|
|
|
7697
7702
|
_: 1
|
|
7698
7703
|
}));
|
|
7699
7704
|
}
|
|
7700
|
-
}, Ma = /* @__PURE__ */ H($a, [["__scopeId", "data-v-0a059ca6"]]), Ba =
|
|
7705
|
+
}, Ma = /* @__PURE__ */ H($a, [["__scopeId", "data-v-0a059ca6"]]), Ba = Z.create({
|
|
7701
7706
|
name: "flowchart",
|
|
7702
7707
|
group: "block",
|
|
7703
7708
|
atom: !0,
|
|
@@ -7726,7 +7731,7 @@ const Fo = Y.create({
|
|
|
7726
7731
|
];
|
|
7727
7732
|
},
|
|
7728
7733
|
renderHTML({ HTMLAttributes: r }) {
|
|
7729
|
-
return ["flowchart",
|
|
7734
|
+
return ["flowchart", Y(r)];
|
|
7730
7735
|
},
|
|
7731
7736
|
addCommands() {
|
|
7732
7737
|
return {
|
|
@@ -7849,7 +7854,7 @@ const Fo = Y.create({
|
|
|
7849
7854
|
_: 1
|
|
7850
7855
|
}));
|
|
7851
7856
|
}
|
|
7852
|
-
}, Na = /* @__PURE__ */ H(La, [["__scopeId", "data-v-6c1afe5f"]]), Ra =
|
|
7857
|
+
}, Na = /* @__PURE__ */ H(La, [["__scopeId", "data-v-6c1afe5f"]]), Ra = Z.create({
|
|
7853
7858
|
name: "gallery",
|
|
7854
7859
|
group: "block",
|
|
7855
7860
|
atom: !0,
|
|
@@ -7874,7 +7879,7 @@ const Fo = Y.create({
|
|
|
7874
7879
|
];
|
|
7875
7880
|
},
|
|
7876
7881
|
renderHTML({ HTMLAttributes: r }) {
|
|
7877
|
-
return ["gallery",
|
|
7882
|
+
return ["gallery", Y(r)];
|
|
7878
7883
|
},
|
|
7879
7884
|
addCommands() {
|
|
7880
7885
|
return {
|
|
@@ -7887,7 +7892,7 @@ const Fo = Y.create({
|
|
|
7887
7892
|
addNodeView() {
|
|
7888
7893
|
return ae(Na);
|
|
7889
7894
|
}
|
|
7890
|
-
}), Ea =
|
|
7895
|
+
}), Ea = Z.create({
|
|
7891
7896
|
name: "highlightBlock",
|
|
7892
7897
|
group: "block",
|
|
7893
7898
|
content: "block+",
|
|
@@ -7917,7 +7922,7 @@ const Fo = Y.create({
|
|
|
7917
7922
|
renderHTML({ HTMLAttributes: r }) {
|
|
7918
7923
|
return [
|
|
7919
7924
|
"div",
|
|
7920
|
-
|
|
7925
|
+
Y({ "data-type": "highlightBlock" }, r),
|
|
7921
7926
|
0
|
|
7922
7927
|
];
|
|
7923
7928
|
},
|
|
@@ -7966,7 +7971,7 @@ const Fo = Y.create({
|
|
|
7966
7971
|
_: 1
|
|
7967
7972
|
}));
|
|
7968
7973
|
}
|
|
7969
|
-
}, Fa = /* @__PURE__ */ H(Ia, [["__scopeId", "data-v-4241f141"]]), Ha =
|
|
7974
|
+
}, Fa = /* @__PURE__ */ H(Ia, [["__scopeId", "data-v-4241f141"]]), Ha = Z.create({
|
|
7970
7975
|
name: "iframe",
|
|
7971
7976
|
group: "block",
|
|
7972
7977
|
atom: !0,
|
|
@@ -8001,7 +8006,7 @@ const Fo = Y.create({
|
|
|
8001
8006
|
];
|
|
8002
8007
|
},
|
|
8003
8008
|
renderHTML({ HTMLAttributes: r }) {
|
|
8004
|
-
return ["iframe",
|
|
8009
|
+
return ["iframe", Y(r)];
|
|
8005
8010
|
},
|
|
8006
8011
|
addCommands() {
|
|
8007
8012
|
return {
|
|
@@ -8021,30 +8026,30 @@ function za(r, e, n) {
|
|
|
8021
8026
|
const xn = (r) => typeof r == "number", Oa = ["src", "alt"], Pa = {
|
|
8022
8027
|
key: 1,
|
|
8023
8028
|
class: "image-error"
|
|
8024
|
-
}, Wa = { class: "image-view__body__wrapper" },
|
|
8029
|
+
}, Wa = { class: "image-view__body__wrapper" }, Va = { class: "image-resizer" }, Da = ["onMousedown"], Ua = {
|
|
8025
8030
|
__name: "image-view",
|
|
8026
8031
|
props: se,
|
|
8027
8032
|
setup(r) {
|
|
8028
|
-
const e =
|
|
8029
|
-
const { src: S, alt:
|
|
8033
|
+
const e = W(() => {
|
|
8034
|
+
const { src: S, alt: D, width: j, height: q } = r.node.attrs, Q = xn(j) ? `${j}px` : j, G = xn(q) ? `${q}px` : q;
|
|
8030
8035
|
return {
|
|
8031
8036
|
src: S || void 0,
|
|
8032
|
-
alt:
|
|
8037
|
+
alt: D || void 0,
|
|
8033
8038
|
style: {
|
|
8034
8039
|
width: Q || void 0,
|
|
8035
8040
|
height: G || void 0
|
|
8036
8041
|
}
|
|
8037
8042
|
};
|
|
8038
|
-
}), n = `inline-read-view-${Te()}`, o =
|
|
8043
|
+
}), n = `inline-read-view-${Te()}`, o = W(() => r.node.attrs.display || void 0), t = W(() => r.node.attrs.chapter || "N"), l = W(() => r.node.attrs.lockAspectRatio ?? !0), s = W(() => {
|
|
8039
8044
|
const S = ["image-title"];
|
|
8040
8045
|
return typeof r.node.attrs.describe == "string" && r.node.attrs.describe === "N" && S.push("image-title--hide"), S;
|
|
8041
|
-
}), a =
|
|
8046
|
+
}), a = W(() => {
|
|
8042
8047
|
const S = ["image-view", n];
|
|
8043
8048
|
return typeof o.value == "string" && S.push(`image-view--${o.value}`), typeof t.value == "string" && S.push(`image-view--${t.value}`), S;
|
|
8044
|
-
}), u =
|
|
8049
|
+
}), u = W(() => {
|
|
8045
8050
|
const { style: { width: S } } = e.value;
|
|
8046
8051
|
return { width: S === "100%" ? S : void 0 };
|
|
8047
|
-
}), d =
|
|
8052
|
+
}), d = W(() => {
|
|
8048
8053
|
const { style: { width: S } } = e.value;
|
|
8049
8054
|
return { width: S === "100%" ? "calc(100% - 2px)" : void 0 };
|
|
8050
8055
|
}), p = B(!1), f = B(null);
|
|
@@ -8055,42 +8060,42 @@ const xn = (r) => typeof r == "number", Oa = ["src", "alt"], Pa = {
|
|
|
8055
8060
|
p.value = !0, r.editor.commands.setNodeSelection(r.getPos());
|
|
8056
8061
|
}
|
|
8057
8062
|
const h = B({ width: 0, height: 0 });
|
|
8058
|
-
function
|
|
8063
|
+
function k(S) {
|
|
8059
8064
|
h.value.width = S.target.width, h.value.height = S.target.height;
|
|
8060
8065
|
}
|
|
8061
|
-
const
|
|
8066
|
+
const C = B({
|
|
8062
8067
|
width: 1e4,
|
|
8063
8068
|
height: 1e4
|
|
8064
|
-
}),
|
|
8069
|
+
}), x = ["tl", "tr", "bl", "br"], T = B(!1), w = B({
|
|
8065
8070
|
width: 0,
|
|
8066
8071
|
height: 0
|
|
8067
|
-
}),
|
|
8072
|
+
}), y = B({
|
|
8068
8073
|
x: 0,
|
|
8069
8074
|
y: 0,
|
|
8070
8075
|
w: 0,
|
|
8071
8076
|
h: 0,
|
|
8072
8077
|
dir: ""
|
|
8073
8078
|
});
|
|
8074
|
-
function L(S,
|
|
8079
|
+
function L(S, D) {
|
|
8075
8080
|
if (t.value === "Y")
|
|
8076
8081
|
return;
|
|
8077
|
-
S.preventDefault(), S.stopPropagation(),
|
|
8082
|
+
S.preventDefault(), S.stopPropagation(), y.value.x = S.clientX, y.value.y = S.clientY;
|
|
8078
8083
|
const j = h.value.width, q = h.value.height, Q = j / q;
|
|
8079
8084
|
let G = Number(r.node.attrs.width), ue = Number(r.node.attrs.height);
|
|
8080
|
-
const ee =
|
|
8081
|
-
G && !ue ? (G = G > ee ? ee : G, ue = Math.round(G / Q)) : ue && !G ? (G = Math.round(ue * Q), G = G > ee ? ee : G) : !G && !ue ? (G = j > ee ? ee : j, ue = Math.round(G / Q)) : G = G > ee ? ee : G,
|
|
8085
|
+
const ee = C.value.width;
|
|
8086
|
+
G && !ue ? (G = G > ee ? ee : G, ue = Math.round(G / Q)) : ue && !G ? (G = Math.round(ue * Q), G = G > ee ? ee : G) : !G && !ue ? (G = j > ee ? ee : j, ue = Math.round(G / Q)) : G = G > ee ? ee : G, y.value.w = G, y.value.h = ue, y.value.dir = D, T.value = !0, U();
|
|
8082
8087
|
}
|
|
8083
8088
|
const R = Wn((S) => {
|
|
8084
8089
|
if (S.preventDefault(), S.stopPropagation(), !T.value)
|
|
8085
8090
|
return;
|
|
8086
|
-
const { x:
|
|
8087
|
-
|
|
8091
|
+
const { x: D, y: j, w: q, h: Q, dir: G } = y.value, ue = (S.clientX - D) * (/l/.test(G) ? -1 : 1), ee = (S.clientY - j) * (/t/.test(G) ? -1 : 1), he = za(q + ue, 20, C.value.width), Ce = l.value ? null : Math.max(Q + ee, 20);
|
|
8092
|
+
w.value = {
|
|
8088
8093
|
width: he,
|
|
8089
8094
|
height: he * (h.value.height / h.value.width)
|
|
8090
8095
|
}, r.updateAttributes({ width: he, height: Ce });
|
|
8091
8096
|
}, 16);
|
|
8092
8097
|
function I(S) {
|
|
8093
|
-
S.preventDefault(), S.stopPropagation(), T.value && (T.value = !1,
|
|
8098
|
+
S.preventDefault(), S.stopPropagation(), T.value && (T.value = !1, y.value = {
|
|
8094
8099
|
x: 0,
|
|
8095
8100
|
y: 0,
|
|
8096
8101
|
w: 0,
|
|
@@ -8104,7 +8109,7 @@ const xn = (r) => typeof r == "number", Oa = ["src", "alt"], Pa = {
|
|
|
8104
8109
|
function O() {
|
|
8105
8110
|
document == null || document.removeEventListener("mousemove", R, !0), document == null || document.removeEventListener("mouseup", I, !0);
|
|
8106
8111
|
}
|
|
8107
|
-
return (S,
|
|
8112
|
+
return (S, D) => (m(), _(i(ie), {
|
|
8108
8113
|
ref_key: "imageViewRef",
|
|
8109
8114
|
ref: f,
|
|
8110
8115
|
class: K(i(a)),
|
|
@@ -8126,22 +8131,22 @@ const xn = (r) => typeof r == "number", Oa = ["src", "alt"], Pa = {
|
|
|
8126
8131
|
alt: i(e).alt,
|
|
8127
8132
|
style: le(i(e).style),
|
|
8128
8133
|
class: "image-view__body__image",
|
|
8129
|
-
onLoad:
|
|
8134
|
+
onLoad: k,
|
|
8130
8135
|
onClick: b
|
|
8131
8136
|
}, null, 44, Oa)) : (m(), $("div", Pa)),
|
|
8132
8137
|
ot(g("div", Wa, [
|
|
8133
|
-
te(N(i(
|
|
8134
|
-
|
|
8135
|
-
te(" " + N(Math.round(i(
|
|
8138
|
+
te(N(i(w).width) + " ", 1),
|
|
8139
|
+
D[0] || (D[0] = g("i", { class: "i-sed:x" }, null, -1)),
|
|
8140
|
+
te(" " + N(Math.round(i(w).height)), 1)
|
|
8136
8141
|
], 512), [
|
|
8137
8142
|
[kt, i(T)]
|
|
8138
8143
|
]),
|
|
8139
|
-
ot(g("div",
|
|
8140
|
-
(m(), $(J, null, ge(
|
|
8144
|
+
ot(g("div", Va, [
|
|
8145
|
+
(m(), $(J, null, ge(x, (j) => g("span", {
|
|
8141
8146
|
key: j,
|
|
8142
8147
|
class: K([`image-resizer__handler--${j}`, "image-resizer__handler"]),
|
|
8143
8148
|
onMousedown: (q) => L(q, j)
|
|
8144
|
-
}, null, 42,
|
|
8149
|
+
}, null, 42, Da)), 64))
|
|
8145
8150
|
], 512), [
|
|
8146
8151
|
[kt, S.editor.view.editable && (S.selected || i(T)) && i(t) === "N"]
|
|
8147
8152
|
])
|
|
@@ -8226,7 +8231,7 @@ const xn = (r) => typeof r == "number", Oa = ["src", "alt"], Pa = {
|
|
|
8226
8231
|
})
|
|
8227
8232
|
};
|
|
8228
8233
|
}
|
|
8229
|
-
}), ja = /(?:^|\s)(!\[(.+|:?)\]\((\S+)(?:\s+["'](\S+)["'])?\))$/,
|
|
8234
|
+
}), ja = /(?:^|\s)(!\[(.+|:?)\]\((\S+)(?:\s+["'](\S+)["'])?\))$/, Vo = Z.create({
|
|
8230
8235
|
name: "imagePlaceholder",
|
|
8231
8236
|
draggable: !1,
|
|
8232
8237
|
addOptions() {
|
|
@@ -8277,7 +8282,7 @@ const xn = (r) => typeof r == "number", Oa = ["src", "alt"], Pa = {
|
|
|
8277
8282
|
})
|
|
8278
8283
|
];
|
|
8279
8284
|
}
|
|
8280
|
-
}),
|
|
8285
|
+
}), Dt = {};
|
|
8281
8286
|
function Ga(r) {
|
|
8282
8287
|
const e = new Ka(r), n = {};
|
|
8283
8288
|
return new He({
|
|
@@ -8431,7 +8436,7 @@ class Ka {
|
|
|
8431
8436
|
}
|
|
8432
8437
|
newUploadingImageNode(e) {
|
|
8433
8438
|
const n = this.config.id();
|
|
8434
|
-
return
|
|
8439
|
+
return Dt[n] = e.src || e["data-src"], this.view.state.schema.nodes.imagePlaceholder.create(
|
|
8435
8440
|
Object.assign(Object.assign({}, e), {
|
|
8436
8441
|
src: "",
|
|
8437
8442
|
uploadId: n
|
|
@@ -8446,7 +8451,7 @@ class Ka {
|
|
|
8446
8451
|
}), u;
|
|
8447
8452
|
};
|
|
8448
8453
|
let t = e;
|
|
8449
|
-
typeof t == "string" && (t = await
|
|
8454
|
+
typeof t == "string" && (t = await Ya(t));
|
|
8450
8455
|
const l = t && await this.config.upload(t, n).catch(console.warn), s = o();
|
|
8451
8456
|
if (!s.length)
|
|
8452
8457
|
return;
|
|
@@ -8459,7 +8464,7 @@ class Ka {
|
|
|
8459
8464
|
})
|
|
8460
8465
|
);
|
|
8461
8466
|
a.replaceWith(d, d + u.nodeSize, p);
|
|
8462
|
-
}), this.view.dispatch(a),
|
|
8467
|
+
}), this.view.dispatch(a), Dt[n] = "";
|
|
8463
8468
|
}
|
|
8464
8469
|
setView(e) {
|
|
8465
8470
|
return this.view = e, this;
|
|
@@ -8471,7 +8476,7 @@ class Ka {
|
|
|
8471
8476
|
);
|
|
8472
8477
|
}
|
|
8473
8478
|
}
|
|
8474
|
-
function
|
|
8479
|
+
function Ya(r) {
|
|
8475
8480
|
const e = r.includes("oss_download"), n = r.split(".").pop().toLowerCase(), o = {
|
|
8476
8481
|
jpg: "image/jpeg",
|
|
8477
8482
|
jpeg: "image/jpeg",
|
|
@@ -8491,9 +8496,9 @@ function Xa(r) {
|
|
|
8491
8496
|
}, u.onerror = p;
|
|
8492
8497
|
});
|
|
8493
8498
|
}
|
|
8494
|
-
return t(r).then((l) =>
|
|
8499
|
+
return t(r).then((l) => Za(l, "网络图片")).catch(() => null);
|
|
8495
8500
|
}
|
|
8496
|
-
function
|
|
8501
|
+
function Za(r, e) {
|
|
8497
8502
|
const n = r.split(","), o = n[0].match(/:(.*?);/)[1], t = o.split("/")[1], l = atob(n[1]);
|
|
8498
8503
|
let s = l.length;
|
|
8499
8504
|
const a = new Uint8Array(s);
|
|
@@ -8501,10 +8506,10 @@ function Ya(r, e) {
|
|
|
8501
8506
|
a[s] = l.charCodeAt(s);
|
|
8502
8507
|
return new File([a], `${e}.${t}`, { type: o });
|
|
8503
8508
|
}
|
|
8504
|
-
function
|
|
8505
|
-
return
|
|
8509
|
+
function Xa(r) {
|
|
8510
|
+
return Dt[r];
|
|
8506
8511
|
}
|
|
8507
|
-
const
|
|
8512
|
+
const Do = $e.create({
|
|
8508
8513
|
name: "imageUploadExtension",
|
|
8509
8514
|
addOptions() {
|
|
8510
8515
|
return {
|
|
@@ -8517,7 +8522,7 @@ const Vo = $e.create({
|
|
|
8517
8522
|
addCommands() {
|
|
8518
8523
|
return {
|
|
8519
8524
|
uploadImage: (r) => ({ tr: e }) => (e.setMeta("uploadImages", r.file), !0),
|
|
8520
|
-
getFileCache: (r) => () =>
|
|
8525
|
+
getFileCache: (r) => () => Xa(r)
|
|
8521
8526
|
};
|
|
8522
8527
|
},
|
|
8523
8528
|
addProseMirrorPlugins() {
|
|
@@ -8611,7 +8616,7 @@ const Qa = $e.create({
|
|
|
8611
8616
|
_: 1
|
|
8612
8617
|
}));
|
|
8613
8618
|
}
|
|
8614
|
-
}, tu = /* @__PURE__ */ H(eu, [["__scopeId", "data-v-274f74bf"]]), nu =
|
|
8619
|
+
}, tu = /* @__PURE__ */ H(eu, [["__scopeId", "data-v-274f74bf"]]), nu = Z.create({
|
|
8615
8620
|
name: "inlineAudio",
|
|
8616
8621
|
group: "inline",
|
|
8617
8622
|
inline: !0,
|
|
@@ -8637,7 +8642,7 @@ const Qa = $e.create({
|
|
|
8637
8642
|
];
|
|
8638
8643
|
},
|
|
8639
8644
|
renderHTML({ HTMLAttributes: r }) {
|
|
8640
|
-
return ["inlineAudio",
|
|
8645
|
+
return ["inlineAudio", Y(r)];
|
|
8641
8646
|
},
|
|
8642
8647
|
addCommands() {
|
|
8643
8648
|
return {
|
|
@@ -8664,7 +8669,7 @@ const Qa = $e.create({
|
|
|
8664
8669
|
_: 1
|
|
8665
8670
|
}));
|
|
8666
8671
|
}
|
|
8667
|
-
}, ru = /* @__PURE__ */ H(ou, [["__scopeId", "data-v-0adcd46c"]]), lu =
|
|
8672
|
+
}, ru = /* @__PURE__ */ H(ou, [["__scopeId", "data-v-0adcd46c"]]), lu = Z.create({
|
|
8668
8673
|
name: "inlineGallery",
|
|
8669
8674
|
group: "inline",
|
|
8670
8675
|
inline: !0,
|
|
@@ -8690,7 +8695,7 @@ const Qa = $e.create({
|
|
|
8690
8695
|
];
|
|
8691
8696
|
},
|
|
8692
8697
|
renderHTML({ HTMLAttributes: r }) {
|
|
8693
|
-
return ["inlineGallery",
|
|
8698
|
+
return ["inlineGallery", Y(r)];
|
|
8694
8699
|
},
|
|
8695
8700
|
addCommands() {
|
|
8696
8701
|
return {
|
|
@@ -8717,7 +8722,7 @@ const Qa = $e.create({
|
|
|
8717
8722
|
_: 1
|
|
8718
8723
|
}));
|
|
8719
8724
|
}
|
|
8720
|
-
}, iu = /* @__PURE__ */ H(su, [["__scopeId", "data-v-7a8c36eb"]]), au =
|
|
8725
|
+
}, iu = /* @__PURE__ */ H(su, [["__scopeId", "data-v-7a8c36eb"]]), au = Z.create({
|
|
8721
8726
|
name: "inlineRead",
|
|
8722
8727
|
group: "inline",
|
|
8723
8728
|
inline: !0,
|
|
@@ -8746,7 +8751,7 @@ const Qa = $e.create({
|
|
|
8746
8751
|
renderHTML({ HTMLAttributes: r }) {
|
|
8747
8752
|
return [
|
|
8748
8753
|
"inlineRead",
|
|
8749
|
-
|
|
8754
|
+
Y(r, {
|
|
8750
8755
|
"data-type": "inlineRead"
|
|
8751
8756
|
})
|
|
8752
8757
|
];
|
|
@@ -8776,7 +8781,7 @@ const Qa = $e.create({
|
|
|
8776
8781
|
_: 1
|
|
8777
8782
|
}));
|
|
8778
8783
|
}
|
|
8779
|
-
}, cu = /* @__PURE__ */ H(uu, [["__scopeId", "data-v-46c44557"]]), du =
|
|
8784
|
+
}, cu = /* @__PURE__ */ H(uu, [["__scopeId", "data-v-46c44557"]]), du = Z.create({
|
|
8780
8785
|
name: "inlineVideo",
|
|
8781
8786
|
group: "inline",
|
|
8782
8787
|
inline: !0,
|
|
@@ -8805,7 +8810,7 @@ const Qa = $e.create({
|
|
|
8805
8810
|
];
|
|
8806
8811
|
},
|
|
8807
8812
|
renderHTML({ HTMLAttributes: r }) {
|
|
8808
|
-
return ["inlineVideo",
|
|
8813
|
+
return ["inlineVideo", Y(r)];
|
|
8809
8814
|
},
|
|
8810
8815
|
addCommands() {
|
|
8811
8816
|
return {
|
|
@@ -8871,7 +8876,7 @@ const Qa = $e.create({
|
|
|
8871
8876
|
_: 1
|
|
8872
8877
|
}));
|
|
8873
8878
|
}
|
|
8874
|
-
}, fu = /* @__PURE__ */ H(mu, [["__scopeId", "data-v-ace23d22"]]), hu =
|
|
8879
|
+
}, fu = /* @__PURE__ */ H(mu, [["__scopeId", "data-v-ace23d22"]]), hu = Z.create({
|
|
8875
8880
|
name: "map",
|
|
8876
8881
|
group: "inline",
|
|
8877
8882
|
inline: !0,
|
|
@@ -8894,7 +8899,7 @@ const Qa = $e.create({
|
|
|
8894
8899
|
];
|
|
8895
8900
|
},
|
|
8896
8901
|
renderHTML({ HTMLAttributes: r }) {
|
|
8897
|
-
return ["map",
|
|
8902
|
+
return ["map", Y(r)];
|
|
8898
8903
|
},
|
|
8899
8904
|
addCommands() {
|
|
8900
8905
|
return {
|
|
@@ -8921,7 +8926,7 @@ const Qa = $e.create({
|
|
|
8921
8926
|
_: 1
|
|
8922
8927
|
}));
|
|
8923
8928
|
}
|
|
8924
|
-
}, vu = /* @__PURE__ */ H(bu, [["__scopeId", "data-v-679d2a07"]]), gu =
|
|
8929
|
+
}, vu = /* @__PURE__ */ H(bu, [["__scopeId", "data-v-679d2a07"]]), gu = Z.create({
|
|
8925
8930
|
name: "mindMap",
|
|
8926
8931
|
group: "block",
|
|
8927
8932
|
atom: !0,
|
|
@@ -8950,7 +8955,7 @@ const Qa = $e.create({
|
|
|
8950
8955
|
];
|
|
8951
8956
|
},
|
|
8952
8957
|
renderHTML({ HTMLAttributes: r }) {
|
|
8953
|
-
return ["mindMap",
|
|
8958
|
+
return ["mindMap", Y(r)];
|
|
8954
8959
|
},
|
|
8955
8960
|
addCommands() {
|
|
8956
8961
|
return {
|
|
@@ -8991,7 +8996,7 @@ const Qa = $e.create({
|
|
|
8991
8996
|
_: 1
|
|
8992
8997
|
}));
|
|
8993
8998
|
}
|
|
8994
|
-
}, ku =
|
|
8999
|
+
}, ku = Z.create({
|
|
8995
9000
|
name: "paper",
|
|
8996
9001
|
group: "block",
|
|
8997
9002
|
atom: !0,
|
|
@@ -9031,7 +9036,7 @@ const Qa = $e.create({
|
|
|
9031
9036
|
];
|
|
9032
9037
|
},
|
|
9033
9038
|
renderHTML({ HTMLAttributes: r }) {
|
|
9034
|
-
return ["paper",
|
|
9039
|
+
return ["paper", Y(r)];
|
|
9035
9040
|
},
|
|
9036
9041
|
addCommands() {
|
|
9037
9042
|
return {
|
|
@@ -9044,7 +9049,7 @@ const Qa = $e.create({
|
|
|
9044
9049
|
addNodeView() {
|
|
9045
9050
|
return ae(yu);
|
|
9046
9051
|
}
|
|
9047
|
-
}), Cu =
|
|
9052
|
+
}), Cu = Z.create({
|
|
9048
9053
|
name: "pinyin",
|
|
9049
9054
|
group: "inline",
|
|
9050
9055
|
inline: !0,
|
|
@@ -9052,7 +9057,7 @@ const Qa = $e.create({
|
|
|
9052
9057
|
selectable: !1,
|
|
9053
9058
|
draggable: !1,
|
|
9054
9059
|
renderHTML({ HTMLAttributes: r }) {
|
|
9055
|
-
return ["pinyin",
|
|
9060
|
+
return ["pinyin", Y(r, { class: "pinyin" }), 0];
|
|
9056
9061
|
},
|
|
9057
9062
|
parseHTML() {
|
|
9058
9063
|
return [
|
|
@@ -9061,7 +9066,7 @@ const Qa = $e.create({
|
|
|
9061
9066
|
}
|
|
9062
9067
|
];
|
|
9063
9068
|
}
|
|
9064
|
-
}), wu =
|
|
9069
|
+
}), wu = Z.create({
|
|
9065
9070
|
name: "pinyinWrapper",
|
|
9066
9071
|
group: "inline",
|
|
9067
9072
|
inline: !0,
|
|
@@ -9081,7 +9086,7 @@ const Qa = $e.create({
|
|
|
9081
9086
|
renderHTML({ HTMLAttributes: r }) {
|
|
9082
9087
|
return [
|
|
9083
9088
|
"pinyin-wrapper",
|
|
9084
|
-
|
|
9089
|
+
Y(r, {
|
|
9085
9090
|
class: "pinyin-wrapper",
|
|
9086
9091
|
"data-type": "pinyinWrapper"
|
|
9087
9092
|
}),
|
|
@@ -9110,7 +9115,7 @@ const Qa = $e.create({
|
|
|
9110
9115
|
_: 1
|
|
9111
9116
|
}));
|
|
9112
9117
|
}
|
|
9113
|
-
}, Au =
|
|
9118
|
+
}, Au = Z.create({
|
|
9114
9119
|
name: "read",
|
|
9115
9120
|
group: "block",
|
|
9116
9121
|
atom: !0,
|
|
@@ -9144,7 +9149,7 @@ const Qa = $e.create({
|
|
|
9144
9149
|
renderHTML({ HTMLAttributes: r }) {
|
|
9145
9150
|
return [
|
|
9146
9151
|
"read",
|
|
9147
|
-
|
|
9152
|
+
Y(r, {
|
|
9148
9153
|
"data-type": "read"
|
|
9149
9154
|
})
|
|
9150
9155
|
];
|
|
@@ -9174,7 +9179,7 @@ const Qa = $e.create({
|
|
|
9174
9179
|
_: 1
|
|
9175
9180
|
}));
|
|
9176
9181
|
}
|
|
9177
|
-
}, Su = /* @__PURE__ */ H(Tu, [["__scopeId", "data-v-f23b5306"]]), $u =
|
|
9182
|
+
}, Su = /* @__PURE__ */ H(Tu, [["__scopeId", "data-v-f23b5306"]]), $u = Z.create({
|
|
9178
9183
|
name: "recorder",
|
|
9179
9184
|
group: "block",
|
|
9180
9185
|
atom: !0,
|
|
@@ -9202,7 +9207,7 @@ const Qa = $e.create({
|
|
|
9202
9207
|
];
|
|
9203
9208
|
},
|
|
9204
9209
|
renderHTML({ HTMLAttributes: r }) {
|
|
9205
|
-
return ["recorder",
|
|
9210
|
+
return ["recorder", Y(r)];
|
|
9206
9211
|
},
|
|
9207
9212
|
addCommands() {
|
|
9208
9213
|
return {
|
|
@@ -9264,13 +9269,13 @@ const Qa = $e.create({
|
|
|
9264
9269
|
if (/bottom/.test(l.target.className)) {
|
|
9265
9270
|
let u = l.screenX;
|
|
9266
9271
|
const d = l.target.classList.contains("bottom-left") ? -1 : 1, p = (f) => {
|
|
9267
|
-
const b = s.clientWidth, h = f.screenX - u,
|
|
9268
|
-
|
|
9269
|
-
Math.min(T,
|
|
9272
|
+
const b = s.clientWidth, h = f.screenX - u, k = b + d * h, C = document.querySelector(".ProseMirror").clientWidth, x = 40, T = C - 32, w = Math.max(
|
|
9273
|
+
x,
|
|
9274
|
+
Math.min(T, k)
|
|
9270
9275
|
);
|
|
9271
|
-
s.style.width = `${
|
|
9272
|
-
const
|
|
9273
|
-
n.style.top = `${R.top}px`, n.style.left = `${R.left}px`, n.style.width = `${
|
|
9276
|
+
s.style.width = `${w}px`, a.attrs.width = w;
|
|
9277
|
+
const y = s.clientWidth, L = s.clientHeight, R = vt(s, e);
|
|
9278
|
+
n.style.top = `${R.top}px`, n.style.left = `${R.left}px`, n.style.width = `${y}px`, n.style.height = `${L}px`, u = f.screenX;
|
|
9274
9279
|
};
|
|
9275
9280
|
document.addEventListener("mousemove", p), document.addEventListener("mouseup", () => {
|
|
9276
9281
|
document.removeEventListener("mousemove", p);
|
|
@@ -9279,13 +9284,13 @@ const Qa = $e.create({
|
|
|
9279
9284
|
if (/top/.test(l.target.className)) {
|
|
9280
9285
|
let u = l.screenX;
|
|
9281
9286
|
const d = l.target.classList.contains("top-left") ? -1 : 1, p = (f) => {
|
|
9282
|
-
const b = s.clientWidth, h = f.screenX - u,
|
|
9283
|
-
|
|
9284
|
-
Math.min(T,
|
|
9287
|
+
const b = s.clientWidth, h = f.screenX - u, k = b + d * h, C = document.querySelector(".ProseMirror").clientWidth, x = 40, T = C - 32, w = Math.max(
|
|
9288
|
+
x,
|
|
9289
|
+
Math.min(T, k)
|
|
9285
9290
|
);
|
|
9286
|
-
s.style.width = `${
|
|
9287
|
-
const
|
|
9288
|
-
n.style.top = `${R.top}px`, n.style.left = `${R.left}px`, n.style.width = `${
|
|
9291
|
+
s.style.width = `${w}px`, a.attrs.width = w;
|
|
9292
|
+
const y = s.clientWidth, L = s.clientHeight, R = vt(s, e);
|
|
9293
|
+
n.style.top = `${R.top}px`, n.style.left = `${R.left}px`, n.style.width = `${y}px`, n.style.height = `${L}px`, u = f.screenX;
|
|
9289
9294
|
};
|
|
9290
9295
|
document.addEventListener("mousemove", p), document.addEventListener("mouseup", () => {
|
|
9291
9296
|
document.removeEventListener("mousemove", p);
|
|
@@ -9311,7 +9316,7 @@ const Qa = $e.create({
|
|
|
9311
9316
|
}
|
|
9312
9317
|
n.appendChild(t), r.resizeLayer = n, e.appendChild(n);
|
|
9313
9318
|
},
|
|
9314
|
-
onTransaction:
|
|
9319
|
+
onTransaction: Yr(function({ editor: r }) {
|
|
9315
9320
|
const e = r.resizeLayer;
|
|
9316
9321
|
if (e && e.style.display === "block") {
|
|
9317
9322
|
const n = this.storage.resizeElement, o = r.options.element, t = vt(n, o);
|
|
@@ -9486,13 +9491,13 @@ const Iu = new Je(
|
|
|
9486
9491
|
caseSensitive: f,
|
|
9487
9492
|
lastCaseSensitive: b,
|
|
9488
9493
|
resultIndex: h,
|
|
9489
|
-
lastResultIndex:
|
|
9494
|
+
lastResultIndex: k
|
|
9490
9495
|
} = r.storage.searchAndReplace;
|
|
9491
|
-
if (!a && p === d && b === f &&
|
|
9496
|
+
if (!a && p === d && b === f && k === h)
|
|
9492
9497
|
return u;
|
|
9493
9498
|
if (o(d), t(f), l(h), !d)
|
|
9494
9499
|
return r.storage.searchAndReplace.results = [], Oe.empty;
|
|
9495
|
-
const { decorationsToReturn:
|
|
9500
|
+
const { decorationsToReturn: C, results: x } = Lu(
|
|
9496
9501
|
s,
|
|
9497
9502
|
Bu(
|
|
9498
9503
|
d,
|
|
@@ -9502,7 +9507,7 @@ const Iu = new Je(
|
|
|
9502
9507
|
e,
|
|
9503
9508
|
h
|
|
9504
9509
|
);
|
|
9505
|
-
return r.storage.searchAndReplace.results =
|
|
9510
|
+
return r.storage.searchAndReplace.results = x, C;
|
|
9506
9511
|
}
|
|
9507
9512
|
},
|
|
9508
9513
|
props: {
|
|
@@ -9513,7 +9518,7 @@ const Iu = new Je(
|
|
|
9513
9518
|
})
|
|
9514
9519
|
];
|
|
9515
9520
|
}
|
|
9516
|
-
}), Hu =
|
|
9521
|
+
}), Hu = Z.create({
|
|
9517
9522
|
name: "section",
|
|
9518
9523
|
group: "block",
|
|
9519
9524
|
content: "block*",
|
|
@@ -9541,7 +9546,7 @@ const Iu = new Je(
|
|
|
9541
9546
|
__name: "svg-view",
|
|
9542
9547
|
props: se,
|
|
9543
9548
|
setup(r) {
|
|
9544
|
-
const e =
|
|
9549
|
+
const e = W(() => {
|
|
9545
9550
|
const { viewBox: n, width: o, height: t, content: l } = r.node.attrs;
|
|
9546
9551
|
return {
|
|
9547
9552
|
viewBox: n,
|
|
@@ -9558,7 +9563,7 @@ const Iu = new Je(
|
|
|
9558
9563
|
innerHTML: i(e).content
|
|
9559
9564
|
}, null, 8, ["viewBox", "width", "height", "innerHTML"]));
|
|
9560
9565
|
}
|
|
9561
|
-
}, Ou =
|
|
9566
|
+
}, Ou = Z.create({
|
|
9562
9567
|
name: "svg",
|
|
9563
9568
|
group: "block",
|
|
9564
9569
|
atom: !0,
|
|
@@ -9592,7 +9597,7 @@ const Iu = new Je(
|
|
|
9592
9597
|
];
|
|
9593
9598
|
},
|
|
9594
9599
|
renderHTML({ HTMLAttributes: r }) {
|
|
9595
|
-
return ["svg",
|
|
9600
|
+
return ["svg", Y(r)];
|
|
9596
9601
|
},
|
|
9597
9602
|
addNodeView() {
|
|
9598
9603
|
return ae(zu);
|
|
@@ -9601,13 +9606,13 @@ const Iu = new Je(
|
|
|
9601
9606
|
function Tn(r, e, n, o, t, l) {
|
|
9602
9607
|
let s = 0, a = !0, u = e.firstChild;
|
|
9603
9608
|
const d = r.firstChild, { tableBorder: p, widthAuto: f, tableAuto: b } = r.attrs;
|
|
9604
|
-
for (let h = 0,
|
|
9605
|
-
const { colspan:
|
|
9606
|
-
for (let T = 0; T <
|
|
9607
|
-
const
|
|
9608
|
-
s +=
|
|
9609
|
+
for (let h = 0, k = 0; h < d.childCount; h += 1) {
|
|
9610
|
+
const { colspan: C, colwidth: x } = d.child(h).attrs;
|
|
9611
|
+
for (let T = 0; T < C; T += 1, k += 1) {
|
|
9612
|
+
const w = t === k ? l : x && x[T], y = w && !f ? `${w}px` : "";
|
|
9613
|
+
s += w || o, w || (a = !1), u ? (u.style.width !== y && (u.style.width = y), u = u.nextSibling) : e.appendChild(
|
|
9609
9614
|
document.createElement("col")
|
|
9610
|
-
).style.width =
|
|
9615
|
+
).style.width = y;
|
|
9611
9616
|
}
|
|
9612
9617
|
}
|
|
9613
9618
|
for (; u; ) {
|
|
@@ -9616,9 +9621,9 @@ function Tn(r, e, n, o, t, l) {
|
|
|
9616
9621
|
}
|
|
9617
9622
|
if (a ? (n.style.width = `${s}px`, n.style.minWidth = "") : (n.style.width = "", n.style.minWidth = `${s}px`), b) {
|
|
9618
9623
|
n.style.width = "100%", n.style.minWidth = "", u = e.firstChild;
|
|
9619
|
-
for (let h = 0,
|
|
9620
|
-
const { colspan:
|
|
9621
|
-
for (let
|
|
9624
|
+
for (let h = 0, k = 0; h < d.childCount; h += 1) {
|
|
9625
|
+
const { colspan: C } = d.child(h).attrs;
|
|
9626
|
+
for (let x = 0; x < C; x += 1, k += 1) {
|
|
9622
9627
|
const T = "";
|
|
9623
9628
|
u ? (u.style.width !== T && (u.style.width = T), u = u.nextSibling) : e.appendChild(
|
|
9624
9629
|
document.createElement("col")
|
|
@@ -9644,30 +9649,30 @@ function Wu(r, e, n, o, t, l) {
|
|
|
9644
9649
|
const u = [], d = n.firstChild;
|
|
9645
9650
|
if (!d)
|
|
9646
9651
|
return {};
|
|
9647
|
-
for (let h = 0,
|
|
9648
|
-
const { colspan:
|
|
9649
|
-
for (let T = 0; T <
|
|
9650
|
-
const
|
|
9651
|
-
s +=
|
|
9652
|
+
for (let h = 0, k = 0; h < d.childCount; h += 1) {
|
|
9653
|
+
const { colspan: C, colwidth: x } = d.child(h).attrs;
|
|
9654
|
+
for (let T = 0; T < C; T += 1, k += 1) {
|
|
9655
|
+
const w = t === k ? l : x && x[T], y = w ? `${w}px` : "";
|
|
9656
|
+
s += w || o, w || (a = !1), u.push(["col", y ? { style: `width: ${y}` } : {}]);
|
|
9652
9657
|
}
|
|
9653
9658
|
}
|
|
9654
9659
|
if (r) {
|
|
9655
9660
|
let h = 0;
|
|
9656
|
-
for (let
|
|
9657
|
-
const { colspan:
|
|
9658
|
-
h +=
|
|
9661
|
+
for (let k = 0; k < d.childCount; k += 1) {
|
|
9662
|
+
const { colspan: C } = d.child(k).attrs;
|
|
9663
|
+
h += C;
|
|
9659
9664
|
}
|
|
9660
|
-
for (let
|
|
9661
|
-
u[
|
|
9665
|
+
for (let k = 0; k < h; k += 1)
|
|
9666
|
+
u[k][1].style = "";
|
|
9662
9667
|
}
|
|
9663
9668
|
if (e) {
|
|
9664
9669
|
let h = 0;
|
|
9665
|
-
for (let
|
|
9666
|
-
const { colspan:
|
|
9667
|
-
h +=
|
|
9670
|
+
for (let k = 0; k < d.childCount; k += 1) {
|
|
9671
|
+
const { colspan: C } = d.child(k).attrs;
|
|
9672
|
+
h += C;
|
|
9668
9673
|
}
|
|
9669
|
-
for (let
|
|
9670
|
-
u[
|
|
9674
|
+
for (let k = 0; k < h; k += 1)
|
|
9675
|
+
u[k][1].style = `width: ${Math.ceil(
|
|
9671
9676
|
1 / d.childCount * 100
|
|
9672
9677
|
)}%;`;
|
|
9673
9678
|
}
|
|
@@ -9677,7 +9682,7 @@ function Wu(r, e, n, o, t, l) {
|
|
|
9677
9682
|
function Sn(r, e) {
|
|
9678
9683
|
return r.createAndFill();
|
|
9679
9684
|
}
|
|
9680
|
-
function
|
|
9685
|
+
function Vu(r) {
|
|
9681
9686
|
if (r.cached.tableNodeTypes)
|
|
9682
9687
|
return r.cached.tableNodeTypes;
|
|
9683
9688
|
const e = {};
|
|
@@ -9686,8 +9691,8 @@ function Du(r) {
|
|
|
9686
9691
|
o.spec.tableRole && (e[o.spec.tableRole] = o);
|
|
9687
9692
|
}), r.cached.tableNodeTypes = e, e;
|
|
9688
9693
|
}
|
|
9689
|
-
function
|
|
9690
|
-
const l =
|
|
9694
|
+
function Du(r, e, n, o, t) {
|
|
9695
|
+
const l = Vu(r), s = [], a = [];
|
|
9691
9696
|
for (let d = 0; d < n; d += 1) {
|
|
9692
9697
|
const p = Sn(l.cell);
|
|
9693
9698
|
if (p && a.push(p), o) {
|
|
@@ -9723,7 +9728,7 @@ function zt({ editor: r }) {
|
|
|
9723
9728
|
["tableCell", "tableHeader"].includes(l.type.name) && (n += 1);
|
|
9724
9729
|
}), n === e.ranges.length ? (r.commands.deleteTable(), !0) : !1;
|
|
9725
9730
|
}
|
|
9726
|
-
const Jo =
|
|
9731
|
+
const Jo = Z.create({
|
|
9727
9732
|
name: "table",
|
|
9728
9733
|
// @ts-ignore
|
|
9729
9734
|
addOptions() {
|
|
@@ -9783,14 +9788,14 @@ const Jo = Y.create({
|
|
|
9783
9788
|
);
|
|
9784
9789
|
return (u = this.editor) != null && u.isEditable ? [
|
|
9785
9790
|
"table",
|
|
9786
|
-
|
|
9791
|
+
Y(this.options.HTMLAttributes, e, {
|
|
9787
9792
|
style: l && !n ? `width: ${l}` : `minWidth: ${s}`
|
|
9788
9793
|
}),
|
|
9789
9794
|
t,
|
|
9790
9795
|
["tbody", 0]
|
|
9791
9796
|
] : [
|
|
9792
9797
|
"div",
|
|
9793
|
-
|
|
9798
|
+
Y(
|
|
9794
9799
|
{},
|
|
9795
9800
|
{
|
|
9796
9801
|
class: "tableWrapper"
|
|
@@ -9798,7 +9803,7 @@ const Jo = Y.create({
|
|
|
9798
9803
|
),
|
|
9799
9804
|
[
|
|
9800
9805
|
"table",
|
|
9801
|
-
|
|
9806
|
+
Y(
|
|
9802
9807
|
this.options.HTMLAttributes,
|
|
9803
9808
|
e,
|
|
9804
9809
|
{
|
|
@@ -9837,7 +9842,7 @@ const Jo = Y.create({
|
|
|
9837
9842
|
});
|
|
9838
9843
|
},
|
|
9839
9844
|
insertTable: ({ rows: r = 3, cols: e = 3, withHeaderRow: n = !0 } = {}) => ({ tr: o, dispatch: t, editor: l }) => {
|
|
9840
|
-
const s =
|
|
9845
|
+
const s = Du(
|
|
9841
9846
|
l.schema,
|
|
9842
9847
|
r,
|
|
9843
9848
|
e,
|
|
@@ -9851,8 +9856,8 @@ const Jo = Y.create({
|
|
|
9851
9856
|
}
|
|
9852
9857
|
return !0;
|
|
9853
9858
|
},
|
|
9854
|
-
addColumnBefore: () => ({ state: r, dispatch: e }) =>
|
|
9855
|
-
addColumnAfter: () => ({ state: r, dispatch: e }) =>
|
|
9859
|
+
addColumnBefore: () => ({ state: r, dispatch: e }) => Zr(r, e),
|
|
9860
|
+
addColumnAfter: () => ({ state: r, dispatch: e }) => Xr(r, e),
|
|
9856
9861
|
deleteColumn: () => ({ state: r, dispatch: e }) => Qr(r, e),
|
|
9857
9862
|
addRowBefore: () => ({ state: r, dispatch: e }) => el(r, e),
|
|
9858
9863
|
addRowAfter: () => ({ state: r, dispatch: e }) => tl(r, e),
|
|
@@ -10050,7 +10055,7 @@ const Jo = Y.create({
|
|
|
10050
10055
|
_: 1
|
|
10051
10056
|
}));
|
|
10052
10057
|
}
|
|
10053
|
-
}, qu = /* @__PURE__ */ H(Ju, [["__scopeId", "data-v-845d85f9"]]), ju =
|
|
10058
|
+
}, qu = /* @__PURE__ */ H(Ju, [["__scopeId", "data-v-845d85f9"]]), ju = Z.create({
|
|
10054
10059
|
name: "video",
|
|
10055
10060
|
group: "block",
|
|
10056
10061
|
atom: !0,
|
|
@@ -10084,7 +10089,7 @@ const Jo = Y.create({
|
|
|
10084
10089
|
];
|
|
10085
10090
|
},
|
|
10086
10091
|
renderHTML({ HTMLAttributes: r }) {
|
|
10087
|
-
return ["video",
|
|
10092
|
+
return ["video", Y(r)];
|
|
10088
10093
|
},
|
|
10089
10094
|
addCommands() {
|
|
10090
10095
|
return {
|
|
@@ -10097,7 +10102,7 @@ const Jo = Y.create({
|
|
|
10097
10102
|
addNodeView() {
|
|
10098
10103
|
return ae(qu);
|
|
10099
10104
|
}
|
|
10100
|
-
}), { options: jo, container: Gu, tableOfContents: Ku } = M(), { document: $n } = jo.value, Mn = Pe("locale"),
|
|
10105
|
+
}), { options: jo, container: Gu, tableOfContents: Ku } = M(), { document: $n } = jo.value, Mn = Pe("locale"), Yu = [
|
|
10101
10106
|
Ho,
|
|
10102
10107
|
zo,
|
|
10103
10108
|
// GlobalDragHandle,
|
|
@@ -10128,7 +10133,7 @@ const Jo = Y.create({
|
|
|
10128
10133
|
types: ["heading", "paragraph"],
|
|
10129
10134
|
defaultAlignment: "left"
|
|
10130
10135
|
}),
|
|
10131
|
-
|
|
10136
|
+
Yi.configure({
|
|
10132
10137
|
HTMLAttributes: { class: "list-paddingleft-1" }
|
|
10133
10138
|
}),
|
|
10134
10139
|
_u.configure({
|
|
@@ -10138,12 +10143,12 @@ const Jo = Y.create({
|
|
|
10138
10143
|
Fr,
|
|
10139
10144
|
Kn,
|
|
10140
10145
|
ro,
|
|
10141
|
-
|
|
10146
|
+
Zn,
|
|
10142
10147
|
lo,
|
|
10143
10148
|
Oo,
|
|
10144
10149
|
Er,
|
|
10145
10150
|
Lr,
|
|
10146
|
-
|
|
10151
|
+
Yn.configure({
|
|
10147
10152
|
className: "smart-node-focused",
|
|
10148
10153
|
mode: "all"
|
|
10149
10154
|
}),
|
|
@@ -10163,7 +10168,7 @@ const Jo = Y.create({
|
|
|
10163
10168
|
Fu.configure({
|
|
10164
10169
|
searchResultClass: "smart-search-result"
|
|
10165
10170
|
}),
|
|
10166
|
-
|
|
10171
|
+
Xn.configure({
|
|
10167
10172
|
multicolor: !0
|
|
10168
10173
|
}),
|
|
10169
10174
|
Qn,
|
|
@@ -10186,11 +10191,11 @@ const Jo = Y.create({
|
|
|
10186
10191
|
allowBase64: !0,
|
|
10187
10192
|
inline: !0
|
|
10188
10193
|
}),
|
|
10189
|
-
|
|
10194
|
+
Do.configure({
|
|
10190
10195
|
acceptMimes: ["image/jpeg", "image/gif", "image/png", "image/jpg"],
|
|
10191
10196
|
upload: (r) => jo.value.imageUpload(r)
|
|
10192
10197
|
}),
|
|
10193
|
-
|
|
10198
|
+
Vo.configure({ inline: !0 }),
|
|
10194
10199
|
Po,
|
|
10195
10200
|
Ea,
|
|
10196
10201
|
_a,
|
|
@@ -10212,12 +10217,12 @@ const Jo = Y.create({
|
|
|
10212
10217
|
}),
|
|
10213
10218
|
Ki,
|
|
10214
10219
|
ua,
|
|
10215
|
-
|
|
10220
|
+
Dl,
|
|
10216
10221
|
Ji,
|
|
10217
10222
|
ju,
|
|
10218
10223
|
Sa,
|
|
10219
10224
|
Ba,
|
|
10220
|
-
|
|
10225
|
+
Vi,
|
|
10221
10226
|
na,
|
|
10222
10227
|
Qi,
|
|
10223
10228
|
lu,
|
|
@@ -10234,15 +10239,15 @@ const Jo = Y.create({
|
|
|
10234
10239
|
au,
|
|
10235
10240
|
Hu,
|
|
10236
10241
|
Ou
|
|
10237
|
-
],
|
|
10242
|
+
], Zu = {
|
|
10238
10243
|
__name: "index",
|
|
10239
10244
|
setup(r) {
|
|
10240
10245
|
var d, p, f, b;
|
|
10241
10246
|
const { options: e, editor: n, painter: o, setEditor: t, editorDestroyed: l } = M(), s = mr(async ({ editor: h }) => {
|
|
10242
10247
|
try {
|
|
10243
10248
|
await Mt.content.put({ content_id: e.value.editorKey, content: h.getHTML(), version: co().unix(), hashMd: po(JSON.stringify(h.getJSON())) });
|
|
10244
|
-
} catch (
|
|
10245
|
-
Be.message.error(
|
|
10249
|
+
} catch (k) {
|
|
10250
|
+
Be.message.error(k.message);
|
|
10246
10251
|
}
|
|
10247
10252
|
}, 2e3), a = new jn({
|
|
10248
10253
|
editable: !((d = e.value.document) != null && d.readOnly),
|
|
@@ -10254,22 +10259,22 @@ const Jo = Y.create({
|
|
|
10254
10259
|
},
|
|
10255
10260
|
...(b = e.value.document) == null ? void 0 : b.editorProps
|
|
10256
10261
|
},
|
|
10257
|
-
extensions: [...
|
|
10262
|
+
extensions: [...Yu],
|
|
10258
10263
|
onUpdate: s
|
|
10259
10264
|
});
|
|
10260
10265
|
t(a);
|
|
10261
10266
|
function u() {
|
|
10262
|
-
var
|
|
10263
|
-
if (document.querySelector("#katex-style") === null && !((
|
|
10264
|
-
const
|
|
10265
|
-
|
|
10267
|
+
var k, C;
|
|
10268
|
+
if (document.querySelector("#katex-style") === null && !((k = e.value.toolbar) != null && k.disableMenuItems.includes("math"))) {
|
|
10269
|
+
const x = document.createElement("link");
|
|
10270
|
+
x.href = "https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.16.9/katex.min.css", x.rel = "stylesheet", x.id = "katex-style", (C = document.querySelector("head")) == null || C.append(x);
|
|
10266
10271
|
}
|
|
10267
10272
|
}
|
|
10268
|
-
return Fe(() => u()),
|
|
10273
|
+
return Fe(() => u()), Ze(() => {
|
|
10269
10274
|
a.destroy();
|
|
10270
|
-
}), (h,
|
|
10275
|
+
}), (h, k) => {
|
|
10271
10276
|
var T;
|
|
10272
|
-
const
|
|
10277
|
+
const C = $i, x = ns;
|
|
10273
10278
|
return m(), $(J, null, [
|
|
10274
10279
|
v(i(Gn), {
|
|
10275
10280
|
editor: i(n),
|
|
@@ -10277,12 +10282,12 @@ const Jo = Y.create({
|
|
|
10277
10282
|
"format-painter": i(o).enabled
|
|
10278
10283
|
}])
|
|
10279
10284
|
}, null, 8, ["editor", "class"]),
|
|
10280
|
-
i(n) && !i(l) ? (m(), _(
|
|
10281
|
-
(T = i(e).document) != null && T.enableBlockMenu && i(n) && !i(l) ? (m(), _(
|
|
10285
|
+
i(n) && !i(l) ? (m(), _(C, { key: 0 })) : F("", !0),
|
|
10286
|
+
(T = i(e).document) != null && T.enableBlockMenu && i(n) && !i(l) ? (m(), _(x, { key: 1 })) : F("", !0)
|
|
10282
10287
|
], 64);
|
|
10283
10288
|
};
|
|
10284
10289
|
}
|
|
10285
|
-
},
|
|
10290
|
+
}, Xu = { class: "smart-toc-container" }, Qu = { class: "smart-toc-title" }, ec = { class: "smart-scrollbar smart-toc-content" }, tc = ["textContent"], nc = ["data-heading", "onClick"], oc = { class: "smart-toc-text" }, rc = {
|
|
10286
10291
|
__name: "toc",
|
|
10287
10292
|
emits: ["close"],
|
|
10288
10293
|
setup(r, { emit: e }) {
|
|
@@ -10305,7 +10310,7 @@ const Jo = Y.create({
|
|
|
10305
10310
|
const f = t.value.view.posAtDOM(d, 0), { tr: b } = t.value.view.state;
|
|
10306
10311
|
b.setSelection(new Gt(b.doc.resolve(f))), t.value.view.dispatch(b), t.value.view.focus();
|
|
10307
10312
|
}
|
|
10308
|
-
return (a, u) => (m(), $("div",
|
|
10313
|
+
return (a, u) => (m(), $("div", Xu, [
|
|
10309
10314
|
g("div", Qu, [
|
|
10310
10315
|
u[2] || (u[2] = g("i", { class: "icon-toc i-sed:toc" }, null, -1)),
|
|
10311
10316
|
te(" " + N(("t" in a ? a.t : i(c))("toc.title")) + " ", 1),
|
|
@@ -10338,13 +10343,13 @@ const Jo = Y.create({
|
|
|
10338
10343
|
}, lc = /* @__PURE__ */ H(rc, [["__scopeId", "data-v-9b4d9731"]]), sc = { class: "smart-page-container" }, ic = { class: "smart-zoomable-container smart-scrollbar" }, ac = {
|
|
10339
10344
|
__name: "page",
|
|
10340
10345
|
setup(r) {
|
|
10341
|
-
const { container: e, page: n } = M(), o =
|
|
10346
|
+
const { container: e, page: n } = M(), o = W(() => {
|
|
10342
10347
|
const { width: u, height: d } = n.value.size ?? { width: 0, height: 0 };
|
|
10343
10348
|
return {
|
|
10344
10349
|
width: n.value.orientation === "portrait" ? u : d,
|
|
10345
10350
|
height: n.value.orientation === "portrait" ? d : u
|
|
10346
10351
|
};
|
|
10347
|
-
}), t =
|
|
10352
|
+
}), t = W(() => `calc(${o.value.width}cm * ${n.value.zoomLevel ? n.value.zoomLevel / 100 : 1})`), l = B("");
|
|
10348
10353
|
function s() {
|
|
10349
10354
|
const u = document.querySelector(`${e} .smart-zoomable-container`);
|
|
10350
10355
|
if (!u) {
|
|
@@ -10354,7 +10359,7 @@ const Jo = Y.create({
|
|
|
10354
10359
|
l.value = `${u.clientHeight * (n.value.zoomLevel ?? 1) / 100 - 40}px`;
|
|
10355
10360
|
}
|
|
10356
10361
|
const a = B(null);
|
|
10357
|
-
return
|
|
10362
|
+
return pe(
|
|
10358
10363
|
() => {
|
|
10359
10364
|
var u;
|
|
10360
10365
|
return (u = a.value) == null ? void 0 : u.isFullscreen;
|
|
@@ -10367,11 +10372,11 @@ const Jo = Y.create({
|
|
|
10367
10372
|
), Fe(() => {
|
|
10368
10373
|
a.value = Pn(document.querySelector(e)), s();
|
|
10369
10374
|
}), (u, d) => {
|
|
10370
|
-
const p = lc, f =
|
|
10375
|
+
const p = lc, f = Zu, b = nr, h = Yl;
|
|
10371
10376
|
return m(), $("div", sc, [
|
|
10372
10377
|
i(n).showToc ? (m(), _(p, {
|
|
10373
10378
|
key: 0,
|
|
10374
|
-
onClose: d[0] || (d[0] = (
|
|
10379
|
+
onClose: d[0] || (d[0] = (k) => i(n).showToc = !1)
|
|
10375
10380
|
})) : F("", !0),
|
|
10376
10381
|
g("div", ic, [
|
|
10377
10382
|
g("div", {
|
|
@@ -10394,9 +10399,9 @@ const Jo = Y.create({
|
|
|
10394
10399
|
i(n).showTool ? (m(), $("div", {
|
|
10395
10400
|
key: 1,
|
|
10396
10401
|
class: "smart-tool-container",
|
|
10397
|
-
onClose: d[1] || (d[1] = (
|
|
10402
|
+
onClose: d[1] || (d[1] = (k) => i(n).showTool = !1)
|
|
10398
10403
|
}, [
|
|
10399
|
-
|
|
10404
|
+
de(u.$slots, "editor_tool", {}, void 0, !0)
|
|
10400
10405
|
], 32)) : F("", !0),
|
|
10401
10406
|
v(b, {
|
|
10402
10407
|
to: `${i(e)} .smart-zoomable-container`,
|
|
@@ -10409,7 +10414,7 @@ const Jo = Y.create({
|
|
|
10409
10414
|
]);
|
|
10410
10415
|
};
|
|
10411
10416
|
}
|
|
10412
|
-
}, uc = /* @__PURE__ */ H(ac, [["__scopeId", "data-v-
|
|
10417
|
+
}, uc = /* @__PURE__ */ H(ac, [["__scopeId", "data-v-9b5dc97b"]]), cc = {
|
|
10413
10418
|
__name: "scrollable",
|
|
10414
10419
|
setup(r, { expose: e }) {
|
|
10415
10420
|
const n = B(null), o = B(null), t = B(!0), l = B(!0);
|
|
@@ -10422,7 +10427,7 @@ const Jo = Y.create({
|
|
|
10422
10427
|
s();
|
|
10423
10428
|
});
|
|
10424
10429
|
const { width: d } = Jt();
|
|
10425
|
-
|
|
10430
|
+
pe(
|
|
10426
10431
|
d,
|
|
10427
10432
|
() => {
|
|
10428
10433
|
s();
|
|
@@ -10452,7 +10457,7 @@ const Jo = Y.create({
|
|
|
10452
10457
|
ref: o,
|
|
10453
10458
|
class: K(["smart-scrollable-content", (!i(t) || !i(l)) && "smart-scrollable-content-center"])
|
|
10454
10459
|
}, [
|
|
10455
|
-
|
|
10460
|
+
de(f.$slots, "default", {}, void 0, !0)
|
|
10456
10461
|
], 2),
|
|
10457
10462
|
i(l) ? F("", !0) : (m(), $("div", {
|
|
10458
10463
|
key: 1,
|
|
@@ -10579,10 +10584,10 @@ const Jo = Y.create({
|
|
|
10579
10584
|
g("span", null, N(s.$attrs.header), 1)
|
|
10580
10585
|
]),
|
|
10581
10586
|
action: A(() => [
|
|
10582
|
-
|
|
10587
|
+
de(s.$slots, "action")
|
|
10583
10588
|
]),
|
|
10584
10589
|
default: A(() => [
|
|
10585
|
-
|
|
10590
|
+
de(s.$slots, "default")
|
|
10586
10591
|
]),
|
|
10587
10592
|
_: 3
|
|
10588
10593
|
}, 16, ["show", "to"]);
|
|
@@ -10604,7 +10609,7 @@ const Jo = Y.create({
|
|
|
10604
10609
|
}
|
|
10605
10610
|
l.value.text = !1, l.value.href = !1, (a = e.value) == null || a.commands.setLink({ href: t.value, target: "_blank" }), (u = e.value) == null || u.chain().focus().insertContent(o.value).run(), n.value = !1;
|
|
10606
10611
|
}
|
|
10607
|
-
return
|
|
10612
|
+
return pe(
|
|
10608
10613
|
() => n.value,
|
|
10609
10614
|
(a) => {
|
|
10610
10615
|
var u;
|
|
@@ -10619,13 +10624,13 @@ const Jo = Y.create({
|
|
|
10619
10624
|
ico: "i-sed:link",
|
|
10620
10625
|
text: ("t" in a ? a.t : i(c))("insert.link.text"),
|
|
10621
10626
|
"hide-text": "",
|
|
10622
|
-
onMenuClick: u[0] || (u[0] = (
|
|
10627
|
+
onMenuClick: u[0] || (u[0] = (k) => n.value = !0)
|
|
10623
10628
|
}, null, 8, ["text"]),
|
|
10624
10629
|
v(h, {
|
|
10625
10630
|
visible: i(n),
|
|
10626
10631
|
header: ("t" in a ? a.t : i(c))("insert.link.title"),
|
|
10627
10632
|
width: "420px",
|
|
10628
|
-
onClose: u[4] || (u[4] = (
|
|
10633
|
+
onClose: u[4] || (u[4] = (k) => n.value = !1)
|
|
10629
10634
|
}, {
|
|
10630
10635
|
default: A(() => [
|
|
10631
10636
|
g("div", vc, [
|
|
@@ -10637,7 +10642,7 @@ const Jo = Y.create({
|
|
|
10637
10642
|
default: A(() => [
|
|
10638
10643
|
v(p, {
|
|
10639
10644
|
value: i(o),
|
|
10640
|
-
"onUpdate:value": u[1] || (u[1] = (
|
|
10645
|
+
"onUpdate:value": u[1] || (u[1] = (k) => Ge(o) ? o.value = k : null),
|
|
10641
10646
|
valueModifiers: { trim: !0 },
|
|
10642
10647
|
placeholder: ("t" in a ? a.t : i(c))("insert.link.hrefTextTip")
|
|
10643
10648
|
}, null, 8, ["value", "placeholder"])
|
|
@@ -10653,7 +10658,7 @@ const Jo = Y.create({
|
|
|
10653
10658
|
default: A(() => [
|
|
10654
10659
|
v(p, {
|
|
10655
10660
|
value: i(t),
|
|
10656
|
-
"onUpdate:value": u[2] || (u[2] = (
|
|
10661
|
+
"onUpdate:value": u[2] || (u[2] = (k) => Ge(t) ? t.value = k : null),
|
|
10657
10662
|
placeholder: ("t" in a ? a.t : i(c))("insert.link.hrefTip")
|
|
10658
10663
|
}, null, 8, ["value", "placeholder"])
|
|
10659
10664
|
]),
|
|
@@ -10663,7 +10668,7 @@ const Jo = Y.create({
|
|
|
10663
10668
|
g("div", gc, [
|
|
10664
10669
|
v(b, {
|
|
10665
10670
|
quaternary: "",
|
|
10666
|
-
onClick: u[3] || (u[3] = (
|
|
10671
|
+
onClick: u[3] || (u[3] = (k) => n.value = !1)
|
|
10667
10672
|
}, {
|
|
10668
10673
|
default: A(() => [
|
|
10669
10674
|
te(N(("t" in a ? a.t : i(c))("insert.link.cancel")), 1)
|
|
@@ -10705,8 +10710,8 @@ const Jo = Y.create({
|
|
|
10705
10710
|
p === 0 || p > 1e3 || f === 0 || f > 30 || ((b = o.value) == null || b.chain().focus().insertTable({ rows: p, cols: f, withHeaderRow: !1 }).run(), e.value = !1);
|
|
10706
10711
|
}
|
|
10707
10712
|
return (p, f) => {
|
|
10708
|
-
const b = Rn, h = Se,
|
|
10709
|
-
return m(), _(
|
|
10713
|
+
const b = Rn, h = Se, k = E;
|
|
10714
|
+
return m(), _(k, {
|
|
10710
10715
|
ico: "i-sed:table",
|
|
10711
10716
|
text: ("t" in p ? p.t : i(c))("table.insert.text"),
|
|
10712
10717
|
tooltip: ("t" in p ? p.t : i(c))("table.insert.tip"),
|
|
@@ -10720,14 +10725,14 @@ const Jo = Y.create({
|
|
|
10720
10725
|
class: "smart-table-grid",
|
|
10721
10726
|
onMouseleave: u
|
|
10722
10727
|
}, [
|
|
10723
|
-
(m(!0), $(J, null, ge(i(t), (
|
|
10724
|
-
key:
|
|
10728
|
+
(m(!0), $(J, null, ge(i(t), (C, x) => (m(), $("div", {
|
|
10729
|
+
key: x,
|
|
10725
10730
|
class: "row"
|
|
10726
10731
|
}, [
|
|
10727
|
-
(m(!0), $(J, null, ge(
|
|
10728
|
-
key:
|
|
10729
|
-
class: K(["cell", { selected: s(
|
|
10730
|
-
onMouseover: (
|
|
10732
|
+
(m(!0), $(J, null, ge(C, (T, w) => (m(), $("div", {
|
|
10733
|
+
key: w,
|
|
10734
|
+
class: K(["cell", { selected: s(x, w) }]),
|
|
10735
|
+
onMouseover: (y) => a(x, w),
|
|
10731
10736
|
onClick: d
|
|
10732
10737
|
}, null, 42, kc))), 128))
|
|
10733
10738
|
]))), 128))
|
|
@@ -10739,7 +10744,7 @@ const Jo = Y.create({
|
|
|
10739
10744
|
}, null, 8, wc),
|
|
10740
10745
|
v(b, {
|
|
10741
10746
|
value: i(l).rows,
|
|
10742
|
-
"onUpdate:value": f[0] || (f[0] = (
|
|
10747
|
+
"onUpdate:value": f[0] || (f[0] = (C) => i(l).rows = C),
|
|
10743
10748
|
size: "small",
|
|
10744
10749
|
max: 1e3,
|
|
10745
10750
|
min: 0
|
|
@@ -10751,7 +10756,7 @@ const Jo = Y.create({
|
|
|
10751
10756
|
}, 8, ["value"]),
|
|
10752
10757
|
v(b, {
|
|
10753
10758
|
value: i(l).cols,
|
|
10754
|
-
"onUpdate:value": f[1] || (f[1] = (
|
|
10759
|
+
"onUpdate:value": f[1] || (f[1] = (C) => i(l).cols = C),
|
|
10755
10760
|
size: "small",
|
|
10756
10761
|
max: 30,
|
|
10757
10762
|
min: 0
|
|
@@ -10805,7 +10810,7 @@ const Jo = Y.create({
|
|
|
10805
10810
|
}, Sc = {
|
|
10806
10811
|
__name: "ordered-list",
|
|
10807
10812
|
setup(r) {
|
|
10808
|
-
const { editor: e } = M(), n =
|
|
10813
|
+
const { editor: e } = M(), n = W(() => [
|
|
10809
10814
|
{ label: c("list.ordered.decimal"), key: "decimal", icon: o("ordered-list-decimal") },
|
|
10810
10815
|
{ label: c("list.ordered.lowerRoman"), key: "lower-roman", icon: o("ordered-list-lower-roman") },
|
|
10811
10816
|
{ label: c("list.ordered.upperRoman"), key: "upper-roman", icon: o("ordered-list-upper-roman") },
|
|
@@ -10821,19 +10826,19 @@ const Jo = Y.create({
|
|
|
10821
10826
|
return;
|
|
10822
10827
|
const s = (a = e.value) == null ? void 0 : a.chain().focus();
|
|
10823
10828
|
(u = e.value) != null && u.isActive("orderedList") ? e.value.getAttributes("orderedList").listStyleType === l ? s == null || s.toggleOrderedList().run() : (d = e.value) == null || d.view.state.doc.descendants((b, h) => {
|
|
10824
|
-
var
|
|
10829
|
+
var k, C;
|
|
10825
10830
|
if (b.type.name === "orderedList") {
|
|
10826
|
-
const { state:
|
|
10827
|
-
if (b !==
|
|
10831
|
+
const { state: x } = e.value, { selection: T } = x, { $from: w } = T;
|
|
10832
|
+
if (b !== w.node(w.depth - 2))
|
|
10828
10833
|
return;
|
|
10829
|
-
const
|
|
10834
|
+
const y = (k = e.value) == null ? void 0 : k.view.state.tr.setNodeMarkup(
|
|
10830
10835
|
h,
|
|
10831
10836
|
void 0,
|
|
10832
10837
|
{
|
|
10833
10838
|
listStyleType: l
|
|
10834
10839
|
}
|
|
10835
10840
|
);
|
|
10836
|
-
(
|
|
10841
|
+
(C = e.value) == null || C.view.dispatch(y);
|
|
10837
10842
|
}
|
|
10838
10843
|
}) : (f = (p = s == null ? void 0 : s.toggleOrderedList()) == null ? void 0 : p.updateAttributes("orderedList", { listStyleType: l })) == null || f.run();
|
|
10839
10844
|
}
|
|
@@ -10853,7 +10858,7 @@ const Jo = Y.create({
|
|
|
10853
10858
|
}, $c = {
|
|
10854
10859
|
__name: "bullet-list",
|
|
10855
10860
|
setup(r) {
|
|
10856
|
-
const { editor: e } = M(), n =
|
|
10861
|
+
const { editor: e } = M(), n = W(() => [
|
|
10857
10862
|
{ label: c("list.bullet.disc"), key: "disc", icon: o("bullet-list-disc") },
|
|
10858
10863
|
{ label: c("list.bullet.circle"), key: "circle", icon: o("bullet-list-circle") },
|
|
10859
10864
|
{ label: c("list.bullet.square"), key: "square", icon: o("bullet-list-square") }
|
|
@@ -10884,12 +10889,12 @@ const Jo = Y.create({
|
|
|
10884
10889
|
}, Mc = {
|
|
10885
10890
|
__name: "line-height",
|
|
10886
10891
|
setup(r) {
|
|
10887
|
-
const { options: e, editor: n } = M(), o =
|
|
10892
|
+
const { options: e, editor: n } = M(), o = W(() => {
|
|
10888
10893
|
var l;
|
|
10889
10894
|
return (l = e.value.dicts) == null ? void 0 : l.lineHeights.map((s) => {
|
|
10890
10895
|
var a;
|
|
10891
10896
|
return {
|
|
10892
|
-
label: s.default ?
|
|
10897
|
+
label: s.default ? Ye(s.label) + c("base.lineHeight.default") : Ye(s.label),
|
|
10893
10898
|
key: s.value,
|
|
10894
10899
|
props: {
|
|
10895
10900
|
class: {
|
|
@@ -11041,7 +11046,7 @@ const Jo = Y.create({
|
|
|
11041
11046
|
}, Fc = { class: "smart-text-align-group" }, Hc = {
|
|
11042
11047
|
__name: "align-dropdown",
|
|
11043
11048
|
setup(r) {
|
|
11044
|
-
const { popupVisible: e, togglePopup: n } = ye(), { editor: o } = M(), t =
|
|
11049
|
+
const { popupVisible: e, togglePopup: n } = ye(), { editor: o } = M(), t = W(() => !o.value || o.value.isActive({ textAlign: "justify" }) ? "left" : o.value.isActive({ textAlign: "center" }) ? "center" : o.value.isActive({ textAlign: "right" }) ? "right" : o.value.isActive({ textAlign: "justify" }) ? "justify" : "left");
|
|
11045
11050
|
return (l, s) => {
|
|
11046
11051
|
var b;
|
|
11047
11052
|
const a = Ic, u = Ec, d = Rc, p = Nc, f = E;
|
|
@@ -11145,7 +11150,7 @@ const Jo = Y.create({
|
|
|
11145
11150
|
{ label: "36", value: "36px", order: 10 },
|
|
11146
11151
|
{ label: "40", value: "40px", order: 11 },
|
|
11147
11152
|
{ label: "48", value: "48px", order: 12 }
|
|
11148
|
-
], o =
|
|
11153
|
+
], o = W(() => {
|
|
11149
11154
|
var s, a, u, d;
|
|
11150
11155
|
let l = (s = e.value) == null ? void 0 : s.getAttributes("textStyle").fontSize;
|
|
11151
11156
|
if (!l) {
|
|
@@ -11180,106 +11185,87 @@ const Jo = Y.create({
|
|
|
11180
11185
|
}), null, 16, ["text", "select-value", "placeholder"]);
|
|
11181
11186
|
};
|
|
11182
11187
|
}
|
|
11183
|
-
},
|
|
11188
|
+
}, Vc = {
|
|
11184
11189
|
__name: "font-family",
|
|
11185
11190
|
setup(r) {
|
|
11186
|
-
const { options: e, editor: n } = M(), o = Pe("recent")
|
|
11187
|
-
function
|
|
11188
|
-
if (!
|
|
11191
|
+
const { options: e, editor: n } = M(), o = Pe("recent");
|
|
11192
|
+
function t(u) {
|
|
11193
|
+
if (!u || u === "default")
|
|
11189
11194
|
return !0;
|
|
11190
|
-
const
|
|
11191
|
-
|
|
11192
|
-
const
|
|
11193
|
-
if (!
|
|
11195
|
+
const d = "Cambria", p = "text", f = 100, b = 100, h = document.createElement("canvas"), k = h.getContext("2d", { willReadFrequently: !0 });
|
|
11196
|
+
h.width = f, h.height = b, k && (k.textAlign = "center", k.fillStyle = "black", k.textBaseline = "middle");
|
|
11197
|
+
const C = (x) => {
|
|
11198
|
+
if (!k)
|
|
11194
11199
|
return [];
|
|
11195
|
-
|
|
11196
|
-
const { data:
|
|
11197
|
-
return Array.from(
|
|
11200
|
+
k.clearRect(0, 0, f, b), k.font = `${b / 4}px ${x}, ${d}`, k.fillText(p, f / 2, b / 2);
|
|
11201
|
+
const { data: T } = k.getImageData(0, 0, f, b);
|
|
11202
|
+
return Array.from(T).filter((w) => w !== 0);
|
|
11198
11203
|
};
|
|
11199
|
-
return
|
|
11200
|
-
}
|
|
11201
|
-
const
|
|
11202
|
-
var
|
|
11203
|
-
const
|
|
11204
|
-
...
|
|
11205
|
-
disabled: !
|
|
11206
|
-
})),
|
|
11204
|
+
return C(d).join("") !== C(u).join("");
|
|
11205
|
+
}
|
|
11206
|
+
const l = W(() => {
|
|
11207
|
+
var f;
|
|
11208
|
+
const u = (b) => b.map((h) => ({
|
|
11209
|
+
...h,
|
|
11210
|
+
disabled: !t(h.value)
|
|
11211
|
+
})), d = [
|
|
11207
11212
|
{
|
|
11208
11213
|
type: "group",
|
|
11209
11214
|
key: "all",
|
|
11210
11215
|
label: c("base.fontFamily.all"),
|
|
11211
|
-
children:
|
|
11216
|
+
children: u((f = e.value.dicts) == null ? void 0 : f.fonts) ?? []
|
|
11212
11217
|
}
|
|
11213
|
-
],
|
|
11214
|
-
(
|
|
11215
|
-
var
|
|
11216
|
-
return ((
|
|
11217
|
-
({ value:
|
|
11218
|
+
], p = (b) => b.map(
|
|
11219
|
+
(h) => {
|
|
11220
|
+
var k;
|
|
11221
|
+
return ((k = e.value.dicts) == null ? void 0 : k.fonts.find(
|
|
11222
|
+
({ value: C }) => C === h
|
|
11218
11223
|
)) ?? {
|
|
11219
|
-
label:
|
|
11220
|
-
item:
|
|
11224
|
+
label: h,
|
|
11225
|
+
item: h
|
|
11221
11226
|
};
|
|
11222
11227
|
}
|
|
11223
11228
|
);
|
|
11224
|
-
return o.value.fonts.length > 0 &&
|
|
11229
|
+
return o.value.fonts.length > 0 && d.unshift({
|
|
11225
11230
|
type: "group",
|
|
11226
11231
|
key: "recent",
|
|
11227
11232
|
label: c("base.fontFamily.recent"),
|
|
11228
|
-
children: p(
|
|
11229
|
-
}),
|
|
11230
|
-
type: "group",
|
|
11231
|
-
key: "used",
|
|
11232
|
-
label: c("base.fontFamily.used"),
|
|
11233
|
-
children: p(b(t.value))
|
|
11234
|
-
}), f;
|
|
11233
|
+
children: u(p(o.value.fonts))
|
|
11234
|
+
}), d;
|
|
11235
11235
|
});
|
|
11236
|
-
function
|
|
11237
|
-
return
|
|
11238
|
-
_e("span", { style: { fontFamily:
|
|
11239
|
-
!
|
|
11236
|
+
function s(u) {
|
|
11237
|
+
return u.type === "group" && u.value === "default" ? `${u.label}` : _e("div", { class: "smart-font-family-item" }, [
|
|
11238
|
+
_e("span", { style: { fontFamily: u.value === "default" ? "" : u.value } }, Ye(u.label)),
|
|
11239
|
+
!t(u.value ?? "") && _e("span", { class: "smart-font-family-unsupport", title: c("base.fontFamily.unsupport") }, "!")
|
|
11240
11240
|
]);
|
|
11241
11241
|
}
|
|
11242
|
-
function u
|
|
11243
|
-
var
|
|
11244
|
-
|
|
11245
|
-
|
|
11246
|
-
|
|
11247
|
-
const C = h.replace('"fontFamily":"', "").replace('"', "");
|
|
11248
|
-
t.value.includes(C) || t.value.push(C);
|
|
11249
|
-
}
|
|
11250
|
-
}
|
|
11251
|
-
function d(p) {
|
|
11252
|
-
var f, b;
|
|
11253
|
-
p && p !== "default" ? (o.value.fonts.forEach((h, C) => {
|
|
11254
|
-
h === p && o.value.fonts.splice(C, 1);
|
|
11255
|
-
}), o.value.fonts.unshift(p), o.value.fonts.length > 10 && o.value.fonts.splice(10, 1), (f = n.value) == null || f.chain().focus().setFontFamily(p).run()) : (b = n.value) == null || b.chain().focus().unsetFontFamily().run(), u();
|
|
11242
|
+
function a(u) {
|
|
11243
|
+
var d, p;
|
|
11244
|
+
u && u !== "default" ? (o.value.fonts.forEach((f, b) => {
|
|
11245
|
+
f === u && o.value.fonts.splice(b, 1);
|
|
11246
|
+
}), o.value.fonts.unshift(u), o.value.fonts.length > 10 && o.value.fonts.splice(10, 1), (d = n.value) == null || d.chain().focus().setFontFamily(u).run()) : (p = n.value) == null || p.chain().focus().unsetFontFamily().run();
|
|
11256
11247
|
}
|
|
11257
|
-
return
|
|
11258
|
-
|
|
11259
|
-
|
|
11260
|
-
|
|
11261
|
-
|
|
11262
|
-
), (p, f) => {
|
|
11263
|
-
var h;
|
|
11264
|
-
const b = E;
|
|
11265
|
-
return m(), _(b, ve({
|
|
11266
|
-
text: ("t" in p ? p.t : i(c))("base.fontFamily.text"),
|
|
11248
|
+
return (u, d) => {
|
|
11249
|
+
var f;
|
|
11250
|
+
const p = E;
|
|
11251
|
+
return m(), _(p, ve({
|
|
11252
|
+
text: ("t" in u ? u.t : i(c))("base.fontFamily.text"),
|
|
11267
11253
|
"menu-type": "select",
|
|
11268
11254
|
"hide-text": "",
|
|
11269
|
-
"select-options": i(
|
|
11270
|
-
"select-value": ((
|
|
11271
|
-
},
|
|
11272
|
-
placeholder: ("t" in
|
|
11273
|
-
"render-label":
|
|
11255
|
+
"select-options": i(l),
|
|
11256
|
+
"select-value": ((f = i(n)) == null ? void 0 : f.getAttributes("textStyle").fontFamily) || "default"
|
|
11257
|
+
}, u.$attrs, {
|
|
11258
|
+
placeholder: ("t" in u ? u.t : i(c))("base.fontFamily.text"),
|
|
11259
|
+
"render-label": s,
|
|
11274
11260
|
"consistent-menu-width": !1,
|
|
11275
|
-
onMenuClick:
|
|
11261
|
+
onMenuClick: a
|
|
11276
11262
|
}), null, 16, ["text", "select-options", "select-value", "placeholder"]);
|
|
11277
11263
|
};
|
|
11278
11264
|
}
|
|
11279
|
-
},
|
|
11265
|
+
}, Dc = {
|
|
11280
11266
|
__name: "heading",
|
|
11281
11267
|
setup(r) {
|
|
11282
|
-
const { editor: e } = M(), n =
|
|
11268
|
+
const { editor: e } = M(), n = W(() => {
|
|
11283
11269
|
const l = [
|
|
11284
11270
|
{ label: c("base.heading.paragraph"), desc: "text", value: "paragraph" }
|
|
11285
11271
|
];
|
|
@@ -11292,7 +11278,7 @@ const Jo = Y.create({
|
|
|
11292
11278
|
});
|
|
11293
11279
|
}
|
|
11294
11280
|
return l;
|
|
11295
|
-
}), o =
|
|
11281
|
+
}), o = W(() => {
|
|
11296
11282
|
var s;
|
|
11297
11283
|
const l = (a) => {
|
|
11298
11284
|
var u;
|
|
@@ -11338,7 +11324,7 @@ const Jo = Y.create({
|
|
|
11338
11324
|
}, null, 8, ["text", "placeholder", "select-value", "select-options", "disabled"]);
|
|
11339
11325
|
};
|
|
11340
11326
|
}
|
|
11341
|
-
}, Uc = /* @__PURE__ */ H(
|
|
11327
|
+
}, Uc = /* @__PURE__ */ H(Dc, [["__scopeId", "data-v-346e4792"]]), Jc = {
|
|
11342
11328
|
__name: "clear-format",
|
|
11343
11329
|
setup(r) {
|
|
11344
11330
|
const { editor: e } = M();
|
|
@@ -11379,7 +11365,7 @@ const Jo = Y.create({
|
|
|
11379
11365
|
}, null, 8, ["text", "tooltip", "menu-active", "disabled"]);
|
|
11380
11366
|
};
|
|
11381
11367
|
}
|
|
11382
|
-
}, jc = { class: "smart-classic-menu" }, Gc = { class: "smart-virtual-group" }, Kc = { class: "smart-virtual-group" },
|
|
11368
|
+
}, jc = { class: "smart-classic-menu" }, Gc = { class: "smart-virtual-group" }, Kc = { class: "smart-virtual-group" }, Yc = { class: "smart-virtual-group" }, Zc = { class: "smart-virtual-group" }, Xc = { class: "smart-virtual-group" }, Qc = { class: "smart-virtual-group" }, ed = { class: "smart-virtual-group" }, td = { class: "smart-virtual-group" }, nd = {
|
|
11383
11369
|
__name: "classic",
|
|
11384
11370
|
setup(r) {
|
|
11385
11371
|
const e = B(null), n = B(!1), { editor: o, options: t, toolbarHover: l } = M(), s = B(!1), a = B(""), u = B("");
|
|
@@ -11398,7 +11384,7 @@ const Jo = Y.create({
|
|
|
11398
11384
|
function f(h) {
|
|
11399
11385
|
l.value = h;
|
|
11400
11386
|
}
|
|
11401
|
-
const b =
|
|
11387
|
+
const b = W(() => [
|
|
11402
11388
|
{
|
|
11403
11389
|
label: c("moreBar.quote"),
|
|
11404
11390
|
key: "quote",
|
|
@@ -11416,8 +11402,8 @@ const Jo = Y.create({
|
|
|
11416
11402
|
icon: d("i-sed:split-block"),
|
|
11417
11403
|
props: {
|
|
11418
11404
|
onClick: () => {
|
|
11419
|
-
var h,
|
|
11420
|
-
(h = o.value) == null || h.chain().focus().enter().run(), (
|
|
11405
|
+
var h, k;
|
|
11406
|
+
(h = o.value) == null || h.chain().focus().enter().run(), (k = o.value) == null || k.chain().focus().setHorizontalRule().run();
|
|
11421
11407
|
}
|
|
11422
11408
|
}
|
|
11423
11409
|
},
|
|
@@ -11645,8 +11631,8 @@ const Jo = Y.create({
|
|
|
11645
11631
|
icon: d("i-sed:code-block"),
|
|
11646
11632
|
props: {
|
|
11647
11633
|
onClick: () => {
|
|
11648
|
-
var h,
|
|
11649
|
-
(h = o.value) == null || h.chain().focus().setCodeBlock().run(), (
|
|
11634
|
+
var h, k;
|
|
11635
|
+
(h = o.value) == null || h.chain().focus().setCodeBlock().run(), (k = o.value) == null || k.chain().focus().enter().run();
|
|
11650
11636
|
}
|
|
11651
11637
|
}
|
|
11652
11638
|
},
|
|
@@ -11770,9 +11756,9 @@ const Jo = Y.create({
|
|
|
11770
11756
|
show: !!t.value.render.paper
|
|
11771
11757
|
}
|
|
11772
11758
|
]);
|
|
11773
|
-
return (h,
|
|
11774
|
-
var
|
|
11775
|
-
const
|
|
11759
|
+
return (h, k) => {
|
|
11760
|
+
var Xe;
|
|
11761
|
+
const C = Se, x = st, T = qc, w = Jc, y = Uc, L = Vc, R = Wc, I = Co, U = ko, O = yo, S = _o, D = go, j = vo, q = Pc, Q = Oc, G = zc, ue = Hc, ee = Lc, he = Bc, Ce = Mc, Le = $c, We = Sc, Ne = Tc, P = Ac, X = yc, ce = hc, ct = fc, dt = mc, pt = pc, mt = dc;
|
|
11776
11762
|
return m(), $(J, null, [
|
|
11777
11763
|
ot((m(), _(mt, {
|
|
11778
11764
|
ref_key: "scrollableRef",
|
|
@@ -11782,13 +11768,13 @@ const Jo = Y.create({
|
|
|
11782
11768
|
default: A(() => [
|
|
11783
11769
|
g("div", jc, [
|
|
11784
11770
|
g("div", Gc, [
|
|
11785
|
-
v(
|
|
11771
|
+
v(x, {
|
|
11786
11772
|
trigger: "click",
|
|
11787
11773
|
options: i(b),
|
|
11788
|
-
"onUpdate:show":
|
|
11774
|
+
"onUpdate:show": k[0] || (k[0] = (Qe) => n.value = Qe)
|
|
11789
11775
|
}, {
|
|
11790
11776
|
default: A(() => [
|
|
11791
|
-
v(
|
|
11777
|
+
v(C, {
|
|
11792
11778
|
quaternary: "",
|
|
11793
11779
|
size: "small",
|
|
11794
11780
|
class: "smart-classic-menu-insert"
|
|
@@ -11808,25 +11794,25 @@ const Jo = Y.create({
|
|
|
11808
11794
|
]),
|
|
11809
11795
|
g("div", Kc, [
|
|
11810
11796
|
v(T),
|
|
11811
|
-
v(
|
|
11797
|
+
v(w)
|
|
11812
11798
|
]),
|
|
11813
|
-
g("div",
|
|
11814
|
-
v(
|
|
11799
|
+
g("div", Yc, [
|
|
11800
|
+
v(y),
|
|
11815
11801
|
v(L),
|
|
11816
11802
|
v(R),
|
|
11817
11803
|
v(I),
|
|
11818
11804
|
v(U),
|
|
11819
11805
|
v(O),
|
|
11820
11806
|
v(S),
|
|
11821
|
-
v(
|
|
11807
|
+
v(D),
|
|
11822
11808
|
v(j)
|
|
11823
11809
|
]),
|
|
11824
|
-
g("div",
|
|
11810
|
+
g("div", Zc, [
|
|
11825
11811
|
v(q),
|
|
11826
11812
|
v(Q),
|
|
11827
11813
|
v(G)
|
|
11828
11814
|
]),
|
|
11829
|
-
g("div",
|
|
11815
|
+
g("div", Xc, [
|
|
11830
11816
|
v(ue),
|
|
11831
11817
|
v(ee),
|
|
11832
11818
|
v(he),
|
|
@@ -11837,7 +11823,7 @@ const Jo = Y.create({
|
|
|
11837
11823
|
g("div", Qc, [
|
|
11838
11824
|
v(Ne),
|
|
11839
11825
|
v(P),
|
|
11840
|
-
v(
|
|
11826
|
+
v(X)
|
|
11841
11827
|
]),
|
|
11842
11828
|
g("div", ed, [
|
|
11843
11829
|
v(ce),
|
|
@@ -11847,18 +11833,18 @@ const Jo = Y.create({
|
|
|
11847
11833
|
v(dt),
|
|
11848
11834
|
v(pt)
|
|
11849
11835
|
]),
|
|
11850
|
-
|
|
11836
|
+
k[2] || (k[2] = g("div", { class: "smart-virtual-group" }, null, -1))
|
|
11851
11837
|
])
|
|
11852
11838
|
]),
|
|
11853
11839
|
_: 1
|
|
11854
11840
|
})), [
|
|
11855
11841
|
[i(Mr), f]
|
|
11856
11842
|
]),
|
|
11857
|
-
i(s) ? (m(), _(oe((
|
|
11843
|
+
i(s) ? (m(), _(oe((Xe = i(t).render[i(a)]) == null ? void 0 : Xe.insert()), {
|
|
11858
11844
|
key: 0,
|
|
11859
11845
|
visible: i(s),
|
|
11860
11846
|
header: i(u),
|
|
11861
|
-
onClose:
|
|
11847
|
+
onClose: k[1] || (k[1] = (Qe) => s.value = !1),
|
|
11862
11848
|
onSuccess: p
|
|
11863
11849
|
}, null, 40, ["visible", "header"])) : F("", !0)
|
|
11864
11850
|
], 64);
|
|
@@ -11903,7 +11889,7 @@ const id = /* @__PURE__ */ H(rd, [["render", sd], ["__scopeId", "data-v-3d91acb0
|
|
|
11903
11889
|
"destroy"
|
|
11904
11890
|
],
|
|
11905
11891
|
setup(r, { expose: e, emit: n }) {
|
|
11906
|
-
const o = r, t = n, l =
|
|
11892
|
+
const o = r, t = n, l = Vn(
|
|
11907
11893
|
{
|
|
11908
11894
|
selector: "html",
|
|
11909
11895
|
attribute: "theme-mode",
|
|
@@ -11919,20 +11905,20 @@ const id = /* @__PURE__ */ H(rd, [["render", sd], ["__scopeId", "data-v-3d91acb0
|
|
|
11919
11905
|
editor: f,
|
|
11920
11906
|
setOptions: b,
|
|
11921
11907
|
resetStore: h,
|
|
11922
|
-
page:
|
|
11923
|
-
editorDestroyed:
|
|
11908
|
+
page: k,
|
|
11909
|
+
editorDestroyed: C
|
|
11924
11910
|
} = M();
|
|
11925
|
-
|
|
11926
|
-
|
|
11927
|
-
}),
|
|
11911
|
+
Dn(() => {
|
|
11912
|
+
C.value = !1, b(o), t("beforeCreate");
|
|
11913
|
+
}), Ze(() => {
|
|
11928
11914
|
O();
|
|
11929
11915
|
});
|
|
11930
|
-
const
|
|
11916
|
+
const x = W(() => {
|
|
11931
11917
|
var S;
|
|
11932
11918
|
return !((S = u.value.document) != null && S.readOnly);
|
|
11933
|
-
}), T = Pe("locale"),
|
|
11934
|
-
var
|
|
11935
|
-
if ((
|
|
11919
|
+
}), T = Pe("locale"), w = B(!1), y = Wn(async () => {
|
|
11920
|
+
var D, j, q, Q, G, ue, ee, he;
|
|
11921
|
+
if ((D = u.value.document) != null && D.readOnly)
|
|
11936
11922
|
return;
|
|
11937
11923
|
let S = null;
|
|
11938
11924
|
try {
|
|
@@ -11958,32 +11944,32 @@ const id = /* @__PURE__ */ H(rd, [["render", sd], ["__scopeId", "data-v-3d91acb0
|
|
|
11958
11944
|
Be.message.error(c("save.error"), { placement: "bottom" }), console.error(Ce.message);
|
|
11959
11945
|
}
|
|
11960
11946
|
}, 2e3);
|
|
11961
|
-
|
|
11947
|
+
pe(
|
|
11962
11948
|
() => f.value,
|
|
11963
11949
|
() => {
|
|
11964
11950
|
f.value && (f.value.on("create", ({ editor: S }) => {
|
|
11965
11951
|
t("created", { editor: S });
|
|
11966
11952
|
}), f.value.on("update", ({ editor: S }) => {
|
|
11967
|
-
t("changed", { editor: S }),
|
|
11953
|
+
t("changed", { editor: S }), w.value = !0;
|
|
11968
11954
|
}), f.value.on("selectionUpdate", ({ editor: S }) => {
|
|
11969
11955
|
t("changed:selection", { editor: S });
|
|
11970
|
-
}), f.value.on("transaction", ({ editor: S, transaction:
|
|
11971
|
-
t("changed:transaction", { editor: S, transaction:
|
|
11972
|
-
}), f.value.on("focus", ({ editor: S, event:
|
|
11973
|
-
t("focus", { editor: S, event:
|
|
11956
|
+
}), f.value.on("transaction", ({ editor: S, transaction: D }) => {
|
|
11957
|
+
t("changed:transaction", { editor: S, transaction: D });
|
|
11958
|
+
}), f.value.on("focus", ({ editor: S, event: D }) => {
|
|
11959
|
+
t("focus", { editor: S, event: D });
|
|
11974
11960
|
}), f.value.on(
|
|
11975
11961
|
"contentError",
|
|
11976
|
-
({ editor: S, error:
|
|
11977
|
-
t("contentError", { editor: S, error:
|
|
11962
|
+
({ editor: S, error: D, disableCollaboration: j }) => {
|
|
11963
|
+
t("contentError", { editor: S, error: D, disableCollaboration: j });
|
|
11978
11964
|
}
|
|
11979
|
-
), f.value.on("blur", ({ editor: S, event:
|
|
11980
|
-
t("blur", { editor: S, event:
|
|
11965
|
+
), f.value.on("blur", ({ editor: S, event: D }) => {
|
|
11966
|
+
t("blur", { editor: S, event: D });
|
|
11981
11967
|
}), f.value.on("destroy", () => {
|
|
11982
11968
|
h(), t("destroy");
|
|
11983
11969
|
}));
|
|
11984
11970
|
}
|
|
11985
|
-
),
|
|
11986
|
-
() =>
|
|
11971
|
+
), pe(
|
|
11972
|
+
() => k.value.showToc,
|
|
11987
11973
|
(S) => {
|
|
11988
11974
|
t("changed:pageShowToc", S);
|
|
11989
11975
|
}
|
|
@@ -11995,8 +11981,8 @@ const id = /* @__PURE__ */ H(rd, [["render", sd], ["__scopeId", "data-v-3d91acb0
|
|
|
11995
11981
|
throw new Error('"params" must be one of "zh-CN" or "en-US".');
|
|
11996
11982
|
if (L.value === S)
|
|
11997
11983
|
return;
|
|
11998
|
-
const
|
|
11999
|
-
|
|
11984
|
+
const D = Pe("locale");
|
|
11985
|
+
D.value = S, L.value = D.value;
|
|
12000
11986
|
}
|
|
12001
11987
|
function I(S = "html") {
|
|
12002
11988
|
if (!f.value)
|
|
@@ -12009,7 +11995,7 @@ const id = /* @__PURE__ */ H(rd, [["render", sd], ["__scopeId", "data-v-3d91acb0
|
|
|
12009
11995
|
return f.value.getJSON();
|
|
12010
11996
|
throw new Error("format must be html, text or json");
|
|
12011
11997
|
}
|
|
12012
|
-
|
|
11998
|
+
pe(
|
|
12013
11999
|
() => o,
|
|
12014
12000
|
() => b(o),
|
|
12015
12001
|
{ deep: !0 }
|
|
@@ -12019,7 +12005,7 @@ const id = /* @__PURE__ */ H(rd, [["render", sd], ["__scopeId", "data-v-3d91acb0
|
|
|
12019
12005
|
return (S = f.value) == null ? void 0 : S.commands.unsetFormatPainter();
|
|
12020
12006
|
};
|
|
12021
12007
|
At("ctrl+s,command+s", () => {
|
|
12022
|
-
|
|
12008
|
+
y(), U();
|
|
12023
12009
|
}), At("esc", () => {
|
|
12024
12010
|
U();
|
|
12025
12011
|
});
|
|
@@ -12027,7 +12013,7 @@ const id = /* @__PURE__ */ H(rd, [["render", sd], ["__scopeId", "data-v-3d91acb0
|
|
|
12027
12013
|
var S;
|
|
12028
12014
|
(S = f.value) == null || S.destroy(), cn("ctrl+s,command+s"), cn("esc"), h();
|
|
12029
12015
|
}
|
|
12030
|
-
return tn("saveContent",
|
|
12016
|
+
return tn("saveContent", y), tn("setLocale", R), e({
|
|
12031
12017
|
getOptions: () => u.value,
|
|
12032
12018
|
setOptions: b,
|
|
12033
12019
|
setLocale: R,
|
|
@@ -12059,9 +12045,9 @@ const id = /* @__PURE__ */ H(rd, [["render", sd], ["__scopeId", "data-v-3d91acb0
|
|
|
12059
12045
|
getText: () => I("text"),
|
|
12060
12046
|
getHTML: () => I("html"),
|
|
12061
12047
|
getJSON: () => I("json"),
|
|
12062
|
-
saveContent:
|
|
12063
|
-
}), (S,
|
|
12064
|
-
const j = ad, q = sr, Q = id, G = uc, ue =
|
|
12048
|
+
saveContent: y
|
|
12049
|
+
}), (S, D) => {
|
|
12050
|
+
const j = ad, q = sr, Q = id, G = uc, ue = Vl, ee = On;
|
|
12065
12051
|
return m(), _(ee, {
|
|
12066
12052
|
"cls-prefix": "se",
|
|
12067
12053
|
"theme-overrides": i(l) ? i(fo) : i(mo),
|
|
@@ -12070,7 +12056,7 @@ const id = /* @__PURE__ */ H(rd, [["render", sd], ["__scopeId", "data-v-3d91acb0
|
|
|
12070
12056
|
theme: i(l) ? i(zn) : null
|
|
12071
12057
|
}, {
|
|
12072
12058
|
default: A(() => [
|
|
12073
|
-
v(q,
|
|
12059
|
+
v(q, { to: ".smart-editor-container" }, {
|
|
12074
12060
|
default: A(() => [
|
|
12075
12061
|
v(j)
|
|
12076
12062
|
]),
|
|
@@ -12081,18 +12067,18 @@ const id = /* @__PURE__ */ H(rd, [["render", sd], ["__scopeId", "data-v-3d91acb0
|
|
|
12081
12067
|
class: "smart-editor-container",
|
|
12082
12068
|
style: le({ height: i(u).height })
|
|
12083
12069
|
}, [
|
|
12084
|
-
i(
|
|
12070
|
+
i(x) ? (m(), $("header", cd, [
|
|
12085
12071
|
(m(), _(Q, { key: i(a) }))
|
|
12086
12072
|
])) : F("", !0),
|
|
12087
12073
|
g("main", dd, [
|
|
12088
12074
|
v(G, null, {
|
|
12089
12075
|
editor_tool: A(() => [
|
|
12090
|
-
|
|
12076
|
+
de(S.$slots, "editor_tool")
|
|
12091
12077
|
]),
|
|
12092
12078
|
_: 3
|
|
12093
12079
|
})
|
|
12094
12080
|
]),
|
|
12095
|
-
i(
|
|
12081
|
+
i(x) ? (m(), $("footer", pd, [
|
|
12096
12082
|
v(ue)
|
|
12097
12083
|
])) : F("", !0)
|
|
12098
12084
|
], 12, ud)
|
|
@@ -12308,40 +12294,40 @@ const id = /* @__PURE__ */ H(rd, [["render", sd], ["__scopeId", "data-v-3d91acb0
|
|
|
12308
12294
|
emits: ["toggle-popup"],
|
|
12309
12295
|
setup(r, { emit: e }) {
|
|
12310
12296
|
const n = r, o = e, t = jt(), { container: l, config: s } = z();
|
|
12311
|
-
function a(...
|
|
12312
|
-
t.onMenuClickThrough ? t.onMenuClickThrough(...
|
|
12297
|
+
function a(...x) {
|
|
12298
|
+
t.onMenuClickThrough ? t.onMenuClickThrough(...x) : t.onMenuClick && t.onMenuClick(...x);
|
|
12313
12299
|
}
|
|
12314
12300
|
const u = B(!1), d = B(!1);
|
|
12315
|
-
function p(
|
|
12316
|
-
d.value =
|
|
12301
|
+
function p(x) {
|
|
12302
|
+
d.value = x;
|
|
12317
12303
|
}
|
|
12318
12304
|
function f() {
|
|
12319
12305
|
return n.tooltip === !1 ? "" : n.huge && n.tooltip ? `${n.tooltip}${n.shortcut ? ` (${we(n.shortcut)})` : ""}` : n.text ? `${n.tooltip ? n.tooltip : n.text}${n.shortcut ? ` (${we(n.shortcut)})` : ""}` : "";
|
|
12320
12306
|
}
|
|
12321
|
-
const b =
|
|
12322
|
-
var
|
|
12323
|
-
return !((
|
|
12307
|
+
const b = W(() => {
|
|
12308
|
+
var x;
|
|
12309
|
+
return !((x = s.value) != null && x.readOnly);
|
|
12324
12310
|
});
|
|
12325
|
-
|
|
12311
|
+
pe(
|
|
12326
12312
|
() => n.popupVisible,
|
|
12327
|
-
(
|
|
12328
|
-
d.value =
|
|
12313
|
+
(x) => {
|
|
12314
|
+
d.value = x;
|
|
12329
12315
|
}
|
|
12330
12316
|
);
|
|
12331
|
-
const h = B(null),
|
|
12332
|
-
function
|
|
12333
|
-
o("toggle-popup",
|
|
12317
|
+
const h = B(null), k = B(null);
|
|
12318
|
+
function C(x) {
|
|
12319
|
+
o("toggle-popup", x);
|
|
12334
12320
|
}
|
|
12335
12321
|
return $t(
|
|
12336
|
-
|
|
12322
|
+
k,
|
|
12337
12323
|
() => {
|
|
12338
12324
|
o("toggle-popup", !1);
|
|
12339
12325
|
},
|
|
12340
12326
|
{
|
|
12341
12327
|
ignore: [h, ".smart-popup"]
|
|
12342
12328
|
}
|
|
12343
|
-
), (
|
|
12344
|
-
const
|
|
12329
|
+
), (x, T) => {
|
|
12330
|
+
const w = Se, y = st, L = Ln, R = Ut;
|
|
12345
12331
|
return m(), _(R, {
|
|
12346
12332
|
show: i(u) && !i(d) && r.showTooltip,
|
|
12347
12333
|
placement: "bottom",
|
|
@@ -12355,7 +12341,7 @@ const id = /* @__PURE__ */ H(rd, [["render", sd], ["__scopeId", "data-v-3d91acb0
|
|
|
12355
12341
|
onMouseover: T[3] || (T[3] = (I) => u.value = !0),
|
|
12356
12342
|
onMouseleave: T[4] || (T[4] = (I) => u.value = !1)
|
|
12357
12343
|
}, [
|
|
12358
|
-
r.menuType === "button" ? (m(), _(
|
|
12344
|
+
r.menuType === "button" ? (m(), _(w, ve({
|
|
12359
12345
|
key: 0,
|
|
12360
12346
|
class: ["smart-menu-button", {
|
|
12361
12347
|
"show-text": !r.hideText,
|
|
@@ -12367,7 +12353,7 @@ const id = /* @__PURE__ */ H(rd, [["render", sd], ["__scopeId", "data-v-3d91acb0
|
|
|
12367
12353
|
}, i(t), { onClick: a }), {
|
|
12368
12354
|
default: A(() => [
|
|
12369
12355
|
g("div", hd, [
|
|
12370
|
-
|
|
12356
|
+
de(x.$slots, "default", {}, void 0, !0),
|
|
12371
12357
|
r.ico ? (m(), $("i", {
|
|
12372
12358
|
key: 0,
|
|
12373
12359
|
class: K(`${r.ico}`)
|
|
@@ -12377,7 +12363,7 @@ const id = /* @__PURE__ */ H(rd, [["render", sd], ["__scopeId", "data-v-3d91acb0
|
|
|
12377
12363
|
])
|
|
12378
12364
|
]),
|
|
12379
12365
|
_: 3
|
|
12380
|
-
}, 16, ["class", "disabled"])) : r.menuType === "dropdown" ? (m(), _(
|
|
12366
|
+
}, 16, ["class", "disabled"])) : r.menuType === "dropdown" ? (m(), _(y, ve({ key: 1 }, i(t), {
|
|
12381
12367
|
trigger: "click",
|
|
12382
12368
|
options: r.selectOptions,
|
|
12383
12369
|
to: i(l),
|
|
@@ -12385,7 +12371,7 @@ const id = /* @__PURE__ */ H(rd, [["render", sd], ["__scopeId", "data-v-3d91acb0
|
|
|
12385
12371
|
onSelect: i(t).onChangeas
|
|
12386
12372
|
}), {
|
|
12387
12373
|
default: A(() => [
|
|
12388
|
-
v(
|
|
12374
|
+
v(w, ve({
|
|
12389
12375
|
class: ["smart-menu-button has-arrow", {
|
|
12390
12376
|
"show-text": !r.hideText,
|
|
12391
12377
|
active: r.popupVisible
|
|
@@ -12396,7 +12382,7 @@ const id = /* @__PURE__ */ H(rd, [["render", sd], ["__scopeId", "data-v-3d91acb0
|
|
|
12396
12382
|
}, i(t)), {
|
|
12397
12383
|
default: A(() => [
|
|
12398
12384
|
g("div", gd, [
|
|
12399
|
-
|
|
12385
|
+
de(x.$slots, "default", {}, void 0, !0),
|
|
12400
12386
|
r.ico ? (m(), $("i", {
|
|
12401
12387
|
key: 0,
|
|
12402
12388
|
class: K(`${r.ico}`)
|
|
@@ -12425,11 +12411,11 @@ const id = /* @__PURE__ */ H(rd, [["render", sd], ["__scopeId", "data-v-3d91acb0
|
|
|
12425
12411
|
"onUpdate:value": a
|
|
12426
12412
|
}), {
|
|
12427
12413
|
default: A(() => [
|
|
12428
|
-
|
|
12414
|
+
de(x.$slots, "default", {}, void 0, !0)
|
|
12429
12415
|
]),
|
|
12430
12416
|
_: 3
|
|
12431
12417
|
}, 16, ["value", "options", "disabled", "to"])) : r.menuType === "popup" ? (m(), $(J, { key: 3 }, [
|
|
12432
|
-
r.popupHandle === "arrow" ? (m(), _(
|
|
12418
|
+
r.popupHandle === "arrow" ? (m(), _(w, ve({
|
|
12433
12419
|
key: 0,
|
|
12434
12420
|
class: ["smart-menu-button has-arrow", {
|
|
12435
12421
|
"show-text": !r.hideText,
|
|
@@ -12444,7 +12430,7 @@ const id = /* @__PURE__ */ H(rd, [["render", sd], ["__scopeId", "data-v-3d91acb0
|
|
|
12444
12430
|
class: "smart-button-content",
|
|
12445
12431
|
onClick: a
|
|
12446
12432
|
}, [
|
|
12447
|
-
|
|
12433
|
+
de(x.$slots, "default", {}, void 0, !0),
|
|
12448
12434
|
r.ico ? (m(), $("i", {
|
|
12449
12435
|
key: 0,
|
|
12450
12436
|
class: K(`${r.ico}`)
|
|
@@ -12464,7 +12450,7 @@ const id = /* @__PURE__ */ H(rd, [["render", sd], ["__scopeId", "data-v-3d91acb0
|
|
|
12464
12450
|
ref_key: "popupHandleRef",
|
|
12465
12451
|
ref: h,
|
|
12466
12452
|
class: "smart-button-icon-arrow smart-button-handle",
|
|
12467
|
-
onClick: T[0] || (T[0] = (I) =>
|
|
12453
|
+
onClick: T[0] || (T[0] = (I) => C(!r.popupVisible))
|
|
12468
12454
|
}, T[6] || (T[6] = [
|
|
12469
12455
|
g("i", { class: "i-sed:arrow-down" }, null, -1)
|
|
12470
12456
|
]), 512)
|
|
@@ -12472,10 +12458,10 @@ const id = /* @__PURE__ */ H(rd, [["render", sd], ["__scopeId", "data-v-3d91acb0
|
|
|
12472
12458
|
default: A(() => [
|
|
12473
12459
|
g("div", {
|
|
12474
12460
|
ref_key: "popupContentRef",
|
|
12475
|
-
ref:
|
|
12461
|
+
ref: k,
|
|
12476
12462
|
class: "smart-popup-content p-x-8 p-y-4"
|
|
12477
12463
|
}, [
|
|
12478
|
-
|
|
12464
|
+
de(x.$slots, "content", {}, void 0, !0)
|
|
12479
12465
|
], 512)
|
|
12480
12466
|
]),
|
|
12481
12467
|
_: 3
|
|
@@ -12491,7 +12477,7 @@ const id = /* @__PURE__ */ H(rd, [["render", sd], ["__scopeId", "data-v-3d91acb0
|
|
|
12491
12477
|
trigger: "click"
|
|
12492
12478
|
}, {
|
|
12493
12479
|
trigger: A(() => [
|
|
12494
|
-
v(
|
|
12480
|
+
v(w, ve({
|
|
12495
12481
|
ref_key: "popupHandleRef",
|
|
12496
12482
|
ref: h,
|
|
12497
12483
|
class: ["smart-menu-button", {
|
|
@@ -12502,11 +12488,11 @@ const id = /* @__PURE__ */ H(rd, [["render", sd], ["__scopeId", "data-v-3d91acb0
|
|
|
12502
12488
|
size: "small",
|
|
12503
12489
|
disabled: r.disabled || i(b) === !1
|
|
12504
12490
|
}, i(t), {
|
|
12505
|
-
onClick: T[1] || (T[1] = (I) =>
|
|
12491
|
+
onClick: T[1] || (T[1] = (I) => C(!r.popupVisible))
|
|
12506
12492
|
}), {
|
|
12507
12493
|
default: A(() => [
|
|
12508
12494
|
g("div", wd, [
|
|
12509
|
-
|
|
12495
|
+
de(x.$slots, "default", {}, void 0, !0),
|
|
12510
12496
|
r.ico ? (m(), $("i", {
|
|
12511
12497
|
key: 0,
|
|
12512
12498
|
class: K(`${r.ico}`)
|
|
@@ -12524,10 +12510,10 @@ const id = /* @__PURE__ */ H(rd, [["render", sd], ["__scopeId", "data-v-3d91acb0
|
|
|
12524
12510
|
default: A(() => [
|
|
12525
12511
|
g("div", {
|
|
12526
12512
|
ref_key: "popupContentRef",
|
|
12527
|
-
ref:
|
|
12513
|
+
ref: k,
|
|
12528
12514
|
class: "smart-popup-content p-x-8 p-y-4"
|
|
12529
12515
|
}, [
|
|
12530
|
-
|
|
12516
|
+
de(x.$slots, "content", {}, void 0, !0)
|
|
12531
12517
|
], 512)
|
|
12532
12518
|
]),
|
|
12533
12519
|
_: 3
|
|
@@ -12542,10 +12528,10 @@ const id = /* @__PURE__ */ H(rd, [["render", sd], ["__scopeId", "data-v-3d91acb0
|
|
|
12542
12528
|
}, 8, ["show", "to"]);
|
|
12543
12529
|
};
|
|
12544
12530
|
}
|
|
12545
|
-
},
|
|
12531
|
+
}, V = /* @__PURE__ */ H(Sd, [["__scopeId", "data-v-61894092"]]), $d = {
|
|
12546
12532
|
__name: "cell-border",
|
|
12547
12533
|
setup(r) {
|
|
12548
|
-
const { editor: e } = z(), n =
|
|
12534
|
+
const { editor: e } = z(), n = W(() => [
|
|
12549
12535
|
{
|
|
12550
12536
|
label: c("table.border.cellLeft"),
|
|
12551
12537
|
key: "cellLeft",
|
|
@@ -13096,7 +13082,7 @@ const id = /* @__PURE__ */ H(rd, [["render", sd], ["__scopeId", "data-v-3d91acb0
|
|
|
13096
13082
|
return () => _e("i", { class: `i-sed:${t}`, style: "font-size: 16px;" });
|
|
13097
13083
|
}
|
|
13098
13084
|
return (t, l) => {
|
|
13099
|
-
const s =
|
|
13085
|
+
const s = V;
|
|
13100
13086
|
return m(), _(s, {
|
|
13101
13087
|
text: ("t" in t ? t.t : i(c))("table.border.cellStyle"),
|
|
13102
13088
|
ico: "i-sed:table-cell-border",
|
|
@@ -13116,7 +13102,7 @@ const id = /* @__PURE__ */ H(rd, [["render", sd], ["__scopeId", "data-v-3d91acb0
|
|
|
13116
13102
|
}
|
|
13117
13103
|
return (o, t) => {
|
|
13118
13104
|
var s;
|
|
13119
|
-
const l =
|
|
13105
|
+
const l = V;
|
|
13120
13106
|
return m(), _(l, {
|
|
13121
13107
|
ico: "i-sed:table-cell-line",
|
|
13122
13108
|
text: ("t" in o ? o.t : i(c))("table.tableHeaderLine"),
|
|
@@ -13137,8 +13123,8 @@ const id = /* @__PURE__ */ H(rd, [["render", sd], ["__scopeId", "data-v-3d91acb0
|
|
|
13137
13123
|
setup(r, { emit: e }) {
|
|
13138
13124
|
const n = r, o = e, { popupVisible: t } = ye(), { slimOptions: l } = z(), s = Pe("recent"), a = ["#B12318", "#EB3323", "#F6C143", "#FFFE55", "#A0CD63", "#4FAD5B", "#4CAFEA", "#2D70BA", "#06215C", "#68389B"], u = B(n.defaultColor), d = `#color-picker-${Te(4)}`;
|
|
13139
13125
|
function p(h) {
|
|
13140
|
-
t.value = !0, s.value.colors.forEach((
|
|
13141
|
-
|
|
13126
|
+
t.value = !0, s.value.colors.forEach((k, C) => {
|
|
13127
|
+
k === h && s.value.colors.splice(C, 1);
|
|
13142
13128
|
}), s.value.colors.unshift(h), s.value.colors.length > 10 && s.value.colors.splice(10, 1), o("change", h), o("update:visible");
|
|
13143
13129
|
}
|
|
13144
13130
|
function f(h) {
|
|
@@ -13147,18 +13133,18 @@ const id = /* @__PURE__ */ H(rd, [["render", sd], ["__scopeId", "data-v-3d91acb0
|
|
|
13147
13133
|
function b() {
|
|
13148
13134
|
return _e("div", { class: "smart-color-picker-render" }, "更多颜色");
|
|
13149
13135
|
}
|
|
13150
|
-
return (h,
|
|
13136
|
+
return (h, k) => {
|
|
13151
13137
|
var T;
|
|
13152
|
-
const
|
|
13138
|
+
const C = Se, x = Nn;
|
|
13153
13139
|
return m(), $("div", {
|
|
13154
13140
|
id: d.substr(1),
|
|
13155
13141
|
class: "smart-color-picker-container"
|
|
13156
13142
|
}, [
|
|
13157
13143
|
g("div", Ld, [
|
|
13158
|
-
v(
|
|
13144
|
+
v(C, {
|
|
13159
13145
|
size: "small",
|
|
13160
13146
|
block: "",
|
|
13161
|
-
onClick:
|
|
13147
|
+
onClick: k[0] || (k[0] = (w) => f(i(u)))
|
|
13162
13148
|
}, {
|
|
13163
13149
|
default: A(() => [
|
|
13164
13150
|
te(N(("t" in h ? h.t : i(c))("colorPicker.default")), 1)
|
|
@@ -13167,11 +13153,11 @@ const id = /* @__PURE__ */ H(rd, [["render", sd], ["__scopeId", "data-v-3d91acb0
|
|
|
13167
13153
|
})
|
|
13168
13154
|
]),
|
|
13169
13155
|
g("div", Nd, [
|
|
13170
|
-
(m(!0), $(J, null, ge((T = i(l).dicts) == null ? void 0 : T.colors, (
|
|
13171
|
-
key:
|
|
13156
|
+
(m(!0), $(J, null, ge((T = i(l).dicts) == null ? void 0 : T.colors, (w, y) => (m(), $("div", {
|
|
13157
|
+
key: y,
|
|
13172
13158
|
class: "smart-color-picker-item",
|
|
13173
|
-
style: le({ backgroundColor:
|
|
13174
|
-
onClick: (L) => f(
|
|
13159
|
+
style: le({ backgroundColor: w }),
|
|
13160
|
+
onClick: (L) => f(w)
|
|
13175
13161
|
}, null, 12, Rd))), 128))
|
|
13176
13162
|
]),
|
|
13177
13163
|
g("div", {
|
|
@@ -13179,11 +13165,11 @@ const id = /* @__PURE__ */ H(rd, [["render", sd], ["__scopeId", "data-v-3d91acb0
|
|
|
13179
13165
|
textContent: N(("t" in h ? h.t : i(c))("colorPicker.standard"))
|
|
13180
13166
|
}, null, 8, Ed),
|
|
13181
13167
|
g("div", Id, [
|
|
13182
|
-
(m(), $(J, null, ge(a, (
|
|
13183
|
-
key:
|
|
13168
|
+
(m(), $(J, null, ge(a, (w, y) => g("div", {
|
|
13169
|
+
key: y,
|
|
13184
13170
|
class: "smart-color-picker-item",
|
|
13185
|
-
style: le({ backgroundColor:
|
|
13186
|
-
onClick: (L) => f(
|
|
13171
|
+
style: le({ backgroundColor: w }),
|
|
13172
|
+
onClick: (L) => f(w)
|
|
13187
13173
|
}, null, 12, Fd)), 64))
|
|
13188
13174
|
]),
|
|
13189
13175
|
i(s).colors.length > 0 ? (m(), $(J, { key: 0 }, [
|
|
@@ -13192,16 +13178,16 @@ const id = /* @__PURE__ */ H(rd, [["render", sd], ["__scopeId", "data-v-3d91acb0
|
|
|
13192
13178
|
textContent: N(("t" in h ? h.t : i(c))("colorPicker.recent"))
|
|
13193
13179
|
}, null, 8, Hd),
|
|
13194
13180
|
g("div", zd, [
|
|
13195
|
-
(m(!0), $(J, null, ge(i(s).colors, (
|
|
13196
|
-
key:
|
|
13181
|
+
(m(!0), $(J, null, ge(i(s).colors, (w, y) => (m(), $("div", {
|
|
13182
|
+
key: y,
|
|
13197
13183
|
class: "smart-color-picker-item",
|
|
13198
|
-
style: le({ backgroundColor:
|
|
13199
|
-
onClick: (L) => f(
|
|
13184
|
+
style: le({ backgroundColor: w }),
|
|
13185
|
+
onClick: (L) => f(w)
|
|
13200
13186
|
}, null, 12, Od))), 128))
|
|
13201
13187
|
])
|
|
13202
13188
|
], 64)) : F("", !0),
|
|
13203
|
-
|
|
13204
|
-
v(
|
|
13189
|
+
k[1] || (k[1] = g("div", { class: "smart-color-picker-divider" }, null, -1)),
|
|
13190
|
+
v(x, {
|
|
13205
13191
|
to: d,
|
|
13206
13192
|
placement: "right",
|
|
13207
13193
|
"render-label": b,
|
|
@@ -13225,7 +13211,7 @@ const id = /* @__PURE__ */ H(rd, [["render", sd], ["__scopeId", "data-v-3d91acb0
|
|
|
13225
13211
|
t.value = s, s === "" ? (a = o.value) == null || a.chain().focus().setCellAttribute("backgroundColor", "transparent").run() : (u = o.value) == null || u.chain().focus().setCellAttribute("backgroundColor", s).run();
|
|
13226
13212
|
}
|
|
13227
13213
|
return (s, a) => {
|
|
13228
|
-
const u = Go, d =
|
|
13214
|
+
const u = Go, d = V;
|
|
13229
13215
|
return m(), _(d, {
|
|
13230
13216
|
ico: "i-sed:table-color",
|
|
13231
13217
|
text: ("t" in s ? s.t : i(c))("table.cellBgColor.tip"),
|
|
@@ -13255,17 +13241,17 @@ const id = /* @__PURE__ */ H(rd, [["render", sd], ["__scopeId", "data-v-3d91acb0
|
|
|
13255
13241
|
}, 8, ["text", "popup-visible", "onTogglePopup"]);
|
|
13256
13242
|
};
|
|
13257
13243
|
}
|
|
13258
|
-
},
|
|
13244
|
+
}, Vd = /* @__PURE__ */ H(Wd, [["__scopeId", "data-v-9819f9f0"]]), Dd = {
|
|
13259
13245
|
__name: "merge-split",
|
|
13260
13246
|
setup(r) {
|
|
13261
|
-
const { editor: e } = z(), n =
|
|
13247
|
+
const { editor: e } = z(), n = W(() => e.value ? e.value.can().mergeCells() ? "i-sed:table-merge" : "i-sed:table-split" : "i-sed:table-merge");
|
|
13262
13248
|
function o() {
|
|
13263
13249
|
var t;
|
|
13264
13250
|
(t = e.value) == null || t.chain().focus().mergeOrSplit().run();
|
|
13265
13251
|
}
|
|
13266
13252
|
return (t, l) => {
|
|
13267
13253
|
var a;
|
|
13268
|
-
const s =
|
|
13254
|
+
const s = V;
|
|
13269
13255
|
return m(), _(s, {
|
|
13270
13256
|
ico: i(n),
|
|
13271
13257
|
text: i(n) === "i-sed:table-merge" ? ("t" in t ? t.t : i(c))("table.mergeCells") : ("t" in t ? t.t : i(c))("table.splitCell"),
|
|
@@ -13283,7 +13269,7 @@ const id = /* @__PURE__ */ H(rd, [["render", sd], ["__scopeId", "data-v-3d91acb0
|
|
|
13283
13269
|
(o = e.value) == null || o.chain().focus().deleteRow().run();
|
|
13284
13270
|
}
|
|
13285
13271
|
return (o, t) => {
|
|
13286
|
-
const l =
|
|
13272
|
+
const l = V;
|
|
13287
13273
|
return m(), _(l, {
|
|
13288
13274
|
ico: "i-sed:table-delete-row",
|
|
13289
13275
|
text: ("t" in o ? o.t : i(c))("table.deleteRow.text"),
|
|
@@ -13300,7 +13286,7 @@ const id = /* @__PURE__ */ H(rd, [["render", sd], ["__scopeId", "data-v-3d91acb0
|
|
|
13300
13286
|
(o = e.value) == null || o.chain().focus().deleteColumn().run();
|
|
13301
13287
|
}
|
|
13302
13288
|
return (o, t) => {
|
|
13303
|
-
const l =
|
|
13289
|
+
const l = V;
|
|
13304
13290
|
return m(), _(l, {
|
|
13305
13291
|
ico: "i-sed:table-delete-column",
|
|
13306
13292
|
text: ("t" in o ? o.t : i(c))("table.deleteColumn.text"),
|
|
@@ -13317,7 +13303,7 @@ const id = /* @__PURE__ */ H(rd, [["render", sd], ["__scopeId", "data-v-3d91acb0
|
|
|
13317
13303
|
(o = e.value) == null || o.chain().focus().addRowAfter().run();
|
|
13318
13304
|
}
|
|
13319
13305
|
return (o, t) => {
|
|
13320
|
-
const l =
|
|
13306
|
+
const l = V;
|
|
13321
13307
|
return m(), _(l, {
|
|
13322
13308
|
ico: "i-sed:table-add-bottom",
|
|
13323
13309
|
text: ("t" in o ? o.t : i(c))("table.addRowAfter"),
|
|
@@ -13334,7 +13320,7 @@ const id = /* @__PURE__ */ H(rd, [["render", sd], ["__scopeId", "data-v-3d91acb0
|
|
|
13334
13320
|
(o = e.value) == null || o.chain().focus().addRowBefore().run();
|
|
13335
13321
|
}
|
|
13336
13322
|
return (o, t) => {
|
|
13337
|
-
const l =
|
|
13323
|
+
const l = V;
|
|
13338
13324
|
return m(), _(l, {
|
|
13339
13325
|
ico: "i-sed:table-add-top",
|
|
13340
13326
|
text: ("t" in o ? o.t : i(c))("table.addRowBefore"),
|
|
@@ -13351,7 +13337,7 @@ const id = /* @__PURE__ */ H(rd, [["render", sd], ["__scopeId", "data-v-3d91acb0
|
|
|
13351
13337
|
(o = e.value) == null || o.chain().focus().addColumnAfter().run();
|
|
13352
13338
|
}
|
|
13353
13339
|
return (o, t) => {
|
|
13354
|
-
const l =
|
|
13340
|
+
const l = V;
|
|
13355
13341
|
return m(), _(l, {
|
|
13356
13342
|
ico: "i-sed:table-add-right",
|
|
13357
13343
|
text: ("t" in o ? o.t : i(c))("table.addColumnBefore"),
|
|
@@ -13368,7 +13354,7 @@ const id = /* @__PURE__ */ H(rd, [["render", sd], ["__scopeId", "data-v-3d91acb0
|
|
|
13368
13354
|
(o = e.value) == null || o.chain().focus().addColumnBefore().run();
|
|
13369
13355
|
}
|
|
13370
13356
|
return (o, t) => {
|
|
13371
|
-
const l =
|
|
13357
|
+
const l = V;
|
|
13372
13358
|
return m(), _(l, {
|
|
13373
13359
|
ico: "i-sed:table-add-left",
|
|
13374
13360
|
text: ("t" in o ? o.t : i(c))("table.addColumnBefore"),
|
|
@@ -13376,7 +13362,7 @@ const id = /* @__PURE__ */ H(rd, [["render", sd], ["__scopeId", "data-v-3d91acb0
|
|
|
13376
13362
|
}, null, 8, ["text"]);
|
|
13377
13363
|
};
|
|
13378
13364
|
}
|
|
13379
|
-
},
|
|
13365
|
+
}, Yd = {
|
|
13380
13366
|
__name: "vertical-bottom",
|
|
13381
13367
|
emits: "update:popupVisible",
|
|
13382
13368
|
setup(r, { emit: e }) {
|
|
@@ -13391,7 +13377,7 @@ const id = /* @__PURE__ */ H(rd, [["render", sd], ["__scopeId", "data-v-3d91acb0
|
|
|
13391
13377
|
return s === "bottom";
|
|
13392
13378
|
}
|
|
13393
13379
|
return (s, a) => {
|
|
13394
|
-
const u =
|
|
13380
|
+
const u = V;
|
|
13395
13381
|
return m(), _(u, {
|
|
13396
13382
|
ico: "i-sed:table-align-bottom",
|
|
13397
13383
|
text: ("t" in s ? s.t : i(c))("table.cellAlign.bottom"),
|
|
@@ -13401,7 +13387,7 @@ const id = /* @__PURE__ */ H(rd, [["render", sd], ["__scopeId", "data-v-3d91acb0
|
|
|
13401
13387
|
}, null, 8, ["text", "menu-active"]);
|
|
13402
13388
|
};
|
|
13403
13389
|
}
|
|
13404
|
-
},
|
|
13390
|
+
}, Zd = {
|
|
13405
13391
|
__name: "vertical-middle",
|
|
13406
13392
|
emits: "update:popupVisible",
|
|
13407
13393
|
setup(r, { emit: e }) {
|
|
@@ -13416,7 +13402,7 @@ const id = /* @__PURE__ */ H(rd, [["render", sd], ["__scopeId", "data-v-3d91acb0
|
|
|
13416
13402
|
return s === "middle";
|
|
13417
13403
|
}
|
|
13418
13404
|
return (s, a) => {
|
|
13419
|
-
const u =
|
|
13405
|
+
const u = V;
|
|
13420
13406
|
return m(), _(u, {
|
|
13421
13407
|
ico: "i-sed:table-align-middle",
|
|
13422
13408
|
text: ("t" in s ? s.t : i(c))("table.cellAlign.middle"),
|
|
@@ -13426,7 +13412,7 @@ const id = /* @__PURE__ */ H(rd, [["render", sd], ["__scopeId", "data-v-3d91acb0
|
|
|
13426
13412
|
}, null, 8, ["text", "menu-active"]);
|
|
13427
13413
|
};
|
|
13428
13414
|
}
|
|
13429
|
-
},
|
|
13415
|
+
}, Xd = {
|
|
13430
13416
|
__name: "vertical-top",
|
|
13431
13417
|
emits: "update:popupVisible",
|
|
13432
13418
|
setup(r, { emit: e }) {
|
|
@@ -13441,7 +13427,7 @@ const id = /* @__PURE__ */ H(rd, [["render", sd], ["__scopeId", "data-v-3d91acb0
|
|
|
13441
13427
|
return s === "top";
|
|
13442
13428
|
}
|
|
13443
13429
|
return (s, a) => {
|
|
13444
|
-
const u =
|
|
13430
|
+
const u = V;
|
|
13445
13431
|
return m(), _(u, {
|
|
13446
13432
|
ico: "i-sed:table-align-top",
|
|
13447
13433
|
text: ("t" in s ? s.t : i(c))("table.cellAlign.top"),
|
|
@@ -13454,7 +13440,7 @@ const id = /* @__PURE__ */ H(rd, [["render", sd], ["__scopeId", "data-v-3d91acb0
|
|
|
13454
13440
|
}, Qd = { class: "smart-text-align-group" }, ep = {
|
|
13455
13441
|
__name: "vertical-dropdown",
|
|
13456
13442
|
setup(r) {
|
|
13457
|
-
const { popupVisible: e, togglePopup: n } = ye(), { editor: o } = z(), t =
|
|
13443
|
+
const { popupVisible: e, togglePopup: n } = ye(), { editor: o } = z(), t = W(() => {
|
|
13458
13444
|
var s;
|
|
13459
13445
|
if (!o.value)
|
|
13460
13446
|
return "top";
|
|
@@ -13462,7 +13448,7 @@ const id = /* @__PURE__ */ H(rd, [["render", sd], ["__scopeId", "data-v-3d91acb0
|
|
|
13462
13448
|
return l || "top";
|
|
13463
13449
|
});
|
|
13464
13450
|
return (l, s) => {
|
|
13465
|
-
const a =
|
|
13451
|
+
const a = Xd, u = Zd, d = Yd, p = V;
|
|
13466
13452
|
return m(), _(p, {
|
|
13467
13453
|
ico: `i-sed:table-align-${i(t)}`,
|
|
13468
13454
|
text: ("t" in l ? l.t : i(c))("bubbleMenu.imageFloat"),
|
|
@@ -13496,7 +13482,7 @@ const id = /* @__PURE__ */ H(rd, [["render", sd], ["__scopeId", "data-v-3d91acb0
|
|
|
13496
13482
|
return !!t;
|
|
13497
13483
|
}
|
|
13498
13484
|
return (t, l) => {
|
|
13499
|
-
const s =
|
|
13485
|
+
const s = V;
|
|
13500
13486
|
return m(), _(s, {
|
|
13501
13487
|
ico: "i-sed:table-auto",
|
|
13502
13488
|
text: ("t" in t ? t.t : i(c))("table.tableAuto"),
|
|
@@ -13519,7 +13505,7 @@ const id = /* @__PURE__ */ H(rd, [["render", sd], ["__scopeId", "data-v-3d91acb0
|
|
|
13519
13505
|
return !!t;
|
|
13520
13506
|
}
|
|
13521
13507
|
return (t, l) => {
|
|
13522
|
-
const s =
|
|
13508
|
+
const s = V;
|
|
13523
13509
|
return m(), _(s, {
|
|
13524
13510
|
ico: "i-sed:table-width",
|
|
13525
13511
|
text: ("t" in t ? t.t : i(c))("table.colsAuto"),
|
|
@@ -13531,7 +13517,7 @@ const id = /* @__PURE__ */ H(rd, [["render", sd], ["__scopeId", "data-v-3d91acb0
|
|
|
13531
13517
|
}, op = {
|
|
13532
13518
|
__name: "border",
|
|
13533
13519
|
setup(r) {
|
|
13534
|
-
const { editor: e } = z(), n =
|
|
13520
|
+
const { editor: e } = z(), n = W(() => {
|
|
13535
13521
|
var l;
|
|
13536
13522
|
if (!e.value)
|
|
13537
13523
|
return "i-sed:table-border";
|
|
@@ -13543,7 +13529,7 @@ const id = /* @__PURE__ */ H(rd, [["render", sd], ["__scopeId", "data-v-3d91acb0
|
|
|
13543
13529
|
(t = e.value) == null || t.chain().focus().toggleTableBorder().run();
|
|
13544
13530
|
}
|
|
13545
13531
|
return (t, l) => {
|
|
13546
|
-
const s =
|
|
13532
|
+
const s = V;
|
|
13547
13533
|
return m(), _(s, {
|
|
13548
13534
|
ico: i(n),
|
|
13549
13535
|
text: i(n) === "i-sed:table-border" ? ("t" in t ? t.t : i(c))("table.toggleTableBorder.hide") : ("t" in t ? t.t : i(c))("table.toggleTableBorder.show"),
|
|
@@ -13560,7 +13546,7 @@ const id = /* @__PURE__ */ H(rd, [["render", sd], ["__scopeId", "data-v-3d91acb0
|
|
|
13560
13546
|
(o = e.value) == null || o.chain().focus().deleteTable().run();
|
|
13561
13547
|
}
|
|
13562
13548
|
return (o, t) => {
|
|
13563
|
-
const l =
|
|
13549
|
+
const l = V;
|
|
13564
13550
|
return m(), _(l, {
|
|
13565
13551
|
ico: "i-sed:table-delete",
|
|
13566
13552
|
text: ("t" in o ? o.t : i(c))("table.delete.text"),
|
|
@@ -13574,7 +13560,7 @@ const id = /* @__PURE__ */ H(rd, [["render", sd], ["__scopeId", "data-v-3d91acb0
|
|
|
13574
13560
|
const { editor: e, showTableBar: n } = z();
|
|
13575
13561
|
return (o, t) => {
|
|
13576
13562
|
var L;
|
|
13577
|
-
const l = rp, s = op, a = np, u = tp, d = ep, p = Kd, f = Gd, b = jd, h = qd,
|
|
13563
|
+
const l = rp, s = op, a = np, u = tp, d = ep, p = Kd, f = Gd, b = jd, h = qd, k = Jd, C = Ud, x = Dd, T = Vd, w = Md, y = $d;
|
|
13578
13564
|
return (L = i(e)) != null && L.isActive("tableCell") && i(n) ? (m(), $(J, { key: 0 }, [
|
|
13579
13565
|
v(l),
|
|
13580
13566
|
t[0] || (t[0] = g("div", { class: "smart-bubble-menu-divider" }, null, -1)),
|
|
@@ -13587,13 +13573,13 @@ const id = /* @__PURE__ */ H(rd, [["render", sd], ["__scopeId", "data-v-3d91acb0
|
|
|
13587
13573
|
v(f),
|
|
13588
13574
|
v(b),
|
|
13589
13575
|
v(h),
|
|
13576
|
+
v(k),
|
|
13590
13577
|
v(C),
|
|
13591
|
-
v(
|
|
13592
|
-
v(w),
|
|
13578
|
+
v(x),
|
|
13593
13579
|
t[2] || (t[2] = g("div", { class: "smart-bubble-menu-divider" }, null, -1)),
|
|
13594
13580
|
v(T),
|
|
13595
|
-
v(
|
|
13596
|
-
v(
|
|
13581
|
+
v(w),
|
|
13582
|
+
v(y)
|
|
13597
13583
|
], 64)) : F("", !0);
|
|
13598
13584
|
};
|
|
13599
13585
|
}
|
|
@@ -13625,7 +13611,7 @@ const id = /* @__PURE__ */ H(rd, [["render", sd], ["__scopeId", "data-v-3d91acb0
|
|
|
13625
13611
|
}, 8, ["editor", "tippy-options"]);
|
|
13626
13612
|
};
|
|
13627
13613
|
}
|
|
13628
|
-
}, ap =
|
|
13614
|
+
}, ap = Z.create({
|
|
13629
13615
|
name: "fill",
|
|
13630
13616
|
inline: !0,
|
|
13631
13617
|
group: "inline",
|
|
@@ -13657,7 +13643,7 @@ const id = /* @__PURE__ */ H(rd, [["render", sd], ["__scopeId", "data-v-3d91acb0
|
|
|
13657
13643
|
renderHTML({ HTMLAttributes: r }) {
|
|
13658
13644
|
return [
|
|
13659
13645
|
"span",
|
|
13660
|
-
|
|
13646
|
+
Y({ "data-type": this.name }, r)
|
|
13661
13647
|
];
|
|
13662
13648
|
},
|
|
13663
13649
|
addCommands() {
|
|
@@ -13688,7 +13674,7 @@ function up(r) {
|
|
|
13688
13674
|
levels: [1, 2, 3, 4, 5, 6]
|
|
13689
13675
|
}
|
|
13690
13676
|
}),
|
|
13691
|
-
|
|
13677
|
+
Yn.configure({
|
|
13692
13678
|
className: "smart-node-focused",
|
|
13693
13679
|
mode: "all"
|
|
13694
13680
|
}),
|
|
@@ -13697,12 +13683,12 @@ function up(r) {
|
|
|
13697
13683
|
Kn,
|
|
13698
13684
|
so,
|
|
13699
13685
|
Oo,
|
|
13700
|
-
|
|
13686
|
+
Zn,
|
|
13701
13687
|
oo.configure({
|
|
13702
13688
|
types: ["heading", "paragraph"],
|
|
13703
13689
|
defaultAlignment: "left"
|
|
13704
13690
|
}),
|
|
13705
|
-
|
|
13691
|
+
Xn.configure({
|
|
13706
13692
|
multicolor: !0
|
|
13707
13693
|
}),
|
|
13708
13694
|
Uo,
|
|
@@ -13720,11 +13706,11 @@ function up(r) {
|
|
|
13720
13706
|
allowBase64: !0,
|
|
13721
13707
|
inline: !0
|
|
13722
13708
|
}),
|
|
13723
|
-
|
|
13709
|
+
Do.configure({
|
|
13724
13710
|
acceptMimes: ["image/jpeg", "image/gif", "image/png", "image/jpg"],
|
|
13725
13711
|
upload: r.upload
|
|
13726
13712
|
}),
|
|
13727
|
-
|
|
13713
|
+
Vo.configure({ inline: !0 }),
|
|
13728
13714
|
ap.configure({
|
|
13729
13715
|
canFill: r.canFill
|
|
13730
13716
|
})
|
|
@@ -13739,9 +13725,9 @@ const cp = {
|
|
|
13739
13725
|
content: "",
|
|
13740
13726
|
extensions: [...up(o.value)]
|
|
13741
13727
|
});
|
|
13742
|
-
n(t),
|
|
13728
|
+
n(t), Ze(() => {
|
|
13743
13729
|
t.destroy();
|
|
13744
|
-
}),
|
|
13730
|
+
}), pe(
|
|
13745
13731
|
o,
|
|
13746
13732
|
(s) => {
|
|
13747
13733
|
t && (t.setEditable(!s.readOnly), t.commands.focus("end"));
|
|
@@ -13772,7 +13758,7 @@ const cp = {
|
|
|
13772
13758
|
const { editor: e } = z();
|
|
13773
13759
|
return (n, o) => {
|
|
13774
13760
|
var l;
|
|
13775
|
-
const t =
|
|
13761
|
+
const t = V;
|
|
13776
13762
|
return m(), _(t, {
|
|
13777
13763
|
text: ("t" in n ? n.t : i(c))("base.redo"),
|
|
13778
13764
|
ico: "i-sed:redo",
|
|
@@ -13792,7 +13778,7 @@ const cp = {
|
|
|
13792
13778
|
const { editor: e } = z();
|
|
13793
13779
|
return (n, o) => {
|
|
13794
13780
|
var l;
|
|
13795
|
-
const t =
|
|
13781
|
+
const t = V;
|
|
13796
13782
|
return m(), _(t, {
|
|
13797
13783
|
ico: "i-sed:undo",
|
|
13798
13784
|
text: ("t" in n ? n.t : i(c))("base.undo"),
|
|
@@ -13815,7 +13801,7 @@ const cp = {
|
|
|
13815
13801
|
(o = e.value) == null || o.chain().focus().setFillNode().run();
|
|
13816
13802
|
}
|
|
13817
13803
|
return (o, t) => {
|
|
13818
|
-
const l =
|
|
13804
|
+
const l = V;
|
|
13819
13805
|
return m(), _(l, {
|
|
13820
13806
|
ico: "i-sed:inline-fill",
|
|
13821
13807
|
text: ("t" in o ? o.t : i(c))("insert.fill"),
|
|
@@ -13833,7 +13819,7 @@ const cp = {
|
|
|
13833
13819
|
(o = e.value) == null || o.chain().focus().insertContent("$\\LaTeX$").run();
|
|
13834
13820
|
}
|
|
13835
13821
|
return (o, t) => {
|
|
13836
|
-
const l =
|
|
13822
|
+
const l = V;
|
|
13837
13823
|
return m(), _(l, {
|
|
13838
13824
|
ico: "i-sed:inline-latex",
|
|
13839
13825
|
text: ("t" in o ? o.t : i(c))("insert.math"),
|
|
@@ -13861,8 +13847,8 @@ const cp = {
|
|
|
13861
13847
|
p === 0 || p > 1e3 || f === 0 || f > 30 || ((b = o.value) == null || b.chain().focus().insertTable({ rows: p, cols: f, withHeaderRow: !1 }).run(), e.value = !1);
|
|
13862
13848
|
}
|
|
13863
13849
|
return (p, f) => {
|
|
13864
|
-
const b = Rn, h = Se,
|
|
13865
|
-
return m(), _(
|
|
13850
|
+
const b = Rn, h = Se, k = V;
|
|
13851
|
+
return m(), _(k, {
|
|
13866
13852
|
ico: "i-sed:table",
|
|
13867
13853
|
text: ("t" in p ? p.t : i(c))("table.insert.text"),
|
|
13868
13854
|
tooltip: ("t" in p ? p.t : i(c))("table.insert.tip"),
|
|
@@ -13876,14 +13862,14 @@ const cp = {
|
|
|
13876
13862
|
class: "smart-table-grid",
|
|
13877
13863
|
onMouseleave: u
|
|
13878
13864
|
}, [
|
|
13879
|
-
(m(!0), $(J, null, ge(i(t), (
|
|
13880
|
-
key:
|
|
13865
|
+
(m(!0), $(J, null, ge(i(t), (C, x) => (m(), $("div", {
|
|
13866
|
+
key: x,
|
|
13881
13867
|
class: "row"
|
|
13882
13868
|
}, [
|
|
13883
|
-
(m(!0), $(J, null, ge(
|
|
13884
|
-
key:
|
|
13885
|
-
class: K(["cell", { selected: s(
|
|
13886
|
-
onMouseover: (
|
|
13869
|
+
(m(!0), $(J, null, ge(C, (T, w) => (m(), $("div", {
|
|
13870
|
+
key: w,
|
|
13871
|
+
class: K(["cell", { selected: s(x, w) }]),
|
|
13872
|
+
onMouseover: (y) => a(x, w),
|
|
13887
13873
|
onClick: d
|
|
13888
13874
|
}, null, 42, bp))), 128))
|
|
13889
13875
|
]))), 128))
|
|
@@ -13895,7 +13881,7 @@ const cp = {
|
|
|
13895
13881
|
}, null, 8, gp),
|
|
13896
13882
|
v(b, {
|
|
13897
13883
|
value: i(l).rows,
|
|
13898
|
-
"onUpdate:value": f[0] || (f[0] = (
|
|
13884
|
+
"onUpdate:value": f[0] || (f[0] = (C) => i(l).rows = C),
|
|
13899
13885
|
size: "small",
|
|
13900
13886
|
max: 1e3,
|
|
13901
13887
|
min: 0
|
|
@@ -13907,7 +13893,7 @@ const cp = {
|
|
|
13907
13893
|
}, 8, ["value"]),
|
|
13908
13894
|
v(b, {
|
|
13909
13895
|
value: i(l).cols,
|
|
13910
|
-
"onUpdate:value": f[1] || (f[1] = (
|
|
13896
|
+
"onUpdate:value": f[1] || (f[1] = (C) => i(l).cols = C),
|
|
13911
13897
|
size: "small",
|
|
13912
13898
|
max: 30,
|
|
13913
13899
|
min: 0
|
|
@@ -13949,7 +13935,7 @@ const cp = {
|
|
|
13949
13935
|
var a;
|
|
13950
13936
|
s && ((a = n.value) == null || a.commands.uploadImage({ file: s }));
|
|
13951
13937
|
}), (s, a) => {
|
|
13952
|
-
const u =
|
|
13938
|
+
const u = V;
|
|
13953
13939
|
return m(), _(u, {
|
|
13954
13940
|
ico: "i-sed:image",
|
|
13955
13941
|
text: ("t" in s ? s.t : i(c))("insert.image"),
|
|
@@ -13961,12 +13947,12 @@ const cp = {
|
|
|
13961
13947
|
}, Cp = {
|
|
13962
13948
|
__name: "line-height",
|
|
13963
13949
|
setup(r) {
|
|
13964
|
-
const { editor: e, slimOptions: n } = z(), o =
|
|
13950
|
+
const { editor: e, slimOptions: n } = z(), o = W(() => {
|
|
13965
13951
|
var l;
|
|
13966
13952
|
return (l = n.value.dicts) == null ? void 0 : l.lineHeights.map((s) => {
|
|
13967
13953
|
var a;
|
|
13968
13954
|
return {
|
|
13969
|
-
label: s.default ?
|
|
13955
|
+
label: s.default ? Ye(s.label) + c("base.lineHeight.default") : Ye(s.label),
|
|
13970
13956
|
key: s.value,
|
|
13971
13957
|
props: {
|
|
13972
13958
|
class: {
|
|
@@ -13981,7 +13967,7 @@ const cp = {
|
|
|
13981
13967
|
l && ((s = e.value) == null || s.chain().focus().setLineHeight(l).run());
|
|
13982
13968
|
}
|
|
13983
13969
|
return (l, s) => {
|
|
13984
|
-
const a =
|
|
13970
|
+
const a = V;
|
|
13985
13971
|
return m(), _(a, {
|
|
13986
13972
|
text: ("t" in l ? l.t : i(c))("base.lineHeight.text"),
|
|
13987
13973
|
ico: "i-sed:lineheight",
|
|
@@ -13998,7 +13984,7 @@ const cp = {
|
|
|
13998
13984
|
const { editor: e } = z();
|
|
13999
13985
|
return (n, o) => {
|
|
14000
13986
|
var l, s;
|
|
14001
|
-
const t =
|
|
13987
|
+
const t = V;
|
|
14002
13988
|
return m(), _(t, {
|
|
14003
13989
|
ico: "i-sed:align-justify",
|
|
14004
13990
|
text: ("t" in n ? n.t : i(c))("base.align.justify"),
|
|
@@ -14023,7 +14009,7 @@ const cp = {
|
|
|
14023
14009
|
}
|
|
14024
14010
|
return (o, t) => {
|
|
14025
14011
|
var s, a;
|
|
14026
|
-
const l =
|
|
14012
|
+
const l = V;
|
|
14027
14013
|
return m(), _(l, {
|
|
14028
14014
|
ico: "i-sed:align-right",
|
|
14029
14015
|
text: ("t" in o ? o.t : i(c))("base.align.right"),
|
|
@@ -14045,7 +14031,7 @@ const cp = {
|
|
|
14045
14031
|
}
|
|
14046
14032
|
return (o, t) => {
|
|
14047
14033
|
var s, a;
|
|
14048
|
-
const l =
|
|
14034
|
+
const l = V;
|
|
14049
14035
|
return m(), _(l, {
|
|
14050
14036
|
ico: "i-sed:align-center",
|
|
14051
14037
|
text: ("t" in o ? o.t : i(c))("base.align.center"),
|
|
@@ -14067,7 +14053,7 @@ const cp = {
|
|
|
14067
14053
|
}
|
|
14068
14054
|
return (o, t) => {
|
|
14069
14055
|
var s, a;
|
|
14070
|
-
const l =
|
|
14056
|
+
const l = V;
|
|
14071
14057
|
return m(), _(l, {
|
|
14072
14058
|
ico: "i-sed:align-left",
|
|
14073
14059
|
text: ("t" in o ? o.t : i(c))("base.align.left"),
|
|
@@ -14082,10 +14068,10 @@ const cp = {
|
|
|
14082
14068
|
}, Sp = { class: "smart-text-align-group" }, $p = {
|
|
14083
14069
|
__name: "align-dropdown",
|
|
14084
14070
|
setup(r) {
|
|
14085
|
-
const { popupVisible: e, togglePopup: n } = ye(), { editor: o } = z(), t =
|
|
14071
|
+
const { popupVisible: e, togglePopup: n } = ye(), { editor: o } = z(), t = W(() => !o.value || o.value.isActive({ textAlign: "justify" }) ? "left" : o.value.isActive({ textAlign: "center" }) ? "center" : o.value.isActive({ textAlign: "right" }) ? "right" : o.value.isActive({ textAlign: "justify" }) ? "justify" : "left");
|
|
14086
14072
|
return (l, s) => {
|
|
14087
14073
|
var b;
|
|
14088
|
-
const a = Tp, u = Ap, d = xp, p = wp, f =
|
|
14074
|
+
const a = Tp, u = Ap, d = xp, p = wp, f = V;
|
|
14089
14075
|
return m(), _(f, {
|
|
14090
14076
|
ico: `i-sed:align-${i(t)}`,
|
|
14091
14077
|
text: ("t" in l ? l.t : i(c))("base.align.title"),
|
|
@@ -14113,7 +14099,7 @@ const cp = {
|
|
|
14113
14099
|
const { editor: e } = z();
|
|
14114
14100
|
return (n, o) => {
|
|
14115
14101
|
var l, s;
|
|
14116
|
-
const t =
|
|
14102
|
+
const t = V;
|
|
14117
14103
|
return m(), _(t, {
|
|
14118
14104
|
ico: "i-sed:super",
|
|
14119
14105
|
text: ("t" in n ? n.t : i(c))("base.superscript"),
|
|
@@ -14134,7 +14120,7 @@ const cp = {
|
|
|
14134
14120
|
const { editor: e } = z();
|
|
14135
14121
|
return (n, o) => {
|
|
14136
14122
|
var l, s;
|
|
14137
|
-
const t =
|
|
14123
|
+
const t = V;
|
|
14138
14124
|
return m(), _(t, {
|
|
14139
14125
|
ico: "i-sed:sub",
|
|
14140
14126
|
text: ("t" in n ? n.t : i(c))("base.subscript"),
|
|
@@ -14155,7 +14141,7 @@ const cp = {
|
|
|
14155
14141
|
const { editor: e } = z();
|
|
14156
14142
|
return (n, o) => {
|
|
14157
14143
|
var l, s;
|
|
14158
|
-
const t =
|
|
14144
|
+
const t = V;
|
|
14159
14145
|
return m(), _(t, {
|
|
14160
14146
|
ico: "i-sed:code",
|
|
14161
14147
|
text: ("t" in n ? n.t : i(c))("base.code"),
|
|
@@ -14198,7 +14184,7 @@ const cp = {
|
|
|
14198
14184
|
d === "" ? (p = s.value) == null || p.chain().focus().unsetHighlight().run() : (f = s.value) == null || f.chain().focus().setHighlight({ color: d }).run();
|
|
14199
14185
|
}
|
|
14200
14186
|
return (d, p) => {
|
|
14201
|
-
const f = Go, b =
|
|
14187
|
+
const f = Go, b = V;
|
|
14202
14188
|
return m(), _(b, {
|
|
14203
14189
|
ico: "i-sed:highlight",
|
|
14204
14190
|
text: r.text || ("t" in d ? d.t : i(c))("base.bgColor"),
|
|
@@ -14255,7 +14241,7 @@ const cp = {
|
|
|
14255
14241
|
d === "" ? (p = s.value) == null || p.chain().focus().unsetColor().run() : (f = s.value) == null || f.chain().focus().setColor(d).run();
|
|
14256
14242
|
}
|
|
14257
14243
|
return (d, p) => {
|
|
14258
|
-
const f = ut, b =
|
|
14244
|
+
const f = ut, b = V;
|
|
14259
14245
|
return m(), _(b, {
|
|
14260
14246
|
ico: "i-sed:font-color-picker",
|
|
14261
14247
|
text: r.text || ("t" in d ? d.t : i(c))("base.color"),
|
|
@@ -14290,7 +14276,7 @@ const cp = {
|
|
|
14290
14276
|
const { editor: e } = z();
|
|
14291
14277
|
return (n, o) => {
|
|
14292
14278
|
var l, s;
|
|
14293
|
-
const t =
|
|
14279
|
+
const t = V;
|
|
14294
14280
|
return m(), _(t, {
|
|
14295
14281
|
ico: "i-sed:strike",
|
|
14296
14282
|
text: ("t" in n ? n.t : i(c))("base.strike"),
|
|
@@ -14310,7 +14296,7 @@ const cp = {
|
|
|
14310
14296
|
const { editor: e } = z();
|
|
14311
14297
|
return (n, o) => {
|
|
14312
14298
|
var l, s;
|
|
14313
|
-
const t =
|
|
14299
|
+
const t = V;
|
|
14314
14300
|
return m(), _(t, {
|
|
14315
14301
|
ico: "i-sed:underline",
|
|
14316
14302
|
text: ("t" in n ? n.t : i(c))("base.underline"),
|
|
@@ -14331,7 +14317,7 @@ const cp = {
|
|
|
14331
14317
|
const { editor: e } = z();
|
|
14332
14318
|
return (n, o) => {
|
|
14333
14319
|
var l, s;
|
|
14334
|
-
const t =
|
|
14320
|
+
const t = V;
|
|
14335
14321
|
return m(), _(t, {
|
|
14336
14322
|
text: ("t" in n ? n.t : i(c))("base.italic"),
|
|
14337
14323
|
ico: "i-sed:italic",
|
|
@@ -14352,7 +14338,7 @@ const cp = {
|
|
|
14352
14338
|
const { editor: e } = z();
|
|
14353
14339
|
return (n, o) => {
|
|
14354
14340
|
var l, s;
|
|
14355
|
-
const t =
|
|
14341
|
+
const t = V;
|
|
14356
14342
|
return m(), _(t, {
|
|
14357
14343
|
ico: "i-sed:bold",
|
|
14358
14344
|
text: ("t" in n ? n.t : i(c))("base.bold"),
|
|
@@ -14383,129 +14369,122 @@ const cp = {
|
|
|
14383
14369
|
{ label: "36", value: "36px", order: 10 },
|
|
14384
14370
|
{ label: "40", value: "40px", order: 11 },
|
|
14385
14371
|
{ label: "48", value: "48px", order: 12 }
|
|
14386
|
-
]
|
|
14387
|
-
|
|
14388
|
-
|
|
14389
|
-
(l
|
|
14372
|
+
], o = W(() => {
|
|
14373
|
+
var s, a, u, d;
|
|
14374
|
+
let l = (s = e.value) == null ? void 0 : s.getAttributes("textStyle").fontSize;
|
|
14375
|
+
if (!l) {
|
|
14376
|
+
if (!((a = e.value) != null && a.view.docView))
|
|
14377
|
+
return;
|
|
14378
|
+
const p = (u = e.value) == null ? void 0 : u.state.selection.from;
|
|
14379
|
+
let f = (d = e.value) == null ? void 0 : d.view.domAtPos(p).node;
|
|
14380
|
+
for (; f.nodeType !== 1; )
|
|
14381
|
+
f = f.parentNode;
|
|
14382
|
+
l = window.getComputedStyle(f).fontSize;
|
|
14383
|
+
}
|
|
14384
|
+
return l;
|
|
14385
|
+
});
|
|
14386
|
+
function t(l) {
|
|
14387
|
+
var s;
|
|
14388
|
+
(s = e.value) == null || s.chain().focus().setFontSize(l).run();
|
|
14390
14389
|
}
|
|
14391
|
-
return (
|
|
14392
|
-
|
|
14393
|
-
|
|
14394
|
-
|
|
14395
|
-
text: ("t" in t ? t.t : i(c))("base.fontSize.text"),
|
|
14390
|
+
return (l, s) => {
|
|
14391
|
+
const a = V;
|
|
14392
|
+
return m(), _(a, ve({
|
|
14393
|
+
text: ("t" in l ? l.t : i(c))("base.fontSize.text"),
|
|
14396
14394
|
"menu-type": "select",
|
|
14397
14395
|
"hide-text": "",
|
|
14398
14396
|
style: { width: "72px" },
|
|
14399
14397
|
"select-options": n,
|
|
14400
|
-
"select-value":
|
|
14401
|
-
},
|
|
14402
|
-
placeholder: ("t" in
|
|
14398
|
+
"select-value": i(o)
|
|
14399
|
+
}, l.$attrs, {
|
|
14400
|
+
placeholder: ("t" in l ? l.t : i(c))("base.fontSize.text"),
|
|
14403
14401
|
filterable: "",
|
|
14404
14402
|
"consistent-menu-width": !1,
|
|
14405
|
-
onMenuClick:
|
|
14403
|
+
onMenuClick: t
|
|
14406
14404
|
}), null, 16, ["text", "select-value", "placeholder"]);
|
|
14407
14405
|
};
|
|
14408
14406
|
}
|
|
14409
14407
|
}, Wp = {
|
|
14410
14408
|
__name: "font-family",
|
|
14411
14409
|
setup(r) {
|
|
14412
|
-
const { slimOptions: e, editor: n } = z(), o = Pe("recent")
|
|
14413
|
-
function
|
|
14414
|
-
if (!
|
|
14410
|
+
const { slimOptions: e, editor: n } = z(), o = Pe("recent");
|
|
14411
|
+
function t(u) {
|
|
14412
|
+
if (!u || u === "default")
|
|
14415
14413
|
return !0;
|
|
14416
|
-
const
|
|
14417
|
-
|
|
14418
|
-
const
|
|
14419
|
-
if (!
|
|
14414
|
+
const d = "Cambria", p = "text", f = 100, b = 100, h = document.createElement("canvas"), k = h.getContext("2d", { willReadFrequently: !0 });
|
|
14415
|
+
h.width = f, h.height = b, k && (k.textAlign = "center", k.fillStyle = "black", k.textBaseline = "middle");
|
|
14416
|
+
const C = (x) => {
|
|
14417
|
+
if (!k)
|
|
14420
14418
|
return [];
|
|
14421
|
-
|
|
14422
|
-
const { data:
|
|
14423
|
-
return Array.from(
|
|
14419
|
+
k.clearRect(0, 0, f, b), k.font = `${b / 4}px ${x}, ${d}`, k.fillText(p, f / 2, b / 2);
|
|
14420
|
+
const { data: T } = k.getImageData(0, 0, f, b);
|
|
14421
|
+
return Array.from(T).filter((w) => w !== 0);
|
|
14424
14422
|
};
|
|
14425
|
-
return
|
|
14426
|
-
}
|
|
14427
|
-
const
|
|
14428
|
-
var
|
|
14429
|
-
const
|
|
14430
|
-
...
|
|
14431
|
-
disabled: !
|
|
14432
|
-
})),
|
|
14423
|
+
return C(d).join("") !== C(u).join("");
|
|
14424
|
+
}
|
|
14425
|
+
const l = W(() => {
|
|
14426
|
+
var f;
|
|
14427
|
+
const u = (b) => b.map((h) => ({
|
|
14428
|
+
...h,
|
|
14429
|
+
disabled: !t(h.value)
|
|
14430
|
+
})), d = [
|
|
14433
14431
|
{
|
|
14434
14432
|
type: "group",
|
|
14435
14433
|
key: "all",
|
|
14436
14434
|
label: c("base.fontFamily.all"),
|
|
14437
|
-
children:
|
|
14435
|
+
children: u((f = e.value.dicts) == null ? void 0 : f.fonts) ?? []
|
|
14438
14436
|
}
|
|
14439
|
-
],
|
|
14440
|
-
(
|
|
14441
|
-
var
|
|
14442
|
-
return ((
|
|
14443
|
-
({ value:
|
|
14437
|
+
], p = (b) => b.map(
|
|
14438
|
+
(h) => {
|
|
14439
|
+
var k;
|
|
14440
|
+
return ((k = e.value.dicts) == null ? void 0 : k.fonts.find(
|
|
14441
|
+
({ value: C }) => C === h
|
|
14444
14442
|
)) ?? {
|
|
14445
|
-
label:
|
|
14446
|
-
item:
|
|
14443
|
+
label: h,
|
|
14444
|
+
item: h
|
|
14447
14445
|
};
|
|
14448
14446
|
}
|
|
14449
14447
|
);
|
|
14450
|
-
return o.value.fonts.length > 0 &&
|
|
14448
|
+
return o.value.fonts.length > 0 && d.unshift({
|
|
14451
14449
|
type: "group",
|
|
14452
14450
|
key: "recent",
|
|
14453
14451
|
label: c("base.fontFamily.recent"),
|
|
14454
|
-
children: p(
|
|
14455
|
-
}),
|
|
14456
|
-
type: "group",
|
|
14457
|
-
key: "used",
|
|
14458
|
-
label: c("base.fontFamily.used"),
|
|
14459
|
-
children: p(b(t.value))
|
|
14460
|
-
}), f;
|
|
14452
|
+
children: u(p(o.value.fonts))
|
|
14453
|
+
}), d;
|
|
14461
14454
|
});
|
|
14462
|
-
function
|
|
14463
|
-
return
|
|
14464
|
-
_e("span", { style: { fontFamily:
|
|
14465
|
-
!
|
|
14455
|
+
function s(u) {
|
|
14456
|
+
return u.type === "group" && u.value === "default" ? `${u.label}` : _e("div", { class: "smart-font-family-item" }, [
|
|
14457
|
+
_e("span", { style: { fontFamily: u.value ?? void 0 } }, Ye(u.label)),
|
|
14458
|
+
!t(u.value ?? "") && _e("span", { class: "smart-font-family-unsupport", title: c("base.fontFamily.unsupport") }, "!")
|
|
14466
14459
|
]);
|
|
14467
14460
|
}
|
|
14468
|
-
function u
|
|
14469
|
-
var
|
|
14470
|
-
|
|
14471
|
-
|
|
14472
|
-
|
|
14473
|
-
const C = h.replace('"fontFamily":"', "").replace('"', "");
|
|
14474
|
-
t.value.includes(C) || t.value.push(C);
|
|
14475
|
-
}
|
|
14461
|
+
function a(u) {
|
|
14462
|
+
var d, p;
|
|
14463
|
+
u && u !== "default" ? (o.value.fonts.forEach((f, b) => {
|
|
14464
|
+
f === u && o.value.fonts.splice(b, 1);
|
|
14465
|
+
}), o.value.fonts.unshift(u), o.value.fonts.length > 10 && o.value.fonts.splice(10, 1), (d = n.value) == null || d.chain().focus().setFontFamily(u).run()) : (p = n.value) == null || p.chain().focus().unsetFontFamily().run();
|
|
14476
14466
|
}
|
|
14477
|
-
|
|
14478
|
-
var f
|
|
14479
|
-
|
|
14480
|
-
|
|
14481
|
-
|
|
14482
|
-
}
|
|
14483
|
-
return de(
|
|
14484
|
-
() => n.value,
|
|
14485
|
-
(p) => {
|
|
14486
|
-
p && u();
|
|
14487
|
-
}
|
|
14488
|
-
), (p, f) => {
|
|
14489
|
-
var h;
|
|
14490
|
-
const b = W;
|
|
14491
|
-
return m(), _(b, ve({
|
|
14492
|
-
text: ("t" in p ? p.t : i(c))("base.fontFamily.text"),
|
|
14467
|
+
return (u, d) => {
|
|
14468
|
+
var f;
|
|
14469
|
+
const p = V;
|
|
14470
|
+
return m(), _(p, ve({
|
|
14471
|
+
text: ("t" in u ? u.t : i(c))("base.fontFamily.text"),
|
|
14493
14472
|
"menu-type": "select",
|
|
14494
14473
|
"hide-text": "",
|
|
14495
|
-
"select-options": i(
|
|
14496
|
-
"select-value": ((
|
|
14497
|
-
},
|
|
14498
|
-
placeholder: ("t" in
|
|
14499
|
-
"render-label":
|
|
14474
|
+
"select-options": i(l),
|
|
14475
|
+
"select-value": ((f = i(n)) == null ? void 0 : f.getAttributes("textStyle").fontFamily) || "default"
|
|
14476
|
+
}, u.$attrs, {
|
|
14477
|
+
placeholder: ("t" in u ? u.t : i(c))("base.fontFamily.text"),
|
|
14478
|
+
"render-label": s,
|
|
14500
14479
|
"consistent-menu-width": !1,
|
|
14501
|
-
onMenuClick:
|
|
14480
|
+
onMenuClick: a
|
|
14502
14481
|
}), null, 16, ["text", "select-options", "select-value", "placeholder"]);
|
|
14503
14482
|
};
|
|
14504
14483
|
}
|
|
14505
|
-
},
|
|
14484
|
+
}, Vp = {
|
|
14506
14485
|
__name: "heading",
|
|
14507
14486
|
setup(r) {
|
|
14508
|
-
const { editor: e } = z(), n =
|
|
14487
|
+
const { editor: e } = z(), n = W(() => {
|
|
14509
14488
|
const l = [
|
|
14510
14489
|
{ label: c("base.heading.paragraph"), desc: "text", value: "paragraph" }
|
|
14511
14490
|
];
|
|
@@ -14518,7 +14497,7 @@ const cp = {
|
|
|
14518
14497
|
});
|
|
14519
14498
|
}
|
|
14520
14499
|
return l;
|
|
14521
|
-
}), o =
|
|
14500
|
+
}), o = W(() => {
|
|
14522
14501
|
var s;
|
|
14523
14502
|
const l = (a) => {
|
|
14524
14503
|
var u;
|
|
@@ -14548,7 +14527,7 @@ const cp = {
|
|
|
14548
14527
|
}
|
|
14549
14528
|
return (l, s) => {
|
|
14550
14529
|
var u, d;
|
|
14551
|
-
const a =
|
|
14530
|
+
const a = V;
|
|
14552
14531
|
return m(), _(a, {
|
|
14553
14532
|
text: ("t" in l ? l.t : i(c))("base.heading.tip"),
|
|
14554
14533
|
"hide-text": "",
|
|
@@ -14564,7 +14543,7 @@ const cp = {
|
|
|
14564
14543
|
}, null, 8, ["text", "placeholder", "select-value", "select-options", "disabled"]);
|
|
14565
14544
|
};
|
|
14566
14545
|
}
|
|
14567
|
-
},
|
|
14546
|
+
}, Dp = /* @__PURE__ */ H(Vp, [["__scopeId", "data-v-8a16bdad"]]), Up = {
|
|
14568
14547
|
__name: "clear-format",
|
|
14569
14548
|
setup(r) {
|
|
14570
14549
|
const { editor: e } = z();
|
|
@@ -14573,7 +14552,7 @@ const cp = {
|
|
|
14573
14552
|
(o = e.value) == null || o.commands.unsetFormatPainter(), (t = e.value) == null || t.chain().focus().unsetAllMarks().run();
|
|
14574
14553
|
}
|
|
14575
14554
|
return (o, t) => {
|
|
14576
|
-
const l =
|
|
14555
|
+
const l = V;
|
|
14577
14556
|
return m(), _(l, {
|
|
14578
14557
|
ico: "i-sed:clear",
|
|
14579
14558
|
text: ("t" in o ? o.t : i(c))("base.clearFormat"),
|
|
@@ -14587,7 +14566,7 @@ const cp = {
|
|
|
14587
14566
|
setup(r) {
|
|
14588
14567
|
const { config: e } = z();
|
|
14589
14568
|
return (n, o) => {
|
|
14590
|
-
const t = Up, l =
|
|
14569
|
+
const t = Up, l = Dp, s = Wp, a = Pp, u = Op, d = zp, p = Hp, f = Fp, b = Ip, h = Rp, k = Lp, C = Bp, x = Mp, T = $p, w = Cp, y = kp, L = yp, R = hp, I = fp, U = mp, O = pp;
|
|
14591
14570
|
return m(), $("div", Jp, [
|
|
14592
14571
|
v(t),
|
|
14593
14572
|
v(l),
|
|
@@ -14599,12 +14578,12 @@ const cp = {
|
|
|
14599
14578
|
v(f),
|
|
14600
14579
|
v(b),
|
|
14601
14580
|
v(h),
|
|
14581
|
+
v(k),
|
|
14602
14582
|
v(C),
|
|
14603
|
-
v(y),
|
|
14604
|
-
v(w),
|
|
14605
|
-
v(T),
|
|
14606
14583
|
v(x),
|
|
14607
|
-
v(
|
|
14584
|
+
v(T),
|
|
14585
|
+
v(w),
|
|
14586
|
+
v(y),
|
|
14608
14587
|
v(L),
|
|
14609
14588
|
v(R),
|
|
14610
14589
|
i(e).canFill ? (m(), _(I, { key: 0 })) : F("", !0),
|
|
@@ -14616,7 +14595,7 @@ const cp = {
|
|
|
14616
14595
|
}, jp = /* @__PURE__ */ H(qp, [["__scopeId", "data-v-941be6af"]]), Gp = ["id"], Kp = {
|
|
14617
14596
|
key: 0,
|
|
14618
14597
|
class: "smart-toolbar"
|
|
14619
|
-
},
|
|
14598
|
+
}, Yp = { class: "smart-main" }, zf = /* @__PURE__ */ Object.assign({ name: "SmartEditorSlim" }, {
|
|
14620
14599
|
__name: "index",
|
|
14621
14600
|
props: /* @__PURE__ */ nn(["config"], {
|
|
14622
14601
|
modelValue: {},
|
|
@@ -14626,7 +14605,7 @@ const cp = {
|
|
|
14626
14605
|
setup(r, { emit: e }) {
|
|
14627
14606
|
const n = r, o = e;
|
|
14628
14607
|
fd();
|
|
14629
|
-
const t =
|
|
14608
|
+
const t = Vn(
|
|
14630
14609
|
{
|
|
14631
14610
|
selector: "html",
|
|
14632
14611
|
attribute: "theme-mode",
|
|
@@ -14634,56 +14613,56 @@ const cp = {
|
|
|
14634
14613
|
valueLight: "light"
|
|
14635
14614
|
}
|
|
14636
14615
|
), { container: l, locale: s, editor: a, setConfig: u, showTableBar: d } = z();
|
|
14637
|
-
|
|
14616
|
+
Dn(() => {
|
|
14638
14617
|
u(n.config);
|
|
14639
14618
|
});
|
|
14640
|
-
function p(
|
|
14641
|
-
const
|
|
14619
|
+
function p(C) {
|
|
14620
|
+
const x = {
|
|
14642
14621
|
"&": "&"
|
|
14643
14622
|
// '<': '<',
|
|
14644
14623
|
// '>': '>',
|
|
14645
14624
|
// '"': '"',
|
|
14646
14625
|
// ''': "'",
|
|
14647
14626
|
};
|
|
14648
|
-
return
|
|
14627
|
+
return C.replace(/&/g, (T) => x[T]);
|
|
14649
14628
|
}
|
|
14650
|
-
const f =
|
|
14651
|
-
function b(
|
|
14652
|
-
const
|
|
14653
|
-
if (!
|
|
14629
|
+
const f = W(() => !n.config.readOnly);
|
|
14630
|
+
function b(C) {
|
|
14631
|
+
const x = /\$([^$]*)\$/g;
|
|
14632
|
+
if (!C)
|
|
14654
14633
|
return "";
|
|
14655
|
-
const T = p(
|
|
14656
|
-
return T ? T.replace(
|
|
14657
|
-
|
|
14634
|
+
const T = p(C);
|
|
14635
|
+
return T ? T.replace(x, (w, y) => `<span class="Tiptap-mathematics-render Tiptap-mathematics-render--editable ProseMirror-widget">${ao.renderToString(
|
|
14636
|
+
y,
|
|
14658
14637
|
{ throwOnError: !1 }
|
|
14659
14638
|
)}</span>`) : "";
|
|
14660
14639
|
}
|
|
14661
14640
|
const h = yr(r, "modelValue");
|
|
14662
14641
|
Fe(() => {
|
|
14663
|
-
var
|
|
14664
|
-
(
|
|
14642
|
+
var C;
|
|
14643
|
+
(C = a.value) == null || C.commands.setContent(h.value);
|
|
14665
14644
|
});
|
|
14666
|
-
function
|
|
14667
|
-
var
|
|
14668
|
-
(
|
|
14645
|
+
function k() {
|
|
14646
|
+
var C;
|
|
14647
|
+
(C = a.value) == null || C.destroy();
|
|
14669
14648
|
}
|
|
14670
|
-
return
|
|
14671
|
-
|
|
14672
|
-
}),
|
|
14649
|
+
return Ze(() => {
|
|
14650
|
+
k();
|
|
14651
|
+
}), pe(
|
|
14673
14652
|
() => a.value,
|
|
14674
14653
|
() => {
|
|
14675
14654
|
a.value && (a.value.on("create", () => {
|
|
14676
14655
|
o("getHtml", b(a.value.getHTML()));
|
|
14677
14656
|
}), a.value.on("update", () => {
|
|
14678
14657
|
o("getHtml", b(a.value.getHTML())), h.value = a.value.getJSON();
|
|
14679
|
-
}), a.value.on("selectionUpdate", ({ editor:
|
|
14680
|
-
const { $from:
|
|
14681
|
-
d.value =
|
|
14658
|
+
}), a.value.on("selectionUpdate", ({ editor: C }) => {
|
|
14659
|
+
const { $from: x } = C.state.selection;
|
|
14660
|
+
d.value = x.parent.type.name === "tableCell";
|
|
14682
14661
|
}));
|
|
14683
14662
|
}
|
|
14684
|
-
), (
|
|
14685
|
-
const T = jp,
|
|
14686
|
-
return m(), _(
|
|
14663
|
+
), (C, x) => {
|
|
14664
|
+
const T = jp, w = dp, y = On;
|
|
14665
|
+
return m(), _(y, {
|
|
14687
14666
|
"cls-prefix": "se",
|
|
14688
14667
|
"theme-overrides": i(t) ? i(fo) : i(mo),
|
|
14689
14668
|
locale: i(s) !== "en_US" ? i(En) : i(In),
|
|
@@ -14698,8 +14677,8 @@ const cp = {
|
|
|
14698
14677
|
i(f) ? (m(), $("header", Kp, [
|
|
14699
14678
|
v(T)
|
|
14700
14679
|
])) : F("", !0),
|
|
14701
|
-
g("main",
|
|
14702
|
-
v(
|
|
14680
|
+
g("main", Yp, [
|
|
14681
|
+
v(w)
|
|
14703
14682
|
])
|
|
14704
14683
|
], 8, Gp)
|
|
14705
14684
|
]),
|