@templatical/editor 0.0.3 → 0.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{AiChatSidebar-busJk9hm.js → AiChatSidebar-DwME3f-a.js} +84 -70
- package/dist/{AiFeatureMenu-DLGv_-pj.js → AiFeatureMenu-DJvWL1GZ.js} +23 -23
- package/dist/CloudEditor-Fe0ssRgi.js +1082 -0
- package/dist/{CollaboratorBar-Dv3l52vC.js → CollaboratorBar-DTT0EkZn.js} +25 -21
- package/dist/{CommentsSidebar-4tjp0VU5.js → CommentsSidebar-DrJhQRXK.js} +131 -131
- package/dist/{DesignReferenceSidebar-CmwXvltV.js → DesignReferenceSidebar-DdOht5zn.js} +49 -49
- package/dist/ModuleBrowserModal-CiV_jOEM.js +205 -0
- package/dist/{ModulePreviewCanvas-BcBJLnwL.js → ModulePreviewCanvas-Bmy6Y1WE.js} +2 -2
- package/dist/ParagraphEditor-CoQ3NlS7.js +688 -0
- package/dist/{RichTextEditorContent-CQqodi7p.js → RichTextEditorContent-CHJlh7HJ.js} +8 -4
- package/dist/{SaveModuleDialog-Bmzi72td.js → SaveModuleDialog-CD2ZYq1o.js} +25 -25
- package/dist/{SnapshotHistory-AEgi9Xsn.js → SnapshotHistory-DltsKvhP.js} +2 -2
- package/dist/TemplateScoringPanel-DmnmUE3y.js +254 -0
- package/dist/{TestEmailModal-Dpq1is9S.js → TestEmailModal-Dl633j9o.js} +3 -3
- package/dist/{TitleEditor-CLcDdcWI.js → TitleEditor-C7fds2Nc.js} +7 -7
- package/dist/{TplModal-CGzRjR96.js → TplModal-C5_CF-qn.js} +2 -2
- package/dist/{blockTypeIcons-BpPTqcok.js → blockTypeIcons-BrKZB10B.js} +1 -1
- package/dist/cdn/chunks/AiChatSidebar-X_Bv3Qys.js +2 -0
- package/dist/cdn/chunks/AiFeatureMenu-C5UQmEgV.js +59 -0
- package/dist/cdn/chunks/AiFeatureMenu-C5UQmEgV.js.map +1 -0
- package/dist/cdn/chunks/CloudEditor-DeTolKnf.js +1056 -0
- package/dist/cdn/chunks/CloudEditor-DeTolKnf.js.map +1 -0
- package/dist/cdn/chunks/CollaboratorBar-DO1nxSrr.js +51 -0
- package/dist/cdn/chunks/CollaboratorBar-DO1nxSrr.js.map +1 -0
- package/dist/cdn/chunks/CommentsSidebar-4MTw_hue.js +2 -0
- package/dist/cdn/chunks/DesignReferenceSidebar-Bswh4Yx4.js +2 -0
- package/dist/{ModuleBrowserModal-lrk3Fr0H.js → cdn/chunks/ModuleBrowserModal-ChBr3aXj.js} +52 -62
- package/dist/cdn/chunks/ModuleBrowserModal-ChBr3aXj.js.map +1 -0
- package/dist/cdn/chunks/ModulePreviewCanvas-DkSvri9H.js +107 -0
- package/dist/cdn/chunks/ModulePreviewCanvas-DkSvri9H.js.map +1 -0
- package/dist/cdn/chunks/ParagraphEditor-DU3oUKA7.js +539 -0
- package/dist/cdn/chunks/ParagraphEditor-DU3oUKA7.js.map +1 -0
- package/dist/cdn/chunks/RichTextEditorContent-BrsW1p9s.js +106 -0
- package/dist/cdn/chunks/RichTextEditorContent-BrsW1p9s.js.map +1 -0
- package/dist/cdn/chunks/SaveModuleDialog-CjqKkTEc.js +119 -0
- package/dist/cdn/chunks/SaveModuleDialog-CjqKkTEc.js.map +1 -0
- package/dist/cdn/chunks/SnapshotHistory-KME4xmn_.js +2 -0
- package/dist/cdn/chunks/TemplateScoringPanel-DgB3xDN6.js +2 -0
- package/dist/cdn/chunks/TestEmailModal-DdpvRbYf.js +2 -0
- package/dist/cdn/chunks/TitleEditor-C8FYbadT.js +166 -0
- package/dist/cdn/chunks/TitleEditor-C8FYbadT.js.map +1 -0
- package/dist/cdn/chunks/_rolldown_dynamic_import_helper-DMEI4TQ3.js +9 -0
- package/dist/cdn/chunks/blockTypeIcons-5QwYklNq.js +22 -0
- package/dist/cdn/chunks/blockTypeIcons-5QwYklNq.js.map +1 -0
- package/dist/cdn/chunks/de-BB3dgVOc.js +700 -0
- package/dist/cdn/chunks/de-BB3dgVOc.js.map +1 -0
- package/dist/cdn/chunks/de-BvYD17KT.js +89 -0
- package/dist/cdn/chunks/de-BvYD17KT.js.map +1 -0
- package/dist/cdn/chunks/dist-BF5c3Dr-.js +2 -0
- package/dist/cdn/chunks/dist-BGzvIxcJ.js +2 -0
- package/dist/cdn/chunks/dist-CFemF8rI.js +2 -0
- package/dist/cdn/chunks/dist-Co6uFhFK.js +2 -0
- package/dist/cdn/chunks/dist-DCikBY9K.js +2 -0
- package/dist/cdn/chunks/dist-DUILafAC.js +2 -0
- package/dist/cdn/chunks/dist-DghiKH0A.js +2 -0
- package/dist/cdn/chunks/dist-Dw8ckvfK.js +2 -0
- package/dist/cdn/chunks/dist-H07p0KAw.js +2 -0
- package/dist/cdn/chunks/dist-KYv9v_1z2.js +457 -0
- package/dist/cdn/chunks/dist-KYv9v_1z2.js.map +1 -0
- package/dist/cdn/chunks/dist-MjnKIc0W.js +2 -0
- package/dist/cdn/chunks/dist-odp0vGRv.js +2 -0
- package/dist/cdn/chunks/draggable-BQNU47zu.js +11544 -0
- package/dist/cdn/chunks/{draggable-ClUwYCFL.js.map → draggable-BQNU47zu.js.map} +1 -1
- package/dist/cdn/chunks/emojiData-BVEJHcNH.js +19 -0
- package/dist/cdn/chunks/{emojiData-6fVLNqeH.js.map → emojiData-BVEJHcNH.js.map} +1 -1
- package/dist/cdn/chunks/en-CpotcOPr.js +89 -0
- package/dist/cdn/chunks/en-CpotcOPr.js.map +1 -0
- package/dist/cdn/chunks/en-DeDcpnoS.js +700 -0
- package/dist/cdn/chunks/en-DeDcpnoS.js.map +1 -0
- package/dist/cdn/chunks/extensions-Bj7USRLr.js +419 -0
- package/dist/cdn/chunks/{extensions-ea_ewKUl.js.map → extensions-Bj7USRLr.js.map} +1 -1
- package/dist/cdn/chunks/features-Ds0XUfte.js +6737 -0
- package/dist/cdn/chunks/features-Ds0XUfte.js.map +1 -0
- package/dist/cdn/chunks/icons-fWsuSvgd.js +653 -0
- package/dist/cdn/chunks/icons-fWsuSvgd.js.map +1 -0
- package/dist/cdn/chunks/liquid.browser-C1VIYISn.js +3272 -0
- package/dist/cdn/chunks/liquid.browser-C1VIYISn.js.map +1 -0
- package/dist/cdn/chunks/media-library-BGQm_OyC.js +6005 -0
- package/dist/cdn/chunks/media-library-BGQm_OyC.js.map +1 -0
- package/dist/cdn/chunks/pusher-DJPhQnE8.js +2505 -0
- package/dist/cdn/chunks/pusher-DJPhQnE8.js.map +1 -0
- package/dist/cdn/chunks/readableTextColor-Cd_cgWO_.js +32 -0
- package/dist/cdn/chunks/readableTextColor-Cd_cgWO_.js.map +1 -0
- package/dist/cdn/chunks/rolldown-runtime-DPITmOBR.js +20 -0
- package/dist/cdn/chunks/src-3i8rPuqd.js +494 -0
- package/dist/cdn/chunks/src-3i8rPuqd.js.map +1 -0
- package/dist/cdn/chunks/styleConstants-DFe3I4Op.js +57 -0
- package/dist/cdn/chunks/{styleConstants-CNejCb-L.js.map → styleConstants-DFe3I4Op.js.map} +1 -1
- package/dist/cdn/chunks/styles-Dgijy53u.js +3350 -0
- package/dist/cdn/chunks/styles-Dgijy53u.js.map +1 -0
- package/dist/cdn/chunks/tiptap-BhxaWR8R.js +14208 -0
- package/dist/cdn/chunks/{tiptap-Cya4P9CN.js.map → tiptap-BhxaWR8R.js.map} +1 -1
- package/dist/cdn/editor.css +2 -1
- package/dist/cdn/editor.js +231 -1
- package/dist/cdn/editor.js.map +1 -1
- package/dist/{de-B4Ob4vCo.js → de-D7TLGIPA.js} +20 -4
- package/dist/{dist-DmpMJbmZ.js → dist-Ci5lFuUy.js} +1 -1
- package/dist/{en-YXsspZJG.js → en-DvtiEMwP.js} +20 -4
- package/dist/{extensions-CKM99njP.js → extensions-DWx_jj8v.js} +3 -3
- package/dist/{keys-Dwa2PmdD.js → keys-C0MQRs8d.js} +3 -3
- package/dist/readableTextColor-LDlmVEUv.js +30 -0
- package/dist/{styleConstants-D4SOZGBV.js → styleConstants-Cxw88naD.js} +5 -5
- package/dist/styles-fdXNRqI3.js +3556 -0
- package/dist/templatical-editor.css +1 -1
- package/dist/templatical-editor.js +122 -128
- package/dist/templatical-editor.umd.cjs +62 -71
- package/dist/{useEditorCore-Cc4RCwWq.js → useEditorCore-DUGD6pq_.js} +1247 -1088
- package/dist/{useI18n-DUirdXEX.js → useI18n-D6m7ZUgY.js} +1 -1
- package/dist/{useMergeTag-DVnlvPYJ.js → useMergeTag-BZ3X0bNr.js} +1 -1
- package/package.json +4 -2
- package/dist/CloudEditor-BDnHd6Um.js +0 -919
- package/dist/ParagraphEditor-DH8cSC6m.js +0 -625
- package/dist/TemplateScoringPanel-CTgMtc0-.js +0 -249
- package/dist/cdn/chunks/ParagraphEditor-CCtWbGDv.js +0 -3
- package/dist/cdn/chunks/ParagraphEditor-CCtWbGDv.js.map +0 -1
- package/dist/cdn/chunks/RichTextEditorContent-BUD9veXd.js +0 -2
- package/dist/cdn/chunks/RichTextEditorContent-BUD9veXd.js.map +0 -1
- package/dist/cdn/chunks/TitleEditor-e_UTyxjd.js +0 -3
- package/dist/cdn/chunks/TitleEditor-e_UTyxjd.js.map +0 -1
- package/dist/cdn/chunks/dist-0UheN8rK.js +0 -1
- package/dist/cdn/chunks/dist-55mmbGQ9.js +0 -1
- package/dist/cdn/chunks/dist-B31mxKyP.js +0 -1
- package/dist/cdn/chunks/dist-B5JI9nIg.js +0 -1
- package/dist/cdn/chunks/dist-B93vLKhU.js +0 -1
- package/dist/cdn/chunks/dist-BDt3FJvj.js +0 -1
- package/dist/cdn/chunks/dist-BJRuFHmi.js +0 -1
- package/dist/cdn/chunks/dist-BKSzrf0L.js +0 -1
- package/dist/cdn/chunks/dist-BL8c5gYQ.js +0 -1
- package/dist/cdn/chunks/dist-CYThWMP5.js +0 -1
- package/dist/cdn/chunks/dist-DxZbPJYt.js +0 -1
- package/dist/cdn/chunks/draggable-ClUwYCFL.js +0 -17
- package/dist/cdn/chunks/emojiData-6fVLNqeH.js +0 -2
- package/dist/cdn/chunks/extensions-ea_ewKUl.js +0 -2
- package/dist/cdn/chunks/icons-vmLJTaJk.js +0 -2
- package/dist/cdn/chunks/icons-vmLJTaJk.js.map +0 -1
- package/dist/cdn/chunks/rolldown-runtime-BakkzWXw.js +0 -1
- package/dist/cdn/chunks/styleConstants-CNejCb-L.js +0 -2
- package/dist/cdn/chunks/tiptap-Cya4P9CN.js +0 -145
- package/dist/cdn/chunks/useEditorCore-CwuxQuvh.js +0 -2
- package/dist/cdn/chunks/useEditorCore-CwuxQuvh.js.map +0 -1
- package/dist/cdn/chunks/useMergeTag-DVOz1v9p.js +0 -2
- package/dist/cdn/chunks/useMergeTag-DVOz1v9p.js.map +0 -1
- package/dist/i18n-CJsFtdbZ.js +0 -23
- package/dist/styles-DSw1VNU3.js +0 -3406
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as n } from "./useI18n-
|
|
1
|
+
import { S as e, w as t } from "./keys-C0MQRs8d.js";
|
|
2
|
+
import { t as n } from "./useI18n-D6m7ZUgY.js";
|
|
3
3
|
import { n as r } from "./_plugin-vue_export-helper-B1-bu7yR.js";
|
|
4
4
|
import { t as i } from "./x-CGlq2XQe.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";
|
|
@@ -37,7 +37,10 @@ var w = r("bold", [["path", {
|
|
|
37
37
|
}]]), D = ["data-tpl-theme"], O = { class: "tpl:flex tpl:items-center tpl:justify-between tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-5 tpl:py-4" }, k = {
|
|
38
38
|
id: "tpl-link-dialog-title",
|
|
39
39
|
class: "tpl:m-0 tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]"
|
|
40
|
-
}, A = ["aria-label"], j = { class: "tpl:p-5" }, M = { class: "tpl:mb-4 tpl:last:mb-0" }, N = {
|
|
40
|
+
}, A = ["aria-label"], j = { class: "tpl:p-5" }, M = { class: "tpl:mb-4 tpl:last:mb-0" }, N = {
|
|
41
|
+
for: "tpl-link-dialog-url",
|
|
42
|
+
class: "tpl:mb-1.5 tpl:block tpl:text-xs tpl:font-medium tpl:tracking-wide tpl:text-[var(--tpl-text-muted)] tpl:uppercase"
|
|
43
|
+
}, P = ["placeholder"], F = { class: "tpl:flex tpl:items-center tpl:justify-between tpl:border-t tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-elevated)] tpl:px-5 tpl:py-4" }, I = { class: "tpl:ml-auto tpl:flex tpl:gap-2" }, L = /* @__PURE__ */ f({
|
|
41
44
|
__name: "RichTextLinkDialog",
|
|
42
45
|
props: /* @__PURE__ */ m({
|
|
43
46
|
visible: { type: Boolean },
|
|
@@ -55,7 +58,7 @@ var w = r("bold", [["path", {
|
|
|
55
58
|
"keydown"
|
|
56
59
|
], ["update:linkUrl", "update:dialogRef"]),
|
|
57
60
|
setup(r, { emit: u }) {
|
|
58
|
-
let f = b(r, "linkUrl"), m = b(r, "dialogRef"), _ = u, w = p(
|
|
61
|
+
let f = b(r, "linkUrl"), m = b(r, "dialogRef"), _ = u, w = p(e, null), T = p(t, null), { t: E } = n();
|
|
59
62
|
return (e, t) => (g(), o(a, { to: "body" }, [r.visible ? (g(), c("div", {
|
|
60
63
|
key: 0,
|
|
61
64
|
"data-tpl-theme": y(T),
|
|
@@ -79,6 +82,7 @@ var w = r("bold", [["path", {
|
|
|
79
82
|
"stroke-width": 2
|
|
80
83
|
})], 8, A)]),
|
|
81
84
|
l("div", j, [l("div", M, [l("label", N, v(y(E).linkDialog.urlLabel), 1), S(l("input", {
|
|
85
|
+
id: "tpl-link-dialog-url",
|
|
82
86
|
"onUpdate:modelValue": t[1] ||= (e) => f.value = e,
|
|
83
87
|
type: "url",
|
|
84
88
|
class: "tpl:w-full tpl:rounded-md tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:px-3 tpl:py-2.5 tpl:text-sm tpl:text-[var(--tpl-text)] tpl:transition-all tpl:duration-150 tpl:outline-none tpl:placeholder:text-[var(--tpl-text-dim)] tpl:focus:border-[var(--tpl-primary)] tpl:focus:shadow-[0_0_0_3px_var(--tpl-primary-light)]",
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import "./useEditorCore-
|
|
2
|
-
import {
|
|
3
|
-
import { t as
|
|
4
|
-
import { t as
|
|
5
|
-
import { t as
|
|
6
|
-
import { Fragment as
|
|
1
|
+
import "./useEditorCore-DUGD6pq_.js";
|
|
2
|
+
import { T as e, b as t, f as n } from "./keys-C0MQRs8d.js";
|
|
3
|
+
import { t as r } from "./useI18n-D6m7ZUgY.js";
|
|
4
|
+
import { t as i } from "./loader-circle-BTQQxC3l.js";
|
|
5
|
+
import { t as a } from "./TplModal-C5_CF-qn.js";
|
|
6
|
+
import { Fragment as o, computed as s, createBlock as c, createCommentVNode as ee, createElementBlock as l, createElementVNode as u, createTextVNode as d, createVNode as f, defineComponent as p, normalizeClass as m, normalizeStyle as h, openBlock as g, ref as _, renderList as v, toDisplayString as y, unref as b, vModelText as x, watch as S, withCtx as te, withDirectives as ne } from "vue";
|
|
7
7
|
//#region src/cloud/components/SaveModuleDialog.vue?vue&type=script&setup=true&lang.ts
|
|
8
|
-
var
|
|
8
|
+
var C = ["aria-busy"], w = {
|
|
9
9
|
id: "tpl-save-module-title",
|
|
10
10
|
class: "tpl:mb-4 tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]"
|
|
11
11
|
}, T = { class: "tpl:mb-3" }, E = { class: "tpl:mb-1.5 tpl:block tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-text-muted)]" }, D = ["placeholder", "disabled"], O = { class: "tpl:mb-3" }, k = { class: "tpl:mb-1.5 tpl:block tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-text-muted)]" }, A = { class: "tpl:max-h-40 tpl:space-y-1 tpl:overflow-y-auto tpl:rounded-md tpl:border tpl:p-2 tpl:border-[var(--tpl-border)]" }, j = [
|
|
@@ -27,19 +27,19 @@ var ne = ["aria-busy"], w = {
|
|
|
27
27
|
},
|
|
28
28
|
emits: ["close", "saved"],
|
|
29
29
|
setup(p, { emit: R }) {
|
|
30
|
-
let z = p, B = R, { t: V } =
|
|
30
|
+
let z = p, B = R, { t: V } = r(), H = e(n, "SaveModuleDialog"), U = e(t, "SaveModuleDialog"), W = _(""), G = _(/* @__PURE__ */ new Set()), K = _(!1), q = _(null), J = s(() => H.content.value.blocks);
|
|
31
31
|
function Y(e, t) {
|
|
32
32
|
let n = e.type;
|
|
33
33
|
return `${V.blocks[n] ?? e.type} ${t + 1}`;
|
|
34
34
|
}
|
|
35
|
-
|
|
35
|
+
S(() => z.visible, (e) => {
|
|
36
36
|
e && (W.value = "", q.value = null, G.value = new Set(z.preSelectedBlockId ? [z.preSelectedBlockId] : []));
|
|
37
37
|
});
|
|
38
38
|
function X(e) {
|
|
39
39
|
let t = new Set(G.value);
|
|
40
40
|
t.has(e) ? t.delete(e) : t.add(e), G.value = t;
|
|
41
41
|
}
|
|
42
|
-
let Z =
|
|
42
|
+
let Z = s(() => W.value.trim().length > 0 && G.value.size > 0 && !K.value);
|
|
43
43
|
async function Q() {
|
|
44
44
|
if (Z.value) {
|
|
45
45
|
K.value = !0, q.value = null;
|
|
@@ -59,12 +59,12 @@ var ne = ["aria-busy"], w = {
|
|
|
59
59
|
function re(e) {
|
|
60
60
|
e.key === "Enter" && !e.shiftKey && (e.preventDefault(), Q()), e.key === "Escape" && $();
|
|
61
61
|
}
|
|
62
|
-
return (e, t) => (
|
|
62
|
+
return (e, t) => (g(), c(a, {
|
|
63
63
|
visible: p.visible,
|
|
64
64
|
onClose: $,
|
|
65
65
|
onKeydown: re
|
|
66
66
|
}, {
|
|
67
|
-
default:
|
|
67
|
+
default: te(() => [u("div", {
|
|
68
68
|
role: "dialog",
|
|
69
69
|
"aria-modal": "true",
|
|
70
70
|
"aria-busy": K.value,
|
|
@@ -75,18 +75,18 @@ var ne = ["aria-busy"], w = {
|
|
|
75
75
|
"box-shadow": "var(--tpl-shadow-xl)"
|
|
76
76
|
}
|
|
77
77
|
}, [
|
|
78
|
-
u("h3", w, b(
|
|
79
|
-
u("div", T, [u("label", E, b(
|
|
78
|
+
u("h3", w, y(b(V).modules.saveAsModule), 1),
|
|
79
|
+
u("div", T, [u("label", E, y(b(V).modules.moduleName), 1), ne(u("input", {
|
|
80
80
|
"onUpdate:modelValue": t[0] ||= (e) => W.value = e,
|
|
81
81
|
type: "text",
|
|
82
|
-
placeholder:
|
|
82
|
+
placeholder: b(V).modules.moduleNamePlaceholder,
|
|
83
83
|
class: "tpl:h-9 tpl:w-full tpl:rounded-md tpl:border tpl:px-3 tpl:py-1 tpl:text-sm tpl:shadow-xs tpl:outline-none tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:text-[var(--tpl-text)]",
|
|
84
84
|
disabled: K.value
|
|
85
|
-
}, null, 8, D), [[
|
|
86
|
-
u("div", O, [u("label", k, b(
|
|
85
|
+
}, null, 8, D), [[x, W.value]])]),
|
|
86
|
+
u("div", O, [u("label", k, y(b(V).modules.selectBlocks), 1), u("div", A, [(g(!0), l(o, null, v(J.value, (e, t) => (g(), l("label", {
|
|
87
87
|
key: e.id,
|
|
88
88
|
class: "tpl:flex tpl:cursor-pointer tpl:items-center tpl:gap-2 tpl:rounded-sm tpl:px-2 tpl:py-1.5 tpl:text-sm tpl:transition-colors tpl:duration-100",
|
|
89
|
-
style:
|
|
89
|
+
style: h({
|
|
90
90
|
color: "var(--tpl-text)",
|
|
91
91
|
backgroundColor: G.value.has(e.id) ? "var(--tpl-primary-light)" : "transparent"
|
|
92
92
|
})
|
|
@@ -96,24 +96,24 @@ var ne = ["aria-busy"], w = {
|
|
|
96
96
|
class: "tpl:accent-[var(--tpl-primary)]",
|
|
97
97
|
disabled: K.value,
|
|
98
98
|
onChange: (t) => X(e.id)
|
|
99
|
-
}, null, 40, j), d(" " +
|
|
100
|
-
q.value ? (
|
|
99
|
+
}, null, 40, j), d(" " + y(Y(e, t)), 1)], 4))), 128))])]),
|
|
100
|
+
q.value ? (g(), l("p", M, y(q.value), 1)) : ee("", !0),
|
|
101
101
|
u("div", N, [u("button", {
|
|
102
102
|
type: "button",
|
|
103
|
-
class:
|
|
103
|
+
class: m(["tpl:cursor-pointer tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-sm tpl:font-medium tpl:shadow-xs tpl:transition-all tpl:duration-150 tpl:border-[var(--tpl-border)] tpl:text-[var(--tpl-text)] tpl:bg-[var(--tpl-bg)]", { "tpl:cursor-not-allowed tpl:opacity-50": K.value }]),
|
|
104
104
|
disabled: K.value,
|
|
105
105
|
onClick: $
|
|
106
|
-
}, b(
|
|
106
|
+
}, y(b(V).modules.cancel), 11, P), u("button", {
|
|
107
107
|
type: "button",
|
|
108
108
|
class: "tpl:cursor-pointer tpl:rounded-md tpl:px-3 tpl:py-1.5 tpl:text-sm tpl:font-medium tpl:shadow-xs tpl:transition-all tpl:duration-150 tpl:hover:opacity-90 tpl:disabled:cursor-not-allowed tpl:disabled:opacity-50 tpl:bg-[var(--tpl-primary)] tpl:text-[var(--tpl-bg)]",
|
|
109
109
|
disabled: !Z.value,
|
|
110
110
|
onClick: Q
|
|
111
|
-
}, [K.value ? (
|
|
111
|
+
}, [K.value ? (g(), l("span", I, [f(b(i), {
|
|
112
112
|
class: "tpl:animate-spin",
|
|
113
113
|
size: 12,
|
|
114
114
|
"stroke-width": 2
|
|
115
|
-
}), d(" " + b(
|
|
116
|
-
], 8,
|
|
115
|
+
}), d(" " + y(b(V).modules.saving), 1)])) : (g(), l("span", L, y(b(V).modules.save), 1))], 8, F)])
|
|
116
|
+
], 8, C)]),
|
|
117
117
|
_: 1
|
|
118
118
|
}, 8, ["visible"]));
|
|
119
119
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import "./useEditorCore-
|
|
1
|
+
import "./useEditorCore-DUGD6pq_.js";
|
|
2
2
|
import { t as e } from "./dist-CG-vEqSU.js";
|
|
3
|
-
import { t } from "./useI18n-
|
|
3
|
+
import { t } from "./useI18n-D6m7ZUgY.js";
|
|
4
4
|
import { n } from "./_plugin-vue_export-helper-B1-bu7yR.js";
|
|
5
5
|
import { t as r } from "./chevron-down-DJLW2Q9Z.js";
|
|
6
6
|
import { t as i } from "./clock-lWIIQA3C.js";
|
|
@@ -0,0 +1,254 @@
|
|
|
1
|
+
import { T as e, f as t, g as n, x as r } from "./keys-C0MQRs8d.js";
|
|
2
|
+
import { t as ee } from "./useI18n-D6m7ZUgY.js";
|
|
3
|
+
import { n as i, t as a } from "./_plugin-vue_export-helper-B1-bu7yR.js";
|
|
4
|
+
import { t as te } from "./chevron-down-DJLW2Q9Z.js";
|
|
5
|
+
import { t as o } from "./circle-alert-E2vYPs5r.js";
|
|
6
|
+
import { n as ne, r as re, t as s } from "./refresh-cw-Bb4PEeW1.js";
|
|
7
|
+
import { t as ie } from "./loader-circle-BTQQxC3l.js";
|
|
8
|
+
import { t as c } from "./shield-check-f-qv4RKs.js";
|
|
9
|
+
import { t as l } from "./sparkles-KhBCGlqB.js";
|
|
10
|
+
import { t as u } from "./triangle-alert-DOSRIUYZ.js";
|
|
11
|
+
import { t as d } from "./x-CGlq2XQe.js";
|
|
12
|
+
import { t as f } from "./LoadingTrack-vK8W2PJf.js";
|
|
13
|
+
import { Fragment as p, Transition as ae, createBlock as m, createCommentVNode as h, createElementBlock as g, createElementVNode as _, createTextVNode as v, createVNode as y, defineComponent as b, inject as x, normalizeClass as oe, normalizeStyle as S, openBlock as C, ref as se, renderList as w, resolveDynamicComponent as T, toDisplayString as E, unref as D, watch as ce, withCtx as le } from "vue";
|
|
14
|
+
var O = i("shield-x", [
|
|
15
|
+
["path", {
|
|
16
|
+
d: "M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",
|
|
17
|
+
key: "oel41y"
|
|
18
|
+
}],
|
|
19
|
+
["path", {
|
|
20
|
+
d: "m14.5 9.5-5 5",
|
|
21
|
+
key: "17q4r4"
|
|
22
|
+
}],
|
|
23
|
+
["path", {
|
|
24
|
+
d: "m9.5 9.5 5 5",
|
|
25
|
+
key: "18nt4w"
|
|
26
|
+
}]
|
|
27
|
+
]), k = i("zap", [["path", {
|
|
28
|
+
d: "M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",
|
|
29
|
+
key: "1xq2db"
|
|
30
|
+
}]]);
|
|
31
|
+
//#endregion
|
|
32
|
+
//#region src/cloud/utils/scoringStyles.ts
|
|
33
|
+
function A(e) {
|
|
34
|
+
return e >= 80 ? "var(--tpl-success)" : e >= 60 ? "var(--tpl-warning)" : "var(--tpl-danger)";
|
|
35
|
+
}
|
|
36
|
+
function j(e) {
|
|
37
|
+
return e >= 80 ? "var(--tpl-success-light)" : e >= 60 ? "var(--tpl-warning-light)" : "var(--tpl-danger-light)";
|
|
38
|
+
}
|
|
39
|
+
function M(e) {
|
|
40
|
+
return e === "high" ? "var(--tpl-danger)" : e === "medium" ? "var(--tpl-warning)" : "var(--tpl-text-muted)";
|
|
41
|
+
}
|
|
42
|
+
function N(e) {
|
|
43
|
+
return e === "high" ? "var(--tpl-danger-light)" : e === "medium" ? "var(--tpl-warning-light)" : "var(--tpl-bg-hover)";
|
|
44
|
+
}
|
|
45
|
+
//#endregion
|
|
46
|
+
//#region src/cloud/components/TemplateScoringPanel.vue?vue&type=script&setup=true&lang.ts
|
|
47
|
+
var P = {
|
|
48
|
+
key: 0,
|
|
49
|
+
class: "tpl-scoring-panel tpl:absolute tpl:top-14 tpl:right-0 tpl:bottom-0 tpl:z-panel tpl:flex tpl:w-[360px] tpl:flex-col tpl:border-l tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-elevated)]"
|
|
50
|
+
}, F = { class: "tpl:flex tpl:items-center tpl:justify-between tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-3" }, I = { class: "tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-primary)]" }, L = { class: "tpl:flex tpl:items-center tpl:gap-1" }, R = ["title"], z = { class: "tpl:flex-1 tpl:overflow-y-auto tpl:p-4" }, B = {
|
|
51
|
+
key: 0,
|
|
52
|
+
class: "tpl:flex tpl:h-full tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:text-center"
|
|
53
|
+
}, V = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, H = {
|
|
54
|
+
key: 1,
|
|
55
|
+
class: "tpl:flex tpl:h-full tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:text-center"
|
|
56
|
+
}, U = { class: "tpl:max-w-[240px] tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, W = {
|
|
57
|
+
key: 2,
|
|
58
|
+
class: "tpl:flex tpl:flex-col tpl:gap-4"
|
|
59
|
+
}, ue = { class: "tpl:text-xs tpl:font-medium tpl:uppercase tpl:tracking-wider tpl:text-[var(--tpl-text-muted)]" }, de = {
|
|
60
|
+
key: 0,
|
|
61
|
+
class: "tpl:text-xs tpl:text-[var(--tpl-text-dim)]"
|
|
62
|
+
}, fe = {
|
|
63
|
+
key: 0,
|
|
64
|
+
class: "tpl:flex tpl:items-start tpl:gap-2 tpl:rounded-lg tpl:px-3 tpl:py-2 tpl:text-xs tpl:bg-[var(--tpl-danger-light)] tpl:text-[var(--tpl-danger)]"
|
|
65
|
+
}, pe = ["onClick"], me = { class: "tpl:flex-1 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text)]" }, he = {
|
|
66
|
+
key: 0,
|
|
67
|
+
class: "tpl:text-[10px] tpl:text-[var(--tpl-text-dim)]"
|
|
68
|
+
}, ge = {
|
|
69
|
+
key: 0,
|
|
70
|
+
class: "tpl:border-t tpl:border-[var(--tpl-border)]"
|
|
71
|
+
}, _e = {
|
|
72
|
+
key: 0,
|
|
73
|
+
class: "tpl:px-3 tpl:py-3 tpl:text-center tpl:text-xs tpl:text-[var(--tpl-text-dim)]"
|
|
74
|
+
}, ve = { class: "tpl:flex tpl:items-start tpl:gap-2" }, ye = { class: "tpl:flex-1 tpl:min-w-0" }, be = { class: "tpl:flex tpl:items-start tpl:gap-1.5" }, xe = { class: "tpl:text-xs tpl:leading-snug tpl:text-[var(--tpl-text)]" }, Se = {
|
|
75
|
+
key: 0,
|
|
76
|
+
class: "tpl:mt-1 tpl:text-[11px] tpl:leading-snug tpl:text-[var(--tpl-text-dim)]"
|
|
77
|
+
}, Ce = {
|
|
78
|
+
key: 1,
|
|
79
|
+
class: "tpl:mt-2 tpl:flex tpl:justify-center"
|
|
80
|
+
}, we = ["disabled", "onClick"], Te = {
|
|
81
|
+
key: 0,
|
|
82
|
+
class: "tpl:mt-1.5 tpl:text-[11px] tpl:text-[var(--tpl-danger)]"
|
|
83
|
+
}, Ee = {
|
|
84
|
+
key: 3,
|
|
85
|
+
class: "tpl:flex tpl:h-full tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:text-center"
|
|
86
|
+
}, De = { class: "tpl:max-w-[240px] tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, Oe = { class: "tpl:m-0 tpl:px-4 tpl:pb-2 tpl:pt-2 tpl:text-center tpl:text-[11px] tpl:text-[var(--tpl-text-dim)]" }, G = /* @__PURE__ */ a(/* @__PURE__ */ b({
|
|
87
|
+
__name: "TemplateScoringPanel",
|
|
88
|
+
props: { visible: { type: Boolean } },
|
|
89
|
+
emits: ["close"],
|
|
90
|
+
setup(i, { emit: a }) {
|
|
91
|
+
let b = i, G = a, { t: K } = ee(), q = e(t, "TemplateScoringPanel"), J = e(r, "TemplateScoringPanel"), Y = x(n, []), X = se({
|
|
92
|
+
spam: !0,
|
|
93
|
+
readability: !0,
|
|
94
|
+
accessibility: !0,
|
|
95
|
+
bestPractices: !0
|
|
96
|
+
});
|
|
97
|
+
function ke(e) {
|
|
98
|
+
X.value[e] = !X.value[e];
|
|
99
|
+
}
|
|
100
|
+
let Z = [
|
|
101
|
+
"spam",
|
|
102
|
+
"readability",
|
|
103
|
+
"accessibility",
|
|
104
|
+
"bestPractices"
|
|
105
|
+
], Ae = {
|
|
106
|
+
spam: O,
|
|
107
|
+
readability: re,
|
|
108
|
+
accessibility: l,
|
|
109
|
+
bestPractices: k
|
|
110
|
+
};
|
|
111
|
+
function Q() {
|
|
112
|
+
J.score(q.content.value, Y);
|
|
113
|
+
}
|
|
114
|
+
ce(() => b.visible, (e) => {
|
|
115
|
+
e && !J.scoringResult.value && !J.isScoring.value && Q();
|
|
116
|
+
});
|
|
117
|
+
async function je(e) {
|
|
118
|
+
if (!e.blockId) return;
|
|
119
|
+
let t = q.content.value.blocks.find((t) => t.id === e.blockId);
|
|
120
|
+
if (!t) return;
|
|
121
|
+
let n = t.content;
|
|
122
|
+
if (!n) return;
|
|
123
|
+
let r = await J.fixFinding(n, e, Y);
|
|
124
|
+
r && (q.updateBlock(e.blockId, { content: r }), J.removeFinding(e.category, e.id));
|
|
125
|
+
}
|
|
126
|
+
function $() {
|
|
127
|
+
return J.scoringResult.value ? Z.reduce((e, t) => e + (J.scoringResult.value?.categories[t]?.findings.length ?? 0), 0) : 0;
|
|
128
|
+
}
|
|
129
|
+
return (e, t) => (C(), m(ae, {
|
|
130
|
+
"enter-active-class": "tpl-scoring-slide-enter-active",
|
|
131
|
+
"enter-from-class": "tpl:translate-x-full",
|
|
132
|
+
"enter-to-class": "tpl:translate-x-0",
|
|
133
|
+
"leave-active-class": "tpl-scoring-slide-leave-active",
|
|
134
|
+
"leave-from-class": "tpl:translate-x-0",
|
|
135
|
+
"leave-to-class": "tpl:translate-x-full"
|
|
136
|
+
}, {
|
|
137
|
+
default: le(() => [i.visible ? (C(), g("div", P, [_("div", F, [_("div", I, [y(D(c), {
|
|
138
|
+
size: 13,
|
|
139
|
+
"stroke-width": 2
|
|
140
|
+
}), _("span", null, E(D(K).scoring.title), 1)]), _("div", L, [D(J).scoringResult.value && !D(J).isScoring.value ? (C(), g("button", {
|
|
141
|
+
key: 0,
|
|
142
|
+
class: "tpl:rounded-md tpl:p-0.5 tpl:transition-colors tpl:duration-150 tpl:text-[var(--tpl-text-muted)]",
|
|
143
|
+
title: D(K).scoring.rescore,
|
|
144
|
+
onClick: t[0] ||= (e) => Q()
|
|
145
|
+
}, [y(D(s), {
|
|
146
|
+
size: 14,
|
|
147
|
+
"stroke-width": 2
|
|
148
|
+
})], 8, R)) : h("", !0), _("button", {
|
|
149
|
+
class: "tpl:rounded-md tpl:p-0.5 tpl:transition-colors tpl:duration-150 tpl:text-[var(--tpl-text-muted)]",
|
|
150
|
+
onClick: t[1] ||= (e) => G("close")
|
|
151
|
+
}, [y(D(d), {
|
|
152
|
+
size: 14,
|
|
153
|
+
"stroke-width": 2
|
|
154
|
+
})])])]), _("div", z, [D(J).isScoring.value ? (C(), g("div", B, [_("p", V, E(D(K).scoring.scoring), 1), y(f, { class: "tpl:w-3/4" })])) : D(J).error.value && !D(J).scoringResult.value ? (C(), g("div", H, [
|
|
155
|
+
y(D(o), {
|
|
156
|
+
size: 32,
|
|
157
|
+
"stroke-width": 1.5,
|
|
158
|
+
class: "tpl:text-[var(--tpl-danger)]"
|
|
159
|
+
}),
|
|
160
|
+
_("p", U, E(D(K).scoring.error), 1),
|
|
161
|
+
_("button", {
|
|
162
|
+
class: "tpl:mt-2 tpl:inline-flex tpl:items-center tpl:gap-1.5 tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150 tpl:border-[var(--tpl-border)] tpl:text-[var(--tpl-text-muted)]",
|
|
163
|
+
onClick: t[2] ||= (e) => Q()
|
|
164
|
+
}, [y(D(s), {
|
|
165
|
+
size: 12,
|
|
166
|
+
"stroke-width": 2
|
|
167
|
+
}), v(" " + E(D(K).scoring.rescore), 1)])
|
|
168
|
+
])) : D(J).scoringResult.value ? (C(), g("div", W, [
|
|
169
|
+
_("div", {
|
|
170
|
+
class: "tpl:flex tpl:flex-col tpl:items-center tpl:gap-2 tpl:rounded-[var(--tpl-radius)] tpl:p-5",
|
|
171
|
+
style: S({ backgroundColor: D(j)(D(J).scoringResult.value.score) })
|
|
172
|
+
}, [
|
|
173
|
+
_("span", {
|
|
174
|
+
class: "tpl:text-4xl tpl:font-bold tpl:tabular-nums",
|
|
175
|
+
style: S({ color: D(A)(D(J).scoringResult.value.score) })
|
|
176
|
+
}, E(D(J).scoringResult.value.score), 5),
|
|
177
|
+
_("span", ue, E(D(K).scoring.overallScore), 1),
|
|
178
|
+
$() > 0 ? (C(), g("span", de, E($()) + " " + E(D(K).scoring.findings), 1)) : h("", !0)
|
|
179
|
+
], 4),
|
|
180
|
+
D(J).fixError.value ? (C(), g("div", fe, [y(D(o), {
|
|
181
|
+
size: 14,
|
|
182
|
+
"stroke-width": 2,
|
|
183
|
+
class: "tpl:mt-0.5 tpl:shrink-0"
|
|
184
|
+
}), _("span", null, E(D(K).scoring.fixError), 1)])) : h("", !0),
|
|
185
|
+
(C(), g(p, null, w(Z, (e) => _("div", {
|
|
186
|
+
key: e,
|
|
187
|
+
class: "tpl:overflow-hidden tpl:rounded-[var(--tpl-radius)] tpl:border tpl:border-[var(--tpl-border)]"
|
|
188
|
+
}, [_("button", {
|
|
189
|
+
class: "tpl:flex tpl:w-full tpl:cursor-pointer tpl:items-center tpl:gap-2.5 tpl:px-3 tpl:py-2.5 tpl:text-left tpl:transition-colors tpl:duration-100 tpl:bg-[var(--tpl-bg)]",
|
|
190
|
+
onClick: (t) => ke(e)
|
|
191
|
+
}, [
|
|
192
|
+
(C(), m(T(Ae[e]), {
|
|
193
|
+
size: 14,
|
|
194
|
+
"stroke-width": 2,
|
|
195
|
+
style: S({ color: D(A)(D(J).scoringResult.value.categories[e].score) })
|
|
196
|
+
}, null, 8, ["style"])),
|
|
197
|
+
_("span", me, E(D(K).scoring.categories[e]), 1),
|
|
198
|
+
_("span", {
|
|
199
|
+
class: "tpl:rounded-full tpl:px-2 tpl:py-0.5 tpl:text-xs tpl:font-semibold tpl:tabular-nums",
|
|
200
|
+
style: S({
|
|
201
|
+
color: D(A)(D(J).scoringResult.value.categories[e].score),
|
|
202
|
+
backgroundColor: D(j)(D(J).scoringResult.value.categories[e].score)
|
|
203
|
+
})
|
|
204
|
+
}, E(D(J).scoringResult.value.categories[e].score), 5),
|
|
205
|
+
D(J).scoringResult.value.categories[e].findings.length > 0 ? (C(), g("span", he, E(D(J).scoringResult.value.categories[e].findings.length), 1)) : h("", !0),
|
|
206
|
+
y(D(te), {
|
|
207
|
+
size: 12,
|
|
208
|
+
"stroke-width": 2,
|
|
209
|
+
class: oe(["tpl:transition-transform tpl:duration-200 tpl:text-[var(--tpl-text-dim)]", X.value[e] ? "tpl:rotate-0" : "tpl:-rotate-90"])
|
|
210
|
+
}, null, 8, ["class"])
|
|
211
|
+
], 8, pe), X.value[e] ? (C(), g("div", ge, [D(J).scoringResult.value.categories[e].findings.length === 0 ? (C(), g("div", _e, E(D(K).scoring.noFindings), 1)) : h("", !0), (C(!0), g(p, null, w(D(J).scoringResult.value.categories[e].findings, (e) => (C(), g("div", {
|
|
212
|
+
key: e.id,
|
|
213
|
+
class: "tpl:border-t tpl:px-3 tpl:py-2.5 first:tpl:border-t-0 tpl:border-[var(--tpl-border-light)]"
|
|
214
|
+
}, [_("div", ve, [(C(), m(T(e.severity === "high" ? D(o) : e.severity === "medium" ? D(u) : D(ne)), {
|
|
215
|
+
size: 13,
|
|
216
|
+
"stroke-width": 2,
|
|
217
|
+
class: "tpl:mt-0.5 tpl:shrink-0",
|
|
218
|
+
style: S({ color: D(M)(e.severity) })
|
|
219
|
+
}, null, 8, ["style"])), _("div", ye, [
|
|
220
|
+
_("div", be, [_("span", {
|
|
221
|
+
class: "tpl:mt-0.5 tpl:shrink-0 tpl:rounded tpl:px-1 tpl:py-px tpl:text-[10px] tpl:font-medium tpl:leading-tight",
|
|
222
|
+
style: S({
|
|
223
|
+
color: D(M)(e.severity),
|
|
224
|
+
backgroundColor: D(N)(e.severity)
|
|
225
|
+
})
|
|
226
|
+
}, E(D(K).scoring.severity[e.severity]), 5), _("span", xe, E(e.message), 1)]),
|
|
227
|
+
e.suggestion ? (C(), g("p", Se, E(e.suggestion), 1)) : h("", !0),
|
|
228
|
+
e.blockId ? (C(), g("div", Ce, [_("button", {
|
|
229
|
+
class: "tpl-scoring-fix-btn tpl:inline-flex tpl:items-center tpl:gap-1.5 tpl:rounded tpl:border tpl:px-3 tpl:py-1.5 tpl:text-[11px] tpl:font-medium tpl:transition-all tpl:duration-150 tpl:disabled:opacity-50 tpl:border-[var(--tpl-border)] tpl:text-[var(--tpl-primary)]",
|
|
230
|
+
style: { "background-color": "transparent" },
|
|
231
|
+
disabled: D(J).fixingFindingId.value !== null,
|
|
232
|
+
onClick: (t) => je(e)
|
|
233
|
+
}, [D(J).fixingFindingId.value === e.id ? (C(), m(D(ie), {
|
|
234
|
+
key: 0,
|
|
235
|
+
class: "tpl-spinner",
|
|
236
|
+
size: 11,
|
|
237
|
+
"stroke-width": 2
|
|
238
|
+
})) : (C(), m(D(l), {
|
|
239
|
+
key: 1,
|
|
240
|
+
size: 11,
|
|
241
|
+
"stroke-width": 2
|
|
242
|
+
})), v(" " + E(D(J).fixingFindingId.value === e.id ? D(K).scoring.fixing : D(K).scoring.fix), 1)], 8, we), D(J).fixError.value ? (C(), g("p", Te, E(D(J).fixError.value), 1)) : h("", !0)])) : h("", !0)
|
|
243
|
+
])])]))), 128))])) : h("", !0)])), 64))
|
|
244
|
+
])) : (C(), g("div", Ee, [y(D(c), {
|
|
245
|
+
size: 32,
|
|
246
|
+
"stroke-width": 1.5,
|
|
247
|
+
class: "tpl:text-[var(--tpl-text-dim)]"
|
|
248
|
+
}), _("p", De, E(D(K).scoring.emptyState), 1)])), _("p", Oe, E(D(K).aiMenu.disclaimer), 1)])])) : h("", !0)]),
|
|
249
|
+
_: 1
|
|
250
|
+
}));
|
|
251
|
+
}
|
|
252
|
+
}), [["__scopeId", "data-v-bb4db637"]]);
|
|
253
|
+
//#endregion
|
|
254
|
+
export { G as default };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import "./useEditorCore-
|
|
2
|
-
import { t as e } from "./useI18n-
|
|
1
|
+
import "./useEditorCore-DUGD6pq_.js";
|
|
2
|
+
import { t as e } from "./useI18n-D6m7ZUgY.js";
|
|
3
3
|
import { t } from "./loader-circle-BTQQxC3l.js";
|
|
4
|
-
import { t as n } from "./TplModal-
|
|
4
|
+
import { t as n } from "./TplModal-C5_CF-qn.js";
|
|
5
5
|
import { Fragment as r, createBlock as i, createCommentVNode as a, createElementBlock as o, createElementVNode as s, createTextVNode as c, createVNode as l, defineComponent as u, normalizeClass as d, openBlock as f, ref as p, renderList as m, toDisplayString as h, unref as g, vModelSelect as _, watch as v, withCtx as y, withDirectives as b } from "vue";
|
|
6
6
|
//#region src/cloud/components/TestEmailModal.vue?vue&type=script&setup=true&lang.ts
|
|
7
7
|
var x = ["aria-busy"], S = {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { b as e } from "./useEditorCore-
|
|
2
|
-
import {
|
|
3
|
-
import { t as r } from "./useI18n-
|
|
4
|
-
import { a as i, i as a, n as o, r as s, t as c } from "./RichTextEditorContent-
|
|
1
|
+
import { b as e } from "./useEditorCore-DUGD6pq_.js";
|
|
2
|
+
import { S as t, w as n } from "./keys-C0MQRs8d.js";
|
|
3
|
+
import { t as r } from "./useI18n-D6m7ZUgY.js";
|
|
4
|
+
import { a as i, i as a, n as o, r as s, t as c } from "./RichTextEditorContent-CHJlh7HJ.js";
|
|
5
5
|
import { t as l } from "./loader-circle-BTQQxC3l.js";
|
|
6
6
|
import { t as u } from "./scan-line-7lZPfOdm.js";
|
|
7
7
|
import { Fragment as d, Teleport as f, createBlock as p, createCommentVNode as m, createElementBlock as h, createElementVNode as g, createTextVNode as _, createVNode as v, defineComponent as y, inject as b, isRef as x, normalizeClass as S, normalizeStyle as C, openBlock as w, toDisplayString as T, unref as E } from "vue";
|
|
@@ -20,17 +20,17 @@ var D = { class: "tpl-text-editor-wrapper tpl:relative" }, O = ["data-tpl-theme"
|
|
|
20
20
|
},
|
|
21
21
|
emits: ["done"],
|
|
22
22
|
setup(y, { emit: P }) {
|
|
23
|
-
let F = y, I = P, L = b(
|
|
23
|
+
let F = y, I = P, L = b(t, null), R = b(n, null), { t: z } = r(), { editor: B, EditorContent: V, isLoading: H, initError: U, retry: W, showLinkDialog: G, linkUrl: K, linkDialogRef: q, mergeTagEnabled: J, openLinkDialog: Y, insertLink: X, removeLink: Z, closeLinkDialog: Q, handleLinkKeydown: te, handleAddMergeTag: $ } = e({
|
|
24
24
|
blockId: () => F.block.id,
|
|
25
25
|
blockContent: () => F.block.content,
|
|
26
26
|
onDone: () => I("done"),
|
|
27
27
|
editorName: "TitleEditor",
|
|
28
28
|
async loadExtensions({ mergeTags: e, syntax: t }) {
|
|
29
29
|
let [{ Editor: n, EditorContent: r }, { default: i }, { default: a }, { MergeTagNode: o, LogicMergeTagNode: s }] = await Promise.all([
|
|
30
|
-
import("./dist-
|
|
30
|
+
import("./dist-Ci5lFuUy.js").then((e) => e.r),
|
|
31
31
|
import("./dist-DysAFIPy.js"),
|
|
32
32
|
import("./dist-Bu7veieH.js"),
|
|
33
|
-
import("./extensions-
|
|
33
|
+
import("./extensions-DWx_jj8v.js")
|
|
34
34
|
]);
|
|
35
35
|
return {
|
|
36
36
|
TiptapEditor: n,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { w as e } from "./useEditorCore-
|
|
2
|
-
import {
|
|
1
|
+
import { w as e } from "./useEditorCore-DUGD6pq_.js";
|
|
2
|
+
import { w as t } from "./keys-C0MQRs8d.js";
|
|
3
3
|
import { Teleport as n, Transition as r, computed as i, createBlock as a, createCommentVNode as o, createElementBlock as s, createElementVNode as c, createVNode as l, defineComponent as u, inject as d, openBlock as f, ref as p, renderSlot as m, unref as h, withCtx as g, withModifiers as _ } from "vue";
|
|
4
4
|
//#region src/cloud/components/TplModal.vue?vue&type=script&setup=true&lang.ts
|
|
5
5
|
var v = ["data-tpl-theme"], y = /* @__PURE__ */ u({
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { D as e, E as t, M as n, O as r, k as i } from "./useEditorCore-
|
|
1
|
+
import { D as e, E as t, M as n, O as r, k as i } from "./useEditorCore-DUGD6pq_.js";
|
|
2
2
|
import { n as a } from "./_plugin-vue_export-helper-B1-bu7yR.js";
|
|
3
3
|
var o = a("columns-3", [
|
|
4
4
|
["rect", {
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { F as e, N as t, R as n, S as r, _ as i, ct as a, d as o, h as s, lt as c, m as l, p as u } from "./draggable-BQNU47zu.js";
|
|
2
|
+
import { $ as d, Mt as f, Xt as p, at as m, gt as h, jt as g, ot as _ } from "./features-Ds0XUfte.js";
|
|
3
|
+
//#region src/cloud/components/AiFeatureMenu.vue?vue&type=script&setup=true&lang.ts
|
|
4
|
+
var v = {
|
|
5
|
+
class: "tpl-ai-feature-menu tpl:w-[280px] tpl:overflow-hidden tpl:rounded-[var(--tpl-radius)] tpl:py-1 tpl:bg-[var(--tpl-bg-elevated)] tpl:border tpl:border-[var(--tpl-border)] tpl:shadow-[var(--tpl-shadow-lg)]",
|
|
6
|
+
style: {
|
|
7
|
+
"backdrop-filter": "blur(8px)",
|
|
8
|
+
"-webkit-backdrop-filter": "blur(8px)"
|
|
9
|
+
}
|
|
10
|
+
}, y = ["onClick"], b = { class: "tpl:flex tpl:min-w-0 tpl:flex-col tpl:gap-0.5" }, x = { class: "tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-text)]" }, S = { class: "tpl:text-xs tpl:leading-snug tpl:text-[var(--tpl-text-muted)]" }, C = /* @__PURE__ */ d(/* @__PURE__ */ r({
|
|
11
|
+
__name: "AiFeatureMenu",
|
|
12
|
+
props: { activeFeature: {} },
|
|
13
|
+
emits: ["select"],
|
|
14
|
+
setup(r, { emit: d }) {
|
|
15
|
+
let C = d, { t: w } = g(), T = p(f, "AiFeatureMenu"), E = {
|
|
16
|
+
"ai-chat": "chat",
|
|
17
|
+
"design-reference": "designToTemplate",
|
|
18
|
+
scoring: "scoring"
|
|
19
|
+
}, D = [
|
|
20
|
+
{
|
|
21
|
+
key: "ai-chat",
|
|
22
|
+
icon: m
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
key: "design-reference",
|
|
26
|
+
icon: h
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
key: "scoring",
|
|
30
|
+
icon: _
|
|
31
|
+
}
|
|
32
|
+
], O = u(() => D.filter((e) => T.isFeatureEnabled(E[e.key])));
|
|
33
|
+
function k(e) {
|
|
34
|
+
return e === "ai-chat" ? w.aiMenu.aiAssistant : e === "design-reference" ? w.aiMenu.designToTemplate : w.aiMenu.templateScore;
|
|
35
|
+
}
|
|
36
|
+
function A(e) {
|
|
37
|
+
return e === "ai-chat" ? w.aiMenu.aiAssistantDesc : e === "design-reference" ? w.aiMenu.designToTemplateDesc : w.aiMenu.templateScoreDesc;
|
|
38
|
+
}
|
|
39
|
+
return (u, d) => (t(), i("div", v, [(t(!0), i(o, null, e(O.value, (e) => (t(), i("button", {
|
|
40
|
+
key: e.key,
|
|
41
|
+
class: "tpl-ai-feature-menu-item tpl:flex tpl:w-full tpl:cursor-pointer tpl:items-start tpl:gap-3 tpl:border-none tpl:px-3 tpl:py-2.5 tpl:text-left tpl:transition-colors tpl:duration-100",
|
|
42
|
+
style: a({ backgroundColor: r.activeFeature === e.key ? "var(--tpl-primary-light)" : "transparent" }),
|
|
43
|
+
onClick: (t) => C("select", e.key)
|
|
44
|
+
}, [l("div", {
|
|
45
|
+
class: "tpl:mt-0.5 tpl:flex tpl:size-7 tpl:shrink-0 tpl:items-center tpl:justify-center tpl:rounded-[var(--tpl-radius-sm)]",
|
|
46
|
+
style: a({
|
|
47
|
+
backgroundColor: r.activeFeature === e.key ? "var(--tpl-primary)" : "var(--tpl-bg-active)",
|
|
48
|
+
color: r.activeFeature === e.key ? "var(--tpl-bg)" : "var(--tpl-text-muted)"
|
|
49
|
+
})
|
|
50
|
+
}, [(t(), s(n(e.icon), {
|
|
51
|
+
size: 15,
|
|
52
|
+
"stroke-width": 2
|
|
53
|
+
}))], 4), l("div", b, [l("span", x, c(k(e.key)), 1), l("span", S, c(A(e.key)), 1)])], 12, y))), 128))]));
|
|
54
|
+
}
|
|
55
|
+
}), [["__scopeId", "data-v-638e1be2"]]);
|
|
56
|
+
//#endregion
|
|
57
|
+
export { C as default };
|
|
58
|
+
|
|
59
|
+
//# sourceMappingURL=AiFeatureMenu-C5UQmEgV.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AiFeatureMenu-C5UQmEgV.js","names":[],"sources":["../../../src/cloud/components/AiFeatureMenu.vue","../../../src/cloud/components/AiFeatureMenu.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { useI18n } from \"../../composables\";\nimport { AI_CONFIG_KEY, requireInject } from \"../../keys\";\nimport type { AiConfig } from \"@templatical/types\";\nimport { ImageUp, ShieldCheck, Sparkles } from \"@lucide/vue\";\nimport { computed } from \"vue\";\n\nexport type AiFeature = \"ai-chat\" | \"design-reference\" | \"scoring\";\n\ndefineProps<{\n activeFeature: AiFeature | null;\n}>();\n\nconst emit = defineEmits<{\n (e: \"select\", feature: AiFeature): void;\n}>();\n\nconst { t } = useI18n();\n\nconst aiConfig = requireInject(AI_CONFIG_KEY, \"AiFeatureMenu\");\n\nconst configKeyMap: Record<AiFeature, keyof AiConfig> = {\n \"ai-chat\": \"chat\",\n \"design-reference\": \"designToTemplate\",\n scoring: \"scoring\",\n};\n\nconst allFeatures: { key: AiFeature; icon: typeof Sparkles }[] = [\n { key: \"ai-chat\", icon: Sparkles },\n { key: \"design-reference\", icon: ImageUp },\n { key: \"scoring\", icon: ShieldCheck },\n];\n\nconst features = computed(() =>\n allFeatures.filter((f) => aiConfig.isFeatureEnabled(configKeyMap[f.key])),\n);\n\nfunction getTitle(key: AiFeature): string {\n if (key === \"ai-chat\") return t.aiMenu.aiAssistant;\n if (key === \"design-reference\") return t.aiMenu.designToTemplate;\n return t.aiMenu.templateScore;\n}\n\nfunction getDescription(key: AiFeature): string {\n if (key === \"ai-chat\") return t.aiMenu.aiAssistantDesc;\n if (key === \"design-reference\") return t.aiMenu.designToTemplateDesc;\n return t.aiMenu.templateScoreDesc;\n}\n</script>\n\n<template>\n <div\n class=\"tpl-ai-feature-menu tpl:w-[280px] tpl:overflow-hidden tpl:rounded-[var(--tpl-radius)] tpl:py-1 tpl:bg-[var(--tpl-bg-elevated)] tpl:border tpl:border-[var(--tpl-border)] tpl:shadow-[var(--tpl-shadow-lg)]\"\n style=\"backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px)\"\n >\n <button\n v-for=\"feature in features\"\n :key=\"feature.key\"\n class=\"tpl-ai-feature-menu-item tpl:flex tpl:w-full tpl:cursor-pointer tpl:items-start tpl:gap-3 tpl:border-none tpl:px-3 tpl:py-2.5 tpl:text-left tpl:transition-colors tpl:duration-100\"\n :style=\"{\n backgroundColor:\n activeFeature === feature.key\n ? 'var(--tpl-primary-light)'\n : 'transparent',\n }\"\n @click=\"emit('select', feature.key)\"\n >\n <div\n class=\"tpl:mt-0.5 tpl:flex tpl:size-7 tpl:shrink-0 tpl:items-center tpl:justify-center tpl:rounded-[var(--tpl-radius-sm)]\"\n :style=\"{\n backgroundColor:\n activeFeature === feature.key\n ? 'var(--tpl-primary)'\n : 'var(--tpl-bg-active)',\n color:\n activeFeature === feature.key\n ? 'var(--tpl-bg)'\n : 'var(--tpl-text-muted)',\n }\"\n >\n <component :is=\"feature.icon\" :size=\"15\" :stroke-width=\"2\" />\n </div>\n <div class=\"tpl:flex tpl:min-w-0 tpl:flex-col tpl:gap-0.5\">\n <span class=\"tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-text)]\">\n {{ getTitle(feature.key) }}\n </span>\n <span\n class=\"tpl:text-xs tpl:leading-snug tpl:text-[var(--tpl-text-muted)]\"\n >\n {{ getDescription(feature.key) }}\n </span>\n </div>\n </button>\n </div>\n</template>\n\n<style scoped>\n.tpl-ai-feature-menu-item:hover {\n background-color: var(--tpl-bg-hover) !important;\n}\n</style>\n","<script setup lang=\"ts\">\nimport { useI18n } from \"../../composables\";\nimport { AI_CONFIG_KEY, requireInject } from \"../../keys\";\nimport type { AiConfig } from \"@templatical/types\";\nimport { ImageUp, ShieldCheck, Sparkles } from \"@lucide/vue\";\nimport { computed } from \"vue\";\n\nexport type AiFeature = \"ai-chat\" | \"design-reference\" | \"scoring\";\n\ndefineProps<{\n activeFeature: AiFeature | null;\n}>();\n\nconst emit = defineEmits<{\n (e: \"select\", feature: AiFeature): void;\n}>();\n\nconst { t } = useI18n();\n\nconst aiConfig = requireInject(AI_CONFIG_KEY, \"AiFeatureMenu\");\n\nconst configKeyMap: Record<AiFeature, keyof AiConfig> = {\n \"ai-chat\": \"chat\",\n \"design-reference\": \"designToTemplate\",\n scoring: \"scoring\",\n};\n\nconst allFeatures: { key: AiFeature; icon: typeof Sparkles }[] = [\n { key: \"ai-chat\", icon: Sparkles },\n { key: \"design-reference\", icon: ImageUp },\n { key: \"scoring\", icon: ShieldCheck },\n];\n\nconst features = computed(() =>\n allFeatures.filter((f) => aiConfig.isFeatureEnabled(configKeyMap[f.key])),\n);\n\nfunction getTitle(key: AiFeature): string {\n if (key === \"ai-chat\") return t.aiMenu.aiAssistant;\n if (key === \"design-reference\") return t.aiMenu.designToTemplate;\n return t.aiMenu.templateScore;\n}\n\nfunction getDescription(key: AiFeature): string {\n if (key === \"ai-chat\") return t.aiMenu.aiAssistantDesc;\n if (key === \"design-reference\") return t.aiMenu.designToTemplateDesc;\n return t.aiMenu.templateScoreDesc;\n}\n</script>\n\n<template>\n <div\n class=\"tpl-ai-feature-menu tpl:w-[280px] tpl:overflow-hidden tpl:rounded-[var(--tpl-radius)] tpl:py-1 tpl:bg-[var(--tpl-bg-elevated)] tpl:border tpl:border-[var(--tpl-border)] tpl:shadow-[var(--tpl-shadow-lg)]\"\n style=\"backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px)\"\n >\n <button\n v-for=\"feature in features\"\n :key=\"feature.key\"\n class=\"tpl-ai-feature-menu-item tpl:flex tpl:w-full tpl:cursor-pointer tpl:items-start tpl:gap-3 tpl:border-none tpl:px-3 tpl:py-2.5 tpl:text-left tpl:transition-colors tpl:duration-100\"\n :style=\"{\n backgroundColor:\n activeFeature === feature.key\n ? 'var(--tpl-primary-light)'\n : 'transparent',\n }\"\n @click=\"emit('select', feature.key)\"\n >\n <div\n class=\"tpl:mt-0.5 tpl:flex tpl:size-7 tpl:shrink-0 tpl:items-center tpl:justify-center tpl:rounded-[var(--tpl-radius-sm)]\"\n :style=\"{\n backgroundColor:\n activeFeature === feature.key\n ? 'var(--tpl-primary)'\n : 'var(--tpl-bg-active)',\n color:\n activeFeature === feature.key\n ? 'var(--tpl-bg)'\n : 'var(--tpl-text-muted)',\n }\"\n >\n <component :is=\"feature.icon\" :size=\"15\" :stroke-width=\"2\" />\n </div>\n <div class=\"tpl:flex tpl:min-w-0 tpl:flex-col tpl:gap-0.5\">\n <span class=\"tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-text)]\">\n {{ getTitle(feature.key) }}\n </span>\n <span\n class=\"tpl:text-xs tpl:leading-snug tpl:text-[var(--tpl-text-muted)]\"\n >\n {{ getDescription(feature.key) }}\n </span>\n </div>\n </button>\n </div>\n</template>\n\n<style scoped>\n.tpl-ai-feature-menu-item:hover {\n background-color: var(--tpl-bg-hover) !important;\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;EAaA,IAAM,IAAO,GAIP,EAAE,SAAM,GAAS,EAEjB,IAAW,EAAc,GAAe,gBAAgB,EAExD,IAAkD;GACtD,WAAW;GACX,oBAAoB;GACpB,SAAS;GACV,EAEK,IAA2D;GAC/D;IAAE,KAAK;IAAW,MAAM;IAAU;GAClC;IAAE,KAAK;IAAoB,MAAM;IAAS;GAC1C;IAAE,KAAK;IAAW,MAAM;IAAa;GACtC,EAEK,IAAW,QACf,EAAY,QAAQ,MAAM,EAAS,iBAAiB,EAAa,EAAE,KAAK,CAAC,CAC1E;EAED,SAAS,EAAS,GAAwB;AAGxC,UAFI,MAAQ,YAAkB,EAAE,OAAO,cACnC,MAAQ,qBAA2B,EAAE,OAAO,mBACzC,EAAE,OAAO;;EAGlB,SAAS,EAAe,GAAwB;AAG9C,UAFI,MAAQ,YAAkB,EAAE,OAAO,kBACnC,MAAQ,qBAA2B,EAAE,OAAO,uBACzC,EAAE,OAAO;;yBAKhB,EA0CM,OA1CN,GA0CM,EAAA,EAAA,GAAA,EAtCJ,EAqCS,GAAA,MAAA,EApCW,EAAA,QAAX,YADT,EAqCS,UAAA;GAnCN,KAAK,EAAQ;GACd,OAAM;GACL,OAAK,EAAA,EAAA,iBAAuC,EAAA,kBAAkB,EAAQ,MAAA,6BAAA,eAAA,CAAA;GAMtE,UAAK,MAAE,EAAI,UAAW,EAAQ,IAAG;MAElC,EAcM,OAAA;GAbJ,OAAM;GACL,OAAK,EAAA;qBAA2C,EAAA,kBAAkB,EAAQ,MAAA,uBAAA;WAA8G,EAAA,kBAAkB,EAAQ,MAAA,kBAAA;;YAWnN,EAA6D,EAA7C,EAAQ,KAAI,EAAA;GAAG,MAAM;GAAK,gBAAc;YAE1D,EASM,OATN,GASM,CARJ,EAEO,QAFP,GAEO,EADF,EAAS,EAAQ,IAAG,CAAA,EAAA,EAAA,EAEzB,EAIO,QAJP,GAIO,EADF,EAAe,EAAQ,IAAG,CAAA,EAAA,EAAA,CAAA,CAAA,CAAA,EAAA,IAAA,EAAA"}
|