@templatical/editor 0.0.4 → 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.
Files changed (108) hide show
  1. package/dist/{AiChatSidebar-CjfhTZwo.js → AiChatSidebar-DwME3f-a.js} +84 -70
  2. package/dist/{AiFeatureMenu-K44aZa_P.js → AiFeatureMenu-DJvWL1GZ.js} +23 -23
  3. package/dist/CloudEditor-Fe0ssRgi.js +1082 -0
  4. package/dist/{CollaboratorBar-BuCEcdbB.js → CollaboratorBar-DTT0EkZn.js} +1 -1
  5. package/dist/{CommentsSidebar-2lcqMfIP.js → CommentsSidebar-DrJhQRXK.js} +131 -131
  6. package/dist/{DesignReferenceSidebar-CNMu4Zrx.js → DesignReferenceSidebar-DdOht5zn.js} +49 -49
  7. package/dist/{ModuleBrowserModal-CvQ0xyQf.js → ModuleBrowserModal-CiV_jOEM.js} +58 -58
  8. package/dist/{ModulePreviewCanvas-Be2B3Y07.js → ModulePreviewCanvas-Bmy6Y1WE.js} +1 -1
  9. package/dist/ParagraphEditor-CoQ3NlS7.js +688 -0
  10. package/dist/{SaveModuleDialog-BaaeH5Xm.js → SaveModuleDialog-CD2ZYq1o.js} +25 -25
  11. package/dist/{SnapshotHistory-BPfjiuu1.js → SnapshotHistory-DltsKvhP.js} +1 -1
  12. package/dist/TemplateScoringPanel-DmnmUE3y.js +254 -0
  13. package/dist/{TestEmailModal-DIAlB3e_.js → TestEmailModal-Dl633j9o.js} +2 -2
  14. package/dist/{TitleEditor-D9DPjQkX.js → TitleEditor-C7fds2Nc.js} +3 -3
  15. package/dist/{TplModal-CmTSvCY-.js → TplModal-C5_CF-qn.js} +1 -1
  16. package/dist/{blockTypeIcons-D1RTWOkx.js → blockTypeIcons-BrKZB10B.js} +1 -1
  17. package/dist/cdn/chunks/AiChatSidebar-X_Bv3Qys.js +2 -0
  18. package/dist/cdn/chunks/{AiFeatureMenu-lxVm1RjH.js → AiFeatureMenu-C5UQmEgV.js} +16 -16
  19. package/dist/cdn/chunks/AiFeatureMenu-C5UQmEgV.js.map +1 -0
  20. package/dist/cdn/chunks/CloudEditor-DeTolKnf.js +1056 -0
  21. package/dist/cdn/chunks/CloudEditor-DeTolKnf.js.map +1 -0
  22. package/dist/cdn/chunks/{CollaboratorBar-D2PKtlOw.js → CollaboratorBar-DO1nxSrr.js} +3 -3
  23. package/dist/cdn/chunks/{CollaboratorBar-D2PKtlOw.js.map → CollaboratorBar-DO1nxSrr.js.map} +1 -1
  24. package/dist/cdn/chunks/CommentsSidebar-4MTw_hue.js +2 -0
  25. package/dist/cdn/chunks/DesignReferenceSidebar-Bswh4Yx4.js +2 -0
  26. package/dist/cdn/chunks/{ModuleBrowserModal-CxDXzkKS.js → ModuleBrowserModal-ChBr3aXj.js} +52 -52
  27. package/dist/cdn/chunks/ModuleBrowserModal-ChBr3aXj.js.map +1 -0
  28. package/dist/cdn/chunks/{ModulePreviewCanvas-DEfHampA.js → ModulePreviewCanvas-DkSvri9H.js} +2 -2
  29. package/dist/cdn/chunks/{ModulePreviewCanvas-DEfHampA.js.map → ModulePreviewCanvas-DkSvri9H.js.map} +1 -1
  30. package/dist/cdn/chunks/ParagraphEditor-DU3oUKA7.js +539 -0
  31. package/dist/cdn/chunks/ParagraphEditor-DU3oUKA7.js.map +1 -0
  32. package/dist/cdn/chunks/{RichTextEditorContent-DWUzizsC.js → RichTextEditorContent-BrsW1p9s.js} +4 -4
  33. package/dist/cdn/chunks/{RichTextEditorContent-DWUzizsC.js.map → RichTextEditorContent-BrsW1p9s.js.map} +1 -1
  34. package/dist/cdn/chunks/{SaveModuleDialog-DVna2xUl.js → SaveModuleDialog-CjqKkTEc.js} +24 -24
  35. package/dist/cdn/chunks/SaveModuleDialog-CjqKkTEc.js.map +1 -0
  36. package/dist/cdn/chunks/SnapshotHistory-KME4xmn_.js +2 -0
  37. package/dist/cdn/chunks/TemplateScoringPanel-DgB3xDN6.js +2 -0
  38. package/dist/cdn/chunks/TestEmailModal-DdpvRbYf.js +2 -0
  39. package/dist/cdn/chunks/{TitleEditor-DDf_OcHS.js → TitleEditor-C8FYbadT.js} +9 -9
  40. package/dist/cdn/chunks/{TitleEditor-DDf_OcHS.js.map → TitleEditor-C8FYbadT.js.map} +1 -1
  41. package/dist/cdn/chunks/{blockTypeIcons-BnobReQm.js → blockTypeIcons-5QwYklNq.js} +3 -3
  42. package/dist/cdn/chunks/{blockTypeIcons-BnobReQm.js.map → blockTypeIcons-5QwYklNq.js.map} +1 -1
  43. package/dist/cdn/chunks/{dist-CJcMnY7o.js → dist-BF5c3Dr-.js} +1 -1
  44. package/dist/cdn/chunks/dist-BGzvIxcJ.js +2 -0
  45. package/dist/cdn/chunks/dist-CFemF8rI.js +2 -0
  46. package/dist/cdn/chunks/dist-Co6uFhFK.js +2 -0
  47. package/dist/cdn/chunks/{dist-BkETaOfw.js → dist-DCikBY9K.js} +1 -1
  48. package/dist/cdn/chunks/dist-DUILafAC.js +2 -0
  49. package/dist/cdn/chunks/dist-DghiKH0A.js +2 -0
  50. package/dist/cdn/chunks/dist-Dw8ckvfK.js +2 -0
  51. package/dist/cdn/chunks/dist-H07p0KAw.js +2 -0
  52. package/dist/cdn/chunks/{dist-B878xb_62.js → dist-KYv9v_1z2.js} +11 -11
  53. package/dist/cdn/chunks/{dist-B878xb_62.js.map → dist-KYv9v_1z2.js.map} +1 -1
  54. package/dist/cdn/chunks/{dist-DLWHlekl.js → dist-MjnKIc0W.js} +1 -1
  55. package/dist/cdn/chunks/{dist-CllLxIMQ.js → dist-odp0vGRv.js} +1 -1
  56. package/dist/cdn/chunks/{extensions-B_kcV0tK.js → extensions-Bj7USRLr.js} +20 -20
  57. package/dist/cdn/chunks/{extensions-B_kcV0tK.js.map → extensions-Bj7USRLr.js.map} +1 -1
  58. package/dist/cdn/chunks/{features-ofOGnSC0.js → features-Ds0XUfte.js} +1235 -1198
  59. package/dist/cdn/chunks/features-Ds0XUfte.js.map +1 -0
  60. package/dist/cdn/chunks/{icons-bIb7PBOE.js → icons-fWsuSvgd.js} +2 -2
  61. package/dist/cdn/chunks/{icons-bIb7PBOE.js.map → icons-fWsuSvgd.js.map} +1 -1
  62. package/dist/cdn/chunks/{media-library-BIYzV2Y2.js → media-library-BGQm_OyC.js} +528 -528
  63. package/dist/cdn/chunks/{media-library-BIYzV2Y2.js.map → media-library-BGQm_OyC.js.map} +1 -1
  64. package/dist/cdn/chunks/{src-BuW9oYtm.js → src-3i8rPuqd.js} +4 -4
  65. package/dist/cdn/chunks/{src-BuW9oYtm.js.map → src-3i8rPuqd.js.map} +1 -1
  66. package/dist/cdn/chunks/{styleConstants-1KwsBMxJ.js → styleConstants-DFe3I4Op.js} +6 -6
  67. package/dist/cdn/chunks/{styleConstants-1KwsBMxJ.js.map → styleConstants-DFe3I4Op.js.map} +1 -1
  68. package/dist/cdn/chunks/{styles-DQFExz-T.js → styles-Dgijy53u.js} +1224 -1096
  69. package/dist/cdn/chunks/styles-Dgijy53u.js.map +1 -0
  70. package/dist/cdn/chunks/{tiptap-DplY-S-k.js → tiptap-BhxaWR8R.js} +2 -2
  71. package/dist/cdn/chunks/{tiptap-DplY-S-k.js.map → tiptap-BhxaWR8R.js.map} +1 -1
  72. package/dist/cdn/editor.css +1 -1
  73. package/dist/cdn/editor.js +110 -139
  74. package/dist/cdn/editor.js.map +1 -1
  75. package/dist/{dist-BkIys9zn.js → dist-Ci5lFuUy.js} +1 -1
  76. package/dist/{extensions-DEjfEFhD.js → extensions-DWx_jj8v.js} +1 -1
  77. package/dist/{styleConstants-D4SOZGBV.js → styleConstants-Cxw88naD.js} +5 -5
  78. package/dist/{styles-CgLaxDfu.js → styles-fdXNRqI3.js} +1341 -1213
  79. package/dist/templatical-editor.css +1 -1
  80. package/dist/templatical-editor.js +99 -129
  81. package/dist/templatical-editor.umd.cjs +55 -64
  82. package/dist/{useEditorCore-CjwRMl7K.js → useEditorCore-DUGD6pq_.js} +1054 -1033
  83. package/package.json +4 -2
  84. package/dist/CloudEditor-DFyuRxUV.js +0 -926
  85. package/dist/ParagraphEditor-CcMPnbDr.js +0 -652
  86. package/dist/TemplateScoringPanel-D58A23Vq.js +0 -249
  87. package/dist/cdn/chunks/AiChatSidebar-CmPTbTFG.js +0 -2
  88. package/dist/cdn/chunks/AiFeatureMenu-lxVm1RjH.js.map +0 -1
  89. package/dist/cdn/chunks/CloudEditor-Bmp5IlWi.js +0 -900
  90. package/dist/cdn/chunks/CloudEditor-Bmp5IlWi.js.map +0 -1
  91. package/dist/cdn/chunks/CommentsSidebar-BOelj4Ca.js +0 -2
  92. package/dist/cdn/chunks/DesignReferenceSidebar-Bf6rg0A7.js +0 -2
  93. package/dist/cdn/chunks/ModuleBrowserModal-CxDXzkKS.js.map +0 -1
  94. package/dist/cdn/chunks/ParagraphEditor-DHdu6lb3.js +0 -503
  95. package/dist/cdn/chunks/ParagraphEditor-DHdu6lb3.js.map +0 -1
  96. package/dist/cdn/chunks/SaveModuleDialog-DVna2xUl.js.map +0 -1
  97. package/dist/cdn/chunks/SnapshotHistory-BFF2SsTN.js +0 -2
  98. package/dist/cdn/chunks/TemplateScoringPanel-gi8wc_m7.js +0 -2
  99. package/dist/cdn/chunks/TestEmailModal-Qtd6aC-6.js +0 -2
  100. package/dist/cdn/chunks/dist-B6AUkMyh.js +0 -2
  101. package/dist/cdn/chunks/dist-Bf1Op9A1.js +0 -2
  102. package/dist/cdn/chunks/dist-CWsl6S1K.js +0 -2
  103. package/dist/cdn/chunks/dist-Cs0wFwdw.js +0 -2
  104. package/dist/cdn/chunks/dist-DS3_HVpX.js +0 -2
  105. package/dist/cdn/chunks/dist-DTXopj1a.js +0 -2
  106. package/dist/cdn/chunks/dist-DnwLoNLm.js +0 -2
  107. package/dist/cdn/chunks/features-ofOGnSC0.js.map +0 -1
  108. package/dist/cdn/chunks/styles-DQFExz-T.js.map +0 -1
@@ -1,249 +0,0 @@
1
- import { f as e, g as t, x as n } from "./keys-C0MQRs8d.js";
2
- import { t as r } from "./useI18n-D6m7ZUgY.js";
3
- import { n as i, t as a } from "./_plugin-vue_export-helper-B1-bu7yR.js";
4
- import { t as ee } from "./chevron-down-DJLW2Q9Z.js";
5
- import { t as o } from "./circle-alert-E2vYPs5r.js";
6
- import { n as te, r as ne, t as s } from "./refresh-cw-Bb4PEeW1.js";
7
- import { t as re } 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 ie } from "./x-CGlq2XQe.js";
12
- import { t as ae } from "./LoadingTrack-vK8W2PJf.js";
13
- import { Fragment as d, Transition as oe, createBlock as f, createCommentVNode as p, createElementBlock as m, createElementVNode as h, createTextVNode as g, createVNode as _, defineComponent as v, inject as y, normalizeClass as se, normalizeStyle as b, openBlock as x, ref as ce, renderList as S, resolveDynamicComponent as C, toDisplayString as w, unref as T, watch as le, withCtx as ue } from "vue";
14
- var de = 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
- ]), fe = 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
- }]]), E = {
31
- key: 0,
32
- 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)]"
33
- }, D = { class: "tpl:flex tpl:items-center tpl:justify-between tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-3" }, O = { class: "tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-primary)]" }, k = { class: "tpl:flex tpl:items-center tpl:gap-1" }, A = ["title"], j = { class: "tpl:flex-1 tpl:overflow-y-auto tpl:p-4" }, M = {
34
- key: 0,
35
- class: "tpl:flex tpl:h-full tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:text-center"
36
- }, N = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, P = {
37
- key: 1,
38
- class: "tpl:flex tpl:h-full tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:text-center"
39
- }, F = { class: "tpl:max-w-[240px] tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, I = {
40
- key: 2,
41
- class: "tpl:flex tpl:flex-col tpl:gap-4"
42
- }, L = { class: "tpl:text-xs tpl:font-medium tpl:uppercase tpl:tracking-wider tpl:text-[var(--tpl-text-muted)]" }, R = {
43
- key: 0,
44
- class: "tpl:text-xs tpl:text-[var(--tpl-text-dim)]"
45
- }, z = {
46
- key: 0,
47
- 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)]"
48
- }, B = ["onClick"], V = { class: "tpl:flex-1 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text)]" }, pe = {
49
- key: 0,
50
- class: "tpl:text-[10px] tpl:text-[var(--tpl-text-dim)]"
51
- }, me = {
52
- key: 0,
53
- class: "tpl:border-t tpl:border-[var(--tpl-border)]"
54
- }, he = {
55
- key: 0,
56
- class: "tpl:px-3 tpl:py-3 tpl:text-center tpl:text-xs tpl:text-[var(--tpl-text-dim)]"
57
- }, ge = { class: "tpl:flex tpl:items-start tpl:gap-2" }, _e = { class: "tpl:flex-1 tpl:min-w-0" }, ve = { class: "tpl:flex tpl:items-start tpl:gap-1.5" }, ye = { class: "tpl:text-xs tpl:leading-snug tpl:text-[var(--tpl-text)]" }, be = {
58
- key: 0,
59
- class: "tpl:mt-1 tpl:text-[11px] tpl:leading-snug tpl:text-[var(--tpl-text-dim)]"
60
- }, xe = {
61
- key: 1,
62
- class: "tpl:mt-2 tpl:flex tpl:justify-center"
63
- }, Se = ["disabled", "onClick"], Ce = {
64
- key: 0,
65
- class: "tpl:mt-1.5 tpl:text-[11px] tpl:text-[var(--tpl-danger)]"
66
- }, we = {
67
- key: 3,
68
- class: "tpl:flex tpl:h-full tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:text-center"
69
- }, Te = { class: "tpl:max-w-[240px] tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, Ee = { 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)]" }, H = /* @__PURE__ */ a(/* @__PURE__ */ v({
70
- __name: "TemplateScoringPanel",
71
- props: { visible: { type: Boolean } },
72
- emits: ["close"],
73
- setup(i, { emit: a }) {
74
- let v = i, H = a, { t: U } = r(), W = y(e), G = y(n), K = y(t, []), q = ce({
75
- spam: !0,
76
- readability: !0,
77
- accessibility: !0,
78
- bestPractices: !0
79
- });
80
- function De(e) {
81
- q.value[e] = !q.value[e];
82
- }
83
- let J = [
84
- "spam",
85
- "readability",
86
- "accessibility",
87
- "bestPractices"
88
- ], Oe = {
89
- spam: de,
90
- readability: ne,
91
- accessibility: l,
92
- bestPractices: fe
93
- };
94
- function Y(e) {
95
- return e >= 80 ? "var(--tpl-success)" : e >= 60 ? "var(--tpl-warning)" : "var(--tpl-danger)";
96
- }
97
- function X(e) {
98
- return e >= 80 ? "var(--tpl-success-light)" : e >= 60 ? "var(--tpl-warning-light)" : "var(--tpl-danger-light)";
99
- }
100
- function Z(e) {
101
- return e === "high" ? "var(--tpl-danger)" : e === "medium" ? "var(--tpl-warning)" : "var(--tpl-text-muted)";
102
- }
103
- function ke(e) {
104
- return e === "high" ? "var(--tpl-danger-light)" : e === "medium" ? "var(--tpl-warning-light)" : "var(--tpl-bg-hover)";
105
- }
106
- function Q() {
107
- G.score(W.content.value, K);
108
- }
109
- le(() => v.visible, (e) => {
110
- e && !G.scoringResult.value && !G.isScoring.value && Q();
111
- });
112
- async function Ae(e) {
113
- if (!e.blockId) return;
114
- let t = W.content.value.blocks.find((t) => t.id === e.blockId);
115
- if (!t) return;
116
- let n = t.content;
117
- if (!n) return;
118
- let r = await G.fixFinding(n, e, K);
119
- r && (W.updateBlock(e.blockId, { content: r }), G.removeFinding(e.category, e.id));
120
- }
121
- function $() {
122
- return G.scoringResult.value ? J.reduce((e, t) => e + (G.scoringResult.value?.categories[t]?.findings.length ?? 0), 0) : 0;
123
- }
124
- return (e, t) => (x(), f(oe, {
125
- "enter-active-class": "tpl-scoring-slide-enter-active",
126
- "enter-from-class": "tpl:translate-x-full",
127
- "enter-to-class": "tpl:translate-x-0",
128
- "leave-active-class": "tpl-scoring-slide-leave-active",
129
- "leave-from-class": "tpl:translate-x-0",
130
- "leave-to-class": "tpl:translate-x-full"
131
- }, {
132
- default: ue(() => [i.visible ? (x(), m("div", E, [h("div", D, [h("div", O, [_(T(c), {
133
- size: 13,
134
- "stroke-width": 2
135
- }), h("span", null, w(T(U).scoring.title), 1)]), h("div", k, [T(G).scoringResult.value && !T(G).isScoring.value ? (x(), m("button", {
136
- key: 0,
137
- class: "tpl:rounded-md tpl:p-0.5 tpl:transition-colors tpl:duration-150 tpl:text-[var(--tpl-text-muted)]",
138
- title: T(U).scoring.rescore,
139
- onClick: t[0] ||= (e) => Q()
140
- }, [_(T(s), {
141
- size: 14,
142
- "stroke-width": 2
143
- })], 8, A)) : p("", !0), h("button", {
144
- class: "tpl:rounded-md tpl:p-0.5 tpl:transition-colors tpl:duration-150 tpl:text-[var(--tpl-text-muted)]",
145
- onClick: t[1] ||= (e) => H("close")
146
- }, [_(T(ie), {
147
- size: 14,
148
- "stroke-width": 2
149
- })])])]), h("div", j, [T(G).isScoring.value ? (x(), m("div", M, [h("p", N, w(T(U).scoring.scoring), 1), _(ae, { class: "tpl:w-3/4" })])) : T(G).error.value && !T(G).scoringResult.value ? (x(), m("div", P, [
150
- _(T(o), {
151
- size: 32,
152
- "stroke-width": 1.5,
153
- class: "tpl:text-[var(--tpl-danger)]"
154
- }),
155
- h("p", F, w(T(U).scoring.error), 1),
156
- h("button", {
157
- 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)]",
158
- onClick: t[2] ||= (e) => Q()
159
- }, [_(T(s), {
160
- size: 12,
161
- "stroke-width": 2
162
- }), g(" " + w(T(U).scoring.rescore), 1)])
163
- ])) : T(G).scoringResult.value ? (x(), m("div", I, [
164
- h("div", {
165
- class: "tpl:flex tpl:flex-col tpl:items-center tpl:gap-2 tpl:rounded-[var(--tpl-radius)] tpl:p-5",
166
- style: b({ backgroundColor: X(T(G).scoringResult.value.score) })
167
- }, [
168
- h("span", {
169
- class: "tpl:text-4xl tpl:font-bold tpl:tabular-nums",
170
- style: b({ color: Y(T(G).scoringResult.value.score) })
171
- }, w(T(G).scoringResult.value.score), 5),
172
- h("span", L, w(T(U).scoring.overallScore), 1),
173
- $() > 0 ? (x(), m("span", R, w($()) + " " + w(T(U).scoring.findings), 1)) : p("", !0)
174
- ], 4),
175
- T(G).fixError.value ? (x(), m("div", z, [_(T(o), {
176
- size: 14,
177
- "stroke-width": 2,
178
- class: "tpl:mt-0.5 tpl:shrink-0"
179
- }), h("span", null, w(T(U).scoring.fixError), 1)])) : p("", !0),
180
- (x(), m(d, null, S(J, (e) => h("div", {
181
- key: e,
182
- class: "tpl:overflow-hidden tpl:rounded-[var(--tpl-radius)] tpl:border tpl:border-[var(--tpl-border)]"
183
- }, [h("button", {
184
- 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)]",
185
- onClick: (t) => De(e)
186
- }, [
187
- (x(), f(C(Oe[e]), {
188
- size: 14,
189
- "stroke-width": 2,
190
- style: b({ color: Y(T(G).scoringResult.value.categories[e].score) })
191
- }, null, 8, ["style"])),
192
- h("span", V, w(T(U).scoring.categories[e]), 1),
193
- h("span", {
194
- class: "tpl:rounded-full tpl:px-2 tpl:py-0.5 tpl:text-xs tpl:font-semibold tpl:tabular-nums",
195
- style: b({
196
- color: Y(T(G).scoringResult.value.categories[e].score),
197
- backgroundColor: X(T(G).scoringResult.value.categories[e].score)
198
- })
199
- }, w(T(G).scoringResult.value.categories[e].score), 5),
200
- T(G).scoringResult.value.categories[e].findings.length > 0 ? (x(), m("span", pe, w(T(G).scoringResult.value.categories[e].findings.length), 1)) : p("", !0),
201
- _(T(ee), {
202
- size: 12,
203
- "stroke-width": 2,
204
- class: se(["tpl:transition-transform tpl:duration-200 tpl:text-[var(--tpl-text-dim)]", q.value[e] ? "tpl:rotate-0" : "tpl:-rotate-90"])
205
- }, null, 8, ["class"])
206
- ], 8, B), q.value[e] ? (x(), m("div", me, [T(G).scoringResult.value.categories[e].findings.length === 0 ? (x(), m("div", he, w(T(U).scoring.noFindings), 1)) : p("", !0), (x(!0), m(d, null, S(T(G).scoringResult.value.categories[e].findings, (e) => (x(), m("div", {
207
- key: e.id,
208
- class: "tpl:border-t tpl:px-3 tpl:py-2.5 first:tpl:border-t-0 tpl:border-[var(--tpl-border-light)]"
209
- }, [h("div", ge, [(x(), f(C(e.severity === "high" ? T(o) : e.severity === "medium" ? T(u) : T(te)), {
210
- size: 13,
211
- "stroke-width": 2,
212
- class: "tpl:mt-0.5 tpl:shrink-0",
213
- style: b({ color: Z(e.severity) })
214
- }, null, 8, ["style"])), h("div", _e, [
215
- h("div", ve, [h("span", {
216
- 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",
217
- style: b({
218
- color: Z(e.severity),
219
- backgroundColor: ke(e.severity)
220
- })
221
- }, w(T(U).scoring.severity[e.severity]), 5), h("span", ye, w(e.message), 1)]),
222
- e.suggestion ? (x(), m("p", be, w(e.suggestion), 1)) : p("", !0),
223
- e.blockId ? (x(), m("div", xe, [h("button", {
224
- 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)]",
225
- style: { "background-color": "transparent" },
226
- disabled: T(G).fixingFindingId.value !== null,
227
- onClick: (t) => Ae(e)
228
- }, [T(G).fixingFindingId.value === e.id ? (x(), f(T(re), {
229
- key: 0,
230
- class: "tpl-spinner",
231
- size: 11,
232
- "stroke-width": 2
233
- })) : (x(), f(T(l), {
234
- key: 1,
235
- size: 11,
236
- "stroke-width": 2
237
- })), g(" " + w(T(G).fixingFindingId.value === e.id ? T(U).scoring.fixing : T(U).scoring.fix), 1)], 8, Se), T(G).fixError.value ? (x(), m("p", Ce, w(T(G).fixError.value), 1)) : p("", !0)])) : p("", !0)
238
- ])])]))), 128))])) : p("", !0)])), 64))
239
- ])) : (x(), m("div", we, [_(T(c), {
240
- size: 32,
241
- "stroke-width": 1.5,
242
- class: "tpl:text-[var(--tpl-text-dim)]"
243
- }), h("p", Te, w(T(U).scoring.emptyState), 1)])), h("p", Ee, w(T(U).aiMenu.disclaimer), 1)])])) : p("", !0)]),
244
- _: 1
245
- }));
246
- }
247
- }), [["__scopeId", "data-v-f4e29bc9"]]);
248
- //#endregion
249
- export { H as default };
@@ -1,2 +0,0 @@
1
- import { s as e } from "./features-ofOGnSC0.js";
2
- export { e as default };
@@ -1 +0,0 @@
1
- {"version":3,"file":"AiFeatureMenu-lxVm1RjH.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 } from \"../../keys\";\nimport type { AiConfig } from \"@templatical/types\";\nimport { ImageUp, ShieldCheck, Sparkles } from \"@lucide/vue\";\nimport { computed, inject } 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 = inject(AI_CONFIG_KEY)!;\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 } from \"../../keys\";\nimport type { AiConfig } from \"@templatical/types\";\nimport { ImageUp, ShieldCheck, Sparkles } from \"@lucide/vue\";\nimport { computed, inject } 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 = inject(AI_CONFIG_KEY)!;\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,EAAO,EAAc,EAEhC,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"}