@templatical/editor 0.16.1 → 0.16.3
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/{AiFeatureMenu-Rb8G3EBo.js → AiFeatureMenu-CcGRd1xE.js} +1 -1
- package/dist/{CloudEditor-D88gLBXp.js → CloudEditor-CUIWUMp5.js} +6 -6
- package/dist/{CollaboratorBar-dxCD8jSi.js → CollaboratorBar-DmxqeBYZ.js} +1 -1
- package/dist/ColorPicker-Gs4BMVog.js +474 -0
- package/dist/{CountdownToolbar-8XVTOuGX.js → CountdownToolbar-92w1YySJ.js} +2 -2
- package/dist/{ModuleBrowserModal-l4_RCC8m.js → ModuleBrowserModal-DsehjLvh.js} +4 -4
- package/dist/{ModulePreviewCanvas-BqYAr4fz.js → ModulePreviewCanvas-BBfuS8VW.js} +1 -1
- package/dist/{NumberWithSuffix-Di-cDy_m.js → NumberWithSuffix-BxSRfI8b.js} +1 -1
- package/dist/{ParagraphEditor-DIQ1jmSP.js → ParagraphEditor-vgvQxicC.js} +77 -87
- package/dist/{RichTextEditorContent-DkTJ6KK8.js → RichTextEditorContent-Dza2oPvh.js} +1 -1
- package/dist/{SaveModuleDialog-DPo3Raon.js → SaveModuleDialog-DNWGCHlS.js} +2 -2
- package/dist/{SnapshotHistory-m7brKV7C.js → SnapshotHistory-BLmnNLg1.js} +2 -2
- package/dist/{TestEmailModal-BE9sFEIl.js → TestEmailModal-D6v1hgY2.js} +2 -2
- package/dist/{TitleEditor-BATN-k-Q.js → TitleEditor-DPdzOQpq.js} +2 -2
- package/dist/{TplModal-DHBcZ1gq.js → TplModal-DObT0uxf.js} +1 -1
- package/dist/{blockTypeIcons-wRchKKx0.js → blockTypeIcons-B9f5fH_5.js} +1 -1
- package/dist/bundle-stats.json +6 -6
- package/dist/cdn/chunks/{AiFeatureMenu-W7VQFAwq.js → AiFeatureMenu-CyUCHd9I.js} +8 -8
- package/dist/cdn/chunks/{AiFeatureMenu-W7VQFAwq.js.map → AiFeatureMenu-CyUCHd9I.js.map} +1 -1
- package/dist/cdn/chunks/{BlockIssueBadge-ww2vNIfJ.js → BlockIssueBadge-BAa_dI-c.js} +5 -5
- package/dist/cdn/chunks/{BlockIssueBadge-ww2vNIfJ.js.map → BlockIssueBadge-BAa_dI-c.js.map} +1 -1
- package/dist/cdn/chunks/{CloudEditor-BVSJ1kvB.js → CloudEditor-ClfgLU48.js} +159 -159
- package/dist/cdn/chunks/{CloudEditor-BVSJ1kvB.js.map → CloudEditor-ClfgLU48.js.map} +1 -1
- package/dist/cdn/chunks/{CollaboratorBar-BFrAua9a.js → CollaboratorBar-DCc5SL0P.js} +3 -3
- package/dist/cdn/chunks/{CollaboratorBar-BFrAua9a.js.map → CollaboratorBar-DCc5SL0P.js.map} +1 -1
- package/dist/cdn/chunks/ColorPicker-Pi-1fR8c.js +471 -0
- package/dist/cdn/chunks/ColorPicker-Pi-1fR8c.js.map +1 -0
- package/dist/cdn/chunks/{CountdownBlock-MC-mhtQD.js → CountdownBlock-Bj7aoBUU.js} +4 -4
- package/dist/cdn/chunks/{CountdownBlock-MC-mhtQD.js.map → CountdownBlock-Bj7aoBUU.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownToolbar-dXyr7tz-.js → CountdownToolbar-B1oniVq1.js} +4 -4
- package/dist/cdn/chunks/{CountdownToolbar-dXyr7tz-.js.map → CountdownToolbar-B1oniVq1.js.map} +1 -1
- package/dist/cdn/chunks/{IssuesPanel-CTxSgViL.js → IssuesPanel-BXLVRo-c.js} +7 -7
- package/dist/cdn/chunks/{IssuesPanel-CTxSgViL.js.map → IssuesPanel-BXLVRo-c.js.map} +1 -1
- package/dist/cdn/chunks/{ModuleBrowserModal-B5sCsrud.js → ModuleBrowserModal-C7BkJvzf.js} +6 -6
- package/dist/cdn/chunks/{ModuleBrowserModal-B5sCsrud.js.map → ModuleBrowserModal-C7BkJvzf.js.map} +1 -1
- package/dist/cdn/chunks/{ModulePreviewCanvas-DGTGo8kg.js → ModulePreviewCanvas-BJn-ZHlC.js} +10 -10
- package/dist/cdn/chunks/{ModulePreviewCanvas-DGTGo8kg.js.map → ModulePreviewCanvas-BJn-ZHlC.js.map} +1 -1
- package/dist/cdn/chunks/{NumberWithSuffix-tAHfui6k.js → NumberWithSuffix-CkOxH3F7.js} +2 -2
- package/dist/cdn/chunks/{NumberWithSuffix-tAHfui6k.js.map → NumberWithSuffix-CkOxH3F7.js.map} +1 -1
- package/dist/cdn/chunks/{ParagraphEditor-CB5FGRs3.js → ParagraphEditor-4cMKKC-V.js} +181 -190
- package/dist/cdn/chunks/ParagraphEditor-4cMKKC-V.js.map +1 -0
- package/dist/cdn/chunks/{RichTextEditorContent-CPelbtck.js → RichTextEditorContent-7RZe4tbj.js} +6 -6
- package/dist/cdn/chunks/{RichTextEditorContent-CPelbtck.js.map → RichTextEditorContent-7RZe4tbj.js.map} +1 -1
- package/dist/cdn/chunks/{SaveModuleDialog-7f9uUUEC.js → SaveModuleDialog-mr9A4j6G.js} +4 -4
- package/dist/cdn/chunks/{SaveModuleDialog-7f9uUUEC.js.map → SaveModuleDialog-mr9A4j6G.js.map} +1 -1
- package/dist/cdn/chunks/{TitleEditor-C0mYpgs4.js → TitleEditor-Cqw2jvuc.js} +8 -8
- package/dist/cdn/chunks/{TitleEditor-C0mYpgs4.js.map → TitleEditor-Cqw2jvuc.js.map} +1 -1
- package/dist/cdn/chunks/{blockTypeIcons-BtxaUtlx.js → blockTypeIcons-B_xRBxSU.js} +8 -8
- package/dist/cdn/chunks/{blockTypeIcons-BtxaUtlx.js.map → blockTypeIcons-B_xRBxSU.js.map} +1 -1
- package/dist/cdn/chunks/{extensions-BJ7vaBol.js → extensions-Btyx_IMf.js} +19 -19
- package/dist/cdn/chunks/{extensions-BJ7vaBol.js.map → extensions-Btyx_IMf.js.map} +1 -1
- package/dist/cdn/chunks/{features-CgbSSCgv.js → features-Dwb5aTLg.js} +18 -16
- package/dist/cdn/chunks/features-Dwb5aTLg.js.map +1 -0
- package/dist/cdn/chunks/{icons-Dlx5MT1V.js → icons-Dhqh5lYQ.js} +2 -2
- package/dist/cdn/chunks/{icons-Dlx5MT1V.js.map → icons-Dhqh5lYQ.js.map} +1 -1
- package/dist/cdn/chunks/{media-library-BMlykZGq.js → media-library-DRodsf2D.js} +101 -101
- package/dist/cdn/chunks/{media-library-BMlykZGq.js.map → media-library-DRodsf2D.js.map} +1 -1
- package/dist/cdn/chunks/{quality-DsVgXk_j.js → quality-A_V2Iqu_.js} +435 -435
- package/dist/cdn/chunks/{quality-DsVgXk_j.js.map → quality-A_V2Iqu_.js.map} +1 -1
- package/dist/cdn/chunks/{renderer-DPvEtVGO.js → renderer-BM_-zceB.js} +12 -12
- package/dist/cdn/chunks/renderer-BM_-zceB.js.map +1 -0
- package/dist/cdn/chunks/{src-CAdirukY.js → src-DSomxPI-.js} +4 -4
- package/dist/cdn/chunks/{src-CAdirukY.js.map → src-DSomxPI-.js.map} +1 -1
- package/dist/cdn/chunks/{styles-D7u4vCpH.js → styles--UXn88wH.js} +829 -829
- package/dist/cdn/chunks/{styles-D7u4vCpH.js.map → styles--UXn88wH.js.map} +1 -1
- package/dist/cdn/editor.css +1 -1
- package/dist/cdn/editor.js +30 -30
- package/dist/{dist-CFOQvhSC.js → color-DhoxCSMv.js} +9 -1
- package/dist/style.css +1 -1
- package/dist/{styles-B-yhoJnH.js → styles-CPt6RYEc.js} +6 -6
- package/dist/templatical-editor.js +4 -4
- package/dist/{useEditorCore-CV1ct_17.js → useEditorCore-CSfeEwCj.js} +196 -202
- package/package.json +8 -8
- package/dist/ColorPicker-CAgMCX3A.js +0 -442
- package/dist/cdn/chunks/ColorPicker-DmxMDn-t.js +0 -439
- package/dist/cdn/chunks/ColorPicker-DmxMDn-t.js.map +0 -1
- package/dist/cdn/chunks/ParagraphEditor-CB5FGRs3.js.map +0 -1
- package/dist/cdn/chunks/features-CgbSSCgv.js.map +0 -1
- package/dist/cdn/chunks/renderer-DPvEtVGO.js.map +0 -1
|
@@ -1,27 +1,27 @@
|
|
|
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-D840DIZB.js";
|
|
2
|
-
import { $t as S, Qt as C,
|
|
3
|
-
import { B as
|
|
4
|
-
import { c as
|
|
5
|
-
import { n as
|
|
2
|
+
import { $t as S, Qt as C, St as w, X as T, Z as E, cn as D, dn as O, en as k, fn as A, k as j, nt as M, ot as N, st as P, tn as ee, un as te, zt as F } from "./features-Dwb5aTLg.js";
|
|
3
|
+
import { B as ne, C as re, H as ie, L as ae, R as oe, X as se, Z as ce, b as le, c as ue, d as de, f as fe, g as I, i as pe, l as me, o as he, s as ge } from "./icons-Dhqh5lYQ.js";
|
|
4
|
+
import { c as _e, o as ve, r as ye, s as be, t as xe } from "./ColorPicker-Pi-1fR8c.js";
|
|
5
|
+
import { n as L, t as R } from "./RichTextEditorContent-7RZe4tbj.js";
|
|
6
6
|
//#region src/components/blocks/EmojiPickerDropdown.vue?vue&type=script&setup=true&lang.ts
|
|
7
|
-
var
|
|
7
|
+
var z = [
|
|
8
8
|
"aria-label",
|
|
9
9
|
"title",
|
|
10
10
|
"aria-expanded"
|
|
11
|
-
],
|
|
11
|
+
], B = ["aria-label"], V = { class: "tpl:mb-1.5 tpl:text-[10px] tpl:font-medium tpl:tracking-wide tpl:text-[var(--tpl-text-muted)] tpl:uppercase" }, H = { class: "tpl:grid tpl:grid-cols-10 tpl:gap-0.5" }, U = ["aria-label", "onClick"], Se = /* @__PURE__ */ b({
|
|
12
12
|
__name: "EmojiPickerDropdown",
|
|
13
13
|
emits: ["insert"],
|
|
14
14
|
setup(e, { emit: t }) {
|
|
15
|
-
let i = t, { categories: c, isOpen: m, toggle: _, close: y } =
|
|
16
|
-
|
|
15
|
+
let i = t, { categories: c, isOpen: m, toggle: _, close: y } = M(), { t: b, format: S } = F(), C = a(null), w = a(null);
|
|
16
|
+
N(C, l(() => m.value)), A(w, () => {
|
|
17
17
|
m.value && y();
|
|
18
18
|
});
|
|
19
|
-
function
|
|
19
|
+
function T(e) {
|
|
20
20
|
i("insert", e), y();
|
|
21
21
|
}
|
|
22
22
|
return (e, t) => (n(), u("div", {
|
|
23
23
|
ref_key: "rootRef",
|
|
24
|
-
ref:
|
|
24
|
+
ref: w,
|
|
25
25
|
class: "tpl:relative"
|
|
26
26
|
}, [g("button", {
|
|
27
27
|
type: "button",
|
|
@@ -32,10 +32,10 @@ var R = [
|
|
|
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(I), {
|
|
36
36
|
size: 16,
|
|
37
37
|
"stroke-width": 2
|
|
38
|
-
})], 10,
|
|
38
|
+
})], 10, z), f(m) ? (n(), u("div", {
|
|
39
39
|
key: 0,
|
|
40
40
|
id: "tpl-emoji-picker",
|
|
41
41
|
ref_key: "pickerRef",
|
|
@@ -49,19 +49,19 @@ var R = [
|
|
|
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", V, s(f(b).emoji[e.key]), 1), g("div", H, [(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(S)(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) => T(e)
|
|
58
|
+
}, s(e), 9, U))), 128))])]))), 128))], 40, B)) : d("", !0)], 512));
|
|
59
59
|
}
|
|
60
|
-
}),
|
|
60
|
+
}), W = [
|
|
61
61
|
"aria-label",
|
|
62
62
|
"title",
|
|
63
63
|
"aria-pressed"
|
|
64
|
-
],
|
|
64
|
+
], G = /* @__PURE__ */ b({
|
|
65
65
|
__name: "ToolbarIconButton",
|
|
66
66
|
props: {
|
|
67
67
|
icon: {},
|
|
@@ -80,20 +80,20 @@ var R = [
|
|
|
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, W));
|
|
84
84
|
}
|
|
85
|
-
}),
|
|
85
|
+
}), K = {}, q = {
|
|
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 J(e, t) {
|
|
90
|
+
return n(), u("span", q);
|
|
91
91
|
}
|
|
92
|
-
var
|
|
92
|
+
var Y = /*#__PURE__*/ P(K, [["render", J]]), X = [
|
|
93
93
|
"value",
|
|
94
94
|
"aria-label",
|
|
95
95
|
"title"
|
|
96
|
-
],
|
|
96
|
+
], Z = { value: "" }, Ce = ["value"], Q = /* @__PURE__ */ b({
|
|
97
97
|
__name: "ToolbarSelect",
|
|
98
98
|
props: {
|
|
99
99
|
modelValue: {},
|
|
@@ -120,31 +120,23 @@ var J = /*#__PURE__*/ M(G, [["render", q]]), Y = [
|
|
|
120
120
|
"aria-label": e.label,
|
|
121
121
|
title: e.label,
|
|
122
122
|
onChange: a
|
|
123
|
-
}, [g("option",
|
|
123
|
+
}, [g("option", Z, 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, Ce))), 128))], 42,
|
|
126
|
+
}, s(c(e)), 9, Ce))), 128))], 42, X));
|
|
127
127
|
}
|
|
128
128
|
});
|
|
129
129
|
//#endregion
|
|
130
130
|
//#region src/utils/richTextColor.ts
|
|
131
|
-
function
|
|
131
|
+
function $(e, t) {
|
|
132
132
|
return e || t || "#000000";
|
|
133
133
|
}
|
|
134
134
|
//#endregion
|
|
135
135
|
//#region src/components/blocks/ParagraphToolbar.vue?vue&type=script&setup=true&lang.ts
|
|
136
|
-
var we = ["data-tpl-theme", "aria-label"], Te = { class: "tpl:flex tpl:items-center tpl:gap-1" }, Ee = { class: "tpl:
|
|
137
|
-
"value",
|
|
138
|
-
"aria-label",
|
|
139
|
-
"title"
|
|
140
|
-
], $ = ["aria-label", "title"], Oe = { class: "tpl:relative" }, ke = [
|
|
141
|
-
"value",
|
|
142
|
-
"aria-label",
|
|
143
|
-
"title"
|
|
144
|
-
], Ae = { class: "tpl:flex tpl:items-center tpl:gap-1" }, je = ["aria-label", "title"], Me = ["aria-label", "title"], Ne = {
|
|
136
|
+
var we = ["data-tpl-theme", "aria-label"], Te = { class: "tpl:flex tpl:items-center tpl:gap-1" }, Ee = { class: "tpl:flex tpl:items-center tpl:gap-1" }, De = ["aria-label", "title"], Oe = ["aria-label", "title"], ke = {
|
|
145
137
|
key: 1,
|
|
146
138
|
class: "tpl:flex tpl:items-center tpl:gap-2 tpl:px-2 tpl:text-xs tpl:text-[var(--tpl-text-dim)]"
|
|
147
|
-
},
|
|
139
|
+
}, Ae = /* @__PURE__ */ b({
|
|
148
140
|
__name: "ParagraphToolbar",
|
|
149
141
|
props: {
|
|
150
142
|
editor: {},
|
|
@@ -159,63 +151,63 @@ var we = ["data-tpl-theme", "aria-label"], Te = { class: "tpl:flex tpl:items-cen
|
|
|
159
151
|
"add-logic-tag"
|
|
160
152
|
],
|
|
161
153
|
setup(e, { emit: t }) {
|
|
162
|
-
let r = e, a = t, o = i(
|
|
163
|
-
function
|
|
154
|
+
let r = e, a = t, o = i(D, null), p = i(te, null), h = O(S, "ParagraphToolbar"), b = j(), T = i(ee, null), E = i(k, null), A = i(C, null), M = l(() => (T?.isOpen.value ?? !1) || (E?.isOpen.value ?? !1)), { t: N } = F(), P = h.fonts;
|
|
155
|
+
function I(e) {
|
|
164
156
|
r.editor?.chain().focus().insertContent(e).run();
|
|
165
157
|
}
|
|
166
|
-
function
|
|
158
|
+
function L(e) {
|
|
167
159
|
return r.editor?.getAttributes("textStyle")[e] || "";
|
|
168
160
|
}
|
|
169
|
-
function
|
|
161
|
+
function R(e) {
|
|
170
162
|
let t = r.editor?.chain().focus();
|
|
171
163
|
e ? t?.setFontFamily(e).run() : t?.unsetFontFamily().run();
|
|
172
164
|
}
|
|
173
|
-
function
|
|
165
|
+
function z(e) {
|
|
174
166
|
let t = r.editor?.chain().focus();
|
|
175
167
|
e ? t?.setFontSize(e).run() : t?.unsetFontSize().run();
|
|
176
168
|
}
|
|
177
|
-
function
|
|
169
|
+
function B() {
|
|
178
170
|
return r.editor?.isActive("link") ?? !1;
|
|
179
171
|
}
|
|
180
|
-
function
|
|
172
|
+
function V() {
|
|
181
173
|
return r.editor?.getAttributes("link").color || "";
|
|
182
174
|
}
|
|
183
|
-
function
|
|
175
|
+
function H(e) {
|
|
184
176
|
let t = r.editor?.chain().focus();
|
|
185
|
-
t && (
|
|
186
|
-
}
|
|
187
|
-
function H() {
|
|
188
|
-
let e = O?.content.value.settings;
|
|
189
|
-
return z() ? Q(B(), e?.linkColor || e?.textColor) : Q(I("color"), e?.textColor);
|
|
177
|
+
t && (B() ? (t.extendMarkRange("link").updateAttributes("link", { color: e || null }), e && t.unsetColor(), t.run()) : e ? t.setColor(e).updateAttributes("link", { color: e }).run() : t.unsetColor().run());
|
|
190
178
|
}
|
|
191
179
|
function U() {
|
|
192
|
-
|
|
180
|
+
let e = A?.content.value.settings;
|
|
181
|
+
return B() ? $(V(), e?.linkColor || e?.textColor) : $(L("color"), e?.textColor);
|
|
182
|
+
}
|
|
183
|
+
function W() {
|
|
184
|
+
return B() ? V() : L("color");
|
|
193
185
|
}
|
|
194
|
-
function
|
|
186
|
+
function K() {
|
|
195
187
|
return r.editor?.getAttributes("paragraph").lineHeight || "";
|
|
196
188
|
}
|
|
197
|
-
function
|
|
189
|
+
function q(e) {
|
|
198
190
|
let t = r.editor?.chain().focus();
|
|
199
191
|
e ? t?.setLineHeight(e).run() : t?.unsetLineHeight().run();
|
|
200
192
|
}
|
|
201
|
-
function
|
|
193
|
+
function J(e) {
|
|
202
194
|
let t = r.editor?.chain().focus();
|
|
203
195
|
e && e !== "normal" ? t?.setLetterSpacing(e).run() : t?.unsetLetterSpacing().run();
|
|
204
196
|
}
|
|
205
|
-
function
|
|
197
|
+
function X() {
|
|
206
198
|
return r.editor?.getAttributes("highlight").color || "";
|
|
207
199
|
}
|
|
208
|
-
function
|
|
200
|
+
function Z(e) {
|
|
209
201
|
let t = r.editor?.chain().focus();
|
|
210
202
|
e ? t?.setHighlight({ color: e }).run() : t?.unsetHighlight().run();
|
|
211
203
|
}
|
|
212
|
-
return (t, r) => f(b) && !
|
|
204
|
+
return (t, r) => f(b) && !M.value ? (n(), m(c, {
|
|
213
205
|
key: 0,
|
|
214
206
|
to: f(b)
|
|
215
207
|
}, [g("div", {
|
|
216
208
|
"data-tpl-theme": f(p),
|
|
217
209
|
role: "toolbar",
|
|
218
|
-
"aria-label": f(
|
|
210
|
+
"aria-label": f(N).paragraphEditor.toolbar,
|
|
219
211
|
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",
|
|
220
212
|
style: _({
|
|
221
213
|
...f(o),
|
|
@@ -225,247 +217,246 @@ var we = ["data-tpl-theme", "aria-label"], Te = { class: "tpl:flex tpl:items-cen
|
|
|
225
217
|
flexDirection: "column"
|
|
226
218
|
})
|
|
227
219
|
}, [!e.isLoading && e.editor ? (n(), u(v, { key: 0 }, [g("div", Te, [
|
|
228
|
-
x(
|
|
229
|
-
"model-value":
|
|
230
|
-
options: f(
|
|
231
|
-
label: f(
|
|
232
|
-
placeholder: f(
|
|
220
|
+
x(Q, {
|
|
221
|
+
"model-value": L("fontFamily"),
|
|
222
|
+
options: f(P),
|
|
223
|
+
label: f(N).paragraphEditor.fontFamily,
|
|
224
|
+
placeholder: f(N).paragraphEditor.defaultFont,
|
|
233
225
|
"width-class": "tpl:w-32",
|
|
234
|
-
"onUpdate:modelValue":
|
|
226
|
+
"onUpdate:modelValue": R
|
|
235
227
|
}, null, 8, [
|
|
236
228
|
"model-value",
|
|
237
229
|
"options",
|
|
238
230
|
"label",
|
|
239
231
|
"placeholder"
|
|
240
232
|
]),
|
|
241
|
-
x(
|
|
242
|
-
"model-value":
|
|
243
|
-
options: f(
|
|
244
|
-
label: f(
|
|
245
|
-
placeholder: f(
|
|
233
|
+
x(Q, {
|
|
234
|
+
"model-value": L("fontSize"),
|
|
235
|
+
options: f(ve),
|
|
236
|
+
label: f(N).paragraphEditor.fontSize,
|
|
237
|
+
placeholder: f(N).paragraphEditor.defaultSize,
|
|
246
238
|
"width-class": "tpl:w-20",
|
|
247
|
-
"onUpdate:modelValue":
|
|
239
|
+
"onUpdate:modelValue": z
|
|
248
240
|
}, null, 8, [
|
|
249
241
|
"model-value",
|
|
250
242
|
"options",
|
|
251
243
|
"label",
|
|
252
244
|
"placeholder"
|
|
253
245
|
]),
|
|
254
|
-
x(
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
"
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
"aria-label"
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
size:
|
|
271
|
-
"
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
value
|
|
278
|
-
"
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
x(
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
label: f(M).paragraphEditor.bold,
|
|
246
|
+
x(Y),
|
|
247
|
+
x(xe, {
|
|
248
|
+
"swatch-only": "",
|
|
249
|
+
size: "sm",
|
|
250
|
+
"data-testid": "text-color-picker",
|
|
251
|
+
"model-value": W(),
|
|
252
|
+
"seed-color": U(),
|
|
253
|
+
"aria-label": f(N).paragraphEditor.textColor,
|
|
254
|
+
"onUpdate:modelValue": H
|
|
255
|
+
}, null, 8, [
|
|
256
|
+
"model-value",
|
|
257
|
+
"seed-color",
|
|
258
|
+
"aria-label"
|
|
259
|
+
]),
|
|
260
|
+
x(xe, {
|
|
261
|
+
"swatch-only": "",
|
|
262
|
+
size: "sm",
|
|
263
|
+
"data-testid": "highlight-color-picker",
|
|
264
|
+
"model-value": X(),
|
|
265
|
+
"seed-color": f(ye),
|
|
266
|
+
"aria-label": f(N).paragraphEditor.highlightColor,
|
|
267
|
+
"onUpdate:modelValue": Z
|
|
268
|
+
}, null, 8, [
|
|
269
|
+
"model-value",
|
|
270
|
+
"seed-color",
|
|
271
|
+
"aria-label"
|
|
272
|
+
]),
|
|
273
|
+
x(Y),
|
|
274
|
+
x(G, {
|
|
275
|
+
icon: f(ce),
|
|
276
|
+
label: f(N).paragraphEditor.bold,
|
|
286
277
|
active: e.editor.isActive("bold"),
|
|
287
278
|
"stroke-width": 2.5,
|
|
288
|
-
onClick: r[
|
|
279
|
+
onClick: r[0] ||= (t) => e.editor.chain().focus().toggleBold().run()
|
|
289
280
|
}, null, 8, [
|
|
290
281
|
"icon",
|
|
291
282
|
"label",
|
|
292
283
|
"active"
|
|
293
284
|
]),
|
|
294
|
-
x(
|
|
295
|
-
icon: f(
|
|
296
|
-
label: f(
|
|
285
|
+
x(G, {
|
|
286
|
+
icon: f(ie),
|
|
287
|
+
label: f(N).paragraphEditor.italic,
|
|
297
288
|
active: e.editor.isActive("italic"),
|
|
298
|
-
onClick: r[
|
|
289
|
+
onClick: r[1] ||= (t) => e.editor.chain().focus().toggleItalic().run()
|
|
299
290
|
}, null, 8, [
|
|
300
291
|
"icon",
|
|
301
292
|
"label",
|
|
302
293
|
"active"
|
|
303
294
|
]),
|
|
304
|
-
x(
|
|
305
|
-
icon: f(
|
|
306
|
-
label: f(
|
|
295
|
+
x(G, {
|
|
296
|
+
icon: f(pe),
|
|
297
|
+
label: f(N).paragraphEditor.underline,
|
|
307
298
|
active: e.editor.isActive("underline"),
|
|
308
|
-
onClick: r[
|
|
299
|
+
onClick: r[2] ||= (t) => e.editor.chain().focus().toggleUnderline().run()
|
|
309
300
|
}, null, 8, [
|
|
310
301
|
"icon",
|
|
311
302
|
"label",
|
|
312
303
|
"active"
|
|
313
304
|
]),
|
|
314
|
-
x(
|
|
315
|
-
icon: f(
|
|
316
|
-
label: f(
|
|
305
|
+
x(G, {
|
|
306
|
+
icon: f(de),
|
|
307
|
+
label: f(N).paragraphEditor.strikethrough,
|
|
317
308
|
active: e.editor.isActive("strike"),
|
|
318
|
-
onClick: r[
|
|
309
|
+
onClick: r[3] ||= (t) => e.editor.chain().focus().toggleStrike().run()
|
|
319
310
|
}, null, 8, [
|
|
320
311
|
"icon",
|
|
321
312
|
"label",
|
|
322
313
|
"active"
|
|
323
314
|
]),
|
|
324
|
-
x(
|
|
325
|
-
x(
|
|
326
|
-
icon: f(
|
|
327
|
-
label: f(
|
|
315
|
+
x(Y),
|
|
316
|
+
x(G, {
|
|
317
|
+
icon: f(fe),
|
|
318
|
+
label: f(N).paragraphEditor.subscript,
|
|
328
319
|
active: e.editor.isActive("subscript"),
|
|
329
|
-
onClick: r[
|
|
320
|
+
onClick: r[4] ||= (t) => e.editor.chain().focus().toggleSubscript().run()
|
|
330
321
|
}, null, 8, [
|
|
331
322
|
"icon",
|
|
332
323
|
"label",
|
|
333
324
|
"active"
|
|
334
325
|
]),
|
|
335
|
-
x(
|
|
336
|
-
icon: f(
|
|
337
|
-
label: f(
|
|
326
|
+
x(G, {
|
|
327
|
+
icon: f(me),
|
|
328
|
+
label: f(N).paragraphEditor.superscript,
|
|
338
329
|
active: e.editor.isActive("superscript"),
|
|
339
|
-
onClick: r[
|
|
330
|
+
onClick: r[5] ||= (t) => e.editor.chain().focus().toggleSuperscript().run()
|
|
340
331
|
}, null, 8, [
|
|
341
332
|
"icon",
|
|
342
333
|
"label",
|
|
343
334
|
"active"
|
|
344
335
|
]),
|
|
345
|
-
x(
|
|
346
|
-
x(
|
|
347
|
-
icon: f(
|
|
348
|
-
label: f(
|
|
336
|
+
x(Y),
|
|
337
|
+
x(G, {
|
|
338
|
+
icon: f(ne),
|
|
339
|
+
label: f(N).paragraphEditor.addLink,
|
|
349
340
|
active: e.editor.isActive("link"),
|
|
350
|
-
onClick: r[
|
|
341
|
+
onClick: r[6] ||= (e) => a("open-link-dialog")
|
|
351
342
|
}, null, 8, [
|
|
352
343
|
"icon",
|
|
353
344
|
"label",
|
|
354
345
|
"active"
|
|
355
346
|
])
|
|
356
|
-
]), g("div",
|
|
357
|
-
x(
|
|
358
|
-
icon: f(
|
|
359
|
-
label: f(
|
|
347
|
+
]), g("div", Ee, [
|
|
348
|
+
x(G, {
|
|
349
|
+
icon: f(ae),
|
|
350
|
+
label: f(N).paragraphEditor.bulletList,
|
|
360
351
|
active: e.editor.isActive("bulletList"),
|
|
361
|
-
onClick: r[
|
|
352
|
+
onClick: r[7] ||= (t) => e.editor.chain().focus().toggleBulletList().run()
|
|
362
353
|
}, null, 8, [
|
|
363
354
|
"icon",
|
|
364
355
|
"label",
|
|
365
356
|
"active"
|
|
366
357
|
]),
|
|
367
|
-
x(
|
|
368
|
-
icon: f(
|
|
369
|
-
label: f(
|
|
358
|
+
x(G, {
|
|
359
|
+
icon: f(oe),
|
|
360
|
+
label: f(N).paragraphEditor.numberedList,
|
|
370
361
|
active: e.editor.isActive("orderedList"),
|
|
371
|
-
onClick: r[
|
|
362
|
+
onClick: r[8] ||= (t) => e.editor.chain().focus().toggleOrderedList().run()
|
|
372
363
|
}, null, 8, [
|
|
373
364
|
"icon",
|
|
374
365
|
"label",
|
|
375
366
|
"active"
|
|
376
367
|
]),
|
|
377
|
-
x(
|
|
378
|
-
x(
|
|
379
|
-
icon: f(
|
|
380
|
-
label: f(
|
|
368
|
+
x(Y),
|
|
369
|
+
x(G, {
|
|
370
|
+
icon: f(he),
|
|
371
|
+
label: f(N).paragraphEditor.alignLeft,
|
|
381
372
|
active: e.editor.isActive({ textAlign: "left" }),
|
|
382
|
-
onClick: r[
|
|
373
|
+
onClick: r[9] ||= (t) => e.editor.chain().focus().setTextAlign("left").run()
|
|
383
374
|
}, null, 8, [
|
|
384
375
|
"icon",
|
|
385
376
|
"label",
|
|
386
377
|
"active"
|
|
387
378
|
]),
|
|
388
|
-
x(
|
|
389
|
-
icon: f(
|
|
390
|
-
label: f(
|
|
379
|
+
x(G, {
|
|
380
|
+
icon: f(ge),
|
|
381
|
+
label: f(N).paragraphEditor.alignCenter,
|
|
391
382
|
active: e.editor.isActive({ textAlign: "center" }),
|
|
392
|
-
onClick: r[
|
|
383
|
+
onClick: r[10] ||= (t) => e.editor.chain().focus().setTextAlign("center").run()
|
|
393
384
|
}, null, 8, [
|
|
394
385
|
"icon",
|
|
395
386
|
"label",
|
|
396
387
|
"active"
|
|
397
388
|
]),
|
|
398
|
-
x(
|
|
399
|
-
icon: f(
|
|
400
|
-
label: f(
|
|
389
|
+
x(G, {
|
|
390
|
+
icon: f(ue),
|
|
391
|
+
label: f(N).paragraphEditor.alignRight,
|
|
401
392
|
active: e.editor.isActive({ textAlign: "right" }),
|
|
402
|
-
onClick: r[
|
|
393
|
+
onClick: r[11] ||= (t) => e.editor.chain().focus().setTextAlign("right").run()
|
|
403
394
|
}, null, 8, [
|
|
404
395
|
"icon",
|
|
405
396
|
"label",
|
|
406
397
|
"active"
|
|
407
398
|
]),
|
|
408
|
-
x(
|
|
409
|
-
x(
|
|
410
|
-
"model-value":
|
|
411
|
-
options: f(
|
|
412
|
-
label: f(
|
|
399
|
+
x(Y),
|
|
400
|
+
x(Q, {
|
|
401
|
+
"model-value": K(),
|
|
402
|
+
options: f(_e),
|
|
403
|
+
label: f(N).paragraphEditor.lineHeight,
|
|
413
404
|
placeholder: "LH",
|
|
414
405
|
"width-class": "tpl:w-16",
|
|
415
|
-
"onUpdate:modelValue":
|
|
406
|
+
"onUpdate:modelValue": q
|
|
416
407
|
}, null, 8, [
|
|
417
408
|
"model-value",
|
|
418
409
|
"options",
|
|
419
410
|
"label"
|
|
420
411
|
]),
|
|
421
|
-
x(
|
|
422
|
-
"model-value":
|
|
423
|
-
options: f(
|
|
424
|
-
label: f(
|
|
412
|
+
x(Q, {
|
|
413
|
+
"model-value": L("letterSpacing"),
|
|
414
|
+
options: f(be),
|
|
415
|
+
label: f(N).paragraphEditor.letterSpacing,
|
|
425
416
|
placeholder: "LS",
|
|
426
417
|
"width-class": "tpl:w-20",
|
|
427
|
-
"onUpdate:modelValue":
|
|
418
|
+
"onUpdate:modelValue": J
|
|
428
419
|
}, null, 8, [
|
|
429
420
|
"model-value",
|
|
430
421
|
"options",
|
|
431
422
|
"label"
|
|
432
423
|
]),
|
|
433
|
-
x(
|
|
434
|
-
x(
|
|
435
|
-
icon: f(
|
|
436
|
-
label: f(
|
|
437
|
-
onClick: r[
|
|
424
|
+
x(Y),
|
|
425
|
+
x(G, {
|
|
426
|
+
icon: f(re),
|
|
427
|
+
label: f(N).paragraphEditor.clearFormatting,
|
|
428
|
+
onClick: r[12] ||= (t) => e.editor.chain().focus().clearNodes().unsetAllMarks().run()
|
|
438
429
|
}, null, 8, ["icon", "label"]),
|
|
439
|
-
x(
|
|
440
|
-
x(Se, { onInsert:
|
|
441
|
-
e.canRequestMergeTag ? (n(), u(v, { key: 0 }, [x(
|
|
430
|
+
x(Y),
|
|
431
|
+
x(Se, { onInsert: I }),
|
|
432
|
+
e.canRequestMergeTag ? (n(), u(v, { key: 0 }, [x(Y), g("button", {
|
|
442
433
|
type: "button",
|
|
443
434
|
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)]",
|
|
444
|
-
"aria-label": f(
|
|
445
|
-
title: f(
|
|
446
|
-
onClick: r[
|
|
447
|
-
}, [x(f(
|
|
435
|
+
"aria-label": f(N).mergeTag.insert,
|
|
436
|
+
title: f(N).mergeTag.insert,
|
|
437
|
+
onClick: r[13] ||= (e) => a("add-merge-tag")
|
|
438
|
+
}, [x(f(le), {
|
|
448
439
|
size: 16,
|
|
449
440
|
"stroke-width": 2
|
|
450
|
-
}), y(" " + s(f(
|
|
451
|
-
e.canInsertLogicTag ? (n(), u(v, { key: 1 }, [x(
|
|
441
|
+
}), y(" " + s(f(N).mergeTag.insertShort), 1)], 8, De)], 64)) : d("", !0),
|
|
442
|
+
e.canInsertLogicTag ? (n(), u(v, { key: 1 }, [x(Y), g("button", {
|
|
452
443
|
type: "button",
|
|
453
444
|
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)]",
|
|
454
|
-
"aria-label": f(
|
|
455
|
-
title: f(
|
|
445
|
+
"aria-label": f(N).logicTag.insert,
|
|
446
|
+
title: f(N).logicTag.insert,
|
|
456
447
|
"data-testid": "insert-logic-button",
|
|
457
|
-
onClick: r[
|
|
458
|
-
}, [x(f(
|
|
448
|
+
onClick: r[14] ||= (e) => a("add-logic-tag")
|
|
449
|
+
}, [x(f(se), {
|
|
459
450
|
size: 16,
|
|
460
451
|
"stroke-width": 2
|
|
461
|
-
}), y(" " + s(f(
|
|
462
|
-
])], 64)) : (n(), u("div",
|
|
452
|
+
}), y(" " + s(f(N).logicTag.insertShort), 1)], 8, Oe)], 64)) : d("", !0)
|
|
453
|
+
])], 64)) : (n(), u("div", ke, [x(f(w), {
|
|
463
454
|
class: "tpl-spinner",
|
|
464
455
|
size: 14,
|
|
465
456
|
"stroke-width": 2
|
|
466
|
-
}), y(" " + s(f(
|
|
457
|
+
}), y(" " + s(f(N).errors.editorLoading), 1)]))], 12, we)], 8, ["to"])) : d("", !0);
|
|
467
458
|
}
|
|
468
|
-
}),
|
|
459
|
+
}), je = { class: "tpl-text-editor-wrapper tpl:relative" }, Me = /* @__PURE__ */ b({
|
|
469
460
|
__name: "ParagraphEditor",
|
|
470
461
|
props: {
|
|
471
462
|
block: {},
|
|
@@ -491,7 +482,7 @@ var we = ["data-tpl-theme", "aria-label"], Te = { class: "tpl:flex tpl:items-cen
|
|
|
491
482
|
import("./tiptap-zpXk5mN4.js").then((e) => e.f),
|
|
492
483
|
import("./tiptap-zpXk5mN4.js").then((e) => e.d),
|
|
493
484
|
import("./tiptap-zpXk5mN4.js").then((e) => e.u),
|
|
494
|
-
import("./extensions-
|
|
485
|
+
import("./extensions-Btyx_IMf.js")
|
|
495
486
|
]);
|
|
496
487
|
return {
|
|
497
488
|
TiptapEditor: a,
|
|
@@ -538,8 +529,8 @@ var we = ["data-tpl-theme", "aria-label"], Te = { class: "tpl:flex tpl:items-cen
|
|
|
538
529
|
};
|
|
539
530
|
}
|
|
540
531
|
});
|
|
541
|
-
return (r, i) => (n(), u("div",
|
|
542
|
-
x(
|
|
532
|
+
return (r, i) => (n(), u("div", je, [
|
|
533
|
+
x(Ae, {
|
|
543
534
|
editor: f(s),
|
|
544
535
|
"toolbar-position": t.toolbarPosition,
|
|
545
536
|
"is-loading": f(l),
|
|
@@ -558,7 +549,7 @@ var we = ["data-tpl-theme", "aria-label"], Te = { class: "tpl:flex tpl:items-cen
|
|
|
558
549
|
"onAddMergeTag",
|
|
559
550
|
"onAddLogicTag"
|
|
560
551
|
]),
|
|
561
|
-
x(
|
|
552
|
+
x(R, {
|
|
562
553
|
editor: f(s),
|
|
563
554
|
"editor-content": f(c),
|
|
564
555
|
"is-loading": f(l),
|
|
@@ -571,7 +562,7 @@ var we = ["data-tpl-theme", "aria-label"], Te = { class: "tpl:flex tpl:items-cen
|
|
|
571
562
|
"init-error",
|
|
572
563
|
"onRetry"
|
|
573
564
|
]),
|
|
574
|
-
x(
|
|
565
|
+
x(L, {
|
|
575
566
|
visible: f(m),
|
|
576
567
|
"is-editing-link": f(s)?.isActive("link") ?? !1,
|
|
577
568
|
"dialog-ref": f(_),
|
|
@@ -599,6 +590,6 @@ var we = ["data-tpl-theme", "aria-label"], Te = { class: "tpl:flex tpl:items-cen
|
|
|
599
590
|
}
|
|
600
591
|
});
|
|
601
592
|
//#endregion
|
|
602
|
-
export {
|
|
593
|
+
export { Me as default };
|
|
603
594
|
|
|
604
|
-
//# sourceMappingURL=ParagraphEditor-
|
|
595
|
+
//# sourceMappingURL=ParagraphEditor-4cMKKC-V.js.map
|