@templatical/editor 0.14.0 → 0.15.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/{AiChatSidebar-J8iO_sX7.js → AiChatSidebar-BIKvYREk.js} +57 -56
- package/dist/{AiFeatureMenu-F2diEDgV.js → AiFeatureMenu-CU6kTMTf.js} +20 -20
- package/dist/{BlockIssueBadge-a-qlByxF.js → BlockIssueBadge-B3xVgMTh.js} +11 -11
- package/dist/{CloudEditor-CDjtwb4i.js → CloudEditor-DRPxvUEj.js} +470 -468
- package/dist/{CollaboratorBar-B_EnJLtW.js → CollaboratorBar-DMSjd3HZ.js} +20 -20
- package/dist/{CommentsSidebar-DaP9BA_r.js → CommentsSidebar-D_tSGvTX.js} +154 -153
- package/dist/CountdownBlock-apiYUhkQ.js +92 -0
- package/dist/CountdownToolbar-CS0axcjz.js +210 -0
- package/dist/{DesignReferenceSidebar-BHRlTqlT.js → DesignReferenceSidebar-DWYK9nTk.js} +58 -57
- package/dist/{IssuesPanel-u7ee3Wrl.js → IssuesPanel-CR1MPaDE.js} +40 -40
- package/dist/{LoadingTrack-CV3ID80N.js → LoadingTrack-DsecR8Rw.js} +1 -1
- package/dist/MergeTagSuggestion-CH2SUxBo.js +1327 -0
- package/dist/{ModuleBrowserModal-DOsdaS6s.js → ModuleBrowserModal-BOzleijA.js} +60 -59
- package/dist/{ModulePreviewCanvas-Cx4MOJ0X.js → ModulePreviewCanvas-Cg99Pbde.js} +29 -29
- package/dist/{NumberWithSuffix-D2mW_DhT.js → NumberWithSuffix-CrA6quxx.js} +143 -142
- package/dist/{ParagraphEditor-DMzkVnST.js → ParagraphEditor-8jnzoL0A.js} +250 -247
- package/dist/{RichTextEditorContent-CRCxCwKf.js → RichTextEditorContent-BqLHIZY7.js} +45 -44
- package/dist/{SaveModuleDialog-DuEKgumL.js → SaveModuleDialog-Cy2XyjYT.js} +38 -37
- package/dist/{SnapshotHistory-CVgiNJtE.js → SnapshotHistory-cfxmOsJu.js} +34 -33
- package/dist/{TemplateScoringPanel-lm0_9nYi.js → TemplateScoringPanel-CZ62rGHz.js} +83 -82
- package/dist/{TestEmailModal-WBMdiW5S.js → TestEmailModal-sr1MaMVX.js} +22 -21
- package/dist/{TitleEditor-eyT0h-Sa.js → TitleEditor-CvGTprIg.js} +46 -45
- package/dist/{TplModal-tjQ7OB0g.js → TplModal-BtKB-0Bx.js} +14 -13
- package/dist/{blockTypeIcons-DdB3uTKD.js → blockTypeIcons-BxEbbev5.js} +2 -2
- package/dist/bundle-stats.json +8 -8
- package/dist/cdn/chunks/{AiFeatureMenu-D7rB2SBs.js → AiFeatureMenu-fDUpv_-s.js} +5 -5
- package/dist/cdn/chunks/{AiFeatureMenu-D7rB2SBs.js.map → AiFeatureMenu-fDUpv_-s.js.map} +1 -1
- package/dist/cdn/chunks/{BlockIssueBadge-DHOe0pgx.js → BlockIssueBadge-Byce0j0W.js} +3 -3
- package/dist/cdn/chunks/{BlockIssueBadge-DHOe0pgx.js.map → BlockIssueBadge-Byce0j0W.js.map} +1 -1
- package/dist/cdn/chunks/{CloudEditor-DNed_Ym0.js → CloudEditor-B4m8ldiE.js} +89 -89
- package/dist/cdn/chunks/{CloudEditor-DNed_Ym0.js.map → CloudEditor-B4m8ldiE.js.map} +1 -1
- package/dist/cdn/chunks/{CollaboratorBar-sj_9Lee3.js → CollaboratorBar-LnLmjxw_.js} +4 -4
- package/dist/cdn/chunks/{CollaboratorBar-sj_9Lee3.js.map → CollaboratorBar-LnLmjxw_.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownBlock-C1Ikjpn4.js → CountdownBlock-DxTuMRBM.js} +3 -3
- package/dist/cdn/chunks/{CountdownBlock-C1Ikjpn4.js.map → CountdownBlock-DxTuMRBM.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownToolbar-j1G_X8rB.js → CountdownToolbar-DUrVfQZH.js} +4 -4
- package/dist/cdn/chunks/{CountdownToolbar-j1G_X8rB.js.map → CountdownToolbar-DUrVfQZH.js.map} +1 -1
- package/dist/cdn/chunks/{IssuesPanel-CTOf3PsH.js → IssuesPanel-CHl90k4h.js} +4 -4
- package/dist/cdn/chunks/{IssuesPanel-CTOf3PsH.js.map → IssuesPanel-CHl90k4h.js.map} +1 -1
- package/dist/cdn/chunks/MergeTagSuggestion-BsCAo4Co.js +213 -0
- package/dist/cdn/chunks/MergeTagSuggestion-BsCAo4Co.js.map +1 -0
- package/dist/cdn/chunks/{ModuleBrowserModal-DCh88-rr.js → ModuleBrowserModal-DW0iQW0J.js} +6 -6
- package/dist/cdn/chunks/{ModuleBrowserModal-DCh88-rr.js.map → ModuleBrowserModal-DW0iQW0J.js.map} +1 -1
- package/dist/cdn/chunks/{ModulePreviewCanvas-DJqvTKmg.js → ModulePreviewCanvas-Cxo8v8t1.js} +3 -3
- package/dist/cdn/chunks/{ModulePreviewCanvas-DJqvTKmg.js.map → ModulePreviewCanvas-Cxo8v8t1.js.map} +1 -1
- package/dist/cdn/chunks/{NumberWithSuffix-Bu45XWSl.js → NumberWithSuffix-CnSRmUMK.js} +6 -6
- package/dist/cdn/chunks/{NumberWithSuffix-Bu45XWSl.js.map → NumberWithSuffix-CnSRmUMK.js.map} +1 -1
- package/dist/cdn/chunks/{ParagraphEditor-DwZqLJp2.js → ParagraphEditor-iG5cDjH0.js} +25 -23
- package/dist/cdn/chunks/{ParagraphEditor-DwZqLJp2.js.map → ParagraphEditor-iG5cDjH0.js.map} +1 -1
- package/dist/cdn/chunks/{RichTextEditorContent-CIuZ-2DV.js → RichTextEditorContent-DQpgeGMj.js} +4 -4
- package/dist/cdn/chunks/{RichTextEditorContent-CIuZ-2DV.js.map → RichTextEditorContent-DQpgeGMj.js.map} +1 -1
- package/dist/cdn/chunks/{SaveModuleDialog-Bep0X2s_.js → SaveModuleDialog-sJQXg2Mh.js} +3 -3
- package/dist/cdn/chunks/{SaveModuleDialog-Bep0X2s_.js.map → SaveModuleDialog-sJQXg2Mh.js.map} +1 -1
- package/dist/cdn/chunks/{TitleEditor-DO1-h3RY.js → TitleEditor-C8qIn9Oi.js} +12 -11
- package/dist/cdn/chunks/TitleEditor-C8qIn9Oi.js.map +1 -0
- package/dist/cdn/chunks/{blockTypeIcons-8o24HVJu.js → blockTypeIcons-DySnOpPo.js} +3 -3
- package/dist/cdn/chunks/{blockTypeIcons-8o24HVJu.js.map → blockTypeIcons-DySnOpPo.js.map} +1 -1
- package/dist/cdn/chunks/{draggable-kPCz_3zM.js → draggable-kG-D5Xsm.js} +6 -6
- package/dist/cdn/chunks/draggable-kG-D5Xsm.js.map +1 -0
- package/dist/cdn/chunks/extensions-C2pTX899.js +421 -0
- package/dist/cdn/chunks/extensions-C2pTX899.js.map +1 -0
- package/dist/cdn/chunks/{features-CkTMVylx.js → features-CHE3YjQE.js} +886 -837
- package/dist/cdn/chunks/features-CHE3YjQE.js.map +1 -0
- package/dist/cdn/chunks/{icons-9zjCuoJx.js → icons-M4uqBV-_.js} +26 -26
- package/dist/cdn/chunks/{icons-9zjCuoJx.js.map → icons-M4uqBV-_.js.map} +1 -1
- package/dist/cdn/chunks/{liquid.browser-DKKBzRQu.js → liquid.browser-BJOEu6Cg.js} +693 -678
- package/dist/cdn/chunks/liquid.browser-BJOEu6Cg.js.map +1 -0
- package/dist/cdn/chunks/{media-library-DMRIPx4g.js → media-library-Bqr15VN2.js} +33 -33
- package/dist/cdn/chunks/{media-library-DMRIPx4g.js.map → media-library-Bqr15VN2.js.map} +1 -1
- package/dist/cdn/chunks/{pusher-CdEqyLwF.js → pusher-CIwiKF8H.js} +4 -4
- package/dist/cdn/chunks/{pusher-CdEqyLwF.js.map → pusher-CIwiKF8H.js.map} +1 -1
- package/dist/cdn/chunks/{quality-CyeUgs_c.js → quality-DJZ_fqc2.js} +112 -112
- package/dist/cdn/chunks/{quality-CyeUgs_c.js.map → quality-DJZ_fqc2.js.map} +1 -1
- package/dist/cdn/chunks/{renderer-BIKUEKDD.js → renderer-CyzTR1Vq.js} +20 -20
- package/dist/cdn/chunks/renderer-CyzTR1Vq.js.map +1 -0
- package/dist/cdn/chunks/{src-pDy_imWG.js → src-q-SBgWx7.js} +5 -5
- package/dist/cdn/chunks/{src-pDy_imWG.js.map → src-q-SBgWx7.js.map} +1 -1
- package/dist/cdn/chunks/{styles-D4Bd3SCx.js → styles-PWISdaws.js} +1484 -1344
- package/dist/cdn/chunks/styles-PWISdaws.js.map +1 -0
- package/dist/cdn/chunks/{tiptap-BlLFFU3M.js → tiptap-DF9PEiqH.js} +6859 -6823
- package/dist/cdn/chunks/tiptap-DF9PEiqH.js.map +1 -0
- package/dist/cdn/editor.css +1 -1
- package/dist/cdn/editor.js +35 -35
- package/dist/cdn/editor.js.map +1 -1
- package/dist/{check-CYJwFmjy.js → check-rl7ok6uJ.js} +1 -1
- package/dist/{chevron-down-C5l-DzAA.js → chevron-down-BKe__NOD.js} +1 -1
- package/dist/{circle-alert-wf5HUFZY.js → circle-alert-C8xmpMsK.js} +1 -1
- package/dist/{clock-Bj0bQw-K.js → clock-BW4JuDCN.js} +1 -1
- package/dist/{cloud-CoFDm9YA.js → cloud-BQusL53H.js} +208 -208
- package/dist/createLucideIcon-Dx-EjR9r.js +43 -0
- package/dist/{dist-CLpPNKy9.js → dist-B5Sov3sS.js} +7 -7
- package/dist/dist-BEWiuOMi.js +251 -0
- package/dist/{dist-CrQZ_af9.js → dist-BFmE-7hB.js} +2 -2
- package/dist/{dist-U5vfDdYI.js → dist-BMoa33wT.js} +2 -2
- package/dist/{dist-BctFrpeA.js → dist-BibU4HNl.js} +74 -65
- package/dist/{dist-Dd3ibRZm.js → dist-BsCGIDSt.js} +103 -102
- package/dist/dist-CNLKj9wa.js +5 -0
- package/dist/{dist-BX3gGwL8.js → dist-CNXDNYQn.js} +728 -694
- package/dist/{dist-Bn703mnA.js → dist-COG3IdPK.js} +3 -3
- package/dist/{dist-B7w6xTU6.js → dist-CQZxDvFw.js} +3 -3
- package/dist/{dist-34OcyoK1.js → dist-CRsjOQM-.js} +2 -2
- package/dist/dist-CTT6WYJ6.js +134 -0
- package/dist/dist-Cqa6aeAJ.js +5 -0
- package/dist/{dist-ChMninLH.js → dist-SXJJ2v41.js} +2 -2
- package/dist/{dist-CyjyYg52.js → dist-itdjZraK.js} +28 -23
- package/dist/extensions-DwaZAqm6.js +423 -0
- package/dist/{image-up-x8-WXfsx.js → image-up-BwBCmQ4P.js} +1 -1
- package/dist/{info-RS_fGcGi.js → info-TCn7uWR5.js} +1 -1
- package/dist/{keys-DgYXDafq.js → keys-Cv8-8GsD.js} +1 -1
- package/dist/{liquid.browser-CVjP5Mex.js → liquid.browser-DZLtv26k.js} +692 -677
- package/dist/{list-checks-Bf7XdDyv.js → list-checks-CSrOWNgq.js} +1 -1
- package/dist/{loader-circle-CLZ0_FvW.js → loader-circle-BLmicnPG.js} +1 -1
- package/dist/{message-circle-B-1bN9ab.js → message-circle-C9hHMQCI.js} +1 -1
- package/dist/{refresh-cw-CWKWqJYG.js → refresh-cw-D1JQ1LNa.js} +1 -1
- package/dist/runtime-dom.esm-bundler-BzuoCyNp.js +523 -0
- package/dist/{scan-line-BtK5dEai.js → scan-line-DgijVq9y.js} +1 -1
- package/dist/{send-Cn1IUdzh.js → send-DjPdq69F.js} +1 -1
- package/dist/{shield-check-CrvMk4Ea.js → shield-check-Bqluu8FS.js} +1 -1
- package/dist/{sparkles-CgfjwvnG.js → sparkles-M4azPVSP.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/styles-B2OrgEnn.js +4164 -0
- package/dist/templatical-editor.js +127 -126
- package/dist/{text-align-start-C3r_Rnvy.js → text-align-start-CMya5pCQ.js} +11 -11
- package/dist/{trash-2-CjERg4x9.js → trash-2-C-81rkLS.js} +1 -1
- package/dist/{triangle-alert-Chkny574.js → triangle-alert-BuRWnynk.js} +1 -1
- package/dist/{upload-e5kDRkPb.js → upload-CWBIoLd4.js} +1 -1
- package/dist/{useAliveFlag-cUQj9rmB.js → useAliveFlag-CECL_OUb.js} +1 -1
- package/dist/{useCloudI18n-CYJKqXtI.js → useCloudI18n-AKCy98qD.js} +2 -2
- package/dist/{useEditorCore-8JxXDOA4.js → useEditorCore-DJeOXVxQ.js} +1407 -1365
- package/dist/{useI18n-BWqM8i78.js → useI18n-C-TDeJBt.js} +2 -2
- package/dist/{useMergeTag-NHC4ylza.js → useMergeTag-DSrBY0-2.js} +5 -5
- package/dist/usePopoverRoot-DKUDnr55.js +8 -0
- package/dist/{vue.runtime.esm-bundler-BPa483TZ.js → vue.runtime.esm-bundler-l0XAqiyv.js} +626 -1147
- package/dist/{x-DiPIbccg.js → x-CQSvXnGR.js} +1 -1
- package/package.json +26 -26
- package/dist/CountdownBlock-DtAokAVw.js +0 -92
- package/dist/CountdownToolbar-Dtqgwy0g.js +0 -210
- package/dist/cdn/chunks/TitleEditor-DO1-h3RY.js.map +0 -1
- package/dist/cdn/chunks/draggable-kPCz_3zM.js.map +0 -1
- package/dist/cdn/chunks/extensions-iwBXnEwq.js +0 -605
- package/dist/cdn/chunks/extensions-iwBXnEwq.js.map +0 -1
- package/dist/cdn/chunks/features-CkTMVylx.js.map +0 -1
- package/dist/cdn/chunks/liquid.browser-DKKBzRQu.js.map +0 -1
- package/dist/cdn/chunks/renderer-BIKUEKDD.js.map +0 -1
- package/dist/cdn/chunks/styles-D4Bd3SCx.js.map +0 -1
- package/dist/cdn/chunks/tiptap-BlLFFU3M.js.map +0 -1
- package/dist/createLucideIcon-Bad2kKE0.js +0 -43
- package/dist/dist-CADDCv0o.js +0 -5
- package/dist/dist-CGvz7vkq.js +0 -5
- package/dist/dist-DuCzdgDA.js +0 -382
- package/dist/extensions-J439b7y7.js +0 -1720
- package/dist/styles-BUwDOWd3.js +0 -4022
- package/dist/usePopoverRoot-B1sdY4es.js +0 -8
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
import { A as e,
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { t as
|
|
7
|
-
import {
|
|
8
|
-
import { n as
|
|
9
|
-
import { t as
|
|
10
|
-
import {
|
|
1
|
+
import { A as e, Dt as t, Et as n, N as r, O as i, Ot as a, W as o, Y as s, _ as c, c as l, d as u, h as d, i as f, l as p, m, nt as h, r as g, s as _, u as v, x as y } from "./vue.runtime.esm-bundler-l0XAqiyv.js";
|
|
2
|
+
import { c as b, s as x } from "./runtime-dom.esm-bundler-BzuoCyNp.js";
|
|
3
|
+
import { E as S, T as C, x as w } from "./useEditorCore-DJeOXVxQ.js";
|
|
4
|
+
import { t as T } from "./dist-BEWiuOMi.js";
|
|
5
|
+
import { I as E, L as D, P as O, g as ee, w as te, x as ne } from "./keys-Cv8-8GsD.js";
|
|
6
|
+
import { t as k } from "./useI18n-C-TDeJBt.js";
|
|
7
|
+
import { t as A } from "./createLucideIcon-Dx-EjR9r.js";
|
|
8
|
+
import { a as j, i as M, n as N, r as re, t as P } from "./RichTextEditorContent-BqLHIZY7.js";
|
|
9
|
+
import { n as ie, t as ae } from "./scan-line-DgijVq9y.js";
|
|
10
|
+
import { t as oe } from "./loader-circle-BLmicnPG.js";
|
|
11
|
+
import { n as se, r as ce, t as le } from "./text-align-start-CMya5pCQ.js";
|
|
11
12
|
import { t as F } from "./_plugin-vue_export-helper-B3ysoDQm.js";
|
|
12
13
|
import { a as ue, o as I, s as L } from "./styleConstants-lGobwiLH.js";
|
|
13
|
-
import { t as R } from "./usePopoverRoot-
|
|
14
|
+
import { t as R } from "./usePopoverRoot-DKUDnr55.js";
|
|
14
15
|
var z = A("list-ordered", [
|
|
15
16
|
["path", {
|
|
16
17
|
d: "M11 5h10",
|
|
@@ -107,7 +108,20 @@ var z = A("list-ordered", [
|
|
|
107
108
|
y2: "9",
|
|
108
109
|
key: "1p4y9e"
|
|
109
110
|
}]
|
|
110
|
-
]), U = A("
|
|
111
|
+
]), U = A("subscript", [
|
|
112
|
+
["path", {
|
|
113
|
+
d: "m4 5 8 8",
|
|
114
|
+
key: "1eunvl"
|
|
115
|
+
}],
|
|
116
|
+
["path", {
|
|
117
|
+
d: "m12 5-8 8",
|
|
118
|
+
key: "1ah0jp"
|
|
119
|
+
}],
|
|
120
|
+
["path", {
|
|
121
|
+
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",
|
|
122
|
+
key: "e8ta8j"
|
|
123
|
+
}]
|
|
124
|
+
]), de = A("strikethrough", [
|
|
111
125
|
["path", {
|
|
112
126
|
d: "M16 4H9a3 3 0 0 0-2.83 4",
|
|
113
127
|
key: "43sutm"
|
|
@@ -123,19 +137,6 @@ var z = A("list-ordered", [
|
|
|
123
137
|
y2: "12",
|
|
124
138
|
key: "1e0a9i"
|
|
125
139
|
}]
|
|
126
|
-
]), de = A("subscript", [
|
|
127
|
-
["path", {
|
|
128
|
-
d: "m4 5 8 8",
|
|
129
|
-
key: "1eunvl"
|
|
130
|
-
}],
|
|
131
|
-
["path", {
|
|
132
|
-
d: "m12 5-8 8",
|
|
133
|
-
key: "1ah0jp"
|
|
134
|
-
}],
|
|
135
|
-
["path", {
|
|
136
|
-
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",
|
|
137
|
-
key: "e8ta8j"
|
|
138
|
-
}]
|
|
139
140
|
]), fe = A("superscript", [
|
|
140
141
|
["path", {
|
|
141
142
|
d: "m4 19 8-8",
|
|
@@ -162,60 +163,60 @@ var z = A("list-ordered", [
|
|
|
162
163
|
"aria-label",
|
|
163
164
|
"title",
|
|
164
165
|
"aria-expanded"
|
|
165
|
-
], 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"], me = /* @__PURE__ */
|
|
166
|
+
], 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"], me = /* @__PURE__ */ c({
|
|
166
167
|
__name: "EmojiPickerDropdown",
|
|
167
168
|
emits: ["insert"],
|
|
168
|
-
setup(t, { emit:
|
|
169
|
-
let
|
|
170
|
-
S(E,
|
|
171
|
-
|
|
169
|
+
setup(t, { emit: r }) {
|
|
170
|
+
let o = r, { categories: c, isOpen: f, toggle: p, close: m } = C(), { t: y, format: w } = k(), E = s(null), D = s(null);
|
|
171
|
+
S(E, _(() => f.value)), T(D, () => {
|
|
172
|
+
f.value && m();
|
|
172
173
|
});
|
|
173
174
|
function O(e) {
|
|
174
|
-
|
|
175
|
+
o("insert", e), m();
|
|
175
176
|
}
|
|
176
|
-
return (t,
|
|
177
|
+
return (t, r) => (i(), u("div", {
|
|
177
178
|
ref_key: "rootRef",
|
|
178
179
|
ref: D,
|
|
179
180
|
class: "tpl:relative"
|
|
180
|
-
}, [
|
|
181
|
+
}, [l("button", {
|
|
181
182
|
type: "button",
|
|
182
|
-
class:
|
|
183
|
-
"aria-label":
|
|
184
|
-
title:
|
|
185
|
-
"aria-expanded":
|
|
183
|
+
class: n(["tpl-text-toolbar-btn", { "tpl-text-toolbar-btn--active": h(f) }]),
|
|
184
|
+
"aria-label": h(y).paragraphEditor.insertEmoji,
|
|
185
|
+
title: h(y).paragraphEditor.insertEmoji,
|
|
186
|
+
"aria-expanded": h(f),
|
|
186
187
|
"aria-haspopup": "dialog",
|
|
187
188
|
"aria-controls": "tpl-emoji-picker",
|
|
188
|
-
onClick:
|
|
189
|
-
}, [
|
|
189
|
+
onClick: r[0] ||= (...e) => h(p) && h(p)(...e)
|
|
190
|
+
}, [d(h(H), {
|
|
190
191
|
size: 16,
|
|
191
192
|
"stroke-width": 2
|
|
192
|
-
})], 10, W),
|
|
193
|
+
})], 10, W), h(f) ? (i(), u("div", {
|
|
193
194
|
key: 0,
|
|
194
195
|
id: "tpl-emoji-picker",
|
|
195
196
|
ref_key: "pickerRef",
|
|
196
197
|
ref: E,
|
|
197
198
|
role: "dialog",
|
|
198
199
|
"aria-modal": "false",
|
|
199
|
-
"aria-label":
|
|
200
|
+
"aria-label": h(y).paragraphEditor.insertEmoji,
|
|
200
201
|
tabindex: "-1",
|
|
201
202
|
class: "tpl-emoji-picker tpl:absolute tpl:top-full tpl:left-0 tpl:z-10 tpl:mt-2 tpl:w-72 tpl:rounded-lg tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:p-2 tpl:shadow-lg",
|
|
202
|
-
onKeydown:
|
|
203
|
-
}, [(
|
|
203
|
+
onKeydown: r[1] ||= x(b((...e) => h(m) && h(m)(...e), ["stop", "prevent"]), ["esc"])
|
|
204
|
+
}, [(i(!0), u(g, null, e(h(c), (t) => (i(), u("div", {
|
|
204
205
|
key: t.key,
|
|
205
206
|
class: "tpl:mb-2 tpl:last:mb-0"
|
|
206
|
-
}, [
|
|
207
|
-
key:
|
|
207
|
+
}, [l("div", K, a(h(y).emoji[t.key]), 1), l("div", q, [(i(!0), u(g, null, e(t.emojis, (e) => (i(), u("button", {
|
|
208
|
+
key: e,
|
|
208
209
|
type: "button",
|
|
209
|
-
"aria-label":
|
|
210
|
+
"aria-label": h(w)(h(y).paragraphEditor.emojiItemLabel, { emoji: e }),
|
|
210
211
|
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)]",
|
|
211
|
-
onClick: (
|
|
212
|
-
},
|
|
212
|
+
onClick: (t) => O(e)
|
|
213
|
+
}, a(e), 9, J))), 128))])]))), 128))], 40, G)) : v("", !0)], 512));
|
|
213
214
|
}
|
|
214
215
|
}), Y = [
|
|
215
216
|
"aria-label",
|
|
216
217
|
"title",
|
|
217
218
|
"aria-pressed"
|
|
218
|
-
], X = /* @__PURE__ */
|
|
219
|
+
], X = /* @__PURE__ */ c({
|
|
219
220
|
__name: "ToolbarIconButton",
|
|
220
221
|
props: {
|
|
221
222
|
icon: {},
|
|
@@ -224,30 +225,30 @@ var z = A("list-ordered", [
|
|
|
224
225
|
strokeWidth: {},
|
|
225
226
|
size: {}
|
|
226
227
|
},
|
|
227
|
-
setup(
|
|
228
|
-
return (
|
|
228
|
+
setup(e) {
|
|
229
|
+
return (t, a) => (i(), u("button", {
|
|
229
230
|
type: "button",
|
|
230
|
-
class:
|
|
231
|
-
"aria-label":
|
|
232
|
-
title:
|
|
233
|
-
"aria-pressed":
|
|
234
|
-
}, [(
|
|
235
|
-
size:
|
|
236
|
-
"stroke-width":
|
|
231
|
+
class: n(["tpl-text-toolbar-btn", { "tpl-text-toolbar-btn--active": e.active }]),
|
|
232
|
+
"aria-label": e.label,
|
|
233
|
+
title: e.label,
|
|
234
|
+
"aria-pressed": e.active ? "true" : "false"
|
|
235
|
+
}, [(i(), p(r(e.icon), {
|
|
236
|
+
size: e.size ?? 16,
|
|
237
|
+
"stroke-width": e.strokeWidth ?? 2
|
|
237
238
|
}, null, 8, ["size", "stroke-width"]))], 10, Y));
|
|
238
239
|
}
|
|
239
240
|
}), he = {}, ge = {
|
|
240
241
|
class: "tpl:mx-1 tpl:h-6 tpl:w-px tpl:bg-[var(--tpl-border)]",
|
|
241
242
|
"aria-hidden": "true"
|
|
242
243
|
};
|
|
243
|
-
function _e(
|
|
244
|
-
return
|
|
244
|
+
function _e(e, t) {
|
|
245
|
+
return i(), u("span", ge);
|
|
245
246
|
}
|
|
246
247
|
var Z = /*#__PURE__*/ F(he, [["render", _e]]), ve = [
|
|
247
248
|
"value",
|
|
248
249
|
"aria-label",
|
|
249
250
|
"title"
|
|
250
|
-
], ye = { value: "" }, be = ["value"], Q = /* @__PURE__ */
|
|
251
|
+
], ye = { value: "" }, be = ["value"], Q = /* @__PURE__ */ c({
|
|
251
252
|
__name: "ToolbarSelect",
|
|
252
253
|
props: {
|
|
253
254
|
modelValue: {},
|
|
@@ -257,27 +258,27 @@ var Z = /*#__PURE__*/ F(he, [["render", _e]]), ve = [
|
|
|
257
258
|
widthClass: {}
|
|
258
259
|
},
|
|
259
260
|
emits: ["update:modelValue"],
|
|
260
|
-
setup(t, { emit:
|
|
261
|
-
let
|
|
262
|
-
function a(e) {
|
|
263
|
-
i("update:modelValue", e.target.value);
|
|
264
|
-
}
|
|
261
|
+
setup(t, { emit: r }) {
|
|
262
|
+
let o = r;
|
|
265
263
|
function s(e) {
|
|
266
|
-
|
|
264
|
+
o("update:modelValue", e.target.value);
|
|
267
265
|
}
|
|
268
266
|
function c(e) {
|
|
267
|
+
return typeof e == "string" ? e : e.value;
|
|
268
|
+
}
|
|
269
|
+
function d(e) {
|
|
269
270
|
return typeof e == "string" ? e : e.label;
|
|
270
271
|
}
|
|
271
|
-
return (
|
|
272
|
-
class:
|
|
272
|
+
return (r, o) => (i(), u("select", {
|
|
273
|
+
class: n(["tpl:h-8 tpl:cursor-pointer tpl:rounded tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:px-2 tpl:text-xs tpl:text-[var(--tpl-text)] tpl:outline-none", t.widthClass ?? "tpl:w-20"]),
|
|
273
274
|
value: t.modelValue,
|
|
274
275
|
"aria-label": t.label,
|
|
275
276
|
title: t.label,
|
|
276
|
-
onChange:
|
|
277
|
-
}, [
|
|
278
|
-
key:
|
|
279
|
-
value:
|
|
280
|
-
},
|
|
277
|
+
onChange: s
|
|
278
|
+
}, [l("option", ye, a(t.placeholder ?? ""), 1), (i(!0), u(g, null, e(t.options, (e) => (i(), u("option", {
|
|
279
|
+
key: c(e),
|
|
280
|
+
value: c(e)
|
|
281
|
+
}, a(d(e)), 9, be))), 128))], 42, ve));
|
|
281
282
|
}
|
|
282
283
|
}), $ = ["data-tpl-theme", "aria-label"], xe = { class: "tpl:flex tpl:items-center tpl:gap-1" }, Se = { class: "tpl:relative" }, Ce = [
|
|
283
284
|
"value",
|
|
@@ -290,7 +291,7 @@ var Z = /*#__PURE__*/ F(he, [["render", _e]]), ve = [
|
|
|
290
291
|
], Ee = { class: "tpl:flex tpl:items-center tpl:gap-1" }, De = ["aria-label", "title"], Oe = ["aria-label", "title"], ke = {
|
|
291
292
|
key: 1,
|
|
292
293
|
class: "tpl:flex tpl:items-center tpl:gap-2 tpl:px-2 tpl:text-xs tpl:text-[var(--tpl-text-dim)]"
|
|
293
|
-
}, Ae = /* @__PURE__ */
|
|
294
|
+
}, Ae = /* @__PURE__ */ c({
|
|
294
295
|
__name: "ParagraphToolbar",
|
|
295
296
|
props: {
|
|
296
297
|
editor: {},
|
|
@@ -304,8 +305,8 @@ var Z = /*#__PURE__*/ F(he, [["render", _e]]), ve = [
|
|
|
304
305
|
"add-merge-tag",
|
|
305
306
|
"add-logic-tag"
|
|
306
307
|
],
|
|
307
|
-
setup(
|
|
308
|
-
let r =
|
|
308
|
+
setup(e, { emit: n }) {
|
|
309
|
+
let r = e, o = n, s = y(O, null), c = y(E, null), b = D(ee, "ParagraphToolbar"), x = R(), S = y(te, null), C = y(ne, null), w = _(() => (S?.isOpen.value ?? !1) || (C?.isOpen.value ?? !1)), { t: T } = k(), A = b.fonts;
|
|
309
310
|
function N(e) {
|
|
310
311
|
r.editor?.chain().focus().insertContent(e).run();
|
|
311
312
|
}
|
|
@@ -342,27 +343,27 @@ var Z = /*#__PURE__*/ F(he, [["render", _e]]), ve = [
|
|
|
342
343
|
let t = r.editor?.chain().focus();
|
|
343
344
|
e ? t?.setHighlight({ color: e }).run() : t?.unsetHighlight().run();
|
|
344
345
|
}
|
|
345
|
-
return (n, r) =>
|
|
346
|
+
return (n, r) => h(x) && !w.value ? (i(), p(f, {
|
|
346
347
|
key: 0,
|
|
347
|
-
to:
|
|
348
|
-
}, [
|
|
349
|
-
"data-tpl-theme":
|
|
348
|
+
to: h(x)
|
|
349
|
+
}, [l("div", {
|
|
350
|
+
"data-tpl-theme": h(c),
|
|
350
351
|
role: "toolbar",
|
|
351
|
-
"aria-label":
|
|
352
|
+
"aria-label": h(T).paragraphEditor.toolbar,
|
|
352
353
|
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",
|
|
353
|
-
style:
|
|
354
|
-
...
|
|
355
|
-
top: `${
|
|
356
|
-
left: `${
|
|
354
|
+
style: t({
|
|
355
|
+
...h(s),
|
|
356
|
+
top: `${e.toolbarPosition.top}px`,
|
|
357
|
+
left: `${e.toolbarPosition.left}px`,
|
|
357
358
|
transform: "translateY(-100%)",
|
|
358
359
|
flexDirection: "column"
|
|
359
360
|
})
|
|
360
|
-
}, [!
|
|
361
|
-
|
|
361
|
+
}, [!e.isLoading && e.editor ? (i(), u(g, { key: 0 }, [l("div", xe, [
|
|
362
|
+
d(Q, {
|
|
362
363
|
"model-value": P("fontFamily"),
|
|
363
|
-
options:
|
|
364
|
-
label:
|
|
365
|
-
placeholder:
|
|
364
|
+
options: h(A),
|
|
365
|
+
label: h(T).paragraphEditor.fontFamily,
|
|
366
|
+
placeholder: h(T).paragraphEditor.defaultFont,
|
|
366
367
|
"width-class": "tpl:w-32",
|
|
367
368
|
"onUpdate:modelValue": F
|
|
368
369
|
}, null, 8, [
|
|
@@ -371,11 +372,11 @@ var Z = /*#__PURE__*/ F(he, [["render", _e]]), ve = [
|
|
|
371
372
|
"label",
|
|
372
373
|
"placeholder"
|
|
373
374
|
]),
|
|
374
|
-
|
|
375
|
+
d(Q, {
|
|
375
376
|
"model-value": P("fontSize"),
|
|
376
|
-
options:
|
|
377
|
-
label:
|
|
378
|
-
placeholder:
|
|
377
|
+
options: h(ue),
|
|
378
|
+
label: h(T).paragraphEditor.fontSize,
|
|
379
|
+
placeholder: h(T).paragraphEditor.defaultSize,
|
|
379
380
|
"width-class": "tpl:w-20",
|
|
380
381
|
"onUpdate:modelValue": H
|
|
381
382
|
}, null, 8, [
|
|
@@ -384,155 +385,155 @@ var Z = /*#__PURE__*/ F(he, [["render", _e]]), ve = [
|
|
|
384
385
|
"label",
|
|
385
386
|
"placeholder"
|
|
386
387
|
]),
|
|
387
|
-
|
|
388
|
-
|
|
388
|
+
d(Z),
|
|
389
|
+
l("div", Se, [l("input", {
|
|
389
390
|
type: "color",
|
|
390
391
|
class: "tpl:size-8 tpl:cursor-pointer tpl:rounded tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:p-1",
|
|
391
|
-
value: P("color") ||
|
|
392
|
-
"aria-label":
|
|
393
|
-
title:
|
|
392
|
+
value: P("color") || h("#000000"),
|
|
393
|
+
"aria-label": h(T).paragraphEditor.textColor,
|
|
394
|
+
title: h(T).paragraphEditor.textColor,
|
|
394
395
|
onInput: r[0] ||= (e) => W(e.target.value)
|
|
395
396
|
}, null, 40, Ce)]),
|
|
396
|
-
|
|
397
|
+
l("div", we, [l("input", {
|
|
397
398
|
type: "color",
|
|
398
399
|
class: "tpl:size-8 tpl:cursor-pointer tpl:rounded tpl:border tpl:border-[var(--tpl-border)] tpl:p-1",
|
|
399
|
-
style:
|
|
400
|
-
value: J() ||
|
|
401
|
-
"aria-label":
|
|
402
|
-
title:
|
|
400
|
+
style: t({ backgroundColor: J() || "var(--tpl-bg)" }),
|
|
401
|
+
value: J() || h("#ffff00"),
|
|
402
|
+
"aria-label": h(T).paragraphEditor.highlightColor,
|
|
403
|
+
title: h(T).paragraphEditor.highlightColor,
|
|
403
404
|
onInput: r[1] ||= (e) => Y(e.target.value)
|
|
404
405
|
}, null, 44, Te)]),
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
icon:
|
|
408
|
-
label:
|
|
409
|
-
active:
|
|
406
|
+
d(Z),
|
|
407
|
+
d(X, {
|
|
408
|
+
icon: h(j),
|
|
409
|
+
label: h(T).paragraphEditor.bold,
|
|
410
|
+
active: e.editor.isActive("bold"),
|
|
410
411
|
"stroke-width": 2.5,
|
|
411
|
-
onClick: r[2] ||= (
|
|
412
|
+
onClick: r[2] ||= (t) => e.editor.chain().focus().toggleBold().run()
|
|
412
413
|
}, null, 8, [
|
|
413
414
|
"icon",
|
|
414
415
|
"label",
|
|
415
416
|
"active"
|
|
416
417
|
]),
|
|
417
|
-
|
|
418
|
-
icon:
|
|
419
|
-
label:
|
|
420
|
-
active:
|
|
421
|
-
onClick: r[3] ||= (
|
|
418
|
+
d(X, {
|
|
419
|
+
icon: h(M),
|
|
420
|
+
label: h(T).paragraphEditor.italic,
|
|
421
|
+
active: e.editor.isActive("italic"),
|
|
422
|
+
onClick: r[3] ||= (t) => e.editor.chain().focus().toggleItalic().run()
|
|
422
423
|
}, null, 8, [
|
|
423
424
|
"icon",
|
|
424
425
|
"label",
|
|
425
426
|
"active"
|
|
426
427
|
]),
|
|
427
|
-
|
|
428
|
-
icon:
|
|
429
|
-
label:
|
|
430
|
-
active:
|
|
431
|
-
onClick: r[4] ||= (
|
|
428
|
+
d(X, {
|
|
429
|
+
icon: h(pe),
|
|
430
|
+
label: h(T).paragraphEditor.underline,
|
|
431
|
+
active: e.editor.isActive("underline"),
|
|
432
|
+
onClick: r[4] ||= (t) => e.editor.chain().focus().toggleUnderline().run()
|
|
432
433
|
}, null, 8, [
|
|
433
434
|
"icon",
|
|
434
435
|
"label",
|
|
435
436
|
"active"
|
|
436
437
|
]),
|
|
437
|
-
|
|
438
|
-
icon:
|
|
439
|
-
label:
|
|
440
|
-
active:
|
|
441
|
-
onClick: r[5] ||= (
|
|
438
|
+
d(X, {
|
|
439
|
+
icon: h(de),
|
|
440
|
+
label: h(T).paragraphEditor.strikethrough,
|
|
441
|
+
active: e.editor.isActive("strike"),
|
|
442
|
+
onClick: r[5] ||= (t) => e.editor.chain().focus().toggleStrike().run()
|
|
442
443
|
}, null, 8, [
|
|
443
444
|
"icon",
|
|
444
445
|
"label",
|
|
445
446
|
"active"
|
|
446
447
|
]),
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
icon:
|
|
450
|
-
label:
|
|
451
|
-
active:
|
|
452
|
-
onClick: r[6] ||= (
|
|
448
|
+
d(Z),
|
|
449
|
+
d(X, {
|
|
450
|
+
icon: h(U),
|
|
451
|
+
label: h(T).paragraphEditor.subscript,
|
|
452
|
+
active: e.editor.isActive("subscript"),
|
|
453
|
+
onClick: r[6] ||= (t) => e.editor.chain().focus().toggleSubscript().run()
|
|
453
454
|
}, null, 8, [
|
|
454
455
|
"icon",
|
|
455
456
|
"label",
|
|
456
457
|
"active"
|
|
457
458
|
]),
|
|
458
|
-
|
|
459
|
-
icon:
|
|
460
|
-
label:
|
|
461
|
-
active:
|
|
462
|
-
onClick: r[7] ||= (
|
|
459
|
+
d(X, {
|
|
460
|
+
icon: h(fe),
|
|
461
|
+
label: h(T).paragraphEditor.superscript,
|
|
462
|
+
active: e.editor.isActive("superscript"),
|
|
463
|
+
onClick: r[7] ||= (t) => e.editor.chain().focus().toggleSuperscript().run()
|
|
463
464
|
}, null, 8, [
|
|
464
465
|
"icon",
|
|
465
466
|
"label",
|
|
466
467
|
"active"
|
|
467
468
|
]),
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
icon:
|
|
471
|
-
label:
|
|
472
|
-
active:
|
|
473
|
-
onClick: r[8] ||= (e) =>
|
|
469
|
+
d(Z),
|
|
470
|
+
d(X, {
|
|
471
|
+
icon: h(re),
|
|
472
|
+
label: h(T).paragraphEditor.addLink,
|
|
473
|
+
active: e.editor.isActive("link"),
|
|
474
|
+
onClick: r[8] ||= (e) => o("open-link-dialog")
|
|
474
475
|
}, null, 8, [
|
|
475
476
|
"icon",
|
|
476
477
|
"label",
|
|
477
478
|
"active"
|
|
478
479
|
])
|
|
479
|
-
]),
|
|
480
|
-
|
|
481
|
-
icon:
|
|
482
|
-
label:
|
|
483
|
-
active:
|
|
484
|
-
onClick: r[9] ||= (
|
|
480
|
+
]), l("div", Ee, [
|
|
481
|
+
d(X, {
|
|
482
|
+
icon: h(B),
|
|
483
|
+
label: h(T).paragraphEditor.bulletList,
|
|
484
|
+
active: e.editor.isActive("bulletList"),
|
|
485
|
+
onClick: r[9] ||= (t) => e.editor.chain().focus().toggleBulletList().run()
|
|
485
486
|
}, null, 8, [
|
|
486
487
|
"icon",
|
|
487
488
|
"label",
|
|
488
489
|
"active"
|
|
489
490
|
]),
|
|
490
|
-
|
|
491
|
-
icon:
|
|
492
|
-
label:
|
|
493
|
-
active:
|
|
494
|
-
onClick: r[10] ||= (
|
|
491
|
+
d(X, {
|
|
492
|
+
icon: h(z),
|
|
493
|
+
label: h(T).paragraphEditor.numberedList,
|
|
494
|
+
active: e.editor.isActive("orderedList"),
|
|
495
|
+
onClick: r[10] ||= (t) => e.editor.chain().focus().toggleOrderedList().run()
|
|
495
496
|
}, null, 8, [
|
|
496
497
|
"icon",
|
|
497
498
|
"label",
|
|
498
499
|
"active"
|
|
499
500
|
]),
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
icon:
|
|
503
|
-
label:
|
|
504
|
-
active:
|
|
505
|
-
onClick: r[11] ||= (
|
|
501
|
+
d(Z),
|
|
502
|
+
d(X, {
|
|
503
|
+
icon: h(le),
|
|
504
|
+
label: h(T).paragraphEditor.alignLeft,
|
|
505
|
+
active: e.editor.isActive({ textAlign: "left" }),
|
|
506
|
+
onClick: r[11] ||= (t) => e.editor.chain().focus().setTextAlign("left").run()
|
|
506
507
|
}, null, 8, [
|
|
507
508
|
"icon",
|
|
508
509
|
"label",
|
|
509
510
|
"active"
|
|
510
511
|
]),
|
|
511
|
-
|
|
512
|
-
icon:
|
|
513
|
-
label:
|
|
514
|
-
active:
|
|
515
|
-
onClick: r[12] ||= (
|
|
512
|
+
d(X, {
|
|
513
|
+
icon: h(se),
|
|
514
|
+
label: h(T).paragraphEditor.alignCenter,
|
|
515
|
+
active: e.editor.isActive({ textAlign: "center" }),
|
|
516
|
+
onClick: r[12] ||= (t) => e.editor.chain().focus().setTextAlign("center").run()
|
|
516
517
|
}, null, 8, [
|
|
517
518
|
"icon",
|
|
518
519
|
"label",
|
|
519
520
|
"active"
|
|
520
521
|
]),
|
|
521
|
-
|
|
522
|
-
icon:
|
|
523
|
-
label:
|
|
524
|
-
active:
|
|
525
|
-
onClick: r[13] ||= (
|
|
522
|
+
d(X, {
|
|
523
|
+
icon: h(ce),
|
|
524
|
+
label: h(T).paragraphEditor.alignRight,
|
|
525
|
+
active: e.editor.isActive({ textAlign: "right" }),
|
|
526
|
+
onClick: r[13] ||= (t) => e.editor.chain().focus().setTextAlign("right").run()
|
|
526
527
|
}, null, 8, [
|
|
527
528
|
"icon",
|
|
528
529
|
"label",
|
|
529
530
|
"active"
|
|
530
531
|
]),
|
|
531
|
-
|
|
532
|
-
|
|
532
|
+
d(Z),
|
|
533
|
+
d(Q, {
|
|
533
534
|
"model-value": G(),
|
|
534
|
-
options:
|
|
535
|
-
label:
|
|
535
|
+
options: h(L),
|
|
536
|
+
label: h(T).paragraphEditor.lineHeight,
|
|
536
537
|
placeholder: "LH",
|
|
537
538
|
"width-class": "tpl:w-16",
|
|
538
539
|
"onUpdate:modelValue": K
|
|
@@ -541,10 +542,10 @@ var Z = /*#__PURE__*/ F(he, [["render", _e]]), ve = [
|
|
|
541
542
|
"options",
|
|
542
543
|
"label"
|
|
543
544
|
]),
|
|
544
|
-
|
|
545
|
+
d(Q, {
|
|
545
546
|
"model-value": P("letterSpacing"),
|
|
546
|
-
options:
|
|
547
|
-
label:
|
|
547
|
+
options: h(I),
|
|
548
|
+
label: h(T).paragraphEditor.letterSpacing,
|
|
548
549
|
placeholder: "LS",
|
|
549
550
|
"width-class": "tpl:w-20",
|
|
550
551
|
"onUpdate:modelValue": q
|
|
@@ -553,78 +554,80 @@ var Z = /*#__PURE__*/ F(he, [["render", _e]]), ve = [
|
|
|
553
554
|
"options",
|
|
554
555
|
"label"
|
|
555
556
|
]),
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
icon:
|
|
559
|
-
label:
|
|
560
|
-
onClick: r[14] ||= (
|
|
557
|
+
d(Z),
|
|
558
|
+
d(X, {
|
|
559
|
+
icon: h(V),
|
|
560
|
+
label: h(T).paragraphEditor.clearFormatting,
|
|
561
|
+
onClick: r[14] ||= (t) => e.editor.chain().focus().clearNodes().unsetAllMarks().run()
|
|
561
562
|
}, null, 8, ["icon", "label"]),
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
563
|
+
d(Z),
|
|
564
|
+
d(me, { onInsert: N }),
|
|
565
|
+
e.canRequestMergeTag ? (i(), u(g, { key: 0 }, [d(Z), l("button", {
|
|
565
566
|
type: "button",
|
|
566
567
|
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)]",
|
|
567
|
-
"aria-label":
|
|
568
|
-
title:
|
|
569
|
-
onClick: r[15] ||= (e) =>
|
|
570
|
-
}, [
|
|
568
|
+
"aria-label": h(T).mergeTag.insert,
|
|
569
|
+
title: h(T).mergeTag.insert,
|
|
570
|
+
onClick: r[15] ||= (e) => o("add-merge-tag")
|
|
571
|
+
}, [d(h(ae), {
|
|
571
572
|
size: 16,
|
|
572
573
|
"stroke-width": 2
|
|
573
|
-
}),
|
|
574
|
-
|
|
574
|
+
}), m(" " + a(h(T).mergeTag.insertShort), 1)], 8, De)], 64)) : v("", !0),
|
|
575
|
+
e.canInsertLogicTag ? (i(), u(g, { key: 1 }, [d(Z), l("button", {
|
|
575
576
|
type: "button",
|
|
576
577
|
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)]",
|
|
577
|
-
"aria-label":
|
|
578
|
-
title:
|
|
578
|
+
"aria-label": h(T).logicTag.insert,
|
|
579
|
+
title: h(T).logicTag.insert,
|
|
579
580
|
"data-testid": "insert-logic-button",
|
|
580
|
-
onClick: r[16] ||= (e) =>
|
|
581
|
-
}, [
|
|
581
|
+
onClick: r[16] ||= (e) => o("add-logic-tag")
|
|
582
|
+
}, [d(h(ie), {
|
|
582
583
|
size: 16,
|
|
583
584
|
"stroke-width": 2
|
|
584
|
-
}),
|
|
585
|
-
])], 64)) : (
|
|
585
|
+
}), m(" " + a(h(T).logicTag.insertShort), 1)], 8, Oe)], 64)) : v("", !0)
|
|
586
|
+
])], 64)) : (i(), u("div", ke, [d(h(oe), {
|
|
586
587
|
class: "tpl-spinner",
|
|
587
588
|
size: 14,
|
|
588
589
|
"stroke-width": 2
|
|
589
|
-
}),
|
|
590
|
+
}), m(" " + a(h(T).errors.editorLoading), 1)]))], 12, $)], 8, ["to"])) : v("", !0);
|
|
590
591
|
}
|
|
591
|
-
}), je = { class: "tpl-text-editor-wrapper tpl:relative" }, Me = /* @__PURE__ */
|
|
592
|
+
}), je = { class: "tpl-text-editor-wrapper tpl:relative" }, Me = /* @__PURE__ */ c({
|
|
592
593
|
__name: "ParagraphEditor",
|
|
593
594
|
props: {
|
|
594
595
|
block: {},
|
|
595
596
|
toolbarPosition: {}
|
|
596
597
|
},
|
|
597
598
|
emits: ["done"],
|
|
598
|
-
setup(
|
|
599
|
-
let
|
|
600
|
-
blockId: () =>
|
|
601
|
-
blockContent: () =>
|
|
602
|
-
onDone: () =>
|
|
599
|
+
setup(e, { emit: t }) {
|
|
600
|
+
let n = e, r = t, a = R(), { editor: s, EditorContent: c, isLoading: l, initError: f, retry: p, showLinkDialog: m, linkUrl: g, linkDialogRef: _, canRequestMergeTag: v, canInsertLogicTag: y, openLinkDialog: b, insertLink: x, removeLink: S, closeLinkDialog: C, handleLinkKeydown: T, handleAddMergeTag: E, handleAddLogicTag: D } = w({
|
|
601
|
+
blockId: () => n.block.id,
|
|
602
|
+
blockContent: () => n.block.content,
|
|
603
|
+
onDone: () => r("done"),
|
|
603
604
|
editorName: "ParagraphEditor",
|
|
604
605
|
async loadExtensions({ mergeTags: e, syntax: t, triggerChar: n, autocompleteEnabled: r, suggestionEmptyText: i }) {
|
|
605
|
-
let [{ Editor:
|
|
606
|
-
import("./dist-
|
|
607
|
-
import("./dist-
|
|
608
|
-
import("./dist-
|
|
609
|
-
import("./dist-
|
|
610
|
-
import("./dist-
|
|
611
|
-
import("./dist-
|
|
612
|
-
import("./dist-
|
|
613
|
-
import("./dist-
|
|
614
|
-
import("./dist-
|
|
615
|
-
import("./dist-
|
|
616
|
-
import("./dist-
|
|
617
|
-
import("./extensions-
|
|
606
|
+
let [{ Editor: o, 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([
|
|
607
|
+
import("./dist-BsCGIDSt.js").then((e) => e.r),
|
|
608
|
+
import("./dist-CNXDNYQn.js"),
|
|
609
|
+
import("./dist-B5Sov3sS.js"),
|
|
610
|
+
import("./dist-BMoa33wT.js"),
|
|
611
|
+
import("./dist-CQZxDvFw.js"),
|
|
612
|
+
import("./dist-COG3IdPK.js"),
|
|
613
|
+
import("./dist-CRsjOQM-.js"),
|
|
614
|
+
import("./dist-SXJJ2v41.js"),
|
|
615
|
+
import("./dist-CNLKj9wa.js"),
|
|
616
|
+
import("./dist-Cqa6aeAJ.js"),
|
|
617
|
+
import("./dist-BFmE-7hB.js"),
|
|
618
|
+
import("./extensions-DwaZAqm6.js")
|
|
618
619
|
]);
|
|
619
620
|
return {
|
|
620
|
-
TiptapEditor:
|
|
621
|
+
TiptapEditor: o,
|
|
621
622
|
EC: s,
|
|
622
623
|
extensions: [
|
|
623
624
|
c.configure({
|
|
624
625
|
heading: !1,
|
|
625
626
|
codeBlock: !1,
|
|
626
627
|
blockquote: !1,
|
|
627
|
-
horizontalRule: !1
|
|
628
|
+
horizontalRule: !1,
|
|
629
|
+
link: !1,
|
|
630
|
+
underline: !1
|
|
628
631
|
}),
|
|
629
632
|
u,
|
|
630
633
|
d,
|
|
@@ -653,22 +656,22 @@ var Z = /*#__PURE__*/ F(he, [["render", _e]]), ve = [
|
|
|
653
656
|
mergeTags: e,
|
|
654
657
|
char: n,
|
|
655
658
|
emptyText: i,
|
|
656
|
-
popoverRoot:
|
|
659
|
+
popoverRoot: a
|
|
657
660
|
})] : []
|
|
658
661
|
]
|
|
659
662
|
};
|
|
660
663
|
}
|
|
661
664
|
});
|
|
662
|
-
return (
|
|
663
|
-
|
|
664
|
-
editor:
|
|
665
|
-
"toolbar-position":
|
|
666
|
-
"is-loading":
|
|
667
|
-
"can-request-merge-tag":
|
|
668
|
-
"can-insert-logic-tag":
|
|
669
|
-
onOpenLinkDialog:
|
|
670
|
-
onAddMergeTag:
|
|
671
|
-
onAddLogicTag:
|
|
665
|
+
return (t, n) => (i(), u("div", je, [
|
|
666
|
+
d(Ae, {
|
|
667
|
+
editor: h(s),
|
|
668
|
+
"toolbar-position": e.toolbarPosition,
|
|
669
|
+
"is-loading": h(l),
|
|
670
|
+
"can-request-merge-tag": h(v),
|
|
671
|
+
"can-insert-logic-tag": h(y),
|
|
672
|
+
onOpenLinkDialog: h(b),
|
|
673
|
+
onAddMergeTag: h(E),
|
|
674
|
+
onAddLogicTag: h(D)
|
|
672
675
|
}, null, 8, [
|
|
673
676
|
"editor",
|
|
674
677
|
"toolbar-position",
|
|
@@ -679,12 +682,12 @@ var Z = /*#__PURE__*/ F(he, [["render", _e]]), ve = [
|
|
|
679
682
|
"onAddMergeTag",
|
|
680
683
|
"onAddLogicTag"
|
|
681
684
|
]),
|
|
682
|
-
|
|
683
|
-
editor:
|
|
684
|
-
"editor-content":
|
|
685
|
-
"is-loading":
|
|
686
|
-
"init-error":
|
|
687
|
-
onRetry:
|
|
685
|
+
d(P, {
|
|
686
|
+
editor: h(s),
|
|
687
|
+
"editor-content": h(c),
|
|
688
|
+
"is-loading": h(l),
|
|
689
|
+
"init-error": h(f),
|
|
690
|
+
onRetry: h(p)
|
|
688
691
|
}, null, 8, [
|
|
689
692
|
"editor",
|
|
690
693
|
"editor-content",
|
|
@@ -692,17 +695,17 @@ var Z = /*#__PURE__*/ F(he, [["render", _e]]), ve = [
|
|
|
692
695
|
"init-error",
|
|
693
696
|
"onRetry"
|
|
694
697
|
]),
|
|
695
|
-
|
|
696
|
-
visible:
|
|
697
|
-
"is-editing-link":
|
|
698
|
-
"dialog-ref":
|
|
699
|
-
"onUpdate:dialogRef":
|
|
700
|
-
"link-url": g
|
|
701
|
-
"onUpdate:linkUrl":
|
|
702
|
-
onClose:
|
|
703
|
-
onInsert:
|
|
704
|
-
onRemove:
|
|
705
|
-
onKeydown:
|
|
698
|
+
d(N, {
|
|
699
|
+
visible: h(m),
|
|
700
|
+
"is-editing-link": h(s)?.isActive("link") ?? !1,
|
|
701
|
+
"dialog-ref": h(_),
|
|
702
|
+
"onUpdate:dialogRef": n[0] ||= (e) => o(_) ? _.value = e : null,
|
|
703
|
+
"link-url": h(g),
|
|
704
|
+
"onUpdate:linkUrl": n[1] ||= (e) => o(g) ? g.value = e : null,
|
|
705
|
+
onClose: h(C),
|
|
706
|
+
onInsert: h(x),
|
|
707
|
+
onRemove: h(S),
|
|
708
|
+
onKeydown: h(T)
|
|
706
709
|
}, null, 8, [
|
|
707
710
|
"visible",
|
|
708
711
|
"is-editing-link",
|