@templatical/editor 0.0.4 → 0.0.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/{AiChatSidebar-CjfhTZwo.js → AiChatSidebar-DwME3f-a.js} +84 -70
- package/dist/{AiFeatureMenu-K44aZa_P.js → AiFeatureMenu-DJvWL1GZ.js} +23 -23
- package/dist/CloudEditor-Fe0ssRgi.js +1082 -0
- package/dist/{CollaboratorBar-BuCEcdbB.js → CollaboratorBar-DTT0EkZn.js} +1 -1
- package/dist/{CommentsSidebar-2lcqMfIP.js → CommentsSidebar-DrJhQRXK.js} +131 -131
- package/dist/{DesignReferenceSidebar-CNMu4Zrx.js → DesignReferenceSidebar-DdOht5zn.js} +49 -49
- package/dist/{ModuleBrowserModal-CvQ0xyQf.js → ModuleBrowserModal-CiV_jOEM.js} +58 -58
- package/dist/{ModulePreviewCanvas-Be2B3Y07.js → ModulePreviewCanvas-Bmy6Y1WE.js} +1 -1
- package/dist/ParagraphEditor-CoQ3NlS7.js +688 -0
- package/dist/{SaveModuleDialog-BaaeH5Xm.js → SaveModuleDialog-CD2ZYq1o.js} +25 -25
- package/dist/{SnapshotHistory-BPfjiuu1.js → SnapshotHistory-DltsKvhP.js} +1 -1
- package/dist/TemplateScoringPanel-DmnmUE3y.js +254 -0
- package/dist/{TestEmailModal-DIAlB3e_.js → TestEmailModal-Dl633j9o.js} +2 -2
- package/dist/{TitleEditor-D9DPjQkX.js → TitleEditor-C7fds2Nc.js} +3 -3
- package/dist/{TplModal-CmTSvCY-.js → TplModal-C5_CF-qn.js} +1 -1
- package/dist/{blockTypeIcons-D1RTWOkx.js → blockTypeIcons-BrKZB10B.js} +1 -1
- package/dist/cdn/chunks/AiChatSidebar-X_Bv3Qys.js +2 -0
- package/dist/cdn/chunks/{AiFeatureMenu-lxVm1RjH.js → AiFeatureMenu-C5UQmEgV.js} +16 -16
- package/dist/cdn/chunks/AiFeatureMenu-C5UQmEgV.js.map +1 -0
- package/dist/cdn/chunks/CloudEditor-DeTolKnf.js +1056 -0
- package/dist/cdn/chunks/CloudEditor-DeTolKnf.js.map +1 -0
- package/dist/cdn/chunks/{CollaboratorBar-D2PKtlOw.js → CollaboratorBar-DO1nxSrr.js} +3 -3
- package/dist/cdn/chunks/{CollaboratorBar-D2PKtlOw.js.map → CollaboratorBar-DO1nxSrr.js.map} +1 -1
- package/dist/cdn/chunks/CommentsSidebar-4MTw_hue.js +2 -0
- package/dist/cdn/chunks/DesignReferenceSidebar-Bswh4Yx4.js +2 -0
- package/dist/cdn/chunks/{ModuleBrowserModal-CxDXzkKS.js → ModuleBrowserModal-ChBr3aXj.js} +52 -52
- package/dist/cdn/chunks/ModuleBrowserModal-ChBr3aXj.js.map +1 -0
- package/dist/cdn/chunks/{ModulePreviewCanvas-DEfHampA.js → ModulePreviewCanvas-DkSvri9H.js} +2 -2
- package/dist/cdn/chunks/{ModulePreviewCanvas-DEfHampA.js.map → ModulePreviewCanvas-DkSvri9H.js.map} +1 -1
- package/dist/cdn/chunks/ParagraphEditor-DU3oUKA7.js +539 -0
- package/dist/cdn/chunks/ParagraphEditor-DU3oUKA7.js.map +1 -0
- package/dist/cdn/chunks/{RichTextEditorContent-DWUzizsC.js → RichTextEditorContent-BrsW1p9s.js} +4 -4
- package/dist/cdn/chunks/{RichTextEditorContent-DWUzizsC.js.map → RichTextEditorContent-BrsW1p9s.js.map} +1 -1
- package/dist/cdn/chunks/{SaveModuleDialog-DVna2xUl.js → SaveModuleDialog-CjqKkTEc.js} +24 -24
- package/dist/cdn/chunks/SaveModuleDialog-CjqKkTEc.js.map +1 -0
- package/dist/cdn/chunks/SnapshotHistory-KME4xmn_.js +2 -0
- package/dist/cdn/chunks/TemplateScoringPanel-DgB3xDN6.js +2 -0
- package/dist/cdn/chunks/TestEmailModal-DdpvRbYf.js +2 -0
- package/dist/cdn/chunks/{TitleEditor-DDf_OcHS.js → TitleEditor-C8FYbadT.js} +9 -9
- package/dist/cdn/chunks/{TitleEditor-DDf_OcHS.js.map → TitleEditor-C8FYbadT.js.map} +1 -1
- package/dist/cdn/chunks/{blockTypeIcons-BnobReQm.js → blockTypeIcons-5QwYklNq.js} +3 -3
- package/dist/cdn/chunks/{blockTypeIcons-BnobReQm.js.map → blockTypeIcons-5QwYklNq.js.map} +1 -1
- package/dist/cdn/chunks/{dist-CJcMnY7o.js → dist-BF5c3Dr-.js} +1 -1
- package/dist/cdn/chunks/dist-BGzvIxcJ.js +2 -0
- package/dist/cdn/chunks/dist-CFemF8rI.js +2 -0
- package/dist/cdn/chunks/dist-Co6uFhFK.js +2 -0
- package/dist/cdn/chunks/{dist-BkETaOfw.js → dist-DCikBY9K.js} +1 -1
- package/dist/cdn/chunks/dist-DUILafAC.js +2 -0
- package/dist/cdn/chunks/dist-DghiKH0A.js +2 -0
- package/dist/cdn/chunks/dist-Dw8ckvfK.js +2 -0
- package/dist/cdn/chunks/dist-H07p0KAw.js +2 -0
- package/dist/cdn/chunks/{dist-B878xb_62.js → dist-KYv9v_1z2.js} +11 -11
- package/dist/cdn/chunks/{dist-B878xb_62.js.map → dist-KYv9v_1z2.js.map} +1 -1
- package/dist/cdn/chunks/{dist-DLWHlekl.js → dist-MjnKIc0W.js} +1 -1
- package/dist/cdn/chunks/{dist-CllLxIMQ.js → dist-odp0vGRv.js} +1 -1
- package/dist/cdn/chunks/{extensions-B_kcV0tK.js → extensions-Bj7USRLr.js} +20 -20
- package/dist/cdn/chunks/{extensions-B_kcV0tK.js.map → extensions-Bj7USRLr.js.map} +1 -1
- package/dist/cdn/chunks/{features-ofOGnSC0.js → features-Ds0XUfte.js} +1235 -1198
- package/dist/cdn/chunks/features-Ds0XUfte.js.map +1 -0
- package/dist/cdn/chunks/{icons-bIb7PBOE.js → icons-fWsuSvgd.js} +2 -2
- package/dist/cdn/chunks/{icons-bIb7PBOE.js.map → icons-fWsuSvgd.js.map} +1 -1
- package/dist/cdn/chunks/{media-library-BIYzV2Y2.js → media-library-BGQm_OyC.js} +528 -528
- package/dist/cdn/chunks/{media-library-BIYzV2Y2.js.map → media-library-BGQm_OyC.js.map} +1 -1
- package/dist/cdn/chunks/{src-BuW9oYtm.js → src-3i8rPuqd.js} +4 -4
- package/dist/cdn/chunks/{src-BuW9oYtm.js.map → src-3i8rPuqd.js.map} +1 -1
- package/dist/cdn/chunks/{styleConstants-1KwsBMxJ.js → styleConstants-DFe3I4Op.js} +6 -6
- package/dist/cdn/chunks/{styleConstants-1KwsBMxJ.js.map → styleConstants-DFe3I4Op.js.map} +1 -1
- package/dist/cdn/chunks/{styles-DQFExz-T.js → styles-Dgijy53u.js} +1224 -1096
- package/dist/cdn/chunks/styles-Dgijy53u.js.map +1 -0
- package/dist/cdn/chunks/{tiptap-DplY-S-k.js → tiptap-BhxaWR8R.js} +2 -2
- package/dist/cdn/chunks/{tiptap-DplY-S-k.js.map → tiptap-BhxaWR8R.js.map} +1 -1
- package/dist/cdn/editor.css +1 -1
- package/dist/cdn/editor.js +110 -139
- package/dist/cdn/editor.js.map +1 -1
- package/dist/{dist-BkIys9zn.js → dist-Ci5lFuUy.js} +1 -1
- package/dist/{extensions-DEjfEFhD.js → extensions-DWx_jj8v.js} +1 -1
- package/dist/{styleConstants-D4SOZGBV.js → styleConstants-Cxw88naD.js} +5 -5
- package/dist/{styles-CgLaxDfu.js → styles-fdXNRqI3.js} +1341 -1213
- package/dist/templatical-editor.css +1 -1
- package/dist/templatical-editor.js +99 -129
- package/dist/templatical-editor.umd.cjs +55 -64
- package/dist/{useEditorCore-CjwRMl7K.js → useEditorCore-DUGD6pq_.js} +1054 -1033
- package/package.json +4 -2
- package/dist/CloudEditor-DFyuRxUV.js +0 -926
- package/dist/ParagraphEditor-CcMPnbDr.js +0 -652
- package/dist/TemplateScoringPanel-D58A23Vq.js +0 -249
- package/dist/cdn/chunks/AiChatSidebar-CmPTbTFG.js +0 -2
- package/dist/cdn/chunks/AiFeatureMenu-lxVm1RjH.js.map +0 -1
- package/dist/cdn/chunks/CloudEditor-Bmp5IlWi.js +0 -900
- package/dist/cdn/chunks/CloudEditor-Bmp5IlWi.js.map +0 -1
- package/dist/cdn/chunks/CommentsSidebar-BOelj4Ca.js +0 -2
- package/dist/cdn/chunks/DesignReferenceSidebar-Bf6rg0A7.js +0 -2
- package/dist/cdn/chunks/ModuleBrowserModal-CxDXzkKS.js.map +0 -1
- package/dist/cdn/chunks/ParagraphEditor-DHdu6lb3.js +0 -503
- package/dist/cdn/chunks/ParagraphEditor-DHdu6lb3.js.map +0 -1
- package/dist/cdn/chunks/SaveModuleDialog-DVna2xUl.js.map +0 -1
- package/dist/cdn/chunks/SnapshotHistory-BFF2SsTN.js +0 -2
- package/dist/cdn/chunks/TemplateScoringPanel-gi8wc_m7.js +0 -2
- package/dist/cdn/chunks/TestEmailModal-Qtd6aC-6.js +0 -2
- package/dist/cdn/chunks/dist-B6AUkMyh.js +0 -2
- package/dist/cdn/chunks/dist-Bf1Op9A1.js +0 -2
- package/dist/cdn/chunks/dist-CWsl6S1K.js +0 -2
- package/dist/cdn/chunks/dist-Cs0wFwdw.js +0 -2
- package/dist/cdn/chunks/dist-DS3_HVpX.js +0 -2
- package/dist/cdn/chunks/dist-DTXopj1a.js +0 -2
- package/dist/cdn/chunks/dist-DnwLoNLm.js +0 -2
- package/dist/cdn/chunks/features-ofOGnSC0.js.map +0 -1
- package/dist/cdn/chunks/styles-DQFExz-T.js.map +0 -1
|
@@ -1,652 +0,0 @@
|
|
|
1
|
-
import { C as e, b as t, w as n } from "./useEditorCore-CjwRMl7K.js";
|
|
2
|
-
import { t as r } from "./dist-CG-vEqSU.js";
|
|
3
|
-
import { S as i, T as a, p as o, w as s } from "./keys-C0MQRs8d.js";
|
|
4
|
-
import { t as c } from "./useI18n-D6m7ZUgY.js";
|
|
5
|
-
import { n as l } from "./_plugin-vue_export-helper-B1-bu7yR.js";
|
|
6
|
-
import { a as u, i as d, n as f, r as p, t as m } from "./RichTextEditorContent-CHJlh7HJ.js";
|
|
7
|
-
import { t as h } from "./loader-circle-BTQQxC3l.js";
|
|
8
|
-
import { t as g } from "./scan-line-7lZPfOdm.js";
|
|
9
|
-
import { _, a as v, g as y, h as b, o as x, s as S } from "./styleConstants-D4SOZGBV.js";
|
|
10
|
-
import { Fragment as C, Teleport as w, computed as T, createBlock as ee, createCommentVNode as E, createElementBlock as D, createElementVNode as O, createTextVNode as k, createVNode as A, defineComponent as j, inject as M, isRef as N, normalizeClass as P, normalizeStyle as F, openBlock as I, ref as L, renderList as R, toDisplayString as z, unref as B, withKeys as V, withModifiers as H } from "vue";
|
|
11
|
-
var U = l("list-ordered", [
|
|
12
|
-
["path", {
|
|
13
|
-
d: "M11 5h10",
|
|
14
|
-
key: "1cz7ny"
|
|
15
|
-
}],
|
|
16
|
-
["path", {
|
|
17
|
-
d: "M11 12h10",
|
|
18
|
-
key: "1438ji"
|
|
19
|
-
}],
|
|
20
|
-
["path", {
|
|
21
|
-
d: "M11 19h10",
|
|
22
|
-
key: "11t30w"
|
|
23
|
-
}],
|
|
24
|
-
["path", {
|
|
25
|
-
d: "M4 4h1v5",
|
|
26
|
-
key: "10yrso"
|
|
27
|
-
}],
|
|
28
|
-
["path", {
|
|
29
|
-
d: "M4 9h2",
|
|
30
|
-
key: "r1h2o0"
|
|
31
|
-
}],
|
|
32
|
-
["path", {
|
|
33
|
-
d: "M6.5 20H3.4c0-1 2.6-1.925 2.6-3.5a1.5 1.5 0 0 0-2.6-1.02",
|
|
34
|
-
key: "xtkcd5"
|
|
35
|
-
}]
|
|
36
|
-
]), te = l("list", [
|
|
37
|
-
["path", {
|
|
38
|
-
d: "M3 5h.01",
|
|
39
|
-
key: "18ugdj"
|
|
40
|
-
}],
|
|
41
|
-
["path", {
|
|
42
|
-
d: "M3 12h.01",
|
|
43
|
-
key: "nlz23k"
|
|
44
|
-
}],
|
|
45
|
-
["path", {
|
|
46
|
-
d: "M3 19h.01",
|
|
47
|
-
key: "noohij"
|
|
48
|
-
}],
|
|
49
|
-
["path", {
|
|
50
|
-
d: "M8 5h13",
|
|
51
|
-
key: "1pao27"
|
|
52
|
-
}],
|
|
53
|
-
["path", {
|
|
54
|
-
d: "M8 12h13",
|
|
55
|
-
key: "1za7za"
|
|
56
|
-
}],
|
|
57
|
-
["path", {
|
|
58
|
-
d: "M8 19h13",
|
|
59
|
-
key: "m83p4d"
|
|
60
|
-
}]
|
|
61
|
-
]), ne = l("remove-formatting", [
|
|
62
|
-
["path", {
|
|
63
|
-
d: "M4 7V4h16v3",
|
|
64
|
-
key: "9msm58"
|
|
65
|
-
}],
|
|
66
|
-
["path", {
|
|
67
|
-
d: "M5 20h6",
|
|
68
|
-
key: "1h6pxn"
|
|
69
|
-
}],
|
|
70
|
-
["path", {
|
|
71
|
-
d: "M13 4 8 20",
|
|
72
|
-
key: "kqq6aj"
|
|
73
|
-
}],
|
|
74
|
-
["path", {
|
|
75
|
-
d: "m15 15 5 5",
|
|
76
|
-
key: "me55sn"
|
|
77
|
-
}],
|
|
78
|
-
["path", {
|
|
79
|
-
d: "m20 15-5 5",
|
|
80
|
-
key: "11p7ol"
|
|
81
|
-
}]
|
|
82
|
-
]), W = l("smile", [
|
|
83
|
-
["circle", {
|
|
84
|
-
cx: "12",
|
|
85
|
-
cy: "12",
|
|
86
|
-
r: "10",
|
|
87
|
-
key: "1mglay"
|
|
88
|
-
}],
|
|
89
|
-
["path", {
|
|
90
|
-
d: "M8 14s1.5 2 4 2 4-2 4-2",
|
|
91
|
-
key: "1y1vjs"
|
|
92
|
-
}],
|
|
93
|
-
["line", {
|
|
94
|
-
x1: "9",
|
|
95
|
-
x2: "9.01",
|
|
96
|
-
y1: "9",
|
|
97
|
-
y2: "9",
|
|
98
|
-
key: "yxxnd0"
|
|
99
|
-
}],
|
|
100
|
-
["line", {
|
|
101
|
-
x1: "15",
|
|
102
|
-
x2: "15.01",
|
|
103
|
-
y1: "9",
|
|
104
|
-
y2: "9",
|
|
105
|
-
key: "1p4y9e"
|
|
106
|
-
}]
|
|
107
|
-
]), re = l("strikethrough", [
|
|
108
|
-
["path", {
|
|
109
|
-
d: "M16 4H9a3 3 0 0 0-2.83 4",
|
|
110
|
-
key: "43sutm"
|
|
111
|
-
}],
|
|
112
|
-
["path", {
|
|
113
|
-
d: "M14 12a4 4 0 0 1 0 8H6",
|
|
114
|
-
key: "nlfj13"
|
|
115
|
-
}],
|
|
116
|
-
["line", {
|
|
117
|
-
x1: "4",
|
|
118
|
-
x2: "20",
|
|
119
|
-
y1: "12",
|
|
120
|
-
y2: "12",
|
|
121
|
-
key: "1e0a9i"
|
|
122
|
-
}]
|
|
123
|
-
]), ie = l("subscript", [
|
|
124
|
-
["path", {
|
|
125
|
-
d: "m4 5 8 8",
|
|
126
|
-
key: "1eunvl"
|
|
127
|
-
}],
|
|
128
|
-
["path", {
|
|
129
|
-
d: "m12 5-8 8",
|
|
130
|
-
key: "1ah0jp"
|
|
131
|
-
}],
|
|
132
|
-
["path", {
|
|
133
|
-
d: "M20 19h-4c0-1.5.44-2 1.5-2.5S20 15.33 20 14c0-.47-.17-.93-.48-1.29a2.11 2.11 0 0 0-2.62-.44c-.42.24-.74.62-.9 1.07",
|
|
134
|
-
key: "e8ta8j"
|
|
135
|
-
}]
|
|
136
|
-
]), ae = l("superscript", [
|
|
137
|
-
["path", {
|
|
138
|
-
d: "m4 19 8-8",
|
|
139
|
-
key: "hr47gm"
|
|
140
|
-
}],
|
|
141
|
-
["path", {
|
|
142
|
-
d: "m12 19-8-8",
|
|
143
|
-
key: "1dhhmo"
|
|
144
|
-
}],
|
|
145
|
-
["path", {
|
|
146
|
-
d: "M20 12h-4c0-1.5.442-2 1.5-2.5S20 8.334 20 7.002c0-.472-.17-.93-.484-1.29a2.105 2.105 0 0 0-2.617-.436c-.42.239-.738.614-.899 1.06",
|
|
147
|
-
key: "1dfcux"
|
|
148
|
-
}]
|
|
149
|
-
]), oe = l("underline", [["path", {
|
|
150
|
-
d: "M6 4v6a6 6 0 0 0 12 0V4",
|
|
151
|
-
key: "9kb039"
|
|
152
|
-
}], ["line", {
|
|
153
|
-
x1: "4",
|
|
154
|
-
x2: "20",
|
|
155
|
-
y1: "20",
|
|
156
|
-
y2: "20",
|
|
157
|
-
key: "nun2al"
|
|
158
|
-
}]]), G = [
|
|
159
|
-
"aria-label",
|
|
160
|
-
"title",
|
|
161
|
-
"aria-expanded"
|
|
162
|
-
], K = ["aria-label"], q = { class: "tpl:mb-1.5 tpl:text-[10px] tpl:font-medium tpl:tracking-wide tpl:text-[var(--tpl-text-muted)] tpl:uppercase" }, J = { class: "tpl:grid tpl:grid-cols-10 tpl:gap-0.5" }, Y = ["aria-label", "onClick"], se = /* @__PURE__ */ j({
|
|
163
|
-
__name: "EmojiPickerDropdown",
|
|
164
|
-
emits: ["insert"],
|
|
165
|
-
setup(t, { emit: i }) {
|
|
166
|
-
let a = i, { categories: o, isOpen: s, toggle: l, close: u } = e(), { t: d, format: f } = c(), p = L(null), m = L(null);
|
|
167
|
-
n(p, T(() => s.value)), r(m, () => {
|
|
168
|
-
s.value && u();
|
|
169
|
-
});
|
|
170
|
-
function h(e) {
|
|
171
|
-
a("insert", e), u();
|
|
172
|
-
}
|
|
173
|
-
return (e, t) => (I(), D("div", {
|
|
174
|
-
ref_key: "rootRef",
|
|
175
|
-
ref: m,
|
|
176
|
-
class: "tpl:relative"
|
|
177
|
-
}, [O("button", {
|
|
178
|
-
type: "button",
|
|
179
|
-
class: P(["tpl-text-toolbar-btn", { "tpl-text-toolbar-btn--active": B(s) }]),
|
|
180
|
-
"aria-label": B(d).paragraphEditor.insertEmoji,
|
|
181
|
-
title: B(d).paragraphEditor.insertEmoji,
|
|
182
|
-
"aria-expanded": B(s),
|
|
183
|
-
"aria-haspopup": "dialog",
|
|
184
|
-
"aria-controls": "tpl-emoji-picker",
|
|
185
|
-
onClick: t[0] ||= (...e) => B(l) && B(l)(...e)
|
|
186
|
-
}, [A(B(W), {
|
|
187
|
-
size: 16,
|
|
188
|
-
"stroke-width": 2
|
|
189
|
-
})], 10, G), B(s) ? (I(), D("div", {
|
|
190
|
-
key: 0,
|
|
191
|
-
id: "tpl-emoji-picker",
|
|
192
|
-
ref_key: "pickerRef",
|
|
193
|
-
ref: p,
|
|
194
|
-
role: "dialog",
|
|
195
|
-
"aria-modal": "false",
|
|
196
|
-
"aria-label": B(d).paragraphEditor.insertEmoji,
|
|
197
|
-
tabindex: "-1",
|
|
198
|
-
class: "tpl-emoji-picker tpl:absolute tpl:top-full tpl:left-0 tpl:z-10 tpl:mt-2 tpl:w-72 tpl:rounded-lg tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:p-2 tpl:shadow-lg",
|
|
199
|
-
onKeydown: t[1] ||= V(H((...e) => B(u) && B(u)(...e), ["stop", "prevent"]), ["esc"])
|
|
200
|
-
}, [(I(!0), D(C, null, R(B(o), (e) => (I(), D("div", {
|
|
201
|
-
key: e.key,
|
|
202
|
-
class: "tpl:mb-2 tpl:last:mb-0"
|
|
203
|
-
}, [O("div", q, z(B(d).emoji[e.key]), 1), O("div", J, [(I(!0), D(C, null, R(e.emojis, (e) => (I(), D("button", {
|
|
204
|
-
key: e,
|
|
205
|
-
type: "button",
|
|
206
|
-
"aria-label": B(f)(B(d).paragraphEditor.emojiItemLabel, { emoji: e }),
|
|
207
|
-
class: "tpl:flex tpl:size-6 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded tpl:border-none tpl:bg-transparent tpl:text-base tpl:transition-all tpl:duration-100 tpl:hover:scale-125 tpl:hover:bg-[var(--tpl-bg-active)]",
|
|
208
|
-
onClick: (t) => h(e)
|
|
209
|
-
}, z(e), 9, Y))), 128))])]))), 128))], 40, K)) : E("", !0)], 512));
|
|
210
|
-
}
|
|
211
|
-
}), ce = ["data-tpl-theme", "aria-label"], le = { class: "tpl:flex tpl:items-center tpl:gap-1" }, ue = [
|
|
212
|
-
"value",
|
|
213
|
-
"aria-label",
|
|
214
|
-
"title"
|
|
215
|
-
], de = { value: "" }, fe = ["value"], pe = [
|
|
216
|
-
"value",
|
|
217
|
-
"aria-label",
|
|
218
|
-
"title"
|
|
219
|
-
], me = { value: "" }, he = ["value"], ge = { class: "tpl:relative" }, _e = [
|
|
220
|
-
"value",
|
|
221
|
-
"aria-label",
|
|
222
|
-
"title"
|
|
223
|
-
], ve = { class: "tpl:relative" }, ye = [
|
|
224
|
-
"value",
|
|
225
|
-
"aria-label",
|
|
226
|
-
"title"
|
|
227
|
-
], be = ["aria-label", "title"], xe = ["aria-label", "title"], Se = ["aria-label", "title"], Ce = ["aria-label", "title"], we = ["aria-label", "title"], Te = ["aria-label", "title"], Ee = ["aria-label", "title"], De = { class: "tpl:flex tpl:items-center tpl:gap-1" }, Oe = ["aria-label", "title"], ke = ["aria-label", "title"], Ae = ["aria-label", "title"], X = ["aria-label", "title"], je = ["aria-label", "title"], Me = ["value", "title"], Ne = ["value"], Pe = ["value", "title"], Fe = ["value"], Ie = ["aria-label", "title"], Le = {
|
|
228
|
-
key: 0,
|
|
229
|
-
class: "tpl:mx-1.5 tpl:h-6 tpl:w-px tpl:bg-[var(--tpl-border)]"
|
|
230
|
-
}, Re = ["aria-label", "title"], ze = {
|
|
231
|
-
key: 1,
|
|
232
|
-
class: "tpl:flex tpl:items-center tpl:gap-2 tpl:px-2 tpl:text-xs tpl:text-[var(--tpl-text-dim)]"
|
|
233
|
-
}, Z = /* @__PURE__ */ j({
|
|
234
|
-
__name: "ParagraphToolbar",
|
|
235
|
-
props: {
|
|
236
|
-
editor: {},
|
|
237
|
-
toolbarPosition: {},
|
|
238
|
-
isLoading: { type: Boolean },
|
|
239
|
-
mergeTagEnabled: { type: Boolean }
|
|
240
|
-
},
|
|
241
|
-
emits: ["open-link-dialog", "add-merge-tag"],
|
|
242
|
-
setup(e, { emit: t }) {
|
|
243
|
-
let n = e, r = t, l = M(i, null), f = M(s, null), m = a(o, "ParagraphToolbar"), { t: T } = c(), j = m.fonts;
|
|
244
|
-
function N(e) {
|
|
245
|
-
n.editor?.chain().focus().insertContent(e).run();
|
|
246
|
-
}
|
|
247
|
-
function L() {
|
|
248
|
-
return n.editor?.getAttributes("textStyle").fontFamily || "";
|
|
249
|
-
}
|
|
250
|
-
function V() {
|
|
251
|
-
return n.editor?.getAttributes("textStyle").fontSize || "";
|
|
252
|
-
}
|
|
253
|
-
function H() {
|
|
254
|
-
return n.editor?.getAttributes("textStyle").color || "";
|
|
255
|
-
}
|
|
256
|
-
function W(e) {
|
|
257
|
-
e ? n.editor?.chain().focus().setFontFamily(e).run() : n.editor?.chain().focus().unsetFontFamily().run();
|
|
258
|
-
}
|
|
259
|
-
function G(e) {
|
|
260
|
-
e ? n.editor?.chain().focus().setFontSize(e).run() : n.editor?.chain().focus().unsetFontSize().run();
|
|
261
|
-
}
|
|
262
|
-
function K(e) {
|
|
263
|
-
e ? n.editor?.chain().focus().setColor(e).run() : n.editor?.chain().focus().unsetColor().run();
|
|
264
|
-
}
|
|
265
|
-
function q() {
|
|
266
|
-
return n.editor?.getAttributes("paragraph").lineHeight || "";
|
|
267
|
-
}
|
|
268
|
-
function J(e) {
|
|
269
|
-
e ? n.editor?.chain().focus().setLineHeight(e).run() : n.editor?.chain().focus().unsetLineHeight().run();
|
|
270
|
-
}
|
|
271
|
-
function Y() {
|
|
272
|
-
return n.editor?.getAttributes("textStyle").letterSpacing || "";
|
|
273
|
-
}
|
|
274
|
-
function Z(e) {
|
|
275
|
-
e && e !== "normal" ? n.editor?.chain().focus().setLetterSpacing(e).run() : n.editor?.chain().focus().unsetLetterSpacing().run();
|
|
276
|
-
}
|
|
277
|
-
function Q() {
|
|
278
|
-
return n.editor?.getAttributes("highlight").color || "";
|
|
279
|
-
}
|
|
280
|
-
function $(e) {
|
|
281
|
-
e ? n.editor?.chain().focus().setHighlight({ color: e }).run() : n.editor?.chain().focus().unsetHighlight().run();
|
|
282
|
-
}
|
|
283
|
-
return (t, n) => (I(), ee(w, { to: "body" }, [O("div", {
|
|
284
|
-
"data-tpl-theme": B(f),
|
|
285
|
-
role: "toolbar",
|
|
286
|
-
"aria-label": B(T).paragraphEditor.toolbar,
|
|
287
|
-
class: "tpl tpl-text-toolbar tpl:fixed tpl:z-popover tpl:flex tpl:gap-1 tpl:rounded-lg tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:px-3 tpl:py-2 tpl:shadow-lg",
|
|
288
|
-
style: F({
|
|
289
|
-
...B(l),
|
|
290
|
-
top: `${e.toolbarPosition.top}px`,
|
|
291
|
-
left: `${e.toolbarPosition.left}px`,
|
|
292
|
-
transform: "translateY(-100%)",
|
|
293
|
-
flexDirection: "column"
|
|
294
|
-
})
|
|
295
|
-
}, [!e.isLoading && e.editor ? (I(), D(C, { key: 0 }, [O("div", le, [
|
|
296
|
-
O("select", {
|
|
297
|
-
class: "tpl:h-8 tpl:w-32 tpl:cursor-pointer tpl:rounded tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:px-2 tpl:text-xs tpl:text-[var(--tpl-text)] tpl:outline-none",
|
|
298
|
-
value: L(),
|
|
299
|
-
"aria-label": B(T).paragraphEditor.fontFamily,
|
|
300
|
-
title: B(T).paragraphEditor.fontFamily,
|
|
301
|
-
onChange: n[0] ||= (e) => W(e.target.value)
|
|
302
|
-
}, [O("option", de, z(B(T).paragraphEditor.defaultFont), 1), (I(!0), D(C, null, R(B(j), (e) => (I(), D("option", {
|
|
303
|
-
key: e.value,
|
|
304
|
-
value: e.value
|
|
305
|
-
}, z(e.label), 9, fe))), 128))], 40, ue),
|
|
306
|
-
O("select", {
|
|
307
|
-
class: "tpl:h-8 tpl:w-20 tpl:cursor-pointer tpl:rounded tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:px-2 tpl:text-xs tpl:text-[var(--tpl-text)] tpl:outline-none",
|
|
308
|
-
value: V(),
|
|
309
|
-
"aria-label": B(T).paragraphEditor.fontSize,
|
|
310
|
-
title: B(T).paragraphEditor.fontSize,
|
|
311
|
-
onChange: n[1] ||= (e) => G(e.target.value)
|
|
312
|
-
}, [O("option", me, z(B(T).paragraphEditor.defaultSize), 1), (I(!0), D(C, null, R(B(v), (e) => (I(), D("option", {
|
|
313
|
-
key: e,
|
|
314
|
-
value: e
|
|
315
|
-
}, z(e), 9, he))), 128))], 40, pe),
|
|
316
|
-
n[20] ||= O("span", {
|
|
317
|
-
class: "tpl:mx-1 tpl:h-6 tpl:w-px tpl:bg-[var(--tpl-border)]",
|
|
318
|
-
"aria-hidden": "true"
|
|
319
|
-
}, null, -1),
|
|
320
|
-
O("div", ge, [O("input", {
|
|
321
|
-
type: "color",
|
|
322
|
-
class: "tpl:size-8 tpl:cursor-pointer tpl:rounded tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:p-1",
|
|
323
|
-
value: H() || B("#000000"),
|
|
324
|
-
"aria-label": B(T).paragraphEditor.textColor,
|
|
325
|
-
title: B(T).paragraphEditor.textColor,
|
|
326
|
-
onInput: n[2] ||= (e) => K(e.target.value)
|
|
327
|
-
}, null, 40, _e)]),
|
|
328
|
-
O("div", ve, [O("input", {
|
|
329
|
-
type: "color",
|
|
330
|
-
class: "tpl:size-8 tpl:cursor-pointer tpl:rounded tpl:border tpl:border-[var(--tpl-border)] tpl:p-1",
|
|
331
|
-
style: F({ backgroundColor: Q() || "var(--tpl-bg)" }),
|
|
332
|
-
value: Q() || B("#ffff00"),
|
|
333
|
-
"aria-label": B(T).paragraphEditor.highlightColor,
|
|
334
|
-
title: B(T).paragraphEditor.highlightColor,
|
|
335
|
-
onInput: n[3] ||= (e) => $(e.target.value)
|
|
336
|
-
}, null, 44, ye)]),
|
|
337
|
-
n[21] ||= O("span", {
|
|
338
|
-
class: "tpl:mx-1 tpl:h-6 tpl:w-px tpl:bg-[var(--tpl-border)]",
|
|
339
|
-
"aria-hidden": "true"
|
|
340
|
-
}, null, -1),
|
|
341
|
-
O("button", {
|
|
342
|
-
type: "button",
|
|
343
|
-
class: P(["tpl-text-toolbar-btn", { "tpl-text-toolbar-btn--active": e.editor?.isActive("bold") }]),
|
|
344
|
-
"aria-label": B(T).paragraphEditor.bold,
|
|
345
|
-
title: B(T).paragraphEditor.bold,
|
|
346
|
-
onClick: n[4] ||= (t) => e.editor?.chain().focus().toggleBold().run()
|
|
347
|
-
}, [A(B(u), {
|
|
348
|
-
size: 16,
|
|
349
|
-
"stroke-width": 2.5
|
|
350
|
-
})], 10, be),
|
|
351
|
-
O("button", {
|
|
352
|
-
type: "button",
|
|
353
|
-
class: P(["tpl-text-toolbar-btn", { "tpl-text-toolbar-btn--active": e.editor?.isActive("italic") }]),
|
|
354
|
-
"aria-label": B(T).paragraphEditor.italic,
|
|
355
|
-
title: B(T).paragraphEditor.italic,
|
|
356
|
-
onClick: n[5] ||= (t) => e.editor?.chain().focus().toggleItalic().run()
|
|
357
|
-
}, [A(B(d), {
|
|
358
|
-
size: 16,
|
|
359
|
-
"stroke-width": 2
|
|
360
|
-
})], 10, xe),
|
|
361
|
-
O("button", {
|
|
362
|
-
type: "button",
|
|
363
|
-
class: P(["tpl-text-toolbar-btn", { "tpl-text-toolbar-btn--active": e.editor?.isActive("underline") }]),
|
|
364
|
-
"aria-label": B(T).paragraphEditor.underline,
|
|
365
|
-
title: B(T).paragraphEditor.underline,
|
|
366
|
-
onClick: n[6] ||= (t) => e.editor?.chain().focus().toggleUnderline().run()
|
|
367
|
-
}, [A(B(oe), {
|
|
368
|
-
size: 16,
|
|
369
|
-
"stroke-width": 2
|
|
370
|
-
})], 10, Se),
|
|
371
|
-
O("button", {
|
|
372
|
-
type: "button",
|
|
373
|
-
class: P(["tpl-text-toolbar-btn", { "tpl-text-toolbar-btn--active": e.editor?.isActive("strike") }]),
|
|
374
|
-
"aria-label": B(T).paragraphEditor.strikethrough,
|
|
375
|
-
title: B(T).paragraphEditor.strikethrough,
|
|
376
|
-
onClick: n[7] ||= (t) => e.editor?.chain().focus().toggleStrike().run()
|
|
377
|
-
}, [A(B(re), {
|
|
378
|
-
size: 16,
|
|
379
|
-
"stroke-width": 2
|
|
380
|
-
})], 10, Ce),
|
|
381
|
-
n[22] ||= O("span", {
|
|
382
|
-
class: "tpl:mx-1 tpl:h-6 tpl:w-px tpl:bg-[var(--tpl-border)]",
|
|
383
|
-
"aria-hidden": "true"
|
|
384
|
-
}, null, -1),
|
|
385
|
-
O("button", {
|
|
386
|
-
type: "button",
|
|
387
|
-
class: P(["tpl-text-toolbar-btn", { "tpl-text-toolbar-btn--active": e.editor?.isActive("subscript") }]),
|
|
388
|
-
"aria-label": B(T).paragraphEditor.subscript,
|
|
389
|
-
title: B(T).paragraphEditor.subscript,
|
|
390
|
-
onClick: n[8] ||= (t) => e.editor?.chain().focus().toggleSubscript().run()
|
|
391
|
-
}, [A(B(ie), {
|
|
392
|
-
size: 16,
|
|
393
|
-
"stroke-width": 2
|
|
394
|
-
})], 10, we),
|
|
395
|
-
O("button", {
|
|
396
|
-
type: "button",
|
|
397
|
-
class: P(["tpl-text-toolbar-btn", { "tpl-text-toolbar-btn--active": e.editor?.isActive("superscript") }]),
|
|
398
|
-
"aria-label": B(T).paragraphEditor.superscript,
|
|
399
|
-
title: B(T).paragraphEditor.superscript,
|
|
400
|
-
onClick: n[9] ||= (t) => e.editor?.chain().focus().toggleSuperscript().run()
|
|
401
|
-
}, [A(B(ae), {
|
|
402
|
-
size: 16,
|
|
403
|
-
"stroke-width": 2
|
|
404
|
-
})], 10, Te),
|
|
405
|
-
n[23] ||= O("span", {
|
|
406
|
-
class: "tpl:mx-1 tpl:h-6 tpl:w-px tpl:bg-[var(--tpl-border)]",
|
|
407
|
-
"aria-hidden": "true"
|
|
408
|
-
}, null, -1),
|
|
409
|
-
O("button", {
|
|
410
|
-
type: "button",
|
|
411
|
-
class: P(["tpl-text-toolbar-btn", { "tpl-text-toolbar-btn--active": e.editor?.isActive("link") }]),
|
|
412
|
-
"aria-label": B(T).paragraphEditor.addLink,
|
|
413
|
-
title: B(T).paragraphEditor.addLink,
|
|
414
|
-
onClick: n[10] ||= (e) => r("open-link-dialog")
|
|
415
|
-
}, [A(B(p), {
|
|
416
|
-
size: 16,
|
|
417
|
-
"stroke-width": 2
|
|
418
|
-
})], 10, Ee)
|
|
419
|
-
]), O("div", De, [
|
|
420
|
-
O("button", {
|
|
421
|
-
type: "button",
|
|
422
|
-
class: P(["tpl-text-toolbar-btn", { "tpl-text-toolbar-btn--active": e.editor?.isActive("bulletList") }]),
|
|
423
|
-
"aria-label": B(T).paragraphEditor.bulletList,
|
|
424
|
-
title: B(T).paragraphEditor.bulletList,
|
|
425
|
-
onClick: n[11] ||= (t) => e.editor?.chain().focus().toggleBulletList().run()
|
|
426
|
-
}, [A(B(te), {
|
|
427
|
-
size: 16,
|
|
428
|
-
"stroke-width": 2
|
|
429
|
-
})], 10, Oe),
|
|
430
|
-
O("button", {
|
|
431
|
-
type: "button",
|
|
432
|
-
class: P(["tpl-text-toolbar-btn", { "tpl-text-toolbar-btn--active": e.editor?.isActive("orderedList") }]),
|
|
433
|
-
"aria-label": B(T).paragraphEditor.numberedList,
|
|
434
|
-
title: B(T).paragraphEditor.numberedList,
|
|
435
|
-
onClick: n[12] ||= (t) => e.editor?.chain().focus().toggleOrderedList().run()
|
|
436
|
-
}, [A(B(U), {
|
|
437
|
-
size: 16,
|
|
438
|
-
"stroke-width": 2
|
|
439
|
-
})], 10, ke),
|
|
440
|
-
n[26] ||= O("span", {
|
|
441
|
-
class: "tpl:mx-1.5 tpl:h-6 tpl:w-px tpl:bg-[var(--tpl-border)]",
|
|
442
|
-
"aria-hidden": "true"
|
|
443
|
-
}, null, -1),
|
|
444
|
-
O("button", {
|
|
445
|
-
type: "button",
|
|
446
|
-
class: P(["tpl-text-toolbar-btn", { "tpl-text-toolbar-btn--active": e.editor?.isActive({ textAlign: "left" }) }]),
|
|
447
|
-
"aria-label": B(T).paragraphEditor.alignLeft,
|
|
448
|
-
title: B(T).paragraphEditor.alignLeft,
|
|
449
|
-
onClick: n[13] ||= (t) => e.editor?.chain().focus().setTextAlign("left").run()
|
|
450
|
-
}, [A(B(b), {
|
|
451
|
-
size: 16,
|
|
452
|
-
"stroke-width": 2
|
|
453
|
-
})], 10, Ae),
|
|
454
|
-
O("button", {
|
|
455
|
-
type: "button",
|
|
456
|
-
class: P(["tpl-text-toolbar-btn", { "tpl-text-toolbar-btn--active": e.editor?.isActive({ textAlign: "center" }) }]),
|
|
457
|
-
"aria-label": B(T).paragraphEditor.alignCenter,
|
|
458
|
-
title: B(T).paragraphEditor.alignCenter,
|
|
459
|
-
onClick: n[14] ||= (t) => e.editor?.chain().focus().setTextAlign("center").run()
|
|
460
|
-
}, [A(B(_), {
|
|
461
|
-
size: 16,
|
|
462
|
-
"stroke-width": 2
|
|
463
|
-
})], 10, X),
|
|
464
|
-
O("button", {
|
|
465
|
-
type: "button",
|
|
466
|
-
class: P(["tpl-text-toolbar-btn", { "tpl-text-toolbar-btn--active": e.editor?.isActive({ textAlign: "right" }) }]),
|
|
467
|
-
"aria-label": B(T).paragraphEditor.alignRight,
|
|
468
|
-
title: B(T).paragraphEditor.alignRight,
|
|
469
|
-
onClick: n[15] ||= (t) => e.editor?.chain().focus().setTextAlign("right").run()
|
|
470
|
-
}, [A(B(y), {
|
|
471
|
-
size: 16,
|
|
472
|
-
"stroke-width": 2
|
|
473
|
-
})], 10, je),
|
|
474
|
-
n[27] ||= O("span", {
|
|
475
|
-
class: "tpl:mx-1.5 tpl:h-6 tpl:w-px tpl:bg-[var(--tpl-border)]",
|
|
476
|
-
"aria-hidden": "true"
|
|
477
|
-
}, null, -1),
|
|
478
|
-
O("select", {
|
|
479
|
-
class: "tpl:h-8 tpl:w-16 tpl:cursor-pointer tpl:rounded tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:px-1 tpl:text-xs tpl:text-[var(--tpl-text)] tpl:outline-none",
|
|
480
|
-
value: q(),
|
|
481
|
-
title: B(T).paragraphEditor.lineHeight,
|
|
482
|
-
onChange: n[16] ||= (e) => J(e.target.value)
|
|
483
|
-
}, [n[24] ||= O("option", { value: "" }, "LH", -1), (I(!0), D(C, null, R(B(S), (e) => (I(), D("option", {
|
|
484
|
-
key: e,
|
|
485
|
-
value: e
|
|
486
|
-
}, z(e), 9, Ne))), 128))], 40, Me),
|
|
487
|
-
O("select", {
|
|
488
|
-
class: "tpl:h-8 tpl:w-20 tpl:cursor-pointer tpl:rounded tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:px-1 tpl:text-xs tpl:text-[var(--tpl-text)] tpl:outline-none",
|
|
489
|
-
value: Y(),
|
|
490
|
-
title: B(T).paragraphEditor.letterSpacing,
|
|
491
|
-
onChange: n[17] ||= (e) => Z(e.target.value)
|
|
492
|
-
}, [n[25] ||= O("option", { value: "" }, "LS", -1), (I(!0), D(C, null, R(B(x), (e) => (I(), D("option", {
|
|
493
|
-
key: e.value,
|
|
494
|
-
value: e.value
|
|
495
|
-
}, z(e.label), 9, Fe))), 128))], 40, Pe),
|
|
496
|
-
n[28] ||= O("span", {
|
|
497
|
-
class: "tpl:mx-1.5 tpl:h-6 tpl:w-px tpl:bg-[var(--tpl-border)]",
|
|
498
|
-
"aria-hidden": "true"
|
|
499
|
-
}, null, -1),
|
|
500
|
-
O("button", {
|
|
501
|
-
type: "button",
|
|
502
|
-
class: "tpl-text-toolbar-btn",
|
|
503
|
-
"aria-label": B(T).paragraphEditor.clearFormatting,
|
|
504
|
-
title: B(T).paragraphEditor.clearFormatting,
|
|
505
|
-
onClick: n[18] ||= (t) => e.editor?.chain().focus().clearNodes().unsetAllMarks().run()
|
|
506
|
-
}, [A(B(ne), {
|
|
507
|
-
size: 16,
|
|
508
|
-
"stroke-width": 2
|
|
509
|
-
})], 8, Ie),
|
|
510
|
-
n[29] ||= O("span", {
|
|
511
|
-
class: "tpl:mx-1.5 tpl:h-6 tpl:w-px tpl:bg-[var(--tpl-border)]",
|
|
512
|
-
"aria-hidden": "true"
|
|
513
|
-
}, null, -1),
|
|
514
|
-
A(se, { onInsert: N }),
|
|
515
|
-
e.mergeTagEnabled ? (I(), D("span", Le)) : E("", !0),
|
|
516
|
-
e.mergeTagEnabled ? (I(), D("button", {
|
|
517
|
-
key: 1,
|
|
518
|
-
type: "button",
|
|
519
|
-
class: "tpl:flex tpl:h-8 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:gap-1.5 tpl:rounded tpl:border-none tpl:bg-transparent tpl:px-2.5 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text)] tpl:transition-all tpl:duration-150 tpl:hover:bg-[var(--tpl-bg-active)]",
|
|
520
|
-
"aria-label": B(T).mergeTag.add,
|
|
521
|
-
title: B(T).mergeTag.add,
|
|
522
|
-
onClick: n[19] ||= (e) => r("add-merge-tag")
|
|
523
|
-
}, [A(B(g), {
|
|
524
|
-
size: 16,
|
|
525
|
-
"stroke-width": 2
|
|
526
|
-
}), k(" " + z(B(T).mergeTag.add), 1)], 8, Re)) : E("", !0)
|
|
527
|
-
])], 64)) : (I(), D("div", ze, [A(B(h), {
|
|
528
|
-
class: "tpl-spinner",
|
|
529
|
-
size: 14,
|
|
530
|
-
"stroke-width": 2
|
|
531
|
-
}), k(" " + z(B(T).errors.editorLoading), 1)]))], 12, ce)]));
|
|
532
|
-
}
|
|
533
|
-
}), Q = { class: "tpl-text-editor-wrapper tpl:relative" }, $ = /* @__PURE__ */ j({
|
|
534
|
-
__name: "ParagraphEditor",
|
|
535
|
-
props: {
|
|
536
|
-
block: {},
|
|
537
|
-
toolbarPosition: {}
|
|
538
|
-
},
|
|
539
|
-
emits: ["done"],
|
|
540
|
-
setup(e, { emit: n }) {
|
|
541
|
-
let r = e, i = n, { editor: a, EditorContent: o, isLoading: s, initError: c, retry: l, showLinkDialog: u, linkUrl: d, linkDialogRef: p, mergeTagEnabled: h, openLinkDialog: g, insertLink: _, removeLink: v, closeLinkDialog: y, handleLinkKeydown: b, handleAddMergeTag: x } = t({
|
|
542
|
-
blockId: () => r.block.id,
|
|
543
|
-
blockContent: () => r.block.content,
|
|
544
|
-
onDone: () => i("done"),
|
|
545
|
-
editorName: "ParagraphEditor",
|
|
546
|
-
async loadExtensions({ mergeTags: e, syntax: t }) {
|
|
547
|
-
let [{ Editor: n, EditorContent: r }, { default: i }, { default: a }, { default: o }, { default: s }, { default: c }, { default: l }, { TextStyle: u }, { default: d }, { default: f }, { default: p }, { MergeTagNode: m, LogicMergeTagNode: h, FontSize: g, LineHeight: _, LetterSpacing: v }] = await Promise.all([
|
|
548
|
-
import("./dist-BkIys9zn.js").then((e) => e.r),
|
|
549
|
-
import("./dist-DysAFIPy.js"),
|
|
550
|
-
import("./dist-Bu7veieH.js"),
|
|
551
|
-
import("./dist-C1BIRHCQ.js"),
|
|
552
|
-
import("./dist-ChAGLpWo.js"),
|
|
553
|
-
import("./dist-4LiM9FDd.js"),
|
|
554
|
-
import("./dist-DrvKRSU6.js"),
|
|
555
|
-
import("./dist-D_HQYSY-.js"),
|
|
556
|
-
import("./dist-Dxnd0GRf.js"),
|
|
557
|
-
import("./dist-DkypH7qG.js"),
|
|
558
|
-
import("./dist-DmOE-Ubp.js"),
|
|
559
|
-
import("./extensions-DEjfEFhD.js")
|
|
560
|
-
]);
|
|
561
|
-
return {
|
|
562
|
-
TiptapEditor: n,
|
|
563
|
-
EC: r,
|
|
564
|
-
extensions: [
|
|
565
|
-
i.configure({
|
|
566
|
-
heading: !1,
|
|
567
|
-
codeBlock: !1,
|
|
568
|
-
blockquote: !1,
|
|
569
|
-
horizontalRule: !1
|
|
570
|
-
}),
|
|
571
|
-
o,
|
|
572
|
-
s,
|
|
573
|
-
c,
|
|
574
|
-
a.configure({
|
|
575
|
-
openOnClick: !1,
|
|
576
|
-
HTMLAttributes: {
|
|
577
|
-
target: "_blank",
|
|
578
|
-
rel: "noopener noreferrer"
|
|
579
|
-
}
|
|
580
|
-
}),
|
|
581
|
-
l.configure({ types: ["paragraph"] }),
|
|
582
|
-
u,
|
|
583
|
-
d,
|
|
584
|
-
f,
|
|
585
|
-
p.configure({ multicolor: !0 }),
|
|
586
|
-
g,
|
|
587
|
-
_,
|
|
588
|
-
v,
|
|
589
|
-
m.configure({
|
|
590
|
-
mergeTags: e,
|
|
591
|
-
syntax: t
|
|
592
|
-
}),
|
|
593
|
-
h.configure({ syntax: t })
|
|
594
|
-
]
|
|
595
|
-
};
|
|
596
|
-
}
|
|
597
|
-
});
|
|
598
|
-
return (t, n) => (I(), D("div", Q, [
|
|
599
|
-
A(Z, {
|
|
600
|
-
editor: B(a),
|
|
601
|
-
"toolbar-position": e.toolbarPosition,
|
|
602
|
-
"is-loading": B(s),
|
|
603
|
-
"merge-tag-enabled": B(h),
|
|
604
|
-
onOpenLinkDialog: B(g),
|
|
605
|
-
onAddMergeTag: B(x)
|
|
606
|
-
}, null, 8, [
|
|
607
|
-
"editor",
|
|
608
|
-
"toolbar-position",
|
|
609
|
-
"is-loading",
|
|
610
|
-
"merge-tag-enabled",
|
|
611
|
-
"onOpenLinkDialog",
|
|
612
|
-
"onAddMergeTag"
|
|
613
|
-
]),
|
|
614
|
-
A(m, {
|
|
615
|
-
editor: B(a),
|
|
616
|
-
"editor-content": B(o),
|
|
617
|
-
"is-loading": B(s),
|
|
618
|
-
"init-error": B(c),
|
|
619
|
-
onRetry: B(l)
|
|
620
|
-
}, null, 8, [
|
|
621
|
-
"editor",
|
|
622
|
-
"editor-content",
|
|
623
|
-
"is-loading",
|
|
624
|
-
"init-error",
|
|
625
|
-
"onRetry"
|
|
626
|
-
]),
|
|
627
|
-
A(f, {
|
|
628
|
-
visible: B(u),
|
|
629
|
-
"is-editing-link": B(a)?.isActive("link") ?? !1,
|
|
630
|
-
"dialog-ref": B(p),
|
|
631
|
-
"onUpdate:dialogRef": n[0] ||= (e) => N(p) ? p.value = e : null,
|
|
632
|
-
"link-url": B(d),
|
|
633
|
-
"onUpdate:linkUrl": n[1] ||= (e) => N(d) ? d.value = e : null,
|
|
634
|
-
onClose: B(y),
|
|
635
|
-
onInsert: B(_),
|
|
636
|
-
onRemove: B(v),
|
|
637
|
-
onKeydown: B(b)
|
|
638
|
-
}, null, 8, [
|
|
639
|
-
"visible",
|
|
640
|
-
"is-editing-link",
|
|
641
|
-
"dialog-ref",
|
|
642
|
-
"link-url",
|
|
643
|
-
"onClose",
|
|
644
|
-
"onInsert",
|
|
645
|
-
"onRemove",
|
|
646
|
-
"onKeydown"
|
|
647
|
-
])
|
|
648
|
-
]));
|
|
649
|
-
}
|
|
650
|
-
});
|
|
651
|
-
//#endregion
|
|
652
|
-
export { $ as default };
|