@templatical/editor 0.0.2 → 0.0.3

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.
Files changed (59) hide show
  1. package/dist/{AiChatSidebar-XBj5Rw2l.js → AiChatSidebar-busJk9hm.js} +1 -1
  2. package/dist/{AiFeatureMenu-my1mZ9DL.js → AiFeatureMenu-DLGv_-pj.js} +3 -3
  3. package/dist/{CloudEditor-BVjgKwq3.js → CloudEditor-BDnHd6Um.js} +176 -197
  4. package/dist/{CollaboratorBar-BZq_Gv38.js → CollaboratorBar-Dv3l52vC.js} +2 -2
  5. package/dist/{CommentsSidebar-D9oxqO6l.js → CommentsSidebar-4tjp0VU5.js} +2 -2
  6. package/dist/{DesignReferenceSidebar-CyHq4SWt.js → DesignReferenceSidebar-CmwXvltV.js} +55 -54
  7. package/dist/{ModuleBrowserModal-Cus2Hdwl.js → ModuleBrowserModal-lrk3Fr0H.js} +6 -6
  8. package/dist/{ModulePreviewCanvas-DaByXKY_.js → ModulePreviewCanvas-BcBJLnwL.js} +3 -3
  9. package/dist/ParagraphEditor-DH8cSC6m.js +625 -0
  10. package/dist/{RichTextEditorContent-BRpjJ6SV.js → RichTextEditorContent-CQqodi7p.js} +3 -3
  11. package/dist/{SaveModuleDialog-BIZBQrd8.js → SaveModuleDialog-Bmzi72td.js} +4 -4
  12. package/dist/{SnapshotHistory-Ds1-QNbx.js → SnapshotHistory-AEgi9Xsn.js} +2 -2
  13. package/dist/{TemplateScoringPanel-C8XSk_Ys.js → TemplateScoringPanel-CTgMtc0-.js} +2 -2
  14. package/dist/{TestEmailModal-CCVfaFgV.js → TestEmailModal-Dpq1is9S.js} +3 -3
  15. package/dist/{TitleEditor-V4qaEULF.js → TitleEditor-CLcDdcWI.js} +7 -7
  16. package/dist/{TplModal-LT3FXlgs.js → TplModal-CGzRjR96.js} +2 -2
  17. package/dist/{blockTypeIcons-BujoY5Dl.js → blockTypeIcons-BpPTqcok.js} +1 -1
  18. package/dist/cdn/chunks/ParagraphEditor-CCtWbGDv.js +3 -0
  19. package/dist/cdn/chunks/ParagraphEditor-CCtWbGDv.js.map +1 -0
  20. package/dist/cdn/chunks/RichTextEditorContent-BUD9veXd.js +2 -0
  21. package/dist/cdn/chunks/RichTextEditorContent-BUD9veXd.js.map +1 -0
  22. package/dist/cdn/chunks/TitleEditor-e_UTyxjd.js +3 -0
  23. package/dist/cdn/chunks/TitleEditor-e_UTyxjd.js.map +1 -0
  24. package/dist/cdn/chunks/{extensions-BfjbWqOx.js → extensions-ea_ewKUl.js} +2 -2
  25. package/dist/cdn/chunks/{extensions-BfjbWqOx.js.map → extensions-ea_ewKUl.js.map} +1 -1
  26. package/dist/cdn/chunks/styleConstants-CNejCb-L.js +2 -0
  27. package/dist/cdn/chunks/{styleConstants-UTJ94gco.js.map → styleConstants-CNejCb-L.js.map} +1 -1
  28. package/dist/cdn/chunks/useEditorCore-CwuxQuvh.js +2 -0
  29. package/dist/cdn/chunks/useEditorCore-CwuxQuvh.js.map +1 -0
  30. package/dist/cdn/chunks/useMergeTag-DVOz1v9p.js +2 -0
  31. package/dist/cdn/chunks/useMergeTag-DVOz1v9p.js.map +1 -0
  32. package/dist/cdn/editor.js +1 -1
  33. package/dist/cdn/editor.js.map +1 -1
  34. package/dist/{dist-DNjZKe2Z.js → dist-DmpMJbmZ.js} +1 -1
  35. package/dist/{extensions-BA4NshZQ.js → extensions-CKM99njP.js} +3 -3
  36. package/dist/{i18n-ikyi28RU.js → i18n-CJsFtdbZ.js} +1 -1
  37. package/dist/keys-Dwa2PmdD.js +10 -0
  38. package/dist/{styleConstants-CgtFM9hQ.js → styleConstants-D4SOZGBV.js} +53 -2
  39. package/dist/{styles-hQgJKM4i.js → styles-DSw1VNU3.js} +592 -592
  40. package/dist/templatical-editor.css +1 -1
  41. package/dist/templatical-editor.js +5 -5
  42. package/dist/templatical-editor.umd.cjs +59 -59
  43. package/dist/{useEditorCore-DVp5qmtC.js → useEditorCore-Cc4RCwWq.js} +907 -903
  44. package/dist/{useI18n-DzH4KXDk.js → useI18n-DUirdXEX.js} +2 -2
  45. package/dist/{useMergeTag-D9zQVE-e.js → useMergeTag-DVnlvPYJ.js} +2 -2
  46. package/package.json +2 -2
  47. package/dist/ParagraphEditor-BSyk5B6S.js +0 -670
  48. package/dist/cdn/chunks/ParagraphEditor-BkJQO-ZW.js +0 -3
  49. package/dist/cdn/chunks/ParagraphEditor-BkJQO-ZW.js.map +0 -1
  50. package/dist/cdn/chunks/RichTextEditorContent-UGQorJm_.js +0 -2
  51. package/dist/cdn/chunks/RichTextEditorContent-UGQorJm_.js.map +0 -1
  52. package/dist/cdn/chunks/TitleEditor-CC3Adjai.js +0 -3
  53. package/dist/cdn/chunks/TitleEditor-CC3Adjai.js.map +0 -1
  54. package/dist/cdn/chunks/styleConstants-UTJ94gco.js +0 -2
  55. package/dist/cdn/chunks/useEditorCore-DRhPKq_z.js +0 -2
  56. package/dist/cdn/chunks/useEditorCore-DRhPKq_z.js.map +0 -1
  57. package/dist/cdn/chunks/useMergeTag-CBSlcqnk.js +0 -2
  58. package/dist/cdn/chunks/useMergeTag-CBSlcqnk.js.map +0 -1
  59. package/dist/keys-8B5MFafK.js +0 -4
@@ -0,0 +1,625 @@
1
+ import { C as e, b as t } from "./useEditorCore-Cc4RCwWq.js";
2
+ import { C as n, p as r, w as i, x as a } from "./keys-Dwa2PmdD.js";
3
+ import { t as o } from "./useI18n-DUirdXEX.js";
4
+ import { n as s } from "./_plugin-vue_export-helper-B1-bu7yR.js";
5
+ import { a as c, i as l, n as u, r as d, t as f } from "./RichTextEditorContent-CQqodi7p.js";
6
+ import { t as p } from "./loader-circle-BTQQxC3l.js";
7
+ import { t as m } from "./scan-line-7lZPfOdm.js";
8
+ import { _ as h, a as g, g as _, h as v, o as y, s as b } from "./styleConstants-D4SOZGBV.js";
9
+ import { Fragment as x, Teleport as ee, createBlock as S, createCommentVNode as C, createElementBlock as w, createElementVNode as T, createTextVNode as E, createVNode as D, defineComponent as O, inject as k, isRef as A, normalizeClass as j, normalizeStyle as M, openBlock as N, renderList as P, toDisplayString as F, unref as I } from "vue";
10
+ var te = s("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
+ ]), ne = s("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
+ ]), L = s("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
+ ]), R = s("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
+ ]), z = s("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
+ ]), re = s("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
+ ]), ie = s("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
+ ]), ae = s("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
+ }]]), B = { class: "tpl:relative" }, V = ["aria-label", "title"], H = {
158
+ key: 0,
159
+ 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"
160
+ }, U = { class: "tpl:mb-1.5 tpl:text-[10px] tpl:font-medium tpl:tracking-wide tpl:text-[var(--tpl-text-muted)] tpl:uppercase" }, W = { class: "tpl:grid tpl:grid-cols-10 tpl:gap-0.5" }, G = ["onClick"], K = /* @__PURE__ */ O({
161
+ __name: "EmojiPickerDropdown",
162
+ emits: ["insert"],
163
+ setup(t, { emit: n }) {
164
+ let r = n, { categories: i, isOpen: a, toggle: s } = e(), { t: c } = o();
165
+ return (e, t) => (N(), w("div", B, [T("button", {
166
+ type: "button",
167
+ class: j(["tpl-text-toolbar-btn", { "tpl-text-toolbar-btn--active": I(a) }]),
168
+ "aria-label": I(c).paragraphEditor.insertEmoji,
169
+ title: I(c).paragraphEditor.insertEmoji,
170
+ onClick: t[0] ||= (...e) => I(s) && I(s)(...e)
171
+ }, [D(I(R), {
172
+ size: 16,
173
+ "stroke-width": 2
174
+ })], 10, V), I(a) ? (N(), w("div", H, [(N(!0), w(x, null, P(I(i), (e) => (N(), w("div", {
175
+ key: e.key,
176
+ class: "tpl:mb-2 tpl:last:mb-0"
177
+ }, [T("div", U, F(I(c).emoji[e.key]), 1), T("div", W, [(N(!0), w(x, null, P(e.emojis, (e) => (N(), w("button", {
178
+ key: e,
179
+ type: "button",
180
+ 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)]",
181
+ onClick: (t) => r("insert", e)
182
+ }, F(e), 9, G))), 128))])]))), 128))])) : C("", !0)]));
183
+ }
184
+ }), q = ["data-tpl-theme", "aria-label"], J = { class: "tpl:flex tpl:items-center tpl:gap-1" }, oe = [
185
+ "value",
186
+ "aria-label",
187
+ "title"
188
+ ], se = { value: "" }, ce = ["value"], le = [
189
+ "value",
190
+ "aria-label",
191
+ "title"
192
+ ], ue = { value: "" }, de = ["value"], fe = { class: "tpl:relative" }, pe = [
193
+ "value",
194
+ "aria-label",
195
+ "title"
196
+ ], me = { class: "tpl:relative" }, he = [
197
+ "value",
198
+ "aria-label",
199
+ "title"
200
+ ], ge = ["aria-label", "title"], _e = ["aria-label", "title"], ve = ["aria-label", "title"], ye = ["aria-label", "title"], be = ["aria-label", "title"], xe = ["aria-label", "title"], Se = ["aria-label", "title"], Ce = { class: "tpl:flex tpl:items-center tpl:gap-1" }, we = ["aria-label", "title"], Te = ["aria-label", "title"], Ee = ["aria-label", "title"], De = ["aria-label", "title"], Oe = ["aria-label", "title"], ke = ["value", "title"], Ae = ["value"], je = ["value", "title"], Me = ["value"], Y = ["aria-label", "title"], Ne = {
201
+ key: 0,
202
+ class: "tpl:mx-1.5 tpl:h-6 tpl:w-px tpl:bg-[var(--tpl-border)]"
203
+ }, Pe = ["aria-label", "title"], Fe = {
204
+ key: 1,
205
+ class: "tpl:flex tpl:items-center tpl:gap-2 tpl:px-2 tpl:text-xs tpl:text-[var(--tpl-text-dim)]"
206
+ }, X = /* @__PURE__ */ O({
207
+ __name: "ParagraphToolbar",
208
+ props: {
209
+ editor: {},
210
+ toolbarPosition: {},
211
+ isLoading: { type: Boolean },
212
+ mergeTagEnabled: { type: Boolean }
213
+ },
214
+ emits: ["open-link-dialog", "add-merge-tag"],
215
+ setup(e, { emit: t }) {
216
+ let s = e, u = t, f = k(a, null), O = k(n, null), A = i(r, "ParagraphToolbar"), { t: R } = o(), B = A.fonts;
217
+ function V(e) {
218
+ s.editor?.chain().focus().insertContent(e).run();
219
+ }
220
+ function H() {
221
+ return s.editor?.getAttributes("textStyle").fontFamily || "";
222
+ }
223
+ function U() {
224
+ return s.editor?.getAttributes("textStyle").fontSize || "";
225
+ }
226
+ function W() {
227
+ return s.editor?.getAttributes("textStyle").color || "";
228
+ }
229
+ function G(e) {
230
+ e ? s.editor?.chain().focus().setFontFamily(e).run() : s.editor?.chain().focus().unsetFontFamily().run();
231
+ }
232
+ function X(e) {
233
+ e ? s.editor?.chain().focus().setFontSize(e).run() : s.editor?.chain().focus().unsetFontSize().run();
234
+ }
235
+ function Z(e) {
236
+ e ? s.editor?.chain().focus().setColor(e).run() : s.editor?.chain().focus().unsetColor().run();
237
+ }
238
+ function Q() {
239
+ return s.editor?.getAttributes("paragraph").lineHeight || "";
240
+ }
241
+ function Ie(e) {
242
+ e ? s.editor?.chain().focus().setLineHeight(e).run() : s.editor?.chain().focus().unsetLineHeight().run();
243
+ }
244
+ function Le() {
245
+ return s.editor?.getAttributes("textStyle").letterSpacing || "";
246
+ }
247
+ function Re(e) {
248
+ e && e !== "normal" ? s.editor?.chain().focus().setLetterSpacing(e).run() : s.editor?.chain().focus().unsetLetterSpacing().run();
249
+ }
250
+ function $() {
251
+ return s.editor?.getAttributes("highlight").color || "";
252
+ }
253
+ function ze(e) {
254
+ e ? s.editor?.chain().focus().setHighlight({ color: e }).run() : s.editor?.chain().focus().unsetHighlight().run();
255
+ }
256
+ return (t, n) => (N(), S(ee, { to: "body" }, [T("div", {
257
+ "data-tpl-theme": I(O),
258
+ role: "toolbar",
259
+ "aria-label": I(R).paragraphEditor.toolbar,
260
+ 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",
261
+ style: M({
262
+ ...I(f),
263
+ top: `${e.toolbarPosition.top}px`,
264
+ left: `${e.toolbarPosition.left}px`,
265
+ transform: "translateY(-100%)",
266
+ flexDirection: "column"
267
+ })
268
+ }, [!e.isLoading && e.editor ? (N(), w(x, { key: 0 }, [T("div", J, [
269
+ T("select", {
270
+ 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",
271
+ value: H(),
272
+ "aria-label": I(R).paragraphEditor.fontFamily,
273
+ title: I(R).paragraphEditor.fontFamily,
274
+ onChange: n[0] ||= (e) => G(e.target.value)
275
+ }, [T("option", se, F(I(R).paragraphEditor.defaultFont), 1), (N(!0), w(x, null, P(I(B), (e) => (N(), w("option", {
276
+ key: e.value,
277
+ value: e.value
278
+ }, F(e.label), 9, ce))), 128))], 40, oe),
279
+ T("select", {
280
+ 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",
281
+ value: U(),
282
+ "aria-label": I(R).paragraphEditor.fontSize,
283
+ title: I(R).paragraphEditor.fontSize,
284
+ onChange: n[1] ||= (e) => X(e.target.value)
285
+ }, [T("option", ue, F(I(R).paragraphEditor.defaultSize), 1), (N(!0), w(x, null, P(I(g), (e) => (N(), w("option", {
286
+ key: e,
287
+ value: e
288
+ }, F(e), 9, de))), 128))], 40, le),
289
+ n[20] ||= T("span", {
290
+ class: "tpl:mx-1 tpl:h-6 tpl:w-px tpl:bg-[var(--tpl-border)]",
291
+ "aria-hidden": "true"
292
+ }, null, -1),
293
+ T("div", fe, [T("input", {
294
+ type: "color",
295
+ class: "tpl:size-8 tpl:cursor-pointer tpl:rounded tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:p-1",
296
+ value: W() || I("#000000"),
297
+ "aria-label": I(R).paragraphEditor.textColor,
298
+ title: I(R).paragraphEditor.textColor,
299
+ onInput: n[2] ||= (e) => Z(e.target.value)
300
+ }, null, 40, pe)]),
301
+ T("div", me, [T("input", {
302
+ type: "color",
303
+ class: "tpl:size-8 tpl:cursor-pointer tpl:rounded tpl:border tpl:border-[var(--tpl-border)] tpl:p-1",
304
+ style: M({ backgroundColor: $() || "var(--tpl-bg)" }),
305
+ value: $() || I("#ffff00"),
306
+ "aria-label": I(R).paragraphEditor.highlightColor,
307
+ title: I(R).paragraphEditor.highlightColor,
308
+ onInput: n[3] ||= (e) => ze(e.target.value)
309
+ }, null, 44, he)]),
310
+ n[21] ||= T("span", {
311
+ class: "tpl:mx-1 tpl:h-6 tpl:w-px tpl:bg-[var(--tpl-border)]",
312
+ "aria-hidden": "true"
313
+ }, null, -1),
314
+ T("button", {
315
+ type: "button",
316
+ class: j(["tpl-text-toolbar-btn", { "tpl-text-toolbar-btn--active": e.editor?.isActive("bold") }]),
317
+ "aria-label": I(R).paragraphEditor.bold,
318
+ title: I(R).paragraphEditor.bold,
319
+ onClick: n[4] ||= (t) => e.editor?.chain().focus().toggleBold().run()
320
+ }, [D(I(c), {
321
+ size: 16,
322
+ "stroke-width": 2.5
323
+ })], 10, ge),
324
+ T("button", {
325
+ type: "button",
326
+ class: j(["tpl-text-toolbar-btn", { "tpl-text-toolbar-btn--active": e.editor?.isActive("italic") }]),
327
+ "aria-label": I(R).paragraphEditor.italic,
328
+ title: I(R).paragraphEditor.italic,
329
+ onClick: n[5] ||= (t) => e.editor?.chain().focus().toggleItalic().run()
330
+ }, [D(I(l), {
331
+ size: 16,
332
+ "stroke-width": 2
333
+ })], 10, _e),
334
+ T("button", {
335
+ type: "button",
336
+ class: j(["tpl-text-toolbar-btn", { "tpl-text-toolbar-btn--active": e.editor?.isActive("underline") }]),
337
+ "aria-label": I(R).paragraphEditor.underline,
338
+ title: I(R).paragraphEditor.underline,
339
+ onClick: n[6] ||= (t) => e.editor?.chain().focus().toggleUnderline().run()
340
+ }, [D(I(ae), {
341
+ size: 16,
342
+ "stroke-width": 2
343
+ })], 10, ve),
344
+ T("button", {
345
+ type: "button",
346
+ class: j(["tpl-text-toolbar-btn", { "tpl-text-toolbar-btn--active": e.editor?.isActive("strike") }]),
347
+ "aria-label": I(R).paragraphEditor.strikethrough,
348
+ title: I(R).paragraphEditor.strikethrough,
349
+ onClick: n[7] ||= (t) => e.editor?.chain().focus().toggleStrike().run()
350
+ }, [D(I(z), {
351
+ size: 16,
352
+ "stroke-width": 2
353
+ })], 10, ye),
354
+ n[22] ||= T("span", {
355
+ class: "tpl:mx-1 tpl:h-6 tpl:w-px tpl:bg-[var(--tpl-border)]",
356
+ "aria-hidden": "true"
357
+ }, null, -1),
358
+ T("button", {
359
+ type: "button",
360
+ class: j(["tpl-text-toolbar-btn", { "tpl-text-toolbar-btn--active": e.editor?.isActive("subscript") }]),
361
+ "aria-label": I(R).paragraphEditor.subscript,
362
+ title: I(R).paragraphEditor.subscript,
363
+ onClick: n[8] ||= (t) => e.editor?.chain().focus().toggleSubscript().run()
364
+ }, [D(I(re), {
365
+ size: 16,
366
+ "stroke-width": 2
367
+ })], 10, be),
368
+ T("button", {
369
+ type: "button",
370
+ class: j(["tpl-text-toolbar-btn", { "tpl-text-toolbar-btn--active": e.editor?.isActive("superscript") }]),
371
+ "aria-label": I(R).paragraphEditor.superscript,
372
+ title: I(R).paragraphEditor.superscript,
373
+ onClick: n[9] ||= (t) => e.editor?.chain().focus().toggleSuperscript().run()
374
+ }, [D(I(ie), {
375
+ size: 16,
376
+ "stroke-width": 2
377
+ })], 10, xe),
378
+ n[23] ||= T("span", {
379
+ class: "tpl:mx-1 tpl:h-6 tpl:w-px tpl:bg-[var(--tpl-border)]",
380
+ "aria-hidden": "true"
381
+ }, null, -1),
382
+ T("button", {
383
+ type: "button",
384
+ class: j(["tpl-text-toolbar-btn", { "tpl-text-toolbar-btn--active": e.editor?.isActive("link") }]),
385
+ "aria-label": I(R).paragraphEditor.addLink,
386
+ title: I(R).paragraphEditor.addLink,
387
+ onClick: n[10] ||= (e) => u("open-link-dialog")
388
+ }, [D(I(d), {
389
+ size: 16,
390
+ "stroke-width": 2
391
+ })], 10, Se)
392
+ ]), T("div", Ce, [
393
+ T("button", {
394
+ type: "button",
395
+ class: j(["tpl-text-toolbar-btn", { "tpl-text-toolbar-btn--active": e.editor?.isActive("bulletList") }]),
396
+ "aria-label": I(R).paragraphEditor.bulletList,
397
+ title: I(R).paragraphEditor.bulletList,
398
+ onClick: n[11] ||= (t) => e.editor?.chain().focus().toggleBulletList().run()
399
+ }, [D(I(ne), {
400
+ size: 16,
401
+ "stroke-width": 2
402
+ })], 10, we),
403
+ T("button", {
404
+ type: "button",
405
+ class: j(["tpl-text-toolbar-btn", { "tpl-text-toolbar-btn--active": e.editor?.isActive("orderedList") }]),
406
+ "aria-label": I(R).paragraphEditor.numberedList,
407
+ title: I(R).paragraphEditor.numberedList,
408
+ onClick: n[12] ||= (t) => e.editor?.chain().focus().toggleOrderedList().run()
409
+ }, [D(I(te), {
410
+ size: 16,
411
+ "stroke-width": 2
412
+ })], 10, Te),
413
+ n[26] ||= T("span", {
414
+ class: "tpl:mx-1.5 tpl:h-6 tpl:w-px tpl:bg-[var(--tpl-border)]",
415
+ "aria-hidden": "true"
416
+ }, null, -1),
417
+ T("button", {
418
+ type: "button",
419
+ class: j(["tpl-text-toolbar-btn", { "tpl-text-toolbar-btn--active": e.editor?.isActive({ textAlign: "left" }) }]),
420
+ "aria-label": I(R).paragraphEditor.alignLeft,
421
+ title: I(R).paragraphEditor.alignLeft,
422
+ onClick: n[13] ||= (t) => e.editor?.chain().focus().setTextAlign("left").run()
423
+ }, [D(I(v), {
424
+ size: 16,
425
+ "stroke-width": 2
426
+ })], 10, Ee),
427
+ T("button", {
428
+ type: "button",
429
+ class: j(["tpl-text-toolbar-btn", { "tpl-text-toolbar-btn--active": e.editor?.isActive({ textAlign: "center" }) }]),
430
+ "aria-label": I(R).paragraphEditor.alignCenter,
431
+ title: I(R).paragraphEditor.alignCenter,
432
+ onClick: n[14] ||= (t) => e.editor?.chain().focus().setTextAlign("center").run()
433
+ }, [D(I(h), {
434
+ size: 16,
435
+ "stroke-width": 2
436
+ })], 10, De),
437
+ T("button", {
438
+ type: "button",
439
+ class: j(["tpl-text-toolbar-btn", { "tpl-text-toolbar-btn--active": e.editor?.isActive({ textAlign: "right" }) }]),
440
+ "aria-label": I(R).paragraphEditor.alignRight,
441
+ title: I(R).paragraphEditor.alignRight,
442
+ onClick: n[15] ||= (t) => e.editor?.chain().focus().setTextAlign("right").run()
443
+ }, [D(I(_), {
444
+ size: 16,
445
+ "stroke-width": 2
446
+ })], 10, Oe),
447
+ n[27] ||= T("span", {
448
+ class: "tpl:mx-1.5 tpl:h-6 tpl:w-px tpl:bg-[var(--tpl-border)]",
449
+ "aria-hidden": "true"
450
+ }, null, -1),
451
+ T("select", {
452
+ 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",
453
+ value: Q(),
454
+ title: I(R).paragraphEditor.lineHeight,
455
+ onChange: n[16] ||= (e) => Ie(e.target.value)
456
+ }, [n[24] ||= T("option", { value: "" }, "LH", -1), (N(!0), w(x, null, P(I(b), (e) => (N(), w("option", {
457
+ key: e,
458
+ value: e
459
+ }, F(e), 9, Ae))), 128))], 40, ke),
460
+ T("select", {
461
+ 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",
462
+ value: Le(),
463
+ title: I(R).paragraphEditor.letterSpacing,
464
+ onChange: n[17] ||= (e) => Re(e.target.value)
465
+ }, [n[25] ||= T("option", { value: "" }, "LS", -1), (N(!0), w(x, null, P(I(y), (e) => (N(), w("option", {
466
+ key: e.value,
467
+ value: e.value
468
+ }, F(e.label), 9, Me))), 128))], 40, je),
469
+ n[28] ||= T("span", {
470
+ class: "tpl:mx-1.5 tpl:h-6 tpl:w-px tpl:bg-[var(--tpl-border)]",
471
+ "aria-hidden": "true"
472
+ }, null, -1),
473
+ T("button", {
474
+ type: "button",
475
+ class: "tpl-text-toolbar-btn",
476
+ "aria-label": I(R).paragraphEditor.clearFormatting,
477
+ title: I(R).paragraphEditor.clearFormatting,
478
+ onClick: n[18] ||= (t) => e.editor?.chain().focus().clearNodes().unsetAllMarks().run()
479
+ }, [D(I(L), {
480
+ size: 16,
481
+ "stroke-width": 2
482
+ })], 8, Y),
483
+ n[29] ||= T("span", {
484
+ class: "tpl:mx-1.5 tpl:h-6 tpl:w-px tpl:bg-[var(--tpl-border)]",
485
+ "aria-hidden": "true"
486
+ }, null, -1),
487
+ D(K, { onInsert: V }),
488
+ e.mergeTagEnabled ? (N(), w("span", Ne)) : C("", !0),
489
+ e.mergeTagEnabled ? (N(), w("button", {
490
+ key: 1,
491
+ type: "button",
492
+ 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)]",
493
+ "aria-label": I(R).mergeTag.add,
494
+ title: I(R).mergeTag.add,
495
+ onClick: n[19] ||= (e) => u("add-merge-tag")
496
+ }, [D(I(m), {
497
+ size: 16,
498
+ "stroke-width": 2
499
+ }), E(" " + F(I(R).mergeTag.add), 1)], 8, Pe)) : C("", !0)
500
+ ])], 64)) : (N(), w("div", Fe, [D(I(p), {
501
+ class: "tpl-spinner",
502
+ size: 14,
503
+ "stroke-width": 2
504
+ }), E(" " + F(I(R).errors.editorLoading), 1)]))], 12, q)]));
505
+ }
506
+ }), Z = { class: "tpl-text-editor-wrapper tpl:relative" }, Q = /* @__PURE__ */ O({
507
+ __name: "ParagraphEditor",
508
+ props: {
509
+ block: {},
510
+ toolbarPosition: {}
511
+ },
512
+ emits: ["done"],
513
+ setup(e, { emit: n }) {
514
+ let r = e, i = n, { editor: a, EditorContent: o, isLoading: s, initError: c, retry: l, showLinkDialog: d, linkUrl: p, linkDialogRef: m, mergeTagEnabled: h, openLinkDialog: g, insertLink: _, removeLink: v, closeLinkDialog: y, handleLinkKeydown: b, handleAddMergeTag: x } = t({
515
+ blockId: () => r.block.id,
516
+ blockContent: () => r.block.content,
517
+ onDone: () => i("done"),
518
+ editorName: "ParagraphEditor",
519
+ async loadExtensions({ mergeTags: e, syntax: t }) {
520
+ 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([
521
+ import("./dist-DmpMJbmZ.js").then((e) => e.r),
522
+ import("./dist-DysAFIPy.js"),
523
+ import("./dist-Bu7veieH.js"),
524
+ import("./dist-C1BIRHCQ.js"),
525
+ import("./dist-ChAGLpWo.js"),
526
+ import("./dist-4LiM9FDd.js"),
527
+ import("./dist-DrvKRSU6.js"),
528
+ import("./dist-D_HQYSY-.js"),
529
+ import("./dist-Dxnd0GRf.js"),
530
+ import("./dist-DkypH7qG.js"),
531
+ import("./dist-DmOE-Ubp.js"),
532
+ import("./extensions-CKM99njP.js")
533
+ ]);
534
+ return {
535
+ TiptapEditor: n,
536
+ EC: r,
537
+ extensions: [
538
+ i.configure({
539
+ heading: !1,
540
+ codeBlock: !1,
541
+ blockquote: !1,
542
+ horizontalRule: !1
543
+ }),
544
+ o,
545
+ s,
546
+ c,
547
+ a.configure({
548
+ openOnClick: !1,
549
+ HTMLAttributes: {
550
+ target: "_blank",
551
+ rel: "noopener noreferrer"
552
+ }
553
+ }),
554
+ l.configure({ types: ["paragraph"] }),
555
+ u,
556
+ d,
557
+ f,
558
+ p.configure({ multicolor: !0 }),
559
+ g,
560
+ _,
561
+ v,
562
+ m.configure({
563
+ mergeTags: e,
564
+ syntax: t
565
+ }),
566
+ h.configure({ syntax: t })
567
+ ]
568
+ };
569
+ }
570
+ });
571
+ return (t, n) => (N(), w("div", Z, [
572
+ D(X, {
573
+ editor: I(a),
574
+ "toolbar-position": e.toolbarPosition,
575
+ "is-loading": I(s),
576
+ "merge-tag-enabled": I(h),
577
+ onOpenLinkDialog: I(g),
578
+ onAddMergeTag: I(x)
579
+ }, null, 8, [
580
+ "editor",
581
+ "toolbar-position",
582
+ "is-loading",
583
+ "merge-tag-enabled",
584
+ "onOpenLinkDialog",
585
+ "onAddMergeTag"
586
+ ]),
587
+ D(f, {
588
+ editor: I(a),
589
+ "editor-content": I(o),
590
+ "is-loading": I(s),
591
+ "init-error": I(c),
592
+ onRetry: I(l)
593
+ }, null, 8, [
594
+ "editor",
595
+ "editor-content",
596
+ "is-loading",
597
+ "init-error",
598
+ "onRetry"
599
+ ]),
600
+ D(u, {
601
+ visible: I(d),
602
+ "is-editing-link": I(a)?.isActive("link") ?? !1,
603
+ "dialog-ref": I(m),
604
+ "onUpdate:dialogRef": n[0] ||= (e) => A(m) ? m.value = e : null,
605
+ "link-url": I(p),
606
+ "onUpdate:linkUrl": n[1] ||= (e) => A(p) ? p.value = e : null,
607
+ onClose: I(y),
608
+ onInsert: I(_),
609
+ onRemove: I(v),
610
+ onKeydown: I(b)
611
+ }, null, 8, [
612
+ "visible",
613
+ "is-editing-link",
614
+ "dialog-ref",
615
+ "link-url",
616
+ "onClose",
617
+ "onInsert",
618
+ "onRemove",
619
+ "onKeydown"
620
+ ])
621
+ ]));
622
+ }
623
+ });
624
+ //#endregion
625
+ export { Q as default };
@@ -1,5 +1,5 @@
1
- import { C as e, x as t } from "./keys-8B5MFafK.js";
2
- import { t as n } from "./useI18n-DzH4KXDk.js";
1
+ import { C as e, x as t } from "./keys-Dwa2PmdD.js";
2
+ import { t as n } from "./useI18n-DUirdXEX.js";
3
3
  import { n as r } from "./_plugin-vue_export-helper-B1-bu7yR.js";
4
4
  import { t as i } from "./x-CGlq2XQe.js";
5
5
  import { Teleport as a, createBlock as o, createCommentVNode as s, createElementBlock as c, createElementVNode as l, createTextVNode as u, createVNode as d, defineComponent as f, inject as p, mergeModels as m, normalizeStyle as h, openBlock as g, resolveDynamicComponent as _, toDisplayString as v, unref as y, useModel as b, vModelText as x, withDirectives as S, withModifiers as C } from "vue";
@@ -55,7 +55,7 @@ var w = r("bold", [["path", {
55
55
  "keydown"
56
56
  ], ["update:linkUrl", "update:dialogRef"]),
57
57
  setup(r, { emit: u }) {
58
- let f = b(r, "linkUrl"), m = b(r, "dialogRef"), _ = u, w = p(t), T = p(e), { t: E } = n();
58
+ let f = b(r, "linkUrl"), m = b(r, "dialogRef"), _ = u, w = p(t, null), T = p(e, null), { t: E } = n();
59
59
  return (e, t) => (g(), o(a, { to: "body" }, [r.visible ? (g(), c("div", {
60
60
  key: 0,
61
61
  "data-tpl-theme": y(T),
@@ -1,8 +1,8 @@
1
- import "./useEditorCore-DVp5qmtC.js";
2
- import { f as e, y as t } from "./keys-8B5MFafK.js";
3
- import { t as n } from "./useI18n-DzH4KXDk.js";
1
+ import "./useEditorCore-Cc4RCwWq.js";
2
+ import { f as e, y as t } from "./keys-Dwa2PmdD.js";
3
+ import { t as n } from "./useI18n-DUirdXEX.js";
4
4
  import { t as r } from "./loader-circle-BTQQxC3l.js";
5
- import { t as i } from "./TplModal-LT3FXlgs.js";
5
+ import { t as i } from "./TplModal-CGzRjR96.js";
6
6
  import { Fragment as a, computed as o, createBlock as s, createCommentVNode as c, createElementBlock as l, createElementVNode as u, createTextVNode as d, createVNode as f, defineComponent as p, inject as m, normalizeClass as h, normalizeStyle as g, openBlock as _, ref as v, renderList as y, toDisplayString as b, unref as x, vModelText as S, watch as C, withCtx as ee, withDirectives as te } from "vue";
7
7
  //#region src/cloud/components/SaveModuleDialog.vue?vue&type=script&setup=true&lang.ts
8
8
  var ne = ["aria-busy"], w = {
@@ -1,6 +1,6 @@
1
- import "./useEditorCore-DVp5qmtC.js";
1
+ import "./useEditorCore-Cc4RCwWq.js";
2
2
  import { t as e } from "./dist-CG-vEqSU.js";
3
- import { t } from "./useI18n-DzH4KXDk.js";
3
+ import { t } from "./useI18n-DUirdXEX.js";
4
4
  import { n } from "./_plugin-vue_export-helper-B1-bu7yR.js";
5
5
  import { t as r } from "./chevron-down-DJLW2Q9Z.js";
6
6
  import { t as i } from "./clock-lWIIQA3C.js";
@@ -1,5 +1,5 @@
1
- import { b as e, f as t, h as n } from "./keys-8B5MFafK.js";
2
- import { t as r } from "./useI18n-DzH4KXDk.js";
1
+ import { b as e, f as t, h as n } from "./keys-Dwa2PmdD.js";
2
+ import { t as r } from "./useI18n-DUirdXEX.js";
3
3
  import { n as i, t as a } from "./_plugin-vue_export-helper-B1-bu7yR.js";
4
4
  import { t as ee } from "./chevron-down-DJLW2Q9Z.js";
5
5
  import { t as o } from "./circle-alert-E2vYPs5r.js";
@@ -1,7 +1,7 @@
1
- import "./useEditorCore-DVp5qmtC.js";
2
- import { t as e } from "./useI18n-DzH4KXDk.js";
1
+ import "./useEditorCore-Cc4RCwWq.js";
2
+ import { t as e } from "./useI18n-DUirdXEX.js";
3
3
  import { t } from "./loader-circle-BTQQxC3l.js";
4
- import { t as n } from "./TplModal-LT3FXlgs.js";
4
+ import { t as n } from "./TplModal-CGzRjR96.js";
5
5
  import { Fragment as r, createBlock as i, createCommentVNode as a, createElementBlock as o, createElementVNode as s, createTextVNode as c, createVNode as l, defineComponent as u, normalizeClass as d, openBlock as f, ref as p, renderList as m, toDisplayString as h, unref as g, vModelSelect as _, watch as v, withCtx as y, withDirectives as b } from "vue";
6
6
  //#region src/cloud/components/TestEmailModal.vue?vue&type=script&setup=true&lang.ts
7
7
  var x = ["aria-busy"], S = {