smart-editor-v3 1.4.4 → 1.4.5
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 +373 -360
- package/dist/style.css +1 -1
- package/package.json +2 -1
|
@@ -5,7 +5,7 @@ import "./style.css";
|
|
|
5
5
|
import { NTooltip as Wt, NButton as Se, NPopover as Yo, NDrawerContent as Zo, NDrawer as Qo, NInput as In, NCheckbox as er, NCard as tr, NDropdown as rt, NSelect as En, NColorPicker as Nn, NBackTop as nr, NModal as or, NFormItem as rr, NInputNumber as Rn, useMessage as lr, zhCN as Fn, enUS as Hn, dateZhCN as zn, dateEnUS as Dn, darkTheme as On, NMessageProvider as sr, NConfigProvider as Pn } from "naive-ui";
|
|
6
6
|
import { createI18n as ir } from "vue-i18n";
|
|
7
7
|
import { useStorage as nn, createGlobalState as ar, useTimeAgo as ur, useFullscreen as Vn, useOnline as cr, useWindowSize as Ut, onClickOutside as Tt, useClipboard as dr, useElementBounding as pr, useThrottleFn as Wn, useDebounceFn as mr, useResizeObserver as hr, useFileDialog as Jt, useDark as Un, useTimestamp as fr, createInjectionState as br } from "@vueuse/core";
|
|
8
|
-
import { ref as B, watch as de, openBlock as h, createElementBlock as M, Fragment as q, renderList as ve, unref as i, createElementVNode as v, toDisplayString as I, normalizeClass as K, createBlock as _, resolveDynamicComponent as ue, withCtx as A, createTextVNode as te, renderSlot as pe, computed as U, onMounted as Re, inject as gr, createVNode as
|
|
8
|
+
import { ref as B, watch as de, openBlock as h, createElementBlock as M, Fragment as q, renderList as ve, unref as i, createElementVNode as v, toDisplayString as I, normalizeClass as K, createBlock as _, resolveDynamicComponent as ue, withCtx as A, createTextVNode as te, renderSlot as pe, computed as U, onMounted as Re, inject as gr, createVNode as b, createCommentVNode as R, normalizeStyle as re, isRef as je, h as _e, onUnmounted as vr, onBeforeUnmount as Xe, useAttrs as qt, mergeProps as ge, withDirectives as _t, vShow as yt, nextTick as _r, onBeforeMount as Jn, provide as on, mergeModels as rn, useModel as yr } from "vue";
|
|
9
9
|
import Cr from "dexie";
|
|
10
10
|
import Ct from "hotkeys-js";
|
|
11
11
|
import { Extension as $e, findParentNode as lt, Node as Y, mergeAttributes as X, findChildren as bt, defaultBlockAt as qn, isActive as kr, isMacOS as wr, createStyleTag as xr, nodeInputRule as Ar, findParentNodeClosestToPos as Tr, callOrReturn as Sr, getExtensionField as $r } from "@tiptap/core";
|
|
@@ -1196,7 +1196,7 @@ const $ = ar(() => {
|
|
|
1196
1196
|
marks: S
|
|
1197
1197
|
}) => {
|
|
1198
1198
|
s.value.enabled = C, s.value.once = w, s.value.marks = S;
|
|
1199
|
-
}, u = B([]), p = `#smart-editor-${Te(4)}`, d = B(!1), m = B(!1), f = B(!1),
|
|
1199
|
+
}, u = B([]), p = `#smart-editor-${Te(4)}`, d = B(!1), m = B(!1), f = B(!1), g = (C) => {
|
|
1200
1200
|
e.value = C;
|
|
1201
1201
|
}, k = (C) => {
|
|
1202
1202
|
const w = Object.keys(C).includes("value") ? C.value : C;
|
|
@@ -1259,7 +1259,7 @@ const $ = ar(() => {
|
|
|
1259
1259
|
assistantBox: f,
|
|
1260
1260
|
blockMenu: d,
|
|
1261
1261
|
editor: e,
|
|
1262
|
-
setEditor:
|
|
1262
|
+
setEditor: g,
|
|
1263
1263
|
editorDestroyed: n,
|
|
1264
1264
|
searchReplace: m,
|
|
1265
1265
|
options: t,
|
|
@@ -1569,7 +1569,7 @@ const Be = {
|
|
|
1569
1569
|
Re(() => {
|
|
1570
1570
|
p.value = Vn(document.querySelector(e)), wt("f11, command+f11", p.value.toggle);
|
|
1571
1571
|
});
|
|
1572
|
-
const f = B(!1),
|
|
1572
|
+
const f = B(!1), g = cr(), k = gr("saveContent");
|
|
1573
1573
|
function y() {
|
|
1574
1574
|
k(), f.value = !1;
|
|
1575
1575
|
}
|
|
@@ -1595,11 +1595,11 @@ const Be = {
|
|
|
1595
1595
|
return h(), M(q, null, [
|
|
1596
1596
|
v("div", $l, [
|
|
1597
1597
|
v("div", Ml, [
|
|
1598
|
-
|
|
1598
|
+
b(D, {
|
|
1599
1599
|
content: i(o).showToc ? ("t" in x ? x.t : i(c))("toc.hide") : ("t" in x ? x.t : i(c))("toc.show")
|
|
1600
1600
|
}, {
|
|
1601
1601
|
default: A(() => [
|
|
1602
|
-
|
|
1602
|
+
b(z, {
|
|
1603
1603
|
class: K(["smart-status-bar-button", { active: i(o).showToc }]),
|
|
1604
1604
|
quaternary: "",
|
|
1605
1605
|
size: "tiny",
|
|
@@ -1613,11 +1613,11 @@ const Be = {
|
|
|
1613
1613
|
]),
|
|
1614
1614
|
_: 1
|
|
1615
1615
|
}, 8, ["content"]),
|
|
1616
|
-
|
|
1616
|
+
b(D, {
|
|
1617
1617
|
content: i(o).showTool ? ("t" in x ? x.t : i(c))("tool.hide") : ("t" in x ? x.t : i(c))("tool.show")
|
|
1618
1618
|
}, {
|
|
1619
1619
|
default: A(() => [
|
|
1620
|
-
|
|
1620
|
+
b(z, {
|
|
1621
1621
|
class: K(["smart-status-bar-button", { active: i(o).showTool }]),
|
|
1622
1622
|
quaternary: "",
|
|
1623
1623
|
size: "tiny",
|
|
@@ -1631,11 +1631,11 @@ const Be = {
|
|
|
1631
1631
|
]),
|
|
1632
1632
|
_: 1
|
|
1633
1633
|
}, 8, ["content"]),
|
|
1634
|
-
|
|
1634
|
+
b(D, {
|
|
1635
1635
|
content: ("t" in x ? x.t : i(c))("shortcut.title")
|
|
1636
1636
|
}, {
|
|
1637
1637
|
default: A(() => [
|
|
1638
|
-
|
|
1638
|
+
b(z, {
|
|
1639
1639
|
class: "smart-status-bar-button",
|
|
1640
1640
|
quaternary: "",
|
|
1641
1641
|
size: "tiny",
|
|
@@ -1649,13 +1649,13 @@ const Be = {
|
|
|
1649
1649
|
]),
|
|
1650
1650
|
_: 1
|
|
1651
1651
|
}, 8, ["content"]),
|
|
1652
|
-
|
|
1652
|
+
b(D, {
|
|
1653
1653
|
content: `${(j = i(p)) != null && j.isFullscreen ? ("t" in x ? x.t : i(c))("fullscreen.disable") : ("t" in x ? x.t : i(c))("fullscreen.title")} (F11 / ⌘+F11)`
|
|
1654
1654
|
}, {
|
|
1655
1655
|
default: A(() => {
|
|
1656
1656
|
var J;
|
|
1657
1657
|
return [
|
|
1658
|
-
|
|
1658
|
+
b(z, {
|
|
1659
1659
|
class: "smart-status-bar-button",
|
|
1660
1660
|
quaternary: "",
|
|
1661
1661
|
size: "tiny",
|
|
@@ -1675,11 +1675,11 @@ const Be = {
|
|
|
1675
1675
|
}),
|
|
1676
1676
|
_: 1
|
|
1677
1677
|
}, 8, ["content"]),
|
|
1678
|
-
|
|
1678
|
+
b(D, {
|
|
1679
1679
|
content: ("t" in x ? x.t : i(c))("poweredBy")
|
|
1680
1680
|
}, {
|
|
1681
1681
|
default: A(() => [
|
|
1682
|
-
|
|
1682
|
+
b(z, {
|
|
1683
1683
|
class: "smart-status-bar-button",
|
|
1684
1684
|
quaternary: "",
|
|
1685
1685
|
size: "tiny",
|
|
@@ -1693,11 +1693,11 @@ const Be = {
|
|
|
1693
1693
|
]),
|
|
1694
1694
|
_: 1
|
|
1695
1695
|
}, 8, ["content"]),
|
|
1696
|
-
|
|
1696
|
+
b(D, {
|
|
1697
1697
|
content: ("t" in x ? x.t : i(c))("feedback")
|
|
1698
1698
|
}, {
|
|
1699
1699
|
default: A(() => [
|
|
1700
|
-
|
|
1700
|
+
b(z, {
|
|
1701
1701
|
class: "smart-status-bar-button",
|
|
1702
1702
|
quaternary: "",
|
|
1703
1703
|
size: "tiny",
|
|
@@ -1712,7 +1712,7 @@ const Be = {
|
|
|
1712
1712
|
_: 1
|
|
1713
1713
|
}, 8, ["content"]),
|
|
1714
1714
|
L[9] || (L[9] = v("div", { class: "smart-status-bar-split" }, null, -1)),
|
|
1715
|
-
|
|
1715
|
+
b(N, {
|
|
1716
1716
|
placement: "top",
|
|
1717
1717
|
to: i(e),
|
|
1718
1718
|
"show-arrow": !1,
|
|
@@ -1720,7 +1720,7 @@ const Be = {
|
|
|
1720
1720
|
"onUpdate:show": L[1] || (L[1] = (J) => a.value = J)
|
|
1721
1721
|
}, {
|
|
1722
1722
|
trigger: A(() => [
|
|
1723
|
-
|
|
1723
|
+
b(z, {
|
|
1724
1724
|
class: "smart-status-bar-button word-count",
|
|
1725
1725
|
quaternary: "",
|
|
1726
1726
|
size: "tiny"
|
|
@@ -1761,7 +1761,7 @@ const Be = {
|
|
|
1761
1761
|
}),
|
|
1762
1762
|
_: 1
|
|
1763
1763
|
}, 8, ["to"]),
|
|
1764
|
-
|
|
1764
|
+
b(N, {
|
|
1765
1765
|
placement: "top",
|
|
1766
1766
|
show: i(f),
|
|
1767
1767
|
to: i(e),
|
|
@@ -1771,7 +1771,7 @@ const Be = {
|
|
|
1771
1771
|
"onUpdate:show": L[2] || (L[2] = (J) => f.value = J)
|
|
1772
1772
|
}, {
|
|
1773
1773
|
trigger: A(() => [
|
|
1774
|
-
|
|
1774
|
+
b(z, {
|
|
1775
1775
|
class: K(["smart-toolbar-actions-button", { active: i(f) }]),
|
|
1776
1776
|
quaternary: "",
|
|
1777
1777
|
size: "tiny"
|
|
@@ -1779,7 +1779,7 @@ const Be = {
|
|
|
1779
1779
|
default: A(() => [
|
|
1780
1780
|
v("span", Rl, [
|
|
1781
1781
|
v("i", {
|
|
1782
|
-
class: K(["smart-status-online i-sed:pluse", { offline: !i(
|
|
1782
|
+
class: K(["smart-status-online i-sed:pluse", { offline: !i(g) }])
|
|
1783
1783
|
}, null, 2),
|
|
1784
1784
|
v("span", Fl, [
|
|
1785
1785
|
i(l) ? (h(), M("span", {
|
|
@@ -1798,7 +1798,7 @@ const Be = {
|
|
|
1798
1798
|
]),
|
|
1799
1799
|
default: A(() => [
|
|
1800
1800
|
v("div", Dl, [
|
|
1801
|
-
v("div", null, I(("t" in x ? x.t : i(c))("save.network")) + " " + I(i(
|
|
1801
|
+
v("div", null, I(("t" in x ? x.t : i(c))("save.network")) + " " + I(i(g) ? ("t" in x ? x.t : i(c))("save.online") : ("t" in x ? x.t : i(c))("save.offline")), 1),
|
|
1802
1802
|
v("div", null, [
|
|
1803
1803
|
te(I(("t" in x ? x.t : i(c))("save.savedAt")) + " ", 1),
|
|
1804
1804
|
i(l) ? (h(), M("span", {
|
|
@@ -1810,7 +1810,7 @@ const Be = {
|
|
|
1810
1810
|
}, null, 8, Pl))
|
|
1811
1811
|
]),
|
|
1812
1812
|
v("div", Vl, [
|
|
1813
|
-
|
|
1813
|
+
b(z, {
|
|
1814
1814
|
size: "tiny",
|
|
1815
1815
|
type: "primary",
|
|
1816
1816
|
onClick: y
|
|
@@ -1820,7 +1820,7 @@ const Be = {
|
|
|
1820
1820
|
]),
|
|
1821
1821
|
_: 1
|
|
1822
1822
|
}),
|
|
1823
|
-
|
|
1823
|
+
b(z, {
|
|
1824
1824
|
size: "tiny",
|
|
1825
1825
|
onClick: C
|
|
1826
1826
|
}, {
|
|
@@ -1836,7 +1836,7 @@ const Be = {
|
|
|
1836
1836
|
}, 8, ["show", "to"])
|
|
1837
1837
|
])
|
|
1838
1838
|
]),
|
|
1839
|
-
|
|
1839
|
+
b(V, {
|
|
1840
1840
|
show: i(s),
|
|
1841
1841
|
"onUpdate:show": L[3] || (L[3] = (J) => je(s) ? s.value = J : null),
|
|
1842
1842
|
width: 320,
|
|
@@ -1845,7 +1845,7 @@ const Be = {
|
|
|
1845
1845
|
to: i(e)
|
|
1846
1846
|
}, {
|
|
1847
1847
|
default: A(() => [
|
|
1848
|
-
|
|
1848
|
+
b(T, { "body-content-class": "smart-scrollbar" }, {
|
|
1849
1849
|
header: A(() => [
|
|
1850
1850
|
v("div", Wl, [
|
|
1851
1851
|
L[10] || (L[10] = v("i", { class: "smart-icon i-sed:shortcut" }, null, -1)),
|
|
@@ -1853,7 +1853,7 @@ const Be = {
|
|
|
1853
1853
|
])
|
|
1854
1854
|
]),
|
|
1855
1855
|
default: A(() => [
|
|
1856
|
-
|
|
1856
|
+
b(W)
|
|
1857
1857
|
]),
|
|
1858
1858
|
_: 1
|
|
1859
1859
|
})
|
|
@@ -1977,7 +1977,7 @@ const jl = { class: "smart-search-replace-container" }, Gl = { class: "smart-sea
|
|
|
1977
1977
|
w !== S && m(!0);
|
|
1978
1978
|
}
|
|
1979
1979
|
);
|
|
1980
|
-
function
|
|
1980
|
+
function g() {
|
|
1981
1981
|
var w;
|
|
1982
1982
|
(w = e.value) == null || w.commands.nextSearchResult(), f();
|
|
1983
1983
|
}
|
|
@@ -2007,7 +2007,7 @@ const jl = { class: "smart-search-replace-container" }, Gl = { class: "smart-sea
|
|
|
2007
2007
|
"initial-value": l
|
|
2008
2008
|
}, {
|
|
2009
2009
|
default: A(() => [
|
|
2010
|
-
|
|
2010
|
+
b(D, {
|
|
2011
2011
|
"header-style": "cursor:move",
|
|
2012
2012
|
title: ("t" in w ? w.t : i(c))("search.title"),
|
|
2013
2013
|
closable: "",
|
|
@@ -2017,7 +2017,7 @@ const jl = { class: "smart-search-replace-container" }, Gl = { class: "smart-sea
|
|
|
2017
2017
|
default: A(() => [
|
|
2018
2018
|
v("div", jl, [
|
|
2019
2019
|
v("div", Gl, [
|
|
2020
|
-
|
|
2020
|
+
b(x, {
|
|
2021
2021
|
value: i(s),
|
|
2022
2022
|
"onUpdate:value": S[0] || (S[0] = (N) => je(s) ? s.value = N : null),
|
|
2023
2023
|
placeholder: ("t" in w ? w.t : i(c))("search.searchText"),
|
|
@@ -2031,17 +2031,17 @@ const jl = { class: "smart-search-replace-container" }, Gl = { class: "smart-sea
|
|
|
2031
2031
|
}),
|
|
2032
2032
|
_: 1
|
|
2033
2033
|
}, 8, ["value", "placeholder"]),
|
|
2034
|
-
|
|
2034
|
+
b(L, {
|
|
2035
2035
|
disabled: i(p) === 0,
|
|
2036
2036
|
quaternary: "",
|
|
2037
|
-
onClick:
|
|
2037
|
+
onClick: g
|
|
2038
2038
|
}, {
|
|
2039
2039
|
default: A(() => S[4] || (S[4] = [
|
|
2040
2040
|
v("i", { class: "i-sed:arrow-down" }, null, -1)
|
|
2041
2041
|
])),
|
|
2042
2042
|
_: 1
|
|
2043
2043
|
}, 8, ["disabled"]),
|
|
2044
|
-
|
|
2044
|
+
b(L, {
|
|
2045
2045
|
disabled: i(p) === 0,
|
|
2046
2046
|
quaternary: "",
|
|
2047
2047
|
onClick: k
|
|
@@ -2056,7 +2056,7 @@ const jl = { class: "smart-search-replace-container" }, Gl = { class: "smart-sea
|
|
|
2056
2056
|
}, 8, ["disabled"])
|
|
2057
2057
|
]),
|
|
2058
2058
|
v("div", Kl, [
|
|
2059
|
-
|
|
2059
|
+
b(x, {
|
|
2060
2060
|
value: i(a),
|
|
2061
2061
|
"onUpdate:value": S[1] || (S[1] = (N) => je(a) ? a.value = N : null),
|
|
2062
2062
|
placeholder: ("t" in w ? w.t : i(c))("search.replaceText"),
|
|
@@ -2064,7 +2064,7 @@ const jl = { class: "smart-search-replace-container" }, Gl = { class: "smart-sea
|
|
|
2064
2064
|
}, null, 8, ["value", "placeholder"])
|
|
2065
2065
|
]),
|
|
2066
2066
|
v("div", Xl, [
|
|
2067
|
-
|
|
2067
|
+
b(z, {
|
|
2068
2068
|
checked: i(u),
|
|
2069
2069
|
"onUpdate:checked": S[2] || (S[2] = (N) => je(u) ? u.value = N : null)
|
|
2070
2070
|
}, {
|
|
@@ -2075,7 +2075,7 @@ const jl = { class: "smart-search-replace-container" }, Gl = { class: "smart-sea
|
|
|
2075
2075
|
}, 8, ["checked"])
|
|
2076
2076
|
]),
|
|
2077
2077
|
v("div", Yl, [
|
|
2078
|
-
|
|
2078
|
+
b(L, {
|
|
2079
2079
|
disabled: i(p) === 0,
|
|
2080
2080
|
quaternary: "",
|
|
2081
2081
|
onClick: y
|
|
@@ -2085,7 +2085,7 @@ const jl = { class: "smart-search-replace-container" }, Gl = { class: "smart-sea
|
|
|
2085
2085
|
]),
|
|
2086
2086
|
_: 1
|
|
2087
2087
|
}, 8, ["disabled"]),
|
|
2088
|
-
|
|
2088
|
+
b(L, {
|
|
2089
2089
|
disabled: i(p) === 0,
|
|
2090
2090
|
quaternary: "",
|
|
2091
2091
|
onClick: C
|
|
@@ -2095,10 +2095,10 @@ const jl = { class: "smart-search-replace-container" }, Gl = { class: "smart-sea
|
|
|
2095
2095
|
]),
|
|
2096
2096
|
_: 1
|
|
2097
2097
|
}, 8, ["disabled"]),
|
|
2098
|
-
|
|
2098
|
+
b(L, {
|
|
2099
2099
|
disabled: i(p) === 0,
|
|
2100
2100
|
type: "primary",
|
|
2101
|
-
onClick:
|
|
2101
|
+
onClick: g
|
|
2102
2102
|
}, {
|
|
2103
2103
|
default: A(() => [
|
|
2104
2104
|
te(I(("t" in w ? w.t : i(c))("search.search")), 1)
|
|
@@ -2132,9 +2132,9 @@ const jl = { class: "smart-search-replace-container" }, Gl = { class: "smart-sea
|
|
|
2132
2132
|
var d, m;
|
|
2133
2133
|
(d = n.value) == null || d.chain().focus().setCurrentNodeSelection().unsetAllMarks().run();
|
|
2134
2134
|
const u = n.value ? Ne(n.value) : null, p = () => {
|
|
2135
|
-
var
|
|
2135
|
+
var g;
|
|
2136
2136
|
let f = 0;
|
|
2137
|
-
return (
|
|
2137
|
+
return (g = n.value) == null || g.state.doc.descendants((k, y) => {
|
|
2138
2138
|
k === u && (f = y + k.nodeSize);
|
|
2139
2139
|
}), f;
|
|
2140
2140
|
};
|
|
@@ -2150,9 +2150,9 @@ const jl = { class: "smart-search-replace-container" }, Gl = { class: "smart-sea
|
|
|
2150
2150
|
onClick: () => {
|
|
2151
2151
|
var m;
|
|
2152
2152
|
const u = n.value ? Ne(n.value) : null, p = () => {
|
|
2153
|
-
var
|
|
2153
|
+
var g;
|
|
2154
2154
|
let f = 0;
|
|
2155
|
-
return (
|
|
2155
|
+
return (g = n.value) == null || g.state.doc.descendants((k, y) => {
|
|
2156
2156
|
k === u && (f = y + k.nodeSize);
|
|
2157
2157
|
}), f;
|
|
2158
2158
|
}, d = u == null ? void 0 : u.type.create(
|
|
@@ -2218,13 +2218,13 @@ const jl = { class: "smart-search-replace-container" }, Gl = { class: "smart-sea
|
|
|
2218
2218
|
"onUpdate:show": a
|
|
2219
2219
|
}, {
|
|
2220
2220
|
default: A(() => {
|
|
2221
|
-
var f,
|
|
2221
|
+
var f, g;
|
|
2222
2222
|
return [
|
|
2223
|
-
|
|
2223
|
+
b(d, {
|
|
2224
2224
|
class: K(["smart-menu-button smart-menu-button-drag", { active: i(t) && ((f = i(n)) == null ? void 0 : f.isEditable) !== !1 }]),
|
|
2225
2225
|
quaternary: "",
|
|
2226
2226
|
size: "small",
|
|
2227
|
-
disabled: ((
|
|
2227
|
+
disabled: ((g = i(n)) == null ? void 0 : g.isEditable) === !1
|
|
2228
2228
|
}, {
|
|
2229
2229
|
default: A(() => p[0] || (p[0] = [
|
|
2230
2230
|
v("div", { class: "smart-button-content" }, [
|
|
@@ -2626,24 +2626,24 @@ const jl = { class: "smart-search-replace-container" }, Gl = { class: "smart-sea
|
|
|
2626
2626
|
const { from: k, to: y } = ((S = n.value) == null ? void 0 : S.state.selection) ?? {};
|
|
2627
2627
|
(x = n.value) == null || x.commands.setTextSelection({ from: k ?? 0, to: y ?? 0 });
|
|
2628
2628
|
}
|
|
2629
|
-
async function
|
|
2629
|
+
async function g(k) {
|
|
2630
2630
|
n.value.commands.focus(), o.value = k, s.value = k;
|
|
2631
2631
|
}
|
|
2632
2632
|
return (k, y) => {
|
|
2633
2633
|
var S;
|
|
2634
2634
|
const C = Se, w = rt;
|
|
2635
2635
|
return h(), M(q, null, [
|
|
2636
|
-
|
|
2636
|
+
b(w, {
|
|
2637
2637
|
to: `${i(e)} .smart-page-container`,
|
|
2638
2638
|
placement: "bottom-end",
|
|
2639
2639
|
options: i(m),
|
|
2640
2640
|
trigger: "click",
|
|
2641
|
-
"onUpdate:show":
|
|
2641
|
+
"onUpdate:show": g
|
|
2642
2642
|
}, {
|
|
2643
2643
|
default: A(() => {
|
|
2644
2644
|
var x, L;
|
|
2645
2645
|
return [
|
|
2646
|
-
|
|
2646
|
+
b(C, {
|
|
2647
2647
|
class: K(["smart-menu-button", { active: i(s) && ((x = i(n)) == null ? void 0 : x.isEditable) !== !1 }]),
|
|
2648
2648
|
quaternary: "",
|
|
2649
2649
|
size: "small",
|
|
@@ -2707,8 +2707,8 @@ const ls = {
|
|
|
2707
2707
|
}
|
|
2708
2708
|
)
|
|
2709
2709
|
}, [
|
|
2710
|
-
|
|
2711
|
-
|
|
2710
|
+
b(p),
|
|
2711
|
+
b(d)
|
|
2712
2712
|
], 4)) : R("", !0);
|
|
2713
2713
|
};
|
|
2714
2714
|
}
|
|
@@ -2730,7 +2730,7 @@ const ls = {
|
|
|
2730
2730
|
const { options: e, editor: n, assistantBox: o } = $(), t = B(!1), l = B(""), s = B(!1), a = B(30), u = B(0), p = B(0), d = B({
|
|
2731
2731
|
content: "",
|
|
2732
2732
|
error: !1
|
|
2733
|
-
}), m = B(null), f = B(null),
|
|
2733
|
+
}), m = B(null), f = B(null), g = B(null), k = U(() => [
|
|
2734
2734
|
{
|
|
2735
2735
|
category: "continue_write",
|
|
2736
2736
|
iconSvg: "assistant-keep-write",
|
|
@@ -2794,8 +2794,8 @@ const ls = {
|
|
|
2794
2794
|
error: !1
|
|
2795
2795
|
};
|
|
2796
2796
|
const { aiTalk: N, handleError: W, handleMessage: T } = e.value.assistant;
|
|
2797
|
-
|
|
2798
|
-
const { signal: V } =
|
|
2797
|
+
g.value = new AbortController();
|
|
2798
|
+
const { signal: V } = g.value;
|
|
2799
2799
|
t.value = !0;
|
|
2800
2800
|
try {
|
|
2801
2801
|
const j = await N({
|
|
@@ -2839,7 +2839,7 @@ const ls = {
|
|
|
2839
2839
|
o.value = !1, (D = n.value) == null || D.commands.focus();
|
|
2840
2840
|
}
|
|
2841
2841
|
function x() {
|
|
2842
|
-
|
|
2842
|
+
g.value && g.value.abort();
|
|
2843
2843
|
}
|
|
2844
2844
|
function L() {
|
|
2845
2845
|
var N, W;
|
|
@@ -2852,7 +2852,7 @@ const ls = {
|
|
|
2852
2852
|
(T = n.value) == null || T.chain().focus().insertContentAt({ from: D, to: N }, d.value.content).run();
|
|
2853
2853
|
}
|
|
2854
2854
|
return Xe(() => {
|
|
2855
|
-
|
|
2855
|
+
g.value && g.value.abort();
|
|
2856
2856
|
}), (D, N) => (h(), M("div", ss, [
|
|
2857
2857
|
v("div", is, [
|
|
2858
2858
|
i(d).content === "" || i(t) ? (h(), M("div", as, [
|
|
@@ -3015,12 +3015,12 @@ const ls = {
|
|
|
3015
3015
|
p.value = y;
|
|
3016
3016
|
}
|
|
3017
3017
|
);
|
|
3018
|
-
const f = B(null),
|
|
3018
|
+
const f = B(null), g = B(null);
|
|
3019
3019
|
function k(y) {
|
|
3020
3020
|
o("toggle-popup", y);
|
|
3021
3021
|
}
|
|
3022
3022
|
return Tt(
|
|
3023
|
-
|
|
3023
|
+
g,
|
|
3024
3024
|
() => {
|
|
3025
3025
|
o("toggle-popup", !1);
|
|
3026
3026
|
},
|
|
@@ -3076,7 +3076,7 @@ const ls = {
|
|
|
3076
3076
|
default: A(() => {
|
|
3077
3077
|
var T;
|
|
3078
3078
|
return [
|
|
3079
|
-
|
|
3079
|
+
b(w, ge({
|
|
3080
3080
|
class: ["smart-menu-button has-arrow", {
|
|
3081
3081
|
"show-text": !r.hideText,
|
|
3082
3082
|
active: r.popupVisible
|
|
@@ -3144,7 +3144,7 @@ const ls = {
|
|
|
3144
3144
|
v("p", Ss, I(r.text), 1),
|
|
3145
3145
|
r.shortcutText ? (h(), M("kbd", $s, I(i(we)(r.shortcutText)), 1)) : R("", !0)
|
|
3146
3146
|
]),
|
|
3147
|
-
|
|
3147
|
+
b(L, {
|
|
3148
3148
|
show: r.popupVisible,
|
|
3149
3149
|
placement: "bottom",
|
|
3150
3150
|
to: i(l),
|
|
@@ -3164,7 +3164,7 @@ const ls = {
|
|
|
3164
3164
|
default: A(() => [
|
|
3165
3165
|
v("div", {
|
|
3166
3166
|
ref_key: "popupContentRef",
|
|
3167
|
-
ref:
|
|
3167
|
+
ref: g,
|
|
3168
3168
|
class: "smart-popup-content p-x-8 p-y-4"
|
|
3169
3169
|
}, [
|
|
3170
3170
|
pe(y.$slots, "content", {}, void 0, !0)
|
|
@@ -3185,7 +3185,7 @@ const ls = {
|
|
|
3185
3185
|
trigger: A(() => {
|
|
3186
3186
|
var T, V;
|
|
3187
3187
|
return [
|
|
3188
|
-
|
|
3188
|
+
b(w, ge({
|
|
3189
3189
|
ref_key: "popupHandleRef",
|
|
3190
3190
|
ref: f,
|
|
3191
3191
|
class: ["smart-menu-button", {
|
|
@@ -3219,7 +3219,7 @@ const ls = {
|
|
|
3219
3219
|
default: A(() => [
|
|
3220
3220
|
v("div", {
|
|
3221
3221
|
ref_key: "popupContentRef",
|
|
3222
|
-
ref:
|
|
3222
|
+
ref: g,
|
|
3223
3223
|
class: "smart-popup-content p-x-8 p-y-4"
|
|
3224
3224
|
}, [
|
|
3225
3225
|
pe(y.$slots, "content", {}, void 0, !0)
|
|
@@ -3256,18 +3256,18 @@ const Ns = ["id"], Rs = { class: "smart-color-picker-default-button" }, Fs = { c
|
|
|
3256
3256
|
emits: ["change", "update:visible"],
|
|
3257
3257
|
setup(r, { emit: e }) {
|
|
3258
3258
|
const n = r, o = e, { popupVisible: t } = ye(), { options: l } = $(), s = ze("recent"), a = ["#B12318", "#EB3323", "#F6C143", "#FFFE55", "#A0CD63", "#4FAD5B", "#4CAFEA", "#2D70BA", "#06215C", "#68389B"], u = B(n.defaultColor), p = `#color-picker-${Te(4)}`;
|
|
3259
|
-
function d(
|
|
3259
|
+
function d(g) {
|
|
3260
3260
|
t.value = !0, s.value.colors.forEach((k, y) => {
|
|
3261
|
-
k ===
|
|
3262
|
-
}), s.value.colors.unshift(
|
|
3261
|
+
k === g && s.value.colors.splice(y, 1);
|
|
3262
|
+
}), s.value.colors.unshift(g), s.value.colors.length > 10 && s.value.colors.splice(10, 1), o("change", g), o("update:visible");
|
|
3263
3263
|
}
|
|
3264
|
-
function m(
|
|
3265
|
-
d(
|
|
3264
|
+
function m(g) {
|
|
3265
|
+
d(g), o("change", g);
|
|
3266
3266
|
}
|
|
3267
3267
|
function f() {
|
|
3268
3268
|
return _e("div", { class: "smart-color-picker-render" }, "更多颜色");
|
|
3269
3269
|
}
|
|
3270
|
-
return (
|
|
3270
|
+
return (g, k) => {
|
|
3271
3271
|
var w;
|
|
3272
3272
|
const y = Se, C = Nn;
|
|
3273
3273
|
return h(), M("div", {
|
|
@@ -3275,13 +3275,13 @@ const Ns = ["id"], Rs = { class: "smart-color-picker-default-button" }, Fs = { c
|
|
|
3275
3275
|
class: "smart-color-picker-container"
|
|
3276
3276
|
}, [
|
|
3277
3277
|
v("div", Rs, [
|
|
3278
|
-
|
|
3278
|
+
b(y, {
|
|
3279
3279
|
size: "small",
|
|
3280
3280
|
block: "",
|
|
3281
3281
|
onClick: k[0] || (k[0] = (S) => m(i(u)))
|
|
3282
3282
|
}, {
|
|
3283
3283
|
default: A(() => [
|
|
3284
|
-
te(I(("t" in
|
|
3284
|
+
te(I(("t" in g ? g.t : i(c))("colorPicker.default")), 1)
|
|
3285
3285
|
]),
|
|
3286
3286
|
_: 1
|
|
3287
3287
|
})
|
|
@@ -3296,7 +3296,7 @@ const Ns = ["id"], Rs = { class: "smart-color-picker-default-button" }, Fs = { c
|
|
|
3296
3296
|
]),
|
|
3297
3297
|
v("div", {
|
|
3298
3298
|
class: "smart-color-picker-group-title",
|
|
3299
|
-
textContent: I(("t" in
|
|
3299
|
+
textContent: I(("t" in g ? g.t : i(c))("colorPicker.standard"))
|
|
3300
3300
|
}, null, 8, zs),
|
|
3301
3301
|
v("div", Ds, [
|
|
3302
3302
|
(h(), M(q, null, ve(a, (S, x) => v("div", {
|
|
@@ -3309,7 +3309,7 @@ const Ns = ["id"], Rs = { class: "smart-color-picker-default-button" }, Fs = { c
|
|
|
3309
3309
|
i(s).colors.length > 0 ? (h(), M(q, { key: 0 }, [
|
|
3310
3310
|
v("div", {
|
|
3311
3311
|
class: "smart-color-picker-group-title",
|
|
3312
|
-
textContent: I(("t" in
|
|
3312
|
+
textContent: I(("t" in g ? g.t : i(c))("colorPicker.recent"))
|
|
3313
3313
|
}, null, 8, Ps),
|
|
3314
3314
|
v("div", Vs, [
|
|
3315
3315
|
(h(!0), M(q, null, ve(i(s).colors, (S, x) => (h(), M("div", {
|
|
@@ -3321,7 +3321,7 @@ const Ns = ["id"], Rs = { class: "smart-color-picker-default-button" }, Fs = { c
|
|
|
3321
3321
|
])
|
|
3322
3322
|
], 64)) : R("", !0),
|
|
3323
3323
|
k[1] || (k[1] = v("div", { class: "smart-color-picker-divider" }, null, -1)),
|
|
3324
|
-
|
|
3324
|
+
b(C, {
|
|
3325
3325
|
to: p,
|
|
3326
3326
|
placement: "right",
|
|
3327
3327
|
"render-label": f,
|
|
@@ -3367,10 +3367,10 @@ const Ns = ["id"], Rs = { class: "smart-color-picker-default-button" }, Fs = { c
|
|
|
3367
3367
|
"hide-text": "",
|
|
3368
3368
|
"popup-visible": i(t),
|
|
3369
3369
|
onTogglePopup: i(l),
|
|
3370
|
-
onMenuClick: d[0] || (d[0] = (
|
|
3370
|
+
onMenuClick: d[0] || (d[0] = (g) => u(i(a)))
|
|
3371
3371
|
}, {
|
|
3372
3372
|
content: A(() => [
|
|
3373
|
-
|
|
3373
|
+
b(m, {
|
|
3374
3374
|
"default-color": r.defaultColor,
|
|
3375
3375
|
onChange: u
|
|
3376
3376
|
}, null, 8, ["default-color"])
|
|
@@ -3424,10 +3424,10 @@ const Ns = ["id"], Rs = { class: "smart-color-picker-default-button" }, Fs = { c
|
|
|
3424
3424
|
"hide-text": "",
|
|
3425
3425
|
"popup-visible": i(t),
|
|
3426
3426
|
onTogglePopup: i(l),
|
|
3427
|
-
onMenuClick: d[0] || (d[0] = (
|
|
3427
|
+
onMenuClick: d[0] || (d[0] = (g) => u(i(a)))
|
|
3428
3428
|
}, {
|
|
3429
3429
|
content: A(() => [
|
|
3430
|
-
|
|
3430
|
+
b(m, {
|
|
3431
3431
|
"default-color": r.defaultColor,
|
|
3432
3432
|
onChange: u
|
|
3433
3433
|
}, null, 8, ["default-color"])
|
|
@@ -3565,7 +3565,7 @@ const Ns = ["id"], Rs = { class: "smart-color-picker-default-button" }, Fs = { c
|
|
|
3565
3565
|
onMenuClick: u[0] || (u[0] = (m) => s(i(t)))
|
|
3566
3566
|
}, {
|
|
3567
3567
|
content: A(() => [
|
|
3568
|
-
|
|
3568
|
+
b(p, {
|
|
3569
3569
|
modes: "rgb",
|
|
3570
3570
|
"default-color": i(l),
|
|
3571
3571
|
onChange: s
|
|
@@ -4324,7 +4324,7 @@ const Ns = ["id"], Rs = { class: "smart-color-picker-default-button" }, Fs = { c
|
|
|
4324
4324
|
onMenuClick: a[0] || (a[0] = (d) => l(i(t)))
|
|
4325
4325
|
}, {
|
|
4326
4326
|
content: A(() => [
|
|
4327
|
-
|
|
4327
|
+
b(u, {
|
|
4328
4328
|
"default-color": r.defaultColor,
|
|
4329
4329
|
onChange: l,
|
|
4330
4330
|
"onUpdate:visible": i(n)
|
|
@@ -4560,9 +4560,9 @@ const Ns = ["id"], Rs = { class: "smart-color-picker-default-button" }, Fs = { c
|
|
|
4560
4560
|
}, {
|
|
4561
4561
|
content: A(() => [
|
|
4562
4562
|
v("div", bi, [
|
|
4563
|
-
|
|
4564
|
-
|
|
4565
|
-
|
|
4563
|
+
b(a, { "onUpdate:popupVisible": i(n) }, null, 8, ["onUpdate:popupVisible"]),
|
|
4564
|
+
b(u, { "onUpdate:popupVisible": i(n) }, null, 8, ["onUpdate:popupVisible"]),
|
|
4565
|
+
b(p, { "onUpdate:popupVisible": i(n) }, null, 8, ["onUpdate:popupVisible"])
|
|
4566
4566
|
])
|
|
4567
4567
|
]),
|
|
4568
4568
|
_: 1
|
|
@@ -4755,9 +4755,9 @@ const Ns = ["id"], Rs = { class: "smart-color-picker-default-button" }, Fs = { c
|
|
|
4755
4755
|
}, {
|
|
4756
4756
|
content: A(() => [
|
|
4757
4757
|
v("div", Ai, [
|
|
4758
|
-
|
|
4759
|
-
|
|
4760
|
-
|
|
4758
|
+
b(u),
|
|
4759
|
+
b(p),
|
|
4760
|
+
b(d)
|
|
4761
4761
|
])
|
|
4762
4762
|
]),
|
|
4763
4763
|
_: 1
|
|
@@ -4818,54 +4818,54 @@ const Ns = ["id"], Rs = { class: "smart-color-picker-default-button" }, Fs = { c
|
|
|
4818
4818
|
const { options: e, editor: n } = $();
|
|
4819
4819
|
return (o, t) => {
|
|
4820
4820
|
var O, Z, ce, at, ut, ct, Ye, Ze, Qt, en, tn;
|
|
4821
|
-
const l = $i, s = Si, a = Ti, u = Ci, p = yi, d = _i, m = vi, f = gi,
|
|
4821
|
+
const l = $i, s = Si, a = Ti, u = Ci, p = yi, d = _i, m = vi, f = gi, g = pi, k = di, y = ci, C = ui, w = ai, S = ii, x = si, L = li, z = oi, D = ni, N = ti, W = ei, T = Qs, V = Zs, j = Ys, J = Xs, Q = Ks, G = js, ae = xo, ee = wo, fe = ko, ke = Co, Le = yo, De = _o;
|
|
4822
4822
|
return (O = i(n)) != null && O.isActive("map") || (Z = i(n)) != null && Z.getAttributes("bubble").bubble || (ce = i(n)) != null && ce.isActive("pagination") || (at = i(n)) != null && at.isActive("horizontalRule") || (ut = i(n)) != null && ut.getAttributes("image").error ? (h(), M(q, { key: 0 }, [], 64)) : (ct = i(n)) != null && ct.isActive("image") && !((Ye = i(n)) != null && Ye.getAttributes("image").error) ? (h(), M(q, { key: 1 }, [
|
|
4823
|
-
|
|
4824
|
-
|
|
4825
|
-
|
|
4823
|
+
b(l),
|
|
4824
|
+
b(s),
|
|
4825
|
+
b(a)
|
|
4826
4826
|
], 64)) : (Ze = i(n)) != null && Ze.isActive("table") ? (h(), M(q, { key: 2 }, [
|
|
4827
|
-
|
|
4827
|
+
b(u),
|
|
4828
4828
|
t[0] || (t[0] = v("div", { class: "smart-bubble-menu-divider" }, null, -1)),
|
|
4829
|
-
|
|
4830
|
-
|
|
4831
|
-
|
|
4832
|
-
|
|
4829
|
+
b(p),
|
|
4830
|
+
b(d),
|
|
4831
|
+
b(m),
|
|
4832
|
+
b(f),
|
|
4833
4833
|
t[1] || (t[1] = v("div", { class: "smart-bubble-menu-divider" }, null, -1)),
|
|
4834
|
-
g
|
|
4835
|
-
|
|
4836
|
-
|
|
4837
|
-
|
|
4838
|
-
|
|
4839
|
-
|
|
4840
|
-
|
|
4834
|
+
b(g),
|
|
4835
|
+
b(k),
|
|
4836
|
+
b(y),
|
|
4837
|
+
b(C),
|
|
4838
|
+
b(w),
|
|
4839
|
+
b(S),
|
|
4840
|
+
b(x),
|
|
4841
4841
|
t[2] || (t[2] = v("div", { class: "smart-bubble-menu-divider" }, null, -1)),
|
|
4842
|
-
|
|
4843
|
-
|
|
4844
|
-
|
|
4842
|
+
b(L),
|
|
4843
|
+
b(z),
|
|
4844
|
+
b(D)
|
|
4845
4845
|
], 64)) : (Qt = i(n)) != null && Qt.isActive("codeBlock") ? (h(), M(q, { key: 3 }, [
|
|
4846
|
-
|
|
4847
|
-
|
|
4846
|
+
b(N),
|
|
4847
|
+
b(W),
|
|
4848
4848
|
t[3] || (t[3] = v("div", { class: "smart-bubble-menu-divider" }, null, -1)),
|
|
4849
|
-
|
|
4850
|
-
|
|
4849
|
+
b(T),
|
|
4850
|
+
b(V),
|
|
4851
4851
|
t[4] || (t[4] = v("div", { class: "smart-bubble-menu-divider" }, null, -1)),
|
|
4852
|
-
|
|
4853
|
-
|
|
4852
|
+
b(j),
|
|
4853
|
+
b(J)
|
|
4854
4854
|
], 64)) : (en = i(n)) != null && en.isActive("highlightBlock") ? (h(), M(q, { key: 4 }, [
|
|
4855
|
-
|
|
4856
|
-
|
|
4855
|
+
b(Q),
|
|
4856
|
+
b(J)
|
|
4857
4857
|
], 64)) : (h(), M(q, { key: 5 }, [
|
|
4858
4858
|
(tn = i(e).assistant) != null && tn.enabled ? (h(), M(q, { key: 0 }, [
|
|
4859
|
-
|
|
4859
|
+
b(G),
|
|
4860
4860
|
t[5] || (t[5] = v("div", { class: "smart-bubble-menu-divider" }, null, -1))
|
|
4861
4861
|
], 64)) : R("", !0),
|
|
4862
|
-
|
|
4863
|
-
|
|
4864
|
-
|
|
4865
|
-
|
|
4862
|
+
b(ae),
|
|
4863
|
+
b(ee),
|
|
4864
|
+
b(fe),
|
|
4865
|
+
b(ke),
|
|
4866
4866
|
t[6] || (t[6] = v("div", { class: "smart-bubble-menu-divider" }, null, -1)),
|
|
4867
|
-
|
|
4868
|
-
|
|
4867
|
+
b(Le),
|
|
4868
|
+
b(De)
|
|
4869
4869
|
], 64));
|
|
4870
4870
|
};
|
|
4871
4871
|
}
|
|
@@ -4902,9 +4902,9 @@ const Ns = ["id"], Rs = { class: "smart-color-picker-default-button" }, Fs = { c
|
|
|
4902
4902
|
"tippy-options": i(a)
|
|
4903
4903
|
}, {
|
|
4904
4904
|
default: A(() => {
|
|
4905
|
-
var f,
|
|
4905
|
+
var f, g, k, y;
|
|
4906
4906
|
return [
|
|
4907
|
-
(
|
|
4907
|
+
(g = (f = i(e)) == null ? void 0 : f.document) != null && g.enableBubbleMenu && !i(l) ? (h(), _(d, { key: 0 })) : R("", !0),
|
|
4908
4908
|
(y = (k = i(e)) == null ? void 0 : k.assistant) != null && y.enabled && i(l) ? (h(), _(m, { key: 1 })) : R("", !0)
|
|
4909
4909
|
];
|
|
4910
4910
|
}),
|
|
@@ -4921,9 +4921,9 @@ const Ns = ["id"], Rs = { class: "smart-color-picker-default-button" }, Fs = { c
|
|
|
4921
4921
|
if (!d) return !1;
|
|
4922
4922
|
const m = bt(d.node, (C) => C.type === l.nodes.detailsContent);
|
|
4923
4923
|
if (!m.length || gt(d.start + m[0].pos + 1, r)) return !1;
|
|
4924
|
-
const f = n.doc.resolve(d.pos + d.node.nodeSize),
|
|
4925
|
-
if (!
|
|
4926
|
-
const { tr: k } = n, y = new ln(
|
|
4924
|
+
const f = n.doc.resolve(d.pos + d.node.nodeSize), g = ln.findFrom(f, 1, !1);
|
|
4925
|
+
if (!g) return !1;
|
|
4926
|
+
const { tr: k } = n, y = new ln(g);
|
|
4927
4927
|
return k.setSelection(y), k.scrollIntoView(), o.dispatch(k), !0;
|
|
4928
4928
|
}, Ii = Y.create({ name: "details", content: "detailsSummary detailsContent", group: "block", defining: !0, isolating: !0, allowGapCursor: !1, addOptions: () => ({ persist: !1, openClassName: "is-open", HTMLAttributes: {} }), addAttributes() {
|
|
4929
4929
|
return this.options.persist ? { open: { default: !1, parseHTML: (r) => r.hasAttribute("open"), renderHTML: ({ open: r }) => r ? { open: "" } : {} } } : [];
|
|
@@ -4954,8 +4954,8 @@ const Ns = ["id"], Rs = { class: "smart-color-picker-default-button" }, Fs = { c
|
|
|
4954
4954
|
if (r.isEditable && typeof e == "function") {
|
|
4955
4955
|
const { from: p, to: d } = r.state.selection;
|
|
4956
4956
|
r.chain().command(({ tr: m }) => {
|
|
4957
|
-
const f = e(),
|
|
4958
|
-
return (
|
|
4957
|
+
const f = e(), g = m.doc.nodeAt(f);
|
|
4958
|
+
return (g == null ? void 0 : g.type) === this.type && (m.setNodeMarkup(f, void 0, { open: !g.attrs.open }), !0);
|
|
4959
4959
|
}).setTextSelection({ from: p, to: d }).focus(void 0, { scrollIntoView: !1 }).run();
|
|
4960
4960
|
}
|
|
4961
4961
|
} else r.commands.focus(void 0, { scrollIntoView: !1 });
|
|
@@ -4975,7 +4975,7 @@ const Ns = ["id"], Rs = { class: "smart-color-picker-default-button" }, Fs = { c
|
|
|
4975
4975
|
if (!t) return !1;
|
|
4976
4976
|
const l = bt(t.node, (y) => y.type === o.nodes.detailsSummary), s = bt(t.node, (y) => y.type === o.nodes.detailsContent);
|
|
4977
4977
|
if (!l.length || !s.length) return !1;
|
|
4978
|
-
const a = l[0], u = s[0], p = t.pos, d = r.doc.resolve(p), m = { from: p, to: p + t.node.nodeSize }, f = u.node.content.toJSON() || [],
|
|
4978
|
+
const a = l[0], u = s[0], p = t.pos, d = r.doc.resolve(p), m = { from: p, to: p + t.node.nodeSize }, f = u.node.content.toJSON() || [], g = d.parent.type.contentMatch.defaultType, k = [g == null ? void 0 : g.create(null, a.node.content).toJSON(), ...f];
|
|
4979
4979
|
return e().insertContentAt(m, k).setTextSelection(p + 1).run();
|
|
4980
4980
|
} };
|
|
4981
4981
|
}, addKeyboardShortcuts() {
|
|
@@ -4994,7 +4994,7 @@ const Ns = ["id"], Rs = { class: "smart-color-picker-default-button" }, Fs = { c
|
|
|
4994
4994
|
if (!p || !a.canReplaceWith(u, u, p)) return !1;
|
|
4995
4995
|
const d = p.createAndFill();
|
|
4996
4996
|
if (!d) return !1;
|
|
4997
|
-
const m = s ? l.after() + 1 : l.after(-1), f = e.tr.replaceWith(m, m, d),
|
|
4997
|
+
const m = s ? l.after() + 1 : l.after(-1), f = e.tr.replaceWith(m, m, d), g = f.doc.resolve(m), k = jn.near(g, 1);
|
|
4998
4998
|
return f.setSelection(k), f.scrollIntoView(), n.dispatch(f), !0;
|
|
4999
4999
|
}, ArrowRight: ({ editor: r }) => mn(r, "right"), ArrowDown: ({ editor: r }) => mn(r, "down") };
|
|
5000
5000
|
}, addProseMirrorPlugins() {
|
|
@@ -5003,9 +5003,9 @@ const Ns = ["id"], Rs = { class: "smart-color-picker-default-button" }, Fs = { c
|
|
|
5003
5003
|
if (!r.some((f) => f.selectionSet) || !e.selection.empty || !n.selection.empty || !kr(n, t.name)) return;
|
|
5004
5004
|
const { $from: s } = n.selection;
|
|
5005
5005
|
if (gt(s.pos, o)) return;
|
|
5006
|
-
const a = ((f,
|
|
5006
|
+
const a = ((f, g, k) => {
|
|
5007
5007
|
for (let y = f.depth; y > 0; y -= 1) {
|
|
5008
|
-
const C = f.node(y), w =
|
|
5008
|
+
const C = f.node(y), w = g(C), S = gt(f.start(y), k);
|
|
5009
5009
|
if (w && S) return { pos: y > 0 ? f.before(y) : 0, start: f.start(y), depth: y, node: C };
|
|
5010
5010
|
}
|
|
5011
5011
|
})(s, (f) => f.type === t, o);
|
|
@@ -5022,8 +5022,8 @@ const Ns = ["id"], Rs = { class: "smart-color-picker-default-button" }, Fs = { c
|
|
|
5022
5022
|
return new Fe({ key: new Ue("mathematics"), state: { init: () => He.empty, apply(l, s, a, u) {
|
|
5023
5023
|
const { selection: p } = u, d = [];
|
|
5024
5024
|
return u.doc.descendants((m, f) => {
|
|
5025
|
-
const
|
|
5026
|
-
if (m.isText && m.text &&
|
|
5025
|
+
const g = t(u, f, m);
|
|
5026
|
+
if (m.isText && m.text && g) {
|
|
5027
5027
|
let k;
|
|
5028
5028
|
for (; k = e.exec(m.text); ) {
|
|
5029
5029
|
const y = f + k.index, C = y + k[0].length, w = k.slice(1).find(Boolean);
|
|
@@ -5127,8 +5127,8 @@ const Oi = ({ getId: r, anchorTypes: e = ["heading"] }) => new Fe({ key: new Ue(
|
|
|
5127
5127
|
if (s.node.textContent.length === 0) return;
|
|
5128
5128
|
const u = e.view.domAtPos(s.pos + 1).node, p = r.storage.scrollPosition >= u.offsetTop;
|
|
5129
5129
|
l.push(u);
|
|
5130
|
-
const d = s.node.attrs.level, m = o[a - 1], f = r.getLevelFn(s, t),
|
|
5131
|
-
t = m ? [...t, { itemIndex:
|
|
5130
|
+
const d = s.node.attrs.level, m = o[a - 1], f = r.getLevelFn(s, t), g = r.getIndexFn(s, t, f);
|
|
5131
|
+
t = m ? [...t, { itemIndex: g, id: s.node.attrs["data-toc-id"], originalLevel: d, level: f, textContent: s.node.textContent, pos: s.pos, editor: e, isActive: !1, isScrolledOver: !1, node: s.node, dom: u }] : [...t, { itemIndex: g, id: s.node.attrs["data-toc-id"], originalLevel: d, level: f, textContent: s.node.textContent, pos: s.pos, editor: e, isActive: !1, isScrolledOver: p, node: s.node, dom: u }];
|
|
5132
5132
|
}), t = To(t, r), n) {
|
|
5133
5133
|
const s = r.storage.content.length === 0;
|
|
5134
5134
|
n(t, s);
|
|
@@ -5291,8 +5291,8 @@ const Oi = ({ getId: r, anchorTypes: e = ["heading"] }) => new Fe({ key: new Ue(
|
|
|
5291
5291
|
});
|
|
5292
5292
|
function s() {
|
|
5293
5293
|
if (n.value = !n.value, n.value) {
|
|
5294
|
-
const { top: a, right: u, bottom: p, left: d, width: m, height: f } = pr(e), { width:
|
|
5295
|
-
o.value = d.value >
|
|
5294
|
+
const { top: a, right: u, bottom: p, left: d, width: m, height: f } = pr(e), { width: g, height: k } = Ut();
|
|
5295
|
+
o.value = d.value > g.value / 2, t.value = a.value < k.value / 2, l.value = {}, o.value ? l.value.right = `${g.value - u.value - m.value}px` : l.value.left = `${d.value - m.value}px`, t.value ? l.value.top = `${a.value + m.value + 10}px` : l.value.bottom = `${k.value - p.value + f.value + 10}px`;
|
|
5296
5296
|
}
|
|
5297
5297
|
}
|
|
5298
5298
|
return (a, u) => (h(), _(i(se), {
|
|
@@ -5317,7 +5317,7 @@ const Oi = ({ getId: r, anchorTypes: e = ["heading"] }) => new Fe({ key: new Ue(
|
|
|
5317
5317
|
...i(l)
|
|
5318
5318
|
})
|
|
5319
5319
|
}, [
|
|
5320
|
-
|
|
5320
|
+
b(i(jt), { class: "bubble-block-input smart-scrollbar" })
|
|
5321
5321
|
], 6), [
|
|
5322
5322
|
[yt, i(n)]
|
|
5323
5323
|
])
|
|
@@ -5619,7 +5619,7 @@ const Oi = ({ getId: r, anchorTypes: e = ["heading"] }) => new Fe({ key: new Ue(
|
|
|
5619
5619
|
ref: s,
|
|
5620
5620
|
ontenteditable: "false"
|
|
5621
5621
|
}, null, 512)),
|
|
5622
|
-
|
|
5622
|
+
b(i(jt), { class: "node-content" })
|
|
5623
5623
|
]),
|
|
5624
5624
|
_: 1
|
|
5625
5625
|
}, 8, ["class"]));
|
|
@@ -6223,11 +6223,11 @@ class xe {
|
|
|
6223
6223
|
break;
|
|
6224
6224
|
let p = this.ranges[a + l], d = this.ranges[a + s], m = u + p;
|
|
6225
6225
|
if (e <= m) {
|
|
6226
|
-
let f = p ? e == u ? -1 : e == m ? 1 : n : n,
|
|
6226
|
+
let f = p ? e == u ? -1 : e == m ? 1 : n : n, g = u + t + (f < 0 ? 0 : d);
|
|
6227
6227
|
if (o)
|
|
6228
|
-
return
|
|
6228
|
+
return g;
|
|
6229
6229
|
let k = e == (n < 0 ? u : m) ? null : ba(a / 3, e - u), y = e == u ? No : e == m ? Eo : vt;
|
|
6230
|
-
return (n < 0 ? e != u : e != m) && (y |= Ro), new _n(
|
|
6230
|
+
return (n < 0 ? e != u : e != m) && (y |= Ro), new _n(g, y, k);
|
|
6231
6231
|
}
|
|
6232
6232
|
t += d - p;
|
|
6233
6233
|
}
|
|
@@ -7273,8 +7273,8 @@ const zo = Y.create({
|
|
|
7273
7273
|
if (a === void 0)
|
|
7274
7274
|
return;
|
|
7275
7275
|
let u = [];
|
|
7276
|
-
a.node.descendants((m, f,
|
|
7277
|
-
(
|
|
7276
|
+
a.node.descendants((m, f, g) => {
|
|
7277
|
+
(g == null ? void 0 : g.type.name) === et.name && m.push(m);
|
|
7278
7278
|
}), u = u.reverse().filter((m) => m.content.size > 0);
|
|
7279
7279
|
const p = o.doc.resolve(a.pos), d = new Ae(p);
|
|
7280
7280
|
return o = o.setSelection(d), u.forEach(
|
|
@@ -7308,11 +7308,11 @@ const zo = Y.create({
|
|
|
7308
7308
|
content: C
|
|
7309
7309
|
});
|
|
7310
7310
|
}
|
|
7311
|
-
const
|
|
7312
|
-
if (
|
|
7311
|
+
const g = a.type.schema.nodeFromJSON(f);
|
|
7312
|
+
if (g === null)
|
|
7313
7313
|
return;
|
|
7314
7314
|
const k = p.$anchor.parent.type;
|
|
7315
|
-
return ((C) => !(!C.contentMatch.matchType(this.type) || !this.options.nestedColumns && C.name === et.name))(k) ? (l = l.setSelection(p), l = l.replaceSelectionWith(
|
|
7315
|
+
return ((C) => !(!C.contentMatch.matchType(this.type) || !this.options.nestedColumns && C.name === et.name))(k) ? (l = l.setSelection(p), l = l.replaceSelectionWith(g, !1), s(l)) : void 0;
|
|
7316
7316
|
} catch (a) {
|
|
7317
7317
|
console.error(a);
|
|
7318
7318
|
}
|
|
@@ -7365,8 +7365,8 @@ const zo = Y.create({
|
|
|
7365
7365
|
if (u !== a + 1) return !1;
|
|
7366
7366
|
const p = s.node.type.contentMatch.defaultType, d = p == null ? void 0 : p.createAndFill();
|
|
7367
7367
|
if (!d) return !1;
|
|
7368
|
-
const m = e.doc.resolve(s.pos + 1), f = u - 1,
|
|
7369
|
-
if (!
|
|
7368
|
+
const m = e.doc.resolve(s.pos + 1), f = u - 1, g = s.node.child(f), k = m.posAtIndex(f, s.depth);
|
|
7369
|
+
if (!g.eq(d)) return !1;
|
|
7370
7370
|
const y = t.node(-3);
|
|
7371
7371
|
if (!y) return !1;
|
|
7372
7372
|
const C = t.indexAfter(-3), w = qn(y.contentMatchAt(C));
|
|
@@ -7377,7 +7377,7 @@ const zo = Y.create({
|
|
|
7377
7377
|
x.replaceWith(L, L, S);
|
|
7378
7378
|
const z = x.doc.resolve(L), D = jn.near(z, 1);
|
|
7379
7379
|
x.setSelection(D);
|
|
7380
|
-
const N = k, W = k +
|
|
7380
|
+
const N = k, W = k + g.nodeSize;
|
|
7381
7381
|
return x.delete(N, W), x.scrollIntoView(), n.dispatch(x), !0;
|
|
7382
7382
|
} };
|
|
7383
7383
|
} }), wa = ka.extend({
|
|
@@ -8096,9 +8096,9 @@ const Tn = (r) => typeof r == "number", Ga = ["src", "alt"], Ka = {
|
|
|
8096
8096
|
function f() {
|
|
8097
8097
|
d.value = !0, r.editor.commands.setNodeSelection(r.getPos());
|
|
8098
8098
|
}
|
|
8099
|
-
const
|
|
8099
|
+
const g = B({ width: 0, height: 0 });
|
|
8100
8100
|
function k(T) {
|
|
8101
|
-
|
|
8101
|
+
g.value.width = T.target.width, g.value.height = T.target.height;
|
|
8102
8102
|
}
|
|
8103
8103
|
const y = B({
|
|
8104
8104
|
width: 1e4,
|
|
@@ -8117,7 +8117,7 @@ const Tn = (r) => typeof r == "number", Ga = ["src", "alt"], Ka = {
|
|
|
8117
8117
|
if (t.value === "Y")
|
|
8118
8118
|
return;
|
|
8119
8119
|
T.preventDefault(), T.stopPropagation(), x.value.x = T.clientX, x.value.y = T.clientY;
|
|
8120
|
-
const j =
|
|
8120
|
+
const j = g.value.width, J = g.value.height, Q = j / J;
|
|
8121
8121
|
let G = Number(r.node.attrs.width), ae = Number(r.node.attrs.height);
|
|
8122
8122
|
const ee = y.value.width;
|
|
8123
8123
|
G && !ae ? (G = G > ee ? ee : G, ae = Math.round(G / Q)) : ae && !G ? (G = Math.round(ae * Q), G = G > ee ? ee : G) : !G && !ae ? (G = j > ee ? ee : j, ae = Math.round(G / Q)) : G = G > ee ? ee : G, x.value.w = G, x.value.h = ae, x.value.dir = V, w.value = !0, N();
|
|
@@ -8128,7 +8128,7 @@ const Tn = (r) => typeof r == "number", Ga = ["src", "alt"], Ka = {
|
|
|
8128
8128
|
const { x: V, y: j, w: J, h: Q, dir: G } = x.value, ae = (T.clientX - V) * (/l/.test(G) ? -1 : 1), ee = (T.clientY - j) * (/t/.test(G) ? -1 : 1), fe = ja(J + ae, 20, y.value.width), ke = l.value ? null : Math.max(Q + ee, 20);
|
|
8129
8129
|
S.value = {
|
|
8130
8130
|
width: fe,
|
|
8131
|
-
height: fe * (
|
|
8131
|
+
height: fe * (g.value.height / g.value.width)
|
|
8132
8132
|
}, r.updateAttributes({ width: fe, height: ke });
|
|
8133
8133
|
}, 16);
|
|
8134
8134
|
function D(T) {
|
|
@@ -8188,7 +8188,7 @@ const Tn = (r) => typeof r == "number", Ga = ["src", "alt"], Ka = {
|
|
|
8188
8188
|
[yt, T.editor.view.editable && (T.selected || i(w)) && i(t) === "N"]
|
|
8189
8189
|
])
|
|
8190
8190
|
], 6),
|
|
8191
|
-
|
|
8191
|
+
b(i(jt), {
|
|
8192
8192
|
style: re(i(e).style),
|
|
8193
8193
|
class: K(i(s))
|
|
8194
8194
|
}, null, 8, ["style", "class"])
|
|
@@ -9294,7 +9294,7 @@ const au = $e.create({
|
|
|
9294
9294
|
if (/bottom/.test(l.target.className)) {
|
|
9295
9295
|
let u = l.screenX;
|
|
9296
9296
|
const p = l.target.classList.contains("bottom-left") ? -1 : 1, d = (m) => {
|
|
9297
|
-
const f = s.clientWidth,
|
|
9297
|
+
const f = s.clientWidth, g = m.screenX - u, k = f + p * g, y = document.querySelector(".ProseMirror").clientWidth, C = 40, w = y - 32, S = Math.max(
|
|
9298
9298
|
C,
|
|
9299
9299
|
Math.min(w, k)
|
|
9300
9300
|
);
|
|
@@ -9309,7 +9309,7 @@ const au = $e.create({
|
|
|
9309
9309
|
if (/top/.test(l.target.className)) {
|
|
9310
9310
|
let u = l.screenX;
|
|
9311
9311
|
const p = l.target.classList.contains("top-left") ? -1 : 1, d = (m) => {
|
|
9312
|
-
const f = s.clientWidth,
|
|
9312
|
+
const f = s.clientWidth, g = m.screenX - u, k = f + p * g, y = document.querySelector(".ProseMirror").clientWidth, C = 40, w = y - 32, S = Math.max(
|
|
9313
9313
|
C,
|
|
9314
9314
|
Math.min(w, k)
|
|
9315
9315
|
);
|
|
@@ -9515,12 +9515,12 @@ const Uu = new Ue(
|
|
|
9515
9515
|
lastSearchTerm: d,
|
|
9516
9516
|
caseSensitive: m,
|
|
9517
9517
|
lastCaseSensitive: f,
|
|
9518
|
-
resultIndex:
|
|
9518
|
+
resultIndex: g,
|
|
9519
9519
|
lastResultIndex: k
|
|
9520
9520
|
} = r.storage.searchAndReplace;
|
|
9521
|
-
if (!a && d === p && f === m && k ===
|
|
9521
|
+
if (!a && d === p && f === m && k === g)
|
|
9522
9522
|
return u;
|
|
9523
|
-
if (o(p), t(m), l(
|
|
9523
|
+
if (o(p), t(m), l(g), !p)
|
|
9524
9524
|
return r.storage.searchAndReplace.results = [], He.empty;
|
|
9525
9525
|
const { decorationsToReturn: y, results: C } = Ou(
|
|
9526
9526
|
s,
|
|
@@ -9530,7 +9530,7 @@ const Uu = new Ue(
|
|
|
9530
9530
|
m
|
|
9531
9531
|
),
|
|
9532
9532
|
e,
|
|
9533
|
-
|
|
9533
|
+
g
|
|
9534
9534
|
);
|
|
9535
9535
|
return r.storage.searchAndReplace.results = C, y;
|
|
9536
9536
|
}
|
|
@@ -9631,21 +9631,21 @@ const Uu = new Ue(
|
|
|
9631
9631
|
function $n(r, e, n, o, t, l) {
|
|
9632
9632
|
let s = 0, a = !0, u = e.firstChild;
|
|
9633
9633
|
const p = r.firstChild, { tableBorder: d, widthAuto: m, tableAuto: f } = r.attrs;
|
|
9634
|
-
for (let
|
|
9635
|
-
const { colspan: y, colwidth: C } = p.child(
|
|
9634
|
+
for (let g = 0, k = 0; g < p.childCount; g += 1) {
|
|
9635
|
+
const { colspan: y, colwidth: C } = p.child(g).attrs;
|
|
9636
9636
|
for (let w = 0; w < y; w += 1, k += 1) {
|
|
9637
9637
|
const S = t === k ? l : C && C[w], x = S && !m ? `${S}px` : "";
|
|
9638
9638
|
s += S || o, S || (a = !1), u ? (u.style.width !== x && (u.style.width = x), u = u.nextSibling) : e.appendChild(document.createElement("col")).style.width = x;
|
|
9639
9639
|
}
|
|
9640
9640
|
}
|
|
9641
9641
|
for (; u; ) {
|
|
9642
|
-
const
|
|
9643
|
-
u.parentNode.removeChild(u), u =
|
|
9642
|
+
const g = u.nextSibling;
|
|
9643
|
+
u.parentNode.removeChild(u), u = g;
|
|
9644
9644
|
}
|
|
9645
9645
|
if (a ? (n.style.width = `${s}px`, n.style.minWidth = "") : (n.style.width = "", n.style.minWidth = `${s}px`), f) {
|
|
9646
9646
|
n.style.width = "100%", n.style.minWidth = "", u = e.firstChild;
|
|
9647
|
-
for (let
|
|
9648
|
-
const { colspan: y, colwidth: C } = p.child(
|
|
9647
|
+
for (let g = 0, k = 0; g < p.childCount; g += 1) {
|
|
9648
|
+
const { colspan: y, colwidth: C } = p.child(g).attrs;
|
|
9649
9649
|
for (let w = 0; w < y; w += 1, k += 1) {
|
|
9650
9650
|
const S = t === k ? l : C && C[w], x = S && !m ? `${S / s * 100}%` : "";
|
|
9651
9651
|
u ? (u.style.width !== x && (u.style.width = x), u = u.nextSibling) : e.appendChild(document.createElement("col")).style.width = x;
|
|
@@ -9670,18 +9670,18 @@ function Xu(r, e, n, o, t) {
|
|
|
9670
9670
|
const a = [], u = e.firstChild;
|
|
9671
9671
|
if (!u)
|
|
9672
9672
|
return {};
|
|
9673
|
-
for (let f = 0,
|
|
9673
|
+
for (let f = 0, g = 0; f < u.childCount; f += 1) {
|
|
9674
9674
|
const { colspan: k, colwidth: y } = u.child(f).attrs;
|
|
9675
|
-
for (let C = 0; C < k; C += 1,
|
|
9676
|
-
const w = o ===
|
|
9675
|
+
for (let C = 0; C < k; C += 1, g += 1) {
|
|
9676
|
+
const w = o === g ? t : y && y[C], S = w ? `${w}px` : "";
|
|
9677
9677
|
l += w || n, w || (s = !1), a.push(["col", S ? { style: `width: ${S}` } : {}]);
|
|
9678
9678
|
}
|
|
9679
9679
|
}
|
|
9680
9680
|
if (r)
|
|
9681
9681
|
for (let f = 0; f < a.length; f += 1) {
|
|
9682
|
-
const { colwidth:
|
|
9682
|
+
const { colwidth: g } = u.child(f).attrs;
|
|
9683
9683
|
a[f][1].style = `width: ${Math.ceil(
|
|
9684
|
-
|
|
9684
|
+
g / l * 100
|
|
9685
9685
|
)}%;`;
|
|
9686
9686
|
}
|
|
9687
9687
|
const p = s ? `${l}px` : "", d = s ? "" : `${l}px`;
|
|
@@ -10241,9 +10241,9 @@ const Jo = Y.create({
|
|
|
10241
10241
|
__name: "index",
|
|
10242
10242
|
setup(r) {
|
|
10243
10243
|
var p, d, m, f;
|
|
10244
|
-
const { options: e, editor: n, painter: o, setEditor: t, editorDestroyed: l } = $(), s = mr(async ({ editor:
|
|
10244
|
+
const { options: e, editor: n, painter: o, setEditor: t, editorDestroyed: l } = $(), s = mr(async ({ editor: g }) => {
|
|
10245
10245
|
try {
|
|
10246
|
-
await $t.content.put({ content_id: e.value.editorKey, content:
|
|
10246
|
+
await $t.content.put({ content_id: e.value.editorKey, content: g.getHTML(), version: mo().unix(), hashMd: ho(JSON.stringify(g.getJSON())) });
|
|
10247
10247
|
} catch (k) {
|
|
10248
10248
|
Be.message.error(k.message);
|
|
10249
10249
|
}
|
|
@@ -10270,11 +10270,11 @@ const Jo = Y.create({
|
|
|
10270
10270
|
}
|
|
10271
10271
|
return Re(() => u()), Xe(() => {
|
|
10272
10272
|
a.destroy();
|
|
10273
|
-
}), (
|
|
10273
|
+
}), (g, k) => {
|
|
10274
10274
|
var w;
|
|
10275
10275
|
const y = Li, C = ls;
|
|
10276
10276
|
return h(), M(q, null, [
|
|
10277
|
-
|
|
10277
|
+
b(i(Xn), {
|
|
10278
10278
|
editor: i(n),
|
|
10279
10279
|
class: K(["smart-editor-container", {
|
|
10280
10280
|
"format-painter": i(o).enabled
|
|
@@ -10294,7 +10294,7 @@ const Jo = Y.create({
|
|
|
10294
10294
|
if (!t.value)
|
|
10295
10295
|
return;
|
|
10296
10296
|
const u = l.value.find(
|
|
10297
|
-
(
|
|
10297
|
+
(g) => "isActive" in g && g.isActive
|
|
10298
10298
|
);
|
|
10299
10299
|
u && "isActive" in u && (u.isActive = !1), "isActive" in a && (a.isActive = !0);
|
|
10300
10300
|
const p = t.value.view.dom.querySelector(
|
|
@@ -10370,7 +10370,7 @@ const Jo = Y.create({
|
|
|
10370
10370
|
), Re(() => {
|
|
10371
10371
|
a.value = Vn(document.querySelector(e)), s();
|
|
10372
10372
|
}), (u, p) => {
|
|
10373
|
-
const d = hc, m = sc, f = nr,
|
|
10373
|
+
const d = hc, m = sc, f = nr, g = Ql;
|
|
10374
10374
|
return h(), M("div", fc, [
|
|
10375
10375
|
i(n).showToc ? (h(), _(d, {
|
|
10376
10376
|
key: 0,
|
|
@@ -10390,7 +10390,7 @@ const Jo = Y.create({
|
|
|
10390
10390
|
minHeight: i(l)
|
|
10391
10391
|
})
|
|
10392
10392
|
}, [
|
|
10393
|
-
|
|
10393
|
+
b(m)
|
|
10394
10394
|
], 4)
|
|
10395
10395
|
], 4)
|
|
10396
10396
|
]),
|
|
@@ -10401,14 +10401,14 @@ const Jo = Y.create({
|
|
|
10401
10401
|
}, [
|
|
10402
10402
|
pe(u.$slots, "editor_tool", {}, void 0, !0)
|
|
10403
10403
|
], 32)) : R("", !0),
|
|
10404
|
-
|
|
10404
|
+
b(f, {
|
|
10405
10405
|
to: `${i(e)} .smart-zoomable-container`,
|
|
10406
10406
|
"listen-to": `${i(e)} .smart-zoomable-container`,
|
|
10407
10407
|
"visibility-height": 800,
|
|
10408
10408
|
right: 25,
|
|
10409
10409
|
bottom: 40
|
|
10410
10410
|
}, null, 8, ["to", "listen-to"]),
|
|
10411
|
-
g
|
|
10411
|
+
b(g)
|
|
10412
10412
|
]);
|
|
10413
10413
|
};
|
|
10414
10414
|
}
|
|
@@ -10417,8 +10417,8 @@ const Jo = Y.create({
|
|
|
10417
10417
|
setup(r, { expose: e }) {
|
|
10418
10418
|
const n = B(null), o = B(null), t = B(!0), l = B(!0);
|
|
10419
10419
|
function s() {
|
|
10420
|
-
const { scrollLeft: m, scrollWidth: f, clientWidth:
|
|
10421
|
-
t.value = m === 0, l.value = m +
|
|
10420
|
+
const { scrollLeft: m, scrollWidth: f, clientWidth: g } = o.value;
|
|
10421
|
+
t.value = m === 0, l.value = m + g + 1 >= f;
|
|
10422
10422
|
}
|
|
10423
10423
|
const a = () => o.value.scrollLeft -= 100, u = () => o.value.scrollLeft += 100;
|
|
10424
10424
|
hr(n.value, () => {
|
|
@@ -10616,15 +10616,15 @@ const Jo = Y.create({
|
|
|
10616
10616
|
}, 100);
|
|
10617
10617
|
}
|
|
10618
10618
|
), (a, u) => {
|
|
10619
|
-
const p = E, d = In, m = rr, f = Se,
|
|
10619
|
+
const p = E, d = In, m = rr, f = Se, g = Ac;
|
|
10620
10620
|
return h(), M(q, null, [
|
|
10621
|
-
|
|
10621
|
+
b(p, {
|
|
10622
10622
|
ico: "i-sed:link",
|
|
10623
10623
|
text: ("t" in a ? a.t : i(c))("insert.link.text"),
|
|
10624
10624
|
"hide-text": "",
|
|
10625
10625
|
onMenuClick: u[0] || (u[0] = (k) => n.value = !0)
|
|
10626
10626
|
}, null, 8, ["text"]),
|
|
10627
|
-
g
|
|
10627
|
+
b(g, {
|
|
10628
10628
|
visible: i(n),
|
|
10629
10629
|
header: ("t" in a ? a.t : i(c))("insert.link.title"),
|
|
10630
10630
|
width: "420px",
|
|
@@ -10632,13 +10632,13 @@ const Jo = Y.create({
|
|
|
10632
10632
|
}, {
|
|
10633
10633
|
default: A(() => [
|
|
10634
10634
|
v("div", Tc, [
|
|
10635
|
-
|
|
10635
|
+
b(m, {
|
|
10636
10636
|
"validation-status": i(l).text ? "error" : "default",
|
|
10637
10637
|
label: ("t" in a ? a.t : i(c))("insert.link.hrefText"),
|
|
10638
10638
|
"show-feedback": !1
|
|
10639
10639
|
}, {
|
|
10640
10640
|
default: A(() => [
|
|
10641
|
-
|
|
10641
|
+
b(d, {
|
|
10642
10642
|
value: i(o),
|
|
10643
10643
|
"onUpdate:value": u[1] || (u[1] = (k) => je(o) ? o.value = k : null),
|
|
10644
10644
|
valueModifiers: { trim: !0 },
|
|
@@ -10647,14 +10647,14 @@ const Jo = Y.create({
|
|
|
10647
10647
|
]),
|
|
10648
10648
|
_: 1
|
|
10649
10649
|
}, 8, ["validation-status", "label"]),
|
|
10650
|
-
|
|
10650
|
+
b(m, {
|
|
10651
10651
|
"validation-status": i(l).href ? "error" : "default",
|
|
10652
10652
|
label: ("t" in a ? a.t : i(c))("insert.link.href"),
|
|
10653
10653
|
"show-feedback": !1,
|
|
10654
10654
|
class: "smart-link-text"
|
|
10655
10655
|
}, {
|
|
10656
10656
|
default: A(() => [
|
|
10657
|
-
|
|
10657
|
+
b(d, {
|
|
10658
10658
|
value: i(t),
|
|
10659
10659
|
"onUpdate:value": u[2] || (u[2] = (k) => je(t) ? t.value = k : null),
|
|
10660
10660
|
placeholder: ("t" in a ? a.t : i(c))("insert.link.hrefTip")
|
|
@@ -10664,7 +10664,7 @@ const Jo = Y.create({
|
|
|
10664
10664
|
}, 8, ["validation-status", "label"])
|
|
10665
10665
|
]),
|
|
10666
10666
|
v("div", Sc, [
|
|
10667
|
-
|
|
10667
|
+
b(f, {
|
|
10668
10668
|
quaternary: "",
|
|
10669
10669
|
onClick: u[3] || (u[3] = (k) => n.value = !1)
|
|
10670
10670
|
}, {
|
|
@@ -10673,7 +10673,7 @@ const Jo = Y.create({
|
|
|
10673
10673
|
]),
|
|
10674
10674
|
_: 1
|
|
10675
10675
|
}),
|
|
10676
|
-
|
|
10676
|
+
b(f, {
|
|
10677
10677
|
type: "primary",
|
|
10678
10678
|
onClick: s
|
|
10679
10679
|
}, {
|
|
@@ -10708,7 +10708,7 @@ const Jo = Y.create({
|
|
|
10708
10708
|
d === 0 || d > 1e3 || m === 0 || m > 30 || ((f = o.value) == null || f.chain().focus().insertTable({ rows: d, cols: m, withHeaderRow: !1 }).run(), e.value = !1);
|
|
10709
10709
|
}
|
|
10710
10710
|
return (d, m) => {
|
|
10711
|
-
const f = Rn,
|
|
10711
|
+
const f = Rn, g = Se, k = E;
|
|
10712
10712
|
return h(), _(k, {
|
|
10713
10713
|
ico: "i-sed:table",
|
|
10714
10714
|
text: ("t" in d ? d.t : i(c))("table.insert.text"),
|
|
@@ -10740,7 +10740,7 @@ const Jo = Y.create({
|
|
|
10740
10740
|
class: "smart-table-custom-title",
|
|
10741
10741
|
textContent: I(("t" in d ? d.t : i(c))("table.insert.property"))
|
|
10742
10742
|
}, null, 8, Ic),
|
|
10743
|
-
|
|
10743
|
+
b(f, {
|
|
10744
10744
|
value: i(l).rows,
|
|
10745
10745
|
"onUpdate:value": m[0] || (m[0] = (y) => i(l).rows = y),
|
|
10746
10746
|
size: "small",
|
|
@@ -10752,7 +10752,7 @@ const Jo = Y.create({
|
|
|
10752
10752
|
]),
|
|
10753
10753
|
_: 1
|
|
10754
10754
|
}, 8, ["value"]),
|
|
10755
|
-
|
|
10755
|
+
b(f, {
|
|
10756
10756
|
value: i(l).cols,
|
|
10757
10757
|
"onUpdate:value": m[1] || (m[1] = (y) => i(l).cols = y),
|
|
10758
10758
|
size: "small",
|
|
@@ -10764,7 +10764,7 @@ const Jo = Y.create({
|
|
|
10764
10764
|
]),
|
|
10765
10765
|
_: 1
|
|
10766
10766
|
}, 8, ["value"]),
|
|
10767
|
-
g
|
|
10767
|
+
b(g, {
|
|
10768
10768
|
type: "primary",
|
|
10769
10769
|
size: "small",
|
|
10770
10770
|
block: "",
|
|
@@ -10823,14 +10823,14 @@ const Jo = Y.create({
|
|
|
10823
10823
|
if (!l)
|
|
10824
10824
|
return;
|
|
10825
10825
|
const s = (a = e.value) == null ? void 0 : a.chain().focus();
|
|
10826
|
-
(u = e.value) != null && u.isActive("orderedList") ? e.value.getAttributes("orderedList").listStyleType === l ? s == null || s.toggleOrderedList().run() : (p = e.value) == null || p.view.state.doc.descendants((f,
|
|
10826
|
+
(u = e.value) != null && u.isActive("orderedList") ? e.value.getAttributes("orderedList").listStyleType === l ? s == null || s.toggleOrderedList().run() : (p = e.value) == null || p.view.state.doc.descendants((f, g) => {
|
|
10827
10827
|
var k, y;
|
|
10828
10828
|
if (f.type.name === "orderedList") {
|
|
10829
10829
|
const { state: C } = e.value, { selection: w } = C, { $from: S } = w;
|
|
10830
10830
|
if (f !== S.node(S.depth - 2))
|
|
10831
10831
|
return;
|
|
10832
10832
|
const x = (k = e.value) == null ? void 0 : k.view.state.tr.setNodeMarkup(
|
|
10833
|
-
|
|
10833
|
+
g,
|
|
10834
10834
|
void 0,
|
|
10835
10835
|
{
|
|
10836
10836
|
listStyleType: l
|
|
@@ -11059,10 +11059,10 @@ const Jo = Y.create({
|
|
|
11059
11059
|
}, {
|
|
11060
11060
|
content: A(() => [
|
|
11061
11061
|
v("div", Jc, [
|
|
11062
|
-
|
|
11063
|
-
|
|
11064
|
-
|
|
11065
|
-
|
|
11062
|
+
b(a),
|
|
11063
|
+
b(u),
|
|
11064
|
+
b(p),
|
|
11065
|
+
b(d)
|
|
11066
11066
|
])
|
|
11067
11067
|
]),
|
|
11068
11068
|
_: 1
|
|
@@ -11178,19 +11178,19 @@ const Jo = Y.create({
|
|
|
11178
11178
|
function l(d) {
|
|
11179
11179
|
if (!d || d === "default")
|
|
11180
11180
|
return !0;
|
|
11181
|
-
const m = "Cambria", f = "text",
|
|
11182
|
-
y.width =
|
|
11181
|
+
const m = "Cambria", f = "text", g = 100, k = 100, y = document.createElement("canvas"), C = y.getContext("2d", { willReadFrequently: !0 });
|
|
11182
|
+
y.width = g, y.height = k, C && (C.textAlign = "center", C.fillStyle = "black", C.textBaseline = "middle");
|
|
11183
11183
|
const w = (S) => {
|
|
11184
11184
|
if (!C)
|
|
11185
11185
|
return [];
|
|
11186
|
-
C.clearRect(0, 0,
|
|
11187
|
-
const { data: x } = C.getImageData(0, 0,
|
|
11186
|
+
C.clearRect(0, 0, g, k), C.font = `${k / 4}px ${S}, ${m}`, C.fillText(f, g / 2, k / 2);
|
|
11187
|
+
const { data: x } = C.getImageData(0, 0, g, k);
|
|
11188
11188
|
return Array.from(x).filter((L) => L !== 0);
|
|
11189
11189
|
};
|
|
11190
11190
|
return w(m).join("") !== w(d).join("");
|
|
11191
11191
|
}
|
|
11192
11192
|
const s = U(() => {
|
|
11193
|
-
var
|
|
11193
|
+
var g;
|
|
11194
11194
|
const d = (k) => k.map((y) => ({
|
|
11195
11195
|
...y,
|
|
11196
11196
|
disabled: !l(y.value)
|
|
@@ -11199,7 +11199,7 @@ const Jo = Y.create({
|
|
|
11199
11199
|
type: "group",
|
|
11200
11200
|
key: "all",
|
|
11201
11201
|
label: c("base.fontFamily.all"),
|
|
11202
|
-
children: d((
|
|
11202
|
+
children: d((g = e.value.dicts) == null ? void 0 : g.fonts) ?? []
|
|
11203
11203
|
}
|
|
11204
11204
|
], f = (k) => k.map(
|
|
11205
11205
|
(y) => {
|
|
@@ -11234,15 +11234,15 @@ const Jo = Y.create({
|
|
|
11234
11234
|
var f;
|
|
11235
11235
|
const m = JSON.stringify((f = n.value) == null ? void 0 : f.getJSON()).match(/"fontFamily":"([^"]+)"/g);
|
|
11236
11236
|
if (m)
|
|
11237
|
-
for (const
|
|
11238
|
-
const k =
|
|
11237
|
+
for (const g of m) {
|
|
11238
|
+
const k = g.replace('"fontFamily":"', "").replace('"', "");
|
|
11239
11239
|
t.value.includes(k) || t.value.push(k);
|
|
11240
11240
|
}
|
|
11241
11241
|
}
|
|
11242
11242
|
function p(d) {
|
|
11243
11243
|
var m, f;
|
|
11244
|
-
d && d !== "default" ? (o.value.fonts.forEach((
|
|
11245
|
-
|
|
11244
|
+
d && d !== "default" ? (o.value.fonts.forEach((g, k) => {
|
|
11245
|
+
g === d && o.value.fonts.splice(k, 1);
|
|
11246
11246
|
}), o.value.fonts.unshift(d), o.value.fonts.length > 10 && o.value.fonts.splice(10, 1), (m = n.value) == null || m.chain().focus().setFontFamily(d).run()) : (f = n.value) == null || f.chain().focus().unsetFontFamily().run(), u();
|
|
11247
11247
|
}
|
|
11248
11248
|
return de(
|
|
@@ -11251,14 +11251,14 @@ const Jo = Y.create({
|
|
|
11251
11251
|
d && u();
|
|
11252
11252
|
}
|
|
11253
11253
|
), (d, m) => {
|
|
11254
|
-
var
|
|
11254
|
+
var g;
|
|
11255
11255
|
const f = E;
|
|
11256
11256
|
return h(), _(f, ge({
|
|
11257
11257
|
text: ("t" in d ? d.t : i(c))("base.fontFamily.text"),
|
|
11258
11258
|
"menu-type": "select",
|
|
11259
11259
|
"hide-text": "",
|
|
11260
11260
|
"select-options": i(s),
|
|
11261
|
-
"select-value": ((
|
|
11261
|
+
"select-value": ((g = i(n)) == null ? void 0 : g.getAttributes("textStyle").fontFamily) || "default"
|
|
11262
11262
|
}, d.$attrs, {
|
|
11263
11263
|
placeholder: ("t" in d ? d.t : i(c))("base.fontFamily.text"),
|
|
11264
11264
|
"render-label": a,
|
|
@@ -11760,9 +11760,9 @@ const Jo = Y.create({
|
|
|
11760
11760
|
]);
|
|
11761
11761
|
return (m, f) => {
|
|
11762
11762
|
var Ye;
|
|
11763
|
-
const
|
|
11763
|
+
const g = Se, k = rt, y = td, C = ed, w = Qc, S = Yc, x = Xc, L = xo, z = wo, D = ko, N = Co, W = yo, T = _o, V = Kc, j = Gc, J = jc, Q = qc, G = Oc, ae = Dc, ee = zc, fe = Hc, ke = Fc, Le = Rc, De = Nc, O = Mc, Z = xc, ce = wc, at = kc, ut = Cc, ct = yc;
|
|
11764
11764
|
return h(), M(q, null, [
|
|
11765
|
-
|
|
11765
|
+
b(ct, {
|
|
11766
11766
|
ref_key: "scrollableRef",
|
|
11767
11767
|
ref: e,
|
|
11768
11768
|
class: "smart-scrollable-container"
|
|
@@ -11770,13 +11770,13 @@ const Jo = Y.create({
|
|
|
11770
11770
|
default: A(() => [
|
|
11771
11771
|
v("div", nd, [
|
|
11772
11772
|
v("div", od, [
|
|
11773
|
-
|
|
11773
|
+
b(k, {
|
|
11774
11774
|
trigger: "click",
|
|
11775
11775
|
options: i(d),
|
|
11776
11776
|
"onUpdate:show": f[0] || (f[0] = (Ze) => n.value = Ze)
|
|
11777
11777
|
}, {
|
|
11778
11778
|
default: A(() => [
|
|
11779
|
-
g
|
|
11779
|
+
b(g, {
|
|
11780
11780
|
quaternary: "",
|
|
11781
11781
|
size: "small",
|
|
11782
11782
|
class: "smart-classic-menu-insert"
|
|
@@ -11795,45 +11795,45 @@ const Jo = Y.create({
|
|
|
11795
11795
|
}, 8, ["options"])
|
|
11796
11796
|
]),
|
|
11797
11797
|
v("div", rd, [
|
|
11798
|
-
|
|
11799
|
-
|
|
11798
|
+
b(y),
|
|
11799
|
+
b(C)
|
|
11800
11800
|
]),
|
|
11801
11801
|
v("div", ld, [
|
|
11802
|
-
|
|
11803
|
-
|
|
11804
|
-
|
|
11805
|
-
|
|
11806
|
-
|
|
11807
|
-
|
|
11808
|
-
|
|
11809
|
-
|
|
11810
|
-
|
|
11802
|
+
b(w),
|
|
11803
|
+
b(S),
|
|
11804
|
+
b(x),
|
|
11805
|
+
b(L),
|
|
11806
|
+
b(z),
|
|
11807
|
+
b(D),
|
|
11808
|
+
b(N),
|
|
11809
|
+
b(W),
|
|
11810
|
+
b(T)
|
|
11811
11811
|
]),
|
|
11812
11812
|
v("div", sd, [
|
|
11813
|
-
|
|
11814
|
-
|
|
11815
|
-
|
|
11813
|
+
b(V),
|
|
11814
|
+
b(j),
|
|
11815
|
+
b(J)
|
|
11816
11816
|
]),
|
|
11817
11817
|
v("div", id, [
|
|
11818
|
-
|
|
11819
|
-
|
|
11820
|
-
|
|
11821
|
-
|
|
11822
|
-
|
|
11823
|
-
|
|
11818
|
+
b(Q),
|
|
11819
|
+
b(G),
|
|
11820
|
+
b(ae),
|
|
11821
|
+
b(ee),
|
|
11822
|
+
b(fe),
|
|
11823
|
+
b(ke)
|
|
11824
11824
|
]),
|
|
11825
11825
|
v("div", ad, [
|
|
11826
|
-
|
|
11827
|
-
|
|
11828
|
-
|
|
11826
|
+
b(Le),
|
|
11827
|
+
b(De),
|
|
11828
|
+
b(O)
|
|
11829
11829
|
]),
|
|
11830
11830
|
v("div", ud, [
|
|
11831
|
-
|
|
11832
|
-
|
|
11831
|
+
b(Z),
|
|
11832
|
+
b(ce)
|
|
11833
11833
|
]),
|
|
11834
11834
|
v("div", cd, [
|
|
11835
|
-
|
|
11836
|
-
|
|
11835
|
+
b(at),
|
|
11836
|
+
b(ut)
|
|
11837
11837
|
]),
|
|
11838
11838
|
f[2] || (f[2] = v("div", { class: "smart-virtual-group" }, null, -1))
|
|
11839
11839
|
])
|
|
@@ -11854,7 +11854,7 @@ const Jo = Y.create({
|
|
|
11854
11854
|
function fd(r, e) {
|
|
11855
11855
|
const n = pd;
|
|
11856
11856
|
return h(), M("div", hd, [
|
|
11857
|
-
|
|
11857
|
+
b(n)
|
|
11858
11858
|
]);
|
|
11859
11859
|
}
|
|
11860
11860
|
const bd = /* @__PURE__ */ F(md, [["render", fd], ["__scopeId", "data-v-3d91acb0"]]), gd = {
|
|
@@ -11904,7 +11904,7 @@ const bd = /* @__PURE__ */ F(md, [["render", fd], ["__scopeId", "data-v-3d91acb0
|
|
|
11904
11904
|
savedAt: d,
|
|
11905
11905
|
editor: m,
|
|
11906
11906
|
setOptions: f,
|
|
11907
|
-
resetStore:
|
|
11907
|
+
resetStore: g,
|
|
11908
11908
|
page: k,
|
|
11909
11909
|
editorDestroyed: y
|
|
11910
11910
|
} = $();
|
|
@@ -11965,7 +11965,7 @@ const bd = /* @__PURE__ */ F(md, [["render", fd], ["__scopeId", "data-v-3d91acb0
|
|
|
11965
11965
|
), m.value.on("blur", ({ editor: T, event: V }) => {
|
|
11966
11966
|
t("blur", { editor: T, event: V });
|
|
11967
11967
|
}), m.value.on("destroy", () => {
|
|
11968
|
-
|
|
11968
|
+
g(), t("destroy");
|
|
11969
11969
|
}));
|
|
11970
11970
|
}
|
|
11971
11971
|
), de(
|
|
@@ -12011,7 +12011,7 @@ const bd = /* @__PURE__ */ F(md, [["render", fd], ["__scopeId", "data-v-3d91acb0
|
|
|
12011
12011
|
});
|
|
12012
12012
|
function W() {
|
|
12013
12013
|
var T;
|
|
12014
|
-
(T = m.value) == null || T.destroy(), pn("ctrl+s,command+s"), pn("esc"),
|
|
12014
|
+
(T = m.value) == null || T.destroy(), pn("ctrl+s,command+s"), pn("esc"), g();
|
|
12015
12015
|
}
|
|
12016
12016
|
return on("saveContent", x), on("setLocale", z), e({
|
|
12017
12017
|
getOptions: () => u.value,
|
|
@@ -12056,9 +12056,9 @@ const bd = /* @__PURE__ */ F(md, [["render", fd], ["__scopeId", "data-v-3d91acb0
|
|
|
12056
12056
|
theme: i(l) ? i(On) : null
|
|
12057
12057
|
}, {
|
|
12058
12058
|
default: A(() => [
|
|
12059
|
-
|
|
12059
|
+
b(J, null, {
|
|
12060
12060
|
default: A(() => [
|
|
12061
|
-
|
|
12061
|
+
b(j)
|
|
12062
12062
|
]),
|
|
12063
12063
|
_: 1
|
|
12064
12064
|
}),
|
|
@@ -12071,7 +12071,7 @@ const bd = /* @__PURE__ */ F(md, [["render", fd], ["__scopeId", "data-v-3d91acb0
|
|
|
12071
12071
|
(h(), _(Q, { key: i(a) }))
|
|
12072
12072
|
])) : R("", !0),
|
|
12073
12073
|
v("main", yd, [
|
|
12074
|
-
|
|
12074
|
+
b(G, null, {
|
|
12075
12075
|
editor_tool: A(() => [
|
|
12076
12076
|
pe(T.$slots, "editor_tool")
|
|
12077
12077
|
]),
|
|
@@ -12079,7 +12079,7 @@ const bd = /* @__PURE__ */ F(md, [["render", fd], ["__scopeId", "data-v-3d91acb0
|
|
|
12079
12079
|
})
|
|
12080
12080
|
]),
|
|
12081
12081
|
i(C) ? (h(), M("footer", Cd, [
|
|
12082
|
-
|
|
12082
|
+
b(ae)
|
|
12083
12083
|
])) : R("", !0)
|
|
12084
12084
|
], 12, vd)
|
|
12085
12085
|
]),
|
|
@@ -12310,12 +12310,12 @@ const bd = /* @__PURE__ */ F(md, [["render", fd], ["__scopeId", "data-v-3d91acb0
|
|
|
12310
12310
|
p.value = y;
|
|
12311
12311
|
}
|
|
12312
12312
|
);
|
|
12313
|
-
const f = B(null),
|
|
12313
|
+
const f = B(null), g = B(null);
|
|
12314
12314
|
function k(y) {
|
|
12315
12315
|
o("toggle-popup", y);
|
|
12316
12316
|
}
|
|
12317
12317
|
return Tt(
|
|
12318
|
-
|
|
12318
|
+
g,
|
|
12319
12319
|
() => {
|
|
12320
12320
|
o("toggle-popup", !1);
|
|
12321
12321
|
},
|
|
@@ -12371,7 +12371,7 @@ const bd = /* @__PURE__ */ F(md, [["render", fd], ["__scopeId", "data-v-3d91acb0
|
|
|
12371
12371
|
default: A(() => {
|
|
12372
12372
|
var T;
|
|
12373
12373
|
return [
|
|
12374
|
-
|
|
12374
|
+
b(w, ge({
|
|
12375
12375
|
class: ["smart-menu-button has-arrow", {
|
|
12376
12376
|
"show-text": !r.hideText,
|
|
12377
12377
|
active: r.popupVisible
|
|
@@ -12439,7 +12439,7 @@ const bd = /* @__PURE__ */ F(md, [["render", fd], ["__scopeId", "data-v-3d91acb0
|
|
|
12439
12439
|
v("p", Bd, I(r.text), 1),
|
|
12440
12440
|
r.shortcutText ? (h(), M("kbd", Ld, I(i(we)(r.shortcutText)), 1)) : R("", !0)
|
|
12441
12441
|
]),
|
|
12442
|
-
|
|
12442
|
+
b(L, {
|
|
12443
12443
|
show: r.popupVisible,
|
|
12444
12444
|
placement: "bottom",
|
|
12445
12445
|
to: i(l),
|
|
@@ -12459,7 +12459,7 @@ const bd = /* @__PURE__ */ F(md, [["render", fd], ["__scopeId", "data-v-3d91acb0
|
|
|
12459
12459
|
default: A(() => [
|
|
12460
12460
|
v("div", {
|
|
12461
12461
|
ref_key: "popupContentRef",
|
|
12462
|
-
ref:
|
|
12462
|
+
ref: g,
|
|
12463
12463
|
class: "smart-popup-content p-x-8 p-y-4"
|
|
12464
12464
|
}, [
|
|
12465
12465
|
pe(y.$slots, "content", {}, void 0, !0)
|
|
@@ -12480,7 +12480,7 @@ const bd = /* @__PURE__ */ F(md, [["render", fd], ["__scopeId", "data-v-3d91acb0
|
|
|
12480
12480
|
trigger: A(() => {
|
|
12481
12481
|
var T, V;
|
|
12482
12482
|
return [
|
|
12483
|
-
|
|
12483
|
+
b(w, ge({
|
|
12484
12484
|
ref_key: "popupHandleRef",
|
|
12485
12485
|
ref: f,
|
|
12486
12486
|
class: ["smart-menu-button", {
|
|
@@ -12514,7 +12514,7 @@ const bd = /* @__PURE__ */ F(md, [["render", fd], ["__scopeId", "data-v-3d91acb0
|
|
|
12514
12514
|
default: A(() => [
|
|
12515
12515
|
v("div", {
|
|
12516
12516
|
ref_key: "popupContentRef",
|
|
12517
|
-
ref:
|
|
12517
|
+
ref: g,
|
|
12518
12518
|
class: "smart-popup-content p-x-8 p-y-4"
|
|
12519
12519
|
}, [
|
|
12520
12520
|
pe(y.$slots, "content", {}, void 0, !0)
|
|
@@ -13127,18 +13127,18 @@ const bd = /* @__PURE__ */ F(md, [["render", fd], ["__scopeId", "data-v-3d91acb0
|
|
|
13127
13127
|
emits: ["change", "update:visible"],
|
|
13128
13128
|
setup(r, { emit: e }) {
|
|
13129
13129
|
const n = r, o = e, { popupVisible: t } = ye(), { slimOptions: l } = H(), s = ze("recent"), a = ["#B12318", "#EB3323", "#F6C143", "#FFFE55", "#A0CD63", "#4FAD5B", "#4CAFEA", "#2D70BA", "#06215C", "#68389B"], u = B(n.defaultColor), p = `#color-picker-${Te(4)}`;
|
|
13130
|
-
function d(
|
|
13130
|
+
function d(g) {
|
|
13131
13131
|
t.value = !0, s.value.colors.forEach((k, y) => {
|
|
13132
|
-
k ===
|
|
13133
|
-
}), s.value.colors.unshift(
|
|
13132
|
+
k === g && s.value.colors.splice(y, 1);
|
|
13133
|
+
}), s.value.colors.unshift(g), s.value.colors.length > 10 && s.value.colors.splice(10, 1), o("change", g), o("update:visible");
|
|
13134
13134
|
}
|
|
13135
|
-
function m(
|
|
13136
|
-
d(
|
|
13135
|
+
function m(g) {
|
|
13136
|
+
d(g), o("change", g);
|
|
13137
13137
|
}
|
|
13138
13138
|
function f() {
|
|
13139
13139
|
return _e("div", { class: "smart-color-picker-render" }, "更多颜色");
|
|
13140
13140
|
}
|
|
13141
|
-
return (
|
|
13141
|
+
return (g, k) => {
|
|
13142
13142
|
var w;
|
|
13143
13143
|
const y = Se, C = Nn;
|
|
13144
13144
|
return h(), M("div", {
|
|
@@ -13146,13 +13146,13 @@ const bd = /* @__PURE__ */ F(md, [["render", fd], ["__scopeId", "data-v-3d91acb0
|
|
|
13146
13146
|
class: "smart-color-picker-container"
|
|
13147
13147
|
}, [
|
|
13148
13148
|
v("div", Od, [
|
|
13149
|
-
|
|
13149
|
+
b(y, {
|
|
13150
13150
|
size: "small",
|
|
13151
13151
|
block: "",
|
|
13152
13152
|
onClick: k[0] || (k[0] = (S) => m(i(u)))
|
|
13153
13153
|
}, {
|
|
13154
13154
|
default: A(() => [
|
|
13155
|
-
te(I(("t" in
|
|
13155
|
+
te(I(("t" in g ? g.t : i(c))("colorPicker.default")), 1)
|
|
13156
13156
|
]),
|
|
13157
13157
|
_: 1
|
|
13158
13158
|
})
|
|
@@ -13167,7 +13167,7 @@ const bd = /* @__PURE__ */ F(md, [["render", fd], ["__scopeId", "data-v-3d91acb0
|
|
|
13167
13167
|
]),
|
|
13168
13168
|
v("div", {
|
|
13169
13169
|
class: "smart-color-picker-group-title",
|
|
13170
|
-
textContent: I(("t" in
|
|
13170
|
+
textContent: I(("t" in g ? g.t : i(c))("colorPicker.standard"))
|
|
13171
13171
|
}, null, 8, Wd),
|
|
13172
13172
|
v("div", Ud, [
|
|
13173
13173
|
(h(), M(q, null, ve(a, (S, x) => v("div", {
|
|
@@ -13180,7 +13180,7 @@ const bd = /* @__PURE__ */ F(md, [["render", fd], ["__scopeId", "data-v-3d91acb0
|
|
|
13180
13180
|
i(s).colors.length > 0 ? (h(), M(q, { key: 0 }, [
|
|
13181
13181
|
v("div", {
|
|
13182
13182
|
class: "smart-color-picker-group-title",
|
|
13183
|
-
textContent: I(("t" in
|
|
13183
|
+
textContent: I(("t" in g ? g.t : i(c))("colorPicker.recent"))
|
|
13184
13184
|
}, null, 8, qd),
|
|
13185
13185
|
v("div", jd, [
|
|
13186
13186
|
(h(!0), M(q, null, ve(i(s).colors, (S, x) => (h(), M("div", {
|
|
@@ -13192,7 +13192,7 @@ const bd = /* @__PURE__ */ F(md, [["render", fd], ["__scopeId", "data-v-3d91acb0
|
|
|
13192
13192
|
])
|
|
13193
13193
|
], 64)) : R("", !0),
|
|
13194
13194
|
k[1] || (k[1] = v("div", { class: "smart-color-picker-divider" }, null, -1)),
|
|
13195
|
-
|
|
13195
|
+
b(C, {
|
|
13196
13196
|
to: p,
|
|
13197
13197
|
placement: "right",
|
|
13198
13198
|
"render-label": f,
|
|
@@ -13228,7 +13228,7 @@ const bd = /* @__PURE__ */ F(md, [["render", fd], ["__scopeId", "data-v-3d91acb0
|
|
|
13228
13228
|
onMenuClick: a[0] || (a[0] = (d) => l(i(t)))
|
|
13229
13229
|
}, {
|
|
13230
13230
|
content: A(() => [
|
|
13231
|
-
|
|
13231
|
+
b(u, {
|
|
13232
13232
|
"default-color": r.defaultColor,
|
|
13233
13233
|
onChange: l,
|
|
13234
13234
|
"onUpdate:visible": i(n)
|
|
@@ -13464,9 +13464,9 @@ const bd = /* @__PURE__ */ F(md, [["render", fd], ["__scopeId", "data-v-3d91acb0
|
|
|
13464
13464
|
}, {
|
|
13465
13465
|
content: A(() => [
|
|
13466
13466
|
v("div", ap, [
|
|
13467
|
-
|
|
13468
|
-
|
|
13469
|
-
|
|
13467
|
+
b(a, { "onUpdate:popupVisible": i(n) }, null, 8, ["onUpdate:popupVisible"]),
|
|
13468
|
+
b(u, { "onUpdate:popupVisible": i(n) }, null, 8, ["onUpdate:popupVisible"]),
|
|
13469
|
+
b(p, { "onUpdate:popupVisible": i(n) }, null, 8, ["onUpdate:popupVisible"])
|
|
13470
13470
|
])
|
|
13471
13471
|
]),
|
|
13472
13472
|
_: 1
|
|
@@ -13565,26 +13565,26 @@ const bd = /* @__PURE__ */ F(md, [["render", fd], ["__scopeId", "data-v-3d91acb0
|
|
|
13565
13565
|
const { editor: e, showTableBar: n } = H();
|
|
13566
13566
|
return (o, t) => {
|
|
13567
13567
|
var L;
|
|
13568
|
-
const l = mp, s = pp, a = dp, u = cp, p = up, d = rp, m = op, f = np,
|
|
13568
|
+
const l = mp, s = pp, a = dp, u = cp, p = up, d = rp, m = op, f = np, g = tp, k = ep, y = Qd, C = Zd, w = Yd, S = zd, x = Hd;
|
|
13569
13569
|
return (L = i(e)) != null && L.isActive("tableCell") && i(n) ? (h(), M(q, { key: 0 }, [
|
|
13570
|
-
|
|
13570
|
+
b(l),
|
|
13571
13571
|
t[0] || (t[0] = v("div", { class: "smart-bubble-menu-divider" }, null, -1)),
|
|
13572
|
-
|
|
13573
|
-
|
|
13574
|
-
|
|
13575
|
-
|
|
13572
|
+
b(s),
|
|
13573
|
+
b(a),
|
|
13574
|
+
b(u),
|
|
13575
|
+
b(p),
|
|
13576
13576
|
t[1] || (t[1] = v("div", { class: "smart-bubble-menu-divider" }, null, -1)),
|
|
13577
|
-
|
|
13578
|
-
|
|
13579
|
-
|
|
13580
|
-
g
|
|
13581
|
-
|
|
13582
|
-
|
|
13583
|
-
|
|
13577
|
+
b(d),
|
|
13578
|
+
b(m),
|
|
13579
|
+
b(f),
|
|
13580
|
+
b(g),
|
|
13581
|
+
b(k),
|
|
13582
|
+
b(y),
|
|
13583
|
+
b(C),
|
|
13584
13584
|
t[2] || (t[2] = v("div", { class: "smart-bubble-menu-divider" }, null, -1)),
|
|
13585
|
-
|
|
13586
|
-
|
|
13587
|
-
|
|
13585
|
+
b(w),
|
|
13586
|
+
b(S),
|
|
13587
|
+
b(x)
|
|
13588
13588
|
], 64)) : R("", !0);
|
|
13589
13589
|
};
|
|
13590
13590
|
}
|
|
@@ -13610,7 +13610,7 @@ const bd = /* @__PURE__ */ F(md, [["render", fd], ["__scopeId", "data-v-3d91acb0
|
|
|
13610
13610
|
"tippy-options": i(o)
|
|
13611
13611
|
}, {
|
|
13612
13612
|
default: A(() => [
|
|
13613
|
-
|
|
13613
|
+
b(s)
|
|
13614
13614
|
]),
|
|
13615
13615
|
_: 1
|
|
13616
13616
|
}, 8, ["editor", "tippy-options"]);
|
|
@@ -13741,7 +13741,7 @@ const _p = {
|
|
|
13741
13741
|
return Re(() => l()), (s, a) => {
|
|
13742
13742
|
const u = bp;
|
|
13743
13743
|
return h(), M(q, null, [
|
|
13744
|
-
|
|
13744
|
+
b(i(Xn), {
|
|
13745
13745
|
editor: i(e),
|
|
13746
13746
|
class: "smart-editor-slim"
|
|
13747
13747
|
}, null, 8, ["editor"]),
|
|
@@ -13844,7 +13844,7 @@ const _p = {
|
|
|
13844
13844
|
d === 0 || d > 1e3 || m === 0 || m > 30 || ((f = o.value) == null || f.chain().focus().insertTable({ rows: d, cols: m, withHeaderRow: !1 }).run(), e.value = !1);
|
|
13845
13845
|
}
|
|
13846
13846
|
return (d, m) => {
|
|
13847
|
-
const f = Rn,
|
|
13847
|
+
const f = Rn, g = Se, k = P;
|
|
13848
13848
|
return h(), _(k, {
|
|
13849
13849
|
ico: "i-sed:table",
|
|
13850
13850
|
text: ("t" in d ? d.t : i(c))("table.insert.text"),
|
|
@@ -13876,7 +13876,7 @@ const _p = {
|
|
|
13876
13876
|
class: "smart-table-custom-title",
|
|
13877
13877
|
textContent: I(("t" in d ? d.t : i(c))("table.insert.property"))
|
|
13878
13878
|
}, null, 8, Sp),
|
|
13879
|
-
|
|
13879
|
+
b(f, {
|
|
13880
13880
|
value: i(l).rows,
|
|
13881
13881
|
"onUpdate:value": m[0] || (m[0] = (y) => i(l).rows = y),
|
|
13882
13882
|
size: "small",
|
|
@@ -13888,7 +13888,7 @@ const _p = {
|
|
|
13888
13888
|
]),
|
|
13889
13889
|
_: 1
|
|
13890
13890
|
}, 8, ["value"]),
|
|
13891
|
-
|
|
13891
|
+
b(f, {
|
|
13892
13892
|
value: i(l).cols,
|
|
13893
13893
|
"onUpdate:value": m[1] || (m[1] = (y) => i(l).cols = y),
|
|
13894
13894
|
size: "small",
|
|
@@ -13900,7 +13900,7 @@ const _p = {
|
|
|
13900
13900
|
]),
|
|
13901
13901
|
_: 1
|
|
13902
13902
|
}, 8, ["value"]),
|
|
13903
|
-
g
|
|
13903
|
+
b(g, {
|
|
13904
13904
|
type: "primary",
|
|
13905
13905
|
size: "small",
|
|
13906
13906
|
block: "",
|
|
@@ -14080,10 +14080,10 @@ const _p = {
|
|
|
14080
14080
|
}, {
|
|
14081
14081
|
content: A(() => [
|
|
14082
14082
|
v("div", Fp, [
|
|
14083
|
-
|
|
14084
|
-
|
|
14085
|
-
|
|
14086
|
-
|
|
14083
|
+
b(a),
|
|
14084
|
+
b(u),
|
|
14085
|
+
b(p),
|
|
14086
|
+
b(d)
|
|
14087
14087
|
])
|
|
14088
14088
|
]),
|
|
14089
14089
|
_: 1
|
|
@@ -14190,10 +14190,10 @@ const _p = {
|
|
|
14190
14190
|
"hide-text": "",
|
|
14191
14191
|
"popup-visible": i(t),
|
|
14192
14192
|
onTogglePopup: i(l),
|
|
14193
|
-
onMenuClick: d[0] || (d[0] = (
|
|
14193
|
+
onMenuClick: d[0] || (d[0] = (g) => u(i(a)))
|
|
14194
14194
|
}, {
|
|
14195
14195
|
content: A(() => [
|
|
14196
|
-
|
|
14196
|
+
b(m, {
|
|
14197
14197
|
"default-color": r.defaultColor,
|
|
14198
14198
|
onChange: u
|
|
14199
14199
|
}, null, 8, ["default-color"])
|
|
@@ -14247,10 +14247,10 @@ const _p = {
|
|
|
14247
14247
|
"hide-text": "",
|
|
14248
14248
|
"popup-visible": i(t),
|
|
14249
14249
|
onTogglePopup: i(l),
|
|
14250
|
-
onMenuClick: d[0] || (d[0] = (
|
|
14250
|
+
onMenuClick: d[0] || (d[0] = (g) => u(i(a)))
|
|
14251
14251
|
}, {
|
|
14252
14252
|
content: A(() => [
|
|
14253
|
-
|
|
14253
|
+
b(m, {
|
|
14254
14254
|
"default-color": r.defaultColor,
|
|
14255
14255
|
onChange: u
|
|
14256
14256
|
}, null, 8, ["default-color"])
|
|
@@ -14396,19 +14396,19 @@ const _p = {
|
|
|
14396
14396
|
function l(d) {
|
|
14397
14397
|
if (!d || d === "default")
|
|
14398
14398
|
return !0;
|
|
14399
|
-
const m = "Cambria", f = "text",
|
|
14400
|
-
y.width =
|
|
14399
|
+
const m = "Cambria", f = "text", g = 100, k = 100, y = document.createElement("canvas"), C = y.getContext("2d", { willReadFrequently: !0 });
|
|
14400
|
+
y.width = g, y.height = k, C && (C.textAlign = "center", C.fillStyle = "black", C.textBaseline = "middle");
|
|
14401
14401
|
const w = (S) => {
|
|
14402
14402
|
if (!C)
|
|
14403
14403
|
return [];
|
|
14404
|
-
C.clearRect(0, 0,
|
|
14405
|
-
const { data: x } = C.getImageData(0, 0,
|
|
14404
|
+
C.clearRect(0, 0, g, k), C.font = `${k / 4}px ${S}, ${m}`, C.fillText(f, g / 2, k / 2);
|
|
14405
|
+
const { data: x } = C.getImageData(0, 0, g, k);
|
|
14406
14406
|
return Array.from(x).filter((L) => L !== 0);
|
|
14407
14407
|
};
|
|
14408
14408
|
return w(m).join("") !== w(d).join("");
|
|
14409
14409
|
}
|
|
14410
14410
|
const s = U(() => {
|
|
14411
|
-
var
|
|
14411
|
+
var g;
|
|
14412
14412
|
const d = (k) => k.map((y) => ({
|
|
14413
14413
|
...y,
|
|
14414
14414
|
disabled: !l(y.value)
|
|
@@ -14417,7 +14417,7 @@ const _p = {
|
|
|
14417
14417
|
type: "group",
|
|
14418
14418
|
key: "all",
|
|
14419
14419
|
label: c("base.fontFamily.all"),
|
|
14420
|
-
children: d((
|
|
14420
|
+
children: d((g = e.value.dicts) == null ? void 0 : g.fonts) ?? []
|
|
14421
14421
|
}
|
|
14422
14422
|
], f = (k) => k.map(
|
|
14423
14423
|
(y) => {
|
|
@@ -14452,15 +14452,15 @@ const _p = {
|
|
|
14452
14452
|
var f;
|
|
14453
14453
|
const m = JSON.stringify((f = n.value) == null ? void 0 : f.getJSON()).match(/"fontFamily":"([^"]+)"/g);
|
|
14454
14454
|
if (m)
|
|
14455
|
-
for (const
|
|
14456
|
-
const k =
|
|
14455
|
+
for (const g of m) {
|
|
14456
|
+
const k = g.replace('"fontFamily":"', "").replace('"', "");
|
|
14457
14457
|
t.value.includes(k) || t.value.push(k);
|
|
14458
14458
|
}
|
|
14459
14459
|
}
|
|
14460
14460
|
function p(d) {
|
|
14461
14461
|
var m, f;
|
|
14462
|
-
d && d !== "default" ? (o.value.fonts.forEach((
|
|
14463
|
-
|
|
14462
|
+
d && d !== "default" ? (o.value.fonts.forEach((g, k) => {
|
|
14463
|
+
g === d && o.value.fonts.splice(k, 1);
|
|
14464
14464
|
}), o.value.fonts.unshift(d), o.value.fonts.length > 10 && o.value.fonts.splice(10, 1), (m = n.value) == null || m.chain().focus().setFontFamily(d).run()) : (f = n.value) == null || f.chain().focus().unsetFontFamily().run(), u();
|
|
14465
14465
|
}
|
|
14466
14466
|
return de(
|
|
@@ -14469,14 +14469,14 @@ const _p = {
|
|
|
14469
14469
|
d && u();
|
|
14470
14470
|
}
|
|
14471
14471
|
), (d, m) => {
|
|
14472
|
-
var
|
|
14472
|
+
var g;
|
|
14473
14473
|
const f = P;
|
|
14474
14474
|
return h(), _(f, ge({
|
|
14475
14475
|
text: ("t" in d ? d.t : i(c))("base.fontFamily.text"),
|
|
14476
14476
|
"menu-type": "select",
|
|
14477
14477
|
"hide-text": "",
|
|
14478
14478
|
"select-options": i(s),
|
|
14479
|
-
"select-value": ((
|
|
14479
|
+
"select-value": ((g = i(n)) == null ? void 0 : g.getAttributes("textStyle").fontFamily) || "default"
|
|
14480
14480
|
}, d.$attrs, {
|
|
14481
14481
|
placeholder: ("t" in d ? d.t : i(c))("base.fontFamily.text"),
|
|
14482
14482
|
"render-label": a,
|
|
@@ -14570,29 +14570,29 @@ const _p = {
|
|
|
14570
14570
|
setup(r) {
|
|
14571
14571
|
const { config: e } = H();
|
|
14572
14572
|
return (n, o) => {
|
|
14573
|
-
const t = Qp, l = Zp, s = Xp, a = Kp, u = Gp, p = jp, d = qp, m = Jp, f = Up,
|
|
14573
|
+
const t = Qp, l = Zp, s = Xp, a = Kp, u = Gp, p = jp, d = qp, m = Jp, f = Up, g = Vp, k = Op, y = Dp, C = zp, w = Hp, S = Lp, x = Bp, L = Mp, z = xp, D = wp, N = kp, W = Cp;
|
|
14574
14574
|
return h(), M("div", em, [
|
|
14575
|
-
|
|
14576
|
-
|
|
14577
|
-
|
|
14578
|
-
|
|
14579
|
-
|
|
14580
|
-
|
|
14581
|
-
|
|
14582
|
-
|
|
14583
|
-
|
|
14584
|
-
g
|
|
14585
|
-
|
|
14586
|
-
|
|
14587
|
-
|
|
14588
|
-
|
|
14589
|
-
|
|
14590
|
-
|
|
14591
|
-
|
|
14592
|
-
|
|
14575
|
+
b(t),
|
|
14576
|
+
b(l),
|
|
14577
|
+
b(s),
|
|
14578
|
+
b(a),
|
|
14579
|
+
b(u),
|
|
14580
|
+
b(p),
|
|
14581
|
+
b(d),
|
|
14582
|
+
b(m),
|
|
14583
|
+
b(f),
|
|
14584
|
+
b(g),
|
|
14585
|
+
b(k),
|
|
14586
|
+
b(y),
|
|
14587
|
+
b(C),
|
|
14588
|
+
b(w),
|
|
14589
|
+
b(S),
|
|
14590
|
+
b(x),
|
|
14591
|
+
b(L),
|
|
14592
|
+
b(z),
|
|
14593
14593
|
i(e).canFill ? (h(), _(D, { key: 0 })) : R("", !0),
|
|
14594
|
-
|
|
14595
|
-
|
|
14594
|
+
b(N),
|
|
14595
|
+
b(W)
|
|
14596
14596
|
]);
|
|
14597
14597
|
};
|
|
14598
14598
|
}
|
|
@@ -14617,39 +14617,52 @@ const _p = {
|
|
|
14617
14617
|
Jn(() => {
|
|
14618
14618
|
u(n.config);
|
|
14619
14619
|
});
|
|
14620
|
-
function d(
|
|
14621
|
-
const
|
|
14622
|
-
|
|
14623
|
-
|
|
14620
|
+
function d(k) {
|
|
14621
|
+
const y = {
|
|
14622
|
+
"&": "&"
|
|
14623
|
+
// '<': '<',
|
|
14624
|
+
// '>': '>',
|
|
14625
|
+
// '"': '"',
|
|
14626
|
+
// ''': "'",
|
|
14627
|
+
};
|
|
14628
|
+
return k.replace(/&/g, (C) => y[C]);
|
|
14629
|
+
}
|
|
14630
|
+
function m(k) {
|
|
14631
|
+
const y = /\$([^$]*)\$/g;
|
|
14632
|
+
if (!k)
|
|
14633
|
+
return "";
|
|
14634
|
+
const C = d(k);
|
|
14635
|
+
return C ? C.replace(y, (w, S) => `<span class="Tiptap-mathematics-render Tiptap-mathematics-render--editable ProseMirror-widget">${co.renderToString(
|
|
14636
|
+
S,
|
|
14624
14637
|
{ throwOnError: !1 }
|
|
14625
14638
|
)}</span>`) : "";
|
|
14626
14639
|
}
|
|
14627
|
-
const
|
|
14640
|
+
const f = yr(r, "modelValue");
|
|
14628
14641
|
Re(() => {
|
|
14629
|
-
var
|
|
14630
|
-
(
|
|
14642
|
+
var k;
|
|
14643
|
+
(k = a.value) == null || k.commands.setContent(f.value);
|
|
14631
14644
|
});
|
|
14632
|
-
function
|
|
14633
|
-
var
|
|
14634
|
-
(
|
|
14645
|
+
function g() {
|
|
14646
|
+
var k;
|
|
14647
|
+
(k = a.value) == null || k.destroy();
|
|
14635
14648
|
}
|
|
14636
14649
|
return Xe(() => {
|
|
14637
|
-
|
|
14650
|
+
g();
|
|
14638
14651
|
}), de(
|
|
14639
14652
|
() => a.value,
|
|
14640
14653
|
() => {
|
|
14641
14654
|
a.value && (a.value.on("create", () => {
|
|
14642
|
-
o("getHtml",
|
|
14655
|
+
o("getHtml", m(a.value.getHTML()));
|
|
14643
14656
|
}), a.value.on("update", () => {
|
|
14644
|
-
o("getHtml",
|
|
14645
|
-
}), a.value.on("selectionUpdate", ({ editor:
|
|
14646
|
-
const { $from:
|
|
14647
|
-
p.value =
|
|
14657
|
+
o("getHtml", m(a.value.getHTML())), f.value = a.value.getJSON();
|
|
14658
|
+
}), a.value.on("selectionUpdate", ({ editor: k }) => {
|
|
14659
|
+
const { $from: y } = k.state.selection;
|
|
14660
|
+
p.value = y.parent.type.name === "tableCell";
|
|
14648
14661
|
}));
|
|
14649
14662
|
}
|
|
14650
|
-
), (
|
|
14651
|
-
const
|
|
14652
|
-
return h(), _(
|
|
14663
|
+
), (k, y) => {
|
|
14664
|
+
const C = nm, w = yp, S = Pn;
|
|
14665
|
+
return h(), _(S, {
|
|
14653
14666
|
"cls-prefix": "se",
|
|
14654
14667
|
"theme-overrides": i(t) ? i(bo) : i(fo),
|
|
14655
14668
|
locale: i(s) !== "en_US" ? i(Fn) : i(Hn),
|
|
@@ -14662,10 +14675,10 @@ const _p = {
|
|
|
14662
14675
|
class: "smart-editor-slim-container"
|
|
14663
14676
|
}, [
|
|
14664
14677
|
v("header", rm, [
|
|
14665
|
-
|
|
14678
|
+
b(C)
|
|
14666
14679
|
]),
|
|
14667
14680
|
v("main", lm, [
|
|
14668
|
-
|
|
14681
|
+
b(w)
|
|
14669
14682
|
])
|
|
14670
14683
|
], 8, om)
|
|
14671
14684
|
]),
|