@templatical/editor 0.6.4 → 0.6.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 (128) hide show
  1. package/dist/{AccessibilityPanel-CvQGLdu6.js → AccessibilityPanel-B2MT0M58.js} +34 -34
  2. package/dist/{AiChatSidebar-B3SJIKG_.js → AiChatSidebar-w5ek3Z76.js} +62 -62
  3. package/dist/{AiFeatureMenu-BLLKoOos.js → AiFeatureMenu-ChlAWywJ.js} +20 -20
  4. package/dist/{BlockA11yBadge-CXDLqkcJ.js → BlockA11yBadge-C0S6kPC4.js} +12 -12
  5. package/dist/{CloudEditor-nzrRhHIi.js → CloudEditor-DYYaScFe.js} +441 -441
  6. package/dist/{CollaboratorBar-DuPYW5iF.js → CollaboratorBar-Bo8vtPId.js} +20 -20
  7. package/dist/CommentsSidebar-BQROg36f.js +441 -0
  8. package/dist/{cdn/chunks/CountdownBlock-5YdT1uUu.js → CountdownBlock-Bxqe7zwL.js} +21 -22
  9. package/dist/CountdownToolbar-CpFAnjSo.js +210 -0
  10. package/dist/{DesignReferenceSidebar-B8V_F2yF.js → DesignReferenceSidebar-CfqpcWX6.js} +52 -52
  11. package/dist/{LoadingTrack-B0CWFHXQ.js → LoadingTrack-CFkDkjBb.js} +1 -1
  12. package/dist/{ModuleBrowserModal-DrUFMTDx.js → ModuleBrowserModal-CKhsaPnA.js} +79 -79
  13. package/dist/{ModulePreviewCanvas-CHdOwV_4.js → ModulePreviewCanvas-Cw9GeGus.js} +29 -29
  14. package/dist/{NumberWithSuffix-DkXUez9t.js → NumberWithSuffix-Dw8dN1Pt.js} +88 -88
  15. package/dist/{ParagraphEditor-D75wl3BX.js → ParagraphEditor-DjDiUzmv.js} +218 -218
  16. package/dist/{RichTextEditorContent-DYkIauIk.js → RichTextEditorContent-CK3Om7ES.js} +38 -38
  17. package/dist/{SaveModuleDialog-FZ9lxY7_.js → SaveModuleDialog-CSUPmfRP.js} +34 -34
  18. package/dist/{SnapshotHistory-BR3eV120.js → SnapshotHistory-DwX2fj6N.js} +33 -33
  19. package/dist/{TemplateScoringPanel-4GTNHej5.js → TemplateScoringPanel-BIAeCAEP.js} +82 -82
  20. package/dist/{TestEmailModal--ue5w9fT.js → TestEmailModal-CIlBvWWn.js} +30 -30
  21. package/dist/{TitleEditor-fStSADI-.js → TitleEditor-BCV5k6wj.js} +67 -67
  22. package/dist/{TplModal-BwSfxIHf.js → TplModal-C3Hq9b58.js} +14 -14
  23. package/dist/{accessibility-e8JYu_zd.js → accessibility-BgUEA-Ai.js} +1 -1
  24. package/dist/{blockTypeIcons-BcTrDjmH.js → blockTypeIcons-iUurP50H.js} +2 -2
  25. package/dist/bundle-stats.json +6 -6
  26. package/dist/cdn/chunks/{AccessibilityPanel-B6DOjojm.js → AccessibilityPanel-AQD2ygU6.js} +34 -34
  27. package/dist/cdn/chunks/{AccessibilityPanel-B6DOjojm.js.map → AccessibilityPanel-AQD2ygU6.js.map} +1 -1
  28. package/dist/cdn/chunks/{AiFeatureMenu-qEdB2fZJ.js → AiFeatureMenu-CDh9ifC8.js} +16 -16
  29. package/dist/cdn/chunks/{AiFeatureMenu-qEdB2fZJ.js.map → AiFeatureMenu-CDh9ifC8.js.map} +1 -1
  30. package/dist/cdn/chunks/{BlockA11yBadge-DcEZftf6.js → BlockA11yBadge-BxZr3s7T.js} +10 -10
  31. package/dist/cdn/chunks/{BlockA11yBadge-DcEZftf6.js.map → BlockA11yBadge-BxZr3s7T.js.map} +1 -1
  32. package/dist/cdn/chunks/{CloudEditor-dwzWDF_n.js → CloudEditor-Fg7pQ9IQ.js} +425 -425
  33. package/dist/cdn/chunks/{CloudEditor-dwzWDF_n.js.map → CloudEditor-Fg7pQ9IQ.js.map} +1 -1
  34. package/dist/cdn/chunks/{CollaboratorBar--nO7TX6b.js → CollaboratorBar-B5a8eBXN.js} +20 -20
  35. package/dist/cdn/chunks/{CollaboratorBar--nO7TX6b.js.map → CollaboratorBar-B5a8eBXN.js.map} +1 -1
  36. package/dist/cdn/chunks/CountdownBlock-BeHkO19t.js +93 -0
  37. package/dist/cdn/chunks/{CountdownBlock-5YdT1uUu.js.map → CountdownBlock-BeHkO19t.js.map} +1 -1
  38. package/dist/cdn/chunks/CountdownToolbar-8UfW0jb1.js +212 -0
  39. package/dist/cdn/chunks/{CountdownToolbar-DXPXrbAA.js.map → CountdownToolbar-8UfW0jb1.js.map} +1 -1
  40. package/dist/cdn/chunks/{ModuleBrowserModal-DxoPp81s.js → ModuleBrowserModal-BMUyAmmj.js} +43 -43
  41. package/dist/cdn/chunks/{ModuleBrowserModal-DxoPp81s.js.map → ModuleBrowserModal-BMUyAmmj.js.map} +1 -1
  42. package/dist/cdn/chunks/{ModulePreviewCanvas-CoLdb4ar.js → ModulePreviewCanvas-CxSc7Pvd.js} +23 -23
  43. package/dist/cdn/chunks/{ModulePreviewCanvas-CoLdb4ar.js.map → ModulePreviewCanvas-CxSc7Pvd.js.map} +1 -1
  44. package/dist/cdn/chunks/{NumberWithSuffix-CE3NrZhH.js → NumberWithSuffix-BSOUOUCL.js} +108 -108
  45. package/dist/cdn/chunks/{NumberWithSuffix-CE3NrZhH.js.map → NumberWithSuffix-BSOUOUCL.js.map} +1 -1
  46. package/dist/cdn/chunks/{ParagraphEditor-B6Ygu-Mq.js → ParagraphEditor-S1bpgxe5.js} +187 -187
  47. package/dist/cdn/chunks/{ParagraphEditor-B6Ygu-Mq.js.map → ParagraphEditor-S1bpgxe5.js.map} +1 -1
  48. package/dist/cdn/chunks/{RichTextEditorContent-DL_y2SrR.js → RichTextEditorContent-ByehRfEA.js} +33 -33
  49. package/dist/cdn/chunks/{RichTextEditorContent-DL_y2SrR.js.map → RichTextEditorContent-ByehRfEA.js.map} +1 -1
  50. package/dist/cdn/chunks/{SaveModuleDialog-B0TnO_o9.js → SaveModuleDialog-5CNMvgYL.js} +27 -27
  51. package/dist/cdn/chunks/{SaveModuleDialog-B0TnO_o9.js.map → SaveModuleDialog-5CNMvgYL.js.map} +1 -1
  52. package/dist/cdn/chunks/{TitleEditor-BHpfxvwy.js → TitleEditor-BASWPsCM.js} +66 -66
  53. package/dist/cdn/chunks/{TitleEditor-BHpfxvwy.js.map → TitleEditor-BASWPsCM.js.map} +1 -1
  54. package/dist/cdn/chunks/{blockTypeIcons-BzzY9_kA.js → blockTypeIcons-DfOffaYP.js} +3 -3
  55. package/dist/cdn/chunks/{blockTypeIcons-BzzY9_kA.js.map → blockTypeIcons-DfOffaYP.js.map} +1 -1
  56. package/dist/cdn/chunks/draggable-CNhyCGIO.js +4804 -0
  57. package/dist/cdn/chunks/draggable-CNhyCGIO.js.map +1 -0
  58. package/dist/cdn/chunks/{extensions-DIxF31tA.js → extensions-BJOV1jre.js} +95 -95
  59. package/dist/cdn/chunks/{extensions-DIxF31tA.js.map → extensions-BJOV1jre.js.map} +1 -1
  60. package/dist/cdn/chunks/{features-DEMb13KS.js → features-D6FoOm8v.js} +2272 -2269
  61. package/dist/cdn/chunks/features-D6FoOm8v.js.map +1 -0
  62. package/dist/cdn/chunks/{icons-CsLTcirh.js → icons-CpsjWPU-.js} +2 -2
  63. package/dist/cdn/chunks/{icons-CsLTcirh.js.map → icons-CpsjWPU-.js.map} +1 -1
  64. package/dist/cdn/chunks/{media-library-CVaNvhpM.js → media-library-CEd7Lqxk.js} +1397 -1397
  65. package/dist/cdn/chunks/{media-library-CVaNvhpM.js.map → media-library-CEd7Lqxk.js.map} +1 -1
  66. package/dist/cdn/chunks/{pusher-CDbNlZBE.js → pusher-bjpcqCZG.js} +2 -2
  67. package/dist/cdn/chunks/{pusher-CDbNlZBE.js.map → pusher-bjpcqCZG.js.map} +1 -1
  68. package/dist/cdn/chunks/{quality-BaBfc54_.js → quality-Bx1oORXQ.js} +3 -3
  69. package/dist/cdn/chunks/{quality-BaBfc54_.js.map → quality-Bx1oORXQ.js.map} +1 -1
  70. package/dist/cdn/chunks/{renderer-CUxvx7ro.js → renderer-CwxCisa-.js} +3 -3
  71. package/dist/cdn/chunks/{renderer-CUxvx7ro.js.map → renderer-CwxCisa-.js.map} +1 -1
  72. package/dist/{rolldown-runtime-BZGGJVDF.js → cdn/chunks/rolldown-runtime-C266TIVP.js} +5 -5
  73. package/dist/cdn/chunks/{src-CRaqN-p8.js → src-DDSInEkE.js} +171 -171
  74. package/dist/cdn/chunks/{src-CRaqN-p8.js.map → src-DDSInEkE.js.map} +1 -1
  75. package/dist/cdn/chunks/styles-B1uu-Cc9.js +2944 -0
  76. package/dist/cdn/chunks/styles-B1uu-Cc9.js.map +1 -0
  77. package/dist/cdn/chunks/{tiptap-ZhwKyFp7.js → tiptap-IyIsncxY.js} +45 -46
  78. package/dist/cdn/chunks/{tiptap-ZhwKyFp7.js.map → tiptap-IyIsncxY.js.map} +1 -1
  79. package/dist/cdn/editor.css +1 -1
  80. package/dist/cdn/editor.js +122 -122
  81. package/dist/cdn/editor.js.map +1 -1
  82. package/dist/{check-Da05j8yl.js → check-Bg5yrRmX.js} +1 -1
  83. package/dist/{chevron-down-R2uY34iD.js → chevron-down-tee-ghFi.js} +1 -1
  84. package/dist/{circle-alert-DZuGWPX-.js → circle-alert-C0L9pUQ4.js} +1 -1
  85. package/dist/{clock-CRp2sIub.js → clock-CDlEdqiP.js} +1 -1
  86. package/dist/{cloud-DEk_b4CR.js → cloud-a3VovHva.js} +145 -145
  87. package/dist/{createLucideIcon-C3pa2siy.js → createLucideIcon-Di4mqmGn.js} +9 -9
  88. package/dist/{dist-B1IR0bpH.js → dist-BzRLLpfq.js} +107 -107
  89. package/dist/{dist-BFawx6IS.js → dist-Pk4MhWMP.js} +35 -35
  90. package/dist/{extensions-CUcl9Ok4.js → extensions-BF39Siqk.js} +103 -103
  91. package/dist/{image-up-MBZKKg9p.js → image-up-1D_3XDdO.js} +1 -1
  92. package/dist/index.d.ts +8 -8
  93. package/dist/{info-CJEC7piy.js → info-DTGrc0Bx.js} +1 -1
  94. package/dist/{keys-ciNfSSGj.js → keys-Bqs_0du9.js} +1 -1
  95. package/dist/{loader-circle-DsY5Yg33.js → loader-circle-_9bP23op.js} +1 -1
  96. package/dist/{message-circle-yElBbR2C.js → message-circle-gzy2ZGJ3.js} +1 -1
  97. package/dist/{refresh-cw-CE_AGtn8.js → refresh-cw-BNAhAmtL.js} +1 -1
  98. package/dist/rolldown-runtime-CAFD8bLK.js +11 -0
  99. package/dist/{scan-line-D0vcUekt.js → scan-line-DUEg6DoT.js} +1 -1
  100. package/dist/{send-DH4oDQqC.js → send-BatIZC9a.js} +1 -1
  101. package/dist/{shield-check-CfJgs2Hd.js → shield-check-C5Gv2cM1.js} +1 -1
  102. package/dist/{sparkles-CvRXGqFs.js → sparkles-D1IGi_cC.js} +1 -1
  103. package/dist/style.css +1 -1
  104. package/dist/styles-BgmKdc2x.js +3173 -0
  105. package/dist/templatical-editor.js +99 -99
  106. package/dist/{text-align-start-BT9VUDxK.js → text-align-start-DG3aAH7Y.js} +1 -1
  107. package/dist/{trash-2-DbP2Y6t2.js → trash-2-424iqbpN.js} +1 -1
  108. package/dist/{triangle-alert-aOXceTSe.js → triangle-alert-DWQySIE2.js} +1 -1
  109. package/dist/{useCloudI18n-BuIwR6OE.js → useCloudI18n-CL_AwWwi.js} +4 -4
  110. package/dist/useEditorCore-CnXrv71D.js +3794 -0
  111. package/dist/{useI18n-lb2DHDiu.js → useI18n-CgmQftNf.js} +4 -4
  112. package/dist/{useMergeTag-CBwKnnNB.js → useMergeTag-vpwrZ9eQ.js} +3 -3
  113. package/dist/vue.runtime.esm-bundler-Bxqkjqhc.js +4300 -0
  114. package/dist/{x-u2oVmjN_.js → x-Dlaenqta.js} +1 -1
  115. package/package.json +8 -8
  116. package/dist/CommentsSidebar-B1pvJdqF.js +0 -441
  117. package/dist/CountdownBlock-BNSj1jvJ.js +0 -92
  118. package/dist/CountdownToolbar-ClJr2GzL.js +0 -210
  119. package/dist/cdn/chunks/CountdownToolbar-DXPXrbAA.js +0 -212
  120. package/dist/cdn/chunks/draggable-Bcb86AsV.js +0 -11572
  121. package/dist/cdn/chunks/draggable-Bcb86AsV.js.map +0 -1
  122. package/dist/cdn/chunks/features-DEMb13KS.js.map +0 -1
  123. package/dist/cdn/chunks/rolldown-runtime-BNuo_Jkg.js +0 -20
  124. package/dist/cdn/chunks/styles-BHJULjNR.js +0 -2947
  125. package/dist/cdn/chunks/styles-BHJULjNR.js.map +0 -1
  126. package/dist/styles-DEXEkBvg.js +0 -3176
  127. package/dist/useEditorCore-C6ost42Q.js +0 -9342
  128. package/dist/vue.runtime.esm-bundler-DpvJL-nX.js +0 -5775
@@ -1,6 +1,6 @@
1
- import { $ as e, F as t, H as n, N as r, S as i, U as a, _ as o, at as s, ct as c, d as l, g as u, h as d, k as f, l as p, lt as m, m as h, p as g, r as _, s as v, st as y, u as b, w as x } from "./draggable-Bcb86AsV.js";
2
- import { Nt as S, Z as C, fn as w, gn as T, hn as E, mn as D } from "./features-DEMb13KS.js";
3
- import { _ as O, g as k, h as A, n as j, r as M, t as N, v as P, y as F } from "./tiptap-ZhwKyFp7.js";
1
+ import { C as e, H as t, M as n, O as r, P as i, V as a, Z as o, at as s, c, f as l, g as u, h as d, l as f, m as p, o as m, ot as h, p as g, r as _, rt as v, st as y, u as b, x } from "./draggable-CNhyCGIO.js";
2
+ import { Nt as S, Z as C, fn as w, gn as T, hn as E, mn as D } from "./features-D6FoOm8v.js";
3
+ import { _ as O, g as k, h as A, n as j, r as M, t as N, v as P, y as F } from "./tiptap-IyIsncxY.js";
4
4
  //#region src/extensions/FontSize.ts
5
5
  var I = A.create({
6
6
  name: "fontSize",
@@ -72,7 +72,7 @@ var I = A.create({
72
72
  "aria-label",
73
73
  "data-tooltip",
74
74
  "onKeydown"
75
- ], te = ["aria-label", "onKeydown"], ne = ["aria-label"], z = /* @__PURE__ */ i({
75
+ ], te = ["aria-label", "onKeydown"], ne = ["aria-label"], z = /* @__PURE__ */ x({
76
76
  __name: "LogicMergeTagNodeView",
77
77
  props: {
78
78
  node: {},
@@ -81,10 +81,10 @@ var I = A.create({
81
81
  deleteNode: { type: Function },
82
82
  updateAttributes: { type: Function }
83
83
  },
84
- setup(t) {
85
- let i = t, { syntax: l } = C(), { t: _ } = S(), x = g(() => T(i.node.attrs.value, l)), w = g(() => D(i.node.attrs.value, l)), E = e(!1), O = e(""), k = e(null), A = !1;
84
+ setup(e) {
85
+ let i = e, { syntax: _ } = C(), { t: b } = S(), x = l(() => T(i.node.attrs.value, _)), w = l(() => D(i.node.attrs.value, _)), E = o(!1), O = o(""), k = o(null), A = !1;
86
86
  function M() {
87
- O.value = i.node.attrs.value, A = !1, E.value = !0, f(() => {
87
+ O.value = i.node.attrs.value, A = !1, E.value = !0, r(() => {
88
88
  k.value?.focus(), k.value?.select();
89
89
  });
90
90
  }
@@ -98,19 +98,19 @@ var I = A.create({
98
98
  }
99
99
  e !== i.node.attrs.value && i.updateAttributes({
100
100
  value: e,
101
- keyword: T(e, l) ? D(e, l) : ""
101
+ keyword: T(e, _) ? D(e, _) : ""
102
102
  }), E.value = !1;
103
103
  }
104
104
  function P(e) {
105
105
  e.key === "Enter" ? (e.preventDefault(), N()) : e.key === "Escape" && (E.value = !1);
106
106
  }
107
- return (e, i) => (r(), d(s(j), {
107
+ return (r, i) => (n(), p(v(j), {
108
108
  as: "span",
109
- class: y(x.value ? "tpl-logic-merge-tag-node tpl:group tpl:mx-0.5 tpl:inline-flex tpl:items-center tpl:gap-1 tpl:rounded tpl:px-1.5 tpl:py-0.5 tpl:text-[0.8em] tpl:font-bold tpl:tracking-wide tpl:uppercase tpl:select-none" : ""),
110
- style: c(x.value ? "background-color: transparent; border: 1.5px solid color-mix(in srgb, var(--tpl-primary) 50%, transparent); color: var(--tpl-primary);" : ""),
109
+ class: s(x.value ? "tpl-logic-merge-tag-node tpl:group tpl:mx-0.5 tpl:inline-flex tpl:items-center tpl:gap-1 tpl:rounded tpl:px-1.5 tpl:py-0.5 tpl:text-[0.8em] tpl:font-bold tpl:tracking-wide tpl:uppercase tpl:select-none" : ""),
110
+ style: h(x.value ? "background-color: transparent; border: 1.5px solid color-mix(in srgb, var(--tpl-primary) 50%, transparent); color: var(--tpl-primary);" : ""),
111
111
  contenteditable: "false"
112
112
  }, {
113
- default: n(() => [E.value ? a((r(), o("input", {
113
+ default: a(() => [E.value ? t((n(), u("input", {
114
114
  key: 0,
115
115
  ref_key: "inputRef",
116
116
  ref: k,
@@ -119,30 +119,30 @@ var I = A.create({
119
119
  class: "tpl:w-40 tpl:rounded tpl:border-none tpl:bg-transparent tpl:px-0.5 tpl:py-0 tpl:text-[1em] tpl:font-medium tpl:normal-case tpl:outline-none tpl:text-[var(--tpl-primary)]",
120
120
  onBlur: N,
121
121
  onKeydown: P
122
- }, null, 544)), [[v, O.value]]) : x.value ? (r(), o("span", {
122
+ }, null, 544)), [[m, O.value]]) : x.value ? (n(), u("span", {
123
123
  key: 1,
124
124
  role: "button",
125
125
  tabindex: "0",
126
- "aria-label": s(_).mergeTag.editValue,
126
+ "aria-label": v(b).mergeTag.editValue,
127
127
  class: "tpl-tooltip tpl:cursor-pointer",
128
- "data-tooltip": t.node.attrs.value,
129
- onClick: b(M, ["stop"]),
130
- onKeydown: [p(b(M, ["stop"]), ["enter"]), p(b(M, ["prevent", "stop"]), ["space"])]
131
- }, m(w.value), 41, ee)) : (r(), o("span", {
128
+ "data-tooltip": e.node.attrs.value,
129
+ onClick: f(M, ["stop"]),
130
+ onKeydown: [c(f(M, ["stop"]), ["enter"]), c(f(M, ["prevent", "stop"]), ["space"])]
131
+ }, y(w.value), 41, ee)) : (n(), u("span", {
132
132
  key: 2,
133
133
  role: "button",
134
134
  tabindex: "0",
135
- "aria-label": s(_).mergeTag.editValue,
136
- onClick: b(M, ["stop"]),
137
- onKeydown: [p(b(M, ["stop"]), ["enter"]), p(b(M, ["prevent", "stop"]), ["space"])]
138
- }, m(t.node.attrs.value), 41, te)), x.value ? (r(), o("button", {
135
+ "aria-label": v(b).mergeTag.editValue,
136
+ onClick: f(M, ["stop"]),
137
+ onKeydown: [c(f(M, ["stop"]), ["enter"]), c(f(M, ["prevent", "stop"]), ["space"])]
138
+ }, y(e.node.attrs.value), 41, te)), x.value ? (n(), u("button", {
139
139
  key: 3,
140
140
  type: "button",
141
- "aria-label": s(_).mergeTag.deleteMergeTag,
141
+ "aria-label": v(b).mergeTag.deleteMergeTag,
142
142
  class: "tpl-merge-tag-delete tpl:flex tpl:size-5 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-full tpl:border-none tpl:bg-transparent tpl:p-0 tpl:opacity-60 tpl:transition-all hover:tpl:opacity-100 tpl:text-[var(--tpl-primary)]",
143
143
  contenteditable: "false",
144
- onClick: i[1] ||= b((...e) => t.deleteNode && t.deleteNode(...e), ["stop", "prevent"])
145
- }, [...i[2] ||= [h("svg", {
144
+ onClick: i[1] ||= f((...t) => e.deleteNode && e.deleteNode(...t), ["stop", "prevent"])
145
+ }, [...i[2] ||= [g("svg", {
146
146
  width: "10",
147
147
  height: "10",
148
148
  viewBox: "0 0 24 24",
@@ -150,17 +150,17 @@ var I = A.create({
150
150
  stroke: "currentColor",
151
151
  "stroke-width": "3",
152
152
  "aria-hidden": "true"
153
- }, [h("line", {
153
+ }, [g("line", {
154
154
  x1: "18",
155
155
  y1: "6",
156
156
  x2: "6",
157
157
  y2: "18"
158
- }), h("line", {
158
+ }), g("line", {
159
159
  x1: "6",
160
160
  y1: "6",
161
161
  x2: "18",
162
162
  y2: "18"
163
- })], -1)]], 8, ne)) : u("", !0)]),
163
+ })], -1)]], 8, ne)) : d("", !0)]),
164
164
  _: 1
165
165
  }, 8, ["class", "style"]));
166
166
  }
@@ -260,61 +260,61 @@ var H = O.create({
260
260
  "aria-label",
261
261
  "data-tooltip",
262
262
  "onKeydown"
263
- ], W = ["aria-label"], G = /* @__PURE__ */ i({
263
+ ], W = ["aria-label"], G = /* @__PURE__ */ x({
264
264
  __name: "MergeTagNodeView",
265
265
  props: {
266
266
  node: {},
267
267
  deleteNode: { type: Function },
268
268
  updateAttributes: { type: Function }
269
269
  },
270
- setup(t) {
271
- let i = t, { getMergeTagLabel: c } = C(), { t: l } = S(), u = g(() => c(i.node.attrs.value)), _ = e(!1), y = e(""), x = e(null);
270
+ setup(e) {
271
+ let i = e, { getMergeTagLabel: s } = C(), { t: d } = S(), h = l(() => s(i.node.attrs.value)), _ = o(!1), b = o(""), x = o(null);
272
272
  function w() {
273
- y.value = i.node.attrs.value, _.value = !0, f(() => {
273
+ b.value = i.node.attrs.value, _.value = !0, r(() => {
274
274
  x.value?.focus(), x.value?.select();
275
275
  });
276
276
  }
277
277
  function T() {
278
- let e = y.value.trim();
278
+ let e = b.value.trim();
279
279
  e && e !== i.node.attrs.value && i.updateAttributes({
280
280
  value: e,
281
- label: c(e)
281
+ label: s(e)
282
282
  }), _.value = !1;
283
283
  }
284
284
  function E(e) {
285
285
  e.key === "Enter" ? (e.preventDefault(), T()) : e.key === "Escape" && (_.value = !1);
286
286
  }
287
- return (e, i) => (r(), d(s(j), {
287
+ return (r, i) => (n(), p(v(j), {
288
288
  as: "span",
289
289
  class: "tpl-merge-tag-node tpl:group tpl:mx-0.5 tpl:inline-flex tpl:items-center tpl:gap-1 tpl:rounded tpl:px-1.5 tpl:py-0.5 tpl:text-[0.9em] tpl:font-medium tpl:select-none tpl:text-[var(--tpl-primary)]",
290
290
  style: { "background-color": "color-mix(in srgb, var(--tpl-primary) 20%, transparent)" },
291
291
  contenteditable: "false"
292
292
  }, {
293
- default: n(() => [_.value ? a((r(), o("input", {
293
+ default: a(() => [_.value ? t((n(), u("input", {
294
294
  key: 0,
295
295
  ref_key: "inputRef",
296
296
  ref: x,
297
- "onUpdate:modelValue": i[0] ||= (e) => y.value = e,
297
+ "onUpdate:modelValue": i[0] ||= (e) => b.value = e,
298
298
  type: "text",
299
299
  class: "tpl:w-32 tpl:rounded tpl:border-none tpl:bg-transparent tpl:px-0.5 tpl:py-0 tpl:text-[1em] tpl:font-medium tpl:outline-none tpl:text-[var(--tpl-primary)]",
300
300
  onBlur: T,
301
301
  onKeydown: E
302
- }, null, 544)), [[v, y.value]]) : (r(), o("span", {
302
+ }, null, 544)), [[m, b.value]]) : (n(), u("span", {
303
303
  key: 1,
304
304
  role: "button",
305
305
  tabindex: "0",
306
- "aria-label": s(l).mergeTag.editValue,
306
+ "aria-label": v(d).mergeTag.editValue,
307
307
  class: "tpl-tooltip tpl:cursor-pointer",
308
- "data-tooltip": t.node.attrs.value,
309
- onClick: b(w, ["stop"]),
310
- onKeydown: [p(b(w, ["stop"]), ["enter"]), p(b(w, ["prevent", "stop"]), ["space"])]
311
- }, m(u.value), 41, U)), h("button", {
308
+ "data-tooltip": e.node.attrs.value,
309
+ onClick: f(w, ["stop"]),
310
+ onKeydown: [c(f(w, ["stop"]), ["enter"]), c(f(w, ["prevent", "stop"]), ["space"])]
311
+ }, y(h.value), 41, U)), g("button", {
312
312
  type: "button",
313
- "aria-label": s(l).mergeTag.deleteMergeTag,
313
+ "aria-label": v(d).mergeTag.deleteMergeTag,
314
314
  class: "tpl-merge-tag-delete tpl:flex tpl:size-5 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-full tpl:border-none tpl:bg-transparent tpl:p-0 tpl:opacity-60 tpl:transition-all hover:tpl:opacity-100 tpl:text-[var(--tpl-primary)]",
315
315
  contenteditable: "false",
316
- onClick: i[1] ||= b((...e) => t.deleteNode && t.deleteNode(...e), ["stop", "prevent"])
317
- }, [...i[2] ||= [h("svg", {
316
+ onClick: i[1] ||= f((...t) => e.deleteNode && e.deleteNode(...t), ["stop", "prevent"])
317
+ }, [...i[2] ||= [g("svg", {
318
318
  width: "10",
319
319
  height: "10",
320
320
  viewBox: "0 0 24 24",
@@ -322,12 +322,12 @@ var H = O.create({
322
322
  stroke: "currentColor",
323
323
  "stroke-width": "3",
324
324
  "aria-hidden": "true"
325
- }, [h("line", {
325
+ }, [g("line", {
326
326
  x1: "18",
327
327
  y1: "6",
328
328
  x2: "6",
329
329
  y2: "18"
330
- }), h("line", {
330
+ }), g("line", {
331
331
  x1: "6",
332
332
  y1: "6",
333
333
  x2: "18",
@@ -423,7 +423,7 @@ var H = O.create({
423
423
  "data-merge-tag-value",
424
424
  "onMousedown",
425
425
  "onMousemove"
426
- ], X = { class: "tpl:font-medium" }, re = { class: "tpl:text-[var(--tpl-text-dim)] tpl:font-mono" }, ie = /* @__PURE__ */ i({
426
+ ], X = { class: "tpl:font-medium" }, re = { class: "tpl:text-[var(--tpl-text-dim)] tpl:font-mono" }, ie = /* @__PURE__ */ x({
427
427
  __name: "MergeTagSuggestionList",
428
428
  props: {
429
429
  items: {},
@@ -433,27 +433,27 @@ var H = O.create({
433
433
  },
434
434
  emits: ["select", "hover"],
435
435
  setup(e) {
436
- let n = e;
437
- function i(e) {
438
- return n.listId ? `${n.listId}-opt-${e}` : void 0;
436
+ let t = e;
437
+ function r(e) {
438
+ return t.listId ? `${t.listId}-opt-${e}` : void 0;
439
439
  }
440
- return (n, a) => (r(), o("div", {
440
+ return (t, a) => (n(), u("div", {
441
441
  id: e.listId,
442
442
  class: "tpl:min-w-[200px] tpl:max-w-[320px] tpl:max-h-[50vh] tpl:overflow-y-auto tpl:rounded-[var(--tpl-radius)] tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-elevated)] tpl:py-1 tpl:shadow-lg",
443
443
  role: "listbox",
444
444
  "data-testid": "merge-tag-suggestion-list"
445
- }, [e.items.length === 0 ? (r(), o("div", J, m(e.emptyText), 1)) : u("", !0), (r(!0), o(l, null, t(e.items, (t, a) => (r(), o("button", {
446
- key: t.value,
447
- id: i(a),
445
+ }, [e.items.length === 0 ? (n(), u("div", J, y(e.emptyText), 1)) : d("", !0), (n(!0), u(b, null, i(e.items, (i, a) => (n(), u("button", {
446
+ key: i.value,
447
+ id: r(a),
448
448
  type: "button",
449
449
  role: "option",
450
450
  "aria-selected": a === e.selectedIndex,
451
451
  "data-selected": a === e.selectedIndex ? "true" : "false",
452
- "data-merge-tag-value": t.value,
453
- class: y(["tpl:flex tpl:w-full tpl:flex-col tpl:items-start tpl:gap-0.5 tpl:px-3 tpl:py-1.5 tpl:text-left tpl:text-xs tpl:transition-colors", a === e.selectedIndex ? "tpl:bg-[var(--tpl-primary-light)] tpl:text-[var(--tpl-primary)]" : "tpl:text-[var(--tpl-text)] hover:tpl:bg-[var(--tpl-bg-hover)]"]),
454
- onMousedown: b((e) => n.$emit("select", t), ["prevent", "stop"]),
455
- onMousemove: (t) => a !== e.selectedIndex && n.$emit("hover", a)
456
- }, [h("span", X, m(t.label), 1), h("span", re, m(t.value), 1)], 42, Y))), 128))], 8, q));
452
+ "data-merge-tag-value": i.value,
453
+ class: s(["tpl:flex tpl:w-full tpl:flex-col tpl:items-start tpl:gap-0.5 tpl:px-3 tpl:py-1.5 tpl:text-left tpl:text-xs tpl:transition-colors", a === e.selectedIndex ? "tpl:bg-[var(--tpl-primary-light)] tpl:text-[var(--tpl-primary)]" : "tpl:text-[var(--tpl-text)] hover:tpl:bg-[var(--tpl-bg-hover)]"]),
454
+ onMousedown: f((e) => t.$emit("select", i), ["prevent", "stop"]),
455
+ onMousemove: (n) => a !== e.selectedIndex && t.$emit("hover", a)
456
+ }, [g("span", X, y(i.label), 1), g("span", re, y(i.value), 1)], 42, Y))), 128))], 8, q));
457
457
  }
458
458
  }), Z = 10, ae = 0;
459
459
  function Q(e, t) {
@@ -492,14 +492,14 @@ var oe = A.create({
492
492
  }).run();
493
493
  },
494
494
  render: () => {
495
- let t = null, r = null, i = null, a = e([]), o = e(0), s = null, c = `tpl-merge-tag-suggestion-${++ae}`, l = null, u = [];
496
- function d() {
497
- g(l?.() ?? null);
498
- }
495
+ let t = null, r = null, i = null, a = o([]), s = o(0), c = null, l = `tpl-merge-tag-suggestion-${++ae}`, u = null, d = [];
499
496
  function f() {
500
- d(), requestAnimationFrame(d);
497
+ v(u?.() ?? null);
501
498
  }
502
- function p(e) {
499
+ function p() {
500
+ f(), requestAnimationFrame(f);
501
+ }
502
+ function m(e) {
503
503
  let t = [], n = e?.parentElement ?? null;
504
504
  for (; n && n !== document.body && n !== document.documentElement;) {
505
505
  let e = window.getComputedStyle(n), r = e.overflow + e.overflowX + e.overflowY;
@@ -507,19 +507,19 @@ var oe = A.create({
507
507
  }
508
508
  return t;
509
509
  }
510
- function m(e) {
511
- u = [window, ...p(e)];
512
- for (let e of u) e.addEventListener("scroll", d, {
510
+ function h(e) {
511
+ d = [window, ...m(e)];
512
+ for (let e of d) e.addEventListener("scroll", f, {
513
513
  passive: !0,
514
514
  capture: !0
515
515
  });
516
- window.addEventListener("resize", d, { passive: !0 });
516
+ window.addEventListener("resize", f, { passive: !0 });
517
517
  }
518
- function h() {
519
- for (let e of u) e.removeEventListener("scroll", d, { capture: !0 });
520
- window.removeEventListener("resize", d), u = [];
518
+ function g() {
519
+ for (let e of d) e.removeEventListener("scroll", f, { capture: !0 });
520
+ window.removeEventListener("resize", f), d = [];
521
521
  }
522
- function g(e) {
522
+ function v(e) {
523
523
  if (!r || !e || e.bottom < 0 || e.top > window.innerHeight) return;
524
524
  r.style.position = "fixed", r.style.left = `${e.left}px`, r.style.zIndex = "9999", r.style.top = `${e.bottom}px`;
525
525
  let t = r.offsetHeight;
@@ -528,7 +528,7 @@ var oe = A.create({
528
528
  r.style.top = `${n}px`;
529
529
  }
530
530
  }
531
- function v(e, t) {
531
+ function y(e, t) {
532
532
  let n = t?.closest("[data-tpl-theme]");
533
533
  if (!n) return;
534
534
  let r = n.getAttribute("data-tpl-theme");
@@ -540,48 +540,48 @@ var oe = A.create({
540
540
  }
541
541
  e.style.fontFamily = i.fontFamily, e.style.fontSize = i.fontSize, e.style.lineHeight = i.lineHeight;
542
542
  }
543
- function y(e) {
544
- i && (e ? (i.setAttribute("role", "combobox"), i.setAttribute("aria-haspopup", "listbox"), i.setAttribute("aria-expanded", "true"), i.setAttribute("aria-controls", c)) : (i.removeAttribute("aria-expanded"), i.removeAttribute("aria-controls"), i.removeAttribute("aria-activedescendant"), i.removeAttribute("aria-haspopup"), i.removeAttribute("role")));
543
+ function b(e) {
544
+ i && (e ? (i.setAttribute("role", "combobox"), i.setAttribute("aria-haspopup", "listbox"), i.setAttribute("aria-expanded", "true"), i.setAttribute("aria-controls", l)) : (i.removeAttribute("aria-expanded"), i.removeAttribute("aria-controls"), i.removeAttribute("aria-activedescendant"), i.removeAttribute("aria-haspopup"), i.removeAttribute("role")));
545
545
  }
546
- function b() {
546
+ function x() {
547
547
  if (i) {
548
548
  if (a.value.length === 0) {
549
549
  i.removeAttribute("aria-activedescendant");
550
550
  return;
551
551
  }
552
- i.setAttribute("aria-activedescendant", `${c}-opt-${o.value}`);
552
+ i.setAttribute("aria-activedescendant", `${l}-opt-${s.value}`);
553
553
  }
554
554
  }
555
555
  function S(e) {
556
- s?.(e);
556
+ c?.(e);
557
557
  }
558
558
  return {
559
- onStart: (e) => {
560
- a.value = e.items, o.value = 0, s = (t) => e.command(t), r = document.createElement("div"), r.setAttribute("data-testid", "merge-tag-suggestion-popup");
561
- let u = e.editor.view?.dom;
562
- i = u ?? null, v(r, u ?? null), document.body.appendChild(r), t = _({ render() {
563
- return x(ie, {
559
+ onStart: (o) => {
560
+ a.value = o.items, s.value = 0, c = (e) => o.command(e), r = document.createElement("div"), r.setAttribute("data-testid", "merge-tag-suggestion-popup");
561
+ let d = o.editor.view?.dom;
562
+ i = d ?? null, y(r, d ?? null), document.body.appendChild(r), t = _({ render() {
563
+ return e(ie, {
564
564
  items: a.value,
565
- selectedIndex: o.value,
565
+ selectedIndex: s.value,
566
566
  emptyText: n,
567
- listId: c,
567
+ listId: l,
568
568
  onSelect: (e) => S(e),
569
569
  onHover: (e) => {
570
- o.value = e, b();
570
+ s.value = e, x();
571
571
  }
572
572
  });
573
- } }), t.mount(r), y(!0), b(), l = e.clientRect ?? null, f(), m(u ?? null);
573
+ } }), t.mount(r), b(!0), x(), u = o.clientRect ?? null, p(), h(d ?? null);
574
574
  },
575
575
  onUpdate: (e) => {
576
- a.value = e.items, o.value >= e.items.length && (o.value = 0), s = (t) => e.command(t), b(), l = e.clientRect ?? null, f();
576
+ a.value = e.items, s.value >= e.items.length && (s.value = 0), c = (t) => e.command(t), x(), u = e.clientRect ?? null, p();
577
577
  },
578
578
  onKeyDown: (e) => {
579
579
  if (e.event.key === "Escape") return !0;
580
- let t = $(e.event, a.value, o, S);
581
- return t && b(), t;
580
+ let t = $(e.event, a.value, s, S);
581
+ return t && x(), t;
582
582
  },
583
583
  onExit: () => {
584
- h(), y(!1), t?.unmount(), r?.remove(), t = null, r = null, i = null, s = null, l = null;
584
+ g(), b(!1), t?.unmount(), r?.remove(), t = null, r = null, i = null, c = null, u = null;
585
585
  }
586
586
  };
587
587
  }
@@ -595,4 +595,4 @@ var oe = A.create({
595
595
  //#endregion
596
596
  export { I as FontSize, L as LetterSpacing, R as LineHeight, H as LogicMergeTagNode, K as MergeTagNode, oe as MergeTagSuggestion, Q as filterMergeTags, $ as handleSuggestionKeyDown };
597
597
 
598
- //# sourceMappingURL=extensions-DIxF31tA.js.map
598
+ //# sourceMappingURL=extensions-BJOV1jre.js.map