@templatical/editor 0.13.0 → 0.15.0
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-B0-U5-sb.js → AiChatSidebar-BIKvYREk.js} +57 -56
- package/dist/{AiFeatureMenu-DxDwLS8B.js → AiFeatureMenu-QbD82crt.js} +23 -23
- package/dist/{BlockIssueBadge-C-EPqWsh.js → BlockIssueBadge-B3xVgMTh.js} +11 -11
- package/dist/CloudEditor-DptuSf7A.js +1234 -0
- package/dist/{CollaboratorBar-DgwjisX2.js → CollaboratorBar-DrA_K69w.js} +20 -20
- package/dist/{CommentsSidebar-CpRLN40c.js → CommentsSidebar-D_tSGvTX.js} +158 -157
- package/dist/CountdownBlock-apiYUhkQ.js +92 -0
- package/dist/CountdownToolbar-CS0axcjz.js +210 -0
- package/dist/{DesignReferenceSidebar-BgPDbOsl.js → DesignReferenceSidebar-DWYK9nTk.js} +58 -57
- package/dist/{IssuesPanel-I0z6k6-H.js → IssuesPanel-CR1MPaDE.js} +40 -40
- package/dist/{LoadingTrack-C7mGWPHS.js → LoadingTrack-DsecR8Rw.js} +1 -1
- package/dist/MergeTagSuggestion-CH2SUxBo.js +1327 -0
- package/dist/ModuleBrowserModal-D45rBj5C.js +202 -0
- package/dist/{ModulePreviewCanvas-Dni9kK4j.js → ModulePreviewCanvas-BiQ6B2-l.js} +29 -29
- package/dist/{NumberWithSuffix-D3fdj0iO.js → NumberWithSuffix-CrA6quxx.js} +143 -142
- package/dist/ParagraphEditor-1NaUJpZO.js +721 -0
- package/dist/{RichTextEditorContent-Q5altsx1.js → RichTextEditorContent-BqLHIZY7.js} +45 -44
- package/dist/{SaveModuleDialog-C38VqN2T.js → SaveModuleDialog-B0sPOTgO.js} +38 -37
- package/dist/{SnapshotHistory-ByloTpwh.js → SnapshotHistory-DslVzmSb.js} +34 -33
- package/dist/{TemplateScoringPanel-CUxiPtEf.js → TemplateScoringPanel-CZ62rGHz.js} +83 -82
- package/dist/{TestEmailModal-BvZBMBad.js → TestEmailModal-DWGniJVu.js} +22 -21
- package/dist/TitleEditor-D4t_gZZJ.js +193 -0
- package/dist/{TplModal-BYb-X5Bj.js → TplModal-Br2VG6cn.js} +14 -13
- package/dist/{blockTypeIcons-CyAom3iI.js → blockTypeIcons-CXhCS5WV.js} +5 -5
- package/dist/bundle-stats.json +8 -8
- package/dist/cdn/chunks/{AiFeatureMenu-BSoy-SoF.js → AiFeatureMenu-3Slo_LGA.js} +8 -8
- package/dist/cdn/chunks/{AiFeatureMenu-BSoy-SoF.js.map → AiFeatureMenu-3Slo_LGA.js.map} +1 -1
- package/dist/cdn/chunks/{BlockIssueBadge-BQDUuJxy.js → BlockIssueBadge-BxwEiiF3.js} +5 -5
- package/dist/cdn/chunks/{BlockIssueBadge-BQDUuJxy.js.map → BlockIssueBadge-BxwEiiF3.js.map} +1 -1
- package/dist/cdn/chunks/{CloudEditor-BZuzsQOZ.js → CloudEditor-DFIFWD9G.js} +163 -161
- package/dist/cdn/chunks/CloudEditor-DFIFWD9G.js.map +1 -0
- package/dist/cdn/chunks/{CollaboratorBar-DUpSrtDr.js → CollaboratorBar-Cu3vuN66.js} +4 -4
- package/dist/cdn/chunks/{CollaboratorBar-DUpSrtDr.js.map → CollaboratorBar-Cu3vuN66.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownBlock-DChGTAsH.js → CountdownBlock-BEVAJQtQ.js} +3 -3
- package/dist/cdn/chunks/{CountdownBlock-DChGTAsH.js.map → CountdownBlock-BEVAJQtQ.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownToolbar-C6gX2SJr.js → CountdownToolbar-CI2sQZv5.js} +4 -4
- package/dist/cdn/chunks/{CountdownToolbar-C6gX2SJr.js.map → CountdownToolbar-CI2sQZv5.js.map} +1 -1
- package/dist/cdn/chunks/{IssuesPanel-Bo1uhdSe.js → IssuesPanel-BdeDoTcn.js} +11 -11
- package/dist/cdn/chunks/{IssuesPanel-Bo1uhdSe.js.map → IssuesPanel-BdeDoTcn.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-a-tZRCcD.js → ModuleBrowserModal-Dz-I5zfj.js} +11 -8
- package/dist/cdn/chunks/{ModuleBrowserModal-a-tZRCcD.js.map → ModuleBrowserModal-Dz-I5zfj.js.map} +1 -1
- package/dist/cdn/chunks/{ModulePreviewCanvas-Bm6k0Op0.js → ModulePreviewCanvas-BfinyuAN.js} +21 -21
- package/dist/cdn/chunks/{ModulePreviewCanvas-Bm6k0Op0.js.map → ModulePreviewCanvas-BfinyuAN.js.map} +1 -1
- package/dist/cdn/chunks/{NumberWithSuffix-HTbuD3VJ.js → NumberWithSuffix-CDjEa08X.js} +4 -4
- package/dist/cdn/chunks/{NumberWithSuffix-HTbuD3VJ.js.map → NumberWithSuffix-CDjEa08X.js.map} +1 -1
- package/dist/cdn/chunks/{ParagraphEditor-pGrfSccu.js → ParagraphEditor-B3fG0vge.js} +130 -110
- package/dist/cdn/chunks/ParagraphEditor-B3fG0vge.js.map +1 -0
- package/dist/cdn/chunks/{RichTextEditorContent-D7XZix_1.js → RichTextEditorContent-C6YPCp9j.js} +4 -4
- package/dist/cdn/chunks/{RichTextEditorContent-D7XZix_1.js.map → RichTextEditorContent-C6YPCp9j.js.map} +1 -1
- package/dist/cdn/chunks/{SaveModuleDialog-C9PQ9x6j.js → SaveModuleDialog-C6UIIVAM.js} +6 -6
- package/dist/cdn/chunks/{SaveModuleDialog-C9PQ9x6j.js.map → SaveModuleDialog-C6UIIVAM.js.map} +1 -1
- package/dist/cdn/chunks/{TitleEditor-BvFbL16O.js → TitleEditor-BiZbLYF1.js} +62 -46
- package/dist/cdn/chunks/TitleEditor-BiZbLYF1.js.map +1 -0
- package/dist/cdn/chunks/blockTypeIcons-BernVG06.js +22 -0
- package/dist/cdn/chunks/{blockTypeIcons-Kd1MT0u8.js.map → blockTypeIcons-BernVG06.js.map} +1 -1
- package/dist/{de-C2wOXoxs.js → cdn/chunks/de-LsV0u1tP.js} +19 -1
- package/dist/cdn/chunks/de-LsV0u1tP.js.map +1 -0
- package/dist/cdn/chunks/{draggable-Bci-fq8y.js → draggable-kG-D5Xsm.js} +19 -10
- package/dist/cdn/chunks/draggable-kG-D5Xsm.js.map +1 -0
- package/dist/cdn/chunks/{en-dR7zfNC3.js → en-Bb8X1bOs.js} +18 -2
- package/dist/cdn/chunks/en-Bb8X1bOs.js.map +1 -0
- package/dist/cdn/chunks/extensions-Drp8UDc6.js +421 -0
- package/dist/cdn/chunks/extensions-Drp8UDc6.js.map +1 -0
- package/dist/cdn/chunks/{features-DU6lA8l1.js → features-Dpczf9Su.js} +1171 -994
- package/dist/cdn/chunks/features-Dpczf9Su.js.map +1 -0
- package/dist/cdn/chunks/{icons-BjHUZZyJ.js → icons-CuxnJiGQ.js} +170 -164
- package/dist/cdn/chunks/icons-CuxnJiGQ.js.map +1 -0
- 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-Byelliig.js → media-library-CiYl_BO7.js} +556 -554
- package/dist/cdn/chunks/{media-library-Byelliig.js.map → media-library-CiYl_BO7.js.map} +1 -1
- package/dist/cdn/chunks/{pt-BR-BZ86xqK6.js → pt-BR-BwJY_cvb.js} +18 -2
- package/dist/cdn/chunks/pt-BR-BwJY_cvb.js.map +1 -0
- package/dist/cdn/chunks/{pusher-BICWUP2j.js → pusher-CIwiKF8H.js} +9 -6
- package/dist/cdn/chunks/{pusher-BICWUP2j.js.map → pusher-CIwiKF8H.js.map} +1 -1
- package/dist/cdn/chunks/quality-CNjGxBG0.js +2176 -0
- package/dist/cdn/chunks/{quality-DNnYAntR.js.map → quality-CNjGxBG0.js.map} +1 -1
- package/dist/cdn/chunks/{renderer-CZKO-Tav.js → renderer-CFkg8h-K.js} +40 -31
- package/dist/cdn/chunks/renderer-CFkg8h-K.js.map +1 -0
- package/dist/cdn/chunks/{src-DsqSXXjk.js → src-DRpKu4Dy.js} +11 -11
- package/dist/cdn/chunks/{src-DsqSXXjk.js.map → src-DRpKu4Dy.js.map} +1 -1
- package/dist/cdn/chunks/styles-B7wryV0l.js +3943 -0
- package/dist/cdn/chunks/styles-B7wryV0l.js.map +1 -0
- package/dist/cdn/chunks/{tiptap-CwScfbsM.js → tiptap-DF9PEiqH.js} +5429 -5373
- package/dist/cdn/chunks/tiptap-DF9PEiqH.js.map +1 -0
- package/dist/cdn/editor.css +1 -1
- package/dist/cdn/editor.js +117 -115
- package/dist/cdn/editor.js.map +1 -1
- package/dist/{check-BRzXxFHr.js → check-rl7ok6uJ.js} +1 -1
- package/dist/{chevron-down-DmEgzmYT.js → chevron-down-BKe__NOD.js} +1 -1
- package/dist/{circle-alert-BStvZr3O.js → circle-alert-C8xmpMsK.js} +1 -1
- package/dist/{clock-Blwp_1R6.js → clock-BW4JuDCN.js} +1 -1
- package/dist/{cloud-_olro76D.js → cloud-BQusL53H.js} +208 -208
- package/dist/createLucideIcon-Dx-EjR9r.js +43 -0
- package/dist/{cdn/chunks/de-C2wOXoxs.js → de-LsV0u1tP.js} +17 -3
- package/dist/{dist-BlG7k25W.js → dist-B5Sov3sS.js} +7 -7
- package/dist/dist-BEWiuOMi.js +251 -0
- package/dist/{dist-b7Ak-CuM.js → dist-BFmE-7hB.js} +2 -2
- package/dist/{dist-o73iaGqy.js → dist-BMoa33wT.js} +2 -2
- package/dist/{dist-BctFrpeA.js → dist-BibU4HNl.js} +74 -65
- package/dist/{dist-D6x1cQeh.js → dist-BsCGIDSt.js} +103 -102
- package/dist/dist-CNLKj9wa.js +5 -0
- package/dist/{dist-DULfKmTh.js → dist-CNXDNYQn.js} +729 -695
- package/dist/{dist-412xXefB.js → dist-COG3IdPK.js} +3 -3
- package/dist/{dist-Cz79qrLL.js → dist-CQZxDvFw.js} +3 -3
- package/dist/{dist-BwgjpLfr.js → dist-CRsjOQM-.js} +2 -2
- package/dist/dist-CTT6WYJ6.js +134 -0
- package/dist/dist-Cqa6aeAJ.js +5 -0
- package/dist/{dist-BCQZZUE9.js → dist-SXJJ2v41.js} +2 -2
- package/dist/{dist-DhKTdU52.js → dist-itdjZraK.js} +1445 -1420
- package/dist/{en-dR7zfNC3.js → en-Bb8X1bOs.js} +17 -1
- package/dist/extensions-DwaZAqm6.js +423 -0
- package/dist/{image-up-BFPbw_Zq.js → image-up-BwBCmQ4P.js} +1 -1
- package/dist/index.d.ts +17 -0
- package/dist/{info-B_qLEBN2.js → info-TCn7uWR5.js} +1 -1
- package/dist/keys-Cv8-8GsD.js +10 -0
- package/dist/{liquid.browser-CVjP5Mex.js → liquid.browser-DZLtv26k.js} +692 -677
- package/dist/{list-checks-CGg7JxPm.js → list-checks-CSrOWNgq.js} +1 -1
- package/dist/{loader-circle-CDF8eR_Q.js → loader-circle-BLmicnPG.js} +1 -1
- package/dist/{message-circle-C3cHsCJl.js → message-circle-C9hHMQCI.js} +1 -1
- package/dist/{pt-BR-BZ86xqK6.js → pt-BR-BwJY_cvb.js} +17 -1
- package/dist/{refresh-cw-Butml7Q4.js → refresh-cw-D1JQ1LNa.js} +1 -1
- package/dist/runtime-dom.esm-bundler-BzuoCyNp.js +523 -0
- package/dist/scan-line-DgijVq9y.js +31 -0
- package/dist/{send-k7npFJNO.js → send-DjPdq69F.js} +1 -1
- package/dist/{shield-check-CV6GbmCu.js → shield-check-Bqluu8FS.js} +1 -1
- package/dist/{sparkles-C965Xop4.js → sparkles-M4azPVSP.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/styles-D7fQ7f_1.js +4164 -0
- package/dist/templatical-editor.js +155 -152
- package/dist/{text-align-start-Bxnps8fH.js → text-align-start-CMya5pCQ.js} +11 -11
- package/dist/{trash-2-DpGb7fIt.js → trash-2-C-81rkLS.js} +1 -1
- package/dist/{triangle-alert-BKYElAwz.js → triangle-alert-BuRWnynk.js} +1 -1
- package/dist/{upload-BF7sxd1_.js → upload-CWBIoLd4.js} +1 -1
- package/dist/{useAliveFlag-BinvbqQR.js → useAliveFlag-CECL_OUb.js} +1 -1
- package/dist/{useCloudI18n-L3H2XvdW.js → useCloudI18n-AKCy98qD.js} +2 -2
- package/dist/{useEditorCore-DKYZ7aKk.js → useEditorCore-vcWLdnjN.js} +1480 -1310
- package/dist/{useI18n-CTs_bP9d.js → useI18n-C-TDeJBt.js} +2 -2
- package/dist/{useMergeTag-e3RSY-s3.js → useMergeTag-DSrBY0-2.js} +6 -6
- package/dist/usePopoverRoot-DKUDnr55.js +8 -0
- package/dist/{vue.runtime.esm-bundler-B2k01iQh.js → vue.runtime.esm-bundler-l0XAqiyv.js} +639 -1151
- package/dist/{x-CGjkjdKK.js → x-CQSvXnGR.js} +1 -1
- package/package.json +27 -27
- package/dist/CloudEditor-DaEfipBn.js +0 -1230
- package/dist/CountdownBlock-DO9fziwf.js +0 -92
- package/dist/CountdownToolbar-BeII06yJ.js +0 -210
- package/dist/ModuleBrowserModal-DsZRr87F.js +0 -198
- package/dist/ParagraphEditor-CZ-cmhX3.js +0 -700
- package/dist/TitleEditor-DbNOcvhR.js +0 -177
- package/dist/cdn/chunks/CloudEditor-BZuzsQOZ.js.map +0 -1
- package/dist/cdn/chunks/ParagraphEditor-pGrfSccu.js.map +0 -1
- package/dist/cdn/chunks/TitleEditor-BvFbL16O.js.map +0 -1
- package/dist/cdn/chunks/blockTypeIcons-Kd1MT0u8.js +0 -22
- package/dist/cdn/chunks/de-C2wOXoxs.js.map +0 -1
- package/dist/cdn/chunks/draggable-Bci-fq8y.js.map +0 -1
- package/dist/cdn/chunks/en-dR7zfNC3.js.map +0 -1
- package/dist/cdn/chunks/extensions-CuUjSmuA.js +0 -605
- package/dist/cdn/chunks/extensions-CuUjSmuA.js.map +0 -1
- package/dist/cdn/chunks/features-DU6lA8l1.js.map +0 -1
- package/dist/cdn/chunks/icons-BjHUZZyJ.js.map +0 -1
- package/dist/cdn/chunks/liquid.browser-DKKBzRQu.js.map +0 -1
- package/dist/cdn/chunks/pt-BR-BZ86xqK6.js.map +0 -1
- package/dist/cdn/chunks/quality-DNnYAntR.js +0 -2176
- package/dist/cdn/chunks/renderer-CZKO-Tav.js.map +0 -1
- package/dist/cdn/chunks/styles-DiAdtiz9.js +0 -3428
- package/dist/cdn/chunks/styles-DiAdtiz9.js.map +0 -1
- package/dist/cdn/chunks/tiptap-CwScfbsM.js.map +0 -1
- package/dist/createLucideIcon-CmPAC-gt.js +0 -43
- package/dist/dist-BNEdeWub.js +0 -5
- package/dist/dist-Cgry6fNv.js +0 -382
- package/dist/dist-u0iIJH3V.js +0 -5
- package/dist/extensions-XPlNAKIL.js +0 -1720
- package/dist/keys-mFiJ5N0_.js +0 -10
- package/dist/scan-line-XYEqim_E.js +0 -25
- package/dist/styles-D0RCAWhB.js +0 -3647
- package/dist/usePopoverRoot-DVh7NY1q.js +0 -8
|
@@ -0,0 +1,721 @@
|
|
|
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-vcWLdnjN.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";
|
|
12
|
+
import { t as F } from "./_plugin-vue_export-helper-B3ysoDQm.js";
|
|
13
|
+
import { a as ue, o as I, s as L } from "./styleConstants-lGobwiLH.js";
|
|
14
|
+
import { t as R } from "./usePopoverRoot-DKUDnr55.js";
|
|
15
|
+
var z = A("list-ordered", [
|
|
16
|
+
["path", {
|
|
17
|
+
d: "M11 5h10",
|
|
18
|
+
key: "1cz7ny"
|
|
19
|
+
}],
|
|
20
|
+
["path", {
|
|
21
|
+
d: "M11 12h10",
|
|
22
|
+
key: "1438ji"
|
|
23
|
+
}],
|
|
24
|
+
["path", {
|
|
25
|
+
d: "M11 19h10",
|
|
26
|
+
key: "11t30w"
|
|
27
|
+
}],
|
|
28
|
+
["path", {
|
|
29
|
+
d: "M4 4h1v5",
|
|
30
|
+
key: "10yrso"
|
|
31
|
+
}],
|
|
32
|
+
["path", {
|
|
33
|
+
d: "M4 9h2",
|
|
34
|
+
key: "r1h2o0"
|
|
35
|
+
}],
|
|
36
|
+
["path", {
|
|
37
|
+
d: "M6.5 20H3.4c0-1 2.6-1.925 2.6-3.5a1.5 1.5 0 0 0-2.6-1.02",
|
|
38
|
+
key: "xtkcd5"
|
|
39
|
+
}]
|
|
40
|
+
]), B = A("list", [
|
|
41
|
+
["path", {
|
|
42
|
+
d: "M3 5h.01",
|
|
43
|
+
key: "18ugdj"
|
|
44
|
+
}],
|
|
45
|
+
["path", {
|
|
46
|
+
d: "M3 12h.01",
|
|
47
|
+
key: "nlz23k"
|
|
48
|
+
}],
|
|
49
|
+
["path", {
|
|
50
|
+
d: "M3 19h.01",
|
|
51
|
+
key: "noohij"
|
|
52
|
+
}],
|
|
53
|
+
["path", {
|
|
54
|
+
d: "M8 5h13",
|
|
55
|
+
key: "1pao27"
|
|
56
|
+
}],
|
|
57
|
+
["path", {
|
|
58
|
+
d: "M8 12h13",
|
|
59
|
+
key: "1za7za"
|
|
60
|
+
}],
|
|
61
|
+
["path", {
|
|
62
|
+
d: "M8 19h13",
|
|
63
|
+
key: "m83p4d"
|
|
64
|
+
}]
|
|
65
|
+
]), V = A("remove-formatting", [
|
|
66
|
+
["path", {
|
|
67
|
+
d: "M4 7V4h16v3",
|
|
68
|
+
key: "9msm58"
|
|
69
|
+
}],
|
|
70
|
+
["path", {
|
|
71
|
+
d: "M5 20h6",
|
|
72
|
+
key: "1h6pxn"
|
|
73
|
+
}],
|
|
74
|
+
["path", {
|
|
75
|
+
d: "M13 4 8 20",
|
|
76
|
+
key: "kqq6aj"
|
|
77
|
+
}],
|
|
78
|
+
["path", {
|
|
79
|
+
d: "m15 15 5 5",
|
|
80
|
+
key: "me55sn"
|
|
81
|
+
}],
|
|
82
|
+
["path", {
|
|
83
|
+
d: "m20 15-5 5",
|
|
84
|
+
key: "11p7ol"
|
|
85
|
+
}]
|
|
86
|
+
]), H = A("smile", [
|
|
87
|
+
["circle", {
|
|
88
|
+
cx: "12",
|
|
89
|
+
cy: "12",
|
|
90
|
+
r: "10",
|
|
91
|
+
key: "1mglay"
|
|
92
|
+
}],
|
|
93
|
+
["path", {
|
|
94
|
+
d: "M8 14s1.5 2 4 2 4-2 4-2",
|
|
95
|
+
key: "1y1vjs"
|
|
96
|
+
}],
|
|
97
|
+
["line", {
|
|
98
|
+
x1: "9",
|
|
99
|
+
x2: "9.01",
|
|
100
|
+
y1: "9",
|
|
101
|
+
y2: "9",
|
|
102
|
+
key: "yxxnd0"
|
|
103
|
+
}],
|
|
104
|
+
["line", {
|
|
105
|
+
x1: "15",
|
|
106
|
+
x2: "15.01",
|
|
107
|
+
y1: "9",
|
|
108
|
+
y2: "9",
|
|
109
|
+
key: "1p4y9e"
|
|
110
|
+
}]
|
|
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", [
|
|
125
|
+
["path", {
|
|
126
|
+
d: "M16 4H9a3 3 0 0 0-2.83 4",
|
|
127
|
+
key: "43sutm"
|
|
128
|
+
}],
|
|
129
|
+
["path", {
|
|
130
|
+
d: "M14 12a4 4 0 0 1 0 8H6",
|
|
131
|
+
key: "nlfj13"
|
|
132
|
+
}],
|
|
133
|
+
["line", {
|
|
134
|
+
x1: "4",
|
|
135
|
+
x2: "20",
|
|
136
|
+
y1: "12",
|
|
137
|
+
y2: "12",
|
|
138
|
+
key: "1e0a9i"
|
|
139
|
+
}]
|
|
140
|
+
]), fe = A("superscript", [
|
|
141
|
+
["path", {
|
|
142
|
+
d: "m4 19 8-8",
|
|
143
|
+
key: "hr47gm"
|
|
144
|
+
}],
|
|
145
|
+
["path", {
|
|
146
|
+
d: "m12 19-8-8",
|
|
147
|
+
key: "1dhhmo"
|
|
148
|
+
}],
|
|
149
|
+
["path", {
|
|
150
|
+
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",
|
|
151
|
+
key: "1dfcux"
|
|
152
|
+
}]
|
|
153
|
+
]), pe = A("underline", [["path", {
|
|
154
|
+
d: "M6 4v6a6 6 0 0 0 12 0V4",
|
|
155
|
+
key: "9kb039"
|
|
156
|
+
}], ["line", {
|
|
157
|
+
x1: "4",
|
|
158
|
+
x2: "20",
|
|
159
|
+
y1: "20",
|
|
160
|
+
y2: "20",
|
|
161
|
+
key: "nun2al"
|
|
162
|
+
}]]), W = [
|
|
163
|
+
"aria-label",
|
|
164
|
+
"title",
|
|
165
|
+
"aria-expanded"
|
|
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({
|
|
167
|
+
__name: "EmojiPickerDropdown",
|
|
168
|
+
emits: ["insert"],
|
|
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();
|
|
173
|
+
});
|
|
174
|
+
function O(e) {
|
|
175
|
+
o("insert", e), m();
|
|
176
|
+
}
|
|
177
|
+
return (t, r) => (i(), u("div", {
|
|
178
|
+
ref_key: "rootRef",
|
|
179
|
+
ref: D,
|
|
180
|
+
class: "tpl:relative"
|
|
181
|
+
}, [l("button", {
|
|
182
|
+
type: "button",
|
|
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),
|
|
187
|
+
"aria-haspopup": "dialog",
|
|
188
|
+
"aria-controls": "tpl-emoji-picker",
|
|
189
|
+
onClick: r[0] ||= (...e) => h(p) && h(p)(...e)
|
|
190
|
+
}, [d(h(H), {
|
|
191
|
+
size: 16,
|
|
192
|
+
"stroke-width": 2
|
|
193
|
+
})], 10, W), h(f) ? (i(), u("div", {
|
|
194
|
+
key: 0,
|
|
195
|
+
id: "tpl-emoji-picker",
|
|
196
|
+
ref_key: "pickerRef",
|
|
197
|
+
ref: E,
|
|
198
|
+
role: "dialog",
|
|
199
|
+
"aria-modal": "false",
|
|
200
|
+
"aria-label": h(y).paragraphEditor.insertEmoji,
|
|
201
|
+
tabindex: "-1",
|
|
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",
|
|
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", {
|
|
205
|
+
key: t.key,
|
|
206
|
+
class: "tpl:mb-2 tpl:last:mb-0"
|
|
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,
|
|
209
|
+
type: "button",
|
|
210
|
+
"aria-label": h(w)(h(y).paragraphEditor.emojiItemLabel, { emoji: e }),
|
|
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)]",
|
|
212
|
+
onClick: (t) => O(e)
|
|
213
|
+
}, a(e), 9, J))), 128))])]))), 128))], 40, G)) : v("", !0)], 512));
|
|
214
|
+
}
|
|
215
|
+
}), Y = [
|
|
216
|
+
"aria-label",
|
|
217
|
+
"title",
|
|
218
|
+
"aria-pressed"
|
|
219
|
+
], X = /* @__PURE__ */ c({
|
|
220
|
+
__name: "ToolbarIconButton",
|
|
221
|
+
props: {
|
|
222
|
+
icon: {},
|
|
223
|
+
label: {},
|
|
224
|
+
active: { type: Boolean },
|
|
225
|
+
strokeWidth: {},
|
|
226
|
+
size: {}
|
|
227
|
+
},
|
|
228
|
+
setup(e) {
|
|
229
|
+
return (t, a) => (i(), u("button", {
|
|
230
|
+
type: "button",
|
|
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
|
|
238
|
+
}, null, 8, ["size", "stroke-width"]))], 10, Y));
|
|
239
|
+
}
|
|
240
|
+
}), he = {}, ge = {
|
|
241
|
+
class: "tpl:mx-1 tpl:h-6 tpl:w-px tpl:bg-[var(--tpl-border)]",
|
|
242
|
+
"aria-hidden": "true"
|
|
243
|
+
};
|
|
244
|
+
function _e(e, t) {
|
|
245
|
+
return i(), u("span", ge);
|
|
246
|
+
}
|
|
247
|
+
var Z = /*#__PURE__*/ F(he, [["render", _e]]), ve = [
|
|
248
|
+
"value",
|
|
249
|
+
"aria-label",
|
|
250
|
+
"title"
|
|
251
|
+
], ye = { value: "" }, be = ["value"], Q = /* @__PURE__ */ c({
|
|
252
|
+
__name: "ToolbarSelect",
|
|
253
|
+
props: {
|
|
254
|
+
modelValue: {},
|
|
255
|
+
options: {},
|
|
256
|
+
label: {},
|
|
257
|
+
placeholder: {},
|
|
258
|
+
widthClass: {}
|
|
259
|
+
},
|
|
260
|
+
emits: ["update:modelValue"],
|
|
261
|
+
setup(t, { emit: r }) {
|
|
262
|
+
let o = r;
|
|
263
|
+
function s(e) {
|
|
264
|
+
o("update:modelValue", e.target.value);
|
|
265
|
+
}
|
|
266
|
+
function c(e) {
|
|
267
|
+
return typeof e == "string" ? e : e.value;
|
|
268
|
+
}
|
|
269
|
+
function d(e) {
|
|
270
|
+
return typeof e == "string" ? e : e.label;
|
|
271
|
+
}
|
|
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"]),
|
|
274
|
+
value: t.modelValue,
|
|
275
|
+
"aria-label": t.label,
|
|
276
|
+
title: t.label,
|
|
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));
|
|
282
|
+
}
|
|
283
|
+
}), $ = ["data-tpl-theme", "aria-label"], xe = { class: "tpl:flex tpl:items-center tpl:gap-1" }, Se = { class: "tpl:relative" }, Ce = [
|
|
284
|
+
"value",
|
|
285
|
+
"aria-label",
|
|
286
|
+
"title"
|
|
287
|
+
], we = { class: "tpl:relative" }, Te = [
|
|
288
|
+
"value",
|
|
289
|
+
"aria-label",
|
|
290
|
+
"title"
|
|
291
|
+
], Ee = { class: "tpl:flex tpl:items-center tpl:gap-1" }, De = ["aria-label", "title"], Oe = ["aria-label", "title"], ke = {
|
|
292
|
+
key: 1,
|
|
293
|
+
class: "tpl:flex tpl:items-center tpl:gap-2 tpl:px-2 tpl:text-xs tpl:text-[var(--tpl-text-dim)]"
|
|
294
|
+
}, Ae = /* @__PURE__ */ c({
|
|
295
|
+
__name: "ParagraphToolbar",
|
|
296
|
+
props: {
|
|
297
|
+
editor: {},
|
|
298
|
+
toolbarPosition: {},
|
|
299
|
+
isLoading: { type: Boolean },
|
|
300
|
+
canRequestMergeTag: { type: Boolean },
|
|
301
|
+
canInsertLogicTag: { type: Boolean }
|
|
302
|
+
},
|
|
303
|
+
emits: [
|
|
304
|
+
"open-link-dialog",
|
|
305
|
+
"add-merge-tag",
|
|
306
|
+
"add-logic-tag"
|
|
307
|
+
],
|
|
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;
|
|
310
|
+
function N(e) {
|
|
311
|
+
r.editor?.chain().focus().insertContent(e).run();
|
|
312
|
+
}
|
|
313
|
+
function P(e) {
|
|
314
|
+
return r.editor?.getAttributes("textStyle")[e] || "";
|
|
315
|
+
}
|
|
316
|
+
function F(e) {
|
|
317
|
+
let t = r.editor?.chain().focus();
|
|
318
|
+
e ? t?.setFontFamily(e).run() : t?.unsetFontFamily().run();
|
|
319
|
+
}
|
|
320
|
+
function H(e) {
|
|
321
|
+
let t = r.editor?.chain().focus();
|
|
322
|
+
e ? t?.setFontSize(e).run() : t?.unsetFontSize().run();
|
|
323
|
+
}
|
|
324
|
+
function W(e) {
|
|
325
|
+
let t = r.editor?.chain().focus();
|
|
326
|
+
e ? t?.setColor(e).run() : t?.unsetColor().run();
|
|
327
|
+
}
|
|
328
|
+
function G() {
|
|
329
|
+
return r.editor?.getAttributes("paragraph").lineHeight || "";
|
|
330
|
+
}
|
|
331
|
+
function K(e) {
|
|
332
|
+
let t = r.editor?.chain().focus();
|
|
333
|
+
e ? t?.setLineHeight(e).run() : t?.unsetLineHeight().run();
|
|
334
|
+
}
|
|
335
|
+
function q(e) {
|
|
336
|
+
let t = r.editor?.chain().focus();
|
|
337
|
+
e && e !== "normal" ? t?.setLetterSpacing(e).run() : t?.unsetLetterSpacing().run();
|
|
338
|
+
}
|
|
339
|
+
function J() {
|
|
340
|
+
return r.editor?.getAttributes("highlight").color || "";
|
|
341
|
+
}
|
|
342
|
+
function Y(e) {
|
|
343
|
+
let t = r.editor?.chain().focus();
|
|
344
|
+
e ? t?.setHighlight({ color: e }).run() : t?.unsetHighlight().run();
|
|
345
|
+
}
|
|
346
|
+
return (n, r) => h(x) && !w.value ? (i(), p(f, {
|
|
347
|
+
key: 0,
|
|
348
|
+
to: h(x)
|
|
349
|
+
}, [l("div", {
|
|
350
|
+
"data-tpl-theme": h(c),
|
|
351
|
+
role: "toolbar",
|
|
352
|
+
"aria-label": h(T).paragraphEditor.toolbar,
|
|
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",
|
|
354
|
+
style: t({
|
|
355
|
+
...h(s),
|
|
356
|
+
top: `${e.toolbarPosition.top}px`,
|
|
357
|
+
left: `${e.toolbarPosition.left}px`,
|
|
358
|
+
transform: "translateY(-100%)",
|
|
359
|
+
flexDirection: "column"
|
|
360
|
+
})
|
|
361
|
+
}, [!e.isLoading && e.editor ? (i(), u(g, { key: 0 }, [l("div", xe, [
|
|
362
|
+
d(Q, {
|
|
363
|
+
"model-value": P("fontFamily"),
|
|
364
|
+
options: h(A),
|
|
365
|
+
label: h(T).paragraphEditor.fontFamily,
|
|
366
|
+
placeholder: h(T).paragraphEditor.defaultFont,
|
|
367
|
+
"width-class": "tpl:w-32",
|
|
368
|
+
"onUpdate:modelValue": F
|
|
369
|
+
}, null, 8, [
|
|
370
|
+
"model-value",
|
|
371
|
+
"options",
|
|
372
|
+
"label",
|
|
373
|
+
"placeholder"
|
|
374
|
+
]),
|
|
375
|
+
d(Q, {
|
|
376
|
+
"model-value": P("fontSize"),
|
|
377
|
+
options: h(ue),
|
|
378
|
+
label: h(T).paragraphEditor.fontSize,
|
|
379
|
+
placeholder: h(T).paragraphEditor.defaultSize,
|
|
380
|
+
"width-class": "tpl:w-20",
|
|
381
|
+
"onUpdate:modelValue": H
|
|
382
|
+
}, null, 8, [
|
|
383
|
+
"model-value",
|
|
384
|
+
"options",
|
|
385
|
+
"label",
|
|
386
|
+
"placeholder"
|
|
387
|
+
]),
|
|
388
|
+
d(Z),
|
|
389
|
+
l("div", Se, [l("input", {
|
|
390
|
+
type: "color",
|
|
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",
|
|
392
|
+
value: P("color") || h("#000000"),
|
|
393
|
+
"aria-label": h(T).paragraphEditor.textColor,
|
|
394
|
+
title: h(T).paragraphEditor.textColor,
|
|
395
|
+
onInput: r[0] ||= (e) => W(e.target.value)
|
|
396
|
+
}, null, 40, Ce)]),
|
|
397
|
+
l("div", we, [l("input", {
|
|
398
|
+
type: "color",
|
|
399
|
+
class: "tpl:size-8 tpl:cursor-pointer tpl:rounded tpl:border tpl:border-[var(--tpl-border)] tpl:p-1",
|
|
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,
|
|
404
|
+
onInput: r[1] ||= (e) => Y(e.target.value)
|
|
405
|
+
}, null, 44, Te)]),
|
|
406
|
+
d(Z),
|
|
407
|
+
d(X, {
|
|
408
|
+
icon: h(j),
|
|
409
|
+
label: h(T).paragraphEditor.bold,
|
|
410
|
+
active: e.editor.isActive("bold"),
|
|
411
|
+
"stroke-width": 2.5,
|
|
412
|
+
onClick: r[2] ||= (t) => e.editor.chain().focus().toggleBold().run()
|
|
413
|
+
}, null, 8, [
|
|
414
|
+
"icon",
|
|
415
|
+
"label",
|
|
416
|
+
"active"
|
|
417
|
+
]),
|
|
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()
|
|
423
|
+
}, null, 8, [
|
|
424
|
+
"icon",
|
|
425
|
+
"label",
|
|
426
|
+
"active"
|
|
427
|
+
]),
|
|
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()
|
|
433
|
+
}, null, 8, [
|
|
434
|
+
"icon",
|
|
435
|
+
"label",
|
|
436
|
+
"active"
|
|
437
|
+
]),
|
|
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()
|
|
443
|
+
}, null, 8, [
|
|
444
|
+
"icon",
|
|
445
|
+
"label",
|
|
446
|
+
"active"
|
|
447
|
+
]),
|
|
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()
|
|
454
|
+
}, null, 8, [
|
|
455
|
+
"icon",
|
|
456
|
+
"label",
|
|
457
|
+
"active"
|
|
458
|
+
]),
|
|
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()
|
|
464
|
+
}, null, 8, [
|
|
465
|
+
"icon",
|
|
466
|
+
"label",
|
|
467
|
+
"active"
|
|
468
|
+
]),
|
|
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")
|
|
475
|
+
}, null, 8, [
|
|
476
|
+
"icon",
|
|
477
|
+
"label",
|
|
478
|
+
"active"
|
|
479
|
+
])
|
|
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()
|
|
486
|
+
}, null, 8, [
|
|
487
|
+
"icon",
|
|
488
|
+
"label",
|
|
489
|
+
"active"
|
|
490
|
+
]),
|
|
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()
|
|
496
|
+
}, null, 8, [
|
|
497
|
+
"icon",
|
|
498
|
+
"label",
|
|
499
|
+
"active"
|
|
500
|
+
]),
|
|
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()
|
|
507
|
+
}, null, 8, [
|
|
508
|
+
"icon",
|
|
509
|
+
"label",
|
|
510
|
+
"active"
|
|
511
|
+
]),
|
|
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()
|
|
517
|
+
}, null, 8, [
|
|
518
|
+
"icon",
|
|
519
|
+
"label",
|
|
520
|
+
"active"
|
|
521
|
+
]),
|
|
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()
|
|
527
|
+
}, null, 8, [
|
|
528
|
+
"icon",
|
|
529
|
+
"label",
|
|
530
|
+
"active"
|
|
531
|
+
]),
|
|
532
|
+
d(Z),
|
|
533
|
+
d(Q, {
|
|
534
|
+
"model-value": G(),
|
|
535
|
+
options: h(L),
|
|
536
|
+
label: h(T).paragraphEditor.lineHeight,
|
|
537
|
+
placeholder: "LH",
|
|
538
|
+
"width-class": "tpl:w-16",
|
|
539
|
+
"onUpdate:modelValue": K
|
|
540
|
+
}, null, 8, [
|
|
541
|
+
"model-value",
|
|
542
|
+
"options",
|
|
543
|
+
"label"
|
|
544
|
+
]),
|
|
545
|
+
d(Q, {
|
|
546
|
+
"model-value": P("letterSpacing"),
|
|
547
|
+
options: h(I),
|
|
548
|
+
label: h(T).paragraphEditor.letterSpacing,
|
|
549
|
+
placeholder: "LS",
|
|
550
|
+
"width-class": "tpl:w-20",
|
|
551
|
+
"onUpdate:modelValue": q
|
|
552
|
+
}, null, 8, [
|
|
553
|
+
"model-value",
|
|
554
|
+
"options",
|
|
555
|
+
"label"
|
|
556
|
+
]),
|
|
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()
|
|
562
|
+
}, null, 8, ["icon", "label"]),
|
|
563
|
+
d(Z),
|
|
564
|
+
d(me, { onInsert: N }),
|
|
565
|
+
e.canRequestMergeTag ? (i(), u(g, { key: 0 }, [d(Z), l("button", {
|
|
566
|
+
type: "button",
|
|
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)]",
|
|
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), {
|
|
572
|
+
size: 16,
|
|
573
|
+
"stroke-width": 2
|
|
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", {
|
|
576
|
+
type: "button",
|
|
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)]",
|
|
578
|
+
"aria-label": h(T).logicTag.insert,
|
|
579
|
+
title: h(T).logicTag.insert,
|
|
580
|
+
"data-testid": "insert-logic-button",
|
|
581
|
+
onClick: r[16] ||= (e) => o("add-logic-tag")
|
|
582
|
+
}, [d(h(ie), {
|
|
583
|
+
size: 16,
|
|
584
|
+
"stroke-width": 2
|
|
585
|
+
}), m(" " + a(h(T).logicTag.insertShort), 1)], 8, Oe)], 64)) : v("", !0)
|
|
586
|
+
])], 64)) : (i(), u("div", ke, [d(h(oe), {
|
|
587
|
+
class: "tpl-spinner",
|
|
588
|
+
size: 14,
|
|
589
|
+
"stroke-width": 2
|
|
590
|
+
}), m(" " + a(h(T).errors.editorLoading), 1)]))], 12, $)], 8, ["to"])) : v("", !0);
|
|
591
|
+
}
|
|
592
|
+
}), je = { class: "tpl-text-editor-wrapper tpl:relative" }, Me = /* @__PURE__ */ c({
|
|
593
|
+
__name: "ParagraphEditor",
|
|
594
|
+
props: {
|
|
595
|
+
block: {},
|
|
596
|
+
toolbarPosition: {}
|
|
597
|
+
},
|
|
598
|
+
emits: ["done"],
|
|
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"),
|
|
604
|
+
editorName: "ParagraphEditor",
|
|
605
|
+
async loadExtensions({ mergeTags: e, syntax: t, triggerChar: n, autocompleteEnabled: r, suggestionEmptyText: i }) {
|
|
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")
|
|
619
|
+
]);
|
|
620
|
+
return {
|
|
621
|
+
TiptapEditor: o,
|
|
622
|
+
EC: s,
|
|
623
|
+
extensions: [
|
|
624
|
+
c.configure({
|
|
625
|
+
heading: !1,
|
|
626
|
+
codeBlock: !1,
|
|
627
|
+
blockquote: !1,
|
|
628
|
+
horizontalRule: !1
|
|
629
|
+
}),
|
|
630
|
+
u,
|
|
631
|
+
d,
|
|
632
|
+
f,
|
|
633
|
+
l.configure({
|
|
634
|
+
openOnClick: !1,
|
|
635
|
+
HTMLAttributes: {
|
|
636
|
+
target: "_blank",
|
|
637
|
+
rel: "noopener noreferrer"
|
|
638
|
+
}
|
|
639
|
+
}),
|
|
640
|
+
p.configure({ types: ["paragraph"] }),
|
|
641
|
+
m,
|
|
642
|
+
h,
|
|
643
|
+
g,
|
|
644
|
+
_.configure({ multicolor: !0 }),
|
|
645
|
+
x,
|
|
646
|
+
S,
|
|
647
|
+
C,
|
|
648
|
+
v.configure({
|
|
649
|
+
mergeTags: e,
|
|
650
|
+
syntax: t
|
|
651
|
+
}),
|
|
652
|
+
b.configure({ syntax: t }),
|
|
653
|
+
...r && n && e.length > 0 ? [y.configure({
|
|
654
|
+
mergeTags: e,
|
|
655
|
+
char: n,
|
|
656
|
+
emptyText: i,
|
|
657
|
+
popoverRoot: a
|
|
658
|
+
})] : []
|
|
659
|
+
]
|
|
660
|
+
};
|
|
661
|
+
}
|
|
662
|
+
});
|
|
663
|
+
return (t, n) => (i(), u("div", je, [
|
|
664
|
+
d(Ae, {
|
|
665
|
+
editor: h(s),
|
|
666
|
+
"toolbar-position": e.toolbarPosition,
|
|
667
|
+
"is-loading": h(l),
|
|
668
|
+
"can-request-merge-tag": h(v),
|
|
669
|
+
"can-insert-logic-tag": h(y),
|
|
670
|
+
onOpenLinkDialog: h(b),
|
|
671
|
+
onAddMergeTag: h(E),
|
|
672
|
+
onAddLogicTag: h(D)
|
|
673
|
+
}, null, 8, [
|
|
674
|
+
"editor",
|
|
675
|
+
"toolbar-position",
|
|
676
|
+
"is-loading",
|
|
677
|
+
"can-request-merge-tag",
|
|
678
|
+
"can-insert-logic-tag",
|
|
679
|
+
"onOpenLinkDialog",
|
|
680
|
+
"onAddMergeTag",
|
|
681
|
+
"onAddLogicTag"
|
|
682
|
+
]),
|
|
683
|
+
d(P, {
|
|
684
|
+
editor: h(s),
|
|
685
|
+
"editor-content": h(c),
|
|
686
|
+
"is-loading": h(l),
|
|
687
|
+
"init-error": h(f),
|
|
688
|
+
onRetry: h(p)
|
|
689
|
+
}, null, 8, [
|
|
690
|
+
"editor",
|
|
691
|
+
"editor-content",
|
|
692
|
+
"is-loading",
|
|
693
|
+
"init-error",
|
|
694
|
+
"onRetry"
|
|
695
|
+
]),
|
|
696
|
+
d(N, {
|
|
697
|
+
visible: h(m),
|
|
698
|
+
"is-editing-link": h(s)?.isActive("link") ?? !1,
|
|
699
|
+
"dialog-ref": h(_),
|
|
700
|
+
"onUpdate:dialogRef": n[0] ||= (e) => o(_) ? _.value = e : null,
|
|
701
|
+
"link-url": h(g),
|
|
702
|
+
"onUpdate:linkUrl": n[1] ||= (e) => o(g) ? g.value = e : null,
|
|
703
|
+
onClose: h(C),
|
|
704
|
+
onInsert: h(x),
|
|
705
|
+
onRemove: h(S),
|
|
706
|
+
onKeydown: h(T)
|
|
707
|
+
}, null, 8, [
|
|
708
|
+
"visible",
|
|
709
|
+
"is-editing-link",
|
|
710
|
+
"dialog-ref",
|
|
711
|
+
"link-url",
|
|
712
|
+
"onClose",
|
|
713
|
+
"onInsert",
|
|
714
|
+
"onRemove",
|
|
715
|
+
"onKeydown"
|
|
716
|
+
])
|
|
717
|
+
]));
|
|
718
|
+
}
|
|
719
|
+
});
|
|
720
|
+
//#endregion
|
|
721
|
+
export { Me as default };
|