@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.
- package/dist/AiChatSidebar-CNhSl_ty.js +228 -0
- package/dist/{AiFeatureMenu-K44aZa_P.js → AiFeatureMenu-BFVsjUJY.js} +23 -23
- package/dist/CloudEditor-Bz5Xkxej.js +1082 -0
- package/dist/{CollaboratorBar-BuCEcdbB.js → CollaboratorBar-D2Gu5Xj2.js} +3 -3
- package/dist/{CommentsSidebar-2lcqMfIP.js → CommentsSidebar-CTeEAZTj.js} +131 -131
- package/dist/{DesignReferenceSidebar-CNMu4Zrx.js → DesignReferenceSidebar-u2tKSQK0.js} +52 -52
- package/dist/{LoadingTrack-vK8W2PJf.js → LoadingTrack--aUassFH.js} +1 -1
- package/dist/{ModuleBrowserModal-CvQ0xyQf.js → ModuleBrowserModal-DNxODPlX.js} +58 -58
- package/dist/{ModulePreviewCanvas-Be2B3Y07.js → ModulePreviewCanvas-DnGe1Y-2.js} +32 -32
- package/dist/ParagraphEditor-CYrzYJO5.js +688 -0
- package/dist/{RichTextEditorContent-CHJlh7HJ.js → RichTextEditorContent-BeqlWlWB.js} +2 -2
- package/dist/{SaveModuleDialog-BaaeH5Xm.js → SaveModuleDialog-Kde6X13X.js} +25 -25
- package/dist/{SnapshotHistory-BPfjiuu1.js → SnapshotHistory-B3EfIcLW.js} +7 -7
- package/dist/TemplateScoringPanel-D2vCRGgx.js +254 -0
- package/dist/{TestEmailModal-DIAlB3e_.js → TestEmailModal-Egk0DFDf.js} +3 -3
- package/dist/{TitleEditor-D9DPjQkX.js → TitleEditor-DwUpo4gF.js} +11 -11
- package/dist/{TplModal-CmTSvCY-.js → TplModal-BCruYWks.js} +4 -4
- package/dist/{_plugin-vue_export-helper-B1-bu7yR.js → _plugin-vue_export-helper-5TQrnOhO.js} +2 -2
- package/dist/{blockTypeIcons-D1RTWOkx.js → blockTypeIcons-rW4BUUNC.js} +2 -2
- package/dist/cdn/chunks/{AiFeatureMenu-lxVm1RjH.js → AiFeatureMenu-Dcbshcfu.js} +16 -16
- package/dist/cdn/chunks/AiFeatureMenu-Dcbshcfu.js.map +1 -0
- package/dist/cdn/chunks/CloudEditor-Bca3RyBW.js +1056 -0
- package/dist/cdn/chunks/CloudEditor-Bca3RyBW.js.map +1 -0
- package/dist/cdn/chunks/{CollaboratorBar-D2PKtlOw.js → CollaboratorBar-sToKJfHi.js} +4 -4
- package/dist/cdn/chunks/{CollaboratorBar-D2PKtlOw.js.map → CollaboratorBar-sToKJfHi.js.map} +1 -1
- package/dist/cdn/chunks/{ModuleBrowserModal-CxDXzkKS.js → ModuleBrowserModal-BNhwXbWw.js} +52 -52
- package/dist/cdn/chunks/ModuleBrowserModal-BNhwXbWw.js.map +1 -0
- package/dist/cdn/chunks/{ModulePreviewCanvas-DEfHampA.js → ModulePreviewCanvas-DylUylPU.js} +3 -3
- package/dist/cdn/chunks/{ModulePreviewCanvas-DEfHampA.js.map → ModulePreviewCanvas-DylUylPU.js.map} +1 -1
- package/dist/cdn/chunks/ParagraphEditor-BBw90y_p.js +539 -0
- package/dist/cdn/chunks/ParagraphEditor-BBw90y_p.js.map +1 -0
- package/dist/cdn/chunks/{RichTextEditorContent-DWUzizsC.js → RichTextEditorContent-DvyIO3nR.js} +5 -5
- package/dist/cdn/chunks/{RichTextEditorContent-DWUzizsC.js.map → RichTextEditorContent-DvyIO3nR.js.map} +1 -1
- package/dist/cdn/chunks/{SaveModuleDialog-DVna2xUl.js → SaveModuleDialog-DvbSHvhF.js} +24 -24
- package/dist/cdn/chunks/SaveModuleDialog-DvbSHvhF.js.map +1 -0
- package/dist/cdn/chunks/{TitleEditor-DDf_OcHS.js → TitleEditor-tS3mgoVr.js} +10 -10
- package/dist/cdn/chunks/{TitleEditor-DDf_OcHS.js.map → TitleEditor-tS3mgoVr.js.map} +1 -1
- package/dist/cdn/chunks/{blockTypeIcons-BnobReQm.js → blockTypeIcons-DbnbyEQE.js} +3 -3
- package/dist/cdn/chunks/{blockTypeIcons-BnobReQm.js.map → blockTypeIcons-DbnbyEQE.js.map} +1 -1
- package/dist/cdn/chunks/{de-BvYD17KT.js → de-CgUR_S5I.js} +1 -1
- package/dist/cdn/chunks/{de-BvYD17KT.js.map → de-CgUR_S5I.js.map} +1 -1
- package/dist/cdn/chunks/{de-BB3dgVOc.js → de-D8oDPhBD.js} +1 -1
- package/dist/cdn/chunks/de-D8oDPhBD.js.map +1 -0
- package/dist/cdn/chunks/{dist-B878xb_62.js → dist-BUmN5e4r.js} +15 -12
- package/dist/cdn/chunks/dist-BUmN5e4r.js.map +1 -0
- package/dist/cdn/chunks/{draggable-BQNU47zu.js → draggable-m78lz0gI.js} +1591 -1563
- package/dist/cdn/chunks/draggable-m78lz0gI.js.map +1 -0
- package/dist/cdn/chunks/{emojiData-BVEJHcNH.js → emojiData-CNNgvDqx.js} +1 -1
- package/dist/cdn/chunks/{emojiData-BVEJHcNH.js.map → emojiData-CNNgvDqx.js.map} +1 -1
- package/dist/cdn/chunks/{en-CpotcOPr.js → en-BBmfBDqY.js} +1 -1
- package/dist/cdn/chunks/{en-CpotcOPr.js.map → en-BBmfBDqY.js.map} +1 -1
- package/dist/cdn/chunks/{en-DeDcpnoS.js → en-HseRPPeK.js} +1 -1
- package/dist/cdn/chunks/en-HseRPPeK.js.map +1 -0
- package/dist/cdn/chunks/{extensions-B_kcV0tK.js → extensions-ClpY3m0W.js} +31 -31
- package/dist/cdn/chunks/{extensions-B_kcV0tK.js.map → extensions-ClpY3m0W.js.map} +1 -1
- package/dist/cdn/chunks/{features-ofOGnSC0.js → features-B5dGxWLi.js} +1645 -1608
- package/dist/cdn/chunks/features-B5dGxWLi.js.map +1 -0
- package/dist/cdn/chunks/{icons-bIb7PBOE.js → icons-hflTyPmb.js} +8 -8
- package/dist/cdn/chunks/icons-hflTyPmb.js.map +1 -0
- package/dist/cdn/chunks/{liquid.browser-C1VIYISn.js → liquid.browser-BxyRVCKv.js} +24 -17
- package/dist/cdn/chunks/liquid.browser-BxyRVCKv.js.map +1 -0
- package/dist/cdn/chunks/{media-library-BIYzV2Y2.js → media-library-Dgy-V-JA.js} +547 -543
- package/dist/cdn/chunks/{media-library-BIYzV2Y2.js.map → media-library-Dgy-V-JA.js.map} +1 -1
- package/dist/cdn/chunks/{pusher-DJPhQnE8.js → pusher-D-m2WSdL.js} +10 -7
- package/dist/cdn/chunks/pusher-D-m2WSdL.js.map +1 -0
- package/dist/cdn/chunks/readableTextColor-Cd_cgWO_.js.map +1 -1
- package/dist/cdn/chunks/{rolldown-runtime-DPITmOBR.js → rolldown-runtime-BNuo_Jkg.js} +1 -1
- package/dist/cdn/chunks/{src-BuW9oYtm.js → src-TDwMmqm0.js} +7 -7
- package/dist/cdn/chunks/{src-BuW9oYtm.js.map → src-TDwMmqm0.js.map} +1 -1
- package/dist/cdn/chunks/{styleConstants-1KwsBMxJ.js → styleConstants-DFe3I4Op.js} +6 -6
- package/dist/cdn/chunks/{styleConstants-1KwsBMxJ.js.map → styleConstants-DFe3I4Op.js.map} +1 -1
- package/dist/cdn/chunks/{styles-DQFExz-T.js → styles-hCOCOR6K.js} +1229 -1101
- package/dist/cdn/chunks/styles-hCOCOR6K.js.map +1 -0
- package/dist/cdn/chunks/{tiptap-DplY-S-k.js → tiptap-C28NLMX8.js} +1531 -1309
- package/dist/cdn/chunks/tiptap-C28NLMX8.js.map +1 -0
- package/dist/cdn/editor.css +1 -1
- package/dist/cdn/editor.js +112 -141
- package/dist/cdn/editor.js.map +1 -1
- package/dist/{check-B7kDuZmP.js → check-B5S-C0bz.js} +1 -1
- package/dist/{chevron-down-DJLW2Q9Z.js → chevron-down-CjsV1T0W.js} +1 -1
- package/dist/{circle-alert-E2vYPs5r.js → circle-alert-CVTmJHKW.js} +1 -1
- package/dist/{clock-lWIIQA3C.js → clock-CAjdSHBy.js} +1 -1
- package/dist/{dist-CG-vEqSU.js → dist-Ac4o1O4a.js} +2 -2
- package/dist/{dist-BkIys9zn.js → dist-B4LTlrAn.js} +6 -6
- package/dist/{dist-ChAGLpWo.js → dist-BTtKPcd2.js} +2 -2
- package/dist/{dist-C1BIRHCQ.js → dist-CBr-qhie.js} +2 -2
- package/dist/{dist-DmOE-Ubp.js → dist-COOFiBFV.js} +2 -2
- package/dist/{dist-4LiM9FDd.js → dist-COguaIvm.js} +2 -2
- package/dist/{dist-Bu7veieH.js → dist-Crqkuf-w.js} +2 -2
- package/dist/{dist-DkypH7qG.js → dist-DEJZ9iAU.js} +2 -2
- package/dist/{dist-D_HQYSY-.js → dist-DHYuVJ_7.js} +2 -2
- package/dist/{dist-C_ymrGFi.js → dist-DJrDTuRr.js} +973 -958
- package/dist/{dist-DysAFIPy.js → dist-DPM-DFvh.js} +142 -114
- package/dist/{dist-DrvKRSU6.js → dist-DfqLGwSF.js} +2 -2
- package/dist/dist-DmVOCJjI.js +5 -0
- package/dist/{extensions-DEjfEFhD.js → extensions-C6xp_B7K.js} +3 -3
- package/dist/{image-up-X4xIq4ea.js → image-up-vZa1Txr-.js} +1 -1
- package/dist/index.d.ts +223 -0
- package/dist/{liquid.browser-BemTg3sZ.js → liquid.browser-C02owkex.js} +20 -15
- package/dist/{loader-circle-BTQQxC3l.js → loader-circle-DilFjHSk.js} +1 -1
- package/dist/{message-circle-Blgm6V_h.js → message-circle-Dpcnc2oa.js} +1 -1
- package/dist/{refresh-cw-Bb4PEeW1.js → refresh-cw-4r7rkHHX.js} +1 -1
- package/dist/rolldown-runtime-gEudmnaM.js +23 -0
- package/dist/{scan-line-7lZPfOdm.js → scan-line-684IxPQ0.js} +1 -1
- package/dist/{send-C0ltAQrv.js → send-ChDw64yL.js} +1 -1
- package/dist/{shield-check-f-qv4RKs.js → shield-check-9dhLdyST.js} +1 -1
- package/dist/{sparkles-KhBCGlqB.js → sparkles-Co9fkDcv.js} +1 -1
- package/dist/{styleConstants-D4SOZGBV.js → styleConstants-RV3eYwkD.js} +6 -6
- package/dist/styles-nvxFh6L6.js +3557 -0
- package/dist/templatical-editor.css +1 -1
- package/dist/templatical-editor.js +111 -141
- package/dist/templatical-editor.umd.cjs +63 -73
- package/dist/{trash-2-OwjZ-guZ.js → trash-2-CZkMtjeC.js} +1 -1
- package/dist/{triangle-alert-DOSRIUYZ.js → triangle-alert-Dvt51agD.js} +1 -1
- package/dist/{useEditorCore-CjwRMl7K.js → useEditorCore-ColJh1ST.js} +1183 -1182
- package/dist/{x-CGlq2XQe.js → x-CU2XZOkQ.js} +1 -1
- package/package.json +52 -49
- package/dist/AiChatSidebar-CjfhTZwo.js +0 -214
- package/dist/CloudEditor-DFyuRxUV.js +0 -926
- package/dist/ParagraphEditor-CcMPnbDr.js +0 -652
- package/dist/TemplateScoringPanel-D58A23Vq.js +0 -249
- package/dist/cdn/chunks/AiChatSidebar-CmPTbTFG.js +0 -2
- package/dist/cdn/chunks/AiFeatureMenu-lxVm1RjH.js.map +0 -1
- package/dist/cdn/chunks/CloudEditor-Bmp5IlWi.js +0 -900
- package/dist/cdn/chunks/CloudEditor-Bmp5IlWi.js.map +0 -1
- package/dist/cdn/chunks/CommentsSidebar-BOelj4Ca.js +0 -2
- package/dist/cdn/chunks/DesignReferenceSidebar-Bf6rg0A7.js +0 -2
- package/dist/cdn/chunks/ModuleBrowserModal-CxDXzkKS.js.map +0 -1
- package/dist/cdn/chunks/ParagraphEditor-DHdu6lb3.js +0 -503
- package/dist/cdn/chunks/ParagraphEditor-DHdu6lb3.js.map +0 -1
- package/dist/cdn/chunks/SaveModuleDialog-DVna2xUl.js.map +0 -1
- package/dist/cdn/chunks/SnapshotHistory-BFF2SsTN.js +0 -2
- package/dist/cdn/chunks/TemplateScoringPanel-gi8wc_m7.js +0 -2
- package/dist/cdn/chunks/TestEmailModal-Qtd6aC-6.js +0 -2
- package/dist/cdn/chunks/de-BB3dgVOc.js.map +0 -1
- package/dist/cdn/chunks/dist-B6AUkMyh.js +0 -2
- package/dist/cdn/chunks/dist-B878xb_62.js.map +0 -1
- package/dist/cdn/chunks/dist-Bf1Op9A1.js +0 -2
- package/dist/cdn/chunks/dist-BkETaOfw.js +0 -2
- package/dist/cdn/chunks/dist-CJcMnY7o.js +0 -2
- package/dist/cdn/chunks/dist-CWsl6S1K.js +0 -2
- package/dist/cdn/chunks/dist-CllLxIMQ.js +0 -2
- package/dist/cdn/chunks/dist-Cs0wFwdw.js +0 -2
- package/dist/cdn/chunks/dist-DLWHlekl.js +0 -2
- package/dist/cdn/chunks/dist-DS3_HVpX.js +0 -2
- package/dist/cdn/chunks/dist-DTXopj1a.js +0 -2
- package/dist/cdn/chunks/dist-DnwLoNLm.js +0 -2
- package/dist/cdn/chunks/draggable-BQNU47zu.js.map +0 -1
- package/dist/cdn/chunks/en-DeDcpnoS.js.map +0 -1
- package/dist/cdn/chunks/features-ofOGnSC0.js.map +0 -1
- package/dist/cdn/chunks/icons-bIb7PBOE.js.map +0 -1
- package/dist/cdn/chunks/liquid.browser-C1VIYISn.js.map +0 -1
- package/dist/cdn/chunks/pusher-DJPhQnE8.js.map +0 -1
- package/dist/cdn/chunks/styles-DQFExz-T.js.map +0 -1
- package/dist/cdn/chunks/tiptap-DplY-S-k.js.map +0 -1
- package/dist/dist-Dxnd0GRf.js +0 -5
- package/dist/styles-CgLaxDfu.js +0 -3428
- /package/dist/{de-D7TLGIPA.js → de-Dh8ON-dm.js} +0 -0
- /package/dist/{emojiData-BfWQS72m.js → emojiData-Qc8mH_zW.js} +0 -0
- /package/dist/{en-DvtiEMwP.js → en-C7IShRSD.js} +0 -0
- /package/dist/{formatRelativeTime-DX3FgqN9.js → formatRelativeTime-D8f6NR7i.js} +0 -0
- /package/dist/{readableTextColor-LDlmVEUv.js → readableTextColor-B809bF5J.js} +0 -0
- /package/dist/{useMergeTag-BZ3X0bNr.js → useMergeTag-CSXcnFBc.js} +0 -0
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import "./timeouts-CmBrLeZA.js";
|
|
2
|
-
import {
|
|
3
|
-
import { t as
|
|
4
|
-
import { n as r, t as i } from "./_plugin-vue_export-helper-
|
|
5
|
-
import { t as
|
|
6
|
-
import { t as a } from "./image-up-
|
|
7
|
-
import { t as o } from "./x-
|
|
8
|
-
import { t as
|
|
9
|
-
import { Transition as
|
|
10
|
-
import { useDesignReference as
|
|
11
|
-
var
|
|
2
|
+
import { T as e, f as t, r as n } from "./keys-C0MQRs8d.js";
|
|
3
|
+
import { t as ee } from "./useI18n-D6m7ZUgY.js";
|
|
4
|
+
import { n as r, t as i } from "./_plugin-vue_export-helper-5TQrnOhO.js";
|
|
5
|
+
import { t as te } from "./circle-alert-CVTmJHKW.js";
|
|
6
|
+
import { t as a } from "./image-up-vZa1Txr-.js";
|
|
7
|
+
import { t as o } from "./x-CU2XZOkQ.js";
|
|
8
|
+
import { t as ne } from "./LoadingTrack--aUassFH.js";
|
|
9
|
+
import { Transition as re, computed as ie, createBlock as ae, createCommentVNode as s, createElementBlock as c, createElementVNode as l, createTextVNode as u, createVNode as d, defineComponent as f, normalizeClass as oe, normalizeStyle as p, openBlock as m, ref as h, toDisplayString as g, unref as _, vModelText as v, watch as se, withCtx as ce, withDirectives as le } from "vue";
|
|
10
|
+
import { useDesignReference as ue } from "@templatical/core/cloud";
|
|
11
|
+
var de = r("file-image", [
|
|
12
12
|
["path", {
|
|
13
13
|
d: "M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",
|
|
14
14
|
key: "1oefj6"
|
|
@@ -27,7 +27,7 @@ var ue = r("file-image", [
|
|
|
27
27
|
d: "m20 17-1.296-1.296a2.41 2.41 0 0 0-3.408 0L9 22",
|
|
28
28
|
key: "wt3hpn"
|
|
29
29
|
}]
|
|
30
|
-
]),
|
|
30
|
+
]), y = r("file-text", [
|
|
31
31
|
["path", {
|
|
32
32
|
d: "M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",
|
|
33
33
|
key: "1oefj6"
|
|
@@ -48,7 +48,7 @@ var ue = r("file-image", [
|
|
|
48
48
|
d: "M16 17H8",
|
|
49
49
|
key: "z1uh3a"
|
|
50
50
|
}]
|
|
51
|
-
]),
|
|
51
|
+
]), fe = r("upload", [
|
|
52
52
|
["path", {
|
|
53
53
|
d: "M12 3v12",
|
|
54
54
|
key: "1x0j5s"
|
|
@@ -61,10 +61,10 @@ var ue = r("file-image", [
|
|
|
61
61
|
d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",
|
|
62
62
|
key: "ih7n3h"
|
|
63
63
|
}]
|
|
64
|
-
]),
|
|
64
|
+
]), pe = {
|
|
65
65
|
key: 0,
|
|
66
66
|
class: "tpl-design-sidebar 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)]"
|
|
67
|
-
},
|
|
67
|
+
}, me = { class: "tpl:flex tpl:items-center tpl:justify-between tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-3" }, he = { class: "tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-primary)]" }, b = { class: "tpl:flex-1 tpl:overflow-y-auto tpl:p-4" }, x = {
|
|
68
68
|
key: 0,
|
|
69
69
|
class: "tpl:flex tpl:h-full tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:text-center"
|
|
70
70
|
}, S = { class: "tpl:flex tpl:w-full tpl:flex-col tpl:items-center tpl:gap-3" }, C = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, w = {
|
|
@@ -90,11 +90,11 @@ var ue = r("file-image", [
|
|
|
90
90
|
},
|
|
91
91
|
emits: ["close", "apply"],
|
|
92
92
|
setup(r, { emit: i }) {
|
|
93
|
-
let f = r, z = i, { t: B } =
|
|
94
|
-
authManager:
|
|
93
|
+
let f = r, z = i, { t: B } = ee(), be = e(t, "DesignReferenceSidebar"), V = ue({
|
|
94
|
+
authManager: e(n, "DesignReferenceSidebar"),
|
|
95
95
|
getTemplateId: () => be.state.template?.id ?? null,
|
|
96
96
|
onApply: (e) => z("apply", e)
|
|
97
|
-
}), H =
|
|
97
|
+
}), H = h(null), U = h("image"), W = h(null), G = h(""), K = h(null), q = h(!1), J = h(!1), Y = ie(() => V.isGenerating.value ? !1 : W.value !== null);
|
|
98
98
|
function X(e) {
|
|
99
99
|
U.value = e, Q();
|
|
100
100
|
}
|
|
@@ -150,9 +150,9 @@ var ue = r("file-image", [
|
|
|
150
150
|
function Te() {
|
|
151
151
|
q.value = !1;
|
|
152
152
|
}
|
|
153
|
-
return
|
|
153
|
+
return se(() => f.visible, (e) => {
|
|
154
154
|
e || (q.value = !1);
|
|
155
|
-
}), (e, t) => (
|
|
155
|
+
}), (e, t) => (m(), ae(re, {
|
|
156
156
|
"enter-active-class": "tpl-design-slide-enter-active",
|
|
157
157
|
"enter-from-class": "tpl:translate-x-full",
|
|
158
158
|
"enter-to-class": "tpl:translate-x-0",
|
|
@@ -160,58 +160,58 @@ var ue = r("file-image", [
|
|
|
160
160
|
"leave-from-class": "tpl:translate-x-0",
|
|
161
161
|
"leave-to-class": "tpl:translate-x-full"
|
|
162
162
|
}, {
|
|
163
|
-
default:
|
|
163
|
+
default: ce(() => [r.visible ? (m(), c("div", pe, [l("div", me, [l("div", he, [d(_(a), {
|
|
164
164
|
size: 13,
|
|
165
165
|
"stroke-width": 2
|
|
166
|
-
}), l("span", null, _(
|
|
166
|
+
}), l("span", null, g(_(B).designReference.title), 1)]), l("button", {
|
|
167
167
|
class: "tpl:rounded-md tpl:p-0.5 tpl:transition-colors tpl:duration-150 tpl:text-[var(--tpl-text-muted)]",
|
|
168
168
|
onClick: t[0] ||= (e) => z("close")
|
|
169
|
-
}, [d(
|
|
169
|
+
}, [d(_(o), {
|
|
170
170
|
size: 14,
|
|
171
171
|
"stroke-width": 2
|
|
172
|
-
})])]), l("div",
|
|
172
|
+
})])]), l("div", b, [_(V).isGenerating.value ? (m(), c("div", x, [l("div", S, [d(ne), l("p", C, g(_(B).designReference.generating), 1)])])) : (m(), c("div", w, [
|
|
173
173
|
l("div", T, [l("button", {
|
|
174
174
|
class: "tpl:flex tpl:flex-1 tpl:items-center tpl:justify-center tpl:gap-1.5 tpl:rounded-[var(--tpl-radius-sm)] tpl:px-2 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150",
|
|
175
|
-
style:
|
|
175
|
+
style: p({
|
|
176
176
|
backgroundColor: U.value === "image" ? "var(--tpl-bg)" : "transparent",
|
|
177
177
|
color: U.value === "image" ? "var(--tpl-primary)" : "var(--tpl-text-muted)",
|
|
178
178
|
boxShadow: U.value === "image" ? "var(--tpl-shadow)" : "none"
|
|
179
179
|
}),
|
|
180
180
|
onClick: t[1] ||= (e) => X("image")
|
|
181
|
-
}, [d(
|
|
181
|
+
}, [d(_(de), {
|
|
182
182
|
size: 12,
|
|
183
183
|
"stroke-width": 2
|
|
184
|
-
}), u(" " + _(
|
|
184
|
+
}), u(" " + g(_(B).designReference.uploadImage), 1)], 4), l("button", {
|
|
185
185
|
class: "tpl:flex tpl:flex-1 tpl:items-center tpl:justify-center tpl:gap-1.5 tpl:rounded-[var(--tpl-radius-sm)] tpl:px-2 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150",
|
|
186
|
-
style:
|
|
186
|
+
style: p({
|
|
187
187
|
backgroundColor: U.value === "pdf" ? "var(--tpl-bg)" : "transparent",
|
|
188
188
|
color: U.value === "pdf" ? "var(--tpl-primary)" : "var(--tpl-text-muted)",
|
|
189
189
|
boxShadow: U.value === "pdf" ? "var(--tpl-shadow)" : "none"
|
|
190
190
|
}),
|
|
191
191
|
onClick: t[2] ||= (e) => X("pdf")
|
|
192
|
-
}, [d(
|
|
192
|
+
}, [d(_(y), {
|
|
193
193
|
size: 12,
|
|
194
194
|
"stroke-width": 2
|
|
195
|
-
}), u(" " + _(
|
|
196
|
-
l("div", null, [W.value ? (
|
|
195
|
+
}), u(" " + g(_(B).designReference.uploadPdf), 1)], 4)]),
|
|
196
|
+
l("div", null, [W.value ? (m(), c("div", E, [l("div", D, [K.value ? (m(), c("img", {
|
|
197
197
|
key: 0,
|
|
198
198
|
src: K.value,
|
|
199
199
|
alt: W.value.name,
|
|
200
200
|
class: "tpl:h-auto tpl:max-h-48 tpl:w-full tpl:object-contain"
|
|
201
|
-
}, null, 8, O)) : (
|
|
201
|
+
}, null, 8, O)) : (m(), c("div", k, [d(_(y), {
|
|
202
202
|
size: 32,
|
|
203
203
|
"stroke-width": 1.5,
|
|
204
204
|
class: "tpl:text-[var(--tpl-text-dim)]"
|
|
205
|
-
}), l("span", A,
|
|
205
|
+
}), l("span", A, g(W.value.name), 1)])), l("button", {
|
|
206
206
|
class: "tpl:absolute tpl:top-2 tpl:right-2 tpl:rounded-full tpl:p-1 tpl:transition-colors tpl:duration-150 tpl:bg-[var(--tpl-bg)] tpl:text-[var(--tpl-text-muted)] tpl:shadow-[var(--tpl-shadow)]",
|
|
207
207
|
onClick: Q
|
|
208
|
-
}, [d(
|
|
208
|
+
}, [d(_(o), {
|
|
209
209
|
size: 12,
|
|
210
210
|
"stroke-width": 2
|
|
211
|
-
})])])])) : (
|
|
211
|
+
})])])])) : (m(), c("div", {
|
|
212
212
|
key: 1,
|
|
213
213
|
class: "tpl-design-dropzone tpl:flex tpl:cursor-pointer tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded-[var(--tpl-radius)] tpl:border-2 tpl:border-dashed tpl:px-4 tpl:py-8 tpl:transition-colors tpl:duration-150",
|
|
214
|
-
style:
|
|
214
|
+
style: p({
|
|
215
215
|
borderColor: J.value ? "var(--tpl-primary)" : "var(--tpl-border-light)",
|
|
216
216
|
backgroundColor: J.value ? "var(--tpl-primary-light)" : "var(--tpl-bg)"
|
|
217
217
|
}),
|
|
@@ -220,13 +220,13 @@ var ue = r("file-image", [
|
|
|
220
220
|
onDragleave: Ce,
|
|
221
221
|
onDrop: we
|
|
222
222
|
}, [
|
|
223
|
-
d(
|
|
223
|
+
d(_(fe), {
|
|
224
224
|
size: 24,
|
|
225
225
|
"stroke-width": 1.5,
|
|
226
226
|
class: "tpl:text-[var(--tpl-text-dim)]"
|
|
227
227
|
}),
|
|
228
|
-
l("span", j, _(
|
|
229
|
-
l("span", M,
|
|
228
|
+
l("span", j, g(_(B).designReference.dropHint), 1),
|
|
229
|
+
l("span", M, g(U.value === "image" ? _(B).designReference.acceptedImages : _(B).designReference.acceptedPdf), 1)
|
|
230
230
|
], 36)), l("input", {
|
|
231
231
|
ref_key: "fileInput",
|
|
232
232
|
ref: H,
|
|
@@ -235,39 +235,39 @@ var ue = r("file-image", [
|
|
|
235
235
|
accept: U.value === "image" ? "image/png,image/jpeg,image/webp" : "application/pdf",
|
|
236
236
|
onChange: xe
|
|
237
237
|
}, null, 40, N)]),
|
|
238
|
-
l("div", P, [l("label", F, _(
|
|
238
|
+
l("div", P, [l("label", F, g(_(B).designReference.promptLabel), 1), le(l("textarea", {
|
|
239
239
|
"onUpdate:modelValue": t[4] ||= (e) => G.value = e,
|
|
240
|
-
class:
|
|
241
|
-
placeholder:
|
|
240
|
+
class: oe(["tpl:min-h-[72px] tpl:w-full tpl:resize-none tpl:rounded-[var(--tpl-radius-sm)] tpl:border tpl:px-3 tpl:py-2 tpl:font-sans tpl:text-sm tpl:outline-none tpl:transition-colors tpl:duration-150 tpl:border-[var(--tpl-border)] tpl:text-[var(--tpl-text)] tpl:bg-[var(--tpl-bg)]", ["tpl-design-prompt-input"]]),
|
|
241
|
+
placeholder: _(B).designReference.promptPlaceholder,
|
|
242
242
|
rows: "3"
|
|
243
|
-
}, null, 8, I), [[
|
|
244
|
-
q.value ? (
|
|
243
|
+
}, null, 8, I), [[v, G.value]])]),
|
|
244
|
+
q.value ? (m(), c("div", L, [l("p", R, g(_(B).designReference.replaceWarning), 1), l("div", ge, [l("button", {
|
|
245
245
|
class: "tpl:flex-1 tpl:rounded-[var(--tpl-radius-sm)] tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150 tpl:text-[var(--tpl-text-muted)] tpl:border tpl:border-[var(--tpl-border)]",
|
|
246
246
|
style: { "background-color": "transparent" },
|
|
247
247
|
onClick: Te
|
|
248
|
-
}, _(
|
|
248
|
+
}, g(_(B).designReference.replaceCancel), 1), l("button", {
|
|
249
249
|
class: "tpl:flex-1 tpl:rounded-[var(--tpl-radius-sm)] tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150 tpl:hover:opacity-90 tpl:bg-[var(--tpl-primary)] tpl:text-[var(--tpl-bg)]",
|
|
250
250
|
onClick: $
|
|
251
|
-
}, _(
|
|
252
|
-
|
|
251
|
+
}, g(_(B).designReference.replaceConfirm), 1)])])) : s("", !0),
|
|
252
|
+
_(V).error.value ? (m(), c("div", _e, [d(_(te), {
|
|
253
253
|
size: 14,
|
|
254
254
|
"stroke-width": 2,
|
|
255
255
|
class: "tpl:mt-0.5 tpl:shrink-0"
|
|
256
|
-
}), l("span", null, _(
|
|
257
|
-
q.value ? s("", !0) : (
|
|
256
|
+
}), l("span", null, g(_(B).designReference.error), 1)])) : s("", !0),
|
|
257
|
+
q.value ? s("", !0) : (m(), c("button", {
|
|
258
258
|
key: 2,
|
|
259
259
|
class: "tpl:flex tpl:w-full tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded-[var(--tpl-radius-sm)] tpl:px-4 tpl:py-2.5 tpl:text-sm tpl:font-medium 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)]",
|
|
260
260
|
disabled: !Y.value,
|
|
261
261
|
onClick: $
|
|
262
|
-
}, [d(
|
|
262
|
+
}, [d(_(a), {
|
|
263
263
|
size: 16,
|
|
264
264
|
"stroke-width": 2
|
|
265
|
-
}), u(" " + _(
|
|
266
|
-
l("p", ye, _(
|
|
265
|
+
}), u(" " + g(_(B).designReference.generate), 1)], 8, ve)),
|
|
266
|
+
l("p", ye, g(_(B).aiMenu.disclaimer), 1)
|
|
267
267
|
]))])])) : s("", !0)]),
|
|
268
268
|
_: 1
|
|
269
269
|
}));
|
|
270
270
|
}
|
|
271
|
-
}), [["__scopeId", "data-v-
|
|
271
|
+
}), [["__scopeId", "data-v-d70ec3cf"]]);
|
|
272
272
|
//#endregion
|
|
273
273
|
export { z as default };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as e } from "./_plugin-vue_export-helper-
|
|
1
|
+
import { t as e } from "./_plugin-vue_export-helper-5TQrnOhO.js";
|
|
2
2
|
import { createElementBlock as t, openBlock as n } from "vue";
|
|
3
3
|
//#region src/components/LoadingTrack.vue
|
|
4
4
|
var r = {}, i = { class: "tpl-loading-track" };
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import "./
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import { n as
|
|
5
|
-
import { n as
|
|
6
|
-
import { t as
|
|
7
|
-
import { t as
|
|
8
|
-
import { t as
|
|
9
|
-
import { Fragment as
|
|
10
|
-
var
|
|
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 { n as i } from "./_plugin-vue_export-helper-5TQrnOhO.js";
|
|
5
|
+
import { n as a, t as o } from "./blockTypeIcons-rW4BUUNC.js";
|
|
6
|
+
import { t as s } from "./trash-2-CZkMtjeC.js";
|
|
7
|
+
import { t as ee } from "./x-CU2XZOkQ.js";
|
|
8
|
+
import { t as te } from "./TplModal-BCruYWks.js";
|
|
9
|
+
import { Fragment as c, computed as l, createBlock as u, createCommentVNode as ne, createElementBlock as d, createElementVNode as f, createVNode as p, defineAsyncComponent as re, defineComponent as m, normalizeStyle as ie, openBlock as h, ref as g, renderList as _, resolveDynamicComponent as ae, toDisplayString as v, unref as y, vModelSelect as oe, vModelText as se, watch as ce, withCtx as le, withDirectives as b, withModifiers as x } from "vue";
|
|
10
|
+
var ue = i("search", [["path", {
|
|
11
11
|
d: "m21 21-4.34-4.34",
|
|
12
12
|
key: "14j7rj"
|
|
13
13
|
}], ["circle", {
|
|
@@ -15,7 +15,7 @@ var de = r("search", [["path", {
|
|
|
15
15
|
cy: "11",
|
|
16
16
|
r: "8",
|
|
17
17
|
key: "4ej97u"
|
|
18
|
-
}]]),
|
|
18
|
+
}]]), de = {
|
|
19
19
|
role: "dialog",
|
|
20
20
|
"aria-modal": "true",
|
|
21
21
|
"aria-labelledby": "tpl-module-browser-title",
|
|
@@ -25,39 +25,39 @@ var de = r("search", [["path", {
|
|
|
25
25
|
"box-shadow": "var(--tpl-shadow-xl)",
|
|
26
26
|
"max-height": "90vh"
|
|
27
27
|
}
|
|
28
|
-
},
|
|
28
|
+
}, fe = { class: "tpl:flex tpl:items-center tpl:justify-between tpl:border-b tpl:px-5 tpl:py-4 tpl:border-[var(--tpl-border)]" }, pe = {
|
|
29
29
|
id: "tpl-module-browser-title",
|
|
30
30
|
class: "tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]"
|
|
31
|
-
},
|
|
31
|
+
}, me = ["aria-label"], S = { class: "tpl:flex tpl:min-h-0 tpl:flex-1 tpl:overflow-hidden" }, C = { class: "tpl:flex tpl:w-[300px] tpl:shrink-0 tpl:flex-col tpl:overflow-hidden" }, w = { class: "tpl:px-4 tpl:pt-4 tpl:pb-3" }, T = { class: "tpl:relative" }, E = ["placeholder"], D = { class: "tpl:flex-1 tpl:overflow-y-auto tpl:px-4 tpl:pb-4" }, O = {
|
|
32
32
|
key: 0,
|
|
33
33
|
class: "tpl:flex tpl:flex-col tpl:gap-1"
|
|
34
|
-
},
|
|
34
|
+
}, k = ["aria-pressed", "onClick"], A = { class: "tpl:flex tpl:items-center tpl:gap-2" }, j = { class: "tpl:flex-1 tpl:truncate tpl:text-xs tpl:font-semibold tpl:text-[var(--tpl-text)]" }, M = { class: "tpl:shrink-0 tpl:rounded-full tpl:px-1.5 tpl:py-0.5 tpl:text-[10px] tpl:font-medium tpl:bg-[var(--tpl-bg-hover)] tpl:text-[var(--tpl-text-muted)]" }, N = { class: "tpl:mt-1 tpl:flex tpl:items-center tpl:gap-1" }, P = {
|
|
35
35
|
key: 0,
|
|
36
36
|
class: "tpl:text-[10px] tpl:text-[var(--tpl-text-dim)]"
|
|
37
|
-
},
|
|
37
|
+
}, F = ["aria-label", "onClick"], I = [
|
|
38
38
|
"aria-label",
|
|
39
39
|
"title",
|
|
40
40
|
"onClick"
|
|
41
|
-
],
|
|
41
|
+
], L = {
|
|
42
42
|
key: 1,
|
|
43
43
|
class: "tpl:flex tpl:flex-col tpl:items-center tpl:justify-center tpl:py-12"
|
|
44
|
-
},
|
|
44
|
+
}, R = { class: "tpl:mt-2 tpl:text-xs tpl:text-[var(--tpl-text-dim)]" }, z = { class: "tpl:flex tpl:flex-1 tpl:flex-col tpl:overflow-hidden tpl:border-l tpl:border-[var(--tpl-border)]" }, he = {
|
|
45
45
|
key: 0,
|
|
46
46
|
class: "tpl:flex tpl:flex-1 tpl:flex-col tpl:overflow-hidden"
|
|
47
|
-
},
|
|
47
|
+
}, ge = { class: "tpl:flex-1 tpl:overflow-y-auto tpl:p-4" }, _e = {
|
|
48
48
|
key: 1,
|
|
49
49
|
class: "tpl:flex tpl:flex-1 tpl:flex-col tpl:items-center tpl:justify-center tpl:px-4"
|
|
50
|
-
}, ve = { class: "tpl:mt-2 tpl:text-center tpl:text-xs tpl:text-[var(--tpl-text-dim)]" }, ye = { class: "tpl:flex tpl:items-center tpl:justify-between tpl:border-t tpl:px-5 tpl:py-3 tpl:border-[var(--tpl-border)]" }, be = { class: "tpl:flex tpl:items-center tpl:gap-2" }, xe = { class: "tpl:shrink-0 tpl:text-xs tpl:text-[var(--tpl-text-dim)]" }, Se = ["value"], Ce = { class: "tpl:flex tpl:gap-2" }, we = ["disabled"], B = /* @__PURE__ */
|
|
50
|
+
}, ve = { class: "tpl:mt-2 tpl:text-center tpl:text-xs tpl:text-[var(--tpl-text-dim)]" }, ye = { class: "tpl:flex tpl:items-center tpl:justify-between tpl:border-t tpl:px-5 tpl:py-3 tpl:border-[var(--tpl-border)]" }, be = { class: "tpl:flex tpl:items-center tpl:gap-2" }, xe = { class: "tpl:shrink-0 tpl:text-xs tpl:text-[var(--tpl-text-dim)]" }, Se = ["value"], Ce = { class: "tpl:flex tpl:gap-2" }, we = ["disabled"], B = /* @__PURE__ */ m({
|
|
51
51
|
__name: "ModuleBrowserModal",
|
|
52
52
|
props: { visible: { type: Boolean } },
|
|
53
53
|
emits: ["close", "insert"],
|
|
54
|
-
setup(
|
|
55
|
-
let B =
|
|
54
|
+
setup(i, { emit: m }) {
|
|
55
|
+
let B = i, V = m, Te = re(() => import("./ModulePreviewCanvas-DnGe1Y-2.js")), { t: H } = r(), U = e(t, "ModuleBrowserModal"), W = e(n, "ModuleBrowserModal"), G = g(""), K = g(null), q = g(null), J = g("end"), Y = l(() => {
|
|
56
56
|
let e = U.modules.value;
|
|
57
57
|
if (!G.value) return e;
|
|
58
58
|
let t = G.value.toLowerCase();
|
|
59
59
|
return e.filter((e) => e.name.toLowerCase().includes(t));
|
|
60
|
-
}), X =
|
|
60
|
+
}), X = l(() => K.value ? U.modules.value.find((e) => e.id === K.value) ?? null : null), Ee = l(() => {
|
|
61
61
|
let e = [{
|
|
62
62
|
value: "beginning",
|
|
63
63
|
label: H.modules.insertAtBeginning
|
|
@@ -73,13 +73,13 @@ var de = r("search", [["path", {
|
|
|
73
73
|
value: "end",
|
|
74
74
|
label: H.modules.insertAtEnd
|
|
75
75
|
}), e;
|
|
76
|
-
}), De =
|
|
76
|
+
}), De = l(() => {
|
|
77
77
|
if (J.value === "end") return;
|
|
78
78
|
if (J.value === "beginning") return 0;
|
|
79
79
|
let e = W.content.value.blocks.findIndex((e) => e.id === J.value);
|
|
80
80
|
if (e !== -1) return e + 1;
|
|
81
81
|
});
|
|
82
|
-
|
|
82
|
+
ce(() => B.visible, (e) => {
|
|
83
83
|
if (e) {
|
|
84
84
|
G.value = "", K.value = null, q.value = null;
|
|
85
85
|
let e = W.state.selectedBlockId;
|
|
@@ -88,9 +88,9 @@ var de = r("search", [["path", {
|
|
|
88
88
|
});
|
|
89
89
|
function Oe(e) {
|
|
90
90
|
let t = [], n = /* @__PURE__ */ new Set();
|
|
91
|
-
for (let r of e.content) if (!n.has(r.type) &&
|
|
91
|
+
for (let r of e.content) if (!n.has(r.type) && o[r.type] && (n.add(r.type), t.push({
|
|
92
92
|
type: r.type,
|
|
93
|
-
icon:
|
|
93
|
+
icon: o[r.type]
|
|
94
94
|
})), t.length >= 5) break;
|
|
95
95
|
return t;
|
|
96
96
|
}
|
|
@@ -114,88 +114,88 @@ var de = r("search", [["path", {
|
|
|
114
114
|
function Ae(e) {
|
|
115
115
|
e.key === "Escape" && $(), e.key === "Enter" && X.value && (e.preventDefault(), Q());
|
|
116
116
|
}
|
|
117
|
-
return (e, t) => (
|
|
118
|
-
visible:
|
|
117
|
+
return (e, t) => (h(), u(te, {
|
|
118
|
+
visible: i.visible,
|
|
119
119
|
onClose: $,
|
|
120
120
|
onKeydown: Ae
|
|
121
121
|
}, {
|
|
122
|
-
default:
|
|
123
|
-
|
|
124
|
-
"aria-label":
|
|
122
|
+
default: le(() => [f("div", de, [
|
|
123
|
+
f("div", fe, [f("h3", pe, v(y(H).modules.browse), 1), f("button", {
|
|
124
|
+
"aria-label": y(H).modules.close,
|
|
125
125
|
class: "tpl:cursor-pointer tpl:rounded-md tpl:border-none tpl:bg-transparent tpl:p-1 tpl:transition-colors tpl:duration-100 tpl:text-[var(--tpl-text-dim)]",
|
|
126
126
|
onClick: $
|
|
127
|
-
}, [
|
|
127
|
+
}, [p(y(ee), {
|
|
128
128
|
size: 16,
|
|
129
129
|
"stroke-width": 2
|
|
130
|
-
})], 8,
|
|
131
|
-
|
|
130
|
+
})], 8, me)]),
|
|
131
|
+
f("div", S, [f("div", C, [f("div", w, [f("div", T, [p(y(ue), {
|
|
132
132
|
size: 14,
|
|
133
133
|
"stroke-width": 2,
|
|
134
134
|
class: "tpl:pointer-events-none tpl:absolute tpl:left-3 tpl:top-1/2 tpl:-translate-y-1/2 tpl:text-[var(--tpl-text-dim)]"
|
|
135
|
-
}),
|
|
135
|
+
}), b(f("input", {
|
|
136
136
|
"onUpdate:modelValue": t[0] ||= (e) => G.value = e,
|
|
137
137
|
type: "text",
|
|
138
|
-
placeholder:
|
|
138
|
+
placeholder: y(H).modules.search,
|
|
139
139
|
class: "tpl:h-9 tpl:w-full tpl:rounded-md tpl:border tpl:pl-9 tpl:pr-3 tpl:text-sm tpl:outline-none tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:text-[var(--tpl-text)]"
|
|
140
|
-
}, null, 8,
|
|
140
|
+
}, null, 8, E), [[se, G.value]])])]), f("div", D, [Y.value.length > 0 ? (h(), d("div", O, [(h(!0), d(c, null, _(Y.value, (e) => (h(), d("button", {
|
|
141
141
|
key: e.id,
|
|
142
142
|
type: "button",
|
|
143
143
|
"aria-pressed": K.value === e.id,
|
|
144
144
|
class: "tpl:group/card tpl:w-full tpl:cursor-pointer tpl:rounded-[var(--tpl-radius-md)] tpl:border tpl:bg-transparent tpl:px-3 tpl:py-2 tpl:text-left tpl:transition-all tpl:duration-[120ms]",
|
|
145
|
-
style:
|
|
145
|
+
style: ie({
|
|
146
146
|
borderColor: K.value === e.id ? "var(--tpl-primary)" : "var(--tpl-border)",
|
|
147
147
|
backgroundColor: K.value === e.id ? "var(--tpl-primary-light)" : "transparent"
|
|
148
148
|
}),
|
|
149
149
|
onClick: (t) => K.value = e.id
|
|
150
|
-
}, [
|
|
151
|
-
(
|
|
150
|
+
}, [f("div", A, [f("span", j, v(e.name), 1), f("span", M, v(y(H).modules.blockCount.replace("{count}", String(e.content.length))), 1)]), f("div", N, [
|
|
151
|
+
(h(!0), d(c, null, _(Oe(e), (e) => (h(), u(ae(e.icon), {
|
|
152
152
|
key: e.type,
|
|
153
153
|
size: 14,
|
|
154
154
|
"stroke-width": 1.5,
|
|
155
155
|
class: "tpl:text-[var(--tpl-text-dim)]"
|
|
156
156
|
}))), 128)),
|
|
157
|
-
Z(e) > 0 ? (
|
|
158
|
-
q.value === e.id ? (
|
|
157
|
+
Z(e) > 0 ? (h(), d("span", P, " +" + v(Z(e)), 1)) : ne("", !0),
|
|
158
|
+
q.value === e.id ? (h(), d("button", {
|
|
159
159
|
key: 1,
|
|
160
|
-
"aria-label":
|
|
160
|
+
"aria-label": y(H).modules.deleteConfirm,
|
|
161
161
|
class: "tpl:ml-auto tpl:cursor-pointer tpl:rounded-md tpl:border tpl:px-2 tpl:py-0.5 tpl:text-[10px] tpl:font-medium tpl:transition-colors tpl:duration-100 tpl:border-[var(--tpl-danger)] tpl:text-[var(--tpl-danger)]",
|
|
162
162
|
style: { "background-color": "transparent" },
|
|
163
|
-
onClick:
|
|
164
|
-
},
|
|
163
|
+
onClick: x((t) => ke(e.id), ["stop"])
|
|
164
|
+
}, v(y(H).modules.deleteConfirm), 9, F)) : (h(), d("button", {
|
|
165
165
|
key: 2,
|
|
166
166
|
class: "tpl-module-delete-btn tpl:ml-auto tpl:cursor-pointer tpl:rounded-md tpl:border-none tpl:bg-transparent tpl:p-0.5 tpl:transition-colors tpl:duration-100 tpl:text-[var(--tpl-text-dim)]",
|
|
167
|
-
"aria-label":
|
|
168
|
-
title:
|
|
169
|
-
onClick:
|
|
170
|
-
}, [
|
|
167
|
+
"aria-label": y(H).modules.delete,
|
|
168
|
+
title: y(H).modules.delete,
|
|
169
|
+
onClick: x((t) => q.value = e.id, ["stop"])
|
|
170
|
+
}, [p(y(s), {
|
|
171
171
|
size: 12,
|
|
172
172
|
"stroke-width": 1.5
|
|
173
|
-
})], 8,
|
|
174
|
-
])], 12,
|
|
173
|
+
})], 8, I))
|
|
174
|
+
])], 12, k))), 128))])) : (h(), d("div", L, [p(y(a), {
|
|
175
175
|
size: 32,
|
|
176
176
|
"stroke-width": 1,
|
|
177
177
|
class: "tpl:text-[var(--tpl-text-dim)]"
|
|
178
|
-
}),
|
|
178
|
+
}), f("p", R, v(G.value ? y(H).modules.noModules : y(H).modules.noModulesHint), 1)]))])]), f("div", z, [X.value ? (h(), d("div", he, [f("div", ge, [p(y(Te), { blocks: X.value.content }, null, 8, ["blocks"])])])) : (h(), d("div", _e, [p(y(a), {
|
|
179
179
|
size: 32,
|
|
180
180
|
"stroke-width": 1,
|
|
181
181
|
class: "tpl:text-[var(--tpl-text-dim)]"
|
|
182
|
-
}),
|
|
183
|
-
|
|
182
|
+
}), f("p", ve, v(y(H).modules.selectToPreview), 1)]))])]),
|
|
183
|
+
f("div", ye, [f("div", be, [f("label", xe, v(y(H).modules.insertPosition), 1), b(f("select", {
|
|
184
184
|
"onUpdate:modelValue": t[1] ||= (e) => J.value = e,
|
|
185
185
|
class: "tpl:h-7 tpl:max-w-[220px] tpl:rounded-md tpl:border tpl:px-2 tpl:text-xs tpl:outline-none tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:text-[var(--tpl-text)]"
|
|
186
|
-
}, [(
|
|
186
|
+
}, [(h(!0), d(c, null, _(Ee.value, (e) => (h(), d("option", {
|
|
187
187
|
key: e.value,
|
|
188
188
|
value: e.value
|
|
189
|
-
},
|
|
189
|
+
}, v(e.label), 9, Se))), 128))], 512), [[oe, J.value]])]), f("div", Ce, [f("button", {
|
|
190
190
|
type: "button",
|
|
191
191
|
class: "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)]",
|
|
192
192
|
onClick: $
|
|
193
|
-
},
|
|
193
|
+
}, v(y(H).modules.close), 1), f("button", {
|
|
194
194
|
type: "button",
|
|
195
195
|
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)]",
|
|
196
196
|
disabled: !X.value,
|
|
197
197
|
onClick: Q
|
|
198
|
-
},
|
|
198
|
+
}, v(y(H).modules.insert), 9, we)])])
|
|
199
199
|
])]),
|
|
200
200
|
_: 1
|
|
201
201
|
}, 8, ["visible"]));
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { o as m } from "./
|
|
1
|
+
import { o as e } from "./keys-C0MQRs8d.js";
|
|
2
|
+
import { P as t, _ as n, a as r, f as i, g as a, h as o, i as s, m as c, n as l, p as u, r as d, u as f, v as p, y as m } from "./useEditorCore-ColJh1ST.js";
|
|
3
3
|
import { Fragment as h, computed as g, createBlock as _, createElementBlock as v, createElementVNode as y, defineComponent as b, inject as x, normalizeStyle as S, openBlock as C, renderList as w, resolveComponent as T, resolveDynamicComponent as E, unref as D } from "vue";
|
|
4
4
|
//#region src/components/blocks/PreviewSectionBlock.vue?vue&type=script&setup=true&lang.ts
|
|
5
5
|
var O = { class: "tpl:w-full" }, k = { class: "tpl:flex tpl:gap-0" }, A = /* @__PURE__ */ b({
|
|
@@ -11,19 +11,19 @@ var O = { class: "tpl:w-full" }, k = { class: "tpl:flex tpl:gap-0" }, A = /* @__
|
|
|
11
11
|
},
|
|
12
12
|
setup(b) {
|
|
13
13
|
let A = {
|
|
14
|
-
title:
|
|
15
|
-
paragraph:
|
|
16
|
-
image:
|
|
17
|
-
video:
|
|
18
|
-
button:
|
|
19
|
-
divider:
|
|
20
|
-
social:
|
|
21
|
-
menu:
|
|
22
|
-
table:
|
|
23
|
-
spacer:
|
|
24
|
-
html:
|
|
25
|
-
custom:
|
|
26
|
-
}, j = b, M = x(
|
|
14
|
+
title: f,
|
|
15
|
+
paragraph: c,
|
|
16
|
+
image: a,
|
|
17
|
+
video: l,
|
|
18
|
+
button: t,
|
|
19
|
+
divider: p,
|
|
20
|
+
social: r,
|
|
21
|
+
menu: o,
|
|
22
|
+
table: d,
|
|
23
|
+
spacer: s,
|
|
24
|
+
html: n,
|
|
25
|
+
custom: m
|
|
26
|
+
}, j = b, M = x(e, null), N = g(() => {
|
|
27
27
|
switch (j.block.columns) {
|
|
28
28
|
case "2": return ["50%", "50%"];
|
|
29
29
|
case "3": return [
|
|
@@ -44,7 +44,7 @@ var O = { class: "tpl:w-full" }, k = { class: "tpl:flex tpl:gap-0" }, A = /* @__
|
|
|
44
44
|
return P.value[e] || [];
|
|
45
45
|
}
|
|
46
46
|
function I(e) {
|
|
47
|
-
return
|
|
47
|
+
return u(e, M, A);
|
|
48
48
|
}
|
|
49
49
|
return (e, t) => {
|
|
50
50
|
let n = T("PreviewSectionBlock", !0);
|
|
@@ -53,7 +53,7 @@ var O = { class: "tpl:w-full" }, k = { class: "tpl:flex tpl:gap-0" }, A = /* @__
|
|
|
53
53
|
style: S({ width: N.value[t] })
|
|
54
54
|
}, [(C(!0), v(h, null, w(F(t), (e) => (C(), v("div", {
|
|
55
55
|
key: e.id,
|
|
56
|
-
style: S(D(
|
|
56
|
+
style: S(D(i)(e))
|
|
57
57
|
}, [e.type === "section" ? (C(), _(n, {
|
|
58
58
|
key: 0,
|
|
59
59
|
block: e,
|
|
@@ -75,27 +75,27 @@ var O = { class: "tpl:w-full" }, k = { class: "tpl:flex tpl:gap-0" }, A = /* @__
|
|
|
75
75
|
__name: "ModulePreviewCanvas",
|
|
76
76
|
props: { blocks: {} },
|
|
77
77
|
setup(g) {
|
|
78
|
-
let y = x(
|
|
78
|
+
let y = x(e), b = {
|
|
79
79
|
section: A,
|
|
80
|
-
title:
|
|
81
|
-
paragraph:
|
|
82
|
-
image:
|
|
83
|
-
video:
|
|
84
|
-
button:
|
|
85
|
-
divider:
|
|
86
|
-
social:
|
|
87
|
-
menu:
|
|
88
|
-
table:
|
|
89
|
-
spacer:
|
|
90
|
-
html:
|
|
91
|
-
custom:
|
|
80
|
+
title: f,
|
|
81
|
+
paragraph: c,
|
|
82
|
+
image: a,
|
|
83
|
+
video: l,
|
|
84
|
+
button: t,
|
|
85
|
+
divider: p,
|
|
86
|
+
social: r,
|
|
87
|
+
menu: o,
|
|
88
|
+
table: d,
|
|
89
|
+
spacer: s,
|
|
90
|
+
html: n,
|
|
91
|
+
custom: m
|
|
92
92
|
};
|
|
93
93
|
function T(e) {
|
|
94
|
-
return
|
|
94
|
+
return u(e, y, b);
|
|
95
95
|
}
|
|
96
96
|
return (e, t) => (C(), v("div", j, [(C(!0), v(h, null, w(g.blocks, (e) => (C(), v("div", {
|
|
97
97
|
key: e.id,
|
|
98
|
-
style: S(D(
|
|
98
|
+
style: S(D(i)(e))
|
|
99
99
|
}, [(C(), _(E(T(e)), {
|
|
100
100
|
block: e,
|
|
101
101
|
viewport: "desktop"
|