@templatical/editor 0.14.0 → 0.15.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (153) hide show
  1. package/dist/{AiChatSidebar-J8iO_sX7.js → AiChatSidebar-BIKvYREk.js} +57 -56
  2. package/dist/{AiFeatureMenu-F2diEDgV.js → AiFeatureMenu-CU6kTMTf.js} +20 -20
  3. package/dist/{BlockIssueBadge-a-qlByxF.js → BlockIssueBadge-B3xVgMTh.js} +11 -11
  4. package/dist/{CloudEditor-CDjtwb4i.js → CloudEditor-DRPxvUEj.js} +470 -468
  5. package/dist/{CollaboratorBar-B_EnJLtW.js → CollaboratorBar-DMSjd3HZ.js} +20 -20
  6. package/dist/{CommentsSidebar-DaP9BA_r.js → CommentsSidebar-D_tSGvTX.js} +154 -153
  7. package/dist/CountdownBlock-apiYUhkQ.js +92 -0
  8. package/dist/CountdownToolbar-CS0axcjz.js +210 -0
  9. package/dist/{DesignReferenceSidebar-BHRlTqlT.js → DesignReferenceSidebar-DWYK9nTk.js} +58 -57
  10. package/dist/{IssuesPanel-u7ee3Wrl.js → IssuesPanel-CR1MPaDE.js} +40 -40
  11. package/dist/{LoadingTrack-CV3ID80N.js → LoadingTrack-DsecR8Rw.js} +1 -1
  12. package/dist/MergeTagSuggestion-CH2SUxBo.js +1327 -0
  13. package/dist/{ModuleBrowserModal-DOsdaS6s.js → ModuleBrowserModal-BOzleijA.js} +60 -59
  14. package/dist/{ModulePreviewCanvas-Cx4MOJ0X.js → ModulePreviewCanvas-Cg99Pbde.js} +29 -29
  15. package/dist/{NumberWithSuffix-D2mW_DhT.js → NumberWithSuffix-CrA6quxx.js} +143 -142
  16. package/dist/{ParagraphEditor-DMzkVnST.js → ParagraphEditor-8jnzoL0A.js} +250 -247
  17. package/dist/{RichTextEditorContent-CRCxCwKf.js → RichTextEditorContent-BqLHIZY7.js} +45 -44
  18. package/dist/{SaveModuleDialog-DuEKgumL.js → SaveModuleDialog-Cy2XyjYT.js} +38 -37
  19. package/dist/{SnapshotHistory-CVgiNJtE.js → SnapshotHistory-cfxmOsJu.js} +34 -33
  20. package/dist/{TemplateScoringPanel-lm0_9nYi.js → TemplateScoringPanel-CZ62rGHz.js} +83 -82
  21. package/dist/{TestEmailModal-WBMdiW5S.js → TestEmailModal-sr1MaMVX.js} +22 -21
  22. package/dist/{TitleEditor-eyT0h-Sa.js → TitleEditor-CvGTprIg.js} +46 -45
  23. package/dist/{TplModal-tjQ7OB0g.js → TplModal-BtKB-0Bx.js} +14 -13
  24. package/dist/{blockTypeIcons-DdB3uTKD.js → blockTypeIcons-BxEbbev5.js} +2 -2
  25. package/dist/bundle-stats.json +8 -8
  26. package/dist/cdn/chunks/{AiFeatureMenu-D7rB2SBs.js → AiFeatureMenu-fDUpv_-s.js} +5 -5
  27. package/dist/cdn/chunks/{AiFeatureMenu-D7rB2SBs.js.map → AiFeatureMenu-fDUpv_-s.js.map} +1 -1
  28. package/dist/cdn/chunks/{BlockIssueBadge-DHOe0pgx.js → BlockIssueBadge-Byce0j0W.js} +3 -3
  29. package/dist/cdn/chunks/{BlockIssueBadge-DHOe0pgx.js.map → BlockIssueBadge-Byce0j0W.js.map} +1 -1
  30. package/dist/cdn/chunks/{CloudEditor-DNed_Ym0.js → CloudEditor-B4m8ldiE.js} +89 -89
  31. package/dist/cdn/chunks/{CloudEditor-DNed_Ym0.js.map → CloudEditor-B4m8ldiE.js.map} +1 -1
  32. package/dist/cdn/chunks/{CollaboratorBar-sj_9Lee3.js → CollaboratorBar-LnLmjxw_.js} +4 -4
  33. package/dist/cdn/chunks/{CollaboratorBar-sj_9Lee3.js.map → CollaboratorBar-LnLmjxw_.js.map} +1 -1
  34. package/dist/cdn/chunks/{CountdownBlock-C1Ikjpn4.js → CountdownBlock-DxTuMRBM.js} +3 -3
  35. package/dist/cdn/chunks/{CountdownBlock-C1Ikjpn4.js.map → CountdownBlock-DxTuMRBM.js.map} +1 -1
  36. package/dist/cdn/chunks/{CountdownToolbar-j1G_X8rB.js → CountdownToolbar-DUrVfQZH.js} +4 -4
  37. package/dist/cdn/chunks/{CountdownToolbar-j1G_X8rB.js.map → CountdownToolbar-DUrVfQZH.js.map} +1 -1
  38. package/dist/cdn/chunks/{IssuesPanel-CTOf3PsH.js → IssuesPanel-CHl90k4h.js} +4 -4
  39. package/dist/cdn/chunks/{IssuesPanel-CTOf3PsH.js.map → IssuesPanel-CHl90k4h.js.map} +1 -1
  40. package/dist/cdn/chunks/MergeTagSuggestion-BsCAo4Co.js +213 -0
  41. package/dist/cdn/chunks/MergeTagSuggestion-BsCAo4Co.js.map +1 -0
  42. package/dist/cdn/chunks/{ModuleBrowserModal-DCh88-rr.js → ModuleBrowserModal-DW0iQW0J.js} +6 -6
  43. package/dist/cdn/chunks/{ModuleBrowserModal-DCh88-rr.js.map → ModuleBrowserModal-DW0iQW0J.js.map} +1 -1
  44. package/dist/cdn/chunks/{ModulePreviewCanvas-DJqvTKmg.js → ModulePreviewCanvas-Cxo8v8t1.js} +3 -3
  45. package/dist/cdn/chunks/{ModulePreviewCanvas-DJqvTKmg.js.map → ModulePreviewCanvas-Cxo8v8t1.js.map} +1 -1
  46. package/dist/cdn/chunks/{NumberWithSuffix-Bu45XWSl.js → NumberWithSuffix-CnSRmUMK.js} +6 -6
  47. package/dist/cdn/chunks/{NumberWithSuffix-Bu45XWSl.js.map → NumberWithSuffix-CnSRmUMK.js.map} +1 -1
  48. package/dist/cdn/chunks/{ParagraphEditor-DwZqLJp2.js → ParagraphEditor-iG5cDjH0.js} +25 -23
  49. package/dist/cdn/chunks/{ParagraphEditor-DwZqLJp2.js.map → ParagraphEditor-iG5cDjH0.js.map} +1 -1
  50. package/dist/cdn/chunks/{RichTextEditorContent-CIuZ-2DV.js → RichTextEditorContent-DQpgeGMj.js} +4 -4
  51. package/dist/cdn/chunks/{RichTextEditorContent-CIuZ-2DV.js.map → RichTextEditorContent-DQpgeGMj.js.map} +1 -1
  52. package/dist/cdn/chunks/{SaveModuleDialog-Bep0X2s_.js → SaveModuleDialog-sJQXg2Mh.js} +3 -3
  53. package/dist/cdn/chunks/{SaveModuleDialog-Bep0X2s_.js.map → SaveModuleDialog-sJQXg2Mh.js.map} +1 -1
  54. package/dist/cdn/chunks/{TitleEditor-DO1-h3RY.js → TitleEditor-C8qIn9Oi.js} +12 -11
  55. package/dist/cdn/chunks/TitleEditor-C8qIn9Oi.js.map +1 -0
  56. package/dist/cdn/chunks/{blockTypeIcons-8o24HVJu.js → blockTypeIcons-DySnOpPo.js} +3 -3
  57. package/dist/cdn/chunks/{blockTypeIcons-8o24HVJu.js.map → blockTypeIcons-DySnOpPo.js.map} +1 -1
  58. package/dist/cdn/chunks/{draggable-kPCz_3zM.js → draggable-kG-D5Xsm.js} +6 -6
  59. package/dist/cdn/chunks/draggable-kG-D5Xsm.js.map +1 -0
  60. package/dist/cdn/chunks/extensions-C2pTX899.js +421 -0
  61. package/dist/cdn/chunks/extensions-C2pTX899.js.map +1 -0
  62. package/dist/cdn/chunks/{features-CkTMVylx.js → features-CHE3YjQE.js} +886 -837
  63. package/dist/cdn/chunks/features-CHE3YjQE.js.map +1 -0
  64. package/dist/cdn/chunks/{icons-9zjCuoJx.js → icons-M4uqBV-_.js} +26 -26
  65. package/dist/cdn/chunks/{icons-9zjCuoJx.js.map → icons-M4uqBV-_.js.map} +1 -1
  66. package/dist/cdn/chunks/{liquid.browser-DKKBzRQu.js → liquid.browser-BJOEu6Cg.js} +693 -678
  67. package/dist/cdn/chunks/liquid.browser-BJOEu6Cg.js.map +1 -0
  68. package/dist/cdn/chunks/{media-library-DMRIPx4g.js → media-library-Bqr15VN2.js} +33 -33
  69. package/dist/cdn/chunks/{media-library-DMRIPx4g.js.map → media-library-Bqr15VN2.js.map} +1 -1
  70. package/dist/cdn/chunks/{pusher-CdEqyLwF.js → pusher-CIwiKF8H.js} +4 -4
  71. package/dist/cdn/chunks/{pusher-CdEqyLwF.js.map → pusher-CIwiKF8H.js.map} +1 -1
  72. package/dist/cdn/chunks/{quality-CyeUgs_c.js → quality-DJZ_fqc2.js} +112 -112
  73. package/dist/cdn/chunks/{quality-CyeUgs_c.js.map → quality-DJZ_fqc2.js.map} +1 -1
  74. package/dist/cdn/chunks/{renderer-BIKUEKDD.js → renderer-CyzTR1Vq.js} +20 -20
  75. package/dist/cdn/chunks/renderer-CyzTR1Vq.js.map +1 -0
  76. package/dist/cdn/chunks/{src-pDy_imWG.js → src-q-SBgWx7.js} +5 -5
  77. package/dist/cdn/chunks/{src-pDy_imWG.js.map → src-q-SBgWx7.js.map} +1 -1
  78. package/dist/cdn/chunks/{styles-D4Bd3SCx.js → styles-PWISdaws.js} +1484 -1344
  79. package/dist/cdn/chunks/styles-PWISdaws.js.map +1 -0
  80. package/dist/cdn/chunks/{tiptap-BlLFFU3M.js → tiptap-DF9PEiqH.js} +6859 -6823
  81. package/dist/cdn/chunks/tiptap-DF9PEiqH.js.map +1 -0
  82. package/dist/cdn/editor.css +1 -1
  83. package/dist/cdn/editor.js +35 -35
  84. package/dist/cdn/editor.js.map +1 -1
  85. package/dist/{check-CYJwFmjy.js → check-rl7ok6uJ.js} +1 -1
  86. package/dist/{chevron-down-C5l-DzAA.js → chevron-down-BKe__NOD.js} +1 -1
  87. package/dist/{circle-alert-wf5HUFZY.js → circle-alert-C8xmpMsK.js} +1 -1
  88. package/dist/{clock-Bj0bQw-K.js → clock-BW4JuDCN.js} +1 -1
  89. package/dist/{cloud-CoFDm9YA.js → cloud-BQusL53H.js} +208 -208
  90. package/dist/createLucideIcon-Dx-EjR9r.js +43 -0
  91. package/dist/{dist-CLpPNKy9.js → dist-B5Sov3sS.js} +7 -7
  92. package/dist/dist-BEWiuOMi.js +251 -0
  93. package/dist/{dist-CrQZ_af9.js → dist-BFmE-7hB.js} +2 -2
  94. package/dist/{dist-U5vfDdYI.js → dist-BMoa33wT.js} +2 -2
  95. package/dist/{dist-BctFrpeA.js → dist-BibU4HNl.js} +74 -65
  96. package/dist/{dist-Dd3ibRZm.js → dist-BsCGIDSt.js} +103 -102
  97. package/dist/dist-CNLKj9wa.js +5 -0
  98. package/dist/{dist-BX3gGwL8.js → dist-CNXDNYQn.js} +728 -694
  99. package/dist/{dist-Bn703mnA.js → dist-COG3IdPK.js} +3 -3
  100. package/dist/{dist-B7w6xTU6.js → dist-CQZxDvFw.js} +3 -3
  101. package/dist/{dist-34OcyoK1.js → dist-CRsjOQM-.js} +2 -2
  102. package/dist/dist-CTT6WYJ6.js +134 -0
  103. package/dist/dist-Cqa6aeAJ.js +5 -0
  104. package/dist/{dist-ChMninLH.js → dist-SXJJ2v41.js} +2 -2
  105. package/dist/{dist-CyjyYg52.js → dist-itdjZraK.js} +28 -23
  106. package/dist/extensions-DwaZAqm6.js +423 -0
  107. package/dist/{image-up-x8-WXfsx.js → image-up-BwBCmQ4P.js} +1 -1
  108. package/dist/{info-RS_fGcGi.js → info-TCn7uWR5.js} +1 -1
  109. package/dist/{keys-DgYXDafq.js → keys-Cv8-8GsD.js} +1 -1
  110. package/dist/{liquid.browser-CVjP5Mex.js → liquid.browser-DZLtv26k.js} +692 -677
  111. package/dist/{list-checks-Bf7XdDyv.js → list-checks-CSrOWNgq.js} +1 -1
  112. package/dist/{loader-circle-CLZ0_FvW.js → loader-circle-BLmicnPG.js} +1 -1
  113. package/dist/{message-circle-B-1bN9ab.js → message-circle-C9hHMQCI.js} +1 -1
  114. package/dist/{refresh-cw-CWKWqJYG.js → refresh-cw-D1JQ1LNa.js} +1 -1
  115. package/dist/runtime-dom.esm-bundler-BzuoCyNp.js +523 -0
  116. package/dist/{scan-line-BtK5dEai.js → scan-line-DgijVq9y.js} +1 -1
  117. package/dist/{send-Cn1IUdzh.js → send-DjPdq69F.js} +1 -1
  118. package/dist/{shield-check-CrvMk4Ea.js → shield-check-Bqluu8FS.js} +1 -1
  119. package/dist/{sparkles-CgfjwvnG.js → sparkles-M4azPVSP.js} +1 -1
  120. package/dist/style.css +1 -1
  121. package/dist/styles-B2OrgEnn.js +4164 -0
  122. package/dist/templatical-editor.js +127 -126
  123. package/dist/{text-align-start-C3r_Rnvy.js → text-align-start-CMya5pCQ.js} +11 -11
  124. package/dist/{trash-2-CjERg4x9.js → trash-2-C-81rkLS.js} +1 -1
  125. package/dist/{triangle-alert-Chkny574.js → triangle-alert-BuRWnynk.js} +1 -1
  126. package/dist/{upload-e5kDRkPb.js → upload-CWBIoLd4.js} +1 -1
  127. package/dist/{useAliveFlag-cUQj9rmB.js → useAliveFlag-CECL_OUb.js} +1 -1
  128. package/dist/{useCloudI18n-CYJKqXtI.js → useCloudI18n-AKCy98qD.js} +2 -2
  129. package/dist/{useEditorCore-8JxXDOA4.js → useEditorCore-DJeOXVxQ.js} +1407 -1365
  130. package/dist/{useI18n-BWqM8i78.js → useI18n-C-TDeJBt.js} +2 -2
  131. package/dist/{useMergeTag-NHC4ylza.js → useMergeTag-DSrBY0-2.js} +5 -5
  132. package/dist/usePopoverRoot-DKUDnr55.js +8 -0
  133. package/dist/{vue.runtime.esm-bundler-BPa483TZ.js → vue.runtime.esm-bundler-l0XAqiyv.js} +626 -1147
  134. package/dist/{x-DiPIbccg.js → x-CQSvXnGR.js} +1 -1
  135. package/package.json +26 -26
  136. package/dist/CountdownBlock-DtAokAVw.js +0 -92
  137. package/dist/CountdownToolbar-Dtqgwy0g.js +0 -210
  138. package/dist/cdn/chunks/TitleEditor-DO1-h3RY.js.map +0 -1
  139. package/dist/cdn/chunks/draggable-kPCz_3zM.js.map +0 -1
  140. package/dist/cdn/chunks/extensions-iwBXnEwq.js +0 -605
  141. package/dist/cdn/chunks/extensions-iwBXnEwq.js.map +0 -1
  142. package/dist/cdn/chunks/features-CkTMVylx.js.map +0 -1
  143. package/dist/cdn/chunks/liquid.browser-DKKBzRQu.js.map +0 -1
  144. package/dist/cdn/chunks/renderer-BIKUEKDD.js.map +0 -1
  145. package/dist/cdn/chunks/styles-D4Bd3SCx.js.map +0 -1
  146. package/dist/cdn/chunks/tiptap-BlLFFU3M.js.map +0 -1
  147. package/dist/createLucideIcon-Bad2kKE0.js +0 -43
  148. package/dist/dist-CADDCv0o.js +0 -5
  149. package/dist/dist-CGvz7vkq.js +0 -5
  150. package/dist/dist-DuCzdgDA.js +0 -382
  151. package/dist/extensions-J439b7y7.js +0 -1720
  152. package/dist/styles-BUwDOWd3.js +0 -4022
  153. package/dist/usePopoverRoot-B1sdY4es.js +0 -8
@@ -0,0 +1,423 @@
1
+ import { Dt as e, Et as t, O as n, Ot as r, R as i, Y as a, _ as o, c as s, d as c, l, nt as u, s as d, u as f, w as p, z as m } from "./vue.runtime.esm-bundler-l0XAqiyv.js";
2
+ import { a as h, c as g, s as _ } from "./runtime-dom.esm-bundler-BzuoCyNp.js";
3
+ import { T as v, k as y, r as b, w as x } from "./dist-BibU4HNl.js";
4
+ import { t as S } from "./useI18n-C-TDeJBt.js";
5
+ import { t as C } from "./useMergeTag-DSrBY0-2.js";
6
+ import { i as w, o as T, p as E, qt as D, u as O } from "./dist-itdjZraK.js";
7
+ import { i as k, r as A, t as j } from "./MergeTagSuggestion-CH2SUxBo.js";
8
+ import { n as M, t as N } from "./dist-BsCGIDSt.js";
9
+ //#region src/extensions/FontSize.ts
10
+ var P = w.create({
11
+ name: "fontSize",
12
+ addOptions() {
13
+ return { types: ["textStyle"] };
14
+ },
15
+ addGlobalAttributes() {
16
+ return [{
17
+ types: this.options.types,
18
+ attributes: { fontSize: {
19
+ default: null,
20
+ parseHTML: (e) => e.style.fontSize?.replace(/['"]+/g, "") || null,
21
+ renderHTML: (e) => e.fontSize ? { style: `font-size: ${e.fontSize}` } : {}
22
+ } }
23
+ }];
24
+ },
25
+ addCommands() {
26
+ return {
27
+ setFontSize: (e) => ({ chain: t }) => t().setMark("textStyle", { fontSize: e }).run(),
28
+ unsetFontSize: () => ({ chain: e }) => e().setMark("textStyle", { fontSize: null }).removeEmptyTextStyle().run()
29
+ };
30
+ }
31
+ }), F = w.create({
32
+ name: "letterSpacing",
33
+ addOptions() {
34
+ return { types: ["textStyle"] };
35
+ },
36
+ addGlobalAttributes() {
37
+ return [{
38
+ types: this.options.types,
39
+ attributes: { letterSpacing: {
40
+ default: null,
41
+ parseHTML: (e) => e.style.letterSpacing?.replace(/['"]+/g, "") || null,
42
+ renderHTML: (e) => e.letterSpacing ? { style: `letter-spacing: ${e.letterSpacing}` } : {}
43
+ } }
44
+ }];
45
+ },
46
+ addCommands() {
47
+ return {
48
+ setLetterSpacing: (e) => ({ chain: t }) => t().setMark("textStyle", { letterSpacing: e }).run(),
49
+ unsetLetterSpacing: () => ({ chain: e }) => e().setMark("textStyle", { letterSpacing: null }).removeEmptyTextStyle().run()
50
+ };
51
+ }
52
+ }), I = w.create({
53
+ name: "lineHeight",
54
+ addOptions() {
55
+ return {
56
+ types: ["paragraph"],
57
+ defaultLineHeight: "1.5"
58
+ };
59
+ },
60
+ addGlobalAttributes() {
61
+ return [{
62
+ types: this.options.types,
63
+ attributes: { lineHeight: {
64
+ default: null,
65
+ parseHTML: (e) => e.style.lineHeight || null,
66
+ renderHTML: (e) => e.lineHeight ? { style: `line-height: ${e.lineHeight}` } : {}
67
+ } }
68
+ }];
69
+ },
70
+ addCommands() {
71
+ return {
72
+ setLineHeight: (e) => ({ commands: t }) => this.options.types.every((n) => t.updateAttributes(n, { lineHeight: e })),
73
+ unsetLineHeight: () => ({ commands: e }) => this.options.types.every((t) => e.resetAttributes(t, "lineHeight"))
74
+ };
75
+ }
76
+ }), L = [
77
+ "aria-label",
78
+ "data-tooltip",
79
+ "onKeydown"
80
+ ], R = ["aria-label", "onKeydown"], z = ["aria-label"], B = /* @__PURE__ */ o({
81
+ __name: "LogicMergeTagNodeView",
82
+ props: {
83
+ node: {},
84
+ editor: {},
85
+ getPos: { type: Function },
86
+ deleteNode: { type: Function },
87
+ updateAttributes: { type: Function }
88
+ },
89
+ setup(o) {
90
+ let v = o, { syntax: b } = C(), { t: w } = S(), T = d(() => y(v.node.attrs.value, b)), E = d(() => x(v.node.attrs.value, b)), D = a(!1), O = a(""), k = a(null), A = !1;
91
+ function j() {
92
+ O.value = v.node.attrs.value, A = !1, D.value = !0, p(() => {
93
+ k.value?.focus(), k.value?.select();
94
+ });
95
+ }
96
+ function M() {
97
+ if (A) return;
98
+ A = !0;
99
+ let e = O.value.trim();
100
+ if (!e) {
101
+ D.value = !1;
102
+ return;
103
+ }
104
+ e !== v.node.attrs.value && v.updateAttributes({
105
+ value: e,
106
+ keyword: y(e, b) ? x(e, b) : ""
107
+ }), D.value = !1;
108
+ }
109
+ function P(e) {
110
+ e.key === "Enter" ? (e.preventDefault(), M()) : e.key === "Escape" && (D.value = !1);
111
+ }
112
+ return (a, d) => (n(), l(u(N), {
113
+ as: "span",
114
+ class: t(T.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" : ""),
115
+ style: e(T.value ? "background-color: transparent; border: 1.5px solid color-mix(in srgb, var(--tpl-primary) 50%, transparent); color: var(--tpl-primary);" : ""),
116
+ contenteditable: "false"
117
+ }, {
118
+ default: i(() => [D.value ? m((n(), c("input", {
119
+ key: 0,
120
+ ref_key: "inputRef",
121
+ ref: k,
122
+ "onUpdate:modelValue": d[0] ||= (e) => O.value = e,
123
+ type: "text",
124
+ 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)]",
125
+ onBlur: M,
126
+ onKeydown: P
127
+ }, null, 544)), [[h, O.value]]) : T.value ? (n(), c("span", {
128
+ key: 1,
129
+ role: "button",
130
+ tabindex: "0",
131
+ "aria-label": u(w).mergeTag.editValue,
132
+ class: "tpl-tooltip tpl:cursor-pointer",
133
+ "data-tooltip": o.node.attrs.value,
134
+ onClick: g(j, ["stop"]),
135
+ onKeydown: [_(g(j, ["stop"]), ["enter"]), _(g(j, ["prevent", "stop"]), ["space"])]
136
+ }, r(E.value), 41, L)) : (n(), c("span", {
137
+ key: 2,
138
+ role: "button",
139
+ tabindex: "0",
140
+ "aria-label": u(w).mergeTag.editValue,
141
+ onClick: g(j, ["stop"]),
142
+ onKeydown: [_(g(j, ["stop"]), ["enter"]), _(g(j, ["prevent", "stop"]), ["space"])]
143
+ }, r(o.node.attrs.value), 41, R)), T.value ? (n(), c("button", {
144
+ key: 3,
145
+ type: "button",
146
+ "aria-label": u(w).mergeTag.deleteMergeTag,
147
+ 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)]",
148
+ contenteditable: "false",
149
+ onClick: d[1] ||= g((...e) => o.deleteNode && o.deleteNode(...e), ["stop", "prevent"])
150
+ }, [...d[2] ||= [s("svg", {
151
+ width: "10",
152
+ height: "10",
153
+ viewBox: "0 0 24 24",
154
+ fill: "none",
155
+ stroke: "currentColor",
156
+ "stroke-width": "3",
157
+ "aria-hidden": "true"
158
+ }, [s("line", {
159
+ x1: "18",
160
+ y1: "6",
161
+ x2: "6",
162
+ y2: "18"
163
+ }), s("line", {
164
+ x1: "6",
165
+ y1: "6",
166
+ x2: "18",
167
+ y2: "18"
168
+ })], -1)]], 8, z)) : f("", !0)]),
169
+ _: 1
170
+ }, 8, ["class", "style"]));
171
+ }
172
+ });
173
+ //#endregion
174
+ //#region src/extensions/isNodeSelected.ts
175
+ function V(e, t) {
176
+ let { $from: n, $to: r } = e.state.selection;
177
+ return n.pos === r.pos ? n.pos > 0 && n.nodeBefore?.type.name === t || n.nodeAfter?.type.name === t : !1;
178
+ }
179
+ //#endregion
180
+ //#region src/extensions/renderVueNodeView.ts
181
+ function H(e) {
182
+ return M(e);
183
+ }
184
+ //#endregion
185
+ //#region src/extensions/LogicMergeTagNode.ts
186
+ var U = O.create({
187
+ name: "logicMergeTagNode",
188
+ group: "inline",
189
+ inline: !0,
190
+ atom: !0,
191
+ addOptions() {
192
+ return { syntax: b.liquid };
193
+ },
194
+ addAttributes() {
195
+ return {
196
+ value: {
197
+ default: "",
198
+ parseHTML: (e) => e.getAttribute("data-logic-merge-tag") || ""
199
+ },
200
+ keyword: {
201
+ default: "",
202
+ parseHTML: (e) => e.getAttribute("data-keyword") || e.textContent || ""
203
+ }
204
+ };
205
+ },
206
+ parseHTML() {
207
+ return [{ tag: "span[data-logic-merge-tag]" }];
208
+ },
209
+ renderHTML({ node: e, HTMLAttributes: t }) {
210
+ if (!y(e.attrs.value, this.options.syntax)) return [
211
+ "span",
212
+ {},
213
+ e.attrs.value
214
+ ];
215
+ let n = x(e.attrs.value, this.options.syntax);
216
+ return [
217
+ "span",
218
+ D(t, {
219
+ "data-logic-merge-tag": e.attrs.value,
220
+ "data-keyword": n
221
+ }),
222
+ n
223
+ ];
224
+ },
225
+ addNodeView() {
226
+ return H(B);
227
+ },
228
+ addKeyboardShortcuts() {
229
+ return {
230
+ Backspace: () => V(this.editor, this.name),
231
+ Delete: () => V(this.editor, this.name)
232
+ };
233
+ },
234
+ addInputRules() {
235
+ return [new T({
236
+ find: RegExp(this.options.syntax.logic.source + "$", ""),
237
+ handler: ({ state: e, range: t, match: n }) => {
238
+ let r = n[0];
239
+ if (!y(r, this.options.syntax)) return;
240
+ let i = x(r, this.options.syntax), a = this.type.create({
241
+ value: r,
242
+ keyword: i
243
+ });
244
+ e.tr.replaceWith(t.from, t.to, a);
245
+ }
246
+ })];
247
+ },
248
+ addPasteRules() {
249
+ return [new E({
250
+ find: new RegExp(this.options.syntax.logic.source, "g"),
251
+ handler: ({ state: e, range: t, match: n }) => {
252
+ let r = n[0];
253
+ if (!y(r, this.options.syntax)) return;
254
+ let i = x(r, this.options.syntax), a = this.type.create({
255
+ value: r,
256
+ keyword: i
257
+ });
258
+ e.tr.replaceWith(t.from, t.to, a);
259
+ }
260
+ })];
261
+ }
262
+ }), W = [
263
+ "aria-label",
264
+ "data-tooltip",
265
+ "onKeydown"
266
+ ], G = ["aria-label"], K = /* @__PURE__ */ o({
267
+ __name: "MergeTagNodeView",
268
+ props: {
269
+ node: {},
270
+ deleteNode: { type: Function },
271
+ updateAttributes: { type: Function }
272
+ },
273
+ setup(e) {
274
+ let t = e, { getMergeTagLabel: o } = C(), { t: f } = S(), v = d(() => o(t.node.attrs.value)), y = a(!1), b = a(""), x = a(null);
275
+ function w() {
276
+ b.value = t.node.attrs.value, y.value = !0, p(() => {
277
+ x.value?.focus(), x.value?.select();
278
+ });
279
+ }
280
+ function T() {
281
+ let e = b.value.trim();
282
+ e && e !== t.node.attrs.value && t.updateAttributes({
283
+ value: e,
284
+ label: o(e)
285
+ }), y.value = !1;
286
+ }
287
+ function E(e) {
288
+ e.key === "Enter" ? (e.preventDefault(), T()) : e.key === "Escape" && (y.value = !1);
289
+ }
290
+ return (t, a) => (n(), l(u(N), {
291
+ as: "span",
292
+ 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)]",
293
+ style: { "background-color": "color-mix(in srgb, var(--tpl-primary) 20%, transparent)" },
294
+ contenteditable: "false"
295
+ }, {
296
+ default: i(() => [y.value ? m((n(), c("input", {
297
+ key: 0,
298
+ ref_key: "inputRef",
299
+ ref: x,
300
+ "onUpdate:modelValue": a[0] ||= (e) => b.value = e,
301
+ type: "text",
302
+ 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)]",
303
+ onBlur: T,
304
+ onKeydown: E
305
+ }, null, 544)), [[h, b.value]]) : (n(), c("span", {
306
+ key: 1,
307
+ role: "button",
308
+ tabindex: "0",
309
+ "aria-label": u(f).mergeTag.editValue,
310
+ class: "tpl-tooltip tpl:cursor-pointer",
311
+ "data-tooltip": e.node.attrs.value,
312
+ onClick: g(w, ["stop"]),
313
+ onKeydown: [_(g(w, ["stop"]), ["enter"]), _(g(w, ["prevent", "stop"]), ["space"])]
314
+ }, r(v.value), 41, W)), s("button", {
315
+ type: "button",
316
+ "aria-label": u(f).mergeTag.deleteMergeTag,
317
+ 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)]",
318
+ contenteditable: "false",
319
+ onClick: a[1] ||= g((...t) => e.deleteNode && e.deleteNode(...t), ["stop", "prevent"])
320
+ }, [...a[2] ||= [s("svg", {
321
+ width: "10",
322
+ height: "10",
323
+ viewBox: "0 0 24 24",
324
+ fill: "none",
325
+ stroke: "currentColor",
326
+ "stroke-width": "3",
327
+ "aria-hidden": "true"
328
+ }, [s("line", {
329
+ x1: "18",
330
+ y1: "6",
331
+ x2: "6",
332
+ y2: "18"
333
+ }), s("line", {
334
+ x1: "6",
335
+ y1: "6",
336
+ x2: "18",
337
+ y2: "18"
338
+ })], -1)]], 8, G)]),
339
+ _: 1
340
+ }));
341
+ }
342
+ }), q = O.create({
343
+ name: "mergeTagNode",
344
+ group: "inline",
345
+ inline: !0,
346
+ atom: !0,
347
+ addOptions() {
348
+ return {
349
+ mergeTags: [],
350
+ syntax: b.liquid
351
+ };
352
+ },
353
+ addAttributes() {
354
+ return {
355
+ label: {
356
+ default: "",
357
+ parseHTML: (e) => e.getAttribute("data-label") || e.textContent || ""
358
+ },
359
+ value: {
360
+ default: "",
361
+ parseHTML: (e) => e.getAttribute("data-merge-tag") || ""
362
+ }
363
+ };
364
+ },
365
+ parseHTML() {
366
+ return [{ tag: "span[data-merge-tag]" }];
367
+ },
368
+ renderHTML({ node: e, HTMLAttributes: t }) {
369
+ let n = v(e.attrs.value, this.options.mergeTags);
370
+ return [
371
+ "span",
372
+ D(t, {
373
+ "data-merge-tag": e.attrs.value,
374
+ "data-label": n
375
+ }),
376
+ n
377
+ ];
378
+ },
379
+ addNodeView() {
380
+ return H(K);
381
+ },
382
+ addCommands() {
383
+ return { insertMergeTag: (e) => ({ commands: t }) => t.insertContent({
384
+ type: this.name,
385
+ attrs: {
386
+ label: e.label,
387
+ value: e.value
388
+ }
389
+ }) };
390
+ },
391
+ addKeyboardShortcuts() {
392
+ return {
393
+ Backspace: () => V(this.editor, this.name),
394
+ Delete: () => V(this.editor, this.name)
395
+ };
396
+ },
397
+ addInputRules() {
398
+ return [new T({
399
+ find: RegExp(this.options.syntax.value.source + "$", ""),
400
+ handler: ({ state: e, range: t, match: n }) => {
401
+ let r = n[0], i = v(r, this.options.mergeTags), a = this.type.create({
402
+ label: i,
403
+ value: r
404
+ });
405
+ e.tr.replaceWith(t.from, t.to, a);
406
+ }
407
+ })];
408
+ },
409
+ addPasteRules() {
410
+ return [new E({
411
+ find: new RegExp(this.options.syntax.value.source, "g"),
412
+ handler: ({ state: e, range: t, match: n }) => {
413
+ let r = n[0], i = v(r, this.options.mergeTags), a = this.type.create({
414
+ label: i,
415
+ value: r
416
+ });
417
+ e.tr.replaceWith(t.from, t.to, a);
418
+ }
419
+ })];
420
+ }
421
+ });
422
+ //#endregion
423
+ export { P as FontSize, F as LetterSpacing, I as LineHeight, U as LogicMergeTagNode, q as MergeTagNode, j as MergeTagSuggestion, A as filterMergeTags, k as handleSuggestionKeyDown };
@@ -1,4 +1,4 @@
1
- import { t as e } from "./createLucideIcon-Bad2kKE0.js";
1
+ import { t as e } from "./createLucideIcon-Dx-EjR9r.js";
2
2
  var t = e("image-up", [
3
3
  ["path", {
4
4
  d: "M10.3 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2v10l-3.1-3.1a2 2 0 0 0-2.814.014L6 21",
@@ -1,4 +1,4 @@
1
- import { t as e } from "./createLucideIcon-Bad2kKE0.js";
1
+ import { t as e } from "./createLucideIcon-Dx-EjR9r.js";
2
2
  var t = e("info", [
3
3
  ["circle", {
4
4
  cx: "12",
@@ -1,4 +1,4 @@
1
- import { w as e } from "./vue.runtime.esm-bundler-BPa483TZ.js";
1
+ import { x as e } from "./vue.runtime.esm-bundler-l0XAqiyv.js";
2
2
  //#region src/keys.ts
3
3
  var t = Symbol("translations"), n = Symbol("editor"), r = Symbol("history"), i = Symbol("blockActions"), a = Symbol("conditionPreview"), o = Symbol("fontsManager"), s = Symbol("themeStyles"), c = Symbol("tplUiTheme"), l = Symbol("blockDefaults"), u = Symbol("blockRegistry"), d = Symbol("customBlockDefinitions"), f = Symbol("paletteBlocks"), p = Symbol("customBlockStylesheets"), m = Symbol("mergeTags"), h = Symbol("mergeTagSyntax"), g = Symbol("onRequestMergeTag"), _ = Symbol("mergeTagAutocomplete"), v = Symbol("mergeTagPicker"), y = Symbol("logicTags"), b = Symbol("logicPairs"), x = Symbol("logicPicker"), S = Symbol("onRequestLogic"), C = Symbol("onRequestMedia"), w = Symbol("displayConditions"), T = Symbol("allowCustomConditions"), E = Symbol("capabilities"), D = Symbol("keyboardReorder"), O = Symbol("templateLint"), k = Symbol("editorRoot"), A = Symbol("popoverRoot"), j = Symbol("authManager"), M = Symbol("aiConfig"), N = Symbol("comments"), P = Symbol("savedModulesHeadless"), F = Symbol("scoring"), I = Symbol("cloudTranslations");
4
4
  function L(t, n) {