@templatical/editor 0.8.4 → 0.9.0
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/{AiChatSidebar-CnRXeK77.js → AiChatSidebar-BUKj9n02.js} +5 -5
- package/dist/{AiFeatureMenu-BYDDrpj6.js → AiFeatureMenu-Co14YVJt.js} +3 -3
- package/dist/{BlockIssueBadge-DM-vXeD6.js → BlockIssueBadge-DThKKeub.js} +2 -2
- package/dist/{CloudEditor-B9a_K6Cm.js → CloudEditor-CAtw_sFC.js} +218 -217
- package/dist/{CollaboratorBar-HN4whzM-.js → CollaboratorBar-Bc6q0gB9.js} +2 -2
- package/dist/{CommentsSidebar-_llWQ4VT.js → CommentsSidebar-DiH4R4F0.js} +3 -3
- package/dist/{CountdownBlock-I99sC0C5.js → CountdownBlock-BTPefclD.js} +2 -2
- package/dist/{CountdownToolbar-BUhOUiQ9.js → CountdownToolbar-Dvr2icg-.js} +2 -2
- package/dist/{DesignReferenceSidebar-0GwjUn2V.js → DesignReferenceSidebar-BP32MgpS.js} +3 -3
- package/dist/{IssuesPanel-4MKZe8yP.js → IssuesPanel-B1LT91IX.js} +2 -2
- package/dist/{ModuleBrowserModal-DPZBsvqk.js → ModuleBrowserModal-CWegFoOA.js} +77 -85
- package/dist/{ModulePreviewCanvas-CK4j11-e.js → ModulePreviewCanvas-D9WUSSRT.js} +2 -2
- package/dist/{NumberWithSuffix-CxMFy_j3.js → NumberWithSuffix-CxUBW_V2.js} +2 -2
- package/dist/{ParagraphEditor-DBus_iHH.js → ParagraphEditor-DrAz2yot.js} +126 -126
- package/dist/{RichTextEditorContent-B_KCY6T1.js → RichTextEditorContent-gR169m1-.js} +4 -4
- package/dist/{SaveModuleDialog-DORRSbBo.js → SaveModuleDialog-DWidA0c9.js} +6 -6
- package/dist/{SnapshotHistory-DTMVEk03.js → SnapshotHistory-CIo2Jaw-.js} +4 -4
- package/dist/{TemplateScoringPanel-BIwEwFxD.js → TemplateScoringPanel-seBvvn8O.js} +2 -2
- package/dist/{TestEmailModal-DJmYp0Qi.js → TestEmailModal-BuCuWp3N.js} +3 -3
- package/dist/{TitleEditor-70d9AF1V.js → TitleEditor-BmW0uMl7.js} +67 -67
- package/dist/{TplModal-BEfwlvPC.js → TplModal-YFpBaiLj.js} +4 -4
- package/dist/{blockTypeIcons-2DRoPa3K.js → blockTypeIcons-DCkHXPhx.js} +19 -11
- package/dist/bundle-stats.json +8 -8
- package/dist/cdn/chunks/{AiFeatureMenu-CcuKnisc.js → AiFeatureMenu-Dayzk2H7.js} +2 -2
- package/dist/cdn/chunks/{AiFeatureMenu-CcuKnisc.js.map → AiFeatureMenu-Dayzk2H7.js.map} +1 -1
- package/dist/cdn/chunks/{BlockIssueBadge-Sr3is7Wr.js → BlockIssueBadge-D_US2wqo.js} +4 -4
- package/dist/cdn/chunks/{BlockIssueBadge-Sr3is7Wr.js.map → BlockIssueBadge-D_US2wqo.js.map} +1 -1
- package/dist/cdn/chunks/{CloudEditor-Bi10d2Gq.js → CloudEditor-CyJItWsK.js} +186 -185
- package/dist/cdn/chunks/{CloudEditor-Bi10d2Gq.js.map → CloudEditor-CyJItWsK.js.map} +1 -1
- package/dist/cdn/chunks/{CollaboratorBar-C0zeecvl.js → CollaboratorBar-C4CFs5EJ.js} +3 -3
- package/dist/cdn/chunks/{CollaboratorBar-C0zeecvl.js.map → CollaboratorBar-C4CFs5EJ.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownBlock-CpSUUDDs.js → CountdownBlock-D6lCXhZA.js} +2 -2
- package/dist/cdn/chunks/{CountdownBlock-CpSUUDDs.js.map → CountdownBlock-D6lCXhZA.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownToolbar-BBzdR-00.js → CountdownToolbar-BsGUxoRv.js} +3 -3
- package/dist/cdn/chunks/{CountdownToolbar-BBzdR-00.js.map → CountdownToolbar-BsGUxoRv.js.map} +1 -1
- package/dist/cdn/chunks/{IssuesPanel-Bthq6qoZ.js → IssuesPanel-DeHTmRDz.js} +5 -5
- package/dist/cdn/chunks/{IssuesPanel-Bthq6qoZ.js.map → IssuesPanel-DeHTmRDz.js.map} +1 -1
- package/dist/cdn/chunks/{ModuleBrowserModal-CFMd6M7E.js → ModuleBrowserModal-Cgjz4xAz.js} +8 -8
- package/dist/cdn/chunks/ModuleBrowserModal-Cgjz4xAz.js.map +1 -0
- package/dist/cdn/chunks/{ModulePreviewCanvas-BkcPcF5C.js → ModulePreviewCanvas-CeS9PsAA.js} +2 -2
- package/dist/cdn/chunks/{ModulePreviewCanvas-BkcPcF5C.js.map → ModulePreviewCanvas-CeS9PsAA.js.map} +1 -1
- package/dist/cdn/chunks/{NumberWithSuffix-C2hH_ZIK.js → NumberWithSuffix-Bp-idLCc.js} +2 -2
- package/dist/cdn/chunks/{NumberWithSuffix-C2hH_ZIK.js.map → NumberWithSuffix-Bp-idLCc.js.map} +1 -1
- package/dist/cdn/chunks/{ParagraphEditor-BIWXLPfu.js → ParagraphEditor-fM9aFu8T.js} +116 -116
- package/dist/cdn/chunks/ParagraphEditor-fM9aFu8T.js.map +1 -0
- package/dist/cdn/chunks/{RichTextEditorContent-DU0gc4bi.js → RichTextEditorContent-DwNPE5H5.js} +4 -4
- package/dist/cdn/chunks/{RichTextEditorContent-DU0gc4bi.js.map → RichTextEditorContent-DwNPE5H5.js.map} +1 -1
- package/dist/cdn/chunks/{SaveModuleDialog-DR9EZlWe.js → SaveModuleDialog-BrtDXzIz.js} +4 -4
- package/dist/cdn/chunks/SaveModuleDialog-BrtDXzIz.js.map +1 -0
- package/dist/cdn/chunks/TitleEditor-D0rSnye0.js +175 -0
- package/dist/cdn/chunks/TitleEditor-D0rSnye0.js.map +1 -0
- package/dist/cdn/chunks/{blockTypeIcons-eVGGIdne.js → blockTypeIcons-YOEe5mDE.js} +3 -3
- package/dist/cdn/chunks/{blockTypeIcons-eVGGIdne.js.map → blockTypeIcons-YOEe5mDE.js.map} +1 -1
- package/dist/{de-ED7c5RpG.js → cdn/chunks/de-CATfXDKV.js} +14 -1
- package/dist/cdn/chunks/{de-ED7c5RpG.js.map → de-CATfXDKV.js.map} +1 -1
- package/dist/cdn/chunks/{en-ivilDUn0.js → en-CwCAgYL5.js} +13 -2
- package/dist/cdn/chunks/{en-ivilDUn0.js.map → en-CwCAgYL5.js.map} +1 -1
- package/dist/cdn/chunks/{extensions-CvCoOuWB.js → extensions-GYsbQFPr.js} +26 -23
- package/dist/cdn/chunks/extensions-GYsbQFPr.js.map +1 -0
- package/dist/cdn/chunks/{features-CUYy5kZQ.js → features-D-2kVhHY.js} +1264 -1188
- package/dist/cdn/chunks/features-D-2kVhHY.js.map +1 -0
- package/dist/cdn/chunks/{icons-C4zY5-I3.js → icons-fZoyKV_s.js} +2 -2
- package/dist/cdn/chunks/{icons-C4zY5-I3.js.map → icons-fZoyKV_s.js.map} +1 -1
- package/dist/cdn/chunks/{media-library-BNt3msId.js → media-library-CO2WOETY.js} +240 -240
- package/dist/cdn/chunks/{media-library-BNt3msId.js.map → media-library-CO2WOETY.js.map} +1 -1
- package/dist/{pt-BR-B5tm2iBl.js → cdn/chunks/pt-BR-D3Mg7AKe.js} +14 -1
- package/dist/cdn/chunks/{pt-BR-B5tm2iBl.js.map → pt-BR-D3Mg7AKe.js.map} +1 -1
- package/dist/cdn/chunks/{quality-BTPRPGB-.js → quality-BxPiS-wv.js} +603 -577
- package/dist/cdn/chunks/{quality-BTPRPGB-.js.map → quality-BxPiS-wv.js.map} +1 -1
- package/dist/cdn/chunks/{renderer-IOmuuZjJ.js → renderer-7z2t_bYQ.js} +142 -108
- package/dist/cdn/chunks/{renderer-IOmuuZjJ.js.map → renderer-7z2t_bYQ.js.map} +1 -1
- package/dist/cdn/chunks/{src-Dp0ZFQ4-.js → src-ftxPuuQh.js} +4 -4
- package/dist/cdn/chunks/{src-Dp0ZFQ4-.js.map → src-ftxPuuQh.js.map} +1 -1
- package/dist/cdn/chunks/{styles-DtgjgsBH.js → styles-o0HIrw9F.js} +877 -622
- package/dist/cdn/chunks/styles-o0HIrw9F.js.map +1 -0
- package/dist/cdn/chunks/{tiptap-BErAJEvo.js → tiptap-BBbH3IT9.js} +849 -725
- package/dist/cdn/chunks/tiptap-BBbH3IT9.js.map +1 -0
- package/dist/cdn/editor.css +1 -1
- package/dist/cdn/editor.js +102 -101
- package/dist/cdn/editor.js.map +1 -1
- package/dist/{cloud-Dz8Ay2FM.js → cloud-VxYMtfXC.js} +1 -1
- package/dist/{cdn/chunks/de-ED7c5RpG.js → de-CATfXDKV.js} +12 -3
- package/dist/{dist-BygsE-n3.js → dist-BDgf2G-V.js} +453 -314
- package/dist/{dist-BtDBsF3N.js → dist-BxP6TB0l.js} +2 -2
- package/dist/{dist-DWhP3Dp2.js → dist-BzuC8o3y.js} +1209 -1217
- package/dist/{dist-v-O2Subd.js → dist-C0jo8wtG.js} +2 -2
- package/dist/{dist-BTgujVMy.js → dist-C8wMh_gi.js} +2 -2
- package/dist/{dist-Cipw2HFH.js → dist-CIV3Brg-.js} +37 -4
- package/dist/{dist-HO0vjY5Z.js → dist-CNLAS2v2.js} +130 -124
- package/dist/{dist-BS5Oi67L.js → dist-CUpJmrjt.js} +2 -2
- package/dist/dist-D5lmdi1F.js +5 -0
- package/dist/{dist-T-ORzNfM.js → dist-D8C6jIXM.js} +168 -175
- package/dist/dist-DILjuzSv.js +5 -0
- package/dist/{dist-CDtcJMB2.js → dist-DXaxGLsw.js} +33 -33
- package/dist/{dist-DnGTaPRX.js → dist-DYO-w_Jf.js} +2 -2
- package/dist/{dist-CDZCyoRy.js → dist-UK-lbEBc.js} +2 -2
- package/dist/{en-ivilDUn0.js → en-CwCAgYL5.js} +12 -1
- package/dist/{extensions-BmGiz8Oo.js → extensions-Mj2-D8uK.js} +32 -29
- package/dist/{keys-B8K7Z7Ef.js → keys-BiQlvx51.js} +3 -3
- package/dist/{cdn/chunks/pt-BR-B5tm2iBl.js → pt-BR-D3Mg7AKe.js} +12 -3
- package/dist/style.css +1 -1
- package/dist/{styles-DFeOGKa_.js → styles-CJtcKmsx.js} +857 -601
- package/dist/templatical-editor.js +104 -103
- package/dist/{useCloudI18n-DFzVgYhJ.js → useCloudI18n-DKWJg6rJ.js} +1 -1
- package/dist/{useEditorCore-BXz-UXPd.js → useEditorCore-CEkf_VWX.js} +663 -633
- package/dist/{useI18n-CBbStVlD.js → useI18n-Besvmtxy.js} +1 -1
- package/dist/useMergeTag-WNzaCpXR.js +44 -0
- package/dist/{usePopoverRoot-62PlZQQ3.js → usePopoverRoot-CKt956u-.js} +1 -1
- package/package.json +21 -21
- package/dist/cdn/chunks/ModuleBrowserModal-CFMd6M7E.js.map +0 -1
- package/dist/cdn/chunks/ParagraphEditor-BIWXLPfu.js.map +0 -1
- package/dist/cdn/chunks/SaveModuleDialog-DR9EZlWe.js.map +0 -1
- package/dist/cdn/chunks/TitleEditor-DZcx2N4R.js +0 -175
- package/dist/cdn/chunks/TitleEditor-DZcx2N4R.js.map +0 -1
- package/dist/cdn/chunks/extensions-CvCoOuWB.js.map +0 -1
- package/dist/cdn/chunks/features-CUYy5kZQ.js.map +0 -1
- package/dist/cdn/chunks/styles-DtgjgsBH.js.map +0 -1
- package/dist/cdn/chunks/tiptap-BErAJEvo.js.map +0 -1
- package/dist/dist-BySzGkeC.js +0 -5
- package/dist/dist-D7JUZ2Kd.js +0 -5
- package/dist/useMergeTag-CS2bmWA0.js +0 -34
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import { K as e, L as t, M as n, P as r, T as i, Z as a, c as o, ct as s, d as c, f as l, g as u, h as d, it as f, l as p, m, ot as h, p as g, st as _, u as v, v as y, x as b, y as x } from "./draggable-BwWMFq33.js";
|
|
2
|
-
import { Ft as S, Jt as C, Q as w, Y as T,
|
|
3
|
-
import { R as
|
|
4
|
-
import { a as
|
|
5
|
-
import { n as
|
|
2
|
+
import { Ft as S, Jt as C, Q as w, Y as T, Yt as E, in as D, k as O, nn as k, nt as A, rn as ee, rt as j, tn as M, vt as te } from "./features-D-2kVhHY.js";
|
|
3
|
+
import { R as ne, U as re, V as ie, Z as ae, _ as N, c as oe, f as se, i as ce, o as le, p as ue, s as P, u as F, w as I, x as L, z as R } from "./icons-fZoyKV_s.js";
|
|
4
|
+
import { a as z, o as B, s as V } from "./styleConstants-lGobwiLH.js";
|
|
5
|
+
import { n as H, t as U } from "./RichTextEditorContent-DwNPE5H5.js";
|
|
6
6
|
//#region src/components/blocks/EmojiPickerDropdown.vue?vue&type=script&setup=true&lang.ts
|
|
7
|
-
var
|
|
7
|
+
var W = [
|
|
8
8
|
"aria-label",
|
|
9
9
|
"title",
|
|
10
10
|
"aria-expanded"
|
|
11
|
-
],
|
|
11
|
+
], G = ["aria-label"], K = { class: "tpl:mb-1.5 tpl:text-[10px] tpl:font-medium tpl:tracking-wide tpl:text-[var(--tpl-text-muted)] tpl:uppercase" }, q = { class: "tpl:grid tpl:grid-cols-10 tpl:gap-0.5" }, J = ["aria-label", "onClick"], de = /* @__PURE__ */ b({
|
|
12
12
|
__name: "EmojiPickerDropdown",
|
|
13
13
|
emits: ["insert"],
|
|
14
14
|
setup(e, { emit: t }) {
|
|
15
15
|
let i = t, { categories: c, isOpen: m, toggle: _, close: y } = w(), { t: b, format: C } = S(), T = a(null), E = a(null);
|
|
16
|
-
|
|
16
|
+
A(T, l(() => m.value)), D(E, () => {
|
|
17
17
|
m.value && y();
|
|
18
18
|
});
|
|
19
|
-
function
|
|
19
|
+
function O(e) {
|
|
20
20
|
i("insert", e), y();
|
|
21
21
|
}
|
|
22
22
|
return (e, t) => (n(), u("div", {
|
|
@@ -32,10 +32,10 @@ var q = [
|
|
|
32
32
|
"aria-haspopup": "dialog",
|
|
33
33
|
"aria-controls": "tpl-emoji-picker",
|
|
34
34
|
onClick: t[0] ||= (...e) => f(_) && f(_)(...e)
|
|
35
|
-
}, [x(f(
|
|
35
|
+
}, [x(f(N), {
|
|
36
36
|
size: 16,
|
|
37
37
|
"stroke-width": 2
|
|
38
|
-
})], 10,
|
|
38
|
+
})], 10, W), f(m) ? (n(), u("div", {
|
|
39
39
|
key: 0,
|
|
40
40
|
id: "tpl-emoji-picker",
|
|
41
41
|
ref_key: "pickerRef",
|
|
@@ -49,15 +49,15 @@ var q = [
|
|
|
49
49
|
}, [(n(!0), u(v, null, r(f(c), (e) => (n(), u("div", {
|
|
50
50
|
key: e.key,
|
|
51
51
|
class: "tpl:mb-2 tpl:last:mb-0"
|
|
52
|
-
}, [g("div",
|
|
52
|
+
}, [g("div", K, s(f(b).emoji[e.key]), 1), g("div", q, [(n(!0), u(v, null, r(e.emojis, (e) => (n(), u("button", {
|
|
53
53
|
key: e,
|
|
54
54
|
type: "button",
|
|
55
55
|
"aria-label": f(C)(f(b).paragraphEditor.emojiItemLabel, { emoji: e }),
|
|
56
56
|
class: "tpl:flex tpl:size-6 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded tpl:border-none tpl:bg-transparent tpl:text-base tpl:transition-all tpl:duration-100 tpl:hover:scale-125 tpl:hover:bg-[var(--tpl-bg-active)]",
|
|
57
|
-
onClick: (t) =>
|
|
58
|
-
}, s(e), 9,
|
|
57
|
+
onClick: (t) => O(e)
|
|
58
|
+
}, s(e), 9, J))), 128))])]))), 128))], 40, G)) : d("", !0)], 512));
|
|
59
59
|
}
|
|
60
|
-
}),
|
|
60
|
+
}), Y = [
|
|
61
61
|
"aria-label",
|
|
62
62
|
"title",
|
|
63
63
|
"aria-pressed"
|
|
@@ -80,20 +80,20 @@ var q = [
|
|
|
80
80
|
}, [(n(), m(t(e.icon), {
|
|
81
81
|
size: e.size ?? 16,
|
|
82
82
|
"stroke-width": e.strokeWidth ?? 2
|
|
83
|
-
}, null, 8, ["size", "stroke-width"]))], 10,
|
|
83
|
+
}, null, 8, ["size", "stroke-width"]))], 10, Y));
|
|
84
84
|
}
|
|
85
|
-
}),
|
|
85
|
+
}), fe = {}, pe = {
|
|
86
86
|
class: "tpl:mx-1 tpl:h-6 tpl:w-px tpl:bg-[var(--tpl-border)]",
|
|
87
87
|
"aria-hidden": "true"
|
|
88
88
|
};
|
|
89
|
-
function
|
|
90
|
-
return n(), u("span",
|
|
89
|
+
function me(e, t) {
|
|
90
|
+
return n(), u("span", pe);
|
|
91
91
|
}
|
|
92
|
-
var Z = /* @__PURE__ */
|
|
92
|
+
var Z = /* @__PURE__ */ j(fe, [["render", me]]), he = [
|
|
93
93
|
"value",
|
|
94
94
|
"aria-label",
|
|
95
95
|
"title"
|
|
96
|
-
],
|
|
96
|
+
], ge = { value: "" }, _e = ["value"], Q = /* @__PURE__ */ b({
|
|
97
97
|
__name: "ToolbarSelect",
|
|
98
98
|
props: {
|
|
99
99
|
modelValue: {},
|
|
@@ -120,23 +120,23 @@ var Z = /* @__PURE__ */ A(de, [["render", pe]]), me = [
|
|
|
120
120
|
"aria-label": e.label,
|
|
121
121
|
title: e.label,
|
|
122
122
|
onChange: a
|
|
123
|
-
}, [g("option",
|
|
123
|
+
}, [g("option", ge, s(e.placeholder ?? ""), 1), (n(!0), u(v, null, r(e.options, (e) => (n(), u("option", {
|
|
124
124
|
key: o(e),
|
|
125
125
|
value: o(e)
|
|
126
|
-
}, s(c(e)), 9,
|
|
126
|
+
}, s(c(e)), 9, _e))), 128))], 42, he));
|
|
127
127
|
}
|
|
128
|
-
}),
|
|
128
|
+
}), ve = ["data-tpl-theme", "aria-label"], ye = { class: "tpl:flex tpl:items-center tpl:gap-1" }, be = { class: "tpl:relative" }, xe = [
|
|
129
129
|
"value",
|
|
130
130
|
"aria-label",
|
|
131
131
|
"title"
|
|
132
|
-
],
|
|
132
|
+
], Se = { class: "tpl:relative" }, Ce = [
|
|
133
133
|
"value",
|
|
134
134
|
"aria-label",
|
|
135
135
|
"title"
|
|
136
|
-
],
|
|
136
|
+
], $ = { class: "tpl:flex tpl:items-center tpl:gap-1" }, we = ["aria-label", "title"], Te = {
|
|
137
137
|
key: 1,
|
|
138
138
|
class: "tpl:flex tpl:items-center tpl:gap-2 tpl:px-2 tpl:text-xs tpl:text-[var(--tpl-text-dim)]"
|
|
139
|
-
},
|
|
139
|
+
}, Ee = /* @__PURE__ */ b({
|
|
140
140
|
__name: "ParagraphToolbar",
|
|
141
141
|
props: {
|
|
142
142
|
editor: {},
|
|
@@ -146,22 +146,22 @@ var Z = /* @__PURE__ */ A(de, [["render", pe]]), me = [
|
|
|
146
146
|
},
|
|
147
147
|
emits: ["open-link-dialog", "add-merge-tag"],
|
|
148
148
|
setup(e, { emit: t }) {
|
|
149
|
-
let r = e, a = t, o = i(
|
|
150
|
-
function
|
|
149
|
+
let r = e, a = t, o = i(M, null), p = i(k, null), h = ee(C, "ParagraphToolbar"), b = O(), w = i(E, null), T = l(() => w?.isOpen.value ?? !1), { t: D } = S(), A = h.fonts;
|
|
150
|
+
function j(e) {
|
|
151
151
|
r.editor?.chain().focus().insertContent(e).run();
|
|
152
152
|
}
|
|
153
|
-
function
|
|
153
|
+
function N(e) {
|
|
154
154
|
return r.editor?.getAttributes("textStyle")[e] || "";
|
|
155
155
|
}
|
|
156
|
-
function
|
|
156
|
+
function H(e) {
|
|
157
157
|
let t = r.editor?.chain().focus();
|
|
158
158
|
e ? t?.setFontFamily(e).run() : t?.unsetFontFamily().run();
|
|
159
159
|
}
|
|
160
|
-
function
|
|
160
|
+
function U(e) {
|
|
161
161
|
let t = r.editor?.chain().focus();
|
|
162
162
|
e ? t?.setFontSize(e).run() : t?.unsetFontSize().run();
|
|
163
163
|
}
|
|
164
|
-
function
|
|
164
|
+
function W(e) {
|
|
165
165
|
let t = r.editor?.chain().focus();
|
|
166
166
|
e ? t?.setColor(e).run() : t?.unsetColor().run();
|
|
167
167
|
}
|
|
@@ -183,13 +183,13 @@ var Z = /* @__PURE__ */ A(de, [["render", pe]]), me = [
|
|
|
183
183
|
let t = r.editor?.chain().focus();
|
|
184
184
|
e ? t?.setHighlight({ color: e }).run() : t?.unsetHighlight().run();
|
|
185
185
|
}
|
|
186
|
-
return (t, r) => f(
|
|
186
|
+
return (t, r) => f(b) && !T.value ? (n(), m(c, {
|
|
187
187
|
key: 0,
|
|
188
|
-
to: f(
|
|
188
|
+
to: f(b)
|
|
189
189
|
}, [g("div", {
|
|
190
|
-
"data-tpl-theme": f(
|
|
190
|
+
"data-tpl-theme": f(p),
|
|
191
191
|
role: "toolbar",
|
|
192
|
-
"aria-label": f(
|
|
192
|
+
"aria-label": f(D).paragraphEditor.toolbar,
|
|
193
193
|
class: "tpl tpl-text-toolbar tpl:fixed tpl:z-popover tpl:flex tpl:gap-1 tpl:rounded-lg tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:px-3 tpl:py-2 tpl:shadow-lg",
|
|
194
194
|
style: _({
|
|
195
195
|
...f(o),
|
|
@@ -198,14 +198,14 @@ var Z = /* @__PURE__ */ A(de, [["render", pe]]), me = [
|
|
|
198
198
|
transform: "translateY(-100%)",
|
|
199
199
|
flexDirection: "column"
|
|
200
200
|
})
|
|
201
|
-
}, [!e.isLoading && e.editor ? (n(), u(v, { key: 0 }, [g("div",
|
|
201
|
+
}, [!e.isLoading && e.editor ? (n(), u(v, { key: 0 }, [g("div", ye, [
|
|
202
202
|
x(Q, {
|
|
203
|
-
"model-value":
|
|
204
|
-
options: f(
|
|
205
|
-
label: f(
|
|
206
|
-
placeholder: f(
|
|
203
|
+
"model-value": N("fontFamily"),
|
|
204
|
+
options: f(A),
|
|
205
|
+
label: f(D).paragraphEditor.fontFamily,
|
|
206
|
+
placeholder: f(D).paragraphEditor.defaultFont,
|
|
207
207
|
"width-class": "tpl:w-32",
|
|
208
|
-
"onUpdate:modelValue":
|
|
208
|
+
"onUpdate:modelValue": H
|
|
209
209
|
}, null, 8, [
|
|
210
210
|
"model-value",
|
|
211
211
|
"options",
|
|
@@ -213,12 +213,12 @@ var Z = /* @__PURE__ */ A(de, [["render", pe]]), me = [
|
|
|
213
213
|
"placeholder"
|
|
214
214
|
]),
|
|
215
215
|
x(Q, {
|
|
216
|
-
"model-value":
|
|
217
|
-
options: f(
|
|
218
|
-
label: f(
|
|
219
|
-
placeholder: f(
|
|
216
|
+
"model-value": N("fontSize"),
|
|
217
|
+
options: f(z),
|
|
218
|
+
label: f(D).paragraphEditor.fontSize,
|
|
219
|
+
placeholder: f(D).paragraphEditor.defaultSize,
|
|
220
220
|
"width-class": "tpl:w-20",
|
|
221
|
-
"onUpdate:modelValue":
|
|
221
|
+
"onUpdate:modelValue": U
|
|
222
222
|
}, null, 8, [
|
|
223
223
|
"model-value",
|
|
224
224
|
"options",
|
|
@@ -226,27 +226,27 @@ var Z = /* @__PURE__ */ A(de, [["render", pe]]), me = [
|
|
|
226
226
|
"placeholder"
|
|
227
227
|
]),
|
|
228
228
|
x(Z),
|
|
229
|
-
g("div",
|
|
229
|
+
g("div", be, [g("input", {
|
|
230
230
|
type: "color",
|
|
231
231
|
class: "tpl:size-8 tpl:cursor-pointer tpl:rounded tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:p-1",
|
|
232
|
-
value:
|
|
233
|
-
"aria-label": f(
|
|
234
|
-
title: f(
|
|
235
|
-
onInput: r[0] ||= (e) =>
|
|
236
|
-
}, null, 40,
|
|
237
|
-
g("div",
|
|
232
|
+
value: N("color") || f("#000000"),
|
|
233
|
+
"aria-label": f(D).paragraphEditor.textColor,
|
|
234
|
+
title: f(D).paragraphEditor.textColor,
|
|
235
|
+
onInput: r[0] ||= (e) => W(e.target.value)
|
|
236
|
+
}, null, 40, xe)]),
|
|
237
|
+
g("div", Se, [g("input", {
|
|
238
238
|
type: "color",
|
|
239
239
|
class: "tpl:size-8 tpl:cursor-pointer tpl:rounded tpl:border tpl:border-[var(--tpl-border)] tpl:p-1",
|
|
240
240
|
style: _({ backgroundColor: J() || "var(--tpl-bg)" }),
|
|
241
241
|
value: J() || f("#ffff00"),
|
|
242
|
-
"aria-label": f(
|
|
243
|
-
title: f(
|
|
242
|
+
"aria-label": f(D).paragraphEditor.highlightColor,
|
|
243
|
+
title: f(D).paragraphEditor.highlightColor,
|
|
244
244
|
onInput: r[1] ||= (e) => Y(e.target.value)
|
|
245
|
-
}, null, 44,
|
|
245
|
+
}, null, 44, Ce)]),
|
|
246
246
|
x(Z),
|
|
247
247
|
x(X, {
|
|
248
|
-
icon: f(
|
|
249
|
-
label: f(
|
|
248
|
+
icon: f(ae),
|
|
249
|
+
label: f(D).paragraphEditor.bold,
|
|
250
250
|
active: e.editor.isActive("bold"),
|
|
251
251
|
"stroke-width": 2.5,
|
|
252
252
|
onClick: r[2] ||= (t) => e.editor.chain().focus().toggleBold().run()
|
|
@@ -256,8 +256,8 @@ var Z = /* @__PURE__ */ A(de, [["render", pe]]), me = [
|
|
|
256
256
|
"active"
|
|
257
257
|
]),
|
|
258
258
|
x(X, {
|
|
259
|
-
icon: f(
|
|
260
|
-
label: f(
|
|
259
|
+
icon: f(re),
|
|
260
|
+
label: f(D).paragraphEditor.italic,
|
|
261
261
|
active: e.editor.isActive("italic"),
|
|
262
262
|
onClick: r[3] ||= (t) => e.editor.chain().focus().toggleItalic().run()
|
|
263
263
|
}, null, 8, [
|
|
@@ -266,8 +266,8 @@ var Z = /* @__PURE__ */ A(de, [["render", pe]]), me = [
|
|
|
266
266
|
"active"
|
|
267
267
|
]),
|
|
268
268
|
x(X, {
|
|
269
|
-
icon: f(
|
|
270
|
-
label: f(
|
|
269
|
+
icon: f(ce),
|
|
270
|
+
label: f(D).paragraphEditor.underline,
|
|
271
271
|
active: e.editor.isActive("underline"),
|
|
272
272
|
onClick: r[4] ||= (t) => e.editor.chain().focus().toggleUnderline().run()
|
|
273
273
|
}, null, 8, [
|
|
@@ -276,8 +276,8 @@ var Z = /* @__PURE__ */ A(de, [["render", pe]]), me = [
|
|
|
276
276
|
"active"
|
|
277
277
|
]),
|
|
278
278
|
x(X, {
|
|
279
|
-
icon: f(
|
|
280
|
-
label: f(
|
|
279
|
+
icon: f(ue),
|
|
280
|
+
label: f(D).paragraphEditor.strikethrough,
|
|
281
281
|
active: e.editor.isActive("strike"),
|
|
282
282
|
onClick: r[5] ||= (t) => e.editor.chain().focus().toggleStrike().run()
|
|
283
283
|
}, null, 8, [
|
|
@@ -287,8 +287,8 @@ var Z = /* @__PURE__ */ A(de, [["render", pe]]), me = [
|
|
|
287
287
|
]),
|
|
288
288
|
x(Z),
|
|
289
289
|
x(X, {
|
|
290
|
-
icon: f(
|
|
291
|
-
label: f(
|
|
290
|
+
icon: f(se),
|
|
291
|
+
label: f(D).paragraphEditor.subscript,
|
|
292
292
|
active: e.editor.isActive("subscript"),
|
|
293
293
|
onClick: r[6] ||= (t) => e.editor.chain().focus().toggleSubscript().run()
|
|
294
294
|
}, null, 8, [
|
|
@@ -297,8 +297,8 @@ var Z = /* @__PURE__ */ A(de, [["render", pe]]), me = [
|
|
|
297
297
|
"active"
|
|
298
298
|
]),
|
|
299
299
|
x(X, {
|
|
300
|
-
icon: f(
|
|
301
|
-
label: f(
|
|
300
|
+
icon: f(F),
|
|
301
|
+
label: f(D).paragraphEditor.superscript,
|
|
302
302
|
active: e.editor.isActive("superscript"),
|
|
303
303
|
onClick: r[7] ||= (t) => e.editor.chain().focus().toggleSuperscript().run()
|
|
304
304
|
}, null, 8, [
|
|
@@ -308,8 +308,8 @@ var Z = /* @__PURE__ */ A(de, [["render", pe]]), me = [
|
|
|
308
308
|
]),
|
|
309
309
|
x(Z),
|
|
310
310
|
x(X, {
|
|
311
|
-
icon: f(
|
|
312
|
-
label: f(
|
|
311
|
+
icon: f(ie),
|
|
312
|
+
label: f(D).paragraphEditor.addLink,
|
|
313
313
|
active: e.editor.isActive("link"),
|
|
314
314
|
onClick: r[8] ||= (e) => a("open-link-dialog")
|
|
315
315
|
}, null, 8, [
|
|
@@ -317,10 +317,10 @@ var Z = /* @__PURE__ */ A(de, [["render", pe]]), me = [
|
|
|
317
317
|
"label",
|
|
318
318
|
"active"
|
|
319
319
|
])
|
|
320
|
-
]), g("div",
|
|
320
|
+
]), g("div", $, [
|
|
321
321
|
x(X, {
|
|
322
|
-
icon: f(
|
|
323
|
-
label: f(
|
|
322
|
+
icon: f(ne),
|
|
323
|
+
label: f(D).paragraphEditor.bulletList,
|
|
324
324
|
active: e.editor.isActive("bulletList"),
|
|
325
325
|
onClick: r[9] ||= (t) => e.editor.chain().focus().toggleBulletList().run()
|
|
326
326
|
}, null, 8, [
|
|
@@ -329,8 +329,8 @@ var Z = /* @__PURE__ */ A(de, [["render", pe]]), me = [
|
|
|
329
329
|
"active"
|
|
330
330
|
]),
|
|
331
331
|
x(X, {
|
|
332
|
-
icon: f(
|
|
333
|
-
label: f(
|
|
332
|
+
icon: f(R),
|
|
333
|
+
label: f(D).paragraphEditor.numberedList,
|
|
334
334
|
active: e.editor.isActive("orderedList"),
|
|
335
335
|
onClick: r[10] ||= (t) => e.editor.chain().focus().toggleOrderedList().run()
|
|
336
336
|
}, null, 8, [
|
|
@@ -340,8 +340,8 @@ var Z = /* @__PURE__ */ A(de, [["render", pe]]), me = [
|
|
|
340
340
|
]),
|
|
341
341
|
x(Z),
|
|
342
342
|
x(X, {
|
|
343
|
-
icon: f(
|
|
344
|
-
label: f(
|
|
343
|
+
icon: f(P),
|
|
344
|
+
label: f(D).paragraphEditor.alignLeft,
|
|
345
345
|
active: e.editor.isActive({ textAlign: "left" }),
|
|
346
346
|
onClick: r[11] ||= (t) => e.editor.chain().focus().setTextAlign("left").run()
|
|
347
347
|
}, null, 8, [
|
|
@@ -350,8 +350,8 @@ var Z = /* @__PURE__ */ A(de, [["render", pe]]), me = [
|
|
|
350
350
|
"active"
|
|
351
351
|
]),
|
|
352
352
|
x(X, {
|
|
353
|
-
icon: f(
|
|
354
|
-
label: f(
|
|
353
|
+
icon: f(oe),
|
|
354
|
+
label: f(D).paragraphEditor.alignCenter,
|
|
355
355
|
active: e.editor.isActive({ textAlign: "center" }),
|
|
356
356
|
onClick: r[12] ||= (t) => e.editor.chain().focus().setTextAlign("center").run()
|
|
357
357
|
}, null, 8, [
|
|
@@ -360,8 +360,8 @@ var Z = /* @__PURE__ */ A(de, [["render", pe]]), me = [
|
|
|
360
360
|
"active"
|
|
361
361
|
]),
|
|
362
362
|
x(X, {
|
|
363
|
-
icon: f(
|
|
364
|
-
label: f(
|
|
363
|
+
icon: f(le),
|
|
364
|
+
label: f(D).paragraphEditor.alignRight,
|
|
365
365
|
active: e.editor.isActive({ textAlign: "right" }),
|
|
366
366
|
onClick: r[13] ||= (t) => e.editor.chain().focus().setTextAlign("right").run()
|
|
367
367
|
}, null, 8, [
|
|
@@ -372,8 +372,8 @@ var Z = /* @__PURE__ */ A(de, [["render", pe]]), me = [
|
|
|
372
372
|
x(Z),
|
|
373
373
|
x(Q, {
|
|
374
374
|
"model-value": G(),
|
|
375
|
-
options: f(
|
|
376
|
-
label: f(
|
|
375
|
+
options: f(V),
|
|
376
|
+
label: f(D).paragraphEditor.lineHeight,
|
|
377
377
|
placeholder: "LH",
|
|
378
378
|
"width-class": "tpl:w-16",
|
|
379
379
|
"onUpdate:modelValue": K
|
|
@@ -383,9 +383,9 @@ var Z = /* @__PURE__ */ A(de, [["render", pe]]), me = [
|
|
|
383
383
|
"label"
|
|
384
384
|
]),
|
|
385
385
|
x(Q, {
|
|
386
|
-
"model-value":
|
|
387
|
-
options: f(
|
|
388
|
-
label: f(
|
|
386
|
+
"model-value": N("letterSpacing"),
|
|
387
|
+
options: f(B),
|
|
388
|
+
label: f(D).paragraphEditor.letterSpacing,
|
|
389
389
|
placeholder: "LS",
|
|
390
390
|
"width-class": "tpl:w-20",
|
|
391
391
|
"onUpdate:modelValue": q
|
|
@@ -396,29 +396,29 @@ var Z = /* @__PURE__ */ A(de, [["render", pe]]), me = [
|
|
|
396
396
|
]),
|
|
397
397
|
x(Z),
|
|
398
398
|
x(X, {
|
|
399
|
-
icon: f(
|
|
400
|
-
label: f(
|
|
399
|
+
icon: f(I),
|
|
400
|
+
label: f(D).paragraphEditor.clearFormatting,
|
|
401
401
|
onClick: r[14] ||= (t) => e.editor.chain().focus().clearNodes().unsetAllMarks().run()
|
|
402
402
|
}, null, 8, ["icon", "label"]),
|
|
403
403
|
x(Z),
|
|
404
|
-
x(
|
|
404
|
+
x(de, { onInsert: j }),
|
|
405
405
|
e.canRequestMergeTag ? (n(), u(v, { key: 0 }, [x(Z), g("button", {
|
|
406
406
|
type: "button",
|
|
407
407
|
class: "tpl:flex tpl:h-8 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:gap-1.5 tpl:rounded tpl:border-none tpl:bg-transparent tpl:px-2.5 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text)] tpl:transition-all tpl:duration-150 tpl:hover:bg-[var(--tpl-bg-active)]",
|
|
408
|
-
"aria-label": f(
|
|
409
|
-
title: f(
|
|
408
|
+
"aria-label": f(D).mergeTag.insert,
|
|
409
|
+
title: f(D).mergeTag.insert,
|
|
410
410
|
onClick: r[15] ||= (e) => a("add-merge-tag")
|
|
411
|
-
}, [x(f(
|
|
411
|
+
}, [x(f(L), {
|
|
412
412
|
size: 16,
|
|
413
413
|
"stroke-width": 2
|
|
414
|
-
}), y(" " + s(f(
|
|
415
|
-
])], 64)) : (n(), u("div",
|
|
414
|
+
}), y(" " + s(f(D).mergeTag.insert), 1)], 8, we)], 64)) : d("", !0)
|
|
415
|
+
])], 64)) : (n(), u("div", Te, [x(f(te), {
|
|
416
416
|
class: "tpl-spinner",
|
|
417
417
|
size: 14,
|
|
418
418
|
"stroke-width": 2
|
|
419
|
-
}), y(" " + s(f(
|
|
419
|
+
}), y(" " + s(f(D).errors.editorLoading), 1)]))], 12, ve)], 8, ["to"])) : d("", !0);
|
|
420
420
|
}
|
|
421
|
-
}),
|
|
421
|
+
}), De = { class: "tpl-text-editor-wrapper tpl:relative" }, Oe = /* @__PURE__ */ b({
|
|
422
422
|
__name: "ParagraphEditor",
|
|
423
423
|
props: {
|
|
424
424
|
block: {},
|
|
@@ -426,25 +426,25 @@ var Z = /* @__PURE__ */ A(de, [["render", pe]]), me = [
|
|
|
426
426
|
},
|
|
427
427
|
emits: ["done"],
|
|
428
428
|
setup(t, { emit: r }) {
|
|
429
|
-
let i = t, a = r, o =
|
|
429
|
+
let i = t, a = r, o = O(), { editor: s, EditorContent: c, isLoading: l, initError: d, retry: p, showLinkDialog: m, linkUrl: h, linkDialogRef: g, canRequestMergeTag: _, openLinkDialog: v, insertLink: y, removeLink: b, closeLinkDialog: S, handleLinkKeydown: C, handleAddMergeTag: w } = T({
|
|
430
430
|
blockId: () => i.block.id,
|
|
431
431
|
blockContent: () => i.block.content,
|
|
432
432
|
onDone: () => a("done"),
|
|
433
433
|
editorName: "ParagraphEditor",
|
|
434
434
|
async loadExtensions({ mergeTags: e, syntax: t, triggerChar: n, autocompleteEnabled: r, suggestionEmptyText: i }) {
|
|
435
435
|
let [{ Editor: a, EditorContent: s }, { default: c }, { default: l }, { default: u }, { default: d }, { default: f }, { default: p }, { TextStyle: m }, { default: h }, { default: g }, { default: _ }, { MergeTagNode: v, MergeTagSuggestion: y, LogicMergeTagNode: b, FontSize: x, LineHeight: S, LetterSpacing: C }] = await Promise.all([
|
|
436
|
-
import("./tiptap-
|
|
437
|
-
import("./tiptap-
|
|
438
|
-
import("./tiptap-
|
|
439
|
-
import("./tiptap-
|
|
440
|
-
import("./tiptap-
|
|
441
|
-
import("./tiptap-
|
|
442
|
-
import("./tiptap-
|
|
443
|
-
import("./tiptap-
|
|
444
|
-
import("./tiptap-
|
|
445
|
-
import("./tiptap-
|
|
446
|
-
import("./tiptap-
|
|
447
|
-
import("./extensions-
|
|
436
|
+
import("./tiptap-BBbH3IT9.js").then((e) => e.i),
|
|
437
|
+
import("./tiptap-BBbH3IT9.js").then((e) => e.a),
|
|
438
|
+
import("./tiptap-BBbH3IT9.js").then((e) => e.u),
|
|
439
|
+
import("./tiptap-BBbH3IT9.js").then((e) => e.o),
|
|
440
|
+
import("./tiptap-BBbH3IT9.js").then((e) => e.l),
|
|
441
|
+
import("./tiptap-BBbH3IT9.js").then((e) => e.c),
|
|
442
|
+
import("./tiptap-BBbH3IT9.js").then((e) => e.s),
|
|
443
|
+
import("./tiptap-BBbH3IT9.js").then((e) => e.m),
|
|
444
|
+
import("./tiptap-BBbH3IT9.js").then((e) => e.p),
|
|
445
|
+
import("./tiptap-BBbH3IT9.js").then((e) => e.f),
|
|
446
|
+
import("./tiptap-BBbH3IT9.js").then((e) => e.d),
|
|
447
|
+
import("./extensions-GYsbQFPr.js")
|
|
448
448
|
]);
|
|
449
449
|
return {
|
|
450
450
|
TiptapEditor: a,
|
|
@@ -489,8 +489,8 @@ var Z = /* @__PURE__ */ A(de, [["render", pe]]), me = [
|
|
|
489
489
|
};
|
|
490
490
|
}
|
|
491
491
|
});
|
|
492
|
-
return (r, i) => (n(), u("div",
|
|
493
|
-
x(
|
|
492
|
+
return (r, i) => (n(), u("div", De, [
|
|
493
|
+
x(Ee, {
|
|
494
494
|
editor: f(s),
|
|
495
495
|
"toolbar-position": t.toolbarPosition,
|
|
496
496
|
"is-loading": f(l),
|
|
@@ -505,7 +505,7 @@ var Z = /* @__PURE__ */ A(de, [["render", pe]]), me = [
|
|
|
505
505
|
"onOpenLinkDialog",
|
|
506
506
|
"onAddMergeTag"
|
|
507
507
|
]),
|
|
508
|
-
x(
|
|
508
|
+
x(U, {
|
|
509
509
|
editor: f(s),
|
|
510
510
|
"editor-content": f(c),
|
|
511
511
|
"is-loading": f(l),
|
|
@@ -518,7 +518,7 @@ var Z = /* @__PURE__ */ A(de, [["render", pe]]), me = [
|
|
|
518
518
|
"init-error",
|
|
519
519
|
"onRetry"
|
|
520
520
|
]),
|
|
521
|
-
x(
|
|
521
|
+
x(H, {
|
|
522
522
|
visible: f(m),
|
|
523
523
|
"is-editing-link": f(s)?.isActive("link") ?? !1,
|
|
524
524
|
"dialog-ref": f(g),
|
|
@@ -543,6 +543,6 @@ var Z = /* @__PURE__ */ A(de, [["render", pe]]), me = [
|
|
|
543
543
|
}
|
|
544
544
|
});
|
|
545
545
|
//#endregion
|
|
546
|
-
export {
|
|
546
|
+
export { Oe as default };
|
|
547
547
|
|
|
548
|
-
//# sourceMappingURL=ParagraphEditor-
|
|
548
|
+
//# sourceMappingURL=ParagraphEditor-fM9aFu8T.js.map
|