@templatical/editor 0.0.4 → 0.0.6

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 (163) hide show
  1. package/dist/AiChatSidebar-CNhSl_ty.js +228 -0
  2. package/dist/{AiFeatureMenu-K44aZa_P.js → AiFeatureMenu-BFVsjUJY.js} +23 -23
  3. package/dist/CloudEditor-Bz5Xkxej.js +1082 -0
  4. package/dist/{CollaboratorBar-BuCEcdbB.js → CollaboratorBar-D2Gu5Xj2.js} +3 -3
  5. package/dist/{CommentsSidebar-2lcqMfIP.js → CommentsSidebar-CTeEAZTj.js} +131 -131
  6. package/dist/{DesignReferenceSidebar-CNMu4Zrx.js → DesignReferenceSidebar-u2tKSQK0.js} +52 -52
  7. package/dist/{LoadingTrack-vK8W2PJf.js → LoadingTrack--aUassFH.js} +1 -1
  8. package/dist/{ModuleBrowserModal-CvQ0xyQf.js → ModuleBrowserModal-DNxODPlX.js} +58 -58
  9. package/dist/{ModulePreviewCanvas-Be2B3Y07.js → ModulePreviewCanvas-DnGe1Y-2.js} +32 -32
  10. package/dist/ParagraphEditor-CYrzYJO5.js +688 -0
  11. package/dist/{RichTextEditorContent-CHJlh7HJ.js → RichTextEditorContent-BeqlWlWB.js} +2 -2
  12. package/dist/{SaveModuleDialog-BaaeH5Xm.js → SaveModuleDialog-Kde6X13X.js} +25 -25
  13. package/dist/{SnapshotHistory-BPfjiuu1.js → SnapshotHistory-B3EfIcLW.js} +7 -7
  14. package/dist/TemplateScoringPanel-D2vCRGgx.js +254 -0
  15. package/dist/{TestEmailModal-DIAlB3e_.js → TestEmailModal-Egk0DFDf.js} +3 -3
  16. package/dist/{TitleEditor-D9DPjQkX.js → TitleEditor-DwUpo4gF.js} +11 -11
  17. package/dist/{TplModal-CmTSvCY-.js → TplModal-BCruYWks.js} +4 -4
  18. package/dist/{_plugin-vue_export-helper-B1-bu7yR.js → _plugin-vue_export-helper-5TQrnOhO.js} +2 -2
  19. package/dist/{blockTypeIcons-D1RTWOkx.js → blockTypeIcons-rW4BUUNC.js} +2 -2
  20. package/dist/cdn/chunks/{AiFeatureMenu-lxVm1RjH.js → AiFeatureMenu-Dcbshcfu.js} +16 -16
  21. package/dist/cdn/chunks/AiFeatureMenu-Dcbshcfu.js.map +1 -0
  22. package/dist/cdn/chunks/CloudEditor-Bca3RyBW.js +1056 -0
  23. package/dist/cdn/chunks/CloudEditor-Bca3RyBW.js.map +1 -0
  24. package/dist/cdn/chunks/{CollaboratorBar-D2PKtlOw.js → CollaboratorBar-sToKJfHi.js} +4 -4
  25. package/dist/cdn/chunks/{CollaboratorBar-D2PKtlOw.js.map → CollaboratorBar-sToKJfHi.js.map} +1 -1
  26. package/dist/cdn/chunks/{ModuleBrowserModal-CxDXzkKS.js → ModuleBrowserModal-BNhwXbWw.js} +52 -52
  27. package/dist/cdn/chunks/ModuleBrowserModal-BNhwXbWw.js.map +1 -0
  28. package/dist/cdn/chunks/{ModulePreviewCanvas-DEfHampA.js → ModulePreviewCanvas-DylUylPU.js} +3 -3
  29. package/dist/cdn/chunks/{ModulePreviewCanvas-DEfHampA.js.map → ModulePreviewCanvas-DylUylPU.js.map} +1 -1
  30. package/dist/cdn/chunks/ParagraphEditor-BBw90y_p.js +539 -0
  31. package/dist/cdn/chunks/ParagraphEditor-BBw90y_p.js.map +1 -0
  32. package/dist/cdn/chunks/{RichTextEditorContent-DWUzizsC.js → RichTextEditorContent-DvyIO3nR.js} +5 -5
  33. package/dist/cdn/chunks/{RichTextEditorContent-DWUzizsC.js.map → RichTextEditorContent-DvyIO3nR.js.map} +1 -1
  34. package/dist/cdn/chunks/{SaveModuleDialog-DVna2xUl.js → SaveModuleDialog-DvbSHvhF.js} +24 -24
  35. package/dist/cdn/chunks/SaveModuleDialog-DvbSHvhF.js.map +1 -0
  36. package/dist/cdn/chunks/{TitleEditor-DDf_OcHS.js → TitleEditor-tS3mgoVr.js} +10 -10
  37. package/dist/cdn/chunks/{TitleEditor-DDf_OcHS.js.map → TitleEditor-tS3mgoVr.js.map} +1 -1
  38. package/dist/cdn/chunks/{blockTypeIcons-BnobReQm.js → blockTypeIcons-DbnbyEQE.js} +3 -3
  39. package/dist/cdn/chunks/{blockTypeIcons-BnobReQm.js.map → blockTypeIcons-DbnbyEQE.js.map} +1 -1
  40. package/dist/cdn/chunks/{de-BvYD17KT.js → de-CgUR_S5I.js} +1 -1
  41. package/dist/cdn/chunks/{de-BvYD17KT.js.map → de-CgUR_S5I.js.map} +1 -1
  42. package/dist/cdn/chunks/{de-BB3dgVOc.js → de-D8oDPhBD.js} +1 -1
  43. package/dist/cdn/chunks/de-D8oDPhBD.js.map +1 -0
  44. package/dist/cdn/chunks/{dist-B878xb_62.js → dist-BUmN5e4r.js} +15 -12
  45. package/dist/cdn/chunks/dist-BUmN5e4r.js.map +1 -0
  46. package/dist/cdn/chunks/{draggable-BQNU47zu.js → draggable-m78lz0gI.js} +1591 -1563
  47. package/dist/cdn/chunks/draggable-m78lz0gI.js.map +1 -0
  48. package/dist/cdn/chunks/{emojiData-BVEJHcNH.js → emojiData-CNNgvDqx.js} +1 -1
  49. package/dist/cdn/chunks/{emojiData-BVEJHcNH.js.map → emojiData-CNNgvDqx.js.map} +1 -1
  50. package/dist/cdn/chunks/{en-CpotcOPr.js → en-BBmfBDqY.js} +1 -1
  51. package/dist/cdn/chunks/{en-CpotcOPr.js.map → en-BBmfBDqY.js.map} +1 -1
  52. package/dist/cdn/chunks/{en-DeDcpnoS.js → en-HseRPPeK.js} +1 -1
  53. package/dist/cdn/chunks/en-HseRPPeK.js.map +1 -0
  54. package/dist/cdn/chunks/{extensions-B_kcV0tK.js → extensions-ClpY3m0W.js} +31 -31
  55. package/dist/cdn/chunks/{extensions-B_kcV0tK.js.map → extensions-ClpY3m0W.js.map} +1 -1
  56. package/dist/cdn/chunks/{features-ofOGnSC0.js → features-B5dGxWLi.js} +1645 -1608
  57. package/dist/cdn/chunks/features-B5dGxWLi.js.map +1 -0
  58. package/dist/cdn/chunks/{icons-bIb7PBOE.js → icons-hflTyPmb.js} +8 -8
  59. package/dist/cdn/chunks/icons-hflTyPmb.js.map +1 -0
  60. package/dist/cdn/chunks/{liquid.browser-C1VIYISn.js → liquid.browser-BxyRVCKv.js} +24 -17
  61. package/dist/cdn/chunks/liquid.browser-BxyRVCKv.js.map +1 -0
  62. package/dist/cdn/chunks/{media-library-BIYzV2Y2.js → media-library-Dgy-V-JA.js} +547 -543
  63. package/dist/cdn/chunks/{media-library-BIYzV2Y2.js.map → media-library-Dgy-V-JA.js.map} +1 -1
  64. package/dist/cdn/chunks/{pusher-DJPhQnE8.js → pusher-D-m2WSdL.js} +10 -7
  65. package/dist/cdn/chunks/pusher-D-m2WSdL.js.map +1 -0
  66. package/dist/cdn/chunks/readableTextColor-Cd_cgWO_.js.map +1 -1
  67. package/dist/cdn/chunks/{rolldown-runtime-DPITmOBR.js → rolldown-runtime-BNuo_Jkg.js} +1 -1
  68. package/dist/cdn/chunks/{src-BuW9oYtm.js → src-TDwMmqm0.js} +7 -7
  69. package/dist/cdn/chunks/{src-BuW9oYtm.js.map → src-TDwMmqm0.js.map} +1 -1
  70. package/dist/cdn/chunks/{styleConstants-1KwsBMxJ.js → styleConstants-DFe3I4Op.js} +6 -6
  71. package/dist/cdn/chunks/{styleConstants-1KwsBMxJ.js.map → styleConstants-DFe3I4Op.js.map} +1 -1
  72. package/dist/cdn/chunks/{styles-DQFExz-T.js → styles-hCOCOR6K.js} +1229 -1101
  73. package/dist/cdn/chunks/styles-hCOCOR6K.js.map +1 -0
  74. package/dist/cdn/chunks/{tiptap-DplY-S-k.js → tiptap-C28NLMX8.js} +1531 -1309
  75. package/dist/cdn/chunks/tiptap-C28NLMX8.js.map +1 -0
  76. package/dist/cdn/editor.css +1 -1
  77. package/dist/cdn/editor.js +112 -141
  78. package/dist/cdn/editor.js.map +1 -1
  79. package/dist/{check-B7kDuZmP.js → check-B5S-C0bz.js} +1 -1
  80. package/dist/{chevron-down-DJLW2Q9Z.js → chevron-down-CjsV1T0W.js} +1 -1
  81. package/dist/{circle-alert-E2vYPs5r.js → circle-alert-CVTmJHKW.js} +1 -1
  82. package/dist/{clock-lWIIQA3C.js → clock-CAjdSHBy.js} +1 -1
  83. package/dist/{dist-CG-vEqSU.js → dist-Ac4o1O4a.js} +2 -2
  84. package/dist/{dist-BkIys9zn.js → dist-B4LTlrAn.js} +6 -6
  85. package/dist/{dist-ChAGLpWo.js → dist-BTtKPcd2.js} +2 -2
  86. package/dist/{dist-C1BIRHCQ.js → dist-CBr-qhie.js} +2 -2
  87. package/dist/{dist-DmOE-Ubp.js → dist-COOFiBFV.js} +2 -2
  88. package/dist/{dist-4LiM9FDd.js → dist-COguaIvm.js} +2 -2
  89. package/dist/{dist-Bu7veieH.js → dist-Crqkuf-w.js} +2 -2
  90. package/dist/{dist-DkypH7qG.js → dist-DEJZ9iAU.js} +2 -2
  91. package/dist/{dist-D_HQYSY-.js → dist-DHYuVJ_7.js} +2 -2
  92. package/dist/{dist-C_ymrGFi.js → dist-DJrDTuRr.js} +973 -958
  93. package/dist/{dist-DysAFIPy.js → dist-DPM-DFvh.js} +142 -114
  94. package/dist/{dist-DrvKRSU6.js → dist-DfqLGwSF.js} +2 -2
  95. package/dist/dist-DmVOCJjI.js +5 -0
  96. package/dist/{extensions-DEjfEFhD.js → extensions-C6xp_B7K.js} +3 -3
  97. package/dist/{image-up-X4xIq4ea.js → image-up-vZa1Txr-.js} +1 -1
  98. package/dist/index.d.ts +223 -0
  99. package/dist/{liquid.browser-BemTg3sZ.js → liquid.browser-C02owkex.js} +20 -15
  100. package/dist/{loader-circle-BTQQxC3l.js → loader-circle-DilFjHSk.js} +1 -1
  101. package/dist/{message-circle-Blgm6V_h.js → message-circle-Dpcnc2oa.js} +1 -1
  102. package/dist/{refresh-cw-Bb4PEeW1.js → refresh-cw-4r7rkHHX.js} +1 -1
  103. package/dist/rolldown-runtime-gEudmnaM.js +23 -0
  104. package/dist/{scan-line-7lZPfOdm.js → scan-line-684IxPQ0.js} +1 -1
  105. package/dist/{send-C0ltAQrv.js → send-ChDw64yL.js} +1 -1
  106. package/dist/{shield-check-f-qv4RKs.js → shield-check-9dhLdyST.js} +1 -1
  107. package/dist/{sparkles-KhBCGlqB.js → sparkles-Co9fkDcv.js} +1 -1
  108. package/dist/{styleConstants-D4SOZGBV.js → styleConstants-RV3eYwkD.js} +6 -6
  109. package/dist/styles-nvxFh6L6.js +3557 -0
  110. package/dist/templatical-editor.css +1 -1
  111. package/dist/templatical-editor.js +111 -141
  112. package/dist/templatical-editor.umd.cjs +63 -73
  113. package/dist/{trash-2-OwjZ-guZ.js → trash-2-CZkMtjeC.js} +1 -1
  114. package/dist/{triangle-alert-DOSRIUYZ.js → triangle-alert-Dvt51agD.js} +1 -1
  115. package/dist/{useEditorCore-CjwRMl7K.js → useEditorCore-ColJh1ST.js} +1183 -1182
  116. package/dist/{x-CGlq2XQe.js → x-CU2XZOkQ.js} +1 -1
  117. package/package.json +52 -49
  118. package/dist/AiChatSidebar-CjfhTZwo.js +0 -214
  119. package/dist/CloudEditor-DFyuRxUV.js +0 -926
  120. package/dist/ParagraphEditor-CcMPnbDr.js +0 -652
  121. package/dist/TemplateScoringPanel-D58A23Vq.js +0 -249
  122. package/dist/cdn/chunks/AiChatSidebar-CmPTbTFG.js +0 -2
  123. package/dist/cdn/chunks/AiFeatureMenu-lxVm1RjH.js.map +0 -1
  124. package/dist/cdn/chunks/CloudEditor-Bmp5IlWi.js +0 -900
  125. package/dist/cdn/chunks/CloudEditor-Bmp5IlWi.js.map +0 -1
  126. package/dist/cdn/chunks/CommentsSidebar-BOelj4Ca.js +0 -2
  127. package/dist/cdn/chunks/DesignReferenceSidebar-Bf6rg0A7.js +0 -2
  128. package/dist/cdn/chunks/ModuleBrowserModal-CxDXzkKS.js.map +0 -1
  129. package/dist/cdn/chunks/ParagraphEditor-DHdu6lb3.js +0 -503
  130. package/dist/cdn/chunks/ParagraphEditor-DHdu6lb3.js.map +0 -1
  131. package/dist/cdn/chunks/SaveModuleDialog-DVna2xUl.js.map +0 -1
  132. package/dist/cdn/chunks/SnapshotHistory-BFF2SsTN.js +0 -2
  133. package/dist/cdn/chunks/TemplateScoringPanel-gi8wc_m7.js +0 -2
  134. package/dist/cdn/chunks/TestEmailModal-Qtd6aC-6.js +0 -2
  135. package/dist/cdn/chunks/de-BB3dgVOc.js.map +0 -1
  136. package/dist/cdn/chunks/dist-B6AUkMyh.js +0 -2
  137. package/dist/cdn/chunks/dist-B878xb_62.js.map +0 -1
  138. package/dist/cdn/chunks/dist-Bf1Op9A1.js +0 -2
  139. package/dist/cdn/chunks/dist-BkETaOfw.js +0 -2
  140. package/dist/cdn/chunks/dist-CJcMnY7o.js +0 -2
  141. package/dist/cdn/chunks/dist-CWsl6S1K.js +0 -2
  142. package/dist/cdn/chunks/dist-CllLxIMQ.js +0 -2
  143. package/dist/cdn/chunks/dist-Cs0wFwdw.js +0 -2
  144. package/dist/cdn/chunks/dist-DLWHlekl.js +0 -2
  145. package/dist/cdn/chunks/dist-DS3_HVpX.js +0 -2
  146. package/dist/cdn/chunks/dist-DTXopj1a.js +0 -2
  147. package/dist/cdn/chunks/dist-DnwLoNLm.js +0 -2
  148. package/dist/cdn/chunks/draggable-BQNU47zu.js.map +0 -1
  149. package/dist/cdn/chunks/en-DeDcpnoS.js.map +0 -1
  150. package/dist/cdn/chunks/features-ofOGnSC0.js.map +0 -1
  151. package/dist/cdn/chunks/icons-bIb7PBOE.js.map +0 -1
  152. package/dist/cdn/chunks/liquid.browser-C1VIYISn.js.map +0 -1
  153. package/dist/cdn/chunks/pusher-DJPhQnE8.js.map +0 -1
  154. package/dist/cdn/chunks/styles-DQFExz-T.js.map +0 -1
  155. package/dist/cdn/chunks/tiptap-DplY-S-k.js.map +0 -1
  156. package/dist/dist-Dxnd0GRf.js +0 -5
  157. package/dist/styles-CgLaxDfu.js +0 -3428
  158. /package/dist/{de-D7TLGIPA.js → de-Dh8ON-dm.js} +0 -0
  159. /package/dist/{emojiData-BfWQS72m.js → emojiData-Qc8mH_zW.js} +0 -0
  160. /package/dist/{en-DvtiEMwP.js → en-C7IShRSD.js} +0 -0
  161. /package/dist/{formatRelativeTime-DX3FgqN9.js → formatRelativeTime-D8f6NR7i.js} +0 -0
  162. /package/dist/{readableTextColor-LDlmVEUv.js → readableTextColor-B809bF5J.js} +0 -0
  163. /package/dist/{useMergeTag-BZ3X0bNr.js → useMergeTag-CSXcnFBc.js} +0 -0
@@ -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"}