@templatical/editor 0.0.4 → 0.0.6

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