@aswin.dev/editor 0.8.5 → 0.8.7
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-COL6Wm7p.js → AccessibilityPanel-B39ct5ON.js} +2 -2
- package/dist/{AiChatSidebar-DAJOuHPG.js → AiChatSidebar-CYh7SPHW.js} +2 -2
- package/dist/{AiFeatureMenu-CKnEDzme.js → AiFeatureMenu-D9UhqJAa.js} +3 -3
- package/dist/{BlockA11yBadge-Qs6HtXid.js → BlockA11yBadge-Dr854uEe.js} +2 -2
- package/dist/{CloudEditor-BUlmUuhO.js → CloudEditor-BNEIze18.js} +281 -274
- package/dist/{CollaboratorBar-C6TfqpyV.js → CollaboratorBar-DZXuPSfU.js} +2 -2
- package/dist/{CommentsSidebar-DE6ZsM4D.js → CommentsSidebar-BVKFtxml.js} +4 -4
- package/dist/{CountdownBlock-Ba3T-i2X.js → CountdownBlock-CrpaDWze.js} +1 -1
- package/dist/{CountdownToolbar-B9IAZzeV.js → CountdownToolbar-D1tb2T_b.js} +2 -2
- package/dist/{DesignReferenceSidebar-C6yDJlD8.js → DesignReferenceSidebar-_QsmFpE_.js} +44 -44
- package/dist/{ModuleBrowserModal-DUKuDjS-.js → ModuleBrowserModal-Bth1crh_.js} +7 -7
- package/dist/{ModulePreviewCanvas-C9HTjfkN.js → ModulePreviewCanvas-96pndrb9.js} +3 -3
- package/dist/{ParagraphEditor-CFuaZKGk.js → ParagraphEditor-C2d9O2P4.js} +123 -123
- package/dist/{RichTextEditorContent-CrqPQdnk.js → RichTextEditorContent-Cn0ZU41b.js} +3 -3
- package/dist/{SaveModuleDialog-QjgPFEDg.js → SaveModuleDialog-B1EJtMGq.js} +17 -17
- package/dist/{SlidingPillSelect-DfcBdJqN.js → SlidingPillSelect-Dt34f5VF.js} +1 -1
- package/dist/{SnapshotHistory-Dblt21_W.js → SnapshotHistory-Cd-a_xGv.js} +3 -3
- package/dist/{TemplateScoringPanel-CS7o62zS.js → TemplateScoringPanel-C8WixDsv.js} +77 -77
- package/dist/{TestEmailModal-D_y3ZksG.js → TestEmailModal-CEj_81cQ.js} +3 -3
- package/dist/TitleEditor-C8Qyr_U3.js +172 -0
- package/dist/{TplModal-DinL7DhQ.js → TplModal-B_HcUS4S.js} +2 -2
- package/dist/{blockTypeIcons-JjmIZ_Vx.js → blockTypeIcons-CeaSm2Xd.js} +1 -1
- package/dist/bundle-stats.json +6 -6
- package/dist/cdn/chunks/{AccessibilityPanel-BTADkTp2.js → AccessibilityPanel-C8vY7QIF.js} +3 -3
- package/dist/cdn/chunks/{AccessibilityPanel-BTADkTp2.js.map → AccessibilityPanel-C8vY7QIF.js.map} +1 -1
- package/dist/cdn/chunks/{AiFeatureMenu-D99Pw32q.js → AiFeatureMenu-BaUpnF6T.js} +2 -2
- package/dist/cdn/chunks/{AiFeatureMenu-D99Pw32q.js.map → AiFeatureMenu-BaUpnF6T.js.map} +1 -1
- package/dist/cdn/chunks/{BlockA11yBadge-dtyeSSvY.js → BlockA11yBadge-BHkh4Otq.js} +2 -2
- package/dist/cdn/chunks/{BlockA11yBadge-dtyeSSvY.js.map → BlockA11yBadge-BHkh4Otq.js.map} +1 -1
- package/dist/cdn/chunks/{CloudEditor-BBBkTBfW.js → CloudEditor-DUIjZDAS.js} +264 -257
- package/dist/cdn/chunks/{CloudEditor-BBBkTBfW.js.map → CloudEditor-DUIjZDAS.js.map} +1 -1
- package/dist/cdn/chunks/{CollaboratorBar-Cuy1BusU.js → CollaboratorBar-pyuEO5Bm.js} +3 -3
- package/dist/cdn/chunks/{CollaboratorBar-Cuy1BusU.js.map → CollaboratorBar-pyuEO5Bm.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownToolbar-CqFM85Xv.js → CountdownToolbar-CCGHm6Gg.js} +3 -3
- package/dist/cdn/chunks/{CountdownToolbar-CqFM85Xv.js.map → CountdownToolbar-CCGHm6Gg.js.map} +1 -1
- package/dist/cdn/chunks/{ModuleBrowserModal-Dcxtq_dC.js → ModuleBrowserModal-DKsMddYS.js} +6 -6
- package/dist/cdn/chunks/{ModuleBrowserModal-Dcxtq_dC.js.map → ModuleBrowserModal-DKsMddYS.js.map} +1 -1
- package/dist/cdn/chunks/{ModulePreviewCanvas-Didb4ZCU.js → ModulePreviewCanvas-E0mfCUJi.js} +2 -2
- package/dist/cdn/chunks/{ModulePreviewCanvas-Didb4ZCU.js.map → ModulePreviewCanvas-E0mfCUJi.js.map} +1 -1
- package/dist/cdn/chunks/{ParagraphEditor-BX2L35YF.js → ParagraphEditor-DwmzHg6F.js} +116 -116
- package/dist/cdn/chunks/ParagraphEditor-DwmzHg6F.js.map +1 -0
- package/dist/cdn/chunks/{RichTextEditorContent-ywrdsvHY.js → RichTextEditorContent-4-cNqB4H.js} +3 -3
- package/dist/cdn/chunks/{RichTextEditorContent-ywrdsvHY.js.map → RichTextEditorContent-4-cNqB4H.js.map} +1 -1
- package/dist/cdn/chunks/{SaveModuleDialog-Ddp-HCFB.js → SaveModuleDialog-COm3ptOF.js} +3 -3
- package/dist/cdn/chunks/{SaveModuleDialog-Ddp-HCFB.js.map → SaveModuleDialog-COm3ptOF.js.map} +1 -1
- package/dist/cdn/chunks/{SlidingPillSelect-CS6N3vGq.js → SlidingPillSelect-DlgRynQN.js} +2 -2
- package/dist/cdn/chunks/{SlidingPillSelect-CS6N3vGq.js.map → SlidingPillSelect-DlgRynQN.js.map} +1 -1
- package/dist/cdn/chunks/TitleEditor-CE8r8txX.js +171 -0
- package/dist/cdn/chunks/TitleEditor-CE8r8txX.js.map +1 -0
- package/dist/cdn/chunks/{blockTypeIcons-B2x3gJsz.js → blockTypeIcons-BOf7hTFU.js} +3 -3
- package/dist/cdn/chunks/{blockTypeIcons-B2x3gJsz.js.map → blockTypeIcons-BOf7hTFU.js.map} +1 -1
- package/dist/cdn/chunks/{extensions-CdYSoz4B.js → extensions-B5e8Ov02.js} +17 -17
- package/dist/cdn/chunks/{extensions-CdYSoz4B.js.map → extensions-B5e8Ov02.js.map} +1 -1
- package/dist/cdn/chunks/{features-BZeMkHMs.js → features-BHTP4oRU.js} +734 -734
- package/dist/cdn/chunks/features-BHTP4oRU.js.map +1 -0
- package/dist/cdn/chunks/{icons-nP0Wj6Eq.js → icons-DS4IYWzG.js} +2 -2
- package/dist/cdn/chunks/{icons-nP0Wj6Eq.js.map → icons-DS4IYWzG.js.map} +1 -1
- package/dist/cdn/chunks/{media-library-54Ezt5wL.js → media-library-BLLJsLwk.js} +508 -508
- package/dist/cdn/chunks/{media-library-54Ezt5wL.js.map → media-library-BLLJsLwk.js.map} +1 -1
- package/dist/cdn/chunks/{quality-Di1pUcCW.js → quality-DfKLOn8j.js} +290 -290
- package/dist/cdn/chunks/{quality-Di1pUcCW.js.map → quality-DfKLOn8j.js.map} +1 -1
- package/dist/cdn/chunks/{renderer-C4OuJhDG.js → renderer-fG9yLafB.js} +14 -14
- package/dist/cdn/chunks/{renderer-C4OuJhDG.js.map → renderer-fG9yLafB.js.map} +1 -1
- package/dist/cdn/chunks/{src-DF5NNH7S.js → src-DsfVhQaK.js} +4 -4
- package/dist/cdn/chunks/{src-DF5NNH7S.js.map → src-DsfVhQaK.js.map} +1 -1
- package/dist/cdn/chunks/{styles-C9P3yzMF.js → styles-CPUuKOlD.js} +210 -210
- package/dist/cdn/chunks/{styles-C9P3yzMF.js.map → styles-CPUuKOlD.js.map} +1 -1
- package/dist/cdn/chunks/{tiptap-CZ52Pj8k.js → tiptap-q69oUYhb.js} +2 -2
- package/dist/cdn/chunks/{tiptap-CZ52Pj8k.js.map → tiptap-q69oUYhb.js.map} +1 -1
- package/dist/cdn/editor.css +1 -1
- package/dist/cdn/editor.js +130 -123
- package/dist/cdn/editor.js.map +1 -1
- package/dist/{extensions-CNPdJw_8.js → extensions-mwqd2u9M.js} +2 -2
- package/dist/index.d.ts +6 -6
- package/dist/keys-CqdzeWhT.js +10 -0
- package/dist/style.css +1 -1
- package/dist/{styles-ZIYLQwFf.js → styles-BRNubGRJ.js} +287 -287
- package/dist/templatical-editor.js +134 -127
- package/dist/{useCloudI18n-DOKSZql1.js → useCloudI18n-CDhjmAgB.js} +1 -1
- package/dist/{useEditorCore-BHSyoxSK.js → useEditorCore-DB4A_cje.js} +22 -22
- package/dist/{useI18n-C2xQZ6K9.js → useI18n-DLZJ6wNn.js} +1 -1
- package/dist/{useMergeTag-BfVcyNSv.js → useMergeTag-D-kqWENN.js} +2 -2
- package/package.json +7 -7
- package/dist/TitleEditor-CHmL3FFR.js +0 -172
- package/dist/cdn/chunks/ParagraphEditor-BX2L35YF.js.map +0 -1
- package/dist/cdn/chunks/TitleEditor-BTtgZzci.js +0 -171
- package/dist/cdn/chunks/TitleEditor-BTtgZzci.js.map +0 -1
- package/dist/cdn/chunks/features-BZeMkHMs.js.map +0 -1
- package/dist/keys-CvX8D-8C.js +0 -10
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { At as e, C as t, D as n, F as r, Ft as i, N as a, R as o, Y as s, _ as c, b as l, d as u, et as d, f, g as p, h as m, jt as h, m as g, p as _, st as v, u as y, v as b, x } from "./vue.runtime.esm-bundler-CjauPXjj.js";
|
|
2
|
-
import { C as S, D as C, E as w } from "./useEditorCore-
|
|
2
|
+
import { C as S, D as C, E as w } from "./useEditorCore-DB4A_cje.js";
|
|
3
3
|
import { t as T } from "./dist-Djgi0A6k.js";
|
|
4
|
-
import { A as E, D,
|
|
5
|
-
import { t as
|
|
6
|
-
import { t as
|
|
7
|
-
import { a as
|
|
8
|
-
import { t as
|
|
9
|
-
import { t as
|
|
10
|
-
import { n as
|
|
11
|
-
import { t as
|
|
12
|
-
import { a as
|
|
13
|
-
var
|
|
4
|
+
import { A as E, O as D, _ as O, j as ee, m as te } from "./keys-CqdzeWhT.js";
|
|
5
|
+
import { t as k } from "./useI18n-DLZJ6wNn.js";
|
|
6
|
+
import { t as A } from "./createLucideIcon-ClREiSx3.js";
|
|
7
|
+
import { a as ne, i as j, n as M, r as re, t as N } from "./RichTextEditorContent-Cn0ZU41b.js";
|
|
8
|
+
import { t as ie } from "./loader-circle-Balo8p3d.js";
|
|
9
|
+
import { t as ae } from "./scan-line-CzfFJO1o.js";
|
|
10
|
+
import { n as oe, r as se, t as ce } from "./text-align-start-CzBnJsW8.js";
|
|
11
|
+
import { t as P } from "./_plugin-vue_export-helper-BVAJ4lgT.js";
|
|
12
|
+
import { a as F, o as I, s as L } from "./styleConstants-34eUKPOZ.js";
|
|
13
|
+
var R = A("list-ordered", [
|
|
14
14
|
["path", {
|
|
15
15
|
d: "M11 5h10",
|
|
16
16
|
key: "1cz7ny"
|
|
@@ -35,7 +35,7 @@ var V = j("list-ordered", [
|
|
|
35
35
|
d: "M6.5 20H3.4c0-1 2.6-1.925 2.6-3.5a1.5 1.5 0 0 0-2.6-1.02",
|
|
36
36
|
key: "xtkcd5"
|
|
37
37
|
}]
|
|
38
|
-
]),
|
|
38
|
+
]), z = A("list", [
|
|
39
39
|
["path", {
|
|
40
40
|
d: "M3 5h.01",
|
|
41
41
|
key: "18ugdj"
|
|
@@ -60,7 +60,7 @@ var V = j("list-ordered", [
|
|
|
60
60
|
d: "M8 19h13",
|
|
61
61
|
key: "m83p4d"
|
|
62
62
|
}]
|
|
63
|
-
]),
|
|
63
|
+
]), B = A("remove-formatting", [
|
|
64
64
|
["path", {
|
|
65
65
|
d: "M4 7V4h16v3",
|
|
66
66
|
key: "9msm58"
|
|
@@ -81,7 +81,7 @@ var V = j("list-ordered", [
|
|
|
81
81
|
d: "m20 15-5 5",
|
|
82
82
|
key: "11p7ol"
|
|
83
83
|
}]
|
|
84
|
-
]),
|
|
84
|
+
]), V = A("smile", [
|
|
85
85
|
["circle", {
|
|
86
86
|
cx: "12",
|
|
87
87
|
cy: "12",
|
|
@@ -106,7 +106,7 @@ var V = j("list-ordered", [
|
|
|
106
106
|
y2: "9",
|
|
107
107
|
key: "1p4y9e"
|
|
108
108
|
}]
|
|
109
|
-
]),
|
|
109
|
+
]), H = A("strikethrough", [
|
|
110
110
|
["path", {
|
|
111
111
|
d: "M16 4H9a3 3 0 0 0-2.83 4",
|
|
112
112
|
key: "43sutm"
|
|
@@ -122,7 +122,7 @@ var V = j("list-ordered", [
|
|
|
122
122
|
y2: "12",
|
|
123
123
|
key: "1e0a9i"
|
|
124
124
|
}]
|
|
125
|
-
]),
|
|
125
|
+
]), U = A("subscript", [
|
|
126
126
|
["path", {
|
|
127
127
|
d: "m4 5 8 8",
|
|
128
128
|
key: "1eunvl"
|
|
@@ -135,7 +135,7 @@ var V = j("list-ordered", [
|
|
|
135
135
|
d: "M20 19h-4c0-1.5.44-2 1.5-2.5S20 15.33 20 14c0-.47-.17-.93-.48-1.29a2.11 2.11 0 0 0-2.62-.44c-.42.24-.74.62-.9 1.07",
|
|
136
136
|
key: "e8ta8j"
|
|
137
137
|
}]
|
|
138
|
-
]),
|
|
138
|
+
]), W = A("superscript", [
|
|
139
139
|
["path", {
|
|
140
140
|
d: "m4 19 8-8",
|
|
141
141
|
key: "hr47gm"
|
|
@@ -148,7 +148,7 @@ var V = j("list-ordered", [
|
|
|
148
148
|
d: "M20 12h-4c0-1.5.442-2 1.5-2.5S20 8.334 20 7.002c0-.472-.17-.93-.484-1.29a2.105 2.105 0 0 0-2.617-.436c-.42.239-.738.614-.899 1.06",
|
|
149
149
|
key: "1dfcux"
|
|
150
150
|
}]
|
|
151
|
-
]),
|
|
151
|
+
]), G = A("underline", [["path", {
|
|
152
152
|
d: "M6 4v6a6 6 0 0 0 12 0V4",
|
|
153
153
|
key: "9kb039"
|
|
154
154
|
}], ["line", {
|
|
@@ -157,15 +157,15 @@ var V = j("list-ordered", [
|
|
|
157
157
|
y1: "20",
|
|
158
158
|
y2: "20",
|
|
159
159
|
key: "nun2al"
|
|
160
|
-
}]]),
|
|
160
|
+
}]]), K = [
|
|
161
161
|
"aria-label",
|
|
162
162
|
"title",
|
|
163
163
|
"aria-expanded"
|
|
164
|
-
],
|
|
164
|
+
], q = ["aria-label"], J = { class: "tpl:mb-1.5 tpl:text-[10px] tpl:font-medium tpl:tracking-wide tpl:text-[var(--tpl-text-muted)] tpl:uppercase" }, Y = { class: "tpl:grid tpl:grid-cols-10 tpl:gap-0.5" }, le = ["aria-label", "onClick"], ue = /* @__PURE__ */ t({
|
|
165
165
|
__name: "EmojiPickerDropdown",
|
|
166
166
|
emits: ["insert"],
|
|
167
167
|
setup(t, { emit: n }) {
|
|
168
|
-
let o = n, { categories: s, isOpen: l, toggle: p, close: h } = w(), { t: _, format: S } =
|
|
168
|
+
let o = n, { categories: s, isOpen: l, toggle: p, close: h } = w(), { t: _, format: S } = k(), E = d(null), D = d(null);
|
|
169
169
|
C(E, g(() => l.value)), T(D, () => {
|
|
170
170
|
l.value && h();
|
|
171
171
|
});
|
|
@@ -185,10 +185,10 @@ var V = j("list-ordered", [
|
|
|
185
185
|
"aria-haspopup": "dialog",
|
|
186
186
|
"aria-controls": "tpl-emoji-picker",
|
|
187
187
|
onClick: n[0] ||= (...e) => v(p) && v(p)(...e)
|
|
188
|
-
}, [x(v(
|
|
188
|
+
}, [x(v(V), {
|
|
189
189
|
size: 16,
|
|
190
190
|
"stroke-width": 2
|
|
191
|
-
})], 10,
|
|
191
|
+
})], 10, K), v(l) ? (a(), b("div", {
|
|
192
192
|
key: 0,
|
|
193
193
|
id: "tpl-emoji-picker",
|
|
194
194
|
ref_key: "pickerRef",
|
|
@@ -202,15 +202,15 @@ var V = j("list-ordered", [
|
|
|
202
202
|
}, [(a(!0), b(f, null, r(v(s), (e) => (a(), b("div", {
|
|
203
203
|
key: e.key,
|
|
204
204
|
class: "tpl:mb-2 tpl:last:mb-0"
|
|
205
|
-
}, [m("div",
|
|
205
|
+
}, [m("div", J, i(v(_).emoji[e.key]), 1), m("div", Y, [(a(!0), b(f, null, r(e.emojis, (e) => (a(), b("button", {
|
|
206
206
|
key: e,
|
|
207
207
|
type: "button",
|
|
208
208
|
"aria-label": v(S)(v(_).paragraphEditor.emojiItemLabel, { emoji: e }),
|
|
209
209
|
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)]",
|
|
210
210
|
onClick: (t) => O(e)
|
|
211
|
-
}, i(e), 9,
|
|
211
|
+
}, i(e), 9, le))), 128))])]))), 128))], 40, q)) : c("", !0)], 512));
|
|
212
212
|
}
|
|
213
|
-
}),
|
|
213
|
+
}), de = [
|
|
214
214
|
"aria-label",
|
|
215
215
|
"title",
|
|
216
216
|
"aria-pressed"
|
|
@@ -233,20 +233,20 @@ var V = j("list-ordered", [
|
|
|
233
233
|
}, [(a(), p(o(t.icon), {
|
|
234
234
|
size: t.size ?? 16,
|
|
235
235
|
"stroke-width": t.strokeWidth ?? 2
|
|
236
|
-
}, null, 8, ["size", "stroke-width"]))], 10,
|
|
236
|
+
}, null, 8, ["size", "stroke-width"]))], 10, de));
|
|
237
237
|
}
|
|
238
|
-
}),
|
|
238
|
+
}), fe = {}, pe = {
|
|
239
239
|
class: "tpl:mx-1 tpl:h-6 tpl:w-px tpl:bg-[var(--tpl-border)]",
|
|
240
240
|
"aria-hidden": "true"
|
|
241
241
|
};
|
|
242
|
-
function
|
|
243
|
-
return a(), b("span",
|
|
242
|
+
function me(e, t) {
|
|
243
|
+
return a(), b("span", pe);
|
|
244
244
|
}
|
|
245
|
-
var Z = /* @__PURE__ */
|
|
245
|
+
var Z = /* @__PURE__ */ P(fe, [["render", me]]), he = [
|
|
246
246
|
"value",
|
|
247
247
|
"aria-label",
|
|
248
248
|
"title"
|
|
249
|
-
],
|
|
249
|
+
], ge = { value: "" }, _e = ["value"], Q = /* @__PURE__ */ t({
|
|
250
250
|
__name: "ToolbarSelect",
|
|
251
251
|
props: {
|
|
252
252
|
modelValue: {},
|
|
@@ -273,23 +273,23 @@ var Z = /* @__PURE__ */ L(de, [["render", pe]]), me = [
|
|
|
273
273
|
"aria-label": t.label,
|
|
274
274
|
title: t.label,
|
|
275
275
|
onChange: s
|
|
276
|
-
}, [m("option",
|
|
276
|
+
}, [m("option", ge, i(t.placeholder ?? ""), 1), (a(!0), b(f, null, r(t.options, (e) => (a(), b("option", {
|
|
277
277
|
key: c(e),
|
|
278
278
|
value: c(e)
|
|
279
|
-
}, i(l(e)), 9,
|
|
279
|
+
}, i(l(e)), 9, _e))), 128))], 42, he));
|
|
280
280
|
}
|
|
281
|
-
}),
|
|
281
|
+
}), ve = ["data-tpl-theme", "aria-label"], ye = { class: "tpl:flex tpl:items-center tpl:gap-1" }, be = { class: "tpl:relative" }, xe = [
|
|
282
282
|
"value",
|
|
283
283
|
"aria-label",
|
|
284
284
|
"title"
|
|
285
|
-
],
|
|
285
|
+
], Se = { class: "tpl:relative" }, Ce = [
|
|
286
286
|
"value",
|
|
287
287
|
"aria-label",
|
|
288
288
|
"title"
|
|
289
|
-
],
|
|
289
|
+
], $ = { class: "tpl:flex tpl:items-center tpl:gap-1" }, we = ["aria-label", "title"], Te = {
|
|
290
290
|
key: 1,
|
|
291
291
|
class: "tpl:flex tpl:items-center tpl:gap-2 tpl:px-2 tpl:text-xs tpl:text-[var(--tpl-text-dim)]"
|
|
292
|
-
},
|
|
292
|
+
}, Ee = /* @__PURE__ */ t({
|
|
293
293
|
__name: "ParagraphToolbar",
|
|
294
294
|
props: {
|
|
295
295
|
editor: {},
|
|
@@ -299,48 +299,48 @@ var Z = /* @__PURE__ */ L(de, [["render", pe]]), me = [
|
|
|
299
299
|
},
|
|
300
300
|
emits: ["open-link-dialog", "add-merge-tag"],
|
|
301
301
|
setup(e, { emit: t }) {
|
|
302
|
-
let r = e, o = t, s = n(D, null), u = n(
|
|
303
|
-
function
|
|
302
|
+
let r = e, o = t, s = n(D, null), u = n(E, null), d = ee(O, "ParagraphToolbar"), y = n(te, void 0), S = g(() => y?.value ?? "body"), { t: C } = k(), w = d.fonts;
|
|
303
|
+
function T(e) {
|
|
304
304
|
r.editor?.chain().focus().insertContent(e).run();
|
|
305
305
|
}
|
|
306
|
-
function
|
|
306
|
+
function A(e) {
|
|
307
307
|
return r.editor?.getAttributes("textStyle")[e] || "";
|
|
308
308
|
}
|
|
309
|
-
function
|
|
309
|
+
function M(e) {
|
|
310
310
|
let t = r.editor?.chain().focus();
|
|
311
311
|
e ? t?.setFontFamily(e).run() : t?.unsetFontFamily().run();
|
|
312
312
|
}
|
|
313
|
-
function
|
|
313
|
+
function N(e) {
|
|
314
314
|
let t = r.editor?.chain().focus();
|
|
315
315
|
e ? t?.setFontSize(e).run() : t?.unsetFontSize().run();
|
|
316
316
|
}
|
|
317
|
-
function
|
|
317
|
+
function P(e) {
|
|
318
318
|
let t = r.editor?.chain().focus();
|
|
319
319
|
e ? t?.setColor(e).run() : t?.unsetColor().run();
|
|
320
320
|
}
|
|
321
|
-
function
|
|
321
|
+
function V() {
|
|
322
322
|
return r.editor?.getAttributes("paragraph").lineHeight || "";
|
|
323
323
|
}
|
|
324
|
-
function
|
|
324
|
+
function K(e) {
|
|
325
325
|
let t = r.editor?.chain().focus();
|
|
326
326
|
e ? t?.setLineHeight(e).run() : t?.unsetLineHeight().run();
|
|
327
327
|
}
|
|
328
|
-
function
|
|
328
|
+
function q(e) {
|
|
329
329
|
let t = r.editor?.chain().focus();
|
|
330
330
|
e && e !== "normal" ? t?.setLetterSpacing(e).run() : t?.unsetLetterSpacing().run();
|
|
331
331
|
}
|
|
332
|
-
function
|
|
332
|
+
function J() {
|
|
333
333
|
return r.editor?.getAttributes("highlight").color || "";
|
|
334
334
|
}
|
|
335
335
|
function Y(e) {
|
|
336
336
|
let t = r.editor?.chain().focus();
|
|
337
337
|
e ? t?.setHighlight({ color: e }).run() : t?.unsetHighlight().run();
|
|
338
338
|
}
|
|
339
|
-
return (t, n) => (a(), p(_, { to:
|
|
339
|
+
return (t, n) => (a(), p(_, { to: S.value }, [m("div", {
|
|
340
340
|
"data-tpl-theme": v(u),
|
|
341
341
|
role: "toolbar",
|
|
342
|
-
"aria-label": v(
|
|
343
|
-
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",
|
|
342
|
+
"aria-label": v(C).paragraphEditor.toolbar,
|
|
343
|
+
class: "tpl tpl-text-toolbar tpl:pointer-events-auto 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",
|
|
344
344
|
style: h({
|
|
345
345
|
...v(s),
|
|
346
346
|
top: `${e.toolbarPosition.top}px`,
|
|
@@ -348,14 +348,14 @@ var Z = /* @__PURE__ */ L(de, [["render", pe]]), me = [
|
|
|
348
348
|
transform: "translateY(-100%)",
|
|
349
349
|
flexDirection: "column"
|
|
350
350
|
})
|
|
351
|
-
}, [!e.isLoading && e.editor ? (a(), b(f, { key: 0 }, [m("div",
|
|
351
|
+
}, [!e.isLoading && e.editor ? (a(), b(f, { key: 0 }, [m("div", ye, [
|
|
352
352
|
x(Q, {
|
|
353
|
-
"model-value":
|
|
354
|
-
options: v(
|
|
355
|
-
label: v(
|
|
356
|
-
placeholder: v(
|
|
353
|
+
"model-value": A("fontFamily"),
|
|
354
|
+
options: v(w),
|
|
355
|
+
label: v(C).paragraphEditor.fontFamily,
|
|
356
|
+
placeholder: v(C).paragraphEditor.defaultFont,
|
|
357
357
|
"width-class": "tpl:w-32",
|
|
358
|
-
"onUpdate:modelValue":
|
|
358
|
+
"onUpdate:modelValue": M
|
|
359
359
|
}, null, 8, [
|
|
360
360
|
"model-value",
|
|
361
361
|
"options",
|
|
@@ -363,12 +363,12 @@ var Z = /* @__PURE__ */ L(de, [["render", pe]]), me = [
|
|
|
363
363
|
"placeholder"
|
|
364
364
|
]),
|
|
365
365
|
x(Q, {
|
|
366
|
-
"model-value":
|
|
367
|
-
options: v(
|
|
368
|
-
label: v(
|
|
369
|
-
placeholder: v(
|
|
366
|
+
"model-value": A("fontSize"),
|
|
367
|
+
options: v(F),
|
|
368
|
+
label: v(C).paragraphEditor.fontSize,
|
|
369
|
+
placeholder: v(C).paragraphEditor.defaultSize,
|
|
370
370
|
"width-class": "tpl:w-20",
|
|
371
|
-
"onUpdate:modelValue":
|
|
371
|
+
"onUpdate:modelValue": N
|
|
372
372
|
}, null, 8, [
|
|
373
373
|
"model-value",
|
|
374
374
|
"options",
|
|
@@ -376,27 +376,27 @@ var Z = /* @__PURE__ */ L(de, [["render", pe]]), me = [
|
|
|
376
376
|
"placeholder"
|
|
377
377
|
]),
|
|
378
378
|
x(Z),
|
|
379
|
-
m("div",
|
|
379
|
+
m("div", be, [m("input", {
|
|
380
380
|
type: "color",
|
|
381
381
|
class: "tpl:size-8 tpl:cursor-pointer tpl:rounded tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:p-1",
|
|
382
|
-
value:
|
|
383
|
-
"aria-label": v(
|
|
384
|
-
title: v(
|
|
385
|
-
onInput: n[0] ||= (e) =>
|
|
386
|
-
}, null, 40,
|
|
387
|
-
m("div",
|
|
382
|
+
value: A("color") || v("#000000"),
|
|
383
|
+
"aria-label": v(C).paragraphEditor.textColor,
|
|
384
|
+
title: v(C).paragraphEditor.textColor,
|
|
385
|
+
onInput: n[0] ||= (e) => P(e.target.value)
|
|
386
|
+
}, null, 40, xe)]),
|
|
387
|
+
m("div", Se, [m("input", {
|
|
388
388
|
type: "color",
|
|
389
389
|
class: "tpl:size-8 tpl:cursor-pointer tpl:rounded tpl:border tpl:border-[var(--tpl-border)] tpl:p-1",
|
|
390
|
-
style: h({ backgroundColor:
|
|
391
|
-
value:
|
|
392
|
-
"aria-label": v(
|
|
393
|
-
title: v(
|
|
390
|
+
style: h({ backgroundColor: J() || "var(--tpl-bg)" }),
|
|
391
|
+
value: J() || v("#ffff00"),
|
|
392
|
+
"aria-label": v(C).paragraphEditor.highlightColor,
|
|
393
|
+
title: v(C).paragraphEditor.highlightColor,
|
|
394
394
|
onInput: n[1] ||= (e) => Y(e.target.value)
|
|
395
|
-
}, null, 44,
|
|
395
|
+
}, null, 44, Ce)]),
|
|
396
396
|
x(Z),
|
|
397
397
|
x(X, {
|
|
398
|
-
icon: v(
|
|
399
|
-
label: v(
|
|
398
|
+
icon: v(ne),
|
|
399
|
+
label: v(C).paragraphEditor.bold,
|
|
400
400
|
active: e.editor.isActive("bold"),
|
|
401
401
|
"stroke-width": 2.5,
|
|
402
402
|
onClick: n[2] ||= (t) => e.editor.chain().focus().toggleBold().run()
|
|
@@ -406,8 +406,8 @@ var Z = /* @__PURE__ */ L(de, [["render", pe]]), me = [
|
|
|
406
406
|
"active"
|
|
407
407
|
]),
|
|
408
408
|
x(X, {
|
|
409
|
-
icon: v(
|
|
410
|
-
label: v(
|
|
409
|
+
icon: v(j),
|
|
410
|
+
label: v(C).paragraphEditor.italic,
|
|
411
411
|
active: e.editor.isActive("italic"),
|
|
412
412
|
onClick: n[3] ||= (t) => e.editor.chain().focus().toggleItalic().run()
|
|
413
413
|
}, null, 8, [
|
|
@@ -416,8 +416,8 @@ var Z = /* @__PURE__ */ L(de, [["render", pe]]), me = [
|
|
|
416
416
|
"active"
|
|
417
417
|
]),
|
|
418
418
|
x(X, {
|
|
419
|
-
icon: v(
|
|
420
|
-
label: v(
|
|
419
|
+
icon: v(G),
|
|
420
|
+
label: v(C).paragraphEditor.underline,
|
|
421
421
|
active: e.editor.isActive("underline"),
|
|
422
422
|
onClick: n[4] ||= (t) => e.editor.chain().focus().toggleUnderline().run()
|
|
423
423
|
}, null, 8, [
|
|
@@ -426,8 +426,8 @@ var Z = /* @__PURE__ */ L(de, [["render", pe]]), me = [
|
|
|
426
426
|
"active"
|
|
427
427
|
]),
|
|
428
428
|
x(X, {
|
|
429
|
-
icon: v(
|
|
430
|
-
label: v(
|
|
429
|
+
icon: v(H),
|
|
430
|
+
label: v(C).paragraphEditor.strikethrough,
|
|
431
431
|
active: e.editor.isActive("strike"),
|
|
432
432
|
onClick: n[5] ||= (t) => e.editor.chain().focus().toggleStrike().run()
|
|
433
433
|
}, null, 8, [
|
|
@@ -437,8 +437,8 @@ var Z = /* @__PURE__ */ L(de, [["render", pe]]), me = [
|
|
|
437
437
|
]),
|
|
438
438
|
x(Z),
|
|
439
439
|
x(X, {
|
|
440
|
-
icon: v(
|
|
441
|
-
label: v(
|
|
440
|
+
icon: v(U),
|
|
441
|
+
label: v(C).paragraphEditor.subscript,
|
|
442
442
|
active: e.editor.isActive("subscript"),
|
|
443
443
|
onClick: n[6] ||= (t) => e.editor.chain().focus().toggleSubscript().run()
|
|
444
444
|
}, null, 8, [
|
|
@@ -447,8 +447,8 @@ var Z = /* @__PURE__ */ L(de, [["render", pe]]), me = [
|
|
|
447
447
|
"active"
|
|
448
448
|
]),
|
|
449
449
|
x(X, {
|
|
450
|
-
icon: v(
|
|
451
|
-
label: v(
|
|
450
|
+
icon: v(W),
|
|
451
|
+
label: v(C).paragraphEditor.superscript,
|
|
452
452
|
active: e.editor.isActive("superscript"),
|
|
453
453
|
onClick: n[7] ||= (t) => e.editor.chain().focus().toggleSuperscript().run()
|
|
454
454
|
}, null, 8, [
|
|
@@ -458,8 +458,8 @@ var Z = /* @__PURE__ */ L(de, [["render", pe]]), me = [
|
|
|
458
458
|
]),
|
|
459
459
|
x(Z),
|
|
460
460
|
x(X, {
|
|
461
|
-
icon: v(
|
|
462
|
-
label: v(
|
|
461
|
+
icon: v(re),
|
|
462
|
+
label: v(C).paragraphEditor.addLink,
|
|
463
463
|
active: e.editor.isActive("link"),
|
|
464
464
|
onClick: n[8] ||= (e) => o("open-link-dialog")
|
|
465
465
|
}, null, 8, [
|
|
@@ -467,10 +467,10 @@ var Z = /* @__PURE__ */ L(de, [["render", pe]]), me = [
|
|
|
467
467
|
"label",
|
|
468
468
|
"active"
|
|
469
469
|
])
|
|
470
|
-
]), m("div",
|
|
470
|
+
]), m("div", $, [
|
|
471
471
|
x(X, {
|
|
472
|
-
icon: v(
|
|
473
|
-
label: v(
|
|
472
|
+
icon: v(z),
|
|
473
|
+
label: v(C).paragraphEditor.bulletList,
|
|
474
474
|
active: e.editor.isActive("bulletList"),
|
|
475
475
|
onClick: n[9] ||= (t) => e.editor.chain().focus().toggleBulletList().run()
|
|
476
476
|
}, null, 8, [
|
|
@@ -479,8 +479,8 @@ var Z = /* @__PURE__ */ L(de, [["render", pe]]), me = [
|
|
|
479
479
|
"active"
|
|
480
480
|
]),
|
|
481
481
|
x(X, {
|
|
482
|
-
icon: v(
|
|
483
|
-
label: v(
|
|
482
|
+
icon: v(R),
|
|
483
|
+
label: v(C).paragraphEditor.numberedList,
|
|
484
484
|
active: e.editor.isActive("orderedList"),
|
|
485
485
|
onClick: n[10] ||= (t) => e.editor.chain().focus().toggleOrderedList().run()
|
|
486
486
|
}, null, 8, [
|
|
@@ -490,8 +490,8 @@ var Z = /* @__PURE__ */ L(de, [["render", pe]]), me = [
|
|
|
490
490
|
]),
|
|
491
491
|
x(Z),
|
|
492
492
|
x(X, {
|
|
493
|
-
icon: v(
|
|
494
|
-
label: v(
|
|
493
|
+
icon: v(ce),
|
|
494
|
+
label: v(C).paragraphEditor.alignLeft,
|
|
495
495
|
active: e.editor.isActive({ textAlign: "left" }),
|
|
496
496
|
onClick: n[11] ||= (t) => e.editor.chain().focus().setTextAlign("left").run()
|
|
497
497
|
}, null, 8, [
|
|
@@ -500,8 +500,8 @@ var Z = /* @__PURE__ */ L(de, [["render", pe]]), me = [
|
|
|
500
500
|
"active"
|
|
501
501
|
]),
|
|
502
502
|
x(X, {
|
|
503
|
-
icon: v(
|
|
504
|
-
label: v(
|
|
503
|
+
icon: v(se),
|
|
504
|
+
label: v(C).paragraphEditor.alignCenter,
|
|
505
505
|
active: e.editor.isActive({ textAlign: "center" }),
|
|
506
506
|
onClick: n[12] ||= (t) => e.editor.chain().focus().setTextAlign("center").run()
|
|
507
507
|
}, null, 8, [
|
|
@@ -510,8 +510,8 @@ var Z = /* @__PURE__ */ L(de, [["render", pe]]), me = [
|
|
|
510
510
|
"active"
|
|
511
511
|
]),
|
|
512
512
|
x(X, {
|
|
513
|
-
icon: v(
|
|
514
|
-
label: v(
|
|
513
|
+
icon: v(oe),
|
|
514
|
+
label: v(C).paragraphEditor.alignRight,
|
|
515
515
|
active: e.editor.isActive({ textAlign: "right" }),
|
|
516
516
|
onClick: n[13] ||= (t) => e.editor.chain().focus().setTextAlign("right").run()
|
|
517
517
|
}, null, 8, [
|
|
@@ -521,24 +521,24 @@ var Z = /* @__PURE__ */ L(de, [["render", pe]]), me = [
|
|
|
521
521
|
]),
|
|
522
522
|
x(Z),
|
|
523
523
|
x(Q, {
|
|
524
|
-
"model-value":
|
|
525
|
-
options: v(
|
|
526
|
-
label: v(
|
|
524
|
+
"model-value": V(),
|
|
525
|
+
options: v(L),
|
|
526
|
+
label: v(C).paragraphEditor.lineHeight,
|
|
527
527
|
placeholder: "LH",
|
|
528
528
|
"width-class": "tpl:w-16",
|
|
529
|
-
"onUpdate:modelValue":
|
|
529
|
+
"onUpdate:modelValue": K
|
|
530
530
|
}, null, 8, [
|
|
531
531
|
"model-value",
|
|
532
532
|
"options",
|
|
533
533
|
"label"
|
|
534
534
|
]),
|
|
535
535
|
x(Q, {
|
|
536
|
-
"model-value":
|
|
537
|
-
options: v(
|
|
538
|
-
label: v(
|
|
536
|
+
"model-value": A("letterSpacing"),
|
|
537
|
+
options: v(I),
|
|
538
|
+
label: v(C).paragraphEditor.letterSpacing,
|
|
539
539
|
placeholder: "LS",
|
|
540
540
|
"width-class": "tpl:w-20",
|
|
541
|
-
"onUpdate:modelValue":
|
|
541
|
+
"onUpdate:modelValue": q
|
|
542
542
|
}, null, 8, [
|
|
543
543
|
"model-value",
|
|
544
544
|
"options",
|
|
@@ -546,29 +546,29 @@ var Z = /* @__PURE__ */ L(de, [["render", pe]]), me = [
|
|
|
546
546
|
]),
|
|
547
547
|
x(Z),
|
|
548
548
|
x(X, {
|
|
549
|
-
icon: v(
|
|
550
|
-
label: v(
|
|
549
|
+
icon: v(B),
|
|
550
|
+
label: v(C).paragraphEditor.clearFormatting,
|
|
551
551
|
onClick: n[14] ||= (t) => e.editor.chain().focus().clearNodes().unsetAllMarks().run()
|
|
552
552
|
}, null, 8, ["icon", "label"]),
|
|
553
553
|
x(Z),
|
|
554
|
-
x(
|
|
554
|
+
x(ue, { onInsert: T }),
|
|
555
555
|
e.canRequestMergeTag ? (a(), b(f, { key: 0 }, [x(Z), m("button", {
|
|
556
556
|
type: "button",
|
|
557
557
|
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)]",
|
|
558
|
-
"aria-label": v(
|
|
559
|
-
title: v(
|
|
558
|
+
"aria-label": v(C).mergeTag.add,
|
|
559
|
+
title: v(C).mergeTag.add,
|
|
560
560
|
onClick: n[15] ||= (e) => o("add-merge-tag")
|
|
561
|
-
}, [x(v(
|
|
561
|
+
}, [x(v(ae), {
|
|
562
562
|
size: 16,
|
|
563
563
|
"stroke-width": 2
|
|
564
|
-
}), l(" " + i(v(
|
|
565
|
-
])], 64)) : (a(), b("div",
|
|
564
|
+
}), l(" " + i(v(C).mergeTag.add), 1)], 8, we)], 64)) : c("", !0)
|
|
565
|
+
])], 64)) : (a(), b("div", Te, [x(v(ie), {
|
|
566
566
|
class: "tpl-spinner",
|
|
567
567
|
size: 14,
|
|
568
568
|
"stroke-width": 2
|
|
569
|
-
}), l(" " + i(v(
|
|
569
|
+
}), l(" " + i(v(C).errors.editorLoading), 1)]))], 12, ve)], 8, ["to"]));
|
|
570
570
|
}
|
|
571
|
-
}),
|
|
571
|
+
}), De = { class: "tpl-text-editor-wrapper tpl:relative" }, Oe = /* @__PURE__ */ t({
|
|
572
572
|
__name: "ParagraphEditor",
|
|
573
573
|
props: {
|
|
574
574
|
block: {},
|
|
@@ -594,7 +594,7 @@ var Z = /* @__PURE__ */ L(de, [["render", pe]]), me = [
|
|
|
594
594
|
import("./dist-BadNx4qo.js"),
|
|
595
595
|
import("./dist-COSzWQUs.js"),
|
|
596
596
|
import("./dist-BZyY-SS4.js"),
|
|
597
|
-
import("./extensions-
|
|
597
|
+
import("./extensions-mwqd2u9M.js")
|
|
598
598
|
]);
|
|
599
599
|
return {
|
|
600
600
|
TiptapEditor: a,
|
|
@@ -638,8 +638,8 @@ var Z = /* @__PURE__ */ L(de, [["render", pe]]), me = [
|
|
|
638
638
|
};
|
|
639
639
|
}
|
|
640
640
|
});
|
|
641
|
-
return (t, n) => (a(), b("div",
|
|
642
|
-
x(
|
|
641
|
+
return (t, n) => (a(), b("div", De, [
|
|
642
|
+
x(Ee, {
|
|
643
643
|
editor: v(i),
|
|
644
644
|
"toolbar-position": e.toolbarPosition,
|
|
645
645
|
"is-loading": v(c),
|
|
@@ -654,7 +654,7 @@ var Z = /* @__PURE__ */ L(de, [["render", pe]]), me = [
|
|
|
654
654
|
"onOpenLinkDialog",
|
|
655
655
|
"onAddMergeTag"
|
|
656
656
|
]),
|
|
657
|
-
x(
|
|
657
|
+
x(N, {
|
|
658
658
|
editor: v(i),
|
|
659
659
|
"editor-content": v(o),
|
|
660
660
|
"is-loading": v(c),
|
|
@@ -667,7 +667,7 @@ var Z = /* @__PURE__ */ L(de, [["render", pe]]), me = [
|
|
|
667
667
|
"init-error",
|
|
668
668
|
"onRetry"
|
|
669
669
|
]),
|
|
670
|
-
x(
|
|
670
|
+
x(M, {
|
|
671
671
|
visible: v(d),
|
|
672
672
|
"is-editing-link": v(i)?.isActive("link") ?? !1,
|
|
673
673
|
"dialog-ref": v(p),
|
|
@@ -692,4 +692,4 @@ var Z = /* @__PURE__ */ L(de, [["render", pe]]), me = [
|
|
|
692
692
|
}
|
|
693
693
|
});
|
|
694
694
|
//#endregion
|
|
695
|
-
export {
|
|
695
|
+
export { Oe as default };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { B as e, C as t, D as n, Ft as r, N as i, O as a, R as o, W as s, _ as c, b as l, c as u, d, g as f, h as p, jt as m, p as h, st as g, v as _, x as v } from "./vue.runtime.esm-bundler-CjauPXjj.js";
|
|
2
|
-
import {
|
|
3
|
-
import { t as x } from "./useI18n-
|
|
2
|
+
import { A as y, O as b } from "./keys-CqdzeWhT.js";
|
|
3
|
+
import { t as x } from "./useI18n-DLZJ6wNn.js";
|
|
4
4
|
import { t as S } from "./createLucideIcon-ClREiSx3.js";
|
|
5
5
|
import { t as C } from "./x-BkaOMosX.js";
|
|
6
6
|
var w = S("bold", [["path", {
|
|
@@ -58,7 +58,7 @@ var w = S("bold", [["path", {
|
|
|
58
58
|
"keydown"
|
|
59
59
|
], ["update:linkUrl", "update:dialogRef"]),
|
|
60
60
|
setup(t, { emit: a }) {
|
|
61
|
-
let o = e(t, "linkUrl"), l = e(t, "dialogRef"), S = a, w = n(
|
|
61
|
+
let o = e(t, "linkUrl"), l = e(t, "dialogRef"), S = a, w = n(b, null), T = n(y, null), { t: E } = x();
|
|
62
62
|
return (e, n) => (i(), f(h, { to: "body" }, [t.visible ? (i(), _("div", {
|
|
63
63
|
key: 0,
|
|
64
64
|
"data-tpl-theme": g(T),
|