@templatical/editor 0.0.4 → 0.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{AiChatSidebar-CjfhTZwo.js → AiChatSidebar-DwME3f-a.js} +84 -70
- package/dist/{AiFeatureMenu-K44aZa_P.js → AiFeatureMenu-DJvWL1GZ.js} +23 -23
- package/dist/CloudEditor-Fe0ssRgi.js +1082 -0
- package/dist/{CollaboratorBar-BuCEcdbB.js → CollaboratorBar-DTT0EkZn.js} +1 -1
- package/dist/{CommentsSidebar-2lcqMfIP.js → CommentsSidebar-DrJhQRXK.js} +131 -131
- package/dist/{DesignReferenceSidebar-CNMu4Zrx.js → DesignReferenceSidebar-DdOht5zn.js} +49 -49
- package/dist/{ModuleBrowserModal-CvQ0xyQf.js → ModuleBrowserModal-CiV_jOEM.js} +58 -58
- package/dist/{ModulePreviewCanvas-Be2B3Y07.js → ModulePreviewCanvas-Bmy6Y1WE.js} +1 -1
- package/dist/ParagraphEditor-CoQ3NlS7.js +688 -0
- package/dist/{SaveModuleDialog-BaaeH5Xm.js → SaveModuleDialog-CD2ZYq1o.js} +25 -25
- package/dist/{SnapshotHistory-BPfjiuu1.js → SnapshotHistory-DltsKvhP.js} +1 -1
- package/dist/TemplateScoringPanel-DmnmUE3y.js +254 -0
- package/dist/{TestEmailModal-DIAlB3e_.js → TestEmailModal-Dl633j9o.js} +2 -2
- package/dist/{TitleEditor-D9DPjQkX.js → TitleEditor-C7fds2Nc.js} +3 -3
- package/dist/{TplModal-CmTSvCY-.js → TplModal-C5_CF-qn.js} +1 -1
- package/dist/{blockTypeIcons-D1RTWOkx.js → blockTypeIcons-BrKZB10B.js} +1 -1
- package/dist/cdn/chunks/AiChatSidebar-X_Bv3Qys.js +2 -0
- package/dist/cdn/chunks/{AiFeatureMenu-lxVm1RjH.js → AiFeatureMenu-C5UQmEgV.js} +16 -16
- package/dist/cdn/chunks/AiFeatureMenu-C5UQmEgV.js.map +1 -0
- package/dist/cdn/chunks/CloudEditor-DeTolKnf.js +1056 -0
- package/dist/cdn/chunks/CloudEditor-DeTolKnf.js.map +1 -0
- package/dist/cdn/chunks/{CollaboratorBar-D2PKtlOw.js → CollaboratorBar-DO1nxSrr.js} +3 -3
- package/dist/cdn/chunks/{CollaboratorBar-D2PKtlOw.js.map → CollaboratorBar-DO1nxSrr.js.map} +1 -1
- package/dist/cdn/chunks/CommentsSidebar-4MTw_hue.js +2 -0
- package/dist/cdn/chunks/DesignReferenceSidebar-Bswh4Yx4.js +2 -0
- package/dist/cdn/chunks/{ModuleBrowserModal-CxDXzkKS.js → ModuleBrowserModal-ChBr3aXj.js} +52 -52
- package/dist/cdn/chunks/ModuleBrowserModal-ChBr3aXj.js.map +1 -0
- package/dist/cdn/chunks/{ModulePreviewCanvas-DEfHampA.js → ModulePreviewCanvas-DkSvri9H.js} +2 -2
- package/dist/cdn/chunks/{ModulePreviewCanvas-DEfHampA.js.map → ModulePreviewCanvas-DkSvri9H.js.map} +1 -1
- package/dist/cdn/chunks/ParagraphEditor-DU3oUKA7.js +539 -0
- package/dist/cdn/chunks/ParagraphEditor-DU3oUKA7.js.map +1 -0
- package/dist/cdn/chunks/{RichTextEditorContent-DWUzizsC.js → RichTextEditorContent-BrsW1p9s.js} +4 -4
- package/dist/cdn/chunks/{RichTextEditorContent-DWUzizsC.js.map → RichTextEditorContent-BrsW1p9s.js.map} +1 -1
- package/dist/cdn/chunks/{SaveModuleDialog-DVna2xUl.js → SaveModuleDialog-CjqKkTEc.js} +24 -24
- package/dist/cdn/chunks/SaveModuleDialog-CjqKkTEc.js.map +1 -0
- package/dist/cdn/chunks/SnapshotHistory-KME4xmn_.js +2 -0
- package/dist/cdn/chunks/TemplateScoringPanel-DgB3xDN6.js +2 -0
- package/dist/cdn/chunks/TestEmailModal-DdpvRbYf.js +2 -0
- package/dist/cdn/chunks/{TitleEditor-DDf_OcHS.js → TitleEditor-C8FYbadT.js} +9 -9
- package/dist/cdn/chunks/{TitleEditor-DDf_OcHS.js.map → TitleEditor-C8FYbadT.js.map} +1 -1
- package/dist/cdn/chunks/{blockTypeIcons-BnobReQm.js → blockTypeIcons-5QwYklNq.js} +3 -3
- package/dist/cdn/chunks/{blockTypeIcons-BnobReQm.js.map → blockTypeIcons-5QwYklNq.js.map} +1 -1
- package/dist/cdn/chunks/{dist-CJcMnY7o.js → dist-BF5c3Dr-.js} +1 -1
- package/dist/cdn/chunks/dist-BGzvIxcJ.js +2 -0
- package/dist/cdn/chunks/dist-CFemF8rI.js +2 -0
- package/dist/cdn/chunks/dist-Co6uFhFK.js +2 -0
- package/dist/cdn/chunks/{dist-BkETaOfw.js → dist-DCikBY9K.js} +1 -1
- package/dist/cdn/chunks/dist-DUILafAC.js +2 -0
- package/dist/cdn/chunks/dist-DghiKH0A.js +2 -0
- package/dist/cdn/chunks/dist-Dw8ckvfK.js +2 -0
- package/dist/cdn/chunks/dist-H07p0KAw.js +2 -0
- package/dist/cdn/chunks/{dist-B878xb_62.js → dist-KYv9v_1z2.js} +11 -11
- package/dist/cdn/chunks/{dist-B878xb_62.js.map → dist-KYv9v_1z2.js.map} +1 -1
- package/dist/cdn/chunks/{dist-DLWHlekl.js → dist-MjnKIc0W.js} +1 -1
- package/dist/cdn/chunks/{dist-CllLxIMQ.js → dist-odp0vGRv.js} +1 -1
- package/dist/cdn/chunks/{extensions-B_kcV0tK.js → extensions-Bj7USRLr.js} +20 -20
- package/dist/cdn/chunks/{extensions-B_kcV0tK.js.map → extensions-Bj7USRLr.js.map} +1 -1
- package/dist/cdn/chunks/{features-ofOGnSC0.js → features-Ds0XUfte.js} +1235 -1198
- package/dist/cdn/chunks/features-Ds0XUfte.js.map +1 -0
- package/dist/cdn/chunks/{icons-bIb7PBOE.js → icons-fWsuSvgd.js} +2 -2
- package/dist/cdn/chunks/{icons-bIb7PBOE.js.map → icons-fWsuSvgd.js.map} +1 -1
- package/dist/cdn/chunks/{media-library-BIYzV2Y2.js → media-library-BGQm_OyC.js} +528 -528
- package/dist/cdn/chunks/{media-library-BIYzV2Y2.js.map → media-library-BGQm_OyC.js.map} +1 -1
- package/dist/cdn/chunks/{src-BuW9oYtm.js → src-3i8rPuqd.js} +4 -4
- package/dist/cdn/chunks/{src-BuW9oYtm.js.map → src-3i8rPuqd.js.map} +1 -1
- package/dist/cdn/chunks/{styleConstants-1KwsBMxJ.js → styleConstants-DFe3I4Op.js} +6 -6
- package/dist/cdn/chunks/{styleConstants-1KwsBMxJ.js.map → styleConstants-DFe3I4Op.js.map} +1 -1
- package/dist/cdn/chunks/{styles-DQFExz-T.js → styles-Dgijy53u.js} +1224 -1096
- package/dist/cdn/chunks/styles-Dgijy53u.js.map +1 -0
- package/dist/cdn/chunks/{tiptap-DplY-S-k.js → tiptap-BhxaWR8R.js} +2 -2
- package/dist/cdn/chunks/{tiptap-DplY-S-k.js.map → tiptap-BhxaWR8R.js.map} +1 -1
- package/dist/cdn/editor.css +1 -1
- package/dist/cdn/editor.js +110 -139
- package/dist/cdn/editor.js.map +1 -1
- package/dist/{dist-BkIys9zn.js → dist-Ci5lFuUy.js} +1 -1
- package/dist/{extensions-DEjfEFhD.js → extensions-DWx_jj8v.js} +1 -1
- package/dist/{styleConstants-D4SOZGBV.js → styleConstants-Cxw88naD.js} +5 -5
- package/dist/{styles-CgLaxDfu.js → styles-fdXNRqI3.js} +1341 -1213
- package/dist/templatical-editor.css +1 -1
- package/dist/templatical-editor.js +99 -129
- package/dist/templatical-editor.umd.cjs +55 -64
- package/dist/{useEditorCore-CjwRMl7K.js → useEditorCore-DUGD6pq_.js} +1054 -1033
- package/package.json +4 -2
- package/dist/CloudEditor-DFyuRxUV.js +0 -926
- package/dist/ParagraphEditor-CcMPnbDr.js +0 -652
- package/dist/TemplateScoringPanel-D58A23Vq.js +0 -249
- package/dist/cdn/chunks/AiChatSidebar-CmPTbTFG.js +0 -2
- package/dist/cdn/chunks/AiFeatureMenu-lxVm1RjH.js.map +0 -1
- package/dist/cdn/chunks/CloudEditor-Bmp5IlWi.js +0 -900
- package/dist/cdn/chunks/CloudEditor-Bmp5IlWi.js.map +0 -1
- package/dist/cdn/chunks/CommentsSidebar-BOelj4Ca.js +0 -2
- package/dist/cdn/chunks/DesignReferenceSidebar-Bf6rg0A7.js +0 -2
- package/dist/cdn/chunks/ModuleBrowserModal-CxDXzkKS.js.map +0 -1
- package/dist/cdn/chunks/ParagraphEditor-DHdu6lb3.js +0 -503
- package/dist/cdn/chunks/ParagraphEditor-DHdu6lb3.js.map +0 -1
- package/dist/cdn/chunks/SaveModuleDialog-DVna2xUl.js.map +0 -1
- package/dist/cdn/chunks/SnapshotHistory-BFF2SsTN.js +0 -2
- package/dist/cdn/chunks/TemplateScoringPanel-gi8wc_m7.js +0 -2
- package/dist/cdn/chunks/TestEmailModal-Qtd6aC-6.js +0 -2
- package/dist/cdn/chunks/dist-B6AUkMyh.js +0 -2
- package/dist/cdn/chunks/dist-Bf1Op9A1.js +0 -2
- package/dist/cdn/chunks/dist-CWsl6S1K.js +0 -2
- package/dist/cdn/chunks/dist-Cs0wFwdw.js +0 -2
- package/dist/cdn/chunks/dist-DS3_HVpX.js +0 -2
- package/dist/cdn/chunks/dist-DTXopj1a.js +0 -2
- package/dist/cdn/chunks/dist-DnwLoNLm.js +0 -2
- package/dist/cdn/chunks/features-ofOGnSC0.js.map +0 -1
- package/dist/cdn/chunks/styles-DQFExz-T.js.map +0 -1
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import { a as e } from "./rolldown-runtime-DPITmOBR.js";
|
|
2
|
-
import { $ as t, B as n, E as r, F as i, H as a, I as o, N as s, R as c, S as l, U as u, Z as d, _ as f, at as p, b as m, c as h, ct as g, d as _, g as v, h as y, k as b, l as x, lt as S, m as C, n as w, p as T, s as E, st as D, t as O, u as k,
|
|
3
|
-
import { $ as
|
|
4
|
-
import { A as Qe, B as $e, F as et, I as tt, M as nt, N as rt, O as it, P as
|
|
5
|
-
import { t as
|
|
6
|
-
import { t as
|
|
7
|
-
import {
|
|
2
|
+
import { $ as t, B as n, E as r, F as i, H as a, I as o, N as s, R as c, S as l, U as u, Z as d, _ as f, at as p, b as m, c as h, ct as g, d as _, g as v, h as y, k as b, l as x, lt as S, m as C, n as w, p as T, s as E, st as D, t as O, u as k, y as A } from "./draggable-BQNU47zu.js";
|
|
3
|
+
import { $ as j, A as ee, At as M, B as te, Bt as N, Dt as ne, F as P, Ft as re, G as ie, Gt as F, H as ae, Ht as oe, I as se, It as ce, K as le, L as ue, Lt as de, M as fe, N as pe, Nt as me, Ot as he, P as ge, R as _e, St as ve, U as ye, Ut as be, V as xe, Vt as Se, W as Ce, Wt as we, Xt as Te, Z as Ee, Zt as De, _n as Oe, _t as ke, an as Ae, at as je, bt as Me, cn as Ne, dn as Pe, et as Fe, gt as Ie, hn as I, ht as Le, in as Re, j as ze, jt as L, ln as Be, lt as Ve, mn as He, mt as Ue, pn as We, rt as Ge, sn as Ke, tt as qe, vt as Je, wt as Ye, yt as Xe, zt as Ze } from "./features-Ds0XUfte.js";
|
|
4
|
+
import { A as Qe, B as $e, F as et, I as tt, M as nt, N as rt, O as it, P as R, T as z, _ as at, a as ot, b as st, c as ct, h as lt, m as ut, o as dt, q as ft, s as pt, u as mt, v as ht } from "./icons-fWsuSvgd.js";
|
|
5
|
+
import { t as gt } from "./readableTextColor-Cd_cgWO_.js";
|
|
6
|
+
import { t as _t } from "./blockTypeIcons-5QwYklNq.js";
|
|
7
|
+
import { _ as vt, c as yt, f as B, g as bt, h as V, i as xt, l as St, m as H, p as U, t as Ct, u as wt } from "./styleConstants-DFe3I4Op.js";
|
|
8
8
|
//#region src/components/Canvas.vue?vue&type=script&setup=true&lang.ts
|
|
9
|
-
var
|
|
9
|
+
var Tt = /* @__PURE__ */ e(O(), 1), Et = ["aria-label"], Dt = { class: "tpl:relative" }, Ot = {
|
|
10
10
|
class: "tpl:inline-flex tpl:size-3 tpl:items-center tpl:justify-center tpl:rounded-full tpl:text-[8px] tpl:font-bold",
|
|
11
11
|
style: { "background-color": "color-mix(\n in srgb,\n var(--tpl-bg) 30%,\n transparent\n )" }
|
|
12
|
-
},
|
|
12
|
+
}, kt = {
|
|
13
13
|
key: 0,
|
|
14
14
|
class: "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:border-[var(--tpl-primary)] tpl:bg-[var(--tpl-bg-elevated)] tpl:font-[var(--tpl-font-family)]"
|
|
15
|
-
},
|
|
15
|
+
}, At = { class: "tpl-canvas-empty-icon tpl:mb-4 tpl:text-[var(--tpl-primary)]" }, jt = { class: "tpl-canvas-empty-title tpl:m-0 tpl:mb-2 tpl:text-base tpl:font-semibold tpl:text-[var(--tpl-primary)]" }, Mt = { class: "tpl-canvas-empty-text tpl:m-0 tpl:text-sm tpl:text-[var(--tpl-text-dim)]" }, Nt = {
|
|
16
16
|
key: 0,
|
|
17
17
|
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)]"
|
|
18
|
-
},
|
|
18
|
+
}, Pt = {
|
|
19
19
|
key: 1,
|
|
20
20
|
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)]"
|
|
21
|
-
},
|
|
21
|
+
}, Ft = /* @__PURE__ */ j(/* @__PURE__ */ l({
|
|
22
22
|
__name: "Canvas",
|
|
23
23
|
props: {
|
|
24
24
|
viewport: {},
|
|
@@ -36,20 +36,20 @@ var xt = /* @__PURE__ */ e(O(), 1), St = ["aria-label"], Ct = { class: "tpl:rela
|
|
|
36
36
|
setup(e, { emit: t }) {
|
|
37
37
|
let n = {
|
|
38
38
|
section: se,
|
|
39
|
-
title:
|
|
40
|
-
paragraph:
|
|
41
|
-
image:
|
|
42
|
-
button:
|
|
39
|
+
title: ue,
|
|
40
|
+
paragraph: xe,
|
|
41
|
+
image: ye,
|
|
42
|
+
button: he,
|
|
43
43
|
divider: ie,
|
|
44
|
-
spacer:
|
|
45
|
-
html:
|
|
46
|
-
social:
|
|
44
|
+
spacer: fe,
|
|
45
|
+
html: Ce,
|
|
46
|
+
social: pe,
|
|
47
47
|
menu: ae,
|
|
48
|
-
table:
|
|
48
|
+
table: ze,
|
|
49
49
|
video: ee,
|
|
50
50
|
countdown: ne,
|
|
51
51
|
custom: le
|
|
52
|
-
}, i = e, o = t, { t: l } =
|
|
52
|
+
}, i = e, o = t, { t: l } = L(), d = Te(oe, "Canvas"), _ = r(Ze, null), b = r(ce, null), x = r(de, {}), w = T(() => (x.plan?.hasFeature("ai_generation") ?? !1) && (x.ai?.isFeatureEnabled("chat") ?? !1)), E = T(() => (x.plan?.hasFeature("ai_generation") ?? !1) && (x.ai?.isFeatureEnabled("designToTemplate") ?? !1)), O = T({
|
|
53
53
|
get: () => i.content.blocks,
|
|
54
54
|
set: (e) => {
|
|
55
55
|
d.setContent({
|
|
@@ -63,17 +63,17 @@ var xt = /* @__PURE__ */ e(O(), 1), St = ["aria-label"], Ct = { class: "tpl:rela
|
|
|
63
63
|
case "tablet": return 768;
|
|
64
64
|
default: return i.content.settings.width;
|
|
65
65
|
}
|
|
66
|
-
}),
|
|
66
|
+
}), j = T(() => ({
|
|
67
67
|
backgroundColor: i.content.settings.backgroundColor,
|
|
68
68
|
fontFamily: i.content.settings.fontFamily
|
|
69
69
|
}));
|
|
70
70
|
function M(e) {
|
|
71
71
|
i.previewMode || e.target === e.currentTarget && o("select-block", null);
|
|
72
72
|
}
|
|
73
|
-
function
|
|
73
|
+
function N(e) {
|
|
74
74
|
return te(e, b, n);
|
|
75
75
|
}
|
|
76
|
-
function
|
|
76
|
+
function P(e) {
|
|
77
77
|
return i.lockedBlocks?.get(e) ?? null;
|
|
78
78
|
}
|
|
79
79
|
function re(e, t) {
|
|
@@ -99,9 +99,9 @@ var xt = /* @__PURE__ */ e(O(), 1), St = ["aria-label"], Ct = { class: "tpl:rela
|
|
|
99
99
|
"tpl-canvas--dark-mode": e.darkMode,
|
|
100
100
|
"tpl-preview-mode": e.previewMode
|
|
101
101
|
}]),
|
|
102
|
-
style: g(
|
|
102
|
+
style: g(j.value),
|
|
103
103
|
onClick: M
|
|
104
|
-
}, [m(p(
|
|
104
|
+
}, [m(p(Tt.default), {
|
|
105
105
|
modelValue: O.value,
|
|
106
106
|
"onUpdate:modelValue": n[2] ||= (e) => O.value = e,
|
|
107
107
|
group: "blocks",
|
|
@@ -115,27 +115,27 @@ var xt = /* @__PURE__ */ e(O(), 1), St = ["aria-label"], Ct = { class: "tpl:rela
|
|
|
115
115
|
disabled: e.previewMode,
|
|
116
116
|
class: "tpl-canvas-blocks"
|
|
117
117
|
}, {
|
|
118
|
-
item: a(({ element: t }) => [u(C("div", null, [C("div",
|
|
118
|
+
item: a(({ element: t }) => [u(C("div", null, [C("div", Dt, [P(t.id) ? (s(), f("div", {
|
|
119
119
|
key: 0,
|
|
120
120
|
class: "tpl-collab-lock tpl:pointer-events-none tpl:absolute tpl:inset-0 tpl:z-[4] tpl:rounded-sm",
|
|
121
121
|
style: g({
|
|
122
|
-
outline: `2px solid ${
|
|
122
|
+
outline: `2px solid ${P(t.id).color}`,
|
|
123
123
|
outlineOffset: "-1px"
|
|
124
124
|
})
|
|
125
125
|
}, [C("span", {
|
|
126
126
|
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",
|
|
127
127
|
style: g({
|
|
128
|
-
backgroundColor:
|
|
129
|
-
color: p(
|
|
128
|
+
backgroundColor: P(t.id).color,
|
|
129
|
+
color: p(gt)(P(t.id).color)
|
|
130
130
|
})
|
|
131
|
-
}, [C("span",
|
|
131
|
+
}, [C("span", Ot, S(P(t.id).name.charAt(0)), 1), A(" " + S(P(t.id).name), 1)], 4)], 4)) : v("", !0), m(_e, {
|
|
132
132
|
block: t,
|
|
133
|
-
"is-selected": !e.previewMode && e.selectedBlockId === t.id && !
|
|
133
|
+
"is-selected": !e.previewMode && e.selectedBlockId === t.id && !P(t.id),
|
|
134
134
|
viewport: e.viewport,
|
|
135
135
|
"preview-mode": e.previewMode,
|
|
136
|
-
onSelect: (n) => e.previewMode ||
|
|
136
|
+
onSelect: (n) => e.previewMode || P(t.id) ? void 0 : o("select-block", t.id)
|
|
137
137
|
}, {
|
|
138
|
-
default: a(() => [(s(), y(c(
|
|
138
|
+
default: a(() => [(s(), y(c(N(t)), {
|
|
139
139
|
block: t,
|
|
140
140
|
viewport: e.viewport,
|
|
141
141
|
onFetchData: (e) => re(t, e),
|
|
@@ -154,60 +154,60 @@ var xt = /* @__PURE__ */ e(O(), 1), St = ["aria-label"], Ct = { class: "tpl:rela
|
|
|
154
154
|
"preview-mode",
|
|
155
155
|
"onSelect"
|
|
156
156
|
])])], 512), [[h, !p(_)?.isHidden(t.id)]])]),
|
|
157
|
-
footer: a(() => [O.value.length === 0 && !e.previewMode ? (s(), f("div",
|
|
158
|
-
C("div",
|
|
157
|
+
footer: a(() => [O.value.length === 0 && !e.previewMode ? (s(), f("div", kt, [
|
|
158
|
+
C("div", At, [m(p(lt), {
|
|
159
159
|
size: 48,
|
|
160
160
|
"stroke-width": 1
|
|
161
161
|
})]),
|
|
162
|
-
C("p",
|
|
163
|
-
C("p",
|
|
164
|
-
w.value ? (s(), f("p",
|
|
165
|
-
|
|
162
|
+
C("p", jt, S(p(l).canvas.noBlocks), 1),
|
|
163
|
+
C("p", Mt, S(p(l).canvas.dragHint), 1),
|
|
164
|
+
w.value ? (s(), f("p", Nt, [
|
|
165
|
+
A(S(p(l).canvas.aiHintChat) + " ", 1),
|
|
166
166
|
C("button", {
|
|
167
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)]",
|
|
168
168
|
onClick: n[0] ||= (e) => o("open-ai-chat")
|
|
169
|
-
}, [m(p(
|
|
169
|
+
}, [m(p(je), {
|
|
170
170
|
size: 14,
|
|
171
171
|
"stroke-width": 2
|
|
172
|
-
}),
|
|
173
|
-
|
|
172
|
+
}), A(" " + S(p(l).aiMenu.aiAssistant), 1)]),
|
|
173
|
+
A(" " + S(p(l).canvas.aiHintChatSuffix), 1)
|
|
174
174
|
])) : v("", !0),
|
|
175
|
-
E.value ? (s(), f("p",
|
|
176
|
-
|
|
175
|
+
E.value ? (s(), f("p", Pt, [
|
|
176
|
+
A(S(p(l).canvas.aiHintDesign) + " ", 1),
|
|
177
177
|
C("button", {
|
|
178
178
|
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)]",
|
|
179
179
|
onClick: n[1] ||= (e) => o("open-design-reference")
|
|
180
|
-
}, [m(p(
|
|
180
|
+
}, [m(p(Ie), {
|
|
181
181
|
size: 14,
|
|
182
182
|
"stroke-width": 2
|
|
183
|
-
}),
|
|
184
|
-
|
|
183
|
+
}), A(" " + S(p(l).aiMenu.designToTemplate), 1)]),
|
|
184
|
+
A(" " + S(p(l).canvas.aiHintDesignSuffix), 1)
|
|
185
185
|
])) : v("", !0)
|
|
186
186
|
])) : v("", !0)]),
|
|
187
187
|
_: 1
|
|
188
|
-
}, 8, ["modelValue", "disabled"])], 6)], 12,
|
|
188
|
+
}, 8, ["modelValue", "disabled"])], 6)], 12, Et));
|
|
189
189
|
}
|
|
190
|
-
}), [["__scopeId", "data-v-43f4b3a0"]]),
|
|
190
|
+
}), [["__scopeId", "data-v-43f4b3a0"]]), It = ["aria-label"], Lt = {
|
|
191
191
|
key: 0,
|
|
192
192
|
class: "tpl:border-b tpl:px-1 tpl:pb-1 tpl:border-[var(--tpl-border)]"
|
|
193
|
-
},
|
|
193
|
+
}, Rt = ["aria-label"], zt = {
|
|
194
194
|
key: 0,
|
|
195
195
|
class: "tpl:flex-1 tpl:truncate tpl:text-sm tpl:font-medium"
|
|
196
|
-
},
|
|
196
|
+
}, Bt = {
|
|
197
197
|
key: 1,
|
|
198
198
|
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)]"
|
|
199
|
-
},
|
|
199
|
+
}, Vt = [
|
|
200
200
|
"data-palette-type",
|
|
201
201
|
"aria-label",
|
|
202
202
|
"onClick",
|
|
203
203
|
"onKeydown"
|
|
204
|
-
],
|
|
204
|
+
], Ht = { 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" }, Ut = {
|
|
205
205
|
key: 0,
|
|
206
206
|
class: "tpl:truncate tpl:text-sm tpl:font-medium"
|
|
207
|
-
},
|
|
207
|
+
}, Wt = /* @__PURE__ */ l({
|
|
208
208
|
__name: "Sidebar",
|
|
209
209
|
setup(e) {
|
|
210
|
-
let { t: n, format: i } =
|
|
210
|
+
let { t: n, format: i } = L(), o = r(N, []), l = r(re, void 0), u = r(oe, null), d = r(de, {}), h = T(() => (d.savedModules?.moduleCount.value ?? 0) > 0), _ = t(!1), b = [
|
|
211
211
|
"section",
|
|
212
212
|
"image",
|
|
213
213
|
"title",
|
|
@@ -223,11 +223,11 @@ var xt = /* @__PURE__ */ e(O(), 1), St = ["aria-label"], Ct = { class: "tpl:rela
|
|
|
223
223
|
], x = T(() => {
|
|
224
224
|
let e = b.map((e) => ({
|
|
225
225
|
type: e,
|
|
226
|
-
label:
|
|
226
|
+
label: M(e, n)
|
|
227
227
|
}));
|
|
228
228
|
return d.plan && e.splice(-1, 0, {
|
|
229
229
|
type: "countdown",
|
|
230
|
-
label:
|
|
230
|
+
label: M("countdown", n)
|
|
231
231
|
}), e;
|
|
232
232
|
}), w = T(() => o.map((e) => ({
|
|
233
233
|
type: `custom:${e.type}`,
|
|
@@ -238,9 +238,9 @@ var xt = /* @__PURE__ */ e(O(), 1), St = ["aria-label"], Ct = { class: "tpl:rela
|
|
|
238
238
|
function D(e) {
|
|
239
239
|
if (e.isCustom) {
|
|
240
240
|
let t = e.type.replace("custom:", ""), n = o.find((e) => e.type === t);
|
|
241
|
-
if (n) return
|
|
241
|
+
if (n) return He(n);
|
|
242
242
|
}
|
|
243
|
-
return
|
|
243
|
+
return We(e.type, l);
|
|
244
244
|
}
|
|
245
245
|
function O(e) {
|
|
246
246
|
if (!u) return;
|
|
@@ -264,7 +264,7 @@ var xt = /* @__PURE__ */ e(O(), 1), St = ["aria-label"], Ct = { class: "tpl:rela
|
|
|
264
264
|
onMouseleave: t[2] ||= (e) => _.value = !1,
|
|
265
265
|
onFocusin: t[3] ||= (e) => _.value = !0,
|
|
266
266
|
onFocusout: t[4] ||= (e) => _.value = !1
|
|
267
|
-
}, [h.value ? (s(), f("div",
|
|
267
|
+
}, [h.value ? (s(), f("div", Lt, [C("button", {
|
|
268
268
|
type: "button",
|
|
269
269
|
"aria-label": p(n).sidebarNav.browseModules,
|
|
270
270
|
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)]",
|
|
@@ -276,9 +276,9 @@ var xt = /* @__PURE__ */ e(O(), 1), St = ["aria-label"], Ct = { class: "tpl:rela
|
|
|
276
276
|
"stroke-width": 1.5,
|
|
277
277
|
class: "tpl:shrink-0"
|
|
278
278
|
}),
|
|
279
|
-
_.value ? (s(), f("span",
|
|
280
|
-
_.value ? (s(), f("span",
|
|
281
|
-
], 12,
|
|
279
|
+
_.value ? (s(), f("span", zt, S(p(n).modules.title), 1)) : v("", !0),
|
|
280
|
+
_.value ? (s(), f("span", Bt, S(p(d).savedModules?.moduleCount.value ?? 0), 1)) : v("", !0)
|
|
281
|
+
], 12, Rt)])) : v("", !0), m(p(Tt.default), {
|
|
282
282
|
list: E.value,
|
|
283
283
|
group: {
|
|
284
284
|
name: "blocks",
|
|
@@ -300,46 +300,46 @@ var xt = /* @__PURE__ */ e(O(), 1), St = ["aria-label"], Ct = { class: "tpl:rela
|
|
|
300
300
|
style: g({ justifyContent: _.value ? "flex-start" : "center" }),
|
|
301
301
|
onClick: (t) => O(e),
|
|
302
302
|
onKeydown: (t) => k(t, e)
|
|
303
|
-
}, [C("div",
|
|
303
|
+
}, [C("div", Ht, [p(_t)[e.type] ? (s(), y(c(p(_t)[e.type]), {
|
|
304
304
|
key: 0,
|
|
305
305
|
size: 20,
|
|
306
306
|
"stroke-width": 1.5
|
|
307
|
-
})) : e.isCustom ? (s(), y(
|
|
307
|
+
})) : e.isCustom ? (s(), y(Fe, {
|
|
308
308
|
key: 1,
|
|
309
309
|
icon: e.icon,
|
|
310
310
|
size: 20
|
|
311
|
-
}, null, 8, ["icon"])) : v("", !0)]), _.value ? (s(), f("span",
|
|
311
|
+
}, null, 8, ["icon"])) : v("", !0)]), _.value ? (s(), f("span", Ut, S(e.label), 1)) : v("", !0)], 44, Vt)]),
|
|
312
312
|
_: 1
|
|
313
|
-
}, 8, ["list"])], 44,
|
|
313
|
+
}, 8, ["list"])], 44, It));
|
|
314
314
|
}
|
|
315
|
-
}),
|
|
315
|
+
}), W = (e, t = 0, n = 1) => e > n ? n : e < t ? t : e, G = (e, t = 0, n = 10 ** t) => Math.round(n * e) / n;
|
|
316
316
|
360 / (Math.PI * 2);
|
|
317
|
-
var
|
|
317
|
+
var Gt = (e) => $t(Kt(e)), Kt = (e) => (e[0] === "#" && (e = e.substring(1)), e.length < 6 ? {
|
|
318
318
|
r: parseInt(e[0] + e[0], 16),
|
|
319
319
|
g: parseInt(e[1] + e[1], 16),
|
|
320
320
|
b: parseInt(e[2] + e[2], 16),
|
|
321
|
-
a: e.length === 4 ?
|
|
321
|
+
a: e.length === 4 ? G(parseInt(e[3] + e[3], 16) / 255, 2) : 1
|
|
322
322
|
} : {
|
|
323
323
|
r: parseInt(e.substring(0, 2), 16),
|
|
324
324
|
g: parseInt(e.substring(2, 4), 16),
|
|
325
325
|
b: parseInt(e.substring(4, 6), 16),
|
|
326
|
-
a: e.length === 8 ?
|
|
327
|
-
}),
|
|
326
|
+
a: e.length === 8 ? G(parseInt(e.substring(6, 8), 16) / 255, 2) : 1
|
|
327
|
+
}), qt = (e) => Qt(Xt(e)), Jt = ({ h: e, s: t, v: n, a: r }) => {
|
|
328
328
|
let i = (200 - t) * n / 100;
|
|
329
329
|
return {
|
|
330
|
-
h:
|
|
331
|
-
s:
|
|
332
|
-
l:
|
|
333
|
-
a:
|
|
330
|
+
h: G(e),
|
|
331
|
+
s: G(i > 0 && i < 200 ? t * n / 100 / (i <= 100 ? i : 200 - i) * 100 : 0),
|
|
332
|
+
l: G(i / 2),
|
|
333
|
+
a: G(r, 2)
|
|
334
334
|
};
|
|
335
|
-
},
|
|
336
|
-
let { h: t, s: n, l: r } =
|
|
335
|
+
}, Yt = (e) => {
|
|
336
|
+
let { h: t, s: n, l: r } = Jt(e);
|
|
337
337
|
return `hsl(${t}, ${n}%, ${r}%)`;
|
|
338
|
-
},
|
|
338
|
+
}, Xt = ({ h: e, s: t, v: n, a: r }) => {
|
|
339
339
|
e = e / 360 * 6, t /= 100, n /= 100;
|
|
340
340
|
let i = Math.floor(e), a = n * (1 - t), o = n * (1 - (e - i) * t), s = n * (1 - (1 - e + i) * t), c = i % 6;
|
|
341
341
|
return {
|
|
342
|
-
r:
|
|
342
|
+
r: G([
|
|
343
343
|
n,
|
|
344
344
|
o,
|
|
345
345
|
a,
|
|
@@ -347,7 +347,7 @@ var Vt = (e) => Yt(Ht(e)), Ht = (e) => (e[0] === "#" && (e = e.substring(1)), e.
|
|
|
347
347
|
s,
|
|
348
348
|
n
|
|
349
349
|
][c] * 255),
|
|
350
|
-
g:
|
|
350
|
+
g: G([
|
|
351
351
|
s,
|
|
352
352
|
n,
|
|
353
353
|
n,
|
|
@@ -355,7 +355,7 @@ var Vt = (e) => Yt(Ht(e)), Ht = (e) => (e[0] === "#" && (e = e.substring(1)), e.
|
|
|
355
355
|
a,
|
|
356
356
|
a
|
|
357
357
|
][c] * 255),
|
|
358
|
-
b:
|
|
358
|
+
b: G([
|
|
359
359
|
a,
|
|
360
360
|
a,
|
|
361
361
|
s,
|
|
@@ -363,74 +363,74 @@ var Vt = (e) => Yt(Ht(e)), Ht = (e) => (e[0] === "#" && (e = e.substring(1)), e.
|
|
|
363
363
|
n,
|
|
364
364
|
o
|
|
365
365
|
][c] * 255),
|
|
366
|
-
a:
|
|
366
|
+
a: G(r, 2)
|
|
367
367
|
};
|
|
368
|
-
},
|
|
368
|
+
}, Zt = (e) => {
|
|
369
369
|
let t = e.toString(16);
|
|
370
370
|
return t.length < 2 ? "0" + t : t;
|
|
371
|
-
},
|
|
372
|
-
let i = r < 1 ?
|
|
373
|
-
return "#" +
|
|
374
|
-
},
|
|
371
|
+
}, Qt = ({ r: e, g: t, b: n, a: r }) => {
|
|
372
|
+
let i = r < 1 ? Zt(G(r * 255)) : "";
|
|
373
|
+
return "#" + Zt(e) + Zt(t) + Zt(n) + i;
|
|
374
|
+
}, $t = ({ r: e, g: t, b: n, a: r }) => {
|
|
375
375
|
let i = Math.max(e, t, n), a = i - Math.min(e, t, n), o = a ? i === e ? (t - n) / a : i === t ? 2 + (n - e) / a : 4 + (e - t) / a : 0;
|
|
376
376
|
return {
|
|
377
|
-
h:
|
|
378
|
-
s:
|
|
379
|
-
v:
|
|
377
|
+
h: G(60 * (o < 0 ? o + 6 : o)),
|
|
378
|
+
s: G(i ? a / i * 100 : 0),
|
|
379
|
+
v: G(i / 255 * 100),
|
|
380
380
|
a: r
|
|
381
381
|
};
|
|
382
|
-
},
|
|
382
|
+
}, en = (e, t) => {
|
|
383
383
|
if (e === t) return !0;
|
|
384
384
|
for (let n in e) if (e[n] !== t[n]) return !1;
|
|
385
385
|
return !0;
|
|
386
|
-
},
|
|
387
|
-
let t =
|
|
388
|
-
return t || (t = document.createElement("template"), t.innerHTML = e,
|
|
389
|
-
},
|
|
386
|
+
}, tn = (e, t) => e.toLowerCase() === t.toLowerCase() ? !0 : en(Kt(e), Kt(t)), nn = {}, rn = (e) => {
|
|
387
|
+
let t = nn[e];
|
|
388
|
+
return t || (t = document.createElement("template"), t.innerHTML = e, nn[e] = t), t;
|
|
389
|
+
}, an = (e, t, n) => {
|
|
390
390
|
e.dispatchEvent(new CustomEvent(t, {
|
|
391
391
|
bubbles: !0,
|
|
392
392
|
detail: n
|
|
393
393
|
}));
|
|
394
|
-
},
|
|
395
|
-
let n =
|
|
396
|
-
|
|
397
|
-
x:
|
|
398
|
-
y:
|
|
394
|
+
}, K = !1, on = (e) => "touches" in e, sn = (e) => K && !on(e) ? !1 : (K ||= on(e), !0), cn = (e, t) => {
|
|
395
|
+
let n = on(t) ? t.touches[0] : t, r = e.el.getBoundingClientRect();
|
|
396
|
+
an(e.el, "move", e.getMove({
|
|
397
|
+
x: W((n.pageX - (r.left + window.pageXOffset)) / r.width),
|
|
398
|
+
y: W((n.pageY - (r.top + window.pageYOffset)) / r.height)
|
|
399
399
|
}));
|
|
400
|
-
},
|
|
400
|
+
}, ln = (e, t) => {
|
|
401
401
|
let n = t.keyCode;
|
|
402
|
-
n > 40 || e.xy && n < 37 || n < 33 || (t.preventDefault(),
|
|
402
|
+
n > 40 || e.xy && n < 37 || n < 33 || (t.preventDefault(), an(e.el, "move", e.getMove({
|
|
403
403
|
x: n === 39 ? .01 : n === 37 ? -.01 : n === 34 ? .05 : n === 33 ? -.05 : n === 35 ? 1 : n === 36 ? -1 : 0,
|
|
404
404
|
y: n === 40 ? .01 : n === 38 ? -.01 : 0
|
|
405
405
|
}, !0)));
|
|
406
|
-
},
|
|
406
|
+
}, un = class {
|
|
407
407
|
constructor(e, t, n, r) {
|
|
408
|
-
let i =
|
|
408
|
+
let i = rn(`<div role="slider" tabindex="0" part="${t}" ${n}><div part="${t}-pointer"></div></div>`);
|
|
409
409
|
e.appendChild(i.content.cloneNode(!0));
|
|
410
410
|
let a = e.querySelector(`[part=${t}]`);
|
|
411
411
|
a.addEventListener("mousedown", this), a.addEventListener("touchstart", this), a.addEventListener("keydown", this), this.el = a, this.xy = r, this.nodes = [a.firstChild, a];
|
|
412
412
|
}
|
|
413
413
|
set dragging(e) {
|
|
414
414
|
let t = e ? document.addEventListener : document.removeEventListener;
|
|
415
|
-
t(
|
|
415
|
+
t(K ? "touchmove" : "mousemove", this), t(K ? "touchend" : "mouseup", this);
|
|
416
416
|
}
|
|
417
417
|
handleEvent(e) {
|
|
418
418
|
switch (e.type) {
|
|
419
419
|
case "mousedown":
|
|
420
420
|
case "touchstart":
|
|
421
|
-
if (e.preventDefault(), !
|
|
422
|
-
this.el.focus(),
|
|
421
|
+
if (e.preventDefault(), !sn(e) || !K && e.button != 0) return;
|
|
422
|
+
this.el.focus(), cn(this, e), this.dragging = !0;
|
|
423
423
|
break;
|
|
424
424
|
case "mousemove":
|
|
425
425
|
case "touchmove":
|
|
426
|
-
e.preventDefault(),
|
|
426
|
+
e.preventDefault(), cn(this, e);
|
|
427
427
|
break;
|
|
428
428
|
case "mouseup":
|
|
429
429
|
case "touchend":
|
|
430
430
|
this.dragging = !1;
|
|
431
431
|
break;
|
|
432
432
|
case "keydown":
|
|
433
|
-
|
|
433
|
+
ln(this, e);
|
|
434
434
|
break;
|
|
435
435
|
}
|
|
436
436
|
}
|
|
@@ -439,25 +439,25 @@ var Vt = (e) => Yt(Ht(e)), Ht = (e) => (e[0] === "#" && (e = e.substring(1)), e.
|
|
|
439
439
|
for (let n in e) this.nodes[t].style.setProperty(n, e[n]);
|
|
440
440
|
});
|
|
441
441
|
}
|
|
442
|
-
},
|
|
442
|
+
}, dn = class extends un {
|
|
443
443
|
constructor(e) {
|
|
444
444
|
super(e, "hue", "aria-label=\"Hue\" aria-valuemin=\"0\" aria-valuemax=\"360\"", !1);
|
|
445
445
|
}
|
|
446
446
|
update({ h: e }) {
|
|
447
447
|
this.h = e, this.style([{
|
|
448
448
|
left: `${e / 360 * 100}%`,
|
|
449
|
-
color:
|
|
449
|
+
color: Yt({
|
|
450
450
|
h: e,
|
|
451
451
|
s: 100,
|
|
452
452
|
v: 100,
|
|
453
453
|
a: 1
|
|
454
454
|
})
|
|
455
|
-
}]), this.el.setAttribute("aria-valuenow", `${
|
|
455
|
+
}]), this.el.setAttribute("aria-valuenow", `${G(e)}`);
|
|
456
456
|
}
|
|
457
457
|
getMove(e, t) {
|
|
458
|
-
return { h: t ?
|
|
458
|
+
return { h: t ? W(this.h + e.x * 360, 0, 360) : 360 * e.x };
|
|
459
459
|
}
|
|
460
|
-
},
|
|
460
|
+
}, fn = class extends un {
|
|
461
461
|
constructor(e) {
|
|
462
462
|
super(e, "saturation", "aria-label=\"Color\"", !0);
|
|
463
463
|
}
|
|
@@ -465,47 +465,47 @@ var Vt = (e) => Yt(Ht(e)), Ht = (e) => (e[0] === "#" && (e = e.substring(1)), e.
|
|
|
465
465
|
this.hsva = e, this.style([{
|
|
466
466
|
top: `${100 - e.v}%`,
|
|
467
467
|
left: `${e.s}%`,
|
|
468
|
-
color:
|
|
469
|
-
}, { "background-color":
|
|
468
|
+
color: Yt(e)
|
|
469
|
+
}, { "background-color": Yt({
|
|
470
470
|
h: e.h,
|
|
471
471
|
s: 100,
|
|
472
472
|
v: 100,
|
|
473
473
|
a: 1
|
|
474
|
-
}) }]), this.el.setAttribute("aria-valuetext", `Saturation ${
|
|
474
|
+
}) }]), this.el.setAttribute("aria-valuetext", `Saturation ${G(e.s)}%, Brightness ${G(e.v)}%`);
|
|
475
475
|
}
|
|
476
476
|
getMove(e, t) {
|
|
477
477
|
return {
|
|
478
|
-
s: t ?
|
|
479
|
-
v: t ?
|
|
478
|
+
s: t ? W(this.hsva.s + e.x * 100, 0, 100) : e.x * 100,
|
|
479
|
+
v: t ? W(this.hsva.v - e.y * 100, 0, 100) : Math.round(100 - e.y * 100)
|
|
480
480
|
};
|
|
481
481
|
}
|
|
482
|
-
},
|
|
482
|
+
}, pn = ":host{display:flex;flex-direction:column;position:relative;width:200px;height:200px;user-select:none;-webkit-user-select:none;cursor:default}:host([hidden]){display:none!important}[role=slider]{position:relative;touch-action:none;user-select:none;-webkit-user-select:none;outline:0}[role=slider]:last-child{border-radius:0 0 8px 8px}[part$=pointer]{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;display:flex;place-content:center center;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}[part$=pointer]::after{content:\"\";width:100%;height:100%;border-radius:inherit;background-color:currentColor}[role=slider]:focus [part$=pointer]{transform:translate(-50%,-50%) scale(1.1)}", mn = "[part=hue]{flex:0 0 24px;background:linear-gradient(to right,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red 100%)}[part=hue-pointer]{top:50%;z-index:2}", hn = "[part=saturation]{flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(to top,#000,transparent),linear-gradient(to right,#fff,rgba(255,255,255,0));box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}[part=saturation-pointer]{z-index:3}", gn = Symbol("same"), _n = Symbol("color"), vn = Symbol("hsva"), yn = Symbol("update"), bn = Symbol("parts"), xn = Symbol("css"), Sn = Symbol("sliders"), Cn = class extends HTMLElement {
|
|
483
483
|
static get observedAttributes() {
|
|
484
484
|
return ["color"];
|
|
485
485
|
}
|
|
486
|
-
get [
|
|
486
|
+
get [xn]() {
|
|
487
487
|
return [
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
488
|
+
pn,
|
|
489
|
+
mn,
|
|
490
|
+
hn
|
|
491
491
|
];
|
|
492
492
|
}
|
|
493
|
-
get [
|
|
494
|
-
return [
|
|
493
|
+
get [Sn]() {
|
|
494
|
+
return [fn, dn];
|
|
495
495
|
}
|
|
496
496
|
get color() {
|
|
497
|
-
return this[
|
|
497
|
+
return this[_n];
|
|
498
498
|
}
|
|
499
499
|
set color(e) {
|
|
500
|
-
if (!this[
|
|
500
|
+
if (!this[gn](e)) {
|
|
501
501
|
let t = this.colorModel.toHsva(e);
|
|
502
|
-
this[
|
|
502
|
+
this[yn](t), this[_n] = e;
|
|
503
503
|
}
|
|
504
504
|
}
|
|
505
505
|
constructor() {
|
|
506
506
|
super();
|
|
507
|
-
let e =
|
|
508
|
-
t.appendChild(e.content.cloneNode(!0)), t.addEventListener("move", this), this[
|
|
507
|
+
let e = rn(`<style>${this[xn].join("")}</style>`), t = this.attachShadow({ mode: "open" });
|
|
508
|
+
t.appendChild(e.content.cloneNode(!0)), t.addEventListener("move", this), this[bn] = this[Sn].map((e) => new e(t));
|
|
509
509
|
}
|
|
510
510
|
connectedCallback() {
|
|
511
511
|
if (this.hasOwnProperty("color")) {
|
|
@@ -515,56 +515,56 @@ var Vt = (e) => Yt(Ht(e)), Ht = (e) => (e[0] === "#" && (e = e.substring(1)), e.
|
|
|
515
515
|
}
|
|
516
516
|
attributeChangedCallback(e, t, n) {
|
|
517
517
|
let r = this.colorModel.fromAttr(n);
|
|
518
|
-
this[
|
|
518
|
+
this[gn](r) || (this.color = r);
|
|
519
519
|
}
|
|
520
520
|
handleEvent(e) {
|
|
521
|
-
let t = this[
|
|
521
|
+
let t = this[vn], n = {
|
|
522
522
|
...t,
|
|
523
523
|
...e.detail
|
|
524
524
|
};
|
|
525
|
-
this[
|
|
525
|
+
this[yn](n);
|
|
526
526
|
let r;
|
|
527
|
-
!
|
|
527
|
+
!en(n, t) && !this[gn](r = this.colorModel.fromHsva(n)) && (this[_n] = r, an(this, "color-changed", { value: r }));
|
|
528
528
|
}
|
|
529
|
-
[
|
|
529
|
+
[gn](e) {
|
|
530
530
|
return this.color && this.colorModel.equal(e, this.color);
|
|
531
531
|
}
|
|
532
|
-
[
|
|
533
|
-
this[
|
|
532
|
+
[yn](e) {
|
|
533
|
+
this[vn] = e, this[bn].forEach((t) => t.update(e));
|
|
534
534
|
}
|
|
535
|
-
},
|
|
535
|
+
}, wn = {
|
|
536
536
|
defaultColor: "#000",
|
|
537
|
-
toHsva:
|
|
538
|
-
fromHsva: ({ h: e, s: t, v: n }) =>
|
|
537
|
+
toHsva: Gt,
|
|
538
|
+
fromHsva: ({ h: e, s: t, v: n }) => qt({
|
|
539
539
|
h: e,
|
|
540
540
|
s: t,
|
|
541
541
|
v: n,
|
|
542
542
|
a: 1
|
|
543
543
|
}),
|
|
544
|
-
equal:
|
|
544
|
+
equal: tn,
|
|
545
545
|
fromAttr: (e) => e
|
|
546
|
-
},
|
|
546
|
+
}, Tn = class extends Cn {
|
|
547
547
|
get colorModel() {
|
|
548
|
-
return
|
|
548
|
+
return wn;
|
|
549
549
|
}
|
|
550
550
|
};
|
|
551
|
-
customElements.define("hex-color-picker", class extends
|
|
551
|
+
customElements.define("hex-color-picker", class extends Tn {});
|
|
552
552
|
//#endregion
|
|
553
553
|
//#region src/components/ColorPicker.vue?vue&type=script&setup=true&lang.ts
|
|
554
|
-
var
|
|
554
|
+
var En = [
|
|
555
555
|
"disabled",
|
|
556
556
|
"aria-label",
|
|
557
557
|
"aria-expanded"
|
|
558
|
-
],
|
|
558
|
+
], Dn = [
|
|
559
559
|
"value",
|
|
560
560
|
"placeholder",
|
|
561
561
|
"disabled",
|
|
562
562
|
"aria-label"
|
|
563
|
-
],
|
|
563
|
+
], On = ["color", "aria-label"], q = /* @__PURE__ */ l({
|
|
564
564
|
__name: "ColorPicker",
|
|
565
565
|
props: {
|
|
566
566
|
modelValue: {},
|
|
567
|
-
placeholder: { default:
|
|
567
|
+
placeholder: { default: xt },
|
|
568
568
|
size: { default: "default" },
|
|
569
569
|
swatchOnly: {
|
|
570
570
|
type: Boolean,
|
|
@@ -577,8 +577,8 @@ var Sn = [
|
|
|
577
577
|
},
|
|
578
578
|
emits: ["update:modelValue"],
|
|
579
579
|
setup(e, { emit: n }) {
|
|
580
|
-
let r = e, i = n, { t: o } =
|
|
581
|
-
|
|
580
|
+
let r = e, i = n, { t: o } = L(), c = t(!1), l = t(), u = t();
|
|
581
|
+
De(l, () => {
|
|
582
582
|
c.value = !1;
|
|
583
583
|
}, { ignore: [u] });
|
|
584
584
|
let d = T({
|
|
@@ -609,17 +609,17 @@ var Sn = [
|
|
|
609
609
|
}, [C("span", {
|
|
610
610
|
class: "tpl:block tpl:size-full tpl:rounded-[calc(var(--tpl-radius-sm)-2px)]",
|
|
611
611
|
style: g({ backgroundColor: d.value })
|
|
612
|
-
}, null, 4)], 10,
|
|
612
|
+
}, null, 4)], 10, En),
|
|
613
613
|
e.swatchOnly ? v("", !0) : (s(), f("input", {
|
|
614
614
|
key: 0,
|
|
615
615
|
type: "text",
|
|
616
|
-
class: D(p(
|
|
616
|
+
class: D(p(wt)),
|
|
617
617
|
value: e.modelValue,
|
|
618
618
|
placeholder: e.placeholder,
|
|
619
619
|
disabled: e.disabled,
|
|
620
620
|
"aria-label": p(o).colorPicker.hexValue,
|
|
621
621
|
onInput: _
|
|
622
|
-
}, null, 42,
|
|
622
|
+
}, null, 42, Dn)),
|
|
623
623
|
m(w, {
|
|
624
624
|
"enter-active-class": "tpl:transition-all tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)]",
|
|
625
625
|
"enter-from-class": "tpl:opacity-0 tpl:scale-95 tpl:translate-y-1",
|
|
@@ -638,7 +638,7 @@ var Sn = [
|
|
|
638
638
|
"aria-label": p(o).colorPicker.pickColor,
|
|
639
639
|
onColorChanged: h,
|
|
640
640
|
onKeydown: n[1] ||= x((e) => c.value = !1, ["escape"])
|
|
641
|
-
}, null, 40,
|
|
641
|
+
}, null, 40, On)], 512)) : v("", !0)]),
|
|
642
642
|
_: 1
|
|
643
643
|
})
|
|
644
644
|
], 2));
|
|
@@ -646,8 +646,8 @@ var Sn = [
|
|
|
646
646
|
});
|
|
647
647
|
//#endregion
|
|
648
648
|
//#region src/composables/useMergeTagField.ts
|
|
649
|
-
function
|
|
650
|
-
let { modelValue: n, emit: r, elementRef: i } = e, { isEnabled: a, isRequesting: o, isMergeTagValue: s, getMergeTagLabel: c, requestMergeTag: l, syntax: u } =
|
|
649
|
+
function kn(e) {
|
|
650
|
+
let { modelValue: n, emit: r, elementRef: i } = e, { isEnabled: a, isRequesting: o, isMergeTagValue: s, getMergeTagLabel: c, requestMergeTag: l, syntax: u } = Ee(), d = t(!1), f = !1, p = T(() => {
|
|
651
651
|
let e = n();
|
|
652
652
|
if (!e) return [];
|
|
653
653
|
let t = [], r = `(${u.value.source}|${u.logic.source})`, i = new RegExp(r, "g"), a = 0, o;
|
|
@@ -661,10 +661,10 @@ function Tn(e) {
|
|
|
661
661
|
type: "mergeTag",
|
|
662
662
|
value: n,
|
|
663
663
|
label: c(n)
|
|
664
|
-
}) :
|
|
664
|
+
}) : Pe(n, u) ? t.push({
|
|
665
665
|
type: "logicMergeTag",
|
|
666
666
|
value: n,
|
|
667
|
-
keyword:
|
|
667
|
+
keyword: Be(n, u)
|
|
668
668
|
}) : t.push({
|
|
669
669
|
type: "text",
|
|
670
670
|
value: n
|
|
@@ -717,109 +717,133 @@ function Tn(e) {
|
|
|
717
717
|
};
|
|
718
718
|
}
|
|
719
719
|
//#endregion
|
|
720
|
-
//#region src/components/
|
|
721
|
-
var
|
|
720
|
+
//#region src/components/MergeTagSegments.vue?vue&type=script&setup=true&lang.ts
|
|
721
|
+
var An = ["aria-label", "onKeydown"], jn = ["data-tooltip"], Mn = ["data-tooltip"], Nn = {
|
|
722
722
|
key: 2,
|
|
723
723
|
class: "tpl:text-sm tpl:text-[var(--tpl-text)]"
|
|
724
|
-
},
|
|
725
|
-
"
|
|
726
|
-
"title",
|
|
727
|
-
"disabled"
|
|
728
|
-
], Nn = { key: 1 }, Pn = [
|
|
729
|
-
"value",
|
|
730
|
-
"placeholder",
|
|
731
|
-
"rows"
|
|
732
|
-
], Fn = [
|
|
733
|
-
"aria-label",
|
|
734
|
-
"title",
|
|
735
|
-
"disabled"
|
|
736
|
-
], In = "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)]", Ln = "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)]", Rn = "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)]", zn = /* @__PURE__ */ l({
|
|
737
|
-
__name: "MergeTagTextarea",
|
|
724
|
+
}, Pn = ["aria-label", "title"], Fn = /* @__PURE__ */ l({
|
|
725
|
+
__name: "MergeTagSegments",
|
|
738
726
|
props: {
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
727
|
+
segments: {},
|
|
728
|
+
displayClass: {},
|
|
729
|
+
pulse: { type: Boolean }
|
|
742
730
|
},
|
|
743
|
-
emits: ["
|
|
744
|
-
setup(e, { emit:
|
|
745
|
-
let
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
return (t, n) => p(u) && !p(g) ? (s(), f("div", En, [C("div", {
|
|
731
|
+
emits: ["edit", "clear"],
|
|
732
|
+
setup(e, { emit: t }) {
|
|
733
|
+
let n = t, { t: r } = L();
|
|
734
|
+
function a() {
|
|
735
|
+
n("edit");
|
|
736
|
+
}
|
|
737
|
+
return (t, o) => (s(), f("div", {
|
|
751
738
|
role: "button",
|
|
752
739
|
tabindex: "0",
|
|
753
|
-
"aria-label": p(
|
|
754
|
-
class: D(
|
|
755
|
-
onClick:
|
|
756
|
-
onKeydown: [
|
|
757
|
-
}, [(s(!0), f(_, null, i(
|
|
740
|
+
"aria-label": p(r).mergeTag.clickToEdit,
|
|
741
|
+
class: D([e.displayClass, { "tpl-pulse-fill": e.pulse }]),
|
|
742
|
+
onClick: a,
|
|
743
|
+
onKeydown: [x(a, ["enter"]), x(k(a, ["prevent"]), ["space"])]
|
|
744
|
+
}, [(s(!0), f(_, null, i(e.segments, (e, t) => (s(), f(_, { key: `${e.type}-${t}-${e.value}` }, [e.type === "mergeTag" ? (s(), f("span", {
|
|
758
745
|
key: 0,
|
|
759
746
|
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",
|
|
760
747
|
"data-tooltip": e.value,
|
|
761
748
|
style: {
|
|
762
|
-
"background-color": "color-mix(\n
|
|
749
|
+
"background-color": "color-mix(\n in srgb,\n var(--tpl-primary) 20%,\n transparent\n )",
|
|
763
750
|
color: "var(--tpl-primary)"
|
|
764
751
|
}
|
|
765
|
-
}, S(e.label), 9,
|
|
752
|
+
}, S(e.label), 9, jn)) : e.type === "logicMergeTag" ? (s(), f("span", {
|
|
766
753
|
key: 1,
|
|
767
754
|
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",
|
|
768
755
|
"data-tooltip": e.value,
|
|
769
756
|
style: {
|
|
770
757
|
"background-color": "transparent",
|
|
771
|
-
border: "1.5px solid\n
|
|
758
|
+
border: "1.5px solid\n color-mix(in srgb, var(--tpl-primary) 50%, transparent)",
|
|
772
759
|
color: "var(--tpl-primary)"
|
|
773
760
|
}
|
|
774
|
-
}, S(e.keyword), 9,
|
|
761
|
+
}, S(e.keyword), 9, Mn)) : (s(), f("span", Nn, S(e.value), 1))], 64))), 128)), C("button", {
|
|
775
762
|
type: "button",
|
|
776
763
|
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",
|
|
777
|
-
"aria-label": p(
|
|
778
|
-
title: p(
|
|
779
|
-
onClick:
|
|
780
|
-
}, [m(p(
|
|
764
|
+
"aria-label": p(r).mergeTag.remove,
|
|
765
|
+
title: p(r).mergeTag.remove,
|
|
766
|
+
onClick: o[0] ||= k((e) => n("clear"), ["stop"])
|
|
767
|
+
}, [m(p(qe), {
|
|
781
768
|
size: 12,
|
|
782
769
|
"stroke-width": 2.5
|
|
783
|
-
})], 8,
|
|
784
|
-
|
|
770
|
+
})], 8, Pn)], 42, An));
|
|
771
|
+
}
|
|
772
|
+
}), In = [
|
|
773
|
+
"aria-label",
|
|
774
|
+
"title",
|
|
775
|
+
"disabled"
|
|
776
|
+
], Ln = "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)]", Rn = /* @__PURE__ */ l({
|
|
777
|
+
__name: "MergeTagInsertButton",
|
|
778
|
+
props: { disabled: { type: Boolean } },
|
|
779
|
+
emits: ["insert"],
|
|
780
|
+
setup(e) {
|
|
781
|
+
let { t } = L();
|
|
782
|
+
return (n, r) => (s(), f("button", {
|
|
785
783
|
type: "button",
|
|
786
|
-
class: D([
|
|
787
|
-
"aria-label": p(
|
|
788
|
-
title: p(
|
|
789
|
-
disabled:
|
|
790
|
-
onClick:
|
|
791
|
-
}, [m(p(
|
|
784
|
+
class: D([Ln, "tpl:mt-1.5"]),
|
|
785
|
+
"aria-label": p(t).mergeTag.insert,
|
|
786
|
+
title: p(t).mergeTag.insert,
|
|
787
|
+
disabled: e.disabled,
|
|
788
|
+
onClick: r[0] ||= (e) => n.$emit("insert")
|
|
789
|
+
}, [m(p(st), {
|
|
792
790
|
size: 12,
|
|
793
791
|
"stroke-width": 2
|
|
794
|
-
}),
|
|
792
|
+
}), A(" " + S(p(t).mergeTag.insert), 1)], 10, In));
|
|
793
|
+
}
|
|
794
|
+
}), zn = { key: 0 }, Bn = { key: 1 }, Vn = [
|
|
795
|
+
"value",
|
|
796
|
+
"placeholder",
|
|
797
|
+
"rows"
|
|
798
|
+
], 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)]", Un = "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)]", Wn = /* @__PURE__ */ l({
|
|
799
|
+
__name: "MergeTagTextarea",
|
|
800
|
+
props: {
|
|
801
|
+
modelValue: {},
|
|
802
|
+
placeholder: { default: "" },
|
|
803
|
+
rows: { default: 3 }
|
|
804
|
+
},
|
|
805
|
+
emits: ["update:modelValue"],
|
|
806
|
+
setup(e, { emit: n }) {
|
|
807
|
+
let r = e, i = n, a = t(null), { segments: o, hasMergeTags: c, mergeTagEnabled: l, isRequestingMergeTag: u, isEditing: d, startEditing: h, stopEditing: g, handleInput: _, clearValue: b, insertMergeTag: S } = kn({
|
|
808
|
+
modelValue: () => r.modelValue,
|
|
809
|
+
emit: (e) => i("update:modelValue", e),
|
|
810
|
+
elementRef: a
|
|
811
|
+
});
|
|
812
|
+
return (t, n) => p(c) && !p(d) ? (s(), f("div", zn, [m(Fn, {
|
|
813
|
+
segments: p(o),
|
|
814
|
+
"display-class": Un,
|
|
815
|
+
onEdit: p(h),
|
|
816
|
+
onClear: p(b)
|
|
817
|
+
}, null, 8, [
|
|
818
|
+
"segments",
|
|
819
|
+
"onEdit",
|
|
820
|
+
"onClear"
|
|
821
|
+
]), p(l) ? (s(), y(Rn, {
|
|
822
|
+
key: 0,
|
|
823
|
+
disabled: p(u),
|
|
824
|
+
onInsert: p(S)
|
|
825
|
+
}, null, 8, ["disabled", "onInsert"])) : v("", !0)])) : (s(), f("div", Bn, [C("textarea", {
|
|
795
826
|
ref_key: "textareaRef",
|
|
796
|
-
ref:
|
|
797
|
-
class: D(
|
|
827
|
+
ref: a,
|
|
828
|
+
class: D(Hn),
|
|
798
829
|
value: e.modelValue,
|
|
799
830
|
placeholder: e.placeholder,
|
|
800
831
|
rows: e.rows,
|
|
801
|
-
onInput: n[
|
|
802
|
-
onBlur: n[
|
|
803
|
-
onKeydown: n[
|
|
804
|
-
}, null, 40,
|
|
832
|
+
onInput: n[0] ||= (...e) => p(_) && p(_)(...e),
|
|
833
|
+
onBlur: n[1] ||= (...e) => p(g) && p(g)(...e),
|
|
834
|
+
onKeydown: n[2] ||= x((...e) => p(g) && p(g)(...e), ["escape"])
|
|
835
|
+
}, null, 40, Vn), p(l) ? (s(), y(Rn, {
|
|
805
836
|
key: 0,
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
title: p(o).mergeTag.insert,
|
|
810
|
-
disabled: p(h),
|
|
811
|
-
onClick: n[8] ||= (...e) => p(E) && p(E)(...e)
|
|
812
|
-
}, [m(p(ot), {
|
|
813
|
-
size: 12,
|
|
814
|
-
"stroke-width": 2
|
|
815
|
-
}), j(" " + S(p(o).mergeTag.insert), 1)], 8, Fn)) : v("", !0)]));
|
|
837
|
+
disabled: p(u),
|
|
838
|
+
onInsert: p(S)
|
|
839
|
+
}, null, 8, ["disabled", "onInsert"])) : v("", !0)]));
|
|
816
840
|
}
|
|
817
|
-
}),
|
|
841
|
+
}), Gn = { class: "tpl:flex tpl:w-full tpl:flex-1 tpl:flex-col tpl:bg-[var(--tpl-bg-elevated)]" }, Kn = { class: "tpl:flex tpl:flex-1 tpl:flex-col tpl:gap-3 tpl:overflow-y-auto tpl:p-4" }, qn = { 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 = { class: "tpl:mb-3.5" }, Yn = { 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)]" }, Xn = ["onClick"], Zn = { class: "tpl:flex tpl:items-stretch" }, Qn = ["value"], $n = { class: "tpl:mb-3.5 tpl:flex tpl:items-center tpl:gap-2 tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]" }, er = { class: "tpl:mb-3.5" }, tr = ["value"], nr = ["value"], rr = { class: "tpl:mb-3.5 tpl:flex tpl:items-center tpl:gap-2 tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]" }, ir = { class: "tpl:mt-1 tpl:flex tpl:items-start tpl:justify-between tpl:gap-2" }, ar = { class: "tpl:text-xs tpl:leading-relaxed tpl:text-[var(--tpl-text-dim)]" }, or = { class: "tpl:shrink-0 tpl:text-xs tpl:tabular-nums tpl:text-[var(--tpl-text-dim)]" }, sr = { class: "tpl:rounded-[var(--tpl-radius)] tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:p-3" }, cr = { 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)]" }, lr = { class: "tpl:m-0 tpl:pl-[18px] tpl:text-xs tpl:leading-relaxed tpl:text-[var(--tpl-text-dim)]" }, ur = { class: "tpl:mb-1 tpl:last:mb-0" }, dr = { class: "tpl:mb-1 tpl:last:mb-0" }, fr = { class: "tpl:mb-1 tpl:last:mb-0" }, pr = 150, mr = /* @__PURE__ */ l({
|
|
818
842
|
__name: "TemplateSettings",
|
|
819
843
|
props: { settings: {} },
|
|
820
844
|
emits: ["update"],
|
|
821
845
|
setup(e, { emit: t }) {
|
|
822
|
-
let n = e, r = t, { t: a } =
|
|
846
|
+
let n = e, r = t, { t: a } = L(), o = Te(be, "TemplateSettings"), c = T(() => o.fonts.value), l = T(() => c.value.some((e) => e.value === n.settings.fontFamily) ? n.settings.fontFamily : o.defaultFont.value), u = [
|
|
823
847
|
{
|
|
824
848
|
value: 480,
|
|
825
849
|
label: "480px"
|
|
@@ -837,14 +861,14 @@ var En = { key: 0 }, Dn = ["aria-label"], On = ["data-tooltip"], kn = ["data-too
|
|
|
837
861
|
label: "800px"
|
|
838
862
|
}
|
|
839
863
|
];
|
|
840
|
-
return (t, n) => (s(), f("aside",
|
|
841
|
-
C("div", { class: D(p(
|
|
842
|
-
C("div",
|
|
864
|
+
return (t, n) => (s(), f("aside", Gn, [C("div", Kn, [
|
|
865
|
+
C("div", { class: D(p(St)) }, [
|
|
866
|
+
C("div", qn, [m(p(ut), {
|
|
843
867
|
class: "tpl:text-[var(--tpl-text-muted)]",
|
|
844
868
|
size: 14,
|
|
845
869
|
"stroke-width": 2
|
|
846
870
|
}), C("span", null, S(p(a).templateSettings.layout), 1)]),
|
|
847
|
-
C("div",
|
|
871
|
+
C("div", Jn, [C("label", { class: D(p(V)) }, S(p(a).templateSettings.widthPreset), 3), C("div", Yn, [(s(), f(_, null, i(u, (t) => C("button", {
|
|
848
872
|
key: t.value,
|
|
849
873
|
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)]",
|
|
850
874
|
style: g({
|
|
@@ -853,72 +877,61 @@ var En = { key: 0 }, Dn = ["aria-label"], On = ["data-tooltip"], kn = ["data-too
|
|
|
853
877
|
boxShadow: e.settings.width === t.value ? "var(--tpl-shadow)" : "none"
|
|
854
878
|
}),
|
|
855
879
|
onClick: (e) => r("update", { width: t.value })
|
|
856
|
-
}, S(t.label), 13,
|
|
857
|
-
C("div", null, [C("label", { class: D(p(
|
|
880
|
+
}, S(t.label), 13, Xn)), 64))])]),
|
|
881
|
+
C("div", null, [C("label", { class: D(p(V)) }, S(p(a).templateSettings.customWidth), 3), C("div", Zn, [C("input", {
|
|
858
882
|
type: "number",
|
|
859
883
|
class: D(p(U)),
|
|
860
884
|
value: e.settings.width,
|
|
861
885
|
min: "300",
|
|
862
886
|
max: "900",
|
|
863
887
|
onInput: n[0] ||= (e) => r("update", { width: Number(e.target.value) })
|
|
864
|
-
}, null, 42,
|
|
888
|
+
}, null, 42, Qn), C("span", { class: D(p(H)) }, "px", 2)])])
|
|
865
889
|
], 2),
|
|
866
|
-
C("div", { class: D(p(
|
|
867
|
-
C("div",
|
|
890
|
+
C("div", { class: D(p(St)) }, [
|
|
891
|
+
C("div", $n, [m(p(ft), {
|
|
868
892
|
class: "tpl:text-[var(--tpl-text-muted)]",
|
|
869
893
|
size: 14,
|
|
870
894
|
"stroke-width": 2
|
|
871
895
|
}), C("span", null, S(p(a).templateSettings.appearance), 1)]),
|
|
872
|
-
C("div",
|
|
896
|
+
C("div", er, [C("label", { class: D(p(V)) }, S(p(a).templateSettings.backgroundColor), 3), m(q, {
|
|
873
897
|
"model-value": e.settings.backgroundColor,
|
|
874
|
-
placeholder: p(
|
|
898
|
+
placeholder: p(Ct),
|
|
875
899
|
"onUpdate:modelValue": n[1] ||= (e) => r("update", { backgroundColor: e })
|
|
876
900
|
}, null, 8, ["model-value", "placeholder"])]),
|
|
877
|
-
C("div", null, [C("label", { class: D(p(
|
|
878
|
-
class: D(p(
|
|
901
|
+
C("div", null, [C("label", { class: D(p(V)) }, S(p(a).templateSettings.fontFamily), 3), C("select", {
|
|
902
|
+
class: D(p(B)),
|
|
879
903
|
value: l.value,
|
|
880
904
|
onChange: n[2] ||= (e) => r("update", { fontFamily: e.target.value })
|
|
881
905
|
}, [(s(!0), f(_, null, i(c.value, (e) => (s(), f("option", {
|
|
882
906
|
key: e.value,
|
|
883
907
|
value: e.value
|
|
884
|
-
}, S(e.label), 9,
|
|
908
|
+
}, S(e.label), 9, nr))), 128))], 42, tr)])
|
|
885
909
|
], 2),
|
|
886
|
-
C("div", { class: D(p(
|
|
910
|
+
C("div", { class: D(p(St)) }, [C("div", rr, [m(p(ke), {
|
|
887
911
|
class: "tpl:text-[var(--tpl-text-muted)]",
|
|
888
912
|
size: 14,
|
|
889
913
|
"stroke-width": 2
|
|
890
|
-
}), C("span", null, S(p(a).templateSettings.preheaderText), 1)]), C("div", null, [m(
|
|
914
|
+
}), C("span", null, S(p(a).templateSettings.preheaderText), 1)]), C("div", null, [m(Wn, {
|
|
891
915
|
"model-value": e.settings.preheaderText ?? "",
|
|
892
916
|
placeholder: p(a).templateSettings.preheaderTextPlaceholder,
|
|
893
917
|
rows: 2,
|
|
894
918
|
"onUpdate:modelValue": n[3] ||= (e) => r("update", { preheaderText: e.replace(/[\r\n]/g, " ") || void 0 })
|
|
895
|
-
}, null, 8, ["model-value", "placeholder"]), C("div",
|
|
896
|
-
C("div",
|
|
919
|
+
}, null, 8, ["model-value", "placeholder"]), C("div", ir, [C("span", ar, S(p(a).templateSettings.preheaderTextHint), 1), C("span", or, S((e.settings.preheaderText ?? "").length) + "/" + S(pr), 1)])])], 2),
|
|
920
|
+
C("div", sr, [C("div", cr, [m(p(Ue), {
|
|
897
921
|
size: 14,
|
|
898
922
|
"stroke-width": 2
|
|
899
|
-
}), C("span", null, S(p(a).templateSettings.tips), 1)]), C("ul",
|
|
900
|
-
C("li",
|
|
901
|
-
C("li",
|
|
902
|
-
C("li",
|
|
923
|
+
}), C("span", null, S(p(a).templateSettings.tips), 1)]), C("ul", lr, [
|
|
924
|
+
C("li", ur, S(p(a).templateSettings.tip1), 1),
|
|
925
|
+
C("li", dr, S(p(a).templateSettings.tip2), 1),
|
|
926
|
+
C("li", fr, S(p(a).templateSettings.tip3), 1)
|
|
903
927
|
])])
|
|
904
928
|
])]));
|
|
905
929
|
}
|
|
906
|
-
}),
|
|
907
|
-
key: 2,
|
|
908
|
-
class: "tpl:text-sm tpl:text-[var(--tpl-text)]"
|
|
909
|
-
}, hr = ["aria-label", "title"], gr = [
|
|
910
|
-
"aria-label",
|
|
911
|
-
"title",
|
|
912
|
-
"disabled"
|
|
913
|
-
], _r = { key: 1 }, vr = [
|
|
930
|
+
}), hr = { key: 0 }, gr = { key: 1 }, _r = [
|
|
914
931
|
"type",
|
|
915
932
|
"value",
|
|
916
933
|
"placeholder"
|
|
917
|
-
],
|
|
918
|
-
"aria-label",
|
|
919
|
-
"title",
|
|
920
|
-
"disabled"
|
|
921
|
-
], br = "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)]", xr = "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)]", X = /* @__PURE__ */ M(/* @__PURE__ */ l({
|
|
934
|
+
], vr = "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)]", J = /* @__PURE__ */ j(/* @__PURE__ */ l({
|
|
922
935
|
__name: "MergeTagInput",
|
|
923
936
|
props: {
|
|
924
937
|
modelValue: {},
|
|
@@ -931,82 +944,46 @@ var En = { key: 0 }, Dn = ["aria-label"], On = ["data-tooltip"], kn = ["data-too
|
|
|
931
944
|
},
|
|
932
945
|
emits: ["update:modelValue"],
|
|
933
946
|
setup(e, { emit: n }) {
|
|
934
|
-
let r = e,
|
|
947
|
+
let r = e, i = n, a = t(null), { segments: o, hasMergeTags: c, mergeTagEnabled: l, isRequestingMergeTag: u, isEditing: d, startEditing: h, stopEditing: g, handleInput: _, clearValue: b, insertMergeTag: S } = kn({
|
|
935
948
|
modelValue: () => r.modelValue,
|
|
936
|
-
emit: (e) =>
|
|
937
|
-
elementRef:
|
|
949
|
+
emit: (e) => i("update:modelValue", e),
|
|
950
|
+
elementRef: a
|
|
938
951
|
});
|
|
939
|
-
return (t, n) => p(
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
952
|
+
return (t, n) => p(c) && !p(d) ? (s(), f("div", hr, [m(Fn, {
|
|
953
|
+
segments: p(o),
|
|
954
|
+
"display-class": vr,
|
|
955
|
+
pulse: e.pulse,
|
|
956
|
+
onEdit: p(h),
|
|
957
|
+
onClear: p(b)
|
|
958
|
+
}, null, 8, [
|
|
959
|
+
"segments",
|
|
960
|
+
"pulse",
|
|
961
|
+
"onEdit",
|
|
962
|
+
"onClear"
|
|
963
|
+
]), p(l) ? (s(), y(Rn, {
|
|
947
964
|
key: 0,
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
"background-color": "color-mix(\n in srgb,\n var(--tpl-primary) 20%,\n transparent\n )",
|
|
952
|
-
color: "var(--tpl-primary)"
|
|
953
|
-
}
|
|
954
|
-
}, S(e.label), 9, fr)) : e.type === "logicMergeTag" ? (s(), f("span", {
|
|
955
|
-
key: 1,
|
|
956
|
-
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",
|
|
957
|
-
"data-tooltip": e.value,
|
|
958
|
-
style: {
|
|
959
|
-
"background-color": "transparent",
|
|
960
|
-
border: "1.5px solid\n color-mix(in srgb, var(--tpl-primary) 50%, transparent)",
|
|
961
|
-
color: "var(--tpl-primary)"
|
|
962
|
-
}
|
|
963
|
-
}, S(e.keyword), 9, pr)) : (s(), f("span", mr, S(e.value), 1))], 64))), 128)), C("button", {
|
|
964
|
-
type: "button",
|
|
965
|
-
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",
|
|
966
|
-
"aria-label": p(o).mergeTag.remove,
|
|
967
|
-
title: p(o).mergeTag.remove,
|
|
968
|
-
onClick: n[0] ||= k((...e) => p(T) && p(T)(...e), ["stop"])
|
|
969
|
-
}, [m(p(I), {
|
|
970
|
-
size: 12,
|
|
971
|
-
"stroke-width": 2.5
|
|
972
|
-
})], 8, hr)], 42, dr), p(d) ? (s(), f("button", {
|
|
973
|
-
key: 0,
|
|
974
|
-
type: "button",
|
|
975
|
-
class: D([xr, "tpl:mt-1.5"]),
|
|
976
|
-
"aria-label": p(o).mergeTag.insert,
|
|
977
|
-
title: p(o).mergeTag.insert,
|
|
978
|
-
disabled: p(h),
|
|
979
|
-
onClick: n[4] ||= (...e) => p(E) && p(E)(...e)
|
|
980
|
-
}, [m(p(ot), {
|
|
981
|
-
size: 12,
|
|
982
|
-
"stroke-width": 2
|
|
983
|
-
}), j(" " + S(p(o).mergeTag.insert), 1)], 8, gr)) : v("", !0)])) : (s(), f("div", _r, [C("input", {
|
|
965
|
+
disabled: p(u),
|
|
966
|
+
onInsert: p(S)
|
|
967
|
+
}, null, 8, ["disabled", "onInsert"])) : v("", !0)])) : (s(), f("div", gr, [C("input", {
|
|
984
968
|
ref_key: "inputRef",
|
|
985
|
-
ref:
|
|
969
|
+
ref: a,
|
|
986
970
|
type: e.type,
|
|
987
|
-
class: D([p(
|
|
971
|
+
class: D([p(B), { "tpl-pulse-fill": e.pulse }]),
|
|
988
972
|
value: e.modelValue,
|
|
989
973
|
placeholder: e.placeholder,
|
|
990
|
-
onInput: n[
|
|
991
|
-
onBlur: n[
|
|
992
|
-
onKeydown: n[
|
|
993
|
-
}, null, 42,
|
|
974
|
+
onInput: n[0] ||= (...e) => p(_) && p(_)(...e),
|
|
975
|
+
onBlur: n[1] ||= (...e) => p(g) && p(g)(...e),
|
|
976
|
+
onKeydown: n[2] ||= x((...e) => p(g) && p(g)(...e), ["escape"])
|
|
977
|
+
}, null, 42, _r), p(l) ? (s(), y(Rn, {
|
|
994
978
|
key: 0,
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
title: p(o).mergeTag.insert,
|
|
999
|
-
disabled: p(h),
|
|
1000
|
-
onClick: n[8] ||= (...e) => p(E) && p(E)(...e)
|
|
1001
|
-
}, [m(p(ot), {
|
|
1002
|
-
size: 12,
|
|
1003
|
-
"stroke-width": 2
|
|
1004
|
-
}), j(" " + S(p(o).mergeTag.insert), 1)], 8, yr)) : v("", !0)]));
|
|
979
|
+
disabled: p(u),
|
|
980
|
+
onInsert: p(S)
|
|
981
|
+
}, null, 8, ["disabled", "onInsert"])) : v("", !0)]));
|
|
1005
982
|
}
|
|
1006
|
-
}), [["__scopeId", "data-v-
|
|
983
|
+
}), [["__scopeId", "data-v-b982cc87"]]), yr = { class: "tpl:mb-3.5" }, br = ["value"], xr = { value: "" }, Sr = ["value"], Cr = { class: "tpl:mb-3.5" }, wr = { class: "tpl:mb-3.5" }, Tr = {
|
|
1007
984
|
key: 0,
|
|
1008
985
|
class: "tpl:mt-2 tpl:flex tpl:cursor-pointer tpl:items-center tpl:gap-2 tpl:text-[12px] tpl:text-[var(--tpl-text-muted)]"
|
|
1009
|
-
},
|
|
986
|
+
}, Er = ["checked"], Dr = { class: "tpl:grid tpl:grid-cols-2 tpl:gap-3" }, Or = { class: "tpl:mb-3.5" }, kr = { class: "tpl:mb-3.5" }, Ar = { class: "tpl:grid tpl:grid-cols-2 tpl:gap-3" }, jr = { class: "tpl:mb-3.5" }, Mr = { class: "tpl:flex tpl:items-stretch" }, Nr = ["value"], Pr = { class: "tpl:mb-3.5" }, Fr = { class: "tpl:flex tpl:items-stretch" }, Ir = ["value"], Lr = /* @__PURE__ */ l({
|
|
1010
987
|
__name: "ButtonToolbar",
|
|
1011
988
|
props: {
|
|
1012
989
|
block: {},
|
|
@@ -1014,64 +991,64 @@ var En = { key: 0 }, Dn = ["aria-label"], On = ["data-tooltip"], kn = ["data-too
|
|
|
1014
991
|
},
|
|
1015
992
|
emits: ["update"],
|
|
1016
993
|
setup(e, { emit: t }) {
|
|
1017
|
-
let n = t, { t: r } =
|
|
994
|
+
let n = t, { t: r } = L();
|
|
1018
995
|
function a(e, t) {
|
|
1019
996
|
n("update", { [e]: t });
|
|
1020
997
|
}
|
|
1021
998
|
return (t, n) => (s(), f(_, null, [
|
|
1022
|
-
C("div",
|
|
1023
|
-
class: D(p(
|
|
999
|
+
C("div", yr, [C("label", { class: D(p(V)) }, S(p(r).button.fontFamily), 3), C("select", {
|
|
1000
|
+
class: D(p(B)),
|
|
1024
1001
|
value: e.block.fontFamily || "",
|
|
1025
1002
|
onChange: n[0] ||= (e) => a("fontFamily", e.target.value || void 0)
|
|
1026
|
-
}, [C("option",
|
|
1003
|
+
}, [C("option", xr, S(p(r).button.inheritFont), 1), (s(!0), f(_, null, i(e.fontFamilies, (e) => (s(), f("option", {
|
|
1027
1004
|
key: e.value,
|
|
1028
1005
|
value: e.value
|
|
1029
|
-
}, S(e.label), 9,
|
|
1030
|
-
C("div",
|
|
1006
|
+
}, S(e.label), 9, Sr))), 128))], 42, br)]),
|
|
1007
|
+
C("div", Cr, [C("label", { class: D(p(V)) }, S(p(r).button.text), 3), m(J, {
|
|
1031
1008
|
"model-value": e.block.text,
|
|
1032
1009
|
type: "text",
|
|
1033
1010
|
"onUpdate:modelValue": n[1] ||= (e) => a("text", e)
|
|
1034
1011
|
}, null, 8, ["model-value"])]),
|
|
1035
|
-
C("div",
|
|
1036
|
-
C("label", { class: D(p(
|
|
1037
|
-
m(
|
|
1012
|
+
C("div", wr, [
|
|
1013
|
+
C("label", { class: D(p(V)) }, S(p(r).button.url), 3),
|
|
1014
|
+
m(J, {
|
|
1038
1015
|
"model-value": e.block.url,
|
|
1039
1016
|
type: "url",
|
|
1040
1017
|
placeholder: p(r).button.urlPlaceholder,
|
|
1041
1018
|
"onUpdate:modelValue": n[2] ||= (e) => a("url", e)
|
|
1042
1019
|
}, null, 8, ["model-value", "placeholder"]),
|
|
1043
|
-
e.block.url ? (s(), f("label",
|
|
1020
|
+
e.block.url ? (s(), f("label", Tr, [C("input", {
|
|
1044
1021
|
type: "checkbox",
|
|
1045
1022
|
class: "tpl:size-3.5 tpl:cursor-pointer tpl:accent-[var(--tpl-primary)]",
|
|
1046
1023
|
checked: e.block.openInNewTab ?? !1,
|
|
1047
1024
|
onChange: n[3] ||= (e) => a("openInNewTab", e.target.checked)
|
|
1048
|
-
}, null, 40,
|
|
1025
|
+
}, null, 40, Er), A(" " + S(p(r).button.openInNewTab), 1)])) : v("", !0)
|
|
1049
1026
|
]),
|
|
1050
|
-
C("div",
|
|
1027
|
+
C("div", Dr, [C("div", Or, [C("label", { class: D(p(V)) }, S(p(r).button.background), 3), m(q, {
|
|
1051
1028
|
"model-value": e.block.backgroundColor,
|
|
1052
1029
|
"onUpdate:modelValue": n[4] ||= (e) => a("backgroundColor", e)
|
|
1053
|
-
}, null, 8, ["model-value"])]), C("div",
|
|
1030
|
+
}, null, 8, ["model-value"])]), C("div", kr, [C("label", { class: D(p(V)) }, S(p(r).button.textColor), 3), m(q, {
|
|
1054
1031
|
"model-value": e.block.textColor,
|
|
1055
1032
|
"onUpdate:modelValue": n[5] ||= (e) => a("textColor", e)
|
|
1056
1033
|
}, null, 8, ["model-value"])])]),
|
|
1057
|
-
C("div",
|
|
1034
|
+
C("div", Ar, [C("div", jr, [C("label", { class: D(p(V)) }, S(p(r).button.borderRadius), 3), C("div", Mr, [C("input", {
|
|
1058
1035
|
type: "number",
|
|
1059
1036
|
class: D(p(U)),
|
|
1060
1037
|
value: e.block.borderRadius,
|
|
1061
1038
|
min: "0",
|
|
1062
1039
|
max: "50",
|
|
1063
1040
|
onInput: n[6] ||= (e) => a("borderRadius", Number(e.target.value))
|
|
1064
|
-
}, null, 42,
|
|
1041
|
+
}, null, 42, Nr), C("span", { class: D(p(H)) }, "px", 2)])]), C("div", Pr, [C("label", { class: D(p(V)) }, S(p(r).button.fontSize), 3), C("div", Fr, [C("input", {
|
|
1065
1042
|
type: "number",
|
|
1066
1043
|
class: D(p(U)),
|
|
1067
1044
|
value: e.block.fontSize,
|
|
1068
1045
|
min: "10",
|
|
1069
1046
|
max: "36",
|
|
1070
1047
|
onInput: n[7] ||= (e) => a("fontSize", Number(e.target.value))
|
|
1071
|
-
}, null, 42,
|
|
1048
|
+
}, null, 42, Ir), C("span", { class: D(p(H)) }, "px", 2)])])])
|
|
1072
1049
|
], 64));
|
|
1073
1050
|
}
|
|
1074
|
-
}),
|
|
1051
|
+
}), Rr = { class: "spacing-control" }, zr = { class: "tpl:mb-2 tpl:block tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-text-muted)]" }, Br = { class: "tpl:flex tpl:flex-col tpl:items-center tpl:gap-1.5" }, Vr = { class: "tpl:flex tpl:items-center" }, Hr = ["aria-label"], Ur = ["value", "aria-label"], Wr = ["aria-label"], Gr = { class: "tpl:flex tpl:items-center tpl:gap-2" }, Kr = { class: "tpl:flex tpl:items-center" }, qr = ["aria-label"], Jr = ["value", "aria-label"], Yr = ["aria-label"], Xr = ["aria-label", "title"], Zr = { class: "tpl:flex tpl:items-center" }, Qr = ["aria-label"], $r = ["value", "aria-label"], ei = ["aria-label"], ti = { class: "tpl:flex tpl:items-center" }, ni = ["aria-label"], ri = ["value", "aria-label"], ii = ["aria-label"], Y = "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)]", ai = "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)]", oi = /* @__PURE__ */ j(/* @__PURE__ */ l({
|
|
1075
1052
|
__name: "SpacingControl",
|
|
1076
1053
|
props: {
|
|
1077
1054
|
modelValue: {},
|
|
@@ -1079,7 +1056,7 @@ var En = { key: 0 }, Dn = ["aria-label"], On = ["data-tooltip"], kn = ["data-too
|
|
|
1079
1056
|
},
|
|
1080
1057
|
emits: ["update:modelValue"],
|
|
1081
1058
|
setup(e, { emit: r }) {
|
|
1082
|
-
let i = e, a = r, { t: o } =
|
|
1059
|
+
let i = e, a = r, { t: o } = L(), c = T(() => i.modelValue.top === i.modelValue.right && i.modelValue.right === i.modelValue.bottom && i.modelValue.bottom === i.modelValue.left), l = t(c.value);
|
|
1083
1060
|
n(c, (e) => {
|
|
1084
1061
|
!e && l.value && (l.value = !1);
|
|
1085
1062
|
});
|
|
@@ -1118,59 +1095,59 @@ var En = { key: 0 }, Dn = ["aria-label"], On = ["data-tooltip"], kn = ["data-too
|
|
|
1118
1095
|
});
|
|
1119
1096
|
}
|
|
1120
1097
|
}
|
|
1121
|
-
return (t, n) => (s(), f("div",
|
|
1122
|
-
C("div",
|
|
1098
|
+
return (t, n) => (s(), f("div", Rr, [C("label", zr, S(e.label), 1), C("div", Br, [
|
|
1099
|
+
C("div", Vr, [
|
|
1123
1100
|
C("button", {
|
|
1124
1101
|
"aria-label": p(o).spacingControl.decreaseTop,
|
|
1125
|
-
class: D([
|
|
1102
|
+
class: D([Y, "tpl:rounded-l-[var(--tpl-radius-sm)]"]),
|
|
1126
1103
|
onClick: n[0] ||= (e) => u("top", -1)
|
|
1127
|
-
}, [m(p(
|
|
1104
|
+
}, [m(p(R), {
|
|
1128
1105
|
size: 12,
|
|
1129
1106
|
"stroke-width": 2
|
|
1130
|
-
})], 10,
|
|
1107
|
+
})], 10, Hr),
|
|
1131
1108
|
C("input", {
|
|
1132
1109
|
type: "number",
|
|
1133
|
-
class: D(
|
|
1110
|
+
class: D(ai),
|
|
1134
1111
|
value: e.modelValue.top,
|
|
1135
1112
|
"aria-label": p(o).spacingControl.top,
|
|
1136
1113
|
min: "0",
|
|
1137
1114
|
onInput: n[1] ||= (e) => d("top", Number(e.target.value))
|
|
1138
|
-
}, null, 40,
|
|
1115
|
+
}, null, 40, Ur),
|
|
1139
1116
|
C("button", {
|
|
1140
1117
|
"aria-label": p(o).spacingControl.increaseTop,
|
|
1141
|
-
class: D([
|
|
1118
|
+
class: D([Y, "tpl:rounded-r-[var(--tpl-radius-sm)]"]),
|
|
1142
1119
|
onClick: n[2] ||= (e) => u("top", 1)
|
|
1143
|
-
}, [m(p(
|
|
1120
|
+
}, [m(p(z), {
|
|
1144
1121
|
size: 12,
|
|
1145
1122
|
"stroke-width": 2
|
|
1146
|
-
})], 10,
|
|
1123
|
+
})], 10, Wr)
|
|
1147
1124
|
]),
|
|
1148
|
-
C("div",
|
|
1149
|
-
C("div",
|
|
1125
|
+
C("div", Gr, [
|
|
1126
|
+
C("div", Kr, [
|
|
1150
1127
|
C("button", {
|
|
1151
1128
|
"aria-label": p(o).spacingControl.decreaseLeft,
|
|
1152
|
-
class: D([
|
|
1129
|
+
class: D([Y, "tpl:rounded-l-[var(--tpl-radius-sm)]"]),
|
|
1153
1130
|
onClick: n[3] ||= (e) => u("left", -1)
|
|
1154
|
-
}, [m(p(
|
|
1131
|
+
}, [m(p(R), {
|
|
1155
1132
|
size: 12,
|
|
1156
1133
|
"stroke-width": 2
|
|
1157
|
-
})], 10,
|
|
1134
|
+
})], 10, qr),
|
|
1158
1135
|
C("input", {
|
|
1159
1136
|
type: "number",
|
|
1160
|
-
class: D(
|
|
1137
|
+
class: D(ai),
|
|
1161
1138
|
value: e.modelValue.left,
|
|
1162
1139
|
"aria-label": p(o).spacingControl.left,
|
|
1163
1140
|
min: "0",
|
|
1164
1141
|
onInput: n[4] ||= (e) => d("left", Number(e.target.value))
|
|
1165
|
-
}, null, 40,
|
|
1142
|
+
}, null, 40, Jr),
|
|
1166
1143
|
C("button", {
|
|
1167
1144
|
"aria-label": p(o).spacingControl.increaseLeft,
|
|
1168
|
-
class: D([
|
|
1145
|
+
class: D([Y, "tpl:rounded-r-[var(--tpl-radius-sm)]"]),
|
|
1169
1146
|
onClick: n[5] ||= (e) => u("left", 1)
|
|
1170
|
-
}, [m(p(
|
|
1147
|
+
}, [m(p(z), {
|
|
1171
1148
|
size: 12,
|
|
1172
1149
|
"stroke-width": 2
|
|
1173
|
-
})], 10,
|
|
1150
|
+
})], 10, Yr)
|
|
1174
1151
|
]),
|
|
1175
1152
|
C("button", {
|
|
1176
1153
|
class: D(["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)]", l.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)]"]),
|
|
@@ -1185,291 +1162,298 @@ var En = { key: 0 }, Dn = ["aria-label"], On = ["data-tooltip"], kn = ["data-too
|
|
|
1185
1162
|
key: 1,
|
|
1186
1163
|
size: 14,
|
|
1187
1164
|
"stroke-width": 2
|
|
1188
|
-
}))], 10,
|
|
1189
|
-
C("div",
|
|
1165
|
+
}))], 10, Xr),
|
|
1166
|
+
C("div", Zr, [
|
|
1190
1167
|
C("button", {
|
|
1191
1168
|
"aria-label": p(o).spacingControl.decreaseRight,
|
|
1192
|
-
class: D([
|
|
1169
|
+
class: D([Y, "tpl:rounded-l-[var(--tpl-radius-sm)]"]),
|
|
1193
1170
|
onClick: n[6] ||= (e) => u("right", -1)
|
|
1194
|
-
}, [m(p(
|
|
1171
|
+
}, [m(p(R), {
|
|
1195
1172
|
size: 12,
|
|
1196
1173
|
"stroke-width": 2
|
|
1197
|
-
})], 10,
|
|
1174
|
+
})], 10, Qr),
|
|
1198
1175
|
C("input", {
|
|
1199
1176
|
type: "number",
|
|
1200
|
-
class: D(
|
|
1177
|
+
class: D(ai),
|
|
1201
1178
|
value: e.modelValue.right,
|
|
1202
1179
|
"aria-label": p(o).spacingControl.right,
|
|
1203
1180
|
min: "0",
|
|
1204
1181
|
onInput: n[7] ||= (e) => d("right", Number(e.target.value))
|
|
1205
|
-
}, null, 40,
|
|
1182
|
+
}, null, 40, $r),
|
|
1206
1183
|
C("button", {
|
|
1207
1184
|
"aria-label": p(o).spacingControl.increaseRight,
|
|
1208
|
-
class: D([
|
|
1185
|
+
class: D([Y, "tpl:rounded-r-[var(--tpl-radius-sm)]"]),
|
|
1209
1186
|
onClick: n[8] ||= (e) => u("right", 1)
|
|
1210
|
-
}, [m(p(
|
|
1187
|
+
}, [m(p(z), {
|
|
1211
1188
|
size: 12,
|
|
1212
1189
|
"stroke-width": 2
|
|
1213
|
-
})], 10,
|
|
1190
|
+
})], 10, ei)
|
|
1214
1191
|
])
|
|
1215
1192
|
]),
|
|
1216
|
-
C("div",
|
|
1193
|
+
C("div", ti, [
|
|
1217
1194
|
C("button", {
|
|
1218
1195
|
"aria-label": p(o).spacingControl.decreaseBottom,
|
|
1219
|
-
class: D([
|
|
1196
|
+
class: D([Y, "tpl:rounded-l-[var(--tpl-radius-sm)]"]),
|
|
1220
1197
|
onClick: n[9] ||= (e) => u("bottom", -1)
|
|
1221
|
-
}, [m(p(
|
|
1198
|
+
}, [m(p(R), {
|
|
1222
1199
|
size: 12,
|
|
1223
1200
|
"stroke-width": 2
|
|
1224
|
-
})], 10,
|
|
1201
|
+
})], 10, ni),
|
|
1225
1202
|
C("input", {
|
|
1226
1203
|
type: "number",
|
|
1227
|
-
class: D(
|
|
1204
|
+
class: D(ai),
|
|
1228
1205
|
value: e.modelValue.bottom,
|
|
1229
1206
|
"aria-label": p(o).spacingControl.bottom,
|
|
1230
1207
|
min: "0",
|
|
1231
1208
|
onInput: n[10] ||= (e) => d("bottom", Number(e.target.value))
|
|
1232
|
-
}, null, 40,
|
|
1209
|
+
}, null, 40, ri),
|
|
1233
1210
|
C("button", {
|
|
1234
1211
|
"aria-label": p(o).spacingControl.increaseBottom,
|
|
1235
|
-
class: D([
|
|
1212
|
+
class: D([Y, "tpl:rounded-r-[var(--tpl-radius-sm)]"]),
|
|
1236
1213
|
onClick: n[11] ||= (e) => u("bottom", 1)
|
|
1237
|
-
}, [m(p(
|
|
1214
|
+
}, [m(p(z), {
|
|
1238
1215
|
size: 12,
|
|
1239
1216
|
"stroke-width": 2
|
|
1240
|
-
})], 10,
|
|
1217
|
+
})], 10, ii)
|
|
1241
1218
|
])
|
|
1242
1219
|
])]));
|
|
1243
1220
|
}
|
|
1244
|
-
}), [["__scopeId", "data-v-9a9c8a07"]]),
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1221
|
+
}), [["__scopeId", "data-v-9a9c8a07"]]), si = { class: "tpl:mt-3" }, X = /* @__PURE__ */ l({
|
|
1222
|
+
__name: "CollapsibleSection",
|
|
1223
|
+
props: {
|
|
1224
|
+
title: {},
|
|
1225
|
+
open: { type: Boolean },
|
|
1226
|
+
noBorder: { type: Boolean }
|
|
1227
|
+
},
|
|
1228
|
+
emits: ["toggle"],
|
|
1229
|
+
setup(e) {
|
|
1230
|
+
return (t, n) => (s(), f("div", { class: D(["tpl:py-3", e.noBorder ? "" : "tpl:border-t tpl:border-[var(--tpl-border)]"]) }, [C("button", {
|
|
1231
|
+
type: "button",
|
|
1232
|
+
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)]",
|
|
1233
|
+
onClick: n[0] ||= (e) => t.$emit("toggle")
|
|
1234
|
+
}, [m(p(Ye), {
|
|
1235
|
+
class: D(["tpl:transition-transform tpl:duration-200", e.open ? "tpl:rotate-0" : "tpl:-rotate-90"]),
|
|
1236
|
+
size: 12,
|
|
1237
|
+
"stroke-width": 2
|
|
1238
|
+
}, null, 8, ["class"]), C("span", null, S(e.title), 1)]), u(C("div", si, [o(t.$slots, "default")], 512), [[h, e.open]])], 2));
|
|
1239
|
+
}
|
|
1240
|
+
}), ci = { class: "tpl:mt-4" }, li = { class: "tpl:space-y-2" }, ui = ["checked", "onChange"], di = ["value", "placeholder"], fi = { class: "tpl:space-y-2" }, pi = ["value"], mi = { value: "" }, hi = ["label"], gi = ["value"], _i = ["value"], vi = {
|
|
1248
1241
|
key: 0,
|
|
1249
1242
|
value: "__custom__"
|
|
1250
|
-
},
|
|
1243
|
+
}, yi = {
|
|
1251
1244
|
key: 0,
|
|
1252
1245
|
class: "tpl:space-y-2"
|
|
1253
|
-
},
|
|
1246
|
+
}, bi = { class: "tpl:mb-1 tpl:block tpl:text-[11px] tpl:font-medium tpl:text-[var(--tpl-text-muted)]" }, xi = { class: "tpl:mb-1 tpl:block tpl:text-[11px] tpl:font-medium tpl:text-[var(--tpl-text-muted)]" }, Si = { class: "tpl:flex tpl:justify-end" }, Ci = ["disabled"], wi = {
|
|
1254
1247
|
key: 0,
|
|
1255
1248
|
class: "tpl:text-[11px] tpl:text-[var(--tpl-text-muted)]"
|
|
1256
|
-
},
|
|
1249
|
+
}, Ti = { class: "tpl:space-y-1" }, Ei = { class: "tpl:m-0 tpl:overflow-x-auto tpl:rounded tpl:bg-[var(--tpl-bg)] tpl:p-2 tpl:font-mono tpl:text-[10px] tpl:text-[var(--tpl-text-muted)]" }, Di = {
|
|
1257
1250
|
key: 0,
|
|
1258
1251
|
class: "tpl:m-0 tpl:overflow-x-auto tpl:rounded tpl:bg-[var(--tpl-bg)] tpl:p-2 tpl:font-mono tpl:text-[10px] tpl:text-[var(--tpl-text-muted)]"
|
|
1259
|
-
},
|
|
1252
|
+
}, Oi = /* @__PURE__ */ l({
|
|
1260
1253
|
__name: "CommonBlockSettings",
|
|
1261
1254
|
props: {
|
|
1262
1255
|
block: {},
|
|
1263
1256
|
isFirstSection: { type: Boolean }
|
|
1264
1257
|
},
|
|
1265
1258
|
emits: ["update"],
|
|
1266
|
-
setup(e, { emit:
|
|
1267
|
-
let
|
|
1268
|
-
|
|
1269
|
-
|
|
1259
|
+
setup(e, { emit: o }) {
|
|
1260
|
+
let l = e, h = o, { t: g } = L(), b = r(Se, []), x = r(me, !1), w = d(/* @__PURE__ */ new Set()), O = t(!1), k = t(""), j = t(""), ee = [
|
|
1261
|
+
{
|
|
1262
|
+
key: "desktop",
|
|
1263
|
+
icon: rt,
|
|
1264
|
+
labelKey: "showOnDesktop"
|
|
1265
|
+
},
|
|
1266
|
+
{
|
|
1267
|
+
key: "tablet",
|
|
1268
|
+
icon: ct,
|
|
1269
|
+
labelKey: "showOnTablet"
|
|
1270
|
+
},
|
|
1271
|
+
{
|
|
1272
|
+
key: "mobile",
|
|
1273
|
+
icon: at,
|
|
1274
|
+
labelKey: "showOnMobile"
|
|
1275
|
+
}
|
|
1276
|
+
];
|
|
1277
|
+
function M(e) {
|
|
1278
|
+
w.has(e) ? w.delete(e) : w.add(e);
|
|
1270
1279
|
}
|
|
1271
|
-
let
|
|
1272
|
-
function
|
|
1273
|
-
O.value = !0,
|
|
1280
|
+
let te = T(() => b.length > 0 || x), N = T(() => l.block.displayCondition ? !b.some((e) => e.label === l.block.displayCondition?.label) : !1);
|
|
1281
|
+
function ne() {
|
|
1282
|
+
O.value = !0, N.value && l.block.displayCondition ? (k.value = l.block.displayCondition.before, j.value = l.block.displayCondition.after ?? "") : (k.value = "", j.value = "");
|
|
1274
1283
|
}
|
|
1275
|
-
function
|
|
1276
|
-
k.value.trim() && (
|
|
1277
|
-
label:
|
|
1284
|
+
function P() {
|
|
1285
|
+
k.value.trim() && (h("update", { displayCondition: {
|
|
1286
|
+
label: g.blockSettings.customCondition,
|
|
1278
1287
|
before: k.value.trim(),
|
|
1279
|
-
after:
|
|
1280
|
-
} }), O.value = !1, k.value = "",
|
|
1288
|
+
after: j.value.trim()
|
|
1289
|
+
} }), O.value = !1, k.value = "", j.value = "");
|
|
1281
1290
|
}
|
|
1282
|
-
n(() =>
|
|
1291
|
+
n(() => l.block.displayCondition, (e) => {
|
|
1283
1292
|
if (!e) {
|
|
1284
|
-
O.value = !1, k.value = "",
|
|
1293
|
+
O.value = !1, k.value = "", j.value = "";
|
|
1285
1294
|
return;
|
|
1286
1295
|
}
|
|
1287
|
-
|
|
1296
|
+
N.value && (k.value = e.before, j.value = e.after ?? "");
|
|
1288
1297
|
}, { immediate: !0 });
|
|
1289
|
-
let
|
|
1298
|
+
let re = T(() => {
|
|
1290
1299
|
let e = {};
|
|
1291
|
-
for (let t of
|
|
1300
|
+
for (let t of b) {
|
|
1292
1301
|
let n = t.group ?? "";
|
|
1293
1302
|
e[n] || (e[n] = []), e[n].push(t);
|
|
1294
1303
|
}
|
|
1295
1304
|
return e;
|
|
1296
1305
|
});
|
|
1297
|
-
function
|
|
1298
|
-
|
|
1299
|
-
...
|
|
1306
|
+
function ie(e, t) {
|
|
1307
|
+
h("update", { styles: {
|
|
1308
|
+
...l.block.styles,
|
|
1300
1309
|
[e]: t
|
|
1301
1310
|
} });
|
|
1302
1311
|
}
|
|
1312
|
+
function F(e) {
|
|
1313
|
+
return l.block.visibility?.[e] !== !1;
|
|
1314
|
+
}
|
|
1315
|
+
function ae(e) {
|
|
1316
|
+
let t = {
|
|
1317
|
+
desktop: F("desktop"),
|
|
1318
|
+
tablet: F("tablet"),
|
|
1319
|
+
mobile: F("mobile")
|
|
1320
|
+
};
|
|
1321
|
+
t[e] = !t[e], h("update", { visibility: t });
|
|
1322
|
+
}
|
|
1303
1323
|
return (t, n) => (s(), f("div", { class: D(["tpl:flex tpl:flex-col", e.isFirstSection ? "" : "tpl:mt-4"]) }, [
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
"model-value"
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
"model-value"
|
|
1319
|
-
|
|
1320
|
-
},
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
"
|
|
1329
|
-
},
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
class: "tpl:accent-[var(--tpl-primary)]",
|
|
1347
|
-
checked: e.block.visibility?.desktop !== !1,
|
|
1348
|
-
onChange: n[6] ||= (t) => c("update", { visibility: {
|
|
1349
|
-
desktop: e.block.visibility?.desktop === !1,
|
|
1350
|
-
tablet: e.block.visibility?.tablet !== !1,
|
|
1351
|
-
mobile: e.block.visibility?.mobile !== !1
|
|
1352
|
-
} })
|
|
1353
|
-
}, null, 40, _i),
|
|
1354
|
-
m(p(rt), {
|
|
1355
|
-
size: 14,
|
|
1356
|
-
"stroke-width": 1.5
|
|
1357
|
-
}),
|
|
1358
|
-
j(" " + S(p(l).blockSettings.showOnDesktop), 1)
|
|
1359
|
-
]),
|
|
1360
|
-
C("label", vi, [
|
|
1361
|
-
C("input", {
|
|
1362
|
-
type: "checkbox",
|
|
1363
|
-
class: "tpl:accent-[var(--tpl-primary)]",
|
|
1364
|
-
checked: e.block.visibility?.tablet !== !1,
|
|
1365
|
-
onChange: n[7] ||= (t) => c("update", { visibility: {
|
|
1366
|
-
desktop: e.block.visibility?.desktop !== !1,
|
|
1367
|
-
tablet: e.block.visibility?.tablet === !1,
|
|
1368
|
-
mobile: e.block.visibility?.mobile !== !1
|
|
1369
|
-
} })
|
|
1370
|
-
}, null, 40, yi),
|
|
1371
|
-
m(p(st), {
|
|
1372
|
-
size: 14,
|
|
1373
|
-
"stroke-width": 1.5
|
|
1374
|
-
}),
|
|
1375
|
-
j(" " + S(p(l).blockSettings.showOnTablet), 1)
|
|
1376
|
-
]),
|
|
1377
|
-
C("label", bi, [
|
|
1324
|
+
m(X, {
|
|
1325
|
+
title: p(g).blockSettings.spacing,
|
|
1326
|
+
open: w.has("spacing"),
|
|
1327
|
+
"no-border": e.isFirstSection,
|
|
1328
|
+
onToggle: n[2] ||= (e) => M("spacing")
|
|
1329
|
+
}, {
|
|
1330
|
+
default: a(() => [m(oi, {
|
|
1331
|
+
label: p(g).blockSettings.padding,
|
|
1332
|
+
"model-value": e.block.styles.padding,
|
|
1333
|
+
"onUpdate:modelValue": n[0] ||= (e) => ie("padding", e)
|
|
1334
|
+
}, null, 8, ["label", "model-value"]), C("div", ci, [m(oi, {
|
|
1335
|
+
label: p(g).blockSettings.margin,
|
|
1336
|
+
"model-value": e.block.styles.margin,
|
|
1337
|
+
"onUpdate:modelValue": n[1] ||= (e) => ie("margin", e)
|
|
1338
|
+
}, null, 8, ["label", "model-value"])])]),
|
|
1339
|
+
_: 1
|
|
1340
|
+
}, 8, [
|
|
1341
|
+
"title",
|
|
1342
|
+
"open",
|
|
1343
|
+
"no-border"
|
|
1344
|
+
]),
|
|
1345
|
+
m(X, {
|
|
1346
|
+
title: p(g).blockSettings.background,
|
|
1347
|
+
open: w.has("bg"),
|
|
1348
|
+
onToggle: n[4] ||= (e) => M("bg")
|
|
1349
|
+
}, {
|
|
1350
|
+
default: a(() => [C("label", { class: D(p(V)) }, S(p(g).blockSettings.color), 3), m(q, {
|
|
1351
|
+
size: "large",
|
|
1352
|
+
"model-value": e.block.styles.backgroundColor || p("#ffffff"),
|
|
1353
|
+
"onUpdate:modelValue": n[3] ||= (e) => ie("backgroundColor", e)
|
|
1354
|
+
}, null, 8, ["model-value"])]),
|
|
1355
|
+
_: 1
|
|
1356
|
+
}, 8, ["title", "open"]),
|
|
1357
|
+
m(X, {
|
|
1358
|
+
title: p(g).blockSettings.display,
|
|
1359
|
+
open: w.has("display"),
|
|
1360
|
+
onToggle: n[5] ||= (e) => M("display")
|
|
1361
|
+
}, {
|
|
1362
|
+
default: a(() => [C("div", li, [(s(), f(_, null, i(ee, (e) => C("label", {
|
|
1363
|
+
key: e.key,
|
|
1364
|
+
class: "tpl:flex tpl:cursor-pointer tpl:items-center tpl:gap-2 tpl:text-xs tpl:text-[var(--tpl-text)]"
|
|
1365
|
+
}, [
|
|
1378
1366
|
C("input", {
|
|
1379
1367
|
type: "checkbox",
|
|
1380
1368
|
class: "tpl:accent-[var(--tpl-primary)]",
|
|
1381
|
-
checked: e.
|
|
1382
|
-
onChange:
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
mobile: e.block.visibility?.mobile === !1
|
|
1386
|
-
} })
|
|
1387
|
-
}, null, 40, xi),
|
|
1388
|
-
m(p(at), {
|
|
1369
|
+
checked: F(e.key),
|
|
1370
|
+
onChange: (t) => ae(e.key)
|
|
1371
|
+
}, null, 40, ui),
|
|
1372
|
+
(s(), y(c(e.icon), {
|
|
1389
1373
|
size: 14,
|
|
1390
1374
|
"stroke-width": 1.5
|
|
1391
|
-
}),
|
|
1392
|
-
|
|
1393
|
-
])
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
},
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1375
|
+
})),
|
|
1376
|
+
A(" " + S(p(g).blockSettings[e.labelKey]), 1)
|
|
1377
|
+
])), 64))])]),
|
|
1378
|
+
_: 1
|
|
1379
|
+
}, 8, ["title", "open"]),
|
|
1380
|
+
m(X, {
|
|
1381
|
+
title: p(g).blockSettings.customCss,
|
|
1382
|
+
open: w.has("css"),
|
|
1383
|
+
onToggle: n[7] ||= (e) => M("css")
|
|
1384
|
+
}, {
|
|
1385
|
+
default: a(() => [C("label", { class: D(p(V)) }, S(p(g).blockSettings.css), 3), C("textarea", {
|
|
1386
|
+
value: e.block.customCss || "",
|
|
1387
|
+
placeholder: p(g).blockSettings.cssPlaceholder,
|
|
1388
|
+
rows: "3",
|
|
1389
|
+
class: D(p(bt)),
|
|
1390
|
+
onInput: n[6] ||= (e) => h("update", { customCss: e.target.value })
|
|
1391
|
+
}, null, 42, di)]),
|
|
1392
|
+
_: 1
|
|
1393
|
+
}, 8, ["title", "open"]),
|
|
1394
|
+
te.value ? (s(), y(X, {
|
|
1395
|
+
key: 0,
|
|
1396
|
+
title: p(g).blockSettings.displayCondition,
|
|
1397
|
+
open: w.has("condition"),
|
|
1398
|
+
onToggle: n[11] ||= (e) => M("condition")
|
|
1399
|
+
}, {
|
|
1400
|
+
default: a(() => [C("div", fi, [C("select", {
|
|
1401
|
+
class: D(["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)]"]),
|
|
1402
|
+
value: O.value || N.value ? "__custom__" : e.block.displayCondition?.label ?? "",
|
|
1403
|
+
onChange: n[8] ||= (e) => {
|
|
1404
|
+
let t = e.target.value;
|
|
1405
|
+
if (t === "__custom__") {
|
|
1406
|
+
ne();
|
|
1407
|
+
return;
|
|
1408
|
+
}
|
|
1409
|
+
if (O.value = !1, !t) {
|
|
1410
|
+
h("update", { displayCondition: void 0 });
|
|
1411
|
+
return;
|
|
1412
|
+
}
|
|
1413
|
+
let n = p(b).find((e) => e.label === t);
|
|
1414
|
+
n && h("update", { displayCondition: n });
|
|
1430
1415
|
}
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
])) : e.block.displayCondition && !M.value ? (s(), f(_, { key: 1 }, [e.block.displayCondition.description ? (s(), f("p", Ri, S(e.block.displayCondition.description), 1)) : v("", !0), C("div", zi, [C("pre", Bi, S(e.block.displayCondition.before), 1), e.block.displayCondition.after ? (s(), f("pre", Vi, S(e.block.displayCondition.after), 1)) : v("", !0)])], 64)) : v("", !0)], 512), [[h, b.has("condition")]])])) : v("", !0)
|
|
1416
|
+
}, [
|
|
1417
|
+
C("option", mi, S(p(g).blockSettings.noCondition), 1),
|
|
1418
|
+
(s(!0), f(_, null, i(re.value, (e, t) => (s(), f(_, { key: t }, [t ? (s(), f("optgroup", {
|
|
1419
|
+
key: 0,
|
|
1420
|
+
label: String(t)
|
|
1421
|
+
}, [(s(!0), f(_, null, i(e, (e) => (s(), f("option", {
|
|
1422
|
+
key: e.label,
|
|
1423
|
+
value: e.label
|
|
1424
|
+
}, S(e.label), 9, gi))), 128))], 8, hi)) : (s(!0), f(_, { key: 1 }, i(e, (e) => (s(), f("option", {
|
|
1425
|
+
key: e.label,
|
|
1426
|
+
value: e.label
|
|
1427
|
+
}, S(e.label), 9, _i))), 128))], 64))), 128)),
|
|
1428
|
+
p(x) ? (s(), f("option", vi, S(p(g).blockSettings.customCondition), 1)) : v("", !0)
|
|
1429
|
+
], 42, pi), O.value || N.value ? (s(), f("div", yi, [
|
|
1430
|
+
C("div", null, [C("label", bi, S(p(g).blockSettings.customConditionBefore), 1), u(C("textarea", {
|
|
1431
|
+
"onUpdate:modelValue": n[9] ||= (e) => k.value = e,
|
|
1432
|
+
rows: "2",
|
|
1433
|
+
class: D(p(bt))
|
|
1434
|
+
}, null, 2), [[E, k.value]])]),
|
|
1435
|
+
C("div", null, [C("label", xi, S(p(g).blockSettings.customConditionAfter), 1), u(C("textarea", {
|
|
1436
|
+
"onUpdate:modelValue": n[10] ||= (e) => j.value = e,
|
|
1437
|
+
rows: "2",
|
|
1438
|
+
class: D(p(bt))
|
|
1439
|
+
}, null, 2), [[E, j.value]])]),
|
|
1440
|
+
C("div", Si, [C("button", {
|
|
1441
|
+
type: "button",
|
|
1442
|
+
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",
|
|
1443
|
+
disabled: !k.value.trim(),
|
|
1444
|
+
onClick: P
|
|
1445
|
+
}, S(p(g).blockSettings.applyCondition), 9, Ci)])
|
|
1446
|
+
])) : e.block.displayCondition && !N.value ? (s(), f(_, { key: 1 }, [e.block.displayCondition.description ? (s(), f("p", wi, S(e.block.displayCondition.description), 1)) : v("", !0), C("div", Ti, [C("pre", Ei, S(e.block.displayCondition.before), 1), e.block.displayCondition.after ? (s(), f("pre", Di, S(e.block.displayCondition.after), 1)) : v("", !0)])], 64)) : v("", !0)])]),
|
|
1447
|
+
_: 1
|
|
1448
|
+
}, 8, ["title", "open"])) : v("", !0)
|
|
1465
1449
|
], 2));
|
|
1466
1450
|
}
|
|
1467
|
-
}),
|
|
1451
|
+
}), ki = [
|
|
1468
1452
|
"aria-checked",
|
|
1469
1453
|
"aria-label",
|
|
1470
1454
|
"title",
|
|
1471
1455
|
"onClick"
|
|
1472
|
-
],
|
|
1456
|
+
], Ai = { key: 1 }, Z = /* @__PURE__ */ l({
|
|
1473
1457
|
__name: "SlidingPillSelect",
|
|
1474
1458
|
props: {
|
|
1475
1459
|
options: {},
|
|
@@ -1514,9 +1498,62 @@ var En = { key: 0 }, Dn = ["aria-label"], On = ["data-tooltip"], kn = ["data-too
|
|
|
1514
1498
|
key: 0,
|
|
1515
1499
|
size: 14,
|
|
1516
1500
|
"stroke-width": 2
|
|
1517
|
-
})) : (s(), f("span",
|
|
1501
|
+
})) : (s(), f("span", Ai, S(t.label), 1))], 12, ki))), 128))], 4));
|
|
1502
|
+
}
|
|
1503
|
+
}), ji = { class: "tpl:mb-3.5" }, Q = /* @__PURE__ */ l({
|
|
1504
|
+
__name: "FieldRow",
|
|
1505
|
+
props: { label: {} },
|
|
1506
|
+
setup(e) {
|
|
1507
|
+
return (t, n) => (s(), f("div", ji, [e.label ? (s(), f("label", {
|
|
1508
|
+
key: 0,
|
|
1509
|
+
class: D(p(V))
|
|
1510
|
+
}, S(e.label), 3)) : v("", !0), o(t.$slots, "default")]));
|
|
1511
|
+
}
|
|
1512
|
+
}), Mi = { class: "tpl:flex tpl:cursor-pointer tpl:items-center tpl:gap-2 tpl:text-[12px] tpl:text-[var(--tpl-text)]" }, Ni = ["checked"], Pi = /* @__PURE__ */ l({
|
|
1513
|
+
__name: "CheckboxItem",
|
|
1514
|
+
props: {
|
|
1515
|
+
modelValue: { type: Boolean },
|
|
1516
|
+
label: {}
|
|
1517
|
+
},
|
|
1518
|
+
emits: ["update:modelValue"],
|
|
1519
|
+
setup(e, { emit: t }) {
|
|
1520
|
+
let n = t;
|
|
1521
|
+
return (t, r) => (s(), f("label", Mi, [C("input", {
|
|
1522
|
+
type: "checkbox",
|
|
1523
|
+
class: "tpl:size-3.5 tpl:cursor-pointer tpl:accent-[var(--tpl-primary)]",
|
|
1524
|
+
checked: e.modelValue,
|
|
1525
|
+
onChange: r[0] ||= (e) => n("update:modelValue", e.target.checked)
|
|
1526
|
+
}, null, 40, Ni), A(" " + S(e.label), 1)]));
|
|
1527
|
+
}
|
|
1528
|
+
}), Fi = { class: "tpl:flex tpl:items-stretch" }, Ii = [
|
|
1529
|
+
"value",
|
|
1530
|
+
"min",
|
|
1531
|
+
"max"
|
|
1532
|
+
], Li = /* @__PURE__ */ l({
|
|
1533
|
+
__name: "NumberWithSuffix",
|
|
1534
|
+
props: {
|
|
1535
|
+
modelValue: {},
|
|
1536
|
+
min: {},
|
|
1537
|
+
max: {},
|
|
1538
|
+
suffix: {}
|
|
1539
|
+
},
|
|
1540
|
+
emits: ["update:modelValue"],
|
|
1541
|
+
setup(e, { emit: t }) {
|
|
1542
|
+
let n = t;
|
|
1543
|
+
return (t, r) => (s(), f("div", Fi, [C("input", {
|
|
1544
|
+
type: "number",
|
|
1545
|
+
class: D(p(U)),
|
|
1546
|
+
value: e.modelValue,
|
|
1547
|
+
min: e.min,
|
|
1548
|
+
max: e.max,
|
|
1549
|
+
onInput: r[0] ||= (e) => n("update:modelValue", Number(e.target.value))
|
|
1550
|
+
}, null, 42, Ii), C("span", { class: D(p(H)) }, S(e.suffix), 3)]));
|
|
1518
1551
|
}
|
|
1519
|
-
}),
|
|
1552
|
+
}), Ri = ["value"], zi = ["value"], Bi = ["value"], Vi = { class: "tpl:grid tpl:grid-cols-2 tpl:gap-2" }, Hi = ["value"], Ui = { value: "" }, Wi = ["value"], Gi = { class: "tpl:grid tpl:grid-cols-2 tpl:gap-3" }, Ki = { class: "tpl:grid tpl:grid-cols-2 tpl:gap-3" }, qi = { class: "tpl:grid tpl:grid-cols-2 tpl:gap-2" }, Ji = [
|
|
1553
|
+
"value",
|
|
1554
|
+
"placeholder",
|
|
1555
|
+
"onInput"
|
|
1556
|
+
], Yi = ["value", "placeholder"], Xi = ["value"], Zi = /* @__PURE__ */ l({
|
|
1520
1557
|
__name: "CountdownToolbar",
|
|
1521
1558
|
props: {
|
|
1522
1559
|
block: {},
|
|
@@ -1524,160 +1561,188 @@ var En = { key: 0 }, Dn = ["aria-label"], On = ["data-tooltip"], kn = ["data-too
|
|
|
1524
1561
|
},
|
|
1525
1562
|
emits: ["update"],
|
|
1526
1563
|
setup(e, { emit: t }) {
|
|
1527
|
-
let n = t, { t: r } =
|
|
1528
|
-
|
|
1564
|
+
let n = t, { t: r } = L(), o = [
|
|
1565
|
+
"UTC",
|
|
1566
|
+
"America/New_York",
|
|
1567
|
+
"America/Chicago",
|
|
1568
|
+
"America/Denver",
|
|
1569
|
+
"America/Los_Angeles",
|
|
1570
|
+
"Europe/London",
|
|
1571
|
+
"Europe/Berlin",
|
|
1572
|
+
"Europe/Paris",
|
|
1573
|
+
"Europe/Moscow",
|
|
1574
|
+
"Asia/Dubai",
|
|
1575
|
+
"Asia/Kolkata",
|
|
1576
|
+
"Asia/Shanghai",
|
|
1577
|
+
"Asia/Tokyo",
|
|
1578
|
+
"Australia/Sydney",
|
|
1579
|
+
"Pacific/Auckland"
|
|
1580
|
+
], c = [
|
|
1581
|
+
{
|
|
1582
|
+
value: ":",
|
|
1583
|
+
label: ":"
|
|
1584
|
+
},
|
|
1585
|
+
{
|
|
1586
|
+
value: "-",
|
|
1587
|
+
label: "-"
|
|
1588
|
+
},
|
|
1589
|
+
{
|
|
1590
|
+
value: " ",
|
|
1591
|
+
label: "␣"
|
|
1592
|
+
}
|
|
1593
|
+
], l = [
|
|
1594
|
+
"Days",
|
|
1595
|
+
"Hours",
|
|
1596
|
+
"Minutes",
|
|
1597
|
+
"Seconds"
|
|
1598
|
+
], u = T(() => l.map((e) => ({
|
|
1599
|
+
unit: e,
|
|
1600
|
+
showKey: `show${e}`,
|
|
1601
|
+
labelKey: `label${e}`,
|
|
1602
|
+
translationKey: e.toLowerCase()
|
|
1603
|
+
})));
|
|
1604
|
+
function d(e, t) {
|
|
1529
1605
|
n("update", { [e]: t });
|
|
1530
1606
|
}
|
|
1531
1607
|
return (t, n) => (s(), f(_, null, [
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
},
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
},
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
},
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
placeholder: p(r).countdown.days,
|
|
1627
|
-
onInput: n[13] ||= (e) => a("labelDays", e.target.value)
|
|
1628
|
-
}, null, 42, Ca),
|
|
1629
|
-
C("input", {
|
|
1630
|
-
type: "text",
|
|
1631
|
-
class: D(p(H)),
|
|
1632
|
-
value: e.block.labelHours,
|
|
1633
|
-
placeholder: p(r).countdown.hours,
|
|
1634
|
-
onInput: n[14] ||= (e) => a("labelHours", e.target.value)
|
|
1635
|
-
}, null, 42, wa),
|
|
1636
|
-
C("input", {
|
|
1608
|
+
m(Q, { label: p(r).countdown.targetDate }, {
|
|
1609
|
+
default: a(() => [C("input", {
|
|
1610
|
+
type: "datetime-local",
|
|
1611
|
+
class: D(p(B)),
|
|
1612
|
+
value: e.block.targetDate,
|
|
1613
|
+
onInput: n[0] ||= (e) => d("targetDate", e.target.value)
|
|
1614
|
+
}, null, 42, Ri)]),
|
|
1615
|
+
_: 1
|
|
1616
|
+
}, 8, ["label"]),
|
|
1617
|
+
m(Q, { label: p(r).countdown.timezone }, {
|
|
1618
|
+
default: a(() => [C("select", {
|
|
1619
|
+
class: D(p(B)),
|
|
1620
|
+
value: e.block.timezone,
|
|
1621
|
+
onChange: n[1] ||= (e) => d("timezone", e.target.value)
|
|
1622
|
+
}, [(s(), f(_, null, i(o, (e) => C("option", {
|
|
1623
|
+
key: e,
|
|
1624
|
+
value: e
|
|
1625
|
+
}, S(e), 9, Bi)), 64))], 42, zi)]),
|
|
1626
|
+
_: 1
|
|
1627
|
+
}, 8, ["label"]),
|
|
1628
|
+
m(Q, { label: p(r).countdown.display }, {
|
|
1629
|
+
default: a(() => [C("div", Vi, [(s(!0), f(_, null, i(u.value, (t) => (s(), y(Pi, {
|
|
1630
|
+
key: t.unit,
|
|
1631
|
+
"model-value": e.block[t.showKey],
|
|
1632
|
+
label: p(r).countdown[t.translationKey],
|
|
1633
|
+
"onUpdate:modelValue": (e) => d(t.showKey, e)
|
|
1634
|
+
}, null, 8, [
|
|
1635
|
+
"model-value",
|
|
1636
|
+
"label",
|
|
1637
|
+
"onUpdate:modelValue"
|
|
1638
|
+
]))), 128))])]),
|
|
1639
|
+
_: 1
|
|
1640
|
+
}, 8, ["label"]),
|
|
1641
|
+
m(Q, { label: p(r).countdown.separator }, {
|
|
1642
|
+
default: a(() => [m(Z, {
|
|
1643
|
+
options: c,
|
|
1644
|
+
"model-value": e.block.separator,
|
|
1645
|
+
"onUpdate:modelValue": n[2] ||= (e) => d("separator", e)
|
|
1646
|
+
}, null, 8, ["model-value"])]),
|
|
1647
|
+
_: 1
|
|
1648
|
+
}, 8, ["label"]),
|
|
1649
|
+
m(Q, { label: p(r).countdown.fontFamily }, {
|
|
1650
|
+
default: a(() => [C("select", {
|
|
1651
|
+
class: D(p(B)),
|
|
1652
|
+
value: e.block.fontFamily || "",
|
|
1653
|
+
onChange: n[3] ||= (e) => d("fontFamily", e.target.value || void 0)
|
|
1654
|
+
}, [C("option", Ui, S(p(r).countdown.inheritFont), 1), (s(!0), f(_, null, i(e.fontFamilies, (e) => (s(), f("option", {
|
|
1655
|
+
key: e.value,
|
|
1656
|
+
value: e.value
|
|
1657
|
+
}, S(e.label), 9, Wi))), 128))], 42, Hi)]),
|
|
1658
|
+
_: 1
|
|
1659
|
+
}, 8, ["label"]),
|
|
1660
|
+
C("div", Gi, [m(Q, { label: p(r).countdown.digitFontSize }, {
|
|
1661
|
+
default: a(() => [m(Li, {
|
|
1662
|
+
"model-value": e.block.digitFontSize,
|
|
1663
|
+
min: 12,
|
|
1664
|
+
max: 72,
|
|
1665
|
+
suffix: "px",
|
|
1666
|
+
"onUpdate:modelValue": n[4] ||= (e) => d("digitFontSize", e)
|
|
1667
|
+
}, null, 8, ["model-value"])]),
|
|
1668
|
+
_: 1
|
|
1669
|
+
}, 8, ["label"]), m(Q, { label: p(r).countdown.labelFontSize }, {
|
|
1670
|
+
default: a(() => [m(Li, {
|
|
1671
|
+
"model-value": e.block.labelFontSize,
|
|
1672
|
+
min: 8,
|
|
1673
|
+
max: 24,
|
|
1674
|
+
suffix: "px",
|
|
1675
|
+
"onUpdate:modelValue": n[5] ||= (e) => d("labelFontSize", e)
|
|
1676
|
+
}, null, 8, ["model-value"])]),
|
|
1677
|
+
_: 1
|
|
1678
|
+
}, 8, ["label"])]),
|
|
1679
|
+
C("div", Ki, [m(Q, { label: p(r).countdown.digitColor }, {
|
|
1680
|
+
default: a(() => [m(q, {
|
|
1681
|
+
"model-value": e.block.digitColor,
|
|
1682
|
+
"onUpdate:modelValue": n[6] ||= (e) => d("digitColor", e)
|
|
1683
|
+
}, null, 8, ["model-value"])]),
|
|
1684
|
+
_: 1
|
|
1685
|
+
}, 8, ["label"]), m(Q, { label: p(r).countdown.labelColor }, {
|
|
1686
|
+
default: a(() => [m(q, {
|
|
1687
|
+
"model-value": e.block.labelColor,
|
|
1688
|
+
"onUpdate:modelValue": n[7] ||= (e) => d("labelColor", e)
|
|
1689
|
+
}, null, 8, ["model-value"])]),
|
|
1690
|
+
_: 1
|
|
1691
|
+
}, 8, ["label"])]),
|
|
1692
|
+
m(Q, { label: p(r).countdown.background }, {
|
|
1693
|
+
default: a(() => [m(q, {
|
|
1694
|
+
"model-value": e.block.backgroundColor,
|
|
1695
|
+
"onUpdate:modelValue": n[8] ||= (e) => d("backgroundColor", e)
|
|
1696
|
+
}, null, 8, ["model-value"])]),
|
|
1697
|
+
_: 1
|
|
1698
|
+
}, 8, ["label"]),
|
|
1699
|
+
m(Q, { label: p(r).countdown.labels }, {
|
|
1700
|
+
default: a(() => [C("div", qi, [(s(!0), f(_, null, i(u.value, (t) => (s(), f("input", {
|
|
1701
|
+
key: t.unit,
|
|
1637
1702
|
type: "text",
|
|
1638
|
-
class: D(p(
|
|
1639
|
-
value: e.block.
|
|
1640
|
-
placeholder: p(r).countdown.
|
|
1641
|
-
onInput:
|
|
1642
|
-
}, null, 42,
|
|
1643
|
-
|
|
1703
|
+
class: D(p(B)),
|
|
1704
|
+
value: e.block[t.labelKey],
|
|
1705
|
+
placeholder: p(r).countdown[t.translationKey],
|
|
1706
|
+
onInput: (e) => d(t.labelKey, e.target.value)
|
|
1707
|
+
}, null, 42, Ji))), 128))])]),
|
|
1708
|
+
_: 1
|
|
1709
|
+
}, 8, ["label"]),
|
|
1710
|
+
m(Q, { label: p(r).countdown.expiry }, {
|
|
1711
|
+
default: a(() => [C("input", {
|
|
1644
1712
|
type: "text",
|
|
1645
|
-
class: D(p(
|
|
1646
|
-
value: e.block.
|
|
1647
|
-
placeholder: p(r).countdown.
|
|
1648
|
-
onInput: n[
|
|
1649
|
-
}, null, 42,
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
checked: e.block.hideOnExpiry,
|
|
1669
|
-
onChange: n[19] ||= (e) => a("hideOnExpiry", e.target.checked)
|
|
1670
|
-
}, null, 40, Ma), j(" " + S(p(r).countdown.hideOnExpiry), 1)])
|
|
1713
|
+
class: D(p(B)),
|
|
1714
|
+
value: e.block.expiredMessage,
|
|
1715
|
+
placeholder: p(r).countdown.expiredMessagePlaceholder,
|
|
1716
|
+
onInput: n[9] ||= (e) => d("expiredMessage", e.target.value)
|
|
1717
|
+
}, null, 42, Yi)]),
|
|
1718
|
+
_: 1
|
|
1719
|
+
}, 8, ["label"]),
|
|
1720
|
+
m(Q, { label: p(r).countdown.expiredImageUrl }, {
|
|
1721
|
+
default: a(() => [C("input", {
|
|
1722
|
+
type: "url",
|
|
1723
|
+
class: D(p(B)),
|
|
1724
|
+
value: e.block.expiredImageUrl,
|
|
1725
|
+
placeholder: "https://...",
|
|
1726
|
+
onInput: n[10] ||= (e) => d("expiredImageUrl", e.target.value)
|
|
1727
|
+
}, null, 42, Xi)]),
|
|
1728
|
+
_: 1
|
|
1729
|
+
}, 8, ["label"]),
|
|
1730
|
+
m(Pi, {
|
|
1731
|
+
"model-value": e.block.hideOnExpiry,
|
|
1732
|
+
label: p(r).countdown.hideOnExpiry,
|
|
1733
|
+
class: "tpl:mb-3.5",
|
|
1734
|
+
"onUpdate:modelValue": n[11] ||= (e) => d("hideOnExpiry", e)
|
|
1735
|
+
}, null, 8, ["model-value", "label"])
|
|
1671
1736
|
], 64));
|
|
1672
1737
|
}
|
|
1673
|
-
}),
|
|
1738
|
+
}), Qi = ["title"], $i = { class: "tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-text-muted)]" }, ea = {
|
|
1674
1739
|
key: 1,
|
|
1675
1740
|
class: "tpl:text-[var(--tpl-danger)]"
|
|
1676
|
-
},
|
|
1741
|
+
}, ta = [
|
|
1677
1742
|
"aria-checked",
|
|
1678
1743
|
"aria-label",
|
|
1679
1744
|
"disabled"
|
|
1680
|
-
],
|
|
1745
|
+
], na = /* @__PURE__ */ l({
|
|
1681
1746
|
__name: "BooleanField",
|
|
1682
1747
|
props: {
|
|
1683
1748
|
field: {},
|
|
@@ -1686,18 +1751,18 @@ var En = { key: 0 }, Dn = ["aria-label"], On = ["data-tooltip"], kn = ["data-too
|
|
|
1686
1751
|
},
|
|
1687
1752
|
emits: ["update:modelValue"],
|
|
1688
1753
|
setup(e, { emit: t }) {
|
|
1689
|
-
let n = t, { t: r } =
|
|
1754
|
+
let n = t, { t: r } = L();
|
|
1690
1755
|
return (t, i) => (s(), f("div", {
|
|
1691
1756
|
class: "tpl:mb-3.5",
|
|
1692
1757
|
title: e.readOnly ? p(r).customBlocks.dataSource.readOnlyTooltip : void 0
|
|
1693
|
-
}, [C("label", { class: D(["tpl:flex tpl:items-center tpl:justify-between tpl:gap-2", e.readOnly ? "tpl:cursor-not-allowed" : "tpl:cursor-pointer"]) }, [C("span",
|
|
1694
|
-
|
|
1758
|
+
}, [C("label", { class: D(["tpl:flex tpl:items-center tpl:justify-between tpl:gap-2", e.readOnly ? "tpl:cursor-not-allowed" : "tpl:cursor-pointer"]) }, [C("span", $i, [
|
|
1759
|
+
A(S(e.field.label) + " ", 1),
|
|
1695
1760
|
e.readOnly ? (s(), y(p(et), {
|
|
1696
1761
|
key: 0,
|
|
1697
1762
|
size: 12,
|
|
1698
1763
|
class: "tpl:inline tpl:text-[var(--tpl-text-dim)]"
|
|
1699
1764
|
})) : v("", !0),
|
|
1700
|
-
e.field.required ? (s(), f("span",
|
|
1765
|
+
e.field.required ? (s(), f("span", ea, " * ")) : v("", !0)
|
|
1701
1766
|
]), C("button", {
|
|
1702
1767
|
type: "button",
|
|
1703
1768
|
role: "switch",
|
|
@@ -1710,9 +1775,9 @@ var En = { key: 0 }, Dn = ["aria-label"], On = ["data-tooltip"], kn = ["data-too
|
|
|
1710
1775
|
]),
|
|
1711
1776
|
disabled: e.readOnly,
|
|
1712
1777
|
onClick: i[0] ||= (t) => !e.readOnly && n("update:modelValue", !e.modelValue)
|
|
1713
|
-
}, [C("span", { class: D(["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,
|
|
1778
|
+
}, [C("span", { class: D(["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, ta)], 2)], 8, Qi));
|
|
1714
1779
|
}
|
|
1715
|
-
}),
|
|
1780
|
+
}), ra = { class: "tpl:mb-3.5" }, ia = {
|
|
1716
1781
|
key: 1,
|
|
1717
1782
|
class: "tpl:text-[var(--tpl-danger)]"
|
|
1718
1783
|
}, $ = /* @__PURE__ */ l({
|
|
@@ -1723,17 +1788,17 @@ var En = { key: 0 }, Dn = ["aria-label"], On = ["data-tooltip"], kn = ["data-too
|
|
|
1723
1788
|
readOnly: { type: Boolean }
|
|
1724
1789
|
},
|
|
1725
1790
|
setup(e) {
|
|
1726
|
-
return (t, n) => (s(), f("div",
|
|
1727
|
-
|
|
1791
|
+
return (t, n) => (s(), f("div", ra, [C("label", { class: D(p(V)) }, [
|
|
1792
|
+
A(S(e.label) + " ", 1),
|
|
1728
1793
|
e.readOnly ? (s(), y(p(et), {
|
|
1729
1794
|
key: 0,
|
|
1730
1795
|
size: 12,
|
|
1731
1796
|
class: "tpl:inline tpl:text-[var(--tpl-text-dim)]"
|
|
1732
1797
|
})) : v("", !0),
|
|
1733
|
-
e.required ? (s(), f("span",
|
|
1798
|
+
e.required ? (s(), f("span", ia, "*")) : v("", !0)
|
|
1734
1799
|
], 2), o(t.$slots, "default")]));
|
|
1735
1800
|
}
|
|
1736
|
-
}),
|
|
1801
|
+
}), aa = /* @__PURE__ */ l({
|
|
1737
1802
|
__name: "ColorField",
|
|
1738
1803
|
props: {
|
|
1739
1804
|
field: {},
|
|
@@ -1742,13 +1807,13 @@ var En = { key: 0 }, Dn = ["aria-label"], On = ["data-tooltip"], kn = ["data-too
|
|
|
1742
1807
|
},
|
|
1743
1808
|
emits: ["update:modelValue"],
|
|
1744
1809
|
setup(e, { emit: t }) {
|
|
1745
|
-
let n = t, { t: r } =
|
|
1810
|
+
let n = t, { t: r } = L();
|
|
1746
1811
|
return (t, i) => (s(), y($, {
|
|
1747
1812
|
label: e.field.label,
|
|
1748
1813
|
required: e.field.required,
|
|
1749
1814
|
"read-only": e.readOnly
|
|
1750
1815
|
}, {
|
|
1751
|
-
default: a(() => [m(
|
|
1816
|
+
default: a(() => [m(q, {
|
|
1752
1817
|
"model-value": e.modelValue || p("#000000"),
|
|
1753
1818
|
placeholder: e.field.placeholder || p("#000000"),
|
|
1754
1819
|
disabled: e.readOnly,
|
|
@@ -1767,11 +1832,11 @@ var En = { key: 0 }, Dn = ["aria-label"], On = ["data-tooltip"], kn = ["data-too
|
|
|
1767
1832
|
"read-only"
|
|
1768
1833
|
]));
|
|
1769
1834
|
}
|
|
1770
|
-
}),
|
|
1835
|
+
}), oa = [
|
|
1771
1836
|
"value",
|
|
1772
1837
|
"placeholder",
|
|
1773
1838
|
"title"
|
|
1774
|
-
],
|
|
1839
|
+
], sa = ["value", "placeholder"], ca = /* @__PURE__ */ l({
|
|
1775
1840
|
__name: "ImageField",
|
|
1776
1841
|
props: {
|
|
1777
1842
|
field: {},
|
|
@@ -1780,7 +1845,7 @@ var En = { key: 0 }, Dn = ["aria-label"], On = ["data-tooltip"], kn = ["data-too
|
|
|
1780
1845
|
},
|
|
1781
1846
|
emits: ["update:modelValue"],
|
|
1782
1847
|
setup(e, { emit: t }) {
|
|
1783
|
-
let n = t, { t: i } =
|
|
1848
|
+
let n = t, { t: i } = L(), o = r(F, null), c = T(() => !!o);
|
|
1784
1849
|
async function l() {
|
|
1785
1850
|
let e = await o?.({ accept: ["images"] });
|
|
1786
1851
|
e && n("update:modelValue", e.url);
|
|
@@ -1793,26 +1858,26 @@ var En = { key: 0 }, Dn = ["aria-label"], On = ["data-tooltip"], kn = ["data-too
|
|
|
1793
1858
|
default: a(() => [e.readOnly ? (s(), f("input", {
|
|
1794
1859
|
key: 0,
|
|
1795
1860
|
type: "url",
|
|
1796
|
-
class: D([p(
|
|
1861
|
+
class: D([p(B), "tpl:opacity-60 tpl:cursor-not-allowed"]),
|
|
1797
1862
|
value: e.modelValue,
|
|
1798
1863
|
placeholder: e.field.placeholder || "https://...",
|
|
1799
1864
|
disabled: "",
|
|
1800
1865
|
title: p(i).customBlocks.dataSource.readOnlyTooltip
|
|
1801
|
-
}, null, 10,
|
|
1866
|
+
}, null, 10, oa)) : (s(), f("input", {
|
|
1802
1867
|
key: 1,
|
|
1803
1868
|
type: "url",
|
|
1804
|
-
class: D(p(
|
|
1869
|
+
class: D(p(B)),
|
|
1805
1870
|
value: e.modelValue,
|
|
1806
1871
|
placeholder: e.field.placeholder || "https://...",
|
|
1807
1872
|
onInput: r[0] ||= (e) => n("update:modelValue", e.target.value)
|
|
1808
|
-
}, null, 42,
|
|
1873
|
+
}, null, 42, sa)), c.value && !e.readOnly ? (s(), f("button", {
|
|
1809
1874
|
key: 2,
|
|
1810
1875
|
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)]",
|
|
1811
1876
|
onClick: r[1] ||= (e) => l()
|
|
1812
1877
|
}, [m(p(Le), {
|
|
1813
1878
|
size: 14,
|
|
1814
1879
|
"stroke-width": 1.5
|
|
1815
|
-
}),
|
|
1880
|
+
}), A(" " + S(p(i).image.browseMedia), 1)])) : v("", !0)]),
|
|
1816
1881
|
_: 1
|
|
1817
1882
|
}, 8, [
|
|
1818
1883
|
"label",
|
|
@@ -1820,7 +1885,7 @@ var En = { key: 0 }, Dn = ["aria-label"], On = ["data-tooltip"], kn = ["data-too
|
|
|
1820
1885
|
"read-only"
|
|
1821
1886
|
]));
|
|
1822
1887
|
}
|
|
1823
|
-
}),
|
|
1888
|
+
}), la = [
|
|
1824
1889
|
"value",
|
|
1825
1890
|
"placeholder",
|
|
1826
1891
|
"min",
|
|
@@ -1828,7 +1893,7 @@ var En = { key: 0 }, Dn = ["aria-label"], On = ["data-tooltip"], kn = ["data-too
|
|
|
1828
1893
|
"step",
|
|
1829
1894
|
"disabled",
|
|
1830
1895
|
"title"
|
|
1831
|
-
],
|
|
1896
|
+
], ua = /* @__PURE__ */ l({
|
|
1832
1897
|
__name: "NumberField",
|
|
1833
1898
|
props: {
|
|
1834
1899
|
field: {},
|
|
@@ -1837,7 +1902,7 @@ var En = { key: 0 }, Dn = ["aria-label"], On = ["data-tooltip"], kn = ["data-too
|
|
|
1837
1902
|
},
|
|
1838
1903
|
emits: ["update:modelValue"],
|
|
1839
1904
|
setup(e, { emit: t }) {
|
|
1840
|
-
let n = t, { t: r } =
|
|
1905
|
+
let n = t, { t: r } = L();
|
|
1841
1906
|
return (t, i) => (s(), y($, {
|
|
1842
1907
|
label: e.field.label,
|
|
1843
1908
|
required: e.field.required,
|
|
@@ -1845,7 +1910,7 @@ var En = { key: 0 }, Dn = ["aria-label"], On = ["data-tooltip"], kn = ["data-too
|
|
|
1845
1910
|
}, {
|
|
1846
1911
|
default: a(() => [C("input", {
|
|
1847
1912
|
type: "number",
|
|
1848
|
-
class: D([p(
|
|
1913
|
+
class: D([p(B), e.readOnly && "tpl:opacity-60 tpl:cursor-not-allowed"]),
|
|
1849
1914
|
value: e.modelValue,
|
|
1850
1915
|
placeholder: e.field.placeholder,
|
|
1851
1916
|
min: e.field.min,
|
|
@@ -1854,7 +1919,7 @@ var En = { key: 0 }, Dn = ["aria-label"], On = ["data-tooltip"], kn = ["data-too
|
|
|
1854
1919
|
disabled: e.readOnly,
|
|
1855
1920
|
title: e.readOnly ? p(r).customBlocks.dataSource.readOnlyTooltip : void 0,
|
|
1856
1921
|
onInput: i[0] ||= (t) => !e.readOnly && n("update:modelValue", Number(t.target.value))
|
|
1857
|
-
}, null, 42,
|
|
1922
|
+
}, null, 42, la)]),
|
|
1858
1923
|
_: 1
|
|
1859
1924
|
}, 8, [
|
|
1860
1925
|
"label",
|
|
@@ -1862,10 +1927,10 @@ var En = { key: 0 }, Dn = ["aria-label"], On = ["data-tooltip"], kn = ["data-too
|
|
|
1862
1927
|
"read-only"
|
|
1863
1928
|
]));
|
|
1864
1929
|
}
|
|
1865
|
-
}),
|
|
1930
|
+
}), da = { class: "tpl:flex tpl:flex-col tpl:gap-2" }, fa = { class: "tpl:mb-2 tpl:flex tpl:items-center tpl:justify-between" }, pa = { class: "tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-dim)]" }, ma = ["title", "onClick"], ha = {
|
|
1866
1931
|
key: 1,
|
|
1867
1932
|
class: "tpl:m-0 tpl:text-center tpl:text-xs tpl:text-[var(--tpl-text-dim)]"
|
|
1868
|
-
},
|
|
1933
|
+
}, ga = /* @__PURE__ */ l({
|
|
1869
1934
|
__name: "RepeatableField",
|
|
1870
1935
|
props: {
|
|
1871
1936
|
field: {},
|
|
@@ -1874,7 +1939,7 @@ var En = { key: 0 }, Dn = ["aria-label"], On = ["data-tooltip"], kn = ["data-too
|
|
|
1874
1939
|
},
|
|
1875
1940
|
emits: ["update:modelValue"],
|
|
1876
1941
|
setup(e, { emit: t }) {
|
|
1877
|
-
let n = e, r = t, { t: o } =
|
|
1942
|
+
let n = e, r = t, { t: o } = L(), l = T(() => n.modelValue || []), u = T(() => !n.field.maxItems || l.value.length < n.field.maxItems), d = T(() => !n.field.minItems || l.value.length > n.field.minItems);
|
|
1878
1943
|
function h() {
|
|
1879
1944
|
if (!u.value || n.readOnly) return;
|
|
1880
1945
|
let e = {};
|
|
@@ -1897,11 +1962,11 @@ var En = { key: 0 }, Dn = ["aria-label"], On = ["data-tooltip"], kn = ["data-too
|
|
|
1897
1962
|
required: e.field.required,
|
|
1898
1963
|
"read-only": e.readOnly
|
|
1899
1964
|
}, {
|
|
1900
|
-
default: a(() => [C("div",
|
|
1965
|
+
default: a(() => [C("div", da, [
|
|
1901
1966
|
(s(!0), f(_, null, i(l.value, (t, n) => (s(), f("div", {
|
|
1902
1967
|
key: `${e.field.key}-${n}`,
|
|
1903
1968
|
class: "tpl:rounded-md tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-hover)] tpl:p-3"
|
|
1904
|
-
}, [C("div",
|
|
1969
|
+
}, [C("div", fa, [C("span", pa, " #" + S(n + 1), 1), d.value && !e.readOnly ? (s(), f("button", {
|
|
1905
1970
|
key: 0,
|
|
1906
1971
|
type: "button",
|
|
1907
1972
|
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)]",
|
|
@@ -1910,7 +1975,7 @@ var En = { key: 0 }, Dn = ["aria-label"], On = ["data-tooltip"], kn = ["data-too
|
|
|
1910
1975
|
}, [m(p(Ge), {
|
|
1911
1976
|
size: 12,
|
|
1912
1977
|
"stroke-width": 2
|
|
1913
|
-
})], 8,
|
|
1978
|
+
})], 8, ma)) : v("", !0)]), (s(!0), f(_, null, i(e.field.fields, (r) => (s(), y(c(p(Ta)(r.type)), {
|
|
1914
1979
|
key: r.key,
|
|
1915
1980
|
field: r,
|
|
1916
1981
|
"model-value": t[r.key],
|
|
@@ -1925,13 +1990,13 @@ var En = { key: 0 }, Dn = ["aria-label"], On = ["data-tooltip"], kn = ["data-too
|
|
|
1925
1990
|
u.value && !e.readOnly ? (s(), f("button", {
|
|
1926
1991
|
key: 0,
|
|
1927
1992
|
type: "button",
|
|
1928
|
-
class:
|
|
1993
|
+
class: D(p(yt)),
|
|
1929
1994
|
onClick: h
|
|
1930
|
-
}, [m(p(
|
|
1995
|
+
}, [m(p(z), {
|
|
1931
1996
|
size: 14,
|
|
1932
1997
|
"stroke-width": 2
|
|
1933
|
-
}),
|
|
1934
|
-
!u.value && !e.readOnly ? (s(), f("p",
|
|
1998
|
+
}), A(" " + S(p(o).customBlocks.fields.addItem), 1)], 2)) : v("", !0),
|
|
1999
|
+
!u.value && !e.readOnly ? (s(), f("p", ha, S(p(o).customBlocks.fields.maxItemsReached), 1)) : v("", !0)
|
|
1935
2000
|
])]),
|
|
1936
2001
|
_: 1
|
|
1937
2002
|
}, 8, [
|
|
@@ -1940,11 +2005,11 @@ var En = { key: 0 }, Dn = ["aria-label"], On = ["data-tooltip"], kn = ["data-too
|
|
|
1940
2005
|
"read-only"
|
|
1941
2006
|
]));
|
|
1942
2007
|
}
|
|
1943
|
-
}),
|
|
2008
|
+
}), _a = [
|
|
1944
2009
|
"value",
|
|
1945
2010
|
"disabled",
|
|
1946
2011
|
"title"
|
|
1947
|
-
],
|
|
2012
|
+
], va = ["value"], ya = /* @__PURE__ */ l({
|
|
1948
2013
|
__name: "SelectField",
|
|
1949
2014
|
props: {
|
|
1950
2015
|
field: {},
|
|
@@ -1953,14 +2018,14 @@ var En = { key: 0 }, Dn = ["aria-label"], On = ["data-tooltip"], kn = ["data-too
|
|
|
1953
2018
|
},
|
|
1954
2019
|
emits: ["update:modelValue"],
|
|
1955
2020
|
setup(e, { emit: t }) {
|
|
1956
|
-
let n = t, { t: r } =
|
|
2021
|
+
let n = t, { t: r } = L();
|
|
1957
2022
|
return (t, o) => (s(), y($, {
|
|
1958
2023
|
label: e.field.label,
|
|
1959
2024
|
required: e.field.required,
|
|
1960
2025
|
"read-only": e.readOnly
|
|
1961
2026
|
}, {
|
|
1962
2027
|
default: a(() => [C("select", {
|
|
1963
|
-
class: D([p(
|
|
2028
|
+
class: D([p(B), e.readOnly && "tpl:opacity-60 tpl:cursor-not-allowed"]),
|
|
1964
2029
|
value: e.modelValue,
|
|
1965
2030
|
disabled: e.readOnly,
|
|
1966
2031
|
title: e.readOnly ? p(r).customBlocks.dataSource.readOnlyTooltip : void 0,
|
|
@@ -1968,7 +2033,7 @@ var En = { key: 0 }, Dn = ["aria-label"], On = ["data-tooltip"], kn = ["data-too
|
|
|
1968
2033
|
}, [(s(!0), f(_, null, i(e.field.options, (e) => (s(), f("option", {
|
|
1969
2034
|
key: e.value,
|
|
1970
2035
|
value: e.value
|
|
1971
|
-
}, S(e.label), 9,
|
|
2036
|
+
}, S(e.label), 9, va))), 128))], 42, _a)]),
|
|
1972
2037
|
_: 1
|
|
1973
2038
|
}, 8, [
|
|
1974
2039
|
"label",
|
|
@@ -1976,11 +2041,11 @@ var En = { key: 0 }, Dn = ["aria-label"], On = ["data-tooltip"], kn = ["data-too
|
|
|
1976
2041
|
"read-only"
|
|
1977
2042
|
]));
|
|
1978
2043
|
}
|
|
1979
|
-
}),
|
|
2044
|
+
}), ba = [
|
|
1980
2045
|
"value",
|
|
1981
2046
|
"placeholder",
|
|
1982
2047
|
"title"
|
|
1983
|
-
],
|
|
2048
|
+
], xa = /* @__PURE__ */ l({
|
|
1984
2049
|
__name: "TextField",
|
|
1985
2050
|
props: {
|
|
1986
2051
|
field: {},
|
|
@@ -1989,7 +2054,7 @@ var En = { key: 0 }, Dn = ["aria-label"], On = ["data-tooltip"], kn = ["data-too
|
|
|
1989
2054
|
},
|
|
1990
2055
|
emits: ["update:modelValue"],
|
|
1991
2056
|
setup(e, { emit: t }) {
|
|
1992
|
-
let n = t, { t: r } =
|
|
2057
|
+
let n = t, { t: r } = L();
|
|
1993
2058
|
return (t, i) => (s(), y($, {
|
|
1994
2059
|
label: e.field.label,
|
|
1995
2060
|
required: e.field.required,
|
|
@@ -1998,12 +2063,12 @@ var En = { key: 0 }, Dn = ["aria-label"], On = ["data-tooltip"], kn = ["data-too
|
|
|
1998
2063
|
default: a(() => [e.readOnly ? (s(), f("input", {
|
|
1999
2064
|
key: 0,
|
|
2000
2065
|
type: "text",
|
|
2001
|
-
class: D([p(
|
|
2066
|
+
class: D([p(B), "tpl:opacity-60 tpl:cursor-not-allowed"]),
|
|
2002
2067
|
value: e.modelValue,
|
|
2003
2068
|
placeholder: e.field.placeholder,
|
|
2004
2069
|
disabled: "",
|
|
2005
2070
|
title: p(r).customBlocks.dataSource.readOnlyTooltip
|
|
2006
|
-
}, null, 10,
|
|
2071
|
+
}, null, 10, ba)) : (s(), y(J, {
|
|
2007
2072
|
key: 1,
|
|
2008
2073
|
"model-value": e.modelValue,
|
|
2009
2074
|
placeholder: e.field.placeholder,
|
|
@@ -2016,12 +2081,12 @@ var En = { key: 0 }, Dn = ["aria-label"], On = ["data-tooltip"], kn = ["data-too
|
|
|
2016
2081
|
"read-only"
|
|
2017
2082
|
]));
|
|
2018
2083
|
}
|
|
2019
|
-
}),
|
|
2084
|
+
}), Sa = [
|
|
2020
2085
|
"value",
|
|
2021
2086
|
"placeholder",
|
|
2022
2087
|
"title"
|
|
2023
|
-
],
|
|
2024
|
-
text:
|
|
2088
|
+
], Ca = "tpl:w-full tpl:resize-y tpl:rounded-md tpl:border 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:opacity-60 tpl:cursor-not-allowed", wa = {
|
|
2089
|
+
text: xa,
|
|
2025
2090
|
textarea: /* @__PURE__ */ l({
|
|
2026
2091
|
__name: "TextareaField",
|
|
2027
2092
|
props: {
|
|
@@ -2031,7 +2096,7 @@ var En = { key: 0 }, Dn = ["aria-label"], On = ["data-tooltip"], kn = ["data-too
|
|
|
2031
2096
|
},
|
|
2032
2097
|
emits: ["update:modelValue"],
|
|
2033
2098
|
setup(e, { emit: t }) {
|
|
2034
|
-
let n = t, { t: r } =
|
|
2099
|
+
let n = t, { t: r } = L();
|
|
2035
2100
|
return (t, i) => (s(), y($, {
|
|
2036
2101
|
label: e.field.label,
|
|
2037
2102
|
required: e.field.required,
|
|
@@ -2044,8 +2109,8 @@ var En = { key: 0 }, Dn = ["aria-label"], On = ["data-tooltip"], kn = ["data-too
|
|
|
2044
2109
|
rows: "3",
|
|
2045
2110
|
disabled: "",
|
|
2046
2111
|
title: p(r).customBlocks.dataSource.readOnlyTooltip,
|
|
2047
|
-
class: D(
|
|
2048
|
-
}, null, 8,
|
|
2112
|
+
class: D(Ca)
|
|
2113
|
+
}, null, 8, Sa)) : (s(), y(Wn, {
|
|
2049
2114
|
key: 1,
|
|
2050
2115
|
"model-value": e.modelValue,
|
|
2051
2116
|
placeholder: e.field.placeholder,
|
|
@@ -2059,42 +2124,42 @@ var En = { key: 0 }, Dn = ["aria-label"], On = ["data-tooltip"], kn = ["data-too
|
|
|
2059
2124
|
]));
|
|
2060
2125
|
}
|
|
2061
2126
|
}),
|
|
2062
|
-
image:
|
|
2063
|
-
color:
|
|
2064
|
-
number:
|
|
2065
|
-
select:
|
|
2066
|
-
boolean:
|
|
2067
|
-
repeatable:
|
|
2127
|
+
image: ca,
|
|
2128
|
+
color: aa,
|
|
2129
|
+
number: ua,
|
|
2130
|
+
select: ya,
|
|
2131
|
+
boolean: na,
|
|
2132
|
+
repeatable: ga
|
|
2068
2133
|
};
|
|
2069
|
-
function
|
|
2070
|
-
return
|
|
2134
|
+
function Ta(e) {
|
|
2135
|
+
return wa[e] ?? xa;
|
|
2071
2136
|
}
|
|
2072
2137
|
//#endregion
|
|
2073
2138
|
//#region src/components/toolbar/CustomBlockToolbar.vue?vue&type=script&setup=true&lang.ts
|
|
2074
|
-
var
|
|
2139
|
+
var Ea = {
|
|
2075
2140
|
key: 0,
|
|
2076
2141
|
class: "tpl:p-4"
|
|
2077
|
-
},
|
|
2142
|
+
}, Da = { class: "tpl:m-0 tpl:text-center tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, Oa = { key: 1 }, ka = {
|
|
2078
2143
|
key: 0,
|
|
2079
2144
|
class: "tpl:m-0 tpl:mb-3 tpl:text-xs tpl:text-[var(--tpl-text-dim)]"
|
|
2080
|
-
},
|
|
2145
|
+
}, Aa = {
|
|
2081
2146
|
key: 1,
|
|
2082
2147
|
class: "tpl:mb-4"
|
|
2083
|
-
},
|
|
2148
|
+
}, ja = {
|
|
2084
2149
|
key: 1,
|
|
2085
2150
|
class: "tpl:flex tpl:h-[32px] tpl:items-center"
|
|
2086
|
-
},
|
|
2151
|
+
}, Ma = {
|
|
2087
2152
|
key: 0,
|
|
2088
2153
|
class: "tpl:w-full tpl:text-center tpl:text-xs tpl:text-[var(--tpl-text-muted)]"
|
|
2089
|
-
},
|
|
2154
|
+
}, Na = {
|
|
2090
2155
|
key: 2,
|
|
2091
2156
|
class: "tpl:m-0 tpl:mt-2 tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-xs tpl:text-[var(--tpl-danger)]"
|
|
2092
|
-
},
|
|
2157
|
+
}, Pa = /* @__PURE__ */ l({
|
|
2093
2158
|
__name: "CustomBlockToolbar",
|
|
2094
2159
|
props: { block: {} },
|
|
2095
2160
|
emits: ["updateFieldValues", "updateDataSourceFetched"],
|
|
2096
2161
|
setup(e, { emit: t }) {
|
|
2097
|
-
let n = e, a = t, { t: o } =
|
|
2162
|
+
let n = e, a = t, { t: o } = L(), l = r(N, []), u = T(() => l.find((e) => e.type === n.block.customType)), { isFetching: d, fetchError: h, fetch: g, hasDataSource: b, needsFetch: x } = Ae({
|
|
2098
2163
|
definition: u,
|
|
2099
2164
|
block: T(() => n.block),
|
|
2100
2165
|
onUpdate: (e, t) => {
|
|
@@ -2110,23 +2175,23 @@ var co = {
|
|
|
2110
2175
|
[e]: t
|
|
2111
2176
|
});
|
|
2112
2177
|
}
|
|
2113
|
-
return (t, n) => u.value ? (s(), f("div",
|
|
2114
|
-
u.value.description ? (s(), f("p",
|
|
2115
|
-
p(b) ? (s(), f("div",
|
|
2178
|
+
return (t, n) => u.value ? (s(), f("div", Oa, [
|
|
2179
|
+
u.value.description ? (s(), f("p", ka, S(u.value.description), 1)) : v("", !0),
|
|
2180
|
+
p(b) ? (s(), f("div", Aa, [p(x) && !p(d) ? (s(), f("button", {
|
|
2116
2181
|
key: 0,
|
|
2117
2182
|
type: "button",
|
|
2118
2183
|
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)]",
|
|
2119
2184
|
onClick: n[0] ||= (...e) => p(g) && p(g)(...e)
|
|
2120
|
-
}, S(u.value?.dataSource?.label || p(o).customBlocks.dataSource.fetchButton), 1)) : (s(), f("div",
|
|
2185
|
+
}, S(u.value?.dataSource?.label || p(o).customBlocks.dataSource.fetchButton), 1)) : (s(), f("div", ja, [p(d) ? (s(), f("div", Ma, S(p(o).customBlocks.dataSource.fetching), 1)) : (s(), f("button", {
|
|
2121
2186
|
key: 1,
|
|
2122
2187
|
type: "button",
|
|
2123
2188
|
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)]",
|
|
2124
2189
|
onClick: n[1] ||= (...e) => p(g) && p(g)(...e)
|
|
2125
|
-
}, [m(p(Ve), { size: 12 }),
|
|
2190
|
+
}, [m(p(Ve), { size: 12 }), A(" " + S(p(o).customBlocks.dataSource.changeButton), 1)]))])), p(h) ? (s(), f("p", Na, [m(p(ve), {
|
|
2126
2191
|
size: 14,
|
|
2127
2192
|
class: "tpl:shrink-0"
|
|
2128
|
-
}),
|
|
2129
|
-
(s(!0), f(_, null, i(u.value.fields, (t) => (s(), y(c(p(
|
|
2193
|
+
}), A(" " + S(p(o).customBlocks.dataSource.fetchError), 1)])) : v("", !0)])) : v("", !0),
|
|
2194
|
+
(s(!0), f(_, null, i(u.value.fields, (t) => (s(), y(c(p(Ta)(t.type)), {
|
|
2130
2195
|
key: t.key,
|
|
2131
2196
|
field: t,
|
|
2132
2197
|
"model-value": e.block.fieldValues[t.key],
|
|
@@ -2138,19 +2203,19 @@ var co = {
|
|
|
2138
2203
|
"read-only",
|
|
2139
2204
|
"onUpdate:modelValue"
|
|
2140
2205
|
]))), 128))
|
|
2141
|
-
])) : (s(), f("div",
|
|
2206
|
+
])) : (s(), f("div", Ea, [C("p", Da, S(p(o).customBlocks.toolbar.noDefinition), 1)]));
|
|
2142
2207
|
}
|
|
2143
|
-
}),
|
|
2208
|
+
}), Fa = { class: "tpl:mb-3.5" }, Ia = { class: "tpl:mb-3.5" }, La = { class: "tpl:mb-3.5" }, Ra = { class: "tpl:flex tpl:items-stretch" }, za = ["value"], Ba = /* @__PURE__ */ l({
|
|
2144
2209
|
__name: "DividerToolbar",
|
|
2145
2210
|
props: { block: {} },
|
|
2146
2211
|
emits: ["update"],
|
|
2147
2212
|
setup(e, { emit: t }) {
|
|
2148
|
-
let n = t, { t: r } =
|
|
2213
|
+
let n = t, { t: r } = L();
|
|
2149
2214
|
function i(e, t) {
|
|
2150
2215
|
n("update", { [e]: t });
|
|
2151
2216
|
}
|
|
2152
2217
|
return (t, n) => (s(), f(_, null, [
|
|
2153
|
-
C("div",
|
|
2218
|
+
C("div", Fa, [C("label", { class: D(p(V)) }, S(p(r).divider.style), 3), m(Z, {
|
|
2154
2219
|
options: [
|
|
2155
2220
|
{
|
|
2156
2221
|
value: "solid",
|
|
@@ -2168,53 +2233,53 @@ var co = {
|
|
|
2168
2233
|
"model-value": e.block.lineStyle,
|
|
2169
2234
|
"onUpdate:modelValue": n[0] ||= (e) => i("lineStyle", e)
|
|
2170
2235
|
}, null, 8, ["options", "model-value"])]),
|
|
2171
|
-
C("div",
|
|
2236
|
+
C("div", Ia, [C("label", { class: D(p(V)) }, S(p(r).divider.color), 3), m(q, {
|
|
2172
2237
|
"model-value": e.block.color,
|
|
2173
2238
|
"onUpdate:modelValue": n[1] ||= (e) => i("color", e)
|
|
2174
2239
|
}, null, 8, ["model-value"])]),
|
|
2175
|
-
C("div",
|
|
2240
|
+
C("div", La, [C("label", { class: D(p(V)) }, S(p(r).divider.thickness), 3), C("div", Ra, [C("input", {
|
|
2176
2241
|
type: "number",
|
|
2177
2242
|
class: D(p(U)),
|
|
2178
2243
|
value: e.block.thickness,
|
|
2179
2244
|
min: "1",
|
|
2180
2245
|
max: "10",
|
|
2181
2246
|
onInput: n[2] ||= (e) => i("thickness", Number(e.target.value))
|
|
2182
|
-
}, null, 42,
|
|
2247
|
+
}, null, 42, za), C("span", { class: D(p(H)) }, "px", 2)])])
|
|
2183
2248
|
], 64));
|
|
2184
2249
|
}
|
|
2185
|
-
}),
|
|
2250
|
+
}), Va = { class: "tpl:mb-3.5" }, Ha = ["value"], Ua = { class: "tpl:mt-1.5 tpl:flex tpl:items-start tpl:gap-1.5 tpl:text-[11px] tpl:text-[var(--tpl-text-dim)]" }, Wa = /* @__PURE__ */ l({
|
|
2186
2251
|
__name: "HtmlToolbar",
|
|
2187
2252
|
props: { block: {} },
|
|
2188
2253
|
emits: ["update"],
|
|
2189
2254
|
setup(e, { emit: t }) {
|
|
2190
|
-
let n = t, { t: r } =
|
|
2191
|
-
return (t, i) => (s(), f("div",
|
|
2192
|
-
C("label", { class: D(p(
|
|
2255
|
+
let n = t, { t: r } = L();
|
|
2256
|
+
return (t, i) => (s(), f("div", Va, [
|
|
2257
|
+
C("label", { class: D(p(V)) }, S(p(r).html.content), 3),
|
|
2193
2258
|
C("textarea", {
|
|
2194
2259
|
value: e.block.content,
|
|
2195
2260
|
placeholder: "<div>...</div>",
|
|
2196
2261
|
rows: "10",
|
|
2197
|
-
class:
|
|
2262
|
+
class: D(p(bt)),
|
|
2198
2263
|
onInput: i[0] ||= (e) => n("update", { content: e.target.value })
|
|
2199
|
-
}, null,
|
|
2200
|
-
C("p",
|
|
2264
|
+
}, null, 42, Ha),
|
|
2265
|
+
C("p", Ua, [m(p(Ue), {
|
|
2201
2266
|
size: 12,
|
|
2202
2267
|
class: "tpl:mt-0.5 tpl:shrink-0"
|
|
2203
|
-
}),
|
|
2268
|
+
}), A(" " + S(p(r).html.sanitizationHint), 1)])
|
|
2204
2269
|
]));
|
|
2205
2270
|
}
|
|
2206
|
-
}),
|
|
2271
|
+
}), Ga = { class: "tpl:mb-3.5" }, Ka = {
|
|
2207
2272
|
key: 0,
|
|
2208
2273
|
class: "tpl:mb-3.5"
|
|
2209
|
-
},
|
|
2274
|
+
}, qa = ["value", "placeholder"], Ja = { class: "tpl:mb-3.5" }, Ya = { class: "tpl:mb-3.5" }, Xa = ["value"], Za = { value: "full" }, Qa = { class: "tpl:mb-3.5" }, $a = { class: "tpl:mb-3.5" }, eo = {
|
|
2210
2275
|
key: 0,
|
|
2211
2276
|
class: "tpl:mt-2 tpl:flex tpl:cursor-pointer tpl:items-center tpl:gap-2 tpl:text-[12px] tpl:text-[var(--tpl-text-muted)]"
|
|
2212
|
-
},
|
|
2277
|
+
}, to = ["checked"], no = /* @__PURE__ */ l({
|
|
2213
2278
|
__name: "ImageToolbar",
|
|
2214
2279
|
props: { block: {} },
|
|
2215
2280
|
emits: ["update"],
|
|
2216
2281
|
setup(e, { emit: n }) {
|
|
2217
|
-
let i = n, { t: a } =
|
|
2282
|
+
let i = n, { t: a } = L(), o = r(F, null), c = r(we, Ke.liquid), l = T(() => !!o), u = t(!1), d = t(!1), { start: h } = Re(() => {
|
|
2218
2283
|
u.value = !1;
|
|
2219
2284
|
}, 1e3, { immediate: !1 });
|
|
2220
2285
|
function g(e, t) {
|
|
@@ -2225,9 +2290,9 @@ var co = {
|
|
|
2225
2290
|
e && (g("src", e.url), e.alt && (g("alt", e.alt), d.value = !0), u.value = !0, h());
|
|
2226
2291
|
}
|
|
2227
2292
|
return (t, n) => (s(), f(_, null, [
|
|
2228
|
-
C("div",
|
|
2229
|
-
C("label", { class: D(p(
|
|
2230
|
-
m(
|
|
2293
|
+
C("div", Ga, [
|
|
2294
|
+
C("label", { class: D(p(V)) }, S(p(a).image.imageUrl), 3),
|
|
2295
|
+
m(J, {
|
|
2231
2296
|
"model-value": e.block.src,
|
|
2232
2297
|
type: "url",
|
|
2233
2298
|
placeholder: p(a).image.imageUrlPlaceholder,
|
|
@@ -2250,16 +2315,16 @@ var co = {
|
|
|
2250
2315
|
}, [m(p(Le), {
|
|
2251
2316
|
size: 14,
|
|
2252
2317
|
"stroke-width": 1.5
|
|
2253
|
-
}),
|
|
2318
|
+
}), A(" " + S(p(a).image.browseMedia), 1)])) : v("", !0)
|
|
2254
2319
|
]),
|
|
2255
|
-
p(
|
|
2320
|
+
p(Ne)(e.block.src, p(c)) ? (s(), f("div", Ka, [C("label", { class: D(p(V)) }, [A(S(p(a).image.placeholderUrl) + " ", 1), n[7] ||= C("span", { class: "tpl:font-normal tpl:text-[var(--tpl-text-dim)]" }, S("(optional)"), -1)], 2), C("input", {
|
|
2256
2321
|
type: "url",
|
|
2257
|
-
class: D(p(
|
|
2322
|
+
class: D(p(B)),
|
|
2258
2323
|
value: e.block.placeholderUrl || "",
|
|
2259
2324
|
placeholder: p(a).image.placeholderUrlPlaceholder,
|
|
2260
2325
|
onInput: n[1] ||= (e) => g("placeholderUrl", e.target.value)
|
|
2261
|
-
}, null, 42,
|
|
2262
|
-
C("div",
|
|
2326
|
+
}, null, 42, qa)])) : v("", !0),
|
|
2327
|
+
C("div", Ja, [C("label", { class: D(p(V)) }, S(p(a).image.altText), 3), m(J, {
|
|
2263
2328
|
"model-value": e.block.alt,
|
|
2264
2329
|
type: "text",
|
|
2265
2330
|
placeholder: p(a).image.altTextPlaceholder,
|
|
@@ -2270,17 +2335,17 @@ var co = {
|
|
|
2270
2335
|
"placeholder",
|
|
2271
2336
|
"pulse"
|
|
2272
2337
|
])]),
|
|
2273
|
-
C("div",
|
|
2274
|
-
class: D(p(
|
|
2338
|
+
C("div", Ya, [C("label", { class: D(p(V)) }, S(p(a).image.width), 3), C("select", {
|
|
2339
|
+
class: D(p(B)),
|
|
2275
2340
|
value: e.block.width,
|
|
2276
2341
|
onChange: n[3] ||= (e) => g("width", e.target.value === "full" ? "full" : Number(e.target.value))
|
|
2277
2342
|
}, [
|
|
2278
|
-
C("option",
|
|
2343
|
+
C("option", Za, S(p(a).image.fullWidth), 1),
|
|
2279
2344
|
n[8] ||= C("option", { value: "300" }, "300px", -1),
|
|
2280
2345
|
n[9] ||= C("option", { value: "400" }, "400px", -1),
|
|
2281
2346
|
n[10] ||= C("option", { value: "500" }, "500px", -1)
|
|
2282
|
-
], 42,
|
|
2283
|
-
C("div",
|
|
2347
|
+
], 42, Xa)]),
|
|
2348
|
+
C("div", Qa, [C("label", { class: D(p(V)) }, S(p(a).title.align), 3), m(Z, {
|
|
2284
2349
|
options: [
|
|
2285
2350
|
{
|
|
2286
2351
|
value: "left",
|
|
@@ -2298,28 +2363,28 @@ var co = {
|
|
|
2298
2363
|
"model-value": e.block.align,
|
|
2299
2364
|
"onUpdate:modelValue": n[4] ||= (e) => g("align", e)
|
|
2300
2365
|
}, null, 8, ["options", "model-value"])]),
|
|
2301
|
-
C("div",
|
|
2302
|
-
C("label", { class: D(p(
|
|
2303
|
-
m(
|
|
2366
|
+
C("div", $a, [
|
|
2367
|
+
C("label", { class: D(p(V)) }, S(p(a).image.linkUrl), 3),
|
|
2368
|
+
m(J, {
|
|
2304
2369
|
"model-value": e.block.linkUrl || "",
|
|
2305
2370
|
type: "url",
|
|
2306
2371
|
placeholder: p(a).image.imageUrlPlaceholder,
|
|
2307
2372
|
"onUpdate:modelValue": n[5] ||= (e) => g("linkUrl", e)
|
|
2308
2373
|
}, null, 8, ["model-value", "placeholder"]),
|
|
2309
|
-
e.block.linkUrl ? (s(), f("label",
|
|
2374
|
+
e.block.linkUrl ? (s(), f("label", eo, [C("input", {
|
|
2310
2375
|
type: "checkbox",
|
|
2311
2376
|
class: "tpl:size-3.5 tpl:cursor-pointer tpl:accent-[var(--tpl-primary)]",
|
|
2312
2377
|
checked: e.block.linkOpenInNewTab ?? !1,
|
|
2313
2378
|
onChange: n[6] ||= (e) => g("linkOpenInNewTab", e.target.checked)
|
|
2314
|
-
}, null, 40,
|
|
2379
|
+
}, null, 40, to), A(" " + S(p(a).image.openInNewTab), 1)])) : v("", !0)
|
|
2315
2380
|
])
|
|
2316
2381
|
], 64));
|
|
2317
2382
|
}
|
|
2318
|
-
}),
|
|
2383
|
+
}), ro = { class: "tpl:flex tpl:flex-col tpl:gap-2" }, io = { class: "tpl:flex tpl:items-center tpl:gap-2" }, ao = [
|
|
2319
2384
|
"value",
|
|
2320
2385
|
"placeholder",
|
|
2321
2386
|
"onInput"
|
|
2322
|
-
],
|
|
2387
|
+
], oo = ["title", "onClick"], so = { class: "tpl:flex tpl:items-center tpl:gap-3 tpl:text-xs tpl:text-[var(--tpl-text-muted)]" }, co = ["checked", "onChange"], lo = { class: "tpl:flex tpl:items-center tpl:gap-2" }, uo = ["value"], fo = { value: "" }, po = ["value"], mo = ["value"], ho = /* @__PURE__ */ l({
|
|
2323
2388
|
__name: "MenuToolbar",
|
|
2324
2389
|
props: {
|
|
2325
2390
|
block: {},
|
|
@@ -2327,13 +2392,42 @@ var co = {
|
|
|
2327
2392
|
},
|
|
2328
2393
|
emits: ["update"],
|
|
2329
2394
|
setup(e, { emit: t }) {
|
|
2330
|
-
let n = e, r = t, { t:
|
|
2331
|
-
|
|
2395
|
+
let n = e, r = t, { t: o } = L(), c = T(() => [
|
|
2396
|
+
{
|
|
2397
|
+
key: "openInNewTab",
|
|
2398
|
+
label: o.menu.openInNewTab
|
|
2399
|
+
},
|
|
2400
|
+
{
|
|
2401
|
+
key: "bold",
|
|
2402
|
+
label: o.menu.bold
|
|
2403
|
+
},
|
|
2404
|
+
{
|
|
2405
|
+
key: "underline",
|
|
2406
|
+
label: o.menu.underline
|
|
2407
|
+
}
|
|
2408
|
+
]), l = T(() => [
|
|
2409
|
+
{
|
|
2410
|
+
value: "left",
|
|
2411
|
+
label: o.title.alignLeft,
|
|
2412
|
+
icon: ot
|
|
2413
|
+
},
|
|
2414
|
+
{
|
|
2415
|
+
value: "center",
|
|
2416
|
+
label: o.title.alignCenter,
|
|
2417
|
+
icon: pt
|
|
2418
|
+
},
|
|
2419
|
+
{
|
|
2420
|
+
value: "right",
|
|
2421
|
+
label: o.title.alignRight,
|
|
2422
|
+
icon: dt
|
|
2423
|
+
}
|
|
2424
|
+
]);
|
|
2425
|
+
function u(e, t) {
|
|
2332
2426
|
r("update", { [e]: t });
|
|
2333
2427
|
}
|
|
2334
|
-
function
|
|
2428
|
+
function d() {
|
|
2335
2429
|
let e = {
|
|
2336
|
-
id:
|
|
2430
|
+
id: I(),
|
|
2337
2431
|
text: "",
|
|
2338
2432
|
url: "",
|
|
2339
2433
|
openInNewTab: !1,
|
|
@@ -2342,147 +2436,145 @@ var co = {
|
|
|
2342
2436
|
};
|
|
2343
2437
|
r("update", { items: [...n.block.items, e] });
|
|
2344
2438
|
}
|
|
2345
|
-
function
|
|
2439
|
+
function h(e, t, i) {
|
|
2346
2440
|
r("update", { items: n.block.items.map((n) => n.id === e ? {
|
|
2347
2441
|
...n,
|
|
2348
2442
|
[t]: i
|
|
2349
2443
|
} : n) });
|
|
2350
2444
|
}
|
|
2351
|
-
function
|
|
2445
|
+
function g(e) {
|
|
2352
2446
|
r("update", { items: n.block.items.filter((t) => t.id !== e) });
|
|
2353
2447
|
}
|
|
2354
2448
|
return (t, n) => (s(), f(_, null, [
|
|
2355
|
-
|
|
2356
|
-
|
|
2357
|
-
|
|
2358
|
-
|
|
2359
|
-
|
|
2360
|
-
|
|
2361
|
-
|
|
2362
|
-
|
|
2363
|
-
|
|
2364
|
-
|
|
2365
|
-
|
|
2366
|
-
|
|
2367
|
-
|
|
2368
|
-
|
|
2369
|
-
|
|
2370
|
-
|
|
2371
|
-
|
|
2372
|
-
|
|
2373
|
-
|
|
2374
|
-
|
|
2375
|
-
|
|
2376
|
-
|
|
2377
|
-
|
|
2378
|
-
|
|
2379
|
-
|
|
2380
|
-
|
|
2381
|
-
|
|
2382
|
-
|
|
2383
|
-
|
|
2384
|
-
C("
|
|
2385
|
-
|
|
2386
|
-
|
|
2387
|
-
|
|
2388
|
-
onChange: (e) => l(t.id, "openInNewTab", e.target.checked)
|
|
2389
|
-
}, null, 40, qo), j(" " + S(p(a).menu.openInNewTab), 1)]),
|
|
2390
|
-
C("label", Jo, [C("input", {
|
|
2391
|
-
type: "checkbox",
|
|
2392
|
-
checked: t.bold,
|
|
2393
|
-
class: "tpl:accent-[var(--tpl-primary)]",
|
|
2394
|
-
onChange: (e) => l(t.id, "bold", e.target.checked)
|
|
2395
|
-
}, null, 40, Yo), j(" " + S(p(a).menu.bold), 1)]),
|
|
2396
|
-
C("label", Xo, [C("input", {
|
|
2449
|
+
m(Q, { label: p(o).menu.items }, {
|
|
2450
|
+
default: a(() => [C("div", ro, [(s(!0), f(_, null, i(e.block.items, (t) => (s(), f("div", {
|
|
2451
|
+
key: t.id,
|
|
2452
|
+
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"
|
|
2453
|
+
}, [
|
|
2454
|
+
C("div", io, [C("input", {
|
|
2455
|
+
type: "text",
|
|
2456
|
+
class: D([p(B), "tpl:flex-1"]),
|
|
2457
|
+
value: t.text,
|
|
2458
|
+
placeholder: p(o).menu.text,
|
|
2459
|
+
onInput: (e) => h(t.id, "text", e.target.value)
|
|
2460
|
+
}, null, 42, ao), C("button", {
|
|
2461
|
+
class: D(p(vt)),
|
|
2462
|
+
title: p(o).menu.removeItem,
|
|
2463
|
+
onClick: (e) => g(t.id)
|
|
2464
|
+
}, [m(p(qe), {
|
|
2465
|
+
size: 14,
|
|
2466
|
+
"stroke-width": 2
|
|
2467
|
+
})], 10, oo)]),
|
|
2468
|
+
m(J, {
|
|
2469
|
+
"model-value": t.url,
|
|
2470
|
+
type: "url",
|
|
2471
|
+
placeholder: p(o).menu.urlPlaceholder,
|
|
2472
|
+
"onUpdate:modelValue": (e) => h(t.id, "url", e)
|
|
2473
|
+
}, null, 8, [
|
|
2474
|
+
"model-value",
|
|
2475
|
+
"placeholder",
|
|
2476
|
+
"onUpdate:modelValue"
|
|
2477
|
+
]),
|
|
2478
|
+
C("div", so, [(s(!0), f(_, null, i(c.value, (e) => (s(), f("label", {
|
|
2479
|
+
key: e.key,
|
|
2480
|
+
class: "tpl:flex tpl:cursor-pointer tpl:items-center tpl:gap-1"
|
|
2481
|
+
}, [C("input", {
|
|
2397
2482
|
type: "checkbox",
|
|
2398
|
-
checked: t.
|
|
2483
|
+
checked: t[e.key],
|
|
2399
2484
|
class: "tpl:accent-[var(--tpl-primary)]",
|
|
2400
|
-
onChange: (
|
|
2401
|
-
}, null, 40,
|
|
2402
|
-
|
|
2403
|
-
|
|
2404
|
-
|
|
2405
|
-
|
|
2406
|
-
|
|
2407
|
-
|
|
2408
|
-
|
|
2409
|
-
|
|
2410
|
-
|
|
2411
|
-
|
|
2412
|
-
|
|
2413
|
-
"
|
|
2414
|
-
|
|
2415
|
-
|
|
2416
|
-
|
|
2417
|
-
|
|
2418
|
-
|
|
2419
|
-
|
|
2420
|
-
|
|
2421
|
-
|
|
2422
|
-
|
|
2423
|
-
|
|
2424
|
-
|
|
2425
|
-
|
|
2426
|
-
|
|
2427
|
-
|
|
2428
|
-
|
|
2429
|
-
|
|
2430
|
-
|
|
2431
|
-
|
|
2432
|
-
|
|
2433
|
-
|
|
2434
|
-
|
|
2435
|
-
|
|
2436
|
-
|
|
2437
|
-
|
|
2438
|
-
|
|
2439
|
-
|
|
2440
|
-
|
|
2441
|
-
|
|
2442
|
-
|
|
2443
|
-
|
|
2444
|
-
|
|
2445
|
-
|
|
2446
|
-
|
|
2447
|
-
|
|
2448
|
-
|
|
2449
|
-
|
|
2450
|
-
|
|
2451
|
-
|
|
2452
|
-
|
|
2453
|
-
|
|
2454
|
-
|
|
2455
|
-
|
|
2456
|
-
],
|
|
2457
|
-
|
|
2458
|
-
|
|
2459
|
-
|
|
2460
|
-
|
|
2461
|
-
|
|
2462
|
-
|
|
2463
|
-
|
|
2464
|
-
|
|
2465
|
-
|
|
2466
|
-
|
|
2467
|
-
|
|
2468
|
-
|
|
2469
|
-
|
|
2470
|
-
|
|
2471
|
-
|
|
2472
|
-
|
|
2473
|
-
|
|
2474
|
-
|
|
2475
|
-
|
|
2476
|
-
|
|
2477
|
-
|
|
2485
|
+
onChange: (n) => h(t.id, e.key, n.target.checked)
|
|
2486
|
+
}, null, 40, co), A(" " + S(e.label), 1)]))), 128))]),
|
|
2487
|
+
C("div", lo, [C("label", { class: D([p(V), "tpl:!mb-0"]) }, S(p(o).menu.color), 3), m(q, {
|
|
2488
|
+
"swatch-only": "",
|
|
2489
|
+
"model-value": t.color || e.block.linkColor || e.block.color,
|
|
2490
|
+
"onUpdate:modelValue": (e) => h(t.id, "color", e)
|
|
2491
|
+
}, null, 8, ["model-value", "onUpdate:modelValue"])])
|
|
2492
|
+
]))), 128)), C("button", {
|
|
2493
|
+
class: D(p(yt)),
|
|
2494
|
+
onClick: d
|
|
2495
|
+
}, [m(p(z), {
|
|
2496
|
+
size: 14,
|
|
2497
|
+
"stroke-width": 2
|
|
2498
|
+
}), A(" " + S(p(o).menu.addItem), 1)], 2)])]),
|
|
2499
|
+
_: 1
|
|
2500
|
+
}, 8, ["label"]),
|
|
2501
|
+
m(Q, { label: p(o).menu.fontFamily }, {
|
|
2502
|
+
default: a(() => [C("select", {
|
|
2503
|
+
class: D(p(B)),
|
|
2504
|
+
value: e.block.fontFamily || "",
|
|
2505
|
+
onChange: n[0] ||= (e) => u("fontFamily", e.target.value || void 0)
|
|
2506
|
+
}, [C("option", fo, S(p(o).title.inheritFont), 1), (s(!0), f(_, null, i(e.fontFamilies, (e) => (s(), f("option", {
|
|
2507
|
+
key: e.value,
|
|
2508
|
+
value: e.value
|
|
2509
|
+
}, S(e.label), 9, po))), 128))], 42, uo)]),
|
|
2510
|
+
_: 1
|
|
2511
|
+
}, 8, ["label"]),
|
|
2512
|
+
m(Q, { label: p(o).menu.fontSize }, {
|
|
2513
|
+
default: a(() => [m(Li, {
|
|
2514
|
+
"model-value": e.block.fontSize,
|
|
2515
|
+
min: 8,
|
|
2516
|
+
max: 48,
|
|
2517
|
+
suffix: "px",
|
|
2518
|
+
"onUpdate:modelValue": n[1] ||= (e) => u("fontSize", e)
|
|
2519
|
+
}, null, 8, ["model-value"])]),
|
|
2520
|
+
_: 1
|
|
2521
|
+
}, 8, ["label"]),
|
|
2522
|
+
m(Q, { label: p(o).menu.color }, {
|
|
2523
|
+
default: a(() => [m(q, {
|
|
2524
|
+
"model-value": e.block.color,
|
|
2525
|
+
"onUpdate:modelValue": n[2] ||= (e) => u("color", e)
|
|
2526
|
+
}, null, 8, ["model-value"])]),
|
|
2527
|
+
_: 1
|
|
2528
|
+
}, 8, ["label"]),
|
|
2529
|
+
m(Q, { label: p(o).menu.linkColor }, {
|
|
2530
|
+
default: a(() => [m(q, {
|
|
2531
|
+
"model-value": e.block.linkColor || e.block.color,
|
|
2532
|
+
"onUpdate:modelValue": n[3] ||= (e) => u("linkColor", e || void 0)
|
|
2533
|
+
}, null, 8, ["model-value"])]),
|
|
2534
|
+
_: 1
|
|
2535
|
+
}, 8, ["label"]),
|
|
2536
|
+
m(Q, { label: p(o).menu.textAlign }, {
|
|
2537
|
+
default: a(() => [m(Z, {
|
|
2538
|
+
options: l.value,
|
|
2539
|
+
"model-value": e.block.textAlign,
|
|
2540
|
+
"onUpdate:modelValue": n[4] ||= (e) => u("textAlign", e)
|
|
2541
|
+
}, null, 8, ["options", "model-value"])]),
|
|
2542
|
+
_: 1
|
|
2543
|
+
}, 8, ["label"]),
|
|
2544
|
+
m(Q, { label: p(o).menu.separator }, {
|
|
2545
|
+
default: a(() => [C("input", {
|
|
2546
|
+
type: "text",
|
|
2547
|
+
class: D(p(B)),
|
|
2548
|
+
value: e.block.separator,
|
|
2549
|
+
onInput: n[5] ||= (e) => u("separator", e.target.value)
|
|
2550
|
+
}, null, 42, mo)]),
|
|
2551
|
+
_: 1
|
|
2552
|
+
}, 8, ["label"]),
|
|
2553
|
+
m(Q, { label: p(o).menu.separatorColor }, {
|
|
2554
|
+
default: a(() => [m(q, {
|
|
2555
|
+
"model-value": e.block.separatorColor,
|
|
2556
|
+
"onUpdate:modelValue": n[6] ||= (e) => u("separatorColor", e)
|
|
2557
|
+
}, null, 8, ["model-value"])]),
|
|
2558
|
+
_: 1
|
|
2559
|
+
}, 8, ["label"]),
|
|
2560
|
+
m(Q, { label: p(o).menu.spacing }, {
|
|
2561
|
+
default: a(() => [m(Li, {
|
|
2562
|
+
"model-value": e.block.spacing,
|
|
2563
|
+
min: 0,
|
|
2564
|
+
max: 50,
|
|
2565
|
+
suffix: "px",
|
|
2566
|
+
"onUpdate:modelValue": n[7] ||= (e) => u("spacing", e)
|
|
2567
|
+
}, null, 8, ["model-value"])]),
|
|
2568
|
+
_: 1
|
|
2569
|
+
}, 8, ["label"])
|
|
2478
2570
|
], 64));
|
|
2479
2571
|
}
|
|
2480
|
-
}),
|
|
2572
|
+
}), go = { class: "tpl:mb-3.5" }, _o = ["value"], vo = ["value"], yo = /* @__PURE__ */ l({
|
|
2481
2573
|
__name: "SectionToolbar",
|
|
2482
2574
|
props: { block: {} },
|
|
2483
2575
|
emits: ["update"],
|
|
2484
2576
|
setup(e, { emit: t }) {
|
|
2485
|
-
let n = t, { t: r } =
|
|
2577
|
+
let n = t, { t: r } = L(), a = T(() => [
|
|
2486
2578
|
{
|
|
2487
2579
|
value: "1",
|
|
2488
2580
|
label: r.section.column1
|
|
@@ -2504,27 +2596,27 @@ var co = {
|
|
|
2504
2596
|
label: r.section.ratio21
|
|
2505
2597
|
}
|
|
2506
2598
|
]);
|
|
2507
|
-
return (t, o) => (s(), f("div",
|
|
2508
|
-
class: D(p(
|
|
2599
|
+
return (t, o) => (s(), f("div", go, [C("label", { class: D(p(V)) }, S(p(r).section.columns), 3), C("select", {
|
|
2600
|
+
class: D(p(B)),
|
|
2509
2601
|
value: e.block.columns,
|
|
2510
2602
|
onChange: o[0] ||= (e) => n("update", { columns: e.target.value })
|
|
2511
2603
|
}, [(s(!0), f(_, null, i(a.value, (e) => (s(), f("option", {
|
|
2512
2604
|
key: e.value,
|
|
2513
2605
|
value: e.value
|
|
2514
|
-
}, S(e.label), 9,
|
|
2606
|
+
}, S(e.label), 9, vo))), 128))], 42, _o)]));
|
|
2515
2607
|
}
|
|
2516
|
-
}),
|
|
2608
|
+
}), bo = { class: "tpl:mb-3.5" }, xo = { class: "tpl:flex tpl:flex-col tpl:gap-2" }, So = { class: "tpl:flex tpl:items-center tpl:gap-2" }, Co = ["value", "onChange"], wo = ["value"], To = ["title", "onClick"], Eo = { class: "tpl:mb-3.5" }, Do = { class: "tpl:mb-3.5" }, Oo = { class: "tpl:mb-3.5" }, ko = { class: "tpl:flex tpl:items-stretch" }, Ao = ["value"], jo = { class: "tpl:mb-3.5" }, Mo = /* @__PURE__ */ l({
|
|
2517
2609
|
__name: "SocialToolbar",
|
|
2518
2610
|
props: { block: {} },
|
|
2519
2611
|
emits: ["update"],
|
|
2520
2612
|
setup(e, { emit: t }) {
|
|
2521
|
-
let n = e, r = t, { t: a } =
|
|
2613
|
+
let n = e, r = t, { t: a } = L();
|
|
2522
2614
|
function o(e, t) {
|
|
2523
2615
|
r("update", { [e]: t });
|
|
2524
2616
|
}
|
|
2525
2617
|
function c() {
|
|
2526
2618
|
let e = {
|
|
2527
|
-
id:
|
|
2619
|
+
id: I(),
|
|
2528
2620
|
platform: "facebook",
|
|
2529
2621
|
url: ""
|
|
2530
2622
|
};
|
|
@@ -2540,24 +2632,24 @@ var co = {
|
|
|
2540
2632
|
r("update", { icons: n.block.icons.filter((t) => t.id !== e) });
|
|
2541
2633
|
}
|
|
2542
2634
|
return (t, n) => (s(), f(_, null, [
|
|
2543
|
-
C("div",
|
|
2635
|
+
C("div", bo, [C("label", { class: D(p(V)) }, S(p(a).social.icons), 3), C("div", xo, [(s(!0), f(_, null, i(e.block.icons, (e) => (s(), f("div", {
|
|
2544
2636
|
key: e.id,
|
|
2545
2637
|
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"
|
|
2546
|
-
}, [C("div",
|
|
2547
|
-
class: D([p(
|
|
2638
|
+
}, [C("div", So, [C("select", {
|
|
2639
|
+
class: D([p(B), "tpl:flex-1"]),
|
|
2548
2640
|
value: e.platform,
|
|
2549
2641
|
onChange: (t) => l(e.id, "platform", t.target.value)
|
|
2550
|
-
}, [(s(!0), f(_, null, i(p(
|
|
2642
|
+
}, [(s(!0), f(_, null, i(p(P), (e) => (s(), f("option", {
|
|
2551
2643
|
key: e,
|
|
2552
2644
|
value: e
|
|
2553
|
-
}, S(p(
|
|
2554
|
-
class:
|
|
2645
|
+
}, S(p(ge)[e].name), 9, wo))), 128))], 42, Co), C("button", {
|
|
2646
|
+
class: D(p(vt)),
|
|
2555
2647
|
title: p(a).social.removeIcon,
|
|
2556
2648
|
onClick: (t) => u(e.id)
|
|
2557
|
-
}, [m(p(
|
|
2649
|
+
}, [m(p(qe), {
|
|
2558
2650
|
size: 14,
|
|
2559
2651
|
"stroke-width": 2
|
|
2560
|
-
})],
|
|
2652
|
+
})], 10, To)]), m(J, {
|
|
2561
2653
|
"model-value": e.url,
|
|
2562
2654
|
type: "url",
|
|
2563
2655
|
placeholder: p(a).social.urlPlaceholder,
|
|
@@ -2567,13 +2659,13 @@ var co = {
|
|
|
2567
2659
|
"placeholder",
|
|
2568
2660
|
"onUpdate:modelValue"
|
|
2569
2661
|
])]))), 128)), C("button", {
|
|
2570
|
-
class:
|
|
2662
|
+
class: D(p(yt)),
|
|
2571
2663
|
onClick: c
|
|
2572
|
-
}, [m(p(
|
|
2664
|
+
}, [m(p(z), {
|
|
2573
2665
|
size: 14,
|
|
2574
2666
|
"stroke-width": 2
|
|
2575
|
-
}),
|
|
2576
|
-
C("div",
|
|
2667
|
+
}), A(" " + S(p(a).social.addIcon), 1)], 2)])]),
|
|
2668
|
+
C("div", Eo, [C("label", { class: D(p(V)) }, S(p(a).social.style), 3), m(Z, {
|
|
2577
2669
|
options: [
|
|
2578
2670
|
{
|
|
2579
2671
|
value: "solid",
|
|
@@ -2599,7 +2691,7 @@ var co = {
|
|
|
2599
2691
|
"model-value": e.block.iconStyle,
|
|
2600
2692
|
"onUpdate:modelValue": n[0] ||= (e) => o("iconStyle", e)
|
|
2601
2693
|
}, null, 8, ["options", "model-value"])]),
|
|
2602
|
-
C("div",
|
|
2694
|
+
C("div", Do, [C("label", { class: D(p(V)) }, S(p(a).social.size), 3), m(Z, {
|
|
2603
2695
|
options: [
|
|
2604
2696
|
{
|
|
2605
2697
|
value: "small",
|
|
@@ -2617,30 +2709,30 @@ var co = {
|
|
|
2617
2709
|
"model-value": e.block.iconSize,
|
|
2618
2710
|
"onUpdate:modelValue": n[1] ||= (e) => o("iconSize", e)
|
|
2619
2711
|
}, null, 8, ["options", "model-value"])]),
|
|
2620
|
-
C("div",
|
|
2712
|
+
C("div", Oo, [C("label", { class: D(p(V)) }, S(p(a).social.spacing), 3), C("div", ko, [C("input", {
|
|
2621
2713
|
type: "number",
|
|
2622
2714
|
class: D(p(U)),
|
|
2623
2715
|
value: e.block.spacing,
|
|
2624
2716
|
min: "0",
|
|
2625
2717
|
max: "50",
|
|
2626
2718
|
onInput: n[2] ||= (e) => o("spacing", Number(e.target.value))
|
|
2627
|
-
}, null, 42,
|
|
2628
|
-
C("div",
|
|
2719
|
+
}, null, 42, Ao), C("span", { class: D(p(H)) }, "px", 2)])]),
|
|
2720
|
+
C("div", jo, [C("label", { class: D(p(V)) }, S(p(a).social.align), 3), m(Z, {
|
|
2629
2721
|
options: [
|
|
2630
2722
|
{
|
|
2631
2723
|
value: "left",
|
|
2632
2724
|
label: p(a).title.alignLeft,
|
|
2633
|
-
icon: p(
|
|
2725
|
+
icon: p(ot)
|
|
2634
2726
|
},
|
|
2635
2727
|
{
|
|
2636
2728
|
value: "center",
|
|
2637
2729
|
label: p(a).title.alignCenter,
|
|
2638
|
-
icon: p(
|
|
2730
|
+
icon: p(pt)
|
|
2639
2731
|
},
|
|
2640
2732
|
{
|
|
2641
2733
|
value: "right",
|
|
2642
2734
|
label: p(a).title.alignRight,
|
|
2643
|
-
icon: p(
|
|
2735
|
+
icon: p(dt)
|
|
2644
2736
|
}
|
|
2645
2737
|
],
|
|
2646
2738
|
"model-value": e.block.align,
|
|
@@ -2648,22 +2740,22 @@ var co = {
|
|
|
2648
2740
|
}, null, 8, ["options", "model-value"])])
|
|
2649
2741
|
], 64));
|
|
2650
2742
|
}
|
|
2651
|
-
}),
|
|
2743
|
+
}), No = { class: "tpl:mb-3.5" }, Po = { class: "tpl:flex tpl:items-stretch" }, Fo = ["value"], Io = ["value"], Lo = /* @__PURE__ */ l({
|
|
2652
2744
|
__name: "SpacerToolbar",
|
|
2653
2745
|
props: { block: {} },
|
|
2654
2746
|
emits: ["update"],
|
|
2655
2747
|
setup(e, { emit: t }) {
|
|
2656
|
-
let n = t, { t: r } =
|
|
2657
|
-
return (t, i) => (s(), f("div",
|
|
2658
|
-
C("label", { class: D(p(
|
|
2659
|
-
C("div",
|
|
2748
|
+
let n = t, { t: r } = L();
|
|
2749
|
+
return (t, i) => (s(), f("div", No, [
|
|
2750
|
+
C("label", { class: D(p(V)) }, S(p(r).spacer.height), 3),
|
|
2751
|
+
C("div", Po, [C("input", {
|
|
2660
2752
|
type: "number",
|
|
2661
2753
|
class: D(p(U)),
|
|
2662
2754
|
value: e.block.height,
|
|
2663
2755
|
min: "10",
|
|
2664
2756
|
max: "100",
|
|
2665
2757
|
onInput: i[0] ||= (e) => n("update", { height: Number(e.target.value) })
|
|
2666
|
-
}, null, 42,
|
|
2758
|
+
}, null, 42, Fo), C("span", { class: D(p(H)) }, "px", 2)]),
|
|
2667
2759
|
C("input", {
|
|
2668
2760
|
type: "range",
|
|
2669
2761
|
class: "tpl:mt-2 tpl:w-full tpl:accent-[var(--tpl-primary)]",
|
|
@@ -2671,13 +2763,13 @@ var co = {
|
|
|
2671
2763
|
min: "10",
|
|
2672
2764
|
max: "100",
|
|
2673
2765
|
onInput: i[1] ||= (e) => n("update", { height: Number(e.target.value) })
|
|
2674
|
-
}, null, 40,
|
|
2766
|
+
}, null, 40, Io)
|
|
2675
2767
|
]));
|
|
2676
2768
|
}
|
|
2677
|
-
}),
|
|
2769
|
+
}), Ro = { class: "tpl:mb-3.5" }, zo = { class: "tpl:flex tpl:items-center tpl:gap-3" }, Bo = { class: "tpl:flex tpl:flex-1 tpl:items-center tpl:gap-1.5" }, Vo = { class: "tpl:text-xs tpl:text-[var(--tpl-text-muted)]" }, Ho = { class: "tpl:flex tpl:items-center tpl:rounded-md tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)]" }, Uo = ["disabled"], Wo = { class: "tpl:min-w-[20px] tpl:text-center tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text)]" }, Go = { class: "tpl:flex tpl:flex-1 tpl:items-center tpl:gap-1.5" }, Ko = { class: "tpl:text-xs tpl:text-[var(--tpl-text-muted)]" }, qo = { class: "tpl:flex tpl:items-center tpl:rounded-md tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)]" }, Jo = ["disabled"], Yo = { class: "tpl:min-w-[20px] tpl:text-center tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text)]" }, Xo = { class: "tpl:mb-3.5" }, Zo = { class: "tpl:mb-1.5 tpl:flex tpl:cursor-pointer tpl:items-center tpl:gap-2 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-muted)]" }, Qo = ["checked"], $o = {
|
|
2678
2770
|
key: 0,
|
|
2679
2771
|
class: "tpl:mb-3.5"
|
|
2680
|
-
},
|
|
2772
|
+
}, es = { class: "tpl:mb-3.5" }, ts = { class: "tpl:mb-3.5" }, ns = { class: "tpl:flex tpl:items-stretch" }, rs = ["value"], is = { class: "tpl:mb-3.5" }, as = { class: "tpl:flex tpl:items-stretch" }, os = ["value"], ss = { class: "tpl:mb-3.5" }, cs = ["value"], ls = { value: "" }, us = ["value"], ds = { class: "tpl:mb-3.5" }, fs = { class: "tpl:flex tpl:items-stretch" }, ps = ["value"], ms = { class: "tpl:mb-3.5" }, hs = { class: "tpl:mb-3.5" }, gs = /* @__PURE__ */ l({
|
|
2681
2773
|
__name: "TableToolbar",
|
|
2682
2774
|
props: {
|
|
2683
2775
|
block: {},
|
|
@@ -2685,15 +2777,15 @@ var co = {
|
|
|
2685
2777
|
},
|
|
2686
2778
|
emits: ["update"],
|
|
2687
2779
|
setup(e, { emit: t }) {
|
|
2688
|
-
let n = e, r = t, { t: a } =
|
|
2780
|
+
let n = e, r = t, { t: a } = L(), o = T(() => n.block.rows.length > 0 ? n.block.rows[0].cells.length : 0);
|
|
2689
2781
|
function c(e, t) {
|
|
2690
2782
|
r("update", { [e]: t });
|
|
2691
2783
|
}
|
|
2692
2784
|
function l() {
|
|
2693
2785
|
let e = n.block.rows.length > 0 ? n.block.rows[0].cells.length : 3, t = {
|
|
2694
|
-
id:
|
|
2786
|
+
id: I(),
|
|
2695
2787
|
cells: Array.from({ length: e }, () => ({
|
|
2696
|
-
id:
|
|
2788
|
+
id: I(),
|
|
2697
2789
|
content: ""
|
|
2698
2790
|
}))
|
|
2699
2791
|
};
|
|
@@ -2706,7 +2798,7 @@ var co = {
|
|
|
2706
2798
|
r("update", { rows: n.block.rows.map((e) => ({
|
|
2707
2799
|
...e,
|
|
2708
2800
|
cells: [...e.cells, {
|
|
2709
|
-
id:
|
|
2801
|
+
id: I(),
|
|
2710
2802
|
content: ""
|
|
2711
2803
|
}]
|
|
2712
2804
|
})) });
|
|
@@ -2718,108 +2810,108 @@ var co = {
|
|
|
2718
2810
|
})) });
|
|
2719
2811
|
}
|
|
2720
2812
|
return (t, n) => (s(), f(_, null, [
|
|
2721
|
-
C("div",
|
|
2813
|
+
C("div", Ro, [C("label", { class: D(p(V)) }, S(p(a).table.dimensions), 3), C("div", zo, [C("div", Bo, [C("span", Vo, S(p(a).table.rows), 1), C("div", Ho, [
|
|
2722
2814
|
C("button", {
|
|
2723
2815
|
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",
|
|
2724
2816
|
disabled: e.block.rows.length <= 1,
|
|
2725
2817
|
onClick: n[0] ||= (t) => u(e.block.rows[e.block.rows.length - 1].id)
|
|
2726
|
-
}, [m(p(
|
|
2818
|
+
}, [m(p(R), {
|
|
2727
2819
|
size: 12,
|
|
2728
2820
|
"stroke-width": 2
|
|
2729
|
-
})], 8,
|
|
2730
|
-
C("span",
|
|
2821
|
+
})], 8, Uo),
|
|
2822
|
+
C("span", Wo, S(e.block.rows.length), 1),
|
|
2731
2823
|
C("button", {
|
|
2732
2824
|
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)]",
|
|
2733
2825
|
onClick: l
|
|
2734
|
-
}, [m(p(
|
|
2826
|
+
}, [m(p(z), {
|
|
2735
2827
|
size: 12,
|
|
2736
2828
|
"stroke-width": 2
|
|
2737
2829
|
})])
|
|
2738
|
-
])]), C("div",
|
|
2830
|
+
])]), C("div", Go, [C("span", Ko, S(p(a).table.columns), 1), C("div", qo, [
|
|
2739
2831
|
C("button", {
|
|
2740
2832
|
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",
|
|
2741
2833
|
disabled: o.value <= 1,
|
|
2742
2834
|
onClick: n[1] ||= (e) => h(o.value - 1)
|
|
2743
|
-
}, [m(p(
|
|
2835
|
+
}, [m(p(R), {
|
|
2744
2836
|
size: 12,
|
|
2745
2837
|
"stroke-width": 2
|
|
2746
|
-
})], 8,
|
|
2747
|
-
C("span",
|
|
2838
|
+
})], 8, Jo),
|
|
2839
|
+
C("span", Yo, S(o.value), 1),
|
|
2748
2840
|
C("button", {
|
|
2749
2841
|
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)]",
|
|
2750
2842
|
onClick: d
|
|
2751
|
-
}, [m(p(
|
|
2843
|
+
}, [m(p(z), {
|
|
2752
2844
|
size: 12,
|
|
2753
2845
|
"stroke-width": 2
|
|
2754
2846
|
})])
|
|
2755
2847
|
])])])]),
|
|
2756
|
-
C("div",
|
|
2848
|
+
C("div", Xo, [C("label", Zo, [C("input", {
|
|
2757
2849
|
type: "checkbox",
|
|
2758
2850
|
checked: e.block.hasHeaderRow,
|
|
2759
2851
|
class: "tpl:accent-[var(--tpl-primary)]",
|
|
2760
2852
|
onChange: n[2] ||= (e) => c("hasHeaderRow", e.target.checked)
|
|
2761
|
-
}, null, 40,
|
|
2762
|
-
e.block.hasHeaderRow ? (s(), f("div",
|
|
2853
|
+
}, null, 40, Qo), A(" " + S(p(a).table.hasHeaderRow), 1)])]),
|
|
2854
|
+
e.block.hasHeaderRow ? (s(), f("div", $o, [C("label", { class: D(p(V)) }, S(p(a).table.headerBackgroundColor), 3), m(q, {
|
|
2763
2855
|
"model-value": e.block.headerBackgroundColor || p("#f2f2f2"),
|
|
2764
2856
|
placeholder: p(a).table.noHeaderBg,
|
|
2765
2857
|
"onUpdate:modelValue": n[3] ||= (e) => c("headerBackgroundColor", e || null)
|
|
2766
2858
|
}, null, 8, ["model-value", "placeholder"])])) : v("", !0),
|
|
2767
|
-
C("div",
|
|
2859
|
+
C("div", es, [C("label", { class: D(p(V)) }, S(p(a).table.borderColor), 3), m(q, {
|
|
2768
2860
|
"model-value": e.block.borderColor,
|
|
2769
2861
|
"onUpdate:modelValue": n[4] ||= (e) => c("borderColor", e)
|
|
2770
2862
|
}, null, 8, ["model-value"])]),
|
|
2771
|
-
C("div",
|
|
2863
|
+
C("div", ts, [C("label", { class: D(p(V)) }, S(p(a).table.borderWidth), 3), C("div", ns, [C("input", {
|
|
2772
2864
|
type: "number",
|
|
2773
2865
|
class: D(p(U)),
|
|
2774
2866
|
value: e.block.borderWidth,
|
|
2775
2867
|
min: "0",
|
|
2776
2868
|
max: "10",
|
|
2777
2869
|
onInput: n[5] ||= (e) => c("borderWidth", Number(e.target.value))
|
|
2778
|
-
}, null, 42,
|
|
2779
|
-
C("div",
|
|
2870
|
+
}, null, 42, rs), C("span", { class: D(p(H)) }, "px", 2)])]),
|
|
2871
|
+
C("div", is, [C("label", { class: D(p(V)) }, S(p(a).table.cellPadding), 3), C("div", as, [C("input", {
|
|
2780
2872
|
type: "number",
|
|
2781
2873
|
class: D(p(U)),
|
|
2782
2874
|
value: e.block.cellPadding,
|
|
2783
2875
|
min: "0",
|
|
2784
2876
|
max: "30",
|
|
2785
2877
|
onInput: n[6] ||= (e) => c("cellPadding", Number(e.target.value))
|
|
2786
|
-
}, null, 42,
|
|
2787
|
-
C("div",
|
|
2788
|
-
class: D(p(
|
|
2878
|
+
}, null, 42, os), C("span", { class: D(p(H)) }, "px", 2)])]),
|
|
2879
|
+
C("div", ss, [C("label", { class: D(p(V)) }, S(p(a).table.fontFamily), 3), C("select", {
|
|
2880
|
+
class: D(p(B)),
|
|
2789
2881
|
value: e.block.fontFamily || "",
|
|
2790
2882
|
onChange: n[7] ||= (e) => c("fontFamily", e.target.value || void 0)
|
|
2791
|
-
}, [C("option",
|
|
2883
|
+
}, [C("option", ls, S(p(a).title.inheritFont), 1), (s(!0), f(_, null, i(e.fontFamilies, (e) => (s(), f("option", {
|
|
2792
2884
|
key: e.value,
|
|
2793
2885
|
value: e.value
|
|
2794
|
-
}, S(e.label), 9,
|
|
2795
|
-
C("div",
|
|
2886
|
+
}, S(e.label), 9, us))), 128))], 42, cs)]),
|
|
2887
|
+
C("div", ds, [C("label", { class: D(p(V)) }, S(p(a).table.fontSize), 3), C("div", fs, [C("input", {
|
|
2796
2888
|
type: "number",
|
|
2797
2889
|
class: D(p(U)),
|
|
2798
2890
|
value: e.block.fontSize,
|
|
2799
2891
|
min: "10",
|
|
2800
2892
|
max: "32",
|
|
2801
2893
|
onInput: n[8] ||= (e) => c("fontSize", Number(e.target.value))
|
|
2802
|
-
}, null, 42,
|
|
2803
|
-
C("div",
|
|
2894
|
+
}, null, 42, ps), C("span", { class: D(p(H)) }, "px", 2)])]),
|
|
2895
|
+
C("div", ms, [C("label", { class: D(p(V)) }, S(p(a).table.color), 3), m(q, {
|
|
2804
2896
|
"model-value": e.block.color,
|
|
2805
2897
|
"onUpdate:modelValue": n[9] ||= (e) => c("color", e)
|
|
2806
2898
|
}, null, 8, ["model-value"])]),
|
|
2807
|
-
C("div",
|
|
2899
|
+
C("div", hs, [C("label", { class: D(p(V)) }, S(p(a).table.textAlign), 3), m(Z, {
|
|
2808
2900
|
options: [
|
|
2809
2901
|
{
|
|
2810
2902
|
value: "left",
|
|
2811
2903
|
label: p(a).title.alignLeft,
|
|
2812
|
-
icon: p(
|
|
2904
|
+
icon: p(ot)
|
|
2813
2905
|
},
|
|
2814
2906
|
{
|
|
2815
2907
|
value: "center",
|
|
2816
2908
|
label: p(a).title.alignCenter,
|
|
2817
|
-
icon: p(
|
|
2909
|
+
icon: p(pt)
|
|
2818
2910
|
},
|
|
2819
2911
|
{
|
|
2820
2912
|
value: "right",
|
|
2821
2913
|
label: p(a).title.alignRight,
|
|
2822
|
-
icon: p(
|
|
2914
|
+
icon: p(dt)
|
|
2823
2915
|
}
|
|
2824
2916
|
],
|
|
2825
2917
|
"model-value": e.block.textAlign,
|
|
@@ -2827,7 +2919,7 @@ var co = {
|
|
|
2827
2919
|
}, null, 8, ["options", "model-value"])])
|
|
2828
2920
|
], 64));
|
|
2829
2921
|
}
|
|
2830
|
-
}),
|
|
2922
|
+
}), _s = { class: "tpl:mb-3.5" }, vs = ["value"], ys = { value: 1 }, bs = { value: 2 }, xs = { value: 3 }, Ss = { value: 4 }, Cs = { class: "tpl:mb-3.5" }, ws = ["value"], Ts = { value: "" }, Es = ["value"], Ds = { class: "tpl:mb-3.5" }, Os = { class: "tpl:mb-3.5" }, ks = /* @__PURE__ */ l({
|
|
2831
2923
|
__name: "TitleToolbar",
|
|
2832
2924
|
props: {
|
|
2833
2925
|
block: {},
|
|
@@ -2835,49 +2927,49 @@ var co = {
|
|
|
2835
2927
|
},
|
|
2836
2928
|
emits: ["update"],
|
|
2837
2929
|
setup(e, { emit: t }) {
|
|
2838
|
-
let n = t, { t: r } =
|
|
2930
|
+
let n = t, { t: r } = L();
|
|
2839
2931
|
function a(e, t) {
|
|
2840
2932
|
n("update", { [e]: t });
|
|
2841
2933
|
}
|
|
2842
2934
|
return (t, n) => (s(), f(_, null, [
|
|
2843
|
-
C("div",
|
|
2844
|
-
class: D(p(
|
|
2935
|
+
C("div", _s, [C("label", { class: D(p(V)) }, S(p(r).title.level), 3), C("select", {
|
|
2936
|
+
class: D(p(B)),
|
|
2845
2937
|
value: e.block.level,
|
|
2846
2938
|
onChange: n[0] ||= (e) => a("level", Number(e.target.value))
|
|
2847
2939
|
}, [
|
|
2848
|
-
C("option",
|
|
2849
|
-
C("option",
|
|
2850
|
-
C("option",
|
|
2851
|
-
C("option",
|
|
2852
|
-
], 42,
|
|
2853
|
-
C("div",
|
|
2854
|
-
class: D(p(
|
|
2940
|
+
C("option", ys, S(p(r).title.heading1), 1),
|
|
2941
|
+
C("option", bs, S(p(r).title.heading2), 1),
|
|
2942
|
+
C("option", xs, S(p(r).title.heading3), 1),
|
|
2943
|
+
C("option", Ss, S(p(r).title.heading4), 1)
|
|
2944
|
+
], 42, vs)]),
|
|
2945
|
+
C("div", Cs, [C("label", { class: D(p(V)) }, S(p(r).title.fontFamily), 3), C("select", {
|
|
2946
|
+
class: D(p(B)),
|
|
2855
2947
|
value: e.block.fontFamily || "",
|
|
2856
2948
|
onChange: n[1] ||= (e) => a("fontFamily", e.target.value || void 0)
|
|
2857
|
-
}, [C("option",
|
|
2949
|
+
}, [C("option", Ts, S(p(r).title.inheritFont), 1), (s(!0), f(_, null, i(e.fontFamilies, (e) => (s(), f("option", {
|
|
2858
2950
|
key: e.value,
|
|
2859
2951
|
value: e.value
|
|
2860
|
-
}, S(e.label), 9,
|
|
2861
|
-
C("div",
|
|
2952
|
+
}, S(e.label), 9, Es))), 128))], 42, ws)]),
|
|
2953
|
+
C("div", Ds, [C("label", { class: D(p(V)) }, S(p(r).title.color), 3), m(q, {
|
|
2862
2954
|
"model-value": e.block.color,
|
|
2863
2955
|
"onUpdate:modelValue": n[2] ||= (e) => a("color", e)
|
|
2864
2956
|
}, null, 8, ["model-value"])]),
|
|
2865
|
-
C("div",
|
|
2957
|
+
C("div", Os, [C("label", { class: D(p(V)) }, S(p(r).title.align), 3), m(Z, {
|
|
2866
2958
|
options: [
|
|
2867
2959
|
{
|
|
2868
2960
|
value: "left",
|
|
2869
2961
|
label: p(r).title.alignLeft,
|
|
2870
|
-
icon: p(
|
|
2962
|
+
icon: p(ot)
|
|
2871
2963
|
},
|
|
2872
2964
|
{
|
|
2873
2965
|
value: "center",
|
|
2874
2966
|
label: p(r).title.alignCenter,
|
|
2875
|
-
icon: p(
|
|
2967
|
+
icon: p(pt)
|
|
2876
2968
|
},
|
|
2877
2969
|
{
|
|
2878
2970
|
value: "right",
|
|
2879
2971
|
label: p(r).title.alignRight,
|
|
2880
|
-
icon: p(
|
|
2972
|
+
icon: p(dt)
|
|
2881
2973
|
}
|
|
2882
2974
|
],
|
|
2883
2975
|
"model-value": e.block.textAlign,
|
|
@@ -2885,7 +2977,7 @@ var co = {
|
|
|
2885
2977
|
}, null, 8, ["options", "model-value"])])
|
|
2886
2978
|
], 64));
|
|
2887
2979
|
}
|
|
2888
|
-
}),
|
|
2980
|
+
}), As = ["aria-label"], js = { class: "tpl:flex tpl:items-center tpl:justify-between tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-3.5" }, Ms = { class: "tpl:flex tpl:items-center tpl:gap-2 tpl:text-[var(--tpl-primary)]" }, Ns = { class: "tpl:m-0 tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]" }, Ps = { class: "tpl:flex tpl:gap-1" }, Fs = ["title"], Is = ["title"], Ls = { class: "tpl:flex-1 tpl:overflow-y-auto tpl:p-4" }, Rs = /* @__PURE__ */ j(/* @__PURE__ */ l({
|
|
2889
2981
|
__name: "Toolbar",
|
|
2890
2982
|
props: { block: {} },
|
|
2891
2983
|
emits: [
|
|
@@ -2894,116 +2986,116 @@ var co = {
|
|
|
2894
2986
|
"duplicate"
|
|
2895
2987
|
],
|
|
2896
2988
|
setup(e, { emit: t }) {
|
|
2897
|
-
let n = e, i = t, { t: a } =
|
|
2989
|
+
let n = e, i = t, { t: a } = L(), o = Te(be, "Toolbar"), l = r(N, []), u = T(() => n.block.type), d = T(() => Oe(n.block)), h = T(() => {
|
|
2898
2990
|
if (d.value) return l.find((e) => e.type === n.block.customType);
|
|
2899
|
-
}), g = T(() => d.value ? h.value?.name ?? n.block.customType :
|
|
2991
|
+
}), g = T(() => d.value ? h.value?.name ?? n.block.customType : M(u.value, a)), b = o.fonts;
|
|
2900
2992
|
function x(e) {
|
|
2901
2993
|
i("update", e);
|
|
2902
2994
|
}
|
|
2903
2995
|
return (t, n) => (s(), f("aside", {
|
|
2904
2996
|
"aria-label": p(a).landmarks.blockToolbar,
|
|
2905
2997
|
class: "tpl:flex tpl:w-full tpl:flex-1 tpl:flex-col tpl:bg-[var(--tpl-bg-elevated)]"
|
|
2906
|
-
}, [C("div",
|
|
2998
|
+
}, [C("div", js, [C("div", Ms, [p(_t)[u.value] ? (s(), y(c(p(_t)[u.value]), {
|
|
2907
2999
|
key: 0,
|
|
2908
3000
|
size: 16,
|
|
2909
3001
|
"stroke-width": 1.5
|
|
2910
|
-
})) : d.value ? (s(), y(p(
|
|
3002
|
+
})) : d.value ? (s(), y(p(Me), {
|
|
2911
3003
|
key: 1,
|
|
2912
3004
|
size: 16,
|
|
2913
3005
|
"stroke-width": 1.5
|
|
2914
|
-
})) : v("", !0), C("h3",
|
|
3006
|
+
})) : v("", !0), C("h3", Ns, S(g.value), 1)]), C("div", Ps, [C("button", {
|
|
2915
3007
|
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)]",
|
|
2916
3008
|
title: p(a).toolbar.duplicate,
|
|
2917
3009
|
onClick: n[0] ||= (e) => i("duplicate")
|
|
2918
3010
|
}, [m(p(Xe), {
|
|
2919
3011
|
size: 14,
|
|
2920
3012
|
"stroke-width": 2
|
|
2921
|
-
})], 8,
|
|
3013
|
+
})], 8, Fs), C("button", {
|
|
2922
3014
|
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)]",
|
|
2923
3015
|
title: p(a).toolbar.delete,
|
|
2924
3016
|
onClick: n[1] ||= (e) => i("delete")
|
|
2925
3017
|
}, [m(p(Ge), {
|
|
2926
3018
|
size: 14,
|
|
2927
3019
|
"stroke-width": 2
|
|
2928
|
-
})], 8,
|
|
3020
|
+
})], 8, Is)])]), C("div", Ls, [d.value ? (s(), y(Pa, {
|
|
2929
3021
|
key: 0,
|
|
2930
3022
|
block: e.block,
|
|
2931
3023
|
onUpdateFieldValues: n[2] ||= (e) => i("update", { fieldValues: e }),
|
|
2932
3024
|
onUpdateDataSourceFetched: n[3] ||= (e) => i("update", { dataSourceFetched: e })
|
|
2933
|
-
}, null, 8, ["block"])) : u.value === "section" ? (s(), y(
|
|
3025
|
+
}, null, 8, ["block"])) : u.value === "section" ? (s(), y(yo, {
|
|
2934
3026
|
key: 1,
|
|
2935
3027
|
block: e.block,
|
|
2936
3028
|
onUpdate: x
|
|
2937
|
-
}, null, 8, ["block"])) : u.value === "title" ? (s(), y(
|
|
3029
|
+
}, null, 8, ["block"])) : u.value === "title" ? (s(), y(ks, {
|
|
2938
3030
|
key: 2,
|
|
2939
3031
|
block: e.block,
|
|
2940
3032
|
"font-families": p(b),
|
|
2941
3033
|
onUpdate: x
|
|
2942
|
-
}, null, 8, ["block", "font-families"])) : u.value === "paragraph" ? (s(), f(_, { key: 3 }, [], 64)) : u.value === "image" ? (s(), y(
|
|
3034
|
+
}, null, 8, ["block", "font-families"])) : u.value === "paragraph" ? (s(), f(_, { key: 3 }, [], 64)) : u.value === "image" ? (s(), y(no, {
|
|
2943
3035
|
key: 4,
|
|
2944
3036
|
block: e.block,
|
|
2945
3037
|
onUpdate: x
|
|
2946
|
-
}, null, 8, ["block"])) : u.value === "button" ? (s(), y(
|
|
3038
|
+
}, null, 8, ["block"])) : u.value === "button" ? (s(), y(Lr, {
|
|
2947
3039
|
key: 5,
|
|
2948
3040
|
block: e.block,
|
|
2949
3041
|
"font-families": p(b),
|
|
2950
3042
|
onUpdate: x
|
|
2951
|
-
}, null, 8, ["block", "font-families"])) : u.value === "divider" ? (s(), y(
|
|
3043
|
+
}, null, 8, ["block", "font-families"])) : u.value === "divider" ? (s(), y(Ba, {
|
|
2952
3044
|
key: 6,
|
|
2953
3045
|
block: e.block,
|
|
2954
3046
|
onUpdate: x
|
|
2955
|
-
}, null, 8, ["block"])) : u.value === "social" ? (s(), y(
|
|
3047
|
+
}, null, 8, ["block"])) : u.value === "social" ? (s(), y(Mo, {
|
|
2956
3048
|
key: 7,
|
|
2957
3049
|
block: e.block,
|
|
2958
3050
|
onUpdate: x
|
|
2959
|
-
}, null, 8, ["block"])) : u.value === "menu" ? (s(), y(
|
|
3051
|
+
}, null, 8, ["block"])) : u.value === "menu" ? (s(), y(ho, {
|
|
2960
3052
|
key: 8,
|
|
2961
3053
|
block: e.block,
|
|
2962
3054
|
"font-families": p(b),
|
|
2963
3055
|
onUpdate: x
|
|
2964
|
-
}, null, 8, ["block", "font-families"])) : u.value === "table" ? (s(), y(
|
|
3056
|
+
}, null, 8, ["block", "font-families"])) : u.value === "table" ? (s(), y(gs, {
|
|
2965
3057
|
key: 9,
|
|
2966
3058
|
block: e.block,
|
|
2967
3059
|
"font-families": p(b),
|
|
2968
3060
|
onUpdate: x
|
|
2969
|
-
}, null, 8, ["block", "font-families"])) : u.value === "spacer" ? (s(), y(
|
|
3061
|
+
}, null, 8, ["block", "font-families"])) : u.value === "spacer" ? (s(), y(Lo, {
|
|
2970
3062
|
key: 10,
|
|
2971
3063
|
block: e.block,
|
|
2972
3064
|
onUpdate: x
|
|
2973
|
-
}, null, 8, ["block"])) : u.value === "html" ? (s(), y(
|
|
3065
|
+
}, null, 8, ["block"])) : u.value === "html" ? (s(), y(Wa, {
|
|
2974
3066
|
key: 11,
|
|
2975
3067
|
block: e.block,
|
|
2976
3068
|
onUpdate: x
|
|
2977
|
-
}, null, 8, ["block"])) : u.value === "countdown" ? (s(), y(
|
|
3069
|
+
}, null, 8, ["block"])) : u.value === "countdown" ? (s(), y(Zi, {
|
|
2978
3070
|
key: 12,
|
|
2979
3071
|
block: e.block,
|
|
2980
3072
|
"font-families": p(b),
|
|
2981
3073
|
onUpdate: x
|
|
2982
|
-
}, null, 8, ["block", "font-families"])) : v("", !0), m(
|
|
3074
|
+
}, null, 8, ["block", "font-families"])) : v("", !0), m(Oi, {
|
|
2983
3075
|
block: e.block,
|
|
2984
3076
|
"is-first-section": u.value === "paragraph",
|
|
2985
3077
|
onUpdate: x
|
|
2986
|
-
}, null, 8, ["block", "is-first-section"])])], 8,
|
|
3078
|
+
}, null, 8, ["block", "is-first-section"])])], 8, As));
|
|
2987
3079
|
}
|
|
2988
|
-
}), [["__scopeId", "data-v-fb6efed6"]]),
|
|
3080
|
+
}), [["__scopeId", "data-v-fb6efed6"]]), zs = ["aria-label"], Bs = {
|
|
2989
3081
|
role: "tablist",
|
|
2990
3082
|
class: "tpl:relative tpl:flex tpl:border-b tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-hover)]"
|
|
2991
|
-
},
|
|
3083
|
+
}, Vs = ["aria-selected"], Hs = ["aria-selected"], Us = {
|
|
2992
3084
|
key: 0,
|
|
2993
3085
|
id: "tpl-tabpanel-content",
|
|
2994
3086
|
role: "tabpanel",
|
|
2995
3087
|
"aria-labelledby": "tpl-tab-content",
|
|
2996
3088
|
class: "tpl:flex tpl:flex-1 tpl:flex-col tpl:overflow-y-auto"
|
|
2997
|
-
},
|
|
3089
|
+
}, Ws = {
|
|
2998
3090
|
key: 1,
|
|
2999
3091
|
class: "tpl:flex tpl:flex-col tpl:items-center tpl:justify-center tpl:px-6 tpl:py-10 tpl:text-center tpl:text-[var(--tpl-text-muted)]"
|
|
3000
|
-
},
|
|
3092
|
+
}, Gs = { class: "tpl:mb-4 tpl:text-[var(--tpl-text-dim)]" }, Ks = { class: "tpl:m-0 tpl:mb-2 tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]" }, qs = { class: "tpl:m-0 tpl:text-sm tpl:leading-normal" }, Js = {
|
|
3001
3093
|
key: 1,
|
|
3002
3094
|
id: "tpl-tabpanel-settings",
|
|
3003
3095
|
role: "tabpanel",
|
|
3004
3096
|
"aria-labelledby": "tpl-tab-settings",
|
|
3005
3097
|
class: "tpl:flex tpl:flex-1 tpl:flex-col tpl:overflow-y-auto"
|
|
3006
|
-
},
|
|
3098
|
+
}, Ys = /* @__PURE__ */ l({
|
|
3007
3099
|
__name: "RightSidebar",
|
|
3008
3100
|
props: {
|
|
3009
3101
|
selectedBlock: {},
|
|
@@ -3017,14 +3109,14 @@ var co = {
|
|
|
3017
3109
|
"update-settings"
|
|
3018
3110
|
],
|
|
3019
3111
|
setup(e, { emit: r }) {
|
|
3020
|
-
let i = e, a = r, { t: o } =
|
|
3112
|
+
let i = e, a = r, { t: o } = L(), c = t("content"), l = T(() => c.value === "content" ? "tpl:translate-x-0" : "tpl:translate-x-full");
|
|
3021
3113
|
return n(() => i.selectedBlock, (e) => {
|
|
3022
3114
|
e && (c.value = "content");
|
|
3023
3115
|
}), (t, n) => (s(), f("aside", {
|
|
3024
3116
|
"aria-label": p(o).landmarks.rightSidebar,
|
|
3025
3117
|
class: D(["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"])
|
|
3026
3118
|
}, [
|
|
3027
|
-
C("div",
|
|
3119
|
+
C("div", Bs, [
|
|
3028
3120
|
C("div", { class: D(["tpl:absolute tpl:bottom-0 tpl:left-0 tpl:h-full tpl:w-1/2 tpl:p-1.5 tpl:transition-transform tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)]", l.value]) }, [...n[6] ||= [C("div", { class: "tpl:h-full tpl:w-full tpl:rounded-[var(--tpl-radius-sm)] tpl:bg-[var(--tpl-bg)] tpl:shadow-[var(--tpl-shadow)]" }, null, -1)]], 2),
|
|
3029
3121
|
C("button", {
|
|
3030
3122
|
id: "tpl-tab-content",
|
|
@@ -3036,7 +3128,7 @@ var co = {
|
|
|
3036
3128
|
}, [m(p(it), {
|
|
3037
3129
|
size: 14,
|
|
3038
3130
|
"stroke-width": 2
|
|
3039
|
-
}),
|
|
3131
|
+
}), A(" " + S(p(o).sidebar.content), 1)], 10, Vs),
|
|
3040
3132
|
C("button", {
|
|
3041
3133
|
id: "tpl-tab-settings",
|
|
3042
3134
|
role: "tab",
|
|
@@ -3044,42 +3136,42 @@ var co = {
|
|
|
3044
3136
|
"aria-controls": "tpl-tabpanel-settings",
|
|
3045
3137
|
class: D(["tpl:relative tpl:z-10 tpl:flex tpl:flex-1 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:gap-1.5 tpl:border-none tpl:bg-transparent tpl:px-4 tpl:py-3 tpl:text-xs tpl:font-medium tpl:transition-colors tpl:duration-[120ms]", c.value === "settings" ? "tpl:text-[var(--tpl-primary)]" : "tpl:text-[var(--tpl-text-muted)] hover:tpl:text-[var(--tpl-text)]"]),
|
|
3046
3138
|
onClick: n[1] ||= (e) => c.value = "settings"
|
|
3047
|
-
}, [m(p(
|
|
3139
|
+
}, [m(p(ht), {
|
|
3048
3140
|
size: 14,
|
|
3049
3141
|
"stroke-width": 1.5
|
|
3050
|
-
}),
|
|
3142
|
+
}), A(" " + S(p(o).sidebar.settings), 1)], 10, Hs)
|
|
3051
3143
|
]),
|
|
3052
|
-
c.value === "content" ? (s(), f("div",
|
|
3144
|
+
c.value === "content" ? (s(), f("div", Us, [e.selectedBlock ? (s(), y(Rs, {
|
|
3053
3145
|
key: 0,
|
|
3054
3146
|
block: e.selectedBlock,
|
|
3055
3147
|
onUpdate: n[2] ||= (e) => a("update-block", e),
|
|
3056
3148
|
onDelete: n[3] ||= (e) => a("delete-block"),
|
|
3057
3149
|
onDuplicate: n[4] ||= (e) => a("duplicate-block")
|
|
3058
|
-
}, null, 8, ["block"])) : (s(), f("div",
|
|
3059
|
-
C("div",
|
|
3150
|
+
}, null, 8, ["block"])) : (s(), f("div", Ws, [
|
|
3151
|
+
C("div", Gs, [m(p($e), {
|
|
3060
3152
|
size: 40,
|
|
3061
3153
|
"stroke-width": 1.5
|
|
3062
3154
|
})]),
|
|
3063
|
-
C("h3",
|
|
3064
|
-
C("p",
|
|
3155
|
+
C("h3", Ks, S(p(o).sidebar.noSelection), 1),
|
|
3156
|
+
C("p", qs, S(p(o).sidebar.noSelectionHint), 1)
|
|
3065
3157
|
]))])) : v("", !0),
|
|
3066
|
-
c.value === "settings" ? (s(), f("div",
|
|
3158
|
+
c.value === "settings" ? (s(), f("div", Js, [m(mr, {
|
|
3067
3159
|
settings: e.settings,
|
|
3068
3160
|
onUpdate: n[5] ||= (e) => a("update-settings", e)
|
|
3069
3161
|
}, null, 8, ["settings"])])) : v("", !0)
|
|
3070
|
-
], 10,
|
|
3162
|
+
], 10, zs));
|
|
3071
3163
|
}
|
|
3072
|
-
}),
|
|
3164
|
+
}), Xs = ["aria-label"], Zs = [
|
|
3073
3165
|
"aria-checked",
|
|
3074
3166
|
"aria-label",
|
|
3075
3167
|
"title",
|
|
3076
3168
|
"onClick"
|
|
3077
|
-
],
|
|
3169
|
+
], Qs = /* @__PURE__ */ l({
|
|
3078
3170
|
__name: "ViewportToggle",
|
|
3079
3171
|
props: { viewport: {} },
|
|
3080
3172
|
emits: ["change"],
|
|
3081
3173
|
setup(e, { emit: t }) {
|
|
3082
|
-
let n = e, r = t, { t: a } =
|
|
3174
|
+
let n = e, r = t, { t: a } = L(), o = T(() => [
|
|
3083
3175
|
{
|
|
3084
3176
|
value: "desktop",
|
|
3085
3177
|
label: a.viewport.desktop
|
|
@@ -3127,7 +3219,7 @@ var co = {
|
|
|
3127
3219
|
key: 0,
|
|
3128
3220
|
size: 18,
|
|
3129
3221
|
"stroke-width": 1.5
|
|
3130
|
-
})) : t.value === "tablet" ? (s(), y(p(
|
|
3222
|
+
})) : t.value === "tablet" ? (s(), y(p(ct), {
|
|
3131
3223
|
key: 1,
|
|
3132
3224
|
size: 18,
|
|
3133
3225
|
"stroke-width": 1.5
|
|
@@ -3135,18 +3227,18 @@ var co = {
|
|
|
3135
3227
|
key: 2,
|
|
3136
3228
|
size: 18,
|
|
3137
3229
|
"stroke-width": 1.5
|
|
3138
|
-
})), C("span", null, S(t.label), 1)], 12,
|
|
3230
|
+
})), C("span", null, S(t.label), 1)], 12, Zs))), 128))], 12, Xs));
|
|
3139
3231
|
}
|
|
3140
|
-
}),
|
|
3232
|
+
}), $s = [
|
|
3141
3233
|
"aria-label",
|
|
3142
3234
|
"title",
|
|
3143
3235
|
"aria-pressed"
|
|
3144
|
-
],
|
|
3236
|
+
], ec = /* @__PURE__ */ j(/* @__PURE__ */ l({
|
|
3145
3237
|
__name: "PreviewToggle",
|
|
3146
3238
|
props: { previewMode: { type: Boolean } },
|
|
3147
3239
|
emits: ["change"],
|
|
3148
3240
|
setup(e, { emit: t }) {
|
|
3149
|
-
let n = t, { t: r } =
|
|
3241
|
+
let n = t, { t: r } = L();
|
|
3150
3242
|
return (t, i) => (s(), f("button", {
|
|
3151
3243
|
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",
|
|
3152
3244
|
style: g({
|
|
@@ -3164,7 +3256,7 @@ var co = {
|
|
|
3164
3256
|
"leave-to-class": "tpl-icon-leave-to",
|
|
3165
3257
|
mode: "out-in"
|
|
3166
3258
|
}, {
|
|
3167
|
-
default: a(() => [e.previewMode ? (s(), y(p(
|
|
3259
|
+
default: a(() => [e.previewMode ? (s(), y(p(ke), {
|
|
3168
3260
|
key: "eye",
|
|
3169
3261
|
size: 18,
|
|
3170
3262
|
"stroke-width": 1.5
|
|
@@ -3174,18 +3266,18 @@ var co = {
|
|
|
3174
3266
|
"stroke-width": 1.5
|
|
3175
3267
|
}))]),
|
|
3176
3268
|
_: 1
|
|
3177
|
-
})], 12,
|
|
3269
|
+
})], 12, $s));
|
|
3178
3270
|
}
|
|
3179
|
-
}), [["__scopeId", "data-v-af87d02a"]]),
|
|
3271
|
+
}), [["__scopeId", "data-v-af87d02a"]]), tc = [
|
|
3180
3272
|
"aria-label",
|
|
3181
3273
|
"title",
|
|
3182
3274
|
"aria-pressed"
|
|
3183
|
-
],
|
|
3275
|
+
], nc = /* @__PURE__ */ j(/* @__PURE__ */ l({
|
|
3184
3276
|
__name: "DarkModeToggle",
|
|
3185
3277
|
props: { darkMode: { type: Boolean } },
|
|
3186
3278
|
emits: ["change"],
|
|
3187
3279
|
setup(e, { emit: t }) {
|
|
3188
|
-
let n = t, { t: r } =
|
|
3280
|
+
let n = t, { t: r } = L();
|
|
3189
3281
|
return (t, i) => (s(), f("button", {
|
|
3190
3282
|
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",
|
|
3191
3283
|
style: g({
|
|
@@ -3207,16 +3299,52 @@ var co = {
|
|
|
3207
3299
|
key: "moon",
|
|
3208
3300
|
size: 18,
|
|
3209
3301
|
"stroke-width": 1.5
|
|
3210
|
-
})) : (s(), y(p(
|
|
3302
|
+
})) : (s(), y(p(mt), {
|
|
3211
3303
|
key: "sun",
|
|
3212
3304
|
size: 18,
|
|
3213
3305
|
"stroke-width": 1.5
|
|
3214
3306
|
}))]),
|
|
3215
3307
|
_: 1
|
|
3216
|
-
})], 12,
|
|
3308
|
+
})], 12, tc));
|
|
3309
|
+
}
|
|
3310
|
+
}), [["__scopeId", "data-v-f8694f76"]]), rc = {
|
|
3311
|
+
class: "tpl:pointer-events-auto tpl:flex tpl:items-center tpl:gap-1.5 tpl:rounded-tl-lg tpl:p-1",
|
|
3312
|
+
style: {
|
|
3313
|
+
"background-color": "color-mix(\n in srgb,\n var(--tpl-canvas-bg) 85%,\n transparent\n )",
|
|
3314
|
+
"backdrop-filter": "blur(8px)",
|
|
3315
|
+
"-webkit-backdrop-filter": "blur(8px)"
|
|
3217
3316
|
}
|
|
3218
|
-
}
|
|
3317
|
+
}, ic = {
|
|
3318
|
+
href: "https://github.com/templatical/sdk",
|
|
3319
|
+
target: "_blank",
|
|
3320
|
+
rel: "noopener noreferrer",
|
|
3321
|
+
class: "tpl:transition-colors tpl:duration-150 hover:tpl:opacity-80 tpl:text-[var(--tpl-text-dim)]",
|
|
3322
|
+
style: { "text-decoration": "none" }
|
|
3323
|
+
}, ac = /* @__PURE__ */ l({
|
|
3324
|
+
__name: "EditorFooter",
|
|
3325
|
+
props: { positionClass: {} },
|
|
3326
|
+
setup(e) {
|
|
3327
|
+
let { t } = L();
|
|
3328
|
+
return (n, r) => (s(), f("footer", { class: D(["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]) }, [C("div", rc, [
|
|
3329
|
+
C("span", null, S(p(t).footer.poweredBy), 1),
|
|
3330
|
+
r[0] ||= C("a", {
|
|
3331
|
+
href: "https://templatical.com",
|
|
3332
|
+
target: "_blank",
|
|
3333
|
+
rel: "noopener noreferrer",
|
|
3334
|
+
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)]",
|
|
3335
|
+
style: { "text-decoration": "none" }
|
|
3336
|
+
}, [C("img", {
|
|
3337
|
+
width: "14",
|
|
3338
|
+
height: "14",
|
|
3339
|
+
src: "https://templatical.com/logo.svg",
|
|
3340
|
+
alt: ""
|
|
3341
|
+
}), A(" Templatical ")], -1),
|
|
3342
|
+
r[1] ||= C("span", { class: "tpl:text-[var(--tpl-border)]" }, "·", -1),
|
|
3343
|
+
C("a", ic, S(p(t).footer.openSource), 1)
|
|
3344
|
+
])], 2));
|
|
3345
|
+
}
|
|
3346
|
+
});
|
|
3219
3347
|
//#endregion
|
|
3220
|
-
export {
|
|
3348
|
+
export { Ys as a, Qs as i, nc as n, Wt as o, ec as r, Ft as s, ac as t };
|
|
3221
3349
|
|
|
3222
|
-
//# sourceMappingURL=styles-
|
|
3350
|
+
//# sourceMappingURL=styles-Dgijy53u.js.map
|