@aswin.dev/editor 0.6.3 → 0.7.1

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 (85) hide show
  1. package/README.md +3 -3
  2. package/dist/AccessibilityPanel-COL6Wm7p.js +108 -0
  3. package/dist/AiChatSidebar-DWGPVtvC.js +229 -0
  4. package/dist/AiFeatureMenu-duUFSfDf.js +63 -0
  5. package/dist/BlockA11yBadge-Qs6HtXid.js +34 -0
  6. package/dist/CloudEditor-CFldoCOb.js +1207 -0
  7. package/dist/CollaboratorBar-Bw-lbt61.js +95 -0
  8. package/dist/CommentsSidebar-BaD5F53-.js +436 -0
  9. package/dist/CountdownBlock-DaYGxKqo.js +92 -0
  10. package/dist/CountdownToolbar-Dg4F8MTk.js +210 -0
  11. package/dist/DesignReferenceSidebar-BSH7uNP_.js +276 -0
  12. package/dist/LoadingTrack-Ba2pfF57.js +10 -0
  13. package/dist/ModuleBrowserModal-6phxZSKI.js +206 -0
  14. package/dist/ModulePreviewCanvas-BW8L3eQX.js +108 -0
  15. package/dist/NumberWithSuffix-BpUzQOJt.js +422 -0
  16. package/dist/ParagraphEditor-DNSzAB-I.js +695 -0
  17. package/dist/RichTextEditorContent-CrqPQdnk.js +137 -0
  18. package/dist/SaveModuleDialog-zMQTpez7.js +123 -0
  19. package/dist/SnapshotHistory-Do-A5rYU.js +122 -0
  20. package/dist/TemplateScoringPanel-CS7o62zS.js +256 -0
  21. package/dist/TestEmailModal-DGj_9V1u.js +94 -0
  22. package/dist/TitleEditor-C7IDnAoS.js +172 -0
  23. package/dist/TplModal-BAsVzcTb.js +44 -0
  24. package/dist/_plugin-vue_export-helper-BVAJ4lgT.js +8 -0
  25. package/dist/accessibility-BU09xZrQ.js +27 -0
  26. package/dist/blockTypeIcons-C6LDKvmd.js +140 -0
  27. package/dist/bundle-stats.json +10 -0
  28. package/dist/check-DJrpDKO_.js +7 -0
  29. package/dist/chevron-down-C5oBUhT8.js +7 -0
  30. package/dist/chevron-right-BqCptpdp.js +10 -0
  31. package/dist/circle-alert-ZQQc98HC.js +25 -0
  32. package/dist/clock-ik2pRJKG.js +12 -0
  33. package/dist/cloud-6ZmAvF0j.js +1791 -0
  34. package/dist/createLucideIcon-ClREiSx3.js +43 -0
  35. package/dist/de-DWcgp-7T.js +729 -0
  36. package/dist/de-GOtR9DwW.js +207 -0
  37. package/dist/dist-BUzw1buG.js +35 -0
  38. package/dist/dist-BZyY-SS4.js +74 -0
  39. package/dist/dist-BadNx4qo.js +5 -0
  40. package/dist/dist-BesOh2mk.js +35 -0
  41. package/dist/dist-Bz3M4RXG.js +2082 -0
  42. package/dist/dist-C04s_fLA.js +563 -0
  43. package/dist/dist-C3T2AKtB.js +776 -0
  44. package/dist/dist-C9ckKEZL.js +519 -0
  45. package/dist/dist-CBItRG-Z.js +47 -0
  46. package/dist/dist-COSzWQUs.js +5 -0
  47. package/dist/dist-CivF9P8b.js +382 -0
  48. package/dist/dist-DXa1uAMh.js +10658 -0
  49. package/dist/dist-DtiDUrX-.js +189 -0
  50. package/dist/dist-Dzt5foyL.js +61 -0
  51. package/dist/emojiData-DrBuvEoP.js +17 -0
  52. package/dist/en-Cxd4fhNm.js +729 -0
  53. package/dist/en-dFFQVzNn.js +207 -0
  54. package/dist/extensions-D__hOlV1.js +799 -0
  55. package/dist/formatRelativeTime-BhhO8yCl.js +12 -0
  56. package/dist/image-up-DT7gcJLN.js +23 -0
  57. package/dist/index.d.ts +352 -0
  58. package/dist/info-BSPGcsSM.js +19 -0
  59. package/dist/keys-CvX8D-8C.js +10 -0
  60. package/dist/liquid.browser-BvCyLQII.js +3277 -0
  61. package/dist/loader-circle-Balo8p3d.js +7 -0
  62. package/dist/message-circle-B39qAHxs.js +7 -0
  63. package/dist/pencil-BZJPNYWR.js +10 -0
  64. package/dist/readableTextColor-DVuzNX1y.js +30 -0
  65. package/dist/refresh-cw-DwDqGUM0.js +29 -0
  66. package/dist/rolldown-runtime-BZGGJVDF.js +20 -0
  67. package/dist/scan-line-CzfFJO1o.js +25 -0
  68. package/dist/send-D2eSo4GH.js +10 -0
  69. package/dist/shield-check-jkpgcC0-.js +10 -0
  70. package/dist/sparkles-Chm5CZfb.js +23 -0
  71. package/dist/style.css +2 -0
  72. package/dist/styleConstants-34eUKPOZ.js +55 -0
  73. package/dist/styles-B4tjX5SP.js +5224 -0
  74. package/dist/templatical-editor.js +312 -0
  75. package/dist/text-align-start-CzBnJsW8.js +43 -0
  76. package/dist/timeouts-BSGxjuUF.js +4 -0
  77. package/dist/trash-2-CtK2apEH.js +25 -0
  78. package/dist/triangle-alert-KpDVNbpn.js +17 -0
  79. package/dist/useCloudI18n-DOKSZql1.js +23 -0
  80. package/dist/useEditorCore-wslttMH-.js +9517 -0
  81. package/dist/useI18n-C2xQZ6K9.js +17 -0
  82. package/dist/useMergeTag-DX0XG5V9.js +34 -0
  83. package/dist/vue.runtime.esm-bundler-CjauPXjj.js +5775 -0
  84. package/dist/x-BkaOMosX.js +10 -0
  85. package/package.json +10 -10
@@ -0,0 +1,695 @@
1
+ import { At as e, C as t, D as n, F as r, Ft as i, N as a, R as o, Y as s, _ as c, b as l, d as u, et as d, f, g as p, h as m, jt as h, m as g, p as _, st as v, u as y, v as b, x } from "./vue.runtime.esm-bundler-CjauPXjj.js";
2
+ import { T as S, w as C, x as w } from "./useEditorCore-wslttMH-.js";
3
+ import { t as T } from "./dist-CivF9P8b.js";
4
+ import { A as E, D, g as O, k } from "./keys-CvX8D-8C.js";
5
+ import { t as A } from "./useI18n-C2xQZ6K9.js";
6
+ import { t as j } from "./createLucideIcon-ClREiSx3.js";
7
+ import { a as ee, i as M, n as N, r as P, t as F } from "./RichTextEditorContent-CrqPQdnk.js";
8
+ import { t as te } from "./loader-circle-Balo8p3d.js";
9
+ import { t as ne } from "./scan-line-CzfFJO1o.js";
10
+ import { n as re, r as ie, t as I } from "./text-align-start-CzBnJsW8.js";
11
+ import { t as L } from "./_plugin-vue_export-helper-BVAJ4lgT.js";
12
+ import { a as R, o as z, s as B } from "./styleConstants-34eUKPOZ.js";
13
+ var V = j("list-ordered", [
14
+ ["path", {
15
+ d: "M11 5h10",
16
+ key: "1cz7ny"
17
+ }],
18
+ ["path", {
19
+ d: "M11 12h10",
20
+ key: "1438ji"
21
+ }],
22
+ ["path", {
23
+ d: "M11 19h10",
24
+ key: "11t30w"
25
+ }],
26
+ ["path", {
27
+ d: "M4 4h1v5",
28
+ key: "10yrso"
29
+ }],
30
+ ["path", {
31
+ d: "M4 9h2",
32
+ key: "r1h2o0"
33
+ }],
34
+ ["path", {
35
+ d: "M6.5 20H3.4c0-1 2.6-1.925 2.6-3.5a1.5 1.5 0 0 0-2.6-1.02",
36
+ key: "xtkcd5"
37
+ }]
38
+ ]), H = j("list", [
39
+ ["path", {
40
+ d: "M3 5h.01",
41
+ key: "18ugdj"
42
+ }],
43
+ ["path", {
44
+ d: "M3 12h.01",
45
+ key: "nlz23k"
46
+ }],
47
+ ["path", {
48
+ d: "M3 19h.01",
49
+ key: "noohij"
50
+ }],
51
+ ["path", {
52
+ d: "M8 5h13",
53
+ key: "1pao27"
54
+ }],
55
+ ["path", {
56
+ d: "M8 12h13",
57
+ key: "1za7za"
58
+ }],
59
+ ["path", {
60
+ d: "M8 19h13",
61
+ key: "m83p4d"
62
+ }]
63
+ ]), U = j("remove-formatting", [
64
+ ["path", {
65
+ d: "M4 7V4h16v3",
66
+ key: "9msm58"
67
+ }],
68
+ ["path", {
69
+ d: "M5 20h6",
70
+ key: "1h6pxn"
71
+ }],
72
+ ["path", {
73
+ d: "M13 4 8 20",
74
+ key: "kqq6aj"
75
+ }],
76
+ ["path", {
77
+ d: "m15 15 5 5",
78
+ key: "me55sn"
79
+ }],
80
+ ["path", {
81
+ d: "m20 15-5 5",
82
+ key: "11p7ol"
83
+ }]
84
+ ]), W = j("smile", [
85
+ ["circle", {
86
+ cx: "12",
87
+ cy: "12",
88
+ r: "10",
89
+ key: "1mglay"
90
+ }],
91
+ ["path", {
92
+ d: "M8 14s1.5 2 4 2 4-2 4-2",
93
+ key: "1y1vjs"
94
+ }],
95
+ ["line", {
96
+ x1: "9",
97
+ x2: "9.01",
98
+ y1: "9",
99
+ y2: "9",
100
+ key: "yxxnd0"
101
+ }],
102
+ ["line", {
103
+ x1: "15",
104
+ x2: "15.01",
105
+ y1: "9",
106
+ y2: "9",
107
+ key: "1p4y9e"
108
+ }]
109
+ ]), G = j("strikethrough", [
110
+ ["path", {
111
+ d: "M16 4H9a3 3 0 0 0-2.83 4",
112
+ key: "43sutm"
113
+ }],
114
+ ["path", {
115
+ d: "M14 12a4 4 0 0 1 0 8H6",
116
+ key: "nlfj13"
117
+ }],
118
+ ["line", {
119
+ x1: "4",
120
+ x2: "20",
121
+ y1: "12",
122
+ y2: "12",
123
+ key: "1e0a9i"
124
+ }]
125
+ ]), K = j("subscript", [
126
+ ["path", {
127
+ d: "m4 5 8 8",
128
+ key: "1eunvl"
129
+ }],
130
+ ["path", {
131
+ d: "m12 5-8 8",
132
+ key: "1ah0jp"
133
+ }],
134
+ ["path", {
135
+ 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",
136
+ key: "e8ta8j"
137
+ }]
138
+ ]), q = j("superscript", [
139
+ ["path", {
140
+ d: "m4 19 8-8",
141
+ key: "hr47gm"
142
+ }],
143
+ ["path", {
144
+ d: "m12 19-8-8",
145
+ key: "1dhhmo"
146
+ }],
147
+ ["path", {
148
+ 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",
149
+ key: "1dfcux"
150
+ }]
151
+ ]), J = j("underline", [["path", {
152
+ d: "M6 4v6a6 6 0 0 0 12 0V4",
153
+ key: "9kb039"
154
+ }], ["line", {
155
+ x1: "4",
156
+ x2: "20",
157
+ y1: "20",
158
+ y2: "20",
159
+ key: "nun2al"
160
+ }]]), Y = [
161
+ "aria-label",
162
+ "title",
163
+ "aria-expanded"
164
+ ], ae = ["aria-label"], oe = { class: "tpl:mb-1.5 tpl:text-[10px] tpl:font-medium tpl:tracking-wide tpl:text-[var(--tpl-text-muted)] tpl:uppercase" }, se = { class: "tpl:grid tpl:grid-cols-10 tpl:gap-0.5" }, ce = ["aria-label", "onClick"], le = /* @__PURE__ */ t({
165
+ __name: "EmojiPickerDropdown",
166
+ emits: ["insert"],
167
+ setup(t, { emit: n }) {
168
+ let o = n, { categories: s, isOpen: l, toggle: p, close: h } = C(), { t: _, format: w } = A(), E = d(null), D = d(null);
169
+ S(E, g(() => l.value)), T(D, () => {
170
+ l.value && h();
171
+ });
172
+ function O(e) {
173
+ o("insert", e), h();
174
+ }
175
+ return (t, n) => (a(), b("div", {
176
+ ref_key: "rootRef",
177
+ ref: D,
178
+ class: "tpl:relative"
179
+ }, [m("button", {
180
+ type: "button",
181
+ class: e(["tpl-text-toolbar-btn", { "tpl-text-toolbar-btn--active": v(l) }]),
182
+ "aria-label": v(_).paragraphEditor.insertEmoji,
183
+ title: v(_).paragraphEditor.insertEmoji,
184
+ "aria-expanded": v(l),
185
+ "aria-haspopup": "dialog",
186
+ "aria-controls": "tpl-emoji-picker",
187
+ onClick: n[0] ||= (...e) => v(p) && v(p)(...e)
188
+ }, [x(v(W), {
189
+ size: 16,
190
+ "stroke-width": 2
191
+ })], 10, Y), v(l) ? (a(), b("div", {
192
+ key: 0,
193
+ id: "tpl-emoji-picker",
194
+ ref_key: "pickerRef",
195
+ ref: E,
196
+ role: "dialog",
197
+ "aria-modal": "false",
198
+ "aria-label": v(_).paragraphEditor.insertEmoji,
199
+ tabindex: "-1",
200
+ 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",
201
+ onKeydown: n[1] ||= y(u((...e) => v(h) && v(h)(...e), ["stop", "prevent"]), ["esc"])
202
+ }, [(a(!0), b(f, null, r(v(s), (e) => (a(), b("div", {
203
+ key: e.key,
204
+ class: "tpl:mb-2 tpl:last:mb-0"
205
+ }, [m("div", oe, i(v(_).emoji[e.key]), 1), m("div", se, [(a(!0), b(f, null, r(e.emojis, (e) => (a(), b("button", {
206
+ key: e,
207
+ type: "button",
208
+ "aria-label": v(w)(v(_).paragraphEditor.emojiItemLabel, { emoji: e }),
209
+ 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)]",
210
+ onClick: (t) => O(e)
211
+ }, i(e), 9, ce))), 128))])]))), 128))], 40, ae)) : c("", !0)], 512));
212
+ }
213
+ }), ue = [
214
+ "aria-label",
215
+ "title",
216
+ "aria-pressed"
217
+ ], X = /* @__PURE__ */ t({
218
+ __name: "ToolbarIconButton",
219
+ props: {
220
+ icon: {},
221
+ label: {},
222
+ active: { type: Boolean },
223
+ strokeWidth: {},
224
+ size: {}
225
+ },
226
+ setup(t) {
227
+ return (n, r) => (a(), b("button", {
228
+ type: "button",
229
+ class: e(["tpl-text-toolbar-btn", { "tpl-text-toolbar-btn--active": t.active }]),
230
+ "aria-label": t.label,
231
+ title: t.label,
232
+ "aria-pressed": t.active ? "true" : "false"
233
+ }, [(a(), p(o(t.icon), {
234
+ size: t.size ?? 16,
235
+ "stroke-width": t.strokeWidth ?? 2
236
+ }, null, 8, ["size", "stroke-width"]))], 10, ue));
237
+ }
238
+ }), de = {}, fe = {
239
+ class: "tpl:mx-1 tpl:h-6 tpl:w-px tpl:bg-[var(--tpl-border)]",
240
+ "aria-hidden": "true"
241
+ };
242
+ function pe(e, t) {
243
+ return a(), b("span", fe);
244
+ }
245
+ var Z = /* @__PURE__ */ L(de, [["render", pe]]), me = [
246
+ "value",
247
+ "aria-label",
248
+ "title"
249
+ ], he = { value: "" }, ge = ["value"], Q = /* @__PURE__ */ t({
250
+ __name: "ToolbarSelect",
251
+ props: {
252
+ modelValue: {},
253
+ options: {},
254
+ label: {},
255
+ placeholder: {},
256
+ widthClass: {}
257
+ },
258
+ emits: ["update:modelValue"],
259
+ setup(t, { emit: n }) {
260
+ let o = n;
261
+ function s(e) {
262
+ o("update:modelValue", e.target.value);
263
+ }
264
+ function c(e) {
265
+ return typeof e == "string" ? e : e.value;
266
+ }
267
+ function l(e) {
268
+ return typeof e == "string" ? e : e.label;
269
+ }
270
+ return (n, o) => (a(), b("select", {
271
+ class: e(["tpl:h-8 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", t.widthClass ?? "tpl:w-20"]),
272
+ value: t.modelValue,
273
+ "aria-label": t.label,
274
+ title: t.label,
275
+ onChange: s
276
+ }, [m("option", he, i(t.placeholder ?? ""), 1), (a(!0), b(f, null, r(t.options, (e) => (a(), b("option", {
277
+ key: c(e),
278
+ value: c(e)
279
+ }, i(l(e)), 9, ge))), 128))], 42, me));
280
+ }
281
+ }), _e = ["data-tpl-theme", "aria-label"], ve = { class: "tpl:flex tpl:items-center tpl:gap-1" }, ye = { class: "tpl:relative" }, be = [
282
+ "value",
283
+ "aria-label",
284
+ "title"
285
+ ], $ = { class: "tpl:relative" }, xe = [
286
+ "value",
287
+ "aria-label",
288
+ "title"
289
+ ], Se = { class: "tpl:flex tpl:items-center tpl:gap-1" }, Ce = ["aria-label", "title"], we = {
290
+ key: 1,
291
+ class: "tpl:flex tpl:items-center tpl:gap-2 tpl:px-2 tpl:text-xs tpl:text-[var(--tpl-text-dim)]"
292
+ }, Te = /* @__PURE__ */ t({
293
+ __name: "ParagraphToolbar",
294
+ props: {
295
+ editor: {},
296
+ toolbarPosition: {},
297
+ isLoading: { type: Boolean },
298
+ canRequestMergeTag: { type: Boolean }
299
+ },
300
+ emits: ["open-link-dialog", "add-merge-tag"],
301
+ setup(e, { emit: t }) {
302
+ let r = e, o = t, s = n(D, null), u = n(k, null), d = E(O, "ParagraphToolbar"), { t: g } = A(), y = d.fonts;
303
+ function S(e) {
304
+ r.editor?.chain().focus().insertContent(e).run();
305
+ }
306
+ function C(e) {
307
+ return r.editor?.getAttributes("textStyle")[e] || "";
308
+ }
309
+ function w(e) {
310
+ let t = r.editor?.chain().focus();
311
+ e ? t?.setFontFamily(e).run() : t?.unsetFontFamily().run();
312
+ }
313
+ function T(e) {
314
+ let t = r.editor?.chain().focus();
315
+ e ? t?.setFontSize(e).run() : t?.unsetFontSize().run();
316
+ }
317
+ function j(e) {
318
+ let t = r.editor?.chain().focus();
319
+ e ? t?.setColor(e).run() : t?.unsetColor().run();
320
+ }
321
+ function N() {
322
+ return r.editor?.getAttributes("paragraph").lineHeight || "";
323
+ }
324
+ function F(e) {
325
+ let t = r.editor?.chain().focus();
326
+ e ? t?.setLineHeight(e).run() : t?.unsetLineHeight().run();
327
+ }
328
+ function L(e) {
329
+ let t = r.editor?.chain().focus();
330
+ e && e !== "normal" ? t?.setLetterSpacing(e).run() : t?.unsetLetterSpacing().run();
331
+ }
332
+ function W() {
333
+ return r.editor?.getAttributes("highlight").color || "";
334
+ }
335
+ function Y(e) {
336
+ let t = r.editor?.chain().focus();
337
+ e ? t?.setHighlight({ color: e }).run() : t?.unsetHighlight().run();
338
+ }
339
+ return (t, n) => (a(), p(_, { to: "body" }, [m("div", {
340
+ "data-tpl-theme": v(u),
341
+ role: "toolbar",
342
+ "aria-label": v(g).paragraphEditor.toolbar,
343
+ 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",
344
+ style: h({
345
+ ...v(s),
346
+ top: `${e.toolbarPosition.top}px`,
347
+ left: `${e.toolbarPosition.left}px`,
348
+ transform: "translateY(-100%)",
349
+ flexDirection: "column"
350
+ })
351
+ }, [!e.isLoading && e.editor ? (a(), b(f, { key: 0 }, [m("div", ve, [
352
+ x(Q, {
353
+ "model-value": C("fontFamily"),
354
+ options: v(y),
355
+ label: v(g).paragraphEditor.fontFamily,
356
+ placeholder: v(g).paragraphEditor.defaultFont,
357
+ "width-class": "tpl:w-32",
358
+ "onUpdate:modelValue": w
359
+ }, null, 8, [
360
+ "model-value",
361
+ "options",
362
+ "label",
363
+ "placeholder"
364
+ ]),
365
+ x(Q, {
366
+ "model-value": C("fontSize"),
367
+ options: v(R),
368
+ label: v(g).paragraphEditor.fontSize,
369
+ placeholder: v(g).paragraphEditor.defaultSize,
370
+ "width-class": "tpl:w-20",
371
+ "onUpdate:modelValue": T
372
+ }, null, 8, [
373
+ "model-value",
374
+ "options",
375
+ "label",
376
+ "placeholder"
377
+ ]),
378
+ x(Z),
379
+ m("div", ye, [m("input", {
380
+ type: "color",
381
+ class: "tpl:size-8 tpl:cursor-pointer tpl:rounded tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:p-1",
382
+ value: C("color") || v("#000000"),
383
+ "aria-label": v(g).paragraphEditor.textColor,
384
+ title: v(g).paragraphEditor.textColor,
385
+ onInput: n[0] ||= (e) => j(e.target.value)
386
+ }, null, 40, be)]),
387
+ m("div", $, [m("input", {
388
+ type: "color",
389
+ class: "tpl:size-8 tpl:cursor-pointer tpl:rounded tpl:border tpl:border-[var(--tpl-border)] tpl:p-1",
390
+ style: h({ backgroundColor: W() || "var(--tpl-bg)" }),
391
+ value: W() || v("#ffff00"),
392
+ "aria-label": v(g).paragraphEditor.highlightColor,
393
+ title: v(g).paragraphEditor.highlightColor,
394
+ onInput: n[1] ||= (e) => Y(e.target.value)
395
+ }, null, 44, xe)]),
396
+ x(Z),
397
+ x(X, {
398
+ icon: v(ee),
399
+ label: v(g).paragraphEditor.bold,
400
+ active: e.editor.isActive("bold"),
401
+ "stroke-width": 2.5,
402
+ onClick: n[2] ||= (t) => e.editor.chain().focus().toggleBold().run()
403
+ }, null, 8, [
404
+ "icon",
405
+ "label",
406
+ "active"
407
+ ]),
408
+ x(X, {
409
+ icon: v(M),
410
+ label: v(g).paragraphEditor.italic,
411
+ active: e.editor.isActive("italic"),
412
+ onClick: n[3] ||= (t) => e.editor.chain().focus().toggleItalic().run()
413
+ }, null, 8, [
414
+ "icon",
415
+ "label",
416
+ "active"
417
+ ]),
418
+ x(X, {
419
+ icon: v(J),
420
+ label: v(g).paragraphEditor.underline,
421
+ active: e.editor.isActive("underline"),
422
+ onClick: n[4] ||= (t) => e.editor.chain().focus().toggleUnderline().run()
423
+ }, null, 8, [
424
+ "icon",
425
+ "label",
426
+ "active"
427
+ ]),
428
+ x(X, {
429
+ icon: v(G),
430
+ label: v(g).paragraphEditor.strikethrough,
431
+ active: e.editor.isActive("strike"),
432
+ onClick: n[5] ||= (t) => e.editor.chain().focus().toggleStrike().run()
433
+ }, null, 8, [
434
+ "icon",
435
+ "label",
436
+ "active"
437
+ ]),
438
+ x(Z),
439
+ x(X, {
440
+ icon: v(K),
441
+ label: v(g).paragraphEditor.subscript,
442
+ active: e.editor.isActive("subscript"),
443
+ onClick: n[6] ||= (t) => e.editor.chain().focus().toggleSubscript().run()
444
+ }, null, 8, [
445
+ "icon",
446
+ "label",
447
+ "active"
448
+ ]),
449
+ x(X, {
450
+ icon: v(q),
451
+ label: v(g).paragraphEditor.superscript,
452
+ active: e.editor.isActive("superscript"),
453
+ onClick: n[7] ||= (t) => e.editor.chain().focus().toggleSuperscript().run()
454
+ }, null, 8, [
455
+ "icon",
456
+ "label",
457
+ "active"
458
+ ]),
459
+ x(Z),
460
+ x(X, {
461
+ icon: v(P),
462
+ label: v(g).paragraphEditor.addLink,
463
+ active: e.editor.isActive("link"),
464
+ onClick: n[8] ||= (e) => o("open-link-dialog")
465
+ }, null, 8, [
466
+ "icon",
467
+ "label",
468
+ "active"
469
+ ])
470
+ ]), m("div", Se, [
471
+ x(X, {
472
+ icon: v(H),
473
+ label: v(g).paragraphEditor.bulletList,
474
+ active: e.editor.isActive("bulletList"),
475
+ onClick: n[9] ||= (t) => e.editor.chain().focus().toggleBulletList().run()
476
+ }, null, 8, [
477
+ "icon",
478
+ "label",
479
+ "active"
480
+ ]),
481
+ x(X, {
482
+ icon: v(V),
483
+ label: v(g).paragraphEditor.numberedList,
484
+ active: e.editor.isActive("orderedList"),
485
+ onClick: n[10] ||= (t) => e.editor.chain().focus().toggleOrderedList().run()
486
+ }, null, 8, [
487
+ "icon",
488
+ "label",
489
+ "active"
490
+ ]),
491
+ x(Z),
492
+ x(X, {
493
+ icon: v(I),
494
+ label: v(g).paragraphEditor.alignLeft,
495
+ active: e.editor.isActive({ textAlign: "left" }),
496
+ onClick: n[11] ||= (t) => e.editor.chain().focus().setTextAlign("left").run()
497
+ }, null, 8, [
498
+ "icon",
499
+ "label",
500
+ "active"
501
+ ]),
502
+ x(X, {
503
+ icon: v(ie),
504
+ label: v(g).paragraphEditor.alignCenter,
505
+ active: e.editor.isActive({ textAlign: "center" }),
506
+ onClick: n[12] ||= (t) => e.editor.chain().focus().setTextAlign("center").run()
507
+ }, null, 8, [
508
+ "icon",
509
+ "label",
510
+ "active"
511
+ ]),
512
+ x(X, {
513
+ icon: v(re),
514
+ label: v(g).paragraphEditor.alignRight,
515
+ active: e.editor.isActive({ textAlign: "right" }),
516
+ onClick: n[13] ||= (t) => e.editor.chain().focus().setTextAlign("right").run()
517
+ }, null, 8, [
518
+ "icon",
519
+ "label",
520
+ "active"
521
+ ]),
522
+ x(Z),
523
+ x(Q, {
524
+ "model-value": N(),
525
+ options: v(B),
526
+ label: v(g).paragraphEditor.lineHeight,
527
+ placeholder: "LH",
528
+ "width-class": "tpl:w-16",
529
+ "onUpdate:modelValue": F
530
+ }, null, 8, [
531
+ "model-value",
532
+ "options",
533
+ "label"
534
+ ]),
535
+ x(Q, {
536
+ "model-value": C("letterSpacing"),
537
+ options: v(z),
538
+ label: v(g).paragraphEditor.letterSpacing,
539
+ placeholder: "LS",
540
+ "width-class": "tpl:w-20",
541
+ "onUpdate:modelValue": L
542
+ }, null, 8, [
543
+ "model-value",
544
+ "options",
545
+ "label"
546
+ ]),
547
+ x(Z),
548
+ x(X, {
549
+ icon: v(U),
550
+ label: v(g).paragraphEditor.clearFormatting,
551
+ onClick: n[14] ||= (t) => e.editor.chain().focus().clearNodes().unsetAllMarks().run()
552
+ }, null, 8, ["icon", "label"]),
553
+ x(Z),
554
+ x(le, { onInsert: S }),
555
+ e.canRequestMergeTag ? (a(), b(f, { key: 0 }, [x(Z), m("button", {
556
+ type: "button",
557
+ 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)]",
558
+ "aria-label": v(g).mergeTag.add,
559
+ title: v(g).mergeTag.add,
560
+ onClick: n[15] ||= (e) => o("add-merge-tag")
561
+ }, [x(v(ne), {
562
+ size: 16,
563
+ "stroke-width": 2
564
+ }), l(" " + i(v(g).mergeTag.add), 1)], 8, Ce)], 64)) : c("", !0)
565
+ ])], 64)) : (a(), b("div", we, [x(v(te), {
566
+ class: "tpl-spinner",
567
+ size: 14,
568
+ "stroke-width": 2
569
+ }), l(" " + i(v(g).errors.editorLoading), 1)]))], 12, _e)]));
570
+ }
571
+ }), Ee = { class: "tpl-text-editor-wrapper tpl:relative" }, De = /* @__PURE__ */ t({
572
+ __name: "ParagraphEditor",
573
+ props: {
574
+ block: {},
575
+ toolbarPosition: {}
576
+ },
577
+ emits: ["done"],
578
+ setup(e, { emit: t }) {
579
+ let n = e, r = t, { editor: i, EditorContent: o, isLoading: c, initError: l, retry: u, showLinkDialog: d, linkUrl: f, linkDialogRef: p, canRequestMergeTag: m, openLinkDialog: h, insertLink: g, removeLink: _, closeLinkDialog: y, handleLinkKeydown: S, handleAddMergeTag: C } = w({
580
+ blockId: () => n.block.id,
581
+ blockContent: () => n.block.content,
582
+ onDone: () => r("done"),
583
+ editorName: "ParagraphEditor",
584
+ async loadExtensions({ mergeTags: e, syntax: t, triggerChar: n, autocompleteEnabled: r, suggestionEmptyText: i }) {
585
+ let [{ Editor: a, EditorContent: o }, { default: s }, { default: c }, { default: l }, { default: u }, { default: d }, { default: f }, { TextStyle: p }, { default: m }, { default: h }, { default: g }, { MergeTagNode: _, MergeTagSuggestion: v, LogicMergeTagNode: y, FontSize: b, LineHeight: x, LetterSpacing: S }] = await Promise.all([
586
+ import("./dist-C9ckKEZL.js").then((e) => e.r),
587
+ import("./dist-Bz3M4RXG.js"),
588
+ import("./dist-C3T2AKtB.js"),
589
+ import("./dist-Dzt5foyL.js"),
590
+ import("./dist-BUzw1buG.js"),
591
+ import("./dist-BesOh2mk.js"),
592
+ import("./dist-CBItRG-Z.js"),
593
+ import("./dist-DtiDUrX-.js"),
594
+ import("./dist-BadNx4qo.js"),
595
+ import("./dist-COSzWQUs.js"),
596
+ import("./dist-BZyY-SS4.js"),
597
+ import("./extensions-D__hOlV1.js")
598
+ ]);
599
+ return {
600
+ TiptapEditor: a,
601
+ EC: o,
602
+ extensions: [
603
+ s.configure({
604
+ heading: !1,
605
+ codeBlock: !1,
606
+ blockquote: !1,
607
+ horizontalRule: !1
608
+ }),
609
+ l,
610
+ u,
611
+ d,
612
+ c.configure({
613
+ openOnClick: !1,
614
+ HTMLAttributes: {
615
+ target: "_blank",
616
+ rel: "noopener noreferrer"
617
+ }
618
+ }),
619
+ f.configure({ types: ["paragraph"] }),
620
+ p,
621
+ m,
622
+ h,
623
+ g.configure({ multicolor: !0 }),
624
+ b,
625
+ x,
626
+ S,
627
+ _.configure({
628
+ mergeTags: e,
629
+ syntax: t
630
+ }),
631
+ y.configure({ syntax: t }),
632
+ ...r && n && e.length > 0 ? [v.configure({
633
+ mergeTags: e,
634
+ char: n,
635
+ emptyText: i
636
+ })] : []
637
+ ]
638
+ };
639
+ }
640
+ });
641
+ return (t, n) => (a(), b("div", Ee, [
642
+ x(Te, {
643
+ editor: v(i),
644
+ "toolbar-position": e.toolbarPosition,
645
+ "is-loading": v(c),
646
+ "can-request-merge-tag": v(m),
647
+ onOpenLinkDialog: v(h),
648
+ onAddMergeTag: v(C)
649
+ }, null, 8, [
650
+ "editor",
651
+ "toolbar-position",
652
+ "is-loading",
653
+ "can-request-merge-tag",
654
+ "onOpenLinkDialog",
655
+ "onAddMergeTag"
656
+ ]),
657
+ x(F, {
658
+ editor: v(i),
659
+ "editor-content": v(o),
660
+ "is-loading": v(c),
661
+ "init-error": v(l),
662
+ onRetry: v(u)
663
+ }, null, 8, [
664
+ "editor",
665
+ "editor-content",
666
+ "is-loading",
667
+ "init-error",
668
+ "onRetry"
669
+ ]),
670
+ x(N, {
671
+ visible: v(d),
672
+ "is-editing-link": v(i)?.isActive("link") ?? !1,
673
+ "dialog-ref": v(p),
674
+ "onUpdate:dialogRef": n[0] ||= (e) => s(p) ? p.value = e : null,
675
+ "link-url": v(f),
676
+ "onUpdate:linkUrl": n[1] ||= (e) => s(f) ? f.value = e : null,
677
+ onClose: v(y),
678
+ onInsert: v(g),
679
+ onRemove: v(_),
680
+ onKeydown: v(S)
681
+ }, null, 8, [
682
+ "visible",
683
+ "is-editing-link",
684
+ "dialog-ref",
685
+ "link-url",
686
+ "onClose",
687
+ "onInsert",
688
+ "onRemove",
689
+ "onKeydown"
690
+ ])
691
+ ]));
692
+ }
693
+ });
694
+ //#endregion
695
+ export { De as default };