@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,11 +1,11 @@
1
- import "./useEditorCore-CjwRMl7K.js";
2
- import { b as e, f as t } from "./keys-C0MQRs8d.js";
3
- import { t as n } from "./useI18n-D6m7ZUgY.js";
4
- import { t as r } from "./loader-circle-BTQQxC3l.js";
5
- import { t as i } from "./TplModal-CmTSvCY-.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";
1
+ import { T as e, b as t, f as n } from "./keys-C0MQRs8d.js";
2
+ import { t as r } from "./useI18n-D6m7ZUgY.js";
3
+ import "./useEditorCore-ColJh1ST.js";
4
+ import { t as i } from "./loader-circle-DilFjHSk.js";
5
+ import { t as a } from "./TplModal-BCruYWks.js";
6
+ import { Fragment as o, computed as s, createBlock as c, createCommentVNode as ee, createElementBlock as l, createElementVNode as u, createTextVNode as d, createVNode as f, defineComponent as p, normalizeClass as m, normalizeStyle as h, openBlock as g, ref as _, renderList as v, toDisplayString as y, unref as b, vModelText as x, watch as S, withCtx as te, withDirectives as ne } from "vue";
7
7
  //#region src/cloud/components/SaveModuleDialog.vue?vue&type=script&setup=true&lang.ts
8
- var ne = ["aria-busy"], w = {
8
+ var C = ["aria-busy"], w = {
9
9
  id: "tpl-save-module-title",
10
10
  class: "tpl:mb-4 tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]"
11
11
  }, T = { class: "tpl:mb-3" }, E = { class: "tpl:mb-1.5 tpl:block tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-text-muted)]" }, D = ["placeholder", "disabled"], O = { class: "tpl:mb-3" }, k = { class: "tpl:mb-1.5 tpl:block tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-text-muted)]" }, A = { class: "tpl:max-h-40 tpl:space-y-1 tpl:overflow-y-auto tpl:rounded-md tpl:border tpl:p-2 tpl:border-[var(--tpl-border)]" }, j = [
@@ -27,19 +27,19 @@ var ne = ["aria-busy"], w = {
27
27
  },
28
28
  emits: ["close", "saved"],
29
29
  setup(p, { emit: R }) {
30
- let z = p, B = R, { t: V } = n(), H = m(t), U = m(e), W = v(""), G = v(/* @__PURE__ */ new Set()), K = v(!1), q = v(null), J = o(() => H.content.value.blocks);
30
+ let z = p, B = R, { t: V } = r(), H = e(n, "SaveModuleDialog"), U = e(t, "SaveModuleDialog"), W = _(""), G = _(/* @__PURE__ */ new Set()), K = _(!1), q = _(null), J = s(() => H.content.value.blocks);
31
31
  function Y(e, t) {
32
32
  let n = e.type;
33
33
  return `${V.blocks[n] ?? e.type} ${t + 1}`;
34
34
  }
35
- C(() => z.visible, (e) => {
35
+ S(() => z.visible, (e) => {
36
36
  e && (W.value = "", q.value = null, G.value = new Set(z.preSelectedBlockId ? [z.preSelectedBlockId] : []));
37
37
  });
38
38
  function X(e) {
39
39
  let t = new Set(G.value);
40
40
  t.has(e) ? t.delete(e) : t.add(e), G.value = t;
41
41
  }
42
- let Z = o(() => W.value.trim().length > 0 && G.value.size > 0 && !K.value);
42
+ let Z = s(() => W.value.trim().length > 0 && G.value.size > 0 && !K.value);
43
43
  async function Q() {
44
44
  if (Z.value) {
45
45
  K.value = !0, q.value = null;
@@ -59,12 +59,12 @@ var ne = ["aria-busy"], w = {
59
59
  function re(e) {
60
60
  e.key === "Enter" && !e.shiftKey && (e.preventDefault(), Q()), e.key === "Escape" && $();
61
61
  }
62
- return (e, t) => (_(), s(i, {
62
+ return (e, t) => (g(), c(a, {
63
63
  visible: p.visible,
64
64
  onClose: $,
65
65
  onKeydown: re
66
66
  }, {
67
- default: ee(() => [u("div", {
67
+ default: te(() => [u("div", {
68
68
  role: "dialog",
69
69
  "aria-modal": "true",
70
70
  "aria-busy": K.value,
@@ -75,18 +75,18 @@ var ne = ["aria-busy"], w = {
75
75
  "box-shadow": "var(--tpl-shadow-xl)"
76
76
  }
77
77
  }, [
78
- u("h3", w, b(x(V).modules.saveAsModule), 1),
79
- u("div", T, [u("label", E, b(x(V).modules.moduleName), 1), te(u("input", {
78
+ u("h3", w, y(b(V).modules.saveAsModule), 1),
79
+ u("div", T, [u("label", E, y(b(V).modules.moduleName), 1), ne(u("input", {
80
80
  "onUpdate:modelValue": t[0] ||= (e) => W.value = e,
81
81
  type: "text",
82
- placeholder: x(V).modules.moduleNamePlaceholder,
82
+ placeholder: b(V).modules.moduleNamePlaceholder,
83
83
  class: "tpl:h-9 tpl:w-full tpl:rounded-md tpl:border tpl:px-3 tpl:py-1 tpl:text-sm tpl:shadow-xs tpl:outline-none tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:text-[var(--tpl-text)]",
84
84
  disabled: K.value
85
- }, null, 8, D), [[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", {
85
+ }, null, 8, D), [[x, W.value]])]),
86
+ u("div", O, [u("label", k, y(b(V).modules.selectBlocks), 1), u("div", A, [(g(!0), l(o, null, v(J.value, (e, t) => (g(), l("label", {
87
87
  key: e.id,
88
88
  class: "tpl:flex tpl:cursor-pointer tpl:items-center tpl:gap-2 tpl:rounded-sm tpl:px-2 tpl:py-1.5 tpl:text-sm tpl:transition-colors tpl:duration-100",
89
- style: g({
89
+ style: h({
90
90
  color: "var(--tpl-text)",
91
91
  backgroundColor: G.value.has(e.id) ? "var(--tpl-primary-light)" : "transparent"
92
92
  })
@@ -96,24 +96,24 @@ var ne = ["aria-busy"], w = {
96
96
  class: "tpl:accent-[var(--tpl-primary)]",
97
97
  disabled: K.value,
98
98
  onChange: (t) => X(e.id)
99
- }, null, 40, j), d(" " + b(Y(e, t)), 1)], 4))), 128))])]),
100
- q.value ? (_(), l("p", M, b(q.value), 1)) : c("", !0),
99
+ }, null, 40, j), d(" " + y(Y(e, t)), 1)], 4))), 128))])]),
100
+ q.value ? (g(), l("p", M, y(q.value), 1)) : ee("", !0),
101
101
  u("div", N, [u("button", {
102
102
  type: "button",
103
- class: 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 }]),
103
+ class: m(["tpl:cursor-pointer tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-sm tpl:font-medium tpl:shadow-xs tpl:transition-all tpl:duration-150 tpl:border-[var(--tpl-border)] tpl:text-[var(--tpl-text)] tpl:bg-[var(--tpl-bg)]", { "tpl:cursor-not-allowed tpl:opacity-50": K.value }]),
104
104
  disabled: K.value,
105
105
  onClick: $
106
- }, b(x(V).modules.cancel), 11, P), u("button", {
106
+ }, y(b(V).modules.cancel), 11, P), u("button", {
107
107
  type: "button",
108
108
  class: "tpl:cursor-pointer tpl:rounded-md tpl:px-3 tpl:py-1.5 tpl:text-sm tpl:font-medium tpl:shadow-xs tpl:transition-all tpl:duration-150 tpl:hover:opacity-90 tpl:disabled:cursor-not-allowed tpl:disabled:opacity-50 tpl:bg-[var(--tpl-primary)] tpl:text-[var(--tpl-bg)]",
109
109
  disabled: !Z.value,
110
110
  onClick: Q
111
- }, [K.value ? (_(), l("span", I, [f(x(r), {
111
+ }, [K.value ? (g(), l("span", I, [f(b(i), {
112
112
  class: "tpl:animate-spin",
113
113
  size: 12,
114
114
  "stroke-width": 2
115
- }), d(" " + b(x(V).modules.saving), 1)])) : (_(), l("span", L, b(x(V).modules.save), 1))], 8, F)])
116
- ], 8, ne)]),
115
+ }), d(" " + y(b(V).modules.saving), 1)])) : (g(), l("span", L, y(b(V).modules.save), 1))], 8, F)])
116
+ ], 8, C)]),
117
117
  _: 1
118
118
  }, 8, ["visible"]));
119
119
  }
@@ -1,11 +1,11 @@
1
- import "./useEditorCore-CjwRMl7K.js";
2
- import { t as e } from "./dist-CG-vEqSU.js";
1
+ import { t as e } from "./dist-Ac4o1O4a.js";
3
2
  import { t } from "./useI18n-D6m7ZUgY.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";
3
+ import "./useEditorCore-ColJh1ST.js";
4
+ import { n } from "./_plugin-vue_export-helper-5TQrnOhO.js";
5
+ import { t as r } from "./chevron-down-CjsV1T0W.js";
6
+ import { t as i } from "./clock-CAjdSHBy.js";
7
+ import { t as a } from "./loader-circle-DilFjHSk.js";
8
+ import { t as o } from "./formatRelativeTime-D8f6NR7i.js";
9
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
10
  var w = n("chevron-left", [["path", {
11
11
  d: "m15 18-6-6 6-6",
@@ -0,0 +1,254 @@
1
+ import { T as e, f as t, g as n, x as r } from "./keys-C0MQRs8d.js";
2
+ import { t as ee } from "./useI18n-D6m7ZUgY.js";
3
+ import { n as i, t as a } from "./_plugin-vue_export-helper-5TQrnOhO.js";
4
+ import { t as te } from "./chevron-down-CjsV1T0W.js";
5
+ import { t as o } from "./circle-alert-CVTmJHKW.js";
6
+ import { n as ne, r as re, t as s } from "./refresh-cw-4r7rkHHX.js";
7
+ import { t as ie } from "./loader-circle-DilFjHSk.js";
8
+ import { t as c } from "./shield-check-9dhLdyST.js";
9
+ import { t as l } from "./sparkles-Co9fkDcv.js";
10
+ import { t as u } from "./triangle-alert-Dvt51agD.js";
11
+ import { t as d } from "./x-CU2XZOkQ.js";
12
+ import { t as f } from "./LoadingTrack--aUassFH.js";
13
+ import { Fragment as p, Transition as ae, createBlock as m, createCommentVNode as h, createElementBlock as g, createElementVNode as _, createTextVNode as v, createVNode as y, defineComponent as b, inject as x, normalizeClass as oe, normalizeStyle as S, openBlock as C, ref as se, renderList as w, resolveDynamicComponent as T, toDisplayString as E, unref as D, watch as ce, withCtx as le } from "vue";
14
+ var O = i("shield-x", [
15
+ ["path", {
16
+ d: "M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",
17
+ key: "oel41y"
18
+ }],
19
+ ["path", {
20
+ d: "m14.5 9.5-5 5",
21
+ key: "17q4r4"
22
+ }],
23
+ ["path", {
24
+ d: "m9.5 9.5 5 5",
25
+ key: "18nt4w"
26
+ }]
27
+ ]), k = i("zap", [["path", {
28
+ d: "M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",
29
+ key: "1xq2db"
30
+ }]]);
31
+ //#endregion
32
+ //#region src/cloud/utils/scoringStyles.ts
33
+ function A(e) {
34
+ return e >= 80 ? "var(--tpl-success)" : e >= 60 ? "var(--tpl-warning)" : "var(--tpl-danger)";
35
+ }
36
+ function j(e) {
37
+ return e >= 80 ? "var(--tpl-success-light)" : e >= 60 ? "var(--tpl-warning-light)" : "var(--tpl-danger-light)";
38
+ }
39
+ function M(e) {
40
+ return e === "high" ? "var(--tpl-danger)" : e === "medium" ? "var(--tpl-warning)" : "var(--tpl-text-muted)";
41
+ }
42
+ function N(e) {
43
+ return e === "high" ? "var(--tpl-danger-light)" : e === "medium" ? "var(--tpl-warning-light)" : "var(--tpl-bg-hover)";
44
+ }
45
+ //#endregion
46
+ //#region src/cloud/components/TemplateScoringPanel.vue?vue&type=script&setup=true&lang.ts
47
+ var P = {
48
+ key: 0,
49
+ class: "tpl-scoring-panel tpl:absolute tpl:top-14 tpl:right-0 tpl:bottom-0 tpl:z-panel tpl:flex tpl:w-[360px] tpl:flex-col tpl:border-l tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-elevated)]"
50
+ }, F = { class: "tpl:flex tpl:items-center tpl:justify-between tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-3" }, I = { class: "tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-primary)]" }, L = { class: "tpl:flex tpl:items-center tpl:gap-1" }, R = ["title"], z = { class: "tpl:flex-1 tpl:overflow-y-auto tpl:p-4" }, B = {
51
+ key: 0,
52
+ class: "tpl:flex tpl:h-full tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:text-center"
53
+ }, V = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, H = {
54
+ key: 1,
55
+ class: "tpl:flex tpl:h-full tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:text-center"
56
+ }, U = { class: "tpl:max-w-[240px] tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, W = {
57
+ key: 2,
58
+ class: "tpl:flex tpl:flex-col tpl:gap-4"
59
+ }, ue = { class: "tpl:text-xs tpl:font-medium tpl:uppercase tpl:tracking-wider tpl:text-[var(--tpl-text-muted)]" }, de = {
60
+ key: 0,
61
+ class: "tpl:text-xs tpl:text-[var(--tpl-text-dim)]"
62
+ }, fe = {
63
+ key: 0,
64
+ class: "tpl:flex tpl:items-start tpl:gap-2 tpl:rounded-lg tpl:px-3 tpl:py-2 tpl:text-xs tpl:bg-[var(--tpl-danger-light)] tpl:text-[var(--tpl-danger)]"
65
+ }, pe = ["onClick"], me = { class: "tpl:flex-1 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text)]" }, he = {
66
+ key: 0,
67
+ class: "tpl:text-[10px] tpl:text-[var(--tpl-text-dim)]"
68
+ }, ge = {
69
+ key: 0,
70
+ class: "tpl:border-t tpl:border-[var(--tpl-border)]"
71
+ }, _e = {
72
+ key: 0,
73
+ class: "tpl:px-3 tpl:py-3 tpl:text-center tpl:text-xs tpl:text-[var(--tpl-text-dim)]"
74
+ }, ve = { class: "tpl:flex tpl:items-start tpl:gap-2" }, ye = { class: "tpl:flex-1 tpl:min-w-0" }, be = { class: "tpl:flex tpl:items-start tpl:gap-1.5" }, xe = { class: "tpl:text-xs tpl:leading-snug tpl:text-[var(--tpl-text)]" }, Se = {
75
+ key: 0,
76
+ class: "tpl:mt-1 tpl:text-[11px] tpl:leading-snug tpl:text-[var(--tpl-text-dim)]"
77
+ }, Ce = {
78
+ key: 1,
79
+ class: "tpl:mt-2 tpl:flex tpl:justify-center"
80
+ }, we = ["disabled", "onClick"], Te = {
81
+ key: 0,
82
+ class: "tpl:mt-1.5 tpl:text-[11px] tpl:text-[var(--tpl-danger)]"
83
+ }, Ee = {
84
+ key: 3,
85
+ class: "tpl:flex tpl:h-full tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:text-center"
86
+ }, De = { class: "tpl:max-w-[240px] tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, Oe = { class: "tpl:m-0 tpl:px-4 tpl:pb-2 tpl:pt-2 tpl:text-center tpl:text-[11px] tpl:text-[var(--tpl-text-dim)]" }, G = /* @__PURE__ */ a(/* @__PURE__ */ b({
87
+ __name: "TemplateScoringPanel",
88
+ props: { visible: { type: Boolean } },
89
+ emits: ["close"],
90
+ setup(i, { emit: a }) {
91
+ let b = i, G = a, { t: K } = ee(), q = e(t, "TemplateScoringPanel"), J = e(r, "TemplateScoringPanel"), Y = x(n, []), X = se({
92
+ spam: !0,
93
+ readability: !0,
94
+ accessibility: !0,
95
+ bestPractices: !0
96
+ });
97
+ function ke(e) {
98
+ X.value[e] = !X.value[e];
99
+ }
100
+ let Z = [
101
+ "spam",
102
+ "readability",
103
+ "accessibility",
104
+ "bestPractices"
105
+ ], Ae = {
106
+ spam: O,
107
+ readability: re,
108
+ accessibility: l,
109
+ bestPractices: k
110
+ };
111
+ function Q() {
112
+ J.score(q.content.value, Y);
113
+ }
114
+ ce(() => b.visible, (e) => {
115
+ e && !J.scoringResult.value && !J.isScoring.value && Q();
116
+ });
117
+ async function je(e) {
118
+ if (!e.blockId) return;
119
+ let t = q.content.value.blocks.find((t) => t.id === e.blockId);
120
+ if (!t) return;
121
+ let n = t.content;
122
+ if (!n) return;
123
+ let r = await J.fixFinding(n, e, Y);
124
+ r && (q.updateBlock(e.blockId, { content: r }), J.removeFinding(e.category, e.id));
125
+ }
126
+ function $() {
127
+ return J.scoringResult.value ? Z.reduce((e, t) => e + (J.scoringResult.value?.categories[t]?.findings.length ?? 0), 0) : 0;
128
+ }
129
+ return (e, t) => (C(), m(ae, {
130
+ "enter-active-class": "tpl-scoring-slide-enter-active",
131
+ "enter-from-class": "tpl:translate-x-full",
132
+ "enter-to-class": "tpl:translate-x-0",
133
+ "leave-active-class": "tpl-scoring-slide-leave-active",
134
+ "leave-from-class": "tpl:translate-x-0",
135
+ "leave-to-class": "tpl:translate-x-full"
136
+ }, {
137
+ default: le(() => [i.visible ? (C(), g("div", P, [_("div", F, [_("div", I, [y(D(c), {
138
+ size: 13,
139
+ "stroke-width": 2
140
+ }), _("span", null, E(D(K).scoring.title), 1)]), _("div", L, [D(J).scoringResult.value && !D(J).isScoring.value ? (C(), g("button", {
141
+ key: 0,
142
+ class: "tpl:rounded-md tpl:p-0.5 tpl:transition-colors tpl:duration-150 tpl:text-[var(--tpl-text-muted)]",
143
+ title: D(K).scoring.rescore,
144
+ onClick: t[0] ||= (e) => Q()
145
+ }, [y(D(s), {
146
+ size: 14,
147
+ "stroke-width": 2
148
+ })], 8, R)) : h("", !0), _("button", {
149
+ class: "tpl:rounded-md tpl:p-0.5 tpl:transition-colors tpl:duration-150 tpl:text-[var(--tpl-text-muted)]",
150
+ onClick: t[1] ||= (e) => G("close")
151
+ }, [y(D(d), {
152
+ size: 14,
153
+ "stroke-width": 2
154
+ })])])]), _("div", z, [D(J).isScoring.value ? (C(), g("div", B, [_("p", V, E(D(K).scoring.scoring), 1), y(f, { class: "tpl:w-3/4" })])) : D(J).error.value && !D(J).scoringResult.value ? (C(), g("div", H, [
155
+ y(D(o), {
156
+ size: 32,
157
+ "stroke-width": 1.5,
158
+ class: "tpl:text-[var(--tpl-danger)]"
159
+ }),
160
+ _("p", U, E(D(K).scoring.error), 1),
161
+ _("button", {
162
+ class: "tpl:mt-2 tpl:inline-flex tpl:items-center tpl:gap-1.5 tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150 tpl:border-[var(--tpl-border)] tpl:text-[var(--tpl-text-muted)]",
163
+ onClick: t[2] ||= (e) => Q()
164
+ }, [y(D(s), {
165
+ size: 12,
166
+ "stroke-width": 2
167
+ }), v(" " + E(D(K).scoring.rescore), 1)])
168
+ ])) : D(J).scoringResult.value ? (C(), g("div", W, [
169
+ _("div", {
170
+ class: "tpl:flex tpl:flex-col tpl:items-center tpl:gap-2 tpl:rounded-[var(--tpl-radius)] tpl:p-5",
171
+ style: S({ backgroundColor: D(j)(D(J).scoringResult.value.score) })
172
+ }, [
173
+ _("span", {
174
+ class: "tpl:text-4xl tpl:font-bold tpl:tabular-nums",
175
+ style: S({ color: D(A)(D(J).scoringResult.value.score) })
176
+ }, E(D(J).scoringResult.value.score), 5),
177
+ _("span", ue, E(D(K).scoring.overallScore), 1),
178
+ $() > 0 ? (C(), g("span", de, E($()) + " " + E(D(K).scoring.findings), 1)) : h("", !0)
179
+ ], 4),
180
+ D(J).fixError.value ? (C(), g("div", fe, [y(D(o), {
181
+ size: 14,
182
+ "stroke-width": 2,
183
+ class: "tpl:mt-0.5 tpl:shrink-0"
184
+ }), _("span", null, E(D(K).scoring.fixError), 1)])) : h("", !0),
185
+ (C(), g(p, null, w(Z, (e) => _("div", {
186
+ key: e,
187
+ class: "tpl:overflow-hidden tpl:rounded-[var(--tpl-radius)] tpl:border tpl:border-[var(--tpl-border)]"
188
+ }, [_("button", {
189
+ class: "tpl:flex tpl:w-full tpl:cursor-pointer tpl:items-center tpl:gap-2.5 tpl:px-3 tpl:py-2.5 tpl:text-left tpl:transition-colors tpl:duration-100 tpl:bg-[var(--tpl-bg)]",
190
+ onClick: (t) => ke(e)
191
+ }, [
192
+ (C(), m(T(Ae[e]), {
193
+ size: 14,
194
+ "stroke-width": 2,
195
+ style: S({ color: D(A)(D(J).scoringResult.value.categories[e].score) })
196
+ }, null, 8, ["style"])),
197
+ _("span", me, E(D(K).scoring.categories[e]), 1),
198
+ _("span", {
199
+ class: "tpl:rounded-full tpl:px-2 tpl:py-0.5 tpl:text-xs tpl:font-semibold tpl:tabular-nums",
200
+ style: S({
201
+ color: D(A)(D(J).scoringResult.value.categories[e].score),
202
+ backgroundColor: D(j)(D(J).scoringResult.value.categories[e].score)
203
+ })
204
+ }, E(D(J).scoringResult.value.categories[e].score), 5),
205
+ D(J).scoringResult.value.categories[e].findings.length > 0 ? (C(), g("span", he, E(D(J).scoringResult.value.categories[e].findings.length), 1)) : h("", !0),
206
+ y(D(te), {
207
+ size: 12,
208
+ "stroke-width": 2,
209
+ class: oe(["tpl:transition-transform tpl:duration-200 tpl:text-[var(--tpl-text-dim)]", X.value[e] ? "tpl:rotate-0" : "tpl:-rotate-90"])
210
+ }, null, 8, ["class"])
211
+ ], 8, pe), X.value[e] ? (C(), g("div", ge, [D(J).scoringResult.value.categories[e].findings.length === 0 ? (C(), g("div", _e, E(D(K).scoring.noFindings), 1)) : h("", !0), (C(!0), g(p, null, w(D(J).scoringResult.value.categories[e].findings, (e) => (C(), g("div", {
212
+ key: e.id,
213
+ class: "tpl:border-t tpl:px-3 tpl:py-2.5 first:tpl:border-t-0 tpl:border-[var(--tpl-border-light)]"
214
+ }, [_("div", ve, [(C(), m(T(e.severity === "high" ? D(o) : e.severity === "medium" ? D(u) : D(ne)), {
215
+ size: 13,
216
+ "stroke-width": 2,
217
+ class: "tpl:mt-0.5 tpl:shrink-0",
218
+ style: S({ color: D(M)(e.severity) })
219
+ }, null, 8, ["style"])), _("div", ye, [
220
+ _("div", be, [_("span", {
221
+ class: "tpl:mt-0.5 tpl:shrink-0 tpl:rounded tpl:px-1 tpl:py-px tpl:text-[10px] tpl:font-medium tpl:leading-tight",
222
+ style: S({
223
+ color: D(M)(e.severity),
224
+ backgroundColor: D(N)(e.severity)
225
+ })
226
+ }, E(D(K).scoring.severity[e.severity]), 5), _("span", xe, E(e.message), 1)]),
227
+ e.suggestion ? (C(), g("p", Se, E(e.suggestion), 1)) : h("", !0),
228
+ e.blockId ? (C(), g("div", Ce, [_("button", {
229
+ class: "tpl-scoring-fix-btn tpl:inline-flex tpl:items-center tpl:gap-1.5 tpl:rounded tpl:border tpl:px-3 tpl:py-1.5 tpl:text-[11px] tpl:font-medium tpl:transition-all tpl:duration-150 tpl:disabled:opacity-50 tpl:border-[var(--tpl-border)] tpl:text-[var(--tpl-primary)]",
230
+ style: { "background-color": "transparent" },
231
+ disabled: D(J).fixingFindingId.value !== null,
232
+ onClick: (t) => je(e)
233
+ }, [D(J).fixingFindingId.value === e.id ? (C(), m(D(ie), {
234
+ key: 0,
235
+ class: "tpl-spinner",
236
+ size: 11,
237
+ "stroke-width": 2
238
+ })) : (C(), m(D(l), {
239
+ key: 1,
240
+ size: 11,
241
+ "stroke-width": 2
242
+ })), v(" " + E(D(J).fixingFindingId.value === e.id ? D(K).scoring.fixing : D(K).scoring.fix), 1)], 8, we), D(J).fixError.value ? (C(), g("p", Te, E(D(J).fixError.value), 1)) : h("", !0)])) : h("", !0)
243
+ ])])]))), 128))])) : h("", !0)])), 64))
244
+ ])) : (C(), g("div", Ee, [y(D(c), {
245
+ size: 32,
246
+ "stroke-width": 1.5,
247
+ class: "tpl:text-[var(--tpl-text-dim)]"
248
+ }), _("p", De, E(D(K).scoring.emptyState), 1)])), _("p", Oe, E(D(K).aiMenu.disclaimer), 1)])])) : h("", !0)]),
249
+ _: 1
250
+ }));
251
+ }
252
+ }), [["__scopeId", "data-v-bb4db637"]]);
253
+ //#endregion
254
+ export { G as default };
@@ -1,7 +1,7 @@
1
- import "./useEditorCore-CjwRMl7K.js";
2
1
  import { t as e } from "./useI18n-D6m7ZUgY.js";
3
- import { t } from "./loader-circle-BTQQxC3l.js";
4
- import { t as n } from "./TplModal-CmTSvCY-.js";
2
+ import "./useEditorCore-ColJh1ST.js";
3
+ import { t } from "./loader-circle-DilFjHSk.js";
4
+ import { t as n } from "./TplModal-BCruYWks.js";
5
5
  import { Fragment as r, createBlock as i, createCommentVNode as a, createElementBlock as o, createElementVNode as s, createTextVNode as c, createVNode as l, defineComponent as u, normalizeClass as d, openBlock as f, ref as p, renderList as m, toDisplayString as h, unref as g, vModelSelect as _, watch as v, withCtx as y, withDirectives as b } from "vue";
6
6
  //#region src/cloud/components/TestEmailModal.vue?vue&type=script&setup=true&lang.ts
7
7
  var x = ["aria-busy"], S = {
@@ -1,9 +1,9 @@
1
- import { b as e } from "./useEditorCore-CjwRMl7K.js";
2
- import { S as t, w as n } from "./keys-C0MQRs8d.js";
3
- import { t as r } from "./useI18n-D6m7ZUgY.js";
4
- import { a as i, i as a, n as o, r as s, t as c } from "./RichTextEditorContent-CHJlh7HJ.js";
5
- import { t as l } from "./loader-circle-BTQQxC3l.js";
6
- import { t as u } from "./scan-line-7lZPfOdm.js";
1
+ import { S as e, w as t } from "./keys-C0MQRs8d.js";
2
+ import { t as n } from "./useI18n-D6m7ZUgY.js";
3
+ import { b as r } from "./useEditorCore-ColJh1ST.js";
4
+ import { a as i, i as a, n as o, r as s, t as c } from "./RichTextEditorContent-BeqlWlWB.js";
5
+ import { t as l } from "./loader-circle-DilFjHSk.js";
6
+ import { t as u } from "./scan-line-684IxPQ0.js";
7
7
  import { Fragment as d, Teleport as f, createBlock as p, createCommentVNode as m, createElementBlock as h, createElementVNode as g, createTextVNode as _, createVNode as v, defineComponent as y, inject as b, isRef as x, normalizeClass as S, normalizeStyle as C, openBlock as w, toDisplayString as T, unref as E } from "vue";
8
8
  //#region src/components/blocks/TitleEditor.vue?vue&type=script&setup=true&lang.ts
9
9
  var D = { class: "tpl-text-editor-wrapper tpl:relative" }, O = ["data-tpl-theme", "aria-label"], k = ["aria-label", "title"], ee = ["aria-label", "title"], A = ["aria-label", "title"], j = {
@@ -20,17 +20,17 @@ var D = { class: "tpl-text-editor-wrapper tpl:relative" }, O = ["data-tpl-theme"
20
20
  },
21
21
  emits: ["done"],
22
22
  setup(y, { emit: P }) {
23
- let F = y, I = P, L = b(t, null), R = b(n, null), { t: z } = r(), { editor: B, EditorContent: V, isLoading: H, initError: U, retry: W, showLinkDialog: G, linkUrl: K, linkDialogRef: q, mergeTagEnabled: J, openLinkDialog: Y, insertLink: X, removeLink: Z, closeLinkDialog: Q, handleLinkKeydown: te, handleAddMergeTag: $ } = e({
23
+ let F = y, I = P, L = b(e, null), R = b(t, null), { t: z } = n(), { editor: B, EditorContent: V, isLoading: H, initError: U, retry: W, showLinkDialog: G, linkUrl: K, linkDialogRef: q, mergeTagEnabled: J, openLinkDialog: Y, insertLink: X, removeLink: Z, closeLinkDialog: Q, handleLinkKeydown: te, handleAddMergeTag: $ } = r({
24
24
  blockId: () => F.block.id,
25
25
  blockContent: () => F.block.content,
26
26
  onDone: () => I("done"),
27
27
  editorName: "TitleEditor",
28
28
  async loadExtensions({ mergeTags: e, syntax: t }) {
29
29
  let [{ Editor: n, EditorContent: r }, { default: i }, { default: a }, { MergeTagNode: o, LogicMergeTagNode: s }] = await Promise.all([
30
- import("./dist-BkIys9zn.js").then((e) => e.r),
31
- import("./dist-DysAFIPy.js"),
32
- import("./dist-Bu7veieH.js"),
33
- import("./extensions-DEjfEFhD.js")
30
+ import("./dist-B4LTlrAn.js").then((e) => e.r),
31
+ import("./dist-DPM-DFvh.js"),
32
+ import("./dist-Crqkuf-w.js"),
33
+ import("./extensions-C6xp_B7K.js")
34
34
  ]);
35
35
  return {
36
36
  TiptapEditor: n,
@@ -1,5 +1,5 @@
1
- import { w as e } from "./useEditorCore-CjwRMl7K.js";
2
- import { w as t } from "./keys-C0MQRs8d.js";
1
+ import { w as e } from "./keys-C0MQRs8d.js";
2
+ import { w as t } from "./useEditorCore-ColJh1ST.js";
3
3
  import { Teleport as n, Transition as r, computed as i, createBlock as a, createCommentVNode as o, createElementBlock as s, createElementVNode as c, createVNode as l, defineComponent as u, inject as d, openBlock as f, ref as p, renderSlot as m, unref as h, withCtx as g, withModifiers as _ } from "vue";
4
4
  //#region src/cloud/components/TplModal.vue?vue&type=script&setup=true&lang.ts
5
5
  var v = ["data-tpl-theme"], y = /* @__PURE__ */ u({
@@ -8,8 +8,8 @@ var v = ["data-tpl-theme"], y = /* @__PURE__ */ u({
8
8
  emits: ["close", "keydown"],
9
9
  setup(u, { emit: y }) {
10
10
  let b = u, x = y, S = p(null);
11
- e(S, i(() => b.visible));
12
- let C = d(t);
11
+ t(S, i(() => b.visible));
12
+ let C = d(e);
13
13
  function w(e) {
14
14
  e.key === "Escape" && x("close"), x("keydown", e);
15
15
  }
@@ -1,5 +1,5 @@
1
1
  import { computed as e, h as t, inject as n } from "vue";
2
- //#region ../../node_modules/.bun/@lucide+vue@1.7.0+cc44681ce9393ba4/node_modules/@lucide/vue/dist/esm/shared/src/utils/isEmptyString.js
2
+ //#region ../../node_modules/.bun/@lucide+vue@1.11.0+987b49219a7ab62d/node_modules/@lucide/vue/dist/esm/shared/src/utils/isEmptyString.mjs
3
3
  var r = (e) => e === "", i = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e) === t).join(" ").trim(), a = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), o = (e) => e.replace(/^([A-Z])|[\s-_]+(\w)/g, (e, t, n) => n ? n.toUpperCase() : t.toLowerCase()), s = (e) => {
4
4
  let t = o(e);
5
5
  return t.charAt(0).toUpperCase() + t.slice(1);
@@ -18,7 +18,7 @@ function u() {
18
18
  return n(l, {});
19
19
  }
20
20
  //#endregion
21
- //#region ../../node_modules/.bun/@lucide+vue@1.7.0+cc44681ce9393ba4/node_modules/@lucide/vue/dist/esm/Icon.js
21
+ //#region ../../node_modules/.bun/@lucide+vue@1.11.0+987b49219a7ab62d/node_modules/@lucide/vue/dist/esm/Icon.mjs
22
22
  var d = ({ name: n, iconNode: o, absoluteStrokeWidth: l, "absolute-stroke-width": d, strokeWidth: f, "stroke-width": p, size: m, color: h, ...g }, { slots: _ }) => {
23
23
  let { size: v, color: y, strokeWidth: b = 2, absoluteStrokeWidth: x = !1, class: S = "" } = u(), C = e(() => {
24
24
  let e = r(l) || r(d) || l === !0 || d === !0 || x === !0, t = f || p || b || c["stroke-width"];
@@ -1,5 +1,5 @@
1
- import { D as e, E as t, M as n, O as r, k as i } from "./useEditorCore-CjwRMl7K.js";
2
- import { n as a } from "./_plugin-vue_export-helper-B1-bu7yR.js";
1
+ import { D as e, E as t, M as n, O as r, k as i } from "./useEditorCore-ColJh1ST.js";
2
+ import { n as a } from "./_plugin-vue_export-helper-5TQrnOhO.js";
3
3
  var o = a("columns-3", [
4
4
  ["rect", {
5
5
  width: "18",
@@ -1,5 +1,5 @@
1
- import { E as e, F as t, N as n, R as r, S as i, _ as a, ct as o, d as s, h as c, lt as l, m as u, p as d } from "./draggable-BQNU47zu.js";
2
- import { $ as f, At as p, at as m, gt as h, jt as g, ot as _ } from "./features-ofOGnSC0.js";
1
+ import { F as e, N as t, R as n, S as r, _ as i, ct as a, d as o, h as s, lt as c, m as l, p as u } from "./draggable-m78lz0gI.js";
2
+ import { $ as d, Mt as f, Xt as p, at as m, gt as h, jt as g, ot as _ } from "./features-B5dGxWLi.js";
3
3
  //#region src/cloud/components/AiFeatureMenu.vue?vue&type=script&setup=true&lang.ts
4
4
  var v = {
5
5
  class: "tpl-ai-feature-menu tpl:w-[280px] tpl:overflow-hidden tpl:rounded-[var(--tpl-radius)] tpl:py-1 tpl:bg-[var(--tpl-bg-elevated)] tpl:border tpl:border-[var(--tpl-border)] tpl:shadow-[var(--tpl-shadow-lg)]",
@@ -7,12 +7,12 @@ var v = {
7
7
  "backdrop-filter": "blur(8px)",
8
8
  "-webkit-backdrop-filter": "blur(8px)"
9
9
  }
10
- }, y = ["onClick"], b = { class: "tpl:flex tpl:min-w-0 tpl:flex-col tpl:gap-0.5" }, x = { class: "tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-text)]" }, S = { class: "tpl:text-xs tpl:leading-snug tpl:text-[var(--tpl-text-muted)]" }, C = /* @__PURE__ */ f(/* @__PURE__ */ i({
10
+ }, y = ["onClick"], b = { class: "tpl:flex tpl:min-w-0 tpl:flex-col tpl:gap-0.5" }, x = { class: "tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-text)]" }, S = { class: "tpl:text-xs tpl:leading-snug tpl:text-[var(--tpl-text-muted)]" }, C = /* @__PURE__ */ d(/* @__PURE__ */ r({
11
11
  __name: "AiFeatureMenu",
12
12
  props: { activeFeature: {} },
13
13
  emits: ["select"],
14
- setup(i, { emit: f }) {
15
- let C = f, { t: w } = p(), T = e(g), E = {
14
+ setup(r, { emit: d }) {
15
+ let C = d, { t: w } = g(), T = p(f, "AiFeatureMenu"), E = {
16
16
  "ai-chat": "chat",
17
17
  "design-reference": "designToTemplate",
18
18
  scoring: "scoring"
@@ -29,31 +29,31 @@ var v = {
29
29
  key: "scoring",
30
30
  icon: _
31
31
  }
32
- ], O = d(() => D.filter((e) => T.isFeatureEnabled(E[e.key])));
32
+ ], O = u(() => D.filter((e) => T.isFeatureEnabled(E[e.key])));
33
33
  function k(e) {
34
34
  return e === "ai-chat" ? w.aiMenu.aiAssistant : e === "design-reference" ? w.aiMenu.designToTemplate : w.aiMenu.templateScore;
35
35
  }
36
36
  function A(e) {
37
37
  return e === "ai-chat" ? w.aiMenu.aiAssistantDesc : e === "design-reference" ? w.aiMenu.designToTemplateDesc : w.aiMenu.templateScoreDesc;
38
38
  }
39
- return (e, d) => (n(), a("div", v, [(n(!0), a(s, null, t(O.value, (e) => (n(), a("button", {
39
+ return (u, d) => (t(), i("div", v, [(t(!0), i(o, null, e(O.value, (e) => (t(), i("button", {
40
40
  key: e.key,
41
41
  class: "tpl-ai-feature-menu-item tpl:flex tpl:w-full tpl:cursor-pointer tpl:items-start tpl:gap-3 tpl:border-none tpl:px-3 tpl:py-2.5 tpl:text-left tpl:transition-colors tpl:duration-100",
42
- style: o({ backgroundColor: i.activeFeature === e.key ? "var(--tpl-primary-light)" : "transparent" }),
42
+ style: a({ backgroundColor: r.activeFeature === e.key ? "var(--tpl-primary-light)" : "transparent" }),
43
43
  onClick: (t) => C("select", e.key)
44
- }, [u("div", {
44
+ }, [l("div", {
45
45
  class: "tpl:mt-0.5 tpl:flex tpl:size-7 tpl:shrink-0 tpl:items-center tpl:justify-center tpl:rounded-[var(--tpl-radius-sm)]",
46
- style: o({
47
- backgroundColor: i.activeFeature === e.key ? "var(--tpl-primary)" : "var(--tpl-bg-active)",
48
- color: i.activeFeature === e.key ? "var(--tpl-bg)" : "var(--tpl-text-muted)"
46
+ style: a({
47
+ backgroundColor: r.activeFeature === e.key ? "var(--tpl-primary)" : "var(--tpl-bg-active)",
48
+ color: r.activeFeature === e.key ? "var(--tpl-bg)" : "var(--tpl-text-muted)"
49
49
  })
50
- }, [(n(), c(r(e.icon), {
50
+ }, [(t(), s(n(e.icon), {
51
51
  size: 15,
52
52
  "stroke-width": 2
53
- }))], 4), u("div", b, [u("span", x, l(k(e.key)), 1), u("span", S, l(A(e.key)), 1)])], 12, y))), 128))]));
53
+ }))], 4), l("div", b, [l("span", x, c(k(e.key)), 1), l("span", S, c(A(e.key)), 1)])], 12, y))), 128))]));
54
54
  }
55
- }), [["__scopeId", "data-v-7980235a"]]);
55
+ }), [["__scopeId", "data-v-638e1be2"]]);
56
56
  //#endregion
57
57
  export { C as default };
58
58
 
59
- //# sourceMappingURL=AiFeatureMenu-lxVm1RjH.js.map
59
+ //# sourceMappingURL=AiFeatureMenu-Dcbshcfu.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AiFeatureMenu-Dcbshcfu.js","names":[],"sources":["../../../src/cloud/components/AiFeatureMenu.vue","../../../src/cloud/components/AiFeatureMenu.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { useI18n } from \"../../composables\";\nimport { AI_CONFIG_KEY, requireInject } from \"../../keys\";\nimport type { AiConfig } from \"@templatical/types\";\nimport { ImageUp, ShieldCheck, Sparkles } from \"@lucide/vue\";\nimport { computed } from \"vue\";\n\nexport type AiFeature = \"ai-chat\" | \"design-reference\" | \"scoring\";\n\ndefineProps<{\n activeFeature: AiFeature | null;\n}>();\n\nconst emit = defineEmits<{\n (e: \"select\", feature: AiFeature): void;\n}>();\n\nconst { t } = useI18n();\n\nconst aiConfig = requireInject(AI_CONFIG_KEY, \"AiFeatureMenu\");\n\nconst configKeyMap: Record<AiFeature, keyof AiConfig> = {\n \"ai-chat\": \"chat\",\n \"design-reference\": \"designToTemplate\",\n scoring: \"scoring\",\n};\n\nconst allFeatures: { key: AiFeature; icon: typeof Sparkles }[] = [\n { key: \"ai-chat\", icon: Sparkles },\n { key: \"design-reference\", icon: ImageUp },\n { key: \"scoring\", icon: ShieldCheck },\n];\n\nconst features = computed(() =>\n allFeatures.filter((f) => aiConfig.isFeatureEnabled(configKeyMap[f.key])),\n);\n\nfunction getTitle(key: AiFeature): string {\n if (key === \"ai-chat\") return t.aiMenu.aiAssistant;\n if (key === \"design-reference\") return t.aiMenu.designToTemplate;\n return t.aiMenu.templateScore;\n}\n\nfunction getDescription(key: AiFeature): string {\n if (key === \"ai-chat\") return t.aiMenu.aiAssistantDesc;\n if (key === \"design-reference\") return t.aiMenu.designToTemplateDesc;\n return t.aiMenu.templateScoreDesc;\n}\n</script>\n\n<template>\n <div\n class=\"tpl-ai-feature-menu tpl:w-[280px] tpl:overflow-hidden tpl:rounded-[var(--tpl-radius)] tpl:py-1 tpl:bg-[var(--tpl-bg-elevated)] tpl:border tpl:border-[var(--tpl-border)] tpl:shadow-[var(--tpl-shadow-lg)]\"\n style=\"backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px)\"\n >\n <button\n v-for=\"feature in features\"\n :key=\"feature.key\"\n class=\"tpl-ai-feature-menu-item tpl:flex tpl:w-full tpl:cursor-pointer tpl:items-start tpl:gap-3 tpl:border-none tpl:px-3 tpl:py-2.5 tpl:text-left tpl:transition-colors tpl:duration-100\"\n :style=\"{\n backgroundColor:\n activeFeature === feature.key\n ? 'var(--tpl-primary-light)'\n : 'transparent',\n }\"\n @click=\"emit('select', feature.key)\"\n >\n <div\n class=\"tpl:mt-0.5 tpl:flex tpl:size-7 tpl:shrink-0 tpl:items-center tpl:justify-center tpl:rounded-[var(--tpl-radius-sm)]\"\n :style=\"{\n backgroundColor:\n activeFeature === feature.key\n ? 'var(--tpl-primary)'\n : 'var(--tpl-bg-active)',\n color:\n activeFeature === feature.key\n ? 'var(--tpl-bg)'\n : 'var(--tpl-text-muted)',\n }\"\n >\n <component :is=\"feature.icon\" :size=\"15\" :stroke-width=\"2\" />\n </div>\n <div class=\"tpl:flex tpl:min-w-0 tpl:flex-col tpl:gap-0.5\">\n <span class=\"tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-text)]\">\n {{ getTitle(feature.key) }}\n </span>\n <span\n class=\"tpl:text-xs tpl:leading-snug tpl:text-[var(--tpl-text-muted)]\"\n >\n {{ getDescription(feature.key) }}\n </span>\n </div>\n </button>\n </div>\n</template>\n\n<style scoped>\n.tpl-ai-feature-menu-item:hover {\n background-color: var(--tpl-bg-hover) !important;\n}\n</style>\n","<script setup lang=\"ts\">\nimport { useI18n } from \"../../composables\";\nimport { AI_CONFIG_KEY, requireInject } from \"../../keys\";\nimport type { AiConfig } from \"@templatical/types\";\nimport { ImageUp, ShieldCheck, Sparkles } from \"@lucide/vue\";\nimport { computed } from \"vue\";\n\nexport type AiFeature = \"ai-chat\" | \"design-reference\" | \"scoring\";\n\ndefineProps<{\n activeFeature: AiFeature | null;\n}>();\n\nconst emit = defineEmits<{\n (e: \"select\", feature: AiFeature): void;\n}>();\n\nconst { t } = useI18n();\n\nconst aiConfig = requireInject(AI_CONFIG_KEY, \"AiFeatureMenu\");\n\nconst configKeyMap: Record<AiFeature, keyof AiConfig> = {\n \"ai-chat\": \"chat\",\n \"design-reference\": \"designToTemplate\",\n scoring: \"scoring\",\n};\n\nconst allFeatures: { key: AiFeature; icon: typeof Sparkles }[] = [\n { key: \"ai-chat\", icon: Sparkles },\n { key: \"design-reference\", icon: ImageUp },\n { key: \"scoring\", icon: ShieldCheck },\n];\n\nconst features = computed(() =>\n allFeatures.filter((f) => aiConfig.isFeatureEnabled(configKeyMap[f.key])),\n);\n\nfunction getTitle(key: AiFeature): string {\n if (key === \"ai-chat\") return t.aiMenu.aiAssistant;\n if (key === \"design-reference\") return t.aiMenu.designToTemplate;\n return t.aiMenu.templateScore;\n}\n\nfunction getDescription(key: AiFeature): string {\n if (key === \"ai-chat\") return t.aiMenu.aiAssistantDesc;\n if (key === \"design-reference\") return t.aiMenu.designToTemplateDesc;\n return t.aiMenu.templateScoreDesc;\n}\n</script>\n\n<template>\n <div\n class=\"tpl-ai-feature-menu tpl:w-[280px] tpl:overflow-hidden tpl:rounded-[var(--tpl-radius)] tpl:py-1 tpl:bg-[var(--tpl-bg-elevated)] tpl:border tpl:border-[var(--tpl-border)] tpl:shadow-[var(--tpl-shadow-lg)]\"\n style=\"backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px)\"\n >\n <button\n v-for=\"feature in features\"\n :key=\"feature.key\"\n class=\"tpl-ai-feature-menu-item tpl:flex tpl:w-full tpl:cursor-pointer tpl:items-start tpl:gap-3 tpl:border-none tpl:px-3 tpl:py-2.5 tpl:text-left tpl:transition-colors tpl:duration-100\"\n :style=\"{\n backgroundColor:\n activeFeature === feature.key\n ? 'var(--tpl-primary-light)'\n : 'transparent',\n }\"\n @click=\"emit('select', feature.key)\"\n >\n <div\n class=\"tpl:mt-0.5 tpl:flex tpl:size-7 tpl:shrink-0 tpl:items-center tpl:justify-center tpl:rounded-[var(--tpl-radius-sm)]\"\n :style=\"{\n backgroundColor:\n activeFeature === feature.key\n ? 'var(--tpl-primary)'\n : 'var(--tpl-bg-active)',\n color:\n activeFeature === feature.key\n ? 'var(--tpl-bg)'\n : 'var(--tpl-text-muted)',\n }\"\n >\n <component :is=\"feature.icon\" :size=\"15\" :stroke-width=\"2\" />\n </div>\n <div class=\"tpl:flex tpl:min-w-0 tpl:flex-col tpl:gap-0.5\">\n <span class=\"tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-text)]\">\n {{ getTitle(feature.key) }}\n </span>\n <span\n class=\"tpl:text-xs tpl:leading-snug tpl:text-[var(--tpl-text-muted)]\"\n >\n {{ getDescription(feature.key) }}\n </span>\n </div>\n </button>\n </div>\n</template>\n\n<style scoped>\n.tpl-ai-feature-menu-item:hover {\n background-color: var(--tpl-bg-hover) !important;\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;EAaA,IAAM,IAAO,GAIP,EAAE,SAAM,GAAS,EAEjB,IAAW,EAAc,GAAe,gBAAgB,EAExD,IAAkD;GACtD,WAAW;GACX,oBAAoB;GACpB,SAAS;GACV,EAEK,IAA2D;GAC/D;IAAE,KAAK;IAAW,MAAM;IAAU;GAClC;IAAE,KAAK;IAAoB,MAAM;IAAS;GAC1C;IAAE,KAAK;IAAW,MAAM;IAAa;GACtC,EAEK,IAAW,QACf,EAAY,QAAQ,MAAM,EAAS,iBAAiB,EAAa,EAAE,KAAK,CAAC,CAC1E;EAED,SAAS,EAAS,GAAwB;AAGxC,UAFI,MAAQ,YAAkB,EAAE,OAAO,cACnC,MAAQ,qBAA2B,EAAE,OAAO,mBACzC,EAAE,OAAO;;EAGlB,SAAS,EAAe,GAAwB;AAG9C,UAFI,MAAQ,YAAkB,EAAE,OAAO,kBACnC,MAAQ,qBAA2B,EAAE,OAAO,uBACzC,EAAE,OAAO;;yBAKhB,EA0CM,OA1CN,GA0CM,EAAA,EAAA,GAAA,EAtCJ,EAqCS,GAAA,MAAA,EApCW,EAAA,QAAX,YADT,EAqCS,UAAA;GAnCN,KAAK,EAAQ;GACd,OAAM;GACL,OAAK,EAAA,EAAA,iBAAuC,EAAA,kBAAkB,EAAQ,MAAA,6BAAA,eAAA,CAAA;GAMtE,UAAK,MAAE,EAAI,UAAW,EAAQ,IAAG;MAElC,EAcM,OAAA;GAbJ,OAAM;GACL,OAAK,EAAA;qBAA2C,EAAA,kBAAkB,EAAQ,MAAA,uBAAA;WAA8G,EAAA,kBAAkB,EAAQ,MAAA,kBAAA;;YAWnN,EAA6D,EAA7C,EAAQ,KAAI,EAAA;GAAG,MAAM;GAAK,gBAAc;YAE1D,EASM,OATN,GASM,CARJ,EAEO,QAFP,GAEO,EADF,EAAS,EAAQ,IAAG,CAAA,EAAA,EAAA,EAEzB,EAIO,QAJP,GAIO,EADF,EAAe,EAAQ,IAAG,CAAA,EAAA,EAAA,CAAA,CAAA,CAAA,EAAA,IAAA,EAAA"}