@aswin.dev/editor 0.7.0 → 0.7.2
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 +3 -3
- package/dist/{AccessibilityPanel-CvQGLdu6.js → AccessibilityPanel-EmQ19wiS.js} +37 -37
- package/dist/{AiChatSidebar-B3SJIKG_.js → AiChatSidebar-DeB0w_32.js} +67 -81
- package/dist/{AiFeatureMenu-BLLKoOos.js → AiFeatureMenu-DoLD5Cde.js} +22 -22
- package/dist/{BlockA11yBadge-CXDLqkcJ.js → BlockA11yBadge-DkNbDvJA.js} +12 -12
- package/dist/CloudEditor-zo9PjjvY.js +1214 -0
- package/dist/{CollaboratorBar-DuPYW5iF.js → CollaboratorBar-BsXMY-8e.js} +21 -21
- package/dist/CommentsSidebar-DIWIa4rS.js +436 -0
- package/dist/CountdownBlock-BCi7-DAM.js +92 -0
- package/dist/CountdownToolbar-BuS8p5ju.js +210 -0
- package/dist/{DesignReferenceSidebar-B8V_F2yF.js → DesignReferenceSidebar-RDlnhL-6.js} +58 -58
- package/dist/{LoadingTrack-B0CWFHXQ.js → LoadingTrack-BJ59h9ok.js} +2 -2
- package/dist/ModuleBrowserModal-b7HbpByz.js +206 -0
- package/dist/ModulePreviewCanvas-D__YlOLS.js +108 -0
- package/dist/{NumberWithSuffix-DkXUez9t.js → NumberWithSuffix-Ca3vNY84.js} +87 -87
- package/dist/{ParagraphEditor-D75wl3BX.js → ParagraphEditor-B1aYPO-6.js} +182 -182
- package/dist/{RichTextEditorContent-DYkIauIk.js → RichTextEditorContent-BmEVMrkJ.js} +38 -38
- package/dist/{SaveModuleDialog-FZ9lxY7_.js → SaveModuleDialog-ClovqI6h.js} +28 -28
- package/dist/{SnapshotHistory-BR3eV120.js → SnapshotHistory-DoqtH0cw.js} +45 -50
- package/dist/{TemplateScoringPanel-4GTNHej5.js → TemplateScoringPanel-DQv2ZAiL.js} +75 -75
- package/dist/{TestEmailModal--ue5w9fT.js → TestEmailModal-iIeYJYsj.js} +28 -28
- package/dist/{TitleEditor-fStSADI-.js → TitleEditor-CTDIwRF_.js} +68 -68
- package/dist/{TplModal-BwSfxIHf.js → TplModal-CBq1J1pG.js} +14 -14
- package/dist/{accessibility-e8JYu_zd.js → accessibility-BU09xZrQ.js} +1 -1
- package/dist/{blockTypeIcons-BcTrDjmH.js → blockTypeIcons-QkC6f5UE.js} +19 -5
- package/dist/bundle-stats.json +7 -7
- package/dist/cdn/chunks/{AccessibilityPanel-B6DOjojm.js → AccessibilityPanel-BeU8nz7A.js} +28 -28
- package/dist/cdn/chunks/{AccessibilityPanel-B6DOjojm.js.map → AccessibilityPanel-BeU8nz7A.js.map} +1 -1
- package/dist/cdn/chunks/{AiFeatureMenu-qEdB2fZJ.js → AiFeatureMenu-B2mhscyP.js} +21 -21
- package/dist/cdn/chunks/AiFeatureMenu-B2mhscyP.js.map +1 -0
- package/dist/cdn/chunks/{BlockA11yBadge-DcEZftf6.js → BlockA11yBadge-C4g77gF0.js} +11 -11
- package/dist/cdn/chunks/{BlockA11yBadge-DcEZftf6.js.map → BlockA11yBadge-C4g77gF0.js.map} +1 -1
- package/dist/{CloudEditor-BCz1ZTYC.js → cdn/chunks/CloudEditor-Btyr0b0_.js} +486 -475
- package/dist/cdn/chunks/CloudEditor-Btyr0b0_.js.map +1 -0
- package/dist/cdn/chunks/{CollaboratorBar--nO7TX6b.js → CollaboratorBar-YBiIjiRh.js} +15 -15
- package/dist/cdn/chunks/CollaboratorBar-YBiIjiRh.js.map +1 -0
- package/dist/cdn/chunks/CountdownBlock-B06UZoWe.js +93 -0
- package/dist/cdn/chunks/CountdownBlock-B06UZoWe.js.map +1 -0
- package/dist/cdn/chunks/CountdownToolbar-C9XZr33O.js +212 -0
- package/dist/cdn/chunks/CountdownToolbar-C9XZr33O.js.map +1 -0
- package/dist/{ModuleBrowserModal-DrUFMTDx.js → cdn/chunks/ModuleBrowserModal-C2CDWKW6.js} +51 -62
- package/dist/cdn/chunks/ModuleBrowserModal-C2CDWKW6.js.map +1 -0
- package/dist/cdn/chunks/ModulePreviewCanvas-Drt8Evai.js +109 -0
- package/dist/cdn/chunks/ModulePreviewCanvas-Drt8Evai.js.map +1 -0
- package/dist/cdn/chunks/{NumberWithSuffix-CE3NrZhH.js → NumberWithSuffix-Ty1bp9vB.js} +64 -64
- package/dist/cdn/chunks/{NumberWithSuffix-CE3NrZhH.js.map → NumberWithSuffix-Ty1bp9vB.js.map} +1 -1
- package/dist/cdn/chunks/{ParagraphEditor-B6Ygu-Mq.js → ParagraphEditor-BA1WbHI7.js} +188 -188
- package/dist/cdn/chunks/{ParagraphEditor-B6Ygu-Mq.js.map → ParagraphEditor-BA1WbHI7.js.map} +1 -1
- package/dist/cdn/chunks/{RichTextEditorContent-DL_y2SrR.js → RichTextEditorContent-BtWCA_Oc.js} +30 -30
- package/dist/cdn/chunks/{RichTextEditorContent-DL_y2SrR.js.map → RichTextEditorContent-BtWCA_Oc.js.map} +1 -1
- package/dist/cdn/chunks/{SaveModuleDialog-B0TnO_o9.js → SaveModuleDialog-AwL0tkCV.js} +21 -21
- package/dist/cdn/chunks/SaveModuleDialog-AwL0tkCV.js.map +1 -0
- package/dist/cdn/chunks/{TitleEditor-BHpfxvwy.js → TitleEditor-DbSyeixS.js} +65 -65
- package/dist/cdn/chunks/TitleEditor-DbSyeixS.js.map +1 -0
- package/dist/cdn/chunks/blockTypeIcons-pQIkxJzc.js +23 -0
- package/dist/cdn/chunks/blockTypeIcons-pQIkxJzc.js.map +1 -0
- package/dist/cdn/chunks/{de-D8CnZxV9.js → de-_tooy3Q8.js} +250 -2
- package/dist/cdn/chunks/de-_tooy3Q8.js.map +1 -0
- package/dist/cdn/chunks/{draggable-Bcb86AsV.js → draggable-C-1_gch3.js} +2 -2
- package/dist/cdn/chunks/{draggable-Bcb86AsV.js.map → draggable-C-1_gch3.js.map} +1 -1
- package/dist/cdn/chunks/{en-8FHaQv4V.js → en-CNqLoIm9.js} +250 -2
- package/dist/cdn/chunks/en-CNqLoIm9.js.map +1 -0
- package/dist/cdn/chunks/{extensions-DIxF31tA.js → extensions-BVKQw_sp.js} +107 -107
- package/dist/cdn/chunks/extensions-BVKQw_sp.js.map +1 -0
- package/dist/cdn/chunks/{features-DEMb13KS.js → features-DIBEo4xl.js} +3388 -2289
- package/dist/cdn/chunks/features-DIBEo4xl.js.map +1 -0
- package/dist/cdn/chunks/{icons-CsLTcirh.js → icons-C1Gg-ov-.js} +346 -54
- package/dist/cdn/chunks/icons-C1Gg-ov-.js.map +1 -0
- package/dist/cdn/chunks/{media-library-CVaNvhpM.js → media-library-BTF_Ko70.js} +985 -985
- package/dist/cdn/chunks/media-library-BTF_Ko70.js.map +1 -0
- package/dist/cdn/chunks/{quality-BaBfc54_.js → quality-C5AmotmP.js} +312 -312
- package/dist/cdn/chunks/quality-C5AmotmP.js.map +1 -0
- package/dist/cdn/chunks/{renderer-CUxvx7ro.js → renderer-D0L44Vlp.js} +236 -142
- package/dist/cdn/chunks/renderer-D0L44Vlp.js.map +1 -0
- package/dist/cdn/chunks/{src-CRaqN-p8.js → src-RKexlYjA.js} +161 -161
- package/dist/cdn/chunks/src-RKexlYjA.js.map +1 -0
- package/dist/cdn/chunks/styleConstants-PgmvNBzQ.js +57 -0
- package/dist/cdn/chunks/styleConstants-PgmvNBzQ.js.map +1 -0
- package/dist/cdn/chunks/styles-CQR6ed13.js +4976 -0
- package/dist/cdn/chunks/styles-CQR6ed13.js.map +1 -0
- package/dist/cdn/chunks/{tiptap-ZhwKyFp7.js → tiptap-CDzAbF2j.js} +43 -43
- package/dist/cdn/chunks/{tiptap-ZhwKyFp7.js.map → tiptap-CDzAbF2j.js.map} +1 -1
- package/dist/cdn/editor.css +1 -1
- package/dist/cdn/editor.js +211 -123
- package/dist/cdn/editor.js.map +1 -1
- package/dist/{check-Da05j8yl.js → check-DJrpDKO_.js} +1 -1
- package/dist/{chevron-down-R2uY34iD.js → chevron-down-C5oBUhT8.js} +1 -1
- package/dist/chevron-right-BqCptpdp.js +10 -0
- package/dist/{circle-alert-DZuGWPX-.js → circle-alert-ZQQc98HC.js} +1 -1
- package/dist/{clock-CRp2sIub.js → clock-ik2pRJKG.js} +1 -1
- package/dist/{cloud-DEk_b4CR.js → cloud-DJG4tb4_.js} +485 -427
- package/dist/{createLucideIcon-C3pa2siy.js → createLucideIcon-ClREiSx3.js} +6 -6
- package/dist/{de-Brqvgr43.js → de-2LEvILeZ.js} +249 -1
- package/dist/{dist-Cp0zXPAD.js → dist-BHAeXaUY.js} +1 -1
- package/dist/{dist-BaQIYPsn.js → dist-BSJvAvH3.js} +1 -1
- package/dist/{dist-wzMIGj-D.js → dist-BeFnymxK.js} +1 -1
- package/dist/dist-Bmir0gYb.js +1167 -0
- package/dist/{dist-DDJIWTRY.js → dist-BvPgo-UK.js} +1 -1
- package/dist/{dist-BFawx6IS.js → dist-CPVBKMmd.js} +51 -51
- package/dist/dist-CivF9P8b.js +382 -0
- package/dist/{dist-D6uC2xhi.js → dist-Df4ie7vZ.js} +1 -1
- package/dist/{dist-us-RpCWN.js → dist-DxOoemkW.js} +1 -1
- package/dist/{dist-KoBJjK1G.js → dist-HEQ52gTJ.js} +1 -1
- package/dist/{dist-DjviJBCi.js → dist-b-XUqAoF.js} +1 -1
- package/dist/{dist-D90y8dvT.js → dist-kZfaVUpW.js} +3 -3
- package/dist/{dist-aRzjfSRN.js → dist-wfAedlzi.js} +1 -1
- package/dist/{en-WDVp87TE.js → en-D2RU2Poj.js} +249 -1
- package/dist/{extensions-CUcl9Ok4.js → extensions-BQ1xXx3d.js} +103 -103
- package/dist/{image-up-MBZKKg9p.js → image-up-DT7gcJLN.js} +1 -1
- package/dist/index.d.ts +102 -14
- package/dist/{info-CJEC7piy.js → info-BSPGcsSM.js} +1 -1
- package/dist/keys-CvX8D-8C.js +10 -0
- package/dist/{loader-circle-DsY5Yg33.js → loader-circle-Balo8p3d.js} +1 -1
- package/dist/{message-circle-yElBbR2C.js → message-circle-B39qAHxs.js} +1 -1
- package/dist/pencil-BZJPNYWR.js +10 -0
- package/dist/{refresh-cw-CE_AGtn8.js → refresh-cw-DwDqGUM0.js} +1 -1
- package/dist/{scan-line-D0vcUekt.js → scan-line-DlghmhNf.js} +1 -1
- package/dist/{send-DH4oDQqC.js → send-DDdhIRj8.js} +1 -1
- package/dist/{shield-check-CfJgs2Hd.js → shield-check-OSQ-JVTX.js} +1 -1
- package/dist/{sparkles-CvRXGqFs.js → sparkles-BN4a-CoF.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/styleConstants-wWRbcuEK.js +55 -0
- package/dist/styles-CavWjvol.js +5487 -0
- package/dist/templatical-editor.js +211 -119
- package/dist/{text-align-start-BT9VUDxK.js → text-align-start-D1weisjS.js} +1 -1
- package/dist/{trash-2-DbP2Y6t2.js → trash-2-CMWvQ5KX.js} +1 -1
- package/dist/{triangle-alert-aOXceTSe.js → triangle-alert-DyidRNX_.js} +1 -1
- package/dist/undo-2-Cg8I7obC.js +16 -0
- package/dist/{useCloudI18n-BuIwR6OE.js → useCloudI18n-BTTNBk5i.js} +2 -2
- package/dist/{useEditorCore-C6ost42Q.js → useEditorCore-BGnzcT7p.js} +2424 -2249
- package/dist/{useI18n-lb2DHDiu.js → useI18n-C2xQZ6K9.js} +2 -2
- package/dist/{useMergeTag-CBwKnnNB.js → useMergeTag-CfuZq2fF.js} +4 -4
- package/dist/{vue.runtime.esm-bundler-DpvJL-nX.js → vue.runtime.esm-bundler-CjauPXjj.js} +1 -1
- package/dist/{x-u2oVmjN_.js → x-CgIhNcT9.js} +1 -1
- package/package.json +15 -15
- package/dist/CommentsSidebar-B1pvJdqF.js +0 -441
- package/dist/CountdownBlock-BNSj1jvJ.js +0 -92
- package/dist/CountdownToolbar-ClJr2GzL.js +0 -210
- package/dist/ModulePreviewCanvas-CHdOwV_4.js +0 -106
- package/dist/cdn/chunks/AiFeatureMenu-qEdB2fZJ.js.map +0 -1
- package/dist/cdn/chunks/CloudEditor-D2GsEC_n.js +0 -1143
- package/dist/cdn/chunks/CloudEditor-D2GsEC_n.js.map +0 -1
- package/dist/cdn/chunks/CollaboratorBar--nO7TX6b.js.map +0 -1
- package/dist/cdn/chunks/CountdownBlock-5YdT1uUu.js +0 -93
- package/dist/cdn/chunks/CountdownBlock-5YdT1uUu.js.map +0 -1
- package/dist/cdn/chunks/CountdownToolbar-DXPXrbAA.js +0 -212
- package/dist/cdn/chunks/CountdownToolbar-DXPXrbAA.js.map +0 -1
- package/dist/cdn/chunks/ModuleBrowserModal-DxoPp81s.js +0 -195
- package/dist/cdn/chunks/ModuleBrowserModal-DxoPp81s.js.map +0 -1
- package/dist/cdn/chunks/ModulePreviewCanvas-CoLdb4ar.js +0 -107
- package/dist/cdn/chunks/ModulePreviewCanvas-CoLdb4ar.js.map +0 -1
- package/dist/cdn/chunks/SaveModuleDialog-B0TnO_o9.js.map +0 -1
- package/dist/cdn/chunks/TitleEditor-BHpfxvwy.js.map +0 -1
- package/dist/cdn/chunks/blockTypeIcons-BzzY9_kA.js +0 -22
- package/dist/cdn/chunks/blockTypeIcons-BzzY9_kA.js.map +0 -1
- package/dist/cdn/chunks/de-D8CnZxV9.js.map +0 -1
- package/dist/cdn/chunks/en-8FHaQv4V.js.map +0 -1
- package/dist/cdn/chunks/extensions-DIxF31tA.js.map +0 -1
- package/dist/cdn/chunks/features-DEMb13KS.js.map +0 -1
- package/dist/cdn/chunks/icons-CsLTcirh.js.map +0 -1
- package/dist/cdn/chunks/media-library-CVaNvhpM.js.map +0 -1
- package/dist/cdn/chunks/quality-BaBfc54_.js.map +0 -1
- package/dist/cdn/chunks/renderer-CUxvx7ro.js.map +0 -1
- package/dist/cdn/chunks/src-CRaqN-p8.js.map +0 -1
- package/dist/cdn/chunks/styleConstants-DP1VOca8.js +0 -57
- package/dist/cdn/chunks/styleConstants-DP1VOca8.js.map +0 -1
- package/dist/cdn/chunks/styles-BHJULjNR.js +0 -2947
- package/dist/cdn/chunks/styles-BHJULjNR.js.map +0 -1
- package/dist/dist-B1IR0bpH.js +0 -326
- package/dist/dist-DJmnUmW9.js +0 -362
- package/dist/keys-ciNfSSGj.js +0 -10
- package/dist/styleConstants-fWzlIIwN.js +0 -55
- package/dist/styles-DEXEkBvg.js +0 -3176
- /package/dist/{_plugin-vue_export-helper-B0hnzhyu.js → _plugin-vue_export-helper-Bwh4ceeO.js} +0 -0
- /package/dist/{de-DCaaCE5s.js → de-D2npYjrZ.js} +0 -0
- /package/dist/{dist-iLBdeBDR.js → dist-DvHLtWVP.js} +0 -0
- /package/dist/{emojiData-PQyVa4bU.js → emojiData-DvQBBzmO.js} +0 -0
- /package/dist/{en-DXCyK4-X.js → en-ib-4h3_o.js} +0 -0
- /package/dist/{formatRelativeTime-BOEf47hq.js → formatRelativeTime-CFDZnEIs.js} +0 -0
- /package/dist/{liquid.browser-CdMv1BTn.js → liquid.browser-7Rv0QDiO.js} +0 -0
- /package/dist/{readableTextColor-CY3SiRnt.js → readableTextColor-C_9OpzBw.js} +0 -0
|
@@ -1,67 +1,67 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { a as U, o as W, s as G } from "./styleConstants-
|
|
5
|
-
import { n as K, t as q } from "./RichTextEditorContent-
|
|
1
|
+
import { C as e, D as t, I as n, P as r, X as i, _ as a, b as o, ct as s, d as c, dt as l, f as u, ft as d, g as f, h as p, m, p as h, tt as g, u as _, ut as v, v as y, x as b, z as x } from "./draggable-C-1_gch3.js";
|
|
2
|
+
import { J as S, Lt as C, Qt as w, Z as T, an as E, ln as D, nt as O, on as k, sn as A, tt as j, yt as M } from "./features-DIBEo4xl.js";
|
|
3
|
+
import { C as N, E as P, G as ee, K as te, W as ne, Y as re, c as ie, d as F, i as I, l as L, m as R, p as z, s as B, st as V, v as H } from "./icons-C1Gg-ov-.js";
|
|
4
|
+
import { a as U, o as W, s as G } from "./styleConstants-PgmvNBzQ.js";
|
|
5
|
+
import { n as K, t as q } from "./RichTextEditorContent-BtWCA_Oc.js";
|
|
6
6
|
//#region src/components/blocks/EmojiPickerDropdown.vue?vue&type=script&setup=true&lang.ts
|
|
7
7
|
var J = [
|
|
8
8
|
"aria-label",
|
|
9
9
|
"title",
|
|
10
10
|
"aria-expanded"
|
|
11
|
-
], Y = ["aria-label"], ae = { class: "tpl:mb-1.5 tpl:text-[10px] tpl:font-medium tpl:tracking-wide tpl:text-[var(--tpl-text-muted)] tpl:uppercase" }, oe = { class: "tpl:grid tpl:grid-cols-10 tpl:gap-0.5" }, se = ["aria-label", "onClick"], ce = /* @__PURE__ */
|
|
11
|
+
], Y = ["aria-label"], ae = { class: "tpl:mb-1.5 tpl:text-[10px] tpl:font-medium tpl:tracking-wide tpl:text-[var(--tpl-text-muted)] tpl:uppercase" }, oe = { class: "tpl:grid tpl:grid-cols-10 tpl:gap-0.5" }, se = ["aria-label", "onClick"], ce = /* @__PURE__ */ e({
|
|
12
12
|
__name: "EmojiPickerDropdown",
|
|
13
13
|
emits: ["insert"],
|
|
14
|
-
setup(
|
|
15
|
-
let
|
|
16
|
-
|
|
17
|
-
|
|
14
|
+
setup(e, { emit: t }) {
|
|
15
|
+
let i = t, { categories: o, isOpen: l, toggle: f, close: h } = T(), { t: x, format: S } = C(), w = g(null), E = g(null);
|
|
16
|
+
j(w, m(() => l.value)), D(E, () => {
|
|
17
|
+
l.value && h();
|
|
18
18
|
});
|
|
19
19
|
function O(e) {
|
|
20
|
-
|
|
20
|
+
i("insert", e), h();
|
|
21
21
|
}
|
|
22
|
-
return (e, t) => (
|
|
22
|
+
return (e, t) => (r(), y("div", {
|
|
23
23
|
ref_key: "rootRef",
|
|
24
24
|
ref: E,
|
|
25
25
|
class: "tpl:relative"
|
|
26
|
-
}, [
|
|
26
|
+
}, [p("button", {
|
|
27
27
|
type: "button",
|
|
28
|
-
class:
|
|
29
|
-
"aria-label":
|
|
30
|
-
title:
|
|
31
|
-
"aria-expanded":
|
|
28
|
+
class: v(["tpl-text-toolbar-btn", { "tpl-text-toolbar-btn--active": s(l) }]),
|
|
29
|
+
"aria-label": s(x).paragraphEditor.insertEmoji,
|
|
30
|
+
title: s(x).paragraphEditor.insertEmoji,
|
|
31
|
+
"aria-expanded": s(l),
|
|
32
32
|
"aria-haspopup": "dialog",
|
|
33
33
|
"aria-controls": "tpl-emoji-picker",
|
|
34
|
-
onClick: t[0] ||= (...e) =>
|
|
35
|
-
}, [
|
|
34
|
+
onClick: t[0] ||= (...e) => s(f) && s(f)(...e)
|
|
35
|
+
}, [b(s(H), {
|
|
36
36
|
size: 16,
|
|
37
37
|
"stroke-width": 2
|
|
38
|
-
})], 10, J),
|
|
38
|
+
})], 10, J), s(l) ? (r(), y("div", {
|
|
39
39
|
key: 0,
|
|
40
40
|
id: "tpl-emoji-picker",
|
|
41
41
|
ref_key: "pickerRef",
|
|
42
42
|
ref: w,
|
|
43
43
|
role: "dialog",
|
|
44
44
|
"aria-modal": "false",
|
|
45
|
-
"aria-label":
|
|
45
|
+
"aria-label": s(x).paragraphEditor.insertEmoji,
|
|
46
46
|
tabindex: "-1",
|
|
47
47
|
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",
|
|
48
|
-
onKeydown: t[1] ||=
|
|
49
|
-
}, [(
|
|
48
|
+
onKeydown: t[1] ||= _(c((...e) => s(h) && s(h)(...e), ["stop", "prevent"]), ["esc"])
|
|
49
|
+
}, [(r(!0), y(u, null, n(s(o), (e) => (r(), y("div", {
|
|
50
50
|
key: e.key,
|
|
51
51
|
class: "tpl:mb-2 tpl:last:mb-0"
|
|
52
|
-
}, [
|
|
52
|
+
}, [p("div", ae, d(s(x).emoji[e.key]), 1), p("div", oe, [(r(!0), y(u, null, n(e.emojis, (e) => (r(), y("button", {
|
|
53
53
|
key: e,
|
|
54
54
|
type: "button",
|
|
55
|
-
"aria-label":
|
|
55
|
+
"aria-label": s(S)(s(x).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) => O(e)
|
|
58
|
-
},
|
|
58
|
+
}, d(e), 9, se))), 128))])]))), 128))], 40, Y)) : a("", !0)], 512));
|
|
59
59
|
}
|
|
60
60
|
}), le = [
|
|
61
61
|
"aria-label",
|
|
62
62
|
"title",
|
|
63
63
|
"aria-pressed"
|
|
64
|
-
], X = /* @__PURE__ */
|
|
64
|
+
], X = /* @__PURE__ */ e({
|
|
65
65
|
__name: "ToolbarIconButton",
|
|
66
66
|
props: {
|
|
67
67
|
icon: {},
|
|
@@ -71,13 +71,13 @@ var J = [
|
|
|
71
71
|
size: {}
|
|
72
72
|
},
|
|
73
73
|
setup(e) {
|
|
74
|
-
return (t, n) => (
|
|
74
|
+
return (t, n) => (r(), y("button", {
|
|
75
75
|
type: "button",
|
|
76
|
-
class:
|
|
76
|
+
class: v(["tpl-text-toolbar-btn", { "tpl-text-toolbar-btn--active": e.active }]),
|
|
77
77
|
"aria-label": e.label,
|
|
78
78
|
title: e.label,
|
|
79
79
|
"aria-pressed": e.active ? "true" : "false"
|
|
80
|
-
}, [(
|
|
80
|
+
}, [(r(), f(x(e.icon), {
|
|
81
81
|
size: e.size ?? 16,
|
|
82
82
|
"stroke-width": e.strokeWidth ?? 2
|
|
83
83
|
}, null, 8, ["size", "stroke-width"]))], 10, le));
|
|
@@ -87,13 +87,13 @@ var J = [
|
|
|
87
87
|
"aria-hidden": "true"
|
|
88
88
|
};
|
|
89
89
|
function fe(e, t) {
|
|
90
|
-
return
|
|
90
|
+
return r(), y("span", de);
|
|
91
91
|
}
|
|
92
|
-
var Z = /* @__PURE__ */
|
|
92
|
+
var Z = /* @__PURE__ */ O(ue, [["render", fe]]), pe = [
|
|
93
93
|
"value",
|
|
94
94
|
"aria-label",
|
|
95
95
|
"title"
|
|
96
|
-
], me = { value: "" }, he = ["value"], Q = /* @__PURE__ */
|
|
96
|
+
], me = { value: "" }, he = ["value"], Q = /* @__PURE__ */ e({
|
|
97
97
|
__name: "ToolbarSelect",
|
|
98
98
|
props: {
|
|
99
99
|
modelValue: {},
|
|
@@ -104,26 +104,26 @@ var Z = /* @__PURE__ */ j(ue, [["render", fe]]), pe = [
|
|
|
104
104
|
},
|
|
105
105
|
emits: ["update:modelValue"],
|
|
106
106
|
setup(e, { emit: t }) {
|
|
107
|
-
let
|
|
107
|
+
let i = t;
|
|
108
108
|
function a(e) {
|
|
109
|
-
|
|
109
|
+
i("update:modelValue", e.target.value);
|
|
110
110
|
}
|
|
111
111
|
function o(e) {
|
|
112
112
|
return typeof e == "string" ? e : e.value;
|
|
113
113
|
}
|
|
114
|
-
function
|
|
114
|
+
function s(e) {
|
|
115
115
|
return typeof e == "string" ? e : e.label;
|
|
116
116
|
}
|
|
117
|
-
return (t,
|
|
118
|
-
class:
|
|
117
|
+
return (t, i) => (r(), y("select", {
|
|
118
|
+
class: v(["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", e.widthClass ?? "tpl:w-20"]),
|
|
119
119
|
value: e.modelValue,
|
|
120
120
|
"aria-label": e.label,
|
|
121
121
|
title: e.label,
|
|
122
122
|
onChange: a
|
|
123
|
-
}, [
|
|
123
|
+
}, [p("option", me, d(e.placeholder ?? ""), 1), (r(!0), y(u, null, n(e.options, (e) => (r(), y("option", {
|
|
124
124
|
key: o(e),
|
|
125
125
|
value: o(e)
|
|
126
|
-
},
|
|
126
|
+
}, d(s(e)), 9, he))), 128))], 42, pe));
|
|
127
127
|
}
|
|
128
128
|
}), ge = ["data-tpl-theme", "aria-label"], _e = { class: "tpl:flex tpl:items-center tpl:gap-1" }, ve = { class: "tpl:relative" }, ye = [
|
|
129
129
|
"value",
|
|
@@ -136,7 +136,7 @@ var Z = /* @__PURE__ */ j(ue, [["render", fe]]), pe = [
|
|
|
136
136
|
], xe = { class: "tpl:flex tpl:items-center tpl:gap-1" }, Se = ["aria-label", "title"], Ce = {
|
|
137
137
|
key: 1,
|
|
138
138
|
class: "tpl:flex tpl:items-center tpl:gap-2 tpl:px-2 tpl:text-xs tpl:text-[var(--tpl-text-dim)]"
|
|
139
|
-
}, we = /* @__PURE__ */
|
|
139
|
+
}, we = /* @__PURE__ */ e({
|
|
140
140
|
__name: "ParagraphToolbar",
|
|
141
141
|
props: {
|
|
142
142
|
editor: {},
|
|
@@ -146,104 +146,104 @@ var Z = /* @__PURE__ */ j(ue, [["render", fe]]), pe = [
|
|
|
146
146
|
},
|
|
147
147
|
emits: ["open-link-dialog", "add-merge-tag"],
|
|
148
148
|
setup(e, { emit: n }) {
|
|
149
|
-
let
|
|
149
|
+
let i = e, c = n, m = t(E, null), g = t(k, null), _ = A(w, "ParagraphToolbar"), { t: v } = C(), x = _.fonts;
|
|
150
|
+
function S(e) {
|
|
151
|
+
i.editor?.chain().focus().insertContent(e).run();
|
|
152
|
+
}
|
|
150
153
|
function T(e) {
|
|
151
|
-
|
|
154
|
+
return i.editor?.getAttributes("textStyle")[e] || "";
|
|
152
155
|
}
|
|
153
156
|
function D(e) {
|
|
154
|
-
|
|
155
|
-
}
|
|
156
|
-
function k(e) {
|
|
157
|
-
let t = r.editor?.chain().focus();
|
|
157
|
+
let t = i.editor?.chain().focus();
|
|
158
158
|
e ? t?.setFontFamily(e).run() : t?.unsetFontFamily().run();
|
|
159
159
|
}
|
|
160
|
-
function
|
|
161
|
-
let t =
|
|
160
|
+
function O(e) {
|
|
161
|
+
let t = i.editor?.chain().focus();
|
|
162
162
|
e ? t?.setFontSize(e).run() : t?.unsetFontSize().run();
|
|
163
163
|
}
|
|
164
164
|
function j(e) {
|
|
165
|
-
let t =
|
|
165
|
+
let t = i.editor?.chain().focus();
|
|
166
166
|
e ? t?.setColor(e).run() : t?.unsetColor().run();
|
|
167
167
|
}
|
|
168
|
-
function
|
|
169
|
-
return
|
|
168
|
+
function H() {
|
|
169
|
+
return i.editor?.getAttributes("paragraph").lineHeight || "";
|
|
170
170
|
}
|
|
171
171
|
function K(e) {
|
|
172
|
-
let t =
|
|
172
|
+
let t = i.editor?.chain().focus();
|
|
173
173
|
e ? t?.setLineHeight(e).run() : t?.unsetLineHeight().run();
|
|
174
174
|
}
|
|
175
175
|
function q(e) {
|
|
176
|
-
let t =
|
|
176
|
+
let t = i.editor?.chain().focus();
|
|
177
177
|
e && e !== "normal" ? t?.setLetterSpacing(e).run() : t?.unsetLetterSpacing().run();
|
|
178
178
|
}
|
|
179
179
|
function J() {
|
|
180
|
-
return
|
|
180
|
+
return i.editor?.getAttributes("highlight").color || "";
|
|
181
181
|
}
|
|
182
182
|
function Y(e) {
|
|
183
|
-
let t =
|
|
183
|
+
let t = i.editor?.chain().focus();
|
|
184
184
|
e ? t?.setHighlight({ color: e }).run() : t?.unsetHighlight().run();
|
|
185
185
|
}
|
|
186
|
-
return (t, n) => (
|
|
187
|
-
"data-tpl-theme":
|
|
186
|
+
return (t, n) => (r(), f(h, { to: "body" }, [p("div", {
|
|
187
|
+
"data-tpl-theme": s(g),
|
|
188
188
|
role: "toolbar",
|
|
189
|
-
"aria-label":
|
|
189
|
+
"aria-label": s(v).paragraphEditor.toolbar,
|
|
190
190
|
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",
|
|
191
|
-
style:
|
|
192
|
-
...
|
|
191
|
+
style: l({
|
|
192
|
+
...s(m),
|
|
193
193
|
top: `${e.toolbarPosition.top}px`,
|
|
194
194
|
left: `${e.toolbarPosition.left}px`,
|
|
195
195
|
transform: "translateY(-100%)",
|
|
196
196
|
flexDirection: "column"
|
|
197
197
|
})
|
|
198
|
-
}, [!e.isLoading && e.editor ? (
|
|
199
|
-
|
|
200
|
-
"model-value":
|
|
201
|
-
options:
|
|
202
|
-
label:
|
|
203
|
-
placeholder:
|
|
198
|
+
}, [!e.isLoading && e.editor ? (r(), y(u, { key: 0 }, [p("div", _e, [
|
|
199
|
+
b(Q, {
|
|
200
|
+
"model-value": T("fontFamily"),
|
|
201
|
+
options: s(x),
|
|
202
|
+
label: s(v).paragraphEditor.fontFamily,
|
|
203
|
+
placeholder: s(v).paragraphEditor.defaultFont,
|
|
204
204
|
"width-class": "tpl:w-32",
|
|
205
|
-
"onUpdate:modelValue":
|
|
205
|
+
"onUpdate:modelValue": D
|
|
206
206
|
}, null, 8, [
|
|
207
207
|
"model-value",
|
|
208
208
|
"options",
|
|
209
209
|
"label",
|
|
210
210
|
"placeholder"
|
|
211
211
|
]),
|
|
212
|
-
|
|
213
|
-
"model-value":
|
|
214
|
-
options:
|
|
215
|
-
label:
|
|
216
|
-
placeholder:
|
|
212
|
+
b(Q, {
|
|
213
|
+
"model-value": T("fontSize"),
|
|
214
|
+
options: s(U),
|
|
215
|
+
label: s(v).paragraphEditor.fontSize,
|
|
216
|
+
placeholder: s(v).paragraphEditor.defaultSize,
|
|
217
217
|
"width-class": "tpl:w-20",
|
|
218
|
-
"onUpdate:modelValue":
|
|
218
|
+
"onUpdate:modelValue": O
|
|
219
219
|
}, null, 8, [
|
|
220
220
|
"model-value",
|
|
221
221
|
"options",
|
|
222
222
|
"label",
|
|
223
223
|
"placeholder"
|
|
224
224
|
]),
|
|
225
|
-
|
|
226
|
-
|
|
225
|
+
b(Z),
|
|
226
|
+
p("div", ve, [p("input", {
|
|
227
227
|
type: "color",
|
|
228
228
|
class: "tpl:size-8 tpl:cursor-pointer tpl:rounded tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:p-1",
|
|
229
|
-
value:
|
|
230
|
-
"aria-label":
|
|
231
|
-
title:
|
|
229
|
+
value: T("color") || s("#000000"),
|
|
230
|
+
"aria-label": s(v).paragraphEditor.textColor,
|
|
231
|
+
title: s(v).paragraphEditor.textColor,
|
|
232
232
|
onInput: n[0] ||= (e) => j(e.target.value)
|
|
233
233
|
}, null, 40, ye)]),
|
|
234
|
-
|
|
234
|
+
p("div", be, [p("input", {
|
|
235
235
|
type: "color",
|
|
236
236
|
class: "tpl:size-8 tpl:cursor-pointer tpl:rounded tpl:border tpl:border-[var(--tpl-border)] tpl:p-1",
|
|
237
|
-
style:
|
|
238
|
-
value: J() ||
|
|
239
|
-
"aria-label":
|
|
240
|
-
title:
|
|
237
|
+
style: l({ backgroundColor: J() || "var(--tpl-bg)" }),
|
|
238
|
+
value: J() || s("#ffff00"),
|
|
239
|
+
"aria-label": s(v).paragraphEditor.highlightColor,
|
|
240
|
+
title: s(v).paragraphEditor.highlightColor,
|
|
241
241
|
onInput: n[1] ||= (e) => Y(e.target.value)
|
|
242
242
|
}, null, 44, $)]),
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
icon:
|
|
246
|
-
label:
|
|
243
|
+
b(Z),
|
|
244
|
+
b(X, {
|
|
245
|
+
icon: s(V),
|
|
246
|
+
label: s(v).paragraphEditor.bold,
|
|
247
247
|
active: e.editor.isActive("bold"),
|
|
248
248
|
"stroke-width": 2.5,
|
|
249
249
|
onClick: n[2] ||= (t) => e.editor.chain().focus().toggleBold().run()
|
|
@@ -252,9 +252,9 @@ var Z = /* @__PURE__ */ j(ue, [["render", fe]]), pe = [
|
|
|
252
252
|
"label",
|
|
253
253
|
"active"
|
|
254
254
|
]),
|
|
255
|
-
|
|
256
|
-
icon:
|
|
257
|
-
label:
|
|
255
|
+
b(X, {
|
|
256
|
+
icon: s(re),
|
|
257
|
+
label: s(v).paragraphEditor.italic,
|
|
258
258
|
active: e.editor.isActive("italic"),
|
|
259
259
|
onClick: n[3] ||= (t) => e.editor.chain().focus().toggleItalic().run()
|
|
260
260
|
}, null, 8, [
|
|
@@ -262,9 +262,9 @@ var Z = /* @__PURE__ */ j(ue, [["render", fe]]), pe = [
|
|
|
262
262
|
"label",
|
|
263
263
|
"active"
|
|
264
264
|
]),
|
|
265
|
-
|
|
266
|
-
icon:
|
|
267
|
-
label:
|
|
265
|
+
b(X, {
|
|
266
|
+
icon: s(I),
|
|
267
|
+
label: s(v).paragraphEditor.underline,
|
|
268
268
|
active: e.editor.isActive("underline"),
|
|
269
269
|
onClick: n[4] ||= (t) => e.editor.chain().focus().toggleUnderline().run()
|
|
270
270
|
}, null, 8, [
|
|
@@ -272,9 +272,9 @@ var Z = /* @__PURE__ */ j(ue, [["render", fe]]), pe = [
|
|
|
272
272
|
"label",
|
|
273
273
|
"active"
|
|
274
274
|
]),
|
|
275
|
-
|
|
276
|
-
icon:
|
|
277
|
-
label:
|
|
275
|
+
b(X, {
|
|
276
|
+
icon: s(R),
|
|
277
|
+
label: s(v).paragraphEditor.strikethrough,
|
|
278
278
|
active: e.editor.isActive("strike"),
|
|
279
279
|
onClick: n[5] ||= (t) => e.editor.chain().focus().toggleStrike().run()
|
|
280
280
|
}, null, 8, [
|
|
@@ -282,10 +282,10 @@ var Z = /* @__PURE__ */ j(ue, [["render", fe]]), pe = [
|
|
|
282
282
|
"label",
|
|
283
283
|
"active"
|
|
284
284
|
]),
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
icon:
|
|
288
|
-
label:
|
|
285
|
+
b(Z),
|
|
286
|
+
b(X, {
|
|
287
|
+
icon: s(z),
|
|
288
|
+
label: s(v).paragraphEditor.subscript,
|
|
289
289
|
active: e.editor.isActive("subscript"),
|
|
290
290
|
onClick: n[6] ||= (t) => e.editor.chain().focus().toggleSubscript().run()
|
|
291
291
|
}, null, 8, [
|
|
@@ -293,9 +293,9 @@ var Z = /* @__PURE__ */ j(ue, [["render", fe]]), pe = [
|
|
|
293
293
|
"label",
|
|
294
294
|
"active"
|
|
295
295
|
]),
|
|
296
|
-
|
|
297
|
-
icon:
|
|
298
|
-
label:
|
|
296
|
+
b(X, {
|
|
297
|
+
icon: s(F),
|
|
298
|
+
label: s(v).paragraphEditor.superscript,
|
|
299
299
|
active: e.editor.isActive("superscript"),
|
|
300
300
|
onClick: n[7] ||= (t) => e.editor.chain().focus().toggleSuperscript().run()
|
|
301
301
|
}, null, 8, [
|
|
@@ -303,21 +303,21 @@ var Z = /* @__PURE__ */ j(ue, [["render", fe]]), pe = [
|
|
|
303
303
|
"label",
|
|
304
304
|
"active"
|
|
305
305
|
]),
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
icon:
|
|
309
|
-
label:
|
|
306
|
+
b(Z),
|
|
307
|
+
b(X, {
|
|
308
|
+
icon: s(te),
|
|
309
|
+
label: s(v).paragraphEditor.addLink,
|
|
310
310
|
active: e.editor.isActive("link"),
|
|
311
|
-
onClick: n[8] ||= (e) =>
|
|
311
|
+
onClick: n[8] ||= (e) => c("open-link-dialog")
|
|
312
312
|
}, null, 8, [
|
|
313
313
|
"icon",
|
|
314
314
|
"label",
|
|
315
315
|
"active"
|
|
316
316
|
])
|
|
317
|
-
]),
|
|
318
|
-
|
|
319
|
-
icon:
|
|
320
|
-
label:
|
|
317
|
+
]), p("div", xe, [
|
|
318
|
+
b(X, {
|
|
319
|
+
icon: s(ne),
|
|
320
|
+
label: s(v).paragraphEditor.bulletList,
|
|
321
321
|
active: e.editor.isActive("bulletList"),
|
|
322
322
|
onClick: n[9] ||= (t) => e.editor.chain().focus().toggleBulletList().run()
|
|
323
323
|
}, null, 8, [
|
|
@@ -325,9 +325,9 @@ var Z = /* @__PURE__ */ j(ue, [["render", fe]]), pe = [
|
|
|
325
325
|
"label",
|
|
326
326
|
"active"
|
|
327
327
|
]),
|
|
328
|
-
|
|
329
|
-
icon:
|
|
330
|
-
label:
|
|
328
|
+
b(X, {
|
|
329
|
+
icon: s(ee),
|
|
330
|
+
label: s(v).paragraphEditor.numberedList,
|
|
331
331
|
active: e.editor.isActive("orderedList"),
|
|
332
332
|
onClick: n[10] ||= (t) => e.editor.chain().focus().toggleOrderedList().run()
|
|
333
333
|
}, null, 8, [
|
|
@@ -335,10 +335,10 @@ var Z = /* @__PURE__ */ j(ue, [["render", fe]]), pe = [
|
|
|
335
335
|
"label",
|
|
336
336
|
"active"
|
|
337
337
|
]),
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
icon:
|
|
341
|
-
label:
|
|
338
|
+
b(Z),
|
|
339
|
+
b(X, {
|
|
340
|
+
icon: s(B),
|
|
341
|
+
label: s(v).paragraphEditor.alignLeft,
|
|
342
342
|
active: e.editor.isActive({ textAlign: "left" }),
|
|
343
343
|
onClick: n[11] ||= (t) => e.editor.chain().focus().setTextAlign("left").run()
|
|
344
344
|
}, null, 8, [
|
|
@@ -346,9 +346,9 @@ var Z = /* @__PURE__ */ j(ue, [["render", fe]]), pe = [
|
|
|
346
346
|
"label",
|
|
347
347
|
"active"
|
|
348
348
|
]),
|
|
349
|
-
|
|
350
|
-
icon:
|
|
351
|
-
label:
|
|
349
|
+
b(X, {
|
|
350
|
+
icon: s(L),
|
|
351
|
+
label: s(v).paragraphEditor.alignCenter,
|
|
352
352
|
active: e.editor.isActive({ textAlign: "center" }),
|
|
353
353
|
onClick: n[12] ||= (t) => e.editor.chain().focus().setTextAlign("center").run()
|
|
354
354
|
}, null, 8, [
|
|
@@ -356,9 +356,9 @@ var Z = /* @__PURE__ */ j(ue, [["render", fe]]), pe = [
|
|
|
356
356
|
"label",
|
|
357
357
|
"active"
|
|
358
358
|
]),
|
|
359
|
-
|
|
360
|
-
icon:
|
|
361
|
-
label:
|
|
359
|
+
b(X, {
|
|
360
|
+
icon: s(ie),
|
|
361
|
+
label: s(v).paragraphEditor.alignRight,
|
|
362
362
|
active: e.editor.isActive({ textAlign: "right" }),
|
|
363
363
|
onClick: n[13] ||= (t) => e.editor.chain().focus().setTextAlign("right").run()
|
|
364
364
|
}, null, 8, [
|
|
@@ -366,11 +366,11 @@ var Z = /* @__PURE__ */ j(ue, [["render", fe]]), pe = [
|
|
|
366
366
|
"label",
|
|
367
367
|
"active"
|
|
368
368
|
]),
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
"model-value":
|
|
372
|
-
options:
|
|
373
|
-
label:
|
|
369
|
+
b(Z),
|
|
370
|
+
b(Q, {
|
|
371
|
+
"model-value": H(),
|
|
372
|
+
options: s(G),
|
|
373
|
+
label: s(v).paragraphEditor.lineHeight,
|
|
374
374
|
placeholder: "LH",
|
|
375
375
|
"width-class": "tpl:w-16",
|
|
376
376
|
"onUpdate:modelValue": K
|
|
@@ -379,10 +379,10 @@ var Z = /* @__PURE__ */ j(ue, [["render", fe]]), pe = [
|
|
|
379
379
|
"options",
|
|
380
380
|
"label"
|
|
381
381
|
]),
|
|
382
|
-
|
|
383
|
-
"model-value":
|
|
384
|
-
options:
|
|
385
|
-
label:
|
|
382
|
+
b(Q, {
|
|
383
|
+
"model-value": T("letterSpacing"),
|
|
384
|
+
options: s(W),
|
|
385
|
+
label: s(v).paragraphEditor.letterSpacing,
|
|
386
386
|
placeholder: "LS",
|
|
387
387
|
"width-class": "tpl:w-20",
|
|
388
388
|
"onUpdate:modelValue": q
|
|
@@ -391,31 +391,31 @@ var Z = /* @__PURE__ */ j(ue, [["render", fe]]), pe = [
|
|
|
391
391
|
"options",
|
|
392
392
|
"label"
|
|
393
393
|
]),
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
icon:
|
|
397
|
-
label:
|
|
394
|
+
b(Z),
|
|
395
|
+
b(X, {
|
|
396
|
+
icon: s(P),
|
|
397
|
+
label: s(v).paragraphEditor.clearFormatting,
|
|
398
398
|
onClick: n[14] ||= (t) => e.editor.chain().focus().clearNodes().unsetAllMarks().run()
|
|
399
399
|
}, null, 8, ["icon", "label"]),
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
e.canRequestMergeTag ? (
|
|
400
|
+
b(Z),
|
|
401
|
+
b(ce, { onInsert: S }),
|
|
402
|
+
e.canRequestMergeTag ? (r(), y(u, { key: 0 }, [b(Z), p("button", {
|
|
403
403
|
type: "button",
|
|
404
404
|
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)]",
|
|
405
|
-
"aria-label":
|
|
406
|
-
title:
|
|
407
|
-
onClick: n[15] ||= (e) =>
|
|
408
|
-
}, [
|
|
405
|
+
"aria-label": s(v).mergeTag.add,
|
|
406
|
+
title: s(v).mergeTag.add,
|
|
407
|
+
onClick: n[15] ||= (e) => c("add-merge-tag")
|
|
408
|
+
}, [b(s(N), {
|
|
409
409
|
size: 16,
|
|
410
410
|
"stroke-width": 2
|
|
411
|
-
}),
|
|
412
|
-
])], 64)) : (
|
|
411
|
+
}), o(" " + d(s(v).mergeTag.add), 1)], 8, Se)], 64)) : a("", !0)
|
|
412
|
+
])], 64)) : (r(), y("div", Ce, [b(s(M), {
|
|
413
413
|
class: "tpl-spinner",
|
|
414
414
|
size: 14,
|
|
415
415
|
"stroke-width": 2
|
|
416
|
-
}),
|
|
416
|
+
}), o(" " + d(s(v).errors.editorLoading), 1)]))], 12, ge)]));
|
|
417
417
|
}
|
|
418
|
-
}), Te = { class: "tpl-text-editor-wrapper tpl:relative" }, Ee = /* @__PURE__ */
|
|
418
|
+
}), Te = { class: "tpl-text-editor-wrapper tpl:relative" }, Ee = /* @__PURE__ */ e({
|
|
419
419
|
__name: "ParagraphEditor",
|
|
420
420
|
props: {
|
|
421
421
|
block: {},
|
|
@@ -423,25 +423,25 @@ var Z = /* @__PURE__ */ j(ue, [["render", fe]]), pe = [
|
|
|
423
423
|
},
|
|
424
424
|
emits: ["done"],
|
|
425
425
|
setup(e, { emit: t }) {
|
|
426
|
-
let n = e, a = t, { editor: o, EditorContent:
|
|
426
|
+
let n = e, a = t, { editor: o, EditorContent: c, isLoading: l, initError: u, retry: d, showLinkDialog: f, linkUrl: p, linkDialogRef: m, canRequestMergeTag: h, openLinkDialog: g, insertLink: _, removeLink: v, closeLinkDialog: x, handleLinkKeydown: C, handleAddMergeTag: w } = S({
|
|
427
427
|
blockId: () => n.block.id,
|
|
428
428
|
blockContent: () => n.block.content,
|
|
429
429
|
onDone: () => a("done"),
|
|
430
430
|
editorName: "ParagraphEditor",
|
|
431
431
|
async loadExtensions({ mergeTags: e, syntax: t, triggerChar: n, autocompleteEnabled: r, suggestionEmptyText: i }) {
|
|
432
432
|
let [{ Editor: a, EditorContent: o }, { default: s }, { default: c }, { default: l }, { default: u }, { default: d }, { default: f }, { TextStyle: p }, { default: m }, { default: h }, { default: g }, { MergeTagNode: _, MergeTagSuggestion: v, LogicMergeTagNode: y, FontSize: b, LineHeight: x, LetterSpacing: S }] = await Promise.all([
|
|
433
|
-
import("./tiptap-
|
|
434
|
-
import("./tiptap-
|
|
435
|
-
import("./tiptap-
|
|
436
|
-
import("./tiptap-
|
|
437
|
-
import("./tiptap-
|
|
438
|
-
import("./tiptap-
|
|
439
|
-
import("./tiptap-
|
|
440
|
-
import("./tiptap-
|
|
441
|
-
import("./tiptap-
|
|
442
|
-
import("./tiptap-
|
|
443
|
-
import("./tiptap-
|
|
444
|
-
import("./extensions-
|
|
433
|
+
import("./tiptap-CDzAbF2j.js").then((e) => e.i),
|
|
434
|
+
import("./tiptap-CDzAbF2j.js").then((e) => e.a),
|
|
435
|
+
import("./tiptap-CDzAbF2j.js").then((e) => e.u),
|
|
436
|
+
import("./tiptap-CDzAbF2j.js").then((e) => e.o),
|
|
437
|
+
import("./tiptap-CDzAbF2j.js").then((e) => e.l),
|
|
438
|
+
import("./tiptap-CDzAbF2j.js").then((e) => e.c),
|
|
439
|
+
import("./tiptap-CDzAbF2j.js").then((e) => e.s),
|
|
440
|
+
import("./tiptap-CDzAbF2j.js").then((e) => e.m),
|
|
441
|
+
import("./tiptap-CDzAbF2j.js").then((e) => e.p),
|
|
442
|
+
import("./tiptap-CDzAbF2j.js").then((e) => e.f),
|
|
443
|
+
import("./tiptap-CDzAbF2j.js").then((e) => e.d),
|
|
444
|
+
import("./extensions-BVKQw_sp.js")
|
|
445
445
|
]);
|
|
446
446
|
return {
|
|
447
447
|
TiptapEditor: a,
|
|
@@ -485,14 +485,14 @@ var Z = /* @__PURE__ */ j(ue, [["render", fe]]), pe = [
|
|
|
485
485
|
};
|
|
486
486
|
}
|
|
487
487
|
});
|
|
488
|
-
return (t, n) => (
|
|
489
|
-
|
|
490
|
-
editor:
|
|
488
|
+
return (t, n) => (r(), y("div", Te, [
|
|
489
|
+
b(we, {
|
|
490
|
+
editor: s(o),
|
|
491
491
|
"toolbar-position": e.toolbarPosition,
|
|
492
|
-
"is-loading":
|
|
493
|
-
"can-request-merge-tag":
|
|
494
|
-
onOpenLinkDialog:
|
|
495
|
-
onAddMergeTag:
|
|
492
|
+
"is-loading": s(l),
|
|
493
|
+
"can-request-merge-tag": s(h),
|
|
494
|
+
onOpenLinkDialog: s(g),
|
|
495
|
+
onAddMergeTag: s(w)
|
|
496
496
|
}, null, 8, [
|
|
497
497
|
"editor",
|
|
498
498
|
"toolbar-position",
|
|
@@ -501,12 +501,12 @@ var Z = /* @__PURE__ */ j(ue, [["render", fe]]), pe = [
|
|
|
501
501
|
"onOpenLinkDialog",
|
|
502
502
|
"onAddMergeTag"
|
|
503
503
|
]),
|
|
504
|
-
|
|
505
|
-
editor:
|
|
506
|
-
"editor-content": c
|
|
507
|
-
"is-loading":
|
|
508
|
-
"init-error":
|
|
509
|
-
onRetry:
|
|
504
|
+
b(q, {
|
|
505
|
+
editor: s(o),
|
|
506
|
+
"editor-content": s(c),
|
|
507
|
+
"is-loading": s(l),
|
|
508
|
+
"init-error": s(u),
|
|
509
|
+
onRetry: s(d)
|
|
510
510
|
}, null, 8, [
|
|
511
511
|
"editor",
|
|
512
512
|
"editor-content",
|
|
@@ -514,17 +514,17 @@ var Z = /* @__PURE__ */ j(ue, [["render", fe]]), pe = [
|
|
|
514
514
|
"init-error",
|
|
515
515
|
"onRetry"
|
|
516
516
|
]),
|
|
517
|
-
|
|
518
|
-
visible:
|
|
519
|
-
"is-editing-link":
|
|
520
|
-
"dialog-ref":
|
|
521
|
-
"onUpdate:dialogRef": n[0] ||= (e) =>
|
|
522
|
-
"link-url":
|
|
523
|
-
"onUpdate:linkUrl": n[1] ||= (e) =>
|
|
524
|
-
onClose:
|
|
525
|
-
onInsert:
|
|
526
|
-
onRemove:
|
|
527
|
-
onKeydown:
|
|
517
|
+
b(K, {
|
|
518
|
+
visible: s(f),
|
|
519
|
+
"is-editing-link": s(o)?.isActive("link") ?? !1,
|
|
520
|
+
"dialog-ref": s(m),
|
|
521
|
+
"onUpdate:dialogRef": n[0] ||= (e) => i(m) ? m.value = e : null,
|
|
522
|
+
"link-url": s(p),
|
|
523
|
+
"onUpdate:linkUrl": n[1] ||= (e) => i(p) ? p.value = e : null,
|
|
524
|
+
onClose: s(x),
|
|
525
|
+
onInsert: s(_),
|
|
526
|
+
onRemove: s(v),
|
|
527
|
+
onKeydown: s(C)
|
|
528
528
|
}, null, 8, [
|
|
529
529
|
"visible",
|
|
530
530
|
"is-editing-link",
|
|
@@ -541,4 +541,4 @@ var Z = /* @__PURE__ */ j(ue, [["render", fe]]), pe = [
|
|
|
541
541
|
//#endregion
|
|
542
542
|
export { Ee as default };
|
|
543
543
|
|
|
544
|
-
//# sourceMappingURL=ParagraphEditor-
|
|
544
|
+
//# sourceMappingURL=ParagraphEditor-BA1WbHI7.js.map
|