@templatical/editor 0.0.5 → 0.1.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/LICENSE +56 -0
- package/README.md +69 -0
- package/dist/{AiChatSidebar-DwME3f-a.js → AiChatSidebar-DSbBLDkW.js} +9 -9
- package/dist/{AiFeatureMenu-DJvWL1GZ.js → AiFeatureMenu-d04gmgud.js} +5 -5
- package/dist/{CloudEditor-Fe0ssRgi.js → CloudEditor-CjO4tzbV.js} +218 -227
- package/dist/{CollaboratorBar-DTT0EkZn.js → CollaboratorBar-DYBSTuMW.js} +3 -3
- package/dist/{CommentsSidebar-DrJhQRXK.js → CommentsSidebar-CQvUh5xt.js} +9 -9
- package/dist/CountdownBlock-D3olfssJ.js +92 -0
- package/dist/CountdownToolbar-ClpBwFoX.js +210 -0
- package/dist/{DesignReferenceSidebar-DdOht5zn.js → DesignReferenceSidebar-BOfeETis.js} +5 -5
- package/dist/{LoadingTrack-vK8W2PJf.js → LoadingTrack-CdqDYVR-.js} +1 -1
- package/dist/{ModuleBrowserModal-CiV_jOEM.js → ModuleBrowserModal-DKSSQonv.js} +7 -7
- package/dist/{ModulePreviewCanvas-Bmy6Y1WE.js → ModulePreviewCanvas-CoLNuu1o.js} +32 -32
- package/dist/NumberWithSuffix-_0l3Q4jq.js +424 -0
- package/dist/{ParagraphEditor-CoQ3NlS7.js → ParagraphEditor-C9R2ou7x.js} +57 -56
- package/dist/{RichTextEditorContent-CHJlh7HJ.js → RichTextEditorContent-BcY3Rcp4.js} +2 -2
- package/dist/{SaveModuleDialog-CD2ZYq1o.js → SaveModuleDialog-DmFe4VUc.js} +3 -3
- package/dist/{SnapshotHistory-DltsKvhP.js → SnapshotHistory-CAhikAOr.js} +7 -7
- package/dist/{TemplateScoringPanel-DmnmUE3y.js → TemplateScoringPanel-b5DnyIll.js} +10 -10
- package/dist/{TestEmailModal-Dl633j9o.js → TestEmailModal-BmDIzGYz.js} +3 -3
- package/dist/{TitleEditor-C7fds2Nc.js → TitleEditor-DtRYx-LS.js} +11 -11
- package/dist/{TplModal-C5_CF-qn.js → TplModal-BLbMDMd6.js} +4 -4
- package/dist/{_plugin-vue_export-helper-B1-bu7yR.js → _plugin-vue_export-helper-BHUPLLh1.js} +2 -2
- package/dist/{blockTypeIcons-BrKZB10B.js → blockTypeIcons-CEU2dMe1.js} +2 -2
- package/dist/cdn/chunks/{AiFeatureMenu-C5UQmEgV.js → AiFeatureMenu-DWMSYD2J.js} +4 -4
- package/dist/cdn/chunks/{AiFeatureMenu-C5UQmEgV.js.map → AiFeatureMenu-DWMSYD2J.js.map} +1 -1
- package/dist/cdn/chunks/{CloudEditor-DeTolKnf.js → CloudEditor-HrfSfr3G.js} +179 -188
- package/dist/cdn/chunks/CloudEditor-HrfSfr3G.js.map +1 -0
- package/dist/cdn/chunks/{CollaboratorBar-DO1nxSrr.js → CollaboratorBar-Cfok52TZ.js} +4 -4
- package/dist/cdn/chunks/{CollaboratorBar-DO1nxSrr.js.map → CollaboratorBar-Cfok52TZ.js.map} +1 -1
- package/dist/cdn/chunks/CountdownBlock-CkV21NEM.js +93 -0
- package/dist/cdn/chunks/CountdownBlock-CkV21NEM.js.map +1 -0
- package/dist/cdn/chunks/CountdownToolbar-CEmbR7kt.js +212 -0
- package/dist/cdn/chunks/CountdownToolbar-CEmbR7kt.js.map +1 -0
- package/dist/cdn/chunks/{ModuleBrowserModal-ChBr3aXj.js → ModuleBrowserModal-sASaPRot.js} +7 -7
- package/dist/cdn/chunks/{ModuleBrowserModal-ChBr3aXj.js.map → ModuleBrowserModal-sASaPRot.js.map} +1 -1
- package/dist/cdn/chunks/{ModulePreviewCanvas-DkSvri9H.js → ModulePreviewCanvas-D8zsajMf.js} +19 -19
- package/dist/cdn/chunks/{ModulePreviewCanvas-DkSvri9H.js.map → ModulePreviewCanvas-D8zsajMf.js.map} +1 -1
- package/dist/cdn/chunks/NumberWithSuffix-k5Te7Tuw.js +425 -0
- package/dist/cdn/chunks/NumberWithSuffix-k5Te7Tuw.js.map +1 -0
- package/dist/cdn/chunks/{ParagraphEditor-DU3oUKA7.js → ParagraphEditor-C1vQWGzW.js} +37 -37
- package/dist/cdn/chunks/ParagraphEditor-C1vQWGzW.js.map +1 -0
- package/dist/cdn/chunks/{RichTextEditorContent-BrsW1p9s.js → RichTextEditorContent-CT8dBB0R.js} +5 -5
- package/dist/cdn/chunks/{RichTextEditorContent-BrsW1p9s.js.map → RichTextEditorContent-CT8dBB0R.js.map} +1 -1
- package/dist/cdn/chunks/{SaveModuleDialog-CjqKkTEc.js → SaveModuleDialog-BkwKrB0N.js} +5 -5
- package/dist/cdn/chunks/{SaveModuleDialog-CjqKkTEc.js.map → SaveModuleDialog-BkwKrB0N.js.map} +1 -1
- package/dist/cdn/chunks/{TitleEditor-C8FYbadT.js → TitleEditor-BXqt42Px.js} +11 -11
- package/dist/cdn/chunks/{TitleEditor-C8FYbadT.js.map → TitleEditor-BXqt42Px.js.map} +1 -1
- package/dist/cdn/chunks/{blockTypeIcons-5QwYklNq.js → blockTypeIcons-BS6pWyGO.js} +3 -3
- package/dist/cdn/chunks/{blockTypeIcons-5QwYklNq.js.map → blockTypeIcons-BS6pWyGO.js.map} +1 -1
- package/dist/cdn/chunks/{de-BvYD17KT.js → de-3exf7MYE.js} +1 -1
- package/dist/cdn/chunks/{de-BvYD17KT.js.map → de-3exf7MYE.js.map} +1 -1
- package/dist/cdn/chunks/{de-BB3dgVOc.js → de-C8LxVUsb.js} +1 -1
- package/dist/cdn/chunks/de-C8LxVUsb.js.map +1 -0
- package/dist/cdn/chunks/{dist-KYv9v_1z2.js → dist-BpOx-ugr.js} +10 -3
- package/dist/cdn/chunks/dist-BpOx-ugr.js.map +1 -0
- package/dist/cdn/chunks/{draggable-BQNU47zu.js → draggable-Bcb86AsV.js} +1591 -1563
- package/dist/cdn/chunks/draggable-Bcb86AsV.js.map +1 -0
- package/dist/cdn/chunks/{emojiData-BVEJHcNH.js → emojiData-DUHzsh4j.js} +1 -1
- package/dist/cdn/chunks/{emojiData-BVEJHcNH.js.map → emojiData-DUHzsh4j.js.map} +1 -1
- package/dist/cdn/chunks/{en-DeDcpnoS.js → en-BoEycuqw.js} +1 -1
- package/dist/cdn/chunks/en-BoEycuqw.js.map +1 -0
- package/dist/cdn/chunks/{en-CpotcOPr.js → en-KNPUKxYp.js} +1 -1
- package/dist/cdn/chunks/{en-CpotcOPr.js.map → en-KNPUKxYp.js.map} +1 -1
- package/dist/cdn/chunks/{extensions-Bj7USRLr.js → extensions-DBxH6pz0.js} +21 -21
- package/dist/cdn/chunks/{extensions-Bj7USRLr.js.map → extensions-DBxH6pz0.js.map} +1 -1
- package/dist/cdn/chunks/{features-Ds0XUfte.js → features-C3n7AeUc.js} +1338 -1422
- package/dist/cdn/chunks/features-C3n7AeUc.js.map +1 -0
- package/dist/cdn/chunks/{icons-fWsuSvgd.js → icons-Hmpb0_8s.js} +2 -2
- package/dist/cdn/chunks/icons-Hmpb0_8s.js.map +1 -0
- package/dist/cdn/chunks/{liquid.browser-C1VIYISn.js → liquid.browser-CEMn-ZqL.js} +24 -17
- package/dist/cdn/chunks/liquid.browser-CEMn-ZqL.js.map +1 -0
- package/dist/cdn/chunks/{media-library-BGQm_OyC.js → media-library-C1wCpRY1.js} +114 -110
- package/dist/cdn/chunks/media-library-C1wCpRY1.js.map +1 -0
- package/dist/cdn/chunks/{pusher-DJPhQnE8.js → pusher-DwSQn6BA.js} +11 -8
- package/dist/cdn/chunks/pusher-DwSQn6BA.js.map +1 -0
- package/dist/cdn/chunks/readableTextColor-Cd_cgWO_.js.map +1 -1
- package/dist/cdn/chunks/{rolldown-runtime-DPITmOBR.js → rolldown-runtime-BNuo_Jkg.js} +1 -1
- package/dist/cdn/chunks/{src-3i8rPuqd.js → src-BUszJqfd.js} +8 -8
- package/dist/cdn/chunks/{src-3i8rPuqd.js.map → src-BUszJqfd.js.map} +1 -1
- package/dist/cdn/chunks/{styleConstants-DFe3I4Op.js → styleConstants-DP1VOca8.js} +1 -1
- package/dist/cdn/chunks/{styleConstants-DFe3I4Op.js.map → styleConstants-DP1VOca8.js.map} +1 -1
- package/dist/cdn/chunks/{styles-Dgijy53u.js → styles-U2VFFgxC.js} +623 -1239
- package/dist/cdn/chunks/styles-U2VFFgxC.js.map +1 -0
- package/dist/cdn/chunks/{tiptap-BhxaWR8R.js → tiptap-w5IqC8oW.js} +1610 -1364
- package/dist/cdn/chunks/tiptap-w5IqC8oW.js.map +1 -0
- package/dist/cdn/editor.css +1 -1
- package/dist/cdn/editor.js +92 -97
- package/dist/cdn/editor.js.map +1 -1
- package/dist/{check-B7kDuZmP.js → check-BDE2uFIC.js} +1 -1
- package/dist/{chevron-down-DJLW2Q9Z.js → chevron-down-BL1DcOiT.js} +1 -1
- package/dist/{circle-alert-E2vYPs5r.js → circle-alert-1tetIFJU.js} +1 -1
- package/dist/{clock-lWIIQA3C.js → clock-CNc3isoG.js} +1 -1
- package/dist/{dist-DysAFIPy.js → dist-7SaUYnxo.js} +385 -357
- package/dist/{dist-DmOE-Ubp.js → dist-BKZ5gvJf.js} +5 -5
- package/dist/{dist-CG-vEqSU.js → dist-CLg2qE0p.js} +2 -2
- package/dist/dist-CdzaZZSx.js +5 -0
- package/dist/dist-Cl9giA3B.js +5 -0
- package/dist/{dist-C_ymrGFi.js → dist-CpHKN3mI.js} +541 -508
- package/dist/{dist-4LiM9FDd.js → dist-DMuaebdo.js} +2 -2
- package/dist/{dist-ChAGLpWo.js → dist-DW_4_uv3.js} +2 -2
- package/dist/{dist-C1BIRHCQ.js → dist-DYG6FL7b.js} +2 -2
- package/dist/{dist-DrvKRSU6.js → dist-DbFMBx8E.js} +2 -2
- package/dist/{dist-D_HQYSY-.js → dist-Dn9cOicG.js} +2 -2
- package/dist/{dist-Ci5lFuUy.js → dist-ENKQZrNg.js} +138 -132
- package/dist/{dist-Bu7veieH.js → dist-fEtcLxee.js} +15 -15
- package/dist/{extensions-DWx_jj8v.js → extensions-Y880c0sP.js} +3 -3
- package/dist/{image-up-X4xIq4ea.js → image-up-4ZmaHFga.js} +1 -1
- package/dist/index.d.ts +234 -0
- package/dist/{liquid.browser-BemTg3sZ.js → liquid.browser-DZ62L7up.js} +20 -15
- package/dist/{loader-circle-BTQQxC3l.js → loader-circle-C7YEH4do.js} +1 -1
- package/dist/{message-circle-Blgm6V_h.js → message-circle-B_lxRh4z.js} +1 -1
- package/dist/{refresh-cw-Bb4PEeW1.js → refresh-cw-DmZNoimV.js} +1 -1
- package/dist/rolldown-runtime-gEudmnaM.js +23 -0
- package/dist/{scan-line-7lZPfOdm.js → scan-line-Cc9KlXo5.js} +1 -1
- package/dist/{send-C0ltAQrv.js → send-CMwNWTPX.js} +1 -1
- package/dist/{shield-check-f-qv4RKs.js → shield-check-DZFf4LTh.js} +1 -1
- package/dist/{sparkles-KhBCGlqB.js → sparkles-D80W88H8.js} +1 -1
- package/dist/{styleConstants-Cxw88naD.js → styleConstants-Codo7aUT.js} +6 -45
- package/dist/styles-unyYKihg.js +2942 -0
- package/dist/templatical-editor.css +1 -1
- package/dist/templatical-editor.js +85 -90
- package/dist/text-align-start-Cje6pwo4.js +43 -0
- package/dist/{trash-2-OwjZ-guZ.js → trash-2-BWvxOB4Q.js} +1 -1
- package/dist/{triangle-alert-DOSRIUYZ.js → triangle-alert-C6y94qVX.js} +1 -1
- package/dist/{useEditorCore-DUGD6pq_.js → useEditorCore-CQwWl2js.js} +1143 -1247
- package/dist/{x-CGlq2XQe.js → x-IyhJ6V90.js} +1 -1
- package/package.json +70 -52
- package/dist/cdn/chunks/AiChatSidebar-X_Bv3Qys.js +0 -2
- package/dist/cdn/chunks/CloudEditor-DeTolKnf.js.map +0 -1
- package/dist/cdn/chunks/CommentsSidebar-4MTw_hue.js +0 -2
- package/dist/cdn/chunks/DesignReferenceSidebar-Bswh4Yx4.js +0 -2
- package/dist/cdn/chunks/ParagraphEditor-DU3oUKA7.js.map +0 -1
- package/dist/cdn/chunks/SnapshotHistory-KME4xmn_.js +0 -2
- package/dist/cdn/chunks/TemplateScoringPanel-DgB3xDN6.js +0 -2
- package/dist/cdn/chunks/TestEmailModal-DdpvRbYf.js +0 -2
- package/dist/cdn/chunks/de-BB3dgVOc.js.map +0 -1
- package/dist/cdn/chunks/dist-BF5c3Dr-.js +0 -2
- package/dist/cdn/chunks/dist-BGzvIxcJ.js +0 -2
- package/dist/cdn/chunks/dist-CFemF8rI.js +0 -2
- package/dist/cdn/chunks/dist-Co6uFhFK.js +0 -2
- package/dist/cdn/chunks/dist-DCikBY9K.js +0 -2
- package/dist/cdn/chunks/dist-DUILafAC.js +0 -2
- package/dist/cdn/chunks/dist-DghiKH0A.js +0 -2
- package/dist/cdn/chunks/dist-Dw8ckvfK.js +0 -2
- package/dist/cdn/chunks/dist-H07p0KAw.js +0 -2
- package/dist/cdn/chunks/dist-KYv9v_1z2.js.map +0 -1
- package/dist/cdn/chunks/dist-MjnKIc0W.js +0 -2
- package/dist/cdn/chunks/dist-odp0vGRv.js +0 -2
- package/dist/cdn/chunks/draggable-BQNU47zu.js.map +0 -1
- package/dist/cdn/chunks/en-DeDcpnoS.js.map +0 -1
- package/dist/cdn/chunks/features-Ds0XUfte.js.map +0 -1
- package/dist/cdn/chunks/icons-fWsuSvgd.js.map +0 -1
- package/dist/cdn/chunks/liquid.browser-C1VIYISn.js.map +0 -1
- package/dist/cdn/chunks/media-library-BGQm_OyC.js.map +0 -1
- package/dist/cdn/chunks/pusher-DJPhQnE8.js.map +0 -1
- package/dist/cdn/chunks/styles-Dgijy53u.js.map +0 -1
- package/dist/cdn/chunks/tiptap-BhxaWR8R.js.map +0 -1
- package/dist/dist-DkypH7qG.js +0 -5
- package/dist/dist-Dxnd0GRf.js +0 -5
- package/dist/styles-fdXNRqI3.js +0 -3556
- package/dist/templatical-editor.umd.cjs +0 -179
- /package/dist/cdn/chunks/{_rolldown_dynamic_import_helper-DMEI4TQ3.js → _rolldown_dynamic_import_helper-BRcA6nWq.js} +0 -0
- /package/dist/{de-D7TLGIPA.js → de-DCRASLfd.js} +0 -0
- /package/dist/{emojiData-BfWQS72m.js → emojiData-CyACq8qV.js} +0 -0
- /package/dist/{en-DvtiEMwP.js → en-BC0igPeg.js} +0 -0
- /package/dist/{formatRelativeTime-DX3FgqN9.js → formatRelativeTime-mRxw8HK8.js} +0 -0
- /package/dist/{readableTextColor-LDlmVEUv.js → readableTextColor-B809bF5J.js} +0 -0
- /package/dist/{useMergeTag-BZ3X0bNr.js → useMergeTag-CSXcnFBc.js} +0 -0
|
@@ -0,0 +1,424 @@
|
|
|
1
|
+
import { t as e } from "./dist-CLg2qE0p.js";
|
|
2
|
+
import { t } from "./useI18n-D6m7ZUgY.js";
|
|
3
|
+
import { h as n, i as r, m as i, p as a, u as o } from "./styleConstants-Codo7aUT.js";
|
|
4
|
+
import { Fragment as s, Transition as c, computed as l, createBlock as u, createCommentVNode as d, createElementBlock as f, createElementVNode as p, createVNode as ee, defineComponent as m, normalizeClass as h, normalizeStyle as g, openBlock as _, ref as v, renderList as y, renderSlot as b, resolveDynamicComponent as x, toDisplayString as S, unref as C, withCtx as te, withKeys as w } from "vue";
|
|
5
|
+
//#region ../../node_modules/.pnpm/vanilla-colorful@0.7.2/node_modules/vanilla-colorful/lib/utils/math.js
|
|
6
|
+
var T = (e, t = 0, n = 1) => e > n ? n : e < t ? t : e, E = (e, t = 0, n = 10 ** t) => Math.round(n * e) / n;
|
|
7
|
+
360 / (Math.PI * 2);
|
|
8
|
+
var ne = (e) => M(D(e)), D = (e) => (e[0] === "#" && (e = e.substring(1)), e.length < 6 ? {
|
|
9
|
+
r: parseInt(e[0] + e[0], 16),
|
|
10
|
+
g: parseInt(e[1] + e[1], 16),
|
|
11
|
+
b: parseInt(e[2] + e[2], 16),
|
|
12
|
+
a: e.length === 4 ? E(parseInt(e[3] + e[3], 16) / 255, 2) : 1
|
|
13
|
+
} : {
|
|
14
|
+
r: parseInt(e.substring(0, 2), 16),
|
|
15
|
+
g: parseInt(e.substring(2, 4), 16),
|
|
16
|
+
b: parseInt(e.substring(4, 6), 16),
|
|
17
|
+
a: e.length === 8 ? E(parseInt(e.substring(6, 8), 16) / 255, 2) : 1
|
|
18
|
+
}), O = (e) => j(ie(e)), re = ({ h: e, s: t, v: n, a: r }) => {
|
|
19
|
+
let i = (200 - t) * n / 100;
|
|
20
|
+
return {
|
|
21
|
+
h: E(e),
|
|
22
|
+
s: E(i > 0 && i < 200 ? t * n / 100 / (i <= 100 ? i : 200 - i) * 100 : 0),
|
|
23
|
+
l: E(i / 2),
|
|
24
|
+
a: E(r, 2)
|
|
25
|
+
};
|
|
26
|
+
}, k = (e) => {
|
|
27
|
+
let { h: t, s: n, l: r } = re(e);
|
|
28
|
+
return `hsl(${t}, ${n}%, ${r}%)`;
|
|
29
|
+
}, ie = ({ h: e, s: t, v: n, a: r }) => {
|
|
30
|
+
e = e / 360 * 6, t /= 100, n /= 100;
|
|
31
|
+
let i = Math.floor(e), a = n * (1 - t), o = n * (1 - (e - i) * t), s = n * (1 - (1 - e + i) * t), c = i % 6;
|
|
32
|
+
return {
|
|
33
|
+
r: E([
|
|
34
|
+
n,
|
|
35
|
+
o,
|
|
36
|
+
a,
|
|
37
|
+
a,
|
|
38
|
+
s,
|
|
39
|
+
n
|
|
40
|
+
][c] * 255),
|
|
41
|
+
g: E([
|
|
42
|
+
s,
|
|
43
|
+
n,
|
|
44
|
+
n,
|
|
45
|
+
o,
|
|
46
|
+
a,
|
|
47
|
+
a
|
|
48
|
+
][c] * 255),
|
|
49
|
+
b: E([
|
|
50
|
+
a,
|
|
51
|
+
a,
|
|
52
|
+
s,
|
|
53
|
+
n,
|
|
54
|
+
n,
|
|
55
|
+
o
|
|
56
|
+
][c] * 255),
|
|
57
|
+
a: E(r, 2)
|
|
58
|
+
};
|
|
59
|
+
}, A = (e) => {
|
|
60
|
+
let t = e.toString(16);
|
|
61
|
+
return t.length < 2 ? "0" + t : t;
|
|
62
|
+
}, j = ({ r: e, g: t, b: n, a: r }) => {
|
|
63
|
+
let i = r < 1 ? A(E(r * 255)) : "";
|
|
64
|
+
return "#" + A(e) + A(t) + A(n) + i;
|
|
65
|
+
}, M = ({ r: e, g: t, b: n, a: r }) => {
|
|
66
|
+
let i = Math.max(e, t, n), a = i - Math.min(e, t, n), o = a ? i === e ? (t - n) / a : i === t ? 2 + (n - e) / a : 4 + (e - t) / a : 0;
|
|
67
|
+
return {
|
|
68
|
+
h: E(60 * (o < 0 ? o + 6 : o)),
|
|
69
|
+
s: E(i ? a / i * 100 : 0),
|
|
70
|
+
v: E(i / 255 * 100),
|
|
71
|
+
a: r
|
|
72
|
+
};
|
|
73
|
+
}, N = (e, t) => {
|
|
74
|
+
if (e === t) return !0;
|
|
75
|
+
for (let n in e) if (e[n] !== t[n]) return !1;
|
|
76
|
+
return !0;
|
|
77
|
+
}, ae = (e, t) => e.toLowerCase() === t.toLowerCase() ? !0 : N(D(e), D(t)), P = {}, F = (e) => {
|
|
78
|
+
let t = P[e];
|
|
79
|
+
return t || (t = document.createElement("template"), t.innerHTML = e, P[e] = t), t;
|
|
80
|
+
}, I = (e, t, n) => {
|
|
81
|
+
e.dispatchEvent(new CustomEvent(t, {
|
|
82
|
+
bubbles: !0,
|
|
83
|
+
detail: n
|
|
84
|
+
}));
|
|
85
|
+
}, L = !1, R = (e) => "touches" in e, oe = (e) => L && !R(e) ? !1 : (L ||= R(e), !0), z = (e, t) => {
|
|
86
|
+
let n = R(t) ? t.touches[0] : t, r = e.el.getBoundingClientRect();
|
|
87
|
+
I(e.el, "move", e.getMove({
|
|
88
|
+
x: T((n.pageX - (r.left + window.pageXOffset)) / r.width),
|
|
89
|
+
y: T((n.pageY - (r.top + window.pageYOffset)) / r.height)
|
|
90
|
+
}));
|
|
91
|
+
}, B = (e, t) => {
|
|
92
|
+
let n = t.keyCode;
|
|
93
|
+
n > 40 || e.xy && n < 37 || n < 33 || (t.preventDefault(), I(e.el, "move", e.getMove({
|
|
94
|
+
x: n === 39 ? .01 : n === 37 ? -.01 : n === 34 ? .05 : n === 33 ? -.05 : n === 35 ? 1 : n === 36 ? -1 : 0,
|
|
95
|
+
y: n === 40 ? .01 : n === 38 ? -.01 : 0
|
|
96
|
+
}, !0)));
|
|
97
|
+
}, V = class {
|
|
98
|
+
constructor(e, t, n, r) {
|
|
99
|
+
let i = F(`<div role="slider" tabindex="0" part="${t}" ${n}><div part="${t}-pointer"></div></div>`);
|
|
100
|
+
e.appendChild(i.content.cloneNode(!0));
|
|
101
|
+
let a = e.querySelector(`[part=${t}]`);
|
|
102
|
+
a.addEventListener("mousedown", this), a.addEventListener("touchstart", this), a.addEventListener("keydown", this), this.el = a, this.xy = r, this.nodes = [a.firstChild, a];
|
|
103
|
+
}
|
|
104
|
+
set dragging(e) {
|
|
105
|
+
let t = e ? document.addEventListener : document.removeEventListener;
|
|
106
|
+
t(L ? "touchmove" : "mousemove", this), t(L ? "touchend" : "mouseup", this);
|
|
107
|
+
}
|
|
108
|
+
handleEvent(e) {
|
|
109
|
+
switch (e.type) {
|
|
110
|
+
case "mousedown":
|
|
111
|
+
case "touchstart":
|
|
112
|
+
if (e.preventDefault(), !oe(e) || !L && e.button != 0) return;
|
|
113
|
+
this.el.focus(), z(this, e), this.dragging = !0;
|
|
114
|
+
break;
|
|
115
|
+
case "mousemove":
|
|
116
|
+
case "touchmove":
|
|
117
|
+
e.preventDefault(), z(this, e);
|
|
118
|
+
break;
|
|
119
|
+
case "mouseup":
|
|
120
|
+
case "touchend":
|
|
121
|
+
this.dragging = !1;
|
|
122
|
+
break;
|
|
123
|
+
case "keydown":
|
|
124
|
+
B(this, e);
|
|
125
|
+
break;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
style(e) {
|
|
129
|
+
e.forEach((e, t) => {
|
|
130
|
+
for (let n in e) this.nodes[t].style.setProperty(n, e[n]);
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
}, H = class extends V {
|
|
134
|
+
constructor(e) {
|
|
135
|
+
super(e, "hue", "aria-label=\"Hue\" aria-valuemin=\"0\" aria-valuemax=\"360\"", !1);
|
|
136
|
+
}
|
|
137
|
+
update({ h: e }) {
|
|
138
|
+
this.h = e, this.style([{
|
|
139
|
+
left: `${e / 360 * 100}%`,
|
|
140
|
+
color: k({
|
|
141
|
+
h: e,
|
|
142
|
+
s: 100,
|
|
143
|
+
v: 100,
|
|
144
|
+
a: 1
|
|
145
|
+
})
|
|
146
|
+
}]), this.el.setAttribute("aria-valuenow", `${E(e)}`);
|
|
147
|
+
}
|
|
148
|
+
getMove(e, t) {
|
|
149
|
+
return { h: t ? T(this.h + e.x * 360, 0, 360) : 360 * e.x };
|
|
150
|
+
}
|
|
151
|
+
}, U = class extends V {
|
|
152
|
+
constructor(e) {
|
|
153
|
+
super(e, "saturation", "aria-label=\"Color\"", !0);
|
|
154
|
+
}
|
|
155
|
+
update(e) {
|
|
156
|
+
this.hsva = e, this.style([{
|
|
157
|
+
top: `${100 - e.v}%`,
|
|
158
|
+
left: `${e.s}%`,
|
|
159
|
+
color: k(e)
|
|
160
|
+
}, { "background-color": k({
|
|
161
|
+
h: e.h,
|
|
162
|
+
s: 100,
|
|
163
|
+
v: 100,
|
|
164
|
+
a: 1
|
|
165
|
+
}) }]), this.el.setAttribute("aria-valuetext", `Saturation ${E(e.s)}%, Brightness ${E(e.v)}%`);
|
|
166
|
+
}
|
|
167
|
+
getMove(e, t) {
|
|
168
|
+
return {
|
|
169
|
+
s: t ? T(this.hsva.s + e.x * 100, 0, 100) : e.x * 100,
|
|
170
|
+
v: t ? T(this.hsva.v - e.y * 100, 0, 100) : Math.round(100 - e.y * 100)
|
|
171
|
+
};
|
|
172
|
+
}
|
|
173
|
+
}, W = ":host{display:flex;flex-direction:column;position:relative;width:200px;height:200px;user-select:none;-webkit-user-select:none;cursor:default}:host([hidden]){display:none!important}[role=slider]{position:relative;touch-action:none;user-select:none;-webkit-user-select:none;outline:0}[role=slider]:last-child{border-radius:0 0 8px 8px}[part$=pointer]{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;display:flex;place-content:center center;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}[part$=pointer]::after{content:\"\";width:100%;height:100%;border-radius:inherit;background-color:currentColor}[role=slider]:focus [part$=pointer]{transform:translate(-50%,-50%) scale(1.1)}", G = "[part=hue]{flex:0 0 24px;background:linear-gradient(to right,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red 100%)}[part=hue-pointer]{top:50%;z-index:2}", K = "[part=saturation]{flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(to top,#000,transparent),linear-gradient(to right,#fff,rgba(255,255,255,0));box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}[part=saturation-pointer]{z-index:3}", q = Symbol("same"), J = Symbol("color"), Y = Symbol("hsva"), X = Symbol("update"), Z = Symbol("parts"), Q = Symbol("css"), $ = Symbol("sliders"), se = class extends HTMLElement {
|
|
174
|
+
static get observedAttributes() {
|
|
175
|
+
return ["color"];
|
|
176
|
+
}
|
|
177
|
+
get [Q]() {
|
|
178
|
+
return [
|
|
179
|
+
W,
|
|
180
|
+
G,
|
|
181
|
+
K
|
|
182
|
+
];
|
|
183
|
+
}
|
|
184
|
+
get [$]() {
|
|
185
|
+
return [U, H];
|
|
186
|
+
}
|
|
187
|
+
get color() {
|
|
188
|
+
return this[J];
|
|
189
|
+
}
|
|
190
|
+
set color(e) {
|
|
191
|
+
if (!this[q](e)) {
|
|
192
|
+
let t = this.colorModel.toHsva(e);
|
|
193
|
+
this[X](t), this[J] = e;
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
constructor() {
|
|
197
|
+
super();
|
|
198
|
+
let e = F(`<style>${this[Q].join("")}</style>`), t = this.attachShadow({ mode: "open" });
|
|
199
|
+
t.appendChild(e.content.cloneNode(!0)), t.addEventListener("move", this), this[Z] = this[$].map((e) => new e(t));
|
|
200
|
+
}
|
|
201
|
+
connectedCallback() {
|
|
202
|
+
if (this.hasOwnProperty("color")) {
|
|
203
|
+
let e = this.color;
|
|
204
|
+
delete this.color, this.color = e;
|
|
205
|
+
} else this.color ||= this.colorModel.defaultColor;
|
|
206
|
+
}
|
|
207
|
+
attributeChangedCallback(e, t, n) {
|
|
208
|
+
let r = this.colorModel.fromAttr(n);
|
|
209
|
+
this[q](r) || (this.color = r);
|
|
210
|
+
}
|
|
211
|
+
handleEvent(e) {
|
|
212
|
+
let t = this[Y], n = {
|
|
213
|
+
...t,
|
|
214
|
+
...e.detail
|
|
215
|
+
};
|
|
216
|
+
this[X](n);
|
|
217
|
+
let r;
|
|
218
|
+
!N(n, t) && !this[q](r = this.colorModel.fromHsva(n)) && (this[J] = r, I(this, "color-changed", { value: r }));
|
|
219
|
+
}
|
|
220
|
+
[q](e) {
|
|
221
|
+
return this.color && this.colorModel.equal(e, this.color);
|
|
222
|
+
}
|
|
223
|
+
[X](e) {
|
|
224
|
+
this[Y] = e, this[Z].forEach((t) => t.update(e));
|
|
225
|
+
}
|
|
226
|
+
}, ce = {
|
|
227
|
+
defaultColor: "#000",
|
|
228
|
+
toHsva: ne,
|
|
229
|
+
fromHsva: ({ h: e, s: t, v: n }) => O({
|
|
230
|
+
h: e,
|
|
231
|
+
s: t,
|
|
232
|
+
v: n,
|
|
233
|
+
a: 1
|
|
234
|
+
}),
|
|
235
|
+
equal: ae,
|
|
236
|
+
fromAttr: (e) => e
|
|
237
|
+
}, le = class extends se {
|
|
238
|
+
get colorModel() {
|
|
239
|
+
return ce;
|
|
240
|
+
}
|
|
241
|
+
}, ue = class extends le {};
|
|
242
|
+
customElements.define("hex-color-picker", ue);
|
|
243
|
+
//#endregion
|
|
244
|
+
//#region src/components/ColorPicker.vue?vue&type=script&setup=true&lang.ts
|
|
245
|
+
var de = [
|
|
246
|
+
"disabled",
|
|
247
|
+
"aria-label",
|
|
248
|
+
"aria-expanded"
|
|
249
|
+
], fe = [
|
|
250
|
+
"value",
|
|
251
|
+
"placeholder",
|
|
252
|
+
"disabled",
|
|
253
|
+
"aria-label"
|
|
254
|
+
], pe = ["color", "aria-label"], me = /* @__PURE__ */ m({
|
|
255
|
+
__name: "ColorPicker",
|
|
256
|
+
props: {
|
|
257
|
+
modelValue: {},
|
|
258
|
+
placeholder: { default: r },
|
|
259
|
+
size: { default: "default" },
|
|
260
|
+
swatchOnly: {
|
|
261
|
+
type: Boolean,
|
|
262
|
+
default: !1
|
|
263
|
+
},
|
|
264
|
+
disabled: {
|
|
265
|
+
type: Boolean,
|
|
266
|
+
default: !1
|
|
267
|
+
}
|
|
268
|
+
},
|
|
269
|
+
emits: ["update:modelValue"],
|
|
270
|
+
setup(n, { emit: r }) {
|
|
271
|
+
let i = n, a = r, { t: s } = t(), u = v(!1), m = v(), y = v();
|
|
272
|
+
e(m, () => {
|
|
273
|
+
u.value = !1;
|
|
274
|
+
}, { ignore: [y] });
|
|
275
|
+
let b = l({
|
|
276
|
+
get: () => i.modelValue || "#000000",
|
|
277
|
+
set: (e) => a("update:modelValue", e)
|
|
278
|
+
});
|
|
279
|
+
function x(e) {
|
|
280
|
+
b.value = e.detail.value;
|
|
281
|
+
}
|
|
282
|
+
function S(e) {
|
|
283
|
+
b.value = e.target.value;
|
|
284
|
+
}
|
|
285
|
+
return (e, t) => (_(), f("div", { class: h(["tpl:flex tpl:gap-2 tpl:relative", n.disabled && "tpl:opacity-60 tpl:cursor-not-allowed"]) }, [
|
|
286
|
+
p("button", {
|
|
287
|
+
ref_key: "swatchRef",
|
|
288
|
+
ref: y,
|
|
289
|
+
type: "button",
|
|
290
|
+
disabled: n.disabled,
|
|
291
|
+
"aria-label": C(s).colorPicker.pickColor,
|
|
292
|
+
"aria-expanded": u.value,
|
|
293
|
+
class: h([
|
|
294
|
+
"tpl:shrink-0 tpl:rounded-[var(--tpl-radius-sm)] tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:p-0.5 tpl:transition-all tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)]",
|
|
295
|
+
n.disabled ? "tpl:cursor-not-allowed" : "tpl:cursor-pointer",
|
|
296
|
+
u.value ? "tpl:border-[var(--tpl-primary)] tpl:shadow-[var(--tpl-ring)]" : !n.disabled && "hover:tpl:border-[var(--tpl-text-dim)]",
|
|
297
|
+
n.size === "large" ? "tpl:size-12" : "tpl:size-10"
|
|
298
|
+
]),
|
|
299
|
+
onClick: t[0] ||= (e) => !n.disabled && (u.value = !u.value)
|
|
300
|
+
}, [p("span", {
|
|
301
|
+
class: "tpl:block tpl:size-full tpl:rounded-[calc(var(--tpl-radius-sm)-2px)]",
|
|
302
|
+
style: g({ backgroundColor: b.value })
|
|
303
|
+
}, null, 4)], 10, de),
|
|
304
|
+
n.swatchOnly ? d("", !0) : (_(), f("input", {
|
|
305
|
+
key: 0,
|
|
306
|
+
type: "text",
|
|
307
|
+
class: h(C(o)),
|
|
308
|
+
value: n.modelValue,
|
|
309
|
+
placeholder: n.placeholder,
|
|
310
|
+
disabled: n.disabled,
|
|
311
|
+
"aria-label": C(s).colorPicker.hexValue,
|
|
312
|
+
onInput: S
|
|
313
|
+
}, null, 42, fe)),
|
|
314
|
+
ee(c, {
|
|
315
|
+
"enter-active-class": "tpl:transition-all tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)]",
|
|
316
|
+
"enter-from-class": "tpl:opacity-0 tpl:scale-95 tpl:translate-y-1",
|
|
317
|
+
"enter-to-class": "tpl:opacity-100 tpl:scale-100 tpl:translate-y-0",
|
|
318
|
+
"leave-active-class": "tpl:transition-all tpl:duration-[80ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)]",
|
|
319
|
+
"leave-from-class": "tpl:opacity-100 tpl:scale-100 tpl:translate-y-0",
|
|
320
|
+
"leave-to-class": "tpl:opacity-0 tpl:scale-95 tpl:translate-y-1"
|
|
321
|
+
}, {
|
|
322
|
+
default: te(() => [u.value ? (_(), f("div", {
|
|
323
|
+
key: 0,
|
|
324
|
+
ref_key: "popoverRef",
|
|
325
|
+
ref: m,
|
|
326
|
+
class: "tpl:absolute tpl:left-0 tpl:top-full tpl:z-50 tpl:mt-2 tpl:rounded-[var(--tpl-radius)] tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-elevated)] tpl:p-3 tpl:shadow-lg"
|
|
327
|
+
}, [p("hex-color-picker", {
|
|
328
|
+
color: b.value,
|
|
329
|
+
"aria-label": C(s).colorPicker.pickColor,
|
|
330
|
+
onColorChanged: x,
|
|
331
|
+
onKeydown: t[1] ||= w((e) => u.value = !1, ["escape"])
|
|
332
|
+
}, null, 40, pe)], 512)) : d("", !0)]),
|
|
333
|
+
_: 1
|
|
334
|
+
})
|
|
335
|
+
], 2));
|
|
336
|
+
}
|
|
337
|
+
}), he = [
|
|
338
|
+
"aria-checked",
|
|
339
|
+
"aria-label",
|
|
340
|
+
"title",
|
|
341
|
+
"onClick"
|
|
342
|
+
], ge = { key: 1 }, _e = /* @__PURE__ */ m({
|
|
343
|
+
__name: "SlidingPillSelect",
|
|
344
|
+
props: {
|
|
345
|
+
options: {},
|
|
346
|
+
modelValue: {}
|
|
347
|
+
},
|
|
348
|
+
emits: ["update:modelValue"],
|
|
349
|
+
setup(e, { emit: t }) {
|
|
350
|
+
let n = e, r = t, i = l(() => {
|
|
351
|
+
let e = n.options.findIndex((e) => e.value === n.modelValue);
|
|
352
|
+
return `translateX(${Math.max(e, 0) * 100}%)`;
|
|
353
|
+
});
|
|
354
|
+
return (t, n) => (_(), f("div", {
|
|
355
|
+
role: "radiogroup",
|
|
356
|
+
class: "tpl:relative tpl:grid tpl:rounded-[var(--tpl-radius-sm)] tpl:p-1",
|
|
357
|
+
style: g({
|
|
358
|
+
gridTemplateColumns: `repeat(${e.options.length}, 1fr)`,
|
|
359
|
+
backgroundColor: "var(--tpl-bg-hover)"
|
|
360
|
+
})
|
|
361
|
+
}, [p("div", {
|
|
362
|
+
class: "tpl:absolute tpl:inset-y-1 tpl:rounded-[var(--tpl-radius-sm)]",
|
|
363
|
+
style: g({
|
|
364
|
+
left: "4px",
|
|
365
|
+
width: `calc((100% - 8px) / ${e.options.length})`,
|
|
366
|
+
transform: i.value,
|
|
367
|
+
backgroundColor: "var(--tpl-bg)",
|
|
368
|
+
boxShadow: "var(--tpl-shadow)",
|
|
369
|
+
transition: "transform 120ms cubic-bezier(0.16, 1, 0.3, 1)"
|
|
370
|
+
})
|
|
371
|
+
}, null, 4), (_(!0), f(s, null, y(e.options, (t) => (_(), f("button", {
|
|
372
|
+
key: t.value,
|
|
373
|
+
role: "radio",
|
|
374
|
+
"aria-checked": e.modelValue === t.value,
|
|
375
|
+
"aria-label": t.label,
|
|
376
|
+
class: "tpl:relative tpl:z-10 tpl:flex tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:gap-1 tpl:rounded-[var(--tpl-radius-sm)] tpl:border-none tpl:bg-transparent tpl:px-2.5 tpl:py-[5px] tpl:text-xs tpl:font-medium",
|
|
377
|
+
style: g({
|
|
378
|
+
color: e.modelValue === t.value ? "var(--tpl-primary)" : "var(--tpl-text-muted)",
|
|
379
|
+
transition: "color 120ms cubic-bezier(0.16, 1, 0.3, 1)"
|
|
380
|
+
}),
|
|
381
|
+
title: t.label,
|
|
382
|
+
onClick: (e) => r("update:modelValue", t.value)
|
|
383
|
+
}, [t.icon ? (_(), u(x(t.icon), {
|
|
384
|
+
key: 0,
|
|
385
|
+
size: 14,
|
|
386
|
+
"stroke-width": 2
|
|
387
|
+
})) : (_(), f("span", ge, S(t.label), 1))], 12, he))), 128))], 4));
|
|
388
|
+
}
|
|
389
|
+
}), ve = { class: "tpl:mb-3.5" }, ye = /* @__PURE__ */ m({
|
|
390
|
+
__name: "FieldRow",
|
|
391
|
+
props: { label: {} },
|
|
392
|
+
setup(e) {
|
|
393
|
+
return (t, r) => (_(), f("div", ve, [e.label ? (_(), f("label", {
|
|
394
|
+
key: 0,
|
|
395
|
+
class: h(C(n))
|
|
396
|
+
}, S(e.label), 3)) : d("", !0), b(t.$slots, "default")]));
|
|
397
|
+
}
|
|
398
|
+
}), be = { class: "tpl:flex tpl:items-stretch" }, xe = [
|
|
399
|
+
"value",
|
|
400
|
+
"min",
|
|
401
|
+
"max"
|
|
402
|
+
], Se = /* @__PURE__ */ m({
|
|
403
|
+
__name: "NumberWithSuffix",
|
|
404
|
+
props: {
|
|
405
|
+
modelValue: {},
|
|
406
|
+
min: {},
|
|
407
|
+
max: {},
|
|
408
|
+
suffix: {}
|
|
409
|
+
},
|
|
410
|
+
emits: ["update:modelValue"],
|
|
411
|
+
setup(e, { emit: t }) {
|
|
412
|
+
let n = t;
|
|
413
|
+
return (t, r) => (_(), f("div", be, [p("input", {
|
|
414
|
+
type: "number",
|
|
415
|
+
class: h(C(a)),
|
|
416
|
+
value: e.modelValue,
|
|
417
|
+
min: e.min,
|
|
418
|
+
max: e.max,
|
|
419
|
+
onInput: r[0] ||= (e) => n("update:modelValue", Number(e.target.value))
|
|
420
|
+
}, null, 42, xe), p("span", { class: h(C(i)) }, S(e.suffix), 3)]));
|
|
421
|
+
}
|
|
422
|
+
});
|
|
423
|
+
//#endregion
|
|
424
|
+
export { me as i, ye as n, _e as r, Se as t };
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as r } from "./
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { n as l, t as u } from "./_plugin-vue_export-helper-
|
|
6
|
-
import { a as d, i as f, n as p, r as m, t as h } from "./RichTextEditorContent-
|
|
7
|
-
import { t as g } from "./loader-circle-
|
|
8
|
-
import { t as _ } from "./scan-line-
|
|
9
|
-
import {
|
|
1
|
+
import { t as e } from "./dist-CLg2qE0p.js";
|
|
2
|
+
import { S as t, T as n, p as r, w as i } from "./keys-C0MQRs8d.js";
|
|
3
|
+
import { t as a } from "./useI18n-D6m7ZUgY.js";
|
|
4
|
+
import { C as o, b as s, w as c } from "./useEditorCore-CQwWl2js.js";
|
|
5
|
+
import { n as l, t as u } from "./_plugin-vue_export-helper-BHUPLLh1.js";
|
|
6
|
+
import { a as d, i as f, n as p, r as m, t as h } from "./RichTextEditorContent-BcY3Rcp4.js";
|
|
7
|
+
import { t as g } from "./loader-circle-C7YEH4do.js";
|
|
8
|
+
import { t as _ } from "./scan-line-Cc9KlXo5.js";
|
|
9
|
+
import { n as v, r as y, t as b } from "./text-align-start-Cje6pwo4.js";
|
|
10
|
+
import { a as x, o as ee, s as te } from "./styleConstants-Codo7aUT.js";
|
|
10
11
|
import { Fragment as S, Teleport as ne, computed as C, createBlock as w, createCommentVNode as T, createElementBlock as E, createElementVNode as D, createTextVNode as O, createVNode as k, defineComponent as A, inject as j, isRef as M, normalizeClass as N, normalizeStyle as P, openBlock as F, ref as I, renderList as L, resolveDynamicComponent as R, toDisplayString as z, unref as B, withKeys as V, withModifiers as H } from "vue";
|
|
11
12
|
var U = l("list-ordered", [
|
|
12
13
|
["path", {
|
|
@@ -162,13 +163,13 @@ var U = l("list-ordered", [
|
|
|
162
163
|
], ae = ["aria-label"], X = { 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__ */ A({
|
|
163
164
|
__name: "EmojiPickerDropdown",
|
|
164
165
|
emits: ["insert"],
|
|
165
|
-
setup(t, { emit:
|
|
166
|
-
let
|
|
167
|
-
|
|
166
|
+
setup(t, { emit: n }) {
|
|
167
|
+
let r = n, { categories: i, isOpen: s, toggle: l, close: u } = o(), { t: d, format: f } = a(), p = I(null), m = I(null);
|
|
168
|
+
c(p, C(() => s.value)), e(m, () => {
|
|
168
169
|
s.value && u();
|
|
169
170
|
});
|
|
170
171
|
function h(e) {
|
|
171
|
-
|
|
172
|
+
r("insert", e), u();
|
|
172
173
|
}
|
|
173
174
|
return (e, t) => (F(), E("div", {
|
|
174
175
|
ref_key: "rootRef",
|
|
@@ -197,7 +198,7 @@ var U = l("list-ordered", [
|
|
|
197
198
|
tabindex: "-1",
|
|
198
199
|
class: "tpl-emoji-picker tpl:absolute tpl:top-full tpl:left-0 tpl:z-10 tpl:mt-2 tpl:w-72 tpl:rounded-lg tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:p-2 tpl:shadow-lg",
|
|
199
200
|
onKeydown: t[1] ||= V(H((...e) => B(u) && B(u)(...e), ["stop", "prevent"]), ["esc"])
|
|
200
|
-
}, [(F(!0), E(S, null, L(B(
|
|
201
|
+
}, [(F(!0), E(S, null, L(B(i), (e) => (F(), E("div", {
|
|
201
202
|
key: e.key,
|
|
202
203
|
class: "tpl:mb-2 tpl:last:mb-0"
|
|
203
204
|
}, [D("div", X, z(B(d).emoji[e.key]), 1), D("div", oe, [(F(!0), E(S, null, L(e.emojis, (e) => (F(), E("button", {
|
|
@@ -296,42 +297,42 @@ var Q = /* @__PURE__ */ u(ue, [["render", fe]]), pe = [
|
|
|
296
297
|
mergeTagEnabled: { type: Boolean }
|
|
297
298
|
},
|
|
298
299
|
emits: ["open-link-dialog", "add-merge-tag"],
|
|
299
|
-
setup(e, { emit:
|
|
300
|
-
let
|
|
300
|
+
setup(e, { emit: o }) {
|
|
301
|
+
let s = e, c = o, l = j(t, null), u = j(i, null), p = n(r, "ParagraphToolbar"), { t: h } = a(), C = p.fonts;
|
|
301
302
|
function A(e) {
|
|
302
|
-
|
|
303
|
+
s.editor?.chain().focus().insertContent(e).run();
|
|
303
304
|
}
|
|
304
305
|
function M(e) {
|
|
305
|
-
return
|
|
306
|
+
return s.editor?.getAttributes("textStyle")[e] || "";
|
|
306
307
|
}
|
|
307
308
|
function N(e) {
|
|
308
|
-
let t =
|
|
309
|
+
let t = s.editor?.chain().focus();
|
|
309
310
|
e ? t?.setFontFamily(e).run() : t?.unsetFontFamily().run();
|
|
310
311
|
}
|
|
311
312
|
function I(e) {
|
|
312
|
-
let t =
|
|
313
|
+
let t = s.editor?.chain().focus();
|
|
313
314
|
e ? t?.setFontSize(e).run() : t?.unsetFontSize().run();
|
|
314
315
|
}
|
|
315
316
|
function L(e) {
|
|
316
|
-
let t =
|
|
317
|
+
let t = s.editor?.chain().focus();
|
|
317
318
|
e ? t?.setColor(e).run() : t?.unsetColor().run();
|
|
318
319
|
}
|
|
319
320
|
function R() {
|
|
320
|
-
return
|
|
321
|
+
return s.editor?.getAttributes("paragraph").lineHeight || "";
|
|
321
322
|
}
|
|
322
323
|
function V(e) {
|
|
323
|
-
let t =
|
|
324
|
+
let t = s.editor?.chain().focus();
|
|
324
325
|
e ? t?.setLineHeight(e).run() : t?.unsetLineHeight().run();
|
|
325
326
|
}
|
|
326
327
|
function H(e) {
|
|
327
|
-
let t =
|
|
328
|
+
let t = s.editor?.chain().focus();
|
|
328
329
|
e && e !== "normal" ? t?.setLetterSpacing(e).run() : t?.unsetLetterSpacing().run();
|
|
329
330
|
}
|
|
330
331
|
function W() {
|
|
331
|
-
return
|
|
332
|
+
return s.editor?.getAttributes("highlight").color || "";
|
|
332
333
|
}
|
|
333
334
|
function Y(e) {
|
|
334
|
-
let t =
|
|
335
|
+
let t = s.editor?.chain().focus();
|
|
335
336
|
e ? t?.setHighlight({ color: e }).run() : t?.unsetHighlight().run();
|
|
336
337
|
}
|
|
337
338
|
return (t, n) => (F(), w(ne, { to: "body" }, [D("div", {
|
|
@@ -362,7 +363,7 @@ var Q = /* @__PURE__ */ u(ue, [["render", fe]]), pe = [
|
|
|
362
363
|
]),
|
|
363
364
|
k($, {
|
|
364
365
|
"model-value": M("fontSize"),
|
|
365
|
-
options: B(
|
|
366
|
+
options: B(x),
|
|
366
367
|
label: B(h).paragraphEditor.fontSize,
|
|
367
368
|
placeholder: B(h).paragraphEditor.defaultSize,
|
|
368
369
|
"width-class": "tpl:w-20",
|
|
@@ -459,7 +460,7 @@ var Q = /* @__PURE__ */ u(ue, [["render", fe]]), pe = [
|
|
|
459
460
|
icon: B(m),
|
|
460
461
|
label: B(h).paragraphEditor.addLink,
|
|
461
462
|
active: e.editor.isActive("link"),
|
|
462
|
-
onClick: n[8] ||= (e) =>
|
|
463
|
+
onClick: n[8] ||= (e) => c("open-link-dialog")
|
|
463
464
|
}, null, 8, [
|
|
464
465
|
"icon",
|
|
465
466
|
"label",
|
|
@@ -488,7 +489,7 @@ var Q = /* @__PURE__ */ u(ue, [["render", fe]]), pe = [
|
|
|
488
489
|
]),
|
|
489
490
|
k(Q),
|
|
490
491
|
k(Z, {
|
|
491
|
-
icon: B(
|
|
492
|
+
icon: B(b),
|
|
492
493
|
label: B(h).paragraphEditor.alignLeft,
|
|
493
494
|
active: e.editor.isActive({ textAlign: "left" }),
|
|
494
495
|
onClick: n[11] ||= (t) => e.editor.chain().focus().setTextAlign("left").run()
|
|
@@ -508,7 +509,7 @@ var Q = /* @__PURE__ */ u(ue, [["render", fe]]), pe = [
|
|
|
508
509
|
"active"
|
|
509
510
|
]),
|
|
510
511
|
k(Z, {
|
|
511
|
-
icon: B(
|
|
512
|
+
icon: B(v),
|
|
512
513
|
label: B(h).paragraphEditor.alignRight,
|
|
513
514
|
active: e.editor.isActive({ textAlign: "right" }),
|
|
514
515
|
onClick: n[13] ||= (t) => e.editor.chain().focus().setTextAlign("right").run()
|
|
@@ -520,7 +521,7 @@ var Q = /* @__PURE__ */ u(ue, [["render", fe]]), pe = [
|
|
|
520
521
|
k(Q),
|
|
521
522
|
k($, {
|
|
522
523
|
"model-value": R(),
|
|
523
|
-
options: B(
|
|
524
|
+
options: B(te),
|
|
524
525
|
label: B(h).paragraphEditor.lineHeight,
|
|
525
526
|
placeholder: "LH",
|
|
526
527
|
"width-class": "tpl:w-16",
|
|
@@ -532,7 +533,7 @@ var Q = /* @__PURE__ */ u(ue, [["render", fe]]), pe = [
|
|
|
532
533
|
]),
|
|
533
534
|
k($, {
|
|
534
535
|
"model-value": M("letterSpacing"),
|
|
535
|
-
options: B(
|
|
536
|
+
options: B(ee),
|
|
536
537
|
label: B(h).paragraphEditor.letterSpacing,
|
|
537
538
|
placeholder: "LS",
|
|
538
539
|
"width-class": "tpl:w-20",
|
|
@@ -555,7 +556,7 @@ var Q = /* @__PURE__ */ u(ue, [["render", fe]]), pe = [
|
|
|
555
556
|
class: "tpl:flex tpl:h-8 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:gap-1.5 tpl:rounded tpl:border-none tpl:bg-transparent tpl:px-2.5 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text)] tpl:transition-all tpl:duration-150 tpl:hover:bg-[var(--tpl-bg-active)]",
|
|
556
557
|
"aria-label": B(h).mergeTag.add,
|
|
557
558
|
title: B(h).mergeTag.add,
|
|
558
|
-
onClick: n[15] ||= (e) =>
|
|
559
|
+
onClick: n[15] ||= (e) => c("add-merge-tag")
|
|
559
560
|
}, [k(B(_), {
|
|
560
561
|
size: 16,
|
|
561
562
|
"stroke-width": 2
|
|
@@ -573,26 +574,26 @@ var Q = /* @__PURE__ */ u(ue, [["render", fe]]), pe = [
|
|
|
573
574
|
toolbarPosition: {}
|
|
574
575
|
},
|
|
575
576
|
emits: ["done"],
|
|
576
|
-
setup(e, { emit:
|
|
577
|
-
let
|
|
578
|
-
blockId: () =>
|
|
579
|
-
blockContent: () =>
|
|
580
|
-
onDone: () =>
|
|
577
|
+
setup(e, { emit: t }) {
|
|
578
|
+
let n = e, r = t, { editor: i, EditorContent: a, isLoading: o, initError: c, retry: l, showLinkDialog: u, linkUrl: d, linkDialogRef: f, mergeTagEnabled: m, openLinkDialog: g, insertLink: _, removeLink: v, closeLinkDialog: y, handleLinkKeydown: b, handleAddMergeTag: x } = s({
|
|
579
|
+
blockId: () => n.block.id,
|
|
580
|
+
blockContent: () => n.block.content,
|
|
581
|
+
onDone: () => r("done"),
|
|
581
582
|
editorName: "ParagraphEditor",
|
|
582
583
|
async loadExtensions({ mergeTags: e, syntax: t }) {
|
|
583
584
|
let [{ Editor: n, EditorContent: r }, { default: i }, { default: a }, { default: o }, { default: s }, { default: c }, { default: l }, { TextStyle: u }, { default: d }, { default: f }, { default: p }, { MergeTagNode: m, LogicMergeTagNode: h, FontSize: g, LineHeight: _, LetterSpacing: v }] = await Promise.all([
|
|
584
|
-
import("./dist-
|
|
585
|
-
import("./dist-
|
|
586
|
-
import("./dist-
|
|
587
|
-
import("./dist-
|
|
588
|
-
import("./dist-
|
|
589
|
-
import("./dist-
|
|
590
|
-
import("./dist-
|
|
591
|
-
import("./dist-
|
|
592
|
-
import("./dist-
|
|
593
|
-
import("./dist-
|
|
594
|
-
import("./dist-
|
|
595
|
-
import("./extensions-
|
|
585
|
+
import("./dist-ENKQZrNg.js").then((e) => e.r),
|
|
586
|
+
import("./dist-7SaUYnxo.js"),
|
|
587
|
+
import("./dist-fEtcLxee.js"),
|
|
588
|
+
import("./dist-DYG6FL7b.js"),
|
|
589
|
+
import("./dist-DW_4_uv3.js"),
|
|
590
|
+
import("./dist-DMuaebdo.js"),
|
|
591
|
+
import("./dist-DbFMBx8E.js"),
|
|
592
|
+
import("./dist-Dn9cOicG.js"),
|
|
593
|
+
import("./dist-CdzaZZSx.js"),
|
|
594
|
+
import("./dist-Cl9giA3B.js"),
|
|
595
|
+
import("./dist-BKZ5gvJf.js"),
|
|
596
|
+
import("./extensions-Y880c0sP.js")
|
|
596
597
|
]);
|
|
597
598
|
return {
|
|
598
599
|
TiptapEditor: n,
|
|
@@ -633,9 +634,9 @@ var Q = /* @__PURE__ */ u(ue, [["render", fe]]), pe = [
|
|
|
633
634
|
});
|
|
634
635
|
return (t, n) => (F(), E("div", Ee, [
|
|
635
636
|
k(Te, {
|
|
636
|
-
editor: B(
|
|
637
|
+
editor: B(i),
|
|
637
638
|
"toolbar-position": e.toolbarPosition,
|
|
638
|
-
"is-loading": B(
|
|
639
|
+
"is-loading": B(o),
|
|
639
640
|
"merge-tag-enabled": B(m),
|
|
640
641
|
onOpenLinkDialog: B(g),
|
|
641
642
|
onAddMergeTag: B(x)
|
|
@@ -648,9 +649,9 @@ var Q = /* @__PURE__ */ u(ue, [["render", fe]]), pe = [
|
|
|
648
649
|
"onAddMergeTag"
|
|
649
650
|
]),
|
|
650
651
|
k(h, {
|
|
651
|
-
editor: B(
|
|
652
|
-
"editor-content": B(
|
|
653
|
-
"is-loading": B(
|
|
652
|
+
editor: B(i),
|
|
653
|
+
"editor-content": B(a),
|
|
654
|
+
"is-loading": B(o),
|
|
654
655
|
"init-error": B(c),
|
|
655
656
|
onRetry: B(l)
|
|
656
657
|
}, null, 8, [
|
|
@@ -662,7 +663,7 @@ var Q = /* @__PURE__ */ u(ue, [["render", fe]]), pe = [
|
|
|
662
663
|
]),
|
|
663
664
|
k(p, {
|
|
664
665
|
visible: B(u),
|
|
665
|
-
"is-editing-link": B(
|
|
666
|
+
"is-editing-link": B(i)?.isActive("link") ?? !1,
|
|
666
667
|
"dialog-ref": B(f),
|
|
667
668
|
"onUpdate:dialogRef": n[0] ||= (e) => M(f) ? f.value = e : null,
|
|
668
669
|
"link-url": B(d),
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { S as e, w as t } from "./keys-C0MQRs8d.js";
|
|
2
2
|
import { t as n } from "./useI18n-D6m7ZUgY.js";
|
|
3
|
-
import { n as r } from "./_plugin-vue_export-helper-
|
|
4
|
-
import { t as i } from "./x-
|
|
3
|
+
import { n as r } from "./_plugin-vue_export-helper-BHUPLLh1.js";
|
|
4
|
+
import { t as i } from "./x-IyhJ6V90.js";
|
|
5
5
|
import { Teleport as a, createBlock as o, createCommentVNode as s, createElementBlock as c, createElementVNode as l, createTextVNode as u, createVNode as d, defineComponent as f, inject as p, mergeModels as m, normalizeStyle as h, openBlock as g, resolveDynamicComponent as _, toDisplayString as v, unref as y, useModel as b, vModelText as x, withDirectives as S, withModifiers as C } from "vue";
|
|
6
6
|
var w = r("bold", [["path", {
|
|
7
7
|
d: "M6 12h9a4 4 0 0 1 0 8H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h7a4 4 0 0 1 0 8",
|