@templatical/editor 0.0.1 → 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 (130) hide show
  1. package/dist/AiChatSidebar-busJk9hm.js +214 -0
  2. package/dist/AiFeatureMenu-DLGv_-pj.js +63 -0
  3. package/dist/CloudEditor-BDnHd6Um.js +919 -0
  4. package/dist/CollaboratorBar-Dv3l52vC.js +91 -0
  5. package/dist/CommentsSidebar-4tjp0VU5.js +439 -0
  6. package/dist/DesignReferenceSidebar-CmwXvltV.js +273 -0
  7. package/dist/LoadingTrack-vK8W2PJf.js +10 -0
  8. package/dist/ModuleBrowserModal-lrk3Fr0H.js +205 -0
  9. package/dist/ModulePreviewCanvas-BcBJLnwL.js +106 -0
  10. package/dist/ParagraphEditor-DH8cSC6m.js +625 -0
  11. package/dist/RichTextEditorContent-CQqodi7p.js +133 -0
  12. package/dist/SaveModuleDialog-Bmzi72td.js +122 -0
  13. package/dist/SnapshotHistory-AEgi9Xsn.js +126 -0
  14. package/dist/TemplateScoringPanel-CTgMtc0-.js +249 -0
  15. package/dist/TestEmailModal-Dpq1is9S.js +94 -0
  16. package/dist/TitleEditor-CLcDdcWI.js +167 -0
  17. package/dist/TplModal-CGzRjR96.js +44 -0
  18. package/dist/_plugin-vue_export-helper-B1-bu7yR.js +47 -0
  19. package/dist/blockTypeIcons-BpPTqcok.js +126 -0
  20. package/dist/cdn/chunks/ParagraphEditor-CCtWbGDv.js +3 -0
  21. package/dist/cdn/chunks/ParagraphEditor-CCtWbGDv.js.map +1 -0
  22. package/dist/cdn/chunks/RichTextEditorContent-BUD9veXd.js +2 -0
  23. package/dist/cdn/chunks/RichTextEditorContent-BUD9veXd.js.map +1 -0
  24. package/dist/cdn/chunks/TitleEditor-e_UTyxjd.js +3 -0
  25. package/dist/cdn/chunks/TitleEditor-e_UTyxjd.js.map +1 -0
  26. package/dist/cdn/chunks/dist-0UheN8rK.js +1 -0
  27. package/dist/cdn/chunks/dist-55mmbGQ9.js +1 -0
  28. package/dist/cdn/chunks/dist-B31mxKyP.js +1 -0
  29. package/dist/cdn/chunks/dist-B5JI9nIg.js +1 -0
  30. package/dist/cdn/chunks/dist-B93vLKhU.js +1 -0
  31. package/dist/cdn/chunks/dist-BDt3FJvj.js +1 -0
  32. package/dist/cdn/chunks/dist-BJRuFHmi.js +1 -0
  33. package/dist/cdn/chunks/dist-BKSzrf0L.js +1 -0
  34. package/dist/cdn/chunks/dist-BL8c5gYQ.js +1 -0
  35. package/dist/cdn/chunks/dist-CYThWMP5.js +1 -0
  36. package/dist/cdn/chunks/dist-DxZbPJYt.js +1 -0
  37. package/dist/cdn/chunks/draggable-ClUwYCFL.js +17 -0
  38. package/dist/cdn/chunks/draggable-ClUwYCFL.js.map +1 -0
  39. package/dist/cdn/chunks/emojiData-6fVLNqeH.js +2 -0
  40. package/dist/cdn/chunks/emojiData-6fVLNqeH.js.map +1 -0
  41. package/dist/cdn/chunks/extensions-ea_ewKUl.js +2 -0
  42. package/dist/cdn/chunks/extensions-ea_ewKUl.js.map +1 -0
  43. package/dist/cdn/chunks/icons-vmLJTaJk.js +2 -0
  44. package/dist/cdn/chunks/icons-vmLJTaJk.js.map +1 -0
  45. package/dist/cdn/chunks/rolldown-runtime-BakkzWXw.js +1 -0
  46. package/dist/cdn/chunks/styleConstants-CNejCb-L.js +2 -0
  47. package/dist/cdn/chunks/styleConstants-CNejCb-L.js.map +1 -0
  48. package/dist/cdn/chunks/tiptap-Cya4P9CN.js +145 -0
  49. package/dist/cdn/chunks/tiptap-Cya4P9CN.js.map +1 -0
  50. package/dist/cdn/chunks/useEditorCore-CwuxQuvh.js +2 -0
  51. package/dist/cdn/chunks/useEditorCore-CwuxQuvh.js.map +1 -0
  52. package/dist/cdn/chunks/useMergeTag-DVOz1v9p.js +2 -0
  53. package/dist/cdn/chunks/useMergeTag-DVOz1v9p.js.map +1 -0
  54. package/dist/cdn/editor.css +1 -0
  55. package/dist/cdn/editor.js +2 -0
  56. package/dist/cdn/editor.js.map +1 -0
  57. package/dist/check-B7kDuZmP.js +7 -0
  58. package/dist/chevron-down-DJLW2Q9Z.js +7 -0
  59. package/dist/circle-alert-E2vYPs5r.js +25 -0
  60. package/dist/clock-lWIIQA3C.js +12 -0
  61. package/dist/de-B4Ob4vCo.js +682 -0
  62. package/dist/dist-4LiM9FDd.js +35 -0
  63. package/dist/dist-Bu7veieH.js +776 -0
  64. package/dist/dist-C1BIRHCQ.js +61 -0
  65. package/dist/dist-CG-vEqSU.js +314 -0
  66. package/dist/dist-C_ymrGFi.js +10625 -0
  67. package/dist/dist-ChAGLpWo.js +35 -0
  68. package/dist/dist-D_HQYSY-.js +189 -0
  69. package/dist/dist-DkypH7qG.js +5 -0
  70. package/dist/dist-DmOE-Ubp.js +74 -0
  71. package/dist/dist-DmpMJbmZ.js +513 -0
  72. package/dist/dist-DrvKRSU6.js +47 -0
  73. package/dist/dist-Dxnd0GRf.js +5 -0
  74. package/dist/dist-DysAFIPy.js +2054 -0
  75. package/dist/emojiData-BfWQS72m.js +17 -0
  76. package/dist/en-YXsspZJG.js +682 -0
  77. package/dist/extensions-CKM99njP.js +420 -0
  78. package/dist/formatRelativeTime-DX3FgqN9.js +8 -0
  79. package/dist/i18n-CJsFtdbZ.js +23 -0
  80. package/dist/image-up-X4xIq4ea.js +23 -0
  81. package/dist/keys-Dwa2PmdD.js +10 -0
  82. package/dist/liquid.browser-BemTg3sZ.js +3272 -0
  83. package/dist/loader-circle-BTQQxC3l.js +7 -0
  84. package/dist/message-circle-Blgm6V_h.js +7 -0
  85. package/dist/refresh-cw-Bb4PEeW1.js +44 -0
  86. package/dist/scan-line-7lZPfOdm.js +25 -0
  87. package/dist/send-C0ltAQrv.js +10 -0
  88. package/dist/shield-check-f-qv4RKs.js +10 -0
  89. package/dist/sparkles-KhBCGlqB.js +23 -0
  90. package/dist/styleConstants-D4SOZGBV.js +94 -0
  91. package/dist/styles-DSw1VNU3.js +3406 -0
  92. package/dist/templatical-editor.css +2 -1
  93. package/dist/templatical-editor.js +242 -9
  94. package/dist/templatical-editor.umd.cjs +112 -524
  95. package/dist/timeouts-CmBrLeZA.js +4 -0
  96. package/dist/trash-2-OwjZ-guZ.js +25 -0
  97. package/dist/triangle-alert-DOSRIUYZ.js +17 -0
  98. package/dist/useEditorCore-Cc4RCwWq.js +5556 -0
  99. package/dist/useI18n-DUirdXEX.js +17 -0
  100. package/dist/useMergeTag-DVnlvPYJ.js +33 -0
  101. package/dist/x-CGlq2XQe.js +10 -0
  102. package/package.json +30 -20
  103. package/dist/AiChatSidebar-0vx9TP5B.js +0 -305
  104. package/dist/AiFeatureMenu-CI-v74ND.js +0 -69
  105. package/dist/CloudEditor-Wdfv_9xn.js +0 -1132
  106. package/dist/CollaboratorBar-B3uV4Wtw.js +0 -89
  107. package/dist/CommentsSidebar-PVUlloyB.js +0 -655
  108. package/dist/DesignReferenceSidebar-DAlAWrxU.js +0 -351
  109. package/dist/ModuleBrowserModal-1JEcChd8.js +0 -323
  110. package/dist/ModulePreviewCanvas-Cdp484Ae.js +0 -169
  111. package/dist/SaveModuleDialog-eNyr3XKn.js +0 -168
  112. package/dist/SnapshotHistory-D-ZiIj1v.js +0 -169
  113. package/dist/TemplateScoringPanel-DSZPo15C.js +0 -385
  114. package/dist/TestEmailModal-Cwre5elw.js +0 -128
  115. package/dist/TextEditor-BuUOIByX.js +0 -780
  116. package/dist/de-BWIAblxs.js +0 -685
  117. package/dist/en-cYyUzNV1.js +0 -685
  118. package/dist/index-0tWUczNu.js +0 -47
  119. package/dist/index-4okvXjqk.js +0 -41
  120. package/dist/index-BSc6h5zo.js +0 -967
  121. package/dist/index-CrvwWlhN.js +0 -41
  122. package/dist/index-D-iD-7lO.js +0 -10961
  123. package/dist/index-D-ygXbc8.js +0 -2452
  124. package/dist/index-DbrWKz-e.js +0 -1415
  125. package/dist/index-DeUeHy6g.js +0 -422
  126. package/dist/index-Ude6e9RU.js +0 -41
  127. package/dist/index-ZQzHBwkr.js +0 -12767
  128. package/dist/liquid.browser-CeNxS2GL.js +0 -3493
  129. package/dist/loader-circle-tM9j2mRh.js +0 -13
  130. package/dist/shield-check-Ngi9jAQc.js +0 -20
@@ -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 };