@templatical/editor 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (130) hide show
  1. package/dist/AiChatSidebar-XBj5Rw2l.js +214 -0
  2. package/dist/AiFeatureMenu-my1mZ9DL.js +63 -0
  3. package/dist/CloudEditor-BVjgKwq3.js +940 -0
  4. package/dist/CollaboratorBar-BZq_Gv38.js +91 -0
  5. package/dist/CommentsSidebar-D9oxqO6l.js +439 -0
  6. package/dist/DesignReferenceSidebar-CyHq4SWt.js +272 -0
  7. package/dist/LoadingTrack-vK8W2PJf.js +10 -0
  8. package/dist/ModuleBrowserModal-Cus2Hdwl.js +205 -0
  9. package/dist/ModulePreviewCanvas-DaByXKY_.js +106 -0
  10. package/dist/ParagraphEditor-BSyk5B6S.js +670 -0
  11. package/dist/RichTextEditorContent-BRpjJ6SV.js +133 -0
  12. package/dist/SaveModuleDialog-BIZBQrd8.js +122 -0
  13. package/dist/SnapshotHistory-Ds1-QNbx.js +126 -0
  14. package/dist/TemplateScoringPanel-C8XSk_Ys.js +249 -0
  15. package/dist/TestEmailModal-CCVfaFgV.js +94 -0
  16. package/dist/TitleEditor-V4qaEULF.js +167 -0
  17. package/dist/TplModal-LT3FXlgs.js +44 -0
  18. package/dist/_plugin-vue_export-helper-B1-bu7yR.js +47 -0
  19. package/dist/blockTypeIcons-BujoY5Dl.js +126 -0
  20. package/dist/cdn/chunks/ParagraphEditor-BkJQO-ZW.js +3 -0
  21. package/dist/cdn/chunks/ParagraphEditor-BkJQO-ZW.js.map +1 -0
  22. package/dist/cdn/chunks/RichTextEditorContent-UGQorJm_.js +2 -0
  23. package/dist/cdn/chunks/RichTextEditorContent-UGQorJm_.js.map +1 -0
  24. package/dist/cdn/chunks/TitleEditor-CC3Adjai.js +3 -0
  25. package/dist/cdn/chunks/TitleEditor-CC3Adjai.js.map +1 -0
  26. package/dist/cdn/chunks/dist-0UheN8rK.js +1 -0
  27. package/dist/cdn/chunks/dist-55mmbGQ9.js +1 -0
  28. package/dist/cdn/chunks/dist-B31mxKyP.js +1 -0
  29. package/dist/cdn/chunks/dist-B5JI9nIg.js +1 -0
  30. package/dist/cdn/chunks/dist-B93vLKhU.js +1 -0
  31. package/dist/cdn/chunks/dist-BDt3FJvj.js +1 -0
  32. package/dist/cdn/chunks/dist-BJRuFHmi.js +1 -0
  33. package/dist/cdn/chunks/dist-BKSzrf0L.js +1 -0
  34. package/dist/cdn/chunks/dist-BL8c5gYQ.js +1 -0
  35. package/dist/cdn/chunks/dist-CYThWMP5.js +1 -0
  36. package/dist/cdn/chunks/dist-DxZbPJYt.js +1 -0
  37. package/dist/cdn/chunks/draggable-ClUwYCFL.js +17 -0
  38. package/dist/cdn/chunks/draggable-ClUwYCFL.js.map +1 -0
  39. package/dist/cdn/chunks/emojiData-6fVLNqeH.js +2 -0
  40. package/dist/cdn/chunks/emojiData-6fVLNqeH.js.map +1 -0
  41. package/dist/cdn/chunks/extensions-BfjbWqOx.js +2 -0
  42. package/dist/cdn/chunks/extensions-BfjbWqOx.js.map +1 -0
  43. package/dist/cdn/chunks/icons-vmLJTaJk.js +2 -0
  44. package/dist/cdn/chunks/icons-vmLJTaJk.js.map +1 -0
  45. package/dist/cdn/chunks/rolldown-runtime-BakkzWXw.js +1 -0
  46. package/dist/cdn/chunks/styleConstants-UTJ94gco.js +2 -0
  47. package/dist/cdn/chunks/styleConstants-UTJ94gco.js.map +1 -0
  48. package/dist/cdn/chunks/tiptap-Cya4P9CN.js +145 -0
  49. package/dist/cdn/chunks/tiptap-Cya4P9CN.js.map +1 -0
  50. package/dist/cdn/chunks/useEditorCore-DRhPKq_z.js +2 -0
  51. package/dist/cdn/chunks/useEditorCore-DRhPKq_z.js.map +1 -0
  52. package/dist/cdn/chunks/useMergeTag-CBSlcqnk.js +2 -0
  53. package/dist/cdn/chunks/useMergeTag-CBSlcqnk.js.map +1 -0
  54. package/dist/cdn/editor.css +1 -0
  55. package/dist/cdn/editor.js +2 -0
  56. package/dist/cdn/editor.js.map +1 -0
  57. package/dist/check-B7kDuZmP.js +7 -0
  58. package/dist/chevron-down-DJLW2Q9Z.js +7 -0
  59. package/dist/circle-alert-E2vYPs5r.js +25 -0
  60. package/dist/clock-lWIIQA3C.js +12 -0
  61. package/dist/de-B4Ob4vCo.js +682 -0
  62. package/dist/dist-4LiM9FDd.js +35 -0
  63. package/dist/dist-Bu7veieH.js +776 -0
  64. package/dist/dist-C1BIRHCQ.js +61 -0
  65. package/dist/dist-CG-vEqSU.js +314 -0
  66. package/dist/dist-C_ymrGFi.js +10625 -0
  67. package/dist/dist-ChAGLpWo.js +35 -0
  68. package/dist/dist-DNjZKe2Z.js +513 -0
  69. package/dist/dist-D_HQYSY-.js +189 -0
  70. package/dist/dist-DkypH7qG.js +5 -0
  71. package/dist/dist-DmOE-Ubp.js +74 -0
  72. package/dist/dist-DrvKRSU6.js +47 -0
  73. package/dist/dist-Dxnd0GRf.js +5 -0
  74. package/dist/dist-DysAFIPy.js +2054 -0
  75. package/dist/emojiData-BfWQS72m.js +17 -0
  76. package/dist/en-YXsspZJG.js +682 -0
  77. package/dist/extensions-BA4NshZQ.js +420 -0
  78. package/dist/formatRelativeTime-DX3FgqN9.js +8 -0
  79. package/dist/i18n-ikyi28RU.js +23 -0
  80. package/dist/image-up-X4xIq4ea.js +23 -0
  81. package/dist/keys-8B5MFafK.js +4 -0
  82. package/dist/liquid.browser-BemTg3sZ.js +3272 -0
  83. package/dist/loader-circle-BTQQxC3l.js +7 -0
  84. package/dist/message-circle-Blgm6V_h.js +7 -0
  85. package/dist/refresh-cw-Bb4PEeW1.js +44 -0
  86. package/dist/scan-line-7lZPfOdm.js +25 -0
  87. package/dist/send-C0ltAQrv.js +10 -0
  88. package/dist/shield-check-f-qv4RKs.js +10 -0
  89. package/dist/sparkles-KhBCGlqB.js +23 -0
  90. package/dist/styleConstants-CgtFM9hQ.js +43 -0
  91. package/dist/styles-hQgJKM4i.js +3406 -0
  92. package/dist/templatical-editor.css +2 -1
  93. package/dist/templatical-editor.js +242 -9
  94. package/dist/templatical-editor.umd.cjs +112 -524
  95. package/dist/timeouts-CmBrLeZA.js +4 -0
  96. package/dist/trash-2-OwjZ-guZ.js +25 -0
  97. package/dist/triangle-alert-DOSRIUYZ.js +17 -0
  98. package/dist/useEditorCore-DVp5qmtC.js +5552 -0
  99. package/dist/useI18n-DzH4KXDk.js +17 -0
  100. package/dist/useMergeTag-D9zQVE-e.js +33 -0
  101. package/dist/x-CGlq2XQe.js +10 -0
  102. package/package.json +30 -20
  103. package/dist/AiChatSidebar-0vx9TP5B.js +0 -305
  104. package/dist/AiFeatureMenu-CI-v74ND.js +0 -69
  105. package/dist/CloudEditor-Wdfv_9xn.js +0 -1132
  106. package/dist/CollaboratorBar-B3uV4Wtw.js +0 -89
  107. package/dist/CommentsSidebar-PVUlloyB.js +0 -655
  108. package/dist/DesignReferenceSidebar-DAlAWrxU.js +0 -351
  109. package/dist/ModuleBrowserModal-1JEcChd8.js +0 -323
  110. package/dist/ModulePreviewCanvas-Cdp484Ae.js +0 -169
  111. package/dist/SaveModuleDialog-eNyr3XKn.js +0 -168
  112. package/dist/SnapshotHistory-D-ZiIj1v.js +0 -169
  113. package/dist/TemplateScoringPanel-DSZPo15C.js +0 -385
  114. package/dist/TestEmailModal-Cwre5elw.js +0 -128
  115. package/dist/TextEditor-BuUOIByX.js +0 -780
  116. package/dist/de-BWIAblxs.js +0 -685
  117. package/dist/en-cYyUzNV1.js +0 -685
  118. package/dist/index-0tWUczNu.js +0 -47
  119. package/dist/index-4okvXjqk.js +0 -41
  120. package/dist/index-BSc6h5zo.js +0 -967
  121. package/dist/index-CrvwWlhN.js +0 -41
  122. package/dist/index-D-iD-7lO.js +0 -10961
  123. package/dist/index-D-ygXbc8.js +0 -2452
  124. package/dist/index-DbrWKz-e.js +0 -1415
  125. package/dist/index-DeUeHy6g.js +0 -422
  126. package/dist/index-Ude6e9RU.js +0 -41
  127. package/dist/index-ZQzHBwkr.js +0 -12767
  128. package/dist/liquid.browser-CeNxS2GL.js +0 -3493
  129. package/dist/loader-circle-tM9j2mRh.js +0 -13
  130. package/dist/shield-check-Ngi9jAQc.js +0 -20
@@ -0,0 +1,133 @@
1
+ import { C as e, x as t } from "./keys-8B5MFafK.js";
2
+ import { t as n } from "./useI18n-DzH4KXDk.js";
3
+ import { n as r } from "./_plugin-vue_export-helper-B1-bu7yR.js";
4
+ import { t as i } from "./x-CGlq2XQe.js";
5
+ import { Teleport as a, createBlock as o, createCommentVNode as s, createElementBlock as c, createElementVNode as l, createTextVNode as u, createVNode as d, defineComponent as f, inject as p, mergeModels as m, normalizeStyle as h, openBlock as g, resolveDynamicComponent as _, toDisplayString as v, unref as y, useModel as b, vModelText as x, withDirectives as S, withModifiers as C } from "vue";
6
+ var w = r("bold", [["path", {
7
+ d: "M6 12h9a4 4 0 0 1 0 8H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h7a4 4 0 0 1 0 8",
8
+ key: "mg9rjx"
9
+ }]]), T = r("italic", [
10
+ ["line", {
11
+ x1: "19",
12
+ x2: "10",
13
+ y1: "4",
14
+ y2: "4",
15
+ key: "15jd3p"
16
+ }],
17
+ ["line", {
18
+ x1: "14",
19
+ x2: "5",
20
+ y1: "20",
21
+ y2: "20",
22
+ key: "bu0au3"
23
+ }],
24
+ ["line", {
25
+ x1: "15",
26
+ x2: "9",
27
+ y1: "4",
28
+ y2: "20",
29
+ key: "uljnxc"
30
+ }]
31
+ ]), E = r("link", [["path", {
32
+ d: "M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",
33
+ key: "1cjeqo"
34
+ }], ["path", {
35
+ d: "M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",
36
+ key: "19qd67"
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
+ id: "tpl-link-dialog-title",
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 = { class: "tpl:mb-1.5 tpl:block tpl:text-xs tpl:font-medium tpl:tracking-wide tpl:text-[var(--tpl-text-muted)] tpl:uppercase" }, 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
+ __name: "RichTextLinkDialog",
42
+ props: /* @__PURE__ */ m({
43
+ visible: { type: Boolean },
44
+ isEditingLink: { type: Boolean }
45
+ }, {
46
+ linkUrl: { required: !0 },
47
+ linkUrlModifiers: {},
48
+ dialogRef: { required: !0 },
49
+ dialogRefModifiers: {}
50
+ }),
51
+ emits: /* @__PURE__ */ m([
52
+ "close",
53
+ "insert",
54
+ "remove",
55
+ "keydown"
56
+ ], ["update:linkUrl", "update:dialogRef"]),
57
+ setup(r, { emit: u }) {
58
+ let f = b(r, "linkUrl"), m = b(r, "dialogRef"), _ = u, w = p(t), T = p(e), { t: E } = n();
59
+ return (e, t) => (g(), o(a, { to: "body" }, [r.visible ? (g(), c("div", {
60
+ key: 0,
61
+ "data-tpl-theme": y(T),
62
+ class: "tpl tpl-link-dialog tpl:fixed tpl:inset-0 tpl:z-modal tpl:flex tpl:items-center tpl:justify-center",
63
+ style: h(y(w)),
64
+ onClick: t[6] ||= C((e) => _("close"), ["self"])
65
+ }, [l("div", {
66
+ ref: (e) => m.value = e,
67
+ role: "dialog",
68
+ "aria-modal": "true",
69
+ "aria-labelledby": "tpl-link-dialog-title",
70
+ class: "tpl:w-[400px] tpl:overflow-hidden tpl:rounded-lg tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:shadow-lg"
71
+ }, [
72
+ l("div", O, [l("h4", k, v(r.isEditingLink ? y(E).linkDialog.editLink : y(E).linkDialog.insertLink), 1), l("button", {
73
+ type: "button",
74
+ "aria-label": y(E).linkDialog.cancel,
75
+ class: "tpl:flex tpl:size-7 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded tpl:border-none tpl:bg-transparent tpl:p-0 tpl:text-[var(--tpl-text-muted)] tpl:hover:bg-[var(--tpl-bg-hover)] tpl:hover:text-[var(--tpl-text)]",
76
+ onClick: t[0] ||= (e) => _("close")
77
+ }, [d(y(i), {
78
+ size: 16,
79
+ "stroke-width": 2
80
+ })], 8, A)]),
81
+ l("div", j, [l("div", M, [l("label", N, v(y(E).linkDialog.urlLabel), 1), S(l("input", {
82
+ "onUpdate:modelValue": t[1] ||= (e) => f.value = e,
83
+ type: "url",
84
+ 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)]",
85
+ placeholder: y(E).linkDialog.urlPlaceholder,
86
+ autofocus: "",
87
+ onKeydown: t[2] ||= (e) => _("keydown", e)
88
+ }, null, 40, P), [[x, f.value]])])]),
89
+ l("div", F, [r.isEditingLink ? (g(), c("button", {
90
+ key: 0,
91
+ type: "button",
92
+ class: "tpl:inline-flex tpl:cursor-pointer tpl:items-center tpl:rounded-md tpl:border tpl:border-[var(--tpl-danger)] tpl:bg-transparent tpl:px-4 tpl:py-2 tpl:text-[13px] tpl:font-medium tpl:text-[var(--tpl-danger)] tpl:transition-all tpl:duration-150 tpl:hover:bg-[var(--tpl-danger-light)]",
93
+ onClick: t[3] ||= (e) => _("remove")
94
+ }, v(y(E).linkDialog.removeLink), 1)) : s("", !0), l("div", I, [l("button", {
95
+ type: "button",
96
+ class: "tpl:inline-flex tpl:cursor-pointer tpl:items-center tpl:rounded-md tpl:border tpl:border-[var(--tpl-border)] tpl:bg-transparent tpl:px-4 tpl:py-2 tpl:text-[13px] tpl:font-medium tpl:text-[var(--tpl-text-muted)] tpl:transition-all tpl:duration-150 tpl:hover:bg-[var(--tpl-bg-hover)] tpl:hover:text-[var(--tpl-text)]",
97
+ onClick: t[4] ||= (e) => _("close")
98
+ }, v(y(E).linkDialog.cancel), 1), l("button", {
99
+ type: "button",
100
+ class: "tpl:inline-flex tpl:cursor-pointer tpl:items-center tpl:rounded-md tpl:border-none tpl:bg-[var(--tpl-primary)] tpl:px-4 tpl:py-2 tpl:text-[13px] tpl:font-medium tpl:transition-all tpl:duration-150 tpl:hover:bg-[var(--tpl-primary-hover)] tpl:text-[var(--tpl-bg)]",
101
+ onClick: t[5] ||= (e) => _("insert")
102
+ }, v(r.isEditingLink ? y(E).linkDialog.updateLink : y(E).linkDialog.insertLink), 1)])])
103
+ ], 512)], 12, D)) : s("", !0)]));
104
+ }
105
+ }), R = {
106
+ key: 0,
107
+ class: "tpl-text-editable tpl:min-h-[1.5em] tpl:rounded tpl:border tpl:border-dashed tpl:border-[var(--tpl-primary)] tpl:p-2"
108
+ }, z = { class: "tpl:animate-pulse tpl:text-[var(--tpl-text-dim)]" }, B = {
109
+ key: 1,
110
+ class: "tpl-text-editable tpl:min-h-[1.5em] tpl:rounded tpl:border tpl:border-dashed tpl:p-2 tpl:text-center tpl:text-xs tpl:border-[var(--tpl-danger)] tpl:text-[var(--tpl-text-muted)]"
111
+ }, V = /* @__PURE__ */ f({
112
+ __name: "RichTextEditorContent",
113
+ props: {
114
+ editor: {},
115
+ editorContent: {},
116
+ isLoading: { type: Boolean },
117
+ initError: {}
118
+ },
119
+ emits: ["retry"],
120
+ setup(e, { emit: t }) {
121
+ let r = t, { t: i } = n();
122
+ return (t, n) => e.isLoading ? (g(), c("div", R, [l("div", z, v(y(i).errors.editorLoading), 1)])) : e.initError ? (g(), c("div", B, [u(v(y(i).errors.editorLoadFailed) + " ", 1), l("button", {
123
+ class: "tpl:ml-1 tpl:cursor-pointer tpl:border-none tpl:bg-transparent tpl:p-0 tpl:underline tpl:text-[var(--tpl-primary)]",
124
+ onClick: n[0] ||= (e) => r("retry")
125
+ }, v(y(i).errors.retry), 1)])) : e.editorContent && e.editor ? (g(), o(_(e.editorContent), {
126
+ key: 2,
127
+ editor: e.editor,
128
+ class: "tpl-text-editable tpl:min-h-[1.5em] tpl:rounded tpl:border tpl:border-dashed tpl:border-[var(--tpl-primary)] tpl:p-2"
129
+ }, null, 8, ["editor"])) : s("", !0);
130
+ }
131
+ });
132
+ //#endregion
133
+ export { w as a, T as i, L as n, E as r, V as t };
@@ -0,0 +1,122 @@
1
+ import "./useEditorCore-DVp5qmtC.js";
2
+ import { f as e, y as t } from "./keys-8B5MFafK.js";
3
+ import { t as n } from "./useI18n-DzH4KXDk.js";
4
+ import { t as r } from "./loader-circle-BTQQxC3l.js";
5
+ import { t as i } from "./TplModal-LT3FXlgs.js";
6
+ import { Fragment as a, computed as o, createBlock as s, createCommentVNode as c, createElementBlock as l, createElementVNode as u, createTextVNode as d, createVNode as f, defineComponent as p, inject as m, normalizeClass as h, normalizeStyle as g, openBlock as _, ref as v, renderList as y, toDisplayString as b, unref as x, vModelText as S, watch as C, withCtx as ee, withDirectives as te } from "vue";
7
+ //#region src/cloud/components/SaveModuleDialog.vue?vue&type=script&setup=true&lang.ts
8
+ var ne = ["aria-busy"], w = {
9
+ id: "tpl-save-module-title",
10
+ class: "tpl:mb-4 tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]"
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 = [
12
+ "checked",
13
+ "disabled",
14
+ "onChange"
15
+ ], M = {
16
+ key: 0,
17
+ role: "alert",
18
+ class: "tpl:mb-3 tpl:text-xs tpl:text-[var(--tpl-danger)]"
19
+ }, N = { class: "tpl:flex tpl:justify-end tpl:gap-2" }, P = ["disabled"], F = ["disabled"], I = {
20
+ key: 0,
21
+ class: "tpl:flex tpl:items-center tpl:gap-1.5"
22
+ }, L = { key: 1 }, R = /* @__PURE__ */ p({
23
+ __name: "SaveModuleDialog",
24
+ props: {
25
+ visible: { type: Boolean },
26
+ preSelectedBlockId: {}
27
+ },
28
+ emits: ["close", "saved"],
29
+ setup(p, { emit: R }) {
30
+ let z = p, B = R, { t: V } = n(), H = m(e), U = m(t), W = v(""), G = v(/* @__PURE__ */ new Set()), K = v(!1), q = v(null), J = o(() => H.content.value.blocks);
31
+ function Y(e, t) {
32
+ let n = e.type;
33
+ return `${V.blocks[n] ?? e.type} ${t + 1}`;
34
+ }
35
+ C(() => z.visible, (e) => {
36
+ e && (W.value = "", q.value = null, G.value = new Set(z.preSelectedBlockId ? [z.preSelectedBlockId] : []));
37
+ });
38
+ function X(e) {
39
+ let t = new Set(G.value);
40
+ t.has(e) ? t.delete(e) : t.add(e), G.value = t;
41
+ }
42
+ let Z = o(() => W.value.trim().length > 0 && G.value.size > 0 && !K.value);
43
+ async function Q() {
44
+ if (Z.value) {
45
+ K.value = !0, q.value = null;
46
+ try {
47
+ let e = J.value.filter((e) => G.value.has(e.id));
48
+ await U.createModule(W.value.trim(), e), B("saved"), B("close");
49
+ } catch (e) {
50
+ q.value = e.message;
51
+ } finally {
52
+ K.value = !1;
53
+ }
54
+ }
55
+ }
56
+ function $() {
57
+ K.value || B("close");
58
+ }
59
+ function re(e) {
60
+ e.key === "Enter" && !e.shiftKey && (e.preventDefault(), Q()), e.key === "Escape" && $();
61
+ }
62
+ return (e, t) => (_(), s(i, {
63
+ visible: p.visible,
64
+ onClose: $,
65
+ onKeydown: re
66
+ }, {
67
+ default: ee(() => [u("div", {
68
+ role: "dialog",
69
+ "aria-modal": "true",
70
+ "aria-busy": K.value,
71
+ "aria-labelledby": "tpl-save-module-title",
72
+ class: "tpl-scale-in tpl:mx-4 tpl:w-full tpl:max-w-sm tpl:rounded-[var(--tpl-radius-lg)] tpl:p-5",
73
+ style: {
74
+ "background-color": "var(--tpl-bg-elevated)",
75
+ "box-shadow": "var(--tpl-shadow-xl)"
76
+ }
77
+ }, [
78
+ u("h3", w, b(x(V).modules.saveAsModule), 1),
79
+ u("div", T, [u("label", E, b(x(V).modules.moduleName), 1), te(u("input", {
80
+ "onUpdate:modelValue": t[0] ||= (e) => W.value = e,
81
+ type: "text",
82
+ placeholder: x(V).modules.moduleNamePlaceholder,
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
+ disabled: K.value
85
+ }, null, 8, D), [[S, W.value]])]),
86
+ u("div", O, [u("label", k, b(x(V).modules.selectBlocks), 1), u("div", A, [(_(!0), l(a, null, y(J.value, (e, t) => (_(), l("label", {
87
+ key: e.id,
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: g({
90
+ color: "var(--tpl-text)",
91
+ backgroundColor: G.value.has(e.id) ? "var(--tpl-primary-light)" : "transparent"
92
+ })
93
+ }, [u("input", {
94
+ type: "checkbox",
95
+ checked: G.value.has(e.id),
96
+ class: "tpl:accent-[var(--tpl-primary)]",
97
+ disabled: K.value,
98
+ onChange: (t) => X(e.id)
99
+ }, null, 40, j), d(" " + b(Y(e, t)), 1)], 4))), 128))])]),
100
+ q.value ? (_(), l("p", M, b(q.value), 1)) : c("", !0),
101
+ u("div", N, [u("button", {
102
+ type: "button",
103
+ class: h(["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
+ disabled: K.value,
105
+ onClick: $
106
+ }, b(x(V).modules.cancel), 11, P), u("button", {
107
+ type: "button",
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
+ disabled: !Z.value,
110
+ onClick: Q
111
+ }, [K.value ? (_(), l("span", I, [f(x(r), {
112
+ class: "tpl:animate-spin",
113
+ size: 12,
114
+ "stroke-width": 2
115
+ }), d(" " + b(x(V).modules.saving), 1)])) : (_(), l("span", L, b(x(V).modules.save), 1))], 8, F)])
116
+ ], 8, ne)]),
117
+ _: 1
118
+ }, 8, ["visible"]));
119
+ }
120
+ });
121
+ //#endregion
122
+ export { R as default };
@@ -0,0 +1,126 @@
1
+ import "./useEditorCore-DVp5qmtC.js";
2
+ import { t as e } from "./dist-CG-vEqSU.js";
3
+ import { t } from "./useI18n-DzH4KXDk.js";
4
+ import { n } from "./_plugin-vue_export-helper-B1-bu7yR.js";
5
+ import { t as r } from "./chevron-down-DJLW2Q9Z.js";
6
+ import { t as i } from "./clock-lWIIQA3C.js";
7
+ import { t as a } from "./loader-circle-BTQQxC3l.js";
8
+ import { t as o } from "./formatRelativeTime-DX3FgqN9.js";
9
+ import { Fragment as s, Transition as c, computed as l, createCommentVNode as u, createElementBlock as d, createElementVNode as f, createVNode as p, defineComponent as m, normalizeClass as h, openBlock as g, ref as _, renderList as v, toDisplayString as y, unref as b, watch as x, withCtx as S, withModifiers as C } from "vue";
10
+ var w = n("chevron-left", [["path", {
11
+ d: "m15 18-6-6 6-6",
12
+ key: "1wnfg3"
13
+ }]]), T = n("chevron-right", [["path", {
14
+ d: "m9 18 6-6-6-6",
15
+ key: "mthhwq"
16
+ }]]), E = ["disabled", "title"], D = ["title"], O = {
17
+ key: 0,
18
+ class: "tpl-scale-in tpl:absolute tpl:top-full tpl:left-1/2 tpl:z-50 tpl:mt-2 tpl:w-72 tpl:-translate-x-1/2 tpl:overflow-hidden tpl:rounded-[var(--tpl-radius)] tpl:bg-[var(--tpl-bg-elevated)] tpl:border tpl:border-[var(--tpl-border)] tpl:shadow-[var(--tpl-shadow-lg)]",
19
+ style: {
20
+ "backdrop-filter": "blur(8px)",
21
+ "-webkit-backdrop-filter": "blur(8px)"
22
+ }
23
+ }, k = { class: "tpl:border-b tpl:px-3 tpl:py-2 tpl:text-xs tpl:font-semibold tpl:text-[var(--tpl-text)] tpl:border-[var(--tpl-border)]" }, A = {
24
+ key: 0,
25
+ class: "tpl:flex tpl:items-center tpl:justify-center tpl:py-8"
26
+ }, j = {
27
+ key: 1,
28
+ class: "tpl:px-3 tpl:py-6 tpl:text-center tpl:text-xs tpl:text-[var(--tpl-text-muted)]"
29
+ }, M = {
30
+ key: 2,
31
+ class: "tpl:max-h-64 tpl:overflow-y-auto"
32
+ }, N = ["disabled", "onClick"], P = { class: "tpl:flex tpl:flex-col tpl:gap-0.5" }, F = { class: "tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text)]" }, I = {
33
+ key: 0,
34
+ class: "tpl:rounded tpl:px-1 tpl:py-0.5 tpl:text-[10px] tpl:font-normal tpl:bg-[var(--tpl-bg-active)] tpl:text-[var(--tpl-text-muted)]"
35
+ }, L = ["disabled", "title"], R = /* @__PURE__ */ m({
36
+ __name: "SnapshotHistory",
37
+ props: {
38
+ snapshots: {},
39
+ isLoading: { type: Boolean },
40
+ isRestoring: { type: Boolean }
41
+ },
42
+ emits: ["load", "navigate"],
43
+ setup(n, { emit: m }) {
44
+ let R = n, z = m, { t: B, format: V } = t(), H = _(!1), U = _(null), W = _(-1);
45
+ x(() => R.snapshots.length, () => {
46
+ W.value = -1;
47
+ });
48
+ let G = l(() => W.value > 0 && R.snapshots.length > 0 && !R.isRestoring), K = l(() => W.value < R.snapshots.length - 1 && R.snapshots.length > 0 && !R.isRestoring);
49
+ function q() {
50
+ G.value && (W.value--, z("navigate", R.snapshots[W.value]));
51
+ }
52
+ function J() {
53
+ K.value && (W.value++, z("navigate", R.snapshots[W.value]));
54
+ }
55
+ function Y() {
56
+ H.value = !H.value, H.value && R.snapshots.length === 0 && z("load");
57
+ }
58
+ function X(e) {
59
+ let t = R.snapshots.findIndex((t) => t.id === e);
60
+ t !== -1 && (W.value = t, z("navigate", R.snapshots[t])), H.value = !1;
61
+ }
62
+ function Z(e) {
63
+ let t = o(e, B.snapshotHistory, V, 7);
64
+ return t === null ? new Date(e).toLocaleDateString(void 0, {
65
+ month: "short",
66
+ day: "numeric",
67
+ hour: "2-digit",
68
+ minute: "2-digit"
69
+ }) : t;
70
+ }
71
+ return e(U, () => {
72
+ H.value = !1;
73
+ }), (e, t) => (g(), d("div", {
74
+ ref_key: "dropdownRef",
75
+ ref: U,
76
+ class: "tpl:relative tpl:flex tpl:items-center tpl:gap-0.5"
77
+ }, [
78
+ f("button", {
79
+ class: "tpl:flex tpl:size-7 tpl:shrink-0 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-[var(--tpl-radius-sm)] tpl:border-none tpl:bg-transparent tpl:transition-colors tpl:duration-150 hover:tpl:bg-[var(--tpl-bg-hover)] disabled:tpl:cursor-not-allowed disabled:tpl:opacity-30 disabled:hover:tpl:bg-transparent tpl:text-[var(--tpl-text-muted)]",
80
+ disabled: !K.value,
81
+ title: b(B).snapshotHistory.olderSnapshot,
82
+ onClick: C(J, ["stop"])
83
+ }, [p(b(w), {
84
+ size: 14,
85
+ "stroke-width": 2
86
+ })], 8, E),
87
+ f("button", {
88
+ class: "tpl:flex tpl:h-7 tpl:shrink-0 tpl:cursor-pointer tpl:items-center tpl:gap-0.5 tpl:rounded-[var(--tpl-radius-sm)] tpl:border-none tpl:bg-transparent tpl:px-1.5 tpl:transition-colors tpl:duration-150 hover:tpl:bg-[var(--tpl-bg-hover)] tpl:text-[var(--tpl-text-muted)]",
89
+ title: b(B).snapshotHistory.tooltip,
90
+ onClick: C(Y, ["stop"])
91
+ }, [p(b(i), {
92
+ size: 16,
93
+ "stroke-width": 1.5
94
+ }), p(b(r), {
95
+ class: h(["tpl:transition-transform tpl:duration-150", { "tpl:rotate-180": H.value }]),
96
+ size: 10,
97
+ "stroke-width": 2
98
+ }, null, 8, ["class"])], 8, D),
99
+ p(c, { name: "tpl-dropdown" }, {
100
+ default: S(() => [H.value ? (g(), d("div", O, [f("div", k, y(b(B).snapshotHistory.dropdownTitle), 1), n.isLoading ? (g(), d("div", A, [p(b(a), {
101
+ class: "tpl:animate-spin tpl:text-[var(--tpl-primary)]",
102
+ size: 20,
103
+ "stroke-width": 2
104
+ })])) : n.snapshots.length === 0 ? (g(), d("div", j, y(b(B).snapshotHistory.noSnapshots), 1)) : (g(), d("div", M, [(g(!0), d(s, null, v(n.snapshots, (e) => (g(), d("button", {
105
+ key: e.id,
106
+ class: "tpl:flex tpl:w-full tpl:cursor-pointer tpl:items-center tpl:border-b tpl:border-b-[var(--tpl-border-light)] tpl:border-l-2 tpl:border-l-transparent tpl:px-3 tpl:py-2.5 tpl:text-left tpl:transition-all tpl:duration-150 last:tpl:border-b-0 hover:tpl:border-l-[var(--tpl-primary)] hover:tpl:bg-[var(--tpl-bg-hover)]",
107
+ style: { "background-color": "transparent" },
108
+ disabled: n.isRestoring,
109
+ onClick: (t) => X(e.id)
110
+ }, [f("div", P, [f("div", F, [f("span", null, y(Z(e.created_at)), 1), e.is_autosave ? (g(), d("span", I, y(b(B).snapshotHistory.auto), 1)) : u("", !0)])])], 8, N))), 128))]))])) : u("", !0)]),
111
+ _: 1
112
+ }),
113
+ f("button", {
114
+ class: "tpl:flex tpl:size-7 tpl:shrink-0 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-[var(--tpl-radius-sm)] tpl:border-none tpl:bg-transparent tpl:transition-colors tpl:duration-150 hover:tpl:bg-[var(--tpl-bg-hover)] disabled:tpl:cursor-not-allowed disabled:tpl:opacity-30 disabled:hover:tpl:bg-transparent tpl:text-[var(--tpl-text-muted)]",
115
+ disabled: !G.value,
116
+ title: b(B).snapshotHistory.newerSnapshot,
117
+ onClick: C(q, ["stop"])
118
+ }, [p(b(T), {
119
+ size: 14,
120
+ "stroke-width": 2
121
+ })], 8, L)
122
+ ], 512));
123
+ }
124
+ });
125
+ //#endregion
126
+ export { R as default };
@@ -0,0 +1,249 @@
1
+ import { b as e, f as t, h as n } from "./keys-8B5MFafK.js";
2
+ import { t as r } from "./useI18n-DzH4KXDk.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(t), G = y(e), K = y(n, []), 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 };