@templatical/editor 0.6.4 → 0.6.5
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/{AccessibilityPanel-CvQGLdu6.js → AccessibilityPanel-B2MT0M58.js} +34 -34
- package/dist/{AiChatSidebar-B3SJIKG_.js → AiChatSidebar-w5ek3Z76.js} +62 -62
- package/dist/{AiFeatureMenu-BLLKoOos.js → AiFeatureMenu-uXTxJh06.js} +20 -20
- package/dist/{cdn/chunks/BlockA11yBadge-DcEZftf6.js → BlockA11yBadge-C0S6kPC4.js} +10 -9
- package/dist/{CloudEditor-nzrRhHIi.js → CloudEditor-_GaYluN7.js} +441 -441
- package/dist/{CollaboratorBar-DuPYW5iF.js → CollaboratorBar-C4eXJkXW.js} +20 -20
- package/dist/CommentsSidebar-BQROg36f.js +441 -0
- package/dist/{cdn/chunks/CountdownBlock-5YdT1uUu.js → CountdownBlock-Bxqe7zwL.js} +21 -22
- package/dist/CountdownToolbar-CpFAnjSo.js +210 -0
- package/dist/{DesignReferenceSidebar-B8V_F2yF.js → DesignReferenceSidebar-CfqpcWX6.js} +52 -52
- package/dist/{LoadingTrack-B0CWFHXQ.js → LoadingTrack-CFkDkjBb.js} +1 -1
- package/dist/{ModuleBrowserModal-DrUFMTDx.js → ModuleBrowserModal-EDKHLJtb.js} +79 -79
- package/dist/{ModulePreviewCanvas-CHdOwV_4.js → ModulePreviewCanvas-MQxat34K.js} +29 -29
- package/dist/{NumberWithSuffix-DkXUez9t.js → NumberWithSuffix-Dw8dN1Pt.js} +88 -88
- package/dist/{ParagraphEditor-D75wl3BX.js → ParagraphEditor-C8IP9HOZ.js} +218 -218
- package/dist/{RichTextEditorContent-DYkIauIk.js → RichTextEditorContent-CK3Om7ES.js} +38 -38
- package/dist/{SaveModuleDialog-FZ9lxY7_.js → SaveModuleDialog-Bgu0FVr6.js} +34 -34
- package/dist/{SnapshotHistory-BR3eV120.js → SnapshotHistory-aSULEKUJ.js} +33 -33
- package/dist/{TemplateScoringPanel-4GTNHej5.js → TemplateScoringPanel-BIAeCAEP.js} +82 -82
- package/dist/{TestEmailModal--ue5w9fT.js → TestEmailModal-wcbmmWCs.js} +30 -30
- package/dist/{TitleEditor-fStSADI-.js → TitleEditor-21D8_OUQ.js} +67 -67
- package/dist/{TplModal-BwSfxIHf.js → TplModal-CINtyB6Y.js} +14 -14
- package/dist/{accessibility-e8JYu_zd.js → accessibility-BgUEA-Ai.js} +1 -1
- package/dist/{blockTypeIcons-BcTrDjmH.js → blockTypeIcons-DKetBdJx.js} +2 -2
- package/dist/bundle-stats.json +6 -6
- package/dist/cdn/chunks/{AccessibilityPanel-B6DOjojm.js → AccessibilityPanel-BMSGhaNU.js} +34 -34
- package/dist/cdn/chunks/{AccessibilityPanel-B6DOjojm.js.map → AccessibilityPanel-BMSGhaNU.js.map} +1 -1
- package/dist/cdn/chunks/{AiFeatureMenu-qEdB2fZJ.js → AiFeatureMenu-hNba-JqQ.js} +16 -16
- package/dist/cdn/chunks/{AiFeatureMenu-qEdB2fZJ.js.map → AiFeatureMenu-hNba-JqQ.js.map} +1 -1
- package/dist/{BlockA11yBadge-CXDLqkcJ.js → cdn/chunks/BlockA11yBadge-BIR88CvN.js} +11 -12
- package/dist/cdn/chunks/{BlockA11yBadge-DcEZftf6.js.map → BlockA11yBadge-BIR88CvN.js.map} +1 -1
- package/dist/cdn/chunks/{CloudEditor-dwzWDF_n.js → CloudEditor-D2G2nNpQ.js} +425 -425
- package/dist/cdn/chunks/{CloudEditor-dwzWDF_n.js.map → CloudEditor-D2G2nNpQ.js.map} +1 -1
- package/dist/cdn/chunks/{CollaboratorBar--nO7TX6b.js → CollaboratorBar-Btzom8dY.js} +20 -20
- package/dist/cdn/chunks/{CollaboratorBar--nO7TX6b.js.map → CollaboratorBar-Btzom8dY.js.map} +1 -1
- package/dist/cdn/chunks/CountdownBlock-BJSAJlJ1.js +93 -0
- package/dist/cdn/chunks/{CountdownBlock-5YdT1uUu.js.map → CountdownBlock-BJSAJlJ1.js.map} +1 -1
- package/dist/cdn/chunks/CountdownToolbar-DbknNrIi.js +212 -0
- package/dist/cdn/chunks/{CountdownToolbar-DXPXrbAA.js.map → CountdownToolbar-DbknNrIi.js.map} +1 -1
- package/dist/cdn/chunks/{ModuleBrowserModal-DxoPp81s.js → ModuleBrowserModal-BvAuW8O5.js} +43 -43
- package/dist/cdn/chunks/{ModuleBrowserModal-DxoPp81s.js.map → ModuleBrowserModal-BvAuW8O5.js.map} +1 -1
- package/dist/cdn/chunks/{ModulePreviewCanvas-CoLdb4ar.js → ModulePreviewCanvas-CYtt0boo.js} +23 -23
- package/dist/cdn/chunks/{ModulePreviewCanvas-CoLdb4ar.js.map → ModulePreviewCanvas-CYtt0boo.js.map} +1 -1
- package/dist/cdn/chunks/{NumberWithSuffix-CE3NrZhH.js → NumberWithSuffix-CVfo9ztG.js} +108 -108
- package/dist/cdn/chunks/{NumberWithSuffix-CE3NrZhH.js.map → NumberWithSuffix-CVfo9ztG.js.map} +1 -1
- package/dist/cdn/chunks/{ParagraphEditor-B6Ygu-Mq.js → ParagraphEditor-DCo58JP8.js} +187 -187
- package/dist/cdn/chunks/{ParagraphEditor-B6Ygu-Mq.js.map → ParagraphEditor-DCo58JP8.js.map} +1 -1
- package/dist/cdn/chunks/{RichTextEditorContent-DL_y2SrR.js → RichTextEditorContent-BzCThv84.js} +33 -33
- package/dist/cdn/chunks/{RichTextEditorContent-DL_y2SrR.js.map → RichTextEditorContent-BzCThv84.js.map} +1 -1
- package/dist/cdn/chunks/{SaveModuleDialog-B0TnO_o9.js → SaveModuleDialog-S2Lix1LD.js} +27 -27
- package/dist/cdn/chunks/{SaveModuleDialog-B0TnO_o9.js.map → SaveModuleDialog-S2Lix1LD.js.map} +1 -1
- package/dist/cdn/chunks/{TitleEditor-BHpfxvwy.js → TitleEditor-CYzAMuUW.js} +66 -66
- package/dist/cdn/chunks/{TitleEditor-BHpfxvwy.js.map → TitleEditor-CYzAMuUW.js.map} +1 -1
- package/dist/cdn/chunks/{blockTypeIcons-BzzY9_kA.js → blockTypeIcons-DOzUHoor.js} +3 -3
- package/dist/cdn/chunks/{blockTypeIcons-BzzY9_kA.js.map → blockTypeIcons-DOzUHoor.js.map} +1 -1
- package/dist/cdn/chunks/draggable-CNhyCGIO.js +4804 -0
- package/dist/cdn/chunks/draggable-CNhyCGIO.js.map +1 -0
- package/dist/cdn/chunks/{extensions-DIxF31tA.js → extensions-wafZZ0-_.js} +95 -95
- package/dist/cdn/chunks/{extensions-DIxF31tA.js.map → extensions-wafZZ0-_.js.map} +1 -1
- package/dist/cdn/chunks/{features-DEMb13KS.js → features-B4tNvoi4.js} +2260 -2267
- package/dist/cdn/chunks/features-B4tNvoi4.js.map +1 -0
- package/dist/cdn/chunks/{icons-CsLTcirh.js → icons-B5nBFtvb.js} +2 -2
- package/dist/cdn/chunks/{icons-CsLTcirh.js.map → icons-B5nBFtvb.js.map} +1 -1
- package/dist/cdn/chunks/{media-library-CVaNvhpM.js → media-library-BLaoBxHe.js} +1397 -1397
- package/dist/cdn/chunks/{media-library-CVaNvhpM.js.map → media-library-BLaoBxHe.js.map} +1 -1
- package/dist/cdn/chunks/{pusher-CDbNlZBE.js → pusher-bjpcqCZG.js} +2 -2
- package/dist/cdn/chunks/{pusher-CDbNlZBE.js.map → pusher-bjpcqCZG.js.map} +1 -1
- package/dist/cdn/chunks/{quality-BaBfc54_.js → quality-D920ZxXf.js} +3 -3
- package/dist/cdn/chunks/{quality-BaBfc54_.js.map → quality-D920ZxXf.js.map} +1 -1
- package/dist/cdn/chunks/{renderer-CUxvx7ro.js → renderer-Yk30CckU.js} +3 -3
- package/dist/cdn/chunks/{renderer-CUxvx7ro.js.map → renderer-Yk30CckU.js.map} +1 -1
- package/dist/{rolldown-runtime-BZGGJVDF.js → cdn/chunks/rolldown-runtime-C266TIVP.js} +5 -5
- package/dist/cdn/chunks/{src-CRaqN-p8.js → src-kLJg7Y0m.js} +171 -171
- package/dist/cdn/chunks/{src-CRaqN-p8.js.map → src-kLJg7Y0m.js.map} +1 -1
- package/dist/cdn/chunks/styles-DrVLif14.js +2944 -0
- package/dist/cdn/chunks/styles-DrVLif14.js.map +1 -0
- package/dist/cdn/chunks/{tiptap-ZhwKyFp7.js → tiptap-IyIsncxY.js} +45 -46
- package/dist/cdn/chunks/{tiptap-ZhwKyFp7.js.map → tiptap-IyIsncxY.js.map} +1 -1
- package/dist/cdn/editor.css +1 -1
- package/dist/cdn/editor.js +122 -122
- package/dist/cdn/editor.js.map +1 -1
- package/dist/{check-Da05j8yl.js → check-Bg5yrRmX.js} +1 -1
- package/dist/{chevron-down-R2uY34iD.js → chevron-down-tee-ghFi.js} +1 -1
- package/dist/{circle-alert-DZuGWPX-.js → circle-alert-C0L9pUQ4.js} +1 -1
- package/dist/{clock-CRp2sIub.js → clock-CDlEdqiP.js} +1 -1
- package/dist/{cloud-DEk_b4CR.js → cloud-a3VovHva.js} +145 -145
- package/dist/{createLucideIcon-C3pa2siy.js → createLucideIcon-Di4mqmGn.js} +9 -9
- package/dist/{dist-B1IR0bpH.js → dist-BzRLLpfq.js} +107 -107
- package/dist/{dist-BFawx6IS.js → dist-Pk4MhWMP.js} +35 -35
- package/dist/{extensions-CUcl9Ok4.js → extensions-BF39Siqk.js} +103 -103
- package/dist/{image-up-MBZKKg9p.js → image-up-1D_3XDdO.js} +1 -1
- package/dist/index.d.ts +6 -6
- package/dist/{info-CJEC7piy.js → info-DTGrc0Bx.js} +1 -1
- package/dist/{keys-ciNfSSGj.js → keys-Bqs_0du9.js} +1 -1
- package/dist/{loader-circle-DsY5Yg33.js → loader-circle-_9bP23op.js} +1 -1
- package/dist/{message-circle-yElBbR2C.js → message-circle-gzy2ZGJ3.js} +1 -1
- package/dist/{refresh-cw-CE_AGtn8.js → refresh-cw-BNAhAmtL.js} +1 -1
- package/dist/rolldown-runtime-CAFD8bLK.js +11 -0
- package/dist/{scan-line-D0vcUekt.js → scan-line-DUEg6DoT.js} +1 -1
- package/dist/{send-DH4oDQqC.js → send-BatIZC9a.js} +1 -1
- package/dist/{shield-check-CfJgs2Hd.js → shield-check-C5Gv2cM1.js} +1 -1
- package/dist/{sparkles-CvRXGqFs.js → sparkles-D1IGi_cC.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/styles-CwJQsnSp.js +3173 -0
- package/dist/templatical-editor.js +99 -99
- package/dist/{text-align-start-BT9VUDxK.js → text-align-start-DG3aAH7Y.js} +1 -1
- package/dist/{trash-2-DbP2Y6t2.js → trash-2-424iqbpN.js} +1 -1
- package/dist/{triangle-alert-aOXceTSe.js → triangle-alert-DWQySIE2.js} +1 -1
- package/dist/{useCloudI18n-BuIwR6OE.js → useCloudI18n-CL_AwWwi.js} +4 -4
- package/dist/useEditorCore-DLd-5qMg.js +3784 -0
- package/dist/{useI18n-lb2DHDiu.js → useI18n-CgmQftNf.js} +4 -4
- package/dist/{useMergeTag-CBwKnnNB.js → useMergeTag-vpwrZ9eQ.js} +3 -3
- package/dist/vue.runtime.esm-bundler-Bxqkjqhc.js +4300 -0
- package/dist/{x-u2oVmjN_.js → x-Dlaenqta.js} +1 -1
- package/package.json +8 -8
- package/dist/CommentsSidebar-B1pvJdqF.js +0 -441
- package/dist/CountdownBlock-BNSj1jvJ.js +0 -92
- package/dist/CountdownToolbar-ClJr2GzL.js +0 -210
- package/dist/cdn/chunks/CountdownToolbar-DXPXrbAA.js +0 -212
- package/dist/cdn/chunks/draggable-Bcb86AsV.js +0 -11572
- package/dist/cdn/chunks/draggable-Bcb86AsV.js.map +0 -1
- package/dist/cdn/chunks/features-DEMb13KS.js.map +0 -1
- package/dist/cdn/chunks/rolldown-runtime-BNuo_Jkg.js +0 -20
- package/dist/cdn/chunks/styles-BHJULjNR.js +0 -2947
- package/dist/cdn/chunks/styles-BHJULjNR.js.map +0 -1
- package/dist/styles-DEXEkBvg.js +0 -3176
- package/dist/useEditorCore-C6ost42Q.js +0 -9342
- package/dist/vue.runtime.esm-bundler-DpvJL-nX.js +0 -5775
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "./useEditorCore-
|
|
3
|
-
import { C as oe, O as g, m as se } from "./keys-
|
|
4
|
-
import { t as ce } from "./useI18n-
|
|
5
|
-
import { t as _ } from "./createLucideIcon-
|
|
6
|
-
import { n as v, t as y } from "./blockTypeIcons-
|
|
7
|
-
import { t as le } from "./trash-2-
|
|
8
|
-
import { t as ue } from "./x-
|
|
9
|
-
import { n as de } from "./useCloudI18n-
|
|
10
|
-
import { t as fe } from "./TplModal-
|
|
1
|
+
import { A as e, B as t, F as n, L as r, M as i, X as a, a as ee, b as o, c as s, d as c, f as l, h as u, i as te, l as d, m as ne, ot as re, p as f, rt as p, st as m, v as h, y as ie, z as ae } from "./vue.runtime.esm-bundler-Bxqkjqhc.js";
|
|
2
|
+
import "./useEditorCore-DLd-5qMg.js";
|
|
3
|
+
import { C as oe, O as g, m as se } from "./keys-Bqs_0du9.js";
|
|
4
|
+
import { t as ce } from "./useI18n-CgmQftNf.js";
|
|
5
|
+
import { t as _ } from "./createLucideIcon-Di4mqmGn.js";
|
|
6
|
+
import { n as v, t as y } from "./blockTypeIcons-DKetBdJx.js";
|
|
7
|
+
import { t as le } from "./trash-2-424iqbpN.js";
|
|
8
|
+
import { t as ue } from "./x-Dlaenqta.js";
|
|
9
|
+
import { n as de } from "./useCloudI18n-CL_AwWwi.js";
|
|
10
|
+
import { t as fe } from "./TplModal-CINtyB6Y.js";
|
|
11
11
|
var pe = _("search", [["path", {
|
|
12
12
|
d: "m21 21-4.34-4.34",
|
|
13
13
|
key: "14j7rj"
|
|
@@ -42,49 +42,49 @@ var pe = _("search", [["path", {
|
|
|
42
42
|
], L = {
|
|
43
43
|
key: 1,
|
|
44
44
|
class: "tpl:flex tpl:flex-col tpl:items-center tpl:justify-center tpl:py-12"
|
|
45
|
-
}, R = { class: "tpl:mt-2 tpl:text-xs tpl:text-[var(--tpl-text-dim)]" }, ge = { class: "tpl:flex tpl:flex-1 tpl:flex-col tpl:overflow-hidden tpl:border-l tpl:border-[var(--tpl-border)]" },
|
|
45
|
+
}, R = { class: "tpl:mt-2 tpl:text-xs tpl:text-[var(--tpl-text-dim)]" }, ge = { class: "tpl:flex tpl:flex-1 tpl:flex-col tpl:overflow-hidden tpl:border-l tpl:border-[var(--tpl-border)]" }, _e = {
|
|
46
46
|
key: 0,
|
|
47
47
|
class: "tpl:flex tpl:flex-1 tpl:flex-col tpl:overflow-hidden"
|
|
48
|
-
},
|
|
48
|
+
}, ve = { class: "tpl:flex-1 tpl:overflow-y-auto tpl:p-4" }, ye = {
|
|
49
49
|
key: 1,
|
|
50
50
|
class: "tpl:flex tpl:flex-1 tpl:flex-col tpl:items-center tpl:justify-center tpl:px-4"
|
|
51
|
-
},
|
|
51
|
+
}, be = { class: "tpl:mt-2 tpl:text-center tpl:text-xs tpl:text-[var(--tpl-text-dim)]" }, xe = { class: "tpl:flex tpl:items-center tpl:justify-between tpl:border-t tpl:px-5 tpl:py-3 tpl:border-[var(--tpl-border)]" }, Se = { class: "tpl:flex tpl:items-center tpl:gap-2" }, Ce = { class: "tpl:shrink-0 tpl:text-xs tpl:text-[var(--tpl-text-dim)]" }, we = ["value"], Te = { class: "tpl:flex tpl:gap-2" }, Ee = ["disabled"], z = /* @__PURE__ */ o({
|
|
52
52
|
__name: "ModuleBrowserModal",
|
|
53
53
|
props: { visible: { type: Boolean } },
|
|
54
54
|
emits: ["close", "insert"],
|
|
55
|
-
setup(
|
|
56
|
-
let
|
|
57
|
-
let e =
|
|
58
|
-
if (!
|
|
59
|
-
let t =
|
|
55
|
+
setup(o, { emit: _ }) {
|
|
56
|
+
let z = o, B = _, De = ie(() => import("./ModulePreviewCanvas-MQxat34K.js")), { t: Oe } = ce(), { t: V } = de(), H = g(oe, "ModuleBrowserModal"), U = g(se, "ModuleBrowserModal"), W = a(""), G = a(null), K = a(null), q = a("end"), J = c(() => {
|
|
57
|
+
let e = H.modules.value;
|
|
58
|
+
if (!W.value) return e;
|
|
59
|
+
let t = W.value.toLowerCase();
|
|
60
60
|
return e.filter((e) => e.name.toLowerCase().includes(t));
|
|
61
|
-
}),
|
|
61
|
+
}), Y = c(() => G.value ? H.modules.value.find((e) => e.id === G.value) ?? null : null), X = c(() => {
|
|
62
62
|
let e = [{
|
|
63
63
|
value: "beginning",
|
|
64
|
-
label:
|
|
65
|
-
}], t =
|
|
64
|
+
label: V.modules.insertAtBeginning
|
|
65
|
+
}], t = U.content.value.blocks;
|
|
66
66
|
for (let n = 0; n < t.length; n++) {
|
|
67
|
-
let r = t[n], i = r.type, a =
|
|
67
|
+
let r = t[n], i = r.type, a = Oe.blocks[i] ?? r.type;
|
|
68
68
|
e.push({
|
|
69
69
|
value: r.id,
|
|
70
|
-
label:
|
|
70
|
+
label: V.modules.insertAfterBlock.replace("{block}", `${a} ${n + 1}`)
|
|
71
71
|
});
|
|
72
72
|
}
|
|
73
73
|
return e.push({
|
|
74
74
|
value: "end",
|
|
75
|
-
label:
|
|
75
|
+
label: V.modules.insertAtEnd
|
|
76
76
|
}), e;
|
|
77
|
-
}), ke =
|
|
78
|
-
if (
|
|
79
|
-
if (
|
|
80
|
-
let e =
|
|
77
|
+
}), ke = c(() => {
|
|
78
|
+
if (q.value === "end") return;
|
|
79
|
+
if (q.value === "beginning") return 0;
|
|
80
|
+
let e = U.content.value.blocks.findIndex((e) => e.id === q.value);
|
|
81
81
|
if (e !== -1) return e + 1;
|
|
82
82
|
});
|
|
83
|
-
|
|
83
|
+
r(() => z.visible, (e) => {
|
|
84
84
|
if (e) {
|
|
85
|
-
|
|
86
|
-
let e =
|
|
87
|
-
e ?
|
|
85
|
+
W.value = "", G.value = null, K.value = null;
|
|
86
|
+
let e = U.state.selectedBlockId;
|
|
87
|
+
e ? q.value = U.content.value.blocks.findIndex((t) => t.id === e) === -1 ? "end" : e : q.value = "end";
|
|
88
88
|
}
|
|
89
89
|
});
|
|
90
90
|
function Ae(e) {
|
|
@@ -101,106 +101,106 @@ var pe = _("search", [["path", {
|
|
|
101
101
|
}
|
|
102
102
|
async function je(e) {
|
|
103
103
|
try {
|
|
104
|
-
await
|
|
104
|
+
await H.deleteModule(e), G.value === e && (G.value = null);
|
|
105
105
|
} finally {
|
|
106
|
-
|
|
106
|
+
K.value = null;
|
|
107
107
|
}
|
|
108
108
|
}
|
|
109
109
|
function Q() {
|
|
110
|
-
|
|
110
|
+
Y.value && B("insert", Y.value, ke.value);
|
|
111
111
|
}
|
|
112
112
|
function $() {
|
|
113
|
-
|
|
113
|
+
B("close");
|
|
114
114
|
}
|
|
115
115
|
function Me(e) {
|
|
116
|
-
e.key === "Escape" && $(), e.key === "Enter" &&
|
|
116
|
+
e.key === "Escape" && $(), e.key === "Enter" && Y.value && (e.preventDefault(), Q());
|
|
117
117
|
}
|
|
118
|
-
return (
|
|
119
|
-
visible:
|
|
118
|
+
return (r, a) => (e(), f(fe, {
|
|
119
|
+
visible: o.visible,
|
|
120
120
|
onClose: $,
|
|
121
121
|
onKeydown: Me
|
|
122
122
|
}, {
|
|
123
|
-
default:
|
|
124
|
-
|
|
125
|
-
"aria-label":
|
|
123
|
+
default: ae(() => [l("div", me, [
|
|
124
|
+
l("div", he, [l("h3", b, m(p(V).modules.browse), 1), l("button", {
|
|
125
|
+
"aria-label": p(V).modules.close,
|
|
126
126
|
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)]",
|
|
127
127
|
onClick: $
|
|
128
|
-
}, [
|
|
128
|
+
}, [h(p(ue), {
|
|
129
129
|
size: 16,
|
|
130
130
|
"stroke-width": 2
|
|
131
131
|
})], 8, x)]),
|
|
132
|
-
|
|
132
|
+
l("div", S, [l("div", C, [l("div", w, [l("div", T, [h(p(pe), {
|
|
133
133
|
size: 14,
|
|
134
134
|
"stroke-width": 2,
|
|
135
135
|
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)]"
|
|
136
|
-
}),
|
|
137
|
-
"onUpdate:modelValue":
|
|
136
|
+
}), t(l("input", {
|
|
137
|
+
"onUpdate:modelValue": a[0] ||= (e) => W.value = e,
|
|
138
138
|
type: "text",
|
|
139
|
-
placeholder:
|
|
139
|
+
placeholder: p(V).modules.search,
|
|
140
140
|
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)]"
|
|
141
|
-
}, null, 8, E), [[
|
|
142
|
-
key:
|
|
141
|
+
}, null, 8, E), [[ee, W.value]])])]), l("div", D, [J.value.length > 0 ? (e(), u("div", O, [(e(!0), u(d, null, i(J.value, (t) => (e(), u("button", {
|
|
142
|
+
key: t.id,
|
|
143
143
|
type: "button",
|
|
144
|
-
"aria-pressed":
|
|
144
|
+
"aria-pressed": G.value === t.id,
|
|
145
145
|
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]",
|
|
146
|
-
style:
|
|
147
|
-
borderColor:
|
|
148
|
-
backgroundColor:
|
|
146
|
+
style: re({
|
|
147
|
+
borderColor: G.value === t.id ? "var(--tpl-primary)" : "var(--tpl-border)",
|
|
148
|
+
backgroundColor: G.value === t.id ? "var(--tpl-primary-light)" : "transparent"
|
|
149
149
|
}),
|
|
150
|
-
onClick: (
|
|
151
|
-
}, [
|
|
152
|
-
(
|
|
153
|
-
key:
|
|
150
|
+
onClick: (e) => G.value = t.id
|
|
151
|
+
}, [l("div", A, [l("span", j, m(t.name), 1), l("span", M, m(p(V).modules.blockCount.replace("{count}", String(t.content.length))), 1)]), l("div", N, [
|
|
152
|
+
(e(!0), u(d, null, i(Ae(t), (t) => (e(), f(n(t.icon), {
|
|
153
|
+
key: t.type,
|
|
154
154
|
size: 14,
|
|
155
155
|
"stroke-width": 1.5,
|
|
156
156
|
class: "tpl:text-[var(--tpl-text-dim)]"
|
|
157
157
|
}))), 128)),
|
|
158
|
-
Z(
|
|
159
|
-
|
|
158
|
+
Z(t) > 0 ? (e(), u("span", P, " +" + m(Z(t)), 1)) : ne("", !0),
|
|
159
|
+
K.value === t.id ? (e(), u("button", {
|
|
160
160
|
key: 1,
|
|
161
|
-
"aria-label":
|
|
161
|
+
"aria-label": p(V).modules.deleteConfirm,
|
|
162
162
|
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)]",
|
|
163
163
|
style: { "background-color": "transparent" },
|
|
164
|
-
onClick:
|
|
165
|
-
},
|
|
164
|
+
onClick: s((e) => je(t.id), ["stop"])
|
|
165
|
+
}, m(p(V).modules.deleteConfirm), 9, F)) : (e(), u("button", {
|
|
166
166
|
key: 2,
|
|
167
167
|
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)]",
|
|
168
|
-
"aria-label":
|
|
169
|
-
title:
|
|
170
|
-
onClick:
|
|
171
|
-
}, [
|
|
168
|
+
"aria-label": p(V).modules.delete,
|
|
169
|
+
title: p(V).modules.delete,
|
|
170
|
+
onClick: s((e) => K.value = t.id, ["stop"])
|
|
171
|
+
}, [h(p(le), {
|
|
172
172
|
size: 12,
|
|
173
173
|
"stroke-width": 1.5
|
|
174
174
|
})], 8, I))
|
|
175
|
-
])], 12, k))), 128))])) : (
|
|
175
|
+
])], 12, k))), 128))])) : (e(), u("div", L, [h(p(v), {
|
|
176
176
|
size: 32,
|
|
177
177
|
"stroke-width": 1,
|
|
178
178
|
class: "tpl:text-[var(--tpl-text-dim)]"
|
|
179
|
-
}),
|
|
179
|
+
}), l("p", R, m(W.value ? p(V).modules.noModules : p(V).modules.noModulesHint), 1)]))])]), l("div", ge, [Y.value ? (e(), u("div", _e, [l("div", ve, [h(p(De), { blocks: Y.value.content }, null, 8, ["blocks"])])])) : (e(), u("div", ye, [h(p(v), {
|
|
180
180
|
size: 32,
|
|
181
181
|
"stroke-width": 1,
|
|
182
182
|
class: "tpl:text-[var(--tpl-text-dim)]"
|
|
183
|
-
}),
|
|
184
|
-
|
|
185
|
-
"onUpdate:modelValue":
|
|
183
|
+
}), l("p", be, m(p(V).modules.selectToPreview), 1)]))])]),
|
|
184
|
+
l("div", xe, [l("div", Se, [l("label", Ce, m(p(V).modules.insertPosition), 1), t(l("select", {
|
|
185
|
+
"onUpdate:modelValue": a[1] ||= (e) => q.value = e,
|
|
186
186
|
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)]"
|
|
187
|
-
}, [(
|
|
188
|
-
key:
|
|
189
|
-
value:
|
|
190
|
-
},
|
|
187
|
+
}, [(e(!0), u(d, null, i(X.value, (t) => (e(), u("option", {
|
|
188
|
+
key: t.value,
|
|
189
|
+
value: t.value
|
|
190
|
+
}, m(t.label), 9, we))), 128))], 512), [[te, q.value]])]), l("div", Te, [l("button", {
|
|
191
191
|
type: "button",
|
|
192
192
|
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)]",
|
|
193
193
|
onClick: $
|
|
194
|
-
},
|
|
194
|
+
}, m(p(V).modules.close), 1), l("button", {
|
|
195
195
|
type: "button",
|
|
196
196
|
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)]",
|
|
197
|
-
disabled: !
|
|
197
|
+
disabled: !Y.value,
|
|
198
198
|
onClick: Q
|
|
199
|
-
},
|
|
199
|
+
}, m(p(V).modules.insert), 9, Ee)])])
|
|
200
200
|
])]),
|
|
201
201
|
_: 1
|
|
202
202
|
}, 8, ["visible"]));
|
|
203
203
|
}
|
|
204
204
|
});
|
|
205
205
|
//#endregion
|
|
206
|
-
export {
|
|
206
|
+
export { z as default };
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { N as p, _ as m, a as h, f as g, g as _, h as v, i as y, m as b, n as x, p as S, r as C, u as w, v as T, y as E } from "./useEditorCore-
|
|
3
|
-
import { s as D } from "./keys-
|
|
1
|
+
import { A as e, F as t, M as n, P as r, b as i, d as a, f as o, h as s, l as c, ot as l, p as u, rt as d, w as f } from "./vue.runtime.esm-bundler-Bxqkjqhc.js";
|
|
2
|
+
import { N as p, _ as m, a as h, f as g, g as _, h as v, i as y, m as b, n as x, p as S, r as C, u as w, v as T, y as E } from "./useEditorCore-DLd-5qMg.js";
|
|
3
|
+
import { s as D } from "./keys-Bqs_0du9.js";
|
|
4
4
|
//#region src/components/blocks/PreviewSectionBlock.vue?vue&type=script&setup=true&lang.ts
|
|
5
|
-
var O = { class: "tpl:w-full" }, k = { class: "tpl:flex tpl:gap-0" }, A = /* @__PURE__ */
|
|
5
|
+
var O = { class: "tpl:w-full" }, k = { class: "tpl:flex tpl:gap-0" }, A = /* @__PURE__ */ i({
|
|
6
6
|
name: "PreviewSectionBlock",
|
|
7
7
|
__name: "PreviewSectionBlock",
|
|
8
8
|
props: {
|
|
9
9
|
block: {},
|
|
10
10
|
viewport: {}
|
|
11
11
|
},
|
|
12
|
-
setup(
|
|
12
|
+
setup(i) {
|
|
13
13
|
let A = {
|
|
14
14
|
title: w,
|
|
15
15
|
paragraph: b,
|
|
@@ -23,7 +23,7 @@ var O = { class: "tpl:w-full" }, k = { class: "tpl:flex tpl:gap-0" }, A = /* @__
|
|
|
23
23
|
spacer: y,
|
|
24
24
|
html: m,
|
|
25
25
|
custom: E
|
|
26
|
-
}, j =
|
|
26
|
+
}, j = i, M = f(D, null), N = a(() => {
|
|
27
27
|
switch (j.block.columns) {
|
|
28
28
|
case "2": return ["50%", "50%"];
|
|
29
29
|
case "3": return [
|
|
@@ -35,7 +35,7 @@ var O = { class: "tpl:w-full" }, k = { class: "tpl:flex tpl:gap-0" }, A = /* @__
|
|
|
35
35
|
case "2-1": return ["66.67%", "33.33%"];
|
|
36
36
|
default: return ["100%"];
|
|
37
37
|
}
|
|
38
|
-
}), P =
|
|
38
|
+
}), P = a(() => {
|
|
39
39
|
let e = N.value.length, t = [...j.block.children];
|
|
40
40
|
for (; t.length < e;) t.push([]);
|
|
41
41
|
return t.slice(0, e);
|
|
@@ -46,21 +46,21 @@ var O = { class: "tpl:w-full" }, k = { class: "tpl:flex tpl:gap-0" }, A = /* @__
|
|
|
46
46
|
function I(e) {
|
|
47
47
|
return S(e, M, A);
|
|
48
48
|
}
|
|
49
|
-
return (
|
|
50
|
-
let f =
|
|
51
|
-
return
|
|
52
|
-
key:
|
|
53
|
-
style:
|
|
54
|
-
}, [(
|
|
55
|
-
key:
|
|
56
|
-
style:
|
|
57
|
-
}, [
|
|
49
|
+
return (i, a) => {
|
|
50
|
+
let f = r("PreviewSectionBlock", !0);
|
|
51
|
+
return e(), s("div", O, [o("div", k, [(e(!0), s(c, null, n(P.value, (r, i) => (e(), s("div", {
|
|
52
|
+
key: i,
|
|
53
|
+
style: l({ width: N.value[i] })
|
|
54
|
+
}, [(e(!0), s(c, null, n(F(i), (n) => (e(), s("div", {
|
|
55
|
+
key: n.id,
|
|
56
|
+
style: l(d(g)(n))
|
|
57
|
+
}, [n.type === "section" ? (e(), u(f, {
|
|
58
58
|
key: 0,
|
|
59
|
-
block:
|
|
59
|
+
block: n,
|
|
60
60
|
viewport: "desktop"
|
|
61
|
-
}, null, 8, ["block"])) : (
|
|
61
|
+
}, null, 8, ["block"])) : (e(), u(t(I(n)), {
|
|
62
62
|
key: 1,
|
|
63
|
-
block:
|
|
63
|
+
block: n,
|
|
64
64
|
viewport: "desktop"
|
|
65
65
|
}, null, 8, ["block"]))], 4))), 128))], 4))), 128))])]);
|
|
66
66
|
};
|
|
@@ -71,11 +71,11 @@ var O = { class: "tpl:w-full" }, k = { class: "tpl:flex tpl:gap-0" }, A = /* @__
|
|
|
71
71
|
"background-color": "var(--tpl-canvas-bg)",
|
|
72
72
|
"box-shadow": "var(--tpl-shadow-sm)"
|
|
73
73
|
}
|
|
74
|
-
}, M = /* @__PURE__ */
|
|
74
|
+
}, M = /* @__PURE__ */ i({
|
|
75
75
|
__name: "ModulePreviewCanvas",
|
|
76
76
|
props: { blocks: {} },
|
|
77
|
-
setup(
|
|
78
|
-
let
|
|
77
|
+
setup(r) {
|
|
78
|
+
let i = f(D), a = {
|
|
79
79
|
section: A,
|
|
80
80
|
title: w,
|
|
81
81
|
paragraph: b,
|
|
@@ -90,14 +90,14 @@ var O = { class: "tpl:w-full" }, k = { class: "tpl:flex tpl:gap-0" }, A = /* @__
|
|
|
90
90
|
html: m,
|
|
91
91
|
custom: E
|
|
92
92
|
};
|
|
93
|
-
function
|
|
94
|
-
return S(e,
|
|
93
|
+
function o(e) {
|
|
94
|
+
return S(e, i, a);
|
|
95
95
|
}
|
|
96
|
-
return (
|
|
97
|
-
key:
|
|
98
|
-
style:
|
|
99
|
-
}, [(
|
|
100
|
-
block:
|
|
96
|
+
return (i, a) => (e(), s("div", j, [(e(!0), s(c, null, n(r.blocks, (n) => (e(), s("div", {
|
|
97
|
+
key: n.id,
|
|
98
|
+
style: l(d(g)(n))
|
|
99
|
+
}, [(e(), u(t(o(n)), {
|
|
100
|
+
block: n,
|
|
101
101
|
viewport: "desktop"
|
|
102
102
|
}, null, 8, ["block"]))], 4))), 128))]));
|
|
103
103
|
}
|