@templatical/editor 0.15.1 → 0.16.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/README.md +1 -1
- package/dist/{AiChatSidebar-BIKvYREk.js → AiChatSidebar-EaPCeDXr.js} +14 -14
- package/dist/{AiFeatureMenu-CU6kTMTf.js → AiFeatureMenu-Rb8G3EBo.js} +7 -7
- package/dist/{BlockIssueBadge-B3xVgMTh.js → BlockIssueBadge-CZYgn-qg.js} +5 -5
- package/dist/{CloudEditor-DRPxvUEj.js → CloudEditor-D88gLBXp.js} +25 -25
- package/dist/{CollaboratorBar-DMSjd3HZ.js → CollaboratorBar-dxCD8jSi.js} +4 -4
- package/dist/ColorPicker-CAgMCX3A.js +442 -0
- package/dist/{CommentsSidebar-D_tSGvTX.js → CommentsSidebar-DDKiFsSq.js} +13 -13
- package/dist/{CountdownBlock-apiYUhkQ.js → CountdownBlock-173fiO5Z.js} +3 -3
- package/dist/{CountdownToolbar-CS0axcjz.js → CountdownToolbar-8XVTOuGX.js} +4 -4
- package/dist/{DesignReferenceSidebar-DWYK9nTk.js → DesignReferenceSidebar-D6TfC176.js} +11 -11
- package/dist/{IssuesPanel-CR1MPaDE.js → IssuesPanel-CQQipLQP.js} +8 -8
- package/dist/{LoadingTrack-DsecR8Rw.js → LoadingTrack-KIcREPlS.js} +1 -1
- package/dist/{MergeTagSuggestion-CH2SUxBo.js → MergeTagSuggestion-DrT3LiZ4.js} +4 -4
- package/dist/{ModuleBrowserModal-BOzleijA.js → ModuleBrowserModal-l4_RCC8m.js} +11 -11
- package/dist/{ModulePreviewCanvas-Cg99Pbde.js → ModulePreviewCanvas-BqYAr4fz.js} +3 -3
- package/dist/NumberWithSuffix-Di-cDy_m.js +89 -0
- package/dist/{ParagraphEditor-8jnzoL0A.js → ParagraphEditor-DIQ1jmSP.js} +230 -195
- package/dist/{RichTextEditorContent-BqLHIZY7.js → RichTextEditorContent-DkTJ6KK8.js} +56 -45
- package/dist/{SaveModuleDialog-Cy2XyjYT.js → SaveModuleDialog-DPo3Raon.js} +8 -8
- package/dist/{SnapshotHistory-cfxmOsJu.js → SnapshotHistory-m7brKV7C.js} +10 -10
- package/dist/{TemplateScoringPanel-CZ62rGHz.js → TemplateScoringPanel-C8VOC6gn.js} +15 -15
- package/dist/{TestEmailModal-sr1MaMVX.js → TestEmailModal-BE9sFEIl.js} +6 -6
- package/dist/{TitleEditor-CvGTprIg.js → TitleEditor-BATN-k-Q.js} +38 -35
- package/dist/{TplModal-BtKB-0Bx.js → TplModal-DHBcZ1gq.js} +5 -5
- package/dist/{blockTypeIcons-BxEbbev5.js → blockTypeIcons-wRchKKx0.js} +7 -7
- package/dist/bundle-stats.json +7 -7
- package/dist/ca-B3eR47lE.js +559 -0
- package/dist/cdn/chunks/{AiFeatureMenu-fDUpv_-s.js → AiFeatureMenu-W7VQFAwq.js} +6 -6
- package/dist/cdn/chunks/{AiFeatureMenu-fDUpv_-s.js.map → AiFeatureMenu-W7VQFAwq.js.map} +1 -1
- package/dist/cdn/chunks/{BlockIssueBadge-Byce0j0W.js → BlockIssueBadge-ww2vNIfJ.js} +5 -5
- package/dist/cdn/chunks/{BlockIssueBadge-Byce0j0W.js.map → BlockIssueBadge-ww2vNIfJ.js.map} +1 -1
- package/dist/cdn/chunks/{CloudEditor-B4m8ldiE.js → CloudEditor-BVSJ1kvB.js} +161 -161
- package/dist/cdn/chunks/{CloudEditor-B4m8ldiE.js.map → CloudEditor-BVSJ1kvB.js.map} +1 -1
- package/dist/cdn/chunks/{CollaboratorBar-LnLmjxw_.js → CollaboratorBar-BFrAua9a.js} +4 -4
- package/dist/cdn/chunks/{CollaboratorBar-LnLmjxw_.js.map → CollaboratorBar-BFrAua9a.js.map} +1 -1
- package/dist/cdn/chunks/ColorPicker-DmxMDn-t.js +439 -0
- package/dist/cdn/chunks/ColorPicker-DmxMDn-t.js.map +1 -0
- package/dist/cdn/chunks/{CountdownBlock-DxTuMRBM.js → CountdownBlock-MC-mhtQD.js} +3 -3
- package/dist/cdn/chunks/{CountdownBlock-DxTuMRBM.js.map → CountdownBlock-MC-mhtQD.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownToolbar-DUrVfQZH.js → CountdownToolbar-dXyr7tz-.js} +5 -5
- package/dist/cdn/chunks/{CountdownToolbar-DUrVfQZH.js.map → CountdownToolbar-dXyr7tz-.js.map} +1 -1
- package/dist/cdn/chunks/{IssuesPanel-CHl90k4h.js → IssuesPanel-CTxSgViL.js} +8 -8
- package/dist/cdn/chunks/{IssuesPanel-CHl90k4h.js.map → IssuesPanel-CTxSgViL.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagSuggestion-BsCAo4Co.js → MergeTagSuggestion-jesxS7An.js} +3 -3
- package/dist/cdn/chunks/{MergeTagSuggestion-BsCAo4Co.js.map → MergeTagSuggestion-jesxS7An.js.map} +1 -1
- package/dist/cdn/chunks/{ModuleBrowserModal-DW0iQW0J.js → ModuleBrowserModal-B5sCsrud.js} +9 -9
- package/dist/cdn/chunks/{ModuleBrowserModal-DW0iQW0J.js.map → ModuleBrowserModal-B5sCsrud.js.map} +1 -1
- package/dist/cdn/chunks/{ModulePreviewCanvas-Cxo8v8t1.js → ModulePreviewCanvas-DGTGo8kg.js} +11 -11
- package/dist/cdn/chunks/{ModulePreviewCanvas-Cxo8v8t1.js.map → ModulePreviewCanvas-DGTGo8kg.js.map} +1 -1
- package/dist/cdn/chunks/NumberWithSuffix-tAHfui6k.js +91 -0
- package/dist/cdn/chunks/NumberWithSuffix-tAHfui6k.js.map +1 -0
- package/dist/cdn/chunks/{ParagraphEditor-iG5cDjH0.js → ParagraphEditor-CB5FGRs3.js} +213 -179
- package/dist/cdn/chunks/ParagraphEditor-CB5FGRs3.js.map +1 -0
- package/dist/cdn/chunks/{RichTextEditorContent-DQpgeGMj.js → RichTextEditorContent-CPelbtck.js} +53 -42
- package/dist/cdn/chunks/RichTextEditorContent-CPelbtck.js.map +1 -0
- package/dist/cdn/chunks/{SaveModuleDialog-sJQXg2Mh.js → SaveModuleDialog-7f9uUUEC.js} +6 -6
- package/dist/cdn/chunks/{SaveModuleDialog-sJQXg2Mh.js.map → SaveModuleDialog-7f9uUUEC.js.map} +1 -1
- package/dist/cdn/chunks/{TitleEditor-C8qIn9Oi.js → TitleEditor-C0mYpgs4.js} +46 -43
- package/dist/cdn/chunks/TitleEditor-C0mYpgs4.js.map +1 -0
- package/dist/cdn/chunks/{blockTypeIcons-DySnOpPo.js → blockTypeIcons-BtxaUtlx.js} +5 -5
- package/dist/cdn/chunks/{blockTypeIcons-DySnOpPo.js.map → blockTypeIcons-BtxaUtlx.js.map} +1 -1
- package/dist/cdn/chunks/ca-B3eR47lE.js +561 -0
- package/dist/cdn/chunks/ca-B3eR47lE.js.map +1 -0
- package/dist/cdn/chunks/ca-CNRWAMHI.js +89 -0
- package/dist/cdn/chunks/ca-CNRWAMHI.js.map +1 -0
- package/dist/{de-LsV0u1tP.js → cdn/chunks/de-Cy8FB-Ii.js} +7 -1
- package/dist/cdn/chunks/de-Cy8FB-Ii.js.map +1 -0
- package/dist/cdn/chunks/{draggable-kG-D5Xsm.js → draggable-D840DIZB.js} +52 -39
- package/dist/cdn/chunks/draggable-D840DIZB.js.map +1 -0
- package/dist/{en-Bb8X1bOs.js → cdn/chunks/en-Bu-zS_5o.js} +7 -1
- package/dist/cdn/chunks/en-Bu-zS_5o.js.map +1 -0
- package/dist/cdn/chunks/es-CD3ZD6hK.js +561 -0
- package/dist/cdn/chunks/es-CD3ZD6hK.js.map +1 -0
- package/dist/cdn/chunks/es-OgkdMZGX.js +89 -0
- package/dist/cdn/chunks/es-OgkdMZGX.js.map +1 -0
- package/dist/cdn/chunks/{extensions-C2pTX899.js → extensions-BJ7vaBol.js} +28 -28
- package/dist/cdn/chunks/{extensions-C2pTX899.js.map → extensions-BJ7vaBol.js.map} +1 -1
- package/dist/cdn/chunks/{features-CHE3YjQE.js → features-CgbSSCgv.js} +602 -566
- package/dist/cdn/chunks/features-CgbSSCgv.js.map +1 -0
- package/dist/cdn/chunks/{icons-M4uqBV-_.js → icons-Dlx5MT1V.js} +2 -2
- package/dist/cdn/chunks/{icons-M4uqBV-_.js.map → icons-Dlx5MT1V.js.map} +1 -1
- package/dist/cdn/chunks/{media-library-Bqr15VN2.js → media-library-BMlykZGq.js} +104 -104
- package/dist/cdn/chunks/{media-library-Bqr15VN2.js.map → media-library-BMlykZGq.js.map} +1 -1
- package/dist/{pt-BR-BwJY_cvb.js → cdn/chunks/pt-BR-CgICL-CQ.js} +7 -1
- package/dist/cdn/chunks/pt-BR-CgICL-CQ.js.map +1 -0
- package/dist/cdn/chunks/quality-DsVgXk_j.js +2180 -0
- package/dist/cdn/chunks/quality-DsVgXk_j.js.map +1 -0
- package/dist/cdn/chunks/{renderer-CyzTR1Vq.js → renderer-DPvEtVGO.js} +35 -38
- package/dist/cdn/chunks/renderer-DPvEtVGO.js.map +1 -0
- package/dist/cdn/chunks/{src-q-SBgWx7.js → src-CAdirukY.js} +109 -112
- package/dist/cdn/chunks/{src-q-SBgWx7.js.map → src-CAdirukY.js.map} +1 -1
- package/dist/cdn/chunks/{styles-PWISdaws.js → styles-D7u4vCpH.js} +877 -856
- package/dist/cdn/chunks/styles-D7u4vCpH.js.map +1 -0
- package/dist/cdn/chunks/{tiptap-DF9PEiqH.js → tiptap-zpXk5mN4.js} +3278 -4992
- package/dist/cdn/chunks/tiptap-zpXk5mN4.js.map +1 -0
- package/dist/cdn/editor.css +1 -1
- package/dist/cdn/editor.js +75 -73
- package/dist/cdn/editor.js.map +1 -1
- package/dist/{check-rl7ok6uJ.js → check-D1zYtCPK.js} +1 -1
- package/dist/{chevron-down-BKe__NOD.js → chevron-down-ByXpufZD.js} +1 -1
- package/dist/{circle-alert-C8xmpMsK.js → circle-alert-CjcAORUw.js} +1 -1
- package/dist/{clock-BW4JuDCN.js → clock-5lWLadUn.js} +1 -1
- package/dist/{cloud-BQusL53H.js → cloud-BogxOeZu.js} +2 -2
- package/dist/{createLucideIcon-Dx-EjR9r.js → createLucideIcon-Bh9xOmlW.js} +3 -3
- package/dist/{cdn/chunks/de-LsV0u1tP.js → de-Cy8FB-Ii.js} +5 -3
- package/dist/dist-BE9m_i60.js +5 -0
- package/dist/{dist-BFmE-7hB.js → dist-BPPeDw62.js} +2 -2
- package/dist/{dist-BsCGIDSt.js → dist-BReUTadj.js} +4 -4
- package/dist/dist-BXR1aBJV.js +5 -0
- package/dist/{dist-CRsjOQM-.js → dist-Bm07Z3Es.js} +2 -2
- package/dist/{dist-BEWiuOMi.js → dist-CFOQvhSC.js} +3 -3
- package/dist/{dist-B5Sov3sS.js → dist-CHLoeloJ.js} +2 -2
- package/dist/{dist-COG3IdPK.js → dist-D1WmF8BF.js} +2 -2
- package/dist/{dist-itdjZraK.js → dist-D9g4CSnm.js} +1 -1
- package/dist/{dist-BMoa33wT.js → dist-DGEaAAIb.js} +2 -2
- package/dist/{dist-CTT6WYJ6.js → dist-DYv_Pttj.js} +2 -2
- package/dist/{dist-CQZxDvFw.js → dist-DcKlLQ8d.js} +2 -2
- package/dist/{dist-SXJJ2v41.js → dist-DhY2di4U.js} +2 -2
- package/dist/{dist-BibU4HNl.js → dist-DoRIUsfz.js} +2 -3
- package/dist/dist-i_Z7t67A.js +2594 -0
- package/dist/{cdn/chunks/en-Bb8X1bOs.js → en-Bu-zS_5o.js} +5 -3
- package/dist/es-CD3ZD6hK.js +559 -0
- package/dist/{extensions-DwaZAqm6.js → extensions-B2poxDIo.js} +8 -8
- package/dist/{image-up-BwBCmQ4P.js → image-up-Bj_nes3f.js} +1 -1
- package/dist/{info-TCn7uWR5.js → info-BhSQCxBV.js} +1 -1
- package/dist/{keys-Cv8-8GsD.js → keys-BbDgCU6K.js} +1 -1
- package/dist/{list-checks-CSrOWNgq.js → list-checks-CgxyUg7i.js} +1 -1
- package/dist/{loader-circle-BLmicnPG.js → loader-circle-DFU0HPAa.js} +1 -1
- package/dist/{message-circle-C9hHMQCI.js → message-circle-BEBsCHnk.js} +1 -1
- package/dist/{cdn/chunks/pt-BR-BwJY_cvb.js → pt-BR-CgICL-CQ.js} +5 -3
- package/dist/{refresh-cw-D1JQ1LNa.js → refresh-cw--lvWGy0_.js} +1 -1
- package/dist/{runtime-dom.esm-bundler-BzuoCyNp.js → runtime-dom.esm-bundler-GdMI8WqG.js} +6 -7
- package/dist/{scan-line-DgijVq9y.js → scan-line-QgyDIgn_.js} +1 -1
- package/dist/{send-DjPdq69F.js → send-BMyisUim.js} +1 -1
- package/dist/{shield-check-Bqluu8FS.js → shield-check-C49M20le.js} +1 -1
- package/dist/{sparkles-M4azPVSP.js → sparkles-DV7Dman6.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/{styles-B2OrgEnn.js → styles-B-yhoJnH.js} +537 -516
- package/dist/templatical-editor.js +62 -60
- package/dist/{text-align-start-CMya5pCQ.js → text-align-start-BMU70uAm.js} +1 -1
- package/dist/{trash-2-C-81rkLS.js → trash-2-B6M659Ey.js} +1 -1
- package/dist/{triangle-alert-BuRWnynk.js → triangle-alert-D1lzx6ds.js} +1 -1
- package/dist/{upload-CWBIoLd4.js → upload-3A1oZtOR.js} +1 -1
- package/dist/{useAliveFlag-CECL_OUb.js → useAliveFlag-C43EhZFY.js} +1 -1
- package/dist/{useCloudI18n-AKCy98qD.js → useCloudI18n-WbfVWq5k.js} +2 -2
- package/dist/{useEditorCore-DJeOXVxQ.js → useEditorCore-CV1ct_17.js} +628 -591
- package/dist/{useI18n-C-TDeJBt.js → useI18n-eR1yVW0v.js} +2 -2
- package/dist/{useMergeTag-DSrBY0-2.js → useMergeTag-C3GfSktg.js} +3 -3
- package/dist/usePopoverRoot-C1j0D7cc.js +8 -0
- package/dist/{vue.runtime.esm-bundler-l0XAqiyv.js → vue.runtime.esm-bundler-B0xoGkDv.js} +84 -70
- package/dist/{x-CQSvXnGR.js → x-CG_NV3nP.js} +1 -1
- package/package.json +23 -23
- package/dist/NumberWithSuffix-CrA6quxx.js +0 -445
- package/dist/cdn/chunks/NumberWithSuffix-CnSRmUMK.js +0 -444
- package/dist/cdn/chunks/NumberWithSuffix-CnSRmUMK.js.map +0 -1
- package/dist/cdn/chunks/ParagraphEditor-iG5cDjH0.js.map +0 -1
- package/dist/cdn/chunks/RichTextEditorContent-DQpgeGMj.js.map +0 -1
- package/dist/cdn/chunks/TitleEditor-C8qIn9Oi.js.map +0 -1
- package/dist/cdn/chunks/de-LsV0u1tP.js.map +0 -1
- package/dist/cdn/chunks/draggable-kG-D5Xsm.js.map +0 -1
- package/dist/cdn/chunks/en-Bb8X1bOs.js.map +0 -1
- package/dist/cdn/chunks/features-CHE3YjQE.js.map +0 -1
- package/dist/cdn/chunks/pt-BR-BwJY_cvb.js.map +0 -1
- package/dist/cdn/chunks/quality-DJZ_fqc2.js +0 -2176
- package/dist/cdn/chunks/quality-DJZ_fqc2.js.map +0 -1
- package/dist/cdn/chunks/renderer-CyzTR1Vq.js.map +0 -1
- package/dist/cdn/chunks/styleConstants-lGobwiLH.js +0 -57
- package/dist/cdn/chunks/styleConstants-lGobwiLH.js.map +0 -1
- package/dist/cdn/chunks/styles-PWISdaws.js.map +0 -1
- package/dist/cdn/chunks/tiptap-DF9PEiqH.js.map +0 -1
- package/dist/dist-CNLKj9wa.js +0 -5
- package/dist/dist-CNXDNYQn.js +0 -4311
- package/dist/dist-Cqa6aeAJ.js +0 -5
- package/dist/styleConstants-lGobwiLH.js +0 -55
- package/dist/usePopoverRoot-DKUDnr55.js +0 -8
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { K as e, L as t, M as n, P as r, T as i, Z as a, c as o, ct as s, d as c, f as l, g as u, h as d, it as f, l as p, m, ot as h, p as g, st as _, u as v, v as y, x as b, y as x } from "./draggable-
|
|
2
|
-
import { $t as S,
|
|
3
|
-
import { B as
|
|
4
|
-
import {
|
|
5
|
-
import { n as
|
|
1
|
+
import { K as e, L as t, M as n, P as r, T as i, Z as a, c as o, ct as s, d as c, f as l, g as u, h as d, it as f, l as p, m, ot as h, p as g, st as _, u as v, v as y, x as b, y as x } from "./draggable-D840DIZB.js";
|
|
2
|
+
import { $t as S, Qt as C, Rt as w, X as T, Z as E, Zt as D, at as O, ct as k, dn as A, en as ee, k as j, ln as te, ot as M, sn as ne, tt as N, un as re, xt as ie } from "./features-CgbSSCgv.js";
|
|
3
|
+
import { B as ae, C as oe, H as se, L as ce, R as le, X as ue, Z as de, b as fe, c as pe, d as me, f as he, g as P, i as ge, l as _e, o as ve, s as F } from "./icons-Dlx5MT1V.js";
|
|
4
|
+
import { c as ye, o as be, s as xe } from "./ColorPicker-DmxMDn-t.js";
|
|
5
|
+
import { n as I, t as L } from "./RichTextEditorContent-CPelbtck.js";
|
|
6
6
|
//#region src/components/blocks/EmojiPickerDropdown.vue?vue&type=script&setup=true&lang.ts
|
|
7
|
-
var
|
|
7
|
+
var R = [
|
|
8
8
|
"aria-label",
|
|
9
9
|
"title",
|
|
10
10
|
"aria-expanded"
|
|
11
|
-
],
|
|
11
|
+
], z = ["aria-label"], B = { class: "tpl:mb-1.5 tpl:text-[10px] tpl:font-medium tpl:tracking-wide tpl:text-[var(--tpl-text-muted)] tpl:uppercase" }, V = { class: "tpl:grid tpl:grid-cols-10 tpl:gap-0.5" }, H = ["aria-label", "onClick"], Se = /* @__PURE__ */ b({
|
|
12
12
|
__name: "EmojiPickerDropdown",
|
|
13
13
|
emits: ["insert"],
|
|
14
14
|
setup(e, { emit: t }) {
|
|
15
|
-
let i = t, { categories: c, isOpen: m, toggle: _, close: y } =
|
|
16
|
-
|
|
15
|
+
let i = t, { categories: c, isOpen: m, toggle: _, close: y } = N(), { t: b, format: S } = w(), C = a(null), T = a(null);
|
|
16
|
+
O(C, l(() => m.value)), A(T, () => {
|
|
17
17
|
m.value && y();
|
|
18
18
|
});
|
|
19
19
|
function E(e) {
|
|
@@ -32,14 +32,14 @@ var U = [
|
|
|
32
32
|
"aria-haspopup": "dialog",
|
|
33
33
|
"aria-controls": "tpl-emoji-picker",
|
|
34
34
|
onClick: t[0] ||= (...e) => f(_) && f(_)(...e)
|
|
35
|
-
}, [x(f(
|
|
35
|
+
}, [x(f(P), {
|
|
36
36
|
size: 16,
|
|
37
37
|
"stroke-width": 2
|
|
38
|
-
})], 10,
|
|
38
|
+
})], 10, R), f(m) ? (n(), u("div", {
|
|
39
39
|
key: 0,
|
|
40
40
|
id: "tpl-emoji-picker",
|
|
41
41
|
ref_key: "pickerRef",
|
|
42
|
-
ref:
|
|
42
|
+
ref: C,
|
|
43
43
|
role: "dialog",
|
|
44
44
|
"aria-modal": "false",
|
|
45
45
|
"aria-label": f(b).paragraphEditor.insertEmoji,
|
|
@@ -49,19 +49,19 @@ var U = [
|
|
|
49
49
|
}, [(n(!0), u(v, null, r(f(c), (e) => (n(), u("div", {
|
|
50
50
|
key: e.key,
|
|
51
51
|
class: "tpl:mb-2 tpl:last:mb-0"
|
|
52
|
-
}, [g("div",
|
|
52
|
+
}, [g("div", B, s(f(b).emoji[e.key]), 1), g("div", V, [(n(!0), u(v, null, r(e.emojis, (e) => (n(), u("button", {
|
|
53
53
|
key: e,
|
|
54
54
|
type: "button",
|
|
55
55
|
"aria-label": f(S)(f(b).paragraphEditor.emojiItemLabel, { emoji: e }),
|
|
56
56
|
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)]",
|
|
57
57
|
onClick: (t) => E(e)
|
|
58
|
-
}, s(e), 9,
|
|
58
|
+
}, s(e), 9, H))), 128))])]))), 128))], 40, z)) : d("", !0)], 512));
|
|
59
59
|
}
|
|
60
|
-
}),
|
|
60
|
+
}), U = [
|
|
61
61
|
"aria-label",
|
|
62
62
|
"title",
|
|
63
63
|
"aria-pressed"
|
|
64
|
-
],
|
|
64
|
+
], W = /* @__PURE__ */ b({
|
|
65
65
|
__name: "ToolbarIconButton",
|
|
66
66
|
props: {
|
|
67
67
|
icon: {},
|
|
@@ -80,20 +80,20 @@ var U = [
|
|
|
80
80
|
}, [(n(), m(t(e.icon), {
|
|
81
81
|
size: e.size ?? 16,
|
|
82
82
|
"stroke-width": e.strokeWidth ?? 2
|
|
83
|
-
}, null, 8, ["size", "stroke-width"]))], 10,
|
|
83
|
+
}, null, 8, ["size", "stroke-width"]))], 10, U));
|
|
84
84
|
}
|
|
85
|
-
}),
|
|
85
|
+
}), G = {}, K = {
|
|
86
86
|
class: "tpl:mx-1 tpl:h-6 tpl:w-px tpl:bg-[var(--tpl-border)]",
|
|
87
87
|
"aria-hidden": "true"
|
|
88
88
|
};
|
|
89
|
-
function
|
|
90
|
-
return n(), u("span",
|
|
89
|
+
function q(e, t) {
|
|
90
|
+
return n(), u("span", K);
|
|
91
91
|
}
|
|
92
|
-
var
|
|
92
|
+
var J = /*#__PURE__*/ M(G, [["render", q]]), Y = [
|
|
93
93
|
"value",
|
|
94
94
|
"aria-label",
|
|
95
95
|
"title"
|
|
96
|
-
],
|
|
96
|
+
], X = { value: "" }, Ce = ["value"], Z = /* @__PURE__ */ b({
|
|
97
97
|
__name: "ToolbarSelect",
|
|
98
98
|
props: {
|
|
99
99
|
modelValue: {},
|
|
@@ -120,23 +120,31 @@ var Z = /*#__PURE__*/ D(X, [["render", ge]]), _e = [
|
|
|
120
120
|
"aria-label": e.label,
|
|
121
121
|
title: e.label,
|
|
122
122
|
onChange: a
|
|
123
|
-
}, [g("option",
|
|
123
|
+
}, [g("option", X, s(e.placeholder ?? ""), 1), (n(!0), u(v, null, r(e.options, (e) => (n(), u("option", {
|
|
124
124
|
key: o(e),
|
|
125
125
|
value: o(e)
|
|
126
|
-
}, s(c(e)), 9,
|
|
126
|
+
}, s(c(e)), 9, Ce))), 128))], 42, Y));
|
|
127
127
|
}
|
|
128
|
-
})
|
|
128
|
+
});
|
|
129
|
+
//#endregion
|
|
130
|
+
//#region src/utils/richTextColor.ts
|
|
131
|
+
function Q(e, t) {
|
|
132
|
+
return e || t || "#000000";
|
|
133
|
+
}
|
|
134
|
+
//#endregion
|
|
135
|
+
//#region src/components/blocks/ParagraphToolbar.vue?vue&type=script&setup=true&lang.ts
|
|
136
|
+
var we = ["data-tpl-theme", "aria-label"], Te = { class: "tpl:flex tpl:items-center tpl:gap-1" }, Ee = { class: "tpl:relative" }, De = [
|
|
129
137
|
"value",
|
|
130
138
|
"aria-label",
|
|
131
139
|
"title"
|
|
132
|
-
],
|
|
140
|
+
], $ = ["aria-label", "title"], Oe = { class: "tpl:relative" }, ke = [
|
|
133
141
|
"value",
|
|
134
142
|
"aria-label",
|
|
135
143
|
"title"
|
|
136
|
-
],
|
|
144
|
+
], Ae = { class: "tpl:flex tpl:items-center tpl:gap-1" }, je = ["aria-label", "title"], Me = ["aria-label", "title"], Ne = {
|
|
137
145
|
key: 1,
|
|
138
146
|
class: "tpl:flex tpl:items-center tpl:gap-2 tpl:px-2 tpl:text-xs tpl:text-[var(--tpl-text-dim)]"
|
|
139
|
-
},
|
|
147
|
+
}, Pe = /* @__PURE__ */ b({
|
|
140
148
|
__name: "ParagraphToolbar",
|
|
141
149
|
props: {
|
|
142
150
|
editor: {},
|
|
@@ -151,24 +159,37 @@ var Z = /*#__PURE__*/ D(X, [["render", ge]]), _e = [
|
|
|
151
159
|
"add-logic-tag"
|
|
152
160
|
],
|
|
153
161
|
setup(e, { emit: t }) {
|
|
154
|
-
let r = e, a = t, o = i(ne, null), p = i(
|
|
155
|
-
function
|
|
162
|
+
let r = e, a = t, o = i(ne, null), p = i(te, null), h = re(C, "ParagraphToolbar"), b = j(), T = i(ee, null), E = i(S, null), O = i(D, null), A = l(() => (T?.isOpen.value ?? !1) || (E?.isOpen.value ?? !1)), { t: M } = w(), N = h.fonts;
|
|
163
|
+
function P(e) {
|
|
156
164
|
r.editor?.chain().focus().insertContent(e).run();
|
|
157
165
|
}
|
|
158
|
-
function
|
|
166
|
+
function I(e) {
|
|
159
167
|
return r.editor?.getAttributes("textStyle")[e] || "";
|
|
160
168
|
}
|
|
161
|
-
function
|
|
169
|
+
function L(e) {
|
|
162
170
|
let t = r.editor?.chain().focus();
|
|
163
171
|
e ? t?.setFontFamily(e).run() : t?.unsetFontFamily().run();
|
|
164
172
|
}
|
|
165
|
-
function
|
|
173
|
+
function R(e) {
|
|
166
174
|
let t = r.editor?.chain().focus();
|
|
167
175
|
e ? t?.setFontSize(e).run() : t?.unsetFontSize().run();
|
|
168
176
|
}
|
|
169
|
-
function
|
|
177
|
+
function z() {
|
|
178
|
+
return r.editor?.isActive("link") ?? !1;
|
|
179
|
+
}
|
|
180
|
+
function B() {
|
|
181
|
+
return r.editor?.getAttributes("link").color || "";
|
|
182
|
+
}
|
|
183
|
+
function V(e) {
|
|
170
184
|
let t = r.editor?.chain().focus();
|
|
171
|
-
e ? t
|
|
185
|
+
t && (z() ? (t.extendMarkRange("link").updateAttributes("link", { color: e || null }), e && t.unsetColor(), t.run()) : e ? t.setColor(e).updateAttributes("link", { color: e }).run() : t.unsetColor().run());
|
|
186
|
+
}
|
|
187
|
+
function H() {
|
|
188
|
+
let e = O?.content.value.settings;
|
|
189
|
+
return z() ? Q(B(), e?.linkColor || e?.textColor) : Q(I("color"), e?.textColor);
|
|
190
|
+
}
|
|
191
|
+
function U() {
|
|
192
|
+
return z() ? B() !== "" : I("color") !== "";
|
|
172
193
|
}
|
|
173
194
|
function G() {
|
|
174
195
|
return r.editor?.getAttributes("paragraph").lineHeight || "";
|
|
@@ -181,20 +202,20 @@ var Z = /*#__PURE__*/ D(X, [["render", ge]]), _e = [
|
|
|
181
202
|
let t = r.editor?.chain().focus();
|
|
182
203
|
e && e !== "normal" ? t?.setLetterSpacing(e).run() : t?.unsetLetterSpacing().run();
|
|
183
204
|
}
|
|
184
|
-
function
|
|
205
|
+
function Y() {
|
|
185
206
|
return r.editor?.getAttributes("highlight").color || "";
|
|
186
207
|
}
|
|
187
208
|
function X(e) {
|
|
188
209
|
let t = r.editor?.chain().focus();
|
|
189
210
|
e ? t?.setHighlight({ color: e }).run() : t?.unsetHighlight().run();
|
|
190
211
|
}
|
|
191
|
-
return (t, r) => f(b) && !
|
|
212
|
+
return (t, r) => f(b) && !A.value ? (n(), m(c, {
|
|
192
213
|
key: 0,
|
|
193
214
|
to: f(b)
|
|
194
215
|
}, [g("div", {
|
|
195
216
|
"data-tpl-theme": f(p),
|
|
196
217
|
role: "toolbar",
|
|
197
|
-
"aria-label": f(
|
|
218
|
+
"aria-label": f(M).paragraphEditor.toolbar,
|
|
198
219
|
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",
|
|
199
220
|
style: _({
|
|
200
221
|
...f(o),
|
|
@@ -203,182 +224,192 @@ var Z = /*#__PURE__*/ D(X, [["render", ge]]), _e = [
|
|
|
203
224
|
transform: "translateY(-100%)",
|
|
204
225
|
flexDirection: "column"
|
|
205
226
|
})
|
|
206
|
-
}, [!e.isLoading && e.editor ? (n(), u(v, { key: 0 }, [g("div",
|
|
207
|
-
x(
|
|
208
|
-
"model-value":
|
|
209
|
-
options: f(
|
|
210
|
-
label: f(
|
|
211
|
-
placeholder: f(
|
|
227
|
+
}, [!e.isLoading && e.editor ? (n(), u(v, { key: 0 }, [g("div", Te, [
|
|
228
|
+
x(Z, {
|
|
229
|
+
"model-value": I("fontFamily"),
|
|
230
|
+
options: f(N),
|
|
231
|
+
label: f(M).paragraphEditor.fontFamily,
|
|
232
|
+
placeholder: f(M).paragraphEditor.defaultFont,
|
|
212
233
|
"width-class": "tpl:w-32",
|
|
213
|
-
"onUpdate:modelValue":
|
|
234
|
+
"onUpdate:modelValue": L
|
|
214
235
|
}, null, 8, [
|
|
215
236
|
"model-value",
|
|
216
237
|
"options",
|
|
217
238
|
"label",
|
|
218
239
|
"placeholder"
|
|
219
240
|
]),
|
|
220
|
-
x(
|
|
221
|
-
"model-value":
|
|
222
|
-
options: f(
|
|
223
|
-
label: f(
|
|
224
|
-
placeholder: f(
|
|
241
|
+
x(Z, {
|
|
242
|
+
"model-value": I("fontSize"),
|
|
243
|
+
options: f(be),
|
|
244
|
+
label: f(M).paragraphEditor.fontSize,
|
|
245
|
+
placeholder: f(M).paragraphEditor.defaultSize,
|
|
225
246
|
"width-class": "tpl:w-20",
|
|
226
|
-
"onUpdate:modelValue":
|
|
247
|
+
"onUpdate:modelValue": R
|
|
227
248
|
}, null, 8, [
|
|
228
249
|
"model-value",
|
|
229
250
|
"options",
|
|
230
251
|
"label",
|
|
231
252
|
"placeholder"
|
|
232
253
|
]),
|
|
233
|
-
x(
|
|
234
|
-
g("div",
|
|
254
|
+
x(J),
|
|
255
|
+
g("div", Ee, [g("input", {
|
|
235
256
|
type: "color",
|
|
236
257
|
class: "tpl:size-8 tpl:cursor-pointer tpl:rounded tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:p-1",
|
|
237
|
-
value:
|
|
238
|
-
"aria-label": f(
|
|
239
|
-
title: f(
|
|
240
|
-
onInput: r[0] ||= (e) =>
|
|
241
|
-
}, null, 40,
|
|
242
|
-
|
|
258
|
+
value: H(),
|
|
259
|
+
"aria-label": f(M).paragraphEditor.textColor,
|
|
260
|
+
title: f(M).paragraphEditor.textColor,
|
|
261
|
+
onInput: r[0] ||= (e) => V(e.target.value)
|
|
262
|
+
}, null, 40, De), U() ? (n(), u("button", {
|
|
263
|
+
key: 0,
|
|
264
|
+
type: "button",
|
|
265
|
+
class: "tpl:absolute tpl:-right-1 tpl:-top-1 tpl:flex tpl:size-4 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-full tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:text-[var(--tpl-text-dim)] tpl:shadow-sm tpl:transition-colors tpl:duration-150 hover:tpl:text-[var(--tpl-text)]",
|
|
266
|
+
"aria-label": f(M).colorPicker.clear,
|
|
267
|
+
title: f(M).colorPicker.clear,
|
|
268
|
+
onClick: r[1] ||= (e) => V("")
|
|
269
|
+
}, [x(f(k), {
|
|
270
|
+
size: 10,
|
|
271
|
+
"stroke-width": 2.5
|
|
272
|
+
})], 8, $)) : d("", !0)]),
|
|
273
|
+
g("div", Oe, [g("input", {
|
|
243
274
|
type: "color",
|
|
244
275
|
class: "tpl:size-8 tpl:cursor-pointer tpl:rounded tpl:border tpl:border-[var(--tpl-border)] tpl:p-1",
|
|
245
|
-
style: _({ backgroundColor:
|
|
246
|
-
value:
|
|
247
|
-
"aria-label": f(
|
|
248
|
-
title: f(
|
|
249
|
-
onInput: r[
|
|
250
|
-
}, null, 44,
|
|
251
|
-
x(
|
|
252
|
-
x(
|
|
253
|
-
icon: f(
|
|
254
|
-
label: f(
|
|
276
|
+
style: _({ backgroundColor: Y() || "var(--tpl-bg)" }),
|
|
277
|
+
value: Y() || f("#ffff00"),
|
|
278
|
+
"aria-label": f(M).paragraphEditor.highlightColor,
|
|
279
|
+
title: f(M).paragraphEditor.highlightColor,
|
|
280
|
+
onInput: r[2] ||= (e) => X(e.target.value)
|
|
281
|
+
}, null, 44, ke)]),
|
|
282
|
+
x(J),
|
|
283
|
+
x(W, {
|
|
284
|
+
icon: f(de),
|
|
285
|
+
label: f(M).paragraphEditor.bold,
|
|
255
286
|
active: e.editor.isActive("bold"),
|
|
256
287
|
"stroke-width": 2.5,
|
|
257
|
-
onClick: r[
|
|
288
|
+
onClick: r[3] ||= (t) => e.editor.chain().focus().toggleBold().run()
|
|
258
289
|
}, null, 8, [
|
|
259
290
|
"icon",
|
|
260
291
|
"label",
|
|
261
292
|
"active"
|
|
262
293
|
]),
|
|
263
|
-
x(
|
|
264
|
-
icon: f(
|
|
265
|
-
label: f(
|
|
294
|
+
x(W, {
|
|
295
|
+
icon: f(se),
|
|
296
|
+
label: f(M).paragraphEditor.italic,
|
|
266
297
|
active: e.editor.isActive("italic"),
|
|
267
|
-
onClick: r[
|
|
298
|
+
onClick: r[4] ||= (t) => e.editor.chain().focus().toggleItalic().run()
|
|
268
299
|
}, null, 8, [
|
|
269
300
|
"icon",
|
|
270
301
|
"label",
|
|
271
302
|
"active"
|
|
272
303
|
]),
|
|
273
|
-
x(
|
|
274
|
-
icon: f(
|
|
275
|
-
label: f(
|
|
304
|
+
x(W, {
|
|
305
|
+
icon: f(ge),
|
|
306
|
+
label: f(M).paragraphEditor.underline,
|
|
276
307
|
active: e.editor.isActive("underline"),
|
|
277
|
-
onClick: r[
|
|
308
|
+
onClick: r[5] ||= (t) => e.editor.chain().focus().toggleUnderline().run()
|
|
278
309
|
}, null, 8, [
|
|
279
310
|
"icon",
|
|
280
311
|
"label",
|
|
281
312
|
"active"
|
|
282
313
|
]),
|
|
283
|
-
x(
|
|
284
|
-
icon: f(
|
|
285
|
-
label: f(
|
|
314
|
+
x(W, {
|
|
315
|
+
icon: f(me),
|
|
316
|
+
label: f(M).paragraphEditor.strikethrough,
|
|
286
317
|
active: e.editor.isActive("strike"),
|
|
287
|
-
onClick: r[
|
|
318
|
+
onClick: r[6] ||= (t) => e.editor.chain().focus().toggleStrike().run()
|
|
288
319
|
}, null, 8, [
|
|
289
320
|
"icon",
|
|
290
321
|
"label",
|
|
291
322
|
"active"
|
|
292
323
|
]),
|
|
293
|
-
x(
|
|
294
|
-
x(
|
|
295
|
-
icon: f(
|
|
296
|
-
label: f(
|
|
324
|
+
x(J),
|
|
325
|
+
x(W, {
|
|
326
|
+
icon: f(he),
|
|
327
|
+
label: f(M).paragraphEditor.subscript,
|
|
297
328
|
active: e.editor.isActive("subscript"),
|
|
298
|
-
onClick: r[
|
|
329
|
+
onClick: r[7] ||= (t) => e.editor.chain().focus().toggleSubscript().run()
|
|
299
330
|
}, null, 8, [
|
|
300
331
|
"icon",
|
|
301
332
|
"label",
|
|
302
333
|
"active"
|
|
303
334
|
]),
|
|
304
|
-
x(
|
|
305
|
-
icon: f(
|
|
306
|
-
label: f(
|
|
335
|
+
x(W, {
|
|
336
|
+
icon: f(_e),
|
|
337
|
+
label: f(M).paragraphEditor.superscript,
|
|
307
338
|
active: e.editor.isActive("superscript"),
|
|
308
|
-
onClick: r[
|
|
339
|
+
onClick: r[8] ||= (t) => e.editor.chain().focus().toggleSuperscript().run()
|
|
309
340
|
}, null, 8, [
|
|
310
341
|
"icon",
|
|
311
342
|
"label",
|
|
312
343
|
"active"
|
|
313
344
|
]),
|
|
314
|
-
x(
|
|
315
|
-
x(
|
|
316
|
-
icon: f(
|
|
317
|
-
label: f(
|
|
345
|
+
x(J),
|
|
346
|
+
x(W, {
|
|
347
|
+
icon: f(ae),
|
|
348
|
+
label: f(M).paragraphEditor.addLink,
|
|
318
349
|
active: e.editor.isActive("link"),
|
|
319
|
-
onClick: r[
|
|
350
|
+
onClick: r[9] ||= (e) => a("open-link-dialog")
|
|
320
351
|
}, null, 8, [
|
|
321
352
|
"icon",
|
|
322
353
|
"label",
|
|
323
354
|
"active"
|
|
324
355
|
])
|
|
325
|
-
]), g("div",
|
|
326
|
-
x(
|
|
327
|
-
icon: f(
|
|
328
|
-
label: f(
|
|
356
|
+
]), g("div", Ae, [
|
|
357
|
+
x(W, {
|
|
358
|
+
icon: f(ce),
|
|
359
|
+
label: f(M).paragraphEditor.bulletList,
|
|
329
360
|
active: e.editor.isActive("bulletList"),
|
|
330
|
-
onClick: r[
|
|
361
|
+
onClick: r[10] ||= (t) => e.editor.chain().focus().toggleBulletList().run()
|
|
331
362
|
}, null, 8, [
|
|
332
363
|
"icon",
|
|
333
364
|
"label",
|
|
334
365
|
"active"
|
|
335
366
|
]),
|
|
336
|
-
x(
|
|
337
|
-
icon: f(
|
|
338
|
-
label: f(
|
|
367
|
+
x(W, {
|
|
368
|
+
icon: f(le),
|
|
369
|
+
label: f(M).paragraphEditor.numberedList,
|
|
339
370
|
active: e.editor.isActive("orderedList"),
|
|
340
|
-
onClick: r[
|
|
371
|
+
onClick: r[11] ||= (t) => e.editor.chain().focus().toggleOrderedList().run()
|
|
341
372
|
}, null, 8, [
|
|
342
373
|
"icon",
|
|
343
374
|
"label",
|
|
344
375
|
"active"
|
|
345
376
|
]),
|
|
346
|
-
x(
|
|
347
|
-
x(
|
|
348
|
-
icon: f(
|
|
349
|
-
label: f(
|
|
377
|
+
x(J),
|
|
378
|
+
x(W, {
|
|
379
|
+
icon: f(ve),
|
|
380
|
+
label: f(M).paragraphEditor.alignLeft,
|
|
350
381
|
active: e.editor.isActive({ textAlign: "left" }),
|
|
351
|
-
onClick: r[
|
|
382
|
+
onClick: r[12] ||= (t) => e.editor.chain().focus().setTextAlign("left").run()
|
|
352
383
|
}, null, 8, [
|
|
353
384
|
"icon",
|
|
354
385
|
"label",
|
|
355
386
|
"active"
|
|
356
387
|
]),
|
|
357
|
-
x(
|
|
358
|
-
icon: f(
|
|
359
|
-
label: f(
|
|
388
|
+
x(W, {
|
|
389
|
+
icon: f(F),
|
|
390
|
+
label: f(M).paragraphEditor.alignCenter,
|
|
360
391
|
active: e.editor.isActive({ textAlign: "center" }),
|
|
361
|
-
onClick: r[
|
|
392
|
+
onClick: r[13] ||= (t) => e.editor.chain().focus().setTextAlign("center").run()
|
|
362
393
|
}, null, 8, [
|
|
363
394
|
"icon",
|
|
364
395
|
"label",
|
|
365
396
|
"active"
|
|
366
397
|
]),
|
|
367
|
-
x(
|
|
368
|
-
icon: f(
|
|
369
|
-
label: f(
|
|
398
|
+
x(W, {
|
|
399
|
+
icon: f(pe),
|
|
400
|
+
label: f(M).paragraphEditor.alignRight,
|
|
370
401
|
active: e.editor.isActive({ textAlign: "right" }),
|
|
371
|
-
onClick: r[
|
|
402
|
+
onClick: r[14] ||= (t) => e.editor.chain().focus().setTextAlign("right").run()
|
|
372
403
|
}, null, 8, [
|
|
373
404
|
"icon",
|
|
374
405
|
"label",
|
|
375
406
|
"active"
|
|
376
407
|
]),
|
|
377
|
-
x(
|
|
378
|
-
x(
|
|
408
|
+
x(J),
|
|
409
|
+
x(Z, {
|
|
379
410
|
"model-value": G(),
|
|
380
|
-
options: f(
|
|
381
|
-
label: f(
|
|
411
|
+
options: f(ye),
|
|
412
|
+
label: f(M).paragraphEditor.lineHeight,
|
|
382
413
|
placeholder: "LH",
|
|
383
414
|
"width-class": "tpl:w-16",
|
|
384
415
|
"onUpdate:modelValue": K
|
|
@@ -387,10 +418,10 @@ var Z = /*#__PURE__*/ D(X, [["render", ge]]), _e = [
|
|
|
387
418
|
"options",
|
|
388
419
|
"label"
|
|
389
420
|
]),
|
|
390
|
-
x(
|
|
391
|
-
"model-value":
|
|
392
|
-
options: f(
|
|
393
|
-
label: f(
|
|
421
|
+
x(Z, {
|
|
422
|
+
"model-value": I("letterSpacing"),
|
|
423
|
+
options: f(xe),
|
|
424
|
+
label: f(M).paragraphEditor.letterSpacing,
|
|
394
425
|
placeholder: "LS",
|
|
395
426
|
"width-class": "tpl:w-20",
|
|
396
427
|
"onUpdate:modelValue": q
|
|
@@ -399,42 +430,42 @@ var Z = /*#__PURE__*/ D(X, [["render", ge]]), _e = [
|
|
|
399
430
|
"options",
|
|
400
431
|
"label"
|
|
401
432
|
]),
|
|
402
|
-
x(
|
|
403
|
-
x(
|
|
404
|
-
icon: f(
|
|
405
|
-
label: f(
|
|
406
|
-
onClick: r[
|
|
433
|
+
x(J),
|
|
434
|
+
x(W, {
|
|
435
|
+
icon: f(oe),
|
|
436
|
+
label: f(M).paragraphEditor.clearFormatting,
|
|
437
|
+
onClick: r[15] ||= (t) => e.editor.chain().focus().clearNodes().unsetAllMarks().run()
|
|
407
438
|
}, null, 8, ["icon", "label"]),
|
|
408
|
-
x(
|
|
409
|
-
x(
|
|
410
|
-
e.canRequestMergeTag ? (n(), u(v, { key: 0 }, [x(
|
|
439
|
+
x(J),
|
|
440
|
+
x(Se, { onInsert: P }),
|
|
441
|
+
e.canRequestMergeTag ? (n(), u(v, { key: 0 }, [x(J), g("button", {
|
|
411
442
|
type: "button",
|
|
412
443
|
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)]",
|
|
413
|
-
"aria-label": f(
|
|
414
|
-
title: f(
|
|
415
|
-
onClick: r[
|
|
416
|
-
}, [x(f(
|
|
444
|
+
"aria-label": f(M).mergeTag.insert,
|
|
445
|
+
title: f(M).mergeTag.insert,
|
|
446
|
+
onClick: r[16] ||= (e) => a("add-merge-tag")
|
|
447
|
+
}, [x(f(fe), {
|
|
417
448
|
size: 16,
|
|
418
449
|
"stroke-width": 2
|
|
419
|
-
}), y(" " + s(f(
|
|
420
|
-
e.canInsertLogicTag ? (n(), u(v, { key: 1 }, [x(
|
|
450
|
+
}), y(" " + s(f(M).mergeTag.insertShort), 1)], 8, je)], 64)) : d("", !0),
|
|
451
|
+
e.canInsertLogicTag ? (n(), u(v, { key: 1 }, [x(J), g("button", {
|
|
421
452
|
type: "button",
|
|
422
453
|
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)]",
|
|
423
|
-
"aria-label": f(
|
|
424
|
-
title: f(
|
|
454
|
+
"aria-label": f(M).logicTag.insert,
|
|
455
|
+
title: f(M).logicTag.insert,
|
|
425
456
|
"data-testid": "insert-logic-button",
|
|
426
|
-
onClick: r[
|
|
427
|
-
}, [x(f(
|
|
457
|
+
onClick: r[17] ||= (e) => a("add-logic-tag")
|
|
458
|
+
}, [x(f(ue), {
|
|
428
459
|
size: 16,
|
|
429
460
|
"stroke-width": 2
|
|
430
|
-
}), y(" " + s(f(
|
|
431
|
-
])], 64)) : (n(), u("div",
|
|
461
|
+
}), y(" " + s(f(M).logicTag.insertShort), 1)], 8, Me)], 64)) : d("", !0)
|
|
462
|
+
])], 64)) : (n(), u("div", Ne, [x(f(ie), {
|
|
432
463
|
class: "tpl-spinner",
|
|
433
464
|
size: 14,
|
|
434
465
|
"stroke-width": 2
|
|
435
|
-
}), y(" " + s(f(
|
|
466
|
+
}), y(" " + s(f(M).errors.editorLoading), 1)]))], 12, we)], 8, ["to"])) : d("", !0);
|
|
436
467
|
}
|
|
437
|
-
}),
|
|
468
|
+
}), Fe = { class: "tpl-text-editor-wrapper tpl:relative" }, Ie = /* @__PURE__ */ b({
|
|
438
469
|
__name: "ParagraphEditor",
|
|
439
470
|
props: {
|
|
440
471
|
block: {},
|
|
@@ -442,25 +473,25 @@ var Z = /*#__PURE__*/ D(X, [["render", ge]]), _e = [
|
|
|
442
473
|
},
|
|
443
474
|
emits: ["done"],
|
|
444
475
|
setup(t, { emit: r }) {
|
|
445
|
-
let i = t, a = r, o = j(), { editor: s, EditorContent: c, isLoading: l, initError: d, retry: p, showLinkDialog: m, linkUrl: h,
|
|
476
|
+
let i = t, a = r, o = j(), { editor: s, EditorContent: c, isLoading: l, initError: d, retry: p, showLinkDialog: m, linkUrl: h, linkColor: g, linkDialogRef: _, canRequestMergeTag: v, canInsertLogicTag: y, openLinkDialog: b, insertLink: S, removeLink: C, closeLinkDialog: w, handleLinkKeydown: D, handleAddMergeTag: O, handleAddLogicTag: k } = T({
|
|
446
477
|
blockId: () => i.block.id,
|
|
447
478
|
blockContent: () => i.block.content,
|
|
448
479
|
onDone: () => a("done"),
|
|
449
480
|
editorName: "ParagraphEditor",
|
|
450
481
|
async loadExtensions({ mergeTags: e, syntax: t, triggerChar: n, autocompleteEnabled: r, suggestionEmptyText: i }) {
|
|
451
482
|
let [{ Editor: a, 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([
|
|
452
|
-
import("./tiptap-
|
|
453
|
-
import("./tiptap-
|
|
454
|
-
import("./tiptap-
|
|
455
|
-
import("./tiptap-
|
|
456
|
-
import("./tiptap-
|
|
457
|
-
import("./tiptap-
|
|
458
|
-
import("./tiptap-
|
|
459
|
-
import("./tiptap-
|
|
460
|
-
import("./tiptap-
|
|
461
|
-
import("./tiptap-
|
|
462
|
-
import("./tiptap-
|
|
463
|
-
import("./extensions-
|
|
483
|
+
import("./tiptap-zpXk5mN4.js").then((e) => e.r),
|
|
484
|
+
import("./tiptap-zpXk5mN4.js").then((e) => e.i),
|
|
485
|
+
import("./tiptap-zpXk5mN4.js").then((e) => e.l),
|
|
486
|
+
import("./tiptap-zpXk5mN4.js").then((e) => e.a),
|
|
487
|
+
import("./tiptap-zpXk5mN4.js").then((e) => e.c),
|
|
488
|
+
import("./tiptap-zpXk5mN4.js").then((e) => e.s),
|
|
489
|
+
import("./tiptap-zpXk5mN4.js").then((e) => e.o),
|
|
490
|
+
import("./tiptap-zpXk5mN4.js").then((e) => e.p),
|
|
491
|
+
import("./tiptap-zpXk5mN4.js").then((e) => e.f),
|
|
492
|
+
import("./tiptap-zpXk5mN4.js").then((e) => e.d),
|
|
493
|
+
import("./tiptap-zpXk5mN4.js").then((e) => e.u),
|
|
494
|
+
import("./extensions-BJ7vaBol.js")
|
|
464
495
|
]);
|
|
465
496
|
return {
|
|
466
497
|
TiptapEditor: a,
|
|
@@ -477,7 +508,7 @@ var Z = /*#__PURE__*/ D(X, [["render", ge]]), _e = [
|
|
|
477
508
|
u,
|
|
478
509
|
d,
|
|
479
510
|
f,
|
|
480
|
-
l.configure({
|
|
511
|
+
E(l).configure({
|
|
481
512
|
openOnClick: !1,
|
|
482
513
|
HTMLAttributes: {
|
|
483
514
|
target: "_blank",
|
|
@@ -507,16 +538,16 @@ var Z = /*#__PURE__*/ D(X, [["render", ge]]), _e = [
|
|
|
507
538
|
};
|
|
508
539
|
}
|
|
509
540
|
});
|
|
510
|
-
return (r, i) => (n(), u("div",
|
|
511
|
-
x(
|
|
541
|
+
return (r, i) => (n(), u("div", Fe, [
|
|
542
|
+
x(Pe, {
|
|
512
543
|
editor: f(s),
|
|
513
544
|
"toolbar-position": t.toolbarPosition,
|
|
514
545
|
"is-loading": f(l),
|
|
515
|
-
"can-request-merge-tag": f(
|
|
516
|
-
"can-insert-logic-tag": f(
|
|
517
|
-
onOpenLinkDialog: f(
|
|
518
|
-
onAddMergeTag: f(
|
|
519
|
-
onAddLogicTag: f(
|
|
546
|
+
"can-request-merge-tag": f(v),
|
|
547
|
+
"can-insert-logic-tag": f(y),
|
|
548
|
+
onOpenLinkDialog: f(b),
|
|
549
|
+
onAddMergeTag: f(O),
|
|
550
|
+
onAddLogicTag: f(k)
|
|
520
551
|
}, null, 8, [
|
|
521
552
|
"editor",
|
|
522
553
|
"toolbar-position",
|
|
@@ -527,7 +558,7 @@ var Z = /*#__PURE__*/ D(X, [["render", ge]]), _e = [
|
|
|
527
558
|
"onAddMergeTag",
|
|
528
559
|
"onAddLogicTag"
|
|
529
560
|
]),
|
|
530
|
-
x(
|
|
561
|
+
x(L, {
|
|
531
562
|
editor: f(s),
|
|
532
563
|
"editor-content": f(c),
|
|
533
564
|
"is-loading": f(l),
|
|
@@ -540,22 +571,25 @@ var Z = /*#__PURE__*/ D(X, [["render", ge]]), _e = [
|
|
|
540
571
|
"init-error",
|
|
541
572
|
"onRetry"
|
|
542
573
|
]),
|
|
543
|
-
x(
|
|
574
|
+
x(I, {
|
|
544
575
|
visible: f(m),
|
|
545
576
|
"is-editing-link": f(s)?.isActive("link") ?? !1,
|
|
546
|
-
"dialog-ref": f(
|
|
547
|
-
"onUpdate:dialogRef": i[0] ||= (t) => e(
|
|
577
|
+
"dialog-ref": f(_),
|
|
578
|
+
"onUpdate:dialogRef": i[0] ||= (t) => e(_) ? _.value = t : null,
|
|
548
579
|
"link-url": f(h),
|
|
549
580
|
"onUpdate:linkUrl": i[1] ||= (t) => e(h) ? h.value = t : null,
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
581
|
+
"link-color": f(g),
|
|
582
|
+
"onUpdate:linkColor": i[2] ||= (t) => e(g) ? g.value = t : null,
|
|
583
|
+
onClose: f(w),
|
|
584
|
+
onInsert: f(S),
|
|
585
|
+
onRemove: f(C),
|
|
586
|
+
onKeydown: f(D)
|
|
554
587
|
}, null, 8, [
|
|
555
588
|
"visible",
|
|
556
589
|
"is-editing-link",
|
|
557
590
|
"dialog-ref",
|
|
558
591
|
"link-url",
|
|
592
|
+
"link-color",
|
|
559
593
|
"onClose",
|
|
560
594
|
"onInsert",
|
|
561
595
|
"onRemove",
|
|
@@ -565,6 +599,6 @@ var Z = /*#__PURE__*/ D(X, [["render", ge]]), _e = [
|
|
|
565
599
|
}
|
|
566
600
|
});
|
|
567
601
|
//#endregion
|
|
568
|
-
export {
|
|
602
|
+
export { Ie as default };
|
|
569
603
|
|
|
570
|
-
//# sourceMappingURL=ParagraphEditor-
|
|
604
|
+
//# sourceMappingURL=ParagraphEditor-CB5FGRs3.js.map
|