@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,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { A as e, B as t, E as n, M as r, S as i, X as a, a as o, at as s, b as c, c as l, d as u, f as d, h as f, l as p, m, n as h, ot as g, p as _, rt as v, s as y, st as b, z as x } from "./vue.runtime.esm-bundler-Bxqkjqhc.js";
|
|
2
2
|
import { C as S, D as C, n as w, w as T } from "./dist-DJmnUmW9.js";
|
|
3
|
-
import { t as E } from "./useI18n-
|
|
4
|
-
import { t as D } from "./useMergeTag-
|
|
3
|
+
import { t as E } from "./useI18n-CgmQftNf.js";
|
|
4
|
+
import { t as D } from "./useMergeTag-vpwrZ9eQ.js";
|
|
5
5
|
import { F as O, Gt as k, _n as A, bn as j, i as M, o as N, p as P, u as F, vn as ee, xn as I } from "./dist-iLBdeBDR.js";
|
|
6
|
-
import { n as L, t as R } from "./dist-
|
|
6
|
+
import { n as L, t as R } from "./dist-Pk4MhWMP.js";
|
|
7
7
|
//#region src/extensions/FontSize.ts
|
|
8
8
|
var te = M.create({
|
|
9
9
|
name: "fontSize",
|
|
@@ -84,10 +84,10 @@ var te = M.create({
|
|
|
84
84
|
deleteNode: { type: Function },
|
|
85
85
|
updateAttributes: { type: Function }
|
|
86
86
|
},
|
|
87
|
-
setup(
|
|
88
|
-
let
|
|
87
|
+
setup(r) {
|
|
88
|
+
let i = r, { syntax: c } = D(), { t: p } = E(), h = u(() => C(i.node.attrs.value, c)), w = u(() => S(i.node.attrs.value, c)), T = a(!1), O = a(""), k = a(null), A = !1;
|
|
89
89
|
function j() {
|
|
90
|
-
O.value =
|
|
90
|
+
O.value = i.node.attrs.value, A = !1, T.value = !0, n(() => {
|
|
91
91
|
k.value?.focus(), k.value?.select();
|
|
92
92
|
});
|
|
93
93
|
}
|
|
@@ -99,53 +99,53 @@ var te = M.create({
|
|
|
99
99
|
T.value = !1;
|
|
100
100
|
return;
|
|
101
101
|
}
|
|
102
|
-
e !==
|
|
102
|
+
e !== i.node.attrs.value && i.updateAttributes({
|
|
103
103
|
value: e,
|
|
104
|
-
keyword: C(e,
|
|
104
|
+
keyword: C(e, c) ? S(e, c) : ""
|
|
105
105
|
}), T.value = !1;
|
|
106
106
|
}
|
|
107
107
|
function N(e) {
|
|
108
108
|
e.key === "Enter" ? (e.preventDefault(), M()) : e.key === "Escape" && (T.value = !1);
|
|
109
109
|
}
|
|
110
|
-
return (
|
|
110
|
+
return (n, i) => (e(), _(v(R), {
|
|
111
111
|
as: "span",
|
|
112
|
-
class:
|
|
113
|
-
style:
|
|
112
|
+
class: s(h.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" : ""),
|
|
113
|
+
style: g(h.value ? "background-color: transparent; border: 1.5px solid color-mix(in srgb, var(--tpl-primary) 50%, transparent); color: var(--tpl-primary);" : ""),
|
|
114
114
|
contenteditable: "false"
|
|
115
115
|
}, {
|
|
116
|
-
default:
|
|
116
|
+
default: x(() => [T.value ? t((e(), f("input", {
|
|
117
117
|
key: 0,
|
|
118
118
|
ref_key: "inputRef",
|
|
119
119
|
ref: k,
|
|
120
|
-
"onUpdate:modelValue":
|
|
120
|
+
"onUpdate:modelValue": i[0] ||= (e) => O.value = e,
|
|
121
121
|
type: "text",
|
|
122
122
|
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)]",
|
|
123
123
|
onBlur: M,
|
|
124
124
|
onKeydown: N
|
|
125
|
-
}, null, 544)), [[
|
|
125
|
+
}, null, 544)), [[o, O.value]]) : h.value ? (e(), f("span", {
|
|
126
126
|
key: 1,
|
|
127
127
|
role: "button",
|
|
128
128
|
tabindex: "0",
|
|
129
|
-
"aria-label":
|
|
129
|
+
"aria-label": v(p).mergeTag.editValue,
|
|
130
130
|
class: "tpl-tooltip tpl:cursor-pointer",
|
|
131
|
-
"data-tooltip":
|
|
132
|
-
onClick:
|
|
133
|
-
onKeydown: [
|
|
134
|
-
},
|
|
131
|
+
"data-tooltip": r.node.attrs.value,
|
|
132
|
+
onClick: l(j, ["stop"]),
|
|
133
|
+
onKeydown: [y(l(j, ["stop"]), ["enter"]), y(l(j, ["prevent", "stop"]), ["space"])]
|
|
134
|
+
}, b(w.value), 41, z)) : (e(), f("span", {
|
|
135
135
|
key: 2,
|
|
136
136
|
role: "button",
|
|
137
137
|
tabindex: "0",
|
|
138
|
-
"aria-label":
|
|
139
|
-
onClick:
|
|
140
|
-
onKeydown: [
|
|
141
|
-
}, r
|
|
138
|
+
"aria-label": v(p).mergeTag.editValue,
|
|
139
|
+
onClick: l(j, ["stop"]),
|
|
140
|
+
onKeydown: [y(l(j, ["stop"]), ["enter"]), y(l(j, ["prevent", "stop"]), ["space"])]
|
|
141
|
+
}, b(r.node.attrs.value), 41, B)), h.value ? (e(), f("button", {
|
|
142
142
|
key: 3,
|
|
143
143
|
type: "button",
|
|
144
|
-
"aria-label":
|
|
144
|
+
"aria-label": v(p).mergeTag.deleteMergeTag,
|
|
145
145
|
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)]",
|
|
146
146
|
contenteditable: "false",
|
|
147
|
-
onClick:
|
|
148
|
-
}, [...
|
|
147
|
+
onClick: i[1] ||= l((...e) => r.deleteNode && r.deleteNode(...e), ["stop", "prevent"])
|
|
148
|
+
}, [...i[2] ||= [d("svg", {
|
|
149
149
|
width: "10",
|
|
150
150
|
height: "10",
|
|
151
151
|
viewBox: "0 0 24 24",
|
|
@@ -153,17 +153,17 @@ var te = M.create({
|
|
|
153
153
|
stroke: "currentColor",
|
|
154
154
|
"stroke-width": "3",
|
|
155
155
|
"aria-hidden": "true"
|
|
156
|
-
}, [
|
|
156
|
+
}, [d("line", {
|
|
157
157
|
x1: "18",
|
|
158
158
|
y1: "6",
|
|
159
159
|
x2: "6",
|
|
160
160
|
y2: "18"
|
|
161
|
-
}),
|
|
161
|
+
}), d("line", {
|
|
162
162
|
x1: "6",
|
|
163
163
|
y1: "6",
|
|
164
164
|
x2: "18",
|
|
165
165
|
y2: "18"
|
|
166
|
-
})], -1)]], 8, V)) :
|
|
166
|
+
})], -1)]], 8, V)) : m("", !0)]),
|
|
167
167
|
_: 1
|
|
168
168
|
}, 8, ["class", "style"]));
|
|
169
169
|
}
|
|
@@ -270,54 +270,54 @@ var G = F.create({
|
|
|
270
270
|
deleteNode: { type: Function },
|
|
271
271
|
updateAttributes: { type: Function }
|
|
272
272
|
},
|
|
273
|
-
setup(
|
|
274
|
-
let
|
|
273
|
+
setup(r) {
|
|
274
|
+
let i = r, { getMergeTagLabel: s } = D(), { t: c } = E(), p = u(() => s(i.node.attrs.value)), m = a(!1), h = a(""), g = a(null);
|
|
275
275
|
function S() {
|
|
276
|
-
|
|
277
|
-
|
|
276
|
+
h.value = i.node.attrs.value, m.value = !0, n(() => {
|
|
277
|
+
g.value?.focus(), g.value?.select();
|
|
278
278
|
});
|
|
279
279
|
}
|
|
280
280
|
function C() {
|
|
281
|
-
let e =
|
|
282
|
-
e && e !==
|
|
281
|
+
let e = h.value.trim();
|
|
282
|
+
e && e !== i.node.attrs.value && i.updateAttributes({
|
|
283
283
|
value: e,
|
|
284
|
-
label:
|
|
285
|
-
}),
|
|
284
|
+
label: s(e)
|
|
285
|
+
}), m.value = !1;
|
|
286
286
|
}
|
|
287
287
|
function w(e) {
|
|
288
|
-
e.key === "Enter" ? (e.preventDefault(), C()) : e.key === "Escape" && (
|
|
288
|
+
e.key === "Enter" ? (e.preventDefault(), C()) : e.key === "Escape" && (m.value = !1);
|
|
289
289
|
}
|
|
290
|
-
return (
|
|
290
|
+
return (n, i) => (e(), _(v(R), {
|
|
291
291
|
as: "span",
|
|
292
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
293
|
style: { "background-color": "color-mix(in srgb, var(--tpl-primary) 20%, transparent)" },
|
|
294
294
|
contenteditable: "false"
|
|
295
295
|
}, {
|
|
296
|
-
default:
|
|
296
|
+
default: x(() => [m.value ? t((e(), f("input", {
|
|
297
297
|
key: 0,
|
|
298
298
|
ref_key: "inputRef",
|
|
299
|
-
ref:
|
|
300
|
-
"onUpdate:modelValue":
|
|
299
|
+
ref: g,
|
|
300
|
+
"onUpdate:modelValue": i[0] ||= (e) => h.value = e,
|
|
301
301
|
type: "text",
|
|
302
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
303
|
onBlur: C,
|
|
304
304
|
onKeydown: w
|
|
305
|
-
}, null, 544)), [[
|
|
305
|
+
}, null, 544)), [[o, h.value]]) : (e(), f("span", {
|
|
306
306
|
key: 1,
|
|
307
307
|
role: "button",
|
|
308
308
|
tabindex: "0",
|
|
309
|
-
"aria-label":
|
|
309
|
+
"aria-label": v(c).mergeTag.editValue,
|
|
310
310
|
class: "tpl-tooltip tpl:cursor-pointer",
|
|
311
|
-
"data-tooltip":
|
|
312
|
-
onClick:
|
|
313
|
-
onKeydown: [
|
|
314
|
-
},
|
|
311
|
+
"data-tooltip": r.node.attrs.value,
|
|
312
|
+
onClick: l(S, ["stop"]),
|
|
313
|
+
onKeydown: [y(l(S, ["stop"]), ["enter"]), y(l(S, ["prevent", "stop"]), ["space"])]
|
|
314
|
+
}, b(p.value), 41, K)), d("button", {
|
|
315
315
|
type: "button",
|
|
316
|
-
"aria-label":
|
|
316
|
+
"aria-label": v(c).mergeTag.deleteMergeTag,
|
|
317
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
318
|
contenteditable: "false",
|
|
319
|
-
onClick:
|
|
320
|
-
}, [...
|
|
319
|
+
onClick: i[1] ||= l((...e) => r.deleteNode && r.deleteNode(...e), ["stop", "prevent"])
|
|
320
|
+
}, [...i[2] ||= [d("svg", {
|
|
321
321
|
width: "10",
|
|
322
322
|
height: "10",
|
|
323
323
|
viewBox: "0 0 24 24",
|
|
@@ -325,12 +325,12 @@ var G = F.create({
|
|
|
325
325
|
stroke: "currentColor",
|
|
326
326
|
"stroke-width": "3",
|
|
327
327
|
"aria-hidden": "true"
|
|
328
|
-
}, [
|
|
328
|
+
}, [d("line", {
|
|
329
329
|
x1: "18",
|
|
330
330
|
y1: "6",
|
|
331
331
|
x2: "6",
|
|
332
332
|
y2: "18"
|
|
333
|
-
}),
|
|
333
|
+
}), d("line", {
|
|
334
334
|
x1: "6",
|
|
335
335
|
y1: "6",
|
|
336
336
|
x2: "18",
|
|
@@ -636,27 +636,27 @@ var ce = se, le = ["id"], ue = {
|
|
|
636
636
|
},
|
|
637
637
|
emits: ["select", "hover"],
|
|
638
638
|
setup(t) {
|
|
639
|
-
let
|
|
640
|
-
function
|
|
641
|
-
return
|
|
639
|
+
let n = t;
|
|
640
|
+
function i(e) {
|
|
641
|
+
return n.listId ? `${n.listId}-opt-${e}` : void 0;
|
|
642
642
|
}
|
|
643
|
-
return (
|
|
643
|
+
return (n, a) => (e(), f("div", {
|
|
644
644
|
id: t.listId,
|
|
645
645
|
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",
|
|
646
646
|
role: "listbox",
|
|
647
647
|
"data-testid": "merge-tag-suggestion-list"
|
|
648
|
-
}, [t.items.length === 0 ? (
|
|
649
|
-
key:
|
|
650
|
-
id: a
|
|
648
|
+
}, [t.items.length === 0 ? (e(), f("div", ue, b(t.emptyText), 1)) : m("", !0), (e(!0), f(p, null, r(t.items, (r, a) => (e(), f("button", {
|
|
649
|
+
key: r.value,
|
|
650
|
+
id: i(a),
|
|
651
651
|
type: "button",
|
|
652
652
|
role: "option",
|
|
653
|
-
"aria-selected":
|
|
654
|
-
"data-selected":
|
|
655
|
-
"data-merge-tag-value":
|
|
656
|
-
class:
|
|
657
|
-
onMousedown:
|
|
658
|
-
onMousemove: (e) =>
|
|
659
|
-
}, [
|
|
653
|
+
"aria-selected": a === t.selectedIndex,
|
|
654
|
+
"data-selected": a === t.selectedIndex ? "true" : "false",
|
|
655
|
+
"data-merge-tag-value": r.value,
|
|
656
|
+
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 === t.selectedIndex ? "tpl:bg-[var(--tpl-primary-light)] tpl:text-[var(--tpl-primary)]" : "tpl:text-[var(--tpl-text)] hover:tpl:bg-[var(--tpl-bg-hover)]"]),
|
|
657
|
+
onMousedown: l((e) => n.$emit("select", r), ["prevent", "stop"]),
|
|
658
|
+
onMousemove: (e) => a !== t.selectedIndex && n.$emit("hover", a)
|
|
659
|
+
}, [d("span", X, b(r.label), 1), d("span", fe, b(r.value), 1)], 42, de))), 128))], 8, le));
|
|
660
660
|
}
|
|
661
661
|
}), Z = 10, me = 0;
|
|
662
662
|
function Q(e, t) {
|
|
@@ -695,14 +695,14 @@ var he = M.create({
|
|
|
695
695
|
}).run();
|
|
696
696
|
},
|
|
697
697
|
render: () => {
|
|
698
|
-
let e = null, n = null, r = null,
|
|
699
|
-
function d() {
|
|
700
|
-
g(l?.() ?? null);
|
|
701
|
-
}
|
|
698
|
+
let e = null, n = null, r = null, o = a([]), s = a(0), c = null, l = `tpl-merge-tag-suggestion-${++me}`, u = null, d = [];
|
|
702
699
|
function f() {
|
|
703
|
-
|
|
700
|
+
v(u?.() ?? null);
|
|
701
|
+
}
|
|
702
|
+
function p() {
|
|
703
|
+
f(), requestAnimationFrame(f);
|
|
704
704
|
}
|
|
705
|
-
function
|
|
705
|
+
function m(e) {
|
|
706
706
|
let t = [], n = e?.parentElement ?? null;
|
|
707
707
|
for (; n && n !== document.body && n !== document.documentElement;) {
|
|
708
708
|
let e = window.getComputedStyle(n), r = e.overflow + e.overflowX + e.overflowY;
|
|
@@ -710,19 +710,19 @@ var he = M.create({
|
|
|
710
710
|
}
|
|
711
711
|
return t;
|
|
712
712
|
}
|
|
713
|
-
function
|
|
714
|
-
|
|
715
|
-
for (let e of
|
|
713
|
+
function g(e) {
|
|
714
|
+
d = [window, ...m(e)];
|
|
715
|
+
for (let e of d) e.addEventListener("scroll", f, {
|
|
716
716
|
passive: !0,
|
|
717
717
|
capture: !0
|
|
718
718
|
});
|
|
719
|
-
window.addEventListener("resize",
|
|
719
|
+
window.addEventListener("resize", f, { passive: !0 });
|
|
720
720
|
}
|
|
721
|
-
function
|
|
722
|
-
for (let e of
|
|
723
|
-
window.removeEventListener("resize",
|
|
721
|
+
function _() {
|
|
722
|
+
for (let e of d) e.removeEventListener("scroll", f, { capture: !0 });
|
|
723
|
+
window.removeEventListener("resize", f), d = [];
|
|
724
724
|
}
|
|
725
|
-
function
|
|
725
|
+
function v(e) {
|
|
726
726
|
if (!n || !e || e.bottom < 0 || e.top > window.innerHeight) return;
|
|
727
727
|
n.style.position = "fixed", n.style.left = `${e.left}px`, n.style.zIndex = "9999", n.style.top = `${e.bottom}px`;
|
|
728
728
|
let t = n.offsetHeight;
|
|
@@ -731,7 +731,7 @@ var he = M.create({
|
|
|
731
731
|
n.style.top = `${r}px`;
|
|
732
732
|
}
|
|
733
733
|
}
|
|
734
|
-
function
|
|
734
|
+
function y(e, t) {
|
|
735
735
|
let n = t?.closest("[data-tpl-theme]");
|
|
736
736
|
if (!n) return;
|
|
737
737
|
let r = n.getAttribute("data-tpl-theme");
|
|
@@ -743,48 +743,48 @@ var he = M.create({
|
|
|
743
743
|
}
|
|
744
744
|
e.style.fontFamily = i.fontFamily, e.style.fontSize = i.fontSize, e.style.lineHeight = i.lineHeight;
|
|
745
745
|
}
|
|
746
|
-
function
|
|
747
|
-
r && (e ? (r.setAttribute("role", "combobox"), r.setAttribute("aria-haspopup", "listbox"), r.setAttribute("aria-expanded", "true"), r.setAttribute("aria-controls",
|
|
746
|
+
function b(e) {
|
|
747
|
+
r && (e ? (r.setAttribute("role", "combobox"), r.setAttribute("aria-haspopup", "listbox"), r.setAttribute("aria-expanded", "true"), r.setAttribute("aria-controls", l)) : (r.removeAttribute("aria-expanded"), r.removeAttribute("aria-controls"), r.removeAttribute("aria-activedescendant"), r.removeAttribute("aria-haspopup"), r.removeAttribute("role")));
|
|
748
748
|
}
|
|
749
|
-
function
|
|
749
|
+
function x() {
|
|
750
750
|
if (r) {
|
|
751
|
-
if (
|
|
751
|
+
if (o.value.length === 0) {
|
|
752
752
|
r.removeAttribute("aria-activedescendant");
|
|
753
753
|
return;
|
|
754
754
|
}
|
|
755
|
-
r.setAttribute("aria-activedescendant", `${
|
|
755
|
+
r.setAttribute("aria-activedescendant", `${l}-opt-${s.value}`);
|
|
756
756
|
}
|
|
757
757
|
}
|
|
758
758
|
function S(e) {
|
|
759
|
-
|
|
759
|
+
c?.(e);
|
|
760
760
|
}
|
|
761
761
|
return {
|
|
762
|
-
onStart: (
|
|
763
|
-
|
|
764
|
-
let
|
|
765
|
-
r =
|
|
766
|
-
return
|
|
767
|
-
items:
|
|
768
|
-
selectedIndex:
|
|
762
|
+
onStart: (a) => {
|
|
763
|
+
o.value = a.items, s.value = 0, c = (e) => a.command(e), n = document.createElement("div"), n.setAttribute("data-testid", "merge-tag-suggestion-popup");
|
|
764
|
+
let d = a.editor.view?.dom;
|
|
765
|
+
r = d ?? null, y(n, d ?? null), document.body.appendChild(n), e = h({ render() {
|
|
766
|
+
return i(pe, {
|
|
767
|
+
items: o.value,
|
|
768
|
+
selectedIndex: s.value,
|
|
769
769
|
emptyText: t,
|
|
770
|
-
listId:
|
|
770
|
+
listId: l,
|
|
771
771
|
onSelect: (e) => S(e),
|
|
772
772
|
onHover: (e) => {
|
|
773
|
-
|
|
773
|
+
s.value = e, x();
|
|
774
774
|
}
|
|
775
775
|
});
|
|
776
|
-
} }), e.mount(n),
|
|
776
|
+
} }), e.mount(n), b(!0), x(), u = a.clientRect ?? null, p(), g(d ?? null);
|
|
777
777
|
},
|
|
778
778
|
onUpdate: (e) => {
|
|
779
|
-
|
|
779
|
+
o.value = e.items, s.value >= e.items.length && (s.value = 0), c = (t) => e.command(t), x(), u = e.clientRect ?? null, p();
|
|
780
780
|
},
|
|
781
781
|
onKeyDown: (e) => {
|
|
782
782
|
if (e.event.key === "Escape") return !0;
|
|
783
|
-
let t = $(e.event,
|
|
784
|
-
return t &&
|
|
783
|
+
let t = $(e.event, o.value, s, S);
|
|
784
|
+
return t && x(), t;
|
|
785
785
|
},
|
|
786
786
|
onExit: () => {
|
|
787
|
-
|
|
787
|
+
_(), b(!1), e?.unmount(), n?.remove(), e = null, n = null, r = null, c = null, u = null;
|
|
788
788
|
}
|
|
789
789
|
};
|
|
790
790
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -248,9 +248,9 @@ declare module "@tiptap/core" {
|
|
|
248
248
|
|
|
249
249
|
declare module "@tiptap/core" {
|
|
250
250
|
interface Commands<ReturnType> {
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
251
|
+
letterSpacing: {
|
|
252
|
+
setLetterSpacing: (spacing: string) => ReturnType;
|
|
253
|
+
unsetLetterSpacing: () => ReturnType;
|
|
254
254
|
};
|
|
255
255
|
}
|
|
256
256
|
}
|
|
@@ -258,9 +258,8 @@ declare module "@tiptap/core" {
|
|
|
258
258
|
|
|
259
259
|
declare module "@tiptap/core" {
|
|
260
260
|
interface Commands<ReturnType> {
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
unsetLetterSpacing: () => ReturnType;
|
|
261
|
+
mergeTagNode: {
|
|
262
|
+
insertMergeTag: (attrs: MergeTag) => ReturnType;
|
|
264
263
|
};
|
|
265
264
|
}
|
|
266
265
|
}
|
|
@@ -268,8 +267,9 @@ declare module "@tiptap/core" {
|
|
|
268
267
|
|
|
269
268
|
declare module "@tiptap/core" {
|
|
270
269
|
interface Commands<ReturnType> {
|
|
271
|
-
|
|
272
|
-
|
|
270
|
+
fontSize: {
|
|
271
|
+
setFontSize: (size: string) => ReturnType;
|
|
272
|
+
unsetFontSize: () => ReturnType;
|
|
273
273
|
};
|
|
274
274
|
}
|
|
275
275
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { w as e } from "./vue.runtime.esm-bundler-Bxqkjqhc.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("mergeTags"), p = Symbol("mergeTagSyntax"), m = Symbol("onRequestMergeTag"), h = Symbol("mergeTagAutocomplete"), g = Symbol("onRequestMedia"), _ = Symbol("displayConditions"), v = Symbol("allowCustomConditions"), y = Symbol("capabilities"), b = Symbol("keyboardReorder"), x = Symbol("accessibilityLint"), S = Symbol("authManager"), C = Symbol("aiConfig"), w = Symbol("comments"), T = Symbol("savedModulesHeadless"), E = Symbol("scoring"), D = Symbol("cloudTranslations");
|
|
4
4
|
function O(t, n) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as e } from "./createLucideIcon-
|
|
1
|
+
import { t as e } from "./createLucideIcon-Di4mqmGn.js";
|
|
2
2
|
var t = e("message-circle", [["path", {
|
|
3
3
|
d: "M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719",
|
|
4
4
|
key: "1sd12s"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as e } from "./createLucideIcon-
|
|
1
|
+
import { t as e } from "./createLucideIcon-Di4mqmGn.js";
|
|
2
2
|
var t = e("eye", [["path", {
|
|
3
3
|
d: "M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",
|
|
4
4
|
key: "1nclc0"
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
//#region \0rolldown/runtime.js
|
|
2
|
+
var e = Object.defineProperty, t = (t, n) => {
|
|
3
|
+
let r = {};
|
|
4
|
+
for (var i in t) e(r, i, {
|
|
5
|
+
get: t[i],
|
|
6
|
+
enumerable: !0
|
|
7
|
+
});
|
|
8
|
+
return n || e(r, Symbol.toStringTag, { value: "Module" }), r;
|
|
9
|
+
};
|
|
10
|
+
//#endregion
|
|
11
|
+
export { t };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as e } from "./createLucideIcon-
|
|
1
|
+
import { t as e } from "./createLucideIcon-Di4mqmGn.js";
|
|
2
2
|
var t = e("send", [["path", {
|
|
3
3
|
d: "M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",
|
|
4
4
|
key: "1ffxy3"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as e } from "./createLucideIcon-
|
|
1
|
+
import { t as e } from "./createLucideIcon-Di4mqmGn.js";
|
|
2
2
|
var t = e("shield-check", [["path", {
|
|
3
3
|
d: "M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",
|
|
4
4
|
key: "oel41y"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as e } from "./createLucideIcon-
|
|
1
|
+
import { t as e } from "./createLucideIcon-Di4mqmGn.js";
|
|
2
2
|
var t = e("sparkles", [
|
|
3
3
|
["path", {
|
|
4
4
|
d: "M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",
|