@templatical/editor 0.5.1 → 0.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/AccessibilityPanel-CvQGLdu6.js +108 -0
- package/dist/{AiChatSidebar-Cg206ewI.js → AiChatSidebar-Br9dhkIB.js} +17 -16
- package/dist/{AiFeatureMenu-D7Od4cI2.js → AiFeatureMenu-Ceewb3uB.js} +13 -13
- package/dist/BlockA11yBadge-CXDLqkcJ.js +34 -0
- package/dist/{CloudEditor-DG8fWnXI.js → CloudEditor-D_flODpm.js} +306 -217
- package/dist/{CollaboratorBar-BdXfCYAr.js → CollaboratorBar-BcSxXVY-.js} +4 -4
- package/dist/{CommentsSidebar-BAma2apG.js → CommentsSidebar-DceMRyIS.js} +26 -25
- package/dist/{CountdownBlock-Ce3RFNpM.js → CountdownBlock-BNSj1jvJ.js} +2 -2
- package/dist/{CountdownToolbar-Bo3Jaiky.js → CountdownToolbar-ClJr2GzL.js} +3 -3
- package/dist/{DesignReferenceSidebar-B8DDnLHQ.js → DesignReferenceSidebar-50qFipmW.js} +30 -29
- package/dist/{LoadingTrack-DhxulLPM.js → LoadingTrack-B0CWFHXQ.js} +1 -1
- package/dist/{ModuleBrowserModal-DpMInJoP.js → ModuleBrowserModal-BnSdG4DE.js} +10 -10
- package/dist/{ModulePreviewCanvas-MjIGlxVI.js → ModulePreviewCanvas-B78PuZdk.js} +2 -2
- package/dist/{NumberWithSuffix-BysfchFp.js → NumberWithSuffix-DkXUez9t.js} +3 -3
- package/dist/{ParagraphEditor-B5qZL5c2.js → ParagraphEditor-CPBYk2m3.js} +39 -38
- package/dist/{RichTextEditorContent-jxPxfbfZ.js → RichTextEditorContent-DYkIauIk.js} +4 -4
- package/dist/{SaveModuleDialog-BGFYMJby.js → SaveModuleDialog-Df__VToK.js} +7 -7
- package/dist/{SnapshotHistory-4aWE_-GM.js → SnapshotHistory-QBTbVrEK.js} +9 -9
- package/dist/{TemplateScoringPanel-BmAHdgLF.js → TemplateScoringPanel-4GTNHej5.js} +29 -27
- package/dist/{TestEmailModal-p-iH28wl.js → TestEmailModal-DaDMACHY.js} +4 -4
- package/dist/{TitleEditor-BHxJ6Oxd.js → TitleEditor-PHShl4tS.js} +10 -10
- package/dist/{TplModal-BiUCSfou.js → TplModal-DzlNkBYQ.js} +2 -2
- package/dist/_plugin-vue_export-helper-B0hnzhyu.js +8 -0
- package/dist/accessibility-e8JYu_zd.js +27 -0
- package/dist/{blockTypeIcons-8GJD96Tw.js → blockTypeIcons-D0wkSpP9.js} +2 -2
- package/dist/bundle-stats.json +8 -8
- package/dist/cdn/chunks/AccessibilityPanel-fjNLcnxu.js +97 -0
- package/dist/cdn/chunks/AccessibilityPanel-fjNLcnxu.js.map +1 -0
- package/dist/cdn/chunks/{AiFeatureMenu-DSXAYiMk.js → AiFeatureMenu-DSamZ3ve.js} +5 -5
- package/dist/cdn/chunks/{AiFeatureMenu-DSXAYiMk.js.map → AiFeatureMenu-DSamZ3ve.js.map} +1 -1
- package/dist/cdn/chunks/BlockA11yBadge-D73PKVS8.js +33 -0
- package/dist/cdn/chunks/BlockA11yBadge-D73PKVS8.js.map +1 -0
- package/dist/cdn/chunks/{CloudEditor-CRYF-bR3.js → CloudEditor-BGfliRFn.js} +253 -166
- package/dist/cdn/chunks/CloudEditor-BGfliRFn.js.map +1 -0
- package/dist/cdn/chunks/{CollaboratorBar-CTFgLtUt.js → CollaboratorBar-BRvF0m5t.js} +6 -6
- package/dist/cdn/chunks/{CollaboratorBar-CTFgLtUt.js.map → CollaboratorBar-BRvF0m5t.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownBlock-BKg-e3Uo.js → CountdownBlock-IIZk8uja.js} +2 -2
- package/dist/cdn/chunks/{CountdownBlock-BKg-e3Uo.js.map → CountdownBlock-IIZk8uja.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownToolbar-CPAOXOwI.js → CountdownToolbar-mXM3YITU.js} +3 -3
- package/dist/cdn/chunks/{CountdownToolbar-CPAOXOwI.js.map → CountdownToolbar-mXM3YITU.js.map} +1 -1
- package/dist/cdn/chunks/{ModuleBrowserModal-B70ZM4KG.js → ModuleBrowserModal-BgIdqEyV.js} +7 -7
- package/dist/cdn/chunks/{ModuleBrowserModal-B70ZM4KG.js.map → ModuleBrowserModal-BgIdqEyV.js.map} +1 -1
- package/dist/cdn/chunks/{ModulePreviewCanvas-VHhQwuFP.js → ModulePreviewCanvas-BOFLwREg.js} +18 -18
- package/dist/cdn/chunks/{ModulePreviewCanvas-VHhQwuFP.js.map → ModulePreviewCanvas-BOFLwREg.js.map} +1 -1
- package/dist/cdn/chunks/{NumberWithSuffix-DnqYqSKs.js → NumberWithSuffix-Cxe5sPC2.js} +4 -4
- package/dist/cdn/chunks/{NumberWithSuffix-DnqYqSKs.js.map → NumberWithSuffix-Cxe5sPC2.js.map} +1 -1
- package/dist/cdn/chunks/{ParagraphEditor-oVEaeerJ.js → ParagraphEditor-7Wycs4gM.js} +53 -53
- package/dist/cdn/chunks/{ParagraphEditor-oVEaeerJ.js.map → ParagraphEditor-7Wycs4gM.js.map} +1 -1
- package/dist/cdn/chunks/{RichTextEditorContent-CmOwLOeY.js → RichTextEditorContent-DVw5mwEA.js} +4 -4
- package/dist/cdn/chunks/{RichTextEditorContent-CmOwLOeY.js.map → RichTextEditorContent-DVw5mwEA.js.map} +1 -1
- package/dist/cdn/chunks/{SaveModuleDialog-B6kNizps.js → SaveModuleDialog-Cz1xEjJG.js} +3 -3
- package/dist/cdn/chunks/{SaveModuleDialog-B6kNizps.js.map → SaveModuleDialog-Cz1xEjJG.js.map} +1 -1
- package/dist/cdn/chunks/{TitleEditor-CvZe3neh.js → TitleEditor-DTF4hRB6.js} +12 -12
- package/dist/cdn/chunks/{TitleEditor-CvZe3neh.js.map → TitleEditor-DTF4hRB6.js.map} +1 -1
- package/dist/cdn/chunks/blockTypeIcons-C5tZU4ot.js +22 -0
- package/dist/cdn/chunks/{blockTypeIcons-Bs9B-yft.js.map → blockTypeIcons-C5tZU4ot.js.map} +1 -1
- package/dist/cdn/chunks/{de-CGu9U1iv.js → de-Ce-LbJ2J.js} +1 -1
- package/dist/cdn/chunks/{de-CGu9U1iv.js.map → de-Ce-LbJ2J.js.map} +1 -1
- package/dist/{de-DwLWZn6p.js → cdn/chunks/de-D8CnZxV9.js} +21 -1
- package/dist/cdn/chunks/de-D8CnZxV9.js.map +1 -0
- package/dist/{de-CbSb23fl.js → cdn/chunks/de-RQrZR56a.js} +8 -0
- package/dist/cdn/chunks/{de-Db6I9YdS.js.map → de-RQrZR56a.js.map} +1 -1
- package/dist/cdn/chunks/{emojiData-Vv_m5TSB.js → emojiData-EMFlj6FJ.js} +1 -1
- package/dist/cdn/chunks/{emojiData-Vv_m5TSB.js.map → emojiData-EMFlj6FJ.js.map} +1 -1
- package/dist/{en-BrlGVpmd.js → cdn/chunks/en-8FHaQv4V.js} +21 -1
- package/dist/cdn/chunks/en-8FHaQv4V.js.map +1 -0
- package/dist/{en-2fvenFu0.js → cdn/chunks/en-Bl1ecfRF.js} +8 -0
- package/dist/cdn/chunks/{en-BbqBJ2Q3.js.map → en-Bl1ecfRF.js.map} +1 -1
- package/dist/cdn/chunks/{en-C3WMCISl.js → en-DiCWK5fG.js} +1 -1
- package/dist/cdn/chunks/{en-C3WMCISl.js.map → en-DiCWK5fG.js.map} +1 -1
- package/dist/cdn/chunks/{extensions-D13MqxlW.js → extensions-BrVEX2vQ.js} +37 -34
- package/dist/cdn/chunks/{extensions-D13MqxlW.js.map → extensions-BrVEX2vQ.js.map} +1 -1
- package/dist/cdn/chunks/{features-BnG-dhzy.js → features-BdkV7kQP.js} +816 -756
- package/dist/cdn/chunks/features-BdkV7kQP.js.map +1 -0
- package/dist/cdn/chunks/{icons-B_185qj_.js → icons-oRXtYgc3.js} +99 -52
- package/dist/cdn/chunks/icons-oRXtYgc3.js.map +1 -0
- package/dist/cdn/chunks/{media-library-DxpFw4Tt.js → media-library-C7uyFrMO.js} +217 -217
- package/dist/cdn/chunks/{media-library-DxpFw4Tt.js.map → media-library-C7uyFrMO.js.map} +1 -1
- package/dist/cdn/chunks/quality-C5gsx_Tw.js +1456 -0
- package/dist/cdn/chunks/quality-C5gsx_Tw.js.map +1 -0
- package/dist/cdn/chunks/{readableTextColor-Cd_cgWO_.js → readableTextColor-DhoK4XiZ.js} +1 -1
- package/dist/cdn/chunks/{readableTextColor-Cd_cgWO_.js.map → readableTextColor-DhoK4XiZ.js.map} +1 -1
- package/dist/cdn/chunks/{dist-MGrg9tLo.js → renderer-DM2gdPmx.js} +178 -126
- package/dist/cdn/chunks/renderer-DM2gdPmx.js.map +1 -0
- package/dist/cdn/chunks/{src-Cw7KAyui.js → src-BAAwLL7q.js} +11 -11
- package/dist/cdn/chunks/{src-Cw7KAyui.js.map → src-BAAwLL7q.js.map} +1 -1
- package/dist/cdn/chunks/{styles-DYDpAUsJ.js → styles-iDn0uW8_.js} +576 -484
- package/dist/cdn/chunks/styles-iDn0uW8_.js.map +1 -0
- package/dist/cdn/chunks/{tiptap-CPAwPMop.js → tiptap-ClLEM7Xz.js} +2 -2
- package/dist/cdn/chunks/{tiptap-CPAwPMop.js.map → tiptap-ClLEM7Xz.js.map} +1 -1
- package/dist/cdn/editor.css +1 -1
- package/dist/cdn/editor.js +87 -86
- package/dist/cdn/editor.js.map +1 -1
- package/dist/{check-Om8IxvJb.js → check-Da05j8yl.js} +1 -1
- package/dist/{chevron-down-SG7QNtDl.js → chevron-down-R2uY34iD.js} +1 -1
- package/dist/{circle-alert-De74azaX.js → circle-alert-DZuGWPX-.js} +1 -1
- package/dist/{clock-Dr7rX_PG.js → clock-CRp2sIub.js} +1 -1
- package/dist/{cloud-B1NAFg44.js → cloud-WfWdqZVK.js} +1 -1
- package/dist/{_plugin-vue_export-helper-GRmvIR5A.js → createLucideIcon-C3pa2siy.js} +2 -6
- package/dist/{cdn/chunks/de-BSWt7lYu.js → de-Brqvgr43.js} +19 -3
- package/dist/{cdn/chunks/de-Db6I9YdS.js → de-DCaaCE5s.js} +6 -2
- package/dist/{dist-CuyhAnuE.js → dist-B1IR0bpH.js} +65 -53
- package/dist/{dist-QoJxR1uP.js → dist-BFawx6IS.js} +1 -1
- package/dist/{dist-H7npgW0s.js → dist-BaQIYPsn.js} +1 -1
- package/dist/{dist-C4m7p7Wb.js → dist-Cp0zXPAD.js} +1 -1
- package/dist/{dist--8ZUsIQD.js → dist-D6uC2xhi.js} +1 -1
- package/dist/{dist-BMMiVjHs.js → dist-D90y8dvT.js} +3 -3
- package/dist/{dist--e2w6FN-.js → dist-DDJIWTRY.js} +1 -1
- package/dist/{dist-e0ylhlSV.js → dist-DJmnUmW9.js} +2 -1
- package/dist/{dist-BOSn1353.js → dist-DjviJBCi.js} +1 -1
- package/dist/{dist-BsiDC2rP.js → dist-KoBJjK1G.js} +1 -1
- package/dist/{dist-BNZS_qhu.js → dist-aRzjfSRN.js} +1 -1
- package/dist/{dist-3AzSJz2x.js → dist-us-RpCWN.js} +1 -1
- package/dist/{dist-DPsMHsAW.js → dist-wzMIGj-D.js} +1 -1
- package/dist/{cdn/chunks/en-BbqBJ2Q3.js → en-DXCyK4-X.js} +6 -2
- package/dist/{cdn/chunks/en-9-vIGlc7.js → en-WDVp87TE.js} +19 -3
- package/dist/{extensions-Cmf6XVn9.js → extensions-CUcl9Ok4.js} +26 -23
- package/dist/{image-up-10kxuulB.js → image-up-MBZKKg9p.js} +1 -1
- package/dist/index.d.ts +25 -8
- package/dist/info-CJEC7piy.js +19 -0
- package/dist/{keys-BeW4IrXP.js → keys-ciNfSSGj.js} +3 -3
- package/dist/{loader-circle-IS16T05j.js → loader-circle-DsY5Yg33.js} +1 -1
- package/dist/{message-circle-3R472hDc.js → message-circle-yElBbR2C.js} +1 -1
- package/dist/{refresh-cw-CpmOfpPK.js → refresh-cw-CE_AGtn8.js} +3 -18
- package/dist/{scan-line-J_fzG2Wo.js → scan-line-D0vcUekt.js} +1 -1
- package/dist/{send-DRkFf4hP.js → send-DH4oDQqC.js} +1 -1
- package/dist/{shield-check-DtXk7JKN.js → shield-check-CfJgs2Hd.js} +1 -1
- package/dist/{sparkles-CD7TiNiC.js → sparkles-CvRXGqFs.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/{styles-C-FrkTA9.js → styles-B58wYIn4.js} +589 -476
- package/dist/templatical-editor.js +90 -89
- package/dist/{text-align-start-B8M9hruh.js → text-align-start-BT9VUDxK.js} +1 -1
- package/dist/{trash-2-cEVwp-r_.js → trash-2-DbP2Y6t2.js} +1 -1
- package/dist/{triangle-alert-8CkexIzx.js → triangle-alert-aOXceTSe.js} +1 -1
- package/dist/{useCloudI18n-D0Fi0hBU.js → useCloudI18n-BuIwR6OE.js} +1 -1
- package/dist/{useEditorCore-D0uZbPKG.js → useEditorCore-Dz-qbVXX.js} +1709 -1661
- package/dist/{useI18n-Jp3X6Q0t.js → useI18n-lb2DHDiu.js} +1 -1
- package/dist/{useMergeTag-CEE4CG-D.js → useMergeTag-CBwKnnNB.js} +3 -3
- package/dist/{x-BNc1bVzp.js → x-u2oVmjN_.js} +1 -1
- package/package.json +10 -5
- package/dist/cdn/chunks/CloudEditor-CRYF-bR3.js.map +0 -1
- package/dist/cdn/chunks/blockTypeIcons-Bs9B-yft.js +0 -22
- package/dist/cdn/chunks/de-BSWt7lYu.js.map +0 -1
- package/dist/cdn/chunks/dist-MGrg9tLo.js.map +0 -1
- package/dist/cdn/chunks/en-9-vIGlc7.js.map +0 -1
- package/dist/cdn/chunks/features-BnG-dhzy.js.map +0 -1
- package/dist/cdn/chunks/icons-B_185qj_.js.map +0 -1
- package/dist/cdn/chunks/styles-DYDpAUsJ.js.map +0 -1
- /package/dist/{dist-CmrXHeJS.js → dist-iLBdeBDR.js} +0 -0
- /package/dist/{emojiData-DcYt1YZ3.js → emojiData-PQyVa4bU.js} +0 -0
- /package/dist/{formatRelativeTime-MungD2xr.js → formatRelativeTime-WvH3Au71.js} +0 -0
- /package/dist/{liquid.browser-BohVA1YU.js → liquid.browser-CdMv1BTn.js} +0 -0
- /package/dist/{readableTextColor-Uc7ntzXo.js → readableTextColor-CY3SiRnt.js} +0 -0
- /package/dist/{styleConstants-Beu6EmBc.js → styleConstants-fWzlIIwN.js} +0 -0
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { Dt as e, M as t, Mt as n, P as r, Q as i, S as a, V as o, _ as s, b as c, d as l, g as u, it as d, m as f, p, t as m, u as h, z as g } from "./vue.runtime.esm-bundler-DpvJL-nX.js";
|
|
2
|
-
import "./useEditorCore-
|
|
3
|
-
import { t as _ } from "./dist-
|
|
4
|
-
import { t as v } from "./useI18n-
|
|
5
|
-
import {
|
|
6
|
-
import { t as b } from "./chevron-down-
|
|
7
|
-
import { t as x } from "./clock-
|
|
8
|
-
import { t as S } from "./loader-circle-
|
|
9
|
-
import { n as C } from "./useCloudI18n-
|
|
10
|
-
import { t as w } from "./formatRelativeTime-
|
|
2
|
+
import "./useEditorCore-Dz-qbVXX.js";
|
|
3
|
+
import { t as _ } from "./dist-B1IR0bpH.js";
|
|
4
|
+
import { t as v } from "./useI18n-lb2DHDiu.js";
|
|
5
|
+
import { t as y } from "./createLucideIcon-C3pa2siy.js";
|
|
6
|
+
import { t as b } from "./chevron-down-R2uY34iD.js";
|
|
7
|
+
import { t as x } from "./clock-CRp2sIub.js";
|
|
8
|
+
import { t as S } from "./loader-circle-DsY5Yg33.js";
|
|
9
|
+
import { n as C } from "./useCloudI18n-BuIwR6OE.js";
|
|
10
|
+
import { t as w } from "./formatRelativeTime-WvH3Au71.js";
|
|
11
11
|
var T = y("chevron-left", [["path", {
|
|
12
12
|
d: "m15 18-6-6 6-6",
|
|
13
13
|
key: "1wnfg3"
|
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
import { Dt as e, E as t, L as n, M as r, Mt as i, Ot as a, P as o, Q as s, S as c, V as ee, _ as l, b as u, d, g as f, h as p, it as m, m as h, t as te, y as g, z as ne } from "./vue.runtime.esm-bundler-DpvJL-nX.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { t as
|
|
5
|
-
import { t as
|
|
6
|
-
import { n as
|
|
7
|
-
import { t as
|
|
8
|
-
import { t as
|
|
9
|
-
import { t as
|
|
10
|
-
import { t as
|
|
11
|
-
import { t as
|
|
12
|
-
import { t as
|
|
13
|
-
import {
|
|
2
|
+
import { O as _, m as re, v as ie, w as v } from "./keys-ciNfSSGj.js";
|
|
3
|
+
import { t as y } from "./createLucideIcon-C3pa2siy.js";
|
|
4
|
+
import { t as b } from "./chevron-down-R2uY34iD.js";
|
|
5
|
+
import { t as x } from "./circle-alert-DZuGWPX-.js";
|
|
6
|
+
import { n as S, t as C } from "./refresh-cw-CE_AGtn8.js";
|
|
7
|
+
import { t as ae } from "./info-CJEC7piy.js";
|
|
8
|
+
import { t as w } from "./loader-circle-DsY5Yg33.js";
|
|
9
|
+
import { t as T } from "./shield-check-CfJgs2Hd.js";
|
|
10
|
+
import { t as E } from "./sparkles-CvRXGqFs.js";
|
|
11
|
+
import { t as oe } from "./triangle-alert-aOXceTSe.js";
|
|
12
|
+
import { t as se } from "./x-u2oVmjN_.js";
|
|
13
|
+
import { t as ce } from "./LoadingTrack-B0CWFHXQ.js";
|
|
14
|
+
import { t as D } from "./_plugin-vue_export-helper-B0hnzhyu.js";
|
|
15
|
+
import { n as le } from "./useCloudI18n-BuIwR6OE.js";
|
|
14
16
|
var O = y("shield-x", [
|
|
15
17
|
["path", {
|
|
16
18
|
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",
|
|
@@ -83,12 +85,12 @@ var P = {
|
|
|
83
85
|
}, Ee = {
|
|
84
86
|
key: 3,
|
|
85
87
|
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__ */
|
|
88
|
+
}, 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__ */ D(/* @__PURE__ */ c({
|
|
87
89
|
__name: "TemplateScoringPanel",
|
|
88
90
|
props: { visible: { type: Boolean } },
|
|
89
91
|
emits: ["close"],
|
|
90
92
|
setup(c, { emit: y }) {
|
|
91
|
-
let
|
|
93
|
+
let D = c, G = y, { t: K } = le(), q = _(re, "TemplateScoringPanel"), J = _(v, "TemplateScoringPanel"), Y = t(ie, []), X = s({
|
|
92
94
|
spam: !0,
|
|
93
95
|
readability: !0,
|
|
94
96
|
accessibility: !0,
|
|
@@ -104,14 +106,14 @@ var P = {
|
|
|
104
106
|
"bestPractices"
|
|
105
107
|
], Ae = {
|
|
106
108
|
spam: O,
|
|
107
|
-
readability:
|
|
108
|
-
accessibility:
|
|
109
|
+
readability: S,
|
|
110
|
+
accessibility: E,
|
|
109
111
|
bestPractices: k
|
|
110
112
|
};
|
|
111
113
|
function Q() {
|
|
112
114
|
J.score(q.content.value, Y);
|
|
113
115
|
}
|
|
114
|
-
ne(() =>
|
|
116
|
+
ne(() => D.visible, (e) => {
|
|
115
117
|
e && !J.scoringResult.value && !J.isScoring.value && Q();
|
|
116
118
|
});
|
|
117
119
|
async function je(e) {
|
|
@@ -134,7 +136,7 @@ var P = {
|
|
|
134
136
|
"leave-from-class": "tpl:translate-x-0",
|
|
135
137
|
"leave-to-class": "tpl:translate-x-full"
|
|
136
138
|
}, {
|
|
137
|
-
default: ee(() => [c.visible ? (r(), l("div", P, [h("div", F, [h("div", I, [u(m(
|
|
139
|
+
default: ee(() => [c.visible ? (r(), l("div", P, [h("div", F, [h("div", I, [u(m(T), {
|
|
138
140
|
size: 13,
|
|
139
141
|
"stroke-width": 2
|
|
140
142
|
}), h("span", null, i(m(K).scoring.title), 1)]), h("div", L, [m(J).scoringResult.value && !m(J).isScoring.value ? (r(), l("button", {
|
|
@@ -142,7 +144,7 @@ var P = {
|
|
|
142
144
|
class: "tpl:rounded-md tpl:p-0.5 tpl:transition-colors tpl:duration-150 tpl:text-[var(--tpl-text-muted)]",
|
|
143
145
|
title: m(K).scoring.rescore,
|
|
144
146
|
onClick: s[0] ||= (e) => Q()
|
|
145
|
-
}, [u(m(
|
|
147
|
+
}, [u(m(C), {
|
|
146
148
|
size: 14,
|
|
147
149
|
"stroke-width": 2
|
|
148
150
|
})], 8, R)) : f("", !0), h("button", {
|
|
@@ -152,7 +154,7 @@ var P = {
|
|
|
152
154
|
size: 14,
|
|
153
155
|
"stroke-width": 2
|
|
154
156
|
})])])]), h("div", z, [m(J).isScoring.value ? (r(), l("div", B, [h("p", V, i(m(K).scoring.scoring), 1), u(ce, { class: "tpl:w-3/4" })])) : m(J).error.value && !m(J).scoringResult.value ? (r(), l("div", H, [
|
|
155
|
-
u(m(
|
|
157
|
+
u(m(x), {
|
|
156
158
|
size: 32,
|
|
157
159
|
"stroke-width": 1.5,
|
|
158
160
|
class: "tpl:text-[var(--tpl-danger)]"
|
|
@@ -161,7 +163,7 @@ var P = {
|
|
|
161
163
|
h("button", {
|
|
162
164
|
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
165
|
onClick: s[2] ||= (e) => Q()
|
|
164
|
-
}, [u(m(
|
|
166
|
+
}, [u(m(C), {
|
|
165
167
|
size: 12,
|
|
166
168
|
"stroke-width": 2
|
|
167
169
|
}), g(" " + i(m(K).scoring.rescore), 1)])
|
|
@@ -177,7 +179,7 @@ var P = {
|
|
|
177
179
|
h("span", ue, i(m(K).scoring.overallScore), 1),
|
|
178
180
|
$() > 0 ? (r(), l("span", de, i($()) + " " + i(m(K).scoring.findings), 1)) : f("", !0)
|
|
179
181
|
], 4),
|
|
180
|
-
m(J).fixError.value ? (r(), l("div", fe, [u(m(
|
|
182
|
+
m(J).fixError.value ? (r(), l("div", fe, [u(m(x), {
|
|
181
183
|
size: 14,
|
|
182
184
|
"stroke-width": 2,
|
|
183
185
|
class: "tpl:mt-0.5 tpl:shrink-0"
|
|
@@ -203,7 +205,7 @@ var P = {
|
|
|
203
205
|
})
|
|
204
206
|
}, i(m(J).scoringResult.value.categories[t].score), 5),
|
|
205
207
|
m(J).scoringResult.value.categories[t].findings.length > 0 ? (r(), l("span", he, i(m(J).scoringResult.value.categories[t].findings.length), 1)) : f("", !0),
|
|
206
|
-
u(m(
|
|
208
|
+
u(m(b), {
|
|
207
209
|
size: 12,
|
|
208
210
|
"stroke-width": 2,
|
|
209
211
|
class: e(["tpl:transition-transform tpl:duration-200 tpl:text-[var(--tpl-text-dim)]", X.value[t] ? "tpl:rotate-0" : "tpl:-rotate-90"])
|
|
@@ -211,7 +213,7 @@ var P = {
|
|
|
211
213
|
], 8, pe), X.value[t] ? (r(), l("div", ge, [m(J).scoringResult.value.categories[t].findings.length === 0 ? (r(), l("div", _e, i(m(K).scoring.noFindings), 1)) : f("", !0), (r(!0), l(d, null, o(m(J).scoringResult.value.categories[t].findings, (e) => (r(), l("div", {
|
|
212
214
|
key: e.id,
|
|
213
215
|
class: "tpl:border-t tpl:px-3 tpl:py-2.5 first:tpl:border-t-0 tpl:border-[var(--tpl-border-light)]"
|
|
214
|
-
}, [h("div", ve, [(r(), p(n(e.severity === "high" ? m(
|
|
216
|
+
}, [h("div", ve, [(r(), p(n(e.severity === "high" ? m(x) : e.severity === "medium" ? m(oe) : m(ae)), {
|
|
215
217
|
size: 13,
|
|
216
218
|
"stroke-width": 2,
|
|
217
219
|
class: "tpl:mt-0.5 tpl:shrink-0",
|
|
@@ -230,18 +232,18 @@ var P = {
|
|
|
230
232
|
style: { "background-color": "transparent" },
|
|
231
233
|
disabled: m(J).fixingFindingId.value !== null,
|
|
232
234
|
onClick: (t) => je(e)
|
|
233
|
-
}, [m(J).fixingFindingId.value === e.id ? (r(), p(m(
|
|
235
|
+
}, [m(J).fixingFindingId.value === e.id ? (r(), p(m(w), {
|
|
234
236
|
key: 0,
|
|
235
237
|
class: "tpl-spinner",
|
|
236
238
|
size: 11,
|
|
237
239
|
"stroke-width": 2
|
|
238
|
-
})) : (r(), p(m(
|
|
240
|
+
})) : (r(), p(m(E), {
|
|
239
241
|
key: 1,
|
|
240
242
|
size: 11,
|
|
241
243
|
"stroke-width": 2
|
|
242
244
|
})), g(" " + i(m(J).fixingFindingId.value === e.id ? m(K).scoring.fixing : m(K).scoring.fix), 1)], 8, we), m(J).fixError.value ? (r(), l("p", Te, i(m(J).fixError.value), 1)) : f("", !0)])) : f("", !0)
|
|
243
245
|
])])]))), 128))])) : f("", !0)])), 64))
|
|
244
|
-
])) : (r(), l("div", Ee, [u(m(
|
|
246
|
+
])) : (r(), l("div", Ee, [u(m(T), {
|
|
245
247
|
size: 32,
|
|
246
248
|
"stroke-width": 1.5,
|
|
247
249
|
class: "tpl:text-[var(--tpl-text-dim)]"
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Dt as e, H as t, M as n, Mt as r, P as i, Q as a, S as o, V as s, _ as c, b as l, d as u, g as d, h as f, it as p, m, o as h, y as g, z as _ } from "./vue.runtime.esm-bundler-DpvJL-nX.js";
|
|
2
|
-
import "./useEditorCore-
|
|
3
|
-
import { t as v } from "./loader-circle-
|
|
4
|
-
import { n as y } from "./useCloudI18n-
|
|
5
|
-
import { t as b } from "./TplModal-
|
|
2
|
+
import "./useEditorCore-Dz-qbVXX.js";
|
|
3
|
+
import { t as v } from "./loader-circle-DsY5Yg33.js";
|
|
4
|
+
import { n as y } from "./useCloudI18n-BuIwR6OE.js";
|
|
5
|
+
import { t as b } from "./TplModal-DzlNkBYQ.js";
|
|
6
6
|
//#region src/cloud/components/TestEmailModal.vue?vue&type=script&setup=true&lang.ts
|
|
7
7
|
var x = ["aria-busy"], S = {
|
|
8
8
|
id: "tpl-test-email-title",
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { Dt as e, E as t, M as n, Mt as r, Ot as i, S as a, _ as o, b as s, d as c, f as l, g as u, h as d, it as f, m as p, q as m, y as h } from "./vue.runtime.esm-bundler-DpvJL-nX.js";
|
|
2
|
-
import { b as g } from "./useEditorCore-
|
|
3
|
-
import {
|
|
4
|
-
import { t as y } from "./useI18n-
|
|
5
|
-
import { a as b, i as x, n as S, r as C, t as w } from "./RichTextEditorContent-
|
|
6
|
-
import { t as T } from "./loader-circle-
|
|
7
|
-
import { t as E } from "./scan-line-
|
|
2
|
+
import { b as g } from "./useEditorCore-Dz-qbVXX.js";
|
|
3
|
+
import { D as _, T as v } from "./keys-ciNfSSGj.js";
|
|
4
|
+
import { t as y } from "./useI18n-lb2DHDiu.js";
|
|
5
|
+
import { a as b, i as x, n as S, r as C, t as w } from "./RichTextEditorContent-DYkIauIk.js";
|
|
6
|
+
import { t as T } from "./loader-circle-DsY5Yg33.js";
|
|
7
|
+
import { t as E } from "./scan-line-D0vcUekt.js";
|
|
8
8
|
//#region src/components/blocks/TitleEditor.vue?vue&type=script&setup=true&lang.ts
|
|
9
9
|
var ee = { class: "tpl-text-editor-wrapper tpl:relative" }, D = ["data-tpl-theme", "aria-label"], O = ["aria-label", "title"], k = ["aria-label", "title"], A = ["aria-label", "title"], j = {
|
|
10
10
|
key: 0,
|
|
@@ -27,10 +27,10 @@ var ee = { class: "tpl-text-editor-wrapper tpl:relative" }, D = ["data-tpl-theme
|
|
|
27
27
|
editorName: "TitleEditor",
|
|
28
28
|
async loadExtensions({ mergeTags: e, syntax: t, triggerChar: n, autocompleteEnabled: r, suggestionEmptyText: i }) {
|
|
29
29
|
let [{ Editor: a, EditorContent: o }, { default: s }, { default: c }, { MergeTagNode: l, MergeTagSuggestion: u, LogicMergeTagNode: d }] = await Promise.all([
|
|
30
|
-
import("./dist-
|
|
31
|
-
import("./dist-
|
|
32
|
-
import("./dist
|
|
33
|
-
import("./extensions-
|
|
30
|
+
import("./dist-BFawx6IS.js").then((e) => e.r),
|
|
31
|
+
import("./dist-D90y8dvT.js"),
|
|
32
|
+
import("./dist-DDJIWTRY.js"),
|
|
33
|
+
import("./extensions-CUcl9Ok4.js")
|
|
34
34
|
]);
|
|
35
35
|
return {
|
|
36
36
|
TiptapEditor: a,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { E as e, F as t, M as n, Q as r, S as i, V as a, _ as o, b as s, f as c, g as l, h as u, it as d, m as f, p, t as m, u as h } from "./vue.runtime.esm-bundler-DpvJL-nX.js";
|
|
2
|
-
import { w as g } from "./useEditorCore-
|
|
3
|
-
import {
|
|
2
|
+
import { w as g } from "./useEditorCore-Dz-qbVXX.js";
|
|
3
|
+
import { D as _ } from "./keys-ciNfSSGj.js";
|
|
4
4
|
//#region src/cloud/components/TplModal.vue?vue&type=script&setup=true&lang.ts
|
|
5
5
|
var v = ["data-tpl-theme"], y = /* @__PURE__ */ i({
|
|
6
6
|
__name: "TplModal",
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { t as e } from "./createLucideIcon-C3pa2siy.js";
|
|
2
|
+
var t = e("accessibility", [
|
|
3
|
+
["circle", {
|
|
4
|
+
cx: "16",
|
|
5
|
+
cy: "4",
|
|
6
|
+
r: "1",
|
|
7
|
+
key: "1grugj"
|
|
8
|
+
}],
|
|
9
|
+
["path", {
|
|
10
|
+
d: "m18 19 1-7-6 1",
|
|
11
|
+
key: "r0i19z"
|
|
12
|
+
}],
|
|
13
|
+
["path", {
|
|
14
|
+
d: "m5 8 3-3 5.5 3-2.36 3.5",
|
|
15
|
+
key: "9ptxx2"
|
|
16
|
+
}],
|
|
17
|
+
["path", {
|
|
18
|
+
d: "M4.24 14.5a5 5 0 0 0 6.88 6",
|
|
19
|
+
key: "10kmtu"
|
|
20
|
+
}],
|
|
21
|
+
["path", {
|
|
22
|
+
d: "M13.76 17.5a5 5 0 0 0-6.88-6",
|
|
23
|
+
key: "2qq6rc"
|
|
24
|
+
}]
|
|
25
|
+
]);
|
|
26
|
+
//#endregion
|
|
27
|
+
export { t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { D as e, E as t, M as n, O as r, k as i } from "./useEditorCore-
|
|
2
|
-
import {
|
|
1
|
+
import { D as e, E as t, M as n, O as r, k as i } from "./useEditorCore-Dz-qbVXX.js";
|
|
2
|
+
import { t as a } from "./createLucideIcon-C3pa2siy.js";
|
|
3
3
|
var o = a("columns-3", [
|
|
4
4
|
["rect", {
|
|
5
5
|
width: "18",
|
package/dist/bundle-stats.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.
|
|
3
|
-
"initialGzipBytes":
|
|
4
|
-
"initialRawBytes":
|
|
5
|
-
"initialFileCount":
|
|
6
|
-
"lazyGzipBytes":
|
|
7
|
-
"lazyRawBytes":
|
|
8
|
-
"lazyFileCount":
|
|
9
|
-
"generatedAt": "2026-05-
|
|
2
|
+
"version": "0.6.1",
|
|
3
|
+
"initialGzipBytes": 213432,
|
|
4
|
+
"initialRawBytes": 723490,
|
|
5
|
+
"initialFileCount": 33,
|
|
6
|
+
"lazyGzipBytes": 255537,
|
|
7
|
+
"lazyRawBytes": 890869,
|
|
8
|
+
"lazyFileCount": 45,
|
|
9
|
+
"generatedAt": "2026-05-05T20:42:07.500Z"
|
|
10
10
|
}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { E as e, F as t, N as n, R as r, S as i, _ as a, at as o, b as s, d as c, g as l, h as u, lt as d, m as f, p, st as m, y as h } from "./draggable-Bcb86AsV.js";
|
|
2
|
+
import { Kt as g, Nt as _, Pt as v, Tt as y, _t as b, at as x } from "./features-BdkV7kQP.js";
|
|
3
|
+
import { Q as S, Z as C, t as w } from "./icons-oRXtYgc3.js";
|
|
4
|
+
//#region src/components/sidebar/AccessibilityPanel.vue?vue&type=script&setup=true&lang.ts
|
|
5
|
+
var T = { class: "tpl:flex tpl:flex-col tpl:gap-4 tpl:p-4" }, E = { class: "tpl:flex tpl:items-center tpl:gap-2" }, D = { class: "tpl:m-0 tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]" }, O = ["title"], k = {
|
|
6
|
+
key: 0,
|
|
7
|
+
class: "tpl:text-xs tpl:text-[var(--tpl-text-muted)]"
|
|
8
|
+
}, A = {
|
|
9
|
+
key: 1,
|
|
10
|
+
class: "tpl:rounded-md tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:p-3 tpl:text-xs tpl:text-[var(--tpl-text-muted)]"
|
|
11
|
+
}, j = { class: "tpl:ml-auto tpl:font-normal tpl:opacity-70" }, M = {
|
|
12
|
+
key: 1,
|
|
13
|
+
class: "tpl:m-0 tpl:mb-3 tpl:flex tpl:list-none tpl:flex-col tpl:gap-2 tpl:p-0"
|
|
14
|
+
}, N = { class: "tpl:m-0 tpl:mb-2 tpl:text-xs tpl:text-[var(--tpl-text)]" }, P = { class: "tpl:m-0 tpl:mb-2 tpl:font-mono tpl:text-[10px] tpl:text-[var(--tpl-text-dim)]" }, F = { class: "tpl:flex tpl:gap-1.5" }, I = ["onClick"], L = ["title", "onClick"], R = /* @__PURE__ */ i({
|
|
15
|
+
__name: "AccessibilityPanel",
|
|
16
|
+
setup(i) {
|
|
17
|
+
let { t: R, format: z } = _(), B = e(v, null), V = e(g, null), H = p(() => (B?.issues.value ?? []).filter((e) => e.severity === "error")), U = p(() => (B?.issues.value ?? []).filter((e) => e.severity === "warning")), W = p(() => (B?.issues.value ?? []).filter((e) => e.severity === "info")), G = p(() => H.value.length + U.value.length + W.value.length);
|
|
18
|
+
function K(e) {
|
|
19
|
+
V && e.blockId && V.selectBlock(e.blockId);
|
|
20
|
+
}
|
|
21
|
+
function q(e) {
|
|
22
|
+
B?.applyFix(e);
|
|
23
|
+
}
|
|
24
|
+
return (e, i) => (n(), a("div", T, [f("header", E, [
|
|
25
|
+
s(o(S), {
|
|
26
|
+
size: 16,
|
|
27
|
+
"stroke-width": 1.5
|
|
28
|
+
}),
|
|
29
|
+
f("h3", D, d(o(R).accessibility.panelTitle), 1),
|
|
30
|
+
G.value > 0 ? (n(), a("span", {
|
|
31
|
+
key: 0,
|
|
32
|
+
class: "tpl:ml-auto tpl:rounded-full tpl:bg-[var(--tpl-bg-hover)] tpl:px-2 tpl:py-0.5 tpl:text-[11px] tpl:text-[var(--tpl-text-muted)]",
|
|
33
|
+
title: o(z)(o(R).accessibility.issueCountTooltip, { count: G.value })
|
|
34
|
+
}, d(G.value), 9, O)) : l("", !0)
|
|
35
|
+
]), !o(B) || o(B).unavailable.value ? (n(), a("div", k)) : G.value === 0 ? (n(), a("div", A, d(o(R).accessibility.emptyState), 1)) : (n(!0), a(c, { key: 2 }, t([
|
|
36
|
+
{
|
|
37
|
+
key: "errors",
|
|
38
|
+
title: o(R).accessibility.groupErrors,
|
|
39
|
+
icon: o(y),
|
|
40
|
+
items: H.value,
|
|
41
|
+
tone: "tpl:text-[var(--tpl-danger)]"
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
key: "warnings",
|
|
45
|
+
title: o(R).accessibility.groupWarnings,
|
|
46
|
+
icon: o(x),
|
|
47
|
+
items: U.value,
|
|
48
|
+
tone: "tpl:text-[var(--tpl-warning)]"
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
key: "info",
|
|
52
|
+
title: o(R).accessibility.groupInfo,
|
|
53
|
+
icon: o(b),
|
|
54
|
+
items: W.value,
|
|
55
|
+
tone: "tpl:text-[var(--tpl-text-muted)]"
|
|
56
|
+
}
|
|
57
|
+
], (e) => (n(), a("section", { key: e.key }, [e.items.length > 0 ? (n(), a("header", {
|
|
58
|
+
key: 0,
|
|
59
|
+
class: m(["tpl:mb-2 tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-[11px] tpl:font-semibold tpl:uppercase tpl:tracking-wide", e.tone])
|
|
60
|
+
}, [
|
|
61
|
+
(n(), u(r(e.icon), {
|
|
62
|
+
size: 12,
|
|
63
|
+
"stroke-width": 2
|
|
64
|
+
})),
|
|
65
|
+
h(" " + d(e.title) + " ", 1),
|
|
66
|
+
f("span", j, d(e.items.length), 1)
|
|
67
|
+
], 2)) : l("", !0), e.items.length > 0 ? (n(), a("ul", M, [(n(!0), a(c, null, t(e.items, (e) => (n(), a("li", {
|
|
68
|
+
key: `${e.ruleId}-${e.blockId ?? "template"}`,
|
|
69
|
+
class: "tpl:rounded-md tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:p-3"
|
|
70
|
+
}, [
|
|
71
|
+
f("p", N, d(e.message), 1),
|
|
72
|
+
f("p", P, d(e.ruleId), 1),
|
|
73
|
+
f("div", F, [e.blockId ? (n(), a("button", {
|
|
74
|
+
key: 0,
|
|
75
|
+
type: "button",
|
|
76
|
+
class: "tpl:flex tpl:items-center tpl:gap-1 tpl:rounded-md tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-hover)] tpl:px-2 tpl:py-1 tpl:text-[11px] tpl:font-medium tpl:text-[var(--tpl-text)]",
|
|
77
|
+
onClick: (t) => K(e)
|
|
78
|
+
}, [s(o(C), {
|
|
79
|
+
size: 10,
|
|
80
|
+
"stroke-width": 2
|
|
81
|
+
}), h(" " + d(o(R).accessibility.jump), 1)], 8, I)) : l("", !0), e.fix ? (n(), a("button", {
|
|
82
|
+
key: 1,
|
|
83
|
+
type: "button",
|
|
84
|
+
class: "tpl:flex tpl:items-center tpl:gap-1 tpl:rounded-md tpl:bg-[var(--tpl-primary)] tpl:px-2 tpl:py-1 tpl:text-[11px] tpl:font-medium tpl:text-white",
|
|
85
|
+
title: e.fix.description,
|
|
86
|
+
onClick: (t) => q(e)
|
|
87
|
+
}, [s(o(w), {
|
|
88
|
+
size: 10,
|
|
89
|
+
"stroke-width": 2
|
|
90
|
+
}), h(" " + d(o(R).accessibility.fix), 1)], 8, L)) : l("", !0)])
|
|
91
|
+
]))), 128))])) : l("", !0)]))), 128))]));
|
|
92
|
+
}
|
|
93
|
+
});
|
|
94
|
+
//#endregion
|
|
95
|
+
export { R as default };
|
|
96
|
+
|
|
97
|
+
//# sourceMappingURL=AccessibilityPanel-fjNLcnxu.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AccessibilityPanel-fjNLcnxu.js","names":[],"sources":["../../../src/components/sidebar/AccessibilityPanel.vue","../../../src/components/sidebar/AccessibilityPanel.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { computed, inject } from \"vue\";\nimport {\n Accessibility,\n AlertCircle,\n AlertTriangle,\n Info,\n ArrowRight,\n Wrench,\n} from \"@lucide/vue\";\nimport { useI18n } from \"../../composables/useI18n\";\nimport { ACCESSIBILITY_LINT_KEY, EDITOR_KEY } from \"../../keys\";\nimport type { A11yIssue } from \"../../composables/useAccessibilityLint\";\n\nconst { t, format } = useI18n();\nconst lint = inject(ACCESSIBILITY_LINT_KEY, null);\nconst editor = inject(EDITOR_KEY, null);\n\nconst errors = computed(() =>\n (lint?.issues.value ?? []).filter((i) => i.severity === \"error\"),\n);\nconst warnings = computed(() =>\n (lint?.issues.value ?? []).filter((i) => i.severity === \"warning\"),\n);\nconst infos = computed(() =>\n (lint?.issues.value ?? []).filter((i) => i.severity === \"info\"),\n);\n\nconst totalCount = computed(\n () => errors.value.length + warnings.value.length + infos.value.length,\n);\n\nfunction jumpTo(issue: A11yIssue): void {\n if (!editor) return;\n if (issue.blockId) editor.selectBlock(issue.blockId);\n}\n\nfunction applyFix(issue: A11yIssue): void {\n lint?.applyFix(issue);\n}\n</script>\n\n<template>\n <div class=\"tpl:flex tpl:flex-col tpl:gap-4 tpl:p-4\">\n <header class=\"tpl:flex tpl:items-center tpl:gap-2\">\n <Accessibility :size=\"16\" :stroke-width=\"1.5\" />\n <h3\n class=\"tpl:m-0 tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]\"\n >\n {{ t.accessibility.panelTitle }}\n </h3>\n <span\n v-if=\"totalCount > 0\"\n class=\"tpl:ml-auto tpl:rounded-full tpl:bg-[var(--tpl-bg-hover)] tpl:px-2 tpl:py-0.5 tpl:text-[11px] tpl:text-[var(--tpl-text-muted)]\"\n :title=\"\n format(t.accessibility.issueCountTooltip, { count: totalCount })\n \"\n >\n {{ totalCount }}\n </span>\n </header>\n\n <div\n v-if=\"!lint || lint.unavailable.value\"\n class=\"tpl:text-xs tpl:text-[var(--tpl-text-muted)]\"\n >\n <!-- Quality package not available; render nothing visible beyond a hint. -->\n </div>\n\n <div\n v-else-if=\"totalCount === 0\"\n class=\"tpl:rounded-md tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:p-3 tpl:text-xs tpl:text-[var(--tpl-text-muted)]\"\n >\n {{ t.accessibility.emptyState }}\n </div>\n\n <template v-else>\n <section\n v-for=\"group in [\n {\n key: 'errors',\n title: t.accessibility.groupErrors,\n icon: AlertCircle,\n items: errors,\n tone: 'tpl:text-[var(--tpl-danger)]',\n },\n {\n key: 'warnings',\n title: t.accessibility.groupWarnings,\n icon: AlertTriangle,\n items: warnings,\n tone: 'tpl:text-[var(--tpl-warning)]',\n },\n {\n key: 'info',\n title: t.accessibility.groupInfo,\n icon: Info,\n items: infos,\n tone: 'tpl:text-[var(--tpl-text-muted)]',\n },\n ]\"\n :key=\"group.key\"\n >\n <header\n v-if=\"group.items.length > 0\"\n class=\"tpl:mb-2 tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-[11px] tpl:font-semibold tpl:uppercase tpl:tracking-wide\"\n :class=\"group.tone\"\n >\n <component :is=\"group.icon\" :size=\"12\" :stroke-width=\"2\" />\n {{ group.title }}\n <span class=\"tpl:ml-auto tpl:font-normal tpl:opacity-70\">\n {{ group.items.length }}\n </span>\n </header>\n <ul\n v-if=\"group.items.length > 0\"\n class=\"tpl:m-0 tpl:mb-3 tpl:flex tpl:list-none tpl:flex-col tpl:gap-2 tpl:p-0\"\n >\n <li\n v-for=\"issue in group.items\"\n :key=\"`${issue.ruleId}-${issue.blockId ?? 'template'}`\"\n class=\"tpl:rounded-md tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:p-3\"\n >\n <p class=\"tpl:m-0 tpl:mb-2 tpl:text-xs tpl:text-[var(--tpl-text)]\">\n {{ issue.message }}\n </p>\n <p\n class=\"tpl:m-0 tpl:mb-2 tpl:font-mono tpl:text-[10px] tpl:text-[var(--tpl-text-dim)]\"\n >\n {{ issue.ruleId }}\n </p>\n <div class=\"tpl:flex tpl:gap-1.5\">\n <button\n v-if=\"issue.blockId\"\n type=\"button\"\n class=\"tpl:flex tpl:items-center tpl:gap-1 tpl:rounded-md tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-hover)] tpl:px-2 tpl:py-1 tpl:text-[11px] tpl:font-medium tpl:text-[var(--tpl-text)]\"\n @click=\"jumpTo(issue)\"\n >\n <ArrowRight :size=\"10\" :stroke-width=\"2\" />\n {{ t.accessibility.jump }}\n </button>\n <button\n v-if=\"issue.fix\"\n type=\"button\"\n class=\"tpl:flex tpl:items-center tpl:gap-1 tpl:rounded-md tpl:bg-[var(--tpl-primary)] tpl:px-2 tpl:py-1 tpl:text-[11px] tpl:font-medium tpl:text-white\"\n :title=\"issue.fix.description\"\n @click=\"applyFix(issue)\"\n >\n <Wrench :size=\"10\" :stroke-width=\"2\" />\n {{ t.accessibility.fix }}\n </button>\n </div>\n </li>\n </ul>\n </section>\n </template>\n </div>\n</template>\n","<script setup lang=\"ts\">\nimport { computed, inject } from \"vue\";\nimport {\n Accessibility,\n AlertCircle,\n AlertTriangle,\n Info,\n ArrowRight,\n Wrench,\n} from \"@lucide/vue\";\nimport { useI18n } from \"../../composables/useI18n\";\nimport { ACCESSIBILITY_LINT_KEY, EDITOR_KEY } from \"../../keys\";\nimport type { A11yIssue } from \"../../composables/useAccessibilityLint\";\n\nconst { t, format } = useI18n();\nconst lint = inject(ACCESSIBILITY_LINT_KEY, null);\nconst editor = inject(EDITOR_KEY, null);\n\nconst errors = computed(() =>\n (lint?.issues.value ?? []).filter((i) => i.severity === \"error\"),\n);\nconst warnings = computed(() =>\n (lint?.issues.value ?? []).filter((i) => i.severity === \"warning\"),\n);\nconst infos = computed(() =>\n (lint?.issues.value ?? []).filter((i) => i.severity === \"info\"),\n);\n\nconst totalCount = computed(\n () => errors.value.length + warnings.value.length + infos.value.length,\n);\n\nfunction jumpTo(issue: A11yIssue): void {\n if (!editor) return;\n if (issue.blockId) editor.selectBlock(issue.blockId);\n}\n\nfunction applyFix(issue: A11yIssue): void {\n lint?.applyFix(issue);\n}\n</script>\n\n<template>\n <div class=\"tpl:flex tpl:flex-col tpl:gap-4 tpl:p-4\">\n <header class=\"tpl:flex tpl:items-center tpl:gap-2\">\n <Accessibility :size=\"16\" :stroke-width=\"1.5\" />\n <h3\n class=\"tpl:m-0 tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]\"\n >\n {{ t.accessibility.panelTitle }}\n </h3>\n <span\n v-if=\"totalCount > 0\"\n class=\"tpl:ml-auto tpl:rounded-full tpl:bg-[var(--tpl-bg-hover)] tpl:px-2 tpl:py-0.5 tpl:text-[11px] tpl:text-[var(--tpl-text-muted)]\"\n :title=\"\n format(t.accessibility.issueCountTooltip, { count: totalCount })\n \"\n >\n {{ totalCount }}\n </span>\n </header>\n\n <div\n v-if=\"!lint || lint.unavailable.value\"\n class=\"tpl:text-xs tpl:text-[var(--tpl-text-muted)]\"\n >\n <!-- Quality package not available; render nothing visible beyond a hint. -->\n </div>\n\n <div\n v-else-if=\"totalCount === 0\"\n class=\"tpl:rounded-md tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:p-3 tpl:text-xs tpl:text-[var(--tpl-text-muted)]\"\n >\n {{ t.accessibility.emptyState }}\n </div>\n\n <template v-else>\n <section\n v-for=\"group in [\n {\n key: 'errors',\n title: t.accessibility.groupErrors,\n icon: AlertCircle,\n items: errors,\n tone: 'tpl:text-[var(--tpl-danger)]',\n },\n {\n key: 'warnings',\n title: t.accessibility.groupWarnings,\n icon: AlertTriangle,\n items: warnings,\n tone: 'tpl:text-[var(--tpl-warning)]',\n },\n {\n key: 'info',\n title: t.accessibility.groupInfo,\n icon: Info,\n items: infos,\n tone: 'tpl:text-[var(--tpl-text-muted)]',\n },\n ]\"\n :key=\"group.key\"\n >\n <header\n v-if=\"group.items.length > 0\"\n class=\"tpl:mb-2 tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-[11px] tpl:font-semibold tpl:uppercase tpl:tracking-wide\"\n :class=\"group.tone\"\n >\n <component :is=\"group.icon\" :size=\"12\" :stroke-width=\"2\" />\n {{ group.title }}\n <span class=\"tpl:ml-auto tpl:font-normal tpl:opacity-70\">\n {{ group.items.length }}\n </span>\n </header>\n <ul\n v-if=\"group.items.length > 0\"\n class=\"tpl:m-0 tpl:mb-3 tpl:flex tpl:list-none tpl:flex-col tpl:gap-2 tpl:p-0\"\n >\n <li\n v-for=\"issue in group.items\"\n :key=\"`${issue.ruleId}-${issue.blockId ?? 'template'}`\"\n class=\"tpl:rounded-md tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:p-3\"\n >\n <p class=\"tpl:m-0 tpl:mb-2 tpl:text-xs tpl:text-[var(--tpl-text)]\">\n {{ issue.message }}\n </p>\n <p\n class=\"tpl:m-0 tpl:mb-2 tpl:font-mono tpl:text-[10px] tpl:text-[var(--tpl-text-dim)]\"\n >\n {{ issue.ruleId }}\n </p>\n <div class=\"tpl:flex tpl:gap-1.5\">\n <button\n v-if=\"issue.blockId\"\n type=\"button\"\n class=\"tpl:flex tpl:items-center tpl:gap-1 tpl:rounded-md tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-hover)] tpl:px-2 tpl:py-1 tpl:text-[11px] tpl:font-medium tpl:text-[var(--tpl-text)]\"\n @click=\"jumpTo(issue)\"\n >\n <ArrowRight :size=\"10\" :stroke-width=\"2\" />\n {{ t.accessibility.jump }}\n </button>\n <button\n v-if=\"issue.fix\"\n type=\"button\"\n class=\"tpl:flex tpl:items-center tpl:gap-1 tpl:rounded-md tpl:bg-[var(--tpl-primary)] tpl:px-2 tpl:py-1 tpl:text-[11px] tpl:font-medium tpl:text-white\"\n :title=\"issue.fix.description\"\n @click=\"applyFix(issue)\"\n >\n <Wrench :size=\"10\" :stroke-width=\"2\" />\n {{ t.accessibility.fix }}\n </button>\n </div>\n </li>\n </ul>\n </section>\n </template>\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;EAcA,IAAM,EAAE,MAAG,cAAW,GAAS,EACzB,IAAO,EAAO,GAAwB,KAAK,EAC3C,IAAS,EAAO,GAAY,KAAK,EAEjC,IAAS,SACZ,GAAM,OAAO,SAAS,EAAE,EAAE,QAAQ,MAAM,EAAE,aAAa,QAAQ,CACjE,EACK,IAAW,SACd,GAAM,OAAO,SAAS,EAAE,EAAE,QAAQ,MAAM,EAAE,aAAa,UAAU,CACnE,EACK,IAAQ,SACX,GAAM,OAAO,SAAS,EAAE,EAAE,QAAQ,MAAM,EAAE,aAAa,OAAO,CAChE,EAEK,IAAa,QACX,EAAO,MAAM,SAAS,EAAS,MAAM,SAAS,EAAM,MAAM,OACjE;EAED,SAAS,EAAO,GAAwB;AACjC,QACD,EAAM,WAAS,EAAO,YAAY,EAAM,QAAQ;;EAGtD,SAAS,EAAS,GAAwB;AACxC,MAAM,SAAS,EAAM;;yBAKrB,EAiHM,OAjHN,GAiHM,CAhHJ,EAgBS,UAhBT,GAgBS;GAfP,EAAgD,EAAA,EAAA,EAAA;IAAhC,MAAM;IAAK,gBAAc;;GACzC,EAIK,MAJL,GAIK,EADA,EAAA,EAAC,CAAC,cAAc,WAAU,EAAA,EAAA;GAGvB,EAAA,QAAU,KAAA,GAAA,EADlB,EAQO,QAAA;;IANL,OAAM;IACL,OAAkB,EAAA,EAAM,CAAC,EAAA,EAAC,CAAC,cAAc,mBAAiB,EAAA,OAAW,EAAA,OAAU,CAAA;QAI7E,EAAA,MAAU,EAAA,GAAA,EAAA,IAAA,EAAA,IAAA,GAAA;OAKR,EAAA,EAAI,IAAI,EAAA,EAAI,CAAC,YAAY,SAAA,GAAA,EADlC,EAKM,OALN,EAKM,IAGO,EAAA,UAAU,KAAA,GAAA,EADvB,EAKM,OALN,GAKM,EADD,EAAA,EAAC,CAAC,cAAc,WAAU,EAAA,EAAA,KAAA,EAAA,GAAA,EAI7B,EA6EU,GAAA,EAAA,KAAA,GAAA,EAAA,EAAA;;;WA5EoE,EAAA,EAAC,CAAC,cAAc;UAA+B,EAAA,EAAW;WAAqB,EAAA;;;;;WAAmI,EAAA,EAAC,CAAC,cAAc;UAAiC,EAAA,EAAa;WAAqB,EAAA;;;;;WAAkI,EAAA,EAAC,CAAC,cAAc;UAA6B,EAAA,EAAI;WAAqB,EAAA;;;MAAljB,YADT,EA6EU,WAAA,EArDP,KAAK,EAAM,KAAA,EAAA,CAGJ,EAAM,MAAM,SAAM,KAAA,GAAA,EAD1B,EAUS,UAAA;;GARP,OAAK,EAAA,CAAC,oHACE,EAAM,KAAI,CAAA;;SAElB,EAA2D,EAA3C,EAAM,KAAI,EAAA;IAAG,MAAM;IAAK,gBAAc;;KAAK,MAC3D,EAAG,EAAM,MAAK,GAAG,KACjB,EAAA;GAAA,EAEO,QAFP,GAEO,EADF,EAAM,MAAM,OAAM,EAAA,EAAA;sBAIjB,EAAM,MAAM,SAAM,KAAA,GAAA,EAD1B,EAuCK,MAvCL,GAuCK,EAAA,EAAA,GAAA,EAnCH,EAkCK,GAAA,MAAA,EAjCa,EAAM,QAAf,YADT,EAkCK,MAAA;GAhCF,KAAG,GAAK,EAAM,OAAM,GAAI,EAAM,WAAO;GACtC,OAAM;;GAEN,EAEI,KAFJ,GAEI,EADC,EAAM,QAAO,EAAA,EAAA;GAElB,EAII,KAJJ,GAII,EADC,EAAM,OAAM,EAAA,EAAA;GAEjB,EAoBM,OApBN,GAoBM,CAlBI,EAAM,WAAA,GAAA,EADd,EAQS,UAAA;;IANP,MAAK;IACL,OAAM;IACL,UAAK,MAAE,EAAO,EAAK;OAEpB,EAA2C,EAAA,EAAA,EAAA;IAA9B,MAAM;IAAK,gBAAc;SAAK,MAC3C,EAAG,EAAA,EAAC,CAAC,cAAc,KAAI,EAAA,EAAA,CAAA,EAAA,GAAA,EAAA,IAAA,EAAA,IAAA,GAAA,EAGjB,EAAM,OAAA,GAAA,EADd,EASS,UAAA;;IAPP,MAAK;IACL,OAAM;IACL,OAAO,EAAM,IAAI;IACjB,UAAK,MAAE,EAAS,EAAK;OAEtB,EAAuC,EAAA,EAAA,EAAA;IAA9B,MAAM;IAAK,gBAAc;SAAK,MACvC,EAAG,EAAA,EAAC,CAAC,cAAc,IAAG,EAAA,EAAA,CAAA,EAAA,GAAA,EAAA,IAAA,EAAA,IAAA,GAAA,CAAA,CAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
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-Bcb86AsV.js";
|
|
2
|
-
import { $ as d,
|
|
2
|
+
import { $ as d, Ft as f, ct as p, en as m, lt as h, tt as g, yt as _ } from "./features-BdkV7kQP.js";
|
|
3
3
|
//#region src/cloud/components/AiFeatureMenu.vue?vue&type=script&setup=true&lang.ts
|
|
4
4
|
var v = {
|
|
5
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)]",
|
|
@@ -12,14 +12,14 @@ var v = {
|
|
|
12
12
|
props: { activeFeature: {} },
|
|
13
13
|
emits: ["select"],
|
|
14
14
|
setup(r, { emit: g }) {
|
|
15
|
-
let C = g, { t: w } = d(), T =
|
|
15
|
+
let C = g, { t: w } = d(), T = m(f, "AiFeatureMenu"), E = {
|
|
16
16
|
"ai-chat": "chat",
|
|
17
17
|
"design-reference": "designToTemplate",
|
|
18
18
|
scoring: "scoring"
|
|
19
19
|
}, D = [
|
|
20
20
|
{
|
|
21
21
|
key: "ai-chat",
|
|
22
|
-
icon:
|
|
22
|
+
icon: p
|
|
23
23
|
},
|
|
24
24
|
{
|
|
25
25
|
key: "design-reference",
|
|
@@ -27,7 +27,7 @@ var v = {
|
|
|
27
27
|
},
|
|
28
28
|
{
|
|
29
29
|
key: "scoring",
|
|
30
|
-
icon:
|
|
30
|
+
icon: h
|
|
31
31
|
}
|
|
32
32
|
], O = u(() => D.filter((e) => T.isFeatureEnabled(E[e.key])));
|
|
33
33
|
function k(e) {
|
|
@@ -56,4 +56,4 @@ var v = {
|
|
|
56
56
|
//#endregion
|
|
57
57
|
export { C as default };
|
|
58
58
|
|
|
59
|
-
//# sourceMappingURL=AiFeatureMenu-
|
|
59
|
+
//# sourceMappingURL=AiFeatureMenu-DSamZ3ve.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AiFeatureMenu-
|
|
1
|
+
{"version":3,"file":"AiFeatureMenu-DSamZ3ve.js","names":[],"sources":["../../../src/cloud/components/AiFeatureMenu.vue","../../../src/cloud/components/AiFeatureMenu.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { useCloudI18nStrict } 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: cloudT } = useCloudI18nStrict();\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 cloudT.aiMenu.aiAssistant;\n if (key === \"design-reference\") return cloudT.aiMenu.designToTemplate;\n return cloudT.aiMenu.templateScore;\n}\n\nfunction getDescription(key: AiFeature): string {\n if (key === \"ai-chat\") return cloudT.aiMenu.aiAssistantDesc;\n if (key === \"design-reference\") return cloudT.aiMenu.designToTemplateDesc;\n return cloudT.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 { useCloudI18nStrict } 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: cloudT } = useCloudI18nStrict();\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 cloudT.aiMenu.aiAssistant;\n if (key === \"design-reference\") return cloudT.aiMenu.designToTemplate;\n return cloudT.aiMenu.templateScore;\n}\n\nfunction getDescription(key: AiFeature): string {\n if (key === \"ai-chat\") return cloudT.aiMenu.aiAssistantDesc;\n if (key === \"design-reference\") return cloudT.aiMenu.designToTemplateDesc;\n return cloudT.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,GAAG,MAAW,GAAoB,EAEpC,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,EAAO,OAAO,cACxC,MAAQ,qBAA2B,EAAO,OAAO,mBAC9C,EAAO,OAAO;;EAGvB,SAAS,EAAe,GAAwB;AAG9C,UAFI,MAAQ,YAAkB,EAAO,OAAO,kBACxC,MAAQ,qBAA2B,EAAO,OAAO,uBAC9C,EAAO,OAAO;;yBAKrB,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"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { E as e, N as t, S as n, _ as r, at as i, g as a, h as o, p as s, st as c } from "./draggable-Bcb86AsV.js";
|
|
2
|
+
import { Nt as l, Pt as u, Tt as d, at as f } from "./features-BdkV7kQP.js";
|
|
3
|
+
//#region src/components/canvas/BlockA11yBadge.vue?vue&type=script&setup=true&lang.ts
|
|
4
|
+
var p = ["title", "aria-label"], m = /* @__PURE__ */ n({
|
|
5
|
+
__name: "BlockA11yBadge",
|
|
6
|
+
props: { blockId: {} },
|
|
7
|
+
setup(n) {
|
|
8
|
+
let m = n, { t: h } = l(), g = e(u, null), _ = s(() => (g?.issues.value ?? []).filter((e) => e.blockId === m.blockId)), v = s(() => _.value.some((e) => e.severity === "error") ? "error" : _.value.some((e) => e.severity === "warning") ? "warning" : null), y = s(() => v.value === "error" ? h.accessibility.badgeError : h.accessibility.badgeWarning);
|
|
9
|
+
return (e, n) => v.value ? (t(), r("span", {
|
|
10
|
+
key: 0,
|
|
11
|
+
class: c(["tpl:absolute tpl:top-1 tpl:right-1 tpl:z-10 tpl:flex tpl:size-5 tpl:items-center tpl:justify-center tpl:rounded-full tpl:bg-[var(--tpl-bg)] tpl:shadow-[var(--tpl-shadow-sm)] tpl:ring-1 tpl:ring-[var(--tpl-border)]", v.value === "error" ? "tpl:text-[var(--tpl-danger)]" : "tpl:text-[var(--tpl-warning)]"]),
|
|
12
|
+
title: y.value,
|
|
13
|
+
"aria-label": y.value,
|
|
14
|
+
role: "img"
|
|
15
|
+
}, [v.value === "error" ? (t(), o(i(d), {
|
|
16
|
+
key: 0,
|
|
17
|
+
size: 14,
|
|
18
|
+
"stroke-width": 2.25,
|
|
19
|
+
fill: "currentColor",
|
|
20
|
+
stroke: "var(--tpl-bg)"
|
|
21
|
+
})) : (t(), o(i(f), {
|
|
22
|
+
key: 1,
|
|
23
|
+
size: 14,
|
|
24
|
+
"stroke-width": 2.25,
|
|
25
|
+
fill: "currentColor",
|
|
26
|
+
stroke: "var(--tpl-bg)"
|
|
27
|
+
}))], 10, p)) : a("", !0);
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
//#endregion
|
|
31
|
+
export { m as default };
|
|
32
|
+
|
|
33
|
+
//# sourceMappingURL=BlockA11yBadge-D73PKVS8.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BlockA11yBadge-D73PKVS8.js","names":[],"sources":["../../../src/components/canvas/BlockA11yBadge.vue","../../../src/components/canvas/BlockA11yBadge.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { computed, inject } from \"vue\";\nimport { CircleAlert, TriangleAlert } from \"@lucide/vue\";\nimport { useI18n } from \"../../composables/useI18n\";\nimport { ACCESSIBILITY_LINT_KEY } from \"../../keys\";\n\nconst props = defineProps<{ blockId: string }>();\nconst { t } = useI18n();\nconst lint = inject(ACCESSIBILITY_LINT_KEY, null);\n\nconst blockIssues = computed(() =>\n (lint?.issues.value ?? []).filter((i) => i.blockId === props.blockId),\n);\n\nconst severity = computed<\"error\" | \"warning\" | null>(() => {\n if (blockIssues.value.some((i) => i.severity === \"error\")) return \"error\";\n if (blockIssues.value.some((i) => i.severity === \"warning\")) return \"warning\";\n return null;\n});\n\nconst tooltip = computed(() =>\n severity.value === \"error\"\n ? t.accessibility.badgeError\n : t.accessibility.badgeWarning,\n);\n</script>\n\n<template>\n <span\n v-if=\"severity\"\n class=\"tpl:absolute tpl:top-1 tpl:right-1 tpl:z-10 tpl:flex tpl:size-5 tpl:items-center tpl:justify-center tpl:rounded-full tpl:bg-[var(--tpl-bg)] tpl:shadow-[var(--tpl-shadow-sm)] tpl:ring-1 tpl:ring-[var(--tpl-border)]\"\n :class=\"\n severity === 'error'\n ? 'tpl:text-[var(--tpl-danger)]'\n : 'tpl:text-[var(--tpl-warning)]'\n \"\n :title=\"tooltip\"\n :aria-label=\"tooltip\"\n role=\"img\"\n >\n <CircleAlert\n v-if=\"severity === 'error'\"\n :size=\"14\"\n :stroke-width=\"2.25\"\n fill=\"currentColor\"\n stroke=\"var(--tpl-bg)\"\n />\n <TriangleAlert\n v-else\n :size=\"14\"\n :stroke-width=\"2.25\"\n fill=\"currentColor\"\n stroke=\"var(--tpl-bg)\"\n />\n </span>\n</template>\n","<script setup lang=\"ts\">\nimport { computed, inject } from \"vue\";\nimport { CircleAlert, TriangleAlert } from \"@lucide/vue\";\nimport { useI18n } from \"../../composables/useI18n\";\nimport { ACCESSIBILITY_LINT_KEY } from \"../../keys\";\n\nconst props = defineProps<{ blockId: string }>();\nconst { t } = useI18n();\nconst lint = inject(ACCESSIBILITY_LINT_KEY, null);\n\nconst blockIssues = computed(() =>\n (lint?.issues.value ?? []).filter((i) => i.blockId === props.blockId),\n);\n\nconst severity = computed<\"error\" | \"warning\" | null>(() => {\n if (blockIssues.value.some((i) => i.severity === \"error\")) return \"error\";\n if (blockIssues.value.some((i) => i.severity === \"warning\")) return \"warning\";\n return null;\n});\n\nconst tooltip = computed(() =>\n severity.value === \"error\"\n ? t.accessibility.badgeError\n : t.accessibility.badgeWarning,\n);\n</script>\n\n<template>\n <span\n v-if=\"severity\"\n class=\"tpl:absolute tpl:top-1 tpl:right-1 tpl:z-10 tpl:flex tpl:size-5 tpl:items-center tpl:justify-center tpl:rounded-full tpl:bg-[var(--tpl-bg)] tpl:shadow-[var(--tpl-shadow-sm)] tpl:ring-1 tpl:ring-[var(--tpl-border)]\"\n :class=\"\n severity === 'error'\n ? 'tpl:text-[var(--tpl-danger)]'\n : 'tpl:text-[var(--tpl-warning)]'\n \"\n :title=\"tooltip\"\n :aria-label=\"tooltip\"\n role=\"img\"\n >\n <CircleAlert\n v-if=\"severity === 'error'\"\n :size=\"14\"\n :stroke-width=\"2.25\"\n fill=\"currentColor\"\n stroke=\"var(--tpl-bg)\"\n />\n <TriangleAlert\n v-else\n :size=\"14\"\n :stroke-width=\"2.25\"\n fill=\"currentColor\"\n stroke=\"var(--tpl-bg)\"\n />\n </span>\n</template>\n"],"mappings":";;;;;;;EAMA,IAAM,IAAQ,GACR,EAAE,SAAM,GAAS,EACjB,IAAO,EAAO,GAAwB,KAAK,EAE3C,IAAc,SACjB,GAAM,OAAO,SAAS,EAAE,EAAE,QAAQ,MAAM,EAAE,YAAY,EAAM,QAAQ,CACtE,EAEK,IAAW,QACX,EAAY,MAAM,MAAM,MAAM,EAAE,aAAa,QAAQ,GAAS,UAC9D,EAAY,MAAM,MAAM,MAAM,EAAE,aAAa,UAAU,GAAS,YAC7D,KACP,EAEI,IAAU,QACd,EAAS,UAAU,UACf,EAAE,cAAc,aAChB,EAAE,cAAc,aACrB;mBAKS,EAAA,SAAA,GAAA,EADR,EA0BO,QAAA;;GAxBL,OAAK,EAAA,CAAC,yNACS,EAAA,UAAQ,UAAA,iCAAA,gCAAA,CAAA;GAKtB,OAAO,EAAA;GACP,cAAY,EAAA;GACb,MAAK;MAGG,EAAA,UAAQ,WAAA,GAAA,EADhB,EAME,EAAA,EAAA,EAAA;;GAJC,MAAM;GACN,gBAAc;GACf,MAAK;GACL,QAAO;cAET,EAME,EAAA,EAAA,EAAA;;GAJC,MAAM;GACN,gBAAc;GACf,MAAK;GACL,QAAO"}
|