@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.
- package/dist/{AccessibilityPanel-CvQGLdu6.js → AccessibilityPanel-B2MT0M58.js} +34 -34
- package/dist/{AiChatSidebar-B3SJIKG_.js → AiChatSidebar-w5ek3Z76.js} +62 -62
- package/dist/{AiFeatureMenu-BLLKoOos.js → AiFeatureMenu-ChlAWywJ.js} +20 -20
- package/dist/{BlockA11yBadge-CXDLqkcJ.js → BlockA11yBadge-C0S6kPC4.js} +12 -12
- package/dist/{CloudEditor-nzrRhHIi.js → CloudEditor-DYYaScFe.js} +441 -441
- package/dist/{CollaboratorBar-DuPYW5iF.js → CollaboratorBar-Bo8vtPId.js} +20 -20
- package/dist/CommentsSidebar-BQROg36f.js +441 -0
- package/dist/{cdn/chunks/CountdownBlock-5YdT1uUu.js → CountdownBlock-Bxqe7zwL.js} +21 -22
- package/dist/CountdownToolbar-CpFAnjSo.js +210 -0
- package/dist/{DesignReferenceSidebar-B8V_F2yF.js → DesignReferenceSidebar-CfqpcWX6.js} +52 -52
- package/dist/{LoadingTrack-B0CWFHXQ.js → LoadingTrack-CFkDkjBb.js} +1 -1
- package/dist/{ModuleBrowserModal-DrUFMTDx.js → ModuleBrowserModal-CKhsaPnA.js} +79 -79
- package/dist/{ModulePreviewCanvas-CHdOwV_4.js → ModulePreviewCanvas-Cw9GeGus.js} +29 -29
- package/dist/{NumberWithSuffix-DkXUez9t.js → NumberWithSuffix-Dw8dN1Pt.js} +88 -88
- package/dist/{ParagraphEditor-D75wl3BX.js → ParagraphEditor-DjDiUzmv.js} +218 -218
- package/dist/{RichTextEditorContent-DYkIauIk.js → RichTextEditorContent-CK3Om7ES.js} +38 -38
- package/dist/{SaveModuleDialog-FZ9lxY7_.js → SaveModuleDialog-CSUPmfRP.js} +34 -34
- package/dist/{SnapshotHistory-BR3eV120.js → SnapshotHistory-DwX2fj6N.js} +33 -33
- package/dist/{TemplateScoringPanel-4GTNHej5.js → TemplateScoringPanel-BIAeCAEP.js} +82 -82
- package/dist/{TestEmailModal--ue5w9fT.js → TestEmailModal-CIlBvWWn.js} +30 -30
- package/dist/{TitleEditor-fStSADI-.js → TitleEditor-BCV5k6wj.js} +67 -67
- package/dist/{TplModal-BwSfxIHf.js → TplModal-C3Hq9b58.js} +14 -14
- package/dist/{accessibility-e8JYu_zd.js → accessibility-BgUEA-Ai.js} +1 -1
- package/dist/{blockTypeIcons-BcTrDjmH.js → blockTypeIcons-iUurP50H.js} +2 -2
- package/dist/bundle-stats.json +6 -6
- package/dist/cdn/chunks/{AccessibilityPanel-B6DOjojm.js → AccessibilityPanel-AQD2ygU6.js} +34 -34
- package/dist/cdn/chunks/{AccessibilityPanel-B6DOjojm.js.map → AccessibilityPanel-AQD2ygU6.js.map} +1 -1
- package/dist/cdn/chunks/{AiFeatureMenu-qEdB2fZJ.js → AiFeatureMenu-CDh9ifC8.js} +16 -16
- package/dist/cdn/chunks/{AiFeatureMenu-qEdB2fZJ.js.map → AiFeatureMenu-CDh9ifC8.js.map} +1 -1
- package/dist/cdn/chunks/{BlockA11yBadge-DcEZftf6.js → BlockA11yBadge-BxZr3s7T.js} +10 -10
- package/dist/cdn/chunks/{BlockA11yBadge-DcEZftf6.js.map → BlockA11yBadge-BxZr3s7T.js.map} +1 -1
- package/dist/cdn/chunks/{CloudEditor-dwzWDF_n.js → CloudEditor-Fg7pQ9IQ.js} +425 -425
- package/dist/cdn/chunks/{CloudEditor-dwzWDF_n.js.map → CloudEditor-Fg7pQ9IQ.js.map} +1 -1
- package/dist/cdn/chunks/{CollaboratorBar--nO7TX6b.js → CollaboratorBar-B5a8eBXN.js} +20 -20
- package/dist/cdn/chunks/{CollaboratorBar--nO7TX6b.js.map → CollaboratorBar-B5a8eBXN.js.map} +1 -1
- package/dist/cdn/chunks/CountdownBlock-BeHkO19t.js +93 -0
- package/dist/cdn/chunks/{CountdownBlock-5YdT1uUu.js.map → CountdownBlock-BeHkO19t.js.map} +1 -1
- package/dist/cdn/chunks/CountdownToolbar-8UfW0jb1.js +212 -0
- package/dist/cdn/chunks/{CountdownToolbar-DXPXrbAA.js.map → CountdownToolbar-8UfW0jb1.js.map} +1 -1
- package/dist/cdn/chunks/{ModuleBrowserModal-DxoPp81s.js → ModuleBrowserModal-BMUyAmmj.js} +43 -43
- package/dist/cdn/chunks/{ModuleBrowserModal-DxoPp81s.js.map → ModuleBrowserModal-BMUyAmmj.js.map} +1 -1
- package/dist/cdn/chunks/{ModulePreviewCanvas-CoLdb4ar.js → ModulePreviewCanvas-CxSc7Pvd.js} +23 -23
- package/dist/cdn/chunks/{ModulePreviewCanvas-CoLdb4ar.js.map → ModulePreviewCanvas-CxSc7Pvd.js.map} +1 -1
- package/dist/cdn/chunks/{NumberWithSuffix-CE3NrZhH.js → NumberWithSuffix-BSOUOUCL.js} +108 -108
- package/dist/cdn/chunks/{NumberWithSuffix-CE3NrZhH.js.map → NumberWithSuffix-BSOUOUCL.js.map} +1 -1
- package/dist/cdn/chunks/{ParagraphEditor-B6Ygu-Mq.js → ParagraphEditor-S1bpgxe5.js} +187 -187
- package/dist/cdn/chunks/{ParagraphEditor-B6Ygu-Mq.js.map → ParagraphEditor-S1bpgxe5.js.map} +1 -1
- package/dist/cdn/chunks/{RichTextEditorContent-DL_y2SrR.js → RichTextEditorContent-ByehRfEA.js} +33 -33
- package/dist/cdn/chunks/{RichTextEditorContent-DL_y2SrR.js.map → RichTextEditorContent-ByehRfEA.js.map} +1 -1
- package/dist/cdn/chunks/{SaveModuleDialog-B0TnO_o9.js → SaveModuleDialog-5CNMvgYL.js} +27 -27
- package/dist/cdn/chunks/{SaveModuleDialog-B0TnO_o9.js.map → SaveModuleDialog-5CNMvgYL.js.map} +1 -1
- package/dist/cdn/chunks/{TitleEditor-BHpfxvwy.js → TitleEditor-BASWPsCM.js} +66 -66
- package/dist/cdn/chunks/{TitleEditor-BHpfxvwy.js.map → TitleEditor-BASWPsCM.js.map} +1 -1
- package/dist/cdn/chunks/{blockTypeIcons-BzzY9_kA.js → blockTypeIcons-DfOffaYP.js} +3 -3
- package/dist/cdn/chunks/{blockTypeIcons-BzzY9_kA.js.map → blockTypeIcons-DfOffaYP.js.map} +1 -1
- package/dist/cdn/chunks/draggable-CNhyCGIO.js +4804 -0
- package/dist/cdn/chunks/draggable-CNhyCGIO.js.map +1 -0
- package/dist/cdn/chunks/{extensions-DIxF31tA.js → extensions-BJOV1jre.js} +95 -95
- package/dist/cdn/chunks/{extensions-DIxF31tA.js.map → extensions-BJOV1jre.js.map} +1 -1
- package/dist/cdn/chunks/{features-DEMb13KS.js → features-D6FoOm8v.js} +2272 -2269
- package/dist/cdn/chunks/features-D6FoOm8v.js.map +1 -0
- package/dist/cdn/chunks/{icons-CsLTcirh.js → icons-CpsjWPU-.js} +2 -2
- package/dist/cdn/chunks/{icons-CsLTcirh.js.map → icons-CpsjWPU-.js.map} +1 -1
- package/dist/cdn/chunks/{media-library-CVaNvhpM.js → media-library-CEd7Lqxk.js} +1397 -1397
- package/dist/cdn/chunks/{media-library-CVaNvhpM.js.map → media-library-CEd7Lqxk.js.map} +1 -1
- package/dist/cdn/chunks/{pusher-CDbNlZBE.js → pusher-bjpcqCZG.js} +2 -2
- package/dist/cdn/chunks/{pusher-CDbNlZBE.js.map → pusher-bjpcqCZG.js.map} +1 -1
- package/dist/cdn/chunks/{quality-BaBfc54_.js → quality-Bx1oORXQ.js} +3 -3
- package/dist/cdn/chunks/{quality-BaBfc54_.js.map → quality-Bx1oORXQ.js.map} +1 -1
- package/dist/cdn/chunks/{renderer-CUxvx7ro.js → renderer-CwxCisa-.js} +3 -3
- package/dist/cdn/chunks/{renderer-CUxvx7ro.js.map → renderer-CwxCisa-.js.map} +1 -1
- package/dist/{rolldown-runtime-BZGGJVDF.js → cdn/chunks/rolldown-runtime-C266TIVP.js} +5 -5
- package/dist/cdn/chunks/{src-CRaqN-p8.js → src-DDSInEkE.js} +171 -171
- package/dist/cdn/chunks/{src-CRaqN-p8.js.map → src-DDSInEkE.js.map} +1 -1
- package/dist/cdn/chunks/styles-B1uu-Cc9.js +2944 -0
- package/dist/cdn/chunks/styles-B1uu-Cc9.js.map +1 -0
- package/dist/cdn/chunks/{tiptap-ZhwKyFp7.js → tiptap-IyIsncxY.js} +45 -46
- package/dist/cdn/chunks/{tiptap-ZhwKyFp7.js.map → tiptap-IyIsncxY.js.map} +1 -1
- package/dist/cdn/editor.css +1 -1
- package/dist/cdn/editor.js +122 -122
- package/dist/cdn/editor.js.map +1 -1
- package/dist/{check-Da05j8yl.js → check-Bg5yrRmX.js} +1 -1
- package/dist/{chevron-down-R2uY34iD.js → chevron-down-tee-ghFi.js} +1 -1
- package/dist/{circle-alert-DZuGWPX-.js → circle-alert-C0L9pUQ4.js} +1 -1
- package/dist/{clock-CRp2sIub.js → clock-CDlEdqiP.js} +1 -1
- package/dist/{cloud-DEk_b4CR.js → cloud-a3VovHva.js} +145 -145
- package/dist/{createLucideIcon-C3pa2siy.js → createLucideIcon-Di4mqmGn.js} +9 -9
- package/dist/{dist-B1IR0bpH.js → dist-BzRLLpfq.js} +107 -107
- package/dist/{dist-BFawx6IS.js → dist-Pk4MhWMP.js} +35 -35
- package/dist/{extensions-CUcl9Ok4.js → extensions-BF39Siqk.js} +103 -103
- package/dist/{image-up-MBZKKg9p.js → image-up-1D_3XDdO.js} +1 -1
- package/dist/index.d.ts +8 -8
- package/dist/{info-CJEC7piy.js → info-DTGrc0Bx.js} +1 -1
- package/dist/{keys-ciNfSSGj.js → keys-Bqs_0du9.js} +1 -1
- package/dist/{loader-circle-DsY5Yg33.js → loader-circle-_9bP23op.js} +1 -1
- package/dist/{message-circle-yElBbR2C.js → message-circle-gzy2ZGJ3.js} +1 -1
- package/dist/{refresh-cw-CE_AGtn8.js → refresh-cw-BNAhAmtL.js} +1 -1
- package/dist/rolldown-runtime-CAFD8bLK.js +11 -0
- package/dist/{scan-line-D0vcUekt.js → scan-line-DUEg6DoT.js} +1 -1
- package/dist/{send-DH4oDQqC.js → send-BatIZC9a.js} +1 -1
- package/dist/{shield-check-CfJgs2Hd.js → shield-check-C5Gv2cM1.js} +1 -1
- package/dist/{sparkles-CvRXGqFs.js → sparkles-D1IGi_cC.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/styles-BgmKdc2x.js +3173 -0
- package/dist/templatical-editor.js +99 -99
- package/dist/{text-align-start-BT9VUDxK.js → text-align-start-DG3aAH7Y.js} +1 -1
- package/dist/{trash-2-DbP2Y6t2.js → trash-2-424iqbpN.js} +1 -1
- package/dist/{triangle-alert-aOXceTSe.js → triangle-alert-DWQySIE2.js} +1 -1
- package/dist/{useCloudI18n-BuIwR6OE.js → useCloudI18n-CL_AwWwi.js} +4 -4
- package/dist/useEditorCore-CnXrv71D.js +3794 -0
- package/dist/{useI18n-lb2DHDiu.js → useI18n-CgmQftNf.js} +4 -4
- package/dist/{useMergeTag-CBwKnnNB.js → useMergeTag-vpwrZ9eQ.js} +3 -3
- package/dist/vue.runtime.esm-bundler-Bxqkjqhc.js +4300 -0
- package/dist/{x-u2oVmjN_.js → x-Dlaenqta.js} +1 -1
- package/package.json +8 -8
- package/dist/CommentsSidebar-B1pvJdqF.js +0 -441
- package/dist/CountdownBlock-BNSj1jvJ.js +0 -92
- package/dist/CountdownToolbar-ClJr2GzL.js +0 -210
- package/dist/cdn/chunks/CountdownToolbar-DXPXrbAA.js +0 -212
- package/dist/cdn/chunks/draggable-Bcb86AsV.js +0 -11572
- package/dist/cdn/chunks/draggable-Bcb86AsV.js.map +0 -1
- package/dist/cdn/chunks/features-DEMb13KS.js.map +0 -1
- package/dist/cdn/chunks/rolldown-runtime-BNuo_Jkg.js +0 -20
- package/dist/cdn/chunks/styles-BHJULjNR.js +0 -2947
- package/dist/cdn/chunks/styles-BHJULjNR.js.map +0 -1
- package/dist/styles-DEXEkBvg.js +0 -3176
- package/dist/useEditorCore-C6ost42Q.js +0 -9342
- package/dist/vue.runtime.esm-bundler-DpvJL-nX.js +0 -5775
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Nt as S, Z as C, fn as w, gn as T, hn as E, mn as D } from "./features-
|
|
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-
|
|
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__ */
|
|
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(
|
|
85
|
-
let i =
|
|
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,
|
|
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,
|
|
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 (
|
|
107
|
+
return (r, i) => (n(), p(v(j), {
|
|
108
108
|
as: "span",
|
|
109
|
-
class:
|
|
110
|
-
style:
|
|
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:
|
|
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)), [[
|
|
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":
|
|
126
|
+
"aria-label": v(b).mergeTag.editValue,
|
|
127
127
|
class: "tpl-tooltip tpl:cursor-pointer",
|
|
128
|
-
"data-tooltip":
|
|
129
|
-
onClick:
|
|
130
|
-
onKeydown: [
|
|
131
|
-
},
|
|
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":
|
|
136
|
-
onClick:
|
|
137
|
-
onKeydown: [
|
|
138
|
-
},
|
|
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":
|
|
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] ||=
|
|
145
|
-
}, [...i[2] ||= [
|
|
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
|
-
}, [
|
|
153
|
+
}, [g("line", {
|
|
154
154
|
x1: "18",
|
|
155
155
|
y1: "6",
|
|
156
156
|
x2: "6",
|
|
157
157
|
y2: "18"
|
|
158
|
-
}),
|
|
158
|
+
}), g("line", {
|
|
159
159
|
x1: "6",
|
|
160
160
|
y1: "6",
|
|
161
161
|
x2: "18",
|
|
162
162
|
y2: "18"
|
|
163
|
-
})], -1)]], 8, ne)) :
|
|
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__ */
|
|
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(
|
|
271
|
-
let i =
|
|
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
|
-
|
|
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 =
|
|
278
|
+
let e = b.value.trim();
|
|
279
279
|
e && e !== i.node.attrs.value && i.updateAttributes({
|
|
280
280
|
value: e,
|
|
281
|
-
label:
|
|
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 (
|
|
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:
|
|
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) =>
|
|
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)), [[
|
|
302
|
+
}, null, 544)), [[m, b.value]]) : (n(), u("span", {
|
|
303
303
|
key: 1,
|
|
304
304
|
role: "button",
|
|
305
305
|
tabindex: "0",
|
|
306
|
-
"aria-label":
|
|
306
|
+
"aria-label": v(d).mergeTag.editValue,
|
|
307
307
|
class: "tpl-tooltip tpl:cursor-pointer",
|
|
308
|
-
"data-tooltip":
|
|
309
|
-
onClick:
|
|
310
|
-
onKeydown: [
|
|
311
|
-
},
|
|
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":
|
|
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] ||=
|
|
317
|
-
}, [...i[2] ||= [
|
|
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
|
-
}, [
|
|
325
|
+
}, [g("line", {
|
|
326
326
|
x1: "18",
|
|
327
327
|
y1: "6",
|
|
328
328
|
x2: "6",
|
|
329
329
|
y2: "18"
|
|
330
|
-
}),
|
|
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__ */
|
|
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
|
|
437
|
-
function
|
|
438
|
-
return
|
|
436
|
+
let t = e;
|
|
437
|
+
function r(e) {
|
|
438
|
+
return t.listId ? `${t.listId}-opt-${e}` : void 0;
|
|
439
439
|
}
|
|
440
|
-
return (
|
|
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 ? (
|
|
446
|
-
key:
|
|
447
|
-
id:
|
|
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":
|
|
453
|
-
class:
|
|
454
|
-
onMousedown:
|
|
455
|
-
onMousemove: (
|
|
456
|
-
}, [
|
|
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 =
|
|
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
|
-
|
|
497
|
+
v(u?.() ?? null);
|
|
501
498
|
}
|
|
502
|
-
function p(
|
|
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
|
|
511
|
-
|
|
512
|
-
for (let e of
|
|
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",
|
|
516
|
+
window.addEventListener("resize", f, { passive: !0 });
|
|
517
517
|
}
|
|
518
|
-
function
|
|
519
|
-
for (let e of
|
|
520
|
-
window.removeEventListener("resize",
|
|
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
|
|
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
|
|
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
|
|
544
|
-
i && (e ? (i.setAttribute("role", "combobox"), i.setAttribute("aria-haspopup", "listbox"), i.setAttribute("aria-expanded", "true"), i.setAttribute("aria-controls",
|
|
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
|
|
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", `${
|
|
552
|
+
i.setAttribute("aria-activedescendant", `${l}-opt-${s.value}`);
|
|
553
553
|
}
|
|
554
554
|
}
|
|
555
555
|
function S(e) {
|
|
556
|
-
|
|
556
|
+
c?.(e);
|
|
557
557
|
}
|
|
558
558
|
return {
|
|
559
|
-
onStart: (
|
|
560
|
-
a.value =
|
|
561
|
-
let
|
|
562
|
-
i =
|
|
563
|
-
return
|
|
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:
|
|
565
|
+
selectedIndex: s.value,
|
|
566
566
|
emptyText: n,
|
|
567
|
-
listId:
|
|
567
|
+
listId: l,
|
|
568
568
|
onSelect: (e) => S(e),
|
|
569
569
|
onHover: (e) => {
|
|
570
|
-
|
|
570
|
+
s.value = e, x();
|
|
571
571
|
}
|
|
572
572
|
});
|
|
573
|
-
} }), t.mount(r),
|
|
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,
|
|
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,
|
|
581
|
-
return t &&
|
|
580
|
+
let t = $(e.event, a.value, s, S);
|
|
581
|
+
return t && x(), t;
|
|
582
582
|
},
|
|
583
583
|
onExit: () => {
|
|
584
|
-
|
|
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-
|
|
598
|
+
//# sourceMappingURL=extensions-BJOV1jre.js.map
|