@templatical/editor 0.54.0 → 0.54.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{AiRewriteMenu-CIHUnPud.js → AiRewriteMenu-arKoTjsQ.js} +1 -1
- package/dist/{BlockPreviewCanvas-B70RSavL.js → BlockPreviewCanvas-BTieuBmH.js} +2 -2
- package/dist/{CloudPanels-VpSQiLLL.js → CloudPanels-Hxdp0doU.js} +1 -1
- package/dist/{LanguageMenu-d2GlX67r.js → LanguageMenu-BpxbIJEx.js} +1 -1
- package/dist/{ParagraphEditor-CI68PYDL.js → ParagraphEditor-B38t4E2p.js} +6 -5
- package/dist/{RestoreVersionDialog-DcuhpOIz.js → RestoreVersionDialog-n7FSmWXB.js} +1 -1
- package/dist/{SaveBlockDialog-vuwvoi-d.js → SaveBlockDialog-B94NpmDV.js} +3 -3
- package/dist/{SavedBlocksBrowserModal-DUJm0dOv.js → SavedBlocksBrowserModal-C1vSc8iM.js} +3 -3
- package/dist/{SavedBlocksPanels-BiMXQ5lY.js → SavedBlocksPanels-DLDmIYeL.js} +1 -1
- package/dist/{SavedBlocksPickBar-CAstZfG7.js → SavedBlocksPickBar-ngf2sFEs.js} +1 -1
- package/dist/{TestEmailModal-Bl_GHdrN.js → TestEmailModal-CB_9I1bl.js} +3 -3
- package/dist/{TestEmailPanel-CpTBF7B5.js → TestEmailPanel-BUq-dbXQ.js} +1 -1
- package/dist/{TitleEditor-DkbEDAZB.js → TitleEditor-BLP41rwy.js} +5 -4
- package/dist/{TplModal-wk2gLa7_.js → TplModal-DFKqmJQz.js} +1 -1
- package/dist/{VersionHistoryPanels-Cq2rFKIX.js → VersionHistoryPanels-DPxj3mec.js} +1 -1
- package/dist/{WrapperBlock-cWT_nZgQ.js → WrapperBlock-BdVIuGMR.js} +1 -1
- package/dist/bundle-stats.json +4 -4
- package/dist/cdn/chunks/{AiRewriteMenu-C4btyN4W.js → AiRewriteMenu-YcVFv6RS.js} +2 -2
- package/dist/cdn/chunks/{AiRewriteMenu-C4btyN4W.js.map → AiRewriteMenu-YcVFv6RS.js.map} +1 -1
- package/dist/cdn/chunks/{BlockPreviewCanvas-CTKmBPsq.js → BlockPreviewCanvas-6ck15xz9.js} +3 -3
- package/dist/cdn/chunks/{BlockPreviewCanvas-CTKmBPsq.js.map → BlockPreviewCanvas-6ck15xz9.js.map} +1 -1
- package/dist/cdn/chunks/{CloudPanels-COU26R83.js → CloudPanels-BHHpNckC.js} +2 -2
- package/dist/cdn/chunks/{CloudPanels-COU26R83.js.map → CloudPanels-BHHpNckC.js.map} +1 -1
- package/dist/cdn/chunks/{LanguageMenu-B1Aue_lf.js → LanguageMenu-C6utRx_4.js} +2 -2
- package/dist/cdn/chunks/{LanguageMenu-B1Aue_lf.js.map → LanguageMenu-C6utRx_4.js.map} +1 -1
- package/dist/cdn/chunks/{ParagraphEditor-B2UU1Q5I.js → ParagraphEditor-B3EQ0Ai6.js} +112 -111
- package/dist/cdn/chunks/ParagraphEditor-B3EQ0Ai6.js.map +1 -0
- package/dist/cdn/chunks/{RestoreVersionDialog-C1Y5Ewo_.js → RestoreVersionDialog-DfNrVi0R.js} +2 -2
- package/dist/cdn/chunks/{RestoreVersionDialog-C1Y5Ewo_.js.map → RestoreVersionDialog-DfNrVi0R.js.map} +1 -1
- package/dist/cdn/chunks/{SaveBlockDialog-B9lwEP_T.js → SaveBlockDialog-BqglcKcN.js} +4 -4
- package/dist/cdn/chunks/{SaveBlockDialog-B9lwEP_T.js.map → SaveBlockDialog-BqglcKcN.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksBrowserModal-fAeHUyxb.js → SavedBlocksBrowserModal-BewXGlrK.js} +4 -4
- package/dist/cdn/chunks/{SavedBlocksBrowserModal-fAeHUyxb.js.map → SavedBlocksBrowserModal-BewXGlrK.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksPanels-DRDTLDyZ.js → SavedBlocksPanels-0ZpX-jXI.js} +2 -2
- package/dist/cdn/chunks/{SavedBlocksPanels-DRDTLDyZ.js.map → SavedBlocksPanels-0ZpX-jXI.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksPickBar-B6b5z-o3.js → SavedBlocksPickBar-DHah-Uf7.js} +2 -2
- package/dist/cdn/chunks/{SavedBlocksPickBar-B6b5z-o3.js.map → SavedBlocksPickBar-DHah-Uf7.js.map} +1 -1
- package/dist/cdn/chunks/{TestEmailModal-DQxnW5Q5.js → TestEmailModal-7pUDYLrk.js} +4 -4
- package/dist/cdn/chunks/{TestEmailModal-DQxnW5Q5.js.map → TestEmailModal-7pUDYLrk.js.map} +1 -1
- package/dist/cdn/chunks/{TestEmailPanel-BcO_-16H.js → TestEmailPanel-DBWwMsH1.js} +2 -2
- package/dist/cdn/chunks/{TestEmailPanel-BcO_-16H.js.map → TestEmailPanel-DBWwMsH1.js.map} +1 -1
- package/dist/cdn/chunks/{TitleEditor-pmycpmTd.js → TitleEditor-VAanUjPQ.js} +6 -5
- package/dist/cdn/chunks/TitleEditor-VAanUjPQ.js.map +1 -0
- package/dist/cdn/chunks/{TplModal-ClSSGX7a.js → TplModal-DDlR7mk3.js} +2 -2
- package/dist/cdn/chunks/{TplModal-ClSSGX7a.js.map → TplModal-DDlR7mk3.js.map} +1 -1
- package/dist/cdn/chunks/{VersionHistoryPanels-B8GPBKMq.js → VersionHistoryPanels-DJDeaf1B.js} +2 -2
- package/dist/cdn/chunks/{VersionHistoryPanels-B8GPBKMq.js.map → VersionHistoryPanels-DJDeaf1B.js.map} +1 -1
- package/dist/cdn/chunks/{WrapperBlock-BoUflYwY.js → WrapperBlock-DRJnrgy-.js} +2 -2
- package/dist/cdn/chunks/{WrapperBlock-BoUflYwY.js.map → WrapperBlock-DRJnrgy-.js.map} +1 -1
- package/dist/cdn/chunks/{composables-C1KU4ZHw.js → composables-Jc3uZuLs.js} +3 -3
- package/dist/cdn/chunks/{composables-C1KU4ZHw.js.map → composables-Jc3uZuLs.js.map} +1 -1
- package/dist/cdn/chunks/{src-BWX_xVxO.js → src-8bYYJPCt.js} +2 -2
- package/dist/cdn/chunks/{src-BWX_xVxO.js.map → src-8bYYJPCt.js.map} +1 -1
- package/dist/cdn/editor.js +8 -8
- package/dist/{composables-CMIrGXJ1.js → composables-XjYKaKhY.js} +2 -2
- package/dist/templatical-editor.js +7 -7
- package/package.json +7 -7
- package/dist/cdn/chunks/ParagraphEditor-B2UU1Q5I.js.map +0 -1
- package/dist/cdn/chunks/TitleEditor-pmycpmTd.js.map +0 -1
|
@@ -2,23 +2,23 @@ import { n as e } from "./rolldown-runtime-QGRDbDUS.js";
|
|
|
2
2
|
import { B as t, C as n, F as r, L as i, O as a, S as o, X as s, _ as c, b as l, c as u, ct as d, dt as f, f as p, g as m, h, l as g, m as _, mt as v, p as y, pt as b, tt as x, u as S, x as C } from "./draggable-DepKdldn.js";
|
|
3
3
|
import { ct as w } from "./src-BQUv2CYU.js";
|
|
4
4
|
import { t as T } from "./_plugin-vue_export-helper-Djzt4Yr7.js";
|
|
5
|
-
import { C as E, Et as D, Ht as O, L as k, N as A, S as j, _ as M, at as
|
|
6
|
-
import { I as
|
|
7
|
-
import { t as
|
|
8
|
-
import { n as
|
|
9
|
-
import { a as
|
|
10
|
-
import { t as
|
|
11
|
-
import { B as
|
|
12
|
-
import { n as
|
|
13
|
-
import { c as
|
|
14
|
-
import { n as
|
|
15
|
-
import { n as
|
|
5
|
+
import { C as E, Et as D, Ht as O, L as k, N as A, S as j, _ as M, at as N, b as ee, dt as te, g as ne, h as re, ht as ie, lt as ae, ot as oe, st as se, u as ce, v as le } from "./icons-Da9GKjPx.js";
|
|
6
|
+
import { I as ue, M as de, b as fe, d as pe, et as me, it as he, ot as ge, v as _e } from "./keys-CoQtCqNv.js";
|
|
7
|
+
import { t as ve } from "./useI18n-BnJYydPv.js";
|
|
8
|
+
import { n as P } from "./useLocalizedDisplay-aGfnO90D.js";
|
|
9
|
+
import { a as ye, n as be, o as xe, s as Se } from "./styleConstants-CgiNKdnc.js";
|
|
10
|
+
import { t as F } from "./dist-DqGgijFI.js";
|
|
11
|
+
import { B as I, I as L, L as R, z } from "./composables-Jc3uZuLs.js";
|
|
12
|
+
import { n as B } from "./usePopoverPosition-BWAXWeBv.js";
|
|
13
|
+
import { c as V } from "./LogicTagInsertButton-Bhvi0nWz.js";
|
|
14
|
+
import { n as Ce, t as we } from "./withCurrentFont-MK8ga9q9.js";
|
|
15
|
+
import { n as H, t as U } from "./RichTextEditorContent-up4AqL7D.js";
|
|
16
16
|
// src/components/toolbar/ToolbarSelect.vue?vue&type=script&setup=true&lang.ts
|
|
17
|
-
var
|
|
17
|
+
var W = [
|
|
18
18
|
"value",
|
|
19
19
|
"aria-label",
|
|
20
20
|
"title"
|
|
21
|
-
],
|
|
21
|
+
], G = { value: "" }, K = ["value"], q = /* @__PURE__ */ n({
|
|
22
22
|
__name: "ToolbarSelect",
|
|
23
23
|
props: {
|
|
24
24
|
modelValue: {},
|
|
@@ -55,21 +55,21 @@ var U = [
|
|
|
55
55
|
"aria-label": e.label,
|
|
56
56
|
title: e.label,
|
|
57
57
|
onChange: o
|
|
58
|
-
}, [_("option",
|
|
58
|
+
}, [_("option", G, v(e.placeholder ?? ""), 1), (r(!0), c(S, null, i(p.value, (e) => (r(), c("option", {
|
|
59
59
|
key: s(e),
|
|
60
60
|
value: s(e)
|
|
61
|
-
}, v(l(e)), 9,
|
|
61
|
+
}, v(l(e)), 9, K))), 128))], 42, W));
|
|
62
62
|
}
|
|
63
|
-
}),
|
|
63
|
+
}), J = [
|
|
64
64
|
"aria-label",
|
|
65
65
|
"title",
|
|
66
66
|
"aria-expanded"
|
|
67
|
-
],
|
|
67
|
+
], Y = ["aria-label"], X = { class: "tpl:mb-1.5 tpl:text-[10px] tpl:font-medium tpl:tracking-wide tpl:text-[var(--tpl-text-muted)] tpl:uppercase" }, Z = { class: "tpl:grid tpl:grid-cols-10 tpl:gap-0.5" }, Te = ["aria-label", "onClick"], Ee = /* @__PURE__ */ n({
|
|
68
68
|
__name: "EmojiPickerDropdown",
|
|
69
69
|
emits: ["insert"],
|
|
70
70
|
setup(e, { emit: t }) {
|
|
71
|
-
let n = t, { categories: a, isOpen: o, toggle: s, close: l } =
|
|
72
|
-
|
|
71
|
+
let n = t, { categories: a, isOpen: o, toggle: s, close: l } = z(), { t: p, format: h } = ve(), b = x(null), w = x(null), T = y(() => o.value);
|
|
72
|
+
I(b, T), F(w, () => {
|
|
73
73
|
o.value && l();
|
|
74
74
|
});
|
|
75
75
|
function E(e) {
|
|
@@ -91,7 +91,7 @@ var U = [
|
|
|
91
91
|
}, [C(d(D), {
|
|
92
92
|
size: 16,
|
|
93
93
|
"stroke-width": 2
|
|
94
|
-
})], 10,
|
|
94
|
+
})], 10, J), d(o) ? (r(), c("div", {
|
|
95
95
|
key: 0,
|
|
96
96
|
id: "tpl-emoji-picker",
|
|
97
97
|
ref_key: "pickerRef",
|
|
@@ -105,13 +105,13 @@ var U = [
|
|
|
105
105
|
}, [(r(!0), c(S, null, i(d(a), (e) => (r(), c("div", {
|
|
106
106
|
key: e.key,
|
|
107
107
|
class: "tpl:mb-2 tpl:last:mb-0"
|
|
108
|
-
}, [_("div",
|
|
108
|
+
}, [_("div", X, v(d(p).emoji[e.key]), 1), _("div", Z, [(r(!0), c(S, null, i(e.emojis, (e) => (r(), c("button", {
|
|
109
109
|
key: e,
|
|
110
110
|
type: "button",
|
|
111
111
|
"aria-label": d(h)(d(p).paragraphEditor.emojiItemLabel, { emoji: e }),
|
|
112
112
|
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:hover:scale-125 tpl:hover:bg-[var(--tpl-bg-active)]",
|
|
113
113
|
onClick: (t) => E(e)
|
|
114
|
-
}, v(e), 9,
|
|
114
|
+
}, v(e), 9, Te))), 128))])]))), 128))], 40, Y)) : m("", !0)], 512));
|
|
115
115
|
}
|
|
116
116
|
}), De = [
|
|
117
117
|
"aria-label",
|
|
@@ -170,43 +170,43 @@ var Me = ["data-tpl-theme", "aria-label"], Ne = ["disabled", "inert"], Pe = { cl
|
|
|
170
170
|
"add-logic-tag"
|
|
171
171
|
],
|
|
172
172
|
setup(e, { emit: t }) {
|
|
173
|
-
let n = o(() => import("./AiRewriteMenu-
|
|
173
|
+
let n = o(() => import("./AiRewriteMenu-YcVFv6RS.js")), i = e, s = a(pe, {}), u = y(() => s.ai?.isFeatureEnabled("rewrite") ?? !1), f = t, g = a(me, null), x = a(he, null), w = ge(fe, "ParagraphToolbar"), T = B(), D = a(ue, null), P = a(de, null), F = a(_e, null), I = y(() => (D?.isOpen.value ?? !1) || (P?.isOpen.value ?? !1)), { t: L } = ve(), R = w.fonts, z = xe.map((e) => ({
|
|
174
174
|
value: e,
|
|
175
|
-
label: e === "normal" ?
|
|
175
|
+
label: e === "normal" ? L.paragraphEditor.letterSpacingNormal : e
|
|
176
176
|
}));
|
|
177
|
-
function
|
|
177
|
+
function H(e) {
|
|
178
178
|
i.isEditable !== !1 && i.editor?.chain().focus().insertContent(e).run();
|
|
179
179
|
}
|
|
180
|
-
function
|
|
180
|
+
function U(e) {
|
|
181
181
|
return i.editor?.getAttributes("textStyle")[e] || "";
|
|
182
182
|
}
|
|
183
|
-
function
|
|
183
|
+
function W(e) {
|
|
184
184
|
let t = i.editor?.chain().focus();
|
|
185
185
|
e ? t?.setFontFamily(e).run() : t?.unsetFontFamily().run();
|
|
186
186
|
}
|
|
187
|
-
function
|
|
187
|
+
function G(e) {
|
|
188
188
|
let t = i.editor?.chain().focus();
|
|
189
189
|
e ? t?.setFontSize(e).run() : t?.unsetFontSize().run();
|
|
190
190
|
}
|
|
191
|
-
function
|
|
191
|
+
function K() {
|
|
192
192
|
return i.editor?.isActive("link") ?? !1;
|
|
193
193
|
}
|
|
194
|
-
function
|
|
194
|
+
function J() {
|
|
195
195
|
return i.editor?.getAttributes("link").color || "";
|
|
196
196
|
}
|
|
197
|
-
function
|
|
197
|
+
function Y(e) {
|
|
198
198
|
if (i.isEditable === !1) return;
|
|
199
199
|
let t = i.editor?.chain().focus();
|
|
200
|
-
t && (
|
|
201
|
-
}
|
|
202
|
-
function Y() {
|
|
203
|
-
let e = P?.content.value.settings;
|
|
204
|
-
return G() ? je(q(), e?.linkColor || e?.textColor) : je(H("color"), e?.textColor);
|
|
200
|
+
t && (K() ? (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());
|
|
205
201
|
}
|
|
206
202
|
function X() {
|
|
207
|
-
|
|
203
|
+
let e = F?.content.value.settings;
|
|
204
|
+
return K() ? je(J(), e?.linkColor || e?.textColor) : je(U("color"), e?.textColor);
|
|
208
205
|
}
|
|
209
206
|
function Z() {
|
|
207
|
+
return K() ? J() : U("color");
|
|
208
|
+
}
|
|
209
|
+
function Te() {
|
|
210
210
|
return i.editor?.getAttributes("paragraph").lineHeight || "";
|
|
211
211
|
}
|
|
212
212
|
function De(e) {
|
|
@@ -225,13 +225,14 @@ var Me = ["data-tpl-theme", "aria-label"], Ne = ["disabled", "inert"], Pe = { cl
|
|
|
225
225
|
let t = i.editor?.chain().focus();
|
|
226
226
|
e ? t?.setHighlight({ color: e }).run() : t?.unsetHighlight().run();
|
|
227
227
|
}
|
|
228
|
-
return (t, i) => d(T)
|
|
228
|
+
return (t, i) => d(T) ? (r(), h(p, {
|
|
229
229
|
key: 0,
|
|
230
230
|
to: d(T)
|
|
231
|
-
}, [
|
|
231
|
+
}, [I.value ? m("", !0) : (r(), c("div", {
|
|
232
|
+
key: 0,
|
|
232
233
|
"data-tpl-theme": d(x),
|
|
233
234
|
role: "toolbar",
|
|
234
|
-
"aria-label": d(
|
|
235
|
+
"aria-label": d(L).paragraphEditor.toolbar,
|
|
235
236
|
class: "tpl tpl-text-toolbar tpl:absolute 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-[var(--tpl-shadow-lg)]",
|
|
236
237
|
style: b({
|
|
237
238
|
...d(g),
|
|
@@ -245,26 +246,26 @@ var Me = ["data-tpl-theme", "aria-label"], Ne = ["disabled", "inert"], Pe = { cl
|
|
|
245
246
|
inert: e.isEditable === !1,
|
|
246
247
|
class: "tpl:contents"
|
|
247
248
|
}, [!e.isLoading && e.editor ? (r(), c(S, { key: 0 }, [_("div", Pe, [
|
|
248
|
-
C(
|
|
249
|
-
"model-value": d(
|
|
250
|
-
options: d(
|
|
251
|
-
label: d(
|
|
252
|
-
placeholder: d(
|
|
249
|
+
C(q, {
|
|
250
|
+
"model-value": d(we)(U("fontFamily")),
|
|
251
|
+
options: d(Ce)(d(R), U("fontFamily")),
|
|
252
|
+
label: d(L).paragraphEditor.fontFamily,
|
|
253
|
+
placeholder: d(L).paragraphEditor.defaultFont,
|
|
253
254
|
"width-class": "tpl:w-32",
|
|
254
|
-
"onUpdate:modelValue":
|
|
255
|
+
"onUpdate:modelValue": W
|
|
255
256
|
}, null, 8, [
|
|
256
257
|
"model-value",
|
|
257
258
|
"options",
|
|
258
259
|
"label",
|
|
259
260
|
"placeholder"
|
|
260
261
|
]),
|
|
261
|
-
C(
|
|
262
|
-
"model-value":
|
|
263
|
-
options: d(
|
|
264
|
-
label: d(
|
|
265
|
-
placeholder: d(
|
|
262
|
+
C(q, {
|
|
263
|
+
"model-value": U("fontSize"),
|
|
264
|
+
options: d(ye),
|
|
265
|
+
label: d(L).paragraphEditor.fontSize,
|
|
266
|
+
placeholder: d(L).paragraphEditor.defaultSize,
|
|
266
267
|
"width-class": "tpl:w-20",
|
|
267
|
-
"onUpdate:modelValue":
|
|
268
|
+
"onUpdate:modelValue": G
|
|
268
269
|
}, null, 8, [
|
|
269
270
|
"model-value",
|
|
270
271
|
"options",
|
|
@@ -272,29 +273,29 @@ var Me = ["data-tpl-theme", "aria-label"], Ne = ["disabled", "inert"], Pe = { cl
|
|
|
272
273
|
"placeholder"
|
|
273
274
|
]),
|
|
274
275
|
C($),
|
|
275
|
-
C(
|
|
276
|
+
C(V, {
|
|
276
277
|
"swatch-only": "",
|
|
277
278
|
disabled: e.isEditable === !1,
|
|
278
279
|
size: "sm",
|
|
279
280
|
"data-testid": "text-color-picker",
|
|
280
|
-
"model-value":
|
|
281
|
-
"seed-color":
|
|
282
|
-
"aria-label": d(
|
|
283
|
-
"onUpdate:modelValue":
|
|
281
|
+
"model-value": Z(),
|
|
282
|
+
"seed-color": X(),
|
|
283
|
+
"aria-label": d(L).paragraphEditor.textColor,
|
|
284
|
+
"onUpdate:modelValue": Y
|
|
284
285
|
}, null, 8, [
|
|
285
286
|
"disabled",
|
|
286
287
|
"model-value",
|
|
287
288
|
"seed-color",
|
|
288
289
|
"aria-label"
|
|
289
290
|
]),
|
|
290
|
-
C(
|
|
291
|
+
C(V, {
|
|
291
292
|
"swatch-only": "",
|
|
292
293
|
disabled: e.isEditable === !1,
|
|
293
294
|
size: "sm",
|
|
294
295
|
"data-testid": "highlight-color-picker",
|
|
295
296
|
"model-value": ke(),
|
|
296
|
-
"seed-color": d(
|
|
297
|
-
"aria-label": d(
|
|
297
|
+
"seed-color": d(be),
|
|
298
|
+
"aria-label": d(L).paragraphEditor.highlightColor,
|
|
298
299
|
"onUpdate:modelValue": Ae
|
|
299
300
|
}, null, 8, [
|
|
300
301
|
"disabled",
|
|
@@ -304,8 +305,8 @@ var Me = ["data-tpl-theme", "aria-label"], Ne = ["disabled", "inert"], Pe = { cl
|
|
|
304
305
|
]),
|
|
305
306
|
C($),
|
|
306
307
|
C(Q, {
|
|
307
|
-
icon: d(
|
|
308
|
-
label: d(
|
|
308
|
+
icon: d(te),
|
|
309
|
+
label: d(L).paragraphEditor.bold,
|
|
309
310
|
active: e.editor.isActive("bold"),
|
|
310
311
|
"stroke-width": 2.5,
|
|
311
312
|
onClick: i[0] ||= (t) => e.editor.chain().focus().toggleBold().run()
|
|
@@ -315,8 +316,8 @@ var Me = ["data-tpl-theme", "aria-label"], Ne = ["disabled", "inert"], Pe = { cl
|
|
|
315
316
|
"active"
|
|
316
317
|
]),
|
|
317
318
|
C(Q, {
|
|
318
|
-
icon: d(
|
|
319
|
-
label: d(
|
|
319
|
+
icon: d(ie),
|
|
320
|
+
label: d(L).paragraphEditor.italic,
|
|
320
321
|
active: e.editor.isActive("italic"),
|
|
321
322
|
onClick: i[1] ||= (t) => e.editor.chain().focus().toggleItalic().run()
|
|
322
323
|
}, null, 8, [
|
|
@@ -325,8 +326,8 @@ var Me = ["data-tpl-theme", "aria-label"], Ne = ["disabled", "inert"], Pe = { cl
|
|
|
325
326
|
"active"
|
|
326
327
|
]),
|
|
327
328
|
C(Q, {
|
|
328
|
-
icon: d(
|
|
329
|
-
label: d(
|
|
329
|
+
icon: d(ce),
|
|
330
|
+
label: d(L).paragraphEditor.underline,
|
|
330
331
|
active: e.editor.isActive("underline"),
|
|
331
332
|
onClick: i[2] ||= (t) => e.editor.chain().focus().toggleUnderline().run()
|
|
332
333
|
}, null, 8, [
|
|
@@ -336,7 +337,7 @@ var Me = ["data-tpl-theme", "aria-label"], Ne = ["disabled", "inert"], Pe = { cl
|
|
|
336
337
|
]),
|
|
337
338
|
C(Q, {
|
|
338
339
|
icon: d(E),
|
|
339
|
-
label: d(
|
|
340
|
+
label: d(L).paragraphEditor.strikethrough,
|
|
340
341
|
active: e.editor.isActive("strike"),
|
|
341
342
|
onClick: i[3] ||= (t) => e.editor.chain().focus().toggleStrike().run()
|
|
342
343
|
}, null, 8, [
|
|
@@ -347,7 +348,7 @@ var Me = ["data-tpl-theme", "aria-label"], Ne = ["disabled", "inert"], Pe = { cl
|
|
|
347
348
|
C($),
|
|
348
349
|
C(Q, {
|
|
349
350
|
icon: d(j),
|
|
350
|
-
label: d(
|
|
351
|
+
label: d(L).paragraphEditor.subscript,
|
|
351
352
|
active: e.editor.isActive("subscript"),
|
|
352
353
|
onClick: i[4] ||= (t) => e.editor.chain().focus().toggleSubscript().run()
|
|
353
354
|
}, null, 8, [
|
|
@@ -356,8 +357,8 @@ var Me = ["data-tpl-theme", "aria-label"], Ne = ["disabled", "inert"], Pe = { cl
|
|
|
356
357
|
"active"
|
|
357
358
|
]),
|
|
358
359
|
C(Q, {
|
|
359
|
-
icon: d(
|
|
360
|
-
label: d(
|
|
360
|
+
icon: d(ee),
|
|
361
|
+
label: d(L).paragraphEditor.superscript,
|
|
361
362
|
active: e.editor.isActive("superscript"),
|
|
362
363
|
onClick: i[5] ||= (t) => e.editor.chain().focus().toggleSuperscript().run()
|
|
363
364
|
}, null, 8, [
|
|
@@ -367,8 +368,8 @@ var Me = ["data-tpl-theme", "aria-label"], Ne = ["disabled", "inert"], Pe = { cl
|
|
|
367
368
|
]),
|
|
368
369
|
C($),
|
|
369
370
|
C(Q, {
|
|
370
|
-
icon: d(
|
|
371
|
-
label: d(
|
|
371
|
+
icon: d(ae),
|
|
372
|
+
label: d(L).paragraphEditor.addLink,
|
|
372
373
|
active: e.editor.isActive("link"),
|
|
373
374
|
onClick: i[6] ||= (e) => f("open-link-dialog")
|
|
374
375
|
}, null, 8, [
|
|
@@ -378,8 +379,8 @@ var Me = ["data-tpl-theme", "aria-label"], Ne = ["disabled", "inert"], Pe = { cl
|
|
|
378
379
|
])
|
|
379
380
|
]), _("div", Fe, [
|
|
380
381
|
C(Q, {
|
|
381
|
-
icon: d(
|
|
382
|
-
label: d(
|
|
382
|
+
icon: d(oe),
|
|
383
|
+
label: d(L).paragraphEditor.bulletList,
|
|
383
384
|
active: e.editor.isActive("bulletList"),
|
|
384
385
|
onClick: i[7] ||= (t) => e.editor.chain().focus().toggleBulletList().run()
|
|
385
386
|
}, null, 8, [
|
|
@@ -388,8 +389,8 @@ var Me = ["data-tpl-theme", "aria-label"], Ne = ["disabled", "inert"], Pe = { cl
|
|
|
388
389
|
"active"
|
|
389
390
|
]),
|
|
390
391
|
C(Q, {
|
|
391
|
-
icon: d(
|
|
392
|
-
label: d(
|
|
392
|
+
icon: d(se),
|
|
393
|
+
label: d(L).paragraphEditor.numberedList,
|
|
393
394
|
active: e.editor.isActive("orderedList"),
|
|
394
395
|
onClick: i[8] ||= (t) => e.editor.chain().focus().toggleOrderedList().run()
|
|
395
396
|
}, null, 8, [
|
|
@@ -399,8 +400,8 @@ var Me = ["data-tpl-theme", "aria-label"], Ne = ["disabled", "inert"], Pe = { cl
|
|
|
399
400
|
]),
|
|
400
401
|
C($),
|
|
401
402
|
C(Q, {
|
|
402
|
-
icon: d(
|
|
403
|
-
label: d(
|
|
403
|
+
icon: d(re),
|
|
404
|
+
label: d(L).paragraphEditor.alignLeft,
|
|
404
405
|
active: e.editor.isActive({ textAlign: "left" }),
|
|
405
406
|
onClick: i[9] ||= (t) => e.editor.chain().focus().setTextAlign("left").run()
|
|
406
407
|
}, null, 8, [
|
|
@@ -410,7 +411,7 @@ var Me = ["data-tpl-theme", "aria-label"], Ne = ["disabled", "inert"], Pe = { cl
|
|
|
410
411
|
]),
|
|
411
412
|
C(Q, {
|
|
412
413
|
icon: d(M),
|
|
413
|
-
label: d(
|
|
414
|
+
label: d(L).paragraphEditor.alignCenter,
|
|
414
415
|
active: e.editor.isActive({ textAlign: "center" }),
|
|
415
416
|
onClick: i[10] ||= (t) => e.editor.chain().focus().setTextAlign("center").run()
|
|
416
417
|
}, null, 8, [
|
|
@@ -419,8 +420,8 @@ var Me = ["data-tpl-theme", "aria-label"], Ne = ["disabled", "inert"], Pe = { cl
|
|
|
419
420
|
"active"
|
|
420
421
|
]),
|
|
421
422
|
C(Q, {
|
|
422
|
-
icon: d(
|
|
423
|
-
label: d(
|
|
423
|
+
icon: d(le),
|
|
424
|
+
label: d(L).paragraphEditor.alignRight,
|
|
424
425
|
active: e.editor.isActive({ textAlign: "right" }),
|
|
425
426
|
onClick: i[11] ||= (t) => e.editor.chain().focus().setTextAlign("right").run()
|
|
426
427
|
}, null, 8, [
|
|
@@ -429,8 +430,8 @@ var Me = ["data-tpl-theme", "aria-label"], Ne = ["disabled", "inert"], Pe = { cl
|
|
|
429
430
|
"active"
|
|
430
431
|
]),
|
|
431
432
|
C(Q, {
|
|
432
|
-
icon: d(
|
|
433
|
-
label: d(
|
|
433
|
+
icon: d(ne),
|
|
434
|
+
label: d(L).paragraphEditor.alignJustify,
|
|
434
435
|
active: e.editor.isActive({ textAlign: "justify" }),
|
|
435
436
|
onClick: i[12] ||= (t) => e.editor.chain().focus().setTextAlign("justify").run()
|
|
436
437
|
}, null, 8, [
|
|
@@ -439,11 +440,11 @@ var Me = ["data-tpl-theme", "aria-label"], Ne = ["disabled", "inert"], Pe = { cl
|
|
|
439
440
|
"active"
|
|
440
441
|
]),
|
|
441
442
|
C($),
|
|
442
|
-
C(
|
|
443
|
-
"model-value":
|
|
444
|
-
options: d(
|
|
445
|
-
label: d(
|
|
446
|
-
placeholder: d(
|
|
443
|
+
C(q, {
|
|
444
|
+
"model-value": Te(),
|
|
445
|
+
options: d(Se),
|
|
446
|
+
label: d(L).paragraphEditor.lineHeight,
|
|
447
|
+
placeholder: d(L).paragraphEditor.lineHeightShort,
|
|
447
448
|
"width-class": "tpl:w-16",
|
|
448
449
|
"onUpdate:modelValue": De
|
|
449
450
|
}, null, 8, [
|
|
@@ -452,11 +453,11 @@ var Me = ["data-tpl-theme", "aria-label"], Ne = ["disabled", "inert"], Pe = { cl
|
|
|
452
453
|
"label",
|
|
453
454
|
"placeholder"
|
|
454
455
|
]),
|
|
455
|
-
C(
|
|
456
|
-
"model-value":
|
|
457
|
-
options: d(
|
|
458
|
-
label: d(
|
|
459
|
-
placeholder: d(
|
|
456
|
+
C(q, {
|
|
457
|
+
"model-value": U("letterSpacing"),
|
|
458
|
+
options: d(z),
|
|
459
|
+
label: d(L).paragraphEditor.letterSpacing,
|
|
460
|
+
placeholder: d(L).paragraphEditor.letterSpacingShort,
|
|
460
461
|
"width-class": "tpl:w-20",
|
|
461
462
|
"onUpdate:modelValue": Oe
|
|
462
463
|
}, null, 8, [
|
|
@@ -468,38 +469,38 @@ var Me = ["data-tpl-theme", "aria-label"], Ne = ["disabled", "inert"], Pe = { cl
|
|
|
468
469
|
C($),
|
|
469
470
|
C(Q, {
|
|
470
471
|
icon: d(k),
|
|
471
|
-
label: d(
|
|
472
|
+
label: d(L).paragraphEditor.clearFormatting,
|
|
472
473
|
onClick: i[13] ||= (t) => e.editor.chain().focus().clearNodes().unsetAllMarks().run()
|
|
473
474
|
}, null, 8, ["icon", "label"]),
|
|
474
475
|
C($),
|
|
475
|
-
C(Ee, { onInsert:
|
|
476
|
+
C(Ee, { onInsert: H }),
|
|
476
477
|
e.canRequestMergeTag ? (r(), c(S, { key: 0 }, [C($), _("button", {
|
|
477
478
|
type: "button",
|
|
478
479
|
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:hover:bg-[var(--tpl-bg-active)]",
|
|
479
|
-
"aria-label": d(
|
|
480
|
-
title: d(
|
|
480
|
+
"aria-label": d(L).mergeTag.insert,
|
|
481
|
+
title: d(L).mergeTag.insert,
|
|
481
482
|
onClick: i[14] ||= (e) => f("add-merge-tag")
|
|
482
483
|
}, [C(d(A), {
|
|
483
484
|
size: 16,
|
|
484
485
|
"stroke-width": 2
|
|
485
|
-
}), l(" " + v(d(
|
|
486
|
+
}), l(" " + v(d(L).mergeTag.insertShort), 1)], 8, Ie)], 64)) : m("", !0),
|
|
486
487
|
e.canInsertLogicTag ? (r(), c(S, { key: 1 }, [C($), _("button", {
|
|
487
488
|
type: "button",
|
|
488
489
|
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:hover:bg-[var(--tpl-bg-active)]",
|
|
489
|
-
"aria-label": d(
|
|
490
|
-
title: d(
|
|
490
|
+
"aria-label": d(L).logicTag.insert,
|
|
491
|
+
title: d(L).logicTag.insert,
|
|
491
492
|
"data-testid": "insert-logic-button",
|
|
492
493
|
onClick: i[15] ||= (e) => f("add-logic-tag")
|
|
493
494
|
}, [C(d(O), {
|
|
494
495
|
size: 16,
|
|
495
496
|
"stroke-width": 2
|
|
496
|
-
}), l(" " + v(d(
|
|
497
|
+
}), l(" " + v(d(L).logicTag.insertShort), 1)], 8, Le)], 64)) : m("", !0),
|
|
497
498
|
u.value ? (r(), c(S, { key: 2 }, [C($), C(d(n), { editor: e.editor }, null, 8, ["editor"])], 64)) : m("", !0)
|
|
498
|
-
])], 64)) : (r(), c("div", Re, [C(d(
|
|
499
|
+
])], 64)) : (r(), c("div", Re, [C(d(N), {
|
|
499
500
|
class: "tpl-spinner",
|
|
500
501
|
size: 14,
|
|
501
502
|
"stroke-width": 2
|
|
502
|
-
}), l(" " + v(d(
|
|
503
|
+
}), l(" " + v(d(L).errors.editorLoading), 1)]))], 8, Ne)], 12, Me))], 8, ["to"])) : m("", !0);
|
|
503
504
|
}
|
|
504
505
|
}), Be = { class: "tpl-text-editor-wrapper tpl:relative" }, Ve = /*@__PURE__*/ n({
|
|
505
506
|
__name: "ParagraphEditor",
|
|
@@ -509,7 +510,7 @@ var Me = ["data-tpl-theme", "aria-label"], Ne = ["disabled", "inert"], Pe = { cl
|
|
|
509
510
|
},
|
|
510
511
|
emits: ["done"],
|
|
511
512
|
setup(e, { emit: t }) {
|
|
512
|
-
let n = e, i = t, o =
|
|
513
|
+
let n = e, i = t, o = B(), l = a(_e, null), u = l?.content ? P(l) : null, f = y(() => w(u?.settings.value ?? { locale: "en" }) === "rtl" ? "right" : "left"), { editor: p, EditorContent: m, isLoading: h, isEditable: g, initError: _, retry: v, showLinkDialog: b, linkUrl: x, linkColor: S, linkDialogRef: T, canRequestMergeTag: E, canInsertLogicTag: D, openLinkDialog: O, insertLink: k, removeLink: A, closeLinkDialog: j, handleLinkKeydown: M, handleAddMergeTag: N, handleAddLogicTag: ee } = L({
|
|
513
514
|
blockId: () => n.block.id,
|
|
514
515
|
blockContent: () => n.block.content,
|
|
515
516
|
onDone: () => i("done"),
|
|
@@ -544,7 +545,7 @@ var Me = ["data-tpl-theme", "aria-label"], Ne = ["disabled", "inert"], Pe = { cl
|
|
|
544
545
|
u,
|
|
545
546
|
d,
|
|
546
547
|
p,
|
|
547
|
-
|
|
548
|
+
R(l).configure({
|
|
548
549
|
openOnClick: !1,
|
|
549
550
|
HTMLAttributes: {
|
|
550
551
|
target: "_blank",
|
|
@@ -602,8 +603,8 @@ var Me = ["data-tpl-theme", "aria-label"], Ne = ["disabled", "inert"], Pe = { cl
|
|
|
602
603
|
"can-request-merge-tag": d(E),
|
|
603
604
|
"can-insert-logic-tag": d(D),
|
|
604
605
|
onOpenLinkDialog: d(O),
|
|
605
|
-
onAddMergeTag: d(
|
|
606
|
-
onAddLogicTag: d(
|
|
606
|
+
onAddMergeTag: d(N),
|
|
607
|
+
onAddLogicTag: d(ee)
|
|
607
608
|
}, null, 8, [
|
|
608
609
|
"editor",
|
|
609
610
|
"toolbar-position",
|
|
@@ -615,7 +616,7 @@ var Me = ["data-tpl-theme", "aria-label"], Ne = ["disabled", "inert"], Pe = { cl
|
|
|
615
616
|
"onAddMergeTag",
|
|
616
617
|
"onAddLogicTag"
|
|
617
618
|
]),
|
|
618
|
-
C(
|
|
619
|
+
C(U, {
|
|
619
620
|
editor: d(p),
|
|
620
621
|
"editor-content": d(m),
|
|
621
622
|
"is-loading": d(h),
|
|
@@ -628,7 +629,7 @@ var Me = ["data-tpl-theme", "aria-label"], Ne = ["disabled", "inert"], Pe = { cl
|
|
|
628
629
|
"init-error",
|
|
629
630
|
"onRetry"
|
|
630
631
|
]),
|
|
631
|
-
C(
|
|
632
|
+
C(H, {
|
|
632
633
|
visible: d(b),
|
|
633
634
|
"is-editing-link": d(p)?.isActive("link") ?? !1,
|
|
634
635
|
"dialog-ref": d(T),
|
|
@@ -655,6 +656,6 @@ var Me = ["data-tpl-theme", "aria-label"], Ne = ["disabled", "inert"], Pe = { cl
|
|
|
655
656
|
]));
|
|
656
657
|
}
|
|
657
658
|
}), He = /* @__PURE__ */ e({ default: () => Ue }), Ue = Ve;
|
|
658
|
-
export { Ue as default,
|
|
659
|
+
export { Ue as default, q as n, He as t };
|
|
659
660
|
|
|
660
|
-
//# sourceMappingURL=ParagraphEditor-
|
|
661
|
+
//# sourceMappingURL=ParagraphEditor-B3EQ0Ai6.js.map
|