@templatical/editor 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/AiChatSidebar-XBj5Rw2l.js +214 -0
- package/dist/AiFeatureMenu-my1mZ9DL.js +63 -0
- package/dist/CloudEditor-BVjgKwq3.js +940 -0
- package/dist/CollaboratorBar-BZq_Gv38.js +91 -0
- package/dist/CommentsSidebar-D9oxqO6l.js +439 -0
- package/dist/DesignReferenceSidebar-CyHq4SWt.js +272 -0
- package/dist/LoadingTrack-vK8W2PJf.js +10 -0
- package/dist/ModuleBrowserModal-Cus2Hdwl.js +205 -0
- package/dist/ModulePreviewCanvas-DaByXKY_.js +106 -0
- package/dist/ParagraphEditor-BSyk5B6S.js +670 -0
- package/dist/RichTextEditorContent-BRpjJ6SV.js +133 -0
- package/dist/SaveModuleDialog-BIZBQrd8.js +122 -0
- package/dist/SnapshotHistory-Ds1-QNbx.js +126 -0
- package/dist/TemplateScoringPanel-C8XSk_Ys.js +249 -0
- package/dist/TestEmailModal-CCVfaFgV.js +94 -0
- package/dist/TitleEditor-V4qaEULF.js +167 -0
- package/dist/TplModal-LT3FXlgs.js +44 -0
- package/dist/_plugin-vue_export-helper-B1-bu7yR.js +47 -0
- package/dist/blockTypeIcons-BujoY5Dl.js +126 -0
- package/dist/cdn/chunks/ParagraphEditor-BkJQO-ZW.js +3 -0
- package/dist/cdn/chunks/ParagraphEditor-BkJQO-ZW.js.map +1 -0
- package/dist/cdn/chunks/RichTextEditorContent-UGQorJm_.js +2 -0
- package/dist/cdn/chunks/RichTextEditorContent-UGQorJm_.js.map +1 -0
- package/dist/cdn/chunks/TitleEditor-CC3Adjai.js +3 -0
- package/dist/cdn/chunks/TitleEditor-CC3Adjai.js.map +1 -0
- package/dist/cdn/chunks/dist-0UheN8rK.js +1 -0
- package/dist/cdn/chunks/dist-55mmbGQ9.js +1 -0
- package/dist/cdn/chunks/dist-B31mxKyP.js +1 -0
- package/dist/cdn/chunks/dist-B5JI9nIg.js +1 -0
- package/dist/cdn/chunks/dist-B93vLKhU.js +1 -0
- package/dist/cdn/chunks/dist-BDt3FJvj.js +1 -0
- package/dist/cdn/chunks/dist-BJRuFHmi.js +1 -0
- package/dist/cdn/chunks/dist-BKSzrf0L.js +1 -0
- package/dist/cdn/chunks/dist-BL8c5gYQ.js +1 -0
- package/dist/cdn/chunks/dist-CYThWMP5.js +1 -0
- package/dist/cdn/chunks/dist-DxZbPJYt.js +1 -0
- package/dist/cdn/chunks/draggable-ClUwYCFL.js +17 -0
- package/dist/cdn/chunks/draggable-ClUwYCFL.js.map +1 -0
- package/dist/cdn/chunks/emojiData-6fVLNqeH.js +2 -0
- package/dist/cdn/chunks/emojiData-6fVLNqeH.js.map +1 -0
- package/dist/cdn/chunks/extensions-BfjbWqOx.js +2 -0
- package/dist/cdn/chunks/extensions-BfjbWqOx.js.map +1 -0
- package/dist/cdn/chunks/icons-vmLJTaJk.js +2 -0
- package/dist/cdn/chunks/icons-vmLJTaJk.js.map +1 -0
- package/dist/cdn/chunks/rolldown-runtime-BakkzWXw.js +1 -0
- package/dist/cdn/chunks/styleConstants-UTJ94gco.js +2 -0
- package/dist/cdn/chunks/styleConstants-UTJ94gco.js.map +1 -0
- package/dist/cdn/chunks/tiptap-Cya4P9CN.js +145 -0
- package/dist/cdn/chunks/tiptap-Cya4P9CN.js.map +1 -0
- package/dist/cdn/chunks/useEditorCore-DRhPKq_z.js +2 -0
- package/dist/cdn/chunks/useEditorCore-DRhPKq_z.js.map +1 -0
- package/dist/cdn/chunks/useMergeTag-CBSlcqnk.js +2 -0
- package/dist/cdn/chunks/useMergeTag-CBSlcqnk.js.map +1 -0
- package/dist/cdn/editor.css +1 -0
- package/dist/cdn/editor.js +2 -0
- package/dist/cdn/editor.js.map +1 -0
- package/dist/check-B7kDuZmP.js +7 -0
- package/dist/chevron-down-DJLW2Q9Z.js +7 -0
- package/dist/circle-alert-E2vYPs5r.js +25 -0
- package/dist/clock-lWIIQA3C.js +12 -0
- package/dist/de-B4Ob4vCo.js +682 -0
- package/dist/dist-4LiM9FDd.js +35 -0
- package/dist/dist-Bu7veieH.js +776 -0
- package/dist/dist-C1BIRHCQ.js +61 -0
- package/dist/dist-CG-vEqSU.js +314 -0
- package/dist/dist-C_ymrGFi.js +10625 -0
- package/dist/dist-ChAGLpWo.js +35 -0
- package/dist/dist-DNjZKe2Z.js +513 -0
- package/dist/dist-D_HQYSY-.js +189 -0
- package/dist/dist-DkypH7qG.js +5 -0
- package/dist/dist-DmOE-Ubp.js +74 -0
- package/dist/dist-DrvKRSU6.js +47 -0
- package/dist/dist-Dxnd0GRf.js +5 -0
- package/dist/dist-DysAFIPy.js +2054 -0
- package/dist/emojiData-BfWQS72m.js +17 -0
- package/dist/en-YXsspZJG.js +682 -0
- package/dist/extensions-BA4NshZQ.js +420 -0
- package/dist/formatRelativeTime-DX3FgqN9.js +8 -0
- package/dist/i18n-ikyi28RU.js +23 -0
- package/dist/image-up-X4xIq4ea.js +23 -0
- package/dist/keys-8B5MFafK.js +4 -0
- package/dist/liquid.browser-BemTg3sZ.js +3272 -0
- package/dist/loader-circle-BTQQxC3l.js +7 -0
- package/dist/message-circle-Blgm6V_h.js +7 -0
- package/dist/refresh-cw-Bb4PEeW1.js +44 -0
- package/dist/scan-line-7lZPfOdm.js +25 -0
- package/dist/send-C0ltAQrv.js +10 -0
- package/dist/shield-check-f-qv4RKs.js +10 -0
- package/dist/sparkles-KhBCGlqB.js +23 -0
- package/dist/styleConstants-CgtFM9hQ.js +43 -0
- package/dist/styles-hQgJKM4i.js +3406 -0
- package/dist/templatical-editor.css +2 -1
- package/dist/templatical-editor.js +242 -9
- package/dist/templatical-editor.umd.cjs +112 -524
- package/dist/timeouts-CmBrLeZA.js +4 -0
- package/dist/trash-2-OwjZ-guZ.js +25 -0
- package/dist/triangle-alert-DOSRIUYZ.js +17 -0
- package/dist/useEditorCore-DVp5qmtC.js +5552 -0
- package/dist/useI18n-DzH4KXDk.js +17 -0
- package/dist/useMergeTag-D9zQVE-e.js +33 -0
- package/dist/x-CGlq2XQe.js +10 -0
- package/package.json +30 -20
- package/dist/AiChatSidebar-0vx9TP5B.js +0 -305
- package/dist/AiFeatureMenu-CI-v74ND.js +0 -69
- package/dist/CloudEditor-Wdfv_9xn.js +0 -1132
- package/dist/CollaboratorBar-B3uV4Wtw.js +0 -89
- package/dist/CommentsSidebar-PVUlloyB.js +0 -655
- package/dist/DesignReferenceSidebar-DAlAWrxU.js +0 -351
- package/dist/ModuleBrowserModal-1JEcChd8.js +0 -323
- package/dist/ModulePreviewCanvas-Cdp484Ae.js +0 -169
- package/dist/SaveModuleDialog-eNyr3XKn.js +0 -168
- package/dist/SnapshotHistory-D-ZiIj1v.js +0 -169
- package/dist/TemplateScoringPanel-DSZPo15C.js +0 -385
- package/dist/TestEmailModal-Cwre5elw.js +0 -128
- package/dist/TextEditor-BuUOIByX.js +0 -780
- package/dist/de-BWIAblxs.js +0 -685
- package/dist/en-cYyUzNV1.js +0 -685
- package/dist/index-0tWUczNu.js +0 -47
- package/dist/index-4okvXjqk.js +0 -41
- package/dist/index-BSc6h5zo.js +0 -967
- package/dist/index-CrvwWlhN.js +0 -41
- package/dist/index-D-iD-7lO.js +0 -10961
- package/dist/index-D-ygXbc8.js +0 -2452
- package/dist/index-DbrWKz-e.js +0 -1415
- package/dist/index-DeUeHy6g.js +0 -422
- package/dist/index-Ude6e9RU.js +0 -41
- package/dist/index-ZQzHBwkr.js +0 -12767
- package/dist/liquid.browser-CeNxS2GL.js +0 -3493
- package/dist/loader-circle-tM9j2mRh.js +0 -13
- package/dist/shield-check-Ngi9jAQc.js +0 -20
|
@@ -0,0 +1,670 @@
|
|
|
1
|
+
import { C as e, b as t } from "./useEditorCore-DVp5qmtC.js";
|
|
2
|
+
import { C as n, p as r, x as i } from "./keys-8B5MFafK.js";
|
|
3
|
+
import { t as a } from "./useI18n-DzH4KXDk.js";
|
|
4
|
+
import { n as o } from "./_plugin-vue_export-helper-B1-bu7yR.js";
|
|
5
|
+
import { a as s, i as c, n as l, r as u, t as d } from "./RichTextEditorContent-BRpjJ6SV.js";
|
|
6
|
+
import { t as f } from "./loader-circle-BTQQxC3l.js";
|
|
7
|
+
import { t as p } from "./scan-line-7lZPfOdm.js";
|
|
8
|
+
import { f as m, m as h, p as g } from "./styleConstants-CgtFM9hQ.js";
|
|
9
|
+
import { Fragment as _, Teleport as v, createBlock as y, createCommentVNode as b, createElementBlock as x, createElementVNode as S, createTextVNode as C, createVNode as w, defineComponent as T, inject as E, isRef as D, normalizeClass as O, normalizeStyle as k, openBlock as A, renderList as j, toDisplayString as M, unref as N } from "vue";
|
|
10
|
+
var ee = o("list-ordered", [
|
|
11
|
+
["path", {
|
|
12
|
+
d: "M11 5h10",
|
|
13
|
+
key: "1cz7ny"
|
|
14
|
+
}],
|
|
15
|
+
["path", {
|
|
16
|
+
d: "M11 12h10",
|
|
17
|
+
key: "1438ji"
|
|
18
|
+
}],
|
|
19
|
+
["path", {
|
|
20
|
+
d: "M11 19h10",
|
|
21
|
+
key: "11t30w"
|
|
22
|
+
}],
|
|
23
|
+
["path", {
|
|
24
|
+
d: "M4 4h1v5",
|
|
25
|
+
key: "10yrso"
|
|
26
|
+
}],
|
|
27
|
+
["path", {
|
|
28
|
+
d: "M4 9h2",
|
|
29
|
+
key: "r1h2o0"
|
|
30
|
+
}],
|
|
31
|
+
["path", {
|
|
32
|
+
d: "M6.5 20H3.4c0-1 2.6-1.925 2.6-3.5a1.5 1.5 0 0 0-2.6-1.02",
|
|
33
|
+
key: "xtkcd5"
|
|
34
|
+
}]
|
|
35
|
+
]), te = o("list", [
|
|
36
|
+
["path", {
|
|
37
|
+
d: "M3 5h.01",
|
|
38
|
+
key: "18ugdj"
|
|
39
|
+
}],
|
|
40
|
+
["path", {
|
|
41
|
+
d: "M3 12h.01",
|
|
42
|
+
key: "nlz23k"
|
|
43
|
+
}],
|
|
44
|
+
["path", {
|
|
45
|
+
d: "M3 19h.01",
|
|
46
|
+
key: "noohij"
|
|
47
|
+
}],
|
|
48
|
+
["path", {
|
|
49
|
+
d: "M8 5h13",
|
|
50
|
+
key: "1pao27"
|
|
51
|
+
}],
|
|
52
|
+
["path", {
|
|
53
|
+
d: "M8 12h13",
|
|
54
|
+
key: "1za7za"
|
|
55
|
+
}],
|
|
56
|
+
["path", {
|
|
57
|
+
d: "M8 19h13",
|
|
58
|
+
key: "m83p4d"
|
|
59
|
+
}]
|
|
60
|
+
]), ne = o("remove-formatting", [
|
|
61
|
+
["path", {
|
|
62
|
+
d: "M4 7V4h16v3",
|
|
63
|
+
key: "9msm58"
|
|
64
|
+
}],
|
|
65
|
+
["path", {
|
|
66
|
+
d: "M5 20h6",
|
|
67
|
+
key: "1h6pxn"
|
|
68
|
+
}],
|
|
69
|
+
["path", {
|
|
70
|
+
d: "M13 4 8 20",
|
|
71
|
+
key: "kqq6aj"
|
|
72
|
+
}],
|
|
73
|
+
["path", {
|
|
74
|
+
d: "m15 15 5 5",
|
|
75
|
+
key: "me55sn"
|
|
76
|
+
}],
|
|
77
|
+
["path", {
|
|
78
|
+
d: "m20 15-5 5",
|
|
79
|
+
key: "11p7ol"
|
|
80
|
+
}]
|
|
81
|
+
]), re = o("smile", [
|
|
82
|
+
["circle", {
|
|
83
|
+
cx: "12",
|
|
84
|
+
cy: "12",
|
|
85
|
+
r: "10",
|
|
86
|
+
key: "1mglay"
|
|
87
|
+
}],
|
|
88
|
+
["path", {
|
|
89
|
+
d: "M8 14s1.5 2 4 2 4-2 4-2",
|
|
90
|
+
key: "1y1vjs"
|
|
91
|
+
}],
|
|
92
|
+
["line", {
|
|
93
|
+
x1: "9",
|
|
94
|
+
x2: "9.01",
|
|
95
|
+
y1: "9",
|
|
96
|
+
y2: "9",
|
|
97
|
+
key: "yxxnd0"
|
|
98
|
+
}],
|
|
99
|
+
["line", {
|
|
100
|
+
x1: "15",
|
|
101
|
+
x2: "15.01",
|
|
102
|
+
y1: "9",
|
|
103
|
+
y2: "9",
|
|
104
|
+
key: "1p4y9e"
|
|
105
|
+
}]
|
|
106
|
+
]), ie = o("strikethrough", [
|
|
107
|
+
["path", {
|
|
108
|
+
d: "M16 4H9a3 3 0 0 0-2.83 4",
|
|
109
|
+
key: "43sutm"
|
|
110
|
+
}],
|
|
111
|
+
["path", {
|
|
112
|
+
d: "M14 12a4 4 0 0 1 0 8H6",
|
|
113
|
+
key: "nlfj13"
|
|
114
|
+
}],
|
|
115
|
+
["line", {
|
|
116
|
+
x1: "4",
|
|
117
|
+
x2: "20",
|
|
118
|
+
y1: "12",
|
|
119
|
+
y2: "12",
|
|
120
|
+
key: "1e0a9i"
|
|
121
|
+
}]
|
|
122
|
+
]), ae = o("subscript", [
|
|
123
|
+
["path", {
|
|
124
|
+
d: "m4 5 8 8",
|
|
125
|
+
key: "1eunvl"
|
|
126
|
+
}],
|
|
127
|
+
["path", {
|
|
128
|
+
d: "m12 5-8 8",
|
|
129
|
+
key: "1ah0jp"
|
|
130
|
+
}],
|
|
131
|
+
["path", {
|
|
132
|
+
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",
|
|
133
|
+
key: "e8ta8j"
|
|
134
|
+
}]
|
|
135
|
+
]), oe = o("superscript", [
|
|
136
|
+
["path", {
|
|
137
|
+
d: "m4 19 8-8",
|
|
138
|
+
key: "hr47gm"
|
|
139
|
+
}],
|
|
140
|
+
["path", {
|
|
141
|
+
d: "m12 19-8-8",
|
|
142
|
+
key: "1dhhmo"
|
|
143
|
+
}],
|
|
144
|
+
["path", {
|
|
145
|
+
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",
|
|
146
|
+
key: "1dfcux"
|
|
147
|
+
}]
|
|
148
|
+
]), se = o("underline", [["path", {
|
|
149
|
+
d: "M6 4v6a6 6 0 0 0 12 0V4",
|
|
150
|
+
key: "9kb039"
|
|
151
|
+
}], ["line", {
|
|
152
|
+
x1: "4",
|
|
153
|
+
x2: "20",
|
|
154
|
+
y1: "20",
|
|
155
|
+
y2: "20",
|
|
156
|
+
key: "nun2al"
|
|
157
|
+
}]]), P = ["data-tpl-theme", "aria-label"], F = { class: "tpl:flex tpl:items-center tpl:gap-1" }, I = [
|
|
158
|
+
"value",
|
|
159
|
+
"aria-label",
|
|
160
|
+
"title"
|
|
161
|
+
], L = { value: "" }, R = ["value"], z = [
|
|
162
|
+
"value",
|
|
163
|
+
"aria-label",
|
|
164
|
+
"title"
|
|
165
|
+
], B = { value: "" }, V = ["value"], H = { class: "tpl:relative" }, U = [
|
|
166
|
+
"value",
|
|
167
|
+
"aria-label",
|
|
168
|
+
"title"
|
|
169
|
+
], W = { class: "tpl:relative" }, G = [
|
|
170
|
+
"value",
|
|
171
|
+
"aria-label",
|
|
172
|
+
"title"
|
|
173
|
+
], K = ["aria-label", "title"], ce = ["aria-label", "title"], le = ["aria-label", "title"], ue = ["aria-label", "title"], de = ["aria-label", "title"], fe = ["aria-label", "title"], pe = ["aria-label", "title"], me = { class: "tpl:flex tpl:items-center tpl:gap-1" }, he = ["aria-label", "title"], ge = ["aria-label", "title"], _e = ["aria-label", "title"], ve = ["aria-label", "title"], ye = ["aria-label", "title"], be = ["value", "title"], xe = ["value"], Se = ["value", "title"], Ce = ["value"], we = ["aria-label", "title"], Te = { class: "tpl:relative" }, Ee = ["aria-label", "title"], De = {
|
|
174
|
+
key: 0,
|
|
175
|
+
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"
|
|
176
|
+
}, Oe = { class: "tpl:mb-1.5 tpl:text-[10px] tpl:font-medium tpl:tracking-wide tpl:text-[var(--tpl-text-muted)] tpl:uppercase" }, ke = { class: "tpl:grid tpl:grid-cols-10 tpl:gap-0.5" }, Ae = ["onClick"], je = {
|
|
177
|
+
key: 0,
|
|
178
|
+
class: "tpl:mx-1.5 tpl:h-6 tpl:w-px tpl:bg-[var(--tpl-border)]"
|
|
179
|
+
}, Me = ["aria-label", "title"], Ne = {
|
|
180
|
+
key: 1,
|
|
181
|
+
class: "tpl:flex tpl:items-center tpl:gap-2 tpl:px-2 tpl:text-xs tpl:text-[var(--tpl-text-dim)]"
|
|
182
|
+
}, q = /* @__PURE__ */ T({
|
|
183
|
+
__name: "ParagraphToolbar",
|
|
184
|
+
props: {
|
|
185
|
+
editor: {},
|
|
186
|
+
toolbarPosition: {},
|
|
187
|
+
isLoading: { type: Boolean },
|
|
188
|
+
mergeTagEnabled: { type: Boolean }
|
|
189
|
+
},
|
|
190
|
+
emits: ["open-link-dialog", "add-merge-tag"],
|
|
191
|
+
setup(t, { emit: o }) {
|
|
192
|
+
let l = t, d = o, T = E(i), D = E(n), q = E(r), { categories: J, isOpen: Y, toggle: X, close: Pe } = e(), { t: Z } = a();
|
|
193
|
+
function Fe(e) {
|
|
194
|
+
l.editor?.chain().focus().insertContent(e).run(), Pe();
|
|
195
|
+
}
|
|
196
|
+
let Ie = q.fonts, Le = [
|
|
197
|
+
"10px",
|
|
198
|
+
"12px",
|
|
199
|
+
"14px",
|
|
200
|
+
"16px",
|
|
201
|
+
"18px",
|
|
202
|
+
"20px",
|
|
203
|
+
"24px",
|
|
204
|
+
"28px",
|
|
205
|
+
"32px",
|
|
206
|
+
"36px",
|
|
207
|
+
"48px",
|
|
208
|
+
"64px"
|
|
209
|
+
], Re = [
|
|
210
|
+
"1",
|
|
211
|
+
"1.2",
|
|
212
|
+
"1.4",
|
|
213
|
+
"1.5",
|
|
214
|
+
"1.6",
|
|
215
|
+
"1.8",
|
|
216
|
+
"2",
|
|
217
|
+
"2.5"
|
|
218
|
+
], ze = [
|
|
219
|
+
{
|
|
220
|
+
label: "Normal",
|
|
221
|
+
value: "normal"
|
|
222
|
+
},
|
|
223
|
+
{
|
|
224
|
+
label: "-0.5px",
|
|
225
|
+
value: "-0.5px"
|
|
226
|
+
},
|
|
227
|
+
{
|
|
228
|
+
label: "0.5px",
|
|
229
|
+
value: "0.5px"
|
|
230
|
+
},
|
|
231
|
+
{
|
|
232
|
+
label: "1px",
|
|
233
|
+
value: "1px"
|
|
234
|
+
},
|
|
235
|
+
{
|
|
236
|
+
label: "1.5px",
|
|
237
|
+
value: "1.5px"
|
|
238
|
+
},
|
|
239
|
+
{
|
|
240
|
+
label: "2px",
|
|
241
|
+
value: "2px"
|
|
242
|
+
},
|
|
243
|
+
{
|
|
244
|
+
label: "3px",
|
|
245
|
+
value: "3px"
|
|
246
|
+
}
|
|
247
|
+
];
|
|
248
|
+
function Be() {
|
|
249
|
+
return l.editor?.getAttributes("textStyle").fontFamily || "";
|
|
250
|
+
}
|
|
251
|
+
function Ve() {
|
|
252
|
+
return l.editor?.getAttributes("textStyle").fontSize || "";
|
|
253
|
+
}
|
|
254
|
+
function He() {
|
|
255
|
+
return l.editor?.getAttributes("textStyle").color || "";
|
|
256
|
+
}
|
|
257
|
+
function Q(e) {
|
|
258
|
+
e ? l.editor?.chain().focus().setFontFamily(e).run() : l.editor?.chain().focus().unsetFontFamily().run();
|
|
259
|
+
}
|
|
260
|
+
function Ue(e) {
|
|
261
|
+
e ? l.editor?.chain().focus().setFontSize(e).run() : l.editor?.chain().focus().unsetFontSize().run();
|
|
262
|
+
}
|
|
263
|
+
function We(e) {
|
|
264
|
+
e ? l.editor?.chain().focus().setColor(e).run() : l.editor?.chain().focus().unsetColor().run();
|
|
265
|
+
}
|
|
266
|
+
function Ge() {
|
|
267
|
+
return l.editor?.getAttributes("paragraph").lineHeight || "";
|
|
268
|
+
}
|
|
269
|
+
function Ke(e) {
|
|
270
|
+
e ? l.editor?.chain().focus().setLineHeight(e).run() : l.editor?.chain().focus().unsetLineHeight().run();
|
|
271
|
+
}
|
|
272
|
+
function qe() {
|
|
273
|
+
return l.editor?.getAttributes("textStyle").letterSpacing || "";
|
|
274
|
+
}
|
|
275
|
+
function Je(e) {
|
|
276
|
+
e && e !== "normal" ? l.editor?.chain().focus().setLetterSpacing(e).run() : l.editor?.chain().focus().unsetLetterSpacing().run();
|
|
277
|
+
}
|
|
278
|
+
function $() {
|
|
279
|
+
return l.editor?.getAttributes("highlight").color || "";
|
|
280
|
+
}
|
|
281
|
+
function Ye(e) {
|
|
282
|
+
e ? l.editor?.chain().focus().setHighlight({ color: e }).run() : l.editor?.chain().focus().unsetHighlight().run();
|
|
283
|
+
}
|
|
284
|
+
return (e, n) => (A(), y(v, { to: "body" }, [S("div", {
|
|
285
|
+
"data-tpl-theme": N(D),
|
|
286
|
+
role: "toolbar",
|
|
287
|
+
"aria-label": N(Z).paragraphEditor.toolbar,
|
|
288
|
+
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",
|
|
289
|
+
style: k({
|
|
290
|
+
...N(T),
|
|
291
|
+
top: `${t.toolbarPosition.top}px`,
|
|
292
|
+
left: `${t.toolbarPosition.left}px`,
|
|
293
|
+
transform: "translateY(-100%)",
|
|
294
|
+
flexDirection: "column"
|
|
295
|
+
})
|
|
296
|
+
}, [!t.isLoading && t.editor ? (A(), x(_, { key: 0 }, [S("div", F, [
|
|
297
|
+
S("select", {
|
|
298
|
+
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",
|
|
299
|
+
value: Be(),
|
|
300
|
+
"aria-label": N(Z).paragraphEditor.fontFamily,
|
|
301
|
+
title: N(Z).paragraphEditor.fontFamily,
|
|
302
|
+
onChange: n[0] ||= (e) => Q(e.target.value)
|
|
303
|
+
}, [S("option", L, M(N(Z).paragraphEditor.defaultFont), 1), (A(!0), x(_, null, j(N(Ie), (e) => (A(), x("option", {
|
|
304
|
+
key: e.value,
|
|
305
|
+
value: e.value
|
|
306
|
+
}, M(e.label), 9, R))), 128))], 40, I),
|
|
307
|
+
S("select", {
|
|
308
|
+
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",
|
|
309
|
+
value: Ve(),
|
|
310
|
+
"aria-label": N(Z).paragraphEditor.fontSize,
|
|
311
|
+
title: N(Z).paragraphEditor.fontSize,
|
|
312
|
+
onChange: n[1] ||= (e) => Ue(e.target.value)
|
|
313
|
+
}, [S("option", B, M(N(Z).paragraphEditor.defaultSize), 1), (A(), x(_, null, j(Le, (e) => S("option", {
|
|
314
|
+
key: e,
|
|
315
|
+
value: e
|
|
316
|
+
}, M(e), 9, V)), 64))], 40, z),
|
|
317
|
+
n[21] ||= S("span", {
|
|
318
|
+
class: "tpl:mx-1 tpl:h-6 tpl:w-px tpl:bg-[var(--tpl-border)]",
|
|
319
|
+
"aria-hidden": "true"
|
|
320
|
+
}, null, -1),
|
|
321
|
+
S("div", H, [S("input", {
|
|
322
|
+
type: "color",
|
|
323
|
+
class: "tpl:size-8 tpl:cursor-pointer tpl:rounded tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:p-1",
|
|
324
|
+
value: He() || N("#000000"),
|
|
325
|
+
"aria-label": N(Z).paragraphEditor.textColor,
|
|
326
|
+
title: N(Z).paragraphEditor.textColor,
|
|
327
|
+
onInput: n[2] ||= (e) => We(e.target.value)
|
|
328
|
+
}, null, 40, U)]),
|
|
329
|
+
S("div", W, [S("input", {
|
|
330
|
+
type: "color",
|
|
331
|
+
class: "tpl:size-8 tpl:cursor-pointer tpl:rounded tpl:border tpl:border-[var(--tpl-border)] tpl:p-1",
|
|
332
|
+
style: k({ backgroundColor: $() || "var(--tpl-bg)" }),
|
|
333
|
+
value: $() || N("#ffff00"),
|
|
334
|
+
"aria-label": N(Z).paragraphEditor.highlightColor,
|
|
335
|
+
title: N(Z).paragraphEditor.highlightColor,
|
|
336
|
+
onInput: n[3] ||= (e) => Ye(e.target.value)
|
|
337
|
+
}, null, 44, G)]),
|
|
338
|
+
n[22] ||= S("span", {
|
|
339
|
+
class: "tpl:mx-1 tpl:h-6 tpl:w-px tpl:bg-[var(--tpl-border)]",
|
|
340
|
+
"aria-hidden": "true"
|
|
341
|
+
}, null, -1),
|
|
342
|
+
S("button", {
|
|
343
|
+
type: "button",
|
|
344
|
+
class: O(["tpl-text-toolbar-btn", { "tpl-text-toolbar-btn--active": t.editor?.isActive("bold") }]),
|
|
345
|
+
"aria-label": N(Z).paragraphEditor.bold,
|
|
346
|
+
title: N(Z).paragraphEditor.bold,
|
|
347
|
+
onClick: n[4] ||= (e) => t.editor?.chain().focus().toggleBold().run()
|
|
348
|
+
}, [w(N(s), {
|
|
349
|
+
size: 16,
|
|
350
|
+
"stroke-width": 2.5
|
|
351
|
+
})], 10, K),
|
|
352
|
+
S("button", {
|
|
353
|
+
type: "button",
|
|
354
|
+
class: O(["tpl-text-toolbar-btn", { "tpl-text-toolbar-btn--active": t.editor?.isActive("italic") }]),
|
|
355
|
+
"aria-label": N(Z).paragraphEditor.italic,
|
|
356
|
+
title: N(Z).paragraphEditor.italic,
|
|
357
|
+
onClick: n[5] ||= (e) => t.editor?.chain().focus().toggleItalic().run()
|
|
358
|
+
}, [w(N(c), {
|
|
359
|
+
size: 16,
|
|
360
|
+
"stroke-width": 2
|
|
361
|
+
})], 10, ce),
|
|
362
|
+
S("button", {
|
|
363
|
+
type: "button",
|
|
364
|
+
class: O(["tpl-text-toolbar-btn", { "tpl-text-toolbar-btn--active": t.editor?.isActive("underline") }]),
|
|
365
|
+
"aria-label": N(Z).paragraphEditor.underline,
|
|
366
|
+
title: N(Z).paragraphEditor.underline,
|
|
367
|
+
onClick: n[6] ||= (e) => t.editor?.chain().focus().toggleUnderline().run()
|
|
368
|
+
}, [w(N(se), {
|
|
369
|
+
size: 16,
|
|
370
|
+
"stroke-width": 2
|
|
371
|
+
})], 10, le),
|
|
372
|
+
S("button", {
|
|
373
|
+
type: "button",
|
|
374
|
+
class: O(["tpl-text-toolbar-btn", { "tpl-text-toolbar-btn--active": t.editor?.isActive("strike") }]),
|
|
375
|
+
"aria-label": N(Z).paragraphEditor.strikethrough,
|
|
376
|
+
title: N(Z).paragraphEditor.strikethrough,
|
|
377
|
+
onClick: n[7] ||= (e) => t.editor?.chain().focus().toggleStrike().run()
|
|
378
|
+
}, [w(N(ie), {
|
|
379
|
+
size: 16,
|
|
380
|
+
"stroke-width": 2
|
|
381
|
+
})], 10, ue),
|
|
382
|
+
n[23] ||= S("span", {
|
|
383
|
+
class: "tpl:mx-1 tpl:h-6 tpl:w-px tpl:bg-[var(--tpl-border)]",
|
|
384
|
+
"aria-hidden": "true"
|
|
385
|
+
}, null, -1),
|
|
386
|
+
S("button", {
|
|
387
|
+
type: "button",
|
|
388
|
+
class: O(["tpl-text-toolbar-btn", { "tpl-text-toolbar-btn--active": t.editor?.isActive("subscript") }]),
|
|
389
|
+
"aria-label": N(Z).paragraphEditor.subscript,
|
|
390
|
+
title: N(Z).paragraphEditor.subscript,
|
|
391
|
+
onClick: n[8] ||= (e) => t.editor?.chain().focus().toggleSubscript().run()
|
|
392
|
+
}, [w(N(ae), {
|
|
393
|
+
size: 16,
|
|
394
|
+
"stroke-width": 2
|
|
395
|
+
})], 10, de),
|
|
396
|
+
S("button", {
|
|
397
|
+
type: "button",
|
|
398
|
+
class: O(["tpl-text-toolbar-btn", { "tpl-text-toolbar-btn--active": t.editor?.isActive("superscript") }]),
|
|
399
|
+
"aria-label": N(Z).paragraphEditor.superscript,
|
|
400
|
+
title: N(Z).paragraphEditor.superscript,
|
|
401
|
+
onClick: n[9] ||= (e) => t.editor?.chain().focus().toggleSuperscript().run()
|
|
402
|
+
}, [w(N(oe), {
|
|
403
|
+
size: 16,
|
|
404
|
+
"stroke-width": 2
|
|
405
|
+
})], 10, fe),
|
|
406
|
+
n[24] ||= S("span", {
|
|
407
|
+
class: "tpl:mx-1 tpl:h-6 tpl:w-px tpl:bg-[var(--tpl-border)]",
|
|
408
|
+
"aria-hidden": "true"
|
|
409
|
+
}, null, -1),
|
|
410
|
+
S("button", {
|
|
411
|
+
type: "button",
|
|
412
|
+
class: O(["tpl-text-toolbar-btn", { "tpl-text-toolbar-btn--active": t.editor?.isActive("link") }]),
|
|
413
|
+
"aria-label": N(Z).paragraphEditor.addLink,
|
|
414
|
+
title: N(Z).paragraphEditor.addLink,
|
|
415
|
+
onClick: n[10] ||= (e) => d("open-link-dialog")
|
|
416
|
+
}, [w(N(u), {
|
|
417
|
+
size: 16,
|
|
418
|
+
"stroke-width": 2
|
|
419
|
+
})], 10, pe)
|
|
420
|
+
]), S("div", me, [
|
|
421
|
+
S("button", {
|
|
422
|
+
type: "button",
|
|
423
|
+
class: O(["tpl-text-toolbar-btn", { "tpl-text-toolbar-btn--active": t.editor?.isActive("bulletList") }]),
|
|
424
|
+
"aria-label": N(Z).paragraphEditor.bulletList,
|
|
425
|
+
title: N(Z).paragraphEditor.bulletList,
|
|
426
|
+
onClick: n[11] ||= (e) => t.editor?.chain().focus().toggleBulletList().run()
|
|
427
|
+
}, [w(N(te), {
|
|
428
|
+
size: 16,
|
|
429
|
+
"stroke-width": 2
|
|
430
|
+
})], 10, he),
|
|
431
|
+
S("button", {
|
|
432
|
+
type: "button",
|
|
433
|
+
class: O(["tpl-text-toolbar-btn", { "tpl-text-toolbar-btn--active": t.editor?.isActive("orderedList") }]),
|
|
434
|
+
"aria-label": N(Z).paragraphEditor.numberedList,
|
|
435
|
+
title: N(Z).paragraphEditor.numberedList,
|
|
436
|
+
onClick: n[12] ||= (e) => t.editor?.chain().focus().toggleOrderedList().run()
|
|
437
|
+
}, [w(N(ee), {
|
|
438
|
+
size: 16,
|
|
439
|
+
"stroke-width": 2
|
|
440
|
+
})], 10, ge),
|
|
441
|
+
n[27] ||= S("span", {
|
|
442
|
+
class: "tpl:mx-1.5 tpl:h-6 tpl:w-px tpl:bg-[var(--tpl-border)]",
|
|
443
|
+
"aria-hidden": "true"
|
|
444
|
+
}, null, -1),
|
|
445
|
+
S("button", {
|
|
446
|
+
type: "button",
|
|
447
|
+
class: O(["tpl-text-toolbar-btn", { "tpl-text-toolbar-btn--active": t.editor?.isActive({ textAlign: "left" }) }]),
|
|
448
|
+
"aria-label": N(Z).paragraphEditor.alignLeft,
|
|
449
|
+
title: N(Z).paragraphEditor.alignLeft,
|
|
450
|
+
onClick: n[13] ||= (e) => t.editor?.chain().focus().setTextAlign("left").run()
|
|
451
|
+
}, [w(N(m), {
|
|
452
|
+
size: 16,
|
|
453
|
+
"stroke-width": 2
|
|
454
|
+
})], 10, _e),
|
|
455
|
+
S("button", {
|
|
456
|
+
type: "button",
|
|
457
|
+
class: O(["tpl-text-toolbar-btn", { "tpl-text-toolbar-btn--active": t.editor?.isActive({ textAlign: "center" }) }]),
|
|
458
|
+
"aria-label": N(Z).paragraphEditor.alignCenter,
|
|
459
|
+
title: N(Z).paragraphEditor.alignCenter,
|
|
460
|
+
onClick: n[14] ||= (e) => t.editor?.chain().focus().setTextAlign("center").run()
|
|
461
|
+
}, [w(N(h), {
|
|
462
|
+
size: 16,
|
|
463
|
+
"stroke-width": 2
|
|
464
|
+
})], 10, ve),
|
|
465
|
+
S("button", {
|
|
466
|
+
type: "button",
|
|
467
|
+
class: O(["tpl-text-toolbar-btn", { "tpl-text-toolbar-btn--active": t.editor?.isActive({ textAlign: "right" }) }]),
|
|
468
|
+
"aria-label": N(Z).paragraphEditor.alignRight,
|
|
469
|
+
title: N(Z).paragraphEditor.alignRight,
|
|
470
|
+
onClick: n[15] ||= (e) => t.editor?.chain().focus().setTextAlign("right").run()
|
|
471
|
+
}, [w(N(g), {
|
|
472
|
+
size: 16,
|
|
473
|
+
"stroke-width": 2
|
|
474
|
+
})], 10, ye),
|
|
475
|
+
n[28] ||= S("span", {
|
|
476
|
+
class: "tpl:mx-1.5 tpl:h-6 tpl:w-px tpl:bg-[var(--tpl-border)]",
|
|
477
|
+
"aria-hidden": "true"
|
|
478
|
+
}, null, -1),
|
|
479
|
+
S("select", {
|
|
480
|
+
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",
|
|
481
|
+
value: Ge(),
|
|
482
|
+
title: N(Z).paragraphEditor.lineHeight,
|
|
483
|
+
onChange: n[16] ||= (e) => Ke(e.target.value)
|
|
484
|
+
}, [n[25] ||= S("option", { value: "" }, "LH", -1), (A(), x(_, null, j(Re, (e) => S("option", {
|
|
485
|
+
key: e,
|
|
486
|
+
value: e
|
|
487
|
+
}, M(e), 9, xe)), 64))], 40, be),
|
|
488
|
+
S("select", {
|
|
489
|
+
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",
|
|
490
|
+
value: qe(),
|
|
491
|
+
title: N(Z).paragraphEditor.letterSpacing,
|
|
492
|
+
onChange: n[17] ||= (e) => Je(e.target.value)
|
|
493
|
+
}, [n[26] ||= S("option", { value: "" }, "LS", -1), (A(), x(_, null, j(ze, (e) => S("option", {
|
|
494
|
+
key: e.value,
|
|
495
|
+
value: e.value
|
|
496
|
+
}, M(e.label), 9, Ce)), 64))], 40, Se),
|
|
497
|
+
n[29] ||= S("span", {
|
|
498
|
+
class: "tpl:mx-1.5 tpl:h-6 tpl:w-px tpl:bg-[var(--tpl-border)]",
|
|
499
|
+
"aria-hidden": "true"
|
|
500
|
+
}, null, -1),
|
|
501
|
+
S("button", {
|
|
502
|
+
type: "button",
|
|
503
|
+
class: "tpl-text-toolbar-btn",
|
|
504
|
+
"aria-label": N(Z).paragraphEditor.clearFormatting,
|
|
505
|
+
title: N(Z).paragraphEditor.clearFormatting,
|
|
506
|
+
onClick: n[18] ||= (e) => t.editor?.chain().focus().clearNodes().unsetAllMarks().run()
|
|
507
|
+
}, [w(N(ne), {
|
|
508
|
+
size: 16,
|
|
509
|
+
"stroke-width": 2
|
|
510
|
+
})], 8, we),
|
|
511
|
+
n[30] ||= S("span", {
|
|
512
|
+
class: "tpl:mx-1.5 tpl:h-6 tpl:w-px tpl:bg-[var(--tpl-border)]",
|
|
513
|
+
"aria-hidden": "true"
|
|
514
|
+
}, null, -1),
|
|
515
|
+
S("div", Te, [S("button", {
|
|
516
|
+
type: "button",
|
|
517
|
+
class: O(["tpl-text-toolbar-btn", { "tpl-text-toolbar-btn--active": N(Y) }]),
|
|
518
|
+
"aria-label": N(Z).paragraphEditor.insertEmoji,
|
|
519
|
+
title: N(Z).paragraphEditor.insertEmoji,
|
|
520
|
+
onClick: n[19] ||= (...e) => N(X) && N(X)(...e)
|
|
521
|
+
}, [w(N(re), {
|
|
522
|
+
size: 16,
|
|
523
|
+
"stroke-width": 2
|
|
524
|
+
})], 10, Ee), N(Y) ? (A(), x("div", De, [(A(!0), x(_, null, j(N(J), (e) => (A(), x("div", {
|
|
525
|
+
key: e.key,
|
|
526
|
+
class: "tpl:mb-2 tpl:last:mb-0"
|
|
527
|
+
}, [S("div", Oe, M(N(Z).emoji[e.key]), 1), S("div", ke, [(A(!0), x(_, null, j(e.emojis, (e) => (A(), x("button", {
|
|
528
|
+
key: e,
|
|
529
|
+
type: "button",
|
|
530
|
+
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)]",
|
|
531
|
+
onClick: (t) => Fe(e)
|
|
532
|
+
}, M(e), 9, Ae))), 128))])]))), 128))])) : b("", !0)]),
|
|
533
|
+
t.mergeTagEnabled ? (A(), x("span", je)) : b("", !0),
|
|
534
|
+
t.mergeTagEnabled ? (A(), x("button", {
|
|
535
|
+
key: 1,
|
|
536
|
+
type: "button",
|
|
537
|
+
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)]",
|
|
538
|
+
"aria-label": N(Z).mergeTag.add,
|
|
539
|
+
title: N(Z).mergeTag.add,
|
|
540
|
+
onClick: n[20] ||= (e) => d("add-merge-tag")
|
|
541
|
+
}, [w(N(p), {
|
|
542
|
+
size: 16,
|
|
543
|
+
"stroke-width": 2
|
|
544
|
+
}), C(" " + M(N(Z).mergeTag.add), 1)], 8, Me)) : b("", !0)
|
|
545
|
+
])], 64)) : (A(), x("div", Ne, [w(N(f), {
|
|
546
|
+
class: "tpl-spinner",
|
|
547
|
+
size: 14,
|
|
548
|
+
"stroke-width": 2
|
|
549
|
+
}), C(" " + M(N(Z).errors.editorLoading), 1)]))], 12, P)]));
|
|
550
|
+
}
|
|
551
|
+
}), J = { class: "tpl-text-editor-wrapper tpl:relative" }, Y = /* @__PURE__ */ T({
|
|
552
|
+
__name: "ParagraphEditor",
|
|
553
|
+
props: {
|
|
554
|
+
block: {},
|
|
555
|
+
toolbarPosition: {}
|
|
556
|
+
},
|
|
557
|
+
emits: ["done"],
|
|
558
|
+
setup(e, { emit: n }) {
|
|
559
|
+
let r = e, i = n, { editor: a, EditorContent: o, isLoading: s, initError: c, retry: u, showLinkDialog: f, linkUrl: p, linkDialogRef: m, mergeTagEnabled: h, openLinkDialog: g, insertLink: _, removeLink: v, closeLinkDialog: y, handleLinkKeydown: b, handleAddMergeTag: S } = t({
|
|
560
|
+
blockId: () => r.block.id,
|
|
561
|
+
blockContent: () => r.block.content,
|
|
562
|
+
onDone: () => i("done"),
|
|
563
|
+
editorName: "ParagraphEditor",
|
|
564
|
+
async loadExtensions({ mergeTags: e, syntax: t }) {
|
|
565
|
+
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([
|
|
566
|
+
import("./dist-DNjZKe2Z.js").then((e) => e.r),
|
|
567
|
+
import("./dist-DysAFIPy.js"),
|
|
568
|
+
import("./dist-Bu7veieH.js"),
|
|
569
|
+
import("./dist-C1BIRHCQ.js"),
|
|
570
|
+
import("./dist-ChAGLpWo.js"),
|
|
571
|
+
import("./dist-4LiM9FDd.js"),
|
|
572
|
+
import("./dist-DrvKRSU6.js"),
|
|
573
|
+
import("./dist-D_HQYSY-.js"),
|
|
574
|
+
import("./dist-Dxnd0GRf.js"),
|
|
575
|
+
import("./dist-DkypH7qG.js"),
|
|
576
|
+
import("./dist-DmOE-Ubp.js"),
|
|
577
|
+
import("./extensions-BA4NshZQ.js")
|
|
578
|
+
]);
|
|
579
|
+
return {
|
|
580
|
+
TiptapEditor: n,
|
|
581
|
+
EC: r,
|
|
582
|
+
extensions: [
|
|
583
|
+
i.configure({
|
|
584
|
+
heading: !1,
|
|
585
|
+
codeBlock: !1,
|
|
586
|
+
blockquote: !1,
|
|
587
|
+
horizontalRule: !1
|
|
588
|
+
}),
|
|
589
|
+
o,
|
|
590
|
+
s,
|
|
591
|
+
c,
|
|
592
|
+
a.configure({
|
|
593
|
+
openOnClick: !1,
|
|
594
|
+
HTMLAttributes: {
|
|
595
|
+
target: "_blank",
|
|
596
|
+
rel: "noopener noreferrer"
|
|
597
|
+
}
|
|
598
|
+
}),
|
|
599
|
+
l.configure({ types: ["paragraph"] }),
|
|
600
|
+
u,
|
|
601
|
+
d,
|
|
602
|
+
f,
|
|
603
|
+
p.configure({ multicolor: !0 }),
|
|
604
|
+
g,
|
|
605
|
+
_,
|
|
606
|
+
v,
|
|
607
|
+
m.configure({
|
|
608
|
+
mergeTags: e,
|
|
609
|
+
syntax: t
|
|
610
|
+
}),
|
|
611
|
+
h.configure({ syntax: t })
|
|
612
|
+
]
|
|
613
|
+
};
|
|
614
|
+
}
|
|
615
|
+
});
|
|
616
|
+
return (t, n) => (A(), x("div", J, [
|
|
617
|
+
w(q, {
|
|
618
|
+
editor: N(a),
|
|
619
|
+
"toolbar-position": e.toolbarPosition,
|
|
620
|
+
"is-loading": N(s),
|
|
621
|
+
"merge-tag-enabled": N(h),
|
|
622
|
+
onOpenLinkDialog: N(g),
|
|
623
|
+
onAddMergeTag: N(S)
|
|
624
|
+
}, null, 8, [
|
|
625
|
+
"editor",
|
|
626
|
+
"toolbar-position",
|
|
627
|
+
"is-loading",
|
|
628
|
+
"merge-tag-enabled",
|
|
629
|
+
"onOpenLinkDialog",
|
|
630
|
+
"onAddMergeTag"
|
|
631
|
+
]),
|
|
632
|
+
w(d, {
|
|
633
|
+
editor: N(a),
|
|
634
|
+
"editor-content": N(o),
|
|
635
|
+
"is-loading": N(s),
|
|
636
|
+
"init-error": N(c),
|
|
637
|
+
onRetry: N(u)
|
|
638
|
+
}, null, 8, [
|
|
639
|
+
"editor",
|
|
640
|
+
"editor-content",
|
|
641
|
+
"is-loading",
|
|
642
|
+
"init-error",
|
|
643
|
+
"onRetry"
|
|
644
|
+
]),
|
|
645
|
+
w(l, {
|
|
646
|
+
visible: N(f),
|
|
647
|
+
"is-editing-link": N(a)?.isActive("link") ?? !1,
|
|
648
|
+
"dialog-ref": N(m),
|
|
649
|
+
"onUpdate:dialogRef": n[0] ||= (e) => D(m) ? m.value = e : null,
|
|
650
|
+
"link-url": N(p),
|
|
651
|
+
"onUpdate:linkUrl": n[1] ||= (e) => D(p) ? p.value = e : null,
|
|
652
|
+
onClose: N(y),
|
|
653
|
+
onInsert: N(_),
|
|
654
|
+
onRemove: N(v),
|
|
655
|
+
onKeydown: N(b)
|
|
656
|
+
}, null, 8, [
|
|
657
|
+
"visible",
|
|
658
|
+
"is-editing-link",
|
|
659
|
+
"dialog-ref",
|
|
660
|
+
"link-url",
|
|
661
|
+
"onClose",
|
|
662
|
+
"onInsert",
|
|
663
|
+
"onRemove",
|
|
664
|
+
"onKeydown"
|
|
665
|
+
])
|
|
666
|
+
]));
|
|
667
|
+
}
|
|
668
|
+
});
|
|
669
|
+
//#endregion
|
|
670
|
+
export { Y as default };
|