@templatical/editor 0.9.1 → 0.10.0
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-BUKj9n02.js → AiChatSidebar-D30WPhbv.js} +2 -2
- package/dist/{AiFeatureMenu-Co14YVJt.js → AiFeatureMenu-B5CJX5zr.js} +3 -3
- package/dist/{BlockIssueBadge-DThKKeub.js → BlockIssueBadge-CkB4Yyz2.js} +2 -2
- package/dist/{CloudEditor-DHB1FoQD.js → CloudEditor-nT-R769W.js} +128 -127
- package/dist/{CollaboratorBar-Bc6q0gB9.js → CollaboratorBar-CwhlXODK.js} +2 -2
- package/dist/{CommentsSidebar-DiH4R4F0.js → CommentsSidebar-gpZMMI5w.js} +3 -3
- package/dist/{CountdownBlock-BTPefclD.js → CountdownBlock-BNvuXucv.js} +1 -1
- package/dist/{CountdownToolbar-Dvr2icg-.js → CountdownToolbar-Dl82DAmI.js} +2 -2
- package/dist/{DesignReferenceSidebar-BP32MgpS.js → DesignReferenceSidebar-Bs5AMxVd.js} +3 -3
- package/dist/{IssuesPanel-B1LT91IX.js → IssuesPanel-CqQa2BtU.js} +2 -2
- package/dist/{ModuleBrowserModal-CWegFoOA.js → ModuleBrowserModal-BWWgF0LC.js} +7 -7
- package/dist/{ModulePreviewCanvas-D9WUSSRT.js → ModulePreviewCanvas-D7Tk5HOt.js} +2 -2
- package/dist/{NumberWithSuffix-CxUBW_V2.js → NumberWithSuffix-DVy5HxMi.js} +1 -1
- package/dist/{ParagraphEditor-DrAz2yot.js → ParagraphEditor-DVSGdMOo.js} +7 -7
- package/dist/{RichTextEditorContent-gR169m1-.js → RichTextEditorContent-DN-fRjMa.js} +3 -3
- package/dist/{SaveModuleDialog-DWidA0c9.js → SaveModuleDialog-CkEYkyVD.js} +5 -5
- package/dist/{SnapshotHistory-CIo2Jaw-.js → SnapshotHistory-Nx9wrlbF.js} +3 -3
- package/dist/{TemplateScoringPanel-seBvvn8O.js → TemplateScoringPanel-BG9M-29t.js} +2 -2
- package/dist/{TestEmailModal-BuCuWp3N.js → TestEmailModal-CRjtEs6S.js} +3 -3
- package/dist/{TitleEditor-BmW0uMl7.js → TitleEditor-CvtV4pCA.js} +6 -6
- package/dist/{TplModal-YFpBaiLj.js → TplModal-BudEYVcJ.js} +3 -3
- package/dist/{blockTypeIcons-DCkHXPhx.js → blockTypeIcons-Dd-UvfnC.js} +1 -1
- package/dist/bundle-stats.json +6 -6
- package/dist/cdn/chunks/{AiFeatureMenu-Dayzk2H7.js → AiFeatureMenu-DKOv8VnB.js} +2 -2
- package/dist/cdn/chunks/{AiFeatureMenu-Dayzk2H7.js.map → AiFeatureMenu-DKOv8VnB.js.map} +1 -1
- package/dist/cdn/chunks/{BlockIssueBadge-D_US2wqo.js → BlockIssueBadge-DpiSTwM7.js} +4 -4
- package/dist/cdn/chunks/{BlockIssueBadge-D_US2wqo.js.map → BlockIssueBadge-DpiSTwM7.js.map} +1 -1
- package/dist/cdn/chunks/{CloudEditor-CrZk-OwQ.js → CloudEditor-xc_uOEgn.js} +169 -168
- package/dist/cdn/chunks/{CloudEditor-CrZk-OwQ.js.map → CloudEditor-xc_uOEgn.js.map} +1 -1
- package/dist/cdn/chunks/{CollaboratorBar-C4CFs5EJ.js → CollaboratorBar-VWfPri_h.js} +3 -3
- package/dist/cdn/chunks/{CollaboratorBar-C4CFs5EJ.js.map → CollaboratorBar-VWfPri_h.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownBlock-D6lCXhZA.js → CountdownBlock-BKsCWboK.js} +2 -2
- package/dist/cdn/chunks/{CountdownBlock-D6lCXhZA.js.map → CountdownBlock-BKsCWboK.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownToolbar-BsGUxoRv.js → CountdownToolbar-BLtECDNb.js} +3 -3
- package/dist/cdn/chunks/{CountdownToolbar-BsGUxoRv.js.map → CountdownToolbar-BLtECDNb.js.map} +1 -1
- package/dist/cdn/chunks/{IssuesPanel-DeHTmRDz.js → IssuesPanel-BW2piyvs.js} +8 -8
- package/dist/cdn/chunks/{IssuesPanel-DeHTmRDz.js.map → IssuesPanel-BW2piyvs.js.map} +1 -1
- package/dist/cdn/chunks/{ModuleBrowserModal-Cgjz4xAz.js → ModuleBrowserModal-TLlKpvjX.js} +8 -8
- package/dist/cdn/chunks/{ModuleBrowserModal-Cgjz4xAz.js.map → ModuleBrowserModal-TLlKpvjX.js.map} +1 -1
- package/dist/cdn/chunks/{ModulePreviewCanvas-CeS9PsAA.js → ModulePreviewCanvas-wu7y-vrh.js} +2 -2
- package/dist/cdn/chunks/{ModulePreviewCanvas-CeS9PsAA.js.map → ModulePreviewCanvas-wu7y-vrh.js.map} +1 -1
- package/dist/cdn/chunks/{NumberWithSuffix-Bp-idLCc.js → NumberWithSuffix-DxoUtTMr.js} +2 -2
- package/dist/cdn/chunks/{NumberWithSuffix-Bp-idLCc.js.map → NumberWithSuffix-DxoUtTMr.js.map} +1 -1
- package/dist/cdn/chunks/{ParagraphEditor-fM9aFu8T.js → ParagraphEditor-DvxIO2LN.js} +33 -33
- package/dist/cdn/chunks/{ParagraphEditor-fM9aFu8T.js.map → ParagraphEditor-DvxIO2LN.js.map} +1 -1
- package/dist/cdn/chunks/{RichTextEditorContent-DwNPE5H5.js → RichTextEditorContent-Dm9GXJmo.js} +3 -3
- package/dist/cdn/chunks/{RichTextEditorContent-DwNPE5H5.js.map → RichTextEditorContent-Dm9GXJmo.js.map} +1 -1
- package/dist/cdn/chunks/{SaveModuleDialog-BrtDXzIz.js → SaveModuleDialog-BRAdVcYM.js} +4 -4
- package/dist/cdn/chunks/{SaveModuleDialog-BrtDXzIz.js.map → SaveModuleDialog-BRAdVcYM.js.map} +1 -1
- package/dist/cdn/chunks/{TitleEditor-D0rSnye0.js → TitleEditor-D3gPRd0x.js} +8 -8
- package/dist/cdn/chunks/{TitleEditor-D0rSnye0.js.map → TitleEditor-D3gPRd0x.js.map} +1 -1
- package/dist/cdn/chunks/blockTypeIcons-C2cm4RjU.js +22 -0
- package/dist/cdn/chunks/{blockTypeIcons-YOEe5mDE.js.map → blockTypeIcons-C2cm4RjU.js.map} +1 -1
- package/dist/{de-CATfXDKV.js → cdn/chunks/de-DIAGP7yH.js} +2 -6
- package/dist/cdn/chunks/de-DIAGP7yH.js.map +1 -0
- package/dist/{en-CwCAgYL5.js → cdn/chunks/en-nqIW8Q9W.js} +2 -6
- package/dist/cdn/chunks/en-nqIW8Q9W.js.map +1 -0
- package/dist/cdn/chunks/{extensions-GYsbQFPr.js → extensions-SS1ywPUR.js} +21 -21
- package/dist/cdn/chunks/{extensions-GYsbQFPr.js.map → extensions-SS1ywPUR.js.map} +1 -1
- package/dist/cdn/chunks/{features-D-2kVhHY.js → features-CwZTdcbt.js} +988 -967
- package/dist/cdn/chunks/features-CwZTdcbt.js.map +1 -0
- package/dist/cdn/chunks/{icons-fZoyKV_s.js → icons-CbNEr1kc.js} +11 -25
- package/dist/cdn/chunks/icons-CbNEr1kc.js.map +1 -0
- package/dist/cdn/chunks/{media-library-CO2WOETY.js → media-library-BRpHZOl7.js} +76 -76
- package/dist/cdn/chunks/{media-library-CO2WOETY.js.map → media-library-BRpHZOl7.js.map} +1 -1
- package/dist/{pt-BR-D3Mg7AKe.js → cdn/chunks/pt-BR-DCNnLLx9.js} +2 -6
- package/dist/cdn/chunks/pt-BR-DCNnLLx9.js.map +1 -0
- package/dist/cdn/chunks/{quality-BxPiS-wv.js → quality-BqJqIPRU.js} +494 -484
- package/dist/cdn/chunks/quality-BqJqIPRU.js.map +1 -0
- package/dist/cdn/chunks/{renderer-CfHPFI5v.js → renderer-CGVYkdUi.js} +99 -82
- package/dist/cdn/chunks/renderer-CGVYkdUi.js.map +1 -0
- package/dist/cdn/chunks/{src-ftxPuuQh.js → src-CvzfrFlT.js} +8 -8
- package/dist/cdn/chunks/{src-ftxPuuQh.js.map → src-CvzfrFlT.js.map} +1 -1
- package/dist/cdn/chunks/{styles-CVUvPdKD.js → styles-2P5yvfsS.js} +1043 -1072
- package/dist/cdn/chunks/styles-2P5yvfsS.js.map +1 -0
- package/dist/cdn/editor.css +1 -1
- package/dist/cdn/editor.js +109 -100
- package/dist/cdn/editor.js.map +1 -1
- package/dist/{cloud-VxYMtfXC.js → cloud-BBC7bv8q.js} +1 -1
- package/dist/{cdn/chunks/de-CATfXDKV.js → de-DIAGP7yH.js} +0 -8
- package/dist/{dist-CIV3Brg-.js → dist-GAmhYvUK.js} +3 -5
- package/dist/{cdn/chunks/en-CwCAgYL5.js → en-nqIW8Q9W.js} +0 -8
- package/dist/{extensions-Mj2-D8uK.js → extensions-C87ZSllQ.js} +3 -3
- package/dist/index.d.ts +8 -0
- package/dist/keys-Vt3XipJl.js +10 -0
- package/dist/{cdn/chunks/pt-BR-D3Mg7AKe.js → pt-BR-DCNnLLx9.js} +0 -8
- package/dist/style.css +1 -1
- package/dist/{styles-CxwIlb7Y.js → styles-DOjWbqA9.js} +1031 -1074
- package/dist/templatical-editor.js +116 -107
- package/dist/{useCloudI18n-DKWJg6rJ.js → useCloudI18n-sRfoQCZY.js} +1 -1
- package/dist/{useEditorCore-CEkf_VWX.js → useEditorCore-DxApq2hZ.js} +713 -690
- package/dist/{useI18n-Besvmtxy.js → useI18n-lF6hYgZu.js} +1 -1
- package/dist/{useMergeTag-WNzaCpXR.js → useMergeTag-CZVI7Xe5.js} +3 -3
- package/dist/{usePopoverRoot-CKt956u-.js → usePopoverRoot-p2BanBI7.js} +1 -1
- package/package.json +8 -8
- package/dist/cdn/chunks/blockTypeIcons-YOEe5mDE.js +0 -22
- package/dist/cdn/chunks/de-CATfXDKV.js.map +0 -1
- package/dist/cdn/chunks/en-CwCAgYL5.js.map +0 -1
- package/dist/cdn/chunks/features-D-2kVhHY.js.map +0 -1
- package/dist/cdn/chunks/icons-fZoyKV_s.js.map +0 -1
- package/dist/cdn/chunks/pt-BR-D3Mg7AKe.js.map +0 -1
- package/dist/cdn/chunks/quality-BxPiS-wv.js.map +0 -1
- package/dist/cdn/chunks/renderer-CfHPFI5v.js.map +0 -1
- package/dist/cdn/chunks/styles-CVUvPdKD.js.map +0 -1
- package/dist/keys-BiQlvx51.js +0 -10
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { $ as
|
|
3
|
-
import {
|
|
4
|
-
import { t as
|
|
5
|
-
import { t as
|
|
6
|
-
import { t as
|
|
7
|
-
import { _ as
|
|
8
|
-
import { i as q, n as J, r as Y, t as
|
|
1
|
+
import { C as e, F as t, G as n, H as r, J as i, L as a, M as o, O as s, P as c, T as l, V as u, Y as d, Z as f, b as p, c as m, ct as h, f as g, g as _, h as v, it as y, l as b, m as x, n as S, o as C, ot as w, p as T, s as E, st as D, t as ee, u as O, v as k, x as A, y as j, z as M } from "./draggable-BwWMFq33.js";
|
|
2
|
+
import { $ as N, Bt as P, Cn as te, Ct as F, Dn as I, Dt as L, F as R, Ft as z, G as B, Gt as ne, H as re, I as ie, J as ae, Jt as oe, K as se, Kt as ce, L as le, Lt as ue, M as de, Mt as fe, N as pe, O as V, P as me, Pt as he, Qt as ge, R as _e, St as ve, Tn as ye, Tt as be, U as xe, V as Se, Vt as Ce, W as we, Wt as Te, Xt as Ee, Yt as De, Zt as Oe, _n as ke, at as Ae, bt as je, ct as Me, dn as Ne, et as Pe, hn as Fe, in as Ie, it as Le, j as Re, kt as ze, mn as Be, mt as Ve, nn as He, q as Ue, qt as We, rn as Ge, rt as Ke, tn as qe, ut as Je, vn as Ye, wn as Xe, wt as Ze, xn as Qe, xt as $e, yn as et, yt as tt, z as nt, zt as rt } from "./features-CwZTdcbt.js";
|
|
3
|
+
import { A as it, F as at, G as ot, I as st, M as ct, N as lt, O as ut, P as dt, T as H, V as ft, Y as pt, _ as mt, b as ht, c as gt, h as _t, m as vt, o as yt, s as bt, u as xt, v as St, y as Ct, z as wt } from "./icons-CbNEr1kc.js";
|
|
4
|
+
import { t as Tt } from "./readableTextColor-f8Kykfnh.js";
|
|
5
|
+
import { t as Et } from "./CountdownBlock-BKsCWboK.js";
|
|
6
|
+
import { t as Dt } from "./blockTypeIcons-C2cm4RjU.js";
|
|
7
|
+
import { _ as Ot, c as kt, f as U, g as At, h as W, l as jt, m as G, p as K, t as Mt } from "./styleConstants-lGobwiLH.js";
|
|
8
|
+
import { i as q, n as J, r as Y, t as Nt } from "./NumberWithSuffix-DxoUtTMr.js";
|
|
9
9
|
//#region src/utils/resolveLintOptions.ts
|
|
10
|
-
function
|
|
10
|
+
function Pt(e) {
|
|
11
11
|
return {
|
|
12
12
|
...e.lint,
|
|
13
13
|
locale: e.locale
|
|
@@ -15,19 +15,19 @@ function Nt(e) {
|
|
|
15
15
|
}
|
|
16
16
|
//#endregion
|
|
17
17
|
//#region src/components/Canvas.vue?vue&type=script&setup=true&lang.ts
|
|
18
|
-
var
|
|
18
|
+
var Ft = ["aria-label"], It = {
|
|
19
19
|
key: 0,
|
|
20
20
|
class: "tpl-canvas-empty-content tpl:flex tpl:flex-col tpl:items-center"
|
|
21
|
-
},
|
|
21
|
+
}, Lt = { class: "tpl-canvas-empty-icon tpl:mb-4 tpl:text-[var(--tpl-primary)]" }, Rt = { class: "tpl-canvas-empty-title tpl:m-0 tpl:mb-2 tpl:text-base tpl:font-semibold tpl:text-[var(--tpl-primary)]" }, zt = { class: "tpl-canvas-empty-text tpl:m-0 tpl:text-sm tpl:text-[var(--tpl-text-dim)]" }, Bt = {
|
|
22
22
|
key: 0,
|
|
23
23
|
class: "tpl:m-0 tpl:mt-2 tpl:flex tpl:flex-wrap tpl:items-center tpl:justify-center tpl:gap-x-1 tpl:gap-y-0.5 tpl:text-sm tpl:text-[var(--tpl-text-dim)]"
|
|
24
|
-
},
|
|
24
|
+
}, Vt = {
|
|
25
25
|
key: 1,
|
|
26
26
|
class: "tpl:m-0 tpl:mt-4 tpl:flex tpl:flex-wrap tpl:items-center tpl:justify-center tpl:gap-x-1 tpl:gap-y-0.5 tpl:text-sm tpl:text-[var(--tpl-text-dim)]"
|
|
27
|
-
},
|
|
27
|
+
}, Ht = { class: "tpl:relative" }, Ut = {
|
|
28
28
|
class: "tpl:inline-flex tpl:size-3 tpl:items-center tpl:justify-center tpl:rounded-full tpl:text-[8px] tpl:font-bold",
|
|
29
29
|
style: { "background-color": "color-mix(\n in srgb,\n var(--tpl-bg) 30%,\n transparent\n )" }
|
|
30
|
-
},
|
|
30
|
+
}, Wt = /* @__PURE__ */ Ke(/* @__PURE__ */ A({
|
|
31
31
|
__name: "Canvas",
|
|
32
32
|
props: {
|
|
33
33
|
viewport: {},
|
|
@@ -43,87 +43,86 @@ var Pt = ["aria-label"], Ft = {
|
|
|
43
43
|
"open-design-reference"
|
|
44
44
|
],
|
|
45
45
|
setup(e, { emit: t }) {
|
|
46
|
-
let
|
|
47
|
-
section:
|
|
48
|
-
title:
|
|
49
|
-
paragraph:
|
|
50
|
-
image:
|
|
51
|
-
button:
|
|
52
|
-
divider:
|
|
53
|
-
spacer:
|
|
54
|
-
html:
|
|
55
|
-
social:
|
|
56
|
-
menu:
|
|
57
|
-
table:
|
|
58
|
-
video:
|
|
59
|
-
countdown:
|
|
60
|
-
custom:
|
|
61
|
-
},
|
|
62
|
-
get: () =>
|
|
46
|
+
let n = {
|
|
47
|
+
section: le,
|
|
48
|
+
title: _e,
|
|
49
|
+
paragraph: re,
|
|
50
|
+
image: we,
|
|
51
|
+
button: fe,
|
|
52
|
+
divider: Ue,
|
|
53
|
+
spacer: pe,
|
|
54
|
+
html: se,
|
|
55
|
+
social: me,
|
|
56
|
+
menu: xe,
|
|
57
|
+
table: de,
|
|
58
|
+
video: Re,
|
|
59
|
+
countdown: Et,
|
|
60
|
+
custom: ae
|
|
61
|
+
}, i = e, s = t, { t: d } = z(), { t: p } = Pe(), m = Ie(oe, "Canvas"), b = l(Te, null), S = l(P, null), C = l(Ce, {}), A = g(() => (C.plan?.hasFeature("ai_generation") ?? !1) && (C.ai?.isFeatureEnabled("chat") ?? !1)), M = g(() => (C.plan?.hasFeature("ai_generation") ?? !1) && (C.ai?.isFeatureEnabled("designToTemplate") ?? !1)), N = g({
|
|
62
|
+
get: () => i.content.blocks,
|
|
63
63
|
set: (e) => {
|
|
64
|
-
|
|
65
|
-
...
|
|
64
|
+
m.setContent({
|
|
65
|
+
...i.content,
|
|
66
66
|
blocks: e
|
|
67
67
|
});
|
|
68
68
|
}
|
|
69
|
-
}), te =
|
|
70
|
-
switch (
|
|
69
|
+
}), te = g(() => {
|
|
70
|
+
switch (i.viewport) {
|
|
71
71
|
case "mobile": return 375;
|
|
72
|
-
|
|
73
|
-
default: return o.content.settings.width;
|
|
72
|
+
default: return i.content.settings.width;
|
|
74
73
|
}
|
|
75
|
-
}), F =
|
|
74
|
+
}), F = g(() => ({ fontFamily: i.content.settings.fontFamily })), I = g(() => N.value.length === 0 && !i.previewMode), L = f(0), R = g(() => I.value && L.value > 0);
|
|
76
75
|
function B() {
|
|
77
76
|
I.value && (L.value += 1);
|
|
78
77
|
}
|
|
79
|
-
function
|
|
78
|
+
function ne() {
|
|
80
79
|
I.value && (L.value = Math.max(0, L.value - 1));
|
|
81
80
|
}
|
|
82
|
-
function
|
|
81
|
+
function ie() {
|
|
83
82
|
L.value = 0;
|
|
84
83
|
}
|
|
85
|
-
function
|
|
86
|
-
|
|
84
|
+
function ce(e) {
|
|
85
|
+
i.previewMode || e.target === e.currentTarget && s("select-block", null);
|
|
87
86
|
}
|
|
88
|
-
function
|
|
89
|
-
return
|
|
87
|
+
function ue(e) {
|
|
88
|
+
return Se(e, S, n);
|
|
90
89
|
}
|
|
91
90
|
function V(e) {
|
|
92
|
-
return
|
|
91
|
+
return i.lockedBlocks?.get(e) ?? null;
|
|
93
92
|
}
|
|
94
|
-
function
|
|
95
|
-
e.type === "custom" &&
|
|
93
|
+
function he(e, t) {
|
|
94
|
+
e.type === "custom" && m.updateBlock(e.id, {
|
|
96
95
|
fieldValues: t.fieldValues,
|
|
97
96
|
dataSourceFetched: t.dataSourceFetched
|
|
98
97
|
});
|
|
99
98
|
}
|
|
100
|
-
return (t,
|
|
99
|
+
return (t, n) => (o(), _("div", {
|
|
101
100
|
"data-testid": "canvas-wrapper",
|
|
102
101
|
role: "region",
|
|
103
|
-
"aria-label":
|
|
102
|
+
"aria-label": y(d).landmarks.canvas,
|
|
104
103
|
class: "tpl-canvas-wrapper tpl:relative tpl:rounded-lg",
|
|
105
|
-
style:
|
|
104
|
+
style: D({
|
|
106
105
|
width: `${te.value}px`,
|
|
107
106
|
boxShadow: e.darkMode ? "none" : "var(--tpl-shadow-xl)",
|
|
108
107
|
transition: "width 300ms cubic-bezier(0.34, 1.56, 0.64, 1)"
|
|
109
108
|
})
|
|
110
|
-
}, [
|
|
109
|
+
}, [T("div", {
|
|
111
110
|
class: "tpl-canvas-bg tpl:absolute tpl:inset-0 tpl:rounded-lg tpl:pointer-events-none",
|
|
112
|
-
style:
|
|
111
|
+
style: D({
|
|
113
112
|
backgroundColor: e.content.settings.backgroundColor,
|
|
114
113
|
...e.darkMode ? { filter: "invert(1) hue-rotate(180deg)" } : {},
|
|
115
114
|
transition: "filter 300ms ease"
|
|
116
115
|
})
|
|
117
|
-
}, null, 4),
|
|
118
|
-
class:
|
|
116
|
+
}, null, 4), T("div", {
|
|
117
|
+
class: w(["tpl-canvas tpl:relative tpl:rounded-lg", {
|
|
119
118
|
"tpl-canvas--dark-mode": e.darkMode,
|
|
120
119
|
"tpl-preview-mode": e.previewMode
|
|
121
120
|
}]),
|
|
122
|
-
style:
|
|
123
|
-
onClick:
|
|
124
|
-
}, [j(
|
|
125
|
-
modelValue:
|
|
126
|
-
"onUpdate:modelValue":
|
|
121
|
+
style: D(F.value),
|
|
122
|
+
onClick: ce
|
|
123
|
+
}, [j(y(ee), {
|
|
124
|
+
modelValue: N.value,
|
|
125
|
+
"onUpdate:modelValue": n[2] ||= (e) => N.value = e,
|
|
127
126
|
group: "blocks",
|
|
128
127
|
animation: 150,
|
|
129
128
|
"ghost-class": "tpl-ghost",
|
|
@@ -134,73 +133,73 @@ var Pt = ["aria-label"], Ft = {
|
|
|
134
133
|
disabled: e.previewMode,
|
|
135
134
|
draggable: ".tpl-block-item",
|
|
136
135
|
"force-fallback": !0,
|
|
137
|
-
class:
|
|
136
|
+
class: w([
|
|
138
137
|
"tpl-canvas-blocks",
|
|
139
138
|
I.value ? "tpl-canvas-empty tpl:m-6 tpl:flex tpl:min-h-[400px] tpl:flex-col tpl:items-center tpl:justify-center tpl:rounded-xl tpl:border-2 tpl:border-dashed tpl:px-10 tpl:py-12 tpl:text-center tpl:bg-[var(--tpl-bg-elevated)] tpl:font-[var(--tpl-font-family)] tpl:transition-colors tpl:duration-150" : "",
|
|
140
|
-
I.value &&
|
|
141
|
-
I.value && !
|
|
139
|
+
I.value && R.value ? "tpl-canvas-empty--drag-over tpl:border-[var(--tpl-primary-hover)] tpl:bg-[var(--tpl-primary-light)]" : "",
|
|
140
|
+
I.value && !R.value ? "tpl:border-[var(--tpl-primary)]" : ""
|
|
142
141
|
]),
|
|
143
142
|
onDragenter: B,
|
|
144
|
-
onDragleave:
|
|
145
|
-
onDrop:
|
|
143
|
+
onDragleave: ne,
|
|
144
|
+
onDrop: ie
|
|
146
145
|
}, {
|
|
147
|
-
default:
|
|
148
|
-
|
|
146
|
+
default: u(() => [I.value ? (o(), _("div", It, [
|
|
147
|
+
T("div", Lt, [j(y(_t), {
|
|
149
148
|
size: 48,
|
|
150
149
|
"stroke-width": 1
|
|
151
150
|
})]),
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
k(
|
|
156
|
-
|
|
151
|
+
T("p", Rt, h(y(d).canvas.noBlocks), 1),
|
|
152
|
+
T("p", zt, h(y(d).canvas.dragHint), 1),
|
|
153
|
+
A.value && y(p) ? (o(), _("p", Bt, [
|
|
154
|
+
k(h(y(d).canvas.aiHintChat) + " ", 1),
|
|
155
|
+
T("button", {
|
|
157
156
|
class: "tpl:inline-flex tpl:shrink-0 tpl:cursor-pointer tpl:items-center tpl:gap-1 tpl:whitespace-nowrap tpl:rounded-[var(--tpl-radius-sm)] tpl:border-none tpl:px-2 tpl:py-0.5 tpl:text-sm tpl:font-semibold tpl:transition-colors tpl:duration-150 tpl:bg-[var(--tpl-primary-light)] tpl:text-[var(--tpl-primary-hover)]",
|
|
158
|
-
onClick:
|
|
159
|
-
}, [j(
|
|
157
|
+
onClick: n[0] ||= (e) => s("open-ai-chat")
|
|
158
|
+
}, [j(y(Je), {
|
|
160
159
|
size: 14,
|
|
161
160
|
"stroke-width": 2
|
|
162
|
-
}), k(" " +
|
|
163
|
-
k(" " +
|
|
164
|
-
])) :
|
|
165
|
-
M.value &&
|
|
166
|
-
k(
|
|
167
|
-
|
|
161
|
+
}), k(" " + h(y(p).aiMenu.aiAssistant), 1)]),
|
|
162
|
+
k(" " + h(y(d).canvas.aiHintChatSuffix), 1)
|
|
163
|
+
])) : v("", !0),
|
|
164
|
+
M.value && y(p) ? (o(), _("p", Vt, [
|
|
165
|
+
k(h(y(d).canvas.aiHintDesign) + " ", 1),
|
|
166
|
+
T("button", {
|
|
168
167
|
class: "tpl:inline-flex tpl:shrink-0 tpl:cursor-pointer tpl:items-center tpl:gap-1 tpl:whitespace-nowrap tpl:rounded-[var(--tpl-radius-sm)] tpl:border-none tpl:px-2 tpl:py-0.5 tpl:text-sm tpl:font-semibold tpl:transition-colors tpl:duration-150 tpl:bg-[var(--tpl-primary-light)] tpl:text-[var(--tpl-primary-hover)]",
|
|
169
|
-
onClick:
|
|
170
|
-
}, [j(
|
|
168
|
+
onClick: n[1] ||= (e) => s("open-design-reference")
|
|
169
|
+
}, [j(y($e), {
|
|
171
170
|
size: 14,
|
|
172
171
|
"stroke-width": 2
|
|
173
|
-
}), k(" " +
|
|
174
|
-
k(" " +
|
|
175
|
-
])) :
|
|
176
|
-
])) :
|
|
172
|
+
}), k(" " + h(y(p).aiMenu.designToTemplate), 1)]),
|
|
173
|
+
k(" " + h(y(d).canvas.aiHintDesignSuffix), 1)
|
|
174
|
+
])) : v("", !0)
|
|
175
|
+
])) : v("", !0), (o(!0), _(O, null, c(N.value, (t) => r((o(), _("div", {
|
|
177
176
|
key: t.id,
|
|
178
177
|
class: "tpl-block-item"
|
|
179
|
-
}, [
|
|
178
|
+
}, [T("div", Ht, [V(t.id) ? (o(), _("div", {
|
|
180
179
|
key: 0,
|
|
181
180
|
class: "tpl-collab-lock tpl:pointer-events-none tpl:absolute tpl:inset-0 tpl:z-[4] tpl:rounded-sm",
|
|
182
|
-
style:
|
|
181
|
+
style: D({
|
|
183
182
|
outline: `2px solid ${V(t.id).color}`,
|
|
184
183
|
outlineOffset: "-1px"
|
|
185
184
|
})
|
|
186
|
-
}, [
|
|
185
|
+
}, [T("span", {
|
|
187
186
|
class: "tpl:absolute tpl:-top-0.5 tpl:left-1/2 tpl:z-[5] tpl:flex tpl:-translate-x-1/2 tpl:-translate-y-full tpl:items-center tpl:gap-1 tpl:rounded-full tpl:px-2 tpl:py-0.5 tpl:text-[10px] tpl:font-medium tpl:whitespace-nowrap",
|
|
188
|
-
style:
|
|
187
|
+
style: D({
|
|
189
188
|
backgroundColor: V(t.id).color,
|
|
190
|
-
color:
|
|
189
|
+
color: y(Tt)(V(t.id).color)
|
|
191
190
|
})
|
|
192
|
-
}, [
|
|
191
|
+
}, [T("span", Ut, h(V(t.id).name.charAt(0)), 1), k(" " + h(V(t.id).name), 1)], 4)], 4)) : v("", !0), j(nt, {
|
|
193
192
|
block: t,
|
|
194
193
|
"is-selected": !e.previewMode && e.selectedBlockId === t.id && !V(t.id),
|
|
195
194
|
viewport: e.viewport,
|
|
196
195
|
"preview-mode": e.previewMode,
|
|
197
|
-
onSelect: (n) => e.previewMode || V(t.id) ? void 0 :
|
|
196
|
+
onSelect: (n) => e.previewMode || V(t.id) ? void 0 : s("select-block", t.id)
|
|
198
197
|
}, {
|
|
199
|
-
default:
|
|
198
|
+
default: u(() => [(o(), x(a(ue(t)), {
|
|
200
199
|
block: t,
|
|
201
200
|
viewport: e.viewport,
|
|
202
|
-
onFetchData: (e) =>
|
|
203
|
-
onUpdate: (e) =>
|
|
201
|
+
onFetchData: (e) => he(t, e),
|
|
202
|
+
onUpdate: (e) => y(m).updateBlock(t.id, e)
|
|
204
203
|
}, null, 40, [
|
|
205
204
|
"block",
|
|
206
205
|
"viewport",
|
|
@@ -214,45 +213,55 @@ var Pt = ["aria-label"], Ft = {
|
|
|
214
213
|
"viewport",
|
|
215
214
|
"preview-mode",
|
|
216
215
|
"onSelect"
|
|
217
|
-
])])])), [[
|
|
216
|
+
])])])), [[E, !y(b)?.isHidden(t.id)]])), 128))]),
|
|
218
217
|
_: 1
|
|
219
218
|
}, 8, [
|
|
220
219
|
"modelValue",
|
|
221
220
|
"disabled",
|
|
222
221
|
"class"
|
|
223
|
-
])], 6)], 12,
|
|
222
|
+
])], 6)], 12, Ft));
|
|
224
223
|
}
|
|
225
|
-
}), [["__scopeId", "data-v-
|
|
224
|
+
}), [["__scopeId", "data-v-1aed1727"]]), Gt = A({
|
|
225
|
+
name: "CustomBlockStylesheets",
|
|
226
|
+
setup() {
|
|
227
|
+
let t = l(ce, null);
|
|
228
|
+
return () => t ? t.value.map((t, n) => e("style", {
|
|
229
|
+
key: n,
|
|
230
|
+
"data-tpl-custom-block-stylesheet": "",
|
|
231
|
+
innerHTML: t
|
|
232
|
+
})) : null;
|
|
233
|
+
}
|
|
234
|
+
}), Kt = ["aria-label"], qt = {
|
|
226
235
|
key: 0,
|
|
227
236
|
class: "tpl:border-b tpl:px-1 tpl:pb-1 tpl:border-[var(--tpl-border)]"
|
|
228
|
-
},
|
|
237
|
+
}, Jt = ["aria-label"], Yt = {
|
|
229
238
|
key: 0,
|
|
230
239
|
class: "tpl:flex-1 tpl:truncate tpl:text-sm tpl:font-medium"
|
|
231
|
-
},
|
|
240
|
+
}, Xt = {
|
|
232
241
|
key: 1,
|
|
233
242
|
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)]"
|
|
234
|
-
},
|
|
243
|
+
}, Zt = [
|
|
235
244
|
"data-palette-type",
|
|
236
245
|
"aria-label",
|
|
237
246
|
"onClick",
|
|
238
247
|
"onKeydown"
|
|
239
|
-
],
|
|
248
|
+
], Qt = { class: "tpl:flex tpl:shrink-0 tpl:items-center tpl:justify-center tpl:transition-transform tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)] hover:tpl:scale-105" }, $t = {
|
|
240
249
|
key: 0,
|
|
241
250
|
class: "tpl:truncate tpl:text-sm tpl:font-medium"
|
|
242
|
-
},
|
|
251
|
+
}, en = /* @__PURE__ */ A({
|
|
243
252
|
__name: "Sidebar",
|
|
244
253
|
setup(e) {
|
|
245
|
-
let { t, format: n } =
|
|
254
|
+
let { t, format: n } = z(), { t: r } = Pe(), i = l(ne, []), s = l(rt, void 0), d = l(oe, null), p = l(Ce, {}), m = g(() => (p.savedModules?.moduleCount.value ?? 0) > 0), b = f(!1), S = f(!1);
|
|
246
255
|
function C() {
|
|
247
|
-
S.value || (
|
|
256
|
+
S.value || (b.value = !1);
|
|
248
257
|
}
|
|
249
|
-
function
|
|
258
|
+
function w() {
|
|
250
259
|
S.value = !0;
|
|
251
260
|
}
|
|
252
|
-
function
|
|
261
|
+
function E() {
|
|
253
262
|
S.value = !1;
|
|
254
263
|
}
|
|
255
|
-
let
|
|
264
|
+
let k = [
|
|
256
265
|
"section",
|
|
257
266
|
"image",
|
|
258
267
|
"title",
|
|
@@ -265,175 +274,175 @@ var Pt = ["aria-label"], Ft = {
|
|
|
265
274
|
"table",
|
|
266
275
|
"spacer",
|
|
267
276
|
"html"
|
|
268
|
-
],
|
|
269
|
-
let e =
|
|
277
|
+
], A = g(() => {
|
|
278
|
+
let e = k.map((e) => ({
|
|
270
279
|
type: e,
|
|
271
|
-
label:
|
|
280
|
+
label: he(e, t)
|
|
272
281
|
}));
|
|
273
282
|
return p.plan && e.splice(-1, 0, {
|
|
274
283
|
type: "countdown",
|
|
275
|
-
label:
|
|
284
|
+
label: he("countdown", t)
|
|
276
285
|
}), e;
|
|
277
|
-
}), M =
|
|
286
|
+
}), M = g(() => i.map((e) => ({
|
|
278
287
|
type: `custom:${e.type}`,
|
|
279
288
|
label: e.name,
|
|
280
289
|
isCustom: !0,
|
|
281
290
|
icon: e.icon
|
|
282
|
-
}))), N =
|
|
283
|
-
function
|
|
291
|
+
}))), N = g(() => [...A.value, ...M.value]);
|
|
292
|
+
function P(e) {
|
|
284
293
|
if (e.isCustom) {
|
|
285
|
-
let t = e.type.replace("custom:", ""), n =
|
|
286
|
-
if (n) return
|
|
294
|
+
let t = e.type.replace("custom:", ""), n = i.find((e) => e.type === t);
|
|
295
|
+
if (n) return Xe(n);
|
|
287
296
|
}
|
|
288
|
-
return
|
|
297
|
+
return te(e.type, s);
|
|
289
298
|
}
|
|
290
299
|
function F(e) {
|
|
291
|
-
if (!
|
|
292
|
-
let t =
|
|
293
|
-
|
|
300
|
+
if (!d) return;
|
|
301
|
+
let t = P(e);
|
|
302
|
+
d.addBlock(t), d.selectBlock(t.id);
|
|
294
303
|
}
|
|
295
304
|
function I(e, t) {
|
|
296
305
|
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), F(t));
|
|
297
306
|
}
|
|
298
|
-
return (e,
|
|
299
|
-
"aria-label":
|
|
307
|
+
return (e, i) => (o(), _("aside", {
|
|
308
|
+
"aria-label": y(t).sidebarNav.palette,
|
|
300
309
|
class: "tpl-sidebar-rail tpl:absolute tpl:top-14 tpl:bottom-0 tpl:left-0 tpl:z-40 tpl:overflow-hidden",
|
|
301
|
-
style:
|
|
302
|
-
width:
|
|
310
|
+
style: D({
|
|
311
|
+
width: b.value ? "200px" : "48px",
|
|
303
312
|
backgroundColor: "var(--tpl-bg-elevated)",
|
|
304
313
|
borderRight: "1px solid var(--tpl-border)",
|
|
305
|
-
boxShadow:
|
|
314
|
+
boxShadow: b.value ? "var(--tpl-shadow-lg)" : "none",
|
|
306
315
|
transition: "width 200ms cubic-bezier(0.16, 1, 0.3, 1), box-shadow 200ms cubic-bezier(0.16, 1, 0.3, 1)"
|
|
307
316
|
}),
|
|
308
|
-
onMouseenter:
|
|
317
|
+
onMouseenter: i[1] ||= (e) => b.value = !0,
|
|
309
318
|
onMouseleave: C,
|
|
310
|
-
onFocusin:
|
|
311
|
-
onFocusout:
|
|
312
|
-
}, [
|
|
319
|
+
onFocusin: i[2] ||= (e) => b.value = !0,
|
|
320
|
+
onFocusout: i[3] ||= (e) => b.value = !1
|
|
321
|
+
}, [m.value && y(r) ? (o(), _("div", qt, [T("button", {
|
|
313
322
|
type: "button",
|
|
314
|
-
"aria-label":
|
|
323
|
+
"aria-label": y(t).sidebarNav.browseModules,
|
|
315
324
|
class: "tpl:flex tpl:h-10 tpl:w-full tpl:cursor-pointer tpl:items-center tpl:gap-3 tpl:rounded-[var(--tpl-radius-sm)] tpl:border-none tpl:bg-transparent tpl:px-3 tpl:text-[var(--tpl-text-muted)] tpl:transition-all tpl:duration-[120ms] hover:tpl:bg-[var(--tpl-primary-light)] hover:tpl:text-[var(--tpl-primary)]",
|
|
316
|
-
style:
|
|
317
|
-
onClick:
|
|
325
|
+
style: D({ justifyContent: b.value ? "flex-start" : "center" }),
|
|
326
|
+
onClick: i[0] ||= (e) => y(p).savedModules?.openBrowser()
|
|
318
327
|
}, [
|
|
319
|
-
j(
|
|
328
|
+
j(y(it), {
|
|
320
329
|
size: 20,
|
|
321
330
|
"stroke-width": 1.5,
|
|
322
331
|
class: "tpl:shrink-0"
|
|
323
332
|
}),
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
], 12,
|
|
333
|
+
b.value ? (o(), _("span", Yt, h(y(r).modules.title), 1)) : v("", !0),
|
|
334
|
+
b.value ? (o(), _("span", Xt, h(y(p).savedModules?.moduleCount.value ?? 0), 1)) : v("", !0)
|
|
335
|
+
], 12, Jt)])) : v("", !0), j(y(ee), {
|
|
327
336
|
"model-value": N.value,
|
|
328
337
|
group: {
|
|
329
338
|
name: "blocks",
|
|
330
339
|
pull: "clone",
|
|
331
340
|
put: !1
|
|
332
341
|
},
|
|
333
|
-
clone:
|
|
342
|
+
clone: P,
|
|
334
343
|
sort: !1,
|
|
335
344
|
animation: 150,
|
|
336
345
|
"ghost-class": "tpl-ghost",
|
|
337
346
|
"force-fallback": !0,
|
|
338
347
|
class: "tpl:flex tpl:flex-col tpl:gap-0.5 tpl:p-1",
|
|
339
|
-
onChoose:
|
|
340
|
-
onEnd:
|
|
348
|
+
onChoose: w,
|
|
349
|
+
onEnd: E
|
|
341
350
|
}, {
|
|
342
|
-
default:
|
|
351
|
+
default: u(() => [(o(!0), _(O, null, c(N.value, (e) => (o(), _("button", {
|
|
343
352
|
key: e.type,
|
|
344
353
|
type: "button",
|
|
345
354
|
"data-palette-type": e.type,
|
|
346
|
-
"aria-label":
|
|
355
|
+
"aria-label": y(n)(y(t).sidebarNav.insertBlock, { block: e.label }),
|
|
347
356
|
class: "tpl:flex tpl:h-10 tpl:w-full tpl:cursor-grab tpl:items-center tpl:gap-3 tpl:rounded-[var(--tpl-radius-sm)] tpl:border-none tpl:bg-transparent tpl:px-3 tpl:text-[var(--tpl-text-muted)] tpl:transition-all tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)] hover:tpl:bg-[var(--tpl-primary-light)] hover:tpl:text-[var(--tpl-primary)] active:tpl:cursor-grabbing",
|
|
348
|
-
style:
|
|
357
|
+
style: D({ justifyContent: b.value ? "flex-start" : "center" }),
|
|
349
358
|
onClick: (t) => F(e),
|
|
350
359
|
onKeydown: (t) => I(t, e)
|
|
351
|
-
}, [
|
|
360
|
+
}, [T("div", Qt, [y(Dt)[e.type] ? (o(), x(a(y(Dt)[e.type]), {
|
|
352
361
|
key: 0,
|
|
353
362
|
size: 20,
|
|
354
363
|
"stroke-width": 1.5
|
|
355
|
-
})) : e.isCustom ? (
|
|
364
|
+
})) : e.isCustom ? (o(), x(Le, {
|
|
356
365
|
key: 1,
|
|
357
366
|
icon: e.icon,
|
|
358
367
|
size: 20
|
|
359
|
-
}, null, 8, ["icon"])) :
|
|
368
|
+
}, null, 8, ["icon"])) : v("", !0)]), b.value ? (o(), _("span", $t, h(e.label), 1)) : v("", !0)], 44, Zt))), 128))]),
|
|
360
369
|
_: 1
|
|
361
|
-
}, 8, ["model-value"])], 44,
|
|
370
|
+
}, 8, ["model-value"])], 44, Kt));
|
|
362
371
|
}
|
|
363
372
|
});
|
|
364
373
|
//#endregion
|
|
365
374
|
//#region src/composables/useMergeTagField.ts
|
|
366
|
-
function
|
|
367
|
-
let { modelValue:
|
|
368
|
-
|
|
375
|
+
function tn(e) {
|
|
376
|
+
let { modelValue: t, emit: r, elementRef: a } = e, { canRequestMergeTag: o, isRequesting: c, isMergeTagValue: l, getMergeTagLabel: u, requestMergeTag: d, syntax: p } = N(), m = f(!1), h = !1, _ = !1;
|
|
377
|
+
n() && i(() => {
|
|
369
378
|
_ = !0;
|
|
370
379
|
});
|
|
371
|
-
let v =
|
|
372
|
-
let e =
|
|
380
|
+
let v = g(() => {
|
|
381
|
+
let e = t();
|
|
373
382
|
if (!e) return [];
|
|
374
|
-
let
|
|
383
|
+
let n = [], r = `(${p.value.source}|${p.logic.source})`, i = new RegExp(r, "g"), a = 0, o;
|
|
375
384
|
for (; (o = i.exec(e)) !== null;) {
|
|
376
|
-
o.index > a &&
|
|
385
|
+
o.index > a && n.push({
|
|
377
386
|
type: "text",
|
|
378
387
|
value: e.slice(a, o.index)
|
|
379
388
|
});
|
|
380
|
-
let
|
|
381
|
-
l(
|
|
389
|
+
let t = o[0];
|
|
390
|
+
l(t) ? n.push({
|
|
382
391
|
type: "mergeTag",
|
|
383
|
-
value:
|
|
384
|
-
label: u(
|
|
385
|
-
}) :
|
|
392
|
+
value: t,
|
|
393
|
+
label: u(t)
|
|
394
|
+
}) : Qe(t, p) ? n.push({
|
|
386
395
|
type: "logicMergeTag",
|
|
387
|
-
value:
|
|
388
|
-
keyword:
|
|
389
|
-
}) :
|
|
396
|
+
value: t,
|
|
397
|
+
keyword: et(t, p)
|
|
398
|
+
}) : n.push({
|
|
390
399
|
type: "text",
|
|
391
|
-
value:
|
|
392
|
-
}), a = o.index +
|
|
400
|
+
value: t
|
|
401
|
+
}), a = o.index + t.length;
|
|
393
402
|
}
|
|
394
|
-
return a < e.length &&
|
|
403
|
+
return a < e.length && n.push({
|
|
395
404
|
type: "text",
|
|
396
405
|
value: e.slice(a)
|
|
397
|
-
}),
|
|
398
|
-
}), y =
|
|
406
|
+
}), n;
|
|
407
|
+
}), y = g(() => v.value.some((e) => e.type === "mergeTag" || e.type === "logicMergeTag"));
|
|
399
408
|
function b() {
|
|
400
|
-
m.value = !0,
|
|
409
|
+
m.value = !0, s(() => {
|
|
401
410
|
a.value?.focus();
|
|
402
|
-
let e =
|
|
411
|
+
let e = t()?.length || 0;
|
|
403
412
|
a.value?.setSelectionRange(e, e);
|
|
404
413
|
});
|
|
405
414
|
}
|
|
406
415
|
function x() {
|
|
407
|
-
|
|
416
|
+
h || (m.value = !1);
|
|
408
417
|
}
|
|
409
418
|
function S(e) {
|
|
410
|
-
|
|
419
|
+
r(e.target.value);
|
|
411
420
|
}
|
|
412
421
|
function C() {
|
|
413
|
-
|
|
422
|
+
r("");
|
|
414
423
|
}
|
|
415
424
|
async function w() {
|
|
416
|
-
let e = m.value && a.value ? a.value.selectionStart ??
|
|
417
|
-
|
|
418
|
-
let
|
|
425
|
+
let e = m.value && a.value ? a.value.selectionStart ?? t().length : t().length;
|
|
426
|
+
h = !0;
|
|
427
|
+
let n;
|
|
419
428
|
try {
|
|
420
|
-
|
|
429
|
+
n = await d();
|
|
421
430
|
} finally {
|
|
422
|
-
|
|
431
|
+
h = !1;
|
|
423
432
|
}
|
|
424
|
-
if (!_ &&
|
|
425
|
-
let
|
|
426
|
-
i
|
|
433
|
+
if (!_ && n) {
|
|
434
|
+
let i = t().slice(0, e), o = t().slice(e);
|
|
435
|
+
r(i + n.value + o), m.value = !0, s(() => {
|
|
427
436
|
if (_) return;
|
|
428
|
-
let
|
|
429
|
-
a.value?.focus(), a.value?.setSelectionRange(
|
|
437
|
+
let t = e + n.value.length;
|
|
438
|
+
a.value?.focus(), a.value?.setSelectionRange(t, t);
|
|
430
439
|
});
|
|
431
440
|
}
|
|
432
441
|
}
|
|
433
442
|
return {
|
|
434
443
|
segments: v,
|
|
435
444
|
hasMergeTags: y,
|
|
436
|
-
canRequestMergeTag:
|
|
445
|
+
canRequestMergeTag: o,
|
|
437
446
|
isRequestingMergeTag: c,
|
|
438
447
|
isEditing: m,
|
|
439
448
|
startEditing: b,
|
|
@@ -445,10 +454,10 @@ function $t(e) {
|
|
|
445
454
|
}
|
|
446
455
|
//#endregion
|
|
447
456
|
//#region src/components/MergeTagSegments.vue?vue&type=script&setup=true&lang.ts
|
|
448
|
-
var
|
|
457
|
+
var nn = ["aria-label", "onKeydown"], rn = ["data-tooltip"], an = ["data-tooltip"], on = {
|
|
449
458
|
key: 2,
|
|
450
459
|
class: "tpl:text-sm tpl:text-[var(--tpl-text)]"
|
|
451
|
-
},
|
|
460
|
+
}, sn = ["aria-label", "title"], cn = /* @__PURE__ */ A({
|
|
452
461
|
__name: "MergeTagSegments",
|
|
453
462
|
props: {
|
|
454
463
|
segments: {},
|
|
@@ -457,18 +466,18 @@ var en = ["aria-label", "onKeydown"], tn = ["data-tooltip"], nn = ["data-tooltip
|
|
|
457
466
|
},
|
|
458
467
|
emits: ["edit", "clear"],
|
|
459
468
|
setup(e, { emit: t }) {
|
|
460
|
-
let n = t, { t: r } =
|
|
469
|
+
let n = t, { t: r } = z();
|
|
461
470
|
function i() {
|
|
462
471
|
n("edit");
|
|
463
472
|
}
|
|
464
|
-
return (t,
|
|
473
|
+
return (t, a) => (o(), _("div", {
|
|
465
474
|
role: "button",
|
|
466
475
|
tabindex: "0",
|
|
467
|
-
"aria-label":
|
|
468
|
-
class:
|
|
476
|
+
"aria-label": y(r).mergeTag.clickToEdit,
|
|
477
|
+
class: w([e.displayClass, { "tpl-pulse-fill": e.pulse }]),
|
|
469
478
|
onClick: i,
|
|
470
|
-
onKeydown: [
|
|
471
|
-
}, [(
|
|
479
|
+
onKeydown: [m(i, ["enter"]), m(b(i, ["prevent"]), ["space"])]
|
|
480
|
+
}, [(o(!0), _(O, null, c(e.segments, (e, t) => (o(), _(O, { key: `${e.type}-${t}-${e.value}` }, [e.type === "mergeTag" ? (o(), _("span", {
|
|
472
481
|
key: 0,
|
|
473
482
|
class: "tpl-tooltip tpl:inline-flex tpl:items-center tpl:gap-1 tpl:rounded tpl:px-1.5 tpl:py-0.5 tpl:text-[0.9em] tpl:font-medium",
|
|
474
483
|
"data-tooltip": e.value,
|
|
@@ -476,7 +485,7 @@ var en = ["aria-label", "onKeydown"], tn = ["data-tooltip"], nn = ["data-tooltip
|
|
|
476
485
|
"background-color": "color-mix(\n in srgb,\n var(--tpl-primary) 20%,\n transparent\n )",
|
|
477
486
|
color: "var(--tpl-primary)"
|
|
478
487
|
}
|
|
479
|
-
},
|
|
488
|
+
}, h(e.label), 9, rn)) : e.type === "logicMergeTag" ? (o(), _("span", {
|
|
480
489
|
key: 1,
|
|
481
490
|
class: "tpl-tooltip tpl:inline-flex tpl:items-center tpl:rounded tpl:px-1.5 tpl:py-0.5 tpl:text-[0.8em] tpl:font-bold tpl:tracking-wide tpl:uppercase",
|
|
482
491
|
"data-tooltip": e.value,
|
|
@@ -485,44 +494,44 @@ var en = ["aria-label", "onKeydown"], tn = ["data-tooltip"], nn = ["data-tooltip
|
|
|
485
494
|
border: "1.5px solid\n color-mix(in srgb, var(--tpl-primary) 50%, transparent)",
|
|
486
495
|
color: "var(--tpl-primary)"
|
|
487
496
|
}
|
|
488
|
-
},
|
|
497
|
+
}, h(e.keyword), 9, an)) : (o(), _("span", on, h(e.value), 1))], 64))), 128)), T("button", {
|
|
489
498
|
type: "button",
|
|
490
499
|
class: "tpl:ml-auto tpl:flex tpl:size-6 tpl:shrink-0 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-full tpl:border-none tpl:bg-transparent tpl:p-0 tpl:text-[var(--tpl-text-dim)] tpl:opacity-60 tpl:transition-all hover:tpl:text-[var(--tpl-danger)] hover:tpl:opacity-100",
|
|
491
|
-
"aria-label":
|
|
492
|
-
title:
|
|
493
|
-
onClick:
|
|
494
|
-
}, [j(
|
|
500
|
+
"aria-label": y(r).mergeTag.remove,
|
|
501
|
+
title: y(r).mergeTag.remove,
|
|
502
|
+
onClick: a[0] ||= b((e) => n("clear"), ["stop"])
|
|
503
|
+
}, [j(y(Ae), {
|
|
495
504
|
size: 12,
|
|
496
505
|
"stroke-width": 2.5
|
|
497
|
-
})], 8,
|
|
506
|
+
})], 8, sn)], 42, nn));
|
|
498
507
|
}
|
|
499
|
-
}),
|
|
508
|
+
}), ln = [
|
|
500
509
|
"aria-label",
|
|
501
510
|
"title",
|
|
502
511
|
"disabled"
|
|
503
|
-
],
|
|
512
|
+
], un = "tpl:flex tpl:items-center tpl:justify-center tpl:gap-1 tpl:rounded-[var(--tpl-radius-sm)] tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-hover)] tpl:px-2 tpl:py-1 tpl:text-xs tpl:text-[var(--tpl-text-muted)] tpl:transition-all tpl:duration-[120ms] hover:tpl:bg-[var(--tpl-primary-light)] hover:tpl:text-[var(--tpl-primary)] hover:tpl:border-[var(--tpl-primary)]", dn = /* @__PURE__ */ A({
|
|
504
513
|
__name: "MergeTagInsertButton",
|
|
505
514
|
props: { disabled: { type: Boolean } },
|
|
506
515
|
emits: ["insert"],
|
|
507
516
|
setup(e) {
|
|
508
|
-
let { t } =
|
|
509
|
-
return (n, r) => (
|
|
517
|
+
let { t } = z();
|
|
518
|
+
return (n, r) => (o(), _("button", {
|
|
510
519
|
type: "button",
|
|
511
|
-
class:
|
|
512
|
-
"aria-label":
|
|
513
|
-
title:
|
|
520
|
+
class: w([un, "tpl:mt-1.5"]),
|
|
521
|
+
"aria-label": y(t).mergeTag.insert,
|
|
522
|
+
title: y(t).mergeTag.insert,
|
|
514
523
|
disabled: e.disabled,
|
|
515
524
|
onClick: r[0] ||= (e) => n.$emit("insert")
|
|
516
|
-
}, [j(
|
|
525
|
+
}, [j(y(ht), {
|
|
517
526
|
size: 12,
|
|
518
527
|
"stroke-width": 2
|
|
519
|
-
}), k(" " +
|
|
528
|
+
}), k(" " + h(y(t).mergeTag.insert), 1)], 10, ln));
|
|
520
529
|
}
|
|
521
|
-
}),
|
|
530
|
+
}), fn = { key: 0 }, pn = { key: 1 }, mn = [
|
|
522
531
|
"value",
|
|
523
532
|
"placeholder",
|
|
524
533
|
"rows"
|
|
525
|
-
],
|
|
534
|
+
], hn = "tpl:w-full tpl:resize-y tpl:rounded-[var(--tpl-radius-sm)] tpl:border tpl:shadow-xs tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:px-3 tpl:py-2 tpl:text-sm tpl:text-[var(--tpl-text)] tpl:outline-none tpl:transition-all tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)] tpl:placeholder:text-[var(--tpl-text-dim)] tpl:focus:border-[var(--tpl-primary)] tpl:focus:shadow-[var(--tpl-ring)]", gn = "tpl:flex tpl:w-full tpl:min-h-[5rem] tpl:cursor-pointer tpl:items-start tpl:flex-wrap tpl:gap-1 tpl:rounded-[var(--tpl-radius-sm)] tpl:border tpl:shadow-xs tpl:bg-[var(--tpl-bg)] tpl:border-[var(--tpl-border)] tpl:px-3 tpl:py-2 tpl:transition-all tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)]", _n = /* @__PURE__ */ A({
|
|
526
535
|
__name: "MergeTagTextarea",
|
|
527
536
|
props: {
|
|
528
537
|
modelValue: {},
|
|
@@ -531,46 +540,46 @@ var en = ["aria-label", "onKeydown"], tn = ["data-tooltip"], nn = ["data-tooltip
|
|
|
531
540
|
},
|
|
532
541
|
emits: ["update:modelValue"],
|
|
533
542
|
setup(e, { emit: t }) {
|
|
534
|
-
let n = e, r = t, i =
|
|
543
|
+
let n = e, r = t, i = f(null), { segments: a, hasMergeTags: s, canRequestMergeTag: c, isRequestingMergeTag: l, isEditing: u, startEditing: d, stopEditing: p, handleInput: h, clearValue: g, insertMergeTag: b } = tn({
|
|
535
544
|
modelValue: () => n.modelValue,
|
|
536
545
|
emit: (e) => r("update:modelValue", e),
|
|
537
546
|
elementRef: i
|
|
538
547
|
});
|
|
539
|
-
return (t, n) =>
|
|
540
|
-
segments:
|
|
541
|
-
"display-class":
|
|
542
|
-
onEdit:
|
|
543
|
-
onClear:
|
|
548
|
+
return (t, n) => y(s) && !y(u) ? (o(), _("div", fn, [j(cn, {
|
|
549
|
+
segments: y(a),
|
|
550
|
+
"display-class": gn,
|
|
551
|
+
onEdit: y(d),
|
|
552
|
+
onClear: y(g)
|
|
544
553
|
}, null, 8, [
|
|
545
554
|
"segments",
|
|
546
555
|
"onEdit",
|
|
547
556
|
"onClear"
|
|
548
|
-
]),
|
|
557
|
+
]), y(c) ? (o(), x(dn, {
|
|
549
558
|
key: 0,
|
|
550
|
-
disabled:
|
|
551
|
-
onInsert:
|
|
552
|
-
}, null, 8, ["disabled", "onInsert"])) :
|
|
559
|
+
disabled: y(l),
|
|
560
|
+
onInsert: y(b)
|
|
561
|
+
}, null, 8, ["disabled", "onInsert"])) : v("", !0)])) : (o(), _("div", pn, [T("textarea", {
|
|
553
562
|
ref_key: "textareaRef",
|
|
554
563
|
ref: i,
|
|
555
|
-
class:
|
|
564
|
+
class: w(hn),
|
|
556
565
|
value: e.modelValue,
|
|
557
566
|
placeholder: e.placeholder,
|
|
558
567
|
rows: e.rows,
|
|
559
|
-
onInput: n[0] ||= (...e) =>
|
|
560
|
-
onBlur: n[1] ||= (...e) =>
|
|
561
|
-
onKeydown: n[2] ||=
|
|
562
|
-
}, null, 40,
|
|
568
|
+
onInput: n[0] ||= (...e) => y(h) && y(h)(...e),
|
|
569
|
+
onBlur: n[1] ||= (...e) => y(p) && y(p)(...e),
|
|
570
|
+
onKeydown: n[2] ||= m((...e) => y(p) && y(p)(...e), ["escape"])
|
|
571
|
+
}, null, 40, mn), y(c) ? (o(), x(dn, {
|
|
563
572
|
key: 0,
|
|
564
|
-
disabled:
|
|
565
|
-
onInsert:
|
|
566
|
-
}, null, 8, ["disabled", "onInsert"])) :
|
|
573
|
+
disabled: y(l),
|
|
574
|
+
onInsert: y(b)
|
|
575
|
+
}, null, 8, ["disabled", "onInsert"])) : v("", !0)]));
|
|
567
576
|
}
|
|
568
|
-
}),
|
|
577
|
+
}), vn = { class: "tpl:flex tpl:w-full tpl:flex-1 tpl:flex-col tpl:bg-[var(--tpl-bg-elevated)]" }, yn = { class: "tpl:flex tpl:flex-1 tpl:flex-col tpl:gap-3 tpl:overflow-y-auto tpl:p-4" }, bn = { class: "tpl:mb-3.5 tpl:flex tpl:items-center tpl:gap-2 tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]" }, xn = { class: "tpl:mb-3.5" }, Sn = { class: "tpl:grid tpl:grid-cols-4 tpl:gap-1 tpl:rounded-[var(--tpl-radius-sm)] tpl:p-1 tpl:bg-[var(--tpl-bg-hover)]" }, Cn = ["onClick"], wn = { class: "tpl:flex tpl:items-stretch" }, Tn = ["value"], En = { class: "tpl:mb-3.5 tpl:flex tpl:items-center tpl:gap-2 tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]" }, Dn = { class: "tpl:mb-3.5" }, On = ["value"], kn = ["value"], An = { class: "tpl:mb-3.5 tpl:flex tpl:items-center tpl:gap-2 tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]" }, jn = ["value"], Mn = { class: "tpl:mt-1 tpl:text-xs tpl:leading-relaxed tpl:text-[var(--tpl-text-dim)]" }, Nn = { class: "tpl:mb-3.5 tpl:flex tpl:items-center tpl:gap-2 tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]" }, Pn = { class: "tpl:mt-1 tpl:flex tpl:items-start tpl:justify-between tpl:gap-2" }, Fn = { class: "tpl:text-xs tpl:leading-relaxed tpl:text-[var(--tpl-text-dim)]" }, In = { class: "tpl:shrink-0 tpl:text-xs tpl:tabular-nums tpl:text-[var(--tpl-text-dim)]" }, Ln = { class: "tpl:rounded-[var(--tpl-radius)] tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:p-3" }, Rn = { class: "tpl:mb-2.5 tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text-muted)]" }, zn = { class: "tpl:m-0 tpl:pl-[18px] tpl:text-xs tpl:leading-relaxed tpl:text-[var(--tpl-text-dim)]" }, Bn = { class: "tpl:mb-1 tpl:last:mb-0" }, Vn = { class: "tpl:mb-1 tpl:last:mb-0" }, Hn = { class: "tpl:mb-1 tpl:last:mb-0" }, Un = 150, Wn = /* @__PURE__ */ A({
|
|
569
578
|
__name: "TemplateSettings",
|
|
570
579
|
props: { settings: {} },
|
|
571
580
|
emits: ["update"],
|
|
572
581
|
setup(e, { emit: t }) {
|
|
573
|
-
let n = e, r = t, { t: i } =
|
|
582
|
+
let n = e, r = t, { t: i } = z(), a = Ie(De, "TemplateSettings"), s = g(() => a.fonts.value), l = g(() => s.value.some((e) => e.value === n.settings.fontFamily) ? n.settings.fontFamily : a.defaultFont.value), u = [
|
|
574
583
|
{
|
|
575
584
|
value: 480,
|
|
576
585
|
label: "480px"
|
|
@@ -588,95 +597,95 @@ var en = ["aria-label", "onKeydown"], tn = ["data-tooltip"], nn = ["data-tooltip
|
|
|
588
597
|
label: "800px"
|
|
589
598
|
}
|
|
590
599
|
];
|
|
591
|
-
return (t, n) => (
|
|
592
|
-
|
|
593
|
-
|
|
600
|
+
return (t, n) => (o(), _("aside", vn, [T("div", yn, [
|
|
601
|
+
T("div", { class: w(y(jt)) }, [
|
|
602
|
+
T("div", bn, [j(y(vt), {
|
|
594
603
|
class: "tpl:text-[var(--tpl-text-muted)]",
|
|
595
604
|
size: 14,
|
|
596
605
|
"stroke-width": 2
|
|
597
|
-
}),
|
|
598
|
-
|
|
606
|
+
}), T("span", null, h(y(i).templateSettings.layout), 1)]),
|
|
607
|
+
T("div", xn, [T("label", { class: w(y(W)) }, h(y(i).templateSettings.widthPreset), 3), T("div", Sn, [(o(), _(O, null, c(u, (t) => T("button", {
|
|
599
608
|
key: t.value,
|
|
600
609
|
class: "tpl:cursor-pointer tpl:rounded-[var(--tpl-radius-sm)] tpl:border-none tpl:px-2 tpl:py-1.5 tpl:text-sm tpl:font-medium tpl:transition-all tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)]",
|
|
601
|
-
style:
|
|
610
|
+
style: D({
|
|
602
611
|
backgroundColor: e.settings.width === t.value ? "var(--tpl-bg)" : "transparent",
|
|
603
612
|
color: e.settings.width === t.value ? "var(--tpl-primary)" : "var(--tpl-text-muted)",
|
|
604
613
|
boxShadow: e.settings.width === t.value ? "var(--tpl-shadow)" : "none"
|
|
605
614
|
}),
|
|
606
615
|
onClick: (e) => r("update", { width: t.value })
|
|
607
|
-
},
|
|
608
|
-
|
|
616
|
+
}, h(t.label), 13, Cn)), 64))])]),
|
|
617
|
+
T("div", null, [T("label", { class: w(y(W)) }, h(y(i).templateSettings.customWidth), 3), T("div", wn, [T("input", {
|
|
609
618
|
type: "number",
|
|
610
|
-
class:
|
|
619
|
+
class: w(y(K)),
|
|
611
620
|
value: e.settings.width,
|
|
612
621
|
min: "300",
|
|
613
622
|
max: "900",
|
|
614
623
|
onInput: n[0] ||= (e) => r("update", { width: Number(e.target.value) })
|
|
615
|
-
}, null, 42,
|
|
624
|
+
}, null, 42, Tn), T("span", { class: w(y(G)) }, "px", 2)])])
|
|
616
625
|
], 2),
|
|
617
|
-
|
|
618
|
-
|
|
626
|
+
T("div", { class: w(y(jt)) }, [
|
|
627
|
+
T("div", En, [j(y(pt), {
|
|
619
628
|
class: "tpl:text-[var(--tpl-text-muted)]",
|
|
620
629
|
size: 14,
|
|
621
630
|
"stroke-width": 2
|
|
622
|
-
}),
|
|
623
|
-
|
|
631
|
+
}), T("span", null, h(y(i).templateSettings.appearance), 1)]),
|
|
632
|
+
T("div", Dn, [T("label", { class: w(y(W)) }, h(y(i).templateSettings.backgroundColor), 3), j(q, {
|
|
624
633
|
"model-value": e.settings.backgroundColor,
|
|
625
|
-
placeholder:
|
|
634
|
+
placeholder: y(Mt),
|
|
626
635
|
"onUpdate:modelValue": n[1] ||= (e) => r("update", { backgroundColor: e })
|
|
627
636
|
}, null, 8, ["model-value", "placeholder"])]),
|
|
628
|
-
|
|
629
|
-
class:
|
|
637
|
+
T("div", null, [T("label", { class: w(y(W)) }, h(y(i).templateSettings.fontFamily), 3), T("select", {
|
|
638
|
+
class: w(y(U)),
|
|
630
639
|
value: l.value,
|
|
631
640
|
onChange: n[2] ||= (e) => r("update", { fontFamily: e.target.value })
|
|
632
|
-
}, [(
|
|
641
|
+
}, [(o(!0), _(O, null, c(s.value, (e) => (o(), _("option", {
|
|
633
642
|
key: e.value,
|
|
634
643
|
value: e.value
|
|
635
|
-
},
|
|
644
|
+
}, h(e.label), 9, kn))), 128))], 42, On)])
|
|
636
645
|
], 2),
|
|
637
|
-
|
|
646
|
+
T("div", { class: w(y(jt)) }, [T("div", An, [j(y(ot), {
|
|
638
647
|
class: "tpl:text-[var(--tpl-text-muted)]",
|
|
639
648
|
size: 14,
|
|
640
649
|
"stroke-width": 2
|
|
641
|
-
}),
|
|
642
|
-
|
|
643
|
-
|
|
650
|
+
}), T("span", null, h(y(i).templateSettings.language), 1)]), T("div", null, [
|
|
651
|
+
T("label", { class: w(y(W)) }, h(y(i).templateSettings.contentLocale), 3),
|
|
652
|
+
T("input", {
|
|
644
653
|
type: "text",
|
|
645
|
-
class:
|
|
654
|
+
class: w(y(U)),
|
|
646
655
|
value: e.settings.locale ?? "",
|
|
647
656
|
placeholder: "en",
|
|
648
657
|
spellcheck: "false",
|
|
649
658
|
autocapitalize: "off",
|
|
650
659
|
autocomplete: "off",
|
|
651
660
|
onInput: n[3] ||= (e) => r("update", { locale: e.target.value.trim() || void 0 })
|
|
652
|
-
}, null, 42,
|
|
653
|
-
|
|
661
|
+
}, null, 42, jn),
|
|
662
|
+
T("p", Mn, h(y(i).templateSettings.contentLocaleHint), 1)
|
|
654
663
|
])], 2),
|
|
655
|
-
|
|
664
|
+
T("div", { class: w(y(jt)) }, [T("div", Nn, [j(y(ve), {
|
|
656
665
|
class: "tpl:text-[var(--tpl-text-muted)]",
|
|
657
666
|
size: 14,
|
|
658
667
|
"stroke-width": 2
|
|
659
|
-
}),
|
|
668
|
+
}), T("span", null, h(y(i).templateSettings.preheaderText), 1)]), T("div", null, [j(_n, {
|
|
660
669
|
"model-value": e.settings.preheaderText ?? "",
|
|
661
|
-
placeholder:
|
|
670
|
+
placeholder: y(i).templateSettings.preheaderTextPlaceholder,
|
|
662
671
|
rows: 2,
|
|
663
672
|
"onUpdate:modelValue": n[4] ||= (e) => r("update", { preheaderText: e.replace(/[\r\n]/g, " ") || void 0 })
|
|
664
|
-
}, null, 8, ["model-value", "placeholder"]),
|
|
665
|
-
|
|
673
|
+
}, null, 8, ["model-value", "placeholder"]), T("div", Pn, [T("span", Fn, h(y(i).templateSettings.preheaderTextHint), 1), T("span", In, h((e.settings.preheaderText ?? "").length) + "/" + h(Un), 1)])])], 2),
|
|
674
|
+
T("div", Ln, [T("div", Rn, [j(y(tt), {
|
|
666
675
|
size: 14,
|
|
667
676
|
"stroke-width": 2
|
|
668
|
-
}),
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
677
|
+
}), T("span", null, h(y(i).templateSettings.tips), 1)]), T("ul", zn, [
|
|
678
|
+
T("li", Bn, h(y(i).templateSettings.tip1), 1),
|
|
679
|
+
T("li", Vn, h(y(i).templateSettings.tip2), 1),
|
|
680
|
+
T("li", Hn, h(y(i).templateSettings.tip3), 1)
|
|
672
681
|
])])
|
|
673
682
|
])]));
|
|
674
683
|
}
|
|
675
|
-
}),
|
|
684
|
+
}), Gn = { key: 0 }, Kn = { key: 1 }, qn = [
|
|
676
685
|
"type",
|
|
677
686
|
"value",
|
|
678
687
|
"placeholder"
|
|
679
|
-
],
|
|
688
|
+
], Jn = "tpl:flex tpl:w-full tpl:min-h-10 tpl:cursor-pointer tpl:items-center tpl:flex-wrap tpl:gap-1 tpl:rounded-[var(--tpl-radius-sm)] tpl:border tpl:shadow-xs tpl:bg-[var(--tpl-bg)] tpl:border-[var(--tpl-border)] tpl:px-3.5 tpl:py-1.5 tpl:transition-all tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)]", X = /* @__PURE__ */ Ke(/* @__PURE__ */ A({
|
|
680
689
|
__name: "MergeTagInput",
|
|
681
690
|
props: {
|
|
682
691
|
modelValue: {},
|
|
@@ -689,46 +698,46 @@ var en = ["aria-label", "onKeydown"], tn = ["data-tooltip"], nn = ["data-tooltip
|
|
|
689
698
|
},
|
|
690
699
|
emits: ["update:modelValue"],
|
|
691
700
|
setup(e, { emit: t }) {
|
|
692
|
-
let n = e, r = t, i =
|
|
701
|
+
let n = e, r = t, i = f(null), { segments: a, hasMergeTags: s, canRequestMergeTag: c, isRequestingMergeTag: l, isEditing: u, startEditing: d, stopEditing: p, handleInput: h, clearValue: g, insertMergeTag: b } = tn({
|
|
693
702
|
modelValue: () => n.modelValue,
|
|
694
703
|
emit: (e) => r("update:modelValue", e),
|
|
695
704
|
elementRef: i
|
|
696
705
|
});
|
|
697
|
-
return (t, n) =>
|
|
698
|
-
segments:
|
|
699
|
-
"display-class":
|
|
706
|
+
return (t, n) => y(s) && !y(u) ? (o(), _("div", Gn, [j(cn, {
|
|
707
|
+
segments: y(a),
|
|
708
|
+
"display-class": Jn,
|
|
700
709
|
pulse: e.pulse,
|
|
701
|
-
onEdit:
|
|
702
|
-
onClear:
|
|
710
|
+
onEdit: y(d),
|
|
711
|
+
onClear: y(g)
|
|
703
712
|
}, null, 8, [
|
|
704
713
|
"segments",
|
|
705
714
|
"pulse",
|
|
706
715
|
"onEdit",
|
|
707
716
|
"onClear"
|
|
708
|
-
]),
|
|
717
|
+
]), y(c) ? (o(), x(dn, {
|
|
709
718
|
key: 0,
|
|
710
|
-
disabled:
|
|
711
|
-
onInsert:
|
|
712
|
-
}, null, 8, ["disabled", "onInsert"])) :
|
|
719
|
+
disabled: y(l),
|
|
720
|
+
onInsert: y(b)
|
|
721
|
+
}, null, 8, ["disabled", "onInsert"])) : v("", !0)])) : (o(), _("div", Kn, [T("input", {
|
|
713
722
|
ref_key: "inputRef",
|
|
714
723
|
ref: i,
|
|
715
724
|
type: e.type,
|
|
716
|
-
class:
|
|
725
|
+
class: w([y(U), { "tpl-pulse-fill": e.pulse }]),
|
|
717
726
|
value: e.modelValue,
|
|
718
727
|
placeholder: e.placeholder,
|
|
719
|
-
onInput: n[0] ||= (...e) =>
|
|
720
|
-
onBlur: n[1] ||= (...e) =>
|
|
721
|
-
onKeydown: n[2] ||=
|
|
722
|
-
}, null, 42,
|
|
728
|
+
onInput: n[0] ||= (...e) => y(h) && y(h)(...e),
|
|
729
|
+
onBlur: n[1] ||= (...e) => y(p) && y(p)(...e),
|
|
730
|
+
onKeydown: n[2] ||= m((...e) => y(p) && y(p)(...e), ["escape"])
|
|
731
|
+
}, null, 42, qn), y(c) ? (o(), x(dn, {
|
|
723
732
|
key: 0,
|
|
724
|
-
disabled:
|
|
725
|
-
onInsert:
|
|
726
|
-
}, null, 8, ["disabled", "onInsert"])) :
|
|
733
|
+
disabled: y(l),
|
|
734
|
+
onInsert: y(b)
|
|
735
|
+
}, null, 8, ["disabled", "onInsert"])) : v("", !0)]));
|
|
727
736
|
}
|
|
728
|
-
}), [["__scopeId", "data-v-358207dd"]]),
|
|
737
|
+
}), [["__scopeId", "data-v-358207dd"]]), Yn = { class: "tpl:mb-3.5" }, Xn = ["value"], Zn = { value: "" }, Qn = ["value"], $n = { class: "tpl:mb-3.5" }, er = { class: "tpl:mb-3.5" }, tr = {
|
|
729
738
|
key: 0,
|
|
730
739
|
class: "tpl:mt-2 tpl:flex tpl:cursor-pointer tpl:items-center tpl:gap-2 tpl:text-[12px] tpl:text-[var(--tpl-text-muted)]"
|
|
731
|
-
},
|
|
740
|
+
}, nr = ["checked"], rr = { class: "tpl:grid tpl:grid-cols-2 tpl:gap-3" }, ir = { class: "tpl:mb-3.5" }, ar = { class: "tpl:mb-3.5" }, or = { class: "tpl:grid tpl:grid-cols-2 tpl:gap-3" }, sr = { class: "tpl:mb-3.5" }, cr = { class: "tpl:flex tpl:items-stretch" }, lr = ["value"], ur = { class: "tpl:mb-3.5" }, dr = { class: "tpl:flex tpl:items-stretch" }, fr = ["value"], pr = /* @__PURE__ */ A({
|
|
732
741
|
__name: "ButtonToolbar",
|
|
733
742
|
props: {
|
|
734
743
|
block: {},
|
|
@@ -736,64 +745,64 @@ var en = ["aria-label", "onKeydown"], tn = ["data-tooltip"], nn = ["data-tooltip
|
|
|
736
745
|
},
|
|
737
746
|
emits: ["update"],
|
|
738
747
|
setup(e, { emit: t }) {
|
|
739
|
-
let n = t, { t: r } =
|
|
748
|
+
let n = t, { t: r } = z();
|
|
740
749
|
function i(e, t) {
|
|
741
750
|
n("update", { [e]: t });
|
|
742
751
|
}
|
|
743
|
-
return (t, n) => (
|
|
744
|
-
|
|
745
|
-
class:
|
|
752
|
+
return (t, n) => (o(), _(O, null, [
|
|
753
|
+
T("div", Yn, [T("label", { class: w(y(W)) }, h(y(r).button.fontFamily), 3), T("select", {
|
|
754
|
+
class: w(y(U)),
|
|
746
755
|
value: e.block.fontFamily || "",
|
|
747
756
|
onChange: n[0] ||= (e) => i("fontFamily", e.target.value || void 0)
|
|
748
|
-
}, [
|
|
757
|
+
}, [T("option", Zn, h(y(r).button.inheritFont), 1), (o(!0), _(O, null, c(e.fontFamilies, (e) => (o(), _("option", {
|
|
749
758
|
key: e.value,
|
|
750
759
|
value: e.value
|
|
751
|
-
},
|
|
752
|
-
|
|
760
|
+
}, h(e.label), 9, Qn))), 128))], 42, Xn)]),
|
|
761
|
+
T("div", $n, [T("label", { class: w(y(W)) }, h(y(r).button.text), 3), j(X, {
|
|
753
762
|
"model-value": e.block.text,
|
|
754
763
|
type: "text",
|
|
755
764
|
"onUpdate:modelValue": n[1] ||= (e) => i("text", e)
|
|
756
765
|
}, null, 8, ["model-value"])]),
|
|
757
|
-
|
|
758
|
-
|
|
766
|
+
T("div", er, [
|
|
767
|
+
T("label", { class: w(y(W)) }, h(y(r).button.url), 3),
|
|
759
768
|
j(X, {
|
|
760
769
|
"model-value": e.block.url,
|
|
761
770
|
type: "url",
|
|
762
|
-
placeholder:
|
|
771
|
+
placeholder: y(r).button.urlPlaceholder,
|
|
763
772
|
"onUpdate:modelValue": n[2] ||= (e) => i("url", e)
|
|
764
773
|
}, null, 8, ["model-value", "placeholder"]),
|
|
765
|
-
e.block.url ? (
|
|
774
|
+
e.block.url ? (o(), _("label", tr, [T("input", {
|
|
766
775
|
type: "checkbox",
|
|
767
776
|
class: "tpl:size-3.5 tpl:cursor-pointer tpl:accent-[var(--tpl-primary)]",
|
|
768
777
|
checked: e.block.openInNewTab ?? !1,
|
|
769
778
|
onChange: n[3] ||= (e) => i("openInNewTab", e.target.checked)
|
|
770
|
-
}, null, 40,
|
|
779
|
+
}, null, 40, nr), k(" " + h(y(r).button.openInNewTab), 1)])) : v("", !0)
|
|
771
780
|
]),
|
|
772
|
-
|
|
781
|
+
T("div", rr, [T("div", ir, [T("label", { class: w(y(W)) }, h(y(r).button.background), 3), j(q, {
|
|
773
782
|
"model-value": e.block.backgroundColor,
|
|
774
783
|
"onUpdate:modelValue": n[4] ||= (e) => i("backgroundColor", e)
|
|
775
|
-
}, null, 8, ["model-value"])]),
|
|
784
|
+
}, null, 8, ["model-value"])]), T("div", ar, [T("label", { class: w(y(W)) }, h(y(r).button.textColor), 3), j(q, {
|
|
776
785
|
"model-value": e.block.textColor,
|
|
777
786
|
"onUpdate:modelValue": n[5] ||= (e) => i("textColor", e)
|
|
778
787
|
}, null, 8, ["model-value"])])]),
|
|
779
|
-
|
|
788
|
+
T("div", or, [T("div", sr, [T("label", { class: w(y(W)) }, h(y(r).button.borderRadius), 3), T("div", cr, [T("input", {
|
|
780
789
|
type: "number",
|
|
781
|
-
class:
|
|
790
|
+
class: w(y(K)),
|
|
782
791
|
value: e.block.borderRadius,
|
|
783
792
|
min: "0",
|
|
784
793
|
max: "50",
|
|
785
794
|
onInput: n[6] ||= (e) => i("borderRadius", Number(e.target.value))
|
|
786
|
-
}, null, 42,
|
|
795
|
+
}, null, 42, lr), T("span", { class: w(y(G)) }, "px", 2)])]), T("div", ur, [T("label", { class: w(y(W)) }, h(y(r).button.fontSize), 3), T("div", dr, [T("input", {
|
|
787
796
|
type: "number",
|
|
788
|
-
class:
|
|
797
|
+
class: w(y(K)),
|
|
789
798
|
value: e.block.fontSize,
|
|
790
799
|
min: "10",
|
|
791
800
|
max: "36",
|
|
792
801
|
onInput: n[7] ||= (e) => i("fontSize", Number(e.target.value))
|
|
793
|
-
}, null, 42,
|
|
802
|
+
}, null, 42, fr), T("span", { class: w(y(G)) }, "px", 2)])])])
|
|
794
803
|
], 64));
|
|
795
804
|
}
|
|
796
|
-
}),
|
|
805
|
+
}), mr = { class: "spacing-control" }, hr = { class: "tpl:mb-2 tpl:block tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-text-muted)]" }, gr = { class: "tpl:flex tpl:flex-col tpl:items-center tpl:gap-1.5" }, _r = { class: "tpl:flex tpl:items-center" }, vr = ["aria-label"], yr = ["value", "aria-label"], br = ["aria-label"], xr = { class: "tpl:flex tpl:items-center tpl:gap-2" }, Sr = { class: "tpl:flex tpl:items-center" }, Cr = ["aria-label"], wr = ["value", "aria-label"], Tr = ["aria-label"], Er = ["aria-label", "title"], Dr = { class: "tpl:flex tpl:items-center" }, Or = ["aria-label"], kr = ["value", "aria-label"], Ar = ["aria-label"], jr = { class: "tpl:flex tpl:items-center" }, Mr = ["aria-label"], Nr = ["value", "aria-label"], Pr = ["aria-label"], Z = "tpl:flex tpl:items-center tpl:justify-center tpl:w-8 tpl:h-8 tpl:text-[var(--tpl-text-muted)] tpl:bg-[var(--tpl-bg)] tpl:border tpl:border-[var(--tpl-border)] tpl:cursor-pointer tpl:transition-all tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)] hover:tpl:bg-[var(--tpl-bg-hover)] hover:tpl:text-[var(--tpl-text)] active:tpl:bg-[var(--tpl-bg-active)]", Fr = "tpl:w-10 tpl:h-8 tpl:text-center tpl:text-xs tpl:font-medium tpl:border-y tpl:border-x-0 tpl:border-[var(--tpl-border)] tpl:text-[var(--tpl-text)] tpl:bg-[var(--tpl-bg)] tpl:outline-none tpl:transition-all tpl:duration-[120ms] focus:tpl:border-[var(--tpl-primary)] focus:tpl:shadow-[var(--tpl-ring)]", Ir = /* @__PURE__ */ Ke(/* @__PURE__ */ A({
|
|
797
806
|
__name: "SpacingControl",
|
|
798
807
|
props: {
|
|
799
808
|
modelValue: {},
|
|
@@ -801,8 +810,8 @@ var en = ["aria-label", "onKeydown"], tn = ["data-tooltip"], nn = ["data-tooltip
|
|
|
801
810
|
},
|
|
802
811
|
emits: ["update:modelValue"],
|
|
803
812
|
setup(e, { emit: t }) {
|
|
804
|
-
let n = e, r = t, { t: i } =
|
|
805
|
-
|
|
813
|
+
let n = e, r = t, { t: i } = z(), a = g(() => n.modelValue.top === n.modelValue.right && n.modelValue.right === n.modelValue.bottom && n.modelValue.bottom === n.modelValue.left), s = f(a.value);
|
|
814
|
+
M(a, (e) => {
|
|
806
815
|
!e && s.value && (s.value = !1);
|
|
807
816
|
});
|
|
808
817
|
function c(e, t) {
|
|
@@ -840,130 +849,130 @@ var en = ["aria-label", "onKeydown"], tn = ["data-tooltip"], nn = ["data-tooltip
|
|
|
840
849
|
});
|
|
841
850
|
}
|
|
842
851
|
}
|
|
843
|
-
return (t, n) => (
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
"aria-label":
|
|
847
|
-
class:
|
|
852
|
+
return (t, n) => (o(), _("div", mr, [T("label", hr, h(e.label), 1), T("div", gr, [
|
|
853
|
+
T("div", _r, [
|
|
854
|
+
T("button", {
|
|
855
|
+
"aria-label": y(i).spacingControl.decreaseTop,
|
|
856
|
+
class: w([Z, "tpl:rounded-l-[var(--tpl-radius-sm)]"]),
|
|
848
857
|
onClick: n[0] ||= (e) => c("top", -1)
|
|
849
|
-
}, [j(
|
|
858
|
+
}, [j(y(dt), {
|
|
850
859
|
size: 12,
|
|
851
860
|
"stroke-width": 2
|
|
852
|
-
})], 10,
|
|
853
|
-
|
|
861
|
+
})], 10, vr),
|
|
862
|
+
T("input", {
|
|
854
863
|
type: "number",
|
|
855
|
-
class:
|
|
864
|
+
class: w(Fr),
|
|
856
865
|
value: e.modelValue.top,
|
|
857
|
-
"aria-label":
|
|
866
|
+
"aria-label": y(i).spacingControl.top,
|
|
858
867
|
min: "0",
|
|
859
868
|
onInput: n[1] ||= (e) => l("top", Number(e.target.value))
|
|
860
|
-
}, null, 40,
|
|
861
|
-
|
|
862
|
-
"aria-label":
|
|
863
|
-
class:
|
|
869
|
+
}, null, 40, yr),
|
|
870
|
+
T("button", {
|
|
871
|
+
"aria-label": y(i).spacingControl.increaseTop,
|
|
872
|
+
class: w([Z, "tpl:rounded-r-[var(--tpl-radius-sm)]"]),
|
|
864
873
|
onClick: n[2] ||= (e) => c("top", 1)
|
|
865
|
-
}, [j(
|
|
874
|
+
}, [j(y(H), {
|
|
866
875
|
size: 12,
|
|
867
876
|
"stroke-width": 2
|
|
868
|
-
})], 10,
|
|
877
|
+
})], 10, br)
|
|
869
878
|
]),
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
"aria-label":
|
|
874
|
-
class:
|
|
879
|
+
T("div", xr, [
|
|
880
|
+
T("div", Sr, [
|
|
881
|
+
T("button", {
|
|
882
|
+
"aria-label": y(i).spacingControl.decreaseLeft,
|
|
883
|
+
class: w([Z, "tpl:rounded-l-[var(--tpl-radius-sm)]"]),
|
|
875
884
|
onClick: n[3] ||= (e) => c("left", -1)
|
|
876
|
-
}, [j(
|
|
885
|
+
}, [j(y(dt), {
|
|
877
886
|
size: 12,
|
|
878
887
|
"stroke-width": 2
|
|
879
|
-
})], 10,
|
|
880
|
-
|
|
888
|
+
})], 10, Cr),
|
|
889
|
+
T("input", {
|
|
881
890
|
type: "number",
|
|
882
|
-
class:
|
|
891
|
+
class: w(Fr),
|
|
883
892
|
value: e.modelValue.left,
|
|
884
|
-
"aria-label":
|
|
893
|
+
"aria-label": y(i).spacingControl.left,
|
|
885
894
|
min: "0",
|
|
886
895
|
onInput: n[4] ||= (e) => l("left", Number(e.target.value))
|
|
887
|
-
}, null, 40,
|
|
888
|
-
|
|
889
|
-
"aria-label":
|
|
890
|
-
class:
|
|
896
|
+
}, null, 40, wr),
|
|
897
|
+
T("button", {
|
|
898
|
+
"aria-label": y(i).spacingControl.increaseLeft,
|
|
899
|
+
class: w([Z, "tpl:rounded-r-[var(--tpl-radius-sm)]"]),
|
|
891
900
|
onClick: n[5] ||= (e) => c("left", 1)
|
|
892
|
-
}, [j(
|
|
901
|
+
}, [j(y(H), {
|
|
893
902
|
size: 12,
|
|
894
903
|
"stroke-width": 2
|
|
895
|
-
})], 10,
|
|
904
|
+
})], 10, Tr)
|
|
896
905
|
]),
|
|
897
|
-
|
|
898
|
-
class:
|
|
899
|
-
"aria-label": s.value ?
|
|
900
|
-
title: s.value ?
|
|
906
|
+
T("button", {
|
|
907
|
+
class: w(["tpl:flex tpl:h-8 tpl:w-8 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-[var(--tpl-radius-sm)] tpl:border tpl:transition-all tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)]", s.value ? "tpl:border-[var(--tpl-primary)] tpl:bg-[var(--tpl-primary-light)] tpl:text-[var(--tpl-primary)]" : "tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:text-[var(--tpl-text-muted)] hover:tpl:bg-[var(--tpl-bg-hover)]"]),
|
|
908
|
+
"aria-label": s.value ? y(i).spacingControl.unlock : y(i).spacingControl.lockAll,
|
|
909
|
+
title: s.value ? y(i).spacingControl.unlock : y(i).spacingControl.lockAll,
|
|
901
910
|
onClick: u
|
|
902
|
-
}, [s.value ? (
|
|
911
|
+
}, [s.value ? (o(), x(y(at), {
|
|
903
912
|
key: 0,
|
|
904
913
|
size: 14,
|
|
905
914
|
"stroke-width": 2
|
|
906
|
-
})) : (
|
|
915
|
+
})) : (o(), x(y(st), {
|
|
907
916
|
key: 1,
|
|
908
917
|
size: 14,
|
|
909
918
|
"stroke-width": 2
|
|
910
|
-
}))], 10,
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
"aria-label":
|
|
914
|
-
class:
|
|
919
|
+
}))], 10, Er),
|
|
920
|
+
T("div", Dr, [
|
|
921
|
+
T("button", {
|
|
922
|
+
"aria-label": y(i).spacingControl.decreaseRight,
|
|
923
|
+
class: w([Z, "tpl:rounded-l-[var(--tpl-radius-sm)]"]),
|
|
915
924
|
onClick: n[6] ||= (e) => c("right", -1)
|
|
916
|
-
}, [j(
|
|
925
|
+
}, [j(y(dt), {
|
|
917
926
|
size: 12,
|
|
918
927
|
"stroke-width": 2
|
|
919
|
-
})], 10,
|
|
920
|
-
|
|
928
|
+
})], 10, Or),
|
|
929
|
+
T("input", {
|
|
921
930
|
type: "number",
|
|
922
|
-
class:
|
|
931
|
+
class: w(Fr),
|
|
923
932
|
value: e.modelValue.right,
|
|
924
|
-
"aria-label":
|
|
933
|
+
"aria-label": y(i).spacingControl.right,
|
|
925
934
|
min: "0",
|
|
926
935
|
onInput: n[7] ||= (e) => l("right", Number(e.target.value))
|
|
927
|
-
}, null, 40,
|
|
928
|
-
|
|
929
|
-
"aria-label":
|
|
930
|
-
class:
|
|
936
|
+
}, null, 40, kr),
|
|
937
|
+
T("button", {
|
|
938
|
+
"aria-label": y(i).spacingControl.increaseRight,
|
|
939
|
+
class: w([Z, "tpl:rounded-r-[var(--tpl-radius-sm)]"]),
|
|
931
940
|
onClick: n[8] ||= (e) => c("right", 1)
|
|
932
|
-
}, [j(
|
|
941
|
+
}, [j(y(H), {
|
|
933
942
|
size: 12,
|
|
934
943
|
"stroke-width": 2
|
|
935
|
-
})], 10,
|
|
944
|
+
})], 10, Ar)
|
|
936
945
|
])
|
|
937
946
|
]),
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
"aria-label":
|
|
941
|
-
class:
|
|
947
|
+
T("div", jr, [
|
|
948
|
+
T("button", {
|
|
949
|
+
"aria-label": y(i).spacingControl.decreaseBottom,
|
|
950
|
+
class: w([Z, "tpl:rounded-l-[var(--tpl-radius-sm)]"]),
|
|
942
951
|
onClick: n[9] ||= (e) => c("bottom", -1)
|
|
943
|
-
}, [j(
|
|
952
|
+
}, [j(y(dt), {
|
|
944
953
|
size: 12,
|
|
945
954
|
"stroke-width": 2
|
|
946
|
-
})], 10,
|
|
947
|
-
|
|
955
|
+
})], 10, Mr),
|
|
956
|
+
T("input", {
|
|
948
957
|
type: "number",
|
|
949
|
-
class:
|
|
958
|
+
class: w(Fr),
|
|
950
959
|
value: e.modelValue.bottom,
|
|
951
|
-
"aria-label":
|
|
960
|
+
"aria-label": y(i).spacingControl.bottom,
|
|
952
961
|
min: "0",
|
|
953
962
|
onInput: n[10] ||= (e) => l("bottom", Number(e.target.value))
|
|
954
|
-
}, null, 40,
|
|
955
|
-
|
|
956
|
-
"aria-label":
|
|
957
|
-
class:
|
|
963
|
+
}, null, 40, Nr),
|
|
964
|
+
T("button", {
|
|
965
|
+
"aria-label": y(i).spacingControl.increaseBottom,
|
|
966
|
+
class: w([Z, "tpl:rounded-r-[var(--tpl-radius-sm)]"]),
|
|
958
967
|
onClick: n[11] ||= (e) => c("bottom", 1)
|
|
959
|
-
}, [j(
|
|
968
|
+
}, [j(y(H), {
|
|
960
969
|
size: 12,
|
|
961
970
|
"stroke-width": 2
|
|
962
|
-
})], 10,
|
|
971
|
+
})], 10, Pr)
|
|
963
972
|
])
|
|
964
973
|
])]));
|
|
965
974
|
}
|
|
966
|
-
}), [["__scopeId", "data-v-9a9c8a07"]]),
|
|
975
|
+
}), [["__scopeId", "data-v-9a9c8a07"]]), Lr = { class: "tpl:mt-3" }, Rr = /* @__PURE__ */ A({
|
|
967
976
|
__name: "CollapsibleSection",
|
|
968
977
|
props: {
|
|
969
978
|
title: {},
|
|
@@ -971,18 +980,18 @@ var en = ["aria-label", "onKeydown"], tn = ["data-tooltip"], nn = ["data-tooltip
|
|
|
971
980
|
noBorder: { type: Boolean }
|
|
972
981
|
},
|
|
973
982
|
emits: ["toggle"],
|
|
974
|
-
setup(
|
|
975
|
-
return (
|
|
983
|
+
setup(e) {
|
|
984
|
+
return (n, i) => (o(), _("div", { class: w(["tpl:py-3", e.noBorder ? "" : "tpl:border-t tpl:border-[var(--tpl-border)]"]) }, [T("button", {
|
|
976
985
|
type: "button",
|
|
977
986
|
class: "tpl:flex tpl:w-full tpl:cursor-pointer tpl:items-center tpl:gap-1.5 tpl:border-none tpl:bg-transparent tpl:p-0 tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-text-muted)]",
|
|
978
|
-
onClick: i[0] ||= (e) =>
|
|
979
|
-
}, [j(
|
|
980
|
-
class:
|
|
987
|
+
onClick: i[0] ||= (e) => n.$emit("toggle")
|
|
988
|
+
}, [j(y(ze), {
|
|
989
|
+
class: w(["tpl:transition-transform tpl:duration-200", e.open ? "tpl:rotate-0" : "tpl:-rotate-90"]),
|
|
981
990
|
size: 12,
|
|
982
991
|
"stroke-width": 2
|
|
983
|
-
}, null, 8, ["class"]),
|
|
992
|
+
}, null, 8, ["class"]), T("span", null, h(e.title), 1)]), r(T("div", Lr, [t(n.$slots, "default")], 512), [[E, e.open]])], 2));
|
|
984
993
|
}
|
|
985
|
-
}),
|
|
994
|
+
}), zr = { class: "tpl:space-y-2" }, Br = ["checked", "onChange"], Vr = { class: "tpl:space-y-2" }, Hr = ["value"], Ur = { value: "" }, Wr = ["label"], Gr = ["value"], Kr = ["value"], qr = {
|
|
986
995
|
key: 0,
|
|
987
996
|
value: "__custom__"
|
|
988
997
|
}, Jr = {
|
|
@@ -1002,45 +1011,37 @@ var en = ["aria-label", "onKeydown"], tn = ["data-tooltip"], nn = ["data-tooltip
|
|
|
1002
1011
|
},
|
|
1003
1012
|
emits: ["update"],
|
|
1004
1013
|
setup(e, { emit: t }) {
|
|
1005
|
-
let
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
icon: xt,
|
|
1019
|
-
labelKey: "showOnMobile"
|
|
1020
|
-
}
|
|
1021
|
-
];
|
|
1022
|
-
function M(e) {
|
|
1023
|
-
x.has(e) ? x.delete(e) : x.add(e);
|
|
1024
|
-
}
|
|
1025
|
-
let N = h(() => p.length > 0 || y), P = h(() => r.block.displayCondition ? !p.some((e) => e.label === r.block.displayCondition?.label) : !1);
|
|
1014
|
+
let n = e, i = t, { t: s } = z(), p = l(We, []), m = l(ue, !1), b = d(/* @__PURE__ */ new Set()), S = f(!1), E = f(""), D = f(""), ee = [{
|
|
1015
|
+
key: "desktop",
|
|
1016
|
+
icon: lt,
|
|
1017
|
+
labelKey: "showOnDesktop"
|
|
1018
|
+
}, {
|
|
1019
|
+
key: "mobile",
|
|
1020
|
+
icon: mt,
|
|
1021
|
+
labelKey: "showOnMobile"
|
|
1022
|
+
}];
|
|
1023
|
+
function A(e) {
|
|
1024
|
+
b.has(e) ? b.delete(e) : b.add(e);
|
|
1025
|
+
}
|
|
1026
|
+
let N = g(() => p.length > 0 || m), P = g(() => n.block.displayCondition ? !p.some((e) => e.label === n.block.displayCondition?.label) : !1);
|
|
1026
1027
|
function te() {
|
|
1027
|
-
|
|
1028
|
+
S.value = !0, P.value && n.block.displayCondition ? (E.value = n.block.displayCondition.before, D.value = n.block.displayCondition.after ?? "") : (E.value = "", D.value = "");
|
|
1028
1029
|
}
|
|
1029
1030
|
function F() {
|
|
1030
|
-
E.value.trim() && (
|
|
1031
|
-
label:
|
|
1031
|
+
E.value.trim() && (i("update", { displayCondition: {
|
|
1032
|
+
label: s.blockSettings.customCondition,
|
|
1032
1033
|
before: E.value.trim(),
|
|
1033
1034
|
after: D.value.trim()
|
|
1034
|
-
} }),
|
|
1035
|
+
} }), S.value = !1, E.value = "", D.value = "");
|
|
1035
1036
|
}
|
|
1036
|
-
|
|
1037
|
+
M(() => n.block.displayCondition, (e) => {
|
|
1037
1038
|
if (!e) {
|
|
1038
|
-
|
|
1039
|
+
S.value = !1, E.value = "", D.value = "";
|
|
1039
1040
|
return;
|
|
1040
1041
|
}
|
|
1041
1042
|
P.value && (E.value = e.before, D.value = e.after ?? "");
|
|
1042
1043
|
}, { immediate: !0 });
|
|
1043
|
-
let I =
|
|
1044
|
+
let I = g(() => {
|
|
1044
1045
|
let e = {};
|
|
1045
1046
|
for (let t of p) {
|
|
1046
1047
|
let n = t.group ?? "";
|
|
@@ -1049,148 +1050,129 @@ var en = ["aria-label", "onKeydown"], tn = ["data-tooltip"], nn = ["data-tooltip
|
|
|
1049
1050
|
return e;
|
|
1050
1051
|
});
|
|
1051
1052
|
function L(e, t) {
|
|
1052
|
-
|
|
1053
|
-
...
|
|
1053
|
+
i("update", { styles: {
|
|
1054
|
+
...n.block.styles,
|
|
1054
1055
|
[e]: t
|
|
1055
1056
|
} });
|
|
1056
1057
|
}
|
|
1057
|
-
function
|
|
1058
|
-
return
|
|
1058
|
+
function R(e) {
|
|
1059
|
+
return n.block.visibility?.[e] !== !1;
|
|
1059
1060
|
}
|
|
1060
1061
|
function B(e) {
|
|
1061
1062
|
let t = {
|
|
1062
|
-
desktop:
|
|
1063
|
-
|
|
1064
|
-
mobile: z("mobile")
|
|
1063
|
+
desktop: R("desktop"),
|
|
1064
|
+
mobile: R("mobile")
|
|
1065
1065
|
};
|
|
1066
|
-
t[e] = !t[e],
|
|
1066
|
+
t[e] = !t[e], i("update", { visibility: t });
|
|
1067
1067
|
}
|
|
1068
|
-
return (t,
|
|
1069
|
-
j(
|
|
1070
|
-
title:
|
|
1071
|
-
open:
|
|
1068
|
+
return (t, n) => (o(), _("div", { class: w(["tpl:flex tpl:flex-col", e.isFirstSection ? "" : "tpl:mt-4"]) }, [
|
|
1069
|
+
j(Rr, {
|
|
1070
|
+
title: y(s).blockSettings.spacing,
|
|
1071
|
+
open: b.has("spacing"),
|
|
1072
1072
|
"no-border": e.isFirstSection,
|
|
1073
|
-
onToggle:
|
|
1073
|
+
onToggle: n[1] ||= (e) => A("spacing")
|
|
1074
1074
|
}, {
|
|
1075
|
-
default:
|
|
1076
|
-
label:
|
|
1075
|
+
default: u(() => [j(Ir, {
|
|
1076
|
+
label: y(s).blockSettings.padding,
|
|
1077
1077
|
"model-value": e.block.styles.padding,
|
|
1078
|
-
"onUpdate:modelValue":
|
|
1079
|
-
}, null, 8, ["label", "model-value"]),
|
|
1080
|
-
label: v(f).blockSettings.margin,
|
|
1081
|
-
"model-value": e.block.styles.margin,
|
|
1082
|
-
"onUpdate:modelValue": r[1] ||= (e) => L("margin", e)
|
|
1083
|
-
}, null, 8, ["label", "model-value"])])]),
|
|
1078
|
+
"onUpdate:modelValue": n[0] ||= (e) => L("padding", e)
|
|
1079
|
+
}, null, 8, ["label", "model-value"])]),
|
|
1084
1080
|
_: 1
|
|
1085
1081
|
}, 8, [
|
|
1086
1082
|
"title",
|
|
1087
1083
|
"open",
|
|
1088
1084
|
"no-border"
|
|
1089
1085
|
]),
|
|
1090
|
-
j(
|
|
1091
|
-
title:
|
|
1092
|
-
open:
|
|
1093
|
-
onToggle:
|
|
1086
|
+
j(Rr, {
|
|
1087
|
+
title: y(s).blockSettings.background,
|
|
1088
|
+
open: b.has("bg"),
|
|
1089
|
+
onToggle: n[3] ||= (e) => A("bg")
|
|
1094
1090
|
}, {
|
|
1095
|
-
default:
|
|
1091
|
+
default: u(() => [T("label", { class: w(y(W)) }, h(y(s).blockSettings.color), 3), j(q, {
|
|
1096
1092
|
size: "large",
|
|
1097
|
-
"model-value": e.block.styles.backgroundColor ||
|
|
1098
|
-
"onUpdate:modelValue":
|
|
1093
|
+
"model-value": e.block.styles.backgroundColor || y("#ffffff"),
|
|
1094
|
+
"onUpdate:modelValue": n[2] ||= (e) => L("backgroundColor", e)
|
|
1099
1095
|
}, null, 8, ["model-value"])]),
|
|
1100
1096
|
_: 1
|
|
1101
1097
|
}, 8, ["title", "open"]),
|
|
1102
|
-
j(
|
|
1103
|
-
title:
|
|
1104
|
-
open:
|
|
1105
|
-
onToggle:
|
|
1098
|
+
j(Rr, {
|
|
1099
|
+
title: y(s).blockSettings.display,
|
|
1100
|
+
open: b.has("display"),
|
|
1101
|
+
onToggle: n[4] ||= (e) => A("display")
|
|
1106
1102
|
}, {
|
|
1107
|
-
default:
|
|
1103
|
+
default: u(() => [T("div", zr, [(o(), _(O, null, c(ee, (e) => T("label", {
|
|
1108
1104
|
key: e.key,
|
|
1109
1105
|
class: "tpl:flex tpl:cursor-pointer tpl:items-center tpl:gap-2 tpl:text-xs tpl:text-[var(--tpl-text)]"
|
|
1110
1106
|
}, [
|
|
1111
|
-
|
|
1107
|
+
T("input", {
|
|
1112
1108
|
type: "checkbox",
|
|
1113
1109
|
class: "tpl:accent-[var(--tpl-primary)]",
|
|
1114
|
-
checked:
|
|
1110
|
+
checked: R(e.key),
|
|
1115
1111
|
onChange: (t) => B(e.key)
|
|
1116
|
-
}, null, 40,
|
|
1117
|
-
(
|
|
1112
|
+
}, null, 40, Br),
|
|
1113
|
+
(o(), x(a(e.icon), {
|
|
1118
1114
|
size: 14,
|
|
1119
1115
|
"stroke-width": 1.5
|
|
1120
1116
|
})),
|
|
1121
|
-
k(" " +
|
|
1117
|
+
k(" " + h(y(s).blockSettings[e.labelKey]), 1)
|
|
1122
1118
|
])), 64))])]),
|
|
1123
1119
|
_: 1
|
|
1124
1120
|
}, 8, ["title", "open"]),
|
|
1125
|
-
|
|
1126
|
-
title: v(f).blockSettings.customCss,
|
|
1127
|
-
open: x.has("css"),
|
|
1128
|
-
onToggle: r[7] ||= (e) => M("css")
|
|
1129
|
-
}, {
|
|
1130
|
-
default: l(() => [w("label", { class: C(v(W)) }, m(v(f).blockSettings.css), 3), w("textarea", {
|
|
1131
|
-
value: e.block.customCss || "",
|
|
1132
|
-
placeholder: v(f).blockSettings.cssPlaceholder,
|
|
1133
|
-
rows: "3",
|
|
1134
|
-
class: C(v(kt)),
|
|
1135
|
-
onInput: r[6] ||= (e) => o("update", { customCss: e.target.value })
|
|
1136
|
-
}, null, 42, Br)]),
|
|
1137
|
-
_: 1
|
|
1138
|
-
}, 8, ["title", "open"]),
|
|
1139
|
-
N.value ? (a(), b(Ir, {
|
|
1121
|
+
N.value ? (o(), x(Rr, {
|
|
1140
1122
|
key: 0,
|
|
1141
|
-
title:
|
|
1142
|
-
open:
|
|
1143
|
-
onToggle:
|
|
1123
|
+
title: y(s).blockSettings.displayCondition,
|
|
1124
|
+
open: b.has("condition"),
|
|
1125
|
+
onToggle: n[8] ||= (e) => A("condition")
|
|
1144
1126
|
}, {
|
|
1145
|
-
default:
|
|
1146
|
-
class:
|
|
1147
|
-
value:
|
|
1148
|
-
onChange:
|
|
1127
|
+
default: u(() => [T("div", Vr, [T("select", {
|
|
1128
|
+
class: w(["tpl:w-full tpl:rounded-md tpl:border tpl:px-2.5 tpl:py-2 tpl:text-xs tpl:outline-none tpl:transition-all tpl:duration-150 tpl:focus:border-[var(--tpl-primary)] tpl:focus:shadow-[0_0_0_3px_var(--tpl-primary-light)]", e.block.displayCondition ? "tpl:border-[var(--tpl-primary)] tpl:bg-[var(--tpl-primary-light)] tpl:text-[var(--tpl-text)]" : "tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:text-[var(--tpl-text)]"]),
|
|
1129
|
+
value: S.value || P.value ? "__custom__" : e.block.displayCondition?.label ?? "",
|
|
1130
|
+
onChange: n[5] ||= (e) => {
|
|
1149
1131
|
let t = e.target.value;
|
|
1150
1132
|
if (t === "__custom__") {
|
|
1151
1133
|
te();
|
|
1152
1134
|
return;
|
|
1153
1135
|
}
|
|
1154
|
-
if (
|
|
1155
|
-
|
|
1136
|
+
if (S.value = !1, !t) {
|
|
1137
|
+
i("update", { displayCondition: void 0 });
|
|
1156
1138
|
return;
|
|
1157
1139
|
}
|
|
1158
|
-
let n =
|
|
1159
|
-
n &&
|
|
1140
|
+
let n = y(p).find((e) => e.label === t);
|
|
1141
|
+
n && i("update", { displayCondition: n });
|
|
1160
1142
|
}
|
|
1161
1143
|
}, [
|
|
1162
|
-
|
|
1163
|
-
(
|
|
1144
|
+
T("option", Ur, h(y(s).blockSettings.noCondition), 1),
|
|
1145
|
+
(o(!0), _(O, null, c(I.value, (e, t) => (o(), _(O, { key: t }, [t ? (o(), _("optgroup", {
|
|
1164
1146
|
key: 0,
|
|
1165
1147
|
label: String(t)
|
|
1166
|
-
}, [(
|
|
1148
|
+
}, [(o(!0), _(O, null, c(e, (e) => (o(), _("option", {
|
|
1167
1149
|
key: e.label,
|
|
1168
1150
|
value: e.label
|
|
1169
|
-
},
|
|
1151
|
+
}, h(e.label), 9, Gr))), 128))], 8, Wr)) : (o(!0), _(O, { key: 1 }, c(e, (e) => (o(), _("option", {
|
|
1170
1152
|
key: e.label,
|
|
1171
1153
|
value: e.label
|
|
1172
|
-
},
|
|
1173
|
-
|
|
1174
|
-
], 42, Hr),
|
|
1175
|
-
|
|
1176
|
-
"onUpdate:modelValue":
|
|
1154
|
+
}, h(e.label), 9, Kr))), 128))], 64))), 128)),
|
|
1155
|
+
y(m) ? (o(), _("option", qr, h(y(s).blockSettings.customCondition), 1)) : v("", !0)
|
|
1156
|
+
], 42, Hr), S.value || P.value ? (o(), _("div", Jr, [
|
|
1157
|
+
T("div", null, [T("label", Yr, h(y(s).blockSettings.customConditionBefore), 1), r(T("textarea", {
|
|
1158
|
+
"onUpdate:modelValue": n[6] ||= (e) => E.value = e,
|
|
1177
1159
|
rows: "2",
|
|
1178
|
-
class:
|
|
1179
|
-
}, null, 2), [[
|
|
1180
|
-
|
|
1181
|
-
"onUpdate:modelValue":
|
|
1160
|
+
class: w(y(At))
|
|
1161
|
+
}, null, 2), [[C, E.value]])]),
|
|
1162
|
+
T("div", null, [T("label", Xr, h(y(s).blockSettings.customConditionAfter), 1), r(T("textarea", {
|
|
1163
|
+
"onUpdate:modelValue": n[7] ||= (e) => D.value = e,
|
|
1182
1164
|
rows: "2",
|
|
1183
|
-
class:
|
|
1184
|
-
}, null, 2), [[
|
|
1185
|
-
|
|
1165
|
+
class: w(y(At))
|
|
1166
|
+
}, null, 2), [[C, D.value]])]),
|
|
1167
|
+
T("div", Zr, [T("button", {
|
|
1186
1168
|
type: "button",
|
|
1187
1169
|
class: "tpl:cursor-pointer tpl:rounded-md tpl:border-none tpl:bg-[var(--tpl-primary)] tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-bg)] tpl:transition-all tpl:duration-150 tpl:hover:opacity-90 tpl:disabled:opacity-50",
|
|
1188
1170
|
disabled: !E.value.trim(),
|
|
1189
1171
|
onClick: F
|
|
1190
|
-
},
|
|
1191
|
-
])) : e.block.displayCondition && !P.value ? (
|
|
1172
|
+
}, h(y(s).blockSettings.applyCondition), 9, Qr)])
|
|
1173
|
+
])) : e.block.displayCondition && !P.value ? (o(), _(O, { key: 1 }, [e.block.displayCondition.description ? (o(), _("p", $r, h(e.block.displayCondition.description), 1)) : v("", !0), T("div", ei, [T("pre", ti, h(e.block.displayCondition.before), 1), e.block.displayCondition.after ? (o(), _("pre", ni, h(e.block.displayCondition.after), 1)) : v("", !0)])], 64)) : v("", !0)])]),
|
|
1192
1174
|
_: 1
|
|
1193
|
-
}, 8, ["title", "open"])) :
|
|
1175
|
+
}, 8, ["title", "open"])) : v("", !0)
|
|
1194
1176
|
], 2));
|
|
1195
1177
|
}
|
|
1196
1178
|
}), ii = ["title"], ai = { class: "tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-text-muted)]" }, oi = {
|
|
@@ -1209,31 +1191,31 @@ var en = ["aria-label", "onKeydown"], tn = ["data-tooltip"], nn = ["data-tooltip
|
|
|
1209
1191
|
},
|
|
1210
1192
|
emits: ["update:modelValue"],
|
|
1211
1193
|
setup(e, { emit: t }) {
|
|
1212
|
-
let n = t, { t: r } =
|
|
1213
|
-
return (t, i) => (
|
|
1194
|
+
let n = t, { t: r } = z();
|
|
1195
|
+
return (t, i) => (o(), _("div", {
|
|
1214
1196
|
class: "tpl:mb-3.5",
|
|
1215
|
-
title: e.readOnly ?
|
|
1216
|
-
}, [
|
|
1217
|
-
k(
|
|
1218
|
-
e.readOnly ? (
|
|
1197
|
+
title: e.readOnly ? y(r).customBlocks.dataSource.readOnlyTooltip : void 0
|
|
1198
|
+
}, [T("label", { class: w(["tpl:flex tpl:items-center tpl:justify-between tpl:gap-2", e.readOnly ? "tpl:cursor-not-allowed" : "tpl:cursor-pointer"]) }, [T("span", ai, [
|
|
1199
|
+
k(h(e.field.label) + " ", 1),
|
|
1200
|
+
e.readOnly ? (o(), x(y(at), {
|
|
1219
1201
|
key: 0,
|
|
1220
1202
|
size: 12,
|
|
1221
1203
|
class: "tpl:inline tpl:text-[var(--tpl-text-dim)]"
|
|
1222
|
-
})) :
|
|
1223
|
-
e.field.required ? (
|
|
1224
|
-
]),
|
|
1204
|
+
})) : v("", !0),
|
|
1205
|
+
e.field.required ? (o(), _("span", oi, " * ")) : v("", !0)
|
|
1206
|
+
]), T("button", {
|
|
1225
1207
|
type: "button",
|
|
1226
1208
|
role: "switch",
|
|
1227
1209
|
"aria-checked": e.modelValue,
|
|
1228
1210
|
"aria-label": e.field.label,
|
|
1229
|
-
class:
|
|
1211
|
+
class: w([
|
|
1230
1212
|
"tpl:relative tpl:inline-flex tpl:h-5 tpl:w-9 tpl:shrink-0 tpl:rounded-full tpl:border-2 tpl:border-transparent tpl:transition-colors tpl:duration-200",
|
|
1231
1213
|
e.modelValue ? "tpl:bg-[var(--tpl-primary)]" : "tpl:bg-[var(--tpl-border)]",
|
|
1232
1214
|
e.readOnly ? "tpl:opacity-60 tpl:cursor-not-allowed" : "tpl:cursor-pointer"
|
|
1233
1215
|
]),
|
|
1234
1216
|
disabled: e.readOnly,
|
|
1235
1217
|
onClick: i[0] ||= (t) => !e.readOnly && n("update:modelValue", !e.modelValue)
|
|
1236
|
-
}, [
|
|
1218
|
+
}, [T("span", { class: w(["tpl:pointer-events-none tpl:inline-block tpl:size-4 tpl:rounded-full tpl:bg-[var(--tpl-bg)] tpl:shadow tpl:transition-transform tpl:duration-200", e.modelValue ? "tpl:translate-x-4" : "tpl:translate-x-0"]) }, null, 2)], 10, si)], 2)], 8, ii));
|
|
1237
1219
|
}
|
|
1238
1220
|
}), li = { class: "tpl:mb-3.5" }, ui = {
|
|
1239
1221
|
key: 1,
|
|
@@ -1245,16 +1227,16 @@ var en = ["aria-label", "onKeydown"], tn = ["data-tooltip"], nn = ["data-tooltip
|
|
|
1245
1227
|
required: { type: Boolean },
|
|
1246
1228
|
readOnly: { type: Boolean }
|
|
1247
1229
|
},
|
|
1248
|
-
setup(
|
|
1249
|
-
return (n, r) => (
|
|
1250
|
-
k(
|
|
1251
|
-
|
|
1230
|
+
setup(e) {
|
|
1231
|
+
return (n, r) => (o(), _("div", li, [T("label", { class: w(y(W)) }, [
|
|
1232
|
+
k(h(e.label) + " ", 1),
|
|
1233
|
+
e.readOnly ? (o(), x(y(at), {
|
|
1252
1234
|
key: 0,
|
|
1253
1235
|
size: 12,
|
|
1254
1236
|
class: "tpl:inline tpl:text-[var(--tpl-text-dim)]"
|
|
1255
|
-
})) :
|
|
1256
|
-
|
|
1257
|
-
], 2),
|
|
1237
|
+
})) : v("", !0),
|
|
1238
|
+
e.required ? (o(), _("span", ui, "*")) : v("", !0)
|
|
1239
|
+
], 2), t(n.$slots, "default")]));
|
|
1258
1240
|
}
|
|
1259
1241
|
}), di = /* @__PURE__ */ A({
|
|
1260
1242
|
__name: "ColorField",
|
|
@@ -1265,17 +1247,17 @@ var en = ["aria-label", "onKeydown"], tn = ["data-tooltip"], nn = ["data-tooltip
|
|
|
1265
1247
|
},
|
|
1266
1248
|
emits: ["update:modelValue"],
|
|
1267
1249
|
setup(e, { emit: t }) {
|
|
1268
|
-
let n = t, { t: r } =
|
|
1269
|
-
return (t, i) => (
|
|
1250
|
+
let n = t, { t: r } = z();
|
|
1251
|
+
return (t, i) => (o(), x(Q, {
|
|
1270
1252
|
label: e.field.label,
|
|
1271
1253
|
required: e.field.required,
|
|
1272
1254
|
"read-only": e.readOnly
|
|
1273
1255
|
}, {
|
|
1274
|
-
default:
|
|
1275
|
-
"model-value": e.modelValue ||
|
|
1276
|
-
placeholder: e.field.placeholder ||
|
|
1256
|
+
default: u(() => [j(q, {
|
|
1257
|
+
"model-value": e.modelValue || y("#000000"),
|
|
1258
|
+
placeholder: e.field.placeholder || y("#000000"),
|
|
1277
1259
|
disabled: e.readOnly,
|
|
1278
|
-
title: e.readOnly ?
|
|
1260
|
+
title: e.readOnly ? y(r).customBlocks.dataSource.readOnlyTooltip : void 0,
|
|
1279
1261
|
"onUpdate:modelValue": i[0] ||= (e) => n("update:modelValue", e)
|
|
1280
1262
|
}, null, 8, [
|
|
1281
1263
|
"model-value",
|
|
@@ -1303,39 +1285,39 @@ var en = ["aria-label", "onKeydown"], tn = ["data-tooltip"], nn = ["data-tooltip
|
|
|
1303
1285
|
},
|
|
1304
1286
|
emits: ["update:modelValue"],
|
|
1305
1287
|
setup(e, { emit: t }) {
|
|
1306
|
-
let n = t, { t: r } =
|
|
1307
|
-
async function
|
|
1288
|
+
let n = t, { t: r } = z(), i = l(ge, null), a = B(), s = g(() => !!i);
|
|
1289
|
+
async function c() {
|
|
1308
1290
|
let e = await i?.({ accept: ["images"] });
|
|
1309
|
-
|
|
1291
|
+
a.alive && e && n("update:modelValue", e.url);
|
|
1310
1292
|
}
|
|
1311
|
-
return (t, i) => (
|
|
1293
|
+
return (t, i) => (o(), x(Q, {
|
|
1312
1294
|
label: e.field.label,
|
|
1313
1295
|
required: e.field.required,
|
|
1314
1296
|
"read-only": e.readOnly
|
|
1315
1297
|
}, {
|
|
1316
|
-
default:
|
|
1298
|
+
default: u(() => [e.readOnly ? (o(), _("input", {
|
|
1317
1299
|
key: 0,
|
|
1318
1300
|
type: "url",
|
|
1319
|
-
class:
|
|
1301
|
+
class: w([y(U), "tpl:opacity-60 tpl:cursor-not-allowed"]),
|
|
1320
1302
|
value: e.modelValue,
|
|
1321
1303
|
placeholder: e.field.placeholder || "https://...",
|
|
1322
1304
|
disabled: "",
|
|
1323
|
-
title:
|
|
1324
|
-
}, null, 10, fi)) : (
|
|
1305
|
+
title: y(r).customBlocks.dataSource.readOnlyTooltip
|
|
1306
|
+
}, null, 10, fi)) : (o(), _("input", {
|
|
1325
1307
|
key: 1,
|
|
1326
1308
|
type: "url",
|
|
1327
|
-
class:
|
|
1309
|
+
class: w(y(U)),
|
|
1328
1310
|
value: e.modelValue,
|
|
1329
1311
|
placeholder: e.field.placeholder || "https://...",
|
|
1330
1312
|
onInput: i[0] ||= (e) => n("update:modelValue", e.target.value)
|
|
1331
|
-
}, null, 42, pi)), s.value && !e.readOnly ? (
|
|
1313
|
+
}, null, 42, pi)), s.value && !e.readOnly ? (o(), _("button", {
|
|
1332
1314
|
key: 2,
|
|
1333
1315
|
class: "tpl:mt-2 tpl:flex tpl:w-full tpl:items-center tpl:justify-center tpl:gap-1.5 tpl:rounded-md tpl:border tpl:px-3 tpl:py-2 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150 tpl:border-[var(--tpl-border)] tpl:text-[var(--tpl-primary)] tpl:bg-[var(--tpl-bg)]",
|
|
1334
|
-
onClick: i[1] ||= (e) =>
|
|
1335
|
-
}, [j(
|
|
1316
|
+
onClick: i[1] ||= (e) => c()
|
|
1317
|
+
}, [j(y(je), {
|
|
1336
1318
|
size: 14,
|
|
1337
1319
|
"stroke-width": 1.5
|
|
1338
|
-
}), k(" " +
|
|
1320
|
+
}), k(" " + h(y(r).image.browseMedia), 1)])) : v("", !0)]),
|
|
1339
1321
|
_: 1
|
|
1340
1322
|
}, 8, [
|
|
1341
1323
|
"label",
|
|
@@ -1360,22 +1342,22 @@ var en = ["aria-label", "onKeydown"], tn = ["data-tooltip"], nn = ["data-tooltip
|
|
|
1360
1342
|
},
|
|
1361
1343
|
emits: ["update:modelValue"],
|
|
1362
1344
|
setup(e, { emit: t }) {
|
|
1363
|
-
let n = t, { t: r } =
|
|
1364
|
-
return (t, i) => (
|
|
1345
|
+
let n = t, { t: r } = z();
|
|
1346
|
+
return (t, i) => (o(), x(Q, {
|
|
1365
1347
|
label: e.field.label,
|
|
1366
1348
|
required: e.field.required,
|
|
1367
1349
|
"read-only": e.readOnly
|
|
1368
1350
|
}, {
|
|
1369
|
-
default:
|
|
1351
|
+
default: u(() => [T("input", {
|
|
1370
1352
|
type: "number",
|
|
1371
|
-
class:
|
|
1353
|
+
class: w([y(U), e.readOnly && "tpl:opacity-60 tpl:cursor-not-allowed"]),
|
|
1372
1354
|
value: e.modelValue,
|
|
1373
1355
|
placeholder: e.field.placeholder,
|
|
1374
1356
|
min: e.field.min,
|
|
1375
1357
|
max: e.field.max,
|
|
1376
1358
|
step: e.field.step,
|
|
1377
1359
|
disabled: e.readOnly,
|
|
1378
|
-
title: e.readOnly ?
|
|
1360
|
+
title: e.readOnly ? y(r).customBlocks.dataSource.readOnlyTooltip : void 0,
|
|
1379
1361
|
onInput: i[0] ||= (t) => !e.readOnly && n("update:modelValue", Number(t.target.value))
|
|
1380
1362
|
}, null, 42, hi)]),
|
|
1381
1363
|
_: 1
|
|
@@ -1397,64 +1379,64 @@ var en = ["aria-label", "onKeydown"], tn = ["data-tooltip"], nn = ["data-tooltip
|
|
|
1397
1379
|
},
|
|
1398
1380
|
emits: ["update:modelValue"],
|
|
1399
1381
|
setup(e, { emit: t }) {
|
|
1400
|
-
let n = e, r = t, { t:
|
|
1382
|
+
let n = e, r = t, { t: i } = z(), s = g(() => n.modelValue || []), l = g(() => !n.field.maxItems || s.value.length < n.field.maxItems), d = g(() => !n.field.minItems || s.value.length > n.field.minItems);
|
|
1401
1383
|
function f() {
|
|
1402
|
-
if (!
|
|
1384
|
+
if (!l.value || n.readOnly) return;
|
|
1403
1385
|
let e = {};
|
|
1404
1386
|
for (let t of n.field.fields) e[t.key] = t.default ?? "";
|
|
1405
|
-
r("update:modelValue", [...
|
|
1387
|
+
r("update:modelValue", [...s.value, e]);
|
|
1406
1388
|
}
|
|
1407
1389
|
function p(e) {
|
|
1408
1390
|
if (!d.value || n.readOnly) return;
|
|
1409
|
-
let t = [...
|
|
1391
|
+
let t = [...s.value];
|
|
1410
1392
|
t.splice(e, 1), r("update:modelValue", t);
|
|
1411
1393
|
}
|
|
1412
|
-
function
|
|
1413
|
-
r("update:modelValue",
|
|
1394
|
+
function m(e, t, n) {
|
|
1395
|
+
r("update:modelValue", s.value.map((r, i) => i === e ? {
|
|
1414
1396
|
...r,
|
|
1415
1397
|
[t]: n
|
|
1416
1398
|
} : r));
|
|
1417
1399
|
}
|
|
1418
|
-
return (t, n) => (
|
|
1400
|
+
return (t, n) => (o(), x(Q, {
|
|
1419
1401
|
label: e.field.label,
|
|
1420
1402
|
required: e.field.required,
|
|
1421
1403
|
"read-only": e.readOnly
|
|
1422
1404
|
}, {
|
|
1423
|
-
default:
|
|
1424
|
-
(
|
|
1405
|
+
default: u(() => [T("div", _i, [
|
|
1406
|
+
(o(!0), _(O, null, c(s.value, (t, n) => (o(), _("div", {
|
|
1425
1407
|
key: `${e.field.key}-${n}`,
|
|
1426
1408
|
class: "tpl:rounded-md tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-hover)] tpl:p-3"
|
|
1427
|
-
}, [
|
|
1409
|
+
}, [T("div", vi, [T("span", yi, " #" + h(n + 1), 1), d.value && !e.readOnly ? (o(), _("button", {
|
|
1428
1410
|
key: 0,
|
|
1429
1411
|
type: "button",
|
|
1430
1412
|
class: "tpl:flex tpl:size-6 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:text-[var(--tpl-text-muted)] tpl:transition-all tpl:duration-150 tpl:hover:border-[var(--tpl-danger)] tpl:hover:bg-[var(--tpl-danger-light)] tpl:hover:text-[var(--tpl-danger)]",
|
|
1431
|
-
title:
|
|
1413
|
+
title: y(i).customBlocks.fields.removeItem,
|
|
1432
1414
|
onClick: (e) => p(n)
|
|
1433
|
-
}, [j(
|
|
1415
|
+
}, [j(y(Me), {
|
|
1434
1416
|
size: 12,
|
|
1435
1417
|
"stroke-width": 2
|
|
1436
|
-
})], 8, bi)) :
|
|
1418
|
+
})], 8, bi)) : v("", !0)]), (o(!0), _(O, null, c(e.field.fields, (r) => (o(), x(a(y(ji)(r.type)), {
|
|
1437
1419
|
key: r.key,
|
|
1438
1420
|
field: r,
|
|
1439
1421
|
"model-value": t[r.key],
|
|
1440
1422
|
"read-only": e.readOnly,
|
|
1441
|
-
"onUpdate:modelValue": (e) =>
|
|
1423
|
+
"onUpdate:modelValue": (e) => m(n, r.key, e)
|
|
1442
1424
|
}, null, 8, [
|
|
1443
1425
|
"field",
|
|
1444
1426
|
"model-value",
|
|
1445
1427
|
"read-only",
|
|
1446
1428
|
"onUpdate:modelValue"
|
|
1447
1429
|
]))), 128))]))), 128)),
|
|
1448
|
-
|
|
1430
|
+
l.value && !e.readOnly ? (o(), _("button", {
|
|
1449
1431
|
key: 0,
|
|
1450
1432
|
type: "button",
|
|
1451
|
-
class:
|
|
1433
|
+
class: w(y(kt)),
|
|
1452
1434
|
onClick: f
|
|
1453
|
-
}, [j(
|
|
1435
|
+
}, [j(y(H), {
|
|
1454
1436
|
size: 14,
|
|
1455
1437
|
"stroke-width": 2
|
|
1456
|
-
}), k(" " +
|
|
1457
|
-
!
|
|
1438
|
+
}), k(" " + h(y(i).customBlocks.fields.addItem), 1)], 2)) : v("", !0),
|
|
1439
|
+
!l.value && !e.readOnly ? (o(), _("p", xi, h(y(i).customBlocks.fields.maxItemsReached), 1)) : v("", !0)
|
|
1458
1440
|
])]),
|
|
1459
1441
|
_: 1
|
|
1460
1442
|
}, 8, [
|
|
@@ -1476,22 +1458,22 @@ var en = ["aria-label", "onKeydown"], tn = ["data-tooltip"], nn = ["data-tooltip
|
|
|
1476
1458
|
},
|
|
1477
1459
|
emits: ["update:modelValue"],
|
|
1478
1460
|
setup(e, { emit: t }) {
|
|
1479
|
-
let n = t, { t: r } =
|
|
1480
|
-
return (t, i) => (
|
|
1461
|
+
let n = t, { t: r } = z();
|
|
1462
|
+
return (t, i) => (o(), x(Q, {
|
|
1481
1463
|
label: e.field.label,
|
|
1482
1464
|
required: e.field.required,
|
|
1483
1465
|
"read-only": e.readOnly
|
|
1484
1466
|
}, {
|
|
1485
|
-
default:
|
|
1486
|
-
class:
|
|
1467
|
+
default: u(() => [T("select", {
|
|
1468
|
+
class: w([y(U), e.readOnly && "tpl:opacity-60 tpl:cursor-not-allowed"]),
|
|
1487
1469
|
value: e.modelValue,
|
|
1488
1470
|
disabled: e.readOnly,
|
|
1489
|
-
title: e.readOnly ?
|
|
1471
|
+
title: e.readOnly ? y(r).customBlocks.dataSource.readOnlyTooltip : void 0,
|
|
1490
1472
|
onChange: i[0] ||= (t) => !e.readOnly && n("update:modelValue", t.target.value)
|
|
1491
|
-
}, [(
|
|
1473
|
+
}, [(o(!0), _(O, null, c(e.field.options, (e) => (o(), _("option", {
|
|
1492
1474
|
key: e.value,
|
|
1493
1475
|
value: e.value
|
|
1494
|
-
},
|
|
1476
|
+
}, h(e.label), 9, wi))), 128))], 42, Ci)]),
|
|
1495
1477
|
_: 1
|
|
1496
1478
|
}, 8, [
|
|
1497
1479
|
"label",
|
|
@@ -1512,21 +1494,21 @@ var en = ["aria-label", "onKeydown"], tn = ["data-tooltip"], nn = ["data-tooltip
|
|
|
1512
1494
|
},
|
|
1513
1495
|
emits: ["update:modelValue"],
|
|
1514
1496
|
setup(e, { emit: t }) {
|
|
1515
|
-
let n = t, { t: r } =
|
|
1516
|
-
return (t, i) => (
|
|
1497
|
+
let n = t, { t: r } = z();
|
|
1498
|
+
return (t, i) => (o(), x(Q, {
|
|
1517
1499
|
label: e.field.label,
|
|
1518
1500
|
required: e.field.required,
|
|
1519
1501
|
"read-only": e.readOnly
|
|
1520
1502
|
}, {
|
|
1521
|
-
default:
|
|
1503
|
+
default: u(() => [e.readOnly ? (o(), _("input", {
|
|
1522
1504
|
key: 0,
|
|
1523
1505
|
type: "text",
|
|
1524
|
-
class:
|
|
1506
|
+
class: w([y(U), "tpl:opacity-60 tpl:cursor-not-allowed"]),
|
|
1525
1507
|
value: e.modelValue,
|
|
1526
1508
|
placeholder: e.field.placeholder,
|
|
1527
1509
|
disabled: "",
|
|
1528
|
-
title:
|
|
1529
|
-
}, null, 10, Ei)) : (
|
|
1510
|
+
title: y(r).customBlocks.dataSource.readOnlyTooltip
|
|
1511
|
+
}, null, 10, Ei)) : (o(), x(X, {
|
|
1530
1512
|
key: 1,
|
|
1531
1513
|
"model-value": e.modelValue,
|
|
1532
1514
|
placeholder: e.field.placeholder,
|
|
@@ -1554,21 +1536,21 @@ var en = ["aria-label", "onKeydown"], tn = ["data-tooltip"], nn = ["data-tooltip
|
|
|
1554
1536
|
},
|
|
1555
1537
|
emits: ["update:modelValue"],
|
|
1556
1538
|
setup(e, { emit: t }) {
|
|
1557
|
-
let n = t, { t: r } =
|
|
1558
|
-
return (t, i) => (
|
|
1539
|
+
let n = t, { t: r } = z();
|
|
1540
|
+
return (t, i) => (o(), x(Q, {
|
|
1559
1541
|
label: e.field.label,
|
|
1560
1542
|
required: e.field.required,
|
|
1561
1543
|
"read-only": e.readOnly
|
|
1562
1544
|
}, {
|
|
1563
|
-
default:
|
|
1545
|
+
default: u(() => [e.readOnly ? (o(), _("textarea", {
|
|
1564
1546
|
key: 0,
|
|
1565
1547
|
value: e.modelValue,
|
|
1566
1548
|
placeholder: e.field.placeholder,
|
|
1567
1549
|
rows: "3",
|
|
1568
1550
|
disabled: "",
|
|
1569
|
-
title:
|
|
1570
|
-
class:
|
|
1571
|
-
}, null, 8, Oi)) : (
|
|
1551
|
+
title: y(r).customBlocks.dataSource.readOnlyTooltip,
|
|
1552
|
+
class: w(ki)
|
|
1553
|
+
}, null, 8, Oi)) : (o(), x(_n, {
|
|
1572
1554
|
key: 1,
|
|
1573
1555
|
"model-value": e.modelValue,
|
|
1574
1556
|
placeholder: e.field.placeholder,
|
|
@@ -1617,15 +1599,15 @@ var Mi = {
|
|
|
1617
1599
|
props: { block: {} },
|
|
1618
1600
|
emits: ["updateFieldValues", "updateDataSourceFetched"],
|
|
1619
1601
|
setup(e, { emit: t }) {
|
|
1620
|
-
let n = e, r = t, { t:
|
|
1602
|
+
let n = e, r = t, { t: i } = z(), s = l(ne, []), u = g(() => s.find((e) => e.type === n.block.customType)), { isFetching: d, fetchError: f, fetch: p, hasDataSource: m, needsFetch: b } = Fe({
|
|
1621
1603
|
definition: u,
|
|
1622
|
-
block:
|
|
1604
|
+
block: g(() => n.block),
|
|
1623
1605
|
onUpdate: (e, t) => {
|
|
1624
1606
|
r("updateFieldValues", e), r("updateDataSourceFetched", t);
|
|
1625
1607
|
}
|
|
1626
1608
|
});
|
|
1627
1609
|
function S(e) {
|
|
1628
|
-
return e.readOnly === !0 &&
|
|
1610
|
+
return e.readOnly === !0 && m.value && !!n.block.dataSourceFetched;
|
|
1629
1611
|
}
|
|
1630
1612
|
function C(e, t) {
|
|
1631
1613
|
r("updateFieldValues", {
|
|
@@ -1633,23 +1615,23 @@ var Mi = {
|
|
|
1633
1615
|
[e]: t
|
|
1634
1616
|
});
|
|
1635
1617
|
}
|
|
1636
|
-
return (t, n) => u.value ? (
|
|
1637
|
-
u.value.description ? (
|
|
1638
|
-
|
|
1618
|
+
return (t, n) => u.value ? (o(), _("div", Pi, [
|
|
1619
|
+
u.value.description ? (o(), _("p", Fi, h(u.value.description), 1)) : v("", !0),
|
|
1620
|
+
y(m) ? (o(), _("div", Ii, [y(b) && !y(d) ? (o(), _("button", {
|
|
1639
1621
|
key: 0,
|
|
1640
1622
|
type: "button",
|
|
1641
1623
|
class: "tpl:flex tpl:w-full tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded-md tpl:px-3 tpl:py-2.5 tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-bg)] tpl:transition-all tpl:duration-150 tpl:bg-[var(--tpl-primary)]",
|
|
1642
|
-
onClick: n[0] ||= (...e) =>
|
|
1643
|
-
},
|
|
1624
|
+
onClick: n[0] ||= (...e) => y(p) && y(p)(...e)
|
|
1625
|
+
}, h(u.value?.dataSource?.label || y(i).customBlocks.dataSource.fetchButton), 1)) : (o(), _("div", Li, [y(d) ? (o(), _("div", Ri, h(y(i).customBlocks.dataSource.fetching), 1)) : (o(), _("button", {
|
|
1644
1626
|
key: 1,
|
|
1645
1627
|
type: "button",
|
|
1646
1628
|
class: "tpl:flex tpl:w-full tpl:items-center tpl:justify-center tpl:gap-1.5 tpl:rounded-md tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-muted)] tpl:transition-all tpl:duration-150 tpl:hover:border-[var(--tpl-primary)] tpl:hover:text-[var(--tpl-primary)]",
|
|
1647
|
-
onClick: n[1] ||= (...e) =>
|
|
1648
|
-
}, [j(
|
|
1629
|
+
onClick: n[1] ||= (...e) => y(p) && y(p)(...e)
|
|
1630
|
+
}, [j(y(Ve), { size: 12 }), k(" " + h(y(i).customBlocks.dataSource.changeButton), 1)]))])), y(f) ? (o(), _("p", zi, [j(y(L), {
|
|
1649
1631
|
size: 14,
|
|
1650
1632
|
class: "tpl:shrink-0"
|
|
1651
|
-
}), k(" " +
|
|
1652
|
-
(
|
|
1633
|
+
}), k(" " + h(y(i).customBlocks.dataSource.fetchError), 1)])) : v("", !0)])) : v("", !0),
|
|
1634
|
+
(o(!0), _(O, null, c(u.value.fields, (t) => (o(), x(a(y(ji)(t.type)), {
|
|
1653
1635
|
key: t.key,
|
|
1654
1636
|
field: t,
|
|
1655
1637
|
"model-value": e.block.fieldValues[t.key],
|
|
@@ -1661,48 +1643,48 @@ var Mi = {
|
|
|
1661
1643
|
"read-only",
|
|
1662
1644
|
"onUpdate:modelValue"
|
|
1663
1645
|
]))), 128))
|
|
1664
|
-
])) : (
|
|
1646
|
+
])) : (o(), _("div", Mi, [T("p", Ni, h(y(i).customBlocks.toolbar.noDefinition), 1)]));
|
|
1665
1647
|
}
|
|
1666
1648
|
}), Vi = { class: "tpl:mb-3.5" }, Hi = { class: "tpl:mb-3.5" }, Ui = { class: "tpl:mb-3.5" }, Wi = { class: "tpl:flex tpl:items-stretch" }, Gi = ["value"], Ki = /* @__PURE__ */ A({
|
|
1667
1649
|
__name: "DividerToolbar",
|
|
1668
1650
|
props: { block: {} },
|
|
1669
1651
|
emits: ["update"],
|
|
1670
1652
|
setup(e, { emit: t }) {
|
|
1671
|
-
let n = t, { t: r } =
|
|
1653
|
+
let n = t, { t: r } = z();
|
|
1672
1654
|
function i(e, t) {
|
|
1673
1655
|
n("update", { [e]: t });
|
|
1674
1656
|
}
|
|
1675
|
-
return (t, n) => (
|
|
1676
|
-
|
|
1657
|
+
return (t, n) => (o(), _(O, null, [
|
|
1658
|
+
T("div", Vi, [T("label", { class: w(y(W)) }, h(y(r).divider.style), 3), j(Y, {
|
|
1677
1659
|
options: [
|
|
1678
1660
|
{
|
|
1679
1661
|
value: "solid",
|
|
1680
|
-
label:
|
|
1662
|
+
label: y(r).divider.solid
|
|
1681
1663
|
},
|
|
1682
1664
|
{
|
|
1683
1665
|
value: "dashed",
|
|
1684
|
-
label:
|
|
1666
|
+
label: y(r).divider.dashed
|
|
1685
1667
|
},
|
|
1686
1668
|
{
|
|
1687
1669
|
value: "dotted",
|
|
1688
|
-
label:
|
|
1670
|
+
label: y(r).divider.dotted
|
|
1689
1671
|
}
|
|
1690
1672
|
],
|
|
1691
1673
|
"model-value": e.block.lineStyle,
|
|
1692
1674
|
"onUpdate:modelValue": n[0] ||= (e) => i("lineStyle", e)
|
|
1693
1675
|
}, null, 8, ["options", "model-value"])]),
|
|
1694
|
-
|
|
1676
|
+
T("div", Hi, [T("label", { class: w(y(W)) }, h(y(r).divider.color), 3), j(q, {
|
|
1695
1677
|
"model-value": e.block.color,
|
|
1696
1678
|
"onUpdate:modelValue": n[1] ||= (e) => i("color", e)
|
|
1697
1679
|
}, null, 8, ["model-value"])]),
|
|
1698
|
-
|
|
1680
|
+
T("div", Ui, [T("label", { class: w(y(W)) }, h(y(r).divider.thickness), 3), T("div", Wi, [T("input", {
|
|
1699
1681
|
type: "number",
|
|
1700
|
-
class:
|
|
1682
|
+
class: w(y(K)),
|
|
1701
1683
|
value: e.block.thickness,
|
|
1702
1684
|
min: "1",
|
|
1703
1685
|
max: "10",
|
|
1704
1686
|
onInput: n[2] ||= (e) => i("thickness", Number(e.target.value))
|
|
1705
|
-
}, null, 42, Gi),
|
|
1687
|
+
}, null, 42, Gi), T("span", { class: w(y(G)) }, "px", 2)])])
|
|
1706
1688
|
], 64));
|
|
1707
1689
|
}
|
|
1708
1690
|
}), qi = { class: "tpl:mb-3.5" }, Ji = ["value"], Yi = { class: "tpl:mt-1.5 tpl:flex tpl:items-start tpl:gap-1.5 tpl:text-[11px] tpl:text-[var(--tpl-text-dim)]" }, Xi = /* @__PURE__ */ A({
|
|
@@ -1710,20 +1692,20 @@ var Mi = {
|
|
|
1710
1692
|
props: { block: {} },
|
|
1711
1693
|
emits: ["update"],
|
|
1712
1694
|
setup(e, { emit: t }) {
|
|
1713
|
-
let n = t, { t: r } =
|
|
1714
|
-
return (t, i) => (
|
|
1715
|
-
|
|
1716
|
-
|
|
1695
|
+
let n = t, { t: r } = z();
|
|
1696
|
+
return (t, i) => (o(), _("div", qi, [
|
|
1697
|
+
T("label", { class: w(y(W)) }, h(y(r).html.content), 3),
|
|
1698
|
+
T("textarea", {
|
|
1717
1699
|
value: e.block.content,
|
|
1718
1700
|
placeholder: "<div>...</div>",
|
|
1719
1701
|
rows: "10",
|
|
1720
|
-
class:
|
|
1702
|
+
class: w(y(At)),
|
|
1721
1703
|
onInput: i[0] ||= (e) => n("update", { content: e.target.value })
|
|
1722
1704
|
}, null, 42, Ji),
|
|
1723
|
-
|
|
1705
|
+
T("p", Yi, [j(y(tt), {
|
|
1724
1706
|
size: 12,
|
|
1725
1707
|
class: "tpl:mt-0.5 tpl:shrink-0"
|
|
1726
|
-
}), k(" " +
|
|
1708
|
+
}), k(" " + h(y(r).html.sanitizationHint), 1)])
|
|
1727
1709
|
]));
|
|
1728
1710
|
}
|
|
1729
1711
|
}), Zi = { class: "tpl:mb-3.5" }, Qi = {
|
|
@@ -1737,31 +1719,31 @@ var Mi = {
|
|
|
1737
1719
|
props: { block: {} },
|
|
1738
1720
|
emits: ["update"],
|
|
1739
1721
|
setup(e, { emit: t }) {
|
|
1740
|
-
let n = t, { t: r } =
|
|
1722
|
+
let n = t, { t: r } = z(), i = l(ge, null), a = l(Oe, ke.liquid), s = B(), c = g(() => !!i), u = f(!1), d = f(!1), { start: p } = Be(() => {
|
|
1741
1723
|
u.value = !1;
|
|
1742
1724
|
}, 1e3, { immediate: !1 });
|
|
1743
|
-
function
|
|
1725
|
+
function m(e, t) {
|
|
1744
1726
|
n("update", { [e]: t });
|
|
1745
1727
|
}
|
|
1746
1728
|
async function b() {
|
|
1747
1729
|
let e = await i?.({ accept: ["images"] });
|
|
1748
|
-
s.alive && e && (
|
|
1730
|
+
s.alive && e && (m("src", e.url), e.alt && (m("alt", e.alt), d.value = !0), u.value = !0, p());
|
|
1749
1731
|
}
|
|
1750
|
-
return (t, n) => (
|
|
1751
|
-
|
|
1752
|
-
|
|
1732
|
+
return (t, n) => (o(), _(O, null, [
|
|
1733
|
+
T("div", Zi, [
|
|
1734
|
+
T("label", { class: w(y(W)) }, h(y(r).image.imageUrl), 3),
|
|
1753
1735
|
j(X, {
|
|
1754
1736
|
"model-value": e.block.src,
|
|
1755
1737
|
type: "url",
|
|
1756
|
-
placeholder:
|
|
1738
|
+
placeholder: y(r).image.imageUrlPlaceholder,
|
|
1757
1739
|
pulse: u.value,
|
|
1758
|
-
"onUpdate:modelValue": n[0] ||= (e) =>
|
|
1740
|
+
"onUpdate:modelValue": n[0] ||= (e) => m("src", e)
|
|
1759
1741
|
}, null, 8, [
|
|
1760
1742
|
"model-value",
|
|
1761
1743
|
"placeholder",
|
|
1762
1744
|
"pulse"
|
|
1763
1745
|
]),
|
|
1764
|
-
|
|
1746
|
+
c.value ? (o(), _("button", {
|
|
1765
1747
|
key: 0,
|
|
1766
1748
|
class: "tpl:mt-2 tpl:flex tpl:w-full tpl:items-center tpl:justify-center tpl:gap-1.5 tpl:rounded-md tpl:border tpl:px-3 tpl:py-2 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150",
|
|
1767
1749
|
style: {
|
|
@@ -1770,82 +1752,82 @@ var Mi = {
|
|
|
1770
1752
|
"background-color": "var(--tpl-bg)"
|
|
1771
1753
|
},
|
|
1772
1754
|
onClick: b
|
|
1773
|
-
}, [j(
|
|
1755
|
+
}, [j(y(je), {
|
|
1774
1756
|
size: 14,
|
|
1775
1757
|
"stroke-width": 1.5
|
|
1776
|
-
}), k(" " +
|
|
1758
|
+
}), k(" " + h(y(r).image.browseMedia), 1)])) : v("", !0)
|
|
1777
1759
|
]),
|
|
1778
|
-
|
|
1760
|
+
y(Ye)(e.block.src, y(a)) ? (o(), _("div", Qi, [T("label", { class: w(y(W)) }, [k(h(y(r).image.placeholderUrl) + " ", 1), n[8] ||= T("span", { class: "tpl:font-normal tpl:text-[var(--tpl-text-dim)]" }, h("(optional)"), -1)], 2), T("input", {
|
|
1779
1761
|
type: "url",
|
|
1780
|
-
class:
|
|
1762
|
+
class: w(y(U)),
|
|
1781
1763
|
value: e.block.placeholderUrl || "",
|
|
1782
|
-
placeholder:
|
|
1783
|
-
onInput: n[1] ||= (e) =>
|
|
1784
|
-
}, null, 42, $i)])) :
|
|
1785
|
-
|
|
1786
|
-
|
|
1764
|
+
placeholder: y(r).image.placeholderUrlPlaceholder,
|
|
1765
|
+
onInput: n[1] ||= (e) => m("placeholderUrl", e.target.value)
|
|
1766
|
+
}, null, 42, $i)])) : v("", !0),
|
|
1767
|
+
T("div", ea, [
|
|
1768
|
+
T("label", { class: w(y(W)) }, h(y(r).image.altText), 3),
|
|
1787
1769
|
j(X, {
|
|
1788
1770
|
"model-value": e.block.alt,
|
|
1789
1771
|
type: "text",
|
|
1790
|
-
placeholder:
|
|
1791
|
-
pulse:
|
|
1772
|
+
placeholder: y(r).image.altTextPlaceholder,
|
|
1773
|
+
pulse: d.value,
|
|
1792
1774
|
disabled: e.block.decorative === !0,
|
|
1793
|
-
"onUpdate:modelValue": n[2] ||= (e) =>
|
|
1775
|
+
"onUpdate:modelValue": n[2] ||= (e) => m("alt", e)
|
|
1794
1776
|
}, null, 8, [
|
|
1795
1777
|
"model-value",
|
|
1796
1778
|
"placeholder",
|
|
1797
1779
|
"pulse",
|
|
1798
1780
|
"disabled"
|
|
1799
1781
|
]),
|
|
1800
|
-
|
|
1782
|
+
T("label", ta, [T("input", {
|
|
1801
1783
|
type: "checkbox",
|
|
1802
1784
|
class: "tpl:size-3.5 tpl:cursor-pointer tpl:accent-[var(--tpl-primary)]",
|
|
1803
1785
|
checked: e.block.decorative === !0,
|
|
1804
|
-
onChange: n[3] ||= (e) =>
|
|
1805
|
-
}, null, 40, na),
|
|
1786
|
+
onChange: n[3] ||= (e) => m("decorative", e.target.checked)
|
|
1787
|
+
}, null, 40, na), T("span", null, [k(h(y(r).image.decorative) + " ", 1), T("span", ra, h(y(r).image.decorativeHint), 1)])])
|
|
1806
1788
|
]),
|
|
1807
|
-
|
|
1808
|
-
class:
|
|
1789
|
+
T("div", ia, [T("label", { class: w(y(W)) }, h(y(r).image.width), 3), T("select", {
|
|
1790
|
+
class: w(y(U)),
|
|
1809
1791
|
value: e.block.width,
|
|
1810
|
-
onChange: n[4] ||= (e) =>
|
|
1792
|
+
onChange: n[4] ||= (e) => m("width", e.target.value === "full" ? "full" : Number(e.target.value))
|
|
1811
1793
|
}, [
|
|
1812
|
-
|
|
1813
|
-
n[9] ||=
|
|
1814
|
-
n[10] ||=
|
|
1815
|
-
n[11] ||=
|
|
1794
|
+
T("option", oa, h(y(r).image.fullWidth), 1),
|
|
1795
|
+
n[9] ||= T("option", { value: "300" }, "300px", -1),
|
|
1796
|
+
n[10] ||= T("option", { value: "400" }, "400px", -1),
|
|
1797
|
+
n[11] ||= T("option", { value: "500" }, "500px", -1)
|
|
1816
1798
|
], 42, aa)]),
|
|
1817
|
-
|
|
1799
|
+
T("div", sa, [T("label", { class: w(y(W)) }, h(y(r).title.align), 3), j(Y, {
|
|
1818
1800
|
options: [
|
|
1819
1801
|
{
|
|
1820
1802
|
value: "left",
|
|
1821
|
-
label:
|
|
1803
|
+
label: y(r).title.alignLeft
|
|
1822
1804
|
},
|
|
1823
1805
|
{
|
|
1824
1806
|
value: "center",
|
|
1825
|
-
label:
|
|
1807
|
+
label: y(r).title.alignCenter
|
|
1826
1808
|
},
|
|
1827
1809
|
{
|
|
1828
1810
|
value: "right",
|
|
1829
|
-
label:
|
|
1811
|
+
label: y(r).title.alignRight
|
|
1830
1812
|
}
|
|
1831
1813
|
],
|
|
1832
1814
|
"model-value": e.block.align,
|
|
1833
|
-
"onUpdate:modelValue": n[5] ||= (e) =>
|
|
1815
|
+
"onUpdate:modelValue": n[5] ||= (e) => m("align", e)
|
|
1834
1816
|
}, null, 8, ["options", "model-value"])]),
|
|
1835
|
-
|
|
1836
|
-
|
|
1817
|
+
T("div", ca, [
|
|
1818
|
+
T("label", { class: w(y(W)) }, h(y(r).image.linkUrl), 3),
|
|
1837
1819
|
j(X, {
|
|
1838
1820
|
"model-value": e.block.linkUrl || "",
|
|
1839
1821
|
type: "url",
|
|
1840
|
-
placeholder:
|
|
1841
|
-
"onUpdate:modelValue": n[6] ||= (e) =>
|
|
1822
|
+
placeholder: y(r).image.imageUrlPlaceholder,
|
|
1823
|
+
"onUpdate:modelValue": n[6] ||= (e) => m("linkUrl", e)
|
|
1842
1824
|
}, null, 8, ["model-value", "placeholder"]),
|
|
1843
|
-
e.block.linkUrl ? (
|
|
1825
|
+
e.block.linkUrl ? (o(), _("label", la, [T("input", {
|
|
1844
1826
|
type: "checkbox",
|
|
1845
1827
|
class: "tpl:size-3.5 tpl:cursor-pointer tpl:accent-[var(--tpl-primary)]",
|
|
1846
1828
|
checked: e.block.linkOpenInNewTab ?? !1,
|
|
1847
|
-
onChange: n[7] ||= (e) =>
|
|
1848
|
-
}, null, 40, ua), k(" " +
|
|
1829
|
+
onChange: n[7] ||= (e) => m("linkOpenInNewTab", e.target.checked)
|
|
1830
|
+
}, null, 40, ua), k(" " + h(y(r).image.openInNewTab), 1)])) : v("", !0)
|
|
1849
1831
|
])
|
|
1850
1832
|
], 64));
|
|
1851
1833
|
}
|
|
@@ -1861,7 +1843,7 @@ var Mi = {
|
|
|
1861
1843
|
},
|
|
1862
1844
|
emits: ["update"],
|
|
1863
1845
|
setup(e, { emit: t }) {
|
|
1864
|
-
let n = e, r = t, { t: i } =
|
|
1846
|
+
let n = e, r = t, { t: i } = z(), a = g(() => [
|
|
1865
1847
|
{
|
|
1866
1848
|
key: "openInNewTab",
|
|
1867
1849
|
label: i.menu.openInNewTab
|
|
@@ -1874,7 +1856,7 @@ var Mi = {
|
|
|
1874
1856
|
key: "underline",
|
|
1875
1857
|
label: i.menu.underline
|
|
1876
1858
|
}
|
|
1877
|
-
]),
|
|
1859
|
+
]), s = g(() => [
|
|
1878
1860
|
{
|
|
1879
1861
|
value: "left",
|
|
1880
1862
|
label: i.title.alignLeft,
|
|
@@ -1883,7 +1865,7 @@ var Mi = {
|
|
|
1883
1865
|
{
|
|
1884
1866
|
value: "center",
|
|
1885
1867
|
label: i.title.alignCenter,
|
|
1886
|
-
icon:
|
|
1868
|
+
icon: gt
|
|
1887
1869
|
},
|
|
1888
1870
|
{
|
|
1889
1871
|
value: "right",
|
|
@@ -1891,12 +1873,12 @@ var Mi = {
|
|
|
1891
1873
|
icon: yt
|
|
1892
1874
|
}
|
|
1893
1875
|
]);
|
|
1894
|
-
function
|
|
1876
|
+
function l(e, t) {
|
|
1895
1877
|
r("update", { [e]: t });
|
|
1896
1878
|
}
|
|
1897
1879
|
function d() {
|
|
1898
1880
|
let e = {
|
|
1899
|
-
id:
|
|
1881
|
+
id: ye(),
|
|
1900
1882
|
text: "",
|
|
1901
1883
|
url: "",
|
|
1902
1884
|
openInNewTab: !1,
|
|
@@ -1914,125 +1896,125 @@ var Mi = {
|
|
|
1914
1896
|
function p(e) {
|
|
1915
1897
|
r("update", { items: n.block.items.filter((t) => t.id !== e) });
|
|
1916
1898
|
}
|
|
1917
|
-
return (t, n) => (
|
|
1918
|
-
j(J, { label:
|
|
1919
|
-
default:
|
|
1899
|
+
return (t, n) => (o(), _(O, null, [
|
|
1900
|
+
j(J, { label: y(i).menu.items }, {
|
|
1901
|
+
default: u(() => [T("div", fa, [(o(!0), _(O, null, c(e.block.items, (t) => (o(), _("div", {
|
|
1920
1902
|
key: t.id,
|
|
1921
1903
|
class: "tpl:flex tpl:flex-col tpl:gap-1.5 tpl:rounded-md tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-hover)] tpl:p-2"
|
|
1922
1904
|
}, [
|
|
1923
|
-
|
|
1905
|
+
T("div", pa, [T("input", {
|
|
1924
1906
|
type: "text",
|
|
1925
|
-
class:
|
|
1907
|
+
class: w([y(U), "tpl:flex-1"]),
|
|
1926
1908
|
value: t.text,
|
|
1927
|
-
placeholder:
|
|
1909
|
+
placeholder: y(i).menu.text,
|
|
1928
1910
|
onInput: (e) => f(t.id, "text", e.target.value)
|
|
1929
|
-
}, null, 42, ma),
|
|
1930
|
-
class:
|
|
1931
|
-
title:
|
|
1911
|
+
}, null, 42, ma), T("button", {
|
|
1912
|
+
class: w(y(Ot)),
|
|
1913
|
+
title: y(i).menu.removeItem,
|
|
1932
1914
|
onClick: (e) => p(t.id)
|
|
1933
|
-
}, [j(
|
|
1915
|
+
}, [j(y(Ae), {
|
|
1934
1916
|
size: 14,
|
|
1935
1917
|
"stroke-width": 2
|
|
1936
1918
|
})], 10, ha)]),
|
|
1937
1919
|
j(X, {
|
|
1938
1920
|
"model-value": t.url,
|
|
1939
1921
|
type: "url",
|
|
1940
|
-
placeholder:
|
|
1922
|
+
placeholder: y(i).menu.urlPlaceholder,
|
|
1941
1923
|
"onUpdate:modelValue": (e) => f(t.id, "url", e)
|
|
1942
1924
|
}, null, 8, [
|
|
1943
1925
|
"model-value",
|
|
1944
1926
|
"placeholder",
|
|
1945
1927
|
"onUpdate:modelValue"
|
|
1946
1928
|
]),
|
|
1947
|
-
|
|
1929
|
+
T("div", ga, [(o(!0), _(O, null, c(a.value, (e) => (o(), _("label", {
|
|
1948
1930
|
key: e.key,
|
|
1949
1931
|
class: "tpl:flex tpl:cursor-pointer tpl:items-center tpl:gap-1"
|
|
1950
|
-
}, [
|
|
1932
|
+
}, [T("input", {
|
|
1951
1933
|
type: "checkbox",
|
|
1952
1934
|
checked: t[e.key],
|
|
1953
1935
|
class: "tpl:accent-[var(--tpl-primary)]",
|
|
1954
1936
|
onChange: (n) => f(t.id, e.key, n.target.checked)
|
|
1955
|
-
}, null, 40, _a), k(" " +
|
|
1956
|
-
|
|
1937
|
+
}, null, 40, _a), k(" " + h(e.label), 1)]))), 128))]),
|
|
1938
|
+
T("div", va, [T("label", { class: w([y(W), "tpl:!mb-0"]) }, h(y(i).menu.color), 3), j(q, {
|
|
1957
1939
|
"swatch-only": "",
|
|
1958
1940
|
"model-value": t.color || e.block.linkColor || e.block.color,
|
|
1959
1941
|
"onUpdate:modelValue": (e) => f(t.id, "color", e)
|
|
1960
1942
|
}, null, 8, ["model-value", "onUpdate:modelValue"])])
|
|
1961
|
-
]))), 128)),
|
|
1962
|
-
class:
|
|
1943
|
+
]))), 128)), T("button", {
|
|
1944
|
+
class: w(y(kt)),
|
|
1963
1945
|
onClick: d
|
|
1964
|
-
}, [j(
|
|
1946
|
+
}, [j(y(H), {
|
|
1965
1947
|
size: 14,
|
|
1966
1948
|
"stroke-width": 2
|
|
1967
|
-
}), k(" " +
|
|
1949
|
+
}), k(" " + h(y(i).menu.addItem), 1)], 2)])]),
|
|
1968
1950
|
_: 1
|
|
1969
1951
|
}, 8, ["label"]),
|
|
1970
|
-
j(J, { label:
|
|
1971
|
-
default:
|
|
1972
|
-
class:
|
|
1952
|
+
j(J, { label: y(i).menu.fontFamily }, {
|
|
1953
|
+
default: u(() => [T("select", {
|
|
1954
|
+
class: w(y(U)),
|
|
1973
1955
|
value: e.block.fontFamily || "",
|
|
1974
|
-
onChange: n[0] ||= (e) =>
|
|
1975
|
-
}, [
|
|
1956
|
+
onChange: n[0] ||= (e) => l("fontFamily", e.target.value || void 0)
|
|
1957
|
+
}, [T("option", ba, h(y(i).title.inheritFont), 1), (o(!0), _(O, null, c(e.fontFamilies, (e) => (o(), _("option", {
|
|
1976
1958
|
key: e.value,
|
|
1977
1959
|
value: e.value
|
|
1978
|
-
},
|
|
1960
|
+
}, h(e.label), 9, xa))), 128))], 42, ya)]),
|
|
1979
1961
|
_: 1
|
|
1980
1962
|
}, 8, ["label"]),
|
|
1981
|
-
j(J, { label:
|
|
1982
|
-
default:
|
|
1963
|
+
j(J, { label: y(i).menu.fontSize }, {
|
|
1964
|
+
default: u(() => [j(Nt, {
|
|
1983
1965
|
"model-value": e.block.fontSize,
|
|
1984
1966
|
min: 8,
|
|
1985
1967
|
max: 48,
|
|
1986
1968
|
suffix: "px",
|
|
1987
|
-
"onUpdate:modelValue": n[1] ||= (e) =>
|
|
1969
|
+
"onUpdate:modelValue": n[1] ||= (e) => l("fontSize", e)
|
|
1988
1970
|
}, null, 8, ["model-value"])]),
|
|
1989
1971
|
_: 1
|
|
1990
1972
|
}, 8, ["label"]),
|
|
1991
|
-
j(J, { label:
|
|
1992
|
-
default:
|
|
1973
|
+
j(J, { label: y(i).menu.color }, {
|
|
1974
|
+
default: u(() => [j(q, {
|
|
1993
1975
|
"model-value": e.block.color,
|
|
1994
|
-
"onUpdate:modelValue": n[2] ||= (e) =>
|
|
1976
|
+
"onUpdate:modelValue": n[2] ||= (e) => l("color", e)
|
|
1995
1977
|
}, null, 8, ["model-value"])]),
|
|
1996
1978
|
_: 1
|
|
1997
1979
|
}, 8, ["label"]),
|
|
1998
|
-
j(J, { label:
|
|
1999
|
-
default:
|
|
1980
|
+
j(J, { label: y(i).menu.linkColor }, {
|
|
1981
|
+
default: u(() => [j(q, {
|
|
2000
1982
|
"model-value": e.block.linkColor || e.block.color,
|
|
2001
|
-
"onUpdate:modelValue": n[3] ||= (e) =>
|
|
1983
|
+
"onUpdate:modelValue": n[3] ||= (e) => l("linkColor", e || void 0)
|
|
2002
1984
|
}, null, 8, ["model-value"])]),
|
|
2003
1985
|
_: 1
|
|
2004
1986
|
}, 8, ["label"]),
|
|
2005
|
-
j(J, { label:
|
|
2006
|
-
default:
|
|
2007
|
-
options:
|
|
1987
|
+
j(J, { label: y(i).menu.textAlign }, {
|
|
1988
|
+
default: u(() => [j(Y, {
|
|
1989
|
+
options: s.value,
|
|
2008
1990
|
"model-value": e.block.textAlign,
|
|
2009
|
-
"onUpdate:modelValue": n[4] ||= (e) =>
|
|
1991
|
+
"onUpdate:modelValue": n[4] ||= (e) => l("textAlign", e)
|
|
2010
1992
|
}, null, 8, ["options", "model-value"])]),
|
|
2011
1993
|
_: 1
|
|
2012
1994
|
}, 8, ["label"]),
|
|
2013
|
-
j(J, { label:
|
|
2014
|
-
default:
|
|
1995
|
+
j(J, { label: y(i).menu.separator }, {
|
|
1996
|
+
default: u(() => [T("input", {
|
|
2015
1997
|
type: "text",
|
|
2016
|
-
class:
|
|
1998
|
+
class: w(y(U)),
|
|
2017
1999
|
value: e.block.separator,
|
|
2018
|
-
onInput: n[5] ||= (e) =>
|
|
2000
|
+
onInput: n[5] ||= (e) => l("separator", e.target.value)
|
|
2019
2001
|
}, null, 42, Sa)]),
|
|
2020
2002
|
_: 1
|
|
2021
2003
|
}, 8, ["label"]),
|
|
2022
|
-
j(J, { label:
|
|
2023
|
-
default:
|
|
2004
|
+
j(J, { label: y(i).menu.separatorColor }, {
|
|
2005
|
+
default: u(() => [j(q, {
|
|
2024
2006
|
"model-value": e.block.separatorColor,
|
|
2025
|
-
"onUpdate:modelValue": n[6] ||= (e) =>
|
|
2007
|
+
"onUpdate:modelValue": n[6] ||= (e) => l("separatorColor", e)
|
|
2026
2008
|
}, null, 8, ["model-value"])]),
|
|
2027
2009
|
_: 1
|
|
2028
2010
|
}, 8, ["label"]),
|
|
2029
|
-
j(J, { label:
|
|
2030
|
-
default:
|
|
2011
|
+
j(J, { label: y(i).menu.spacing }, {
|
|
2012
|
+
default: u(() => [j(Nt, {
|
|
2031
2013
|
"model-value": e.block.spacing,
|
|
2032
2014
|
min: 0,
|
|
2033
2015
|
max: 50,
|
|
2034
2016
|
suffix: "px",
|
|
2035
|
-
"onUpdate:modelValue": n[7] ||= (e) =>
|
|
2017
|
+
"onUpdate:modelValue": n[7] ||= (e) => l("spacing", e)
|
|
2036
2018
|
}, null, 8, ["model-value"])]),
|
|
2037
2019
|
_: 1
|
|
2038
2020
|
}, 8, ["label"])
|
|
@@ -2061,7 +2043,7 @@ var Ea = { class: "tpl:mb-3.5" }, Da = ["value"], Oa = ["value"], ka = /* @__PUR
|
|
|
2061
2043
|
props: { block: {} },
|
|
2062
2044
|
emits: ["update"],
|
|
2063
2045
|
setup(e, { emit: t }) {
|
|
2064
|
-
let n = e, r = t, { t: i } =
|
|
2046
|
+
let n = e, r = t, { t: i } = z(), a = g(() => [
|
|
2065
2047
|
{
|
|
2066
2048
|
value: "1",
|
|
2067
2049
|
label: i.section.column1
|
|
@@ -2083,34 +2065,34 @@ var Ea = { class: "tpl:mb-3.5" }, Da = ["value"], Oa = ["value"], ka = /* @__PUR
|
|
|
2083
2065
|
label: i.section.ratio21
|
|
2084
2066
|
}
|
|
2085
2067
|
]);
|
|
2086
|
-
function
|
|
2068
|
+
function s(e) {
|
|
2087
2069
|
let t = e.target.value;
|
|
2088
2070
|
r("update", {
|
|
2089
2071
|
columns: t,
|
|
2090
2072
|
children: Ta(n.block.children, t)
|
|
2091
2073
|
});
|
|
2092
2074
|
}
|
|
2093
|
-
return (t, n) => (
|
|
2094
|
-
class:
|
|
2075
|
+
return (t, n) => (o(), _("div", Ea, [T("label", { class: w(y(W)) }, h(y(i).section.columns), 3), T("select", {
|
|
2076
|
+
class: w(y(U)),
|
|
2095
2077
|
value: e.block.columns,
|
|
2096
|
-
onChange:
|
|
2097
|
-
}, [(
|
|
2078
|
+
onChange: s
|
|
2079
|
+
}, [(o(!0), _(O, null, c(a.value, (e) => (o(), _("option", {
|
|
2098
2080
|
key: e.value,
|
|
2099
2081
|
value: e.value
|
|
2100
|
-
},
|
|
2082
|
+
}, h(e.label), 9, Oa))), 128))], 42, Da)]));
|
|
2101
2083
|
}
|
|
2102
2084
|
}), Aa = { class: "tpl:mb-3.5" }, ja = { class: "tpl:flex tpl:flex-col tpl:gap-2" }, Ma = { class: "tpl:flex tpl:items-center tpl:gap-2" }, Na = ["value", "onChange"], Pa = ["value"], Fa = ["title", "onClick"], Ia = { class: "tpl:mb-3.5" }, La = ["value"], Ra = { value: "solid" }, za = { value: "outlined" }, Ba = { value: "rounded" }, Va = { value: "square" }, Ha = { value: "circle" }, Ua = { class: "tpl:mb-3.5" }, Wa = { class: "tpl:mb-3.5" }, Ga = { class: "tpl:flex tpl:items-stretch" }, Ka = ["value"], qa = { class: "tpl:mb-3.5" }, Ja = /* @__PURE__ */ A({
|
|
2103
2085
|
__name: "SocialToolbar",
|
|
2104
2086
|
props: { block: {} },
|
|
2105
2087
|
emits: ["update"],
|
|
2106
2088
|
setup(e, { emit: t }) {
|
|
2107
|
-
let n = e, r = t, { t: i } =
|
|
2108
|
-
function
|
|
2089
|
+
let n = e, r = t, { t: i } = z();
|
|
2090
|
+
function a(e, t) {
|
|
2109
2091
|
r("update", { [e]: t });
|
|
2110
2092
|
}
|
|
2111
|
-
function
|
|
2093
|
+
function s() {
|
|
2112
2094
|
let e = {
|
|
2113
|
-
id:
|
|
2095
|
+
id: ye(),
|
|
2114
2096
|
platform: "facebook",
|
|
2115
2097
|
url: ""
|
|
2116
2098
|
};
|
|
@@ -2125,98 +2107,98 @@ var Ea = { class: "tpl:mb-3.5" }, Da = ["value"], Oa = ["value"], ka = /* @__PUR
|
|
|
2125
2107
|
function u(e) {
|
|
2126
2108
|
r("update", { icons: n.block.icons.filter((t) => t.id !== e) });
|
|
2127
2109
|
}
|
|
2128
|
-
return (t, n) => (
|
|
2129
|
-
|
|
2110
|
+
return (t, n) => (o(), _(O, null, [
|
|
2111
|
+
T("div", Aa, [T("label", { class: w(y(W)) }, h(y(i).social.icons), 3), T("div", ja, [(o(!0), _(O, null, c(e.block.icons, (e) => (o(), _("div", {
|
|
2130
2112
|
key: e.id,
|
|
2131
2113
|
class: "tpl:flex tpl:flex-col tpl:gap-1.5 tpl:rounded-md tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-hover)] tpl:p-2"
|
|
2132
|
-
}, [
|
|
2114
|
+
}, [T("div", Ma, [T("select", {
|
|
2133
2115
|
"data-testid": "social-platform-select",
|
|
2134
|
-
class:
|
|
2116
|
+
class: w([y(U), "tpl:flex-1"]),
|
|
2135
2117
|
value: e.platform,
|
|
2136
2118
|
onChange: (t) => l(e.id, "platform", t.target.value)
|
|
2137
|
-
}, [(
|
|
2119
|
+
}, [(o(!0), _(O, null, c(y(ie), (e) => (o(), _("option", {
|
|
2138
2120
|
key: e,
|
|
2139
2121
|
value: e
|
|
2140
|
-
},
|
|
2141
|
-
class:
|
|
2142
|
-
title:
|
|
2122
|
+
}, h(y(R)[e].name), 9, Pa))), 128))], 42, Na), T("button", {
|
|
2123
|
+
class: w(y(Ot)),
|
|
2124
|
+
title: y(i).social.removeIcon,
|
|
2143
2125
|
onClick: (t) => u(e.id)
|
|
2144
|
-
}, [j(
|
|
2126
|
+
}, [j(y(Ae), {
|
|
2145
2127
|
size: 14,
|
|
2146
2128
|
"stroke-width": 2
|
|
2147
2129
|
})], 10, Fa)]), j(X, {
|
|
2148
2130
|
"model-value": e.url,
|
|
2149
2131
|
type: "url",
|
|
2150
|
-
placeholder:
|
|
2132
|
+
placeholder: y(i).social.urlPlaceholder,
|
|
2151
2133
|
"onUpdate:modelValue": (t) => l(e.id, "url", t)
|
|
2152
2134
|
}, null, 8, [
|
|
2153
2135
|
"model-value",
|
|
2154
2136
|
"placeholder",
|
|
2155
2137
|
"onUpdate:modelValue"
|
|
2156
|
-
])]))), 128)),
|
|
2157
|
-
class:
|
|
2158
|
-
onClick:
|
|
2159
|
-
}, [j(
|
|
2138
|
+
])]))), 128)), T("button", {
|
|
2139
|
+
class: w(y(kt)),
|
|
2140
|
+
onClick: s
|
|
2141
|
+
}, [j(y(H), {
|
|
2160
2142
|
size: 14,
|
|
2161
2143
|
"stroke-width": 2
|
|
2162
|
-
}), k(" " +
|
|
2163
|
-
|
|
2164
|
-
class:
|
|
2144
|
+
}), k(" " + h(y(i).social.addIcon), 1)], 2)])]),
|
|
2145
|
+
T("div", Ia, [T("label", { class: w(y(W)) }, h(y(i).social.style), 3), T("select", {
|
|
2146
|
+
class: w(y(U)),
|
|
2165
2147
|
value: e.block.iconStyle,
|
|
2166
|
-
onChange: n[0] ||= (e) =>
|
|
2148
|
+
onChange: n[0] ||= (e) => a("iconStyle", e.target.value)
|
|
2167
2149
|
}, [
|
|
2168
|
-
|
|
2169
|
-
|
|
2170
|
-
|
|
2171
|
-
|
|
2172
|
-
|
|
2150
|
+
T("option", Ra, h(y(i).social.styleSolid), 1),
|
|
2151
|
+
T("option", za, h(y(i).social.styleOutlined), 1),
|
|
2152
|
+
T("option", Ba, h(y(i).social.styleRounded), 1),
|
|
2153
|
+
T("option", Va, h(y(i).social.styleSquare), 1),
|
|
2154
|
+
T("option", Ha, h(y(i).social.styleCircle), 1)
|
|
2173
2155
|
], 42, La)]),
|
|
2174
|
-
|
|
2156
|
+
T("div", Ua, [T("label", { class: w(y(W)) }, h(y(i).social.size), 3), j(Y, {
|
|
2175
2157
|
options: [
|
|
2176
2158
|
{
|
|
2177
2159
|
value: "small",
|
|
2178
|
-
label:
|
|
2160
|
+
label: y(i).social.sizeSmall
|
|
2179
2161
|
},
|
|
2180
2162
|
{
|
|
2181
2163
|
value: "medium",
|
|
2182
|
-
label:
|
|
2164
|
+
label: y(i).social.sizeMedium
|
|
2183
2165
|
},
|
|
2184
2166
|
{
|
|
2185
2167
|
value: "large",
|
|
2186
|
-
label:
|
|
2168
|
+
label: y(i).social.sizeLarge
|
|
2187
2169
|
}
|
|
2188
2170
|
],
|
|
2189
2171
|
"model-value": e.block.iconSize,
|
|
2190
|
-
"onUpdate:modelValue": n[1] ||= (e) =>
|
|
2172
|
+
"onUpdate:modelValue": n[1] ||= (e) => a("iconSize", e)
|
|
2191
2173
|
}, null, 8, ["options", "model-value"])]),
|
|
2192
|
-
|
|
2174
|
+
T("div", Wa, [T("label", { class: w(y(W)) }, h(y(i).social.spacing), 3), T("div", Ga, [T("input", {
|
|
2193
2175
|
type: "number",
|
|
2194
|
-
class:
|
|
2176
|
+
class: w(y(K)),
|
|
2195
2177
|
value: e.block.spacing,
|
|
2196
2178
|
min: "0",
|
|
2197
2179
|
max: "50",
|
|
2198
|
-
onInput: n[2] ||= (e) =>
|
|
2199
|
-
}, null, 42, Ka),
|
|
2200
|
-
|
|
2180
|
+
onInput: n[2] ||= (e) => a("spacing", Number(e.target.value))
|
|
2181
|
+
}, null, 42, Ka), T("span", { class: w(y(G)) }, "px", 2)])]),
|
|
2182
|
+
T("div", qa, [T("label", { class: w(y(W)) }, h(y(i).social.align), 3), j(Y, {
|
|
2201
2183
|
options: [
|
|
2202
2184
|
{
|
|
2203
2185
|
value: "left",
|
|
2204
|
-
label:
|
|
2205
|
-
icon:
|
|
2186
|
+
label: y(i).title.alignLeft,
|
|
2187
|
+
icon: y(bt)
|
|
2206
2188
|
},
|
|
2207
2189
|
{
|
|
2208
2190
|
value: "center",
|
|
2209
|
-
label:
|
|
2210
|
-
icon:
|
|
2191
|
+
label: y(i).title.alignCenter,
|
|
2192
|
+
icon: y(gt)
|
|
2211
2193
|
},
|
|
2212
2194
|
{
|
|
2213
2195
|
value: "right",
|
|
2214
|
-
label:
|
|
2215
|
-
icon:
|
|
2196
|
+
label: y(i).title.alignRight,
|
|
2197
|
+
icon: y(yt)
|
|
2216
2198
|
}
|
|
2217
2199
|
],
|
|
2218
2200
|
"model-value": e.block.align,
|
|
2219
|
-
"onUpdate:modelValue": n[3] ||= (e) =>
|
|
2201
|
+
"onUpdate:modelValue": n[3] ||= (e) => a("align", e)
|
|
2220
2202
|
}, null, 8, ["options", "model-value"])])
|
|
2221
2203
|
], 64));
|
|
2222
2204
|
}
|
|
@@ -2225,18 +2207,18 @@ var Ea = { class: "tpl:mb-3.5" }, Da = ["value"], Oa = ["value"], ka = /* @__PUR
|
|
|
2225
2207
|
props: { block: {} },
|
|
2226
2208
|
emits: ["update"],
|
|
2227
2209
|
setup(e, { emit: t }) {
|
|
2228
|
-
let n = t, { t: r } =
|
|
2229
|
-
return (t, i) => (
|
|
2230
|
-
|
|
2231
|
-
|
|
2210
|
+
let n = t, { t: r } = z();
|
|
2211
|
+
return (t, i) => (o(), _("div", Ya, [
|
|
2212
|
+
T("label", { class: w(y(W)) }, h(y(r).spacer.height), 3),
|
|
2213
|
+
T("div", Xa, [T("input", {
|
|
2232
2214
|
type: "number",
|
|
2233
|
-
class:
|
|
2215
|
+
class: w(y(K)),
|
|
2234
2216
|
value: e.block.height,
|
|
2235
2217
|
min: "10",
|
|
2236
2218
|
max: "100",
|
|
2237
2219
|
onInput: i[0] ||= (e) => n("update", { height: Number(e.target.value) })
|
|
2238
|
-
}, null, 42, Za),
|
|
2239
|
-
|
|
2220
|
+
}, null, 42, Za), T("span", { class: w(y(G)) }, "px", 2)]),
|
|
2221
|
+
T("input", {
|
|
2240
2222
|
type: "range",
|
|
2241
2223
|
class: "tpl:mt-2 tpl:w-full tpl:accent-[var(--tpl-primary)]",
|
|
2242
2224
|
value: e.block.height,
|
|
@@ -2257,15 +2239,15 @@ var Ea = { class: "tpl:mb-3.5" }, Da = ["value"], Oa = ["value"], ka = /* @__PUR
|
|
|
2257
2239
|
},
|
|
2258
2240
|
emits: ["update"],
|
|
2259
2241
|
setup(e, { emit: t }) {
|
|
2260
|
-
let n = e, r = t, { t: i } =
|
|
2261
|
-
function
|
|
2242
|
+
let n = e, r = t, { t: i } = z(), a = g(() => n.block.rows.length > 0 ? n.block.rows[0].cells.length : 0);
|
|
2243
|
+
function s(e, t) {
|
|
2262
2244
|
r("update", { [e]: t });
|
|
2263
2245
|
}
|
|
2264
2246
|
function l() {
|
|
2265
2247
|
let e = n.block.rows.length > 0 ? n.block.rows[0].cells.length : 3, t = {
|
|
2266
|
-
id:
|
|
2248
|
+
id: ye(),
|
|
2267
2249
|
cells: Array.from({ length: e }, () => ({
|
|
2268
|
-
id:
|
|
2250
|
+
id: ye(),
|
|
2269
2251
|
content: ""
|
|
2270
2252
|
}))
|
|
2271
2253
|
};
|
|
@@ -2278,7 +2260,7 @@ var Ea = { class: "tpl:mb-3.5" }, Da = ["value"], Oa = ["value"], ka = /* @__PUR
|
|
|
2278
2260
|
r("update", { rows: n.block.rows.map((e) => ({
|
|
2279
2261
|
...e,
|
|
2280
2262
|
cells: [...e.cells, {
|
|
2281
|
-
id:
|
|
2263
|
+
id: ye(),
|
|
2282
2264
|
content: ""
|
|
2283
2265
|
}]
|
|
2284
2266
|
})) });
|
|
@@ -2289,113 +2271,113 @@ var Ea = { class: "tpl:mb-3.5" }, Da = ["value"], Oa = ["value"], ka = /* @__PUR
|
|
|
2289
2271
|
cells: t.cells.filter((t, n) => n !== e)
|
|
2290
2272
|
})) });
|
|
2291
2273
|
}
|
|
2292
|
-
return (t, n) => (
|
|
2293
|
-
|
|
2294
|
-
|
|
2274
|
+
return (t, n) => (o(), _(O, null, [
|
|
2275
|
+
T("div", eo, [T("label", { class: w(y(W)) }, h(y(i).table.dimensions), 3), T("div", to, [T("div", no, [T("span", ro, h(y(i).table.rows), 1), T("div", io, [
|
|
2276
|
+
T("button", {
|
|
2295
2277
|
class: "tpl:flex tpl:items-center tpl:justify-center tpl:px-1.5 tpl:py-1 tpl:text-[var(--tpl-text-muted)] tpl:transition-colors tpl:duration-150 tpl:hover:text-[var(--tpl-primary)] tpl:disabled:opacity-30",
|
|
2296
2278
|
disabled: e.block.rows.length <= 1,
|
|
2297
2279
|
onClick: n[0] ||= (t) => u(e.block.rows[e.block.rows.length - 1].id)
|
|
2298
|
-
}, [j(
|
|
2280
|
+
}, [j(y(dt), {
|
|
2299
2281
|
size: 12,
|
|
2300
2282
|
"stroke-width": 2
|
|
2301
2283
|
})], 8, ao),
|
|
2302
|
-
|
|
2303
|
-
|
|
2284
|
+
T("span", oo, h(e.block.rows.length), 1),
|
|
2285
|
+
T("button", {
|
|
2304
2286
|
class: "tpl:flex tpl:items-center tpl:justify-center tpl:px-1.5 tpl:py-1 tpl:text-[var(--tpl-text-muted)] tpl:transition-colors tpl:duration-150 tpl:hover:text-[var(--tpl-primary)]",
|
|
2305
2287
|
onClick: l
|
|
2306
|
-
}, [j(
|
|
2288
|
+
}, [j(y(H), {
|
|
2307
2289
|
size: 12,
|
|
2308
2290
|
"stroke-width": 2
|
|
2309
2291
|
})])
|
|
2310
|
-
])]),
|
|
2311
|
-
|
|
2292
|
+
])]), T("div", so, [T("span", co, h(y(i).table.columns), 1), T("div", lo, [
|
|
2293
|
+
T("button", {
|
|
2312
2294
|
class: "tpl:flex tpl:items-center tpl:justify-center tpl:px-1.5 tpl:py-1 tpl:text-[var(--tpl-text-muted)] tpl:transition-colors tpl:duration-150 tpl:hover:text-[var(--tpl-primary)] tpl:disabled:opacity-30",
|
|
2313
|
-
disabled:
|
|
2314
|
-
onClick: n[1] ||= (e) => f(
|
|
2315
|
-
}, [j(
|
|
2295
|
+
disabled: a.value <= 1,
|
|
2296
|
+
onClick: n[1] ||= (e) => f(a.value - 1)
|
|
2297
|
+
}, [j(y(dt), {
|
|
2316
2298
|
size: 12,
|
|
2317
2299
|
"stroke-width": 2
|
|
2318
2300
|
})], 8, uo),
|
|
2319
|
-
|
|
2320
|
-
|
|
2301
|
+
T("span", fo, h(a.value), 1),
|
|
2302
|
+
T("button", {
|
|
2321
2303
|
class: "tpl:flex tpl:items-center tpl:justify-center tpl:px-1.5 tpl:py-1 tpl:text-[var(--tpl-text-muted)] tpl:transition-colors tpl:duration-150 tpl:hover:text-[var(--tpl-primary)]",
|
|
2322
2304
|
onClick: d
|
|
2323
|
-
}, [j(
|
|
2305
|
+
}, [j(y(H), {
|
|
2324
2306
|
size: 12,
|
|
2325
2307
|
"stroke-width": 2
|
|
2326
2308
|
})])
|
|
2327
2309
|
])])])]),
|
|
2328
|
-
|
|
2310
|
+
T("div", po, [T("label", mo, [T("input", {
|
|
2329
2311
|
type: "checkbox",
|
|
2330
2312
|
checked: e.block.hasHeaderRow,
|
|
2331
2313
|
class: "tpl:accent-[var(--tpl-primary)]",
|
|
2332
|
-
onChange: n[2] ||= (e) =>
|
|
2333
|
-
}, null, 40, ho), k(" " +
|
|
2334
|
-
e.block.hasHeaderRow ? (
|
|
2335
|
-
"model-value": e.block.headerBackgroundColor ||
|
|
2336
|
-
placeholder:
|
|
2337
|
-
"onUpdate:modelValue": n[3] ||= (e) =>
|
|
2338
|
-
}, null, 8, ["model-value", "placeholder"])])) :
|
|
2339
|
-
|
|
2314
|
+
onChange: n[2] ||= (e) => s("hasHeaderRow", e.target.checked)
|
|
2315
|
+
}, null, 40, ho), k(" " + h(y(i).table.hasHeaderRow), 1)])]),
|
|
2316
|
+
e.block.hasHeaderRow ? (o(), _("div", go, [T("label", { class: w(y(W)) }, h(y(i).table.headerBackgroundColor), 3), j(q, {
|
|
2317
|
+
"model-value": e.block.headerBackgroundColor || y("#f2f2f2"),
|
|
2318
|
+
placeholder: y(i).table.noHeaderBg,
|
|
2319
|
+
"onUpdate:modelValue": n[3] ||= (e) => s("headerBackgroundColor", e || null)
|
|
2320
|
+
}, null, 8, ["model-value", "placeholder"])])) : v("", !0),
|
|
2321
|
+
T("div", _o, [T("label", { class: w(y(W)) }, h(y(i).table.borderColor), 3), j(q, {
|
|
2340
2322
|
"model-value": e.block.borderColor,
|
|
2341
|
-
"onUpdate:modelValue": n[4] ||= (e) =>
|
|
2323
|
+
"onUpdate:modelValue": n[4] ||= (e) => s("borderColor", e)
|
|
2342
2324
|
}, null, 8, ["model-value"])]),
|
|
2343
|
-
|
|
2325
|
+
T("div", vo, [T("label", { class: w(y(W)) }, h(y(i).table.borderWidth), 3), T("div", yo, [T("input", {
|
|
2344
2326
|
type: "number",
|
|
2345
|
-
class:
|
|
2327
|
+
class: w(y(K)),
|
|
2346
2328
|
value: e.block.borderWidth,
|
|
2347
2329
|
min: "0",
|
|
2348
2330
|
max: "10",
|
|
2349
|
-
onInput: n[5] ||= (e) =>
|
|
2350
|
-
}, null, 42, bo),
|
|
2351
|
-
|
|
2331
|
+
onInput: n[5] ||= (e) => s("borderWidth", Number(e.target.value))
|
|
2332
|
+
}, null, 42, bo), T("span", { class: w(y(G)) }, "px", 2)])]),
|
|
2333
|
+
T("div", xo, [T("label", { class: w(y(W)) }, h(y(i).table.cellPadding), 3), T("div", So, [T("input", {
|
|
2352
2334
|
type: "number",
|
|
2353
|
-
class:
|
|
2335
|
+
class: w(y(K)),
|
|
2354
2336
|
value: e.block.cellPadding,
|
|
2355
2337
|
min: "0",
|
|
2356
2338
|
max: "30",
|
|
2357
|
-
onInput: n[6] ||= (e) =>
|
|
2358
|
-
}, null, 42, Co),
|
|
2359
|
-
|
|
2360
|
-
class:
|
|
2339
|
+
onInput: n[6] ||= (e) => s("cellPadding", Number(e.target.value))
|
|
2340
|
+
}, null, 42, Co), T("span", { class: w(y(G)) }, "px", 2)])]),
|
|
2341
|
+
T("div", wo, [T("label", { class: w(y(W)) }, h(y(i).table.fontFamily), 3), T("select", {
|
|
2342
|
+
class: w(y(U)),
|
|
2361
2343
|
value: e.block.fontFamily || "",
|
|
2362
|
-
onChange: n[7] ||= (e) =>
|
|
2363
|
-
}, [
|
|
2344
|
+
onChange: n[7] ||= (e) => s("fontFamily", e.target.value || void 0)
|
|
2345
|
+
}, [T("option", Eo, h(y(i).title.inheritFont), 1), (o(!0), _(O, null, c(e.fontFamilies, (e) => (o(), _("option", {
|
|
2364
2346
|
key: e.value,
|
|
2365
2347
|
value: e.value
|
|
2366
|
-
},
|
|
2367
|
-
|
|
2348
|
+
}, h(e.label), 9, Do))), 128))], 42, To)]),
|
|
2349
|
+
T("div", Oo, [T("label", { class: w(y(W)) }, h(y(i).table.fontSize), 3), T("div", ko, [T("input", {
|
|
2368
2350
|
type: "number",
|
|
2369
|
-
class:
|
|
2351
|
+
class: w(y(K)),
|
|
2370
2352
|
value: e.block.fontSize,
|
|
2371
2353
|
min: "10",
|
|
2372
2354
|
max: "32",
|
|
2373
|
-
onInput: n[8] ||= (e) =>
|
|
2374
|
-
}, null, 42, Ao),
|
|
2375
|
-
|
|
2355
|
+
onInput: n[8] ||= (e) => s("fontSize", Number(e.target.value))
|
|
2356
|
+
}, null, 42, Ao), T("span", { class: w(y(G)) }, "px", 2)])]),
|
|
2357
|
+
T("div", jo, [T("label", { class: w(y(W)) }, h(y(i).table.color), 3), j(q, {
|
|
2376
2358
|
"model-value": e.block.color,
|
|
2377
|
-
"onUpdate:modelValue": n[9] ||= (e) =>
|
|
2359
|
+
"onUpdate:modelValue": n[9] ||= (e) => s("color", e)
|
|
2378
2360
|
}, null, 8, ["model-value"])]),
|
|
2379
|
-
|
|
2361
|
+
T("div", Mo, [T("label", { class: w(y(W)) }, h(y(i).table.textAlign), 3), j(Y, {
|
|
2380
2362
|
options: [
|
|
2381
2363
|
{
|
|
2382
2364
|
value: "left",
|
|
2383
|
-
label:
|
|
2384
|
-
icon:
|
|
2365
|
+
label: y(i).title.alignLeft,
|
|
2366
|
+
icon: y(bt)
|
|
2385
2367
|
},
|
|
2386
2368
|
{
|
|
2387
2369
|
value: "center",
|
|
2388
|
-
label:
|
|
2389
|
-
icon:
|
|
2370
|
+
label: y(i).title.alignCenter,
|
|
2371
|
+
icon: y(gt)
|
|
2390
2372
|
},
|
|
2391
2373
|
{
|
|
2392
2374
|
value: "right",
|
|
2393
|
-
label:
|
|
2394
|
-
icon:
|
|
2375
|
+
label: y(i).title.alignRight,
|
|
2376
|
+
icon: y(yt)
|
|
2395
2377
|
}
|
|
2396
2378
|
],
|
|
2397
2379
|
"model-value": e.block.textAlign,
|
|
2398
|
-
"onUpdate:modelValue": n[10] ||= (e) =>
|
|
2380
|
+
"onUpdate:modelValue": n[10] ||= (e) => s("textAlign", e)
|
|
2399
2381
|
}, null, 8, ["options", "model-value"])])
|
|
2400
2382
|
], 64));
|
|
2401
2383
|
}
|
|
@@ -2407,49 +2389,49 @@ var Ea = { class: "tpl:mb-3.5" }, Da = ["value"], Oa = ["value"], ka = /* @__PUR
|
|
|
2407
2389
|
},
|
|
2408
2390
|
emits: ["update"],
|
|
2409
2391
|
setup(e, { emit: t }) {
|
|
2410
|
-
let n = t, { t: r } =
|
|
2392
|
+
let n = t, { t: r } = z();
|
|
2411
2393
|
function i(e, t) {
|
|
2412
2394
|
n("update", { [e]: t });
|
|
2413
2395
|
}
|
|
2414
|
-
return (t, n) => (
|
|
2415
|
-
|
|
2416
|
-
class:
|
|
2396
|
+
return (t, n) => (o(), _(O, null, [
|
|
2397
|
+
T("div", Po, [T("label", { class: w(y(W)) }, h(y(r).title.level), 3), T("select", {
|
|
2398
|
+
class: w(y(U)),
|
|
2417
2399
|
value: e.block.level,
|
|
2418
2400
|
onChange: n[0] ||= (e) => i("level", Number(e.target.value))
|
|
2419
2401
|
}, [
|
|
2420
|
-
|
|
2421
|
-
|
|
2422
|
-
|
|
2423
|
-
|
|
2402
|
+
T("option", Io, h(y(r).title.heading1), 1),
|
|
2403
|
+
T("option", Lo, h(y(r).title.heading2), 1),
|
|
2404
|
+
T("option", Ro, h(y(r).title.heading3), 1),
|
|
2405
|
+
T("option", zo, h(y(r).title.heading4), 1)
|
|
2424
2406
|
], 42, Fo)]),
|
|
2425
|
-
|
|
2426
|
-
class:
|
|
2407
|
+
T("div", Bo, [T("label", { class: w(y(W)) }, h(y(r).title.fontFamily), 3), T("select", {
|
|
2408
|
+
class: w(y(U)),
|
|
2427
2409
|
value: e.block.fontFamily || "",
|
|
2428
2410
|
onChange: n[1] ||= (e) => i("fontFamily", e.target.value || void 0)
|
|
2429
|
-
}, [
|
|
2411
|
+
}, [T("option", Ho, h(y(r).title.inheritFont), 1), (o(!0), _(O, null, c(e.fontFamilies, (e) => (o(), _("option", {
|
|
2430
2412
|
key: e.value,
|
|
2431
2413
|
value: e.value
|
|
2432
|
-
},
|
|
2433
|
-
|
|
2414
|
+
}, h(e.label), 9, Uo))), 128))], 42, Vo)]),
|
|
2415
|
+
T("div", Wo, [T("label", { class: w(y(W)) }, h(y(r).title.color), 3), j(q, {
|
|
2434
2416
|
"model-value": e.block.color,
|
|
2435
2417
|
"onUpdate:modelValue": n[2] ||= (e) => i("color", e)
|
|
2436
2418
|
}, null, 8, ["model-value"])]),
|
|
2437
|
-
|
|
2419
|
+
T("div", Go, [T("label", { class: w(y(W)) }, h(y(r).title.align), 3), j(Y, {
|
|
2438
2420
|
options: [
|
|
2439
2421
|
{
|
|
2440
2422
|
value: "left",
|
|
2441
|
-
label:
|
|
2442
|
-
icon:
|
|
2423
|
+
label: y(r).title.alignLeft,
|
|
2424
|
+
icon: y(bt)
|
|
2443
2425
|
},
|
|
2444
2426
|
{
|
|
2445
2427
|
value: "center",
|
|
2446
|
-
label:
|
|
2447
|
-
icon:
|
|
2428
|
+
label: y(r).title.alignCenter,
|
|
2429
|
+
icon: y(gt)
|
|
2448
2430
|
},
|
|
2449
2431
|
{
|
|
2450
2432
|
value: "right",
|
|
2451
|
-
label:
|
|
2452
|
-
icon:
|
|
2433
|
+
label: y(r).title.alignRight,
|
|
2434
|
+
icon: y(yt)
|
|
2453
2435
|
}
|
|
2454
2436
|
],
|
|
2455
2437
|
"model-value": e.block.textAlign,
|
|
@@ -2472,46 +2454,46 @@ var Ea = { class: "tpl:mb-3.5" }, Da = ["value"], Oa = ["value"], ka = /* @__PUR
|
|
|
2472
2454
|
props: { block: {} },
|
|
2473
2455
|
emits: ["update"],
|
|
2474
2456
|
setup(e, { emit: t }) {
|
|
2475
|
-
let n = e, r = t, { t: i } =
|
|
2457
|
+
let n = e, r = t, { t: i } = z(), a = l(ge, null), s = l(Oe, ke.liquid), c = B(), u = g(() => !!a), d = g(() => Ye(n.block.url, s)), p = f(!1), { start: m } = Be(() => {
|
|
2476
2458
|
p.value = !1;
|
|
2477
2459
|
}, 1e3, { immediate: !1 });
|
|
2478
2460
|
function b(e, t) {
|
|
2479
2461
|
r("update", { [e]: t });
|
|
2480
2462
|
}
|
|
2481
2463
|
async function x() {
|
|
2482
|
-
let e = await
|
|
2483
|
-
|
|
2464
|
+
let e = await a?.({ accept: ["images"] });
|
|
2465
|
+
c.alive && e && (b("thumbnailUrl", e.url), p.value = !0, m());
|
|
2484
2466
|
}
|
|
2485
|
-
return (t, n) => (
|
|
2486
|
-
|
|
2487
|
-
|
|
2467
|
+
return (t, n) => (o(), _(O, null, [
|
|
2468
|
+
T("div", qo, [
|
|
2469
|
+
T("label", { class: w(y(W)) }, h(y(i).video.videoUrl), 3),
|
|
2488
2470
|
j(X, {
|
|
2489
2471
|
"model-value": e.block.url,
|
|
2490
2472
|
type: "url",
|
|
2491
|
-
placeholder:
|
|
2473
|
+
placeholder: y(i).video.videoUrlPlaceholder,
|
|
2492
2474
|
"onUpdate:modelValue": n[0] ||= (e) => b("url", e)
|
|
2493
2475
|
}, null, 8, ["model-value", "placeholder"]),
|
|
2494
|
-
e.block.url ? (
|
|
2476
|
+
e.block.url ? (o(), _("label", Jo, [T("input", {
|
|
2495
2477
|
type: "checkbox",
|
|
2496
2478
|
class: "tpl:size-3.5 tpl:cursor-pointer tpl:accent-[var(--tpl-primary)]",
|
|
2497
2479
|
checked: e.block.openInNewTab ?? !1,
|
|
2498
2480
|
onChange: n[1] ||= (e) => b("openInNewTab", e.target.checked)
|
|
2499
|
-
}, null, 40, Yo), k(" " +
|
|
2481
|
+
}, null, 40, Yo), k(" " + h(y(i).video.openInNewTab), 1)])) : v("", !0)
|
|
2500
2482
|
]),
|
|
2501
|
-
|
|
2483
|
+
d.value ? (o(), _("div", Xo, [T("label", { class: w(y(W)) }, [k(h(y(i).video.placeholderUrl) + " ", 1), T("span", Zo, h(y(i).video.optional), 1)], 2), T("input", {
|
|
2502
2484
|
type: "url",
|
|
2503
|
-
class:
|
|
2485
|
+
class: w(y(U)),
|
|
2504
2486
|
value: e.block.placeholderUrl || "",
|
|
2505
|
-
placeholder:
|
|
2506
|
-
title:
|
|
2487
|
+
placeholder: y(i).video.placeholderUrlPlaceholder,
|
|
2488
|
+
title: y(i).video.placeholderUrlTooltip,
|
|
2507
2489
|
onInput: n[2] ||= (e) => b("placeholderUrl", e.target.value)
|
|
2508
|
-
}, null, 42, Qo)])) :
|
|
2509
|
-
|
|
2510
|
-
|
|
2490
|
+
}, null, 42, Qo)])) : v("", !0),
|
|
2491
|
+
T("div", $o, [
|
|
2492
|
+
T("label", { class: w(y(W)) }, [k(h(y(i).video.customThumbnail) + " ", 1), T("span", es, h(y(i).video.optional), 1)], 2),
|
|
2511
2493
|
j(X, {
|
|
2512
2494
|
"model-value": e.block.thumbnailUrl,
|
|
2513
2495
|
type: "url",
|
|
2514
|
-
placeholder:
|
|
2496
|
+
placeholder: y(i).video.thumbnailPlaceholder,
|
|
2515
2497
|
pulse: p.value,
|
|
2516
2498
|
"onUpdate:modelValue": n[3] ||= (e) => b("thumbnailUrl", e)
|
|
2517
2499
|
}, null, 8, [
|
|
@@ -2519,7 +2501,7 @@ var Ea = { class: "tpl:mb-3.5" }, Da = ["value"], Oa = ["value"], ka = /* @__PUR
|
|
|
2519
2501
|
"placeholder",
|
|
2520
2502
|
"pulse"
|
|
2521
2503
|
]),
|
|
2522
|
-
u.value ? (
|
|
2504
|
+
u.value ? (o(), _("button", {
|
|
2523
2505
|
key: 0,
|
|
2524
2506
|
class: "tpl:mt-2 tpl:flex tpl:w-full tpl:items-center tpl:justify-center tpl:gap-1.5 tpl:rounded-md tpl:border tpl:px-3 tpl:py-2 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150",
|
|
2525
2507
|
style: {
|
|
@@ -2528,40 +2510,40 @@ var Ea = { class: "tpl:mb-3.5" }, Da = ["value"], Oa = ["value"], ka = /* @__PUR
|
|
|
2528
2510
|
"background-color": "var(--tpl-bg)"
|
|
2529
2511
|
},
|
|
2530
2512
|
onClick: x
|
|
2531
|
-
}, [j(
|
|
2513
|
+
}, [j(y(je), {
|
|
2532
2514
|
size: 14,
|
|
2533
2515
|
"stroke-width": 1.5
|
|
2534
|
-
}), k(" " +
|
|
2516
|
+
}), k(" " + h(y(i).image.browseMedia), 1)])) : v("", !0)
|
|
2535
2517
|
]),
|
|
2536
|
-
|
|
2518
|
+
T("div", ts, [T("label", { class: w(y(W)) }, h(y(i).video.altText), 3), j(X, {
|
|
2537
2519
|
"model-value": e.block.alt,
|
|
2538
2520
|
type: "text",
|
|
2539
|
-
placeholder:
|
|
2521
|
+
placeholder: y(i).video.altTextPlaceholder,
|
|
2540
2522
|
"onUpdate:modelValue": n[4] ||= (e) => b("alt", e)
|
|
2541
2523
|
}, null, 8, ["model-value", "placeholder"])]),
|
|
2542
|
-
|
|
2543
|
-
class:
|
|
2524
|
+
T("div", ns, [T("label", { class: w(y(W)) }, h(y(i).video.width), 3), T("select", {
|
|
2525
|
+
class: w(y(U)),
|
|
2544
2526
|
value: e.block.width,
|
|
2545
2527
|
onChange: n[5] ||= (e) => b("width", e.target.value === "full" ? "full" : Number(e.target.value))
|
|
2546
2528
|
}, [
|
|
2547
|
-
|
|
2548
|
-
n[7] ||=
|
|
2549
|
-
n[8] ||=
|
|
2550
|
-
n[9] ||=
|
|
2529
|
+
T("option", is, h(y(i).video.fullWidth), 1),
|
|
2530
|
+
n[7] ||= T("option", { value: "300" }, "300px", -1),
|
|
2531
|
+
n[8] ||= T("option", { value: "400" }, "400px", -1),
|
|
2532
|
+
n[9] ||= T("option", { value: "500" }, "500px", -1)
|
|
2551
2533
|
], 42, rs)]),
|
|
2552
|
-
|
|
2534
|
+
T("div", as, [T("label", { class: w(y(W)) }, h(y(i).title.align), 3), j(Y, {
|
|
2553
2535
|
options: [
|
|
2554
2536
|
{
|
|
2555
2537
|
value: "left",
|
|
2556
|
-
label:
|
|
2538
|
+
label: y(i).title.alignLeft
|
|
2557
2539
|
},
|
|
2558
2540
|
{
|
|
2559
2541
|
value: "center",
|
|
2560
|
-
label:
|
|
2542
|
+
label: y(i).title.alignCenter
|
|
2561
2543
|
},
|
|
2562
2544
|
{
|
|
2563
2545
|
value: "right",
|
|
2564
|
-
label:
|
|
2546
|
+
label: y(i).title.alignRight
|
|
2565
2547
|
}
|
|
2566
2548
|
],
|
|
2567
2549
|
"model-value": e.block.align,
|
|
@@ -2569,7 +2551,7 @@ var Ea = { class: "tpl:mb-3.5" }, Da = ["value"], Oa = ["value"], ka = /* @__PUR
|
|
|
2569
2551
|
}, null, 8, ["options", "model-value"])])
|
|
2570
2552
|
], 64));
|
|
2571
2553
|
}
|
|
2572
|
-
}), ss = ["aria-label"], cs = { class: "tpl:flex tpl:items-center tpl:justify-between tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-3.5" }, ls = { class: "tpl:flex tpl:items-center tpl:gap-2 tpl:text-[var(--tpl-primary)]" }, us = { class: "tpl:m-0 tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]" }, ds = { class: "tpl:flex tpl:gap-1" }, fs = ["title"], ps = ["title"], ms = { class: "tpl:flex-1 tpl:overflow-y-auto tpl:p-4" }, hs = /* @__PURE__ */
|
|
2554
|
+
}), ss = ["aria-label"], cs = { class: "tpl:flex tpl:items-center tpl:justify-between tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-3.5" }, ls = { class: "tpl:flex tpl:items-center tpl:gap-2 tpl:text-[var(--tpl-primary)]" }, us = { class: "tpl:m-0 tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]" }, ds = { class: "tpl:flex tpl:gap-1" }, fs = ["title"], ps = ["title"], ms = { class: "tpl:flex-1 tpl:overflow-y-auto tpl:p-4" }, hs = /* @__PURE__ */ Ke(/* @__PURE__ */ A({
|
|
2573
2555
|
__name: "Toolbar",
|
|
2574
2556
|
props: { block: {} },
|
|
2575
2557
|
emits: [
|
|
@@ -2578,96 +2560,96 @@ var Ea = { class: "tpl:mb-3.5" }, Da = ["value"], Oa = ["value"], ka = /* @__PUR
|
|
|
2578
2560
|
"duplicate"
|
|
2579
2561
|
],
|
|
2580
2562
|
setup(e, { emit: t }) {
|
|
2581
|
-
let n =
|
|
2582
|
-
if (
|
|
2583
|
-
}),
|
|
2563
|
+
let n = p(() => import("./CountdownToolbar-BLtECDNb.js")), r = e, i = t, { t: s } = z(), c = Ie(De, "Toolbar"), u = l(ne, []), d = g(() => r.block.type), f = g(() => I(r.block)), m = g(() => {
|
|
2564
|
+
if (f.value) return u.find((e) => e.type === r.block.customType);
|
|
2565
|
+
}), b = g(() => f.value ? m.value?.name ?? r.block.customType : he(d.value, s)), S = c.fonts;
|
|
2584
2566
|
function C(e) {
|
|
2585
|
-
|
|
2567
|
+
i("update", e);
|
|
2586
2568
|
}
|
|
2587
|
-
return (t, r) => (
|
|
2588
|
-
"aria-label":
|
|
2569
|
+
return (t, r) => (o(), _("aside", {
|
|
2570
|
+
"aria-label": y(s).landmarks.blockToolbar,
|
|
2589
2571
|
class: "tpl:flex tpl:w-full tpl:flex-1 tpl:flex-col tpl:bg-[var(--tpl-bg-elevated)]"
|
|
2590
|
-
}, [
|
|
2572
|
+
}, [T("div", cs, [T("div", ls, [y(Dt)[d.value] ? (o(), x(a(y(Dt)[d.value]), {
|
|
2591
2573
|
key: 0,
|
|
2592
2574
|
size: 16,
|
|
2593
2575
|
"stroke-width": 1.5
|
|
2594
|
-
})) :
|
|
2576
|
+
})) : f.value ? (o(), x(y(be), {
|
|
2595
2577
|
key: 1,
|
|
2596
2578
|
size: 16,
|
|
2597
2579
|
"stroke-width": 1.5
|
|
2598
|
-
})) :
|
|
2580
|
+
})) : v("", !0), T("h3", us, h(b.value), 1)]), T("div", ds, [T("button", {
|
|
2599
2581
|
class: "tpl:flex tpl:size-7 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-md tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-hover)] tpl:text-[var(--tpl-text-muted)] tpl:transition-all tpl:duration-150 tpl:hover:bg-[var(--tpl-bg-active)] tpl:hover:text-[var(--tpl-text)]",
|
|
2600
|
-
title:
|
|
2601
|
-
onClick: r[0] ||= (e) =>
|
|
2602
|
-
}, [j(
|
|
2582
|
+
title: y(s).toolbar.duplicate,
|
|
2583
|
+
onClick: r[0] ||= (e) => i("duplicate")
|
|
2584
|
+
}, [j(y(Ze), {
|
|
2603
2585
|
size: 14,
|
|
2604
2586
|
"stroke-width": 2
|
|
2605
|
-
})], 8, fs),
|
|
2587
|
+
})], 8, fs), T("button", {
|
|
2606
2588
|
class: "tpl:flex tpl:size-7 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-md tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-hover)] tpl:text-[var(--tpl-text-muted)] tpl:transition-all tpl:duration-150 tpl:hover:border-[var(--tpl-danger)] tpl:hover:bg-[var(--tpl-danger-light)] tpl:hover:text-[var(--tpl-danger)]",
|
|
2607
|
-
title:
|
|
2608
|
-
onClick: r[1] ||= (e) =>
|
|
2609
|
-
}, [j(
|
|
2589
|
+
title: y(s).toolbar.delete,
|
|
2590
|
+
onClick: r[1] ||= (e) => i("delete")
|
|
2591
|
+
}, [j(y(Me), {
|
|
2610
2592
|
size: 14,
|
|
2611
2593
|
"stroke-width": 2
|
|
2612
|
-
})], 8, ps)])]),
|
|
2594
|
+
})], 8, ps)])]), T("div", ms, [f.value ? (o(), x(Bi, {
|
|
2613
2595
|
key: 0,
|
|
2614
2596
|
block: e.block,
|
|
2615
|
-
onUpdateFieldValues: r[2] ||= (e) =>
|
|
2616
|
-
onUpdateDataSourceFetched: r[3] ||= (e) =>
|
|
2617
|
-
}, null, 8, ["block"])) : d.value === "section" ? (
|
|
2597
|
+
onUpdateFieldValues: r[2] ||= (e) => i("update", { fieldValues: e }),
|
|
2598
|
+
onUpdateDataSourceFetched: r[3] ||= (e) => i("update", { dataSourceFetched: e })
|
|
2599
|
+
}, null, 8, ["block"])) : d.value === "section" ? (o(), x(ka, {
|
|
2618
2600
|
key: 1,
|
|
2619
2601
|
block: e.block,
|
|
2620
2602
|
onUpdate: C
|
|
2621
|
-
}, null, 8, ["block"])) : d.value === "title" ? (
|
|
2603
|
+
}, null, 8, ["block"])) : d.value === "title" ? (o(), x(Ko, {
|
|
2622
2604
|
key: 2,
|
|
2623
2605
|
block: e.block,
|
|
2624
|
-
"font-families":
|
|
2606
|
+
"font-families": y(S),
|
|
2625
2607
|
onUpdate: C
|
|
2626
|
-
}, null, 8, ["block", "font-families"])) : d.value === "paragraph" ? (
|
|
2608
|
+
}, null, 8, ["block", "font-families"])) : d.value === "paragraph" ? (o(), _(O, { key: 3 }, [], 64)) : d.value === "image" ? (o(), x(da, {
|
|
2627
2609
|
key: 4,
|
|
2628
2610
|
block: e.block,
|
|
2629
2611
|
onUpdate: C
|
|
2630
|
-
}, null, 8, ["block"])) : d.value === "video" ? (
|
|
2612
|
+
}, null, 8, ["block"])) : d.value === "video" ? (o(), x(os, {
|
|
2631
2613
|
key: 5,
|
|
2632
2614
|
block: e.block,
|
|
2633
2615
|
onUpdate: C
|
|
2634
|
-
}, null, 8, ["block"])) : d.value === "button" ? (
|
|
2616
|
+
}, null, 8, ["block"])) : d.value === "button" ? (o(), x(pr, {
|
|
2635
2617
|
key: 6,
|
|
2636
2618
|
block: e.block,
|
|
2637
|
-
"font-families":
|
|
2619
|
+
"font-families": y(S),
|
|
2638
2620
|
onUpdate: C
|
|
2639
|
-
}, null, 8, ["block", "font-families"])) : d.value === "divider" ? (
|
|
2621
|
+
}, null, 8, ["block", "font-families"])) : d.value === "divider" ? (o(), x(Ki, {
|
|
2640
2622
|
key: 7,
|
|
2641
2623
|
block: e.block,
|
|
2642
2624
|
onUpdate: C
|
|
2643
|
-
}, null, 8, ["block"])) : d.value === "social" ? (
|
|
2625
|
+
}, null, 8, ["block"])) : d.value === "social" ? (o(), x(Ja, {
|
|
2644
2626
|
key: 8,
|
|
2645
2627
|
block: e.block,
|
|
2646
2628
|
onUpdate: C
|
|
2647
|
-
}, null, 8, ["block"])) : d.value === "menu" ? (
|
|
2629
|
+
}, null, 8, ["block"])) : d.value === "menu" ? (o(), x(Ca, {
|
|
2648
2630
|
key: 9,
|
|
2649
2631
|
block: e.block,
|
|
2650
|
-
"font-families":
|
|
2632
|
+
"font-families": y(S),
|
|
2651
2633
|
onUpdate: C
|
|
2652
|
-
}, null, 8, ["block", "font-families"])) : d.value === "table" ? (
|
|
2634
|
+
}, null, 8, ["block", "font-families"])) : d.value === "table" ? (o(), x(No, {
|
|
2653
2635
|
key: 10,
|
|
2654
2636
|
block: e.block,
|
|
2655
|
-
"font-families":
|
|
2637
|
+
"font-families": y(S),
|
|
2656
2638
|
onUpdate: C
|
|
2657
|
-
}, null, 8, ["block", "font-families"])) : d.value === "spacer" ? (
|
|
2639
|
+
}, null, 8, ["block", "font-families"])) : d.value === "spacer" ? (o(), x($a, {
|
|
2658
2640
|
key: 11,
|
|
2659
2641
|
block: e.block,
|
|
2660
2642
|
onUpdate: C
|
|
2661
|
-
}, null, 8, ["block"])) : d.value === "html" ? (
|
|
2643
|
+
}, null, 8, ["block"])) : d.value === "html" ? (o(), x(Xi, {
|
|
2662
2644
|
key: 12,
|
|
2663
2645
|
block: e.block,
|
|
2664
2646
|
onUpdate: C
|
|
2665
|
-
}, null, 8, ["block"])) : d.value === "countdown" ? (
|
|
2647
|
+
}, null, 8, ["block"])) : d.value === "countdown" ? (o(), x(y(n), {
|
|
2666
2648
|
key: 13,
|
|
2667
2649
|
block: e.block,
|
|
2668
|
-
"font-families":
|
|
2650
|
+
"font-families": y(S),
|
|
2669
2651
|
onUpdate: C
|
|
2670
|
-
}, null, 8, ["block", "font-families"])) :
|
|
2652
|
+
}, null, 8, ["block", "font-families"])) : v("", !0), j(ri, {
|
|
2671
2653
|
block: e.block,
|
|
2672
2654
|
"is-first-section": d.value === "paragraph",
|
|
2673
2655
|
onUpdate: C
|
|
@@ -2726,90 +2708,90 @@ var Ea = { class: "tpl:mb-3.5" }, Da = ["value"], Oa = ["value"], ka = /* @__PUR
|
|
|
2726
2708
|
"update-settings"
|
|
2727
2709
|
],
|
|
2728
2710
|
setup(e, { emit: t }) {
|
|
2729
|
-
let n =
|
|
2730
|
-
function
|
|
2711
|
+
let n = p(() => import("./IssuesPanel-BW2piyvs.js")), r = e, i = t, { t: a } = z(), s = f("content"), c = l(qe, null), u = g(() => c !== null), d = g(() => c?.issues.value.length ?? 0);
|
|
2712
|
+
function m(e) {
|
|
2731
2713
|
return s.value === e ? "tpl:flex-1 tpl:text-[var(--tpl-primary)]" : "tpl:shrink-0 tpl:text-[var(--tpl-text-muted)] hover:tpl:text-[var(--tpl-text)]";
|
|
2732
2714
|
}
|
|
2733
|
-
function
|
|
2715
|
+
function b(e) {
|
|
2734
2716
|
return s.value === e ? {
|
|
2735
2717
|
backgroundColor: "var(--tpl-bg)",
|
|
2736
2718
|
boxShadow: "var(--tpl-shadow-md)"
|
|
2737
2719
|
} : { backgroundColor: "transparent" };
|
|
2738
2720
|
}
|
|
2739
|
-
return
|
|
2721
|
+
return M(() => r.selectedBlock, (e) => {
|
|
2740
2722
|
e && (s.value = "content");
|
|
2741
|
-
}), (t, r) => (
|
|
2742
|
-
"aria-label":
|
|
2743
|
-
class:
|
|
2723
|
+
}), (t, r) => (o(), _("aside", {
|
|
2724
|
+
"aria-label": y(a).landmarks.rightSidebar,
|
|
2725
|
+
class: w(["tpl-right-sidebar tpl:absolute tpl:top-14 tpl:bottom-0 tpl:z-40 tpl:flex tpl:w-[320px] tpl:flex-col tpl:bg-[var(--tpl-bg-elevated)] tpl:transition-all tpl:duration-200 tpl:border-l tpl:border-[var(--tpl-border)]", e.shiftedLeft ? "tpl:right-[360px]" : "tpl:right-0"])
|
|
2744
2726
|
}, [
|
|
2745
|
-
|
|
2746
|
-
|
|
2727
|
+
T("div", _s, [
|
|
2728
|
+
T("button", {
|
|
2747
2729
|
id: "tpl-tab-content",
|
|
2748
2730
|
role: "tab",
|
|
2749
2731
|
"aria-selected": s.value === "content",
|
|
2750
2732
|
"aria-controls": "tpl-tabpanel-content",
|
|
2751
|
-
"aria-label":
|
|
2752
|
-
title:
|
|
2753
|
-
class:
|
|
2754
|
-
style:
|
|
2733
|
+
"aria-label": y(a).sidebar.content,
|
|
2734
|
+
title: y(a).sidebar.content,
|
|
2735
|
+
class: w(["tpl:flex tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:gap-1.5 tpl:rounded-[var(--tpl-radius-sm)] tpl:border-none tpl:px-3 tpl:py-2 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)]", m("content")]),
|
|
2736
|
+
style: D(b("content")),
|
|
2755
2737
|
onClick: r[0] ||= (e) => s.value = "content"
|
|
2756
|
-
}, [j(
|
|
2738
|
+
}, [j(y(ut), {
|
|
2757
2739
|
size: 14,
|
|
2758
2740
|
"stroke-width": 2
|
|
2759
|
-
}), s.value === "content" ? (
|
|
2760
|
-
|
|
2741
|
+
}), s.value === "content" ? (o(), _("span", ys, h(y(a).sidebar.content), 1)) : v("", !0)], 14, vs),
|
|
2742
|
+
T("button", {
|
|
2761
2743
|
id: "tpl-tab-settings",
|
|
2762
2744
|
role: "tab",
|
|
2763
2745
|
"aria-selected": s.value === "settings",
|
|
2764
2746
|
"aria-controls": "tpl-tabpanel-settings",
|
|
2765
|
-
"aria-label":
|
|
2766
|
-
title:
|
|
2767
|
-
class:
|
|
2768
|
-
style:
|
|
2747
|
+
"aria-label": y(a).sidebar.settings,
|
|
2748
|
+
title: y(a).sidebar.settings,
|
|
2749
|
+
class: w(["tpl:flex tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:gap-1.5 tpl:rounded-[var(--tpl-radius-sm)] tpl:border-none tpl:px-3 tpl:py-2 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)]", m("settings")]),
|
|
2750
|
+
style: D(b("settings")),
|
|
2769
2751
|
onClick: r[1] ||= (e) => s.value = "settings"
|
|
2770
|
-
}, [j(
|
|
2752
|
+
}, [j(y(St), {
|
|
2771
2753
|
size: 14,
|
|
2772
2754
|
"stroke-width": 1.5
|
|
2773
|
-
}), s.value === "settings" ? (
|
|
2774
|
-
u.value ? (
|
|
2755
|
+
}), s.value === "settings" ? (o(), _("span", xs, h(y(a).sidebar.settings), 1)) : v("", !0)], 14, bs),
|
|
2756
|
+
u.value ? (o(), _("button", {
|
|
2775
2757
|
key: 0,
|
|
2776
2758
|
id: "tpl-tab-issues",
|
|
2777
2759
|
role: "tab",
|
|
2778
2760
|
"aria-selected": s.value === "issues",
|
|
2779
2761
|
"aria-controls": "tpl-tabpanel-issues",
|
|
2780
|
-
"aria-label":
|
|
2781
|
-
title:
|
|
2782
|
-
class:
|
|
2783
|
-
style:
|
|
2762
|
+
"aria-label": y(a).issues.panelTabLabel,
|
|
2763
|
+
title: y(a).issues.panelTabLabel,
|
|
2764
|
+
class: w(["tpl:flex tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:gap-1.5 tpl:rounded-[var(--tpl-radius-sm)] tpl:border-none tpl:px-3 tpl:py-2 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)]", m("issues")]),
|
|
2765
|
+
style: D(b("issues")),
|
|
2784
2766
|
onClick: r[2] ||= (e) => s.value = "issues"
|
|
2785
2767
|
}, [
|
|
2786
|
-
j(
|
|
2768
|
+
j(y(wt), {
|
|
2787
2769
|
size: 14,
|
|
2788
2770
|
"stroke-width": 1.5
|
|
2789
2771
|
}),
|
|
2790
|
-
s.value === "issues" ? (
|
|
2791
|
-
|
|
2792
|
-
], 14, Ss)) :
|
|
2772
|
+
s.value === "issues" ? (o(), _("span", Cs, h(y(a).issues.panelTabLabel), 1)) : v("", !0),
|
|
2773
|
+
d.value > 0 ? (o(), _("span", ws, h(d.value), 1)) : v("", !0)
|
|
2774
|
+
], 14, Ss)) : v("", !0)
|
|
2793
2775
|
]),
|
|
2794
|
-
s.value === "content" ? (
|
|
2776
|
+
s.value === "content" ? (o(), _("div", Ts, [e.selectedBlock ? (o(), x(hs, {
|
|
2795
2777
|
key: 0,
|
|
2796
2778
|
block: e.selectedBlock,
|
|
2797
2779
|
onUpdate: r[3] ||= (e) => i("update-block", e),
|
|
2798
2780
|
onDelete: r[4] ||= (e) => i("delete-block"),
|
|
2799
2781
|
onDuplicate: r[5] ||= (e) => i("duplicate-block")
|
|
2800
|
-
}, null, 8, ["block"])) : (
|
|
2801
|
-
|
|
2782
|
+
}, null, 8, ["block"])) : (o(), _("div", Es, [
|
|
2783
|
+
T("div", Ds, [j(y(ft), {
|
|
2802
2784
|
size: 40,
|
|
2803
2785
|
"stroke-width": 1.5
|
|
2804
2786
|
})]),
|
|
2805
|
-
|
|
2806
|
-
|
|
2807
|
-
]))])) :
|
|
2808
|
-
s.value === "settings" ? (
|
|
2787
|
+
T("h3", Os, h(y(a).sidebar.noSelection), 1),
|
|
2788
|
+
T("p", ks, h(y(a).sidebar.noSelectionHint), 1)
|
|
2789
|
+
]))])) : v("", !0),
|
|
2790
|
+
s.value === "settings" ? (o(), _("div", As, [j(Wn, {
|
|
2809
2791
|
settings: e.settings,
|
|
2810
2792
|
onUpdate: r[6] ||= (e) => i("update-settings", e)
|
|
2811
|
-
}, null, 8, ["settings"])])) :
|
|
2812
|
-
s.value === "issues" && u.value ? (
|
|
2793
|
+
}, null, 8, ["settings"])])) : v("", !0),
|
|
2794
|
+
s.value === "issues" && u.value ? (o(), _("div", js, [j(y(n))])) : v("", !0)
|
|
2813
2795
|
], 10, gs));
|
|
2814
2796
|
}
|
|
2815
2797
|
}), Ns = ["aria-label"], Ps = [
|
|
@@ -2822,96 +2804,85 @@ var Ea = { class: "tpl:mb-3.5" }, Da = ["value"], Oa = ["value"], ka = /* @__PUR
|
|
|
2822
2804
|
props: { viewport: {} },
|
|
2823
2805
|
emits: ["change"],
|
|
2824
2806
|
setup(e, { emit: t }) {
|
|
2825
|
-
let n = e, r = t, { t: i } =
|
|
2826
|
-
|
|
2827
|
-
|
|
2828
|
-
|
|
2829
|
-
|
|
2830
|
-
|
|
2831
|
-
|
|
2832
|
-
|
|
2833
|
-
},
|
|
2834
|
-
{
|
|
2835
|
-
value: "mobile",
|
|
2836
|
-
label: i.viewport.mobile
|
|
2837
|
-
}
|
|
2838
|
-
]), c = h(() => `translateX(${o.value.findIndex((e) => e.value === n.viewport) * 100}%)`);
|
|
2839
|
-
return (t, n) => (a(), g("div", {
|
|
2807
|
+
let n = e, r = t, { t: i } = z(), a = g(() => [{
|
|
2808
|
+
value: "desktop",
|
|
2809
|
+
label: i.viewport.desktop
|
|
2810
|
+
}, {
|
|
2811
|
+
value: "mobile",
|
|
2812
|
+
label: i.viewport.mobile
|
|
2813
|
+
}]), s = g(() => `translateX(${a.value.findIndex((e) => e.value === n.viewport) * 100}%)`);
|
|
2814
|
+
return (t, n) => (o(), _("div", {
|
|
2840
2815
|
role: "radiogroup",
|
|
2841
|
-
"aria-label":
|
|
2816
|
+
"aria-label": y(i).viewport.label,
|
|
2842
2817
|
class: "tpl:relative tpl:grid tpl:rounded-[var(--tpl-radius-sm)] tpl:p-1",
|
|
2843
|
-
style:
|
|
2844
|
-
gridTemplateColumns: `repeat(${
|
|
2818
|
+
style: D({
|
|
2819
|
+
gridTemplateColumns: `repeat(${a.value.length}, 1fr)`,
|
|
2845
2820
|
backgroundColor: "var(--tpl-bg-hover)"
|
|
2846
2821
|
})
|
|
2847
|
-
}, [
|
|
2822
|
+
}, [T("div", {
|
|
2848
2823
|
class: "tpl:absolute tpl:inset-y-1 tpl:rounded-[var(--tpl-radius-sm)]",
|
|
2849
|
-
style:
|
|
2824
|
+
style: D({
|
|
2850
2825
|
left: "4px",
|
|
2851
|
-
width: `calc((100% - 8px) / ${
|
|
2852
|
-
transform:
|
|
2826
|
+
width: `calc((100% - 8px) / ${a.value.length})`,
|
|
2827
|
+
transform: s.value,
|
|
2853
2828
|
backgroundColor: "var(--tpl-bg)",
|
|
2854
2829
|
boxShadow: "var(--tpl-shadow)",
|
|
2855
2830
|
transition: "transform 120ms cubic-bezier(0.16, 1, 0.3, 1)"
|
|
2856
2831
|
})
|
|
2857
|
-
}, null, 4), (
|
|
2832
|
+
}, null, 4), (o(!0), _(O, null, c(a.value, (t) => (o(), _("button", {
|
|
2858
2833
|
key: t.value,
|
|
2859
2834
|
role: "radio",
|
|
2860
2835
|
"aria-checked": e.viewport === t.value,
|
|
2861
2836
|
"aria-label": t.label,
|
|
2862
2837
|
class: "tpl:relative tpl:z-10 tpl:flex tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:gap-1.5 tpl:rounded-md tpl:border-none tpl:bg-transparent tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium",
|
|
2863
|
-
style:
|
|
2838
|
+
style: D({
|
|
2864
2839
|
color: e.viewport === t.value ? "var(--tpl-primary)" : "var(--tpl-text-muted)",
|
|
2865
2840
|
transition: "color 120ms cubic-bezier(0.16, 1, 0.3, 1)"
|
|
2866
2841
|
}),
|
|
2867
2842
|
title: t.label,
|
|
2868
2843
|
onClick: (e) => r("change", t.value)
|
|
2869
|
-
}, [t.value === "desktop" ? (
|
|
2844
|
+
}, [t.value === "desktop" ? (o(), x(y(lt), {
|
|
2870
2845
|
key: 0,
|
|
2871
2846
|
size: 18,
|
|
2872
2847
|
"stroke-width": 1.5
|
|
2873
|
-
})) :
|
|
2848
|
+
})) : (o(), x(y(mt), {
|
|
2874
2849
|
key: 1,
|
|
2875
2850
|
size: 18,
|
|
2876
2851
|
"stroke-width": 1.5
|
|
2877
|
-
}))
|
|
2878
|
-
key: 2,
|
|
2879
|
-
size: 18,
|
|
2880
|
-
"stroke-width": 1.5
|
|
2881
|
-
})), w("span", null, m(t.label), 1)], 12, Ps))), 128))], 12, Ns));
|
|
2852
|
+
})), T("span", null, h(t.label), 1)], 12, Ps))), 128))], 12, Ns));
|
|
2882
2853
|
}
|
|
2883
2854
|
}), Is = [
|
|
2884
2855
|
"aria-label",
|
|
2885
2856
|
"title",
|
|
2886
2857
|
"aria-pressed"
|
|
2887
|
-
], Ls = /* @__PURE__ */
|
|
2858
|
+
], Ls = /* @__PURE__ */ Ke(/* @__PURE__ */ A({
|
|
2888
2859
|
__name: "PreviewToggle",
|
|
2889
2860
|
props: { previewMode: { type: Boolean } },
|
|
2890
2861
|
emits: ["change"],
|
|
2891
2862
|
setup(e, { emit: t }) {
|
|
2892
|
-
let n = t, { t: r } =
|
|
2893
|
-
return (t, i) => (
|
|
2863
|
+
let n = t, { t: r } = z();
|
|
2864
|
+
return (t, i) => (o(), _("button", {
|
|
2894
2865
|
class: "tpl-preview-toggle tpl:relative tpl:flex tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-[var(--tpl-radius-sm)] tpl:border-none tpl:p-2 tpl:transition-all tpl:duration-150",
|
|
2895
|
-
style:
|
|
2866
|
+
style: D({
|
|
2896
2867
|
color: e.previewMode ? "var(--tpl-primary)" : "var(--tpl-text-muted)",
|
|
2897
2868
|
backgroundColor: e.previewMode ? "var(--tpl-primary-light)" : "transparent"
|
|
2898
2869
|
}),
|
|
2899
|
-
"aria-label": e.previewMode ?
|
|
2900
|
-
title: e.previewMode ?
|
|
2870
|
+
"aria-label": e.previewMode ? y(r).previewMode.disable : y(r).previewMode.enable,
|
|
2871
|
+
title: e.previewMode ? y(r).previewMode.disable : y(r).previewMode.enable,
|
|
2901
2872
|
"aria-pressed": e.previewMode,
|
|
2902
2873
|
onClick: i[0] ||= (t) => n("change", !e.previewMode)
|
|
2903
|
-
}, [j(
|
|
2874
|
+
}, [j(S, {
|
|
2904
2875
|
"enter-active-class": "tpl-icon-enter-active",
|
|
2905
2876
|
"leave-active-class": "tpl-icon-leave-active",
|
|
2906
2877
|
"enter-from-class": "tpl-icon-enter-from",
|
|
2907
2878
|
"leave-to-class": "tpl-icon-leave-to",
|
|
2908
2879
|
mode: "out-in"
|
|
2909
2880
|
}, {
|
|
2910
|
-
default:
|
|
2881
|
+
default: u(() => [e.previewMode ? (o(), x(y(ve), {
|
|
2911
2882
|
key: "eye",
|
|
2912
2883
|
size: 18,
|
|
2913
2884
|
"stroke-width": 1.5
|
|
2914
|
-
})) : (
|
|
2885
|
+
})) : (o(), x(y(F), {
|
|
2915
2886
|
key: "eye-off",
|
|
2916
2887
|
size: 18,
|
|
2917
2888
|
"stroke-width": 1.5
|
|
@@ -2923,34 +2894,34 @@ var Ea = { class: "tpl:mb-3.5" }, Da = ["value"], Oa = ["value"], ka = /* @__PUR
|
|
|
2923
2894
|
"aria-label",
|
|
2924
2895
|
"title",
|
|
2925
2896
|
"aria-pressed"
|
|
2926
|
-
], zs = /* @__PURE__ */
|
|
2897
|
+
], zs = /* @__PURE__ */ Ke(/* @__PURE__ */ A({
|
|
2927
2898
|
__name: "DarkModeToggle",
|
|
2928
2899
|
props: { darkMode: { type: Boolean } },
|
|
2929
2900
|
emits: ["change"],
|
|
2930
2901
|
setup(e, { emit: t }) {
|
|
2931
|
-
let n = t, { t: r } =
|
|
2932
|
-
return (t, i) => (
|
|
2902
|
+
let n = t, { t: r } = z();
|
|
2903
|
+
return (t, i) => (o(), _("button", {
|
|
2933
2904
|
class: "tpl-dark-mode-toggle tpl:relative tpl:flex tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-[var(--tpl-radius-sm)] tpl:border-none tpl:p-2 tpl:transition-all tpl:duration-150",
|
|
2934
|
-
style:
|
|
2905
|
+
style: D({
|
|
2935
2906
|
color: e.darkMode ? "var(--tpl-primary)" : "var(--tpl-text-muted)",
|
|
2936
2907
|
backgroundColor: e.darkMode ? "var(--tpl-primary-light)" : "transparent"
|
|
2937
2908
|
}),
|
|
2938
|
-
"aria-label": e.darkMode ?
|
|
2939
|
-
title: e.darkMode ?
|
|
2909
|
+
"aria-label": e.darkMode ? y(r).darkMode.disable : y(r).darkMode.enable,
|
|
2910
|
+
title: e.darkMode ? y(r).darkMode.disable : y(r).darkMode.enable,
|
|
2940
2911
|
"aria-pressed": e.darkMode,
|
|
2941
2912
|
onClick: i[0] ||= (t) => n("change", !e.darkMode)
|
|
2942
|
-
}, [j(
|
|
2913
|
+
}, [j(S, {
|
|
2943
2914
|
"enter-active-class": "tpl-icon-enter-active",
|
|
2944
2915
|
"leave-active-class": "tpl-icon-leave-active",
|
|
2945
2916
|
"enter-from-class": "tpl-icon-enter-from",
|
|
2946
2917
|
"leave-to-class": "tpl-icon-leave-to",
|
|
2947
2918
|
mode: "out-in"
|
|
2948
2919
|
}, {
|
|
2949
|
-
default:
|
|
2920
|
+
default: u(() => [e.darkMode ? (o(), x(y(ct), {
|
|
2950
2921
|
key: "moon",
|
|
2951
2922
|
size: 18,
|
|
2952
2923
|
"stroke-width": 1.5
|
|
2953
|
-
})) : (
|
|
2924
|
+
})) : (o(), x(y(xt), {
|
|
2954
2925
|
key: "sun",
|
|
2955
2926
|
size: 18,
|
|
2956
2927
|
"stroke-width": 1.5
|
|
@@ -2975,23 +2946,23 @@ var Ea = { class: "tpl:mb-3.5" }, Da = ["value"], Oa = ["value"], ka = /* @__PUR
|
|
|
2975
2946
|
__name: "EditorFooter",
|
|
2976
2947
|
props: { positionClass: {} },
|
|
2977
2948
|
setup(e) {
|
|
2978
|
-
let { t } =
|
|
2979
|
-
return (n, r) => (
|
|
2980
|
-
|
|
2981
|
-
r[0] ||=
|
|
2949
|
+
let { t } = z();
|
|
2950
|
+
return (n, r) => (o(), _("footer", { class: w(["tpl:pointer-events-none tpl:absolute tpl:bottom-0 tpl:z-50 tpl:flex tpl:h-8 tpl:items-center tpl:justify-end tpl:pr-4 tpl:text-[9px] tpl:opacity-90 tpl:transition-all tpl:duration-300 tpl:text-[var(--tpl-text-dim)]", e.positionClass]) }, [T("div", Bs, [
|
|
2951
|
+
T("span", null, h(y(t).footer.poweredBy), 1),
|
|
2952
|
+
r[0] ||= T("a", {
|
|
2982
2953
|
href: "https://templatical.com",
|
|
2983
2954
|
target: "_blank",
|
|
2984
2955
|
rel: "noopener noreferrer",
|
|
2985
2956
|
class: "tpl:inline-flex tpl:items-center tpl:gap-1 tpl:font-medium tpl:transition-colors tpl:duration-150 hover:tpl:opacity-80 tpl:text-[var(--tpl-text-muted)]",
|
|
2986
2957
|
style: { "text-decoration": "none" }
|
|
2987
|
-
}, [
|
|
2958
|
+
}, [T("img", {
|
|
2988
2959
|
width: "14",
|
|
2989
2960
|
height: "14",
|
|
2990
2961
|
src: "https://templatical.com/logo.svg",
|
|
2991
2962
|
alt: ""
|
|
2992
2963
|
}), k(" Templatical ")], -1),
|
|
2993
|
-
r[1] ||=
|
|
2994
|
-
|
|
2964
|
+
r[1] ||= T("span", { class: "tpl:text-[var(--tpl-border)]" }, "·", -1),
|
|
2965
|
+
T("a", Vs, h(y(t).footer.openSource), 1)
|
|
2995
2966
|
])], 2));
|
|
2996
2967
|
}
|
|
2997
2968
|
}), Us = ["aria-labelledby", "data-tpl-theme"], Ws = { class: "tpl:flex tpl:items-center tpl:justify-between tpl:gap-3 tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-3 tpl:py-2.5" }, Gs = ["id"], Ks = ["aria-label"], qs = { class: "tpl:relative tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-3 tpl:py-2.5" }, Js = [
|
|
@@ -3031,44 +3002,44 @@ var Ea = { class: "tpl:mb-3.5" }, Da = ["value"], Oa = ["value"], ka = /* @__PUR
|
|
|
3031
3002
|
}, $ = "tpl-merge-tag-picker-list", oc = /* @__PURE__ */ A({
|
|
3032
3003
|
__name: "MergeTagPickerModal",
|
|
3033
3004
|
setup(e) {
|
|
3034
|
-
let t =
|
|
3005
|
+
let t = Ie(Ee, "MergeTagPickerModal"), { t: n, format: i } = z(), a = l(He, null), d = l(Ge, null), p = f(""), S = Ne(p, 200), E = f(null), ee = g(() => S.value.trim().length > 0), k = f(0), A = g(() => t.tags.value.some((e) => !!e.group)), N = f(/* @__PURE__ */ new Set());
|
|
3035
3006
|
function P(e) {
|
|
3036
3007
|
return N.value.has(e);
|
|
3037
3008
|
}
|
|
3038
3009
|
function te(e) {
|
|
3039
3010
|
let t = new Set(N.value);
|
|
3040
|
-
t.has(e) ? t.delete(e) : t.add(e), N.value = t,
|
|
3011
|
+
t.has(e) ? t.delete(e) : t.add(e), N.value = t, k.value = 0;
|
|
3041
3012
|
}
|
|
3042
|
-
let F =
|
|
3043
|
-
let e =
|
|
3013
|
+
let F = g(() => {
|
|
3014
|
+
let e = S.value.trim().toLowerCase();
|
|
3044
3015
|
return e ? t.tags.value.filter((t) => [
|
|
3045
3016
|
t.label,
|
|
3046
3017
|
t.value,
|
|
3047
3018
|
t.description ?? ""
|
|
3048
3019
|
].join(" ").toLowerCase().includes(e)) : t.tags.value;
|
|
3049
|
-
}), I =
|
|
3050
|
-
if (!
|
|
3051
|
-
let e =
|
|
3052
|
-
for (let
|
|
3053
|
-
let t =
|
|
3054
|
-
|
|
3020
|
+
}), I = g(() => {
|
|
3021
|
+
if (!A.value) return [];
|
|
3022
|
+
let e = n.mergeTag.picker.otherGroup, r = /* @__PURE__ */ new Set(), i = [];
|
|
3023
|
+
for (let n of t.tags.value) {
|
|
3024
|
+
let t = n.group ?? e;
|
|
3025
|
+
r.has(t) || (r.add(t), i.push(t));
|
|
3055
3026
|
}
|
|
3056
3027
|
return i;
|
|
3057
|
-
}), L =
|
|
3028
|
+
}), L = g(() => {
|
|
3058
3029
|
let e = F.value;
|
|
3059
|
-
if (!
|
|
3030
|
+
if (!A.value || ee.value) return e.map((e, t) => ({
|
|
3060
3031
|
kind: "tag",
|
|
3061
3032
|
tag: e,
|
|
3062
3033
|
index: t
|
|
3063
3034
|
}));
|
|
3064
|
-
let t =
|
|
3065
|
-
for (let
|
|
3066
|
-
let e =
|
|
3067
|
-
|
|
3035
|
+
let t = n.mergeTag.picker.otherGroup, r = /* @__PURE__ */ new Map(), i = [];
|
|
3036
|
+
for (let n of e) {
|
|
3037
|
+
let e = n.group ?? t;
|
|
3038
|
+
r.has(e) || (r.set(e, []), i.push(e)), r.get(e).push(n);
|
|
3068
3039
|
}
|
|
3069
3040
|
let a = [], o = 0;
|
|
3070
3041
|
for (let e of i) {
|
|
3071
|
-
let t =
|
|
3042
|
+
let t = r.get(e);
|
|
3072
3043
|
if (a.push({
|
|
3073
3044
|
kind: "header",
|
|
3074
3045
|
group: e,
|
|
@@ -3080,13 +3051,13 @@ var Ea = { class: "tpl:mb-3.5" }, Da = ["value"], Oa = ["value"], ka = /* @__PUR
|
|
|
3080
3051
|
}), o++;
|
|
3081
3052
|
}
|
|
3082
3053
|
return a;
|
|
3083
|
-
}),
|
|
3084
|
-
|
|
3085
|
-
e && (
|
|
3086
|
-
|
|
3054
|
+
}), R = g(() => L.value.flatMap((e) => e.kind === "tag" ? [e.tag] : []));
|
|
3055
|
+
M(() => t.isOpen.value, (e) => {
|
|
3056
|
+
e && (p.value = "", k.value = 0, N.value = /* @__PURE__ */ new Set(), s(() => {
|
|
3057
|
+
E.value?.focus();
|
|
3087
3058
|
}));
|
|
3088
|
-
}),
|
|
3089
|
-
|
|
3059
|
+
}), M(R, (e) => {
|
|
3060
|
+
k.value >= e.length && (k.value = Math.max(0, e.length - 1));
|
|
3090
3061
|
});
|
|
3091
3062
|
function B(e) {
|
|
3092
3063
|
t.resolve(e);
|
|
@@ -3095,18 +3066,18 @@ var Ea = { class: "tpl:mb-3.5" }, Da = ["value"], Oa = ["value"], ka = /* @__PUR
|
|
|
3095
3066
|
t.resolve(null);
|
|
3096
3067
|
}
|
|
3097
3068
|
function re(e) {
|
|
3098
|
-
if (
|
|
3099
|
-
let t =
|
|
3100
|
-
|
|
3069
|
+
if (R.value.length === 0) return;
|
|
3070
|
+
let t = k.value + e;
|
|
3071
|
+
k.value = Math.max(0, Math.min(R.value.length - 1, t)), se();
|
|
3101
3072
|
}
|
|
3102
|
-
let ie =
|
|
3073
|
+
let ie = f(null), ae = f({});
|
|
3103
3074
|
function oe(e, t) {
|
|
3104
3075
|
ae.value[e] = t ?? null;
|
|
3105
3076
|
}
|
|
3106
3077
|
function se() {
|
|
3107
|
-
|
|
3078
|
+
s(() => {
|
|
3108
3079
|
let e = ie.value;
|
|
3109
|
-
e && e.querySelector(`[data-merge-tag-index="${
|
|
3080
|
+
e && e.querySelector(`[data-merge-tag-index="${k.value}"]`)?.scrollIntoView({ block: "nearest" });
|
|
3110
3081
|
});
|
|
3111
3082
|
}
|
|
3112
3083
|
function ce(e) {
|
|
@@ -3114,7 +3085,7 @@ var Ea = { class: "tpl:mb-3.5" }, Da = ["value"], Oa = ["value"], ka = /* @__PUR
|
|
|
3114
3085
|
let t = new Set(N.value);
|
|
3115
3086
|
t.delete(e), N.value = t;
|
|
3116
3087
|
}
|
|
3117
|
-
|
|
3088
|
+
s(() => {
|
|
3118
3089
|
let t = ie.value;
|
|
3119
3090
|
if (!t) return;
|
|
3120
3091
|
let n = 0, r = !1;
|
|
@@ -3136,79 +3107,79 @@ var Ea = { class: "tpl:mb-3.5" }, Da = ["value"], Oa = ["value"], ka = /* @__PUR
|
|
|
3136
3107
|
else if (e.key === "ArrowUp") e.preventDefault(), re(-1);
|
|
3137
3108
|
else if (e.key === "Enter") {
|
|
3138
3109
|
e.preventDefault();
|
|
3139
|
-
let t =
|
|
3110
|
+
let t = R.value[k.value];
|
|
3140
3111
|
t && B(t);
|
|
3141
3112
|
}
|
|
3142
3113
|
}
|
|
3143
3114
|
function ue() {
|
|
3144
|
-
if (
|
|
3115
|
+
if (R.value.length !== 0) return `${$}-opt-${k.value}`;
|
|
3145
3116
|
}
|
|
3146
3117
|
function de(e) {
|
|
3147
3118
|
return `${$}-opt-${e}`;
|
|
3148
3119
|
}
|
|
3149
|
-
let fe =
|
|
3150
|
-
return (e,
|
|
3151
|
-
visible:
|
|
3120
|
+
let fe = g(() => t.tags.value.length === 0), pe = g(() => !fe.value && F.value.length === 0), me = g(() => A.value && I.value.length > 1 && !ee.value);
|
|
3121
|
+
return (e, s) => (o(), x(V, {
|
|
3122
|
+
visible: y(t).isOpen.value,
|
|
3152
3123
|
onClose: ne,
|
|
3153
3124
|
onKeydown: le
|
|
3154
3125
|
}, {
|
|
3155
|
-
default:
|
|
3126
|
+
default: u(() => [T("div", {
|
|
3156
3127
|
role: "dialog",
|
|
3157
3128
|
"aria-modal": "true",
|
|
3158
3129
|
"aria-labelledby": `${$}-title`,
|
|
3159
|
-
"data-tpl-theme":
|
|
3130
|
+
"data-tpl-theme": y(d),
|
|
3160
3131
|
"data-testid": "merge-tag-picker-modal",
|
|
3161
3132
|
class: "tpl tpl:flex tpl:max-h-[80vh] tpl:w-[min(420px,92vw)] tpl:flex-col tpl:rounded-[var(--tpl-radius)] tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-elevated)] tpl:shadow-[var(--tpl-shadow-lg)]",
|
|
3162
|
-
style:
|
|
3133
|
+
style: D(y(a))
|
|
3163
3134
|
}, [
|
|
3164
|
-
|
|
3135
|
+
T("header", Ws, [T("h2", {
|
|
3165
3136
|
id: `${$}-title`,
|
|
3166
3137
|
class: "tpl:m-0 tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]"
|
|
3167
|
-
},
|
|
3138
|
+
}, h(y(n).mergeTag.picker.title), 9, Gs), T("button", {
|
|
3168
3139
|
type: "button",
|
|
3169
3140
|
class: "tpl:flex tpl:h-7 tpl:w-7 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-[var(--tpl-radius-sm)] tpl:border-none tpl:bg-transparent tpl:text-[var(--tpl-text-dim)] tpl:transition-colors tpl:hover:bg-[var(--tpl-bg-hover)] tpl:hover:text-[var(--tpl-text)]",
|
|
3170
|
-
"aria-label":
|
|
3141
|
+
"aria-label": y(n).mergeTag.picker.close,
|
|
3171
3142
|
"data-testid": "merge-tag-picker-close",
|
|
3172
3143
|
onClick: ne
|
|
3173
|
-
}, [j(
|
|
3144
|
+
}, [j(y(Ae), {
|
|
3174
3145
|
size: 16,
|
|
3175
3146
|
"stroke-width": 2
|
|
3176
3147
|
})], 8, Ks)]),
|
|
3177
|
-
|
|
3148
|
+
T("div", qs, [j(y(Ct), {
|
|
3178
3149
|
class: "tpl:pointer-events-none tpl:absolute tpl:top-1/2 tpl:left-5 tpl:-translate-y-1/2 tpl:text-[var(--tpl-text-dim)]",
|
|
3179
3150
|
size: 14,
|
|
3180
3151
|
"stroke-width": 2
|
|
3181
|
-
}),
|
|
3152
|
+
}), r(T("input", {
|
|
3182
3153
|
id: `${$}-search`,
|
|
3183
3154
|
ref_key: "searchInputRef",
|
|
3184
|
-
ref:
|
|
3185
|
-
"onUpdate:modelValue":
|
|
3155
|
+
ref: E,
|
|
3156
|
+
"onUpdate:modelValue": s[0] ||= (e) => p.value = e,
|
|
3186
3157
|
type: "text",
|
|
3187
3158
|
class: "tpl:w-full tpl:rounded-[var(--tpl-radius-sm)] tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:py-1.5 tpl:pr-3 tpl:pl-8 tpl:text-sm tpl:text-[var(--tpl-text)] tpl:outline-none tpl:focus:border-[var(--tpl-primary)]",
|
|
3188
|
-
placeholder:
|
|
3189
|
-
"aria-label":
|
|
3159
|
+
placeholder: y(n).mergeTag.picker.searchPlaceholder,
|
|
3160
|
+
"aria-label": y(n).mergeTag.picker.searchAriaLabel,
|
|
3190
3161
|
"aria-controls": $,
|
|
3191
3162
|
"aria-activedescendant": ue(),
|
|
3192
3163
|
"data-testid": "merge-tag-picker-search",
|
|
3193
|
-
onKeydown:
|
|
3194
|
-
}, null, 40, Js), [[
|
|
3195
|
-
me.value ? (
|
|
3164
|
+
onKeydown: s[1] ||= m(b(() => {}, ["prevent"]), ["enter"])
|
|
3165
|
+
}, null, 40, Js), [[C, p.value]])]),
|
|
3166
|
+
me.value ? (o(), _("div", Ys, [(o(!0), _(O, null, c(I.value, (e) => (o(), _("button", {
|
|
3196
3167
|
key: e,
|
|
3197
3168
|
type: "button",
|
|
3198
3169
|
class: "tpl:flex tpl:flex-shrink-0 tpl:cursor-pointer tpl:items-center tpl:rounded-full tpl:border tpl:border-[var(--tpl-border)] tpl:bg-transparent tpl:px-2.5 tpl:py-0.5 tpl:text-[11px] tpl:font-medium tpl:text-[var(--tpl-text-dim)] tpl:transition-colors tpl:hover:bg-[var(--tpl-bg-hover)] tpl:hover:text-[var(--tpl-text)]",
|
|
3199
3170
|
"data-testid": "merge-tag-picker-group-pill",
|
|
3200
3171
|
"data-group-name": e,
|
|
3201
3172
|
onClick: (t) => ce(e)
|
|
3202
|
-
},
|
|
3203
|
-
|
|
3173
|
+
}, h(e), 9, Xs))), 128))])) : v("", !0),
|
|
3174
|
+
T("div", {
|
|
3204
3175
|
id: $,
|
|
3205
3176
|
ref_key: "listRef",
|
|
3206
3177
|
ref: ie,
|
|
3207
3178
|
class: "tpl:relative tpl:max-h-[60vh] tpl:flex-1 tpl:overflow-y-auto",
|
|
3208
3179
|
role: "listbox",
|
|
3209
|
-
"aria-label":
|
|
3180
|
+
"aria-label": y(n).mergeTag.picker.title,
|
|
3210
3181
|
"data-testid": "merge-tag-picker-list"
|
|
3211
|
-
}, [fe.value ? (
|
|
3182
|
+
}, [fe.value ? (o(), _("div", Qs, h(y(n).mergeTag.picker.empty), 1)) : pe.value ? (o(), _("div", $s, h(y(n).mergeTag.picker.noResults), 1)) : (o(!0), _(O, { key: 2 }, c(L.value, (e, t) => (o(), _(O, { key: t }, [e.kind === "header" ? (o(), _("button", {
|
|
3212
3183
|
key: 0,
|
|
3213
3184
|
ref_for: !0,
|
|
3214
3185
|
ref: (t) => oe(e.group, t),
|
|
@@ -3221,31 +3192,31 @@ var Ea = { class: "tpl:mb-3.5" }, Da = ["value"], Oa = ["value"], ka = /* @__PUR
|
|
|
3221
3192
|
"data-group-collapsed": P(e.group) ? "true" : "false",
|
|
3222
3193
|
onClick: (t) => te(e.group)
|
|
3223
3194
|
}, [
|
|
3224
|
-
j(
|
|
3195
|
+
j(y(ze), {
|
|
3225
3196
|
size: 12,
|
|
3226
3197
|
"stroke-width": 2,
|
|
3227
|
-
class:
|
|
3198
|
+
class: w(["tpl:transition-transform", P(e.group) ? "tpl:-rotate-90" : ""])
|
|
3228
3199
|
}, null, 8, ["class"]),
|
|
3229
|
-
|
|
3230
|
-
|
|
3231
|
-
], 8, ec)) : (
|
|
3200
|
+
T("span", null, h(e.group), 1),
|
|
3201
|
+
T("span", tc, " (" + h(y(i)(y(n).mergeTag.picker.groupCount, { count: e.count })) + ") ", 1)
|
|
3202
|
+
], 8, ec)) : (o(), _("button", {
|
|
3232
3203
|
key: 1,
|
|
3233
3204
|
id: de(e.index),
|
|
3234
3205
|
type: "button",
|
|
3235
3206
|
role: "option",
|
|
3236
|
-
"aria-selected": e.index ===
|
|
3237
|
-
"data-selected": e.index ===
|
|
3207
|
+
"aria-selected": e.index === k.value,
|
|
3208
|
+
"data-selected": e.index === k.value ? "true" : "false",
|
|
3238
3209
|
"data-merge-tag-index": e.index,
|
|
3239
3210
|
"data-merge-tag-value": e.tag.value,
|
|
3240
3211
|
title: e.tag.description ? `${e.tag.value} — ${e.tag.description}` : e.tag.value,
|
|
3241
|
-
class:
|
|
3212
|
+
class: w(["tpl:flex tpl:w-full tpl:cursor-pointer tpl:flex-col tpl:items-start tpl:gap-0.5 tpl:border-none tpl:px-3 tpl:py-1.5 tpl:text-left tpl:transition-colors", e.index === k.value ? "tpl:bg-[var(--tpl-primary-light)] tpl:text-[var(--tpl-primary)]" : "tpl:bg-transparent tpl:text-[var(--tpl-text)] tpl:hover:bg-[var(--tpl-bg-hover)]"]),
|
|
3242
3213
|
"data-testid": "merge-tag-picker-item",
|
|
3243
|
-
onMousemove: (t) =>
|
|
3214
|
+
onMousemove: (t) => k.value = e.index,
|
|
3244
3215
|
onClick: (t) => B(e.tag)
|
|
3245
3216
|
}, [
|
|
3246
|
-
|
|
3247
|
-
|
|
3248
|
-
e.tag.description ? (
|
|
3217
|
+
T("span", rc, h(e.tag.label), 1),
|
|
3218
|
+
T("span", ic, h(e.tag.value), 1),
|
|
3219
|
+
e.tag.description ? (o(), _("span", ac, h(e.tag.description), 1)) : v("", !0)
|
|
3249
3220
|
], 42, nc))], 64))), 128))], 8, Zs)
|
|
3250
3221
|
], 12, Us)]),
|
|
3251
3222
|
_: 1
|
|
@@ -3253,6 +3224,6 @@ var Ea = { class: "tpl:mb-3.5" }, Da = ["value"], Oa = ["value"], ka = /* @__PUR
|
|
|
3253
3224
|
}
|
|
3254
3225
|
});
|
|
3255
3226
|
//#endregion
|
|
3256
|
-
export { Fs as a,
|
|
3227
|
+
export { Fs as a, Gt as c, Ls as i, Wt as l, Hs as n, Ms as o, zs as r, en as s, oc as t, Pt as u };
|
|
3257
3228
|
|
|
3258
|
-
//# sourceMappingURL=styles-
|
|
3229
|
+
//# sourceMappingURL=styles-2P5yvfsS.js.map
|