@templatical/editor 0.0.2 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{AiChatSidebar-XBj5Rw2l.js → AiChatSidebar-CjfhTZwo.js} +1 -1
- package/dist/{AiFeatureMenu-my1mZ9DL.js → AiFeatureMenu-K44aZa_P.js} +3 -3
- package/dist/CloudEditor-DFyuRxUV.js +926 -0
- package/dist/{CollaboratorBar-BZq_Gv38.js → CollaboratorBar-BuCEcdbB.js} +25 -21
- package/dist/{CommentsSidebar-D9oxqO6l.js → CommentsSidebar-2lcqMfIP.js} +2 -2
- package/dist/{DesignReferenceSidebar-CyHq4SWt.js → DesignReferenceSidebar-CNMu4Zrx.js} +55 -54
- package/dist/{ModuleBrowserModal-Cus2Hdwl.js → ModuleBrowserModal-CvQ0xyQf.js} +6 -6
- package/dist/{ModulePreviewCanvas-DaByXKY_.js → ModulePreviewCanvas-Be2B3Y07.js} +3 -3
- package/dist/ParagraphEditor-CcMPnbDr.js +652 -0
- package/dist/{RichTextEditorContent-BRpjJ6SV.js → RichTextEditorContent-CHJlh7HJ.js} +8 -4
- package/dist/{SaveModuleDialog-BIZBQrd8.js → SaveModuleDialog-BaaeH5Xm.js} +5 -5
- package/dist/{SnapshotHistory-Ds1-QNbx.js → SnapshotHistory-BPfjiuu1.js} +2 -2
- package/dist/{TemplateScoringPanel-C8XSk_Ys.js → TemplateScoringPanel-D58A23Vq.js} +3 -3
- package/dist/{TestEmailModal-CCVfaFgV.js → TestEmailModal-DIAlB3e_.js} +3 -3
- package/dist/{TitleEditor-V4qaEULF.js → TitleEditor-D9DPjQkX.js} +7 -7
- package/dist/{TplModal-LT3FXlgs.js → TplModal-CmTSvCY-.js} +2 -2
- package/dist/{blockTypeIcons-BujoY5Dl.js → blockTypeIcons-D1RTWOkx.js} +1 -1
- package/dist/cdn/chunks/AiChatSidebar-CmPTbTFG.js +2 -0
- package/dist/cdn/chunks/AiFeatureMenu-lxVm1RjH.js +59 -0
- package/dist/cdn/chunks/AiFeatureMenu-lxVm1RjH.js.map +1 -0
- package/dist/cdn/chunks/CloudEditor-Bmp5IlWi.js +900 -0
- package/dist/cdn/chunks/CloudEditor-Bmp5IlWi.js.map +1 -0
- package/dist/cdn/chunks/CollaboratorBar-D2PKtlOw.js +51 -0
- package/dist/cdn/chunks/CollaboratorBar-D2PKtlOw.js.map +1 -0
- package/dist/cdn/chunks/CommentsSidebar-BOelj4Ca.js +2 -0
- package/dist/cdn/chunks/DesignReferenceSidebar-Bf6rg0A7.js +2 -0
- package/dist/cdn/chunks/ModuleBrowserModal-CxDXzkKS.js +195 -0
- package/dist/cdn/chunks/ModuleBrowserModal-CxDXzkKS.js.map +1 -0
- package/dist/cdn/chunks/ModulePreviewCanvas-DEfHampA.js +107 -0
- package/dist/cdn/chunks/ModulePreviewCanvas-DEfHampA.js.map +1 -0
- package/dist/cdn/chunks/ParagraphEditor-DHdu6lb3.js +503 -0
- package/dist/cdn/chunks/ParagraphEditor-DHdu6lb3.js.map +1 -0
- package/dist/cdn/chunks/RichTextEditorContent-DWUzizsC.js +106 -0
- package/dist/cdn/chunks/RichTextEditorContent-DWUzizsC.js.map +1 -0
- package/dist/cdn/chunks/SaveModuleDialog-DVna2xUl.js +119 -0
- package/dist/cdn/chunks/SaveModuleDialog-DVna2xUl.js.map +1 -0
- package/dist/cdn/chunks/SnapshotHistory-BFF2SsTN.js +2 -0
- package/dist/cdn/chunks/TemplateScoringPanel-gi8wc_m7.js +2 -0
- package/dist/cdn/chunks/TestEmailModal-Qtd6aC-6.js +2 -0
- package/dist/cdn/chunks/TitleEditor-DDf_OcHS.js +166 -0
- package/dist/cdn/chunks/TitleEditor-DDf_OcHS.js.map +1 -0
- package/dist/cdn/chunks/_rolldown_dynamic_import_helper-DMEI4TQ3.js +9 -0
- package/dist/cdn/chunks/blockTypeIcons-BnobReQm.js +22 -0
- package/dist/cdn/chunks/blockTypeIcons-BnobReQm.js.map +1 -0
- package/dist/cdn/chunks/de-BB3dgVOc.js +700 -0
- package/dist/cdn/chunks/de-BB3dgVOc.js.map +1 -0
- package/dist/cdn/chunks/de-BvYD17KT.js +89 -0
- package/dist/cdn/chunks/de-BvYD17KT.js.map +1 -0
- package/dist/cdn/chunks/dist-B6AUkMyh.js +2 -0
- package/dist/cdn/chunks/dist-B878xb_62.js +457 -0
- package/dist/cdn/chunks/dist-B878xb_62.js.map +1 -0
- package/dist/cdn/chunks/dist-Bf1Op9A1.js +2 -0
- package/dist/cdn/chunks/dist-BkETaOfw.js +2 -0
- package/dist/cdn/chunks/dist-CJcMnY7o.js +2 -0
- package/dist/cdn/chunks/dist-CWsl6S1K.js +2 -0
- package/dist/cdn/chunks/dist-CllLxIMQ.js +2 -0
- package/dist/cdn/chunks/dist-Cs0wFwdw.js +2 -0
- package/dist/cdn/chunks/dist-DLWHlekl.js +2 -0
- package/dist/cdn/chunks/dist-DS3_HVpX.js +2 -0
- package/dist/cdn/chunks/dist-DTXopj1a.js +2 -0
- package/dist/cdn/chunks/dist-DnwLoNLm.js +2 -0
- package/dist/cdn/chunks/draggable-BQNU47zu.js +11544 -0
- package/dist/cdn/chunks/{draggable-ClUwYCFL.js.map → draggable-BQNU47zu.js.map} +1 -1
- package/dist/cdn/chunks/emojiData-BVEJHcNH.js +19 -0
- package/dist/cdn/chunks/{emojiData-6fVLNqeH.js.map → emojiData-BVEJHcNH.js.map} +1 -1
- package/dist/cdn/chunks/en-CpotcOPr.js +89 -0
- package/dist/cdn/chunks/en-CpotcOPr.js.map +1 -0
- package/dist/cdn/chunks/en-DeDcpnoS.js +700 -0
- package/dist/cdn/chunks/en-DeDcpnoS.js.map +1 -0
- package/dist/cdn/chunks/extensions-B_kcV0tK.js +419 -0
- package/dist/cdn/chunks/{extensions-BfjbWqOx.js.map → extensions-B_kcV0tK.js.map} +1 -1
- package/dist/cdn/chunks/features-ofOGnSC0.js +6700 -0
- package/dist/cdn/chunks/features-ofOGnSC0.js.map +1 -0
- package/dist/cdn/chunks/icons-bIb7PBOE.js +653 -0
- package/dist/cdn/chunks/icons-bIb7PBOE.js.map +1 -0
- package/dist/cdn/chunks/liquid.browser-C1VIYISn.js +3272 -0
- package/dist/cdn/chunks/liquid.browser-C1VIYISn.js.map +1 -0
- package/dist/cdn/chunks/media-library-BIYzV2Y2.js +6005 -0
- package/dist/cdn/chunks/media-library-BIYzV2Y2.js.map +1 -0
- package/dist/cdn/chunks/pusher-DJPhQnE8.js +2505 -0
- package/dist/cdn/chunks/pusher-DJPhQnE8.js.map +1 -0
- package/dist/cdn/chunks/readableTextColor-Cd_cgWO_.js +32 -0
- package/dist/cdn/chunks/readableTextColor-Cd_cgWO_.js.map +1 -0
- package/dist/cdn/chunks/rolldown-runtime-DPITmOBR.js +20 -0
- package/dist/cdn/chunks/src-BuW9oYtm.js +494 -0
- package/dist/cdn/chunks/src-BuW9oYtm.js.map +1 -0
- package/dist/cdn/chunks/styleConstants-1KwsBMxJ.js +57 -0
- package/dist/cdn/chunks/{styleConstants-UTJ94gco.js.map → styleConstants-1KwsBMxJ.js.map} +1 -1
- package/dist/cdn/chunks/styles-DQFExz-T.js +3222 -0
- package/dist/cdn/chunks/styles-DQFExz-T.js.map +1 -0
- package/dist/cdn/chunks/tiptap-DplY-S-k.js +14208 -0
- package/dist/cdn/chunks/{tiptap-Cya4P9CN.js.map → tiptap-DplY-S-k.js.map} +1 -1
- package/dist/cdn/editor.css +2 -1
- package/dist/cdn/editor.js +260 -1
- package/dist/cdn/editor.js.map +1 -1
- package/dist/{de-B4Ob4vCo.js → de-D7TLGIPA.js} +20 -4
- package/dist/{dist-DNjZKe2Z.js → dist-BkIys9zn.js} +1 -1
- package/dist/{en-YXsspZJG.js → en-DvtiEMwP.js} +20 -4
- package/dist/{extensions-BA4NshZQ.js → extensions-DEjfEFhD.js} +3 -3
- package/dist/keys-C0MQRs8d.js +10 -0
- package/dist/readableTextColor-LDlmVEUv.js +30 -0
- package/dist/{styleConstants-CgtFM9hQ.js → styleConstants-D4SOZGBV.js} +53 -2
- package/dist/{styles-hQgJKM4i.js → styles-CgLaxDfu.js} +1091 -1069
- package/dist/templatical-editor.css +1 -1
- package/dist/templatical-editor.js +113 -89
- package/dist/templatical-editor.umd.cjs +59 -59
- package/dist/{useEditorCore-DVp5qmtC.js → useEditorCore-CjwRMl7K.js} +1185 -1043
- package/dist/{useI18n-DzH4KXDk.js → useI18n-D6m7ZUgY.js} +2 -2
- package/dist/{useMergeTag-D9zQVE-e.js → useMergeTag-BZ3X0bNr.js} +2 -2
- package/package.json +2 -2
- package/dist/CloudEditor-BVjgKwq3.js +0 -940
- package/dist/ParagraphEditor-BSyk5B6S.js +0 -670
- package/dist/cdn/chunks/ParagraphEditor-BkJQO-ZW.js +0 -3
- package/dist/cdn/chunks/ParagraphEditor-BkJQO-ZW.js.map +0 -1
- package/dist/cdn/chunks/RichTextEditorContent-UGQorJm_.js +0 -2
- package/dist/cdn/chunks/RichTextEditorContent-UGQorJm_.js.map +0 -1
- package/dist/cdn/chunks/TitleEditor-CC3Adjai.js +0 -3
- package/dist/cdn/chunks/TitleEditor-CC3Adjai.js.map +0 -1
- package/dist/cdn/chunks/dist-0UheN8rK.js +0 -1
- package/dist/cdn/chunks/dist-55mmbGQ9.js +0 -1
- package/dist/cdn/chunks/dist-B31mxKyP.js +0 -1
- package/dist/cdn/chunks/dist-B5JI9nIg.js +0 -1
- package/dist/cdn/chunks/dist-B93vLKhU.js +0 -1
- package/dist/cdn/chunks/dist-BDt3FJvj.js +0 -1
- package/dist/cdn/chunks/dist-BJRuFHmi.js +0 -1
- package/dist/cdn/chunks/dist-BKSzrf0L.js +0 -1
- package/dist/cdn/chunks/dist-BL8c5gYQ.js +0 -1
- package/dist/cdn/chunks/dist-CYThWMP5.js +0 -1
- package/dist/cdn/chunks/dist-DxZbPJYt.js +0 -1
- package/dist/cdn/chunks/draggable-ClUwYCFL.js +0 -17
- package/dist/cdn/chunks/emojiData-6fVLNqeH.js +0 -2
- package/dist/cdn/chunks/extensions-BfjbWqOx.js +0 -2
- package/dist/cdn/chunks/icons-vmLJTaJk.js +0 -2
- package/dist/cdn/chunks/icons-vmLJTaJk.js.map +0 -1
- package/dist/cdn/chunks/rolldown-runtime-BakkzWXw.js +0 -1
- package/dist/cdn/chunks/styleConstants-UTJ94gco.js +0 -2
- package/dist/cdn/chunks/tiptap-Cya4P9CN.js +0 -145
- package/dist/cdn/chunks/useEditorCore-DRhPKq_z.js +0 -2
- package/dist/cdn/chunks/useEditorCore-DRhPKq_z.js.map +0 -1
- package/dist/cdn/chunks/useMergeTag-CBSlcqnk.js +0 -2
- package/dist/cdn/chunks/useMergeTag-CBSlcqnk.js.map +0 -1
- package/dist/i18n-ikyi28RU.js +0 -23
- package/dist/keys-8B5MFafK.js +0 -4
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import "./useEditorCore-
|
|
2
|
-
import {
|
|
3
|
-
import { t as n } from "./useI18n-
|
|
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
4
|
import { t as r } from "./loader-circle-BTQQxC3l.js";
|
|
5
|
-
import { t as i } from "./TplModal-
|
|
5
|
+
import { t as i } from "./TplModal-CmTSvCY-.js";
|
|
6
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
7
|
//#region src/cloud/components/SaveModuleDialog.vue?vue&type=script&setup=true&lang.ts
|
|
8
8
|
var ne = ["aria-busy"], w = {
|
|
@@ -27,7 +27,7 @@ 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(
|
|
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);
|
|
31
31
|
function Y(e, t) {
|
|
32
32
|
let n = e.type;
|
|
33
33
|
return `${V.blocks[n] ?? e.type} ${t + 1}`;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import "./useEditorCore-
|
|
1
|
+
import "./useEditorCore-CjwRMl7K.js";
|
|
2
2
|
import { t as e } from "./dist-CG-vEqSU.js";
|
|
3
|
-
import { t } from "./useI18n-
|
|
3
|
+
import { t } from "./useI18n-D6m7ZUgY.js";
|
|
4
4
|
import { n } from "./_plugin-vue_export-helper-B1-bu7yR.js";
|
|
5
5
|
import { t as r } from "./chevron-down-DJLW2Q9Z.js";
|
|
6
6
|
import { t as i } from "./clock-lWIIQA3C.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as r } from "./useI18n-
|
|
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
3
|
import { n as i, t as a } from "./_plugin-vue_export-helper-B1-bu7yR.js";
|
|
4
4
|
import { t as ee } from "./chevron-down-DJLW2Q9Z.js";
|
|
5
5
|
import { t as o } from "./circle-alert-E2vYPs5r.js";
|
|
@@ -71,7 +71,7 @@ var de = i("shield-x", [
|
|
|
71
71
|
props: { visible: { type: Boolean } },
|
|
72
72
|
emits: ["close"],
|
|
73
73
|
setup(i, { emit: a }) {
|
|
74
|
-
let v = i, H = a, { t: U } = r(), W = y(
|
|
74
|
+
let v = i, H = a, { t: U } = r(), W = y(e), G = y(n), K = y(t, []), q = ce({
|
|
75
75
|
spam: !0,
|
|
76
76
|
readability: !0,
|
|
77
77
|
accessibility: !0,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import "./useEditorCore-
|
|
2
|
-
import { t as e } from "./useI18n-
|
|
1
|
+
import "./useEditorCore-CjwRMl7K.js";
|
|
2
|
+
import { t as e } from "./useI18n-D6m7ZUgY.js";
|
|
3
3
|
import { t } from "./loader-circle-BTQQxC3l.js";
|
|
4
|
-
import { t as n } from "./TplModal-
|
|
4
|
+
import { t as n } from "./TplModal-CmTSvCY-.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,7 +1,7 @@
|
|
|
1
|
-
import { b as e } from "./useEditorCore-
|
|
2
|
-
import {
|
|
3
|
-
import { t as r } from "./useI18n-
|
|
4
|
-
import { a as i, i as a, n as o, r as s, t as c } from "./RichTextEditorContent-
|
|
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
5
|
import { t as l } from "./loader-circle-BTQQxC3l.js";
|
|
6
6
|
import { t as u } from "./scan-line-7lZPfOdm.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";
|
|
@@ -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(
|
|
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({
|
|
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-
|
|
30
|
+
import("./dist-BkIys9zn.js").then((e) => e.r),
|
|
31
31
|
import("./dist-DysAFIPy.js"),
|
|
32
32
|
import("./dist-Bu7veieH.js"),
|
|
33
|
-
import("./extensions-
|
|
33
|
+
import("./extensions-DEjfEFhD.js")
|
|
34
34
|
]);
|
|
35
35
|
return {
|
|
36
36
|
TiptapEditor: n,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { w as e } from "./useEditorCore-
|
|
2
|
-
import {
|
|
1
|
+
import { w as e } from "./useEditorCore-CjwRMl7K.js";
|
|
2
|
+
import { w as t } from "./keys-C0MQRs8d.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({
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { D as e, E as t, M as n, O as r, k as i } from "./useEditorCore-
|
|
1
|
+
import { D as e, E as t, M as n, O as r, k as i } from "./useEditorCore-CjwRMl7K.js";
|
|
2
2
|
import { n as a } from "./_plugin-vue_export-helper-B1-bu7yR.js";
|
|
3
3
|
var o = a("columns-3", [
|
|
4
4
|
["rect", {
|
|
@@ -0,0 +1,59 @@
|
|
|
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";
|
|
3
|
+
//#region src/cloud/components/AiFeatureMenu.vue?vue&type=script&setup=true&lang.ts
|
|
4
|
+
var v = {
|
|
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)]",
|
|
6
|
+
style: {
|
|
7
|
+
"backdrop-filter": "blur(8px)",
|
|
8
|
+
"-webkit-backdrop-filter": "blur(8px)"
|
|
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({
|
|
11
|
+
__name: "AiFeatureMenu",
|
|
12
|
+
props: { activeFeature: {} },
|
|
13
|
+
emits: ["select"],
|
|
14
|
+
setup(i, { emit: f }) {
|
|
15
|
+
let C = f, { t: w } = p(), T = e(g), E = {
|
|
16
|
+
"ai-chat": "chat",
|
|
17
|
+
"design-reference": "designToTemplate",
|
|
18
|
+
scoring: "scoring"
|
|
19
|
+
}, D = [
|
|
20
|
+
{
|
|
21
|
+
key: "ai-chat",
|
|
22
|
+
icon: m
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
key: "design-reference",
|
|
26
|
+
icon: h
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
key: "scoring",
|
|
30
|
+
icon: _
|
|
31
|
+
}
|
|
32
|
+
], O = d(() => D.filter((e) => T.isFeatureEnabled(E[e.key])));
|
|
33
|
+
function k(e) {
|
|
34
|
+
return e === "ai-chat" ? w.aiMenu.aiAssistant : e === "design-reference" ? w.aiMenu.designToTemplate : w.aiMenu.templateScore;
|
|
35
|
+
}
|
|
36
|
+
function A(e) {
|
|
37
|
+
return e === "ai-chat" ? w.aiMenu.aiAssistantDesc : e === "design-reference" ? w.aiMenu.designToTemplateDesc : w.aiMenu.templateScoreDesc;
|
|
38
|
+
}
|
|
39
|
+
return (e, d) => (n(), a("div", v, [(n(!0), a(s, null, t(O.value, (e) => (n(), a("button", {
|
|
40
|
+
key: e.key,
|
|
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" }),
|
|
43
|
+
onClick: (t) => C("select", e.key)
|
|
44
|
+
}, [u("div", {
|
|
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)"
|
|
49
|
+
})
|
|
50
|
+
}, [(n(), c(r(e.icon), {
|
|
51
|
+
size: 15,
|
|
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))]));
|
|
54
|
+
}
|
|
55
|
+
}), [["__scopeId", "data-v-7980235a"]]);
|
|
56
|
+
//#endregion
|
|
57
|
+
export { C as default };
|
|
58
|
+
|
|
59
|
+
//# sourceMappingURL=AiFeatureMenu-lxVm1RjH.js.map
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|