@templatical/editor 0.0.6 → 0.1.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/LICENSE +56 -0
- package/README.md +69 -0
- package/dist/{AiChatSidebar-CNhSl_ty.js → AiChatSidebar-DgAjDWO1.js} +68 -68
- package/dist/{AiFeatureMenu-BFVsjUJY.js → AiFeatureMenu-j6oaiRVi.js} +25 -25
- package/dist/{CloudEditor-Bz5Xkxej.js → CloudEditor-yCOkIkZ-.js} +428 -437
- package/dist/{CollaboratorBar-D2Gu5Xj2.js → CollaboratorBar-CWVdp2Y6.js} +23 -23
- package/dist/CommentsSidebar-CSPHhbQH.js +439 -0
- package/dist/CountdownBlock-DK6P_RaQ.js +92 -0
- package/dist/CountdownToolbar-Dv-Sz4ui.js +210 -0
- package/dist/{DesignReferenceSidebar-u2tKSQK0.js → DesignReferenceSidebar-D7zfvux6.js} +58 -58
- package/dist/LoadingTrack-Cdz2SSq9.js +10 -0
- package/dist/ModuleBrowserModal-BLYuCZht.js +205 -0
- package/dist/ModulePreviewCanvas-CHYqP6K3.js +106 -0
- package/dist/NumberWithSuffix-D-5-AZc3.js +424 -0
- package/dist/{ParagraphEditor-CYrzYJO5.js → ParagraphEditor-DivLBNWv.js} +237 -236
- package/dist/{RichTextEditorContent-BeqlWlWB.js → RichTextEditorContent-G1lXgVJR.js} +42 -42
- package/dist/{SaveModuleDialog-Kde6X13X.js → SaveModuleDialog-DGVfiOmE.js} +29 -29
- package/dist/{SnapshotHistory-B3EfIcLW.js → SnapshotHistory-DM__MqSu.js} +38 -38
- package/dist/{TemplateScoringPanel-D2vCRGgx.js → TemplateScoringPanel-CW13Tlol.js} +80 -80
- package/dist/{TestEmailModal-Egk0DFDf.js → TestEmailModal-B8bYqWCY.js} +28 -28
- package/dist/TitleEditor-4Jrp3C4m.js +167 -0
- package/dist/{TplModal-BCruYWks.js → TplModal-BkoIz0oz.js} +14 -14
- package/dist/{_plugin-vue_export-helper-5TQrnOhO.js → _plugin-vue_export-helper-OO6pH1Dh.js} +11 -11
- package/dist/{blockTypeIcons-rW4BUUNC.js → blockTypeIcons-4AS3CvXn.js} +2 -2
- package/dist/cdn/chunks/{AiFeatureMenu-Dcbshcfu.js → AiFeatureMenu-BcHyzTQy.js} +4 -4
- package/dist/cdn/chunks/{AiFeatureMenu-Dcbshcfu.js.map → AiFeatureMenu-BcHyzTQy.js.map} +1 -1
- package/dist/cdn/chunks/{CloudEditor-Bca3RyBW.js → CloudEditor-TaEZq-YW.js} +179 -188
- package/dist/cdn/chunks/CloudEditor-TaEZq-YW.js.map +1 -0
- package/dist/cdn/chunks/{CollaboratorBar-sToKJfHi.js → CollaboratorBar-DbC5-3If.js} +4 -4
- package/dist/cdn/chunks/{CollaboratorBar-sToKJfHi.js.map → CollaboratorBar-DbC5-3If.js.map} +1 -1
- package/dist/cdn/chunks/CountdownBlock-CfPmCQ7j.js +93 -0
- package/dist/cdn/chunks/CountdownBlock-CfPmCQ7j.js.map +1 -0
- package/dist/cdn/chunks/CountdownToolbar-CB0EVxwN.js +212 -0
- package/dist/cdn/chunks/CountdownToolbar-CB0EVxwN.js.map +1 -0
- package/dist/cdn/chunks/{ModuleBrowserModal-BNhwXbWw.js → ModuleBrowserModal-Df2fp9dj.js} +7 -7
- package/dist/cdn/chunks/{ModuleBrowserModal-BNhwXbWw.js.map → ModuleBrowserModal-Df2fp9dj.js.map} +1 -1
- package/dist/cdn/chunks/{ModulePreviewCanvas-DylUylPU.js → ModulePreviewCanvas-Dw1OCpvV.js} +19 -19
- package/dist/cdn/chunks/{ModulePreviewCanvas-DylUylPU.js.map → ModulePreviewCanvas-Dw1OCpvV.js.map} +1 -1
- package/dist/cdn/chunks/NumberWithSuffix-BU6ycXyG.js +425 -0
- package/dist/cdn/chunks/NumberWithSuffix-BU6ycXyG.js.map +1 -0
- package/dist/cdn/chunks/{ParagraphEditor-BBw90y_p.js → ParagraphEditor-BMRNg_BX.js} +37 -37
- package/dist/cdn/chunks/{ParagraphEditor-BBw90y_p.js.map → ParagraphEditor-BMRNg_BX.js.map} +1 -1
- package/dist/cdn/chunks/{RichTextEditorContent-DvyIO3nR.js → RichTextEditorContent-BKYY1YMZ.js} +5 -5
- package/dist/cdn/chunks/{RichTextEditorContent-DvyIO3nR.js.map → RichTextEditorContent-BKYY1YMZ.js.map} +1 -1
- package/dist/cdn/chunks/{SaveModuleDialog-DvbSHvhF.js → SaveModuleDialog-D977Tg7t.js} +5 -5
- package/dist/cdn/chunks/{SaveModuleDialog-DvbSHvhF.js.map → SaveModuleDialog-D977Tg7t.js.map} +1 -1
- package/dist/cdn/chunks/{TitleEditor-tS3mgoVr.js → TitleEditor-q9IzNy38.js} +11 -11
- package/dist/cdn/chunks/{TitleEditor-tS3mgoVr.js.map → TitleEditor-q9IzNy38.js.map} +1 -1
- package/dist/cdn/chunks/{blockTypeIcons-DbnbyEQE.js → blockTypeIcons-L0fRc3qs.js} +3 -3
- package/dist/cdn/chunks/{blockTypeIcons-DbnbyEQE.js.map → blockTypeIcons-L0fRc3qs.js.map} +1 -1
- package/dist/cdn/chunks/{de-CgUR_S5I.js → de-3exf7MYE.js} +1 -1
- package/dist/cdn/chunks/{de-CgUR_S5I.js.map → de-3exf7MYE.js.map} +1 -1
- package/dist/cdn/chunks/{de-D8oDPhBD.js → de-C8LxVUsb.js} +1 -1
- package/dist/cdn/chunks/{de-D8oDPhBD.js.map → de-C8LxVUsb.js.map} +1 -1
- package/dist/cdn/chunks/{dist-BUmN5e4r.js → dist-D5g00M8N.js} +6 -2
- package/dist/cdn/chunks/dist-D5g00M8N.js.map +1 -0
- package/dist/cdn/chunks/{draggable-m78lz0gI.js → draggable-Bcb86AsV.js} +5 -5
- package/dist/cdn/chunks/draggable-Bcb86AsV.js.map +1 -0
- package/dist/cdn/chunks/{emojiData-CNNgvDqx.js → emojiData-DUHzsh4j.js} +1 -1
- package/dist/cdn/chunks/{emojiData-CNNgvDqx.js.map → emojiData-DUHzsh4j.js.map} +1 -1
- package/dist/cdn/chunks/{en-HseRPPeK.js → en-BoEycuqw.js} +1 -1
- package/dist/cdn/chunks/{en-HseRPPeK.js.map → en-BoEycuqw.js.map} +1 -1
- package/dist/cdn/chunks/{en-BBmfBDqY.js → en-KNPUKxYp.js} +1 -1
- package/dist/cdn/chunks/{en-BBmfBDqY.js.map → en-KNPUKxYp.js.map} +1 -1
- package/dist/cdn/chunks/{extensions-ClpY3m0W.js → extensions-BZ1POyiv.js} +11 -11
- package/dist/cdn/chunks/{extensions-ClpY3m0W.js.map → extensions-BZ1POyiv.js.map} +1 -1
- package/dist/cdn/chunks/{features-B5dGxWLi.js → features-Ccqmm6-M.js} +549 -627
- package/dist/cdn/chunks/features-Ccqmm6-M.js.map +1 -0
- package/dist/cdn/chunks/{icons-hflTyPmb.js → icons-x53__2GC.js} +8 -8
- package/dist/cdn/chunks/icons-x53__2GC.js.map +1 -0
- package/dist/cdn/chunks/{liquid.browser-BxyRVCKv.js → liquid.browser-CEMn-ZqL.js} +2 -2
- package/dist/cdn/chunks/liquid.browser-CEMn-ZqL.js.map +1 -0
- package/dist/cdn/chunks/{media-library-Dgy-V-JA.js → media-library-DUoQk-w7.js} +97 -97
- package/dist/cdn/chunks/media-library-DUoQk-w7.js.map +1 -0
- package/dist/cdn/chunks/{pusher-D-m2WSdL.js → pusher-DwSQn6BA.js} +2 -2
- package/dist/cdn/chunks/pusher-DwSQn6BA.js.map +1 -0
- package/dist/cdn/chunks/{src-TDwMmqm0.js → src-DskCIAr8.js} +8 -8
- package/dist/cdn/chunks/{src-TDwMmqm0.js.map → src-DskCIAr8.js.map} +1 -1
- package/dist/cdn/chunks/{styleConstants-DFe3I4Op.js → styleConstants-DP1VOca8.js} +1 -1
- package/dist/cdn/chunks/{styleConstants-DFe3I4Op.js.map → styleConstants-DP1VOca8.js.map} +1 -1
- package/dist/cdn/chunks/{styles-hCOCOR6K.js → styles-BIlpNe52.js} +622 -1238
- package/dist/cdn/chunks/styles-BIlpNe52.js.map +1 -0
- package/dist/cdn/chunks/{tiptap-C28NLMX8.js → tiptap-hPC_BgDO.js} +850 -826
- package/dist/cdn/chunks/tiptap-hPC_BgDO.js.map +1 -0
- package/dist/cdn/editor.css +1 -1
- package/dist/cdn/editor.js +92 -97
- package/dist/cdn/editor.js.map +1 -1
- package/dist/{check-B5S-C0bz.js → check-Bff5NzCh.js} +1 -1
- package/dist/{chevron-down-CjsV1T0W.js → chevron-down-Bbv4SJwx.js} +1 -1
- package/dist/{circle-alert-CVTmJHKW.js → circle-alert-Dpr8MgkR.js} +1 -1
- package/dist/{clock-CAjdSHBy.js → clock-raVPKfl4.js} +1 -1
- package/dist/{dist-DJrDTuRr.js → dist-BHgEdO-M.js} +1001 -983
- package/dist/dist-BibwE8Y0.js +5 -0
- package/dist/{dist-DPM-DFvh.js → dist-BnlZ_HwX.js} +340 -340
- package/dist/{dist-BTtKPcd2.js → dist-C9yhcxsf.js} +2 -2
- package/dist/{dist-COguaIvm.js → dist-CGffNO8z.js} +2 -2
- package/dist/dist-CfGpCUSx.js +5 -0
- package/dist/{dist-COOFiBFV.js → dist-Chd-H2S3.js} +5 -5
- package/dist/{dist-DfqLGwSF.js → dist-Cq0OFLMj.js} +2 -2
- package/dist/{dist-B4LTlrAn.js → dist-D42og5Sc.js} +191 -185
- package/dist/{dist-CBr-qhie.js → dist-Owxo48fF.js} +2 -2
- package/dist/{dist-Crqkuf-w.js → dist-UZ8UzVZ-.js} +15 -15
- package/dist/dist-n0PkFNGl.js +314 -0
- package/dist/{dist-DHYuVJ_7.js → dist-skgH9dyo.js} +2 -2
- package/dist/{extensions-C6xp_B7K.js → extensions-DQKaICBH.js} +81 -81
- package/dist/{image-up-vZa1Txr-.js → image-up-B1AEiHCh.js} +1 -1
- package/dist/index.d.ts +17 -6
- package/dist/{keys-C0MQRs8d.js → keys-CIw9mUI2.js} +1 -1
- package/dist/{liquid.browser-C02owkex.js → liquid.browser-Bm53dnK1.js} +1 -1
- package/dist/{loader-circle-DilFjHSk.js → loader-circle-BYeKJ3to.js} +1 -1
- package/dist/{message-circle-Dpcnc2oa.js → message-circle-PhNlI7e7.js} +1 -1
- package/dist/{refresh-cw-4r7rkHHX.js → refresh-cw-DhDYRBDd.js} +1 -1
- package/dist/{rolldown-runtime-gEudmnaM.js → rolldown-runtime-BZGGJVDF.js} +2 -5
- package/dist/{scan-line-684IxPQ0.js → scan-line-Bw8bauvt.js} +1 -1
- package/dist/{send-ChDw64yL.js → send-CJPSzbLO.js} +1 -1
- package/dist/{shield-check-9dhLdyST.js → shield-check-DdEvVYMH.js} +1 -1
- package/dist/{sparkles-Co9fkDcv.js → sparkles-DT_27AYs.js} +1 -1
- package/dist/style.css +2 -0
- package/dist/{styleConstants-RV3eYwkD.js → styleConstants-Dqz9z3aa.js} +6 -45
- package/dist/styles-tcwlvlEB.js +2942 -0
- package/dist/templatical-editor.js +114 -119
- package/dist/text-align-start-4Hx15GUf.js +43 -0
- package/dist/{trash-2-CZkMtjeC.js → trash-2-BY-xp5hg.js} +1 -1
- package/dist/{triangle-alert-Dvt51agD.js → triangle-alert-DG72vdb2.js} +1 -1
- package/dist/useEditorCore-DMH2QpUL.js +8946 -0
- package/dist/{useI18n-D6m7ZUgY.js → useI18n-B8CN2iWs.js} +4 -4
- package/dist/{useMergeTag-CSXcnFBc.js → useMergeTag-Dz_Dx2Jz.js} +3 -3
- package/dist/vue.runtime.esm-bundler-DryoQb-v.js +5775 -0
- package/dist/{x-CU2XZOkQ.js → x-D-7GkO6Z.js} +1 -1
- package/package.json +31 -15
- package/dist/CommentsSidebar-CTeEAZTj.js +0 -439
- package/dist/LoadingTrack--aUassFH.js +0 -10
- package/dist/ModuleBrowserModal-DNxODPlX.js +0 -205
- package/dist/ModulePreviewCanvas-DnGe1Y-2.js +0 -106
- package/dist/TitleEditor-DwUpo4gF.js +0 -167
- package/dist/cdn/chunks/CloudEditor-Bca3RyBW.js.map +0 -1
- package/dist/cdn/chunks/dist-BUmN5e4r.js.map +0 -1
- package/dist/cdn/chunks/draggable-m78lz0gI.js.map +0 -1
- package/dist/cdn/chunks/features-B5dGxWLi.js.map +0 -1
- package/dist/cdn/chunks/icons-hflTyPmb.js.map +0 -1
- package/dist/cdn/chunks/liquid.browser-BxyRVCKv.js.map +0 -1
- package/dist/cdn/chunks/media-library-Dgy-V-JA.js.map +0 -1
- package/dist/cdn/chunks/pusher-D-m2WSdL.js.map +0 -1
- package/dist/cdn/chunks/styles-hCOCOR6K.js.map +0 -1
- package/dist/cdn/chunks/tiptap-C28NLMX8.js.map +0 -1
- package/dist/dist-Ac4o1O4a.js +0 -314
- package/dist/dist-DEJZ9iAU.js +0 -5
- package/dist/dist-DmVOCJjI.js +0 -5
- package/dist/styles-nvxFh6L6.js +0 -3557
- package/dist/templatical-editor.css +0 -2
- package/dist/templatical-editor.umd.cjs +0 -178
- package/dist/useEditorCore-ColJh1ST.js +0 -5695
- /package/dist/cdn/chunks/{_rolldown_dynamic_import_helper-DMEI4TQ3.js → _rolldown_dynamic_import_helper-BRcA6nWq.js} +0 -0
- /package/dist/{de-Dh8ON-dm.js → de-CN0xu_Tp.js} +0 -0
- /package/dist/{emojiData-Qc8mH_zW.js → emojiData-CwKEDxVf.js} +0 -0
- /package/dist/{en-C7IShRSD.js → en-DXvHkaUF.js} +0 -0
- /package/dist/{formatRelativeTime-D8f6NR7i.js → formatRelativeTime-BSpx5DHC.js} +0 -0
- /package/dist/{readableTextColor-B809bF5J.js → readableTextColor-CYCxm1jQ.js} +0 -0
- /package/dist/{timeouts-CmBrLeZA.js → timeouts-BSGxjuUF.js} +0 -0
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { t as
|
|
8
|
-
import { t as
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
|
|
1
|
+
import { Ct as e, E as t, G as n, L as r, M as i, Ot as a, P as o, S as s, Y as c, _ as l, b as u, d, f, g as p, h as m, l as h, m as g, p as _, tt as v, u as y, wt as b, y as x } from "./vue.runtime.esm-bundler-DryoQb-v.js";
|
|
2
|
+
import { t as S } from "./dist-n0PkFNGl.js";
|
|
3
|
+
import { S as C, T as w, p as T, w as E } from "./keys-CIw9mUI2.js";
|
|
4
|
+
import { t as D } from "./useI18n-B8CN2iWs.js";
|
|
5
|
+
import { C as O, b as k, w as A } from "./useEditorCore-DMH2QpUL.js";
|
|
6
|
+
import { n as j, t as M } from "./_plugin-vue_export-helper-OO6pH1Dh.js";
|
|
7
|
+
import { a as N, i as ee, n as P, r as F, t as I } from "./RichTextEditorContent-G1lXgVJR.js";
|
|
8
|
+
import { t as te } from "./loader-circle-BYeKJ3to.js";
|
|
9
|
+
import { t as ne } from "./scan-line-Bw8bauvt.js";
|
|
10
|
+
import { n as re, r as ie, t as L } from "./text-align-start-4Hx15GUf.js";
|
|
11
|
+
import { a as R, o as z, s as B } from "./styleConstants-Dqz9z3aa.js";
|
|
12
|
+
var V = j("list-ordered", [
|
|
12
13
|
["path", {
|
|
13
14
|
d: "M11 5h10",
|
|
14
15
|
key: "1cz7ny"
|
|
@@ -33,7 +34,7 @@ var U = l("list-ordered", [
|
|
|
33
34
|
d: "M6.5 20H3.4c0-1 2.6-1.925 2.6-3.5a1.5 1.5 0 0 0-2.6-1.02",
|
|
34
35
|
key: "xtkcd5"
|
|
35
36
|
}]
|
|
36
|
-
]),
|
|
37
|
+
]), H = j("list", [
|
|
37
38
|
["path", {
|
|
38
39
|
d: "M3 5h.01",
|
|
39
40
|
key: "18ugdj"
|
|
@@ -58,7 +59,7 @@ var U = l("list-ordered", [
|
|
|
58
59
|
d: "M8 19h13",
|
|
59
60
|
key: "m83p4d"
|
|
60
61
|
}]
|
|
61
|
-
]),
|
|
62
|
+
]), U = j("remove-formatting", [
|
|
62
63
|
["path", {
|
|
63
64
|
d: "M4 7V4h16v3",
|
|
64
65
|
key: "9msm58"
|
|
@@ -79,7 +80,7 @@ var U = l("list-ordered", [
|
|
|
79
80
|
d: "m20 15-5 5",
|
|
80
81
|
key: "11p7ol"
|
|
81
82
|
}]
|
|
82
|
-
]), W =
|
|
83
|
+
]), W = j("smile", [
|
|
83
84
|
["circle", {
|
|
84
85
|
cx: "12",
|
|
85
86
|
cy: "12",
|
|
@@ -104,7 +105,7 @@ var U = l("list-ordered", [
|
|
|
104
105
|
y2: "9",
|
|
105
106
|
key: "1p4y9e"
|
|
106
107
|
}]
|
|
107
|
-
]), G =
|
|
108
|
+
]), G = j("strikethrough", [
|
|
108
109
|
["path", {
|
|
109
110
|
d: "M16 4H9a3 3 0 0 0-2.83 4",
|
|
110
111
|
key: "43sutm"
|
|
@@ -120,7 +121,7 @@ var U = l("list-ordered", [
|
|
|
120
121
|
y2: "12",
|
|
121
122
|
key: "1e0a9i"
|
|
122
123
|
}]
|
|
123
|
-
]), K =
|
|
124
|
+
]), K = j("subscript", [
|
|
124
125
|
["path", {
|
|
125
126
|
d: "m4 5 8 8",
|
|
126
127
|
key: "1eunvl"
|
|
@@ -133,7 +134,7 @@ var U = l("list-ordered", [
|
|
|
133
134
|
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",
|
|
134
135
|
key: "e8ta8j"
|
|
135
136
|
}]
|
|
136
|
-
]), q =
|
|
137
|
+
]), q = j("superscript", [
|
|
137
138
|
["path", {
|
|
138
139
|
d: "m4 19 8-8",
|
|
139
140
|
key: "hr47gm"
|
|
@@ -146,7 +147,7 @@ var U = l("list-ordered", [
|
|
|
146
147
|
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",
|
|
147
148
|
key: "1dfcux"
|
|
148
149
|
}]
|
|
149
|
-
]), J =
|
|
150
|
+
]), J = j("underline", [["path", {
|
|
150
151
|
d: "M6 4v6a6 6 0 0 0 12 0V4",
|
|
151
152
|
key: "9kb039"
|
|
152
153
|
}], ["line", {
|
|
@@ -159,60 +160,60 @@ var U = l("list-ordered", [
|
|
|
159
160
|
"aria-label",
|
|
160
161
|
"title",
|
|
161
162
|
"aria-expanded"
|
|
162
|
-
], ae = ["aria-label"],
|
|
163
|
+
], ae = ["aria-label"], oe = { class: "tpl:mb-1.5 tpl:text-[10px] tpl:font-medium tpl:tracking-wide tpl:text-[var(--tpl-text-muted)] tpl:uppercase" }, se = { class: "tpl:grid tpl:grid-cols-10 tpl:gap-0.5" }, ce = ["aria-label", "onClick"], le = /* @__PURE__ */ s({
|
|
163
164
|
__name: "EmojiPickerDropdown",
|
|
164
165
|
emits: ["insert"],
|
|
165
166
|
setup(t, { emit: n }) {
|
|
166
|
-
let r = n, { categories:
|
|
167
|
-
|
|
168
|
-
|
|
167
|
+
let r = n, { categories: s, isOpen: f, toggle: m, close: b } = O(), { t: x, format: C } = D(), w = c(null), T = c(null);
|
|
168
|
+
A(w, _(() => f.value)), S(T, () => {
|
|
169
|
+
f.value && b();
|
|
169
170
|
});
|
|
170
|
-
function
|
|
171
|
-
r("insert", e),
|
|
171
|
+
function E(e) {
|
|
172
|
+
r("insert", e), b();
|
|
172
173
|
}
|
|
173
|
-
return (
|
|
174
|
+
return (t, n) => (i(), l("div", {
|
|
174
175
|
ref_key: "rootRef",
|
|
175
|
-
ref:
|
|
176
|
+
ref: T,
|
|
176
177
|
class: "tpl:relative"
|
|
177
|
-
}, [
|
|
178
|
+
}, [g("button", {
|
|
178
179
|
type: "button",
|
|
179
|
-
class:
|
|
180
|
-
"aria-label":
|
|
181
|
-
title:
|
|
182
|
-
"aria-expanded":
|
|
180
|
+
class: e(["tpl-text-toolbar-btn", { "tpl-text-toolbar-btn--active": v(f) }]),
|
|
181
|
+
"aria-label": v(x).paragraphEditor.insertEmoji,
|
|
182
|
+
title: v(x).paragraphEditor.insertEmoji,
|
|
183
|
+
"aria-expanded": v(f),
|
|
183
184
|
"aria-haspopup": "dialog",
|
|
184
185
|
"aria-controls": "tpl-emoji-picker",
|
|
185
|
-
onClick:
|
|
186
|
-
}, [
|
|
186
|
+
onClick: n[0] ||= (...e) => v(m) && v(m)(...e)
|
|
187
|
+
}, [u(v(W), {
|
|
187
188
|
size: 16,
|
|
188
189
|
"stroke-width": 2
|
|
189
|
-
})], 10, Y),
|
|
190
|
+
})], 10, Y), v(f) ? (i(), l("div", {
|
|
190
191
|
key: 0,
|
|
191
192
|
id: "tpl-emoji-picker",
|
|
192
193
|
ref_key: "pickerRef",
|
|
193
|
-
ref:
|
|
194
|
+
ref: w,
|
|
194
195
|
role: "dialog",
|
|
195
196
|
"aria-modal": "false",
|
|
196
|
-
"aria-label":
|
|
197
|
+
"aria-label": v(x).paragraphEditor.insertEmoji,
|
|
197
198
|
tabindex: "-1",
|
|
198
199
|
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",
|
|
199
|
-
onKeydown:
|
|
200
|
-
}, [(
|
|
200
|
+
onKeydown: n[1] ||= h(y((...e) => v(b) && v(b)(...e), ["stop", "prevent"]), ["esc"])
|
|
201
|
+
}, [(i(!0), l(d, null, o(v(s), (e) => (i(), l("div", {
|
|
201
202
|
key: e.key,
|
|
202
203
|
class: "tpl:mb-2 tpl:last:mb-0"
|
|
203
|
-
}, [
|
|
204
|
+
}, [g("div", oe, a(v(x).emoji[e.key]), 1), g("div", se, [(i(!0), l(d, null, o(e.emojis, (e) => (i(), l("button", {
|
|
204
205
|
key: e,
|
|
205
206
|
type: "button",
|
|
206
|
-
"aria-label":
|
|
207
|
+
"aria-label": v(C)(v(x).paragraphEditor.emojiItemLabel, { emoji: e }),
|
|
207
208
|
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)]",
|
|
208
|
-
onClick: (t) =>
|
|
209
|
-
},
|
|
209
|
+
onClick: (t) => E(e)
|
|
210
|
+
}, a(e), 9, ce))), 128))])]))), 128))], 40, ae)) : p("", !0)], 512));
|
|
210
211
|
}
|
|
211
|
-
}),
|
|
212
|
+
}), ue = [
|
|
212
213
|
"aria-label",
|
|
213
214
|
"title",
|
|
214
215
|
"aria-pressed"
|
|
215
|
-
],
|
|
216
|
+
], X = /* @__PURE__ */ s({
|
|
216
217
|
__name: "ToolbarIconButton",
|
|
217
218
|
props: {
|
|
218
219
|
icon: {},
|
|
@@ -221,30 +222,30 @@ var U = l("list-ordered", [
|
|
|
221
222
|
strokeWidth: {},
|
|
222
223
|
size: {}
|
|
223
224
|
},
|
|
224
|
-
setup(
|
|
225
|
-
return (
|
|
225
|
+
setup(t) {
|
|
226
|
+
return (n, a) => (i(), l("button", {
|
|
226
227
|
type: "button",
|
|
227
|
-
class:
|
|
228
|
-
"aria-label":
|
|
229
|
-
title:
|
|
230
|
-
"aria-pressed":
|
|
231
|
-
}, [(
|
|
232
|
-
size:
|
|
233
|
-
"stroke-width":
|
|
234
|
-
}, null, 8, ["size", "stroke-width"]))], 10,
|
|
228
|
+
class: e(["tpl-text-toolbar-btn", { "tpl-text-toolbar-btn--active": t.active }]),
|
|
229
|
+
"aria-label": t.label,
|
|
230
|
+
title: t.label,
|
|
231
|
+
"aria-pressed": t.active ? "true" : "false"
|
|
232
|
+
}, [(i(), m(r(t.icon), {
|
|
233
|
+
size: t.size ?? 16,
|
|
234
|
+
"stroke-width": t.strokeWidth ?? 2
|
|
235
|
+
}, null, 8, ["size", "stroke-width"]))], 10, ue));
|
|
235
236
|
}
|
|
236
|
-
}),
|
|
237
|
+
}), de = {}, fe = {
|
|
237
238
|
class: "tpl:mx-1 tpl:h-6 tpl:w-px tpl:bg-[var(--tpl-border)]",
|
|
238
239
|
"aria-hidden": "true"
|
|
239
240
|
};
|
|
240
|
-
function
|
|
241
|
-
return
|
|
241
|
+
function pe(e, t) {
|
|
242
|
+
return i(), l("span", fe);
|
|
242
243
|
}
|
|
243
|
-
var
|
|
244
|
+
var Z = /* @__PURE__ */ M(de, [["render", pe]]), me = [
|
|
244
245
|
"value",
|
|
245
246
|
"aria-label",
|
|
246
247
|
"title"
|
|
247
|
-
],
|
|
248
|
+
], he = { value: "" }, ge = ["value"], Q = /* @__PURE__ */ s({
|
|
248
249
|
__name: "ToolbarSelect",
|
|
249
250
|
props: {
|
|
250
251
|
modelValue: {},
|
|
@@ -254,40 +255,40 @@ var Q = /* @__PURE__ */ u(ue, [["render", fe]]), pe = [
|
|
|
254
255
|
widthClass: {}
|
|
255
256
|
},
|
|
256
257
|
emits: ["update:modelValue"],
|
|
257
|
-
setup(
|
|
258
|
-
let
|
|
259
|
-
function
|
|
260
|
-
|
|
258
|
+
setup(t, { emit: n }) {
|
|
259
|
+
let r = n;
|
|
260
|
+
function s(e) {
|
|
261
|
+
r("update:modelValue", e.target.value);
|
|
261
262
|
}
|
|
262
|
-
function
|
|
263
|
+
function c(e) {
|
|
263
264
|
return typeof e == "string" ? e : e.value;
|
|
264
265
|
}
|
|
265
|
-
function
|
|
266
|
+
function u(e) {
|
|
266
267
|
return typeof e == "string" ? e : e.label;
|
|
267
268
|
}
|
|
268
|
-
return (
|
|
269
|
-
class:
|
|
270
|
-
value:
|
|
271
|
-
"aria-label":
|
|
272
|
-
title:
|
|
273
|
-
onChange:
|
|
274
|
-
}, [
|
|
275
|
-
key:
|
|
276
|
-
value:
|
|
277
|
-
},
|
|
269
|
+
return (n, r) => (i(), l("select", {
|
|
270
|
+
class: e(["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"]),
|
|
271
|
+
value: t.modelValue,
|
|
272
|
+
"aria-label": t.label,
|
|
273
|
+
title: t.label,
|
|
274
|
+
onChange: s
|
|
275
|
+
}, [g("option", he, a(t.placeholder ?? ""), 1), (i(!0), l(d, null, o(t.options, (e) => (i(), l("option", {
|
|
276
|
+
key: c(e),
|
|
277
|
+
value: c(e)
|
|
278
|
+
}, a(u(e)), 9, ge))), 128))], 42, me));
|
|
278
279
|
}
|
|
279
|
-
}),
|
|
280
|
+
}), _e = ["data-tpl-theme", "aria-label"], ve = { class: "tpl:flex tpl:items-center tpl:gap-1" }, ye = { class: "tpl:relative" }, be = [
|
|
280
281
|
"value",
|
|
281
282
|
"aria-label",
|
|
282
283
|
"title"
|
|
283
|
-
],
|
|
284
|
+
], $ = { class: "tpl:relative" }, xe = [
|
|
284
285
|
"value",
|
|
285
286
|
"aria-label",
|
|
286
287
|
"title"
|
|
287
288
|
], Se = { class: "tpl:flex tpl:items-center tpl:gap-1" }, Ce = ["aria-label", "title"], we = {
|
|
288
289
|
key: 1,
|
|
289
290
|
class: "tpl:flex tpl:items-center tpl:gap-2 tpl:px-2 tpl:text-xs tpl:text-[var(--tpl-text-dim)]"
|
|
290
|
-
}, Te = /* @__PURE__ */
|
|
291
|
+
}, Te = /* @__PURE__ */ s({
|
|
291
292
|
__name: "ParagraphToolbar",
|
|
292
293
|
props: {
|
|
293
294
|
editor: {},
|
|
@@ -296,105 +297,105 @@ var Q = /* @__PURE__ */ u(ue, [["render", fe]]), pe = [
|
|
|
296
297
|
mergeTagEnabled: { type: Boolean }
|
|
297
298
|
},
|
|
298
299
|
emits: ["open-link-dialog", "add-merge-tag"],
|
|
299
|
-
setup(e, { emit:
|
|
300
|
-
let
|
|
301
|
-
function
|
|
302
|
-
|
|
300
|
+
setup(e, { emit: n }) {
|
|
301
|
+
let r = e, o = n, s = t(C, null), c = t(E, null), h = w(T, "ParagraphToolbar"), { t: _ } = D(), y = h.fonts;
|
|
302
|
+
function S(e) {
|
|
303
|
+
r.editor?.chain().focus().insertContent(e).run();
|
|
303
304
|
}
|
|
304
|
-
function
|
|
305
|
-
return
|
|
305
|
+
function O(e) {
|
|
306
|
+
return r.editor?.getAttributes("textStyle")[e] || "";
|
|
306
307
|
}
|
|
307
|
-
function
|
|
308
|
-
let t =
|
|
308
|
+
function k(e) {
|
|
309
|
+
let t = r.editor?.chain().focus();
|
|
309
310
|
e ? t?.setFontFamily(e).run() : t?.unsetFontFamily().run();
|
|
310
311
|
}
|
|
311
|
-
function
|
|
312
|
-
let t =
|
|
312
|
+
function A(e) {
|
|
313
|
+
let t = r.editor?.chain().focus();
|
|
313
314
|
e ? t?.setFontSize(e).run() : t?.unsetFontSize().run();
|
|
314
315
|
}
|
|
315
|
-
function
|
|
316
|
-
let t =
|
|
316
|
+
function j(e) {
|
|
317
|
+
let t = r.editor?.chain().focus();
|
|
317
318
|
e ? t?.setColor(e).run() : t?.unsetColor().run();
|
|
318
319
|
}
|
|
319
|
-
function
|
|
320
|
-
return
|
|
320
|
+
function M() {
|
|
321
|
+
return r.editor?.getAttributes("paragraph").lineHeight || "";
|
|
321
322
|
}
|
|
322
|
-
function
|
|
323
|
-
let t =
|
|
323
|
+
function P(e) {
|
|
324
|
+
let t = r.editor?.chain().focus();
|
|
324
325
|
e ? t?.setLineHeight(e).run() : t?.unsetLineHeight().run();
|
|
325
326
|
}
|
|
326
|
-
function
|
|
327
|
-
let t =
|
|
327
|
+
function I(e) {
|
|
328
|
+
let t = r.editor?.chain().focus();
|
|
328
329
|
e && e !== "normal" ? t?.setLetterSpacing(e).run() : t?.unsetLetterSpacing().run();
|
|
329
330
|
}
|
|
330
331
|
function W() {
|
|
331
|
-
return
|
|
332
|
+
return r.editor?.getAttributes("highlight").color || "";
|
|
332
333
|
}
|
|
333
334
|
function Y(e) {
|
|
334
|
-
let t =
|
|
335
|
+
let t = r.editor?.chain().focus();
|
|
335
336
|
e ? t?.setHighlight({ color: e }).run() : t?.unsetHighlight().run();
|
|
336
337
|
}
|
|
337
|
-
return (t, n) => (
|
|
338
|
-
"data-tpl-theme":
|
|
338
|
+
return (t, n) => (i(), m(f, { to: "body" }, [g("div", {
|
|
339
|
+
"data-tpl-theme": v(c),
|
|
339
340
|
role: "toolbar",
|
|
340
|
-
"aria-label":
|
|
341
|
+
"aria-label": v(_).paragraphEditor.toolbar,
|
|
341
342
|
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
|
-
style:
|
|
343
|
-
...
|
|
343
|
+
style: b({
|
|
344
|
+
...v(s),
|
|
344
345
|
top: `${e.toolbarPosition.top}px`,
|
|
345
346
|
left: `${e.toolbarPosition.left}px`,
|
|
346
347
|
transform: "translateY(-100%)",
|
|
347
348
|
flexDirection: "column"
|
|
348
349
|
})
|
|
349
|
-
}, [!e.isLoading && e.editor ? (
|
|
350
|
-
|
|
351
|
-
"model-value":
|
|
352
|
-
options:
|
|
353
|
-
label:
|
|
354
|
-
placeholder:
|
|
350
|
+
}, [!e.isLoading && e.editor ? (i(), l(d, { key: 0 }, [g("div", ve, [
|
|
351
|
+
u(Q, {
|
|
352
|
+
"model-value": O("fontFamily"),
|
|
353
|
+
options: v(y),
|
|
354
|
+
label: v(_).paragraphEditor.fontFamily,
|
|
355
|
+
placeholder: v(_).paragraphEditor.defaultFont,
|
|
355
356
|
"width-class": "tpl:w-32",
|
|
356
|
-
"onUpdate:modelValue":
|
|
357
|
+
"onUpdate:modelValue": k
|
|
357
358
|
}, null, 8, [
|
|
358
359
|
"model-value",
|
|
359
360
|
"options",
|
|
360
361
|
"label",
|
|
361
362
|
"placeholder"
|
|
362
363
|
]),
|
|
363
|
-
|
|
364
|
-
"model-value":
|
|
365
|
-
options:
|
|
366
|
-
label:
|
|
367
|
-
placeholder:
|
|
364
|
+
u(Q, {
|
|
365
|
+
"model-value": O("fontSize"),
|
|
366
|
+
options: v(R),
|
|
367
|
+
label: v(_).paragraphEditor.fontSize,
|
|
368
|
+
placeholder: v(_).paragraphEditor.defaultSize,
|
|
368
369
|
"width-class": "tpl:w-20",
|
|
369
|
-
"onUpdate:modelValue":
|
|
370
|
+
"onUpdate:modelValue": A
|
|
370
371
|
}, null, 8, [
|
|
371
372
|
"model-value",
|
|
372
373
|
"options",
|
|
373
374
|
"label",
|
|
374
375
|
"placeholder"
|
|
375
376
|
]),
|
|
376
|
-
|
|
377
|
-
|
|
377
|
+
u(Z),
|
|
378
|
+
g("div", ye, [g("input", {
|
|
378
379
|
type: "color",
|
|
379
380
|
class: "tpl:size-8 tpl:cursor-pointer tpl:rounded tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:p-1",
|
|
380
|
-
value:
|
|
381
|
-
"aria-label":
|
|
382
|
-
title:
|
|
383
|
-
onInput: n[0] ||= (e) =>
|
|
384
|
-
}, null, 40,
|
|
385
|
-
|
|
381
|
+
value: O("color") || v("#000000"),
|
|
382
|
+
"aria-label": v(_).paragraphEditor.textColor,
|
|
383
|
+
title: v(_).paragraphEditor.textColor,
|
|
384
|
+
onInput: n[0] ||= (e) => j(e.target.value)
|
|
385
|
+
}, null, 40, be)]),
|
|
386
|
+
g("div", $, [g("input", {
|
|
386
387
|
type: "color",
|
|
387
388
|
class: "tpl:size-8 tpl:cursor-pointer tpl:rounded tpl:border tpl:border-[var(--tpl-border)] tpl:p-1",
|
|
388
|
-
style:
|
|
389
|
-
value: W() ||
|
|
390
|
-
"aria-label":
|
|
391
|
-
title:
|
|
389
|
+
style: b({ backgroundColor: W() || "var(--tpl-bg)" }),
|
|
390
|
+
value: W() || v("#ffff00"),
|
|
391
|
+
"aria-label": v(_).paragraphEditor.highlightColor,
|
|
392
|
+
title: v(_).paragraphEditor.highlightColor,
|
|
392
393
|
onInput: n[1] ||= (e) => Y(e.target.value)
|
|
393
394
|
}, null, 44, xe)]),
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
icon:
|
|
397
|
-
label:
|
|
395
|
+
u(Z),
|
|
396
|
+
u(X, {
|
|
397
|
+
icon: v(N),
|
|
398
|
+
label: v(_).paragraphEditor.bold,
|
|
398
399
|
active: e.editor.isActive("bold"),
|
|
399
400
|
"stroke-width": 2.5,
|
|
400
401
|
onClick: n[2] ||= (t) => e.editor.chain().focus().toggleBold().run()
|
|
@@ -403,9 +404,9 @@ var Q = /* @__PURE__ */ u(ue, [["render", fe]]), pe = [
|
|
|
403
404
|
"label",
|
|
404
405
|
"active"
|
|
405
406
|
]),
|
|
406
|
-
|
|
407
|
-
icon:
|
|
408
|
-
label:
|
|
407
|
+
u(X, {
|
|
408
|
+
icon: v(ee),
|
|
409
|
+
label: v(_).paragraphEditor.italic,
|
|
409
410
|
active: e.editor.isActive("italic"),
|
|
410
411
|
onClick: n[3] ||= (t) => e.editor.chain().focus().toggleItalic().run()
|
|
411
412
|
}, null, 8, [
|
|
@@ -413,9 +414,9 @@ var Q = /* @__PURE__ */ u(ue, [["render", fe]]), pe = [
|
|
|
413
414
|
"label",
|
|
414
415
|
"active"
|
|
415
416
|
]),
|
|
416
|
-
|
|
417
|
-
icon:
|
|
418
|
-
label:
|
|
417
|
+
u(X, {
|
|
418
|
+
icon: v(J),
|
|
419
|
+
label: v(_).paragraphEditor.underline,
|
|
419
420
|
active: e.editor.isActive("underline"),
|
|
420
421
|
onClick: n[4] ||= (t) => e.editor.chain().focus().toggleUnderline().run()
|
|
421
422
|
}, null, 8, [
|
|
@@ -423,9 +424,9 @@ var Q = /* @__PURE__ */ u(ue, [["render", fe]]), pe = [
|
|
|
423
424
|
"label",
|
|
424
425
|
"active"
|
|
425
426
|
]),
|
|
426
|
-
|
|
427
|
-
icon:
|
|
428
|
-
label:
|
|
427
|
+
u(X, {
|
|
428
|
+
icon: v(G),
|
|
429
|
+
label: v(_).paragraphEditor.strikethrough,
|
|
429
430
|
active: e.editor.isActive("strike"),
|
|
430
431
|
onClick: n[5] ||= (t) => e.editor.chain().focus().toggleStrike().run()
|
|
431
432
|
}, null, 8, [
|
|
@@ -433,10 +434,10 @@ var Q = /* @__PURE__ */ u(ue, [["render", fe]]), pe = [
|
|
|
433
434
|
"label",
|
|
434
435
|
"active"
|
|
435
436
|
]),
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
icon:
|
|
439
|
-
label:
|
|
437
|
+
u(Z),
|
|
438
|
+
u(X, {
|
|
439
|
+
icon: v(K),
|
|
440
|
+
label: v(_).paragraphEditor.subscript,
|
|
440
441
|
active: e.editor.isActive("subscript"),
|
|
441
442
|
onClick: n[6] ||= (t) => e.editor.chain().focus().toggleSubscript().run()
|
|
442
443
|
}, null, 8, [
|
|
@@ -444,9 +445,9 @@ var Q = /* @__PURE__ */ u(ue, [["render", fe]]), pe = [
|
|
|
444
445
|
"label",
|
|
445
446
|
"active"
|
|
446
447
|
]),
|
|
447
|
-
|
|
448
|
-
icon:
|
|
449
|
-
label:
|
|
448
|
+
u(X, {
|
|
449
|
+
icon: v(q),
|
|
450
|
+
label: v(_).paragraphEditor.superscript,
|
|
450
451
|
active: e.editor.isActive("superscript"),
|
|
451
452
|
onClick: n[7] ||= (t) => e.editor.chain().focus().toggleSuperscript().run()
|
|
452
453
|
}, null, 8, [
|
|
@@ -454,21 +455,21 @@ var Q = /* @__PURE__ */ u(ue, [["render", fe]]), pe = [
|
|
|
454
455
|
"label",
|
|
455
456
|
"active"
|
|
456
457
|
]),
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
icon:
|
|
460
|
-
label:
|
|
458
|
+
u(Z),
|
|
459
|
+
u(X, {
|
|
460
|
+
icon: v(F),
|
|
461
|
+
label: v(_).paragraphEditor.addLink,
|
|
461
462
|
active: e.editor.isActive("link"),
|
|
462
|
-
onClick: n[8] ||= (e) =>
|
|
463
|
+
onClick: n[8] ||= (e) => o("open-link-dialog")
|
|
463
464
|
}, null, 8, [
|
|
464
465
|
"icon",
|
|
465
466
|
"label",
|
|
466
467
|
"active"
|
|
467
468
|
])
|
|
468
|
-
]),
|
|
469
|
-
|
|
470
|
-
icon:
|
|
471
|
-
label:
|
|
469
|
+
]), g("div", Se, [
|
|
470
|
+
u(X, {
|
|
471
|
+
icon: v(H),
|
|
472
|
+
label: v(_).paragraphEditor.bulletList,
|
|
472
473
|
active: e.editor.isActive("bulletList"),
|
|
473
474
|
onClick: n[9] ||= (t) => e.editor.chain().focus().toggleBulletList().run()
|
|
474
475
|
}, null, 8, [
|
|
@@ -476,9 +477,9 @@ var Q = /* @__PURE__ */ u(ue, [["render", fe]]), pe = [
|
|
|
476
477
|
"label",
|
|
477
478
|
"active"
|
|
478
479
|
]),
|
|
479
|
-
|
|
480
|
-
icon:
|
|
481
|
-
label:
|
|
480
|
+
u(X, {
|
|
481
|
+
icon: v(V),
|
|
482
|
+
label: v(_).paragraphEditor.numberedList,
|
|
482
483
|
active: e.editor.isActive("orderedList"),
|
|
483
484
|
onClick: n[10] ||= (t) => e.editor.chain().focus().toggleOrderedList().run()
|
|
484
485
|
}, null, 8, [
|
|
@@ -486,10 +487,10 @@ var Q = /* @__PURE__ */ u(ue, [["render", fe]]), pe = [
|
|
|
486
487
|
"label",
|
|
487
488
|
"active"
|
|
488
489
|
]),
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
icon:
|
|
492
|
-
label:
|
|
490
|
+
u(Z),
|
|
491
|
+
u(X, {
|
|
492
|
+
icon: v(L),
|
|
493
|
+
label: v(_).paragraphEditor.alignLeft,
|
|
493
494
|
active: e.editor.isActive({ textAlign: "left" }),
|
|
494
495
|
onClick: n[11] ||= (t) => e.editor.chain().focus().setTextAlign("left").run()
|
|
495
496
|
}, null, 8, [
|
|
@@ -497,9 +498,9 @@ var Q = /* @__PURE__ */ u(ue, [["render", fe]]), pe = [
|
|
|
497
498
|
"label",
|
|
498
499
|
"active"
|
|
499
500
|
]),
|
|
500
|
-
|
|
501
|
-
icon:
|
|
502
|
-
label:
|
|
501
|
+
u(X, {
|
|
502
|
+
icon: v(ie),
|
|
503
|
+
label: v(_).paragraphEditor.alignCenter,
|
|
503
504
|
active: e.editor.isActive({ textAlign: "center" }),
|
|
504
505
|
onClick: n[12] ||= (t) => e.editor.chain().focus().setTextAlign("center").run()
|
|
505
506
|
}, null, 8, [
|
|
@@ -507,9 +508,9 @@ var Q = /* @__PURE__ */ u(ue, [["render", fe]]), pe = [
|
|
|
507
508
|
"label",
|
|
508
509
|
"active"
|
|
509
510
|
]),
|
|
510
|
-
|
|
511
|
-
icon:
|
|
512
|
-
label:
|
|
511
|
+
u(X, {
|
|
512
|
+
icon: v(re),
|
|
513
|
+
label: v(_).paragraphEditor.alignRight,
|
|
513
514
|
active: e.editor.isActive({ textAlign: "right" }),
|
|
514
515
|
onClick: n[13] ||= (t) => e.editor.chain().focus().setTextAlign("right").run()
|
|
515
516
|
}, null, 8, [
|
|
@@ -517,56 +518,56 @@ var Q = /* @__PURE__ */ u(ue, [["render", fe]]), pe = [
|
|
|
517
518
|
"label",
|
|
518
519
|
"active"
|
|
519
520
|
]),
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
"model-value":
|
|
523
|
-
options: B
|
|
524
|
-
label:
|
|
521
|
+
u(Z),
|
|
522
|
+
u(Q, {
|
|
523
|
+
"model-value": M(),
|
|
524
|
+
options: v(B),
|
|
525
|
+
label: v(_).paragraphEditor.lineHeight,
|
|
525
526
|
placeholder: "LH",
|
|
526
527
|
"width-class": "tpl:w-16",
|
|
527
|
-
"onUpdate:modelValue":
|
|
528
|
+
"onUpdate:modelValue": P
|
|
528
529
|
}, null, 8, [
|
|
529
530
|
"model-value",
|
|
530
531
|
"options",
|
|
531
532
|
"label"
|
|
532
533
|
]),
|
|
533
|
-
|
|
534
|
-
"model-value":
|
|
535
|
-
options:
|
|
536
|
-
label:
|
|
534
|
+
u(Q, {
|
|
535
|
+
"model-value": O("letterSpacing"),
|
|
536
|
+
options: v(z),
|
|
537
|
+
label: v(_).paragraphEditor.letterSpacing,
|
|
537
538
|
placeholder: "LS",
|
|
538
539
|
"width-class": "tpl:w-20",
|
|
539
|
-
"onUpdate:modelValue":
|
|
540
|
+
"onUpdate:modelValue": I
|
|
540
541
|
}, null, 8, [
|
|
541
542
|
"model-value",
|
|
542
543
|
"options",
|
|
543
544
|
"label"
|
|
544
545
|
]),
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
icon:
|
|
548
|
-
label:
|
|
546
|
+
u(Z),
|
|
547
|
+
u(X, {
|
|
548
|
+
icon: v(U),
|
|
549
|
+
label: v(_).paragraphEditor.clearFormatting,
|
|
549
550
|
onClick: n[14] ||= (t) => e.editor.chain().focus().clearNodes().unsetAllMarks().run()
|
|
550
551
|
}, null, 8, ["icon", "label"]),
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
e.mergeTagEnabled ? (
|
|
552
|
+
u(Z),
|
|
553
|
+
u(le, { onInsert: S }),
|
|
554
|
+
e.mergeTagEnabled ? (i(), l(d, { key: 0 }, [u(Z), g("button", {
|
|
554
555
|
type: "button",
|
|
555
556
|
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)]",
|
|
556
|
-
"aria-label":
|
|
557
|
-
title:
|
|
558
|
-
onClick: n[15] ||= (e) =>
|
|
559
|
-
}, [
|
|
557
|
+
"aria-label": v(_).mergeTag.add,
|
|
558
|
+
title: v(_).mergeTag.add,
|
|
559
|
+
onClick: n[15] ||= (e) => o("add-merge-tag")
|
|
560
|
+
}, [u(v(ne), {
|
|
560
561
|
size: 16,
|
|
561
562
|
"stroke-width": 2
|
|
562
|
-
}),
|
|
563
|
-
])], 64)) : (
|
|
563
|
+
}), x(" " + a(v(_).mergeTag.add), 1)], 8, Ce)], 64)) : p("", !0)
|
|
564
|
+
])], 64)) : (i(), l("div", we, [u(v(te), {
|
|
564
565
|
class: "tpl-spinner",
|
|
565
566
|
size: 14,
|
|
566
567
|
"stroke-width": 2
|
|
567
|
-
}),
|
|
568
|
+
}), x(" " + a(v(_).errors.editorLoading), 1)]))], 12, _e)]));
|
|
568
569
|
}
|
|
569
|
-
}), Ee = { class: "tpl-text-editor-wrapper tpl:relative" }, De = /* @__PURE__ */
|
|
570
|
+
}), Ee = { class: "tpl-text-editor-wrapper tpl:relative" }, De = /* @__PURE__ */ s({
|
|
570
571
|
__name: "ParagraphEditor",
|
|
571
572
|
props: {
|
|
572
573
|
block: {},
|
|
@@ -574,25 +575,25 @@ var Q = /* @__PURE__ */ u(ue, [["render", fe]]), pe = [
|
|
|
574
575
|
},
|
|
575
576
|
emits: ["done"],
|
|
576
577
|
setup(e, { emit: t }) {
|
|
577
|
-
let
|
|
578
|
-
blockId: () =>
|
|
579
|
-
blockContent: () =>
|
|
580
|
-
onDone: () =>
|
|
578
|
+
let r = e, a = t, { editor: o, EditorContent: s, isLoading: c, initError: d, retry: f, showLinkDialog: p, linkUrl: m, linkDialogRef: h, mergeTagEnabled: g, openLinkDialog: _, insertLink: y, removeLink: b, closeLinkDialog: x, handleLinkKeydown: S, handleAddMergeTag: C } = k({
|
|
579
|
+
blockId: () => r.block.id,
|
|
580
|
+
blockContent: () => r.block.content,
|
|
581
|
+
onDone: () => a("done"),
|
|
581
582
|
editorName: "ParagraphEditor",
|
|
582
583
|
async loadExtensions({ mergeTags: e, syntax: t }) {
|
|
583
584
|
let [{ Editor: n, EditorContent: r }, { default: i }, { default: a }, { default: o }, { default: s }, { default: c }, { default: l }, { TextStyle: u }, { default: d }, { default: f }, { default: p }, { MergeTagNode: m, LogicMergeTagNode: h, FontSize: g, LineHeight: _, LetterSpacing: v }] = await Promise.all([
|
|
584
|
-
import("./dist-
|
|
585
|
-
import("./dist-
|
|
586
|
-
import("./dist-
|
|
587
|
-
import("./dist-
|
|
588
|
-
import("./dist-
|
|
589
|
-
import("./dist-
|
|
590
|
-
import("./dist-
|
|
591
|
-
import("./dist-
|
|
592
|
-
import("./dist-
|
|
593
|
-
import("./dist-
|
|
594
|
-
import("./dist-
|
|
595
|
-
import("./extensions-
|
|
585
|
+
import("./dist-D42og5Sc.js").then((e) => e.r),
|
|
586
|
+
import("./dist-BnlZ_HwX.js"),
|
|
587
|
+
import("./dist-UZ8UzVZ-.js"),
|
|
588
|
+
import("./dist-Owxo48fF.js"),
|
|
589
|
+
import("./dist-C9yhcxsf.js"),
|
|
590
|
+
import("./dist-CGffNO8z.js"),
|
|
591
|
+
import("./dist-Cq0OFLMj.js"),
|
|
592
|
+
import("./dist-skgH9dyo.js"),
|
|
593
|
+
import("./dist-BibwE8Y0.js"),
|
|
594
|
+
import("./dist-CfGpCUSx.js"),
|
|
595
|
+
import("./dist-Chd-H2S3.js"),
|
|
596
|
+
import("./extensions-DQKaICBH.js")
|
|
596
597
|
]);
|
|
597
598
|
return {
|
|
598
599
|
TiptapEditor: n,
|
|
@@ -631,14 +632,14 @@ var Q = /* @__PURE__ */ u(ue, [["render", fe]]), pe = [
|
|
|
631
632
|
};
|
|
632
633
|
}
|
|
633
634
|
});
|
|
634
|
-
return (t,
|
|
635
|
-
|
|
636
|
-
editor:
|
|
635
|
+
return (t, r) => (i(), l("div", Ee, [
|
|
636
|
+
u(Te, {
|
|
637
|
+
editor: v(o),
|
|
637
638
|
"toolbar-position": e.toolbarPosition,
|
|
638
|
-
"is-loading":
|
|
639
|
-
"merge-tag-enabled":
|
|
640
|
-
onOpenLinkDialog:
|
|
641
|
-
onAddMergeTag:
|
|
639
|
+
"is-loading": v(c),
|
|
640
|
+
"merge-tag-enabled": v(g),
|
|
641
|
+
onOpenLinkDialog: v(_),
|
|
642
|
+
onAddMergeTag: v(C)
|
|
642
643
|
}, null, 8, [
|
|
643
644
|
"editor",
|
|
644
645
|
"toolbar-position",
|
|
@@ -647,12 +648,12 @@ var Q = /* @__PURE__ */ u(ue, [["render", fe]]), pe = [
|
|
|
647
648
|
"onOpenLinkDialog",
|
|
648
649
|
"onAddMergeTag"
|
|
649
650
|
]),
|
|
650
|
-
|
|
651
|
-
editor:
|
|
652
|
-
"editor-content":
|
|
653
|
-
"is-loading":
|
|
654
|
-
"init-error":
|
|
655
|
-
onRetry:
|
|
651
|
+
u(I, {
|
|
652
|
+
editor: v(o),
|
|
653
|
+
"editor-content": v(s),
|
|
654
|
+
"is-loading": v(c),
|
|
655
|
+
"init-error": v(d),
|
|
656
|
+
onRetry: v(f)
|
|
656
657
|
}, null, 8, [
|
|
657
658
|
"editor",
|
|
658
659
|
"editor-content",
|
|
@@ -660,17 +661,17 @@ var Q = /* @__PURE__ */ u(ue, [["render", fe]]), pe = [
|
|
|
660
661
|
"init-error",
|
|
661
662
|
"onRetry"
|
|
662
663
|
]),
|
|
663
|
-
|
|
664
|
-
visible:
|
|
665
|
-
"is-editing-link":
|
|
666
|
-
"dialog-ref":
|
|
667
|
-
"onUpdate:dialogRef":
|
|
668
|
-
"link-url":
|
|
669
|
-
"onUpdate:linkUrl":
|
|
670
|
-
onClose:
|
|
671
|
-
onInsert:
|
|
672
|
-
onRemove:
|
|
673
|
-
onKeydown:
|
|
664
|
+
u(P, {
|
|
665
|
+
visible: v(p),
|
|
666
|
+
"is-editing-link": v(o)?.isActive("link") ?? !1,
|
|
667
|
+
"dialog-ref": v(h),
|
|
668
|
+
"onUpdate:dialogRef": r[0] ||= (e) => n(h) ? h.value = e : null,
|
|
669
|
+
"link-url": v(m),
|
|
670
|
+
"onUpdate:linkUrl": r[1] ||= (e) => n(m) ? m.value = e : null,
|
|
671
|
+
onClose: v(x),
|
|
672
|
+
onInsert: v(y),
|
|
673
|
+
onRemove: v(b),
|
|
674
|
+
onKeydown: v(S)
|
|
674
675
|
}, null, 8, [
|
|
675
676
|
"visible",
|
|
676
677
|
"is-editing-link",
|